@krizaka/ui 3.64.0 → 3.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account-menu.d.ts +7 -3
- package/dist/account-menu.js +14 -10
- package/dist/account-menu.js.map +1 -1
- package/dist/app-frame/server.d.ts +123 -0
- package/dist/app-frame/server.js +109 -0
- package/dist/app-frame/server.js.map +1 -0
- package/dist/app-frame.d.ts +210 -0
- package/dist/app-frame.js +220 -0
- package/dist/app-frame.js.map +1 -0
- package/dist/app-header.d.ts +3 -3
- package/dist/blocks.css +41 -0
- 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-HKEAYSFS.js +19 -0
- package/dist/chunk-HKEAYSFS.js.map +1 -0
- 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/desktop-window.d.ts +223 -0
- package/dist/desktop-window.js +261 -0
- package/dist/desktop-window.js.map +1 -0
- package/dist/filter-bar.d.ts +3 -3
- package/dist/frame-D6Xv83t8.d.ts +52 -0
- package/dist/native.d.ts +218 -3
- package/dist/native.js +1638 -1450
- 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/theme.d.ts +3 -1
- package/dist/theme.js +4 -0
- package/dist/theme.js.map +1 -1
- package/package.json +305 -5
- package/registry/account-menu.json +22 -8
- package/registry/account-settings.json +1 -1
- 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-frame.json +564 -0
- 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 +1 -1
- 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 +1 -1
- package/registry/data-table.json +1 -1
- package/registry/date-picker.json +3 -3
- package/registry/decision-list.json +1 -1
- package/registry/description-list.json +1 -1
- package/registry/desktop-window.json +407 -0
- 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/app-frame/admin.d.ts +4 -0
- package/registry/examples/app-frame/admin.js +32 -0
- package/registry/examples/app-frame/admin.tsx +33 -0
- package/registry/examples/app-frame/app.d.ts +4 -0
- package/registry/examples/app-frame/app.js +53 -0
- package/registry/examples/app-frame/app.tsx +56 -0
- package/registry/examples/desktop-window/library.d.ts +4 -0
- package/registry/examples/desktop-window/library.js +49 -0
- package/registry/examples/desktop-window/library.tsx +58 -0
- package/registry/examples/form-flow/native/signup.d.ts +4 -0
- package/registry/examples/form-flow/native/signup.dark.png +0 -0
- package/registry/examples/form-flow/native/signup.js +26 -0
- package/registry/examples/form-flow/native/signup.light.png +0 -0
- package/registry/examples/form-flow/native/signup.tsx +23 -0
- package/registry/examples/grid/native/columns.d.ts +4 -0
- package/registry/examples/grid/native/columns.dark.png +0 -0
- package/registry/examples/grid/native/columns.js +23 -0
- package/registry/examples/grid/native/columns.light.png +0 -0
- package/registry/examples/grid/native/columns.tsx +20 -0
- package/registry/examples/grid/native/photos.d.ts +4 -0
- package/registry/examples/grid/native/photos.dark.png +0 -0
- package/registry/examples/grid/native/photos.js +14 -0
- package/registry/examples/grid/native/photos.light.png +0 -0
- package/registry/examples/grid/native/photos.tsx +18 -0
- package/registry/examples/grid/native/stats.d.ts +4 -0
- package/registry/examples/grid/native/stats.dark.png +0 -0
- package/registry/examples/grid/native/stats.js +22 -0
- package/registry/examples/grid/native/stats.light.png +0 -0
- package/registry/examples/grid/native/stats.tsx +24 -0
- package/registry/examples/list-detail/native/inbox.d.ts +4 -0
- package/registry/examples/list-detail/native/inbox.dark.png +0 -0
- package/registry/examples/list-detail/native/inbox.js +35 -0
- package/registry/examples/list-detail/native/inbox.light.png +0 -0
- package/registry/examples/list-detail/native/inbox.tsx +35 -0
- package/registry/examples/screen/native/dashboard.d.ts +4 -0
- package/registry/examples/screen/native/dashboard.dark.png +0 -0
- package/registry/examples/screen/native/dashboard.js +48 -0
- package/registry/examples/screen/native/dashboard.light.png +0 -0
- package/registry/examples/screen/native/dashboard.tsx +52 -0
- package/registry/examples/screen/native/settings-home.d.ts +4 -0
- package/registry/examples/screen/native/settings-home.dark.png +0 -0
- package/registry/examples/screen/native/settings-home.js +26 -0
- package/registry/examples/screen/native/settings-home.light.png +0 -0
- package/registry/examples/screen/native/settings-home.tsx +25 -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/examples/state-screen/native/empty.d.ts +4 -0
- package/registry/examples/state-screen/native/empty.dark.png +0 -0
- package/registry/examples/state-screen/native/empty.js +12 -0
- package/registry/examples/state-screen/native/empty.light.png +0 -0
- package/registry/examples/state-screen/native/empty.tsx +11 -0
- package/registry/examples/state-screen/native/error.d.ts +4 -0
- package/registry/examples/state-screen/native/error.dark.png +0 -0
- package/registry/examples/state-screen/native/error.js +21 -0
- package/registry/examples/state-screen/native/error.light.png +0 -0
- package/registry/examples/state-screen/native/error.tsx +17 -0
- package/registry/examples/state-screen/native/offline.d.ts +4 -0
- package/registry/examples/state-screen/native/offline.dark.png +0 -0
- package/registry/examples/state-screen/native/offline.js +15 -0
- package/registry/examples/state-screen/native/offline.light.png +0 -0
- package/registry/examples/state-screen/native/offline.tsx +12 -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-flow.json +152 -0
- 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/grid.json +262 -0
- package/registry/how-it-works-page.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +403 -11
- 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-detail.json +188 -0
- 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/onboarding.json +3 -0
- 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/screen.json +68 -4
- 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 +5 -2
- 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 +4 -4
- package/registry/sites.json +1 -1
- package/registry/skeleton.json +1 -1
- package/registry/skip-link.json +1 -1
- package/registry/slider.json +1 -1
- package/registry/slot-picker.json +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/state-screen.json +224 -0
- 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 +3 -3
- 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
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
/** The owner's words, in each language; the product's message is the fallback when a language is absent. */
|
|
5
|
+
declare const localizedText: z.ZodMiniObject<{
|
|
6
|
+
fr: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
7
|
+
en: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
type LocalizedText = z.output<typeof localizedText>;
|
|
10
|
+
|
|
11
|
+
type Shape = z.ZodMiniObject;
|
|
12
|
+
type BlockShapes = Record<string, Shape>;
|
|
13
|
+
/** What a section of a type is, once parsed. */
|
|
14
|
+
type ParsedSection<T extends string, V extends string, S extends Shape, B extends BlockShapes> = {
|
|
15
|
+
key: string;
|
|
16
|
+
type: T;
|
|
17
|
+
variant: V;
|
|
18
|
+
disabled?: boolean | undefined;
|
|
19
|
+
settings: z.output<S>;
|
|
20
|
+
text?: {
|
|
21
|
+
title?: z.output<typeof localizedText> | undefined;
|
|
22
|
+
lead?: z.output<typeof localizedText> | undefined;
|
|
23
|
+
} | undefined;
|
|
24
|
+
blocks?: {
|
|
25
|
+
[K in keyof B & string]: {
|
|
26
|
+
key: string;
|
|
27
|
+
type: K;
|
|
28
|
+
settings: z.output<B[K]>;
|
|
29
|
+
text?: Record<string, z.output<typeof localizedText>> | undefined;
|
|
30
|
+
};
|
|
31
|
+
}[keyof B & string][] | undefined;
|
|
32
|
+
};
|
|
33
|
+
type SectionSpec<T extends string, V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes> = {
|
|
34
|
+
/** The type's name: the `type` of a section. */
|
|
35
|
+
type: T;
|
|
36
|
+
/** Its variants; the first is the default one. */
|
|
37
|
+
variants: V;
|
|
38
|
+
/** The zod schema of its settings. */
|
|
39
|
+
settings: S;
|
|
40
|
+
/** The settings a new section starts with. */
|
|
41
|
+
settingsDefault: z.input<S>;
|
|
42
|
+
/** The block types it allows, each with the zod schema of its settings. None: the section has no blocks. */
|
|
43
|
+
blocks?: B;
|
|
44
|
+
/** The checks that read the whole section (a count, a combination); `issue(path, message)` refuses it. */
|
|
45
|
+
refine?: (section: ParsedSection<T, V[number], S, B>, issue: (path: (string | number)[], message: string) => void) => void;
|
|
46
|
+
};
|
|
47
|
+
type SectionDefinitionOf<T extends string, V extends readonly [string, ...string[]], S extends Shape, B extends BlockShapes> = SectionSpec<T, V, S, B> & {
|
|
48
|
+
readonly defaultVariant: V[number];
|
|
49
|
+
readonly blockTypes: readonly (keyof B & string)[];
|
|
50
|
+
/** The zod schema of a section of this type. */
|
|
51
|
+
readonly schema: z.ZodMiniType<ParsedSection<T, V[number], S, B>>;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** Every section type, in the order the composer lists them. */
|
|
55
|
+
declare const SECTION_DEFINITIONS: readonly [SectionDefinitionOf<"hero", readonly ["poster", "split", "banner", "tv"], z.ZodMiniObject<{
|
|
56
|
+
media: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
57
|
+
focus: z.ZodMiniEnum<{
|
|
58
|
+
center: "center";
|
|
59
|
+
top: "top";
|
|
60
|
+
bottom: "bottom";
|
|
61
|
+
}>;
|
|
62
|
+
}, z.core.$strip>, {
|
|
63
|
+
fact: z.ZodMiniObject<{
|
|
64
|
+
kind: z.ZodMiniEnum<{
|
|
65
|
+
"open-now": "open-now";
|
|
66
|
+
area: "area";
|
|
67
|
+
score: "score";
|
|
68
|
+
}>;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
}>, SectionDefinitionOf<"services", readonly ["menu", "cards", "index", "carousel"], z.ZodMiniObject<{
|
|
71
|
+
source: z.ZodMiniEnum<{
|
|
72
|
+
all: "all";
|
|
73
|
+
pick: "pick";
|
|
74
|
+
}>;
|
|
75
|
+
groupBy: z.ZodMiniEnum<{
|
|
76
|
+
category: "category";
|
|
77
|
+
none: "none";
|
|
78
|
+
}>;
|
|
79
|
+
columns: z.ZodMiniUnion<[z.ZodMiniLiteral<1 | 2>, z.ZodMiniLiteral<1 | 2>]>;
|
|
80
|
+
aside: z.ZodMiniEnum<{
|
|
81
|
+
none: "none";
|
|
82
|
+
hours: "hours";
|
|
83
|
+
}>;
|
|
84
|
+
}, z.core.$strip>, {
|
|
85
|
+
service: z.ZodMiniObject<{
|
|
86
|
+
serviceId: z.ZodMiniString<string>;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
}>, SectionDefinitionOf<"booking", readonly ["strip", "panel", "sticky"], z.ZodMiniObject<{
|
|
89
|
+
serviceId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
90
|
+
count: z.ZodMiniUnion<[z.ZodMiniLiteral<3 | 4 | 6>, z.ZodMiniLiteral<3 | 4 | 6>]>;
|
|
91
|
+
}, z.core.$strip>, Record<never, never>>, SectionDefinitionOf<"gallery", readonly ["mosaic", "filmstrip", "wall", "grid"], z.ZodMiniObject<{
|
|
92
|
+
source: z.ZodMiniEnum<{
|
|
93
|
+
all: "all";
|
|
94
|
+
pick: "pick";
|
|
95
|
+
}>;
|
|
96
|
+
texture: z.ZodMiniEnum<{
|
|
97
|
+
plaster: "plaster";
|
|
98
|
+
brick: "brick";
|
|
99
|
+
ridge: "ridge";
|
|
100
|
+
zellige: "zellige";
|
|
101
|
+
}>;
|
|
102
|
+
}, z.core.$strip>, {
|
|
103
|
+
photo: z.ZodMiniObject<{
|
|
104
|
+
mediaId: z.ZodMiniString<string>;
|
|
105
|
+
caption: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
note: z.ZodMiniObject<{
|
|
108
|
+
text: z.ZodMiniString<string>;
|
|
109
|
+
signature: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
sign: z.ZodMiniObject<{}, z.core.$strip>;
|
|
112
|
+
}>, SectionDefinitionOf<"video", readonly ["tv", "shorts"], z.ZodMiniObject<{
|
|
113
|
+
cabinet: z.ZodMiniEnum<{
|
|
114
|
+
cabinet: "cabinet";
|
|
115
|
+
portable: "portable";
|
|
116
|
+
}>;
|
|
117
|
+
channel: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
118
|
+
}, z.core.$strip>, {
|
|
119
|
+
reel: z.ZodMiniObject<{
|
|
120
|
+
platform: z.ZodMiniEnum<{
|
|
121
|
+
tiktok: "tiktok";
|
|
122
|
+
"youtube-shorts": "youtube-shorts";
|
|
123
|
+
instagram: "instagram";
|
|
124
|
+
}>;
|
|
125
|
+
url: z.ZodMiniString<string>;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
}>, SectionDefinitionOf<"reviews", readonly ["summary-cards", "quote", "strip"], z.ZodMiniObject<{
|
|
128
|
+
rule: z.ZodMiniEnum<{
|
|
129
|
+
best: "best";
|
|
130
|
+
latest: "latest";
|
|
131
|
+
}>;
|
|
132
|
+
count: z.ZodMiniUnion<[z.ZodMiniLiteral<3 | 1 | 2>, z.ZodMiniLiteral<3 | 1 | 2>]>;
|
|
133
|
+
}, z.core.$strip>, Record<never, never>>, SectionDefinitionOf<"bulletin", readonly ["board", "banner"], z.ZodMiniObject<{}, z.core.$strip>, {
|
|
134
|
+
flyer: z.ZodMiniObject<{
|
|
135
|
+
text: z.ZodMiniString<string>;
|
|
136
|
+
signature: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
137
|
+
until: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
}>, SectionDefinitionOf<"team", readonly ["row", "cards"], z.ZodMiniObject<{
|
|
140
|
+
source: z.ZodMiniEnum<{
|
|
141
|
+
all: "all";
|
|
142
|
+
pick: "pick";
|
|
143
|
+
}>;
|
|
144
|
+
}, z.core.$strip>, {
|
|
145
|
+
member: z.ZodMiniObject<{
|
|
146
|
+
memberId: z.ZodMiniString<string>;
|
|
147
|
+
}, z.core.$strip>;
|
|
148
|
+
}>, SectionDefinitionOf<"visit", readonly ["card", "map", "split"], z.ZodMiniObject<{
|
|
149
|
+
showPhone: z.ZodMiniBoolean<boolean>;
|
|
150
|
+
}, z.core.$strip>, Record<never, never>>, SectionDefinitionOf<"story", readonly ["quote", "owner"], z.ZodMiniObject<{
|
|
151
|
+
body: z.ZodMiniObject<{
|
|
152
|
+
fr: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
153
|
+
en: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
154
|
+
}, z.core.$strip>;
|
|
155
|
+
}, z.core.$strip>, Record<never, never>>, SectionDefinitionOf<"social", readonly ["links", "facade"], z.ZodMiniObject<{}, z.core.$strip>, {
|
|
156
|
+
link: z.ZodMiniObject<{
|
|
157
|
+
platform: z.ZodMiniEnum<{
|
|
158
|
+
tiktok: "tiktok";
|
|
159
|
+
"youtube-shorts": "youtube-shorts";
|
|
160
|
+
instagram: "instagram";
|
|
161
|
+
}>;
|
|
162
|
+
url: z.ZodMiniString<string>;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
}>, SectionDefinitionOf<"faq", readonly ["list"], z.ZodMiniObject<{}, z.core.$strip>, {
|
|
165
|
+
question: z.ZodMiniObject<{
|
|
166
|
+
question: z.ZodMiniObject<{
|
|
167
|
+
fr: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
168
|
+
en: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
169
|
+
}, z.core.$strip>;
|
|
170
|
+
answer: z.ZodMiniObject<{
|
|
171
|
+
fr: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
172
|
+
en: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
173
|
+
}, z.core.$strip>;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
}>, SectionDefinitionOf<"policies", readonly ["inline"], z.ZodMiniObject<{
|
|
176
|
+
show: z.ZodMiniArray<z.ZodMiniEnum<{
|
|
177
|
+
cancellation: "cancellation";
|
|
178
|
+
prices: "prices";
|
|
179
|
+
"booking-window": "booking-window";
|
|
180
|
+
}>>;
|
|
181
|
+
}, z.core.$strip>, Record<never, never>>];
|
|
182
|
+
type SectionDefinition = (typeof SECTION_DEFINITIONS)[number];
|
|
183
|
+
type SectionType = SectionDefinition["type"];
|
|
184
|
+
|
|
185
|
+
/** The version of the document's format; migrations are pure functions schema n → n + 1 (`migrate.ts`). */
|
|
186
|
+
declare const SHOP_SCHEMA_VERSION = 1;
|
|
187
|
+
/** A look preset by id and version (`@krizaka/tokens`): `salon-atelier`. The mode is the visitor's, never stored. */
|
|
188
|
+
declare const presetRef: z.ZodMiniObject<{
|
|
189
|
+
id: z.ZodMiniString<string>;
|
|
190
|
+
version: z.ZodMiniInt;
|
|
191
|
+
}, z.core.$strip>;
|
|
192
|
+
/** A section of any type, as parsed: its `settings` and `blocks` are the type's own. */
|
|
193
|
+
type Section = z.output<(typeof SECTION_DEFINITIONS)[number]["schema"]>;
|
|
194
|
+
type ShopPage = {
|
|
195
|
+
schema: typeof SHOP_SCHEMA_VERSION;
|
|
196
|
+
preset: z.output<typeof presetRef>;
|
|
197
|
+
density?: "compact" | "airy" | undefined;
|
|
198
|
+
sections: Section[];
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
type Rec = Record<string, unknown>;
|
|
202
|
+
type Command =
|
|
203
|
+
/** Adds a section (its type's default settings, the given or the default variant) at an index; a hero goes first. */
|
|
204
|
+
{
|
|
205
|
+
type: "addSection";
|
|
206
|
+
sectionType: SectionType;
|
|
207
|
+
key: string;
|
|
208
|
+
variant?: string;
|
|
209
|
+
at?: number;
|
|
210
|
+
settings?: Rec;
|
|
211
|
+
} | {
|
|
212
|
+
type: "removeSection";
|
|
213
|
+
key: string;
|
|
214
|
+
}
|
|
215
|
+
/** Moves a section to an absolute index (the hero stays first: nothing goes above it). */
|
|
216
|
+
| {
|
|
217
|
+
type: "moveSection";
|
|
218
|
+
key: string;
|
|
219
|
+
to: number;
|
|
220
|
+
} | {
|
|
221
|
+
type: "setVariant";
|
|
222
|
+
key: string;
|
|
223
|
+
variant: string;
|
|
224
|
+
}
|
|
225
|
+
/** Merges into the settings. */
|
|
226
|
+
| {
|
|
227
|
+
type: "patchSettings";
|
|
228
|
+
key: string;
|
|
229
|
+
patch: Rec;
|
|
230
|
+
} | {
|
|
231
|
+
type: "setText";
|
|
232
|
+
key: string;
|
|
233
|
+
field: "title" | "lead";
|
|
234
|
+
value: LocalizedText | undefined;
|
|
235
|
+
} | {
|
|
236
|
+
type: "toggleDisabled";
|
|
237
|
+
key: string;
|
|
238
|
+
} | {
|
|
239
|
+
type: "setPreset";
|
|
240
|
+
preset: {
|
|
241
|
+
id: string;
|
|
242
|
+
version: number;
|
|
243
|
+
};
|
|
244
|
+
density?: "compact" | "airy" | null;
|
|
245
|
+
} | {
|
|
246
|
+
type: "setDensity";
|
|
247
|
+
density: "compact" | "airy" | undefined;
|
|
248
|
+
} | {
|
|
249
|
+
type: "addBlock";
|
|
250
|
+
key: string;
|
|
251
|
+
blockKey: string;
|
|
252
|
+
blockType: string;
|
|
253
|
+
settings?: Rec;
|
|
254
|
+
at?: number;
|
|
255
|
+
} | {
|
|
256
|
+
type: "removeBlock";
|
|
257
|
+
key: string;
|
|
258
|
+
blockKey: string;
|
|
259
|
+
} | {
|
|
260
|
+
type: "moveBlock";
|
|
261
|
+
key: string;
|
|
262
|
+
blockKey: string;
|
|
263
|
+
to: number;
|
|
264
|
+
} | {
|
|
265
|
+
type: "patchBlock";
|
|
266
|
+
key: string;
|
|
267
|
+
blockKey: string;
|
|
268
|
+
patch: Rec;
|
|
269
|
+
};
|
|
270
|
+
/** The array with an item moved to an index. */
|
|
271
|
+
declare function moved<T>(list: readonly T[], from: number, to: number): T[];
|
|
272
|
+
/** Applies a command to a document; returns the same object when nothing changes. */
|
|
273
|
+
declare function applyCommand(page: ShopPage, cmd: Command): ShopPage;
|
|
274
|
+
|
|
275
|
+
type DiffEntry = {
|
|
276
|
+
kind: "added" | "removed";
|
|
277
|
+
key: string;
|
|
278
|
+
type: string;
|
|
279
|
+
position: number;
|
|
280
|
+
} | {
|
|
281
|
+
kind: "moved";
|
|
282
|
+
key: string;
|
|
283
|
+
type: string;
|
|
284
|
+
from: number;
|
|
285
|
+
to: number;
|
|
286
|
+
} | {
|
|
287
|
+
kind: "variant";
|
|
288
|
+
key: string;
|
|
289
|
+
type: string;
|
|
290
|
+
from: string;
|
|
291
|
+
to: string;
|
|
292
|
+
} | {
|
|
293
|
+
kind: "settings" | "blocks" | "text";
|
|
294
|
+
key: string;
|
|
295
|
+
type: string;
|
|
296
|
+
} | {
|
|
297
|
+
kind: "disabled" | "enabled";
|
|
298
|
+
key: string;
|
|
299
|
+
type: string;
|
|
300
|
+
} | {
|
|
301
|
+
kind: "preset";
|
|
302
|
+
from: string;
|
|
303
|
+
to: string;
|
|
304
|
+
} | {
|
|
305
|
+
kind: "density";
|
|
306
|
+
from: string | undefined;
|
|
307
|
+
to: string | undefined;
|
|
308
|
+
};
|
|
309
|
+
/** The differences between the published document and the draft, in the draft's reading order. */
|
|
310
|
+
declare function diffPages(before: ShopPage, after: ShopPage): DiffEntry[];
|
|
311
|
+
|
|
312
|
+
type ShopComposerMessages = {
|
|
313
|
+
title: string;
|
|
314
|
+
/** The outline's name. */
|
|
315
|
+
sections: string;
|
|
316
|
+
addSection: string;
|
|
317
|
+
addSectionHint: string;
|
|
318
|
+
/** « Show {name} » / the switch's accessible name. */
|
|
319
|
+
toggleVisible: string;
|
|
320
|
+
sectionMenu: string;
|
|
321
|
+
moveUp: string;
|
|
322
|
+
moveDown: string;
|
|
323
|
+
moveTop: string;
|
|
324
|
+
remove: string;
|
|
325
|
+
/** Announcements. */
|
|
326
|
+
announceMoved: string;
|
|
327
|
+
announceCannotMove: string;
|
|
328
|
+
announceAdded: string;
|
|
329
|
+
announceRemoved: string;
|
|
330
|
+
announceShown: string;
|
|
331
|
+
announceHidden: string;
|
|
332
|
+
announceUndone: string;
|
|
333
|
+
announceRedone: string;
|
|
334
|
+
hiddenNote: string;
|
|
335
|
+
/** The inspector. */
|
|
336
|
+
inspector: string;
|
|
337
|
+
noSelection: string;
|
|
338
|
+
backToSections: string;
|
|
339
|
+
variant: string;
|
|
340
|
+
settings: string;
|
|
341
|
+
words: string;
|
|
342
|
+
titleField: string;
|
|
343
|
+
leadField: string;
|
|
344
|
+
french: string;
|
|
345
|
+
english: string;
|
|
346
|
+
blocks: string;
|
|
347
|
+
addBlock: string;
|
|
348
|
+
removeBlock: string;
|
|
349
|
+
/** The look. */
|
|
350
|
+
look: string;
|
|
351
|
+
preset: string;
|
|
352
|
+
density: string;
|
|
353
|
+
densityCompact: string;
|
|
354
|
+
densityAiry: string;
|
|
355
|
+
/** The toolbar. */
|
|
356
|
+
undo: string;
|
|
357
|
+
redo: string;
|
|
358
|
+
saved: string;
|
|
359
|
+
saving: string;
|
|
360
|
+
saveFailed: string;
|
|
361
|
+
publish: string;
|
|
362
|
+
discard: string;
|
|
363
|
+
/** The preview. */
|
|
364
|
+
preview: string;
|
|
365
|
+
previewTitle: string;
|
|
366
|
+
phone: string;
|
|
367
|
+
desktop: string;
|
|
368
|
+
viewPreview: string;
|
|
369
|
+
closePreview: string;
|
|
370
|
+
/** The publish dialog. */
|
|
371
|
+
publishTitle: string;
|
|
372
|
+
publishWhat: string;
|
|
373
|
+
publishNothing: string;
|
|
374
|
+
publishConfirm: string;
|
|
375
|
+
cancel: string;
|
|
376
|
+
problemsTitle: string;
|
|
377
|
+
problemIn: string;
|
|
378
|
+
/** The names. */
|
|
379
|
+
sectionNames: Record<SectionType, string>;
|
|
380
|
+
/** `type.variant` → « Poster ». */
|
|
381
|
+
variantNames: Record<string, string>;
|
|
382
|
+
blockNames: Record<string, string>;
|
|
383
|
+
settingNames: Record<string, string>;
|
|
384
|
+
optionNames: Record<string, string>;
|
|
385
|
+
/** One line per kind of change, with `{name}` (the section) and `{from}` / `{to}` / `{n}`. */
|
|
386
|
+
diff: Record<DiffEntry["kind"], string>;
|
|
387
|
+
};
|
|
388
|
+
/** `fill("Moved to {n}", { n: 2 })`. */
|
|
389
|
+
declare const fill: (message: string, vars: Record<string, string | number>) => string;
|
|
390
|
+
declare const defaultShopComposerMessages: ShopComposerMessages;
|
|
391
|
+
|
|
392
|
+
/** How long the draft waits for calm before it is saved. */
|
|
393
|
+
declare const AUTOSAVE_MS = 800;
|
|
394
|
+
type ShopComposerPreset = {
|
|
395
|
+
id: string;
|
|
396
|
+
version: number;
|
|
397
|
+
name: string;
|
|
398
|
+
density: "compact" | "airy";
|
|
399
|
+
variants: Readonly<Record<string, string>>;
|
|
400
|
+
};
|
|
401
|
+
type ShopComposerProps = {
|
|
402
|
+
/** The draft to edit. The composer keeps its own history from it. */
|
|
403
|
+
value: ShopPage;
|
|
404
|
+
/** Change it to load another document (another draft): the history and the selection start again. */
|
|
405
|
+
resetKey?: string | number;
|
|
406
|
+
/** Called with a valid draft after 800 ms without a change: save it. A rejection says « Not saved ». */
|
|
407
|
+
onChange?: (page: ShopPage) => void | Promise<void>;
|
|
408
|
+
/** Called with the draft once the person confirmed the diff. */
|
|
409
|
+
onPublish: (page: ShopPage) => void | Promise<void>;
|
|
410
|
+
/** The discard of the draft (the product asks first, in its own dialog). Absent: no such button. */
|
|
411
|
+
onDiscard?: () => void;
|
|
412
|
+
/** What is live now, for the diff of « Publish ». Absent: the document the composer was opened with. */
|
|
413
|
+
published?: ShopPage;
|
|
414
|
+
/** The page of the product, in an iframe: its own route with `?draft=<id>`. Its origin is the bridge's. */
|
|
415
|
+
previewUrl: string;
|
|
416
|
+
/** The look presets of the shop's trade. */
|
|
417
|
+
presets: readonly ShopComposerPreset[];
|
|
418
|
+
/** The section types the trade does not use: folded under « … » in the catalogue. */
|
|
419
|
+
foldedTypes?: readonly SectionType[];
|
|
420
|
+
/** The words, translated. Default: English. */
|
|
421
|
+
messages?: ShopComposerMessages;
|
|
422
|
+
/** Classes merged on the root (its height: `h-[100dvh]`). */
|
|
423
|
+
className?: string;
|
|
424
|
+
};
|
|
425
|
+
/** The shop composer. */
|
|
426
|
+
declare function ShopComposer({ value, resetKey, onChange, onPublish, onDiscard, published, previewUrl, presets, foldedTypes, messages, className }: ShopComposerProps): React.JSX.Element;
|
|
427
|
+
|
|
428
|
+
type FieldSpec = {
|
|
429
|
+
name: string;
|
|
430
|
+
kind: "choice";
|
|
431
|
+
options: readonly (string | number)[];
|
|
432
|
+
optional: boolean;
|
|
433
|
+
} | {
|
|
434
|
+
name: string;
|
|
435
|
+
kind: "toggle";
|
|
436
|
+
optional: boolean;
|
|
437
|
+
} | {
|
|
438
|
+
name: string;
|
|
439
|
+
kind: "text";
|
|
440
|
+
optional: boolean;
|
|
441
|
+
} | {
|
|
442
|
+
name: string;
|
|
443
|
+
kind: "localized";
|
|
444
|
+
optional: boolean;
|
|
445
|
+
} | {
|
|
446
|
+
name: string;
|
|
447
|
+
kind: "multi";
|
|
448
|
+
options: readonly string[];
|
|
449
|
+
optional: boolean;
|
|
450
|
+
};
|
|
451
|
+
/** The fields of a settings schema, in the schema's order. A setting of a kind the form does not draw is left out. */
|
|
452
|
+
declare function describeSettings(schema: z.ZodMiniObject): FieldSpec[];
|
|
453
|
+
|
|
454
|
+
/** The most steps kept. */
|
|
455
|
+
declare const HISTORY_LIMIT = 100;
|
|
456
|
+
type History = {
|
|
457
|
+
readonly past: readonly ShopPage[];
|
|
458
|
+
readonly present: ShopPage;
|
|
459
|
+
readonly future: readonly ShopPage[]; /** The key of the burst the last step belongs to (typing in one field). */
|
|
460
|
+
readonly merge?: string;
|
|
461
|
+
};
|
|
462
|
+
declare const createHistory: (page: ShopPage) => History;
|
|
463
|
+
/**
|
|
464
|
+
* Runs a command: a new step, unless it changes nothing. Commands with the same `merge` key in a row (the keystrokes of one field)
|
|
465
|
+
* make one step, so a hundred letters do not use the hundred steps of undo.
|
|
466
|
+
*/
|
|
467
|
+
declare function run(history: History, cmd: Command, merge?: string): History;
|
|
468
|
+
declare const canUndo: (h: History) => boolean;
|
|
469
|
+
declare const canRedo: (h: History) => boolean;
|
|
470
|
+
declare function undo(h: History): History;
|
|
471
|
+
declare function redo(h: History): History;
|
|
472
|
+
|
|
473
|
+
/** A short random key with a prefix; `random` is injectable so a test is deterministic. */
|
|
474
|
+
declare function newKey(prefix: "s" | "b", random?: () => number): string;
|
|
475
|
+
|
|
476
|
+
type SectionThumbnailProps = {
|
|
477
|
+
/** The section type. */
|
|
478
|
+
type: SectionType;
|
|
479
|
+
/** Its variant: one of the type's. */
|
|
480
|
+
variant: string;
|
|
481
|
+
/** The look preset the page wears (`salon-vitrine`): the thumbnail wears it too. */
|
|
482
|
+
preset?: string;
|
|
483
|
+
/** The page's spacing. @default "compact" */
|
|
484
|
+
density?: "compact" | "airy";
|
|
485
|
+
};
|
|
486
|
+
/** A picture of a section: 160 × 96 px of a 960 px page, inert and hidden from assistive technology. */
|
|
487
|
+
declare function SectionThumbnail({ type, variant, preset, density }: SectionThumbnailProps): React.JSX.Element;
|
|
488
|
+
|
|
489
|
+
export { AUTOSAVE_MS, HISTORY_LIMIT, SectionThumbnail, ShopComposer, applyCommand, canRedo, canUndo, createHistory, defaultShopComposerMessages, describeSettings, diffPages, fill, moved, newKey, redo, run, undo };
|
|
490
|
+
export type { Command, DiffEntry, FieldSpec, History, SectionThumbnailProps, ShopComposerMessages, ShopComposerPreset, ShopComposerProps };
|