@designcrowd/library.brand-page 6.0.25 → 6.0.26
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-CS3ct0wa.js → CreatedOnBrandCrowd-de-de-DU6YEVcW.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-CmBcnDu6.js → CreatedOnBrandCrowd-en-us-DNWWK6Tj.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-BdTuJtqV.js → CreatedOnBrandCrowd-es-es-DVFvV9Qp.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-Cx_H9X6l.js → CreatedOnBrandCrowd-fr-ca-B4ZkjNdw.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-Cx_H9X6l.js → CreatedOnBrandCrowd-fr-fr-B4ZkjNdw.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-BZZ9hjUi.js → CreatedOnBrandCrowd-pt-br-DP7AQGgW.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-BZZ9hjUi.js → CreatedOnBrandCrowd-pt-pt-DP7AQGgW.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-SbONDQN1.js → CreatedOnDcom-de-de-CaC3GtG9.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-Beno1_gw.js → CreatedOnDcom-en-us-D16yT0-P.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-BBE_zdRu.js → CreatedOnDcom-es-es-DA5sHgD_.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-C6pgDB5x.js → CreatedOnDcom-fr-ca-CDv2SG1-.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-FD1eqtg3.js → CreatedOnDcom-fr-fr-Cygc7c5d.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-BiSx3OwM.js → CreatedOnDcom-pt-br-B_3RIzgF.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-Dn4DmKGA.js → CreatedOnDcom-pt-pt-Bz5w-rrD.js} +1 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.js +21 -9
- package/lib/src/brand-page-maker/stores/ai-thread/ai-website-builder-thread-store.d.ts +8 -2
- package/lib/src/brand-page-maker/stores/ai-thread/ai-website-builder-thread-store.js +20 -0
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +7 -0
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-BVHFYSLL.js → lib-6_P6kXPu.js} +13710 -13701
- package/lib/src/shared/content-settings/components/GenericTextInput.mixin.d.ts +2 -2
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/email-field/EmailField.mixin.d.ts +2 -2
- package/lib/src/shared/content-settings/components/radio-field/RadioField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/slider-field/SliderField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/tel-field/TelField.mixin.d.ts +2 -2
- package/lib/src/shared/content-settings/components/text-field/TextField.mixin.d.ts +2 -2
- package/lib/src/shared/content-settings/components/textarea-field/TextareaField.mixin.d.ts +2 -2
- package/lib/src/shared/content-settings/components/url-field/UrlField.mixin.d.ts +2 -2
- package/lib/src/shared/content-settings/components/youtube-video-field/YoutubeVideoField.mixin.d.ts +2 -2
- package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +1 -1
- package/package.json +1 -1
- package/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.ts +28 -9
- package/src/brand-page-maker/stores/ai-thread/ai-website-builder-thread-store.ts +23 -0
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +8 -0
|
@@ -185,12 +185,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
185
185
|
}>, {
|
|
186
186
|
index: number;
|
|
187
187
|
settings: ContentItemFieldSettings;
|
|
188
|
-
|
|
188
|
+
value: string | false | undefined;
|
|
189
189
|
styles: Record<string, any>;
|
|
190
|
+
role: string;
|
|
190
191
|
placeholder: string;
|
|
191
192
|
minLength: number;
|
|
192
193
|
maxLength: number;
|
|
193
|
-
value: string | false | undefined;
|
|
194
194
|
attrs: Record<string, any>;
|
|
195
195
|
isRequired: boolean;
|
|
196
196
|
isToggled: boolean;
|
package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ interface CategoryTab {
|
|
|
6
6
|
label: string;
|
|
7
7
|
}
|
|
8
8
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
9
|
-
mode: import("vue").ComputedRef<"images" | "
|
|
9
|
+
mode: import("vue").ComputedRef<"images" | "add" | "pages" | "edit" | "focusedContentItem">;
|
|
10
10
|
pages: import("vue").ComputedRef<{
|
|
11
11
|
id: string;
|
|
12
12
|
title: string;
|
|
@@ -34,7 +34,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
34
34
|
selectedItemIndex: import("vue").ComputedRef<number | null>;
|
|
35
35
|
selectedItemValue: import("vue").ComputedRef<string | null>;
|
|
36
36
|
contentType: import("vue").ComputedRef<"website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section" | undefined>;
|
|
37
|
-
mode: import("vue").ComputedRef<"images" | "
|
|
37
|
+
mode: import("vue").ComputedRef<"images" | "add" | "pages" | "edit" | "focusedContentItem">;
|
|
38
38
|
isAdmin: import("vue").ComputedRef<boolean>;
|
|
39
39
|
contentSettingsStore: import("pinia").Store<"uiContentSettings", import("../../store").ContentSettingsState, {
|
|
40
40
|
contentErrorCount(): number;
|
|
@@ -182,12 +182,12 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import
|
|
|
182
182
|
}>, {
|
|
183
183
|
index: number;
|
|
184
184
|
settings: import("../../models").ContentItemFieldSettings;
|
|
185
|
-
|
|
185
|
+
value: string | false | undefined;
|
|
186
186
|
styles: Record<string, any>;
|
|
187
|
+
role: string;
|
|
187
188
|
placeholder: string;
|
|
188
189
|
minLength: number;
|
|
189
190
|
maxLength: number;
|
|
190
|
-
value: string | false | undefined;
|
|
191
191
|
attrs: Record<string, any>;
|
|
192
192
|
isRequired: boolean;
|
|
193
193
|
isToggled: boolean;
|
|
@@ -107,9 +107,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
107
107
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
108
108
|
}>, {
|
|
109
109
|
fields: Record<string, MultiFieldOption>;
|
|
110
|
+
value: string | boolean | Record<string, any>;
|
|
110
111
|
placeholder: string;
|
|
111
112
|
variant: string;
|
|
112
|
-
value: string | boolean | Record<string, any>;
|
|
113
113
|
multiple: boolean;
|
|
114
114
|
optionsConvertor: OptionsConvertor<unknown>;
|
|
115
115
|
isRequired: boolean;
|
|
@@ -69,9 +69,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
69
69
|
}>> & Readonly<{
|
|
70
70
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
71
71
|
}>, {
|
|
72
|
+
value: string;
|
|
72
73
|
minLength: number;
|
|
73
74
|
maxLength: number;
|
|
74
75
|
valueConvertor: ValueConvertor<BrandPageCssStyle, number, BrandPageCssStyle>;
|
|
75
|
-
value: string;
|
|
76
76
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
77
77
|
export default _default;
|
|
@@ -182,12 +182,12 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import
|
|
|
182
182
|
}>, {
|
|
183
183
|
index: number;
|
|
184
184
|
settings: import("../../models").ContentItemFieldSettings;
|
|
185
|
-
|
|
185
|
+
value: string | false | undefined;
|
|
186
186
|
styles: Record<string, any>;
|
|
187
|
+
role: string;
|
|
187
188
|
placeholder: string;
|
|
188
189
|
minLength: number;
|
|
189
190
|
maxLength: number;
|
|
190
|
-
value: string | false | undefined;
|
|
191
191
|
attrs: Record<string, any>;
|
|
192
192
|
isRequired: boolean;
|
|
193
193
|
isToggled: boolean;
|
|
@@ -182,12 +182,12 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import
|
|
|
182
182
|
}>, {
|
|
183
183
|
index: number;
|
|
184
184
|
settings: import("../../models").ContentItemFieldSettings;
|
|
185
|
-
|
|
185
|
+
value: string | false | undefined;
|
|
186
186
|
styles: Record<string, any>;
|
|
187
|
+
role: string;
|
|
187
188
|
placeholder: string;
|
|
188
189
|
minLength: number;
|
|
189
190
|
maxLength: number;
|
|
190
|
-
value: string | false | undefined;
|
|
191
191
|
attrs: Record<string, any>;
|
|
192
192
|
isRequired: boolean;
|
|
193
193
|
isToggled: boolean;
|
|
@@ -196,12 +196,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
196
196
|
}>, {
|
|
197
197
|
index: number;
|
|
198
198
|
settings: import("../../models").ContentItemFieldSettings;
|
|
199
|
-
|
|
199
|
+
value: string | false | undefined;
|
|
200
200
|
styles: Record<string, any>;
|
|
201
|
+
role: string;
|
|
201
202
|
placeholder: string;
|
|
202
203
|
minLength: number;
|
|
203
204
|
maxLength: number;
|
|
204
|
-
value: string | false | undefined;
|
|
205
205
|
attrs: Record<string, any>;
|
|
206
206
|
isRequired: boolean;
|
|
207
207
|
isToggled: boolean;
|
|
@@ -189,12 +189,12 @@ declare const _default: import("vue").DefineComponent<{}, {}, Record<string, any
|
|
|
189
189
|
}>, {
|
|
190
190
|
index: number;
|
|
191
191
|
settings: import("../../models").ContentItemFieldSettings;
|
|
192
|
-
|
|
192
|
+
value: string | false | undefined;
|
|
193
193
|
styles: Record<string, any>;
|
|
194
|
+
role: string;
|
|
194
195
|
placeholder: string;
|
|
195
196
|
minLength: number;
|
|
196
197
|
maxLength: number;
|
|
197
|
-
value: string | false | undefined;
|
|
198
198
|
attrs: Record<string, any>;
|
|
199
199
|
isRequired: boolean;
|
|
200
200
|
isToggled: boolean;
|
package/lib/src/shared/content-settings/components/youtube-video-field/YoutubeVideoField.mixin.d.ts
CHANGED
|
@@ -185,12 +185,12 @@ declare const _default: import("vue").DefineComponent<{}, {}, Record<string, any
|
|
|
185
185
|
}>, {
|
|
186
186
|
index: number;
|
|
187
187
|
settings: import("../../models").ContentItemFieldSettings;
|
|
188
|
-
|
|
188
|
+
value: string | false | undefined;
|
|
189
189
|
styles: Record<string, any>;
|
|
190
|
+
role: string;
|
|
190
191
|
placeholder: string;
|
|
191
192
|
minLength: number;
|
|
192
193
|
maxLength: number;
|
|
193
|
-
value: string | false | undefined;
|
|
194
194
|
attrs: Record<string, any>;
|
|
195
195
|
isRequired: boolean;
|
|
196
196
|
isToggled: boolean;
|
|
@@ -286,7 +286,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
286
286
|
}[]>;
|
|
287
287
|
selectedTabName: import("vue").ComputedRef<string>;
|
|
288
288
|
isAdmin: import("vue").ComputedRef<boolean>;
|
|
289
|
-
contentSettingsMode: import("vue").ComputedRef<"images" | "
|
|
289
|
+
contentSettingsMode: import("vue").ComputedRef<"images" | "add" | "pages" | "edit" | "focusedContentItem">;
|
|
290
290
|
contentSettingsSelectedItemId: import("vue").ComputedRef<string | null>;
|
|
291
291
|
sideBarStore: import("pinia").Store<"uiSideBar", import("../store").SideBarState, {}, {
|
|
292
292
|
setBrandPageSettingsTabVisibility(payload: {
|
package/package.json
CHANGED
|
@@ -70,19 +70,20 @@ export function useAiWebsiteBuilderChat(): UseAiChatResult {
|
|
|
70
70
|
const checkpointStore = useAiCheckpointStore();
|
|
71
71
|
const eventTracker = useEventTracker();
|
|
72
72
|
|
|
73
|
+
const createWelcomeMessage = (): TextThreadMessage =>
|
|
74
|
+
({
|
|
75
|
+
id: '1',
|
|
76
|
+
type: 'text',
|
|
77
|
+
role: 'agent',
|
|
78
|
+
text: 'What changes would you like to make to your website?',
|
|
79
|
+
timestamp: new Date(),
|
|
80
|
+
}) as TextThreadMessage;
|
|
81
|
+
|
|
73
82
|
const hasStoredMessages = aiThreadStore.messages.length > 0;
|
|
74
83
|
const threadItems = ref<ThreadMessage[]>(
|
|
75
84
|
aiThreadStore.messages.length > 0
|
|
76
85
|
? aiThreadStore.messages
|
|
77
|
-
: [
|
|
78
|
-
{
|
|
79
|
-
id: '1',
|
|
80
|
-
type: 'text',
|
|
81
|
-
role: 'agent',
|
|
82
|
-
text: 'What changes would you like to make to your website?',
|
|
83
|
-
timestamp: new Date(),
|
|
84
|
-
} as TextThreadMessage,
|
|
85
|
-
],
|
|
86
|
+
: [createWelcomeMessage()],
|
|
86
87
|
);
|
|
87
88
|
|
|
88
89
|
// ---------------------------------------------------------------------------
|
|
@@ -148,6 +149,24 @@ export function useAiWebsiteBuilderChat(): UseAiChatResult {
|
|
|
148
149
|
const generatedText = ref<string | null>(null);
|
|
149
150
|
const generatedStyle = ref<BrandPageCssStyle | null>(null);
|
|
150
151
|
|
|
152
|
+
// External reset (e.g. template switch, BP-5896): tear down the build WS
|
|
153
|
+
// client so a late push can't repopulate the fresh thread, then re-seed
|
|
154
|
+
// the welcome bubble. Keyed off `resetToken` — NOT `messages` — to avoid
|
|
155
|
+
// looping with the deep `threadItems` → `messages` watch above.
|
|
156
|
+
watch(
|
|
157
|
+
() => aiThreadStore.resetToken,
|
|
158
|
+
() => {
|
|
159
|
+
if (activeBuildWsClient) {
|
|
160
|
+
activeBuildWsClient.disconnect();
|
|
161
|
+
activeBuildWsClient = null;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
currentTypingMessageId.value = null;
|
|
165
|
+
isStopped.value = false;
|
|
166
|
+
threadItems.value = [createWelcomeMessage()];
|
|
167
|
+
},
|
|
168
|
+
);
|
|
169
|
+
|
|
151
170
|
const SERVICE_UNAVAILABLE_MESSAGE =
|
|
152
171
|
'This service is not available right now. Please try again later.';
|
|
153
172
|
|
|
@@ -14,6 +14,27 @@ export const useAiWebsiteBuilderThreadStore = defineStore(
|
|
|
14
14
|
const promptText = ref<string>('');
|
|
15
15
|
const stopGeneration = ref<(() => void) | null>(null);
|
|
16
16
|
|
|
17
|
+
// Bumped on every reset so consumers (useAiWebsiteBuilderChat) can react
|
|
18
|
+
// without watching `messages`, which would loop with its own deep watch.
|
|
19
|
+
const resetToken = ref<number>(0);
|
|
20
|
+
|
|
21
|
+
const reset = () => {
|
|
22
|
+
if (isProcessing.value || isBuildInProgress.value) {
|
|
23
|
+
stopGeneration.value?.();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
threadId.value = null;
|
|
27
|
+
runId.value = null;
|
|
28
|
+
messages.value = [];
|
|
29
|
+
isProcessing.value = false;
|
|
30
|
+
buildId.value = null;
|
|
31
|
+
isBuildInProgress.value = false;
|
|
32
|
+
buildSectionsCompleted.value = 0;
|
|
33
|
+
promptText.value = '';
|
|
34
|
+
stopGeneration.value = null;
|
|
35
|
+
resetToken.value += 1;
|
|
36
|
+
};
|
|
37
|
+
|
|
17
38
|
return {
|
|
18
39
|
threadId,
|
|
19
40
|
runId,
|
|
@@ -24,6 +45,8 @@ export const useAiWebsiteBuilderThreadStore = defineStore(
|
|
|
24
45
|
buildSectionsCompleted,
|
|
25
46
|
promptText,
|
|
26
47
|
stopGeneration,
|
|
48
|
+
resetToken,
|
|
49
|
+
reset,
|
|
27
50
|
};
|
|
28
51
|
},
|
|
29
52
|
);
|
|
@@ -30,6 +30,8 @@ import type {
|
|
|
30
30
|
TemplateCategory,
|
|
31
31
|
} from '@shared/template-settings/models';
|
|
32
32
|
import { useBrandPageMakerUserStore } from '../user';
|
|
33
|
+
import { useAiWebsiteBuilderThreadStore } from '../ai-thread/ai-website-builder-thread-store';
|
|
34
|
+
import { useAiCheckpointStore } from '../ai-checkpoint/ai-checkpoint-store';
|
|
33
35
|
import { defineStore } from 'pinia';
|
|
34
36
|
import { toRaw } from 'vue';
|
|
35
37
|
import { useUiStore } from '../ui';
|
|
@@ -620,6 +622,12 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
620
622
|
|
|
621
623
|
await this.recalculateLogoSizes(true);
|
|
622
624
|
|
|
625
|
+
// A template switch invalidates the AI conversation — the server-side
|
|
626
|
+
// thread's history still describes the previous template (BP-5896).
|
|
627
|
+
// reset() also stops any in-flight generation before clearing.
|
|
628
|
+
useAiWebsiteBuilderThreadStore().reset();
|
|
629
|
+
useAiCheckpointStore().clearAll();
|
|
630
|
+
|
|
623
631
|
this.setIsModifiedAfterTemplateApplied({
|
|
624
632
|
isModified: false,
|
|
625
633
|
});
|