@designcrowd/library.brand-page 6.1.13 → 6.1.14-ai-v2-3
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-Fgb3311h.js → CreatedOnBrandCrowd-de-de-DECB0icp.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-B5STCD_n.js → CreatedOnBrandCrowd-en-us-Gvc4GoLw.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-DdgIbk4D.js → CreatedOnBrandCrowd-es-es-kE7KEsXu.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-DI51kQX5.js → CreatedOnBrandCrowd-fr-ca-C5vH5p2J.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-DI51kQX5.js → CreatedOnBrandCrowd-fr-fr-C5vH5p2J.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-BSnb2rTr.js → CreatedOnBrandCrowd-pt-br-CdiNE_Eg.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-BSnb2rTr.js → CreatedOnBrandCrowd-pt-pt-CdiNE_Eg.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-CSZ70DSJ.js → CreatedOnDcom-de-de-CDGp7kIj.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-ndmcsQ7u.js → CreatedOnDcom-en-us-D8z5N-07.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-CaxTn1I3.js → CreatedOnDcom-es-es-GkOmlUJw.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-D2G_gRcn.js → CreatedOnDcom-fr-ca-Duq7EQJv.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-DEWTbL0q.js → CreatedOnDcom-fr-fr-CNsdz8OF.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-JrWcosfu.js → CreatedOnDcom-pt-br-Cpx-O2YC.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-C81R_qUX.js → CreatedOnDcom-pt-pt-RnG_Fwan.js} +1 -1
- package/lib/src/brand-page/utils/migration/migration-21.js +19 -5
- package/lib/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.js +7 -3
- 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 +1 -1
- package/lib/src/css/library.brand-page-brandPage.min.css +1 -1
- package/lib/src/css/library.brand-page-designCom.min.css +1 -1
- package/lib/src/css/library.brand-page-preview.min.css +1 -1
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-BmaHdOpJ.js → lib-waJcLKe9.js} +17856 -17681
- package/lib/src/metadata-builder/builders/global-font-propagation.d.ts +28 -0
- package/lib/src/metadata-builder/builders/global-font-propagation.js +125 -0
- package/lib/src/metadata-builder/builders/global-styles-builder.js +16 -0
- package/lib/src/metadata-builder/builders/reorder-pages-builder.d.ts +13 -0
- package/lib/src/metadata-builder/builders/reorder-pages-builder.js +49 -0
- package/lib/src/metadata-builder/builders/section-builders/index.d.ts +1 -0
- package/lib/src/metadata-builder/builders/section-builders/index.js +1 -0
- package/lib/src/metadata-builder/builders/section-builders/support-me-builder.d.ts +8 -0
- package/lib/src/metadata-builder/builders/section-builders/support-me-builder.js +25 -0
- package/lib/src/metadata-builder/builders/section-builders/text-section-builder.js +5 -2
- package/lib/src/metadata-builder/builders/section-field-maps.js +15 -0
- package/lib/src/metadata-builder/builders/section-field-utils.d.ts +6 -1
- package/lib/src/metadata-builder/builders/section-field-utils.js +48 -12
- package/lib/src/metadata-builder/builders/section-rules/support-me.rules.d.ts +2 -0
- package/lib/src/metadata-builder/builders/section-rules/support-me.rules.js +17 -0
- package/lib/src/metadata-builder/helpers/rte.helpers.d.ts +9 -0
- package/lib/src/metadata-builder/helpers/rte.helpers.js +60 -1
- package/lib/src/metadata-builder/metadata-executor.js +3 -1
- package/lib/src/metadata-builder/models.d.ts +2 -0
- package/lib/src/metadata-builder/models.js +2 -0
- package/lib/src/metadata-builder/parsers/ai-toolcall-parser.d.ts +1 -0
- package/lib/src/metadata-builder/parsers/ai-toolcall-parser.js +4 -0
- package/lib/src/metadata-builder/parsers/section-tool-arguments.d.ts +14 -2
- package/lib/src/utils/minify-brand-page-metadata.js +7 -0
- package/package.json +1 -1
- package/src/brand-page/components/images-section/ImagesSection.vue +1 -1
- package/src/brand-page/utils/migration/migration-21.ts +25 -8
- package/src/brand-page-maker/components/ai-website-builder/AiWebsiteBuilder.vue +1 -1
- package/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.ts +7 -3
- package/src/clients/ai-assistant-client.ts +1 -0
- package/src/metadata-builder/builders/global-font-propagation.test.ts +269 -0
- package/src/metadata-builder/builders/global-font-propagation.ts +205 -0
- package/src/metadata-builder/builders/global-styles-builder.ts +21 -0
- package/src/metadata-builder/builders/reorder-pages-builder.ts +80 -0
- package/src/metadata-builder/builders/section-builders/index.ts +1 -0
- package/src/metadata-builder/builders/section-builders/support-me-builder.test.ts +177 -0
- package/src/metadata-builder/builders/section-builders/support-me-builder.ts +43 -0
- package/src/metadata-builder/builders/section-builders/text-section-builder.ts +5 -2
- package/src/metadata-builder/builders/section-field-maps.ts +18 -0
- package/src/metadata-builder/builders/section-field-utils.test.ts +83 -0
- package/src/metadata-builder/builders/section-field-utils.ts +69 -18
- package/src/metadata-builder/builders/section-rules/support-me.rules.ts +39 -0
- package/src/metadata-builder/helpers/rte.helpers.ts +82 -1
- package/src/metadata-builder/metadata-executor.ts +3 -0
- package/src/metadata-builder/models.ts +2 -0
- package/src/metadata-builder/parsers/ai-toolcall-parser.ts +4 -0
- package/src/metadata-builder/parsers/section-tool-arguments.ts +14 -1
- package/src/utils/minify-brand-page-metadata.test.ts +59 -1
- package/src/utils/minify-brand-page-metadata.ts +8 -0
|
@@ -565,8 +565,15 @@ const bakeSuccessMessageColour = (fields, descriptionStyle, frameColour, globalS
|
|
|
565
565
|
* element colour, else the render-neutral frame fallback (`rteFrameFallbackColour`: the
|
|
566
566
|
* section frame's button-label colour for every framed block — text/profile on a solid
|
|
567
567
|
* background and the container-bound blocks — so a legacy run keeps exactly the colour it
|
|
568
|
-
* showed; ADR 0015), else the linked global style
|
|
569
|
-
*
|
|
568
|
+
* showed; ADR 0015), else the linked global style, else the page base coat (`baseCoatColour`
|
|
569
|
+
* — the legacy root text colour an UNFRAMED, UNLINKED run inherited from the Page root
|
|
570
|
+
* pre-V2, captured before `moveRootTextColourIntoGlobalStyles` retires it; ADR 0015) — so the
|
|
571
|
+
* mark is explicit and nothing is left to ambient inheritance. That terminal rung is the fix
|
|
572
|
+
* for the V2 base-coat re-point: `rootElementStyles` used to paint the root from
|
|
573
|
+
* `textStyles.style.color` (the root text colour) and now paints it from the paragraphs
|
|
574
|
+
* colour, so a run left blank to "inherit the root" silently flipped to the paragraphs
|
|
575
|
+
* colour — invisible where that equals the section/page background.
|
|
576
|
+
* NOT byte-identical to the view model in one case: for an
|
|
570
577
|
* UNLINKED title (no
|
|
571
578
|
* `textStyleType`) the renderer skips the container-contrast rung (`getTextStyleByContent-
|
|
572
579
|
* TextStyleProperty` consults it only inside its `textStyleType` guard), so the bake can
|
|
@@ -579,7 +586,7 @@ const bakeSuccessMessageColour = (fields, descriptionStyle, frameColour, globalS
|
|
|
579
586
|
* `fillUncolouredRteText`): explicit runs, links and highlights are untouched, and a
|
|
580
587
|
* re-run finds every run coloured, so it is a no-op.
|
|
581
588
|
*/
|
|
582
|
-
const bakeResolvedTextColoursIntoContents = (brandPageModel) => {
|
|
589
|
+
const bakeResolvedTextColoursIntoContents = (brandPageModel, baseCoatColour) => {
|
|
583
590
|
const styles = brandPageModel.styles;
|
|
584
591
|
const options = styles?.textStyles?.textStyleOptions;
|
|
585
592
|
if (!options) {
|
|
@@ -593,7 +600,10 @@ const bakeResolvedTextColoursIntoContents = (brandPageModel) => {
|
|
|
593
600
|
if (!collectRteTextColors(rte)?.hasUncolouredRuns) {
|
|
594
601
|
return;
|
|
595
602
|
}
|
|
596
|
-
|
|
603
|
+
// `|| baseCoatColour` is the terminal rung: an unframed, unlinked run inherited the page
|
|
604
|
+
// base coat pre-V2 (the root text colour on the Page root element). Baking it reproduces
|
|
605
|
+
// V1 instead of the post-V2 inherit, which re-pointed the root to the paragraphs colour.
|
|
606
|
+
const resolved = resolveTextColor(styleObj, globalStyleFor(styleObj?.textStyleType), fallbackBeforeGlobal) || baseCoatColour;
|
|
597
607
|
if (isBlankColorValue(resolved)) {
|
|
598
608
|
return;
|
|
599
609
|
}
|
|
@@ -769,11 +779,15 @@ export const migration21 = async (migrationResult, _options) => {
|
|
|
769
779
|
// the palette split; footer icons take a literal black fallback. Reads the root ref, so
|
|
770
780
|
// it MUST precede its retirement below.
|
|
771
781
|
bakeIconColours(brandPageModel);
|
|
782
|
+
// Capture the referencified root text colour BEFORE it is retired below — it is the page
|
|
783
|
+
// base coat an unframed, unlinked RTE run inherited from the Page root pre-V2, and the
|
|
784
|
+
// terminal rung the bake needs to reproduce that (moveRootTextColour… deletes the source).
|
|
785
|
+
const baseCoatColour = legacyRootTextColour(brandPageModel);
|
|
772
786
|
// ---- Step FINAL: retire the root text colour (order matters — see docblock) ----
|
|
773
787
|
moveRootTextColourIntoGlobalStyles(brandPageModel);
|
|
774
788
|
// ---- Step FINAL+1: bake the resolved colour into inherit-only RTE runs ----
|
|
775
789
|
// After the global styles are filled and every colour is referencified, so it bakes
|
|
776
790
|
// palette refs and RTE stops inheriting the section frame's button colour.
|
|
777
|
-
bakeResolvedTextColoursIntoContents(brandPageModel);
|
|
791
|
+
bakeResolvedTextColoursIntoContents(brandPageModel, baseCoatColour);
|
|
778
792
|
return migrationResult;
|
|
779
793
|
};
|
|
@@ -367,7 +367,7 @@ export function useAiWebsiteBuilderChat() {
|
|
|
367
367
|
message,
|
|
368
368
|
websiteContext,
|
|
369
369
|
websiteSnapshot: snapshotStore.snapshotBase64 || undefined,
|
|
370
|
-
agentType: AI_ASSISTANT_AGENT_TYPES.
|
|
370
|
+
agentType: AI_ASSISTANT_AGENT_TYPES.WEBSITE_BUILDER_V2,
|
|
371
371
|
userPlan,
|
|
372
372
|
connectionId,
|
|
373
373
|
...buildAttributionFields(),
|
|
@@ -378,7 +378,7 @@ export function useAiWebsiteBuilderChat() {
|
|
|
378
378
|
message,
|
|
379
379
|
websiteContext,
|
|
380
380
|
websiteSnapshot: snapshotStore.snapshotBase64 || undefined,
|
|
381
|
-
agentType: AI_ASSISTANT_AGENT_TYPES.
|
|
381
|
+
agentType: AI_ASSISTANT_AGENT_TYPES.WEBSITE_BUILDER_V2,
|
|
382
382
|
userPlan,
|
|
383
383
|
connectionId,
|
|
384
384
|
...buildAttributionFields(),
|
|
@@ -524,9 +524,13 @@ export function useAiWebsiteBuilderChat() {
|
|
|
524
524
|
failedResults,
|
|
525
525
|
retryCount,
|
|
526
526
|
});
|
|
527
|
+
// Tool submissions must go to the SAME agent that ran the thread
|
|
528
|
+
// (AI QA 2026-07-05 T19: a mismatched agentType routes tool results
|
|
529
|
+
// to a service with no state for the thread and fails the build).
|
|
530
|
+
// brandSite AI is V2-only; every call site sends WEBSITE_BUILDER_V2.
|
|
527
531
|
const submitResult = await client.submitToolResultsBuildAsync(aiThreadStore.threadId, {
|
|
528
532
|
toolCalls: toolResults,
|
|
529
|
-
agentType: AI_ASSISTANT_AGENT_TYPES.
|
|
533
|
+
agentType: AI_ASSISTANT_AGENT_TYPES.WEBSITE_BUILDER_V2,
|
|
530
534
|
connectionId,
|
|
531
535
|
retryCount,
|
|
532
536
|
userPlan,
|
|
@@ -23,6 +23,7 @@ export interface WebsiteContext {
|
|
|
23
23
|
}
|
|
24
24
|
export declare const AI_ASSISTANT_AGENT_TYPES: {
|
|
25
25
|
readonly WEBSITE_BUILDER: "website_builder";
|
|
26
|
+
readonly WEBSITE_BUILDER_V2: "website_builder_v2";
|
|
26
27
|
};
|
|
27
28
|
export type AiAssistantAgentType = (typeof AI_ASSISTANT_AGENT_TYPES)[keyof typeof AI_ASSISTANT_AGENT_TYPES];
|
|
28
29
|
export type UserPlan = 'free' | 'premium';
|
|
@@ -3,6 +3,7 @@ import { useBrandPageContainerStore } from '../brand-page-maker/stores/brandpage
|
|
|
3
3
|
// Agent types
|
|
4
4
|
export const AI_ASSISTANT_AGENT_TYPES = {
|
|
5
5
|
WEBSITE_BUILDER: 'website_builder',
|
|
6
|
+
WEBSITE_BUILDER_V2: 'website_builder_v2',
|
|
6
7
|
};
|
|
7
8
|
// Website Endpoints
|
|
8
9
|
export const getWebsiteCreateThreadEndpoint = () => `/api/assistant/thread/website`;
|
package/lib/src/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as s, a as I, b as S, c as N, d as e, e as A, f as O, B as t, g as C, h as D, i as G, j as P, k as R, l as o, m as L, n as M, o as r, p as n, q as i, r as l, s as b, t as c, u as F, v as g, w as B, x as Y, y as U, z as d, C as u, D as H, E as p, F as y, G as m, H as K, I as k, J as V, K as v, L as X, M as h, N as f, O as x, P as W, Q as z, R as w, S as J, T as Z, U as j, V as q, W as Q, X as $, Y as aa, Z as Ea, $ as _a, a0 as Ta, a1 as sa, a2 as Ia, a3 as Sa, a4 as Na, a5 as ea, a6 as Aa, a7 as Oa, a8 as ta, a9 as Ca, aa as Da, ab as Ga, ac as Pa, ad as Ra, ae as oa, af as La, ag as Ma, ah as ra, ai as na, aj as ia, ak as la, al as ba, am as ca, an as Fa, ao as ga, ap as Ba, aq as Ya, ar as Ua, as as da, at as ua, au as Ha, av as pa, aw as ya, ax as ma, ay as Ka, az as ka, aA as Va, aB as va, aC as Xa, aD as ha, aE as fa, aF as xa, aG as Wa, aH as za, aI as wa, aJ as Ja, aK as Za, aL as ja, aM as qa, aN as Qa, aO as $a, aP as aE, aQ as EE, aR as _E, aS as TE, aT as sE, aU as IE, aV as SE, aW as NE, aX as eE, aY as AE, aZ as OE, a_ as tE, a$ as CE, b0 as DE, b1 as GE, b2 as PE, b3 as RE, b4 as oE, b5 as LE, b6 as ME, b7 as rE, b8 as nE, b9 as iE, ba as lE, bb as bE, bc as cE, bd as FE, be as gE, bf as BE, bg as YE, bh as UE, bi as dE, bj as uE, bk as HE, bl as pE, bm as yE, bn as mE, bo as KE, bp as kE, bq as VE, br as vE, bs as XE, bt as hE, bu as fE, bv as xE, bw as WE, bx as zE, by as wE, bz as JE, bA as ZE, bB as jE, bC as qE, bD as QE, bE as $E, bF as a_, bG as E_, bH as __, bI as T_, bJ as s_, bK as I_, bL as S_, bM as N_, bN as e_, bO as A_, bP as O_, bQ as t_, bR as C_, bS as D_, bT as G_, bU as P_, bV as R_, bW as o_, bX as L_, bY as M_, bZ as r_, b_ as n_, b$ as i_, c0 as l_, c1 as b_, c2 as c_, c3 as F_, c4 as g_, c5 as B_, c6 as Y_, c7 as U_, c8 as d_, c9 as u_, ca as H_, cb as p_, cc as y_, cd as m_, ce as K_, cf as k_, cg as V_, ch as v_, ci as X_, cj as h_, ck as f_, cl as x_, cm as W_, cn as z_, co as w_, cp as J_, cq as Z_, cr as j_, cs as q_, ct as Q_, cu as $_, cv as aT, cw as ET, cx as _T, cy as TT, cz as sT, cA as IT, cB as ST, cC as NT, cD as eT } from "./lib-
|
|
1
|
+
import { A as s, a as I, b as S, c as N, d as e, e as A, f as O, B as t, g as C, h as D, i as G, j as P, k as R, l as o, m as L, n as M, o as r, p as n, q as i, r as l, s as b, t as c, u as F, v as g, w as B, x as Y, y as U, z as d, C as u, D as H, E as p, F as y, G as m, H as K, I as k, J as V, K as v, L as X, M as h, N as f, O as x, P as W, Q as z, R as w, S as J, T as Z, U as j, V as q, W as Q, X as $, Y as aa, Z as Ea, $ as _a, a0 as Ta, a1 as sa, a2 as Ia, a3 as Sa, a4 as Na, a5 as ea, a6 as Aa, a7 as Oa, a8 as ta, a9 as Ca, aa as Da, ab as Ga, ac as Pa, ad as Ra, ae as oa, af as La, ag as Ma, ah as ra, ai as na, aj as ia, ak as la, al as ba, am as ca, an as Fa, ao as ga, ap as Ba, aq as Ya, ar as Ua, as as da, at as ua, au as Ha, av as pa, aw as ya, ax as ma, ay as Ka, az as ka, aA as Va, aB as va, aC as Xa, aD as ha, aE as fa, aF as xa, aG as Wa, aH as za, aI as wa, aJ as Ja, aK as Za, aL as ja, aM as qa, aN as Qa, aO as $a, aP as aE, aQ as EE, aR as _E, aS as TE, aT as sE, aU as IE, aV as SE, aW as NE, aX as eE, aY as AE, aZ as OE, a_ as tE, a$ as CE, b0 as DE, b1 as GE, b2 as PE, b3 as RE, b4 as oE, b5 as LE, b6 as ME, b7 as rE, b8 as nE, b9 as iE, ba as lE, bb as bE, bc as cE, bd as FE, be as gE, bf as BE, bg as YE, bh as UE, bi as dE, bj as uE, bk as HE, bl as pE, bm as yE, bn as mE, bo as KE, bp as kE, bq as VE, br as vE, bs as XE, bt as hE, bu as fE, bv as xE, bw as WE, bx as zE, by as wE, bz as JE, bA as ZE, bB as jE, bC as qE, bD as QE, bE as $E, bF as a_, bG as E_, bH as __, bI as T_, bJ as s_, bK as I_, bL as S_, bM as N_, bN as e_, bO as A_, bP as O_, bQ as t_, bR as C_, bS as D_, bT as G_, bU as P_, bV as R_, bW as o_, bX as L_, bY as M_, bZ as r_, b_ as n_, b$ as i_, c0 as l_, c1 as b_, c2 as c_, c3 as F_, c4 as g_, c5 as B_, c6 as Y_, c7 as U_, c8 as d_, c9 as u_, ca as H_, cb as p_, cc as y_, cd as m_, ce as K_, cf as k_, cg as V_, ch as v_, ci as X_, cj as h_, ck as f_, cl as x_, cm as W_, cn as z_, co as w_, cp as J_, cq as Z_, cr as j_, cs as q_, ct as Q_, cu as $_, cv as aT, cw as ET, cx as _T, cy as TT, cz as sT, cA as IT, cB as ST, cC as NT, cD as eT } from "./lib-waJcLKe9.js";
|
|
2
2
|
import { U as OT, u as tT } from "./useEventTracker-Dmc2jFdN.js";
|
|
3
3
|
import "vue";
|
|
4
4
|
import "vue-cropperjs";
|