@designcrowd/library.brand-page 5.16.55 → 5.16.57-kp-bugsmash-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 (167) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-CKdF-VPz.js → CreatedOnBrandCrowd-de-de-DaLcEkKT.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-BKYnl-yb.js → CreatedOnBrandCrowd-en-us-cUAYEgdm.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-C8imb_hy.js → CreatedOnBrandCrowd-es-es-CP-ScxSp.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-boSG54Iv.js → CreatedOnBrandCrowd-fr-ca-By7O0GH8.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-boSG54Iv.js → CreatedOnBrandCrowd-fr-fr-By7O0GH8.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-BDJJDXbB.js → CreatedOnBrandCrowd-pt-br-nvOcbyBK.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-BDJJDXbB.js → CreatedOnBrandCrowd-pt-pt-nvOcbyBK.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-mBzErUNE.js → CreatedOnDcom-de-de-DyFx1_Bs.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-DATpe8q3.js → CreatedOnDcom-en-us-CPzj0DSO.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-l7aq6D9Y.js → CreatedOnDcom-es-es-Ag6wht3a.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-C3MoZ4Ks.js → CreatedOnDcom-fr-ca-CWJQDLEk.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-CG_cHJxE.js → CreatedOnDcom-fr-fr-CcRCmQ3T.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-CTSbFbwu.js → CreatedOnDcom-pt-br-D0NOvUjY.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-j7JeOpTM.js → CreatedOnDcom-pt-pt-Byq5OGLp.js} +1 -1
  15. package/lib/src/brand-page/models/brand-page-context.model.d.ts +1 -0
  16. package/lib/src/brand-page/models/brand-page-context.model.js +5 -0
  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-maker/components/action-bar/ActionBar.mixin.d.ts +5 -0
  20. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +7 -0
  21. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +5 -0
  22. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +7 -0
  23. package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +5 -0
  24. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +5 -0
  25. package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +5 -0
  26. package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +5 -0
  27. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +5 -0
  28. package/lib/src/brand-page-maker/composables/ai-chat/useAiChat.d.ts +54 -0
  29. package/lib/src/brand-page-maker/composables/ai-chat/useAiChat.js +358 -0
  30. package/lib/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.d.ts +17 -0
  31. package/lib/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.js +33 -0
  32. package/lib/src/brand-page-maker/composables/ai-chat/useAiTextEditPrompts.d.ts +18 -0
  33. package/lib/src/brand-page-maker/composables/ai-chat/useAiTextEditPrompts.js +144 -0
  34. package/lib/src/brand-page-maker/constants/sidebar-constant.d.ts +1 -0
  35. package/lib/src/brand-page-maker/constants/sidebar-constant.js +8 -0
  36. package/lib/src/brand-page-maker/stores/ai-thread/ai-thread-store.d.ts +19 -0
  37. package/lib/src/brand-page-maker/stores/ai-thread/ai-thread-store.js +17 -0
  38. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +11 -0
  39. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +55 -1
  40. package/lib/src/brand-page-maker/stores/index.d.ts +1 -0
  41. package/lib/src/brand-page-maker/stores/index.js +1 -0
  42. package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +7 -4
  43. package/lib/src/bundled-translations-D_D7Y1MR.js +169 -0
  44. package/lib/src/bundled-translations.de-DE-giJ-vMQq.js +169 -0
  45. package/lib/src/bundled-translations.es-ES-Cr7InsII.js +169 -0
  46. package/lib/src/bundled-translations.fr-CA-B-gs1XwO.js +169 -0
  47. package/lib/src/bundled-translations.fr-FR-CHkVhsPB.js +169 -0
  48. package/lib/src/bundled-translations.pt-BR-C5WsSeJW.js +169 -0
  49. package/lib/src/bundled-translations.pt-PT-DG9KWHKO.js +169 -0
  50. package/lib/src/bundles/bundled-translations.de-DE.json +27 -23
  51. package/lib/src/bundles/bundled-translations.es-ES.json +27 -23
  52. package/lib/src/bundles/bundled-translations.fr-CA.json +27 -23
  53. package/lib/src/bundles/bundled-translations.fr-FR.json +27 -23
  54. package/lib/src/bundles/bundled-translations.json +27 -23
  55. package/lib/src/bundles/bundled-translations.pt-BR.json +27 -23
  56. package/lib/src/bundles/bundled-translations.pt-PT.json +27 -23
  57. package/lib/src/clients/ai-assistant-client.d.ts +49 -61
  58. package/lib/src/clients/ai-assistant-client.js +23 -25
  59. package/lib/src/css/library.brand-page-brandCrowd.min.css +181 -218
  60. package/lib/src/css/library.brand-page-brandPage.min.css +177 -218
  61. package/lib/src/css/library.brand-page-designCom.min.css +181 -218
  62. package/lib/src/css/library.brand-page-preview.min.css +177 -218
  63. package/lib/src/index.mjs +1 -1
  64. package/lib/src/{lib-BWXLHDqW.js → lib-c_ML-Glk.js} +24208 -23361
  65. package/lib/src/metadata-builder/ai-metadata-executor.d.ts +8 -0
  66. package/lib/src/metadata-builder/ai-metadata-executor.js +35 -0
  67. package/lib/src/metadata-builder/builders/update-content-text-builder.d.ts +17 -0
  68. package/lib/src/metadata-builder/builders/update-content-text-builder.js +108 -0
  69. package/lib/src/metadata-builder/builders/update-content-text-style-builder.d.ts +16 -0
  70. package/lib/src/metadata-builder/builders/update-content-text-style-builder.js +212 -0
  71. package/lib/src/metadata-builder/helpers/rte.helpers.d.ts +3 -0
  72. package/lib/src/metadata-builder/helpers/rte.helpers.js +53 -0
  73. package/lib/src/metadata-builder/index.d.ts +2 -0
  74. package/lib/src/metadata-builder/index.js +2 -0
  75. package/lib/src/metadata-builder/logger.d.ts +10 -0
  76. package/lib/src/metadata-builder/logger.js +13 -0
  77. package/lib/src/metadata-builder/metadata-executor.d.ts +6 -0
  78. package/lib/src/metadata-builder/metadata-executor.js +37 -0
  79. package/lib/src/metadata-builder/models.d.ts +35 -0
  80. package/lib/src/metadata-builder/models.js +21 -0
  81. package/lib/src/metadata-builder/parsers/ai-toolcall-parser.d.ts +30 -0
  82. package/lib/src/metadata-builder/parsers/ai-toolcall-parser.js +21 -0
  83. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +5 -0
  84. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +5 -0
  85. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +2 -0
  86. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +8 -0
  87. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +24 -0
  88. package/lib/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.mixin.d.ts +0 -1
  89. package/lib/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.mixin.js +0 -8
  90. package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.d.ts +0 -1
  91. package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.js +0 -12
  92. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +5 -0
  93. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +5 -0
  94. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +5 -0
  95. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +5 -0
  96. package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +2 -0
  97. package/lib/src/shared/side-bar/components/SideBarTabButton.mixin.d.ts +2 -0
  98. package/lib/src/shared/side-bar/store/side-bar-store.d.ts +12 -0
  99. package/lib/src/shared/side-bar/store/side-bar-store.js +7 -0
  100. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +5 -0
  101. package/package.json +1 -1
  102. package/src/brand-page/components/about-section/AboutSection.vue +0 -2
  103. package/src/brand-page/models/brand-page-context.model.ts +12 -0
  104. package/src/brand-page/models/index.ts +1 -1
  105. package/src/brand-page/utils/migration.util.ts +8 -1
  106. package/src/brand-page-maker/components/ai-text-edit/AiActionButtons.vue +54 -0
  107. package/src/brand-page-maker/components/ai-text-edit/AiChatbox.vue +170 -0
  108. package/src/brand-page-maker/components/ai-text-edit/AiTextEdit.vue +159 -0
  109. package/src/brand-page-maker/components/ai-text-edit/ImageBubble.vue +79 -0
  110. package/src/brand-page-maker/components/ai-text-edit/TextBubble.vue +195 -0
  111. package/src/{shared/content-settings/components/generate-ai-modal → brand-page-maker/components/ai-text-edit}/i18n/generate-ai.de-DE.json +3 -1
  112. package/src/{shared/content-settings/components/generate-ai-modal → brand-page-maker/components/ai-text-edit}/i18n/generate-ai.es-ES.json +3 -1
  113. package/src/{shared/content-settings/components/generate-ai-modal → brand-page-maker/components/ai-text-edit}/i18n/generate-ai.fr-CA.json +3 -1
  114. package/src/{shared/content-settings/components/generate-ai-modal → brand-page-maker/components/ai-text-edit}/i18n/generate-ai.fr-FR.json +3 -1
  115. package/src/{shared/content-settings/components/generate-ai-modal → brand-page-maker/components/ai-text-edit}/i18n/generate-ai.json +3 -1
  116. package/src/{shared/content-settings/components/generate-ai-modal → brand-page-maker/components/ai-text-edit}/i18n/generate-ai.pt-BR.json +3 -1
  117. package/src/{shared/content-settings/components/generate-ai-modal → brand-page-maker/components/ai-text-edit}/i18n/generate-ai.pt-PT.json +3 -1
  118. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.vue +43 -3
  119. package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +1 -1
  120. package/src/brand-page-maker/composables/ai-chat/useAiChat.ts +553 -0
  121. package/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.ts +60 -0
  122. package/src/brand-page-maker/composables/ai-chat/useAiTextEditPrompts.ts +196 -0
  123. package/src/brand-page-maker/constants/sidebar-constant.ts +8 -0
  124. package/src/brand-page-maker/stores/ai-thread/ai-thread-store.ts +19 -0
  125. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +74 -1
  126. package/src/brand-page-maker/stores/index.ts +1 -0
  127. package/src/brand-page-maker/utils/rich-text-editor.util.ts +7 -4
  128. package/src/bundles/bundled-translations.de-DE.json +27 -23
  129. package/src/bundles/bundled-translations.es-ES.json +27 -23
  130. package/src/bundles/bundled-translations.fr-CA.json +27 -23
  131. package/src/bundles/bundled-translations.fr-FR.json +27 -23
  132. package/src/bundles/bundled-translations.json +27 -23
  133. package/src/bundles/bundled-translations.pt-BR.json +27 -23
  134. package/src/bundles/bundled-translations.pt-PT.json +27 -23
  135. package/src/clients/ai-assistant-client.ts +80 -84
  136. package/src/metadata-builder/ai-metadata-executor.ts +59 -0
  137. package/src/metadata-builder/builders/update-content-text-builder.ts +154 -0
  138. package/src/metadata-builder/builders/update-content-text-style-builder.ts +349 -0
  139. package/src/metadata-builder/helpers/rte.helpers.ts +74 -0
  140. package/src/metadata-builder/index.ts +8 -0
  141. package/src/metadata-builder/logger.ts +21 -0
  142. package/src/metadata-builder/metadata-executor.ts +72 -0
  143. package/src/metadata-builder/models.ts +58 -0
  144. package/src/metadata-builder/parsers/ai-toolcall-parser.ts +61 -0
  145. package/src/shared/common/i18n/common.de-DE.json +3 -1
  146. package/src/shared/common/i18n/common.es-ES.json +3 -1
  147. package/src/shared/common/i18n/common.fr-CA.json +3 -1
  148. package/src/shared/common/i18n/common.fr-FR.json +3 -1
  149. package/src/shared/common/i18n/common.json +3 -1
  150. package/src/shared/common/i18n/common.pt-BR.json +3 -1
  151. package/src/shared/common/i18n/common.pt-PT.json +3 -1
  152. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +26 -0
  153. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.vue +6 -1
  154. package/src/shared/content-settings/components/generate-ai-button/GenerateAiButton.vue +30 -31
  155. package/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.mixin.ts +0 -9
  156. package/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.vue +5 -2
  157. package/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.ts +0 -15
  158. package/src/shared/content-settings/components/text-items-field/TextItemsField.vue +5 -2
  159. package/src/shared/side-bar/components/SideBar.vue +6 -1
  160. package/src/shared/side-bar/store/side-bar-store.ts +20 -0
  161. package/lib/src/bundled-translations-CRhilGW5.js +0 -169
  162. package/lib/src/bundled-translations.de-DE-Dvjg8kzt.js +0 -169
  163. package/lib/src/bundled-translations.es-ES-CR_GMwLT.js +0 -169
  164. package/lib/src/bundled-translations.fr-CA-IeE2VZVM.js +0 -169
  165. package/lib/src/bundled-translations.fr-FR-Db31s5E2.js +0 -169
  166. package/lib/src/bundled-translations.pt-BR-BGbvdkDH.js +0 -169
  167. package/lib/src/bundled-translations.pt-PT-DjrePA9o.js +0 -169
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BWXLHDqW.js";
2
+ import { _ as t } from "./lib-c_ML-Glk.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-BWXLHDqW.js";
2
+ import { _ as t } from "./lib-c_ML-Glk.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-BWXLHDqW.js";
2
+ import { _ as t } from "./lib-c_ML-Glk.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-BWXLHDqW.js";
2
+ import { _ as t } from "./lib-c_ML-Glk.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-BWXLHDqW.js";
2
+ import { _ as t } from "./lib-c_ML-Glk.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-BWXLHDqW.js";
2
+ import { _ as t } from "./lib-c_ML-Glk.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-BWXLHDqW.js";
2
+ import { _ as t } from "./lib-c_ML-Glk.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-BWXLHDqW.js";
2
+ import { _ as e } from "./lib-c_ML-Glk.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-BWXLHDqW.js";
2
+ import { _ as e } from "./lib-c_ML-Glk.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-BWXLHDqW.js";
2
+ import { _ as e } from "./lib-c_ML-Glk.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-BWXLHDqW.js";
2
+ import { _ as e } from "./lib-c_ML-Glk.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-BWXLHDqW.js";
2
+ import { _ as e } from "./lib-c_ML-Glk.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-BWXLHDqW.js";
2
+ import { _ as M } from "./lib-c_ML-Glk.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-BWXLHDqW.js";
2
+ import { _ as M } from "./lib-c_ML-Glk.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -37,6 +37,7 @@ export interface AbTestResult {
37
37
  export interface AbTest {
38
38
  bp_3926_freemium_watermark?: AbTestResult;
39
39
  bp_4572_ai_text_generation_post_purchase?: AbTestResult;
40
+ bp_4964_ai_text_generation_improvement?: AbTestResult;
40
41
  }
41
42
  export declare const MEDIA_SIZES: {
42
43
  readonly size1x: "size1x";
@@ -25,6 +25,7 @@ export const AB_TEST_FLAG = {
25
25
  const AB_TEST_KEYS = {
26
26
  BP_3926_FREEMIUM_WATERMARK: 'bc-bp-3926-freemium-cta-in-website-editor',
27
27
  BP_4572_AI_TEXT_GENERATION_POST_PURCHASE: 'bc-bp-4572-ai-text-generation-post-purchase',
28
+ BP_4964_AI_TEXT_GENERATION_IMPROVEMENT: 'bc-bp-4964-ai-text-improvement-post-purchase-on-website',
28
29
  };
29
30
  export const MEDIA_SIZES = {
30
31
  size1x: 'size1x',
@@ -50,5 +51,9 @@ export const getAbTestResults = (abtestKeyValues) => {
50
51
  if (abtestKeyValues[AB_TEST_KEYS.BP_4572_AI_TEXT_GENERATION_POST_PURCHASE]) {
51
52
  abTests.bp_4572_ai_text_generation_post_purchase = getValueType(AB_TEST_KEYS.BP_4572_AI_TEXT_GENERATION_POST_PURCHASE, abtestKeyValues[AB_TEST_KEYS.BP_4572_AI_TEXT_GENERATION_POST_PURCHASE]);
52
53
  }
54
+ // AB Test for BP-4572 - AI Text Generation Improvement
55
+ if (abtestKeyValues[AB_TEST_KEYS.BP_4964_AI_TEXT_GENERATION_IMPROVEMENT]) {
56
+ abTests.bp_4964_ai_text_generation_improvement = getValueType(AB_TEST_KEYS.BP_4964_AI_TEXT_GENERATION_IMPROVEMENT, abtestKeyValues[AB_TEST_KEYS.BP_4964_AI_TEXT_GENERATION_IMPROVEMENT]);
57
+ }
53
58
  return abTests;
54
59
  };
@@ -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
  };
@@ -120,11 +120,16 @@ 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[];
126
127
  sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
127
128
  }): void;
129
+ initialisePagesForCurrentPage({ pages, sections, }: {
130
+ pages: import("../../../brand-page").PageModel[];
131
+ sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
132
+ }): void;
128
133
  initialiseAdminMaker(payload: {
129
134
  models: import("../../stores/admin-logo-settings").AdminPreviewLogoTemplateModel[];
130
135
  }): void;
@@ -165,11 +165,16 @@ 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[];
171
172
  sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
172
173
  }): void;
174
+ initialisePagesForCurrentPage({ pages, sections, }: {
175
+ pages: import("../../../brand-page").PageModel[];
176
+ sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
177
+ }): void;
173
178
  initialiseAdminMaker(payload: {
174
179
  models: AdminPreviewLogoTemplateModel[];
175
180
  }): void;
@@ -199,6 +204,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
199
204
  setSelectedSettingsSection(payload: {
200
205
  sectionName?: string | undefined;
201
206
  }): void;
207
+ setAiTextEditContext(payload: import("../../../shared/side-bar/store").AiTextEditContext): void;
208
+ clearAiTextEditContext(): void;
202
209
  }>;
203
210
  userStore: import("pinia").Store<"brandPageMakerUser", import("../../stores").UserState, {}, {
204
211
  setUserState(payload: {
@@ -110,11 +110,16 @@ 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[];
116
117
  sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
117
118
  }): void;
119
+ initialisePagesForCurrentPage({ pages, sections, }: {
120
+ pages: import("../../../lib").PageModel[];
121
+ sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
122
+ }): void;
118
123
  initialiseAdminMaker(payload: {
119
124
  models: import("../../stores/admin-logo-settings").AdminPreviewLogoTemplateModel[];
120
125
  }): void;
@@ -616,11 +616,16 @@ 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[];
622
623
  sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
623
624
  }): void;
625
+ initialisePagesForCurrentPage({ pages, sections, }: {
626
+ pages: import("../../../brand-page").PageModel[];
627
+ sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
628
+ }): void;
624
629
  initialiseAdminMaker(payload: {
625
630
  models: import("../../stores/admin-logo-settings").AdminPreviewLogoTemplateModel[];
626
631
  }): void;
@@ -926,6 +931,8 @@ declare const _default: import("vue").DefineComponent<{}, {
926
931
  setSelectedSettingsSection(payload: {
927
932
  sectionName?: string | undefined;
928
933
  }): void;
934
+ setAiTextEditContext(payload: import("../../../shared/side-bar/store").AiTextEditContext): void;
935
+ clearAiTextEditContext(): void;
929
936
  }>;
930
937
  pageSettingsStore: import("pinia").Store<"uiPageSettings", import("../../../shared/page-settings/store").PageSettingsState, {
931
938
  pageIndex(): number;
@@ -116,11 +116,16 @@ 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[];
122
123
  sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
123
124
  }): void;
125
+ initialisePagesForCurrentPage({ pages, sections, }: {
126
+ pages: import("../../../brand-page").PageModel[];
127
+ sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
128
+ }): void;
124
129
  initialiseAdminMaker(payload: {
125
130
  models: import("../../stores/admin-logo-settings").AdminPreviewLogoTemplateModel[];
126
131
  }): void;
@@ -362,11 +362,16 @@ 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[];
368
369
  sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
369
370
  }): void;
371
+ initialisePagesForCurrentPage({ pages, sections, }: {
372
+ pages: import("../../../brand-page").PageModel[];
373
+ sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
374
+ }): void;
370
375
  initialiseAdminMaker(payload: {
371
376
  models: import("../../stores/admin-logo-settings").AdminPreviewLogoTemplateModel[];
372
377
  }): void;
@@ -363,11 +363,16 @@ 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[];
369
370
  sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
370
371
  }): void;
372
+ initialisePagesForCurrentPage({ pages, sections, }: {
373
+ pages: import("../../../brand-page").PageModel[];
374
+ sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
375
+ }): void;
371
376
  initialiseAdminMaker(payload: {
372
377
  models: import("../../stores/admin-logo-settings").AdminPreviewLogoTemplateModel[];
373
378
  }): void;
@@ -126,11 +126,16 @@ 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[];
132
133
  sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
133
134
  }): void;
135
+ initialisePagesForCurrentPage({ pages, sections, }: {
136
+ pages: import("../../../brand-page").PageModel[];
137
+ sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
138
+ }): void;
134
139
  initialiseAdminMaker(payload: {
135
140
  models: import("../../stores/admin-logo-settings").AdminPreviewLogoTemplateModel[];
136
141
  }): void;
@@ -414,11 +414,16 @@ 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[];
420
421
  sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
421
422
  }): void;
423
+ initialisePagesForCurrentPage({ pages, sections, }: {
424
+ pages: import("../../../brand-page").PageModel[];
425
+ sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
426
+ }): void;
422
427
  initialiseAdminMaker(payload: {
423
428
  models: import("../../stores/admin-logo-settings").AdminPreviewLogoTemplateModel[];
424
429
  }): void;
@@ -0,0 +1,54 @@
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
+ stopGenerationAsync: () => Promise<void>;
48
+ formattedMessages: ComputedRef<{
49
+ type: string;
50
+ props: Record<string, unknown>;
51
+ }[]>;
52
+ }
53
+ export declare const createWelcomeMessage: (currentValue: string) => TextThreadMessage;
54
+ export declare function useAiChat(options: UseAiChatOptions): UseAiChatResult;