@designcrowd/library.brand-page 5.17.28 → 5.18.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/lib/src/{CreatedOnBrandCrowd-de-de-CJZpKPNH.js → CreatedOnBrandCrowd-de-de-xmkupPus.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-DkIa7iEb.js → CreatedOnBrandCrowd-en-us-Ck7EdTtb.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-CE2p6XHz.js → CreatedOnBrandCrowd-es-es-BC8sJuDH.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-BBjOZS3M.js → CreatedOnBrandCrowd-fr-ca-CN-UBe1q.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-BBjOZS3M.js → CreatedOnBrandCrowd-fr-fr-CN-UBe1q.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-Dayzl4BZ.js → CreatedOnBrandCrowd-pt-br-CajQyNkx.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-Dayzl4BZ.js → CreatedOnBrandCrowd-pt-pt-CajQyNkx.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-CFzDqfCb.js → CreatedOnDcom-de-de-BRCNMmDq.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-C2jIPBDY.js → CreatedOnDcom-en-us-BzQDtZhc.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-qejpzqho.js → CreatedOnDcom-es-es-D-qAM4Cd.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-DMO9Ld7K.js → CreatedOnDcom-fr-ca-CZ1irFOc.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-BFWN9qTP.js → CreatedOnDcom-fr-fr-Gb5BCF0N.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-CneD3ghF.js → CreatedOnDcom-pt-br-CAQV0q6o.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-Cg1B7s0o.js → CreatedOnDcom-pt-pt-D6tQdQFh.js} +1 -1
- package/lib/src/brand-page/components/image-gallery/ImageGalleryModal.mixin.js +2 -2
- package/lib/src/brand-page/models/brand-page-context.model.d.ts +0 -2
- package/lib/src/brand-page/models/brand-page-context.model.js +1 -11
- package/lib/src/brand-page/models/index.d.ts +1 -0
- package/lib/src/brand-page/models/index.js +1 -0
- package/lib/src/brand-page/utils/color.util.js +23 -3
- package/lib/src/brand-page/utils/raygun.util.d.ts +5 -1
- package/lib/src/brand-page/utils/raygun.util.js +7 -2
- package/lib/src/brand-page/utils/svg-color.util.js +1 -2
- package/lib/src/brand-page/utils/view-model.util.js +1 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +1 -31
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +0 -2
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +2 -31
- package/lib/src/brand-page-maker/components/preview/Preview.mixin.d.ts +0 -14
- package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +0 -28
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +0 -28
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +0 -28
- package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +0 -28
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +0 -28
- package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +0 -28
- package/lib/src/brand-page-maker/composables/ai-chat/aiErrorCopy.d.ts +35 -0
- package/lib/src/brand-page-maker/composables/ai-chat/aiErrorCopy.js +108 -0
- package/lib/src/brand-page-maker/composables/ai-chat/{useAiChat.d.ts → types.d.ts} +5 -13
- package/lib/src/brand-page-maker/composables/ai-chat/types.js +1 -0
- package/lib/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.d.ts +19 -0
- package/lib/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.js +1 -0
- package/lib/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.d.ts +1 -1
- package/lib/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.js +488 -82
- package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +5 -5
- package/lib/src/brand-page-maker/composables/useEventTracker.d.ts +6 -16
- package/lib/src/brand-page-maker/composables/useEventTracker.js +19 -21
- package/lib/src/brand-page-maker/constants/sidebar-constant.d.ts +0 -1
- package/lib/src/brand-page-maker/constants/sidebar-constant.js +7 -15
- package/lib/src/brand-page-maker/convertors/image-aspect-ratio.convertor.js +2 -2
- package/lib/src/brand-page-maker/convertors/text-size-value.convertor.js +3 -1
- package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +30660 -0
- package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.js +34 -0
- package/lib/src/brand-page-maker/stores/ai-thread/ai-website-builder-thread-store.d.ts +1 -1
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +0 -28
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +42 -2
- package/lib/src/brand-page-maker/stores/index.d.ts +1 -1
- package/lib/src/brand-page-maker/stores/index.js +1 -1
- package/lib/src/brand-page-maker/stores/user/user-store.js +0 -1
- package/lib/src/bundled-translations-CnareLWC.js +175 -0
- package/lib/src/bundled-translations.de-DE-2Ys7epLO.js +175 -0
- package/lib/src/bundled-translations.es-ES-Cjp-G8rT.js +175 -0
- package/lib/src/bundled-translations.fr-CA-CsaW4Oae.js +175 -0
- package/lib/src/bundled-translations.fr-FR-DIT2dd8J.js +175 -0
- package/lib/src/bundled-translations.pt-BR-BamoBpDW.js +175 -0
- package/lib/src/bundled-translations.pt-PT-C9A4hY_e.js +175 -0
- package/lib/src/bundles/bundled-translations.de-DE.json +1 -20
- package/lib/src/bundles/bundled-translations.es-ES.json +1 -20
- package/lib/src/bundles/bundled-translations.fr-CA.json +1 -20
- package/lib/src/bundles/bundled-translations.fr-FR.json +1 -20
- package/lib/src/bundles/bundled-translations.json +1 -20
- package/lib/src/bundles/bundled-translations.pt-BR.json +1 -20
- package/lib/src/bundles/bundled-translations.pt-PT.json +1 -20
- package/lib/src/clients/ai-assistant-client.d.ts +30 -29
- package/lib/src/clients/ai-assistant-client.js +16 -16
- package/lib/src/clients/design-template-client.d.ts +0 -2
- package/lib/src/clients/design-template-client.js +0 -38
- package/lib/src/clients/websocket-gateway-client.d.ts +9 -1
- package/lib/src/composables/useTranslate.d.ts +2 -1
- package/lib/src/composables/useTranslate.js +2 -1
- package/lib/src/constants/ui.d.ts +0 -1
- package/lib/src/css/library.brand-page-brandCrowd.min.css +225 -134
- package/lib/src/css/library.brand-page-brandPage.min.css +227 -121
- package/lib/src/css/library.brand-page-designCom.min.css +225 -134
- package/lib/src/css/library.brand-page-preview.min.css +225 -118
- package/lib/src/index.d.ts +1 -1
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-33w_DBny.js → lib-CSRUPpSo.js} +30887 -29395
- package/lib/src/metadata-builder/ai-metadata-executor.d.ts +21 -0
- package/lib/src/metadata-builder/ai-metadata-executor.js +56 -3
- package/lib/src/metadata-builder/builders/add-page-builder.d.ts +2 -4
- package/lib/src/metadata-builder/builders/add-page-builder.js +5 -8
- package/lib/src/metadata-builder/builders/footer-builder.d.ts +11 -0
- package/lib/src/metadata-builder/builders/footer-builder.js +151 -0
- package/lib/src/metadata-builder/builders/global-styles-builder.d.ts +15 -0
- package/lib/src/metadata-builder/builders/global-styles-builder.js +129 -0
- package/lib/src/metadata-builder/builders/header-builder.d.ts +11 -0
- package/lib/src/metadata-builder/builders/header-builder.js +167 -0
- package/lib/src/metadata-builder/builders/rename-page-builder.d.ts +12 -0
- package/lib/src/metadata-builder/builders/rename-page-builder.js +49 -0
- package/lib/src/metadata-builder/builders/section-builders/about-section-builder.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-builders/about-section-builder.js +44 -4
- package/lib/src/metadata-builder/builders/section-builders/banner-section-builder.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-builders/banner-section-builder.js +70 -6
- package/lib/src/metadata-builder/builders/section-builders/base-section-builder.d.ts +36 -4
- package/lib/src/metadata-builder/builders/section-builders/base-section-builder.js +102 -12
- package/lib/src/metadata-builder/builders/section-builders/booking-section-builder.d.ts +8 -0
- package/lib/src/metadata-builder/builders/section-builders/booking-section-builder.js +50 -0
- package/lib/src/metadata-builder/builders/section-builders/button-section-builder.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-builders/button-section-builder.js +5 -1
- package/lib/src/metadata-builder/builders/section-builders/contact-form-builder.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-builders/contact-form-builder.js +47 -3
- package/lib/src/metadata-builder/builders/section-builders/delete-section-builder.d.ts +2 -1
- package/lib/src/metadata-builder/builders/section-builders/delete-section-builder.js +5 -2
- package/lib/src/metadata-builder/builders/section-builders/divider-section-builder.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-builders/divider-section-builder.js +11 -1
- package/lib/src/metadata-builder/builders/section-builders/image-gallery-builder.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-builders/image-gallery-builder.js +52 -13
- package/lib/src/metadata-builder/builders/section-builders/images-section-builder.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-builders/images-section-builder.js +47 -17
- package/lib/src/metadata-builder/builders/section-builders/index.d.ts +1 -0
- package/lib/src/metadata-builder/builders/section-builders/index.js +1 -0
- package/lib/src/metadata-builder/builders/section-builders/mailing-list-builder.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-builders/mailing-list-builder.js +20 -2
- package/lib/src/metadata-builder/builders/section-builders/mailing-list-section-builder.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-builders/mailing-list-section-builder.js +20 -2
- package/lib/src/metadata-builder/builders/section-builders/profile-section-builder.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-builders/profile-section-builder.js +36 -2
- package/lib/src/metadata-builder/builders/section-builders/shapes-section-builder.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-builders/shapes-section-builder.js +70 -27
- package/lib/src/metadata-builder/builders/section-builders/social-links-builder.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-builders/social-links-builder.js +7 -2
- package/lib/src/metadata-builder/builders/section-builders/testimonial-section-builder.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-builders/testimonial-section-builder.js +91 -26
- package/lib/src/metadata-builder/builders/section-builders/text-section-builder.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-builders/text-section-builder.js +69 -31
- package/lib/src/metadata-builder/builders/section-content-factory.d.ts +2 -2
- package/lib/src/metadata-builder/builders/section-content-factory.js +8 -2
- package/lib/src/metadata-builder/builders/section-field-maps.js +30 -2
- package/lib/src/metadata-builder/builders/section-field-utils.d.ts +46 -7
- package/lib/src/metadata-builder/builders/section-field-utils.js +86 -62
- package/lib/src/metadata-builder/builders/section-rules/about-section.rules.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-rules/about-section.rules.js +20 -0
- package/lib/src/metadata-builder/builders/section-rules/add-page.rules.d.ts +7 -0
- package/lib/src/metadata-builder/builders/section-rules/add-page.rules.js +8 -0
- package/lib/src/metadata-builder/builders/section-rules/banner-section.rules.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-rules/banner-section.rules.js +27 -0
- package/lib/src/metadata-builder/builders/section-rules/booking-section.rules.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-rules/booking-section.rules.js +16 -0
- package/lib/src/metadata-builder/builders/section-rules/button-section.rules.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-rules/button-section.rules.js +13 -0
- package/lib/src/metadata-builder/builders/section-rules/contact-form.rules.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-rules/contact-form.rules.js +16 -0
- package/lib/src/metadata-builder/builders/section-rules/divider-section.rules.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-rules/divider-section.rules.js +7 -0
- package/lib/src/metadata-builder/builders/section-rules/footer.rules.d.ts +4 -0
- package/lib/src/metadata-builder/builders/section-rules/footer.rules.js +5 -0
- package/lib/src/metadata-builder/builders/section-rules/global-styles.rules.d.ts +6 -0
- package/lib/src/metadata-builder/builders/section-rules/global-styles.rules.js +26 -0
- package/lib/src/metadata-builder/builders/section-rules/header.rules.d.ts +4 -0
- package/lib/src/metadata-builder/builders/section-rules/header.rules.js +41 -0
- package/lib/src/metadata-builder/builders/section-rules/image-gallery.rules.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-rules/image-gallery.rules.js +10 -0
- package/lib/src/metadata-builder/builders/section-rules/images-section.rules.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-rules/images-section.rules.js +31 -0
- package/lib/src/metadata-builder/builders/section-rules/mailing-list.rules.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-rules/mailing-list.rules.js +11 -0
- package/lib/src/metadata-builder/builders/section-rules/profile.rules.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-rules/profile.rules.js +14 -0
- package/lib/src/metadata-builder/builders/section-rules/rename-page.rules.d.ts +7 -0
- package/lib/src/metadata-builder/builders/section-rules/rename-page.rules.js +8 -0
- package/lib/src/metadata-builder/builders/section-rules/shapes-section.rules.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-rules/shapes-section.rules.js +27 -0
- package/lib/src/metadata-builder/builders/section-rules/social-links.rules.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-rules/social-links.rules.js +9 -0
- package/lib/src/metadata-builder/builders/section-rules/testimonial-section.rules.d.ts +7 -0
- package/lib/src/metadata-builder/builders/section-rules/testimonial-section.rules.js +26 -0
- package/lib/src/metadata-builder/builders/section-rules/text-section.rules.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-rules/text-section.rules.js +14 -0
- package/lib/src/metadata-builder/builders/shape-color-utils.d.ts +26 -0
- package/lib/src/metadata-builder/builders/shape-color-utils.js +52 -0
- package/lib/src/metadata-builder/builders/undo-builder.d.ts +48 -0
- package/lib/src/metadata-builder/builders/undo-builder.js +58 -0
- package/lib/src/metadata-builder/builders/update-content-text-style-builder.js +5 -1
- package/lib/src/metadata-builder/helpers/rte.helpers.d.ts +15 -4
- package/lib/src/metadata-builder/helpers/rte.helpers.js +24 -10
- package/lib/src/metadata-builder/metadata-executor.d.ts +2 -1
- package/lib/src/metadata-builder/metadata-executor.js +32 -5
- package/lib/src/metadata-builder/models.d.ts +26 -1
- package/lib/src/metadata-builder/models.js +14 -1
- package/lib/src/metadata-builder/parsers/ai-toolcall-parser.d.ts +144 -0
- package/lib/src/metadata-builder/parsers/ai-toolcall-parser.js +17 -0
- package/lib/src/metadata-builder/parsers/section-tool-arguments.d.ts +113 -24
- package/lib/src/metadata-builder/parsers/section-tool-arguments.js +5 -1
- package/lib/src/metadata-builder/sanitizers/rte-schema-check.d.ts +22 -0
- package/lib/src/metadata-builder/sanitizers/rte-schema-check.js +84 -0
- package/lib/src/metadata-builder/sanitizers/sanitizer-rules.d.ts +47 -0
- package/lib/src/metadata-builder/sanitizers/sanitizer-rules.js +60 -0
- package/lib/src/metadata-builder/sanitizers/section-args-validator.d.ts +41 -0
- package/lib/src/metadata-builder/sanitizers/section-args-validator.js +274 -0
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +2 -1
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.js +2 -16
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.stories.js +0 -1
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +2 -1
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +2 -3
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +0 -4
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +6 -8
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +0 -28
- package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +2 -1
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +0 -28
- package/lib/src/shared/navigation-style-settings/store/index.js +1 -0
- package/lib/src/shared/page-navigation/store/page-navigation-store.js +1 -20
- package/lib/src/shared/page-navigation/utils/nav-order-utils.d.ts +3 -0
- package/lib/src/shared/page-navigation/utils/nav-order-utils.js +20 -0
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +2 -30
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +0 -28
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +2 -43
- package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +0 -30
- package/lib/src/shared/side-bar/components/SideBarTabButton.mixin.d.ts +2 -3
- package/lib/src/shared/side-bar/store/side-bar-store.d.ts +0 -12
- package/lib/src/shared/side-bar/store/side-bar-store.js +0 -7
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +2 -29
- package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +2 -1
- package/lib/src/utils/build-asset-manifest.d.ts +26 -0
- package/lib/src/utils/build-asset-manifest.js +114 -0
- package/lib/src/utils/minify-brand-page-metadata.d.ts +49 -1
- package/lib/src/utils/minify-brand-page-metadata.js +216 -129
- package/package.json +1 -1
- package/src/brand-page/components/banner-section/BannerSection.vue +1 -1
- package/src/brand-page/components/contact-form/ContactForm.vue +29 -26
- package/src/brand-page/components/image-gallery/ImageGalleryModal.mixin.ts +6 -2
- package/src/brand-page/components/text-media-section/TextMediaSection.vue +1 -5
- package/src/brand-page/models/brand-page-context.model.ts +1 -25
- package/src/brand-page/models/index.ts +1 -0
- package/src/brand-page/utils/color.util.test.ts +48 -0
- package/src/brand-page/utils/color.util.ts +29 -4
- package/src/brand-page/utils/raygun.util.ts +11 -2
- package/src/brand-page/utils/svg-color.util.ts +1 -3
- package/src/brand-page/utils/view-model.util.ts +1 -4
- package/src/brand-page-maker/components/ai-text-edit/AiChatbox.vue +2 -2
- package/src/brand-page-maker/components/ai-text-edit/AiProgressFeed.vue +162 -0
- package/src/brand-page-maker/components/ai-text-edit/TextBubble.vue +57 -5
- package/src/brand-page-maker/components/ai-text-edit/i18n/generate-ai.de-DE.json +0 -20
- package/src/brand-page-maker/components/ai-text-edit/i18n/generate-ai.es-ES.json +0 -20
- package/src/brand-page-maker/components/ai-text-edit/i18n/generate-ai.fr-CA.json +0 -20
- package/src/brand-page-maker/components/ai-text-edit/i18n/generate-ai.fr-FR.json +0 -20
- package/src/brand-page-maker/components/ai-text-edit/i18n/generate-ai.json +0 -20
- package/src/brand-page-maker/components/ai-text-edit/i18n/generate-ai.pt-BR.json +0 -20
- package/src/brand-page-maker/components/ai-text-edit/i18n/generate-ai.pt-PT.json +0 -20
- package/src/brand-page-maker/components/ai-website-builder/AiWebsiteBuilder.vue +1 -2
- package/src/brand-page-maker/components/ai-website-builder/i18n/ai-website-builder.de-DE.json +3 -0
- package/src/brand-page-maker/components/ai-website-builder/i18n/ai-website-builder.es-ES.json +3 -0
- package/src/brand-page-maker/components/ai-website-builder/i18n/ai-website-builder.fr-CA.json +3 -0
- package/src/brand-page-maker/components/ai-website-builder/i18n/ai-website-builder.fr-FR.json +3 -0
- package/src/brand-page-maker/components/ai-website-builder/i18n/ai-website-builder.json +3 -0
- package/src/brand-page-maker/components/ai-website-builder/i18n/ai-website-builder.pt-BR.json +3 -0
- package/src/brand-page-maker/components/ai-website-builder/i18n/ai-website-builder.pt-PT.json +3 -0
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.vue +3 -28
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +0 -2
- package/src/brand-page-maker/composables/ai-chat/aiErrorCopy.test.ts +229 -0
- package/src/brand-page-maker/composables/ai-chat/aiErrorCopy.ts +164 -0
- package/src/brand-page-maker/composables/ai-chat/types.ts +49 -0
- package/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.ts +20 -0
- package/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.ts +651 -94
- package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +9 -9
- package/src/brand-page-maker/composables/useEventTracker.ts +31 -25
- package/src/brand-page-maker/constants/sidebar-constant.ts +7 -15
- package/src/brand-page-maker/convertors/image-aspect-ratio.convertor.ts +2 -2
- package/src/brand-page-maker/convertors/text-size-value.convertor.ts +3 -3
- package/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.ts +54 -0
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +76 -0
- package/src/brand-page-maker/stores/index.ts +1 -1
- package/src/brand-page-maker/stores/user/user-store.ts +0 -1
- package/src/bundles/bundled-translations.de-DE.json +1 -20
- package/src/bundles/bundled-translations.es-ES.json +1 -20
- package/src/bundles/bundled-translations.fr-CA.json +1 -20
- package/src/bundles/bundled-translations.fr-FR.json +1 -20
- package/src/bundles/bundled-translations.json +1 -20
- package/src/bundles/bundled-translations.pt-BR.json +1 -20
- package/src/bundles/bundled-translations.pt-PT.json +1 -20
- package/src/clients/ai-assistant-client.ts +59 -46
- package/src/clients/design-template-client.ts +0 -66
- package/src/clients/websocket-gateway-client.ts +17 -1
- package/src/composables/useTranslate.ts +3 -0
- package/src/constants/ui.ts +0 -1
- package/src/lib.ts +1 -0
- package/src/metadata-builder/ai-metadata-executor.ts +94 -1
- package/src/metadata-builder/builders/add-page-builder.ts +9 -13
- package/src/metadata-builder/builders/footer-builder.test.ts +76 -0
- package/src/metadata-builder/builders/footer-builder.ts +226 -0
- package/src/metadata-builder/builders/global-styles-builder.ts +187 -0
- package/src/metadata-builder/builders/header-builder.test.ts +106 -0
- package/src/metadata-builder/builders/header-builder.ts +254 -0
- package/src/metadata-builder/builders/rename-page-builder.ts +79 -0
- package/src/metadata-builder/builders/section-builders/about-section-builder.ts +73 -5
- package/src/metadata-builder/builders/section-builders/banner-section-builder.ts +112 -7
- package/src/metadata-builder/builders/section-builders/base-section-builder.ts +149 -11
- package/src/metadata-builder/builders/section-builders/booking-section-builder.ts +87 -0
- package/src/metadata-builder/builders/section-builders/button-section-builder.ts +6 -1
- package/src/metadata-builder/builders/section-builders/contact-form-builder.ts +74 -4
- package/src/metadata-builder/builders/section-builders/delete-section-builder.ts +15 -1
- package/src/metadata-builder/builders/section-builders/divider-section-builder.ts +13 -1
- package/src/metadata-builder/builders/section-builders/image-gallery-builder.ts +91 -31
- package/src/metadata-builder/builders/section-builders/images-section-builder.ts +102 -48
- package/src/metadata-builder/builders/section-builders/index.ts +1 -0
- package/src/metadata-builder/builders/section-builders/mailing-list-builder.ts +38 -2
- package/src/metadata-builder/builders/section-builders/mailing-list-section-builder.ts +38 -2
- package/src/metadata-builder/builders/section-builders/profile-section-builder.ts +55 -3
- package/src/metadata-builder/builders/section-builders/shapes-section-builder.ts +170 -77
- package/src/metadata-builder/builders/section-builders/social-links-builder.test.ts +119 -0
- package/src/metadata-builder/builders/section-builders/social-links-builder.ts +13 -2
- package/src/metadata-builder/builders/section-builders/testimonial-section-builder.ts +178 -57
- package/src/metadata-builder/builders/section-builders/text-section-builder.ts +130 -30
- package/src/metadata-builder/builders/section-content-factory.ts +15 -2
- package/src/metadata-builder/builders/section-field-maps.ts +34 -1
- package/src/metadata-builder/builders/section-field-utils.ts +131 -72
- package/src/metadata-builder/builders/section-rules/about-section.rules.ts +38 -0
- package/src/metadata-builder/builders/section-rules/add-page.rules.ts +17 -0
- package/src/metadata-builder/builders/section-rules/banner-section.rules.ts +49 -0
- package/src/metadata-builder/builders/section-rules/booking-section.rules.ts +34 -0
- package/src/metadata-builder/builders/section-rules/button-section.rules.ts +22 -0
- package/src/metadata-builder/builders/section-rules/contact-form.rules.ts +30 -0
- package/src/metadata-builder/builders/section-rules/divider-section.rules.ts +17 -0
- package/src/metadata-builder/builders/section-rules/footer.rules.ts +21 -0
- package/src/metadata-builder/builders/section-rules/global-styles.rules.ts +44 -0
- package/src/metadata-builder/builders/section-rules/header.rules.ts +75 -0
- package/src/metadata-builder/builders/section-rules/image-gallery.rules.ts +22 -0
- package/src/metadata-builder/builders/section-rules/images-section.rules.ts +55 -0
- package/src/metadata-builder/builders/section-rules/mailing-list.rules.ts +21 -0
- package/src/metadata-builder/builders/section-rules/profile.rules.ts +27 -0
- package/src/metadata-builder/builders/section-rules/rename-page.rules.ts +17 -0
- package/src/metadata-builder/builders/section-rules/shapes-section.rules.ts +51 -0
- package/src/metadata-builder/builders/section-rules/social-links.rules.ts +27 -0
- package/src/metadata-builder/builders/section-rules/testimonial-section.rules.ts +48 -0
- package/src/metadata-builder/builders/section-rules/text-section.rules.ts +28 -0
- package/src/metadata-builder/builders/shape-color-utils.test.ts +115 -0
- package/src/metadata-builder/builders/shape-color-utils.ts +75 -0
- package/src/metadata-builder/builders/undo-builder.ts +105 -0
- package/src/metadata-builder/builders/update-content-text-style-builder.ts +4 -1
- package/src/metadata-builder/helpers/rte.helpers.ts +27 -13
- package/src/metadata-builder/metadata-executor.ts +42 -2
- package/src/metadata-builder/models.ts +39 -1
- package/src/metadata-builder/parsers/ai-toolcall-parser.ts +152 -0
- package/src/metadata-builder/parsers/section-tool-arguments.ts +138 -24
- package/src/metadata-builder/sanitizers/__tests__/section-args-validator.test.ts +659 -0
- package/src/metadata-builder/sanitizers/rte-schema-check.ts +99 -0
- package/src/metadata-builder/sanitizers/sanitizer-rules.ts +97 -0
- package/src/metadata-builder/sanitizers/section-args-validator.ts +445 -0
- package/src/shared/content-settings/components/content-settings/ContentSettings.mixin.ts +10 -16
- package/src/shared/content-settings/components/content-settings/ContentSettings.stories.ts +0 -1
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +6 -10
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.vue +1 -23
- package/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.vue +0 -15
- package/src/shared/content-settings/components/text-items-field/TextItemsField.vue +0 -15
- package/src/shared/navigation-style-settings/store/index.ts +5 -0
- package/src/shared/page-navigation/store/page-navigation-store.ts +4 -31
- package/src/shared/page-navigation/utils/nav-order-utils.ts +32 -0
- package/src/shared/side-bar/components/SideBar.vue +14 -1
- package/src/shared/side-bar/store/side-bar-store.ts +0 -20
- package/src/utils/build-asset-manifest.ts +153 -0
- package/src/utils/minify-brand-page-metadata.ts +362 -130
- package/lib/src/brand-page-maker/composables/ai-chat/useAiChat.js +0 -368
- package/lib/src/brand-page-maker/composables/ai-chat/useAiTextEditPrompts.d.ts +0 -18
- package/lib/src/brand-page-maker/composables/ai-chat/useAiTextEditPrompts.js +0 -144
- package/lib/src/brand-page-maker/stores/ai-thread/ai-thread-store.d.ts +0 -155
- package/lib/src/brand-page-maker/stores/ai-thread/ai-thread-store.js +0 -25
- package/lib/src/brand-page-maker/utils/mixpanel.util.d.ts +0 -1
- package/lib/src/brand-page-maker/utils/mixpanel.util.js +0 -29
- package/lib/src/bundled-translations-CNK7l6_v.js +0 -173
- package/lib/src/bundled-translations.de-DE-BLE4_y0H.js +0 -173
- package/lib/src/bundled-translations.es-ES-thO9osbg.js +0 -173
- package/lib/src/bundled-translations.fr-CA-BZkhiNgU.js +0 -173
- package/lib/src/bundled-translations.fr-FR-bhDLPKgZ.js +0 -173
- package/lib/src/bundled-translations.pt-BR-CI9a5Bq1.js +0 -173
- package/lib/src/bundled-translations.pt-PT-DBoErBaq.js +0 -173
- package/src/brand-page-maker/components/ai-text-edit/AiTextEdit.vue +0 -154
- package/src/brand-page-maker/composables/ai-chat/useAiChat.ts +0 -562
- package/src/brand-page-maker/composables/ai-chat/useAiTextEditPrompts.ts +0 -196
- package/src/brand-page-maker/stores/ai-thread/ai-thread-store.ts +0 -31
- package/src/brand-page-maker/utils/mixpanel.util.ts +0 -42
- package/src/shared/content-settings/components/generate-ai-button/GenerateAiButton.vue +0 -114
- package/src/shared/content-settings/components/generate-ai-modal/GenerateAiModal.vue +0 -761
|
@@ -27,6 +27,7 @@ export const BUILDER_TYPES = {
|
|
|
27
27
|
CREATE_PINTEREST: 'create-pinterest',
|
|
28
28
|
CREATE_TWITCH: 'create-twitch',
|
|
29
29
|
CREATE_TIKTOK: 'create-tiktok',
|
|
30
|
+
CREATE_BOOKING_SECTION: 'create-booking-section',
|
|
30
31
|
// Per-section builder types (update)
|
|
31
32
|
UPDATE_BANNER_SECTION: 'update-banner-section',
|
|
32
33
|
UPDATE_ABOUT_SECTION: 'update-about-section',
|
|
@@ -52,19 +53,31 @@ export const BUILDER_TYPES = {
|
|
|
52
53
|
UPDATE_PINTEREST: 'update-pinterest',
|
|
53
54
|
UPDATE_TWITCH: 'update-twitch',
|
|
54
55
|
UPDATE_TIKTOK: 'update-tiktok',
|
|
56
|
+
UPDATE_BOOKING_SECTION: 'update-booking-section',
|
|
55
57
|
// Section-level operations
|
|
56
58
|
DELETE_SECTION: 'delete-section',
|
|
57
59
|
MOVE_SECTION: 'move-section',
|
|
58
60
|
// Page-level operations
|
|
59
61
|
ADD_PAGE: 'add-page',
|
|
60
62
|
REMOVE_PAGE: 'remove-page',
|
|
63
|
+
RENAME_PAGE: 'rename-page',
|
|
64
|
+
// Footer operations
|
|
65
|
+
UPDATE_FOOTER: 'update-footer',
|
|
66
|
+
// Global styles operations
|
|
67
|
+
UPDATE_GLOBAL_STYLES: 'update-global-styles',
|
|
68
|
+
// Header operations
|
|
69
|
+
UPDATE_HEADER: 'update-header',
|
|
70
|
+
// Website-level operations
|
|
71
|
+
UNDO_WEBSITE: 'undo-website',
|
|
61
72
|
};
|
|
62
73
|
export class BaseMetadataBuilder {
|
|
63
74
|
request;
|
|
64
75
|
logger;
|
|
65
|
-
|
|
76
|
+
eventTracker;
|
|
77
|
+
constructor(request, logger, eventTracker) {
|
|
66
78
|
this.request = request;
|
|
67
79
|
this.logger = logger;
|
|
80
|
+
this.eventTracker = eventTracker;
|
|
68
81
|
}
|
|
69
82
|
log(argument) {
|
|
70
83
|
if (this.logger) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AiAssistantToolCall } from '../../clients/ai-assistant-client';
|
|
2
|
+
import type { FooterDisplayStyle, HeaderDisplayStyle, NavigationDisplayType } from '../../brand-page/constants';
|
|
2
3
|
import type { SectionType } from './section-tool-arguments';
|
|
3
4
|
export declare const AI_ASSISTANT_TOOL_NAMES: {
|
|
4
5
|
readonly UPDATE_TEXT: "updateText";
|
|
@@ -28,10 +29,16 @@ export declare const AI_ASSISTANT_TOOL_NAMES: {
|
|
|
28
29
|
readonly BUILD_SHAPES_SECTION: "build_shapes-section_section";
|
|
29
30
|
readonly BUILD_TESTIMONIAL_SECTION: "build_testimonial-section_section";
|
|
30
31
|
readonly BUILD_DIVIDER_SECTION: "build_divider-section_section";
|
|
32
|
+
readonly BUILD_BOOKING_SECTION: "build_booking-section_section";
|
|
31
33
|
readonly DELETE_SECTION: "delete_section";
|
|
32
34
|
readonly MOVE_SECTION: "move_section";
|
|
33
35
|
readonly ADD_PAGE: "add_page";
|
|
34
36
|
readonly REMOVE_PAGE: "remove_page";
|
|
37
|
+
readonly RENAME_PAGE: "rename_page";
|
|
38
|
+
readonly UPDATE_FOOTER: "update_footer";
|
|
39
|
+
readonly UPDATE_GLOBAL_STYLES: "tool_update_global_styles";
|
|
40
|
+
readonly UPDATE_HEADER: "update_header";
|
|
41
|
+
readonly UNDO: "undo";
|
|
35
42
|
};
|
|
36
43
|
export type AiAssistantToolName = (typeof AI_ASSISTANT_TOOL_NAMES)[keyof typeof AI_ASSISTANT_TOOL_NAMES];
|
|
37
44
|
export interface ParsedToolCall {
|
|
@@ -75,4 +82,141 @@ export interface AddPageArguments {
|
|
|
75
82
|
export interface RemovePageArguments {
|
|
76
83
|
page_id: string;
|
|
77
84
|
}
|
|
85
|
+
export interface RenamePageArguments {
|
|
86
|
+
page_id: string;
|
|
87
|
+
page_name: string;
|
|
88
|
+
}
|
|
89
|
+
export interface ReorderPagesArguments {
|
|
90
|
+
page_order: string[];
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Arguments for the `undo` tool call.
|
|
94
|
+
*
|
|
95
|
+
* Empty by design: the snapshot to restore is determined externally (it's the
|
|
96
|
+
* snapshot taken before the most recent change-producing prompt). The library
|
|
97
|
+
* does not own snapshot persistence.
|
|
98
|
+
*/
|
|
99
|
+
export interface UndoArguments {
|
|
100
|
+
}
|
|
101
|
+
export interface FooterSocialLinkItem {
|
|
102
|
+
item_index?: number;
|
|
103
|
+
insert_at?: number;
|
|
104
|
+
social_link_icon?: string;
|
|
105
|
+
url?: string;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Per-viewport field overrides for a single update_footer call with viewport='both'.
|
|
109
|
+
* Fields set here take precedence over the top-level value for that specific viewport.
|
|
110
|
+
*/
|
|
111
|
+
export interface ViewportFooterOverrides {
|
|
112
|
+
display_style?: FooterDisplayStyle;
|
|
113
|
+
background_color?: string | null;
|
|
114
|
+
copyright_text_color?: string;
|
|
115
|
+
icon_color?: string;
|
|
116
|
+
is_logo_visible?: boolean;
|
|
117
|
+
logo_image_height?: string;
|
|
118
|
+
logo_image_width?: string;
|
|
119
|
+
}
|
|
120
|
+
export interface UpdateFooterArguments {
|
|
121
|
+
copyright_text?: string;
|
|
122
|
+
copyright_text_font_family?: string;
|
|
123
|
+
social_links?: FooterSocialLinkItem[];
|
|
124
|
+
_replace_social_links?: boolean;
|
|
125
|
+
_remove_social_link_indices?: number[];
|
|
126
|
+
_reorder_social_links?: number[];
|
|
127
|
+
/** Desktop-only styling (display_style, background_color, icon_color, is_logo_visible, logo sizes). */
|
|
128
|
+
desktop?: ViewportFooterOverrides;
|
|
129
|
+
/** Mobile-only styling (display_style, background_color, icon_color, is_logo_visible, logo sizes). */
|
|
130
|
+
mobile?: ViewportFooterOverrides;
|
|
131
|
+
}
|
|
132
|
+
export interface TextStyleOptionStyle {
|
|
133
|
+
fontFamily?: string;
|
|
134
|
+
fontSize?: string;
|
|
135
|
+
letterSpacing?: string;
|
|
136
|
+
lineHeight?: string;
|
|
137
|
+
fontWeight?: string;
|
|
138
|
+
fontStyle?: string;
|
|
139
|
+
textDecoration?: string;
|
|
140
|
+
color?: string;
|
|
141
|
+
}
|
|
142
|
+
export interface UpdateGlobalStylesArguments {
|
|
143
|
+
backgroundStyles?: {
|
|
144
|
+
style?: {
|
|
145
|
+
background?: string;
|
|
146
|
+
};
|
|
147
|
+
/** Site background color in hex → sets style.background */
|
|
148
|
+
backgroundColor?: string;
|
|
149
|
+
/** Background shape/accent color in hex → sets backgroundShapeStyle.background */
|
|
150
|
+
shapeColor?: string;
|
|
151
|
+
/** Background image URL ('' clears the image) → sets backgroundImageUrl */
|
|
152
|
+
backgroundImageUrl?: string;
|
|
153
|
+
/** Background shape SVG URL ('' clears shapes) → updates backgroundShapes[0].name. No-op if backgroundShapes is empty. */
|
|
154
|
+
backgroundShapeUrl?: string;
|
|
155
|
+
};
|
|
156
|
+
textStyles?: {
|
|
157
|
+
style?: {
|
|
158
|
+
color?: string;
|
|
159
|
+
};
|
|
160
|
+
textFontFamily?: string;
|
|
161
|
+
textStyleOptions?: {
|
|
162
|
+
titles?: {
|
|
163
|
+
style?: TextStyleOptionStyle;
|
|
164
|
+
isModified?: boolean;
|
|
165
|
+
};
|
|
166
|
+
headings?: {
|
|
167
|
+
style?: TextStyleOptionStyle;
|
|
168
|
+
isModified?: boolean;
|
|
169
|
+
};
|
|
170
|
+
paragraphs?: {
|
|
171
|
+
style?: TextStyleOptionStyle;
|
|
172
|
+
isModified?: boolean;
|
|
173
|
+
};
|
|
174
|
+
buttons?: {
|
|
175
|
+
style?: TextStyleOptionStyle;
|
|
176
|
+
isModified?: boolean;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
buttonStyles?: {
|
|
181
|
+
style?: {
|
|
182
|
+
color?: string;
|
|
183
|
+
borderColor?: string;
|
|
184
|
+
backgroundColor?: string;
|
|
185
|
+
};
|
|
186
|
+
iconStyle?: {
|
|
187
|
+
fill?: string;
|
|
188
|
+
};
|
|
189
|
+
selectedButtonStyleId?: string;
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
export interface UpdateHeaderNavRoute {
|
|
193
|
+
route_index?: number;
|
|
194
|
+
display_name?: string;
|
|
195
|
+
}
|
|
196
|
+
export interface ViewportHeaderOverrides {
|
|
197
|
+
display_style?: HeaderDisplayStyle;
|
|
198
|
+
background_color?: string | null;
|
|
199
|
+
is_logo_visible?: boolean;
|
|
200
|
+
logo_image_height?: string;
|
|
201
|
+
logo_image_width?: string;
|
|
202
|
+
nav_display_type?: NavigationDisplayType;
|
|
203
|
+
link_text_color?: string;
|
|
204
|
+
link_text_font?: string;
|
|
205
|
+
link_bg_color?: string | null;
|
|
206
|
+
link_default_border_color?: string | null;
|
|
207
|
+
link_selected_color?: string;
|
|
208
|
+
link_selected_bg_color?: string | null;
|
|
209
|
+
link_selected_border_color?: string;
|
|
210
|
+
hamburger_icon_color?: string;
|
|
211
|
+
hamburger_icon_bg_color?: string | null;
|
|
212
|
+
overlay_default_text_color?: string | null;
|
|
213
|
+
overlay_default_bg_color?: string | null;
|
|
214
|
+
overlay_selected_text_color?: string | null;
|
|
215
|
+
overlay_selected_bg_color?: string | null;
|
|
216
|
+
}
|
|
217
|
+
export interface UpdateHeaderArguments {
|
|
218
|
+
nav_routes?: UpdateHeaderNavRoute[];
|
|
219
|
+
desktop?: ViewportHeaderOverrides;
|
|
220
|
+
mobile?: ViewportHeaderOverrides;
|
|
221
|
+
}
|
|
78
222
|
export declare const parseToolCalls: (toolCalls: AiAssistantToolCall[]) => ParsedToolCall[];
|
|
@@ -33,12 +33,26 @@ export const AI_ASSISTANT_TOOL_NAMES = {
|
|
|
33
33
|
BUILD_SHAPES_SECTION: 'build_shapes-section_section',
|
|
34
34
|
BUILD_TESTIMONIAL_SECTION: 'build_testimonial-section_section',
|
|
35
35
|
BUILD_DIVIDER_SECTION: 'build_divider-section_section',
|
|
36
|
+
BUILD_BOOKING_SECTION: 'build_booking-section_section',
|
|
36
37
|
// Section-level operation tools
|
|
37
38
|
DELETE_SECTION: 'delete_section',
|
|
38
39
|
MOVE_SECTION: 'move_section',
|
|
39
40
|
// Page-level operation tools
|
|
40
41
|
ADD_PAGE: 'add_page',
|
|
41
42
|
REMOVE_PAGE: 'remove_page',
|
|
43
|
+
RENAME_PAGE: 'rename_page',
|
|
44
|
+
// Footer operation tools
|
|
45
|
+
UPDATE_FOOTER: 'update_footer',
|
|
46
|
+
// Global styles operation tools
|
|
47
|
+
UPDATE_GLOBAL_STYLES: 'tool_update_global_styles',
|
|
48
|
+
// Header operation tools
|
|
49
|
+
UPDATE_HEADER: 'update_header',
|
|
50
|
+
// Website-level operations
|
|
51
|
+
// `undo` restores the website to the snapshot taken before the most recent
|
|
52
|
+
// change-producing prompt. The actual snapshot restore is performed outside
|
|
53
|
+
// this library — the library only recognizes the tool call and signals the
|
|
54
|
+
// request via BuilderResult.undoRequested.
|
|
55
|
+
UNDO: 'undo',
|
|
42
56
|
};
|
|
43
57
|
// Maps each section tool name to its SectionType.
|
|
44
58
|
// Mode is now determined from the tool arguments, not the tool name.
|
|
@@ -94,6 +108,9 @@ export const SECTION_TOOL_MAP = {
|
|
|
94
108
|
[AI_ASSISTANT_TOOL_NAMES.BUILD_DIVIDER_SECTION]: {
|
|
95
109
|
sectionType: 'divider-section',
|
|
96
110
|
},
|
|
111
|
+
[AI_ASSISTANT_TOOL_NAMES.BUILD_BOOKING_SECTION]: {
|
|
112
|
+
sectionType: 'booking-section',
|
|
113
|
+
},
|
|
97
114
|
};
|
|
98
115
|
export const parseToolCalls = (toolCalls) => {
|
|
99
116
|
if (!toolCalls || toolCalls.length === 0) {
|
|
@@ -6,8 +6,39 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { ContentType } from '../../brand-page/models';
|
|
8
8
|
/** Content types not supported by the AI builder. */
|
|
9
|
-
type UnsupportedContentType = 'logo' | 'video' | 'map' | 'request-payment' | 'support-me' | 'shop-section'
|
|
9
|
+
type UnsupportedContentType = 'logo' | 'video' | 'map' | 'request-payment' | 'support-me' | 'shop-section';
|
|
10
10
|
export type SectionType = Exclude<ContentType, UnsupportedContentType>;
|
|
11
|
+
export interface TiptapMark {
|
|
12
|
+
type: 'bold' | 'italic' | 'underline' | 'strike' | 'link' | 'textStyle' | 'highlight';
|
|
13
|
+
attrs?: {
|
|
14
|
+
href?: string;
|
|
15
|
+
color?: string;
|
|
16
|
+
fontSize?: string;
|
|
17
|
+
fontFamily?: string;
|
|
18
|
+
letterSpacing?: string;
|
|
19
|
+
lineHeight?: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface TiptapTextNode {
|
|
23
|
+
type: 'text';
|
|
24
|
+
text: string;
|
|
25
|
+
marks?: TiptapMark[];
|
|
26
|
+
}
|
|
27
|
+
export interface TiptapBlockNode {
|
|
28
|
+
type: 'paragraph' | 'heading' | 'blockquote';
|
|
29
|
+
attrs?: {
|
|
30
|
+
level?: number;
|
|
31
|
+
};
|
|
32
|
+
content?: TiptapTextNode[];
|
|
33
|
+
}
|
|
34
|
+
export interface TiptapDocument {
|
|
35
|
+
type: 'doc';
|
|
36
|
+
content: TiptapBlockNode[];
|
|
37
|
+
}
|
|
38
|
+
/** A rich text field can be plain text (string) or Tiptap JSON. */
|
|
39
|
+
export type RichTextField = string | TiptapDocument;
|
|
40
|
+
/** Type guard: checks if a value is a TiptapDocument object. */
|
|
41
|
+
export declare const isTiptapDocument: (value: unknown) => value is TiptapDocument;
|
|
11
42
|
export interface TextStyleArguments {
|
|
12
43
|
fontSize?: string | null;
|
|
13
44
|
color?: string | null;
|
|
@@ -17,7 +48,32 @@ export interface TextStyleArguments {
|
|
|
17
48
|
textDecoration?: string | null;
|
|
18
49
|
backgroundColor?: string | null;
|
|
19
50
|
letterSpacing?: number | null;
|
|
20
|
-
lineHeight?:
|
|
51
|
+
lineHeight?: string | null;
|
|
52
|
+
fontFamily?: string | null;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Style schema for button label text. Narrower than `TextStyleArguments`:
|
|
56
|
+
* `backgroundColor` is excluded because a button label has no meaningful
|
|
57
|
+
* background (the button fill behind the label is set at the site level).
|
|
58
|
+
*
|
|
59
|
+
* `color` IS included — the brand-page renderer reads
|
|
60
|
+
* `section.button_text_style.color` for label paint. The VALUE is the
|
|
61
|
+
* site-level DECISION (`site.button-text` in the AI's color_spec), but
|
|
62
|
+
* the APPLICATION is per-section: every section's tool call writes the
|
|
63
|
+
* same site-decided hex into this field.
|
|
64
|
+
*
|
|
65
|
+
* See `ai-pipelines/src/agents/website/tools/section_types_tool.py`
|
|
66
|
+
* (`_button_text_style_field`) for the AI-side mirror.
|
|
67
|
+
*/
|
|
68
|
+
export interface ButtonTextStyleArguments {
|
|
69
|
+
color?: string | null;
|
|
70
|
+
fontSize?: string | null;
|
|
71
|
+
fontWeight?: string | null;
|
|
72
|
+
fontStyle?: string | null;
|
|
73
|
+
textAlign?: string | null;
|
|
74
|
+
textDecoration?: string | null;
|
|
75
|
+
letterSpacing?: number | null;
|
|
76
|
+
lineHeight?: string | null;
|
|
21
77
|
fontFamily?: string | null;
|
|
22
78
|
}
|
|
23
79
|
export interface BackgroundStyleArguments {
|
|
@@ -29,9 +85,9 @@ export interface CardStyleArguments {
|
|
|
29
85
|
borderColor?: string | null;
|
|
30
86
|
}
|
|
31
87
|
export interface ProfileSectionArguments {
|
|
32
|
-
name?:
|
|
33
|
-
title?:
|
|
34
|
-
description?:
|
|
88
|
+
name?: RichTextField;
|
|
89
|
+
title?: RichTextField;
|
|
90
|
+
description?: RichTextField;
|
|
35
91
|
avatar_image_url?: string;
|
|
36
92
|
background_color?: string | null;
|
|
37
93
|
}
|
|
@@ -40,12 +96,12 @@ export interface TextSectionItem {
|
|
|
40
96
|
item_index?: number;
|
|
41
97
|
/** 0-based position to insert a new item at */
|
|
42
98
|
insert_at?: number;
|
|
43
|
-
text?:
|
|
99
|
+
text?: RichTextField;
|
|
44
100
|
text_style?: TextStyleArguments;
|
|
45
101
|
}
|
|
46
102
|
export interface TextSectionArguments {
|
|
47
103
|
/** Single text field (BrandPage/BrandContact or shorthand for first item) */
|
|
48
|
-
text?:
|
|
104
|
+
text?: RichTextField;
|
|
49
105
|
text_style?: TextStyleArguments;
|
|
50
106
|
/** Number of columns ('1'–'4') for multi-block text layouts */
|
|
51
107
|
column_style?: '1' | '2' | '3' | '4';
|
|
@@ -73,6 +129,7 @@ export interface ImageGalleryItem {
|
|
|
73
129
|
export interface ImageGallerySectionArguments {
|
|
74
130
|
images?: ImageGalleryItem[];
|
|
75
131
|
gallery_type?: 'grid' | 'carousel' | 'masonry';
|
|
132
|
+
is_full_width?: boolean;
|
|
76
133
|
_replace_items?: boolean;
|
|
77
134
|
/** 0-based indices of items to remove */
|
|
78
135
|
_remove_item_indices?: number[];
|
|
@@ -142,6 +199,10 @@ export interface SocialLink {
|
|
|
142
199
|
export interface SocialLinksSectionArguments {
|
|
143
200
|
links?: SocialLink[];
|
|
144
201
|
icon_style?: 'none' | 'square' | 'circle';
|
|
202
|
+
/** Style for the social-icon SVG fill (filled from the palette by the slot router). */
|
|
203
|
+
icon_fill_style?: TextStyleArguments;
|
|
204
|
+
/** Style for the icon container background (used when icon_style is 'square' or 'circle'). */
|
|
205
|
+
icon_background_style?: TextStyleArguments;
|
|
145
206
|
_replace_items?: boolean;
|
|
146
207
|
/** 0-based indices of items to remove */
|
|
147
208
|
_remove_item_indices?: number[];
|
|
@@ -149,8 +210,11 @@ export interface SocialLinksSectionArguments {
|
|
|
149
210
|
_reorder_items?: number[];
|
|
150
211
|
}
|
|
151
212
|
export interface MailingListSectionArguments {
|
|
152
|
-
title?:
|
|
213
|
+
title?: RichTextField;
|
|
153
214
|
button_text?: string;
|
|
215
|
+
accepted_fields?: 'emailOnly' | 'nameAndEmail';
|
|
216
|
+
title_style?: TextStyleArguments;
|
|
217
|
+
button_text_style?: ButtonTextStyleArguments;
|
|
154
218
|
}
|
|
155
219
|
export interface ContactFormFieldToggle {
|
|
156
220
|
/** Field ID matching FORM_FIELD_IDS (e.g., 'firstName', 'lastName', 'phoneNumber', 'message') */
|
|
@@ -159,37 +223,45 @@ export interface ContactFormFieldToggle {
|
|
|
159
223
|
enabled: boolean;
|
|
160
224
|
}
|
|
161
225
|
export interface ContactFormSectionArguments {
|
|
162
|
-
title?:
|
|
163
|
-
description?:
|
|
226
|
+
title?: RichTextField;
|
|
227
|
+
description?: RichTextField;
|
|
164
228
|
button_text?: string;
|
|
165
|
-
success_message?:
|
|
229
|
+
success_message?: RichTextField;
|
|
166
230
|
response_email?: string;
|
|
167
231
|
header_image_url?: string;
|
|
168
232
|
display_style?: 'preview' | 'collapsed';
|
|
169
233
|
layout_style?: 'center-card-aligned' | 'centered' | 'text-only' | 'center-card-aligned-image' | 'left-aligned-full-image' | 'right-aligned-full-image';
|
|
170
234
|
title_style?: TextStyleArguments;
|
|
171
235
|
description_style?: TextStyleArguments;
|
|
172
|
-
|
|
236
|
+
success_message_style?: TextStyleArguments;
|
|
237
|
+
button_text_style?: ButtonTextStyleArguments;
|
|
173
238
|
/** Toggle visibility of form fields */
|
|
174
239
|
fields?: ContactFormFieldToggle[];
|
|
175
240
|
background_color?: string | null;
|
|
241
|
+
card_style?: CardStyleArguments;
|
|
176
242
|
}
|
|
177
243
|
export interface BannerSectionArguments {
|
|
178
|
-
title?:
|
|
179
|
-
description?:
|
|
244
|
+
title?: RichTextField;
|
|
245
|
+
description?: RichTextField;
|
|
180
246
|
button_text?: string;
|
|
247
|
+
button_link_type?: 'url' | 'page' | 'mailTo' | 'tel';
|
|
181
248
|
button_url?: string;
|
|
182
249
|
background_image_url?: string;
|
|
250
|
+
background_shape_url?: string;
|
|
251
|
+
color_theme?: string;
|
|
183
252
|
display_style?: 'left-aligned' | 'right-aligned' | 'centered' | 'big-image' | 'left-aligned-big-image' | 'right-aligned-full-image' | 'left-aligned-full-image' | 'center-card-aligned-image' | 'left-card-aligned-image';
|
|
184
253
|
title_style?: TextStyleArguments;
|
|
185
254
|
description_style?: TextStyleArguments;
|
|
186
|
-
button_text_style?:
|
|
255
|
+
button_text_style?: ButtonTextStyleArguments;
|
|
187
256
|
background_color?: string | null;
|
|
257
|
+
card_style?: CardStyleArguments;
|
|
188
258
|
}
|
|
189
259
|
export interface AboutSectionArguments {
|
|
190
|
-
title?:
|
|
191
|
-
paragraph?:
|
|
260
|
+
title?: RichTextField;
|
|
261
|
+
paragraph?: RichTextField;
|
|
192
262
|
about_image_url?: string;
|
|
263
|
+
about_shape_url?: string;
|
|
264
|
+
color_theme?: string;
|
|
193
265
|
display_style?: 'left-aligned' | 'right-aligned' | 'centered' | 'text-only' | 'left-aligned-full-image' | 'right-aligned-full-image';
|
|
194
266
|
title_style?: TextStyleArguments;
|
|
195
267
|
paragraph_style?: TextStyleArguments;
|
|
@@ -206,8 +278,8 @@ export interface ImagesSectionItem {
|
|
|
206
278
|
button_text?: string;
|
|
207
279
|
}
|
|
208
280
|
export interface ImagesSectionArguments {
|
|
209
|
-
title?:
|
|
210
|
-
description?:
|
|
281
|
+
title?: RichTextField;
|
|
282
|
+
description?: RichTextField;
|
|
211
283
|
items?: ImagesSectionItem[];
|
|
212
284
|
display_style?: 'left-aligned' | 'right-aligned' | 'centered' | 'media-only' | 'center-card-aligned-image' | 'alternate-image';
|
|
213
285
|
_replace_items?: boolean;
|
|
@@ -219,6 +291,7 @@ export interface ImagesSectionArguments {
|
|
|
219
291
|
description_style?: TextStyleArguments;
|
|
220
292
|
heading_style?: TextStyleArguments;
|
|
221
293
|
paragraph_style?: TextStyleArguments;
|
|
294
|
+
button_text_style?: ButtonTextStyleArguments;
|
|
222
295
|
aspect_ratio?: string;
|
|
223
296
|
are_images_full_width?: boolean;
|
|
224
297
|
background_style?: BackgroundStyleArguments;
|
|
@@ -233,9 +306,11 @@ export interface TestimonialItem {
|
|
|
233
306
|
name?: string;
|
|
234
307
|
position?: string;
|
|
235
308
|
avatar_image_url?: string;
|
|
309
|
+
avatar_shape_url?: string;
|
|
310
|
+
color_theme?: string;
|
|
236
311
|
}
|
|
237
312
|
export interface TestimonialSectionArguments {
|
|
238
|
-
title?:
|
|
313
|
+
title?: RichTextField;
|
|
239
314
|
items?: TestimonialItem[];
|
|
240
315
|
display_style?: 'centered' | 'big-image' | 'columns';
|
|
241
316
|
_replace_items?: boolean;
|
|
@@ -257,13 +332,13 @@ export interface ShapesSectionItem {
|
|
|
257
332
|
insert_at?: number;
|
|
258
333
|
icon_image_url?: string;
|
|
259
334
|
shape_url?: string;
|
|
260
|
-
|
|
335
|
+
color_theme?: string;
|
|
261
336
|
heading?: string;
|
|
262
337
|
text?: string;
|
|
263
338
|
}
|
|
264
339
|
export interface ShapesSectionArguments {
|
|
265
|
-
title?:
|
|
266
|
-
description?:
|
|
340
|
+
title?: RichTextField;
|
|
341
|
+
description?: RichTextField;
|
|
267
342
|
items?: ShapesSectionItem[];
|
|
268
343
|
display_style?: 'left-aligned' | 'right-aligned' | 'centered' | 'media-only' | 'center-card-aligned-image' | 'alternate-image';
|
|
269
344
|
_replace_items?: boolean;
|
|
@@ -279,16 +354,30 @@ export interface ShapesSectionArguments {
|
|
|
279
354
|
background_style?: BackgroundStyleArguments;
|
|
280
355
|
card_style?: CardStyleArguments;
|
|
281
356
|
}
|
|
357
|
+
export interface BookingSectionArguments {
|
|
358
|
+
title?: RichTextField;
|
|
359
|
+
description?: RichTextField;
|
|
360
|
+
button_text?: string;
|
|
361
|
+
button_link_type?: 'url' | 'page' | 'mailTo' | 'tel';
|
|
362
|
+
button_url?: string;
|
|
363
|
+
title_style?: TextStyleArguments;
|
|
364
|
+
description_style?: TextStyleArguments;
|
|
365
|
+
button_text_style?: ButtonTextStyleArguments;
|
|
366
|
+
background_color?: string | null;
|
|
367
|
+
}
|
|
282
368
|
export interface DividerSectionArguments {
|
|
283
369
|
divider_style?: 'none' | 'thin' | 'thick';
|
|
370
|
+
divider_color?: string | null;
|
|
284
371
|
background_color?: string | null;
|
|
372
|
+
padding?: number;
|
|
285
373
|
}
|
|
286
|
-
export type SectionToolArguments = ProfileSectionArguments | TextSectionArguments | ImageSectionArguments | ImageGallerySectionArguments | GeneralLinkSectionArguments | WebsiteSectionArguments | EmailSectionArguments | PhoneSectionArguments | FacebookSectionArguments | XSectionArguments | InstagramSectionArguments | YoutubeSectionArguments | LinkedinSectionArguments | PinterestSectionArguments | TwitchSectionArguments | TiktokSectionArguments | SocialLinksSectionArguments | MailingListSectionArguments | ContactFormSectionArguments | BannerSectionArguments | AboutSectionArguments | ImagesSectionArguments | TestimonialSectionArguments | ShapesSectionArguments | DividerSectionArguments;
|
|
374
|
+
export type SectionToolArguments = ProfileSectionArguments | TextSectionArguments | ImageSectionArguments | ImageGallerySectionArguments | GeneralLinkSectionArguments | WebsiteSectionArguments | EmailSectionArguments | PhoneSectionArguments | FacebookSectionArguments | XSectionArguments | InstagramSectionArguments | YoutubeSectionArguments | LinkedinSectionArguments | PinterestSectionArguments | TwitchSectionArguments | TiktokSectionArguments | SocialLinksSectionArguments | MailingListSectionArguments | ContactFormSectionArguments | BannerSectionArguments | AboutSectionArguments | ImagesSectionArguments | TestimonialSectionArguments | ShapesSectionArguments | BookingSectionArguments | DividerSectionArguments;
|
|
287
375
|
export interface SectionToolCallShape {
|
|
288
376
|
mode: 'create' | 'update';
|
|
289
377
|
type: string;
|
|
290
378
|
content_id?: string;
|
|
291
379
|
page_id?: string;
|
|
380
|
+
move_before_content_id?: string;
|
|
292
381
|
arguments: SectionToolArguments;
|
|
293
382
|
}
|
|
294
383
|
export {};
|
|
@@ -4,4 +4,8 @@
|
|
|
4
4
|
* Canonical reference: service.ai-pipelines/src/agents/website/section_schemas.py
|
|
5
5
|
* Every field defined there has a corresponding TS field here.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
/** Type guard: checks if a value is a TiptapDocument object. */
|
|
8
|
+
export const isTiptapDocument = (value) => typeof value === 'object' &&
|
|
9
|
+
value !== null &&
|
|
10
|
+
value.type === 'doc' &&
|
|
11
|
+
Array.isArray(value.content);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type SectionCheck } from './section-args-validator';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a Tiptap doc against the headless editor's real ProseMirror
|
|
4
|
+
* schema (`schema.nodeFromJSON`). Catches malformed AI input — stray
|
|
5
|
+
* non-node children in `content`, unknown node types, malformed attrs —
|
|
6
|
+
* before the builder runs and the renderer's silent `setContent` drops
|
|
7
|
+
* the doc to `<p></p>` (BP-5669).
|
|
8
|
+
*
|
|
9
|
+
* Returns the field-prefixed error string so the AI's tool-call retry
|
|
10
|
+
* loop reads it via `BuilderResult.errors` → `tool_result.errorMessage`
|
|
11
|
+
* and re-emits a corrected payload.
|
|
12
|
+
*/
|
|
13
|
+
export declare const rteSchemaCheck: (field: string) => SectionCheck;
|
|
14
|
+
/**
|
|
15
|
+
* Returns [rteSchemaCheck(field), textCheck(field, max), rteStyleCheck(field)].
|
|
16
|
+
* Use with spread in a CHECKS array to validate the Tiptap doc structure
|
|
17
|
+
* (against the editor's real ProseMirror schema), plain text length, and
|
|
18
|
+
* inline RTE mark styles for the same field. Schema check runs first so
|
|
19
|
+
* a malformed doc surfaces an actionable error to the AI retry loop
|
|
20
|
+
* before the renderer can silently swallow it.
|
|
21
|
+
*/
|
|
22
|
+
export declare const textAndRteChecks: (field: string, max: number) => SectionCheck[];
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/vue-3';
|
|
2
|
+
import StarterKit from '@tiptap/starter-kit';
|
|
3
|
+
import Underline from '@tiptap/extension-underline';
|
|
4
|
+
import TextStyle from '@tiptap/extension-text-style';
|
|
5
|
+
import TextAlign from '@tiptap/extension-text-align';
|
|
6
|
+
import FontFamily from '@tiptap/extension-font-family';
|
|
7
|
+
import ColorExtension from '@tiptap/extension-color';
|
|
8
|
+
import Highlight from '@tiptap/extension-highlight';
|
|
9
|
+
import Link from '@tiptap/extension-link';
|
|
10
|
+
import { FontSize } from '../../brand-page-maker/composables/rich-text-editor/extensions/FontSize';
|
|
11
|
+
import { LetterSpacing } from '../../brand-page-maker/composables/rich-text-editor/extensions/LetterSpacing';
|
|
12
|
+
import { LineHeight } from '../../brand-page-maker/composables/rich-text-editor/extensions/LineHeight';
|
|
13
|
+
import { AutoLink } from '../../brand-page-maker/composables/rich-text-editor/extensions/AutoLink';
|
|
14
|
+
import { isTiptapDocument } from '../parsers/section-tool-arguments';
|
|
15
|
+
import { rteStyleCheck, textCheck, } from './section-args-validator';
|
|
16
|
+
/**
|
|
17
|
+
* Constructs a headless Tiptap Editor with the same extension set as
|
|
18
|
+
* `useExternalRichTextEditor` in the maker. We import the Tiptap extension
|
|
19
|
+
* files directly (they are leaf modules) instead of going through the maker
|
|
20
|
+
* composable, which would pull in the AI executor → section-builders →
|
|
21
|
+
* section-rules graph and re-enter this file before its exports are bound.
|
|
22
|
+
*/
|
|
23
|
+
const buildHeadlessEditor = () => new Editor({
|
|
24
|
+
editable: false,
|
|
25
|
+
extensions: [
|
|
26
|
+
StarterKit,
|
|
27
|
+
Underline,
|
|
28
|
+
TextStyle.configure({ mergeNestedSpanStyles: true }),
|
|
29
|
+
TextAlign.configure({ types: ['heading', 'paragraph'] }),
|
|
30
|
+
FontFamily.configure({ types: ['textStyle'] }),
|
|
31
|
+
FontSize,
|
|
32
|
+
LetterSpacing,
|
|
33
|
+
LineHeight,
|
|
34
|
+
ColorExtension.configure({ types: ['textStyle'] }),
|
|
35
|
+
Highlight.configure({ multicolor: true }),
|
|
36
|
+
Link.configure({
|
|
37
|
+
openOnClick: false,
|
|
38
|
+
defaultProtocol: 'https',
|
|
39
|
+
autolink: true,
|
|
40
|
+
}),
|
|
41
|
+
AutoLink,
|
|
42
|
+
],
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* Validates a Tiptap doc against the headless editor's real ProseMirror
|
|
46
|
+
* schema (`schema.nodeFromJSON`). Catches malformed AI input — stray
|
|
47
|
+
* non-node children in `content`, unknown node types, malformed attrs —
|
|
48
|
+
* before the builder runs and the renderer's silent `setContent` drops
|
|
49
|
+
* the doc to `<p></p>` (BP-5669).
|
|
50
|
+
*
|
|
51
|
+
* Returns the field-prefixed error string so the AI's tool-call retry
|
|
52
|
+
* loop reads it via `BuilderResult.errors` → `tool_result.errorMessage`
|
|
53
|
+
* and re-emits a corrected payload.
|
|
54
|
+
*/
|
|
55
|
+
export const rteSchemaCheck = (field) => (record) => {
|
|
56
|
+
const value = record[field];
|
|
57
|
+
if (!isTiptapDocument(value))
|
|
58
|
+
return null;
|
|
59
|
+
const editor = buildHeadlessEditor();
|
|
60
|
+
try {
|
|
61
|
+
editor.schema.nodeFromJSON(value);
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
catch (err) {
|
|
65
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
66
|
+
return `"${field}" is not valid Tiptap JSON: ${detail}`;
|
|
67
|
+
}
|
|
68
|
+
finally {
|
|
69
|
+
editor.destroy();
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Returns [rteSchemaCheck(field), textCheck(field, max), rteStyleCheck(field)].
|
|
74
|
+
* Use with spread in a CHECKS array to validate the Tiptap doc structure
|
|
75
|
+
* (against the editor's real ProseMirror schema), plain text length, and
|
|
76
|
+
* inline RTE mark styles for the same field. Schema check runs first so
|
|
77
|
+
* a malformed doc surfaces an actionable error to the AI retry loop
|
|
78
|
+
* before the renderer can silently swallow it.
|
|
79
|
+
*/
|
|
80
|
+
export const textAndRteChecks = (field, max) => [
|
|
81
|
+
rteSchemaCheck(field),
|
|
82
|
+
textCheck(field, max),
|
|
83
|
+
rteStyleCheck(field),
|
|
84
|
+
];
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* sanitizer-rules.ts
|
|
3
|
+
*
|
|
4
|
+
* Shared style/logo/page constraint rules and the SectionRules interface.
|
|
5
|
+
* Per-section rules live colocated with each builder (e.g. banner-section.rules.ts).
|
|
6
|
+
*/
|
|
7
|
+
export declare const STYLE_RULES: {
|
|
8
|
+
readonly fontUnit: {
|
|
9
|
+
readonly allowedUnits: readonly ["em"];
|
|
10
|
+
};
|
|
11
|
+
readonly fontSize: {
|
|
12
|
+
readonly minEm: string;
|
|
13
|
+
readonly maxEm: string;
|
|
14
|
+
};
|
|
15
|
+
readonly lineHeight: {
|
|
16
|
+
readonly min: 1;
|
|
17
|
+
readonly max: 2.5;
|
|
18
|
+
};
|
|
19
|
+
readonly letterSpacing: {
|
|
20
|
+
readonly min: 0;
|
|
21
|
+
readonly max: 100;
|
|
22
|
+
};
|
|
23
|
+
readonly fontFamilyNames: Set<string>;
|
|
24
|
+
readonly fontFamilyKeys: Set<string>;
|
|
25
|
+
};
|
|
26
|
+
export declare const LOGO_SIZE_RULES: {
|
|
27
|
+
readonly unit: "rem";
|
|
28
|
+
readonly desktop: {
|
|
29
|
+
readonly min: 1;
|
|
30
|
+
readonly max: 20;
|
|
31
|
+
};
|
|
32
|
+
readonly mobile: {
|
|
33
|
+
readonly min: 1;
|
|
34
|
+
readonly max: 13;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export declare const PAGE_RULES: {
|
|
38
|
+
readonly pageName: 30;
|
|
39
|
+
readonly subPageName: 20;
|
|
40
|
+
readonly navDisplayName: 30;
|
|
41
|
+
};
|
|
42
|
+
export interface ItemCapRule {
|
|
43
|
+
brandSite: number;
|
|
44
|
+
brandPage: number;
|
|
45
|
+
/** The args field name that holds the items array (e.g. 'items', 'links'). */
|
|
46
|
+
arrayField: string;
|
|
47
|
+
}
|