@vamos-ui/react 0.0.0-stage → 0.3.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/LICENSE +21 -0
- package/README.md +27 -2
- package/dist/blocks/block-heading.d.ts +29 -0
- package/dist/blocks/block-heading.js +39 -0
- package/dist/blocks/block-image.d.ts +52 -0
- package/dist/blocks/block-image.js +48 -0
- package/dist/blocks/block-link.d.ts +30 -0
- package/dist/blocks/block-link.js +36 -0
- package/dist/blocks/create-blocks.d.ts +54 -0
- package/dist/blocks/create-blocks.js +52 -0
- package/dist/blocks/index.d.ts +55 -0
- package/dist/blocks/index.js +59 -0
- package/dist/blocks/json-ld.d.ts +18 -0
- package/dist/blocks/json-ld.js +44 -0
- package/dist/blocks/labels.d.ts +20 -0
- package/dist/blocks/labels.js +43 -0
- package/dist/blocks/rich-text.d.ts +36 -0
- package/dist/blocks/rich-text.js +106 -0
- package/dist/blocks/schema/define-block.d.ts +151 -0
- package/dist/blocks/schema/define-block.js +120 -0
- package/dist/blocks/schema/emphasis.d.ts +17 -0
- package/dist/blocks/schema/emphasis.js +69 -0
- package/dist/blocks/schema/fields.d.ts +497 -0
- package/dist/blocks/schema/fields.js +240 -0
- package/dist/blocks/schema/icons.d.ts +2 -0
- package/dist/blocks/schema/icons.js +26 -0
- package/dist/blocks/schema/index.d.ts +18 -0
- package/dist/blocks/schema/index.js +21 -0
- package/dist/blocks/schema/lint-types.d.ts +16 -0
- package/dist/blocks/schema/lint-types.js +2 -0
- package/dist/blocks/schema/lint.d.ts +32 -0
- package/dist/blocks/schema/lint.js +164 -0
- package/dist/blocks/schema/localize.d.ts +20 -0
- package/dist/blocks/schema/localize.js +29 -0
- package/dist/blocks/schema/localized.d.ts +25 -0
- package/dist/blocks/schema/localized.js +53 -0
- package/dist/blocks/schema/migrate.d.ts +24 -0
- package/dist/blocks/schema/migrate.js +75 -0
- package/dist/blocks/schema/nodes.d.ts +196 -0
- package/dist/blocks/schema/nodes.js +78 -0
- package/dist/blocks/schema/rich-doc-schema.d.ts +32 -0
- package/dist/blocks/schema/rich-doc-schema.js +66 -0
- package/dist/blocks/schema/rich-doc.d.ts +90 -0
- package/dist/blocks/schema/rich-doc.js +62 -0
- package/dist/blocks/schema/safety.d.ts +20 -0
- package/dist/blocks/schema/safety.js +49 -0
- package/dist/blocks/schema/types.d.ts +172 -0
- package/dist/blocks/schema/types.js +3 -0
- package/dist/blocks/schema/validate.d.ts +17 -0
- package/dist/blocks/schema/validate.js +32 -0
- package/dist/blocks/schema/walk.d.ts +22 -0
- package/dist/blocks/schema/walk.js +60 -0
- package/dist/blocks/section-header.d.ts +38 -0
- package/dist/blocks/section-header.js +22 -0
- package/dist/blocks/section.d.ts +59 -0
- package/dist/blocks/section.js +66 -0
- package/dist/blocks/site/_kit-1.d.ts +101 -0
- package/dist/blocks/site/_kit-1.js +137 -0
- package/dist/blocks/site/_site-icon-1.d.ts +6 -0
- package/dist/blocks/site/_site-icon-1.js +15 -0
- package/dist/blocks/site/announcement-bar.d.ts +42 -0
- package/dist/blocks/site/announcement-bar.js +38 -0
- package/dist/blocks/site/announcement-dismiss.d.ts +18 -0
- package/dist/blocks/site/announcement-dismiss.js +28 -0
- package/dist/blocks/site/article-layout.d.ts +65 -0
- package/dist/blocks/site/article-layout.js +88 -0
- package/dist/blocks/site/blog-list.d.ts +79 -0
- package/dist/blocks/site/blog-list.js +78 -0
- package/dist/blocks/site/comparison-table.d.ts +54 -0
- package/dist/blocks/site/comparison-table.js +38 -0
- package/dist/blocks/site/consent-banner.d.ts +52 -0
- package/dist/blocks/site/consent-banner.js +33 -0
- package/dist/blocks/site/contact-dock.d.ts +52 -0
- package/dist/blocks/site/contact-dock.js +55 -0
- package/dist/blocks/site/contact-form.d.ts +60 -0
- package/dist/blocks/site/contact-form.js +45 -0
- package/dist/blocks/site/cta-booking.d.ts +43 -0
- package/dist/blocks/site/cta-booking.js +69 -0
- package/dist/blocks/site/cta.d.ts +74 -0
- package/dist/blocks/site/cta.js +113 -0
- package/dist/blocks/site/embed-facade.d.ts +20 -0
- package/dist/blocks/site/embed-facade.js +21 -0
- package/dist/blocks/site/faq.d.ts +48 -0
- package/dist/blocks/site/faq.js +52 -0
- package/dist/blocks/site/feature-grid.d.ts +46 -0
- package/dist/blocks/site/feature-grid.js +50 -0
- package/dist/blocks/site/feature-tabs.d.ts +22 -0
- package/dist/blocks/site/feature-tabs.js +11 -0
- package/dist/blocks/site/footer.d.ts +68 -0
- package/dist/blocks/site/footer.js +61 -0
- package/dist/blocks/site/gallery-section.d.ts +42 -0
- package/dist/blocks/site/gallery-section.js +48 -0
- package/dist/blocks/site/hero-video.d.ts +15 -0
- package/dist/blocks/site/hero-video.js +31 -0
- package/dist/blocks/site/hero.d.ts +64 -0
- package/dist/blocks/site/hero.js +73 -0
- package/dist/blocks/site/logo-strip.d.ts +44 -0
- package/dist/blocks/site/logo-strip.js +27 -0
- package/dist/blocks/site/map-hours.d.ts +83 -0
- package/dist/blocks/site/map-hours.js +125 -0
- package/dist/blocks/site/media-text.d.ts +45 -0
- package/dist/blocks/site/media-text.js +56 -0
- package/dist/blocks/site/menu-list.d.ts +74 -0
- package/dist/blocks/site/menu-list.js +84 -0
- package/dist/blocks/site/navbar-submenu.d.ts +18 -0
- package/dist/blocks/site/navbar-submenu.js +51 -0
- package/dist/blocks/site/navbar.d.ts +67 -0
- package/dist/blocks/site/navbar.js +64 -0
- package/dist/blocks/site/not-found.d.ts +40 -0
- package/dist/blocks/site/not-found.js +38 -0
- package/dist/blocks/site/page-intro.d.ts +46 -0
- package/dist/blocks/site/page-intro.js +44 -0
- package/dist/blocks/site/pricing-table.d.ts +67 -0
- package/dist/blocks/site/pricing-table.js +83 -0
- package/dist/blocks/site/process.d.ts +36 -0
- package/dist/blocks/site/process.js +42 -0
- package/dist/blocks/site/registry-1.d.ts +720 -0
- package/dist/blocks/site/registry-1.js +783 -0
- package/dist/blocks/site/registry-2.d.ts +914 -0
- package/dist/blocks/site/registry-2.js +563 -0
- package/dist/blocks/site/rich-text-section.d.ts +34 -0
- package/dist/blocks/site/rich-text-section.js +32 -0
- package/dist/blocks/site/shared/brand-icons.d.ts +21 -0
- package/dist/blocks/site/shared/brand-icons.js +56 -0
- package/dist/blocks/site/shared/consent-gate.d.ts +41 -0
- package/dist/blocks/site/shared/consent-gate.js +43 -0
- package/dist/blocks/site/shared/consent-island.d.ts +38 -0
- package/dist/blocks/site/shared/consent-island.js +63 -0
- package/dist/blocks/site/shared/consent.d.ts +49 -0
- package/dist/blocks/site/shared/consent.js +130 -0
- package/dist/blocks/site/shared/contact-form-island.d.ts +41 -0
- package/dist/blocks/site/shared/contact-form-island.js +100 -0
- package/dist/blocks/site/shared/copy-link.d.ts +10 -0
- package/dist/blocks/site/shared/copy-link.js +25 -0
- package/dist/blocks/site/shared/dock-avoid.d.ts +15 -0
- package/dist/blocks/site/shared/dock-avoid.js +107 -0
- package/dist/blocks/site/shared/dock-hours.d.ts +13 -0
- package/dist/blocks/site/shared/dock-hours.js +25 -0
- package/dist/blocks/site/shared/gallery-lightbox.d.ts +12 -0
- package/dist/blocks/site/shared/gallery-lightbox.js +10 -0
- package/dist/blocks/site/shared/island-keys.d.ts +10 -0
- package/dist/blocks/site/shared/island-keys.js +44 -0
- package/dist/blocks/site/shared/kit-2.d.ts +55 -0
- package/dist/blocks/site/shared/kit-2.js +84 -0
- package/dist/blocks/site/shared/labels-2.d.ts +209 -0
- package/dist/blocks/site/shared/labels-2.js +427 -0
- package/dist/blocks/site/shared/open-now.d.ts +22 -0
- package/dist/blocks/site/shared/open-now.js +27 -0
- package/dist/blocks/site/shared/opening-hours.d.ts +117 -0
- package/dist/blocks/site/shared/opening-hours.js +245 -0
- package/dist/blocks/site/shared/site-accent.d.ts +48 -0
- package/dist/blocks/site/shared/site-accent.js +249 -0
- package/dist/blocks/site/shared/site-form.d.ts +79 -0
- package/dist/blocks/site/shared/site-form.js +111 -0
- package/dist/blocks/site/shared/site-routing.d.ts +54 -0
- package/dist/blocks/site/shared/site-routing.js +86 -0
- package/dist/blocks/site/shared/testimonials-carousel.d.ts +17 -0
- package/dist/blocks/site/shared/testimonials-carousel.js +64 -0
- package/dist/blocks/site/site-shell.d.ts +108 -0
- package/dist/blocks/site/site-shell.js +254 -0
- package/dist/blocks/site/stats-band.d.ts +42 -0
- package/dist/blocks/site/stats-band.js +45 -0
- package/dist/blocks/site/team.d.ts +44 -0
- package/dist/blocks/site/team.js +48 -0
- package/dist/blocks/site/testimonials.d.ts +68 -0
- package/dist/blocks/site/testimonials.js +66 -0
- package/dist/blocks/types.d.ts +63 -0
- package/dist/blocks/types.js +2 -0
- package/dist/business/approval-flow.d.ts +152 -0
- package/dist/business/approval-flow.js +221 -0
- package/dist/business/export-core.d.ts +55 -0
- package/dist/business/export-core.js +101 -0
- package/dist/business/export.d.ts +148 -0
- package/dist/business/export.js +264 -0
- package/dist/business/import-core.d.ts +104 -0
- package/dist/business/import-core.js +281 -0
- package/dist/business/import-wizard.d.ts +186 -0
- package/dist/business/import-wizard.js +401 -0
- package/dist/business/index.d.ts +12 -0
- package/dist/business/index.js +22 -0
- package/dist/business/line-items-core.d.ts +129 -0
- package/dist/business/line-items-core.js +183 -0
- package/dist/business/line-items.d.ts +119 -0
- package/dist/business/line-items.js +299 -0
- package/dist/business/multi-step-form.d.ts +131 -0
- package/dist/business/multi-step-form.js +337 -0
- package/dist/business/permission-core.d.ts +59 -0
- package/dist/business/permission-core.js +99 -0
- package/dist/business/permission-matrix.d.ts +158 -0
- package/dist/business/permission-matrix.js +341 -0
- package/dist/business/setup-checklist.d.ts +80 -0
- package/dist/business/setup-checklist.js +92 -0
- package/dist/business/signer-status.d.ts +53 -0
- package/dist/business/signer-status.js +76 -0
- package/dist/charts/area-chart.d.ts +35 -0
- package/dist/charts/area-chart.js +33 -0
- package/dist/charts/bar-chart.d.ts +27 -0
- package/dist/charts/bar-chart.js +46 -0
- package/dist/charts/bar-list.d.ts +47 -0
- package/dist/charts/bar-list.js +60 -0
- package/dist/charts/chart-shell.d.ts +173 -0
- package/dist/charts/chart-shell.js +205 -0
- package/dist/charts/chart.d.ts +73 -0
- package/dist/charts/chart.js +106 -0
- package/dist/charts/combo-chart.d.ts +29 -0
- package/dist/charts/combo-chart.js +47 -0
- package/dist/charts/donut-chart.d.ts +33 -0
- package/dist/charts/donut-chart.js +113 -0
- package/dist/charts/funnel.d.ts +51 -0
- package/dist/charts/funnel.js +69 -0
- package/dist/charts/gauge.d.ts +62 -0
- package/dist/charts/gauge.js +104 -0
- package/dist/charts/heatmap.d.ts +81 -0
- package/dist/charts/heatmap.js +338 -0
- package/dist/charts/index.d.ts +12 -0
- package/dist/charts/index.js +14 -0
- package/dist/charts/line-chart.d.ts +21 -0
- package/dist/charts/line-chart.js +36 -0
- package/dist/charts/test-utils.d.ts +2 -0
- package/dist/charts/test-utils.js +38 -0
- package/dist/charts/utils.d.ts +130 -0
- package/dist/charts/utils.js +262 -0
- package/dist/components/_qr-core.d.ts +26 -0
- package/dist/components/_qr-core.js +376 -0
- package/dist/components/accordion.d.ts +47 -0
- package/dist/components/accordion.js +70 -0
- package/dist/components/activity-timeline.d.ts +149 -0
- package/dist/components/activity-timeline.js +122 -0
- package/dist/components/address-field.d.ts +116 -0
- package/dist/components/address-field.js +219 -0
- package/dist/components/alert-dialog.d.ts +99 -0
- package/dist/components/alert-dialog.js +192 -0
- package/dist/components/alert.d.ts +42 -0
- package/dist/components/alert.js +82 -0
- package/dist/components/app-shell.d.ts +159 -0
- package/dist/components/app-shell.js +289 -0
- package/dist/components/attachment-list.d.ts +96 -0
- package/dist/components/attachment-list.js +196 -0
- package/dist/components/audit-log.d.ts +150 -0
- package/dist/components/audit-log.js +205 -0
- package/dist/components/avatar.d.ts +87 -0
- package/dist/components/avatar.js +126 -0
- package/dist/components/backup-codes.d.ts +42 -0
- package/dist/components/backup-codes.js +67 -0
- package/dist/components/badge.d.ts +41 -0
- package/dist/components/badge.js +68 -0
- package/dist/components/breadcrumb.d.ts +78 -0
- package/dist/components/breadcrumb.js +106 -0
- package/dist/components/button-group.d.ts +52 -0
- package/dist/components/button-group.js +77 -0
- package/dist/components/button.d.ts +58 -0
- package/dist/components/button.js +107 -0
- package/dist/components/calendar.d.ts +240 -0
- package/dist/components/calendar.js +483 -0
- package/dist/components/card.d.ts +66 -0
- package/dist/components/card.js +76 -0
- package/dist/components/carousel.d.ts +170 -0
- package/dist/components/carousel.js +348 -0
- package/dist/components/checkbox.d.ts +78 -0
- package/dist/components/checkbox.js +138 -0
- package/dist/components/color-picker.d.ts +112 -0
- package/dist/components/color-picker.js +235 -0
- package/dist/components/combobox.d.ts +136 -0
- package/dist/components/combobox.js +294 -0
- package/dist/components/command.d.ts +281 -0
- package/dist/components/command.js +498 -0
- package/dist/components/comment-thread.d.ts +252 -0
- package/dist/components/comment-thread.js +449 -0
- package/dist/components/context-menu.d.ts +77 -0
- package/dist/components/context-menu.js +82 -0
- package/dist/components/currency-input.d.ts +43 -0
- package/dist/components/currency-input.js +85 -0
- package/dist/components/date-picker.d.ts +141 -0
- package/dist/components/date-picker.js +241 -0
- package/dist/components/date-range-picker.d.ts +91 -0
- package/dist/components/date-range-picker.js +251 -0
- package/dist/components/description-list.d.ts +92 -0
- package/dist/components/description-list.js +42 -0
- package/dist/components/dialog.d.ts +139 -0
- package/dist/components/dialog.js +185 -0
- package/dist/components/dropdown-menu.d.ts +100 -0
- package/dist/components/dropdown-menu.js +102 -0
- package/dist/components/editor-layout.d.ts +166 -0
- package/dist/components/editor-layout.js +237 -0
- package/dist/components/empty-state.d.ts +49 -0
- package/dist/components/empty-state.js +68 -0
- package/dist/components/entity-card.d.ts +83 -0
- package/dist/components/entity-card.js +92 -0
- package/dist/components/file-upload.d.ts +256 -0
- package/dist/components/file-upload.js +490 -0
- package/dist/components/formatted-input.d.ts +177 -0
- package/dist/components/formatted-input.js +399 -0
- package/dist/components/hierarchy-chart.d.ts +190 -0
- package/dist/components/hierarchy-chart.js +890 -0
- package/dist/components/hover-card.d.ts +21 -0
- package/dist/components/hover-card.js +32 -0
- package/dist/components/iban-input.d.ts +38 -0
- package/dist/components/iban-input.js +112 -0
- package/dist/components/id-input.d.ts +65 -0
- package/dist/components/id-input.js +130 -0
- package/dist/components/image.d.ts +130 -0
- package/dist/components/image.js +168 -0
- package/dist/components/input-otp.d.ts +62 -0
- package/dist/components/input-otp.js +73 -0
- package/dist/components/input.d.ts +141 -0
- package/dist/components/input.js +187 -0
- package/dist/components/item.d.ts +96 -0
- package/dist/components/item.js +113 -0
- package/dist/components/kbd.d.ts +64 -0
- package/dist/components/kbd.js +119 -0
- package/dist/components/list-layout.d.ts +144 -0
- package/dist/components/list-layout.js +210 -0
- package/dist/components/native-select.d.ts +33 -0
- package/dist/components/native-select.js +48 -0
- package/dist/components/navigation-menu.d.ts +127 -0
- package/dist/components/navigation-menu.js +129 -0
- package/dist/components/notification-center.d.ts +164 -0
- package/dist/components/notification-center.js +399 -0
- package/dist/components/page-header.d.ts +60 -0
- package/dist/components/page-header.js +60 -0
- package/dist/components/pagination.d.ts +121 -0
- package/dist/components/pagination.js +174 -0
- package/dist/components/phone-input.d.ts +49 -0
- package/dist/components/phone-input.js +266 -0
- package/dist/components/pin-map.d.ts +58 -0
- package/dist/components/pin-map.js +167 -0
- package/dist/components/popover.d.ts +38 -0
- package/dist/components/popover.js +69 -0
- package/dist/components/progress.d.ts +79 -0
- package/dist/components/progress.js +97 -0
- package/dist/components/qr-code.d.ts +36 -0
- package/dist/components/qr-code.js +27 -0
- package/dist/components/radio-group.d.ts +43 -0
- package/dist/components/radio-group.js +81 -0
- package/dist/components/record-detail-layout.d.ts +167 -0
- package/dist/components/record-detail-layout.js +233 -0
- package/dist/components/record-picker.d.ts +199 -0
- package/dist/components/record-picker.js +650 -0
- package/dist/components/resizable.d.ts +50 -0
- package/dist/components/resizable.js +88 -0
- package/dist/components/scroll-area.d.ts +40 -0
- package/dist/components/scroll-area.js +56 -0
- package/dist/components/select.d.ts +126 -0
- package/dist/components/select.js +137 -0
- package/dist/components/separator.d.ts +31 -0
- package/dist/components/separator.js +41 -0
- package/dist/components/settings-layout.d.ts +134 -0
- package/dist/components/settings-layout.js +180 -0
- package/dist/components/sheet.d.ts +103 -0
- package/dist/components/sheet.js +165 -0
- package/dist/components/sidebar.d.ts +171 -0
- package/dist/components/sidebar.js +421 -0
- package/dist/components/signature-pad.d.ts +85 -0
- package/dist/components/signature-pad.js +283 -0
- package/dist/components/skeleton.d.ts +64 -0
- package/dist/components/skeleton.js +53 -0
- package/dist/components/sla-timer.d.ts +75 -0
- package/dist/components/sla-timer.js +142 -0
- package/dist/components/slider.d.ts +57 -0
- package/dist/components/slider.js +133 -0
- package/dist/components/slug-input.d.ts +69 -0
- package/dist/components/slug-input.js +201 -0
- package/dist/components/sparkline.d.ts +54 -0
- package/dist/components/sparkline.js +122 -0
- package/dist/components/spinner.d.ts +34 -0
- package/dist/components/spinner.js +34 -0
- package/dist/components/stat.d.ts +135 -0
- package/dist/components/stat.js +130 -0
- package/dist/components/status-picker.d.ts +107 -0
- package/dist/components/status-picker.js +175 -0
- package/dist/components/stepper.d.ts +86 -0
- package/dist/components/stepper.js +103 -0
- package/dist/components/switch.d.ts +34 -0
- package/dist/components/switch.js +70 -0
- package/dist/components/table.d.ts +101 -0
- package/dist/components/table.js +72 -0
- package/dist/components/tabs.d.ts +103 -0
- package/dist/components/tabs.js +173 -0
- package/dist/components/tag-input.d.ts +77 -0
- package/dist/components/tag-input.js +305 -0
- package/dist/components/task-list.d.ts +89 -0
- package/dist/components/task-list.js +238 -0
- package/dist/components/time-picker.d.ts +119 -0
- package/dist/components/time-picker.js +399 -0
- package/dist/components/toast.d.ts +87 -0
- package/dist/components/toast.js +142 -0
- package/dist/components/toggle.d.ts +77 -0
- package/dist/components/toggle.js +109 -0
- package/dist/components/tooltip.d.ts +69 -0
- package/dist/components/tooltip.js +105 -0
- package/dist/components/top-bar.d.ts +87 -0
- package/dist/components/top-bar.js +99 -0
- package/dist/components/tour.d.ts +60 -0
- package/dist/components/tour.js +139 -0
- package/dist/components/tree-select.d.ts +89 -0
- package/dist/components/tree-select.js +243 -0
- package/dist/components/tree-view.d.ts +109 -0
- package/dist/components/tree-view.js +170 -0
- package/dist/components/typography.d.ts +107 -0
- package/dist/components/typography.js +128 -0
- package/dist/components/user-picker.d.ts +89 -0
- package/dist/components/user-picker.js +162 -0
- package/dist/components/version-history.d.ts +191 -0
- package/dist/components/version-history.js +431 -0
- package/dist/data-table/csv.d.ts +27 -0
- package/dist/data-table/csv.js +68 -0
- package/dist/data-table/data-table.d.ts +423 -0
- package/dist/data-table/data-table.js +1259 -0
- package/dist/data-table/filter-bar.d.ts +146 -0
- package/dist/data-table/filter-bar.js +569 -0
- package/dist/data-table/filter-fns.d.ts +65 -0
- package/dist/data-table/filter-fns.js +382 -0
- package/dist/data-table/index.d.ts +8 -0
- package/dist/data-table/index.js +9 -0
- package/dist/data-table/saved-views.d.ts +100 -0
- package/dist/data-table/saved-views.js +251 -0
- package/dist/data-table/types.d.ts +168 -0
- package/dist/data-table/types.js +87 -0
- package/dist/data-table/url-state.d.ts +94 -0
- package/dist/data-table/url-state.js +303 -0
- package/dist/data-table/view-state.d.ts +16 -0
- package/dist/data-table/view-state.js +81 -0
- package/dist/editor/_test-setup.d.ts +1 -0
- package/dist/editor/_test-setup.js +33 -0
- package/dist/editor/block-editor.d.ts +137 -0
- package/dist/editor/block-editor.js +280 -0
- package/dist/editor/commands.d.ts +31 -0
- package/dist/editor/commands.js +150 -0
- package/dist/editor/context.d.ts +108 -0
- package/dist/editor/context.js +30 -0
- package/dist/editor/convert.d.ts +66 -0
- package/dist/editor/convert.js +567 -0
- package/dist/editor/drag-handle.d.ts +10 -0
- package/dist/editor/drag-handle.js +69 -0
- package/dist/editor/extensions.d.ts +34 -0
- package/dist/editor/extensions.js +239 -0
- package/dist/editor/index.d.ts +14 -0
- package/dist/editor/index.js +17 -0
- package/dist/editor/inserter.d.ts +12 -0
- package/dist/editor/inserter.js +88 -0
- package/dist/editor/inspector.d.ts +17 -0
- package/dist/editor/inspector.js +65 -0
- package/dist/editor/items.d.ts +62 -0
- package/dist/editor/items.js +195 -0
- package/dist/editor/labels.d.ts +119 -0
- package/dist/editor/labels.js +130 -0
- package/dist/editor/markdown.d.ts +14 -0
- package/dist/editor/markdown.js +209 -0
- package/dist/editor/menus.d.ts +20 -0
- package/dist/editor/menus.js +236 -0
- package/dist/editor/nodes.d.ts +14 -0
- package/dist/editor/nodes.js +201 -0
- package/dist/editor/outline.d.ts +11 -0
- package/dist/editor/outline.js +52 -0
- package/dist/editor/schema-form.d.ts +64 -0
- package/dist/editor/schema-form.js +290 -0
- package/dist/editor/slash-menu.d.ts +15 -0
- package/dist/editor/slash-menu.js +119 -0
- package/dist/fonts/catalog.d.ts +53 -0
- package/dist/fonts/catalog.js +121 -0
- package/dist/fonts/font-picker.d.ts +70 -0
- package/dist/fonts/font-picker.js +225 -0
- package/dist/fonts/index.d.ts +6 -0
- package/dist/fonts/index.js +7 -0
- package/dist/fonts/loader.d.ts +66 -0
- package/dist/fonts/loader.js +161 -0
- package/dist/fonts/pairing-picker.d.ts +31 -0
- package/dist/fonts/pairing-picker.js +81 -0
- package/dist/fonts/pairings.d.ts +84 -0
- package/dist/fonts/pairings.js +149 -0
- package/dist/fonts/provider.d.ts +34 -0
- package/dist/fonts/provider.js +51 -0
- package/dist/form/index.d.ts +1 -0
- package/dist/form/index.js +1 -0
- package/dist/format/core.d.ts +149 -0
- package/dist/format/core.js +357 -0
- package/dist/format/index.d.ts +4 -0
- package/dist/format/index.js +5 -0
- package/dist/format/use-format.d.ts +1 -0
- package/dist/format/use-format.js +3 -0
- package/dist/index.d.ts +91 -0
- package/dist/index.js +92 -0
- package/dist/lib/cn.d.ts +3 -0
- package/dist/lib/cn.js +16 -0
- package/dist/lib/color.d.ts +64 -0
- package/dist/lib/color.js +177 -0
- package/dist/lib/compose-refs.d.ts +24 -0
- package/dist/lib/compose-refs.js +45 -0
- package/dist/lib/data-islands.d.ts +194 -0
- package/dist/lib/data-islands.js +368 -0
- package/dist/lib/date.d.ts +129 -0
- package/dist/lib/date.js +386 -0
- package/dist/lib/field-context.d.ts +64 -0
- package/dist/lib/field-context.js +62 -0
- package/dist/lib/floating-arrow.d.ts +18 -0
- package/dist/lib/floating-arrow.js +15 -0
- package/dist/lib/islands.d.ts +38 -0
- package/dist/lib/islands.js +40 -0
- package/dist/lib/labels.d.ts +51 -0
- package/dist/lib/labels.js +56 -0
- package/dist/lib/layer.d.ts +36 -0
- package/dist/lib/layer.js +42 -0
- package/dist/lib/locale.d.ts +85 -0
- package/dist/lib/locale.js +105 -0
- package/dist/lib/menu.d.ts +58 -0
- package/dist/lib/menu.js +99 -0
- package/dist/lib/message-format.d.ts +20 -0
- package/dist/lib/message-format.js +116 -0
- package/dist/lib/nav.d.ts +132 -0
- package/dist/lib/nav.js +178 -0
- package/dist/lib/provider.d.ts +100 -0
- package/dist/lib/provider.js +105 -0
- package/dist/lib/public.d.ts +23 -0
- package/dist/lib/public.js +34 -0
- package/dist/lib/sr-name.d.ts +18 -0
- package/dist/lib/sr-name.js +17 -0
- package/dist/lib/text.d.ts +100 -0
- package/dist/lib/text.js +233 -0
- package/dist/lib/theme-scope.d.ts +58 -0
- package/dist/lib/theme-scope.js +59 -0
- package/dist/lib/use-async-list.d.ts +60 -0
- package/dist/lib/use-async-list.js +119 -0
- package/dist/lib/use-container-width.d.ts +19 -0
- package/dist/lib/use-container-width.js +39 -0
- package/dist/lib/use-controllable-state.d.ts +33 -0
- package/dist/lib/use-controllable-state.js +56 -0
- package/dist/lib/use-edge-fade.d.ts +13 -0
- package/dist/lib/use-edge-fade.js +43 -0
- package/dist/lib/use-formatted-input.d.ts +69 -0
- package/dist/lib/use-formatted-input.js +152 -0
- package/dist/lib/use-hotkeys.d.ts +80 -0
- package/dist/lib/use-hotkeys.js +221 -0
- package/dist/lib/use-hover-intent.d.ts +44 -0
- package/dist/lib/use-hover-intent.js +119 -0
- package/dist/lib/use-media-query.d.ts +21 -0
- package/dist/lib/use-media-query.js +28 -0
- package/dist/lib/use-reduced-motion.d.ts +8 -0
- package/dist/lib/use-reduced-motion.js +13 -0
- package/dist/lib/use-tree.d.ts +153 -0
- package/dist/lib/use-tree.js +534 -0
- package/dist/lib/value-format.d.ts +25 -0
- package/dist/lib/value-format.js +56 -0
- package/dist/lib/variants.d.ts +131 -0
- package/dist/lib/variants.js +109 -0
- package/dist/locale-data/core/date.d.ts +24 -0
- package/dist/locale-data/core/date.js +68 -0
- package/dist/locale-data/core/decimal.d.ts +19 -0
- package/dist/locale-data/core/decimal.js +79 -0
- package/dist/locale-data/core/holidays.d.ts +30 -0
- package/dist/locale-data/core/holidays.js +79 -0
- package/dist/locale-data/core/iban.d.ts +29 -0
- package/dist/locale-data/core/iban.js +74 -0
- package/dist/locale-data/core/index.d.ts +7 -0
- package/dist/locale-data/core/index.js +6 -0
- package/dist/locale-data/core/types.d.ts +173 -0
- package/dist/locale-data/core/types.js +6 -0
- package/dist/locale-data/core/week-info.d.ts +23 -0
- package/dist/locale-data/core/week-info.js +85 -0
- package/dist/locale-data/core/working-days.d.ts +27 -0
- package/dist/locale-data/core/working-days.js +133 -0
- package/dist/locale-data/index.d.ts +2 -0
- package/dist/locale-data/index.js +4 -0
- package/dist/locale-data/tr/address-tr.json +1 -0
- package/dist/locale-data/tr/address.d.ts +23 -0
- package/dist/locale-data/tr/address.js +52 -0
- package/dist/locale-data/tr/holidays.d.ts +31 -0
- package/dist/locale-data/tr/holidays.js +81 -0
- package/dist/locale-data/tr/iban.d.ts +21 -0
- package/dist/locale-data/tr/iban.js +45 -0
- package/dist/locale-data/tr/id.d.ts +36 -0
- package/dist/locale-data/tr/id.js +120 -0
- package/dist/locale-data/tr/index.d.ts +12 -0
- package/dist/locale-data/tr/index.js +33 -0
- package/dist/locale-data/tr/kdv.d.ts +91 -0
- package/dist/locale-data/tr/kdv.js +222 -0
- package/dist/locales/en.d.ts +2102 -0
- package/dist/locales/en.js +2088 -0
- package/dist/locales/tr.d.ts +2086 -0
- package/dist/locales/tr.js +2087 -0
- package/dist/media/focal-point.d.ts +42 -0
- package/dist/media/focal-point.js +96 -0
- package/dist/media/gallery-layout.d.ts +19 -0
- package/dist/media/gallery-layout.js +61 -0
- package/dist/media/gallery.d.ts +64 -0
- package/dist/media/gallery.js +140 -0
- package/dist/media/image-cropper.d.ts +86 -0
- package/dist/media/image-cropper.js +170 -0
- package/dist/media/image-field.d.ts +115 -0
- package/dist/media/image-field.js +212 -0
- package/dist/media/index.d.ts +19 -0
- package/dist/media/index.js +23 -0
- package/dist/media/lightbox.d.ts +82 -0
- package/dist/media/lightbox.js +171 -0
- package/dist/media/link-preview.d.ts +97 -0
- package/dist/media/link-preview.js +177 -0
- package/dist/media/media-library.d.ts +244 -0
- package/dist/media/media-library.js +776 -0
- package/dist/media/media-picker.d.ts +96 -0
- package/dist/media/media-picker.js +209 -0
- package/dist/media/media-provider.d.ts +23 -0
- package/dist/media/media-provider.js +44 -0
- package/dist/media/media-utils.d.ts +39 -0
- package/dist/media/media-utils.js +145 -0
- package/dist/media/memory-adapter.d.ts +22 -0
- package/dist/media/memory-adapter.js +162 -0
- package/dist/media/rest-adapter.d.ts +90 -0
- package/dist/media/rest-adapter.js +208 -0
- package/dist/media/serp.d.ts +62 -0
- package/dist/media/serp.js +108 -0
- package/dist/media/test-fixtures.d.ts +3 -0
- package/dist/media/test-fixtures.js +37 -0
- package/dist/media/types.d.ts +183 -0
- package/dist/media/types.js +3 -0
- package/dist/media/use-pan-zoom.d.ts +51 -0
- package/dist/media/use-pan-zoom.js +156 -0
- package/dist/media/use-upload-queue.d.ts +64 -0
- package/dist/media/use-upload-queue.js +115 -0
- package/dist/media/video-player.d.ts +135 -0
- package/dist/media/video-player.js +319 -0
- package/dist/motion/core.d.ts +32 -0
- package/dist/motion/core.js +77 -0
- package/dist/motion/count-up.d.ts +29 -0
- package/dist/motion/count-up.js +92 -0
- package/dist/motion/index.d.ts +11 -0
- package/dist/motion/index.js +13 -0
- package/dist/motion/motion-scope.d.ts +17 -0
- package/dist/motion/motion-scope.js +16 -0
- package/dist/motion/page-transition.d.ts +33 -0
- package/dist/motion/page-transition.js +61 -0
- package/dist/motion/parallax.d.ts +37 -0
- package/dist/motion/parallax.js +90 -0
- package/dist/motion/pointer.d.ts +38 -0
- package/dist/motion/pointer.js +117 -0
- package/dist/motion/reveal.d.ts +72 -0
- package/dist/motion/reveal.js +133 -0
- package/dist/motion/scroll-shrink.d.ts +18 -0
- package/dist/motion/scroll-shrink.js +47 -0
- package/dist/motion/skeleton-swap.d.ts +17 -0
- package/dist/motion/skeleton-swap.js +43 -0
- package/dist/motion/text-reveal.d.ts +30 -0
- package/dist/motion/text-reveal.js +29 -0
- package/dist/motion/ticker.d.ts +35 -0
- package/dist/motion/ticker.js +16 -0
- package/dist/next/index.d.ts +42 -0
- package/dist/next/index.js +36 -0
- package/dist/render/block-renderer.d.ts +56 -0
- package/dist/render/block-renderer.js +137 -0
- package/dist/render/index.d.ts +6 -0
- package/dist/render/index.js +7 -0
- package/dist/render/prepare.d.ts +61 -0
- package/dist/render/prepare.js +119 -0
- package/dist/scheduler/core/duration.d.ts +83 -0
- package/dist/scheduler/core/duration.js +174 -0
- package/dist/scheduler/core/gantt.d.ts +63 -0
- package/dist/scheduler/core/gantt.js +226 -0
- package/dist/scheduler/core/index.d.ts +6 -0
- package/dist/scheduler/core/index.js +7 -0
- package/dist/scheduler/core/layout.d.ts +97 -0
- package/dist/scheduler/core/layout.js +249 -0
- package/dist/scheduler/core/time-scale.d.ts +89 -0
- package/dist/scheduler/core/time-scale.js +173 -0
- package/dist/scheduler/gantt.d.ts +125 -0
- package/dist/scheduler/gantt.js +532 -0
- package/dist/scheduler/index.d.ts +6 -0
- package/dist/scheduler/index.js +7 -0
- package/dist/scheduler/resource-calendar.d.ts +218 -0
- package/dist/scheduler/resource-calendar.js +661 -0
- package/dist/scheduler/scheduler.d.ts +168 -0
- package/dist/scheduler/scheduler.js +768 -0
- package/dist/scheduler/shared.d.ts +63 -0
- package/dist/scheduler/shared.js +145 -0
- package/dist/scheduler/time-tracker.d.ts +138 -0
- package/dist/scheduler/time-tracker.js +403 -0
- package/dist/sortable/core.d.ts +67 -0
- package/dist/sortable/core.js +167 -0
- package/dist/sortable/index.d.ts +8 -0
- package/dist/sortable/index.js +10 -0
- package/dist/sortable/kanban-core.d.ts +70 -0
- package/dist/sortable/kanban-core.js +67 -0
- package/dist/sortable/kanban.d.ts +147 -0
- package/dist/sortable/kanban.js +472 -0
- package/dist/sortable/sortable-list.d.ts +71 -0
- package/dist/sortable/sortable-list.js +76 -0
- package/dist/sortable/sortable-tree.d.ts +105 -0
- package/dist/sortable/sortable-tree.js +462 -0
- package/dist/sortable/sortable.d.ts +188 -0
- package/dist/sortable/sortable.js +485 -0
- package/dist/sortable/use-pointer-drag.d.ts +75 -0
- package/dist/sortable/use-pointer-drag.js +173 -0
- package/dist/sortable/use-time-scale.d.ts +11 -0
- package/dist/sortable/use-time-scale.js +19 -0
- package/dist/styles/base.css +51 -0
- package/dist/styles/blocks.css +949 -0
- package/dist/styles/calendar.css +642 -0
- package/dist/styles/charts.css +264 -0
- package/dist/styles/data.css +474 -0
- package/dist/styles/editors.css +1022 -0
- package/dist/styles/forms.css +406 -0
- package/dist/styles/media.css +515 -0
- package/dist/styles/motion.css +389 -0
- package/dist/styles/navigation.css +293 -0
- package/dist/styles/overlays.css +244 -0
- package/dist/styles.css +743 -0
- package/package.json +160 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vamos (vamos.ist)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @vamos-ui/react
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
One component kit for every admin panel — CMS, CRM, HR, partner portals — and the websites around them.
|
|
4
|
+
Five theme axes: theme, material (glass/solid), accent, density and font.
|
|
5
|
+
|
|
6
|
+
Docs: https://ui.vamos.ist · Source: https://github.com/sametburaksari/vamos-ui
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
pnpm add @vamos-ui/react
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
```css
|
|
13
|
+
/* app/globals.css (Tailwind CSS v4) */
|
|
14
|
+
@import "tailwindcss";
|
|
15
|
+
@import "@vamos-ui/react/styles.css";
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
import { Button } from "@vamos-ui/react";
|
|
20
|
+
|
|
21
|
+
export default function Page() {
|
|
22
|
+
return <Button>Save</Button>;
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Prefer to own the source? Copy single components with the CLI: `npx vamos-ui add button`.
|
|
27
|
+
|
|
28
|
+
MIT licensed. “Vamos UI” and the logo are trademarks of Vamos.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type BlockLabels } from "./labels.js";
|
|
3
|
+
export type BlockHeadingSize = "display-2xl" | "display-xl" | "display-l" | "display-m" | "h3";
|
|
4
|
+
/** Renders a heading string with its `*emphasis*` as `<em>`. ReactNodes pass through untouched. */
|
|
5
|
+
export declare function renderEmphasis(text: React.ReactNode): React.ReactNode;
|
|
6
|
+
export interface BlockHeadingProps extends Omit<React.HTMLAttributes<HTMLHeadingElement>, "children"> {
|
|
7
|
+
/** Heading copy. A string supports one `*emphasis*`. */
|
|
8
|
+
text?: React.ReactNode;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
/** Outline level. Default 2 (the renderer passes 1 to the page's first intro block). */
|
|
11
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
12
|
+
/** Visual size, independent of the level. Default `"display-m"`. */
|
|
13
|
+
size?: BlockHeadingSize;
|
|
14
|
+
/** Builder canvas: an empty heading renders an "Add a title" placeholder. */
|
|
15
|
+
editMode?: boolean;
|
|
16
|
+
/** Prop path for edit mode (`data-field`), e.g. `"props.title"`. */
|
|
17
|
+
field?: string;
|
|
18
|
+
labels?: Partial<BlockLabels>;
|
|
19
|
+
locale?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Display heading for site blocks. Fluid size from the `--text-display-*` scale, follows the
|
|
23
|
+
* `data-font` preset (italic serif emphasis in editorial, accent ink in sans presets). Server component.
|
|
24
|
+
*
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <BlockHeading level={1} size="display-xl" text="Dinner, *slowly*." />
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare const BlockHeading: React.ForwardRefExoticComponent<BlockHeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/cn.js";
|
|
4
|
+
import { parseEmphasis } from "./schema/emphasis.js";
|
|
5
|
+
import { blockText } from "./labels.js";
|
|
6
|
+
const sizeClass = {
|
|
7
|
+
"display-2xl": "font-display text-display-2xl",
|
|
8
|
+
"display-xl": "font-display text-display-xl",
|
|
9
|
+
"display-l": "font-display text-display-l",
|
|
10
|
+
"display-m": "font-display text-display-m",
|
|
11
|
+
h3: "text-h3 font-semibold tracking-[-0.012em]",
|
|
12
|
+
};
|
|
13
|
+
/** Renders a heading string with its `*emphasis*` as `<em>`. ReactNodes pass through untouched. */
|
|
14
|
+
export function renderEmphasis(text) {
|
|
15
|
+
if (typeof text !== "string")
|
|
16
|
+
return text;
|
|
17
|
+
const parts = parseEmphasis(text);
|
|
18
|
+
if (parts.length === 0)
|
|
19
|
+
return "";
|
|
20
|
+
if (parts.length === 1 && !parts[0].em)
|
|
21
|
+
return parts[0].text;
|
|
22
|
+
return parts.map((p, i) => (p.em ? _jsx("em", { children: p.text }, i) : _jsx(React.Fragment, { children: p.text }, i)));
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Display heading for site blocks. Fluid size from the `--text-display-*` scale, follows the
|
|
26
|
+
* `data-font` preset (italic serif emphasis in editorial, accent ink in sans presets). Server component.
|
|
27
|
+
*
|
|
28
|
+
* ```tsx
|
|
29
|
+
* <BlockHeading level={1} size="display-xl" text="Dinner, *slowly*." />
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export const BlockHeading = React.forwardRef(function BlockHeading({ text, children, level = 2, size = "display-m", editMode, field, labels, locale, className, ...props }, ref) {
|
|
33
|
+
const Tag = `h${level}`;
|
|
34
|
+
const content = children ?? renderEmphasis(text);
|
|
35
|
+
const empty = content === undefined || content === null || content === "";
|
|
36
|
+
if (empty && !editMode)
|
|
37
|
+
return null;
|
|
38
|
+
return (_jsx(Tag, { ref: ref, className: cn("vb-heading text-fg", sizeClass[size], className), "data-field": editMode ? field : undefined, "data-empty": empty ? "" : undefined, ...props, children: empty ? blockText(labels, locale)("addTitle") : content }));
|
|
39
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type BlockLabels } from "./labels.js";
|
|
3
|
+
import type { BlockAdapters } from "./types.js";
|
|
4
|
+
export type ImageAspect = "1:1" | "4:5" | "3:4" | "4:3" | "3:2" | "2:3" | "16:9" | "21:9" | number;
|
|
5
|
+
export interface BlockImageProps {
|
|
6
|
+
src?: string;
|
|
7
|
+
/** Required unless `decorative`. */
|
|
8
|
+
alt?: string;
|
|
9
|
+
/** Intrinsic size — prevents layout shift. */
|
|
10
|
+
width?: number;
|
|
11
|
+
height?: number;
|
|
12
|
+
/** The image only decorates: rendered with `alt=""`. */
|
|
13
|
+
decorative?: boolean;
|
|
14
|
+
/** Crop into a fixed ratio (cover). Without it the image keeps its own ratio. */
|
|
15
|
+
aspect?: ImageAspect;
|
|
16
|
+
fit?: "cover" | "contain";
|
|
17
|
+
/** 0..1 focal point → object-position. */
|
|
18
|
+
focal?: {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
};
|
|
22
|
+
/** Tiny data-URL placeholder painted under the image. */
|
|
23
|
+
blurDataURL?: string;
|
|
24
|
+
/** Responsive `sizes`, e.g. `"(min-width: 72rem) 50vw, 100vw"`. */
|
|
25
|
+
sizes?: string;
|
|
26
|
+
/** Above the fold: eager + `fetchpriority="high"`. */
|
|
27
|
+
priority?: boolean;
|
|
28
|
+
/** Wraps the image in `<figure>` with this caption. */
|
|
29
|
+
caption?: React.ReactNode;
|
|
30
|
+
/** Classes for the frame (radius, width). */
|
|
31
|
+
className?: string;
|
|
32
|
+
/** Classes for the `<img>` itself. */
|
|
33
|
+
imgClassName?: string;
|
|
34
|
+
style?: React.CSSProperties;
|
|
35
|
+
components?: BlockAdapters;
|
|
36
|
+
labels?: Partial<BlockLabels>;
|
|
37
|
+
locale?: string;
|
|
38
|
+
/** Builder canvas: an empty `src` renders an "Add an image" placeholder. */
|
|
39
|
+
editMode?: boolean;
|
|
40
|
+
/** Prop path for edit mode (`data-field`). */
|
|
41
|
+
field?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Images for site blocks: intrinsic size (no CLS), fixed-ratio crops by focal point, blur
|
|
45
|
+
* placeholder, priority hint, `sizes`, and the app's own `<Image>` via `components.Image`.
|
|
46
|
+
* Server component.
|
|
47
|
+
*
|
|
48
|
+
* ```tsx
|
|
49
|
+
* <BlockImage src="/dining-room.jpg" alt="The dining room at dusk" width={2400} height={1600} aspect="4:5" focal={{ x: 0.4, y: 0.5 }} />
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export declare function BlockImage({ src, alt, width, height, decorative, aspect, fit, focal, blurDataURL, sizes, priority, caption, className, imgClassName, style, components, labels, locale, editMode, field, }: BlockImageProps): React.JSX.Element | null;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ImageOff } from "lucide-react";
|
|
3
|
+
import { cn } from "../lib/cn.js";
|
|
4
|
+
import { blockText } from "./labels.js";
|
|
5
|
+
const ratioOf = (a, w, h) => {
|
|
6
|
+
if (a === undefined)
|
|
7
|
+
return undefined;
|
|
8
|
+
if (typeof a === "number")
|
|
9
|
+
return String(a);
|
|
10
|
+
const [x, y] = a.split(":").map(Number);
|
|
11
|
+
return x && y ? `${x} / ${y}` : w && h ? `${w} / ${h}` : undefined;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Images for site blocks: intrinsic size (no CLS), fixed-ratio crops by focal point, blur
|
|
15
|
+
* placeholder, priority hint, `sizes`, and the app's own `<Image>` via `components.Image`.
|
|
16
|
+
* Server component.
|
|
17
|
+
*
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <BlockImage src="/dining-room.jpg" alt="The dining room at dusk" width={2400} height={1600} aspect="4:5" focal={{ x: 0.4, y: 0.5 }} />
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export function BlockImage({ src, alt, width, height, decorative, aspect, fit = "cover", focal, blurDataURL, sizes, priority, caption, className, imgClassName, style, components, labels, locale, editMode, field, }) {
|
|
23
|
+
const ratio = ratioOf(aspect, width, height);
|
|
24
|
+
const fieldAttr = editMode && field ? { "data-field": field } : undefined;
|
|
25
|
+
if (!src) {
|
|
26
|
+
if (!editMode)
|
|
27
|
+
return null;
|
|
28
|
+
const t = blockText(labels, locale);
|
|
29
|
+
return (_jsxs("span", { "data-empty": "", className: cn("vb-image gap-2 rounded-ui text-small", className), style: { aspectRatio: ratio ?? "3 / 2", ...style }, ...fieldAttr, children: [_jsx(ImageOff, { "aria-hidden": true, className: "size-5", strokeWidth: 1.5 }), _jsx("span", { children: t("addImage") })] }));
|
|
30
|
+
}
|
|
31
|
+
if (!decorative && !alt && process.env.NODE_ENV !== "production") {
|
|
32
|
+
console.warn(`[vamos-ui] BlockImage: "${src}" has no alt text. Describe it, or pass decorative.`);
|
|
33
|
+
}
|
|
34
|
+
const frameStyle = {
|
|
35
|
+
...(ratio ? { aspectRatio: ratio } : null),
|
|
36
|
+
...(focal ? { "--vb-focal": `${(focal.x * 100).toFixed(1)}% ${(focal.y * 100).toFixed(1)}%` } : null),
|
|
37
|
+
...(fit !== "cover" ? { "--vb-fit": fit } : null),
|
|
38
|
+
...(blurDataURL ? { backgroundImage: `url("${blurDataURL}")` } : null),
|
|
39
|
+
...style,
|
|
40
|
+
};
|
|
41
|
+
const altText = decorative ? "" : (alt ?? "");
|
|
42
|
+
const Img = components?.Image;
|
|
43
|
+
const img = Img ? (_jsx(Img, { src: src, alt: altText, width: ratio ? undefined : width, height: ratio ? undefined : height, fill: ratio ? true : undefined, sizes: sizes, priority: priority, className: imgClassName })) : (_jsx("img", { src: src, alt: altText, width: width, height: height, sizes: sizes, loading: priority ? "eager" : "lazy", decoding: priority ? "sync" : "async", fetchPriority: priority ? "high" : undefined, className: imgClassName }));
|
|
44
|
+
const frame = (_jsx("span", { "data-ratio": ratio ? "" : undefined, className: cn("vb-image", !ratio && "h-auto", caption ? undefined : className), style: frameStyle, ...(caption ? null : fieldAttr), children: img }));
|
|
45
|
+
if (!caption)
|
|
46
|
+
return frame;
|
|
47
|
+
return (_jsxs("figure", { className: cn("vb-figure", className), ...fieldAttr, children: [frame, _jsx("figcaption", { className: "text-small text-fg-muted", children: caption })] }));
|
|
48
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type BlockLabels } from "./labels.js";
|
|
3
|
+
import type { BlockAdapters } from "./types.js";
|
|
4
|
+
import type { CtaStyle } from "./schema/types.js";
|
|
5
|
+
export interface BlockLinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href"> {
|
|
6
|
+
href: string;
|
|
7
|
+
/** Open in a new tab (adds `rel="noopener noreferrer"` and an announced "(opens in a new tab)"). */
|
|
8
|
+
newTab?: boolean;
|
|
9
|
+
/** Render as a button-styled call to action. One `primary` per block. */
|
|
10
|
+
appearance?: CtaStyle;
|
|
11
|
+
/** Button size when `appearance` is set. Default `"lg"`. */
|
|
12
|
+
size?: "md" | "lg" | "xl";
|
|
13
|
+
components?: BlockAdapters;
|
|
14
|
+
labels?: Partial<BlockLabels>;
|
|
15
|
+
locale?: string;
|
|
16
|
+
/** Prop path for edit mode (`data-field`). */
|
|
17
|
+
field?: string;
|
|
18
|
+
editMode?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Links for site blocks. Internal paths go through the app's router `Link` (`components.Link`);
|
|
22
|
+
* external URLs, `mailto:` and `tel:` render `<a>`. Unsafe hrefs (`javascript:`, `data:`…) render
|
|
23
|
+
* as plain text. Server component.
|
|
24
|
+
*
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <BlockLink href="/reservations" appearance="primary">Book a table</BlockLink>
|
|
27
|
+
* <BlockLink href="https://maps.app.goo.gl/x" newTab>Directions</BlockLink>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare const BlockLink: React.ForwardRefExoticComponent<BlockLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/cn.js";
|
|
4
|
+
import { buttonVariants } from "../components/button.js";
|
|
5
|
+
import { blockText } from "./labels.js";
|
|
6
|
+
import { isExternalUrl, sanitizeHref } from "./schema/safety.js";
|
|
7
|
+
/**
|
|
8
|
+
* Links for site blocks. Internal paths go through the app's router `Link` (`components.Link`);
|
|
9
|
+
* external URLs, `mailto:` and `tel:` render `<a>`. Unsafe hrefs (`javascript:`, `data:`…) render
|
|
10
|
+
* as plain text. Server component.
|
|
11
|
+
*
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <BlockLink href="/reservations" appearance="primary">Book a table</BlockLink>
|
|
14
|
+
* <BlockLink href="https://maps.app.goo.gl/x" newTab>Directions</BlockLink>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export const BlockLink = React.forwardRef(function BlockLink({ href, newTab, appearance, size = "lg", components, labels, locale, field, editMode, className, children, rel, target, ...props }, ref) {
|
|
18
|
+
const safe = sanitizeHref(href);
|
|
19
|
+
const classes = cn(appearance === "link" ? "inline-flex items-center gap-1.5 font-medium text-fg underline decoration-line underline-offset-[0.3em] transition-colors hover:decoration-current focus-ring rounded-[2px]" : null, appearance && appearance !== "link" ? cn(buttonVariants({ variant: appearance, size }), appearance === "primary" && "vb-action-primary", appearance === "secondary" && "vb-action-secondary") : null, className);
|
|
20
|
+
const fieldAttr = editMode && field ? { "data-field": field } : undefined;
|
|
21
|
+
if (!safe) {
|
|
22
|
+
if (process.env.NODE_ENV !== "production")
|
|
23
|
+
console.warn(`[vamos-ui] BlockLink: unsafe href "${href}" was not rendered as a link.`);
|
|
24
|
+
return (_jsx("span", { className: classes, "data-unsafe-href": "", ...fieldAttr, children: children }));
|
|
25
|
+
}
|
|
26
|
+
const t = blockText(labels, locale);
|
|
27
|
+
const content = newTab ? (_jsxs(_Fragment, { children: [children, " ", _jsx("span", { className: "sr-only", children: t("opensInNewTab") })] })) : (children);
|
|
28
|
+
const relValue = rel ?? (newTab ? "noopener noreferrer" : undefined);
|
|
29
|
+
const targetValue = target ?? (newTab ? "_blank" : undefined);
|
|
30
|
+
const Link = components?.Link;
|
|
31
|
+
const routable = !isExternalUrl(safe) && !/^[a-z][a-z\d+.-]*:/i.test(safe) && !safe.startsWith("#");
|
|
32
|
+
if (Link && routable) {
|
|
33
|
+
return (_jsx(Link, { ref: ref, href: safe, className: classes, rel: relValue, target: targetValue, ...fieldAttr, ...props, children: content }));
|
|
34
|
+
}
|
|
35
|
+
return (_jsx("a", { ref: ref, href: safe, className: classes, rel: relValue, target: targetValue, ...fieldAttr, ...props, children: content }));
|
|
36
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type SectionProps } from "./section.js";
|
|
3
|
+
import { type BlockImageProps } from "./block-image.js";
|
|
4
|
+
import { type BlockLinkProps } from "./block-link.js";
|
|
5
|
+
import { type RichTextProps } from "./rich-text.js";
|
|
6
|
+
import { type SectionHeaderProps } from "./section-header.js";
|
|
7
|
+
import { type BlockHeadingProps } from "./block-heading.js";
|
|
8
|
+
import { type SkipLinkProps } from "./section.js";
|
|
9
|
+
import type { BlockLabels } from "./labels.js";
|
|
10
|
+
import type { BlockAdapters } from "./types.js";
|
|
11
|
+
export interface CreateBlocksOptions extends BlockAdapters {
|
|
12
|
+
/** Built-in strings for every bound block (e.g. `blockLabelsTr`). */
|
|
13
|
+
labels?: Partial<BlockLabels>;
|
|
14
|
+
/** Default locale for Intl formatting. */
|
|
15
|
+
locale?: string;
|
|
16
|
+
}
|
|
17
|
+
/** Props `bind()` fills in: adapters, labels and locale. */
|
|
18
|
+
interface Bindable {
|
|
19
|
+
components?: BlockAdapters;
|
|
20
|
+
labels?: Partial<BlockLabels>;
|
|
21
|
+
locale?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface BoundBlocks {
|
|
24
|
+
Section: React.ComponentType<SectionProps>;
|
|
25
|
+
SectionHeader: React.ComponentType<SectionHeaderProps>;
|
|
26
|
+
BlockHeading: React.ComponentType<BlockHeadingProps>;
|
|
27
|
+
BlockImage: React.ComponentType<BlockImageProps>;
|
|
28
|
+
BlockLink: React.ComponentType<BlockLinkProps>;
|
|
29
|
+
RichText: React.ComponentType<RichTextProps>;
|
|
30
|
+
SkipLink: React.ComponentType<SkipLinkProps>;
|
|
31
|
+
/** Binds the adapters/labels/locale into any block component (yours or the kit's). */
|
|
32
|
+
bind<P extends Bindable>(Component: React.ComponentType<P>): React.ComponentType<P>;
|
|
33
|
+
/** The options, for passing on (`<BlockRenderer components={blocks.adapters} />`). */
|
|
34
|
+
adapters: BlockAdapters;
|
|
35
|
+
labels?: Partial<BlockLabels>;
|
|
36
|
+
locale?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Binds framework adapters once, without React context (works in Server Components).
|
|
40
|
+
*
|
|
41
|
+
* ```ts
|
|
42
|
+
* // app/blocks.ts
|
|
43
|
+
* import NextImage from "next/image";
|
|
44
|
+
* import NextLink from "next/link";
|
|
45
|
+
* export const { Section, BlockImage, BlockLink, RichText, bind } = createBlocks({ Image: NextImage, Link: NextLink });
|
|
46
|
+
* export const MyHero = bind(Hero);
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare function createBlocks(options?: CreateBlocksOptions): BoundBlocks;
|
|
50
|
+
/** `data-field` for edit mode (spread onto the element that shows a prop). */
|
|
51
|
+
export declare function fieldAttrs(editMode: boolean | undefined, path: string): {
|
|
52
|
+
"data-field"?: string;
|
|
53
|
+
};
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Section } from "./section.js";
|
|
3
|
+
import { BlockImage } from "./block-image.js";
|
|
4
|
+
import { BlockLink } from "./block-link.js";
|
|
5
|
+
import { RichText } from "./rich-text.js";
|
|
6
|
+
import { SectionHeader } from "./section-header.js";
|
|
7
|
+
import { BlockHeading } from "./block-heading.js";
|
|
8
|
+
import { SkipLink } from "./section.js";
|
|
9
|
+
/**
|
|
10
|
+
* Binds framework adapters once, without React context (works in Server Components).
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* // app/blocks.ts
|
|
14
|
+
* import NextImage from "next/image";
|
|
15
|
+
* import NextLink from "next/link";
|
|
16
|
+
* export const { Section, BlockImage, BlockLink, RichText, bind } = createBlocks({ Image: NextImage, Link: NextLink });
|
|
17
|
+
* export const MyHero = bind(Hero);
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export function createBlocks(options = {}) {
|
|
21
|
+
const { labels, locale, ...adapters } = options;
|
|
22
|
+
function bind(Component) {
|
|
23
|
+
function Bound(props) {
|
|
24
|
+
const merged = {
|
|
25
|
+
...props,
|
|
26
|
+
components: { ...adapters, ...props.components },
|
|
27
|
+
labels: labels || props.labels ? { ...labels, ...props.labels } : undefined,
|
|
28
|
+
locale: props.locale ?? locale,
|
|
29
|
+
};
|
|
30
|
+
return _jsx(Component, { ...merged });
|
|
31
|
+
}
|
|
32
|
+
Bound.displayName = `Bound(${Component.displayName ?? Component.name ?? "Block"})`;
|
|
33
|
+
return Bound;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
Section: bind(Section),
|
|
37
|
+
SectionHeader: bind(SectionHeader),
|
|
38
|
+
BlockHeading: bind(BlockHeading),
|
|
39
|
+
BlockImage: bind(BlockImage),
|
|
40
|
+
BlockLink: bind(BlockLink),
|
|
41
|
+
RichText: bind(RichText),
|
|
42
|
+
SkipLink: bind(SkipLink),
|
|
43
|
+
bind,
|
|
44
|
+
adapters,
|
|
45
|
+
labels,
|
|
46
|
+
locale,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/** `data-field` for edit mode (spread onto the element that shows a prop). */
|
|
50
|
+
export function fieldAttrs(editMode, path) {
|
|
51
|
+
return editMode ? { "data-field": path.startsWith("props.") ? path : `props.${path}` } : {};
|
|
52
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export { Section, Container, SkipLink, sectionThemeAttributes, accentForeground, type SectionProps, type ContainerProps, type ContainerSize, type SkipLinkProps } from "./section.js";
|
|
2
|
+
export { SectionHeader, type SectionHeaderProps } from "./section-header.js";
|
|
3
|
+
export { BlockHeading, renderEmphasis, type BlockHeadingProps, type BlockHeadingSize } from "./block-heading.js";
|
|
4
|
+
export { BlockImage, type BlockImageProps, type ImageAspect } from "./block-image.js";
|
|
5
|
+
export { BlockLink, type BlockLinkProps } from "./block-link.js";
|
|
6
|
+
export { RichText, renderInline, renderRichBlocks, type RichTextProps, type RichTextRenderOptions } from "./rich-text.js";
|
|
7
|
+
export { JsonLd, mergeJsonLd, serializeJsonLd, type JsonLdProps, type JsonLdNode } from "./json-ld.js";
|
|
8
|
+
export { createBlocks, fieldAttrs, type CreateBlocksOptions, type BoundBlocks } from "./create-blocks.js";
|
|
9
|
+
export { blockLabels, blockLabelsTr, blockText, type BlockLabels } from "./labels.js";
|
|
10
|
+
export type { BlockAdapters, BlockBaseProps, BlockComponentProps, BlockRuntime, ImageData, LinkData } from "./types.js";
|
|
11
|
+
export { parseEmphasis, stripEmphasis, type EmphasisPart } from "./schema/emphasis.js";
|
|
12
|
+
export { sanitizeHref, isExternalUrl, linkKindOf } from "./schema/safety.js";
|
|
13
|
+
export { pickLocale, type Localized } from "./schema/localized.js";
|
|
14
|
+
export { richToText, richFromText, countWords } from "./schema/rich-doc.js";
|
|
15
|
+
export type { BlockTheme, ImageRef, LinkRef, CtaRef, CtaStyle, BlockNode, VamosDoc, PageDoc, OpeningHours, MoneyValue, AddressValue, SocialLink } from "./schema/types.js";
|
|
16
|
+
export type { RichDoc, RichBlock, RichInline, RichMark } from "./schema/rich-doc.js";
|
|
17
|
+
export { AnnouncementBar, type AnnouncementBarProps, type AnnouncementVariant, type AnnouncementTone } from "./site/announcement-bar.js";
|
|
18
|
+
export { Navbar, formatSitePhone, type NavbarProps, type NavbarVariant, type NavbarItem, type NavbarLink, type NavbarLocale } from "./site/navbar.js";
|
|
19
|
+
export { Hero, type HeroProps, type HeroVariant } from "./site/hero.js";
|
|
20
|
+
export { FeatureGrid, type FeatureGridProps, type FeatureGridVariant, type FeatureItem } from "./site/feature-grid.js";
|
|
21
|
+
export { LogoStrip, type LogoStripProps, type LogoStripVariant, type LogoItem } from "./site/logo-strip.js";
|
|
22
|
+
export { StatsBand, type StatsBandProps, type StatsBandVariant, type StatItem } from "./site/stats-band.js";
|
|
23
|
+
export { PageIntro, breadcrumbJsonLd, type PageIntroProps, type PageIntroVariant, type PageIntroCrumb } from "./site/page-intro.js";
|
|
24
|
+
export { RichTextSection, type RichTextSectionProps, type RichTextSectionVariant } from "./site/rich-text-section.js";
|
|
25
|
+
export { MediaText, videoEmbedUrl, type MediaTextProps, type MediaTextVariant, type MediaTextVideo } from "./site/media-text.js";
|
|
26
|
+
export { Cta, waLink, type CtaProps, type CtaVariant, type CtaBookingConfig } from "./site/cta.js";
|
|
27
|
+
export { Faq, faqJsonLd, type FaqProps, type FaqVariant, type FaqItem } from "./site/faq.js";
|
|
28
|
+
export { Steps, type StepsProps, type StepsVariant, type StepsItem } from "./site/process.js";
|
|
29
|
+
export { site1Labels, site1LabelsTr, type Site1Labels, type SiteCta, type SiteMeta, type SiteImage } from "./site/_kit-1.js";
|
|
30
|
+
export { PricingTable, type PricingTableProps, type PricingVariant, type PricingBilling, type PricingPlan, type PricingFeature } from "./site/pricing-table.js";
|
|
31
|
+
export { ComparisonTable, type ComparisonTableProps, type ComparisonVariant, type ComparisonColumn, type ComparisonGroup, type ComparisonRow, type ComparisonValue } from "./site/comparison-table.js";
|
|
32
|
+
export { Testimonials, RatingStars, REVIEW_SOURCE_NAMES, type TestimonialsProps, type TestimonialsVariant, type TestimonialItem, type ReviewSummary, type ReviewSource } from "./site/testimonials.js";
|
|
33
|
+
export { Team, type TeamProps, type TeamVariant, type TeamMember } from "./site/team.js";
|
|
34
|
+
export { BlogList, BlogListSkeleton, type BlogListProps, type BlogListVariant, type PostSummary, type BlogPagination } from "./site/blog-list.js";
|
|
35
|
+
export { ArticleLayout, shareUrl, type ArticleLayoutProps, type ArticleVariant, type ArticlePost, type ArticleAuthor, type ShareTarget } from "./site/article-layout.js";
|
|
36
|
+
export { ContactForm, type ContactFormProps, type ContactFormVariant, type ContactInfo } from "./site/contact-form.js";
|
|
37
|
+
export { MapHours, HoursTable, directionsUrl, mapEmbedUrl, localBusinessJsonLd, type MapHoursProps, type MapHoursVariant, type Branch, type DirectionsProvider, type BusinessType, type HoursDisplay } from "./site/map-hours.js";
|
|
38
|
+
export { MenuList, menuJsonLd, ALLERGENS, type MenuListProps, type MenuVariant, type MenuCategory, type MenuItem, type MenuPrice, type MenuTag, type Allergen } from "./site/menu-list.js";
|
|
39
|
+
export { GallerySection, type GallerySectionProps, type GalleryVariant, type GalleryImage, type GallerySpan } from "./site/gallery-section.js";
|
|
40
|
+
export { ConsentBanner, ConsentDefaults, type ConsentBannerProps, type ConsentVariant } from "./site/consent-banner.js";
|
|
41
|
+
export { ContactDock, type ContactDockProps, type ContactDockVariant, type DockAction, type MessagingProvider } from "./site/contact-dock.js";
|
|
42
|
+
export { EmbedFacade, type EmbedFacadeProps } from "./site/embed-facade.js";
|
|
43
|
+
export { Footer, type FooterProps, type FooterVariant } from "./site/footer.js";
|
|
44
|
+
export { NotFound, type NotFoundProps, type NotFoundVariant, type NotFoundKind } from "./site/not-found.js";
|
|
45
|
+
export { isOpenAt, hoursStatus, hoursOn, weekRows, summarizeHours, orderedWeek, weekStartOf, weekdayName, formatTime, formatRange, zonedMoment, openingHoursJsonLd, describeStatus, type OpenStatus, type OpenState, type WeekRow, type DayHours, type ZonedMoment, type Weekday, type TimeRange } from "./site/shared/opening-hours.js";
|
|
46
|
+
export { OpenNow, type OpenNowProps } from "./site/shared/open-now.js";
|
|
47
|
+
export { ConsentGate, type ConsentGateProps } from "./site/shared/consent-gate.js";
|
|
48
|
+
export { ConsentSettingsButton } from "./site/shared/consent-island.js";
|
|
49
|
+
export { getConsent, onConsent, readConsent, writeConsent, parseConsent, openConsentPreferences, consentDefaultsScript, consentModeSignals, CONSENT_COOKIE, CONSENT_EVENT, CONSENT_OPEN_EVENT, CONSENT_CATEGORIES, type ConsentCategory, type ConsentRecord, type ConsentChoices } from "./site/shared/consent.js";
|
|
50
|
+
export { validateContactForm, isSpam, contactFieldLabel, HONEYPOT_FIELD, type ContactFieldConfig, type ContactFieldName, type SiteFormState, type SiteFormAction, type ContactValidation } from "./site/shared/site-form.js";
|
|
51
|
+
export { BrandIcon, BRAND_NAMES, type BrandName, type BrandIconProps } from "./site/shared/brand-icons.js";
|
|
52
|
+
export { site2Labels, site2LabelsTr, type Site2Labels, type Site2BlockLabels } from "./site/shared/labels-2.js";
|
|
53
|
+
export { SiteShell, SiteShellPage, SiteShellLocale, SiteShellLink, useSiteShell, type SiteShellProps, type SiteShellPageProps, type SiteShellLocaleProps, type SiteShellLinkProps, type SiteShellContextValue } from "./site/site-shell.js";
|
|
54
|
+
export { siteAccent, siteAccentCss, siteAccentKey, isBuiltInAccent, BUILT_IN_SITE_ACCENTS, SITE_TEXT_CONTRAST, type SiteAccentPalette, type SiteAccentOptions } from "./site/shared/site-accent.js";
|
|
55
|
+
export { sitePageHref, siteLocaleHref, parseSiteHref, readSiteLocation, writeSiteLocation, type SiteRouting, type SiteLocation, type SiteRouteParams } from "./site/shared/site-routing.js";
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Public API of @vamos-ui/react/blocks — layer 1 (plain components, server-compatible, no zod).
|
|
2
|
+
// Schema: @vamos-ui/react/blocks/schema · Renderer: @vamos-ui/react/render.
|
|
3
|
+
export { Section, Container, SkipLink, sectionThemeAttributes, accentForeground } from "./section.js";
|
|
4
|
+
export { SectionHeader } from "./section-header.js";
|
|
5
|
+
export { BlockHeading, renderEmphasis } from "./block-heading.js";
|
|
6
|
+
export { BlockImage } from "./block-image.js";
|
|
7
|
+
export { BlockLink } from "./block-link.js";
|
|
8
|
+
export { RichText, renderInline, renderRichBlocks } from "./rich-text.js";
|
|
9
|
+
export { JsonLd, mergeJsonLd, serializeJsonLd } from "./json-ld.js";
|
|
10
|
+
export { createBlocks, fieldAttrs } from "./create-blocks.js";
|
|
11
|
+
export { blockLabels, blockLabelsTr, blockText } from "./labels.js";
|
|
12
|
+
// Pure helpers (no zod) re-exported for components
|
|
13
|
+
export { parseEmphasis, stripEmphasis } from "./schema/emphasis.js";
|
|
14
|
+
export { sanitizeHref, isExternalUrl, linkKindOf } from "./schema/safety.js";
|
|
15
|
+
export { pickLocale } from "./schema/localized.js";
|
|
16
|
+
export { richToText, richFromText, countWords } from "./schema/rich-doc.js";
|
|
17
|
+
// Site blocks · registry 1 (definitions with zod live in ./site/registry-1.ts — server/admin only)
|
|
18
|
+
export { AnnouncementBar } from "./site/announcement-bar.js";
|
|
19
|
+
export { Navbar, formatSitePhone } from "./site/navbar.js";
|
|
20
|
+
export { Hero } from "./site/hero.js";
|
|
21
|
+
export { FeatureGrid } from "./site/feature-grid.js";
|
|
22
|
+
export { LogoStrip } from "./site/logo-strip.js";
|
|
23
|
+
export { StatsBand } from "./site/stats-band.js";
|
|
24
|
+
export { PageIntro, breadcrumbJsonLd } from "./site/page-intro.js";
|
|
25
|
+
export { RichTextSection } from "./site/rich-text-section.js";
|
|
26
|
+
export { MediaText, videoEmbedUrl } from "./site/media-text.js";
|
|
27
|
+
export { Cta, waLink } from "./site/cta.js";
|
|
28
|
+
export { Faq, faqJsonLd } from "./site/faq.js";
|
|
29
|
+
export { Steps } from "./site/process.js";
|
|
30
|
+
export { site1Labels, site1LabelsTr } from "./site/_kit-1.js";
|
|
31
|
+
// Site blocks · registry 2 (definitions with zod live in ./site/registry-2.ts — server/admin only)
|
|
32
|
+
export { PricingTable } from "./site/pricing-table.js";
|
|
33
|
+
export { ComparisonTable } from "./site/comparison-table.js";
|
|
34
|
+
export { Testimonials, RatingStars, REVIEW_SOURCE_NAMES } from "./site/testimonials.js";
|
|
35
|
+
export { Team } from "./site/team.js";
|
|
36
|
+
export { BlogList, BlogListSkeleton } from "./site/blog-list.js";
|
|
37
|
+
export { ArticleLayout, shareUrl } from "./site/article-layout.js";
|
|
38
|
+
export { ContactForm } from "./site/contact-form.js";
|
|
39
|
+
export { MapHours, HoursTable, directionsUrl, mapEmbedUrl, localBusinessJsonLd } from "./site/map-hours.js";
|
|
40
|
+
export { MenuList, menuJsonLd, ALLERGENS } from "./site/menu-list.js";
|
|
41
|
+
export { GallerySection } from "./site/gallery-section.js";
|
|
42
|
+
export { ConsentBanner, ConsentDefaults } from "./site/consent-banner.js";
|
|
43
|
+
export { ContactDock } from "./site/contact-dock.js";
|
|
44
|
+
export { EmbedFacade } from "./site/embed-facade.js";
|
|
45
|
+
export { Footer } from "./site/footer.js";
|
|
46
|
+
export { NotFound } from "./site/not-found.js";
|
|
47
|
+
// Shared modules: opening hours, consent, form contract, brand marks, labels
|
|
48
|
+
export { isOpenAt, hoursStatus, hoursOn, weekRows, summarizeHours, orderedWeek, weekStartOf, weekdayName, formatTime, formatRange, zonedMoment, openingHoursJsonLd, describeStatus } from "./site/shared/opening-hours.js";
|
|
49
|
+
export { OpenNow } from "./site/shared/open-now.js";
|
|
50
|
+
export { ConsentGate } from "./site/shared/consent-gate.js";
|
|
51
|
+
export { ConsentSettingsButton } from "./site/shared/consent-island.js";
|
|
52
|
+
export { getConsent, onConsent, readConsent, writeConsent, parseConsent, openConsentPreferences, consentDefaultsScript, consentModeSignals, CONSENT_COOKIE, CONSENT_EVENT, CONSENT_OPEN_EVENT, CONSENT_CATEGORIES } from "./site/shared/consent.js";
|
|
53
|
+
export { validateContactForm, isSpam, contactFieldLabel, HONEYPOT_FIELD } from "./site/shared/site-form.js";
|
|
54
|
+
export { BrandIcon, BRAND_NAMES } from "./site/shared/brand-icons.js";
|
|
55
|
+
export { site2Labels, site2LabelsTr } from "./site/shared/labels-2.js";
|
|
56
|
+
// Site shell: locale switch, inner pages and a scoped accent for whole-site blocks
|
|
57
|
+
export { SiteShell, SiteShellPage, SiteShellLocale, SiteShellLink, useSiteShell } from "./site/site-shell.js";
|
|
58
|
+
export { siteAccent, siteAccentCss, siteAccentKey, isBuiltInAccent, BUILT_IN_SITE_ACCENTS, SITE_TEXT_CONTRAST } from "./site/shared/site-accent.js";
|
|
59
|
+
export { sitePageHref, siteLocaleHref, parseSiteHref, readSiteLocation, writeSiteLocation } from "./site/shared/site-routing.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type JsonLdNode = Record<string, unknown>;
|
|
3
|
+
/** Serialises JSON-LD safely for a `<script>` (no `</script>` break-out, no U+2028/9 surprises). */
|
|
4
|
+
export declare function serializeJsonLd(data: unknown): string;
|
|
5
|
+
/** Merges nodes into one `{ "@context", "@graph" }` document; nodes with the same `@id` are merged. */
|
|
6
|
+
export declare function mergeJsonLd(nodes: readonly (JsonLdNode | null | undefined)[]): JsonLdNode | null;
|
|
7
|
+
export interface JsonLdProps {
|
|
8
|
+
/** One node, a list of nodes (merged into an @graph), or a complete JSON-LD document. */
|
|
9
|
+
data: JsonLdNode | readonly JsonLdNode[] | null | undefined;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Structured data for search engines. Server component.
|
|
13
|
+
*
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <JsonLd data={{ "@type": "Restaurant", name: "Kıyı Meyhane", servesCuisine: "Aegean" }} />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function JsonLd({ data }: JsonLdProps): React.JSX.Element | null;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/** Serialises JSON-LD safely for a `<script>` (no `</script>` break-out, no U+2028/9 surprises). */
|
|
3
|
+
export function serializeJsonLd(data) {
|
|
4
|
+
return JSON.stringify(data)
|
|
5
|
+
.replace(/</g, "\\u003c")
|
|
6
|
+
.replace(/>/g, "\\u003e")
|
|
7
|
+
.replace(/&/g, "\\u0026")
|
|
8
|
+
.replace(/\u2028/g, "\\u2028")
|
|
9
|
+
.replace(/\u2029/g, "\\u2029");
|
|
10
|
+
}
|
|
11
|
+
/** Merges nodes into one `{ "@context", "@graph" }` document; nodes with the same `@id` are merged. */
|
|
12
|
+
export function mergeJsonLd(nodes) {
|
|
13
|
+
const byId = new Map();
|
|
14
|
+
const graph = [];
|
|
15
|
+
for (const n of nodes) {
|
|
16
|
+
if (!n)
|
|
17
|
+
continue;
|
|
18
|
+
const { "@context": _ctx, ...rest } = n;
|
|
19
|
+
const id = typeof rest["@id"] === "string" ? rest["@id"] : undefined;
|
|
20
|
+
if (id && byId.has(id))
|
|
21
|
+
Object.assign(byId.get(id), rest);
|
|
22
|
+
else {
|
|
23
|
+
graph.push(rest);
|
|
24
|
+
if (id)
|
|
25
|
+
byId.set(id, rest);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return graph.length ? { "@context": "https://schema.org", "@graph": graph } : null;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Structured data for search engines. Server component.
|
|
32
|
+
*
|
|
33
|
+
* ```tsx
|
|
34
|
+
* <JsonLd data={{ "@type": "Restaurant", name: "Kıyı Meyhane", servesCuisine: "Aegean" }} />
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export function JsonLd({ data }) {
|
|
38
|
+
if (!data)
|
|
39
|
+
return null;
|
|
40
|
+
const doc = Array.isArray(data) ? mergeJsonLd(data) : "@context" in data ? data : { "@context": "https://schema.org", ...data };
|
|
41
|
+
if (!doc)
|
|
42
|
+
return null;
|
|
43
|
+
return _jsx("script", { type: "application/ld+json", dangerouslySetInnerHTML: { __html: serializeJsonLd(doc) } });
|
|
44
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** English defaults. Keys are shared by every site block; wave-3 blocks add theirs here. */
|
|
2
|
+
export declare const blockLabels: {
|
|
3
|
+
opensInNewTab: string;
|
|
4
|
+
skipToContent: string;
|
|
5
|
+
addTitle: string;
|
|
6
|
+
addText: string;
|
|
7
|
+
addImage: string;
|
|
8
|
+
unknownBlock: string;
|
|
9
|
+
unknownBlockHint: string;
|
|
10
|
+
invalidBlock: string;
|
|
11
|
+
invalidBlockHint: string;
|
|
12
|
+
newerBlock: string;
|
|
13
|
+
emptyImage: string;
|
|
14
|
+
codeSample: string;
|
|
15
|
+
};
|
|
16
|
+
export type BlockLabels = typeof blockLabels;
|
|
17
|
+
/** Turkish dictionary for site blocks. */
|
|
18
|
+
export declare const blockLabelsTr: BlockLabels;
|
|
19
|
+
/** Label lookup for server components: `labels` prop → English. */
|
|
20
|
+
export declare function blockText(labels?: Partial<BlockLabels>, locale?: string): (key: keyof BlockLabels, vars?: Record<string, unknown>) => string;
|