@drawnagency/primitives 0.1.92 → 0.1.94
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/dist/{chunk-Z66TBL4Q.js → chunk-3HJDMFTB.js} +1 -1
- package/dist/{chunk-LQQY2RW6.js → chunk-DJAJRBPD.js} +1 -0
- package/dist/{chunk-7QEJDYTG.js → chunk-GDLH3LVH.js} +6 -6
- package/dist/{chunk-RUKO2N3F.js → chunk-RHWWQV3J.js} +30 -5
- package/dist/{chunk-YI2HUFE3.js → chunk-RQPHPAT2.js} +1 -1
- package/dist/{chunk-WOYGQK2D.js → chunk-UFOWXOG6.js} +49 -1
- package/dist/chunk-VAOW4WXQ.js +15 -0
- package/dist/{chunk-IZLXF3CR.js → chunk-XYFZ57AS.js} +1 -1
- package/dist/{chunk-A2V7BZPD.js → chunk-ZKGMLLUQ.js} +2 -2
- package/dist/components/editor/index.js +2 -2
- package/dist/components/primitives/ResolvedMedia.d.ts.map +1 -1
- package/dist/components/primitives/index.js +3 -3
- package/dist/components/sections/Video/VideoBlock.d.ts.map +1 -1
- package/dist/components/sections/brand-guide.js +3 -3
- package/dist/components/sections/register-schemas.js +6 -6
- package/dist/components/sections/register.js +6 -6
- package/dist/components/shared/SubTabs.d.ts +22 -0
- package/dist/components/shared/SubTabs.d.ts.map +1 -0
- package/dist/components/shell/EditorShell.d.ts.map +1 -1
- package/dist/components/shell/SiteSettingsChatbot.d.ts.map +1 -1
- package/dist/components/shell/SiteSettingsDisplay.d.ts.map +1 -1
- package/dist/components/shell/ViewerLoginForm.d.ts.map +1 -1
- package/dist/hooks/useMediaPipeline.d.ts.map +1 -1
- package/dist/index.js +22 -15
- package/dist/lib/contrast.d.ts +19 -0
- package/dist/lib/contrast.d.ts.map +1 -1
- package/dist/lib/index.d.ts +2 -1
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +16 -4
- package/dist/lib/theme-vars.d.ts +16 -0
- package/dist/lib/theme-vars.d.ts.map +1 -0
- package/dist/media/index.js +1 -1
- package/dist/schemas/index.js +2 -2
- package/dist/schemas/site-config.d.ts +2 -0
- package/dist/schemas/site-config.d.ts.map +1 -1
- package/dist/storage/index.d.ts +1 -1
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +9 -0
- package/dist/storage/types.d.ts +14 -0
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/types/database.d.ts +12 -0
- package/dist/types/database.d.ts.map +1 -1
- package/package.json +5 -1
- package/src/components/primitives/ResolvedMedia.tsx +6 -0
- package/src/components/sections/Video/VideoBlock.tsx +9 -1
- package/src/components/shared/SubTabs.tsx +70 -0
- package/src/components/shared/Tabs.tsx +1 -1
- package/src/components/shell/EditorShell.tsx +7 -4
- package/src/components/shell/SiteSettingsChatbot.tsx +38 -18
- package/src/components/shell/SiteSettingsDisplay.tsx +202 -31
- package/src/components/shell/ViewerLoginForm.tsx +12 -19
- package/src/hooks/useMediaPipeline.ts +4 -0
- package/src/lib/contrast.ts +52 -0
- package/src/lib/index.ts +10 -1
- package/src/lib/theme-vars.ts +31 -0
- package/src/schemas/site-config.ts +37 -5
- package/src/storage/index.ts +1 -1
- package/src/storage/types.ts +15 -0
- package/src/types/database.ts +10 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
pluralize,
|
|
4
4
|
stripHtmlToPlainText,
|
|
5
5
|
truncate
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZKGMLLUQ.js";
|
|
7
7
|
import {
|
|
8
8
|
DeleteButton,
|
|
9
9
|
DragHandle,
|
|
@@ -17,11 +17,11 @@ import {
|
|
|
17
17
|
buildBlockDropData,
|
|
18
18
|
canDropBlock,
|
|
19
19
|
isBlockDragData
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-XYFZ57AS.js";
|
|
21
21
|
import {
|
|
22
22
|
EditableRichText,
|
|
23
23
|
defineHeadingSection
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-RQPHPAT2.js";
|
|
25
25
|
import {
|
|
26
26
|
EditablePlainText,
|
|
27
27
|
ImageDropZone,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
containerGridClass,
|
|
32
32
|
masonryColumnsClass,
|
|
33
33
|
spacerHiddenClass
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-DJAJRBPD.js";
|
|
35
35
|
import {
|
|
36
36
|
useMediaLibrary,
|
|
37
37
|
useResolvedMedia
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
} from "./chunk-TZQPOR5A.js";
|
|
55
55
|
import {
|
|
56
56
|
SingleMediaReferenceSchema
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-RHWWQV3J.js";
|
|
58
58
|
import {
|
|
59
59
|
defineSection,
|
|
60
60
|
getSection
|
|
@@ -265,7 +265,7 @@ function VideoBlock({ source, caption, options, isEditMode, onSourceChange, onCa
|
|
|
265
265
|
const width = bakedWidth ?? resolved.width;
|
|
266
266
|
const height = bakedHeight ?? resolved.height;
|
|
267
267
|
aspect = width && height ? `${width} / ${height}` : void 0;
|
|
268
|
-
const playbackProps = playback === "ambient" ? { autoPlay: true, muted: true, loop: true, playsInline: true } : { controls: true, preload: "metadata" };
|
|
268
|
+
const playbackProps = playback === "ambient" ? { autoPlay: true, muted: true, loop: true, playsInline: true, preload: "none" } : { controls: true, preload: "metadata" };
|
|
269
269
|
const videoEl = imageId ? /* @__PURE__ */ jsx7(
|
|
270
270
|
"video",
|
|
271
271
|
{
|
|
@@ -214,15 +214,34 @@ var CanonicalIndexSchema = z3.object({
|
|
|
214
214
|
}
|
|
215
215
|
seenSlugs.add(p.slug);
|
|
216
216
|
}
|
|
217
|
+
const fmtIds = (ids) => ids.map((id) => `"${id}"`).sort().join(", ");
|
|
217
218
|
const fromPages = [];
|
|
218
219
|
for (const p of data.pages) fromPages.push(...p.order);
|
|
219
220
|
const fromPagesSet = new Set(fromPages);
|
|
220
|
-
if (fromPages.length !== fromPagesSet.size) {
|
|
221
|
-
ctx.addIssue({ code: z3.ZodIssueCode.custom, message: "A section id appears in more than one page" });
|
|
222
|
-
}
|
|
223
221
|
const sectionKeys = Object.keys(data.sections);
|
|
224
|
-
|
|
225
|
-
|
|
222
|
+
const sectionSet = new Set(sectionKeys);
|
|
223
|
+
const counts = /* @__PURE__ */ new Map();
|
|
224
|
+
for (const id of fromPages) counts.set(id, (counts.get(id) ?? 0) + 1);
|
|
225
|
+
const duplicated = [...counts].filter(([, n]) => n > 1).map(([id]) => id);
|
|
226
|
+
if (duplicated.length > 0) {
|
|
227
|
+
ctx.addIssue({
|
|
228
|
+
code: z3.ZodIssueCode.custom,
|
|
229
|
+
message: `Section id(s) appear in more than one page order: ${fmtIds(duplicated)}`
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
const orderedNotInSections = [...fromPagesSet].filter((id) => !sectionSet.has(id));
|
|
233
|
+
if (orderedNotInSections.length > 0) {
|
|
234
|
+
ctx.addIssue({
|
|
235
|
+
code: z3.ZodIssueCode.custom,
|
|
236
|
+
message: `Section id(s) in a page order but missing from sections{}: ${fmtIds(orderedNotInSections)}`
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
const sectionsNotOrdered = sectionKeys.filter((id) => !fromPagesSet.has(id));
|
|
240
|
+
if (sectionsNotOrdered.length > 0) {
|
|
241
|
+
ctx.addIssue({
|
|
242
|
+
code: z3.ZodIssueCode.custom,
|
|
243
|
+
message: `Section id(s) in sections{} but not in any page order: ${fmtIds(sectionsNotOrdered)}`
|
|
244
|
+
});
|
|
226
245
|
}
|
|
227
246
|
});
|
|
228
247
|
var IndexSchema = RawIndexSchema.transform(normalizeRawIndex).pipe(CanonicalIndexSchema);
|
|
@@ -276,6 +295,12 @@ var SiteConfigSchema = z3.object({
|
|
|
276
295
|
siteName: z3.string().default("Brand Portal"),
|
|
277
296
|
primaryColor: HexColorSchema.default("#009ca6"),
|
|
278
297
|
primaryContrast: HexColorSchema.default("#f0f0f0"),
|
|
298
|
+
// Dark-mode overrides for the brand primary / accent. Only applied when
|
|
299
|
+
// darkMode is "optional" (both modes are reachable, so a single value can't
|
|
300
|
+
// satisfy both). null = reuse the light value in dark mode. Rendered via the
|
|
301
|
+
// CSS light-dark() function (see lib/theme-vars.ts).
|
|
302
|
+
primaryColorDark: HexColorSchema.nullable().default(null),
|
|
303
|
+
primaryContrastDark: HexColorSchema.nullable().default(null),
|
|
279
304
|
darkMode: z3.enum(["light", "dark", "optional"]).default("light"),
|
|
280
305
|
// Maps to the --radius-outer design token (see lib/corner-radius.ts);
|
|
281
306
|
// defaults so pre-existing site-config.json files keep parsing.
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-TZQPOR5A.js";
|
|
10
10
|
import {
|
|
11
11
|
IndexSchema
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RHWWQV3J.js";
|
|
13
13
|
import {
|
|
14
14
|
getAllSchemas
|
|
15
15
|
} from "./chunk-VKAGMEKE.js";
|
|
@@ -48,6 +48,48 @@ function contrastColor(hex) {
|
|
|
48
48
|
const b = parseInt(h.slice(4, 6), 16);
|
|
49
49
|
return (r * 299 + g * 587 + b * 114) / 1e3 > 150 ? "#1a1a1a" : "#ffffff";
|
|
50
50
|
}
|
|
51
|
+
function toRgb(hex) {
|
|
52
|
+
const h = hex.replace("#", "");
|
|
53
|
+
const x = h.length === 3 ? h[0] + h[0] + h[1] + h[1] + h[2] + h[2] : h;
|
|
54
|
+
return [
|
|
55
|
+
parseInt(x.slice(0, 2), 16),
|
|
56
|
+
parseInt(x.slice(2, 4), 16),
|
|
57
|
+
parseInt(x.slice(4, 6), 16)
|
|
58
|
+
];
|
|
59
|
+
}
|
|
60
|
+
function relativeLuminance(hex) {
|
|
61
|
+
const [r, g, b] = toRgb(hex).map((c) => {
|
|
62
|
+
const s = c / 255;
|
|
63
|
+
return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;
|
|
64
|
+
});
|
|
65
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
66
|
+
}
|
|
67
|
+
function contrastRatio(a, b) {
|
|
68
|
+
const la = relativeLuminance(a);
|
|
69
|
+
const lb = relativeLuminance(b);
|
|
70
|
+
const hi = Math.max(la, lb);
|
|
71
|
+
const lo = Math.min(la, lb);
|
|
72
|
+
return (hi + 0.05) / (lo + 0.05);
|
|
73
|
+
}
|
|
74
|
+
function wcagLevel(ratio) {
|
|
75
|
+
return { aa: ratio >= 4.5, aaLarge: ratio >= 3, aaa: ratio >= 7 };
|
|
76
|
+
}
|
|
77
|
+
function suggestAccessibleOn(bg) {
|
|
78
|
+
return contrastRatio("#000000", bg) >= contrastRatio("#ffffff", bg) ? "#000000" : "#ffffff";
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// src/lib/theme-vars.ts
|
|
82
|
+
var DEFAULT_PRIMARY = "#009ca6";
|
|
83
|
+
var DEFAULT_CONTRAST = "#f0f0f0";
|
|
84
|
+
function lightDark(light, dark, optional) {
|
|
85
|
+
return optional && dark ? `light-dark(${light}, ${dark})` : light;
|
|
86
|
+
}
|
|
87
|
+
function primaryVarValue(c) {
|
|
88
|
+
return lightDark(c?.primaryColor ?? DEFAULT_PRIMARY, c?.primaryColorDark, c?.darkMode === "optional");
|
|
89
|
+
}
|
|
90
|
+
function accentVarValue(c) {
|
|
91
|
+
return lightDark(c?.primaryContrast ?? DEFAULT_CONTRAST, c?.primaryContrastDark, c?.darkMode === "optional");
|
|
92
|
+
}
|
|
51
93
|
|
|
52
94
|
// src/lib/grid.ts
|
|
53
95
|
var gridColsClass = {
|
|
@@ -164,6 +206,12 @@ export {
|
|
|
164
206
|
resolveThinkingPhrases,
|
|
165
207
|
deriveContrast,
|
|
166
208
|
contrastColor,
|
|
209
|
+
relativeLuminance,
|
|
210
|
+
contrastRatio,
|
|
211
|
+
wcagLevel,
|
|
212
|
+
suggestAccessibleOn,
|
|
213
|
+
primaryVarValue,
|
|
214
|
+
accentVarValue,
|
|
167
215
|
gridColsClass,
|
|
168
216
|
buildGoogleFontsUrl,
|
|
169
217
|
formatTimestamp,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/storage/types.ts
|
|
2
|
+
var StorageConflictError = class extends Error {
|
|
3
|
+
constructor(currentVersion) {
|
|
4
|
+
super("Draft has been modified since it was loaded");
|
|
5
|
+
this.currentVersion = currentVersion;
|
|
6
|
+
this.name = "StorageConflictError";
|
|
7
|
+
}
|
|
8
|
+
currentVersion;
|
|
9
|
+
};
|
|
10
|
+
var ASSET_CACHE_CONTROL = "max-age=31536000, immutable";
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
StorageConflictError,
|
|
14
|
+
ASSET_CACHE_CONTROL
|
|
15
|
+
};
|
|
@@ -378,7 +378,7 @@ function Tabs({ tabs, defaultTabId, activeTabId, onTabChange, fullBleedTabBar })
|
|
|
378
378
|
onClick: () => handleSelect(tab.id),
|
|
379
379
|
className: cn(
|
|
380
380
|
"cursor-pointer px-4 py-2 text-sm font-medium border-b-2 -mb-px",
|
|
381
|
-
activeTab?.id === tab.id ? "border-
|
|
381
|
+
activeTab?.id === tab.id ? "border-primary text-primary" : "border-transparent text-base-contrast-light hover:text-base-contrast"
|
|
382
382
|
),
|
|
383
383
|
children: tab.label
|
|
384
384
|
},
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
MediaBlock,
|
|
10
10
|
containerGridClass,
|
|
11
11
|
useEditableCollection
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DJAJRBPD.js";
|
|
13
13
|
import {
|
|
14
14
|
AddIcon,
|
|
15
15
|
DeleteIcon,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
import {
|
|
31
31
|
HexColorSchema,
|
|
32
32
|
SingleMediaReferenceSchema
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-RHWWQV3J.js";
|
|
34
34
|
import {
|
|
35
35
|
defineSection
|
|
36
36
|
} from "./chunk-VKAGMEKE.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
buildBlockDropData,
|
|
12
12
|
canDropBlock,
|
|
13
13
|
isBlockDragData
|
|
14
|
-
} from "../../chunk-
|
|
14
|
+
} from "../../chunk-XYFZ57AS.js";
|
|
15
15
|
import "../../chunk-5THS4K5D.js";
|
|
16
16
|
import "../../chunk-ZSPCE6MZ.js";
|
|
17
17
|
import {
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
cn
|
|
25
25
|
} from "../../chunk-7EOSDFS3.js";
|
|
26
26
|
import "../../chunk-YBVK254P.js";
|
|
27
|
-
import "../../chunk-
|
|
27
|
+
import "../../chunk-RHWWQV3J.js";
|
|
28
28
|
import "../../chunk-FM4M4Q2W.js";
|
|
29
29
|
import "../../chunk-JSBRDJBE.js";
|
|
30
30
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResolvedMedia.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/ResolvedMedia.tsx"],"names":[],"mappings":"AAKA,UAAU,kBAAkB;IAC1B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,UAAU,EAClB,SAAS,EACT,YAAY,EACZ,UAAU,GACX,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ResolvedMedia.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/ResolvedMedia.tsx"],"names":[],"mappings":"AAKA,UAAU,kBAAkB;IAC1B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,UAAU,EAClB,SAAS,EACT,YAAY,EACZ,UAAU,GACX,EAAE,kBAAkB,2CAiFpB"}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
EditableRichText,
|
|
3
3
|
LinkPopover,
|
|
4
4
|
defineHeadingSection
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-RQPHPAT2.js";
|
|
6
6
|
import {
|
|
7
7
|
EditableGrid,
|
|
8
8
|
EditablePlainText,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
MediaBlock,
|
|
11
11
|
ResolvedMedia,
|
|
12
12
|
useEditableCollection
|
|
13
|
-
} from "../../chunk-
|
|
13
|
+
} from "../../chunk-DJAJRBPD.js";
|
|
14
14
|
import "../../chunk-ZSPCE6MZ.js";
|
|
15
15
|
import {
|
|
16
16
|
DeleteIcon,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
cn
|
|
24
24
|
} from "../../chunk-7EOSDFS3.js";
|
|
25
25
|
import "../../chunk-YBVK254P.js";
|
|
26
|
-
import "../../chunk-
|
|
26
|
+
import "../../chunk-RHWWQV3J.js";
|
|
27
27
|
import "../../chunk-VKAGMEKE.js";
|
|
28
28
|
import "../../chunk-FM4M4Q2W.js";
|
|
29
29
|
import "../../chunk-JSBRDJBE.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Video/VideoBlock.tsx"],"names":[],"mappings":"AAOA,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,GAAG,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,MAAM,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GACzF;IACE,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,SAAS,GAAG,OAAO,GAAG,WAAW,CAAC;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEN,UAAU,eAAe;IACvB,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE;QAAE,QAAQ,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACnE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC/C,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED,wBAA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,16 +2,16 @@ import {
|
|
|
2
2
|
ColorItemSchema,
|
|
3
3
|
ColorSpaceSchema,
|
|
4
4
|
brandGuideSectionDefs
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-ZKGMLLUQ.js";
|
|
6
6
|
import "../../chunk-5THS4K5D.js";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-DJAJRBPD.js";
|
|
8
8
|
import "../../chunk-CI624HRS.js";
|
|
9
9
|
import "../../chunk-SOILPZ7U.js";
|
|
10
10
|
import "../../chunk-PZJL2S3Z.js";
|
|
11
11
|
import "../../chunk-WDSVHKAH.js";
|
|
12
12
|
import "../../chunk-7EOSDFS3.js";
|
|
13
13
|
import "../../chunk-YBVK254P.js";
|
|
14
|
-
import "../../chunk-
|
|
14
|
+
import "../../chunk-RHWWQV3J.js";
|
|
15
15
|
import "../../chunk-VKAGMEKE.js";
|
|
16
16
|
import "../../chunk-FM4M4Q2W.js";
|
|
17
17
|
import "../../chunk-JSBRDJBE.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
allSectionDefs
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-GDLH3LVH.js";
|
|
4
|
+
import "../../chunk-ZKGMLLUQ.js";
|
|
5
|
+
import "../../chunk-XYFZ57AS.js";
|
|
6
6
|
import "../../chunk-5THS4K5D.js";
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-RQPHPAT2.js";
|
|
8
|
+
import "../../chunk-DJAJRBPD.js";
|
|
9
9
|
import "../../chunk-ZSPCE6MZ.js";
|
|
10
10
|
import "../../chunk-CI624HRS.js";
|
|
11
11
|
import "../../chunk-Y4JQGO6G.js";
|
|
@@ -16,7 +16,7 @@ import "../../chunk-53DKVAB6.js";
|
|
|
16
16
|
import "../../chunk-7EOSDFS3.js";
|
|
17
17
|
import "../../chunk-YBVK254P.js";
|
|
18
18
|
import "../../chunk-TZQPOR5A.js";
|
|
19
|
-
import "../../chunk-
|
|
19
|
+
import "../../chunk-RHWWQV3J.js";
|
|
20
20
|
import {
|
|
21
21
|
registerRichText,
|
|
22
22
|
registerSchema
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
allSectionDefs
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-GDLH3LVH.js";
|
|
4
|
+
import "../../chunk-ZKGMLLUQ.js";
|
|
5
|
+
import "../../chunk-XYFZ57AS.js";
|
|
6
6
|
import "../../chunk-5THS4K5D.js";
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-RQPHPAT2.js";
|
|
8
|
+
import "../../chunk-DJAJRBPD.js";
|
|
9
9
|
import "../../chunk-ZSPCE6MZ.js";
|
|
10
10
|
import "../../chunk-CI624HRS.js";
|
|
11
11
|
import "../../chunk-Y4JQGO6G.js";
|
|
@@ -16,7 +16,7 @@ import "../../chunk-53DKVAB6.js";
|
|
|
16
16
|
import "../../chunk-7EOSDFS3.js";
|
|
17
17
|
import "../../chunk-YBVK254P.js";
|
|
18
18
|
import "../../chunk-TZQPOR5A.js";
|
|
19
|
-
import "../../chunk-
|
|
19
|
+
import "../../chunk-RHWWQV3J.js";
|
|
20
20
|
import {
|
|
21
21
|
registerSection
|
|
22
22
|
} from "../../chunk-VKAGMEKE.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface SubTabItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
content: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
interface SubTabsProps {
|
|
8
|
+
tabs: SubTabItem[];
|
|
9
|
+
defaultTabId?: string;
|
|
10
|
+
activeTabId?: string;
|
|
11
|
+
onTabChange?: (id: string) => void;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* SubTabs — a second-level tab bar for use *inside* a top-level `Tabs` panel
|
|
16
|
+
* (e.g. Site Settings → Display → Details | Styles | Typography). Uses a soft
|
|
17
|
+
* pill language — active pill gets a tinted primary wash, inactive is quiet
|
|
18
|
+
* text — so it never reads as another underline tab row like `Tabs`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function SubTabs({ tabs, defaultTabId, activeTabId, onTabChange, className, }: SubTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=SubTabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubTabs.d.ts","sourceRoot":"","sources":["../../../src/components/shared/SubTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjD,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,UAAU,YAAY;IACpB,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,EACtB,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,SAAS,GACV,EAAE,YAAY,2CAwCd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorShell.d.ts","sourceRoot":"","sources":["../../../src/components/shell/EditorShell.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,QAAQ,EAAE,M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AC,EACvC,aAAa,EAAE,MAAM,GAAG,IAAI,EAC5B,eAAe,EAAE,MAAM,GAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SiteSettingsChatbot.d.ts","sourceRoot":"","sources":["../../../src/components/shell/SiteSettingsChatbot.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SiteSettingsChatbot.d.ts","sourceRoot":"","sources":["../../../src/components/shell/SiteSettingsChatbot.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAA8B,MAAM,2BAA2B,CAAC;AACxF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAcjD,UAAU,KAAK;IACb,UAAU,EAAE,UAAU,CAAC;IACvB,kBAAkB,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IACjD,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAsBD,wBAAgB,mBAAmB,CAAC,EAAE,UAAU,EAAE,kBAAkB,EAAE,SAAS,EAAE,eAAe,EAAE,EAAE,KAAK,2CA+MxG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SiteSettingsDisplay.d.ts","sourceRoot":"","sources":["../../../src/components/shell/SiteSettingsDisplay.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SiteSettingsDisplay.d.ts","sourceRoot":"","sources":["../../../src/components/shell/SiteSettingsDisplay.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAG5D,UAAU,KAAK;IACb,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;CACxC;AA6DD,wBAAgB,mBAAmB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,KAAK,2CAmZlE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewerLoginForm.d.ts","sourceRoot":"","sources":["../../../src/components/shell/ViewerLoginForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ViewerLoginForm.d.ts","sourceRoot":"","sources":["../../../src/components/shell/ViewerLoginForm.tsx"],"names":[],"mappings":"AAMA,UAAU,KAAK;IACb,SAAS,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC/E,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,KAAK,2CAuFzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMediaPipeline.d.ts","sourceRoot":"","sources":["../../src/hooks/useMediaPipeline.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,KAAK,SAAS,EAAmB,MAAM,gBAAgB,CAAC;AAClF,OAAO,KAAK,EAAE,aAAa,EAAiC,MAAM,gBAAgB,CAAC;AACnF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"useMediaPipeline.d.ts","sourceRoot":"","sources":["../../src/hooks/useMediaPipeline.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,KAAK,SAAS,EAAmB,MAAM,gBAAgB,CAAC;AAClF,OAAO,KAAK,EAAE,aAAa,EAAiC,MAAM,gBAAgB,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,aAAa,EACb,cAAc,EACd,kBAAkB,GACnB,EAAE,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAwS8B,IAAI,EAAE,mBAAkB,MAAM,GAAG,IAAI;6BAyDvC,MAAM,EAAE;+BAsDZ,MAAM,OAAO,MAAM;+BAiBnB,MAAM,YAAY,MAAM,GAAG,IAAI,KAAG,MAAM;6BAW1C,MAAM,QAAQ,MAAM;2BAWtB,MAAM,YAAY,MAAM,GAAG,IAAI;6BA4BvB,MAAM,YAAY,MAAM,GAAG,QAAQ;2BAd3C,MAAM,EAAE,YAAY,MAAM,GAAG,IAAI;kCA4DhE;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,EAAE,mBAC9B,MAAM,GAAG,IAAI;;;wBAkCO,IAAI,eAAe,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,SAAS;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE;EAqFjH"}
|
package/dist/index.js
CHANGED
|
@@ -33,6 +33,10 @@ import {
|
|
|
33
33
|
sanitizeMediaName,
|
|
34
34
|
setMediaProvider
|
|
35
35
|
} from "./chunk-SOILPZ7U.js";
|
|
36
|
+
import {
|
|
37
|
+
ASSET_CACHE_CONTROL,
|
|
38
|
+
StorageConflictError
|
|
39
|
+
} from "./chunk-VAOW4WXQ.js";
|
|
36
40
|
import {
|
|
37
41
|
CollabPeerSchema,
|
|
38
42
|
HEARTBEAT_INTERVAL_MS,
|
|
@@ -51,7 +55,7 @@ import {
|
|
|
51
55
|
AudienceNameSchema,
|
|
52
56
|
MediaGridOptionsSchema,
|
|
53
57
|
slugifyAudienceName
|
|
54
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-3HJDMFTB.js";
|
|
55
59
|
import {
|
|
56
60
|
AudienceSchema,
|
|
57
61
|
RoleSchema,
|
|
@@ -66,18 +70,24 @@ import {
|
|
|
66
70
|
} from "./chunk-PZJL2S3Z.js";
|
|
67
71
|
import {
|
|
68
72
|
DEFAULT_CHATBOT_NAME,
|
|
73
|
+
accentVarValue,
|
|
69
74
|
buildGoogleFontsUrl,
|
|
70
75
|
contrastColor,
|
|
76
|
+
contrastRatio,
|
|
71
77
|
deriveContrast,
|
|
72
78
|
formatTimestamp,
|
|
73
79
|
gridColsClass,
|
|
74
80
|
loadSiteContent,
|
|
75
81
|
loadStaticSiteContent,
|
|
76
82
|
mergeSiteContent,
|
|
83
|
+
primaryVarValue,
|
|
84
|
+
relativeLuminance,
|
|
77
85
|
resolveChatbotName,
|
|
78
86
|
resolveThinkingPhrases,
|
|
79
|
-
safeRedirect
|
|
80
|
-
|
|
87
|
+
safeRedirect,
|
|
88
|
+
suggestAccessibleOn,
|
|
89
|
+
wcagLevel
|
|
90
|
+
} from "./chunk-UFOWXOG6.js";
|
|
81
91
|
import {
|
|
82
92
|
curatedIcons,
|
|
83
93
|
getIcon
|
|
@@ -131,7 +141,7 @@ import {
|
|
|
131
141
|
TextLineSchema,
|
|
132
142
|
VariantSchema,
|
|
133
143
|
normalizeSiteIndex
|
|
134
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-RHWWQV3J.js";
|
|
135
145
|
import {
|
|
136
146
|
clearRegistry,
|
|
137
147
|
createRegistry,
|
|
@@ -149,17 +159,8 @@ import {
|
|
|
149
159
|
env
|
|
150
160
|
} from "./chunk-WKZ7OENC.js";
|
|
151
161
|
import "./chunk-JSBRDJBE.js";
|
|
152
|
-
|
|
153
|
-
// src/storage/types.ts
|
|
154
|
-
var StorageConflictError = class extends Error {
|
|
155
|
-
constructor(currentVersion) {
|
|
156
|
-
super("Draft has been modified since it was loaded");
|
|
157
|
-
this.currentVersion = currentVersion;
|
|
158
|
-
this.name = "StorageConflictError";
|
|
159
|
-
}
|
|
160
|
-
currentVersion;
|
|
161
|
-
};
|
|
162
162
|
export {
|
|
163
|
+
ASSET_CACHE_CONTROL,
|
|
163
164
|
AUDIENCE_COOKIE,
|
|
164
165
|
AUDIENCE_MAX_AGE_SECONDS,
|
|
165
166
|
AudienceColorSchema,
|
|
@@ -208,12 +209,14 @@ export {
|
|
|
208
209
|
TakeoverMessageSchema,
|
|
209
210
|
TextLineSchema,
|
|
210
211
|
VariantSchema,
|
|
212
|
+
accentVarValue,
|
|
211
213
|
audiencePasses,
|
|
212
214
|
buildGoogleFontsUrl,
|
|
213
215
|
clearRegistry,
|
|
214
216
|
cn,
|
|
215
217
|
composePreviewImage,
|
|
216
218
|
contrastColor,
|
|
219
|
+
contrastRatio,
|
|
217
220
|
createEvent,
|
|
218
221
|
createRegistry,
|
|
219
222
|
curatedIcons,
|
|
@@ -250,9 +253,11 @@ export {
|
|
|
250
253
|
mimeToExt,
|
|
251
254
|
navChangeEvent,
|
|
252
255
|
normalizeSiteIndex,
|
|
256
|
+
primaryVarValue,
|
|
253
257
|
rebindImageRef,
|
|
254
258
|
registerSchema,
|
|
255
259
|
registerSection,
|
|
260
|
+
relativeLuminance,
|
|
256
261
|
requireSessionSecret,
|
|
257
262
|
resolveChatbotName,
|
|
258
263
|
resolveLogo,
|
|
@@ -269,7 +274,9 @@ export {
|
|
|
269
274
|
signAudienceToken,
|
|
270
275
|
signSessionToken,
|
|
271
276
|
slugifyAudienceName,
|
|
277
|
+
suggestAccessibleOn,
|
|
272
278
|
toSectionId,
|
|
273
279
|
verifyAudienceToken,
|
|
274
|
-
verifySessionToken
|
|
280
|
+
verifySessionToken,
|
|
281
|
+
wcagLevel
|
|
275
282
|
};
|
package/dist/lib/contrast.d.ts
CHANGED
|
@@ -4,4 +4,23 @@ export declare function deriveContrast(hex: string): string;
|
|
|
4
4
|
* uses). Returns near-black for light backgrounds, white for dark ones.
|
|
5
5
|
*/
|
|
6
6
|
export declare function contrastColor(hex: string): "#1a1a1a" | "#ffffff";
|
|
7
|
+
/** WCAG relative luminance of an sRGB hex color (0 = black, 1 = white). */
|
|
8
|
+
export declare function relativeLuminance(hex: string): number;
|
|
9
|
+
/** WCAG contrast ratio between two hex colors, 1 (identical) → 21 (#000/#fff). */
|
|
10
|
+
export declare function contrastRatio(a: string, b: string): number;
|
|
11
|
+
export interface WcagLevel {
|
|
12
|
+
/** ≥ 4.5:1 — AA for normal-size text. */
|
|
13
|
+
aa: boolean;
|
|
14
|
+
/** ≥ 3:1 — AA for large text and UI components. */
|
|
15
|
+
aaLarge: boolean;
|
|
16
|
+
/** ≥ 7:1 — AAA for normal-size text. */
|
|
17
|
+
aaa: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function wcagLevel(ratio: number): WcagLevel;
|
|
20
|
+
/**
|
|
21
|
+
* Pick the pure black/white that maximizes contrast against `bg` — used to
|
|
22
|
+
* suggest an accessible accent (text on a primary-colored button). Pure b/w
|
|
23
|
+
* gives the highest achievable ratio for a foreground on a fixed background.
|
|
24
|
+
*/
|
|
25
|
+
export declare function suggestAccessibleOn(bg: string): "#000000" | "#ffffff";
|
|
7
26
|
//# sourceMappingURL=contrast.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contrast.d.ts","sourceRoot":"","sources":["../../src/lib/contrast.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAUlD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAMhE"}
|
|
1
|
+
{"version":3,"file":"contrast.d.ts","sourceRoot":"","sources":["../../src/lib/contrast.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAUlD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAMhE;AAcD,2EAA2E;AAC3E,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAMrD;AAED,kFAAkF;AAClF,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAM1D;AAED,MAAM,WAAW,SAAS;IACxB,yCAAyC;IACzC,EAAE,EAAE,OAAO,CAAC;IACZ,mDAAmD;IACnD,OAAO,EAAE,OAAO,CAAC;IACjB,wCAAwC;IACxC,GAAG,EAAE,OAAO,CAAC;CACd;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAElD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAErE"}
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ export { cn } from "./cn";
|
|
|
3
3
|
export { audiencePasses } from "./pages";
|
|
4
4
|
export { resolveChatbotName, resolveThinkingPhrases, DEFAULT_CHATBOT_NAME } from "./chatbot";
|
|
5
5
|
export { generateNavLinks, toSectionId, type NavItem } from "./nav";
|
|
6
|
-
export { deriveContrast, contrastColor } from "./contrast";
|
|
6
|
+
export { deriveContrast, contrastColor, relativeLuminance, contrastRatio, wcagLevel, suggestAccessibleOn, type WcagLevel, } from "./contrast";
|
|
7
|
+
export { primaryVarValue, accentVarValue } from "./theme-vars";
|
|
7
8
|
export { sanitizeHtml, ensureSanitizer } from "./sanitize";
|
|
8
9
|
export { gridColsClass } from "./grid";
|
|
9
10
|
export { getIcon, curatedIcons, type IconEntry } from "./icons";
|
package/dist/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,WAAW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