@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
package/dist/shop.d.ts
ADDED
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
export { a as ShopFrame, b as ShopFrameProps, S as ShopPhoto, c as ShopSection, d as ShopSectionProps } from './frame-D6Xv83t8.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
|
|
5
|
+
/** The owner's words, in each language; the product's message is the fallback when a language is absent. */
|
|
6
|
+
declare const localizedText: z.ZodMiniObject<{
|
|
7
|
+
fr: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
8
|
+
en: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
type LocalizedText = z.output<typeof localizedText>;
|
|
11
|
+
|
|
12
|
+
type Shape = z.ZodMiniObject;
|
|
13
|
+
type BlockShapes = Record<string, Shape>;
|
|
14
|
+
/** What a section of a type is, once parsed. */
|
|
15
|
+
type ParsedSection<T extends string, V extends string, S extends Shape, B extends BlockShapes> = {
|
|
16
|
+
key: string;
|
|
17
|
+
type: T;
|
|
18
|
+
variant: V;
|
|
19
|
+
disabled?: boolean | undefined;
|
|
20
|
+
settings: z.output<S>;
|
|
21
|
+
text?: {
|
|
22
|
+
title?: z.output<typeof localizedText> | undefined;
|
|
23
|
+
lead?: z.output<typeof localizedText> | undefined;
|
|
24
|
+
} | undefined;
|
|
25
|
+
blocks?: {
|
|
26
|
+
[K in keyof B & string]: {
|
|
27
|
+
key: string;
|
|
28
|
+
type: K;
|
|
29
|
+
settings: z.output<B[K]>;
|
|
30
|
+
text?: Record<string, z.output<typeof localizedText>> | undefined;
|
|
31
|
+
};
|
|
32
|
+
}[keyof B & string][] | undefined;
|
|
33
|
+
};
|
|
34
|
+
type SectionSpec<T extends string, V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes> = {
|
|
35
|
+
/** The type's name: the `type` of a section. */
|
|
36
|
+
type: T;
|
|
37
|
+
/** Its variants; the first is the default one. */
|
|
38
|
+
variants: V;
|
|
39
|
+
/** The zod schema of its settings. */
|
|
40
|
+
settings: S;
|
|
41
|
+
/** The settings a new section starts with. */
|
|
42
|
+
settingsDefault: z.input<S>;
|
|
43
|
+
/** The block types it allows, each with the zod schema of its settings. None: the section has no blocks. */
|
|
44
|
+
blocks?: B;
|
|
45
|
+
/** The checks that read the whole section (a count, a combination); `issue(path, message)` refuses it. */
|
|
46
|
+
refine?: (section: ParsedSection<T, V[number], S, B>, issue: (path: (string | number)[], message: string) => void) => void;
|
|
47
|
+
};
|
|
48
|
+
type SectionDefinitionOf<T extends string, V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes> = SectionSpec<T, V, S, B> & {
|
|
49
|
+
readonly defaultVariant: V[number];
|
|
50
|
+
readonly blockTypes: readonly (keyof B & string)[];
|
|
51
|
+
/** The zod schema of a section of this type. */
|
|
52
|
+
readonly schema: z.ZodMiniType<ParsedSection<T, V[number], S, B>>;
|
|
53
|
+
};
|
|
54
|
+
/** Defines a section type. */
|
|
55
|
+
declare function defineSection<const T extends string, const V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes = Record<never, never>>(spec: SectionSpec<T, V, S, B>): SectionDefinitionOf<T, V, S, B>;
|
|
56
|
+
|
|
57
|
+
/** Every section type, in the order the composer lists them. */
|
|
58
|
+
declare const SECTION_DEFINITIONS: readonly [SectionDefinitionOf<"hero", readonly ["poster", "split", "banner", "tv"], z.ZodMiniObject<{
|
|
59
|
+
media: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
60
|
+
focus: z.ZodMiniEnum<{
|
|
61
|
+
center: "center";
|
|
62
|
+
top: "top";
|
|
63
|
+
bottom: "bottom";
|
|
64
|
+
}>;
|
|
65
|
+
}, z.core.$strip>, {
|
|
66
|
+
fact: z.ZodMiniObject<{
|
|
67
|
+
kind: z.ZodMiniEnum<{
|
|
68
|
+
"open-now": "open-now";
|
|
69
|
+
area: "area";
|
|
70
|
+
score: "score";
|
|
71
|
+
}>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
}>, SectionDefinitionOf<"services", readonly ["menu", "cards", "index", "carousel"], z.ZodMiniObject<{
|
|
74
|
+
source: z.ZodMiniEnum<{
|
|
75
|
+
all: "all";
|
|
76
|
+
pick: "pick";
|
|
77
|
+
}>;
|
|
78
|
+
groupBy: z.ZodMiniEnum<{
|
|
79
|
+
category: "category";
|
|
80
|
+
none: "none";
|
|
81
|
+
}>;
|
|
82
|
+
columns: z.ZodMiniUnion<[z.ZodMiniLiteral<1 | 2>, z.ZodMiniLiteral<1 | 2>]>;
|
|
83
|
+
aside: z.ZodMiniEnum<{
|
|
84
|
+
none: "none";
|
|
85
|
+
hours: "hours";
|
|
86
|
+
}>;
|
|
87
|
+
}, z.core.$strip>, {
|
|
88
|
+
service: z.ZodMiniObject<{
|
|
89
|
+
serviceId: z.ZodMiniString<string>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
}>, SectionDefinitionOf<"booking", readonly ["strip", "panel", "sticky"], z.ZodMiniObject<{
|
|
92
|
+
serviceId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
93
|
+
count: z.ZodMiniUnion<[z.ZodMiniLiteral<3 | 4 | 6>, z.ZodMiniLiteral<3 | 4 | 6>]>;
|
|
94
|
+
}, z.core.$strip>, Record<never, never>>, SectionDefinitionOf<"gallery", readonly ["mosaic", "filmstrip", "wall", "grid"], z.ZodMiniObject<{
|
|
95
|
+
source: z.ZodMiniEnum<{
|
|
96
|
+
all: "all";
|
|
97
|
+
pick: "pick";
|
|
98
|
+
}>;
|
|
99
|
+
texture: z.ZodMiniEnum<{
|
|
100
|
+
plaster: "plaster";
|
|
101
|
+
brick: "brick";
|
|
102
|
+
ridge: "ridge";
|
|
103
|
+
zellige: "zellige";
|
|
104
|
+
}>;
|
|
105
|
+
}, z.core.$strip>, {
|
|
106
|
+
photo: z.ZodMiniObject<{
|
|
107
|
+
mediaId: z.ZodMiniString<string>;
|
|
108
|
+
caption: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
note: z.ZodMiniObject<{
|
|
111
|
+
text: z.ZodMiniString<string>;
|
|
112
|
+
signature: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
113
|
+
}, z.core.$strip>;
|
|
114
|
+
sign: z.ZodMiniObject<{}, z.core.$strip>;
|
|
115
|
+
}>, SectionDefinitionOf<"video", readonly ["tv", "shorts"], z.ZodMiniObject<{
|
|
116
|
+
cabinet: z.ZodMiniEnum<{
|
|
117
|
+
cabinet: "cabinet";
|
|
118
|
+
portable: "portable";
|
|
119
|
+
}>;
|
|
120
|
+
channel: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
121
|
+
}, z.core.$strip>, {
|
|
122
|
+
reel: z.ZodMiniObject<{
|
|
123
|
+
platform: z.ZodMiniEnum<{
|
|
124
|
+
tiktok: "tiktok";
|
|
125
|
+
"youtube-shorts": "youtube-shorts";
|
|
126
|
+
instagram: "instagram";
|
|
127
|
+
}>;
|
|
128
|
+
url: z.ZodMiniString<string>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
}>, SectionDefinitionOf<"reviews", readonly ["summary-cards", "quote", "strip"], z.ZodMiniObject<{
|
|
131
|
+
rule: z.ZodMiniEnum<{
|
|
132
|
+
best: "best";
|
|
133
|
+
latest: "latest";
|
|
134
|
+
}>;
|
|
135
|
+
count: z.ZodMiniUnion<[z.ZodMiniLiteral<3 | 1 | 2>, z.ZodMiniLiteral<3 | 1 | 2>]>;
|
|
136
|
+
}, z.core.$strip>, Record<never, never>>, SectionDefinitionOf<"bulletin", readonly ["board", "banner"], z.ZodMiniObject<{}, z.core.$strip>, {
|
|
137
|
+
flyer: z.ZodMiniObject<{
|
|
138
|
+
text: z.ZodMiniString<string>;
|
|
139
|
+
signature: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
140
|
+
until: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
141
|
+
}, z.core.$strip>;
|
|
142
|
+
}>, SectionDefinitionOf<"team", readonly ["row", "cards"], z.ZodMiniObject<{
|
|
143
|
+
source: z.ZodMiniEnum<{
|
|
144
|
+
all: "all";
|
|
145
|
+
pick: "pick";
|
|
146
|
+
}>;
|
|
147
|
+
}, z.core.$strip>, {
|
|
148
|
+
member: z.ZodMiniObject<{
|
|
149
|
+
memberId: z.ZodMiniString<string>;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
}>, SectionDefinitionOf<"visit", readonly ["card", "map", "split"], z.ZodMiniObject<{
|
|
152
|
+
showPhone: z.ZodMiniBoolean<boolean>;
|
|
153
|
+
}, z.core.$strip>, Record<never, never>>, SectionDefinitionOf<"story", readonly ["quote", "owner"], z.ZodMiniObject<{
|
|
154
|
+
body: z.ZodMiniObject<{
|
|
155
|
+
fr: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
156
|
+
en: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
157
|
+
}, z.core.$strip>;
|
|
158
|
+
}, z.core.$strip>, Record<never, never>>, SectionDefinitionOf<"social", readonly ["links", "facade"], z.ZodMiniObject<{}, z.core.$strip>, {
|
|
159
|
+
link: z.ZodMiniObject<{
|
|
160
|
+
platform: z.ZodMiniEnum<{
|
|
161
|
+
tiktok: "tiktok";
|
|
162
|
+
"youtube-shorts": "youtube-shorts";
|
|
163
|
+
instagram: "instagram";
|
|
164
|
+
}>;
|
|
165
|
+
url: z.ZodMiniString<string>;
|
|
166
|
+
}, z.core.$strip>;
|
|
167
|
+
}>, SectionDefinitionOf<"faq", readonly ["list"], z.ZodMiniObject<{}, z.core.$strip>, {
|
|
168
|
+
question: z.ZodMiniObject<{
|
|
169
|
+
question: z.ZodMiniObject<{
|
|
170
|
+
fr: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
171
|
+
en: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
172
|
+
}, z.core.$strip>;
|
|
173
|
+
answer: z.ZodMiniObject<{
|
|
174
|
+
fr: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
175
|
+
en: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
176
|
+
}, z.core.$strip>;
|
|
177
|
+
}, z.core.$strip>;
|
|
178
|
+
}>, SectionDefinitionOf<"policies", readonly ["inline"], z.ZodMiniObject<{
|
|
179
|
+
show: z.ZodMiniArray<z.ZodMiniEnum<{
|
|
180
|
+
cancellation: "cancellation";
|
|
181
|
+
prices: "prices";
|
|
182
|
+
"booking-window": "booking-window";
|
|
183
|
+
}>>;
|
|
184
|
+
}, z.core.$strip>, Record<never, never>>];
|
|
185
|
+
type SectionDefinition = (typeof SECTION_DEFINITIONS)[number];
|
|
186
|
+
type SectionType = SectionDefinition["type"];
|
|
187
|
+
declare const SECTION_TYPES: readonly SectionType[];
|
|
188
|
+
/** The definition of a type. */
|
|
189
|
+
declare function sectionDefinition<T extends SectionType>(type: T): Extract<SectionDefinition, {
|
|
190
|
+
type: T;
|
|
191
|
+
}>;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The most a page, a section or a card list may hold. A salon page that stays a page that sells: bounded on purpose.
|
|
195
|
+
* @fixed: ADR-007 §3 — product limits of the document, never a business setting.
|
|
196
|
+
*/
|
|
197
|
+
declare const SHOP_LIMITS: {
|
|
198
|
+
/** Sections on a page, the hero included. */
|
|
199
|
+
readonly sections: 16;
|
|
200
|
+
/** Blocks in one section. */
|
|
201
|
+
readonly blocks: 24;
|
|
202
|
+
/** Photos in a gallery. */
|
|
203
|
+
readonly photos: 12;
|
|
204
|
+
/** Cards in `services · cards`. */
|
|
205
|
+
readonly cards: 6;
|
|
206
|
+
/** Flyers on a bulletin board. */
|
|
207
|
+
readonly flyers: 3;
|
|
208
|
+
/** Reels in `video · shorts`. */
|
|
209
|
+
readonly reels: 6;
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
type ShopMigration = {
|
|
213
|
+
/** The schema it reads. */
|
|
214
|
+
from: number;
|
|
215
|
+
/** Pure: returns a new document, never mutates. */
|
|
216
|
+
up: (doc: Record<string, unknown>) => Record<string, unknown>;
|
|
217
|
+
};
|
|
218
|
+
/** The migrations of the document, oldest first. Schema 1 is the first format: none yet. */
|
|
219
|
+
declare const SHOP_MIGRATIONS: readonly ShopMigration[];
|
|
220
|
+
type MigrationResult = {
|
|
221
|
+
ok: true;
|
|
222
|
+
doc: Record<string, unknown>;
|
|
223
|
+
from: number;
|
|
224
|
+
} | {
|
|
225
|
+
ok: false;
|
|
226
|
+
reason: string;
|
|
227
|
+
};
|
|
228
|
+
/** A migrator over a list of migrations and a current version (the shop's own are `migrateShopPage`). */
|
|
229
|
+
declare function createMigrator(migrations: readonly ShopMigration[], current: number): (input: unknown) => MigrationResult;
|
|
230
|
+
/** Brings a stored document to the current schema (then `parseShopPage` it). */
|
|
231
|
+
declare const migrateShopPage: (input: unknown) => MigrationResult;
|
|
232
|
+
|
|
233
|
+
/** The only messages: the composer to the page. */
|
|
234
|
+
type PreviewMessage = {
|
|
235
|
+
source: "krizaka-shop-composer";
|
|
236
|
+
type: "select" | "scroll";
|
|
237
|
+
key: string;
|
|
238
|
+
} | {
|
|
239
|
+
source: "krizaka-shop-composer";
|
|
240
|
+
type: "refresh";
|
|
241
|
+
};
|
|
242
|
+
/** Reads a message event: only if it comes from `origin`, is one of the three messages and carries a well-formed key. */
|
|
243
|
+
declare function readPreviewMessage(event: Pick<MessageEvent, "origin" | "data">, origin: string): PreviewMessage | null;
|
|
244
|
+
/** The composer's side: posts to the preview's window, addressed to its origin only. */
|
|
245
|
+
declare function postToPreview(target: Pick<Window, "postMessage"> | null | undefined, origin: string, message: PreviewMessage): void;
|
|
246
|
+
/** The attribute that names a section in the preview page: `<div data-shop-key="s_8f2c">` (a block: the outline is its ring). */
|
|
247
|
+
declare const SHOP_KEY_ATTRIBUTE = "data-shop-key";
|
|
248
|
+
/**
|
|
249
|
+
* The page's side: outlines the selected section (`data-shop-selected`, drawn by `blocks.css`), scrolls it into view, and calls
|
|
250
|
+
* `onRefresh` when the draft changed. Returns the function that removes it. Only runs in an iframe of the composer's origin.
|
|
251
|
+
*/
|
|
252
|
+
declare function connectShopPreview({ composerOrigin, onRefresh, root }: {
|
|
253
|
+
composerOrigin: string;
|
|
254
|
+
onRefresh?: () => void;
|
|
255
|
+
root?: Document;
|
|
256
|
+
}): () => void;
|
|
257
|
+
|
|
258
|
+
/** The version of the document's format; migrations are pure functions schema n → n + 1 (`migrate.ts`). */
|
|
259
|
+
declare const SHOP_SCHEMA_VERSION = 1;
|
|
260
|
+
/** A look preset by id and version (`@krizaka/tokens`): `salon-atelier`. The mode is the visitor's, never stored. */
|
|
261
|
+
declare const presetRef: z.ZodMiniObject<{
|
|
262
|
+
id: z.ZodMiniString<string>;
|
|
263
|
+
version: z.ZodMiniInt;
|
|
264
|
+
}, z.core.$strip>;
|
|
265
|
+
declare const shopPageSchema: z.ZodMiniObject<{
|
|
266
|
+
schema: z.ZodMiniLiteral<1>;
|
|
267
|
+
preset: z.ZodMiniObject<{
|
|
268
|
+
id: z.ZodMiniString<string>;
|
|
269
|
+
version: z.ZodMiniInt;
|
|
270
|
+
}, z.core.$strip>;
|
|
271
|
+
density: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
272
|
+
compact: "compact";
|
|
273
|
+
airy: "airy";
|
|
274
|
+
}>>;
|
|
275
|
+
sections: z.ZodMiniArray<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<Readonly<{
|
|
276
|
+
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
277
|
+
}>, z.core.$strip>, ...z.ZodMiniObject<Readonly<{
|
|
278
|
+
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
279
|
+
}>, z.core.$strip>[]], "type">>;
|
|
280
|
+
}, z.core.$strip>;
|
|
281
|
+
/** A section of any type, as parsed: its `settings` and `blocks` are the type's own. */
|
|
282
|
+
type Section = z.output<(typeof SECTION_DEFINITIONS)[number]["schema"]>;
|
|
283
|
+
type ShopPage = {
|
|
284
|
+
schema: typeof SHOP_SCHEMA_VERSION;
|
|
285
|
+
preset: z.output<typeof presetRef>;
|
|
286
|
+
density?: "compact" | "airy" | undefined;
|
|
287
|
+
sections: Section[];
|
|
288
|
+
};
|
|
289
|
+
type SectionOf<T extends SectionType> = Extract<Section, {
|
|
290
|
+
type: T;
|
|
291
|
+
}>;
|
|
292
|
+
type ShopPageIssue = {
|
|
293
|
+
path: string;
|
|
294
|
+
message: string;
|
|
295
|
+
};
|
|
296
|
+
type ShopPageResult = {
|
|
297
|
+
ok: true;
|
|
298
|
+
page: ShopPage;
|
|
299
|
+
} | {
|
|
300
|
+
ok: false;
|
|
301
|
+
issues: ShopPageIssue[];
|
|
302
|
+
};
|
|
303
|
+
/** Validates a document; an invalid one answers every issue with its path (`sections.2.variant`), for a 422. */
|
|
304
|
+
declare function parseShopPage(input: unknown): ShopPageResult;
|
|
305
|
+
|
|
306
|
+
declare const shopStarters: {
|
|
307
|
+
readonly salonCompact: ShopPage;
|
|
308
|
+
readonly salonEditorial: ShopPage;
|
|
309
|
+
readonly salonGallery: ShopPage;
|
|
310
|
+
readonly petsRoute: ShopPage;
|
|
311
|
+
readonly petsJournal: ShopPage;
|
|
312
|
+
};
|
|
313
|
+
type ShopStarterId = keyof typeof shopStarters;
|
|
314
|
+
|
|
315
|
+
export { SECTION_DEFINITIONS, SECTION_TYPES, SHOP_KEY_ATTRIBUTE, SHOP_LIMITS, SHOP_MIGRATIONS, SHOP_SCHEMA_VERSION, connectShopPreview, createMigrator, defineSection, migrateShopPage, parseShopPage, postToPreview, readPreviewMessage, sectionDefinition, shopPageSchema, shopStarters };
|
|
316
|
+
export type { LocalizedText, MigrationResult, ParsedSection, PreviewMessage, Section, SectionDefinition, SectionOf, SectionSpec, SectionType, ShopMigration, ShopPage, ShopPageIssue, ShopPageResult, ShopStarterId };
|