@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
package/dist/index.js ADDED
@@ -0,0 +1,237 @@
1
+ import {
2
+ STATUS_PAGE_AGENT_PREFIX,
3
+ STATUS_PAGE_BACK_LABEL,
4
+ STATUS_PAGE_HINT_PREFIX,
5
+ STATUS_PAGE_MAX_NEXT,
6
+ STATUS_PAGE_MAX_ROUTES,
7
+ STATUS_PAGE_NEXT_HEADING_ID,
8
+ auroraColors,
9
+ breakpoints,
10
+ chromeColors,
11
+ chromeGradientStops,
12
+ colors,
13
+ controlRadius,
14
+ defaultDesignPalettePreference,
15
+ defaultDesignTheme,
16
+ designPaletteLabels,
17
+ designPaletteSources,
18
+ designPaletteStorageKey,
19
+ designPalettes,
20
+ designThemeLabel,
21
+ designThemeStorageKey,
22
+ designThemes,
23
+ elevation,
24
+ escapeArticleHtml,
25
+ fontFallbacks,
26
+ fontFamilies,
27
+ fontWeights,
28
+ formatRelativeTime,
29
+ getDesignPaletteTheme,
30
+ iconography,
31
+ interaction,
32
+ isDesignPalette,
33
+ isDesignTheme,
34
+ layout,
35
+ motion,
36
+ normalizeDesignPalettePreference,
37
+ normalizeDesignTheme,
38
+ normalizeStatusPath,
39
+ paletteColors,
40
+ parseDesignPalettePreference,
41
+ parseRelativeTimeInput,
42
+ parseStatusPageRoutes,
43
+ radius,
44
+ relativeTimeUnits,
45
+ renderArticleBylineHtml,
46
+ renderArticleCalloutHtml,
47
+ renderArticleHtml,
48
+ renderArticleIndexHtml,
49
+ renderArticleProvenanceHtml,
50
+ renderArticleRelatedHtml,
51
+ renderArticleSourcesHtml,
52
+ renderStatusPageHtml,
53
+ resolveDesignPalettePreference,
54
+ resolveDesignTheme,
55
+ resolveRelativeTime,
56
+ resolveStatusPage,
57
+ siteThemes,
58
+ spacing,
59
+ stacking,
60
+ statusPageRoutesAttribute,
61
+ suggestStatusRoute,
62
+ themeFor,
63
+ typeScale,
64
+ typography
65
+ } from "./chunk-7b1586eb.js";
66
+ import {
67
+ detectPlatform,
68
+ isKnownPlatformId,
69
+ isPlatformId,
70
+ knownPlatformIds,
71
+ matchDetectedPlatform,
72
+ platformLabel,
73
+ platformMark
74
+ } from "./chunk-wzvdn8ey.js";
75
+ import {
76
+ highlightCode,
77
+ inferSyntaxLanguage,
78
+ maximumSyntaxCharacters,
79
+ resolveSyntaxLanguage,
80
+ syntaxLanguages
81
+ } from "./chunk-he8eznb1.js";
82
+ import {
83
+ ARTICLE_ADMISSION_MINIMUM,
84
+ ARTICLE_BYLINE_PREFIX,
85
+ ARTICLE_REASSESS_WINDOW,
86
+ ARTICLE_SOURCES_HEADING,
87
+ ARTICLE_TOC_LABEL,
88
+ ArticleAdmissionError,
89
+ articleAdmissionPasses,
90
+ articleAdmissionScore,
91
+ articleAdmissionsDue,
92
+ articleCalloutTones,
93
+ articleDaysBetween,
94
+ articleDraftingKinds,
95
+ articleLifecycles,
96
+ articleProvenanceFromAdmission,
97
+ articleProvenanceSentence,
98
+ articleReviewerNameDisclosesAi,
99
+ articleReviewerTypes,
100
+ articleScoreKeys,
101
+ articleVideoJsonLd,
102
+ assertArticleAdmissions,
103
+ assertArticleAuthor,
104
+ assertArticleCalloutTone,
105
+ assertArticleDates,
106
+ assertArticleHref,
107
+ assertArticleVideo,
108
+ formatArticleDate,
109
+ isArticleIndexable,
110
+ isArticleIsoDate,
111
+ orderedArticleVideoSources,
112
+ parseArticleAdmissions
113
+ } from "./chunk-77391vmq.js";
114
+ import {
115
+ providerMark,
116
+ providerMarkArtDataUri,
117
+ providerMarkFallback,
118
+ providerMarkGlyphDataUri,
119
+ providerMarkMonogram,
120
+ providerMarkOnAccent,
121
+ providerMarks
122
+ } from "./chunk-eh71jz57.js";
123
+ import"./chunk-5gtx3pza.js";
124
+ export {
125
+ typography,
126
+ typeScale,
127
+ themeFor,
128
+ syntaxLanguages,
129
+ suggestStatusRoute,
130
+ statusPageRoutesAttribute,
131
+ stacking,
132
+ spacing,
133
+ siteThemes,
134
+ resolveSyntaxLanguage,
135
+ resolveStatusPage,
136
+ resolveRelativeTime,
137
+ resolveDesignTheme,
138
+ resolveDesignPalettePreference,
139
+ renderStatusPageHtml,
140
+ renderArticleSourcesHtml,
141
+ renderArticleRelatedHtml,
142
+ renderArticleProvenanceHtml,
143
+ renderArticleIndexHtml,
144
+ renderArticleHtml,
145
+ renderArticleCalloutHtml,
146
+ renderArticleBylineHtml,
147
+ relativeTimeUnits,
148
+ radius,
149
+ providerMarks,
150
+ providerMarkOnAccent,
151
+ providerMarkMonogram,
152
+ providerMarkGlyphDataUri,
153
+ providerMarkFallback,
154
+ providerMarkArtDataUri,
155
+ providerMark,
156
+ platformMark,
157
+ platformLabel,
158
+ parseStatusPageRoutes,
159
+ parseRelativeTimeInput,
160
+ parseDesignPalettePreference,
161
+ parseArticleAdmissions,
162
+ paletteColors,
163
+ orderedArticleVideoSources,
164
+ normalizeStatusPath,
165
+ normalizeDesignTheme,
166
+ normalizeDesignPalettePreference,
167
+ motion,
168
+ maximumSyntaxCharacters,
169
+ matchDetectedPlatform,
170
+ layout,
171
+ knownPlatformIds,
172
+ isPlatformId,
173
+ isKnownPlatformId,
174
+ isDesignTheme,
175
+ isDesignPalette,
176
+ isArticleIsoDate,
177
+ isArticleIndexable,
178
+ interaction,
179
+ inferSyntaxLanguage,
180
+ iconography,
181
+ highlightCode,
182
+ getDesignPaletteTheme,
183
+ formatRelativeTime,
184
+ formatArticleDate,
185
+ fontWeights,
186
+ fontFamilies,
187
+ fontFallbacks,
188
+ escapeArticleHtml,
189
+ elevation,
190
+ detectPlatform,
191
+ designThemes,
192
+ designThemeStorageKey,
193
+ designThemeLabel,
194
+ designPalettes,
195
+ designPaletteStorageKey,
196
+ designPaletteSources,
197
+ designPaletteLabels,
198
+ defaultDesignTheme,
199
+ defaultDesignPalettePreference,
200
+ controlRadius,
201
+ colors,
202
+ chromeGradientStops,
203
+ chromeColors,
204
+ breakpoints,
205
+ auroraColors,
206
+ assertArticleVideo,
207
+ assertArticleHref,
208
+ assertArticleDates,
209
+ assertArticleCalloutTone,
210
+ assertArticleAuthor,
211
+ assertArticleAdmissions,
212
+ articleVideoJsonLd,
213
+ articleScoreKeys,
214
+ articleReviewerTypes,
215
+ articleReviewerNameDisclosesAi,
216
+ articleProvenanceSentence,
217
+ articleProvenanceFromAdmission,
218
+ articleLifecycles,
219
+ articleDraftingKinds,
220
+ articleDaysBetween,
221
+ articleCalloutTones,
222
+ articleAdmissionsDue,
223
+ articleAdmissionScore,
224
+ articleAdmissionPasses,
225
+ STATUS_PAGE_NEXT_HEADING_ID,
226
+ STATUS_PAGE_MAX_ROUTES,
227
+ STATUS_PAGE_MAX_NEXT,
228
+ STATUS_PAGE_HINT_PREFIX,
229
+ STATUS_PAGE_BACK_LABEL,
230
+ STATUS_PAGE_AGENT_PREFIX,
231
+ ArticleAdmissionError,
232
+ ARTICLE_TOC_LABEL,
233
+ ARTICLE_SOURCES_HEADING,
234
+ ARTICLE_REASSESS_WINDOW,
235
+ ARTICLE_BYLINE_PREFIX,
236
+ ARTICLE_ADMISSION_MINIMUM
237
+ };
package/dist/launch.js ADDED
@@ -0,0 +1,41 @@
1
+ import {
2
+ LAUNCH_BANNED_WORDS,
3
+ LAUNCH_INTERNAL_WORDS,
4
+ LAUNCH_LIMITS,
5
+ LaunchKitError,
6
+ assertLaunchBeats,
7
+ assertLaunchKit,
8
+ blueskyPostLength,
9
+ buildSocialKit,
10
+ characterLength,
11
+ isSocialBeat,
12
+ launchBeatParts,
13
+ launchCopyProblems,
14
+ launchPlaceholders,
15
+ launchPostOnlyParts,
16
+ resolveLaunchBeats,
17
+ socialBeats,
18
+ socialPostText,
19
+ xPostLength
20
+ } from "./chunk-cejpzyfh.js";
21
+ import"./chunk-5gtx3pza.js";
22
+ export {
23
+ xPostLength,
24
+ socialPostText,
25
+ socialBeats,
26
+ resolveLaunchBeats,
27
+ launchPostOnlyParts,
28
+ launchPlaceholders,
29
+ launchCopyProblems,
30
+ launchBeatParts,
31
+ isSocialBeat,
32
+ characterLength,
33
+ buildSocialKit,
34
+ blueskyPostLength,
35
+ assertLaunchKit,
36
+ assertLaunchBeats,
37
+ LaunchKitError,
38
+ LAUNCH_LIMITS,
39
+ LAUNCH_INTERNAL_WORDS,
40
+ LAUNCH_BANNED_WORDS
41
+ };
@@ -0,0 +1,422 @@
1
+ "use client";
2
+ import {
3
+ joinMockupClasses
4
+ } from "../chunk-evb02bc1.js";
5
+ import"../chunk-5gtx3pza.js";
6
+
7
+ // src/mockups/client.tsx
8
+ import { useId, useLayoutEffect, useRef, useState } from "react";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ var useIsomorphicLayoutEffect = typeof document === "undefined" ? () => {
11
+ return;
12
+ } : useLayoutEffect;
13
+ function assertUniqueIds(items, what) {
14
+ if (items.length === 0)
15
+ throw new RangeError(`${what} needs at least one entry.`);
16
+ const seen = new Set;
17
+ for (const item of items) {
18
+ if (typeof item.id !== "string" || !/^[a-z0-9][a-z0-9-]*$/u.test(item.id)) {
19
+ throw new TypeError(`${what} ids must be lowercase letters, digits, and dashes: ${JSON.stringify(item.id)}`);
20
+ }
21
+ if (seen.has(item.id))
22
+ throw new RangeError(`${what} ids must be unique: ${item.id}`);
23
+ seen.add(item.id);
24
+ }
25
+ }
26
+ function itemAt(items, index, what) {
27
+ const item = items[index];
28
+ if (item === undefined)
29
+ throw new RangeError(`${what} has no entry at ${String(index)}.`);
30
+ return item;
31
+ }
32
+ function assertCaption(caption, component) {
33
+ if (typeof caption !== "string" || caption.trim() === "") {
34
+ throw new TypeError(`${component} needs a caption that says the picture is an illustration.`);
35
+ }
36
+ }
37
+ function nextTabIndex(key, index, count) {
38
+ if (key === "ArrowRight" || key === "ArrowDown")
39
+ return (index + 1) % count;
40
+ if (key === "ArrowLeft" || key === "ArrowUp")
41
+ return (index - 1 + count) % count;
42
+ if (key === "Home")
43
+ return 0;
44
+ if (key === "End")
45
+ return count - 1;
46
+ return;
47
+ }
48
+ function FitToWidth({
49
+ children,
50
+ className,
51
+ minWidth = 400
52
+ }) {
53
+ if (!(minWidth > 0))
54
+ throw new RangeError("FitToWidth minWidth must be positive.");
55
+ const outer = useRef(null);
56
+ const inner = useRef(null);
57
+ const [fit, setFit] = useState(null);
58
+ useIsomorphicLayoutEffect(() => {
59
+ const stage = outer.current;
60
+ const content = inner.current;
61
+ if (stage === null || content === null || typeof ResizeObserver === "undefined")
62
+ return;
63
+ const measure = () => {
64
+ const available = stage.clientWidth;
65
+ if (available <= 0)
66
+ return;
67
+ const width = Math.max(available, minWidth);
68
+ const scale = available / width;
69
+ const height = content.offsetHeight * scale;
70
+ setFit((current) => current !== null && current.width === width && current.scale === scale && current.height === height ? current : {
71
+ height,
72
+ scale,
73
+ width
74
+ });
75
+ };
76
+ measure();
77
+ const observer = new ResizeObserver(measure);
78
+ observer.observe(stage);
79
+ observer.observe(content);
80
+ return () => observer.disconnect();
81
+ }, [minWidth]);
82
+ const scaled = fit !== null && fit.scale < 1;
83
+ return /* @__PURE__ */ jsx("div", {
84
+ className: joinMockupClasses("hkm-fit", className),
85
+ ref: outer,
86
+ style: scaled ? {
87
+ height: fit.height
88
+ } : undefined,
89
+ children: /* @__PURE__ */ jsx("div", {
90
+ className: "hkm-fit-inner",
91
+ "data-hkm-scaled": scaled ? "" : undefined,
92
+ ref: inner,
93
+ style: scaled ? {
94
+ transform: `scale(${fit.scale})`,
95
+ width: fit.width
96
+ } : undefined,
97
+ children
98
+ })
99
+ });
100
+ }
101
+ function ModeShowcase({
102
+ caption,
103
+ className,
104
+ height = 440,
105
+ initial,
106
+ label,
107
+ minWidth = 400,
108
+ modeLabel = "Mode",
109
+ modes,
110
+ optionInactiveModes = [],
111
+ optionLabel = "Option",
112
+ options,
113
+ status,
114
+ surfaces,
115
+ theme
116
+ }) {
117
+ assertUniqueIds(surfaces, "ModeShowcase surface");
118
+ assertUniqueIds(modes, "ModeShowcase mode");
119
+ if (options !== undefined)
120
+ assertUniqueIds(options, "ModeShowcase option");
121
+ assertCaption(caption, "ModeShowcase");
122
+ if (!(height > 0))
123
+ throw new RangeError("ModeShowcase height must be positive.");
124
+ const id = useId();
125
+ const firstSurface = surfaces.find((surface2) => surface2.id === initial?.surface) ?? itemAt(surfaces, 0, "ModeShowcase surfaces");
126
+ const firstMode = modes.find((mode2) => mode2.id === initial?.mode) ?? itemAt(modes, 0, "ModeShowcase modes");
127
+ const firstOption = options === undefined ? undefined : options.find((option2) => option2.id === initial?.option) ?? itemAt(options, 0, "ModeShowcase options");
128
+ const [surfaceId, setSurfaceId] = useState(firstSurface.id);
129
+ const [mode, setMode] = useState(firstMode.id);
130
+ const [previousMode, setPreviousMode] = useState(firstMode.id);
131
+ const [option, setOption] = useState(firstOption?.id);
132
+ const [animated, setAnimated] = useState(false);
133
+ const tabs = useRef(new Map);
134
+ const surface = surfaces.find((entry) => entry.id === surfaceId) ?? itemAt(surfaces, 0, "ModeShowcase surfaces");
135
+ const modeChoice = modes.find((entry) => entry.id === mode) ?? itemAt(modes, 0, "ModeShowcase modes");
136
+ const optionChoice = options?.find((entry) => entry.id === option);
137
+ const optionInactive = optionInactiveModes.includes(mode);
138
+ const chooseMode = (next) => {
139
+ if (next === mode)
140
+ return;
141
+ setPreviousMode(mode);
142
+ setMode(next);
143
+ setAnimated(true);
144
+ };
145
+ const chooseOption = (next) => {
146
+ if (next === option)
147
+ return;
148
+ setOption(next);
149
+ setAnimated(true);
150
+ };
151
+ const onTabKey = (event) => {
152
+ const index = surfaces.findIndex((entry) => entry.id === surface.id);
153
+ const next = nextTabIndex(event.key, index, surfaces.length);
154
+ if (next === undefined)
155
+ return;
156
+ event.preventDefault();
157
+ const target = itemAt(surfaces, next, "ModeShowcase surfaces").id;
158
+ setSurfaceId(target);
159
+ tabs.current.get(target)?.focus();
160
+ };
161
+ const statusNode = status?.({
162
+ mode,
163
+ option,
164
+ surface: surface.id
165
+ });
166
+ return /* @__PURE__ */ jsxs("figure", {
167
+ "aria-label": label?.(surface) ?? `Illustration of ${surface.label.toLowerCase()}`,
168
+ className: joinMockupClasses("hkm-showcase", className),
169
+ "data-hkm-theme": theme,
170
+ "data-nosnippet": "",
171
+ children: [
172
+ /* @__PURE__ */ jsxs("div", {
173
+ className: "hkm-showcase-controls",
174
+ children: [
175
+ surfaces.length > 1 ? /* @__PURE__ */ jsx("div", {
176
+ "aria-label": "Surface",
177
+ className: "hkm-tabs",
178
+ role: "tablist",
179
+ children: surfaces.map((entry) => /* @__PURE__ */ jsx("button", {
180
+ "aria-controls": `${id}-panel`,
181
+ "aria-selected": entry.id === surface.id,
182
+ className: "hkm-tab",
183
+ id: `${id}-tab-${entry.id}`,
184
+ onClick: () => setSurfaceId(entry.id),
185
+ onKeyDown: onTabKey,
186
+ ref: (element) => {
187
+ if (element === null)
188
+ tabs.current.delete(entry.id);
189
+ else
190
+ tabs.current.set(entry.id, element);
191
+ },
192
+ role: "tab",
193
+ tabIndex: entry.id === surface.id ? 0 : -1,
194
+ type: "button",
195
+ children: entry.label
196
+ }, entry.id))
197
+ }) : null,
198
+ /* @__PURE__ */ jsxs("div", {
199
+ className: "hkm-showcase-settings",
200
+ children: [
201
+ /* @__PURE__ */ jsxs("div", {
202
+ className: "hkm-showcase-row",
203
+ children: [
204
+ /* @__PURE__ */ jsx("span", {
205
+ className: "hkm-showcase-label",
206
+ id: `${id}-mode`,
207
+ children: modeLabel
208
+ }),
209
+ /* @__PURE__ */ jsx("div", {
210
+ "aria-labelledby": `${id}-mode`,
211
+ className: "hkm-segmented",
212
+ role: "group",
213
+ children: modes.map((entry) => /* @__PURE__ */ jsx("button", {
214
+ "aria-pressed": entry.id === mode,
215
+ onClick: () => chooseMode(entry.id),
216
+ type: "button",
217
+ children: entry.label
218
+ }, entry.id))
219
+ })
220
+ ]
221
+ }),
222
+ options === undefined ? null : /* @__PURE__ */ jsxs("div", {
223
+ className: "hkm-showcase-row",
224
+ children: [
225
+ /* @__PURE__ */ jsx("span", {
226
+ className: "hkm-showcase-label",
227
+ id: `${id}-option`,
228
+ children: optionLabel
229
+ }),
230
+ /* @__PURE__ */ jsx("div", {
231
+ "aria-labelledby": `${id}-option`,
232
+ className: "hkm-segmented",
233
+ role: "group",
234
+ children: options.map((entry) => /* @__PURE__ */ jsx("button", {
235
+ "aria-pressed": entry.id === option,
236
+ disabled: optionInactive,
237
+ onClick: () => chooseOption(entry.id),
238
+ type: "button",
239
+ children: entry.label
240
+ }, entry.id))
241
+ })
242
+ ]
243
+ })
244
+ ]
245
+ }),
246
+ /* @__PURE__ */ jsxs("p", {
247
+ className: "hkm-showcase-hint",
248
+ children: [
249
+ modeChoice.hint,
250
+ optionChoice === undefined || optionInactive ? null : ` ${optionChoice.hint}`
251
+ ]
252
+ })
253
+ ]
254
+ }),
255
+ /* @__PURE__ */ jsx("div", {
256
+ "aria-labelledby": surfaces.length > 1 ? `${id}-tab-${surface.id}` : undefined,
257
+ className: "hkm-showcase-stage",
258
+ "data-hkm-animated": animated ? "" : undefined,
259
+ "data-hkm-from": animated ? previousMode : undefined,
260
+ id: `${id}-panel`,
261
+ role: surfaces.length > 1 ? "tabpanel" : undefined,
262
+ style: {
263
+ "--hkm-page-height": `${height}px`
264
+ },
265
+ children: /* @__PURE__ */ jsx(FitToWidth, {
266
+ minWidth,
267
+ children: surface.render({
268
+ animated,
269
+ mode,
270
+ option,
271
+ previousMode,
272
+ theme
273
+ })
274
+ })
275
+ }),
276
+ /* @__PURE__ */ jsxs("figcaption", {
277
+ className: "hkm-showcase-caption",
278
+ children: [
279
+ statusNode === undefined ? null : /* @__PURE__ */ jsx("span", {
280
+ "aria-live": "polite",
281
+ className: "hkm-showcase-status",
282
+ children: statusNode
283
+ }),
284
+ /* @__PURE__ */ jsx("span", {
285
+ children: caption
286
+ })
287
+ ]
288
+ })
289
+ ]
290
+ });
291
+ }
292
+ function StepThrough({
293
+ caption,
294
+ className,
295
+ initial,
296
+ label = "Steps",
297
+ minWidth = 400,
298
+ steps,
299
+ theme
300
+ }) {
301
+ assertUniqueIds(steps, "StepThrough step");
302
+ assertCaption(caption, "StepThrough");
303
+ const id = useId();
304
+ const [index, setIndex] = useState(() => Math.max(0, steps.findIndex((step2) => step2.id === initial)));
305
+ const [animated, setAnimated] = useState(false);
306
+ const tabs = useRef(new Map);
307
+ const current = Math.min(index, steps.length - 1);
308
+ const step = itemAt(steps, current, "StepThrough steps");
309
+ const go = (next, focus = false) => {
310
+ if (next < 0 || next >= steps.length || next === current)
311
+ return;
312
+ setIndex(next);
313
+ setAnimated(true);
314
+ if (focus)
315
+ tabs.current.get(next)?.focus();
316
+ };
317
+ const onTabKey = (event) => {
318
+ const next = nextTabIndex(event.key, current, steps.length);
319
+ if (next === undefined)
320
+ return;
321
+ event.preventDefault();
322
+ go(next, true);
323
+ };
324
+ return /* @__PURE__ */ jsxs("figure", {
325
+ "aria-label": `Illustration: ${label.toLowerCase()}`,
326
+ className: joinMockupClasses("hkm-showcase", "hkm-steps", className),
327
+ "data-hkm-theme": theme,
328
+ "data-nosnippet": "",
329
+ children: [
330
+ /* @__PURE__ */ jsx("div", {
331
+ className: "hkm-showcase-controls",
332
+ children: /* @__PURE__ */ jsx("div", {
333
+ "aria-label": label,
334
+ className: "hkm-tabs hkm-step-tabs",
335
+ role: "tablist",
336
+ children: steps.map((entry, position) => /* @__PURE__ */ jsxs("button", {
337
+ "aria-controls": `${id}-panel`,
338
+ "aria-selected": position === current,
339
+ className: "hkm-tab",
340
+ "data-hkm-done": position < current ? "" : undefined,
341
+ id: `${id}-tab-${entry.id}`,
342
+ onClick: () => go(position),
343
+ onKeyDown: onTabKey,
344
+ ref: (element) => {
345
+ if (element === null)
346
+ tabs.current.delete(position);
347
+ else
348
+ tabs.current.set(position, element);
349
+ },
350
+ role: "tab",
351
+ tabIndex: position === current ? 0 : -1,
352
+ type: "button",
353
+ children: [
354
+ /* @__PURE__ */ jsx("span", {
355
+ "aria-hidden": "true",
356
+ className: "hkm-step-number",
357
+ children: position + 1
358
+ }),
359
+ entry.label
360
+ ]
361
+ }, entry.id))
362
+ })
363
+ }),
364
+ /* @__PURE__ */ jsx("div", {
365
+ "aria-labelledby": `${id}-tab-${step.id}`,
366
+ className: "hkm-showcase-stage",
367
+ "data-hkm-animated": animated ? "" : undefined,
368
+ id: `${id}-panel`,
369
+ role: "tabpanel",
370
+ children: /* @__PURE__ */ jsx(FitToWidth, {
371
+ minWidth,
372
+ children: step.render({
373
+ animated,
374
+ theme
375
+ })
376
+ })
377
+ }),
378
+ /* @__PURE__ */ jsxs("div", {
379
+ className: "hkm-step-nav",
380
+ children: [
381
+ /* @__PURE__ */ jsx("button", {
382
+ className: "hkm-step-button",
383
+ disabled: current === 0,
384
+ onClick: () => go(current - 1),
385
+ type: "button",
386
+ children: "Back"
387
+ }),
388
+ /* @__PURE__ */ jsxs("span", {
389
+ "aria-live": "polite",
390
+ className: "hkm-showcase-status",
391
+ children: [
392
+ "Step ",
393
+ current + 1,
394
+ " of ",
395
+ steps.length,
396
+ step.hint === undefined ? "" : `. ${step.hint}`
397
+ ]
398
+ }),
399
+ /* @__PURE__ */ jsx("button", {
400
+ className: "hkm-step-button",
401
+ "data-hkm-primary": "",
402
+ disabled: current === steps.length - 1,
403
+ onClick: () => go(current + 1),
404
+ type: "button",
405
+ children: "Next"
406
+ })
407
+ ]
408
+ }),
409
+ /* @__PURE__ */ jsx("figcaption", {
410
+ className: "hkm-showcase-caption",
411
+ children: /* @__PURE__ */ jsx("span", {
412
+ children: caption
413
+ })
414
+ })
415
+ ]
416
+ });
417
+ }
418
+ export {
419
+ StepThrough,
420
+ ModeShowcase,
421
+ FitToWidth
422
+ };