@riverbankcms/sdk 0.62.2 → 0.62.4
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/_dts/api/src/accessAdmin.d.ts +7 -0
- package/dist/_dts/api/src/bookingClosures.d.ts +106 -0
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +18 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +1 -1
- package/dist/_dts/api/src/calendar.d.ts +11 -1
- package/dist/_dts/api/src/contentRuntime.d.ts +2 -0
- package/dist/_dts/api/src/contentVersionHistory.d.ts +52 -0
- package/dist/_dts/api/src/contentVersionHistoryClient.d.ts +45 -0
- package/dist/_dts/api/src/endpoints.d.ts +110 -6
- package/dist/_dts/api/src/index.d.ts +4 -1
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +31 -7
- package/dist/_dts/api/src/siteMembers.d.ts +10 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +33 -12
- package/dist/_dts/api/src/types.d.ts +2 -1
- package/dist/_dts/api/src/url.d.ts +3 -3
- package/dist/_dts/blocks/src/bindings/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.state.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/FieldValidationMessage.d.ts +19 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/TerminalPanel.d.ts +8 -2
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/themeColorResolution.d.ts +7 -0
- package/dist/_dts/content-editor/src/hooks/useDebouncedLatestSave.d.ts +24 -0
- package/dist/_dts/content-editor/src/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/ui/stores/autosaveStore.d.ts +1 -0
- package/dist/_dts/content-editor/src/ui/stores/types.d.ts +1 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +208 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/blocks/BlockToolbar.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/composePageFromBlocks.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/index.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/blocks/composer/mergeDrafts.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +31 -8
- package/dist/_dts/preview-next/src/client/blocks/pageDesignRuntimePreview.d.ts +6 -5
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/aiProposalProjection.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/applyPreviewProjections.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/index.d.ts +4 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.d.ts +5 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +72 -0
- package/dist/_dts/preview-next/src/client/index.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/layout/PreviewLayoutContext.d.ts +6 -5
- package/dist/_dts/preview-next/src/client/preview/PageDesignEditorStateContext.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +11 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +9 -5
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +6 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +13 -2
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +7 -1
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeControlStyles.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeHistory.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeRuntimePatch.d.ts +9 -1
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeWorkflowState.d.ts +13 -0
- package/dist/_dts/preview-next/src/client/preview/sidebarTabPreference.d.ts +8 -2
- package/dist/_dts/preview-next/src/client/preview/siteChromeLookRows.d.ts +49 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +3 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/surfaces/src/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/index.d.ts +1 -1
- package/dist/_dts/theme-core/src/palette/variants/types.d.ts +2 -21
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +3 -67
- package/dist/_dts/theme-core/src/site-styles/appearancePresetTypes.d.ts +4 -62
- package/dist/_dts/theme-core/src/site-styles/appearancePresets.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +24 -0
- package/dist/_dts/theme-core/src/site-styles/customizableSurfaces.d.ts +94 -0
- package/dist/_dts/theme-core/src/site-styles/footerLooks.d.ts +59 -0
- package/dist/_dts/theme-core/src/site-styles/generatedDesignPipeline.d.ts +4 -0
- package/dist/_dts/theme-core/src/site-styles/headerCtaVariants.d.ts +3 -0
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +155 -0
- package/dist/_dts/theme-core/src/site-styles/headerOpeningSection.d.ts +15 -0
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +6 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignAuthority.d.ts +7 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +25 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +15 -1
- package/dist/_dts/theme-core/src/site-styles/records.d.ts +1 -0
- package/dist/_dts/theme-core/src/site-styles/siteStyleBlockPolicies.d.ts +96 -0
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +1 -2
- package/dist/_dts/theme-core/src/siteChrome.d.ts +44 -2
- package/dist/_dts/theme-core/src/tokens/colorTokenParts.d.ts +13 -0
- package/dist/_dts/theme-core/src/tokens/index.d.ts +2 -0
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +29 -0
- package/dist/_dts/theme-core/src/utils/tokenOrColor.d.ts +27 -1
- package/dist/cli/index.mjs +1139 -471
- package/dist/client/bookings.mjs +519 -368
- package/dist/client/client.mjs +4507 -3535
- package/dist/client/hooks.mjs +2634 -2035
- package/dist/client/rendering/client.mjs +4413 -3549
- package/dist/client/rendering/islands.mjs +3456 -2589
- package/dist/client/rendering.mjs +4921 -3949
- package/dist/preview-next/before-render.mjs +138 -6
- package/dist/preview-next/client/runtime.mjs +3541 -1573
- package/dist/preview-next/editor-base.css +31 -0
- package/dist/preview-next/middleware.mjs +131 -6
- package/dist/server/components.mjs +3214 -2560
- package/dist/server/config-validation.mjs +2859 -2260
- package/dist/server/config.mjs +2859 -2260
- package/dist/server/data.mjs +2634 -2035
- package/dist/server/index.mjs +132 -7
- package/dist/server/next.mjs +2983 -2329
- package/dist/server/page-converter.mjs +2478 -2029
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3214 -2560
- package/dist/server/rendering.mjs +3233 -2579
- package/dist/server/routing.mjs +2725 -2028
- package/dist/server/server.mjs +2636 -2037
- package/dist/server/theme-bridge.mjs +1250 -767
- package/dist/server/theme.mjs +623 -498
- package/dist/styles/index.css +33 -0
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/colorResolution.d.ts +0 -13
- package/dist/_dts/preview-next/src/client/blocks/overlay.d.ts +0 -30
- package/dist/_dts/theme-core/src/site-styles/siteChromeAppearancePresets.d.ts +0 -67
package/dist/cli/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
2
|
+
import z44, { z, ZodError } from 'zod';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import { createJiti } from 'jiti';
|
|
5
5
|
import * as path3 from 'path';
|
|
@@ -2126,90 +2126,11 @@ var init_blockAppearancePresets = __esm({
|
|
|
2126
2126
|
];
|
|
2127
2127
|
}
|
|
2128
2128
|
});
|
|
2129
|
-
|
|
2130
|
-
// ../theme-core/src/site-styles/siteChromeAppearancePresets.ts
|
|
2131
|
-
function defineSiteChromeAppearancePreset(preset2) {
|
|
2132
|
-
return preset2;
|
|
2133
|
-
}
|
|
2134
|
-
var siteChromeAppearancePresets;
|
|
2135
|
-
var init_siteChromeAppearancePresets = __esm({
|
|
2136
|
-
"../theme-core/src/site-styles/siteChromeAppearancePresets.ts"() {
|
|
2137
|
-
siteChromeAppearancePresets = [
|
|
2138
|
-
defineSiteChromeAppearancePreset({
|
|
2139
|
-
kind: "site-chrome",
|
|
2140
|
-
id: "header-clean-base",
|
|
2141
|
-
target: "site-header",
|
|
2142
|
-
label: "Clean base header",
|
|
2143
|
-
header: {
|
|
2144
|
-
surface: {
|
|
2145
|
-
kind: "neutral-solid",
|
|
2146
|
-
token: "surface",
|
|
2147
|
-
textColorToken: "text"
|
|
2148
|
-
},
|
|
2149
|
-
navTreatment: "minimal",
|
|
2150
|
-
dropdownTreatment: "surface",
|
|
2151
|
-
ctaTreatment: "default",
|
|
2152
|
-
behavior: "default"
|
|
2153
|
-
}
|
|
2154
|
-
}),
|
|
2155
|
-
defineSiteChromeAppearancePreset({
|
|
2156
|
-
kind: "site-chrome",
|
|
2157
|
-
id: "site-header-brand-solid-inverted-cta",
|
|
2158
|
-
target: "site-header",
|
|
2159
|
-
label: "Brand solid header with inverted CTA",
|
|
2160
|
-
header: {
|
|
2161
|
-
surface: {
|
|
2162
|
-
kind: "brand-solid",
|
|
2163
|
-
token: "primary",
|
|
2164
|
-
textColorToken: "primaryForeground"
|
|
2165
|
-
},
|
|
2166
|
-
navTreatment: "uppercase-underline",
|
|
2167
|
-
dropdownTreatment: "matched-solid",
|
|
2168
|
-
ctaTreatment: "inverted",
|
|
2169
|
-
behavior: "sticky-shrink"
|
|
2170
|
-
}
|
|
2171
|
-
}),
|
|
2172
|
-
defineSiteChromeAppearancePreset({
|
|
2173
|
-
kind: "site-chrome",
|
|
2174
|
-
id: "footer-muted-grounding",
|
|
2175
|
-
target: "site-footer",
|
|
2176
|
-
label: "Muted grounding footer",
|
|
2177
|
-
footer: {
|
|
2178
|
-
kind: "grounding",
|
|
2179
|
-
surface: "muted-band",
|
|
2180
|
-
emphasis: "low"
|
|
2181
|
-
}
|
|
2182
|
-
}),
|
|
2183
|
-
defineSiteChromeAppearancePreset({
|
|
2184
|
-
kind: "site-chrome",
|
|
2185
|
-
id: "site-footer-brand-two-band",
|
|
2186
|
-
target: "site-footer",
|
|
2187
|
-
label: "Two-band brand footer",
|
|
2188
|
-
footer: {
|
|
2189
|
-
kind: "brand-two-band",
|
|
2190
|
-
surface: {
|
|
2191
|
-
token: "primary",
|
|
2192
|
-
shade: "800",
|
|
2193
|
-
textColorToken: "primaryForeground"
|
|
2194
|
-
},
|
|
2195
|
-
bottomBand: {
|
|
2196
|
-
token: "primary",
|
|
2197
|
-
shade: "900",
|
|
2198
|
-
textColorToken: "primaryForeground"
|
|
2199
|
-
},
|
|
2200
|
-
emphasis: "high"
|
|
2201
|
-
}
|
|
2202
|
-
})
|
|
2203
|
-
];
|
|
2204
|
-
}
|
|
2205
|
-
});
|
|
2206
2129
|
var init_appearancePresetCatalog = __esm({
|
|
2207
2130
|
"../theme-core/src/site-styles/appearancePresetCatalog.ts"() {
|
|
2208
2131
|
init_blockAppearancePresets();
|
|
2209
|
-
init_siteChromeAppearancePresets();
|
|
2210
2132
|
[
|
|
2211
|
-
...blockAppearancePresets
|
|
2212
|
-
...siteChromeAppearancePresets
|
|
2133
|
+
...blockAppearancePresets
|
|
2213
2134
|
];
|
|
2214
2135
|
}
|
|
2215
2136
|
});
|
|
@@ -2220,6 +2141,34 @@ var init_appearancePresetTypes = __esm({
|
|
|
2220
2141
|
}
|
|
2221
2142
|
});
|
|
2222
2143
|
|
|
2144
|
+
// ../theme-core/src/site-styles/headerCtaVariants.ts
|
|
2145
|
+
function hasButtonVariant(theme, variantId) {
|
|
2146
|
+
return theme.buttons?.variants.some((variant) => variant.enabled && variant.id === variantId) ?? false;
|
|
2147
|
+
}
|
|
2148
|
+
function resolveHeaderCtaVariant(theme, treatment) {
|
|
2149
|
+
switch (treatment) {
|
|
2150
|
+
case "default":
|
|
2151
|
+
return void 0;
|
|
2152
|
+
case "primary":
|
|
2153
|
+
return "primary";
|
|
2154
|
+
case "secondary":
|
|
2155
|
+
return hasButtonVariant(theme, "secondary") ? "secondary" : "primary";
|
|
2156
|
+
case "inverted":
|
|
2157
|
+
if (hasButtonVariant(theme, "header")) return "header";
|
|
2158
|
+
if (hasButtonVariant(theme, "secondary")) return "secondary";
|
|
2159
|
+
if (hasButtonVariant(theme, "outline")) return "outline";
|
|
2160
|
+
return "primary";
|
|
2161
|
+
case "outline":
|
|
2162
|
+
return hasButtonVariant(theme, "outline") ? "outline" : "secondary";
|
|
2163
|
+
case "ghost":
|
|
2164
|
+
return hasButtonVariant(theme, "ghost") ? "ghost" : "secondary";
|
|
2165
|
+
}
|
|
2166
|
+
}
|
|
2167
|
+
var init_headerCtaVariants = __esm({
|
|
2168
|
+
"../theme-core/src/site-styles/headerCtaVariants.ts"() {
|
|
2169
|
+
}
|
|
2170
|
+
});
|
|
2171
|
+
|
|
2223
2172
|
// ../theme-core/src/site-styles/appearancePresets.ts
|
|
2224
2173
|
var init_appearancePresets = __esm({
|
|
2225
2174
|
"../theme-core/src/site-styles/appearancePresets.ts"() {
|
|
@@ -2227,7 +2176,7 @@ var init_appearancePresets = __esm({
|
|
|
2227
2176
|
init_appearancePresetResolution();
|
|
2228
2177
|
init_appearancePresetTypes();
|
|
2229
2178
|
init_blockAppearancePresets();
|
|
2230
|
-
|
|
2179
|
+
init_headerCtaVariants();
|
|
2231
2180
|
}
|
|
2232
2181
|
});
|
|
2233
2182
|
|
|
@@ -2363,9 +2312,164 @@ var init_contentTemplateDesignIntent = __esm({
|
|
|
2363
2312
|
init_types2();
|
|
2364
2313
|
}
|
|
2365
2314
|
});
|
|
2315
|
+
|
|
2316
|
+
// ../theme-core/src/tokens/colorTokenParts.ts
|
|
2317
|
+
function parseOpacityPercent(source) {
|
|
2318
|
+
const trimmed = source.trim();
|
|
2319
|
+
if (!trimmed) return null;
|
|
2320
|
+
if (!/^\d{1,3}(?:\.\d+)?$/.test(trimmed)) return null;
|
|
2321
|
+
const value = Number(trimmed);
|
|
2322
|
+
if (!Number.isFinite(value)) return null;
|
|
2323
|
+
if (value < 0 || value > 100) return null;
|
|
2324
|
+
return value;
|
|
2325
|
+
}
|
|
2326
|
+
function parseColorTokenParts(source) {
|
|
2327
|
+
const trimmed = source.trim();
|
|
2328
|
+
if (trimmed.startsWith("raw:")) {
|
|
2329
|
+
return { kind: "raw", value: trimmed.slice(4) };
|
|
2330
|
+
}
|
|
2331
|
+
const [token, opacityRaw, extra] = trimmed.split("/");
|
|
2332
|
+
if (!token || extra !== void 0) {
|
|
2333
|
+
return { kind: "invalid", token: trimmed };
|
|
2334
|
+
}
|
|
2335
|
+
if (opacityRaw === void 0) {
|
|
2336
|
+
return { kind: "token", token, opacityPercent: null };
|
|
2337
|
+
}
|
|
2338
|
+
const opacityPercent = parseOpacityPercent(opacityRaw);
|
|
2339
|
+
if (opacityPercent === null) {
|
|
2340
|
+
return { kind: "invalid", token: trimmed };
|
|
2341
|
+
}
|
|
2342
|
+
return { kind: "token", token, opacityPercent };
|
|
2343
|
+
}
|
|
2344
|
+
var init_colorTokenParts = __esm({
|
|
2345
|
+
"../theme-core/src/tokens/colorTokenParts.ts"() {
|
|
2346
|
+
}
|
|
2347
|
+
});
|
|
2348
|
+
|
|
2349
|
+
// ../theme-core/src/tokens/blockColorTokens.ts
|
|
2350
|
+
function isBlockColorToken(value) {
|
|
2351
|
+
if (typeof value !== "string") return false;
|
|
2352
|
+
const parts = parseColorTokenParts(value);
|
|
2353
|
+
return parts.kind === "token" && blockColorTokenNameSet.has(parts.token);
|
|
2354
|
+
}
|
|
2355
|
+
function parseBlockColorToken(value) {
|
|
2356
|
+
if (!isBlockColorToken(value)) return null;
|
|
2357
|
+
return value.trim();
|
|
2358
|
+
}
|
|
2359
|
+
var blockColorTokenNames, blockColorTokenNameSet;
|
|
2360
|
+
var init_blockColorTokens = __esm({
|
|
2361
|
+
"../theme-core/src/tokens/blockColorTokens.ts"() {
|
|
2362
|
+
init_colorTokenParts();
|
|
2363
|
+
blockColorTokenNames = [
|
|
2364
|
+
"text",
|
|
2365
|
+
"heading",
|
|
2366
|
+
"mutedText",
|
|
2367
|
+
"surface",
|
|
2368
|
+
"background",
|
|
2369
|
+
"foreground",
|
|
2370
|
+
"border",
|
|
2371
|
+
"primary",
|
|
2372
|
+
"secondary",
|
|
2373
|
+
"accent",
|
|
2374
|
+
"success",
|
|
2375
|
+
"warning",
|
|
2376
|
+
"info",
|
|
2377
|
+
"error",
|
|
2378
|
+
"destructive",
|
|
2379
|
+
"scrim",
|
|
2380
|
+
"shadow",
|
|
2381
|
+
// Common "on*" tokens used when rendering colored chips/badges.
|
|
2382
|
+
"onPrimary",
|
|
2383
|
+
"onSecondary",
|
|
2384
|
+
"onAccent",
|
|
2385
|
+
"onSuccess",
|
|
2386
|
+
"onWarning",
|
|
2387
|
+
"onInfo",
|
|
2388
|
+
"onError",
|
|
2389
|
+
"onDestructive",
|
|
2390
|
+
"onSurface"
|
|
2391
|
+
];
|
|
2392
|
+
blockColorTokenNameSet = new Set(
|
|
2393
|
+
blockColorTokenNames
|
|
2394
|
+
);
|
|
2395
|
+
}
|
|
2396
|
+
});
|
|
2397
|
+
function isKnownBaseToken(value) {
|
|
2398
|
+
return themeColorBaseTokenSet.has(value);
|
|
2399
|
+
}
|
|
2400
|
+
function isKnownShadeToken(value) {
|
|
2401
|
+
const match = value.match(/^([a-zA-Z][a-zA-Z0-9]*)(?:-([0-9]{2,3}))$/);
|
|
2402
|
+
if (!match) return false;
|
|
2403
|
+
const [, base, shade] = match;
|
|
2404
|
+
return Boolean(base && shade && isKnownBaseToken(base) && shadeStepSet.has(shade));
|
|
2405
|
+
}
|
|
2406
|
+
function isThemeColorTokenBase(value) {
|
|
2407
|
+
return isKnownBaseToken(value) || isKnownShadeToken(value);
|
|
2408
|
+
}
|
|
2409
|
+
function isThemeColorToken(value) {
|
|
2410
|
+
if (typeof value !== "string") return false;
|
|
2411
|
+
const parts = parseColorTokenParts(value);
|
|
2412
|
+
return parts.kind === "token" && isThemeColorTokenBase(parts.token);
|
|
2413
|
+
}
|
|
2414
|
+
function parseThemeColorToken(value) {
|
|
2415
|
+
if (!isThemeColorToken(value)) return null;
|
|
2416
|
+
return value.trim();
|
|
2417
|
+
}
|
|
2418
|
+
var PALETTE_TOKEN_NAMES, paletteTokenNameSchema, themeColorBaseTokenNames, themeColorBaseTokenSet, SHADE_STEPS, shadeStepSet, themeColorTokenSchema;
|
|
2419
|
+
var init_themeColorTokens = __esm({
|
|
2420
|
+
"../theme-core/src/tokens/themeColorTokens.ts"() {
|
|
2421
|
+
init_blockColorTokens();
|
|
2422
|
+
init_colorTokenParts();
|
|
2423
|
+
PALETTE_TOKEN_NAMES = [
|
|
2424
|
+
"primary",
|
|
2425
|
+
"primaryForeground",
|
|
2426
|
+
"secondary",
|
|
2427
|
+
"accent",
|
|
2428
|
+
"success",
|
|
2429
|
+
"warning",
|
|
2430
|
+
"destructive",
|
|
2431
|
+
"background",
|
|
2432
|
+
"surface",
|
|
2433
|
+
"surfaceAlt",
|
|
2434
|
+
"muted",
|
|
2435
|
+
"text",
|
|
2436
|
+
"border"
|
|
2437
|
+
];
|
|
2438
|
+
paletteTokenNameSchema = z.enum(PALETTE_TOKEN_NAMES);
|
|
2439
|
+
themeColorBaseTokenNames = [
|
|
2440
|
+
...PALETTE_TOKEN_NAMES,
|
|
2441
|
+
...blockColorTokenNames,
|
|
2442
|
+
// Existing generated themes can carry palette-local "white" tokens in
|
|
2443
|
+
// token-only component fields. Keep it explicit until those rows are
|
|
2444
|
+
// migrated to canonical foreground/background roles.
|
|
2445
|
+
"white",
|
|
2446
|
+
"neutral",
|
|
2447
|
+
"primaryText",
|
|
2448
|
+
"secondaryForeground",
|
|
2449
|
+
"accentForeground"
|
|
2450
|
+
];
|
|
2451
|
+
themeColorBaseTokenSet = new Set(themeColorBaseTokenNames);
|
|
2452
|
+
SHADE_STEPS = [
|
|
2453
|
+
"50",
|
|
2454
|
+
"100",
|
|
2455
|
+
"200",
|
|
2456
|
+
"300",
|
|
2457
|
+
"400",
|
|
2458
|
+
"500",
|
|
2459
|
+
"600",
|
|
2460
|
+
"700",
|
|
2461
|
+
"800",
|
|
2462
|
+
"900",
|
|
2463
|
+
"950"
|
|
2464
|
+
];
|
|
2465
|
+
shadeStepSet = new Set(SHADE_STEPS);
|
|
2466
|
+
themeColorTokenSchema = z.string().min(1).refine((value) => Boolean(isThemeColorToken(value)), "Expected a known Theme V2 color token");
|
|
2467
|
+
}
|
|
2468
|
+
});
|
|
2366
2469
|
var VARIANT_ROLES, cornerStyleSchema, shadowSizeSchema, textTransformSchema, fontWeightSchema, buttonTypographySchema, letterSpacingSchema, hoverTransformSchema, hoverColorSchema, buttonPaddingPresetSchema, gradientStyleSchema, gradientSharpnessSchema, prioritySchema, buttonSizeNameSchema, PADDING_TOKEN_PATTERN, paddingShorthandSchema, buttonSizeConfigSchema, buttonSizesSchema, buttonGlobalSettingsSchema, gradientDirectionSchema, buttonBackgroundSchema, effectApplicationSchema, buttonBorderSchema, variantShadowSchema, variantEffectsSchema, variantSizeOverridesSchema, buttonVariantSchema, buttonSystemSchema;
|
|
2367
2470
|
var init_types3 = __esm({
|
|
2368
2471
|
"../theme-core/src/buttons/types.ts"() {
|
|
2472
|
+
init_themeColorTokens();
|
|
2369
2473
|
VARIANT_ROLES = [
|
|
2370
2474
|
"primary",
|
|
2371
2475
|
"secondary",
|
|
@@ -2443,7 +2547,7 @@ var init_types3 = __esm({
|
|
|
2443
2547
|
hoverTransform: hoverTransformSchema,
|
|
2444
2548
|
hoverColor: hoverColorSchema,
|
|
2445
2549
|
// When hoverColor is 'token', this specifies which token to use
|
|
2446
|
-
hoverColorToken:
|
|
2550
|
+
hoverColorToken: themeColorTokenSchema.optional(),
|
|
2447
2551
|
// Gradient settings (if any variant uses gradients)
|
|
2448
2552
|
gradientStyle: gradientStyleSchema.optional(),
|
|
2449
2553
|
gradientAngle: z.number().min(0).max(360).optional(),
|
|
@@ -2451,10 +2555,10 @@ var init_types3 = __esm({
|
|
|
2451
2555
|
});
|
|
2452
2556
|
gradientDirectionSchema = z.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
|
|
2453
2557
|
buttonBackgroundSchema = z.discriminatedUnion("type", [
|
|
2454
|
-
z.object({ type: z.literal("solid"), colorToken:
|
|
2558
|
+
z.object({ type: z.literal("solid"), colorToken: themeColorTokenSchema }),
|
|
2455
2559
|
z.object({
|
|
2456
2560
|
type: z.literal("gradient"),
|
|
2457
|
-
stops: z.array(
|
|
2561
|
+
stops: z.array(themeColorTokenSchema).min(2),
|
|
2458
2562
|
direction: gradientDirectionSchema
|
|
2459
2563
|
}),
|
|
2460
2564
|
z.object({ type: z.literal("transparent") })
|
|
@@ -2465,7 +2569,7 @@ var init_types3 = __esm({
|
|
|
2465
2569
|
});
|
|
2466
2570
|
buttonBorderSchema = z.object({
|
|
2467
2571
|
widthClass: z.string(),
|
|
2468
|
-
colorToken:
|
|
2572
|
+
colorToken: themeColorTokenSchema
|
|
2469
2573
|
});
|
|
2470
2574
|
variantShadowSchema = z.object({
|
|
2471
2575
|
elevation: z.enum(["none", "low", "medium", "high"]),
|
|
@@ -2491,7 +2595,7 @@ var init_types3 = __esm({
|
|
|
2491
2595
|
priority: prioritySchema,
|
|
2492
2596
|
// Base appearance (token-based)
|
|
2493
2597
|
background: buttonBackgroundSchema,
|
|
2494
|
-
textColorToken:
|
|
2598
|
+
textColorToken: themeColorTokenSchema,
|
|
2495
2599
|
/** Tailwind radius token (e.g. `'rounded-md'`). Omit to inherit from `global.cornerStyle`. */
|
|
2496
2600
|
borderRadius: z.string().optional(),
|
|
2497
2601
|
// Optional shadow override (uses theme.shadow if not specified)
|
|
@@ -3247,44 +3351,44 @@ var init_personalities = __esm({
|
|
|
3247
3351
|
var hotspotSchema, rotationSchema, rectSchema, aspectCropSchema, transformSchema, mediaSchema;
|
|
3248
3352
|
var init_media = __esm({
|
|
3249
3353
|
"../theme-core/src/lib/media.ts"() {
|
|
3250
|
-
hotspotSchema =
|
|
3251
|
-
x:
|
|
3252
|
-
y:
|
|
3253
|
-
radius:
|
|
3254
|
-
});
|
|
3255
|
-
rotationSchema =
|
|
3256
|
-
rectSchema =
|
|
3257
|
-
aspectCropSchema =
|
|
3258
|
-
aspect:
|
|
3259
|
-
rect:
|
|
3260
|
-
hotspot:
|
|
3261
|
-
rotation:
|
|
3262
|
-
});
|
|
3263
|
-
transformSchema =
|
|
3264
|
-
aspectCrops:
|
|
3354
|
+
hotspotSchema = z44.object({
|
|
3355
|
+
x: z44.number().min(0).max(1),
|
|
3356
|
+
y: z44.number().min(0).max(1),
|
|
3357
|
+
radius: z44.number().optional()
|
|
3358
|
+
});
|
|
3359
|
+
rotationSchema = z44.union([z44.literal(0), z44.literal(90), z44.literal(180), z44.literal(270)]);
|
|
3360
|
+
rectSchema = z44.tuple([z44.number(), z44.number(), z44.number(), z44.number()]);
|
|
3361
|
+
aspectCropSchema = z44.object({
|
|
3362
|
+
aspect: z44.preprocess((value) => value == null ? void 0 : value, z44.string().optional()),
|
|
3363
|
+
rect: z44.preprocess((value) => value == null ? void 0 : value, rectSchema.optional()),
|
|
3364
|
+
hotspot: z44.preprocess((value) => value == null ? void 0 : value, hotspotSchema.optional()),
|
|
3365
|
+
rotation: z44.preprocess((value) => value == null ? void 0 : value, rotationSchema.optional())
|
|
3366
|
+
});
|
|
3367
|
+
transformSchema = z44.object({
|
|
3368
|
+
aspectCrops: z44.preprocess((value) => {
|
|
3265
3369
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
3266
3370
|
return void 0;
|
|
3267
3371
|
}
|
|
3268
3372
|
return value;
|
|
3269
|
-
},
|
|
3373
|
+
}, z44.record(z44.string(), aspectCropSchema.catch({}))).optional(),
|
|
3270
3374
|
rect: rectSchema.optional(),
|
|
3271
3375
|
hotspot: hotspotSchema.optional(),
|
|
3272
3376
|
rotation: rotationSchema.optional()
|
|
3273
3377
|
});
|
|
3274
|
-
mediaSchema =
|
|
3275
|
-
type:
|
|
3276
|
-
purpose:
|
|
3277
|
-
placeholder:
|
|
3278
|
-
assetId:
|
|
3279
|
-
identifier:
|
|
3280
|
-
src:
|
|
3281
|
-
alt:
|
|
3282
|
-
filename:
|
|
3283
|
-
mimeType:
|
|
3284
|
-
width:
|
|
3285
|
-
height:
|
|
3286
|
-
storageBucket:
|
|
3287
|
-
storagePath:
|
|
3378
|
+
mediaSchema = z44.object({
|
|
3379
|
+
type: z44.enum(["image", "video", "audio", "document", "spreadsheet", "archive"]),
|
|
3380
|
+
purpose: z44.string().optional(),
|
|
3381
|
+
placeholder: z44.boolean().default(true).optional(),
|
|
3382
|
+
assetId: z44.string().optional(),
|
|
3383
|
+
identifier: z44.string().optional(),
|
|
3384
|
+
src: z44.string().optional(),
|
|
3385
|
+
alt: z44.string().optional(),
|
|
3386
|
+
filename: z44.string().optional(),
|
|
3387
|
+
mimeType: z44.string().optional(),
|
|
3388
|
+
width: z44.number().optional(),
|
|
3389
|
+
height: z44.number().optional(),
|
|
3390
|
+
storageBucket: z44.string().optional(),
|
|
3391
|
+
storagePath: z44.string().optional(),
|
|
3288
3392
|
transform: transformSchema.optional()
|
|
3289
3393
|
});
|
|
3290
3394
|
}
|
|
@@ -3461,21 +3565,22 @@ var init_buttons = __esm({
|
|
|
3461
3565
|
var cardSpacingSchema, gradientDirectionSchema2, cardBackgroundSchema, cardBorderSchema, cardVariantSchema, cardSystemSchema;
|
|
3462
3566
|
var init_types6 = __esm({
|
|
3463
3567
|
"../theme-core/src/cards/types.ts"() {
|
|
3568
|
+
init_themeColorTokens();
|
|
3464
3569
|
cardSpacingSchema = z.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]);
|
|
3465
3570
|
gradientDirectionSchema2 = z.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
|
|
3466
3571
|
cardBackgroundSchema = z.discriminatedUnion("type", [
|
|
3467
|
-
z.object({ type: z.literal("solid"), colorToken:
|
|
3572
|
+
z.object({ type: z.literal("solid"), colorToken: themeColorTokenSchema }),
|
|
3468
3573
|
z.object({
|
|
3469
3574
|
type: z.literal("gradient"),
|
|
3470
|
-
fromToken:
|
|
3471
|
-
toToken:
|
|
3575
|
+
fromToken: themeColorTokenSchema,
|
|
3576
|
+
toToken: themeColorTokenSchema,
|
|
3472
3577
|
direction: gradientDirectionSchema2
|
|
3473
3578
|
}),
|
|
3474
3579
|
z.object({ type: z.literal("transparent") })
|
|
3475
3580
|
]);
|
|
3476
3581
|
cardBorderSchema = z.object({
|
|
3477
3582
|
widthClass: z.string(),
|
|
3478
|
-
colorToken:
|
|
3583
|
+
colorToken: themeColorTokenSchema
|
|
3479
3584
|
});
|
|
3480
3585
|
cardVariantSchema = z.object({
|
|
3481
3586
|
id: z.string(),
|
|
@@ -3541,6 +3646,7 @@ var init_cards = __esm({
|
|
|
3541
3646
|
var accordionIconSchema, accordionSystemSchema;
|
|
3542
3647
|
var init_types7 = __esm({
|
|
3543
3648
|
"../theme-core/src/accordions/types.ts"() {
|
|
3649
|
+
init_themeColorTokens();
|
|
3544
3650
|
accordionIconSchema = z.enum([
|
|
3545
3651
|
"plus-minus",
|
|
3546
3652
|
// + becomes - (swap or rotate 90°)
|
|
@@ -3557,7 +3663,7 @@ var init_types7 = __esm({
|
|
|
3557
3663
|
// Visual styling (solid color only - gradients can be added later if needed)
|
|
3558
3664
|
background: z.object({
|
|
3559
3665
|
type: z.literal("solid"),
|
|
3560
|
-
colorToken:
|
|
3666
|
+
colorToken: themeColorTokenSchema
|
|
3561
3667
|
}),
|
|
3562
3668
|
// Spacing (padding inside items)
|
|
3563
3669
|
spacing: z.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]),
|
|
@@ -3567,7 +3673,7 @@ var init_types7 = __esm({
|
|
|
3567
3673
|
border: z.object({
|
|
3568
3674
|
widthClass: z.string(),
|
|
3569
3675
|
// e.g., 'border', 'border-2', 'border-0'
|
|
3570
|
-
colorToken:
|
|
3676
|
+
colorToken: themeColorTokenSchema
|
|
3571
3677
|
}).nullable(),
|
|
3572
3678
|
// Shadow (null = inherit from theme.shadow)
|
|
3573
3679
|
shadow: z.object({
|
|
@@ -3583,19 +3689,19 @@ var init_types7 = __esm({
|
|
|
3583
3689
|
}),
|
|
3584
3690
|
// Trigger (question) styling
|
|
3585
3691
|
trigger: z.object({
|
|
3586
|
-
textColorToken:
|
|
3692
|
+
textColorToken: themeColorTokenSchema,
|
|
3587
3693
|
fontWeight: z.enum(["regular", "medium", "semibold", "bold"]).nullable()
|
|
3588
3694
|
// null = inherit from theme
|
|
3589
3695
|
}),
|
|
3590
3696
|
// Hover state styling
|
|
3591
3697
|
hover: z.object({
|
|
3592
|
-
backgroundColorToken:
|
|
3593
|
-
textColorToken:
|
|
3594
|
-
borderColorToken:
|
|
3698
|
+
backgroundColorToken: themeColorTokenSchema.optional(),
|
|
3699
|
+
textColorToken: themeColorTokenSchema.optional(),
|
|
3700
|
+
borderColorToken: themeColorTokenSchema.optional()
|
|
3595
3701
|
}),
|
|
3596
3702
|
// Content (answer) styling
|
|
3597
3703
|
content: z.object({
|
|
3598
|
-
textColorToken:
|
|
3704
|
+
textColorToken: themeColorTokenSchema
|
|
3599
3705
|
})
|
|
3600
3706
|
});
|
|
3601
3707
|
}
|
|
@@ -3603,23 +3709,24 @@ var init_types7 = __esm({
|
|
|
3603
3709
|
var inputSystemSchema;
|
|
3604
3710
|
var init_types8 = __esm({
|
|
3605
3711
|
"../theme-core/src/inputs/types.ts"() {
|
|
3712
|
+
init_themeColorTokens();
|
|
3606
3713
|
inputSystemSchema = z.object({
|
|
3607
3714
|
// Base styling (applied to all inputs)
|
|
3608
3715
|
base: z.object({
|
|
3609
3716
|
background: z.union([
|
|
3610
3717
|
z.object({
|
|
3611
3718
|
type: z.literal("solid"),
|
|
3612
|
-
colorToken:
|
|
3719
|
+
colorToken: themeColorTokenSchema
|
|
3613
3720
|
}),
|
|
3614
3721
|
z.object({
|
|
3615
3722
|
type: z.literal("transparent")
|
|
3616
3723
|
})
|
|
3617
3724
|
]),
|
|
3618
|
-
textColorToken:
|
|
3725
|
+
textColorToken: themeColorTokenSchema,
|
|
3619
3726
|
border: z.object({
|
|
3620
3727
|
widthClass: z.string(),
|
|
3621
3728
|
// e.g., 'border', 'border-2'
|
|
3622
|
-
colorToken:
|
|
3729
|
+
colorToken: themeColorTokenSchema,
|
|
3623
3730
|
style: z.enum(["all", "underline"]).optional()
|
|
3624
3731
|
}),
|
|
3625
3732
|
corners: z.enum(["square", "soft", "rounded", "pill"]).nullable(),
|
|
@@ -3634,7 +3741,7 @@ var init_types8 = __esm({
|
|
|
3634
3741
|
}),
|
|
3635
3742
|
// Label styling
|
|
3636
3743
|
label: z.object({
|
|
3637
|
-
textColorToken:
|
|
3744
|
+
textColorToken: themeColorTokenSchema,
|
|
3638
3745
|
fontWeight: z.enum(["regular", "medium", "semibold", "bold", "black"]),
|
|
3639
3746
|
fontSize: z.enum(["2xs", "xs", "sm", "base"]),
|
|
3640
3747
|
textTransform: z.enum(["none", "uppercase", "lowercase", "capitalize"]).optional(),
|
|
@@ -3643,20 +3750,20 @@ var init_types8 = __esm({
|
|
|
3643
3750
|
}),
|
|
3644
3751
|
// Focus state
|
|
3645
3752
|
focus: z.object({
|
|
3646
|
-
ringColorToken:
|
|
3753
|
+
ringColorToken: themeColorTokenSchema,
|
|
3647
3754
|
ringWidth: z.enum(["0", "1", "2", "3"]),
|
|
3648
|
-
borderColorToken:
|
|
3755
|
+
borderColorToken: themeColorTokenSchema.optional()
|
|
3649
3756
|
// Change border color on focus
|
|
3650
3757
|
}),
|
|
3651
3758
|
// Error state (for validation feedback)
|
|
3652
3759
|
error: z.object({
|
|
3653
|
-
borderColorToken:
|
|
3654
|
-
textColorToken:
|
|
3760
|
+
borderColorToken: themeColorTokenSchema,
|
|
3761
|
+
textColorToken: themeColorTokenSchema
|
|
3655
3762
|
}),
|
|
3656
3763
|
// Disabled state
|
|
3657
3764
|
disabled: z.object({
|
|
3658
|
-
backgroundColorToken:
|
|
3659
|
-
textColorToken:
|
|
3765
|
+
backgroundColorToken: themeColorTokenSchema,
|
|
3766
|
+
textColorToken: themeColorTokenSchema,
|
|
3660
3767
|
opacity: z.number().min(0.3).max(0.7)
|
|
3661
3768
|
})
|
|
3662
3769
|
});
|
|
@@ -3665,9 +3772,9 @@ var init_types8 = __esm({
|
|
|
3665
3772
|
var gradientStopSchema, gradientConfigSchema;
|
|
3666
3773
|
var init_types9 = __esm({
|
|
3667
3774
|
"../theme-core/src/gradients/types.ts"() {
|
|
3775
|
+
init_themeColorTokens();
|
|
3668
3776
|
gradientStopSchema = z.object({
|
|
3669
|
-
color:
|
|
3670
|
-
// Theme color token name (e.g., 'primary-500')
|
|
3777
|
+
color: themeColorTokenSchema,
|
|
3671
3778
|
position: z.number().min(0).max(100)
|
|
3672
3779
|
// Percentage 0-100
|
|
3673
3780
|
});
|
|
@@ -3716,6 +3823,7 @@ var navLinkPaddingSchema, navLinkPaddingXSchema, navLinkBorderRadiusSchema, navL
|
|
|
3716
3823
|
var init_types10 = __esm({
|
|
3717
3824
|
"../theme-core/src/navigation/types.ts"() {
|
|
3718
3825
|
init_baseSchema();
|
|
3826
|
+
init_themeColorTokens();
|
|
3719
3827
|
navLinkPaddingSchema = z.enum(["none", "compact", "default"]);
|
|
3720
3828
|
navLinkPaddingXSchema = z.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
|
|
3721
3829
|
navLinkBorderRadiusSchema = z.enum(["none", "sm", "md", "full"]);
|
|
@@ -3727,13 +3835,13 @@ var init_types10 = __esm({
|
|
|
3727
3835
|
/** Typography settings (inherited from interactive base) */
|
|
3728
3836
|
...interactiveTypographySchema.shape,
|
|
3729
3837
|
/** Text color token */
|
|
3730
|
-
colorToken:
|
|
3838
|
+
colorToken: themeColorTokenSchema.default("text"),
|
|
3731
3839
|
/** Optional text size override */
|
|
3732
3840
|
textSize: navLinkTextSizeSchema.optional(),
|
|
3733
3841
|
/** Optional letter spacing override */
|
|
3734
3842
|
letterSpacing: navLinkLetterSpacingSchema.optional(),
|
|
3735
3843
|
/** Hover/active color token (for color-change effects) */
|
|
3736
|
-
hoverColorToken:
|
|
3844
|
+
hoverColorToken: themeColorTokenSchema.nullable().optional(),
|
|
3737
3845
|
/** Padding preset */
|
|
3738
3846
|
padding: navLinkPaddingSchema.default("compact"),
|
|
3739
3847
|
/** Horizontal padding override (overrides horizontal component of padding preset) */
|
|
@@ -3917,10 +4025,11 @@ var init_atRuleValidation = __esm({
|
|
|
3917
4025
|
var componentBorderSchema, componentShadowSchema;
|
|
3918
4026
|
var init_componentStyles = __esm({
|
|
3919
4027
|
"../theme-core/src/shared/componentStyles.ts"() {
|
|
4028
|
+
init_themeColorTokens();
|
|
3920
4029
|
componentBorderSchema = z.object({
|
|
3921
4030
|
width: z.enum(["none", "hairline", "thin", "medium", "thick"]).default("none"),
|
|
3922
4031
|
style: z.enum(["solid", "dashed"]).default("solid"),
|
|
3923
|
-
colorToken:
|
|
4032
|
+
colorToken: themeColorTokenSchema.optional()
|
|
3924
4033
|
// defaults to "border" if not set
|
|
3925
4034
|
});
|
|
3926
4035
|
componentShadowSchema = z.object({
|
|
@@ -3935,6 +4044,135 @@ var init_shared = __esm({
|
|
|
3935
4044
|
init_componentStyles();
|
|
3936
4045
|
}
|
|
3937
4046
|
});
|
|
4047
|
+
|
|
4048
|
+
// ../theme-core/src/utils/colorStyles.ts
|
|
4049
|
+
function parseToken(source) {
|
|
4050
|
+
const parts = parseColorTokenParts(source);
|
|
4051
|
+
if (parts.kind === "raw") {
|
|
4052
|
+
return { token: source, raw: parts.value };
|
|
4053
|
+
}
|
|
4054
|
+
if (parts.kind === "invalid") {
|
|
4055
|
+
return { token: source };
|
|
4056
|
+
}
|
|
4057
|
+
return {
|
|
4058
|
+
token: parts.token,
|
|
4059
|
+
alpha: parts.opacityPercent === null ? void 0 : parts.opacityPercent / 100
|
|
4060
|
+
};
|
|
4061
|
+
}
|
|
4062
|
+
function rgbColorValue(token) {
|
|
4063
|
+
const { token: baseToken, alpha, raw } = parseToken(token);
|
|
4064
|
+
if (raw) {
|
|
4065
|
+
return raw;
|
|
4066
|
+
}
|
|
4067
|
+
const cssVar = `${COLOR_VAR_PREFIX}${baseToken}`;
|
|
4068
|
+
if (alpha === void 0) {
|
|
4069
|
+
return `rgb(var(${cssVar}))`;
|
|
4070
|
+
}
|
|
4071
|
+
return `rgba(var(${cssVar}), ${alpha})`;
|
|
4072
|
+
}
|
|
4073
|
+
function backgroundColorStyle(token) {
|
|
4074
|
+
return { backgroundColor: rgbColorValue(token) };
|
|
4075
|
+
}
|
|
4076
|
+
function textColorStyle(token) {
|
|
4077
|
+
return { color: rgbColorValue(token) };
|
|
4078
|
+
}
|
|
4079
|
+
function borderColorStyle(token) {
|
|
4080
|
+
return { borderColor: rgbColorValue(token) };
|
|
4081
|
+
}
|
|
4082
|
+
function mergeStyles(...styles) {
|
|
4083
|
+
const merged = {};
|
|
4084
|
+
for (const style of styles) {
|
|
4085
|
+
if (!style) continue;
|
|
4086
|
+
Object.assign(merged, style);
|
|
4087
|
+
}
|
|
4088
|
+
return Object.keys(merged).length ? merged : void 0;
|
|
4089
|
+
}
|
|
4090
|
+
var COLOR_VAR_PREFIX;
|
|
4091
|
+
var init_colorStyles = __esm({
|
|
4092
|
+
"../theme-core/src/utils/colorStyles.ts"() {
|
|
4093
|
+
init_colorTokenParts();
|
|
4094
|
+
COLOR_VAR_PREFIX = "--tb-";
|
|
4095
|
+
}
|
|
4096
|
+
});
|
|
4097
|
+
function isCssColorLiteral(value) {
|
|
4098
|
+
const trimmed = value.trim();
|
|
4099
|
+
if (!trimmed) return false;
|
|
4100
|
+
return CSS_HEX_COLOR_PATTERN.test(trimmed) || CSS_COLOR_FUNCTION_PATTERN.test(trimmed) || /^var\(/i.test(trimmed) || CSS_COLOR_KEYWORDS.has(trimmed.toLowerCase());
|
|
4101
|
+
}
|
|
4102
|
+
function parseContextThemeColorToken(value, context) {
|
|
4103
|
+
const parts = parseColorTokenParts(value);
|
|
4104
|
+
if (parts.kind !== "token") return null;
|
|
4105
|
+
const hasPaletteToken = Boolean(context?.palette?.[value.trim()]) || parts.opacityPercent !== null && Boolean(context?.palette?.[parts.token]);
|
|
4106
|
+
if (!hasPaletteToken) return null;
|
|
4107
|
+
return value.trim();
|
|
4108
|
+
}
|
|
4109
|
+
function isTokenShapedTypo(value) {
|
|
4110
|
+
if (COMMON_CSS_NAMED_COLORS.has(value.toLowerCase())) return false;
|
|
4111
|
+
if (!/^[a-zA-Z][a-zA-Z0-9]*(?:-[a-zA-Z0-9]+)*(?:\/[^/]+)?$/.test(value)) {
|
|
4112
|
+
return false;
|
|
4113
|
+
}
|
|
4114
|
+
return !isCssColorLiteral(value);
|
|
4115
|
+
}
|
|
4116
|
+
function warnUnknownThemeColorReference(value) {
|
|
4117
|
+
if (typeof process !== "undefined" && process.env.NODE_ENV === "production") return;
|
|
4118
|
+
if (!isTokenShapedTypo(value)) return;
|
|
4119
|
+
console.warn(
|
|
4120
|
+
`[theme-core] Unknown Theme V2 color token "${value}" treated as literal CSS. Use raw:* for deliberate custom CSS values.`
|
|
4121
|
+
);
|
|
4122
|
+
}
|
|
4123
|
+
function parseThemeColorReference(input, context) {
|
|
4124
|
+
const trimmed = input.trim();
|
|
4125
|
+
if (trimmed.startsWith("raw:")) {
|
|
4126
|
+
return { kind: "literal-css", value: trimmed.slice(4) };
|
|
4127
|
+
}
|
|
4128
|
+
const contextToken = parseContextThemeColorToken(trimmed, context);
|
|
4129
|
+
if (contextToken) {
|
|
4130
|
+
return { kind: "palette-context-token", token: contextToken };
|
|
4131
|
+
}
|
|
4132
|
+
const knownToken = parseThemeColorToken(trimmed);
|
|
4133
|
+
if (knownToken) {
|
|
4134
|
+
return { kind: "theme-token", token: knownToken };
|
|
4135
|
+
}
|
|
4136
|
+
warnUnknownThemeColorReference(trimmed);
|
|
4137
|
+
return { kind: "literal-css", value: trimmed };
|
|
4138
|
+
}
|
|
4139
|
+
function resolveThemeColorReferenceValue(input, context) {
|
|
4140
|
+
const reference = parseThemeColorReference(input, context);
|
|
4141
|
+
return reference.kind === "literal-css" ? reference.value : rgbColorValue(reference.token);
|
|
4142
|
+
}
|
|
4143
|
+
var tokenOrCssColorValueSchema, CSS_COLOR_FUNCTION_PATTERN, CSS_HEX_COLOR_PATTERN, CSS_COLOR_KEYWORDS, COMMON_CSS_NAMED_COLORS;
|
|
4144
|
+
var init_tokenOrColor = __esm({
|
|
4145
|
+
"../theme-core/src/utils/tokenOrColor.ts"() {
|
|
4146
|
+
init_colorStyles();
|
|
4147
|
+
init_colorTokenParts();
|
|
4148
|
+
init_themeColorTokens();
|
|
4149
|
+
tokenOrCssColorValueSchema = z.string();
|
|
4150
|
+
CSS_COLOR_FUNCTION_PATTERN = /^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color|color-mix|light-dark)\(/i;
|
|
4151
|
+
CSS_HEX_COLOR_PATTERN = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
|
|
4152
|
+
CSS_COLOR_KEYWORDS = /* @__PURE__ */ new Set([
|
|
4153
|
+
"transparent",
|
|
4154
|
+
"currentcolor",
|
|
4155
|
+
"inherit",
|
|
4156
|
+
"initial",
|
|
4157
|
+
"revert",
|
|
4158
|
+
"revert-layer",
|
|
4159
|
+
"unset"
|
|
4160
|
+
]);
|
|
4161
|
+
COMMON_CSS_NAMED_COLORS = /* @__PURE__ */ new Set([
|
|
4162
|
+
"black",
|
|
4163
|
+
"blue",
|
|
4164
|
+
"gray",
|
|
4165
|
+
"green",
|
|
4166
|
+
"grey",
|
|
4167
|
+
"orange",
|
|
4168
|
+
"pink",
|
|
4169
|
+
"purple",
|
|
4170
|
+
"red",
|
|
4171
|
+
"white",
|
|
4172
|
+
"yellow"
|
|
4173
|
+
]);
|
|
4174
|
+
}
|
|
4175
|
+
});
|
|
3938
4176
|
var axesSchema, colourHexString, paletteColorSchema, paletteMetaSchema, paletteSchema, typographyStyleSchema, bodyTypographyStyleSchema, headingSizeSchema, headingTypographyOverridesSchema, headingTypographyStyleSchema, proseLinkUnderlineStyleSchema, proseLinkUnderlineThicknessSchema, proseLinkUnderlineOffsetSchema, proseLinkStyleSchema, semanticSpacingSchema, boxRoundedSchema, boxBackgroundOverlaySchema, boxBackgroundSchema, sectionStylesOverrideSchema, containerStylesOverrideSchema, cardBorderOverrideSchema, cardStylesOverrideSchema, blockStyleOverridesSchema, blockThemeOverrideSchema, typographyScaleSchema, typographySchema, spaceSchema, corners, shadow, border, motion, inputStyle, headerVariant, headerPositioning, headerNavStyle, navFontWeight, headerMaxWidth, headerContainerSchema, headerBorderSchema, logoStyleSchema, headerLogoTextSchema, navEffectsSchema, dropdownStyleSchema, headerCtaGapSchema, headerCtaTreatmentSchema, navContainerSchema, headerBackgroundSchema, headerSchema, footerVariant, footerMaxWidth, footerMode, footerNavLayoutMode, footerNavLayoutAlign, footerSpacing, footerLogoPlacement, footerLogoSize, footerLogoMaxHeight, footerBottomTextLinkStyleSchema, footerBottomBarSchema, footerNavLayoutSchema, footerLogoSchema, footerSchema, containerPaddingPresetSchema, layoutSchema, heroTypographySizeSchema, heroTypographyLineHeightSchema, heroResponsiveTypographySchema, heroTypographySchema, heroSchema, bodyTextIntroTypographySizeSchema, bodyTextSchema, gradientsSchema, themeSchema;
|
|
3939
4177
|
var init_schema3 = __esm({
|
|
3940
4178
|
"../theme-core/src/schema.ts"() {
|
|
@@ -3949,6 +4187,8 @@ var init_schema3 = __esm({
|
|
|
3949
4187
|
init_atRuleValidation();
|
|
3950
4188
|
init_shared();
|
|
3951
4189
|
init_types2();
|
|
4190
|
+
init_themeColorTokens();
|
|
4191
|
+
init_tokenOrColor();
|
|
3952
4192
|
axesSchema = z.object({
|
|
3953
4193
|
tone: z.enum(["minimal", "classic", "bold"]),
|
|
3954
4194
|
energy: z.enum(["calm", "vibrant"]),
|
|
@@ -3985,24 +4225,22 @@ var init_schema3 = __esm({
|
|
|
3985
4225
|
size: headingSizeSchema.nullable().optional(),
|
|
3986
4226
|
lineHeight: z.enum(["normal", "relaxed", "loose"]).nullable().optional(),
|
|
3987
4227
|
italic: z.boolean().nullable().optional(),
|
|
3988
|
-
colorToken:
|
|
3989
|
-
// Palette token name for heading color
|
|
4228
|
+
colorToken: themeColorTokenSchema.nullable().optional()
|
|
3990
4229
|
});
|
|
3991
4230
|
headingTypographyStyleSchema = typographyStyleSchema.extend({
|
|
3992
4231
|
case: z.enum(["uppercase", "normal", "smallCaps"]).nullable(),
|
|
3993
4232
|
italic: z.boolean().nullable(),
|
|
3994
|
-
colorToken:
|
|
3995
|
-
// Palette token name for heading color
|
|
4233
|
+
colorToken: themeColorTokenSchema.nullable().optional()
|
|
3996
4234
|
});
|
|
3997
4235
|
proseLinkUnderlineStyleSchema = z.enum(["solid", "dotted", "dashed"]);
|
|
3998
4236
|
proseLinkUnderlineThicknessSchema = z.enum(["auto", "fromFont", "thin", "medium", "thick"]);
|
|
3999
4237
|
proseLinkUnderlineOffsetSchema = z.enum(["auto", "tight", "normal", "loose"]);
|
|
4000
4238
|
proseLinkStyleSchema = z.object({
|
|
4001
|
-
colorToken:
|
|
4002
|
-
hoverColorToken:
|
|
4239
|
+
colorToken: themeColorTokenSchema.optional(),
|
|
4240
|
+
hoverColorToken: themeColorTokenSchema.optional(),
|
|
4003
4241
|
underline: z.boolean().optional(),
|
|
4004
|
-
decorationColorToken:
|
|
4005
|
-
hoverDecorationColorToken:
|
|
4242
|
+
decorationColorToken: themeColorTokenSchema.optional(),
|
|
4243
|
+
hoverDecorationColorToken: themeColorTokenSchema.optional(),
|
|
4006
4244
|
underlineStyle: proseLinkUnderlineStyleSchema.optional(),
|
|
4007
4245
|
underlineThickness: proseLinkUnderlineThicknessSchema.optional(),
|
|
4008
4246
|
underlineOffset: proseLinkUnderlineOffsetSchema.optional()
|
|
@@ -4011,13 +4249,13 @@ var init_schema3 = __esm({
|
|
|
4011
4249
|
boxRoundedSchema = z.enum(["none", "sm", "md", "lg", "xl", "2xl", "full"]);
|
|
4012
4250
|
boxBackgroundOverlaySchema = z.object({
|
|
4013
4251
|
type: z.enum(["none", "color", "gradient"]).nullable().optional(),
|
|
4014
|
-
color:
|
|
4252
|
+
color: tokenOrCssColorValueSchema.nullable().optional(),
|
|
4015
4253
|
gradient: z.string().nullable().optional(),
|
|
4016
4254
|
opacity: z.number().min(0).max(1).nullable().optional()
|
|
4017
4255
|
});
|
|
4018
4256
|
boxBackgroundSchema = z.object({
|
|
4019
4257
|
type: z.enum(["color", "gradient", "image"]).optional(),
|
|
4020
|
-
color:
|
|
4258
|
+
color: tokenOrCssColorValueSchema.nullable().optional(),
|
|
4021
4259
|
gradient: z.string().nullable().optional(),
|
|
4022
4260
|
image: mediaSchema.nullable().optional(),
|
|
4023
4261
|
objectFit: z.enum(["fill", "fit", "original", "custom"]).nullable().optional(),
|
|
@@ -4026,8 +4264,8 @@ var init_schema3 = __esm({
|
|
|
4026
4264
|
opacity: z.number().min(0).max(1).nullable().optional(),
|
|
4027
4265
|
motion: z.enum(["static", "fixed-frame"]).nullable().optional(),
|
|
4028
4266
|
overlay: boxBackgroundOverlaySchema.nullable().optional(),
|
|
4029
|
-
textColor:
|
|
4030
|
-
headingColor:
|
|
4267
|
+
textColor: tokenOrCssColorValueSchema.nullable().optional(),
|
|
4268
|
+
headingColor: tokenOrCssColorValueSchema.nullable().optional()
|
|
4031
4269
|
});
|
|
4032
4270
|
sectionStylesOverrideSchema = z.object({
|
|
4033
4271
|
background: boxBackgroundSchema.nullable().optional(),
|
|
@@ -4046,7 +4284,7 @@ var init_schema3 = __esm({
|
|
|
4046
4284
|
cardBorderOverrideSchema = z.object({
|
|
4047
4285
|
enabled: z.boolean().nullable().optional(),
|
|
4048
4286
|
width: z.enum(["none", "1", "2", "3"]).nullable().optional(),
|
|
4049
|
-
colorToken:
|
|
4287
|
+
colorToken: themeColorTokenSchema.nullable().optional()
|
|
4050
4288
|
});
|
|
4051
4289
|
cardStylesOverrideSchema = z.object({
|
|
4052
4290
|
background: boxBackgroundSchema.nullable().optional(),
|
|
@@ -4161,19 +4399,14 @@ var init_schema3 = __esm({
|
|
|
4161
4399
|
}).optional();
|
|
4162
4400
|
dropdownStyleSchema = z.object({
|
|
4163
4401
|
// Container styling
|
|
4164
|
-
background:
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
// color token
|
|
4168
|
-
borderColor: z.string().nullable().default("border"),
|
|
4169
|
-
// null = no border
|
|
4402
|
+
background: themeColorTokenSchema.default("surface"),
|
|
4403
|
+
textColor: themeColorTokenSchema.default("text"),
|
|
4404
|
+
borderColor: themeColorTokenSchema.nullable().default("border"),
|
|
4170
4405
|
shadow: z.enum(["none", "sm", "md", "lg"]).default("md"),
|
|
4171
4406
|
borderRadius: z.enum(["none", "sm", "md", "lg"]).default("md"),
|
|
4172
4407
|
// Link hover states (explicit control)
|
|
4173
|
-
hoverBackground:
|
|
4174
|
-
|
|
4175
|
-
hoverTextColor: z.string().nullable().optional(),
|
|
4176
|
-
// color token, null = inherit
|
|
4408
|
+
hoverBackground: themeColorTokenSchema.nullable().optional(),
|
|
4409
|
+
hoverTextColor: themeColorTokenSchema.nullable().optional(),
|
|
4177
4410
|
// Typography
|
|
4178
4411
|
textTransform: z.enum(["none", "uppercase", "capitalize"]).default("none"),
|
|
4179
4412
|
letterSpacing: z.enum(["normal", "wide", "wider"]).default("normal"),
|
|
@@ -4191,10 +4424,10 @@ var init_schema3 = __esm({
|
|
|
4191
4424
|
}).default({ type: "none", tint: null, opacity: 0.15 });
|
|
4192
4425
|
headerBackgroundSchema = z.object({
|
|
4193
4426
|
type: z.enum(["color", "gradient", "image"]),
|
|
4194
|
-
color:
|
|
4427
|
+
color: tokenOrCssColorValueSchema.nullable().optional(),
|
|
4195
4428
|
gradient: gradientConfigSchema.nullable().optional(),
|
|
4196
4429
|
image: mediaSchema.nullable().optional(),
|
|
4197
|
-
textColor:
|
|
4430
|
+
textColor: tokenOrCssColorValueSchema.nullable().optional()
|
|
4198
4431
|
});
|
|
4199
4432
|
headerSchema = z.object({
|
|
4200
4433
|
variant: headerVariant,
|
|
@@ -4206,11 +4439,9 @@ var init_schema3 = __esm({
|
|
|
4206
4439
|
type: "color",
|
|
4207
4440
|
color: "surface"
|
|
4208
4441
|
}),
|
|
4209
|
-
textColor:
|
|
4210
|
-
// Site title and general header text
|
|
4442
|
+
textColor: themeColorTokenSchema.nullable().optional(),
|
|
4211
4443
|
navStyle: headerNavStyle,
|
|
4212
|
-
navColor:
|
|
4213
|
-
// Nav links (inherits textColor if not set)
|
|
4444
|
+
navColor: themeColorTokenSchema.nullable().optional(),
|
|
4214
4445
|
navWeight: navFontWeight.default("medium"),
|
|
4215
4446
|
// New fields for header system enhancement
|
|
4216
4447
|
container: headerContainerSchema,
|
|
@@ -4245,21 +4476,21 @@ var init_schema3 = __esm({
|
|
|
4245
4476
|
footerLogoSize = z.enum(["sm", "md", "lg", "xl"]);
|
|
4246
4477
|
footerLogoMaxHeight = z.enum(["sm", "md", "lg", "xl"]);
|
|
4247
4478
|
footerBottomTextLinkStyleSchema = z.object({
|
|
4248
|
-
colorToken:
|
|
4249
|
-
hoverColorToken:
|
|
4250
|
-
decorationColorToken:
|
|
4479
|
+
colorToken: themeColorTokenSchema.optional(),
|
|
4480
|
+
hoverColorToken: themeColorTokenSchema.nullable().optional(),
|
|
4481
|
+
decorationColorToken: themeColorTokenSchema.nullable().optional(),
|
|
4251
4482
|
underline: z.boolean().optional()
|
|
4252
4483
|
});
|
|
4253
4484
|
footerBottomBarSchema = z.object({
|
|
4254
4485
|
enabled: z.boolean().optional(),
|
|
4255
4486
|
fullBleed: z.boolean().optional(),
|
|
4256
4487
|
background: headerBackgroundSchema.optional(),
|
|
4257
|
-
textColor:
|
|
4488
|
+
textColor: themeColorTokenSchema.nullable().optional(),
|
|
4258
4489
|
textAlign: z.enum(["left", "center", "right"]).optional(),
|
|
4259
4490
|
paddingY: footerSpacing.optional(),
|
|
4260
4491
|
paddingX: footerSpacing.optional(),
|
|
4261
4492
|
borderTop: z.object({
|
|
4262
|
-
colorToken:
|
|
4493
|
+
colorToken: themeColorTokenSchema.nullable().optional(),
|
|
4263
4494
|
width: z.enum(["none", "thin", "medium", "thick"]).optional()
|
|
4264
4495
|
}).optional()
|
|
4265
4496
|
});
|
|
@@ -4294,7 +4525,7 @@ var init_schema3 = __esm({
|
|
|
4294
4525
|
}),
|
|
4295
4526
|
// Footer nav styling (independent from header)
|
|
4296
4527
|
navStyle: headerNavStyle.default("minimal"),
|
|
4297
|
-
navColor:
|
|
4528
|
+
navColor: themeColorTokenSchema.nullable().optional(),
|
|
4298
4529
|
navWeight: navFontWeight.default("medium"),
|
|
4299
4530
|
// Full nav link customization (overrides navStyle if set)
|
|
4300
4531
|
navLinkStyle: navLinkStyleSchema.optional(),
|
|
@@ -4448,28 +4679,13 @@ function definePaletteVariant(input) {
|
|
|
4448
4679
|
colors: input.colors
|
|
4449
4680
|
};
|
|
4450
4681
|
}
|
|
4451
|
-
var paletteVariantIdSchema,
|
|
4682
|
+
var paletteVariantIdSchema, HEX_COLOR_REGEX, hexColorSchema, variantPaletteColorSchema;
|
|
4452
4683
|
var init_types11 = __esm({
|
|
4453
4684
|
"../theme-core/src/palette/variants/types.ts"() {
|
|
4454
4685
|
init_styleTags();
|
|
4455
4686
|
init_schema3();
|
|
4687
|
+
init_themeColorTokens();
|
|
4456
4688
|
paletteVariantIdSchema = z.string().min(1).transform((value) => asPaletteVariantId(value));
|
|
4457
|
-
PALETTE_TOKEN_NAMES = [
|
|
4458
|
-
"primary",
|
|
4459
|
-
"primaryForeground",
|
|
4460
|
-
"secondary",
|
|
4461
|
-
"accent",
|
|
4462
|
-
"success",
|
|
4463
|
-
"warning",
|
|
4464
|
-
"destructive",
|
|
4465
|
-
"background",
|
|
4466
|
-
"surface",
|
|
4467
|
-
"surfaceAlt",
|
|
4468
|
-
"muted",
|
|
4469
|
-
"text",
|
|
4470
|
-
"border"
|
|
4471
|
-
];
|
|
4472
|
-
paletteTokenNameSchema = z.enum(PALETTE_TOKEN_NAMES);
|
|
4473
4689
|
HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
|
|
4474
4690
|
hexColorSchema = z.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
|
|
4475
4691
|
variantPaletteColorSchema = paletteColorSchema.extend({
|
|
@@ -4853,6 +5069,429 @@ var init_variants = __esm({
|
|
|
4853
5069
|
}
|
|
4854
5070
|
});
|
|
4855
5071
|
|
|
5072
|
+
// ../theme-core/src/site-styles/customizableSurfaces.ts
|
|
5073
|
+
var init_customizableSurfaces = __esm({
|
|
5074
|
+
"../theme-core/src/site-styles/customizableSurfaces.ts"() {
|
|
5075
|
+
init_types2();
|
|
5076
|
+
}
|
|
5077
|
+
});
|
|
5078
|
+
|
|
5079
|
+
// ../theme-core/src/site-styles/headerLooks.ts
|
|
5080
|
+
function asHeaderLookId(value) {
|
|
5081
|
+
return value;
|
|
5082
|
+
}
|
|
5083
|
+
function baseHeader(theme) {
|
|
5084
|
+
return {
|
|
5085
|
+
...theme.header,
|
|
5086
|
+
navLinkStyle: void 0,
|
|
5087
|
+
dropdownStyle: void 0,
|
|
5088
|
+
ctaVariant: void 0
|
|
5089
|
+
};
|
|
5090
|
+
}
|
|
5091
|
+
function solidBrandHeader(theme) {
|
|
5092
|
+
const ctaVariant = resolveHeaderCtaVariant(theme, "inverted");
|
|
5093
|
+
return {
|
|
5094
|
+
...baseHeader(theme),
|
|
5095
|
+
variant: "classic",
|
|
5096
|
+
positioning: "sticky",
|
|
5097
|
+
shrinkOnScroll: true,
|
|
5098
|
+
background: {
|
|
5099
|
+
type: "color",
|
|
5100
|
+
color: "primary"
|
|
5101
|
+
},
|
|
5102
|
+
textColor: "primaryForeground",
|
|
5103
|
+
navColor: "primaryForeground",
|
|
5104
|
+
navStyle: "underline-grow",
|
|
5105
|
+
navWeight: "bold",
|
|
5106
|
+
navLinkStyle: {
|
|
5107
|
+
typography: "body",
|
|
5108
|
+
fontWeight: "bold",
|
|
5109
|
+
textTransform: "uppercase",
|
|
5110
|
+
italic: false,
|
|
5111
|
+
colorToken: "primaryForeground",
|
|
5112
|
+
hoverColorToken: "secondary",
|
|
5113
|
+
textSize: "sm",
|
|
5114
|
+
letterSpacing: "wider",
|
|
5115
|
+
padding: "compact",
|
|
5116
|
+
paddingX: "compact",
|
|
5117
|
+
borderRadius: "none",
|
|
5118
|
+
effects: {
|
|
5119
|
+
hover: [
|
|
5120
|
+
{ effectId: "text-color-change", options: { hoverColorToken: "secondary" } },
|
|
5121
|
+
{ effectId: "nav-underline", options: { style: "grow", colorToken: "secondary" } }
|
|
5122
|
+
]
|
|
5123
|
+
}
|
|
5124
|
+
},
|
|
5125
|
+
dropdownStyle: {
|
|
5126
|
+
background: "primary-700",
|
|
5127
|
+
textColor: "primaryForeground",
|
|
5128
|
+
borderColor: null,
|
|
5129
|
+
shadow: "md",
|
|
5130
|
+
borderRadius: "md",
|
|
5131
|
+
hoverBackground: "primary-900",
|
|
5132
|
+
hoverTextColor: "secondary",
|
|
5133
|
+
textTransform: "uppercase",
|
|
5134
|
+
letterSpacing: "wider",
|
|
5135
|
+
fontWeight: "bold",
|
|
5136
|
+
textSize: "sm"
|
|
5137
|
+
},
|
|
5138
|
+
border: {
|
|
5139
|
+
style: "solid",
|
|
5140
|
+
width: "none",
|
|
5141
|
+
position: "none"
|
|
5142
|
+
},
|
|
5143
|
+
logoText: {
|
|
5144
|
+
hideOnShrink: true,
|
|
5145
|
+
mobileMaxWidth: "sm",
|
|
5146
|
+
mobileWrapLines: 2
|
|
5147
|
+
},
|
|
5148
|
+
ctaGap: "compact",
|
|
5149
|
+
ctaTreatment: "inverted",
|
|
5150
|
+
...ctaVariant ? { ctaVariant } : {}
|
|
5151
|
+
};
|
|
5152
|
+
}
|
|
5153
|
+
function cleanBaseHeader(theme) {
|
|
5154
|
+
return {
|
|
5155
|
+
...baseHeader(theme),
|
|
5156
|
+
variant: "classic",
|
|
5157
|
+
positioning: "sticky",
|
|
5158
|
+
shrinkOnScroll: false,
|
|
5159
|
+
background: {
|
|
5160
|
+
type: "color",
|
|
5161
|
+
color: "surface"
|
|
5162
|
+
},
|
|
5163
|
+
textColor: "text",
|
|
5164
|
+
navColor: "text",
|
|
5165
|
+
navStyle: "minimal",
|
|
5166
|
+
navWeight: "medium",
|
|
5167
|
+
border: {
|
|
5168
|
+
style: "solid",
|
|
5169
|
+
width: "thin",
|
|
5170
|
+
position: "bottom",
|
|
5171
|
+
colorToken: "border"
|
|
5172
|
+
},
|
|
5173
|
+
ctaTreatment: "default",
|
|
5174
|
+
ctaGap: "default"
|
|
5175
|
+
};
|
|
5176
|
+
}
|
|
5177
|
+
function editorialLineHeader(theme) {
|
|
5178
|
+
return {
|
|
5179
|
+
...baseHeader(theme),
|
|
5180
|
+
variant: "editorial",
|
|
5181
|
+
positioning: "sticky",
|
|
5182
|
+
shrinkOnScroll: false,
|
|
5183
|
+
background: {
|
|
5184
|
+
type: "color",
|
|
5185
|
+
color: "background"
|
|
5186
|
+
},
|
|
5187
|
+
textColor: "text",
|
|
5188
|
+
navColor: "text",
|
|
5189
|
+
navStyle: "underline-grow",
|
|
5190
|
+
navWeight: "medium",
|
|
5191
|
+
logo: {
|
|
5192
|
+
fontFamily: "heading",
|
|
5193
|
+
letterSpacing: "wide",
|
|
5194
|
+
gradient: false
|
|
5195
|
+
},
|
|
5196
|
+
ctaTreatment: "outline",
|
|
5197
|
+
ctaVariant: resolveHeaderCtaVariant(theme, "outline"),
|
|
5198
|
+
ctaGap: "relaxed"
|
|
5199
|
+
};
|
|
5200
|
+
}
|
|
5201
|
+
function centeredCalmHeader(theme) {
|
|
5202
|
+
return {
|
|
5203
|
+
...baseHeader(theme),
|
|
5204
|
+
variant: "centered",
|
|
5205
|
+
positioning: "static",
|
|
5206
|
+
shrinkOnScroll: false,
|
|
5207
|
+
background: {
|
|
5208
|
+
type: "color",
|
|
5209
|
+
color: "surface"
|
|
5210
|
+
},
|
|
5211
|
+
textColor: "text",
|
|
5212
|
+
navColor: "text",
|
|
5213
|
+
navStyle: "minimal",
|
|
5214
|
+
navWeight: "medium",
|
|
5215
|
+
ctaTreatment: "ghost",
|
|
5216
|
+
ctaVariant: resolveHeaderCtaVariant(theme, "ghost"),
|
|
5217
|
+
ctaGap: "none"
|
|
5218
|
+
};
|
|
5219
|
+
}
|
|
5220
|
+
function practicalUtilityHeader(theme) {
|
|
5221
|
+
return {
|
|
5222
|
+
...baseHeader(theme),
|
|
5223
|
+
variant: "classic",
|
|
5224
|
+
positioning: "sticky",
|
|
5225
|
+
shrinkOnScroll: true,
|
|
5226
|
+
background: {
|
|
5227
|
+
type: "color",
|
|
5228
|
+
color: "surface"
|
|
5229
|
+
},
|
|
5230
|
+
textColor: "text",
|
|
5231
|
+
navColor: "text",
|
|
5232
|
+
navStyle: "solid",
|
|
5233
|
+
navWeight: "semibold",
|
|
5234
|
+
shadow: {
|
|
5235
|
+
elevation: "sm"
|
|
5236
|
+
},
|
|
5237
|
+
border: {
|
|
5238
|
+
style: "solid",
|
|
5239
|
+
width: "thin",
|
|
5240
|
+
position: "bottom",
|
|
5241
|
+
colorToken: "border"
|
|
5242
|
+
},
|
|
5243
|
+
ctaTreatment: "primary",
|
|
5244
|
+
ctaVariant: resolveHeaderCtaVariant(theme, "primary"),
|
|
5245
|
+
ctaGap: "compact",
|
|
5246
|
+
logoText: {
|
|
5247
|
+
mobileMaxWidth: "sm",
|
|
5248
|
+
mobileWrapLines: 1,
|
|
5249
|
+
hideOnShrink: false
|
|
5250
|
+
}
|
|
5251
|
+
};
|
|
5252
|
+
}
|
|
5253
|
+
function minimalTransparentHeader(theme) {
|
|
5254
|
+
return {
|
|
5255
|
+
...baseHeader(theme),
|
|
5256
|
+
variant: "classic",
|
|
5257
|
+
positioning: "static",
|
|
5258
|
+
shrinkOnScroll: false,
|
|
5259
|
+
background: {
|
|
5260
|
+
type: "color",
|
|
5261
|
+
color: "transparent"
|
|
5262
|
+
},
|
|
5263
|
+
textColor: "text",
|
|
5264
|
+
navColor: "text",
|
|
5265
|
+
navStyle: "underline",
|
|
5266
|
+
navWeight: "medium",
|
|
5267
|
+
border: {
|
|
5268
|
+
style: "solid",
|
|
5269
|
+
width: "none",
|
|
5270
|
+
position: "none"
|
|
5271
|
+
},
|
|
5272
|
+
ctaTreatment: "outline",
|
|
5273
|
+
ctaVariant: resolveHeaderCtaVariant(theme, "outline"),
|
|
5274
|
+
ctaGap: "default"
|
|
5275
|
+
};
|
|
5276
|
+
}
|
|
5277
|
+
function transparentOverlayHeader(theme) {
|
|
5278
|
+
return {
|
|
5279
|
+
...baseHeader(theme),
|
|
5280
|
+
variant: "transparent",
|
|
5281
|
+
positioning: "fixed",
|
|
5282
|
+
shrinkOnScroll: true,
|
|
5283
|
+
background: {
|
|
5284
|
+
type: "color",
|
|
5285
|
+
color: "transparent"
|
|
5286
|
+
},
|
|
5287
|
+
textColor: "background",
|
|
5288
|
+
navColor: "background",
|
|
5289
|
+
navStyle: "frosted",
|
|
5290
|
+
navWeight: "semibold",
|
|
5291
|
+
border: {
|
|
5292
|
+
style: "solid",
|
|
5293
|
+
width: "none",
|
|
5294
|
+
position: "none"
|
|
5295
|
+
},
|
|
5296
|
+
ctaTreatment: "inverted",
|
|
5297
|
+
ctaVariant: resolveHeaderCtaVariant(theme, "inverted"),
|
|
5298
|
+
ctaGap: "compact"
|
|
5299
|
+
};
|
|
5300
|
+
}
|
|
5301
|
+
function floatingGlassHeader(theme) {
|
|
5302
|
+
return {
|
|
5303
|
+
...transparentOverlayHeader(theme),
|
|
5304
|
+
variant: "floating",
|
|
5305
|
+
navStyle: "frosted",
|
|
5306
|
+
navContainer: {
|
|
5307
|
+
type: "glass",
|
|
5308
|
+
tint: "text",
|
|
5309
|
+
opacity: 0.16
|
|
5310
|
+
},
|
|
5311
|
+
container: {
|
|
5312
|
+
rounded: "2xl",
|
|
5313
|
+
border: true,
|
|
5314
|
+
shadow: true,
|
|
5315
|
+
padding: "sm",
|
|
5316
|
+
tint: "background",
|
|
5317
|
+
opacity: 0.12
|
|
5318
|
+
}
|
|
5319
|
+
};
|
|
5320
|
+
}
|
|
5321
|
+
var headerLookCatalog;
|
|
5322
|
+
var init_headerLooks = __esm({
|
|
5323
|
+
"../theme-core/src/site-styles/headerLooks.ts"() {
|
|
5324
|
+
init_headerCtaVariants();
|
|
5325
|
+
init_customizableSurfaces();
|
|
5326
|
+
init_types2();
|
|
5327
|
+
headerLookCatalog = [
|
|
5328
|
+
{
|
|
5329
|
+
id: asHeaderLookId("clean-base"),
|
|
5330
|
+
label: "Clean base",
|
|
5331
|
+
visualTreatment: "solid-neutral",
|
|
5332
|
+
layoutBehavior: "sticky",
|
|
5333
|
+
openingRequirement: "none",
|
|
5334
|
+
compile: cleanBaseHeader
|
|
5335
|
+
},
|
|
5336
|
+
{
|
|
5337
|
+
id: asHeaderLookId("brand-solid"),
|
|
5338
|
+
label: "Brand solid",
|
|
5339
|
+
visualTreatment: "solid-brand",
|
|
5340
|
+
layoutBehavior: "sticky-shrink",
|
|
5341
|
+
openingRequirement: "none",
|
|
5342
|
+
compile: solidBrandHeader
|
|
5343
|
+
},
|
|
5344
|
+
{
|
|
5345
|
+
id: asHeaderLookId("editorial-line"),
|
|
5346
|
+
label: "Editorial line",
|
|
5347
|
+
visualTreatment: "light-editorial",
|
|
5348
|
+
layoutBehavior: "sticky",
|
|
5349
|
+
openingRequirement: "none",
|
|
5350
|
+
maxRecommendedNavItems: 6,
|
|
5351
|
+
compile: editorialLineHeader
|
|
5352
|
+
},
|
|
5353
|
+
{
|
|
5354
|
+
id: asHeaderLookId("centered-calm"),
|
|
5355
|
+
label: "Centered calm",
|
|
5356
|
+
visualTreatment: "light-editorial",
|
|
5357
|
+
layoutBehavior: "normal-flow",
|
|
5358
|
+
openingRequirement: "none",
|
|
5359
|
+
maxRecommendedNavItems: 5,
|
|
5360
|
+
allowedLogoShapes: ["none", "text-only", "horizontal", "square"],
|
|
5361
|
+
compile: centeredCalmHeader
|
|
5362
|
+
},
|
|
5363
|
+
{
|
|
5364
|
+
id: asHeaderLookId("practical-utility"),
|
|
5365
|
+
label: "Practical utility",
|
|
5366
|
+
visualTreatment: "solid-neutral",
|
|
5367
|
+
layoutBehavior: "sticky-shrink",
|
|
5368
|
+
openingRequirement: "none",
|
|
5369
|
+
requiresProminentCta: true,
|
|
5370
|
+
compile: practicalUtilityHeader
|
|
5371
|
+
},
|
|
5372
|
+
{
|
|
5373
|
+
id: asHeaderLookId("minimal-transparent"),
|
|
5374
|
+
label: "Minimal transparent",
|
|
5375
|
+
visualTreatment: "minimal-transparent",
|
|
5376
|
+
layoutBehavior: "normal-flow",
|
|
5377
|
+
openingRequirement: "reserved-space-ok",
|
|
5378
|
+
compile: minimalTransparentHeader
|
|
5379
|
+
},
|
|
5380
|
+
{
|
|
5381
|
+
id: asHeaderLookId("transparent-overlay"),
|
|
5382
|
+
label: "Transparent overlay",
|
|
5383
|
+
visualTreatment: "transparent-overlay",
|
|
5384
|
+
layoutBehavior: "fixed-overlay",
|
|
5385
|
+
openingRequirement: "requires-image-hero-with-contrast-overlay",
|
|
5386
|
+
maxRecommendedNavItems: 5,
|
|
5387
|
+
allowedLogoShapes: ["none", "text-only", "horizontal"],
|
|
5388
|
+
compile: transparentOverlayHeader
|
|
5389
|
+
},
|
|
5390
|
+
{
|
|
5391
|
+
id: asHeaderLookId("floating-glass"),
|
|
5392
|
+
label: "Floating glass",
|
|
5393
|
+
visualTreatment: "floating-glass",
|
|
5394
|
+
layoutBehavior: "fixed-floating",
|
|
5395
|
+
openingRequirement: "requires-image-hero-with-contrast-overlay",
|
|
5396
|
+
maxRecommendedNavItems: 5,
|
|
5397
|
+
allowedLogoShapes: ["none", "text-only", "horizontal"],
|
|
5398
|
+
compile: floatingGlassHeader
|
|
5399
|
+
}
|
|
5400
|
+
];
|
|
5401
|
+
new Map(
|
|
5402
|
+
headerLookCatalog.map((look) => [look.id, look])
|
|
5403
|
+
);
|
|
5404
|
+
}
|
|
5405
|
+
});
|
|
5406
|
+
|
|
5407
|
+
// ../theme-core/src/site-styles/footerLooks.ts
|
|
5408
|
+
function asFooterLookId(value) {
|
|
5409
|
+
return value;
|
|
5410
|
+
}
|
|
5411
|
+
function mutedGroundingFooter(theme) {
|
|
5412
|
+
return theme.footer;
|
|
5413
|
+
}
|
|
5414
|
+
function brandTwoBandFooter(theme) {
|
|
5415
|
+
return {
|
|
5416
|
+
...theme.footer,
|
|
5417
|
+
variant: "split",
|
|
5418
|
+
maxWidth: "container",
|
|
5419
|
+
background: {
|
|
5420
|
+
type: "color",
|
|
5421
|
+
color: "primary-800"
|
|
5422
|
+
},
|
|
5423
|
+
navStyle: "minimal",
|
|
5424
|
+
navWeight: "medium",
|
|
5425
|
+
navColor: "primaryForeground",
|
|
5426
|
+
navLinkStyle: {
|
|
5427
|
+
typography: "body",
|
|
5428
|
+
fontWeight: "medium",
|
|
5429
|
+
textTransform: "none",
|
|
5430
|
+
italic: false,
|
|
5431
|
+
colorToken: "primaryForeground",
|
|
5432
|
+
hoverColorToken: "secondary",
|
|
5433
|
+
padding: "none",
|
|
5434
|
+
borderRadius: "none"
|
|
5435
|
+
},
|
|
5436
|
+
bottomTextLinkStyle: {
|
|
5437
|
+
colorToken: "secondary",
|
|
5438
|
+
decorationColorToken: "secondary"
|
|
5439
|
+
},
|
|
5440
|
+
navLayout: {
|
|
5441
|
+
layout: "inline-wrap",
|
|
5442
|
+
align: "start",
|
|
5443
|
+
gapX: "default",
|
|
5444
|
+
gapY: "tight"
|
|
5445
|
+
},
|
|
5446
|
+
logo: {
|
|
5447
|
+
showLogo: true,
|
|
5448
|
+
showLogoText: false,
|
|
5449
|
+
placement: "left",
|
|
5450
|
+
size: "sm",
|
|
5451
|
+
align: "start"
|
|
5452
|
+
},
|
|
5453
|
+
bottomBar: {
|
|
5454
|
+
enabled: true,
|
|
5455
|
+
fullBleed: true,
|
|
5456
|
+
background: {
|
|
5457
|
+
type: "color",
|
|
5458
|
+
color: "primary-900"
|
|
5459
|
+
},
|
|
5460
|
+
textColor: "primaryForeground",
|
|
5461
|
+
textAlign: "center",
|
|
5462
|
+
paddingX: "default",
|
|
5463
|
+
paddingY: "compact",
|
|
5464
|
+
borderTop: {
|
|
5465
|
+
width: "none"
|
|
5466
|
+
}
|
|
5467
|
+
}
|
|
5468
|
+
};
|
|
5469
|
+
}
|
|
5470
|
+
var footerLookCatalog;
|
|
5471
|
+
var init_footerLooks = __esm({
|
|
5472
|
+
"../theme-core/src/site-styles/footerLooks.ts"() {
|
|
5473
|
+
init_customizableSurfaces();
|
|
5474
|
+
init_types2();
|
|
5475
|
+
footerLookCatalog = [
|
|
5476
|
+
{
|
|
5477
|
+
id: asFooterLookId("footer-muted-grounding"),
|
|
5478
|
+
label: "Muted grounding footer",
|
|
5479
|
+
compile: mutedGroundingFooter
|
|
5480
|
+
},
|
|
5481
|
+
{
|
|
5482
|
+
id: asFooterLookId("site-footer-brand-two-band"),
|
|
5483
|
+
label: "Two-band brand footer",
|
|
5484
|
+
maxRecommendedNavDensity: "balanced",
|
|
5485
|
+
allowedContentPresence: ["default-footer", "default-and-blocks"],
|
|
5486
|
+
compile: brandTwoBandFooter
|
|
5487
|
+
}
|
|
5488
|
+
];
|
|
5489
|
+
new Map(
|
|
5490
|
+
footerLookCatalog.map((look) => [look.id, look])
|
|
5491
|
+
);
|
|
5492
|
+
}
|
|
5493
|
+
});
|
|
5494
|
+
|
|
4856
5495
|
// ../theme-core/src/site-styles/curatedChoices.ts
|
|
4857
5496
|
var init_curatedChoices = __esm({
|
|
4858
5497
|
"../theme-core/src/site-styles/curatedChoices.ts"() {
|
|
@@ -4945,6 +5584,9 @@ function defineCuratedSiteStyle(input) {
|
|
|
4945
5584
|
},
|
|
4946
5585
|
...input.themeOverrides ? { themeOverrides: input.themeOverrides } : {},
|
|
4947
5586
|
recommendedAppearancePresetIds: (input.recommendedAppearancePresetIds ?? []).map(asAppearancePresetId),
|
|
5587
|
+
recommendedHeaderLookIds: (input.recommendedHeaderLookIds ?? ["clean-base"]).map(asHeaderLookId),
|
|
5588
|
+
// Empty is intentional: resolveFooterLook always appends its guaranteed fallback.
|
|
5589
|
+
recommendedFooterLookIds: (input.recommendedFooterLookIds ?? []).map(asFooterLookId),
|
|
4948
5590
|
buttonPersonalityChoices: input.buttonPersonalityChoices,
|
|
4949
5591
|
paletteVariantChoices: input.paletteVariantChoices
|
|
4950
5592
|
};
|
|
@@ -4960,6 +5602,8 @@ var init_curatedSiteStyles = __esm({
|
|
|
4960
5602
|
"../theme-core/src/site-styles/curatedSiteStyles.ts"() {
|
|
4961
5603
|
init_personalities();
|
|
4962
5604
|
init_variants();
|
|
5605
|
+
init_headerLooks();
|
|
5606
|
+
init_footerLooks();
|
|
4963
5607
|
init_curatedChoices();
|
|
4964
5608
|
init_sourceCatalogs();
|
|
4965
5609
|
init_types2();
|
|
@@ -5052,6 +5696,7 @@ var init_curatedSiteStyles = __esm({
|
|
|
5052
5696
|
motion: "subtle"
|
|
5053
5697
|
},
|
|
5054
5698
|
compositionBudget: quietBudget,
|
|
5699
|
+
recommendedHeaderLookIds: ["centered-calm", "minimal-transparent", "clean-base"],
|
|
5055
5700
|
buttonPersonalityChoices: [
|
|
5056
5701
|
buttonChoice("soft-pill"),
|
|
5057
5702
|
buttonChoice("pebble"),
|
|
@@ -5080,6 +5725,7 @@ var init_curatedSiteStyles = __esm({
|
|
|
5080
5725
|
motion: "subtle"
|
|
5081
5726
|
},
|
|
5082
5727
|
compositionBudget: balancedBudget,
|
|
5728
|
+
recommendedHeaderLookIds: ["practical-utility", "brand-solid", "clean-base"],
|
|
5083
5729
|
buttonPersonalityChoices: [
|
|
5084
5730
|
buttonChoice("confident-chip"),
|
|
5085
5731
|
buttonChoice("soft-pill"),
|
|
@@ -5106,6 +5752,7 @@ var init_curatedSiteStyles = __esm({
|
|
|
5106
5752
|
motion: "subtle"
|
|
5107
5753
|
},
|
|
5108
5754
|
compositionBudget: balancedBudget,
|
|
5755
|
+
recommendedHeaderLookIds: ["editorial-line", "minimal-transparent", "centered-calm"],
|
|
5109
5756
|
buttonPersonalityChoices: [
|
|
5110
5757
|
buttonChoice("editorial-link"),
|
|
5111
5758
|
buttonChoice("soft-pill"),
|
|
@@ -5133,6 +5780,7 @@ var init_curatedSiteStyles = __esm({
|
|
|
5133
5780
|
motion: "expressive"
|
|
5134
5781
|
},
|
|
5135
5782
|
compositionBudget: balancedBudget,
|
|
5783
|
+
recommendedHeaderLookIds: ["brand-solid", "practical-utility", "clean-base"],
|
|
5136
5784
|
buttonPersonalityChoices: [
|
|
5137
5785
|
buttonChoice("pebble"),
|
|
5138
5786
|
buttonChoice("brushed-wash"),
|
|
@@ -5166,6 +5814,7 @@ var init_curatedSiteStyles = __esm({
|
|
|
5166
5814
|
motion: "none"
|
|
5167
5815
|
},
|
|
5168
5816
|
compositionBudget: quietBudget,
|
|
5817
|
+
recommendedHeaderLookIds: ["minimal-transparent", "editorial-line", "clean-base"],
|
|
5169
5818
|
buttonPersonalityChoices: [
|
|
5170
5819
|
buttonChoice("editorial-link"),
|
|
5171
5820
|
buttonChoice("confident-chip"),
|
|
@@ -5200,6 +5849,7 @@ var init_curatedSiteStyles = __esm({
|
|
|
5200
5849
|
motion: "none"
|
|
5201
5850
|
},
|
|
5202
5851
|
compositionBudget: quietBudget,
|
|
5852
|
+
recommendedHeaderLookIds: ["practical-utility", "brand-solid", "clean-base"],
|
|
5203
5853
|
buttonPersonalityChoices: [
|
|
5204
5854
|
buttonChoice("confident-chip"),
|
|
5205
5855
|
buttonChoice("pebble"),
|
|
@@ -5226,6 +5876,7 @@ var init_curatedSiteStyles = __esm({
|
|
|
5226
5876
|
motion: "subtle"
|
|
5227
5877
|
},
|
|
5228
5878
|
compositionBudget: balancedBudget,
|
|
5879
|
+
recommendedHeaderLookIds: ["centered-calm", "minimal-transparent", "clean-base"],
|
|
5229
5880
|
buttonPersonalityChoices: [
|
|
5230
5881
|
buttonChoice("soft-pill"),
|
|
5231
5882
|
buttonChoice("pebble"),
|
|
@@ -5260,6 +5911,7 @@ var init_curatedSiteStyles = __esm({
|
|
|
5260
5911
|
motion: "expressive"
|
|
5261
5912
|
},
|
|
5262
5913
|
compositionBudget: expressiveBudget,
|
|
5914
|
+
recommendedHeaderLookIds: ["transparent-overlay", "floating-glass", "brand-solid"],
|
|
5263
5915
|
buttonPersonalityChoices: [
|
|
5264
5916
|
buttonChoice("ink-stamp"),
|
|
5265
5917
|
buttonChoice("confident-chip"),
|
|
@@ -5349,14 +6001,14 @@ var init_curatedSiteStyles = __esm({
|
|
|
5349
6001
|
inputs: expressiveUnderlineInputs
|
|
5350
6002
|
},
|
|
5351
6003
|
recommendedAppearancePresetIds: [
|
|
5352
|
-
"site-header-brand-solid-inverted-cta",
|
|
5353
|
-
"site-footer-brand-two-band",
|
|
5354
6004
|
"hero-brand-scrim-fixed-frame",
|
|
5355
6005
|
"body-text-editorial-intro",
|
|
5356
6006
|
"schedule-details-brand-depth",
|
|
5357
6007
|
"testimonials-accent-quote-proof",
|
|
5358
6008
|
"contact-form-brand-depth-card"
|
|
5359
6009
|
],
|
|
6010
|
+
recommendedHeaderLookIds: ["brand-solid", "transparent-overlay", "practical-utility"],
|
|
6011
|
+
recommendedFooterLookIds: ["site-footer-brand-two-band", "footer-muted-grounding"],
|
|
5360
6012
|
buttonPersonalityChoices: [
|
|
5361
6013
|
buttonChoice("showtime-pill"),
|
|
5362
6014
|
buttonChoice("confident-chip"),
|
|
@@ -5384,6 +6036,20 @@ var init_lookResolution = __esm({
|
|
|
5384
6036
|
init_types2();
|
|
5385
6037
|
}
|
|
5386
6038
|
});
|
|
6039
|
+
var init_siteStyleBlockPolicies = __esm({
|
|
6040
|
+
"../theme-core/src/site-styles/siteStyleBlockPolicies.ts"() {
|
|
6041
|
+
init_lookResolution();
|
|
6042
|
+
init_appearancePresets();
|
|
6043
|
+
init_pageDesignIntent();
|
|
6044
|
+
init_types2();
|
|
6045
|
+
asPageFlowPresetId("generated-default");
|
|
6046
|
+
asSiteStyleId("site-style:south-west-twerk-school");
|
|
6047
|
+
asAppearancePresetId("hero-brand-scrim-fixed-frame");
|
|
6048
|
+
asLayoutVariantKey("classic");
|
|
6049
|
+
asLayoutVariantKey("micro");
|
|
6050
|
+
asBoundaryOptionId("break:wave");
|
|
6051
|
+
}
|
|
6052
|
+
});
|
|
5387
6053
|
|
|
5388
6054
|
// ../theme-core/src/site-styles/pageDesignEditorModel.ts
|
|
5389
6055
|
var noneBoundaryOption, softBoundaryOption, spaciousBoundaryOption;
|
|
@@ -5391,6 +6057,7 @@ var init_pageDesignEditorModel = __esm({
|
|
|
5391
6057
|
"../theme-core/src/site-styles/pageDesignEditorModel.ts"() {
|
|
5392
6058
|
init_curatedSiteStyles();
|
|
5393
6059
|
init_lookResolution();
|
|
6060
|
+
init_siteStyleBlockPolicies();
|
|
5394
6061
|
init_pageDesignIntent();
|
|
5395
6062
|
init_types2();
|
|
5396
6063
|
noneBoundaryOption = {
|
|
@@ -5641,7 +6308,8 @@ var init_previewCompiler = __esm({
|
|
|
5641
6308
|
init_curatedSiteStyles();
|
|
5642
6309
|
init_resolver2();
|
|
5643
6310
|
init_types2();
|
|
5644
|
-
|
|
6311
|
+
init_footerLooks();
|
|
6312
|
+
init_headerLooks();
|
|
5645
6313
|
init_runtimeCompiler();
|
|
5646
6314
|
init_blockFlow();
|
|
5647
6315
|
init_pageDesignEditorModel();
|
|
@@ -5766,14 +6434,29 @@ var init_generatedSchemas = __esm({
|
|
|
5766
6434
|
}
|
|
5767
6435
|
});
|
|
5768
6436
|
|
|
6437
|
+
// ../theme-core/src/site-styles/records.ts
|
|
6438
|
+
var init_records = __esm({
|
|
6439
|
+
"../theme-core/src/site-styles/records.ts"() {
|
|
6440
|
+
}
|
|
6441
|
+
});
|
|
6442
|
+
|
|
6443
|
+
// ../theme-core/src/site-styles/headerOpeningSection.ts
|
|
6444
|
+
var init_headerOpeningSection = __esm({
|
|
6445
|
+
"../theme-core/src/site-styles/headerOpeningSection.ts"() {
|
|
6446
|
+
init_headerLooks();
|
|
6447
|
+
init_records();
|
|
6448
|
+
}
|
|
6449
|
+
});
|
|
6450
|
+
|
|
5769
6451
|
// ../theme-core/src/site-styles/generatedDesignPipeline.ts
|
|
5770
6452
|
var init_generatedDesignPipeline = __esm({
|
|
5771
6453
|
"../theme-core/src/site-styles/generatedDesignPipeline.ts"() {
|
|
5772
6454
|
init_compositionBudget();
|
|
5773
6455
|
init_designState();
|
|
5774
6456
|
init_generatedSchemas();
|
|
5775
|
-
|
|
6457
|
+
init_siteStyleBlockPolicies();
|
|
5776
6458
|
init_lookResolution();
|
|
6459
|
+
init_headerOpeningSection();
|
|
5777
6460
|
init_resolver2();
|
|
5778
6461
|
init_runtimeCompiler();
|
|
5779
6462
|
init_types2();
|
|
@@ -5941,9 +6624,13 @@ var init_site_styles = __esm({
|
|
|
5941
6624
|
init_contentTemplateRuntimeCompiler();
|
|
5942
6625
|
init_curatedChoices();
|
|
5943
6626
|
init_curatedSiteStyles();
|
|
6627
|
+
init_customizableSurfaces();
|
|
5944
6628
|
init_designState();
|
|
6629
|
+
init_footerLooks();
|
|
5945
6630
|
init_generatedSchemas();
|
|
5946
6631
|
init_generatedDesignPipeline();
|
|
6632
|
+
init_headerLooks();
|
|
6633
|
+
init_headerOpeningSection();
|
|
5947
6634
|
init_lookResolution();
|
|
5948
6635
|
init_pageDesignAuthority();
|
|
5949
6636
|
init_pageDesignEditorErrors();
|
|
@@ -5951,8 +6638,10 @@ var init_site_styles = __esm({
|
|
|
5951
6638
|
init_pageDesignIntent();
|
|
5952
6639
|
init_previewCustomization();
|
|
5953
6640
|
init_rawStyleFields();
|
|
6641
|
+
init_records();
|
|
5954
6642
|
init_resolver2();
|
|
5955
6643
|
init_runtimeCompiler();
|
|
6644
|
+
init_siteStyleBlockPolicies();
|
|
5956
6645
|
init_sourceCatalogs();
|
|
5957
6646
|
init_styleTags();
|
|
5958
6647
|
init_tokenRecipes();
|
|
@@ -7114,56 +7803,6 @@ var init_ctaRow = __esm({
|
|
|
7114
7803
|
}
|
|
7115
7804
|
});
|
|
7116
7805
|
|
|
7117
|
-
// ../theme-core/src/utils/colorStyles.ts
|
|
7118
|
-
function parseToken(source) {
|
|
7119
|
-
if (source.startsWith("raw:")) {
|
|
7120
|
-
return { token: source, raw: source.slice(4) };
|
|
7121
|
-
}
|
|
7122
|
-
if (source.includes("/")) {
|
|
7123
|
-
const [token, opacity] = source.split("/");
|
|
7124
|
-
const alpha = Number(opacity) / 100;
|
|
7125
|
-
if (!Number.isNaN(alpha) && token) {
|
|
7126
|
-
return { token, alpha };
|
|
7127
|
-
}
|
|
7128
|
-
return { token: source };
|
|
7129
|
-
}
|
|
7130
|
-
return { token: source };
|
|
7131
|
-
}
|
|
7132
|
-
function rgbColorValue(token) {
|
|
7133
|
-
const { token: baseToken, alpha, raw } = parseToken(token);
|
|
7134
|
-
if (raw) {
|
|
7135
|
-
return raw;
|
|
7136
|
-
}
|
|
7137
|
-
const cssVar = `${COLOR_VAR_PREFIX}${baseToken}`;
|
|
7138
|
-
if (alpha === void 0) {
|
|
7139
|
-
return `rgb(var(${cssVar}))`;
|
|
7140
|
-
}
|
|
7141
|
-
return `rgba(var(${cssVar}), ${alpha})`;
|
|
7142
|
-
}
|
|
7143
|
-
function backgroundColorStyle(token) {
|
|
7144
|
-
return { backgroundColor: rgbColorValue(token) };
|
|
7145
|
-
}
|
|
7146
|
-
function textColorStyle(token) {
|
|
7147
|
-
return { color: rgbColorValue(token) };
|
|
7148
|
-
}
|
|
7149
|
-
function borderColorStyle(token) {
|
|
7150
|
-
return { borderColor: rgbColorValue(token) };
|
|
7151
|
-
}
|
|
7152
|
-
function mergeStyles(...styles) {
|
|
7153
|
-
const merged = {};
|
|
7154
|
-
for (const style of styles) {
|
|
7155
|
-
if (!style) continue;
|
|
7156
|
-
Object.assign(merged, style);
|
|
7157
|
-
}
|
|
7158
|
-
return Object.keys(merged).length ? merged : void 0;
|
|
7159
|
-
}
|
|
7160
|
-
var COLOR_VAR_PREFIX;
|
|
7161
|
-
var init_colorStyles = __esm({
|
|
7162
|
-
"../theme-core/src/utils/colorStyles.ts"() {
|
|
7163
|
-
COLOR_VAR_PREFIX = "--tb-";
|
|
7164
|
-
}
|
|
7165
|
-
});
|
|
7166
|
-
|
|
7167
7806
|
// ../blocks/src/system/node/fragments/cardContainer.ts
|
|
7168
7807
|
var init_cardContainer = __esm({
|
|
7169
7808
|
"../blocks/src/system/node/fragments/cardContainer.ts"() {
|
|
@@ -7579,113 +8218,15 @@ var init_core3 = __esm({
|
|
|
7579
8218
|
}
|
|
7580
8219
|
});
|
|
7581
8220
|
|
|
7582
|
-
// ../blocks/src/system/transforms/registry/_utils/
|
|
7583
|
-
function
|
|
7584
|
-
return
|
|
7585
|
-
|
|
7586
|
-
|
|
7587
|
-
const trimmed = tokenOrCssValue.trim();
|
|
7588
|
-
if (!trimmed) return "";
|
|
7589
|
-
if (trimmed.startsWith("raw:")) {
|
|
7590
|
-
return rgbColorValue(trimmed);
|
|
7591
|
-
}
|
|
7592
|
-
if (context?.theme?.palette?.[trimmed]) {
|
|
7593
|
-
return rgbColorValue(trimmed);
|
|
7594
|
-
}
|
|
7595
|
-
if (trimmed.includes("/")) {
|
|
7596
|
-
const [base, opacity] = trimmed.split("/");
|
|
7597
|
-
const alpha = Number(opacity) / 100;
|
|
7598
|
-
if (base && !Number.isNaN(alpha) && context?.theme?.palette?.[base]) {
|
|
7599
|
-
return rgbColorValue(trimmed);
|
|
7600
|
-
}
|
|
7601
|
-
}
|
|
7602
|
-
if (isLiteralCssColorValue(trimmed)) {
|
|
7603
|
-
return trimmed;
|
|
7604
|
-
}
|
|
7605
|
-
if (THEME_COLOR_TOKEN_PATTERN.test(trimmed)) {
|
|
7606
|
-
return rgbColorValue(trimmed);
|
|
7607
|
-
}
|
|
7608
|
-
return trimmed;
|
|
8221
|
+
// ../blocks/src/system/transforms/registry/_utils/themeColorResolution.ts
|
|
8222
|
+
function resolveBackgroundColorValue(value, context) {
|
|
8223
|
+
return resolveThemeColorReferenceValue(value, {
|
|
8224
|
+
palette: context.theme?.palette
|
|
8225
|
+
});
|
|
7609
8226
|
}
|
|
7610
|
-
var
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
init_colorStyles();
|
|
7614
|
-
CSS_COLOR_FUNCTION_PATTERN = /^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color|color-mix|light-dark)\(/i;
|
|
7615
|
-
CSS_HEX_COLOR_PATTERN = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
|
|
7616
|
-
THEME_COLOR_TOKEN_PATTERN = /^[a-zA-Z][a-zA-Z0-9]*(?:-[a-zA-Z0-9]+)*(?:\/(?:100|[1-9]?\d|0))?$/;
|
|
7617
|
-
CSS_COLOR_KEYWORDS = /* @__PURE__ */ new Set([
|
|
7618
|
-
"transparent",
|
|
7619
|
-
"currentColor",
|
|
7620
|
-
"inherit",
|
|
7621
|
-
"initial",
|
|
7622
|
-
"revert",
|
|
7623
|
-
"revert-layer",
|
|
7624
|
-
"unset"
|
|
7625
|
-
]);
|
|
7626
|
-
}
|
|
7627
|
-
});
|
|
7628
|
-
|
|
7629
|
-
// ../theme-core/src/tokens/blockColorTokens.ts
|
|
7630
|
-
function parseOpacityPercent(source) {
|
|
7631
|
-
const trimmed = source.trim();
|
|
7632
|
-
if (!trimmed) return null;
|
|
7633
|
-
if (!/^\d{1,3}(?:\.\d+)?$/.test(trimmed)) return null;
|
|
7634
|
-
const value = Number(trimmed);
|
|
7635
|
-
if (!Number.isFinite(value)) return null;
|
|
7636
|
-
if (value < 0 || value > 100) return null;
|
|
7637
|
-
return value;
|
|
7638
|
-
}
|
|
7639
|
-
function isBlockColorToken(value) {
|
|
7640
|
-
if (typeof value !== "string") return false;
|
|
7641
|
-
const trimmed = value.trim();
|
|
7642
|
-
if (!trimmed) return false;
|
|
7643
|
-
const [name, opacityRaw, extra] = trimmed.split("/");
|
|
7644
|
-
if (extra !== void 0) return false;
|
|
7645
|
-
if (!name) return false;
|
|
7646
|
-
if (!blockColorTokenNameSet.has(name)) return false;
|
|
7647
|
-
if (opacityRaw === void 0) return true;
|
|
7648
|
-
return parseOpacityPercent(opacityRaw) !== null;
|
|
7649
|
-
}
|
|
7650
|
-
function parseBlockColorToken(value) {
|
|
7651
|
-
if (!isBlockColorToken(value)) return null;
|
|
7652
|
-
return value.trim();
|
|
7653
|
-
}
|
|
7654
|
-
var blockColorTokenNames, blockColorTokenNameSet;
|
|
7655
|
-
var init_blockColorTokens = __esm({
|
|
7656
|
-
"../theme-core/src/tokens/blockColorTokens.ts"() {
|
|
7657
|
-
blockColorTokenNames = [
|
|
7658
|
-
"text",
|
|
7659
|
-
"heading",
|
|
7660
|
-
"mutedText",
|
|
7661
|
-
"surface",
|
|
7662
|
-
"background",
|
|
7663
|
-
"foreground",
|
|
7664
|
-
"border",
|
|
7665
|
-
"primary",
|
|
7666
|
-
"secondary",
|
|
7667
|
-
"accent",
|
|
7668
|
-
"success",
|
|
7669
|
-
"warning",
|
|
7670
|
-
"info",
|
|
7671
|
-
"error",
|
|
7672
|
-
"destructive",
|
|
7673
|
-
"scrim",
|
|
7674
|
-
"shadow",
|
|
7675
|
-
// Common "on*" tokens used when rendering colored chips/badges.
|
|
7676
|
-
"onPrimary",
|
|
7677
|
-
"onSecondary",
|
|
7678
|
-
"onAccent",
|
|
7679
|
-
"onSuccess",
|
|
7680
|
-
"onWarning",
|
|
7681
|
-
"onInfo",
|
|
7682
|
-
"onError",
|
|
7683
|
-
"onDestructive",
|
|
7684
|
-
"onSurface"
|
|
7685
|
-
];
|
|
7686
|
-
blockColorTokenNameSet = new Set(
|
|
7687
|
-
blockColorTokenNames
|
|
7688
|
-
);
|
|
8227
|
+
var init_themeColorResolution = __esm({
|
|
8228
|
+
"../blocks/src/system/transforms/registry/_utils/themeColorResolution.ts"() {
|
|
8229
|
+
init_tokenOrColor();
|
|
7689
8230
|
}
|
|
7690
8231
|
});
|
|
7691
8232
|
|
|
@@ -7733,8 +8274,8 @@ var init_boxStyles2 = __esm({
|
|
|
7733
8274
|
init_spacing();
|
|
7734
8275
|
init_site_styles();
|
|
7735
8276
|
init_colorStyles();
|
|
7736
|
-
init_colorResolution();
|
|
7737
8277
|
init_blockColorTokens();
|
|
8278
|
+
init_themeColorResolution();
|
|
7738
8279
|
spacingTransform = {
|
|
7739
8280
|
id: "boxStyles.spacing",
|
|
7740
8281
|
kind: "string",
|
|
@@ -8020,17 +8561,17 @@ var init_boxStyles2 = __esm({
|
|
|
8020
8561
|
id: "sectionStyles.resolveTextColorStyle",
|
|
8021
8562
|
kind: "formatter",
|
|
8022
8563
|
summary: "Resolve section text color token into a style object",
|
|
8023
|
-
run: (value, options,
|
|
8564
|
+
run: (value, options, context) => {
|
|
8024
8565
|
const fallbackToken = options?.fallbackToken;
|
|
8025
8566
|
if (typeof value === "string" && value.trim()) {
|
|
8026
|
-
const colorValue =
|
|
8567
|
+
const colorValue = resolveBackgroundColorValue(value.trim(), context);
|
|
8027
8568
|
return {
|
|
8028
8569
|
color: colorValue,
|
|
8029
8570
|
"--section-text-color": colorValue
|
|
8030
8571
|
};
|
|
8031
8572
|
}
|
|
8032
8573
|
if (typeof fallbackToken === "string" && fallbackToken.trim()) {
|
|
8033
|
-
const colorValue =
|
|
8574
|
+
const colorValue = resolveBackgroundColorValue(fallbackToken.trim(), context);
|
|
8034
8575
|
return {
|
|
8035
8576
|
color: colorValue,
|
|
8036
8577
|
"--section-text-color": colorValue
|
|
@@ -8043,16 +8584,16 @@ var init_boxStyles2 = __esm({
|
|
|
8043
8584
|
id: "sectionStyles.resolveHeadingColorStyle",
|
|
8044
8585
|
kind: "formatter",
|
|
8045
8586
|
summary: "Resolve section heading color token into a style object",
|
|
8046
|
-
run: (value, options,
|
|
8587
|
+
run: (value, options, context) => {
|
|
8047
8588
|
const fallbackToken = options?.fallbackToken;
|
|
8048
8589
|
if (typeof value === "string" && value.trim()) {
|
|
8049
|
-
const colorValue =
|
|
8590
|
+
const colorValue = resolveBackgroundColorValue(value.trim(), context);
|
|
8050
8591
|
return {
|
|
8051
8592
|
"--section-heading-color": colorValue
|
|
8052
8593
|
};
|
|
8053
8594
|
}
|
|
8054
8595
|
if (typeof fallbackToken === "string" && fallbackToken.trim()) {
|
|
8055
|
-
const colorValue =
|
|
8596
|
+
const colorValue = resolveBackgroundColorValue(fallbackToken.trim(), context);
|
|
8056
8597
|
return {
|
|
8057
8598
|
"--section-heading-color": colorValue
|
|
8058
8599
|
};
|
|
@@ -11794,7 +12335,7 @@ var init_colorConversion = __esm({
|
|
|
11794
12335
|
});
|
|
11795
12336
|
|
|
11796
12337
|
// ../blocks/src/lib/typeGuards.ts
|
|
11797
|
-
function
|
|
12338
|
+
function isRecord3(value) {
|
|
11798
12339
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
11799
12340
|
}
|
|
11800
12341
|
var init_typeGuards = __esm({
|
|
@@ -11851,66 +12392,66 @@ var init_media2 = __esm({
|
|
|
11851
12392
|
"audio",
|
|
11852
12393
|
"video"
|
|
11853
12394
|
];
|
|
11854
|
-
hotspotSchema2 =
|
|
11855
|
-
x:
|
|
11856
|
-
y:
|
|
11857
|
-
radius:
|
|
11858
|
-
});
|
|
11859
|
-
rotationSchema2 =
|
|
11860
|
-
rectSchema2 =
|
|
11861
|
-
aspectCropSchema2 =
|
|
11862
|
-
aspect:
|
|
11863
|
-
rect:
|
|
11864
|
-
hotspot:
|
|
11865
|
-
rotation:
|
|
11866
|
-
});
|
|
11867
|
-
transformSchema2 =
|
|
11868
|
-
aspectCrops:
|
|
12395
|
+
hotspotSchema2 = z44.object({
|
|
12396
|
+
x: z44.number().min(0).max(1),
|
|
12397
|
+
y: z44.number().min(0).max(1),
|
|
12398
|
+
radius: z44.number().optional()
|
|
12399
|
+
});
|
|
12400
|
+
rotationSchema2 = z44.union([z44.literal(0), z44.literal(90), z44.literal(180), z44.literal(270)]);
|
|
12401
|
+
rectSchema2 = z44.tuple([z44.number(), z44.number(), z44.number(), z44.number()]);
|
|
12402
|
+
aspectCropSchema2 = z44.object({
|
|
12403
|
+
aspect: z44.preprocess((value) => value == null ? void 0 : value, z44.string().optional()),
|
|
12404
|
+
rect: z44.preprocess((value) => value == null ? void 0 : value, rectSchema2.optional()),
|
|
12405
|
+
hotspot: z44.preprocess((value) => value == null ? void 0 : value, hotspotSchema2.optional()),
|
|
12406
|
+
rotation: z44.preprocess((value) => value == null ? void 0 : value, rotationSchema2.optional())
|
|
12407
|
+
});
|
|
12408
|
+
transformSchema2 = z44.object({
|
|
12409
|
+
aspectCrops: z44.preprocess((value) => {
|
|
11869
12410
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
11870
12411
|
return void 0;
|
|
11871
12412
|
}
|
|
11872
12413
|
return value;
|
|
11873
|
-
},
|
|
12414
|
+
}, z44.record(z44.string(), aspectCropSchema2.catch({}))).optional(),
|
|
11874
12415
|
rect: rectSchema2.optional(),
|
|
11875
12416
|
hotspot: hotspotSchema2.optional(),
|
|
11876
12417
|
rotation: rotationSchema2.optional()
|
|
11877
12418
|
});
|
|
11878
|
-
mediaPosterSchema =
|
|
11879
|
-
|
|
11880
|
-
tag:
|
|
11881
|
-
assetId:
|
|
11882
|
-
storageBucket:
|
|
11883
|
-
storagePath:
|
|
12419
|
+
mediaPosterSchema = z44.discriminatedUnion("tag", [
|
|
12420
|
+
z44.object({
|
|
12421
|
+
tag: z44.literal("storage"),
|
|
12422
|
+
assetId: z44.string().optional(),
|
|
12423
|
+
storageBucket: z44.string().min(1),
|
|
12424
|
+
storagePath: z44.string().min(1)
|
|
11884
12425
|
}),
|
|
11885
|
-
|
|
11886
|
-
tag:
|
|
11887
|
-
assetId:
|
|
11888
|
-
src:
|
|
12426
|
+
z44.object({
|
|
12427
|
+
tag: z44.literal("external-src"),
|
|
12428
|
+
assetId: z44.string().optional(),
|
|
12429
|
+
src: z44.string().url()
|
|
11889
12430
|
})
|
|
11890
12431
|
]);
|
|
11891
|
-
mediaBaseSchema =
|
|
11892
|
-
purpose:
|
|
11893
|
-
placeholder:
|
|
11894
|
-
assetId:
|
|
11895
|
-
identifier:
|
|
11896
|
-
src:
|
|
11897
|
-
alt:
|
|
11898
|
-
filename:
|
|
11899
|
-
mimeType:
|
|
11900
|
-
width:
|
|
11901
|
-
height:
|
|
11902
|
-
storageBucket:
|
|
11903
|
-
storagePath:
|
|
12432
|
+
mediaBaseSchema = z44.object({
|
|
12433
|
+
purpose: z44.string().optional(),
|
|
12434
|
+
placeholder: z44.boolean().default(true).optional(),
|
|
12435
|
+
assetId: z44.string().optional(),
|
|
12436
|
+
identifier: z44.string().optional(),
|
|
12437
|
+
src: z44.string().optional(),
|
|
12438
|
+
alt: z44.string().optional(),
|
|
12439
|
+
filename: z44.string().optional(),
|
|
12440
|
+
mimeType: z44.string().optional(),
|
|
12441
|
+
width: z44.number().optional(),
|
|
12442
|
+
height: z44.number().optional(),
|
|
12443
|
+
storageBucket: z44.string().optional(),
|
|
12444
|
+
storagePath: z44.string().optional(),
|
|
11904
12445
|
poster: mediaPosterSchema.optional(),
|
|
11905
12446
|
transform: transformSchema2.optional()
|
|
11906
12447
|
});
|
|
11907
|
-
imageMediaSchema = mediaBaseSchema.extend({ type:
|
|
11908
|
-
videoMediaSchema = mediaBaseSchema.extend({ type:
|
|
11909
|
-
audioMediaSchema = mediaBaseSchema.extend({ type:
|
|
11910
|
-
documentMediaSchema = mediaBaseSchema.extend({ type:
|
|
11911
|
-
spreadsheetMediaSchema = mediaBaseSchema.extend({ type:
|
|
11912
|
-
archiveMediaSchema = mediaBaseSchema.extend({ type:
|
|
11913
|
-
mediaSchema2 =
|
|
12448
|
+
imageMediaSchema = mediaBaseSchema.extend({ type: z44.literal("image") });
|
|
12449
|
+
videoMediaSchema = mediaBaseSchema.extend({ type: z44.literal("video") });
|
|
12450
|
+
audioMediaSchema = mediaBaseSchema.extend({ type: z44.literal("audio") });
|
|
12451
|
+
documentMediaSchema = mediaBaseSchema.extend({ type: z44.literal("document") });
|
|
12452
|
+
spreadsheetMediaSchema = mediaBaseSchema.extend({ type: z44.literal("spreadsheet") });
|
|
12453
|
+
archiveMediaSchema = mediaBaseSchema.extend({ type: z44.literal("archive") });
|
|
12454
|
+
mediaSchema2 = z44.discriminatedUnion("type", [
|
|
11914
12455
|
imageMediaSchema,
|
|
11915
12456
|
videoMediaSchema,
|
|
11916
12457
|
audioMediaSchema,
|
|
@@ -16519,6 +17060,8 @@ var init_tokens2 = __esm({
|
|
|
16519
17060
|
"../theme-core/src/tokens/index.ts"() {
|
|
16520
17061
|
init_tokens();
|
|
16521
17062
|
init_blockColorTokens();
|
|
17063
|
+
init_themeColorTokens();
|
|
17064
|
+
init_colorTokenParts();
|
|
16522
17065
|
init_resolver();
|
|
16523
17066
|
}
|
|
16524
17067
|
});
|
|
@@ -17862,6 +18405,46 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
17862
18405
|
"server:internal_error"
|
|
17863
18406
|
]
|
|
17864
18407
|
},
|
|
18408
|
+
listBookingClosures: {
|
|
18409
|
+
path: "/sites/{siteId}/bookings/closures",
|
|
18410
|
+
method: "GET",
|
|
18411
|
+
auth: "user",
|
|
18412
|
+
tags: ["site-{siteId}", "bookings", "closures-{siteId}"],
|
|
18413
|
+
responseKind: "json",
|
|
18414
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
18415
|
+
},
|
|
18416
|
+
previewBookingClosure: {
|
|
18417
|
+
path: "/sites/{siteId}/bookings/closures/preview",
|
|
18418
|
+
method: "POST",
|
|
18419
|
+
auth: "user",
|
|
18420
|
+
tags: ["site-{siteId}", "bookings", "closures-{siteId}"],
|
|
18421
|
+
responseKind: "json",
|
|
18422
|
+
errors: ["validation:invalid_input", "auth:forbidden", "server:internal_error"]
|
|
18423
|
+
},
|
|
18424
|
+
createBookingClosure: {
|
|
18425
|
+
path: "/sites/{siteId}/bookings/closures",
|
|
18426
|
+
method: "POST",
|
|
18427
|
+
auth: "user",
|
|
18428
|
+
tags: ["site-{siteId}", "bookings", "closures-{siteId}"],
|
|
18429
|
+
responseKind: "json",
|
|
18430
|
+
errors: ["validation:invalid_input", "resource:conflict", "auth:forbidden", "server:internal_error"]
|
|
18431
|
+
},
|
|
18432
|
+
getBookingClosure: {
|
|
18433
|
+
path: "/sites/{siteId}/bookings/closures/{closureId}",
|
|
18434
|
+
method: "GET",
|
|
18435
|
+
auth: "user",
|
|
18436
|
+
tags: ["site-{siteId}", "bookings", "closures-{siteId}"],
|
|
18437
|
+
responseKind: "json",
|
|
18438
|
+
errors: ["resource:not_found", "server:internal_error"]
|
|
18439
|
+
},
|
|
18440
|
+
deleteBookingClosure: {
|
|
18441
|
+
path: "/sites/{siteId}/bookings/closures/{closureId}",
|
|
18442
|
+
method: "DELETE",
|
|
18443
|
+
auth: "user",
|
|
18444
|
+
tags: ["site-{siteId}", "bookings", "closures-{siteId}"],
|
|
18445
|
+
responseKind: "json",
|
|
18446
|
+
errors: ["resource:not_found", "server:internal_error"]
|
|
18447
|
+
},
|
|
17865
18448
|
// Ops (event hosts/admins)
|
|
17866
18449
|
opsListUpcomingEventOccurrences: {
|
|
17867
18450
|
path: "/ops/sites/{siteId}/events",
|
|
@@ -18279,7 +18862,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
18279
18862
|
method: "POST",
|
|
18280
18863
|
auth: "user",
|
|
18281
18864
|
responseKind: "json",
|
|
18282
|
-
errors: ["validation:invalid_input", "server:internal_error"]
|
|
18865
|
+
errors: ["validation:invalid_input", "billing:plan_limit_exceeded", "server:internal_error"]
|
|
18283
18866
|
},
|
|
18284
18867
|
getAppointmentResource: {
|
|
18285
18868
|
path: "/sites/{siteId}/bookings/resources/{resourceId}",
|
|
@@ -18944,6 +19527,31 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
18944
19527
|
auth: "user",
|
|
18945
19528
|
responseKind: "json"
|
|
18946
19529
|
},
|
|
19530
|
+
linkCurrentUserPractitioner: {
|
|
19531
|
+
path: "/sites/{siteId}/members/practitioner-link",
|
|
19532
|
+
method: "POST",
|
|
19533
|
+
tags: ["site-{siteId}", "site-members-{siteId}"],
|
|
19534
|
+
auth: "user",
|
|
19535
|
+
responseKind: "json",
|
|
19536
|
+
errors: [
|
|
19537
|
+
"validation:invalid_input",
|
|
19538
|
+
"auth:forbidden",
|
|
19539
|
+
"resource:not_found",
|
|
19540
|
+
"resource:already_exists",
|
|
19541
|
+
"server:internal_error"
|
|
19542
|
+
]
|
|
19543
|
+
},
|
|
19544
|
+
unlinkCurrentUserPractitioner: {
|
|
19545
|
+
path: "/sites/{siteId}/members/practitioner-link",
|
|
19546
|
+
method: "DELETE",
|
|
19547
|
+
tags: ["site-{siteId}", "site-members-{siteId}"],
|
|
19548
|
+
auth: "user",
|
|
19549
|
+
responseKind: "json",
|
|
19550
|
+
errors: [
|
|
19551
|
+
"auth:forbidden",
|
|
19552
|
+
"server:internal_error"
|
|
19553
|
+
]
|
|
19554
|
+
},
|
|
18947
19555
|
authLogin: {
|
|
18948
19556
|
path: "/auth/login/submit",
|
|
18949
19557
|
method: "POST",
|
|
@@ -19139,6 +19747,42 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
19139
19747
|
auth: "user",
|
|
19140
19748
|
responseKind: "json"
|
|
19141
19749
|
},
|
|
19750
|
+
listContentEntryVersions: {
|
|
19751
|
+
path: "/sites/{siteId}/content/{type}/{entryId}/versions",
|
|
19752
|
+
method: "GET",
|
|
19753
|
+
errors: ["validation:invalid_input", "resource:not_found"],
|
|
19754
|
+
tags: [
|
|
19755
|
+
"site-{siteId}",
|
|
19756
|
+
"content-{siteId}-{type}",
|
|
19757
|
+
"content-entry-{entryId}"
|
|
19758
|
+
],
|
|
19759
|
+
auth: "user",
|
|
19760
|
+
responseKind: "json"
|
|
19761
|
+
},
|
|
19762
|
+
getContentEntryVersion: {
|
|
19763
|
+
path: "/sites/{siteId}/content/{type}/{entryId}/versions/{versionId}",
|
|
19764
|
+
method: "GET",
|
|
19765
|
+
errors: ["validation:invalid_input", "resource:not_found"],
|
|
19766
|
+
tags: [
|
|
19767
|
+
"site-{siteId}",
|
|
19768
|
+
"content-{siteId}-{type}",
|
|
19769
|
+
"content-entry-{entryId}"
|
|
19770
|
+
],
|
|
19771
|
+
auth: "user",
|
|
19772
|
+
responseKind: "json"
|
|
19773
|
+
},
|
|
19774
|
+
restoreContentEntryVersion: {
|
|
19775
|
+
path: "/sites/{siteId}/content/{type}/{entryId}/versions/{versionId}/restore",
|
|
19776
|
+
method: "POST",
|
|
19777
|
+
errors: ["validation:invalid_input", "resource:not_found", "resource:conflict", "server:internal_error"],
|
|
19778
|
+
tags: [
|
|
19779
|
+
"site-{siteId}",
|
|
19780
|
+
"content-{siteId}-{type}",
|
|
19781
|
+
"content-entry-{entryId}"
|
|
19782
|
+
],
|
|
19783
|
+
auth: "user",
|
|
19784
|
+
responseKind: "json"
|
|
19785
|
+
},
|
|
19142
19786
|
updateContentEntryContent: {
|
|
19143
19787
|
path: "/sites/{siteId}/content/{type}/{entryId}/content",
|
|
19144
19788
|
method: "PUT",
|
|
@@ -20509,6 +21153,30 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
20509
21153
|
"server:internal_error"
|
|
20510
21154
|
]
|
|
20511
21155
|
},
|
|
21156
|
+
listPageVersions: {
|
|
21157
|
+
path: "/sites/{siteId}/pages/{pageId}/versions",
|
|
21158
|
+
method: "GET",
|
|
21159
|
+
errors: ["validation:invalid_input", "resource:not_found"],
|
|
21160
|
+
tags: [TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById],
|
|
21161
|
+
auth: "user",
|
|
21162
|
+
responseKind: "json"
|
|
21163
|
+
},
|
|
21164
|
+
getPageVersion: {
|
|
21165
|
+
path: "/sites/{siteId}/pages/{pageId}/versions/{versionId}",
|
|
21166
|
+
method: "GET",
|
|
21167
|
+
errors: ["validation:invalid_input", "resource:not_found"],
|
|
21168
|
+
tags: [TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById],
|
|
21169
|
+
auth: "user",
|
|
21170
|
+
responseKind: "json"
|
|
21171
|
+
},
|
|
21172
|
+
restorePageVersion: {
|
|
21173
|
+
path: "/sites/{siteId}/pages/{pageId}/versions/{versionId}/restore",
|
|
21174
|
+
method: "POST",
|
|
21175
|
+
errors: ["validation:invalid_input", "resource:not_found", "resource:conflict", "server:internal_error"],
|
|
21176
|
+
tags: [TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById],
|
|
21177
|
+
auth: "user",
|
|
21178
|
+
responseKind: "json"
|
|
21179
|
+
},
|
|
20512
21180
|
applyPageDesignEditorAction: {
|
|
20513
21181
|
path: "/sites/{siteId}/pages/{pageId}/design/actions",
|
|
20514
21182
|
method: "POST",
|
|
@@ -20559,21 +21227,21 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
20559
21227
|
responseKind: "json"
|
|
20560
21228
|
},
|
|
20561
21229
|
updateForm: {
|
|
20562
|
-
path: "/sites/{siteId}/forms/{
|
|
21230
|
+
path: "/sites/{siteId}/forms/{formId}",
|
|
20563
21231
|
method: "PATCH",
|
|
20564
21232
|
tags: [TAG_TEMPLATES.siteForms],
|
|
20565
21233
|
auth: "user",
|
|
20566
21234
|
responseKind: "json"
|
|
20567
21235
|
},
|
|
20568
21236
|
deleteForm: {
|
|
20569
|
-
path: "/sites/{siteId}/forms/{
|
|
21237
|
+
path: "/sites/{siteId}/forms/{formId}",
|
|
20570
21238
|
method: "DELETE",
|
|
20571
21239
|
tags: [TAG_TEMPLATES.siteForms],
|
|
20572
21240
|
auth: "user",
|
|
20573
21241
|
responseKind: "json"
|
|
20574
21242
|
},
|
|
20575
21243
|
listFormSubmissions: {
|
|
20576
|
-
path: "/sites/{siteId}/forms/{
|
|
21244
|
+
path: "/sites/{siteId}/forms/{formId}/submissions",
|
|
20577
21245
|
method: "GET",
|
|
20578
21246
|
revalidate: 30,
|
|
20579
21247
|
tags: [TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug],
|
|
@@ -20581,7 +21249,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
20581
21249
|
responseKind: "json"
|
|
20582
21250
|
},
|
|
20583
21251
|
createFormSubmissionRectificationAnnotation: {
|
|
20584
|
-
path: "/sites/{siteId}/forms/{
|
|
21252
|
+
path: "/sites/{siteId}/forms/{formId}/submissions/{submissionId}/annotations",
|
|
20585
21253
|
method: "POST",
|
|
20586
21254
|
tags: [TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug],
|
|
20587
21255
|
auth: "user",
|
|
@@ -20594,7 +21262,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
20594
21262
|
]
|
|
20595
21263
|
},
|
|
20596
21264
|
exportFormSubmissionsCsv: {
|
|
20597
|
-
path: "/sites/{siteId}/forms/{
|
|
21265
|
+
path: "/sites/{siteId}/forms/{formId}/submissions/export.csv",
|
|
20598
21266
|
method: "GET",
|
|
20599
21267
|
tags: [TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug],
|
|
20600
21268
|
auth: "user",
|
|
@@ -27252,16 +27920,16 @@ var interpolateRichTextTokensOptionsSchema = z.object({
|
|
|
27252
27920
|
var richTextTokenPattern = /\{\{\s*([a-zA-Z0-9_]+)\s*\}\}/g;
|
|
27253
27921
|
function getSiteName(context) {
|
|
27254
27922
|
const viewModel = context.viewModel;
|
|
27255
|
-
if (!
|
|
27923
|
+
if (!isRecord3(viewModel)) return null;
|
|
27256
27924
|
const site = viewModel.site;
|
|
27257
|
-
if (
|
|
27925
|
+
if (isRecord3(site) && typeof site.title === "string") {
|
|
27258
27926
|
const title = site.title.trim();
|
|
27259
27927
|
return title.length > 0 ? title : null;
|
|
27260
27928
|
}
|
|
27261
27929
|
const root = viewModel.$root;
|
|
27262
|
-
if (
|
|
27930
|
+
if (isRecord3(root)) {
|
|
27263
27931
|
const rootSite = root.site;
|
|
27264
|
-
if (
|
|
27932
|
+
if (isRecord3(rootSite) && typeof rootSite.title === "string") {
|
|
27265
27933
|
const title = rootSite.title.trim();
|
|
27266
27934
|
if (title.length > 0) return title;
|
|
27267
27935
|
}
|
|
@@ -27283,7 +27951,7 @@ function replaceTokenText(input, allowedTokens, tokenValues) {
|
|
|
27283
27951
|
});
|
|
27284
27952
|
}
|
|
27285
27953
|
function visitRichTextNode(node, allowedTokens, tokenValues) {
|
|
27286
|
-
if (!
|
|
27954
|
+
if (!isRecord3(node)) return node;
|
|
27287
27955
|
let changed = false;
|
|
27288
27956
|
const nextNode = { ...node };
|
|
27289
27957
|
if (nextNode.type === "text" && typeof nextNode.text === "string") {
|
|
@@ -27309,13 +27977,13 @@ function visitRichTextNode(node, allowedTokens, tokenValues) {
|
|
|
27309
27977
|
return changed ? nextNode : node;
|
|
27310
27978
|
}
|
|
27311
27979
|
function interpolateRichTextTokens(value, options, context) {
|
|
27312
|
-
if (!
|
|
27980
|
+
if (!isRecord3(value)) return value;
|
|
27313
27981
|
const allowedTokens = new Set(options.tokens);
|
|
27314
27982
|
const tokenValues = {
|
|
27315
27983
|
year: String((/* @__PURE__ */ new Date()).getFullYear()),
|
|
27316
27984
|
site_name: getSiteName(context)
|
|
27317
27985
|
};
|
|
27318
|
-
if (
|
|
27986
|
+
if (isRecord3(value.doc)) {
|
|
27319
27987
|
const nextDoc = visitRichTextNode(value.doc, allowedTokens, tokenValues);
|
|
27320
27988
|
if (nextDoc === value.doc) return value;
|
|
27321
27989
|
return { ...value, doc: nextDoc };
|
|
@@ -32215,7 +32883,7 @@ init_core3();
|
|
|
32215
32883
|
|
|
32216
32884
|
// ../blocks/src/system/transforms/registry/background.ts
|
|
32217
32885
|
init_background2();
|
|
32218
|
-
|
|
32886
|
+
init_themeColorResolution();
|
|
32219
32887
|
|
|
32220
32888
|
// ../blocks/src/system/helpers/backgroundMedia.ts
|
|
32221
32889
|
init_media2();
|
|
@@ -35075,20 +35743,20 @@ var ManagementApiError = class extends Error {
|
|
|
35075
35743
|
function is404Error(error) {
|
|
35076
35744
|
return error instanceof ManagementApiError && error.statusCode === 404;
|
|
35077
35745
|
}
|
|
35078
|
-
function
|
|
35746
|
+
function isRecord4(value) {
|
|
35079
35747
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
35080
35748
|
}
|
|
35081
35749
|
function isFieldError(value) {
|
|
35082
|
-
return
|
|
35750
|
+
return isRecord4(value) && typeof value.field === "string" && typeof value.code === "string" && typeof value.message === "string";
|
|
35083
35751
|
}
|
|
35084
35752
|
function parseApiResponse(value) {
|
|
35085
|
-
if (!
|
|
35753
|
+
if (!isRecord4(value)) return null;
|
|
35086
35754
|
if (value.success === true) {
|
|
35087
35755
|
return { success: true, data: value.data };
|
|
35088
35756
|
}
|
|
35089
35757
|
if (value.success === false) {
|
|
35090
35758
|
const error = value.error;
|
|
35091
|
-
if (!
|
|
35759
|
+
if (!isRecord4(error) || typeof error.code !== "string" || typeof error.message !== "string") {
|
|
35092
35760
|
return { success: false, error: { code: "sdk:http-error", message: "Request failed", details: error } };
|
|
35093
35761
|
}
|
|
35094
35762
|
const fieldErrorsRaw = error.fieldErrors;
|
|
@@ -36572,7 +37240,7 @@ function createListCommand(config2) {
|
|
|
36572
37240
|
}
|
|
36573
37241
|
|
|
36574
37242
|
// src/cli/push-config.ts
|
|
36575
|
-
function
|
|
37243
|
+
function isRecord5(value) {
|
|
36576
37244
|
return typeof value === "object" && value !== null;
|
|
36577
37245
|
}
|
|
36578
37246
|
function parseErrorDetails(value) {
|
|
@@ -36580,10 +37248,10 @@ function parseErrorDetails(value) {
|
|
|
36580
37248
|
if (typeof value === "string") {
|
|
36581
37249
|
return { message: value };
|
|
36582
37250
|
}
|
|
36583
|
-
if (!
|
|
37251
|
+
if (!isRecord5(value)) return {};
|
|
36584
37252
|
const message = typeof value.message === "string" ? value.message : void 0;
|
|
36585
37253
|
const fieldErrorsRaw = value.fieldErrors;
|
|
36586
|
-
const fieldErrors = Array.isArray(fieldErrorsRaw) ? fieldErrorsRaw.filter(
|
|
37254
|
+
const fieldErrors = Array.isArray(fieldErrorsRaw) ? fieldErrorsRaw.filter(isRecord5).map((d) => ({
|
|
36587
37255
|
field: typeof d.field === "string" ? d.field : "",
|
|
36588
37256
|
message: typeof d.message === "string" ? d.message : ""
|
|
36589
37257
|
})).filter((d) => d.field.length > 0 && d.message.length > 0) : void 0;
|
|
@@ -36595,12 +37263,12 @@ function formatFieldErrors(fieldErrors) {
|
|
|
36595
37263
|
}
|
|
36596
37264
|
function getDashboardErrorMessage(responseJson, fallback) {
|
|
36597
37265
|
if (!responseJson) return fallback;
|
|
36598
|
-
if (
|
|
37266
|
+
if (isRecord5(responseJson) && responseJson.success === false && "error" in responseJson) {
|
|
36599
37267
|
const parsed = parseErrorDetails(responseJson.error);
|
|
36600
37268
|
const msg = parsed.message ?? fallback;
|
|
36601
37269
|
return msg + formatFieldErrors(parsed.fieldErrors);
|
|
36602
37270
|
}
|
|
36603
|
-
if (
|
|
37271
|
+
if (isRecord5(responseJson) && "error" in responseJson) {
|
|
36604
37272
|
const parsed = parseErrorDetails(responseJson.error);
|
|
36605
37273
|
const msg = parsed.message ?? fallback;
|
|
36606
37274
|
return msg + formatFieldErrors(parsed.fieldErrors);
|
|
@@ -36952,7 +37620,7 @@ function convertPulledFooterToLocal(remoteFooter) {
|
|
|
36952
37620
|
|
|
36953
37621
|
// src/cli/media/portable.ts
|
|
36954
37622
|
var ENV_SPECIFIC_MEDIA_KEYS = ["assetId", "storagePath", "storageBucket"];
|
|
36955
|
-
var
|
|
37623
|
+
var isRecord6 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
36956
37624
|
var isMediaObject = (value) => value.type === "image" || value.type === "video";
|
|
36957
37625
|
function stripEnvSpecificMediaFieldsInPlace(value) {
|
|
36958
37626
|
if (value === null || value === void 0) return;
|
|
@@ -36962,7 +37630,7 @@ function stripEnvSpecificMediaFieldsInPlace(value) {
|
|
|
36962
37630
|
}
|
|
36963
37631
|
return;
|
|
36964
37632
|
}
|
|
36965
|
-
if (!
|
|
37633
|
+
if (!isRecord6(value)) return;
|
|
36966
37634
|
if (isMediaObject(value)) {
|
|
36967
37635
|
const hasCmsRef = typeof value.identifier === "string" || typeof value.assetId === "string" || typeof value.storagePath === "string" || typeof value.storageBucket === "string";
|
|
36968
37636
|
for (const key of ENV_SPECIFIC_MEDIA_KEYS) {
|
|
@@ -36973,7 +37641,7 @@ function stripEnvSpecificMediaFieldsInPlace(value) {
|
|
|
36973
37641
|
}
|
|
36974
37642
|
delete value.mimeType;
|
|
36975
37643
|
}
|
|
36976
|
-
if (value.type === "image" &&
|
|
37644
|
+
if (value.type === "image" && isRecord6(value.attrs)) {
|
|
36977
37645
|
const attrs = value.attrs;
|
|
36978
37646
|
const hasIdentifier = typeof attrs.identifier === "string" && attrs.identifier.trim().length > 0;
|
|
36979
37647
|
if (hasIdentifier) {
|
|
@@ -38339,9 +39007,9 @@ async function localMediaFileExists(filePath) {
|
|
|
38339
39007
|
}
|
|
38340
39008
|
|
|
38341
39009
|
// src/cli/media/identifiers.ts
|
|
38342
|
-
var
|
|
39010
|
+
var isRecord7 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
38343
39011
|
var isMediaValue = (value) => {
|
|
38344
|
-
if (!
|
|
39012
|
+
if (!isRecord7(value)) return false;
|
|
38345
39013
|
const type = value.type;
|
|
38346
39014
|
if (type !== "image" && type !== "video" && type !== "audio" && type !== "document" && type !== "spreadsheet" && type !== "archive") return false;
|
|
38347
39015
|
return typeof value.identifier === "string" || typeof value.assetId === "string" || typeof value.storagePath === "string" || typeof value.src === "string";
|
|
@@ -38356,7 +39024,7 @@ var walkMediaValues = (value, location2, handler) => {
|
|
|
38356
39024
|
});
|
|
38357
39025
|
return;
|
|
38358
39026
|
}
|
|
38359
|
-
if (
|
|
39027
|
+
if (isRecord7(value)) {
|
|
38360
39028
|
Object.entries(value).forEach(([key, entry]) => {
|
|
38361
39029
|
walkMediaValues(entry, location2 ? `${location2}.${key}` : key, handler);
|
|
38362
39030
|
});
|
|
@@ -38464,7 +39132,7 @@ var normalizeMediaValueToIdentifierOnly = (value, identifier, asset) => {
|
|
|
38464
39132
|
};
|
|
38465
39133
|
|
|
38466
39134
|
// src/cli/media/rich-text.ts
|
|
38467
|
-
var
|
|
39135
|
+
var isRecord8 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
38468
39136
|
function collectRichTextImageAttrs(value, out = [], location2 = "") {
|
|
38469
39137
|
if (Array.isArray(value)) {
|
|
38470
39138
|
value.forEach(
|
|
@@ -38472,8 +39140,8 @@ function collectRichTextImageAttrs(value, out = [], location2 = "") {
|
|
|
38472
39140
|
);
|
|
38473
39141
|
return out;
|
|
38474
39142
|
}
|
|
38475
|
-
if (!
|
|
38476
|
-
if (value.type === "image" &&
|
|
39143
|
+
if (!isRecord8(value)) return out;
|
|
39144
|
+
if (value.type === "image" && isRecord8(value.attrs)) {
|
|
38477
39145
|
out.push({ attrs: value.attrs, location: location2 ? `${location2}.attrs` : "attrs" });
|
|
38478
39146
|
}
|
|
38479
39147
|
for (const [key, child] of Object.entries(value)) {
|
|
@@ -42617,11 +43285,11 @@ function normalizeLocalContentShape(content) {
|
|
|
42617
43285
|
function nullishToNull(value) {
|
|
42618
43286
|
return value == null ? null : value;
|
|
42619
43287
|
}
|
|
42620
|
-
function
|
|
43288
|
+
function isRecord9(value) {
|
|
42621
43289
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
42622
43290
|
}
|
|
42623
43291
|
function normalizeVenueAddress(value) {
|
|
42624
|
-
const obj =
|
|
43292
|
+
const obj = isRecord9(value) ? value : {};
|
|
42625
43293
|
return {
|
|
42626
43294
|
line1: nullishToNull(typeof obj.line1 === "string" ? obj.line1 : void 0),
|
|
42627
43295
|
line2: nullishToNull(typeof obj.line2 === "string" ? obj.line2 : void 0),
|
|
@@ -42638,7 +43306,7 @@ function normalizeVenueAddress(value) {
|
|
|
42638
43306
|
};
|
|
42639
43307
|
}
|
|
42640
43308
|
function normalizeVenueLocation(value) {
|
|
42641
|
-
if (!
|
|
43309
|
+
if (!isRecord9(value)) return null;
|
|
42642
43310
|
const obj = value;
|
|
42643
43311
|
const lat = typeof obj.lat === "number" ? obj.lat : null;
|
|
42644
43312
|
const lng = typeof obj.lng === "number" ? obj.lng : null;
|
|
@@ -42646,7 +43314,7 @@ function normalizeVenueLocation(value) {
|
|
|
42646
43314
|
return { lat, lng };
|
|
42647
43315
|
}
|
|
42648
43316
|
function normalizeVenueForCompare(venue) {
|
|
42649
|
-
const obj =
|
|
43317
|
+
const obj = isRecord9(venue) ? venue : {};
|
|
42650
43318
|
return {
|
|
42651
43319
|
slug: String(obj.slug),
|
|
42652
43320
|
title: String(obj.title),
|
|
@@ -42659,7 +43327,7 @@ function normalizeVenueForCompare(venue) {
|
|
|
42659
43327
|
};
|
|
42660
43328
|
}
|
|
42661
43329
|
function normalizeEventCategoryForCompare(category) {
|
|
42662
|
-
const obj =
|
|
43330
|
+
const obj = isRecord9(category) ? category : {};
|
|
42663
43331
|
return {
|
|
42664
43332
|
identifier: String(obj.identifier),
|
|
42665
43333
|
name: String(obj.name),
|
|
@@ -42669,9 +43337,9 @@ function normalizeEventCategoryForCompare(category) {
|
|
|
42669
43337
|
};
|
|
42670
43338
|
}
|
|
42671
43339
|
function normalizeRemoteEventForCompare(event) {
|
|
42672
|
-
const obj =
|
|
42673
|
-
const schedule =
|
|
42674
|
-
const pricing =
|
|
43340
|
+
const obj = isRecord9(event) ? event : {};
|
|
43341
|
+
const schedule = isRecord9(obj.schedule) ? obj.schedule : {};
|
|
43342
|
+
const pricing = isRecord9(obj.pricing) ? obj.pricing : {};
|
|
42675
43343
|
return {
|
|
42676
43344
|
identifier: String(obj.identifier),
|
|
42677
43345
|
title: String(obj.title),
|
|
@@ -42704,14 +43372,14 @@ function normalizeRemoteEventForCompare(event) {
|
|
|
42704
43372
|
venueRef: nullishToNull(typeof obj.venueRef === "string" ? obj.venueRef : void 0),
|
|
42705
43373
|
categoryRef: nullishToNull(typeof obj.categoryRef === "string" ? obj.categoryRef : void 0),
|
|
42706
43374
|
formRef: nullishToNull(typeof obj.formRef === "string" ? obj.formRef : void 0),
|
|
42707
|
-
content:
|
|
42708
|
-
settings:
|
|
42709
|
-
presentation:
|
|
43375
|
+
content: isRecord9(obj.content) ? obj.content : {},
|
|
43376
|
+
settings: isRecord9(obj.settings) ? obj.settings : {},
|
|
43377
|
+
presentation: isRecord9(obj.presentation) ? obj.presentation : null,
|
|
42710
43378
|
tags: Array.isArray(obj.tags) ? obj.tags : []
|
|
42711
43379
|
};
|
|
42712
43380
|
}
|
|
42713
43381
|
function normalizeLocalEventAgainstRemoteForCompare(localEvent, remoteEvent) {
|
|
42714
|
-
const local =
|
|
43382
|
+
const local = isRecord9(localEvent) ? localEvent : {};
|
|
42715
43383
|
const base = remoteEvent ? normalizeRemoteEventForCompare(remoteEvent) : normalizeRemoteEventForCompare({
|
|
42716
43384
|
identifier: local.identifier,
|
|
42717
43385
|
title: local.title,
|
|
@@ -42729,8 +43397,8 @@ function normalizeLocalEventAgainstRemoteForCompare(localEvent, remoteEvent) {
|
|
|
42729
43397
|
presentation: local.presentation ?? null,
|
|
42730
43398
|
tags: local.tags ?? []
|
|
42731
43399
|
});
|
|
42732
|
-
const schedule =
|
|
42733
|
-
const pricing =
|
|
43400
|
+
const schedule = isRecord9(local.schedule) ? local.schedule : {};
|
|
43401
|
+
const pricing = isRecord9(local.pricing) ? local.pricing : {};
|
|
42734
43402
|
return {
|
|
42735
43403
|
...base,
|
|
42736
43404
|
identifier: String(local.identifier ?? base.identifier),
|
|
@@ -42756,9 +43424,9 @@ function normalizeLocalEventAgainstRemoteForCompare(localEvent, remoteEvent) {
|
|
|
42756
43424
|
venueRef: local.venueRef === void 0 ? base.venueRef : nullishToNull(typeof local.venueRef === "string" ? local.venueRef : void 0),
|
|
42757
43425
|
categoryRef: local.categoryRef === void 0 ? base.categoryRef : nullishToNull(typeof local.categoryRef === "string" ? local.categoryRef : void 0),
|
|
42758
43426
|
formRef: local.formRef === void 0 ? base.formRef : nullishToNull(typeof local.formRef === "string" ? local.formRef : void 0),
|
|
42759
|
-
content: local.content === void 0 ? base.content :
|
|
42760
|
-
settings: local.settings === void 0 ? base.settings :
|
|
42761
|
-
presentation: local.presentation === void 0 ? base.presentation :
|
|
43427
|
+
content: local.content === void 0 ? base.content : isRecord9(local.content) ? local.content : {},
|
|
43428
|
+
settings: local.settings === void 0 ? base.settings : isRecord9(local.settings) ? local.settings : {},
|
|
43429
|
+
presentation: local.presentation === void 0 ? base.presentation : isRecord9(local.presentation) ? local.presentation : null,
|
|
42762
43430
|
tags: local.tags === void 0 ? base.tags : Array.isArray(local.tags) ? local.tags : []
|
|
42763
43431
|
};
|
|
42764
43432
|
}
|
|
@@ -42770,7 +43438,7 @@ function toIsoStringOrOriginal(value) {
|
|
|
42770
43438
|
function normalizeCourseSessions(value) {
|
|
42771
43439
|
if (!Array.isArray(value)) return [];
|
|
42772
43440
|
return value.map((session) => {
|
|
42773
|
-
const obj =
|
|
43441
|
+
const obj = isRecord9(session) ? session : {};
|
|
42774
43442
|
return {
|
|
42775
43443
|
startsAt: toIsoStringOrOriginal(obj.startsAt),
|
|
42776
43444
|
endsAt: toIsoStringOrOriginal(obj.endsAt)
|
|
@@ -42782,18 +43450,18 @@ function normalizeCourseSessions(value) {
|
|
|
42782
43450
|
}
|
|
42783
43451
|
function normalizeCourseProgram(value) {
|
|
42784
43452
|
if (value == null) return null;
|
|
42785
|
-
if (!
|
|
43453
|
+
if (!isRecord9(value)) {
|
|
42786
43454
|
return { identifier: null, data: {} };
|
|
42787
43455
|
}
|
|
42788
43456
|
return {
|
|
42789
43457
|
identifier: nullishToNull(
|
|
42790
43458
|
typeof value.identifier === "string" ? value.identifier : void 0
|
|
42791
43459
|
),
|
|
42792
|
-
data:
|
|
43460
|
+
data: isRecord9(value.data) ? value.data : {}
|
|
42793
43461
|
};
|
|
42794
43462
|
}
|
|
42795
43463
|
function normalizeRemoteCourseForCompare(course) {
|
|
42796
|
-
const obj =
|
|
43464
|
+
const obj = isRecord9(course) ? course : {};
|
|
42797
43465
|
return {
|
|
42798
43466
|
identifier: String(obj.identifier),
|
|
42799
43467
|
title: String(obj.title),
|
|
@@ -42816,7 +43484,7 @@ function normalizeRemoteCourseForCompare(course) {
|
|
|
42816
43484
|
};
|
|
42817
43485
|
}
|
|
42818
43486
|
function normalizeLocalCourseAgainstRemoteForCompare(localCourse, remoteCourse) {
|
|
42819
|
-
const local =
|
|
43487
|
+
const local = isRecord9(localCourse) ? localCourse : {};
|
|
42820
43488
|
const base = remoteCourse ? normalizeRemoteCourseForCompare(remoteCourse) : normalizeRemoteCourseForCompare({
|
|
42821
43489
|
identifier: local.identifier,
|
|
42822
43490
|
title: local.title,
|
|
@@ -42837,11 +43505,11 @@ function normalizeLocalCourseAgainstRemoteForCompare(localCourse, remoteCourse)
|
|
|
42837
43505
|
});
|
|
42838
43506
|
const status = local.status === void 0 ? base.status : local.status === "active" || local.status === "cancelled" || local.status === "completed" ? local.status : "draft";
|
|
42839
43507
|
const visibility = local.visibility === void 0 ? base.visibility : local.visibility === "public" || local.visibility === "private" || local.visibility === "unlisted" ? local.visibility : "public";
|
|
42840
|
-
const program2 = local.program === void 0 ? base.program : local.program === null ? null :
|
|
43508
|
+
const program2 = local.program === void 0 ? base.program : local.program === null ? null : isRecord9(local.program) ? {
|
|
42841
43509
|
identifier: local.program.identifier === void 0 ? base.program?.identifier ?? null : nullishToNull(
|
|
42842
43510
|
typeof local.program.identifier === "string" ? local.program.identifier : void 0
|
|
42843
43511
|
),
|
|
42844
|
-
data:
|
|
43512
|
+
data: isRecord9(local.program.data) ? local.program.data : base.program?.data ?? {}
|
|
42845
43513
|
} : base.program;
|
|
42846
43514
|
return {
|
|
42847
43515
|
...base,
|
|
@@ -45783,7 +46451,7 @@ var THEME_FIELD_CATEGORY_MAP = {
|
|
|
45783
46451
|
};
|
|
45784
46452
|
|
|
45785
46453
|
// src/cli/init-docs/zod-to-markdown.ts
|
|
45786
|
-
function
|
|
46454
|
+
function isRecord10(value) {
|
|
45787
46455
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
45788
46456
|
}
|
|
45789
46457
|
function isZodTypeAny(value) {
|
|
@@ -45909,7 +46577,7 @@ function extractLiteralValue(schema) {
|
|
|
45909
46577
|
const typeName = getTypeName(schema);
|
|
45910
46578
|
if (typeName !== ZodTypeName.ZodLiteral) return void 0;
|
|
45911
46579
|
const def = schema._def;
|
|
45912
|
-
if (!
|
|
46580
|
+
if (!isRecord10(def)) return void 0;
|
|
45913
46581
|
return String(def.value);
|
|
45914
46582
|
}
|
|
45915
46583
|
function extractSchemaInfo(schema, skipFields = []) {
|
|
@@ -45979,7 +46647,7 @@ function extractFieldInfo(name, schema) {
|
|
|
45979
46647
|
}
|
|
45980
46648
|
if (typeName === ZodTypeName.ZodRecord) {
|
|
45981
46649
|
const def = inner._def;
|
|
45982
|
-
const valueSchema =
|
|
46650
|
+
const valueSchema = isRecord10(def) ? def.valueType : void 0;
|
|
45983
46651
|
if (!isZodTypeAny(valueSchema)) {
|
|
45984
46652
|
info.recordValueType = "unknown";
|
|
45985
46653
|
return info;
|
|
@@ -45994,7 +46662,7 @@ function extractFieldInfo(name, schema) {
|
|
|
45994
46662
|
}
|
|
45995
46663
|
} else if (getTypeName(valueInner) === ZodTypeName.ZodRecord) {
|
|
45996
46664
|
const nestedDef = valueInner._def;
|
|
45997
|
-
const nestedValueSchema =
|
|
46665
|
+
const nestedValueSchema = isRecord10(nestedDef) ? nestedDef.valueType : void 0;
|
|
45998
46666
|
if (!isZodTypeAny(nestedValueSchema)) {
|
|
45999
46667
|
info.recordValueType = "record<string, unknown>";
|
|
46000
46668
|
return info;
|
|
@@ -46005,7 +46673,7 @@ function extractFieldInfo(name, schema) {
|
|
|
46005
46673
|
}
|
|
46006
46674
|
if (typeName === ZodTypeName.ZodUnion || typeName === ZodTypeName.ZodDiscriminatedUnion) {
|
|
46007
46675
|
const def = inner._def;
|
|
46008
|
-
const optionsValue =
|
|
46676
|
+
const optionsValue = isRecord10(def) ? def.options : void 0;
|
|
46009
46677
|
const options = Array.isArray(optionsValue) ? optionsValue.filter(isZodTypeAny) : [];
|
|
46010
46678
|
const optionTypes = options.map((opt) => {
|
|
46011
46679
|
const { inner: optInner } = unwrapSchema(opt);
|
|
@@ -47165,7 +47833,7 @@ var SimpleCache = class {
|
|
|
47165
47833
|
};
|
|
47166
47834
|
|
|
47167
47835
|
// src/version.ts
|
|
47168
|
-
var SDK_VERSION = "0.62.
|
|
47836
|
+
var SDK_VERSION = "0.62.4";
|
|
47169
47837
|
|
|
47170
47838
|
// src/client/error.ts
|
|
47171
47839
|
var RiverbankApiError = class _RiverbankApiError extends Error {
|