@riverbankcms/sdk 0.4.2 → 0.4.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/dist/client/client.d.mts +2 -2
- package/dist/client/client.d.ts +2 -2
- package/dist/client/client.js +11 -1
- package/dist/client/client.js.map +1 -1
- package/dist/client/client.mjs +11 -1
- package/dist/client/client.mjs.map +1 -1
- package/dist/client/hooks.d.mts +2 -2
- package/dist/client/hooks.d.ts +2 -2
- package/dist/client/rendering/client.js +4 -0
- package/dist/client/rendering/client.js.map +1 -1
- package/dist/client/rendering/client.mjs +4 -0
- package/dist/client/rendering/client.mjs.map +1 -1
- package/dist/client/usePage--fGlyrgj.d.mts +6439 -0
- package/dist/client/usePage-CE7X5NcN.d.ts +6439 -0
- package/dist/server/{Layout-kRv5sU81.d.ts → Layout-CXI_VkhN.d.ts} +1 -1
- package/dist/server/{Layout-ByUnm35V.d.mts → Layout-p6f3TLw9.d.mts} +1 -1
- package/dist/server/{chunk-SPXMMX3C.mjs → chunk-24F6FTCI.mjs} +2 -2
- package/dist/server/{chunk-NW5KHH4A.js → chunk-2SSEBAHC.js} +5 -5
- package/dist/server/{chunk-NW5KHH4A.js.map → chunk-2SSEBAHC.js.map} +1 -1
- package/dist/server/{chunk-ZEAJW6T3.mjs → chunk-ES6QDZUX.mjs} +3 -2
- package/dist/server/chunk-ES6QDZUX.mjs.map +1 -0
- package/dist/server/{chunk-SWPHIUVE.js → chunk-G35R7N7B.js} +3 -2
- package/dist/server/chunk-G35R7N7B.js.map +1 -0
- package/dist/server/{chunk-7BOIO2S7.mjs → chunk-LCYGQDAB.mjs} +5 -3
- package/dist/server/chunk-LCYGQDAB.mjs.map +1 -0
- package/dist/server/{chunk-BLKVTULP.js → chunk-TNYU5EIO.js} +11 -9
- package/dist/server/{chunk-BLKVTULP.js.map → chunk-TNYU5EIO.js.map} +1 -1
- package/dist/server/{chunk-TNRADRPH.mjs → chunk-U2NI3TS3.mjs} +9 -1
- package/dist/server/chunk-U2NI3TS3.mjs.map +1 -0
- package/dist/server/{chunk-TKMA6D6U.js → chunk-VHDDXCK6.js} +75 -67
- package/dist/server/chunk-VHDDXCK6.js.map +1 -0
- package/dist/server/{components-CY8jDQjv.d.mts → components-C75e4poV.d.mts} +3 -3
- package/dist/server/{components-D1Z2mSDr.d.ts → components-Dhiemsjd.d.ts} +3 -3
- package/dist/server/components.d.mts +5 -5
- package/dist/server/components.d.ts +5 -5
- package/dist/server/components.js +3 -3
- package/dist/server/components.mjs +2 -2
- package/dist/server/config-validation.js +1 -1
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.js +1 -1
- package/dist/server/config.mjs +1 -1
- package/dist/server/data.d.mts +2 -2
- package/dist/server/data.d.ts +2 -2
- package/dist/server/{index-DFQwtj3J.d.mts → index-C6o9LPvq.d.mts} +1 -1
- package/dist/server/{index-DCIz9Ptv.d.ts → index-CAwBj3-A.d.ts} +1 -1
- package/dist/server/index.d.mts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/{loadContent-CWuE8FCx.d.mts → loadContent-CdXfuCuE.d.mts} +3 -3
- package/dist/server/{loadContent-DynBuR5f.d.ts → loadContent-CsvQRoxb.d.ts} +3 -3
- package/dist/server/{loadPage-BTkKpizX.d.ts → loadPage-BA0HiT-6.d.ts} +14 -3
- package/dist/server/{loadPage-DUHBXDEW.js → loadPage-DLC7DJZP.js} +3 -3
- package/dist/server/{loadPage-DUHBXDEW.js.map → loadPage-DLC7DJZP.js.map} +1 -1
- package/dist/server/{loadPage-LYVKY3WZ.mjs → loadPage-GEGN4UAL.mjs} +2 -2
- package/dist/server/{loadPage-B8RmlYgV.d.mts → loadPage-p3AWwwrd.d.mts} +14 -3
- package/dist/server/metadata.d.mts +3 -3
- package/dist/server/metadata.d.ts +3 -3
- package/dist/server/navigation.d.mts +2 -2
- package/dist/server/navigation.d.ts +2 -2
- package/dist/server/rendering/server.d.mts +4 -4
- package/dist/server/rendering/server.d.ts +4 -4
- package/dist/server/rendering/server.js +4 -4
- package/dist/server/rendering/server.mjs +3 -3
- package/dist/server/rendering.d.mts +7 -7
- package/dist/server/rendering.d.ts +7 -7
- package/dist/server/rendering.js +5 -5
- package/dist/server/rendering.mjs +4 -4
- package/dist/server/routing.d.mts +3 -3
- package/dist/server/routing.d.ts +3 -3
- package/dist/server/routing.js +1 -1
- package/dist/server/routing.mjs +1 -1
- package/dist/server/server.d.mts +5 -5
- package/dist/server/server.d.ts +5 -5
- package/dist/server/server.js +2 -2
- package/dist/server/server.mjs +1 -1
- package/dist/server/theme-bridge.js +7 -7
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/{types-CdrJqlKx.d.mts → types-BLf-hE50.d.mts} +2 -0
- package/dist/server/{types-BiRZnxDx.d.ts → types-BWQ-TohG.d.ts} +2 -0
- package/dist/server/{types-DkKEctWn.d.mts → types-CdhKJrB0.d.mts} +1 -1
- package/dist/server/{types-oCM-fw4O.d.ts → types-Dj8B3QRb.d.ts} +1 -1
- package/package.json +3 -3
- package/dist/server/chunk-7BOIO2S7.mjs.map +0 -1
- package/dist/server/chunk-SWPHIUVE.js.map +0 -1
- package/dist/server/chunk-TKMA6D6U.js.map +0 -1
- package/dist/server/chunk-TNRADRPH.mjs.map +0 -1
- package/dist/server/chunk-ZEAJW6T3.mjs.map +0 -1
- /package/dist/server/{chunk-SPXMMX3C.mjs.map → chunk-24F6FTCI.mjs.map} +0 -0
- /package/dist/server/{loadPage-LYVKY3WZ.mjs.map → loadPage-GEGN4UAL.mjs.map} +0 -0
|
@@ -75,7 +75,14 @@ function getDirectImageUrl(supabaseUrl, storagePath, storageBucket = "media", op
|
|
|
75
75
|
|
|
76
76
|
// ../blocks/src/system/runtime/nodes/media.tsx
|
|
77
77
|
var _jsxruntime = require('react/jsx-runtime');
|
|
78
|
+
var _contextSupabaseUrl;
|
|
79
|
+
function setContextSupabaseUrl(url) {
|
|
80
|
+
_contextSupabaseUrl = _optionalChain([url, 'optionalAccess', _2 => _2.replace, 'call', _3 => _3(/\/$/, "")]);
|
|
81
|
+
}
|
|
78
82
|
function getSupabaseUrl() {
|
|
83
|
+
if (_contextSupabaseUrl) {
|
|
84
|
+
return _contextSupabaseUrl;
|
|
85
|
+
}
|
|
79
86
|
const url = process.env.NEXT_PUBLIC_SUPABASE_URL;
|
|
80
87
|
if (!url) {
|
|
81
88
|
throw new Error(
|
|
@@ -107,7 +114,7 @@ var MediaNode = ({ value, className, style }) => {
|
|
|
107
114
|
}
|
|
108
115
|
);
|
|
109
116
|
}
|
|
110
|
-
const hotspotStyle = _optionalChain([value, 'access',
|
|
117
|
+
const hotspotStyle = _optionalChain([value, 'access', _4 => _4.transform, 'optionalAccess', _5 => _5.hotspot]) ? { objectPosition: `${value.transform.hotspot.x * 100}% ${value.transform.hotspot.y * 100}%` } : void 0;
|
|
111
118
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
112
119
|
"img",
|
|
113
120
|
{
|
|
@@ -3141,7 +3148,7 @@ function expandPalette(palette) {
|
|
|
3141
3148
|
}
|
|
3142
3149
|
if (base.text) expanded.body = base.text;
|
|
3143
3150
|
const isDark = base.background ? isBackgroundDark(base.background) : false;
|
|
3144
|
-
const isDarkMode = _optionalChain([palette, 'access',
|
|
3151
|
+
const isDarkMode = _optionalChain([palette, 'access', _6 => _6.meta, 'optionalAccess', _7 => _7.mode]) === "dark" || isDark;
|
|
3145
3152
|
expanded.mutedText = isDarkMode ? expanded["neutral-600"] : expanded["neutral-500"];
|
|
3146
3153
|
return expanded;
|
|
3147
3154
|
}
|
|
@@ -3536,7 +3543,7 @@ var outerGlowEffect = {
|
|
|
3536
3543
|
let glowColor;
|
|
3537
3544
|
if (options.glowColorToken && typeof options.glowColorToken === "string") {
|
|
3538
3545
|
glowColor = tokens.getColor(options.glowColorToken);
|
|
3539
|
-
} else if (_optionalChain([buttonConfig, 'access',
|
|
3546
|
+
} else if (_optionalChain([buttonConfig, 'access', _8 => _8.border, 'optionalAccess', _9 => _9.colorToken])) {
|
|
3540
3547
|
glowColor = tokens.getColor(buttonConfig.border.colorToken);
|
|
3541
3548
|
} else if (buttonConfig.background.type === "solid") {
|
|
3542
3549
|
glowColor = tokens.getColor(buttonConfig.background.colorToken);
|
|
@@ -5059,8 +5066,8 @@ function generateAccordionCss({
|
|
|
5059
5066
|
if (accordionSystem.hover.shadowElevation) {
|
|
5060
5067
|
const hoverShadowValue = generateShadowValue(
|
|
5061
5068
|
accordionSystem.hover.shadowElevation,
|
|
5062
|
-
_nullishCoalesce(_optionalChain([accordionSystem, 'access',
|
|
5063
|
-
_nullishCoalesce(_optionalChain([accordionSystem, 'access',
|
|
5069
|
+
_nullishCoalesce(_optionalChain([accordionSystem, 'access', _10 => _10.shadow, 'optionalAccess', _11 => _11.softness]), () => ( "soft")),
|
|
5070
|
+
_nullishCoalesce(_optionalChain([accordionSystem, 'access', _12 => _12.shadow, 'optionalAccess', _13 => _13.position]), () => ( "bottom"))
|
|
5064
5071
|
);
|
|
5065
5072
|
triggerHoverRules.push(`box-shadow: ${hoverShadowValue}`);
|
|
5066
5073
|
}
|
|
@@ -5579,7 +5586,7 @@ function generateHeaderCss(options) {
|
|
|
5579
5586
|
function generateHeaderRootStyles(header, themeId, tokens, _theme) {
|
|
5580
5587
|
const selector = `:where([data-theme-scope="${themeId}"]) .header-root`;
|
|
5581
5588
|
const rules = [];
|
|
5582
|
-
const navContainerType = _nullishCoalesce(_optionalChain([header, 'access',
|
|
5589
|
+
const navContainerType = _nullishCoalesce(_optionalChain([header, 'access', _14 => _14.navContainer, 'optionalAccess', _15 => _15.type]), () => ( "none"));
|
|
5583
5590
|
const isContainedNav = navContainerType === "pill" || navContainerType === "glass";
|
|
5584
5591
|
if (isContainedNav) {
|
|
5585
5592
|
} else {
|
|
@@ -5602,7 +5609,7 @@ function generateHeaderRootStyles(header, themeId, tokens, _theme) {
|
|
|
5602
5609
|
"thick": "4px"
|
|
5603
5610
|
}[header.border.width];
|
|
5604
5611
|
if (borderWidth !== "0") {
|
|
5605
|
-
const borderToken = _optionalChain([header, 'access',
|
|
5612
|
+
const borderToken = _optionalChain([header, 'access', _16 => _16.border, 'optionalAccess', _17 => _17.color, 'optionalAccess', _18 => _18.trim, 'call', _19 => _19()]) || "border";
|
|
5606
5613
|
const borderColor = tokens.getColor(borderToken);
|
|
5607
5614
|
const borderStyle = header.border.style === "dashed" ? "dashed" : "solid";
|
|
5608
5615
|
if (header.border.position === "bottom") {
|
|
@@ -5667,9 +5674,9 @@ function generateNavLinkStyles(header, themeId, tokens) {
|
|
|
5667
5674
|
const baseRules = [];
|
|
5668
5675
|
const hoverRules = [];
|
|
5669
5676
|
const activeRules = [];
|
|
5670
|
-
const navContainerType = _nullishCoalesce(_optionalChain([header, 'access',
|
|
5677
|
+
const navContainerType = _nullishCoalesce(_optionalChain([header, 'access', _20 => _20.navContainer, 'optionalAccess', _21 => _21.type]), () => ( "none"));
|
|
5671
5678
|
const usesGlassNavContainer = navContainerType === "glass";
|
|
5672
|
-
const navColorToken = _optionalChain([header, 'access',
|
|
5679
|
+
const navColorToken = _optionalChain([header, 'access', _22 => _22.navColor, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]);
|
|
5673
5680
|
const primaryColor = tokens.getColor("primary");
|
|
5674
5681
|
const navWeight = _nullishCoalesce(header.navWeight, () => ( "medium"));
|
|
5675
5682
|
const navWeightMap = {
|
|
@@ -5785,7 +5792,7 @@ ${activeSelector} {
|
|
|
5785
5792
|
}
|
|
5786
5793
|
function generateNavContainerStyles(header, themeId, tokens) {
|
|
5787
5794
|
const navContainer = header.navContainer;
|
|
5788
|
-
const navContainerType = _nullishCoalesce(_optionalChain([navContainer, 'optionalAccess',
|
|
5795
|
+
const navContainerType = _nullishCoalesce(_optionalChain([navContainer, 'optionalAccess', _25 => _25.type]), () => ( "none"));
|
|
5789
5796
|
if (!navContainer || navContainerType === "none") return "";
|
|
5790
5797
|
const selector = `:where([data-theme-scope="${themeId}"]) .header-nav-row`;
|
|
5791
5798
|
const rules = [];
|
|
@@ -6153,7 +6160,7 @@ var defaultThemeTokens = {
|
|
|
6153
6160
|
function buildThemeRuntime(theme, options) {
|
|
6154
6161
|
const hydrated = hydrateTheme(theme);
|
|
6155
6162
|
const cssVars = buildThemeCssVars(hydrated);
|
|
6156
|
-
const themeId = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6163
|
+
const themeId = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _26 => _26.themeId]), () => ( "theme-default"));
|
|
6157
6164
|
const buttonCss = generateButtonCss({
|
|
6158
6165
|
themeId,
|
|
6159
6166
|
theme,
|
|
@@ -6215,9 +6222,9 @@ function buildThemeCssVars(theme) {
|
|
|
6215
6222
|
...typography.headings.h1.weight ? { ["--fw-h1"]: mapWeight(typography.headings.h1.weight) } : {},
|
|
6216
6223
|
...typography.headings.h2.weight ? { ["--fw-h2"]: mapWeight(typography.headings.h2.weight) } : {},
|
|
6217
6224
|
...typography.headings.h3.weight ? { ["--fw-h3"]: mapWeight(typography.headings.h3.weight) } : {},
|
|
6218
|
-
..._optionalChain([typography, 'access',
|
|
6219
|
-
..._optionalChain([typography, 'access',
|
|
6220
|
-
..._optionalChain([typography, 'access',
|
|
6225
|
+
..._optionalChain([typography, 'access', _27 => _27.headings, 'access', _28 => _28.h4, 'optionalAccess', _29 => _29.weight]) ? { ["--fw-h4"]: mapWeight(typography.headings.h4.weight) } : {},
|
|
6226
|
+
..._optionalChain([typography, 'access', _30 => _30.headings, 'access', _31 => _31.h5, 'optionalAccess', _32 => _32.weight]) ? { ["--fw-h5"]: mapWeight(typography.headings.h5.weight) } : {},
|
|
6227
|
+
..._optionalChain([typography, 'access', _33 => _33.headings, 'access', _34 => _34.h6, 'optionalAccess', _35 => _35.weight]) ? { ["--fw-h6"]: mapWeight(typography.headings.h6.weight) } : {},
|
|
6221
6228
|
["--ls-heading"]: mapLetterSpacing(typography.headings.default.letterSpacing),
|
|
6222
6229
|
["--ls-body"]: mapLetterSpacing(typography.body.letterSpacing),
|
|
6223
6230
|
...typography.headings.h1.letterSpacing ? { ["--ls-h1"]: mapLetterSpacing(typography.headings.h1.letterSpacing) } : {},
|
|
@@ -6410,12 +6417,12 @@ var RichTextValueSchema = _zod.z.union([
|
|
|
6410
6417
|
]);
|
|
6411
6418
|
function buildRichTextSchema(options) {
|
|
6412
6419
|
let schema = RichTextValueSchema;
|
|
6413
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6420
|
+
if (_optionalChain([options, 'optionalAccess', _36 => _36.required])) {
|
|
6414
6421
|
const label = _nullishCoalesce(options.label, () => ( "This field"));
|
|
6415
6422
|
schema = schema.refine(
|
|
6416
6423
|
(val) => {
|
|
6417
6424
|
const doc = _nullishCoalesce(val.doc, () => ( val));
|
|
6418
|
-
const content = _optionalChain([doc, 'optionalAccess',
|
|
6425
|
+
const content = _optionalChain([doc, 'optionalAccess', _37 => _37.content]);
|
|
6419
6426
|
if (!content || content.length === 0) return false;
|
|
6420
6427
|
if (content.length === 1 && content[0].type === "paragraph" && !content[0].content) {
|
|
6421
6428
|
return false;
|
|
@@ -6488,13 +6495,13 @@ function buildFieldSchema(field, allowNull, allowIncomplete = false) {
|
|
|
6488
6495
|
return finalizeSchema(schema, required, allowNull, allowIncomplete);
|
|
6489
6496
|
}
|
|
6490
6497
|
function buildTextSchema(field) {
|
|
6491
|
-
const ui = _nullishCoalesce(_optionalChain([field, 'optionalAccess',
|
|
6492
|
-
const inputType = _optionalChain([ui, 'optionalAccess',
|
|
6498
|
+
const ui = _nullishCoalesce(_optionalChain([field, 'optionalAccess', _38 => _38.ui]), () => ( {}));
|
|
6499
|
+
const inputType = _optionalChain([ui, 'optionalAccess', _39 => _39.inputType]);
|
|
6493
6500
|
let schema;
|
|
6494
6501
|
if (inputType === "number") {
|
|
6495
6502
|
schema = _zod.z.coerce.number();
|
|
6496
|
-
if (typeof _optionalChain([ui, 'optionalAccess',
|
|
6497
|
-
if (typeof _optionalChain([ui, 'optionalAccess',
|
|
6503
|
+
if (typeof _optionalChain([ui, 'optionalAccess', _40 => _40.min]) === "number") schema = schema.min(ui.min);
|
|
6504
|
+
if (typeof _optionalChain([ui, 'optionalAccess', _41 => _41.max]) === "number") schema = schema.max(ui.max);
|
|
6498
6505
|
} else {
|
|
6499
6506
|
schema = _zod.z.string();
|
|
6500
6507
|
if (inputType === "email") {
|
|
@@ -6504,7 +6511,7 @@ function buildTextSchema(field) {
|
|
|
6504
6511
|
const TEL_RE = /^[+()0-9\s\-]{3,}$/;
|
|
6505
6512
|
schema = schema.regex(TEL_RE, `${field.label} must be a valid phone number`);
|
|
6506
6513
|
}
|
|
6507
|
-
if (_optionalChain([ui, 'optionalAccess',
|
|
6514
|
+
if (_optionalChain([ui, 'optionalAccess', _42 => _42.pattern])) {
|
|
6508
6515
|
try {
|
|
6509
6516
|
const re = new RegExp(ui.pattern);
|
|
6510
6517
|
schema = schema.regex(re, `${field.label} is not in the correct format`);
|
|
@@ -6584,7 +6591,7 @@ function buildLinkSchema() {
|
|
|
6584
6591
|
}
|
|
6585
6592
|
function buildSelectSchema(field) {
|
|
6586
6593
|
const ui = field.ui;
|
|
6587
|
-
if (_optionalChain([ui, 'optionalAccess',
|
|
6594
|
+
if (_optionalChain([ui, 'optionalAccess', _43 => _43.widget]) === "sdkSelect") {
|
|
6588
6595
|
const anyStringSchema = _zod.z.string();
|
|
6589
6596
|
if (field.multiple) {
|
|
6590
6597
|
const arraySchema = _zod.z.array(anyStringSchema);
|
|
@@ -6608,11 +6615,11 @@ function buildReferenceSchema(field) {
|
|
|
6608
6615
|
return schema;
|
|
6609
6616
|
}
|
|
6610
6617
|
function buildRepeaterSchema(field, allowNull, allowIncomplete) {
|
|
6611
|
-
const parsed = _chunkEGTDJ4PLjs.fieldSchema.array().parse(_nullishCoalesce(_optionalChain([field, 'access',
|
|
6618
|
+
const parsed = _chunkEGTDJ4PLjs.fieldSchema.array().parse(_nullishCoalesce(_optionalChain([field, 'access', _44 => _44.schema, 'optionalAccess', _45 => _45.fields]), () => ( [])));
|
|
6612
6619
|
const childShape = {};
|
|
6613
6620
|
for (const child of parsed) {
|
|
6614
|
-
if (child.type === "group" && _optionalChain([child, 'access',
|
|
6615
|
-
const groupParsed = _chunkEGTDJ4PLjs.fieldSchema.array().parse(_nullishCoalesce(_optionalChain([child, 'access',
|
|
6621
|
+
if (child.type === "group" && _optionalChain([child, 'access', _46 => _46.ui, 'optionalAccess', _47 => _47.flattenInRepeater])) {
|
|
6622
|
+
const groupParsed = _chunkEGTDJ4PLjs.fieldSchema.array().parse(_nullishCoalesce(_optionalChain([child, 'access', _48 => _48.schema, 'optionalAccess', _49 => _49.fields]), () => ( [])));
|
|
6616
6623
|
for (const gc of groupParsed) {
|
|
6617
6624
|
childShape[gc.id] = buildFieldSchema(gc, allowNull, allowIncomplete);
|
|
6618
6625
|
}
|
|
@@ -6631,7 +6638,7 @@ function buildRepeaterSchema(field, allowNull, allowIncomplete) {
|
|
|
6631
6638
|
return arraySchema;
|
|
6632
6639
|
}
|
|
6633
6640
|
function buildGroupSchema(field, allowNull, allowIncomplete) {
|
|
6634
|
-
const parsed = _chunkEGTDJ4PLjs.fieldSchema.array().parse(_nullishCoalesce(_optionalChain([field, 'access',
|
|
6641
|
+
const parsed = _chunkEGTDJ4PLjs.fieldSchema.array().parse(_nullishCoalesce(_optionalChain([field, 'access', _50 => _50.schema, 'optionalAccess', _51 => _51.fields]), () => ( [])));
|
|
6635
6642
|
const childShape = {};
|
|
6636
6643
|
for (const child of parsed) {
|
|
6637
6644
|
childShape[child.id] = buildFieldSchema(child, allowNull, allowIncomplete);
|
|
@@ -6772,7 +6779,7 @@ function getFragmentRegistry() {
|
|
|
6772
6779
|
|
|
6773
6780
|
// ../blocks/src/system/transforms/registry/core.ts
|
|
6774
6781
|
function runTransforms(value, transforms, context, registry) {
|
|
6775
|
-
if (!_optionalChain([transforms, 'optionalAccess',
|
|
6782
|
+
if (!_optionalChain([transforms, 'optionalAccess', _52 => _52.length])) return value;
|
|
6776
6783
|
return transforms.reduce((acc, step) => {
|
|
6777
6784
|
const transform = registry.get(step.id);
|
|
6778
6785
|
if (!transform) {
|
|
@@ -6855,7 +6862,7 @@ var resolveImageClassNameTransform = {
|
|
|
6855
6862
|
kind: "string",
|
|
6856
6863
|
summary: "Resolve className for background image based on objectFit, scale and position",
|
|
6857
6864
|
run: (value, options, _context) => {
|
|
6858
|
-
const baseClass = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6865
|
+
const baseClass = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _53 => _53.baseClass]), () => ( "absolute -z-10"));
|
|
6859
6866
|
if (!value || typeof value !== "object") return `${baseClass} inset-0 h-full w-full`;
|
|
6860
6867
|
const input = value;
|
|
6861
6868
|
const objectFit = isString(input.objectFit) ? input.objectFit.trim() : null;
|
|
@@ -6897,7 +6904,7 @@ var backgroundTransforms = [
|
|
|
6897
6904
|
const opacity = isNumber(input.opacity) ? input.opacity : isString(input.opacity) ? parseFloat(input.opacity) : null;
|
|
6898
6905
|
const style = {};
|
|
6899
6906
|
if (color) {
|
|
6900
|
-
const isToken = Boolean(_optionalChain([context, 'optionalAccess',
|
|
6907
|
+
const isToken = Boolean(_optionalChain([context, 'optionalAccess', _54 => _54.theme, 'optionalAccess', _55 => _55.palette, 'optionalAccess', _56 => _56[color]]) || color === "transparent" || color === "surface");
|
|
6901
6908
|
if (!isToken) {
|
|
6902
6909
|
style.backgroundColor = color;
|
|
6903
6910
|
}
|
|
@@ -6916,7 +6923,7 @@ var backgroundTransforms = [
|
|
|
6916
6923
|
kind: "string",
|
|
6917
6924
|
summary: "Map background color token to Tailwind class with auto-overflow for custom sizing",
|
|
6918
6925
|
run: (value, options, context) => {
|
|
6919
|
-
const baseClass = _optionalChain([options, 'optionalAccess',
|
|
6926
|
+
const baseClass = _optionalChain([options, 'optionalAccess', _57 => _57.baseClass]);
|
|
6920
6927
|
const base = typeof baseClass === "string" && baseClass.trim().length > 0 ? baseClass.trim() : "";
|
|
6921
6928
|
if (!value || typeof value !== "object") return base;
|
|
6922
6929
|
const input = value;
|
|
@@ -6925,7 +6932,7 @@ var backgroundTransforms = [
|
|
|
6925
6932
|
const classes = [];
|
|
6926
6933
|
if (base) classes.push(base);
|
|
6927
6934
|
if (color) {
|
|
6928
|
-
const isToken = Boolean(_optionalChain([context, 'optionalAccess',
|
|
6935
|
+
const isToken = Boolean(_optionalChain([context, 'optionalAccess', _58 => _58.theme, 'optionalAccess', _59 => _59.palette, 'optionalAccess', _60 => _60[color]]) || color === "transparent" || color === "surface");
|
|
6929
6936
|
if (isToken) {
|
|
6930
6937
|
classes.push(`bg-${color}`);
|
|
6931
6938
|
}
|
|
@@ -6998,8 +7005,8 @@ var spacingTransform = {
|
|
|
6998
7005
|
kind: "string",
|
|
6999
7006
|
summary: "Map semantic spacing value to Tailwind padding classes",
|
|
7000
7007
|
run: (value, options, _context) => {
|
|
7001
|
-
const axis = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7002
|
-
const baseClass = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7008
|
+
const axis = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _61 => _61.axis]), () => ( "all"));
|
|
7009
|
+
const baseClass = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _62 => _62.baseClass]), () => ( ""));
|
|
7003
7010
|
if (!value || typeof value !== "string") {
|
|
7004
7011
|
return baseClass.trim() || "";
|
|
7005
7012
|
}
|
|
@@ -7023,7 +7030,7 @@ var raisedTransform = {
|
|
|
7023
7030
|
if (value !== true) {
|
|
7024
7031
|
return baseClass.trim() || "";
|
|
7025
7032
|
}
|
|
7026
|
-
const shadowValue = _optionalChain([context, 'access',
|
|
7033
|
+
const shadowValue = _optionalChain([context, 'access', _63 => _63.theme, 'optionalAccess', _64 => _64.shadow, 'optionalAccess', _65 => _65.medium]);
|
|
7027
7034
|
if (!shadowValue || shadowValue === "none") {
|
|
7028
7035
|
return baseClass.trim() || "";
|
|
7029
7036
|
}
|
|
@@ -7065,7 +7072,7 @@ var boxStylesCompositeTransform = {
|
|
|
7065
7072
|
summary: "Composite transform for all box style properties",
|
|
7066
7073
|
run: (value, options, context) => {
|
|
7067
7074
|
if (!value || typeof value !== "object") {
|
|
7068
|
-
return _optionalChain([options, 'access',
|
|
7075
|
+
return _optionalChain([options, 'access', _66 => _66.baseClass, 'optionalAccess', _67 => _67.trim, 'call', _68 => _68()]) || "";
|
|
7069
7076
|
}
|
|
7070
7077
|
const input = value;
|
|
7071
7078
|
const axis = _nullishCoalesce(options.axis, () => ( "all"));
|
|
@@ -7100,12 +7107,12 @@ var sectionClassNameTransform = {
|
|
|
7100
7107
|
kind: "string",
|
|
7101
7108
|
summary: "Resolve section className from spacing and fullWidth setting",
|
|
7102
7109
|
run: (value, options, context) => {
|
|
7103
|
-
const baseClass = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7104
|
-
const containerStylesPath = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7105
|
-
const defaultSpacing = _optionalChain([options, 'optionalAccess',
|
|
7110
|
+
const baseClass = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _69 => _69.baseClass]), () => ( ""));
|
|
7111
|
+
const containerStylesPath = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _70 => _70.containerStylesPath]), () => ( "_containerStyles"));
|
|
7112
|
+
const defaultSpacing = _optionalChain([options, 'optionalAccess', _71 => _71.defaultSpacing]);
|
|
7106
7113
|
const contextData = context.data;
|
|
7107
|
-
const containerStyles = _optionalChain([contextData, 'optionalAccess',
|
|
7108
|
-
const fullWidth = _optionalChain([containerStyles, 'optionalAccess',
|
|
7114
|
+
const containerStyles = _optionalChain([contextData, 'optionalAccess', _72 => _72[containerStylesPath]]);
|
|
7115
|
+
const fullWidth = _optionalChain([containerStyles, 'optionalAccess', _73 => _73.fullWidth]) === true;
|
|
7109
7116
|
let adjustedBaseClass = baseClass;
|
|
7110
7117
|
if (fullWidth && baseClass) {
|
|
7111
7118
|
adjustedBaseClass = baseClass.split(" ").filter((cls) => !cls.startsWith("px-")).join(" ").trim();
|
|
@@ -7136,7 +7143,7 @@ var containerStylesResolveClassName = {
|
|
|
7136
7143
|
kind: "string",
|
|
7137
7144
|
summary: "Resolve container className based on fullWidth setting",
|
|
7138
7145
|
run: (value, options, _context) => {
|
|
7139
|
-
const baseClass = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7146
|
+
const baseClass = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _74 => _74.baseClass]), () => ( ""));
|
|
7140
7147
|
if (!value || typeof value !== "object") {
|
|
7141
7148
|
const defaultClass = "container mx-auto";
|
|
7142
7149
|
return baseClass ? `${baseClass} ${defaultClass}`.trim() : defaultClass;
|
|
@@ -7342,7 +7349,7 @@ function renderMarks(text, marks, key) {
|
|
|
7342
7349
|
}
|
|
7343
7350
|
function renderDoc(node, key) {
|
|
7344
7351
|
if (!node || !node.type) return null;
|
|
7345
|
-
const children = _optionalChain([node, 'access',
|
|
7352
|
+
const children = _optionalChain([node, 'access', _75 => _75.content, 'optionalAccess', _76 => _76.map, 'call', _77 => _77((child, index) => renderDoc(child, `${key}-${index}`))]);
|
|
7346
7353
|
switch (node.type) {
|
|
7347
7354
|
case "doc":
|
|
7348
7355
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children });
|
|
@@ -7350,7 +7357,7 @@ function renderDoc(node, key) {
|
|
|
7350
7357
|
if (!children && !node.text) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", {}, key);
|
|
7351
7358
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { children: _nullishCoalesce(children, () => ( renderMarks(_nullishCoalesce(node.text, () => ( "")), node.marks, key))) }, key);
|
|
7352
7359
|
case "heading": {
|
|
7353
|
-
const level = Math.min(Math.max(_nullishCoalesce(_optionalChain([node, 'access',
|
|
7360
|
+
const level = Math.min(Math.max(_nullishCoalesce(_optionalChain([node, 'access', _78 => _78.attrs, 'optionalAccess', _79 => _79.level]), () => ( 2)), 1), 6);
|
|
7354
7361
|
const headingTag = `h${level}`;
|
|
7355
7362
|
return React5.default.createElement(headingTag, { key }, children);
|
|
7356
7363
|
}
|
|
@@ -7389,7 +7396,7 @@ var TextNode = ({ value, children, blockId: _blockId, blockKind: _blockKind, blo
|
|
|
7389
7396
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Text, { ...rest, children: _nullishCoalesce(value, () => ( children)) });
|
|
7390
7397
|
};
|
|
7391
7398
|
var RichTextNode = ({ value, blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, pathBase: _pathBase, ...rest }) => {
|
|
7392
|
-
const doc = _nullishCoalesce(_optionalChain([value, 'optionalAccess',
|
|
7399
|
+
const doc = _nullishCoalesce(_optionalChain([value, 'optionalAccess', _80 => _80.doc]), () => ( value));
|
|
7393
7400
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RichText, { doc, ...rest });
|
|
7394
7401
|
};
|
|
7395
7402
|
var ButtonNode = ({
|
|
@@ -7467,7 +7474,7 @@ var FormNodeSSR = ({ value, submitLabel, successMessage: _successMessage, classN
|
|
|
7467
7474
|
}
|
|
7468
7475
|
);
|
|
7469
7476
|
}
|
|
7470
|
-
const fields = _optionalChain([form, 'optionalAccess',
|
|
7477
|
+
const fields = _optionalChain([form, 'optionalAccess', _81 => _81.schemaJson, 'optionalAccess', _82 => _82.fields]);
|
|
7471
7478
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { method: "POST", action: "/api/forms/submit", className: clsx_default("space-y-4", className), children: [
|
|
7472
7479
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "input", { type: "hidden", name: "form_id", value: form.id }),
|
|
7473
7480
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "input", { type: "text", name: "company", className: "hidden", tabIndex: -1, autoComplete: "off" }),
|
|
@@ -8106,7 +8113,7 @@ function extractSegmentsFromPart(part) {
|
|
|
8106
8113
|
segments.push(baseMatch[1]);
|
|
8107
8114
|
}
|
|
8108
8115
|
const bracketMatches = Array.from(part.matchAll(BRACKET_ACCESS_REGEX));
|
|
8109
|
-
const bracketSegments = bracketMatches.map((match) => _nullishCoalesce(_optionalChain([match, 'access',
|
|
8116
|
+
const bracketSegments = bracketMatches.map((match) => _nullishCoalesce(_optionalChain([match, 'access', _83 => _83.groups, 'optionalAccess', _84 => _84.token]), () => ( ""))).filter((token) => token.length > 0).map(parseBracketToken);
|
|
8110
8117
|
segments.push(...bracketSegments);
|
|
8111
8118
|
if (!baseMatch && !part.includes("[")) {
|
|
8112
8119
|
return [part];
|
|
@@ -8129,7 +8136,7 @@ function getAbsoluteSegments(fromPath, context) {
|
|
|
8129
8136
|
return [first === "$root" ? "$root" : "content", ...rest];
|
|
8130
8137
|
}
|
|
8131
8138
|
const scoped = context.scopes.find((entry) => entry.name === first);
|
|
8132
|
-
if (_optionalChain([scoped, 'optionalAccess',
|
|
8139
|
+
if (_optionalChain([scoped, 'optionalAccess', _85 => _85.basePathSegments]) && scoped.basePathSegments.length > 0) {
|
|
8133
8140
|
return [...scoped.basePathSegments, ...rest];
|
|
8134
8141
|
}
|
|
8135
8142
|
return void 0;
|
|
@@ -8184,7 +8191,7 @@ function applyTransformsAndFallback(value, binding, context) {
|
|
|
8184
8191
|
const routeMap = _nullishCoalesce(context.routes, () => ( extractRouteMapFromViewModel(context.viewModel)));
|
|
8185
8192
|
const transformed = runTransforms(
|
|
8186
8193
|
value,
|
|
8187
|
-
_nullishCoalesce(_optionalChain([binding, 'access',
|
|
8194
|
+
_nullishCoalesce(_optionalChain([binding, 'access', _86 => _86.transforms, 'optionalAccess', _87 => _87.map, 'call', _88 => _88((step) => ({ id: step.id, options: step.options }))]), () => ( [])),
|
|
8188
8195
|
{ theme: _nullishCoalesce(context.theme, () => ( defaultThemeTokens)), routes: routeMap },
|
|
8189
8196
|
transforms
|
|
8190
8197
|
);
|
|
@@ -8368,7 +8375,7 @@ function injectEditorPath(props, node, parsedBinding, context) {
|
|
|
8368
8375
|
};
|
|
8369
8376
|
}
|
|
8370
8377
|
function resolveChildren(nodes, context) {
|
|
8371
|
-
if (!_optionalChain([nodes, 'optionalAccess',
|
|
8378
|
+
if (!_optionalChain([nodes, 'optionalAccess', _89 => _89.length])) return [];
|
|
8372
8379
|
return nodes.flatMap((child, index) => {
|
|
8373
8380
|
const childContext = { ...context, scopes: [...context.scopes] };
|
|
8374
8381
|
const resolved = resolveNode2(child, childContext, index);
|
|
@@ -8390,7 +8397,7 @@ function resolveNode2(node, context, indexFallback) {
|
|
|
8390
8397
|
const normalizedType = node.type.toLowerCase();
|
|
8391
8398
|
const component = _nullishCoalesce(_nullishCoalesce(registry[node.type], () => ( registry[normalizedType])), () => ( (normalizedType === "section" ? SectionNode : void 0)));
|
|
8392
8399
|
if (!component) {
|
|
8393
|
-
if (_optionalChain([globalThis, 'optionalAccess',
|
|
8400
|
+
if (_optionalChain([globalThis, 'optionalAccess', _90 => _90.process, 'optionalAccess', _91 => _91.env, 'optionalAccess', _92 => _92.NODE_ENV]) !== "production") {
|
|
8394
8401
|
console.warn(`[block-system] Missing renderer for node type: ${node.type}`);
|
|
8395
8402
|
}
|
|
8396
8403
|
return null;
|
|
@@ -8489,11 +8496,11 @@ function resolveBlockLayout(manifest, content) {
|
|
|
8489
8496
|
if (!manifest.variants) {
|
|
8490
8497
|
return _nullishCoalesce(manifest.layout, () => ( null));
|
|
8491
8498
|
}
|
|
8492
|
-
const contentVariant = _optionalChain([content, 'optionalAccess',
|
|
8499
|
+
const contentVariant = _optionalChain([content, 'optionalAccess', _93 => _93.variant]);
|
|
8493
8500
|
if (typeof contentVariant === "string" && manifest.variants[contentVariant]) {
|
|
8494
8501
|
return manifest.variants[contentVariant];
|
|
8495
8502
|
}
|
|
8496
|
-
const contentLayout = _optionalChain([content, 'optionalAccess',
|
|
8503
|
+
const contentLayout = _optionalChain([content, 'optionalAccess', _94 => _94.layout]);
|
|
8497
8504
|
if (typeof contentLayout === "string" && manifest.variants[contentLayout]) {
|
|
8498
8505
|
return manifest.variants[contentLayout];
|
|
8499
8506
|
}
|
|
@@ -8550,7 +8557,7 @@ function makeDefaultBlockComponent(args) {
|
|
|
8550
8557
|
...typeof themeConfig !== "undefined" ? { theme: themeConfig } : {}
|
|
8551
8558
|
}
|
|
8552
8559
|
};
|
|
8553
|
-
const themeForTransforms = _optionalChain([themeConfig, 'optionalAccess',
|
|
8560
|
+
const themeForTransforms = _optionalChain([themeConfig, 'optionalAccess', _95 => _95.buttons]) ? { ...theme, buttons: themeConfig.buttons } : theme;
|
|
8554
8561
|
return resolveTree(layout, {
|
|
8555
8562
|
registry,
|
|
8556
8563
|
viewModel,
|
|
@@ -8589,7 +8596,7 @@ function renderBlock(manifest, content, options = {}) {
|
|
|
8589
8596
|
|
|
8590
8597
|
// ../blocks/src/system/manifest/hydrateLinks.ts
|
|
8591
8598
|
function hydrateManifestLinks(manifest, content, routes) {
|
|
8592
|
-
if (!routes || !_optionalChain([manifest, 'optionalAccess',
|
|
8599
|
+
if (!routes || !_optionalChain([manifest, 'optionalAccess', _96 => _96.fields, 'optionalAccess', _97 => _97.length])) {
|
|
8593
8600
|
return content;
|
|
8594
8601
|
}
|
|
8595
8602
|
const hydrated = hydrateValue(content, routes);
|
|
@@ -8732,6 +8739,7 @@ function PageRenderer({
|
|
|
8732
8739
|
blockOverrides,
|
|
8733
8740
|
sdkConfig
|
|
8734
8741
|
}) {
|
|
8742
|
+
setContextSupabaseUrl(_optionalChain([dataContext, 'optionalAccess', _98 => _98.supabaseUrl]));
|
|
8735
8743
|
if (!page || page.blocks.length === 0) {
|
|
8736
8744
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-6 text-sm", style: _chunkEGTDJ4PLjs.textColorStyle.call(void 0, "mutedText"), children: "No blocks found." });
|
|
8737
8745
|
}
|
|
@@ -8802,7 +8810,7 @@ var MemoBlockSection = React5.memo(function MemoBlockSection2({
|
|
|
8802
8810
|
}) {
|
|
8803
8811
|
const OverrideComponent = getBlockOverride(block.kind, blockOverrides);
|
|
8804
8812
|
let definition = _chunkEGTDJ4PLjs.getBlockDefinition.call(void 0, block.kind);
|
|
8805
|
-
if (!definition && block.kind.startsWith("custom.") && _optionalChain([sdkConfig, 'optionalAccess',
|
|
8813
|
+
if (!definition && block.kind.startsWith("custom.") && _optionalChain([sdkConfig, 'optionalAccess', _99 => _99.customBlocks])) {
|
|
8806
8814
|
const sdkBlock = sdkConfig.customBlocks.find((b) => b.id === block.kind);
|
|
8807
8815
|
if (sdkBlock) {
|
|
8808
8816
|
definition = transformSdkBlockToDefinition(sdkBlock);
|
|
@@ -8816,14 +8824,14 @@ var MemoBlockSection = React5.memo(function MemoBlockSection2({
|
|
|
8816
8824
|
const validator = createManifestValidator(definition.manifest, { allowNull: false });
|
|
8817
8825
|
const parsed = validator.safeParse(content);
|
|
8818
8826
|
try {
|
|
8819
|
-
const env = _optionalChain([globalThis, 'access',
|
|
8827
|
+
const env = _optionalChain([globalThis, 'access', _100 => _100.process, 'optionalAccess', _101 => _101.env, 'optionalAccess', _102 => _102.NODE_ENV]);
|
|
8820
8828
|
if (env !== "production" && !parsed.success && !usePlaceholders) {
|
|
8821
8829
|
console.warn("[blocks:PageRenderer] manifest validation failed", {
|
|
8822
8830
|
blockId: _nullishCoalesce(block.id, () => ( null)),
|
|
8823
8831
|
blockKind: block.kind,
|
|
8824
8832
|
content: summarizeValue(content),
|
|
8825
8833
|
expectedFields: (_nullishCoalesce(definition.manifest.fields, () => ( []))).map((f) => ({ id: f.id, type: f.type, required: !!f.required })),
|
|
8826
|
-
issues: _nullishCoalesce(_optionalChain([parsed, 'optionalAccess',
|
|
8834
|
+
issues: _nullishCoalesce(_optionalChain([parsed, 'optionalAccess', _103 => _103.error, 'optionalAccess', _104 => _104.issues]), () => ( null))
|
|
8827
8835
|
});
|
|
8828
8836
|
}
|
|
8829
8837
|
} catch (e6) {
|
|
@@ -8844,7 +8852,7 @@ var MemoBlockSection = React5.memo(function MemoBlockSection2({
|
|
|
8844
8852
|
return wrapBlock && block.id ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: wrapBlock(block.id, rendered) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: rendered });
|
|
8845
8853
|
}
|
|
8846
8854
|
try {
|
|
8847
|
-
const routes = _nullishCoalesce(routeMap, () => ( _optionalChain([dataContext, 'optionalAccess',
|
|
8855
|
+
const routes = _nullishCoalesce(routeMap, () => ( _optionalChain([dataContext, 'optionalAccess', _105 => _105.routes])));
|
|
8848
8856
|
const hydratedContent = routes ? hydrateManifestLinks(definition.manifest, data, routes) : data;
|
|
8849
8857
|
const resolved = resolveBlockData({
|
|
8850
8858
|
block,
|
|
@@ -8867,13 +8875,13 @@ var MemoBlockSection = React5.memo(function MemoBlockSection2({
|
|
|
8867
8875
|
const pathBase = typeof block.id === "string" && block.id.length > 0 ? `blocks.${block.id}.` : void 0;
|
|
8868
8876
|
const rootContext = {
|
|
8869
8877
|
$root: {
|
|
8870
|
-
siteId: _nullishCoalesce(_optionalChain([dataContext, 'optionalAccess',
|
|
8871
|
-
pageId: _nullishCoalesce(_optionalChain([dataContext, 'optionalAccess',
|
|
8872
|
-
previewStage: _nullishCoalesce(_optionalChain([dataContext, 'optionalAccess',
|
|
8878
|
+
siteId: _nullishCoalesce(_optionalChain([dataContext, 'optionalAccess', _106 => _106.siteId]), () => ( null)),
|
|
8879
|
+
pageId: _nullishCoalesce(_optionalChain([dataContext, 'optionalAccess', _107 => _107.pageId]), () => ( null)),
|
|
8880
|
+
previewStage: _nullishCoalesce(_optionalChain([dataContext, 'optionalAccess', _108 => _108.previewStage]), () => ( "published")),
|
|
8873
8881
|
...routes ? { routes } : {},
|
|
8874
8882
|
// Occurrence and content entry context for template pages
|
|
8875
|
-
occurrenceContext: _nullishCoalesce(_optionalChain([dataContext, 'optionalAccess',
|
|
8876
|
-
contentEntry: _nullishCoalesce(_optionalChain([dataContext, 'optionalAccess',
|
|
8883
|
+
occurrenceContext: _nullishCoalesce(_optionalChain([dataContext, 'optionalAccess', _109 => _109.occurrenceContext]), () => ( null)),
|
|
8884
|
+
contentEntry: _nullishCoalesce(_optionalChain([dataContext, 'optionalAccess', _110 => _110.contentEntry]), () => ( null))
|
|
8877
8885
|
}
|
|
8878
8886
|
};
|
|
8879
8887
|
const blockBindings = _nullishCoalesce(block.bindings, () => ( void 0));
|
|
@@ -8910,7 +8918,7 @@ function resolveBlockData({ block, definition, dataContext }) {
|
|
|
8910
8918
|
}
|
|
8911
8919
|
const blockId = _nullishCoalesce(block.id, () => ( null));
|
|
8912
8920
|
if (!blockId) return void 0;
|
|
8913
|
-
const raw = _optionalChain([dataContext, 'optionalAccess',
|
|
8921
|
+
const raw = _optionalChain([dataContext, 'optionalAccess', _111 => _111.resolvedData, 'optionalAccess', _112 => _112[blockId]]);
|
|
8914
8922
|
if (!raw || typeof raw !== "object") {
|
|
8915
8923
|
return {};
|
|
8916
8924
|
}
|
|
@@ -8964,11 +8972,11 @@ var isNumber2 = (value) => typeof value === "number" && !isNaN(value);
|
|
|
8964
8972
|
function resolveColor(color, theme) {
|
|
8965
8973
|
if (!color || !isString2(color)) return null;
|
|
8966
8974
|
const trimmed = color.trim();
|
|
8967
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
8975
|
+
if (_optionalChain([theme, 'optionalAccess', _113 => _113.palette, 'optionalAccess', _114 => _114[trimmed]])) {
|
|
8968
8976
|
return theme.palette[trimmed];
|
|
8969
8977
|
}
|
|
8970
8978
|
if (trimmed === "transparent") return "transparent";
|
|
8971
|
-
if (trimmed === "surface" && _optionalChain([theme, 'optionalAccess',
|
|
8979
|
+
if (trimmed === "surface" && _optionalChain([theme, 'optionalAccess', _115 => _115.palette, 'optionalAccess', _116 => _116.surface])) {
|
|
8972
8980
|
return theme.palette.surface;
|
|
8973
8981
|
}
|
|
8974
8982
|
return trimmed;
|
|
@@ -9533,4 +9541,4 @@ chroma-js/src/utils/contrastAPCA.js:
|
|
|
9533
9541
|
* https://readtech.org/ARC/
|
|
9534
9542
|
*)
|
|
9535
9543
|
*/
|
|
9536
|
-
//# sourceMappingURL=chunk-
|
|
9544
|
+
//# sourceMappingURL=chunk-VHDDXCK6.js.map
|