@hraness/design-kit 0.31.1

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 (345) hide show
  1. package/ARTICLE_COPY.md +208 -0
  2. package/HERO_FIELDS.md +55 -0
  3. package/ICONS.md +56 -0
  4. package/LANTERN_MATERIAL.md +60 -0
  5. package/LICENSE +21 -0
  6. package/MARKETING_COPY.md +49 -0
  7. package/MARKETING_PRESET.md +108 -0
  8. package/PALETTES.md +90 -0
  9. package/PAPER_THEME.md +128 -0
  10. package/README.md +745 -0
  11. package/STATUS_PAGES.md +67 -0
  12. package/STYLE.md +245 -0
  13. package/WRITING.md +72 -0
  14. package/dist/browser/index.js +2345 -0
  15. package/dist/chunk-44djxk16.js +6872 -0
  16. package/dist/chunk-5gtx3pza.js +9 -0
  17. package/dist/chunk-77391vmq.js +454 -0
  18. package/dist/chunk-7b1586eb.js +1209 -0
  19. package/dist/chunk-8834fh4n.js +6 -0
  20. package/dist/chunk-9t8xyqte.js +870 -0
  21. package/dist/chunk-cejpzyfh.js +446 -0
  22. package/dist/chunk-eh71jz57.js +429 -0
  23. package/dist/chunk-evb02bc1.js +516 -0
  24. package/dist/chunk-h4k7yv6x.js +368 -0
  25. package/dist/chunk-he8eznb1.js +760 -0
  26. package/dist/chunk-mr1vdcjq.js +404 -0
  27. package/dist/chunk-wzvdn8ey.js +116 -0
  28. package/dist/fonts/nebula-sans/social-fonts.generated.js +53 -0
  29. package/dist/icons.js +48 -0
  30. package/dist/index.js +237 -0
  31. package/dist/launch.js +41 -0
  32. package/dist/mockups/client.js +422 -0
  33. package/dist/mockups/index.js +1850 -0
  34. package/dist/portfolio.js +1549 -0
  35. package/dist/provider-marks.js +19 -0
  36. package/dist/react/charts.js +11 -0
  37. package/dist/react/hero-backdrop.js +8 -0
  38. package/dist/react/index.js +7252 -0
  39. package/dist/react/platform-install.js +10 -0
  40. package/dist/react/server.js +137 -0
  41. package/dist/stylex-manifest.json +1 -0
  42. package/dist/stylex.css +5392 -0
  43. package/dist/syntax-highlighting.js +15 -0
  44. package/dist/testing.js +250 -0
  45. package/package.json +377 -0
  46. package/portfolio-inventory.json +31 -0
  47. package/scripts/check-lantern-material-snapshot.d.mts +26 -0
  48. package/scripts/check-lantern-material-snapshot.mjs +126 -0
  49. package/scripts/check-marketing-snapshot.d.mts +12 -0
  50. package/scripts/check-marketing-snapshot.mjs +58 -0
  51. package/scripts/lantern-material-snapshot.ts +101 -0
  52. package/scripts/marketing-textures.ts +48 -0
  53. package/scripts/paper-theme-snapshot.ts +97 -0
  54. package/scripts/product-marketing-snapshot.ts +149 -0
  55. package/src/appearance-menu.css +266 -0
  56. package/src/appearance.ts +32 -0
  57. package/src/article-html.ts +269 -0
  58. package/src/article.ts +686 -0
  59. package/src/browser/appearance-menu.ts +604 -0
  60. package/src/browser/artifact-share.ts +164 -0
  61. package/src/browser/design-palette.ts +197 -0
  62. package/src/browser/foil.ts +124 -0
  63. package/src/browser/hero-light.ts +11 -0
  64. package/src/browser/index.ts +29 -0
  65. package/src/browser/status-field.ts +432 -0
  66. package/src/browser/status-page.ts +100 -0
  67. package/src/browser/sticky-offset.ts +82 -0
  68. package/src/browser/theme-color-sync.ts +213 -0
  69. package/src/charts.css +7 -0
  70. package/src/compiler-components.css +34 -0
  71. package/src/compiler-foundation.css +18 -0
  72. package/src/compiler-palettes.css +7 -0
  73. package/src/compiler-tokens.css +342 -0
  74. package/src/components.css +3 -0
  75. package/src/design-gallery.css +431 -0
  76. package/src/effects.css +14 -0
  77. package/src/fonts/geist-mono/GeistMono[wght].woff2 +0 -0
  78. package/src/fonts/geist-mono/OFL.txt +93 -0
  79. package/src/fonts/geist-mono/PROVENANCE.md +12 -0
  80. package/src/fonts/instrument-serif/OFL.txt +93 -0
  81. package/src/fonts/instrument-serif/UPSTREAM.md +14 -0
  82. package/src/fonts/instrument-serif/instrument-serif-latin-400.woff2 +0 -0
  83. package/src/fonts/nebula-sans/LICENSE.txt +96 -0
  84. package/src/fonts/nebula-sans/NebulaSans-Black.woff2 +0 -0
  85. package/src/fonts/nebula-sans/NebulaSans-BlackItalic.woff2 +0 -0
  86. package/src/fonts/nebula-sans/NebulaSans-Bold.otf +0 -0
  87. package/src/fonts/nebula-sans/NebulaSans-Bold.woff2 +0 -0
  88. package/src/fonts/nebula-sans/NebulaSans-BoldItalic.woff2 +0 -0
  89. package/src/fonts/nebula-sans/NebulaSans-Book.otf +0 -0
  90. package/src/fonts/nebula-sans/NebulaSans-Book.woff2 +0 -0
  91. package/src/fonts/nebula-sans/NebulaSans-BookItalic.woff2 +0 -0
  92. package/src/fonts/nebula-sans/NebulaSans-Light.woff2 +0 -0
  93. package/src/fonts/nebula-sans/NebulaSans-LightItalic.woff2 +0 -0
  94. package/src/fonts/nebula-sans/NebulaSans-Medium.woff2 +0 -0
  95. package/src/fonts/nebula-sans/NebulaSans-MediumItalic.woff2 +0 -0
  96. package/src/fonts/nebula-sans/NebulaSans-Semibold.woff2 +0 -0
  97. package/src/fonts/nebula-sans/NebulaSans-SemiboldItalic.woff2 +0 -0
  98. package/src/fonts/nebula-sans/PROVENANCE.md +14 -0
  99. package/src/fonts/nebula-sans/social-fonts.generated.ts +3873 -0
  100. package/src/fonts.css +106 -0
  101. package/src/icons/act60/act60.svg +5 -0
  102. package/src/icons/act60/application.svg +9 -0
  103. package/src/icons/act60/chapter-compare.svg +3 -0
  104. package/src/icons/act60/decree-residence.svg +6 -0
  105. package/src/icons/act60/estimate.svg +7 -0
  106. package/src/icons/act60/export-services.svg +4 -0
  107. package/src/icons/act60/investor.svg +13 -0
  108. package/src/icons/act60/presence.svg +7 -0
  109. package/src/icons/aicharts/aicharts.svg +6 -0
  110. package/src/icons/aicharts/cost-compare.svg +4 -0
  111. package/src/icons/aicharts/task-audio.svg +7 -0
  112. package/src/icons/aicharts/task-coding.svg +6 -0
  113. package/src/icons/aicharts/task-images.svg +3 -0
  114. package/src/icons/aicharts/task-reasoning.svg +9 -0
  115. package/src/icons/aicharts/task-research.svg +5 -0
  116. package/src/icons/aicharts/task-video.svg +4 -0
  117. package/src/icons/manifest.json +1371 -0
  118. package/src/icons/platonik/conversation.svg +3 -0
  119. package/src/icons/platonik/creature.svg +7 -0
  120. package/src/icons/platonik/economy.svg +4 -0
  121. package/src/icons/platonik/keep-light.svg +6 -0
  122. package/src/icons/platonik/platonik.svg +7 -0
  123. package/src/icons/platonik/spark-route.svg +15 -0
  124. package/src/icons/receipts/act60-retry.receipt.json +888 -0
  125. package/src/icons/receipts/act60.receipt.json +1366 -0
  126. package/src/icons/receipts/aicharts.receipt.json +1546 -0
  127. package/src/icons/receipts/platonik.receipt.json +1011 -0
  128. package/src/icons/receipts/roughday.receipt.json +770 -0
  129. package/src/icons/receipts/shared.receipt.json +1296 -0
  130. package/src/icons/receipts/slopcamera.receipt.json +1495 -0
  131. package/src/icons/receipts/soundfish-retry.receipt.json +460 -0
  132. package/src/icons/receipts/soundfish.receipt.json +1709 -0
  133. package/src/icons/receipts/sponge.receipt.json +1743 -0
  134. package/src/icons/receipts/stripe-history-retry.receipt.json +145 -0
  135. package/src/icons/receipts/stripe-history.receipt.json +1202 -0
  136. package/src/icons/receipts/wordcell.receipt.json +1924 -0
  137. package/src/icons/roughday/finance.svg +7 -0
  138. package/src/icons/roughday/roughday.svg +6 -0
  139. package/src/icons/roughday/technology.svg +4 -0
  140. package/src/icons/roughday/world.svg +4 -0
  141. package/src/icons/sets/act60.json +63 -0
  142. package/src/icons/sets/aicharts.json +63 -0
  143. package/src/icons/sets/platonik.json +39 -0
  144. package/src/icons/sets/roughday.json +25 -0
  145. package/src/icons/sets/shared.json +12 -0
  146. package/src/icons/sets/slopcamera.json +47 -0
  147. package/src/icons/sets/soundfish.json +43 -0
  148. package/src/icons/sets/sponge.json +51 -0
  149. package/src/icons/sets/stripe-history.json +39 -0
  150. package/src/icons/sets/wordcell.json +51 -0
  151. package/src/icons/shared/agent-skill.svg +4 -0
  152. package/src/icons/shared/cli.svg +5 -0
  153. package/src/icons/shared/privacy.svg +3 -0
  154. package/src/icons/shared/research.svg +7 -0
  155. package/src/icons/shared/sdk.svg +3 -0
  156. package/src/icons/slopcamera/diagram.svg +3 -0
  157. package/src/icons/slopcamera/direct-scene.svg +5 -0
  158. package/src/icons/slopcamera/edit-video.svg +17 -0
  159. package/src/icons/slopcamera/mcp.svg +3 -0
  160. package/src/icons/slopcamera/native-world.svg +3 -0
  161. package/src/icons/slopcamera/slopcamera.svg +11 -0
  162. package/src/icons/soundfish/agent-ui.svg +7 -0
  163. package/src/icons/soundfish/collaborate.svg +5 -0
  164. package/src/icons/soundfish/compose.svg +3 -0
  165. package/src/icons/soundfish/hear.svg +6 -0
  166. package/src/icons/soundfish/human-ui.svg +6 -0
  167. package/src/icons/soundfish/share.svg +3 -0
  168. package/src/icons/soundfish/soundfish.svg +6 -0
  169. package/src/icons/sponge/api.svg +3 -0
  170. package/src/icons/sponge/documents.svg +3 -0
  171. package/src/icons/sponge/library.svg +3 -0
  172. package/src/icons/sponge/one-question.svg +5 -0
  173. package/src/icons/sponge/people-direct.svg +5 -0
  174. package/src/icons/sponge/read.svg +3 -0
  175. package/src/icons/sponge/save.svg +4 -0
  176. package/src/icons/sponge/sponge.svg +7 -0
  177. package/src/icons/stripe-history/company-history.svg +3 -0
  178. package/src/icons/stripe-history/evidence.svg +4 -0
  179. package/src/icons/stripe-history/independence.svg +7 -0
  180. package/src/icons/stripe-history/publications.svg +11 -0
  181. package/src/icons/stripe-history/sources.svg +6 -0
  182. package/src/icons/stripe-history/stripe-history.svg +3 -0
  183. package/src/icons/wordcell/backlinks.svg +6 -0
  184. package/src/icons/wordcell/capture.svg +6 -0
  185. package/src/icons/wordcell/git-provenance.svg +4 -0
  186. package/src/icons/wordcell/kb.svg +4 -0
  187. package/src/icons/wordcell/markdown.svg +4 -0
  188. package/src/icons/wordcell/scopes.svg +3 -0
  189. package/src/icons/wordcell/search.svg +7 -0
  190. package/src/icons.generated.ts +734 -0
  191. package/src/icons.ts +51 -0
  192. package/src/index.ts +275 -0
  193. package/src/lantern-material.css +213 -0
  194. package/src/launch.ts +624 -0
  195. package/src/marketing-assets/UPSTREAM.md +18 -0
  196. package/src/marketing-assets/cells.svg +1 -0
  197. package/src/marketing-assets/grain.svg +1 -0
  198. package/src/marketing-forced-colors.css +12 -0
  199. package/src/mockups/client.tsx +415 -0
  200. package/src/mockups/core.tsx +318 -0
  201. package/src/mockups/frames.tsx +368 -0
  202. package/src/mockups/index.ts +14 -0
  203. package/src/mockups/surfaces.tsx +681 -0
  204. package/src/mockups.css +2607 -0
  205. package/src/palette-appearance.ts +45 -0
  206. package/src/palette-bridge.css +124 -0
  207. package/src/palette-color.ts +41 -0
  208. package/src/palette-system.css +721 -0
  209. package/src/palette-themes.ts +23 -0
  210. package/src/palette-tokens.stylex.ts +519 -0
  211. package/src/palettes.css +3 -0
  212. package/src/palettes.ts +161 -0
  213. package/src/paper-theme.css +244 -0
  214. package/src/plain-publication.css +1241 -0
  215. package/src/plain-site.css +397 -0
  216. package/src/platforms.ts +151 -0
  217. package/src/portfolio.generated.json +1595 -0
  218. package/src/portfolio.generated.ts +1596 -0
  219. package/src/portfolio.ts +226 -0
  220. package/src/product-marketing-foundation.css +433 -0
  221. package/src/product-marketing-preset.css +261 -0
  222. package/src/product-marketing.css +2186 -0
  223. package/src/provider-marks.generated.ts +112 -0
  224. package/src/provider-marks.ts +143 -0
  225. package/src/react/animated-rail-stage.stylex.ts +15 -0
  226. package/src/react/animated-rail-stage.tsx +51 -0
  227. package/src/react/app-shell.stylex.ts +104 -0
  228. package/src/react/app-shell.tsx +121 -0
  229. package/src/react/article.tsx +602 -0
  230. package/src/react/aurora-dots-background.tsx +34 -0
  231. package/src/react/charts.stylex.ts +563 -0
  232. package/src/react/charts.tsx +610 -0
  233. package/src/react/chat.stylex.ts +34 -0
  234. package/src/react/chat.tsx +155 -0
  235. package/src/react/design-gallery.tsx +943 -0
  236. package/src/react/design-palette.stylex.ts +124 -0
  237. package/src/react/design-palette.tsx +196 -0
  238. package/src/react/design-theme-context.tsx +41 -0
  239. package/src/react/effects.stylex.ts +325 -0
  240. package/src/react/fader.stylex.ts +71 -0
  241. package/src/react/fader.tsx +151 -0
  242. package/src/react/foil-card-math.ts +100 -0
  243. package/src/react/foil-card-surface.stylex.ts +326 -0
  244. package/src/react/foil-card-surface.tsx +742 -0
  245. package/src/react/foil-mark.tsx +35 -0
  246. package/src/react/foil.stylex.ts +163 -0
  247. package/src/react/haptics.ts +228 -0
  248. package/src/react/hero-backdrop.tsx +22 -0
  249. package/src/react/index.ts +38 -0
  250. package/src/react/keyboard-shortcuts.ts +228 -0
  251. package/src/react/lantern-material-gallery.tsx +166 -0
  252. package/src/react/lantern-material.stylex.ts +39 -0
  253. package/src/react/launch-beats.tsx +73 -0
  254. package/src/react/navigation-rail.stylex.ts +130 -0
  255. package/src/react/navigation-rail.tsx +228 -0
  256. package/src/react/particle-halo.tsx +115 -0
  257. package/src/react/phaser-dots.tsx +501 -0
  258. package/src/react/platform-icons.tsx +94 -0
  259. package/src/react/platform-install.stylex.ts +385 -0
  260. package/src/react/platform-install.tsx +389 -0
  261. package/src/react/playback-transport.stylex.ts +14 -0
  262. package/src/react/playback-transport.tsx +112 -0
  263. package/src/react/procedural-backdrop.tsx +192 -0
  264. package/src/react/procedural-recipe.ts +323 -0
  265. package/src/react/product-marketing.stylex.ts +4469 -0
  266. package/src/react/product-marketing.tsx +1611 -0
  267. package/src/react/production-data-preview-notice.stylex.ts +40 -0
  268. package/src/react/production-data-preview-notice.tsx +34 -0
  269. package/src/react/provider-mark.stylex.ts +132 -0
  270. package/src/react/provider-mark.tsx +120 -0
  271. package/src/react/relative-time.tsx +117 -0
  272. package/src/react/route-state.stylex.ts +39 -0
  273. package/src/react/route-state.tsx +350 -0
  274. package/src/react/server.ts +11 -0
  275. package/src/react/social-kit-panel.tsx +103 -0
  276. package/src/react/sticky-offset.tsx +33 -0
  277. package/src/react/surfaces.stylex.ts +179 -0
  278. package/src/react/surfaces.tsx +330 -0
  279. package/src/react/syntax-code.tsx +33 -0
  280. package/src/react/theme-color-sync.ts +1 -0
  281. package/src/react/theme-resolution.ts +11 -0
  282. package/src/react/theme.stylex.ts +276 -0
  283. package/src/react/theme.tsx +402 -0
  284. package/src/reading.css +72 -0
  285. package/src/relative-time.ts +185 -0
  286. package/src/reset.css +2 -0
  287. package/src/site-shell.css +16 -0
  288. package/src/status-page-html.ts +63 -0
  289. package/src/status-page.css +276 -0
  290. package/src/status-page.ts +323 -0
  291. package/src/styles.css +21 -0
  292. package/src/syntax-code-lexers.ts +303 -0
  293. package/src/syntax-highlighting.css +78 -0
  294. package/src/syntax-highlighting.ts +477 -0
  295. package/src/syntax-tokens.ts +33 -0
  296. package/src/testing.ts +307 -0
  297. package/src/tokens.css +3 -0
  298. package/src/typography.css +86 -0
  299. package/vendor/evilcharts/LICENSE +21 -0
  300. package/vendor/evilcharts/UPSTREAM.md +14 -0
  301. package/vendor/platform-marks/LICENSE +30 -0
  302. package/vendor/platform-marks/UPSTREAM.md +15 -0
  303. package/vendor/platform-marks/apple.svg +1 -0
  304. package/vendor/platform-marks/linux.svg +1 -0
  305. package/vendor/provider-marks/CRUSH-LICENSE.md +134 -0
  306. package/vendor/provider-marks/LICENSE +21 -0
  307. package/vendor/provider-marks/UPSTREAM.md +27 -0
  308. package/vendor/provider-marks/aider.svg +3 -0
  309. package/vendor/provider-marks/crush-heartbit.svg +8 -0
  310. package/vendor/provider-marks/lobehub/alibabacloud-color.svg +1 -0
  311. package/vendor/provider-marks/lobehub/alibabacloud.svg +1 -0
  312. package/vendor/provider-marks/lobehub/amp-color.svg +1 -0
  313. package/vendor/provider-marks/lobehub/amp.svg +1 -0
  314. package/vendor/provider-marks/lobehub/anthropic.svg +1 -0
  315. package/vendor/provider-marks/lobehub/claude-color.svg +1 -0
  316. package/vendor/provider-marks/lobehub/claude.svg +1 -0
  317. package/vendor/provider-marks/lobehub/claudecode-color.svg +1 -0
  318. package/vendor/provider-marks/lobehub/claudecode.svg +1 -0
  319. package/vendor/provider-marks/lobehub/codex-color.svg +1 -0
  320. package/vendor/provider-marks/lobehub/codex.svg +1 -0
  321. package/vendor/provider-marks/lobehub/cursor.svg +1 -0
  322. package/vendor/provider-marks/lobehub/deepseek-color.svg +1 -0
  323. package/vendor/provider-marks/lobehub/deepseek.svg +1 -0
  324. package/vendor/provider-marks/lobehub/devin-color.svg +1 -0
  325. package/vendor/provider-marks/lobehub/devin.svg +1 -0
  326. package/vendor/provider-marks/lobehub/gemini-color.svg +1 -0
  327. package/vendor/provider-marks/lobehub/gemini.svg +1 -0
  328. package/vendor/provider-marks/lobehub/geminicli-color.svg +1 -0
  329. package/vendor/provider-marks/lobehub/geminicli.svg +1 -0
  330. package/vendor/provider-marks/lobehub/goose.svg +1 -0
  331. package/vendor/provider-marks/lobehub/meta-color.svg +1 -0
  332. package/vendor/provider-marks/lobehub/meta.svg +1 -0
  333. package/vendor/provider-marks/lobehub/mistral-color.svg +1 -0
  334. package/vendor/provider-marks/lobehub/mistral.svg +1 -0
  335. package/vendor/provider-marks/lobehub/moonshot.svg +1 -0
  336. package/vendor/provider-marks/lobehub/nvidia-color.svg +1 -0
  337. package/vendor/provider-marks/lobehub/nvidia.svg +1 -0
  338. package/vendor/provider-marks/lobehub/openai.svg +1 -0
  339. package/vendor/provider-marks/lobehub/opencode.svg +1 -0
  340. package/vendor/provider-marks/lobehub/perplexity-color.svg +1 -0
  341. package/vendor/provider-marks/lobehub/perplexity.svg +1 -0
  342. package/vendor/provider-marks/lobehub/qwen-color.svg +1 -0
  343. package/vendor/provider-marks/lobehub/qwen.svg +1 -0
  344. package/vendor/provider-marks/lobehub/xai.svg +1 -0
  345. package/vendor/provider-marks/lobehub/zai.svg +1 -0
@@ -0,0 +1,1850 @@
1
+ import {
2
+ Avatar,
3
+ Hotspot,
4
+ MockupGlyph,
5
+ MockupRoot,
6
+ PlaceholderPhoto,
7
+ SampleParagraphs,
8
+ SampleText,
9
+ ScrollFade,
10
+ WindowLights,
11
+ assertMockupDescription,
12
+ compact,
13
+ joinMockupClasses,
14
+ mockupGlyphNames,
15
+ mockupHash,
16
+ mockupInitials
17
+ } from "../chunk-evb02bc1.js";
18
+ import"../chunk-5gtx3pza.js";
19
+ // src/mockups/frames.tsx
20
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
21
+ var MOCKUP_EXAMPLE_HOST = /(^|\.)(example(\.(com|net|org))?|test|invalid|localhost)$/u;
22
+ function mockupAddress(url) {
23
+ const trimmed = url.trim().replace(/^[a-z]+:\/\//iu, "");
24
+ const slash = trimmed.indexOf("/");
25
+ const host = (slash < 0 ? trimmed : trimmed.slice(0, slash)).toLowerCase();
26
+ const path = slash < 0 ? "" : trimmed.slice(slash);
27
+ if (!MOCKUP_EXAMPLE_HOST.test(host)) {
28
+ throw new RangeError(`Mockup address ${JSON.stringify(url)} must use a reserved example host such as example.com or site.example.`);
29
+ }
30
+ return {
31
+ host,
32
+ path: path === "/" ? "" : path
33
+ };
34
+ }
35
+ function pageStyle(height) {
36
+ if (height === undefined)
37
+ return;
38
+ if (!(height > 0))
39
+ throw new RangeError("A mockup page height must be positive.");
40
+ return {
41
+ "--hkm-page-height": `${height}px`
42
+ };
43
+ }
44
+ function optOutProps(optOut) {
45
+ return optOut === undefined ? {} : {
46
+ optOut
47
+ };
48
+ }
49
+ function BrowserFrame({
50
+ children,
51
+ fade,
52
+ height,
53
+ toolbar,
54
+ url,
55
+ ...root
56
+ }) {
57
+ return /* @__PURE__ */ jsx(MockupRoot, {
58
+ ...root,
59
+ kind: "browser",
60
+ children: /* @__PURE__ */ jsx(BrowserWindow, {
61
+ ...fade === undefined ? {} : {
62
+ fade
63
+ },
64
+ ...height === undefined ? {} : {
65
+ height
66
+ },
67
+ toolbar,
68
+ url,
69
+ children
70
+ })
71
+ });
72
+ }
73
+ function BrowserWindow({
74
+ children,
75
+ fade,
76
+ height,
77
+ toolbar,
78
+ url
79
+ }) {
80
+ const {
81
+ host,
82
+ path
83
+ } = mockupAddress(url);
84
+ const fades = fade ?? height !== undefined;
85
+ return /* @__PURE__ */ jsxs("div", {
86
+ className: "hkm-window",
87
+ children: [
88
+ /* @__PURE__ */ jsxs("div", {
89
+ "aria-hidden": "true",
90
+ className: "hkm-browser-bar",
91
+ children: [
92
+ /* @__PURE__ */ jsx(WindowLights, {}),
93
+ /* @__PURE__ */ jsxs("span", {
94
+ className: "hkm-browser-nav",
95
+ children: [
96
+ /* @__PURE__ */ jsx(MockupGlyph, {
97
+ name: "back",
98
+ size: 16
99
+ }),
100
+ /* @__PURE__ */ jsx(MockupGlyph, {
101
+ name: "forward",
102
+ size: 16
103
+ }),
104
+ /* @__PURE__ */ jsx(MockupGlyph, {
105
+ name: "reload",
106
+ size: 15
107
+ })
108
+ ]
109
+ }),
110
+ /* @__PURE__ */ jsxs("span", {
111
+ className: "hkm-address",
112
+ children: [
113
+ /* @__PURE__ */ jsx(MockupGlyph, {
114
+ name: "lock",
115
+ size: 12
116
+ }),
117
+ /* @__PURE__ */ jsx("span", {
118
+ className: "hkm-address-host",
119
+ children: host
120
+ }),
121
+ path === "" ? null : /* @__PURE__ */ jsx("span", {
122
+ className: "hkm-address-path",
123
+ children: path
124
+ })
125
+ ]
126
+ }),
127
+ /* @__PURE__ */ jsx("span", {
128
+ className: "hkm-browser-tools",
129
+ children: toolbar
130
+ })
131
+ ]
132
+ }),
133
+ /* @__PURE__ */ jsx("div", {
134
+ className: "hkm-page",
135
+ "data-hkm-fade": fades ? "" : undefined,
136
+ style: pageStyle(height),
137
+ children
138
+ })
139
+ ]
140
+ });
141
+ }
142
+ var TERMINAL_KINDS = new Set(["input", "output", "comment"]);
143
+ function TerminalFrame({
144
+ fade,
145
+ height,
146
+ lines,
147
+ prompt = "$",
148
+ title = "Terminal",
149
+ ...root
150
+ }) {
151
+ for (const line of lines) {
152
+ if (!TERMINAL_KINDS.has(line.kind))
153
+ throw new TypeError(`Unknown terminal line kind ${JSON.stringify(line.kind)}.`);
154
+ }
155
+ const fades = fade ?? height !== undefined;
156
+ return /* @__PURE__ */ jsx(MockupRoot, {
157
+ ...root,
158
+ kind: "terminal",
159
+ children: /* @__PURE__ */ jsxs("div", {
160
+ className: "hkm-window",
161
+ children: [
162
+ /* @__PURE__ */ jsxs("div", {
163
+ "aria-hidden": "true",
164
+ className: "hkm-title-bar",
165
+ children: [
166
+ /* @__PURE__ */ jsx(WindowLights, {}),
167
+ /* @__PURE__ */ jsx("span", {
168
+ className: "hkm-title",
169
+ children: title
170
+ }),
171
+ /* @__PURE__ */ jsx("span", {})
172
+ ]
173
+ }),
174
+ /* @__PURE__ */ jsx("div", {
175
+ className: "hkm-page hkm-terminal-body",
176
+ "data-hkm-fade": fades ? "" : undefined,
177
+ style: pageStyle(height),
178
+ children: /* @__PURE__ */ jsxs("div", {
179
+ className: "hkm-terminal-lines",
180
+ children: [
181
+ lines.map((line, index) => /* @__PURE__ */ jsxs("div", {
182
+ className: "hkm-terminal-line",
183
+ "data-hkm-beat": line.beat,
184
+ "data-hkm-line": line.kind,
185
+ "data-hkm-tone": line.tone,
186
+ children: [
187
+ line.kind === "input" ? /* @__PURE__ */ jsx("span", {
188
+ className: "hkm-terminal-prompt",
189
+ children: prompt
190
+ }) : null,
191
+ line.kind === "comment" ? /* @__PURE__ */ jsx("span", {
192
+ className: "hkm-terminal-prompt",
193
+ children: "#"
194
+ }) : null,
195
+ /* @__PURE__ */ jsx(SampleText, {
196
+ ...optOutProps(root.optOut),
197
+ children: line.text
198
+ })
199
+ ]
200
+ }, index)),
201
+ /* @__PURE__ */ jsxs("div", {
202
+ "aria-hidden": "true",
203
+ className: "hkm-terminal-line",
204
+ "data-hkm-line": "input",
205
+ children: [
206
+ /* @__PURE__ */ jsx("span", {
207
+ className: "hkm-terminal-prompt",
208
+ children: prompt
209
+ }),
210
+ /* @__PURE__ */ jsx("span", {
211
+ className: "hkm-caret"
212
+ })
213
+ ]
214
+ })
215
+ ]
216
+ })
217
+ })
218
+ ]
219
+ })
220
+ });
221
+ }
222
+ function MacWindow({
223
+ children,
224
+ sidebar,
225
+ title,
226
+ toolbar,
227
+ ...root
228
+ }) {
229
+ return /* @__PURE__ */ jsx(MockupRoot, {
230
+ ...root,
231
+ kind: "app-window",
232
+ children: /* @__PURE__ */ jsxs("div", {
233
+ className: "hkm-window",
234
+ "data-hkm-sidebar": sidebar === undefined ? undefined : "",
235
+ children: [
236
+ sidebar === undefined ? null : /* @__PURE__ */ jsxs("div", {
237
+ className: "hkm-app-sidebar",
238
+ children: [
239
+ /* @__PURE__ */ jsx(WindowLights, {}),
240
+ /* @__PURE__ */ jsx("div", {
241
+ className: "hkm-app-sidebar-body",
242
+ children: sidebar
243
+ })
244
+ ]
245
+ }),
246
+ /* @__PURE__ */ jsxs("div", {
247
+ className: "hkm-app-main",
248
+ children: [
249
+ /* @__PURE__ */ jsxs("div", {
250
+ className: "hkm-title-bar hkm-app-bar",
251
+ children: [
252
+ sidebar === undefined ? /* @__PURE__ */ jsx(WindowLights, {}) : /* @__PURE__ */ jsx("span", {}),
253
+ /* @__PURE__ */ jsx("span", {
254
+ className: "hkm-title",
255
+ children: title
256
+ }),
257
+ /* @__PURE__ */ jsx("span", {
258
+ className: "hkm-app-tools",
259
+ children: toolbar
260
+ })
261
+ ]
262
+ }),
263
+ /* @__PURE__ */ jsx("div", {
264
+ className: "hkm-app-content",
265
+ children
266
+ })
267
+ ]
268
+ })
269
+ ]
270
+ })
271
+ });
272
+ }
273
+ function MenuBarPopover({
274
+ footer,
275
+ items,
276
+ mark,
277
+ title,
278
+ ...root
279
+ }) {
280
+ const ids = new Set;
281
+ for (const item of items) {
282
+ if (ids.has(item.id))
283
+ throw new RangeError(`MenuBarPopover item ids must be unique: ${item.id}`);
284
+ ids.add(item.id);
285
+ }
286
+ return /* @__PURE__ */ jsxs(MockupRoot, {
287
+ ...root,
288
+ kind: "menubar",
289
+ children: [
290
+ /* @__PURE__ */ jsxs("div", {
291
+ "aria-hidden": "true",
292
+ className: "hkm-menubar",
293
+ children: [
294
+ /* @__PURE__ */ jsx("span", {
295
+ className: "hkm-menubar-spacer"
296
+ }),
297
+ /* @__PURE__ */ jsx(MockupGlyph, {
298
+ name: "search",
299
+ size: 14
300
+ }),
301
+ /* @__PURE__ */ jsx("span", {
302
+ className: "hkm-menubar-item",
303
+ "data-hkm-open": "",
304
+ children: mark ?? /* @__PURE__ */ jsx("span", {
305
+ className: "hkm-menubar-dot"
306
+ })
307
+ }),
308
+ /* @__PURE__ */ jsx("span", {
309
+ className: "hkm-menubar-clock",
310
+ children: "9:41"
311
+ })
312
+ ]
313
+ }),
314
+ /* @__PURE__ */ jsxs("div", {
315
+ className: "hkm-popover",
316
+ children: [
317
+ title === undefined ? null : /* @__PURE__ */ jsx("div", {
318
+ className: "hkm-popover-title",
319
+ children: title
320
+ }),
321
+ /* @__PURE__ */ jsx("ul", {
322
+ className: "hkm-popover-list",
323
+ children: items.map((item) => /* @__PURE__ */ jsxs("li", {
324
+ className: "hkm-popover-item",
325
+ "data-hkm-selected": item.selected === true ? "" : undefined,
326
+ "data-hkm-tone": item.tone,
327
+ children: [
328
+ /* @__PURE__ */ jsx("span", {
329
+ className: "hkm-popover-dot"
330
+ }),
331
+ /* @__PURE__ */ jsxs("span", {
332
+ className: "hkm-popover-text",
333
+ children: [
334
+ /* @__PURE__ */ jsx("span", {
335
+ className: "hkm-popover-label",
336
+ children: /* @__PURE__ */ jsx(SampleText, {
337
+ ...optOutProps(root.optOut),
338
+ children: item.label
339
+ })
340
+ }),
341
+ item.detail === undefined ? null : /* @__PURE__ */ jsx("span", {
342
+ className: "hkm-popover-detail",
343
+ children: /* @__PURE__ */ jsx(SampleText, {
344
+ ...optOutProps(root.optOut),
345
+ children: item.detail
346
+ })
347
+ })
348
+ ]
349
+ })
350
+ ]
351
+ }, item.id))
352
+ }),
353
+ footer === undefined ? null : /* @__PURE__ */ jsx("div", {
354
+ className: "hkm-popover-footer",
355
+ children: footer
356
+ })
357
+ ]
358
+ })
359
+ ]
360
+ });
361
+ }
362
+ function PhoneFrame({
363
+ children,
364
+ screenHeight,
365
+ statusTime,
366
+ width,
367
+ ...root
368
+ }) {
369
+ return /* @__PURE__ */ jsx(MockupRoot, {
370
+ ...root,
371
+ kind: "phone",
372
+ style: phoneStyle(width, screenHeight),
373
+ children: /* @__PURE__ */ jsx(PhoneShell, {
374
+ ...statusTime === undefined ? {} : {
375
+ statusTime
376
+ },
377
+ children: /* @__PURE__ */ jsx("div", {
378
+ className: "hkm-phone-body",
379
+ children
380
+ })
381
+ })
382
+ });
383
+ }
384
+ function phoneStyle(width, screenHeight) {
385
+ const style = {};
386
+ if (width !== undefined) {
387
+ if (!(width > 0))
388
+ throw new RangeError("A phone mockup width must be positive.");
389
+ style["--hkm-phone-width"] = `${width}px`;
390
+ }
391
+ if (screenHeight !== undefined) {
392
+ if (!(screenHeight >= 200 && screenHeight <= 844))
393
+ throw new RangeError("A phone mockup screenHeight must be 200 to 844 points.");
394
+ style["--hkm-phone-height"] = String(screenHeight + 22);
395
+ }
396
+ return Object.keys(style).length === 0 ? undefined : style;
397
+ }
398
+ function PhoneShell({
399
+ children,
400
+ statusTime = "9:41"
401
+ }) {
402
+ return /* @__PURE__ */ jsxs("div", {
403
+ className: "hkm-device",
404
+ children: [
405
+ /* @__PURE__ */ jsx("span", {
406
+ "aria-hidden": "true",
407
+ className: "hkm-device-button",
408
+ "data-hkm-button": "action"
409
+ }),
410
+ /* @__PURE__ */ jsx("span", {
411
+ "aria-hidden": "true",
412
+ className: "hkm-device-button",
413
+ "data-hkm-button": "volume-up"
414
+ }),
415
+ /* @__PURE__ */ jsx("span", {
416
+ "aria-hidden": "true",
417
+ className: "hkm-device-button",
418
+ "data-hkm-button": "volume-down"
419
+ }),
420
+ /* @__PURE__ */ jsx("span", {
421
+ "aria-hidden": "true",
422
+ className: "hkm-device-button",
423
+ "data-hkm-button": "power"
424
+ }),
425
+ /* @__PURE__ */ jsx("div", {
426
+ className: "hkm-bezel",
427
+ children: /* @__PURE__ */ jsxs("div", {
428
+ className: "hkm-screen",
429
+ children: [
430
+ /* @__PURE__ */ jsx("div", {
431
+ className: "hkm-screen-content",
432
+ children
433
+ }),
434
+ /* @__PURE__ */ jsxs("div", {
435
+ "aria-hidden": "true",
436
+ className: "hkm-status-bar",
437
+ children: [
438
+ /* @__PURE__ */ jsx("span", {
439
+ className: "hkm-status-time",
440
+ children: statusTime
441
+ }),
442
+ /* @__PURE__ */ jsxs("span", {
443
+ className: "hkm-status-glyphs",
444
+ children: [
445
+ /* @__PURE__ */ jsxs("svg", {
446
+ className: "hkm-status-cell",
447
+ viewBox: "0 0 19 12",
448
+ children: [
449
+ /* @__PURE__ */ jsx("rect", {
450
+ height: "4.5",
451
+ rx: "0.9",
452
+ width: "3.2",
453
+ x: "0",
454
+ y: "7.5"
455
+ }),
456
+ /* @__PURE__ */ jsx("rect", {
457
+ height: "6.8",
458
+ rx: "0.9",
459
+ width: "3.2",
460
+ x: "5.1",
461
+ y: "5.2"
462
+ }),
463
+ /* @__PURE__ */ jsx("rect", {
464
+ height: "9.3",
465
+ rx: "0.9",
466
+ width: "3.2",
467
+ x: "10.2",
468
+ y: "2.7"
469
+ }),
470
+ /* @__PURE__ */ jsx("rect", {
471
+ height: "12",
472
+ rx: "0.9",
473
+ width: "3.2",
474
+ x: "15.3",
475
+ y: "0"
476
+ })
477
+ ]
478
+ }),
479
+ /* @__PURE__ */ jsxs("svg", {
480
+ className: "hkm-status-wifi",
481
+ viewBox: "0 0 17 12.3",
482
+ children: [
483
+ /* @__PURE__ */ jsx("path", {
484
+ d: "M8.5 2.6c2.4 0 4.6.9 6.2 2.4.2.2.5.2.7 0l1.2-1.2c.2-.2.2-.5 0-.7C14.5 1.2 11.6 0 8.5 0S2.5 1.2.4 3.1c-.2.2-.2.5 0 .7L1.6 5c.2.2.5.2.7 0C3.9 3.5 6.1 2.6 8.5 2.6Z"
485
+ }),
486
+ /* @__PURE__ */ jsx("path", {
487
+ d: "M8.5 6.4c1.3 0 2.5.5 3.5 1.3.2.2.5.2.7 0l1.2-1.2c.2-.2.2-.5 0-.7-1.4-1.3-3.3-2-5.4-2s-4 .7-5.4 2c-.2.2-.2.5 0 .7l1.2 1.2c.2.2.5.2.7 0 1-.8 2.2-1.3 3.5-1.3Z"
488
+ }),
489
+ /* @__PURE__ */ jsx("path", {
490
+ d: "M11.1 9.4c.2-.2.2-.5 0-.7-.7-.6-1.6-1-2.6-1s-1.9.4-2.6 1c-.2.2-.2.5 0 .7l2.2 2.2c.2.2.5.2.7 0l2.3-2.2Z"
491
+ })
492
+ ]
493
+ }),
494
+ /* @__PURE__ */ jsxs("svg", {
495
+ className: "hkm-status-battery",
496
+ viewBox: "0 0 27.4 13",
497
+ children: [
498
+ /* @__PURE__ */ jsx("rect", {
499
+ fill: "none",
500
+ height: "12",
501
+ rx: "3.8",
502
+ stroke: "currentColor",
503
+ strokeOpacity: "0.35",
504
+ width: "24",
505
+ x: "0.5",
506
+ y: "0.5"
507
+ }),
508
+ /* @__PURE__ */ jsx("rect", {
509
+ height: "9",
510
+ rx: "2.5",
511
+ width: "21",
512
+ x: "2",
513
+ y: "2"
514
+ }),
515
+ /* @__PURE__ */ jsx("path", {
516
+ d: "M26 4.4v4.2c.8-.3 1.4-1.1 1.4-2.1S26.8 4.7 26 4.4Z",
517
+ fillOpacity: "0.4"
518
+ })
519
+ ]
520
+ })
521
+ ]
522
+ })
523
+ ]
524
+ }),
525
+ /* @__PURE__ */ jsx("span", {
526
+ "aria-hidden": "true",
527
+ className: "hkm-island"
528
+ }),
529
+ /* @__PURE__ */ jsx("span", {
530
+ "aria-hidden": "true",
531
+ className: "hkm-home-indicator"
532
+ })
533
+ ]
534
+ })
535
+ })
536
+ ]
537
+ });
538
+ }
539
+ function AgentSession({
540
+ agent,
541
+ fade,
542
+ height,
543
+ title,
544
+ turns,
545
+ ...root
546
+ }) {
547
+ if (agent !== "generic-cli" && agent !== "generic-chat")
548
+ throw new TypeError(`Unknown agent chrome ${JSON.stringify(agent)}.`);
549
+ const fades = fade ?? height !== undefined;
550
+ const sample = optOutProps(root.optOut);
551
+ return /* @__PURE__ */ jsx(MockupRoot, {
552
+ ...root,
553
+ kind: "agent",
554
+ children: /* @__PURE__ */ jsxs("div", {
555
+ className: "hkm-window",
556
+ "data-hkm-agent": agent,
557
+ children: [
558
+ /* @__PURE__ */ jsxs("div", {
559
+ "aria-hidden": "true",
560
+ className: "hkm-title-bar",
561
+ children: [
562
+ /* @__PURE__ */ jsx(WindowLights, {}),
563
+ /* @__PURE__ */ jsx("span", {
564
+ className: "hkm-title",
565
+ children: title ?? (agent === "generic-cli" ? "Coding agent" : "Assistant")
566
+ }),
567
+ /* @__PURE__ */ jsx("span", {})
568
+ ]
569
+ }),
570
+ /* @__PURE__ */ jsx("div", {
571
+ className: "hkm-page hkm-agent-body",
572
+ "data-hkm-fade": fades ? "" : undefined,
573
+ style: pageStyle(height),
574
+ children: /* @__PURE__ */ jsx("ol", {
575
+ className: "hkm-agent-turns",
576
+ children: turns.map((turn, index) => /* @__PURE__ */ jsx("li", {
577
+ className: "hkm-agent-turn",
578
+ "data-hkm-beat": turn.beat,
579
+ "data-hkm-role": turn.role,
580
+ "data-hkm-tone": turn.status,
581
+ children: turn.role === "tool" ? /* @__PURE__ */ jsxs("span", {
582
+ className: "hkm-agent-tool",
583
+ children: [
584
+ /* @__PURE__ */ jsxs("span", {
585
+ className: "hkm-agent-tool-name",
586
+ children: [
587
+ /* @__PURE__ */ jsx("span", {
588
+ className: "hkm-agent-status"
589
+ }),
590
+ turn.tool ?? "Tool"
591
+ ]
592
+ }),
593
+ /* @__PURE__ */ jsx("span", {
594
+ className: "hkm-agent-tool-output",
595
+ children: /* @__PURE__ */ jsx(SampleText, {
596
+ ...sample,
597
+ children: turn.text
598
+ })
599
+ })
600
+ ]
601
+ }) : /* @__PURE__ */ jsxs(Fragment, {
602
+ children: [
603
+ /* @__PURE__ */ jsx("span", {
604
+ "aria-hidden": "true",
605
+ className: "hkm-agent-marker",
606
+ children: turn.role === "user" ? "›" : /* @__PURE__ */ jsx(MockupGlyph, {
607
+ name: "sparkle",
608
+ size: 14
609
+ })
610
+ }),
611
+ /* @__PURE__ */ jsx("span", {
612
+ className: "hkm-agent-text",
613
+ children: /* @__PURE__ */ jsx(SampleText, {
614
+ ...sample,
615
+ children: turn.text
616
+ })
617
+ })
618
+ ]
619
+ })
620
+ }, index))
621
+ })
622
+ }),
623
+ agent === "generic-chat" ? /* @__PURE__ */ jsxs("div", {
624
+ "aria-hidden": "true",
625
+ className: "hkm-agent-composer",
626
+ children: [
627
+ /* @__PURE__ */ jsx("span", {
628
+ className: "hkm-agent-composer-field",
629
+ children: "Ask for a change"
630
+ }),
631
+ /* @__PURE__ */ jsx("span", {
632
+ className: "hkm-agent-composer-send",
633
+ children: /* @__PURE__ */ jsx(MockupGlyph, {
634
+ name: "send",
635
+ size: 14
636
+ })
637
+ })
638
+ ]
639
+ }) : null
640
+ ]
641
+ })
642
+ });
643
+ }
644
+ // src/mockups/surfaces.tsx
645
+ import { Fragment as Fragment2 } from "react";
646
+ import { jsx as jsx2, jsxs as jsxs2, Fragment as Fragment3 } from "react/jsx-runtime";
647
+ function sample(optOut) {
648
+ return optOut === undefined ? {} : {
649
+ optOut
650
+ };
651
+ }
652
+ function counted(value, noun) {
653
+ return `${compact(value)} ${value === 1 ? noun : `${noun}s`}`;
654
+ }
655
+ function assertUniqueKeys(keys, component) {
656
+ const seen = new Set;
657
+ for (const key of keys) {
658
+ if (seen.has(key))
659
+ throw new RangeError(`${component} keys must be unique: ${key}`);
660
+ seen.add(key);
661
+ }
662
+ }
663
+ function chatSide(from) {
664
+ return from === "me" ? "out" : "in";
665
+ }
666
+ var TAIL_PATH = "M-16 -17.5H0C0 -7.6 1.7 -2.4 6.4 -0.45 6.95 -0.2 6.85 0.45 6.2 0.5 2.6 0.7 -1.2 -0.6 -3.4 -2.5 -4.3 -3.3 -5.2 -4.1 -6 -4.9L-16 -17.5Z";
667
+ function isEmojiOnly(text) {
668
+ const trimmed = text.trim();
669
+ if (trimmed === "")
670
+ return false;
671
+ if (!/^(?:[\u{1F000}-\u{1FAFF}\u{2600}-\u{27BF}\u{2B00}-\u{2BFF}\u{2300}-\u{23FF}\u{1F1E6}-\u{1F1FF}\u{E0020}-\u{E007F}©®‼⁉™ℹ]|‍|️|⃣|\s)+$/u.test(trimmed))
672
+ return false;
673
+ if (/[0-9#*]/u.test(trimmed))
674
+ return false;
675
+ const segmenter = new Intl.Segmenter(undefined, {
676
+ granularity: "grapheme"
677
+ });
678
+ return [...segmenter.segment(trimmed.replace(/\s+/gu, ""))].length <= 3;
679
+ }
680
+ function ChatThread({
681
+ contact,
682
+ device = "phone",
683
+ messages,
684
+ screenHeight,
685
+ statusTime,
686
+ typing = false,
687
+ variant = "bubbles",
688
+ via,
689
+ visibleCount,
690
+ width,
691
+ ...root
692
+ }) {
693
+ if (variant !== "bubbles" && variant !== "chat")
694
+ throw new TypeError(`Unknown chat variant ${JSON.stringify(variant)}.`);
695
+ const count = visibleCount ?? messages.length;
696
+ if (!Number.isInteger(count) || count < 0 || count > messages.length)
697
+ throw new RangeError("ChatThread visibleCount must be 0 to messages.length.");
698
+ const shown = messages.slice(0, count);
699
+ const sides = shown.map((message) => chatSide(message.from));
700
+ const lastOut = sides.lastIndexOf("out") === sides.length - 1 && !typing ? sides.length - 1 : -1;
701
+ const screen = /* @__PURE__ */ jsxs2("div", {
702
+ className: "hkm-chat",
703
+ "data-hkm-chat": variant,
704
+ "data-hkm-via": via === undefined ? undefined : "",
705
+ children: [
706
+ /* @__PURE__ */ jsx2("div", {
707
+ className: "hkm-chat-thread",
708
+ children: /* @__PURE__ */ jsxs2("div", {
709
+ className: "hkm-chat-inner",
710
+ children: [
711
+ shown.map((message, index) => {
712
+ const side = sides[index] ?? "in";
713
+ const first = index === 0 || sides[index - 1] !== side || message.time !== undefined;
714
+ const next = shown[index + 1];
715
+ const last = index === shown.length - 1 || sides[index + 1] !== side || next?.time !== undefined;
716
+ const emoji = isEmojiOnly(message.text);
717
+ const tail = variant === "chat" ? first ? "top" : undefined : last && !emoji ? "bottom" : undefined;
718
+ return /* @__PURE__ */ jsxs2(Fragment2, {
719
+ children: [
720
+ message.time === undefined ? null : /* @__PURE__ */ jsx2("div", {
721
+ className: "hkm-chat-divider",
722
+ children: /* @__PURE__ */ jsx2(SampleText, {
723
+ ...sample(root.optOut),
724
+ children: message.time
725
+ })
726
+ }),
727
+ /* @__PURE__ */ jsxs2("div", {
728
+ className: "hkm-chat-row",
729
+ "data-hkm-first": first ? "" : undefined,
730
+ "data-hkm-from": message.from,
731
+ "data-hkm-last": last ? "" : undefined,
732
+ "data-hkm-side": side,
733
+ children: [
734
+ /* @__PURE__ */ jsxs2("div", {
735
+ className: "hkm-bubble",
736
+ "data-hkm-emoji": emoji ? "" : undefined,
737
+ "data-hkm-tail": tail,
738
+ children: [
739
+ /* @__PURE__ */ jsx2(SampleText, {
740
+ ...sample(root.optOut),
741
+ children: message.text
742
+ }),
743
+ tail === "bottom" ? /* @__PURE__ */ jsx2("svg", {
744
+ "aria-hidden": "true",
745
+ className: "hkm-bubble-tail",
746
+ focusable: "false",
747
+ viewBox: "-16 -17.5 23 18",
748
+ children: /* @__PURE__ */ jsx2("path", {
749
+ d: TAIL_PATH
750
+ })
751
+ }) : null
752
+ ]
753
+ }),
754
+ message.label === undefined ? null : /* @__PURE__ */ jsx2("span", {
755
+ className: "hkm-chat-label",
756
+ children: message.label
757
+ })
758
+ ]
759
+ }),
760
+ index === lastOut && variant === "bubbles" ? /* @__PURE__ */ jsx2("div", {
761
+ className: "hkm-chat-receipt",
762
+ children: "Delivered"
763
+ }) : null
764
+ ]
765
+ }, message.id ?? index);
766
+ }),
767
+ typing ? /* @__PURE__ */ jsx2("div", {
768
+ className: "hkm-chat-row",
769
+ "data-hkm-first": "",
770
+ "data-hkm-last": "",
771
+ "data-hkm-side": "in",
772
+ children: /* @__PURE__ */ jsx2(TypingIndicator, {})
773
+ }) : null
774
+ ]
775
+ })
776
+ }),
777
+ /* @__PURE__ */ jsxs2("div", {
778
+ "aria-hidden": "true",
779
+ className: "hkm-chat-nav",
780
+ children: [
781
+ /* @__PURE__ */ jsx2("span", {
782
+ className: "hkm-chat-back",
783
+ children: /* @__PURE__ */ jsx2(MockupGlyph, {
784
+ name: "back",
785
+ size: 22
786
+ })
787
+ }),
788
+ /* @__PURE__ */ jsxs2("span", {
789
+ className: "hkm-chat-contact",
790
+ children: [
791
+ /* @__PURE__ */ jsx2(Avatar, {
792
+ name: contact ?? "Contact",
793
+ size: variant === "chat" ? 32 : 44
794
+ }),
795
+ /* @__PURE__ */ jsx2("span", {
796
+ className: "hkm-chat-name",
797
+ children: contact ?? "Contact"
798
+ }),
799
+ via === undefined ? null : /* @__PURE__ */ jsx2("span", {
800
+ className: "hkm-chat-via",
801
+ children: via
802
+ })
803
+ ]
804
+ }),
805
+ /* @__PURE__ */ jsx2("span", {
806
+ className: "hkm-chat-call",
807
+ children: /* @__PURE__ */ jsx2(MockupGlyph, {
808
+ name: "comment",
809
+ size: 18
810
+ })
811
+ })
812
+ ]
813
+ }),
814
+ /* @__PURE__ */ jsxs2("div", {
815
+ "aria-hidden": "true",
816
+ className: "hkm-chat-composer",
817
+ children: [
818
+ /* @__PURE__ */ jsx2("span", {
819
+ className: "hkm-chat-plus",
820
+ children: /* @__PURE__ */ jsx2(MockupGlyph, {
821
+ name: "plus",
822
+ size: 16
823
+ })
824
+ }),
825
+ /* @__PURE__ */ jsx2("span", {
826
+ className: "hkm-chat-field",
827
+ children: "Message"
828
+ })
829
+ ]
830
+ })
831
+ ]
832
+ });
833
+ return /* @__PURE__ */ jsx2(MockupRoot, {
834
+ ...root,
835
+ kind: "chat",
836
+ style: device === "phone" ? phoneStyle(width, screenHeight) : undefined,
837
+ children: device === "phone" ? /* @__PURE__ */ jsx2(PhoneShell, {
838
+ ...statusTime === undefined ? {} : {
839
+ statusTime
840
+ },
841
+ children: screen
842
+ }) : /* @__PURE__ */ jsx2("div", {
843
+ className: "hkm-chat-bare",
844
+ children: screen
845
+ })
846
+ });
847
+ }
848
+ function TypingIndicator() {
849
+ return /* @__PURE__ */ jsxs2("span", {
850
+ "aria-hidden": "true",
851
+ className: "hkm-typing",
852
+ children: [
853
+ /* @__PURE__ */ jsx2("i", {}),
854
+ /* @__PURE__ */ jsx2("i", {}),
855
+ /* @__PURE__ */ jsx2("i", {})
856
+ ]
857
+ });
858
+ }
859
+ function keyed(posts, postKey, component) {
860
+ const keys = posts.map((post, index) => postKey === undefined ? String(index) : postKey(post, index));
861
+ assertUniqueKeys(keys, component);
862
+ return keys;
863
+ }
864
+ var SOCIAL_RAIL = [["home", "Home"], ["search", "Explore"], ["bell", "Notifications"], ["mail", "Messages"], ["bookmark", "Saved"], ["user", "Profile"]];
865
+ function SocialFeed({
866
+ aside,
867
+ height,
868
+ postKey,
869
+ posts,
870
+ renderPost,
871
+ url = "social.example/home",
872
+ viewer = "Alex Moreno",
873
+ ...root
874
+ }) {
875
+ const keys = keyed(posts, postKey, "SocialFeed");
876
+ return /* @__PURE__ */ jsx2(MockupRoot, {
877
+ ...root,
878
+ kind: "social",
879
+ children: /* @__PURE__ */ jsx2(BrowserWindow, {
880
+ ...height === undefined ? {} : {
881
+ height
882
+ },
883
+ url,
884
+ children: /* @__PURE__ */ jsxs2("div", {
885
+ className: "hkm-social",
886
+ children: [
887
+ /* @__PURE__ */ jsxs2("div", {
888
+ "aria-hidden": "true",
889
+ className: "hkm-social-rail",
890
+ children: [
891
+ /* @__PURE__ */ jsx2("span", {
892
+ className: "hkm-social-mark",
893
+ children: /* @__PURE__ */ jsx2(MockupGlyph, {
894
+ name: "sparkle",
895
+ size: 22
896
+ })
897
+ }),
898
+ SOCIAL_RAIL.map(([glyph, label], index) => /* @__PURE__ */ jsxs2("span", {
899
+ className: "hkm-rail-item",
900
+ "data-hkm-active": index === 0 ? "" : undefined,
901
+ children: [
902
+ /* @__PURE__ */ jsx2(MockupGlyph, {
903
+ filled: index === 0,
904
+ name: glyph,
905
+ size: 22
906
+ }),
907
+ /* @__PURE__ */ jsx2("span", {
908
+ className: "hkm-rail-label",
909
+ children: label
910
+ })
911
+ ]
912
+ }, label)),
913
+ /* @__PURE__ */ jsxs2("span", {
914
+ className: "hkm-rail-cta",
915
+ children: [
916
+ /* @__PURE__ */ jsx2("span", {
917
+ className: "hkm-rail-label",
918
+ children: "Post"
919
+ }),
920
+ /* @__PURE__ */ jsx2(MockupGlyph, {
921
+ className: "hkm-rail-cta-glyph",
922
+ name: "pencil",
923
+ size: 18
924
+ })
925
+ ]
926
+ }),
927
+ /* @__PURE__ */ jsxs2("span", {
928
+ className: "hkm-rail-me",
929
+ children: [
930
+ /* @__PURE__ */ jsx2(Avatar, {
931
+ name: viewer,
932
+ size: 32
933
+ }),
934
+ /* @__PURE__ */ jsx2("span", {
935
+ className: "hkm-rail-label",
936
+ children: viewer
937
+ })
938
+ ]
939
+ })
940
+ ]
941
+ }),
942
+ /* @__PURE__ */ jsxs2("div", {
943
+ className: "hkm-social-main",
944
+ children: [
945
+ /* @__PURE__ */ jsxs2("div", {
946
+ "aria-hidden": "true",
947
+ className: "hkm-social-tabs",
948
+ children: [
949
+ /* @__PURE__ */ jsx2("span", {
950
+ "data-hkm-active": "",
951
+ children: "For you"
952
+ }),
953
+ /* @__PURE__ */ jsx2("span", {
954
+ children: "Following"
955
+ })
956
+ ]
957
+ }),
958
+ /* @__PURE__ */ jsxs2("div", {
959
+ "aria-hidden": "true",
960
+ className: "hkm-social-compose",
961
+ children: [
962
+ /* @__PURE__ */ jsx2(Avatar, {
963
+ name: viewer,
964
+ size: 36
965
+ }),
966
+ /* @__PURE__ */ jsx2("span", {
967
+ className: "hkm-social-compose-field",
968
+ children: "Share something"
969
+ }),
970
+ /* @__PURE__ */ jsx2("span", {
971
+ className: "hkm-social-compose-button",
972
+ children: "Post"
973
+ })
974
+ ]
975
+ }),
976
+ /* @__PURE__ */ jsx2("div", {
977
+ className: "hkm-feed",
978
+ children: posts.map((post, index) => /* @__PURE__ */ jsx2(Fragment2, {
979
+ children: renderPost(post, index)
980
+ }, keys[index]))
981
+ })
982
+ ]
983
+ }),
984
+ /* @__PURE__ */ jsx2("div", {
985
+ "aria-hidden": "true",
986
+ className: "hkm-social-aside",
987
+ children: aside ?? /* @__PURE__ */ jsxs2(Fragment3, {
988
+ children: [
989
+ /* @__PURE__ */ jsxs2("span", {
990
+ className: "hkm-search-field",
991
+ children: [
992
+ /* @__PURE__ */ jsx2(MockupGlyph, {
993
+ name: "search",
994
+ size: 14
995
+ }),
996
+ "Search"
997
+ ]
998
+ }),
999
+ /* @__PURE__ */ jsxs2("span", {
1000
+ className: "hkm-card hkm-aside-card",
1001
+ children: [
1002
+ /* @__PURE__ */ jsx2("span", {
1003
+ className: "hkm-aside-title",
1004
+ children: "Trending"
1005
+ }),
1006
+ ["Night markets", "Rail timetables", "Sourdough"].map((topic) => /* @__PURE__ */ jsx2("span", {
1007
+ className: "hkm-aside-line",
1008
+ children: topic
1009
+ }, topic))
1010
+ ]
1011
+ })
1012
+ ]
1013
+ })
1014
+ })
1015
+ ]
1016
+ })
1017
+ })
1018
+ });
1019
+ }
1020
+ function SocialPost({
1021
+ attributes,
1022
+ counts,
1023
+ handle,
1024
+ name,
1025
+ optOut,
1026
+ overlay,
1027
+ photo,
1028
+ text,
1029
+ time
1030
+ }) {
1031
+ return /* @__PURE__ */ jsxs2("div", {
1032
+ ...attributes,
1033
+ className: "hkm-unit hkm-post",
1034
+ children: [
1035
+ overlay,
1036
+ /* @__PURE__ */ jsx2(Avatar, {
1037
+ name,
1038
+ size: 40
1039
+ }),
1040
+ /* @__PURE__ */ jsxs2("div", {
1041
+ className: "hkm-post-body",
1042
+ children: [
1043
+ /* @__PURE__ */ jsxs2("div", {
1044
+ className: "hkm-post-head",
1045
+ children: [
1046
+ /* @__PURE__ */ jsx2("b", {
1047
+ children: /* @__PURE__ */ jsx2(SampleText, {
1048
+ ...sample(optOut),
1049
+ children: name
1050
+ })
1051
+ }),
1052
+ /* @__PURE__ */ jsx2("span", {
1053
+ className: "hkm-muted",
1054
+ children: /* @__PURE__ */ jsxs2(SampleText, {
1055
+ ...sample(optOut),
1056
+ children: [
1057
+ "@",
1058
+ handle,
1059
+ " · ",
1060
+ time
1061
+ ]
1062
+ })
1063
+ }),
1064
+ /* @__PURE__ */ jsx2("span", {
1065
+ "aria-hidden": "true",
1066
+ className: "hkm-muted hkm-post-more",
1067
+ children: /* @__PURE__ */ jsx2(MockupGlyph, {
1068
+ name: "more",
1069
+ size: 18
1070
+ })
1071
+ })
1072
+ ]
1073
+ }),
1074
+ /* @__PURE__ */ jsx2("div", {
1075
+ className: "hkm-post-text",
1076
+ children: /* @__PURE__ */ jsx2(SampleParagraphs, {
1077
+ ...sample(optOut),
1078
+ text
1079
+ })
1080
+ }),
1081
+ photo === undefined ? null : /* @__PURE__ */ jsx2(PlaceholderPhoto, {
1082
+ className: "hkm-post-photo",
1083
+ seed: photo
1084
+ }),
1085
+ counts === undefined ? null : /* @__PURE__ */ jsxs2("div", {
1086
+ "aria-hidden": "true",
1087
+ className: "hkm-post-actions hkm-muted",
1088
+ children: [
1089
+ /* @__PURE__ */ jsxs2("span", {
1090
+ children: [
1091
+ /* @__PURE__ */ jsx2(MockupGlyph, {
1092
+ name: "reply",
1093
+ size: 17
1094
+ }),
1095
+ compact(counts[0])
1096
+ ]
1097
+ }),
1098
+ /* @__PURE__ */ jsxs2("span", {
1099
+ children: [
1100
+ /* @__PURE__ */ jsx2(MockupGlyph, {
1101
+ name: "repost",
1102
+ size: 17
1103
+ }),
1104
+ compact(counts[1])
1105
+ ]
1106
+ }),
1107
+ /* @__PURE__ */ jsxs2("span", {
1108
+ children: [
1109
+ /* @__PURE__ */ jsx2(MockupGlyph, {
1110
+ name: "heart",
1111
+ size: 17
1112
+ }),
1113
+ compact(counts[2])
1114
+ ]
1115
+ }),
1116
+ /* @__PURE__ */ jsxs2("span", {
1117
+ children: [
1118
+ /* @__PURE__ */ jsx2(MockupGlyph, {
1119
+ name: "chart",
1120
+ size: 17
1121
+ }),
1122
+ compact(counts[3])
1123
+ ]
1124
+ }),
1125
+ /* @__PURE__ */ jsx2("span", {
1126
+ className: "hkm-post-actions-end",
1127
+ children: /* @__PURE__ */ jsx2(MockupGlyph, {
1128
+ name: "share",
1129
+ size: 17
1130
+ })
1131
+ })
1132
+ ]
1133
+ })
1134
+ ]
1135
+ })
1136
+ ]
1137
+ });
1138
+ }
1139
+ function WorkFeed({
1140
+ aside,
1141
+ height,
1142
+ postKey,
1143
+ posts,
1144
+ renderPost,
1145
+ url = "network.example/feed",
1146
+ viewer = "Alex Moreno",
1147
+ ...root
1148
+ }) {
1149
+ const keys = keyed(posts, postKey, "WorkFeed");
1150
+ return /* @__PURE__ */ jsx2(MockupRoot, {
1151
+ ...root,
1152
+ kind: "work",
1153
+ children: /* @__PURE__ */ jsxs2(BrowserWindow, {
1154
+ ...height === undefined ? {} : {
1155
+ height
1156
+ },
1157
+ url,
1158
+ children: [
1159
+ /* @__PURE__ */ jsxs2("div", {
1160
+ "aria-hidden": "true",
1161
+ className: "hkm-work-top",
1162
+ children: [
1163
+ /* @__PURE__ */ jsx2("span", {
1164
+ className: "hkm-work-mark",
1165
+ children: /* @__PURE__ */ jsx2(MockupGlyph, {
1166
+ name: "grid",
1167
+ size: 18
1168
+ })
1169
+ }),
1170
+ /* @__PURE__ */ jsxs2("span", {
1171
+ className: "hkm-search-field",
1172
+ children: [
1173
+ /* @__PURE__ */ jsx2(MockupGlyph, {
1174
+ name: "search",
1175
+ size: 14
1176
+ }),
1177
+ "Search"
1178
+ ]
1179
+ }),
1180
+ /* @__PURE__ */ jsxs2("span", {
1181
+ className: "hkm-work-nav",
1182
+ children: [
1183
+ ["home", "people", "comment", "bell"].map((glyph, index) => /* @__PURE__ */ jsx2("span", {
1184
+ "data-hkm-active": index === 0 ? "" : undefined,
1185
+ children: /* @__PURE__ */ jsx2(MockupGlyph, {
1186
+ filled: index === 0,
1187
+ name: glyph,
1188
+ size: 20
1189
+ })
1190
+ }, glyph)),
1191
+ /* @__PURE__ */ jsx2(Avatar, {
1192
+ name: viewer,
1193
+ size: 22
1194
+ })
1195
+ ]
1196
+ })
1197
+ ]
1198
+ }),
1199
+ /* @__PURE__ */ jsxs2("div", {
1200
+ className: "hkm-work",
1201
+ children: [
1202
+ /* @__PURE__ */ jsx2("div", {
1203
+ "aria-hidden": "true",
1204
+ className: "hkm-work-left",
1205
+ children: /* @__PURE__ */ jsxs2("span", {
1206
+ className: "hkm-card hkm-work-profile",
1207
+ children: [
1208
+ /* @__PURE__ */ jsx2("span", {
1209
+ className: "hkm-work-cover"
1210
+ }),
1211
+ /* @__PURE__ */ jsx2(Avatar, {
1212
+ name: viewer,
1213
+ size: 56
1214
+ }),
1215
+ /* @__PURE__ */ jsx2("b", {
1216
+ children: viewer
1217
+ }),
1218
+ /* @__PURE__ */ jsx2("span", {
1219
+ className: "hkm-muted",
1220
+ children: "Product designer"
1221
+ })
1222
+ ]
1223
+ })
1224
+ }),
1225
+ /* @__PURE__ */ jsxs2("div", {
1226
+ className: "hkm-work-main",
1227
+ children: [
1228
+ /* @__PURE__ */ jsxs2("div", {
1229
+ "aria-hidden": "true",
1230
+ className: "hkm-card hkm-work-compose",
1231
+ children: [
1232
+ /* @__PURE__ */ jsx2(Avatar, {
1233
+ name: viewer,
1234
+ size: 40
1235
+ }),
1236
+ /* @__PURE__ */ jsx2("span", {
1237
+ className: "hkm-social-compose-field",
1238
+ children: "Start a post"
1239
+ })
1240
+ ]
1241
+ }),
1242
+ posts.map((post, index) => /* @__PURE__ */ jsx2(Fragment2, {
1243
+ children: renderPost(post, index)
1244
+ }, keys[index]))
1245
+ ]
1246
+ }),
1247
+ /* @__PURE__ */ jsx2("div", {
1248
+ "aria-hidden": "true",
1249
+ className: "hkm-work-right",
1250
+ children: aside ?? /* @__PURE__ */ jsxs2("span", {
1251
+ className: "hkm-card hkm-aside-card",
1252
+ children: [
1253
+ /* @__PURE__ */ jsx2("span", {
1254
+ className: "hkm-aside-title",
1255
+ children: "Network news"
1256
+ }),
1257
+ ["Teams try shorter weeks", "Bakeries hire for nights", "Fewer meetings, same output"].map((topic) => /* @__PURE__ */ jsx2("span", {
1258
+ className: "hkm-aside-line",
1259
+ children: topic
1260
+ }, topic))
1261
+ ]
1262
+ })
1263
+ })
1264
+ ]
1265
+ })
1266
+ ]
1267
+ })
1268
+ });
1269
+ }
1270
+ function WorkPost({
1271
+ attributes,
1272
+ comment,
1273
+ headline,
1274
+ name,
1275
+ optOut,
1276
+ overlay,
1277
+ photo,
1278
+ reactions,
1279
+ text,
1280
+ time
1281
+ }) {
1282
+ return /* @__PURE__ */ jsxs2("div", {
1283
+ ...attributes,
1284
+ className: "hkm-unit hkm-card hkm-work-post",
1285
+ children: [
1286
+ overlay,
1287
+ /* @__PURE__ */ jsxs2("div", {
1288
+ className: "hkm-work-post-head",
1289
+ children: [
1290
+ /* @__PURE__ */ jsx2(Avatar, {
1291
+ name,
1292
+ size: 44
1293
+ }),
1294
+ /* @__PURE__ */ jsxs2("span", {
1295
+ className: "hkm-work-who",
1296
+ children: [
1297
+ /* @__PURE__ */ jsx2("b", {
1298
+ children: /* @__PURE__ */ jsx2(SampleText, {
1299
+ ...sample(optOut),
1300
+ children: name
1301
+ })
1302
+ }),
1303
+ /* @__PURE__ */ jsx2("span", {
1304
+ className: "hkm-muted",
1305
+ children: /* @__PURE__ */ jsx2(SampleText, {
1306
+ ...sample(optOut),
1307
+ children: headline
1308
+ })
1309
+ }),
1310
+ /* @__PURE__ */ jsx2("span", {
1311
+ className: "hkm-muted",
1312
+ children: time
1313
+ })
1314
+ ]
1315
+ }),
1316
+ /* @__PURE__ */ jsx2("span", {
1317
+ "aria-hidden": "true",
1318
+ className: "hkm-work-follow",
1319
+ children: "+ Follow"
1320
+ })
1321
+ ]
1322
+ }),
1323
+ /* @__PURE__ */ jsx2("div", {
1324
+ className: "hkm-post-text",
1325
+ children: /* @__PURE__ */ jsx2(SampleParagraphs, {
1326
+ ...sample(optOut),
1327
+ text
1328
+ })
1329
+ }),
1330
+ photo === undefined ? null : /* @__PURE__ */ jsx2(PlaceholderPhoto, {
1331
+ className: "hkm-work-photo",
1332
+ ratio: "1.91 / 1",
1333
+ seed: photo
1334
+ }),
1335
+ reactions === undefined ? null : /* @__PURE__ */ jsxs2("div", {
1336
+ "aria-hidden": "true",
1337
+ className: "hkm-work-counts hkm-muted",
1338
+ children: [
1339
+ /* @__PURE__ */ jsx2("span", {
1340
+ children: counted(reactions[0], "reaction")
1341
+ }),
1342
+ /* @__PURE__ */ jsxs2("span", {
1343
+ children: [
1344
+ counted(reactions[1], "comment"),
1345
+ " · ",
1346
+ counted(reactions[2], "repost")
1347
+ ]
1348
+ })
1349
+ ]
1350
+ }),
1351
+ /* @__PURE__ */ jsxs2("div", {
1352
+ "aria-hidden": "true",
1353
+ className: "hkm-work-actions hkm-muted",
1354
+ children: [
1355
+ /* @__PURE__ */ jsxs2("span", {
1356
+ children: [
1357
+ /* @__PURE__ */ jsx2(MockupGlyph, {
1358
+ name: "thumb",
1359
+ size: 18
1360
+ }),
1361
+ "Like"
1362
+ ]
1363
+ }),
1364
+ /* @__PURE__ */ jsxs2("span", {
1365
+ children: [
1366
+ /* @__PURE__ */ jsx2(MockupGlyph, {
1367
+ name: "comment",
1368
+ size: 18
1369
+ }),
1370
+ "Comment"
1371
+ ]
1372
+ }),
1373
+ /* @__PURE__ */ jsxs2("span", {
1374
+ children: [
1375
+ /* @__PURE__ */ jsx2(MockupGlyph, {
1376
+ name: "repost",
1377
+ size: 18
1378
+ }),
1379
+ "Repost"
1380
+ ]
1381
+ }),
1382
+ /* @__PURE__ */ jsxs2("span", {
1383
+ children: [
1384
+ /* @__PURE__ */ jsx2(MockupGlyph, {
1385
+ name: "send",
1386
+ size: 18
1387
+ }),
1388
+ "Send"
1389
+ ]
1390
+ })
1391
+ ]
1392
+ }),
1393
+ comment === undefined ? null : /* @__PURE__ */ jsxs2("div", {
1394
+ className: "hkm-work-comment",
1395
+ children: [
1396
+ /* @__PURE__ */ jsx2(Avatar, {
1397
+ name: comment.name,
1398
+ size: 30
1399
+ }),
1400
+ /* @__PURE__ */ jsxs2("div", {
1401
+ ...comment.attributes,
1402
+ className: "hkm-unit hkm-work-comment-box",
1403
+ children: [
1404
+ comment.overlay,
1405
+ /* @__PURE__ */ jsx2("b", {
1406
+ children: /* @__PURE__ */ jsx2(SampleText, {
1407
+ ...sample(optOut),
1408
+ children: comment.name
1409
+ })
1410
+ }),
1411
+ /* @__PURE__ */ jsx2("span", {
1412
+ className: "hkm-muted",
1413
+ children: /* @__PURE__ */ jsx2(SampleText, {
1414
+ ...sample(optOut),
1415
+ children: comment.headline
1416
+ })
1417
+ }),
1418
+ /* @__PURE__ */ jsx2(SampleParagraphs, {
1419
+ ...sample(optOut),
1420
+ text: comment.text
1421
+ })
1422
+ ]
1423
+ })
1424
+ ]
1425
+ })
1426
+ ]
1427
+ });
1428
+ }
1429
+ var FOLDERS = [["inbox", "Inbox"], ["star", "Starred"], ["clock", "Snoozed"], ["send", "Sent"], ["file", "Drafts"], ["archive", "Archive"]];
1430
+ function Inbox({
1431
+ height,
1432
+ open,
1433
+ renderMessage,
1434
+ renderRow,
1435
+ rowKey,
1436
+ rows,
1437
+ unread,
1438
+ url = "mail.example/inbox",
1439
+ ...root
1440
+ }) {
1441
+ const keys = keyed(rows, rowKey, "Inbox");
1442
+ if (open !== undefined && renderMessage === undefined)
1443
+ throw new TypeError("Inbox needs renderMessage when open is set.");
1444
+ return /* @__PURE__ */ jsx2(MockupRoot, {
1445
+ ...root,
1446
+ kind: "inbox",
1447
+ children: /* @__PURE__ */ jsx2(BrowserWindow, {
1448
+ ...height === undefined ? {} : {
1449
+ height
1450
+ },
1451
+ url,
1452
+ children: /* @__PURE__ */ jsxs2("div", {
1453
+ className: "hkm-inbox",
1454
+ "data-hkm-open": open === undefined ? undefined : "",
1455
+ children: [
1456
+ /* @__PURE__ */ jsxs2("div", {
1457
+ "aria-hidden": "true",
1458
+ className: "hkm-inbox-folders",
1459
+ children: [
1460
+ /* @__PURE__ */ jsxs2("span", {
1461
+ className: "hkm-inbox-compose",
1462
+ children: [
1463
+ /* @__PURE__ */ jsx2(MockupGlyph, {
1464
+ name: "pencil",
1465
+ size: 16
1466
+ }),
1467
+ "Compose"
1468
+ ]
1469
+ }),
1470
+ FOLDERS.map(([glyph, label], index) => /* @__PURE__ */ jsxs2("span", {
1471
+ className: "hkm-rail-item",
1472
+ "data-hkm-active": index === 0 ? "" : undefined,
1473
+ children: [
1474
+ /* @__PURE__ */ jsx2(MockupGlyph, {
1475
+ name: glyph,
1476
+ size: 17
1477
+ }),
1478
+ /* @__PURE__ */ jsx2("span", {
1479
+ className: "hkm-rail-label",
1480
+ children: label
1481
+ }),
1482
+ index === 0 && unread !== undefined ? /* @__PURE__ */ jsx2("span", {
1483
+ className: "hkm-inbox-count",
1484
+ children: compact(unread)
1485
+ }) : null
1486
+ ]
1487
+ }, label))
1488
+ ]
1489
+ }),
1490
+ /* @__PURE__ */ jsxs2("div", {
1491
+ className: "hkm-inbox-list",
1492
+ children: [
1493
+ /* @__PURE__ */ jsx2("div", {
1494
+ "aria-hidden": "true",
1495
+ className: "hkm-inbox-toolbar",
1496
+ children: /* @__PURE__ */ jsxs2("span", {
1497
+ className: "hkm-search-field",
1498
+ children: [
1499
+ /* @__PURE__ */ jsx2(MockupGlyph, {
1500
+ name: "search",
1501
+ size: 14
1502
+ }),
1503
+ "Search mail"
1504
+ ]
1505
+ })
1506
+ }),
1507
+ /* @__PURE__ */ jsx2("ul", {
1508
+ className: "hkm-inbox-rows",
1509
+ children: rows.map((row, index) => /* @__PURE__ */ jsx2("li", {
1510
+ children: renderRow(row, index)
1511
+ }, keys[index]))
1512
+ })
1513
+ ]
1514
+ }),
1515
+ open === undefined || renderMessage === undefined ? null : /* @__PURE__ */ jsx2("div", {
1516
+ className: "hkm-inbox-reader",
1517
+ children: renderMessage(open)
1518
+ })
1519
+ ]
1520
+ })
1521
+ })
1522
+ });
1523
+ }
1524
+ function InboxRow({
1525
+ attributes,
1526
+ from,
1527
+ optOut,
1528
+ overlay,
1529
+ preview,
1530
+ selected = false,
1531
+ starred = false,
1532
+ subject,
1533
+ time,
1534
+ unread = false
1535
+ }) {
1536
+ return /* @__PURE__ */ jsxs2("div", {
1537
+ ...attributes,
1538
+ className: "hkm-unit hkm-inbox-row",
1539
+ "data-hkm-selected": selected ? "" : undefined,
1540
+ "data-hkm-unread": unread ? "" : undefined,
1541
+ children: [
1542
+ overlay,
1543
+ /* @__PURE__ */ jsx2("span", {
1544
+ "aria-hidden": "true",
1545
+ className: "hkm-inbox-star",
1546
+ "data-hkm-on": starred ? "" : undefined,
1547
+ children: /* @__PURE__ */ jsx2(MockupGlyph, {
1548
+ filled: starred,
1549
+ name: "star",
1550
+ size: 15
1551
+ })
1552
+ }),
1553
+ /* @__PURE__ */ jsx2("span", {
1554
+ className: "hkm-inbox-from",
1555
+ children: /* @__PURE__ */ jsx2(SampleText, {
1556
+ ...sample(optOut),
1557
+ children: from
1558
+ })
1559
+ }),
1560
+ /* @__PURE__ */ jsxs2("span", {
1561
+ className: "hkm-inbox-line",
1562
+ children: [
1563
+ /* @__PURE__ */ jsx2("span", {
1564
+ className: "hkm-inbox-subject",
1565
+ children: /* @__PURE__ */ jsx2(SampleText, {
1566
+ ...sample(optOut),
1567
+ children: subject
1568
+ })
1569
+ }),
1570
+ /* @__PURE__ */ jsxs2("span", {
1571
+ className: "hkm-muted",
1572
+ children: [
1573
+ " · ",
1574
+ /* @__PURE__ */ jsx2(SampleText, {
1575
+ ...sample(optOut),
1576
+ children: preview
1577
+ })
1578
+ ]
1579
+ })
1580
+ ]
1581
+ }),
1582
+ /* @__PURE__ */ jsx2("span", {
1583
+ className: "hkm-inbox-time hkm-muted",
1584
+ children: time
1585
+ })
1586
+ ]
1587
+ });
1588
+ }
1589
+ function InboxMessage({
1590
+ attributes,
1591
+ body,
1592
+ from,
1593
+ optOut,
1594
+ overlay,
1595
+ subject,
1596
+ time,
1597
+ to = "me"
1598
+ }) {
1599
+ return /* @__PURE__ */ jsxs2("div", {
1600
+ ...attributes,
1601
+ className: "hkm-unit hkm-inbox-message",
1602
+ children: [
1603
+ overlay,
1604
+ /* @__PURE__ */ jsx2("div", {
1605
+ className: "hkm-inbox-message-subject",
1606
+ children: /* @__PURE__ */ jsx2(SampleText, {
1607
+ ...sample(optOut),
1608
+ children: subject
1609
+ })
1610
+ }),
1611
+ /* @__PURE__ */ jsxs2("div", {
1612
+ className: "hkm-inbox-message-head",
1613
+ children: [
1614
+ /* @__PURE__ */ jsx2(Avatar, {
1615
+ name: from,
1616
+ size: 36
1617
+ }),
1618
+ /* @__PURE__ */ jsxs2("span", {
1619
+ className: "hkm-inbox-message-who",
1620
+ children: [
1621
+ /* @__PURE__ */ jsx2("b", {
1622
+ children: /* @__PURE__ */ jsx2(SampleText, {
1623
+ ...sample(optOut),
1624
+ children: from
1625
+ })
1626
+ }),
1627
+ /* @__PURE__ */ jsxs2("span", {
1628
+ className: "hkm-muted",
1629
+ children: [
1630
+ "to ",
1631
+ to
1632
+ ]
1633
+ })
1634
+ ]
1635
+ }),
1636
+ /* @__PURE__ */ jsx2("span", {
1637
+ className: "hkm-muted",
1638
+ children: time
1639
+ })
1640
+ ]
1641
+ }),
1642
+ /* @__PURE__ */ jsx2("div", {
1643
+ className: "hkm-inbox-message-body",
1644
+ children: /* @__PURE__ */ jsx2(SampleParagraphs, {
1645
+ ...sample(optOut),
1646
+ text: body
1647
+ })
1648
+ })
1649
+ ]
1650
+ });
1651
+ }
1652
+ function ArticlePage({
1653
+ byline,
1654
+ comments,
1655
+ date,
1656
+ decorate,
1657
+ dek,
1658
+ height,
1659
+ kicker,
1660
+ paragraphs,
1661
+ photo,
1662
+ site = "The Daily Example",
1663
+ title,
1664
+ url = "news.example/story",
1665
+ ...root
1666
+ }) {
1667
+ if (/^by\s/iu.test(byline.trim()))
1668
+ throw new RangeError(`ArticlePage byline is the author's name; the page adds "By".`);
1669
+ const opt = sample(root.optOut);
1670
+ return /* @__PURE__ */ jsx2(MockupRoot, {
1671
+ ...root,
1672
+ kind: "article",
1673
+ children: /* @__PURE__ */ jsx2(BrowserWindow, {
1674
+ ...height === undefined ? {} : {
1675
+ height
1676
+ },
1677
+ url,
1678
+ children: /* @__PURE__ */ jsxs2("div", {
1679
+ className: "hkm-article",
1680
+ children: [
1681
+ /* @__PURE__ */ jsxs2("div", {
1682
+ "aria-hidden": "true",
1683
+ className: "hkm-article-masthead",
1684
+ children: [
1685
+ /* @__PURE__ */ jsx2(MockupGlyph, {
1686
+ name: "menu",
1687
+ size: 18
1688
+ }),
1689
+ /* @__PURE__ */ jsx2("span", {
1690
+ className: "hkm-article-site",
1691
+ children: site
1692
+ }),
1693
+ /* @__PURE__ */ jsx2(MockupGlyph, {
1694
+ name: "search",
1695
+ size: 18
1696
+ })
1697
+ ]
1698
+ }),
1699
+ /* @__PURE__ */ jsxs2("div", {
1700
+ className: "hkm-article-body",
1701
+ children: [
1702
+ kicker === undefined ? null : /* @__PURE__ */ jsx2("div", {
1703
+ className: "hkm-article-kicker",
1704
+ children: kicker
1705
+ }),
1706
+ /* @__PURE__ */ jsx2("div", {
1707
+ className: "hkm-article-title",
1708
+ children: /* @__PURE__ */ jsx2(SampleText, {
1709
+ ...opt,
1710
+ children: title
1711
+ })
1712
+ }),
1713
+ dek === undefined ? null : /* @__PURE__ */ jsx2("p", {
1714
+ className: "hkm-article-dek",
1715
+ children: /* @__PURE__ */ jsx2(SampleText, {
1716
+ ...opt,
1717
+ children: dek
1718
+ })
1719
+ }),
1720
+ /* @__PURE__ */ jsxs2("div", {
1721
+ className: "hkm-article-byline",
1722
+ children: [
1723
+ /* @__PURE__ */ jsx2(Avatar, {
1724
+ name: byline,
1725
+ size: 28
1726
+ }),
1727
+ /* @__PURE__ */ jsxs2("span", {
1728
+ children: [
1729
+ "By ",
1730
+ /* @__PURE__ */ jsx2(SampleText, {
1731
+ ...opt,
1732
+ children: byline
1733
+ })
1734
+ ]
1735
+ }),
1736
+ date === undefined ? null : /* @__PURE__ */ jsx2("span", {
1737
+ className: "hkm-muted",
1738
+ children: date
1739
+ })
1740
+ ]
1741
+ }),
1742
+ photo === undefined ? null : /* @__PURE__ */ jsx2(PlaceholderPhoto, {
1743
+ className: "hkm-article-photo",
1744
+ ratio: "3 / 2",
1745
+ seed: photo
1746
+ }),
1747
+ /* @__PURE__ */ jsx2("div", {
1748
+ className: "hkm-article-text",
1749
+ children: paragraphs.map((paragraph, index) => {
1750
+ const node = /* @__PURE__ */ jsx2("p", {
1751
+ className: "hkm-unit",
1752
+ children: /* @__PURE__ */ jsx2(SampleText, {
1753
+ ...opt,
1754
+ children: paragraph
1755
+ })
1756
+ }, index);
1757
+ return decorate === undefined ? node : /* @__PURE__ */ jsx2(Fragment2, {
1758
+ children: decorate(node, index)
1759
+ }, index);
1760
+ })
1761
+ }),
1762
+ comments === undefined || comments.length === 0 ? null : /* @__PURE__ */ jsxs2("div", {
1763
+ className: "hkm-article-comments",
1764
+ children: [
1765
+ /* @__PURE__ */ jsx2("div", {
1766
+ className: "hkm-article-comments-title",
1767
+ children: counted(comments.length, "comment")
1768
+ }),
1769
+ comments.map((comment, index) => /* @__PURE__ */ jsxs2("div", {
1770
+ ...comment.attributes,
1771
+ className: "hkm-unit hkm-article-comment",
1772
+ children: [
1773
+ comment.overlay,
1774
+ /* @__PURE__ */ jsx2(Avatar, {
1775
+ name: comment.name,
1776
+ size: 30
1777
+ }),
1778
+ /* @__PURE__ */ jsxs2("span", {
1779
+ className: "hkm-article-comment-body",
1780
+ children: [
1781
+ /* @__PURE__ */ jsx2("b", {
1782
+ children: /* @__PURE__ */ jsx2(SampleText, {
1783
+ ...opt,
1784
+ children: comment.name
1785
+ })
1786
+ }),
1787
+ /* @__PURE__ */ jsxs2("span", {
1788
+ className: "hkm-muted",
1789
+ children: [
1790
+ " ",
1791
+ comment.time
1792
+ ]
1793
+ }),
1794
+ /* @__PURE__ */ jsx2(SampleParagraphs, {
1795
+ ...opt,
1796
+ text: comment.text
1797
+ })
1798
+ ]
1799
+ })
1800
+ ]
1801
+ }, index))
1802
+ ]
1803
+ })
1804
+ ]
1805
+ })
1806
+ ]
1807
+ })
1808
+ })
1809
+ });
1810
+ }
1811
+ export {
1812
+ phoneStyle,
1813
+ mockupInitials,
1814
+ mockupHash,
1815
+ mockupGlyphNames,
1816
+ mockupAddress,
1817
+ joinMockupClasses,
1818
+ isEmojiOnly,
1819
+ compact,
1820
+ chatSide,
1821
+ assertMockupDescription,
1822
+ WorkPost,
1823
+ WorkFeed,
1824
+ WindowLights,
1825
+ TypingIndicator,
1826
+ TerminalFrame,
1827
+ SocialPost,
1828
+ SocialFeed,
1829
+ ScrollFade,
1830
+ SampleText,
1831
+ SampleParagraphs,
1832
+ PlaceholderPhoto,
1833
+ PhoneShell,
1834
+ PhoneFrame,
1835
+ MockupRoot,
1836
+ MockupGlyph,
1837
+ MenuBarPopover,
1838
+ MacWindow,
1839
+ MOCKUP_EXAMPLE_HOST,
1840
+ InboxRow,
1841
+ InboxMessage,
1842
+ Inbox,
1843
+ Hotspot,
1844
+ ChatThread,
1845
+ BrowserWindow,
1846
+ BrowserFrame,
1847
+ Avatar,
1848
+ ArticlePage,
1849
+ AgentSession
1850
+ };