@krizaka/ui 3.65.0 → 3.67.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 (313) hide show
  1. package/README.md +3 -0
  2. package/dist/account-settings.d.ts +2 -0
  3. package/dist/account-settings.js +3 -1
  4. package/dist/account-settings.js.map +1 -1
  5. package/dist/action-bar.js +1 -1
  6. package/dist/app-header/search.js +1 -1
  7. package/dist/app-header.d.ts +3 -3
  8. package/dist/app-shell.js +1 -1
  9. package/dist/argument-card.js +2 -2
  10. package/dist/audio-player.js +1 -1
  11. package/dist/auth-layout.js +1 -1
  12. package/dist/auth-layout.js.map +1 -1
  13. package/dist/{chunk-5QEXOGO2.js → chunk-6BMKLAZ7.js} +1 -1
  14. package/dist/{chunk-XCBVFMNV.js.map → chunk-6BMKLAZ7.js.map} +1 -1
  15. package/dist/{chunk-SHBYNQFS.js → chunk-7DYZTEE3.js} +1 -1
  16. package/dist/{chunk-SHBYNQFS.js.map → chunk-7DYZTEE3.js.map} +1 -1
  17. package/dist/{chunk-YCZ7N6Q6.js → chunk-7MQNG35Q.js} +2 -2
  18. package/dist/{chunk-XCBVFMNV.js → chunk-C57KK5VB.js} +7 -2
  19. package/dist/chunk-C57KK5VB.js.map +1 -0
  20. package/dist/{chunk-VB7MWE2N.js → chunk-DSDFXPL6.js} +2 -2
  21. package/dist/{chunk-BG5APGX6.js → chunk-E4X3V7QX.js} +17 -18
  22. package/dist/{chunk-BG5APGX6.js.map → chunk-E4X3V7QX.js.map} +1 -1
  23. package/dist/{chunk-P7GZR5CU.js → chunk-GFRUTPGG.js} +1 -1
  24. package/dist/{chunk-P7GZR5CU.js.map → chunk-GFRUTPGG.js.map} +1 -1
  25. package/dist/{chunk-4GQH27IT.js → chunk-GW5EI7MI.js} +2 -2
  26. package/dist/chunk-NG6G6V5E.js +33 -0
  27. package/dist/{chunk-5QEXOGO2.js.map → chunk-NG6G6V5E.js.map} +1 -1
  28. package/dist/{chunk-F6JTHPHE.js → chunk-PFPOBIHL.js} +46 -29
  29. package/dist/{chunk-F6JTHPHE.js.map → chunk-PFPOBIHL.js.map} +1 -1
  30. package/dist/{chunk-CPA5CF35.js → chunk-PGBF3UBX.js} +1 -1
  31. package/dist/{chunk-CPA5CF35.js.map → chunk-PGBF3UBX.js.map} +1 -1
  32. package/dist/{chunk-RCKXJEDQ.js → chunk-ST5P5HNI.js} +2 -2
  33. package/dist/code-block.js +1 -1
  34. package/dist/collection-switcher.d.ts +68 -0
  35. package/dist/collection-switcher.js +131 -0
  36. package/dist/collection-switcher.js.map +1 -0
  37. package/dist/combobox.js +2 -2
  38. package/dist/cover-hero.js +1 -1
  39. package/dist/data-table.js +4 -4
  40. package/dist/date-picker.js +1 -1
  41. package/dist/decision-list.js +1 -1
  42. package/dist/default-avatar-D9kiSFNB.d.ts +26 -0
  43. package/dist/docs-layout.js +1 -1
  44. package/dist/entity-header.d.ts +92 -0
  45. package/dist/entity-header.js +165 -0
  46. package/dist/entity-header.js.map +1 -0
  47. package/dist/file-upload.d.ts +5 -3
  48. package/dist/file-upload.js +3 -1
  49. package/dist/file-upload.js.map +1 -1
  50. package/dist/filter-bar.d.ts +3 -3
  51. package/dist/filter-bar.js +2 -2
  52. package/dist/footnote.js +1 -1
  53. package/dist/footnote.js.map +1 -1
  54. package/dist/genui.js +4 -4
  55. package/dist/link-card.js +2 -2
  56. package/dist/list.js +1 -1
  57. package/dist/media-capture.js +1 -1
  58. package/dist/native.d.ts +121 -3
  59. package/dist/native.js +1770 -1228
  60. package/dist/native.js.map +1 -1
  61. package/dist/opening-hours.js +1 -1
  62. package/dist/page-hero.js +1 -1
  63. package/dist/pagination.js +1 -1
  64. package/dist/photo-grid.js +1 -1
  65. package/dist/pricing-page.js.map +1 -1
  66. package/dist/qr-code.d.ts +42 -0
  67. package/dist/qr-code.js +350 -0
  68. package/dist/qr-code.js.map +1 -0
  69. package/dist/radio-group.js +1 -1
  70. package/dist/rail-nav.js +1 -1
  71. package/dist/retro-tv.js +2 -2
  72. package/dist/search-field.js +2 -2
  73. package/dist/service-card.js +1 -1
  74. package/dist/shop-composer.js +1 -1
  75. package/dist/shop-composer.js.map +1 -1
  76. package/dist/site-cahier.js +1 -1
  77. package/dist/status-chip.js +1 -1
  78. package/dist/tag-input.js +2 -2
  79. package/dist/tag-selector.js +2 -1
  80. package/dist/tag-selector.js.map +1 -1
  81. package/dist/terminal-replay.js +1 -1
  82. package/dist/tree-view.js +1 -1
  83. package/dist/video-player.js +2 -2
  84. package/package.json +48 -5
  85. package/registry/account-menu.json +1 -1
  86. package/registry/account-settings.json +2 -2
  87. package/registry/achievement.json +1 -1
  88. package/registry/action-bar.json +2 -2
  89. package/registry/activity-feed.json +1 -1
  90. package/registry/agenda.json +1 -1
  91. package/registry/alert.json +1 -1
  92. package/registry/analysis-report.json +1 -1
  93. package/registry/anatomy-plate.json +1 -1
  94. package/registry/app-frame.json +2 -2
  95. package/registry/app-header.json +2 -2
  96. package/registry/app-shell.json +2 -2
  97. package/registry/argument-card.json +2 -2
  98. package/registry/audio-player.json +2 -2
  99. package/registry/auth-layout.json +2 -2
  100. package/registry/avatar.json +1 -1
  101. package/registry/badge.json +1 -1
  102. package/registry/bird-plate.json +1 -1
  103. package/registry/button.json +1 -1
  104. package/registry/captcha.json +1 -1
  105. package/registry/card-grid.json +1 -1
  106. package/registry/card.json +1 -1
  107. package/registry/catalogue-page.json +1 -1
  108. package/registry/changelog-page.json +1 -1
  109. package/registry/chapter.json +1 -1
  110. package/registry/chat.json +1 -1
  111. package/registry/checkbox.json +1 -1
  112. package/registry/chip-link.json +1 -1
  113. package/registry/chip-row.json +1 -1
  114. package/registry/chip.json +1 -1
  115. package/registry/choice-grid.json +1 -1
  116. package/registry/code-block.json +2 -2
  117. package/registry/collection-switcher.json +436 -0
  118. package/registry/combobox.json +2 -2
  119. package/registry/command.json +1 -1
  120. package/registry/comparison-table.json +1 -1
  121. package/registry/component-page.json +1 -1
  122. package/registry/confirm-button.json +1 -1
  123. package/registry/contact-page.json +1 -1
  124. package/registry/continue-prompt.json +1 -1
  125. package/registry/countdown.json +1 -1
  126. package/registry/cover-hero.json +2 -2
  127. package/registry/cta-panel.json +1 -1
  128. package/registry/dashboard-layout.json +1 -1
  129. package/registry/data-table.json +3 -3
  130. package/registry/date-picker.json +2 -2
  131. package/registry/decision-list.json +2 -2
  132. package/registry/description-list.json +1 -1
  133. package/registry/desktop-window.json +1 -1
  134. package/registry/detail-layout.json +1 -1
  135. package/registry/dialog.json +1 -1
  136. package/registry/docs-article-page.json +1 -1
  137. package/registry/docs-hub-page.json +1 -1
  138. package/registry/docs-layout.json +2 -2
  139. package/registry/docs-nav.json +1 -1
  140. package/registry/document-viewer.json +1 -1
  141. package/registry/doodle.json +1 -1
  142. package/registry/drop-overlay.json +1 -1
  143. package/registry/dropdown-menu.json +1 -1
  144. package/registry/elephant.json +2 -2
  145. package/registry/embed-facade.json +1 -1
  146. package/registry/empty-state.json +1 -1
  147. package/registry/engine-flow.json +1 -1
  148. package/registry/entity-header.json +502 -0
  149. package/registry/environment-notice.json +1 -1
  150. package/registry/error-page.json +1 -1
  151. package/registry/examples/collection-switcher/entity.d.ts +4 -0
  152. package/registry/examples/collection-switcher/entity.js +17 -0
  153. package/registry/examples/collection-switcher/entity.tsx +13 -0
  154. package/registry/examples/collection-switcher/list.d.ts +4 -0
  155. package/registry/examples/collection-switcher/list.js +32 -0
  156. package/registry/examples/collection-switcher/list.tsx +27 -0
  157. package/registry/examples/collection-switcher/native/list.d.ts +4 -0
  158. package/registry/examples/collection-switcher/native/list.dark.png +0 -0
  159. package/registry/examples/collection-switcher/native/list.js +18 -0
  160. package/registry/examples/collection-switcher/native/list.light.png +0 -0
  161. package/registry/examples/collection-switcher/native/list.tsx +14 -0
  162. package/registry/examples/collection-switcher/tree.d.ts +4 -0
  163. package/registry/examples/collection-switcher/tree.js +19 -0
  164. package/registry/examples/collection-switcher/tree.tsx +15 -0
  165. package/registry/examples/entity-header/basic.d.ts +4 -0
  166. package/registry/examples/entity-header/basic.js +31 -0
  167. package/registry/examples/entity-header/basic.tsx +25 -0
  168. package/registry/examples/entity-header/native/basic.d.ts +4 -0
  169. package/registry/examples/entity-header/native/basic.dark.png +0 -0
  170. package/registry/examples/entity-header/native/basic.js +17 -0
  171. package/registry/examples/entity-header/native/basic.light.png +0 -0
  172. package/registry/examples/entity-header/native/basic.tsx +12 -0
  173. package/registry/examples/qr-code/basic.d.ts +4 -0
  174. package/registry/examples/qr-code/basic.js +11 -0
  175. package/registry/examples/qr-code/basic.tsx +6 -0
  176. package/registry/examples/qr-code/calendar-feed.d.ts +4 -0
  177. package/registry/examples/qr-code/calendar-feed.js +24 -0
  178. package/registry/examples/qr-code/calendar-feed.tsx +18 -0
  179. package/registry/examples/qr-code/native/calendar-feed.d.ts +4 -0
  180. package/registry/examples/qr-code/native/calendar-feed.dark.png +0 -0
  181. package/registry/examples/qr-code/native/calendar-feed.js +25 -0
  182. package/registry/examples/qr-code/native/calendar-feed.light.png +0 -0
  183. package/registry/examples/qr-code/native/calendar-feed.tsx +19 -0
  184. package/registry/field.json +1 -1
  185. package/registry/file-upload.json +17 -3
  186. package/registry/filter-bar.json +3 -3
  187. package/registry/flock.json +1 -1
  188. package/registry/footnote.json +2 -2
  189. package/registry/force-update-screen.json +1 -1
  190. package/registry/form.json +1 -1
  191. package/registry/gallery-page.json +1 -1
  192. package/registry/genui.json +1 -1
  193. package/registry/glossary-term.json +1 -1
  194. package/registry/glossary.json +1 -1
  195. package/registry/glow-card.json +1 -1
  196. package/registry/goal-gauge.json +1 -1
  197. package/registry/grade-stamp.json +1 -1
  198. package/registry/how-it-works-page.json +1 -1
  199. package/registry/image-cropper.json +1 -1
  200. package/registry/index.json +102 -8
  201. package/registry/iso.json +1 -1
  202. package/registry/kanban.json +1 -1
  203. package/registry/kbd.json +1 -1
  204. package/registry/kind-config-editor.json +1 -1
  205. package/registry/kpi-explained.json +1 -1
  206. package/registry/landing-page.json +1 -1
  207. package/registry/landscape.json +1 -1
  208. package/registry/language-switch.json +1 -1
  209. package/registry/legal-page.json +1 -1
  210. package/registry/link-card.json +2 -2
  211. package/registry/list.json +2 -2
  212. package/registry/loader.json +1 -1
  213. package/registry/longform-page.json +1 -1
  214. package/registry/maintenance-screen.json +1 -1
  215. package/registry/map.json +2 -2
  216. package/registry/margin-layout.json +1 -1
  217. package/registry/markdown.json +1 -1
  218. package/registry/marketing-layout.json +1 -1
  219. package/registry/marquee.json +1 -1
  220. package/registry/mascot-quote.json +1 -1
  221. package/registry/mascot-state.json +1 -1
  222. package/registry/mascots.json +1 -1
  223. package/registry/match-dialog.json +1 -1
  224. package/registry/media-capture.json +2 -2
  225. package/registry/media-gallery.json +1 -1
  226. package/registry/media-grid.json +1 -1
  227. package/registry/meta-row.json +1 -1
  228. package/registry/meter.json +1 -1
  229. package/registry/nav-bar.json +2 -2
  230. package/registry/next-actions.json +1 -1
  231. package/registry/notification-preferences.json +1 -1
  232. package/registry/number-ticker.json +1 -1
  233. package/registry/opening-hours.json +2 -2
  234. package/registry/page-header.json +1 -1
  235. package/registry/page-hero.json +2 -2
  236. package/registry/page-index.json +1 -1
  237. package/registry/page.json +1 -1
  238. package/registry/pagination.json +2 -2
  239. package/registry/photo-grid.json +2 -2
  240. package/registry/pointer-light.json +1 -1
  241. package/registry/popover.json +1 -1
  242. package/registry/pricing-page.json +2 -2
  243. package/registry/product-page.json +1 -1
  244. package/registry/profile-card.json +1 -1
  245. package/registry/progress.json +1 -1
  246. package/registry/promise-card.json +1 -1
  247. package/registry/qr-code.json +343 -0
  248. package/registry/quota-meter.json +1 -1
  249. package/registry/radio-group.json +2 -2
  250. package/registry/rail-nav.json +3 -3
  251. package/registry/recipes.json +1 -1
  252. package/registry/retro-tv.json +1 -1
  253. package/registry/reviews.json +1 -1
  254. package/registry/router.json +1 -1
  255. package/registry/scroll-stage.json +1 -1
  256. package/registry/search-field.json +2 -2
  257. package/registry/section-backdrop.json +1 -1
  258. package/registry/separator.json +1 -1
  259. package/registry/service-card.json +2 -2
  260. package/registry/settings-layout.json +1 -1
  261. package/registry/shop-composer.json +2 -2
  262. package/registry/shop.json +2 -2
  263. package/registry/showcase.json +1 -1
  264. package/registry/signature.json +1 -1
  265. package/registry/site-cahier.json +1 -1
  266. package/registry/site-footer.json +2 -2
  267. package/registry/sites.json +1 -1
  268. package/registry/skeleton.json +1 -1
  269. package/registry/skip-link.json +1 -1
  270. package/registry/slider.json +1 -1
  271. package/registry/slot-picker.json +1 -1
  272. package/registry/slot.json +1 -1
  273. package/registry/specimen-tag.json +1 -1
  274. package/registry/speed-lines.json +1 -1
  275. package/registry/spinner.json +1 -1
  276. package/registry/split-view.json +1 -1
  277. package/registry/stage-banner.json +1 -1
  278. package/registry/stat.json +1 -1
  279. package/registry/status-chip.json +2 -2
  280. package/registry/status-page.json +1 -1
  281. package/registry/step-progress.json +1 -1
  282. package/registry/step-showcase.json +1 -1
  283. package/registry/stepper.json +1 -1
  284. package/registry/sticky-action.json +1 -1
  285. package/registry/stuck.json +1 -1
  286. package/registry/swipe-deck.json +1 -1
  287. package/registry/switch.json +1 -1
  288. package/registry/tabs.json +1 -1
  289. package/registry/tag-input.json +1 -1
  290. package/registry/tag-selector.json +2 -2
  291. package/registry/taped-photo.json +1 -1
  292. package/registry/terminal-replay.json +2 -2
  293. package/registry/text-style.json +1 -1
  294. package/registry/theme.json +1 -1
  295. package/registry/toast.json +1 -1
  296. package/registry/toc.json +1 -1
  297. package/registry/tooltip.json +1 -1
  298. package/registry/tree-view.json +2 -2
  299. package/registry/update-prompt.json +1 -1
  300. package/registry/upload-queue.json +1 -1
  301. package/registry/usage.json +1 -1
  302. package/registry/verified-badge.json +1 -1
  303. package/registry/versus-card.json +1 -1
  304. package/registry/vertical-video.json +1 -1
  305. package/registry/video-player.json +2 -2
  306. package/registry/video-trimmer.json +1 -1
  307. package/registry/virtual.json +1 -1
  308. package/registry/wall.json +1 -1
  309. package/registry/waveform.json +1 -1
  310. /package/dist/{chunk-YCZ7N6Q6.js.map → chunk-7MQNG35Q.js.map} +0 -0
  311. /package/dist/{chunk-VB7MWE2N.js.map → chunk-DSDFXPL6.js.map} +0 -0
  312. /package/dist/{chunk-4GQH27IT.js.map → chunk-GW5EI7MI.js.map} +0 -0
  313. /package/dist/{chunk-RCKXJEDQ.js.map → chunk-ST5P5HNI.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ChevronGlyph
3
- } from "./chunk-XCBVFMNV.js";
3
+ } from "./chunk-C57KK5VB.js";
4
4
 
5
5
  // src/opening-hours/opening-hours.tsx
6
6
  import { tv } from "tailwind-variants";
package/dist/page-hero.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-NPMGYLJV.js";
4
4
  import {
5
5
  ArrowGlyph
6
- } from "./chunk-XCBVFMNV.js";
6
+ } from "./chunk-C57KK5VB.js";
7
7
  import {
8
8
  SectionBackdrop
9
9
  } from "./chunk-XVLWVTQA.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ChevronGlyph
3
- } from "./chunk-XCBVFMNV.js";
3
+ } from "./chunk-C57KK5VB.js";
4
4
 
5
5
  // src/pagination/pagination.tsx
6
6
  import { tv } from "tailwind-variants";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  PlusGlyph
4
- } from "./chunk-CPA5CF35.js";
4
+ } from "./chunk-PGBF3UBX.js";
5
5
 
6
6
  // src/photo-grid/photo-grid.tsx
7
7
  import * as React from "react";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/pricing-page/pricing-page.tsx","../src/glyphs.tsx"],"sourcesContent":["// Server-safe. Plans and what they cost (blocks.css `.kz-tpl-plans`, `.kz-tpl-compare`, `.kz-tpl-faq`): the hero, the\n// plans side by side — the featured one lifted, lit by the brand — the comparison as a table that scrolls on a phone,\n// what a credit buys, and the questions people ask, folded.\nimport { Section } from \"@krizaka/ui/page\";\nimport { PageHero } from \"@krizaka/ui/page-hero\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { CheckGlyph } from \"../glyphs\";\n\nexport interface PricingPlan {\n /** A stable key. */\n id: string;\n /** Its name. */\n name: React.ReactNode;\n /** Its price (`€29`, `Free`, `Custom`). */\n price: React.ReactNode;\n /** Under the price: the unit (`per month · 12,000 credits`). */\n unit?: React.ReactNode;\n /** What it includes, a few lines. */\n features: readonly React.ReactNode[];\n /** Its action (a cut Button or link; the featured one primary). */\n action: React.ReactNode;\n /** The plan most people choose: lifted and lit. */\n featured?: boolean;\n /** Its badge (`Most chosen`). */\n badge?: React.ReactNode;\n}\n\nexport type PricingPageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The brand the page wears (`.brand-<id>`). */\n brand?: string;\n /** A mono line above the title. */\n eyebrow?: React.ReactNode;\n /** The page's `h1`. */\n title: React.ReactNode;\n /** One sentence under it. */\n lead?: React.ReactNode;\n /** Above the plans: a period switch (monthly · yearly), a currency. */\n toolbar?: React.ReactNode;\n /** The plans' accessible name (`Plans`). */\n plansLabel: string;\n /** The plans. */\n plans: readonly PricingPlan[];\n /** The comparison: its caption, columns (the plans' names) and rows (a feature and a cell per plan). */\n compare?: { caption: React.ReactNode; columns: readonly React.ReactNode[]; rows: readonly { feature: React.ReactNode; cells: readonly React.ReactNode[] }[] };\n /** What a credit buys, the credits left: a Meter, a sentence. */\n credits?: { title: React.ReactNode; children: React.ReactNode };\n /** The questions, folded. */\n faq?: { title: React.ReactNode; items: readonly { question: React.ReactNode; answer: React.ReactNode }[] };\n};\n\n/** A pricing page: plans (the featured one lifted), the comparison, credits, the questions. */\nexport function PricingPage({ brand, eyebrow, title, lead, toolbar, plansLabel, plans, compare, credits, faq, className, ...props }: PricingPageProps) {\n return (\n <div className={cn(brand && \"brand-\" + brand, className)} {...props}>\n <PageHero eyebrow={eyebrow} title={title} lead={lead} align=\"center\" backdrop=\"plain\">\n {toolbar}\n </PageHero>\n <Section aria-label={plansLabel} spacing=\"sm\">\n <ul className=\"kz-tpl-plans\">\n {plans.map((p) => (\n <li key={p.id}>\n <div className=\"kz-tpl-plan\" data-featured={p.featured ? \"\" : undefined}>\n <div className=\"kz-tpl-collection-head\">\n <h2>{p.name}</h2>\n {p.badge && <span className=\"kz-fact\" data-tone=\"ok\">{p.badge}</span>}\n </div>\n <p className=\"kz-tpl-price\">\n {p.price}\n {p.unit && <small>{p.unit}</small>}\n </p>\n <ul>\n {p.features.map((f, i) => (\n <li key={i}>\n <CheckGlyph className=\"h-4 w-4\" />\n <span>{f}</span>\n </li>\n ))}\n </ul>\n <div>{p.action}</div>\n </div>\n </li>\n ))}\n </ul>\n </Section>\n {compare && (\n <Section aria-label={typeof compare.caption === \"string\" ? compare.caption : undefined} spacing=\"sm\" divider>\n <div className=\"kz-tpl-scroll\" tabIndex={0}>\n <table className=\"kz-tpl-compare\">\n <caption className=\"kz-label kz-tpl-caption\">{compare.caption}</caption>\n <thead>\n <tr>\n <td />\n {compare.columns.map((c, i) => (\n <th key={i} scope=\"col\">\n {c}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {compare.rows.map((r, i) => (\n <tr key={i}>\n <th scope=\"row\">{r.feature}</th>\n {r.cells.map((cell, j) => (\n <td key={j}>{cell}</td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n </Section>\n )}\n {credits && (\n <Section id=\"credits\" title={credits.title} headingSize=\"sm\" spacing=\"sm\" divider>\n {credits.children}\n </Section>\n )}\n {faq && (\n <Section id=\"faq\" title={faq.title} headingSize=\"sm\" spacing=\"sm\" divider>\n <div className=\"kz-tpl-faq\">\n {faq.items.map((q, i) => (\n <details key={i}>\n <summary>{q.question}</summary>\n <div>{q.answer}</div>\n </details>\n ))}\n </div>\n </Section>\n )}\n </div>\n );\n}\n","// 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\"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AAQ,MAAK,SAAO,MAC9E,kBAAQ,UACX;AAAA,IAED,OACC,gBAAAA,KAAC,WAAQ,IAAG,OAAM,OAAO,IAAI,OAAO,aAAY,MAAK,SAAQ,MAAK,SAAO,MACvE,0BAAAA,KAAC,SAAI,WAAU,cACZ,cAAI,MAAM,IAAI,CAAC,GAAG,MACjB,gBAAAC,MAAC,aACC;AAAA,sBAAAD,KAAC,aAAS,YAAE,UAAS;AAAA,MACrB,gBAAAA,KAAC,SAAK,YAAE,QAAO;AAAA,SAFH,CAGd,CACD,GACH,GACF;AAAA,KAEJ;AAEJ;","names":["jsx","jsxs"]}
1
+ {"version":3,"sources":["../src/pricing-page/pricing-page.tsx","../src/glyphs.tsx"],"sourcesContent":["// Server-safe. Plans and what they cost (blocks.css `.kz-tpl-plans`, `.kz-tpl-compare`, `.kz-tpl-faq`): the hero, the\n// plans side by side — the featured one lifted, lit by the brand — the comparison as a table that scrolls on a phone,\n// what a credit buys, and the questions people ask, folded.\nimport { Section } from \"@krizaka/ui/page\";\nimport { PageHero } from \"@krizaka/ui/page-hero\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { CheckGlyph } from \"../glyphs\";\n\nexport interface PricingPlan {\n /** A stable key. */\n id: string;\n /** Its name. */\n name: React.ReactNode;\n /** Its price (`€29`, `Free`, `Custom`). */\n price: React.ReactNode;\n /** Under the price: the unit (`per month · 12,000 credits`). */\n unit?: React.ReactNode;\n /** What it includes, a few lines. */\n features: readonly React.ReactNode[];\n /** Its action (a cut Button or link; the featured one primary). */\n action: React.ReactNode;\n /** The plan most people choose: lifted and lit. */\n featured?: boolean;\n /** Its badge (`Most chosen`). */\n badge?: React.ReactNode;\n}\n\nexport type PricingPageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The brand the page wears (`.brand-<id>`). */\n brand?: string;\n /** A mono line above the title. */\n eyebrow?: React.ReactNode;\n /** The page's `h1`. */\n title: React.ReactNode;\n /** One sentence under it. */\n lead?: React.ReactNode;\n /** Above the plans: a period switch (monthly · yearly), a currency. */\n toolbar?: React.ReactNode;\n /** The plans' accessible name (`Plans`). */\n plansLabel: string;\n /** The plans. */\n plans: readonly PricingPlan[];\n /** The comparison: its caption, columns (the plans' names) and rows (a feature and a cell per plan). */\n compare?: { caption: React.ReactNode; columns: readonly React.ReactNode[]; rows: readonly { feature: React.ReactNode; cells: readonly React.ReactNode[] }[] };\n /** What a credit buys, the credits left: a Meter, a sentence. */\n credits?: { title: React.ReactNode; children: React.ReactNode };\n /** The questions, folded. */\n faq?: { title: React.ReactNode; items: readonly { question: React.ReactNode; answer: React.ReactNode }[] };\n};\n\n/** A pricing page: plans (the featured one lifted), the comparison, credits, the questions. */\nexport function PricingPage({ brand, eyebrow, title, lead, toolbar, plansLabel, plans, compare, credits, faq, className, ...props }: PricingPageProps) {\n return (\n <div className={cn(brand && \"brand-\" + brand, className)} {...props}>\n <PageHero eyebrow={eyebrow} title={title} lead={lead} align=\"center\" backdrop=\"plain\">\n {toolbar}\n </PageHero>\n <Section aria-label={plansLabel} spacing=\"sm\">\n <ul className=\"kz-tpl-plans\">\n {plans.map((p) => (\n <li key={p.id}>\n <div className=\"kz-tpl-plan\" data-featured={p.featured ? \"\" : undefined}>\n <div className=\"kz-tpl-collection-head\">\n <h2>{p.name}</h2>\n {p.badge && <span className=\"kz-fact\" data-tone=\"ok\">{p.badge}</span>}\n </div>\n <p className=\"kz-tpl-price\">\n {p.price}\n {p.unit && <small>{p.unit}</small>}\n </p>\n <ul>\n {p.features.map((f, i) => (\n <li key={i}>\n <CheckGlyph className=\"h-4 w-4\" />\n <span>{f}</span>\n </li>\n ))}\n </ul>\n <div>{p.action}</div>\n </div>\n </li>\n ))}\n </ul>\n </Section>\n {compare && (\n <Section aria-label={typeof compare.caption === \"string\" ? compare.caption : undefined} spacing=\"sm\" divider>\n <div className=\"kz-tpl-scroll\" tabIndex={0}>\n <table className=\"kz-tpl-compare\">\n <caption className=\"kz-label kz-tpl-caption\">{compare.caption}</caption>\n <thead>\n <tr>\n <td />\n {compare.columns.map((c, i) => (\n <th key={i} scope=\"col\">\n {c}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {compare.rows.map((r, i) => (\n <tr key={i}>\n <th scope=\"row\">{r.feature}</th>\n {r.cells.map((cell, j) => (\n <td key={j}>{cell}</td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n </Section>\n )}\n {credits && (\n <Section id=\"credits\" title={credits.title} headingSize=\"sm\" spacing=\"sm\" divider>\n {credits.children}\n </Section>\n )}\n {faq && (\n <Section id=\"faq\" title={faq.title} headingSize=\"sm\" spacing=\"sm\" divider>\n <div className=\"kz-tpl-faq\">\n {faq.items.map((q, i) => (\n <details key={i}>\n <summary>{q.question}</summary>\n <div>{q.answer}</div>\n </details>\n ))}\n </div>\n </Section>\n )}\n </div>\n );\n}\n","// 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":";;;;;AAGA,SAAS,eAAe;AACxB,SAAS,gBAAgB;;;ACKrB,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,gB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'react';
2
+
3
+ type QrLevel = "L" | "M" | "Q" | "H";
4
+ /** The square of modules, row by row: `true` is dark. */
5
+ type QrMatrix = readonly (readonly boolean[])[];
6
+ /** Thrown when the text does not fit the biggest code (version 40) at the asked level. */
7
+ declare class QrTooLongError extends Error {
8
+ constructor(length: number, level: QrLevel);
9
+ }
10
+ /** Encodes a text as a QR code: the smallest version that holds it at `level`, the best of the eight masks. */
11
+ declare function encodeQr(text: string, level?: QrLevel): QrMatrix;
12
+ /**
13
+ * The drawing of a matrix as one SVG path: a rectangle per horizontal run of dark modules, in module units, offset by
14
+ * the quiet zone. Shared by the web `<svg>` and the native `<Path>`.
15
+ */
16
+ declare function qrPath(matrix: QrMatrix, quiet: number): string;
17
+
18
+ type QrCodeProps = {
19
+ /** The text to encode — an address, a feed URL. Encoded here, in the browser (or on the server); never sent anywhere. */
20
+ value: string;
21
+ /** What the code is, for a screen reader (“Calendar feed — scan with your phone”), passed translated. The image is named by it. */
22
+ label: string;
23
+ /** The side of the tile, in px, quiet zone included. Default 176. */
24
+ size?: number;
25
+ /** The quiet zone, in modules, around the code (the standard asks for 4). Default 4, never less than 2. */
26
+ quietZone?: number;
27
+ /** The error-correction level: L · M (default) · Q · H (a logo or wear on the print). */
28
+ level?: QrLevel;
29
+ /** The words of the copy action, passed translated. Without them there is no « copy » button. */
30
+ copyLabel?: string;
31
+ /** Said once the text is on the clipboard. Default: the copy label. */
32
+ copiedLabel?: string;
33
+ /** Called after the text is copied. */
34
+ onCopy?: () => void;
35
+ /** Classes merged last, on the wrapper. */
36
+ className?: string;
37
+ };
38
+ /** A QR code from a text: dark modules on a light tile in both themes, a quiet zone, an accessible name, an optional copy action. */
39
+ declare function QrCode({ value, label, size, quietZone, level, copyLabel, copiedLabel, onCopy, className }: QrCodeProps): React.JSX.Element;
40
+
41
+ export { QrCode, QrTooLongError, encodeQr, qrPath };
42
+ export type { QrCodeProps, QrLevel, QrMatrix };
@@ -0,0 +1,350 @@
1
+ import {
2
+ CheckGlyph,
3
+ CopyGlyph
4
+ } from "./chunk-C57KK5VB.js";
5
+ import {
6
+ Button
7
+ } from "./chunk-EB45EVPJ.js";
8
+ import "./chunk-43PTCDTL.js";
9
+ import "./chunk-2VNYHG4E.js";
10
+ import {
11
+ cn
12
+ } from "./chunk-W675RFOA.js";
13
+
14
+ // src/qr-code/encode.ts
15
+ var LEVEL_INDEX = { L: 0, M: 1, Q: 2, H: 3 };
16
+ var LEVEL_BITS = { L: 1, M: 0, Q: 3, H: 2 };
17
+ var ECC_PER_BLOCK = [
18
+ [-1, 7, 10, 15, 20, 26, 18, 20, 24, 30, 18, 20, 24, 26, 30, 22, 24, 28, 30, 28, 28, 28, 28, 30, 30, 26, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30],
19
+ [-1, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28],
20
+ [-1, 13, 22, 18, 26, 18, 24, 18, 22, 20, 24, 28, 26, 24, 20, 30, 24, 28, 28, 26, 30, 28, 30, 30, 30, 30, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30],
21
+ [-1, 17, 28, 22, 16, 22, 28, 26, 26, 24, 28, 24, 28, 22, 24, 24, 30, 28, 28, 26, 28, 30, 24, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30]
22
+ ];
23
+ var BLOCKS = [
24
+ [-1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12, 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 24, 25],
25
+ [-1, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21, 23, 25, 26, 28, 29, 31, 33, 35, 37, 38, 40, 43, 45, 47, 49],
26
+ [-1, 1, 1, 2, 2, 4, 4, 6, 6, 8, 8, 8, 10, 12, 16, 12, 17, 16, 18, 21, 20, 23, 23, 25, 27, 29, 34, 34, 35, 38, 40, 43, 45, 48, 51, 53, 56, 59, 62, 65, 68],
27
+ [-1, 1, 1, 2, 4, 4, 4, 5, 6, 8, 8, 11, 11, 16, 16, 18, 16, 19, 21, 25, 25, 25, 34, 30, 32, 35, 37, 40, 42, 45, 48, 51, 54, 57, 60, 63, 66, 70, 74, 77, 81]
28
+ ];
29
+ function rawModules(version) {
30
+ let result = (16 * version + 128) * version + 64;
31
+ if (version >= 2) {
32
+ const align = Math.floor(version / 7) + 2;
33
+ result -= (25 * align - 10) * align - 55;
34
+ if (version >= 7) result -= 36;
35
+ }
36
+ return result;
37
+ }
38
+ function dataCodewords(version, level) {
39
+ const l = LEVEL_INDEX[level];
40
+ return Math.floor(rawModules(version) / 8) - ECC_PER_BLOCK[l][version] * BLOCKS[l][version];
41
+ }
42
+ function utf8(text) {
43
+ return [...new TextEncoder().encode(text)];
44
+ }
45
+ function gfMultiply(x, y) {
46
+ let z = 0;
47
+ for (let i = 7; i >= 0; i--) {
48
+ z = z << 1 ^ (z >>> 7) * 285;
49
+ z ^= (y >>> i & 1) * x;
50
+ }
51
+ return z;
52
+ }
53
+ function divisor(degree) {
54
+ const result = new Array(degree).fill(0);
55
+ result[degree - 1] = 1;
56
+ let root = 1;
57
+ for (let i = 0; i < degree; i++) {
58
+ for (let j = 0; j < degree; j++) {
59
+ result[j] = gfMultiply(result[j], root);
60
+ if (j + 1 < degree) result[j] = result[j] ^ result[j + 1];
61
+ }
62
+ root = gfMultiply(root, 2);
63
+ }
64
+ return result;
65
+ }
66
+ function remainder(data, div) {
67
+ const result = div.map(() => 0);
68
+ for (const b of data) {
69
+ const factor = b ^ result.shift();
70
+ result.push(0);
71
+ div.forEach((coef, i) => {
72
+ result[i] = result[i] ^ gfMultiply(coef, factor);
73
+ });
74
+ }
75
+ return result;
76
+ }
77
+ function pushBits(bits, value, count) {
78
+ for (let i = count - 1; i >= 0; i--) bits.push(value >>> i & 1);
79
+ }
80
+ function codewords(bytes, version, level) {
81
+ const bits = [];
82
+ pushBits(bits, 4, 4);
83
+ pushBits(bits, bytes.length, version <= 9 ? 8 : 16);
84
+ for (const b of bytes) pushBits(bits, b, 8);
85
+ const capacity = dataCodewords(version, level) * 8;
86
+ pushBits(bits, 0, Math.min(4, capacity - bits.length));
87
+ pushBits(bits, 0, (8 - bits.length % 8) % 8);
88
+ let pad = 236;
89
+ while (bits.length < capacity) {
90
+ pushBits(bits, pad, 8);
91
+ pad ^= 236 ^ 17;
92
+ }
93
+ const data = [];
94
+ for (let i = 0; i < bits.length; i += 8) data.push(parseInt(bits.slice(i, i + 8).join(""), 2));
95
+ const l = LEVEL_INDEX[level];
96
+ const blocks = BLOCKS[l][version];
97
+ const eccLen = ECC_PER_BLOCK[l][version];
98
+ const shortBlocks = blocks - Math.floor(rawModules(version) / 8) % blocks;
99
+ const shortLen = Math.floor(rawModules(version) / 8 / blocks) - eccLen;
100
+ const div = divisor(eccLen);
101
+ const parts = [];
102
+ for (let i = 0, k = 0; i < blocks; i++) {
103
+ const chunk = data.slice(k, k + shortLen + (i < shortBlocks ? 0 : 1));
104
+ k += chunk.length;
105
+ parts.push({ data: chunk, ecc: remainder(chunk, div) });
106
+ }
107
+ const out = [];
108
+ for (let i = 0; i <= shortLen; i++) parts.forEach((p) => i < p.data.length && out.push(p.data[i]));
109
+ for (let i = 0; i < eccLen; i++) parts.forEach((p) => out.push(p.ecc[i]));
110
+ return out;
111
+ }
112
+ function alignmentPositions(version) {
113
+ if (version === 1) return [];
114
+ const count = Math.floor(version / 7) + 2;
115
+ const step = version === 32 ? 26 : Math.ceil((version * 4 + 4) / (count * 2 - 2)) * 2;
116
+ const result = [6];
117
+ let pos = version * 4 + 10;
118
+ while (result.length < count) {
119
+ result.splice(1, 0, pos);
120
+ pos -= step;
121
+ }
122
+ return result;
123
+ }
124
+ function drawFunctionPatterns(version, level) {
125
+ const size = version * 4 + 17;
126
+ const dark = Array.from({ length: size }, () => new Array(size).fill(false));
127
+ const fn = Array.from({ length: size }, () => new Array(size).fill(false));
128
+ const set = (x, y, on) => {
129
+ dark[y][x] = on;
130
+ fn[y][x] = true;
131
+ };
132
+ for (let i = 0; i < size; i++) {
133
+ set(6, i, i % 2 === 0);
134
+ set(i, 6, i % 2 === 0);
135
+ }
136
+ const finder = (cx, cy) => {
137
+ for (let dy = -4; dy <= 4; dy++)
138
+ for (let dx = -4; dx <= 4; dx++) {
139
+ const x = cx + dx;
140
+ const y = cy + dy;
141
+ if (x < 0 || x >= size || y < 0 || y >= size) continue;
142
+ const dist = Math.max(Math.abs(dx), Math.abs(dy));
143
+ set(x, y, dist !== 2 && dist !== 4);
144
+ }
145
+ };
146
+ finder(3, 3);
147
+ finder(size - 4, 3);
148
+ finder(3, size - 4);
149
+ const align = alignmentPositions(version);
150
+ align.forEach(
151
+ (cx, i) => align.forEach((cy, j) => {
152
+ if (i === 0 && j === 0 || i === 0 && j === align.length - 1 || i === align.length - 1 && j === 0) return;
153
+ for (let dy = -2; dy <= 2; dy++) for (let dx = -2; dx <= 2; dx++) set(cx + dx, cy + dy, Math.max(Math.abs(dx), Math.abs(dy)) !== 1);
154
+ })
155
+ );
156
+ drawFormat(dark, fn, size, level, 0);
157
+ if (version >= 7) {
158
+ let rem = version;
159
+ for (let i = 0; i < 12; i++) rem = rem << 1 ^ (rem >>> 11) * 7973;
160
+ const bits = version << 12 | rem;
161
+ for (let i = 0; i < 18; i++) {
162
+ const on = (bits >>> i & 1) !== 0;
163
+ const a = size - 11 + i % 3;
164
+ const b = Math.floor(i / 3);
165
+ set(a, b, on);
166
+ set(b, a, on);
167
+ }
168
+ }
169
+ return { size, dark, fn };
170
+ }
171
+ function drawFormat(dark, fn, size, level, mask) {
172
+ const data = LEVEL_BITS[level] << 3 | mask;
173
+ let rem = data;
174
+ for (let i = 0; i < 10; i++) rem = rem << 1 ^ (rem >>> 9) * 1335;
175
+ const bits = (data << 10 | rem) ^ 21522;
176
+ const bit = (i) => (bits >>> i & 1) !== 0;
177
+ const set = (x, y, on) => {
178
+ dark[y][x] = on;
179
+ fn[y][x] = true;
180
+ };
181
+ for (let i = 0; i <= 5; i++) set(8, i, bit(i));
182
+ set(8, 7, bit(6));
183
+ set(8, 8, bit(7));
184
+ set(7, 8, bit(8));
185
+ for (let i = 9; i < 15; i++) set(14 - i, 8, bit(i));
186
+ for (let i = 0; i < 8; i++) set(size - 1 - i, 8, bit(i));
187
+ for (let i = 8; i < 15; i++) set(8, size - 15 + i, bit(i));
188
+ set(8, size - 8, true);
189
+ }
190
+ function* dataPositions(size) {
191
+ for (let right = size - 1; right >= 1; right -= 2) {
192
+ if (right === 6) right = 5;
193
+ for (let vert = 0; vert < size; vert++) {
194
+ const y = (right + 1 & 2) === 0 ? size - 1 - vert : vert;
195
+ yield [right, y];
196
+ yield [right - 1, y];
197
+ }
198
+ }
199
+ }
200
+ function placeData(grid, data) {
201
+ const { size, dark, fn } = grid;
202
+ let i = 0;
203
+ for (const [x, y] of dataPositions(size)) {
204
+ if (fn[y][x] || i >= data.length * 8) continue;
205
+ dark[y][x] = (data[i >>> 3] >>> 7 - (i & 7) & 1) !== 0;
206
+ i++;
207
+ }
208
+ }
209
+ var MASKS = [
210
+ (x, y) => (x + y) % 2 === 0,
211
+ (_x, y) => y % 2 === 0,
212
+ (x) => x % 3 === 0,
213
+ (x, y) => (x + y) % 3 === 0,
214
+ (x, y) => (Math.floor(x / 3) + Math.floor(y / 2)) % 2 === 0,
215
+ (x, y) => x * y % 2 + x * y % 3 === 0,
216
+ (x, y) => (x * y % 2 + x * y % 3) % 2 === 0,
217
+ (x, y) => ((x + y) % 2 + x * y % 3) % 2 === 0
218
+ ];
219
+ function runPenalty(line) {
220
+ let score = 0;
221
+ let run = 1;
222
+ for (let i = 1; i < line.length; i++) {
223
+ run = line[i] === line[i - 1] ? run + 1 : 1;
224
+ if (run === 5) score += 3;
225
+ else if (run > 5) score++;
226
+ }
227
+ return score;
228
+ }
229
+ function finderPenalty(line) {
230
+ const text = line.map((on) => on ? "1" : "0").join("");
231
+ let score = 0;
232
+ for (const pattern of ["00001011101", "10111010000"]) {
233
+ for (let at = text.indexOf(pattern); at >= 0; at = text.indexOf(pattern, at + 1)) score += 40;
234
+ }
235
+ return score;
236
+ }
237
+ function blockPenalty(dark) {
238
+ let score = 0;
239
+ for (let y = 0; y < dark.length - 1; y++)
240
+ for (let x = 0; x < dark.length - 1; x++) {
241
+ const c = dark[y][x];
242
+ if (c === dark[y][x + 1] && c === dark[y + 1][x] && c === dark[y + 1][x + 1]) score += 3;
243
+ }
244
+ return score;
245
+ }
246
+ function balancePenalty(dark) {
247
+ const size = dark.length;
248
+ const total = dark.reduce((n, row) => n + row.filter(Boolean).length, 0);
249
+ return (Math.ceil(Math.abs(total * 20 - size * size * 10) / (size * size)) - 1) * 10;
250
+ }
251
+ function penalty(dark) {
252
+ const columns = dark.map((_, x) => dark.map((row) => row[x]));
253
+ const lines = [...dark, ...columns];
254
+ return lines.reduce((n, line) => n + runPenalty(line) + finderPenalty(line), 0) + blockPenalty(dark) + balancePenalty(dark);
255
+ }
256
+ var QrTooLongError = class extends Error {
257
+ constructor(length, level) {
258
+ super(`The text (${length} bytes) is too long for a QR code at level ${level}.`);
259
+ this.name = "QrTooLongError";
260
+ }
261
+ };
262
+ function smallestVersion(bytes, level) {
263
+ for (let version = 1; version <= 40; version++) {
264
+ if (4 + (version <= 9 ? 8 : 16) + bytes.length * 8 <= dataCodewords(version, level) * 8) return version;
265
+ }
266
+ throw new QrTooLongError(bytes.length, level);
267
+ }
268
+ function masked(base, mask, level) {
269
+ const dark = base.dark.map((row) => [...row]);
270
+ const fn = base.fn.map((row) => [...row]);
271
+ for (let y = 0; y < base.size; y++) for (let x = 0; x < base.size; x++) if (!fn[y][x] && MASKS[mask](x, y)) dark[y][x] = !dark[y][x];
272
+ drawFormat(dark, fn, base.size, level, mask);
273
+ return dark;
274
+ }
275
+ function encodeQr(text, level = "M") {
276
+ const bytes = utf8(text);
277
+ const version = smallestVersion(bytes, level);
278
+ const base = drawFunctionPatterns(version, level);
279
+ placeData(base, codewords(bytes, version, level));
280
+ const candidates = MASKS.map((_, mask) => masked(base, mask, level));
281
+ const scores = candidates.map(penalty);
282
+ return candidates[scores.indexOf(Math.min(...scores))];
283
+ }
284
+ function qrPath(matrix, quiet) {
285
+ const parts = [];
286
+ matrix.forEach((row, y) => {
287
+ for (let x = 0; x < row.length; x++) {
288
+ if (!row[x]) continue;
289
+ let end = x;
290
+ while (end + 1 < row.length && row[end + 1]) end++;
291
+ parts.push(`M${x + quiet} ${y + quiet}h${end - x + 1}v1h${x - end - 1}z`);
292
+ x = end;
293
+ }
294
+ });
295
+ return parts.join("");
296
+ }
297
+
298
+ // src/qr-code/qr-code.tsx
299
+ import * as React from "react";
300
+ import { jsx, jsxs } from "react/jsx-runtime";
301
+ var QR_TILE = "#ffffff";
302
+ var QR_MODULE = "#0b0f19";
303
+ function QrCode({ value, label, size = 176, quietZone = 4, level = "M", copyLabel, copiedLabel, onCopy, className }) {
304
+ const quiet = Math.max(2, Math.round(quietZone));
305
+ const { matrix, path } = React.useMemo(() => {
306
+ const m = encodeQr(value, level);
307
+ return { matrix: m, path: qrPath(m, quiet) };
308
+ }, [value, level, quiet]);
309
+ const modules = matrix.length + quiet * 2;
310
+ const [copied, setCopied] = React.useState(false);
311
+ React.useEffect(() => {
312
+ if (!copied) return;
313
+ const t = setTimeout(() => setCopied(false), 1800);
314
+ return () => clearTimeout(t);
315
+ }, [copied]);
316
+ const copy = () => navigator.clipboard?.writeText(value).then(() => {
317
+ setCopied(true);
318
+ onCopy?.();
319
+ });
320
+ return /* @__PURE__ */ jsxs("div", { className: cn("inline-flex flex-col items-start gap-3", className), "data-qr-code": true, children: [
321
+ /* @__PURE__ */ jsxs(
322
+ "svg",
323
+ {
324
+ role: "img",
325
+ "aria-label": label,
326
+ viewBox: `0 0 ${modules} ${modules}`,
327
+ width: size,
328
+ height: size,
329
+ shapeRendering: "crispEdges",
330
+ className: "block max-w-full rounded-lg border border-border-default",
331
+ style: { height: "auto", aspectRatio: "1 / 1" },
332
+ children: [
333
+ /* @__PURE__ */ jsx("rect", { width: modules, height: modules, fill: QR_TILE }),
334
+ /* @__PURE__ */ jsx("path", { d: path, fill: QR_MODULE })
335
+ ]
336
+ }
337
+ ),
338
+ copyLabel ? /* @__PURE__ */ jsxs(Button, { type: "button", variant: "secondary", size: "sm", onClick: copy, announce: copied ? copiedLabel ?? copyLabel : void 0, children: [
339
+ copied ? /* @__PURE__ */ jsx(CheckGlyph, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx(CopyGlyph, { className: "h-3.5 w-3.5" }),
340
+ copied ? copiedLabel ?? copyLabel : copyLabel
341
+ ] }) : null
342
+ ] });
343
+ }
344
+ export {
345
+ QrCode,
346
+ QrTooLongError,
347
+ encodeQr,
348
+ qrPath
349
+ };
350
+ //# sourceMappingURL=qr-code.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/qr-code/encode.ts","../src/qr-code/qr-code.tsx"],"sourcesContent":["// The QR encoder: a string in, a square of dark/light modules out. Pure, offline, no dependency, shared by the web\n// and the native drawing. Byte mode (UTF-8), versions 1-40, the four error-correction levels, the eight masks chosen\n// by the standard's penalty rules (ISO/IEC 18004). `qr-code.test.tsx` decodes what it draws, version by version.\n\nexport type QrLevel = \"L\" | \"M\" | \"Q\" | \"H\";\n\n/** The square of modules, row by row: `true` is dark. */\nexport type QrMatrix = readonly (readonly boolean[])[];\n\nconst LEVEL_INDEX: Record<QrLevel, number> = { L: 0, M: 1, Q: 2, H: 3 };\nconst LEVEL_BITS: Record<QrLevel, number> = { L: 1, M: 0, Q: 3, H: 2 };\n\n// Error-correction codewords per block, and number of blocks, by level (L, M, Q, H) then version (index 0 is unused).\nconst ECC_PER_BLOCK = [\n [-1, 7, 10, 15, 20, 26, 18, 20, 24, 30, 18, 20, 24, 26, 30, 22, 24, 28, 30, 28, 28, 28, 28, 30, 30, 26, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30],\n [-1, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28],\n [-1, 13, 22, 18, 26, 18, 24, 18, 22, 20, 24, 28, 26, 24, 20, 30, 24, 28, 28, 26, 30, 28, 30, 30, 30, 30, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30],\n [-1, 17, 28, 22, 16, 22, 28, 26, 26, 24, 28, 24, 28, 22, 24, 24, 30, 28, 28, 26, 28, 30, 24, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30],\n] as const;\nconst BLOCKS = [\n [-1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12, 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 24, 25],\n [-1, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21, 23, 25, 26, 28, 29, 31, 33, 35, 37, 38, 40, 43, 45, 47, 49],\n [-1, 1, 1, 2, 2, 4, 4, 6, 6, 8, 8, 8, 10, 12, 16, 12, 17, 16, 18, 21, 20, 23, 23, 25, 27, 29, 34, 34, 35, 38, 40, 43, 45, 48, 51, 53, 56, 59, 62, 65, 68],\n [-1, 1, 1, 2, 4, 4, 4, 5, 6, 8, 8, 11, 11, 16, 16, 18, 16, 19, 21, 25, 25, 25, 34, 30, 32, 35, 37, 40, 42, 45, 48, 51, 54, 57, 60, 63, 66, 70, 74, 77, 81],\n] as const;\n\n/** Data modules of a version (everything but the finder, timing, alignment, format and version patterns). */\nfunction rawModules(version: number): number {\n let result = (16 * version + 128) * version + 64;\n if (version >= 2) {\n const align = Math.floor(version / 7) + 2;\n result -= (25 * align - 10) * align - 55;\n if (version >= 7) result -= 36;\n }\n return result;\n}\n\nfunction dataCodewords(version: number, level: QrLevel): number {\n const l = LEVEL_INDEX[level];\n return Math.floor(rawModules(version) / 8) - ECC_PER_BLOCK[l]![version]! * BLOCKS[l]![version]!;\n}\n\nexport function utf8(text: string): number[] {\n return [...new TextEncoder().encode(text)];\n}\n\n// Reed-Solomon over GF(256), polynomial 0x11D.\nfunction gfMultiply(x: number, y: number): number {\n let z = 0;\n for (let i = 7; i >= 0; i--) {\n z = (z << 1) ^ ((z >>> 7) * 0x11d);\n z ^= ((y >>> i) & 1) * x;\n }\n return z;\n}\n\nfunction divisor(degree: number): number[] {\n const result = new Array<number>(degree).fill(0);\n result[degree - 1] = 1;\n let root = 1;\n for (let i = 0; i < degree; i++) {\n for (let j = 0; j < degree; j++) {\n result[j] = gfMultiply(result[j]!, root);\n if (j + 1 < degree) result[j] = result[j]! ^ result[j + 1]!;\n }\n root = gfMultiply(root, 0x02);\n }\n return result;\n}\n\nfunction remainder(data: readonly number[], div: readonly number[]): number[] {\n const result = div.map(() => 0);\n for (const b of data) {\n const factor = b ^ result.shift()!;\n result.push(0);\n div.forEach((coef, i) => {\n result[i] = result[i]! ^ gfMultiply(coef, factor);\n });\n }\n return result;\n}\n\nfunction pushBits(bits: number[], value: number, count: number) {\n for (let i = count - 1; i >= 0; i--) bits.push((value >>> i) & 1);\n}\n\n/** The codewords of the message: mode, length, bytes, terminator, padding, then blocks interleaved with their ECC. */\nfunction codewords(bytes: readonly number[], version: number, level: QrLevel): number[] {\n const bits: number[] = [];\n pushBits(bits, 0b0100, 4);\n pushBits(bits, bytes.length, version <= 9 ? 8 : 16);\n for (const b of bytes) pushBits(bits, b, 8);\n const capacity = dataCodewords(version, level) * 8;\n pushBits(bits, 0, Math.min(4, capacity - bits.length));\n pushBits(bits, 0, (8 - (bits.length % 8)) % 8);\n let pad = 0xec;\n while (bits.length < capacity) {\n pushBits(bits, pad, 8);\n pad ^= 0xec ^ 0x11;\n }\n const data: number[] = [];\n for (let i = 0; i < bits.length; i += 8) data.push(parseInt(bits.slice(i, i + 8).join(\"\"), 2));\n\n const l = LEVEL_INDEX[level];\n const blocks = BLOCKS[l]![version]!;\n const eccLen = ECC_PER_BLOCK[l]![version]!;\n const shortBlocks = blocks - (Math.floor(rawModules(version) / 8) % blocks);\n const shortLen = Math.floor(rawModules(version) / 8 / blocks) - eccLen;\n const div = divisor(eccLen);\n const parts: { data: number[]; ecc: number[] }[] = [];\n for (let i = 0, k = 0; i < blocks; i++) {\n const chunk = data.slice(k, k + shortLen + (i < shortBlocks ? 0 : 1));\n k += chunk.length;\n parts.push({ data: chunk, ecc: remainder(chunk, div) });\n }\n const out: number[] = [];\n for (let i = 0; i <= shortLen; i++) parts.forEach((p) => i < p.data.length && out.push(p.data[i]!));\n for (let i = 0; i < eccLen; i++) parts.forEach((p) => out.push(p.ecc[i]!));\n return out;\n}\n\nfunction alignmentPositions(version: number): number[] {\n if (version === 1) return [];\n const count = Math.floor(version / 7) + 2;\n const step = version === 32 ? 26 : Math.ceil((version * 4 + 4) / (count * 2 - 2)) * 2;\n const result = [6];\n let pos = version * 4 + 10;\n while (result.length < count) {\n result.splice(1, 0, pos);\n pos -= step;\n }\n return result;\n}\n\ntype Grid = { size: number; dark: boolean[][]; fn: boolean[][] };\n\nfunction drawFunctionPatterns(version: number, level: QrLevel): Grid {\n const size = version * 4 + 17;\n const dark = Array.from({ length: size }, () => new Array<boolean>(size).fill(false));\n const fn = Array.from({ length: size }, () => new Array<boolean>(size).fill(false));\n const set = (x: number, y: number, on: boolean) => {\n dark[y]![x] = on;\n fn[y]![x] = true;\n };\n for (let i = 0; i < size; i++) {\n set(6, i, i % 2 === 0);\n set(i, 6, i % 2 === 0);\n }\n const finder = (cx: number, cy: number) => {\n for (let dy = -4; dy <= 4; dy++)\n for (let dx = -4; dx <= 4; dx++) {\n const x = cx + dx;\n const y = cy + dy;\n if (x < 0 || x >= size || y < 0 || y >= size) continue;\n const dist = Math.max(Math.abs(dx), Math.abs(dy));\n set(x, y, dist !== 2 && dist !== 4);\n }\n };\n finder(3, 3);\n finder(size - 4, 3);\n finder(3, size - 4);\n const align = alignmentPositions(version);\n align.forEach((cx, i) =>\n align.forEach((cy, j) => {\n if ((i === 0 && j === 0) || (i === 0 && j === align.length - 1) || (i === align.length - 1 && j === 0)) return;\n for (let dy = -2; dy <= 2; dy++) for (let dx = -2; dx <= 2; dx++) set(cx + dx, cy + dy, Math.max(Math.abs(dx), Math.abs(dy)) !== 1);\n }),\n );\n drawFormat(dark, fn, size, level, 0);\n if (version >= 7) {\n let rem = version;\n for (let i = 0; i < 12; i++) rem = (rem << 1) ^ ((rem >>> 11) * 0x1f25);\n const bits = (version << 12) | rem;\n for (let i = 0; i < 18; i++) {\n const on = ((bits >>> i) & 1) !== 0;\n const a = size - 11 + (i % 3);\n const b = Math.floor(i / 3);\n set(a, b, on);\n set(b, a, on);\n }\n }\n return { size, dark, fn };\n}\n\nfunction drawFormat(dark: boolean[][], fn: boolean[][], size: number, level: QrLevel, mask: number) {\n const data = (LEVEL_BITS[level] << 3) | mask;\n let rem = data;\n for (let i = 0; i < 10; i++) rem = (rem << 1) ^ ((rem >>> 9) * 0x537);\n const bits = ((data << 10) | rem) ^ 0x5412;\n const bit = (i: number) => ((bits >>> i) & 1) !== 0;\n const set = (x: number, y: number, on: boolean) => {\n dark[y]![x] = on;\n fn[y]![x] = true;\n };\n for (let i = 0; i <= 5; i++) set(8, i, bit(i));\n set(8, 7, bit(6));\n set(8, 8, bit(7));\n set(7, 8, bit(8));\n for (let i = 9; i < 15; i++) set(14 - i, 8, bit(i));\n for (let i = 0; i < 8; i++) set(size - 1 - i, 8, bit(i));\n for (let i = 8; i < 15; i++) set(8, size - 15 + i, bit(i));\n set(8, size - 8, true);\n}\n\n/** The data modules in the standard's order: two-column strips from the right, up then down, skipping the timing column. */\nfunction* dataPositions(size: number): Generator<[number, number]> {\n for (let right = size - 1; right >= 1; right -= 2) {\n if (right === 6) right = 5;\n for (let vert = 0; vert < size; vert++) {\n const y = ((right + 1) & 2) === 0 ? size - 1 - vert : vert;\n yield [right, y];\n yield [right - 1, y];\n }\n }\n}\n\nfunction placeData(grid: Grid, data: readonly number[]) {\n const { size, dark, fn } = grid;\n let i = 0;\n for (const [x, y] of dataPositions(size)) {\n if (fn[y]![x] || i >= data.length * 8) continue;\n dark[y]![x] = ((data[i >>> 3]! >>> (7 - (i & 7))) & 1) !== 0;\n i++;\n }\n}\n\nconst MASKS: ((x: number, y: number) => boolean)[] = [\n (x, y) => (x + y) % 2 === 0,\n (_x, y) => y % 2 === 0,\n (x) => x % 3 === 0,\n (x, y) => (x + y) % 3 === 0,\n (x, y) => (Math.floor(x / 3) + Math.floor(y / 2)) % 2 === 0,\n (x, y) => ((x * y) % 2) + ((x * y) % 3) === 0,\n (x, y) => (((x * y) % 2) + ((x * y) % 3)) % 2 === 0,\n (x, y) => (((x + y) % 2) + ((x * y) % 3)) % 2 === 0,\n];\n\ntype Dark = readonly (readonly boolean[])[];\n\n/** Rule 1: runs of five or more of one colour in a line (3, then 1 per module beyond). */\nfunction runPenalty(line: readonly boolean[]): number {\n let score = 0;\n let run = 1;\n for (let i = 1; i < line.length; i++) {\n run = line[i] === line[i - 1] ? run + 1 : 1;\n if (run === 5) score += 3;\n else if (run > 5) score++;\n }\n return score;\n}\n\n/** Rule 3: the finder-like pattern 1011101 with four light modules on one side, 40 each. */\nfunction finderPenalty(line: readonly boolean[]): number {\n const text = line.map((on) => (on ? \"1\" : \"0\")).join(\"\");\n let score = 0;\n for (const pattern of [\"00001011101\", \"10111010000\"]) {\n for (let at = text.indexOf(pattern); at >= 0; at = text.indexOf(pattern, at + 1)) score += 40;\n }\n return score;\n}\n\n/** Rule 2: 2x2 blocks of one colour, 3 each. */\nfunction blockPenalty(dark: Dark): number {\n let score = 0;\n for (let y = 0; y < dark.length - 1; y++)\n for (let x = 0; x < dark.length - 1; x++) {\n const c = dark[y]![x]!;\n if (c === dark[y]![x + 1] && c === dark[y + 1]![x] && c === dark[y + 1]![x + 1]) score += 3;\n }\n return score;\n}\n\n/** Rule 4: the share of dark modules away from 50 %, 10 per started 5 %. */\nfunction balancePenalty(dark: Dark): number {\n const size = dark.length;\n const total = dark.reduce((n, row) => n + row.filter(Boolean).length, 0);\n return (Math.ceil(Math.abs(total * 20 - size * size * 10) / (size * size)) - 1) * 10;\n}\n\nfunction penalty(dark: Dark): number {\n const columns = dark.map((_, x) => dark.map((row) => row[x]!));\n const lines = [...dark, ...columns];\n return lines.reduce((n, line) => n + runPenalty(line) + finderPenalty(line), 0) + blockPenalty(dark) + balancePenalty(dark);\n}\n\n/** Thrown when the text does not fit the biggest code (version 40) at the asked level. */\nexport class QrTooLongError extends Error {\n constructor(length: number, level: QrLevel) {\n super(`The text (${length} bytes) is too long for a QR code at level ${level}.`);\n this.name = \"QrTooLongError\";\n }\n}\n\n/** The smallest version whose data capacity holds the bytes (mode and length fields included). */\nfunction smallestVersion(bytes: readonly number[], level: QrLevel): number {\n for (let version = 1; version <= 40; version++) {\n if (4 + (version <= 9 ? 8 : 16) + bytes.length * 8 <= dataCodewords(version, level) * 8) return version;\n }\n throw new QrTooLongError(bytes.length, level);\n}\n\n/** The grid with one mask applied to its data modules and its format bits written. */\nfunction masked(base: Grid, mask: number, level: QrLevel): boolean[][] {\n const dark = base.dark.map((row) => [...row]);\n const fn = base.fn.map((row) => [...row]);\n for (let y = 0; y < base.size; y++) for (let x = 0; x < base.size; x++) if (!fn[y]![x] && MASKS[mask]!(x, y)) dark[y]![x] = !dark[y]![x];\n drawFormat(dark, fn, base.size, level, mask);\n return dark;\n}\n\n/** Encodes a text as a QR code: the smallest version that holds it at `level`, the best of the eight masks. */\nexport function encodeQr(text: string, level: QrLevel = \"M\"): QrMatrix {\n const bytes = utf8(text);\n const version = smallestVersion(bytes, level);\n const base = drawFunctionPatterns(version, level);\n placeData(base, codewords(bytes, version, level));\n const candidates = MASKS.map((_, mask) => masked(base, mask, level));\n const scores = candidates.map(penalty);\n return candidates[scores.indexOf(Math.min(...scores))]!;\n}\n\n/**\n * The drawing of a matrix as one SVG path: a rectangle per horizontal run of dark modules, in module units, offset by\n * the quiet zone. Shared by the web `<svg>` and the native `<Path>`.\n */\nexport function qrPath(matrix: QrMatrix, quiet: number): string {\n const parts: string[] = [];\n matrix.forEach((row, y) => {\n for (let x = 0; x < row.length; x++) {\n if (!row[x]) continue;\n let end = x;\n while (end + 1 < row.length && row[end + 1]) end++;\n parts.push(`M${x + quiet} ${y + quiet}h${end - x + 1}v1h${x - end - 1}z`);\n x = end;\n }\n });\n return parts.join(\"\");\n}\n","// Client (the copy action). A QR code drawn from a text, offline: an SVG of dark modules on a light tile, whatever the\n// theme (a phone reads dark on light), with its quiet zone. No call to any service; the text never leaves the page.\nimport * as React from \"react\";\n\nimport { Button } from \"../button/button\";\nimport { cn } from \"../cn\";\nimport { CheckGlyph, CopyGlyph } from \"../glyphs\";\nimport { encodeQr, type QrLevel, qrPath } from \"./encode\";\n\n// The tile and the modules are the same in dark and light on purpose: a scanner needs dark modules on a light ground.\nexport const QR_TILE = \"#ffffff\";\nexport const QR_MODULE = \"#0b0f19\";\n\nexport type QrCodeProps = {\n /** The text to encode — an address, a feed URL. Encoded here, in the browser (or on the server); never sent anywhere. */\n value: string;\n /** What the code is, for a screen reader (“Calendar feed — scan with your phone”), passed translated. The image is named by it. */\n label: string;\n /** The side of the tile, in px, quiet zone included. Default 176. */\n size?: number;\n /** The quiet zone, in modules, around the code (the standard asks for 4). Default 4, never less than 2. */\n quietZone?: number;\n /** The error-correction level: L · M (default) · Q · H (a logo or wear on the print). */\n level?: QrLevel;\n /** The words of the copy action, passed translated. Without them there is no « copy » button. */\n copyLabel?: string;\n /** Said once the text is on the clipboard. Default: the copy label. */\n copiedLabel?: string;\n /** Called after the text is copied. */\n onCopy?: () => void;\n /** Classes merged last, on the wrapper. */\n className?: string;\n};\n\n/** A QR code from a text: dark modules on a light tile in both themes, a quiet zone, an accessible name, an optional copy action. */\nexport function QrCode({ value, label, size = 176, quietZone = 4, level = \"M\", copyLabel, copiedLabel, onCopy, className }: QrCodeProps) {\n const quiet = Math.max(2, Math.round(quietZone));\n const { matrix, path } = React.useMemo(() => {\n const m = encodeQr(value, level);\n return { matrix: m, path: qrPath(m, quiet) };\n }, [value, level, quiet]);\n const modules = matrix.length + quiet * 2;\n const [copied, setCopied] = React.useState(false);\n React.useEffect(() => {\n if (!copied) return;\n const t = setTimeout(() => setCopied(false), 1800);\n return () => clearTimeout(t);\n }, [copied]);\n const copy = () =>\n navigator.clipboard?.writeText(value).then(() => {\n setCopied(true);\n onCopy?.();\n });\n\n return (\n <div className={cn(\"inline-flex flex-col items-start gap-3\", className)} data-qr-code>\n <svg\n role=\"img\"\n aria-label={label}\n viewBox={`0 0 ${modules} ${modules}`}\n width={size}\n height={size}\n shapeRendering=\"crispEdges\"\n className=\"block max-w-full rounded-lg border border-border-default\"\n style={{ height: \"auto\", aspectRatio: \"1 / 1\" }}\n >\n <rect width={modules} height={modules} fill={QR_TILE} />\n <path d={path} fill={QR_MODULE} />\n </svg>\n {copyLabel ? (\n <Button type=\"button\" variant=\"secondary\" size=\"sm\" onClick={copy} announce={copied ? (copiedLabel ?? copyLabel) : undefined}>\n {copied ? <CheckGlyph className=\"h-3.5 w-3.5\" /> : <CopyGlyph className=\"h-3.5 w-3.5\" />}\n {copied ? (copiedLabel ?? copyLabel) : copyLabel}\n </Button>\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AASA,IAAM,cAAuC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE;AACtE,IAAM,aAAsC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE;AA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F;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,SAAS,OAAO,OAAO,IAAI,OAAO;AAAA,QAClC,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,gBAAe;AAAA,QACf,WAAU;AAAA,QACV,OAAO,EAAE,QAAQ,QAAQ,aAAa,QAAQ;AAAA,QAE9C;AAAA,8BAAC,UAAK,OAAO,SAAS,QAAQ,SAAS,MAAM,SAAS;AAAA,UACtD,oBAAC,UAAK,GAAG,MAAM,MAAM,WAAW;AAAA;AAAA;AAAA,IAClC;AAAA,IACC,YACC,qBAAC,UAAO,MAAK,UAAS,SAAQ,aAAY,MAAK,MAAK,SAAS,MAAM,UAAU,SAAU,eAAe,YAAa,QAChH;AAAA,eAAS,oBAAC,cAAW,WAAU,eAAc,IAAK,oBAAC,aAAU,WAAU,eAAc;AAAA,MACrF,SAAU,eAAe,YAAa;AAAA,OACzC,IACE;AAAA,KACN;AAEJ;","names":[]}
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-4QN5YJ3D.js";
8
8
  import {
9
9
  CheckGlyph
10
- } from "./chunk-5QEXOGO2.js";
10
+ } from "./chunk-6BMKLAZ7.js";
11
11
  import "./chunk-NSLXEDIS.js";
12
12
 
13
13
  // src/radio-group/radio-group.tsx
package/dist/rail-nav.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-27AWSJTK.js";
5
5
  import {
6
6
  ChevronGlyph
7
- } from "./chunk-P7GZR5CU.js";
7
+ } from "./chunk-GFRUTPGG.js";
8
8
  import {
9
9
  cn
10
10
  } from "./chunk-WU4VLSEA.js";
package/dist/retro-tv.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  VideoPlayer
4
- } from "./chunk-YCZ7N6Q6.js";
4
+ } from "./chunk-7MQNG35Q.js";
5
5
  import "./chunk-ADRUEPYC.js";
6
6
  import "./chunk-HJFRHYCI.js";
7
7
  import "./chunk-NSLXEDIS.js";
@@ -9,7 +9,7 @@ import {
9
9
  useInView,
10
10
  usePrefersReducedMotion
11
11
  } from "./chunk-FZBWEDQI.js";
12
- import "./chunk-CPA5CF35.js";
12
+ import "./chunk-PGBF3UBX.js";
13
13
 
14
14
  // src/retro-tv/retro-tv.tsx
15
15
  import * as React from "react";
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  SearchField,
4
4
  searchField
5
- } from "./chunk-VB7MWE2N.js";
5
+ } from "./chunk-DSDFXPL6.js";
6
6
  import "./chunk-ZIXB33X7.js";
7
7
  import "./chunk-FZBWEDQI.js";
8
- import "./chunk-CPA5CF35.js";
8
+ import "./chunk-PGBF3UBX.js";
9
9
  export {
10
10
  SearchField,
11
11
  searchField
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CheckGlyph
3
- } from "./chunk-XCBVFMNV.js";
3
+ } from "./chunk-C57KK5VB.js";
4
4
  import {
5
5
  Stamp
6
6
  } from "./chunk-5RWHDX5J.js";
@@ -1503,7 +1503,7 @@ function Demo({ type, variant }) {
1503
1503
  const v = variant;
1504
1504
  switch (type) {
1505
1505
  case "hero":
1506
- return /* @__PURE__ */ jsx21(HeroSection, { variant: v, title: shop.name, eyebrow: shop.eyebrow, lead: shop.promise, cover: shop.cover, actions: /* @__PURE__ */ jsx21(Button, { variant: "primary", children: "Book" }), tv: { src: "/demo.mp4", poster: shop.cover.src, title: "Latest video" } });
1506
+ return /* @__PURE__ */ jsx21(HeroSection, { variant: v, title: shop.name, eyebrow: shop.eyebrow, lead: shop.promise, cover: shop.cover, actions: /* @__PURE__ */ jsx21(Button, { variant: "primary", children: "Book" }), tv: { poster: shop.cover.src, title: "Latest video" } });
1507
1507
  case "services":
1508
1508
  return /* @__PURE__ */ jsx21(ServicesSection, { variant: v, title: "Services", services: shop.services, chooseLabel: "Choose", popularLabel: "Popular" });
1509
1509
  case "booking":