@krizaka/ui 4.4.0 → 4.5.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.
- package/README.md +1 -0
- package/dist/account-menu.d.ts +1 -1
- package/dist/account-menu.js +1 -1
- package/dist/account-menu.js.map +1 -1
- package/dist/account-settings.d.ts +1 -1
- package/dist/account-settings.js +13 -6
- package/dist/account-settings.js.map +1 -1
- package/dist/agenda.d.ts +1 -1
- package/dist/agenda.js +2 -1
- package/dist/agenda.js.map +1 -1
- package/dist/analysis-report.js +19 -11
- package/dist/analysis-report.js.map +1 -1
- package/dist/app-frame.d.ts +1 -1
- package/dist/app-frame.js.map +1 -1
- package/dist/app-header/search.js +2 -2
- package/dist/app-header/search.js.map +1 -1
- package/dist/avatar/defaults.js +3 -1
- package/dist/avatar/defaults.js.map +1 -1
- package/dist/avatar.js +3 -1
- package/dist/avatar.js.map +1 -1
- package/dist/bird-plate.js +8 -2
- package/dist/bird-plate.js.map +1 -1
- package/dist/chapter.js +7 -4
- package/dist/chapter.js.map +1 -1
- package/dist/chat.js +1 -1
- package/dist/chip.d.ts +1 -1
- package/dist/chip.js +1 -1
- package/dist/{chunk-SNSQLGGS.js → chunk-5VZ37TY3.js} +1 -1
- package/dist/{chunk-XWJDBQU7.js.map → chunk-5VZ37TY3.js.map} +1 -1
- package/dist/{chunk-MTVX4RRF.js → chunk-HP7BDMVK.js} +11 -3
- package/dist/chunk-HP7BDMVK.js.map +1 -0
- package/dist/{chunk-PK3L6WQT.js → chunk-LNAAWT4Y.js} +4 -2
- package/dist/{chunk-PK3L6WQT.js.map → chunk-LNAAWT4Y.js.map} +1 -1
- package/dist/{chunk-UIP3WX5O.js → chunk-MDSP7DJR.js} +2 -2
- package/dist/chunk-MDSP7DJR.js.map +1 -0
- package/dist/{chunk-IEGTRCDI.js → chunk-NQENOT6L.js} +2 -2
- package/dist/{chunk-IEGTRCDI.js.map → chunk-NQENOT6L.js.map} +1 -1
- package/dist/{chunk-FM42KOAU.js → chunk-P7AFIKWG.js} +5 -3
- package/dist/chunk-P7AFIKWG.js.map +1 -0
- package/dist/{chunk-BCD2CRFG.js → chunk-PJNR4NTS.js} +2 -2
- package/dist/chunk-PJNR4NTS.js.map +1 -0
- package/dist/{chunk-ZFR6ZNXD.js → chunk-PVQ2KKPZ.js} +1 -1
- package/dist/chunk-PVQ2KKPZ.js.map +1 -0
- package/dist/{chunk-U4XTZMB7.js → chunk-QA3WETWT.js} +1 -1
- package/dist/{chunk-U4XTZMB7.js.map → chunk-QA3WETWT.js.map} +1 -1
- package/dist/{chunk-YXETEQQJ.js → chunk-SG2RKUVJ.js} +2 -2
- package/dist/{chunk-EOWV6BNQ.js → chunk-TXFX4PMN.js} +4 -2
- package/dist/{chunk-EOWV6BNQ.js.map → chunk-TXFX4PMN.js.map} +1 -1
- package/dist/{chunk-XWJDBQU7.js → chunk-V5RO6JYI.js} +1 -1
- package/dist/{chunk-SNSQLGGS.js.map → chunk-V5RO6JYI.js.map} +1 -1
- package/dist/{chunk-VUD4IEVJ.js → chunk-VZ6ZALIJ.js} +1 -1
- package/dist/chunk-VZ6ZALIJ.js.map +1 -0
- package/dist/{chunk-2DHL7NJW.js → chunk-XVRKKYWU.js} +5 -3
- package/dist/{chunk-2DHL7NJW.js.map → chunk-XVRKKYWU.js.map} +1 -1
- package/dist/{chunk-CDNOT2KR.js → chunk-YTYNKMNS.js} +1 -1
- package/dist/chunk-YTYNKMNS.js.map +1 -0
- package/dist/code-block.js.map +1 -1
- package/dist/columns.d.ts +132 -0
- package/dist/columns.js +89 -0
- package/dist/columns.js.map +1 -0
- package/dist/combobox.js +2 -2
- package/dist/copy-button.js +2 -2
- package/dist/copy-button.js.map +1 -1
- package/dist/data-table.js +3 -3
- package/dist/desktop-window.d.ts +1 -1
- package/dist/desktop-window.js +3 -1
- package/dist/desktop-window.js.map +1 -1
- package/dist/drop-overlay.js +8 -8
- package/dist/drop-overlay.js.map +1 -1
- package/dist/elephant.d.ts +1 -1
- package/dist/elephant.js.map +1 -1
- package/dist/embed-facade.d.ts +1 -1
- package/dist/embed-facade.js +3 -1
- package/dist/embed-facade.js.map +1 -1
- package/dist/engine-flow.js +7 -2
- package/dist/engine-flow.js.map +1 -1
- package/dist/entity-header.js +9 -3
- package/dist/entity-header.js.map +1 -1
- package/dist/file-upload.d.ts +1 -1
- package/dist/file-upload.js.map +1 -1
- package/dist/filter-bar.d.ts +4 -4
- package/dist/filter-bar.js +2 -2
- package/dist/flock.js +9 -6
- package/dist/flock.js.map +1 -1
- package/dist/form.d.ts +3 -3
- package/dist/form.js.map +1 -1
- package/dist/genui.js +3 -3
- package/dist/glossary-term.d.ts +1 -1
- package/dist/glossary-term.js.map +1 -1
- package/dist/glossary.d.ts +1 -1
- package/dist/glossary.js.map +1 -1
- package/dist/identity-card.js +1 -1
- package/dist/index.js +1 -1
- package/dist/kind-config-editor.d.ts +2 -2
- package/dist/kind-config-editor.js +1 -1
- package/dist/kind-config-editor.js.map +1 -1
- package/dist/kpi-explained.d.ts +1 -1
- package/dist/kpi-explained.js +4 -4
- package/dist/kpi-explained.js.map +1 -1
- package/dist/landing-page.js +1 -1
- package/dist/{lightbox-Q45BZ3HW.js → lightbox-MRB2YZEP.js} +1 -1
- package/dist/lightbox-MRB2YZEP.js.map +1 -0
- package/dist/map/cards.js +4 -2
- package/dist/map/cards.js.map +1 -1
- package/dist/map/pin.js +2 -1
- package/dist/map/pin.js.map +1 -1
- package/dist/map.d.ts +1 -1
- package/dist/map.js.map +1 -1
- package/dist/mascot-quote.js +1 -1
- package/dist/mascot-state.js +1 -1
- package/dist/mascots.js +1 -1
- package/dist/match-dialog.js +1 -1
- package/dist/motion.d.ts +1 -1
- package/dist/motion.js.map +1 -1
- package/dist/native/form.d.ts +3 -3
- package/dist/native/form.js.map +1 -1
- package/dist/native/markdown.d.ts +1 -1
- package/dist/native/markdown.js.map +1 -1
- package/dist/native/vertical-video.js.map +1 -1
- package/dist/native.d.ts +12 -12
- package/dist/native.js +12 -7
- package/dist/native.js.map +1 -1
- package/dist/nav-bar.d.ts +2 -2
- package/dist/nav-bar.js +1 -1
- package/dist/nav-bar.js.map +1 -1
- package/dist/next-actions.d.ts +1 -1
- package/dist/next-actions.js.map +1 -1
- package/dist/notification-preferences.d.ts +1 -1
- package/dist/notification-preferences.js +5 -2
- package/dist/notification-preferences.js.map +1 -1
- package/dist/page-index.js +2 -2
- package/dist/page-index.js.map +1 -1
- package/dist/product-page.js +1 -1
- package/dist/promo-code-field.d.ts +1 -1
- package/dist/promo-code-field.js.map +1 -1
- package/dist/qr-code.d.ts +1 -1
- package/dist/qr-code.js +1 -1
- package/dist/rail-nav.js +3 -3
- package/dist/rail-nav.js.map +1 -1
- package/dist/retro-tv.d.ts +1 -1
- package/dist/retro-tv.js.map +1 -1
- package/dist/reviews.d.ts +2 -2
- package/dist/reviews.js.map +1 -1
- package/dist/router.d.ts +1 -1
- package/dist/router.js +8 -8
- package/dist/router.js.map +1 -1
- package/dist/{schema-CL7t7xqb.d.ts → schema-Dd05m48Q.d.ts} +9 -9
- package/dist/service-card.js +22 -13
- package/dist/service-card.js.map +1 -1
- package/dist/settings-layout.js +1 -1
- package/dist/shop/booking.js.map +1 -1
- package/dist/shop/gallery.js +7 -6
- package/dist/shop/gallery.js.map +1 -1
- package/dist/shop/hero.js.map +1 -1
- package/dist/shop/look.d.ts +2 -2
- package/dist/shop/look.js +1 -1
- package/dist/shop/look.js.map +1 -1
- package/dist/shop/map-gate.d.ts +1 -1
- package/dist/shop/map-gate.js +2 -2
- package/dist/shop/map-gate.js.map +1 -1
- package/dist/shop/services.js.map +1 -1
- package/dist/shop-composer.d.ts +10 -10
- package/dist/shop-composer.js +27 -14
- package/dist/shop-composer.js.map +1 -1
- package/dist/shop-gallery.js +1 -1
- package/dist/shop.d.ts +2 -2
- package/dist/shop.js +2 -2
- package/dist/shop.js.map +1 -1
- package/dist/signature.js +2 -1
- package/dist/signature.js.map +1 -1
- package/dist/site-cahier.js +7 -3
- package/dist/site-cahier.js.map +1 -1
- package/dist/site-footer.js +6 -2
- package/dist/site-footer.js.map +1 -1
- package/dist/slot-picker.js +5 -2
- package/dist/slot-picker.js.map +1 -1
- package/dist/stat.js +1 -1
- package/dist/status-chip.d.ts +1 -1
- package/dist/status-chip.js.map +1 -1
- package/dist/tabs.js.map +1 -1
- package/dist/tag-input.js +2 -2
- package/dist/tag-selector.js +1 -1
- package/dist/text-style.js +4 -3
- package/dist/text-style.js.map +1 -1
- package/dist/usage.js +8 -3
- package/dist/usage.js.map +1 -1
- package/dist/versus-card.js +1 -1
- package/dist/versus-card.js.map +1 -1
- package/dist/vertical-video.js +1 -1
- package/dist/vertical-video.js.map +1 -1
- package/dist/virtual.d.ts +3 -3
- package/dist/wall.d.ts +4 -4
- package/dist/wall.js +1 -1
- package/dist/wall.js.map +1 -1
- package/package.json +20 -6
- package/registry/account-menu.json +2 -2
- package/registry/account-settings.json +3 -3
- package/registry/achievement.json +1 -1
- package/registry/action-bar.json +1 -1
- package/registry/activity-feed.json +1 -1
- package/registry/agenda.json +2 -2
- package/registry/alert.json +1 -1
- package/registry/analysis-report.json +3 -3
- package/registry/anatomy-plate.json +1 -1
- package/registry/app-frame.json +4 -4
- package/registry/app-header.json +2 -2
- package/registry/app-shell.json +1 -1
- package/registry/argument-card.json +1 -1
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +2 -2
- package/registry/badge.json +3 -3
- package/registry/bird-plate.json +2 -2
- package/registry/button.json +1 -1
- package/registry/captcha.json +1 -1
- package/registry/card-grid.json +1 -1
- package/registry/card.json +1 -1
- package/registry/catalogue-page.json +1 -1
- package/registry/changelog-page.json +1 -1
- package/registry/chapter.json +2 -2
- package/registry/chat.json +1 -1
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip-row.json +1 -1
- package/registry/chip.json +2 -2
- package/registry/choice-grid.json +1 -1
- package/registry/code-block.json +1 -1
- package/registry/collection-switcher.json +1 -1
- package/registry/columns.json +319 -0
- package/registry/combobox.json +1 -1
- package/registry/command.json +1 -1
- package/registry/comparison-table.json +1 -1
- package/registry/component-page.json +1 -1
- package/registry/confirm-button.json +1 -1
- package/registry/contact-page.json +1 -1
- package/registry/continue-prompt.json +1 -1
- package/registry/copy-button.json +2 -2
- package/registry/countdown.json +1 -1
- package/registry/cover-hero.json +1 -1
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +1 -1
- package/registry/data-table.json +2 -2
- package/registry/date-picker.json +1 -1
- package/registry/decision-list.json +1 -1
- package/registry/description-list.json +1 -1
- package/registry/desktop-window.json +2 -2
- package/registry/detail-layout.json +1 -1
- package/registry/dialog.json +1 -1
- package/registry/docs-article-page.json +1 -1
- package/registry/docs-hub-page.json +1 -1
- package/registry/docs-layout.json +1 -1
- package/registry/docs-nav.json +1 -1
- package/registry/document-viewer.json +1 -1
- package/registry/doodle.json +1 -1
- package/registry/drop-overlay.json +2 -2
- package/registry/dropdown-menu.json +1 -1
- package/registry/elephant.json +2 -2
- package/registry/embed-facade.json +3 -3
- package/registry/empty-state.json +1 -1
- package/registry/engine-flow.json +3 -3
- package/registry/entity-header.json +2 -2
- package/registry/environment-notice.json +1 -1
- package/registry/error-page.json +1 -1
- package/registry/examples/columns/columns.d.ts +4 -0
- package/registry/examples/columns/columns.js +21 -0
- package/registry/examples/columns/columns.tsx +18 -0
- package/registry/examples/columns/photos.d.ts +4 -0
- package/registry/examples/columns/photos.js +12 -0
- package/registry/examples/columns/photos.tsx +16 -0
- package/registry/examples/columns/stats.d.ts +4 -0
- package/registry/examples/columns/stats.js +20 -0
- package/registry/examples/columns/stats.tsx +22 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +2 -2
- package/registry/filter-bar.json +2 -2
- package/registry/flock.json +3 -3
- package/registry/footnote.json +1 -1
- package/registry/force-update-screen.json +1 -1
- package/registry/form.json +8 -8
- package/registry/gallery-page.json +1 -1
- package/registry/genui.json +1 -1
- package/registry/glossary-term.json +2 -2
- package/registry/glossary.json +2 -2
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/grade-stamp.json +1 -1
- package/registry/grid.json +4 -3
- package/registry/identity-card.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +40 -9
- package/registry/kanban.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/kind-config-editor.json +2 -2
- package/registry/kpi-explained.json +2 -2
- package/registry/landing-page.json +1 -1
- package/registry/landscape.json +1 -1
- package/registry/language-switch.json +1 -1
- package/registry/legal-page.json +1 -1
- package/registry/link-card.json +1 -1
- package/registry/list.json +1 -1
- package/registry/loader.json +1 -1
- package/registry/longform-page.json +1 -1
- package/registry/maintenance-screen.json +1 -1
- package/registry/map.json +5 -5
- package/registry/margin-layout.json +1 -1
- package/registry/markdown.json +1 -1
- package/registry/marketing-layout.json +1 -1
- package/registry/mascot-quote.json +1 -1
- package/registry/mascot-state.json +2 -2
- package/registry/mascots.json +3 -3
- package/registry/match-dialog.json +1 -1
- package/registry/media-capture.json +1 -1
- package/registry/media-gallery.json +1 -1
- package/registry/meter.json +1 -1
- package/registry/money-input.json +1 -1
- package/registry/nav-bar.json +5 -5
- package/registry/next-actions.json +2 -2
- package/registry/notification-preferences.json +2 -2
- package/registry/number-ticker.json +1 -1
- package/registry/opening-hours.json +1 -1
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +1 -1
- package/registry/page-index.json +2 -2
- package/registry/page.json +2 -2
- package/registry/pagination.json +1 -1
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/price-catalogue-editor.json +1 -1
- package/registry/pricing-page.json +1 -1
- package/registry/product-page.json +1 -1
- package/registry/profile-card.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/promise-card.json +1 -1
- package/registry/promo-code-field.json +2 -2
- package/registry/proposal.json +1 -1
- package/registry/qr-code.json +3 -3
- package/registry/quota-meter.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/rail-nav.json +4 -4
- package/registry/recipes.json +1 -1
- package/registry/retro-tv.json +2 -2
- package/registry/reviews.json +2 -2
- package/registry/router.json +2 -2
- package/registry/schema-form.json +1 -1
- package/registry/scroll-stage.json +1 -1
- package/registry/search-field.json +1 -1
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/service-card.json +2 -2
- package/registry/settings-layout.json +2 -2
- package/registry/shop-composer.json +8 -8
- package/registry/shop-gallery.json +2 -2
- package/registry/shop.json +12 -12
- package/registry/showcase.json +1 -1
- package/registry/signature.json +2 -2
- package/registry/site-cahier.json +2 -2
- package/registry/site-footer.json +4 -4
- package/registry/sites.json +1 -1
- package/registry/skeleton.json +1 -1
- package/registry/skip-link.json +1 -1
- package/registry/slider.json +1 -1
- package/registry/slot-picker.json +2 -2
- package/registry/slot.json +1 -1
- package/registry/specimen-tag.json +1 -1
- package/registry/speed-lines.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/split-view.json +1 -1
- package/registry/stage-banner.json +1 -1
- package/registry/stat.json +2 -2
- package/registry/status-chip.json +2 -2
- package/registry/status-page.json +1 -1
- package/registry/step-progress.json +1 -1
- package/registry/step-showcase.json +1 -1
- package/registry/stepper.json +1 -1
- package/registry/sticky-action.json +1 -1
- package/registry/stuck.json +1 -1
- package/registry/swipe-deck.json +1 -1
- package/registry/switch.json +1 -1
- package/registry/tabs.json +2 -2
- package/registry/tag-input.json +1 -1
- package/registry/tag-selector.json +1 -1
- package/registry/taped-photo.json +1 -1
- package/registry/terminal-replay.json +1 -1
- package/registry/text-style.json +2 -2
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +1 -1
- package/registry/tree-view.json +1 -1
- package/registry/update-prompt.json +1 -1
- package/registry/upload-queue.json +1 -1
- package/registry/usage.json +3 -3
- package/registry/verified-badge.json +1 -1
- package/registry/versus-card.json +2 -2
- package/registry/vertical-video.json +2 -2
- package/registry/video-player.json +1 -1
- package/registry/video-trimmer.json +1 -1
- package/registry/virtual.json +1 -1
- package/registry/wall.json +6 -6
- package/registry/waveform.json +3 -3
- package/dist/chunk-BCD2CRFG.js.map +0 -1
- package/dist/chunk-CDNOT2KR.js.map +0 -1
- package/dist/chunk-FM42KOAU.js.map +0 -1
- package/dist/chunk-MTVX4RRF.js.map +0 -1
- package/dist/chunk-UIP3WX5O.js.map +0 -1
- package/dist/chunk-VUD4IEVJ.js.map +0 -1
- package/dist/chunk-ZFR6ZNXD.js.map +0 -1
- package/dist/lightbox-Q45BZ3HW.js.map +0 -1
- /package/dist/{chunk-YXETEQQJ.js.map → chunk-SG2RKUVJ.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/shop/catalogue.ts","../src/shop/define.ts","../src/shop/limits.ts","../src/shop/text.ts","../src/shop/look/apply-look.ts","../src/shop-composer/commands.ts","../src/shop-composer/composer.tsx","../src/cn.ts","../src/shop/preview.ts","../src/shop/schema.ts","../src/shop-composer/diff.ts","../src/shop-composer/history.ts","../src/shop-composer/inspector.tsx","../src/shop-composer/keys.ts","../src/shop-composer/messages.ts","../src/shop-composer/settings-form.tsx","../src/shop-composer/fields.ts","../src/button/button.tsx","../src/spinner/glyph.tsx","../src/recipes/define.ts","../src/button/recipe.ts","../src/shop/booking/booking.tsx","../src/block-link.tsx","../src/page/page.tsx","../src/shop/frame.tsx","../src/shop/photo.tsx","../src/shop/bulletin/bulletin.tsx","../src/shop/demo/media.ts","../src/shop/demo/index.ts","../src/shop/faq/faq.tsx","../src/shop/gallery/gallery.tsx","../src/shop/hero/hero.tsx","../src/shop/policies/policies.tsx","../src/shop/reviews/reviews.tsx","../src/shop/services/services.tsx","../src/shop/social/social.tsx","../src/shop/story/story.tsx","../src/shop/team/team.tsx","../src/shop/video/video.tsx","../src/shop/visit/visit.tsx","../src/shop-composer/thumbnails.tsx","../src/shop-composer/look-picker.tsx","../src/shop-composer/outline.tsx"],"sourcesContent":["// The catalogue of section types (ADR-007 §3): each with its variants, its settings and the blocks it allows, as zod\n// schemas — the renderer, the validator and the composer's forms read the same definitions. The first variant of a type is\n// its default. Settings hold references and rules (ids, a source, a count), never a price or a text of the shop.\nimport * as z from \"zod/mini\";\n\nimport { defineSection } from \"./define\";\nimport { SHOP_LIMITS } from \"./limits\";\nimport { localizedText } from \"./text\";\n\n/** A reference to something the product holds (a service, a photo, a member): an opaque id. */\nconst ref = z.string().check(z.minLength(1), z.maxLength(80));\nconst short = z.string().check(z.minLength(1), z.maxLength(140));\nconst url = z.string().check(z.maxLength(300), z.regex(/^https:\\/\\//, \"an https address\"));\nconst isoDay = z.string().check(z.regex(/^\\d{4}-\\d{2}-\\d{2}$/, \"a day (YYYY-MM-DD)\"));\nconst source = z.enum([\"all\", \"pick\"]);\n/** One of a few numbers. */\nconst oneOf = <const N extends readonly [number, number, ...number[]]>(...n: N) => z.union(n.map((v) => z.literal(v)) as unknown as [z.ZodMiniLiteral<N[number]>, z.ZodMiniLiteral<N[number]>]);\n\nexport const platforms = [\"tiktok\", \"youtube-shorts\", \"instagram\"] as const;\n\nexport const heroSection = defineSection({\n type: \"hero\",\n variants: [\"poster\", \"split\", \"banner\", \"tv\"],\n settings: z.object({\n /** The cover: a media id. Absent, the product's default for the trade. */\n media: z.optional(ref),\n /** Where the photo is cropped to when the box is not its ratio. */\n focus: z.enum([\"center\", \"top\", \"bottom\"]),\n }),\n settingsDefault: { focus: \"center\" },\n blocks: { fact: z.object({ kind: z.enum([\"open-now\", \"area\", \"score\"]) }) },\n});\n\nexport const servicesSection = defineSection({\n type: \"services\",\n variants: [\"menu\", \"cards\", \"index\", \"carousel\"],\n settings: z.object({\n /** `all` the shop's services, or `pick` the ones the `service` blocks name, in their order. */\n source,\n groupBy: z.enum([\"category\", \"none\"]),\n /** `menu` only: two columns when nothing sits beside it. */\n columns: oneOf(1, 2),\n /** `menu` only: the shop's hours, team and address beside the list (the host draws them from its own data). */\n aside: z.enum([\"hours\", \"none\"]),\n }),\n settingsDefault: { source: \"all\", groupBy: \"category\", columns: 1, aside: \"hours\" },\n blocks: { service: z.object({ serviceId: ref }) },\n refine: (section, issue) => {\n if (section.settings.source === \"pick\" && (section.blocks ?? []).length === 0) issue([\"blocks\"], \"pick at least one service\");\n if (section.variant === \"cards\" && (section.blocks ?? []).length > SHOP_LIMITS.cards) issue([\"blocks\"], `at most ${SHOP_LIMITS.cards} cards`);\n },\n});\n\nexport const bookingSection = defineSection({\n type: \"booking\",\n variants: [\"strip\", \"panel\", \"closing\", \"sticky\"],\n settings: z.object({\n /** A service the times are for; absent, the next free times of any service. */\n serviceId: z.optional(ref),\n /** `strip`: how many times it shows. */\n count: oneOf(3, 4, 6),\n }),\n settingsDefault: { count: 4 },\n});\n\nexport const gallerySection = defineSection({\n type: \"gallery\",\n variants: [\"mosaic\", \"filmstrip\", \"wall\", \"grid\"],\n settings: z.object({\n source,\n /** `wall` only. */\n texture: z.enum([\"plaster\", \"brick\", \"ridge\", \"zellige\"]),\n }),\n settingsDefault: { source: \"all\", texture: \"plaster\" },\n blocks: {\n photo: z.object({ mediaId: ref, caption: z.optional(short) }),\n note: z.object({ text: short, signature: z.optional(z.string().check(z.maxLength(40))) }),\n sign: z.object({}),\n },\n refine: (section, issue) => {\n const photos = (section.blocks ?? []).filter((b) => b.type === \"photo\").length;\n if (photos > SHOP_LIMITS.photos) issue([\"blocks\"], `at most ${SHOP_LIMITS.photos} photos`);\n },\n});\n\nexport const videoSection = defineSection({\n type: \"video\",\n variants: [\"tv\", \"shorts\"],\n settings: z.object({ cabinet: z.enum([\"cabinet\", \"portable\"]), channel: z.optional(z.string().check(z.maxLength(32))) }),\n settingsDefault: { cabinet: \"cabinet\" },\n blocks: { reel: z.object({ platform: z.enum(platforms), url }) },\n});\n\nexport const reviewsSection = defineSection({\n type: \"reviews\",\n variants: [\"summary-cards\", \"quote\", \"strip\"],\n settings: z.object({ rule: z.enum([\"best\", \"latest\"]), count: oneOf(1, 2, 3) }),\n settingsDefault: { rule: \"best\", count: 2 },\n});\n\nexport const bulletinSection = defineSection({\n type: \"bulletin\",\n variants: [\"board\", \"banner\"],\n settings: z.object({}),\n settingsDefault: {},\n blocks: { flyer: z.object({ text: short, signature: z.optional(z.string().check(z.maxLength(40))), until: z.optional(isoDay) }) },\n refine: (section, issue) => {\n if ((section.blocks ?? []).length > SHOP_LIMITS.flyers) issue([\"blocks\"], `at most ${SHOP_LIMITS.flyers} flyers`);\n },\n});\n\nexport const teamSection = defineSection({\n type: \"team\",\n variants: [\"row\", \"cards\"],\n settings: z.object({ source }),\n settingsDefault: { source: \"all\" },\n blocks: { member: z.object({ memberId: ref }) },\n});\n\nexport const visitSection = defineSection({\n type: \"visit\",\n variants: [\"card\", \"map\", \"split\"],\n settings: z.object({ showPhone: z.boolean() }),\n settingsDefault: { showPhone: true },\n});\n\nexport const storySection = defineSection({\n type: \"story\",\n variants: [\"quote\", \"owner\"],\n settings: z.object({ body: localizedText }),\n settingsDefault: { body: {} },\n});\n\nexport const socialSection = defineSection({\n type: \"social\",\n variants: [\"links\", \"facade\"],\n settings: z.object({}),\n settingsDefault: {},\n blocks: { link: z.object({ platform: z.enum(platforms), url }) },\n});\n\nexport const faqSection = defineSection({\n type: \"faq\",\n variants: [\"list\"],\n settings: z.object({}),\n settingsDefault: {},\n blocks: { question: z.object({ question: localizedText, answer: localizedText }) },\n});\n\nexport const policiesSection = defineSection({\n type: \"policies\",\n variants: [\"inline\"],\n settings: z.object({ show: z.array(z.enum([\"cancellation\", \"prices\", \"booking-window\"])).check(z.maxLength(3)) }),\n settingsDefault: { show: [\"cancellation\", \"prices\", \"booking-window\"] },\n});\n\n/** Every section type, in the order the composer lists them. */\nexport const SECTION_DEFINITIONS = [\n heroSection, servicesSection, bookingSection, gallerySection, videoSection, reviewsSection, bulletinSection,\n teamSection, visitSection, storySection, socialSection, faqSection, policiesSection,\n] as const;\n\nexport type SectionDefinition = (typeof SECTION_DEFINITIONS)[number];\nexport type SectionType = SectionDefinition[\"type\"];\nexport const SECTION_TYPES = SECTION_DEFINITIONS.map((d) => d.type) as readonly SectionType[];\n\n/** The definition of a type. */\nexport function sectionDefinition<T extends SectionType>(type: T): Extract<SectionDefinition, { type: T }> {\n return SECTION_DEFINITIONS.find((d) => d.type === type) as Extract<SectionDefinition, { type: T }>;\n}\n","// `defineSection` (ADR-007 §1): one section type = its variants, the zod schema of its settings, the blocks it allows\n// (each a zod schema) and the checks that need the whole section. It builds the zod schema of a section of this type, so\n// the renderer, the validator and the composer's generated forms agree.\nimport * as z from \"zod/mini\";\n\nimport { SHOP_LIMITS } from \"./limits\";\nimport { localizedText } from \"./text\";\n\ntype Shape = z.ZodMiniObject;\ntype BlockShapes = Record<string, Shape>;\n\n/** What a section of a type is, once parsed. */\nexport type ParsedSection<T extends string, V extends string, S extends Shape, B extends BlockShapes> = {\n key: string;\n type: T;\n variant: V;\n disabled?: boolean | undefined;\n settings: z.output<S>;\n text?: { title?: z.output<typeof localizedText> | undefined; lead?: z.output<typeof localizedText> | undefined } | undefined;\n blocks?: { [K in keyof B & string]: { key: string; type: K; settings: z.output<B[K]>; text?: Record<string, z.output<typeof localizedText>> | undefined } }[keyof B & string][] | undefined;\n};\n\nexport type SectionSpec<T extends string, V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes> = {\n /** The type's name: the `type` of a section. */\n type: T;\n /** Its variants; the first is the default one. */\n variants: V;\n /** The zod schema of its settings. */\n settings: S;\n /** The settings a new section starts with. */\n settingsDefault: z.input<S>;\n /** The block types it allows, each with the zod schema of its settings. None: the section has no blocks. */\n blocks?: B;\n /** The checks that read the whole section (a count, a combination); `issue(path, message)` refuses it. */\n refine?: (section: ParsedSection<T, V[number], S, B>, issue: (path: (string | number)[], message: string) => void) => void;\n};\n\nexport type SectionDefinitionOf<T extends string, V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes> = SectionSpec<T, V, S, B> & {\n readonly defaultVariant: V[number];\n readonly blockTypes: readonly (keyof B & string)[];\n /** The zod schema of a section of this type. */\n readonly schema: z.ZodMiniType<ParsedSection<T, V[number], S, B>>;\n};\n\nconst key = z.string().check(z.minLength(1), z.maxLength(40), z.regex(/^[A-Za-z0-9_-]+$/, \"a key (letters, digits, - and _)\"));\n\n/** Defines a section type. */\nexport function defineSection<const T extends string, const V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes = Record<never, never>>(\n spec: SectionSpec<T, V, S, B>,\n): SectionDefinitionOf<T, V, S, B> {\n const blockUnion = spec.blocks && Object.keys(spec.blocks).length > 0\n ? z.discriminatedUnion(\n \"type\",\n Object.entries(spec.blocks).map(([type, settings]) =>\n z.object({ key, type: z.literal(type), settings, text: z.optional(z.record(z.string(), localizedText)) }),\n ) as unknown as [z.ZodMiniObject, ...z.ZodMiniObject[]],\n )\n : undefined;\n const blocks = blockUnion\n ? z.optional(z.array(blockUnion).check(z.maxLength(SHOP_LIMITS.blocks)))\n : z.optional(z.array(z.never()).check(z.maxLength(0)));\n const base = z.object({\n key,\n type: z.literal(spec.type),\n variant: z.enum(spec.variants),\n disabled: z.optional(z.boolean()),\n settings: spec.settings,\n text: z.optional(z.object({ title: z.optional(localizedText), lead: z.optional(localizedText) })),\n blocks,\n });\n const schema = base.check(\n z.superRefine((value, ctx) => {\n spec.refine?.(value as never, (path, message) => ctx.issues.push({ code: \"custom\", message, path, input: value }));\n }),\n );\n return Object.freeze({\n ...spec,\n defaultVariant: spec.variants[0],\n blockTypes: Object.keys(spec.blocks ?? {}) as (keyof B & string)[],\n schema: schema as unknown as z.ZodMiniType<ParsedSection<T, V[number], S, B>>,\n });\n}\n","// The bounds of a shop page (ADR-007 §3): the schema, the database and the composer read the same numbers.\n\n/**\n * The most a page, a section or a card list may hold. A salon page that stays a page that sells: bounded on purpose.\n * @fixed: ADR-007 §3 — product limits of the document, never a business setting.\n */\nexport const SHOP_LIMITS = {\n /** Sections on a page, the hero included. */\n sections: 16,\n /** Blocks in one section. */\n blocks: 24,\n /** Photos in a gallery. */\n photos: 12,\n /** Cards in `services · cards`. */\n cards: 6,\n /** Flyers on a bulletin board. */\n flyers: 3,\n /** Reels in `video · shorts`. */\n reels: 6,\n} as const;\n","import * as z from \"zod/mini\";\n\n/** The owner's words, in each language; the product's message is the fallback when a language is absent. */\nexport const localizedText = z.object({\n fr: z.optional(z.string().check(z.maxLength(600))),\n en: z.optional(z.string().check(z.maxLength(600))),\n});\nexport type LocalizedText = z.output<typeof localizedText>;\n","// Pure. A look (`look-*` of @krizaka/tokens, folioviv#478) is applied to a shop page by rewriting the variants of the sections the\n// page already has — never their order, settings, blocks, text or photos. The closing call and the sticky bar are different jobs\n// from the strip of next times, so a look leaves them as they are.\nimport { shopPresets } from \"@krizaka/tokens/shop-presets\";\n\nimport { SECTION_DEFINITIONS } from \"../catalogue\";\nimport type { Section, ShopPage } from \"../schema\";\n\n/** What `applyLook` reads of a look: its id and version, and one variant per section type. */\nexport type ShopLookLike = { id: string; version: number; variants: Readonly<Record<string, string>> };\n\n/** The six looks, in the order of the addendum (Cahier first). */\nexport const SHOP_LOOKS = [\"look-cahier\", \"look-krizaka\", \"look-editorial\", \"look-boutique\", \"look-affiche\", \"look-nuit\"]\n .map((id) => shopPresets.find((p) => p.id === id))\n .filter((p): p is (typeof shopPresets)[number] => p !== undefined);\n\n/** A look by id, or undefined for a trade preset or an unknown id. */\nexport const shopLookOf = (id: string) => SHOP_LOOKS.find((p) => p.id === id);\n\n/** Booking variants a look rewrites: the strip of next times and the panel. `closing` and `sticky` keep their own job. */\nconst REWRITTEN_BOOKING = new Set([\"strip\", \"panel\"]);\n\nconst variantsOf = (type: string) => SECTION_DEFINITIONS.find((d) => d.type === type)?.variants as readonly string[] | undefined;\n\nfunction restyle(section: Section, look: ShopLookLike): Section {\n const variant = look.variants[section.type];\n if (!variant || variant === section.variant || !variantsOf(section.type)?.includes(variant)) return section;\n if (section.type === \"booking\" && !REWRITTEN_BOOKING.has(section.variant)) return section;\n return { ...section, variant } as Section;\n}\n\n/**\n * The page wearing a look: its preset reference, the look's own density and accent, and the variants of its sections. Everything\n * else is the owner's and stays: `applyLook(applyLook(p, a), b)` has the content of `p`.\n */\nexport function applyLook(page: ShopPage, look: ShopLookLike): ShopPage {\n const sections = page.sections.map((s) => restyle(s, look));\n const same = page.preset.id === look.id && page.preset.version === look.version && page.density === undefined && page.accent === undefined && sections.every((s, i) => s === page.sections[i]);\n if (same) return page;\n return { ...page, preset: { id: look.id, version: look.version }, density: undefined, accent: undefined, sections };\n}\n","// The composer's commands (ADR-007 §5): every change of the document is a pure command on a reducer — never a mutation —\n// so undo / redo restore the exact document, and the rules of the document (a hero first, 16 sections, 24 blocks, the variants\n// of a type) hold after every step. A command that would break a rule is a no-op: the page stays valid, always.\nimport { SECTION_DEFINITIONS, sectionDefinition,type SectionType } from \"../shop/catalogue\";\nimport { SHOP_LIMITS } from \"../shop/limits\";\nimport { applyLook, type ShopLookLike } from \"../shop/look/apply-look\";\nimport type { Section, ShopPage } from \"../shop/schema\";\nimport type { LocalizedText } from \"../shop/text\";\n\ntype Rec = Record<string, unknown>;\n\nexport type Command =\n /** Adds a section (its type's default settings, the given or the default variant) at an index; a hero goes first. */\n | { type: \"addSection\"; sectionType: SectionType; key: string; variant?: string; at?: number; settings?: Rec }\n | { type: \"removeSection\"; key: string }\n /** Moves a section to an absolute index (the hero stays first: nothing goes above it). */\n | { type: \"moveSection\"; key: string; to: number }\n | { type: \"setVariant\"; key: string; variant: string }\n /** Merges into the settings. */\n | { type: \"patchSettings\"; key: string; patch: Rec }\n | { type: \"setText\"; key: string; field: \"title\" | \"lead\"; value: LocalizedText | undefined }\n | { type: \"toggleDisabled\"; key: string }\n | { type: \"setPreset\"; preset: { id: string; version: number }; density?: \"compact\" | \"airy\" | null }\n | { type: \"setDensity\"; density: \"compact\" | \"airy\" | undefined }\n /** A whole look (`look-*`): the variants of the sections, nothing of their content (`applyLook`). */\n | { type: \"applyLook\"; look: ShopLookLike }\n /** The accent within the look's tested list. */\n | { type: \"setAccent\"; accent: string | undefined }\n | { type: \"addBlock\"; key: string; blockKey: string; blockType: string; settings?: Rec; at?: number }\n | { type: \"removeBlock\"; key: string; blockKey: string }\n | { type: \"moveBlock\"; key: string; blockKey: string; to: number }\n | { type: \"patchBlock\"; key: string; blockKey: string; patch: Rec };\n\nconst clamp = (n: number, lo: number, hi: number) => Math.min(Math.max(n, lo), hi);\nconst indexOfKey = (page: ShopPage, key: string) => page.sections.findIndex((s) => s.key === key);\n\n/** The array with an item moved to an index. */\nexport function moved<T>(list: readonly T[], from: number, to: number): T[] {\n const next = [...list];\n const [item] = next.splice(from, 1);\n next.splice(clamp(to, 0, next.length), 0, item as T);\n return next;\n}\n\nfunction withSection(page: ShopPage, key: string, change: (s: Section) => Section): ShopPage {\n const i = indexOfKey(page, key);\n if (i < 0) return page;\n const next = change(page.sections[i]!);\n if (next === page.sections[i]) return page;\n const sections = [...page.sections];\n sections[i] = next;\n return { ...page, sections };\n}\n\ntype Handler<T extends Command[\"type\"]> = (page: ShopPage, cmd: Extract<Command, { type: T }>) => ShopPage;\n\nconst addSection: Handler<\"addSection\"> = (page, cmd) => {\n const def = SECTION_DEFINITIONS.find((d) => d.type === cmd.sectionType);\n if (!def || page.sections.length >= SHOP_LIMITS.sections || page.sections.some((s) => s.key === cmd.key)) return page;\n const variant = cmd.variant ?? def.defaultVariant;\n if (!(def.variants as readonly string[]).includes(variant)) return page;\n const isHero = def.type === \"hero\";\n if (isHero && page.sections.some((s) => s.type === \"hero\")) return page;\n const heroFirst = page.sections[0]?.type === \"hero\";\n const at = isHero ? 0 : clamp(cmd.at ?? page.sections.length, heroFirst ? 1 : 0, page.sections.length);\n const section = { key: cmd.key, type: def.type, variant, settings: { ...(def.settingsDefault as Rec), ...cmd.settings } } as unknown as Section;\n const sections = [...page.sections];\n sections.splice(at, 0, section);\n return { ...page, sections };\n};\n\nconst removeSection: Handler<\"removeSection\"> = (page, cmd) => {\n if (indexOfKey(page, cmd.key) < 0 || page.sections.length <= 1) return page;\n return { ...page, sections: page.sections.filter((s) => s.key !== cmd.key) };\n};\n\nconst moveSection: Handler<\"moveSection\"> = (page, cmd) => {\n const from = indexOfKey(page, cmd.key);\n if (from < 0 || page.sections[from]!.type === \"hero\") return page;\n const lo = page.sections[0]?.type === \"hero\" ? 1 : 0;\n const to = clamp(cmd.to, lo, page.sections.length - 1);\n return to === from ? page : { ...page, sections: moved(page.sections, from, to) };\n};\n\nconst setVariant: Handler<\"setVariant\"> = (page, cmd) =>\n withSection(page, cmd.key, (s) => {\n const def = sectionDefinition(s.type);\n if (s.variant === cmd.variant || !(def.variants as readonly string[]).includes(cmd.variant)) return s;\n return { ...s, variant: cmd.variant } as Section;\n });\n\n/** Whether every value of a patch is already the one the object holds. */\nconst saysNothingNew = (current: Rec, patch: Rec) => Object.entries(patch).every(([k, v]) => JSON.stringify(current[k]) === JSON.stringify(v));\n\nconst patchSettings: Handler<\"patchSettings\"> = (page, cmd) =>\n withSection(page, cmd.key, (s) => {\n const current = s.settings as Rec;\n // Nothing to say when every value is already the document's (a form that reports its first values after an undo).\n return saysNothingNew(current, cmd.patch) ? s : ({ ...s, settings: { ...current, ...cmd.patch } } as Section);\n });\n\nconst setText: Handler<\"setText\"> = (page, cmd) =>\n withSection(page, cmd.key, (s) => {\n const text = { ...(s.text ?? {}) } as Rec;\n if (cmd.value === undefined) delete text[cmd.field];\n else text[cmd.field] = cmd.value;\n const next = { ...s } as Rec;\n if (Object.keys(text).length === 0) delete next.text;\n else next.text = text;\n return next as unknown as Section;\n });\n\nconst toggleDisabled: Handler<\"toggleDisabled\"> = (page, cmd) => withSection(page, cmd.key, (s) => ({ ...s, disabled: s.disabled ? undefined : true }) as Section);\n\nconst setPreset: Handler<\"setPreset\"> = (page, cmd) => {\n if (page.preset.id === cmd.preset.id && page.preset.version === cmd.preset.version && cmd.density === undefined) return page;\n let density: Partial<Pick<ShopPage, \"density\">> = {};\n if (cmd.density === null) density = { density: undefined };\n else if (cmd.density) density = { density: cmd.density };\n return { ...page, preset: { ...cmd.preset }, ...density };\n};\n\nconst setDensity: Handler<\"setDensity\"> = (page, cmd) => (page.density === cmd.density ? page : { ...page, density: cmd.density });\n\nconst applyLookCmd: Handler<\"applyLook\"> = (page, cmd) => applyLook(page, cmd.look);\n\nconst setAccent: Handler<\"setAccent\"> = (page, cmd) => (page.accent === cmd.accent ? page : { ...page, accent: cmd.accent });\n\ntype Keyed = { key: string; type?: string; settings?: Rec };\n\nconst addBlock: Handler<\"addBlock\"> = (page, cmd) =>\n withSection(page, cmd.key, (s) => {\n const def = sectionDefinition(s.type);\n const blocks = (s.blocks ?? []) as readonly Keyed[];\n if (!(def.blockTypes as readonly string[]).includes(cmd.blockType) || blocks.length >= SHOP_LIMITS.blocks || blocks.some((b) => b.key === cmd.blockKey)) return s;\n const next = [...blocks];\n next.splice(clamp(cmd.at ?? blocks.length, 0, blocks.length), 0, { key: cmd.blockKey, type: cmd.blockType, settings: { ...cmd.settings } });\n return { ...s, blocks: next } as unknown as Section;\n });\n\nconst removeBlock: Handler<\"removeBlock\"> = (page, cmd) =>\n withSection(page, cmd.key, (s) => {\n const blocks = (s.blocks ?? []) as readonly Keyed[];\n if (!blocks.some((b) => b.key === cmd.blockKey)) return s;\n const next = blocks.filter((b) => b.key !== cmd.blockKey);\n return { ...s, blocks: next.length > 0 ? next : undefined } as unknown as Section;\n });\n\nconst moveBlock: Handler<\"moveBlock\"> = (page, cmd) =>\n withSection(page, cmd.key, (s) => {\n const blocks = (s.blocks ?? []) as readonly Keyed[];\n const from = blocks.findIndex((b) => b.key === cmd.blockKey);\n const to = clamp(cmd.to, 0, blocks.length - 1);\n return from < 0 || from === to ? s : ({ ...s, blocks: moved(blocks, from, to) } as unknown as Section);\n });\n\nconst patchBlock: Handler<\"patchBlock\"> = (page, cmd) =>\n withSection(page, cmd.key, (s) => {\n const blocks = (s.blocks ?? []) as readonly Keyed[];\n const block = blocks.find((b) => b.key === cmd.blockKey);\n if (!block || saysNothingNew(block.settings ?? {}, cmd.patch)) return s;\n return { ...s, blocks: blocks.map((b) => (b === block ? { ...b, settings: { ...b.settings, ...cmd.patch } } : b)) } as unknown as Section;\n });\n\nconst handlers: { [T in Command[\"type\"]]: Handler<T> } = {\n addSection, removeSection, moveSection, setVariant, patchSettings, setText, toggleDisabled, setPreset, setDensity, applyLook: applyLookCmd, setAccent, addBlock, removeBlock, moveBlock, patchBlock,\n};\n\n/** Applies a command to a document; returns the same object when nothing changes. */\nexport function applyCommand(page: ShopPage, cmd: Command): ShopPage {\n return (handlers[cmd.type] as (page: ShopPage, cmd: Command) => ShopPage)(page, cmd);\n}\n","\"use client\";\n\n// Our own shop composer (ADR-007 §5): three panes on a laptop — the outline of the sections, the live preview of the product's own\n// public page, the inspector of the selected section — and two steps on a phone (the list, then the section; the preview behind a\n// « View » button). Every change is a command on a reducer (⌘Z / ⇧⌘Z, 100 steps), saved to the draft after 800 ms of calm; « Publish »\n// shows what changes and refuses while a setting is invalid. Every action has a keyboard path. No third-party editor: Puck was weighed\n// and not adopted (the model is a list, not a canvas).\nimport { Button } from \"@krizaka/ui/button\";\nimport { Dialog } from \"@krizaka/ui/dialog\";\nimport { RadioGroup } from \"@krizaka/ui/radio-group\";\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { SECTION_DEFINITIONS, type SectionType } from \"../shop/catalogue\";\nimport { postToPreview } from \"../shop/preview\";\nimport { parseShopPage, type ShopPage } from \"../shop/schema\";\nimport { type Command } from \"./commands\";\nimport { type DiffEntry, diffPages } from \"./diff\";\nimport { canRedo, canUndo, createHistory, type History, redo, run, undo } from \"./history\";\nimport { Inspector } from \"./inspector\";\nimport { newKey } from \"./keys\";\nimport { LookPicker } from \"./look-picker\";\nimport { defaultShopComposerMessages, fill, type ShopComposerMessages } from \"./messages\";\nimport { Outline, sectionLabel } from \"./outline\";\n\n/** How long the draft waits for calm before it is saved. */\n// @fixed: ADR-007 §5 — the autosave debounce of the editor, 800 ms; not a shop setting.\nexport const AUTOSAVE_MS = 800;\n\nexport type ShopComposerPreset = {\n id: string;\n version: number;\n name: string;\n density: \"compact\" | \"airy\";\n variants: Readonly<Record<string, string>>;\n /** A look's (`look-*`): the accent it starts with and the tested list the owner chooses from. Presets without a list are trade presets (the « Style » select). */\n accent?: string;\n accents?: readonly string[];\n};\n\nexport type ShopComposerProps = {\n /** The draft to edit. The composer keeps its own history from it. */\n value: ShopPage;\n /** Change it to load another document (another draft): the history and the selection start again. */\n resetKey?: string | number;\n /** Called with a valid draft after 800 ms without a change: save it. A rejection says « Not saved ». */\n onChange?: (page: ShopPage) => void | Promise<void>;\n /** Called with the draft once the person confirmed the diff. */\n onPublish: (page: ShopPage) => void | Promise<void>;\n /** The discard of the draft (the product asks first, in its own dialog). Absent: no such button. */\n onDiscard?: () => void;\n /** What is live now, for the diff of « Publish ». Absent: the document the composer was opened with. */\n published?: ShopPage;\n /** The page of the product, in an iframe: its own route with `?draft=<id>`. Its origin is the bridge's. */\n previewUrl: string;\n /** The look presets of the shop's trade. */\n presets: readonly ShopComposerPreset[];\n /** The section types the trade does not use: folded under « … » in the catalogue. */\n foldedTypes?: readonly SectionType[];\n /** The words, translated. Default: English. */\n messages?: ShopComposerMessages;\n /** Classes merged on the root (its height: `h-[100dvh]`). */\n className?: string;\n};\n\ntype State = { history: History; epoch: number };\ntype Action = { type: \"run\"; cmd: Command; merge?: string } | { type: \"undo\" } | { type: \"redo\" } | { type: \"reset\"; page: ShopPage };\n\nfunction reducer(state: State, a: Action): State {\n switch (a.type) {\n case \"run\": {\n const history = run(state.history, a.cmd, a.merge);\n return history === state.history ? state : { ...state, history };\n }\n case \"undo\": {\n const history = undo(state.history);\n return history === state.history ? state : { history, epoch: state.epoch + 1 };\n }\n case \"redo\": {\n const history = redo(state.history);\n return history === state.history ? state : { history, epoch: state.epoch + 1 };\n }\n case \"reset\":\n return { history: createHistory(a.page), epoch: state.epoch + 1 };\n }\n}\n\nfunction PreviewFrame({ src, title, phone, frame }: { src: string; title: string; phone: boolean; frame: React.Ref<HTMLIFrameElement> }) {\n return (\n <div className=\"flex h-full min-h-0 justify-center overflow-auto bg-surface-2 p-3\">\n <iframe ref={frame} src={src || undefined} title={title} data-device={phone ? \"phone\" : \"desktop\"} className={phone ? \"h-full min-h-[34rem] w-[390px] max-w-full rounded-xl border border-border-default bg-surface-0\" : \"h-full min-h-[34rem] w-full rounded-xl border border-border-default bg-surface-0\"} />\n </div>\n );\n}\n\n/** The shop composer. */\nexport function ShopComposer({ value, resetKey, onChange, onPublish, onDiscard, published, previewUrl, presets, foldedTypes = [], messages = defaultShopComposerMessages, className }: ShopComposerProps) {\n const m = messages;\n const [{ history, epoch }, dispatch] = React.useReducer(reducer, value, (v): State => ({ history: createHistory(v), epoch: 0 }));\n const page = history.present;\n const [baseline, setBaseline] = React.useState(published ?? value);\n const [selected, setSelected] = React.useState<string | null>(page.sections[0]?.key ?? null);\n const [step, setStep] = React.useState<\"list\" | \"section\">(\"list\");\n const [live, setLive] = React.useState(\"\");\n const [status, setStatus] = React.useState<\"idle\" | \"saving\" | \"saved\" | \"error\">(\"idle\");\n const [adding, setAdding] = React.useState(false);\n const [publishing, setPublishing] = React.useState(false);\n const [device, setDevice] = React.useState<\"phone\" | \"desktop\">(\"desktop\");\n const [previewOpen, setPreviewOpen] = React.useState(false);\n const [invalid, setInvalid] = React.useState<ReadonlySet<string>>(new Set());\n const [focusRequest, setFocusRequest] = React.useState<{ key: string } | null>(null);\n const frame = React.useRef<HTMLIFrameElement | null>(null);\n const origin = React.useMemo(() => {\n try {\n return new URL(previewUrl, typeof location === \"undefined\" ? undefined : location.href).origin;\n } catch {\n return \"\";\n }\n }, [previewUrl]);\n\n // A `data:` or `about:` preview has an opaque origin (« null »): nothing can be addressed to it.\n const hasOrigin = origin !== \"\" && origin !== \"null\";\n\n // A new document from outside (another draft): history and selection start again.\n const first = React.useRef(true);\n const saved = React.useRef(page);\n React.useEffect(() => {\n if (first.current) {\n first.current = false;\n return;\n }\n saved.current = value;\n dispatch({ type: \"reset\", page: value });\n setInvalid(new Set());\n setBaseline(published ?? value);\n setSelected(value.sections[0]?.key ?? null);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- only a new `resetKey` reloads the document\n }, [resetKey]);\n\n const parsed = React.useMemo(() => parseShopPage(page), [page]);\n const looks = React.useMemo(() => presets.filter((p) => p.id.startsWith(\"look-\")), [presets]);\n const styles = React.useMemo(() => presets.filter((p) => !p.id.startsWith(\"look-\")), [presets]);\n const announce = React.useCallback((message: string) => setLive((prev) => (prev === message ? message + String.fromCodePoint(0x200b) : message)), []);\n const exec = React.useCallback((cmd: Command, merge?: string) => dispatch({ type: \"run\", cmd, merge }), []);\n const selectedSection = page.sections.find((s) => s.key === selected) ?? null;\n const selectedIndex = selectedSection ? page.sections.indexOf(selectedSection) : -1;\n\n // Autosave to the draft: a valid document, after a calm of 800 ms; the preview refreshes once it is saved.\n React.useEffect(() => {\n if (page === saved.current || !parsed.ok || !onChange) return;\n const timer = setTimeout(async () => {\n setStatus(\"saving\");\n try {\n await onChange(page);\n saved.current = page;\n setStatus(\"saved\");\n if (hasOrigin) postToPreview(frame.current?.contentWindow, origin, { source: \"krizaka-shop-composer\", type: \"refresh\" });\n } catch {\n setStatus(\"error\");\n }\n }, AUTOSAVE_MS);\n return () => clearTimeout(timer);\n }, [page, parsed.ok, onChange, origin, hasOrigin]);\n\n // The preview follows the selection: outline and scroll.\n React.useEffect(() => {\n if (selected && hasOrigin) postToPreview(frame.current?.contentWindow, origin, { source: \"krizaka-shop-composer\", type: \"scroll\", key: selected });\n }, [selected, origin, hasOrigin]);\n\n const select = (key: string) => {\n setSelected(key);\n setStep(\"section\");\n };\n\n const addSection = (type: SectionType) => {\n const def = SECTION_DEFINITIONS.find((d) => d.type === type)!;\n const preferred = presets.find((p) => p.id === page.preset.id)?.variants[type];\n const variant = preferred && (def.variants as readonly string[]).includes(preferred) ? preferred : undefined;\n const key = newKey(\"s\");\n const at = type === \"hero\" ? 0 : page.sections.length;\n exec({ type: \"addSection\", sectionType: type, key, variant, at });\n setAdding(false);\n setSelected(key);\n setFocusRequest({ key });\n announce(fill(m.announceAdded, { name: m.sectionNames[type], n: at + 1 }));\n };\n\n // Undo and redo hand the form a document it did not write: what it said was invalid is no longer true.\n const step_ = (direction: \"undo\" | \"redo\") => {\n dispatch({ type: direction });\n setInvalid(new Set());\n announce(direction === \"undo\" ? m.announceUndone : m.announceRedone);\n };\n\n const onKeyDown = (e: React.KeyboardEvent) => {\n if (!(e.metaKey || e.ctrlKey) || e.key.toLowerCase() !== \"z\") return;\n const el = e.target as HTMLElement;\n if (el.closest(\"input, textarea, select, [contenteditable=true]\")) return;\n e.preventDefault();\n step_(e.shiftKey ? \"redo\" : \"undo\");\n };\n\n const changes: DiffEntry[] = publishing ? diffPages(baseline, page) : [];\n const nameOfKey = (key: string) => {\n const i = page.sections.findIndex((s) => s.key === key);\n if (i >= 0) return sectionLabel(page.sections, i, m);\n const was = baseline.sections.findIndex((s) => s.key === key);\n return was >= 0 ? sectionLabel(baseline.sections, was, m) : key;\n };\n const problems = [\n ...[...invalid].filter((key) => page.sections.some((s) => s.key === key)).map((key) => ({ key, text: fill(m.problemIn, { name: nameOfKey(key) }) })),\n ...(!parsed.ok ? parsed.issues.map((i) => ({ key: i.path, text: `${i.path}: ${i.message}` })) : []),\n ];\n const describe = (d: DiffEntry): string => {\n const name = \"key\" in d ? nameOfKey(d.key) : \"\";\n const t = m.diff[d.kind];\n switch (d.kind) {\n case \"moved\": return fill(t, { name, from: d.from + 1, to: d.to + 1 });\n case \"variant\": return fill(t, { name, from: m.variantNames[`${d.type}.${d.from}`] ?? d.from, to: m.variantNames[`${d.type}.${d.to}`] ?? d.to });\n case \"preset\": return fill(t, { from: presets.find((p) => p.id === d.from)?.name ?? d.from, to: presets.find((p) => p.id === d.to)?.name ?? d.to });\n case \"density\": return fill(t, { from: d.from ?? \"—\", to: d.to ?? \"—\" });\n default: return fill(t, { name });\n }\n };\n\n const status_ = status === \"saving\" ? m.saving : status === \"saved\" ? m.saved : status === \"error\" ? m.saveFailed : \"\";\n\n return (\n <div className={cn(\"kz-composer flex min-h-0 flex-col gap-3\", className)} onKeyDown={onKeyDown} data-step={step}>\n <header className=\"flex flex-wrap items-center gap-2 border-b border-border-subtle pb-2\">\n <h2 className=\"m-0 me-auto text-base font-semibold text-fg\">{m.title}</h2>\n <span role=\"status\" aria-live=\"polite\" className=\"text-xs text-fg-secondary\">{status_}</span>\n <Button variant=\"ghost\" size=\"sm\" disabled={!canUndo(history)} onClick={() => step_(\"undo\")} aria-keyshortcuts=\"Control+Z Meta+Z\">{m.undo}</Button>\n <Button variant=\"ghost\" size=\"sm\" disabled={!canRedo(history)} onClick={() => step_(\"redo\")} aria-keyshortcuts=\"Control+Shift+Z Meta+Shift+Z\">{m.redo}</Button>\n {onDiscard && <Button variant=\"ghost\" size=\"sm\" onClick={onDiscard}>{m.discard}</Button>}\n <Button variant=\"secondary\" size=\"sm\" className=\"lg:hidden\" onClick={() => setPreviewOpen(true)}>{m.viewPreview}</Button>\n <Button variant=\"primary\" size=\"sm\" onClick={() => setPublishing(true)}>{m.publish}</Button>\n </header>\n {/* One polite live region says every move, add, remove, undo. */}\n <p role=\"status\" aria-live=\"polite\" className=\"sr-only\">{live}</p>\n\n <div className=\"grid min-h-0 flex-1 gap-4 lg:grid-cols-[18rem_minmax(0,1fr)_24rem]\">\n <aside aria-label={m.sections} className={cn(\"flex min-h-0 flex-col gap-4 overflow-y-auto\", step === \"section\" && \"hidden lg:flex\")}>\n <Outline sections={page.sections} selected={selected} onSelect={select} run={exec} messages={m} announce={announce} onAdd={() => setAdding(true)} focusRequest={focusRequest} />\n <details className=\"rounded-lg border border-border-default p-3\" open>\n <summary className=\"min-h-9 cursor-pointer text-sm font-semibold text-fg\">{m.look}</summary>\n <div className=\"mt-2 grid gap-3\">\n {looks.length > 0 && <LookPicker looks={looks} page={page} messages={m} run={exec} announce={announce} />}\n {styles.length > 0 && <label className=\"grid gap-1 text-xs font-semibold text-fg-secondary\">\n {m.preset}\n <select\n className=\"min-h-10 rounded-md border border-border-control bg-surface-1 px-2 text-sm font-normal text-fg\"\n value={page.preset.id}\n onChange={(e) => {\n const p = presets.find((x) => x.id === e.target.value);\n if (p) exec({ type: \"setPreset\", preset: { id: p.id, version: p.version }, density: null });\n }}\n >\n {styles.map((p) => <option key={p.id} value={p.id}>{p.name}</option>)}\n </select>\n </label>}\n <RadioGroup.Root label={m.density} variant=\"segmented\" value={page.density ?? presets.find((p) => p.id === page.preset.id)?.density ?? \"compact\"} onValueChange={(d) => exec({ type: \"setDensity\", density: d as \"compact\" | \"airy\" })}>\n <RadioGroup.Segment value=\"compact\">{m.densityCompact}</RadioGroup.Segment>\n <RadioGroup.Segment value=\"airy\">{m.densityAiry}</RadioGroup.Segment>\n </RadioGroup.Root>\n </div>\n </details>\n </aside>\n\n <section aria-label={m.preview} className=\"hidden min-h-0 flex-col gap-2 lg:flex\">\n <RadioGroup.Root label={m.preview} variant=\"segmented\" value={device} onValueChange={(d) => setDevice(d as \"phone\" | \"desktop\")} className=\"self-start\">\n <RadioGroup.Segment value=\"desktop\">{m.desktop}</RadioGroup.Segment>\n <RadioGroup.Segment value=\"phone\">{m.phone}</RadioGroup.Segment>\n </RadioGroup.Root>\n <PreviewFrame src={previewUrl} title={m.previewTitle} phone={device === \"phone\"} frame={frame} />\n </section>\n\n <aside aria-label={m.inspector} className={cn(\"flex min-h-0 flex-col gap-4 overflow-y-auto\", step === \"list\" && \"hidden lg:flex\")}>\n <Button variant=\"ghost\" size=\"sm\" className=\"self-start lg:hidden\" onClick={() => setStep(\"list\")}>← {m.backToSections}</Button>\n {selectedSection ? (\n <Inspector\n section={selectedSection}\n name={sectionLabel(page.sections, selectedIndex, m)}\n messages={m}\n run={exec}\n epoch={epoch}\n announce={announce}\n onInvalid={(key, bad) => setInvalid((prev) => { const next = new Set(prev); if (bad) next.add(key); else next.delete(key); return next.size === prev.size && next.has(key) === prev.has(key) ? prev : next; })}\n preset={page.preset.id}\n density={page.density}\n />\n ) : (\n <p className=\"m-0 text-sm text-fg-secondary\">{m.noSelection}</p>\n )}\n </aside>\n </div>\n\n <Dialog.Root open={adding} onOpenChange={setAdding}>\n <Dialog.Content closeLabel={m.cancel}>\n <Dialog.Header>\n <Dialog.Title>{m.addSection}</Dialog.Title>\n <Dialog.Description>{m.addSectionHint}</Dialog.Description>\n </Dialog.Header>\n <Dialog.Body>\n {[SECTION_DEFINITIONS.filter((d) => !foldedTypes.includes(d.type)), SECTION_DEFINITIONS.filter((d) => foldedTypes.includes(d.type))].map((group, g) => {\n const list = (\n <ul className=\"m-0 grid list-none gap-1 p-0\">\n {group.map((d) => (\n <li key={d.type}>\n <Button variant=\"ghost\" className=\"w-full justify-start\" disabled={d.type === \"hero\" && page.sections.some((s) => s.type === \"hero\")} onClick={() => addSection(d.type)}>\n {m.sectionNames[d.type]}\n </Button>\n </li>\n ))}\n </ul>\n );\n return group.length === 0 ? null : g === 0 ? <React.Fragment key={g}>{list}</React.Fragment> : <details key={g} className=\"mt-3\"><summary className=\"min-h-9 cursor-pointer text-sm text-fg-secondary\">…</summary>{list}</details>;\n })}\n </Dialog.Body>\n </Dialog.Content>\n </Dialog.Root>\n\n <Dialog.Root open={publishing} onOpenChange={setPublishing}>\n <Dialog.Content closeLabel={m.cancel}>\n <Dialog.Header>\n <Dialog.Title>{m.publishTitle}</Dialog.Title>\n <Dialog.Description>{m.publishWhat}</Dialog.Description>\n </Dialog.Header>\n <Dialog.Body>\n {problems.length > 0 && (\n <div role=\"alert\" className=\"mb-3 rounded-md border border-border-control bg-surface-2 p-3\">\n <p className=\"m-0 text-sm font-semibold text-fg\">{fill(m.problemsTitle, { n: problems.length })}</p>\n <ul className=\"m-0 mt-1 list-disc ps-5 text-sm text-fg-secondary\">{problems.map((p) => <li key={p.key}>{p.text}</li>)}</ul>\n </div>\n )}\n {changes.length === 0 ? (\n <p className=\"m-0 text-sm text-fg-secondary\">{m.publishNothing}</p>\n ) : (\n <ul className=\"m-0 list-disc ps-5 text-sm text-fg\">{changes.map((d, i) => <li key={i}>{describe(d)}</li>)}</ul>\n )}\n </Dialog.Body>\n <Dialog.Footer>\n <Dialog.Close asChild><Button variant=\"ghost\">{m.cancel}</Button></Dialog.Close>\n <Button variant=\"primary\" disabled={problems.length > 0 || !parsed.ok} onClick={async () => { await onPublish(page); setBaseline(page); setPublishing(false); }}>{m.publishConfirm}</Button>\n </Dialog.Footer>\n </Dialog.Content>\n </Dialog.Root>\n\n <Dialog.Root open={previewOpen} onOpenChange={setPreviewOpen}>\n <Dialog.Content closeLabel={m.closePreview} size=\"lg\">\n <Dialog.Header><Dialog.Title>{m.preview}</Dialog.Title></Dialog.Header>\n <Dialog.Body className=\"p-0\">\n {previewOpen && <PreviewFrame src={previewUrl} title={m.previewTitle} phone frame={frame} />}\n </Dialog.Body>\n </Dialog.Content>\n </Dialog.Root>\n </div>\n );\n}\n","import { type ClassValue, clsx } from \"clsx\";\nimport { cnMerge, type TWMergeConfig } from \"tailwind-variants\";\n\nexport type { ClassValue };\n\n/**\n * The preset's own utilities, told to the merge engine: the material (BRAND.md §6: `bg-sheen`, `bg-fill-shade`,\n * `bg-halo` are background images; `shadow-raised` · `-floating` · `-overlay` · `-glow` are shadows; `inset-shadow-edge`\n * · `-edge-fill` · `-well` are inset shadows). Unknown, tailwind-merge would take `bg-sheen` for a colour and drop the\n * `bg-surface-2` it lies on.\n */\nexport const twMergeConfig: TWMergeConfig = {\n extend: {\n classGroups: {\n \"bg-image\": [\"bg-sheen\", \"bg-fill-shade\", \"bg-halo\"],\n shadow: [\"shadow-raised\", \"shadow-floating\", \"shadow-overlay\", \"shadow-glow\", \"shadow-glow-lg\"],\n \"inset-shadow\": [\"inset-shadow-edge\", \"inset-shadow-edge-fill\", \"inset-shadow-well\"],\n },\n },\n};\n\nconst mergeConfig = { twMergeConfig };\n\n/**\n * Merges Tailwind classes: the last one wins — a product's `className` overrides the primitive's. The merge engine is\n * tailwind-merge as tailwind-variants ships it (the one `tv` uses), so the platform carries a single copy of it.\n * tailwind-variants bundles that engine since 3.3 (it never imports the `tailwind-merge` package, an optional peer):\n * hence `tailwind-variants ^3.3.1` and no `tailwind-merge` dependency — `scripts/consumer.mjs` checks it on a clean\n * install of the packed package.\n */\nexport function cn(...inputs: ClassValue[]): string {\n return cnMerge(clsx(inputs))(mergeConfig) ?? \"\";\n}\n\n","// The preview bridge (ADR-007 §5): the composer shows the product's real public page in an iframe of its own route\n// (`?draft=<id>`) and talks to it by `postMessage` — three messages only, every one origin-checked on both sides: `select` (outline\n// a section), `scroll` (bring it into view), `refresh` (the draft changed: reload the data). Nothing else crosses: no document, no\n// script, no style. Both halves are here, tiny and free of React, because the page side must not import the composer.\n\n/** The only messages: the composer to the page. */\nexport type PreviewMessage = { source: \"krizaka-shop-composer\"; type: \"select\" | \"scroll\"; key: string } | { source: \"krizaka-shop-composer\"; type: \"refresh\" };\n\nconst SOURCE = \"krizaka-shop-composer\";\nconst KEY = /^[A-Za-z0-9_-]{1,40}$/;\n\n/** Reads a message event: only if it comes from `origin`, is one of the three messages and carries a well-formed key. */\nexport function readPreviewMessage(event: Pick<MessageEvent, \"origin\" | \"data\">, origin: string): PreviewMessage | null {\n if (event.origin !== origin) return null;\n const d = event.data as Record<string, unknown> | null;\n if (typeof d !== \"object\" || d === null || d.source !== SOURCE) return null;\n if (d.type === \"refresh\") return { source: SOURCE, type: \"refresh\" };\n if ((d.type === \"select\" || d.type === \"scroll\") && typeof d.key === \"string\" && KEY.test(d.key)) return { source: SOURCE, type: d.type, key: d.key };\n return null;\n}\n\n/** The composer's side: posts to the preview's window, addressed to its origin only. */\nexport function postToPreview(target: Pick<Window, \"postMessage\"> | null | undefined, origin: string, message: PreviewMessage): void {\n target?.postMessage(message, origin);\n}\n\n/** The attribute that names a section in the preview page: `<div data-shop-key=\"s_8f2c\">` (a block: the outline is its ring). */\nexport const SHOP_KEY_ATTRIBUTE = \"data-shop-key\";\n\n/**\n * The page's side: outlines the selected section (`data-shop-selected`, drawn by `blocks.css`), scrolls it into view, and calls\n * `onRefresh` when the draft changed. Returns the function that removes it. Only runs in an iframe of the composer's origin.\n */\nexport function connectShopPreview({ composerOrigin, onRefresh, root = document }: { composerOrigin: string; onRefresh?: () => void; root?: Document }): () => void {\n const find = (key: string) => root.querySelector<HTMLElement>(`[${SHOP_KEY_ATTRIBUTE}=\"${key}\"]`);\n const handler = (event: MessageEvent) => {\n // The origin first, before anything else is read from the message.\n if (event.origin !== composerOrigin) return;\n const m = readPreviewMessage(event, composerOrigin);\n if (!m) return;\n if (m.type === \"refresh\") {\n onRefresh?.();\n return;\n }\n for (const selected of root.querySelectorAll<HTMLElement>(\"[data-shop-selected]\")) delete selected.dataset.shopSelected;\n const el = find(m.key);\n if (!el) return;\n el.dataset.shopSelected = \"\";\n if (m.type === \"scroll\") {\n const reduced = typeof matchMedia === \"function\" && matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n el.scrollIntoView({ block: \"center\", behavior: reduced ? \"auto\" : \"smooth\" });\n }\n };\n window.addEventListener(\"message\", handler);\n return () => window.removeEventListener(\"message\", handler);\n}\n","// The document a shop page is (ADR-007 §1): an ordered list of sections, each a `type` × `variant` with its settings and\n// its blocks. Parsed on write (a route refuses an invalid one, with the path) and on read. The storage is the product's.\nimport * as z from \"zod/mini\";\n\nimport { SECTION_DEFINITIONS, type SectionType } from \"./catalogue\";\nimport { SHOP_LIMITS } from \"./limits\";\n\n/** The version of the document's format; migrations are pure functions schema n → n + 1 (`migrate.ts`). */\n// @fixed: ADR-007 §1 — the format version of the code, bumped with a migration; not a shop setting.\nexport const SHOP_SCHEMA_VERSION = 1;\n\n/** A look preset by id and version (`@krizaka/tokens`): `salon-atelier`. The mode is the visitor's, never stored. */\nexport const presetRef = z.object({\n id: z.string().check(z.regex(/^[a-z]+-[a-z]+$/, \"a preset id (trade-name)\")),\n version: z.int().check(z.minimum(1)),\n});\n\nconst sectionUnion = z.discriminatedUnion(\n \"type\",\n SECTION_DEFINITIONS.map((d) => d.schema) as unknown as [z.ZodMiniObject, ...z.ZodMiniObject[]],\n);\n\nexport const shopPageSchema = z\n .object({\n schema: z.literal(SHOP_SCHEMA_VERSION),\n preset: presetRef,\n /** Overrides the preset's density. */\n density: z.optional(z.enum([\"compact\", \"airy\"])),\n /** One of the accents the look lists as tested (`krizaka`, `folioviv:accent-2`…): the owner's choice within the look. */\n accent: z.optional(z.string().check(z.regex(/^[a-z]+(:accent-2)?$/, \"an accent of the look\"))),\n sections: z.array(sectionUnion).check(z.minLength(1), z.maxLength(SHOP_LIMITS.sections)),\n })\n .check(\n z.superRefine((page, ctx) => {\n const add = (path: (string | number)[], message: string) => ctx.issues.push({ code: \"custom\", message, path, input: page });\n const seen = new Set<string>();\n page.sections.forEach((section, i) => {\n const s = section as { key: string; type: string };\n if (seen.has(s.key)) add([\"sections\", i, \"key\"], `the key \"${s.key}\" is used twice`);\n seen.add(s.key);\n if (s.type === \"hero\" && i !== 0) add([\"sections\", i, \"type\"], \"the hero is the first section, and there is only one\");\n });\n }),\n );\n\n/** A section of any type, as parsed: its `settings` and `blocks` are the type's own. */\nexport type Section = z.output<(typeof SECTION_DEFINITIONS)[number][\"schema\"]>;\nexport type ShopPage = {\n schema: typeof SHOP_SCHEMA_VERSION;\n preset: z.output<typeof presetRef>;\n density?: \"compact\" | \"airy\" | undefined;\n accent?: string | undefined;\n sections: Section[];\n};\nexport type SectionOf<T extends SectionType> = Extract<Section, { type: T }>;\n\nexport type ShopPageIssue = { path: string; message: string };\nexport type ShopPageResult = { ok: true; page: ShopPage } | { ok: false; issues: ShopPageIssue[] };\n\n/** Validates a document; an invalid one answers every issue with its path (`sections.2.variant`), for a 422. */\nexport function parseShopPage(input: unknown): ShopPageResult {\n const result = shopPageSchema.safeParse(input);\n if (result.success) return { ok: true, page: result.data as unknown as ShopPage };\n return { ok: false, issues: result.error.issues.map((i) => ({ path: i.path.join(\".\"), message: i.message })) };\n}\n","// What « Publish » shows (ADR-007 §5): the sections added, removed, moved, whose variant, settings or visibility changed, and the\n// look that changed — a list of facts read from two documents, never a guess.\nimport type { Section, ShopPage } from \"../shop/schema\";\n\nexport type DiffEntry =\n | { kind: \"added\" | \"removed\"; key: string; type: string; position: number }\n | { kind: \"moved\"; key: string; type: string; from: number; to: number }\n | { kind: \"variant\"; key: string; type: string; from: string; to: string }\n | { kind: \"settings\" | \"blocks\" | \"text\"; key: string; type: string }\n | { kind: \"disabled\" | \"enabled\"; key: string; type: string }\n | { kind: \"preset\"; from: string; to: string }\n | { kind: \"density\"; from: string | undefined; to: string | undefined };\n\nconst same = (a: unknown, b: unknown) => JSON.stringify(a) === JSON.stringify(b);\n\n/** The differences between the published document and the draft, in the draft's reading order. */\nexport function diffPages(before: ShopPage, after: ShopPage): DiffEntry[] {\n const out: DiffEntry[] = [];\n const was = new Map(before.sections.map((s, i) => [s.key, { s, i }]));\n const is = new Set(after.sections.map((s) => s.key));\n // « moved » is relative: removing a section above must not mark every section under it as moved.\n const kept = before.sections.filter((s) => is.has(s.key)).map((s) => s.key);\n const order = after.sections.filter((s) => was.has(s.key)).map((s) => s.key);\n after.sections.forEach((s: Section, i) => {\n const old = was.get(s.key);\n if (!old) {\n out.push({ kind: \"added\", key: s.key, type: s.type, position: i });\n return;\n }\n if (kept.indexOf(s.key) !== order.indexOf(s.key)) out.push({ kind: \"moved\", key: s.key, type: s.type, from: old.i, to: i });\n if (old.s.variant !== s.variant) out.push({ kind: \"variant\", key: s.key, type: s.type, from: old.s.variant, to: s.variant });\n if (!same(old.s.settings, s.settings)) out.push({ kind: \"settings\", key: s.key, type: s.type });\n if (!same(old.s.blocks, s.blocks)) out.push({ kind: \"blocks\", key: s.key, type: s.type });\n if (!same(old.s.text, s.text)) out.push({ kind: \"text\", key: s.key, type: s.type });\n if (Boolean(old.s.disabled) !== Boolean(s.disabled)) out.push({ kind: s.disabled ? \"disabled\" : \"enabled\", key: s.key, type: s.type });\n });\n for (const [key, { s, i }] of was) if (!is.has(key)) out.push({ kind: \"removed\", key, type: s.type, position: i });\n if (before.preset.id !== after.preset.id || before.preset.version !== after.preset.version) out.push({ kind: \"preset\", from: before.preset.id, to: after.preset.id });\n if (before.density !== after.density) out.push({ kind: \"density\", from: before.density, to: after.density });\n return out;\n}\n","// Undo / redo (ADR-007 §5): the document before and after every command, 100 steps. Documents are immutable and share their\n// untouched sections, so keeping a hundred of them costs a few kilobytes. A command that changes nothing is not a step; a new\n// command forgets what was undone.\nimport type { ShopPage } from \"../shop/schema\";\nimport { applyCommand, type Command } from \"./commands\";\n\n/** The most steps kept. */\n// @fixed: ADR-007 §5 — the composer's undo depth, a product decision of the editor, not a shop setting.\nexport const HISTORY_LIMIT = 100;\n\nexport type History = { readonly past: readonly ShopPage[]; readonly present: ShopPage; readonly future: readonly ShopPage[]; /** The key of the burst the last step belongs to (typing in one field). */ readonly merge?: string };\n\nexport const createHistory = (page: ShopPage): History => ({ past: [], present: page, future: [] });\n\n/**\n * Runs a command: a new step, unless it changes nothing. Commands with the same `merge` key in a row (the keystrokes of one field)\n * make one step, so a hundred letters do not use the hundred steps of undo.\n */\nexport function run(history: History, cmd: Command, merge?: string): History {\n const next = applyCommand(history.present, cmd);\n if (next === history.present) return history;\n if (merge && history.merge === merge && history.past.length > 0) return { ...history, present: next, future: [] };\n return { past: [...history.past, history.present].slice(-HISTORY_LIMIT), present: next, future: [], merge };\n}\n\nexport const canUndo = (h: History) => h.past.length > 0;\nexport const canRedo = (h: History) => h.future.length > 0;\n\nexport function undo(h: History): History {\n const previous = h.past.at(-1);\n if (!previous) return h;\n return { past: h.past.slice(0, -1), present: previous, future: [h.present, ...h.future] };\n}\n\nexport function redo(h: History): History {\n const [next, ...rest] = h.future;\n if (!next) return h;\n return { past: [...h.past, h.present], present: next, future: rest };\n}\n\n/** Replaces the document without a step (a reload from the server, a discarded draft). */\nexport const reset = (page: ShopPage): History => createHistory(page);\n","\"use client\";\n\n// The inspector (ADR-007 §5): for the selected section, the variant as a radio group of live thumbnails, the settings as a form\n// generated from the zod schema of its type, the owner's own words (title and line, in each language), and the blocks as a\n// sortable list (Move up / Move down, no drag needed). The look of the whole page is the first tab's concern: see `LookPanel`.\nimport { Button } from \"@krizaka/ui/button\";\nimport { RadioGroup } from \"@krizaka/ui/radio-group\";\nimport * as React from \"react\";\n\nimport { sectionDefinition } from \"../shop/catalogue\";\nimport type { Section } from \"../shop/schema\";\nimport type { Command } from \"./commands\";\nimport { newKey } from \"./keys\";\nimport { fill, type ShopComposerMessages } from \"./messages\";\nimport { SettingsForm } from \"./settings-form\";\nimport { SectionThumbnail } from \"./thumbnails\";\n\nexport type InspectorProps = {\n section: Section;\n name: string;\n messages: ShopComposerMessages;\n run: (cmd: Command, merge?: string) => void;\n /** Bumped when the document changes from outside the form (undo, redo): the settings form remounts. */\n epoch: number;\n announce: (message: string) => void;\n onInvalid: (key: string, invalid: boolean) => void;\n /** The page's look, so a thumbnail wears it. */\n preset?: string;\n density?: \"compact\" | \"airy\";\n};\n\nfunction Words({ section, m, run }: Pick<InspectorProps, \"section\" | \"run\"> & { m: ShopComposerMessages }) {\n const id = React.useId();\n const text = section.text ?? {};\n const field = (name: \"title\" | \"lead\", label: string) => (\n <fieldset className=\"m-0 grid gap-1.5 border-0 p-0\">\n <legend className=\"mb-1 text-xs font-semibold text-fg-secondary\">{label}</legend>\n {([\"fr\", \"en\"] as const).map((lang) => (\n <div key={lang} className=\"flex flex-col gap-1\">\n <label htmlFor={`${id}-${name}-${lang}`} className=\"text-xs text-fg-secondary\">{lang === \"fr\" ? m.french : m.english}</label>\n <input\n id={`${id}-${name}-${lang}`}\n className=\"min-h-10 rounded-md border border-border-control bg-surface-1 px-3 text-sm text-fg focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring\"\n maxLength={600}\n value={text[name]?.[lang] ?? \"\"}\n onChange={(e) => {\n const next = { ...(text[name] ?? {}), [lang]: e.target.value || undefined };\n const empty = !next.fr && !next.en;\n run({ type: \"setText\", key: section.key, field: name, value: empty ? undefined : next }, `text:${section.key}:${name}:${lang}`);\n }}\n />\n </div>\n ))}\n </fieldset>\n );\n return (\n <section aria-label={m.words} className=\"grid gap-3\">\n <h3 className=\"m-0 text-sm font-semibold text-fg\">{m.words}</h3>\n {field(\"title\", m.titleField)}\n {field(\"lead\", m.leadField)}\n </section>\n );\n}\n\nfunction Blocks({ section, m, run, announce }: Pick<InspectorProps, \"section\" | \"run\" | \"announce\"> & { m: ShopComposerMessages }) {\n const def = sectionDefinition(section.type);\n const blocks = ((section.blocks ?? []) as { key: string; type: string }[]);\n if (def.blockTypes.length === 0) return null;\n const label = (b: { type: string }, i: number) => `${m.blockNames[b.type] ?? b.type} ${i + 1}`;\n const move = (i: number, to: number) => {\n const b = blocks[i]!;\n if (to < 0 || to >= blocks.length) return;\n run({ type: \"moveBlock\", key: section.key, blockKey: b.key, to });\n announce(fill(m.announceMoved, { name: label(b, i), n: to + 1, total: blocks.length }));\n };\n return (\n <section aria-label={m.blocks} className=\"grid gap-2\">\n <h3 className=\"m-0 text-sm font-semibold text-fg\">{m.blocks}</h3>\n {blocks.length > 0 && (\n <ol className=\"m-0 grid list-none gap-1 p-0\">\n {blocks.map((b, i) => (\n <li key={b.key} className=\"flex items-center gap-1 rounded-md border border-border-default bg-surface-1 ps-3\">\n <span className=\"min-w-0 flex-1 truncate text-sm text-fg\">{label(b, i)}</span>\n <Button size=\"sm\" variant=\"ghost\" disabled={i === 0} aria-label={`${m.moveUp}: ${label(b, i)}`} onClick={() => move(i, i - 1)}>↑</Button>\n <Button size=\"sm\" variant=\"ghost\" disabled={i === blocks.length - 1} aria-label={`${m.moveDown}: ${label(b, i)}`} onClick={() => move(i, i + 1)}>↓</Button>\n <Button size=\"sm\" variant=\"ghost\" aria-label={fill(m.removeBlock, { name: label(b, i) })} onClick={() => run({ type: \"removeBlock\", key: section.key, blockKey: b.key })}>×</Button>\n </li>\n ))}\n </ol>\n )}\n <div className=\"flex flex-wrap gap-2\">\n {def.blockTypes.map((type) => (\n <Button key={type} size=\"sm\" variant=\"outline\" onClick={() => run({ type: \"addBlock\", key: section.key, blockKey: newKey(\"b\"), blockType: type, settings: defaultBlockSettings(type) })}>\n {m.addBlock} · {m.blockNames[type] ?? type}\n </Button>\n ))}\n </div>\n </section>\n );\n}\n\n/** The first settings of a new block: what its schema needs to be valid (a product then fills the references). */\nfunction defaultBlockSettings(type: string): Record<string, unknown> {\n switch (type) {\n case \"fact\": return { kind: \"open-now\" };\n case \"note\": return { text: \"…\" };\n case \"flyer\": return { text: \"…\" };\n case \"photo\": return { mediaId: \"\" };\n case \"service\": return { serviceId: \"\" };\n case \"member\": return { memberId: \"\" };\n case \"reel\": return { platform: \"tiktok\", url: \"https://\" };\n case \"link\": return { platform: \"instagram\", url: \"https://\" };\n case \"question\": return { question: {}, answer: {} };\n default: return {};\n }\n}\n\nexport function Inspector({ section, name, messages: m, run, epoch, announce, onInvalid, preset, density }: InspectorProps) {\n const def = sectionDefinition(section.type);\n const label = React.useId();\n return (\n <div className=\"flex min-w-0 flex-col gap-6\">\n <section aria-labelledby={label} className=\"grid gap-2\">\n <h3 id={label} className=\"m-0 text-sm font-semibold text-fg\">{m.variant}</h3>\n {/* The thumbnail is a section: it holds links and buttons, so it sits beside the radio, never inside it. */}\n <RadioGroup.Root label={`${name}: ${m.variant}`} value={section.variant} onValueChange={(variant) => run({ type: \"setVariant\", key: section.key, variant })} className=\"grid grid-cols-1 gap-2 sm:grid-cols-2\">\n {def.variants.map((variant) => (\n <div\n key={variant}\n role=\"presentation\"\n data-checked={section.variant === variant ? \"\" : undefined}\n onClick={() => run({ type: \"setVariant\", key: section.key, variant })}\n className=\"grid cursor-pointer gap-2 rounded-lg border border-border-default bg-surface-1 p-2 data-[checked]:border-accent data-[checked]:bg-accent-soft\"\n >\n <SectionThumbnail type={section.type} variant={variant} preset={preset} density={density} />\n <RadioGroup.Item value={variant}>{m.variantNames[`${section.type}.${variant}`] ?? variant}</RadioGroup.Item>\n </div>\n ))}\n </RadioGroup.Root>\n </section>\n <SettingsForm\n key={`${section.key}:${epoch}`}\n section={section}\n messages={m}\n onValid={(settings) => run({ type: \"patchSettings\", key: section.key, patch: settings }, `settings:${section.key}`)}\n onInvalid={(invalid) => onInvalid(section.key, invalid)}\n />\n <Blocks section={section} m={m} run={run} announce={announce} />\n <Words section={section} m={m} run={run} />\n </div>\n );\n}\n","// Stable keys (ADR-007 §1): « s_8f2c » for a section, « b_3a91 » for a block — generated once, they survive every reorder and\n// anchor the audit. Generated by the composer, never by the reducer (which stays pure).\nconst alphabet = \"0123456789abcdef\";\n\n/** A short random key with a prefix; `random` is injectable so a test is deterministic. */\nexport function newKey(prefix: \"s\" | \"b\", random: () => number = Math.random): string {\n let out = \"\";\n for (let i = 0; i < 6; i++) out += alphabet[Math.floor(random() * 16)];\n return `${prefix}_${out}`;\n}\n","// The composer's words (ADR-007 §5): every string is a prop — the product passes its translated copy. English is the default, so\n// a story or a first integration works without a catalogue; `{name}`, `{n}`, `{total}` are replaced by `fill`.\nimport type { SectionType } from \"../shop/catalogue\";\nimport type { DiffEntry } from \"./diff\";\n\nexport type ShopComposerMessages = {\n title: string;\n /** The outline's name. */\n sections: string;\n addSection: string;\n addSectionHint: string;\n /** « Show {name} » / the switch's accessible name. */\n toggleVisible: string;\n sectionMenu: string;\n moveUp: string;\n moveDown: string;\n moveTop: string;\n remove: string;\n /** Announcements. */\n announceMoved: string;\n announceCannotMove: string;\n announceAdded: string;\n announceRemoved: string;\n announceShown: string;\n announceHidden: string;\n announceUndone: string;\n announceRedone: string;\n hiddenNote: string;\n /** The inspector. */\n inspector: string;\n noSelection: string;\n backToSections: string;\n variant: string;\n settings: string;\n words: string;\n titleField: string;\n leadField: string;\n french: string;\n english: string;\n blocks: string;\n addBlock: string;\n removeBlock: string;\n /** The look. */\n look: string;\n /** The six looks, as a group of swatches. */\n lookChoice: string;\n /** Said when a look is applied (`{name}`). */\n lookApplied: string;\n /** The accent within the chosen look. */\n accentChoice: string;\n /** The names of the accents a look lists (`krizaka`, `folioviv:accent-2`…); an unknown one reads as its id. */\n accentNames: Readonly<Record<string, string>>;\n preset: string;\n density: string;\n densityCompact: string;\n densityAiry: string;\n /** The toolbar. */\n undo: string;\n redo: string;\n saved: string;\n saving: string;\n saveFailed: string;\n publish: string;\n discard: string;\n /** The preview. */\n preview: string;\n previewTitle: string;\n phone: string;\n desktop: string;\n viewPreview: string;\n closePreview: string;\n /** The publish dialog. */\n publishTitle: string;\n publishWhat: string;\n publishNothing: string;\n publishConfirm: string;\n cancel: string;\n problemsTitle: string;\n problemIn: string;\n /** The names. */\n sectionNames: Record<SectionType, string>;\n /** `type.variant` → « Poster ». */\n variantNames: Record<string, string>;\n blockNames: Record<string, string>;\n settingNames: Record<string, string>;\n optionNames: Record<string, string>;\n /** One line per kind of change, with `{name}` (the section) and `{from}` / `{to}` / `{n}`. */\n diff: Record<DiffEntry[\"kind\"], string>;\n};\n\n/** `fill(\"Moved to {n}\", { n: 2 })`. */\nexport const fill = (message: string, vars: Record<string, string | number>) => message.replace(/\\{(\\w+)\\}/g, (_, k: string) => String(vars[k] ?? `{${k}}`));\n\nconst sectionNames: Record<SectionType, string> = {\n hero: \"Hero\", services: \"Services\", booking: \"Booking\", gallery: \"Photos\", video: \"Video\", reviews: \"Reviews\", bulletin: \"News\",\n team: \"Team\", visit: \"Visit\", story: \"Story\", social: \"Social\", faq: \"Questions\", policies: \"Policies\",\n};\n\nconst variantNames: Record<string, string> = {\n \"hero.poster\": \"Poster\", \"hero.split\": \"Split\", \"hero.banner\": \"Banner\", \"hero.tv\": \"Television\",\n \"services.menu\": \"Menu\", \"services.cards\": \"Cards\", \"services.index\": \"Index cards\", \"services.carousel\": \"Carousel\",\n \"booking.strip\": \"Next times\", \"booking.panel\": \"Closing call\", \"booking.sticky\": \"Phone bar\",\n \"gallery.mosaic\": \"Mosaic\", \"gallery.filmstrip\": \"Filmstrip\", \"gallery.wall\": \"Wall\", \"gallery.grid\": \"Grid\",\n \"video.tv\": \"Television\", \"video.shorts\": \"Reels\",\n \"reviews.summary-cards\": \"Score and reviews\", \"reviews.quote\": \"One quote\", \"reviews.strip\": \"Score line\",\n \"bulletin.board\": \"Board\", \"bulletin.banner\": \"Banner line\",\n \"team.row\": \"Row\", \"team.cards\": \"Cards\",\n \"visit.card\": \"Card\", \"visit.map\": \"Map\", \"visit.split\": \"Hours and map\",\n \"story.quote\": \"Quote\", \"story.owner\": \"Owner\",\n \"social.links\": \"Links\", \"social.facade\": \"Latest reel\",\n \"faq.list\": \"List\", \"policies.inline\": \"Inline\",\n};\n\nexport const defaultShopComposerMessages: ShopComposerMessages = {\n title: \"Shop page\",\n sections: \"Sections\",\n addSection: \"Add a section\",\n addSectionHint: \"Choose what to add to your page.\",\n toggleVisible: \"Show {name}\",\n sectionMenu: \"Actions for {name}\",\n moveUp: \"Move up\",\n moveDown: \"Move down\",\n moveTop: \"Move to top\",\n remove: \"Remove\",\n announceMoved: \"{name} moved to position {n} of {total}\",\n announceCannotMove: \"{name} cannot move further\",\n announceAdded: \"{name} added at position {n}\",\n announceRemoved: \"{name} removed\",\n announceShown: \"{name} is shown\",\n announceHidden: \"{name} is hidden\",\n announceUndone: \"Undone\",\n announceRedone: \"Redone\",\n hiddenNote: \"hidden\",\n inspector: \"Section\",\n noSelection: \"Choose a section to change how it is drawn.\",\n backToSections: \"Back to sections\",\n variant: \"How it is drawn\",\n settings: \"Settings\",\n words: \"Your words\",\n titleField: \"Title\",\n leadField: \"Line under the title\",\n french: \"French\",\n english: \"English\",\n blocks: \"Items\",\n addBlock: \"Add\",\n removeBlock: \"Remove {name}\",\n look: \"Look\",\n lookChoice: \"Look of the page\",\n lookApplied: \"Look: {name}\",\n accentChoice: \"Accent\",\n accentNames: { krizaka: \"Krizaka blue\", folioviv: \"Folioviv green\", \"folioviv:accent-2\": \"Copper\", verikora: \"Indigo\", sovkora: \"Orange\" },\n preset: \"Style\",\n density: \"Spacing\",\n densityCompact: \"Compact\",\n densityAiry: \"Airy\",\n undo: \"Undo\",\n redo: \"Redo\",\n saved: \"Saved\",\n saving: \"Saving…\",\n saveFailed: \"Not saved\",\n publish: \"Publish\",\n discard: \"Discard the draft\",\n preview: \"Preview\",\n previewTitle: \"Live preview of your page\",\n phone: \"Phone\",\n desktop: \"Desktop\",\n viewPreview: \"View\",\n closePreview: \"Close\",\n publishTitle: \"Publish this page\",\n publishWhat: \"What changes\",\n publishNothing: \"Nothing has changed since the last publication.\",\n publishConfirm: \"Publish\",\n cancel: \"Cancel\",\n problemsTitle: \"Fix {n} problem before publishing\",\n problemIn: \"{name}\",\n sectionNames,\n variantNames,\n blockNames: { fact: \"Fact\", service: \"Service\", photo: \"Photo\", note: \"Note\", sign: \"Sign\", reel: \"Reel\", flyer: \"Flyer\", member: \"Member\", link: \"Link\", question: \"Question\" },\n settingNames: { media: \"Photo\", focus: \"Crop\", source: \"Source\", groupBy: \"Group by\", columns: \"Columns\", aside: \"Beside the list\", serviceId: \"Service\", count: \"How many\", texture: \"Wall\", cabinet: \"Cabinet\", channel: \"Channel\", rule: \"Which reviews\", showPhone: \"Show the phone number\", body: \"Text\", show: \"Show\" },\n optionNames: { center: \"Centre\", top: \"Top\", bottom: \"Bottom\", all: \"All\", pick: \"Pick\", category: \"Category\", none: \"None\", hours: \"Hours\", plaster: \"Plaster\", brick: \"Brick\", ridge: \"Ridge\", zellige: \"Zellige\", cabinet: \"Cabinet\", portable: \"Portable\", best: \"Best\", latest: \"Latest\", cancellation: \"Cancellation\", prices: \"Prices\", \"booking-window\": \"Booking window\" },\n diff: {\n added: \"{name} added\",\n removed: \"{name} removed\",\n moved: \"{name} moved from {from} to {to}\",\n variant: \"{name} drawn as {to} (was {from})\",\n settings: \"{name}: settings changed\",\n blocks: \"{name}: items changed\",\n text: \"{name}: words changed\",\n disabled: \"{name} hidden\",\n enabled: \"{name} shown\",\n preset: \"Style changed to {to} (was {from})\",\n density: \"Spacing changed to {to} (was {from})\",\n },\n};\n","\"use client\";\n\n// The settings of a section, as a form generated from the zod schema of its type (ADR-007 §5): the form is `@krizaka/ui/form`\n// (TanStack Form behind the facade), the fields are the ones the schema describes (`fields.ts`). Every valid change is committed to\n// the document at once (so undo and the preview follow); an invalid value is said next to its field, stays in the field, and is\n// reported to the composer, which refuses to publish until it is fixed.\nimport { createKrizakaForm, FormField, Switch, TextArea, TextField, useFormContext } from \"@krizaka/ui/form\";\nimport { RadioGroup } from \"@krizaka/ui/radio-group\";\nimport * as React from \"react\";\n\nimport { type SectionDefinition, sectionDefinition } from \"../shop/catalogue\";\nimport type { Section } from \"../shop/schema\";\nimport { describeSettings, type FieldSpec } from \"./fields\";\nimport type { ShopComposerMessages } from \"./messages\";\n\ntype Factory = ReturnType<typeof createKrizakaForm>;\n// One form per section type, defined once (schema + defaults), as the facade asks.\nconst factories = new Map<string, Factory>();\nfunction factoryFor(def: SectionDefinition): Factory {\n let f = factories.get(def.type);\n if (!f) {\n f = createKrizakaForm({ schema: def.settings as never, defaultValues: def.settingsDefault as never }) as unknown as Factory;\n factories.set(def.type, f);\n }\n return f;\n}\n\nconst nameOf = (m: ShopComposerMessages, key: string) => m.settingNames[key] ?? key;\nconst optionName = (m: ShopComposerMessages, o: string | number) => m.optionNames[String(o)] ?? String(o);\n\nfunction Choice({ spec, m }: { spec: Extract<FieldSpec, { kind: \"choice\" }>; m: ShopComposerMessages }) {\n return (\n <FormField name={spec.name}>\n {(f) => (\n <div className=\"grid gap-1.5\">\n <span aria-hidden className=\"text-xs font-semibold text-fg-secondary\">{nameOf(m, spec.name)}</span>\n <RadioGroup.Root label={nameOf(m, spec.name)} variant=\"segmented\" value={String(f.value)} onValueChange={(v) => f.setValue(spec.options.find((o) => String(o) === v))} onBlur={f.onBlur}>\n {spec.options.map((o) => (\n <RadioGroup.Segment key={String(o)} value={String(o)}>{optionName(m, o)}</RadioGroup.Segment>\n ))}\n </RadioGroup.Root>\n </div>\n )}\n </FormField>\n );\n}\n\nfunction Multi({ spec, m }: { spec: Extract<FieldSpec, { kind: \"multi\" }>; m: ShopComposerMessages }) {\n return (\n <FormField name={spec.name}>\n {(f) => {\n const value = (f.value as string[] | undefined) ?? [];\n return (\n <fieldset className=\"m-0 flex flex-col gap-1.5 border-0 p-0\">\n <legend className=\"mb-1 text-xs font-semibold text-fg-secondary\">{nameOf(m, spec.name)}</legend>\n {spec.options.map((o) => (\n <label key={o} className=\"flex min-h-9 items-center gap-2 text-sm text-fg\">\n <input\n type=\"checkbox\"\n className=\"h-4 w-4 accent-accent\"\n checked={value.includes(o)}\n onChange={(e) => f.setValue(e.target.checked ? [...value, o] : value.filter((x) => x !== o))}\n />\n {optionName(m, o)}\n </label>\n ))}\n </fieldset>\n );\n }}\n </FormField>\n );\n}\n\nfunction Field({ spec, m }: { spec: FieldSpec; m: ShopComposerMessages }) {\n switch (spec.kind) {\n case \"choice\":\n return <Choice spec={spec} m={m} />;\n case \"multi\":\n return <Multi spec={spec} m={m} />;\n case \"toggle\":\n return <Switch name={spec.name} label={nameOf(m, spec.name)} />;\n case \"text\":\n return <TextField name={spec.name} label={nameOf(m, spec.name)} />;\n case \"localized\":\n return (\n <div className=\"flex flex-col gap-2\">\n <TextArea name={`${spec.name}.fr`} label={`${nameOf(m, spec.name)} — ${m.french}`} rows={3} maxLength={600} />\n <TextArea name={`${spec.name}.en`} label={`${nameOf(m, spec.name)} — ${m.english}`} rows={3} maxLength={600} />\n </div>\n );\n }\n}\n\n/** What the schema is asked: an emptied text is an absent setting (an optional id), an emptied language an absent language. */\nfunction normalise(values: unknown): unknown {\n if (Array.isArray(values)) return values;\n if (typeof values !== \"object\" || values === null) return values;\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(values)) {\n if (v === \"\") continue;\n const inner = typeof v === \"object\" && v !== null && !Array.isArray(v) ? normalise(v) : v;\n out[k] = inner;\n }\n return out;\n}\n\n/** Reports the form's values: a valid set goes to `onValid`, an invalid one to `onInvalid` (and never reaches the document). */\nfunction Commit({ def, onValid, onInvalid }: { def: SectionDefinition; onValid: (settings: Record<string, unknown>) => void; onInvalid: (invalid: boolean) => void }) {\n const { api } = useFormContext();\n const latest = React.useRef({ onValid, onInvalid });\n React.useEffect(() => {\n latest.current = { onValid, onInvalid };\n });\n React.useEffect(() => {\n const sub = (api.store as { subscribe: (cb: () => void) => unknown }).subscribe(() => {\n const result = def.settings.safeParse(normalise(api.state.values));\n latest.current.onInvalid(!result.success);\n if (result.success) latest.current.onValid(result.data as Record<string, unknown>);\n });\n return () => {\n const s = sub as { unsubscribe?: () => void } | (() => void);\n if (typeof s === \"function\") s();\n else s?.unsubscribe?.();\n };\n }, [api, def]);\n return null;\n}\n\nexport type SettingsFormProps = {\n section: Section;\n messages: ShopComposerMessages;\n /** A valid set of settings: the composer commits it. */\n onValid: (settings: Record<string, unknown>) => void;\n /** Whether the form holds a value the schema refuses (publish waits). */\n onInvalid: (invalid: boolean) => void;\n};\n\n/** The form of a section's settings: remount it (a `key`) when the document is changed from outside (undo, redo). */\nexport function SettingsForm({ section, messages: m, onValid, onInvalid }: SettingsFormProps) {\n const def = sectionDefinition(section.type);\n const factory = factoryFor(def);\n const form = factory.useForm({ defaultValues: section.settings as never }) as unknown as { Form: (p: { \"aria-label\": string; className?: string; children: React.ReactNode }) => React.ReactElement };\n const specs = describeSettings(def.settings);\n if (specs.length === 0) return null;\n return (\n <form.Form aria-label={m.settings} className=\"flex flex-col gap-4\">\n {specs.map((spec) => (\n <Field key={spec.name} spec={spec} m={m} />\n ))}\n <Commit def={def} onValid={onValid} onInvalid={onInvalid} />\n </form.Form>\n );\n}\n","// The settings form of a section is generated from the zod schema of its type (ADR-007 §5): one field per setting, of the kind\n// the schema says — a choice (an enum, or a few numbers), a switch (a boolean), a text (an id or a line), the owner's words in each\n// language, a set of options. The form is the one of `@krizaka/ui/form`; this reads the schema, never a copy of it.\nimport type * as z from \"zod/mini\";\n\nexport type FieldSpec =\n | { name: string; kind: \"choice\"; options: readonly (string | number)[]; optional: boolean }\n | { name: string; kind: \"toggle\"; optional: boolean }\n | { name: string; kind: \"text\"; optional: boolean }\n | { name: string; kind: \"localized\"; optional: boolean }\n | { name: string; kind: \"multi\"; options: readonly string[]; optional: boolean };\n\n// The zod 4 definition shape, read structurally: `_zod.def` is what the schema is made of.\ntype Def = { type: string; shape?: Record<string, z.ZodMiniType>; entries?: Record<string, string>; options?: z.ZodMiniType[]; values?: unknown[]; innerType?: z.ZodMiniType; element?: z.ZodMiniType };\nconst defOf = (s: z.ZodMiniType) => (s as unknown as { _zod: { def: Def } })._zod.def;\n\nfunction specOf(name: string, schema: z.ZodMiniType, optional = false): FieldSpec | undefined {\n const def = defOf(schema);\n switch (def.type) {\n case \"optional\":\n return specOf(name, def.innerType!, true);\n case \"enum\":\n return { name, kind: \"choice\", options: Object.values(def.entries!), optional };\n case \"boolean\":\n return { name, kind: \"toggle\", optional };\n case \"string\":\n return { name, kind: \"text\", optional };\n case \"union\": {\n const options = def.options!.flatMap((o) => (defOf(o).type === \"literal\" ? (defOf(o).values as (string | number)[]) : []));\n return options.length === def.options!.length ? { name, kind: \"choice\", options, optional } : undefined;\n }\n case \"object\": {\n const keys = Object.keys(def.shape!);\n return keys.every((k) => k === \"fr\" || k === \"en\") ? { name, kind: \"localized\", optional } : undefined;\n }\n case \"array\": {\n const inner = specOf(name, def.element!);\n return inner && \"options\" in inner ? { name, kind: \"multi\", options: inner.options.map(String), optional } : undefined;\n }\n default:\n return undefined;\n }\n}\n\n/** The fields of a settings schema, in the schema's order. A setting of a kind the form does not draw is left out. */\nexport function describeSettings(schema: z.ZodMiniObject): FieldSpec[] {\n const shape = defOf(schema).shape ?? {};\n return Object.entries(shape).flatMap(([name, s]) => {\n const spec = specOf(name, s);\n return spec ? [spec] : [];\n });\n}\n","// Server-safe: no hook, no context. `buttonVariants` styles a <Link> or a Server Component without the component.\nimport { Slot } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { LoaderGlyph } from \"../spinner/glyph\";\nimport { buttonRecipe } from \"./recipe\";\n\nexport const buttonVariants = tv(buttonRecipe);\n\nexport type ButtonVariants = VariantProps<typeof buttonVariants>;\n\nexport type ButtonProps = React.ComponentProps<\"button\"> &\n ButtonVariants & {\n /**\n * The look: `primary` (the accent), `gradient` (accent → accent-2), `secondary` (a raised surface), `outline`,\n * `ghost`, `danger`.\n * @default \"secondary\"\n */\n variant?: ButtonVariants[\"variant\"];\n /**\n * sm · md · lg, or `icon` (a square).\n * @default \"md\"\n */\n size?: ButtonVariants[\"size\"];\n /**\n * `rounded` (an 8 px radius, the radius of a field) · `pill`. `cut` is deprecated (krizaka-ui#393: the chamfer is\n * retired) — it draws `rounded` and warns in development; it will be removed in 4.0.\n * @default \"rounded\"\n */\n shape?: ButtonVariants[\"shape\"];\n /** Renders the child (e.g. a <Link>) instead of the <button>, with props, classes and ref merged. */\n asChild?: boolean;\n /**\n * Disables and signals the wait (aria-busy, data-loading) and shows the Krizaka loader glyph before the label; the\n * button keeps its colour.\n */\n loading?: boolean;\n /**\n * Between 0 and 1, while `loading`: the glyph's trace and a light fill across the button grow to the value (an\n * upload, an export).\n */\n progress?: number | null;\n /**\n * How the action ended: `success` draws a check, `error` a cross (and the button shakes its head once); a ring of\n * the status colour opens around it. Clear it to return to rest.\n */\n status?: \"success\" | \"error\" | null;\n /** A message announced politely by assistive technology when it changes (“Saved”, “Upload failed”) — passed translated. */\n announce?: string;\n /**\n * Shows the glyph while `loading` / with a `status`. `false`: you draw your own.\n * @default true\n */\n indicator?: boolean;\n /** @deprecated Since 3.31 (krizaka-ui#393): does nothing — the hover is quiet. Removed in 4.0. */\n shimmer?: boolean;\n /** @deprecated Since 3.31 (krizaka-ui#393): does nothing — a button never moves under the pointer. Removed in 4.0. */\n magnetic?: boolean;\n };\n\nconst STATUS_TEXT = { success: \"text-fg-success\", error: \"text-fg-danger\" } as const;\n\nlet warnedCut = false;\n/** `shape=\"cut\"` (the chamfer) is retired: one warning per page in development, never in production. */\nfunction warnCut() {\n if (warnedCut || typeof process === \"undefined\" || process.env.NODE_ENV === \"production\") return;\n warnedCut = true;\n console.warn('@krizaka/ui/button: shape=\"cut\" is deprecated (krizaka-ui#393) and now draws the default rounded shape. Remove the prop.');\n}\n\nexport function Button({\n asChild,\n loading,\n progress,\n status,\n announce,\n indicator = true,\n shimmer: _shimmer,\n magnetic: _magnetic,\n variant,\n size,\n shape,\n className,\n disabled,\n children,\n ...props\n}: ButtonProps) {\n const Comp = asChild ? Slot.Root : \"button\";\n if (shape === \"cut\") warnCut();\n const known = loading && typeof progress === \"number\" && Number.isFinite(progress);\n const ratio = known ? Math.min(1, Math.max(0, progress)) : 0;\n const glyph = indicator && !asChild && (loading || status) ? (status ?? \"loading\") : null;\n // On a filled variant the glyph stays in the label's colour; on the others it takes the status colour.\n const filled = variant === \"primary\" || variant === \"gradient\";\n const button = (\n <Comp\n type={asChild ? undefined : \"button\"}\n aria-busy={loading || undefined}\n data-loading={loading ? \"\" : undefined}\n data-variant={variant ?? \"secondary\"}\n data-kz-status={status ?? undefined}\n disabled={asChild ? undefined : disabled || loading}\n aria-disabled={asChild && (disabled || loading) ? true : undefined}\n className={buttonVariants({\n variant,\n size,\n shape,\n className: cn(known && \"relative isolate overflow-hidden\", className),\n })}\n {...props}\n >\n {asChild ? (\n children\n ) : (\n <>\n {known && (\n <span aria-hidden className=\"absolute inset-y-0 left-0 -z-10 bg-current opacity-15 transition-[width] duration-500\" style={{ width: `${ratio * 100}%` }} />\n )}\n {glyph && (\n <span\n aria-hidden\n data-slot=\"indicator\"\n className=\"-my-1 grid grid-cols-[1fr] transition-[grid-template-columns,margin,opacity] duration-300 starting:-mr-2 starting:grid-cols-[0fr] starting:opacity-0\"\n >\n <span className=\"overflow-hidden\">\n <LoaderGlyph state={glyph} value={known ? ratio : null} className={cn(\"h-4 w-4\", glyph !== \"loading\" && !filled && STATUS_TEXT[glyph])} />\n </span>\n </span>\n )}\n {children}\n </>\n )}\n </Comp>\n );\n if (announce === undefined || asChild) return button;\n return (\n <>\n {button}\n <span role=\"status\" className=\"sr-only\">\n {announce}\n </span>\n </>\n );\n}\n\nexport type IconButtonProps = Omit<ButtonProps, \"size\"> & {\n /** The accessible name (and tooltip) of the button — required, passed translated. */\n label: string;\n /**\n * sm · md · lg, or `icon` (a square).\n * @default \"icon\"\n */\n size?: ButtonProps[\"size\"];\n};\n\n/** An icon-only button: `label` is required, it is its accessible name. Loading or with a status, the glyph takes the icon's place. */\nexport function IconButton({ label, size = \"icon\", children, ...props }: IconButtonProps) {\n const swap = props.indicator !== false && !props.asChild && (props.loading || props.status);\n return (\n <Button aria-label={label} title={label} size={size} {...props}>\n {swap ? null : children}\n </Button>\n );\n}\n","// The Krizaka loader glyph, server-safe: a hexagon (the marks' shape) traced by a segment of light around a node that\n// breathes; determinate, it fills to its value; done, the trace closes and a check (or a cross) draws itself. Animated by\n// motion.css (`kz-loader-*`); still under prefers-reduced-motion — a segment at rest and the node lit, never blank.\nimport type * as React from \"react\";\n\n/** The hexagon, pointy top, radius 9 around (12, 12). */\nconst HEX = \"M12 3 19.79 7.5 19.79 16.5 12 21 4.21 16.5 4.21 7.5Z\";\n\n/** What the glyph shows: a wait (with an optional value), or how it ended. */\nexport type LoaderGlyphState = \"loading\" | \"success\" | \"error\";\n\nexport interface LoaderGlyphProps extends Omit<React.ComponentProps<\"svg\">, \"children\"> {\n /** loading · success · error. */\n state?: LoaderGlyphState;\n /** Between 0 and 1: a determinate wait, the trace grows to it. Absent: indeterminate. */\n value?: number | null;\n}\n\n/** The glyph alone (decorative): the Spinner, the Loader and the Button's `loading` draw it. */\nexport function LoaderGlyph({ state = \"loading\", value, ...props }: LoaderGlyphProps) {\n const known = typeof value === \"number\" && Number.isFinite(value);\n const fill = state !== \"loading\" ? 100 : known ? Math.round(Math.min(1, Math.max(0, value)) * 100) : null;\n return (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden data-state={state} data-progress={fill === null ? undefined : fill} {...props}>\n <path d={HEX} stroke=\"currentColor\" strokeOpacity=\"0.22\" strokeWidth=\"2.2\" strokeLinejoin=\"round\" />\n <path\n d={HEX}\n pathLength={100}\n stroke=\"currentColor\"\n strokeWidth=\"2.2\"\n strokeLinejoin=\"round\"\n strokeLinecap=\"round\"\n className=\"kz-loader-trace\"\n strokeDasharray={fill === null ? undefined : `${fill} ${100 - fill}`}\n />\n {state === \"loading\" && <circle cx=\"12\" cy=\"12\" r=\"2.6\" fill=\"currentColor\" className=\"kz-loader-node\" />}\n {state === \"success\" && <path d=\"M8.3 12.3l2.6 2.6 4.9-5.3\" pathLength={20} stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" className=\"kz-loader-mark\" />}\n {state === \"error\" && <path d=\"M9.4 9.4l5.2 5.2M14.6 9.4l-5.2 5.2\" pathLength={20} stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" className=\"kz-loader-mark\" />}\n </svg>\n );\n}\n","import type { TV } from \"tailwind-variants\";\n\n/** What a recipe is made of: the `tv()` options — `base`, `slots`, `variants`, `defaultVariants`, `compoundVariants`. */\nexport type RecipeConfig = Parameters<TV>[0];\n\n/**\n * A recipe is data: the variants of a component (a `variant`, a `size`, a `tone`…) as classes of the Krizaka tokens.\n * `defineRecipe` only keeps the literal types, so `tv(recipe)` is typed exactly as `tv({ … })` would be (the web side) and\n * `nativeRecipe(recipe)` reads the same classes into styles on the theme's roles (the native side, `./native`).\n *\n * Sizes are a variant dimension (`size: { sm: \"h-8 px-3 text-xs\" }`); states are the prefixes (`hover:`, `disabled:`,\n * `data-[state=on]:`). Write colours as roles (`bg-accent`, `text-fg-secondary`, `border-border-default`, `ring-accent/40`),\n * spacing as Tailwind units (`h-10`, `px-4`), type as `text-sm` / `text-[11px]` / `font-semibold`.\n */\nexport function defineRecipe<const C extends RecipeConfig>(config: C): C {\n return config;\n}\n","// The button's variants, written once as classes of the Krizaka tokens: the web wears them with `tv(buttonRecipe)`\n// (button.tsx), React Native reads the same classes into styles (native/button.tsx, `nativeRecipe`).\nimport { defineRecipe } from \"../recipes/define\";\n\nexport const buttonRecipe = defineRecipe({\n base:\n \"inline-flex max-w-full shrink-0 select-none items-center justify-center gap-2 whitespace-normal text-center font-semibold transition duration-150 \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-0 \" +\n \"disabled:pointer-events-none disabled:opacity-40 data-loading:cursor-progress active:scale-[0.98] \" +\n // Busy is not unavailable: a loading button keeps its colour (it is disabled only so it is not pressed twice).\n \"[&[data-loading]]:opacity-100\",\n variants: {\n variant: {\n primary: \"bg-accent text-on-accent shadow-sm hover:bg-accent-hover\",\n // The brand's signature: accent → accent-2 (on-accent reads on both stops, tested in @krizaka/tokens).\n gradient: \"bg-linear-to-r from-accent to-accent-2 text-on-accent shadow-sm hover:brightness-110\",\n secondary: \"border border-border-default bg-surface-2 text-fg hover:border-border-strong hover:bg-surface-3\",\n outline: \"border border-border-default bg-transparent text-fg hover:border-accent hover:text-fg-accent\",\n ghost: \"text-fg-secondary hover:bg-surface-2 hover:text-fg\",\n // The border and the tint carry the danger; the label stays the primary text role, legible on the tint at rest\n // and hovered over every surface (`text-fg-danger` is for text set directly on a surface).\n danger: \"border border-danger/50 bg-danger/10 text-fg hover:border-danger hover:bg-danger/20\",\n },\n size: { sm: \"h-8 px-3 text-xs\", md: \"h-10 px-4 text-sm\", lg: \"h-12 px-6 text-sm\", icon: \"h-10 w-10\" },\n // One clean shape (krizaka-ui#393): an 8 px radius (`--kz-radius-sm`, the radius of a field — a button beside an\n // input lines up with it), the pill on demand. `cut` (the retired chamfer) is a deprecated alias of `rounded`.\n shape: { rounded: \"rounded-sm\", pill: \"rounded-full\", cut: \"rounded-sm\" },\n },\n defaultVariants: { variant: \"secondary\", size: \"md\", shape: \"rounded\" },\n});\n","// 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","// The links of the page blocks (PageHero's back link, LinkCard, ArgumentCard, ActionBar): an internal path renders\n// through the app's router link (`linkAs`, e.g. Next's `Link`), anything else is an `<a>` that opens in a new tab.\n// Shared by the block entries; never exported on its own.\nimport type * as React from \"react\";\n\n/** The app's link component (Next's `Link`, React Router's `Link`…): receives `href`, `className` and the children. */\nexport type LinkComponent = React.ElementType<{ href: string; className?: string; children?: React.ReactNode; \"aria-label\"?: string; \"aria-describedby\"?: string }>;\n\n/** An address that leaves the app: an absolute URL or a protocol (`mailto:`). */\nexport const isExternal = (href: string) => /^[a-z][a-z0-9+.-]*:/i.test(href);\n\nexport function BlockLink({\n href,\n linkAs: Link = \"a\",\n external = isExternal(href),\n rel,\n ...props\n}: Omit<React.ComponentProps<\"a\">, \"href\"> & { href: string; linkAs?: LinkComponent; external?: boolean }) {\n if (external) return <a href={href} target=\"_blank\" rel={rel ?? \"noopener noreferrer\"} {...props} />;\n const Comp = Link as React.ElementType;\n return <Comp href={href} rel={rel} {...props} />;\n}\n","// Server-safe. The frame of every page (blocks.css): one width, one pair of gutters, one vertical rhythm — so the\n// navigation, the hero and every section line up on the same edges, at any width.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { SectionBackdrop, type SectionBackdropProps } from \"../section-backdrop/section-backdrop\";\n\nexport type PageSize = \"narrow\" | \"default\" | \"wide\" | \"full\";\n\n/**\n * The paper under a page or a section (Cahier, ADR-004): `ruled` (Seyès squares), `lines` (lines only), `dot-grid` (a dot\n * every 24 px), `kraft` (brown paper with a grain: mount `PaperGrain` once), or plain.\n */\nexport type PagePaper = \"ruled\" | \"lines\" | \"dot-grid\" | \"kraft\";\n\ntype PaperProps = {\n /** The notebook's paper under the content: `ruled` (Seyès: 32 px squares, three fine lines), `lines` (lines only, a page to read), `dot-grid` (dots), `kraft` (brown, grained). */\n paper?: PagePaper;\n /** The red margin line on the left, where section numbers and notes hang (`§ 2`, `fig. 1`). */\n margin?: boolean;\n};\n\nexport type PageProps = React.HTMLAttributes<HTMLElement> & {\n /**\n * The width of the content: `default` (72rem, `--kz-page-max`), `narrow` (48rem, a reading column), `wide`\n * (88rem, documentation with a sidebar), `full` (the gutters only).\n * @default \"default\"\n */\n size?: PageSize;\n /** The element: `div` (default), `main`, `header`, `footer`, `section` or `article`. */\n as?: \"div\" | \"main\" | \"header\" | \"footer\" | \"section\" | \"article\";\n} & PaperProps;\n\n/** The page frame: centred, at most `--kz-page-max` wide, with the gutters of `--kz-page-gutter` (16 → 32 px). */\nexport function Page({ size = \"default\", as: Tag = \"div\", paper, margin, className, ...props }: PageProps) {\n return (\n <Tag\n data-size={size === \"default\" ? undefined : size}\n data-paper={paper}\n data-margin={margin ? \"\" : undefined}\n className={cn(\"kz-frame\", className)}\n {...props}\n />\n );\n}\n\nexport type SectionHeadingProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> & {\n /** The id of the title: the section's anchor and its accessible name. */\n id?: string;\n /** A short note above the title (the section's subject), in the note face, lower case — never an uppercase overline. */\n eyebrow?: React.ReactNode;\n /** The section's number, hung in the margin as a notebook numbers its pages (`§ 2`). */\n number?: React.ReactNode;\n /** The title. */\n title: React.ReactNode;\n /** One or two sentences under the title. */\n lead?: React.ReactNode;\n /** Actions on the right of the heading (a link to everything, a filter). */\n actions?: React.ReactNode;\n /**\n * The level of the title.\n * @default 2\n */\n level?: 2 | 3;\n /**\n * `md` for a section that argues, `sm` for a section of a reading page.\n * @default \"md\"\n */\n size?: \"sm\" | \"md\";\n /**\n * `center` for a heading that stands alone above a grid.\n * @default \"start\"\n */\n align?: \"start\" | \"center\";\n /** Rises into place once, as it enters the viewport (`[data-reveal]`, MotionObserver). Never on the first screen. */\n reveal?: boolean;\n};\n\n/** The head of a section: eyebrow (mono, the accent), title, lead — and its actions on the right. */\nexport function SectionHeading({ id, eyebrow, number, title, lead, actions, level = 2, size = \"md\", align = \"start\", reveal, className, ...props }: SectionHeadingProps) {\n const H = level === 2 ? \"h2\" : \"h3\";\n return (\n <div\n className={cn(\"kz-heading\", className)}\n data-size={size === \"md\" ? undefined : size}\n data-align={align === \"start\" ? undefined : align}\n data-actions={actions ? \"\" : undefined}\n data-reveal={reveal ? \"\" : undefined}\n {...props}\n >\n {number && <span className=\"kz-heading-number\">{number}</span>}\n {eyebrow && <p className=\"kz-eyebrow\">{eyebrow}</p>}\n <H id={id} className=\"kz-heading-title\">\n {title}\n </H>\n {lead && <p className=\"kz-heading-lead\">{lead}</p>}\n {actions && <div className=\"kz-heading-actions\">{actions}</div>}\n </div>\n );\n}\n\nexport type SectionProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The id of the title (and the anchor of the section). Required with a `title`. */\n id?: string;\n /** The heading's eyebrow. */\n eyebrow?: React.ReactNode;\n /** The section's number in the margin (`§ 2`). */\n number?: React.ReactNode;\n /** The section's title: an `h2` (a `SectionHeading`), which names the section for assistive technology. */\n title?: React.ReactNode;\n /** The heading's lead. */\n lead?: React.ReactNode;\n /** The heading's actions. */\n actions?: React.ReactNode;\n /**\n * The heading's size: `md` for a page that argues, `sm` for a reading page.\n * @default \"md\"\n */\n headingSize?: \"sm\" | \"md\";\n /**\n * The heading's alignment.\n * @default \"start\"\n */\n headingAlign?: \"start\" | \"center\";\n /** The heading rises into place once (never on the first screen). */\n reveal?: boolean;\n /** A hairline above the section, inside the gutters: the transition between two sections of the same surface. */\n divider?: boolean;\n /**\n * The vertical space above and below: `sm` (a reading page), `md`, `lg` (a page's main moments).\n * @default \"md\"\n */\n spacing?: \"sm\" | \"md\" | \"lg\";\n /**\n * The width of the content.\n * @default \"default\"\n */\n size?: PageSize;\n /** The brand's colour transition behind the section (SectionBackdrop): `true`, or its props (`direction`, `grid`…). */\n backdrop?: boolean | Omit<SectionBackdropProps, \"as\" | \"children\">;\n} & PaperProps;\n\n/**\n * A section of a page: full-bleed (its backdrop reaches the edges), its content in the page frame, its heading on top.\n * Sections follow each other on one rhythm; a `divider` or a `backdrop` marks the transition.\n */\nexport function Section({\n id,\n eyebrow,\n number,\n title,\n lead,\n actions,\n headingSize,\n headingAlign,\n reveal,\n divider,\n spacing = \"md\",\n size,\n backdrop,\n paper,\n margin,\n className,\n children,\n ...props\n}: SectionProps) {\n const body = (\n <Page size={size} data-margin={margin ? \"\" : undefined}>\n {title && <SectionHeading id={id} eyebrow={eyebrow} number={number} title={title} lead={lead} actions={actions} size={headingSize} align={headingAlign} reveal={reveal} />}\n {children}\n </Page>\n );\n const shared = {\n \"aria-labelledby\": title && id ? id : undefined,\n \"data-divider\": divider ? \"\" : undefined,\n \"data-spacing\": spacing === \"md\" ? undefined : spacing,\n \"data-paper\": paper,\n ...props,\n };\n if (backdrop) {\n const backdropProps = backdrop === true ? {} : backdrop;\n return (\n <SectionBackdrop {...backdropProps} {...shared} className={cn(\"kz-section\", className)}>\n {body}\n </SectionBackdrop>\n );\n }\n return (\n <section {...shared} className={cn(\"kz-section\", className)}>\n {body}\n </section>\n );\n}\n\nexport type TicksProps = {\n /** A sentence where words between backticks are code: \"Every request carries a `requestId`.\" */\n children: string;\n};\n\n/** A sentence of a message catalogue where words between backticks read as code — no markup in the translations. */\nexport function Ticks({ children }: TicksProps) {\n const parts = children.split(\"`\");\n return (\n <>\n {parts.map((part, i) =>\n i % 2 ? (\n <code key={i} className=\"kz-ic\">\n {part}\n </code>\n ) : (\n <React.Fragment key={i}>{part}</React.Fragment>\n ),\n )}\n </>\n );\n}\n\nexport interface Fact {\n /** A few words: `npm 2.5.0`, `Maven Central`, `in progress`. */\n label: string;\n /**\n * `ok` — published, usable today; `wip` — in progress, said honestly; `neutral` — a fact.\n * @default \"neutral\"\n */\n tone?: \"ok\" | \"wip\" | \"neutral\";\n /** Where the fact is proven (a registry page): the fact becomes a link. */\n href?: string;\n}\n\nexport type FactsProps = React.HTMLAttributes<HTMLUListElement> & {\n /** The facts, in reading order. */\n items: readonly Fact[];\n};\n\n/** Compact facts on one line — a dot that says the state, a few mono words. Links open in a new tab. */\nexport function Facts({ items, className, ...props }: FactsProps) {\n return (\n <ul className={cn(\"kz-facts\", className)} {...props}>\n {items.map((fact) => {\n const body = (\n <>\n <span className=\"kz-fact-dot\" aria-hidden /> {fact.label}\n </>\n );\n const tone = fact.tone && fact.tone !== \"neutral\" ? fact.tone : undefined;\n return (\n <li key={fact.label}>\n {fact.href ? (\n <a href={fact.href} target=\"_blank\" rel=\"noopener noreferrer\" className=\"kz-fact\" data-tone={tone}>\n {body}\n </a>\n ) : (\n <span className=\"kz-fact\" data-tone={tone}>\n {body}\n </span>\n )}\n </li>\n );\n })}\n </ul>\n );\n}\n","// Server-safe. The frame and the rhythm of a shop page (ADR-007 §2): every section draws inside the page frame between the\n// gutters (`bleed` for a photo only), one vertical rhythm set by the density, a hairline between sections. No section sets\n// its own margin: it only says what it holds.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { Page, SectionHeading } from \"../page/page\";\n\n/** A photo the product resolved: the address, its words, and the widths it has (`srcSet`). */\nexport type ShopPhoto = {\n src: string;\n /** What it shows, in words; empty when it only sets a mood. */\n alt: string;\n /** The widths the product holds (`/a-480.avif 480w, /a-960.avif 960w`); the section brings the `sizes`. */\n srcSet?: string;\n};\n\nexport type ShopFrameProps = React.HTMLAttributes<HTMLDivElement> & {\n /** The look preset (`salon-vitrine`, `@krizaka/tokens`): its tokens apply to everything inside. */\n preset?: string;\n /**\n * The rhythm: `compact` 40 px between sections (24 on a phone), `airy` 64 px (40). The document's, or the preset's.\n * @default \"compact\"\n */\n density?: \"compact\" | \"airy\";\n /**\n * One of the accents the preset lists as tested (`krizaka`, `folioviv:accent-2`…): the owner's choice within the look. Without it, the preset's own.\n * @see @krizaka/tokens `shopPresets`\n */\n accent?: string;\n /**\n * The paper under the page, from the preset: `seyes` (ruled), `kraft` (brown — mount `PaperGrain` once), `washi` (a tint of the accent) or `plain`.\n * @default \"plain\"\n */\n paper?: \"plain\" | \"seyes\" | \"kraft\" | \"washi\";\n /**\n * The look's motion mode, CSS only (`still` · `soft` · `paper` · `lively`): the arrival of blocks and the settling of photos. Under `prefers-reduced-motion` every mode is still.\n * @see @krizaka/tokens `shopPresets`\n */\n motion?: \"still\" | \"soft\" | \"paper\" | \"lively\";\n};\n\nconst PAPERS = { plain: undefined, seyes: \"ruled\", kraft: \"kraft\", washi: \"washi\" } as const;\n\n/** The page: sets the look preset, the accent, the paper and the density the sections below read. */\nexport function ShopFrame({ preset, density = \"compact\", accent, paper = \"plain\", motion, className, ...props }: ShopFrameProps) {\n return <div data-shop-preset={preset} data-shop-accent={accent} data-paper={PAPERS[paper]} data-density={density} data-shop-motion={motion} className={cn(\"kz-shop\", className)} {...props} />;\n}\n\nexport type ShopSectionProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The section's id: the anchor, and the heading's id. */\n id?: string;\n /** The `h2`. Without one the section is named by `aria-label`. */\n title?: React.ReactNode;\n /** A short lower-case note above the title. */\n eyebrow?: React.ReactNode;\n /** One sentence under the title. */\n lead?: React.ReactNode;\n /** A link or a button on the right of the heading (« All times → »). */\n actions?: React.ReactNode;\n /** The content reaches the edges of the screen (a photo, a strip); the heading stays on the frame. */\n bleed?: boolean;\n /** The section is the page's first (the hero): no hairline, no padding. */\n first?: boolean;\n /** A bird of the Krizaka look (`mascotFor`, `ShopMascot` of `@krizaka/ui/shop/look`), decorative, in the corner of the heading. Never on the first screen. */\n mascot?: React.ReactNode;\n};\n\n/** A section of a shop page. */\nexport function ShopSection({ id, title, eyebrow, lead, actions, bleed, first, mascot, className, children, ...props }: ShopSectionProps) {\n const auto = React.useId();\n const headingId = title ? `${id ?? auto}-title` : undefined;\n const heading = title ? <SectionHeading id={headingId} size=\"sm\" eyebrow={eyebrow} title={title} lead={lead} actions={actions} /> : null;\n return (\n <section id={id} aria-labelledby={headingId} data-first={first ? \"\" : undefined} data-bleed={bleed ? \"\" : undefined} className={cn(\"kz-shop-section\", className)} {...props}>\n {mascot ? <div aria-hidden className=\"kz-shop-mascot\">{mascot}</div> : null}\n {bleed ? (\n <>\n {heading && <Page>{heading}</Page>}\n {children}\n </>\n ) : (\n <Page>\n {heading}\n {children}\n </Page>\n )}\n </section>\n );\n}\n","// Server-safe. A photo in a box of one fixed ratio (CLS 0): the box is the ratio, the image fills it (ADR-007 §6).\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport type { ShopPhoto } from \"./frame\";\n\nconst RATIOS = {\n \"1/1\": \"aspect-square\",\n \"4/5\": \"aspect-[4/5]\",\n \"3/4\": \"aspect-[3/4]\",\n \"4/3\": \"aspect-[4/3]\",\n \"3/2\": \"aspect-[3/2]\",\n \"16/9\": \"aspect-video\",\n \"21/9\": \"aspect-[21/9]\",\n} as const;\nexport type ShopRatio = keyof typeof RATIOS;\n\nexport type PhotoProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n photo: ShopPhoto;\n ratio: ShopRatio;\n /** The `sizes` of the image for this variant (ADR-007 §6). */\n sizes?: string;\n /** The first screen's image: high priority, never lazy. */\n priority?: boolean;\n};\n\n/** A photo in a fixed-ratio box; the look preset's grade and radius apply (`data-shop-photo`). */\nexport function Photo({ photo, ratio, sizes, priority, className, ...props }: PhotoProps) {\n return (\n <div data-shop-photo=\"\" data-ratio={ratio} className={cn(\"relative w-full overflow-hidden bg-media\", RATIOS[ratio], className)} {...props}>\n <img\n src={photo.src}\n srcSet={photo.srcSet}\n sizes={photo.srcSet ? sizes : undefined}\n alt={photo.alt}\n loading={priority ? undefined : \"lazy\"}\n fetchPriority={priority ? \"high\" : undefined}\n decoding=\"async\"\n className=\"absolute inset-0 h-full w-full object-cover\"\n />\n </div>\n );\n}\n","// Server-safe (the pinned notes are the wall's, a client island imported through its own entry). The owner's news\n// (ADR-007 §3): `board` — up to three pinned notes, newest first, each taken down after its last day; `banner` — one line of\n// text above the hero (never an image: the first screen's LCP stays the hero's). The clock is the host's: `today` arrives as a\n// day, the section never reads the time.\nimport { PinnedNote } from \"@krizaka/ui/wall\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../cn\";\nimport { ShopSection } from \"../frame\";\nimport { SHOP_LIMITS } from \"../limits\";\n\nexport type BulletinVariant = \"board\" | \"banner\";\n\nexport type ShopFlyer = {\n id: string;\n /** At most 140 characters. */\n text: string;\n signature?: string;\n /** The last day it is shown (`2026-11-03`, inclusive); absent: until the owner takes it down. */\n until?: string;\n};\n\nexport type BulletinSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** @default \"board\" */\n variant?: BulletinVariant;\n /** The flyers, newest first. */\n flyers: readonly ShopFlyer[];\n /** Today, in the shop's time zone (`2026-10-27`). */\n today: string;\n /** `board`: the section's title (`News`). `banner`: its accessible name. */\n title: string;\n};\n\n/** The flyers still up on a given day, newest first, at most three. */\nexport function liveFlyers(flyers: readonly ShopFlyer[], today: string): ShopFlyer[] {\n return flyers.filter((f) => !f.until || f.until >= today).slice(0, SHOP_LIMITS.flyers);\n}\n\n/** The owner's news: pinned notes, or one line above the hero. */\nexport function BulletinSection({ variant = \"board\", flyers, today, title, className, ...props }: BulletinSectionProps) {\n const live = liveFlyers(flyers, today);\n if (live.length === 0) return null;\n if (variant === \"banner\") {\n return (\n <aside aria-label={title} data-variant=\"banner\" className={cn(\"border-b border-border-subtle bg-accent-soft\", className)}>\n <p className=\"m-0 mx-auto max-w-6xl px-4 py-2 text-center text-[13px] font-medium text-fg\">{live[0]!.text}</p>\n </aside>\n );\n }\n return (\n <ShopSection title={title} className={className} data-variant=\"board\" {...props}>\n <ul className=\"m-0 grid list-none gap-4 p-0 sm:grid-cols-2 lg:grid-cols-3\">\n {live.map((f, i) => (\n <li key={f.id}>\n <PinnedNote text={f.text} signature={f.signature} rotation={[-1.2, 1, -0.6][i % 3]} hold={i % 2 === 0 ? \"tape\" : \"pin\"} lines={3} />\n </li>\n ))}\n </ul>\n </ShopSection>\n );\n}\n","// Demo photos of the two fictional shops (ADR-007 §6, ADR-006 §8: demo data only). Generated locally, no face, no text, no\n// logo, in the style of the Krizaka banners; hosted on the CDN under `ui/shop/demo/` (hashed, immutable). Each is used at most\n// once on a page: the salon has ten, the dog walker eight.\nexport const DEMO_PHOTOS = {\n \"pets-ball\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/pets-ball.e03f1ae74d.webp\",\n \"pets-canal\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/pets-canal.4ea735fad7.webp\",\n \"pets-cover\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/pets-cover.9f06b05e7d.webp\",\n \"pets-door\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/pets-door.099a4143b4.webp\",\n \"pets-leash\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/pets-leash.fbdb08ddad.webp\",\n \"pets-leaves\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/pets-leaves.e7ce7dd035.webp\",\n \"pets-snow\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/pets-snow.894afd7929.webp\",\n \"pets-stairs\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/pets-stairs.c218522480.webp\",\n \"salon-basin\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/salon-basin.64dd59cac7.webp\",\n \"salon-brushes\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/salon-brushes.235eebb9a1.webp\",\n \"salon-chair\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/salon-chair.4cdd76afdf.webp\",\n \"salon-colour\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/salon-colour.00c62a6aac.webp\",\n \"salon-cover\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/salon-cover.218332751d.webp\",\n \"salon-mirror\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/salon-mirror.9c2858ccd2.webp\",\n \"salon-shelf\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/salon-shelf.d215d866d2.webp\",\n \"salon-station\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/salon-station.91abe38059.webp\",\n \"salon-tools\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/salon-tools.8ff845df44.webp\",\n \"salon-towels\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/salon-towels.8a49746a6b.webp\",\n} as const;\nexport type DemoPhoto = keyof typeof DEMO_PHOTOS;\n","// Server-safe, data only. Two fictional shops — a salon and a dog walker — resolved the way a product resolves them (ADR-007\n// §6): the services with their OWN photo or none, photos that appear once, the next free times. Used by the examples, the\n// stories, the catalogue tests and the composer's thumbnails. Never a real shop, price or person.\nimport type { ShopPhoto } from \"../frame\";\nimport type { ShopGalleryPhoto } from \"../gallery/gallery\";\nimport type { ShopService } from \"../services/services\";\nimport { DEMO_PHOTOS, type DemoPhoto } from \"./media\";\n\nexport { DEMO_PHOTOS, type DemoPhoto } from \"./media\";\n\n/** A demo photo with its words. */\nexport const demoPhoto = (name: DemoPhoto, alt: string): ShopPhoto => ({ src: DEMO_PHOTOS[name], alt });\n\nexport type DemoShop = {\n id: \"salon\" | \"pets\";\n name: string;\n eyebrow: string;\n promise: string;\n /** The preset the shop wears. */\n preset: string;\n cover: ShopPhoto & { phone?: string };\n services: ShopService[];\n /** The gallery: none of them is a cover or a service's photo. */\n photos: ShopGalleryPhoto[];\n times: { id: string; label: string; href: string }[];\n hours: { id: string; label: string; hours: string }[];\n status: { open: boolean; label: string; detail: string };\n team: { id: string; name: string }[];\n address: string;\n phone: string;\n};\n\nconst week = (hours: string, closed = \"Closed\") =>\n [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"].map((label, i) => ({ id: String(i + 1), label, hours: i === 6 ? closed : hours }));\n\nexport const demoSalon: DemoShop = {\n id: \"salon\",\n name: \"Salon Cèdre & Ciseaux\",\n eyebrow: \"Saint-Henri · Montréal\",\n promise: \"A neighbourhood salon on Notre-Dame West: cuts, colour and beard care, with the person of your choice.\",\n preset: \"salon-vitrine\",\n cover: demoPhoto(\"salon-cover\", \"The salon's window on a winter evening, warm light on the brick street\"),\n services: [\n { id: \"short\", name: \"Short cut\", price: \"$45\", duration: \"30 min\", description: \"Scissor or clipper, razor finish\", category: \"cuts\", href: \"#book-short\" },\n { id: \"blow\", name: \"Cut and blow-dry\", price: \"$75\", duration: \"1 h\", description: \"A tailored cut, a blow-dry that lasts\", category: \"cuts\", popular: true, photo: demoPhoto(\"salon-chair\", \"The leather chair by the window\"), href: \"#book-blow\" },\n { id: \"beard\", name: \"Beard trim\", price: \"$25\", duration: \"20 min\", description: \"Edges and a hot towel\", category: \"beard\", photo: demoPhoto(\"salon-towels\", \"Rolled warm towels on a shelf\"), href: \"#book-beard\" },\n { id: \"colour\", name: \"Full colour\", price: \"$160\", priceFrom: \"from\", duration: \"2 h 30\", description: \"Price confirmed at the consultation\", category: \"colour\", photo: demoPhoto(\"salon-colour\", \"Two copper bowls of colour on marble\"), href: \"#book-colour\" },\n { id: \"balayage\", name: \"Balayage\", price: \"$220\", priceFrom: \"from\", duration: \"3 h\", description: \"Gradual lightening, natural result\", category: \"colour\", photo: demoPhoto(\"salon-shelf\", \"Amber bottles on the window shelf\"), href: \"#book-balayage\" },\n ],\n photos: [\n { id: \"mirror\", photo: demoPhoto(\"salon-mirror\", \"A round mirror with fairy lights on a brick wall\") },\n { id: \"basin\", photo: demoPhoto(\"salon-basin\", \"A basin under a pendant lamp\") },\n { id: \"brushes\", photo: demoPhoto(\"salon-brushes\", \"Brushes and a dryer on a wooden counter\") },\n { id: \"station\", photo: demoPhoto(\"salon-station\", \"A styling station facing the rainy street\") },\n { id: \"tools\", photo: demoPhoto(\"salon-tools\", \"Scissors and a comb under a brass lamp\") },\n ],\n times: [\n { id: \"t1\", label: \"Today 4:30 pm\", href: \"#t1\" },\n { id: \"t2\", label: \"Today 6:00 pm\", href: \"#t2\" },\n { id: \"t3\", label: \"Tue 9:00 am\", href: \"#t3\" },\n { id: \"t4\", label: \"Tue 10:30 am\", href: \"#t4\" },\n ],\n hours: week(\"9 am – 8 pm\"),\n status: { open: true, label: \"Open now\", detail: \"until 8 pm\" },\n team: [{ id: \"e\", name: \"Éric\" }, { id: \"k\", name: \"Karim\" }, { id: \"j\", name: \"Jade\" }, { id: \"c\", name: \"Camille\" }],\n address: \"2400 Notre-Dame St W\",\n phone: \"514-555-0110\",\n};\n\nexport const demoPets: DemoShop = {\n id: \"pets\",\n name: \"Pattes de Saint-Henri\",\n eyebrow: \"Saint-Henri · Montréal\",\n promise: \"Neighbourhood dog walks along the canal, with a photo and a note after each one.\",\n preset: \"pets-canal\",\n cover: demoPhoto(\"pets-cover\", \"A golden dog facing the Lachine canal at sunset\"),\n services: [\n { id: \"walk30\", name: \"Quick walk\", price: \"$22\", duration: \"30 min\", capacity: \"1 dog\", description: \"A loop of the block and a drink of water\", category: \"walks\", href: \"#book-walk30\" },\n { id: \"walk60\", name: \"Canal walk\", price: \"$35\", duration: \"1 h\", capacity: \"Up to 2 dogs\", description: \"The canal path, a photo and a note\", category: \"walks\", popular: true, photo: demoPhoto(\"pets-leash\", \"Leashes hanging by a red-brick doorway\"), href: \"#book-walk60\" },\n { id: \"pack\", name: \"Pack adventure\", price: \"$48\", duration: \"2 h\", capacity: \"Up to 5 dogs\", description: \"The Mont-Royal trails, small friendly group\", category: \"walks\", href: \"#book-pack\" },\n { id: \"visit\", name: \"Home visit\", price: \"$18\", duration: \"20 min\", capacity: \"1 pet\", description: \"Food, water, a cuddle and a report\", category: \"care\", photo: demoPhoto(\"pets-door\", \"A terrier waiting at a red door\"), href: \"#book-visit\" },\n ],\n photos: [\n { id: \"ball\", photo: demoPhoto(\"pets-ball\", \"A dog leaping for a ball in the autumn park\") },\n { id: \"canal\", photo: demoPhoto(\"pets-canal\", \"Two dogs resting on the grass by the canal\") },\n { id: \"leaves\", photo: demoPhoto(\"pets-leaves\", \"A small dog running through fallen leaves\") },\n { id: \"snow\", photo: demoPhoto(\"pets-snow\", \"A dog in a red coat on a snowy street at night\") },\n { id: \"stairs\", photo: demoPhoto(\"pets-stairs\", \"A dog sitting on an outdoor staircase\") },\n ],\n times: [\n { id: \"t1\", label: \"Today 5:00 pm\", href: \"#t1\" },\n { id: \"t2\", label: \"Tomorrow 8:00 am\", href: \"#t2\" },\n { id: \"t3\", label: \"Tomorrow 12:30 pm\", href: \"#t3\" },\n ],\n hours: week(\"7 am – 7 pm\", \"By request\"),\n status: { open: true, label: \"Open now\", detail: \"until 7 pm\" },\n team: [{ id: \"m\", name: \"Maude\" }, { id: \"s\", name: \"Samuel\" }],\n address: \"Saint-Henri, Montréal\",\n phone: \"514-555-0142\",\n};\n\n// The rest of the demo salon's page (U2): what clients say, its news, its questions, its rules, its story, its reels, its map.\nexport const demoReviews = {\n summary: {\n score: 4.7,\n count: 38,\n distribution: [0, 1, 2, 7, 28] as [number, number, number, number, number],\n scoreText: \"4.7 / 5\",\n countText: \"38 verified reviews\",\n summaryText: \"4.7 out of 5 from 38 verified reviews\",\n starText: (stars: number, count: number) => `${stars} stars: ${count} reviews`,\n },\n reviews: [\n { id: \"r1\", author: \"Nadia F.\", date: \"October 2026\", dateTime: \"2026-10\", service: \"Cut and blow-dry\", rating: 5, ratingText: \"5 out of 5\", text: \"The best blow-dry in the neighbourhood, simply. Booked in two taps.\" },\n { id: \"r2\", author: \"Léo P.\", date: \"October 2026\", dateTime: \"2026-10\", service: \"Balayage\", rating: 5, ratingText: \"5 out of 5\", text: \"Jade listened, never pushed. The price was the one announced.\" },\n { id: \"r3\", author: \"Camille L.\", date: \"September 2026\", dateTime: \"2026-09\", service: \"Beard trim\", rating: 4, ratingText: \"4 out of 5\", text: \"Quick, precise, and the hot towel is a treat.\" },\n ],\n};\n\nexport const demoReel = { id: \"reel\", platform: \"tiktok\" as const, url: \"https://www.tiktok.com/@salon.cedre/video/7123456789012345678\", title: \"The salon's latest reel\" };\n\nexport const demoFlyers = [\n { id: \"f1\", text: \"New: hot-towel beard care, every day this week.\", signature: \"Jade\", until: \"2026-11-10\" },\n { id: \"f2\", text: \"Closed Monday November 3 — back Tuesday at 9.\", signature: \"Éric\", until: \"2026-11-03\" },\n { id: \"f3\", text: \"Gift cards at the counter, any amount.\", signature: \"Camille\" },\n];\n\nexport const demoFaq = [\n { id: \"q1\", question: \"Do I need to book?\", answer: \"Booking is the surest way to have the person you want. We also take walk-ins when a chair is free.\" },\n { id: \"q2\", question: \"Can I cancel?\", answer: \"Free up to 24 hours before. After that the first half of the service is kept.\" },\n { id: \"q3\", question: \"Do you do kids' cuts?\", answer: \"Yes, from age 4, with Éric on Saturday mornings.\" },\n];\n\nexport const demoPolicies = [\n { id: \"p1\", term: \"Cancellation\", details: \"Free up to 24 hours before\" },\n { id: \"p2\", term: \"Prices\", details: \"Before taxes; colour is confirmed at the consultation\" },\n { id: \"p3\", term: \"Booking window\", details: \"Up to 60 days ahead\" },\n];\n\nexport const demoStory = {\n quote: \"Cuts that last, and advice that is honest.\",\n body: \"Three friends opened the salon in 2019 on the corner where the old bakery stood. We kept the brick, the big windows and the habit of asking before cutting.\",\n owner: { name: \"Jade\" },\n};\n\nexport const demoMap = { label: \"Where the salon is\", center: [-73.5859, 45.4789] as [number, number], zoom: 15, showLabel: \"Show the map\", places: [{ position: [-73.5859, 45.4789] as [number, number], label: \"Salon Cèdre & Ciseaux\" }] };\n","// 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","// Server-safe (the wall and the grid are client islands imported through their own entries). The photos of a shop\n// (ADR-007 §3): `mosaic` (one 4:5 lead and four squares), `filmstrip` (3:4, a snap strip), `wall` (polaroids, notes and the\n// sign on a textured wall) and `grid` (today's media gallery). A photo appears once: the product's resolver hands each id at\n// most once, and a section that runs out shows fewer tiles — never a repeat.\nimport { MediaGallery } from \"@krizaka/ui/media-gallery\";\nimport { Wall, type WallItem } from \"@krizaka/ui/wall\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../cn\";\nimport type { ShopPhoto } from \"../frame\";\nimport { ShopSection } from \"../frame\";\nimport { SHOP_LIMITS } from \"../limits\";\nimport { Photo } from \"../photo\";\n\nexport type GalleryVariant = \"mosaic\" | \"filmstrip\" | \"wall\" | \"grid\";\n\nexport type ShopGalleryPhoto = {\n id: string;\n photo: ShopPhoto;\n caption?: string;\n /** `grid`: a muted loop over the still. */\n video?: { webm?: string; mp4?: string };\n};\n\nexport type ShopGalleryNote = { id: string; text: string; signature?: string };\n\nexport type GallerySectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** @default \"mosaic\" */\n variant?: GalleryVariant;\n /** The shop's own photos, in order, already unique. */\n photos: readonly ShopGalleryPhoto[];\n title: React.ReactNode;\n lead?: React.ReactNode;\n /** The gallery's accessible name (`Photos of the salon`). */\n label: string;\n /** `wall`: short notes pinned between the photos. */\n notes?: readonly ShopGalleryNote[];\n /** `wall`: the shop's name on its sign. */\n sign?: string;\n /** `wall`: the wall's texture. @default \"plaster\" */\n texture?: \"plaster\" | \"brick\" | \"ridge\" | \"zellige\";\n};\n\n/** A deterministic scatter: the same photos always hang the same way (no random, so no hydration mismatch). */\nexport function wallLayout(count: number): { x: number; y: number; rotation: number }[] {\n const perRow = Math.min(5, Math.max(1, Math.ceil(count / 2)));\n return Array.from({ length: count }, (_, i) => {\n const row = Math.floor(i / perRow);\n const col = i % perRow;\n const inRow = Math.min(perRow, count - row * perRow);\n const x = inRow === 1 ? 50 : (col / (inRow - 1)) * 100;\n const y = row === 0 ? (count <= perRow ? 50 : 8 + (col % 2) * 6) : 92 - (col % 2) * 6;\n return { x, y, rotation: [-2.2, 1.6, -1.2, 2.4, -1.8][(i * 3 + 1) % 5]! };\n });\n}\n\nfunction Mosaic({ photos }: { photos: readonly ShopGalleryPhoto[] }) {\n const [lead, ...rest] = photos;\n if (!lead) return null;\n return (\n <ul className=\"m-0 grid list-none grid-cols-2 gap-2 p-0 sm:grid-cols-[1.6fr_1fr_1fr] sm:gap-3\">\n <li className=\"col-span-2 aspect-[16/11] sm:col-span-1 sm:row-span-2 sm:aspect-auto\">\n <Photo photo={lead.photo} ratio=\"4/5\" sizes=\"(min-width: 40rem) 36rem, 100vw\" className=\"h-full min-h-0 sm:aspect-auto\" />\n </li>\n {rest.slice(0, 4).map((p) => (\n <li key={p.id}>\n <Photo photo={p.photo} ratio=\"1/1\" sizes=\"(min-width: 40rem) 18rem, 50vw\" />\n </li>\n ))}\n </ul>\n );\n}\n\nfunction Filmstrip({ photos, label }: { photos: readonly ShopGalleryPhoto[]; label: string }) {\n return (\n <div role=\"group\" aria-label={label} tabIndex={0} className=\"-mx-4 overflow-x-auto px-4 pb-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring sm:mx-0 sm:px-0\">\n <ul className=\"m-0 flex w-max snap-x snap-mandatory list-none gap-3 p-0\">\n {photos.map((p) => (\n <li key={p.id} className=\"w-[42vw] max-w-64 shrink-0 snap-start sm:w-64\">\n <Photo photo={p.photo} ratio=\"3/4\" sizes=\"(min-width: 40rem) 16rem, 42vw\" />\n </li>\n ))}\n </ul>\n </div>\n );\n}\n\nfunction ShopWall({ photos, notes, sign, texture, label }: { photos: readonly ShopGalleryPhoto[]; notes: readonly ShopGalleryNote[]; sign?: string; texture: NonNullable<GallerySectionProps[\"texture\"]>; label: string }) {\n const pieces = [\n ...(sign ? [{ id: \"sign\", kind: \"sign\" as const, children: sign, variant: \"neon\" as const }] : []),\n ...photos.slice(0, SHOP_LIMITS.photos).map((p) => ({\n id: p.id,\n kind: \"polaroid\" as const,\n img: <img src={p.photo.src} srcSet={p.photo.srcSet} sizes=\"220px\" alt={p.photo.alt} loading=\"lazy\" decoding=\"async\" className=\"absolute inset-0 h-full w-full object-cover\" />,\n caption: p.caption,\n })),\n ...notes.map((n) => ({ id: n.id, kind: \"note\" as const, text: n.text, signature: n.signature })),\n ];\n const layout = wallLayout(pieces.length);\n const items = pieces.map((piece, i) => ({ ...piece, ...layout[i]!, z: i })) as WallItem[];\n return <Wall aria-label={label} items={items} texture={texture} itemWidth={220} max={SHOP_LIMITS.photos + 2} />;\n}\n\n/** The photos of a shop: a mosaic, a filmstrip, a wall or a grid. */\nexport function GallerySection({ variant = \"mosaic\", photos, title, lead, label, notes = [], sign, texture = \"plaster\", className, ...props }: GallerySectionProps) {\n const shown = photos.slice(0, SHOP_LIMITS.photos);\n const bodies: Record<GalleryVariant, () => React.ReactNode> = {\n mosaic: () => <Mosaic photos={shown} />,\n filmstrip: () => <Filmstrip photos={shown} label={label} />,\n wall: () => <ShopWall photos={shown} notes={notes} sign={sign} texture={texture} label={label} />,\n grid: () => (\n <MediaGallery\n label={label}\n items={shown.map((p) => ({ id: p.id, src: p.photo.src, alt: p.photo.alt, caption: p.caption, video: p.video, shape: \"wide\" as const }))}\n />\n ),\n };\n const body = bodies[variant]();\n return (\n <ShopSection title={title} lead={lead} className={cn(className)} data-variant={variant} {...props}>\n {body}\n </ShopSection>\n );\n}\n","// Server-safe (the poster's cover and the TV are client islands imported through their own entries). The first section of\n// a shop page (ADR-007 §3): `poster` (the cover, the name over it), `split` (the title in the frame beside a 4:5 photo),\n// `banner` (a 21:9 photo, the name under it), `tv` (the shop's sign and its latest video in the old TV). The name is the\n// page's `h1` in every variant; the first image is the page's LCP (high priority, a fixed box).\nimport { CoverHero } from \"@krizaka/ui/cover-hero\";\nimport { RetroTv, type RetroTvProps } from \"@krizaka/ui/retro-tv\";\nimport { ShopSign } from \"@krizaka/ui/wall\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../cn\";\nimport { Page } from \"../../page/page\";\nimport type { ShopPhoto } from \"../frame\";\nimport { Photo } from \"../photo\";\n\nexport type HeroVariant = \"poster\" | \"split\" | \"banner\" | \"tv\";\n\nexport type HeroSectionProps = Omit<React.ComponentProps<\"header\">, \"title\"> & {\n /** The drawing. @default \"poster\" */\n variant?: HeroVariant;\n /** The shop's name: the page's `h1`. */\n title: string;\n /** A short mono line above the name (`Saint-Henri · Montréal`). */\n eyebrow?: React.ReactNode;\n /** One line: what the shop promises. */\n lead?: React.ReactNode;\n /** Chips: open now, the area, the score — only what is true now. */\n facts?: React.ReactNode;\n /** The one action (`ButtonLink`, « Book »). */\n actions?: React.ReactNode;\n /** The cover: a photo (16:9), an optional 4:5 crop for a phone, an optional muted loop (`poster`). */\n cover?: ShopPhoto & { phone?: string; video?: { webm?: string; mp4?: string } };\n /** Where the photo is cropped to. @default \"center\" */\n focus?: \"center\" | \"top\" | \"bottom\";\n /** `tv`: the shop's latest video in the cabinet (`src`, `poster`, `label`, or an `EmbedFacade` as `children`). */\n tv?: RetroTvProps;\n};\n\nconst lead = \"m-0 max-w-xl text-base leading-relaxed text-fg-secondary sm:text-lg\";\nconst eyebrowClass = \"m-0 font-mono text-[13px] text-fg-accent\";\n// The weight comes from the preset (`--kz-shop-title-weight`: Young Serif has one, Plus Jakarta Sans 650): `blocks.css`.\nconst titleClass = \"kz-shop-title m-0 font-display text-4xl leading-[1.05] tracking-tight text-fg sm:text-5xl\";\n\nfunction Text({ title, eyebrow, lead: leadText, facts, actions }: Pick<HeroSectionProps, \"title\" | \"eyebrow\" | \"lead\" | \"facts\" | \"actions\">) {\n return (\n <div className=\"flex min-w-0 flex-col items-start gap-3\">\n {eyebrow && <p className={eyebrowClass}>{eyebrow}</p>}\n <h1 className={titleClass}>{title}</h1>\n {leadText && <p className={lead}>{leadText}</p>}\n {facts && <div className=\"flex flex-wrap items-center gap-2\">{facts}</div>}\n {actions && <div className=\"flex flex-wrap items-center gap-3 pt-1\">{actions}</div>}\n </div>\n );\n}\n\n/** The first section of a shop page: poster, split, banner or tv. */\nexport function HeroSection({ variant = \"poster\", title, eyebrow, lead: leadText, facts, actions, cover, focus = \"center\", tv, className, ...props }: HeroSectionProps) {\n if (variant === \"poster\") {\n return (\n <CoverHero\n data-first=\"\"\n data-variant=\"poster\"\n className={cn(\"kz-shop-section min-h-[24rem] sm:min-h-[28rem] lg:min-h-[31rem]\", className)}\n cover={cover && { src: cover.src, alt: cover.alt, video: cover.video, phone: cover.phone, focus }}\n eyebrow={eyebrow}\n title={title}\n lead={leadText}\n facts={facts}\n actions={actions}\n {...props}\n />\n );\n }\n const text = <Text title={title} eyebrow={eyebrow} lead={leadText} facts={facts} actions={actions} />;\n if (variant === \"split\") {\n return (\n <header data-first=\"\" data-variant=\"split\" className={cn(\"kz-shop-section\", className)} {...props}>\n <Page>\n <div className=\"grid items-center gap-6 py-6 md:grid-cols-[minmax(0,1fr)_minmax(0,32rem)] md:gap-12 md:py-8\">\n <div className=\"order-2 md:order-1\">{text}</div>\n {cover && <Photo photo={cover} ratio=\"4/5\" priority sizes=\"(min-width: 48rem) 32rem, 100vw\" className=\"order-1 max-h-[26rem] md:order-2 md:max-h-none\" />}\n </div>\n </Page>\n </header>\n );\n }\n if (variant === \"banner\") {\n return (\n <header data-first=\"\" data-variant=\"banner\" className={cn(\"kz-shop-section\", className)} {...props}>\n {cover && (\n <div className=\"mx-auto w-full max-w-[90rem]\">\n <Photo photo={cover} ratio=\"21/9\" priority sizes=\"100vw\" className=\"rounded-none aspect-[3/2] sm:aspect-[21/9]\" />\n </div>\n )}\n <Page>\n <div className=\"py-6\">{text}</div>\n </Page>\n </header>\n );\n }\n return (\n <header data-first=\"\" data-variant=\"tv\" className={cn(\"kz-shop-section\", className)} {...props}>\n <Page>\n <div className=\"grid items-center gap-6 py-6 md:grid-cols-[minmax(0,1fr)_17rem] md:gap-12 md:py-8\">\n <div className=\"flex min-w-0 flex-col items-start gap-4\">\n <ShopSign as=\"h1\" variant=\"neon\">{title}</ShopSign>\n {leadText && <p className={lead}>{leadText}</p>}\n {facts && <div className=\"flex flex-wrap items-center gap-2\">{facts}</div>}\n {actions && <div className=\"flex flex-wrap items-center gap-3 pt-1\">{actions}</div>}\n </div>\n {tv && <RetroTv {...tv} className={cn(\"mx-auto w-56 md:w-full\", tv.className)} />}\n </div>\n </Page>\n </header>\n );\n}\n","// Server-safe. The rules of the shop, in the open (ADR-007 §3): cancellation, prices, the booking window — a real\n// description list, the owner's own words.\nimport { DescriptionList } from \"@krizaka/ui/description-list\";\nimport * as React from \"react\";\n\nimport { ShopSection, type ShopSectionProps } from \"../frame\";\n\nexport type ShopPolicy = { id: string; term: string; details: React.ReactNode };\n\nexport type PoliciesSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & Pick<ShopSectionProps, \"mascot\"> & {\n /** @default \"inline\" */\n variant?: \"inline\";\n title: React.ReactNode;\n items: readonly ShopPolicy[];\n};\n\n/** Cancellation, prices and the booking window, as term and value. */\nexport function PoliciesSection({ title, items, className, ...props }: PoliciesSectionProps) {\n if (items.length === 0) return null;\n return (\n <ShopSection title={title} className={className} data-variant=\"inline\" {...props}>\n <DescriptionList layout=\"inline\" className=\"max-w-3xl\" items={items.map((p) => ({ id: p.id, term: p.term, details: p.details }))} />\n </ShopSection>\n );\n}\n","// Server-safe. What clients say (ADR-007 §3): `summary-cards` — the score stamp with its distribution beside two or three\n// reviews; `quote` — one large review; `strip` — the score as one line (a hero's fact). Nothing is drawn under the host's\n// `minCount` of verified reviews: a shop with two reviews shows none (the composer says why).\nimport { ReviewCard, type ReviewCardProps, ReviewSummary, type ReviewSummaryProps } from \"@krizaka/ui/reviews\";\nimport * as React from \"react\";\n\nimport { ShopSection, type ShopSectionProps } from \"../frame\";\n\nexport type ReviewsVariant = \"summary-cards\" | \"quote\" | \"strip\";\n\nexport type ShopReview = Omit<ReviewCardProps, \"className\" | \"style\"> & { id: string };\n\nexport type ReviewsSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & Pick<ShopSectionProps, \"mascot\"> & {\n /** @default \"summary-cards\" */\n variant?: ReviewsVariant;\n title: React.ReactNode;\n /** The score and its distribution, with the words that name them (the stamp's, the count's, the meters'). */\n summary: Omit<ReviewSummaryProps, \"minCount\" | \"className\" | \"style\">;\n /** The reviews the host chose (`best` or `latest`), in order: two or three are drawn. */\n reviews: readonly ShopReview[];\n /** How many reviews are drawn beside the stamp. @default 2 */\n count?: 1 | 2 | 3;\n /** The fewest verified reviews that may be shown at all. @default 5 */\n minCount?: number;\n};\n\n/** The score of the shop and what its clients wrote. */\nexport function ReviewsSection({ variant = \"summary-cards\", title, summary, reviews, count = 2, minCount = 5, className, ...props }: ReviewsSectionProps) {\n if (summary.count < Math.max(1, minCount) || reviews.length === 0) return null;\n const shown = reviews.slice(0, count);\n if (variant === \"strip\") {\n return (\n <ShopSection aria-label={typeof title === \"string\" ? title : summary.summaryText} data-variant=\"strip\" className={className} {...props}>\n <p className=\"m-0 flex flex-wrap items-baseline gap-x-3 gap-y-1 text-sm text-fg-secondary\">\n <span className=\"rounded-sm border-2 border-border-strong px-2 py-0.5 font-mono text-base font-bold text-fg tabular-nums\">{summary.scoreText}</span>\n <span>{summary.countText}</span>\n <span className=\"sr-only\">{summary.summaryText}</span>\n </p>\n </ShopSection>\n );\n }\n if (variant === \"quote\") {\n const r = shown[0]!;\n const { text, author, date, dateTime, service, ratingText } = r;\n return (\n <ShopSection title={title} className={className} data-variant=\"quote\" {...props}>\n <figure className=\"m-0 max-w-3xl\">\n <blockquote className=\"m-0 font-display text-2xl leading-snug text-fg sm:text-3xl\">“{text}”</blockquote>\n <figcaption className=\"mt-3 flex flex-wrap items-baseline gap-x-2 text-sm text-fg-secondary\">\n <span className=\"font-semibold text-fg\">{author}</span>\n <time dateTime={dateTime}>{date}</time>\n {service && <span>· {service}</span>}\n <span className=\"sr-only\">{ratingText}</span>\n </figcaption>\n </figure>\n </ShopSection>\n );\n }\n return (\n <ShopSection title={title} className={className} data-variant=\"summary-cards\" {...props}>\n <div className=\"grid items-start gap-4 lg:grid-cols-[18rem_minmax(0,1fr)] lg:gap-8\">\n <ReviewSummary {...summary} minCount={minCount} />\n <div className=\"grid gap-3 sm:grid-cols-2 lg:grid-cols-[repeat(auto-fit,minmax(14rem,1fr))]\">\n {shown.map(({ id, ...review }) => (\n <ReviewCard key={id} {...review} />\n ))}\n </div>\n </div>\n </ShopSection>\n );\n}\n","// Server-safe: no hook. The services of a shop (ADR-007 §3). `menu` — the compact price board, the default of every preset:\n// one row per service (an optional 56 px square thumbnail of the service's own photo, the name, « Popular », a dotted leader,\n// the price in tabular figures, the duration and one line, a « Choose » button that names the service), grouped by category\n// under a lower-case typewriter note, in one column beside an `aside` (a plain block, never a landmark) or in two. `cards` (4:3, six at most), `index` (the\n// Cahier's stamped cards), `carousel` (a snap strip, phone first). The section receives resolved services; it never fetches.\nimport { Badge } from \"@krizaka/ui/badge\";\nimport { buttonVariants } from \"@krizaka/ui/button\";\nimport { ServiceCard } from \"@krizaka/ui/service-card\";\nimport * as React from \"react\";\n\nimport { BlockLink, type LinkComponent } from \"../../block-link\";\nimport { cn } from \"../../cn\";\nimport type { ShopPhoto } from \"../frame\";\nimport { ShopSection } from \"../frame\";\nimport { SHOP_LIMITS } from \"../limits\";\nimport { Photo } from \"../photo\";\n\nexport type ServicesVariant = \"menu\" | \"cards\" | \"index\" | \"carousel\";\n\n/** A service as the product resolved it: its own photo (or none), its price already formatted. */\nexport type ShopService = {\n id: string;\n name: string;\n /** Formatted by the app (`$45`): the section never formats money. */\n price: string;\n /** The word before a varying price (`from`). */\n priceFrom?: string;\n /** `30 min`. */\n duration?: string;\n /** `Up to 5 dogs`. */\n capacity?: string;\n /** One line: what it is (truncated in the menu). */\n description?: string;\n /** What is included, one short line each (cards and index). */\n included?: readonly string[];\n /** The shop's category (`cuts`): the menu's group. */\n category?: string;\n /** The service's OWN photo. Never a default: without one the menu draws no thumbnail. */\n photo?: ShopPhoto;\n /** Booked most often (a real count): wears « Popular ». */\n popular?: boolean;\n /** The booking page with this service chosen. */\n href?: string;\n};\n\nexport type ServicesSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** @default \"menu\" */\n variant?: ServicesVariant;\n services: readonly ShopService[];\n /** The section's `h2` (`Services`). */\n title: React.ReactNode;\n lead?: React.ReactNode;\n /** `menu`: group by the services' `category`. @default \"category\" */\n groupBy?: \"category\" | \"none\";\n /** `menu` with no `aside`: one or two columns. @default 1 */\n columns?: 1 | 2;\n /** `menu`: the hours, the team and the address, beside the list from `lg` (sticky), below it on a phone. */\n aside?: React.ReactNode;\n /** The button's words (`Choose`); its accessible name is « Choose Short cut ». */\n chooseLabel: string;\n /** « Popular ». */\n popularLabel: string;\n /** The list's accessible name when there is no group (`Services`). */\n listLabel?: string;\n /** The app's link component for the booking addresses. */\n linkAs?: LinkComponent;\n};\n\nconst GROUP_NOTE = \"m-0 font-mono text-[13px] lowercase text-fg-secondary\";\n\nfunction groupsOf(services: readonly ShopService[], by: \"category\" | \"none\") {\n if (by === \"none\") return [{ name: undefined as string | undefined, items: services }];\n const groups: { name: string | undefined; items: ShopService[] }[] = [];\n for (const s of services) {\n const name = s.category;\n const group = groups.find((g) => g.name === name);\n if (group) group.items.push(s);\n else groups.push({ name, items: [s] });\n }\n return groups;\n}\n\nfunction MenuRow({ service, chooseLabel, popularLabel, linkAs }: { service: ShopService; chooseLabel: string; popularLabel: string; linkAs?: LinkComponent }) {\n const facts = [service.duration, service.capacity].filter(Boolean).join(\" · \");\n return (\n <li className=\"flex items-center gap-3 border-b border-border-subtle py-2.5 last:border-b-0\" data-service={service.id}>\n {service.photo && (\n <Photo photo={service.photo} ratio=\"1/1\" sizes=\"56px\" className=\"h-12 w-12 shrink-0 rounded-md sm:h-14 sm:w-14\" />\n )}\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-baseline gap-2\">\n <h3 className=\"m-0 shrink truncate text-[15px] font-semibold leading-tight text-fg\">{service.name}</h3>\n {service.popular && <Badge tone=\"accent\" size=\"sm\" className=\"hidden shrink-0 self-center sm:inline-flex\">{popularLabel}</Badge>}\n <span aria-hidden className=\"min-w-4 flex-1 -translate-y-0.5 border-b border-dotted border-border-control\" />\n <span className=\"shrink-0 whitespace-nowrap text-[15px] font-bold tabular-nums text-fg\">\n {service.priceFrom && <span className=\"mr-1 text-xs font-medium text-fg-secondary\">{service.priceFrom}</span>}\n {service.price}\n </span>\n </div>\n <p className=\"m-0 mt-0.5 truncate text-[13px] leading-snug text-fg-secondary\">\n {service.popular && <Badge tone=\"accent\" size=\"sm\" className=\"mr-1.5 sm:hidden\">{popularLabel}</Badge>}\n <span className=\"font-mono tabular-nums\">{facts}</span>\n {facts && service.description && <span aria-hidden> · </span>}\n {service.description}\n </p>\n </div>\n {service.href && (\n <BlockLink\n href={service.href}\n linkAs={linkAs}\n aria-label={`${chooseLabel} ${service.name}`}\n className={cn(buttonVariants({ variant: \"secondary\", size: \"md\" }), \"min-h-11 shrink-0 no-underline\")}\n >\n {chooseLabel}\n </BlockLink>\n )}\n </li>\n );\n}\n\nfunction Menu({ services, groupBy, columns, aside, chooseLabel, popularLabel, listLabel, linkAs }: Required<Pick<ServicesSectionProps, \"services\" | \"groupBy\" | \"columns\" | \"chooseLabel\" | \"popularLabel\">> & Pick<ServicesSectionProps, \"aside\" | \"listLabel\" | \"linkAs\">) {\n const groups = groupsOf(services, groupBy);\n const uid = React.useId();\n const list = (\n <div className={cn(\"grid gap-x-12\", !aside && columns === 2 && \"lg:grid-cols-2\")}>\n {groups.map((g, i) => (\n <div key={g.name ?? i} className=\"mb-3 min-w-0 last:mb-0\">\n {g.name && <p className={GROUP_NOTE} id={`${uid}-grp-${i}`}>{g.name}</p>}\n <ul aria-label={g.name ? undefined : listLabel} aria-labelledby={g.name ? `${uid}-grp-${i}` : undefined} className=\"m-0 list-none p-0\">\n {g.items.map((s) => (\n <MenuRow key={s.id} service={s} chooseLabel={chooseLabel} popularLabel={popularLabel} linkAs={linkAs} />\n ))}\n </ul>\n </div>\n ))}\n </div>\n );\n if (!aside) return list;\n return (\n <div className=\"grid items-start gap-6 lg:grid-cols-[minmax(0,1fr)_20rem] lg:gap-12\">\n {list}\n <div className=\"kz-shop-aside flex flex-col gap-4\">{aside}</div>\n </div>\n );\n}\n\n/** The services of a shop: the price board by default, or cards, index cards, a carousel. */\nexport function ServicesSection({ variant = \"menu\", services, title, lead, groupBy = \"category\", columns = 1, aside, chooseLabel, popularLabel, listLabel, linkAs, className, ...props }: ServicesSectionProps) {\n const card = (s: ShopService, i: number, extra?: string) => (\n <ServiceCard\n key={s.id}\n name={s.name}\n price={s.price}\n priceFrom={s.priceFrom}\n duration={s.duration}\n capacity={s.capacity}\n description={s.description}\n included={s.included}\n tag={s.popular ? popularLabel : undefined}\n media={s.photo ? <img src={s.photo.src} srcSet={s.photo.srcSet} sizes=\"(min-width: 64rem) 18rem, 90vw\" alt={s.photo.alt} loading=\"lazy\" decoding=\"async\" /> : undefined}\n mediaRatio=\"photo\"\n variant={variant === \"index\" ? \"index\" : \"default\"}\n actionLabel={chooseLabel}\n href={s.href}\n linkAs={linkAs}\n className={extra}\n data-index={i}\n />\n );\n let body: React.ReactNode;\n if (variant === \"menu\") {\n body = <Menu services={services} groupBy={groupBy} columns={columns} aside={aside} chooseLabel={chooseLabel} popularLabel={popularLabel} listLabel={listLabel} linkAs={linkAs} />;\n } else if (variant === \"carousel\") {\n body = (\n <div role=\"group\" aria-label={listLabel ?? (typeof title === \"string\" ? title : undefined)} tabIndex={0} className=\"-mx-4 flex snap-x snap-mandatory gap-3 overflow-x-auto px-4 pb-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring sm:mx-0 sm:px-0\">\n {services.map((s, i) => card(s, i, \"w-[78vw] max-w-72 shrink-0 snap-start sm:w-72\"))}\n </div>\n );\n } else {\n const shown = variant === \"cards\" ? services.slice(0, SHOP_LIMITS.cards) : services;\n body = <div className=\"grid items-start gap-4 sm:grid-cols-2 lg:grid-cols-3\">{shown.map((s, i) => card(s, i, \"h-auto\"))}</div>;\n }\n return (\n <ShopSection title={title} lead={lead} className={className} data-variant={variant} {...props}>\n {body}\n </ShopSection>\n );\n}\n","// Server-safe (the facade is a client island). The shop's other places (ADR-007 §3): `links` — plain anchors that open in a\n// new tab, `nofollow`, no referrer, nothing loaded from the platform; `facade` — the latest reel behind a button. Third\n// parties load on a click, never before (Law 25).\nimport { EMBED_PLATFORMS,EmbedFacade, type EmbedPlatform } from \"@krizaka/ui/embed-facade\";\nimport * as React from \"react\";\n\nimport { ShopSection } from \"../frame\";\n\nexport type SocialVariant = \"links\" | \"facade\";\n\nexport type ShopLink = { id: string; platform: EmbedPlatform; url: string };\n\nexport type SocialSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** @default \"links\" */\n variant?: SocialVariant;\n title: React.ReactNode;\n links: readonly ShopLink[];\n /** `links`: the name of each place, passed translated (`TikTok`). Default: the platform's own. */\n labels?: Partial<Record<EmbedPlatform, string>>;\n /** `facade`: the button's words per platform, and the reel's name. */\n playLabels?: Record<EmbedPlatform, string>;\n reelTitle?: string;\n poster?: string;\n notice?: React.ReactNode;\n};\n\n/** Where else to find the shop. */\nexport function SocialSection({ variant = \"links\", title, links, labels = {}, playLabels, reelTitle, poster, notice, className, ...props }: SocialSectionProps) {\n if (links.length === 0) return null;\n const first = links[0]!;\n return (\n <ShopSection title={title} className={className} data-variant={variant} {...props}>\n {variant === \"facade\" && playLabels ? (\n <div className=\"w-44 sm:w-52\">\n <EmbedFacade platform={first.platform} url={first.url} title={reelTitle ?? labels[first.platform] ?? EMBED_PLATFORMS[first.platform]} playLabel={playLabels[first.platform]} poster={poster} notice={notice} />\n </div>\n ) : (\n <ul className=\"m-0 flex list-none flex-wrap gap-2 p-0\">\n {links.map((l) => (\n <li key={l.id}>\n <a\n href={l.url}\n target=\"_blank\"\n rel=\"noopener noreferrer nofollow\"\n referrerPolicy=\"no-referrer\"\n className=\"inline-flex min-h-11 items-center rounded-md border border-border-control bg-surface-1 px-4 text-sm font-semibold text-fg no-underline hover:border-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\"\n >\n {labels[l.platform] ?? EMBED_PLATFORMS[l.platform]}\n </a>\n </li>\n ))}\n </ul>\n )}\n </ShopSection>\n );\n}\n","// Server-safe. The owner's words (ADR-007 §3): `quote` — a pull quote and a paragraph; `owner` — the owner's face, a\n// paragraph, and a way to call or write. The words are the owner's, in the visitor's language; nothing is invented.\nimport { Avatar } from \"@krizaka/ui/avatar\";\nimport * as React from \"react\";\n\nimport { ShopSection, type ShopSectionProps } from \"../frame\";\n\nexport type StoryVariant = \"quote\" | \"owner\";\n\nexport type StorySectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & Pick<ShopSectionProps, \"mascot\"> & {\n /** @default \"quote\" */\n variant?: StoryVariant;\n title: React.ReactNode;\n /** `quote`: the pull quote. */\n quote?: string;\n /** The paragraph. */\n body: string;\n /** `owner`: who speaks. */\n owner?: { name: string; photo?: string };\n /** `owner`: call or write (`ButtonLink`s). */\n actions?: React.ReactNode;\n};\n\n/** The owner's story, as a pull quote or a face and a paragraph. */\nexport function StorySection({ variant = \"quote\", title, quote, body, owner, actions, className, ...props }: StorySectionProps) {\n if (!body && !quote) return null;\n return (\n <ShopSection title={title} className={className} data-variant={variant} {...props}>\n {variant === \"owner\" ? (\n <div className=\"flex max-w-3xl items-start gap-4\">\n {owner && <Avatar src={owner.photo} alt=\"\" fallback={owner.name.slice(0, 1)} size=\"xl\" />}\n <div className=\"min-w-0\">\n {owner && <p className=\"m-0 font-semibold text-fg\">{owner.name}</p>}\n <p className=\"m-0 mt-1 text-base leading-relaxed text-fg-secondary\">{body}</p>\n {actions && <div className=\"mt-3 flex flex-wrap gap-2\">{actions}</div>}\n </div>\n </div>\n ) : (\n <div className=\"grid max-w-4xl gap-4 md:grid-cols-[minmax(0,1fr)_minmax(0,1fr)] md:gap-10\">\n {quote && <blockquote className=\"m-0 border-s-2 border-accent ps-4 font-display text-2xl leading-snug text-fg\">{quote}</blockquote>}\n <p className=\"m-0 text-base leading-relaxed text-fg-secondary\">{body}</p>\n </div>\n )}\n </ShopSection>\n );\n}\n","// Server-safe. The people of the shop (ADR-007 §3): `row` — avatars and first names in a line; `cards` — a card each with a\n// role. Faces are the members' own photos, or the default avatar of @krizaka/ui: never a stock face.\nimport { Avatar } from \"@krizaka/ui/avatar\";\nimport * as React from \"react\";\n\nimport { ShopSection } from \"../frame\";\n\nexport type TeamVariant = \"row\" | \"cards\";\n\nexport type ShopMember = {\n id: string;\n /** The first name. */\n name: string;\n /** What they do (`Colourist`): `cards` only. */\n role?: string;\n /** Their own photo. Without one the default avatar is drawn. */\n photo?: string;\n};\n\nexport type TeamSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** @default \"row\" */\n variant?: TeamVariant;\n members: readonly ShopMember[];\n title: React.ReactNode;\n lead?: React.ReactNode;\n};\n\n/** The people of the shop. */\nexport function TeamSection({ variant = \"row\", members, title, lead, className, ...props }: TeamSectionProps) {\n if (members.length === 0) return null;\n const list =\n variant === \"cards\" ? (\n <ul className=\"m-0 grid list-none gap-3 p-0 sm:grid-cols-2 lg:grid-cols-4\">\n {members.map((m) => (\n <li key={m.id} className=\"flex items-center gap-3 rounded-xl border border-border-default bg-surface-1 p-3\">\n <Avatar src={m.photo} fallback={m.name.slice(0, 1)} size=\"lg\" />\n <div className=\"min-w-0\">\n <p className=\"m-0 truncate font-semibold text-fg\">{m.name}</p>\n {m.role && <p className=\"m-0 truncate text-[13px] text-fg-secondary\">{m.role}</p>}\n </div>\n </li>\n ))}\n </ul>\n ) : (\n <ul className=\"m-0 flex list-none flex-wrap gap-x-6 gap-y-3 p-0\">\n {members.map((m) => (\n <li key={m.id} className=\"flex items-center gap-2.5\">\n <Avatar src={m.photo} fallback={m.name.slice(0, 1)} size=\"md\" />\n <span className=\"font-semibold text-fg\">{m.name}</span>\n </li>\n ))}\n </ul>\n );\n return (\n <ShopSection title={title} lead={lead} className={className} data-variant={variant} {...props}>\n {list}\n </ShopSection>\n );\n}\n","// Server-safe (the TV and the facades are client islands imported through their own entries). The shop's videos (ADR-007\n// §3): `tv` — the old television with the shop's latest video (its own clip, or a platform's short behind its facade);\n// `shorts` — another channel's reels, each behind a facade. Nothing is requested from a platform before the click.\nimport { EmbedFacade, type EmbedPlatform } from \"@krizaka/ui/embed-facade\";\nimport { RetroTv, type RetroTvProps } from \"@krizaka/ui/retro-tv\";\nimport * as React from \"react\";\n\nimport { ShopSection } from \"../frame\";\nimport { SHOP_LIMITS } from \"../limits\";\n\nexport type VideoVariant = \"tv\" | \"shorts\";\n\nexport type ShopReel = {\n id: string;\n platform: EmbedPlatform;\n /** The public address of the post (validated by `embedUrl`: anything else draws nothing). */\n url: string;\n /** Its accessible name. */\n title: string;\n /** The host's own copy of the picture. */\n poster?: string;\n};\n\nexport type VideoSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** @default \"tv\" */\n variant?: VideoVariant;\n title: React.ReactNode;\n lead?: React.ReactNode;\n /** The reels, newest first. `tv` plays the first one (unless `clip` is set); `shorts` draws up to six. */\n reels?: readonly ShopReel[];\n /** `tv`: the shop's own clip in the cabinet (`src`, `poster`, `title`). */\n clip?: Pick<RetroTvProps, \"src\" | \"poster\" | \"title\">;\n /** The facade's button, per platform (« Load TikTok and play »), passed translated. */\n playLabels: Record<EmbedPlatform, string>;\n /** The line under a facade's button: what the platform will receive on the click. */\n notice?: React.ReactNode;\n /** `tv`: the cabinet. @default \"cabinet\" */\n cabinet?: \"cabinet\" | \"portable\";\n /** `tv`: the channel written on the cabinet (`CH 3 · Saint-Henri`). */\n channel?: string;\n /** `tv`: what sits beside the television (a few pinned notes, a line). */\n aside?: React.ReactNode;\n};\n\n/** The shop's videos: the old TV, or a strip of short reels behind a click. */\nexport function VideoSection({ variant = \"tv\", title, lead, reels = [], clip, playLabels, notice, cabinet = \"cabinet\", channel, aside, className, ...props }: VideoSectionProps) {\n const facade = (r: ShopReel, className?: string) => (\n <EmbedFacade key={r.id} platform={r.platform} url={r.url} title={r.title} playLabel={playLabels[r.platform]} poster={r.poster} notice={notice} className={className} />\n );\n let body: React.ReactNode;\n if (variant === \"shorts\") {\n body = (\n <ul className=\"m-0 flex list-none snap-x snap-mandatory gap-3 overflow-x-auto p-0 pb-2\">\n {reels.slice(0, SHOP_LIMITS.reels).map((r) => (\n <li key={r.id} className=\"w-44 shrink-0 snap-start sm:w-52\">\n {facade(r)}\n </li>\n ))}\n </ul>\n );\n } else {\n const first = reels[0];\n let tv: React.ReactNode = null;\n if (clip) tv = <RetroTv {...clip} variant={cabinet} channel={channel} />;\n else if (first) tv = <RetroTv title={first.title} variant={cabinet} channel={channel}>{facade(first)}</RetroTv>;\n body = (\n <div className=\"grid items-center gap-6 md:grid-cols-[minmax(0,1fr)_17rem] md:gap-12\">\n <div className=\"order-2 md:order-1\">{aside}</div>\n <div className=\"order-1 mx-auto w-56 md:order-2 md:w-full\">{tv}</div>\n </div>\n );\n }\n return (\n <ShopSection title={title} lead={lead} className={className} data-variant={variant} {...props}>\n {body}\n </ShopSection>\n );\n}\n","// Server-safe (the map is a client island). How to come and when (ADR-007 §3): `card` — the hours, the address and a call;\n// `map` — the place on a map (on a phone behind a button), the address under it; `split` — the hours beside the map. The\n// hours are the shop's own, the status is its own words: the section draws them, it never reads the clock.\nimport { type OpeningDay, OpeningHours, type OpeningStatus } from \"@krizaka/ui/opening-hours\";\nimport { MapGate, type MapGateProps } from \"@krizaka/ui/shop/map-gate\";\nimport * as React from \"react\";\n\nimport { ShopSection } from \"../frame\";\n\nexport type VisitVariant = \"card\" | \"map\" | \"split\";\n\nexport type VisitSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** @default \"card\" */\n variant?: VisitVariant;\n title: React.ReactNode;\n hours: readonly OpeningDay[];\n /** Today's day id: its row is marked. */\n today?: string;\n status: OpeningStatus;\n /** The name of the hours list (`Hours`). */\n hoursLabel: string;\n address?: string;\n /** `tel:` target and its text; `showPhone: false` of the document leaves both out. */\n phone?: { href: string; label: string };\n /** `map` and `split`: the place. Without it these draw as a `card`. */\n map?: Omit<MapGateProps, \"className\">;\n};\n\n/** Where and when: hours, address, call, and the place on a map. */\nexport function VisitSection({ variant = \"card\", title, hours, today, status, hoursLabel, address, phone, map, className, ...props }: VisitSectionProps) {\n const details = (\n <div className=\"flex flex-col gap-2 text-sm text-fg-secondary\">\n {address && <p className=\"m-0\">{address}</p>}\n {phone && (\n <p className=\"m-0\">\n <a href={phone.href} className=\"font-semibold text-fg-accent underline\">{phone.label}</a>\n </p>\n )}\n </div>\n );\n const opening = <OpeningHours label={hoursLabel} days={hours} today={today} status={status} />;\n const drawn: VisitVariant = map ? variant : \"card\";\n return (\n <ShopSection title={title} className={className} data-variant={drawn} {...props}>\n {drawn === \"card\" && (\n <div className=\"grid max-w-xl gap-3\">\n {opening}\n {details}\n </div>\n )}\n {drawn === \"map\" && (\n <div className=\"grid gap-3\">\n <MapGate {...map!} />\n {details}\n </div>\n )}\n {drawn === \"split\" && (\n <div className=\"grid items-start gap-4 md:grid-cols-[minmax(0,22rem)_minmax(0,1fr)] md:gap-8\">\n <div className=\"grid gap-3\">\n {opening}\n {details}\n </div>\n <MapGate {...map!} />\n </div>\n )}\n </ShopSection>\n );\n}\n","\"use client\";\n\n// The variant picker's thumbnails (ADR-007 §5): the section itself, drawn with demo data at the scale of a card — not a screenshot,\n// so a new variant or a new preset needs no new picture, and each thumbnail wears the page's look (the preset applies around it).\nimport * as React from \"react\";\n\nimport { Button } from \"../button/button\";\nimport { BookingSection } from \"../shop/booking/booking\";\nimport { BulletinSection } from \"../shop/bulletin/bulletin\";\nimport type { SectionType } from \"../shop/catalogue\";\nimport { demoSalon } from \"../shop/demo\";\nimport { FaqSection } from \"../shop/faq/faq\";\nimport { ShopFrame } from \"../shop/frame\";\nimport { GallerySection } from \"../shop/gallery/gallery\";\nimport { HeroSection } from \"../shop/hero/hero\";\nimport { PoliciesSection } from \"../shop/policies/policies\";\nimport { ReviewsSection } from \"../shop/reviews/reviews\";\nimport { ServicesSection } from \"../shop/services/services\";\nimport { SocialSection } from \"../shop/social/social\";\nimport { StorySection } from \"../shop/story/story\";\nimport { TeamSection } from \"../shop/team/team\";\nimport { VideoSection } from \"../shop/video/video\";\nimport { VisitSection } from \"../shop/visit/visit\";\n\nconst shop = demoSalon;\nconst play = { tiktok: \"Play\", \"youtube-shorts\": \"Play\", instagram: \"Play\" } as const;\nconst reel = { id: \"r\", platform: \"tiktok\" as const, url: \"https://www.tiktok.com/@salon/video/7000000000000000000\", title: \"Reel\" };\nconst summary = {\n score: 4.7, count: 38, distribution: [0, 1, 2, 7, 28] as [number, number, number, number, number],\n scoreText: \"4.7 / 5\", countText: \"38 reviews\", summaryText: \"4.7 out of 5, 38 reviews\", starText: (s: number, n: number) => `${s} stars: ${n}`,\n};\nconst review = { id: \"a\", author: \"Nadia F.\", date: \"October 2026\", dateTime: \"2026-10\", service: \"Cut and blow-dry\", rating: 5, ratingText: \"5 out of 5\", text: \"The best blow-dry in the neighbourhood, simply.\" };\n\n/** The section as it looks with demo data, in the variant asked. */\nfunction Demo({ type, variant }: { type: SectionType; variant: string }): React.ReactNode {\n const v = variant as never;\n switch (type) {\n case \"hero\":\n return <HeroSection variant={v} title={shop.name} eyebrow={shop.eyebrow} lead={shop.promise} cover={shop.cover} actions={<Button variant=\"primary\">Book</Button>} tv={{ poster: shop.cover.src, title: \"Latest video\" } as never} />;\n case \"services\":\n return <ServicesSection variant={v} title=\"Services\" services={shop.services} chooseLabel=\"Choose\" popularLabel=\"Popular\" />;\n case \"booking\":\n return variant === \"sticky\" ? <div className=\"flex items-center justify-center border-t border-border-default bg-surface-1 p-4\"><Button variant=\"primary\" size=\"lg\">Book</Button></div> : <BookingSection variant={v} label=\"Next free times\" times={shop.times} href=\"#\" actionLabel=\"Book\" title=\"Ready when you are\" body=\"A few taps.\" />;\n case \"gallery\":\n return <GallerySection variant={v} title=\"Photos\" label=\"Photos\" photos={shop.photos} sign={shop.name} />;\n case \"video\":\n return <VideoSection variant={v} title=\"Latest\" reels={[reel, { ...reel, id: \"r2\" }]} playLabels={play} />;\n case \"reviews\":\n return <ReviewsSection variant={v} title=\"Reviews\" summary={summary} reviews={[review, { ...review, id: \"b\", author: \"Léo P.\" }]} />;\n case \"bulletin\":\n return <BulletinSection variant={v} title=\"News\" today=\"2026-10-27\" flyers={[{ id: \"f\", text: \"Closed on Monday the 3rd: see you on Tuesday!\", signature: \"Jade\" }]} />;\n case \"team\":\n return <TeamSection variant={v} title=\"Team\" members={shop.team.map((t) => ({ id: t.id, name: t.name, role: \"Stylist\" }))} />;\n case \"visit\":\n return <VisitSection variant={v} title=\"Visit\" hours={shop.hours} status={shop.status} hoursLabel=\"Hours\" address={shop.address} phone={{ href: \"tel:5145550110\", label: shop.phone }} map={{ label: \"Map\", center: [-73.58, 45.48], showLabel: \"Show the map\" }} />;\n case \"story\":\n return <StorySection variant={v} title=\"Our story\" quote=\"Cuts that last, advice that is honest.\" body=\"Three friends opened the salon in 2019, on the corner where the old bakery stood.\" owner={{ name: \"Jade\" }} />;\n case \"social\":\n return <SocialSection variant={v} title=\"Follow us\" links={[{ id: \"a\", platform: \"instagram\", url: \"https://instagram.com/salon\" }, { id: \"b\", platform: \"tiktok\", url: \"https://tiktok.com/@salon\" }]} playLabels={play} />;\n case \"faq\":\n return <FaqSection title=\"Questions\" questions={[{ id: \"q\", question: \"Do I need to book?\", answer: \"Yes, pick a time online.\" }, { id: \"q2\", question: \"Can I cancel?\", answer: \"Up to 24 hours before.\" }]} />;\n case \"policies\":\n return <PoliciesSection title=\"Policies\" items={[{ id: \"p\", term: \"Cancellation\", details: \"Free up to 24 h before\" }, { id: \"p2\", term: \"Prices\", details: \"Before taxes\" }]} />;\n }\n}\n\nexport type SectionThumbnailProps = {\n /** The section type. */\n type: SectionType;\n /** Its variant: one of the type's. */\n variant: string;\n /** The look preset the page wears (`salon-vitrine`): the thumbnail wears it too. */\n preset?: string;\n /** The page's spacing. @default \"compact\" */\n density?: \"compact\" | \"airy\";\n};\n\n/** A picture of a section: 160 × 96 px of a 960 px page, inert and hidden from assistive technology. */\nexport function SectionThumbnail({ type, variant, preset, density }: SectionThumbnailProps) {\n return (\n <div aria-hidden inert className=\"kz-shop-thumb\" data-thumb={`${type}.${variant}`}>\n <div className=\"kz-shop-thumb-inner\">\n <ShopFrame preset={preset} density={density ?? \"compact\"}>\n <Demo type={type} variant={variant} />\n </ShopFrame>\n </div>\n </div>\n );\n}\n","// The look of the page (folioviv#478): a radio group of the six looks as swatches (name, the look's own surface and its accent\n// chips), then the accent within the chosen look's tested list. It applies to the draft only; publishing goes through the diff.\nimport { RadioGroup } from \"@krizaka/ui/radio-group\";\n\nimport { cn } from \"../cn\";\nimport type { ShopPage } from \"../shop/schema\";\nimport type { Command } from \"./commands\";\nimport type { ShopComposerPreset } from \"./composer\";\nimport { fill, type ShopComposerMessages } from \"./messages\";\n\nexport type LookPickerProps = {\n looks: readonly ShopComposerPreset[];\n page: ShopPage;\n messages: ShopComposerMessages;\n run: (cmd: Command) => void;\n announce: (message: string) => void;\n};\n\n/** The accent chips of a look, drawn by its own tokens. */\nfunction Chips({ look }: { look: ShopComposerPreset }) {\n return (\n <span aria-hidden className=\"inline-flex gap-1\">\n {(look.accents ?? [look.accent ?? \"krizaka\"]).map((a) => (\n <span key={a} data-shop-preset={look.id} data-shop-accent={a} className=\"kz-look-chip\">\n <i />\n </span>\n ))}\n </span>\n );\n}\n\nexport function LookPicker({ looks, page, messages: m, run, announce }: LookPickerProps) {\n const current = looks.find((l) => l.id === page.preset.id);\n const accents = current?.accents ?? [];\n return (\n <div className=\"grid gap-3\">\n <RadioGroup.Root\n label={m.lookChoice}\n variant=\"cards\"\n value={current?.id ?? \"\"}\n onValueChange={(id) => {\n const look = looks.find((l) => l.id === id);\n if (!look) return;\n run({ type: \"applyLook\", look });\n announce(fill(m.lookApplied, { name: look.name }));\n }}\n className=\"grid-cols-2\"\n >\n {looks.map((l) => (\n <RadioGroup.Card key={l.id} value={l.id}>\n <span data-shop-preset={l.id} className={cn(\"kz-look-swatch\", \"w-full justify-between\")}>\n <span className=\"text-sm font-semibold\">{l.name}</span>\n <Chips look={l} />\n </span>\n </RadioGroup.Card>\n ))}\n </RadioGroup.Root>\n {accents.length > 1 && (\n <RadioGroup.Root label={m.accentChoice} variant=\"buttons\" value={page.accent ?? current?.accent ?? accents[0]} onValueChange={(a) => run({ type: \"setAccent\", accent: a === current?.accent ? undefined : a })}>\n {accents.map((a) => (\n <RadioGroup.Button key={a} value={a}>\n {m.accentNames[a] ?? a}\n </RadioGroup.Button>\n ))}\n </RadioGroup.Root>\n )}\n </div>\n );\n}\n","\"use client\";\n\n// The outline (ADR-007 §5): the sections in order — name, the variant as a mono note, a visibility switch, a menu. Drag is an\n// extra the page does not need: the path is the keyboard — focus a row, `Alt+↑` / `Alt+↓` (or the row's menu: Move up, Move\n// down, Move to top). Every move is announced (« Reviews moved to position 3 of 8 ») and focus stays on the moved row.\nimport { Button } from \"@krizaka/ui/button\";\nimport { DropdownMenu } from \"@krizaka/ui/dropdown-menu\";\nimport { Switch } from \"@krizaka/ui/switch\";\nimport * as React from \"react\";\n\nimport type { Section } from \"../shop/schema\";\nimport type { Command } from \"./commands\";\nimport { fill, type ShopComposerMessages } from \"./messages\";\n\nexport type OutlineProps = {\n sections: readonly Section[];\n selected: string | null;\n onSelect: (key: string) => void;\n run: (cmd: Command, merge?: string) => void;\n messages: ShopComposerMessages;\n announce: (message: string) => void;\n onAdd: () => void;\n /** A request to focus a row (a new section): a new object each time; consumed once, after the render that drew the row. */\n focusRequest?: { key: string } | null;\n};\n\n/** « Photos », « Photos 2 » when a type appears twice. */\nexport function sectionLabel(sections: readonly Section[], index: number, messages: ShopComposerMessages): string {\n const s = sections[index]!;\n const same = sections.filter((x) => x.type === s.type);\n const base = messages.sectionNames[s.type];\n return same.length > 1 ? `${base} ${same.indexOf(s) + 1}` : base;\n}\n\nconst ICON = \"h-4 w-4\";\n\nexport function Outline({ sections, selected, onSelect, run, messages: m, announce, onAdd, focusRequest }: OutlineProps) {\n const rows = React.useRef(new Map<string, HTMLButtonElement>());\n // After a move (or a menu action) the moved row keeps the focus: the DOM may have reordered under it. A request is consumed once —\n // never on the next change of the document, which may be typing somewhere else.\n const wanted = React.useRef<string | null>(null);\n const [tick, setTick] = React.useState(0);\n const want = (key: string) => {\n wanted.current = key;\n setTick((t) => t + 1);\n };\n React.useLayoutEffect(() => {\n if (focusRequest) wanted.current = focusRequest.key;\n }, [focusRequest]);\n React.useLayoutEffect(() => {\n const key = wanted.current;\n wanted.current = null;\n if (key) rows.current.get(key)?.focus();\n }, [tick, focusRequest]);\n\n const move = (index: number, to: number) => {\n const s = sections[index]!;\n const name = sectionLabel(sections, index, m);\n const lo = sections[0]?.type === \"hero\" ? 1 : 0;\n const clamped = Math.min(Math.max(to, lo), sections.length - 1);\n if (s.type === \"hero\" || clamped === index) {\n announce(fill(m.announceCannotMove, { name }));\n return;\n }\n run({ type: \"moveSection\", key: s.key, to: clamped });\n want(s.key);\n announce(fill(m.announceMoved, { name, n: clamped + 1, total: sections.length }));\n };\n\n const onKeyDown = (e: React.KeyboardEvent, index: number) => {\n if (e.altKey && (e.key === \"ArrowUp\" || e.key === \"ArrowDown\")) {\n e.preventDefault();\n move(index, index + (e.key === \"ArrowUp\" ? -1 : 1));\n } else if (!e.altKey && (e.key === \"ArrowUp\" || e.key === \"ArrowDown\")) {\n const next = sections[index + (e.key === \"ArrowUp\" ? -1 : 1)];\n if (next) {\n e.preventDefault();\n rows.current.get(next.key)?.focus();\n }\n }\n };\n\n return (\n <nav aria-label={m.sections} className=\"flex min-h-0 flex-col gap-3\">\n <ol className=\"m-0 flex list-none flex-col gap-1 p-0\">\n {sections.map((s, i) => {\n const name = sectionLabel(sections, i, m);\n const isHero = s.type === \"hero\";\n const lo = sections[0]?.type === \"hero\" ? 1 : 0;\n return (\n <li key={s.key} data-selected={selected === s.key ? \"\" : undefined} data-disabled={s.disabled ? \"\" : undefined} className=\"flex items-center gap-1 rounded-lg border border-transparent data-[selected]:border-accent data-[selected]:bg-accent-soft\">\n <button\n type=\"button\"\n ref={(el) => {\n if (el) rows.current.set(s.key, el);\n else rows.current.delete(s.key);\n }}\n aria-current={selected === s.key ? \"true\" : undefined}\n aria-keyshortcuts=\"Alt+ArrowUp Alt+ArrowDown\"\n onClick={() => onSelect(s.key)}\n onKeyDown={(e) => onKeyDown(e, i)}\n className=\"flex min-h-11 min-w-0 flex-1 flex-col items-start justify-center rounded-lg px-3 py-1.5 text-start focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring\"\n >\n <span className=\"flex w-full items-baseline gap-2\">\n <span className={s.disabled ? \"truncate text-sm font-semibold text-fg-secondary line-through decoration-1\" : \"truncate text-sm font-semibold text-fg\"}>{name}</span>\n {s.disabled && <span className=\"font-mono text-[11px] text-fg-secondary\">{m.hiddenNote}</span>}\n </span>\n <span className=\"font-mono text-xs text-fg-secondary\">{m.variantNames[`${s.type}.${s.variant}`] ?? s.variant}</span>\n </button>\n <Switch\n size=\"sm\"\n label={fill(m.toggleVisible, { name })}\n checked={!s.disabled}\n onCheckedChange={(on) => {\n run({ type: \"toggleDisabled\", key: s.key });\n announce(fill(on ? m.announceShown : m.announceHidden, { name }));\n }}\n />\n <DropdownMenu.Root>\n <DropdownMenu.Trigger asChild>\n <Button variant=\"ghost\" size=\"icon\" aria-label={fill(m.sectionMenu, { name })}>\n <svg viewBox=\"0 0 16 16\" className={ICON} fill=\"currentColor\" aria-hidden>\n <circle cx=\"8\" cy=\"3\" r=\"1.4\" />\n <circle cx=\"8\" cy=\"8\" r=\"1.4\" />\n <circle cx=\"8\" cy=\"13\" r=\"1.4\" />\n </svg>\n </Button>\n </DropdownMenu.Trigger>\n <DropdownMenu.Content\n onCloseAutoFocus={(e) => {\n e.preventDefault();\n rows.current.get(s.key)?.focus();\n }}\n >\n <DropdownMenu.Item disabled={isHero || i <= lo} onSelect={() => move(i, i - 1)}>{m.moveUp}</DropdownMenu.Item>\n <DropdownMenu.Item disabled={isHero || i >= sections.length - 1} onSelect={() => move(i, i + 1)}>{m.moveDown}</DropdownMenu.Item>\n <DropdownMenu.Item disabled={isHero || i <= lo} onSelect={() => move(i, lo)}>{m.moveTop}</DropdownMenu.Item>\n <DropdownMenu.Separator />\n <DropdownMenu.Item\n tone=\"danger\"\n disabled={sections.length <= 1}\n onSelect={() => {\n run({ type: \"removeSection\", key: s.key });\n announce(fill(m.announceRemoved, { name }));\n const next = sections[i + 1] ?? sections[i - 1];\n if (next) want(next.key);\n }}\n >\n {m.remove}\n </DropdownMenu.Item>\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n </li>\n );\n })}\n </ol>\n <Button variant=\"outline\" onClick={onAdd}>{m.addSection}</Button>\n </nav>\n );\n}\n"],"mappings":";;;AAGA,YAAYA,QAAO;;;ACAnB,YAAYC,QAAO;;;ACGZ,IAAM,cAAc;AAAA;AAAA,EAEzB,UAAU;AAAA;AAAA,EAEV,QAAQ;AAAA;AAAA,EAER,QAAQ;AAAA;AAAA,EAER,OAAO;AAAA;AAAA,EAEP,QAAQ;AAAA;AAAA,EAER,OAAO;AACT;;;ACnBA,YAAY,OAAO;AAGZ,IAAM,gBAAkB,SAAO;AAAA,EACpC,IAAM,WAAW,SAAO,EAAE,MAAQ,YAAU,GAAG,CAAC,CAAC;AAAA,EACjD,IAAM,WAAW,SAAO,EAAE,MAAQ,YAAU,GAAG,CAAC,CAAC;AACnD,CAAC;;;AFsCD,IAAM,MAAQ,UAAO,EAAE,MAAQ,aAAU,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MAACI,SAAA,EAAO,SAAQ,SAAS,YAAE,QAAO,GAAS;AAAA,QACjE,gBAAAJ,MAACI,SAAA,EAAO,SAAQ,WAAU,UAAU,SAAS,SAAS,KAAK,CAAC,OAAO,IAAI,SAAS,YAAY;AAAE,gBAAM,UAAU,IAAI;AAAG,sBAAY,IAAI;AAAG,wBAAc,KAAK;AAAA,QAAG,GAAI,YAAE,gBAAe;AAAA,SACrL;AAAA,OACF,GACF;AAAA,IAEA,gBAAAJ,MAAC,OAAO,MAAP,EAAY,MAAM,aAAa,cAAc,gBAC5C,0BAAAC,OAAC,OAAO,SAAP,EAAe,YAAY,EAAE,cAAc,MAAK,MAC/C;AAAA,sBAAAD,MAAC,OAAO,QAAP,EAAc,0BAAAA,MAAC,OAAO,OAAP,EAAc,YAAE,SAAQ,GAAe;AAAA,MACvD,gBAAAA,MAAC,OAAO,MAAP,EAAY,WAAU,OACpB,yBAAe,gBAAAA,MAAC,gBAAa,KAAK,YAAY,OAAO,EAAE,cAAc,OAAK,MAAC,OAAc,GAC5F;AAAA,OACF,GACF;AAAA,KACF;AAEJ;","names":["z","z","same","key","Button","RadioGroup","React","z","key","Button","RadioGroup","React","optional","key","jsx","jsxs","fill","jsx","jsxs","buttonVariants","React","jsx","React","Fragment","jsx","jsxs","lead","React","Fragment","jsx","jsxs","lead","jsx","jsx","jsxs","buttonVariants","jsx","jsx","jsxs","jsx","jsxs","lead","jsx","jsxs","tv","jsx","jsx","jsxs","summary","review","buttonVariants","React","jsx","jsxs","buttonVariants","lead","jsx","jsx","jsxs","Avatar","jsx","jsxs","lead","Avatar","EmbedFacade","RetroTv","jsx","jsxs","lead","className","EmbedFacade","tv","RetroTv","jsx","jsxs","jsx","jsx","jsxs","run","Button","RadioGroup","RadioGroup","jsx","jsxs","run","RadioGroup","Button","Switch","React","jsx","jsxs","same","run","key","Switch","Button","jsx","jsxs","key","addSection","Button","RadioGroup"]}
|
|
1
|
+
{"version":3,"sources":["../src/shop/catalogue.ts","../src/shop/define.ts","../src/shop/limits.ts","../src/shop/text.ts","../src/shop/look/apply-look.ts","../src/shop-composer/commands.ts","../src/shop-composer/composer.tsx","../src/cn.ts","../src/shop/preview.ts","../src/shop/schema.ts","../src/shop-composer/diff.ts","../src/shop-composer/history.ts","../src/shop-composer/inspector.tsx","../src/shop-composer/keys.ts","../src/shop-composer/messages.ts","../src/shop-composer/settings-form.tsx","../src/shop-composer/fields.ts","../src/button/button.tsx","../src/spinner/glyph.tsx","../src/recipes/define.ts","../src/button/recipe.ts","../src/shop/booking/booking.tsx","../src/block-link.tsx","../src/page/page.tsx","../src/shop/frame.tsx","../src/shop/photo.tsx","../src/shop/bulletin/bulletin.tsx","../src/shop/demo/media.ts","../src/shop/demo/index.ts","../src/shop/faq/faq.tsx","../src/shop/gallery/gallery.tsx","../src/shop/hero/hero.tsx","../src/shop/policies/policies.tsx","../src/shop/reviews/reviews.tsx","../src/shop/services/services.tsx","../src/shop/social/social.tsx","../src/shop/story/story.tsx","../src/shop/team/team.tsx","../src/shop/video/video.tsx","../src/shop/visit/visit.tsx","../src/shop-composer/thumbnails.tsx","../src/shop-composer/look-picker.tsx","../src/shop-composer/outline.tsx"],"sourcesContent":["// The catalogue of section types (ADR-007 §3): each with its variants, its settings and the blocks it allows, as zod\n// schemas — the renderer, the validator and the composer's forms read the same definitions. The first variant of a type is\n// its default. Settings hold references and rules (ids, a source, a count), never a price or a text of the shop.\nimport * as z from \"zod/mini\";\n\nimport { defineSection } from \"./define\";\nimport { SHOP_LIMITS } from \"./limits\";\nimport { localizedText } from \"./text\";\n\n/** A reference to something the product holds (a service, a photo, a member): an opaque id. */\nconst ref = z.string().check(z.minLength(1), z.maxLength(80));\nconst short = z.string().check(z.minLength(1), z.maxLength(140));\nconst url = z.string().check(z.maxLength(300), z.regex(/^https:\\/\\//, \"an https address\"));\nconst isoDay = z.string().check(z.regex(/^\\d{4}-\\d{2}-\\d{2}$/, \"a day (YYYY-MM-DD)\"));\nconst source = z.enum([\"all\", \"pick\"]);\n/** One of a few numbers. */\nconst oneOf = <const N extends readonly [number, number, ...number[]]>(...n: N) => z.union(n.map((v) => z.literal(v)) as unknown as [z.ZodMiniLiteral<N[number]>, z.ZodMiniLiteral<N[number]>]);\n\nexport const platforms = [\"tiktok\", \"youtube-shorts\", \"instagram\"] as const;\n\nexport const heroSection = defineSection({\n type: \"hero\",\n variants: [\"poster\", \"split\", \"banner\", \"tv\"],\n settings: z.object({\n /** The cover: a media id. Absent, the product's default for the trade. */\n media: z.optional(ref),\n /** Where the photo is cropped to when the box is not its ratio. */\n focus: z.enum([\"center\", \"top\", \"bottom\"]),\n }),\n settingsDefault: { focus: \"center\" },\n blocks: { fact: z.object({ kind: z.enum([\"open-now\", \"area\", \"score\"]) }) },\n});\n\nexport const servicesSection = defineSection({\n type: \"services\",\n variants: [\"menu\", \"cards\", \"index\", \"carousel\"],\n settings: z.object({\n /** `all` the shop's services, or `pick` the ones the `service` blocks name, in their order. */\n source,\n groupBy: z.enum([\"category\", \"none\"]),\n /** `menu` only: two columns when nothing sits beside it. */\n columns: oneOf(1, 2),\n /** `menu` only: the shop's hours, team and address beside the list (the host draws them from its own data). */\n aside: z.enum([\"hours\", \"none\"]),\n }),\n settingsDefault: { source: \"all\", groupBy: \"category\", columns: 1, aside: \"hours\" },\n blocks: { service: z.object({ serviceId: ref }) },\n refine: (section, issue) => {\n if (section.settings.source === \"pick\" && (section.blocks ?? []).length === 0) issue([\"blocks\"], \"pick at least one service\");\n if (section.variant === \"cards\" && (section.blocks ?? []).length > SHOP_LIMITS.cards) issue([\"blocks\"], `at most ${SHOP_LIMITS.cards} cards`);\n },\n});\n\nexport const bookingSection = defineSection({\n type: \"booking\",\n variants: [\"strip\", \"panel\", \"closing\", \"sticky\"],\n settings: z.object({\n /** A service the times are for; absent, the next free times of any service. */\n serviceId: z.optional(ref),\n /** `strip`: how many times it shows. */\n count: oneOf(3, 4, 6),\n }),\n settingsDefault: { count: 4 },\n});\n\nexport const gallerySection = defineSection({\n type: \"gallery\",\n variants: [\"mosaic\", \"filmstrip\", \"wall\", \"grid\"],\n settings: z.object({\n source,\n /** `wall` only. */\n texture: z.enum([\"plaster\", \"brick\", \"ridge\", \"zellige\"]),\n }),\n settingsDefault: { source: \"all\", texture: \"plaster\" },\n blocks: {\n photo: z.object({ mediaId: ref, caption: z.optional(short) }),\n note: z.object({ text: short, signature: z.optional(z.string().check(z.maxLength(40))) }),\n sign: z.object({}),\n },\n refine: (section, issue) => {\n const photos = (section.blocks ?? []).filter((b) => b.type === \"photo\").length;\n if (photos > SHOP_LIMITS.photos) issue([\"blocks\"], `at most ${SHOP_LIMITS.photos} photos`);\n },\n});\n\nexport const videoSection = defineSection({\n type: \"video\",\n variants: [\"tv\", \"shorts\"],\n settings: z.object({ cabinet: z.enum([\"cabinet\", \"portable\"]), channel: z.optional(z.string().check(z.maxLength(32))) }),\n settingsDefault: { cabinet: \"cabinet\" },\n blocks: { reel: z.object({ platform: z.enum(platforms), url }) },\n});\n\nexport const reviewsSection = defineSection({\n type: \"reviews\",\n variants: [\"summary-cards\", \"quote\", \"strip\"],\n settings: z.object({ rule: z.enum([\"best\", \"latest\"]), count: oneOf(1, 2, 3) }),\n settingsDefault: { rule: \"best\", count: 2 },\n});\n\nexport const bulletinSection = defineSection({\n type: \"bulletin\",\n variants: [\"board\", \"banner\"],\n settings: z.object({}),\n settingsDefault: {},\n blocks: { flyer: z.object({ text: short, signature: z.optional(z.string().check(z.maxLength(40))), until: z.optional(isoDay) }) },\n refine: (section, issue) => {\n if ((section.blocks ?? []).length > SHOP_LIMITS.flyers) issue([\"blocks\"], `at most ${SHOP_LIMITS.flyers} flyers`);\n },\n});\n\nexport const teamSection = defineSection({\n type: \"team\",\n variants: [\"row\", \"cards\"],\n settings: z.object({ source }),\n settingsDefault: { source: \"all\" },\n blocks: { member: z.object({ memberId: ref }) },\n});\n\nexport const visitSection = defineSection({\n type: \"visit\",\n variants: [\"card\", \"map\", \"split\"],\n settings: z.object({ showPhone: z.boolean() }),\n settingsDefault: { showPhone: true },\n});\n\nexport const storySection = defineSection({\n type: \"story\",\n variants: [\"quote\", \"owner\"],\n settings: z.object({ body: localizedText }),\n settingsDefault: { body: {} },\n});\n\nexport const socialSection = defineSection({\n type: \"social\",\n variants: [\"links\", \"facade\"],\n settings: z.object({}),\n settingsDefault: {},\n blocks: { link: z.object({ platform: z.enum(platforms), url }) },\n});\n\nexport const faqSection = defineSection({\n type: \"faq\",\n variants: [\"list\"],\n settings: z.object({}),\n settingsDefault: {},\n blocks: { question: z.object({ question: localizedText, answer: localizedText }) },\n});\n\nexport const policiesSection = defineSection({\n type: \"policies\",\n variants: [\"inline\"],\n settings: z.object({ show: z.array(z.enum([\"cancellation\", \"prices\", \"booking-window\"])).check(z.maxLength(3)) }),\n settingsDefault: { show: [\"cancellation\", \"prices\", \"booking-window\"] },\n});\n\n/** Every section type, in the order the composer lists them. */\nexport const SECTION_DEFINITIONS = [\n heroSection, servicesSection, bookingSection, gallerySection, videoSection, reviewsSection, bulletinSection,\n teamSection, visitSection, storySection, socialSection, faqSection, policiesSection,\n] as const;\n\nexport type SectionDefinition = (typeof SECTION_DEFINITIONS)[number];\nexport type SectionType = SectionDefinition[\"type\"];\nexport const SECTION_TYPES = SECTION_DEFINITIONS.map((d) => d.type) as readonly SectionType[];\n\n/** The definition of a type. */\nexport function sectionDefinition<T extends SectionType>(type: T): Extract<SectionDefinition, { type: T }> {\n return SECTION_DEFINITIONS.find((d) => d.type === type) as Extract<SectionDefinition, { type: T }>;\n}\n","// `defineSection` (ADR-007 §1): one section type = its variants, the zod schema of its settings, the blocks it allows\n// (each a zod schema) and the checks that need the whole section. It builds the zod schema of a section of this type, so\n// the renderer, the validator and the composer's generated forms agree.\nimport * as z from \"zod/mini\";\n\nimport { SHOP_LIMITS } from \"./limits\";\nimport { localizedText } from \"./text\";\n\ntype Shape = z.ZodMiniObject;\ntype BlockShapes = Record<string, Shape>;\n\n/** What a section of a type is, once parsed. */\nexport type ParsedSection<T extends string, V extends string, S extends Shape, B extends BlockShapes> = {\n key: string;\n type: T;\n variant: V;\n disabled?: boolean;\n settings: z.output<S>;\n text?: { title?: z.output<typeof localizedText>; lead?: z.output<typeof localizedText> };\n blocks?: { [K in keyof B & string]: { key: string; type: K; settings: z.output<B[K]>; text?: Record<string, z.output<typeof localizedText>> } }[keyof B & string][];\n};\n\nexport type SectionSpec<T extends string, V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes> = {\n /** The type's name: the `type` of a section. */\n type: T;\n /** Its variants; the first is the default one. */\n variants: V;\n /** The zod schema of its settings. */\n settings: S;\n /** The settings a new section starts with. */\n settingsDefault: z.input<S>;\n /** The block types it allows, each with the zod schema of its settings. None: the section has no blocks. */\n blocks?: B;\n /** The checks that read the whole section (a count, a combination); `issue(path, message)` refuses it. */\n refine?: (section: ParsedSection<T, V[number], S, B>, issue: (path: (string | number)[], message: string) => void) => void;\n};\n\nexport type SectionDefinitionOf<T extends string, V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes> = SectionSpec<T, V, S, B> & {\n readonly defaultVariant: V[number];\n readonly blockTypes: readonly (keyof B & string)[];\n /** The zod schema of a section of this type. */\n readonly schema: z.ZodMiniType<ParsedSection<T, V[number], S, B>>;\n};\n\nconst key = z.string().check(z.minLength(1), z.maxLength(40), z.regex(/^[A-Za-z0-9_-]+$/, \"a key (letters, digits, - and _)\"));\n\n/** Defines a section type. */\nexport function defineSection<const T extends string, const V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes = Record<never, never>>(\n spec: SectionSpec<T, V, S, B>,\n): SectionDefinitionOf<T, V, S, B> {\n const blockUnion = spec.blocks && Object.keys(spec.blocks).length > 0\n ? z.discriminatedUnion(\n \"type\",\n Object.entries(spec.blocks).map(([type, settings]) =>\n z.object({ key, type: z.literal(type), settings, text: z.optional(z.record(z.string(), localizedText)) }),\n ) as unknown as [z.ZodMiniObject, ...z.ZodMiniObject[]],\n )\n : undefined;\n const blocks = blockUnion\n ? z.optional(z.array(blockUnion).check(z.maxLength(SHOP_LIMITS.blocks)))\n : z.optional(z.array(z.never()).check(z.maxLength(0)));\n const base = z.object({\n key,\n type: z.literal(spec.type),\n variant: z.enum(spec.variants),\n disabled: z.optional(z.boolean()),\n settings: spec.settings,\n text: z.optional(z.object({ title: z.optional(localizedText), lead: z.optional(localizedText) })),\n blocks,\n });\n const schema = base.check(\n z.superRefine((value, ctx) => {\n spec.refine?.(value as never, (path, message) => ctx.issues.push({ code: \"custom\", message, path, input: value }));\n }),\n );\n return Object.freeze({\n ...spec,\n defaultVariant: spec.variants[0],\n blockTypes: Object.keys(spec.blocks ?? {}) as (keyof B & string)[],\n schema: schema as unknown as z.ZodMiniType<ParsedSection<T, V[number], S, B>>,\n });\n}\n","// The bounds of a shop page (ADR-007 §3): the schema, the database and the composer read the same numbers.\n\n/**\n * The most a page, a section or a card list may hold. A salon page that stays a page that sells: bounded on purpose.\n * @fixed: ADR-007 §3 — product limits of the document, never a business setting.\n */\nexport const SHOP_LIMITS = {\n /** Sections on a page, the hero included. */\n sections: 16,\n /** Blocks in one section. */\n blocks: 24,\n /** Photos in a gallery. */\n photos: 12,\n /** Cards in `services · cards`. */\n cards: 6,\n /** Flyers on a bulletin board. */\n flyers: 3,\n /** Reels in `video · shorts`. */\n reels: 6,\n} as const;\n","import * as z from \"zod/mini\";\n\n/** The owner's words, in each language; the product's message is the fallback when a language is absent. */\nexport const localizedText = z.object({\n fr: z.optional(z.string().check(z.maxLength(600))),\n en: z.optional(z.string().check(z.maxLength(600))),\n});\nexport type LocalizedText = z.output<typeof localizedText>;\n","// Pure. A look (`look-*` of @krizaka/tokens, folioviv#478) is applied to a shop page by rewriting the variants of the sections the\n// page already has — never their order, settings, blocks, text or photos. The closing call and the sticky bar are different jobs\n// from the strip of next times, so a look leaves them as they are.\nimport { shopPresets } from \"@krizaka/tokens/shop-presets\";\n\nimport { SECTION_DEFINITIONS } from \"../catalogue\";\nimport type { Section, ShopPage } from \"../schema\";\n\n/** What `applyLook` reads of a look: its id and version, and one variant per section type. */\nexport type ShopLookLike = { id: string; version: number; variants: Readonly<Record<string, string>> };\n\n/** The six looks, in the order of the addendum (Cahier first). */\nexport const SHOP_LOOKS = [\"look-cahier\", \"look-krizaka\", \"look-editorial\", \"look-boutique\", \"look-affiche\", \"look-nuit\"]\n .map((id) => shopPresets.find((p) => p.id === id))\n .filter((p): p is (typeof shopPresets)[number] => p !== undefined);\n\n/** A look by id, or undefined for a trade preset or an unknown id. */\nexport const shopLookOf = (id: string) => SHOP_LOOKS.find((p) => p.id === id);\n\n/** Booking variants a look rewrites: the strip of next times and the panel. `closing` and `sticky` keep their own job. */\nconst REWRITTEN_BOOKING = new Set([\"strip\", \"panel\"]);\n\nconst variantsOf = (type: string) => SECTION_DEFINITIONS.find((d) => d.type === type)?.variants as readonly string[] | undefined;\n\nfunction restyle(section: Section, look: ShopLookLike): Section {\n const variant = look.variants[section.type];\n if (!variant || variant === section.variant || !variantsOf(section.type)?.includes(variant)) return section;\n if (section.type === \"booking\" && !REWRITTEN_BOOKING.has(section.variant)) return section;\n return { ...section, variant } as Section;\n}\n\n/**\n * The page wearing a look: its preset reference, the look's own density and accent, and the variants of its sections. Everything\n * else is the owner's and stays: `applyLook(applyLook(p, a), b)` has the content of `p`.\n */\nexport function applyLook(page: ShopPage, look: ShopLookLike): ShopPage {\n const sections = page.sections.map((s) => restyle(s, look));\n const same = page.preset.id === look.id && page.preset.version === look.version && page.density === undefined && page.accent === undefined && sections.every((s, i) => s === page.sections[i]);\n if (same) return page;\n return { ...page, preset: { id: look.id, version: look.version }, density: undefined, accent: undefined, sections };\n}\n","// The composer's commands (ADR-007 §5): every change of the document is a pure command on a reducer — never a mutation —\n// so undo / redo restore the exact document, and the rules of the document (a hero first, 16 sections, 24 blocks, the variants\n// of a type) hold after every step. A command that would break a rule is a no-op: the page stays valid, always.\nimport { SECTION_DEFINITIONS, sectionDefinition,type SectionType } from \"../shop/catalogue\";\nimport { SHOP_LIMITS } from \"../shop/limits\";\nimport { applyLook, type ShopLookLike } from \"../shop/look/apply-look\";\nimport type { Section, ShopPage } from \"../shop/schema\";\nimport type { LocalizedText } from \"../shop/text\";\n\ntype Rec = Record<string, unknown>;\n\nexport type Command =\n /** Adds a section (its type's default settings, the given or the default variant) at an index; a hero goes first. */\n | { type: \"addSection\"; sectionType: SectionType; key: string; variant?: string; at?: number; settings?: Rec }\n | { type: \"removeSection\"; key: string }\n /** Moves a section to an absolute index (the hero stays first: nothing goes above it). */\n | { type: \"moveSection\"; key: string; to: number }\n | { type: \"setVariant\"; key: string; variant: string }\n /** Merges into the settings. */\n | { type: \"patchSettings\"; key: string; patch: Rec }\n | { type: \"setText\"; key: string; field: \"title\" | \"lead\"; value: LocalizedText | undefined }\n | { type: \"toggleDisabled\"; key: string }\n | { type: \"setPreset\"; preset: { id: string; version: number }; density?: \"compact\" | \"airy\" | null }\n | { type: \"setDensity\"; density: \"compact\" | \"airy\" | undefined }\n /** A whole look (`look-*`): the variants of the sections, nothing of their content (`applyLook`). */\n | { type: \"applyLook\"; look: ShopLookLike }\n /** The accent within the look's tested list. */\n | { type: \"setAccent\"; accent: string | undefined }\n | { type: \"addBlock\"; key: string; blockKey: string; blockType: string; settings?: Rec; at?: number }\n | { type: \"removeBlock\"; key: string; blockKey: string }\n | { type: \"moveBlock\"; key: string; blockKey: string; to: number }\n | { type: \"patchBlock\"; key: string; blockKey: string; patch: Rec };\n\nconst clamp = (n: number, lo: number, hi: number) => Math.min(Math.max(n, lo), hi);\nconst indexOfKey = (page: ShopPage, key: string) => page.sections.findIndex((s) => s.key === key);\n\n/** The array with an item moved to an index. */\nexport function moved<T>(list: readonly T[], from: number, to: number): T[] {\n const next = [...list];\n const [item] = next.splice(from, 1);\n next.splice(clamp(to, 0, next.length), 0, item as T);\n return next;\n}\n\nfunction withSection(page: ShopPage, key: string, change: (s: Section) => Section): ShopPage {\n const i = indexOfKey(page, key);\n if (i < 0) return page;\n const next = change(page.sections[i]!);\n if (next === page.sections[i]) return page;\n const sections = [...page.sections];\n sections[i] = next;\n return { ...page, sections };\n}\n\ntype Handler<T extends Command[\"type\"]> = (page: ShopPage, cmd: Extract<Command, { type: T }>) => ShopPage;\n\nconst addSection: Handler<\"addSection\"> = (page, cmd) => {\n const def = SECTION_DEFINITIONS.find((d) => d.type === cmd.sectionType);\n if (!def || page.sections.length >= SHOP_LIMITS.sections || page.sections.some((s) => s.key === cmd.key)) return page;\n const variant = cmd.variant ?? def.defaultVariant;\n if (!(def.variants as readonly string[]).includes(variant)) return page;\n const isHero = def.type === \"hero\";\n if (isHero && page.sections.some((s) => s.type === \"hero\")) return page;\n const heroFirst = page.sections[0]?.type === \"hero\";\n const minAt = heroFirst ? 1 : 0;\n const at = isHero ? 0 : clamp(cmd.at ?? page.sections.length, minAt, page.sections.length);\n const section = { key: cmd.key, type: def.type, variant, settings: { ...(def.settingsDefault as Rec), ...cmd.settings } } as unknown as Section;\n const sections = [...page.sections];\n sections.splice(at, 0, section);\n return { ...page, sections };\n};\n\nconst removeSection: Handler<\"removeSection\"> = (page, cmd) => {\n if (indexOfKey(page, cmd.key) < 0 || page.sections.length <= 1) return page;\n return { ...page, sections: page.sections.filter((s) => s.key !== cmd.key) };\n};\n\nconst moveSection: Handler<\"moveSection\"> = (page, cmd) => {\n const from = indexOfKey(page, cmd.key);\n if (from < 0 || page.sections[from]!.type === \"hero\") return page;\n const lo = page.sections[0]?.type === \"hero\" ? 1 : 0;\n const to = clamp(cmd.to, lo, page.sections.length - 1);\n return to === from ? page : { ...page, sections: moved(page.sections, from, to) };\n};\n\nconst setVariant: Handler<\"setVariant\"> = (page, cmd) =>\n withSection(page, cmd.key, (s) => {\n const def = sectionDefinition(s.type);\n if (s.variant === cmd.variant || !(def.variants as readonly string[]).includes(cmd.variant)) return s;\n return { ...s, variant: cmd.variant } as Section;\n });\n\n/** Whether every value of a patch is already the one the object holds. */\nconst saysNothingNew = (current: Rec, patch: Rec) => Object.entries(patch).every(([k, v]) => JSON.stringify(current[k]) === JSON.stringify(v));\n\nconst patchSettings: Handler<\"patchSettings\"> = (page, cmd) =>\n withSection(page, cmd.key, (s) => {\n const current = s.settings as Rec;\n // Nothing to say when every value is already the document's (a form that reports its first values after an undo).\n return saysNothingNew(current, cmd.patch) ? s : ({ ...s, settings: { ...current, ...cmd.patch } } as Section);\n });\n\nconst setText: Handler<\"setText\"> = (page, cmd) =>\n withSection(page, cmd.key, (s) => {\n const text = { ...(s.text ?? {}) } as Rec;\n if (cmd.value === undefined) delete text[cmd.field];\n else text[cmd.field] = cmd.value;\n const next = { ...s } as Rec;\n if (Object.keys(text).length === 0) delete next.text;\n else next.text = text;\n return next as unknown as Section;\n });\n\nconst toggleDisabled: Handler<\"toggleDisabled\"> = (page, cmd) => withSection(page, cmd.key, (s) => ({ ...s, disabled: s.disabled ? undefined : true }) as Section);\n\nconst setPreset: Handler<\"setPreset\"> = (page, cmd) => {\n if (page.preset.id === cmd.preset.id && page.preset.version === cmd.preset.version && cmd.density === undefined) return page;\n let density: Partial<Pick<ShopPage, \"density\">> = {};\n if (cmd.density === null) density = { density: undefined };\n else if (cmd.density) density = { density: cmd.density };\n return { ...page, preset: { ...cmd.preset }, ...density };\n};\n\nconst setDensity: Handler<\"setDensity\"> = (page, cmd) => (page.density === cmd.density ? page : { ...page, density: cmd.density });\n\nconst applyLookCmd: Handler<\"applyLook\"> = (page, cmd) => applyLook(page, cmd.look);\n\nconst setAccent: Handler<\"setAccent\"> = (page, cmd) => (page.accent === cmd.accent ? page : { ...page, accent: cmd.accent });\n\ntype Keyed = { key: string; type?: string; settings?: Rec };\n\nconst addBlock: Handler<\"addBlock\"> = (page, cmd) =>\n withSection(page, cmd.key, (s) => {\n const def = sectionDefinition(s.type);\n const blocks = (s.blocks ?? []) as readonly Keyed[];\n if (!(def.blockTypes as readonly string[]).includes(cmd.blockType) || blocks.length >= SHOP_LIMITS.blocks || blocks.some((b) => b.key === cmd.blockKey)) return s;\n const next = [...blocks];\n next.splice(clamp(cmd.at ?? blocks.length, 0, blocks.length), 0, { key: cmd.blockKey, type: cmd.blockType, settings: { ...cmd.settings } });\n return { ...s, blocks: next } as unknown as Section;\n });\n\nconst removeBlock: Handler<\"removeBlock\"> = (page, cmd) =>\n withSection(page, cmd.key, (s) => {\n const blocks = (s.blocks ?? []) as readonly Keyed[];\n if (!blocks.some((b) => b.key === cmd.blockKey)) return s;\n const next = blocks.filter((b) => b.key !== cmd.blockKey);\n return { ...s, blocks: next.length > 0 ? next : undefined } as unknown as Section;\n });\n\nconst moveBlock: Handler<\"moveBlock\"> = (page, cmd) =>\n withSection(page, cmd.key, (s) => {\n const blocks = (s.blocks ?? []) as readonly Keyed[];\n const from = blocks.findIndex((b) => b.key === cmd.blockKey);\n const to = clamp(cmd.to, 0, blocks.length - 1);\n return from < 0 || from === to ? s : ({ ...s, blocks: moved(blocks, from, to) } as unknown as Section);\n });\n\nconst patchBlock: Handler<\"patchBlock\"> = (page, cmd) =>\n withSection(page, cmd.key, (s) => {\n const blocks = (s.blocks ?? []) as readonly Keyed[];\n const block = blocks.find((b) => b.key === cmd.blockKey);\n if (!block || saysNothingNew(block.settings ?? {}, cmd.patch)) return s;\n return { ...s, blocks: blocks.map((b) => (b === block ? { ...b, settings: { ...b.settings, ...cmd.patch } } : b)) } as unknown as Section;\n });\n\nconst handlers: { [T in Command[\"type\"]]: Handler<T> } = {\n addSection, removeSection, moveSection, setVariant, patchSettings, setText, toggleDisabled, setPreset, setDensity, applyLook: applyLookCmd, setAccent, addBlock, removeBlock, moveBlock, patchBlock,\n};\n\n/** Applies a command to a document; returns the same object when nothing changes. */\nexport function applyCommand(page: ShopPage, cmd: Command): ShopPage {\n return (handlers[cmd.type] as (page: ShopPage, cmd: Command) => ShopPage)(page, cmd);\n}\n","\"use client\";\n\n// Our own shop composer (ADR-007 §5): three panes on a laptop — the outline of the sections, the live preview of the product's own\n// public page, the inspector of the selected section — and two steps on a phone (the list, then the section; the preview behind a\n// « View » button). Every change is a command on a reducer (⌘Z / ⇧⌘Z, 100 steps), saved to the draft after 800 ms of calm; « Publish »\n// shows what changes and refuses while a setting is invalid. Every action has a keyboard path. No third-party editor: Puck was weighed\n// and not adopted (the model is a list, not a canvas).\nimport { Button } from \"@krizaka/ui/button\";\nimport { Dialog } from \"@krizaka/ui/dialog\";\nimport { RadioGroup } from \"@krizaka/ui/radio-group\";\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { SECTION_DEFINITIONS, type SectionType } from \"../shop/catalogue\";\nimport { postToPreview } from \"../shop/preview\";\nimport { parseShopPage, type ShopPage } from \"../shop/schema\";\nimport { type Command } from \"./commands\";\nimport { type DiffEntry, diffPages } from \"./diff\";\nimport { canRedo, canUndo, createHistory, type History, redo, run, undo } from \"./history\";\nimport { Inspector } from \"./inspector\";\nimport { newKey } from \"./keys\";\nimport { LookPicker } from \"./look-picker\";\nimport { defaultShopComposerMessages, fill, type ShopComposerMessages } from \"./messages\";\nimport { Outline, sectionLabel } from \"./outline\";\n\n/** How long the draft waits for calm before it is saved. */\n// @fixed: ADR-007 §5 — the autosave debounce of the editor, 800 ms; not a shop setting.\nexport const AUTOSAVE_MS = 800;\n\nexport type ShopComposerPreset = {\n id: string;\n version: number;\n name: string;\n density: \"compact\" | \"airy\";\n variants: Readonly<Record<string, string>>;\n /** A look's (`look-*`): the accent it starts with and the tested list the owner chooses from. Presets without a list are trade presets (the « Style » select). */\n accent?: string;\n accents?: readonly string[];\n};\n\nexport type ShopComposerProps = {\n /** The draft to edit. The composer keeps its own history from it. */\n value: ShopPage;\n /** Change it to load another document (another draft): the history and the selection start again. */\n resetKey?: string | number;\n /** Called with a valid draft after 800 ms without a change: save it. A rejection says « Not saved ». */\n onChange?: (page: ShopPage) => void | Promise<void>;\n /** Called with the draft once the person confirmed the diff. */\n onPublish: (page: ShopPage) => void | Promise<void>;\n /** The discard of the draft (the product asks first, in its own dialog). Absent: no such button. */\n onDiscard?: () => void;\n /** What is live now, for the diff of « Publish ». Absent: the document the composer was opened with. */\n published?: ShopPage;\n /** The page of the product, in an iframe: its own route with `?draft=<id>`. Its origin is the bridge's. */\n previewUrl: string;\n /** The look presets of the shop's trade. */\n presets: readonly ShopComposerPreset[];\n /** The section types the trade does not use: folded under « … » in the catalogue. */\n foldedTypes?: readonly SectionType[];\n /** The words, translated. Default: English. */\n messages?: ShopComposerMessages;\n /** Classes merged on the root (its height: `h-[100dvh]`). */\n className?: string;\n};\n\ntype State = { history: History; epoch: number };\ntype Action = { type: \"run\"; cmd: Command; merge?: string } | { type: \"undo\" } | { type: \"redo\" } | { type: \"reset\"; page: ShopPage };\n\nfunction reducer(state: State, a: Action): State {\n switch (a.type) {\n case \"run\": {\n const history = run(state.history, a.cmd, a.merge);\n return history === state.history ? state : { ...state, history };\n }\n case \"undo\": {\n const history = undo(state.history);\n return history === state.history ? state : { history, epoch: state.epoch + 1 };\n }\n case \"redo\": {\n const history = redo(state.history);\n return history === state.history ? state : { history, epoch: state.epoch + 1 };\n }\n case \"reset\":\n return { history: createHistory(a.page), epoch: state.epoch + 1 };\n }\n}\n\nfunction PreviewFrame({ src, title, phone, frame }: Readonly<{ src: string; title: string; phone: boolean; frame: React.Ref<HTMLIFrameElement> }>) {\n return (\n <div className=\"flex h-full min-h-0 justify-center overflow-auto bg-surface-2 p-3\">\n <iframe ref={frame} src={src || undefined} title={title} data-device={phone ? \"phone\" : \"desktop\"} className={phone ? \"h-full min-h-[34rem] w-[390px] max-w-full rounded-xl border border-border-default bg-surface-0\" : \"h-full min-h-[34rem] w-full rounded-xl border border-border-default bg-surface-0\"} />\n </div>\n );\n}\n\n/** The shop composer. */\nexport function ShopComposer({ value, resetKey, onChange, onPublish, onDiscard, published, previewUrl, presets, foldedTypes = [], messages = defaultShopComposerMessages, className }: Readonly<ShopComposerProps>) {\n const m = messages;\n const [{ history, epoch }, dispatch] = React.useReducer(reducer, value, (v): State => ({ history: createHistory(v), epoch: 0 }));\n const page = history.present;\n const [baseline, setBaseline] = React.useState(published ?? value);\n const [selected, setSelected] = React.useState<string | null>(page.sections[0]?.key ?? null);\n const [step, setStep] = React.useState<\"list\" | \"section\">(\"list\");\n const [live, setLive] = React.useState(\"\");\n const [status, setStatus] = React.useState<\"idle\" | \"saving\" | \"saved\" | \"error\">(\"idle\");\n const [adding, setAdding] = React.useState(false);\n const [publishing, setPublishing] = React.useState(false);\n const [device, setDevice] = React.useState<\"phone\" | \"desktop\">(\"desktop\");\n const [previewOpen, setPreviewOpen] = React.useState(false);\n const [invalid, setInvalid] = React.useState<ReadonlySet<string>>(new Set());\n const [focusRequest, setFocusRequest] = React.useState<{ key: string } | null>(null);\n const frame = React.useRef<HTMLIFrameElement | null>(null);\n const origin = React.useMemo(() => {\n try {\n return new URL(previewUrl, typeof location === \"undefined\" ? undefined : location.href).origin;\n } catch {\n return \"\";\n }\n }, [previewUrl]);\n\n // A `data:` or `about:` preview has an opaque origin (« null »): nothing can be addressed to it.\n const hasOrigin = origin !== \"\" && origin !== \"null\";\n\n // A new document from outside (another draft): history and selection start again.\n const first = React.useRef(true);\n const saved = React.useRef(page);\n React.useEffect(() => {\n if (first.current) {\n first.current = false;\n return;\n }\n saved.current = value;\n dispatch({ type: \"reset\", page: value });\n setInvalid(new Set());\n setBaseline(published ?? value);\n setSelected(value.sections[0]?.key ?? null);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- only a new `resetKey` reloads the document\n }, [resetKey]);\n\n const parsed = React.useMemo(() => parseShopPage(page), [page]);\n const looks = React.useMemo(() => presets.filter((p) => p.id.startsWith(\"look-\")), [presets]);\n const styles = React.useMemo(() => presets.filter((p) => !p.id.startsWith(\"look-\")), [presets]);\n const announce = React.useCallback((message: string) => setLive((prev) => (prev === message ? message + String.fromCodePoint(0x200b) : message)), []);\n const exec = React.useCallback((cmd: Command, merge?: string) => dispatch({ type: \"run\", cmd, merge }), []);\n const selectedSection = page.sections.find((s) => s.key === selected) ?? null;\n const selectedIndex = selectedSection ? page.sections.indexOf(selectedSection) : -1;\n\n // Autosave to the draft: a valid document, after a calm of 800 ms; the preview refreshes once it is saved.\n React.useEffect(() => {\n if (page === saved.current || !parsed.ok || !onChange) return;\n const timer = setTimeout(async () => {\n setStatus(\"saving\");\n try {\n await onChange(page);\n saved.current = page;\n setStatus(\"saved\");\n if (hasOrigin) postToPreview(frame.current?.contentWindow, origin, { source: \"krizaka-shop-composer\", type: \"refresh\" });\n } catch {\n setStatus(\"error\");\n }\n }, AUTOSAVE_MS);\n return () => clearTimeout(timer);\n }, [page, parsed.ok, onChange, origin, hasOrigin]);\n\n // The preview follows the selection: outline and scroll.\n React.useEffect(() => {\n if (selected && hasOrigin) postToPreview(frame.current?.contentWindow, origin, { source: \"krizaka-shop-composer\", type: \"scroll\", key: selected });\n }, [selected, origin, hasOrigin]);\n\n const select = (key: string) => {\n setSelected(key);\n setStep(\"section\");\n };\n\n const addSection = (type: SectionType) => {\n const def = SECTION_DEFINITIONS.find((d) => d.type === type)!;\n const preferred = presets.find((p) => p.id === page.preset.id)?.variants[type];\n const variant = preferred && (def.variants as readonly string[]).includes(preferred) ? preferred : undefined;\n const key = newKey(\"s\");\n const at = type === \"hero\" ? 0 : page.sections.length;\n exec({ type: \"addSection\", sectionType: type, key, variant, at });\n setAdding(false);\n setSelected(key);\n setFocusRequest({ key });\n announce(fill(m.announceAdded, { name: m.sectionNames[type], n: at + 1 }));\n };\n\n // Undo and redo hand the form a document it did not write: what it said was invalid is no longer true.\n const step_ = (direction: \"undo\" | \"redo\") => {\n dispatch({ type: direction });\n setInvalid(new Set());\n announce(direction === \"undo\" ? m.announceUndone : m.announceRedone);\n };\n\n const onKeyDown = (e: React.KeyboardEvent) => {\n if (!(e.metaKey || e.ctrlKey) || e.key.toLowerCase() !== \"z\") return;\n const el = e.target as HTMLElement;\n if (el.closest(\"input, textarea, select, [contenteditable=true]\")) return;\n e.preventDefault();\n step_(e.shiftKey ? \"redo\" : \"undo\");\n };\n\n const changes: DiffEntry[] = publishing ? diffPages(baseline, page) : [];\n const nameOfKey = (key: string) => {\n const i = page.sections.findIndex((s) => s.key === key);\n if (i >= 0) return sectionLabel(page.sections, i, m);\n const was = baseline.sections.findIndex((s) => s.key === key);\n return was >= 0 ? sectionLabel(baseline.sections, was, m) : key;\n };\n const problems = [\n ...[...invalid].filter((key) => page.sections.some((s) => s.key === key)).map((key) => ({ key, text: fill(m.problemIn, { name: nameOfKey(key) }) })),\n ...(!parsed.ok ? parsed.issues.map((i) => ({ key: i.path, text: `${i.path}: ${i.message}` })) : []),\n ];\n const describe = (d: DiffEntry): string => {\n const name = \"key\" in d ? nameOfKey(d.key) : \"\";\n const t = m.diff[d.kind];\n switch (d.kind) {\n case \"moved\": return fill(t, { name, from: d.from + 1, to: d.to + 1 });\n case \"variant\": return fill(t, { name, from: m.variantNames[`${d.type}.${d.from}`] ?? d.from, to: m.variantNames[`${d.type}.${d.to}`] ?? d.to });\n case \"preset\": return fill(t, { from: presets.find((p) => p.id === d.from)?.name ?? d.from, to: presets.find((p) => p.id === d.to)?.name ?? d.to });\n case \"density\": return fill(t, { from: d.from ?? \"—\", to: d.to ?? \"—\" });\n default: return fill(t, { name });\n }\n };\n\n let status_ = \"\";\n if (status === \"saving\") status_ = m.saving;\n else if (status === \"saved\") status_ = m.saved;\n else if (status === \"error\") status_ = m.saveFailed;\n\n return (\n <div className={cn(\"kz-composer flex min-h-0 flex-col gap-3\", className)} onKeyDown={onKeyDown} data-step={step}>\n <header className=\"flex flex-wrap items-center gap-2 border-b border-border-subtle pb-2\">\n <h2 className=\"m-0 me-auto text-base font-semibold text-fg\">{m.title}</h2>\n <span role=\"status\" aria-live=\"polite\" className=\"text-xs text-fg-secondary\">{status_}</span>\n <Button variant=\"ghost\" size=\"sm\" disabled={!canUndo(history)} onClick={() => step_(\"undo\")} aria-keyshortcuts=\"Control+Z Meta+Z\">{m.undo}</Button>\n <Button variant=\"ghost\" size=\"sm\" disabled={!canRedo(history)} onClick={() => step_(\"redo\")} aria-keyshortcuts=\"Control+Shift+Z Meta+Shift+Z\">{m.redo}</Button>\n {onDiscard && <Button variant=\"ghost\" size=\"sm\" onClick={onDiscard}>{m.discard}</Button>}\n <Button variant=\"secondary\" size=\"sm\" className=\"lg:hidden\" onClick={() => setPreviewOpen(true)}>{m.viewPreview}</Button>\n <Button variant=\"primary\" size=\"sm\" onClick={() => setPublishing(true)}>{m.publish}</Button>\n </header>\n {/* One polite live region says every move, add, remove, undo. */}\n <p role=\"status\" aria-live=\"polite\" className=\"sr-only\">{live}</p>\n\n <div className=\"grid min-h-0 flex-1 gap-4 lg:grid-cols-[18rem_minmax(0,1fr)_24rem]\">\n <aside aria-label={m.sections} className={cn(\"flex min-h-0 flex-col gap-4 overflow-y-auto\", step === \"section\" && \"hidden lg:flex\")}>\n <Outline sections={page.sections} selected={selected} onSelect={select} run={exec} messages={m} announce={announce} onAdd={() => setAdding(true)} focusRequest={focusRequest} />\n <details className=\"rounded-lg border border-border-default p-3\" open>\n <summary className=\"min-h-9 cursor-pointer text-sm font-semibold text-fg\">{m.look}</summary>\n <div className=\"mt-2 grid gap-3\">\n {looks.length > 0 && <LookPicker looks={looks} page={page} messages={m} run={exec} announce={announce} />}\n {styles.length > 0 && <label className=\"grid gap-1 text-xs font-semibold text-fg-secondary\">\n {m.preset}\n <select\n className=\"min-h-10 rounded-md border border-border-control bg-surface-1 px-2 text-sm font-normal text-fg\"\n value={page.preset.id}\n onChange={(e) => {\n const p = presets.find((x) => x.id === e.target.value);\n if (p) exec({ type: \"setPreset\", preset: { id: p.id, version: p.version }, density: null });\n }}\n >\n {styles.map((p) => <option key={p.id} value={p.id}>{p.name}</option>)}\n </select>\n </label>}\n <RadioGroup.Root label={m.density} variant=\"segmented\" value={page.density ?? presets.find((p) => p.id === page.preset.id)?.density ?? \"compact\"} onValueChange={(d) => exec({ type: \"setDensity\", density: d as \"compact\" | \"airy\" })}>\n <RadioGroup.Segment value=\"compact\">{m.densityCompact}</RadioGroup.Segment>\n <RadioGroup.Segment value=\"airy\">{m.densityAiry}</RadioGroup.Segment>\n </RadioGroup.Root>\n </div>\n </details>\n </aside>\n\n <section aria-label={m.preview} className=\"hidden min-h-0 flex-col gap-2 lg:flex\">\n <RadioGroup.Root label={m.preview} variant=\"segmented\" value={device} onValueChange={(d) => setDevice(d as \"phone\" | \"desktop\")} className=\"self-start\">\n <RadioGroup.Segment value=\"desktop\">{m.desktop}</RadioGroup.Segment>\n <RadioGroup.Segment value=\"phone\">{m.phone}</RadioGroup.Segment>\n </RadioGroup.Root>\n <PreviewFrame src={previewUrl} title={m.previewTitle} phone={device === \"phone\"} frame={frame} />\n </section>\n\n <aside aria-label={m.inspector} className={cn(\"flex min-h-0 flex-col gap-4 overflow-y-auto\", step === \"list\" && \"hidden lg:flex\")}>\n <Button variant=\"ghost\" size=\"sm\" className=\"self-start lg:hidden\" onClick={() => setStep(\"list\")}>← {m.backToSections}</Button>\n {selectedSection ? (\n <Inspector\n section={selectedSection}\n name={sectionLabel(page.sections, selectedIndex, m)}\n messages={m}\n run={exec}\n epoch={epoch}\n announce={announce}\n onInvalid={(key, bad) =>\n setInvalid((prev) => {\n const next = new Set(prev);\n if (bad) {\n next.add(key);\n } else {\n next.delete(key);\n }\n return next.size === prev.size && next.has(key) === prev.has(key) ? prev : next;\n })\n }\n preset={page.preset.id}\n density={page.density}\n />\n ) : (\n <p className=\"m-0 text-sm text-fg-secondary\">{m.noSelection}</p>\n )}\n </aside>\n </div>\n\n <Dialog.Root open={adding} onOpenChange={setAdding}>\n <Dialog.Content closeLabel={m.cancel}>\n <Dialog.Header>\n <Dialog.Title>{m.addSection}</Dialog.Title>\n <Dialog.Description>{m.addSectionHint}</Dialog.Description>\n </Dialog.Header>\n <Dialog.Body>\n {[\n { key: \"open\", group: SECTION_DEFINITIONS.filter((d) => !foldedTypes.includes(d.type)) },\n { key: \"folded\", group: SECTION_DEFINITIONS.filter((d) => foldedTypes.includes(d.type)) },\n ].map(({ key: groupKey, group }) => {\n const list = (\n <ul className=\"m-0 grid list-none gap-1 p-0\">\n {group.map((d) => (\n <li key={d.type}>\n <Button variant=\"ghost\" className=\"w-full justify-start\" disabled={d.type === \"hero\" && page.sections.some((s) => s.type === \"hero\")} onClick={() => addSection(d.type)}>\n {m.sectionNames[d.type]}\n </Button>\n </li>\n ))}\n </ul>\n );\n if (group.length === 0) return null;\n if (groupKey === \"open\") return <React.Fragment key={groupKey}>{list}</React.Fragment>;\n return <details key={groupKey} className=\"mt-3\"><summary className=\"min-h-9 cursor-pointer text-sm text-fg-secondary\">…</summary>{list}</details>;\n })}\n </Dialog.Body>\n </Dialog.Content>\n </Dialog.Root>\n\n <Dialog.Root open={publishing} onOpenChange={setPublishing}>\n <Dialog.Content closeLabel={m.cancel}>\n <Dialog.Header>\n <Dialog.Title>{m.publishTitle}</Dialog.Title>\n <Dialog.Description>{m.publishWhat}</Dialog.Description>\n </Dialog.Header>\n <Dialog.Body>\n {problems.length > 0 && (\n <div role=\"alert\" className=\"mb-3 rounded-md border border-border-control bg-surface-2 p-3\">\n <p className=\"m-0 text-sm font-semibold text-fg\">{fill(m.problemsTitle, { n: problems.length })}</p>\n <ul className=\"m-0 mt-1 list-disc ps-5 text-sm text-fg-secondary\">{problems.map((p) => <li key={p.key}>{p.text}</li>)}</ul>\n </div>\n )}\n {changes.length === 0 ? (\n <p className=\"m-0 text-sm text-fg-secondary\">{m.publishNothing}</p>\n ) : (\n <ul className=\"m-0 list-disc ps-5 text-sm text-fg\">{changes.map((d) => <li key={\"key\" in d ? `${d.kind}:${d.key}` : d.kind}>{describe(d)}</li>)}</ul>\n )}\n </Dialog.Body>\n <Dialog.Footer>\n <Dialog.Close asChild><Button variant=\"ghost\">{m.cancel}</Button></Dialog.Close>\n <Button variant=\"primary\" disabled={problems.length > 0 || !parsed.ok} onClick={async () => { await onPublish(page); setBaseline(page); setPublishing(false); }}>{m.publishConfirm}</Button>\n </Dialog.Footer>\n </Dialog.Content>\n </Dialog.Root>\n\n <Dialog.Root open={previewOpen} onOpenChange={setPreviewOpen}>\n <Dialog.Content closeLabel={m.closePreview} size=\"lg\">\n <Dialog.Header><Dialog.Title>{m.preview}</Dialog.Title></Dialog.Header>\n <Dialog.Body className=\"p-0\">\n {previewOpen && <PreviewFrame src={previewUrl} title={m.previewTitle} phone frame={frame} />}\n </Dialog.Body>\n </Dialog.Content>\n </Dialog.Root>\n </div>\n );\n}\n","import { type ClassValue, clsx } from \"clsx\";\nimport { cnMerge, type TWMergeConfig } from \"tailwind-variants\";\n\nexport type { ClassValue };\n\n/**\n * The preset's own utilities, told to the merge engine: the material (BRAND.md §6: `bg-sheen`, `bg-fill-shade`,\n * `bg-halo` are background images; `shadow-raised` · `-floating` · `-overlay` · `-glow` are shadows; `inset-shadow-edge`\n * · `-edge-fill` · `-well` are inset shadows). Unknown, tailwind-merge would take `bg-sheen` for a colour and drop the\n * `bg-surface-2` it lies on.\n */\nexport const twMergeConfig: TWMergeConfig = {\n extend: {\n classGroups: {\n \"bg-image\": [\"bg-sheen\", \"bg-fill-shade\", \"bg-halo\"],\n shadow: [\"shadow-raised\", \"shadow-floating\", \"shadow-overlay\", \"shadow-glow\", \"shadow-glow-lg\"],\n \"inset-shadow\": [\"inset-shadow-edge\", \"inset-shadow-edge-fill\", \"inset-shadow-well\"],\n },\n },\n};\n\nconst mergeConfig = { twMergeConfig };\n\n/**\n * Merges Tailwind classes: the last one wins — a product's `className` overrides the primitive's. The merge engine is\n * tailwind-merge as tailwind-variants ships it (the one `tv` uses), so the platform carries a single copy of it.\n * tailwind-variants bundles that engine since 3.3 (it never imports the `tailwind-merge` package, an optional peer):\n * hence `tailwind-variants ^3.3.1` and no `tailwind-merge` dependency — `scripts/consumer.mjs` checks it on a clean\n * install of the packed package.\n */\nexport function cn(...inputs: ClassValue[]): string {\n return cnMerge(clsx(inputs))(mergeConfig) ?? \"\";\n}\n\n","// The preview bridge (ADR-007 §5): the composer shows the product's real public page in an iframe of its own route\n// (`?draft=<id>`) and talks to it by `postMessage` — three messages only, every one origin-checked on both sides: `select` (outline\n// a section), `scroll` (bring it into view), `refresh` (the draft changed: reload the data). Nothing else crosses: no document, no\n// script, no style. Both halves are here, tiny and free of React, because the page side must not import the composer.\n\n/** The only messages: the composer to the page. */\nexport type PreviewMessage = { source: \"krizaka-shop-composer\"; type: \"select\" | \"scroll\"; key: string } | { source: \"krizaka-shop-composer\"; type: \"refresh\" };\n\nconst SOURCE = \"krizaka-shop-composer\";\nconst KEY = /^[A-Za-z0-9_-]{1,40}$/;\n\n/** Reads a message event: only if it comes from `origin`, is one of the three messages and carries a well-formed key. */\nexport function readPreviewMessage(event: Pick<MessageEvent, \"origin\" | \"data\">, origin: string): PreviewMessage | null {\n if (event.origin !== origin) return null;\n const d = event.data as Record<string, unknown> | null;\n if (typeof d !== \"object\" || d?.source !== SOURCE) return null;\n if (d.type === \"refresh\") return { source: SOURCE, type: \"refresh\" };\n if ((d.type === \"select\" || d.type === \"scroll\") && typeof d.key === \"string\" && KEY.test(d.key)) return { source: SOURCE, type: d.type, key: d.key };\n return null;\n}\n\n/** The composer's side: posts to the preview's window, addressed to its origin only. */\nexport function postToPreview(target: Pick<Window, \"postMessage\"> | null | undefined, origin: string, message: PreviewMessage): void {\n target?.postMessage(message, origin);\n}\n\n/** The attribute that names a section in the preview page: `<div data-shop-key=\"s_8f2c\">` (a block: the outline is its ring). */\nexport const SHOP_KEY_ATTRIBUTE = \"data-shop-key\";\n\n/**\n * The page's side: outlines the selected section (`data-shop-selected`, drawn by `blocks.css`), scrolls it into view, and calls\n * `onRefresh` when the draft changed. Returns the function that removes it. Only runs in an iframe of the composer's origin.\n */\nexport function connectShopPreview({ composerOrigin, onRefresh, root = document }: { composerOrigin: string; onRefresh?: () => void; root?: Document }): () => void {\n const find = (key: string) => root.querySelector<HTMLElement>(`[${SHOP_KEY_ATTRIBUTE}=\"${key}\"]`);\n const handler = (event: MessageEvent) => {\n // The origin first, before anything else is read from the message.\n if (event.origin !== composerOrigin) return;\n const m = readPreviewMessage(event, composerOrigin);\n if (!m) return;\n if (m.type === \"refresh\") {\n onRefresh?.();\n return;\n }\n for (const selected of root.querySelectorAll<HTMLElement>(\"[data-shop-selected]\")) delete selected.dataset.shopSelected;\n const el = find(m.key);\n if (!el) return;\n el.dataset.shopSelected = \"\";\n if (m.type === \"scroll\") {\n const reduced = typeof matchMedia === \"function\" && matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n el.scrollIntoView({ block: \"center\", behavior: reduced ? \"auto\" : \"smooth\" });\n }\n };\n window.addEventListener(\"message\", handler);\n return () => window.removeEventListener(\"message\", handler);\n}\n","// The document a shop page is (ADR-007 §1): an ordered list of sections, each a `type` × `variant` with its settings and\n// its blocks. Parsed on write (a route refuses an invalid one, with the path) and on read. The storage is the product's.\nimport * as z from \"zod/mini\";\n\nimport { SECTION_DEFINITIONS, type SectionType } from \"./catalogue\";\nimport { SHOP_LIMITS } from \"./limits\";\n\n/** The version of the document's format; migrations are pure functions schema n → n + 1 (`migrate.ts`). */\n// @fixed: ADR-007 §1 — the format version of the code, bumped with a migration; not a shop setting.\nexport const SHOP_SCHEMA_VERSION = 1;\n\n/** A look preset by id and version (`@krizaka/tokens`): `salon-atelier`. The mode is the visitor's, never stored. */\nexport const presetRef = z.object({\n id: z.string().check(z.regex(/^[a-z]+-[a-z]+$/, \"a preset id (trade-name)\")),\n version: z.int().check(z.minimum(1)),\n});\n\nconst sectionUnion = z.discriminatedUnion(\n \"type\",\n SECTION_DEFINITIONS.map((d) => d.schema) as unknown as [z.ZodMiniObject, ...z.ZodMiniObject[]],\n);\n\nexport const shopPageSchema = z\n .object({\n schema: z.literal(SHOP_SCHEMA_VERSION),\n preset: presetRef,\n /** Overrides the preset's density. */\n density: z.optional(z.enum([\"compact\", \"airy\"])),\n /** One of the accents the look lists as tested (`krizaka`, `folioviv:accent-2`…): the owner's choice within the look. */\n accent: z.optional(z.string().check(z.regex(/^[a-z]+(:accent-2)?$/, \"an accent of the look\"))),\n sections: z.array(sectionUnion).check(z.minLength(1), z.maxLength(SHOP_LIMITS.sections)),\n })\n .check(\n z.superRefine((page, ctx) => {\n const add = (path: (string | number)[], message: string) => ctx.issues.push({ code: \"custom\", message, path, input: page });\n const seen = new Set<string>();\n page.sections.forEach((section, i) => {\n const s = section as { key: string; type: string };\n if (seen.has(s.key)) add([\"sections\", i, \"key\"], `the key \"${s.key}\" is used twice`);\n seen.add(s.key);\n if (s.type === \"hero\" && i !== 0) add([\"sections\", i, \"type\"], \"the hero is the first section, and there is only one\");\n });\n }),\n );\n\n/** A section of any type, as parsed: its `settings` and `blocks` are the type's own. */\nexport type Section = z.output<(typeof SECTION_DEFINITIONS)[number][\"schema\"]>;\nexport type ShopPage = {\n schema: typeof SHOP_SCHEMA_VERSION;\n preset: z.output<typeof presetRef>;\n density?: \"compact\" | \"airy\";\n accent?: string;\n sections: Section[];\n};\nexport type SectionOf<T extends SectionType> = Extract<Section, { type: T }>;\n\nexport type ShopPageIssue = { path: string; message: string };\nexport type ShopPageResult = { ok: true; page: ShopPage } | { ok: false; issues: ShopPageIssue[] };\n\n/** Validates a document; an invalid one answers every issue with its path (`sections.2.variant`), for a 422. */\nexport function parseShopPage(input: unknown): ShopPageResult {\n const result = shopPageSchema.safeParse(input);\n if (result.success) return { ok: true, page: result.data as unknown as ShopPage };\n return { ok: false, issues: result.error.issues.map((i) => ({ path: i.path.join(\".\"), message: i.message })) };\n}\n","// What « Publish » shows (ADR-007 §5): the sections added, removed, moved, whose variant, settings or visibility changed, and the\n// look that changed — a list of facts read from two documents, never a guess.\nimport type { Section, ShopPage } from \"../shop/schema\";\n\nexport type DiffEntry =\n | { kind: \"added\" | \"removed\"; key: string; type: string; position: number }\n | { kind: \"moved\"; key: string; type: string; from: number; to: number }\n | { kind: \"variant\"; key: string; type: string; from: string; to: string }\n | { kind: \"settings\" | \"blocks\" | \"text\"; key: string; type: string }\n | { kind: \"disabled\" | \"enabled\"; key: string; type: string }\n | { kind: \"preset\"; from: string; to: string }\n | { kind: \"density\"; from: string | undefined; to: string | undefined };\n\nconst same = (a: unknown, b: unknown) => JSON.stringify(a) === JSON.stringify(b);\n\n/** The differences between the published document and the draft, in the draft's reading order. */\nexport function diffPages(before: ShopPage, after: ShopPage): DiffEntry[] {\n const out: DiffEntry[] = [];\n const was = new Map(before.sections.map((s, i) => [s.key, { s, i }]));\n const is = new Set(after.sections.map((s) => s.key));\n // « moved » is relative: removing a section above must not mark every section under it as moved.\n const kept = before.sections.filter((s) => is.has(s.key)).map((s) => s.key);\n const order = after.sections.filter((s) => was.has(s.key)).map((s) => s.key);\n after.sections.forEach((s: Section, i) => {\n const old = was.get(s.key);\n if (!old) {\n out.push({ kind: \"added\", key: s.key, type: s.type, position: i });\n return;\n }\n if (kept.indexOf(s.key) !== order.indexOf(s.key)) out.push({ kind: \"moved\", key: s.key, type: s.type, from: old.i, to: i });\n if (old.s.variant !== s.variant) out.push({ kind: \"variant\", key: s.key, type: s.type, from: old.s.variant, to: s.variant });\n if (!same(old.s.settings, s.settings)) out.push({ kind: \"settings\", key: s.key, type: s.type });\n if (!same(old.s.blocks, s.blocks)) out.push({ kind: \"blocks\", key: s.key, type: s.type });\n if (!same(old.s.text, s.text)) out.push({ kind: \"text\", key: s.key, type: s.type });\n if (Boolean(old.s.disabled) !== Boolean(s.disabled)) out.push({ kind: s.disabled ? \"disabled\" : \"enabled\", key: s.key, type: s.type });\n });\n for (const [key, { s, i }] of was) if (!is.has(key)) out.push({ kind: \"removed\", key, type: s.type, position: i });\n if (before.preset.id !== after.preset.id || before.preset.version !== after.preset.version) out.push({ kind: \"preset\", from: before.preset.id, to: after.preset.id });\n if (before.density !== after.density) out.push({ kind: \"density\", from: before.density, to: after.density });\n return out;\n}\n","// Undo / redo (ADR-007 §5): the document before and after every command, 100 steps. Documents are immutable and share their\n// untouched sections, so keeping a hundred of them costs a few kilobytes. A command that changes nothing is not a step; a new\n// command forgets what was undone.\nimport type { ShopPage } from \"../shop/schema\";\nimport { applyCommand, type Command } from \"./commands\";\n\n/** The most steps kept. */\n// @fixed: ADR-007 §5 — the composer's undo depth, a product decision of the editor, not a shop setting.\nexport const HISTORY_LIMIT = 100;\n\nexport type History = { readonly past: readonly ShopPage[]; readonly present: ShopPage; readonly future: readonly ShopPage[]; /** The key of the burst the last step belongs to (typing in one field). */ readonly merge?: string };\n\nexport const createHistory = (page: ShopPage): History => ({ past: [], present: page, future: [] });\n\n/**\n * Runs a command: a new step, unless it changes nothing. Commands with the same `merge` key in a row (the keystrokes of one field)\n * make one step, so a hundred letters do not use the hundred steps of undo.\n */\nexport function run(history: History, cmd: Command, merge?: string): History {\n const next = applyCommand(history.present, cmd);\n if (next === history.present) return history;\n if (merge && history.merge === merge && history.past.length > 0) return { ...history, present: next, future: [] };\n return { past: [...history.past, history.present].slice(-HISTORY_LIMIT), present: next, future: [], merge };\n}\n\nexport const canUndo = (h: History) => h.past.length > 0;\nexport const canRedo = (h: History) => h.future.length > 0;\n\nexport function undo(h: History): History {\n const previous = h.past.at(-1);\n if (!previous) return h;\n return { past: h.past.slice(0, -1), present: previous, future: [h.present, ...h.future] };\n}\n\nexport function redo(h: History): History {\n const [next, ...rest] = h.future;\n if (!next) return h;\n return { past: [...h.past, h.present], present: next, future: rest };\n}\n\n/** Replaces the document without a step (a reload from the server, a discarded draft). */\nexport const reset = (page: ShopPage): History => createHistory(page);\n","\"use client\";\n\n// The inspector (ADR-007 §5): for the selected section, the variant as a radio group of live thumbnails, the settings as a form\n// generated from the zod schema of its type, the owner's own words (title and line, in each language), and the blocks as a\n// sortable list (Move up / Move down, no drag needed). The look of the whole page is the first tab's concern: see `LookPanel`.\nimport { Button } from \"@krizaka/ui/button\";\nimport { RadioGroup } from \"@krizaka/ui/radio-group\";\nimport * as React from \"react\";\n\nimport { sectionDefinition } from \"../shop/catalogue\";\nimport type { Section } from \"../shop/schema\";\nimport type { Command } from \"./commands\";\nimport { newKey } from \"./keys\";\nimport { fill, type ShopComposerMessages } from \"./messages\";\nimport { SettingsForm } from \"./settings-form\";\nimport { SectionThumbnail } from \"./thumbnails\";\n\nexport type InspectorProps = {\n section: Section;\n name: string;\n messages: ShopComposerMessages;\n run: (cmd: Command, merge?: string) => void;\n /** Bumped when the document changes from outside the form (undo, redo): the settings form remounts. */\n epoch: number;\n announce: (message: string) => void;\n onInvalid: (key: string, invalid: boolean) => void;\n /** The page's look, so a thumbnail wears it. */\n preset?: string;\n density?: \"compact\" | \"airy\";\n};\n\nfunction Words({ section, m, run }: Pick<InspectorProps, \"section\" | \"run\"> & { m: ShopComposerMessages }) {\n const id = React.useId();\n const text = section.text ?? {};\n const field = (name: \"title\" | \"lead\", label: string) => (\n <fieldset className=\"m-0 grid gap-1.5 border-0 p-0\">\n <legend className=\"mb-1 text-xs font-semibold text-fg-secondary\">{label}</legend>\n {([\"fr\", \"en\"] as const).map((lang) => (\n <div key={lang} className=\"flex flex-col gap-1\">\n <label htmlFor={`${id}-${name}-${lang}`} className=\"text-xs text-fg-secondary\">{lang === \"fr\" ? m.french : m.english}</label>\n <input\n id={`${id}-${name}-${lang}`}\n className=\"min-h-10 rounded-md border border-border-control bg-surface-1 px-3 text-sm text-fg focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring\"\n maxLength={600}\n value={text[name]?.[lang] ?? \"\"}\n onChange={(e) => {\n const next = { ...(text[name] ?? {}), [lang]: e.target.value || undefined };\n const empty = !next.fr && !next.en;\n run({ type: \"setText\", key: section.key, field: name, value: empty ? undefined : next }, `text:${section.key}:${name}:${lang}`);\n }}\n />\n </div>\n ))}\n </fieldset>\n );\n return (\n <section aria-label={m.words} className=\"grid gap-3\">\n <h3 className=\"m-0 text-sm font-semibold text-fg\">{m.words}</h3>\n {field(\"title\", m.titleField)}\n {field(\"lead\", m.leadField)}\n </section>\n );\n}\n\nfunction Blocks({ section, m, run, announce }: Pick<InspectorProps, \"section\" | \"run\" | \"announce\"> & { m: ShopComposerMessages }) {\n const def = sectionDefinition(section.type);\n const blocks = ((section.blocks ?? []) as { key: string; type: string }[]);\n if (def.blockTypes.length === 0) return null;\n const label = (b: { type: string }, i: number) => `${m.blockNames[b.type] ?? b.type} ${i + 1}`;\n const move = (i: number, to: number) => {\n const b = blocks[i]!;\n if (to < 0 || to >= blocks.length) return;\n run({ type: \"moveBlock\", key: section.key, blockKey: b.key, to });\n announce(fill(m.announceMoved, { name: label(b, i), n: to + 1, total: blocks.length }));\n };\n return (\n <section aria-label={m.blocks} className=\"grid gap-2\">\n <h3 className=\"m-0 text-sm font-semibold text-fg\">{m.blocks}</h3>\n {blocks.length > 0 && (\n <ol className=\"m-0 grid list-none gap-1 p-0\">\n {blocks.map((b, i) => (\n <li key={b.key} className=\"flex items-center gap-1 rounded-md border border-border-default bg-surface-1 ps-3\">\n <span className=\"min-w-0 flex-1 truncate text-sm text-fg\">{label(b, i)}</span>\n <Button size=\"sm\" variant=\"ghost\" disabled={i === 0} aria-label={`${m.moveUp}: ${label(b, i)}`} onClick={() => move(i, i - 1)}>↑</Button>\n <Button size=\"sm\" variant=\"ghost\" disabled={i === blocks.length - 1} aria-label={`${m.moveDown}: ${label(b, i)}`} onClick={() => move(i, i + 1)}>↓</Button>\n <Button size=\"sm\" variant=\"ghost\" aria-label={fill(m.removeBlock, { name: label(b, i) })} onClick={() => run({ type: \"removeBlock\", key: section.key, blockKey: b.key })}>×</Button>\n </li>\n ))}\n </ol>\n )}\n <div className=\"flex flex-wrap gap-2\">\n {def.blockTypes.map((type) => (\n <Button key={type} size=\"sm\" variant=\"outline\" onClick={() => run({ type: \"addBlock\", key: section.key, blockKey: newKey(\"b\"), blockType: type, settings: defaultBlockSettings(type) })}>\n {m.addBlock} · {m.blockNames[type] ?? type}\n </Button>\n ))}\n </div>\n </section>\n );\n}\n\n/** The first settings of a new block: what its schema needs to be valid (a product then fills the references). */\nfunction defaultBlockSettings(type: string): Record<string, unknown> {\n switch (type) {\n case \"fact\": return { kind: \"open-now\" };\n case \"note\": return { text: \"…\" };\n case \"flyer\": return { text: \"…\" };\n case \"photo\": return { mediaId: \"\" };\n case \"service\": return { serviceId: \"\" };\n case \"member\": return { memberId: \"\" };\n case \"reel\": return { platform: \"tiktok\", url: \"https://\" };\n case \"link\": return { platform: \"instagram\", url: \"https://\" };\n case \"question\": return { question: {}, answer: {} };\n default: return {};\n }\n}\n\nexport function Inspector({ section, name, messages: m, run, epoch, announce, onInvalid, preset, density }: Readonly<InspectorProps>) {\n const def = sectionDefinition(section.type);\n const label = React.useId();\n return (\n <div className=\"flex min-w-0 flex-col gap-6\">\n <section aria-labelledby={label} className=\"grid gap-2\">\n <h3 id={label} className=\"m-0 text-sm font-semibold text-fg\">{m.variant}</h3>\n {/* The thumbnail is a section: it holds links and buttons, so it sits beside the radio, never inside it. */}\n <RadioGroup.Root label={`${name}: ${m.variant}`} value={section.variant} onValueChange={(variant) => run({ type: \"setVariant\", key: section.key, variant })} className=\"grid grid-cols-1 gap-2 sm:grid-cols-2\">\n {def.variants.map((variant) => (\n <div\n key={variant}\n role=\"presentation\"\n data-checked={section.variant === variant ? \"\" : undefined}\n onClick={() => run({ type: \"setVariant\", key: section.key, variant })}\n className=\"grid cursor-pointer gap-2 rounded-lg border border-border-default bg-surface-1 p-2 data-[checked]:border-accent data-[checked]:bg-accent-soft\"\n >\n <SectionThumbnail type={section.type} variant={variant} preset={preset} density={density} />\n <RadioGroup.Item value={variant}>{m.variantNames[`${section.type}.${variant}`] ?? variant}</RadioGroup.Item>\n </div>\n ))}\n </RadioGroup.Root>\n </section>\n <SettingsForm\n key={`${section.key}:${epoch}`}\n section={section}\n messages={m}\n onValid={(settings) => run({ type: \"patchSettings\", key: section.key, patch: settings }, `settings:${section.key}`)}\n onInvalid={(invalid) => onInvalid(section.key, invalid)}\n />\n <Blocks section={section} m={m} run={run} announce={announce} />\n <Words section={section} m={m} run={run} />\n </div>\n );\n}\n","// Stable keys (ADR-007 §1): « s_8f2c » for a section, « b_3a91 » for a block — generated once, they survive every reorder and\n// anchor the audit. Generated by the composer, never by the reducer (which stays pure).\nconst alphabet = \"0123456789abcdef\";\n\n/** A short random key with a prefix; `random` is injectable so a test is deterministic. */\nexport function newKey(prefix: \"s\" | \"b\", random: () => number = Math.random): string {\n let out = \"\";\n for (let i = 0; i < 6; i++) out += alphabet[Math.floor(random() * 16)];\n return `${prefix}_${out}`;\n}\n","// The composer's words (ADR-007 §5): every string is a prop — the product passes its translated copy. English is the default, so\n// a story or a first integration works without a catalogue; `{name}`, `{n}`, `{total}` are replaced by `fill`.\nimport type { SectionType } from \"../shop/catalogue\";\nimport type { DiffEntry } from \"./diff\";\n\nexport type ShopComposerMessages = {\n title: string;\n /** The outline's name. */\n sections: string;\n addSection: string;\n addSectionHint: string;\n /** « Show {name} » / the switch's accessible name. */\n toggleVisible: string;\n sectionMenu: string;\n moveUp: string;\n moveDown: string;\n moveTop: string;\n remove: string;\n /** Announcements. */\n announceMoved: string;\n announceCannotMove: string;\n announceAdded: string;\n announceRemoved: string;\n announceShown: string;\n announceHidden: string;\n announceUndone: string;\n announceRedone: string;\n hiddenNote: string;\n /** The inspector. */\n inspector: string;\n noSelection: string;\n backToSections: string;\n variant: string;\n settings: string;\n words: string;\n titleField: string;\n leadField: string;\n french: string;\n english: string;\n blocks: string;\n addBlock: string;\n removeBlock: string;\n /** The look. */\n look: string;\n /** The six looks, as a group of swatches. */\n lookChoice: string;\n /** Said when a look is applied (`{name}`). */\n lookApplied: string;\n /** The accent within the chosen look. */\n accentChoice: string;\n /** The names of the accents a look lists (`krizaka`, `folioviv:accent-2`…); an unknown one reads as its id. */\n accentNames: Readonly<Record<string, string>>;\n preset: string;\n density: string;\n densityCompact: string;\n densityAiry: string;\n /** The toolbar. */\n undo: string;\n redo: string;\n saved: string;\n saving: string;\n saveFailed: string;\n publish: string;\n discard: string;\n /** The preview. */\n preview: string;\n previewTitle: string;\n phone: string;\n desktop: string;\n viewPreview: string;\n closePreview: string;\n /** The publish dialog. */\n publishTitle: string;\n publishWhat: string;\n publishNothing: string;\n publishConfirm: string;\n cancel: string;\n problemsTitle: string;\n problemIn: string;\n /** The names. */\n sectionNames: Record<SectionType, string>;\n /** `type.variant` → « Poster ». */\n variantNames: Record<string, string>;\n blockNames: Record<string, string>;\n settingNames: Record<string, string>;\n optionNames: Record<string, string>;\n /** One line per kind of change, with `{name}` (the section) and `{from}` / `{to}` / `{n}`. */\n diff: Record<DiffEntry[\"kind\"], string>;\n};\n\n/** `fill(\"Moved to {n}\", { n: 2 })`. */\nexport const fill = (message: string, vars: Record<string, string | number>) => message.replace(/\\{(\\w+)\\}/g, (_, k: string) => String(vars[k] ?? `{${k}}`));\n\nconst sectionNames: Record<SectionType, string> = {\n hero: \"Hero\", services: \"Services\", booking: \"Booking\", gallery: \"Photos\", video: \"Video\", reviews: \"Reviews\", bulletin: \"News\",\n team: \"Team\", visit: \"Visit\", story: \"Story\", social: \"Social\", faq: \"Questions\", policies: \"Policies\",\n};\n\nconst variantNames: Record<string, string> = {\n \"hero.poster\": \"Poster\", \"hero.split\": \"Split\", \"hero.banner\": \"Banner\", \"hero.tv\": \"Television\",\n \"services.menu\": \"Menu\", \"services.cards\": \"Cards\", \"services.index\": \"Index cards\", \"services.carousel\": \"Carousel\",\n \"booking.strip\": \"Next times\", \"booking.panel\": \"Closing call\", \"booking.sticky\": \"Phone bar\",\n \"gallery.mosaic\": \"Mosaic\", \"gallery.filmstrip\": \"Filmstrip\", \"gallery.wall\": \"Wall\", \"gallery.grid\": \"Grid\",\n \"video.tv\": \"Television\", \"video.shorts\": \"Reels\",\n \"reviews.summary-cards\": \"Score and reviews\", \"reviews.quote\": \"One quote\", \"reviews.strip\": \"Score line\",\n \"bulletin.board\": \"Board\", \"bulletin.banner\": \"Banner line\",\n \"team.row\": \"Row\", \"team.cards\": \"Cards\",\n \"visit.card\": \"Card\", \"visit.map\": \"Map\", \"visit.split\": \"Hours and map\",\n \"story.quote\": \"Quote\", \"story.owner\": \"Owner\",\n \"social.links\": \"Links\", \"social.facade\": \"Latest reel\",\n \"faq.list\": \"List\", \"policies.inline\": \"Inline\",\n};\n\nexport const defaultShopComposerMessages: ShopComposerMessages = {\n title: \"Shop page\",\n sections: \"Sections\",\n addSection: \"Add a section\",\n addSectionHint: \"Choose what to add to your page.\",\n toggleVisible: \"Show {name}\",\n sectionMenu: \"Actions for {name}\",\n moveUp: \"Move up\",\n moveDown: \"Move down\",\n moveTop: \"Move to top\",\n remove: \"Remove\",\n announceMoved: \"{name} moved to position {n} of {total}\",\n announceCannotMove: \"{name} cannot move further\",\n announceAdded: \"{name} added at position {n}\",\n announceRemoved: \"{name} removed\",\n announceShown: \"{name} is shown\",\n announceHidden: \"{name} is hidden\",\n announceUndone: \"Undone\",\n announceRedone: \"Redone\",\n hiddenNote: \"hidden\",\n inspector: \"Section\",\n noSelection: \"Choose a section to change how it is drawn.\",\n backToSections: \"Back to sections\",\n variant: \"How it is drawn\",\n settings: \"Settings\",\n words: \"Your words\",\n titleField: \"Title\",\n leadField: \"Line under the title\",\n french: \"French\",\n english: \"English\",\n blocks: \"Items\",\n addBlock: \"Add\",\n removeBlock: \"Remove {name}\",\n look: \"Look\",\n lookChoice: \"Look of the page\",\n lookApplied: \"Look: {name}\",\n accentChoice: \"Accent\",\n accentNames: { krizaka: \"Krizaka blue\", folioviv: \"Folioviv green\", \"folioviv:accent-2\": \"Copper\", verikora: \"Indigo\", sovkora: \"Orange\" },\n preset: \"Style\",\n density: \"Spacing\",\n densityCompact: \"Compact\",\n densityAiry: \"Airy\",\n undo: \"Undo\",\n redo: \"Redo\",\n saved: \"Saved\",\n saving: \"Saving…\",\n saveFailed: \"Not saved\",\n publish: \"Publish\",\n discard: \"Discard the draft\",\n preview: \"Preview\",\n previewTitle: \"Live preview of your page\",\n phone: \"Phone\",\n desktop: \"Desktop\",\n viewPreview: \"View\",\n closePreview: \"Close\",\n publishTitle: \"Publish this page\",\n publishWhat: \"What changes\",\n publishNothing: \"Nothing has changed since the last publication.\",\n publishConfirm: \"Publish\",\n cancel: \"Cancel\",\n problemsTitle: \"Fix {n} problem before publishing\",\n problemIn: \"{name}\",\n sectionNames,\n variantNames,\n blockNames: { fact: \"Fact\", service: \"Service\", photo: \"Photo\", note: \"Note\", sign: \"Sign\", reel: \"Reel\", flyer: \"Flyer\", member: \"Member\", link: \"Link\", question: \"Question\" },\n settingNames: { media: \"Photo\", focus: \"Crop\", source: \"Source\", groupBy: \"Group by\", columns: \"Columns\", aside: \"Beside the list\", serviceId: \"Service\", count: \"How many\", texture: \"Wall\", cabinet: \"Cabinet\", channel: \"Channel\", rule: \"Which reviews\", showPhone: \"Show the phone number\", body: \"Text\", show: \"Show\" },\n optionNames: { center: \"Centre\", top: \"Top\", bottom: \"Bottom\", all: \"All\", pick: \"Pick\", category: \"Category\", none: \"None\", hours: \"Hours\", plaster: \"Plaster\", brick: \"Brick\", ridge: \"Ridge\", zellige: \"Zellige\", cabinet: \"Cabinet\", portable: \"Portable\", best: \"Best\", latest: \"Latest\", cancellation: \"Cancellation\", prices: \"Prices\", \"booking-window\": \"Booking window\" },\n diff: {\n added: \"{name} added\",\n removed: \"{name} removed\",\n moved: \"{name} moved from {from} to {to}\",\n variant: \"{name} drawn as {to} (was {from})\",\n settings: \"{name}: settings changed\",\n blocks: \"{name}: items changed\",\n text: \"{name}: words changed\",\n disabled: \"{name} hidden\",\n enabled: \"{name} shown\",\n preset: \"Style changed to {to} (was {from})\",\n density: \"Spacing changed to {to} (was {from})\",\n },\n};\n","\"use client\";\n\n// The settings of a section, as a form generated from the zod schema of its type (ADR-007 §5): the form is `@krizaka/ui/form`\n// (TanStack Form behind the facade), the fields are the ones the schema describes (`fields.ts`). Every valid change is committed to\n// the document at once (so undo and the preview follow); an invalid value is said next to its field, stays in the field, and is\n// reported to the composer, which refuses to publish until it is fixed.\nimport { createKrizakaForm, FormField, Switch, TextArea, TextField, useFormContext } from \"@krizaka/ui/form\";\nimport { RadioGroup } from \"@krizaka/ui/radio-group\";\nimport * as React from \"react\";\n\nimport { type SectionDefinition, sectionDefinition } from \"../shop/catalogue\";\nimport type { Section } from \"../shop/schema\";\nimport { describeSettings, type FieldSpec } from \"./fields\";\nimport type { ShopComposerMessages } from \"./messages\";\n\ntype Factory = ReturnType<typeof createKrizakaForm>;\n// One form per section type, defined once (schema + defaults), as the facade asks.\nconst factories = new Map<string, Factory>();\nfunction factoryFor(def: SectionDefinition): Factory {\n let f = factories.get(def.type);\n if (!f) {\n f = createKrizakaForm({ schema: def.settings as never, defaultValues: def.settingsDefault as never }) as unknown as Factory;\n factories.set(def.type, f);\n }\n return f;\n}\n\nconst nameOf = (m: ShopComposerMessages, key: string) => m.settingNames[key] ?? key;\nconst optionName = (m: ShopComposerMessages, o: string | number) => m.optionNames[String(o)] ?? String(o);\n\nfunction Choice({ spec, m }: Readonly<{ spec: Extract<FieldSpec, { kind: \"choice\" }>; m: ShopComposerMessages }>) {\n return (\n <FormField name={spec.name}>\n {(f) => (\n <div className=\"grid gap-1.5\">\n <span aria-hidden className=\"text-xs font-semibold text-fg-secondary\">{nameOf(m, spec.name)}</span>\n <RadioGroup.Root label={nameOf(m, spec.name)} variant=\"segmented\" value={String(f.value)} onValueChange={(v) => f.setValue(spec.options.find((o) => String(o) === v))} onBlur={f.onBlur}>\n {spec.options.map((o) => (\n <RadioGroup.Segment key={String(o)} value={String(o)}>{optionName(m, o)}</RadioGroup.Segment>\n ))}\n </RadioGroup.Root>\n </div>\n )}\n </FormField>\n );\n}\n\nfunction Multi({ spec, m }: Readonly<{ spec: Extract<FieldSpec, { kind: \"multi\" }>; m: ShopComposerMessages }>) {\n return (\n <FormField name={spec.name}>\n {(f) => {\n const value = (f.value as string[] | undefined) ?? [];\n return (\n <fieldset className=\"m-0 flex flex-col gap-1.5 border-0 p-0\">\n <legend className=\"mb-1 text-xs font-semibold text-fg-secondary\">{nameOf(m, spec.name)}</legend>\n {spec.options.map((o) => (\n <label key={o} className=\"flex min-h-9 items-center gap-2 text-sm text-fg\">\n <input\n type=\"checkbox\"\n className=\"h-4 w-4 accent-accent\"\n checked={value.includes(o)}\n onChange={(e) => f.setValue(e.target.checked ? [...value, o] : value.filter((x) => x !== o))}\n />\n {optionName(m, o)}\n </label>\n ))}\n </fieldset>\n );\n }}\n </FormField>\n );\n}\n\nfunction Field({ spec, m }: Readonly<{ spec: FieldSpec; m: ShopComposerMessages }>) {\n switch (spec.kind) {\n case \"choice\":\n return <Choice spec={spec} m={m} />;\n case \"multi\":\n return <Multi spec={spec} m={m} />;\n case \"toggle\":\n return <Switch name={spec.name} label={nameOf(m, spec.name)} />;\n case \"text\":\n return <TextField name={spec.name} label={nameOf(m, spec.name)} />;\n case \"localized\":\n return (\n <div className=\"flex flex-col gap-2\">\n <TextArea name={`${spec.name}.fr`} label={`${nameOf(m, spec.name)} — ${m.french}`} rows={3} maxLength={600} />\n <TextArea name={`${spec.name}.en`} label={`${nameOf(m, spec.name)} — ${m.english}`} rows={3} maxLength={600} />\n </div>\n );\n }\n}\n\n/** What the schema is asked: an emptied text is an absent setting (an optional id), an emptied language an absent language. */\nfunction normalise(values: unknown): unknown {\n if (Array.isArray(values)) return values;\n if (typeof values !== \"object\" || values === null) return values;\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(values)) {\n if (v === \"\") continue;\n const inner = typeof v === \"object\" && v !== null && !Array.isArray(v) ? normalise(v) : v;\n out[k] = inner;\n }\n return out;\n}\n\n/** Reports the form's values: a valid set goes to `onValid`, an invalid one to `onInvalid` (and never reaches the document). */\nfunction Commit({ def, onValid, onInvalid }: { def: SectionDefinition; onValid: (settings: Record<string, unknown>) => void; onInvalid: (invalid: boolean) => void }) {\n const { api } = useFormContext();\n const latest = React.useRef({ onValid, onInvalid });\n React.useEffect(() => {\n latest.current = { onValid, onInvalid };\n });\n React.useEffect(() => {\n const sub = (api.store as { subscribe: (cb: () => void) => unknown }).subscribe(() => {\n const result = def.settings.safeParse(normalise(api.state.values));\n latest.current.onInvalid(!result.success);\n if (result.success) latest.current.onValid(result.data as Record<string, unknown>);\n });\n return () => {\n const s = sub as { unsubscribe?: () => void } | (() => void);\n if (typeof s === \"function\") s();\n else s?.unsubscribe?.();\n };\n }, [api, def]);\n return null;\n}\n\nexport type SettingsFormProps = {\n section: Section;\n messages: ShopComposerMessages;\n /** A valid set of settings: the composer commits it. */\n onValid: (settings: Record<string, unknown>) => void;\n /** Whether the form holds a value the schema refuses (publish waits). */\n onInvalid: (invalid: boolean) => void;\n};\n\n/** The form of a section's settings: remount it (a `key`) when the document is changed from outside (undo, redo). */\nexport function SettingsForm({ section, messages: m, onValid, onInvalid }: Readonly<SettingsFormProps>) {\n const def = sectionDefinition(section.type);\n const factory = factoryFor(def);\n const form = factory.useForm({ defaultValues: section.settings as never }) as unknown as { Form: (p: { \"aria-label\": string; className?: string; children: React.ReactNode }) => React.ReactElement };\n const specs = describeSettings(def.settings);\n if (specs.length === 0) return null;\n return (\n <form.Form aria-label={m.settings} className=\"flex flex-col gap-4\">\n {specs.map((spec) => (\n <Field key={spec.name} spec={spec} m={m} />\n ))}\n <Commit def={def} onValid={onValid} onInvalid={onInvalid} />\n </form.Form>\n );\n}\n","// The settings form of a section is generated from the zod schema of its type (ADR-007 §5): one field per setting, of the kind\n// the schema says — a choice (an enum, or a few numbers), a switch (a boolean), a text (an id or a line), the owner's words in each\n// language, a set of options. The form is the one of `@krizaka/ui/form`; this reads the schema, never a copy of it.\nimport type * as z from \"zod/mini\";\n\nexport type FieldSpec =\n | { name: string; kind: \"choice\"; options: readonly (string | number)[]; optional: boolean }\n | { name: string; kind: \"toggle\"; optional: boolean }\n | { name: string; kind: \"text\"; optional: boolean }\n | { name: string; kind: \"localized\"; optional: boolean }\n | { name: string; kind: \"multi\"; options: readonly string[]; optional: boolean };\n\n// The zod 4 definition shape, read structurally: `_zod.def` is what the schema is made of.\ntype Def = { type: string; shape?: Record<string, z.ZodMiniType>; entries?: Record<string, string>; options?: z.ZodMiniType[]; values?: unknown[]; innerType?: z.ZodMiniType; element?: z.ZodMiniType };\nconst defOf = (s: z.ZodMiniType) => (s as unknown as { _zod: { def: Def } })._zod.def;\n\nfunction specOf(name: string, schema: z.ZodMiniType, optional = false): FieldSpec | undefined {\n const def = defOf(schema);\n switch (def.type) {\n case \"optional\":\n return specOf(name, def.innerType!, true);\n case \"enum\":\n return { name, kind: \"choice\", options: Object.values(def.entries!), optional };\n case \"boolean\":\n return { name, kind: \"toggle\", optional };\n case \"string\":\n return { name, kind: \"text\", optional };\n case \"union\": {\n const options = def.options!.flatMap((o) => (defOf(o).type === \"literal\" ? (defOf(o).values as (string | number)[]) : []));\n return options.length === def.options!.length ? { name, kind: \"choice\", options, optional } : undefined;\n }\n case \"object\": {\n const keys = Object.keys(def.shape!);\n return keys.every((k) => k === \"fr\" || k === \"en\") ? { name, kind: \"localized\", optional } : undefined;\n }\n case \"array\": {\n const inner = specOf(name, def.element!);\n return inner && \"options\" in inner ? { name, kind: \"multi\", options: inner.options.map(String), optional } : undefined;\n }\n default:\n return undefined;\n }\n}\n\n/** The fields of a settings schema, in the schema's order. A setting of a kind the form does not draw is left out. */\nexport function describeSettings(schema: z.ZodMiniObject): FieldSpec[] {\n const shape = defOf(schema).shape ?? {};\n return Object.entries(shape).flatMap(([name, s]) => {\n const spec = specOf(name, s);\n return spec ? [spec] : [];\n });\n}\n","// Server-safe: no hook, no context. `buttonVariants` styles a <Link> or a Server Component without the component.\nimport { Slot } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { LoaderGlyph } from \"../spinner/glyph\";\nimport { buttonRecipe } from \"./recipe\";\n\nexport const buttonVariants = tv(buttonRecipe);\n\nexport type ButtonVariants = VariantProps<typeof buttonVariants>;\n\nexport type ButtonProps = React.ComponentProps<\"button\"> &\n ButtonVariants & {\n /**\n * The look: `primary` (the accent), `gradient` (accent → accent-2), `secondary` (a raised surface), `outline`,\n * `ghost`, `danger`.\n * @default \"secondary\"\n */\n variant?: ButtonVariants[\"variant\"];\n /**\n * sm · md · lg, or `icon` (a square).\n * @default \"md\"\n */\n size?: ButtonVariants[\"size\"];\n /**\n * `rounded` (an 8 px radius, the radius of a field) · `pill`. `cut` is deprecated (krizaka-ui#393: the chamfer is\n * retired) — it draws `rounded` and warns in development; it will be removed in 4.0.\n * @default \"rounded\"\n */\n shape?: ButtonVariants[\"shape\"];\n /** Renders the child (e.g. a <Link>) instead of the <button>, with props, classes and ref merged. */\n asChild?: boolean;\n /**\n * Disables and signals the wait (aria-busy, data-loading) and shows the Krizaka loader glyph before the label; the\n * button keeps its colour.\n */\n loading?: boolean;\n /**\n * Between 0 and 1, while `loading`: the glyph's trace and a light fill across the button grow to the value (an\n * upload, an export).\n */\n progress?: number | null;\n /**\n * How the action ended: `success` draws a check, `error` a cross (and the button shakes its head once); a ring of\n * the status colour opens around it. Clear it to return to rest.\n */\n status?: \"success\" | \"error\" | null;\n /** A message announced politely by assistive technology when it changes (“Saved”, “Upload failed”) — passed translated. */\n announce?: string;\n /**\n * Shows the glyph while `loading` / with a `status`. `false`: you draw your own.\n * @default true\n */\n indicator?: boolean;\n /** @deprecated Since 3.31 (krizaka-ui#393): does nothing — the hover is quiet. Removed in 4.0. */\n shimmer?: boolean;\n /** @deprecated Since 3.31 (krizaka-ui#393): does nothing — a button never moves under the pointer. Removed in 4.0. */\n magnetic?: boolean;\n };\n\nconst STATUS_TEXT = { success: \"text-fg-success\", error: \"text-fg-danger\" } as const;\n\nlet warnedCut = false;\n/** `shape=\"cut\"` (the chamfer) is retired: one warning per page in development, never in production. */\nfunction warnCut() {\n if (warnedCut || typeof process === \"undefined\" || process.env.NODE_ENV === \"production\") return;\n warnedCut = true;\n console.warn('@krizaka/ui/button: shape=\"cut\" is deprecated (krizaka-ui#393) and now draws the default rounded shape. Remove the prop.');\n}\n\nexport function Button({\n asChild,\n loading,\n progress,\n status,\n announce,\n indicator = true,\n shimmer: _shimmer,\n magnetic: _magnetic,\n variant,\n size,\n shape,\n className,\n disabled,\n children,\n ...props\n}: ButtonProps) {\n const Comp = asChild ? Slot.Root : \"button\";\n if (shape === \"cut\") warnCut();\n const known = loading && typeof progress === \"number\" && Number.isFinite(progress);\n const ratio = known ? Math.min(1, Math.max(0, progress)) : 0;\n const glyph = indicator && !asChild && (loading || status) ? (status ?? \"loading\") : null;\n // On a filled variant the glyph stays in the label's colour; on the others it takes the status colour.\n const filled = variant === \"primary\" || variant === \"gradient\";\n const button = (\n <Comp\n type={asChild ? undefined : \"button\"}\n aria-busy={loading || undefined}\n data-loading={loading ? \"\" : undefined}\n data-variant={variant ?? \"secondary\"}\n data-kz-status={status ?? undefined}\n disabled={asChild ? undefined : disabled || loading}\n aria-disabled={asChild && (disabled || loading) ? true : undefined}\n className={buttonVariants({\n variant,\n size,\n shape,\n className: cn(known && \"relative isolate overflow-hidden\", className),\n })}\n {...props}\n >\n {asChild ? (\n children\n ) : (\n <>\n {known && (\n <span aria-hidden className=\"absolute inset-y-0 left-0 -z-10 bg-current opacity-15 transition-[width] duration-500\" style={{ width: `${ratio * 100}%` }} />\n )}\n {glyph && (\n <span\n aria-hidden\n data-slot=\"indicator\"\n className=\"-my-1 grid grid-cols-[1fr] transition-[grid-template-columns,margin,opacity] duration-300 starting:-mr-2 starting:grid-cols-[0fr] starting:opacity-0\"\n >\n <span className=\"overflow-hidden\">\n <LoaderGlyph state={glyph} value={known ? ratio : null} className={cn(\"h-4 w-4\", glyph !== \"loading\" && !filled && STATUS_TEXT[glyph])} />\n </span>\n </span>\n )}\n {children}\n </>\n )}\n </Comp>\n );\n if (announce === undefined || asChild) return button;\n return (\n <>\n {button}\n <span role=\"status\" className=\"sr-only\">\n {announce}\n </span>\n </>\n );\n}\n\nexport type IconButtonProps = Omit<ButtonProps, \"size\"> & {\n /** The accessible name (and tooltip) of the button — required, passed translated. */\n label: string;\n /**\n * sm · md · lg, or `icon` (a square).\n * @default \"icon\"\n */\n size?: ButtonProps[\"size\"];\n};\n\n/** An icon-only button: `label` is required, it is its accessible name. Loading or with a status, the glyph takes the icon's place. */\nexport function IconButton({ label, size = \"icon\", children, ...props }: IconButtonProps) {\n const swap = props.indicator !== false && !props.asChild && (props.loading || props.status);\n return (\n <Button aria-label={label} title={label} size={size} {...props}>\n {swap ? null : children}\n </Button>\n );\n}\n","// The Krizaka loader glyph, server-safe: a hexagon (the marks' shape) traced by a segment of light around a node that\n// breathes; determinate, it fills to its value; done, the trace closes and a check (or a cross) draws itself. Animated by\n// motion.css (`kz-loader-*`); still under prefers-reduced-motion — a segment at rest and the node lit, never blank.\nimport type * as React from \"react\";\n\n/** The hexagon, pointy top, radius 9 around (12, 12). */\nconst HEX = \"M12 3 19.79 7.5 19.79 16.5 12 21 4.21 16.5 4.21 7.5Z\";\n\n/** What the glyph shows: a wait (with an optional value), or how it ended. */\nexport type LoaderGlyphState = \"loading\" | \"success\" | \"error\";\n\nexport interface LoaderGlyphProps extends Omit<React.ComponentProps<\"svg\">, \"children\"> {\n /** loading · success · error. */\n state?: LoaderGlyphState;\n /** Between 0 and 1: a determinate wait, the trace grows to it. Absent: indeterminate. */\n value?: number | null;\n}\n\n/** The glyph alone (decorative): the Spinner, the Loader and the Button's `loading` draw it. */\nexport function LoaderGlyph({ state = \"loading\", value, ...props }: LoaderGlyphProps) {\n const known = typeof value === \"number\" && Number.isFinite(value);\n const fill = state !== \"loading\" ? 100 : known ? Math.round(Math.min(1, Math.max(0, value)) * 100) : null;\n return (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden data-state={state} data-progress={fill === null ? undefined : fill} {...props}>\n <path d={HEX} stroke=\"currentColor\" strokeOpacity=\"0.22\" strokeWidth=\"2.2\" strokeLinejoin=\"round\" />\n <path\n d={HEX}\n pathLength={100}\n stroke=\"currentColor\"\n strokeWidth=\"2.2\"\n strokeLinejoin=\"round\"\n strokeLinecap=\"round\"\n className=\"kz-loader-trace\"\n strokeDasharray={fill === null ? undefined : `${fill} ${100 - fill}`}\n />\n {state === \"loading\" && <circle cx=\"12\" cy=\"12\" r=\"2.6\" fill=\"currentColor\" className=\"kz-loader-node\" />}\n {state === \"success\" && <path d=\"M8.3 12.3l2.6 2.6 4.9-5.3\" pathLength={20} stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" className=\"kz-loader-mark\" />}\n {state === \"error\" && <path d=\"M9.4 9.4l5.2 5.2M14.6 9.4l-5.2 5.2\" pathLength={20} stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" className=\"kz-loader-mark\" />}\n </svg>\n );\n}\n","import type { TV } from \"tailwind-variants\";\n\n/** What a recipe is made of: the `tv()` options — `base`, `slots`, `variants`, `defaultVariants`, `compoundVariants`. */\nexport type RecipeConfig = Parameters<TV>[0];\n\n/**\n * A recipe is data: the variants of a component (a `variant`, a `size`, a `tone`…) as classes of the Krizaka tokens.\n * `defineRecipe` only keeps the literal types, so `tv(recipe)` is typed exactly as `tv({ … })` would be (the web side) and\n * `nativeRecipe(recipe)` reads the same classes into styles on the theme's roles (the native side, `./native`).\n *\n * Sizes are a variant dimension (`size: { sm: \"h-8 px-3 text-xs\" }`); states are the prefixes (`hover:`, `disabled:`,\n * `data-[state=on]:`). Write colours as roles (`bg-accent`, `text-fg-secondary`, `border-border-default`, `ring-accent/40`),\n * spacing as Tailwind units (`h-10`, `px-4`), type as `text-sm` / `text-[11px]` / `font-semibold`.\n */\nexport function defineRecipe<const C extends RecipeConfig>(config: C): C {\n return config;\n}\n","// The button's variants, written once as classes of the Krizaka tokens: the web wears them with `tv(buttonRecipe)`\n// (button.tsx), React Native reads the same classes into styles (native/button.tsx, `nativeRecipe`).\nimport { defineRecipe } from \"../recipes/define\";\n\nexport const buttonRecipe = defineRecipe({\n base:\n \"inline-flex max-w-full shrink-0 select-none items-center justify-center gap-2 whitespace-normal text-center font-semibold transition duration-150 \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-0 \" +\n \"disabled:pointer-events-none disabled:opacity-40 data-loading:cursor-progress active:scale-[0.98] \" +\n // Busy is not unavailable: a loading button keeps its colour (it is disabled only so it is not pressed twice).\n \"[&[data-loading]]:opacity-100\",\n variants: {\n variant: {\n primary: \"bg-accent text-on-accent shadow-sm hover:bg-accent-hover\",\n // The brand's signature: accent → accent-2 (on-accent reads on both stops, tested in @krizaka/tokens).\n gradient: \"bg-linear-to-r from-accent to-accent-2 text-on-accent shadow-sm hover:brightness-110\",\n secondary: \"border border-border-default bg-surface-2 text-fg hover:border-border-strong hover:bg-surface-3\",\n outline: \"border border-border-default bg-transparent text-fg hover:border-accent hover:text-fg-accent\",\n ghost: \"text-fg-secondary hover:bg-surface-2 hover:text-fg\",\n // The border and the tint carry the danger; the label stays the primary text role, legible on the tint at rest\n // and hovered over every surface (`text-fg-danger` is for text set directly on a surface).\n danger: \"border border-danger/50 bg-danger/10 text-fg hover:border-danger hover:bg-danger/20\",\n },\n size: { sm: \"h-8 px-3 text-xs\", md: \"h-10 px-4 text-sm\", lg: \"h-12 px-6 text-sm\", icon: \"h-10 w-10\" },\n // One clean shape (krizaka-ui#393): an 8 px radius (`--kz-radius-sm`, the radius of a field — a button beside an\n // input lines up with it), the pill on demand. `cut` (the retired chamfer) is a deprecated alias of `rounded`.\n shape: { rounded: \"rounded-sm\", pill: \"rounded-full\", cut: \"rounded-sm\" },\n },\n defaultVariants: { variant: \"secondary\", size: \"md\", shape: \"rounded\" },\n});\n","// 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 }: Readonly<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","// The links of the page blocks (PageHero's back link, LinkCard, ArgumentCard, ActionBar): an internal path renders\n// through the app's router link (`linkAs`, e.g. Next's `Link`), anything else is an `<a>` that opens in a new tab.\n// Shared by the block entries; never exported on its own.\nimport type * as React from \"react\";\n\n/** The app's link component (Next's `Link`, React Router's `Link`…): receives `href`, `className` and the children. */\nexport type LinkComponent = React.ElementType<{ href: string; className?: string; children?: React.ReactNode; \"aria-label\"?: string; \"aria-describedby\"?: string }>;\n\n/** An address that leaves the app: an absolute URL or a protocol (`mailto:`). */\nexport const isExternal = (href: string) => /^[a-z][a-z0-9+.-]*:/i.test(href);\n\nexport function BlockLink({\n href,\n linkAs: Link = \"a\",\n external = isExternal(href),\n rel,\n ...props\n}: Omit<React.ComponentProps<\"a\">, \"href\"> & { href: string; linkAs?: LinkComponent; external?: boolean }) {\n if (external) return <a href={href} target=\"_blank\" rel={rel ?? \"noopener noreferrer\"} {...props} />;\n const Comp = Link as React.ElementType;\n return <Comp href={href} rel={rel} {...props} />;\n}\n","// Server-safe. The frame of every page (blocks.css): one width, one pair of gutters, one vertical rhythm — so the\n// navigation, the hero and every section line up on the same edges, at any width.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { SectionBackdrop, type SectionBackdropProps } from \"../section-backdrop/section-backdrop\";\n\nexport type PageSize = \"narrow\" | \"default\" | \"wide\" | \"full\";\n\n/**\n * The paper under a page or a section (Cahier, ADR-004): `ruled` (Seyès squares), `lines` (lines only), `dot-grid` (a dot\n * every 24 px), `kraft` (brown paper with a grain: mount `PaperGrain` once), or plain.\n */\nexport type PagePaper = \"ruled\" | \"lines\" | \"dot-grid\" | \"kraft\";\n\ntype PaperProps = {\n /** The notebook's paper under the content: `ruled` (Seyès: 32 px squares, three fine lines), `lines` (lines only, a page to read), `dot-grid` (dots), `kraft` (brown, grained). */\n paper?: PagePaper;\n /** The red margin line on the left, where section numbers and notes hang (`§ 2`, `fig. 1`). */\n margin?: boolean;\n};\n\nexport type PageProps = React.HTMLAttributes<HTMLElement> & {\n /**\n * The width of the content: `default` (72rem, `--kz-page-max`), `narrow` (48rem, a reading column), `wide`\n * (88rem, documentation with a sidebar), `full` (the gutters only).\n * @default \"default\"\n */\n size?: PageSize;\n /** The element: `div` (default), `main`, `header`, `footer`, `section` or `article`. */\n as?: \"div\" | \"main\" | \"header\" | \"footer\" | \"section\" | \"article\";\n} & PaperProps;\n\n/** The page frame: centred, at most `--kz-page-max` wide, with the gutters of `--kz-page-gutter` (16 → 32 px). */\nexport function Page({ size = \"default\", as: Tag = \"div\", paper, margin, className, ...props }: PageProps) {\n return (\n <Tag\n data-size={size === \"default\" ? undefined : size}\n data-paper={paper}\n data-margin={margin ? \"\" : undefined}\n className={cn(\"kz-frame\", className)}\n {...props}\n />\n );\n}\n\nexport type SectionHeadingProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> & {\n /** The id of the title: the section's anchor and its accessible name. */\n id?: string;\n /** A short note above the title (the section's subject), in the note face, lower case — never an uppercase overline. */\n eyebrow?: React.ReactNode;\n /** The section's number, hung in the margin as a notebook numbers its pages (`§ 2`). */\n number?: React.ReactNode;\n /** The title. */\n title: React.ReactNode;\n /** One or two sentences under the title. */\n lead?: React.ReactNode;\n /** Actions on the right of the heading (a link to everything, a filter). */\n actions?: React.ReactNode;\n /**\n * The level of the title.\n * @default 2\n */\n level?: 2 | 3;\n /**\n * `md` for a section that argues, `sm` for a section of a reading page.\n * @default \"md\"\n */\n size?: \"sm\" | \"md\";\n /**\n * `center` for a heading that stands alone above a grid.\n * @default \"start\"\n */\n align?: \"start\" | \"center\";\n /** Rises into place once, as it enters the viewport (`[data-reveal]`, MotionObserver). Never on the first screen. */\n reveal?: boolean;\n};\n\n/** The head of a section: eyebrow (mono, the accent), title, lead — and its actions on the right. */\nexport function SectionHeading({ id, eyebrow, number, title, lead, actions, level = 2, size = \"md\", align = \"start\", reveal, className, ...props }: SectionHeadingProps) {\n const H = level === 2 ? \"h2\" : \"h3\";\n return (\n <div\n className={cn(\"kz-heading\", className)}\n data-size={size === \"md\" ? undefined : size}\n data-align={align === \"start\" ? undefined : align}\n data-actions={actions ? \"\" : undefined}\n data-reveal={reveal ? \"\" : undefined}\n {...props}\n >\n {number && <span className=\"kz-heading-number\">{number}</span>}\n {eyebrow && <p className=\"kz-eyebrow\">{eyebrow}</p>}\n <H id={id} className=\"kz-heading-title\">\n {title}\n </H>\n {lead && <p className=\"kz-heading-lead\">{lead}</p>}\n {actions && <div className=\"kz-heading-actions\">{actions}</div>}\n </div>\n );\n}\n\nexport type SectionProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The id of the title (and the anchor of the section). Required with a `title`. */\n id?: string;\n /** The heading's eyebrow. */\n eyebrow?: React.ReactNode;\n /** The section's number in the margin (`§ 2`). */\n number?: React.ReactNode;\n /** The section's title: an `h2` (a `SectionHeading`), which names the section for assistive technology. */\n title?: React.ReactNode;\n /** The heading's lead. */\n lead?: React.ReactNode;\n /** The heading's actions. */\n actions?: React.ReactNode;\n /**\n * The heading's size: `md` for a page that argues, `sm` for a reading page.\n * @default \"md\"\n */\n headingSize?: \"sm\" | \"md\";\n /**\n * The heading's alignment.\n * @default \"start\"\n */\n headingAlign?: \"start\" | \"center\";\n /** The heading rises into place once (never on the first screen). */\n reveal?: boolean;\n /** A hairline above the section, inside the gutters: the transition between two sections of the same surface. */\n divider?: boolean;\n /**\n * The vertical space above and below: `sm` (a reading page), `md`, `lg` (a page's main moments).\n * @default \"md\"\n */\n spacing?: \"sm\" | \"md\" | \"lg\";\n /**\n * The width of the content.\n * @default \"default\"\n */\n size?: PageSize;\n /** The brand's colour transition behind the section (SectionBackdrop): `true`, or its props (`direction`, `grid`…). */\n backdrop?: boolean | Omit<SectionBackdropProps, \"as\" | \"children\">;\n} & PaperProps;\n\n/**\n * A section of a page: full-bleed (its backdrop reaches the edges), its content in the page frame, its heading on top.\n * Sections follow each other on one rhythm; a `divider` or a `backdrop` marks the transition.\n */\nexport function Section({\n id,\n eyebrow,\n number,\n title,\n lead,\n actions,\n headingSize,\n headingAlign,\n reveal,\n divider,\n spacing = \"md\",\n size,\n backdrop,\n paper,\n margin,\n className,\n children,\n ...props\n}: SectionProps) {\n const body = (\n <Page size={size} data-margin={margin ? \"\" : undefined}>\n {title && <SectionHeading id={id} eyebrow={eyebrow} number={number} title={title} lead={lead} actions={actions} size={headingSize} align={headingAlign} reveal={reveal} />}\n {children}\n </Page>\n );\n const shared = {\n \"aria-labelledby\": title && id ? id : undefined,\n \"data-divider\": divider ? \"\" : undefined,\n \"data-spacing\": spacing === \"md\" ? undefined : spacing,\n \"data-paper\": paper,\n ...props,\n };\n if (backdrop) {\n const backdropProps = backdrop === true ? {} : backdrop;\n return (\n <SectionBackdrop {...backdropProps} {...shared} className={cn(\"kz-section\", className)}>\n {body}\n </SectionBackdrop>\n );\n }\n return (\n <section {...shared} className={cn(\"kz-section\", className)}>\n {body}\n </section>\n );\n}\n\nexport type TicksProps = {\n /** A sentence where words between backticks are code: \"Every request carries a `requestId`.\" */\n children: string;\n};\n\n/** A sentence of a message catalogue where words between backticks read as code — no markup in the translations. */\nexport function Ticks({ children }: TicksProps) {\n const parts = children.split(\"`\");\n return (\n <>\n {parts.map((part, i) =>\n i % 2 ? (\n <code key={i} className=\"kz-ic\">\n {part}\n </code>\n ) : (\n <React.Fragment key={i}>{part}</React.Fragment>\n ),\n )}\n </>\n );\n}\n\nexport interface Fact {\n /** A few words: `npm 2.5.0`, `Maven Central`, `in progress`. */\n label: string;\n /**\n * `ok` — published, usable today; `wip` — in progress, said honestly; `neutral` — a fact.\n * @default \"neutral\"\n */\n tone?: \"ok\" | \"wip\" | \"neutral\";\n /** Where the fact is proven (a registry page): the fact becomes a link. */\n href?: string;\n}\n\nexport type FactsProps = React.HTMLAttributes<HTMLUListElement> & {\n /** The facts, in reading order. */\n items: readonly Fact[];\n};\n\n/** Compact facts on one line — a dot that says the state, a few mono words. Links open in a new tab. */\nexport function Facts({ items, className, ...props }: FactsProps) {\n return (\n <ul className={cn(\"kz-facts\", className)} {...props}>\n {items.map((fact) => {\n const body = (\n <>\n <span className=\"kz-fact-dot\" aria-hidden /> {fact.label}\n </>\n );\n const tone = fact.tone && fact.tone !== \"neutral\" ? fact.tone : undefined;\n return (\n <li key={fact.label}>\n {fact.href ? (\n <a href={fact.href} target=\"_blank\" rel=\"noopener noreferrer\" className=\"kz-fact\" data-tone={tone}>\n {body}\n </a>\n ) : (\n <span className=\"kz-fact\" data-tone={tone}>\n {body}\n </span>\n )}\n </li>\n );\n })}\n </ul>\n );\n}\n","// Server-safe. The frame and the rhythm of a shop page (ADR-007 §2): every section draws inside the page frame between the\n// gutters (`bleed` for a photo only), one vertical rhythm set by the density, a hairline between sections. No section sets\n// its own margin: it only says what it holds.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { Page, SectionHeading } from \"../page/page\";\n\n/** A photo the product resolved: the address, its words, and the widths it has (`srcSet`). */\nexport type ShopPhoto = {\n src: string;\n /** What it shows, in words; empty when it only sets a mood. */\n alt: string;\n /** The widths the product holds (`/a-480.avif 480w, /a-960.avif 960w`); the section brings the `sizes`. */\n srcSet?: string;\n};\n\nexport type ShopFrameProps = React.HTMLAttributes<HTMLDivElement> & {\n /** The look preset (`salon-vitrine`, `@krizaka/tokens`): its tokens apply to everything inside. */\n preset?: string;\n /**\n * The rhythm: `compact` 40 px between sections (24 on a phone), `airy` 64 px (40). The document's, or the preset's.\n * @default \"compact\"\n */\n density?: \"compact\" | \"airy\";\n /**\n * One of the accents the preset lists as tested (`krizaka`, `folioviv:accent-2`…): the owner's choice within the look. Without it, the preset's own.\n * @see @krizaka/tokens `shopPresets`\n */\n accent?: string;\n /**\n * The paper under the page, from the preset: `seyes` (ruled), `kraft` (brown — mount `PaperGrain` once), `washi` (a tint of the accent) or `plain`.\n * @default \"plain\"\n */\n paper?: \"plain\" | \"seyes\" | \"kraft\" | \"washi\";\n /**\n * The look's motion mode, CSS only (`still` · `soft` · `paper` · `lively`): the arrival of blocks and the settling of photos. Under `prefers-reduced-motion` every mode is still.\n * @see @krizaka/tokens `shopPresets`\n */\n motion?: \"still\" | \"soft\" | \"paper\" | \"lively\";\n};\n\nconst PAPERS = { plain: undefined, seyes: \"ruled\", kraft: \"kraft\", washi: \"washi\" } as const;\n\n/** The page: sets the look preset, the accent, the paper and the density the sections below read. */\nexport function ShopFrame({ preset, density = \"compact\", accent, paper = \"plain\", motion, className, ...props }: ShopFrameProps) {\n return <div data-shop-preset={preset} data-shop-accent={accent} data-paper={PAPERS[paper]} data-density={density} data-shop-motion={motion} className={cn(\"kz-shop\", className)} {...props} />;\n}\n\nexport type ShopSectionProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The section's id: the anchor, and the heading's id. */\n id?: string;\n /** The `h2`. Without one the section is named by `aria-label`. */\n title?: React.ReactNode;\n /** A short lower-case note above the title. */\n eyebrow?: React.ReactNode;\n /** One sentence under the title. */\n lead?: React.ReactNode;\n /** A link or a button on the right of the heading (« All times → »). */\n actions?: React.ReactNode;\n /** The content reaches the edges of the screen (a photo, a strip); the heading stays on the frame. */\n bleed?: boolean;\n /** The section is the page's first (the hero): no hairline, no padding. */\n first?: boolean;\n /** A bird of the Krizaka look (`mascotFor`, `ShopMascot` of `@krizaka/ui/shop/look`), decorative, in the corner of the heading. Never on the first screen. */\n mascot?: React.ReactNode;\n};\n\n/** A section of a shop page. */\nexport function ShopSection({ id, title, eyebrow, lead, actions, bleed, first, mascot, className, children, ...props }: ShopSectionProps) {\n const auto = React.useId();\n const headingId = title ? `${id ?? auto}-title` : undefined;\n const heading = title ? <SectionHeading id={headingId} size=\"sm\" eyebrow={eyebrow} title={title} lead={lead} actions={actions} /> : null;\n return (\n <section id={id} aria-labelledby={headingId} data-first={first ? \"\" : undefined} data-bleed={bleed ? \"\" : undefined} className={cn(\"kz-shop-section\", className)} {...props}>\n {mascot ? <div aria-hidden className=\"kz-shop-mascot\">{mascot}</div> : null}\n {bleed ? (\n <>\n {heading && <Page>{heading}</Page>}\n {children}\n </>\n ) : (\n <Page>\n {heading}\n {children}\n </Page>\n )}\n </section>\n );\n}\n","// Server-safe. A photo in a box of one fixed ratio (CLS 0): the box is the ratio, the image fills it (ADR-007 §6).\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport type { ShopPhoto } from \"./frame\";\n\nconst RATIOS = {\n \"1/1\": \"aspect-square\",\n \"4/5\": \"aspect-[4/5]\",\n \"3/4\": \"aspect-[3/4]\",\n \"4/3\": \"aspect-[4/3]\",\n \"3/2\": \"aspect-[3/2]\",\n \"16/9\": \"aspect-video\",\n \"21/9\": \"aspect-[21/9]\",\n} as const;\nexport type ShopRatio = keyof typeof RATIOS;\n\nexport type PhotoProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n photo: ShopPhoto;\n ratio: ShopRatio;\n /** The `sizes` of the image for this variant (ADR-007 §6). */\n sizes?: string;\n /** The first screen's image: high priority, never lazy. */\n priority?: boolean;\n};\n\n/** A photo in a fixed-ratio box; the look preset's grade and radius apply (`data-shop-photo`). */\nexport function Photo({ photo, ratio, sizes, priority, className, ...props }: PhotoProps) {\n return (\n <div data-shop-photo=\"\" data-ratio={ratio} className={cn(\"relative w-full overflow-hidden bg-media\", RATIOS[ratio], className)} {...props}>\n <img\n src={photo.src}\n srcSet={photo.srcSet}\n sizes={photo.srcSet ? sizes : undefined}\n alt={photo.alt}\n loading={priority ? undefined : \"lazy\"}\n fetchPriority={priority ? \"high\" : undefined}\n decoding=\"async\"\n className=\"absolute inset-0 h-full w-full object-cover\"\n />\n </div>\n );\n}\n","// Server-safe (the pinned notes are the wall's, a client island imported through its own entry). The owner's news\n// (ADR-007 §3): `board` — up to three pinned notes, newest first, each taken down after its last day; `banner` — one line of\n// text above the hero (never an image: the first screen's LCP stays the hero's). The clock is the host's: `today` arrives as a\n// day, the section never reads the time.\nimport { PinnedNote } from \"@krizaka/ui/wall\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../cn\";\nimport { ShopSection } from \"../frame\";\nimport { SHOP_LIMITS } from \"../limits\";\n\nexport type BulletinVariant = \"board\" | \"banner\";\n\nexport type ShopFlyer = {\n id: string;\n /** At most 140 characters. */\n text: string;\n signature?: string;\n /** The last day it is shown (`2026-11-03`, inclusive); absent: until the owner takes it down. */\n until?: string;\n};\n\nexport type BulletinSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** @default \"board\" */\n variant?: BulletinVariant;\n /** The flyers, newest first. */\n flyers: readonly ShopFlyer[];\n /** Today, in the shop's time zone (`2026-10-27`). */\n today: string;\n /** `board`: the section's title (`News`). `banner`: its accessible name. */\n title: string;\n};\n\n/** The flyers still up on a given day, newest first, at most three. */\nexport function liveFlyers(flyers: readonly ShopFlyer[], today: string): ShopFlyer[] {\n return flyers.filter((f) => !f.until || f.until >= today).slice(0, SHOP_LIMITS.flyers);\n}\n\n/** The owner's news: pinned notes, or one line above the hero. */\nexport function BulletinSection({ variant = \"board\", flyers, today, title, className, ...props }: BulletinSectionProps) {\n const live = liveFlyers(flyers, today);\n if (live.length === 0) return null;\n if (variant === \"banner\") {\n return (\n <aside aria-label={title} data-variant=\"banner\" className={cn(\"border-b border-border-subtle bg-accent-soft\", className)}>\n <p className=\"m-0 mx-auto max-w-6xl px-4 py-2 text-center text-[13px] font-medium text-fg\">{live[0]!.text}</p>\n </aside>\n );\n }\n return (\n <ShopSection title={title} className={className} data-variant=\"board\" {...props}>\n <ul className=\"m-0 grid list-none gap-4 p-0 sm:grid-cols-2 lg:grid-cols-3\">\n {live.map((f, i) => (\n <li key={f.id}>\n <PinnedNote text={f.text} signature={f.signature} rotation={[-1.2, 1, -0.6][i % 3]} hold={i % 2 === 0 ? \"tape\" : \"pin\"} lines={3} />\n </li>\n ))}\n </ul>\n </ShopSection>\n );\n}\n","// Demo photos of the two fictional shops (ADR-007 §6, ADR-006 §8: demo data only). Generated locally, no face, no text, no\n// logo, in the style of the Krizaka banners; hosted on the CDN under `ui/shop/demo/` (hashed, immutable). Each is used at most\n// once on a page: the salon has ten, the dog walker eight.\nexport const DEMO_PHOTOS = {\n \"pets-ball\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/pets-ball.e03f1ae74d.webp\",\n \"pets-canal\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/pets-canal.4ea735fad7.webp\",\n \"pets-cover\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/pets-cover.9f06b05e7d.webp\",\n \"pets-door\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/pets-door.099a4143b4.webp\",\n \"pets-leash\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/pets-leash.fbdb08ddad.webp\",\n \"pets-leaves\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/pets-leaves.e7ce7dd035.webp\",\n \"pets-snow\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/pets-snow.894afd7929.webp\",\n \"pets-stairs\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/pets-stairs.c218522480.webp\",\n \"salon-basin\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/salon-basin.64dd59cac7.webp\",\n \"salon-brushes\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/salon-brushes.235eebb9a1.webp\",\n \"salon-chair\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/salon-chair.4cdd76afdf.webp\",\n \"salon-colour\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/salon-colour.00c62a6aac.webp\",\n \"salon-cover\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/salon-cover.218332751d.webp\",\n \"salon-mirror\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/salon-mirror.9c2858ccd2.webp\",\n \"salon-shelf\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/salon-shelf.d215d866d2.webp\",\n \"salon-station\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/salon-station.91abe38059.webp\",\n \"salon-tools\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/salon-tools.8ff845df44.webp\",\n \"salon-towels\": \"https://krizaka-assets.b-cdn.net/ui/shop/demo/salon-towels.8a49746a6b.webp\",\n} as const;\nexport type DemoPhoto = keyof typeof DEMO_PHOTOS;\n","// Server-safe, data only. Two fictional shops — a salon and a dog walker — resolved the way a product resolves them (ADR-007\n// §6): the services with their OWN photo or none, photos that appear once, the next free times. Used by the examples, the\n// stories, the catalogue tests and the composer's thumbnails. Never a real shop, price or person.\nimport type { ShopPhoto } from \"../frame\";\nimport type { ShopGalleryPhoto } from \"../gallery/gallery\";\nimport type { ShopService } from \"../services/services\";\nimport { DEMO_PHOTOS, type DemoPhoto } from \"./media\";\n\nexport { DEMO_PHOTOS, type DemoPhoto } from \"./media\";\n\n/** A demo photo with its words. */\nexport const demoPhoto = (name: DemoPhoto, alt: string): ShopPhoto => ({ src: DEMO_PHOTOS[name], alt });\n\nexport type DemoShop = {\n id: \"salon\" | \"pets\";\n name: string;\n eyebrow: string;\n promise: string;\n /** The preset the shop wears. */\n preset: string;\n cover: ShopPhoto & { phone?: string };\n services: ShopService[];\n /** The gallery: none of them is a cover or a service's photo. */\n photos: ShopGalleryPhoto[];\n times: { id: string; label: string; href: string }[];\n hours: { id: string; label: string; hours: string }[];\n status: { open: boolean; label: string; detail: string };\n team: { id: string; name: string }[];\n address: string;\n phone: string;\n};\n\nconst week = (hours: string, closed = \"Closed\") =>\n [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"].map((label, i) => ({ id: String(i + 1), label, hours: i === 6 ? closed : hours }));\n\nexport const demoSalon: DemoShop = {\n id: \"salon\",\n name: \"Salon Cèdre & Ciseaux\",\n eyebrow: \"Saint-Henri · Montréal\",\n promise: \"A neighbourhood salon on Notre-Dame West: cuts, colour and beard care, with the person of your choice.\",\n preset: \"salon-vitrine\",\n cover: demoPhoto(\"salon-cover\", \"The salon's window on a winter evening, warm light on the brick street\"),\n services: [\n { id: \"short\", name: \"Short cut\", price: \"$45\", duration: \"30 min\", description: \"Scissor or clipper, razor finish\", category: \"cuts\", href: \"#book-short\" },\n { id: \"blow\", name: \"Cut and blow-dry\", price: \"$75\", duration: \"1 h\", description: \"A tailored cut, a blow-dry that lasts\", category: \"cuts\", popular: true, photo: demoPhoto(\"salon-chair\", \"The leather chair by the window\"), href: \"#book-blow\" },\n { id: \"beard\", name: \"Beard trim\", price: \"$25\", duration: \"20 min\", description: \"Edges and a hot towel\", category: \"beard\", photo: demoPhoto(\"salon-towels\", \"Rolled warm towels on a shelf\"), href: \"#book-beard\" },\n { id: \"colour\", name: \"Full colour\", price: \"$160\", priceFrom: \"from\", duration: \"2 h 30\", description: \"Price confirmed at the consultation\", category: \"colour\", photo: demoPhoto(\"salon-colour\", \"Two copper bowls of colour on marble\"), href: \"#book-colour\" },\n { id: \"balayage\", name: \"Balayage\", price: \"$220\", priceFrom: \"from\", duration: \"3 h\", description: \"Gradual lightening, natural result\", category: \"colour\", photo: demoPhoto(\"salon-shelf\", \"Amber bottles on the window shelf\"), href: \"#book-balayage\" },\n ],\n photos: [\n { id: \"mirror\", photo: demoPhoto(\"salon-mirror\", \"A round mirror with fairy lights on a brick wall\") },\n { id: \"basin\", photo: demoPhoto(\"salon-basin\", \"A basin under a pendant lamp\") },\n { id: \"brushes\", photo: demoPhoto(\"salon-brushes\", \"Brushes and a dryer on a wooden counter\") },\n { id: \"station\", photo: demoPhoto(\"salon-station\", \"A styling station facing the rainy street\") },\n { id: \"tools\", photo: demoPhoto(\"salon-tools\", \"Scissors and a comb under a brass lamp\") },\n ],\n times: [\n { id: \"t1\", label: \"Today 4:30 pm\", href: \"#t1\" },\n { id: \"t2\", label: \"Today 6:00 pm\", href: \"#t2\" },\n { id: \"t3\", label: \"Tue 9:00 am\", href: \"#t3\" },\n { id: \"t4\", label: \"Tue 10:30 am\", href: \"#t4\" },\n ],\n hours: week(\"9 am – 8 pm\"),\n status: { open: true, label: \"Open now\", detail: \"until 8 pm\" },\n team: [{ id: \"e\", name: \"Éric\" }, { id: \"k\", name: \"Karim\" }, { id: \"j\", name: \"Jade\" }, { id: \"c\", name: \"Camille\" }],\n address: \"2400 Notre-Dame St W\",\n phone: \"514-555-0110\",\n};\n\nexport const demoPets: DemoShop = {\n id: \"pets\",\n name: \"Pattes de Saint-Henri\",\n eyebrow: \"Saint-Henri · Montréal\",\n promise: \"Neighbourhood dog walks along the canal, with a photo and a note after each one.\",\n preset: \"pets-canal\",\n cover: demoPhoto(\"pets-cover\", \"A golden dog facing the Lachine canal at sunset\"),\n services: [\n { id: \"walk30\", name: \"Quick walk\", price: \"$22\", duration: \"30 min\", capacity: \"1 dog\", description: \"A loop of the block and a drink of water\", category: \"walks\", href: \"#book-walk30\" },\n { id: \"walk60\", name: \"Canal walk\", price: \"$35\", duration: \"1 h\", capacity: \"Up to 2 dogs\", description: \"The canal path, a photo and a note\", category: \"walks\", popular: true, photo: demoPhoto(\"pets-leash\", \"Leashes hanging by a red-brick doorway\"), href: \"#book-walk60\" },\n { id: \"pack\", name: \"Pack adventure\", price: \"$48\", duration: \"2 h\", capacity: \"Up to 5 dogs\", description: \"The Mont-Royal trails, small friendly group\", category: \"walks\", href: \"#book-pack\" },\n { id: \"visit\", name: \"Home visit\", price: \"$18\", duration: \"20 min\", capacity: \"1 pet\", description: \"Food, water, a cuddle and a report\", category: \"care\", photo: demoPhoto(\"pets-door\", \"A terrier waiting at a red door\"), href: \"#book-visit\" },\n ],\n photos: [\n { id: \"ball\", photo: demoPhoto(\"pets-ball\", \"A dog leaping for a ball in the autumn park\") },\n { id: \"canal\", photo: demoPhoto(\"pets-canal\", \"Two dogs resting on the grass by the canal\") },\n { id: \"leaves\", photo: demoPhoto(\"pets-leaves\", \"A small dog running through fallen leaves\") },\n { id: \"snow\", photo: demoPhoto(\"pets-snow\", \"A dog in a red coat on a snowy street at night\") },\n { id: \"stairs\", photo: demoPhoto(\"pets-stairs\", \"A dog sitting on an outdoor staircase\") },\n ],\n times: [\n { id: \"t1\", label: \"Today 5:00 pm\", href: \"#t1\" },\n { id: \"t2\", label: \"Tomorrow 8:00 am\", href: \"#t2\" },\n { id: \"t3\", label: \"Tomorrow 12:30 pm\", href: \"#t3\" },\n ],\n hours: week(\"7 am – 7 pm\", \"By request\"),\n status: { open: true, label: \"Open now\", detail: \"until 7 pm\" },\n team: [{ id: \"m\", name: \"Maude\" }, { id: \"s\", name: \"Samuel\" }],\n address: \"Saint-Henri, Montréal\",\n phone: \"514-555-0142\",\n};\n\n// The rest of the demo salon's page (U2): what clients say, its news, its questions, its rules, its story, its reels, its map.\nexport const demoReviews = {\n summary: {\n score: 4.7,\n count: 38,\n distribution: [0, 1, 2, 7, 28] as [number, number, number, number, number],\n scoreText: \"4.7 / 5\",\n countText: \"38 verified reviews\",\n summaryText: \"4.7 out of 5 from 38 verified reviews\",\n starText: (stars: number, count: number) => `${stars} stars: ${count} reviews`,\n },\n reviews: [\n { id: \"r1\", author: \"Nadia F.\", date: \"October 2026\", dateTime: \"2026-10\", service: \"Cut and blow-dry\", rating: 5, ratingText: \"5 out of 5\", text: \"The best blow-dry in the neighbourhood, simply. Booked in two taps.\" },\n { id: \"r2\", author: \"Léo P.\", date: \"October 2026\", dateTime: \"2026-10\", service: \"Balayage\", rating: 5, ratingText: \"5 out of 5\", text: \"Jade listened, never pushed. The price was the one announced.\" },\n { id: \"r3\", author: \"Camille L.\", date: \"September 2026\", dateTime: \"2026-09\", service: \"Beard trim\", rating: 4, ratingText: \"4 out of 5\", text: \"Quick, precise, and the hot towel is a treat.\" },\n ],\n};\n\nexport const demoReel = { id: \"reel\", platform: \"tiktok\" as const, url: \"https://www.tiktok.com/@salon.cedre/video/7123456789012345678\", title: \"The salon's latest reel\" };\n\nexport const demoFlyers = [\n { id: \"f1\", text: \"New: hot-towel beard care, every day this week.\", signature: \"Jade\", until: \"2026-11-10\" },\n { id: \"f2\", text: \"Closed Monday November 3 — back Tuesday at 9.\", signature: \"Éric\", until: \"2026-11-03\" },\n { id: \"f3\", text: \"Gift cards at the counter, any amount.\", signature: \"Camille\" },\n];\n\nexport const demoFaq = [\n { id: \"q1\", question: \"Do I need to book?\", answer: \"Booking is the surest way to have the person you want. We also take walk-ins when a chair is free.\" },\n { id: \"q2\", question: \"Can I cancel?\", answer: \"Free up to 24 hours before. After that the first half of the service is kept.\" },\n { id: \"q3\", question: \"Do you do kids' cuts?\", answer: \"Yes, from age 4, with Éric on Saturday mornings.\" },\n];\n\nexport const demoPolicies = [\n { id: \"p1\", term: \"Cancellation\", details: \"Free up to 24 hours before\" },\n { id: \"p2\", term: \"Prices\", details: \"Before taxes; colour is confirmed at the consultation\" },\n { id: \"p3\", term: \"Booking window\", details: \"Up to 60 days ahead\" },\n];\n\nexport const demoStory = {\n quote: \"Cuts that last, and advice that is honest.\",\n body: \"Three friends opened the salon in 2019 on the corner where the old bakery stood. We kept the brick, the big windows and the habit of asking before cutting.\",\n owner: { name: \"Jade\" },\n};\n\nexport const demoMap = { label: \"Where the salon is\", center: [-73.5859, 45.4789] as [number, number], zoom: 15, showLabel: \"Show the map\", places: [{ position: [-73.5859, 45.4789] as [number, number], label: \"Salon Cèdre & Ciseaux\" }] };\n","// 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","// Server-safe (the wall and the grid are client islands imported through their own entries). The photos of a shop\n// (ADR-007 §3): `mosaic` (one 4:5 lead and four squares), `filmstrip` (3:4, a snap strip), `wall` (polaroids, notes and the\n// sign on a textured wall) and `grid` (today's media gallery). A photo appears once: the product's resolver hands each id at\n// most once, and a section that runs out shows fewer tiles — never a repeat.\nimport { MediaGallery } from \"@krizaka/ui/media-gallery\";\nimport { Wall, type WallItem } from \"@krizaka/ui/wall\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../cn\";\nimport type { ShopPhoto } from \"../frame\";\nimport { ShopSection } from \"../frame\";\nimport { SHOP_LIMITS } from \"../limits\";\nimport { Photo } from \"../photo\";\n\nexport type GalleryVariant = \"mosaic\" | \"filmstrip\" | \"wall\" | \"grid\";\n\nexport type ShopGalleryPhoto = {\n id: string;\n photo: ShopPhoto;\n caption?: string;\n /** `grid`: a muted loop over the still. */\n video?: { webm?: string; mp4?: string };\n};\n\nexport type ShopGalleryNote = { id: string; text: string; signature?: string };\n\nexport type GallerySectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** @default \"mosaic\" */\n variant?: GalleryVariant;\n /** The shop's own photos, in order, already unique. */\n photos: readonly ShopGalleryPhoto[];\n title: React.ReactNode;\n lead?: React.ReactNode;\n /** The gallery's accessible name (`Photos of the salon`). */\n label: string;\n /** `wall`: short notes pinned between the photos. */\n notes?: readonly ShopGalleryNote[];\n /** `wall`: the shop's name on its sign. */\n sign?: string;\n /** `wall`: the wall's texture. @default \"plaster\" */\n texture?: \"plaster\" | \"brick\" | \"ridge\" | \"zellige\";\n};\n\n/** A deterministic scatter: the same photos always hang the same way (no random, so no hydration mismatch). */\nexport function wallLayout(count: number): { x: number; y: number; rotation: number }[] {\n const perRow = Math.min(5, Math.max(1, Math.ceil(count / 2)));\n return Array.from({ length: count }, (_, i) => {\n const row = Math.floor(i / perRow);\n const col = i % perRow;\n const inRow = Math.min(perRow, count - row * perRow);\n const x = inRow === 1 ? 50 : (col / (inRow - 1)) * 100;\n let y = 92 - (col % 2) * 6;\n if (row === 0) y = count <= perRow ? 50 : 8 + (col % 2) * 6;\n return { x, y, rotation: [-2.2, 1.6, -1.2, 2.4, -1.8][(i * 3 + 1) % 5]! };\n });\n}\n\nfunction Mosaic({ photos }: Readonly<{ photos: readonly ShopGalleryPhoto[] }>) {\n const [lead, ...rest] = photos;\n if (!lead) return null;\n return (\n <ul className=\"m-0 grid list-none grid-cols-2 gap-2 p-0 sm:grid-cols-[1.6fr_1fr_1fr] sm:gap-3\">\n <li className=\"col-span-2 aspect-[16/11] sm:col-span-1 sm:row-span-2 sm:aspect-auto\">\n <Photo photo={lead.photo} ratio=\"4/5\" sizes=\"(min-width: 40rem) 36rem, 100vw\" className=\"h-full min-h-0 sm:aspect-auto\" />\n </li>\n {rest.slice(0, 4).map((p) => (\n <li key={p.id}>\n <Photo photo={p.photo} ratio=\"1/1\" sizes=\"(min-width: 40rem) 18rem, 50vw\" />\n </li>\n ))}\n </ul>\n );\n}\n\nfunction Filmstrip({ photos, label }: Readonly<{ photos: readonly ShopGalleryPhoto[]; label: string }>) {\n return (\n <div role=\"group\" aria-label={label} tabIndex={0} className=\"-mx-4 overflow-x-auto px-4 pb-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring sm:mx-0 sm:px-0\">\n <ul className=\"m-0 flex w-max snap-x snap-mandatory list-none gap-3 p-0\">\n {photos.map((p) => (\n <li key={p.id} className=\"w-[42vw] max-w-64 shrink-0 snap-start sm:w-64\">\n <Photo photo={p.photo} ratio=\"3/4\" sizes=\"(min-width: 40rem) 16rem, 42vw\" />\n </li>\n ))}\n </ul>\n </div>\n );\n}\n\nfunction ShopWall({ photos, notes, sign, texture, label }: Readonly<{ photos: readonly ShopGalleryPhoto[]; notes: readonly ShopGalleryNote[]; sign?: string; texture: NonNullable<GallerySectionProps[\"texture\"]>; label: string }>) {\n const pieces = [\n ...(sign ? [{ id: \"sign\", kind: \"sign\" as const, children: sign, variant: \"neon\" as const }] : []),\n ...photos.slice(0, SHOP_LIMITS.photos).map((p) => ({\n id: p.id,\n kind: \"polaroid\" as const,\n img: <img src={p.photo.src} srcSet={p.photo.srcSet} sizes=\"220px\" alt={p.photo.alt} loading=\"lazy\" decoding=\"async\" className=\"absolute inset-0 h-full w-full object-cover\" />,\n caption: p.caption,\n })),\n ...notes.map((n) => ({ id: n.id, kind: \"note\" as const, text: n.text, signature: n.signature })),\n ];\n const layout = wallLayout(pieces.length);\n const items = pieces.map((piece, i) => ({ ...piece, ...layout[i]!, z: i })) as WallItem[];\n return <Wall aria-label={label} items={items} texture={texture} itemWidth={220} max={SHOP_LIMITS.photos + 2} />;\n}\n\n/** The photos of a shop: a mosaic, a filmstrip, a wall or a grid. */\nexport function GallerySection({ variant = \"mosaic\", photos, title, lead, label, notes = [], sign, texture = \"plaster\", className, ...props }: GallerySectionProps) {\n const shown = photos.slice(0, SHOP_LIMITS.photos);\n const bodies: Record<GalleryVariant, React.ReactNode> = {\n mosaic: <Mosaic photos={shown} />,\n filmstrip: <Filmstrip photos={shown} label={label} />,\n wall: <ShopWall photos={shown} notes={notes} sign={sign} texture={texture} label={label} />,\n grid: (\n <MediaGallery\n label={label}\n items={shown.map((p) => ({ id: p.id, src: p.photo.src, alt: p.photo.alt, caption: p.caption, video: p.video, shape: \"wide\" as const }))}\n />\n ),\n };\n const body = bodies[variant];\n return (\n <ShopSection title={title} lead={lead} className={cn(className)} data-variant={variant} {...props}>\n {body}\n </ShopSection>\n );\n}\n","// Server-safe (the poster's cover and the TV are client islands imported through their own entries). The first section of\n// a shop page (ADR-007 §3): `poster` (the cover, the name over it), `split` (the title in the frame beside a 4:5 photo),\n// `banner` (a 21:9 photo, the name under it), `tv` (the shop's sign and its latest video in the old TV). The name is the\n// page's `h1` in every variant; the first image is the page's LCP (high priority, a fixed box).\nimport { CoverHero } from \"@krizaka/ui/cover-hero\";\nimport { RetroTv, type RetroTvProps } from \"@krizaka/ui/retro-tv\";\nimport { ShopSign } from \"@krizaka/ui/wall\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../cn\";\nimport { Page } from \"../../page/page\";\nimport type { ShopPhoto } from \"../frame\";\nimport { Photo } from \"../photo\";\n\nexport type HeroVariant = \"poster\" | \"split\" | \"banner\" | \"tv\";\n\nexport type HeroSectionProps = Omit<React.ComponentProps<\"header\">, \"title\"> & {\n /** The drawing. @default \"poster\" */\n variant?: HeroVariant;\n /** The shop's name: the page's `h1`. */\n title: string;\n /** A short mono line above the name (`Saint-Henri · Montréal`). */\n eyebrow?: React.ReactNode;\n /** One line: what the shop promises. */\n lead?: React.ReactNode;\n /** Chips: open now, the area, the score — only what is true now. */\n facts?: React.ReactNode;\n /** The one action (`ButtonLink`, « Book »). */\n actions?: React.ReactNode;\n /** The cover: a photo (16:9), an optional 4:5 crop for a phone, an optional muted loop (`poster`). */\n cover?: ShopPhoto & { phone?: string; video?: { webm?: string; mp4?: string } };\n /** Where the photo is cropped to. @default \"center\" */\n focus?: \"center\" | \"top\" | \"bottom\";\n /** `tv`: the shop's latest video in the cabinet (`src`, `poster`, `label`, or an `EmbedFacade` as `children`). */\n tv?: RetroTvProps;\n};\n\nconst lead = \"m-0 max-w-xl text-base leading-relaxed text-fg-secondary sm:text-lg\";\nconst eyebrowClass = \"m-0 font-mono text-[13px] text-fg-accent\";\n// The weight comes from the preset (`--kz-shop-title-weight`: Young Serif has one, Plus Jakarta Sans 650): `blocks.css`.\nconst titleClass = \"kz-shop-title m-0 font-display text-4xl leading-[1.05] tracking-tight text-fg sm:text-5xl\";\n\nfunction Text({ title, eyebrow, lead: leadText, facts, actions }: Readonly<Pick<HeroSectionProps, \"title\" | \"eyebrow\" | \"lead\" | \"facts\" | \"actions\">>) {\n return (\n <div className=\"flex min-w-0 flex-col items-start gap-3\">\n {eyebrow && <p className={eyebrowClass}>{eyebrow}</p>}\n <h1 className={titleClass}>{title}</h1>\n {leadText && <p className={lead}>{leadText}</p>}\n {facts && <div className=\"flex flex-wrap items-center gap-2\">{facts}</div>}\n {actions && <div className=\"flex flex-wrap items-center gap-3 pt-1\">{actions}</div>}\n </div>\n );\n}\n\n/** The first section of a shop page: poster, split, banner or tv. */\nexport function HeroSection({ variant = \"poster\", title, eyebrow, lead: leadText, facts, actions, cover, focus = \"center\", tv, className, ...props }: HeroSectionProps) {\n if (variant === \"poster\") {\n return (\n <CoverHero\n data-first=\"\"\n data-variant=\"poster\"\n className={cn(\"kz-shop-section min-h-[24rem] sm:min-h-[28rem] lg:min-h-[31rem]\", className)}\n cover={cover && { src: cover.src, alt: cover.alt, video: cover.video, phone: cover.phone, focus }}\n eyebrow={eyebrow}\n title={title}\n lead={leadText}\n facts={facts}\n actions={actions}\n {...props}\n />\n );\n }\n const text = <Text title={title} eyebrow={eyebrow} lead={leadText} facts={facts} actions={actions} />;\n if (variant === \"split\") {\n return (\n <header data-first=\"\" data-variant=\"split\" className={cn(\"kz-shop-section\", className)} {...props}>\n <Page>\n <div className=\"grid items-center gap-6 py-6 md:grid-cols-[minmax(0,1fr)_minmax(0,32rem)] md:gap-12 md:py-8\">\n <div className=\"order-2 md:order-1\">{text}</div>\n {cover && <Photo photo={cover} ratio=\"4/5\" priority sizes=\"(min-width: 48rem) 32rem, 100vw\" className=\"order-1 max-h-[26rem] md:order-2 md:max-h-none\" />}\n </div>\n </Page>\n </header>\n );\n }\n if (variant === \"banner\") {\n return (\n <header data-first=\"\" data-variant=\"banner\" className={cn(\"kz-shop-section\", className)} {...props}>\n {cover && (\n <div className=\"mx-auto w-full max-w-[90rem]\">\n <Photo photo={cover} ratio=\"21/9\" priority sizes=\"100vw\" className=\"rounded-none aspect-[3/2] sm:aspect-[21/9]\" />\n </div>\n )}\n <Page>\n <div className=\"py-6\">{text}</div>\n </Page>\n </header>\n );\n }\n return (\n <header data-first=\"\" data-variant=\"tv\" className={cn(\"kz-shop-section\", className)} {...props}>\n <Page>\n <div className=\"grid items-center gap-6 py-6 md:grid-cols-[minmax(0,1fr)_17rem] md:gap-12 md:py-8\">\n <div className=\"flex min-w-0 flex-col items-start gap-4\">\n <ShopSign as=\"h1\" variant=\"neon\">{title}</ShopSign>\n {leadText && <p className={lead}>{leadText}</p>}\n {facts && <div className=\"flex flex-wrap items-center gap-2\">{facts}</div>}\n {actions && <div className=\"flex flex-wrap items-center gap-3 pt-1\">{actions}</div>}\n </div>\n {tv && <RetroTv {...tv} className={cn(\"mx-auto w-56 md:w-full\", tv.className)} />}\n </div>\n </Page>\n </header>\n );\n}\n","// Server-safe. The rules of the shop, in the open (ADR-007 §3): cancellation, prices, the booking window — a real\n// description list, the owner's own words.\nimport { DescriptionList } from \"@krizaka/ui/description-list\";\nimport * as React from \"react\";\n\nimport { ShopSection, type ShopSectionProps } from \"../frame\";\n\nexport type ShopPolicy = { id: string; term: string; details: React.ReactNode };\n\nexport type PoliciesSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & Pick<ShopSectionProps, \"mascot\"> & {\n /** @default \"inline\" */\n variant?: \"inline\";\n title: React.ReactNode;\n items: readonly ShopPolicy[];\n};\n\n/** Cancellation, prices and the booking window, as term and value. */\nexport function PoliciesSection({ title, items, className, ...props }: PoliciesSectionProps) {\n if (items.length === 0) return null;\n return (\n <ShopSection title={title} className={className} data-variant=\"inline\" {...props}>\n <DescriptionList layout=\"inline\" className=\"max-w-3xl\" items={items.map((p) => ({ id: p.id, term: p.term, details: p.details }))} />\n </ShopSection>\n );\n}\n","// Server-safe. What clients say (ADR-007 §3): `summary-cards` — the score stamp with its distribution beside two or three\n// reviews; `quote` — one large review; `strip` — the score as one line (a hero's fact). Nothing is drawn under the host's\n// `minCount` of verified reviews: a shop with two reviews shows none (the composer says why).\nimport { ReviewCard, type ReviewCardProps, ReviewSummary, type ReviewSummaryProps } from \"@krizaka/ui/reviews\";\nimport * as React from \"react\";\n\nimport { ShopSection, type ShopSectionProps } from \"../frame\";\n\nexport type ReviewsVariant = \"summary-cards\" | \"quote\" | \"strip\";\n\nexport type ShopReview = Omit<ReviewCardProps, \"className\" | \"style\"> & { id: string };\n\nexport type ReviewsSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & Pick<ShopSectionProps, \"mascot\"> & {\n /** @default \"summary-cards\" */\n variant?: ReviewsVariant;\n title: React.ReactNode;\n /** The score and its distribution, with the words that name them (the stamp's, the count's, the meters'). */\n summary: Omit<ReviewSummaryProps, \"minCount\" | \"className\" | \"style\">;\n /** The reviews the host chose (`best` or `latest`), in order: two or three are drawn. */\n reviews: readonly ShopReview[];\n /** How many reviews are drawn beside the stamp. @default 2 */\n count?: 1 | 2 | 3;\n /** The fewest verified reviews that may be shown at all. @default 5 */\n minCount?: number;\n};\n\n/** The score of the shop and what its clients wrote. */\nexport function ReviewsSection({ variant = \"summary-cards\", title, summary, reviews, count = 2, minCount = 5, className, ...props }: ReviewsSectionProps) {\n if (summary.count < Math.max(1, minCount) || reviews.length === 0) return null;\n const shown = reviews.slice(0, count);\n if (variant === \"strip\") {\n return (\n <ShopSection aria-label={typeof title === \"string\" ? title : summary.summaryText} data-variant=\"strip\" className={className} {...props}>\n <p className=\"m-0 flex flex-wrap items-baseline gap-x-3 gap-y-1 text-sm text-fg-secondary\">\n <span className=\"rounded-sm border-2 border-border-strong px-2 py-0.5 font-mono text-base font-bold text-fg tabular-nums\">{summary.scoreText}</span>\n <span>{summary.countText}</span>\n <span className=\"sr-only\">{summary.summaryText}</span>\n </p>\n </ShopSection>\n );\n }\n if (variant === \"quote\") {\n const r = shown[0]!;\n const { text, author, date, dateTime, service, ratingText } = r;\n return (\n <ShopSection title={title} className={className} data-variant=\"quote\" {...props}>\n <figure className=\"m-0 max-w-3xl\">\n <blockquote className=\"m-0 font-display text-2xl leading-snug text-fg sm:text-3xl\">“{text}”</blockquote>\n <figcaption className=\"mt-3 flex flex-wrap items-baseline gap-x-2 text-sm text-fg-secondary\">\n <span className=\"font-semibold text-fg\">{author}</span>\n <time dateTime={dateTime}>{date}</time>\n {service && <span>· {service}</span>}\n <span className=\"sr-only\">{ratingText}</span>\n </figcaption>\n </figure>\n </ShopSection>\n );\n }\n return (\n <ShopSection title={title} className={className} data-variant=\"summary-cards\" {...props}>\n <div className=\"grid items-start gap-4 lg:grid-cols-[18rem_minmax(0,1fr)] lg:gap-8\">\n <ReviewSummary {...summary} minCount={minCount} />\n <div className=\"grid gap-3 sm:grid-cols-2 lg:grid-cols-[repeat(auto-fit,minmax(14rem,1fr))]\">\n {shown.map(({ id, ...review }) => (\n <ReviewCard key={id} {...review} />\n ))}\n </div>\n </div>\n </ShopSection>\n );\n}\n","// Server-safe: no hook. The services of a shop (ADR-007 §3). `menu` — the compact price board, the default of every preset:\n// one row per service (an optional 56 px square thumbnail of the service's own photo, the name, « Popular », a dotted leader,\n// the price in tabular figures, the duration and one line, a « Choose » button that names the service), grouped by category\n// under a lower-case typewriter note, in one column beside an `aside` (a plain block, never a landmark) or in two. `cards` (4:3, six at most), `index` (the\n// Cahier's stamped cards), `carousel` (a snap strip, phone first). The section receives resolved services; it never fetches.\nimport { Badge } from \"@krizaka/ui/badge\";\nimport { buttonVariants } from \"@krizaka/ui/button\";\nimport { ServiceCard } from \"@krizaka/ui/service-card\";\nimport * as React from \"react\";\n\nimport { BlockLink, type LinkComponent } from \"../../block-link\";\nimport { cn } from \"../../cn\";\nimport type { ShopPhoto } from \"../frame\";\nimport { ShopSection } from \"../frame\";\nimport { SHOP_LIMITS } from \"../limits\";\nimport { Photo } from \"../photo\";\n\nexport type ServicesVariant = \"menu\" | \"cards\" | \"index\" | \"carousel\";\n\n/** A service as the product resolved it: its own photo (or none), its price already formatted. */\nexport type ShopService = {\n id: string;\n name: string;\n /** Formatted by the app (`$45`): the section never formats money. */\n price: string;\n /** The word before a varying price (`from`). */\n priceFrom?: string;\n /** `30 min`. */\n duration?: string;\n /** `Up to 5 dogs`. */\n capacity?: string;\n /** One line: what it is (truncated in the menu). */\n description?: string;\n /** What is included, one short line each (cards and index). */\n included?: readonly string[];\n /** The shop's category (`cuts`): the menu's group. */\n category?: string;\n /** The service's OWN photo. Never a default: without one the menu draws no thumbnail. */\n photo?: ShopPhoto;\n /** Booked most often (a real count): wears « Popular ». */\n popular?: boolean;\n /** The booking page with this service chosen. */\n href?: string;\n};\n\nexport type ServicesSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** @default \"menu\" */\n variant?: ServicesVariant;\n services: readonly ShopService[];\n /** The section's `h2` (`Services`). */\n title: React.ReactNode;\n lead?: React.ReactNode;\n /** `menu`: group by the services' `category`. @default \"category\" */\n groupBy?: \"category\" | \"none\";\n /** `menu` with no `aside`: one or two columns. @default 1 */\n columns?: 1 | 2;\n /** `menu`: the hours, the team and the address, beside the list from `lg` (sticky), below it on a phone. */\n aside?: React.ReactNode;\n /** The button's words (`Choose`); its accessible name is « Choose Short cut ». */\n chooseLabel: string;\n /** « Popular ». */\n popularLabel: string;\n /** The list's accessible name when there is no group (`Services`). */\n listLabel?: string;\n /** The app's link component for the booking addresses. */\n linkAs?: LinkComponent;\n};\n\nconst GROUP_NOTE = \"m-0 font-mono text-[13px] lowercase text-fg-secondary\";\n\nfunction groupsOf(services: readonly ShopService[], by: \"category\" | \"none\") {\n if (by === \"none\") return [{ name: undefined as string | undefined, items: services }];\n const groups: { name: string | undefined; items: ShopService[] }[] = [];\n for (const s of services) {\n const name = s.category;\n const group = groups.find((g) => g.name === name);\n if (group) group.items.push(s);\n else groups.push({ name, items: [s] });\n }\n return groups;\n}\n\nfunction MenuRow({ service, chooseLabel, popularLabel, linkAs }: Readonly<{ service: ShopService; chooseLabel: string; popularLabel: string; linkAs?: LinkComponent }>) {\n const facts = [service.duration, service.capacity].filter(Boolean).join(\" · \");\n return (\n <li className=\"flex items-center gap-3 border-b border-border-subtle py-2.5 last:border-b-0\" data-service={service.id}>\n {service.photo && (\n <Photo photo={service.photo} ratio=\"1/1\" sizes=\"56px\" className=\"h-12 w-12 shrink-0 rounded-md sm:h-14 sm:w-14\" />\n )}\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-baseline gap-2\">\n <h3 className=\"m-0 shrink truncate text-[15px] font-semibold leading-tight text-fg\">{service.name}</h3>\n {service.popular && <Badge tone=\"accent\" size=\"sm\" className=\"hidden shrink-0 self-center sm:inline-flex\">{popularLabel}</Badge>}\n <span aria-hidden className=\"min-w-4 flex-1 -translate-y-0.5 border-b border-dotted border-border-control\" />\n <span className=\"shrink-0 whitespace-nowrap text-[15px] font-bold tabular-nums text-fg\">\n {service.priceFrom && <span className=\"mr-1 text-xs font-medium text-fg-secondary\">{service.priceFrom}</span>}\n {service.price}\n </span>\n </div>\n <p className=\"m-0 mt-0.5 truncate text-[13px] leading-snug text-fg-secondary\">\n {service.popular && <Badge tone=\"accent\" size=\"sm\" className=\"mr-1.5 sm:hidden\">{popularLabel}</Badge>}\n <span className=\"font-mono tabular-nums\">{facts}</span>\n {facts && service.description && <span aria-hidden> · </span>}\n {service.description}\n </p>\n </div>\n {service.href && (\n <BlockLink\n href={service.href}\n linkAs={linkAs}\n aria-label={`${chooseLabel} ${service.name}`}\n className={cn(buttonVariants({ variant: \"secondary\", size: \"md\" }), \"min-h-11 shrink-0 no-underline\")}\n >\n {chooseLabel}\n </BlockLink>\n )}\n </li>\n );\n}\n\nfunction Menu({ services, groupBy, columns, aside, chooseLabel, popularLabel, listLabel, linkAs }: Required<Pick<ServicesSectionProps, \"services\" | \"groupBy\" | \"columns\" | \"chooseLabel\" | \"popularLabel\">> & Pick<ServicesSectionProps, \"aside\" | \"listLabel\" | \"linkAs\">) {\n const groups = groupsOf(services, groupBy);\n const uid = React.useId();\n const list = (\n <div className={cn(\"grid gap-x-12\", !aside && columns === 2 && \"lg:grid-cols-2\")}>\n {groups.map((g, i) => (\n <div key={g.name ?? i} className=\"mb-3 min-w-0 last:mb-0\">\n {g.name && <p className={GROUP_NOTE} id={`${uid}-grp-${i}`}>{g.name}</p>}\n <ul aria-label={g.name ? undefined : listLabel} aria-labelledby={g.name ? `${uid}-grp-${i}` : undefined} className=\"m-0 list-none p-0\">\n {g.items.map((s) => (\n <MenuRow key={s.id} service={s} chooseLabel={chooseLabel} popularLabel={popularLabel} linkAs={linkAs} />\n ))}\n </ul>\n </div>\n ))}\n </div>\n );\n if (!aside) return list;\n return (\n <div className=\"grid items-start gap-6 lg:grid-cols-[minmax(0,1fr)_20rem] lg:gap-12\">\n {list}\n <div className=\"kz-shop-aside flex flex-col gap-4\">{aside}</div>\n </div>\n );\n}\n\n/** The services of a shop: the price board by default, or cards, index cards, a carousel. */\nexport function ServicesSection({ variant = \"menu\", services, title, lead, groupBy = \"category\", columns = 1, aside, chooseLabel, popularLabel, listLabel, linkAs, className, ...props }: ServicesSectionProps) {\n const card = (s: ShopService, i: number, extra?: string) => (\n <ServiceCard\n key={s.id}\n name={s.name}\n price={s.price}\n priceFrom={s.priceFrom}\n duration={s.duration}\n capacity={s.capacity}\n description={s.description}\n included={s.included}\n tag={s.popular ? popularLabel : undefined}\n media={s.photo ? <img src={s.photo.src} srcSet={s.photo.srcSet} sizes=\"(min-width: 64rem) 18rem, 90vw\" alt={s.photo.alt} loading=\"lazy\" decoding=\"async\" /> : undefined}\n mediaRatio=\"photo\"\n variant={variant === \"index\" ? \"index\" : \"default\"}\n actionLabel={chooseLabel}\n href={s.href}\n linkAs={linkAs}\n className={extra}\n data-index={i}\n />\n );\n let body: React.ReactNode;\n if (variant === \"menu\") {\n body = <Menu services={services} groupBy={groupBy} columns={columns} aside={aside} chooseLabel={chooseLabel} popularLabel={popularLabel} listLabel={listLabel} linkAs={linkAs} />;\n } else if (variant === \"carousel\") {\n body = (\n <div role=\"group\" aria-label={listLabel ?? (typeof title === \"string\" ? title : undefined)} tabIndex={0} className=\"-mx-4 flex snap-x snap-mandatory gap-3 overflow-x-auto px-4 pb-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring sm:mx-0 sm:px-0\">\n {services.map((s, i) => card(s, i, \"w-[78vw] max-w-72 shrink-0 snap-start sm:w-72\"))}\n </div>\n );\n } else {\n const shown = variant === \"cards\" ? services.slice(0, SHOP_LIMITS.cards) : services;\n body = <div className=\"grid items-start gap-4 sm:grid-cols-2 lg:grid-cols-3\">{shown.map((s, i) => card(s, i, \"h-auto\"))}</div>;\n }\n return (\n <ShopSection title={title} lead={lead} className={className} data-variant={variant} {...props}>\n {body}\n </ShopSection>\n );\n}\n","// Server-safe (the facade is a client island). The shop's other places (ADR-007 §3): `links` — plain anchors that open in a\n// new tab, `nofollow`, no referrer, nothing loaded from the platform; `facade` — the latest reel behind a button. Third\n// parties load on a click, never before (Law 25).\nimport { EMBED_PLATFORMS,EmbedFacade, type EmbedPlatform } from \"@krizaka/ui/embed-facade\";\nimport * as React from \"react\";\n\nimport { ShopSection } from \"../frame\";\n\nexport type SocialVariant = \"links\" | \"facade\";\n\nexport type ShopLink = { id: string; platform: EmbedPlatform; url: string };\n\nexport type SocialSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** @default \"links\" */\n variant?: SocialVariant;\n title: React.ReactNode;\n links: readonly ShopLink[];\n /** `links`: the name of each place, passed translated (`TikTok`). Default: the platform's own. */\n labels?: Partial<Record<EmbedPlatform, string>>;\n /** `facade`: the button's words per platform, and the reel's name. */\n playLabels?: Record<EmbedPlatform, string>;\n reelTitle?: string;\n poster?: string;\n notice?: React.ReactNode;\n};\n\n/** Where else to find the shop. */\nexport function SocialSection({ variant = \"links\", title, links, labels = {}, playLabels, reelTitle, poster, notice, className, ...props }: SocialSectionProps) {\n if (links.length === 0) return null;\n const first = links[0]!;\n return (\n <ShopSection title={title} className={className} data-variant={variant} {...props}>\n {variant === \"facade\" && playLabels ? (\n <div className=\"w-44 sm:w-52\">\n <EmbedFacade platform={first.platform} url={first.url} title={reelTitle ?? labels[first.platform] ?? EMBED_PLATFORMS[first.platform]} playLabel={playLabels[first.platform]} poster={poster} notice={notice} />\n </div>\n ) : (\n <ul className=\"m-0 flex list-none flex-wrap gap-2 p-0\">\n {links.map((l) => (\n <li key={l.id}>\n <a\n href={l.url}\n target=\"_blank\"\n rel=\"noopener noreferrer nofollow\"\n referrerPolicy=\"no-referrer\"\n className=\"inline-flex min-h-11 items-center rounded-md border border-border-control bg-surface-1 px-4 text-sm font-semibold text-fg no-underline hover:border-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\"\n >\n {labels[l.platform] ?? EMBED_PLATFORMS[l.platform]}\n </a>\n </li>\n ))}\n </ul>\n )}\n </ShopSection>\n );\n}\n","// Server-safe. The owner's words (ADR-007 §3): `quote` — a pull quote and a paragraph; `owner` — the owner's face, a\n// paragraph, and a way to call or write. The words are the owner's, in the visitor's language; nothing is invented.\nimport { Avatar } from \"@krizaka/ui/avatar\";\nimport * as React from \"react\";\n\nimport { ShopSection, type ShopSectionProps } from \"../frame\";\n\nexport type StoryVariant = \"quote\" | \"owner\";\n\nexport type StorySectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & Pick<ShopSectionProps, \"mascot\"> & {\n /** @default \"quote\" */\n variant?: StoryVariant;\n title: React.ReactNode;\n /** `quote`: the pull quote. */\n quote?: string;\n /** The paragraph. */\n body: string;\n /** `owner`: who speaks. */\n owner?: { name: string; photo?: string };\n /** `owner`: call or write (`ButtonLink`s). */\n actions?: React.ReactNode;\n};\n\n/** The owner's story, as a pull quote or a face and a paragraph. */\nexport function StorySection({ variant = \"quote\", title, quote, body, owner, actions, className, ...props }: StorySectionProps) {\n if (!body && !quote) return null;\n return (\n <ShopSection title={title} className={className} data-variant={variant} {...props}>\n {variant === \"owner\" ? (\n <div className=\"flex max-w-3xl items-start gap-4\">\n {owner && <Avatar src={owner.photo} alt=\"\" fallback={owner.name.slice(0, 1)} size=\"xl\" />}\n <div className=\"min-w-0\">\n {owner && <p className=\"m-0 font-semibold text-fg\">{owner.name}</p>}\n <p className=\"m-0 mt-1 text-base leading-relaxed text-fg-secondary\">{body}</p>\n {actions && <div className=\"mt-3 flex flex-wrap gap-2\">{actions}</div>}\n </div>\n </div>\n ) : (\n <div className=\"grid max-w-4xl gap-4 md:grid-cols-[minmax(0,1fr)_minmax(0,1fr)] md:gap-10\">\n {quote && <blockquote className=\"m-0 border-s-2 border-accent ps-4 font-display text-2xl leading-snug text-fg\">{quote}</blockquote>}\n <p className=\"m-0 text-base leading-relaxed text-fg-secondary\">{body}</p>\n </div>\n )}\n </ShopSection>\n );\n}\n","// Server-safe. The people of the shop (ADR-007 §3): `row` — avatars and first names in a line; `cards` — a card each with a\n// role. Faces are the members' own photos, or the default avatar of @krizaka/ui: never a stock face.\nimport { Avatar } from \"@krizaka/ui/avatar\";\nimport * as React from \"react\";\n\nimport { ShopSection } from \"../frame\";\n\nexport type TeamVariant = \"row\" | \"cards\";\n\nexport type ShopMember = {\n id: string;\n /** The first name. */\n name: string;\n /** What they do (`Colourist`): `cards` only. */\n role?: string;\n /** Their own photo. Without one the default avatar is drawn. */\n photo?: string;\n};\n\nexport type TeamSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** @default \"row\" */\n variant?: TeamVariant;\n members: readonly ShopMember[];\n title: React.ReactNode;\n lead?: React.ReactNode;\n};\n\n/** The people of the shop. */\nexport function TeamSection({ variant = \"row\", members, title, lead, className, ...props }: TeamSectionProps) {\n if (members.length === 0) return null;\n const list =\n variant === \"cards\" ? (\n <ul className=\"m-0 grid list-none gap-3 p-0 sm:grid-cols-2 lg:grid-cols-4\">\n {members.map((m) => (\n <li key={m.id} className=\"flex items-center gap-3 rounded-xl border border-border-default bg-surface-1 p-3\">\n <Avatar src={m.photo} fallback={m.name.slice(0, 1)} size=\"lg\" />\n <div className=\"min-w-0\">\n <p className=\"m-0 truncate font-semibold text-fg\">{m.name}</p>\n {m.role && <p className=\"m-0 truncate text-[13px] text-fg-secondary\">{m.role}</p>}\n </div>\n </li>\n ))}\n </ul>\n ) : (\n <ul className=\"m-0 flex list-none flex-wrap gap-x-6 gap-y-3 p-0\">\n {members.map((m) => (\n <li key={m.id} className=\"flex items-center gap-2.5\">\n <Avatar src={m.photo} fallback={m.name.slice(0, 1)} size=\"md\" />\n <span className=\"font-semibold text-fg\">{m.name}</span>\n </li>\n ))}\n </ul>\n );\n return (\n <ShopSection title={title} lead={lead} className={className} data-variant={variant} {...props}>\n {list}\n </ShopSection>\n );\n}\n","// Server-safe (the TV and the facades are client islands imported through their own entries). The shop's videos (ADR-007\n// §3): `tv` — the old television with the shop's latest video (its own clip, or a platform's short behind its facade);\n// `shorts` — another channel's reels, each behind a facade. Nothing is requested from a platform before the click.\nimport { EmbedFacade, type EmbedPlatform } from \"@krizaka/ui/embed-facade\";\nimport { RetroTv, type RetroTvProps } from \"@krizaka/ui/retro-tv\";\nimport * as React from \"react\";\n\nimport { ShopSection } from \"../frame\";\nimport { SHOP_LIMITS } from \"../limits\";\n\nexport type VideoVariant = \"tv\" | \"shorts\";\n\nexport type ShopReel = {\n id: string;\n platform: EmbedPlatform;\n /** The public address of the post (validated by `embedUrl`: anything else draws nothing). */\n url: string;\n /** Its accessible name. */\n title: string;\n /** The host's own copy of the picture. */\n poster?: string;\n};\n\nexport type VideoSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** @default \"tv\" */\n variant?: VideoVariant;\n title: React.ReactNode;\n lead?: React.ReactNode;\n /** The reels, newest first. `tv` plays the first one (unless `clip` is set); `shorts` draws up to six. */\n reels?: readonly ShopReel[];\n /** `tv`: the shop's own clip in the cabinet (`src`, `poster`, `title`). */\n clip?: Pick<RetroTvProps, \"src\" | \"poster\" | \"title\">;\n /** The facade's button, per platform (« Load TikTok and play »), passed translated. */\n playLabels: Record<EmbedPlatform, string>;\n /** The line under a facade's button: what the platform will receive on the click. */\n notice?: React.ReactNode;\n /** `tv`: the cabinet. @default \"cabinet\" */\n cabinet?: \"cabinet\" | \"portable\";\n /** `tv`: the channel written on the cabinet (`CH 3 · Saint-Henri`). */\n channel?: string;\n /** `tv`: what sits beside the television (a few pinned notes, a line). */\n aside?: React.ReactNode;\n};\n\n/** The shop's videos: the old TV, or a strip of short reels behind a click. */\nexport function VideoSection({ variant = \"tv\", title, lead, reels = [], clip, playLabels, notice, cabinet = \"cabinet\", channel, aside, className, ...props }: VideoSectionProps) {\n const facade = (r: ShopReel, className?: string) => (\n <EmbedFacade key={r.id} platform={r.platform} url={r.url} title={r.title} playLabel={playLabels[r.platform]} poster={r.poster} notice={notice} className={className} />\n );\n let body: React.ReactNode;\n if (variant === \"shorts\") {\n body = (\n <ul className=\"m-0 flex list-none snap-x snap-mandatory gap-3 overflow-x-auto p-0 pb-2\">\n {reels.slice(0, SHOP_LIMITS.reels).map((r) => (\n <li key={r.id} className=\"w-44 shrink-0 snap-start sm:w-52\">\n {facade(r)}\n </li>\n ))}\n </ul>\n );\n } else {\n const first = reels[0];\n let tv: React.ReactNode = null;\n if (clip) tv = <RetroTv {...clip} variant={cabinet} channel={channel} />;\n else if (first) tv = <RetroTv title={first.title} variant={cabinet} channel={channel}>{facade(first)}</RetroTv>;\n body = (\n <div className=\"grid items-center gap-6 md:grid-cols-[minmax(0,1fr)_17rem] md:gap-12\">\n <div className=\"order-2 md:order-1\">{aside}</div>\n <div className=\"order-1 mx-auto w-56 md:order-2 md:w-full\">{tv}</div>\n </div>\n );\n }\n return (\n <ShopSection title={title} lead={lead} className={className} data-variant={variant} {...props}>\n {body}\n </ShopSection>\n );\n}\n","// Server-safe (the map is a client island). How to come and when (ADR-007 §3): `card` — the hours, the address and a call;\n// `map` — the place on a map (on a phone behind a button), the address under it; `split` — the hours beside the map. The\n// hours are the shop's own, the status is its own words: the section draws them, it never reads the clock.\nimport { type OpeningDay, OpeningHours, type OpeningStatus } from \"@krizaka/ui/opening-hours\";\nimport { MapGate, type MapGateProps } from \"@krizaka/ui/shop/map-gate\";\nimport * as React from \"react\";\n\nimport { ShopSection } from \"../frame\";\n\nexport type VisitVariant = \"card\" | \"map\" | \"split\";\n\nexport type VisitSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** @default \"card\" */\n variant?: VisitVariant;\n title: React.ReactNode;\n hours: readonly OpeningDay[];\n /** Today's day id: its row is marked. */\n today?: string;\n status: OpeningStatus;\n /** The name of the hours list (`Hours`). */\n hoursLabel: string;\n address?: string;\n /** `tel:` target and its text; `showPhone: false` of the document leaves both out. */\n phone?: { href: string; label: string };\n /** `map` and `split`: the place. Without it these draw as a `card`. */\n map?: Omit<MapGateProps, \"className\">;\n};\n\n/** Where and when: hours, address, call, and the place on a map. */\nexport function VisitSection({ variant = \"card\", title, hours, today, status, hoursLabel, address, phone, map, className, ...props }: VisitSectionProps) {\n const details = (\n <div className=\"flex flex-col gap-2 text-sm text-fg-secondary\">\n {address && <p className=\"m-0\">{address}</p>}\n {phone && (\n <p className=\"m-0\">\n <a href={phone.href} className=\"font-semibold text-fg-accent underline\">{phone.label}</a>\n </p>\n )}\n </div>\n );\n const opening = <OpeningHours label={hoursLabel} days={hours} today={today} status={status} />;\n const drawn: VisitVariant = map ? variant : \"card\";\n return (\n <ShopSection title={title} className={className} data-variant={drawn} {...props}>\n {drawn === \"card\" && (\n <div className=\"grid max-w-xl gap-3\">\n {opening}\n {details}\n </div>\n )}\n {drawn === \"map\" && (\n <div className=\"grid gap-3\">\n <MapGate {...map!} />\n {details}\n </div>\n )}\n {drawn === \"split\" && (\n <div className=\"grid items-start gap-4 md:grid-cols-[minmax(0,22rem)_minmax(0,1fr)] md:gap-8\">\n <div className=\"grid gap-3\">\n {opening}\n {details}\n </div>\n <MapGate {...map!} />\n </div>\n )}\n </ShopSection>\n );\n}\n","\"use client\";\n\n// The variant picker's thumbnails (ADR-007 §5): the section itself, drawn with demo data at the scale of a card — not a screenshot,\n// so a new variant or a new preset needs no new picture, and each thumbnail wears the page's look (the preset applies around it).\nimport * as React from \"react\";\n\nimport { Button } from \"../button/button\";\nimport { BookingSection } from \"../shop/booking/booking\";\nimport { BulletinSection } from \"../shop/bulletin/bulletin\";\nimport type { SectionType } from \"../shop/catalogue\";\nimport { demoSalon } from \"../shop/demo\";\nimport { FaqSection } from \"../shop/faq/faq\";\nimport { ShopFrame } from \"../shop/frame\";\nimport { GallerySection } from \"../shop/gallery/gallery\";\nimport { HeroSection } from \"../shop/hero/hero\";\nimport { PoliciesSection } from \"../shop/policies/policies\";\nimport { ReviewsSection } from \"../shop/reviews/reviews\";\nimport { ServicesSection } from \"../shop/services/services\";\nimport { SocialSection } from \"../shop/social/social\";\nimport { StorySection } from \"../shop/story/story\";\nimport { TeamSection } from \"../shop/team/team\";\nimport { VideoSection } from \"../shop/video/video\";\nimport { VisitSection } from \"../shop/visit/visit\";\n\nconst shop = demoSalon;\nconst play = { tiktok: \"Play\", \"youtube-shorts\": \"Play\", instagram: \"Play\" } as const;\nconst reel = { id: \"r\", platform: \"tiktok\" as const, url: \"https://www.tiktok.com/@salon/video/7000000000000000000\", title: \"Reel\" };\nconst summary = {\n score: 4.7, count: 38, distribution: [0, 1, 2, 7, 28] as [number, number, number, number, number],\n scoreText: \"4.7 / 5\", countText: \"38 reviews\", summaryText: \"4.7 out of 5, 38 reviews\", starText: (s: number, n: number) => `${s} stars: ${n}`,\n};\nconst review = { id: \"a\", author: \"Nadia F.\", date: \"October 2026\", dateTime: \"2026-10\", service: \"Cut and blow-dry\", rating: 5, ratingText: \"5 out of 5\", text: \"The best blow-dry in the neighbourhood, simply.\" };\n\n/** The section as it looks with demo data, in the variant asked. */\nfunction Demo({ type, variant }: Readonly<{ type: SectionType; variant: string }>): React.ReactNode {\n const v = variant as never;\n switch (type) {\n case \"hero\":\n return <HeroSection variant={v} title={shop.name} eyebrow={shop.eyebrow} lead={shop.promise} cover={shop.cover} actions={<Button variant=\"primary\">Book</Button>} tv={{ poster: shop.cover.src, title: \"Latest video\" } as never} />;\n case \"services\":\n return <ServicesSection variant={v} title=\"Services\" services={shop.services} chooseLabel=\"Choose\" popularLabel=\"Popular\" />;\n case \"booking\":\n return variant === \"sticky\" ? <div className=\"flex items-center justify-center border-t border-border-default bg-surface-1 p-4\"><Button variant=\"primary\" size=\"lg\">Book</Button></div> : <BookingSection variant={v} label=\"Next free times\" times={shop.times} href=\"#\" actionLabel=\"Book\" title=\"Ready when you are\" body=\"A few taps.\" />;\n case \"gallery\":\n return <GallerySection variant={v} title=\"Photos\" label=\"Photos\" photos={shop.photos} sign={shop.name} />;\n case \"video\":\n return <VideoSection variant={v} title=\"Latest\" reels={[reel, { ...reel, id: \"r2\" }]} playLabels={play} />;\n case \"reviews\":\n return <ReviewsSection variant={v} title=\"Reviews\" summary={summary} reviews={[review, { ...review, id: \"b\", author: \"Léo P.\" }]} />;\n case \"bulletin\":\n return <BulletinSection variant={v} title=\"News\" today=\"2026-10-27\" flyers={[{ id: \"f\", text: \"Closed on Monday the 3rd: see you on Tuesday!\", signature: \"Jade\" }]} />;\n case \"team\":\n return <TeamSection variant={v} title=\"Team\" members={shop.team.map((t) => ({ id: t.id, name: t.name, role: \"Stylist\" }))} />;\n case \"visit\":\n return <VisitSection variant={v} title=\"Visit\" hours={shop.hours} status={shop.status} hoursLabel=\"Hours\" address={shop.address} phone={{ href: \"tel:5145550110\", label: shop.phone }} map={{ label: \"Map\", center: [-73.58, 45.48], showLabel: \"Show the map\" }} />;\n case \"story\":\n return <StorySection variant={v} title=\"Our story\" quote=\"Cuts that last, advice that is honest.\" body=\"Three friends opened the salon in 2019, on the corner where the old bakery stood.\" owner={{ name: \"Jade\" }} />;\n case \"social\":\n return <SocialSection variant={v} title=\"Follow us\" links={[{ id: \"a\", platform: \"instagram\", url: \"https://instagram.com/salon\" }, { id: \"b\", platform: \"tiktok\", url: \"https://tiktok.com/@salon\" }]} playLabels={play} />;\n case \"faq\":\n return <FaqSection title=\"Questions\" questions={[{ id: \"q\", question: \"Do I need to book?\", answer: \"Yes, pick a time online.\" }, { id: \"q2\", question: \"Can I cancel?\", answer: \"Up to 24 hours before.\" }]} />;\n case \"policies\":\n return <PoliciesSection title=\"Policies\" items={[{ id: \"p\", term: \"Cancellation\", details: \"Free up to 24 h before\" }, { id: \"p2\", term: \"Prices\", details: \"Before taxes\" }]} />;\n }\n}\n\nexport type SectionThumbnailProps = {\n /** The section type. */\n type: SectionType;\n /** Its variant: one of the type's. */\n variant: string;\n /** The look preset the page wears (`salon-vitrine`): the thumbnail wears it too. */\n preset?: string;\n /** The page's spacing. @default \"compact\" */\n density?: \"compact\" | \"airy\";\n};\n\n/** A picture of a section: 160 × 96 px of a 960 px page, inert and hidden from assistive technology. */\nexport function SectionThumbnail({ type, variant, preset, density }: Readonly<SectionThumbnailProps>) {\n return (\n <div aria-hidden inert className=\"kz-shop-thumb\" data-thumb={`${type}.${variant}`}>\n <div className=\"kz-shop-thumb-inner\">\n <ShopFrame preset={preset} density={density ?? \"compact\"}>\n <Demo type={type} variant={variant} />\n </ShopFrame>\n </div>\n </div>\n );\n}\n","// The look of the page (folioviv#478): a radio group of the six looks as swatches (name, the look's own surface and its accent\n// chips), then the accent within the chosen look's tested list. It applies to the draft only; publishing goes through the diff.\nimport { RadioGroup } from \"@krizaka/ui/radio-group\";\n\nimport { cn } from \"../cn\";\nimport type { ShopPage } from \"../shop/schema\";\nimport type { Command } from \"./commands\";\nimport type { ShopComposerPreset } from \"./composer\";\nimport { fill, type ShopComposerMessages } from \"./messages\";\n\nexport type LookPickerProps = {\n looks: readonly ShopComposerPreset[];\n page: ShopPage;\n messages: ShopComposerMessages;\n run: (cmd: Command) => void;\n announce: (message: string) => void;\n};\n\n/** The accent chips of a look, drawn by its own tokens. */\nfunction Chips({ look }: Readonly<{ look: ShopComposerPreset }>) {\n return (\n <span aria-hidden className=\"inline-flex gap-1\">\n {(look.accents ?? [look.accent ?? \"krizaka\"]).map((a) => (\n <span key={a} data-shop-preset={look.id} data-shop-accent={a} className=\"kz-look-chip\">\n <i />\n </span>\n ))}\n </span>\n );\n}\n\nexport function LookPicker({ looks, page, messages: m, run, announce }: Readonly<LookPickerProps>) {\n const current = looks.find((l) => l.id === page.preset.id);\n const accents = current?.accents ?? [];\n return (\n <div className=\"grid gap-3\">\n <RadioGroup.Root\n label={m.lookChoice}\n variant=\"cards\"\n value={current?.id ?? \"\"}\n onValueChange={(id) => {\n const look = looks.find((l) => l.id === id);\n if (!look) return;\n run({ type: \"applyLook\", look });\n announce(fill(m.lookApplied, { name: look.name }));\n }}\n className=\"grid-cols-2\"\n >\n {looks.map((l) => (\n <RadioGroup.Card key={l.id} value={l.id}>\n <span data-shop-preset={l.id} className={cn(\"kz-look-swatch\", \"w-full justify-between\")}>\n <span className=\"text-sm font-semibold\">{l.name}</span>\n <Chips look={l} />\n </span>\n </RadioGroup.Card>\n ))}\n </RadioGroup.Root>\n {accents.length > 1 && (\n <RadioGroup.Root label={m.accentChoice} variant=\"buttons\" value={page.accent ?? current?.accent ?? accents[0]} onValueChange={(a) => run({ type: \"setAccent\", accent: a === current?.accent ? undefined : a })}>\n {accents.map((a) => (\n <RadioGroup.Button key={a} value={a}>\n {m.accentNames[a] ?? a}\n </RadioGroup.Button>\n ))}\n </RadioGroup.Root>\n )}\n </div>\n );\n}\n","\"use client\";\n\n// The outline (ADR-007 §5): the sections in order — name, the variant as a mono note, a visibility switch, a menu. Drag is an\n// extra the page does not need: the path is the keyboard — focus a row, `Alt+↑` / `Alt+↓` (or the row's menu: Move up, Move\n// down, Move to top). Every move is announced (« Reviews moved to position 3 of 8 ») and focus stays on the moved row.\nimport { Button } from \"@krizaka/ui/button\";\nimport { DropdownMenu } from \"@krizaka/ui/dropdown-menu\";\nimport { Switch } from \"@krizaka/ui/switch\";\nimport * as React from \"react\";\n\nimport type { Section } from \"../shop/schema\";\nimport type { Command } from \"./commands\";\nimport { fill, type ShopComposerMessages } from \"./messages\";\n\nexport type OutlineProps = {\n sections: readonly Section[];\n selected: string | null;\n onSelect: (key: string) => void;\n run: (cmd: Command, merge?: string) => void;\n messages: ShopComposerMessages;\n announce: (message: string) => void;\n onAdd: () => void;\n /** A request to focus a row (a new section): a new object each time; consumed once, after the render that drew the row. */\n focusRequest?: { key: string } | null;\n};\n\n/** « Photos », « Photos 2 » when a type appears twice. */\nexport function sectionLabel(sections: readonly Section[], index: number, messages: ShopComposerMessages): string {\n const s = sections[index]!;\n const same = sections.filter((x) => x.type === s.type);\n const base = messages.sectionNames[s.type];\n return same.length > 1 ? `${base} ${same.indexOf(s) + 1}` : base;\n}\n\nconst ICON = \"h-4 w-4\";\n\nexport function Outline({ sections, selected, onSelect, run, messages: m, announce, onAdd, focusRequest }: Readonly<OutlineProps>) {\n const rows = React.useRef(new Map<string, HTMLButtonElement>());\n // After a move (or a menu action) the moved row keeps the focus: the DOM may have reordered under it. A request is consumed once —\n // never on the next change of the document, which may be typing somewhere else.\n const wanted = React.useRef<string | null>(null);\n const [tick, setTick] = React.useState(0);\n const want = (key: string) => {\n wanted.current = key;\n setTick((t) => t + 1);\n };\n React.useLayoutEffect(() => {\n if (focusRequest) wanted.current = focusRequest.key;\n }, [focusRequest]);\n React.useLayoutEffect(() => {\n const key = wanted.current;\n wanted.current = null;\n if (key) rows.current.get(key)?.focus();\n }, [tick, focusRequest]);\n\n const move = (index: number, to: number) => {\n const s = sections[index]!;\n const name = sectionLabel(sections, index, m);\n const lo = sections[0]?.type === \"hero\" ? 1 : 0;\n const clamped = Math.min(Math.max(to, lo), sections.length - 1);\n if (s.type === \"hero\" || clamped === index) {\n announce(fill(m.announceCannotMove, { name }));\n return;\n }\n run({ type: \"moveSection\", key: s.key, to: clamped });\n want(s.key);\n announce(fill(m.announceMoved, { name, n: clamped + 1, total: sections.length }));\n };\n\n const onKeyDown = (e: React.KeyboardEvent, index: number) => {\n if (e.altKey && (e.key === \"ArrowUp\" || e.key === \"ArrowDown\")) {\n e.preventDefault();\n move(index, index + (e.key === \"ArrowUp\" ? -1 : 1));\n } else if (!e.altKey && (e.key === \"ArrowUp\" || e.key === \"ArrowDown\")) {\n const next = sections[index + (e.key === \"ArrowUp\" ? -1 : 1)];\n if (next) {\n e.preventDefault();\n rows.current.get(next.key)?.focus();\n }\n }\n };\n\n return (\n <nav aria-label={m.sections} className=\"flex min-h-0 flex-col gap-3\">\n <ol className=\"m-0 flex list-none flex-col gap-1 p-0\">\n {sections.map((s, i) => {\n const name = sectionLabel(sections, i, m);\n const isHero = s.type === \"hero\";\n const lo = sections[0]?.type === \"hero\" ? 1 : 0;\n return (\n <li key={s.key} data-selected={selected === s.key ? \"\" : undefined} data-disabled={s.disabled ? \"\" : undefined} className=\"flex items-center gap-1 rounded-lg border border-transparent data-[selected]:border-accent data-[selected]:bg-accent-soft\">\n <button\n type=\"button\"\n ref={(el) => {\n if (el) rows.current.set(s.key, el);\n else rows.current.delete(s.key);\n }}\n aria-current={selected === s.key ? \"true\" : undefined}\n aria-keyshortcuts=\"Alt+ArrowUp Alt+ArrowDown\"\n onClick={() => onSelect(s.key)}\n onKeyDown={(e) => onKeyDown(e, i)}\n className=\"flex min-h-11 min-w-0 flex-1 flex-col items-start justify-center rounded-lg px-3 py-1.5 text-start focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring\"\n >\n <span className=\"flex w-full items-baseline gap-2\">\n <span className={s.disabled ? \"truncate text-sm font-semibold text-fg-secondary line-through decoration-1\" : \"truncate text-sm font-semibold text-fg\"}>{name}</span>\n {s.disabled && <span className=\"font-mono text-[11px] text-fg-secondary\">{m.hiddenNote}</span>}\n </span>\n <span className=\"font-mono text-xs text-fg-secondary\">{m.variantNames[`${s.type}.${s.variant}`] ?? s.variant}</span>\n </button>\n <Switch\n size=\"sm\"\n label={fill(m.toggleVisible, { name })}\n checked={!s.disabled}\n onCheckedChange={(on) => {\n run({ type: \"toggleDisabled\", key: s.key });\n announce(fill(on ? m.announceShown : m.announceHidden, { name }));\n }}\n />\n <DropdownMenu.Root>\n <DropdownMenu.Trigger asChild>\n <Button variant=\"ghost\" size=\"icon\" aria-label={fill(m.sectionMenu, { name })}>\n <svg viewBox=\"0 0 16 16\" className={ICON} fill=\"currentColor\" aria-hidden>\n <circle cx=\"8\" cy=\"3\" r=\"1.4\" />\n <circle cx=\"8\" cy=\"8\" r=\"1.4\" />\n <circle cx=\"8\" cy=\"13\" r=\"1.4\" />\n </svg>\n </Button>\n </DropdownMenu.Trigger>\n <DropdownMenu.Content\n onCloseAutoFocus={(e) => {\n e.preventDefault();\n rows.current.get(s.key)?.focus();\n }}\n >\n <DropdownMenu.Item disabled={isHero || i <= lo} onSelect={() => move(i, i - 1)}>{m.moveUp}</DropdownMenu.Item>\n <DropdownMenu.Item disabled={isHero || i >= sections.length - 1} onSelect={() => move(i, i + 1)}>{m.moveDown}</DropdownMenu.Item>\n <DropdownMenu.Item disabled={isHero || i <= lo} onSelect={() => move(i, lo)}>{m.moveTop}</DropdownMenu.Item>\n <DropdownMenu.Separator />\n <DropdownMenu.Item\n tone=\"danger\"\n disabled={sections.length <= 1}\n onSelect={() => {\n run({ type: \"removeSection\", key: s.key });\n announce(fill(m.announceRemoved, { name }));\n const next = sections[i + 1] ?? sections[i - 1];\n if (next) want(next.key);\n }}\n >\n {m.remove}\n </DropdownMenu.Item>\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n </li>\n );\n })}\n </ol>\n <Button variant=\"outline\" onClick={onAdd}>{m.addSection}</Button>\n </nav>\n );\n}\n"],"mappings":";;;AAGA,YAAYA,QAAO;;;ACAnB,YAAYC,QAAO;;;ACGZ,IAAM,cAAc;AAAA;AAAA,EAEzB,UAAU;AAAA;AAAA,EAEV,QAAQ;AAAA;AAAA,EAER,QAAQ;AAAA;AAAA,EAER,OAAO;AAAA;AAAA,EAEP,QAAQ;AAAA;AAAA,EAER,OAAO;AACT;;;ACnBA,YAAY,OAAO;AAGZ,IAAM,gBAAkB,SAAO;AAAA,EACpC,IAAM,WAAW,SAAO,EAAE,MAAQ,YAAU,GAAG,CAAC,CAAC;AAAA,EACjD,IAAM,WAAW,SAAO,EAAE,MAAQ,YAAU,GAAG,CAAC,CAAC;AACnD,CAAC;;;AFsCD,IAAM,MAAQ,UAAO,EAAE,MAAQ,aAAU,CAAC,GAAK,aAAU,EAAE,GAAK,SAAM,oBAAoB,kCAAkC,CAAC;AAGtH,SAAS,cACd,MACiC;AACjC,QAAM,aAAa,KAAK,UAAU,OAAO,KAAK,KAAK,MAAM,EAAE,SAAS,IAC9D;AAAA,IACA;AAAA,IACA,OAAO,QAAQ,KAAK,MAAM,EAAE;AAAA,MAAI,CA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AAC,0BAAAA,MAACI,SAAA,EAAO,SAAQ,SAAS,YAAE,QAAO,GAAS;AAAA,QACjE,gBAAAJ,MAACI,SAAA,EAAO,SAAQ,WAAU,UAAU,SAAS,SAAS,KAAK,CAAC,OAAO,IAAI,SAAS,YAAY;AAAE,gBAAM,UAAU,IAAI;AAAG,sBAAY,IAAI;AAAG,wBAAc,KAAK;AAAA,QAAG,GAAI,YAAE,gBAAe;AAAA,SACrL;AAAA,OACF,GACF;AAAA,IAEA,gBAAAJ,MAAC,OAAO,MAAP,EAAY,MAAM,aAAa,cAAc,gBAC5C,0BAAAC,OAAC,OAAO,SAAP,EAAe,YAAY,EAAE,cAAc,MAAK,MAC/C;AAAA,sBAAAD,MAAC,OAAO,QAAP,EAAc,0BAAAA,MAAC,OAAO,OAAP,EAAc,YAAE,SAAQ,GAAe;AAAA,MACvD,gBAAAA,MAAC,OAAO,MAAP,EAAY,WAAU,OACpB,yBAAe,gBAAAA,MAAC,gBAAa,KAAK,YAAY,OAAO,EAAE,cAAc,OAAK,MAAC,OAAc,GAC5F;AAAA,OACF,GACF;AAAA,KACF;AAEJ;","names":["z","z","same","key","Button","RadioGroup","React","z","key","Button","RadioGroup","React","optional","key","jsx","jsxs","fill","jsx","jsxs","buttonVariants","React","jsx","React","Fragment","jsx","jsxs","lead","React","Fragment","jsx","jsxs","lead","jsx","jsx","jsxs","buttonVariants","jsx","jsx","jsxs","jsx","jsxs","lead","jsx","jsxs","tv","jsx","jsx","jsxs","summary","review","buttonVariants","React","jsx","jsxs","buttonVariants","lead","jsx","jsx","jsxs","Avatar","jsx","jsxs","lead","Avatar","EmbedFacade","RetroTv","jsx","jsxs","lead","className","EmbedFacade","tv","RetroTv","jsx","jsxs","jsx","jsx","jsxs","run","Button","RadioGroup","RadioGroup","jsx","jsxs","run","RadioGroup","Button","Switch","React","jsx","jsxs","same","run","key","Switch","Button","jsx","jsxs","key","addSection","Button","RadioGroup"]}
|