@connextar/house 0.4.0 → 0.5.0

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 (34) hide show
  1. package/README.md +109 -3
  2. package/dist/setup-guide/bits.d.ts +89 -0
  3. package/dist/setup-guide/bits.d.ts.map +1 -0
  4. package/dist/setup-guide/bits.js +134 -0
  5. package/dist/setup-guide/bits.js.map +1 -0
  6. package/dist/setup-guide/card.d.ts +33 -0
  7. package/dist/setup-guide/card.d.ts.map +1 -0
  8. package/dist/setup-guide/card.js +56 -0
  9. package/dist/setup-guide/card.js.map +1 -0
  10. package/dist/setup-guide/class-names.d.ts +68 -0
  11. package/dist/setup-guide/class-names.d.ts.map +1 -0
  12. package/dist/setup-guide/class-names.js +63 -0
  13. package/dist/setup-guide/class-names.js.map +1 -0
  14. package/dist/setup-guide/context.d.ts +89 -0
  15. package/dist/setup-guide/context.d.ts.map +1 -0
  16. package/dist/setup-guide/context.js +124 -0
  17. package/dist/setup-guide/context.js.map +1 -0
  18. package/dist/setup-guide/guide.d.ts +159 -0
  19. package/dist/setup-guide/guide.d.ts.map +1 -0
  20. package/dist/setup-guide/guide.js +128 -0
  21. package/dist/setup-guide/guide.js.map +1 -0
  22. package/dist/setup-guide/index.d.ts +27 -0
  23. package/dist/setup-guide/index.d.ts.map +1 -0
  24. package/dist/setup-guide/index.js +27 -0
  25. package/dist/setup-guide/index.js.map +1 -0
  26. package/dist/setup-guide/launcher.d.ts +38 -0
  27. package/dist/setup-guide/launcher.d.ts.map +1 -0
  28. package/dist/setup-guide/launcher.js +60 -0
  29. package/dist/setup-guide/launcher.js.map +1 -0
  30. package/dist/setup-guide/strip.d.ts +21 -0
  31. package/dist/setup-guide/strip.d.ts.map +1 -0
  32. package/dist/setup-guide/strip.js +42 -0
  33. package/dist/setup-guide/strip.js.map +1 -0
  34. package/package.json +5 -1
package/README.md CHANGED
@@ -406,6 +406,91 @@ independent sections are a form with three headings. A flow whose steps are
406
406
  separate saves, each landing before the next opens, is not one form and must not
407
407
  pretend to be: this wizard keeps one register and submits once.
408
408
 
409
+ ### `@connextar/house/setup-guide`
410
+
411
+ The checklist a new account works through, and what finishing a step earns.
412
+
413
+ The checklist is not the hard part. The three things underneath it are, and each
414
+ has one right answer:
415
+
416
+ - **What is done is never stored.** A step is done when the account _holds_ what
417
+ it asks for — a learner, a price, a published course — read fresh every time.
418
+ So a thing made from the grid, from an import, or by an administrator counts
419
+ exactly as much as one made from the guide, and there is no status column to
420
+ drift away from the truth.
421
+ - **A reward is paid once.** That is the only thing written down: one entry per
422
+ step per account, keyed on the step, refused by a unique index the second
423
+ time. Two tabs asking at the same moment pay one reward between them.
424
+ - **It is said while the person is still looking at what earned it.** Most saves
425
+ never refresh a page, so the guide listens for the app's own write event,
426
+ waits for a burst of saves to settle, and asks once.
427
+
428
+ ```tsx
429
+ const ITEMS: SetupItemDef[] = [
430
+ {
431
+ key: "learner",
432
+ title: "Add your first learner",
433
+ description: "Every timetable, task and plan hangs off a learner.",
434
+ href: "/dashboard?add=learner",
435
+ actionLabel: "Add your first learner",
436
+ steps: [
437
+ {
438
+ key: "learner.add", // permanent: the reward is keyed on it
439
+ title: "Add your first learner",
440
+ reward: 5,
441
+ how: { title: "How to add a learner", steps: ["Select **Add learner**.", "Type their _name_."] },
442
+ guide: { href: "/guides/learners#add-a-learner", title: "Learners" },
443
+ },
444
+ ],
445
+ },
446
+ ];
447
+
448
+ <SetupGuideProvider
449
+ initial={guideFromTheServer}
450
+ transport={{ sync, setHidden }} // your API calls; this package makes none
451
+ words={{ one: "AI credit", many: "AI credits" }}
452
+ changeEvent="myapp:data-changed"
453
+ link={NextLink}
454
+ >
455
+ <SetupCard variant="full" title="Let's get you set up" lead="A few things to do." />
456
+ </SetupGuideProvider>;
457
+ ```
458
+
459
+ **Three surfaces.** `SetupCard` leads a home page (`full`) or sits as one band
460
+ above it once there is real work to show (`compact`). `SetupStrip` goes on the
461
+ screen where an item's steps are actually done, with a progress bar, and
462
+ disappears the moment they are all paid — a screen somebody uses every day
463
+ should not keep a checklist on it for ever. `SetupLauncherButton` is the header
464
+ pill. Each step carries an ⓘ with how to do it and a link to its guide.
465
+
466
+ **The panel is yours.** Every app already has a sheet, with its own idea of how
467
+ a thing slides in and what closes it, so this ships what goes _inside_ one:
468
+
469
+ ```tsx
470
+ <SetupLauncherButton />
471
+ <Sheet open={setup.panelOpen} onOpenChange={setup.setPanelOpen}>
472
+ <SheetContent>
473
+ <SetupGuideSummary />
474
+ <SetupGuideList onGo={() => setup.setPanelOpen(false)} />
475
+ </SheetContent>
476
+ </Sheet>
477
+ ```
478
+
479
+ **What the host supplies** is everything genuinely its own: the step
480
+ definitions, how each is read from its records, where the reward is written, and
481
+ what a reward is even called. `rewardsOwed(items, done, earned)` is the pure
482
+ half of paying — the host loops over it and writes one row each, letting its own
483
+ unique index refuse the second. `doneSteps(facts, earned)` is the other rule
484
+ worth not rewriting: a reward, once earned, is not taken back, so a step whose
485
+ thing has since been deleted stays ticked rather than reopening and asking to be
486
+ paid again.
487
+
488
+ An app that gives nothing at all leaves `reward` off every step and gets a
489
+ checklist that still works. `src/setup-guide/entry-points.test.ts` holds the
490
+ module to React and its icons — no router, no toast library, no design system —
491
+ because the moment it reaches for one of those, the claim that six apps can host
492
+ it stops being true.
493
+
409
494
  ### Styles — `@connextar/house/house.css`
410
495
 
411
496
  What the components need that utility classes cannot say: rich text, the editor's
@@ -436,9 +521,19 @@ added.
436
521
 
437
522
  (The `@source` path is relative to the stylesheet.)
438
523
 
439
- **Tailwind v3** — add `"./node_modules/@connextar/house/dist/**/*.js"` to
440
- `content` in `tailwind.config`, and import `@connextar/house/house.css` at the top
441
- of the global stylesheet, before the `@tailwind` directives.
524
+ **Tailwind v3** — three pieces, and two of them were only found by adopting it:
525
+
526
+ 1. Add `"./node_modules/@connextar/house/dist/**/*.js"` to `content` in
527
+ `tailwind.config`.
528
+ 2. Import the file by its real path, `@connextar/house/dist/house.css`, at the top
529
+ of the global stylesheet, before the `@tailwind` directives. **Not** the
530
+ `@connextar/house/house.css` export the v4 setup uses: `postcss-import`
531
+ resolves a bare specifier with the classic `node_modules` algorithm, which
532
+ predates `exports` maps, so the export name fails the build outright.
533
+ 3. Run `postcss-import` ahead of Tailwind in `postcss.config`, so the import is
534
+ inlined into the app's own stylesheet. Left to the bundler, `house.css`
535
+ arrives as its own PostCSS entry, where its `@layer components` block has no
536
+ matching `@tailwind components` directive and the build fails.
442
537
 
443
538
  `house.css` reads the app's theme tokens (`--foreground`, `--muted-foreground`,
444
539
  `--primary`, `--muted`, `--border`, `--card`, `--accent`) through a `--house-*`
@@ -542,6 +637,17 @@ mounted`. Inline the package so vite transforms it:
542
637
  of `next/navigation` does not cover the package. Register both, with the factory
543
638
  written out twice: `vi.mock` is hoisted above every `const`, so a shared factory
544
639
  variable throws `Cannot access ... before initialization`.
640
+ - **Both factories must hand back the same spies.** The two specifiers resolve to
641
+ one module, so the second registration wins. A fresh `vi.fn()` in the second
642
+ factory silently replaces the first, and an assertion on `router.refresh` then
643
+ watches a spy nothing ever called — a test that passes while proving nothing.
644
+ Build the spies once at module scope and return those from both factories.
645
+ - **A locale-aware app inlines its i18n package too.** `next-intl`'s
646
+ `createNavigation` also imports `next/navigation` extensionlessly, so with only
647
+ the package inlined the whole suite fails to load: `inline: [/@connextar\/house/, /next-intl/]`.
648
+ For the same reason an app whose router is locale-aware keeps its own
649
+ `useAppRouter` over `next-intl`'s router — swapping in the package's would drop
650
+ the locale prefix from every push, silently.
545
651
 
546
652
  **A note on local development.** Installing this with `npm install ../path` makes
547
653
  a symlink, and Next's Turbopack will not resolve a package whose real path is
@@ -0,0 +1,89 @@
1
+ import * as React from "react";
2
+ import { type SetupGuideClassNames } from "./class-names.js";
3
+ import { type RewardWords, type SetupLinkComponent } from "./context.js";
4
+ import type { GuideItem, SetupGuideLink, SetupHowTo, StepState } from "./guide.js";
5
+ /** The small parts every drawing of the guide shares. */
6
+ export type ClassNameOverrides = Partial<SetupGuideClassNames>;
7
+ export declare function useClassNames(overrides?: ClassNameOverrides): SetupGuideClassNames;
8
+ /** The words and the link component, with sane answers outside a provider so a part can be rendered alone. */
9
+ export declare function useGuideChrome(): {
10
+ words: RewardWords;
11
+ Link: SetupLinkComponent;
12
+ };
13
+ export type RewardState = "todo" | "earned" | "on-complete";
14
+ /** What a step pays. */
15
+ export declare function RewardChip({ reward, state, tone, words, className, classNames, }: {
16
+ reward: number;
17
+ state?: RewardState;
18
+ tone?: "light" | "dark";
19
+ words?: RewardWords;
20
+ className?: string;
21
+ classNames?: ClassNameOverrides;
22
+ }): React.JSX.Element;
23
+ export declare function StepCircle({ state, n, size, className, classNames, }: {
24
+ state: StepState;
25
+ n?: number;
26
+ size?: "sm" | "md";
27
+ className?: string;
28
+ classNames?: ClassNameOverrides;
29
+ }): React.JSX.Element;
30
+ /** The share earned, as a ring with the number inside. */
31
+ export declare function RewardRing({ earned, total, size, tone, words, }: {
32
+ earned: number;
33
+ total: number;
34
+ size?: number;
35
+ tone?: "dark" | "light";
36
+ words?: RewardWords;
37
+ }): React.JSX.Element;
38
+ /** A small progress ring, for a header. */
39
+ export declare function ProgressRing({ value, size }: {
40
+ value: number;
41
+ size?: number;
42
+ }): React.JSX.Element;
43
+ /** One bar per item, lit when it is done. */
44
+ export declare function Segments({ done, total, tone, classNames, }: {
45
+ done: number;
46
+ total: number;
47
+ tone?: "dark" | "light";
48
+ classNames?: ClassNameOverrides;
49
+ }): React.JSX.Element;
50
+ export declare function MiniProgress({ done, total, className }: {
51
+ done: number;
52
+ total: number;
53
+ className?: string;
54
+ }): React.JSX.Element;
55
+ /** `**label**` in bold and `_example_` in italics — the only markup the instructions use. */
56
+ export declare function HowText({ text }: {
57
+ text: string;
58
+ }): React.JSX.Element;
59
+ /**
60
+ * The ⓘ: how to do this step, beside the step itself.
61
+ *
62
+ * Built here rather than on a popover library, because this package cannot pick
63
+ * one for six apps. It is a disclosure, not a dialog: Escape closes it, a click
64
+ * outside closes it, and focus is left where the person put it — nothing here
65
+ * is worth trapping focus for.
66
+ */
67
+ export declare function HowToButton({ how, guide, footer, className, classNames, }: {
68
+ how: SetupHowTo;
69
+ guide?: SetupGuideLink;
70
+ footer?: React.ReactNode;
71
+ className?: string;
72
+ classNames?: ClassNameOverrides;
73
+ }): React.JSX.Element;
74
+ /** The book: the guide for the feature, in a new tab. */
75
+ export declare function GuideIconLink({ guide, className, classNames, }: {
76
+ guide?: SetupGuideLink;
77
+ className?: string;
78
+ classNames?: ClassNameOverrides;
79
+ }): React.JSX.Element | null;
80
+ /**
81
+ * Both icons for one step — or, for an item with several, its steps listed in
82
+ * the ⓘ and the first step's guide on the book.
83
+ */
84
+ export declare function ItemHelp({ item, className, classNames, }: {
85
+ item: GuideItem;
86
+ className?: string;
87
+ classNames?: ClassNameOverrides;
88
+ }): React.JSX.Element | null;
89
+ //# sourceMappingURL=bits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bits.d.ts","sourceRoot":"","sources":["../../src/setup-guide/bits.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAA2B,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAA6B,KAAK,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACpG,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEnF,yDAAyD;AAEzD,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAE/D,wBAAgB,aAAa,CAAC,SAAS,CAAC,EAAE,kBAAkB,GAAG,oBAAoB,CAElF;AAED,8GAA8G;AAC9G,wBAAgB,cAAc,IAAI;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,kBAAkB,CAAA;CAAE,CAIjF;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,QA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, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { BookOpen, Check, Info, Sparkles } from "lucide-react";
4
+ import * as React from "react";
5
+ import { cx } from "../internal/cx.js";
6
+ import { SETUP_GUIDE_CLASS_NAMES } from "./class-names.js";
7
+ import { rewardWord, useSetupGuide } from "./context.js";
8
+ export function useClassNames(overrides) {
9
+ return React.useMemo(() => ({ ...SETUP_GUIDE_CLASS_NAMES, ...overrides }), [overrides]);
10
+ }
11
+ /** The words and the link component, with sane answers outside a provider so a part can be rendered alone. */
12
+ export function useGuideChrome() {
13
+ const setup = useSetupGuide();
14
+ const fallback = React.useCallback(({ children, ...rest }) => _jsx("a", { ...rest, children: children }), []);
15
+ return { words: setup?.words ?? { one: "credit", many: "credits" }, Link: setup?.Link ?? fallback };
16
+ }
17
+ /** What a step pays. */
18
+ export function RewardChip({ reward, state = "todo", tone = "light", words, className, classNames, }) {
19
+ const c = useClassNames(classNames);
20
+ const chrome = useGuideChrome();
21
+ const said = words ?? chrome.words;
22
+ const unit = rewardWord(reward, said);
23
+ if (state === "earned") {
24
+ return (_jsxs("span", { className: cx(c.chipEarned, tone === "dark" && "text-white", className), children: [_jsx(Check, { className: "size-3.5", "aria-hidden": true }), reward, " earned", _jsxs("span", { className: c.srOnly, children: [" ", unit] })] }));
25
+ }
26
+ return (_jsxs("span", { className: cx(c.chip, tone === "dark" && c.chipDark, state === "on-complete" && tone !== "dark" && c.chipOnComplete, className), children: [_jsx(Sparkles, { className: "size-3", "aria-hidden": true }), "+", reward, state === "on-complete" ? " on build" : null, _jsxs("span", { className: c.srOnly, children: [" ", unit] })] }));
27
+ }
28
+ export function StepCircle({ state, n, size = "md", className, classNames, }) {
29
+ const c = useClassNames(classNames);
30
+ return (_jsx("span", { "aria-hidden": true, className: cx(c.circle, size === "sm" ? "size-6" : "size-7", state === "done" && c.circleDone, state === "next" && c.circleNext, state === "ready" && c.circleReady, state === "todo" && c.circleTodo, className), children: state === "done" || state === "ready" ? _jsx(Check, { className: size === "sm" ? "size-3.5" : "size-4" }) : n }));
31
+ }
32
+ /** The share earned, as a ring with the number inside. */
33
+ export function RewardRing({ earned, total, size = 84, tone = "dark", words, }) {
34
+ const chrome = useGuideChrome();
35
+ const said = words ?? chrome.words;
36
+ const share = total === 0 ? 0 : Math.round((earned / total) * 100);
37
+ return (_jsx("span", { role: "img", "aria-label": `${earned} of ${total} ${rewardWord(total, said)} earned`, className: "flex shrink-0 items-center justify-center rounded-full", style: {
38
+ width: size,
39
+ height: size,
40
+ background: tone === "dark"
41
+ ? `conic-gradient(#ffffff 0 ${share}%, rgb(255 255 255 / 0.12) 0)`
42
+ : `conic-gradient(var(--primary) 0 ${share}%, color-mix(in oklab, var(--primary) 14%, transparent) 0)`,
43
+ }, children: _jsxs("span", { className: cx("flex flex-col items-center justify-center rounded-full leading-none", tone === "dark" ? "bg-[#0e2f27] text-white" : "bg-card text-foreground"), style: { width: size - 14, height: size - 14 }, children: [_jsx("span", { className: "font-bold", style: { fontSize: Math.round(size * 0.34) }, children: earned }), _jsxs("span", { className: cx("mt-1 text-[11px]", tone === "dark" ? "text-slate-400" : "text-muted-foreground"), children: ["of ", total] })] }) }));
44
+ }
45
+ /** A small progress ring, for a header. */
46
+ export function ProgressRing({ value, size = 24 }) {
47
+ return (_jsx("span", { "aria-hidden": true, className: "flex shrink-0 items-center justify-center rounded-full", style: {
48
+ width: size,
49
+ height: size,
50
+ background: `conic-gradient(var(--primary) 0 ${value}%, var(--secondary) 0)`,
51
+ }, children: _jsx("span", { className: "block rounded-full bg-background", style: { width: size - 8, height: size - 8 } }) }));
52
+ }
53
+ /** One bar per item, lit when it is done. */
54
+ export function Segments({ done, total, tone = "dark", classNames, }) {
55
+ const c = useClassNames(classNames);
56
+ return (_jsx("div", { className: "flex gap-1.5", "aria-hidden": true, children: Array.from({ length: total }, (_, index) => (_jsx("span", { className: cx(c.segment, index < done
57
+ ? tone === "dark"
58
+ ? c.segmentDoneDark
59
+ : c.segmentDone
60
+ : tone === "dark"
61
+ ? c.segmentTodoDark
62
+ : c.segmentTodo) }, index))) }));
63
+ }
64
+ export function MiniProgress({ done, total, className }) {
65
+ return (_jsxs("span", { className: cx("inline-flex items-center gap-2", className), children: [_jsx("span", { className: "h-1.5 w-20 overflow-hidden rounded-full bg-secondary", "aria-hidden": true, children: _jsx("span", { className: "block h-full rounded-full bg-primary", style: { width: `${total === 0 ? 0 : Math.round((done / total) * 100)}%` } }) }), _jsxs("span", { className: "text-xs text-muted-foreground tabular-nums", children: [done, " of ", total, " done"] })] }));
66
+ }
67
+ /** `**label**` in bold and `_example_` in italics — the only markup the instructions use. */
68
+ export function HowText({ text }) {
69
+ const parts = text.split(/(\*\*[^*]+\*\*|_[^_]+_)/g).filter(Boolean);
70
+ return (_jsx(_Fragment, { children: parts.map((part, index) => part.startsWith("**") && part.endsWith("**") && part.length > 4 ? (_jsx("strong", { className: "font-semibold", children: part.slice(2, -2) }, index)) : part.startsWith("_") && part.endsWith("_") && part.length > 2 ? (_jsx("em", { children: part.slice(1, -1) }, index)) : (_jsx("span", { children: part }, index))) }));
71
+ }
72
+ /**
73
+ * The ⓘ: how to do this step, beside the step itself.
74
+ *
75
+ * Built here rather than on a popover library, because this package cannot pick
76
+ * one for six apps. It is a disclosure, not a dialog: Escape closes it, a click
77
+ * outside closes it, and focus is left where the person put it — nothing here
78
+ * is worth trapping focus for.
79
+ */
80
+ export function HowToButton({ how, guide, footer, className, classNames, }) {
81
+ const c = useClassNames(classNames);
82
+ const { Link } = useGuideChrome();
83
+ const [open, setOpen] = React.useState(false);
84
+ const wrapper = React.useRef(null);
85
+ const panelId = React.useId();
86
+ React.useEffect(() => {
87
+ if (!open)
88
+ return;
89
+ const onKeyDown = (event) => {
90
+ if (event.key === "Escape")
91
+ setOpen(false);
92
+ };
93
+ const onPointerDown = (event) => {
94
+ const node = event.target;
95
+ if (node instanceof Node && wrapper.current?.contains(node))
96
+ return;
97
+ setOpen(false);
98
+ };
99
+ document.addEventListener("keydown", onKeyDown);
100
+ document.addEventListener("mousedown", onPointerDown);
101
+ return () => {
102
+ document.removeEventListener("keydown", onKeyDown);
103
+ document.removeEventListener("mousedown", onPointerDown);
104
+ };
105
+ }, [open]);
106
+ return (_jsxs("span", { ref: wrapper, className: "relative inline-flex", children: [_jsx("button", { type: "button", onClick: () => setOpen((current) => !current), "aria-expanded": open, "aria-controls": open ? panelId : undefined, "aria-label": how.title, title: how.title, className: cx(c.iconButton, className), children: _jsx(Info, { className: "size-4", "aria-hidden": true }) }), open ? (_jsxs("span", { id: panelId, role: "group", "aria-label": how.title, className: c.popover, children: [_jsx("span", { className: cx(c.popoverTitle, "block"), children: how.title }), _jsx("ol", { className: "mt-3 flex flex-col gap-2", children: how.steps.map((step, index) => (_jsxs("li", { className: c.popoverStep, children: [_jsx("span", { "aria-hidden": true, className: c.popoverNumber, children: index + 1 }), _jsx("span", { children: _jsx(HowText, { text: step }) })] }, index))) }), footer, guide ? (_jsxs("span", { className: cx(c.popoverFooter, "flex"), children: [_jsxs(Link, { href: guide.href, target: "_blank", rel: "noopener", className: "inline-flex items-center gap-1.5 text-[13px] font-medium text-primary underline-offset-4 hover:underline", children: [_jsx(BookOpen, { className: "size-3.5", "aria-hidden": true }), guide.title, " guide"] }), _jsx("span", { className: "text-xs text-muted-foreground", children: "Opens in a new tab" })] })) : null] })) : null] }));
107
+ }
108
+ /** The book: the guide for the feature, in a new tab. */
109
+ export function GuideIconLink({ guide, className, classNames, }) {
110
+ const c = useClassNames(classNames);
111
+ const { Link } = useGuideChrome();
112
+ if (!guide)
113
+ return null;
114
+ const label = `Guide: ${guide.title}`;
115
+ return (_jsx(Link, { href: guide.href, target: "_blank", rel: "noopener", "aria-label": label, title: label, className: cx(c.iconButton, className), children: _jsx(BookOpen, { className: "size-4", "aria-hidden": true }) }));
116
+ }
117
+ /**
118
+ * Both icons for one step — or, for an item with several, its steps listed in
119
+ * the ⓘ and the first step's guide on the book.
120
+ */
121
+ export function ItemHelp({ item, className, classNames, }) {
122
+ const { words } = useGuideChrome();
123
+ const [first] = item.steps;
124
+ if (!first)
125
+ return null;
126
+ if (item.steps.length === 1) {
127
+ return (_jsxs("span", { className: cx("inline-flex items-center", className), children: [first.how ? _jsx(HowToButton, { how: first.how, guide: first.guide, classNames: classNames }) : null, _jsx(GuideIconLink, { guide: first.guide, classNames: classNames })] }));
128
+ }
129
+ return (_jsxs("span", { className: cx("inline-flex items-center", className), children: [_jsx(HowToButton, { classNames: classNames, how: {
130
+ title: `What “${item.title}” asks for`,
131
+ steps: item.steps.map((step) => `${step.done ? "Done — " : ""}**${step.title}**${step.reward > 0 ? ` · ${step.reward} ${rewardWord(step.reward, words)}` : ""}`),
132
+ }, guide: first.guide, footer: _jsxs("p", { className: "mt-3 text-xs text-muted-foreground", children: ["Each step, with how to do it, is on the screen it's done on.", item.paysOnComplete ? " Its rewards land once the whole thing is built." : ""] }) }), _jsx(GuideIconLink, { guide: first.guide, classNames: classNames })] }));
133
+ }
134
+ //# sourceMappingURL=bits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bits.js","sourceRoot":"","sources":["../../src/setup-guide/bits.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,uBAAuB,EAA6B,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,aAAa,EAA6C,MAAM,cAAc,CAAC;AAOpG,MAAM,UAAU,aAAa,CAAC,SAA8B;IAC1D,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,uBAAuB,EAAE,GAAG,SAAS,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;AAC1F,CAAC;AAED,8GAA8G;A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C/F,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,GAAI,IACxD,CACR,CAAC;IACJ,CAAC;IAED,OAAO,CACL,gBAAM,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,aACxD,KAAC,WAAW,IACV,UAAU,EAAE,UAAU,EACtB,GAAG,EAAE;oBACH,KAAK,EAAE,SAAS,IAAI,CAAC,KAAK,YAAY;oBACtC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CACnB,CAAC,IAAI,EAAE,EAAE,CACP,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAClI;iBACF,EACD,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,MAAM,EACJ,aAAG,SAAS,EAAC,oCAAoC,6EAE9C,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,kDAAkD,CAAC,CAAC,CAAC,EAAE,IAC5E,GAEN,EACF,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,GAAI,IACxD,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,33 @@
1
+ import * as React from "react";
2
+ import { type ClassNameOverrides } from "./bits.js";
3
+ /** Replaces an item's — or one step's — default action, by its key. */
4
+ export type SetupActions = Partial<Record<string, React.ReactNode>>;
5
+ export interface SetupCardProps {
6
+ /**
7
+ * `full` leads a page that has little else on it: the band with what has been
8
+ * earned, and every item as a row. `compact` is one band above the day's work
9
+ * once the account has some, showing progress and what is next.
10
+ */
11
+ variant: "full" | "compact";
12
+ title: string;
13
+ lead: string;
14
+ /** Extra words under the progress in the band. */
15
+ aside?: React.ReactNode;
16
+ actions?: SetupActions;
17
+ /** An item whose steps are done on this very page, listed inside its row. */
18
+ inlineItemKey?: string;
19
+ /** What to show when there is no guide to draw — hidden, or an account without one. */
20
+ fallback?: React.ReactNode;
21
+ /** Shown when every step is done and paid, e.g. a link to what was earned. */
22
+ completeAction?: React.ReactNode;
23
+ /** How long the whole thing takes, if the app wants to promise. */
24
+ timeNote?: string;
25
+ /** A line about what the reward is for, under the ring. */
26
+ rewardNote?: string;
27
+ /** Replaces the band's background outright. `{}` falls back to the card's own. */
28
+ bandStyle?: React.CSSProperties;
29
+ className?: string;
30
+ classNames?: ClassNameOverrides;
31
+ }
32
+ export declare function SetupCard({ variant, title, lead, aside, actions, inlineItemKey, fallback, completeAction, timeNote, rewardNote, bandStyle, className, classNames, }: SetupCardProps): React.JSX.Element;
33
+ //# sourceMappingURL=card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/setup-guide/card.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAUL,KAAK,kBAAkB,EACxB,MAAM,WAAW,CAAC;AAKnB,uEAAuE;AACvE,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;AAEpE,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,6EAA6E;IAC7E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uFAAuF;IACvF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,8EAA8E;IAC9E,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kFAAkF;IAClF,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,kBAAkB,CAAC;CACjC;AAED,wBAAgB,SAAS,CAAC,EACxB,OAAO,EACP,KAAK,EACL,IAAI,EACJ,KAAK,EACL,OAAY,EACZ,aAAa,EACb,QAAe,EACf,cAAc,EACd,QAAQ,EACR,UAAU,EACV,SAA4B,EAC5B,SAAS,EACT,UAAU,GACX,EAAE,cAAc,qBAiJhB"}
@@ -0,0 +1,56 @@
1
+ "use client";
2
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { ArrowRight, Sparkles, Trophy } from "lucide-react";
4
+ import * as React from "react";
5
+ import { cx } from "../internal/cx.js";
6
+ import { GuideIconLink, HowToButton, ItemHelp, MiniProgress, RewardChip, RewardRing, Segments, StepCircle, useClassNames, } from "./bits.js";
7
+ import { SETUP_BAND_STYLE } from "./class-names.js";
8
+ import { rewardWord, useSetupGuide } from "./context.js";
9
+ export function SetupCard({ variant, title, lead, aside, actions = {}, inlineItemKey, fallback = null, completeAction, timeNote, rewardNote, bandStyle = SETUP_BAND_STYLE, className, classNames, }) {
10
+ const setup = useSetupGuide();
11
+ const c = useClassNames(classNames);
12
+ const guide = setup?.guide;
13
+ if (!setup || !guide || guide.hidden)
14
+ return _jsx(_Fragment, { children: fallback });
15
+ const words = setup.words;
16
+ if (guide.complete) {
17
+ return (_jsxs("section", { className: cx("flex flex-col items-start gap-4 rounded-2xl p-5 text-white sm:flex-row sm:items-center sm:p-6", className), style: bandStyle, children: [_jsx("span", { className: "flex size-12 shrink-0 items-center justify-center rounded-2xl bg-white/10 text-emerald-300", children: _jsx(Trophy, { className: "size-6", "aria-hidden": true }) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("p", { className: "text-lg font-bold tracking-tight", children: "You're all set up" }), _jsxs("p", { className: "mt-1 text-sm text-slate-300", children: ["All ", guide.totalReward, " ", rewardWord(guide.totalReward, words), " are in your account."] })] }), _jsxs("div", { className: "flex items-center gap-2", children: [completeAction, _jsx(HideButton, { setup: setup, className: c.bandQuietButton, label: "Hide this" })] })] }));
18
+ }
19
+ const left = guide.totalReward - guide.earnedReward;
20
+ const next = guide.items.find((item) => item.key === guide.nextKey) ?? null;
21
+ if (variant === "compact") {
22
+ return (_jsx("section", { "aria-label": "Get started", className: cx("@container rounded-2xl p-4 text-white sm:p-5", className), style: bandStyle, children: _jsxs("div", { className: "flex flex-col gap-4 @4xl:flex-row @4xl:items-center @4xl:gap-5", children: [_jsxs("div", { className: "flex items-center gap-4 @4xl:contents", children: [_jsx(RewardRing, { earned: guide.earnedReward, total: guide.totalReward, size: 64, words: words }), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5 @4xl:w-60 @4xl:flex-none", children: [_jsxs("p", { className: "text-[15px] font-semibold", children: ["Get started \u00B7 ", guide.doneItems, " of ", guide.items.length, " steps done"] }), _jsxs("p", { className: "text-[13px] text-slate-300", children: [left, " more ", rewardWord(left, words), " to earn"] }), _jsx(Segments, { done: guide.doneItems, total: guide.items.length, classNames: classNames })] })] }), _jsx("span", { className: "hidden w-px self-stretch bg-white/10 @4xl:block", "aria-hidden": true }), next ? (_jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [_jsx("p", { className: "text-[11px] font-bold tracking-[0.14em] text-slate-400 uppercase", children: "Next up" }), _jsxs("p", { className: "flex flex-wrap items-center gap-2.5 text-[15px] font-semibold", children: [next.title, _jsx(RewardChip, { reward: next.reward - next.earnedReward, tone: "dark", words: words, classNames: classNames })] }), _jsxs("p", { className: "text-[13px] text-slate-300", children: [next.steps.length > 1 ? `${next.doneCount} of ${next.steps.length} done. ` : "", next.description] })] })) : (_jsx("p", { className: "flex-1 text-sm text-slate-300", children: "Every step you can do now is done \u2014 the rest follow on." })), _jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [next ? (actions[next.key] ?? _jsx(ItemLink, { item: next, variant: "primary", classNames: classNames })) : null, _jsx("button", { type: "button", onClick: () => setup.setPanelOpen(true), className: cx(c.button, c.bandQuietButton), children: "All steps" })] })] }) }));
23
+ }
24
+ return (_jsx("section", { "aria-label": "Get started", className: cx(c.card, "@container", className), children: _jsxs("div", { className: "flex flex-col @3xl:flex-row", children: [_jsxs("div", { className: cx(c.band, "@3xl:w-[340px] @3xl:shrink-0 @5xl:w-[380px]"), style: bandStyle, children: [_jsx("p", { className: c.bandEyebrow, children: "Get started" }), _jsx("h2", { className: c.bandTitle, children: title }), _jsx("p", { className: c.bandLead, children: lead }), _jsxs("div", { className: "mt-7 flex items-center gap-4", children: [_jsx(RewardRing, { earned: guide.earnedReward, total: guide.totalReward, words: words }), _jsxs("div", { className: "min-w-0", children: [_jsxs("p", { className: "flex items-center gap-1.5 text-sm font-semibold", children: [_jsx(Sparkles, { className: "size-4", "aria-hidden": true }), rewardWord(2, words), " earned"] }), rewardNote ? _jsx("p", { className: cx("mt-1 text-[12.5px] leading-normal", c.bandMuted), children: rewardNote }) : null] })] }), _jsxs("div", { className: "mt-6 flex flex-col gap-2", children: [_jsxs("div", { className: "flex justify-between gap-2 text-xs text-slate-300", children: [_jsxs("span", { children: [guide.doneItems, " of ", guide.items.length, " steps done"] }), timeNote ? _jsx("span", { className: c.bandMuted, children: timeNote }) : null] }), _jsx(Segments, { done: guide.doneItems, total: guide.items.length, classNames: classNames })] }), aside, _jsx("div", { className: "mt-auto flex flex-wrap items-center gap-x-5 gap-y-2 pt-7 text-sm", children: _jsx(HideButton, { setup: setup, className: c.bandQuietButton, label: "Hide for now" }) })] }), _jsxs("div", { className: cx(c.panel, "@container/steps"), children: [_jsxs("div", { className: "flex items-baseline justify-between gap-2 px-3 pb-2 sm:px-4", children: [_jsx("h3", { className: c.panelHeading, children: "Your setup steps" }), _jsxs("p", { className: c.panelNote, children: [left, " ", rewardWord(left, words), " to earn"] })] }), _jsx("ol", { children: guide.items.map((item, index) => (_jsx(ItemRow, { item: item, index: index, isNext: item.key === guide.nextKey, action: actions[item.key], inline: item.key === inlineItemKey, actions: actions, classNames: classNames }, item.key))) })] })] }) }));
25
+ }
26
+ function HideButton({ setup, className, label }) {
27
+ if (setup.readOnly)
28
+ return null;
29
+ return (_jsx("button", { type: "button", onClick: () => void setup.setHidden(true), className: className, children: label }));
30
+ }
31
+ function ItemLink({ item, variant, classNames, }) {
32
+ const c = useClassNames(classNames);
33
+ const setup = useSetupGuide();
34
+ const Link = setup?.Link ?? (({ children, ...rest }) => _jsx("a", { ...rest, children: children }));
35
+ return (_jsxs(Link, { href: item.href, className: cx(c.button, variant === "primary" ? c.buttonPrimary : c.buttonOutline), children: [item.actionLabel, variant === "primary" ? _jsx(ArrowRight, { className: "size-4", "aria-hidden": true }) : null] }));
36
+ }
37
+ function ItemRow({ item, index, isNext, action, inline, actions, classNames, }) {
38
+ const c = useClassNames(classNames);
39
+ const setup = useSetupGuide();
40
+ const words = setup?.words ?? { one: "credit", many: "credits" };
41
+ const state = item.done ? "done" : isNext ? "next" : "todo";
42
+ const paid = item.steps.length > 0 && item.steps.every((step) => step.earned);
43
+ const button = item.done ? null : item.blocked ? (_jsx("span", { className: c.blocked, children: item.blocked })) : isNext ? ((action ?? _jsx(ItemLink, { item: item, variant: "primary", classNames: classNames }))) : inline ? null : ((action ?? _jsx(ItemLink, { item: item, variant: "outline", classNames: classNames })));
44
+ return (_jsxs("li", { className: cx(c.row, isNext && c.rowNext, "@xl/steps:grid-cols-[auto_minmax(0,1fr)_auto]"), children: [_jsx(StepCircle, { state: state, n: index + 1, className: "mt-0.5 @xl/steps:row-span-2", classNames: classNames }), _jsxs("div", { className: "min-w-0", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-x-2.5 gap-y-1", children: [_jsxs("p", { className: cx(c.rowTitle, item.done && c.rowTitleDone), children: [item.title, _jsx("span", { className: c.srOnly, children: item.done ? " (done)" : " (to do)" })] }), item.steps.length > 1 ? _jsx(MiniProgress, { done: item.doneCount, total: item.steps.length }) : null] }), item.description ? _jsx("p", { className: c.rowDescription, children: item.description }) : null, inline && item.steps.length > 1 ? (_jsx("ul", { className: "mt-2", children: item.steps.map((step) => (_jsx(SubStepRow, { step: step, action: actions[step.key] ?? _jsx(StepLink, { step: step, href: item.href, classNames: classNames }), classNames: classNames }, step.key))) })) : null, isNext && button ? _jsx("div", { className: "mt-3 flex flex-wrap items-center gap-3", children: button }) : null] }), _jsxs("div", { className: "col-start-2 flex flex-wrap items-center gap-1 @xl/steps:col-start-3 @xl/steps:row-start-1 @xl/steps:justify-end", children: [item.reward > 0 ? (_jsx(RewardChip, { reward: item.reward, state: paid ? "earned" : "todo", words: words, classNames: classNames })) : null, item.done ? null : _jsx(ItemHelp, { item: item, classNames: classNames }), !isNext && button ? _jsx("span", { className: "ml-2 flex", children: button }) : null] })] }));
45
+ }
46
+ function StepLink({ step, href, classNames }) {
47
+ const c = useClassNames(classNames);
48
+ const setup = useSetupGuide();
49
+ const Link = setup?.Link ?? (({ children, ...rest }) => _jsx("a", { ...rest, children: children }));
50
+ return (_jsx(Link, { href: href, className: cx(c.button, step.done ? c.buttonQuiet : c.buttonOutline), children: step.done ? "Edit" : "Add" }));
51
+ }
52
+ function SubStepRow({ step, action, classNames, }) {
53
+ const c = useClassNames(classNames);
54
+ return (_jsxs("li", { className: c.subRow, children: [_jsx(StepCircle, { state: step.done ? "done" : "todo", size: "sm", classNames: classNames }), _jsxs("p", { className: cx("min-w-0 flex-1 text-sm font-medium", step.done && c.rowTitleDone), children: [step.title, _jsx("span", { className: c.srOnly, children: step.done ? " (done)" : " (to do)" })] }), step.reward > 0 ? (_jsx(RewardChip, { reward: step.reward, state: step.earned ? "earned" : "todo", classNames: classNames })) : null, step.done ? null : (_jsxs("span", { className: "inline-flex items-center", children: [step.how ? _jsx(HowToButton, { how: step.how, guide: step.guide, classNames: classNames }) : null, _jsx(GuideIconLink, { guide: step.guide, classNames: classNames })] })), _jsx("span", { className: "flex min-w-16 justify-end", children: action })] }));
55
+ }
56
+ //# sourceMappingURL=card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/setup-guide/card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AACvC,OAAO,EACL,aAAa,EACb,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,UAAU,EACV,QAAQ,EACR,UAAU,EACV,aAAa,GAEd,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAwB,MAAM,cAAc,CAAC;AAkC/E,MAAM,UAAU,SAAS,CAAC,EACxB,OAAO,EACP,KAAK,EACL,IAAI,EACJ,KAAK,EACL,OAAO,GAAG,EAAE,EACZ,aAAa,EACb,QAAQ,GAAG,IAAI,EACf,cAAc,EACd,QAAQ,EACR,UAAU,EACV,SAAS,GAAG,gBAAgB,EAC5B,SAAS,EACT,UAAU,GACK;IACf,MAAM,KAAK,GAAG,aAAa,EAAE,CAAC;IAC9B,MAAM,CAAC,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;IACpC,MAAM,KAAK,GAAG,KAAK,EAAE,KAAK,CAAC;IAC3B,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM;QAAE,OAAO,4BAAG,QAAQ,GAAI,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,IACxD,CACN,CAAC;AACJ,CAAC"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * The house look, on the shared theme tokens. Every part an app might want to
3
+ * say differently is a key here, and `classNames` replaces the ones it names —
4
+ * the same bargain the wizard and the guide renderer offer.
5
+ *
6
+ * The one part that is not a class is the dark band behind the progress: it is
7
+ * a gradient over a token, so it is a style object (`bandStyle`) an app can
8
+ * replace outright. AltEd lights its evergreen ink from two corners; an app
9
+ * with no ink colour can pass `{}` and get the card's own background.
10
+ */
11
+ export interface SetupGuideClassNames {
12
+ card: string;
13
+ band: string;
14
+ bandEyebrow: string;
15
+ bandTitle: string;
16
+ bandLead: string;
17
+ bandMuted: string;
18
+ bandLink: string;
19
+ bandQuietButton: string;
20
+ panel: string;
21
+ panelHeading: string;
22
+ panelNote: string;
23
+ row: string;
24
+ rowNext: string;
25
+ rowTitle: string;
26
+ rowTitleDone: string;
27
+ rowDescription: string;
28
+ subRow: string;
29
+ circle: string;
30
+ circleDone: string;
31
+ circleNext: string;
32
+ circleReady: string;
33
+ circleTodo: string;
34
+ chip: string;
35
+ chipEarned: string;
36
+ chipOnComplete: string;
37
+ chipDark: string;
38
+ bar: string;
39
+ barFill: string;
40
+ segment: string;
41
+ segmentDone: string;
42
+ segmentDoneDark: string;
43
+ segmentTodo: string;
44
+ segmentTodoDark: string;
45
+ button: string;
46
+ buttonPrimary: string;
47
+ buttonOutline: string;
48
+ buttonQuiet: string;
49
+ iconButton: string;
50
+ popover: string;
51
+ popoverTitle: string;
52
+ popoverStep: string;
53
+ popoverNumber: string;
54
+ popoverFooter: string;
55
+ strip: string;
56
+ stripTitle: string;
57
+ stripSummary: string;
58
+ stripTile: string;
59
+ stripTileNext: string;
60
+ launcher: string;
61
+ launcherBadge: string;
62
+ blocked: string;
63
+ srOnly: string;
64
+ }
65
+ export declare const SETUP_GUIDE_CLASS_NAMES: SetupGuideClassNames;
66
+ /** The dark band's background. Replaceable outright; `{}` falls back to the card. */
67
+ export declare const SETUP_BAND_STYLE: Record<string, string>;
68
+ //# sourceMappingURL=class-names.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"class-names.d.ts","sourceRoot":"","sources":["../../src/setup-guide/class-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,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