@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
|
@@ -59,7 +59,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
59
59
|
selectedTabName: import("vue").ComputedRef<string>;
|
|
60
60
|
isAdmin: import("vue").ComputedRef<boolean>;
|
|
61
61
|
contentErrorCount: import("vue").ComputedRef<number>;
|
|
62
|
-
mode: import("vue").ComputedRef<"images" | "
|
|
62
|
+
mode: import("vue").ComputedRef<"images" | "add" | "pages" | "edit" | "focusedContentItem">;
|
|
63
63
|
brandPageMakerStore: import("pinia").Store<"brandPageMaker", import("@brand-page-maker/stores").BrandPageMakerState, {
|
|
64
64
|
contentErrorCount(): number;
|
|
65
65
|
brandPageBaseUrl(): string;
|
|
@@ -480,9 +480,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
480
480
|
}>> & Readonly<{
|
|
481
481
|
"onUpdate-settings"?: ((...args: any[]) => any) | undefined;
|
|
482
482
|
}>, {
|
|
483
|
+
brandPageType: string;
|
|
483
484
|
pageTitle: string;
|
|
484
485
|
designDraftToken: string;
|
|
485
|
-
brandPageType: string;
|
|
486
486
|
pageDescription: string;
|
|
487
487
|
isMaker: boolean;
|
|
488
488
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -36,18 +36,17 @@ export function useAiWebsiteBuilderChat() {
|
|
|
36
36
|
const aiMetadataBuilder = useAiMetadataBuilder(aiLogger);
|
|
37
37
|
const checkpointStore = useAiCheckpointStore();
|
|
38
38
|
const eventTracker = useEventTracker();
|
|
39
|
+
const createWelcomeMessage = () => ({
|
|
40
|
+
id: '1',
|
|
41
|
+
type: 'text',
|
|
42
|
+
role: 'agent',
|
|
43
|
+
text: 'What changes would you like to make to your website?',
|
|
44
|
+
timestamp: new Date(),
|
|
45
|
+
});
|
|
39
46
|
const hasStoredMessages = aiThreadStore.messages.length > 0;
|
|
40
47
|
const threadItems = ref(aiThreadStore.messages.length > 0
|
|
41
48
|
? aiThreadStore.messages
|
|
42
|
-
: [
|
|
43
|
-
{
|
|
44
|
-
id: '1',
|
|
45
|
-
type: 'text',
|
|
46
|
-
role: 'agent',
|
|
47
|
-
text: 'What changes would you like to make to your website?',
|
|
48
|
-
timestamp: new Date(),
|
|
49
|
-
},
|
|
50
|
-
]);
|
|
49
|
+
: [createWelcomeMessage()]);
|
|
51
50
|
// ---------------------------------------------------------------------------
|
|
52
51
|
// Undo snapshot lifecycle (WL9) — reuses the existing `checkpointStore`,
|
|
53
52
|
// which stores pre-prompt BrandPageModel snapshots keyed by user message id.
|
|
@@ -100,6 +99,19 @@ export function useAiWebsiteBuilderChat() {
|
|
|
100
99
|
const isStopped = ref(false);
|
|
101
100
|
const generatedText = ref(null);
|
|
102
101
|
const generatedStyle = ref(null);
|
|
102
|
+
// External reset (e.g. template switch, BP-5896): tear down the build WS
|
|
103
|
+
// client so a late push can't repopulate the fresh thread, then re-seed
|
|
104
|
+
// the welcome bubble. Keyed off `resetToken` — NOT `messages` — to avoid
|
|
105
|
+
// looping with the deep `threadItems` → `messages` watch above.
|
|
106
|
+
watch(() => aiThreadStore.resetToken, () => {
|
|
107
|
+
if (activeBuildWsClient) {
|
|
108
|
+
activeBuildWsClient.disconnect();
|
|
109
|
+
activeBuildWsClient = null;
|
|
110
|
+
}
|
|
111
|
+
currentTypingMessageId.value = null;
|
|
112
|
+
isStopped.value = false;
|
|
113
|
+
threadItems.value = [createWelcomeMessage()];
|
|
114
|
+
});
|
|
103
115
|
const SERVICE_UNAVAILABLE_MESSAGE = 'This service is not available right now. Please try again later.';
|
|
104
116
|
const addServiceUnavailableBubble = () => {
|
|
105
117
|
threadItems.value.push({
|
|
@@ -8,7 +8,9 @@ export declare const useAiWebsiteBuilderThreadStore: import("pinia").StoreDefini
|
|
|
8
8
|
buildSectionsCompleted: import("vue").Ref<number, number>;
|
|
9
9
|
promptText: import("vue").Ref<string, string>;
|
|
10
10
|
stopGeneration: import("vue").Ref<(() => void) | null, (() => void) | null>;
|
|
11
|
-
|
|
11
|
+
resetToken: import("vue").Ref<number, number>;
|
|
12
|
+
reset: () => void;
|
|
13
|
+
}, "threadId" | "runId" | "messages" | "isProcessing" | "buildId" | "isBuildInProgress" | "buildSectionsCompleted" | "promptText" | "stopGeneration" | "resetToken">, Pick<{
|
|
12
14
|
threadId: import("vue").Ref<string | null, string | null>;
|
|
13
15
|
runId: import("vue").Ref<string | null, string | null>;
|
|
14
16
|
messages: import("vue").Ref<any[], any[]>;
|
|
@@ -18,6 +20,8 @@ export declare const useAiWebsiteBuilderThreadStore: import("pinia").StoreDefini
|
|
|
18
20
|
buildSectionsCompleted: import("vue").Ref<number, number>;
|
|
19
21
|
promptText: import("vue").Ref<string, string>;
|
|
20
22
|
stopGeneration: import("vue").Ref<(() => void) | null, (() => void) | null>;
|
|
23
|
+
resetToken: import("vue").Ref<number, number>;
|
|
24
|
+
reset: () => void;
|
|
21
25
|
}, never>, Pick<{
|
|
22
26
|
threadId: import("vue").Ref<string | null, string | null>;
|
|
23
27
|
runId: import("vue").Ref<string | null, string | null>;
|
|
@@ -28,4 +32,6 @@ export declare const useAiWebsiteBuilderThreadStore: import("pinia").StoreDefini
|
|
|
28
32
|
buildSectionsCompleted: import("vue").Ref<number, number>;
|
|
29
33
|
promptText: import("vue").Ref<string, string>;
|
|
30
34
|
stopGeneration: import("vue").Ref<(() => void) | null, (() => void) | null>;
|
|
31
|
-
|
|
35
|
+
resetToken: import("vue").Ref<number, number>;
|
|
36
|
+
reset: () => void;
|
|
37
|
+
}, "reset">>;
|
|
@@ -10,6 +10,24 @@ export const useAiWebsiteBuilderThreadStore = defineStore('aiWebsiteBuilderThrea
|
|
|
10
10
|
const buildSectionsCompleted = ref(0);
|
|
11
11
|
const promptText = ref('');
|
|
12
12
|
const stopGeneration = ref(null);
|
|
13
|
+
// Bumped on every reset so consumers (useAiWebsiteBuilderChat) can react
|
|
14
|
+
// without watching `messages`, which would loop with its own deep watch.
|
|
15
|
+
const resetToken = ref(0);
|
|
16
|
+
const reset = () => {
|
|
17
|
+
if (isProcessing.value || isBuildInProgress.value) {
|
|
18
|
+
stopGeneration.value?.();
|
|
19
|
+
}
|
|
20
|
+
threadId.value = null;
|
|
21
|
+
runId.value = null;
|
|
22
|
+
messages.value = [];
|
|
23
|
+
isProcessing.value = false;
|
|
24
|
+
buildId.value = null;
|
|
25
|
+
isBuildInProgress.value = false;
|
|
26
|
+
buildSectionsCompleted.value = 0;
|
|
27
|
+
promptText.value = '';
|
|
28
|
+
stopGeneration.value = null;
|
|
29
|
+
resetToken.value += 1;
|
|
30
|
+
};
|
|
13
31
|
return {
|
|
14
32
|
threadId,
|
|
15
33
|
runId,
|
|
@@ -20,5 +38,7 @@ export const useAiWebsiteBuilderThreadStore = defineStore('aiWebsiteBuilderThrea
|
|
|
20
38
|
buildSectionsCompleted,
|
|
21
39
|
promptText,
|
|
22
40
|
stopGeneration,
|
|
41
|
+
resetToken,
|
|
42
|
+
reset,
|
|
23
43
|
};
|
|
24
44
|
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { EMPTY_LOGO_IMAGE_MODEL, SENSITIVE_CONTENT_TYPES, TEXT_STYLE_TYPES, VIEWPORTS, } from '@brand-page';
|
|
2
2
|
import { BackgroundStyles, BRAND_PAGE_TYPES, BrandPageModel, CONTENT_TYPES, NavigationDesktop, NavigationMobile, } from '@brand-page';
|
|
3
3
|
import { useBrandPageMakerUserStore } from '../user';
|
|
4
|
+
import { useAiWebsiteBuilderThreadStore } from '../ai-thread/ai-website-builder-thread-store';
|
|
5
|
+
import { useAiCheckpointStore } from '../ai-checkpoint/ai-checkpoint-store';
|
|
4
6
|
import { defineStore } from 'pinia';
|
|
5
7
|
import { toRaw } from 'vue';
|
|
6
8
|
import { useUiStore } from '../ui';
|
|
@@ -353,6 +355,11 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
353
355
|
backgroundStyles: brandPageModel.styles.backgroundStyles,
|
|
354
356
|
});
|
|
355
357
|
await this.recalculateLogoSizes(true);
|
|
358
|
+
// A template switch invalidates the AI conversation — the server-side
|
|
359
|
+
// thread's history still describes the previous template (BP-5896).
|
|
360
|
+
// reset() also stops any in-flight generation before clearing.
|
|
361
|
+
useAiWebsiteBuilderThreadStore().reset();
|
|
362
|
+
useAiCheckpointStore().clearAll();
|
|
356
363
|
this.setIsModifiedAfterTemplateApplied({
|
|
357
364
|
isModified: false,
|
|
358
365
|
});
|
package/lib/src/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as T, a as E, b as s, c as I, d as S, e as N, f as e, B as A, g as O, h as C, i as t, j as G, k as D, l as P, m as R, n as o, o as L, p as M, q as r, r as n, s as b, t as l, u as F, v as i, w as g, x as c, y as B, z as Y, C as U, D as d, E as u, F as H, G as p, H as y, I as m, J as K, K as k, L as V, M as X, N as v, O as h, P as f, Q as x, R as W, S as z, T as w, U as Z, V as j, W as q, X as J, Y as Q, Z as $, $ as aa, a0 as _a, a1 as Ta, a2 as Ea, a3 as sa, a4 as Ia, a5 as Sa, a6 as Na, a7 as ea, a8 as Aa, a9 as Oa, aa as Ca, ab as ta, ac as Ga, ad as Da, ae as Pa, af as Ra, ag as oa, ah as La, ai as Ma, aj as ra, ak as na, al as ba, am as la, an as Fa, ao as ia, ap as ga, aq as ca, ar as Ba, as as Ya, at as Ua, au as da, av as ua, aw as Ha, ax as pa, ay as ya, az as ma, aA as Ka, aB as ka, aC as Va, aD as Xa, aE as va, aF as ha, aG as fa, aH as xa, aI as Wa, aJ as za, aK as wa, aL as Za, aM as ja, aN as qa, aO as Ja, aP as Qa, aQ as $a, aR as a_, aS as __, aT as T_, aU as E_, aV as s_, aW as I_, aX as S_, aY as N_, aZ as e_, a_ as A_, a$ as O_, b0 as C_, b1 as t_, b2 as G_, b3 as D_, b4 as P_, b5 as R_, b6 as o_, b7 as L_, b8 as M_, b9 as r_, ba as n_, bb as b_, bc as l_, bd as F_, be as i_, bf as g_, bg as c_, bh as B_, bi as Y_, bj as U_, bk as d_, bl as u_, bm as H_, bn as p_, bo as y_, bp as m_, bq as K_, br as k_, bs as V_, bt as X_, bu as v_, bv as h_, bw as f_, bx as x_, by as W_, bz as z_, bA as w_, bB as Z_, bC as j_, bD as q_, bE as J_, bF as Q_, bG as $_, bH as aT, bI as _T, bJ as TT, bK as ET, bL as sT, bM as IT, bN as ST, bO as NT, bP as eT, bQ as AT, bR as OT, bS as CT, bT as tT, bU as GT, bV as DT, bW as PT, bX as RT, bY as oT, bZ as LT, b_ as MT, b$ as rT, c0 as nT, c1 as bT, c2 as lT, c3 as FT, c4 as iT, c5 as gT, c6 as cT, c7 as BT, c8 as YT, c9 as UT, ca as dT, cb as uT, cc as HT, cd as pT, ce as yT, cf as mT, cg as KT, ch as kT, ci as VT, cj as XT, ck as vT, cl as hT, cm as fT, cn as xT, co as WT, cp as zT, cq as wT, cr as ZT, cs as jT } from "./lib-
|
|
1
|
+
import { A as T, a as E, b as s, c as I, d as S, e as N, f as e, B as A, g as O, h as C, i as t, j as G, k as D, l as P, m as R, n as o, o as L, p as M, q as r, r as n, s as b, t as l, u as F, v as i, w as g, x as c, y as B, z as Y, C as U, D as d, E as u, F as H, G as p, H as y, I as m, J as K, K as k, L as V, M as X, N as v, O as h, P as f, Q as x, R as W, S as z, T as w, U as Z, V as j, W as q, X as J, Y as Q, Z as $, $ as aa, a0 as _a, a1 as Ta, a2 as Ea, a3 as sa, a4 as Ia, a5 as Sa, a6 as Na, a7 as ea, a8 as Aa, a9 as Oa, aa as Ca, ab as ta, ac as Ga, ad as Da, ae as Pa, af as Ra, ag as oa, ah as La, ai as Ma, aj as ra, ak as na, al as ba, am as la, an as Fa, ao as ia, ap as ga, aq as ca, ar as Ba, as as Ya, at as Ua, au as da, av as ua, aw as Ha, ax as pa, ay as ya, az as ma, aA as Ka, aB as ka, aC as Va, aD as Xa, aE as va, aF as ha, aG as fa, aH as xa, aI as Wa, aJ as za, aK as wa, aL as Za, aM as ja, aN as qa, aO as Ja, aP as Qa, aQ as $a, aR as a_, aS as __, aT as T_, aU as E_, aV as s_, aW as I_, aX as S_, aY as N_, aZ as e_, a_ as A_, a$ as O_, b0 as C_, b1 as t_, b2 as G_, b3 as D_, b4 as P_, b5 as R_, b6 as o_, b7 as L_, b8 as M_, b9 as r_, ba as n_, bb as b_, bc as l_, bd as F_, be as i_, bf as g_, bg as c_, bh as B_, bi as Y_, bj as U_, bk as d_, bl as u_, bm as H_, bn as p_, bo as y_, bp as m_, bq as K_, br as k_, bs as V_, bt as X_, bu as v_, bv as h_, bw as f_, bx as x_, by as W_, bz as z_, bA as w_, bB as Z_, bC as j_, bD as q_, bE as J_, bF as Q_, bG as $_, bH as aT, bI as _T, bJ as TT, bK as ET, bL as sT, bM as IT, bN as ST, bO as NT, bP as eT, bQ as AT, bR as OT, bS as CT, bT as tT, bU as GT, bV as DT, bW as PT, bX as RT, bY as oT, bZ as LT, b_ as MT, b$ as rT, c0 as nT, c1 as bT, c2 as lT, c3 as FT, c4 as iT, c5 as gT, c6 as cT, c7 as BT, c8 as YT, c9 as UT, ca as dT, cb as uT, cc as HT, cd as pT, ce as yT, cf as mT, cg as KT, ch as kT, ci as VT, cj as XT, ck as vT, cl as hT, cm as fT, cn as xT, co as WT, cp as zT, cq as wT, cr as ZT, cs as jT } from "./lib-6_P6kXPu.js";
|
|
2
2
|
import { U as JT, u as QT } from "./useEventTracker-DmQ6AkNn.js";
|
|
3
3
|
import { createPinia as aE, setActivePinia as _E } from "pinia";
|
|
4
4
|
export {
|