@designcrowd/library.brand-page 6.0.20 → 6.0.21-ast-ai
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-C52IyXZu.js → CreatedOnBrandCrowd-de-de-DYpiqg4-.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-DhTy_dEV.js → CreatedOnBrandCrowd-en-us-Cx92XFbZ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-BJelIAQ4.js → CreatedOnBrandCrowd-es-es-7x1St4yL.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-DwJohy0T.js → CreatedOnBrandCrowd-fr-ca-SaD2K4gJ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-DwJohy0T.js → CreatedOnBrandCrowd-fr-fr-SaD2K4gJ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-CMzKbxdG.js → CreatedOnBrandCrowd-pt-br-CkoNB1UZ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-CMzKbxdG.js → CreatedOnBrandCrowd-pt-pt-CkoNB1UZ.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-DAy1GHrw.js → CreatedOnDcom-de-de-CKM4bzl2.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-CgBDAkJN.js → CreatedOnDcom-en-us-CaWY0zS_.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-Ds9d5rem.js → CreatedOnDcom-es-es-DaaLb5Rh.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-CZL0BQ-u.js → CreatedOnDcom-fr-ca-BhwRtOw6.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-BVYh5Wvo.js → CreatedOnDcom-fr-fr-Bn6ja3HK.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-1hsWNXfq.js → CreatedOnDcom-pt-br-DJqjbnZn.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-DvM0N-3M.js → CreatedOnDcom-pt-pt-DpnrY_1q.js} +1 -1
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-CK2FPBv5.js → lib-D_4o_O0R.js} +3 -3
- package/lib/src/metadata-builder/parsers/section-tool-arguments.d.ts +7 -1
- package/lib/src/shared/template-settings/store/template-settings-store.js +1 -0
- package/package.json +1 -1
- package/src/metadata-builder/parsers/section-tool-arguments.ts +9 -1
- package/src/metadata-builder/sanitizers/__tests__/section-args-validator.test.ts +27 -0
- package/src/metadata-builder/sanitizers/section-args-validator.ts +2 -1
- package/src/shared/template-settings/store/template-settings-store.ts +2 -0
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-D_4o_O0R.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 {
|
|
@@ -66234,10 +66234,10 @@ const Zi = /* @__PURE__ */ p9(yz1), wz1 = (e, t, n) => {
|
|
|
66234
66234
|
D2(() => n.context.isDesignCom, async () => {
|
|
66235
66235
|
const M = a9().toLowerCase(), S = n.context.isDesignCom ? "Dcom" : "BrandCrowd";
|
|
66236
66236
|
try {
|
|
66237
|
-
const { default: _ } = await OV(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-de-de.vue": () => import("./CreatedOnBrandCrowd-de-de-
|
|
66237
|
+
const { default: _ } = await OV(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-de-de.vue": () => import("./CreatedOnBrandCrowd-de-de-DYpiqg4-.js"), "./watermark/CreatedOnBrandCrowd-en-us.vue": () => import("./CreatedOnBrandCrowd-en-us-Cx92XFbZ.js"), "./watermark/CreatedOnBrandCrowd-es-es.vue": () => import("./CreatedOnBrandCrowd-es-es-7x1St4yL.js"), "./watermark/CreatedOnBrandCrowd-fr-ca.vue": () => import("./CreatedOnBrandCrowd-fr-ca-SaD2K4gJ.js"), "./watermark/CreatedOnBrandCrowd-fr-fr.vue": () => import("./CreatedOnBrandCrowd-fr-fr-SaD2K4gJ.js"), "./watermark/CreatedOnBrandCrowd-pt-br.vue": () => import("./CreatedOnBrandCrowd-pt-br-CkoNB1UZ.js"), "./watermark/CreatedOnBrandCrowd-pt-pt.vue": () => import("./CreatedOnBrandCrowd-pt-pt-CkoNB1UZ.js"), "./watermark/CreatedOnDcom-de-de.vue": () => import("./CreatedOnDcom-de-de-CKM4bzl2.js"), "./watermark/CreatedOnDcom-en-us.vue": () => import("./CreatedOnDcom-en-us-CaWY0zS_.js"), "./watermark/CreatedOnDcom-es-es.vue": () => import("./CreatedOnDcom-es-es-DaaLb5Rh.js"), "./watermark/CreatedOnDcom-fr-ca.vue": () => import("./CreatedOnDcom-fr-ca-BhwRtOw6.js"), "./watermark/CreatedOnDcom-fr-fr.vue": () => import("./CreatedOnDcom-fr-fr-Bn6ja3HK.js"), "./watermark/CreatedOnDcom-pt-br.vue": () => import("./CreatedOnDcom-pt-br-DJqjbnZn.js"), "./watermark/CreatedOnDcom-pt-pt.vue": () => import("./CreatedOnDcom-pt-pt-DpnrY_1q.js") }), `./watermark/CreatedOn${S}-${M}.vue`, 3);
|
|
66238
66238
|
i.value = _;
|
|
66239
66239
|
} catch {
|
|
66240
|
-
const { default: x } = await OV(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-en-us.vue": () => import("./CreatedOnBrandCrowd-en-us-
|
|
66240
|
+
const { default: x } = await OV(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-en-us.vue": () => import("./CreatedOnBrandCrowd-en-us-Cx92XFbZ.js"), "./watermark/CreatedOnDcom-en-us.vue": () => import("./CreatedOnDcom-en-us-CaWY0zS_.js") }), `./watermark/CreatedOn${S}-en-us.vue`, 3);
|
|
66241
66241
|
i.value = x;
|
|
66242
66242
|
}
|
|
66243
66243
|
}, {
|
|
@@ -77202,7 +77202,7 @@ const o0 = (e) => {
|
|
|
77202
77202
|
categoryName: void 0
|
|
77203
77203
|
}), await this._setSearchTerm({
|
|
77204
77204
|
searchTerm: e.searchTerm
|
|
77205
|
-
}), this.onSearchTermChanged?.(e.searchTerm), await this._setPageNo({ pageNo: 1 }), await this.loadPageNo({ pageNo: 1 });
|
|
77205
|
+
}), this.aiTemplateKeywords = e.searchTerm ?? "", this.onSearchTermChanged?.(e.searchTerm), await this._setPageNo({ pageNo: 1 }), await this.loadPageNo({ pageNo: 1 });
|
|
77206
77206
|
},
|
|
77207
77207
|
async onTabSelected(e) {
|
|
77208
77208
|
this._setSelectedTab({
|
|
@@ -24,12 +24,18 @@ export interface TiptapTextNode {
|
|
|
24
24
|
text: string;
|
|
25
25
|
marks?: TiptapMark[];
|
|
26
26
|
}
|
|
27
|
+
/** A forced line break inside a block (rendered as `<br>`). Carries no text or marks. */
|
|
28
|
+
export interface TiptapHardBreakNode {
|
|
29
|
+
type: 'hardBreak';
|
|
30
|
+
}
|
|
31
|
+
/** Inline-level nodes that can appear inside a block's `content`. */
|
|
32
|
+
export type TiptapInlineNode = TiptapTextNode | TiptapHardBreakNode;
|
|
27
33
|
export interface TiptapBlockNode {
|
|
28
34
|
type: 'paragraph' | 'heading' | 'blockquote';
|
|
29
35
|
attrs?: {
|
|
30
36
|
level?: number;
|
|
31
37
|
};
|
|
32
|
-
content?:
|
|
38
|
+
content?: TiptapInlineNode[];
|
|
33
39
|
}
|
|
34
40
|
export interface TiptapDocument {
|
|
35
41
|
type: 'doc';
|
|
@@ -364,6 +364,7 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
|
|
|
364
364
|
await this._setSearchTerm({
|
|
365
365
|
searchTerm: payload.searchTerm,
|
|
366
366
|
});
|
|
367
|
+
this.aiTemplateKeywords = payload.searchTerm ?? '';
|
|
367
368
|
this.onSearchTermChanged?.(payload.searchTerm);
|
|
368
369
|
await this._setPageNo({ pageNo: 1 });
|
|
369
370
|
await this.loadPageNo({ pageNo: 1 });
|
package/package.json
CHANGED
|
@@ -55,10 +55,18 @@ export interface TiptapTextNode {
|
|
|
55
55
|
marks?: TiptapMark[];
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
/** A forced line break inside a block (rendered as `<br>`). Carries no text or marks. */
|
|
59
|
+
export interface TiptapHardBreakNode {
|
|
60
|
+
type: 'hardBreak';
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** Inline-level nodes that can appear inside a block's `content`. */
|
|
64
|
+
export type TiptapInlineNode = TiptapTextNode | TiptapHardBreakNode;
|
|
65
|
+
|
|
58
66
|
export interface TiptapBlockNode {
|
|
59
67
|
type: 'paragraph' | 'heading' | 'blockquote';
|
|
60
68
|
attrs?: { level?: number };
|
|
61
|
-
content?:
|
|
69
|
+
content?: TiptapInlineNode[];
|
|
62
70
|
}
|
|
63
71
|
|
|
64
72
|
export interface TiptapDocument {
|
|
@@ -91,6 +91,33 @@ describe('TiptapDocument text extraction', () => {
|
|
|
91
91
|
|
|
92
92
|
expect(errors).toHaveLength(0);
|
|
93
93
|
});
|
|
94
|
+
|
|
95
|
+
it('accepts hardBreak nodes and counts only text (stacked headline)', () => {
|
|
96
|
+
// A user headline typed on separate lines is encoded with hardBreak nodes.
|
|
97
|
+
// The node must type-check inside a block and contribute nothing to the
|
|
98
|
+
// measured length — only the text characters count.
|
|
99
|
+
const stacked: TiptapDocument = {
|
|
100
|
+
type: 'doc',
|
|
101
|
+
content: [
|
|
102
|
+
{
|
|
103
|
+
type: 'paragraph',
|
|
104
|
+
content: [
|
|
105
|
+
{ type: 'text', text: 'SAVOR' },
|
|
106
|
+
{ type: 'hardBreak' },
|
|
107
|
+
{ type: 'text', text: 'THE' },
|
|
108
|
+
{ type: 'hardBreak' },
|
|
109
|
+
{ type: 'text', text: 'FLAVOR' },
|
|
110
|
+
{ type: 'hardBreak' },
|
|
111
|
+
{ type: 'text', text: 'TODAY.' },
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const errors = validateBannerSection({ title: stacked } as any, {});
|
|
118
|
+
|
|
119
|
+
expect(errors).toHaveLength(0);
|
|
120
|
+
});
|
|
94
121
|
});
|
|
95
122
|
|
|
96
123
|
// ─── item array text field limits ────────────────────────────────────────────
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
type TextStyleArguments,
|
|
4
4
|
type TiptapDocument,
|
|
5
5
|
type TiptapMark,
|
|
6
|
+
type TiptapTextNode,
|
|
6
7
|
} from '../parsers/section-tool-arguments';
|
|
7
8
|
import {
|
|
8
9
|
LOGO_SIZE_RULES,
|
|
@@ -17,7 +18,7 @@ function extractPlainText(value: string | TiptapDocument): string {
|
|
|
17
18
|
|
|
18
19
|
return value.content
|
|
19
20
|
.flatMap((block) => block.content ?? [])
|
|
20
|
-
.filter((node) => node.type === 'text')
|
|
21
|
+
.filter((node): node is TiptapTextNode => node.type === 'text')
|
|
21
22
|
.map((node) => node.text)
|
|
22
23
|
.join('');
|
|
23
24
|
}
|
|
@@ -529,6 +529,8 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
|
|
|
529
529
|
searchTerm: payload.searchTerm,
|
|
530
530
|
});
|
|
531
531
|
|
|
532
|
+
this.aiTemplateKeywords = payload.searchTerm ?? '';
|
|
533
|
+
|
|
532
534
|
this.onSearchTermChanged?.(payload.searchTerm);
|
|
533
535
|
|
|
534
536
|
await this._setPageNo({ pageNo: 1 });
|