@krizaka/ui 3.67.1 → 3.69.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 (301) hide show
  1. package/README.md +1 -0
  2. package/dist/chunk-E4FMPPDL.js +134 -0
  3. package/dist/chunk-E4FMPPDL.js.map +1 -0
  4. package/dist/{chunk-E4X3V7QX.js → chunk-GRVIZTT2.js} +2 -2
  5. package/dist/chunk-PZ4FJOD5.js +44 -0
  6. package/dist/chunk-PZ4FJOD5.js.map +1 -0
  7. package/dist/{chunk-PFPOBIHL.js → chunk-T5NZSKWT.js} +15 -12
  8. package/dist/{chunk-PFPOBIHL.js.map → chunk-T5NZSKWT.js.map} +1 -1
  9. package/dist/{chunk-6BMKLAZ7.js → chunk-Z47KIPCT.js} +7 -2
  10. package/dist/{chunk-6BMKLAZ7.js.map → chunk-Z47KIPCT.js.map} +1 -1
  11. package/dist/copy-button.d.ts +29 -0
  12. package/dist/copy-button.js +56 -0
  13. package/dist/copy-button.js.map +1 -0
  14. package/dist/data-table.js +3 -3
  15. package/dist/date-picker.d.ts +15 -15
  16. package/dist/filter-bar.d.ts +3 -3
  17. package/dist/filter-bar.js +1 -1
  18. package/dist/genui.js +3 -3
  19. package/dist/index.js +3 -3
  20. package/dist/kind-config-editor.js +106 -129
  21. package/dist/kind-config-editor.js.map +1 -1
  22. package/dist/lightbox-D5NAHFEA.js +95 -0
  23. package/dist/lightbox-D5NAHFEA.js.map +1 -0
  24. package/dist/match-dialog.js +17 -140
  25. package/dist/match-dialog.js.map +1 -1
  26. package/dist/money-input.d.ts +29 -0
  27. package/dist/money-input.js +78 -0
  28. package/dist/money-input.js.map +1 -0
  29. package/dist/nav-bar.d.ts +28 -4
  30. package/dist/nav-bar.js +20 -10
  31. package/dist/nav-bar.js.map +1 -1
  32. package/dist/promo-code-field.d.ts +38 -0
  33. package/dist/promo-code-field.js +94 -0
  34. package/dist/promo-code-field.js.map +1 -0
  35. package/dist/radio-group.js +1 -1
  36. package/dist/retro-tv.d.ts +39 -4
  37. package/dist/retro-tv.js +217 -40
  38. package/dist/retro-tv.js.map +1 -1
  39. package/dist/shop/booking.d.ts +22 -3
  40. package/dist/shop/booking.js +33 -1
  41. package/dist/shop/booking.js.map +1 -1
  42. package/dist/shop-composer.d.ts +1 -1
  43. package/dist/shop-composer.js +109 -85
  44. package/dist/shop-composer.js.map +1 -1
  45. package/dist/shop-gallery.d.ts +47 -0
  46. package/dist/shop-gallery.js +121 -0
  47. package/dist/shop-gallery.js.map +1 -0
  48. package/dist/shop.d.ts +1 -1
  49. package/dist/shop.js +1 -1
  50. package/dist/shop.js.map +1 -1
  51. package/dist/status-chip.js +1 -1
  52. package/dist/tag-selector.js +5 -5
  53. package/dist/tag-selector.js.map +1 -1
  54. package/dist/terminal-replay.js +1 -1
  55. package/dist/virtual.d.ts +3 -3
  56. package/package.json +63 -5
  57. package/registry/account-menu.json +1 -1
  58. package/registry/account-settings.json +1 -1
  59. package/registry/achievement.json +1 -1
  60. package/registry/action-bar.json +1 -1
  61. package/registry/activity-feed.json +1 -1
  62. package/registry/agenda.json +1 -1
  63. package/registry/alert.json +1 -1
  64. package/registry/analysis-report.json +1 -1
  65. package/registry/anatomy-plate.json +1 -1
  66. package/registry/app-frame.json +2 -2
  67. package/registry/app-header.json +1 -1
  68. package/registry/app-shell.json +1 -1
  69. package/registry/argument-card.json +1 -1
  70. package/registry/audio-player.json +1 -1
  71. package/registry/auth-layout.json +1 -1
  72. package/registry/avatar.json +1 -1
  73. package/registry/badge.json +1 -1
  74. package/registry/bird-plate.json +1 -1
  75. package/registry/button.json +1 -1
  76. package/registry/captcha.json +1 -1
  77. package/registry/card-grid.json +1 -1
  78. package/registry/card.json +1 -1
  79. package/registry/catalogue-page.json +1 -1
  80. package/registry/changelog-page.json +1 -1
  81. package/registry/chapter.json +1 -1
  82. package/registry/chat.json +1 -1
  83. package/registry/checkbox.json +1 -1
  84. package/registry/chip-link.json +1 -1
  85. package/registry/chip-row.json +1 -1
  86. package/registry/chip.json +1 -1
  87. package/registry/choice-grid.json +1 -1
  88. package/registry/code-block.json +1 -1
  89. package/registry/collection-switcher.json +1 -1
  90. package/registry/combobox.json +1 -1
  91. package/registry/command.json +1 -1
  92. package/registry/comparison-table.json +1 -1
  93. package/registry/component-page.json +1 -1
  94. package/registry/confirm-button.json +1 -1
  95. package/registry/contact-page.json +1 -1
  96. package/registry/continue-prompt.json +1 -1
  97. package/registry/copy-button.json +382 -0
  98. package/registry/countdown.json +1 -1
  99. package/registry/cover-hero.json +1 -1
  100. package/registry/cta-panel.json +1 -1
  101. package/registry/dashboard-layout.json +1 -1
  102. package/registry/data-table.json +1 -1
  103. package/registry/date-picker.json +1 -1
  104. package/registry/decision-list.json +1 -1
  105. package/registry/description-list.json +1 -1
  106. package/registry/desktop-window.json +1 -1
  107. package/registry/detail-layout.json +1 -1
  108. package/registry/dialog.json +1 -1
  109. package/registry/docs-article-page.json +1 -1
  110. package/registry/docs-hub-page.json +1 -1
  111. package/registry/docs-layout.json +1 -1
  112. package/registry/docs-nav.json +1 -1
  113. package/registry/document-viewer.json +1 -1
  114. package/registry/doodle.json +1 -1
  115. package/registry/drop-overlay.json +1 -1
  116. package/registry/dropdown-menu.json +1 -1
  117. package/registry/elephant.json +2 -2
  118. package/registry/embed-facade.json +1 -1
  119. package/registry/empty-state.json +1 -1
  120. package/registry/engine-flow.json +1 -1
  121. package/registry/entity-header.json +1 -1
  122. package/registry/environment-notice.json +1 -1
  123. package/registry/error-page.json +1 -1
  124. package/registry/examples/copy-button/default.d.ts +4 -0
  125. package/registry/examples/copy-button/default.js +11 -0
  126. package/registry/examples/copy-button/default.tsx +7 -0
  127. package/registry/examples/copy-button/icon-only.d.ts +4 -0
  128. package/registry/examples/copy-button/icon-only.js +11 -0
  129. package/registry/examples/copy-button/icon-only.tsx +7 -0
  130. package/registry/examples/money-input/currencies.d.ts +4 -0
  131. package/registry/examples/money-input/currencies.js +18 -0
  132. package/registry/examples/money-input/currencies.tsx +16 -0
  133. package/registry/examples/money-input/default.d.ts +4 -0
  134. package/registry/examples/money-input/default.js +18 -0
  135. package/registry/examples/money-input/default.tsx +16 -0
  136. package/registry/examples/promo-code-field/applied.d.ts +4 -0
  137. package/registry/examples/promo-code-field/applied.js +11 -0
  138. package/registry/examples/promo-code-field/applied.tsx +7 -0
  139. package/registry/examples/promo-code-field/default.d.ts +4 -0
  140. package/registry/examples/promo-code-field/default.js +19 -0
  141. package/registry/examples/promo-code-field/default.tsx +14 -0
  142. package/registry/examples/promo-code-field/expired.d.ts +4 -0
  143. package/registry/examples/promo-code-field/expired.js +11 -0
  144. package/registry/examples/promo-code-field/expired.tsx +7 -0
  145. package/registry/examples/retro-tv/playlist-channel.d.ts +4 -0
  146. package/registry/examples/retro-tv/playlist-channel.js +15 -0
  147. package/registry/examples/retro-tv/playlist-channel.tsx +10 -0
  148. package/registry/examples/retro-tv/playlist-crossfade.d.ts +4 -0
  149. package/registry/examples/retro-tv/playlist-crossfade.js +15 -0
  150. package/registry/examples/retro-tv/playlist-crossfade.tsx +10 -0
  151. package/registry/examples/retro-tv/playlist-slide.d.ts +4 -0
  152. package/registry/examples/retro-tv/playlist-slide.js +15 -0
  153. package/registry/examples/retro-tv/playlist-slide.tsx +10 -0
  154. package/registry/examples/shop/booking-closing-closed.d.ts +4 -0
  155. package/registry/examples/shop/booking-closing-closed.js +26 -0
  156. package/registry/examples/shop/booking-closing-closed.tsx +22 -0
  157. package/registry/examples/shop/booking-closing-mark.d.ts +4 -0
  158. package/registry/examples/shop/booking-closing-mark.js +13 -0
  159. package/registry/examples/shop/booking-closing-mark.tsx +12 -0
  160. package/registry/examples/shop/booking-closing.d.ts +4 -0
  161. package/registry/examples/shop/booking-closing.js +27 -0
  162. package/registry/examples/shop/booking-closing.tsx +23 -0
  163. package/registry/examples/shop-gallery/five.d.ts +4 -0
  164. package/registry/examples/shop-gallery/five.js +14 -0
  165. package/registry/examples/shop-gallery/five.tsx +10 -0
  166. package/registry/examples/shop-gallery/three.d.ts +4 -0
  167. package/registry/examples/shop-gallery/three.js +14 -0
  168. package/registry/examples/shop-gallery/three.tsx +10 -0
  169. package/registry/examples/shop-gallery/twelve.d.ts +4 -0
  170. package/registry/examples/shop-gallery/twelve.js +14 -0
  171. package/registry/examples/shop-gallery/twelve.tsx +10 -0
  172. package/registry/field.json +1 -1
  173. package/registry/file-upload.json +1 -1
  174. package/registry/filter-bar.json +2 -2
  175. package/registry/flock.json +1 -1
  176. package/registry/footnote.json +1 -1
  177. package/registry/force-update-screen.json +1 -1
  178. package/registry/form.json +1 -1
  179. package/registry/gallery-page.json +1 -1
  180. package/registry/genui.json +1 -1
  181. package/registry/glossary-term.json +1 -1
  182. package/registry/glossary.json +1 -1
  183. package/registry/glow-card.json +1 -1
  184. package/registry/goal-gauge.json +1 -1
  185. package/registry/grade-stamp.json +1 -1
  186. package/registry/how-it-works-page.json +1 -1
  187. package/registry/image-cropper.json +1 -1
  188. package/registry/index.json +142 -10
  189. package/registry/iso.json +1 -1
  190. package/registry/kanban.json +1 -1
  191. package/registry/kbd.json +1 -1
  192. package/registry/kind-config-editor.json +1 -1
  193. package/registry/kpi-explained.json +1 -1
  194. package/registry/landing-page.json +1 -1
  195. package/registry/landscape.json +1 -1
  196. package/registry/language-switch.json +1 -1
  197. package/registry/legal-page.json +1 -1
  198. package/registry/link-card.json +1 -1
  199. package/registry/list.json +1 -1
  200. package/registry/loader.json +1 -1
  201. package/registry/longform-page.json +1 -1
  202. package/registry/maintenance-screen.json +1 -1
  203. package/registry/map.json +2 -2
  204. package/registry/margin-layout.json +1 -1
  205. package/registry/markdown.json +1 -1
  206. package/registry/marketing-layout.json +1 -1
  207. package/registry/marquee.json +1 -1
  208. package/registry/mascot-quote.json +1 -1
  209. package/registry/mascot-state.json +1 -1
  210. package/registry/mascots.json +1 -1
  211. package/registry/match-dialog.json +1 -1
  212. package/registry/media-capture.json +1 -1
  213. package/registry/media-gallery.json +1 -1
  214. package/registry/media-grid.json +1 -1
  215. package/registry/meta-row.json +1 -1
  216. package/registry/meter.json +1 -1
  217. package/registry/money-input.json +236 -0
  218. package/registry/nav-bar.json +22 -8
  219. package/registry/next-actions.json +1 -1
  220. package/registry/notification-preferences.json +1 -1
  221. package/registry/number-ticker.json +1 -1
  222. package/registry/opening-hours.json +1 -1
  223. package/registry/page-header.json +1 -1
  224. package/registry/page-hero.json +1 -1
  225. package/registry/page-index.json +1 -1
  226. package/registry/page.json +1 -1
  227. package/registry/pagination.json +1 -1
  228. package/registry/photo-grid.json +1 -1
  229. package/registry/pointer-light.json +1 -1
  230. package/registry/popover.json +1 -1
  231. package/registry/pricing-page.json +1 -1
  232. package/registry/product-page.json +1 -1
  233. package/registry/profile-card.json +1 -1
  234. package/registry/progress.json +1 -1
  235. package/registry/promise-card.json +1 -1
  236. package/registry/promo-code-field.json +258 -0
  237. package/registry/qr-code.json +1 -1
  238. package/registry/quota-meter.json +1 -1
  239. package/registry/radio-group.json +1 -1
  240. package/registry/rail-nav.json +2 -2
  241. package/registry/recipes.json +1 -1
  242. package/registry/retro-tv.json +120 -8
  243. package/registry/reviews.json +1 -1
  244. package/registry/router.json +1 -1
  245. package/registry/scroll-stage.json +1 -1
  246. package/registry/search-field.json +1 -1
  247. package/registry/section-backdrop.json +1 -1
  248. package/registry/separator.json +1 -1
  249. package/registry/service-card.json +1 -1
  250. package/registry/settings-layout.json +1 -1
  251. package/registry/shop-composer.json +1 -1
  252. package/registry/shop-gallery.json +209 -0
  253. package/registry/shop.json +30 -6
  254. package/registry/showcase.json +1 -1
  255. package/registry/signature.json +1 -1
  256. package/registry/site-cahier.json +1 -1
  257. package/registry/site-footer.json +2 -2
  258. package/registry/sites.json +1 -1
  259. package/registry/skeleton.json +1 -1
  260. package/registry/skip-link.json +1 -1
  261. package/registry/slider.json +1 -1
  262. package/registry/slot-picker.json +1 -1
  263. package/registry/slot.json +1 -1
  264. package/registry/specimen-tag.json +1 -1
  265. package/registry/speed-lines.json +1 -1
  266. package/registry/spinner.json +1 -1
  267. package/registry/split-view.json +1 -1
  268. package/registry/stage-banner.json +1 -1
  269. package/registry/stat.json +1 -1
  270. package/registry/status-chip.json +1 -1
  271. package/registry/status-page.json +1 -1
  272. package/registry/step-progress.json +1 -1
  273. package/registry/step-showcase.json +1 -1
  274. package/registry/stepper.json +1 -1
  275. package/registry/sticky-action.json +1 -1
  276. package/registry/stuck.json +1 -1
  277. package/registry/swipe-deck.json +1 -1
  278. package/registry/switch.json +1 -1
  279. package/registry/tabs.json +1 -1
  280. package/registry/tag-input.json +1 -1
  281. package/registry/tag-selector.json +2 -2
  282. package/registry/taped-photo.json +1 -1
  283. package/registry/terminal-replay.json +1 -1
  284. package/registry/text-style.json +1 -1
  285. package/registry/theme.json +1 -1
  286. package/registry/toast.json +1 -1
  287. package/registry/toc.json +1 -1
  288. package/registry/tooltip.json +1 -1
  289. package/registry/tree-view.json +1 -1
  290. package/registry/update-prompt.json +1 -1
  291. package/registry/upload-queue.json +1 -1
  292. package/registry/usage.json +1 -1
  293. package/registry/verified-badge.json +1 -1
  294. package/registry/versus-card.json +1 -1
  295. package/registry/vertical-video.json +1 -1
  296. package/registry/video-player.json +1 -1
  297. package/registry/video-trimmer.json +1 -1
  298. package/registry/virtual.json +1 -1
  299. package/registry/wall.json +1 -1
  300. package/registry/waveform.json +1 -1
  301. /package/dist/{chunk-E4X3V7QX.js.map → chunk-GRVIZTT2.js.map} +0 -0
@@ -0,0 +1,47 @@
1
+ import * as React from 'react';
2
+
3
+ type ShopGalleryLabels = {
4
+ /** The tile's name: `Open photo 3 of 12: Two chairs by the window`. */
5
+ open: (alt: string, position: number, total: number) => string;
6
+ /** The last tile of the mosaic: `+ 8 photos`. */
7
+ more: (count: number) => string;
8
+ /** The phone strip's counter: `3 / 12`. */
9
+ counter: (position: number, total: number) => string;
10
+ previous: string;
11
+ next: string;
12
+ close: string;
13
+ /** The lightbox's title, read by a screen reader: `Photos of the salon`. */
14
+ title: (label: string) => string;
15
+ /** The lightbox's position: `3 of 12`. */
16
+ position: (position: number, total: number) => string;
17
+ };
18
+ declare const shopGalleryLabels: ShopGalleryLabels;
19
+ declare const shopGalleryLabelsFr: ShopGalleryLabels;
20
+
21
+ type ShopGalleryPhoto = {
22
+ id: string;
23
+ /** The tile's image. */
24
+ src: string;
25
+ /** What it shows, in words: the tile's name and the lightbox's caption. */
26
+ alt: string;
27
+ /** The widths the product holds (`/a-400.avif 400w, /a-800.avif 800w, /a-1200.avif 1200w`). */
28
+ srcSet?: string;
29
+ /** The lightbox's image at full resolution (default: `src`). */
30
+ fullSrc?: string;
31
+ fullSrcSet?: string;
32
+ };
33
+ type ShopGalleryProps = Omit<React.ComponentProps<"div">, "children"> & {
34
+ /** The shop's photos, in order, already unique. */
35
+ photos: readonly ShopGalleryPhoto[];
36
+ /** The gallery's accessible name (`Photos of the salon`). */
37
+ label: string;
38
+ /** The tiles' `sizes` (default: the bento's share of a 72 rem page on a desktop, 78 vw on a phone). */
39
+ sizes?: string;
40
+ /** Translated texts; `shopGalleryLabelsFr` for French. */
41
+ labels?: Partial<ShopGalleryLabels>;
42
+ };
43
+ /** A shop's photos: a bento mosaic (one 2×2 lead and four tiles, the last one « + N photos »), a snap strip on a phone, and a lightbox. */
44
+ declare function ShopGallery({ photos, label, sizes, labels: given, className, ...props }: ShopGalleryProps): React.JSX.Element | null;
45
+
46
+ export { ShopGallery, shopGalleryLabels, shopGalleryLabelsFr };
47
+ export type { ShopGalleryLabels, ShopGalleryPhoto, ShopGalleryProps };
@@ -0,0 +1,121 @@
1
+ "use client";
2
+ import {
3
+ cn
4
+ } from "./chunk-NSLXEDIS.js";
5
+
6
+ // src/shop-gallery/labels.ts
7
+ var shopGalleryLabels = {
8
+ open: (alt, position, total) => alt ? `Open photo ${position} of ${total}: ${alt}` : `Open photo ${position} of ${total}`,
9
+ more: (count) => `+ ${count} photos`,
10
+ counter: (position, total) => `${position} / ${total}`,
11
+ previous: "Previous photo",
12
+ next: "Next photo",
13
+ close: "Close",
14
+ title: (label) => label,
15
+ position: (position, total) => `${position} of ${total}`
16
+ };
17
+ var shopGalleryLabelsFr = {
18
+ open: (alt, position, total) => alt ? `Ouvrir la photo ${position} sur ${total} : ${alt}` : `Ouvrir la photo ${position} sur ${total}`,
19
+ more: (count) => `+ ${count} photos`,
20
+ counter: (position, total) => `${position} / ${total}`,
21
+ previous: "Photo pr\xE9c\xE9dente",
22
+ next: "Photo suivante",
23
+ close: "Fermer",
24
+ title: (label) => label,
25
+ position: (position, total) => `${position} sur ${total}`
26
+ };
27
+
28
+ // src/shop-gallery/shop-gallery.tsx
29
+ import * as React from "react";
30
+ import { jsx, jsxs } from "react/jsx-runtime";
31
+ var Lightbox = React.lazy(() => import("./lightbox-D5NAHFEA.js"));
32
+ var BENTO = 5;
33
+ var styles = `
34
+ .kz-sg{position:relative}
35
+ .kz-sg-list{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(2,1fr);gap:.5rem}
36
+ .kz-sg-tile{position:relative;display:block;width:100%;height:100%;padding:0;overflow:hidden;cursor:zoom-in;border:1px solid var(--kz-border-subtle);border-radius:var(--kz-shop-photo-radius,.75rem);background:var(--kz-surface-2);color:var(--kz-text-on-media)}
37
+ .kz-sg-tile img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
38
+ .kz-sg-tile:focus-visible{outline:2px solid var(--kz-ring);outline-offset:2px}
39
+ .kz-sg-list>li{aspect-ratio:1/1;min-width:0}
40
+ .kz-sg-list>li:first-child:nth-last-child(odd){grid-column:span 2;aspect-ratio:16/10}
41
+ .kz-sg-more,.kz-sg-count{display:none}
42
+ .kz-sg[data-strip=true] .kz-sg-list{display:flex;gap:.75rem;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;margin-inline:-1rem;padding-inline:1rem;scroll-padding-inline:1rem;-webkit-mask-image:linear-gradient(to right,transparent,currentcolor 1.25rem,currentcolor calc(100% - 1.25rem),transparent);mask-image:linear-gradient(to right,transparent,currentcolor 1.25rem,currentcolor calc(100% - 1.25rem),transparent)}
43
+ .kz-sg[data-strip=true] .kz-sg-list::-webkit-scrollbar{display:none}
44
+ .kz-sg[data-strip=true] .kz-sg-list>li{flex:0 0 78%;aspect-ratio:4/5;scroll-snap-align:start}
45
+ .kz-sg[data-strip=true] .kz-sg-list>li:first-child:nth-last-child(odd){grid-column:auto;aspect-ratio:4/5}
46
+ .kz-sg[data-strip=true] .kz-sg-count{display:block;margin:.5rem 0 0;text-align:end;font:600 .75rem/1 var(--kz-font-mono,monospace);color:var(--kz-text-secondary)}
47
+ @media (prefers-reduced-motion:no-preference){.kz-sg[data-strip=true] .kz-sg-list{scroll-behavior:smooth}.kz-sg-tile img{transition:transform .35s ease}.kz-sg-tile:hover img{transform:scale(1.03)}}
48
+ @media (min-width:40rem){
49
+ .kz-sg-list{gap:.75rem}
50
+ .kz-sg[data-strip=true] .kz-sg-list{display:grid;overflow:visible;margin-inline:0;padding-inline:0;-webkit-mask-image:none;mask-image:none}
51
+ .kz-sg[data-strip=true] .kz-sg-count{display:none}
52
+ .kz-sg[data-count="1"] .kz-sg-list{grid-template-columns:1fr}
53
+ .kz-sg[data-count="1"] .kz-sg-list>li{aspect-ratio:16/9}
54
+ .kz-sg[data-count="2"] .kz-sg-list>li,.kz-sg[data-count="2"] .kz-sg-list>li:first-child:nth-last-child(odd){aspect-ratio:4/3;grid-column:auto}
55
+ .kz-sg:not([data-count="1"]):not([data-count="2"]) .kz-sg-list{grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(2,1fr);aspect-ratio:2/1}
56
+ .kz-sg:not([data-count="1"]):not([data-count="2"]) .kz-sg-list>li,.kz-sg[data-strip=true] .kz-sg-list>li{aspect-ratio:auto;flex:none}
57
+ .kz-sg:not([data-count="1"]):not([data-count="2"]) .kz-sg-list>li:first-child{grid-column:1/3;grid-row:1/3}
58
+ .kz-sg[data-count="3"] .kz-sg-list>li:nth-child(n+2){grid-column:3/5}
59
+ .kz-sg[data-count="4"] .kz-sg-list>li:nth-child(2){grid-column:3/5}
60
+ .kz-sg[data-strip=true] .kz-sg-list>li:nth-child(n+6){display:none}
61
+ .kz-sg[data-more=true] .kz-sg-list>li:nth-child(5) .kz-sg-more{position:absolute;inset:0;display:grid;place-items:center;background:color-mix(in srgb,var(--kz-scrim-strong) 62%,transparent);font:700 1.125rem/1.2 var(--kz-font-sans,system-ui);text-align:center}
62
+ }
63
+ `;
64
+ function ShopGallery({ photos, label, sizes, labels: given, className, ...props }) {
65
+ const labels = { ...shopGalleryLabels, ...given };
66
+ const total = photos.length;
67
+ const strip = total >= BENTO;
68
+ const [open, setOpen] = React.useState(null);
69
+ const [current, setCurrent] = React.useState(1);
70
+ const tiles = React.useRef([]);
71
+ const opener = React.useRef(0);
72
+ if (total === 0) return null;
73
+ const tileSizes = sizes ?? (strip ? "(min-width: 40rem) 36rem, 78vw" : "(min-width: 40rem) 36rem, 50vw");
74
+ const onScroll = (event) => {
75
+ const list = event.currentTarget;
76
+ const first = list.children[0];
77
+ const step = first ? first.offsetWidth + 12 : 0;
78
+ if (step > 0) setCurrent(Math.min(total, Math.max(1, Math.round(list.scrollLeft / step) + 1)));
79
+ };
80
+ return /* @__PURE__ */ jsxs("div", { className: cn("kz-sg", className), "data-count": total, "data-strip": strip || void 0, "data-more": total > BENTO || void 0, role: "group", "aria-label": label, ...props, children: [
81
+ /* @__PURE__ */ jsx("style", { children: styles }),
82
+ /* @__PURE__ */ jsx("ul", { className: "kz-sg-list", onScroll: strip ? onScroll : void 0, children: photos.map((photo, i) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
83
+ "button",
84
+ {
85
+ type: "button",
86
+ ref: (node) => {
87
+ tiles.current[i] = node;
88
+ },
89
+ className: "kz-sg-tile",
90
+ "aria-label": i === BENTO - 1 && total > BENTO ? `${labels.more(total - BENTO + 1)}: ${labels.open(photo.alt, i + 1, total)}` : labels.open(photo.alt, i + 1, total),
91
+ onClick: () => {
92
+ opener.current = i;
93
+ setOpen(i);
94
+ },
95
+ children: [
96
+ /* @__PURE__ */ jsx("img", { src: photo.src, srcSet: photo.srcSet, sizes: photo.srcSet ? tileSizes : void 0, alt: "", loading: "lazy", decoding: "async" }),
97
+ i === BENTO - 1 && total > BENTO && /* @__PURE__ */ jsx("span", { className: "kz-sg-more", "aria-hidden": true, children: labels.more(total - BENTO + 1) })
98
+ ]
99
+ }
100
+ ) }, photo.id)) }),
101
+ strip && /* @__PURE__ */ jsx("p", { className: "kz-sg-count", "aria-hidden": true, children: labels.counter(current, total) }),
102
+ open !== null && /* @__PURE__ */ jsx(React.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
103
+ Lightbox,
104
+ {
105
+ photos,
106
+ index: open,
107
+ onIndexChange: setOpen,
108
+ onClose: () => setOpen(null),
109
+ label,
110
+ labels,
111
+ returnFocus: () => tiles.current[opener.current] ?? null
112
+ }
113
+ ) })
114
+ ] });
115
+ }
116
+ export {
117
+ ShopGallery,
118
+ shopGalleryLabels,
119
+ shopGalleryLabelsFr
120
+ };
121
+ //# sourceMappingURL=shop-gallery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/shop-gallery/labels.ts","../src/shop-gallery/shop-gallery.tsx"],"sourcesContent":["export type ShopGalleryLabels = {\n /** The tile's name: `Open photo 3 of 12: Two chairs by the window`. */\n open: (alt: string, position: number, total: number) => string;\n /** The last tile of the mosaic: `+ 8 photos`. */\n more: (count: number) => string;\n /** The phone strip's counter: `3 / 12`. */\n counter: (position: number, total: number) => string;\n previous: string;\n next: string;\n close: string;\n /** The lightbox's title, read by a screen reader: `Photos of the salon`. */\n title: (label: string) => string;\n /** The lightbox's position: `3 of 12`. */\n position: (position: number, total: number) => string;\n};\n\nexport const shopGalleryLabels: ShopGalleryLabels = {\n open: (alt, position, total) => (alt ? `Open photo ${position} of ${total}: ${alt}` : `Open photo ${position} of ${total}`),\n more: (count) => `+ ${count} photos`,\n counter: (position, total) => `${position} / ${total}`,\n previous: \"Previous photo\",\n next: \"Next photo\",\n close: \"Close\",\n title: (label) => label,\n position: (position, total) => `${position} of ${total}`,\n};\n\nexport const shopGalleryLabelsFr: ShopGalleryLabels = {\n open: (alt, position, total) => (alt ? `Ouvrir la photo ${position} sur ${total} : ${alt}` : `Ouvrir la photo ${position} sur ${total}`),\n more: (count) => `+ ${count} photos`,\n counter: (position, total) => `${position} / ${total}`,\n previous: \"Photo précédente\",\n next: \"Photo suivante\",\n close: \"Fermer\",\n title: (label) => label,\n position: (position, total) => `${position} sur ${total}`,\n};\n","\"use client\";\n\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { type ShopGalleryLabels, shopGalleryLabels } from \"./labels\";\n\n// The lightbox is a lazy chunk: nothing of it is loaded until a photo is opened.\nconst Lightbox = React.lazy(() => import(\"./lightbox\"));\n\nexport type ShopGalleryPhoto = {\n id: string;\n /** The tile's image. */\n src: string;\n /** What it shows, in words: the tile's name and the lightbox's caption. */\n alt: string;\n /** The widths the product holds (`/a-400.avif 400w, /a-800.avif 800w, /a-1200.avif 1200w`). */\n srcSet?: string;\n /** The lightbox's image at full resolution (default: `src`). */\n fullSrc?: string;\n fullSrcSet?: string;\n};\n\nexport type ShopGalleryProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n /** The shop's photos, in order, already unique. */\n photos: readonly ShopGalleryPhoto[];\n /** The gallery's accessible name (`Photos of the salon`). */\n label: string;\n /** The tiles' `sizes` (default: the bento's share of a 72 rem page on a desktop, 78 vw on a phone). */\n sizes?: string;\n /** Translated texts; `shopGalleryLabelsFr` for French. */\n labels?: Partial<ShopGalleryLabels>;\n};\n\nconst BENTO = 5;\n\nconst styles = `\n.kz-sg{position:relative}\n.kz-sg-list{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(2,1fr);gap:.5rem}\n.kz-sg-tile{position:relative;display:block;width:100%;height:100%;padding:0;overflow:hidden;cursor:zoom-in;border:1px solid var(--kz-border-subtle);border-radius:var(--kz-shop-photo-radius,.75rem);background:var(--kz-surface-2);color:var(--kz-text-on-media)}\n.kz-sg-tile img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}\n.kz-sg-tile:focus-visible{outline:2px solid var(--kz-ring);outline-offset:2px}\n.kz-sg-list>li{aspect-ratio:1/1;min-width:0}\n.kz-sg-list>li:first-child:nth-last-child(odd){grid-column:span 2;aspect-ratio:16/10}\n.kz-sg-more,.kz-sg-count{display:none}\n.kz-sg[data-strip=true] .kz-sg-list{display:flex;gap:.75rem;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;margin-inline:-1rem;padding-inline:1rem;scroll-padding-inline:1rem;-webkit-mask-image:linear-gradient(to right,transparent,currentcolor 1.25rem,currentcolor calc(100% - 1.25rem),transparent);mask-image:linear-gradient(to right,transparent,currentcolor 1.25rem,currentcolor calc(100% - 1.25rem),transparent)}\n.kz-sg[data-strip=true] .kz-sg-list::-webkit-scrollbar{display:none}\n.kz-sg[data-strip=true] .kz-sg-list>li{flex:0 0 78%;aspect-ratio:4/5;scroll-snap-align:start}\n.kz-sg[data-strip=true] .kz-sg-list>li:first-child:nth-last-child(odd){grid-column:auto;aspect-ratio:4/5}\n.kz-sg[data-strip=true] .kz-sg-count{display:block;margin:.5rem 0 0;text-align:end;font:600 .75rem/1 var(--kz-font-mono,monospace);color:var(--kz-text-secondary)}\n@media (prefers-reduced-motion:no-preference){.kz-sg[data-strip=true] .kz-sg-list{scroll-behavior:smooth}.kz-sg-tile img{transition:transform .35s ease}.kz-sg-tile:hover img{transform:scale(1.03)}}\n@media (min-width:40rem){\n.kz-sg-list{gap:.75rem}\n.kz-sg[data-strip=true] .kz-sg-list{display:grid;overflow:visible;margin-inline:0;padding-inline:0;-webkit-mask-image:none;mask-image:none}\n.kz-sg[data-strip=true] .kz-sg-count{display:none}\n.kz-sg[data-count=\"1\"] .kz-sg-list{grid-template-columns:1fr}\n.kz-sg[data-count=\"1\"] .kz-sg-list>li{aspect-ratio:16/9}\n.kz-sg[data-count=\"2\"] .kz-sg-list>li,.kz-sg[data-count=\"2\"] .kz-sg-list>li:first-child:nth-last-child(odd){aspect-ratio:4/3;grid-column:auto}\n.kz-sg:not([data-count=\"1\"]):not([data-count=\"2\"]) .kz-sg-list{grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(2,1fr);aspect-ratio:2/1}\n.kz-sg:not([data-count=\"1\"]):not([data-count=\"2\"]) .kz-sg-list>li,.kz-sg[data-strip=true] .kz-sg-list>li{aspect-ratio:auto;flex:none}\n.kz-sg:not([data-count=\"1\"]):not([data-count=\"2\"]) .kz-sg-list>li:first-child{grid-column:1/3;grid-row:1/3}\n.kz-sg[data-count=\"3\"] .kz-sg-list>li:nth-child(n+2){grid-column:3/5}\n.kz-sg[data-count=\"4\"] .kz-sg-list>li:nth-child(2){grid-column:3/5}\n.kz-sg[data-strip=true] .kz-sg-list>li:nth-child(n+6){display:none}\n.kz-sg[data-more=true] .kz-sg-list>li:nth-child(5) .kz-sg-more{position:absolute;inset:0;display:grid;place-items:center;background:color-mix(in srgb,var(--kz-scrim-strong) 62%,transparent);font:700 1.125rem/1.2 var(--kz-font-sans,system-ui);text-align:center}\n}\n`;\n\n/** A shop's photos: a bento mosaic (one 2×2 lead and four tiles, the last one « + N photos »), a snap strip on a phone, and a lightbox. */\nexport function ShopGallery({ photos, label, sizes, labels: given, className, ...props }: ShopGalleryProps) {\n const labels = { ...shopGalleryLabels, ...given };\n const total = photos.length;\n const strip = total >= BENTO;\n const [open, setOpen] = React.useState<number | null>(null);\n const [current, setCurrent] = React.useState(1);\n const tiles = React.useRef<(HTMLButtonElement | null)[]>([]);\n const opener = React.useRef<number>(0);\n if (total === 0) return null;\n\n const tileSizes = sizes ?? (strip ? \"(min-width: 40rem) 36rem, 78vw\" : \"(min-width: 40rem) 36rem, 50vw\");\n const onScroll = (event: React.UIEvent<HTMLUListElement>) => {\n const list = event.currentTarget;\n const first = list.children[0] as HTMLElement | undefined;\n const step = first ? first.offsetWidth + 12 : 0;\n if (step > 0) setCurrent(Math.min(total, Math.max(1, Math.round(list.scrollLeft / step) + 1)));\n };\n return (\n <div className={cn(\"kz-sg\", className)} data-count={total} data-strip={strip || undefined} data-more={total > BENTO || undefined} role=\"group\" aria-label={label} {...props}>\n <style>{styles}</style>\n <ul className=\"kz-sg-list\" onScroll={strip ? onScroll : undefined}>\n {photos.map((photo, i) => (\n <li key={photo.id}>\n <button\n type=\"button\"\n ref={(node) => {\n tiles.current[i] = node;\n }}\n className=\"kz-sg-tile\"\n aria-label={i === BENTO - 1 && total > BENTO ? `${labels.more(total - BENTO + 1)}: ${labels.open(photo.alt, i + 1, total)}` : labels.open(photo.alt, i + 1, total)}\n onClick={() => {\n opener.current = i;\n setOpen(i);\n }}\n >\n <img src={photo.src} srcSet={photo.srcSet} sizes={photo.srcSet ? tileSizes : undefined} alt=\"\" loading=\"lazy\" decoding=\"async\" />\n {i === BENTO - 1 && total > BENTO && <span className=\"kz-sg-more\" aria-hidden>{labels.more(total - BENTO + 1)}</span>}\n </button>\n </li>\n ))}\n </ul>\n {strip && <p className=\"kz-sg-count\" aria-hidden>{labels.counter(current, total)}</p>}\n {open !== null && (\n <React.Suspense fallback={null}>\n <Lightbox\n photos={photos}\n index={open}\n onIndexChange={setOpen}\n onClose={() => setOpen(null)}\n label={label}\n labels={labels}\n returnFocus={() => tiles.current[opener.current] ?? null}\n />\n </React.Suspense>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;AAgBO,IAAM,oBAAuC;AAAA,EAClD,MAAM,CAAC,KAAK,UAAU,UAAW,MAAM,cAAc,QAAQ,OAAO,KAAK,KAAK,GAAG,KAAK,cAAc,QAAQ,OAAO,KAAK;AAAA,EACxH,MAAM,CAAC,UAAU,KAAK,KAAK;AAAA,EAC3B,SAAS,CAAC,UAAU,UAAU,GAAG,QAAQ,MAAM,KAAK;AAAA,EACpD,UAAU;AAAA,EACV,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO,CAAC,UAAU;AAAA,EAClB,UAAU,CAAC,UAAU,UAAU,GAAG,QAAQ,OAAO,KA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,QAAQ,SAAS,KAAK,GAAE;AAAA,IAChF,SAAS,QACR,oBAAO,gBAAN,EAAe,UAAU,MACxB;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,OAAO;AAAA,QACP,eAAe;AAAA,QACf,SAAS,MAAM,QAAQ,IAAI;AAAA,QAC3B;AAAA,QACA;AAAA,QACA,aAAa,MAAM,MAAM,QAAQ,OAAO,OAAO,KAAK;AAAA;AAAA,IACtD,GACF;AAAA,KAEJ;AAEJ;","names":[]}
package/dist/shop.d.ts CHANGED
@@ -88,7 +88,7 @@ declare const SECTION_DEFINITIONS: readonly [SectionDefinitionOf<"hero", readonl
88
88
  service: z.ZodMiniObject<{
89
89
  serviceId: z.ZodMiniString<string>;
90
90
  }, z.core.$strip>;
91
- }>, SectionDefinitionOf<"booking", readonly ["strip", "panel", "sticky"], z.ZodMiniObject<{
91
+ }>, SectionDefinitionOf<"booking", readonly ["strip", "panel", "closing", "sticky"], z.ZodMiniObject<{
92
92
  serviceId: z.ZodMiniOptional<z.ZodMiniString<string>>;
93
93
  count: z.ZodMiniUnion<[z.ZodMiniLiteral<3 | 4 | 6>, z.ZodMiniLiteral<3 | 4 | 6>]>;
94
94
  }, z.core.$strip>, Record<never, never>>, SectionDefinitionOf<"gallery", readonly ["mosaic", "filmstrip", "wall", "grid"], z.ZodMiniObject<{
package/dist/shop.js CHANGED
@@ -93,7 +93,7 @@ var servicesSection = defineSection({
93
93
  });
94
94
  var bookingSection = defineSection({
95
95
  type: "booking",
96
- variants: ["strip", "panel", "sticky"],
96
+ variants: ["strip", "panel", "closing", "sticky"],
97
97
  settings: z3.object({
98
98
  /** A service the times are for; absent, the next free times of any service. */
99
99
  serviceId: z3.optional(ref),
package/dist/shop.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/shop/catalogue.ts","../src/shop/define.ts","../src/shop/text.ts","../src/shop/schema.ts","../src/shop/migrate.ts","../src/shop/preview.ts","../src/shop/starters.ts"],"sourcesContent":["// The catalogue of section types (ADR-007 §3): each with its variants, its settings and the blocks it allows, as zod\n// schemas — the renderer, the validator and the composer's forms read the same definitions. The first variant of a type is\n// its default. Settings hold references and rules (ids, a source, a count), never a price or a text of the shop.\nimport * as z from \"zod/mini\";\n\nimport { defineSection } from \"./define\";\nimport { SHOP_LIMITS } from \"./limits\";\nimport { localizedText } from \"./text\";\n\n/** A reference to something the product holds (a service, a photo, a member): an opaque id. */\nconst ref = z.string().check(z.minLength(1), z.maxLength(80));\nconst short = z.string().check(z.minLength(1), z.maxLength(140));\nconst url = z.string().check(z.maxLength(300), z.regex(/^https:\\/\\//, \"an https address\"));\nconst isoDay = z.string().check(z.regex(/^\\d{4}-\\d{2}-\\d{2}$/, \"a day (YYYY-MM-DD)\"));\nconst source = z.enum([\"all\", \"pick\"]);\n/** One of a few numbers. */\nconst oneOf = <const N extends readonly [number, number, ...number[]]>(...n: N) => z.union(n.map((v) => z.literal(v)) as unknown as [z.ZodMiniLiteral<N[number]>, z.ZodMiniLiteral<N[number]>]);\n\nexport const platforms = [\"tiktok\", \"youtube-shorts\", \"instagram\"] as const;\n\nexport const heroSection = defineSection({\n type: \"hero\",\n variants: [\"poster\", \"split\", \"banner\", \"tv\"],\n settings: z.object({\n /** The cover: a media id. Absent, the product's default for the trade. */\n media: z.optional(ref),\n /** Where the photo is cropped to when the box is not its ratio. */\n focus: z.enum([\"center\", \"top\", \"bottom\"]),\n }),\n settingsDefault: { focus: \"center\" },\n blocks: { fact: z.object({ kind: z.enum([\"open-now\", \"area\", \"score\"]) }) },\n});\n\nexport const servicesSection = defineSection({\n type: \"services\",\n variants: [\"menu\", \"cards\", \"index\", \"carousel\"],\n settings: z.object({\n /** `all` the shop's services, or `pick` the ones the `service` blocks name, in their order. */\n source,\n groupBy: z.enum([\"category\", \"none\"]),\n /** `menu` only: two columns when nothing sits beside it. */\n columns: oneOf(1, 2),\n /** `menu` only: the shop's hours, team and address beside the list (the host draws them from its own data). */\n aside: z.enum([\"hours\", \"none\"]),\n }),\n settingsDefault: { source: \"all\", groupBy: \"category\", columns: 1, aside: \"hours\" },\n blocks: { service: z.object({ serviceId: ref }) },\n refine: (section, issue) => {\n if (section.settings.source === \"pick\" && (section.blocks ?? []).length === 0) issue([\"blocks\"], \"pick at least one service\");\n if (section.variant === \"cards\" && (section.blocks ?? []).length > SHOP_LIMITS.cards) issue([\"blocks\"], `at most ${SHOP_LIMITS.cards} cards`);\n },\n});\n\nexport const bookingSection = defineSection({\n type: \"booking\",\n variants: [\"strip\", \"panel\", \"sticky\"],\n settings: z.object({\n /** A service the times are for; absent, the next free times of any service. */\n serviceId: z.optional(ref),\n /** `strip`: how many times it shows. */\n count: oneOf(3, 4, 6),\n }),\n settingsDefault: { count: 4 },\n});\n\nexport const gallerySection = defineSection({\n type: \"gallery\",\n variants: [\"mosaic\", \"filmstrip\", \"wall\", \"grid\"],\n settings: z.object({\n source,\n /** `wall` only. */\n texture: z.enum([\"plaster\", \"brick\", \"ridge\", \"zellige\"]),\n }),\n settingsDefault: { source: \"all\", texture: \"plaster\" },\n blocks: {\n photo: z.object({ mediaId: ref, caption: z.optional(short) }),\n note: z.object({ text: short, signature: z.optional(z.string().check(z.maxLength(40))) }),\n sign: z.object({}),\n },\n refine: (section, issue) => {\n const photos = (section.blocks ?? []).filter((b) => b.type === \"photo\").length;\n if (photos > SHOP_LIMITS.photos) issue([\"blocks\"], `at most ${SHOP_LIMITS.photos} photos`);\n },\n});\n\nexport const videoSection = defineSection({\n type: \"video\",\n variants: [\"tv\", \"shorts\"],\n settings: z.object({ cabinet: z.enum([\"cabinet\", \"portable\"]), channel: z.optional(z.string().check(z.maxLength(32))) }),\n settingsDefault: { cabinet: \"cabinet\" },\n blocks: { reel: z.object({ platform: z.enum(platforms), url }) },\n});\n\nexport const reviewsSection = defineSection({\n type: \"reviews\",\n variants: [\"summary-cards\", \"quote\", \"strip\"],\n settings: z.object({ rule: z.enum([\"best\", \"latest\"]), count: oneOf(1, 2, 3) }),\n settingsDefault: { rule: \"best\", count: 2 },\n});\n\nexport const bulletinSection = defineSection({\n type: \"bulletin\",\n variants: [\"board\", \"banner\"],\n settings: z.object({}),\n settingsDefault: {},\n blocks: { flyer: z.object({ text: short, signature: z.optional(z.string().check(z.maxLength(40))), until: z.optional(isoDay) }) },\n refine: (section, issue) => {\n if ((section.blocks ?? []).length > SHOP_LIMITS.flyers) issue([\"blocks\"], `at most ${SHOP_LIMITS.flyers} flyers`);\n },\n});\n\nexport const teamSection = defineSection({\n type: \"team\",\n variants: [\"row\", \"cards\"],\n settings: z.object({ source }),\n settingsDefault: { source: \"all\" },\n blocks: { member: z.object({ memberId: ref }) },\n});\n\nexport const visitSection = defineSection({\n type: \"visit\",\n variants: [\"card\", \"map\", \"split\"],\n settings: z.object({ showPhone: z.boolean() }),\n settingsDefault: { showPhone: true },\n});\n\nexport const storySection = defineSection({\n type: \"story\",\n variants: [\"quote\", \"owner\"],\n settings: z.object({ body: localizedText }),\n settingsDefault: { body: {} },\n});\n\nexport const socialSection = defineSection({\n type: \"social\",\n variants: [\"links\", \"facade\"],\n settings: z.object({}),\n settingsDefault: {},\n blocks: { link: z.object({ platform: z.enum(platforms), url }) },\n});\n\nexport const faqSection = defineSection({\n type: \"faq\",\n variants: [\"list\"],\n settings: z.object({}),\n settingsDefault: {},\n blocks: { question: z.object({ question: localizedText, answer: localizedText }) },\n});\n\nexport const policiesSection = defineSection({\n type: \"policies\",\n variants: [\"inline\"],\n settings: z.object({ show: z.array(z.enum([\"cancellation\", \"prices\", \"booking-window\"])).check(z.maxLength(3)) }),\n settingsDefault: { show: [\"cancellation\", \"prices\", \"booking-window\"] },\n});\n\n/** Every section type, in the order the composer lists them. */\nexport const SECTION_DEFINITIONS = [\n heroSection, servicesSection, bookingSection, gallerySection, videoSection, reviewsSection, bulletinSection,\n teamSection, visitSection, storySection, socialSection, faqSection, policiesSection,\n] as const;\n\nexport type SectionDefinition = (typeof SECTION_DEFINITIONS)[number];\nexport type SectionType = SectionDefinition[\"type\"];\nexport const SECTION_TYPES = SECTION_DEFINITIONS.map((d) => d.type) as readonly SectionType[];\n\n/** The definition of a type. */\nexport function sectionDefinition<T extends SectionType>(type: T): Extract<SectionDefinition, { type: T }> {\n return SECTION_DEFINITIONS.find((d) => d.type === type) as Extract<SectionDefinition, { type: T }>;\n}\n","// `defineSection` (ADR-007 §1): one section type = its variants, the zod schema of its settings, the blocks it allows\n// (each a zod schema) and the checks that need the whole section. It builds the zod schema of a section of this type, so\n// the renderer, the validator and the composer's generated forms agree.\nimport * as z from \"zod/mini\";\n\nimport { SHOP_LIMITS } from \"./limits\";\nimport { localizedText } from \"./text\";\n\ntype Shape = z.ZodMiniObject;\ntype BlockShapes = Record<string, Shape>;\n\n/** What a section of a type is, once parsed. */\nexport type ParsedSection<T extends string, V extends string, S extends Shape, B extends BlockShapes> = {\n key: string;\n type: T;\n variant: V;\n disabled?: boolean | undefined;\n settings: z.output<S>;\n text?: { title?: z.output<typeof localizedText> | undefined; lead?: z.output<typeof localizedText> | undefined } | undefined;\n blocks?: { [K in keyof B & string]: { key: string; type: K; settings: z.output<B[K]>; text?: Record<string, z.output<typeof localizedText>> | undefined } }[keyof B & string][] | undefined;\n};\n\nexport type SectionSpec<T extends string, V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes> = {\n /** The type's name: the `type` of a section. */\n type: T;\n /** Its variants; the first is the default one. */\n variants: V;\n /** The zod schema of its settings. */\n settings: S;\n /** The settings a new section starts with. */\n settingsDefault: z.input<S>;\n /** The block types it allows, each with the zod schema of its settings. None: the section has no blocks. */\n blocks?: B;\n /** The checks that read the whole section (a count, a combination); `issue(path, message)` refuses it. */\n refine?: (section: ParsedSection<T, V[number], S, B>, issue: (path: (string | number)[], message: string) => void) => void;\n};\n\nexport type SectionDefinitionOf<T extends string, V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes> = SectionSpec<T, V, S, B> & {\n readonly defaultVariant: V[number];\n readonly blockTypes: readonly (keyof B & string)[];\n /** The zod schema of a section of this type. */\n readonly schema: z.ZodMiniType<ParsedSection<T, V[number], S, B>>;\n};\n\nconst key = z.string().check(z.minLength(1), z.maxLength(40), z.regex(/^[A-Za-z0-9_-]+$/, \"a key (letters, digits, - and _)\"));\n\n/** Defines a section type. */\nexport function defineSection<const T extends string, const V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes = Record<never, never>>(\n spec: SectionSpec<T, V, S, B>,\n): SectionDefinitionOf<T, V, S, B> {\n const blockUnion = spec.blocks && Object.keys(spec.blocks).length > 0\n ? z.discriminatedUnion(\n \"type\",\n Object.entries(spec.blocks).map(([type, settings]) =>\n z.object({ key, type: z.literal(type), settings, text: z.optional(z.record(z.string(), localizedText)) }),\n ) as unknown as [z.ZodMiniObject, ...z.ZodMiniObject[]],\n )\n : undefined;\n const blocks = blockUnion\n ? z.optional(z.array(blockUnion).check(z.maxLength(SHOP_LIMITS.blocks)))\n : z.optional(z.array(z.never()).check(z.maxLength(0)));\n const base = z.object({\n key,\n type: z.literal(spec.type),\n variant: z.enum(spec.variants),\n disabled: z.optional(z.boolean()),\n settings: spec.settings,\n text: z.optional(z.object({ title: z.optional(localizedText), lead: z.optional(localizedText) })),\n blocks,\n });\n const schema = base.check(\n z.superRefine((value, ctx) => {\n spec.refine?.(value as never, (path, message) => ctx.issues.push({ code: \"custom\", message, path, input: value }));\n }),\n );\n return Object.freeze({\n ...spec,\n defaultVariant: spec.variants[0],\n blockTypes: Object.keys(spec.blocks ?? {}) as (keyof B & string)[],\n schema: schema as unknown as z.ZodMiniType<ParsedSection<T, V[number], S, B>>,\n });\n}\n","import * as z from \"zod/mini\";\n\n/** The owner's words, in each language; the product's message is the fallback when a language is absent. */\nexport const localizedText = z.object({\n fr: z.optional(z.string().check(z.maxLength(600))),\n en: z.optional(z.string().check(z.maxLength(600))),\n});\nexport type LocalizedText = z.output<typeof localizedText>;\n","// The document a shop page is (ADR-007 §1): an ordered list of sections, each a `type` × `variant` with its settings and\n// its blocks. Parsed on write (a route refuses an invalid one, with the path) and on read. The storage is the product's.\nimport * as z from \"zod/mini\";\n\nimport { SECTION_DEFINITIONS, type SectionType } from \"./catalogue\";\nimport { SHOP_LIMITS } from \"./limits\";\n\n/** The version of the document's format; migrations are pure functions schema n → n + 1 (`migrate.ts`). */\n// @fixed: ADR-007 §1 — the format version of the code, bumped with a migration; not a shop setting.\nexport const SHOP_SCHEMA_VERSION = 1;\n\n/** A look preset by id and version (`@krizaka/tokens`): `salon-atelier`. The mode is the visitor's, never stored. */\nexport const presetRef = z.object({\n id: z.string().check(z.regex(/^[a-z]+-[a-z]+$/, \"a preset id (trade-name)\")),\n version: z.int().check(z.minimum(1)),\n});\n\nconst sectionUnion = z.discriminatedUnion(\n \"type\",\n SECTION_DEFINITIONS.map((d) => d.schema) as unknown as [z.ZodMiniObject, ...z.ZodMiniObject[]],\n);\n\nexport const shopPageSchema = z\n .object({\n schema: z.literal(SHOP_SCHEMA_VERSION),\n preset: presetRef,\n /** Overrides the preset's density. */\n density: z.optional(z.enum([\"compact\", \"airy\"])),\n sections: z.array(sectionUnion).check(z.minLength(1), z.maxLength(SHOP_LIMITS.sections)),\n })\n .check(\n z.superRefine((page, ctx) => {\n const add = (path: (string | number)[], message: string) => ctx.issues.push({ code: \"custom\", message, path, input: page });\n const seen = new Set<string>();\n page.sections.forEach((section, i) => {\n const s = section as { key: string; type: string };\n if (seen.has(s.key)) add([\"sections\", i, \"key\"], `the key \"${s.key}\" is used twice`);\n seen.add(s.key);\n if (s.type === \"hero\" && i !== 0) add([\"sections\", i, \"type\"], \"the hero is the first section, and there is only one\");\n });\n }),\n );\n\n/** A section of any type, as parsed: its `settings` and `blocks` are the type's own. */\nexport type Section = z.output<(typeof SECTION_DEFINITIONS)[number][\"schema\"]>;\nexport type ShopPage = {\n schema: typeof SHOP_SCHEMA_VERSION;\n preset: z.output<typeof presetRef>;\n density?: \"compact\" | \"airy\" | undefined;\n sections: Section[];\n};\nexport type SectionOf<T extends SectionType> = Extract<Section, { type: T }>;\n\nexport type ShopPageIssue = { path: string; message: string };\nexport type ShopPageResult = { ok: true; page: ShopPage } | { ok: false; issues: ShopPageIssue[] };\n\n/** Validates a document; an invalid one answers every issue with its path (`sections.2.variant`), for a 422. */\nexport function parseShopPage(input: unknown): ShopPageResult {\n const result = shopPageSchema.safeParse(input);\n if (result.success) return { ok: true, page: result.data as unknown as ShopPage };\n return { ok: false, issues: result.error.issues.map((i) => ({ path: i.path.join(\".\"), message: i.message })) };\n}\n","// Migrations of the document (ADR-007 §1): pure functions schema n → n + 1, applied in memory when an older document is\n// read; the product writes the migrated one back on the next save. A newer document than this code knows is refused.\nimport { SHOP_SCHEMA_VERSION } from \"./schema\";\n\nexport type ShopMigration = {\n /** The schema it reads. */\n from: number;\n /** Pure: returns a new document, never mutates. */\n up: (doc: Record<string, unknown>) => Record<string, unknown>;\n};\n\n/** The migrations of the document, oldest first. Schema 1 is the first format: none yet. */\nexport const SHOP_MIGRATIONS: readonly ShopMigration[] = [];\n\nexport type MigrationResult = { ok: true; doc: Record<string, unknown>; from: number } | { ok: false; reason: string };\n\n/** A migrator over a list of migrations and a current version (the shop's own are `migrateShopPage`). */\nexport function createMigrator(migrations: readonly ShopMigration[], current: number) {\n return (input: unknown): MigrationResult => {\n if (typeof input !== \"object\" || input === null || Array.isArray(input)) return { ok: false, reason: \"a document is an object\" };\n let doc = input as Record<string, unknown>;\n const from = doc.schema;\n if (typeof from !== \"number\" || !Number.isInteger(from) || from < 1) return { ok: false, reason: \"the document has no schema version\" };\n if (from > current) return { ok: false, reason: `schema ${from} is newer than this code knows (${current})` };\n for (let n = from; n < current; n++) {\n const step = migrations.find((m) => m.from === n);\n if (!step) return { ok: false, reason: `no migration from schema ${n}` };\n doc = { ...step.up(doc), schema: n + 1 };\n }\n return { ok: true, doc, from };\n };\n}\n\n/** Brings a stored document to the current schema (then `parseShopPage` it). */\nexport const migrateShopPage = createMigrator(SHOP_MIGRATIONS, SHOP_SCHEMA_VERSION);\n","// The preview bridge (ADR-007 §5): the composer shows the product's real public page in an iframe of its own route\n// (`?draft=<id>`) and talks to it by `postMessage` — three messages only, every one origin-checked on both sides: `select` (outline\n// a section), `scroll` (bring it into view), `refresh` (the draft changed: reload the data). Nothing else crosses: no document, no\n// script, no style. Both halves are here, tiny and free of React, because the page side must not import the composer.\n\n/** The only messages: the composer to the page. */\nexport type PreviewMessage = { source: \"krizaka-shop-composer\"; type: \"select\" | \"scroll\"; key: string } | { source: \"krizaka-shop-composer\"; type: \"refresh\" };\n\nconst SOURCE = \"krizaka-shop-composer\";\nconst KEY = /^[A-Za-z0-9_-]{1,40}$/;\n\n/** Reads a message event: only if it comes from `origin`, is one of the three messages and carries a well-formed key. */\nexport function readPreviewMessage(event: Pick<MessageEvent, \"origin\" | \"data\">, origin: string): PreviewMessage | null {\n if (event.origin !== origin) return null;\n const d = event.data as Record<string, unknown> | null;\n if (typeof d !== \"object\" || d === null || d.source !== SOURCE) return null;\n if (d.type === \"refresh\") return { source: SOURCE, type: \"refresh\" };\n if ((d.type === \"select\" || d.type === \"scroll\") && typeof d.key === \"string\" && KEY.test(d.key)) return { source: SOURCE, type: d.type, key: d.key };\n return null;\n}\n\n/** The composer's side: posts to the preview's window, addressed to its origin only. */\nexport function postToPreview(target: Pick<Window, \"postMessage\"> | null | undefined, origin: string, message: PreviewMessage): void {\n target?.postMessage(message, origin);\n}\n\n/** The attribute that names a section in the preview page: `<div data-shop-key=\"s_8f2c\">` (a block: the outline is its ring). */\nexport const SHOP_KEY_ATTRIBUTE = \"data-shop-key\";\n\n/**\n * The page's side: outlines the selected section (`data-shop-selected`, drawn by `blocks.css`), scrolls it into view, and calls\n * `onRefresh` when the draft changed. Returns the function that removes it. Only runs in an iframe of the composer's origin.\n */\nexport function connectShopPreview({ composerOrigin, onRefresh, root = document }: { composerOrigin: string; onRefresh?: () => void; root?: Document }): () => void {\n const find = (key: string) => root.querySelector<HTMLElement>(`[${SHOP_KEY_ATTRIBUTE}=\"${key}\"]`);\n const handler = (event: MessageEvent) => {\n // The origin first, before anything else is read from the message.\n if (event.origin !== composerOrigin) return;\n const m = readPreviewMessage(event, composerOrigin);\n if (!m) return;\n if (m.type === \"refresh\") {\n onRefresh?.();\n return;\n }\n for (const selected of root.querySelectorAll<HTMLElement>(\"[data-shop-selected]\")) delete selected.dataset.shopSelected;\n const el = find(m.key);\n if (!el) return;\n el.dataset.shopSelected = \"\";\n if (m.type === \"scroll\") {\n const reduced = typeof matchMedia === \"function\" && matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n el.scrollIntoView({ block: \"center\", behavior: reduced ? \"auto\" : \"smooth\" });\n }\n };\n window.addEventListener(\"message\", handler);\n return () => window.removeEventListener(\"message\", handler);\n}\n","// The starter documents (ADR-007 §4, §8): the five compositions of the ADR as data — a section list and a preset. A\n// product's template becomes one of these; the composer's « Start from » lists them. They hold no price, no text of a\n// shop and no photo: references and rules only.\nimport type { SectionOf, ShopPage } from \"./schema\";\n\nconst s = (key: string) => key;\nconst doc = (preset: string, density: \"compact\" | \"airy\", sections: ShopPage[\"sections\"]): ShopPage => ({\n schema: 1,\n preset: { id: preset, version: 1 },\n density,\n sections,\n});\nconst hero = (variant: \"poster\" | \"split\" | \"banner\" | \"tv\"): SectionOf<\"hero\"> => ({\n key: s(\"s_hero\"),\n type: \"hero\",\n variant,\n settings: { focus: \"center\" },\n blocks: [\n { key: \"b_open\", type: \"fact\", settings: { kind: \"open-now\" } },\n { key: \"b_area\", type: \"fact\", settings: { kind: \"area\" } },\n { key: \"b_score\", type: \"fact\", settings: { kind: \"score\" } },\n ],\n});\nconst menu = (columns: 1 | 2, aside: \"hours\" | \"none\"): SectionOf<\"services\"> => ({\n key: s(\"s_services\"),\n type: \"services\",\n variant: \"menu\",\n settings: { source: \"all\", groupBy: \"category\", columns, aside },\n});\nconst booking = (variant: \"strip\" | \"panel\" | \"sticky\", key: string): SectionOf<\"booking\"> => ({ key, type: \"booking\", variant, settings: { count: 4 } });\nconst gallery = (variant: \"mosaic\" | \"filmstrip\" | \"wall\" | \"grid\", key: string, extra: Partial<Pick<SectionOf<\"gallery\">, \"settings\" | \"blocks\">> = {}): SectionOf<\"gallery\"> => ({\n key,\n type: \"gallery\",\n variant,\n settings: { source: \"all\", texture: \"plaster\" },\n ...extra,\n});\n\n/** The salon, compact: the poster, the next free times, the price board beside the hours, a filmstrip, the reviews. */\nexport const salonCompact = doc(\"salon-vitrine\", \"compact\", [\n hero(\"poster\"),\n booking(\"strip\", \"s_times\"),\n menu(1, \"hours\"),\n gallery(\"filmstrip\", \"s_photos\"),\n { key: \"s_reviews\", type: \"reviews\", variant: \"summary-cards\", settings: { rule: \"best\", count: 2 } },\n booking(\"panel\", \"s_book\"),\n]);\n\n/** The salon, editorial: a split hero, the quote, the two-column menu, the mosaic, the visit. */\nexport const salonEditorial = doc(\"salon-atelier\", \"airy\", [\n hero(\"split\"),\n { key: \"s_story\", type: \"story\", variant: \"quote\", settings: { body: {} } },\n menu(2, \"none\"),\n gallery(\"mosaic\", \"s_photos\"),\n { key: \"s_visit\", type: \"visit\", variant: \"split\", settings: { showPhone: true } },\n booking(\"panel\", \"s_book\"),\n]);\n\n/** The salon, gallery first: the sign and the old TV, the mosaic, the menu, the wall. */\nexport const salonGallery = doc(\"salon-atelier\", \"compact\", [\n hero(\"tv\"),\n gallery(\"mosaic\", \"s_photos\"),\n menu(1, \"hours\"),\n gallery(\"wall\", \"s_wall\", { blocks: [{ key: \"b_note\", type: \"note\", settings: { text: \"Merci Jade !\", signature: \"Nadia\" } }] }),\n booking(\"sticky\", \"s_sticky\"),\n]);\n\n/** The dog walker, route: the poster, the areas, the menu, the next free times, a filmstrip. */\nexport const petsRoute = doc(\"pets-canal\", \"compact\", [\n hero(\"poster\"),\n { key: \"s_visit\", type: \"visit\", variant: \"map\", settings: { showPhone: false } },\n menu(1, \"none\"),\n booking(\"strip\", \"s_times\"),\n gallery(\"filmstrip\", \"s_photos\"),\n]);\n\n/** The dog walker, journal: a hero on paper, the notebook wall, the menu, the TV with notes. */\nexport const petsJournal = doc(\"pets-carnet\", \"airy\", [\n hero(\"split\"),\n gallery(\"wall\", \"s_wall\", { settings: { source: \"all\", texture: \"ridge\" } }),\n menu(1, \"none\"),\n { key: \"s_tv\", type: \"video\", variant: \"tv\", settings: { cabinet: \"portable\" } },\n booking(\"panel\", \"s_book\"),\n]);\n\nexport const shopStarters = { salonCompact, salonEditorial, salonGallery, petsRoute, petsJournal } as const;\nexport type ShopStarterId = keyof typeof shopStarters;\n"],"mappings":";;;;;;;;;;AAGA,YAAYA,QAAO;;;ACAnB,YAAYC,QAAO;;;ACHnB,YAAY,OAAO;AAGZ,IAAM,gBAAkB,SAAO;AAAA,EACpC,IAAM,WAAW,SAAO,EAAE,MAAQ,YAAU,GAAG,CAAC,CAAC;AAAA,EACjD,IAAM,WAAW,SAAO,EAAE,MAAQ,YAAU,GAAG,CAAC,CAAC;AACnD,CAAC;;;ADsCD,IAAM,MAAQ,UAAO,EAAE,MAAQ,aAAU,CAAC,GAAK,aAAU,EAAE,GAAK,SAAM,oBAAoB,kCAAkC,CAAC;AAGtH,SAAS,cACd,MACiC;AACjC,QAAM,aAAa,KAAK,UAAU,OAAO,KAAK,KAAK,MAAM,EAAE,SAAS,IAC9D;AAAA,IACA;AAAA,IACA,OAAO,QAAQ,KAAK,MAAM,EAAE;AAAA,MAAI,CAAC,CAAC,MAAM,QAAQ,MAC5C,UAAO,EAAE,KAAK,MAAQ,WAAQ,IAAI,GAAG,UAAU,MAAQ,YAAW,UAAS,UAAO,GAAG,aAAa,CAAC,EAAE,CAAC;AAAA,IAC1G;AAAA,EACF,IACA;AACJ,QAAM,SAAS,aACT,YAAW,SAAM,UAAU,EAAE,MAAQ,aAAU,YAAY,MAAM,CAAC,CAAC,IACnE,YAAW,SAAQ,SAAM,CAAC,EAAE,MAAQ,aAAU,CAAC,CAAC,CAAC;AACvD,QAAM,OAAS,UAAO;AAAA,IACpB;AAAA,IACA,MAAQ,WAAQ,KAAK,IAAI;AAAA,IACzB,SAAW,QAAK,KAAK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,SAAS,QAAQ;AAC3B,CAAC;AAGM,IAAM,eAAe,IAAI,iBAAiB,WAAW;AAAA,EAC1D,KAAK,IAAI;AAAA,EACT,QAAQ,UAAU,UAAU;AAAA,EAC5B,KAAK,GAAG,OAAO;AAAA,EACf,QAAQ,QAAQ,UAAU,EAAE,QAAQ,CAAC,EAAE,KAAK,UAAU,MAAM,QAAQ,UAAU,EAAE,MAAM,gBAAgB,WAAW,QAAQ,EAAE,CAAC,EAAE,CAAC;AAAA,EAC/H,QAAQ,UAAU,UAAU;AAC9B,CAAC;AAGM,IAAM,YAAY,IAAI,cAAc,WAAW;AAAA,EACpD,KAAK,QAAQ;AAAA,EACb,EAAE,KAAK,WAAW,MAAM,SAAS,SAAS,OAAO,UAAU,EAAE,WAAW,MAAM,EAAE;AAAA,EAChF,KAAK,GAAG,MAAM;AAAA,EACd,QAAQ,SAAS,SAAS;AAAA,EAC1B,QAAQ,aAAa,UAAU;AACjC,CAAC;AAGM,IAAM,cAAc,IAAI,eAAe,QAAQ;AAAA,EACpD,KAAK,OAAO;AAAA,EACZ,QAAQ,QAAQ,UAAU,EAAE,UAAU,EAAE,QAAQ,OAAO,SAAS,QAAQ,EAAE,CAAC;AAAA,EAC3E,KAAK,GAAG,MAAM;AAAA,EACd,EAAE,KAAK,QAAQ,MAAM,SAAS,SAAS,MAAM,UAAU,EAAE,SAAS,WAAW,EAAE;AAAA,EAC/E,QAAQ,SAAS,QAAQ;AAC3B,CAAC;AAEM,IAAM,eAAe,EAAE,cAAc,gBAAgB,cAAc,WAAW,YAAY;","names":["z","z","z","s","doc","key","key"]}
1
+ {"version":3,"sources":["../src/shop/catalogue.ts","../src/shop/define.ts","../src/shop/text.ts","../src/shop/schema.ts","../src/shop/migrate.ts","../src/shop/preview.ts","../src/shop/starters.ts"],"sourcesContent":["// The catalogue of section types (ADR-007 §3): each with its variants, its settings and the blocks it allows, as zod\n// schemas — the renderer, the validator and the composer's forms read the same definitions. The first variant of a type is\n// its default. Settings hold references and rules (ids, a source, a count), never a price or a text of the shop.\nimport * as z from \"zod/mini\";\n\nimport { defineSection } from \"./define\";\nimport { SHOP_LIMITS } from \"./limits\";\nimport { localizedText } from \"./text\";\n\n/** A reference to something the product holds (a service, a photo, a member): an opaque id. */\nconst ref = z.string().check(z.minLength(1), z.maxLength(80));\nconst short = z.string().check(z.minLength(1), z.maxLength(140));\nconst url = z.string().check(z.maxLength(300), z.regex(/^https:\\/\\//, \"an https address\"));\nconst isoDay = z.string().check(z.regex(/^\\d{4}-\\d{2}-\\d{2}$/, \"a day (YYYY-MM-DD)\"));\nconst source = z.enum([\"all\", \"pick\"]);\n/** One of a few numbers. */\nconst oneOf = <const N extends readonly [number, number, ...number[]]>(...n: N) => z.union(n.map((v) => z.literal(v)) as unknown as [z.ZodMiniLiteral<N[number]>, z.ZodMiniLiteral<N[number]>]);\n\nexport const platforms = [\"tiktok\", \"youtube-shorts\", \"instagram\"] as const;\n\nexport const heroSection = defineSection({\n type: \"hero\",\n variants: [\"poster\", \"split\", \"banner\", \"tv\"],\n settings: z.object({\n /** The cover: a media id. Absent, the product's default for the trade. */\n media: z.optional(ref),\n /** Where the photo is cropped to when the box is not its ratio. */\n focus: z.enum([\"center\", \"top\", \"bottom\"]),\n }),\n settingsDefault: { focus: \"center\" },\n blocks: { fact: z.object({ kind: z.enum([\"open-now\", \"area\", \"score\"]) }) },\n});\n\nexport const servicesSection = defineSection({\n type: \"services\",\n variants: [\"menu\", \"cards\", \"index\", \"carousel\"],\n settings: z.object({\n /** `all` the shop's services, or `pick` the ones the `service` blocks name, in their order. */\n source,\n groupBy: z.enum([\"category\", \"none\"]),\n /** `menu` only: two columns when nothing sits beside it. */\n columns: oneOf(1, 2),\n /** `menu` only: the shop's hours, team and address beside the list (the host draws them from its own data). */\n aside: z.enum([\"hours\", \"none\"]),\n }),\n settingsDefault: { source: \"all\", groupBy: \"category\", columns: 1, aside: \"hours\" },\n blocks: { service: z.object({ serviceId: ref }) },\n refine: (section, issue) => {\n if (section.settings.source === \"pick\" && (section.blocks ?? []).length === 0) issue([\"blocks\"], \"pick at least one service\");\n if (section.variant === \"cards\" && (section.blocks ?? []).length > SHOP_LIMITS.cards) issue([\"blocks\"], `at most ${SHOP_LIMITS.cards} cards`);\n },\n});\n\nexport const bookingSection = defineSection({\n type: \"booking\",\n variants: [\"strip\", \"panel\", \"closing\", \"sticky\"],\n settings: z.object({\n /** A service the times are for; absent, the next free times of any service. */\n serviceId: z.optional(ref),\n /** `strip`: how many times it shows. */\n count: oneOf(3, 4, 6),\n }),\n settingsDefault: { count: 4 },\n});\n\nexport const gallerySection = defineSection({\n type: \"gallery\",\n variants: [\"mosaic\", \"filmstrip\", \"wall\", \"grid\"],\n settings: z.object({\n source,\n /** `wall` only. */\n texture: z.enum([\"plaster\", \"brick\", \"ridge\", \"zellige\"]),\n }),\n settingsDefault: { source: \"all\", texture: \"plaster\" },\n blocks: {\n photo: z.object({ mediaId: ref, caption: z.optional(short) }),\n note: z.object({ text: short, signature: z.optional(z.string().check(z.maxLength(40))) }),\n sign: z.object({}),\n },\n refine: (section, issue) => {\n const photos = (section.blocks ?? []).filter((b) => b.type === \"photo\").length;\n if (photos > SHOP_LIMITS.photos) issue([\"blocks\"], `at most ${SHOP_LIMITS.photos} photos`);\n },\n});\n\nexport const videoSection = defineSection({\n type: \"video\",\n variants: [\"tv\", \"shorts\"],\n settings: z.object({ cabinet: z.enum([\"cabinet\", \"portable\"]), channel: z.optional(z.string().check(z.maxLength(32))) }),\n settingsDefault: { cabinet: \"cabinet\" },\n blocks: { reel: z.object({ platform: z.enum(platforms), url }) },\n});\n\nexport const reviewsSection = defineSection({\n type: \"reviews\",\n variants: [\"summary-cards\", \"quote\", \"strip\"],\n settings: z.object({ rule: z.enum([\"best\", \"latest\"]), count: oneOf(1, 2, 3) }),\n settingsDefault: { rule: \"best\", count: 2 },\n});\n\nexport const bulletinSection = defineSection({\n type: \"bulletin\",\n variants: [\"board\", \"banner\"],\n settings: z.object({}),\n settingsDefault: {},\n blocks: { flyer: z.object({ text: short, signature: z.optional(z.string().check(z.maxLength(40))), until: z.optional(isoDay) }) },\n refine: (section, issue) => {\n if ((section.blocks ?? []).length > SHOP_LIMITS.flyers) issue([\"blocks\"], `at most ${SHOP_LIMITS.flyers} flyers`);\n },\n});\n\nexport const teamSection = defineSection({\n type: \"team\",\n variants: [\"row\", \"cards\"],\n settings: z.object({ source }),\n settingsDefault: { source: \"all\" },\n blocks: { member: z.object({ memberId: ref }) },\n});\n\nexport const visitSection = defineSection({\n type: \"visit\",\n variants: [\"card\", \"map\", \"split\"],\n settings: z.object({ showPhone: z.boolean() }),\n settingsDefault: { showPhone: true },\n});\n\nexport const storySection = defineSection({\n type: \"story\",\n variants: [\"quote\", \"owner\"],\n settings: z.object({ body: localizedText }),\n settingsDefault: { body: {} },\n});\n\nexport const socialSection = defineSection({\n type: \"social\",\n variants: [\"links\", \"facade\"],\n settings: z.object({}),\n settingsDefault: {},\n blocks: { link: z.object({ platform: z.enum(platforms), url }) },\n});\n\nexport const faqSection = defineSection({\n type: \"faq\",\n variants: [\"list\"],\n settings: z.object({}),\n settingsDefault: {},\n blocks: { question: z.object({ question: localizedText, answer: localizedText }) },\n});\n\nexport const policiesSection = defineSection({\n type: \"policies\",\n variants: [\"inline\"],\n settings: z.object({ show: z.array(z.enum([\"cancellation\", \"prices\", \"booking-window\"])).check(z.maxLength(3)) }),\n settingsDefault: { show: [\"cancellation\", \"prices\", \"booking-window\"] },\n});\n\n/** Every section type, in the order the composer lists them. */\nexport const SECTION_DEFINITIONS = [\n heroSection, servicesSection, bookingSection, gallerySection, videoSection, reviewsSection, bulletinSection,\n teamSection, visitSection, storySection, socialSection, faqSection, policiesSection,\n] as const;\n\nexport type SectionDefinition = (typeof SECTION_DEFINITIONS)[number];\nexport type SectionType = SectionDefinition[\"type\"];\nexport const SECTION_TYPES = SECTION_DEFINITIONS.map((d) => d.type) as readonly SectionType[];\n\n/** The definition of a type. */\nexport function sectionDefinition<T extends SectionType>(type: T): Extract<SectionDefinition, { type: T }> {\n return SECTION_DEFINITIONS.find((d) => d.type === type) as Extract<SectionDefinition, { type: T }>;\n}\n","// `defineSection` (ADR-007 §1): one section type = its variants, the zod schema of its settings, the blocks it allows\n// (each a zod schema) and the checks that need the whole section. It builds the zod schema of a section of this type, so\n// the renderer, the validator and the composer's generated forms agree.\nimport * as z from \"zod/mini\";\n\nimport { SHOP_LIMITS } from \"./limits\";\nimport { localizedText } from \"./text\";\n\ntype Shape = z.ZodMiniObject;\ntype BlockShapes = Record<string, Shape>;\n\n/** What a section of a type is, once parsed. */\nexport type ParsedSection<T extends string, V extends string, S extends Shape, B extends BlockShapes> = {\n key: string;\n type: T;\n variant: V;\n disabled?: boolean | undefined;\n settings: z.output<S>;\n text?: { title?: z.output<typeof localizedText> | undefined; lead?: z.output<typeof localizedText> | undefined } | undefined;\n blocks?: { [K in keyof B & string]: { key: string; type: K; settings: z.output<B[K]>; text?: Record<string, z.output<typeof localizedText>> | undefined } }[keyof B & string][] | undefined;\n};\n\nexport type SectionSpec<T extends string, V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes> = {\n /** The type's name: the `type` of a section. */\n type: T;\n /** Its variants; the first is the default one. */\n variants: V;\n /** The zod schema of its settings. */\n settings: S;\n /** The settings a new section starts with. */\n settingsDefault: z.input<S>;\n /** The block types it allows, each with the zod schema of its settings. None: the section has no blocks. */\n blocks?: B;\n /** The checks that read the whole section (a count, a combination); `issue(path, message)` refuses it. */\n refine?: (section: ParsedSection<T, V[number], S, B>, issue: (path: (string | number)[], message: string) => void) => void;\n};\n\nexport type SectionDefinitionOf<T extends string, V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes> = SectionSpec<T, V, S, B> & {\n readonly defaultVariant: V[number];\n readonly blockTypes: readonly (keyof B & string)[];\n /** The zod schema of a section of this type. */\n readonly schema: z.ZodMiniType<ParsedSection<T, V[number], S, B>>;\n};\n\nconst key = z.string().check(z.minLength(1), z.maxLength(40), z.regex(/^[A-Za-z0-9_-]+$/, \"a key (letters, digits, - and _)\"));\n\n/** Defines a section type. */\nexport function defineSection<const T extends string, const V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes = Record<never, never>>(\n spec: SectionSpec<T, V, S, B>,\n): SectionDefinitionOf<T, V, S, B> {\n const blockUnion = spec.blocks && Object.keys(spec.blocks).length > 0\n ? z.discriminatedUnion(\n \"type\",\n Object.entries(spec.blocks).map(([type, settings]) =>\n z.object({ key, type: z.literal(type), settings, text: z.optional(z.record(z.string(), localizedText)) }),\n ) as unknown as [z.ZodMiniObject, ...z.ZodMiniObject[]],\n )\n : undefined;\n const blocks = blockUnion\n ? z.optional(z.array(blockUnion).check(z.maxLength(SHOP_LIMITS.blocks)))\n : z.optional(z.array(z.never()).check(z.maxLength(0)));\n const base = z.object({\n key,\n type: z.literal(spec.type),\n variant: z.enum(spec.variants),\n disabled: z.optional(z.boolean()),\n settings: spec.settings,\n text: z.optional(z.object({ title: z.optional(localizedText), lead: z.optional(localizedText) })),\n blocks,\n });\n const schema = base.check(\n z.superRefine((value, ctx) => {\n spec.refine?.(value as never, (path, message) => ctx.issues.push({ code: \"custom\", message, path, input: value }));\n }),\n );\n return Object.freeze({\n ...spec,\n defaultVariant: spec.variants[0],\n blockTypes: Object.keys(spec.blocks ?? {}) as (keyof B & string)[],\n schema: schema as unknown as z.ZodMiniType<ParsedSection<T, V[number], S, B>>,\n });\n}\n","import * as z from \"zod/mini\";\n\n/** The owner's words, in each language; the product's message is the fallback when a language is absent. */\nexport const localizedText = z.object({\n fr: z.optional(z.string().check(z.maxLength(600))),\n en: z.optional(z.string().check(z.maxLength(600))),\n});\nexport type LocalizedText = z.output<typeof localizedText>;\n","// The document a shop page is (ADR-007 §1): an ordered list of sections, each a `type` × `variant` with its settings and\n// its blocks. Parsed on write (a route refuses an invalid one, with the path) and on read. The storage is the product's.\nimport * as z from \"zod/mini\";\n\nimport { SECTION_DEFINITIONS, type SectionType } from \"./catalogue\";\nimport { SHOP_LIMITS } from \"./limits\";\n\n/** The version of the document's format; migrations are pure functions schema n → n + 1 (`migrate.ts`). */\n// @fixed: ADR-007 §1 — the format version of the code, bumped with a migration; not a shop setting.\nexport const SHOP_SCHEMA_VERSION = 1;\n\n/** A look preset by id and version (`@krizaka/tokens`): `salon-atelier`. The mode is the visitor's, never stored. */\nexport const presetRef = z.object({\n id: z.string().check(z.regex(/^[a-z]+-[a-z]+$/, \"a preset id (trade-name)\")),\n version: z.int().check(z.minimum(1)),\n});\n\nconst sectionUnion = z.discriminatedUnion(\n \"type\",\n SECTION_DEFINITIONS.map((d) => d.schema) as unknown as [z.ZodMiniObject, ...z.ZodMiniObject[]],\n);\n\nexport const shopPageSchema = z\n .object({\n schema: z.literal(SHOP_SCHEMA_VERSION),\n preset: presetRef,\n /** Overrides the preset's density. */\n density: z.optional(z.enum([\"compact\", \"airy\"])),\n sections: z.array(sectionUnion).check(z.minLength(1), z.maxLength(SHOP_LIMITS.sections)),\n })\n .check(\n z.superRefine((page, ctx) => {\n const add = (path: (string | number)[], message: string) => ctx.issues.push({ code: \"custom\", message, path, input: page });\n const seen = new Set<string>();\n page.sections.forEach((section, i) => {\n const s = section as { key: string; type: string };\n if (seen.has(s.key)) add([\"sections\", i, \"key\"], `the key \"${s.key}\" is used twice`);\n seen.add(s.key);\n if (s.type === \"hero\" && i !== 0) add([\"sections\", i, \"type\"], \"the hero is the first section, and there is only one\");\n });\n }),\n );\n\n/** A section of any type, as parsed: its `settings` and `blocks` are the type's own. */\nexport type Section = z.output<(typeof SECTION_DEFINITIONS)[number][\"schema\"]>;\nexport type ShopPage = {\n schema: typeof SHOP_SCHEMA_VERSION;\n preset: z.output<typeof presetRef>;\n density?: \"compact\" | \"airy\" | undefined;\n sections: Section[];\n};\nexport type SectionOf<T extends SectionType> = Extract<Section, { type: T }>;\n\nexport type ShopPageIssue = { path: string; message: string };\nexport type ShopPageResult = { ok: true; page: ShopPage } | { ok: false; issues: ShopPageIssue[] };\n\n/** Validates a document; an invalid one answers every issue with its path (`sections.2.variant`), for a 422. */\nexport function parseShopPage(input: unknown): ShopPageResult {\n const result = shopPageSchema.safeParse(input);\n if (result.success) return { ok: true, page: result.data as unknown as ShopPage };\n return { ok: false, issues: result.error.issues.map((i) => ({ path: i.path.join(\".\"), message: i.message })) };\n}\n","// Migrations of the document (ADR-007 §1): pure functions schema n → n + 1, applied in memory when an older document is\n// read; the product writes the migrated one back on the next save. A newer document than this code knows is refused.\nimport { SHOP_SCHEMA_VERSION } from \"./schema\";\n\nexport type ShopMigration = {\n /** The schema it reads. */\n from: number;\n /** Pure: returns a new document, never mutates. */\n up: (doc: Record<string, unknown>) => Record<string, unknown>;\n};\n\n/** The migrations of the document, oldest first. Schema 1 is the first format: none yet. */\nexport const SHOP_MIGRATIONS: readonly ShopMigration[] = [];\n\nexport type MigrationResult = { ok: true; doc: Record<string, unknown>; from: number } | { ok: false; reason: string };\n\n/** A migrator over a list of migrations and a current version (the shop's own are `migrateShopPage`). */\nexport function createMigrator(migrations: readonly ShopMigration[], current: number) {\n return (input: unknown): MigrationResult => {\n if (typeof input !== \"object\" || input === null || Array.isArray(input)) return { ok: false, reason: \"a document is an object\" };\n let doc = input as Record<string, unknown>;\n const from = doc.schema;\n if (typeof from !== \"number\" || !Number.isInteger(from) || from < 1) return { ok: false, reason: \"the document has no schema version\" };\n if (from > current) return { ok: false, reason: `schema ${from} is newer than this code knows (${current})` };\n for (let n = from; n < current; n++) {\n const step = migrations.find((m) => m.from === n);\n if (!step) return { ok: false, reason: `no migration from schema ${n}` };\n doc = { ...step.up(doc), schema: n + 1 };\n }\n return { ok: true, doc, from };\n };\n}\n\n/** Brings a stored document to the current schema (then `parseShopPage` it). */\nexport const migrateShopPage = createMigrator(SHOP_MIGRATIONS, SHOP_SCHEMA_VERSION);\n","// The preview bridge (ADR-007 §5): the composer shows the product's real public page in an iframe of its own route\n// (`?draft=<id>`) and talks to it by `postMessage` — three messages only, every one origin-checked on both sides: `select` (outline\n// a section), `scroll` (bring it into view), `refresh` (the draft changed: reload the data). Nothing else crosses: no document, no\n// script, no style. Both halves are here, tiny and free of React, because the page side must not import the composer.\n\n/** The only messages: the composer to the page. */\nexport type PreviewMessage = { source: \"krizaka-shop-composer\"; type: \"select\" | \"scroll\"; key: string } | { source: \"krizaka-shop-composer\"; type: \"refresh\" };\n\nconst SOURCE = \"krizaka-shop-composer\";\nconst KEY = /^[A-Za-z0-9_-]{1,40}$/;\n\n/** Reads a message event: only if it comes from `origin`, is one of the three messages and carries a well-formed key. */\nexport function readPreviewMessage(event: Pick<MessageEvent, \"origin\" | \"data\">, origin: string): PreviewMessage | null {\n if (event.origin !== origin) return null;\n const d = event.data as Record<string, unknown> | null;\n if (typeof d !== \"object\" || d === null || d.source !== SOURCE) return null;\n if (d.type === \"refresh\") return { source: SOURCE, type: \"refresh\" };\n if ((d.type === \"select\" || d.type === \"scroll\") && typeof d.key === \"string\" && KEY.test(d.key)) return { source: SOURCE, type: d.type, key: d.key };\n return null;\n}\n\n/** The composer's side: posts to the preview's window, addressed to its origin only. */\nexport function postToPreview(target: Pick<Window, \"postMessage\"> | null | undefined, origin: string, message: PreviewMessage): void {\n target?.postMessage(message, origin);\n}\n\n/** The attribute that names a section in the preview page: `<div data-shop-key=\"s_8f2c\">` (a block: the outline is its ring). */\nexport const SHOP_KEY_ATTRIBUTE = \"data-shop-key\";\n\n/**\n * The page's side: outlines the selected section (`data-shop-selected`, drawn by `blocks.css`), scrolls it into view, and calls\n * `onRefresh` when the draft changed. Returns the function that removes it. Only runs in an iframe of the composer's origin.\n */\nexport function connectShopPreview({ composerOrigin, onRefresh, root = document }: { composerOrigin: string; onRefresh?: () => void; root?: Document }): () => void {\n const find = (key: string) => root.querySelector<HTMLElement>(`[${SHOP_KEY_ATTRIBUTE}=\"${key}\"]`);\n const handler = (event: MessageEvent) => {\n // The origin first, before anything else is read from the message.\n if (event.origin !== composerOrigin) return;\n const m = readPreviewMessage(event, composerOrigin);\n if (!m) return;\n if (m.type === \"refresh\") {\n onRefresh?.();\n return;\n }\n for (const selected of root.querySelectorAll<HTMLElement>(\"[data-shop-selected]\")) delete selected.dataset.shopSelected;\n const el = find(m.key);\n if (!el) return;\n el.dataset.shopSelected = \"\";\n if (m.type === \"scroll\") {\n const reduced = typeof matchMedia === \"function\" && matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n el.scrollIntoView({ block: \"center\", behavior: reduced ? \"auto\" : \"smooth\" });\n }\n };\n window.addEventListener(\"message\", handler);\n return () => window.removeEventListener(\"message\", handler);\n}\n","// The starter documents (ADR-007 §4, §8): the five compositions of the ADR as data — a section list and a preset. A\n// product's template becomes one of these; the composer's « Start from » lists them. They hold no price, no text of a\n// shop and no photo: references and rules only.\nimport type { SectionOf, ShopPage } from \"./schema\";\n\nconst s = (key: string) => key;\nconst doc = (preset: string, density: \"compact\" | \"airy\", sections: ShopPage[\"sections\"]): ShopPage => ({\n schema: 1,\n preset: { id: preset, version: 1 },\n density,\n sections,\n});\nconst hero = (variant: \"poster\" | \"split\" | \"banner\" | \"tv\"): SectionOf<\"hero\"> => ({\n key: s(\"s_hero\"),\n type: \"hero\",\n variant,\n settings: { focus: \"center\" },\n blocks: [\n { key: \"b_open\", type: \"fact\", settings: { kind: \"open-now\" } },\n { key: \"b_area\", type: \"fact\", settings: { kind: \"area\" } },\n { key: \"b_score\", type: \"fact\", settings: { kind: \"score\" } },\n ],\n});\nconst menu = (columns: 1 | 2, aside: \"hours\" | \"none\"): SectionOf<\"services\"> => ({\n key: s(\"s_services\"),\n type: \"services\",\n variant: \"menu\",\n settings: { source: \"all\", groupBy: \"category\", columns, aside },\n});\nconst booking = (variant: \"strip\" | \"panel\" | \"sticky\", key: string): SectionOf<\"booking\"> => ({ key, type: \"booking\", variant, settings: { count: 4 } });\nconst gallery = (variant: \"mosaic\" | \"filmstrip\" | \"wall\" | \"grid\", key: string, extra: Partial<Pick<SectionOf<\"gallery\">, \"settings\" | \"blocks\">> = {}): SectionOf<\"gallery\"> => ({\n key,\n type: \"gallery\",\n variant,\n settings: { source: \"all\", texture: \"plaster\" },\n ...extra,\n});\n\n/** The salon, compact: the poster, the next free times, the price board beside the hours, a filmstrip, the reviews. */\nexport const salonCompact = doc(\"salon-vitrine\", \"compact\", [\n hero(\"poster\"),\n booking(\"strip\", \"s_times\"),\n menu(1, \"hours\"),\n gallery(\"filmstrip\", \"s_photos\"),\n { key: \"s_reviews\", type: \"reviews\", variant: \"summary-cards\", settings: { rule: \"best\", count: 2 } },\n booking(\"panel\", \"s_book\"),\n]);\n\n/** The salon, editorial: a split hero, the quote, the two-column menu, the mosaic, the visit. */\nexport const salonEditorial = doc(\"salon-atelier\", \"airy\", [\n hero(\"split\"),\n { key: \"s_story\", type: \"story\", variant: \"quote\", settings: { body: {} } },\n menu(2, \"none\"),\n gallery(\"mosaic\", \"s_photos\"),\n { key: \"s_visit\", type: \"visit\", variant: \"split\", settings: { showPhone: true } },\n booking(\"panel\", \"s_book\"),\n]);\n\n/** The salon, gallery first: the sign and the old TV, the mosaic, the menu, the wall. */\nexport const salonGallery = doc(\"salon-atelier\", \"compact\", [\n hero(\"tv\"),\n gallery(\"mosaic\", \"s_photos\"),\n menu(1, \"hours\"),\n gallery(\"wall\", \"s_wall\", { blocks: [{ key: \"b_note\", type: \"note\", settings: { text: \"Merci Jade !\", signature: \"Nadia\" } }] }),\n booking(\"sticky\", \"s_sticky\"),\n]);\n\n/** The dog walker, route: the poster, the areas, the menu, the next free times, a filmstrip. */\nexport const petsRoute = doc(\"pets-canal\", \"compact\", [\n hero(\"poster\"),\n { key: \"s_visit\", type: \"visit\", variant: \"map\", settings: { showPhone: false } },\n menu(1, \"none\"),\n booking(\"strip\", \"s_times\"),\n gallery(\"filmstrip\", \"s_photos\"),\n]);\n\n/** The dog walker, journal: a hero on paper, the notebook wall, the menu, the TV with notes. */\nexport const petsJournal = doc(\"pets-carnet\", \"airy\", [\n hero(\"split\"),\n gallery(\"wall\", \"s_wall\", { settings: { source: \"all\", texture: \"ridge\" } }),\n menu(1, \"none\"),\n { key: \"s_tv\", type: \"video\", variant: \"tv\", settings: { cabinet: \"portable\" } },\n booking(\"panel\", \"s_book\"),\n]);\n\nexport const shopStarters = { salonCompact, salonEditorial, salonGallery, petsRoute, petsJournal } as const;\nexport type ShopStarterId = keyof typeof shopStarters;\n"],"mappings":";;;;;;;;;;AAGA,YAAYA,QAAO;;;ACAnB,YAAYC,QAAO;;;ACHnB,YAAY,OAAO;AAGZ,IAAM,gBAAkB,SAAO;AAAA,EACpC,IAAM,WAAW,SAAO,EAAE,MAAQ,YAAU,GAAG,CAAC,CAAC;AAAA,EACjD,IAAM,WAAW,SAAO,EAAE,MAAQ,YAAU,GAAG,CAAC,CAAC;AACnD,CAAC;;;ADsCD,IAAM,MAAQ,UAAO,EAAE,MAAQ,aAAU,CAAC,GAAK,aAAU,EAAE,GAAK,SAAM,oBAAoB,kCAAkC,CAAC;AAGtH,SAAS,cACd,MACiC;AACjC,QAAM,aAAa,KAAK,UAAU,OAAO,KAAK,KAAK,MAAM,EAAE,SAAS,IAC9D;AAAA,IACA;AAAA,IACA,OAAO,QAAQ,KAAK,MAAM,EAAE;AAAA,MAAI,CAAC,CAAC,MAAM,QAAQ,MAC5C,UAAO,EAAE,KAAK,MAAQ,WAAQ,IAAI,GAAG,UAAU,MAAQ,YAAW,UAAS,UAAO,GAAG,aAAa,CAAC,EAAE,CAAC;AAAA,IAC1G;AAAA,EACF,IACA;AACJ,QAAM,SAAS,aACT,YAAW,SAAM,UAAU,EAAE,MAAQ,aAAU,YAAY,MAAM,CAAC,CAAC,IACnE,YAAW,SAAQ,SAAM,CAAC,EAAE,MAAQ,aAAU,CAAC,CAAC,CAAC;AACvD,QAAM,OAAS,UAAO;AAAA,IACpB;AAAA,IACA,MAAQ,WAAQ,KAAK,IAAI;AAAA,IACzB,SAAW,QAAK,KAAK,QAAQ;AAAA,IAC7B,UAAY,YAAW,WAAQ,CAAC;AAAA,IAChC,UAAU,KAAK;AAAA,IACf,MAAQ,YAAW,U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I;AAAA,EACT,QAAQ,UAAU,UAAU;AAAA,EAC5B,KAAK,GAAG,OAAO;AAAA,EACf,QAAQ,QAAQ,UAAU,EAAE,QAAQ,CAAC,EAAE,KAAK,UAAU,MAAM,QAAQ,UAAU,EAAE,MAAM,gBAAgB,WAAW,QAAQ,EAAE,CAAC,EAAE,CAAC;AAAA,EAC/H,QAAQ,UAAU,UAAU;AAC9B,CAAC;AAGM,IAAM,YAAY,IAAI,cAAc,WAAW;AAAA,EACpD,KAAK,QAAQ;AAAA,EACb,EAAE,KAAK,WAAW,MAAM,SAAS,SAAS,OAAO,UAAU,EAAE,WAAW,MAAM,EAAE;AAAA,EAChF,KAAK,GAAG,MAAM;AAAA,EACd,QAAQ,SAAS,SAAS;AAAA,EAC1B,QAAQ,aAAa,UAAU;AACjC,CAAC;AAGM,IAAM,cAAc,IAAI,eAAe,QAAQ;AAAA,EACpD,KAAK,OAAO;AAAA,EACZ,QAAQ,QAAQ,UAAU,EAAE,UAAU,EAAE,QAAQ,OAAO,SAAS,QAAQ,EAAE,CAAC;AAAA,EAC3E,KAAK,GAAG,MAAM;AAAA,EACd,EAAE,KAAK,QAAQ,MAAM,SAAS,SAAS,MAAM,UAAU,EAAE,SAAS,WAAW,EAAE;AAAA,EAC/E,QAAQ,SAAS,QAAQ;AAC3B,CAAC;AAEM,IAAM,eAAe,EAAE,cAAc,gBAAgB,cAAc,WAAW,YAAY;","names":["z","z","z","s","doc","key","key"]}
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  ChevronGlyph
4
- } from "./chunk-6BMKLAZ7.js";
4
+ } from "./chunk-Z47KIPCT.js";
5
5
  import {
6
6
  DropdownMenu
7
7
  } from "./chunk-OGWB76BR.js";
@@ -11,6 +11,10 @@ import "./chunk-NSLXEDIS.js";
11
11
  import * as React from "react";
12
12
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13
13
  var matching = (options, needle, value) => options.filter((o) => o.label.toLocaleLowerCase().includes(needle) || value.includes(o.value));
14
+ function OptionChip({ option, on, full, onToggle }) {
15
+ const props = { selected: on, disabled: !on && full, onSelectedChange: onToggle };
16
+ return option.marker ? /* @__PURE__ */ jsx(TagChip, { marker: option.marker, ...props, children: option.label }) : /* @__PURE__ */ jsx(Chip, { ...props, children: option.label });
17
+ }
14
18
  function TagSelector({
15
19
  label,
16
20
  options,
@@ -51,11 +55,7 @@ function TagSelector({
51
55
  const listId = React.useId();
52
56
  return /* @__PURE__ */ jsxs("div", { className: ["flex flex-col gap-2", className].filter(Boolean).join(" "), children: [
53
57
  /* @__PURE__ */ jsxs("div", { role: "group", "aria-label": label, id: listId, className: "flex flex-wrap gap-2", children: [
54
- shown.map((option) => {
55
- const on = value.includes(option.value);
56
- const props = { selected: on, disabled: !on && full, onSelectedChange: (next) => toggle(option, next) };
57
- return option.marker ? /* @__PURE__ */ jsx(TagChip, { marker: option.marker, ...props, children: option.label }, option.value) : /* @__PURE__ */ jsx(Chip, { ...props, children: option.label }, option.value);
58
- }),
58
+ shown.map((option) => /* @__PURE__ */ jsx(OptionChip, { option, on: value.includes(option.value), full, onToggle: (next) => toggle(option, next) }, option.value)),
59
59
  creatable && needle && shown.length === 0 && !canCreate && emptyLabel ? /* @__PURE__ */ jsx("p", { className: "m-0 text-xs text-fg-secondary", children: emptyLabel }) : null
60
60
  ] }),
61
61
  creatable ? /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/tag-selector/tag-selector.tsx"],"sourcesContent":["// Client. Interests, languages, a workspace's tags: toggle chips with a limit and a count; once it is reached the others\n// rest (disabled) and the count says so. An option with a `marker` is a tag with a colour beside its name (`TagChip`).\n// `creatable` adds a field: Enter takes the typed word — the tag of that name if it exists, else a new one the host creates\n// (`onCreate`, with the marker chosen from the closed palette) — and the typed word narrows the tags offered.\nimport * as React from \"react\";\n\nimport { Chip, type Marker, MarkerPicker, TagChip } from \"../chip\";\n\nexport type TagOption = {\n value: string;\n label: string;\n /** A tag's colour: a name of the closed palette (`@krizaka/organize` `MARKERS`). Without it, a plain chip. */\n marker?: Marker;\n};\n\ntype CreatableProps = {\n /** Adds a field: Enter chooses the tag typed, or asks the host to create it. */\n creatable?: boolean;\n /** Called with the new name (trimmed, as typed) and the marker chosen; the host creates the tag (it may refuse), adds the option and chooses it. */\n onCreate?: (name: string, marker: Marker) => void;\n /** The field's accessible name (\"Add a tag\"), passed translated. */\n inputLabel?: string;\n /** The field's placeholder, passed translated. */\n placeholder?: string;\n /** The create button: `(name) => \"Create “\" + name + \"”\"`, passed translated. */\n createLabel?: (name: string) => string;\n /** The name of each colour, passed translated: shows the colour choice beside the field. */\n markerNames?: Readonly<Record<Marker, string>>;\n /** The colour choice's accessible name (\"Colour of the new tag\"). */\n markerLabel?: string;\n /** The colour a new tag starts with (default `blue`). */\n defaultMarker?: Marker;\n /** The most characters of a name (default 80, the contract's `NAME_MAX`). */\n maxLength?: number;\n /** What is said when nothing matches and creating is not offered (“No tag of that name”), passed translated. */\n emptyLabel?: string;\n};\n\nexport type TagSelectorProps = CreatableProps & {\n /** The group's name (“Interests”) — passed translated. */\n label: string;\n /** The tags offered. */\n options: readonly TagOption[];\n /** The tags chosen. */\n value: readonly string[];\n /** Called with the tags chosen. */\n onValueChange: (value: string[]) => void;\n /** The most that can be chosen. */\n max?: number;\n /** The count under the tags: `(n, max) => n + \" of \" + max`. */\n countLabel?: (count: number, max: number) => string;\n /** Classes merged on the root. */\n className?: string;\n};\n\n/** The options whose label holds the typed text, and those already chosen. */\nconst matching = (options: readonly TagOption[], needle: string, value: readonly string[]) =>\n options.filter((o) => o.label.toLocaleLowerCase().includes(needle) || value.includes(o.value));\n\n/** Toggle chips with a limit and a count — the others rest once the limit is reached; `creatable` types a new one. */\nexport function TagSelector({\n label,\n options,\n value,\n onValueChange,\n max,\n countLabel,\n className,\n creatable,\n onCreate,\n inputLabel,\n placeholder,\n createLabel = (name) => `Create “${name}”`,\n markerNames,\n markerLabel,\n defaultMarker = \"blue\",\n maxLength = 80,\n emptyLabel,\n}: TagSelectorProps) {\n const full = max !== undefined && value.length >= max;\n const [draft, setDraft] = React.useState(\"\");\n const [marker, setMarker] = React.useState<Marker>(defaultMarker);\n const typed = draft.replace(/\\s+/g, \" \").trim();\n const needle = typed.toLocaleLowerCase();\n const exact = options.find((o) => o.label.toLocaleLowerCase() === needle);\n const shown = creatable && needle ? matching(options, needle, value) : options;\n const canCreate = Boolean(creatable && onCreate && typed && !exact && !full);\n const toggle = (option: TagOption, on: boolean) => onValueChange(on ? [...value, option.value] : value.filter((v) => v !== option.value));\n\n const commit = () => {\n if (!typed) return;\n if (exact) {\n if (!value.includes(exact.value) && !full) onValueChange([...value, exact.value]);\n } else if (canCreate) {\n onCreate?.(typed, marker);\n } else return;\n setDraft(\"\");\n };\n const listId = React.useId();\n\n return (\n <div className={[\"flex flex-col gap-2\", className].filter(Boolean).join(\" \")}>\n <div role=\"group\" aria-label={label} id={listId} className=\"flex flex-wrap gap-2\">\n {shown.map((option) => {\n const on = value.includes(option.value);\n const props = { selected: on, disabled: !on && full, onSelectedChange: (next: boolean) => toggle(option, next) };\n return option.marker ? (\n <TagChip key={option.value} marker={option.marker} {...props}>\n {option.label}\n </TagChip>\n ) : (\n <Chip key={option.value} {...props}>\n {option.label}\n </Chip>\n );\n })}\n {creatable && needle && shown.length === 0 && !canCreate && emptyLabel ? <p className=\"m-0 text-xs text-fg-secondary\">{emptyLabel}</p> : null}\n </div>\n {creatable ? (\n <div className=\"flex flex-wrap items-center gap-2\">\n <input\n type=\"text\"\n value={draft}\n maxLength={maxLength}\n aria-label={inputLabel ?? label}\n aria-controls={listId}\n placeholder={placeholder}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === \"Enter\") {\n event.preventDefault();\n commit();\n } else if (event.key === \"Backspace\" && !draft && value.length > 0) {\n // As in a tag field: Backspace on an empty field takes the last tag back.\n onValueChange(value.slice(0, -1));\n } else if (event.key === \"Escape\" && draft) {\n event.stopPropagation();\n setDraft(\"\");\n }\n }}\n className=\"h-9 min-w-40 flex-1 rounded-md border border-border-control bg-surface-1 px-3 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\"\n />\n {canCreate ? (\n <>\n {markerNames ? <MarkerPicker label={markerLabel ?? label} names={markerNames} value={marker} onValueChange={setMarker} /> : null}\n <button\n type=\"button\"\n onClick={commit}\n className=\"inline-flex h-9 items-center rounded-md border border-accent bg-accent-soft px-3 text-xs font-semibold text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\"\n >\n {createLabel(typed)}\n </button>\n </>\n ) : null}\n </div>\n ) : null}\n {max !== undefined && countLabel ? (\n <p className={[\"m-0 text-xs\", full ? \"font-semibold text-fg-accent\" : \"text-fg-secondary\"].join(\" \")} aria-live=\"polite\">\n {countLabel(value.length, max)}\n </p>\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAIA,YAAY,WAAW;AAkGjB,SAyCM,UApCA,KALN;AA9CN,IAAM,WAAW,CAAC,SAA+B,QAAgB,UAC/D,QAAQ,OAAO,CAAC,MAAM,EAAE,MAAM,kBAAkB,EAAE,SAAS,MAAM,KAAK,MAAM,SAAS,EAAE,KAAK,CAAC;AAGxF,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc,CAAC,SAAS,gBAAW,IAAI;AAAA,EACvC;AAAA,EACA;AAAA,EACA,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ;AACF,GAAqB;AACnB,QAAM,OAAO,QAAQ,UAAa,MAAM,UAAU;AAClD,QAAM,CAAC,OAAO,QAAQ,IAAU,eAAS,EAAE;AAC3C,QAAM,CAAC,QAAQ,SAAS,IAAU,eAAiB,aAAa;AAChE,QAAM,QAAQ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aAAa,UAAU,MAAM,WAAW,KAAK,CAAC,aAAa,aAAa,oBAAC,OAAE,WAAU,iCAAiC,sBAAW,IAAO;AAAA,OAC3I;AAAA,IACC,YACC,qBAAC,SAAI,WAAU,qCACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAO;AAAA,UACP;AAAA,UACA,cAAY,cAAc;AAAA,UAC1B,iBAAe;AAAA,UACf;AAAA,UACA,UAAU,CAAC,UAAU,SAAS,MAAM,OAAO,KAAK;AAAA,UAChD,WAAW,CAAC,UAAU;AACpB,gBAAI,MAAM,QAAQ,SAAS;AACzB,oBAAM,eAAe;AACrB,qBAAO;AAAA,YACT,WAAW,MAAM,QAAQ,eAAe,CAAC,SAAS,MAAM,SAAS,GAAG;AAElE,4BAAc,MAAM,MAAM,GAAG,EAAE,CAAC;AAAA,YAClC,WAAW,MAAM,QAAQ,YAAY,OAAO;AAC1C,oBAAM,gBAAgB;AACtB,uBAAS,EAAE;AAAA,YACb;AAAA,UACF;AAAA,UACA,WAAU;AAAA;AAAA,MACZ;AAAA,MACC,YACC,iCACG;AAAA,sBAAc,oBAAC,gBAAa,OAAO,eAAe,OAAO,OAAO,aAAa,OAAO,QAAQ,eAAe,WAAW,IAAK;AAAA,QAC5H;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,SAAS;AAAA,YACT,WAAU;AAAA,YAET,sBAAY,KAAK;AAAA;AAAA,QACpB;AAAA,SACF,IACE;AAAA,OACN,IACE;AAAA,IACH,QAAQ,UAAa,aACpB,oBAAC,OAAE,WAAW,CAAC,eAAe,OAAO,iCAAiC,mBAAmB,EAAE,KAAK,GAAG,GAAG,aAAU,UAC7G,qBAAW,MAAM,QAAQ,GAAG,GAC/B,IACE;AAAA,KACN;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/tag-selector/tag-selector.tsx"],"sourcesContent":["// Client. Interests, languages, a workspace's tags: toggle chips with a limit and a count; once it is reached the others\n// rest (disabled) and the count says so. An option with a `marker` is a tag with a colour beside its name (`TagChip`).\n// `creatable` adds a field: Enter takes the typed word — the tag of that name if it exists, else a new one the host creates\n// (`onCreate`, with the marker chosen from the closed palette) — and the typed word narrows the tags offered.\nimport * as React from \"react\";\n\nimport { Chip, type Marker, MarkerPicker, TagChip } from \"../chip\";\n\nexport type TagOption = {\n value: string;\n label: string;\n /** A tag's colour: a name of the closed palette (`@krizaka/organize` `MARKERS`). Without it, a plain chip. */\n marker?: Marker;\n};\n\ntype CreatableProps = {\n /** Adds a field: Enter chooses the tag typed, or asks the host to create it. */\n creatable?: boolean;\n /** Called with the new name (trimmed, as typed) and the marker chosen; the host creates the tag (it may refuse), adds the option and chooses it. */\n onCreate?: (name: string, marker: Marker) => void;\n /** The field's accessible name (\"Add a tag\"), passed translated. */\n inputLabel?: string;\n /** The field's placeholder, passed translated. */\n placeholder?: string;\n /** The create button: `(name) => \"Create “\" + name + \"”\"`, passed translated. */\n createLabel?: (name: string) => string;\n /** The name of each colour, passed translated: shows the colour choice beside the field. */\n markerNames?: Readonly<Record<Marker, string>>;\n /** The colour choice's accessible name (\"Colour of the new tag\"). */\n markerLabel?: string;\n /** The colour a new tag starts with (default `blue`). */\n defaultMarker?: Marker;\n /** The most characters of a name (default 80, the contract's `NAME_MAX`). */\n maxLength?: number;\n /** What is said when nothing matches and creating is not offered (“No tag of that name”), passed translated. */\n emptyLabel?: string;\n};\n\nexport type TagSelectorProps = CreatableProps & {\n /** The group's name (“Interests”) — passed translated. */\n label: string;\n /** The tags offered. */\n options: readonly TagOption[];\n /** The tags chosen. */\n value: readonly string[];\n /** Called with the tags chosen. */\n onValueChange: (value: string[]) => void;\n /** The most that can be chosen. */\n max?: number;\n /** The count under the tags: `(n, max) => n + \" of \" + max`. */\n countLabel?: (count: number, max: number) => string;\n /** Classes merged on the root. */\n className?: string;\n};\n\n/** The options whose label holds the typed text, and those already chosen. */\nconst matching = (options: readonly TagOption[], needle: string, value: readonly string[]) =>\n options.filter((o) => o.label.toLocaleLowerCase().includes(needle) || value.includes(o.value));\n\n/** One toggle chip: a marked tag wears its marker; the others rest once the limit is reached. */\nfunction OptionChip({ option, on, full, onToggle }: { option: TagOption; on: boolean; full: boolean; onToggle: (next: boolean) => void }) {\n const props = { selected: on, disabled: !on && full, onSelectedChange: onToggle };\n return option.marker ? (\n <TagChip marker={option.marker} {...props}>\n {option.label}\n </TagChip>\n ) : (\n <Chip {...props}>{option.label}</Chip>\n );\n}\n\n/** Toggle chips with a limit and a count — the others rest once the limit is reached; `creatable` types a new one. */\nexport function TagSelector({\n label,\n options,\n value,\n onValueChange,\n max,\n countLabel,\n className,\n creatable,\n onCreate,\n inputLabel,\n placeholder,\n createLabel = (name) => `Create “${name}”`,\n markerNames,\n markerLabel,\n defaultMarker = \"blue\",\n maxLength = 80,\n emptyLabel,\n}: TagSelectorProps) {\n const full = max !== undefined && value.length >= max;\n const [draft, setDraft] = React.useState(\"\");\n const [marker, setMarker] = React.useState<Marker>(defaultMarker);\n const typed = draft.replace(/\\s+/g, \" \").trim();\n const needle = typed.toLocaleLowerCase();\n const exact = options.find((o) => o.label.toLocaleLowerCase() === needle);\n const shown = creatable && needle ? matching(options, needle, value) : options;\n const canCreate = Boolean(creatable && onCreate && typed && !exact && !full);\n const toggle = (option: TagOption, on: boolean) => onValueChange(on ? [...value, option.value] : value.filter((v) => v !== option.value));\n\n const commit = () => {\n if (!typed) return;\n if (exact) {\n if (!value.includes(exact.value) && !full) onValueChange([...value, exact.value]);\n } else if (canCreate) {\n onCreate?.(typed, marker);\n } else return;\n setDraft(\"\");\n };\n const listId = React.useId();\n\n return (\n <div className={[\"flex flex-col gap-2\", className].filter(Boolean).join(\" \")}>\n <div role=\"group\" aria-label={label} id={listId} className=\"flex flex-wrap gap-2\">\n {shown.map((option) => (\n <OptionChip key={option.value} option={option} on={value.includes(option.value)} full={full} onToggle={(next) => toggle(option, next)} />\n ))}\n {creatable && needle && shown.length === 0 && !canCreate && emptyLabel ? <p className=\"m-0 text-xs text-fg-secondary\">{emptyLabel}</p> : null}\n </div>\n {creatable ? (\n <div className=\"flex flex-wrap items-center gap-2\">\n <input\n type=\"text\"\n value={draft}\n maxLength={maxLength}\n aria-label={inputLabel ?? label}\n aria-controls={listId}\n placeholder={placeholder}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === \"Enter\") {\n event.preventDefault();\n commit();\n } else if (event.key === \"Backspace\" && !draft && value.length > 0) {\n // As in a tag field: Backspace on an empty field takes the last tag back.\n onValueChange(value.slice(0, -1));\n } else if (event.key === \"Escape\" && draft) {\n event.stopPropagation();\n setDraft(\"\");\n }\n }}\n className=\"h-9 min-w-40 flex-1 rounded-md border border-border-control bg-surface-1 px-3 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\"\n />\n {canCreate ? (\n <>\n {markerNames ? <MarkerPicker label={markerLabel ?? label} names={markerNames} value={marker} onValueChange={setMarker} /> : null}\n <button\n type=\"button\"\n onClick={commit}\n className=\"inline-flex h-9 items-center rounded-md border border-accent bg-accent-soft px-3 text-xs font-semibold text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\"\n >\n {createLabel(typed)}\n </button>\n </>\n ) : null}\n </div>\n ) : null}\n {max !== undefined && countLabel ? (\n <p className={[\"m-0 text-xs\", full ? \"font-semibold text-fg-accent\" : \"text-fg-secondary\"].join(\" \")} aria-live=\"polite\">\n {countLabel(value.length, max)}\n </p>\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAIA,YAAY,WAAW;AA2DnB,SAkFQ,UAlFR,KAmDE,YAnDF;AAPJ,IAAM,WAAW,CAAC,SAA+B,QAAgB,UAC/D,QAAQ,OAAO,CAAC,MAAM,EAAE,MAAM,kBAAkB,EAAE,SAAS,MAAM,KAAK,MAAM,SAAS,EAAE,KAAK,CAAC;AAG/F,SAAS,WAAW,EAAE,QAAQ,IAAI,MAAM,SAAS,GAAyF;AACxI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UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,SAAS;AAAA,YACT,WAAU;AAAA,YAET,sBAAY,KAAK;AAAA;AAAA,QACpB;AAAA,SACF,IACE;AAAA,OACN,IACE;AAAA,IACH,QAAQ,UAAa,aACpB,oBAAC,OAAE,WAAW,CAAC,eAAe,OAAO,iCAAiC,mBAAmB,EAAE,KAAK,GAAG,GAAG,aAAU,UAC7G,qBAAW,MAAM,QAAQ,GAAG,GAC/B,IACE;AAAA,KACN;AAEJ;","names":[]}
@@ -7,7 +7,7 @@ import {
7
7
  PauseGlyph,
8
8
  PlayGlyph,
9
9
  RetryGlyph
10
- } from "./chunk-6BMKLAZ7.js";
10
+ } from "./chunk-Z47KIPCT.js";
11
11
  import {
12
12
  cn
13
13
  } from "./chunk-NSLXEDIS.js";
package/dist/virtual.d.ts CHANGED
@@ -6,8 +6,8 @@ import * as React from 'react';
6
6
  declare const virtual: tailwind_variants.TVReturnType<{
7
7
  [key: string]: {
8
8
  [key: string]: tailwind_variants.ClassValue | {
9
- viewport?: tailwind_variants.ClassValue;
10
9
  list?: tailwind_variants.ClassValue;
10
+ viewport?: tailwind_variants.ClassValue;
11
11
  item?: tailwind_variants.ClassValue;
12
12
  row?: tailwind_variants.ClassValue;
13
13
  empty?: tailwind_variants.ClassValue;
@@ -16,8 +16,8 @@ declare const virtual: tailwind_variants.TVReturnType<{
16
16
  } | {
17
17
  [x: string]: {
18
18
  [x: string]: tailwind_variants.ClassValue | {
19
- viewport?: tailwind_variants.ClassValue;
20
19
  list?: tailwind_variants.ClassValue;
20
+ viewport?: tailwind_variants.ClassValue;
21
21
  item?: tailwind_variants.ClassValue;
22
22
  row?: tailwind_variants.ClassValue;
23
23
  empty?: tailwind_variants.ClassValue;
@@ -32,8 +32,8 @@ declare const virtual: tailwind_variants.TVReturnType<{
32
32
  }, undefined, {
33
33
  [key: string]: {
34
34
  [key: string]: tailwind_variants.ClassValue | {
35
- viewport?: tailwind_variants.ClassValue;
36
35
  list?: tailwind_variants.ClassValue;
36
+ viewport?: tailwind_variants.ClassValue;
37
37
  item?: tailwind_variants.ClassValue;
38
38
  row?: tailwind_variants.ClassValue;
39
39
  empty?: tailwind_variants.ClassValue;