@krizaka/ui 3.64.1 → 3.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (388) hide show
  1. package/README.md +3 -0
  2. package/dist/account-menu.d.ts +7 -3
  3. package/dist/account-menu.js +14 -10
  4. package/dist/account-menu.js.map +1 -1
  5. package/dist/account-settings.js +1 -1
  6. package/dist/action-bar.js +1 -1
  7. package/dist/app-frame/server.d.ts +123 -0
  8. package/dist/app-frame/server.js +109 -0
  9. package/dist/app-frame/server.js.map +1 -0
  10. package/dist/app-frame.d.ts +210 -0
  11. package/dist/app-frame.js +220 -0
  12. package/dist/app-frame.js.map +1 -0
  13. package/dist/app-header/search.js +1 -1
  14. package/dist/app-header.d.ts +3 -3
  15. package/dist/app-shell.js +1 -1
  16. package/dist/argument-card.js +2 -2
  17. package/dist/audio-player.js +1 -1
  18. package/dist/{chunk-5QEXOGO2.js → chunk-6BMKLAZ7.js} +1 -1
  19. package/dist/{chunk-XCBVFMNV.js.map → chunk-6BMKLAZ7.js.map} +1 -1
  20. package/dist/{chunk-SHBYNQFS.js → chunk-7DYZTEE3.js} +1 -1
  21. package/dist/{chunk-SHBYNQFS.js.map → chunk-7DYZTEE3.js.map} +1 -1
  22. package/dist/{chunk-YCZ7N6Q6.js → chunk-7MQNG35Q.js} +2 -2
  23. package/dist/{chunk-XCBVFMNV.js → chunk-C57KK5VB.js} +7 -2
  24. package/dist/chunk-C57KK5VB.js.map +1 -0
  25. package/dist/{chunk-VB7MWE2N.js → chunk-DSDFXPL6.js} +2 -2
  26. package/dist/{chunk-P7GZR5CU.js → chunk-GFRUTPGG.js} +1 -1
  27. package/dist/{chunk-P7GZR5CU.js.map → chunk-GFRUTPGG.js.map} +1 -1
  28. package/dist/{chunk-4GQH27IT.js → chunk-GW5EI7MI.js} +2 -2
  29. package/dist/{chunk-F6JTHPHE.js → chunk-I6EOLPSH.js} +2 -2
  30. package/dist/chunk-NG6G6V5E.js +33 -0
  31. package/dist/{chunk-5QEXOGO2.js.map → chunk-NG6G6V5E.js.map} +1 -1
  32. package/dist/{chunk-CPA5CF35.js → chunk-PGBF3UBX.js} +1 -1
  33. package/dist/{chunk-CPA5CF35.js.map → chunk-PGBF3UBX.js.map} +1 -1
  34. package/dist/{chunk-BG5APGX6.js → chunk-Q5DYWQ6S.js} +4 -4
  35. package/dist/{chunk-RCKXJEDQ.js → chunk-ST5P5HNI.js} +2 -2
  36. package/dist/code-block.js +1 -1
  37. package/dist/collection-switcher.d.ts +68 -0
  38. package/dist/collection-switcher.js +131 -0
  39. package/dist/collection-switcher.js.map +1 -0
  40. package/dist/combobox.js +2 -2
  41. package/dist/cover-hero.js +1 -1
  42. package/dist/data-table.js +4 -4
  43. package/dist/date-picker.js +1 -1
  44. package/dist/decision-list.js +1 -1
  45. package/dist/default-avatar-D9kiSFNB.d.ts +26 -0
  46. package/dist/desktop-window.d.ts +223 -0
  47. package/dist/desktop-window.js +261 -0
  48. package/dist/desktop-window.js.map +1 -0
  49. package/dist/docs-layout.js +1 -1
  50. package/dist/entity-header.d.ts +92 -0
  51. package/dist/entity-header.js +165 -0
  52. package/dist/entity-header.js.map +1 -0
  53. package/dist/file-upload.d.ts +2 -2
  54. package/dist/file-upload.js +1 -1
  55. package/dist/filter-bar.d.ts +3 -3
  56. package/dist/filter-bar.js +2 -2
  57. package/dist/genui.js +4 -4
  58. package/dist/language-switch.d.ts +9 -9
  59. package/dist/link-card.js +2 -2
  60. package/dist/list.js +1 -1
  61. package/dist/media-capture.js +1 -1
  62. package/dist/native.d.ts +337 -4
  63. package/dist/native.js +2841 -2111
  64. package/dist/native.js.map +1 -1
  65. package/dist/opening-hours.js +1 -1
  66. package/dist/page-hero.js +1 -1
  67. package/dist/pagination.js +1 -1
  68. package/dist/photo-grid.js +1 -1
  69. package/dist/pricing-page.js.map +1 -1
  70. package/dist/qr-code.d.ts +42 -0
  71. package/dist/qr-code.js +350 -0
  72. package/dist/qr-code.js.map +1 -0
  73. package/dist/radio-group.js +1 -1
  74. package/dist/rail-nav.js +1 -1
  75. package/dist/retro-tv.js +2 -2
  76. package/dist/search-field.js +2 -2
  77. package/dist/service-card.js +1 -1
  78. package/dist/shop-composer.js +1 -1
  79. package/dist/shop-composer.js.map +1 -1
  80. package/dist/site-cahier.js +1 -1
  81. package/dist/status-chip.js +1 -1
  82. package/dist/tag-input.js +2 -2
  83. package/dist/terminal-replay.js +1 -1
  84. package/dist/theme.d.ts +3 -1
  85. package/dist/theme.js +4 -0
  86. package/dist/theme.js.map +1 -1
  87. package/dist/tree-view.js +1 -1
  88. package/dist/video-player.js +2 -2
  89. package/dist/virtual.d.ts +3 -3
  90. package/package.json +91 -6
  91. package/registry/account-menu.json +22 -8
  92. package/registry/account-settings.json +2 -2
  93. package/registry/achievement.json +1 -1
  94. package/registry/action-bar.json +2 -2
  95. package/registry/activity-feed.json +1 -1
  96. package/registry/agenda.json +1 -1
  97. package/registry/alert.json +1 -1
  98. package/registry/analysis-report.json +1 -1
  99. package/registry/anatomy-plate.json +1 -1
  100. package/registry/app-frame.json +564 -0
  101. package/registry/app-header.json +2 -2
  102. package/registry/app-shell.json +2 -2
  103. package/registry/argument-card.json +2 -2
  104. package/registry/audio-player.json +2 -2
  105. package/registry/auth-layout.json +1 -1
  106. package/registry/avatar.json +1 -1
  107. package/registry/badge.json +1 -1
  108. package/registry/bird-plate.json +1 -1
  109. package/registry/button.json +1 -1
  110. package/registry/captcha.json +1 -1
  111. package/registry/card-grid.json +1 -1
  112. package/registry/card.json +1 -1
  113. package/registry/catalogue-page.json +1 -1
  114. package/registry/changelog-page.json +1 -1
  115. package/registry/chapter.json +1 -1
  116. package/registry/chat.json +1 -1
  117. package/registry/checkbox.json +1 -1
  118. package/registry/chip-link.json +1 -1
  119. package/registry/chip-row.json +1 -1
  120. package/registry/chip.json +1 -1
  121. package/registry/choice-grid.json +1 -1
  122. package/registry/code-block.json +2 -2
  123. package/registry/collection-switcher.json +436 -0
  124. package/registry/combobox.json +2 -2
  125. package/registry/command.json +1 -1
  126. package/registry/comparison-table.json +1 -1
  127. package/registry/component-page.json +1 -1
  128. package/registry/confirm-button.json +1 -1
  129. package/registry/contact-page.json +1 -1
  130. package/registry/continue-prompt.json +1 -1
  131. package/registry/countdown.json +1 -1
  132. package/registry/cover-hero.json +2 -2
  133. package/registry/cta-panel.json +1 -1
  134. package/registry/dashboard-layout.json +1 -1
  135. package/registry/data-table.json +2 -2
  136. package/registry/date-picker.json +4 -4
  137. package/registry/decision-list.json +2 -2
  138. package/registry/description-list.json +1 -1
  139. package/registry/desktop-window.json +407 -0
  140. package/registry/detail-layout.json +1 -1
  141. package/registry/dialog.json +1 -1
  142. package/registry/docs-article-page.json +1 -1
  143. package/registry/docs-hub-page.json +1 -1
  144. package/registry/docs-layout.json +2 -2
  145. package/registry/docs-nav.json +1 -1
  146. package/registry/document-viewer.json +1 -1
  147. package/registry/doodle.json +1 -1
  148. package/registry/drop-overlay.json +1 -1
  149. package/registry/dropdown-menu.json +1 -1
  150. package/registry/elephant.json +2 -2
  151. package/registry/embed-facade.json +1 -1
  152. package/registry/empty-state.json +1 -1
  153. package/registry/engine-flow.json +1 -1
  154. package/registry/entity-header.json +502 -0
  155. package/registry/environment-notice.json +1 -1
  156. package/registry/error-page.json +1 -1
  157. package/registry/examples/app-frame/admin.d.ts +4 -0
  158. package/registry/examples/app-frame/admin.js +32 -0
  159. package/registry/examples/app-frame/admin.tsx +33 -0
  160. package/registry/examples/app-frame/app.d.ts +4 -0
  161. package/registry/examples/app-frame/app.js +53 -0
  162. package/registry/examples/app-frame/app.tsx +56 -0
  163. package/registry/examples/collection-switcher/entity.d.ts +4 -0
  164. package/registry/examples/collection-switcher/entity.js +17 -0
  165. package/registry/examples/collection-switcher/entity.tsx +13 -0
  166. package/registry/examples/collection-switcher/list.d.ts +4 -0
  167. package/registry/examples/collection-switcher/list.js +32 -0
  168. package/registry/examples/collection-switcher/list.tsx +27 -0
  169. package/registry/examples/collection-switcher/native/list.d.ts +4 -0
  170. package/registry/examples/collection-switcher/native/list.dark.png +0 -0
  171. package/registry/examples/collection-switcher/native/list.js +18 -0
  172. package/registry/examples/collection-switcher/native/list.light.png +0 -0
  173. package/registry/examples/collection-switcher/native/list.tsx +14 -0
  174. package/registry/examples/collection-switcher/tree.d.ts +4 -0
  175. package/registry/examples/collection-switcher/tree.js +19 -0
  176. package/registry/examples/collection-switcher/tree.tsx +15 -0
  177. package/registry/examples/desktop-window/library.d.ts +4 -0
  178. package/registry/examples/desktop-window/library.js +49 -0
  179. package/registry/examples/desktop-window/library.tsx +58 -0
  180. package/registry/examples/entity-header/basic.d.ts +4 -0
  181. package/registry/examples/entity-header/basic.js +31 -0
  182. package/registry/examples/entity-header/basic.tsx +25 -0
  183. package/registry/examples/entity-header/native/basic.d.ts +4 -0
  184. package/registry/examples/entity-header/native/basic.dark.png +0 -0
  185. package/registry/examples/entity-header/native/basic.js +17 -0
  186. package/registry/examples/entity-header/native/basic.light.png +0 -0
  187. package/registry/examples/entity-header/native/basic.tsx +12 -0
  188. package/registry/examples/form-flow/native/signup.d.ts +4 -0
  189. package/registry/examples/form-flow/native/signup.dark.png +0 -0
  190. package/registry/examples/form-flow/native/signup.js +26 -0
  191. package/registry/examples/form-flow/native/signup.light.png +0 -0
  192. package/registry/examples/form-flow/native/signup.tsx +23 -0
  193. package/registry/examples/grid/native/columns.d.ts +4 -0
  194. package/registry/examples/grid/native/columns.dark.png +0 -0
  195. package/registry/examples/grid/native/columns.js +23 -0
  196. package/registry/examples/grid/native/columns.light.png +0 -0
  197. package/registry/examples/grid/native/columns.tsx +20 -0
  198. package/registry/examples/grid/native/photos.d.ts +4 -0
  199. package/registry/examples/grid/native/photos.dark.png +0 -0
  200. package/registry/examples/grid/native/photos.js +14 -0
  201. package/registry/examples/grid/native/photos.light.png +0 -0
  202. package/registry/examples/grid/native/photos.tsx +18 -0
  203. package/registry/examples/grid/native/stats.d.ts +4 -0
  204. package/registry/examples/grid/native/stats.dark.png +0 -0
  205. package/registry/examples/grid/native/stats.js +22 -0
  206. package/registry/examples/grid/native/stats.light.png +0 -0
  207. package/registry/examples/grid/native/stats.tsx +24 -0
  208. package/registry/examples/list-detail/native/inbox.d.ts +4 -0
  209. package/registry/examples/list-detail/native/inbox.dark.png +0 -0
  210. package/registry/examples/list-detail/native/inbox.js +35 -0
  211. package/registry/examples/list-detail/native/inbox.light.png +0 -0
  212. package/registry/examples/list-detail/native/inbox.tsx +35 -0
  213. package/registry/examples/qr-code/basic.d.ts +4 -0
  214. package/registry/examples/qr-code/basic.js +11 -0
  215. package/registry/examples/qr-code/basic.tsx +6 -0
  216. package/registry/examples/qr-code/calendar-feed.d.ts +4 -0
  217. package/registry/examples/qr-code/calendar-feed.js +24 -0
  218. package/registry/examples/qr-code/calendar-feed.tsx +18 -0
  219. package/registry/examples/qr-code/native/calendar-feed.d.ts +4 -0
  220. package/registry/examples/qr-code/native/calendar-feed.dark.png +0 -0
  221. package/registry/examples/qr-code/native/calendar-feed.js +25 -0
  222. package/registry/examples/qr-code/native/calendar-feed.light.png +0 -0
  223. package/registry/examples/qr-code/native/calendar-feed.tsx +19 -0
  224. package/registry/examples/screen/native/dashboard.d.ts +4 -0
  225. package/registry/examples/screen/native/dashboard.dark.png +0 -0
  226. package/registry/examples/screen/native/dashboard.js +48 -0
  227. package/registry/examples/screen/native/dashboard.light.png +0 -0
  228. package/registry/examples/screen/native/dashboard.tsx +52 -0
  229. package/registry/examples/screen/native/settings-home.d.ts +4 -0
  230. package/registry/examples/screen/native/settings-home.dark.png +0 -0
  231. package/registry/examples/screen/native/settings-home.js +26 -0
  232. package/registry/examples/screen/native/settings-home.light.png +0 -0
  233. package/registry/examples/screen/native/settings-home.tsx +25 -0
  234. package/registry/examples/shop/hero-tv.js +1 -1
  235. package/registry/examples/shop/hero-tv.tsx +1 -1
  236. package/registry/examples/state-screen/native/empty.d.ts +4 -0
  237. package/registry/examples/state-screen/native/empty.dark.png +0 -0
  238. package/registry/examples/state-screen/native/empty.js +12 -0
  239. package/registry/examples/state-screen/native/empty.light.png +0 -0
  240. package/registry/examples/state-screen/native/empty.tsx +11 -0
  241. package/registry/examples/state-screen/native/error.d.ts +4 -0
  242. package/registry/examples/state-screen/native/error.dark.png +0 -0
  243. package/registry/examples/state-screen/native/error.js +21 -0
  244. package/registry/examples/state-screen/native/error.light.png +0 -0
  245. package/registry/examples/state-screen/native/error.tsx +17 -0
  246. package/registry/examples/state-screen/native/offline.d.ts +4 -0
  247. package/registry/examples/state-screen/native/offline.dark.png +0 -0
  248. package/registry/examples/state-screen/native/offline.js +15 -0
  249. package/registry/examples/state-screen/native/offline.light.png +0 -0
  250. package/registry/examples/state-screen/native/offline.tsx +12 -0
  251. package/registry/field.json +1 -1
  252. package/registry/file-upload.json +2 -2
  253. package/registry/filter-bar.json +2 -2
  254. package/registry/flock.json +1 -1
  255. package/registry/footnote.json +1 -1
  256. package/registry/force-update-screen.json +1 -1
  257. package/registry/form-flow.json +152 -0
  258. package/registry/form.json +1 -1
  259. package/registry/gallery-page.json +1 -1
  260. package/registry/genui.json +1 -1
  261. package/registry/glossary-term.json +1 -1
  262. package/registry/glossary.json +1 -1
  263. package/registry/glow-card.json +1 -1
  264. package/registry/goal-gauge.json +1 -1
  265. package/registry/grade-stamp.json +1 -1
  266. package/registry/grid.json +262 -0
  267. package/registry/how-it-works-page.json +1 -1
  268. package/registry/image-cropper.json +1 -1
  269. package/registry/index.json +408 -12
  270. package/registry/iso.json +1 -1
  271. package/registry/kanban.json +1 -1
  272. package/registry/kbd.json +1 -1
  273. package/registry/kind-config-editor.json +1 -1
  274. package/registry/kpi-explained.json +1 -1
  275. package/registry/landing-page.json +1 -1
  276. package/registry/landscape.json +1 -1
  277. package/registry/language-switch.json +1 -1
  278. package/registry/legal-page.json +1 -1
  279. package/registry/link-card.json +2 -2
  280. package/registry/list-detail.json +188 -0
  281. package/registry/list.json +2 -2
  282. package/registry/loader.json +1 -1
  283. package/registry/longform-page.json +1 -1
  284. package/registry/maintenance-screen.json +1 -1
  285. package/registry/map.json +2 -2
  286. package/registry/margin-layout.json +1 -1
  287. package/registry/markdown.json +1 -1
  288. package/registry/marketing-layout.json +1 -1
  289. package/registry/marquee.json +1 -1
  290. package/registry/mascot-quote.json +1 -1
  291. package/registry/mascot-state.json +1 -1
  292. package/registry/mascots.json +1 -1
  293. package/registry/match-dialog.json +1 -1
  294. package/registry/media-capture.json +2 -2
  295. package/registry/media-gallery.json +1 -1
  296. package/registry/media-grid.json +1 -1
  297. package/registry/meta-row.json +1 -1
  298. package/registry/meter.json +1 -1
  299. package/registry/nav-bar.json +2 -2
  300. package/registry/next-actions.json +1 -1
  301. package/registry/notification-preferences.json +1 -1
  302. package/registry/number-ticker.json +1 -1
  303. package/registry/onboarding.json +3 -0
  304. package/registry/opening-hours.json +2 -2
  305. package/registry/page-header.json +1 -1
  306. package/registry/page-hero.json +2 -2
  307. package/registry/page-index.json +1 -1
  308. package/registry/page.json +1 -1
  309. package/registry/pagination.json +2 -2
  310. package/registry/photo-grid.json +2 -2
  311. package/registry/pointer-light.json +1 -1
  312. package/registry/popover.json +1 -1
  313. package/registry/pricing-page.json +2 -2
  314. package/registry/product-page.json +1 -1
  315. package/registry/profile-card.json +1 -1
  316. package/registry/progress.json +1 -1
  317. package/registry/promise-card.json +1 -1
  318. package/registry/qr-code.json +343 -0
  319. package/registry/quota-meter.json +1 -1
  320. package/registry/radio-group.json +2 -2
  321. package/registry/rail-nav.json +3 -3
  322. package/registry/recipes.json +1 -1
  323. package/registry/retro-tv.json +1 -1
  324. package/registry/reviews.json +1 -1
  325. package/registry/router.json +1 -1
  326. package/registry/screen.json +68 -4
  327. package/registry/scroll-stage.json +1 -1
  328. package/registry/search-field.json +2 -2
  329. package/registry/section-backdrop.json +1 -1
  330. package/registry/separator.json +1 -1
  331. package/registry/service-card.json +2 -2
  332. package/registry/settings-layout.json +5 -2
  333. package/registry/shop-composer.json +2 -2
  334. package/registry/shop.json +3 -3
  335. package/registry/showcase.json +1 -1
  336. package/registry/signature.json +1 -1
  337. package/registry/site-cahier.json +1 -1
  338. package/registry/site-footer.json +4 -4
  339. package/registry/sites.json +1 -1
  340. package/registry/skeleton.json +1 -1
  341. package/registry/skip-link.json +1 -1
  342. package/registry/slider.json +1 -1
  343. package/registry/slot-picker.json +1 -1
  344. package/registry/slot.json +1 -1
  345. package/registry/specimen-tag.json +1 -1
  346. package/registry/speed-lines.json +1 -1
  347. package/registry/spinner.json +1 -1
  348. package/registry/split-view.json +1 -1
  349. package/registry/stage-banner.json +1 -1
  350. package/registry/stat.json +1 -1
  351. package/registry/state-screen.json +224 -0
  352. package/registry/status-chip.json +2 -2
  353. package/registry/status-page.json +1 -1
  354. package/registry/step-progress.json +1 -1
  355. package/registry/step-showcase.json +1 -1
  356. package/registry/stepper.json +1 -1
  357. package/registry/sticky-action.json +1 -1
  358. package/registry/stuck.json +1 -1
  359. package/registry/swipe-deck.json +1 -1
  360. package/registry/switch.json +1 -1
  361. package/registry/tabs.json +1 -1
  362. package/registry/tag-input.json +1 -1
  363. package/registry/tag-selector.json +1 -1
  364. package/registry/taped-photo.json +1 -1
  365. package/registry/terminal-replay.json +2 -2
  366. package/registry/text-style.json +1 -1
  367. package/registry/theme.json +3 -3
  368. package/registry/toast.json +1 -1
  369. package/registry/toc.json +1 -1
  370. package/registry/tooltip.json +1 -1
  371. package/registry/tree-view.json +2 -2
  372. package/registry/update-prompt.json +1 -1
  373. package/registry/upload-queue.json +1 -1
  374. package/registry/usage.json +1 -1
  375. package/registry/verified-badge.json +1 -1
  376. package/registry/versus-card.json +1 -1
  377. package/registry/vertical-video.json +1 -1
  378. package/registry/video-player.json +2 -2
  379. package/registry/video-trimmer.json +1 -1
  380. package/registry/virtual.json +1 -1
  381. package/registry/wall.json +1 -1
  382. package/registry/waveform.json +1 -1
  383. /package/dist/{chunk-YCZ7N6Q6.js.map → chunk-7MQNG35Q.js.map} +0 -0
  384. /package/dist/{chunk-VB7MWE2N.js.map → chunk-DSDFXPL6.js.map} +0 -0
  385. /package/dist/{chunk-4GQH27IT.js.map → chunk-GW5EI7MI.js.map} +0 -0
  386. /package/dist/{chunk-F6JTHPHE.js.map → chunk-I6EOLPSH.js.map} +0 -0
  387. /package/dist/{chunk-BG5APGX6.js.map → chunk-Q5DYWQ6S.js.map} +0 -0
  388. /package/dist/{chunk-RCKXJEDQ.js.map → chunk-ST5P5HNI.js.map} +0 -0
@@ -0,0 +1,210 @@
1
+ import { AccountMenu } from '@krizaka/ui/account-menu';
2
+ import { Mode } from '@krizaka/ui/theme';
3
+ import * as React from 'react';
4
+
5
+ /**
6
+ * A Krizaka brand. `orochia`, `yasakia`, `yororis` and `kachizaka` are paused products, kept so nothing published
7
+ * breaks — see `PausedBrandId`.
8
+ */
9
+ type BrandId = "krizaka" | "orazaka" | "orochia" | "yasakia" | "yororis" | "yomizaka" | "kachizaka" | "akinaza";
10
+
11
+ /** The places the account menu can hold, in the order the frame draws them. */
12
+ declare const ACCOUNT_LINK_IDS: readonly ["profile", "settings", "billing", "administration"];
13
+ type AccountLinkId = (typeof ACCOUNT_LINK_IDS)[number];
14
+ /** The account menu from top to bottom: who you are, the places, the preferences, Sign out. Fixed by the frame, not by the product. */
15
+ declare const ACCOUNT_MENU_ORDER: readonly ["identity", "profile", "settings", "billing", "administration", "language", "theme", "signOut"];
16
+ /** The most destinations a phone's tab bar carries (the rail's main items; the foot follows them in the same bar). */
17
+ declare const MAIN_SECTIONS_MAX = 5;
18
+ interface FrameSection {
19
+ /** Stable id; `settings`, `billing`, `profile`, `administration` are the account menu's places. */
20
+ id: string;
21
+ label: string;
22
+ href: string;
23
+ icon: React.ReactNode;
24
+ /** Not offered to this person (a permission, a feature not open): left out of the rail and the tab bar. */
25
+ gated?: boolean;
26
+ /** A count on the icon. */
27
+ badge?: string | number;
28
+ /** The count in words (« 3 to decide »). */
29
+ badgeLabel?: string;
30
+ /** `main`: what the person works in (the tab bar on a phone). `foot`: the rail's foot. @default "main" */
31
+ place?: "main" | "foot";
32
+ }
33
+ interface FramePlaces {
34
+ main: FrameSection[];
35
+ foot: FrameSection[];
36
+ /** Sections left out of the rail because the account menu already holds that place (or because they are gated). */
37
+ dropped: {
38
+ id: string;
39
+ reason: "account" | "gated";
40
+ }[];
41
+ }
42
+ /**
43
+ * Splits the sections into the rail's main and foot, in the order given. A place is on the rail or under the avatar,
44
+ * never both: a section whose id is one of the account links the frame was given leaves the rail (the avatar owns it).
45
+ * A gated section leaves too.
46
+ */
47
+ declare function framePlaces(sections: readonly FrameSection[], accountLinks?: readonly string[]): FramePlaces;
48
+ /** The account links the frame draws, in the frame's order, whatever the order they were written in. Only what was passed. */
49
+ declare function orderAccountLinks<T>(links: Partial<Record<AccountLinkId, T>> | undefined, admin?: boolean): {
50
+ id: AccountLinkId;
51
+ link: T;
52
+ }[];
53
+ /** What is wrong with a frame's data, in words for the developer (empty: it is right). Used by the tests and by the dev warning. */
54
+ declare function frameIssues(sections: readonly FrameSection[], accountLinks?: readonly string[]): string[];
55
+
56
+ declare const navWords: {
57
+ readonly en: {
58
+ readonly docs: "Docs";
59
+ readonly terms: "Terms";
60
+ readonly privacy: "Privacy";
61
+ readonly settings: "Settings";
62
+ readonly billing: "Billing";
63
+ readonly profile: "Profile";
64
+ readonly administration: "Administration";
65
+ readonly account: "Account";
66
+ readonly language: "Language";
67
+ readonly theme: "Theme";
68
+ readonly themeLight: "Light";
69
+ readonly themeDark: "Dark";
70
+ readonly themeSystem: "System";
71
+ readonly signOut: "Sign out";
72
+ readonly howItWorks: "How it works";
73
+ readonly pricing: "Pricing";
74
+ readonly download: "Download";
75
+ readonly contact: "Contact";
76
+ readonly search: "Search";
77
+ readonly notifications: "Notifications";
78
+ readonly expand: "Show the words";
79
+ readonly collapse: "Hide the words";
80
+ };
81
+ readonly fr: {
82
+ readonly docs: "Docs";
83
+ readonly terms: "Conditions d'utilisation";
84
+ readonly privacy: "Confidentialité";
85
+ readonly settings: "Réglages";
86
+ readonly billing: "Facturation";
87
+ readonly profile: "Profil";
88
+ readonly administration: "Administration";
89
+ readonly account: "Compte";
90
+ readonly language: "Langue";
91
+ readonly theme: "Thème";
92
+ readonly themeLight: "Clair";
93
+ readonly themeDark: "Sombre";
94
+ readonly themeSystem: "Système";
95
+ readonly signOut: "Se déconnecter";
96
+ readonly howItWorks: "Comment ça marche";
97
+ readonly pricing: "Tarifs";
98
+ readonly download: "Télécharger";
99
+ readonly contact: "Contact";
100
+ readonly search: "Rechercher";
101
+ readonly notifications: "Notifications";
102
+ readonly expand: "Afficher les mots";
103
+ readonly collapse: "Masquer les mots";
104
+ };
105
+ };
106
+ type NavLocale = keyof typeof navWords;
107
+ type NavWords = {
108
+ [K in keyof (typeof navWords)["en"]]: string;
109
+ };
110
+ type NavWordKey = keyof NavWords;
111
+ /** The words of a locale (`fr`, `fr-CA`…); any other falls back to English. */
112
+ declare function navVocabulary(locale?: string): NavWords;
113
+ /** One word of the shared vocabulary. */
114
+ declare function navWord(locale: string | undefined, key: NavWordKey): string;
115
+ /** The most links a product's public bar holds: past four, the bar is a menu in disguise (audit F3). */
116
+ declare const PUBLIC_BAR_MAX = 4;
117
+ type PublicBarSlot = "howItWorks" | "pricing" | "docs" | "download";
118
+ interface PublicBarLink {
119
+ id: PublicBarSlot;
120
+ label: string;
121
+ href: string;
122
+ }
123
+ /**
124
+ * The one shape of a product's public bar: flat links, in this order, four at most — How it works · Pricing (when the
125
+ * product has a price) · Docs · Download (when an app exists). Privacy and Terms are the footer's, « Overview » is the mark.
126
+ * Pass the address of each slot the product has; the words come from the shared vocabulary.
127
+ */
128
+ declare function publicBarLinks(hrefs: Partial<Record<PublicBarSlot, string>>, locale?: string): PublicBarLink[];
129
+
130
+ interface AppFrameAccountLink {
131
+ href: string;
132
+ /** Overrides the shared word (`Credits and usage` for billing where credits exist). */
133
+ label?: string;
134
+ icon?: React.ReactNode;
135
+ }
136
+ interface AppFrameAccount {
137
+ name?: string;
138
+ email?: string;
139
+ /** `src`, or `defaultAvatar` (`{ brand, seed }`). */
140
+ avatar?: React.ComponentProps<typeof AccountMenu>["avatar"];
141
+ /**
142
+ * The places under the avatar. Pass the ones the product has: Billing only when it sells, Administration only for an
143
+ * admin. The frame draws them in its order (Profile, Settings, Billing, Administration), Settings landing on the settings home.
144
+ */
145
+ links?: Partial<Record<AccountLinkId, AppFrameAccountLink>>;
146
+ /** Called by Sign out. */
147
+ onSignOut: () => void;
148
+ }
149
+ interface AppFrameLanguage {
150
+ value: string;
151
+ options: readonly {
152
+ value: string;
153
+ label: string;
154
+ }[];
155
+ onChange: (value: string) => void;
156
+ }
157
+ interface AppFrameTheme {
158
+ value: Mode;
159
+ onChange: (mode: Mode) => void;
160
+ }
161
+ interface AppFrameProps {
162
+ /** The product's name, as text in the top bar. */
163
+ name: string;
164
+ /** The product's mark (`<ProductLogo id="yomizaka" size={26} />`): on the rail on a desktop, in the top bar on a phone. */
165
+ mark: React.ReactNode;
166
+ /** The mark in the top bar below `md` (smaller). Defaults to `mark`. */
167
+ headerMark?: React.ReactNode;
168
+ /** Where the mark and the name lead (`/app`). */
169
+ homeHref: string;
170
+ /** The product's brand: scopes its colours over the rail. */
171
+ accent?: BrandId;
172
+ /** The destinations. `place: "foot"` puts one at the rail's foot; `gated` leaves one out for this person. */
173
+ sections: readonly FrameSection[];
174
+ /** The id of the section the person is in. */
175
+ currentId?: string;
176
+ /** Who is signed in, the places under their avatar and Sign out. */
177
+ account: AppFrameAccount;
178
+ /** The one primary action of the app (« Check a document »). */
179
+ primary?: React.ReactNode;
180
+ /** The search (⌘K): opens the app's command palette. */
181
+ search?: {
182
+ label: string;
183
+ onOpen: () => void;
184
+ };
185
+ /** Notifications: an `AppHeaderCount`, or the trigger of the host's popover. */
186
+ notifications?: React.ReactNode;
187
+ /** Chips beside the name (`Dev`, `Local · Sovereign`). */
188
+ chips?: React.ReactNode;
189
+ /** `admin`: the administration's frame — a chip says so, and the way into it is not offered again. */
190
+ variant?: "app" | "admin";
191
+ /** The language row of the account menu; absent for a product with one language. */
192
+ language?: AppFrameLanguage;
193
+ /** The theme row. By default the `ThemeProvider`'s; pass `false` for a product that has none. */
194
+ theme?: AppFrameTheme | false;
195
+ /** `en` or `fr`: the words of the shared vocabulary. @default "en" */
196
+ locale?: string;
197
+ /** Overrides of the shared words, for a product that needs one different (use sparingly). */
198
+ words?: Partial<NavWords>;
199
+ /** The router's link component (Next's `Link`) for the rail and the menu. */
200
+ linkAs?: React.ElementType;
201
+ /** The page, inside `RailNav.Body` under the top bar. */
202
+ children: React.ReactNode;
203
+ /** The rail's accessible name. Defaults to the product's name. */
204
+ label?: string;
205
+ }
206
+ /** The signed-in frame: sections, account and the primary action in; the rail, the top bar and the account menu out. */
207
+ declare function AppFrame({ name, mark, headerMark, homeHref, accent, sections, currentId, account, primary, search, notifications, chips, variant, language, theme, locale, words, linkAs: Link, children, label, }: AppFrameProps): React.JSX.Element;
208
+
209
+ export { ACCOUNT_LINK_IDS, ACCOUNT_MENU_ORDER, AppFrame, MAIN_SECTIONS_MAX, PUBLIC_BAR_MAX, frameIssues, framePlaces, navVocabulary, navWord, navWords, orderAccountLinks, publicBarLinks };
210
+ export type { AccountLinkId, AppFrameAccount, AppFrameAccountLink, AppFrameLanguage, AppFrameProps, AppFrameTheme, FramePlaces, FrameSection, NavLocale, NavWordKey, NavWords, PublicBarLink, PublicBarSlot };
@@ -0,0 +1,220 @@
1
+ "use client";
2
+
3
+ // src/app-frame/app-frame.tsx
4
+ import { AccountMenu } from "@krizaka/ui/account-menu";
5
+ import { AppHeader } from "@krizaka/ui/app-header";
6
+ import { AppHeaderSearch } from "@krizaka/ui/app-header/search";
7
+ import { Badge } from "@krizaka/ui/badge";
8
+ import { RailNav } from "@krizaka/ui/rail-nav";
9
+ import { useOptionalTheme } from "@krizaka/ui/theme";
10
+
11
+ // src/app-frame/contract.ts
12
+ var ACCOUNT_LINK_IDS = ["profile", "settings", "billing", "administration"];
13
+ var ACCOUNT_MENU_ORDER = ["identity", "profile", "settings", "billing", "administration", "language", "theme", "signOut"];
14
+ var MAIN_SECTIONS_MAX = 5;
15
+ function framePlaces(sections, accountLinks = []) {
16
+ const result = { main: [], foot: [], dropped: [] };
17
+ for (const section of sections) {
18
+ if (section.gated) result.dropped.push({ id: section.id, reason: "gated" });
19
+ else if (accountLinks.includes(section.id)) result.dropped.push({ id: section.id, reason: "account" });
20
+ else result[section.place === "foot" ? "foot" : "main"].push(section);
21
+ }
22
+ return result;
23
+ }
24
+ function orderAccountLinks(links, admin = false) {
25
+ if (!links) return [];
26
+ return ACCOUNT_LINK_IDS.flatMap((id) => {
27
+ const link = links[id];
28
+ return link && !(admin && id === "administration") ? [{ id, link }] : [];
29
+ });
30
+ }
31
+ function frameIssues(sections, accountLinks = []) {
32
+ const issues = [];
33
+ const ids = sections.map((s) => s.id);
34
+ for (const id of new Set(ids)) if (ids.filter((x) => x === id).length > 1) issues.push(`The section "${id}" is declared twice.`);
35
+ const places = framePlaces(sections, accountLinks);
36
+ for (const { id, reason } of places.dropped) if (reason === "account") issues.push(`"${id}" is on the rail and under the avatar: a place is in one of them, so the rail drops it.`);
37
+ if (places.main.length > MAIN_SECTIONS_MAX) issues.push(`${places.main.length} main sections: a phone's tab bar carries ${MAIN_SECTIONS_MAX} at most.`);
38
+ return issues;
39
+ }
40
+
41
+ // src/app-frame/vocabulary.ts
42
+ var navWords = {
43
+ en: {
44
+ docs: "Docs",
45
+ terms: "Terms",
46
+ privacy: "Privacy",
47
+ settings: "Settings",
48
+ billing: "Billing",
49
+ profile: "Profile",
50
+ administration: "Administration",
51
+ account: "Account",
52
+ language: "Language",
53
+ theme: "Theme",
54
+ themeLight: "Light",
55
+ themeDark: "Dark",
56
+ themeSystem: "System",
57
+ signOut: "Sign out",
58
+ howItWorks: "How it works",
59
+ pricing: "Pricing",
60
+ download: "Download",
61
+ contact: "Contact",
62
+ search: "Search",
63
+ notifications: "Notifications",
64
+ expand: "Show the words",
65
+ collapse: "Hide the words"
66
+ },
67
+ fr: {
68
+ docs: "Docs",
69
+ terms: "Conditions d'utilisation",
70
+ privacy: "Confidentialit\xE9",
71
+ settings: "R\xE9glages",
72
+ billing: "Facturation",
73
+ profile: "Profil",
74
+ administration: "Administration",
75
+ account: "Compte",
76
+ language: "Langue",
77
+ theme: "Th\xE8me",
78
+ themeLight: "Clair",
79
+ themeDark: "Sombre",
80
+ themeSystem: "Syst\xE8me",
81
+ signOut: "Se d\xE9connecter",
82
+ howItWorks: "Comment \xE7a marche",
83
+ pricing: "Tarifs",
84
+ download: "T\xE9l\xE9charger",
85
+ contact: "Contact",
86
+ search: "Rechercher",
87
+ notifications: "Notifications",
88
+ expand: "Afficher les mots",
89
+ collapse: "Masquer les mots"
90
+ }
91
+ };
92
+ function navVocabulary(locale = "en") {
93
+ return navWords[locale.toLowerCase().startsWith("fr") ? "fr" : "en"];
94
+ }
95
+ function navWord(locale, key) {
96
+ return navVocabulary(locale)[key];
97
+ }
98
+ var PUBLIC_BAR_MAX = 4;
99
+ function publicBarLinks(hrefs, locale) {
100
+ const order = ["howItWorks", "pricing", "docs", "download"];
101
+ return order.flatMap((id) => {
102
+ const href = hrefs[id];
103
+ return href ? [{ id, label: navWord(locale, id), href }] : [];
104
+ });
105
+ }
106
+
107
+ // src/app-frame/app-frame.tsx
108
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
109
+ var MODES = ["light", "dark", "system"];
110
+ function useFrameTheme(theme) {
111
+ const provided = useOptionalTheme();
112
+ if (theme === false) return null;
113
+ if (theme) return theme;
114
+ return provided ? { value: provided.mode, onChange: provided.setMode } : null;
115
+ }
116
+ function AppFrame({
117
+ name,
118
+ mark,
119
+ headerMark,
120
+ homeHref,
121
+ accent,
122
+ sections,
123
+ currentId,
124
+ account,
125
+ primary,
126
+ search,
127
+ notifications,
128
+ chips,
129
+ variant = "app",
130
+ language,
131
+ theme,
132
+ locale = "en",
133
+ words,
134
+ linkAs: Link,
135
+ children,
136
+ label
137
+ }) {
138
+ const w = { ...navVocabulary(locale), ...words };
139
+ const admin = variant === "admin";
140
+ const links = orderAccountLinks(account.links, admin);
141
+ const places = framePlaces(sections, links.map((l) => l.id));
142
+ const frameTheme = useFrameTheme(theme);
143
+ const item = (section) => /* @__PURE__ */ jsx(
144
+ RailNav.Item,
145
+ {
146
+ asChild: Boolean(Link),
147
+ href: Link ? void 0 : section.href,
148
+ icon: section.icon,
149
+ label: section.label,
150
+ current: section.id === currentId,
151
+ badge: section.badge,
152
+ badgeLabel: section.badgeLabel,
153
+ children: Link ? /* @__PURE__ */ jsx(Link, { href: section.href }) : void 0
154
+ },
155
+ section.id
156
+ );
157
+ const menuLinks = links.map(({ id, link }) => ({ id, label: link.label ?? w[id], href: link.href, icon: link.icon }));
158
+ const modeLabels = { light: w.themeLight, dark: w.themeDark, system: w.themeSystem };
159
+ return /* @__PURE__ */ jsxs(RailNav.Shell, { "data-variant": variant, children: [
160
+ /* @__PURE__ */ jsx(
161
+ RailNav.Root,
162
+ {
163
+ label: label ?? name,
164
+ accent,
165
+ mark: Link ? /* @__PURE__ */ jsx(Link, { href: homeHref, "aria-label": name, children: mark }) : /* @__PURE__ */ jsx("a", { href: homeHref, "aria-label": name, children: mark }),
166
+ footer: places.foot.length > 0 ? places.foot.map(item) : void 0,
167
+ children: places.main.map(item)
168
+ }
169
+ ),
170
+ /* @__PURE__ */ jsxs(RailNav.Body, { children: [
171
+ /* @__PURE__ */ jsx(
172
+ AppHeader,
173
+ {
174
+ name,
175
+ mark: headerMark ?? mark,
176
+ href: Link ? void 0 : homeHref,
177
+ homeLink: Link ? /* @__PURE__ */ jsx(Link, { href: homeHref }) : void 0,
178
+ chips: /* @__PURE__ */ jsxs(Fragment, { children: [
179
+ admin && /* @__PURE__ */ jsx(Badge, { tone: "accent", children: w.administration }),
180
+ chips
181
+ ] }),
182
+ search: search && /* @__PURE__ */ jsx(AppHeaderSearch, { label: search.label, onOpen: search.onOpen }),
183
+ notifications,
184
+ primary,
185
+ account: /* @__PURE__ */ jsx(
186
+ AccountMenu,
187
+ {
188
+ label: w.account,
189
+ name: account.name,
190
+ email: account.email,
191
+ avatar: account.avatar,
192
+ showName: "lg",
193
+ links: menuLinks,
194
+ linkAs: Link,
195
+ language: language && { label: w.language, value: language.value, options: language.options, onChange: language.onChange },
196
+ theme: frameTheme ? { label: w.theme, value: frameTheme.value, options: MODES.map((value) => ({ value, label: modeLabels[value] })), onChange: (value) => frameTheme.onChange(value) } : void 0,
197
+ signOut: { label: w.signOut, onSelect: account.onSignOut }
198
+ }
199
+ )
200
+ }
201
+ ),
202
+ children
203
+ ] })
204
+ ] });
205
+ }
206
+ export {
207
+ ACCOUNT_LINK_IDS,
208
+ ACCOUNT_MENU_ORDER,
209
+ AppFrame,
210
+ MAIN_SECTIONS_MAX,
211
+ PUBLIC_BAR_MAX,
212
+ frameIssues,
213
+ framePlaces,
214
+ navVocabulary,
215
+ navWord,
216
+ navWords,
217
+ orderAccountLinks,
218
+ publicBarLinks
219
+ };
220
+ //# sourceMappingURL=app-frame.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/app-frame/app-frame.tsx","../src/app-frame/contract.ts","../src/app-frame/vocabulary.ts"],"sourcesContent":["// Client (the rail's state, the account menu, the theme). THE signed-in frame of every Krizaka web product (audit F1, F2,\n// F6): the rail (a bottom tab bar on a phone) and the family's top bar, composed once from data. The product keeps its\n// list of sections; the frame owns the rest — the account menu's content and order, where the preferences live (always in\n// the menu: a header has no room for them on a phone), which place is on the rail and which is under the avatar.\nimport { AccountMenu, type AccountMenuLink } from \"@krizaka/ui/account-menu\";\nimport { AppHeader } from \"@krizaka/ui/app-header\";\nimport { AppHeaderSearch } from \"@krizaka/ui/app-header/search\";\nimport { Badge } from \"@krizaka/ui/badge\";\nimport { RailNav } from \"@krizaka/ui/rail-nav\";\nimport { type Mode, useOptionalTheme } from \"@krizaka/ui/theme\";\nimport * as React from \"react\";\n\nimport type { BrandId } from \"../marks/ProductLogo\";\nimport { type AccountLinkId, framePlaces, type FrameSection, orderAccountLinks } from \"./contract\";\nimport { navVocabulary, type NavWords } from \"./vocabulary\";\n\nexport interface AppFrameAccountLink {\n href: string;\n /** Overrides the shared word (`Credits and usage` for billing where credits exist). */\n label?: string;\n icon?: React.ReactNode;\n}\n\nexport interface AppFrameAccount {\n name?: string;\n email?: string;\n /** `src`, or `defaultAvatar` (`{ brand, seed }`). */\n avatar?: React.ComponentProps<typeof AccountMenu>[\"avatar\"];\n /**\n * The places under the avatar. Pass the ones the product has: Billing only when it sells, Administration only for an\n * admin. The frame draws them in its order (Profile, Settings, Billing, Administration), Settings landing on the settings home.\n */\n links?: Partial<Record<AccountLinkId, AppFrameAccountLink>>;\n /** Called by Sign out. */\n onSignOut: () => void;\n}\n\nexport interface AppFrameLanguage {\n value: string;\n options: readonly { value: string; label: string }[];\n onChange: (value: string) => void;\n}\n\nexport interface AppFrameTheme {\n value: Mode;\n onChange: (mode: Mode) => void;\n}\n\nexport interface AppFrameProps {\n /** The product's name, as text in the top bar. */\n name: string;\n /** The product's mark (`<ProductLogo id=\"yomizaka\" size={26} />`): on the rail on a desktop, in the top bar on a phone. */\n mark: React.ReactNode;\n /** The mark in the top bar below `md` (smaller). Defaults to `mark`. */\n headerMark?: React.ReactNode;\n /** Where the mark and the name lead (`/app`). */\n homeHref: string;\n /** The product's brand: scopes its colours over the rail. */\n accent?: BrandId;\n /** The destinations. `place: \"foot\"` puts one at the rail's foot; `gated` leaves one out for this person. */\n sections: readonly FrameSection[];\n /** The id of the section the person is in. */\n currentId?: string;\n /** Who is signed in, the places under their avatar and Sign out. */\n account: AppFrameAccount;\n /** The one primary action of the app (« Check a document »). */\n primary?: React.ReactNode;\n /** The search (⌘K): opens the app's command palette. */\n search?: { label: string; onOpen: () => void };\n /** Notifications: an `AppHeaderCount`, or the trigger of the host's popover. */\n notifications?: React.ReactNode;\n /** Chips beside the name (`Dev`, `Local · Sovereign`). */\n chips?: React.ReactNode;\n /** `admin`: the administration's frame — a chip says so, and the way into it is not offered again. */\n variant?: \"app\" | \"admin\";\n /** The language row of the account menu; absent for a product with one language. */\n language?: AppFrameLanguage;\n /** The theme row. By default the `ThemeProvider`'s; pass `false` for a product that has none. */\n theme?: AppFrameTheme | false;\n /** `en` or `fr`: the words of the shared vocabulary. @default \"en\" */\n locale?: string;\n /** Overrides of the shared words, for a product that needs one different (use sparingly). */\n words?: Partial<NavWords>;\n /** The router's link component (Next's `Link`) for the rail and the menu. */\n linkAs?: React.ElementType;\n /** The page, inside `RailNav.Body` under the top bar. */\n children: React.ReactNode;\n /** The rail's accessible name. Defaults to the product's name. */\n label?: string;\n}\n\nconst MODES: readonly Mode[] = [\"light\", \"dark\", \"system\"];\n\nfunction useFrameTheme(theme: AppFrameProps[\"theme\"]): AppFrameTheme | null {\n const provided = useOptionalTheme();\n if (theme === false) return null;\n if (theme) return theme;\n return provided ? { value: provided.mode, onChange: provided.setMode } : null;\n}\n\n/** The signed-in frame: sections, account and the primary action in; the rail, the top bar and the account menu out. */\nexport function AppFrame({\n name, mark, headerMark, homeHref, accent, sections, currentId, account, primary, search, notifications, chips, variant = \"app\", language, theme, locale = \"en\", words, linkAs: Link, children, label,\n}: AppFrameProps) {\n const w = { ...navVocabulary(locale), ...words };\n const admin = variant === \"admin\";\n const links = orderAccountLinks(account.links, admin);\n const places = framePlaces(sections, links.map((l) => l.id));\n const frameTheme = useFrameTheme(theme);\n const item = (section: FrameSection) => (\n <RailNav.Item\n key={section.id}\n asChild={Boolean(Link)}\n href={Link ? undefined : section.href}\n icon={section.icon}\n label={section.label}\n current={section.id === currentId}\n badge={section.badge}\n badgeLabel={section.badgeLabel}\n >\n {Link ? <Link href={section.href} /> : undefined}\n </RailNav.Item>\n );\n const menuLinks: AccountMenuLink[] = links.map(({ id, link }) => ({ id, label: link.label ?? w[id], href: link.href, icon: link.icon }));\n const modeLabels: Record<Mode, string> = { light: w.themeLight, dark: w.themeDark, system: w.themeSystem };\n return (\n <RailNav.Shell data-variant={variant}>\n <RailNav.Root\n label={label ?? name}\n accent={accent}\n mark={Link ? <Link href={homeHref} aria-label={name}>{mark}</Link> : <a href={homeHref} aria-label={name}>{mark}</a>}\n footer={places.foot.length > 0 ? places.foot.map(item) : undefined}\n >\n {places.main.map(item)}\n </RailNav.Root>\n <RailNav.Body>\n <AppHeader\n name={name}\n mark={headerMark ?? mark}\n href={Link ? undefined : homeHref}\n homeLink={Link ? <Link href={homeHref} /> : undefined}\n chips={\n <>\n {admin && <Badge tone=\"accent\">{w.administration}</Badge>}\n {chips}\n </>\n }\n search={search && <AppHeaderSearch label={search.label} onOpen={search.onOpen} />}\n notifications={notifications}\n primary={primary}\n account={\n <AccountMenu\n label={w.account}\n name={account.name}\n email={account.email}\n avatar={account.avatar}\n showName=\"lg\"\n links={menuLinks}\n linkAs={Link}\n language={language && { label: w.language, value: language.value, options: language.options, onChange: language.onChange }}\n theme={frameTheme ? { label: w.theme, value: frameTheme.value, options: MODES.map((value) => ({ value, label: modeLabels[value] })), onChange: (value) => frameTheme.onChange(value as Mode) } : undefined}\n signOut={{ label: w.signOut, onSelect: account.onSignOut }}\n />\n }\n />\n {children}\n </RailNav.Body>\n </RailNav.Shell>\n );\n}\n","// Server-safe, pure. The rules of the signed-in frame, written once and tested (the audit's F1 and F2): what the account\n// menu holds and in which order, where a place lives (the rail or the avatar, never both), what a phone's tab bar can carry.\nimport type * as React from \"react\";\n\n/** The places the account menu can hold, in the order the frame draws them. */\nexport const ACCOUNT_LINK_IDS = [\"profile\", \"settings\", \"billing\", \"administration\"] as const;\nexport type AccountLinkId = (typeof ACCOUNT_LINK_IDS)[number];\n\n/** The account menu from top to bottom: who you are, the places, the preferences, Sign out. Fixed by the frame, not by the product. */\nexport const ACCOUNT_MENU_ORDER = [\"identity\", \"profile\", \"settings\", \"billing\", \"administration\", \"language\", \"theme\", \"signOut\"] as const;\n\n/** The most destinations a phone's tab bar carries (the rail's main items; the foot follows them in the same bar). */\nexport const MAIN_SECTIONS_MAX = 5;\n\nexport interface FrameSection {\n /** Stable id; `settings`, `billing`, `profile`, `administration` are the account menu's places. */\n id: string;\n label: string;\n href: string;\n icon: React.ReactNode;\n /** Not offered to this person (a permission, a feature not open): left out of the rail and the tab bar. */\n gated?: boolean;\n /** A count on the icon. */\n badge?: string | number;\n /** The count in words (« 3 to decide »). */\n badgeLabel?: string;\n /** `main`: what the person works in (the tab bar on a phone). `foot`: the rail's foot. @default \"main\" */\n place?: \"main\" | \"foot\";\n}\n\nexport interface FramePlaces {\n main: FrameSection[];\n foot: FrameSection[];\n /** Sections left out of the rail because the account menu already holds that place (or because they are gated). */\n dropped: { id: string; reason: \"account\" | \"gated\" }[];\n}\n\n/**\n * Splits the sections into the rail's main and foot, in the order given. A place is on the rail or under the avatar,\n * never both: a section whose id is one of the account links the frame was given leaves the rail (the avatar owns it).\n * A gated section leaves too.\n */\nexport function framePlaces(sections: readonly FrameSection[], accountLinks: readonly string[] = []): FramePlaces {\n const result: FramePlaces = { main: [], foot: [], dropped: [] };\n for (const section of sections) {\n if (section.gated) result.dropped.push({ id: section.id, reason: \"gated\" });\n else if (accountLinks.includes(section.id)) result.dropped.push({ id: section.id, reason: \"account\" });\n else result[section.place === \"foot\" ? \"foot\" : \"main\"].push(section);\n }\n return result;\n}\n\n/** The account links the frame draws, in the frame's order, whatever the order they were written in. Only what was passed. */\nexport function orderAccountLinks<T>(links: Partial<Record<AccountLinkId, T>> | undefined, admin = false): { id: AccountLinkId; link: T }[] {\n if (!links) return [];\n return ACCOUNT_LINK_IDS.flatMap((id) => {\n const link = links[id];\n // Inside the administration, the way into it is not offered again.\n return link && !(admin && id === \"administration\") ? [{ id, link }] : [];\n });\n}\n\n/** What is wrong with a frame's data, in words for the developer (empty: it is right). Used by the tests and by the dev warning. */\nexport function frameIssues(sections: readonly FrameSection[], accountLinks: readonly string[] = []): string[] {\n const issues: string[] = [];\n const ids = sections.map((s) => s.id);\n for (const id of new Set(ids)) if (ids.filter((x) => x === id).length > 1) issues.push(`The section \"${id}\" is declared twice.`);\n const places = framePlaces(sections, accountLinks);\n for (const { id, reason } of places.dropped) if (reason === \"account\") issues.push(`\"${id}\" is on the rail and under the avatar: a place is in one of them, so the rail drops it.`);\n if (places.main.length > MAIN_SECTIONS_MAX) issues.push(`${places.main.length} main sections: a phone's tab bar carries ${MAIN_SECTIONS_MAX} at most.`);\n return issues;\n}\n","// Server-safe: data and pure functions, no React. The words every Krizaka product says the same way (the audit's F4): the\n// frame's menus, the public bar's links and the footers read them, so « Docs », « Terms » and « Settings » never differ\n// between two products. English is the reference; a French key is required by the type.\nexport const navWords = {\n en: {\n docs: \"Docs\",\n terms: \"Terms\",\n privacy: \"Privacy\",\n settings: \"Settings\",\n billing: \"Billing\",\n profile: \"Profile\",\n administration: \"Administration\",\n account: \"Account\",\n language: \"Language\",\n theme: \"Theme\",\n themeLight: \"Light\",\n themeDark: \"Dark\",\n themeSystem: \"System\",\n signOut: \"Sign out\",\n howItWorks: \"How it works\",\n pricing: \"Pricing\",\n download: \"Download\",\n contact: \"Contact\",\n search: \"Search\",\n notifications: \"Notifications\",\n expand: \"Show the words\",\n collapse: \"Hide the words\",\n },\n fr: {\n docs: \"Docs\",\n terms: \"Conditions d'utilisation\",\n privacy: \"Confidentialité\",\n settings: \"Réglages\",\n billing: \"Facturation\",\n profile: \"Profil\",\n administration: \"Administration\",\n account: \"Compte\",\n language: \"Langue\",\n theme: \"Thème\",\n themeLight: \"Clair\",\n themeDark: \"Sombre\",\n themeSystem: \"Système\",\n signOut: \"Se déconnecter\",\n howItWorks: \"Comment ça marche\",\n pricing: \"Tarifs\",\n download: \"Télécharger\",\n contact: \"Contact\",\n search: \"Rechercher\",\n notifications: \"Notifications\",\n expand: \"Afficher les mots\",\n collapse: \"Masquer les mots\",\n },\n} as const satisfies Record<\"en\" | \"fr\", Record<string, string>>;\n\nexport type NavLocale = keyof typeof navWords;\nexport type NavWords = { [K in keyof (typeof navWords)[\"en\"]]: string };\nexport type NavWordKey = keyof NavWords;\n\n/** The words of a locale (`fr`, `fr-CA`…); any other falls back to English. */\nexport function navVocabulary(locale: string = \"en\"): NavWords {\n return navWords[locale.toLowerCase().startsWith(\"fr\") ? \"fr\" : \"en\"];\n}\n\n/** One word of the shared vocabulary. */\nexport function navWord(locale: string | undefined, key: NavWordKey): string {\n return navVocabulary(locale)[key];\n}\n\n/** The most links a product's public bar holds: past four, the bar is a menu in disguise (audit F3). */\nexport const PUBLIC_BAR_MAX = 4;\n\nexport type PublicBarSlot = \"howItWorks\" | \"pricing\" | \"docs\" | \"download\";\nexport interface PublicBarLink {\n id: PublicBarSlot;\n label: string;\n href: string;\n}\n\n/**\n * The one shape of a product's public bar: flat links, in this order, four at most — How it works · Pricing (when the\n * product has a price) · Docs · Download (when an app exists). Privacy and Terms are the footer's, « Overview » is the mark.\n * Pass the address of each slot the product has; the words come from the shared vocabulary.\n */\nexport function publicBarLinks(hrefs: Partial<Record<PublicBarSlot, string>>, locale?: string): PublicBarLink[] {\n const order: PublicBarSlot[] = [\"howItWorks\", \"pricing\", \"docs\", \"download\"];\n return order.flatMap((id) => {\n const href = hrefs[id];\n return href ? [{ id, label: navWord(locale, id), href }] : [];\n });\n}\n"],"mappings":";;;AAIA,SAAS,mBAAyC;AAClD,SAAS,iBAAiB;AAC1B,SAAS,uBAAuB;AAChC,SAAS,aAAa;AACtB,SAAS,eAAe;AACxB,SAAoB,wBAAwB;;;ACJrC,IAAM,mBAAmB,CAAC,WAAW,YAAY,WAAW,gBAAgB;AAI5E,IAAM,qBAAqB,CAAC,YAAY,WAAW,YAAY,WAAW,kBAAkB,YAAY,SAAS,SAAS;AAG1H,IAAM,oBAAoB;AA8B1B,SAAS,YAAY,UAAmC,eAAkC,CAAC,GAAgB;AAChH,QAAM,SAAsB,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,SAAS,CAAC,EAAE;AAC9D,aAAW,WAAW,UAAU;AAC9B,QAAI,QAAQ,MAAO,QAAO,QAAQ,KAAK,EAAE,IAAI,QAAQ,IAAI,QAAQ,QAAQ,CAAC;AAAA,aACjE,aAAa,SAAS,QAAQ,EAAE,EAAG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UAAU;AAAA;AAAA,UAC3D;AAAA;AAAA,MAEJ;AAAA,MACC;AAAA,OACH;AAAA,KACF;AAEJ;","names":[]}
@@ -4,7 +4,7 @@ import {
4
4
  } from "../chunk-KID32IRJ.js";
5
5
  import {
6
6
  SearchGlyph
7
- } from "../chunk-P7GZR5CU.js";
7
+ } from "../chunk-GFRUTPGG.js";
8
8
 
9
9
  // src/app-header/search/search.tsx
10
10
  import * as React from "react";
@@ -97,16 +97,16 @@ declare function AppHeader({ name, mark, href, homeLink, chips, search, language
97
97
  declare const appHeaderCount: tailwind_variants.TVReturnType<{
98
98
  [key: string]: {
99
99
  [key: string]: tailwind_variants.ClassValue | {
100
- root?: tailwind_variants.ClassValue;
101
100
  icon?: tailwind_variants.ClassValue;
101
+ root?: tailwind_variants.ClassValue;
102
102
  count?: tailwind_variants.ClassValue;
103
103
  };
104
104
  };
105
105
  } | {
106
106
  [x: string]: {
107
107
  [x: string]: tailwind_variants.ClassValue | {
108
- root?: tailwind_variants.ClassValue;
109
108
  icon?: tailwind_variants.ClassValue;
109
+ root?: tailwind_variants.ClassValue;
110
110
  count?: tailwind_variants.ClassValue;
111
111
  };
112
112
  };
@@ -117,8 +117,8 @@ declare const appHeaderCount: tailwind_variants.TVReturnType<{
117
117
  }, undefined, {
118
118
  [key: string]: {
119
119
  [key: string]: tailwind_variants.ClassValue | {
120
- root?: tailwind_variants.ClassValue;
121
120
  icon?: tailwind_variants.ClassValue;
121
+ root?: tailwind_variants.ClassValue;
122
122
  count?: tailwind_variants.ClassValue;
123
123
  };
124
124
  };
package/dist/app-shell.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  ChevronGlyph,
10
10
  CloseGlyph,
11
11
  SearchGlyph
12
- } from "./chunk-P7GZR5CU.js";
12
+ } from "./chunk-GFRUTPGG.js";
13
13
  import {
14
14
  cn
15
15
  } from "./chunk-WU4VLSEA.js";
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-NPMGYLJV.js";
4
4
  import {
5
5
  cardHoverClass
6
- } from "./chunk-RCKXJEDQ.js";
6
+ } from "./chunk-ST5P5HNI.js";
7
7
  import {
8
8
  ArrowGlyph,
9
9
  ChevronGlyph
10
- } from "./chunk-XCBVFMNV.js";
10
+ } from "./chunk-C57KK5VB.js";
11
11
  import "./chunk-XVLWVTQA.js";
12
12
  import {
13
13
  BlockLink
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  PauseGlyph,
10
10
  PlayGlyph
11
- } from "./chunk-CPA5CF35.js";
11
+ } from "./chunk-PGBF3UBX.js";
12
12
 
13
13
  // src/audio-player/audio-player.tsx
14
14
  import * as React from "react";
@@ -38,4 +38,4 @@ export {
38
38
  CheckGlyph,
39
39
  RetryGlyph
40
40
  };
41
- //# sourceMappingURL=chunk-5QEXOGO2.js.map
41
+ //# sourceMappingURL=chunk-6BMKLAZ7.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/glyphs.tsx"],"sourcesContent":["// The small line glyphs the data and media primitives draw (play, volume, search, chevrons…): decorative, 24-unit\n// box, `currentColor`, sized by the caller's class. Shared by the entries that need them; never exported on its own —\n// a product draws its own icons with @krizaka/icons.\nimport type * as React from \"react\";\n\ntype GlyphProps = { className?: string };\n\nfunction Glyph({ className = \"h-4 w-4\", fill, children }: GlyphProps & { fill?: boolean; children: React.ReactNode }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n className={className}\n fill={fill ? \"currentColor\" : \"none\"}\n stroke={fill ? \"none\" : \"currentColor\"}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden\n focusable=\"false\"\n >\n {children}\n </svg>\n );\n}\n\nexport const PlayGlyph = (p: GlyphProps) => (\n <Glyph {...p} fill>\n <path d=\"M8 5.5v13a1 1 0 0 0 1.5.86l10.4-6.5a1 1 0 0 0 0-1.72L9.5 4.64A1 1 0 0 0 8 5.5Z\" />\n </Glyph>\n);\nexport const PauseGlyph = (p: GlyphProps) => (\n <Glyph {...p} fill>\n <rect x=\"6\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\" />\n <rect x=\"14\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\" />\n </Glyph>\n);\nexport const VolumeGlyph = ({ muted, ...p }: GlyphProps & { muted?: boolean }) => (\n <Glyph {...p}>\n <path d=\"M11 5 6 9H3v6h3l5 4V5Z\" />\n {muted ? <path d=\"m22 9-6 6m0-6 6 6\" /> : <path d=\"M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13\" />}\n </Glyph>\n);\nexport const FullscreenGlyph = ({ exit, ...p }: GlyphProps & { exit?: boolean }) => (\n <Glyph {...p}>\n {exit ? <path d=\"M9 4v5H4m11-5v5h5M9 20v-5H4m11 5v-5h5\" /> : <path d=\"M4 9V4h5m6 0h5v5M4 15v5h5m11-5v5h-5\" />}\n </Glyph>\n);\nexport const CaptionsGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"M10 10.5a2 2 0 1 0 0 3M17 10.5a2 2 0 1 0 0 3\" />\n </Glyph>\n);\nexport const PipGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <rect x=\"12\" y=\"12\" width=\"6\" height=\"4\" rx=\"1\" />\n </Glyph>\n);\nexport const SearchGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </Glyph>\n);\nexport const CloseGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </Glyph>\n);\nexport const ChevronGlyph = ({ direction = \"down\", ...p }: GlyphProps & { direction?: \"left\" | \"right\" | \"up\" | \"down\" }) => (\n <Glyph {...p}>\n <path d={{ left: \"m15 6-6 6 6 6\", right: \"m9 6 6 6-6 6\", up: \"m6 15 6-6 6 6\", down: \"m6 9 6 6 6-6\" }[direction]} />\n </Glyph>\n);\nexport const CheckGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M20 6 9 17l-5-5\" />\n </Glyph>\n);\nexport const PlusGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 5v14M5 12h14\" />\n </Glyph>\n);\nexport const CalendarGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"2\" />\n <path d=\"M3 10h18M8 3v4M16 3v4\" />\n </Glyph>\n);\nexport const UploadGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 16V4m0 0L7 9m5-5 5 5\" />\n <path d=\"M4 16v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2\" />\n </Glyph>\n);\nexport const FileGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8l-5-5Z\" />\n <path d=\"M14 3v5h5\" />\n </Glyph>\n);\nexport const CameraGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 8h3l2-3h6l2 3h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1Z\" />\n <circle cx=\"12\" cy=\"13.5\" r=\"3.5\" />\n </Glyph>\n);\nexport const FlipGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 12a8 8 0 0 1 14-5.3M20 12a8 8 0 0 1-14 5.3\" />\n <path d=\"M18 3v4h-4M6 21v-4h4\" />\n </Glyph>\n);\nexport const RetryGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 12a8 8 0 1 0 2.3-5.7L4 8.5\" />\n <path d=\"M4 4v4.5h4.5\" />\n </Glyph>\n);\nexport const SortGlyph = ({ direction, ...p }: GlyphProps & { direction?: \"ascending\" | \"descending\" }) => (\n <Glyph {...p}>\n {direction === \"ascending\" ? <path d=\"m7 14 5-5 5 5\" /> : direction === \"descending\" ? <path d=\"m7 10 5 5 5-5\" /> : <path d=\"m8 9 4-4 4 4M8 15l4 4 4-4\" />}\n </Glyph>\n);\nexport const ArrowGlyph = ({ direction = \"right\", ...p }: GlyphProps & { direction?: \"left\" | \"right\" }) => (\n <Glyph {...p}>\n <path d={direction === \"left\" ? \"M19 12H5m0 0 6-6m-6 6 6 6\" : \"M5 12h14m0 0-6-6m6 6-6 6\"} />\n </Glyph>\n);\nexport const ExternalGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M14 4h6v6M20 4l-9 9\" />\n <path d=\"M18 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4\" />\n </Glyph>\n);\nexport const WarningGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 4 2.5 20h19L12 4Z\" />\n <path d=\"M12 10v4M12 17.2v.1\" />\n </Glyph>\n);\nexport const CopyGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"9\" y=\"9\" width=\"11\" height=\"11\" rx=\"2\" />\n <path d=\"M15 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3\" />\n </Glyph>\n);\n"],"mappings":";AASI,cAsBF,YAtBE;AAFJ,SAAS,MAAM,EAAE,YAAY,WAAW,MAAM,SAAS,GAA+D;AACpH,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR;AAAA,MACA,MAAM,OAAO,iBAAiB;AAAA,MAC9B,QAAQ,OAAO,SAAS;AAAA,MACxB,aAAY;AAAA,MACZ,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,eAAW;AAAA,MACX,WAAU;AAAA,MAET;AAAA;AAAA,EACH;AAEJ;AA0CO,IAAM,aAAa,CAAC,MACzB,oBAAC,SAAO,GAAG,GACT,8BAAC,UAAK,GAAE,wBAAuB,GACjC;AAEK,IAAM,eAAe,CAAC,EAAE,YAAY,QAAQ,GAAG,EAAE,MACtD,oBAAC,SAAO,GAAG,GACT,8BAAC,UAAK,GAAG,EAAE,MAAM,iBAAiB,OAAO,gBAAgB,IAAI,iBAAiB,MAAM,eAAe,EAAE,SAAS,GAAG,GACnH;AAEK,IAAM,aAAa,CAAC,MACzB,oBAAC,SAAO,GAAG,GACT,8BAAC,UAAK,GAAE,mBAAkB,GAC5B;AAgDK,IAAM,aAAa,CAAC,EAAE,YAAY,SAAS,GAAG,EAAE,MACrD,oBAAC,SAAO,GAAG,GACT,8BAAC,UAAK,GAAG,cAAc,SAAS,8BAA8B,4BAA4B,GAC5F;AAEK,IAAM,gBAAgB,CAAC,MAC5B,qBAAC,SAAO,GAAG,GACT;AAAA,sBAAC,UAAK,GAAE,uBAAsB;AAAA,EAC9B,oBAAC,UAAK,GAAE,4DAA2D;AAAA,GACrE;AAEK,IAAM,eAAe,CAAC,MAC3B,qBAAC,SAAO,GAAG,GACT;AAAA,sBAAC,UAAK,GAAE,yBAAwB;AAAA,EAChC,oBAAC,UAAK,GAAE,uBAAsB;AAAA,GAChC;","names":[]}
1
+ {"version":3,"sources":["../src/glyphs.tsx"],"sourcesContent":["// The small line glyphs the data and media primitives draw (play, volume, search, chevrons…): decorative, 24-unit\n// box, `currentColor`, sized by the caller's class. Shared by the entries that need them; never exported on its own —\n// a product draws its own icons with @krizaka/icons.\nimport type * as React from \"react\";\n\ntype GlyphProps = { className?: string };\n\nfunction Glyph({ className = \"h-4 w-4\", fill, children }: GlyphProps & { fill?: boolean; children: React.ReactNode }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n className={className}\n fill={fill ? \"currentColor\" : \"none\"}\n stroke={fill ? \"none\" : \"currentColor\"}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden\n focusable=\"false\"\n >\n {children}\n </svg>\n );\n}\n\nexport const PlayGlyph = (p: GlyphProps) => (\n <Glyph {...p} fill>\n <path d=\"M8 5.5v13a1 1 0 0 0 1.5.86l10.4-6.5a1 1 0 0 0 0-1.72L9.5 4.64A1 1 0 0 0 8 5.5Z\" />\n </Glyph>\n);\nexport const PauseGlyph = (p: GlyphProps) => (\n <Glyph {...p} fill>\n <rect x=\"6\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\" />\n <rect x=\"14\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\" />\n </Glyph>\n);\nexport const VolumeGlyph = ({ muted, ...p }: GlyphProps & { muted?: boolean }) => (\n <Glyph {...p}>\n <path d=\"M11 5 6 9H3v6h3l5 4V5Z\" />\n {muted ? <path d=\"m22 9-6 6m0-6 6 6\" /> : <path d=\"M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13\" />}\n </Glyph>\n);\nexport const FullscreenGlyph = ({ exit, ...p }: GlyphProps & { exit?: boolean }) => (\n <Glyph {...p}>\n {exit ? <path d=\"M9 4v5H4m11-5v5h5M9 20v-5H4m11 5v-5h5\" /> : <path d=\"M4 9V4h5m6 0h5v5M4 15v5h5m11-5v5h-5\" />}\n </Glyph>\n);\nexport const CaptionsGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"M10 10.5a2 2 0 1 0 0 3M17 10.5a2 2 0 1 0 0 3\" />\n </Glyph>\n);\nexport const PipGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <rect x=\"12\" y=\"12\" width=\"6\" height=\"4\" rx=\"1\" />\n </Glyph>\n);\nexport const SearchGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </Glyph>\n);\nexport const CloseGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </Glyph>\n);\nexport const ChevronGlyph = ({ direction = \"down\", ...p }: GlyphProps & { direction?: \"left\" | \"right\" | \"up\" | \"down\" }) => (\n <Glyph {...p}>\n <path d={{ left: \"m15 6-6 6 6 6\", right: \"m9 6 6 6-6 6\", up: \"m6 15 6-6 6 6\", down: \"m6 9 6 6 6-6\" }[direction]} />\n </Glyph>\n);\nexport const CheckGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M20 6 9 17l-5-5\" />\n </Glyph>\n);\nexport const PlusGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 5v14M5 12h14\" />\n </Glyph>\n);\nexport const CalendarGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"2\" />\n <path d=\"M3 10h18M8 3v4M16 3v4\" />\n </Glyph>\n);\nexport const UploadGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 16V4m0 0L7 9m5-5 5 5\" />\n <path d=\"M4 16v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2\" />\n </Glyph>\n);\nexport const FileGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8l-5-5Z\" />\n <path d=\"M14 3v5h5\" />\n </Glyph>\n);\nexport const CameraGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 8h3l2-3h6l2 3h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1Z\" />\n <circle cx=\"12\" cy=\"13.5\" r=\"3.5\" />\n </Glyph>\n);\nexport const FlipGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 12a8 8 0 0 1 14-5.3M20 12a8 8 0 0 1-14 5.3\" />\n <path d=\"M18 3v4h-4M6 21v-4h4\" />\n </Glyph>\n);\nexport const RetryGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 12a8 8 0 1 0 2.3-5.7L4 8.5\" />\n <path d=\"M4 4v4.5h4.5\" />\n </Glyph>\n);\nexport const SortGlyph = ({ direction, ...p }: GlyphProps & { direction?: \"ascending\" | \"descending\" }) => (\n <Glyph {...p}>\n {direction === \"ascending\" ? <path d=\"m7 14 5-5 5 5\" /> : direction === \"descending\" ? <path d=\"m7 10 5 5 5-5\" /> : <path d=\"m8 9 4-4 4 4M8 15l4 4 4-4\" />}\n </Glyph>\n);\nexport const ArrowGlyph = ({ direction = \"right\", ...p }: GlyphProps & { direction?: \"left\" | \"right\" }) => (\n <Glyph {...p}>\n <path d={direction === \"left\" ? \"M19 12H5m0 0 6-6m-6 6 6 6\" : \"M5 12h14m0 0-6-6m6 6-6 6\"} />\n </Glyph>\n);\nexport const ExternalGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M14 4h6v6M20 4l-9 9\" />\n <path d=\"M18 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4\" />\n </Glyph>\n);\nexport const WarningGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 4 2.5 20h19L12 4Z\" />\n <path d=\"M12 10v4M12 17.2v.1\" />\n </Glyph>\n);\nexport const CopyGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"9\" y=\"9\" width=\"11\" height=\"11\" rx=\"2\" />\n <path d=\"M15 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3\" />\n </Glyph>\n);\nexport const PencilGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 20h4L19 9a2.8 2.8 0 0 0-4-4L4 16v4zM13.5 6.5l4 4\" />\n </Glyph>\n);\n"],"mappings":";;;AASI,cAsBF,YAtBE;AAFJ,SAAS,M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["../src/glyphs.tsx"],"sourcesContent":["// The small line glyphs the data and media primitives draw (play, volume, search, chevrons…): decorative, 24-unit\n// box, `currentColor`, sized by the caller's class. Shared by the entries that need them; never exported on its own —\n// a product draws its own icons with @krizaka/icons.\nimport type * as React from \"react\";\n\ntype GlyphProps = { className?: string };\n\nfunction Glyph({ className = \"h-4 w-4\", fill, children }: GlyphProps & { fill?: boolean; children: React.ReactNode }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n className={className}\n fill={fill ? \"currentColor\" : \"none\"}\n stroke={fill ? \"none\" : \"currentColor\"}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden\n focusable=\"false\"\n >\n {children}\n </svg>\n );\n}\n\nexport const PlayGlyph = (p: GlyphProps) => (\n <Glyph {...p} fill>\n <path d=\"M8 5.5v13a1 1 0 0 0 1.5.86l10.4-6.5a1 1 0 0 0 0-1.72L9.5 4.64A1 1 0 0 0 8 5.5Z\" />\n </Glyph>\n);\nexport const PauseGlyph = (p: GlyphProps) => (\n <Glyph {...p} fill>\n <rect x=\"6\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\" />\n <rect x=\"14\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\" />\n </Glyph>\n);\nexport const VolumeGlyph = ({ muted, ...p }: GlyphProps & { muted?: boolean }) => (\n <Glyph {...p}>\n <path d=\"M11 5 6 9H3v6h3l5 4V5Z\" />\n {muted ? <path d=\"m22 9-6 6m0-6 6 6\" /> : <path d=\"M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13\" />}\n </Glyph>\n);\nexport const FullscreenGlyph = ({ exit, ...p }: GlyphProps & { exit?: boolean }) => (\n <Glyph {...p}>\n {exit ? <path d=\"M9 4v5H4m11-5v5h5M9 20v-5H4m11 5v-5h5\" /> : <path d=\"M4 9V4h5m6 0h5v5M4 15v5h5m11-5v5h-5\" />}\n </Glyph>\n);\nexport const CaptionsGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"M10 10.5a2 2 0 1 0 0 3M17 10.5a2 2 0 1 0 0 3\" />\n </Glyph>\n);\nexport const PipGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <rect x=\"12\" y=\"12\" width=\"6\" height=\"4\" rx=\"1\" />\n </Glyph>\n);\nexport const SearchGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </Glyph>\n);\nexport const CloseGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </Glyph>\n);\nexport const ChevronGlyph = ({ direction = \"down\", ...p }: GlyphProps & { direction?: \"left\" | \"right\" | \"up\" | \"down\" }) => (\n <Glyph {...p}>\n <path d={{ left: \"m15 6-6 6 6 6\", right: \"m9 6 6 6-6 6\", up: \"m6 15 6-6 6 6\", down: \"m6 9 6 6 6-6\" }[direction]} />\n </Glyph>\n);\nexport const CheckGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M20 6 9 17l-5-5\" />\n </Glyph>\n);\nexport const PlusGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 5v14M5 12h14\" />\n </Glyph>\n);\nexport const CalendarGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"2\" />\n <path d=\"M3 10h18M8 3v4M16 3v4\" />\n </Glyph>\n);\nexport const UploadGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 16V4m0 0L7 9m5-5 5 5\" />\n <path d=\"M4 16v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2\" />\n </Glyph>\n);\nexport const FileGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8l-5-5Z\" />\n <path d=\"M14 3v5h5\" />\n </Glyph>\n);\nexport const CameraGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 8h3l2-3h6l2 3h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1Z\" />\n <circle cx=\"12\" cy=\"13.5\" r=\"3.5\" />\n </Glyph>\n);\nexport const FlipGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 12a8 8 0 0 1 14-5.3M20 12a8 8 0 0 1-14 5.3\" />\n <path d=\"M18 3v4h-4M6 21v-4h4\" />\n </Glyph>\n);\nexport const RetryGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 12a8 8 0 1 0 2.3-5.7L4 8.5\" />\n <path d=\"M4 4v4.5h4.5\" />\n </Glyph>\n);\nexport const SortGlyph = ({ direction, ...p }: GlyphProps & { direction?: \"ascending\" | \"descending\" }) => (\n <Glyph {...p}>\n {direction === \"ascending\" ? <path d=\"m7 14 5-5 5 5\" /> : direction === \"descending\" ? <path d=\"m7 10 5 5 5-5\" /> : <path d=\"m8 9 4-4 4 4M8 15l4 4 4-4\" />}\n </Glyph>\n);\nexport const ArrowGlyph = ({ direction = \"right\", ...p }: GlyphProps & { direction?: \"left\" | \"right\" }) => (\n <Glyph {...p}>\n <path d={direction === \"left\" ? \"M19 12H5m0 0 6-6m-6 6 6 6\" : \"M5 12h14m0 0-6-6m6 6-6 6\"} />\n </Glyph>\n);\nexport const ExternalGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M14 4h6v6M20 4l-9 9\" />\n <path d=\"M18 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4\" />\n </Glyph>\n);\nexport const WarningGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 4 2.5 20h19L12 4Z\" />\n <path d=\"M12 10v4M12 17.2v.1\" />\n </Glyph>\n);\nexport const CopyGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"9\" y=\"9\" width=\"11\" height=\"11\" rx=\"2\" />\n <path d=\"M15 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3\" />\n </Glyph>\n);\n"],"mappings":";AASI,cAsBF,YAtBE;AAFJ,SAAS,MAAM,EAAE,YAAY,WAAW,MAAM,SAAS,GAA+D;AACpH,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR;AAAA,MACA,MAAM,OAAO,iBAAiB;AAAA,MAC9B,QAAQ,OAAO,SAAS;AAAA,MACxB,aAAY;AAAA,MACZ,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,eAAW;AAAA,MACX,WAAU;AAAA,MAET;AAAA;AAAA,EACH;AAEJ;AA+CO,IAAM,eAAe,CAAC,EAAE,YAAY,QAAQ,GAAG,EAAE,MACtD,oBAAC,SAAO,GAAG,GACT,8BAAC,UAAK,GAAG,EAAE,MAAM,iBAAiB,OAAO,gBAAgB,IAAI,iBAAiB,MAAM,eAAe,EAAE,SAAS,GAAG,GACnH;AAEK,IAAM,aAAa,CAAC,MACzB,oBAAC,SAAO,GAAG,GACT,8BAAC,UAAK,GAAE,mBAAkB,GAC5B;AAaK,IAAM,cAAc,CAAC,MAC1B,qBAAC,SAAO,GAAG,GACT;AAAA,sBAAC,UAAK,GAAE,4BAA2B;AAAA,EACnC,oBAAC,UAAK,GAAE,6CAA4C;AAAA,GACtD;","names":[]}
1
+ {"version":3,"sources":["../src/glyphs.tsx"],"sourcesContent":["// The small line glyphs the data and media primitives draw (play, volume, search, chevrons…): decorative, 24-unit\n// box, `currentColor`, sized by the caller's class. Shared by the entries that need them; never exported on its own —\n// a product draws its own icons with @krizaka/icons.\nimport type * as React from \"react\";\n\ntype GlyphProps = { className?: string };\n\nfunction Glyph({ className = \"h-4 w-4\", fill, children }: GlyphProps & { fill?: boolean; children: React.ReactNode }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n className={className}\n fill={fill ? \"currentColor\" : \"none\"}\n stroke={fill ? \"none\" : \"currentColor\"}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden\n focusable=\"false\"\n >\n {children}\n </svg>\n );\n}\n\nexport const PlayGlyph = (p: GlyphProps) => (\n <Glyph {...p} fill>\n <path d=\"M8 5.5v13a1 1 0 0 0 1.5.86l10.4-6.5a1 1 0 0 0 0-1.72L9.5 4.64A1 1 0 0 0 8 5.5Z\" />\n </Glyph>\n);\nexport const PauseGlyph = (p: GlyphProps) => (\n <Glyph {...p} fill>\n <rect x=\"6\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\" />\n <rect x=\"14\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\" />\n </Glyph>\n);\nexport const VolumeGlyph = ({ muted, ...p }: GlyphProps & { muted?: boolean }) => (\n <Glyph {...p}>\n <path d=\"M11 5 6 9H3v6h3l5 4V5Z\" />\n {muted ? <path d=\"m22 9-6 6m0-6 6 6\" /> : <path d=\"M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13\" />}\n </Glyph>\n);\nexport const FullscreenGlyph = ({ exit, ...p }: GlyphProps & { exit?: boolean }) => (\n <Glyph {...p}>\n {exit ? <path d=\"M9 4v5H4m11-5v5h5M9 20v-5H4m11 5v-5h5\" /> : <path d=\"M4 9V4h5m6 0h5v5M4 15v5h5m11-5v5h-5\" />}\n </Glyph>\n);\nexport const CaptionsGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"M10 10.5a2 2 0 1 0 0 3M17 10.5a2 2 0 1 0 0 3\" />\n </Glyph>\n);\nexport const PipGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <rect x=\"12\" y=\"12\" width=\"6\" height=\"4\" rx=\"1\" />\n </Glyph>\n);\nexport const SearchGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </Glyph>\n);\nexport const CloseGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </Glyph>\n);\nexport const ChevronGlyph = ({ direction = \"down\", ...p }: GlyphProps & { direction?: \"left\" | \"right\" | \"up\" | \"down\" }) => (\n <Glyph {...p}>\n <path d={{ left: \"m15 6-6 6 6 6\", right: \"m9 6 6 6-6 6\", up: \"m6 15 6-6 6 6\", down: \"m6 9 6 6 6-6\" }[direction]} />\n </Glyph>\n);\nexport const CheckGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M20 6 9 17l-5-5\" />\n </Glyph>\n);\nexport const PlusGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 5v14M5 12h14\" />\n </Glyph>\n);\nexport const CalendarGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"2\" />\n <path d=\"M3 10h18M8 3v4M16 3v4\" />\n </Glyph>\n);\nexport const UploadGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 16V4m0 0L7 9m5-5 5 5\" />\n <path d=\"M4 16v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2\" />\n </Glyph>\n);\nexport const FileGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8l-5-5Z\" />\n <path d=\"M14 3v5h5\" />\n </Glyph>\n);\nexport const CameraGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 8h3l2-3h6l2 3h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1Z\" />\n <circle cx=\"12\" cy=\"13.5\" r=\"3.5\" />\n </Glyph>\n);\nexport const FlipGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 12a8 8 0 0 1 14-5.3M20 12a8 8 0 0 1-14 5.3\" />\n <path d=\"M18 3v4h-4M6 21v-4h4\" />\n </Glyph>\n);\nexport const RetryGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 12a8 8 0 1 0 2.3-5.7L4 8.5\" />\n <path d=\"M4 4v4.5h4.5\" />\n </Glyph>\n);\nexport const SortGlyph = ({ direction, ...p }: GlyphProps & { direction?: \"ascending\" | \"descending\" }) => (\n <Glyph {...p}>\n {direction === \"ascending\" ? <path d=\"m7 14 5-5 5 5\" /> : direction === \"descending\" ? <path d=\"m7 10 5 5 5-5\" /> : <path d=\"m8 9 4-4 4 4M8 15l4 4 4-4\" />}\n </Glyph>\n);\nexport const ArrowGlyph = ({ direction = \"right\", ...p }: GlyphProps & { direction?: \"left\" | \"right\" }) => (\n <Glyph {...p}>\n <path d={direction === \"left\" ? \"M19 12H5m0 0 6-6m-6 6 6 6\" : \"M5 12h14m0 0-6-6m6 6-6 6\"} />\n </Glyph>\n);\nexport const ExternalGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M14 4h6v6M20 4l-9 9\" />\n <path d=\"M18 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4\" />\n </Glyph>\n);\nexport const WarningGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 4 2.5 20h19L12 4Z\" />\n <path d=\"M12 10v4M12 17.2v.1\" />\n </Glyph>\n);\nexport const CopyGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"9\" y=\"9\" width=\"11\" height=\"11\" rx=\"2\" />\n <path d=\"M15 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3\" />\n </Glyph>\n);\nexport const PencilGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 20h4L19 9a2.8 2.8 0 0 0-4-4L4 16v4zM13.5 6.5l4 4\" />\n </Glyph>\n);\n"],"mappings":";AASI,cAsBF,YAtBE;AAFJ,SAAS,MAAM,EAAE,YAAY,WAAW,MAAM,SAAS,GAA+D;AACpH,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR;AAAA,MACA,MAAM,OAAO,iBAAiB;AAAA,MAC9B,QAAQ,OAAO,SAAS;AAAA,MACxB,aAAY;AAAA,MACZ,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,eAAW;AAAA,MACX,WAAU;AAAA,MAET;AAAA;AAAA,EACH;AAEJ;AA+CO,IAAM,eAAe,CAAC,EAAE,YAAY,QAAQ,GAAG,EAAE,MACtD,oBAAC,SAAO,GAAG,GACT,8BAAC,UAAK,GAAG,EAAE,MAAM,iBAAiB,OAAO,gBAAgB,IAAI,iBAAiB,MAAM,eAAe,EAAE,SAAS,GAAG,GACnH;AAEK,IAAM,aAAa,CAAC,MACzB,oBAAC,SAAO,GAAG,GACT,8BAAC,UAAK,GAAE,mBAAkB,GAC5B;AAaK,IAAM,cAAc,CAAC,MAC1B,qBAAC,SAAO,GAAG,GACT;AAAA,sBAAC,UAAK,GAAE,4BAA2B;AAAA,EACnC,oBAAC,UAAK,GAAE,6CAA4C;AAAA,GACtD;","names":[]}