@designcrowd/library.brand-page 6.0.6-undo-12 → 6.0.6-v2-poc-2
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-BoBmsU5p.js → CreatedOnBrandCrowd-de-de-DC3zJ4EI.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-VTBk9ZeK.js → CreatedOnBrandCrowd-en-us-WxsgK16i.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-CwYO5ZGB.js → CreatedOnBrandCrowd-es-es-PooaBwOY.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-ZNEyNVVj.js → CreatedOnBrandCrowd-fr-ca-B-SyXYxn.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-ZNEyNVVj.js → CreatedOnBrandCrowd-fr-fr-B-SyXYxn.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-D1q4-n_v.js → CreatedOnBrandCrowd-pt-br-D7WamfO5.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-D1q4-n_v.js → CreatedOnBrandCrowd-pt-pt-D7WamfO5.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-CFvvAm2h.js → CreatedOnDcom-de-de-BCcWMkdO.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-B5WlETVx.js → CreatedOnDcom-en-us-DeTTbHqi.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-CatVjoa9.js → CreatedOnDcom-es-es-CawL9NsI.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-uyrRJVf9.js → CreatedOnDcom-fr-ca-JTfhwgSp.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-CKSa6Crw.js → CreatedOnDcom-fr-fr-C0_cTdqE.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-BIcGDf-8.js → CreatedOnDcom-pt-br-BA1jF9nv.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-BhKpuziQ.js → CreatedOnDcom-pt-pt-CcdZV0s6.js} +1 -1
- package/lib/src/brand-page/utils/logo.util.d.ts +0 -14
- package/lib/src/brand-page/utils/logo.util.js +0 -19
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +6 -6
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +1 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +7 -7
- package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/preview/Preview.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +2 -2
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.js +2 -2
- package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +5 -31
- package/lib/src/brand-page-maker/composables/useUndoRedoFlag.d.ts +7 -6
- package/lib/src/brand-page-maker/composables/useUndoRedoFlag.js +12 -7
- package/lib/src/brand-page-maker/stores/ai-thread/ai-website-builder-thread-store.d.ts +9 -2
- package/lib/src/brand-page-maker/stores/ai-thread/ai-website-builder-thread-store.js +29 -0
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +1 -1
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +55 -77
- package/lib/src/brand-page-maker/stores/history/history-store.d.ts +1 -7
- package/lib/src/brand-page-maker/stores/history/history-store.js +5 -23
- package/lib/src/clients/ai-assistant-client.d.ts +1 -0
- package/lib/src/clients/ai-assistant-client.js +1 -0
- package/lib/src/css/library.brand-page-brandCrowd.min.css +13 -19
- package/lib/src/css/library.brand-page-brandPage.min.css +13 -19
- package/lib/src/css/library.brand-page-designCom.min.css +13 -19
- package/lib/src/css/library.brand-page-preview.min.css +13 -19
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-CtSZjhZb.js → lib-D5-uKGCN.js} +27799 -27830
- package/lib/src/shared/content-settings/components/GenericTextInput.mixin.d.ts +0 -5
- package/lib/src/shared/content-settings/components/GenericTextInput.mixin.js +0 -29
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +7 -7
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +6 -6
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +5 -5
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +6 -6
- package/lib/src/shared/content-settings/components/email-field/EmailField.mixin.d.ts +0 -5
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +5 -5
- package/lib/src/shared/content-settings/components/form-fields-field/FormFieldsField.mixin.js +4 -5
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +67 -0
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.js +6 -4
- package/lib/src/shared/content-settings/components/tel-field/TelField.mixin.d.ts +0 -5
- package/lib/src/shared/content-settings/components/text-field/TextField.mixin.d.ts +0 -5
- package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.d.ts +0 -2
- package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.js +0 -19
- package/lib/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.d.ts +0 -1
- package/lib/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.js +7 -18
- package/lib/src/shared/content-settings/components/textarea-field/TextareaField.mixin.d.ts +0 -5
- package/lib/src/shared/content-settings/components/url-field/UrlField.mixin.d.ts +0 -5
- package/lib/src/shared/content-settings/components/youtube-video-field/YoutubeVideoField.mixin.d.ts +0 -5
- package/lib/src/shared/content-settings/models.d.ts +0 -11
- package/lib/src/shared/content-settings/store/content-settings-store.d.ts +5 -5
- package/lib/src/shared/content-settings/store/content-settings-store.js +5 -47
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +1 -1
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +6 -6
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +6 -6
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +1 -1
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +1 -1
- package/package.json +1 -1
- package/src/brand-page/components/shop/Shop.vue +1 -0
- package/src/brand-page/utils/logo.util.test.ts +1 -54
- package/src/brand-page/utils/logo.util.ts +0 -23
- package/src/brand-page-maker/components/ai-website-builder/AiWebsiteBuilder.vue +37 -2
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +1 -1
- package/src/brand-page-maker/components/quick-link-bar/RedoButton.vue +2 -24
- package/src/brand-page-maker/components/quick-link-bar/UndoButton.vue +2 -24
- package/src/brand-page-maker/components/quick-link-bar/undo-redo-buttons.test.ts +2 -36
- package/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.ts +3 -3
- package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +6 -32
- package/src/brand-page-maker/composables/useUndoRedoFlag.ts +13 -7
- package/src/brand-page-maker/stores/ai-thread/ai-website-builder-thread-store.ts +43 -0
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +0 -183
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +72 -84
- package/src/brand-page-maker/stores/history/history-store.test.ts +0 -85
- package/src/brand-page-maker/stores/history/history-store.ts +4 -31
- package/src/clients/ai-assistant-client.ts +1 -0
- package/src/shared/content-settings/components/GenericTextInput.mixin.ts +0 -37
- package/src/shared/content-settings/components/form-fields-field/FormFieldsField.mixin.ts +6 -9
- package/src/shared/content-settings/components/page-dropdown-field/PageDropdownField.vue +5 -10
- package/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.ts +7 -4
- package/src/shared/content-settings/components/text-field/TextField.vue +1 -2
- package/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.ts +0 -26
- package/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.ts +11 -19
- package/src/shared/content-settings/components/textarea-field/TextareaField.vue +1 -2
- package/src/shared/content-settings/models.ts +0 -11
- package/src/shared/content-settings/store/content-settings-store.test.ts +0 -278
- package/src/shared/content-settings/store/content-settings-store.ts +0 -64
- package/lib/src/metadata-builder/builders/reorder-pages-builder.d.ts +0 -13
- package/lib/src/metadata-builder/builders/reorder-pages-builder.js +0 -49
- package/src/metadata-builder/builders/reorder-pages-builder.ts +0 -80
- package/src/shared/content-settings/components/GenericTextInput.mixin.test.ts +0 -119
- package/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.test.ts +0 -149
|
@@ -30,20 +30,6 @@ export declare const calculateOptimizedLogoDimensions: (logoData: {
|
|
|
30
30
|
width: string;
|
|
31
31
|
height: string;
|
|
32
32
|
};
|
|
33
|
-
/**
|
|
34
|
-
* Resolves the "current" logo image from a brand-page MODEL (the raw,
|
|
35
|
-
* deserialized shape — not the live stores, whose contents are wrapped in
|
|
36
|
-
* `settings.content`).
|
|
37
|
-
*
|
|
38
|
-
* Brand-site keeps its logo in the page header; brand-page and brand-contact
|
|
39
|
-
* keep it as a logo CONTENT block on the home page — the same `isBrandSite ?
|
|
40
|
-
* header : content` split the logo-settings store getters/setter use. This is
|
|
41
|
-
* the single source of truth for model-level logo reads: initial load and
|
|
42
|
-
* history-restore both call it so the two paths can't drift. They previously
|
|
43
|
-
* hard-coded `=== brandPage`, which silently excluded brand-contact and read a
|
|
44
|
-
* stale header logo on undo.
|
|
45
|
-
*/
|
|
46
|
-
export declare const getLogoImageFromModel: (model: BrandPageModel) => LogoImageModel | undefined;
|
|
47
33
|
export declare const recalculateLogoContentDimensions: (pageData: any, editableLogoVariations: {
|
|
48
34
|
variationId: number;
|
|
49
35
|
width: number;
|
|
@@ -225,25 +225,6 @@ export const calculateOptimizedLogoDimensions = (logoData, currentWidth, current
|
|
|
225
225
|
}
|
|
226
226
|
return { width: currentWidth, height: currentHeight };
|
|
227
227
|
};
|
|
228
|
-
/**
|
|
229
|
-
* Resolves the "current" logo image from a brand-page MODEL (the raw,
|
|
230
|
-
* deserialized shape — not the live stores, whose contents are wrapped in
|
|
231
|
-
* `settings.content`).
|
|
232
|
-
*
|
|
233
|
-
* Brand-site keeps its logo in the page header; brand-page and brand-contact
|
|
234
|
-
* keep it as a logo CONTENT block on the home page — the same `isBrandSite ?
|
|
235
|
-
* header : content` split the logo-settings store getters/setter use. This is
|
|
236
|
-
* the single source of truth for model-level logo reads: initial load and
|
|
237
|
-
* history-restore both call it so the two paths can't drift. They previously
|
|
238
|
-
* hard-coded `=== brandPage`, which silently excluded brand-contact and read a
|
|
239
|
-
* stale header logo on undo.
|
|
240
|
-
*/
|
|
241
|
-
export const getLogoImageFromModel = (model) => {
|
|
242
|
-
if (model.brandPageType === BRAND_PAGE_TYPES.brandSite) {
|
|
243
|
-
return model.pageHeaderDesktop?.logoImage;
|
|
244
|
-
}
|
|
245
|
-
return model.pages?.[0]?.contents?.find(isLogoContent)?.logoImage;
|
|
246
|
-
};
|
|
247
228
|
export const recalculateLogoContentDimensions = async (pageData, editableLogoVariations, logoImage, isPrePurchase) => {
|
|
248
229
|
try {
|
|
249
230
|
let logoData;
|
|
@@ -118,7 +118,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
118
118
|
content: TContent;
|
|
119
119
|
}>(payload: P): Promise<void>;
|
|
120
120
|
_captureTemplateSwitchIfEnabled(): void;
|
|
121
|
-
applyHistorySnapshot(snapshot: import("@brand-page/models").BrandPageModel, activePageId?: string, logoEditsStr?: string
|
|
121
|
+
applyHistorySnapshot(snapshot: import("@brand-page/models").BrandPageModel, activePageId?: string, logoEditsStr?: string): Promise<void>;
|
|
122
122
|
_syncLogoSettingsFromSnapshot(snapshot: import("@brand-page/models").BrandPageModel, logoEditsStr?: string): Promise<void>;
|
|
123
123
|
_navigateToActivePage(activePageId?: string): void;
|
|
124
124
|
_fallbackSidebarIfSelectedContentMissing(snapshot: import("@brand-page/models").BrandPageModel): void;
|
|
@@ -163,7 +163,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
163
163
|
content: TContent;
|
|
164
164
|
}>(payload: P): Promise<void>;
|
|
165
165
|
_captureTemplateSwitchIfEnabled(): void;
|
|
166
|
-
applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel, activePageId?: string, logoEditsStr?: string
|
|
166
|
+
applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel, activePageId?: string, logoEditsStr?: string): Promise<void>;
|
|
167
167
|
_syncLogoSettingsFromSnapshot(snapshot: import("@brand-page").BrandPageModel, logoEditsStr?: string): Promise<void>;
|
|
168
168
|
_navigateToActivePage(activePageId?: string): void;
|
|
169
169
|
_fallbackSidebarIfSelectedContentMissing(snapshot: import("@brand-page").BrandPageModel): void;
|
|
@@ -843,15 +843,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
843
843
|
pushMode(item: import("@shared/content-settings/store").ContentSettingsModeStackItem): void;
|
|
844
844
|
resetMode(): void;
|
|
845
845
|
updateItemValue(payload: import("../../../shared/content-settings/models").UpdateItemValuePayload<unknown>): void;
|
|
846
|
-
updateMultipleItemValues({ id, name, value,
|
|
847
|
-
updateTextStyleType({ id, name, value,
|
|
848
|
-
updateTextStyles({ id, name, value,
|
|
846
|
+
updateMultipleItemValues({ id, name, value, }: import("../../../shared/content-settings/models").UpdateMultipleItemValuesPayload<any>): void;
|
|
847
|
+
updateTextStyleType({ id, name, value, }: import("../../../shared/content-settings/models").UpdateMultipleItemValuesPayload<any>): void;
|
|
848
|
+
updateTextStyles({ id, name, value, }: import("../../../shared/content-settings/models").UpdateMultipleItemValuesPayload<any>): void;
|
|
849
849
|
getTextStyles({ id, name }: {
|
|
850
850
|
id: string;
|
|
851
851
|
name: string;
|
|
852
852
|
}): unknown;
|
|
853
|
-
updateTextItemTextStyleType({ id, name, value, index,
|
|
854
|
-
updateTextItemTextStyleTypeWithStyles({ id, name, value, index,
|
|
853
|
+
updateTextItemTextStyleType({ id, name, value, index, }: import("../../../shared/content-settings/models").UpdateMultipleItemValuesPayload<any>): void;
|
|
854
|
+
updateTextItemTextStyleTypeWithStyles({ id, name, value, index, }: import("../../../shared/content-settings/models").UpdateMultipleItemValuesPayload<any>): void;
|
|
855
855
|
_setActiveCategoryTab({ activeCategoryTab, }: {
|
|
856
856
|
activeCategoryTab: import("@brand-page-maker/models").ItemCategory;
|
|
857
857
|
}): void;
|
|
@@ -196,7 +196,7 @@ export default defineComponent({
|
|
|
196
196
|
this.brandPageMakerStore.setIsBrandPageLoaded(true);
|
|
197
197
|
// Capture baseline for undo/redo when the feature is active for this
|
|
198
198
|
// session — see useUndoRedoFlag.ts for the gate (LaunchDarkly flag +
|
|
199
|
-
// non-admin maker
|
|
199
|
+
// brand-site + non-admin maker).
|
|
200
200
|
if (useUndoRedoFlag().value) {
|
|
201
201
|
useHistoryStore().captureBaseline();
|
|
202
202
|
}
|
|
@@ -107,7 +107,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
107
107
|
content: TContent;
|
|
108
108
|
}>(payload: P): Promise<void>;
|
|
109
109
|
_captureTemplateSwitchIfEnabled(): void;
|
|
110
|
-
applyHistorySnapshot(snapshot: import("../../../lib").BrandPageModel, activePageId?: string, logoEditsStr?: string
|
|
110
|
+
applyHistorySnapshot(snapshot: import("../../../lib").BrandPageModel, activePageId?: string, logoEditsStr?: string): Promise<void>;
|
|
111
111
|
_syncLogoSettingsFromSnapshot(snapshot: import("../../../lib").BrandPageModel, logoEditsStr?: string): Promise<void>;
|
|
112
112
|
_navigateToActivePage(activePageId?: string): void;
|
|
113
113
|
_fallbackSidebarIfSelectedContentMissing(snapshot: import("../../../lib").BrandPageModel): void;
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts
CHANGED
|
@@ -433,15 +433,15 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
433
433
|
pushMode(item: import("@shared/content-settings/store").ContentSettingsModeStackItem): void;
|
|
434
434
|
resetMode(): void;
|
|
435
435
|
updateItemValue(payload: import("@shared/content-settings/models").UpdateItemValuePayload<unknown>): void;
|
|
436
|
-
updateMultipleItemValues({ id, name, value,
|
|
437
|
-
updateTextStyleType({ id, name, value,
|
|
438
|
-
updateTextStyles({ id, name, value,
|
|
436
|
+
updateMultipleItemValues({ id, name, value, }: import("@shared/content-settings/models").UpdateMultipleItemValuesPayload<any>): void;
|
|
437
|
+
updateTextStyleType({ id, name, value, }: import("@shared/content-settings/models").UpdateMultipleItemValuesPayload<any>): void;
|
|
438
|
+
updateTextStyles({ id, name, value, }: import("@shared/content-settings/models").UpdateMultipleItemValuesPayload<any>): void;
|
|
439
439
|
getTextStyles({ id, name }: {
|
|
440
440
|
id: string;
|
|
441
441
|
name: string;
|
|
442
442
|
}): unknown;
|
|
443
|
-
updateTextItemTextStyleType({ id, name, value, index,
|
|
444
|
-
updateTextItemTextStyleTypeWithStyles({ id, name, value, index,
|
|
443
|
+
updateTextItemTextStyleType({ id, name, value, index, }: import("@shared/content-settings/models").UpdateMultipleItemValuesPayload<any>): void;
|
|
444
|
+
updateTextItemTextStyleTypeWithStyles({ id, name, value, index, }: import("@shared/content-settings/models").UpdateMultipleItemValuesPayload<any>): void;
|
|
445
445
|
_setActiveCategoryTab({ activeCategoryTab, }: {
|
|
446
446
|
activeCategoryTab: import("../../models").ItemCategory;
|
|
447
447
|
}): void;
|
|
@@ -626,7 +626,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
626
626
|
content: TContent;
|
|
627
627
|
}>(payload: P): Promise<void>;
|
|
628
628
|
_captureTemplateSwitchIfEnabled(): void;
|
|
629
|
-
applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel, activePageId?: string, logoEditsStr?: string
|
|
629
|
+
applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel, activePageId?: string, logoEditsStr?: string): Promise<void>;
|
|
630
630
|
_syncLogoSettingsFromSnapshot(snapshot: import("@brand-page").BrandPageModel, logoEditsStr?: string): Promise<void>;
|
|
631
631
|
_navigateToActivePage(activePageId?: string): void;
|
|
632
632
|
_fallbackSidebarIfSelectedContentMissing(snapshot: import("@brand-page").BrandPageModel): void;
|
|
@@ -1250,7 +1250,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
1250
1250
|
reset: () => void;
|
|
1251
1251
|
getCurrentSizeBytes: () => number;
|
|
1252
1252
|
getCurrentEntryCount: () => number;
|
|
1253
|
-
}, "reset" | "
|
|
1253
|
+
}, "reset" | "undo" | "redo" | "captureBaseline" | "capture" | "captureTemplateSwitch" | "captureAiChangeset" | "mergeNextMutation" | "getCurrentSizeBytes" | "getCurrentEntryCount">>;
|
|
1254
1254
|
}, {
|
|
1255
1255
|
isDraggingContent: boolean;
|
|
1256
1256
|
isContentSelected: boolean;
|
|
@@ -113,7 +113,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
113
113
|
content: TContent;
|
|
114
114
|
}>(payload: P): Promise<void>;
|
|
115
115
|
_captureTemplateSwitchIfEnabled(): void;
|
|
116
|
-
applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel, activePageId?: string, logoEditsStr?: string
|
|
116
|
+
applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel, activePageId?: string, logoEditsStr?: string): Promise<void>;
|
|
117
117
|
_syncLogoSettingsFromSnapshot(snapshot: import("../../../brand-page").BrandPageModel, logoEditsStr?: string): Promise<void>;
|
|
118
118
|
_navigateToActivePage(activePageId?: string): void;
|
|
119
119
|
_fallbackSidebarIfSelectedContentMissing(snapshot: import("../../../brand-page").BrandPageModel): void;
|
|
@@ -93,8 +93,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
93
93
|
default: undefined;
|
|
94
94
|
};
|
|
95
95
|
}>> & Readonly<{}>, {
|
|
96
|
-
runtimeEnvironment: string;
|
|
97
96
|
deviceMode: "desktop" | "mobile";
|
|
97
|
+
runtimeEnvironment: string;
|
|
98
98
|
}, {}, {
|
|
99
99
|
HelloBar: any;
|
|
100
100
|
BrandPageMakerPage: import("vue").DefineComponent<{}, {}, any>;
|
|
@@ -391,7 +391,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
391
391
|
content: TContent;
|
|
392
392
|
}>(payload: P): Promise<void>;
|
|
393
393
|
_captureTemplateSwitchIfEnabled(): void;
|
|
394
|
-
applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel, activePageId?: string, logoEditsStr?: string
|
|
394
|
+
applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel, activePageId?: string, logoEditsStr?: string): Promise<void>;
|
|
395
395
|
_syncLogoSettingsFromSnapshot(snapshot: import("../../../brand-page").BrandPageModel, logoEditsStr?: string): Promise<void>;
|
|
396
396
|
_navigateToActivePage(activePageId?: string): void;
|
|
397
397
|
_fallbackSidebarIfSelectedContentMissing(snapshot: import("../../../brand-page").BrandPageModel): void;
|
|
@@ -481,8 +481,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
481
481
|
"onUpdate-settings"?: ((...args: any[]) => any) | undefined;
|
|
482
482
|
}>, {
|
|
483
483
|
pageTitle: string;
|
|
484
|
-
designDraftToken: string;
|
|
485
484
|
brandPageType: string;
|
|
485
|
+
designDraftToken: string;
|
|
486
486
|
pageDescription: string;
|
|
487
487
|
isMaker: boolean;
|
|
488
488
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -392,7 +392,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
392
392
|
content: TContent;
|
|
393
393
|
}>(payload: P): Promise<void>;
|
|
394
394
|
_captureTemplateSwitchIfEnabled(): void;
|
|
395
|
-
applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel, activePageId?: string, logoEditsStr?: string
|
|
395
|
+
applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel, activePageId?: string, logoEditsStr?: string): Promise<void>;
|
|
396
396
|
_syncLogoSettingsFromSnapshot(snapshot: import("../../../brand-page").BrandPageModel, logoEditsStr?: string): Promise<void>;
|
|
397
397
|
_navigateToActivePage(activePageId?: string): void;
|
|
398
398
|
_fallbackSidebarIfSelectedContentMissing(snapshot: import("../../../brand-page").BrandPageModel): void;
|
|
@@ -123,7 +123,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
123
123
|
content: TContent;
|
|
124
124
|
}>(payload: P): Promise<void>;
|
|
125
125
|
_captureTemplateSwitchIfEnabled(): void;
|
|
126
|
-
applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel, activePageId?: string, logoEditsStr?: string
|
|
126
|
+
applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel, activePageId?: string, logoEditsStr?: string): Promise<void>;
|
|
127
127
|
_syncLogoSettingsFromSnapshot(snapshot: import("../../../brand-page").BrandPageModel, logoEditsStr?: string): Promise<void>;
|
|
128
128
|
_navigateToActivePage(activePageId?: string): void;
|
|
129
129
|
_fallbackSidebarIfSelectedContentMissing(snapshot: import("../../../brand-page").BrandPageModel): void;
|
|
@@ -441,7 +441,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
441
441
|
content: TContent;
|
|
442
442
|
}>(payload: P): Promise<void>;
|
|
443
443
|
_captureTemplateSwitchIfEnabled(): void;
|
|
444
|
-
applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel, activePageId?: string, logoEditsStr?: string
|
|
444
|
+
applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel, activePageId?: string, logoEditsStr?: string): Promise<void>;
|
|
445
445
|
_syncLogoSettingsFromSnapshot(snapshot: import("@brand-page").BrandPageModel, logoEditsStr?: string): Promise<void>;
|
|
446
446
|
_navigateToActivePage(activePageId?: string): void;
|
|
447
447
|
_fallbackSidebarIfSelectedContentMissing(snapshot: import("@brand-page").BrandPageModel): void;
|
|
@@ -331,7 +331,7 @@ export function useAiWebsiteBuilderChat() {
|
|
|
331
331
|
message,
|
|
332
332
|
websiteContext,
|
|
333
333
|
websiteSnapshot: snapshotStore.snapshotBase64 || undefined,
|
|
334
|
-
agentType:
|
|
334
|
+
agentType: aiThreadStore.selectedAgentType,
|
|
335
335
|
userPlan,
|
|
336
336
|
connectionId,
|
|
337
337
|
});
|
|
@@ -341,7 +341,7 @@ export function useAiWebsiteBuilderChat() {
|
|
|
341
341
|
message,
|
|
342
342
|
websiteContext,
|
|
343
343
|
websiteSnapshot: snapshotStore.snapshotBase64 || undefined,
|
|
344
|
-
agentType:
|
|
344
|
+
agentType: aiThreadStore.selectedAgentType,
|
|
345
345
|
userPlan,
|
|
346
346
|
connectionId,
|
|
347
347
|
});
|
|
@@ -74,6 +74,9 @@ export const useExternalRichTextEditor = () => {
|
|
|
74
74
|
};
|
|
75
75
|
export const useRichTextEditor = (model, props, emit, fontSettings, fontStyleDropdownRef, selectedGlobalTextStyles, onSelectTextStyleType, updateRichTextEditor, textStyleTypeOptions, markedText, isHyperlinkPopupOpen, selectedLinkTypeValue) => {
|
|
76
76
|
const historyStore = useHistoryStore();
|
|
77
|
+
// TipTap rehydrates and writes back canonical HTML on mount — fold
|
|
78
|
+
// that into the current head instead of pushing a phantom entry.
|
|
79
|
+
historyStore.mergeNextMutation();
|
|
77
80
|
const editor = new Editor({
|
|
78
81
|
content: model.value ?? '',
|
|
79
82
|
editable: !props.readOnly,
|
|
@@ -254,13 +257,6 @@ export const useRichTextEditor = (model, props, emit, fontSettings, fontStyleDro
|
|
|
254
257
|
}
|
|
255
258
|
});
|
|
256
259
|
editor.on('transaction', ({ transaction }) => {
|
|
257
|
-
// Style detection only makes sense for user styling — an unfocused
|
|
258
|
-
// editor's transactions are mount rehydration / programmatic setContent
|
|
259
|
-
// churn, and clearing textStyleType from those would push a phantom
|
|
260
|
-
// style write into the model (BP-5810 family).
|
|
261
|
-
if (!editor.isFocused) {
|
|
262
|
-
return;
|
|
263
|
-
}
|
|
264
260
|
if (isStyleChanged(transaction) && props.styles.textStyleType) {
|
|
265
261
|
onSelectTextStyleType({
|
|
266
262
|
label: 'None',
|
|
@@ -270,24 +266,7 @@ export const useRichTextEditor = (model, props, emit, fontSettings, fontStyleDro
|
|
|
270
266
|
// Update model when editor content changes
|
|
271
267
|
editor.on('update', () => {
|
|
272
268
|
const sanitizedData = sanitiseClientSideRTE(editor.getHTML());
|
|
273
|
-
|
|
274
|
-
// model back into its canonical HTML during mount rehydration or a
|
|
275
|
-
// programmatic setContent — not a user edit. Tag the emit so the write
|
|
276
|
-
// folds into the current undo head instead of pushing a phantom entry
|
|
277
|
-
// (BP-5810). The flag travels WITH the value through the debounced
|
|
278
|
-
// field → store chain and arms the history merge at the moment of the
|
|
279
|
-
// store write — arming here at emit time would lapse before the
|
|
280
|
-
// debounce fires. Genuine edits happen while focused and commit
|
|
281
|
-
// normally.
|
|
282
|
-
//
|
|
283
|
-
// Known limitation: a programmatic toolbar command run on an editor the
|
|
284
|
-
// user hasn't focused yet would also merge (losing that undo step). Today
|
|
285
|
-
// the RTE only mounts inside an already-open settings drawer and the user
|
|
286
|
-
// focuses it before formatting, so this doesn't occur — revisit if a
|
|
287
|
-
// consumer ever drives toolbar actions on an unfocused editor.
|
|
288
|
-
emit('update:modelValue', sanitizedData.sanitizedHtml, {
|
|
289
|
-
isHydrationWrite: !editor.isFocused,
|
|
290
|
-
});
|
|
269
|
+
emit('update:modelValue', sanitizedData.sanitizedHtml);
|
|
291
270
|
});
|
|
292
271
|
editor.on('selectionUpdate', () => {
|
|
293
272
|
// Skip while a history snapshot is being applied — `setContent` fires
|
|
@@ -368,11 +347,7 @@ export const useRichTextEditor = (model, props, emit, fontSettings, fontStyleDro
|
|
|
368
347
|
const globalStyles = selectedTextStyle ?? selectedGlobalTextStyles.value?.style;
|
|
369
348
|
const currentAlignment = editor.getAttributes(editor.state.selection.$anchor.node().type.name);
|
|
370
349
|
if (globalStyles) {
|
|
371
|
-
// sync content settings style
|
|
372
|
-
// edit. Flag it so the store folds it into the current undo head: this
|
|
373
|
-
// write lands ~100ms BEFORE the editor's canonical text write-back, and
|
|
374
|
-
// an unflagged write here would open a plain capture burst that
|
|
375
|
-
// swallows the flagged text write into a phantom entry (BP-5810).
|
|
350
|
+
// sync content settings style
|
|
376
351
|
contentSettingStore.updateTextStyles({
|
|
377
352
|
id: props.rawId,
|
|
378
353
|
name: props.name,
|
|
@@ -386,7 +361,6 @@ export const useRichTextEditor = (model, props, emit, fontSettings, fontStyleDro
|
|
|
386
361
|
lineHeight: globalStyles.lineHeight,
|
|
387
362
|
letterSpacing: globalStyles.letterSpacing,
|
|
388
363
|
},
|
|
389
|
-
isHydrationWrite: !editor.isFocused,
|
|
390
364
|
});
|
|
391
365
|
// sync toolbar editor styles
|
|
392
366
|
fontSettings.selectedFont = globalStyles?.fontFamily ?? 'Lato';
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { type ComputedRef } from 'vue';
|
|
2
2
|
/**
|
|
3
|
-
* Returns whether undo/redo is active for the current maker session.
|
|
4
|
-
* conditions must hold:
|
|
3
|
+
* Returns whether undo/redo is active for the current maker session. All
|
|
4
|
+
* three conditions must hold:
|
|
5
5
|
*
|
|
6
6
|
* 1. `userStore.features.canUseUndoRedo` is true. The flag is populated by
|
|
7
7
|
* the consumer (BrandCrowd.Net / web-renderer) via the
|
|
8
8
|
* `WebsiteDesignUserFeatures.CanUseUndoRedo` boolean on the ViewModel —
|
|
9
|
-
* same precedent as RichTextEditor / GettyVideos / AITextGenerator.
|
|
10
|
-
*
|
|
11
|
-
* brand-
|
|
12
|
-
*
|
|
9
|
+
* same precedent as RichTextEditor / GettyVideos / AITextGenerator.
|
|
10
|
+
* 2. The maker is a brand-site (Website Maker). V1 scope is brand-site
|
|
11
|
+
* only; brand-page (single-page profile) and brand-contact (vCard) are
|
|
12
|
+
* out of scope.
|
|
13
|
+
* 3. The session is NOT in admin-maker mode (`userStore.isAdmin`). The
|
|
13
14
|
* admin maker uses the same components but a different editing flow
|
|
14
15
|
* (template authoring) where undo/redo is out of scope.
|
|
15
16
|
*/
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
import { computed } from 'vue';
|
|
2
2
|
import { useBrandPageMakerUserStore } from '@brand-page-maker/stores/user';
|
|
3
|
+
import { useBrandPageMakerStore } from '@brand-page-maker/stores/brandpage-maker/brandpage-maker-store';
|
|
3
4
|
/**
|
|
4
|
-
* Returns whether undo/redo is active for the current maker session.
|
|
5
|
-
* conditions must hold:
|
|
5
|
+
* Returns whether undo/redo is active for the current maker session. All
|
|
6
|
+
* three conditions must hold:
|
|
6
7
|
*
|
|
7
8
|
* 1. `userStore.features.canUseUndoRedo` is true. The flag is populated by
|
|
8
9
|
* the consumer (BrandCrowd.Net / web-renderer) via the
|
|
9
10
|
* `WebsiteDesignUserFeatures.CanUseUndoRedo` boolean on the ViewModel —
|
|
10
|
-
* same precedent as RichTextEditor / GettyVideos / AITextGenerator.
|
|
11
|
-
*
|
|
12
|
-
* brand-
|
|
13
|
-
*
|
|
11
|
+
* same precedent as RichTextEditor / GettyVideos / AITextGenerator.
|
|
12
|
+
* 2. The maker is a brand-site (Website Maker). V1 scope is brand-site
|
|
13
|
+
* only; brand-page (single-page profile) and brand-contact (vCard) are
|
|
14
|
+
* out of scope.
|
|
15
|
+
* 3. The session is NOT in admin-maker mode (`userStore.isAdmin`). The
|
|
14
16
|
* admin maker uses the same components but a different editing flow
|
|
15
17
|
* (template authoring) where undo/redo is out of scope.
|
|
16
18
|
*/
|
|
17
19
|
export function useUndoRedoFlag() {
|
|
18
20
|
const userStore = useBrandPageMakerUserStore();
|
|
19
|
-
|
|
21
|
+
const brandPageMakerStore = useBrandPageMakerStore();
|
|
22
|
+
return computed(() => userStore.features.canUseUndoRedo &&
|
|
23
|
+
brandPageMakerStore.isBrandSite &&
|
|
24
|
+
!userStore.isAdmin);
|
|
20
25
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AiAssistantAgentType } from '../../../clients/ai-assistant-client';
|
|
1
2
|
export declare const useAiWebsiteBuilderThreadStore: import("pinia").StoreDefinition<"aiWebsiteBuilderThread", Pick<{
|
|
2
3
|
threadId: import("vue").Ref<string | null, string | null>;
|
|
3
4
|
runId: import("vue").Ref<string | null, string | null>;
|
|
@@ -8,7 +9,9 @@ export declare const useAiWebsiteBuilderThreadStore: import("pinia").StoreDefini
|
|
|
8
9
|
buildSectionsCompleted: import("vue").Ref<number, number>;
|
|
9
10
|
promptText: import("vue").Ref<string, string>;
|
|
10
11
|
stopGeneration: import("vue").Ref<(() => void) | null, (() => void) | null>;
|
|
11
|
-
|
|
12
|
+
selectedAgentType: import("vue").Ref<AiAssistantAgentType, AiAssistantAgentType>;
|
|
13
|
+
setSelectedAgentType: (type: AiAssistantAgentType) => void;
|
|
14
|
+
}, "threadId" | "runId" | "messages" | "isProcessing" | "buildId" | "isBuildInProgress" | "buildSectionsCompleted" | "promptText" | "stopGeneration" | "selectedAgentType">, Pick<{
|
|
12
15
|
threadId: import("vue").Ref<string | null, string | null>;
|
|
13
16
|
runId: import("vue").Ref<string | null, string | null>;
|
|
14
17
|
messages: import("vue").Ref<any[], any[]>;
|
|
@@ -18,6 +21,8 @@ export declare const useAiWebsiteBuilderThreadStore: import("pinia").StoreDefini
|
|
|
18
21
|
buildSectionsCompleted: import("vue").Ref<number, number>;
|
|
19
22
|
promptText: import("vue").Ref<string, string>;
|
|
20
23
|
stopGeneration: import("vue").Ref<(() => void) | null, (() => void) | null>;
|
|
24
|
+
selectedAgentType: import("vue").Ref<AiAssistantAgentType, AiAssistantAgentType>;
|
|
25
|
+
setSelectedAgentType: (type: AiAssistantAgentType) => void;
|
|
21
26
|
}, never>, Pick<{
|
|
22
27
|
threadId: import("vue").Ref<string | null, string | null>;
|
|
23
28
|
runId: import("vue").Ref<string | null, string | null>;
|
|
@@ -28,4 +33,6 @@ export declare const useAiWebsiteBuilderThreadStore: import("pinia").StoreDefini
|
|
|
28
33
|
buildSectionsCompleted: import("vue").Ref<number, number>;
|
|
29
34
|
promptText: import("vue").Ref<string, string>;
|
|
30
35
|
stopGeneration: import("vue").Ref<(() => void) | null, (() => void) | null>;
|
|
31
|
-
|
|
36
|
+
selectedAgentType: import("vue").Ref<AiAssistantAgentType, AiAssistantAgentType>;
|
|
37
|
+
setSelectedAgentType: (type: AiAssistantAgentType) => void;
|
|
38
|
+
}, "setSelectedAgentType">>;
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { defineStore } from 'pinia';
|
|
2
2
|
import { ref } from 'vue';
|
|
3
|
+
import { AI_ASSISTANT_AGENT_TYPES, } from '../../../clients/ai-assistant-client';
|
|
4
|
+
const AGENT_TYPE_STORAGE_KEY = 'bc-ai-website-builder-agent';
|
|
5
|
+
const isLocalStorage = () => typeof window !== 'undefined' && typeof window.localStorage !== 'undefined';
|
|
6
|
+
const getStoredAgentType = () => {
|
|
7
|
+
if (isLocalStorage()) {
|
|
8
|
+
const stored = window.localStorage.getItem(AGENT_TYPE_STORAGE_KEY);
|
|
9
|
+
if (stored === AI_ASSISTANT_AGENT_TYPES.WEBSITE_BUILDER ||
|
|
10
|
+
stored === AI_ASSISTANT_AGENT_TYPES.WEBSITE_BUILDER_V2) {
|
|
11
|
+
return stored;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return AI_ASSISTANT_AGENT_TYPES.WEBSITE_BUILDER;
|
|
15
|
+
};
|
|
3
16
|
export const useAiWebsiteBuilderThreadStore = defineStore('aiWebsiteBuilderThread', () => {
|
|
4
17
|
const threadId = ref(null);
|
|
5
18
|
const runId = ref(null);
|
|
@@ -10,6 +23,20 @@ export const useAiWebsiteBuilderThreadStore = defineStore('aiWebsiteBuilderThrea
|
|
|
10
23
|
const buildSectionsCompleted = ref(0);
|
|
11
24
|
const promptText = ref('');
|
|
12
25
|
const stopGeneration = ref(null);
|
|
26
|
+
const selectedAgentType = ref(getStoredAgentType());
|
|
27
|
+
const setSelectedAgentType = (type) => {
|
|
28
|
+
selectedAgentType.value = type;
|
|
29
|
+
if (isLocalStorage()) {
|
|
30
|
+
window.localStorage.setItem(AGENT_TYPE_STORAGE_KEY, type);
|
|
31
|
+
}
|
|
32
|
+
// Reset thread state — V1/V2 threads are not interchangeable
|
|
33
|
+
threadId.value = null;
|
|
34
|
+
runId.value = null;
|
|
35
|
+
messages.value = [];
|
|
36
|
+
buildId.value = null;
|
|
37
|
+
isBuildInProgress.value = false;
|
|
38
|
+
buildSectionsCompleted.value = 0;
|
|
39
|
+
};
|
|
13
40
|
return {
|
|
14
41
|
threadId,
|
|
15
42
|
runId,
|
|
@@ -20,5 +47,7 @@ export const useAiWebsiteBuilderThreadStore = defineStore('aiWebsiteBuilderThrea
|
|
|
20
47
|
buildSectionsCompleted,
|
|
21
48
|
promptText,
|
|
22
49
|
stopGeneration,
|
|
50
|
+
selectedAgentType,
|
|
51
|
+
setSelectedAgentType,
|
|
23
52
|
};
|
|
24
53
|
});
|
|
@@ -211,7 +211,7 @@ export declare const useBrandPageMakerStore: import("pinia").StoreDefinition<"br
|
|
|
211
211
|
* feature flag is on — see `BrandPageMaker.mixin.ts`).
|
|
212
212
|
*/
|
|
213
213
|
_captureTemplateSwitchIfEnabled(): void;
|
|
214
|
-
applyHistorySnapshot(snapshot: BrandPageModel, activePageId?: string, logoEditsStr?: string
|
|
214
|
+
applyHistorySnapshot(snapshot: BrandPageModel, activePageId?: string, logoEditsStr?: string): Promise<void>;
|
|
215
215
|
_syncLogoSettingsFromSnapshot(snapshot: BrandPageModel, logoEditsStr?: string): Promise<void>;
|
|
216
216
|
/**
|
|
217
217
|
* Restore the active page after a history apply. The id passed in is
|