@krizaka/ui 3.71.0 → 3.73.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 (266) hide show
  1. package/dist/blocks.css +26 -0
  2. package/dist/chunk-M3T5RQYV.js +34 -0
  3. package/dist/chunk-M3T5RQYV.js.map +1 -0
  4. package/dist/chunk-ZFR6ZNXD.js +203 -0
  5. package/dist/chunk-ZFR6ZNXD.js.map +1 -0
  6. package/dist/filter-bar.d.ts +3 -3
  7. package/dist/{frame-D6Xv83t8.d.ts → frame-CNZ5VgDD.d.ts} +11 -4
  8. package/dist/retro-tv-playlist.d.ts +148 -0
  9. package/dist/retro-tv-playlist.js +234 -0
  10. package/dist/retro-tv-playlist.js.map +1 -0
  11. package/dist/retro-tv.js +4 -160
  12. package/dist/retro-tv.js.map +1 -1
  13. package/dist/schema-DgjBz7-8.d.ts +242 -0
  14. package/dist/shop/booking.d.ts +2 -2
  15. package/dist/shop/booking.js +1 -1
  16. package/dist/shop/booking.js.map +1 -1
  17. package/dist/shop/bulletin.js +1 -1
  18. package/dist/shop/faq.d.ts +2 -1
  19. package/dist/shop/faq.js +1 -1
  20. package/dist/shop/faq.js.map +1 -1
  21. package/dist/shop/gallery.js +1 -1
  22. package/dist/shop/look.d.ts +43 -0
  23. package/dist/shop/look.js +52 -0
  24. package/dist/shop/look.js.map +1 -0
  25. package/dist/shop/policies.d.ts +2 -1
  26. package/dist/shop/policies.js +1 -1
  27. package/dist/shop/policies.js.map +1 -1
  28. package/dist/shop/reviews.d.ts +2 -1
  29. package/dist/shop/reviews.js +1 -1
  30. package/dist/shop/reviews.js.map +1 -1
  31. package/dist/shop/services.js +1 -1
  32. package/dist/shop/social.js +1 -1
  33. package/dist/shop/story.d.ts +2 -1
  34. package/dist/shop/story.js +1 -1
  35. package/dist/shop/story.js.map +1 -1
  36. package/dist/shop/team.js +1 -1
  37. package/dist/shop/video.js +1 -1
  38. package/dist/shop/visit.js +1 -1
  39. package/dist/shop-composer.d.ts +29 -0
  40. package/dist/shop-composer.js +156 -89
  41. package/dist/shop-composer.js.map +1 -1
  42. package/dist/shop.d.ts +6 -240
  43. package/dist/shop.js +24 -212
  44. package/dist/shop.js.map +1 -1
  45. package/package.json +37 -7
  46. package/registry/account-menu.json +4 -2
  47. package/registry/account-settings.json +4 -2
  48. package/registry/achievement.json +4 -2
  49. package/registry/action-bar.json +4 -2
  50. package/registry/action-sheet.json +2 -0
  51. package/registry/activity-feed.json +4 -2
  52. package/registry/agenda.json +4 -2
  53. package/registry/alert.json +4 -2
  54. package/registry/analysis-report.json +4 -2
  55. package/registry/anatomy-plate.json +4 -2
  56. package/registry/app-frame.json +5 -3
  57. package/registry/app-header.json +4 -2
  58. package/registry/app-shell.json +4 -2
  59. package/registry/argument-card.json +4 -2
  60. package/registry/audio-player.json +4 -2
  61. package/registry/auth-layout.json +4 -2
  62. package/registry/avatar.json +4 -2
  63. package/registry/badge.json +4 -2
  64. package/registry/bird-plate.json +4 -2
  65. package/registry/button.json +4 -2
  66. package/registry/captcha.json +4 -2
  67. package/registry/card-grid.json +4 -2
  68. package/registry/card.json +4 -2
  69. package/registry/catalogue-page.json +4 -2
  70. package/registry/changelog-page.json +4 -2
  71. package/registry/chapter.json +4 -2
  72. package/registry/chat.json +4 -2
  73. package/registry/checkbox.json +4 -2
  74. package/registry/chip-link.json +4 -2
  75. package/registry/chip-row.json +4 -2
  76. package/registry/chip.json +4 -2
  77. package/registry/choice-grid.json +4 -2
  78. package/registry/cn.json +2 -0
  79. package/registry/code-block.json +4 -2
  80. package/registry/collection-switcher.json +4 -2
  81. package/registry/combobox.json +4 -2
  82. package/registry/command.json +4 -2
  83. package/registry/comparison-table.json +4 -2
  84. package/registry/component-page.json +4 -2
  85. package/registry/confirm-button.json +4 -2
  86. package/registry/contact-page.json +4 -2
  87. package/registry/continue-prompt.json +4 -2
  88. package/registry/copy-button.json +4 -2
  89. package/registry/countdown.json +4 -2
  90. package/registry/cover-hero.json +4 -2
  91. package/registry/cta-panel.json +4 -2
  92. package/registry/dashboard-layout.json +4 -2
  93. package/registry/data-table.json +4 -2
  94. package/registry/date-picker.json +4 -2
  95. package/registry/decision-list.json +4 -2
  96. package/registry/description-list.json +4 -2
  97. package/registry/desktop-window.json +5 -3
  98. package/registry/detail-layout.json +4 -2
  99. package/registry/dialog.json +4 -2
  100. package/registry/docs-article-page.json +4 -2
  101. package/registry/docs-hub-page.json +4 -2
  102. package/registry/docs-layout.json +4 -2
  103. package/registry/docs-nav.json +4 -2
  104. package/registry/document-viewer.json +4 -2
  105. package/registry/doodle.json +4 -2
  106. package/registry/drop-overlay.json +4 -2
  107. package/registry/dropdown-menu.json +4 -2
  108. package/registry/elephant.json +5 -3
  109. package/registry/embed-facade.json +4 -2
  110. package/registry/empty-state.json +4 -2
  111. package/registry/engine-flow.json +4 -2
  112. package/registry/entity-header.json +4 -2
  113. package/registry/environment-notice.json +4 -2
  114. package/registry/error-page.json +4 -2
  115. package/registry/fab.json +2 -0
  116. package/registry/field.json +4 -2
  117. package/registry/file-upload.json +4 -2
  118. package/registry/filter-bar.json +4 -2
  119. package/registry/flock.json +4 -2
  120. package/registry/footnote.json +4 -2
  121. package/registry/force-update-screen.json +4 -2
  122. package/registry/form-flow.json +3 -1
  123. package/registry/form.json +4 -2
  124. package/registry/gallery-page.json +4 -2
  125. package/registry/genui.json +4 -2
  126. package/registry/glossary-term.json +4 -2
  127. package/registry/glossary.json +4 -2
  128. package/registry/glow-card.json +4 -2
  129. package/registry/goal-gauge.json +4 -2
  130. package/registry/grade-stamp.json +4 -2
  131. package/registry/grid.json +2 -0
  132. package/registry/header.json +2 -0
  133. package/registry/how-it-works-page.json +4 -2
  134. package/registry/image-cropper.json +4 -2
  135. package/registry/image-viewer.json +2 -0
  136. package/registry/index.json +19 -18
  137. package/registry/iso.json +4 -2
  138. package/registry/kanban.json +4 -2
  139. package/registry/kbd.json +4 -2
  140. package/registry/kind-config-editor.json +4 -2
  141. package/registry/kpi-explained.json +4 -2
  142. package/registry/landing-page.json +4 -2
  143. package/registry/landscape.json +4 -2
  144. package/registry/language-switch.json +4 -2
  145. package/registry/legal-page.json +4 -2
  146. package/registry/link-card.json +4 -2
  147. package/registry/list-detail.json +2 -0
  148. package/registry/list.json +4 -2
  149. package/registry/loader.json +4 -2
  150. package/registry/longform-page.json +4 -2
  151. package/registry/maintenance-screen.json +4 -2
  152. package/registry/map.json +5 -3
  153. package/registry/margin-layout.json +4 -2
  154. package/registry/markdown.json +4 -2
  155. package/registry/marketing-layout.json +4 -2
  156. package/registry/marquee.json +4 -2
  157. package/registry/mascot-quote.json +4 -2
  158. package/registry/mascot-state.json +4 -2
  159. package/registry/mascots.json +4 -2
  160. package/registry/match-dialog.json +4 -2
  161. package/registry/media-capture.json +4 -2
  162. package/registry/media-gallery.json +4 -2
  163. package/registry/media-grid.json +4 -2
  164. package/registry/media-picker.json +2 -0
  165. package/registry/meta-row.json +4 -2
  166. package/registry/meter.json +4 -2
  167. package/registry/money-input.json +5 -3
  168. package/registry/nav-bar.json +5 -3
  169. package/registry/next-actions.json +4 -2
  170. package/registry/notification-preferences.json +4 -2
  171. package/registry/number-ticker.json +4 -2
  172. package/registry/onboarding.json +2 -0
  173. package/registry/opening-hours.json +4 -2
  174. package/registry/otp-input.json +2 -0
  175. package/registry/page-header.json +4 -2
  176. package/registry/page-hero.json +4 -2
  177. package/registry/page-index.json +4 -2
  178. package/registry/page.json +4 -2
  179. package/registry/pagination.json +4 -2
  180. package/registry/permission-prompt.json +2 -0
  181. package/registry/photo-grid.json +4 -2
  182. package/registry/pointer-light.json +4 -2
  183. package/registry/popover.json +4 -2
  184. package/registry/price-catalogue-editor.json +5 -3
  185. package/registry/pricing-page.json +4 -2
  186. package/registry/product-page.json +4 -2
  187. package/registry/profile-card.json +4 -2
  188. package/registry/progress.json +4 -2
  189. package/registry/promise-card.json +4 -2
  190. package/registry/promo-code-field.json +5 -3
  191. package/registry/proposal.json +5 -3
  192. package/registry/pull-to-refresh.json +2 -0
  193. package/registry/qr-code.json +4 -2
  194. package/registry/quota-meter.json +4 -2
  195. package/registry/radio-group.json +4 -2
  196. package/registry/rail-nav.json +5 -3
  197. package/registry/recipes.json +4 -2
  198. package/registry/retro-tv.json +9 -3
  199. package/registry/reviews.json +4 -2
  200. package/registry/router.json +4 -2
  201. package/registry/schema-form.json +5 -3
  202. package/registry/screen.json +2 -0
  203. package/registry/scroll-stage.json +4 -2
  204. package/registry/search-field.json +4 -2
  205. package/registry/section-backdrop.json +4 -2
  206. package/registry/segmented.json +2 -0
  207. package/registry/separator.json +4 -2
  208. package/registry/service-card.json +4 -2
  209. package/registry/settings-layout.json +4 -2
  210. package/registry/shop-composer.json +13 -7
  211. package/registry/shop-gallery.json +5 -3
  212. package/registry/shop.json +54 -11
  213. package/registry/showcase.json +4 -2
  214. package/registry/signature.json +4 -2
  215. package/registry/site-cahier.json +4 -2
  216. package/registry/site-footer.json +5 -3
  217. package/registry/sites.json +4 -2
  218. package/registry/skeleton.json +4 -2
  219. package/registry/skip-link.json +4 -2
  220. package/registry/slider.json +4 -2
  221. package/registry/slot-picker.json +4 -2
  222. package/registry/slot.json +4 -2
  223. package/registry/specimen-tag.json +4 -2
  224. package/registry/speed-lines.json +4 -2
  225. package/registry/spinner.json +4 -2
  226. package/registry/splash-handoff.json +2 -0
  227. package/registry/split-view.json +4 -2
  228. package/registry/stage-banner.json +4 -2
  229. package/registry/stat.json +4 -2
  230. package/registry/state-screen.json +3 -1
  231. package/registry/status-chip.json +4 -2
  232. package/registry/status-page.json +4 -2
  233. package/registry/step-progress.json +4 -2
  234. package/registry/step-showcase.json +4 -2
  235. package/registry/stepper.json +4 -2
  236. package/registry/sticky-action.json +4 -2
  237. package/registry/stuck.json +4 -2
  238. package/registry/swipe-deck.json +4 -2
  239. package/registry/swipeable-row.json +2 -0
  240. package/registry/switch.json +4 -2
  241. package/registry/tab-bar.json +2 -0
  242. package/registry/tabs.json +4 -2
  243. package/registry/tag-input.json +4 -2
  244. package/registry/tag-selector.json +4 -2
  245. package/registry/taped-photo.json +4 -2
  246. package/registry/terminal-replay.json +4 -2
  247. package/registry/text-style.json +4 -2
  248. package/registry/theme.json +4 -2
  249. package/registry/toast.json +4 -2
  250. package/registry/toc.json +4 -2
  251. package/registry/tooltip.json +4 -2
  252. package/registry/tree-view.json +4 -2
  253. package/registry/txt.json +2 -0
  254. package/registry/update-prompt.json +4 -2
  255. package/registry/upload-queue.json +4 -2
  256. package/registry/usage.json +5 -3
  257. package/registry/verified-badge.json +4 -2
  258. package/registry/versus-card.json +4 -2
  259. package/registry/vertical-video.json +4 -2
  260. package/registry/video-player.json +4 -2
  261. package/registry/video-trimmer.json +4 -2
  262. package/registry/virtual.json +4 -2
  263. package/registry/wall.json +4 -2
  264. package/registry/waveform.json +4 -2
  265. package/dist/chunk-A7MQPIEG.js +0 -31
  266. package/dist/chunk-A7MQPIEG.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/retro-tv/retro-tv.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport { CaptionsGlyph, PauseGlyph, PlayGlyph, VolumeGlyph } from \"../glyphs\";\nimport { formatClock, playSafely, useInView, usePrefersReducedMotion } from \"../media\";\nimport { VideoPlayer, type VideoPlayerProps } from \"../video-player/video-player\";\n\nconst styles = `\n.kz-rtv{container-type:inline-size;width:100%;max-width:100%;color:var(--kz-text-primary)}\n.kz-rtv-frame{position:relative;isolation:isolate;width:100%;aspect-ratio:4/5}\n@container (min-width:44rem){.kz-rtv-frame{aspect-ratio:16/10}.kz-rtv-bezel{width:72%}.kz-rtv-screen{width:66%}.kz-rtv-controls{width:18%;right:5%}.kz-rtv-speaker{width:18%;right:5%}}\n.kz-rtv-cabinet{position:absolute;inset:0;overflow:hidden}\n.kz-rtv-body{position:absolute;inset:4% 4% 16%;border:1px solid var(--kz-border-strong);border-radius:8% / 6%;background:linear-gradient(145deg,var(--kz-surface-sheen),transparent 35%),linear-gradient(145deg,color-mix(in srgb,var(--kz-warning) 18%,var(--kz-surface-3)),color-mix(in srgb,var(--kz-warning-text) 10%,var(--kz-surface-2)) 48%,var(--kz-surface-1));box-shadow:inset 0 1px 0 var(--kz-surface-sheen),inset 0 -3px 6px color-mix(in srgb,var(--kz-scrim-strong) 30%,transparent),0 1.2rem 2rem color-mix(in srgb,var(--kz-scrim-strong) 24%,transparent)}\n.kz-rtv[data-variant=portable] .kz-rtv-body{border-radius:12% / 8%;background:linear-gradient(145deg,var(--kz-surface-1),var(--kz-surface-2) 55%,var(--kz-surface-3))}\n.kz-rtv-body:after{position:absolute;inset:0;border-radius:inherit;background:repeating-linear-gradient(115deg,transparent 0 7px,color-mix(in srgb,var(--kz-border-subtle) 35%,transparent) 8px 9px);content:\"\";opacity:.4;pointer-events:none}\n.kz-rtv-bezel{position:absolute;top:0;bottom:0;left:6%;width:61%;border:1px solid var(--kz-border-strong);border-radius:14% / 7%;background:linear-gradient(145deg,var(--kz-surface-1),var(--kz-surface-3));box-shadow:inset 0 2px 5px color-mix(in srgb,var(--kz-scrim-strong) 35%,transparent),0 1px 2px color-mix(in srgb,var(--kz-surface-sheen) 60%,transparent)}\n.kz-rtv[data-variant=portable] .kz-rtv-bezel{border-radius:19% / 9%;background:linear-gradient(145deg,var(--kz-surface-0),var(--kz-surface-2))}\n.kz-rtv-controls{position:absolute;top:16%;right:7%;display:flex;width:23%;flex-direction:column;align-items:center;gap:1.1rem}\n.kz-rtv-knob{position:relative;display:block;width:2.3rem;max-width:70%;aspect-ratio:1;border:2px solid var(--kz-border-strong);border-radius:50%;background:radial-gradient(circle at 35% 28%,var(--kz-surface-sheen),transparent 30%),linear-gradient(145deg,var(--kz-surface-1),var(--kz-surface-3));box-shadow:inset 0 -2px 3px color-mix(in srgb,var(--kz-scrim-strong) 35%,transparent),0 2px 4px color-mix(in srgb,var(--kz-scrim-strong) 25%,transparent);color:var(--kz-accent)}\n.kz-rtv-knob[data-hue=accent]{background:radial-gradient(circle at 35% 28%,var(--kz-surface-sheen),transparent 30%),linear-gradient(145deg,var(--kz-accent-text),var(--kz-accent))}\n.kz-rtv-knob{transform:rotate(var(--kz-rtv-angle,0deg));transition:transform .4s cubic-bezier(.3,1.4,.5,1)}\n.kz-rtv-knob:before{position:absolute;inset:-.35rem;border-radius:50%;background:repeating-conic-gradient(from -135deg,var(--kz-border-strong) 0 2deg,transparent 2deg 27deg);content:\"\";-webkit-mask:radial-gradient(circle,transparent 62%,#000 64%);mask:radial-gradient(circle,transparent 62%,#000 64%);transform:rotate(calc(var(--kz-rtv-angle,0deg)*-1))}\n.kz-rtv-knob:after{position:absolute;top:14%;left:calc(50% - 1px);width:2px;height:27%;border-radius:2px;background:var(--kz-on-accent);content:\"\"}\n.kz-rtv[data-variant=portable] .kz-rtv-knob{width:1.9rem}\n.kz-rtv-speaker{position:absolute;right:7%;bottom:9%;display:flex;width:23%;flex-direction:column;gap:3px}\n.kz-rtv-speaker i{height:2px;border-radius:2px;background:var(--kz-border-strong);box-shadow:0 1px 0 var(--kz-surface-sheen)}\n.kz-rtv[data-variant=portable] .kz-rtv-speaker{display:none}\n.kz-rtv-stand{position:absolute;bottom:4%;left:36%;width:28%;height:12%;border-bottom:1px solid var(--kz-border-strong);border-radius:0 0 30% 30%;background:linear-gradient(180deg,var(--kz-surface-2),var(--kz-surface-3));clip-path:polygon(25% 0,75% 0,88% 78%,100% 100%,0 100%,12% 78%)}\n.kz-rtv[data-variant=portable] .kz-rtv-stand{left:40%;width:20%;height:8%;border-radius:50%;clip-path:ellipse(50% 50% at 50% 50%)}\n.kz-rtv-screen{position:absolute;top:4%;left:9.5%;width:56%;height:80%;overflow:hidden;border:2px solid color-mix(in srgb,var(--kz-border-strong) 72%,var(--kz-accent));border-radius:13% / 7%;background:var(--kz-scrim-strong);box-shadow:0 0 1.1rem color-mix(in srgb,var(--kz-accent) 30%,transparent),inset 0 0 1.2rem var(--kz-scrim-strong)}\n.kz-rtv[data-variant=portable] .kz-rtv-screen{border-radius:18% / 9%}\n.kz-rtv-screen .kz-rtv-player{height:100%;width:100%;border-radius:inherit}\n.kz-rtv-screen .kz-embed{height:100%;width:100%;aspect-ratio:auto;border-radius:inherit}\n.kz-rtv-player video,.kz-rtv-player img{object-fit:cover}\n.kz-rtv-effects{position:absolute;z-index:5;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none}\n.kz-rtv-effects:before{position:absolute;inset:0;background:repeating-linear-gradient(to bottom,transparent 0 3px,color-mix(in srgb,var(--kz-scrim-strong) 25%,transparent) 4px 5px);content:\"\";opacity:.46}\n.kz-rtv-effects:after{position:absolute;inset:-1px;background:radial-gradient(ellipse at center,transparent 55%,var(--kz-scrim-strong) 100%);content:\"\";opacity:.52}\n.kz-rtv-glow{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 45%,color-mix(in srgb,var(--kz-accent) 14%,transparent),transparent 68%);opacity:.7}\n.kz-rtv-noise{position:absolute;inset:0;height:100%;width:100%;opacity:.55;filter:contrast(1.3) brightness(.85)}\n.kz-rtv-glass{position:absolute;inset:0;height:100%;width:100%;opacity:.28}\n.kz-rtv-power{position:absolute;inset:0;background:var(--kz-text-on-media);opacity:0;transform:scaleY(.01);transform-origin:center;pointer-events:none}\n.kz-rtv[data-powered=true] .kz-rtv-power{animation:kz-rtv-power .65s ease-out both}\n.kz-rtv-channel{position:absolute;z-index:7;top:8%;right:5%;width:24%;overflow:hidden;padding:.25em .4em;border:1px solid var(--kz-border-strong);border-radius:3px;background:var(--kz-surface-1);box-shadow:inset 0 1px 0 var(--kz-surface-sheen);color:var(--kz-text-primary);font:700 clamp(.5rem,1.4cqw,.7rem)/1.2 var(--kz-font-mono,monospace);letter-spacing:.12em;text-transform:uppercase;text-align:center;text-overflow:ellipsis;white-space:nowrap}\n.kz-rtv[data-variant=portable] .kz-rtv-channel{top:7%}\n.kz-rtv-layer{position:absolute;inset:0;background:var(--kz-scrim-strong)}\n.kz-rtv-layer video,.kz-rtv-layer img,.kz-rtv-layer .kz-embed{width:100%;height:100%;object-fit:contain;aspect-ratio:auto}\n.kz-rtv-layer[data-role=out]{z-index:1}.kz-rtv-layer[data-role=in]{z-index:2}\n.kz-rtv-static{position:absolute;inset:0;z-index:4;overflow:hidden;pointer-events:none}\n.kz-rtv-static:after{position:absolute;inset:-20% 0 auto;height:18%;background:linear-gradient(transparent,color-mix(in srgb,var(--kz-text-on-media) 55%,transparent),transparent);content:\"\"}\n.kz-rtv-chip,.kz-rtv-bar button{display:inline-flex;min-width:2.25rem;min-height:2.25rem;align-items:center;justify-content:center;gap:.35rem;padding:0 .55rem;border:1px solid color-mix(in srgb,var(--kz-text-on-media) 30%,transparent);border-radius:999px;background:color-mix(in srgb,var(--kz-scrim-strong) 82%,transparent);color:var(--kz-text-on-media);font:600 .72rem/1 var(--kz-font-mono,monospace);cursor:pointer}\n.kz-rtv-chip{position:absolute;z-index:8;top:.5rem;left:.5rem}\n.kz-rtv-chip:focus-visible,.kz-rtv-bar button:focus-visible,.kz-rtv-seek:focus-visible{outline:2px solid var(--kz-ring);outline-offset:2px}\n.kz-rtv-bar{position:absolute;z-index:8;inset:auto 0 0;display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;padding:1.6rem .6rem .6rem;background:linear-gradient(transparent,color-mix(in srgb,var(--kz-scrim-strong) 85%,transparent));opacity:0;transition:opacity .25s}\n.kz-rtv-screen[data-active=true] .kz-rtv-bar,.kz-rtv-screen:focus-within .kz-rtv-bar,.kz-rtv-screen:hover .kz-rtv-bar{opacity:1}\n.kz-rtv-bar svg{width:1rem;height:1rem}\n.kz-rtv-time{padding:.2rem .45rem;border-radius:4px;background:var(--kz-scrim-strong);color:var(--kz-text-on-media);font:600 .75rem/1 var(--kz-font-mono,monospace);font-variant-numeric:tabular-nums}\n.kz-rtv-seek{flex:1 1 6rem;min-width:5rem;height:1.5rem;accent-color:var(--kz-accent);cursor:pointer}\n.kz-rtv-progress{position:absolute;z-index:7;inset:auto 0 0;height:3px;background:color-mix(in srgb,var(--kz-text-on-media) 25%,transparent)}\n.kz-rtv-progress i{display:block;height:100%;background:var(--kz-accent);transform-origin:left;transform:scaleX(var(--kz-rtv-p,0))}\n@media (prefers-reduced-motion:no-preference){\n.kz-rtv-layer[data-role=in][data-tr=crossfade]{animation:kz-rtv-in .6s both}.kz-rtv-layer[data-role=out][data-tr=crossfade]{animation:kz-rtv-out .6s both}\n.kz-rtv-layer[data-role=in][data-tr=slide]{animation:kz-rtv-sin .5s ease-out both}.kz-rtv-layer[data-role=out][data-tr=slide]{animation:kz-rtv-sout .5s ease-out both}\n.kz-rtv-layer[data-role=in][data-tr=channel]{animation:kz-rtv-tune .55s steps(8,end) both}\n.kz-rtv-static{animation:kz-rtv-in .55s reverse both}.kz-rtv-static:after{animation:kz-rtv-roll .55s linear both}}\n@keyframes kz-rtv-in{from{opacity:0}to{opacity:1}}@keyframes kz-rtv-out{from{opacity:1}to{opacity:0}}\n@keyframes kz-rtv-sin{from{transform:translateX(100%)}to{transform:none}}@keyframes kz-rtv-sout{from{transform:none}to{transform:translateX(-100%)}}\n@keyframes kz-rtv-tune{0%{transform:translateY(-12%) scaleY(1.15);filter:contrast(2) brightness(1.6)}100%{transform:none;filter:none}}\n@keyframes kz-rtv-roll{from{transform:translateY(0)}to{transform:translateY(700%)}}\n.kz-rtv:focus-within .kz-rtv-screen{outline:2px solid var(--kz-ring);outline-offset:3px}\n@keyframes kz-rtv-power{0%{opacity:1;transform:scaleY(.01)}45%{opacity:.9;transform:scaleY(1)}100%{opacity:0;transform:scaleY(1)}}\n@keyframes kz-rtv-noise{0%,100%{opacity:.38}50%{opacity:.62}}\n@media (prefers-reduced-motion:no-preference){.kz-rtv[data-off=true] .kz-rtv-noise{animation:kz-rtv-noise .18s steps(2,end) infinite}}\n@media (prefers-reduced-motion:reduce){.kz-rtv-power{display:none!important}.kz-rtv-noise{animation:none!important}}\n`;\n\n\n/** One programme of the playlist: an uploaded video (`src`) or, without `src`, a slot the host fills with `renderEmbed`. */\nexport interface RetroTvSource {\n id: string;\n title: string;\n src?: string;\n poster?: string;\n /** WebVTT captions of this video. */\n tracks?: VideoPlayerProps[\"tracks\"];\n}\nexport type RetroTvTransition = \"channel\" | \"crossfade\" | \"slide\";\nexport interface RetroTvLabels { play: string; pause: string; next: string; previous: string; soundOff: string; soundOn: string; captions: string; seek: string; nowPlaying: string }\nexport const retroTvLabels: RetroTvLabels = { play: \"Play\", pause: \"Pause\", next: \"Next video\", previous: \"Previous video\", soundOff: \"Sound off: turn on\", soundOn: \"Sound on: turn off\", captions: \"Captions\", seek: \"Seek\", nowPlaying: \"Now playing\" };\nexport const retroTvLabelsFr: RetroTvLabels = { play: \"Lecture\", pause: \"Pause\", next: \"Vidéo suivante\", previous: \"Vidéo précédente\", soundOff: \"Son coupé : activer\", soundOn: \"Son activé : couper\", captions: \"Sous-titres\", seek: \"Position\", nowPlaying: \"En cours\" };\n\ntype PlaylistProps = { playlist: readonly RetroTvSource[]; transition: RetroTvTransition; labels: RetroTvLabels; muted: boolean; autoPlay: boolean; renderEmbed?: (source: RetroTvSource) => React.ReactNode; onMutedChange?: (muted: boolean) => void; onIndexChange?: (index: number) => void; title?: string; reduced: boolean; setMutedState: (m: boolean) => void; setIndex: (i: number) => void; index: number };\n\nfunction PlaylistScreen({ playlist, transition, labels, muted, autoPlay, renderEmbed, onMutedChange, onIndexChange, title, reduced, setMutedState, setIndex, index }: PlaylistProps) {\n const region = React.useRef<HTMLDivElement>(null);\n const video = React.useRef<HTMLVideoElement>(null);\n const [prev, setPrev] = React.useState<number | null>(null);\n const [seen, setSeen] = React.useState(false);\n const [playing, setPlaying] = React.useState(false);\n const [time, setTime] = React.useState({ t: 0, d: 0 });\n const [active, setActive] = React.useState(false);\n const [captionsOn, setCaptionsOn] = React.useState(false);\n const n = playlist.length;\n const current = playlist[index];\n const wake = React.useCallback(() => setActive(true), []);\n\n useInView(region, (v) => { if (v) setSeen(true); else video.current?.pause(); });\n React.useEffect(() => { if (!active) return; const id = setTimeout(() => setActive(false), 2500); return () => clearTimeout(id); }, [active]);\n React.useEffect(() => { if (prev === null) return; const id = setTimeout(() => setPrev(null), reduced ? 0 : 650); return () => clearTimeout(id); }, [prev, reduced]);\n React.useEffect(() => { if (seen && autoPlay && !reduced && current?.src) playSafely(video.current); }, [seen, autoPlay, reduced, index, current?.src]);\n React.useEffect(() => { const list = video.current?.textTracks; if (list) Array.from(list).forEach((track, i) => { track.mode = captionsOn && i === 0 ? \"showing\" : \"disabled\"; }); }, [captionsOn, index]);\n\n const go = (to: number) => {\n const next = ((to % n) + n) % n;\n if (next === index && n > 1) return;\n if (!reduced && n > 1) setPrev(index);\n setIndex(next);\n setTime({ t: 0, d: 0 });\n onIndexChange?.(next);\n };\n const toggle = () => { const v = video.current; if (!v) return; if (v.paused) playSafely(v); else v.pause(); };\n const setMuted = (m: boolean) => { setMutedState(m); onMutedChange?.(m); };\n const onKey = (e: React.KeyboardEvent) => {\n if (e.target !== e.currentTarget) return;\n const v = video.current;\n const act: Record<string, () => void> = { \" \": toggle, k: toggle, m: () => setMuted(!muted), n: () => go(index + 1), p: () => go(index - 1), ArrowRight: () => { if (v) v.currentTime += 5; }, ArrowLeft: () => { if (v) v.currentTime -= 5; } };\n const fn = act[e.key.length === 1 ? e.key.toLowerCase() : e.key];\n if (fn) { e.preventDefault(); fn(); wake(); }\n };\n const layer = (i: number, role: \"in\" | \"out\") => {\n const src = playlist[i];\n if (!src) return null;\n return (\n <div className=\"kz-rtv-layer\" key={src.id} data-role={role} data-tr={transition}>\n {src.src ? (\n role === \"in\" ? (\n <video ref={video} src={seen ? src.src : undefined} poster={src.poster} muted={muted} playsInline preload={seen ? \"auto\" : \"none\"} loop={n === 1} aria-label={src.title}\n onPlay={() => setPlaying(true)} onPause={() => setPlaying(false)} onEnded={() => { if (n > 1) go(index + 1); }}\n onTimeUpdate={(e) => setTime({ t: e.currentTarget.currentTime, d: e.currentTarget.duration || 0 })} onLoadedMetadata={(e) => setTime({ t: 0, d: e.currentTarget.duration || 0 })}>\n {src.tracks?.map((t) => <track key={t.src} kind=\"captions\" src={t.src} srcLang={t.srcLang} label={t.label} />)}\n </video>\n ) : src.poster ? <img src={src.poster} alt=\"\" /> : null\n ) : role === \"in\" ? renderEmbed?.(src) : null}\n </div>\n );\n };\n const p = time.d ? Math.min(1, time.t / time.d) : 0;\n const hasCaptions = !!current?.tracks?.length;\n return (\n <div ref={region} role=\"region\" aria-label={title ?? current?.title} tabIndex={0} className=\"kz-rtv-playlist\" data-active={active ? \"true\" : undefined} onKeyDown={onKey} onPointerMove={wake} onPointerDown={wake} onFocus={wake} style={{ position: \"absolute\", inset: 0, \"--kz-rtv-p\": p } as React.CSSProperties}>\n {prev !== null && layer(prev, \"out\")}\n {layer(index, \"in\")}\n {prev !== null && transition === \"channel\" && <div className=\"kz-rtv-static\" aria-hidden=\"true\"><span className=\"kz-rtv-noise\" style={{ position: \"absolute\", inset: 0, background: \"repeating-linear-gradient(0deg,var(--kz-text-on-media) 0 1px,var(--kz-scrim-strong) 1px 3px)\" }} /></div>}\n <button type=\"button\" className=\"kz-rtv-chip\" aria-pressed={!muted} aria-label={muted ? labels.soundOff : labels.soundOn} onClick={() => setMuted(!muted)}><VolumeGlyph muted={muted} /></button>\n <div className=\"kz-rtv-progress\" aria-hidden=\"true\"><i /></div>\n <div className=\"kz-rtv-bar\">\n <button type=\"button\" aria-label={labels.previous} onClick={() => go(index - 1)} disabled={n < 2}>«</button>\n <button type=\"button\" aria-label={playing ? labels.pause : labels.play} onClick={toggle} disabled={!current?.src}>{playing ? <PauseGlyph /> : <PlayGlyph />}</button>\n <button type=\"button\" aria-label={labels.next} onClick={() => go(index + 1)} disabled={n < 2}>»</button>\n <span className=\"kz-rtv-time\">{formatClock(time.t)} / {formatClock(time.d)}</span>\n <input className=\"kz-rtv-seek\" type=\"range\" aria-label={labels.seek} min={0} max={Math.max(1, Math.floor(time.d))} value={Math.floor(time.t)} disabled={!time.d} onChange={(e) => { if (video.current) video.current.currentTime = Number(e.target.value); }} />\n {hasCaptions && <button type=\"button\" aria-label={labels.captions} aria-pressed={captionsOn} onClick={() => setCaptionsOn(!captionsOn)}><CaptionsGlyph /></button>}\n </div>\n <span className=\"sr-only\" aria-live=\"polite\">{labels.nowPlaying}: {current?.title} ({index + 1}/{n})</span>\n </div>\n );\n}\n\n/** A vertical video in a CSS-and-SVG television cabinet. */\nexport interface RetroTvProps extends Omit<VideoPlayerProps, \"aspectRatio\" | \"labels\" | \"autoPlay\" | \"className\" | \"loop\" | \"muted\" | \"preload\" | \"src\"> {\n /** The video's address. Optional when the screen shows `children`. */\n src?: VideoPlayerProps[\"src\"];\n /** What the screen shows instead of the video player: an `EmbedFacade` for a platform's short video. */\n children?: React.ReactNode;\n /** The cabinet style. */\n variant?: \"cabinet\" | \"portable\";\n /** A short channel label shown on the cabinet, for example `\"CH 3 · Plateau\"`. */\n channel?: string;\n /** Shows animated static instead of loading or playing the video. */\n off?: boolean;\n /** Starts muted and plays only while on screen; reduced motion waits for a gesture. Default `true`. */\n autoPlay?: boolean;\n /** Starts the player muted. Default `true`. */\n muted?: boolean;\n /** Plays the video again from the start when it ends. Default `true`. */\n loop?: boolean;\n /** How much to fetch before playback. Default `none` for lazy loading. */\n preload?: VideoPlayerProps[\"preload\"];\n /** Additional classes on the television frame. */\n className?: string;\n /** Programmes played in order, then again from the first. Replaces `src` and `children`. */\n playlist?: readonly RetroTvSource[];\n /** How one programme gives way to the next; a cut under reduced motion. Default `channel`. */\n transition?: RetroTvTransition;\n /** The host fills the screen of a source that has no `src` (an embed behind its own consent gate); the library loads no third-party script. */\n renderEmbed?: (source: RetroTvSource) => React.ReactNode;\n /** Told when the visitor turns the sound on or off, so the host can remember the choice. */\n onMutedChange?: (muted: boolean) => void;\n /** Told when another programme starts. */\n onIndexChange?: (index: number) => void;\n /** The controls' words; `retroTvLabelsFr` for French. */\n labels?: Partial<RetroTvLabels>;\n}\n\n/**\n * A vertical video presented in an old-school television; the existing player remains fully accessible.\n */\nexport function RetroTv({\n variant = \"cabinet\",\n channel,\n off = false,\n autoPlay = true,\n muted = true,\n loop = true,\n preload = \"none\",\n className,\n children,\n src,\n playlist,\n transition = \"channel\",\n renderEmbed,\n onMutedChange,\n onIndexChange,\n labels,\n ...playerProps\n}: RetroTvProps) {\n const [index, setIndex] = React.useState(0);\n const [mutedState, setMutedState] = React.useState(muted);\n const root = React.useRef<HTMLDivElement>(null);\n const [powered, setPowered] = React.useState(false);\n const reducedMotion = usePrefersReducedMotion();\n const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, \"\");\n const noiseId = `${uid}-noise`;\n const glassId = `${uid}-glass`;\n const shineId = `${uid}-shine`;\n\n useInView(root, setPowered);\n const player = src ? <VideoPlayer {...playerProps} src={src} className=\"kz-rtv-player\" aspectRatio=\"9 / 16\" autoPlay={autoPlay} muted={muted} loop={loop} preload={preload} /> : null;\n const knob = { channel: index * 50, sound: mutedState ? -50 : 50 };\n const screen = playlist?.length ? (\n <PlaylistScreen playlist={playlist} transition={transition} labels={{ ...retroTvLabels, ...labels }} muted={mutedState} autoPlay={autoPlay} renderEmbed={renderEmbed} onMutedChange={onMutedChange} onIndexChange={onIndexChange} title={playerProps.title} reduced={reducedMotion} setMutedState={setMutedState} setIndex={setIndex} index={index} />\n ) : children ?? player;\n\n return (\n <div ref={root} className={[\"kz-rtv\", className].filter(Boolean).join(\" \")} data-variant={variant} data-powered={powered && !reducedMotion ? \"true\" : undefined} data-off={off ? \"true\" : undefined}>\n <style>{styles}</style>\n <div className=\"kz-rtv-frame\">\n <div className=\"kz-rtv-cabinet\" aria-hidden=\"true\">\n <div className=\"kz-rtv-body\">\n <div className=\"kz-rtv-bezel\" />\n <div className=\"kz-rtv-controls\">\n <span className=\"kz-rtv-knob\" data-hue=\"accent\" style={{ \"--kz-rtv-angle\": `${knob.channel}deg` } as React.CSSProperties} />\n <span className=\"kz-rtv-knob\" data-hue=\"accent\" style={{ \"--kz-rtv-angle\": `${knob.sound}deg` } as React.CSSProperties} />\n </div>\n <div className=\"kz-rtv-speaker\">{Array.from({ length: 7 }, (_, index) => <i key={index} />)}</div>\n </div>\n <div className=\"kz-rtv-stand\" />\n </div>\n {channel && <span className=\"kz-rtv-channel\">{channel}</span>}\n <div className=\"kz-rtv-screen\">\n {off ? (\n <svg className=\"kz-rtv-noise\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n <filter id={noiseId}><feTurbulence type=\"fractalNoise\" baseFrequency=\".85\" numOctaves=\"2\" stitchTiles=\"stitch\" /><feColorMatrix type=\"saturate\" values=\"0\" /></filter>\n <rect width=\"100%\" height=\"100%\" filter={`url(#${noiseId})`} />\n </svg>\n ) : (\n screen\n )}\n <div className=\"kz-rtv-effects\" aria-hidden=\"true\">\n <svg className=\"kz-rtv-glass\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\">\n <defs>\n <radialGradient id={shineId} cx=\"50%\" cy=\"42%\" r=\"68%\">\n <stop offset=\"0\" stopColor=\"var(--kz-surface-sheen)\" stopOpacity=\".12\" />\n <stop offset=\"1\" stopColor=\"var(--kz-scrim-strong)\" stopOpacity=\".2\" />\n </radialGradient>\n <filter id={glassId}>\n <feTurbulence baseFrequency=\".01 .04\" numOctaves=\"1\" seed=\"2\" result=\"curve\" />\n <feDisplacementMap in=\"SourceGraphic\" in2=\"curve\" scale=\"1.2\" xChannelSelector=\"R\" yChannelSelector=\"G\" />\n </filter>\n </defs>\n <rect width=\"100\" height=\"100\" fill={`url(#${shineId})`} filter={`url(#${glassId})`} />\n </svg>\n <span className=\"kz-rtv-glow\" />\n <span className=\"kz-rtv-power\" />\n </div>\n </div>\n {off && <span className=\"sr-only\">{playerProps.title}</span>}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,YAAY,WAAW;AAyIe,cAoB9B,YApB8B;AAnItC,IAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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AAU,2BAA0B,aAAY,OAAM;AAAA,gBACvE,oBAAC,UAAK,QAAO,KAAI,WAAU,0BAAyB,aAAY,MAAK;AAAA,iBACvE;AAAA,cACA,qBAAC,YAAO,IAAI,SACV;AAAA,oCAAC,kBAAa,eAAc,WAAU,YAAW,KAAI,MAAK,KAAI,QAAO,SAAQ;AAAA,gBAC7E,oBAAC,uBAAkB,IAAG,iBAAgB,KAAI,SAAQ,OAAM,OAAM,kBAAiB,KAAI,kBAAiB,KAAI;AAAA,iBAC1G;AAAA,eACF;AAAA,YACA,oBAAC,UAAK,OAAM,OAAM,QAAO,OAAM,MAAM,QAAQ,OAAO,KAAK,QAAQ,QAAQ,OAAO,KAAK;AAAA,aACvF;AAAA,UACA,oBAAC,UAAK,WAAU,eAAc;AAAA,UAC9B,oBAAC,UAAK,WAAU,gBAAe;AAAA,WACjC;AAAA,SACF;AAAA,MACC,OAAO,oBAAC,UAAK,WAAU,WAAW,sBAAY,OAAM;AAAA,OACrD;AAAA,KACF;AAEJ;","names":["index"]}
1
+ {"version":3,"sources":["../src/retro-tv/retro-tv.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport { useInView, usePrefersReducedMotion } from \"../media\";\nimport { VideoPlayer, type VideoPlayerProps } from \"../video-player/video-player\";\n\n/**\n * The playlist (transitions, bar, seek, captions, sound chip) is its own chunk, loaded only when a `playlist` is given: the\n * single clip (a shop's video, an embed) never downloads it.\n */\nconst PlaylistScreen = React.lazy(() => import(\"./playlist-screen\").then((m) => ({ default: m.PlaylistScreen })));\n\nconst styles = `\n.kz-rtv{container-type:inline-size;width:100%;max-width:100%;color:var(--kz-text-primary)}\n.kz-rtv-frame{position:relative;isolation:isolate;width:100%;aspect-ratio:4/5}\n@container (min-width:44rem){.kz-rtv-frame{aspect-ratio:16/10}.kz-rtv-bezel{width:72%}.kz-rtv-screen{width:66%}.kz-rtv-controls{width:18%;right:5%}.kz-rtv-speaker{width:18%;right:5%}}\n.kz-rtv-cabinet{position:absolute;inset:0;overflow:hidden}\n.kz-rtv-body{position:absolute;inset:4% 4% 16%;border:1px solid var(--kz-border-strong);border-radius:8% / 6%;background:linear-gradient(145deg,var(--kz-surface-sheen),transparent 35%),linear-gradient(145deg,color-mix(in srgb,var(--kz-warning) 18%,var(--kz-surface-3)),color-mix(in srgb,var(--kz-warning-text) 10%,var(--kz-surface-2)) 48%,var(--kz-surface-1));box-shadow:inset 0 1px 0 var(--kz-surface-sheen),inset 0 -3px 6px color-mix(in srgb,var(--kz-scrim-strong) 30%,transparent),0 1.2rem 2rem color-mix(in srgb,var(--kz-scrim-strong) 24%,transparent)}\n.kz-rtv[data-variant=portable] .kz-rtv-body{border-radius:12% / 8%;background:linear-gradient(145deg,var(--kz-surface-1),var(--kz-surface-2) 55%,var(--kz-surface-3))}\n.kz-rtv-body:after{position:absolute;inset:0;border-radius:inherit;background:repeating-linear-gradient(115deg,transparent 0 7px,color-mix(in srgb,var(--kz-border-subtle) 35%,transparent) 8px 9px);content:\"\";opacity:.4;pointer-events:none}\n.kz-rtv-bezel{position:absolute;top:0;bottom:0;left:6%;width:61%;border:1px solid var(--kz-border-strong);border-radius:14% / 7%;background:linear-gradient(145deg,var(--kz-surface-1),var(--kz-surface-3));box-shadow:inset 0 2px 5px color-mix(in srgb,var(--kz-scrim-strong) 35%,transparent),0 1px 2px color-mix(in srgb,var(--kz-surface-sheen) 60%,transparent)}\n.kz-rtv[data-variant=portable] .kz-rtv-bezel{border-radius:19% / 9%;background:linear-gradient(145deg,var(--kz-surface-0),var(--kz-surface-2))}\n.kz-rtv-controls{position:absolute;top:16%;right:7%;display:flex;width:23%;flex-direction:column;align-items:center;gap:1.1rem}\n.kz-rtv-knob{position:relative;display:block;width:2.3rem;max-width:70%;aspect-ratio:1;border:2px solid var(--kz-border-strong);border-radius:50%;background:radial-gradient(circle at 35% 28%,var(--kz-surface-sheen),transparent 30%),linear-gradient(145deg,var(--kz-surface-1),var(--kz-surface-3));box-shadow:inset 0 -2px 3px color-mix(in srgb,var(--kz-scrim-strong) 35%,transparent),0 2px 4px color-mix(in srgb,var(--kz-scrim-strong) 25%,transparent);color:var(--kz-accent)}\n.kz-rtv-knob[data-hue=accent]{background:radial-gradient(circle at 35% 28%,var(--kz-surface-sheen),transparent 30%),linear-gradient(145deg,var(--kz-accent-text),var(--kz-accent))}\n.kz-rtv-knob{transform:rotate(var(--kz-rtv-angle,0deg));transition:transform .4s cubic-bezier(.3,1.4,.5,1)}\n.kz-rtv-knob:before{position:absolute;inset:-.35rem;border-radius:50%;background:repeating-conic-gradient(from -135deg,var(--kz-border-strong) 0 2deg,transparent 2deg 27deg);content:\"\";-webkit-mask:radial-gradient(circle,transparent 62%,#000 64%);mask:radial-gradient(circle,transparent 62%,#000 64%);transform:rotate(calc(var(--kz-rtv-angle,0deg)*-1))}\n.kz-rtv-knob:after{position:absolute;top:14%;left:calc(50% - 1px);width:2px;height:27%;border-radius:2px;background:var(--kz-on-accent);content:\"\"}\n.kz-rtv[data-variant=portable] .kz-rtv-knob{width:1.9rem}\n.kz-rtv-speaker{position:absolute;right:7%;bottom:9%;display:flex;width:23%;flex-direction:column;gap:3px}\n.kz-rtv-speaker i{height:2px;border-radius:2px;background:var(--kz-border-strong);box-shadow:0 1px 0 var(--kz-surface-sheen)}\n.kz-rtv[data-variant=portable] .kz-rtv-speaker{display:none}\n.kz-rtv-stand{position:absolute;bottom:4%;left:36%;width:28%;height:12%;border-bottom:1px solid var(--kz-border-strong);border-radius:0 0 30% 30%;background:linear-gradient(180deg,var(--kz-surface-2),var(--kz-surface-3));clip-path:polygon(25% 0,75% 0,88% 78%,100% 100%,0 100%,12% 78%)}\n.kz-rtv[data-variant=portable] .kz-rtv-stand{left:40%;width:20%;height:8%;border-radius:50%;clip-path:ellipse(50% 50% at 50% 50%)}\n.kz-rtv-screen{position:absolute;top:4%;left:9.5%;width:56%;height:80%;overflow:hidden;border:2px solid color-mix(in srgb,var(--kz-border-strong) 72%,var(--kz-accent));border-radius:13% / 7%;background:var(--kz-scrim-strong);box-shadow:0 0 1.1rem color-mix(in srgb,var(--kz-accent) 30%,transparent),inset 0 0 1.2rem var(--kz-scrim-strong)}\n.kz-rtv[data-variant=portable] .kz-rtv-screen{border-radius:18% / 9%}\n.kz-rtv-screen .kz-rtv-player{height:100%;width:100%;border-radius:inherit}\n.kz-rtv-screen .kz-embed{height:100%;width:100%;aspect-ratio:auto;border-radius:inherit}\n.kz-rtv-player video,.kz-rtv-player img{object-fit:cover}\n.kz-rtv-effects{position:absolute;z-index:5;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none}\n.kz-rtv-effects:before{position:absolute;inset:0;background:repeating-linear-gradient(to bottom,transparent 0 3px,color-mix(in srgb,var(--kz-scrim-strong) 25%,transparent) 4px 5px);content:\"\";opacity:.46}\n.kz-rtv-effects:after{position:absolute;inset:-1px;background:radial-gradient(ellipse at center,transparent 55%,var(--kz-scrim-strong) 100%);content:\"\";opacity:.52}\n.kz-rtv-glow{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 45%,color-mix(in srgb,var(--kz-accent) 14%,transparent),transparent 68%);opacity:.7}\n.kz-rtv-noise{position:absolute;inset:0;height:100%;width:100%;opacity:.55;filter:contrast(1.3) brightness(.85)}\n.kz-rtv-glass{position:absolute;inset:0;height:100%;width:100%;opacity:.28}\n.kz-rtv-power{position:absolute;inset:0;background:var(--kz-text-on-media);opacity:0;transform:scaleY(.01);transform-origin:center;pointer-events:none}\n.kz-rtv[data-powered=true] .kz-rtv-power{animation:kz-rtv-power .65s ease-out both}\n.kz-rtv-channel{position:absolute;z-index:7;top:8%;right:5%;width:24%;overflow:hidden;padding:.25em .4em;border:1px solid var(--kz-border-strong);border-radius:3px;background:var(--kz-surface-1);box-shadow:inset 0 1px 0 var(--kz-surface-sheen);color:var(--kz-text-primary);font:700 clamp(.5rem,1.4cqw,.7rem)/1.2 var(--kz-font-mono,monospace);letter-spacing:.12em;text-transform:uppercase;text-align:center;text-overflow:ellipsis;white-space:nowrap}\n.kz-rtv[data-variant=portable] .kz-rtv-channel{top:7%}\n.kz-rtv:focus-within .kz-rtv-screen{outline:2px solid var(--kz-ring);outline-offset:3px}\n@keyframes kz-rtv-power{0%{opacity:1;transform:scaleY(.01)}45%{opacity:.9;transform:scaleY(1)}100%{opacity:0;transform:scaleY(1)}}\n@keyframes kz-rtv-noise{0%,100%{opacity:.38}50%{opacity:.62}}\n@media (prefers-reduced-motion:no-preference){.kz-rtv[data-off=true] .kz-rtv-noise{animation:kz-rtv-noise .18s steps(2,end) infinite}}\n@media (prefers-reduced-motion:reduce){.kz-rtv-power{display:none!important}.kz-rtv-noise{animation:none!important}}\n\n`;\n\n\n/** One programme of the playlist: an uploaded video (`src`) or, without `src`, a slot the host fills with `renderEmbed`. */\nexport interface RetroTvSource {\n id: string;\n title: string;\n src?: string;\n poster?: string;\n /** WebVTT captions of this video. */\n tracks?: VideoPlayerProps[\"tracks\"];\n}\nexport type RetroTvTransition = \"channel\" | \"crossfade\" | \"slide\";\nexport interface RetroTvLabels { play: string; pause: string; next: string; previous: string; soundOff: string; soundOn: string; captions: string; seek: string; nowPlaying: string }\nexport const retroTvLabels: RetroTvLabels = { play: \"Play\", pause: \"Pause\", next: \"Next video\", previous: \"Previous video\", soundOff: \"Sound off: turn on\", soundOn: \"Sound on: turn off\", captions: \"Captions\", seek: \"Seek\", nowPlaying: \"Now playing\" };\nexport const retroTvLabelsFr: RetroTvLabels = { play: \"Lecture\", pause: \"Pause\", next: \"Vidéo suivante\", previous: \"Vidéo précédente\", soundOff: \"Son coupé : activer\", soundOn: \"Son activé : couper\", captions: \"Sous-titres\", seek: \"Position\", nowPlaying: \"En cours\" };\n\n/** A vertical video in a CSS-and-SVG television cabinet. */\nexport interface RetroTvProps extends Omit<VideoPlayerProps, \"aspectRatio\" | \"labels\" | \"autoPlay\" | \"className\" | \"loop\" | \"muted\" | \"preload\" | \"src\"> {\n /** The video's address. Optional when the screen shows `children`. */\n src?: VideoPlayerProps[\"src\"];\n /** What the screen shows instead of the video player: an `EmbedFacade` for a platform's short video. */\n children?: React.ReactNode;\n /** The cabinet style. */\n variant?: \"cabinet\" | \"portable\";\n /** A short channel label shown on the cabinet, for example `\"CH 3 · Plateau\"`. */\n channel?: string;\n /** Shows animated static instead of loading or playing the video. */\n off?: boolean;\n /** Starts muted and plays only while on screen; reduced motion waits for a gesture. Default `true`. */\n autoPlay?: boolean;\n /** Starts the player muted. Default `true`. */\n muted?: boolean;\n /** Plays the video again from the start when it ends. Default `true`. */\n loop?: boolean;\n /** How much to fetch before playback. Default `none` for lazy loading. */\n preload?: VideoPlayerProps[\"preload\"];\n /** Additional classes on the television frame. */\n className?: string;\n /** Programmes played in order, then again from the first. Replaces `src` and `children`. */\n playlist?: readonly RetroTvSource[];\n /** How one programme gives way to the next; a cut under reduced motion. Default `channel`. */\n transition?: RetroTvTransition;\n /** The host fills the screen of a source that has no `src` (an embed behind its own consent gate); the library loads no third-party script. */\n renderEmbed?: (source: RetroTvSource) => React.ReactNode;\n /** Told when the visitor turns the sound on or off, so the host can remember the choice. */\n onMutedChange?: (muted: boolean) => void;\n /** Told when another programme starts. */\n onIndexChange?: (index: number) => void;\n /** The controls' words; `retroTvLabelsFr` for French. */\n labels?: Partial<RetroTvLabels>;\n}\n\n/**\n * A vertical video presented in an old-school television; the existing player remains fully accessible.\n */\nexport function RetroTv({\n variant = \"cabinet\",\n channel,\n off = false,\n autoPlay = true,\n muted = true,\n loop = true,\n preload = \"none\",\n className,\n children,\n src,\n playlist,\n transition = \"channel\",\n renderEmbed,\n onMutedChange,\n onIndexChange,\n labels,\n ...playerProps\n}: RetroTvProps) {\n const [index, setIndex] = React.useState(0);\n const [mutedState, setMutedState] = React.useState(muted);\n const root = React.useRef<HTMLDivElement>(null);\n const [powered, setPowered] = React.useState(false);\n const reducedMotion = usePrefersReducedMotion();\n const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, \"\");\n const noiseId = `${uid}-noise`;\n const glassId = `${uid}-glass`;\n const shineId = `${uid}-shine`;\n\n useInView(root, setPowered);\n const player = src ? <VideoPlayer {...playerProps} src={src} className=\"kz-rtv-player\" aspectRatio=\"9 / 16\" autoPlay={autoPlay} muted={muted} loop={loop} preload={preload} /> : null;\n const knob = { channel: index * 50, sound: mutedState ? -50 : 50 };\n const screen = playlist?.length ? (\n <React.Suspense fallback={null}><PlaylistScreen playlist={playlist} transition={transition} labels={{ ...retroTvLabels, ...labels }} muted={mutedState} autoPlay={autoPlay} renderEmbed={renderEmbed} onMutedChange={onMutedChange} onIndexChange={onIndexChange} title={playerProps.title} reduced={reducedMotion} setMutedState={setMutedState} setIndex={setIndex} index={index} /></React.Suspense>\n ) : children ?? player;\n\n return (\n <div ref={root} className={[\"kz-rtv\", className].filter(Boolean).join(\" \")} data-variant={variant} data-powered={powered && !reducedMotion ? \"true\" : undefined} data-off={off ? \"true\" : undefined}>\n <style>{styles}</style>\n <div className=\"kz-rtv-frame\">\n <div className=\"kz-rtv-cabinet\" aria-hidden=\"true\">\n <div className=\"kz-rtv-body\">\n <div className=\"kz-rtv-bezel\" />\n <div className=\"kz-rtv-controls\">\n <span className=\"kz-rtv-knob\" data-hue=\"accent\" style={{ \"--kz-rtv-angle\": `${knob.channel}deg` } as React.CSSProperties} />\n <span className=\"kz-rtv-knob\" data-hue=\"accent\" style={{ \"--kz-rtv-angle\": `${knob.sound}deg` } as React.CSSProperties} />\n </div>\n <div className=\"kz-rtv-speaker\">{Array.from({ length: 7 }, (_, index) => <i key={index} />)}</div>\n </div>\n <div className=\"kz-rtv-stand\" />\n </div>\n {channel && <span className=\"kz-rtv-channel\">{channel}</span>}\n <div className=\"kz-rtv-screen\">\n {off ? (\n <svg className=\"kz-rtv-noise\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n <filter id={noiseId}><feTurbulence type=\"fractalNoise\" baseFrequency=\".85\" numOctaves=\"2\" stitchTiles=\"stitch\" /><feColorMatrix type=\"saturate\" values=\"0\" /></filter>\n <rect width=\"100%\" height=\"100%\" filter={`url(#${noiseId})`} />\n </svg>\n ) : (\n screen\n )}\n <div className=\"kz-rtv-effects\" aria-hidden=\"true\">\n <svg className=\"kz-rtv-glass\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\">\n <defs>\n <radialGradient id={shineId} cx=\"50%\" cy=\"42%\" r=\"68%\">\n <stop offset=\"0\" stopColor=\"var(--kz-surface-sheen)\" stopOpacity=\".12\" />\n <stop offset=\"1\" stopColor=\"var(--kz-scrim-strong)\" stopOpacity=\".2\" />\n </radialGradient>\n <filter id={glassId}>\n <feTurbulence baseFrequency=\".01 .04\" numOctaves=\"1\" seed=\"2\" result=\"curve\" />\n <feDisplacementMap in=\"SourceGraphic\" in2=\"curve\" scale=\"1.2\" xChannelSelector=\"R\" yChannelSelector=\"G\" />\n </filter>\n </defs>\n <rect width=\"100\" height=\"100\" fill={`url(#${shineId})`} filter={`url(#${glassId})`} />\n </svg>\n <span className=\"kz-rtv-glow\" />\n <span className=\"kz-rtv-power\" />\n </div>\n </div>\n {off && <span className=\"sr-only\">{playerProps.title}</span>}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAEA,YAAY,WAAW;AA4IA,cAab,YAba;AAnIvB,IAAM,iBAAuB,WAAK,MAAM,OAAO,wBAAmB,EAAE,KAAK,CAAC,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;AAEhH,IAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAyDR,IAAM,gBAA+B,EAAE,MAAM,QAAQ,OAAO,SAAS,MAAM,cAAc,UAAU,kBAAkB,UAAU,sBAAs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O,KAAK;AAAA,WAC/D,IAEA;AAAA,QAEF,qBAAC,SAAI,WAAU,kBAAiB,eAAY,QAC1C;AAAA,+BAAC,SAAI,WAAU,gBAAe,SAAQ,eAAc,qBAAoB,QACtE;AAAA,iCAAC,UACC;AAAA,mCAAC,oBAAe,IAAI,SAAS,IAAG,OAAM,IAAG,OAAM,GAAE,OAC/C;AAAA,oCAAC,UAAK,QAAO,KAAI,WAAU,2BAA0B,aAAY,OAAM;AAAA,gBACvE,oBAAC,UAAK,QAAO,KAAI,WAAU,0BAAyB,aAAY,MAAK;AAAA,iBACvE;AAAA,cACA,qBAAC,YAAO,IAAI,SACV;AAAA,oCAAC,kBAAa,eAAc,WAAU,YAAW,KAAI,MAAK,KAAI,QAAO,SAAQ;AAAA,gBAC7E,oBAAC,uBAAkB,IAAG,iBAAgB,KAAI,SAAQ,OAAM,OAAM,kBAAiB,KAAI,kBAAiB,KAAI;AAAA,iBAC1G;AAAA,eACF;AAAA,YACA,oBAAC,UAAK,OAAM,OAAM,QAAO,OAAM,MAAM,QAAQ,OAAO,KAAK,QAAQ,QAAQ,OAAO,KAAK;AAAA,aACvF;AAAA,UACA,oBAAC,UAAK,WAAU,eAAc;AAAA,UAC9B,oBAAC,UAAK,WAAU,gBAAe;AAAA,WACjC;AAAA,SACF;AAAA,MACC,OAAO,oBAAC,UAAK,WAAU,WAAW,sBAAY,OAAM;AAAA,OACrD;AAAA,KACF;AAEJ;","names":["index"]}
@@ -0,0 +1,242 @@
1
+ import * as z from 'zod/mini';
2
+
3
+ /** The owner's words, in each language; the product's message is the fallback when a language is absent. */
4
+ declare const localizedText: z.ZodMiniObject<{
5
+ fr: z.ZodMiniOptional<z.ZodMiniString<string>>;
6
+ en: z.ZodMiniOptional<z.ZodMiniString<string>>;
7
+ }, z.core.$strip>;
8
+ type LocalizedText = z.output<typeof localizedText>;
9
+
10
+ type Shape = z.ZodMiniObject;
11
+ type BlockShapes = Record<string, Shape>;
12
+ /** What a section of a type is, once parsed. */
13
+ type ParsedSection<T extends string, V extends string, S extends Shape, B extends BlockShapes> = {
14
+ key: string;
15
+ type: T;
16
+ variant: V;
17
+ disabled?: boolean | undefined;
18
+ settings: z.output<S>;
19
+ text?: {
20
+ title?: z.output<typeof localizedText> | undefined;
21
+ lead?: z.output<typeof localizedText> | undefined;
22
+ } | undefined;
23
+ blocks?: {
24
+ [K in keyof B & string]: {
25
+ key: string;
26
+ type: K;
27
+ settings: z.output<B[K]>;
28
+ text?: Record<string, z.output<typeof localizedText>> | undefined;
29
+ };
30
+ }[keyof B & string][] | undefined;
31
+ };
32
+ type SectionSpec<T extends string, V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes> = {
33
+ /** The type's name: the `type` of a section. */
34
+ type: T;
35
+ /** Its variants; the first is the default one. */
36
+ variants: V;
37
+ /** The zod schema of its settings. */
38
+ settings: S;
39
+ /** The settings a new section starts with. */
40
+ settingsDefault: z.input<S>;
41
+ /** The block types it allows, each with the zod schema of its settings. None: the section has no blocks. */
42
+ blocks?: B;
43
+ /** The checks that read the whole section (a count, a combination); `issue(path, message)` refuses it. */
44
+ refine?: (section: ParsedSection<T, V[number], S, B>, issue: (path: (string | number)[], message: string) => void) => void;
45
+ };
46
+ type SectionDefinitionOf<T extends string, V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes> = SectionSpec<T, V, S, B> & {
47
+ readonly defaultVariant: V[number];
48
+ readonly blockTypes: readonly (keyof B & string)[];
49
+ /** The zod schema of a section of this type. */
50
+ readonly schema: z.ZodMiniType<ParsedSection<T, V[number], S, B>>;
51
+ };
52
+ /** Defines a section type. */
53
+ declare function defineSection<const T extends string, const V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes = Record<never, never>>(spec: SectionSpec<T, V, S, B>): SectionDefinitionOf<T, V, S, B>;
54
+
55
+ /** Every section type, in the order the composer lists them. */
56
+ declare const SECTION_DEFINITIONS: readonly [SectionDefinitionOf<"hero", readonly ["poster", "split", "banner", "tv"], z.ZodMiniObject<{
57
+ media: z.ZodMiniOptional<z.ZodMiniString<string>>;
58
+ focus: z.ZodMiniEnum<{
59
+ center: "center";
60
+ top: "top";
61
+ bottom: "bottom";
62
+ }>;
63
+ }, z.core.$strip>, {
64
+ fact: z.ZodMiniObject<{
65
+ kind: z.ZodMiniEnum<{
66
+ "open-now": "open-now";
67
+ area: "area";
68
+ score: "score";
69
+ }>;
70
+ }, z.core.$strip>;
71
+ }>, SectionDefinitionOf<"services", readonly ["menu", "cards", "index", "carousel"], z.ZodMiniObject<{
72
+ source: z.ZodMiniEnum<{
73
+ all: "all";
74
+ pick: "pick";
75
+ }>;
76
+ groupBy: z.ZodMiniEnum<{
77
+ category: "category";
78
+ none: "none";
79
+ }>;
80
+ columns: z.ZodMiniUnion<[z.ZodMiniLiteral<1 | 2>, z.ZodMiniLiteral<1 | 2>]>;
81
+ aside: z.ZodMiniEnum<{
82
+ none: "none";
83
+ hours: "hours";
84
+ }>;
85
+ }, z.core.$strip>, {
86
+ service: z.ZodMiniObject<{
87
+ serviceId: z.ZodMiniString<string>;
88
+ }, z.core.$strip>;
89
+ }>, SectionDefinitionOf<"booking", readonly ["strip", "panel", "closing", "sticky"], z.ZodMiniObject<{
90
+ serviceId: z.ZodMiniOptional<z.ZodMiniString<string>>;
91
+ count: z.ZodMiniUnion<[z.ZodMiniLiteral<3 | 4 | 6>, z.ZodMiniLiteral<3 | 4 | 6>]>;
92
+ }, z.core.$strip>, Record<never, never>>, SectionDefinitionOf<"gallery", readonly ["mosaic", "filmstrip", "wall", "grid"], z.ZodMiniObject<{
93
+ source: z.ZodMiniEnum<{
94
+ all: "all";
95
+ pick: "pick";
96
+ }>;
97
+ texture: z.ZodMiniEnum<{
98
+ plaster: "plaster";
99
+ brick: "brick";
100
+ ridge: "ridge";
101
+ zellige: "zellige";
102
+ }>;
103
+ }, z.core.$strip>, {
104
+ photo: z.ZodMiniObject<{
105
+ mediaId: z.ZodMiniString<string>;
106
+ caption: z.ZodMiniOptional<z.ZodMiniString<string>>;
107
+ }, z.core.$strip>;
108
+ note: z.ZodMiniObject<{
109
+ text: z.ZodMiniString<string>;
110
+ signature: z.ZodMiniOptional<z.ZodMiniString<string>>;
111
+ }, z.core.$strip>;
112
+ sign: z.ZodMiniObject<{}, z.core.$strip>;
113
+ }>, SectionDefinitionOf<"video", readonly ["tv", "shorts"], z.ZodMiniObject<{
114
+ cabinet: z.ZodMiniEnum<{
115
+ cabinet: "cabinet";
116
+ portable: "portable";
117
+ }>;
118
+ channel: z.ZodMiniOptional<z.ZodMiniString<string>>;
119
+ }, z.core.$strip>, {
120
+ reel: z.ZodMiniObject<{
121
+ platform: z.ZodMiniEnum<{
122
+ tiktok: "tiktok";
123
+ "youtube-shorts": "youtube-shorts";
124
+ instagram: "instagram";
125
+ }>;
126
+ url: z.ZodMiniString<string>;
127
+ }, z.core.$strip>;
128
+ }>, SectionDefinitionOf<"reviews", readonly ["summary-cards", "quote", "strip"], z.ZodMiniObject<{
129
+ rule: z.ZodMiniEnum<{
130
+ best: "best";
131
+ latest: "latest";
132
+ }>;
133
+ count: z.ZodMiniUnion<[z.ZodMiniLiteral<3 | 1 | 2>, z.ZodMiniLiteral<3 | 1 | 2>]>;
134
+ }, z.core.$strip>, Record<never, never>>, SectionDefinitionOf<"bulletin", readonly ["board", "banner"], z.ZodMiniObject<{}, z.core.$strip>, {
135
+ flyer: z.ZodMiniObject<{
136
+ text: z.ZodMiniString<string>;
137
+ signature: z.ZodMiniOptional<z.ZodMiniString<string>>;
138
+ until: z.ZodMiniOptional<z.ZodMiniString<string>>;
139
+ }, z.core.$strip>;
140
+ }>, SectionDefinitionOf<"team", readonly ["row", "cards"], z.ZodMiniObject<{
141
+ source: z.ZodMiniEnum<{
142
+ all: "all";
143
+ pick: "pick";
144
+ }>;
145
+ }, z.core.$strip>, {
146
+ member: z.ZodMiniObject<{
147
+ memberId: z.ZodMiniString<string>;
148
+ }, z.core.$strip>;
149
+ }>, SectionDefinitionOf<"visit", readonly ["card", "map", "split"], z.ZodMiniObject<{
150
+ showPhone: z.ZodMiniBoolean<boolean>;
151
+ }, z.core.$strip>, Record<never, never>>, SectionDefinitionOf<"story", readonly ["quote", "owner"], z.ZodMiniObject<{
152
+ body: z.ZodMiniObject<{
153
+ fr: z.ZodMiniOptional<z.ZodMiniString<string>>;
154
+ en: z.ZodMiniOptional<z.ZodMiniString<string>>;
155
+ }, z.core.$strip>;
156
+ }, z.core.$strip>, Record<never, never>>, SectionDefinitionOf<"social", readonly ["links", "facade"], z.ZodMiniObject<{}, z.core.$strip>, {
157
+ link: z.ZodMiniObject<{
158
+ platform: z.ZodMiniEnum<{
159
+ tiktok: "tiktok";
160
+ "youtube-shorts": "youtube-shorts";
161
+ instagram: "instagram";
162
+ }>;
163
+ url: z.ZodMiniString<string>;
164
+ }, z.core.$strip>;
165
+ }>, SectionDefinitionOf<"faq", readonly ["list"], z.ZodMiniObject<{}, z.core.$strip>, {
166
+ question: z.ZodMiniObject<{
167
+ question: z.ZodMiniObject<{
168
+ fr: z.ZodMiniOptional<z.ZodMiniString<string>>;
169
+ en: z.ZodMiniOptional<z.ZodMiniString<string>>;
170
+ }, z.core.$strip>;
171
+ answer: z.ZodMiniObject<{
172
+ fr: z.ZodMiniOptional<z.ZodMiniString<string>>;
173
+ en: z.ZodMiniOptional<z.ZodMiniString<string>>;
174
+ }, z.core.$strip>;
175
+ }, z.core.$strip>;
176
+ }>, SectionDefinitionOf<"policies", readonly ["inline"], z.ZodMiniObject<{
177
+ show: z.ZodMiniArray<z.ZodMiniEnum<{
178
+ cancellation: "cancellation";
179
+ prices: "prices";
180
+ "booking-window": "booking-window";
181
+ }>>;
182
+ }, z.core.$strip>, Record<never, never>>];
183
+ type SectionDefinition = (typeof SECTION_DEFINITIONS)[number];
184
+ type SectionType = SectionDefinition["type"];
185
+ declare const SECTION_TYPES: readonly SectionType[];
186
+ /** The definition of a type. */
187
+ declare function sectionDefinition<T extends SectionType>(type: T): Extract<SectionDefinition, {
188
+ type: T;
189
+ }>;
190
+
191
+ /** The version of the document's format; migrations are pure functions schema n → n + 1 (`migrate.ts`). */
192
+ declare const SHOP_SCHEMA_VERSION = 1;
193
+ /** A look preset by id and version (`@krizaka/tokens`): `salon-atelier`. The mode is the visitor's, never stored. */
194
+ declare const presetRef: z.ZodMiniObject<{
195
+ id: z.ZodMiniString<string>;
196
+ version: z.ZodMiniInt;
197
+ }, z.core.$strip>;
198
+ declare const shopPageSchema: z.ZodMiniObject<{
199
+ schema: z.ZodMiniLiteral<1>;
200
+ preset: z.ZodMiniObject<{
201
+ id: z.ZodMiniString<string>;
202
+ version: z.ZodMiniInt;
203
+ }, z.core.$strip>;
204
+ density: z.ZodMiniOptional<z.ZodMiniEnum<{
205
+ compact: "compact";
206
+ airy: "airy";
207
+ }>>;
208
+ accent: z.ZodMiniOptional<z.ZodMiniString<string>>;
209
+ sections: z.ZodMiniArray<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<Readonly<{
210
+ [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
211
+ }>, z.core.$strip>, ...z.ZodMiniObject<Readonly<{
212
+ [k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
213
+ }>, z.core.$strip>[]], "type">>;
214
+ }, z.core.$strip>;
215
+ /** A section of any type, as parsed: its `settings` and `blocks` are the type's own. */
216
+ type Section = z.output<(typeof SECTION_DEFINITIONS)[number]["schema"]>;
217
+ type ShopPage = {
218
+ schema: typeof SHOP_SCHEMA_VERSION;
219
+ preset: z.output<typeof presetRef>;
220
+ density?: "compact" | "airy" | undefined;
221
+ accent?: string | undefined;
222
+ sections: Section[];
223
+ };
224
+ type SectionOf<T extends SectionType> = Extract<Section, {
225
+ type: T;
226
+ }>;
227
+ type ShopPageIssue = {
228
+ path: string;
229
+ message: string;
230
+ };
231
+ type ShopPageResult = {
232
+ ok: true;
233
+ page: ShopPage;
234
+ } | {
235
+ ok: false;
236
+ issues: ShopPageIssue[];
237
+ };
238
+ /** Validates a document; an invalid one answers every issue with its path (`sections.2.variant`), for a 422. */
239
+ declare function parseShopPage(input: unknown): ShopPageResult;
240
+
241
+ export { SECTION_DEFINITIONS as b, SECTION_TYPES as c, SHOP_SCHEMA_VERSION as d, defineSection as k, shopPageSchema as l, parseShopPage as p, sectionDefinition as s };
242
+ export type { LocalizedText as L, ParsedSection as P, ShopPage as S, Section as a, SectionDefinition as e, SectionOf as f, SectionSpec as g, SectionType as h, ShopPageIssue as i, ShopPageResult as j };
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { L as LinkComponent } from '../block-link-BAg4eoZk.js';
3
- import { ShopPhoto } from '../shop.js';
3
+ import { ShopSectionProps, ShopPhoto } from '../shop.js';
4
4
 
5
5
  type BookingVariant = "strip" | "panel" | "closing" | "sticky";
6
6
  /** `closing`: the second action beside « Book » (`Call`, `Directions`): the host chooses it from the shop's settings. */
@@ -15,7 +15,7 @@ type BookingTime = {
15
15
  /** The booking page with this time chosen. */
16
16
  href: string;
17
17
  };
18
- type BookingSectionProps = Omit<React.ComponentProps<"section">, "title"> & {
18
+ type BookingSectionProps = Omit<React.ComponentProps<"section">, "title"> & Pick<ShopSectionProps, "mascot"> & {
19
19
  /** @default "strip" */
20
20
  variant?: BookingVariant;
21
21
  /** `strip`: the next free times, in order (the first `count`). */
@@ -6,7 +6,7 @@ import {
6
6
  } from "../chunk-5D7NMUF6.js";
7
7
  import {
8
8
  ShopSection
9
- } from "../chunk-A7MQPIEG.js";
9
+ } from "../chunk-M3T5RQYV.js";
10
10
  import {
11
11
  Page,
12
12
  cn
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/shop/booking/booking.tsx"],"sourcesContent":["// Server-safe (the phone bar is a client island imported through its own entry). The way to book (ADR-007 §3): `strip` —\n// the next free times, one tap each, in one line; `panel` — the closing call in a box; `closing` — the closing call of a look (the shop's photo or mark, the next free time, Book); `sticky` — the phone bar, held at the bottom\n// edge and never over content. The times are resolved by the product: the section draws them, it never fetches.\nimport { buttonVariants } from \"@krizaka/ui/button\";\nimport { CtaPanel } from \"@krizaka/ui/cta-panel\";\nimport { StickyAction } from \"@krizaka/ui/sticky-action\";\nimport * as React from \"react\";\n\nimport { BlockLink, type LinkComponent } from \"../../block-link\";\nimport { cn } from \"../../cn\";\nimport { Page } from \"../../page/page\";\nimport { type ShopPhoto, ShopSection } from \"../frame\";\nimport { Photo } from \"../photo\";\n\nexport type BookingVariant = \"strip\" | \"panel\" | \"closing\" | \"sticky\";\n\n/** `closing`: the second action beside « Book » (`Call`, `Directions`): the host chooses it from the shop's settings. */\nexport type BookingSecondary = { label: string; href: string };\n\nexport type BookingTime = {\n id: string;\n /** In words, formatted by the app (`Today 4:30 pm`). */\n label: string;\n /** The booking page with this time chosen. */\n href: string;\n};\n\nexport type BookingSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** @default \"strip\" */\n variant?: BookingVariant;\n /** `strip`: the next free times, in order (the first `count`). */\n times?: readonly BookingTime[];\n /** `strip`: the group's name (`Next free times`). */\n label: string;\n /** `strip`: said when no time is free. */\n emptyLabel?: string;\n /** The booking page (`All times →`, `Book`). */\n href: string;\n /** The words of that link / button. */\n actionLabel: string;\n /** `panel`: the invitation (`Ready when you are`), and why. */\n title?: React.ReactNode;\n body?: React.ReactNode;\n /** `closing`: the shop's photo, one the page does not already show (the host plans it). Wins over `mark`. */\n photo?: ShopPhoto;\n /** `closing`: the shop's mark, when there is no photo. Decorative (hidden from assistive technology). */\n mark?: React.ReactNode;\n /**\n * `closing`: the next free time (`Tomorrow 9 am`). On a closed day it is the next opening's. Absent, the call is the\n * title and the primary action alone: never an empty box.\n */\n nextTime?: BookingTime;\n /** `closing`: the words before the time (`Next free time`). */\n nextTimeLabel?: string;\n /** `closing`: « Call » or « Directions ». */\n secondary?: BookingSecondary;\n linkAs?: LinkComponent;\n /** `sticky`: the selector of the page's own action (`#hero-book`): while it is on screen the bar hides. */\n hideWhileVisible?: string;\n};\n\ntype ClosingCallProps = Omit<React.ComponentProps<\"section\">, \"title\"> &\n Pick<BookingSectionProps, \"body\" | \"photo\" | \"mark\" | \"nextTime\" | \"nextTimeLabel\" | \"secondary\" | \"href\" | \"actionLabel\" | \"linkAs\"> & { title: React.ReactNode };\n\n/** The photo, or the mark when there is none, or nothing: the call then reads on one column. */\nfunction ClosingMedia({ photo, mark }: Pick<BookingSectionProps, \"photo\" | \"mark\">) {\n if (photo) return <Photo photo={photo} ratio=\"4/3\" sizes=\"(min-width: 64rem) 36rem, calc(100vw - 2rem)\" />;\n if (!mark) return null;\n return (\n <div aria-hidden className=\"grid aspect-[4/3] w-full place-items-center overflow-hidden rounded-xl bg-accent-soft text-fg-accent [&>svg]:h-1/2 [&>svg]:w-auto\">\n {mark}\n </div>\n );\n}\n\nfunction ClosingCall({ title, body, photo, mark, nextTime, nextTimeLabel, secondary, href, actionLabel, linkAs, className, ...props }: ClosingCallProps) {\n const headingId = React.useId();\n const hasMedia = Boolean(photo ?? mark);\n return (\n <ShopSection aria-labelledby={headingId} data-variant=\"closing\" bleed className={className} {...props}>\n <Page>\n <div className={cn(\"grid items-center gap-6 rounded-2xl bg-surface-1 p-4 sm:p-6 lg:gap-10 lg:p-8\", hasMedia && \"lg:grid-cols-[minmax(0,5fr)_minmax(0,6fr)]\")}>\n <ClosingMedia photo={photo} mark={mark} />\n <div className=\"flex min-w-0 flex-col items-start gap-4\">\n <h2 id={headingId} className=\"m-0 text-2xl font-bold leading-tight text-fg sm:text-3xl\">\n {title}\n </h2>\n {body ? <p className=\"m-0 max-w-prose text-[15px] leading-relaxed text-fg-secondary\">{body}</p> : null}\n {nextTime ? (\n <p className=\"m-0 flex flex-wrap items-center gap-2 text-sm text-fg-secondary\">\n {nextTimeLabel ? <span>{nextTimeLabel}</span> : null}\n <BlockLink href={nextTime.href} linkAs={linkAs} className=\"inline-flex min-h-11 items-center rounded-md border border-border-control bg-surface-2 px-3 text-sm font-semibold tabular-nums text-fg no-underline hover:border-accent hover:bg-accent-soft focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\">\n {nextTime.label}\n </BlockLink>\n </p>\n ) : null}\n <div className=\"flex flex-wrap items-center gap-3\">\n <BlockLink href={href} linkAs={linkAs} className={cn(buttonVariants({ variant: \"primary\", size: \"lg\" }), \"no-underline\")}>\n {actionLabel}\n </BlockLink>\n {secondary ? (\n <BlockLink href={secondary.href} linkAs={linkAs} className={cn(buttonVariants({ variant: \"secondary\", size: \"lg\" }), \"no-underline\")}>\n {secondary.label}\n </BlockLink>\n ) : null}\n </div>\n </div>\n </div>\n </Page>\n </ShopSection>\n );\n}\n\n/** The way to book: the next free times, a closing call, or the phone bar. */\nexport function BookingSection({ variant = \"strip\", times = [], label, emptyLabel, href, actionLabel, title, body, linkAs, hideWhileVisible, photo, mark, nextTime, nextTimeLabel, secondary, className, ...props }: BookingSectionProps) {\n const action = (size: \"md\" | \"lg\") => (\n <BlockLink href={href} linkAs={linkAs} className={cn(buttonVariants({ variant: \"primary\", size }), \"no-underline\")}>\n {actionLabel}\n </BlockLink>\n );\n if (variant === \"sticky\") {\n return (\n <StickyAction hideWhileVisible={hideWhileVisible} data-variant=\"sticky\" className={className} {...(props as object)}>\n <BlockLink href={href} linkAs={linkAs} className={cn(buttonVariants({ variant: \"primary\", size: \"lg\" }), \"w-full justify-center no-underline\")}>\n {actionLabel}\n </BlockLink>\n </StickyAction>\n );\n }\n if (variant === \"closing\") {\n return <ClosingCall title={title ?? label} body={body} photo={photo} mark={mark} nextTime={nextTime} nextTimeLabel={nextTimeLabel} secondary={secondary} href={href} actionLabel={actionLabel} linkAs={linkAs} className={className} {...props} />;\n }\n if (variant === \"panel\") {\n return (\n <ShopSection aria-label={typeof title === \"string\" ? title : label} data-variant=\"panel\" className={className} {...props}>\n <CtaPanel title={title ?? label} body={body}>\n {action(\"lg\")}\n </CtaPanel>\n </ShopSection>\n );\n }\n return (\n <ShopSection aria-label={label} data-variant=\"strip\" className={className} {...props}>\n <div className=\"flex flex-wrap items-center gap-x-3 gap-y-2 rounded-xl border border-border-default bg-surface-1 p-3 sm:px-4\">\n <p className=\"m-0 order-1 text-sm font-semibold text-fg\">{label}</p>\n {times.length > 0 ? (\n <ul className=\"m-0 order-3 grid w-full list-none grid-cols-2 gap-2 p-0 sm:order-2 sm:flex sm:w-auto sm:min-w-0 sm:flex-1 sm:flex-wrap\">\n {times.map((t) => (\n <li key={t.id}>\n <BlockLink href={t.href} linkAs={linkAs} className=\"inline-flex min-h-11 items-center rounded-md border border-border-control bg-surface-2 px-3 text-[13px] font-semibold tabular-nums text-fg no-underline hover:border-accent hover:bg-accent-soft focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\">\n {t.label}\n </BlockLink>\n </li>\n ))}\n </ul>\n ) : (\n <p className=\"m-0 order-3 w-full text-sm text-fg-secondary sm:order-2 sm:w-auto sm:flex-1\">{emptyLabel}</p>\n )}\n <BlockLink href={href} linkAs={linkAs} className=\"order-2 ml-auto inline-flex min-h-11 items-center gap-1 text-[13px] sm:order-3 font-semibold text-fg-accent no-underline hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\">\n {actionLabel} <span aria-hidden>→</span>\n </BlockLink>\n </div>\n </ShopSection>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAGA,SAAS,sBAAsB;AAC/B,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,YAAY,WAAW;AA4DH,cAuBN,YAvBM;AADpB,SAAS,aAAa,EAAE,OAAO,KAAK,GAAgD;AAClF,MAAI,MAAO,QAAO,oBAAC,SAAM,OAAc,OAAM,OAAM,OAAM,gDAA+C;AACxG,MAAI,CAAC,KAAM,QAAO;AAClB,SACE,oBAAC,SAAI,eAAW,MAAC,WAAU,qIACxB,gBACH;AAEJ;AAEA,SAAS,YAAY,EAAE,OAAO,MAAM,OAAO,MAAM,UAAU,eAAe,WAAW,MAAM,aAAa,QAAQ,WAAW,GAAG,MAAM,GAAqB;AACvJ,QA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AC,gBAAa,kBAAoC,gBAAa,UAAS,WAAuB,GAAI,OACjG,8BAAC,aAAU,MAAY,QAAgB,WAAW,GAAG,eAAe,EAAE,SAAS,WAAW,MAAM,KAAK,CAAC,GAAG,oCAAoC,GAC1I,uBACH,GACF;AAAA,EAEJ;AACA,MAAI,YAAY,WAAW;AACzB,WAAO,oBAAC,eAAY,OAAO,SAAS,OAAO,MAAY,OAAc,MAAY,UAAoB,eAA8B,WAAsB,MAAY,aAA0B,QAAgB,WAAuB,GAAG,OAAO;AAAA,EAClP;AACA,MAAI,YAAY,SAAS;AACvB,WACE,oBAAC,eAAY,cAAY,OAAO,UAAU,WAAW,QAAQ,OAAO,gBAAa,SAAQ,WAAuB,GAAG,OACjH,8BAAC,YAAS,OAAO,SAAS,OAAO,MAC9B,iBAAO,IAAI,GACd,GACF;AAAA,EAEJ;AACA,SACE,oBAAC,eAAY,cAAY,OAAO,gBAAa,SAAQ,WAAuB,GAAG,OAC7E,+BAAC,SAAI,WAAU,gHACb;AAAA,wBAAC,OAAE,WAAU,6CAA6C,iBAAM;AAAA,IAC/D,MAAM,SAAS,IACd,oBAAC,QAAG,WAAU,0HACX,gBAAM,IAAI,CAAC,MACV,oBAAC,QACC,8BAAC,aAAU,MAAM,EAAE,MAAM,QAAgB,WAAU,sRAChD,YAAE,OACL,KAHO,EAAE,EAIX,CACD,GACH,IAEA,oBAAC,OAAE,WAAU,+EAA+E,sBAAW;AAAA,IAEzG,qBAAC,aAAU,MAAY,QAAgB,WAAU,8NAC9C;AAAA;AAAA,MAAY;AAAA,MAAC,oBAAC,UAAK,eAAW,MAAC,oBAAC;AAAA,OACnC;AAAA,KACF,GACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/shop/booking/booking.tsx"],"sourcesContent":["// Server-safe (the phone bar is a client island imported through its own entry). The way to book (ADR-007 §3): `strip` —\n// the next free times, one tap each, in one line; `panel` — the closing call in a box; `closing` — the closing call of a look (the shop's photo or mark, the next free time, Book); `sticky` — the phone bar, held at the bottom\n// edge and never over content. The times are resolved by the product: the section draws them, it never fetches.\nimport { buttonVariants } from \"@krizaka/ui/button\";\nimport { CtaPanel } from \"@krizaka/ui/cta-panel\";\nimport { StickyAction } from \"@krizaka/ui/sticky-action\";\nimport * as React from \"react\";\n\nimport { BlockLink, type LinkComponent } from \"../../block-link\";\nimport { cn } from \"../../cn\";\nimport { Page } from \"../../page/page\";\nimport { type ShopPhoto, ShopSection, type ShopSectionProps } from \"../frame\";\nimport { Photo } from \"../photo\";\n\nexport type BookingVariant = \"strip\" | \"panel\" | \"closing\" | \"sticky\";\n\n/** `closing`: the second action beside « Book » (`Call`, `Directions`): the host chooses it from the shop's settings. */\nexport type BookingSecondary = { label: string; href: string };\n\nexport type BookingTime = {\n id: string;\n /** In words, formatted by the app (`Today 4:30 pm`). */\n label: string;\n /** The booking page with this time chosen. */\n href: string;\n};\n\nexport type BookingSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & Pick<ShopSectionProps, \"mascot\"> & {\n /** @default \"strip\" */\n variant?: BookingVariant;\n /** `strip`: the next free times, in order (the first `count`). */\n times?: readonly BookingTime[];\n /** `strip`: the group's name (`Next free times`). */\n label: string;\n /** `strip`: said when no time is free. */\n emptyLabel?: string;\n /** The booking page (`All times →`, `Book`). */\n href: string;\n /** The words of that link / button. */\n actionLabel: string;\n /** `panel`: the invitation (`Ready when you are`), and why. */\n title?: React.ReactNode;\n body?: React.ReactNode;\n /** `closing`: the shop's photo, one the page does not already show (the host plans it). Wins over `mark`. */\n photo?: ShopPhoto;\n /** `closing`: the shop's mark, when there is no photo. Decorative (hidden from assistive technology). */\n mark?: React.ReactNode;\n /**\n * `closing`: the next free time (`Tomorrow 9 am`). On a closed day it is the next opening's. Absent, the call is the\n * title and the primary action alone: never an empty box.\n */\n nextTime?: BookingTime;\n /** `closing`: the words before the time (`Next free time`). */\n nextTimeLabel?: string;\n /** `closing`: « Call » or « Directions ». */\n secondary?: BookingSecondary;\n linkAs?: LinkComponent;\n /** `sticky`: the selector of the page's own action (`#hero-book`): while it is on screen the bar hides. */\n hideWhileVisible?: string;\n};\n\ntype ClosingCallProps = Omit<React.ComponentProps<\"section\">, \"title\"> & Pick<ShopSectionProps, \"mascot\"> &\n Pick<BookingSectionProps, \"body\" | \"photo\" | \"mark\" | \"nextTime\" | \"nextTimeLabel\" | \"secondary\" | \"href\" | \"actionLabel\" | \"linkAs\"> & { title: React.ReactNode };\n\n/** The photo, or the mark when there is none, or nothing: the call then reads on one column. */\nfunction ClosingMedia({ photo, mark }: Pick<BookingSectionProps, \"photo\" | \"mark\">) {\n if (photo) return <Photo photo={photo} ratio=\"4/3\" sizes=\"(min-width: 64rem) 36rem, calc(100vw - 2rem)\" />;\n if (!mark) return null;\n return (\n <div aria-hidden className=\"grid aspect-[4/3] w-full place-items-center overflow-hidden rounded-xl bg-accent-soft text-fg-accent [&>svg]:h-1/2 [&>svg]:w-auto\">\n {mark}\n </div>\n );\n}\n\nfunction ClosingCall({ title, body, photo, mark, nextTime, nextTimeLabel, secondary, href, actionLabel, linkAs, className, ...props }: ClosingCallProps) {\n const headingId = React.useId();\n const hasMedia = Boolean(photo ?? mark);\n return (\n <ShopSection aria-labelledby={headingId} data-variant=\"closing\" bleed className={className} {...props}>\n <Page>\n <div className={cn(\"grid items-center gap-6 rounded-2xl bg-surface-1 p-4 sm:p-6 lg:gap-10 lg:p-8\", hasMedia && \"lg:grid-cols-[minmax(0,5fr)_minmax(0,6fr)]\")}>\n <ClosingMedia photo={photo} mark={mark} />\n <div className=\"flex min-w-0 flex-col items-start gap-4\">\n <h2 id={headingId} className=\"m-0 text-2xl font-bold leading-tight text-fg sm:text-3xl\">\n {title}\n </h2>\n {body ? <p className=\"m-0 max-w-prose text-[15px] leading-relaxed text-fg-secondary\">{body}</p> : null}\n {nextTime ? (\n <p className=\"m-0 flex flex-wrap items-center gap-2 text-sm text-fg-secondary\">\n {nextTimeLabel ? <span>{nextTimeLabel}</span> : null}\n <BlockLink href={nextTime.href} linkAs={linkAs} className=\"inline-flex min-h-11 items-center rounded-md border border-border-control bg-surface-2 px-3 text-sm font-semibold tabular-nums text-fg no-underline hover:border-accent hover:bg-accent-soft focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\">\n {nextTime.label}\n </BlockLink>\n </p>\n ) : null}\n <div className=\"flex flex-wrap items-center gap-3\">\n <BlockLink href={href} linkAs={linkAs} className={cn(buttonVariants({ variant: \"primary\", size: \"lg\" }), \"no-underline\")}>\n {actionLabel}\n </BlockLink>\n {secondary ? (\n <BlockLink href={secondary.href} linkAs={linkAs} className={cn(buttonVariants({ variant: \"secondary\", size: \"lg\" }), \"no-underline\")}>\n {secondary.label}\n </BlockLink>\n ) : null}\n </div>\n </div>\n </div>\n </Page>\n </ShopSection>\n );\n}\n\n/** The way to book: the next free times, a closing call, or the phone bar. */\nexport function BookingSection({ variant = \"strip\", times = [], label, emptyLabel, href, actionLabel, title, body, linkAs, hideWhileVisible, photo, mark, nextTime, nextTimeLabel, secondary, className, ...props }: BookingSectionProps) {\n const action = (size: \"md\" | \"lg\") => (\n <BlockLink href={href} linkAs={linkAs} className={cn(buttonVariants({ variant: \"primary\", size }), \"no-underline\")}>\n {actionLabel}\n </BlockLink>\n );\n if (variant === \"sticky\") {\n return (\n <StickyAction hideWhileVisible={hideWhileVisible} data-variant=\"sticky\" className={className} {...(props as object)}>\n <BlockLink href={href} linkAs={linkAs} className={cn(buttonVariants({ variant: \"primary\", size: \"lg\" }), \"w-full justify-center no-underline\")}>\n {actionLabel}\n </BlockLink>\n </StickyAction>\n );\n }\n if (variant === \"closing\") {\n return <ClosingCall title={title ?? label} body={body} photo={photo} mark={mark} nextTime={nextTime} nextTimeLabel={nextTimeLabel} secondary={secondary} href={href} actionLabel={actionLabel} linkAs={linkAs} className={className} {...props} />;\n }\n if (variant === \"panel\") {\n return (\n <ShopSection aria-label={typeof title === \"string\" ? title : label} data-variant=\"panel\" className={className} {...props}>\n <CtaPanel title={title ?? label} body={body}>\n {action(\"lg\")}\n </CtaPanel>\n </ShopSection>\n );\n }\n return (\n <ShopSection aria-label={label} data-variant=\"strip\" className={className} {...props}>\n <div className=\"flex flex-wrap items-center gap-x-3 gap-y-2 rounded-xl border border-border-default bg-surface-1 p-3 sm:px-4\">\n <p className=\"m-0 order-1 text-sm font-semibold text-fg\">{label}</p>\n {times.length > 0 ? (\n <ul className=\"m-0 order-3 grid w-full list-none grid-cols-2 gap-2 p-0 sm:order-2 sm:flex sm:w-auto sm:min-w-0 sm:flex-1 sm:flex-wrap\">\n {times.map((t) => (\n <li key={t.id}>\n <BlockLink href={t.href} linkAs={linkAs} className=\"inline-flex min-h-11 items-center rounded-md border border-border-control bg-surface-2 px-3 text-[13px] font-semibold tabular-nums text-fg no-underline hover:border-accent hover:bg-accent-soft focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\">\n {t.label}\n </BlockLink>\n </li>\n ))}\n </ul>\n ) : (\n <p className=\"m-0 order-3 w-full text-sm text-fg-secondary sm:order-2 sm:w-auto sm:flex-1\">{emptyLabel}</p>\n )}\n <BlockLink href={href} linkAs={linkAs} className=\"order-2 ml-auto inline-flex min-h-11 items-center gap-1 text-[13px] sm:order-3 font-semibold text-fg-accent no-underline hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\">\n {actionLabel} <span aria-hidden>→</span>\n </BlockLink>\n </div>\n </ShopSection>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAGA,SAAS,sBAAsB;AAC/B,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,YAAY,WAAW;AA4DH,cAuBN,YAvBM;AADpB,SAAS,aAAa,EAAE,OAAO,KAAK,GAAgD;AAClF,MAAI,MAAO,QAAO,oBAAC,SAAM,OAAc,OAAM,OAAM,OAAM,gDAA+C;AACxG,MAAI,CAAC,KAAM,QAAO;AAClB,SACE,oBAAC,SAAI,eAAW,MAAC,WAAU,qIACxB,gBACH;AAEJ;AAEA,SAAS,YA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
- } from "../chunk-A7MQPIEG.js";
6
+ } from "../chunk-M3T5RQYV.js";
7
7
  import {
8
8
  cn
9
9
  } from "../chunk-B47WSPMP.js";
@@ -1,11 +1,12 @@
1
1
  import * as React from 'react';
2
+ import { ShopSectionProps } from '../shop.js';
2
3
 
3
4
  type ShopQuestion = {
4
5
  id: string;
5
6
  question: string;
6
7
  answer: string;
7
8
  };
8
- type FaqSectionProps = Omit<React.ComponentProps<"section">, "title"> & {
9
+ type FaqSectionProps = Omit<React.ComponentProps<"section">, "title"> & Pick<ShopSectionProps, "mascot"> & {
9
10
  /** @default "list" */
10
11
  variant?: "list";
11
12
  title: React.ReactNode;
package/dist/shop/faq.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ShopSection
3
- } from "../chunk-A7MQPIEG.js";
3
+ } from "../chunk-M3T5RQYV.js";
4
4
  import "../chunk-B47WSPMP.js";
5
5
 
6
6
  // src/shop/faq/faq.tsx
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/shop/faq/faq.tsx"],"sourcesContent":["// Server-safe. The questions clients ask (ADR-007 §3): a native `details` each — no script — and the page's FAQPage\n// JSON-LD, so a search engine reads the same answers.\nimport * as React from \"react\";\n\nimport { ShopSection } from \"../frame\";\n\nexport type ShopQuestion = { id: string; question: string; answer: string };\n\nexport type FaqSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** @default \"list\" */\n variant?: \"list\";\n title: React.ReactNode;\n questions: readonly ShopQuestion[];\n};\n\n/** The FAQPage structured data of a list of questions, as a JSON string safe inside a `script`. */\nexport function faqJsonLd(questions: readonly ShopQuestion[]): string {\n const data = {\n \"@context\": \"https://schema.org\",\n \"@type\": \"FAQPage\",\n mainEntity: questions.map((q) => ({ \"@type\": \"Question\", name: q.question, acceptedAnswer: { \"@type\": \"Answer\", text: q.answer } })),\n };\n return JSON.stringify(data).replace(/</g, \"\\\\u003c\");\n}\n\n/** The questions and their answers. */\nexport function FaqSection({ title, questions, className, ...props }: FaqSectionProps) {\n if (questions.length === 0) return null;\n return (\n <ShopSection title={title} className={className} data-variant=\"list\" {...props}>\n <div className=\"max-w-3xl divide-y divide-border-subtle border-y border-border-subtle\">\n {questions.map((q) => (\n <details key={q.id} className=\"group py-3\">\n <summary className=\"flex min-h-11 cursor-pointer list-none items-center justify-between gap-4 font-semibold text-fg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring [&::-webkit-details-marker]:hidden\">\n {q.question}\n <span aria-hidden className=\"shrink-0 text-fg-secondary transition-transform group-open:rotate-45 motion-reduce:transition-none\">+</span>\n </summary>\n <p className=\"m-0 mt-2 text-[15px] leading-relaxed text-fg-secondary\">{q.answer}</p>\n </details>\n ))}\n </div>\n <script type=\"application/ld+json\" dangerouslySetInnerHTML={{ __html: faqJsonLd(questions) }} />\n </ShopSection>\n );\n}\n"],"mappings":";;;;;;AAiCY,SAEE,KAFF;AAjBL,SAAS,UAAU,WAA4C;AACpE,QAAM,OAAO;AAAA,IACX,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,YAAY,UAAU,IAAI,CAAC,OAAO,EAAE,SAAS,YAAY,MAAM,EAAE,UAAU,gBAAgB,EAAE,SAAS,UAAU,MAAM,EAAE,OAAO,EAAE,EAAE;AAAA,EACrI;AACA,SAAO,KAAK,UAAU,IAAI,EAAE,QAAQ,MAAM,SAAS;AACrD;AAGO,SAAS,WAAW,EAAE,OAAO,WAAW,WAAW,GAAG,MAAM,GAAoB;AACrF,MAAI,UAAU,WAAW,EAAG,QAAO;AACnC,SACE,qBAAC,eAAY,OAAc,WAAsB,gBAAa,QAAQ,GAAG,OACvE;AAAA,wBAAC,SAAI,WAAU,yEACZ,oBAAU,IAAI,CAAC,MACd,qBAAC,aAAmB,WAAU,cAC5B;AAAA,2BAAC,aAAQ,WAAU,wNAChB;AAAA,UAAE;AAAA,QACH,oBAAC,UAAK,eAAW,MAAC,WAAU,sGAAqG,eAAC;AAAA,SACpI;AAAA,MACA,oBAAC,OAAE,WAAU,0DAA0D,YAAE,QAAO;AAAA,SALpE,EAAE,EAMhB,CACD,GACH;AAAA,IACA,oBAAC,YAAO,MAAK,uBAAsB,yBAAyB,EAAE,QAAQ,UAAU,SAAS,EAAE,GAAG;AAAA,KAChG;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/shop/faq/faq.tsx"],"sourcesContent":["// Server-safe. The questions clients ask (ADR-007 §3): a native `details` each — no script — and the page's FAQPage\n// JSON-LD, so a search engine reads the same answers.\nimport * as React from \"react\";\n\nimport { ShopSection, type ShopSectionProps } from \"../frame\";\n\nexport type ShopQuestion = { id: string; question: string; answer: string };\n\nexport type FaqSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & Pick<ShopSectionProps, \"mascot\"> & {\n /** @default \"list\" */\n variant?: \"list\";\n title: React.ReactNode;\n questions: readonly ShopQuestion[];\n};\n\n/** The FAQPage structured data of a list of questions, as a JSON string safe inside a `script`. */\nexport function faqJsonLd(questions: readonly ShopQuestion[]): string {\n const data = {\n \"@context\": \"https://schema.org\",\n \"@type\": \"FAQPage\",\n mainEntity: questions.map((q) => ({ \"@type\": \"Question\", name: q.question, acceptedAnswer: { \"@type\": \"Answer\", text: q.answer } })),\n };\n return JSON.stringify(data).replace(/</g, \"\\\\u003c\");\n}\n\n/** The questions and their answers. */\nexport function FaqSection({ title, questions, className, ...props }: FaqSectionProps) {\n if (questions.length === 0) return null;\n return (\n <ShopSection title={title} className={className} data-variant=\"list\" {...props}>\n <div className=\"max-w-3xl divide-y divide-border-subtle border-y border-border-subtle\">\n {questions.map((q) => (\n <details key={q.id} className=\"group py-3\">\n <summary className=\"flex min-h-11 cursor-pointer list-none items-center justify-between gap-4 font-semibold text-fg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring [&::-webkit-details-marker]:hidden\">\n {q.question}\n <span aria-hidden className=\"shrink-0 text-fg-secondary transition-transform group-open:rotate-45 motion-reduce:transition-none\">+</span>\n </summary>\n <p className=\"m-0 mt-2 text-[15px] leading-relaxed text-fg-secondary\">{q.answer}</p>\n </details>\n ))}\n </div>\n <script type=\"application/ld+json\" dangerouslySetInnerHTML={{ __html: faqJsonLd(questions) }} />\n </ShopSection>\n );\n}\n"],"mappings":";;;;;;AAiCY,SAEE,KAFF;AAjBL,SAAS,UAAU,WAA4C;AACpE,QAAM,OAAO;AAAA,IACX,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,YAAY,UAAU,IAAI,CAAC,OAAO,EAAE,SAAS,YAAY,MAAM,EAAE,UAAU,gBAAgB,EAAE,SAAS,UAAU,MAAM,EAAE,OAAO,EAAE,EAAE;AAAA,EACrI;AACA,SAAO,KAAK,UAAU,IAAI,EAAE,QAAQ,MAAM,SAAS;AACrD;AAGO,SAAS,WAAW,EAAE,OAAO,WAAW,WAAW,GAAG,MAAM,GAAoB;AACrF,MAAI,UAAU,WAAW,EAAG,QAAO;AACnC,SACE,qBAAC,eAAY,OAAc,WAAsB,gBAAa,QAAQ,GAAG,OACvE;AAAA,wBAAC,SAAI,WAAU,yEACZ,oBAAU,IAAI,CAAC,MACd,qBAAC,aAAmB,WAAU,cAC5B;AAAA,2BAAC,aAAQ,WAAU,wNAChB;AAAA,UAAE;AAAA,QACH,oBAAC,UAAK,eAAW,MAAC,WAAU,sGAAqG,eAAC;AAAA,SACpI;AAAA,MACA,oBAAC,OAAE,WAAU,0DAA0D,YAAE,QAAO;AAAA,SALpE,EAAE,EAMhB,CACD,GACH;AAAA,IACA,oBAAC,YAAO,MAAK,uBAAsB,yBAAyB,EAAE,QAAQ,UAAU,SAAS,EAAE,GAAG;AAAA,KAChG;AAEJ;","names":[]}
@@ -6,7 +6,7 @@ import {
6
6
  } from "../chunk-ZYHWJ7U5.js";
7
7
  import {
8
8
  ShopSection
9
- } from "../chunk-A7MQPIEG.js";
9
+ } from "../chunk-M3T5RQYV.js";
10
10
  import {
11
11
  cn
12
12
  } from "../chunk-B47WSPMP.js";
@@ -0,0 +1,43 @@
1
+ import * as _krizaka_tokens_shop_presets from '@krizaka/tokens/shop-presets';
2
+ import { ShopPage, Section } from '../shop.js';
3
+ import { MascotBird } from '@krizaka/ui/mascots';
4
+ import * as React from 'react';
5
+ import 'zod/mini';
6
+
7
+ /** What `applyLook` reads of a look: its id and version, and one variant per section type. */
8
+ type ShopLookLike = {
9
+ id: string;
10
+ version: number;
11
+ variants: Readonly<Record<string, string>>;
12
+ };
13
+ /** The six looks, in the order of the addendum (Cahier first). */
14
+ declare const SHOP_LOOKS: _krizaka_tokens_shop_presets.ShopPreset[];
15
+ /** A look by id, or undefined for a trade preset or an unknown id. */
16
+ declare const shopLookOf: (id: string) => _krizaka_tokens_shop_presets.ShopPreset | undefined;
17
+ /**
18
+ * The page wearing a look: its preset reference, the look's own density and accent, and the variants of its sections. Everything
19
+ * else is the owner's and stays: `applyLook(applyLook(p, a), b)` has the content of `p`.
20
+ */
21
+ declare function applyLook(page: ShopPage, look: ShopLookLike): ShopPage;
22
+
23
+ /** The section (and booking variant) that carries a bird, and which: the beaver builds the shop, the owl reads, the falcon watches, the crane listens, the flamingo answers, the pigeon delivers. */
24
+ declare const MASCOT_SLOTS: {
25
+ readonly "booking:strip": "beaver";
26
+ readonly reviews: "owl";
27
+ readonly policies: "falcon";
28
+ readonly story: "crane";
29
+ readonly faq: "flamingo";
30
+ readonly "booking:closing": "pigeon";
31
+ };
32
+ /** The bird of a section under a look, or none: only a look with `mascots: "on"`; never the hero, the gallery, the wall or the TV. */
33
+ declare function mascotFor(section: Pick<Section, "type" | "variant">, look: {
34
+ mascots?: string;
35
+ } | undefined): MascotBird | undefined;
36
+ /** The bird, small, in the brand's accent: decorative (`aria-hidden`), the words stay beside it. */
37
+ declare function ShopMascot({ bird, size }: {
38
+ bird: MascotBird;
39
+ size?: number;
40
+ }): React.JSX.Element;
41
+
42
+ export { MASCOT_SLOTS, SHOP_LOOKS, ShopMascot, applyLook, mascotFor, shopLookOf };
43
+ export type { ShopLookLike };
@@ -0,0 +1,52 @@
1
+ import {
2
+ SECTION_DEFINITIONS
3
+ } from "../chunk-ZFR6ZNXD.js";
4
+ import "../chunk-ZYHWJ7U5.js";
5
+
6
+ // src/shop/look/apply-look.ts
7
+ import { shopPresets } from "@krizaka/tokens/shop-presets";
8
+ var SHOP_LOOKS = ["look-cahier", "look-krizaka", "look-editorial", "look-boutique", "look-affiche", "look-nuit"].map((id) => shopPresets.find((p) => p.id === id)).filter((p) => p !== void 0);
9
+ var shopLookOf = (id) => SHOP_LOOKS.find((p) => p.id === id);
10
+ var REWRITTEN_BOOKING = /* @__PURE__ */ new Set(["strip", "panel"]);
11
+ var variantsOf = (type) => SECTION_DEFINITIONS.find((d) => d.type === type)?.variants;
12
+ function restyle(section, look) {
13
+ const variant = look.variants[section.type];
14
+ if (!variant || variant === section.variant || !variantsOf(section.type)?.includes(variant)) return section;
15
+ if (section.type === "booking" && !REWRITTEN_BOOKING.has(section.variant)) return section;
16
+ return { ...section, variant };
17
+ }
18
+ function applyLook(page, look) {
19
+ const sections = page.sections.map((s) => restyle(s, look));
20
+ const same = page.preset.id === look.id && page.preset.version === look.version && page.density === void 0 && page.accent === void 0 && sections.every((s, i) => s === page.sections[i]);
21
+ if (same) return page;
22
+ return { ...page, preset: { id: look.id, version: look.version }, density: void 0, accent: void 0, sections };
23
+ }
24
+
25
+ // src/shop/look/mascots.tsx
26
+ import { Mascot } from "@krizaka/ui/mascots";
27
+ import { jsx } from "react/jsx-runtime";
28
+ var MASCOT_SLOTS = {
29
+ "booking:strip": "beaver",
30
+ reviews: "owl",
31
+ policies: "falcon",
32
+ story: "crane",
33
+ faq: "flamingo",
34
+ "booking:closing": "pigeon"
35
+ };
36
+ function mascotFor(section, look) {
37
+ if (look?.mascots !== "on") return void 0;
38
+ const slots = MASCOT_SLOTS;
39
+ return slots[`${section.type}:${section.variant}`] ?? (section.type === "booking" ? void 0 : slots[section.type]);
40
+ }
41
+ function ShopMascot({ bird, size = 56 }) {
42
+ return /* @__PURE__ */ jsx(Mascot, { bird, tone: "brand", size, life: true, "aria-hidden": true });
43
+ }
44
+ export {
45
+ MASCOT_SLOTS,
46
+ SHOP_LOOKS,
47
+ ShopMascot,
48
+ applyLook,
49
+ mascotFor,
50
+ shopLookOf
51
+ };
52
+ //# sourceMappingURL=look.js.map