@epicbagel/saas-kit 1.32.0 → 1.34.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 (228) hide show
  1. package/README.md +67 -0
  2. package/THIRD_PARTY_NOTICES.md +6 -5
  3. package/dist/chunk-2BNEE3U6.cjs +36 -0
  4. package/dist/chunk-2DCJ2SFU.js +20 -0
  5. package/dist/chunk-5GFMSK27.js +489 -0
  6. package/dist/chunk-5PHOKJCT.cjs +42 -0
  7. package/dist/chunk-B54ZEKBG.cjs +63 -0
  8. package/dist/chunk-BB7PO2BW.js +67 -0
  9. package/dist/chunk-BOMVE7QO.cjs +47 -0
  10. package/dist/{chunk-FPOJ2NGG.js → chunk-C3VZMTVB.js} +1 -1
  11. package/dist/chunk-CXAFTEEP.cjs +20 -0
  12. package/dist/chunk-EXHF3QUY.js +36 -0
  13. package/dist/chunk-FYNHRHVY.cjs +47 -0
  14. package/dist/chunk-HTTRUJQU.cjs +60 -0
  15. package/dist/chunk-I3GBXIFL.cjs +67 -0
  16. package/dist/chunk-O3G3TVPU.js +27 -0
  17. package/dist/{chunk-JS6BLIWL.js → chunk-ROUWBWEQ.js} +7 -7
  18. package/dist/chunk-TDCVZKMX.cjs +27 -0
  19. package/dist/{chunk-E2UVQXBO.cjs → chunk-TP74SBRH.cjs} +6 -6
  20. package/dist/chunk-TUQVHPSI.js +60 -0
  21. package/dist/chunk-UKYUWSF2.cjs +489 -0
  22. package/dist/{chunk-MOJHETNO.cjs → chunk-VUMLLKWY.cjs} +5 -5
  23. package/dist/chunk-VWOWPNKT.js +73 -0
  24. package/dist/chunk-W5L6LQI3.js +42 -0
  25. package/dist/chunk-WMTCL463.js +47 -0
  26. package/dist/chunk-WTVL2FK7.js +47 -0
  27. package/dist/chunk-XH2I3YJ6.js +63 -0
  28. package/dist/chunk-Y6X6XDHE.cjs +73 -0
  29. package/dist/primitives/accent-theme.cjs +7 -0
  30. package/dist/primitives/accent-theme.d.cts +32 -0
  31. package/dist/primitives/accent-theme.d.ts +32 -0
  32. package/dist/primitives/accent-theme.js +7 -0
  33. package/dist/primitives/activity-feed.cjs +3 -3
  34. package/dist/primitives/activity-feed.js +4 -4
  35. package/dist/primitives/anchor.cjs +3 -30
  36. package/dist/primitives/anchor.js +3 -30
  37. package/dist/primitives/app-layout.cjs +114 -0
  38. package/dist/primitives/app-layout.d.cts +47 -0
  39. package/dist/primitives/app-layout.d.ts +47 -0
  40. package/dist/primitives/app-layout.js +114 -0
  41. package/dist/primitives/app-sidebar.cjs +52 -0
  42. package/dist/primitives/app-sidebar.d.cts +105 -0
  43. package/dist/primitives/app-sidebar.d.ts +105 -0
  44. package/dist/primitives/app-sidebar.js +52 -0
  45. package/dist/primitives/back-bar.cjs +37 -0
  46. package/dist/primitives/back-bar.d.cts +31 -0
  47. package/dist/primitives/back-bar.d.ts +31 -0
  48. package/dist/primitives/back-bar.js +37 -0
  49. package/dist/primitives/batch-action-bar.cjs +134 -0
  50. package/dist/primitives/batch-action-bar.d.cts +27 -0
  51. package/dist/primitives/batch-action-bar.d.ts +27 -0
  52. package/dist/primitives/batch-action-bar.js +134 -0
  53. package/dist/primitives/board-view.cjs +7 -7
  54. package/dist/primitives/board-view.js +6 -6
  55. package/dist/primitives/brand-mark.cjs +8 -0
  56. package/dist/primitives/brand-mark.d.cts +10 -0
  57. package/dist/primitives/brand-mark.d.ts +10 -0
  58. package/dist/primitives/brand-mark.js +8 -0
  59. package/dist/primitives/branded-page.cjs +201 -0
  60. package/dist/primitives/branded-page.d.cts +118 -0
  61. package/dist/primitives/branded-page.d.ts +118 -0
  62. package/dist/primitives/branded-page.js +201 -0
  63. package/dist/primitives/call-card.cjs +2 -2
  64. package/dist/primitives/call-card.js +3 -3
  65. package/dist/primitives/chat.cjs +21 -21
  66. package/dist/primitives/chat.js +17 -17
  67. package/dist/primitives/command.cjs +129 -0
  68. package/dist/primitives/command.d.cts +60 -0
  69. package/dist/primitives/command.d.ts +60 -0
  70. package/dist/primitives/command.js +129 -0
  71. package/dist/primitives/compact-list.cjs +24 -0
  72. package/dist/primitives/compact-list.d.cts +18 -0
  73. package/dist/primitives/compact-list.d.ts +18 -0
  74. package/dist/primitives/compact-list.js +24 -0
  75. package/dist/primitives/connection.cjs +2 -2
  76. package/dist/primitives/connection.js +2 -2
  77. package/dist/primitives/context-bar.cjs +57 -0
  78. package/dist/primitives/context-bar.d.cts +50 -0
  79. package/dist/primitives/context-bar.d.ts +50 -0
  80. package/dist/primitives/context-bar.js +57 -0
  81. package/dist/primitives/cycling-prompt.cjs +102 -0
  82. package/dist/primitives/cycling-prompt.d.cts +24 -0
  83. package/dist/primitives/cycling-prompt.d.ts +24 -0
  84. package/dist/primitives/cycling-prompt.js +102 -0
  85. package/dist/primitives/dialog.d.cts +9 -9
  86. package/dist/primitives/dialog.d.ts +9 -9
  87. package/dist/primitives/document-preview.cjs +5 -5
  88. package/dist/primitives/document-preview.js +3 -3
  89. package/dist/primitives/dotted-list.cjs +41 -0
  90. package/dist/primitives/dotted-list.d.cts +28 -0
  91. package/dist/primitives/dotted-list.d.ts +28 -0
  92. package/dist/primitives/dotted-list.js +41 -0
  93. package/dist/primitives/drawer.d.cts +6 -6
  94. package/dist/primitives/drawer.d.ts +6 -6
  95. package/dist/primitives/field.cjs +3 -3
  96. package/dist/primitives/field.js +2 -2
  97. package/dist/primitives/file-dropzone.cjs +3 -3
  98. package/dist/primitives/file-dropzone.js +2 -2
  99. package/dist/primitives/file-preview-internals.cjs +4 -4
  100. package/dist/primitives/file-preview-internals.js +3 -3
  101. package/dist/primitives/file-preview.cjs +12 -12
  102. package/dist/primitives/file-preview.js +3 -3
  103. package/dist/primitives/filter-bar.cjs +4 -4
  104. package/dist/primitives/filter-bar.js +3 -3
  105. package/dist/primitives/fixed-action-bar.cjs +9 -0
  106. package/dist/primitives/fixed-action-bar.d.cts +15 -0
  107. package/dist/primitives/fixed-action-bar.d.ts +15 -0
  108. package/dist/primitives/fixed-action-bar.js +9 -0
  109. package/dist/primitives/floating-action-button.cjs +65 -0
  110. package/dist/primitives/floating-action-button.d.cts +52 -0
  111. package/dist/primitives/floating-action-button.d.ts +52 -0
  112. package/dist/primitives/floating-action-button.js +65 -0
  113. package/dist/primitives/form-section.cjs +38 -0
  114. package/dist/primitives/form-section.d.cts +43 -0
  115. package/dist/primitives/form-section.d.ts +43 -0
  116. package/dist/primitives/form-section.js +38 -0
  117. package/dist/primitives/key-value-grid.cjs +52 -0
  118. package/dist/primitives/key-value-grid.d.cts +20 -0
  119. package/dist/primitives/key-value-grid.d.ts +20 -0
  120. package/dist/primitives/key-value-grid.js +52 -0
  121. package/dist/primitives/marketing-footer.cjs +34 -0
  122. package/dist/primitives/marketing-footer.d.cts +29 -0
  123. package/dist/primitives/marketing-footer.d.ts +29 -0
  124. package/dist/primitives/marketing-footer.js +34 -0
  125. package/dist/primitives/marketing-header.cjs +8 -0
  126. package/dist/primitives/marketing-header.d.cts +31 -0
  127. package/dist/primitives/marketing-header.d.ts +31 -0
  128. package/dist/primitives/marketing-header.js +8 -0
  129. package/dist/primitives/marketing-section.cjs +8 -0
  130. package/dist/primitives/marketing-section.d.cts +35 -0
  131. package/dist/primitives/marketing-section.d.ts +35 -0
  132. package/dist/primitives/marketing-section.js +8 -0
  133. package/dist/primitives/marketing-shell.cjs +28 -0
  134. package/dist/primitives/marketing-shell.d.cts +14 -0
  135. package/dist/primitives/marketing-shell.d.ts +14 -0
  136. package/dist/primitives/marketing-shell.js +28 -0
  137. package/dist/primitives/notes.cjs +3 -3
  138. package/dist/primitives/notes.js +3 -3
  139. package/dist/primitives/page-header.cjs +3 -67
  140. package/dist/primitives/page-header.js +3 -67
  141. package/dist/primitives/page-shell.cjs +3 -41
  142. package/dist/primitives/page-shell.js +3 -41
  143. package/dist/primitives/page-tabs.cjs +4 -57
  144. package/dist/primitives/page-tabs.js +4 -57
  145. package/dist/primitives/pager.cjs +85 -0
  146. package/dist/primitives/pager.d.cts +39 -0
  147. package/dist/primitives/pager.d.ts +39 -0
  148. package/dist/primitives/pager.js +85 -0
  149. package/dist/primitives/pagination.cjs +119 -0
  150. package/dist/primitives/pagination.d.cts +41 -0
  151. package/dist/primitives/pagination.d.ts +41 -0
  152. package/dist/primitives/pagination.js +119 -0
  153. package/dist/primitives/poster.cjs +11 -1
  154. package/dist/primitives/poster.d.cts +12 -1
  155. package/dist/primitives/poster.d.ts +12 -1
  156. package/dist/primitives/poster.js +10 -0
  157. package/dist/primitives/resource-list.cjs +7 -7
  158. package/dist/primitives/resource-list.js +6 -6
  159. package/dist/primitives/responsive-dialog.cjs +3 -3
  160. package/dist/primitives/responsive-dialog.js +2 -2
  161. package/dist/primitives/responsive-embed.cjs +29 -0
  162. package/dist/primitives/responsive-embed.d.cts +14 -0
  163. package/dist/primitives/responsive-embed.d.ts +14 -0
  164. package/dist/primitives/responsive-embed.js +29 -0
  165. package/dist/primitives/save-bar.cjs +91 -0
  166. package/dist/primitives/save-bar.d.cts +55 -0
  167. package/dist/primitives/save-bar.d.ts +55 -0
  168. package/dist/primitives/save-bar.js +91 -0
  169. package/dist/primitives/section.cjs +2 -2
  170. package/dist/primitives/section.js +3 -3
  171. package/dist/primitives/settings-list.cjs +10 -0
  172. package/dist/primitives/settings-list.d.cts +31 -0
  173. package/dist/primitives/settings-list.d.ts +31 -0
  174. package/dist/primitives/settings-list.js +10 -0
  175. package/dist/primitives/settings-section.cjs +34 -0
  176. package/dist/primitives/settings-section.d.cts +44 -0
  177. package/dist/primitives/settings-section.d.ts +44 -0
  178. package/dist/primitives/settings-section.js +34 -0
  179. package/dist/primitives/sheet.d.cts +9 -9
  180. package/dist/primitives/sheet.d.ts +9 -9
  181. package/dist/primitives/short-video.cjs +110 -0
  182. package/dist/primitives/short-video.d.cts +30 -0
  183. package/dist/primitives/short-video.d.ts +30 -0
  184. package/dist/primitives/short-video.js +110 -0
  185. package/dist/primitives/stats-card.cjs +46 -0
  186. package/dist/primitives/stats-card.d.cts +19 -0
  187. package/dist/primitives/stats-card.d.ts +19 -0
  188. package/dist/primitives/stats-card.js +46 -0
  189. package/dist/primitives/stats-strip.cjs +38 -0
  190. package/dist/primitives/stats-strip.d.cts +24 -0
  191. package/dist/primitives/stats-strip.d.ts +24 -0
  192. package/dist/primitives/stats-strip.js +38 -0
  193. package/dist/primitives/step-list.cjs +32 -0
  194. package/dist/primitives/step-list.d.cts +19 -0
  195. package/dist/primitives/step-list.d.ts +19 -0
  196. package/dist/primitives/step-list.js +32 -0
  197. package/dist/primitives/steps.cjs +77 -0
  198. package/dist/primitives/steps.d.cts +35 -0
  199. package/dist/primitives/steps.d.ts +35 -0
  200. package/dist/primitives/steps.js +77 -0
  201. package/dist/primitives/switch-field.cjs +3 -3
  202. package/dist/primitives/switch-field.js +3 -3
  203. package/dist/primitives/tabbed-page-header.cjs +53 -0
  204. package/dist/primitives/tabbed-page-header.d.cts +26 -0
  205. package/dist/primitives/tabbed-page-header.d.ts +26 -0
  206. package/dist/primitives/tabbed-page-header.js +53 -0
  207. package/dist/primitives/theme-selector.cjs +15 -15
  208. package/dist/primitives/theme-selector.js +2 -2
  209. package/dist/primitives/voice-dictation-button.cjs +3 -3
  210. package/dist/primitives/voice-dictation-button.js +2 -2
  211. package/dist/primitives/voice-session-controls.cjs +3 -3
  212. package/dist/primitives/voice-session-controls.js +2 -2
  213. package/dist/primitives/workflow-assistant.cjs +4 -4
  214. package/dist/primitives/workflow-assistant.js +2 -2
  215. package/package.json +322 -1
  216. package/src/styles/components/poster.css +42 -1
  217. package/dist/{chunk-PH2TV7XI.cjs → chunk-2YW5VA2V.cjs} +2 -2
  218. package/dist/{chunk-UFFHGKI7.js → chunk-6LB37JWO.js} +8 -8
  219. package/dist/{chunk-AO56ET4F.cjs → chunk-BTHYGHOH.cjs} +2 -2
  220. package/dist/{chunk-WHDHUYS6.js → chunk-HBRVOGLA.js} +3 -3
  221. package/dist/{chunk-6O3DUMF7.js → chunk-HTUYUMAH.js} +3 -3
  222. package/dist/{chunk-PNI354BY.cjs → chunk-JMNDFISN.cjs} +2 -2
  223. package/dist/{chunk-CRZ4INEJ.js → chunk-JTI4244T.js} +10 -10
  224. package/dist/{chunk-ZGTPNSR7.js → chunk-NNEV5RHQ.js} +3 -3
  225. package/dist/{chunk-TWCJMFST.js → chunk-O42YC6ZQ.js} +3 -3
  226. package/dist/{chunk-MW67PHAQ.cjs → chunk-S2IMM37Q.cjs} +6 -6
  227. package/dist/{chunk-ZJFYOXSM.cjs → chunk-SRVRNHCX.cjs} +2 -2
  228. package/dist/{chunk-ZLEM2SAU.cjs → chunk-Z3JJSNR5.cjs} +2 -2
@@ -0,0 +1,118 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { LucideIcon } from 'lucide-react';
3
+ import { ReactElement, ReactNode } from 'react';
4
+ import { AccentThemeColours } from './accent-theme.cjs';
5
+
6
+ /** Whose page it is: the company that shares it, not the product that hosts it. */
7
+ interface BrandedPageBrand {
8
+ /** The brand's name. Drawn as text when there is no logo, and the logo's text alternative when there is. */
9
+ name?: string | null;
10
+ /** The brand's logo, an image URL, drawn in place of the name. */
11
+ logoUrl?: string | null;
12
+ /** The logo's text alternative. Defaults to the brand's `name`, else "Logo". */
13
+ logoAlt?: string;
14
+ /** Where the brand leads, such as its own site. Left out, the brand is not a link. */
15
+ href?: string | null;
16
+ }
17
+ /** The fixed bar at the foot of the page, for its one or two actions. */
18
+ interface BrandedPageActionBar {
19
+ /** What the actions are about, beside them. */
20
+ title?: ReactNode;
21
+ /** One muted line under the title. */
22
+ description?: ReactNode;
23
+ /** The page's one or two actions. */
24
+ actions: ReactNode;
25
+ /** `full` gives the actions the bar's whole width, for a host that lays out both ends of it. Defaults to `auto`. */
26
+ actionsWidth?: "auto" | "full";
27
+ }
28
+ /** Why a link leads nowhere. */
29
+ type BrandedPageUnavailableReason = "not-found" | "expired" | "archived" | "revoked";
30
+ interface BrandedPageUnavailableProps {
31
+ /**
32
+ * Why the link is dead: it picks the icon and the words. Defaults to
33
+ * `not-found`, which is worded for a link whose fate the host can't tell.
34
+ */
35
+ reason?: BrandedPageUnavailableReason;
36
+ /**
37
+ * In place of the reason's icon, and decorative like it: a Lucide
38
+ * component, or an element. Pass an element from a server component.
39
+ */
40
+ icon?: LucideIcon | ReactNode;
41
+ /** In place of the reason's title. It is the state's heading. */
42
+ title?: string;
43
+ /** In place of the reason's description. `""` leaves it out. */
44
+ description?: string;
45
+ /** What the visitor can do next: the host's own button or link. */
46
+ action?: ReactNode;
47
+ className?: string;
48
+ }
49
+ interface BrandedPageLoadingProps {
50
+ /** What is happening, under the spinner. Defaults to "Loading…". */
51
+ label?: string;
52
+ className?: string;
53
+ }
54
+ interface BrandedPageProps {
55
+ /**
56
+ * Whose page it is: the brand's `name`, `logoUrl` and `href`, or the
57
+ * host's own element (its wordmark, or its router's link around one).
58
+ * Nothing is drawn for a brand with neither a logo nor a name.
59
+ */
60
+ brand?: BrandedPageBrand | ReactElement | null;
61
+ /** The brand's accent as six-digit hex, for light and dark mode. It replaces the primary colour inside the page only. */
62
+ accent?: AccentThemeColours | null;
63
+ /**
64
+ * Pins the page to one palette (its `data-theme` value), so it looks the
65
+ * same to every visitor whatever palette their own browser has stored.
66
+ * Left out, the page follows the document.
67
+ */
68
+ palette?: string;
69
+ /** The host's own controls at the end of the header, such as a theme switch or Sign in. Left off paper. */
70
+ headerTrailing?: ReactNode;
71
+ /** How wide the content column is. Defaults to `narrow`. */
72
+ width?: "narrow" | "wide" | "full";
73
+ /** The content's side padding. Defaults to `base`, which lines up with the header. */
74
+ padding?: "none" | "base" | "relaxed" | "spacious";
75
+ /** The canvas behind the content: `muted` (the default) sets cards apart, `default` is the plain background. Paper is always plain. */
76
+ surface?: "default" | "muted";
77
+ /** The page's content. Not drawn while `loading` or `unavailable` stands in for it. */
78
+ children?: ReactNode;
79
+ /** A closing line under the content, such as "Shared by Example Agency". */
80
+ credit?: ReactNode;
81
+ /** Whether the credit prints. Defaults to `visible`. */
82
+ creditPrintVisibility?: "visible" | "hidden";
83
+ /** A fixed bar at the foot of the page. Left off paper, and not drawn while `loading` or `unavailable`. */
84
+ actionBar?: BrandedPageActionBar | null;
85
+ /** Stands in for the content while it loads: `true`, or the loading state's props. It wins over `unavailable`. */
86
+ loading?: boolean | BrandedPageLoadingProps;
87
+ /** Stands in for the content when the link is dead: `true`, or the unavailable state's props. */
88
+ unavailable?: boolean | BrandedPageUnavailableProps;
89
+ className?: string;
90
+ }
91
+ /**
92
+ * A dead link, in place of a page's content: an icon, a heading, a line on
93
+ * what to do and an optional action. It is announced when it appears, since
94
+ * it often replaces a loading state. Use it as `BrandedPage`'s `unavailable`,
95
+ * or alone inside a frame of your own.
96
+ */
97
+ declare function BrandedPageUnavailable({ reason, icon, title, description, action, className, }: BrandedPageUnavailableProps): react_jsx_runtime.JSX.Element;
98
+ /**
99
+ * A page that is still loading, in place of its content: a spinner over one
100
+ * line, announced politely. Use it as `BrandedPage`'s `loading`, or alone
101
+ * inside a frame of your own.
102
+ */
103
+ declare function BrandedPageLoading({ label, className }: BrandedPageLoadingProps): react_jsx_runtime.JSX.Element;
104
+ /**
105
+ * The whole of a public page one company shows to another's people: a shared
106
+ * profile, a list sent for review, an invitation, a client's portal. The
107
+ * brand in a header (a banner), the content in one `main`, and optionally a
108
+ * closing credit and a fixed action bar, in the brand's accent and, when
109
+ * pinned, in one palette for every visitor. `loading` and `unavailable`
110
+ * stand in for the content, so the frame holds still while a link resolves.
111
+ *
112
+ * Presentation only: the host fetches, routes and decides which state shows.
113
+ * On paper the canvas is plain, the spacing compact, and the header's
114
+ * controls and the action bar are left off.
115
+ */
116
+ declare function BrandedPage({ brand, accent, palette, headerTrailing, width, padding, surface, children, credit, creditPrintVisibility, actionBar, loading, unavailable, className, }: BrandedPageProps): react_jsx_runtime.JSX.Element;
117
+
118
+ export { BrandedPage, type BrandedPageActionBar, type BrandedPageBrand, BrandedPageLoading, type BrandedPageLoadingProps, type BrandedPageProps, BrandedPageUnavailable, type BrandedPageUnavailableProps, type BrandedPageUnavailableReason };
@@ -0,0 +1,118 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { LucideIcon } from 'lucide-react';
3
+ import { ReactElement, ReactNode } from 'react';
4
+ import { AccentThemeColours } from './accent-theme.js';
5
+
6
+ /** Whose page it is: the company that shares it, not the product that hosts it. */
7
+ interface BrandedPageBrand {
8
+ /** The brand's name. Drawn as text when there is no logo, and the logo's text alternative when there is. */
9
+ name?: string | null;
10
+ /** The brand's logo, an image URL, drawn in place of the name. */
11
+ logoUrl?: string | null;
12
+ /** The logo's text alternative. Defaults to the brand's `name`, else "Logo". */
13
+ logoAlt?: string;
14
+ /** Where the brand leads, such as its own site. Left out, the brand is not a link. */
15
+ href?: string | null;
16
+ }
17
+ /** The fixed bar at the foot of the page, for its one or two actions. */
18
+ interface BrandedPageActionBar {
19
+ /** What the actions are about, beside them. */
20
+ title?: ReactNode;
21
+ /** One muted line under the title. */
22
+ description?: ReactNode;
23
+ /** The page's one or two actions. */
24
+ actions: ReactNode;
25
+ /** `full` gives the actions the bar's whole width, for a host that lays out both ends of it. Defaults to `auto`. */
26
+ actionsWidth?: "auto" | "full";
27
+ }
28
+ /** Why a link leads nowhere. */
29
+ type BrandedPageUnavailableReason = "not-found" | "expired" | "archived" | "revoked";
30
+ interface BrandedPageUnavailableProps {
31
+ /**
32
+ * Why the link is dead: it picks the icon and the words. Defaults to
33
+ * `not-found`, which is worded for a link whose fate the host can't tell.
34
+ */
35
+ reason?: BrandedPageUnavailableReason;
36
+ /**
37
+ * In place of the reason's icon, and decorative like it: a Lucide
38
+ * component, or an element. Pass an element from a server component.
39
+ */
40
+ icon?: LucideIcon | ReactNode;
41
+ /** In place of the reason's title. It is the state's heading. */
42
+ title?: string;
43
+ /** In place of the reason's description. `""` leaves it out. */
44
+ description?: string;
45
+ /** What the visitor can do next: the host's own button or link. */
46
+ action?: ReactNode;
47
+ className?: string;
48
+ }
49
+ interface BrandedPageLoadingProps {
50
+ /** What is happening, under the spinner. Defaults to "Loading…". */
51
+ label?: string;
52
+ className?: string;
53
+ }
54
+ interface BrandedPageProps {
55
+ /**
56
+ * Whose page it is: the brand's `name`, `logoUrl` and `href`, or the
57
+ * host's own element (its wordmark, or its router's link around one).
58
+ * Nothing is drawn for a brand with neither a logo nor a name.
59
+ */
60
+ brand?: BrandedPageBrand | ReactElement | null;
61
+ /** The brand's accent as six-digit hex, for light and dark mode. It replaces the primary colour inside the page only. */
62
+ accent?: AccentThemeColours | null;
63
+ /**
64
+ * Pins the page to one palette (its `data-theme` value), so it looks the
65
+ * same to every visitor whatever palette their own browser has stored.
66
+ * Left out, the page follows the document.
67
+ */
68
+ palette?: string;
69
+ /** The host's own controls at the end of the header, such as a theme switch or Sign in. Left off paper. */
70
+ headerTrailing?: ReactNode;
71
+ /** How wide the content column is. Defaults to `narrow`. */
72
+ width?: "narrow" | "wide" | "full";
73
+ /** The content's side padding. Defaults to `base`, which lines up with the header. */
74
+ padding?: "none" | "base" | "relaxed" | "spacious";
75
+ /** The canvas behind the content: `muted` (the default) sets cards apart, `default` is the plain background. Paper is always plain. */
76
+ surface?: "default" | "muted";
77
+ /** The page's content. Not drawn while `loading` or `unavailable` stands in for it. */
78
+ children?: ReactNode;
79
+ /** A closing line under the content, such as "Shared by Example Agency". */
80
+ credit?: ReactNode;
81
+ /** Whether the credit prints. Defaults to `visible`. */
82
+ creditPrintVisibility?: "visible" | "hidden";
83
+ /** A fixed bar at the foot of the page. Left off paper, and not drawn while `loading` or `unavailable`. */
84
+ actionBar?: BrandedPageActionBar | null;
85
+ /** Stands in for the content while it loads: `true`, or the loading state's props. It wins over `unavailable`. */
86
+ loading?: boolean | BrandedPageLoadingProps;
87
+ /** Stands in for the content when the link is dead: `true`, or the unavailable state's props. */
88
+ unavailable?: boolean | BrandedPageUnavailableProps;
89
+ className?: string;
90
+ }
91
+ /**
92
+ * A dead link, in place of a page's content: an icon, a heading, a line on
93
+ * what to do and an optional action. It is announced when it appears, since
94
+ * it often replaces a loading state. Use it as `BrandedPage`'s `unavailable`,
95
+ * or alone inside a frame of your own.
96
+ */
97
+ declare function BrandedPageUnavailable({ reason, icon, title, description, action, className, }: BrandedPageUnavailableProps): react_jsx_runtime.JSX.Element;
98
+ /**
99
+ * A page that is still loading, in place of its content: a spinner over one
100
+ * line, announced politely. Use it as `BrandedPage`'s `loading`, or alone
101
+ * inside a frame of your own.
102
+ */
103
+ declare function BrandedPageLoading({ label, className }: BrandedPageLoadingProps): react_jsx_runtime.JSX.Element;
104
+ /**
105
+ * The whole of a public page one company shows to another's people: a shared
106
+ * profile, a list sent for review, an invitation, a client's portal. The
107
+ * brand in a header (a banner), the content in one `main`, and optionally a
108
+ * closing credit and a fixed action bar, in the brand's accent and, when
109
+ * pinned, in one palette for every visitor. `loading` and `unavailable`
110
+ * stand in for the content, so the frame holds still while a link resolves.
111
+ *
112
+ * Presentation only: the host fetches, routes and decides which state shows.
113
+ * On paper the canvas is plain, the spacing compact, and the header's
114
+ * controls and the action bar are left off.
115
+ */
116
+ declare function BrandedPage({ brand, accent, palette, headerTrailing, width, padding, surface, children, credit, creditPrintVisibility, actionBar, loading, unavailable, className, }: BrandedPageProps): react_jsx_runtime.JSX.Element;
117
+
118
+ export { BrandedPage, type BrandedPageActionBar, type BrandedPageBrand, BrandedPageLoading, type BrandedPageLoadingProps, type BrandedPageProps, BrandedPageUnavailable, type BrandedPageUnavailableProps, type BrandedPageUnavailableReason };
@@ -0,0 +1,201 @@
1
+ "use client";
2
+ import {
3
+ PageShell
4
+ } from "../chunk-WTVL2FK7.js";
5
+ import {
6
+ MarketingHeader
7
+ } from "../chunk-W5L6LQI3.js";
8
+ import {
9
+ FixedActionBar
10
+ } from "../chunk-WMTCL463.js";
11
+ import {
12
+ Text
13
+ } from "../chunk-EIY5LLSP.js";
14
+ import {
15
+ Heading
16
+ } from "../chunk-H2O6NMLZ.js";
17
+ import {
18
+ BrandMark
19
+ } from "../chunk-O3G3TVPU.js";
20
+ import {
21
+ Anchor
22
+ } from "../chunk-EXHF3QUY.js";
23
+ import {
24
+ Icon
25
+ } from "../chunk-KN4RPX35.js";
26
+ import {
27
+ AccentTheme
28
+ } from "../chunk-BB7PO2BW.js";
29
+ import {
30
+ EmptyState
31
+ } from "../chunk-ET4THLFX.js";
32
+ import "../chunk-W326GKML.js";
33
+ import {
34
+ cn
35
+ } from "../chunk-G6SRSWXB.js";
36
+
37
+ // src/primitives/branded-page.tsx
38
+ import { Archive, Clock, EyeOff, Link2Off, LoaderCircle } from "lucide-react";
39
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
40
+ var UNAVAILABLE = {
41
+ "not-found": {
42
+ icon: Link2Off,
43
+ title: "This link isn't available",
44
+ description: "It may have expired or been withdrawn. Ask whoever shared it for a new one."
45
+ },
46
+ expired: {
47
+ icon: Clock,
48
+ title: "This link has expired",
49
+ description: "Ask whoever shared it for a new one."
50
+ },
51
+ archived: {
52
+ icon: Archive,
53
+ title: "This page has been archived",
54
+ description: "It is no longer shared. Ask whoever shared it if you still need it."
55
+ },
56
+ revoked: {
57
+ icon: EyeOff,
58
+ title: "This link is no longer active",
59
+ description: "Whoever shared it has stopped sharing it. Ask them for a new one if you still need it."
60
+ }
61
+ };
62
+ function StateIcon({ icon, spin }) {
63
+ return /* @__PURE__ */ jsx(Icon, { icon, tone: "muted", strokeWidth: 1.5, spin, className: "size-12" });
64
+ }
65
+ function BrandedPageUnavailable({
66
+ reason = "not-found",
67
+ icon,
68
+ title,
69
+ description,
70
+ action,
71
+ className
72
+ }) {
73
+ const words = UNAVAILABLE[reason];
74
+ return /* @__PURE__ */ jsx(
75
+ EmptyState,
76
+ {
77
+ variant: "error",
78
+ size: "lg",
79
+ surface: "plain",
80
+ icon: icon ?? /* @__PURE__ */ jsx(StateIcon, { icon: words.icon }),
81
+ title: title || words.title,
82
+ description: description ?? words.description,
83
+ className,
84
+ children: action ? /* @__PURE__ */ jsx("div", { "data-slot": "branded-page-unavailable-action", className: "flex flex-wrap justify-center gap-2 pt-1", children: action }) : null
85
+ }
86
+ );
87
+ }
88
+ function BrandedPageLoading({ label, className }) {
89
+ return /* @__PURE__ */ jsx("div", { role: "status", "data-slot": "branded-page-loading", className, children: /* @__PURE__ */ jsx(
90
+ EmptyState,
91
+ {
92
+ icon: /* @__PURE__ */ jsx(StateIcon, { icon: LoaderCircle, spin: true }),
93
+ size: "lg",
94
+ surface: "plain",
95
+ title: label || "Loading\u2026"
96
+ }
97
+ ) });
98
+ }
99
+ function isBrandData(brand) {
100
+ return typeof brand === "object" && brand !== null && !("$$typeof" in brand);
101
+ }
102
+ function brandMark({ name, logoUrl, logoAlt, href }) {
103
+ const mark = logoUrl ? /* @__PURE__ */ jsx(BrandMark, { src: logoUrl, alt: logoAlt ?? (name || "Logo") }) : name ? /* @__PURE__ */ jsx(Heading, { level: 3, as: "span", children: name }) : null;
104
+ if (!mark || !href) return mark;
105
+ return /* @__PURE__ */ jsx(
106
+ Anchor,
107
+ {
108
+ href,
109
+ "data-slot": "branded-page-brand-link",
110
+ className: "rounded-sm ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-4",
111
+ children: mark
112
+ }
113
+ );
114
+ }
115
+ function BrandedPage({
116
+ brand,
117
+ accent,
118
+ palette,
119
+ headerTrailing,
120
+ width = "narrow",
121
+ padding = "base",
122
+ surface = "muted",
123
+ children,
124
+ credit,
125
+ creditPrintVisibility = "visible",
126
+ actionBar,
127
+ loading = false,
128
+ unavailable = false,
129
+ className
130
+ }) {
131
+ const mark = isBrandData(brand) ? brandMark(brand) : brand ?? null;
132
+ const state = loading ? /* @__PURE__ */ jsx(BrandedPageLoading, { ...loading === true ? null : loading }) : unavailable ? /* @__PURE__ */ jsx(BrandedPageUnavailable, { ...unavailable === true ? null : unavailable }) : null;
133
+ const bar = state ? null : actionBar;
134
+ return (
135
+ // The palette is pinned out here, and the canvas painted opaque in it:
136
+ // the muted surface is translucent, and would otherwise be tinted by
137
+ // the visitor's own palette on the document behind it.
138
+ /* @__PURE__ */ jsx("div", { "data-slot": "branded-page", "data-theme": palette, className: cn("bg-background text-foreground", className), children: /* @__PURE__ */ jsx(AccentTheme, { colours: accent, children: /* @__PURE__ */ jsxs(
139
+ "div",
140
+ {
141
+ "data-slot": "branded-page-surface",
142
+ className: cn(
143
+ "flex min-h-screen flex-col print:min-h-0",
144
+ surface === "muted" && "bg-muted/40 print:bg-background"
145
+ ),
146
+ children: [
147
+ mark || headerTrailing ? /* @__PURE__ */ jsx(
148
+ MarketingHeader,
149
+ {
150
+ brand: mark,
151
+ trailing: headerTrailing ? /* @__PURE__ */ jsx("div", { className: "contents print:hidden", children: headerTrailing }) : void 0
152
+ }
153
+ ) : null,
154
+ /* @__PURE__ */ jsx(
155
+ PageShell,
156
+ {
157
+ width,
158
+ padding,
159
+ printMode: "compact",
160
+ bottomInset: bar ? "action" : "default",
161
+ className: bar ? "print:pb-0" : void 0,
162
+ children: state ? (
163
+ // Both states start at the same height, a little way down the
164
+ // screen, so nothing jumps when loading turns out to be a dead link.
165
+ /* @__PURE__ */ jsx("div", { "data-slot": "branded-page-state", className: "pt-[12vh]", children: state })
166
+ ) : /* @__PURE__ */ jsxs(Fragment, { children: [
167
+ children,
168
+ credit ? /* @__PURE__ */ jsx(
169
+ Text,
170
+ {
171
+ variant: "caption",
172
+ align: "center",
173
+ "data-slot": "branded-page-credit",
174
+ className: cn(creditPrintVisibility === "hidden" && "print:hidden"),
175
+ children: credit
176
+ }
177
+ ) : null
178
+ ] })
179
+ }
180
+ ),
181
+ bar ? /* @__PURE__ */ jsx(
182
+ FixedActionBar,
183
+ {
184
+ title: bar.title,
185
+ description: bar.description,
186
+ width,
187
+ actionsWidth: bar.actionsWidth,
188
+ className: "print:hidden",
189
+ children: bar.actions
190
+ }
191
+ ) : null
192
+ ]
193
+ }
194
+ ) }) })
195
+ );
196
+ }
197
+ export {
198
+ BrandedPage,
199
+ BrandedPageLoading,
200
+ BrandedPageUnavailable
201
+ };
@@ -5,12 +5,12 @@
5
5
  var _chunk6T2EULKNcjs = require('../chunk-6T2EULKN.cjs');
6
6
 
7
7
 
8
- var _chunk373W6VADcjs = require('../chunk-373W6VAD.cjs');
9
8
 
10
9
 
10
+ var _chunkW5HPHEE7cjs = require('../chunk-W5HPHEE7.cjs');
11
11
 
12
12
 
13
- var _chunkW5HPHEE7cjs = require('../chunk-W5HPHEE7.cjs');
13
+ var _chunk373W6VADcjs = require('../chunk-373W6VAD.cjs');
14
14
 
15
15
 
16
16
 
@@ -3,14 +3,14 @@
3
3
  import {
4
4
  Eyebrow
5
5
  } from "../chunk-LIE6W3QT.js";
6
- import {
7
- Text
8
- } from "../chunk-EIY5LLSP.js";
9
6
  import {
10
7
  Collapsible,
11
8
  CollapsibleContent,
12
9
  CollapsibleTrigger
13
10
  } from "../chunk-NBUWGRQO.js";
11
+ import {
12
+ Text
13
+ } from "../chunk-EIY5LLSP.js";
14
14
  import {
15
15
  Avatar,
16
16
  AvatarFallback,
@@ -7,10 +7,10 @@
7
7
  var _chunk2BTDBZYNcjs = require('../chunk-2BTDBZYN.cjs');
8
8
 
9
9
 
10
- var _chunkPH2TV7XIcjs = require('../chunk-PH2TV7XI.cjs');
10
+ var _chunk2YW5VA2Vcjs = require('../chunk-2YW5VA2V.cjs');
11
11
 
12
12
 
13
- var _chunkPNI354BYcjs = require('../chunk-PNI354BY.cjs');
13
+ var _chunkJMNDFISNcjs = require('../chunk-JMNDFISN.cjs');
14
14
 
15
15
 
16
16
 
@@ -24,31 +24,30 @@ var _chunkWP7CKIPEcjs = require('../chunk-WP7CKIPE.cjs');
24
24
 
25
25
 
26
26
 
27
- var _chunkB765DSRGcjs = require('../chunk-B765DSRG.cjs');
28
27
 
29
28
 
29
+ var _chunkNWDPH2Z7cjs = require('../chunk-NWDPH2Z7.cjs');
30
30
 
31
31
 
32
32
 
33
- var _chunkNWDPH2Z7cjs = require('../chunk-NWDPH2Z7.cjs');
33
+ var _chunkB765DSRGcjs = require('../chunk-B765DSRG.cjs');
34
34
 
35
35
 
36
36
 
37
37
 
38
- var _chunk7LDJAXRXcjs = require('../chunk-7LDJAXRX.cjs');
39
- require('../chunk-2HV2KKOE.cjs');
40
38
 
41
39
 
40
+ var _chunkDHXKCMKYcjs = require('../chunk-DHXKCMKY.cjs');
42
41
 
43
42
 
44
43
 
45
44
 
46
- var _chunkDHXKCMKYcjs = require('../chunk-DHXKCMKY.cjs');
47
- require('../chunk-NQK5ZWC7.cjs');
45
+ var _chunk7LDJAXRXcjs = require('../chunk-7LDJAXRX.cjs');
46
+ require('../chunk-2HV2KKOE.cjs');
48
47
 
49
48
 
50
49
 
51
- var _chunkZLEM2SAUcjs = require('../chunk-ZLEM2SAU.cjs');
50
+ var _chunkZ3JJSNR5cjs = require('../chunk-Z3JJSNR5.cjs');
52
51
 
53
52
 
54
53
  var _chunkKENBU3NVcjs = require('../chunk-KENBU3NV.cjs');
@@ -80,13 +79,12 @@ var _chunkZBWL7OUWcjs = require('../chunk-ZBWL7OUW.cjs');
80
79
  var _chunk23IETCLVcjs = require('../chunk-23IETCLV.cjs');
81
80
  require('../chunk-DMPSKGFM.cjs');
82
81
  require('../chunk-Z2H4LJVG.cjs');
83
- require('../chunk-U2NES7VR.cjs');
84
82
 
85
83
 
86
84
 
87
85
  var _chunkV4YWTRLDcjs = require('../chunk-V4YWTRLD.cjs');
88
- require('../chunk-373W6VAD.cjs');
89
86
  require('../chunk-W5HPHEE7.cjs');
87
+ require('../chunk-373W6VAD.cjs');
90
88
 
91
89
 
92
90
 
@@ -98,15 +96,17 @@ require('../chunk-W5HPHEE7.cjs');
98
96
 
99
97
 
100
98
  var _chunkFYRQFEU4cjs = require('../chunk-FYRQFEU4.cjs');
99
+ require('../chunk-NQK5ZWC7.cjs');
100
+ require('../chunk-U2NES7VR.cjs');
101
101
 
102
102
 
103
103
  var _chunk2KFZQJH5cjs = require('../chunk-2KFZQJH5.cjs');
104
- require('../chunk-PQUSJEXL.cjs');
105
104
  require('../chunk-WABCLRBR.cjs');
106
- require('../chunk-NKWHDI4C.cjs');
105
+ require('../chunk-PQUSJEXL.cjs');
107
106
 
108
107
 
109
108
  var _chunkJDEXZGIYcjs = require('../chunk-JDEXZGIY.cjs');
109
+ require('../chunk-NKWHDI4C.cjs');
110
110
 
111
111
 
112
112
  var _chunkKWLSBTB2cjs = require('../chunk-KWLSBTB2.cjs');
@@ -541,7 +541,7 @@ function ChatInput({
541
541
  children: header
542
542
  }
543
543
  ),
544
- liveVoiceActive && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7LDJAXRXcjs.InputGroupAddon, { align: "block-start", className: "w-full cursor-default border-b border-border p-0 [.border-b]:pb-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPNI354BYcjs.VoiceSessionControls, { ...voiceSession }) }),
544
+ liveVoiceActive && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7LDJAXRXcjs.InputGroupAddon, { align: "block-start", className: "w-full cursor-default border-b border-border p-0 [.border-b]:pb-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJMNDFISNcjs.VoiceSessionControls, { ...voiceSession }) }),
545
545
  attachments.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
546
546
  ChatAttachmentList,
547
547
  {
@@ -620,7 +620,7 @@ function ChatInput({
620
620
  ) : null,
621
621
  (!helperText || compact) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1" }),
622
622
  voice && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
623
- _chunkPH2TV7XIcjs.VoiceDictationButton,
623
+ _chunk2YW5VA2Vcjs.VoiceDictationButton,
624
624
  {
625
625
  size: "icon",
626
626
  title: voiceTitle,
@@ -634,7 +634,7 @@ function ChatInput({
634
634
  )
635
635
  }
636
636
  ),
637
- voiceSession && !liveVoiceActive && !hasText && attachments.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPNI354BYcjs.VoiceSessionControls, { ...voiceSession, disabled: voiceSession.disabled || isDisabled }) : submitLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
637
+ voiceSession && !liveVoiceActive && !hasText && attachments.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJMNDFISNcjs.VoiceSessionControls, { ...voiceSession, disabled: voiceSession.disabled || isDisabled }) : submitLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
638
638
  _chunkJDEXZGIYcjs.Button,
639
639
  {
640
640
  type: "submit",
@@ -696,9 +696,9 @@ function VoiceHero({
696
696
  }) {
697
697
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center gap-5 py-6", children: [
698
698
  voiceSession ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
699
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPNI354BYcjs.VoiceSessionControls, { ...voiceSession, size: "hero" }),
699
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJMNDFISNcjs.VoiceSessionControls, { ...voiceSession, size: "hero" }),
700
700
  voice && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
701
- _chunkPH2TV7XIcjs.VoiceDictationButton,
701
+ _chunk2YW5VA2Vcjs.VoiceDictationButton,
702
702
  {
703
703
  size: "icon",
704
704
  title: voiceTitle,
@@ -708,7 +708,7 @@ function VoiceHero({
708
708
  }
709
709
  )
710
710
  ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
711
- _chunkPH2TV7XIcjs.VoiceDictationButton,
711
+ _chunk2YW5VA2Vcjs.VoiceDictationButton,
712
712
  {
713
713
  size: "lg",
714
714
  title: voiceTitle,
@@ -1150,7 +1150,7 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
1150
1150
  const liveVoiceActive = voiceSession && voiceSession.state !== "disconnected" && voiceSession.state !== "error";
1151
1151
  const showEmptyPending = !conversationStarted && pending && Boolean(emptyPendingContent) && !liveVoiceActive;
1152
1152
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1153
- _chunkZLEM2SAUcjs.FileDropArea,
1153
+ _chunkZ3JJSNR5cjs.FileDropArea,
1154
1154
  {
1155
1155
  "data-slot": "chat",
1156
1156
  "data-layout": layout,
@@ -1218,7 +1218,7 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
1218
1218
  ),
1219
1219
  children: [
1220
1220
  showEmptyFileDropzone && onFilesSelected && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1221
- _chunkZLEM2SAUcjs.FileDropzone,
1221
+ _chunkZ3JJSNR5cjs.FileDropzone,
1222
1222
  {
1223
1223
  multiple: true,
1224
1224
  onFiles: onFilesSelected,