@krizaka/ui 3.63.1 → 3.64.1
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/dist/account-menu.d.ts +1 -1
- package/dist/account-menu.js +1 -1
- package/dist/account-settings.d.ts +61 -4
- package/dist/account-settings.js +206 -44
- package/dist/account-settings.js.map +1 -1
- package/dist/avatar/defaults.d.ts +16 -5
- package/dist/avatar/defaults.js +15 -1
- package/dist/avatar/defaults.js.map +1 -1
- package/dist/{avatar-BL2iG_Js.d.ts → avatar-BdZcfkWR.d.ts} +11 -4
- package/dist/avatar.d.ts +16 -5
- package/dist/avatar.js +15 -1
- package/dist/avatar.js.map +1 -1
- package/dist/blocks.css +41 -0
- package/dist/chat.js +1 -1
- package/dist/chunk-5D7NMUF6.js +35 -0
- package/dist/chunk-5D7NMUF6.js.map +1 -0
- package/dist/chunk-A7MQPIEG.js +31 -0
- package/dist/chunk-A7MQPIEG.js.map +1 -0
- package/dist/chunk-B47WSPMP.js +60 -0
- package/dist/chunk-B47WSPMP.js.map +1 -0
- package/dist/chunk-EUJ7337V.js +137 -0
- package/dist/chunk-EUJ7337V.js.map +1 -0
- package/dist/chunk-HK525THY.js +139 -0
- package/dist/chunk-HK525THY.js.map +1 -0
- package/dist/chunk-HKEAYSFS.js +19 -0
- package/dist/chunk-HKEAYSFS.js.map +1 -0
- package/dist/{chunk-3D2YI63L.js → chunk-SHBYNQFS.js} +7 -2
- package/dist/{chunk-3D2YI63L.js.map → chunk-SHBYNQFS.js.map} +1 -1
- package/dist/chunk-ZYHWJ7U5.js +20 -0
- package/dist/chunk-ZYHWJ7U5.js.map +1 -0
- package/dist/cover-hero.d.ts +4 -0
- package/dist/cover-hero.js +5 -2
- package/dist/cover-hero.js.map +1 -1
- package/dist/dashboard-layout.js +2 -1
- package/dist/dashboard-layout.js.map +1 -1
- package/dist/docs-layout.js +1 -1
- package/dist/filter-bar.d.ts +3 -3
- package/dist/frame-D6Xv83t8.d.ts +52 -0
- package/dist/match-dialog.js +1 -1
- package/dist/media-grid.d.ts +8 -3
- package/dist/media-grid.js +1 -1
- package/dist/native.d.ts +8 -3
- package/dist/native.js +51 -0
- package/dist/native.js.map +1 -1
- package/dist/service-card.d.ts +25 -1
- package/dist/service-card.js +7 -3
- package/dist/service-card.js.map +1 -1
- package/dist/shop/booking.d.ts +36 -0
- package/dist/shop/booking.js +37 -0
- package/dist/shop/booking.js.map +1 -0
- package/dist/shop/bulletin.d.ts +28 -0
- package/dist/shop/bulletin.js +29 -0
- package/dist/shop/bulletin.js.map +1 -0
- package/dist/shop/demo.d.ts +135 -0
- package/dist/shop/demo.js +141 -0
- package/dist/shop/demo.js.map +1 -0
- package/dist/shop/faq.d.ts +20 -0
- package/dist/shop/faq.js +33 -0
- package/dist/shop/faq.js.map +1 -0
- package/dist/shop/gallery.d.ts +46 -0
- package/dist/shop/gallery.js +76 -0
- package/dist/shop/gallery.js.map +1 -0
- package/dist/shop/hero.d.ts +36 -0
- package/dist/shop/hero.js +70 -0
- package/dist/shop/hero.js.map +1 -0
- package/dist/shop/map-gate.d.ts +22 -0
- package/dist/shop/map-gate.js +34 -0
- package/dist/shop/map-gate.js.map +1 -0
- package/dist/shop/policies.d.ts +18 -0
- package/dist/shop/policies.js +16 -0
- package/dist/shop/policies.js.map +1 -0
- package/dist/shop/reviews.d.ts +25 -0
- package/dist/shop/reviews.js +47 -0
- package/dist/shop/reviews.js.map +1 -0
- package/dist/shop/services.d.ts +57 -0
- package/dist/shop/services.js +118 -0
- package/dist/shop/services.js.map +1 -0
- package/dist/shop/social.d.ts +27 -0
- package/dist/shop/social.js +27 -0
- package/dist/shop/social.js.map +1 -0
- package/dist/shop/story.d.ts +24 -0
- package/dist/shop/story.js +26 -0
- package/dist/shop/story.js.map +1 -0
- package/dist/shop/team.d.ts +24 -0
- package/dist/shop/team.js +26 -0
- package/dist/shop/team.js.map +1 -0
- package/dist/shop/video.d.ts +40 -0
- package/dist/shop/video.js +33 -0
- package/dist/shop/video.js.map +1 -0
- package/dist/shop/visit.d.ts +29 -0
- package/dist/shop/visit.js +38 -0
- package/dist/shop/visit.js.map +1 -0
- package/dist/shop-composer.d.ts +490 -0
- package/dist/shop-composer.js +2061 -0
- package/dist/shop-composer.js.map +1 -0
- package/dist/shop.d.ts +316 -0
- package/dist/shop.js +389 -0
- package/dist/shop.js.map +1 -0
- package/dist/vertical-video.js +1 -1
- package/package.json +267 -9
- package/registry/account-menu.json +1 -1
- package/registry/account-settings.json +67 -6
- package/registry/achievement.json +1 -1
- package/registry/action-bar.json +1 -1
- package/registry/activity-feed.json +1 -1
- package/registry/agenda.json +1 -1
- package/registry/alert.json +1 -1
- package/registry/analysis-report.json +1 -1
- package/registry/anatomy-plate.json +1 -1
- package/registry/app-header.json +1 -1
- package/registry/app-shell.json +1 -1
- package/registry/argument-card.json +1 -1
- package/registry/audio-player.json +1 -1
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +6 -5
- package/registry/badge.json +1 -1
- package/registry/bird-plate.json +1 -1
- 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 +1 -1
- 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 +1 -1
- package/registry/choice-grid.json +1 -1
- package/registry/code-block.json +1 -1
- 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/countdown.json +1 -1
- package/registry/cover-hero.json +2 -2
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +2 -2
- package/registry/data-table.json +1 -1
- package/registry/date-picker.json +1 -1
- package/registry/decision-list.json +1 -1
- package/registry/description-list.json +1 -1
- 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 +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/elephant.json +2 -2
- package/registry/embed-facade.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/engine-flow.json +1 -1
- package/registry/environment-notice.json +1 -1
- package/registry/error-page.json +1 -1
- package/registry/examples/account-settings/avatar-picker-folder.d.ts +4 -0
- package/registry/examples/account-settings/avatar-picker-folder.js +27 -0
- package/registry/examples/account-settings/avatar-picker-folder.tsx +23 -0
- package/registry/examples/shop/booking-panel.d.ts +4 -0
- package/registry/examples/shop/booking-panel.js +12 -0
- package/registry/examples/shop/booking-panel.tsx +11 -0
- package/registry/examples/shop/booking-sticky.d.ts +4 -0
- package/registry/examples/shop/booking-sticky.js +15 -0
- package/registry/examples/shop/booking-sticky.tsx +12 -0
- package/registry/examples/shop/booking-strip.d.ts +4 -0
- package/registry/examples/shop/booking-strip.js +13 -0
- package/registry/examples/shop/booking-strip.tsx +12 -0
- package/registry/examples/shop/bulletin-banner.d.ts +4 -0
- package/registry/examples/shop/bulletin-banner.js +13 -0
- package/registry/examples/shop/bulletin-banner.tsx +12 -0
- package/registry/examples/shop/bulletin-board.d.ts +4 -0
- package/registry/examples/shop/bulletin-board.js +13 -0
- package/registry/examples/shop/bulletin-board.tsx +12 -0
- package/registry/examples/shop/cards.d.ts +4 -0
- package/registry/examples/shop/cards.js +13 -0
- package/registry/examples/shop/cards.tsx +12 -0
- package/registry/examples/shop/carousel.d.ts +4 -0
- package/registry/examples/shop/carousel.js +13 -0
- package/registry/examples/shop/carousel.tsx +12 -0
- package/registry/examples/shop/document.d.ts +4 -0
- package/registry/examples/shop/document.js +20 -0
- package/registry/examples/shop/document.tsx +13 -0
- package/registry/examples/shop/faq.d.ts +4 -0
- package/registry/examples/shop/faq.js +13 -0
- package/registry/examples/shop/faq.tsx +12 -0
- package/registry/examples/shop/gallery-filmstrip.d.ts +4 -0
- package/registry/examples/shop/gallery-filmstrip.js +13 -0
- package/registry/examples/shop/gallery-filmstrip.tsx +12 -0
- package/registry/examples/shop/gallery-grid.d.ts +4 -0
- package/registry/examples/shop/gallery-grid.js +13 -0
- package/registry/examples/shop/gallery-grid.tsx +12 -0
- package/registry/examples/shop/gallery-mosaic.d.ts +4 -0
- package/registry/examples/shop/gallery-mosaic.js +13 -0
- package/registry/examples/shop/gallery-mosaic.tsx +12 -0
- package/registry/examples/shop/gallery-wall.d.ts +4 -0
- package/registry/examples/shop/gallery-wall.js +13 -0
- package/registry/examples/shop/gallery-wall.tsx +12 -0
- package/registry/examples/shop/hero-banner.d.ts +4 -0
- package/registry/examples/shop/hero-banner.js +15 -0
- package/registry/examples/shop/hero-banner.tsx +14 -0
- package/registry/examples/shop/hero-poster.d.ts +4 -0
- package/registry/examples/shop/hero-poster.js +15 -0
- package/registry/examples/shop/hero-poster.tsx +14 -0
- package/registry/examples/shop/hero-split.d.ts +4 -0
- package/registry/examples/shop/hero-split.js +15 -0
- package/registry/examples/shop/hero-split.tsx +14 -0
- package/registry/examples/shop/hero-tv.d.ts +4 -0
- package/registry/examples/shop/hero-tv.js +15 -0
- package/registry/examples/shop/hero-tv.tsx +14 -0
- package/registry/examples/shop/index.d.ts +4 -0
- package/registry/examples/shop/index.js +13 -0
- package/registry/examples/shop/index.tsx +12 -0
- package/registry/examples/shop/menu-columns.d.ts +4 -0
- package/registry/examples/shop/menu-columns.js +13 -0
- package/registry/examples/shop/menu-columns.tsx +12 -0
- package/registry/examples/shop/menu.d.ts +4 -0
- package/registry/examples/shop/menu.js +25 -0
- package/registry/examples/shop/menu.tsx +21 -0
- package/registry/examples/shop/page.d.ts +4 -0
- package/registry/examples/shop/page.js +32 -0
- package/registry/examples/shop/page.tsx +27 -0
- package/registry/examples/shop/policies.d.ts +4 -0
- package/registry/examples/shop/policies.js +13 -0
- package/registry/examples/shop/policies.tsx +12 -0
- package/registry/examples/shop/reviews-quote.d.ts +4 -0
- package/registry/examples/shop/reviews-quote.js +13 -0
- package/registry/examples/shop/reviews-quote.tsx +12 -0
- package/registry/examples/shop/reviews-strip.d.ts +4 -0
- package/registry/examples/shop/reviews-strip.js +13 -0
- package/registry/examples/shop/reviews-strip.tsx +12 -0
- package/registry/examples/shop/reviews-summary-cards.d.ts +4 -0
- package/registry/examples/shop/reviews-summary-cards.js +13 -0
- package/registry/examples/shop/reviews-summary-cards.tsx +12 -0
- package/registry/examples/shop/social-facade.d.ts +4 -0
- package/registry/examples/shop/social-facade.js +13 -0
- package/registry/examples/shop/social-facade.tsx +12 -0
- package/registry/examples/shop/social-links.d.ts +4 -0
- package/registry/examples/shop/social-links.js +12 -0
- package/registry/examples/shop/social-links.tsx +11 -0
- package/registry/examples/shop/story-owner.d.ts +4 -0
- package/registry/examples/shop/story-owner.js +13 -0
- package/registry/examples/shop/story-owner.tsx +12 -0
- package/registry/examples/shop/story-quote.d.ts +4 -0
- package/registry/examples/shop/story-quote.js +13 -0
- package/registry/examples/shop/story-quote.tsx +12 -0
- package/registry/examples/shop/team-cards.d.ts +4 -0
- package/registry/examples/shop/team-cards.js +13 -0
- package/registry/examples/shop/team-cards.tsx +12 -0
- package/registry/examples/shop/team-row.d.ts +4 -0
- package/registry/examples/shop/team-row.js +13 -0
- package/registry/examples/shop/team-row.tsx +12 -0
- package/registry/examples/shop/video-shorts.d.ts +4 -0
- package/registry/examples/shop/video-shorts.js +14 -0
- package/registry/examples/shop/video-shorts.tsx +13 -0
- package/registry/examples/shop/video-tv.d.ts +4 -0
- package/registry/examples/shop/video-tv.js +13 -0
- package/registry/examples/shop/video-tv.tsx +12 -0
- package/registry/examples/shop/visit-card.d.ts +4 -0
- package/registry/examples/shop/visit-card.js +13 -0
- package/registry/examples/shop/visit-card.tsx +12 -0
- package/registry/examples/shop/visit-map.d.ts +4 -0
- package/registry/examples/shop/visit-map.js +13 -0
- package/registry/examples/shop/visit-map.tsx +12 -0
- package/registry/examples/shop/visit-split.d.ts +4 -0
- package/registry/examples/shop/visit-split.js +13 -0
- package/registry/examples/shop/visit-split.tsx +12 -0
- package/registry/examples/shop-composer/composer.d.ts +4 -0
- package/registry/examples/shop-composer/composer.js +17 -0
- package/registry/examples/shop-composer/composer.tsx +21 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +1 -1
- package/registry/filter-bar.json +1 -1
- package/registry/flock.json +1 -1
- package/registry/footnote.json +1 -1
- package/registry/force-update-screen.json +1 -1
- package/registry/form.json +1 -1
- package/registry/gallery-page.json +1 -1
- package/registry/genui.json +1 -1
- package/registry/glossary-term.json +1 -1
- package/registry/glossary.json +1 -1
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/grade-stamp.json +1 -1
- package/registry/how-it-works-page.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +98 -7
- package/registry/iso.json +1 -1
- package/registry/kanban.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/kind-config-editor.json +1 -1
- package/registry/kpi-explained.json +1 -1
- 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 +2 -2
- package/registry/margin-layout.json +1 -1
- package/registry/markdown.json +1 -1
- package/registry/marketing-layout.json +1 -1
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +1 -1
- package/registry/mascot-state.json +1 -1
- package/registry/mascots.json +1 -1
- package/registry/match-dialog.json +1 -1
- package/registry/media-capture.json +1 -1
- package/registry/media-gallery.json +1 -1
- package/registry/media-grid.json +1 -1
- package/registry/meta-row.json +1 -1
- package/registry/meter.json +1 -1
- package/registry/nav-bar.json +2 -2
- package/registry/next-actions.json +1 -1
- package/registry/notification-preferences.json +1 -1
- 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 +1 -1
- package/registry/page.json +1 -1
- package/registry/pagination.json +1 -1
- package/registry/photo-grid.json +1 -1
- package/registry/pointer-light.json +1 -1
- package/registry/popover.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/quota-meter.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/rail-nav.json +2 -2
- package/registry/recipes.json +1 -1
- package/registry/retro-tv.json +1 -1
- package/registry/reviews.json +1 -1
- package/registry/router.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 +24 -6
- package/registry/settings-layout.json +1 -1
- package/registry/shop-composer.json +424 -0
- package/registry/shop.json +776 -0
- package/registry/showcase.json +1 -1
- package/registry/signature.json +1 -1
- package/registry/site-cahier.json +1 -1
- package/registry/site-footer.json +2 -2
- 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 +1 -1
- 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 +1 -1
- package/registry/status-chip.json +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/registry/verified-badge.json +1 -1
- package/registry/versus-card.json +1 -1
- package/registry/vertical-video.json +1 -1
- package/registry/video-player.json +1 -1
- package/registry/video-trimmer.json +1 -1
- package/registry/virtual.json +1 -1
- package/registry/wall.json +3 -3
- package/registry/waveform.json +1 -1
- package/dist/chunk-7AZ23BUX.js +0 -88
- package/dist/chunk-7AZ23BUX.js.map +0 -1
- package/dist/chunk-PW2FVPTV.js +0 -85
- package/dist/chunk-PW2FVPTV.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shop/demo/media.ts","../../src/shop/demo/index.ts"],"sourcesContent":["// 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"],"mappings":";AAGO,IAAM,cAAc;AAAA,EACzB,aAAa;AAAA,EACb,cAAc;AAAA,EACd,cAAc;AAAA,EACd,aAAa;AAAA,EACb,cAAc;AAAA,EACd,eAAe;AAAA,EACf,aAAa;AAAA,EACb,eAAe;AAAA,EACf,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,gBAAgB;AAClB;;;ACXO,IAAM,YAAY,CAAC,MAAiB,SAA4B,EAAE,KAAK,YAAY,IAAI,GAAG,IAAI;AAqBrG,IAAM,OAAO,CAAC,OAAe,SAAS,aACpC,CAAC,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,KAAK,EAAE,IAAI,CAAC,OAAO,OAAO,EAAE,IAAI,OAAO,IAAI,CAAC,GAAG,OAAO,OAAO,MAAM,IAAI,SAAS,MAAM,EAAE;AAE9H,IAAM,YAAsB;AAAA,EACjC,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,OAAO,UAAU,eAAe,wEAAwE;AAAA,EACxG,UAAU;AAAA,IACR,EAAE,IAAI,SAAS,MAAM,aAAa,OAAO,OAAO,UAAU,UAAU,aAAa,oCAAoC,UAAU,QAAQ,MAAM,cAAc;AAAA,IAC3J,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,IAAI,QAAQ,UAAU,UAAmB,KAAK,iEAAiE,OAAO,0BAA0B;AAEnK,IAAM,aAAa;AAAA,EACxB,EAAE,IAAI,MAAM,MAAM,mDAAmD,WAAW,QAAQ,OAAO,aAAa;AAAA,EAC5G,EAAE,IAAI,MAAM,MAAM,sDAAiD,WAAW,WAAQ,OAAO,aAAa;AAAA,EAC1G,EAAE,IAAI,MAAM,MAAM,0CAA0C,WAAW,UAAU;AACnF;AAEO,IAAM,UAAU;AAAA,EACrB,EAAE,IAAI,MAAM,UAAU,sBAAsB,QAAQ,qGAAqG;AAAA,EACzJ,EAAE,IAAI,MAAM,UAAU,iBAAiB,QAAQ,gFAAgF;AAAA,EAC/H,EAAE,IAAI,MAAM,UAAU,yBAAyB,QAAQ,sDAAmD;AAC5G;AAEO,IAAM,eAAe;AAAA,EAC1B,EAAE,IAAI,MAAM,MAAM,gBAAgB,SAAS,6BAA6B;AAAA,EACxE,EAAE,IAAI,MAAM,MAAM,UAAU,SAAS,wDAAwD;AAAA,EAC7F,EAAE,IAAI,MAAM,MAAM,kBAAkB,SAAS,sBAAsB;AACrE;AAEO,IAAM,YAAY;AAAA,EACvB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO,EAAE,MAAM,OAAO;AACxB;AAEO,IAAM,UAAU,EAAE,OAAO,sBAAsB,QAAQ,CAAC,UAAU,OAAO,GAAuB,MAAM,IAAI,WAAW,gBAAgB,QAAQ,CAAC,EAAE,UAAU,CAAC,UAAU,OAAO,GAAuB,OAAO,2BAAwB,CAAC,EAAE;","names":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type ShopQuestion = {
|
|
4
|
+
id: string;
|
|
5
|
+
question: string;
|
|
6
|
+
answer: string;
|
|
7
|
+
};
|
|
8
|
+
type FaqSectionProps = Omit<React.ComponentProps<"section">, "title"> & {
|
|
9
|
+
/** @default "list" */
|
|
10
|
+
variant?: "list";
|
|
11
|
+
title: React.ReactNode;
|
|
12
|
+
questions: readonly ShopQuestion[];
|
|
13
|
+
};
|
|
14
|
+
/** The FAQPage structured data of a list of questions, as a JSON string safe inside a `script`. */
|
|
15
|
+
declare function faqJsonLd(questions: readonly ShopQuestion[]): string;
|
|
16
|
+
/** The questions and their answers. */
|
|
17
|
+
declare function FaqSection({ title, questions, className, ...props }: FaqSectionProps): React.JSX.Element | null;
|
|
18
|
+
|
|
19
|
+
export { FaqSection, faqJsonLd };
|
|
20
|
+
export type { FaqSectionProps, ShopQuestion };
|
package/dist/shop/faq.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ShopSection
|
|
3
|
+
} from "../chunk-A7MQPIEG.js";
|
|
4
|
+
import "../chunk-B47WSPMP.js";
|
|
5
|
+
|
|
6
|
+
// src/shop/faq/faq.tsx
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
function faqJsonLd(questions) {
|
|
9
|
+
const data = {
|
|
10
|
+
"@context": "https://schema.org",
|
|
11
|
+
"@type": "FAQPage",
|
|
12
|
+
mainEntity: questions.map((q) => ({ "@type": "Question", name: q.question, acceptedAnswer: { "@type": "Answer", text: q.answer } }))
|
|
13
|
+
};
|
|
14
|
+
return JSON.stringify(data).replace(/</g, "\\u003c");
|
|
15
|
+
}
|
|
16
|
+
function FaqSection({ title, questions, className, ...props }) {
|
|
17
|
+
if (questions.length === 0) return null;
|
|
18
|
+
return /* @__PURE__ */ jsxs(ShopSection, { title, className, "data-variant": "list", ...props, children: [
|
|
19
|
+
/* @__PURE__ */ jsx("div", { className: "max-w-3xl divide-y divide-border-subtle border-y border-border-subtle", children: questions.map((q) => /* @__PURE__ */ jsxs("details", { className: "group py-3", children: [
|
|
20
|
+
/* @__PURE__ */ jsxs("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", children: [
|
|
21
|
+
q.question,
|
|
22
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "shrink-0 text-fg-secondary transition-transform group-open:rotate-45 motion-reduce:transition-none", children: "+" })
|
|
23
|
+
] }),
|
|
24
|
+
/* @__PURE__ */ jsx("p", { className: "m-0 mt-2 text-[15px] leading-relaxed text-fg-secondary", children: q.answer })
|
|
25
|
+
] }, q.id)) }),
|
|
26
|
+
/* @__PURE__ */ jsx("script", { type: "application/ld+json", dangerouslySetInnerHTML: { __html: faqJsonLd(questions) } })
|
|
27
|
+
] });
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
FaqSection,
|
|
31
|
+
faqJsonLd
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=faq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shop/faq/faq.tsx"],"sourcesContent":["// Server-safe. The questions clients ask (ADR-007 §3): a native `details` each — no script — and the page's FAQPage\n// JSON-LD, so a search engine reads the same answers.\nimport * as React from \"react\";\n\nimport { ShopSection } from \"../frame\";\n\nexport type ShopQuestion = { id: string; question: string; answer: string };\n\nexport type FaqSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** @default \"list\" */\n variant?: \"list\";\n title: React.ReactNode;\n questions: readonly ShopQuestion[];\n};\n\n/** The FAQPage structured data of a list of questions, as a JSON string safe inside a `script`. */\nexport function faqJsonLd(questions: readonly ShopQuestion[]): string {\n const data = {\n \"@context\": \"https://schema.org\",\n \"@type\": \"FAQPage\",\n mainEntity: questions.map((q) => ({ \"@type\": \"Question\", name: q.question, acceptedAnswer: { \"@type\": \"Answer\", text: q.answer } })),\n };\n return JSON.stringify(data).replace(/</g, \"\\\\u003c\");\n}\n\n/** The questions and their answers. */\nexport function FaqSection({ title, questions, className, ...props }: FaqSectionProps) {\n if (questions.length === 0) return null;\n return (\n <ShopSection title={title} className={className} data-variant=\"list\" {...props}>\n <div className=\"max-w-3xl divide-y divide-border-subtle border-y border-border-subtle\">\n {questions.map((q) => (\n <details key={q.id} className=\"group py-3\">\n <summary className=\"flex min-h-11 cursor-pointer list-none items-center justify-between gap-4 font-semibold text-fg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring [&::-webkit-details-marker]:hidden\">\n {q.question}\n <span aria-hidden className=\"shrink-0 text-fg-secondary transition-transform group-open:rotate-45 motion-reduce:transition-none\">+</span>\n </summary>\n <p className=\"m-0 mt-2 text-[15px] leading-relaxed text-fg-secondary\">{q.answer}</p>\n </details>\n ))}\n </div>\n <script type=\"application/ld+json\" dangerouslySetInnerHTML={{ __html: faqJsonLd(questions) }} />\n </ShopSection>\n );\n}\n"],"mappings":";;;;;;AAiCY,SAEE,KAFF;AAjBL,SAAS,UAAU,WAA4C;AACpE,QAAM,OAAO;AAAA,IACX,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,YAAY,UAAU,IAAI,CAAC,OAAO,EAAE,SAAS,YAAY,MAAM,EAAE,UAAU,gBAAgB,EAAE,SAAS,UAAU,MAAM,EAAE,OAAO,EAAE,EAAE;AAAA,EACrI;AACA,SAAO,KAAK,UAAU,IAAI,EAAE,QAAQ,MAAM,SAAS;AACrD;AAGO,SAAS,WAAW,EAAE,OAAO,WAAW,WAAW,GAAG,MAAM,GAAoB;AACrF,MAAI,UAAU,WAAW,EAAG,QAAO;AACnC,SACE,qBAAC,eAAY,OAAc,WAAsB,gBAAa,QAAQ,GAAG,OACvE;AAAA,wBAAC,SAAI,WAAU,yEACZ,oBAAU,IAAI,CAAC,MACd,qBAAC,aAAmB,WAAU,cAC5B;AAAA,2BAAC,aAAQ,WAAU,wNAChB;AAAA,UAAE;AAAA,QACH,oBAAC,UAAK,eAAW,MAAC,WAAU,sGAAqG,eAAC;AAAA,SACpI;AAAA,MACA,oBAAC,OAAE,WAAU,0DAA0D,YAAE,QAAO;AAAA,SALpE,EAAE,EAMhB,CACD,GACH;AAAA,IACA,oBAAC,YAAO,MAAK,uBAAsB,yBAAyB,EAAE,QAAQ,UAAU,SAAS,EAAE,GAAG;AAAA,KAChG;AAEJ;","names":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ShopPhoto } from '../shop.js';
|
|
3
|
+
|
|
4
|
+
type GalleryVariant = "mosaic" | "filmstrip" | "wall" | "grid";
|
|
5
|
+
type ShopGalleryPhoto = {
|
|
6
|
+
id: string;
|
|
7
|
+
photo: ShopPhoto;
|
|
8
|
+
caption?: string;
|
|
9
|
+
/** `grid`: a muted loop over the still. */
|
|
10
|
+
video?: {
|
|
11
|
+
webm?: string;
|
|
12
|
+
mp4?: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
type ShopGalleryNote = {
|
|
16
|
+
id: string;
|
|
17
|
+
text: string;
|
|
18
|
+
signature?: string;
|
|
19
|
+
};
|
|
20
|
+
type GallerySectionProps = Omit<React.ComponentProps<"section">, "title"> & {
|
|
21
|
+
/** @default "mosaic" */
|
|
22
|
+
variant?: GalleryVariant;
|
|
23
|
+
/** The shop's own photos, in order, already unique. */
|
|
24
|
+
photos: readonly ShopGalleryPhoto[];
|
|
25
|
+
title: React.ReactNode;
|
|
26
|
+
lead?: React.ReactNode;
|
|
27
|
+
/** The gallery's accessible name (`Photos of the salon`). */
|
|
28
|
+
label: string;
|
|
29
|
+
/** `wall`: short notes pinned between the photos. */
|
|
30
|
+
notes?: readonly ShopGalleryNote[];
|
|
31
|
+
/** `wall`: the shop's name on its sign. */
|
|
32
|
+
sign?: string;
|
|
33
|
+
/** `wall`: the wall's texture. @default "plaster" */
|
|
34
|
+
texture?: "plaster" | "brick" | "ridge" | "zellige";
|
|
35
|
+
};
|
|
36
|
+
/** A deterministic scatter: the same photos always hang the same way (no random, so no hydration mismatch). */
|
|
37
|
+
declare function wallLayout(count: number): {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
rotation: number;
|
|
41
|
+
}[];
|
|
42
|
+
/** The photos of a shop: a mosaic, a filmstrip, a wall or a grid. */
|
|
43
|
+
declare function GallerySection({ variant, photos, title, lead, label, notes, sign, texture, className, ...props }: GallerySectionProps): React.JSX.Element;
|
|
44
|
+
|
|
45
|
+
export { GallerySection, wallLayout };
|
|
46
|
+
export type { GallerySectionProps, GalleryVariant, ShopGalleryNote, ShopGalleryPhoto };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Photo
|
|
3
|
+
} from "../chunk-5D7NMUF6.js";
|
|
4
|
+
import {
|
|
5
|
+
SHOP_LIMITS
|
|
6
|
+
} from "../chunk-ZYHWJ7U5.js";
|
|
7
|
+
import {
|
|
8
|
+
ShopSection
|
|
9
|
+
} from "../chunk-A7MQPIEG.js";
|
|
10
|
+
import {
|
|
11
|
+
cn
|
|
12
|
+
} from "../chunk-B47WSPMP.js";
|
|
13
|
+
|
|
14
|
+
// src/shop/gallery/gallery.tsx
|
|
15
|
+
import { MediaGallery } from "@krizaka/ui/media-gallery";
|
|
16
|
+
import { Wall } from "@krizaka/ui/wall";
|
|
17
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
+
function wallLayout(count) {
|
|
19
|
+
const perRow = Math.min(5, Math.max(1, Math.ceil(count / 2)));
|
|
20
|
+
return Array.from({ length: count }, (_, i) => {
|
|
21
|
+
const row = Math.floor(i / perRow);
|
|
22
|
+
const col = i % perRow;
|
|
23
|
+
const inRow = Math.min(perRow, count - row * perRow);
|
|
24
|
+
const x = inRow === 1 ? 50 : col / (inRow - 1) * 100;
|
|
25
|
+
const y = row === 0 ? count <= perRow ? 50 : 8 + col % 2 * 6 : 92 - col % 2 * 6;
|
|
26
|
+
return { x, y, rotation: [-2.2, 1.6, -1.2, 2.4, -1.8][(i * 3 + 1) % 5] };
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function Mosaic({ photos }) {
|
|
30
|
+
const [lead, ...rest] = photos;
|
|
31
|
+
if (!lead) return null;
|
|
32
|
+
return /* @__PURE__ */ jsxs("ul", { className: "m-0 grid list-none grid-cols-2 gap-2 p-0 sm:grid-cols-[1.6fr_1fr_1fr] sm:gap-3", children: [
|
|
33
|
+
/* @__PURE__ */ jsx("li", { className: "col-span-2 aspect-[16/11] sm:col-span-1 sm:row-span-2 sm:aspect-auto", children: /* @__PURE__ */ jsx(Photo, { photo: lead.photo, ratio: "4/5", sizes: "(min-width: 40rem) 36rem, 100vw", className: "h-full min-h-0 sm:aspect-auto" }) }),
|
|
34
|
+
rest.slice(0, 4).map((p) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Photo, { photo: p.photo, ratio: "1/1", sizes: "(min-width: 40rem) 18rem, 50vw" }) }, p.id))
|
|
35
|
+
] });
|
|
36
|
+
}
|
|
37
|
+
function Filmstrip({ photos, label }) {
|
|
38
|
+
return /* @__PURE__ */ jsx("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", children: /* @__PURE__ */ jsx("ul", { className: "m-0 flex w-max snap-x snap-mandatory list-none gap-3 p-0", children: photos.map((p) => /* @__PURE__ */ jsx("li", { className: "w-[42vw] max-w-64 shrink-0 snap-start sm:w-64", children: /* @__PURE__ */ jsx(Photo, { photo: p.photo, ratio: "3/4", sizes: "(min-width: 40rem) 16rem, 42vw" }) }, p.id)) }) });
|
|
39
|
+
}
|
|
40
|
+
function ShopWall({ photos, notes, sign, texture, label }) {
|
|
41
|
+
const pieces = [
|
|
42
|
+
...sign ? [{ id: "sign", kind: "sign", children: sign, variant: "neon" }] : [],
|
|
43
|
+
...photos.slice(0, SHOP_LIMITS.photos).map((p) => ({
|
|
44
|
+
id: p.id,
|
|
45
|
+
kind: "polaroid",
|
|
46
|
+
img: /* @__PURE__ */ jsx("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" }),
|
|
47
|
+
caption: p.caption
|
|
48
|
+
})),
|
|
49
|
+
...notes.map((n) => ({ id: n.id, kind: "note", text: n.text, signature: n.signature }))
|
|
50
|
+
];
|
|
51
|
+
const layout = wallLayout(pieces.length);
|
|
52
|
+
const items = pieces.map((piece, i) => ({ ...piece, ...layout[i], z: i }));
|
|
53
|
+
return /* @__PURE__ */ jsx(Wall, { "aria-label": label, items, texture, itemWidth: 220, max: SHOP_LIMITS.photos + 2 });
|
|
54
|
+
}
|
|
55
|
+
function GallerySection({ variant = "mosaic", photos, title, lead, label, notes = [], sign, texture = "plaster", className, ...props }) {
|
|
56
|
+
const shown = photos.slice(0, SHOP_LIMITS.photos);
|
|
57
|
+
const bodies = {
|
|
58
|
+
mosaic: () => /* @__PURE__ */ jsx(Mosaic, { photos: shown }),
|
|
59
|
+
filmstrip: () => /* @__PURE__ */ jsx(Filmstrip, { photos: shown, label }),
|
|
60
|
+
wall: () => /* @__PURE__ */ jsx(ShopWall, { photos: shown, notes, sign, texture, label }),
|
|
61
|
+
grid: () => /* @__PURE__ */ jsx(
|
|
62
|
+
MediaGallery,
|
|
63
|
+
{
|
|
64
|
+
label,
|
|
65
|
+
items: shown.map((p) => ({ id: p.id, src: p.photo.src, alt: p.photo.alt, caption: p.caption, video: p.video, shape: "wide" }))
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
};
|
|
69
|
+
const body = bodies[variant]();
|
|
70
|
+
return /* @__PURE__ */ jsx(ShopSection, { title, lead, className: cn(className), "data-variant": variant, ...props, children: body });
|
|
71
|
+
}
|
|
72
|
+
export {
|
|
73
|
+
GallerySection,
|
|
74
|
+
wallLayout
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=gallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shop/gallery/gallery.tsx"],"sourcesContent":["// 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"],"mappings":";;;;;;;;;;;;;;AAIA,SAAS,oBAAoB;AAC7B,SAAS,YAA2B;AAuDhC,SAEI,KAFJ;AAhBG,SAAS,WAAW,OAA6D;AACtF,QAAM,SAAS,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC;AAC5D,SAAO,MAAM,KAAK,EAAE,QAAQ,MAAM,GAAG,CAAC,GAAG,MAAM;AAC7C,UAAM,MAAM,KAAK,MAAM,IAAI,MAAM;AACjC,UAAM,MAAM,IAAI;AAChB,UAAM,QAAQ,KAAK,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AAS,OAAO,EAAE,OAAO,OAAO,OAAgB,EAAE;AAAA;AAAA,IACxI;AAAA,EAEJ;AACA,QAAM,OAAO,OAAO,OAAO,EAAE;AAC7B,SACE,oBAAC,eAAY,OAAc,MAAY,WAAW,GAAG,SAAS,GAAG,gBAAc,SAAU,GAAG,OACzF,gBACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { RetroTvProps } from '@krizaka/ui/retro-tv';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ShopPhoto } from '../shop.js';
|
|
4
|
+
|
|
5
|
+
type HeroVariant = "poster" | "split" | "banner" | "tv";
|
|
6
|
+
type HeroSectionProps = Omit<React.ComponentProps<"header">, "title"> & {
|
|
7
|
+
/** The drawing. @default "poster" */
|
|
8
|
+
variant?: HeroVariant;
|
|
9
|
+
/** The shop's name: the page's `h1`. */
|
|
10
|
+
title: string;
|
|
11
|
+
/** A short mono line above the name (`Saint-Henri · Montréal`). */
|
|
12
|
+
eyebrow?: React.ReactNode;
|
|
13
|
+
/** One line: what the shop promises. */
|
|
14
|
+
lead?: React.ReactNode;
|
|
15
|
+
/** Chips: open now, the area, the score — only what is true now. */
|
|
16
|
+
facts?: React.ReactNode;
|
|
17
|
+
/** The one action (`ButtonLink`, « Book »). */
|
|
18
|
+
actions?: React.ReactNode;
|
|
19
|
+
/** The cover: a photo (16:9), an optional 4:5 crop for a phone, an optional muted loop (`poster`). */
|
|
20
|
+
cover?: ShopPhoto & {
|
|
21
|
+
phone?: string;
|
|
22
|
+
video?: {
|
|
23
|
+
webm?: string;
|
|
24
|
+
mp4?: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
/** Where the photo is cropped to. @default "center" */
|
|
28
|
+
focus?: "center" | "top" | "bottom";
|
|
29
|
+
/** `tv`: the shop's latest video in the cabinet (`src`, `poster`, `label`, or an `EmbedFacade` as `children`). */
|
|
30
|
+
tv?: RetroTvProps;
|
|
31
|
+
};
|
|
32
|
+
/** The first section of a shop page: poster, split, banner or tv. */
|
|
33
|
+
declare function HeroSection({ variant, title, eyebrow, lead: leadText, facts, actions, cover, focus, tv, className, ...props }: HeroSectionProps): React.JSX.Element;
|
|
34
|
+
|
|
35
|
+
export { HeroSection };
|
|
36
|
+
export type { HeroSectionProps, HeroVariant };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Photo
|
|
3
|
+
} from "../chunk-5D7NMUF6.js";
|
|
4
|
+
import {
|
|
5
|
+
Page,
|
|
6
|
+
cn
|
|
7
|
+
} from "../chunk-B47WSPMP.js";
|
|
8
|
+
|
|
9
|
+
// src/shop/hero/hero.tsx
|
|
10
|
+
import { CoverHero } from "@krizaka/ui/cover-hero";
|
|
11
|
+
import { RetroTv } from "@krizaka/ui/retro-tv";
|
|
12
|
+
import { ShopSign } from "@krizaka/ui/wall";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
var lead = "m-0 max-w-xl text-base leading-relaxed text-fg-secondary sm:text-lg";
|
|
15
|
+
var eyebrowClass = "m-0 font-mono text-[13px] text-fg-accent";
|
|
16
|
+
var titleClass = "kz-shop-title m-0 font-display text-4xl leading-[1.05] tracking-tight text-fg sm:text-5xl";
|
|
17
|
+
function Text({ title, eyebrow, lead: leadText, facts, actions }) {
|
|
18
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col items-start gap-3", children: [
|
|
19
|
+
eyebrow && /* @__PURE__ */ jsx("p", { className: eyebrowClass, children: eyebrow }),
|
|
20
|
+
/* @__PURE__ */ jsx("h1", { className: titleClass, children: title }),
|
|
21
|
+
leadText && /* @__PURE__ */ jsx("p", { className: lead, children: leadText }),
|
|
22
|
+
facts && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-2", children: facts }),
|
|
23
|
+
actions && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-3 pt-1", children: actions })
|
|
24
|
+
] });
|
|
25
|
+
}
|
|
26
|
+
function HeroSection({ variant = "poster", title, eyebrow, lead: leadText, facts, actions, cover, focus = "center", tv, className, ...props }) {
|
|
27
|
+
if (variant === "poster") {
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
CoverHero,
|
|
30
|
+
{
|
|
31
|
+
"data-first": "",
|
|
32
|
+
"data-variant": "poster",
|
|
33
|
+
className: cn("kz-shop-section min-h-[24rem] sm:min-h-[28rem] lg:min-h-[31rem]", className),
|
|
34
|
+
cover: cover && { src: cover.src, alt: cover.alt, video: cover.video, phone: cover.phone, focus },
|
|
35
|
+
eyebrow,
|
|
36
|
+
title,
|
|
37
|
+
lead: leadText,
|
|
38
|
+
facts,
|
|
39
|
+
actions,
|
|
40
|
+
...props
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
const text = /* @__PURE__ */ jsx(Text, { title, eyebrow, lead: leadText, facts, actions });
|
|
45
|
+
if (variant === "split") {
|
|
46
|
+
return /* @__PURE__ */ jsx("header", { "data-first": "", "data-variant": "split", className: cn("kz-shop-section", className), ...props, children: /* @__PURE__ */ jsx(Page, { children: /* @__PURE__ */ jsxs("div", { className: "grid items-center gap-6 py-6 md:grid-cols-[minmax(0,1fr)_minmax(0,32rem)] md:gap-12 md:py-8", children: [
|
|
47
|
+
/* @__PURE__ */ jsx("div", { className: "order-2 md:order-1", children: text }),
|
|
48
|
+
cover && /* @__PURE__ */ jsx(Photo, { photo: cover, ratio: "4/5", priority: true, sizes: "(min-width: 48rem) 32rem, 100vw", className: "order-1 max-h-[26rem] md:order-2 md:max-h-none" })
|
|
49
|
+
] }) }) });
|
|
50
|
+
}
|
|
51
|
+
if (variant === "banner") {
|
|
52
|
+
return /* @__PURE__ */ jsxs("header", { "data-first": "", "data-variant": "banner", className: cn("kz-shop-section", className), ...props, children: [
|
|
53
|
+
cover && /* @__PURE__ */ jsx("div", { className: "mx-auto w-full max-w-[90rem]", children: /* @__PURE__ */ jsx(Photo, { photo: cover, ratio: "21/9", priority: true, sizes: "100vw", className: "rounded-none aspect-[3/2] sm:aspect-[21/9]" }) }),
|
|
54
|
+
/* @__PURE__ */ jsx(Page, { children: /* @__PURE__ */ jsx("div", { className: "py-6", children: text }) })
|
|
55
|
+
] });
|
|
56
|
+
}
|
|
57
|
+
return /* @__PURE__ */ jsx("header", { "data-first": "", "data-variant": "tv", className: cn("kz-shop-section", className), ...props, children: /* @__PURE__ */ jsx(Page, { children: /* @__PURE__ */ jsxs("div", { className: "grid items-center gap-6 py-6 md:grid-cols-[minmax(0,1fr)_17rem] md:gap-12 md:py-8", children: [
|
|
58
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col items-start gap-4", children: [
|
|
59
|
+
/* @__PURE__ */ jsx(ShopSign, { as: "h1", variant: "neon", children: title }),
|
|
60
|
+
leadText && /* @__PURE__ */ jsx("p", { className: lead, children: leadText }),
|
|
61
|
+
facts && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-2", children: facts }),
|
|
62
|
+
actions && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-3 pt-1", children: actions })
|
|
63
|
+
] }),
|
|
64
|
+
tv && /* @__PURE__ */ jsx(RetroTv, { ...tv, className: cn("mx-auto w-56 md:w-full", tv.className) })
|
|
65
|
+
] }) }) });
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
HeroSection
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=hero.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shop/hero/hero.tsx"],"sourcesContent":["// 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"],"mappings":";;;;;;;;;AAIA,SAAS,iBAAiB;AAC1B,SAAS,eAAkC;AAC3C,SAAS,gBAAgB;AAsCrB,SACc,KADd;AAPJ,IAAM,OAAO;AACb,IAAM,eAAe;AAErB,IAAM,aAAa;AAEnB,SAAS,KAAK,EAAE,OAAO,SAAS,MAAM,UAAU,OAAO,QAAQ,GAA+E;AAC5I,SACE,qBAAC,SAAI,WAAU,2CACZ;AAAA,eAAW,oBAAC,OAAE,WAAW,cAAe,mBAAQ;AAAA,IACjD,oBAAC,QAAG,WAAW,YAAa,iBAAM;AAAA,IACjC,YAAY,oBAAC,OAAE,WAAW,MAAO,oBAAS;AAAA,IAC1C,SAAS,oBAAC,SAAI,WAAU,qCAAqC,iBAAM;AAAA,IACnE,WAAW,oBAAC,SAAI,WAAU,0CAA0C,mBAAQ;AAAA,KAC/E;AAEJ;AAGO,SAAS,YAAY,EAAE,UAAU,UAAU,OAAO,SAAS,MAAM,UAAU,OAAO,SAAS,OAAO,QAAQ,UAAU,IAAI,WAAW,GAAG,MAAM,GAAqB;AACtK,MAAI,YAAY,UAAU;AACxB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,cAAW;AAAA,QACX,gBAAa;AAAA,QACb,WAAW,GAAG,mEAAmE,SAAS;AAAA,QAC1F,OAAO,SAAS,EAAE,KAAK,MAAM,KAAK,KAAK,MAAM,KAAK,OAAO,MAAM,OAAO,OAAO,MAAM,OAAO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AA,IACC,MAAM,oBAAC,WAAS,GAAG,IAAI,WAAW,GAAG,0BAA0B,GAAG,SAAS,GAAG;AAAA,KACjF,GACF,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StaticMapProps, MapProps } from '@krizaka/ui/map';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
type MapGateProps = {
|
|
5
|
+
/** The map's accessible name (`Where the salon is`). */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Longitude, latitude. */
|
|
8
|
+
center: StaticMapProps["center"];
|
|
9
|
+
zoom?: number;
|
|
10
|
+
/** Places drawn on the still and listed in its name. */
|
|
11
|
+
places?: StaticMapProps["places"];
|
|
12
|
+
/** The button's words (`Show the map`). */
|
|
13
|
+
showLabel: string;
|
|
14
|
+
/** More props of the live map (`brand`, `lang`, `labels`). */
|
|
15
|
+
map?: Partial<Omit<MapProps, "label" | "center" | "zoom" | "fallback">>;
|
|
16
|
+
className?: string;
|
|
17
|
+
};
|
|
18
|
+
/** The place as a still, the live map on a click — or at once on a screen that can afford it. */
|
|
19
|
+
declare function MapGate({ label, center, zoom, places, showLabel, map, className }: MapGateProps): React.JSX.Element;
|
|
20
|
+
|
|
21
|
+
export { MapGate };
|
|
22
|
+
export type { MapGateProps };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/shop/map-gate/map-gate.tsx
|
|
4
|
+
import { Map as LiveMap, StaticMap } from "@krizaka/ui/map";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
var WIDE = "(min-width: 40rem)";
|
|
8
|
+
function subscribeWide(notify) {
|
|
9
|
+
const q = window.matchMedia(WIDE);
|
|
10
|
+
q.addEventListener("change", notify);
|
|
11
|
+
return () => q.removeEventListener("change", notify);
|
|
12
|
+
}
|
|
13
|
+
function MapGate({ label, center, zoom = 14, places, showLabel, map, className }) {
|
|
14
|
+
const [asked, setAsked] = React.useState(false);
|
|
15
|
+
const wide = React.useSyncExternalStore(subscribeWide, () => window.matchMedia(WIDE).matches, () => false);
|
|
16
|
+
const live = asked || wide;
|
|
17
|
+
const still = /* @__PURE__ */ jsx(StaticMap, { label, center, zoom, places });
|
|
18
|
+
return /* @__PURE__ */ jsx("div", { className, "data-live": live ? "" : void 0, children: /* @__PURE__ */ jsxs("div", { className: "relative aspect-[4/3] w-full overflow-hidden rounded-xl border border-border-default sm:aspect-[16/9]", children: [
|
|
19
|
+
live ? /* @__PURE__ */ jsx(LiveMap, { label, center, zoom, fallback: still, ...map }) : still,
|
|
20
|
+
!live && /* @__PURE__ */ jsx(
|
|
21
|
+
"button",
|
|
22
|
+
{
|
|
23
|
+
type: "button",
|
|
24
|
+
onClick: () => setAsked(true),
|
|
25
|
+
className: "absolute bottom-3 left-3 inline-flex min-h-11 items-center rounded-md border border-border-control bg-surface-1 px-4 text-sm font-semibold text-fg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
|
|
26
|
+
children: showLabel
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
] }) });
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
MapGate
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=map-gate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shop/map-gate/map-gate.tsx"],"sourcesContent":["\"use client\";\n\n// A map behind a button on a phone (ADR-007 §3, §7). Until it is asked for, the page holds a still drawing of the place\n// (SVG, nothing requested) and a button: no engine, no tile, no request. From `sm` up the live map shows at once, because a\n// laptop can afford it. The tiles are the Krizaka CDN's: no third party.\nimport { Map as LiveMap, type MapProps, StaticMap, type StaticMapProps } from \"@krizaka/ui/map\";\nimport * as React from \"react\";\n\nexport type MapGateProps = {\n /** The map's accessible name (`Where the salon is`). */\n label: string;\n /** Longitude, latitude. */\n center: StaticMapProps[\"center\"];\n zoom?: number;\n /** Places drawn on the still and listed in its name. */\n places?: StaticMapProps[\"places\"];\n /** The button's words (`Show the map`). */\n showLabel: string;\n /** More props of the live map (`brand`, `lang`, `labels`). */\n map?: Partial<Omit<MapProps, \"label\" | \"center\" | \"zoom\" | \"fallback\">>;\n className?: string;\n};\n\nconst WIDE = \"(min-width: 40rem)\";\nfunction subscribeWide(notify: () => void) {\n const q = window.matchMedia(WIDE);\n q.addEventListener(\"change\", notify);\n return () => q.removeEventListener(\"change\", notify);\n}\n\n/** The place as a still, the live map on a click — or at once on a screen that can afford it. */\nexport function MapGate({ label, center, zoom = 14, places, showLabel, map, className }: MapGateProps) {\n const [asked, setAsked] = React.useState(false);\n // A screen that can afford it shows the live map at once; the server and a phone start with the still.\n const wide = React.useSyncExternalStore(subscribeWide, () => window.matchMedia(WIDE).matches, () => false);\n const live = asked || wide;\n const still = <StaticMap label={label} center={center} zoom={zoom} places={places} />;\n return (\n <div className={className} data-live={live ? \"\" : undefined}>\n <div className=\"relative aspect-[4/3] w-full overflow-hidden rounded-xl border border-border-default sm:aspect-[16/9]\">\n {live ? <LiveMap label={label} center={center} zoom={zoom} fallback={still} {...map} /> : still}\n {!live && (\n <button\n type=\"button\"\n onClick={() => setAsked(true)}\n className=\"absolute bottom-3 left-3 inline-flex min-h-11 items-center rounded-md border border-border-control bg-surface-1 px-4 text-sm font-semibold text-fg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\"\n >\n {showLabel}\n </button>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;AAKA,SAAS,OAAO,SAAwB,iBAAsC;AAC9E,YAAY,WAAW;AA8BP,cAGV,YAHU;AAbhB,IAAM,OAAO;AACb,SAAS,cAAc,QAAoB;AACzC,QAAM,IAAI,OAAO,WAAW,IAAI;AAChC,IAAE,iBAAiB,UAAU,MAAM;AACnC,SAAO,MAAM,EAAE,oBAAoB,UAAU,MAAM;AACrD;AAGO,SAAS,QAAQ,EAAE,OAAO,QAAQ,OAAO,IAAI,QAAQ,WAAW,KAAK,UAAU,GAAiB;AACrG,QAAM,CAAC,OAAO,QAAQ,IAAU,eAAS,KAAK;AAE9C,QAAM,OAAa,2BAAqB,eAAe,MAAM,OAAO,WAAW,IAAI,EAAE,SAAS,MAAM,KAAK;AACzG,QAAM,OAAO,SAAS;AACtB,QAAM,QAAQ,oBAAC,aAAU,OAAc,QAAgB,MAAY,QAAgB;AACnF,SACE,oBAAC,SAAI,WAAsB,aAAW,OAAO,KAAK,QAChD,+BAAC,SAAI,WAAU,yGACZ;AAAA,WAAO,oBAAC,WAAQ,OAAc,QAAgB,MAAY,UAAU,OAAQ,GAAG,KAAK,IAAK;AAAA,IACzF,CAAC,QACA;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,SAAS,MAAM,SAAS,IAAI;AAAA,QAC5B,WAAU;AAAA,QAET;AAAA;AAAA,IACH;AAAA,KAEJ,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type ShopPolicy = {
|
|
4
|
+
id: string;
|
|
5
|
+
term: string;
|
|
6
|
+
details: React.ReactNode;
|
|
7
|
+
};
|
|
8
|
+
type PoliciesSectionProps = Omit<React.ComponentProps<"section">, "title"> & {
|
|
9
|
+
/** @default "inline" */
|
|
10
|
+
variant?: "inline";
|
|
11
|
+
title: React.ReactNode;
|
|
12
|
+
items: readonly ShopPolicy[];
|
|
13
|
+
};
|
|
14
|
+
/** Cancellation, prices and the booking window, as term and value. */
|
|
15
|
+
declare function PoliciesSection({ title, items, className, ...props }: PoliciesSectionProps): React.JSX.Element | null;
|
|
16
|
+
|
|
17
|
+
export { PoliciesSection };
|
|
18
|
+
export type { PoliciesSectionProps, ShopPolicy };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ShopSection
|
|
3
|
+
} from "../chunk-A7MQPIEG.js";
|
|
4
|
+
import "../chunk-B47WSPMP.js";
|
|
5
|
+
|
|
6
|
+
// src/shop/policies/policies.tsx
|
|
7
|
+
import { DescriptionList } from "@krizaka/ui/description-list";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
function PoliciesSection({ title, items, className, ...props }) {
|
|
10
|
+
if (items.length === 0) return null;
|
|
11
|
+
return /* @__PURE__ */ jsx(ShopSection, { title, className, "data-variant": "inline", ...props, children: /* @__PURE__ */ jsx(DescriptionList, { layout: "inline", className: "max-w-3xl", items: items.map((p) => ({ id: p.id, term: p.term, details: p.details })) }) });
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
PoliciesSection
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=policies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shop/policies/policies.tsx"],"sourcesContent":["// 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 } from \"../frame\";\n\nexport type ShopPolicy = { id: string; term: string; details: React.ReactNode };\n\nexport type PoliciesSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\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"],"mappings":";;;;;;AAEA,SAAS,uBAAuB;AAmB1B;AAJC,SAAS,gBAAgB,EAAE,OAAO,OAAO,WAAW,GAAG,MAAM,GAAyB;AAC3F,MAAI,MAAM,WAAW,EAAG,QAAO;AAC/B,SACE,oBAAC,eAAY,OAAc,WAAsB,gBAAa,UAAU,GAAG,OACzE,8BAAC,mBAAgB,QAAO,UAAS,WAAU,aAAY,OAAO,MAAM,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,MAAM,EAAE,MAAM,SAAS,EAAE,QAAQ,EAAE,GAAG,GACpI;AAEJ;","names":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReviewSummaryProps, ReviewCardProps } from '@krizaka/ui/reviews';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
type ReviewsVariant = "summary-cards" | "quote" | "strip";
|
|
5
|
+
type ShopReview = Omit<ReviewCardProps, "className" | "style"> & {
|
|
6
|
+
id: string;
|
|
7
|
+
};
|
|
8
|
+
type ReviewsSectionProps = Omit<React.ComponentProps<"section">, "title"> & {
|
|
9
|
+
/** @default "summary-cards" */
|
|
10
|
+
variant?: ReviewsVariant;
|
|
11
|
+
title: React.ReactNode;
|
|
12
|
+
/** The score and its distribution, with the words that name them (the stamp's, the count's, the meters'). */
|
|
13
|
+
summary: Omit<ReviewSummaryProps, "minCount" | "className" | "style">;
|
|
14
|
+
/** The reviews the host chose (`best` or `latest`), in order: two or three are drawn. */
|
|
15
|
+
reviews: readonly ShopReview[];
|
|
16
|
+
/** How many reviews are drawn beside the stamp. @default 2 */
|
|
17
|
+
count?: 1 | 2 | 3;
|
|
18
|
+
/** The fewest verified reviews that may be shown at all. @default 5 */
|
|
19
|
+
minCount?: number;
|
|
20
|
+
};
|
|
21
|
+
/** The score of the shop and what its clients wrote. */
|
|
22
|
+
declare function ReviewsSection({ variant, title, summary, reviews, count, minCount, className, ...props }: ReviewsSectionProps): React.JSX.Element | null;
|
|
23
|
+
|
|
24
|
+
export { ReviewsSection };
|
|
25
|
+
export type { ReviewsSectionProps, ReviewsVariant, ShopReview };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ShopSection
|
|
3
|
+
} from "../chunk-A7MQPIEG.js";
|
|
4
|
+
import "../chunk-B47WSPMP.js";
|
|
5
|
+
|
|
6
|
+
// src/shop/reviews/reviews.tsx
|
|
7
|
+
import { ReviewCard, ReviewSummary } from "@krizaka/ui/reviews";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
function ReviewsSection({ variant = "summary-cards", title, summary, reviews, count = 2, minCount = 5, className, ...props }) {
|
|
10
|
+
if (summary.count < Math.max(1, minCount) || reviews.length === 0) return null;
|
|
11
|
+
const shown = reviews.slice(0, count);
|
|
12
|
+
if (variant === "strip") {
|
|
13
|
+
return /* @__PURE__ */ jsx(ShopSection, { "aria-label": typeof title === "string" ? title : summary.summaryText, "data-variant": "strip", className, ...props, children: /* @__PURE__ */ jsxs("p", { className: "m-0 flex flex-wrap items-baseline gap-x-3 gap-y-1 text-sm text-fg-secondary", children: [
|
|
14
|
+
/* @__PURE__ */ jsx("span", { className: "rounded-sm border-2 border-border-strong px-2 py-0.5 font-mono text-base font-bold text-fg tabular-nums", children: summary.scoreText }),
|
|
15
|
+
/* @__PURE__ */ jsx("span", { children: summary.countText }),
|
|
16
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: summary.summaryText })
|
|
17
|
+
] }) });
|
|
18
|
+
}
|
|
19
|
+
if (variant === "quote") {
|
|
20
|
+
const r = shown[0];
|
|
21
|
+
const { text, author, date, dateTime, service, ratingText } = r;
|
|
22
|
+
return /* @__PURE__ */ jsx(ShopSection, { title, className, "data-variant": "quote", ...props, children: /* @__PURE__ */ jsxs("figure", { className: "m-0 max-w-3xl", children: [
|
|
23
|
+
/* @__PURE__ */ jsxs("blockquote", { className: "m-0 font-display text-2xl leading-snug text-fg sm:text-3xl", children: [
|
|
24
|
+
"\u201C",
|
|
25
|
+
text,
|
|
26
|
+
"\u201D"
|
|
27
|
+
] }),
|
|
28
|
+
/* @__PURE__ */ jsxs("figcaption", { className: "mt-3 flex flex-wrap items-baseline gap-x-2 text-sm text-fg-secondary", children: [
|
|
29
|
+
/* @__PURE__ */ jsx("span", { className: "font-semibold text-fg", children: author }),
|
|
30
|
+
/* @__PURE__ */ jsx("time", { dateTime, children: date }),
|
|
31
|
+
service && /* @__PURE__ */ jsxs("span", { children: [
|
|
32
|
+
"\xB7 ",
|
|
33
|
+
service
|
|
34
|
+
] }),
|
|
35
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: ratingText })
|
|
36
|
+
] })
|
|
37
|
+
] }) });
|
|
38
|
+
}
|
|
39
|
+
return /* @__PURE__ */ jsx(ShopSection, { title, className, "data-variant": "summary-cards", ...props, children: /* @__PURE__ */ jsxs("div", { className: "grid items-start gap-4 lg:grid-cols-[18rem_minmax(0,1fr)] lg:gap-8", children: [
|
|
40
|
+
/* @__PURE__ */ jsx(ReviewSummary, { ...summary, minCount }),
|
|
41
|
+
/* @__PURE__ */ jsx("div", { className: "grid gap-3 sm:grid-cols-2 lg:grid-cols-[repeat(auto-fit,minmax(14rem,1fr))]", children: shown.map(({ id, ...review }) => /* @__PURE__ */ jsx(ReviewCard, { ...review }, id)) })
|
|
42
|
+
] }) });
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
ReviewsSection
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=reviews.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shop/reviews/reviews.tsx"],"sourcesContent":["// 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 } 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\"> & {\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"],"mappings":";;;;;;AAGA,SAAS,YAAkC,qBAA8C;AA8BjF,SACE,KADF;AAND,SAAS,eAAe,EAAE,UAAU,iBAAiB,OAAO,SAAS,SAAS,QAAQ,GAAG,WAAW,GAAG,WAAW,GAAG,MAAM,GAAwB;AACxJ,MAAI,QAAQ,QAAQ,KAAK,IAAI,GAAG,QAAQ,KAAK,QAAQ,WAAW,EAAG,QAAO;AAC1E,QAAM,QAAQ,QAAQ,MAAM,GAAG,KAAK;AACpC,MAAI,YAAY,SAAS;AACvB,WACE,oBAAC,eAAY,cAAY,OAAO,UAAU,WAAW,QAAQ,QAAQ,aAAa,gBAAa,SAAQ,WAAuB,GAAG,OAC/H,+BAAC,OAAE,WAAU,+EACX;AAAA,0BAAC,UAAK,WAAU,2GAA2G,kBAAQ,WAAU;AAAA,MAC7I,oBAAC,UAAM,kBAAQ,WAAU;AAAA,MACzB,oBAAC,UAAK,WAAU,WAAW,kBAAQ,aAAY;AAAA,OACjD,GACF;AAAA,EAEJ;AACA,MAAI,YAAY,SAAS;AACvB,UAAM,IAAI,MAAM,CAAC;AACjB,UAAM,EAAE,MAAM,QAAQ,MAAM,UAAU,SAAS,WAAW,IAAI;AAC9D,WACE,oBAAC,eAAY,OAAc,WAAsB,gBAAa,SAAS,GAAG,OACxE,+BAAC,YAAO,WAAU,iBAChB;AAAA,2BAAC,gBAAW,WAAU,8DAA6D;AAAA;AAAA,QAAE;AAAA,QAAK;AAAA,SAAC;AAAA,MAC3F,qBAAC,gBAAW,WAAU,wEACpB;AAAA,4BAAC,U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