@hanzo/ui 8.27.46 → 8.27.47

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 (61) hide show
  1. package/dist/gallery.html +105 -5
  2. package/dist/marketing/Cta.cjs +9 -3
  3. package/dist/marketing/Cta.d.ts +7 -5
  4. package/dist/marketing/Cta.d.ts.map +1 -1
  5. package/dist/marketing/Cta.js +10 -4
  6. package/dist/marketing/Cta.js.map +1 -1
  7. package/dist/marketing/controls.cjs +112 -0
  8. package/dist/marketing/controls.d.ts +42 -0
  9. package/dist/marketing/controls.d.ts.map +1 -0
  10. package/dist/marketing/controls.js +108 -0
  11. package/dist/marketing/controls.js.map +1 -0
  12. package/dist/marketing/document.cjs +7 -0
  13. package/dist/marketing/document.d.ts +22 -0
  14. package/dist/marketing/document.d.ts.map +1 -0
  15. package/dist/marketing/document.js +5 -0
  16. package/dist/marketing/document.js.map +1 -0
  17. package/dist/marketing/host.cjs +39 -0
  18. package/dist/marketing/host.d.ts +21 -0
  19. package/dist/marketing/host.d.ts.map +1 -0
  20. package/dist/marketing/host.js +35 -0
  21. package/dist/marketing/host.js.map +1 -0
  22. package/dist/marketing/index.cjs +24 -1
  23. package/dist/marketing/index.d.ts +8 -2
  24. package/dist/marketing/index.d.ts.map +1 -1
  25. package/dist/marketing/index.js +7 -1
  26. package/dist/marketing/index.js.map +1 -1
  27. package/dist/marketing/loose.cjs +2 -0
  28. package/dist/marketing/loose.d.ts +41 -0
  29. package/dist/marketing/loose.d.ts.map +1 -0
  30. package/dist/marketing/loose.js +2 -0
  31. package/dist/marketing/loose.js.map +1 -0
  32. package/dist/marketing/pager.cjs +22 -0
  33. package/dist/marketing/pager.d.ts +22 -0
  34. package/dist/marketing/pager.d.ts.map +1 -0
  35. package/dist/marketing/pager.js +20 -0
  36. package/dist/marketing/pager.js.map +1 -0
  37. package/dist/marketing/pair.cjs +21 -0
  38. package/dist/marketing/pair.d.ts +22 -0
  39. package/dist/marketing/pair.d.ts.map +1 -0
  40. package/dist/marketing/pair.js +19 -0
  41. package/dist/marketing/pair.js.map +1 -0
  42. package/dist/marketing/run.cjs +28 -0
  43. package/dist/marketing/run.d.ts +33 -0
  44. package/dist/marketing/run.d.ts.map +1 -0
  45. package/dist/marketing/run.js +26 -0
  46. package/dist/marketing/run.js.map +1 -0
  47. package/dist/marketing/surface.cjs +76 -0
  48. package/dist/marketing/surface.d.ts +59 -0
  49. package/dist/marketing/surface.d.ts.map +1 -0
  50. package/dist/marketing/surface.js +70 -0
  51. package/dist/marketing/surface.js.map +1 -0
  52. package/dist/marketing/type.cjs +29 -2
  53. package/dist/marketing/type.d.ts +43 -4
  54. package/dist/marketing/type.d.ts.map +1 -1
  55. package/dist/marketing/type.js +24 -1
  56. package/dist/marketing/type.js.map +1 -1
  57. package/dist/styles/document.css +93 -0
  58. package/dist/styles/motion.css +52 -2
  59. package/dist/styles.css +104 -4
  60. package/dist/theme.css +52 -2
  61. package/package.json +3 -2
package/dist/gallery.html CHANGED
@@ -1,4 +1,4 @@
1
- <!doctype html><html lang="en" class="t_dark"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>@hanzo/ui 8.27.46</title><style>/* @hanzo/ui — generated by scripts/gen-css.mjs. Do not edit. */
1
+ <!doctype html><html lang="en" class="t_dark"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>@hanzo/ui 8.27.47</title><style>/* @hanzo/ui — generated by scripts/gen-css.mjs. Do not edit. */
2
2
  :root { --hanzo-ui-styles: 1; }
3
3
  /* Hanzo Design System — the entry point. Import THIS one file.
4
4
  *
@@ -1819,13 +1819,15 @@
1819
1819
  itself. Every animation is off under `prefers-reduced-motion: reduce`.
1820
1820
 
1821
1821
  rise enter: fade up 10px over 400ms FadeIn, Timeline, tooltips
1822
+ `data-beat="n"` staggers it n x 70ms
1822
1823
  fade opacity eases 240ms SlideOver's scrim
1823
1824
  slide transform eases 260ms SlideOver's panel
1824
1825
  drag a row eases into place while one is held Reorder
1825
1826
  pulse opacity dims and returns, 2s Pulse, StatusDot, Skeleton
1826
1827
  blink on/off, 1s Caret
1827
1828
  shimmer a highlight sweeps a placeholder product Skeleton
1828
- unfold a sheet turns open about its hinge unfold() */
1829
+ unfold a sheet turns open about its hinge unfold()
1830
+ run a light sweeps a set, child by child Run */
1829
1831
 
1830
1832
  @keyframes rise {
1831
1833
  from {
@@ -1843,6 +1845,17 @@
1843
1845
  will-change: transform, opacity;
1844
1846
  }
1845
1847
 
1848
+ /* A staged entrance: `data-beat="n"` holds a rise back n beats of 70ms, so a set
1849
+ that arrives together still reads in order. Reduced motion drops the
1850
+ animation and the delay with it, so nothing waits hidden. */
1851
+ [data-motion='rise'][data-beat='1'] { animation-delay: 70ms; }
1852
+ [data-motion='rise'][data-beat='2'] { animation-delay: 140ms; }
1853
+ [data-motion='rise'][data-beat='3'] { animation-delay: 210ms; }
1854
+ [data-motion='rise'][data-beat='4'] { animation-delay: 280ms; }
1855
+ [data-motion='rise'][data-beat='5'] { animation-delay: 350ms; }
1856
+ [data-motion='rise'][data-beat='6'] { animation-delay: 420ms; }
1857
+ [data-motion='rise'][data-beat='7'] { animation-delay: 490ms; }
1858
+
1846
1859
  [data-motion='fade'] {
1847
1860
  transition: opacity 240ms cubic-bezier(0.16, 1, 0.3, 1);
1848
1861
  will-change: opacity;
@@ -1923,8 +1936,45 @@
1923
1936
  --turn: 7deg;
1924
1937
  }
1925
1938
 
1939
+ /* A run: a light crosses a set of things that are all true at once (`<Run>`).
1940
+ Each direct child is lit `data-beat` steps of `--run-step` after the first;
1941
+ the sweep owns `color` and returns it to `--run-rest`. */
1942
+ @keyframes run {
1943
+ 0%,
1944
+ 26%,
1945
+ 100% {
1946
+ color: var(--run-rest, var(--neutral-400));
1947
+ border-color: var(--neutral-800);
1948
+ }
1949
+ 8% {
1950
+ color: var(--foreground);
1951
+ border-color: var(--muted-foreground);
1952
+ }
1953
+ }
1954
+
1955
+ [data-motion='run'] > * {
1956
+ animation: run 5.4s var(--ease-in-out) infinite;
1957
+ }
1958
+
1959
+ [data-motion='run'] > [data-beat='1'] { animation-delay: calc(1 * var(--run-step, 0.22s)); }
1960
+ [data-motion='run'] > [data-beat='2'] { animation-delay: calc(2 * var(--run-step, 0.22s)); }
1961
+ [data-motion='run'] > [data-beat='3'] { animation-delay: calc(3 * var(--run-step, 0.22s)); }
1962
+ [data-motion='run'] > [data-beat='4'] { animation-delay: calc(4 * var(--run-step, 0.22s)); }
1963
+ [data-motion='run'] > [data-beat='5'] { animation-delay: calc(5 * var(--run-step, 0.22s)); }
1964
+ [data-motion='run'] > [data-beat='6'] { animation-delay: calc(6 * var(--run-step, 0.22s)); }
1965
+ [data-motion='run'] > [data-beat='7'] { animation-delay: calc(7 * var(--run-step, 0.22s)); }
1966
+ [data-motion='run'] > [data-beat='8'] { animation-delay: calc(8 * var(--run-step, 0.22s)); }
1967
+ [data-motion='run'] > [data-beat='9'] { animation-delay: calc(9 * var(--run-step, 0.22s)); }
1968
+ [data-motion='run'] > [data-beat='10'] { animation-delay: calc(10 * var(--run-step, 0.22s)); }
1969
+ [data-motion='run'] > [data-beat='11'] { animation-delay: calc(11 * var(--run-step, 0.22s)); }
1970
+ [data-motion='run'] > [data-beat='12'] { animation-delay: calc(12 * var(--run-step, 0.22s)); }
1971
+ [data-motion='run'] > [data-beat='13'] { animation-delay: calc(13 * var(--run-step, 0.22s)); }
1972
+ [data-motion='run'] > [data-beat='14'] { animation-delay: calc(14 * var(--run-step, 0.22s)); }
1973
+ [data-motion='run'] > [data-beat='15'] { animation-delay: calc(15 * var(--run-step, 0.22s)); }
1974
+
1926
1975
  @media (prefers-reduced-motion: reduce) {
1927
- [data-motion] {
1976
+ [data-motion],
1977
+ [data-motion='run'] > * {
1928
1978
  animation: none;
1929
1979
  transition: none;
1930
1980
  }
@@ -2500,13 +2550,15 @@ a svg,
2500
2550
  itself. Every animation is off under `prefers-reduced-motion: reduce`.
2501
2551
 
2502
2552
  rise enter: fade up 10px over 400ms FadeIn, Timeline, tooltips
2553
+ `data-beat="n"` staggers it n x 70ms
2503
2554
  fade opacity eases 240ms SlideOver's scrim
2504
2555
  slide transform eases 260ms SlideOver's panel
2505
2556
  drag a row eases into place while one is held Reorder
2506
2557
  pulse opacity dims and returns, 2s Pulse, StatusDot, Skeleton
2507
2558
  blink on/off, 1s Caret
2508
2559
  shimmer a highlight sweeps a placeholder product Skeleton
2509
- unfold a sheet turns open about its hinge unfold() */
2560
+ unfold a sheet turns open about its hinge unfold()
2561
+ run a light sweeps a set, child by child Run */
2510
2562
 
2511
2563
  @keyframes rise {
2512
2564
  from {
@@ -2524,6 +2576,17 @@ a svg,
2524
2576
  will-change: transform, opacity;
2525
2577
  }
2526
2578
 
2579
+ /* A staged entrance: `data-beat="n"` holds a rise back n beats of 70ms, so a set
2580
+ that arrives together still reads in order. Reduced motion drops the
2581
+ animation and the delay with it, so nothing waits hidden. */
2582
+ [data-motion='rise'][data-beat='1'] { animation-delay: 70ms; }
2583
+ [data-motion='rise'][data-beat='2'] { animation-delay: 140ms; }
2584
+ [data-motion='rise'][data-beat='3'] { animation-delay: 210ms; }
2585
+ [data-motion='rise'][data-beat='4'] { animation-delay: 280ms; }
2586
+ [data-motion='rise'][data-beat='5'] { animation-delay: 350ms; }
2587
+ [data-motion='rise'][data-beat='6'] { animation-delay: 420ms; }
2588
+ [data-motion='rise'][data-beat='7'] { animation-delay: 490ms; }
2589
+
2527
2590
  [data-motion='fade'] {
2528
2591
  transition: opacity 240ms cubic-bezier(0.16, 1, 0.3, 1);
2529
2592
  will-change: opacity;
@@ -2604,8 +2667,45 @@ a svg,
2604
2667
  --turn: 7deg;
2605
2668
  }
2606
2669
 
2670
+ /* A run: a light crosses a set of things that are all true at once (`<Run>`).
2671
+ Each direct child is lit `data-beat` steps of `--run-step` after the first;
2672
+ the sweep owns `color` and returns it to `--run-rest`. */
2673
+ @keyframes run {
2674
+ 0%,
2675
+ 26%,
2676
+ 100% {
2677
+ color: var(--run-rest, var(--neutral-400));
2678
+ border-color: var(--neutral-800);
2679
+ }
2680
+ 8% {
2681
+ color: var(--foreground);
2682
+ border-color: var(--muted-foreground);
2683
+ }
2684
+ }
2685
+
2686
+ [data-motion='run'] > * {
2687
+ animation: run 5.4s var(--ease-in-out) infinite;
2688
+ }
2689
+
2690
+ [data-motion='run'] > [data-beat='1'] { animation-delay: calc(1 * var(--run-step, 0.22s)); }
2691
+ [data-motion='run'] > [data-beat='2'] { animation-delay: calc(2 * var(--run-step, 0.22s)); }
2692
+ [data-motion='run'] > [data-beat='3'] { animation-delay: calc(3 * var(--run-step, 0.22s)); }
2693
+ [data-motion='run'] > [data-beat='4'] { animation-delay: calc(4 * var(--run-step, 0.22s)); }
2694
+ [data-motion='run'] > [data-beat='5'] { animation-delay: calc(5 * var(--run-step, 0.22s)); }
2695
+ [data-motion='run'] > [data-beat='6'] { animation-delay: calc(6 * var(--run-step, 0.22s)); }
2696
+ [data-motion='run'] > [data-beat='7'] { animation-delay: calc(7 * var(--run-step, 0.22s)); }
2697
+ [data-motion='run'] > [data-beat='8'] { animation-delay: calc(8 * var(--run-step, 0.22s)); }
2698
+ [data-motion='run'] > [data-beat='9'] { animation-delay: calc(9 * var(--run-step, 0.22s)); }
2699
+ [data-motion='run'] > [data-beat='10'] { animation-delay: calc(10 * var(--run-step, 0.22s)); }
2700
+ [data-motion='run'] > [data-beat='11'] { animation-delay: calc(11 * var(--run-step, 0.22s)); }
2701
+ [data-motion='run'] > [data-beat='12'] { animation-delay: calc(12 * var(--run-step, 0.22s)); }
2702
+ [data-motion='run'] > [data-beat='13'] { animation-delay: calc(13 * var(--run-step, 0.22s)); }
2703
+ [data-motion='run'] > [data-beat='14'] { animation-delay: calc(14 * var(--run-step, 0.22s)); }
2704
+ [data-motion='run'] > [data-beat='15'] { animation-delay: calc(15 * var(--run-step, 0.22s)); }
2705
+
2607
2706
  @media (prefers-reduced-motion: reduce) {
2608
- [data-motion] {
2707
+ [data-motion],
2708
+ [data-motion='run'] > * {
2609
2709
  animation: none;
2610
2710
  transition: none;
2611
2711
  }
@@ -19,8 +19,14 @@ const slot_1 = require("../backends/gui/slot.cjs");
19
19
  const Cta = ({ href, children, quiet = false, ...p }) => ((0, jsx_runtime_1.jsx)(gui_1.Anchor, { ...(0, slot_1.slot)(quiet ? 'cta-quiet' : 'cta'), href: href, display: "inline-flex", items: "center", justify: "center", minH: 44, px: "$5", rounded: "$4", borderWidth: 1, borderColor: quiet ? '$borderColor' : 'transparent', bg: quiet ? 'transparent' : 'var(--primary)', color: quiet ? '$ink' : 'var(--primary-foreground)', fontSize: "$4", fontWeight: "500", text: "center", textDecorationLine: "none", hoverStyle: quiet ? { bg: '$hover' } : { bg: 'var(--primary-hover)' }, ...p, children: children }));
20
20
  exports.Cta = Cta;
21
21
  /**
22
- * TextLink — a link inside a sentence: the surrounding ink, underlined.
23
- * `Cta` is the control; this is the word.
22
+ * TextLink — a link inside a sentence: full ink and an underline, because in
23
+ * quiet text colour alone does not say "link", and the sentence's own face and
24
+ * size. `Cta` is the control; this is the word. A button inside such a sentence (no `href`) reads as one of its
25
+ * links: no box, and the sentence's own face, which @hanzo/design's base hands
26
+ * every button.
24
27
  */
25
- const TextLink = ({ href, children, ...p }) => ((0, jsx_runtime_1.jsx)(gui_1.Anchor, { ...(0, slot_1.slot)('text-link'), href: href, color: "$ink", textDecorationLine: "underline", style: { textUnderlineOffset: 3 }, ...p, children: children }));
28
+ /** The sentence's own type, which gui's Text would otherwise replace with its
29
+ * body size. */
30
+ const WORD = { fontFamily: 'inherit', fontSize: 'inherit', fontWeight: 'inherit', lineHeight: 'inherit', letterSpacing: 'inherit' };
31
+ const TextLink = ({ href, children, ...p }) => href !== undefined ? ((0, jsx_runtime_1.jsx)(gui_1.Anchor, { ...(0, slot_1.slot)('text-link'), href: href, ...WORD, color: "$ink", textDecorationLine: "underline", style: { textUnderlineOffset: 3 }, ...p, children: children })) : ((0, jsx_runtime_1.jsx)(gui_1.Text, { ...(0, slot_1.slot)('text-link'), render: (0, jsx_runtime_1.jsx)("button", { type: "button" }), p: 0, borderWidth: 0, bg: "transparent", ...WORD, color: "$ink", textDecorationLine: "underline", cursor: "pointer", style: { textUnderlineOffset: 3 }, ...p, children: children }));
26
32
  exports.TextLink = TextLink;
@@ -20,10 +20,12 @@ export type CtaProps = Omit<ComponentProps<typeof Anchor>, 'children' | 'href'>
20
20
  };
21
21
  declare const Cta: ({ href, children, quiet, ...p }: CtaProps) => import("react").JSX.Element;
22
22
  export { Cta };
23
- /**
24
- * TextLink — a link inside a sentence: the surrounding ink, underlined.
25
- * `Cta` is the control; this is the word.
26
- */
27
- declare const TextLink: ({ href, children, ...p }: Omit<CtaProps, 'quiet'>) => import("react").JSX.Element;
23
+ export type TextLinkProps = Omit<CtaProps, 'quiet' | 'href'> & {
24
+ /** Where it goes. Without one it is a button that reads as a link — "try
25
+ * again", "change address" — and `onPress` is what it does. */
26
+ href?: string;
27
+ disabled?: boolean;
28
+ };
29
+ declare const TextLink: ({ href, children, ...p }: TextLinkProps) => import("react").JSX.Element;
28
30
  export { TextLink };
29
31
  //# sourceMappingURL=Cta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Cta.d.ts","sourceRoot":"","sources":["../../src/marketing/Cta.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItD,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC,GAAG;IAChF,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,SAAS,CAAA;IACnB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,QAAA,MAAM,GAAG,oCAA6C,QAAQ,gCAuB7D,CAAA;AAED,OAAO,EAAE,GAAG,EAAE,CAAA;AAEd;;;GAGG;AACH,QAAA,MAAM,QAAQ,6BAA8B,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,gCAWlE,CAAA;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
1
+ {"version":3,"file":"Cta.d.ts","sourceRoot":"","sources":["../../src/marketing/Cta.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,MAAM,EAAQ,MAAM,YAAY,CAAA;AAEzC,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItD,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC,GAAG;IAChF,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,SAAS,CAAA;IACnB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,QAAA,MAAM,GAAG,oCAA6C,QAAQ,gCAuB7D,CAAA;AAED,OAAO,EAAE,GAAG,EAAE,CAAA;AAEd,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC,GAAG;IAC7D;oEACgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAaD,QAAA,MAAM,QAAQ,6BAA8B,aAAa,gCA6BtD,CAAA;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAA"}
@@ -11,14 +11,20 @@ import { jsx as _jsx } from "react/jsx-runtime";
11
11
  *
12
12
  * The 44px floor is `minH`, not padding, so a two-line label stays balanced.
13
13
  */
14
- import { Anchor } from '@hanzo/gui';
14
+ import { Anchor, Text } from '@hanzo/gui';
15
15
  import { slot } from '../backends/gui/slot.js';
16
16
  const Cta = ({ href, children, quiet = false, ...p }) => (_jsx(Anchor, { ...slot(quiet ? 'cta-quiet' : 'cta'), href: href, display: "inline-flex", items: "center", justify: "center", minH: 44, px: "$5", rounded: "$4", borderWidth: 1, borderColor: quiet ? '$borderColor' : 'transparent', bg: quiet ? 'transparent' : 'var(--primary)', color: quiet ? '$ink' : 'var(--primary-foreground)', fontSize: "$4", fontWeight: "500", text: "center", textDecorationLine: "none", hoverStyle: quiet ? { bg: '$hover' } : { bg: 'var(--primary-hover)' }, ...p, children: children }));
17
17
  export { Cta };
18
18
  /**
19
- * TextLink — a link inside a sentence: the surrounding ink, underlined.
20
- * `Cta` is the control; this is the word.
19
+ * TextLink — a link inside a sentence: full ink and an underline, because in
20
+ * quiet text colour alone does not say "link", and the sentence's own face and
21
+ * size. `Cta` is the control; this is the word. A button inside such a sentence (no `href`) reads as one of its
22
+ * links: no box, and the sentence's own face, which @hanzo/design's base hands
23
+ * every button.
21
24
  */
22
- const TextLink = ({ href, children, ...p }) => (_jsx(Anchor, { ...slot('text-link'), href: href, color: "$ink", textDecorationLine: "underline", style: { textUnderlineOffset: 3 }, ...p, children: children }));
25
+ /** The sentence's own type, which gui's Text would otherwise replace with its
26
+ * body size. */
27
+ const WORD = { fontFamily: 'inherit', fontSize: 'inherit', fontWeight: 'inherit', lineHeight: 'inherit', letterSpacing: 'inherit' };
28
+ const TextLink = ({ href, children, ...p }) => href !== undefined ? (_jsx(Anchor, { ...slot('text-link'), href: href, ...WORD, color: "$ink", textDecorationLine: "underline", style: { textUnderlineOffset: 3 }, ...p, children: children })) : (_jsx(Text, { ...slot('text-link'), render: _jsx("button", { type: "button" }), p: 0, borderWidth: 0, bg: "transparent", ...WORD, color: "$ink", textDecorationLine: "underline", cursor: "pointer", style: { textUnderlineOffset: 3 }, ...p, children: children }));
23
29
  export { TextLink };
24
30
  //# sourceMappingURL=Cta.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"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= exports.Chip = exports.Action = void 0;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ /**
7
+ * The three controls a marketing page closes a thought with, one set:
8
+ *
9
+ * Action the button — chrome glass, or `fill` for the one loud control
10
+ * Chip a word in an outline: a badge, a tag, a filter
11
+ * More the quiet link — "View all →", "See full pricing ↗"
12
+ *
13
+ * Each is a gui Text, so it carries its own type and draws its own box: the
14
+ * label and any icon beside it inherit the ink, and nothing reaches in from a
15
+ * stylesheet. White space is the parent's, so a control inside a line that
16
+ * clips with an ellipsis stays on that line. An `href` makes it a link: an internal one goes through the app's
17
+ * router link (@hanzo/ui's `Link` context, set once at the root), any other is
18
+ * an anchor. A control that does something passes `render="button"`.
19
+ *
20
+ * The ease between rest and hover is @hanzo/design's base, which grants every
21
+ * `<a>` and `<button>` its colour, fill, edge and shadow transition, and the
22
+ * pointer (or `not-allowed` on a disabled button); a control restates none of it.
23
+ *
24
+ * Both themes are props. On the light ground the dark glass would draw a grey
25
+ * slab and the white fill would vanish into the page, so `$theme-light` turns
26
+ * the quiet weight to white glass with a dark edge and the loud one to ink.
27
+ */
28
+ const gui_1 = require("@hanzo/gui");
29
+ const slot_1 = require("../backends/gui/slot.cjs");
30
+ const host_1 = require("./host.cjs");
31
+ const BOX = {
32
+ display: 'inline-flex',
33
+ items: 'center',
34
+ whiteSpace: 'inherit',
35
+ textDecorationLine: 'none',
36
+ };
37
+ /** A rung that carries its own leading: naming the size alone leaves the line
38
+ * box to whatever an ancestor sets. */
39
+ const SMALL = { fontSize: '$2', lineHeight: 'calc(1.25 / 0.875)' };
40
+ /**
41
+ * A caller's own value holds in every state, the way a value stated on the
42
+ * element always has: a key the caller passes is dropped from the hover and from
43
+ * the light theme, so `color` on a chip stays that colour under the pointer and
44
+ * on the light ground. A caller's own `hoverStyle` or `$theme-light` replaces
45
+ * the default whole.
46
+ */
47
+ const states = (p, hover, light) => {
48
+ const own = (s) => Object.fromEntries(Object.entries(s).filter(([k]) => !(k in p)));
49
+ const { hoverStyle: lightHover, ...lightRest } = light;
50
+ return {
51
+ ...(p.hoverStyle === undefined ? { hoverStyle: own(hover) } : null),
52
+ ...(p['$theme-light'] === undefined
53
+ ? { '$theme-light': { ...own(lightRest), ...(lightHover && p.hoverStyle === undefined ? { hoverStyle: own(lightHover) } : null) } }
54
+ : null),
55
+ };
56
+ };
57
+ /** The quiet weight is chrome glass; `fill` drops the border outright rather
58
+ * than making it transparent, which would leave the loud control 2px wider
59
+ * than the quiet one beside it. 44px is the thumb floor, not a style. */
60
+ const Action = ({ render, fill = false, ...p }) => {
61
+ const host = (0, host_1.useHost)(render, p.href, 'a');
62
+ return ((0, jsx_runtime_1.jsx)(gui_1.Text, { ...(0, slot_1.slot)('action'), ...(fill ? { 'data-fill': '' } : null), render: host, ...BOX, ...SMALL, justify: "center", gap: "$2", minH: 44, px: "$5", rounded: 9999, fontWeight: "500", backdropFilter: "var(--chrome-blur)", ...(fill
63
+ ? {
64
+ borderWidth: 0,
65
+ bg: 'var(--pure-white)',
66
+ color: 'var(--pure-black)',
67
+ boxShadow: '0 4px 20px -2px var(--white-22), 0 2px 8px 0 color-mix(in srgb, var(--pure-black) 40%, transparent)',
68
+ ...states(p, { opacity: 0.92, bg: 'var(--neutral-100)', color: 'var(--pure-black)' }, {
69
+ bg: 'var(--foreground)',
70
+ color: 'var(--background)',
71
+ boxShadow: '0 4px 16px -6px color-mix(in srgb, var(--pure-black) 40%, transparent)',
72
+ hoverStyle: { bg: 'var(--foreground)', color: 'var(--background)' },
73
+ }),
74
+ }
75
+ : {
76
+ borderWidth: 1,
77
+ borderStyle: 'solid',
78
+ borderColor: 'var(--white-14)',
79
+ bg: 'color-mix(in srgb, var(--neutral-900) 65%, transparent)',
80
+ color: 'var(--foreground)',
81
+ boxShadow: 'inset 0 1px 0 0 var(--white-14), 0 4px 16px -2px color-mix(in srgb, var(--pure-black) 30%, transparent)',
82
+ ...states(p, { bg: 'color-mix(in srgb, var(--neutral-800) 80%, transparent)', borderColor: 'var(--white-22)', color: 'var(--pure-white)' }, {
83
+ borderColor: 'color-mix(in srgb, var(--pure-black) 14%, transparent)',
84
+ bg: 'color-mix(in srgb, var(--pure-white) 72%, transparent)',
85
+ color: 'var(--foreground)',
86
+ boxShadow: '0 2px 10px -4px color-mix(in srgb, var(--pure-black) 18%, transparent)',
87
+ hoverStyle: { borderColor: 'color-mix(in srgb, var(--pure-black) 26%, transparent)', bg: 'var(--pure-white)', color: 'var(--foreground)' },
88
+ }),
89
+ }), ...p }));
90
+ };
91
+ exports.Action = Action;
92
+ /** A word in an outline. Not an action — no fill, no weight — so the padding is
93
+ * the caller's: a chip and a badge are the same outline at two sizes. It
94
+ * brightens on approach only when it is a link. */
95
+ const Chip = ({ render, ...p }) => {
96
+ const host = (0, host_1.useHost)(render, p.href, 'span');
97
+ const link = (0, host_1.address)(host, p.href);
98
+ return ((0, jsx_runtime_1.jsx)(gui_1.Text, { ...(0, slot_1.slot)('chip'), render: host, ...BOX, ...SMALL, gap: "$2", borderWidth: 1, borderStyle: "solid", borderColor: "var(--white-08)", rounded: 9999, color: "var(--neutral-300)", bg: "var(--white-03)", ...states(p, link ? { borderColor: 'var(--white-20)', color: 'var(--pure-white)' } : {}, {
99
+ borderColor: 'var(--border)',
100
+ bg: 'var(--glass)',
101
+ color: 'var(--muted-foreground)',
102
+ ...(link ? { hoverStyle: { borderColor: 'var(--border-strong)', color: 'var(--foreground)' } } : null),
103
+ }), ...p }));
104
+ };
105
+ exports.Chip = Chip;
106
+ /** The quiet link. The hover is the reason it is a component rather than a
107
+ * colour at the call site. */
108
+ const More = ({ render, ...p }) => {
109
+ const host = (0, host_1.useHost)(render, p.href, 'a');
110
+ return ((0, jsx_runtime_1.jsx)(gui_1.Text, { ...(0, slot_1.slot)('more'), render: host, ...BOX, ...SMALL, gap: "$2", fontWeight: "500", color: "var(--neutral-300)", ...states(p, { color: 'var(--pure-white)' }, { color: 'var(--muted-foreground)', hoverStyle: { color: 'var(--foreground)' } }), ...p }));
111
+ };
112
+ exports.More = More;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * The three controls a marketing page closes a thought with, one set:
3
+ *
4
+ * Action the button — chrome glass, or `fill` for the one loud control
5
+ * Chip a word in an outline: a badge, a tag, a filter
6
+ * More the quiet link — "View all →", "See full pricing ↗"
7
+ *
8
+ * Each is a gui Text, so it carries its own type and draws its own box: the
9
+ * label and any icon beside it inherit the ink, and nothing reaches in from a
10
+ * stylesheet. White space is the parent's, so a control inside a line that
11
+ * clips with an ellipsis stays on that line. An `href` makes it a link: an internal one goes through the app's
12
+ * router link (@hanzo/ui's `Link` context, set once at the root), any other is
13
+ * an anchor. A control that does something passes `render="button"`.
14
+ *
15
+ * The ease between rest and hover is @hanzo/design's base, which grants every
16
+ * `<a>` and `<button>` its colour, fill, edge and shadow transition, and the
17
+ * pointer (or `not-allowed` on a disabled button); a control restates none of it.
18
+ *
19
+ * Both themes are props. On the light ground the dark glass would draw a grey
20
+ * slab and the white fill would vanish into the page, so `$theme-light` turns
21
+ * the quiet weight to white glass with a dark edge and the loud one to ink.
22
+ */
23
+ import { type TextProps } from '@hanzo/gui';
24
+ import type { Host, Loose } from './loose.js';
25
+ export type ControlProps = Loose<Omit<TextProps, 'render' | 'children'>> & Host & {
26
+ render?: TextProps['render'];
27
+ };
28
+ /** The quiet weight is chrome glass; `fill` drops the border outright rather
29
+ * than making it transparent, which would leave the loud control 2px wider
30
+ * than the quiet one beside it. 44px is the thumb floor, not a style. */
31
+ declare const Action: ({ render, fill, ...p }: ControlProps & {
32
+ fill?: boolean;
33
+ }) => import("react").JSX.Element;
34
+ /** A word in an outline. Not an action — no fill, no weight — so the padding is
35
+ * the caller's: a chip and a badge are the same outline at two sizes. It
36
+ * brightens on approach only when it is a link. */
37
+ declare const Chip: ({ render, ...p }: ControlProps) => import("react").JSX.Element;
38
+ /** The quiet link. The hover is the reason it is a component rather than a
39
+ * colour at the call site. */
40
+ declare const More: ({ render, ...p }: ControlProps) => import("react").JSX.Element;
41
+ export { Action, Chip, More };
42
+ //# sourceMappingURL=controls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../src/marketing/controls.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,YAAY,CAAA;AAIjD,OAAO,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE1C,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,GAAG,UAAU,CAAC,CAAC,GACtE,IAAI,GAAG;IACL,MAAM,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAA;CAC7B,CAAA;AAiCH;;0EAE0E;AAC1E,QAAA,MAAM,MAAM,2BAAoC,YAAY,GAAG;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,gCAuDhF,CAAA;AAED;;oDAEoD;AACpD,QAAA,MAAM,IAAI,qBAAsB,YAAY,gCA6B3C,CAAA;AAED;+BAC+B;AAC/B,QAAA,MAAM,IAAI,qBAAsB,YAAY,gCAe3C,CAAA;AAED,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA"}
@@ -0,0 +1,108 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ /**
4
+ * The three controls a marketing page closes a thought with, one set:
5
+ *
6
+ * Action the button — chrome glass, or `fill` for the one loud control
7
+ * Chip a word in an outline: a badge, a tag, a filter
8
+ * More the quiet link — "View all →", "See full pricing ↗"
9
+ *
10
+ * Each is a gui Text, so it carries its own type and draws its own box: the
11
+ * label and any icon beside it inherit the ink, and nothing reaches in from a
12
+ * stylesheet. White space is the parent's, so a control inside a line that
13
+ * clips with an ellipsis stays on that line. An `href` makes it a link: an internal one goes through the app's
14
+ * router link (@hanzo/ui's `Link` context, set once at the root), any other is
15
+ * an anchor. A control that does something passes `render="button"`.
16
+ *
17
+ * The ease between rest and hover is @hanzo/design's base, which grants every
18
+ * `<a>` and `<button>` its colour, fill, edge and shadow transition, and the
19
+ * pointer (or `not-allowed` on a disabled button); a control restates none of it.
20
+ *
21
+ * Both themes are props. On the light ground the dark glass would draw a grey
22
+ * slab and the white fill would vanish into the page, so `$theme-light` turns
23
+ * the quiet weight to white glass with a dark edge and the loud one to ink.
24
+ */
25
+ import { Text } from '@hanzo/gui';
26
+ import { slot } from '../backends/gui/slot.js';
27
+ import { address, useHost } from './host.js';
28
+ const BOX = {
29
+ display: 'inline-flex',
30
+ items: 'center',
31
+ whiteSpace: 'inherit',
32
+ textDecorationLine: 'none',
33
+ };
34
+ /** A rung that carries its own leading: naming the size alone leaves the line
35
+ * box to whatever an ancestor sets. */
36
+ const SMALL = { fontSize: '$2', lineHeight: 'calc(1.25 / 0.875)' };
37
+ /**
38
+ * A caller's own value holds in every state, the way a value stated on the
39
+ * element always has: a key the caller passes is dropped from the hover and from
40
+ * the light theme, so `color` on a chip stays that colour under the pointer and
41
+ * on the light ground. A caller's own `hoverStyle` or `$theme-light` replaces
42
+ * the default whole.
43
+ */
44
+ const states = (p, hover, light) => {
45
+ const own = (s) => Object.fromEntries(Object.entries(s).filter(([k]) => !(k in p)));
46
+ const { hoverStyle: lightHover, ...lightRest } = light;
47
+ return {
48
+ ...(p.hoverStyle === undefined ? { hoverStyle: own(hover) } : null),
49
+ ...(p['$theme-light'] === undefined
50
+ ? { '$theme-light': { ...own(lightRest), ...(lightHover && p.hoverStyle === undefined ? { hoverStyle: own(lightHover) } : null) } }
51
+ : null),
52
+ };
53
+ };
54
+ /** The quiet weight is chrome glass; `fill` drops the border outright rather
55
+ * than making it transparent, which would leave the loud control 2px wider
56
+ * than the quiet one beside it. 44px is the thumb floor, not a style. */
57
+ const Action = ({ render, fill = false, ...p }) => {
58
+ const host = useHost(render, p.href, 'a');
59
+ return (_jsx(Text, { ...slot('action'), ...(fill ? { 'data-fill': '' } : null), render: host, ...BOX, ...SMALL, justify: "center", gap: "$2", minH: 44, px: "$5", rounded: 9999, fontWeight: "500", backdropFilter: "var(--chrome-blur)", ...(fill
60
+ ? {
61
+ borderWidth: 0,
62
+ bg: 'var(--pure-white)',
63
+ color: 'var(--pure-black)',
64
+ boxShadow: '0 4px 20px -2px var(--white-22), 0 2px 8px 0 color-mix(in srgb, var(--pure-black) 40%, transparent)',
65
+ ...states(p, { opacity: 0.92, bg: 'var(--neutral-100)', color: 'var(--pure-black)' }, {
66
+ bg: 'var(--foreground)',
67
+ color: 'var(--background)',
68
+ boxShadow: '0 4px 16px -6px color-mix(in srgb, var(--pure-black) 40%, transparent)',
69
+ hoverStyle: { bg: 'var(--foreground)', color: 'var(--background)' },
70
+ }),
71
+ }
72
+ : {
73
+ borderWidth: 1,
74
+ borderStyle: 'solid',
75
+ borderColor: 'var(--white-14)',
76
+ bg: 'color-mix(in srgb, var(--neutral-900) 65%, transparent)',
77
+ color: 'var(--foreground)',
78
+ boxShadow: 'inset 0 1px 0 0 var(--white-14), 0 4px 16px -2px color-mix(in srgb, var(--pure-black) 30%, transparent)',
79
+ ...states(p, { bg: 'color-mix(in srgb, var(--neutral-800) 80%, transparent)', borderColor: 'var(--white-22)', color: 'var(--pure-white)' }, {
80
+ borderColor: 'color-mix(in srgb, var(--pure-black) 14%, transparent)',
81
+ bg: 'color-mix(in srgb, var(--pure-white) 72%, transparent)',
82
+ color: 'var(--foreground)',
83
+ boxShadow: '0 2px 10px -4px color-mix(in srgb, var(--pure-black) 18%, transparent)',
84
+ hoverStyle: { borderColor: 'color-mix(in srgb, var(--pure-black) 26%, transparent)', bg: 'var(--pure-white)', color: 'var(--foreground)' },
85
+ }),
86
+ }), ...p }));
87
+ };
88
+ /** A word in an outline. Not an action — no fill, no weight — so the padding is
89
+ * the caller's: a chip and a badge are the same outline at two sizes. It
90
+ * brightens on approach only when it is a link. */
91
+ const Chip = ({ render, ...p }) => {
92
+ const host = useHost(render, p.href, 'span');
93
+ const link = address(host, p.href);
94
+ return (_jsx(Text, { ...slot('chip'), render: host, ...BOX, ...SMALL, gap: "$2", borderWidth: 1, borderStyle: "solid", borderColor: "var(--white-08)", rounded: 9999, color: "var(--neutral-300)", bg: "var(--white-03)", ...states(p, link ? { borderColor: 'var(--white-20)', color: 'var(--pure-white)' } : {}, {
95
+ borderColor: 'var(--border)',
96
+ bg: 'var(--glass)',
97
+ color: 'var(--muted-foreground)',
98
+ ...(link ? { hoverStyle: { borderColor: 'var(--border-strong)', color: 'var(--foreground)' } } : null),
99
+ }), ...p }));
100
+ };
101
+ /** The quiet link. The hover is the reason it is a component rather than a
102
+ * colour at the call site. */
103
+ const More = ({ render, ...p }) => {
104
+ const host = useHost(render, p.href, 'a');
105
+ return (_jsx(Text, { ...slot('more'), render: host, ...BOX, ...SMALL, gap: "$2", fontWeight: "500", color: "var(--neutral-300)", ...states(p, { color: 'var(--pure-white)' }, { color: 'var(--muted-foreground)', hoverStyle: { color: 'var(--foreground)' } }), ...p }));
106
+ };
107
+ export { Action, Chip, More };
108
+ //# sourceMappingURL=controls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controls.js","sourceRoot":"","sources":["../../src/marketing/controls.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,IAAI,EAAkB,MAAM,YAAY,CAAA;AAEjD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAQzC,MAAM,GAAG,GAAG;IACV,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,QAAQ;IACf,UAAU,EAAE,SAAS;IACrB,kBAAkB,EAAE,MAAM;CAClB,CAAA;AAEV;wCACwC;AACxC,MAAM,KAAK,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,oBAA6B,EAAW,CAAA;AAIpF;;;;;;GAMG;AACH,M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,MAAM,CAAC,EAChB,MAAM,EAAE,IAAI,KACR,GAAG,KACH,KAAK,EACT,GAAG,EAAC,IAAI,EACR,UAAU,EAAC,KAAK,EAChB,KAAK,EAAC,oBAAoB,KACtB,MAAM,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAAE,EAAE,KAAK,EAAE,yBAAyB,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAAE,CAAC,KAC1H,CAAY,GACjB,CACH,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA"}
@@ -0,0 +1,7 @@
1
+ 'use client';"use strict";
2
+ 'use client';
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Document = void 0;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const Document = ({ html, children }) => html !== undefined ? ((0, jsx_runtime_1.jsx)("div", { "data-slot": "document", dangerouslySetInnerHTML: { __html: html } })) : ((0, jsx_runtime_1.jsx)("div", { "data-slot": "document", children: children }));
7
+ exports.Document = Document;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Document — the body of a long document: a policy, a set of terms, an
3
+ * explanation.
4
+ *
5
+ * Its content is authored as markdown and arrives as bare tags, which no prop
6
+ * can reach, so the type is `@hanzo/ui/styles/document.css`, keyed on the slot
7
+ * this stamps and selecting by tag from here down. `html` is a document
8
+ * rendered from markdown at build time; it goes on this element itself, because
9
+ * nested one level deeper the whole document would be one flex item and every
10
+ * paragraph gap would vanish.
11
+ *
12
+ * A plain element, not a gui frame: a frame's base would lay the paragraphs out
13
+ * as its own flex items with its own type, and the sheet is the type here.
14
+ */
15
+ import type { ReactNode } from 'react';
16
+ export type DocumentProps = {
17
+ html?: string;
18
+ children?: ReactNode;
19
+ };
20
+ declare const Document: ({ html, children }: DocumentProps) => import("react").JSX.Element;
21
+ export { Document };
22
+ //# sourceMappingURL=document.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/marketing/document.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,MAAM,aAAa,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,CAAA;AAEnE,QAAA,MAAM,QAAQ,uBAAwB,aAAa,gCAKhD,CAAA;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAA"}
@@ -0,0 +1,5 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ const Document = ({ html, children }) => html !== undefined ? (_jsx("div", { "data-slot": "document", dangerouslySetInnerHTML: { __html: html } })) : (_jsx("div", { "data-slot": "document", children: children }));
4
+ export { Document };
5
+ //# sourceMappingURL=document.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.js","sourceRoot":"","sources":["../../src/marketing/document.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAoBZ,MAAM,QAAQ,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAiB,EAAE,EAAE,CACrD,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,CACnB,2BAAe,UAAU,EAAC,uBAAuB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,GAAI,CACxE,CAAC,CAAC,CAAC,CACF,2BAAe,UAAU,YAAE,QAAQ,GAAO,CAC3C,CAAA;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAA"}
@@ -0,0 +1,39 @@
1
+ 'use client';"use strict";
2
+ 'use client';
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.address = exports.useHost = void 0;
5
+ const react_1 = require("react");
6
+ const link_1 = require("../backends/gui/link.cjs");
7
+ /**
8
+ * Where a marketing control's element comes from.
9
+ *
10
+ * An explicit `render` wins. Otherwise an internal `href` to a page goes
11
+ * through the app's router link — @hanzo/ui's link context, `<Link value={NextLink}>` once
12
+ * at the root — so navigation stays client-side; any other address is a plain
13
+ * anchor, and no address is the role's own element.
14
+ *
15
+ * The router link is made HERE, in the client component, and never handed in
16
+ * from a page. A server page that passes `render={<NextLink …/>}` sends an
17
+ * element through the RSC payload, which may arrive as a lazy reference
18
+ * rather than an element; gui then renders that reference as a component and
19
+ * the prerender dies on "Element type is invalid … got: object".
20
+ */
21
+ const useHost = (render, href, own) => {
22
+ const Link = (0, link_1.useLink)();
23
+ if (render !== undefined)
24
+ return render;
25
+ if (href === undefined)
26
+ return own;
27
+ return Link !== 'a' && route(href) ? (0, react_1.createElement)(Link, { href }) : 'a';
28
+ };
29
+ exports.useHost = useHost;
30
+ /** An address the app's router can open: a path on this site that names a
31
+ * page. A path that ends in a file extension — `/skill.md`, `/feed.xml` — is a
32
+ * file the server hands back as it is, so it stays an anchor; a version in a
33
+ * page's name (`/models/…/claude-opus-5.5`) is not an extension. */
34
+ const route = (href) => href.startsWith('/') && !href.startsWith('//') && !/\.[a-z][a-z0-9]{1,4}$/i.test(href.split(/[?#]/)[0]);
35
+ /** Whether a host is an address: an `href`, an anchor, or an element carrying
36
+ * one. A control that is a link answers the pointer; a card that is a link
37
+ * rests in the link ink the document gives every `<a>`. */
38
+ const address = (host, href) => href !== undefined || host === 'a' || ((0, react_1.isValidElement)(host) && host.props.href !== undefined);
39
+ exports.address = address;