8-bit Crate Pusher 404
8bitcn/not-found-crate-pusherFreeBlock
A randomized crate-pushing 404 page with 20 curated, solver-verified puzzles.
Install it
npx shadcn@latest add https://www.8bitcn.com/r/not-found-crate-pusher.jsonSource
1/** biome-ignore-all lint/a11y/noNoninteractiveElementInteractions: The focus-scoped game fieldset intentionally owns keyboard input. */2/** biome-ignore-all lint/a11y/noNoninteractiveTabindex: The game fieldset must receive focus without a global listener. */3"use client";45import Link from "next/link";6import {7 type ComponentPropsWithoutRef,8 type KeyboardEvent as ReactKeyboardEvent,9 useId,10 useMemo,11 useReducer,12 useRef,13 useState,14} from "react";1516import { Badge } from "@/components/ui/8bit/badge";17import { Button } from "@/components/ui/8bit/button";18import {19 Card,20 CardContent,21 CardFooter,22 CardHeader,23} from "@/components/ui/8bit/card";24import { Kbd, KbdGroup } from "@/components/ui/8bit/kbd";25import {26 type CratePusherState,27 createCratePusherState,28 type Direction,29 moveCratePusher,30 type ParsedCratePusherLevel,31 type PositionKey,32 parseCratePusherLevel,33 resetCratePusher,34 startCratePusher,35 undoCratePusher,36} from "@/lib/games/crate-pusher";37import {38 CRATE_PUSHER_LEVELS,39 type CratePusherLevelDefinition,40 type CratePusherShuffleBag,41 createCratePusherShuffleBag,42 drawCratePusherShuffleBag,43} from "@/lib/games/crate-pusher-levels";44import { cn } from "@/lib/utils";4546import "@/components/ui/8bit/styles/retro.css";4748export interface NotFoundCratePusherProps49 extends ComponentPropsWithoutRef<"section"> {50 badge?: string;51 cta?: string;52 description?: string;53 href?: string;54 level?: readonly string[];55 seed?: number;56 title?: string;57}5859interface CratePusherGameProps60 extends Omit<NotFoundCratePusherProps, "level" | "seed"> {61 readonly catalogMode: boolean;62 readonly initialLevel: ParsedCratePusherLevel;63 readonly seed?: number;64}6566interface BoardTileProps {67 readonly column: number;68 readonly row: number;69 readonly state: CratePusherState;70}7172type CratePusherAction =73 | {74 readonly announcement: string;75 readonly level: ParsedCratePusherLevel;76 readonly type: "load";77 }78 | { readonly type: "move"; readonly direction: Direction }79 | { readonly type: "restart" }80 | { readonly type: "start" }81 | { readonly type: "undo" };8283const KEY_DIRECTIONS: Readonly<Record<string, Direction | undefined>> = {84 a: "left",85 arrowdown: "down",86 arrowleft: "left",87 arrowright: "right",88 arrowup: "up",89 d: "right",90 s: "down",91 w: "up",92};9394const INTERACTIVE_SELECTOR =95 "a, button, input, textarea, select, [contenteditable=''], [contenteditable='true']";9697// … truncated
What it pulls in
Other registry items
Files it writes
More from 8bitcn
All 121 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| 8-bit Advanced 1advanced1 | 8bitcn | Blocks | Free | no deps · 3 files | |
| 8-bit Advanced 2advanced2 | 8bitcn | Blocks | Free | no deps · 5 files | |
| 8-bit Advanced 3advanced3 | 8bitcn | Blocks | Free | no deps · 6 files | |
| 8-bit Audio Settingsaudio-settings | 8bitcn | Blocks | Free | 2 deps · 7 files | |
| 8-bit Chapter Introchapter-intro | 8bitcn | Blocks | Free | no deps · 3 files | |
| 8-bit Character Sheetcharacter-sheet | 8bitcn | Blocks | Free | no deps · 9 files | |
| 8-bit Chartchart | 8bitcn | Blocks | Free | no deps · 3 files | |
| 8-bit Chart Area Stepchart-area-step | 8bitcn | Blocks | Free | no deps · 3 files |
