@designcrowd/library.brand-page 5.16.52 → 5.16.53-ai-text-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-xbgTmfnA.js → CreatedOnBrandCrowd-de-de-Bq0Ya4Nh.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-DLLGJkMo.js → CreatedOnBrandCrowd-en-us-BELAuKsd.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-A-Q0Q2lN.js → CreatedOnBrandCrowd-es-es-B_9RczIO.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-ayTWQM7e.js → CreatedOnBrandCrowd-fr-ca-DqBEtXk0.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-ayTWQM7e.js → CreatedOnBrandCrowd-fr-fr-DqBEtXk0.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-D_h55ex6.js → CreatedOnBrandCrowd-pt-br-CxgkREwN.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-D_h55ex6.js → CreatedOnBrandCrowd-pt-pt-CxgkREwN.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-2cpFIVVB.js → CreatedOnDcom-de-de-GNRBzcq4.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-CEDrFuPs.js → CreatedOnDcom-en-us-CL7CoDCl.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-B78-IyMk.js → CreatedOnDcom-es-es-BCqFyNhe.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-cNDHyePc.js → CreatedOnDcom-fr-ca-BFGWZGLG.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-CgXgKRMi.js → CreatedOnDcom-fr-fr-U7XwogWl.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-CS5atdv2.js → CreatedOnDcom-pt-br-CMU7DzLB.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-Ck8lHWax.js → CreatedOnDcom-pt-pt-kPCIBR8r.js} +1 -1
  15. package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.d.ts +3 -1
  16. package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.js +12 -1
  17. package/lib/src/brand-page/models/index.d.ts +1 -1
  18. package/lib/src/brand-page/utils/migration.util.js +6 -1
  19. package/lib/src/brand-page/utils/view-model.util.js +1 -1
  20. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +1 -0
  21. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +3 -0
  22. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +1 -0
  23. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +3 -0
  24. package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +1 -0
  25. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +1 -0
  26. package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +1 -0
  27. package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +1 -0
  28. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +1 -0
  29. package/lib/src/brand-page-maker/composables/ai-chat/useAiChat.d.ts +53 -0
  30. package/lib/src/brand-page-maker/composables/ai-chat/useAiChat.js +315 -0
  31. package/lib/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.d.ts +17 -0
  32. package/lib/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.js +33 -0
  33. package/lib/src/brand-page-maker/composables/ai-chat/useAiTextEditPrompts.d.ts +18 -0
  34. package/lib/src/brand-page-maker/composables/ai-chat/useAiTextEditPrompts.js +118 -0
  35. package/lib/src/brand-page-maker/constants/sidebar-constant.d.ts +1 -0
  36. package/lib/src/brand-page-maker/constants/sidebar-constant.js +8 -0
  37. package/lib/src/brand-page-maker/stores/ai-thread/ai-thread-store.d.ts +16 -0
  38. package/lib/src/brand-page-maker/stores/ai-thread/ai-thread-store.js +15 -0
  39. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +1 -0
  40. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +17 -0
  41. package/lib/src/brand-page-maker/stores/index.d.ts +1 -0
  42. package/lib/src/brand-page-maker/stores/index.js +1 -0
  43. package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +7 -4
  44. package/lib/src/bundled-translations-jh38kyOf.js +169 -0
  45. package/lib/src/bundled-translations.de-DE-B6CXfMX0.js +169 -0
  46. package/lib/src/bundled-translations.es-ES-BCu5c7yr.js +169 -0
  47. package/lib/src/bundled-translations.fr-CA-rbmNoeko.js +169 -0
  48. package/lib/src/bundled-translations.fr-FR-CheIHVyL.js +169 -0
  49. package/lib/src/bundled-translations.pt-BR-CHjNrYmi.js +169 -0
  50. package/lib/src/bundled-translations.pt-PT-BLZiSsLr.js +169 -0
  51. package/lib/src/bundles/bundled-translations.de-DE.json +22 -22
  52. package/lib/src/bundles/bundled-translations.es-ES.json +22 -22
  53. package/lib/src/bundles/bundled-translations.fr-CA.json +22 -22
  54. package/lib/src/bundles/bundled-translations.fr-FR.json +22 -22
  55. package/lib/src/bundles/bundled-translations.json +26 -23
  56. package/lib/src/bundles/bundled-translations.pt-BR.json +22 -22
  57. package/lib/src/bundles/bundled-translations.pt-PT.json +22 -22
  58. package/lib/src/clients/ai-assistant-client.d.ts +49 -61
  59. package/lib/src/clients/ai-assistant-client.js +23 -25
  60. package/lib/src/css/library.brand-page-brandCrowd.min.css +94 -154
  61. package/lib/src/css/library.brand-page-brandPage.min.css +86 -154
  62. package/lib/src/css/library.brand-page-designCom.min.css +94 -154
  63. package/lib/src/css/library.brand-page-preview.min.css +86 -154
  64. package/lib/src/index.mjs +1 -1
  65. package/lib/src/{lib-D1mo2sqf.js → lib-BZlhfxPr.js} +23864 -23128
  66. package/lib/src/metadata-builder/ai-metadata-executor.d.ts +8 -0
  67. package/lib/src/metadata-builder/ai-metadata-executor.js +35 -0
  68. package/lib/src/metadata-builder/builders/update-content-text-builder.d.ts +17 -0
  69. package/lib/src/metadata-builder/builders/update-content-text-builder.js +108 -0
  70. package/lib/src/metadata-builder/builders/update-content-text-style-builder.d.ts +16 -0
  71. package/lib/src/metadata-builder/builders/update-content-text-style-builder.js +152 -0
  72. package/lib/src/metadata-builder/helpers/rte.helpers.d.ts +3 -0
  73. package/lib/src/metadata-builder/helpers/rte.helpers.js +50 -0
  74. package/lib/src/metadata-builder/index.d.ts +2 -0
  75. package/lib/src/metadata-builder/index.js +2 -0
  76. package/lib/src/metadata-builder/logger.d.ts +10 -0
  77. package/lib/src/metadata-builder/logger.js +13 -0
  78. package/lib/src/metadata-builder/metadata-executor.d.ts +6 -0
  79. package/lib/src/metadata-builder/metadata-executor.js +32 -0
  80. package/lib/src/metadata-builder/models.d.ts +35 -0
  81. package/lib/src/metadata-builder/models.js +21 -0
  82. package/lib/src/metadata-builder/parsers/ai-toolcall-parser.d.ts +30 -0
  83. package/lib/src/metadata-builder/parsers/ai-toolcall-parser.js +21 -0
  84. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +1 -0
  85. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +1 -0
  86. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +2 -0
  87. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +4 -0
  88. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +15 -0
  89. package/lib/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.mixin.d.ts +0 -1
  90. package/lib/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.mixin.js +0 -8
  91. package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.d.ts +0 -1
  92. package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.js +0 -12
  93. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +1 -0
  94. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +1 -0
  95. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +1 -0
  96. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +1 -0
  97. package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +2 -0
  98. package/lib/src/shared/side-bar/components/SideBarTabButton.mixin.d.ts +2 -0
  99. package/lib/src/shared/side-bar/store/side-bar-store.d.ts +12 -0
  100. package/lib/src/shared/side-bar/store/side-bar-store.js +7 -0
  101. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +1 -0
  102. package/package.json +1 -1
  103. package/src/brand-page/components/navigation/Navigation.vue +18 -3
  104. package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.ts +13 -2
  105. package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.vue +1 -1
  106. package/src/brand-page/models/index.ts +1 -1
  107. package/src/brand-page/utils/migration.util.ts +8 -1
  108. package/src/brand-page/utils/view-model.util.ts +12 -14
  109. package/src/brand-page-maker/components/ai-text-edit/AiActionButtons.vue +54 -0
  110. package/src/brand-page-maker/components/ai-text-edit/AiChatbox.vue +197 -0
  111. package/src/brand-page-maker/components/ai-text-edit/AiTextEdit.vue +134 -0
  112. package/src/brand-page-maker/components/ai-text-edit/ImageBubble.vue +79 -0
  113. package/src/brand-page-maker/components/ai-text-edit/TextBubble.vue +191 -0
  114. package/src/{shared/content-settings/components/generate-ai-modal → brand-page-maker/components/ai-text-edit}/i18n/generate-ai.json +2 -1
  115. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.vue +43 -2
  116. package/src/brand-page-maker/composables/ai-chat/useAiChat.ts +479 -0
  117. package/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.ts +60 -0
  118. package/src/brand-page-maker/composables/ai-chat/useAiTextEditPrompts.ts +164 -0
  119. package/src/brand-page-maker/constants/sidebar-constant.ts +8 -0
  120. package/src/brand-page-maker/stores/ai-thread/ai-thread-store.ts +17 -0
  121. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +20 -0
  122. package/src/brand-page-maker/stores/index.ts +1 -0
  123. package/src/brand-page-maker/utils/rich-text-editor.util.ts +7 -4
  124. package/src/bundles/bundled-translations.de-DE.json +22 -22
  125. package/src/bundles/bundled-translations.es-ES.json +22 -22
  126. package/src/bundles/bundled-translations.fr-CA.json +22 -22
  127. package/src/bundles/bundled-translations.fr-FR.json +22 -22
  128. package/src/bundles/bundled-translations.json +26 -23
  129. package/src/bundles/bundled-translations.pt-BR.json +22 -22
  130. package/src/bundles/bundled-translations.pt-PT.json +22 -22
  131. package/src/clients/ai-assistant-client.ts +80 -84
  132. package/src/metadata-builder/ai-metadata-executor.ts +59 -0
  133. package/src/metadata-builder/builders/update-content-text-builder.ts +154 -0
  134. package/src/metadata-builder/builders/update-content-text-style-builder.ts +246 -0
  135. package/src/metadata-builder/helpers/rte.helpers.ts +71 -0
  136. package/src/metadata-builder/index.ts +8 -0
  137. package/src/metadata-builder/logger.ts +21 -0
  138. package/src/metadata-builder/metadata-executor.ts +65 -0
  139. package/src/metadata-builder/models.ts +58 -0
  140. package/src/metadata-builder/parsers/ai-toolcall-parser.ts +61 -0
  141. package/src/shared/common/i18n/common.json +3 -1
  142. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +17 -0
  143. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.vue +6 -1
  144. package/src/shared/content-settings/components/generate-ai-button/GenerateAiButton.vue +29 -30
  145. package/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.mixin.ts +0 -9
  146. package/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.vue +5 -2
  147. package/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.ts +0 -15
  148. package/src/shared/content-settings/components/text-items-field/TextItemsField.vue +5 -2
  149. package/src/shared/side-bar/components/SideBar.vue +6 -1
  150. package/src/shared/side-bar/store/side-bar-store.ts +20 -0
  151. package/lib/src/bundled-translations-BGBFf8J6.js +0 -169
  152. package/lib/src/bundled-translations.de-DE-CMMRRwga.js +0 -169
  153. package/lib/src/bundled-translations.es-ES-XRLPG1g-.js +0 -169
  154. package/lib/src/bundled-translations.fr-CA-JVxHjJw5.js +0 -169
  155. package/lib/src/bundled-translations.fr-FR-B9v33v0w.js +0 -169
  156. package/lib/src/bundled-translations.pt-BR-B_hexxsq.js +0 -169
  157. package/lib/src/bundled-translations.pt-PT-B9aY7rS8.js +0 -169
  158. /package/src/{shared/content-settings/components/generate-ai-modal → brand-page-maker/components/ai-text-edit}/i18n/generate-ai.de-DE.json +0 -0
  159. /package/src/{shared/content-settings/components/generate-ai-modal → brand-page-maker/components/ai-text-edit}/i18n/generate-ai.es-ES.json +0 -0
  160. /package/src/{shared/content-settings/components/generate-ai-modal → brand-page-maker/components/ai-text-edit}/i18n/generate-ai.fr-CA.json +0 -0
  161. /package/src/{shared/content-settings/components/generate-ai-modal → brand-page-maker/components/ai-text-edit}/i18n/generate-ai.fr-FR.json +0 -0
  162. /package/src/{shared/content-settings/components/generate-ai-modal → brand-page-maker/components/ai-text-edit}/i18n/generate-ai.pt-BR.json +0 -0
  163. /package/src/{shared/content-settings/components/generate-ai-modal → brand-page-maker/components/ai-text-edit}/i18n/generate-ai.pt-PT.json +0 -0
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-D1mo2sqf.js";
2
+ import { _ as t } from "./lib-BZlhfxPr.js";
3
3
  const i = {}, h = {
4
4
  width: "275",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-D1mo2sqf.js";
2
+ import { _ as t } from "./lib-BZlhfxPr.js";
3
3
  const i = {}, h = {
4
4
  width: "251",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-D1mo2sqf.js";
2
+ import { _ as t } from "./lib-BZlhfxPr.js";
3
3
  const i = {}, h = {
4
4
  width: "250",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-D1mo2sqf.js";
2
+ import { _ as t } from "./lib-BZlhfxPr.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-D1mo2sqf.js";
2
+ import { _ as t } from "./lib-BZlhfxPr.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-D1mo2sqf.js";
2
+ import { _ as t } from "./lib-BZlhfxPr.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-D1mo2sqf.js";
2
+ import { _ as t } from "./lib-BZlhfxPr.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-D1mo2sqf.js";
2
+ import { _ as e } from "./lib-BZlhfxPr.js";
3
3
  const M = {}, Z = {
4
4
  width: "242",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-D1mo2sqf.js";
2
+ import { _ as e } from "./lib-BZlhfxPr.js";
3
3
  const i = {}, M = {
4
4
  width: "231",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-D1mo2sqf.js";
2
+ import { _ as e } from "./lib-BZlhfxPr.js";
3
3
  const M = {}, Z = {
4
4
  width: "230",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-D1mo2sqf.js";
2
+ import { _ as e } from "./lib-BZlhfxPr.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-D1mo2sqf.js";
2
+ import { _ as e } from "./lib-BZlhfxPr.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-D1mo2sqf.js";
2
+ import { _ as M } from "./lib-BZlhfxPr.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-D1mo2sqf.js";
2
+ import { _ as M } from "./lib-BZlhfxPr.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -1,6 +1,6 @@
1
1
  import type { PropType } from 'vue';
2
2
  import type { BrandPageContext, NavigationDesktop, NavigationMobile } from '../../../models';
3
- import type { NavViewModel } from '../../../view-models';
3
+ import type { NavViewModel, NavItemViewModel } from '../../../view-models';
4
4
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
5
  context: {
6
6
  type: PropType<BrandPageContext>;
@@ -23,11 +23,13 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
23
23
  required: true;
24
24
  };
25
25
  }>, {}, {}, {
26
+ visibleNavItems(): NavItemViewModel[];
26
27
  closeButtonStyle(): BrandPageCssStyle;
27
28
  defaultButtonStyle(): BrandPageCssStyle;
28
29
  selectedButtonStyle(): BrandPageCssStyle;
29
30
  routes(): any[];
30
31
  }, {
32
+ filterHiddenNavItems(navItems: NavItemViewModel[]): NavItemViewModel[];
31
33
  isCurrentPage(routeParams: {
32
34
  slug?: string;
33
35
  pageSlug?: string;
@@ -23,6 +23,9 @@ export default defineComponent({
23
23
  },
24
24
  },
25
25
  computed: {
26
+ visibleNavItems() {
27
+ return this.filterHiddenNavItems(this.pageNavigation.navItems);
28
+ },
26
29
  closeButtonStyle() {
27
30
  return Object.assign({}, this.styles.hamburgerMenuStyle.defaultButtonStyle, { fontSize: 'initial', lineHeight: 'initial' });
28
31
  },
@@ -33,7 +36,7 @@ export default defineComponent({
33
36
  return this.styles.hamburgerMenuStyle.selectedButtonStyle;
34
37
  },
35
38
  routes() {
36
- return this.pageNavigation.navItems.map((navItem, i) => {
39
+ return this.visibleNavItems.map((navItem, i) => {
37
40
  return {
38
41
  routeName: navItem.routeName,
39
42
  routeParams: navItem.routeParams,
@@ -42,6 +45,14 @@ export default defineComponent({
42
45
  },
43
46
  },
44
47
  methods: {
48
+ filterHiddenNavItems(navItems) {
49
+ return navItems
50
+ .filter((item) => !item.isHidden)
51
+ .map((item) => ({
52
+ ...item,
53
+ nestedNavItems: this.filterHiddenNavItems(item.nestedNavItems),
54
+ }));
55
+ },
45
56
  isCurrentPage(routeParams) {
46
57
  const slug = this.context.customDomain
47
58
  ? routeParams.slug
@@ -137,7 +137,7 @@ export interface VideoContent extends Content {
137
137
  export interface TextContent extends Content {
138
138
  iconUrl: string;
139
139
  /**
140
- * For BrandPage only
140
+ * For BrandPage/BrandContact only
141
141
  */
142
142
  text: string;
143
143
  /**
@@ -111,6 +111,11 @@ export const migrateBrandPageModel = async (brandPageModel, options) => {
111
111
  brandPageModel,
112
112
  useOldLogoRenderSize: false,
113
113
  };
114
+ const latestVersion = GetLatestModelVersion();
115
+ // Return early if the model is already at the latest version
116
+ if (migrationResult.brandPageModel.v === latestVersion) {
117
+ return migrationResult;
118
+ }
114
119
  if (!modelVersion) {
115
120
  modelVersion = 0;
116
121
  }
@@ -120,6 +125,6 @@ export const migrateBrandPageModel = async (brandPageModel, options) => {
120
125
  }
121
126
  }
122
127
  // Set the model to latest version
123
- migrationResult.brandPageModel.v = GetLatestModelVersion();
128
+ migrationResult.brandPageModel.v = latestVersion;
124
129
  return migrationResult;
125
130
  };
@@ -637,7 +637,7 @@ export const mapToNavViewModel = (nav, brandPageSlug, isCustomDomain) => {
637
637
  return {
638
638
  navItems: nav.orders
639
639
  .map((order, idx) => buildNavItemViewModel(order, nav.routes, '', idx === 0, brandPageSlug, isCustomDomain))
640
- .filter((item) => item !== null).filter((item) => !item.isHidden),
640
+ .filter((item) => item !== null),
641
641
  };
642
642
  };
643
643
  export const mapToPageStyleViewModel = (pageStyles, options) => {
@@ -120,6 +120,7 @@ declare const _default: import("vue").DefineComponent<{}, {
120
120
  setBrandPageType({ brandPageType }: {
121
121
  brandPageType: "default" | "brandSite" | "brandContact";
122
122
  }): void;
123
+ initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
123
124
  initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
124
125
  initialisePages({ pages, sections, }: {
125
126
  pages: import("../../../brand-page").PageModel[];
@@ -165,6 +165,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
165
165
  setBrandPageType({ brandPageType }: {
166
166
  brandPageType: "default" | "brandSite" | "brandContact";
167
167
  }): void;
168
+ initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
168
169
  initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
169
170
  initialisePages({ pages, sections, }: {
170
171
  pages: import("../../../brand-page").PageModel[];
@@ -199,6 +200,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
199
200
  setSelectedSettingsSection(payload: {
200
201
  sectionName?: string | undefined;
201
202
  }): void;
203
+ setAiTextEditContext(payload: import("../../../shared/side-bar/store").AiTextEditContext): void;
204
+ clearAiTextEditContext(): void;
202
205
  }>;
203
206
  userStore: import("pinia").Store<"brandPageMakerUser", import("../../stores").UserState, {}, {
204
207
  setUserState(payload: {
@@ -110,6 +110,7 @@ declare const _default: import("vue").DefineComponent<{}, {
110
110
  setBrandPageType({ brandPageType }: {
111
111
  brandPageType: "default" | "brandSite" | "brandContact";
112
112
  }): void;
113
+ initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../lib").BrandPageModel): Promise<void>;
113
114
  initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
114
115
  initialisePages({ pages, sections, }: {
115
116
  pages: import("../../../lib").PageModel[];
@@ -616,6 +616,7 @@ declare const _default: import("vue").DefineComponent<{}, {
616
616
  setBrandPageType({ brandPageType }: {
617
617
  brandPageType: "default" | "brandSite" | "brandContact";
618
618
  }): void;
619
+ initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
619
620
  initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
620
621
  initialisePages({ pages, sections, }: {
621
622
  pages: import("../../../brand-page").PageModel[];
@@ -926,6 +927,8 @@ declare const _default: import("vue").DefineComponent<{}, {
926
927
  setSelectedSettingsSection(payload: {
927
928
  sectionName?: string | undefined;
928
929
  }): void;
930
+ setAiTextEditContext(payload: import("../../../shared/side-bar/store").AiTextEditContext): void;
931
+ clearAiTextEditContext(): void;
929
932
  }>;
930
933
  pageSettingsStore: import("pinia").Store<"uiPageSettings", import("../../../shared/page-settings/store").PageSettingsState, {
931
934
  pageIndex(): number;
@@ -116,6 +116,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
116
116
  setBrandPageType({ brandPageType }: {
117
117
  brandPageType: "default" | "brandSite" | "brandContact";
118
118
  }): void;
119
+ initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
119
120
  initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
120
121
  initialisePages({ pages, sections, }: {
121
122
  pages: import("../../../brand-page").PageModel[];
@@ -362,6 +362,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
362
362
  setBrandPageType({ brandPageType }: {
363
363
  brandPageType: "default" | "brandSite" | "brandContact";
364
364
  }): void;
365
+ initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
365
366
  initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
366
367
  initialisePages({ pages, sections, }: {
367
368
  pages: import("../../../brand-page").PageModel[];
@@ -363,6 +363,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
363
363
  setBrandPageType({ brandPageType }: {
364
364
  brandPageType: "default" | "brandSite" | "brandContact";
365
365
  }): void;
366
+ initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
366
367
  initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
367
368
  initialisePages({ pages, sections, }: {
368
369
  pages: import("../../../brand-page").PageModel[];
@@ -126,6 +126,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
126
126
  setBrandPageType({ brandPageType }: {
127
127
  brandPageType: "default" | "brandSite" | "brandContact";
128
128
  }): void;
129
+ initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
129
130
  initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
130
131
  initialisePages({ pages, sections, }: {
131
132
  pages: import("../../../brand-page").PageModel[];
@@ -414,6 +414,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
414
414
  setBrandPageType({ brandPageType }: {
415
415
  brandPageType: "default" | "brandSite" | "brandContact";
416
416
  }): void;
417
+ initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
417
418
  initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
418
419
  initialisePages({ pages, sections, }: {
419
420
  pages: import("../../../brand-page").PageModel[];
@@ -0,0 +1,53 @@
1
+ import { type ComputedRef, type Ref } from 'vue';
2
+ export interface BaseThreadMessage {
3
+ id: string;
4
+ role: 'user' | 'agent';
5
+ isTyping?: boolean;
6
+ isError?: boolean;
7
+ timestamp: Date;
8
+ }
9
+ export interface TextThreadMessage extends BaseThreadMessage {
10
+ type: 'text';
11
+ text: string;
12
+ }
13
+ export interface ImageThreadMessage extends BaseThreadMessage {
14
+ type: 'image';
15
+ images: {
16
+ url: string;
17
+ alt?: string;
18
+ }[];
19
+ text?: string;
20
+ }
21
+ export type ThreadMessage = TextThreadMessage | ImageThreadMessage;
22
+ export interface SendMessageOptions {
23
+ text?: string;
24
+ images?: {
25
+ url: string;
26
+ alt?: string;
27
+ }[];
28
+ }
29
+ export interface UseAiChatOptions {
30
+ currentValue?: string;
31
+ fieldId: string;
32
+ fieldName: string;
33
+ contentType: string;
34
+ maxChars?: number;
35
+ textStyle?: BrandPageCssStyle;
36
+ onTextUpdate?: (text: string) => void;
37
+ onStyleUpdate?: (style: BrandPageCssStyle) => void;
38
+ }
39
+ export interface UseAiChatResult {
40
+ threadItems: Ref<ThreadMessage[]>;
41
+ isProcessing: Ref<boolean>;
42
+ currentTypingMessageId: Ref<string | null>;
43
+ generatedText: Ref<string | null>;
44
+ generatedStyle: Ref<BrandPageCssStyle | null>;
45
+ sendMessageAsync: (options: SendMessageOptions) => Promise<void>;
46
+ deleteMessage: (messageId: string) => void;
47
+ stopGeneration: () => void;
48
+ formattedMessages: ComputedRef<{
49
+ type: string;
50
+ props: Record<string, unknown>;
51
+ }[]>;
52
+ }
53
+ export declare function useAiChat(options: UseAiChatOptions): UseAiChatResult;