poon-choi 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/.output/nitro.json +17 -0
  2. package/.output/public/assets/about-D4e6L2RX.js +1 -0
  3. package/.output/public/assets/index-B6P0kA2f.css +1 -0
  4. package/.output/public/assets/index-CdiJXXIG.js +11 -0
  5. package/.output/public/assets/routes-BgrRSMVP.js +7 -0
  6. package/.output/public/assets/styles-DqQrEVt_.css +1 -0
  7. package/.output/server/_chunks/ssr-renderer.mjs +23 -0
  8. package/.output/server/_libs/@tanstack/react-router+[...].mjs +15021 -0
  9. package/.output/server/_libs/clsx.mjs +15 -0
  10. package/.output/server/_libs/h3+rou3+srvx.mjs +1352 -0
  11. package/.output/server/_libs/tailwind-merge.mjs +3459 -0
  12. package/.output/server/_libs/tanstack__history.mjs +363 -0
  13. package/.output/server/_libs/ufo.mjs +63 -0
  14. package/.output/server/_runtime.mjs +34 -0
  15. package/.output/server/_ssr/about-C106R88A.mjs +26 -0
  16. package/.output/server/_ssr/empty-plugin-adapters-BiGySXWX.mjs +4 -0
  17. package/.output/server/_ssr/router-B7lhQtFL.mjs +258 -0
  18. package/.output/server/_ssr/routes-Cutxg__h.mjs +769 -0
  19. package/.output/server/_ssr/ssr.mjs +7304 -0
  20. package/.output/server/_ssr/start-CwhArFJN.mjs +3 -0
  21. package/.output/server/_tanstack-start-manifest_v-Dh5m4VsW.mjs +25 -0
  22. package/.output/server/index.mjs +311 -0
  23. package/LICENSE +21 -0
  24. package/README.md +8 -0
  25. package/README.zh.md +8 -0
  26. package/bin/{index.ts → cli.ts} +6 -2
  27. package/package.json +12 -49
  28. package/README.tanstack-start.md +0 -224
  29. package/src/components/DropStage.tsx +0 -64
  30. package/src/components/FitModeToggle.tsx +0 -34
  31. package/src/components/Footer.tsx +0 -44
  32. package/src/components/GapColorPicker.tsx +0 -53
  33. package/src/components/Header.tsx +0 -78
  34. package/src/components/PresetColorDropdown.tsx +0 -166
  35. package/src/components/ThemeToggle.tsx +0 -81
  36. package/src/components/ThumbnailStrip.tsx +0 -147
  37. package/src/components/VerticalSeparator.tsx +0 -5
  38. package/src/hooks/useToast.tsx +0 -23
  39. package/src/lib/config.ts +0 -48
  40. package/src/lib/draw.ts +0 -78
  41. package/src/lib/file.ts +0 -23
  42. package/src/lib/utils.ts +0 -7
  43. package/src/routeTree.gen.ts +0 -86
  44. package/src/router.tsx +0 -19
  45. package/src/routes/__root.tsx +0 -68
  46. package/src/routes/about.tsx +0 -23
  47. package/src/routes/index.css +0 -300
  48. package/src/routes/index.tsx +0 -511
  49. package/src/styles.css +0 -375
@@ -0,0 +1,258 @@
1
+ import { i as __toESM, n as __exportAll } from "../_runtime.mjs";
2
+ import { c as createFileRoute, d as require_react, f as require_jsx_runtime, i as HeadContent, l as createRootRoute, o as createRouter, r as Scripts, s as lazyRouteComponent, u as Link } from "../_libs/@tanstack/react-router+[...].mjs";
3
+ // node_modules/.nitro/vite/services/ssr/assets/router-B7lhQtFL.js
4
+ var router_B7lhQtFL_exports = /* @__PURE__ */ __exportAll({ getRouter: () => getRouter });
5
+ var import_react = /* @__PURE__ */ __toESM(require_react());
6
+ var import_jsx_runtime = require_jsx_runtime();
7
+ function Footer() {
8
+ const year = (/* @__PURE__ */ new Date()).getFullYear();
9
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("footer", {
10
+ className: "mt-20 border-t border-[var(--line)] px-4 pb-14 pt-10 text-[var(--sea-ink-soft)]",
11
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
12
+ className: "page-wrap flex flex-col items-center justify-between gap-4 text-center sm:flex-row sm:text-left",
13
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
14
+ className: "m-0 text-sm",
15
+ children: [
16
+ "© ",
17
+ year,
18
+ " Your name here. All rights reserved."
19
+ ]
20
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
21
+ className: "island-kicker m-0",
22
+ children: "Built with TanStack Start"
23
+ })]
24
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
25
+ className: "mt-4 flex justify-center gap-4",
26
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", {
27
+ href: "https://x.com/tan_stack",
28
+ target: "_blank",
29
+ rel: "noreferrer",
30
+ className: "rounded-xl p-2 text-[var(--sea-ink-soft)] transition hover:bg-[var(--link-bg-hover)] hover:text-[var(--sea-ink)]",
31
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
32
+ className: "sr-only",
33
+ children: "Follow TanStack on X"
34
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
35
+ viewBox: "0 0 16 16",
36
+ "aria-hidden": "true",
37
+ width: "32",
38
+ height: "32",
39
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
40
+ fill: "currentColor",
41
+ d: "M12.6 1h2.2L10 6.48 15.64 15h-4.41L7.78 9.82 3.23 15H1l5.14-5.84L.72 1h4.52l3.12 4.73L12.6 1zm-.77 12.67h1.22L4.57 2.26H3.26l8.57 11.41z"
42
+ })
43
+ })]
44
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", {
45
+ href: "https://github.com/TanStack",
46
+ target: "_blank",
47
+ rel: "noreferrer",
48
+ className: "rounded-xl p-2 text-[var(--sea-ink-soft)] transition hover:bg-[var(--link-bg-hover)] hover:text-[var(--sea-ink)]",
49
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
50
+ className: "sr-only",
51
+ children: "Go to TanStack GitHub"
52
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
53
+ viewBox: "0 0 16 16",
54
+ "aria-hidden": "true",
55
+ width: "32",
56
+ height: "32",
57
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
58
+ fill: "currentColor",
59
+ d: "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"
60
+ })
61
+ })]
62
+ })]
63
+ })]
64
+ });
65
+ }
66
+ function getInitialMode() {
67
+ if (typeof window === "undefined") return "auto";
68
+ const stored = window.localStorage.getItem("theme");
69
+ if (stored === "light" || stored === "dark" || stored === "auto") return stored;
70
+ return "auto";
71
+ }
72
+ function applyThemeMode(mode) {
73
+ const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
74
+ const resolved = mode === "auto" ? prefersDark ? "dark" : "light" : mode;
75
+ document.documentElement.classList.remove("light", "dark");
76
+ document.documentElement.classList.add(resolved);
77
+ if (mode === "auto") document.documentElement.removeAttribute("data-theme");
78
+ else document.documentElement.setAttribute("data-theme", mode);
79
+ document.documentElement.style.colorScheme = resolved;
80
+ }
81
+ function ThemeToggle() {
82
+ const [mode, setMode] = (0, import_react.useState)("auto");
83
+ (0, import_react.useEffect)(() => {
84
+ const initialMode = getInitialMode();
85
+ setMode(initialMode);
86
+ applyThemeMode(initialMode);
87
+ }, []);
88
+ (0, import_react.useEffect)(() => {
89
+ if (mode !== "auto") return;
90
+ const media = window.matchMedia("(prefers-color-scheme: dark)");
91
+ const onChange = () => applyThemeMode("auto");
92
+ media.addEventListener("change", onChange);
93
+ return () => {
94
+ media.removeEventListener("change", onChange);
95
+ };
96
+ }, [mode]);
97
+ function toggleMode() {
98
+ const nextMode = mode === "light" ? "dark" : mode === "dark" ? "auto" : "light";
99
+ setMode(nextMode);
100
+ applyThemeMode(nextMode);
101
+ window.localStorage.setItem("theme", nextMode);
102
+ }
103
+ const label = mode === "auto" ? "Theme mode: auto (system). Click to switch to light mode." : `Theme mode: ${mode}. Click to switch mode.`;
104
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
105
+ type: "button",
106
+ onClick: toggleMode,
107
+ "aria-label": label,
108
+ title: label,
109
+ className: "rounded-full border border-[var(--chip-line)] bg-[var(--chip-bg)] px-3 py-1.5 text-sm font-semibold text-[var(--sea-ink)] shadow-[0_8px_22px_rgba(30,90,72,0.08)] transition hover:-translate-y-0.5",
110
+ children: mode === "auto" ? "Auto" : mode === "dark" ? "Dark" : "Light"
111
+ });
112
+ }
113
+ function Header() {
114
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("header", {
115
+ className: "sticky top-0 z-50 border-b border-[var(--line)] bg-[var(--header-bg)] px-4 backdrop-blur-lg",
116
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("nav", {
117
+ className: "page-wrap flex flex-wrap items-center gap-x-3 gap-y-2 py-3 sm:py-4",
118
+ children: [
119
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
120
+ className: "m-0 flex-shrink-0 text-base font-semibold tracking-tight",
121
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Link, {
122
+ to: "/",
123
+ className: "inline-flex items-center gap-2 rounded-full border border-[var(--chip-line)] bg-[var(--chip-bg)] px-3 py-1.5 text-sm text-[var(--sea-ink)] no-underline shadow-[0_8px_24px_rgba(30,90,72,0.08)] sm:px-4 sm:py-2",
124
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "h-2 w-2 rounded-full bg-[linear-gradient(90deg,#56c6be,#7ed3bf)]" }), "TanStack Start"]
125
+ })
126
+ }),
127
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
128
+ className: "order-3 flex w-full flex-wrap items-center gap-x-4 gap-y-1 pb-1 text-sm font-semibold sm:order-none sm:w-auto sm:flex-nowrap sm:pb-0",
129
+ children: [
130
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
131
+ to: "/",
132
+ className: "nav-link",
133
+ activeProps: { className: "nav-link is-active" },
134
+ children: "Home"
135
+ }),
136
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
137
+ to: "/about",
138
+ className: "nav-link",
139
+ activeProps: { className: "nav-link is-active" },
140
+ children: "About"
141
+ }),
142
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
143
+ href: "https://tanstack.com/start/latest/docs/framework/react/overview",
144
+ className: "nav-link",
145
+ target: "_blank",
146
+ rel: "noreferrer",
147
+ children: "Docs"
148
+ })
149
+ ]
150
+ }),
151
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
152
+ className: "ml-auto flex items-center gap-1.5 sm:gap-2",
153
+ children: [
154
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", {
155
+ href: "https://x.com/tan_stack",
156
+ target: "_blank",
157
+ rel: "noreferrer",
158
+ className: "hidden rounded-xl p-2 text-[var(--sea-ink-soft)] transition hover:bg-[var(--link-bg-hover)] hover:text-[var(--sea-ink)] sm:block",
159
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
160
+ className: "sr-only",
161
+ children: "Follow TanStack on X"
162
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
163
+ viewBox: "0 0 16 16",
164
+ "aria-hidden": "true",
165
+ width: "24",
166
+ height: "24",
167
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
168
+ fill: "currentColor",
169
+ d: "M12.6 1h2.2L10 6.48 15.64 15h-4.41L7.78 9.82 3.23 15H1l5.14-5.84L.72 1h4.52l3.12 4.73L12.6 1zm-.77 12.67h1.22L4.57 2.26H3.26l8.57 11.41z"
170
+ })
171
+ })]
172
+ }),
173
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", {
174
+ href: "https://github.com/TanStack",
175
+ target: "_blank",
176
+ rel: "noreferrer",
177
+ className: "hidden rounded-xl p-2 text-[var(--sea-ink-soft)] transition hover:bg-[var(--link-bg-hover)] hover:text-[var(--sea-ink)] sm:block",
178
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
179
+ className: "sr-only",
180
+ children: "Go to TanStack GitHub"
181
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
182
+ viewBox: "0 0 16 16",
183
+ "aria-hidden": "true",
184
+ width: "24",
185
+ height: "24",
186
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
187
+ fill: "currentColor",
188
+ d: "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"
189
+ })
190
+ })]
191
+ }),
192
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemeToggle, {})
193
+ ]
194
+ })
195
+ ]
196
+ })
197
+ });
198
+ }
199
+ var styles_default = "/assets/styles-DqQrEVt_.css";
200
+ var THEME_INIT_SCRIPT = `(function(){try{var stored=window.localStorage.getItem('theme');var mode=(stored==='light'||stored==='dark'||stored==='auto')?stored:'auto';var prefersDark=window.matchMedia('(prefers-color-scheme: dark)').matches;var resolved=mode==='auto'?(prefersDark?'dark':'light'):mode;var root=document.documentElement;root.classList.remove('light','dark');root.classList.add(resolved);if(mode==='auto'){root.removeAttribute('data-theme')}else{root.setAttribute('data-theme',mode)}root.style.colorScheme=resolved;}catch(e){}})();`;
201
+ var Route$2 = createRootRoute({
202
+ head: () => ({
203
+ meta: [
204
+ { charSet: "utf-8" },
205
+ {
206
+ name: "viewport",
207
+ content: "width=device-width, initial-scale=1"
208
+ },
209
+ { title: "TanStack Start Starter" }
210
+ ],
211
+ links: [{
212
+ rel: "stylesheet",
213
+ href: styles_default
214
+ }]
215
+ }),
216
+ shellComponent: RootDocument
217
+ });
218
+ function RootDocument({ children }) {
219
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("html", {
220
+ lang: "en",
221
+ suppressHydrationWarning: true,
222
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("head", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("script", { dangerouslySetInnerHTML: { __html: THEME_INIT_SCRIPT } }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HeadContent, {})] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("body", {
223
+ className: "font-sans antialiased [overflow-wrap:anywhere] selection:bg-[rgba(79,184,178,0.24)]",
224
+ children: [
225
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Header, {}),
226
+ children,
227
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Footer, {}),
228
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Scripts, {})
229
+ ]
230
+ })]
231
+ });
232
+ }
233
+ var $$splitComponentImporter$1 = () => import("./routes-Cutxg__h.mjs");
234
+ var Route$1 = createFileRoute("/")({ component: lazyRouteComponent($$splitComponentImporter$1, "component") });
235
+ var $$splitComponentImporter = () => import("./about-C106R88A.mjs");
236
+ var Route = createFileRoute("/about")({ component: lazyRouteComponent($$splitComponentImporter, "component") });
237
+ var rootRouteChildren = {
238
+ IndexRoute: Route$1.update({
239
+ id: "/",
240
+ path: "/",
241
+ getParentRoute: () => Route$2
242
+ }),
243
+ AboutRoute: Route.update({
244
+ id: "/about",
245
+ path: "/about",
246
+ getParentRoute: () => Route$2
247
+ })
248
+ };
249
+ var routeTree = Route$2._addFileChildren(rootRouteChildren)._addFileTypes();
250
+ function getRouter() {
251
+ return createRouter({
252
+ routeTree,
253
+ scrollRestoration: true,
254
+ defaultPreload: "intent",
255
+ defaultPreloadStaleTime: 0
256
+ });
257
+ }
258
+ export { getRouter, router_B7lhQtFL_exports as t };