riverbankcms 0.7.1 → 0.9.0
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/acceptance/matrix.mjs +3 -28
- package/dist/cli/index.mjs +50660 -46751
- package/dist/cli/init-docs/content/cli-reference.md +2 -11
- package/dist/cli/init-docs/content/content-management.md +3 -1
- package/dist/cli/init-docs/content/getting-started.md +0 -1
- package/dist/{eventUpsertInputSchema-DP8gbZJ9.mjs → eventUpsertInputSchema-CqHIJp9H.mjs} +2 -2
- package/dist/load-config-CKBdp8M0.mjs +4 -0
- package/dist/{sdk-peer-CADuG9SR.mjs → load-config-Cf5uPEAn.mjs} +89 -6
- package/dist/{style-BiosmAJm.mjs → local-sync-DF-2DL_D.mjs} +5462 -9856
- package/dist/{plan-BFmMfERc.mjs → plan-By0bjnd3.mjs} +1 -1
- package/dist/scaffold/index.mjs +2 -2
- package/dist/{sdk-event-upsert-Cp043nSP.mjs → sdk-event-upsert-BNxbxaA0.mjs} +182 -42
- package/dist/{src-B8fOSKJ6.mjs → src-DbmhanBI.mjs} +76 -1
- package/dist/testing.mjs +4 -5
- package/package.json +1 -1
- package/dist/load-config-CkSoLJFY.mjs +0 -87
- package/dist/load-config-Dgi_eByc.mjs +0 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Ht as ok, Vt as err, mt as parseSiteId } from "./src-
|
|
2
|
+
import { Ht as ok, Vt as err, mt as parseSiteId } from "./src-DbmhanBI.mjs";
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import { dirname, isAbsolute, join, parse, relative, resolve, sep } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
package/dist/scaffold/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "../src-
|
|
3
|
-
import { a as prepareScaffoldExecution, d as loadGeneratedPackageRanges, i as preflightScaffoldTargets, l as deriveGeneratedPackageRanges, o as writeScaffoldFiles, r as preflightScaffoldPlan, s as deriveScaffoldLocalManifest, t as deriveScaffoldPlan, u as findPackageManifestPath } from "../plan-
|
|
2
|
+
import "../src-DbmhanBI.mjs";
|
|
3
|
+
import { a as prepareScaffoldExecution, d as loadGeneratedPackageRanges, i as preflightScaffoldTargets, l as deriveGeneratedPackageRanges, o as writeScaffoldFiles, r as preflightScaffoldPlan, s as deriveScaffoldLocalManifest, t as deriveScaffoldPlan, u as findPackageManifestPath } from "../plan-By0bjnd3.mjs";
|
|
4
4
|
|
|
5
5
|
export { deriveGeneratedPackageRanges, deriveScaffoldLocalManifest, deriveScaffoldPlan, findPackageManifestPath, loadGeneratedPackageRanges, preflightScaffoldPlan, preflightScaffoldTargets, prepareScaffoldExecution, writeScaffoldFiles };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { A as parseFooterCompositionV1, Ht as ok, K as parseUtcIsoDateTimeString, M as isCanonicalRichTextDoc, P as isPresent, Vt as err, X as parseBookingTimeZone, b as stableJsonStringify, k as footerNavigationLayouts, l as EVENT_PRESET_VALUES, lt as assertNever,
|
|
2
|
+
import { A as parseFooterCompositionV1, Ht as ok, K as parseUtcIsoDateTimeString, M as isCanonicalRichTextDoc, P as isPresent, Vt as err, X as parseBookingTimeZone, b as stableJsonStringify, k as footerNavigationLayouts, l as EVENT_PRESET_VALUES, lt as assertNever, n as NAVIGATION_LOCATIONS, s as resolveSiteVerticalBookingConfig, u as ORDINARY_EVENT_PRESET_VALUES } from "./src-DbmhanBI.mjs";
|
|
3
3
|
import "node:module";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
|
|
@@ -869,6 +869,66 @@ const buttonSystemSchema = z.strictObject({
|
|
|
869
869
|
});
|
|
870
870
|
});
|
|
871
871
|
|
|
872
|
+
//#endregion
|
|
873
|
+
//#region ../theme-core/src/footer/mode.ts
|
|
874
|
+
const footerModeSchema = z.enum([
|
|
875
|
+
"default",
|
|
876
|
+
"blocks",
|
|
877
|
+
"default+blocks",
|
|
878
|
+
"none"
|
|
879
|
+
]);
|
|
880
|
+
/** Reads only SDK footer intent; unrelated config and theme fields are not authorities. */
|
|
881
|
+
function resolveSdkFooterMode(config) {
|
|
882
|
+
const parsed = z.object({ layout: z.object({ footerMode: footerModeSchema.optional() }).optional() }).safeParse(config);
|
|
883
|
+
return parsed.success ? parsed.data.layout?.footerMode ?? "default" : "default";
|
|
884
|
+
}
|
|
885
|
+
/** Mirrors the incumbent footer renderer's variant-specific identity rules. */
|
|
886
|
+
function resolveFooterBrandVisibility(footer) {
|
|
887
|
+
return {
|
|
888
|
+
showLogo: footer.variant === "simple" ? footer.logo?.showLogo === true : footer.logo?.showLogo !== false,
|
|
889
|
+
showTitle: footer.logo?.showLogoText ?? footer.showLogoText === true
|
|
890
|
+
};
|
|
891
|
+
}
|
|
892
|
+
/**
|
|
893
|
+
* Resolve what to render for the footer given the current mode and whether the
|
|
894
|
+
* site is SDK-managed.
|
|
895
|
+
*
|
|
896
|
+
* Backwards compatible: missing/undefined mode is treated as 'default'.
|
|
897
|
+
*/
|
|
898
|
+
function resolveFooterRenderPlan(params) {
|
|
899
|
+
if (!params.isSdkSite) {
|
|
900
|
+
return {
|
|
901
|
+
mode: "default",
|
|
902
|
+
renderDefaultFooter: true,
|
|
903
|
+
renderFooterBlocks: false
|
|
904
|
+
};
|
|
905
|
+
}
|
|
906
|
+
const mode = params.mode ?? "default";
|
|
907
|
+
switch (mode) {
|
|
908
|
+
case "blocks": return {
|
|
909
|
+
mode: "blocks",
|
|
910
|
+
renderDefaultFooter: false,
|
|
911
|
+
renderFooterBlocks: true
|
|
912
|
+
};
|
|
913
|
+
case "default+blocks": return {
|
|
914
|
+
mode: "default+blocks",
|
|
915
|
+
renderDefaultFooter: true,
|
|
916
|
+
renderFooterBlocks: true
|
|
917
|
+
};
|
|
918
|
+
case "none": return {
|
|
919
|
+
mode: "none",
|
|
920
|
+
renderDefaultFooter: false,
|
|
921
|
+
renderFooterBlocks: false
|
|
922
|
+
};
|
|
923
|
+
case "default":
|
|
924
|
+
default: return {
|
|
925
|
+
mode: "default",
|
|
926
|
+
renderDefaultFooter: true,
|
|
927
|
+
renderFooterBlocks: false
|
|
928
|
+
};
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
|
|
872
932
|
//#endregion
|
|
873
933
|
//#region ../theme-core/src/lib/media.ts
|
|
874
934
|
const mediaTypeDiscriminants = [
|
|
@@ -2598,6 +2658,37 @@ function normalizedReference(value) {
|
|
|
2598
2658
|
return normalized.length > 0 ? normalized : null;
|
|
2599
2659
|
}
|
|
2600
2660
|
|
|
2661
|
+
//#endregion
|
|
2662
|
+
//#region ../theme-core/src/surfaces/logoVariant.ts
|
|
2663
|
+
/** Concrete hex behind a plain, opaque palette token, or null otherwise. */
|
|
2664
|
+
function opaquePaletteHexForToken(expandedPalette, token) {
|
|
2665
|
+
if (!token) return null;
|
|
2666
|
+
const parts = parseColorTokenParts(token);
|
|
2667
|
+
if (parts.kind !== "token" || parts.opacityPercent !== null) return null;
|
|
2668
|
+
return expandedPalette[parts.token] ?? null;
|
|
2669
|
+
}
|
|
2670
|
+
/**
|
|
2671
|
+
* Tone of the surface a foreground token was resolved for.
|
|
2672
|
+
*
|
|
2673
|
+
* A token with opacity has no known underlay to composite against, and a raw
|
|
2674
|
+
* or unrecognised token has no palette hex, so both are `unknown` rather than
|
|
2675
|
+
* a guess.
|
|
2676
|
+
*/
|
|
2677
|
+
function surfaceToneFromForegroundToken(expandedPalette, foregroundToken) {
|
|
2678
|
+
const hex = opaquePaletteHexForToken(expandedPalette, foregroundToken);
|
|
2679
|
+
if (!hex) return "unknown";
|
|
2680
|
+
return featuresFromHex(hex).Y >= .5 ? "dark" : "light";
|
|
2681
|
+
}
|
|
2682
|
+
/**
|
|
2683
|
+
* The logo to draw on a surface of the given tone. A missing variant falls
|
|
2684
|
+
* back to the other one, and an unknown tone uses the light-backgrounds logo,
|
|
2685
|
+
* which is what every site rendered before variants existed.
|
|
2686
|
+
*/
|
|
2687
|
+
function selectLogoVariant(tone, variants) {
|
|
2688
|
+
const { forLightBackgrounds, forDarkBackgrounds } = variants;
|
|
2689
|
+
return tone === "dark" ? forDarkBackgrounds ?? forLightBackgrounds : forLightBackgrounds ?? forDarkBackgrounds;
|
|
2690
|
+
}
|
|
2691
|
+
|
|
2601
2692
|
//#endregion
|
|
2602
2693
|
//#region ../theme-core/src/utils/colorStyles.ts
|
|
2603
2694
|
const COLOR_VAR_PREFIX = "--tb-";
|
|
@@ -2673,18 +2764,30 @@ function backgroundColorStyle(token) {
|
|
|
2673
2764
|
return { backgroundColor: rgbColorValue(token) };
|
|
2674
2765
|
}
|
|
2675
2766
|
/**
|
|
2676
|
-
*
|
|
2767
|
+
* Converts a text color token to a CSS color value that follows the enclosing
|
|
2768
|
+
* surface. The semantic text tokens (`text`, `heading`, `mutedText`) resolve
|
|
2769
|
+
* to the surface foreground variables, so text adapts when a section's
|
|
2770
|
+
* background changes; any other token is a fixed theme color.
|
|
2677
2771
|
*
|
|
2678
2772
|
* @param token - Theme color token
|
|
2679
|
-
* @returns
|
|
2773
|
+
* @returns CSS color value
|
|
2680
2774
|
*/
|
|
2681
|
-
function
|
|
2775
|
+
function textColorValue(token) {
|
|
2682
2776
|
const parsed = parseToken(token);
|
|
2683
2777
|
const surfaceRole = parsed.raw ? null : surfaceRoleForTextToken(parsed.token);
|
|
2684
|
-
if (surfaceRole) {
|
|
2685
|
-
return
|
|
2778
|
+
if (!surfaceRole) {
|
|
2779
|
+
return rgbColorValue(token);
|
|
2686
2780
|
}
|
|
2687
|
-
return
|
|
2781
|
+
return parsed.opacityPercent === undefined ? surfaceForegroundValue(surfaceRole) : surfaceForegroundValueWithOpacity(surfaceRole, parsed.opacityPercent);
|
|
2782
|
+
}
|
|
2783
|
+
/**
|
|
2784
|
+
* Creates a text color style object from a theme token.
|
|
2785
|
+
*
|
|
2786
|
+
* @param token - Theme color token
|
|
2787
|
+
* @returns CSSProperties with color
|
|
2788
|
+
*/
|
|
2789
|
+
function textColorStyle(token) {
|
|
2790
|
+
return { color: textColorValue(token) };
|
|
2688
2791
|
}
|
|
2689
2792
|
/**
|
|
2690
2793
|
* Creates a border color style object from a theme token.
|
|
@@ -2950,14 +3053,12 @@ function generateVariantCSS(variant, themeId, cardClasses, tokens, theme) {
|
|
|
2950
3053
|
const shadowValue = generateShadowValue$1(shadow$1);
|
|
2951
3054
|
rules.push(`box-shadow: ${shadowValue}`);
|
|
2952
3055
|
}
|
|
2953
|
-
|
|
2954
|
-
rules.push(`flex-direction: column`);
|
|
2955
|
-
rules.push(`position: relative`);
|
|
2956
|
-
rules.push(`overflow: visible`);
|
|
3056
|
+
const structureSelector = cardClasses.map((cardClass) => `:where([data-theme-scope="${themeId}"]) :where(.${cardClass})`).join(",\n");
|
|
2957
3057
|
const mediaRadius = MEDIA_CORNER_MAP[corners$1];
|
|
2958
3058
|
const mediaRules = [`border-top-left-radius: ${mediaRadius}`, `border-top-right-radius: ${mediaRadius}`];
|
|
2959
3059
|
const contentRules = [`padding: ${resolveContentPadding(variant)}`];
|
|
2960
3060
|
return [
|
|
3061
|
+
`${structureSelector} {\n display: flex;\n flex-direction: column;\n position: relative;\n overflow: visible;\n}`,
|
|
2961
3062
|
`${containerSelector} {\n ${rules.join(";\n ")};\n}`,
|
|
2962
3063
|
...cardDecorationPseudoRules(containerSelectors, variant.decorations, resolveColor),
|
|
2963
3064
|
`${fallbackBackgroundSelector} {\n background: transparent;\n}`,
|
|
@@ -5523,12 +5624,6 @@ const footerVariant = z.enum([
|
|
|
5523
5624
|
"split"
|
|
5524
5625
|
]);
|
|
5525
5626
|
const footerMaxWidth = z.enum(["container", "full"]);
|
|
5526
|
-
const footerMode = z.enum([
|
|
5527
|
-
"default",
|
|
5528
|
-
"blocks",
|
|
5529
|
-
"default+blocks",
|
|
5530
|
-
"none"
|
|
5531
|
-
]);
|
|
5532
5627
|
const footerNavLayoutMode = z.enum([
|
|
5533
5628
|
"stack",
|
|
5534
5629
|
"inline",
|
|
@@ -5614,7 +5709,7 @@ const footerLogoSchema = z.object({
|
|
|
5614
5709
|
]).optional()
|
|
5615
5710
|
});
|
|
5616
5711
|
const footerSchema = z.object({
|
|
5617
|
-
mode:
|
|
5712
|
+
mode: footerModeSchema.optional(),
|
|
5618
5713
|
variant: footerVariant,
|
|
5619
5714
|
maxWidth: footerMaxWidth,
|
|
5620
5715
|
showLogoText: z.boolean().optional(),
|
|
@@ -6237,7 +6332,7 @@ const BUTTON_CONTRAST_POLICY = {
|
|
|
6237
6332
|
nonTextMinimumRatio: 3,
|
|
6238
6333
|
gradientSamplesPerSegment: 20,
|
|
6239
6334
|
alphaBackgrounds: "reject-without-known-surface",
|
|
6240
|
-
disabled: "
|
|
6335
|
+
disabled: "validated-colour-pair-with-muted-control-opacity"
|
|
6241
6336
|
};
|
|
6242
6337
|
function formatButtonColourContractError(error) {
|
|
6243
6338
|
switch (error.tag) {
|
|
@@ -6862,6 +6957,26 @@ function parseThemeForPersistence(value) {
|
|
|
6862
6957
|
};
|
|
6863
6958
|
}
|
|
6864
6959
|
|
|
6960
|
+
//#endregion
|
|
6961
|
+
//#region ../theme-core/src/buttons/affordanceSuppression.ts
|
|
6962
|
+
/**
|
|
6963
|
+
* Internal: the opt-out the generated affordance rule is written against.
|
|
6964
|
+
*
|
|
6965
|
+
* A button style may declare a trailing `affordance`, which the theme renders as
|
|
6966
|
+
* a CSS `::after` on every button of that variant. An authored button that
|
|
6967
|
+
* renders its own trailing icon must not also receive the theme's, or it shows
|
|
6968
|
+
* two.
|
|
6969
|
+
*
|
|
6970
|
+
* Deliberately not exported from `./index`. This used to be public, and two
|
|
6971
|
+
* block components reached past the theme to draw arrows of their own — one of
|
|
6972
|
+
* them doubling up on the styles that declare an affordance, both of them
|
|
6973
|
+
* overriding the twelve styles that deliberately declare none. Whether a button
|
|
6974
|
+
* carries a trailing affordance is the style's decision; the only caller that
|
|
6975
|
+
* legitimately opts out is the authored-button renderer, which reaches it
|
|
6976
|
+
* through `themeButtonExtraClassesWithTrailingIcon`.
|
|
6977
|
+
*/
|
|
6978
|
+
const AFFORDANCE_SUPPRESS_CLASS = "rb-affordance-off";
|
|
6979
|
+
|
|
6865
6980
|
//#endregion
|
|
6866
6981
|
//#region ../theme-core/src/buttons/classNames.ts
|
|
6867
6982
|
/**
|
|
@@ -6898,13 +7013,22 @@ function themeButtonSelector(variant, size) {
|
|
|
6898
7013
|
}
|
|
6899
7014
|
return `${baseSelector}.${themeButtonSizeClassName(size)}`;
|
|
6900
7015
|
}
|
|
6901
|
-
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
7016
|
+
/**
|
|
7017
|
+
* Extra classes for an authored button that renders its own trailing icon.
|
|
7018
|
+
*
|
|
7019
|
+
* This intent-named function has exactly one caller. The name
|
|
7020
|
+
* states what the caller knows to be true of its own markup — that it renders a
|
|
7021
|
+
* trailing icon — rather than what the theme does about it. The consequence is
|
|
7022
|
+
* the theme's to decide and to change; a caller naming the consequence would be
|
|
7023
|
+
* asserting a policy it does not own, and would quietly become a lie the moment
|
|
7024
|
+
* that policy moved.
|
|
7025
|
+
*
|
|
7026
|
+
* Do not reach for this to remove an arrow you simply do not want. A trailing
|
|
7027
|
+
* affordance is declared by the button style, and a block overriding that is the
|
|
7028
|
+
* defect this replaced.
|
|
7029
|
+
*/
|
|
7030
|
+
function themeButtonExtraClassesWithTrailingIcon() {
|
|
7031
|
+
return AFFORDANCE_SUPPRESS_CLASS;
|
|
6908
7032
|
}
|
|
6909
7033
|
|
|
6910
7034
|
//#endregion
|
|
@@ -9158,27 +9282,20 @@ function resolvedButtonFocusDeclarations(indicator, role) {
|
|
|
9158
9282
|
] : [["outline", value("outline", `3px solid ${indicator.colorCss}`)], ["outline-offset", value("outline-offset", "3px")]];
|
|
9159
9283
|
}
|
|
9160
9284
|
/**
|
|
9161
|
-
* Disabled buttons
|
|
9162
|
-
*
|
|
9163
|
-
*
|
|
9164
|
-
* remain observable.
|
|
9285
|
+
* Disabled buttons are deliberately muted as unavailable controls. Native
|
|
9286
|
+
* disabled controls are exempt from active-control contrast requirements;
|
|
9287
|
+
* opacity distinguishes the state without introducing a focus-like outline.
|
|
9288
|
+
* Retaining pointer events lets the not-allowed cursor remain observable.
|
|
9165
9289
|
*/
|
|
9166
9290
|
const RESOLVED_BUTTON_DISABLED_DECLARATIONS = [
|
|
9167
9291
|
["cursor", "not-allowed"],
|
|
9168
9292
|
["transform", "none"],
|
|
9169
9293
|
["box-shadow", "none"],
|
|
9170
|
-
["
|
|
9171
|
-
["outline-offset", "-4px"]
|
|
9294
|
+
["opacity", "0.55"]
|
|
9172
9295
|
];
|
|
9173
9296
|
|
|
9174
9297
|
//#endregion
|
|
9175
9298
|
//#region ../theme-core/src/buttons/generateButtonCss.ts
|
|
9176
|
-
/**
|
|
9177
|
-
* Class the `button` runtime node adds when it renders its own trailing icon,
|
|
9178
|
-
* so a node-level icon suppresses the theme's CSS `::after` affordance.
|
|
9179
|
-
* Shared so generator and renderer can't drift.
|
|
9180
|
-
*/
|
|
9181
|
-
const AFFORDANCE_SUPPRESS_CLASS = "rb-affordance-off";
|
|
9182
9299
|
const BUTTON_SIZE_NAMES = buttonSizeNameSchema.options;
|
|
9183
9300
|
/**
|
|
9184
9301
|
* Letter spacing token → CSS value.
|
|
@@ -28592,9 +28709,7 @@ function isNavUnderlineEffect(effect) {
|
|
|
28592
28709
|
}
|
|
28593
28710
|
/** Concrete hex behind a plain palette token, or null when it is not one. */
|
|
28594
28711
|
function paletteHexForToken(theme, token) {
|
|
28595
|
-
|
|
28596
|
-
if (parts.kind !== "token" || parts.opacityPercent !== null) return null;
|
|
28597
|
-
return expandPalette(theme.palette)[parts.token] ?? null;
|
|
28712
|
+
return opaquePaletteHexForToken(expandPalette(theme.palette), token);
|
|
28598
28713
|
}
|
|
28599
28714
|
function compileHeaderScrollTreatment(theme, recipe, foregroundToken) {
|
|
28600
28715
|
if (recipe.scrollTreatment !== "contrast-glass") return undefined;
|
|
@@ -28642,6 +28757,31 @@ function applyPageOpeningForegroundToTheme(theme, recipe, context) {
|
|
|
28642
28757
|
};
|
|
28643
28758
|
}
|
|
28644
28759
|
|
|
28760
|
+
//#endregion
|
|
28761
|
+
//#region ../theme-core/src/site-styles/effectivePageDesign.ts
|
|
28762
|
+
/**
|
|
28763
|
+
* Every page with an applicable site style has an effective design, whether or
|
|
28764
|
+
* not a design version was ever persisted. Missing persistence is ordinary
|
|
28765
|
+
* default resolution, not a failure.
|
|
28766
|
+
*
|
|
28767
|
+
* Corrupt persisted state never reaches this function: callers keep their own
|
|
28768
|
+
* invalid state untouched and only resolve `stored` values they could parse.
|
|
28769
|
+
*/
|
|
28770
|
+
function resolveEffectivePageDesignIntent(stored, currentSiteStyleId) {
|
|
28771
|
+
if (stored) {
|
|
28772
|
+
return {
|
|
28773
|
+
kind: "resolved",
|
|
28774
|
+
intent: currentSiteStyleId ? rebasePageDesignIntentToSiteStyle(stored, currentSiteStyleId) : stored,
|
|
28775
|
+
source: "stored"
|
|
28776
|
+
};
|
|
28777
|
+
}
|
|
28778
|
+
return currentSiteStyleId ? {
|
|
28779
|
+
kind: "resolved",
|
|
28780
|
+
intent: buildInitialPolicyPageDesignIntent(currentSiteStyleId),
|
|
28781
|
+
source: "default"
|
|
28782
|
+
} : { kind: "no-site-style" };
|
|
28783
|
+
}
|
|
28784
|
+
|
|
28645
28785
|
//#endregion
|
|
28646
28786
|
//#region ../theme-core/src/site-styles/pageDesignAuthority.ts
|
|
28647
28787
|
const nonEmptyStringSchema = z.string().min(1);
|
|
@@ -32737,4 +32877,4 @@ function parseSdkEventRunUpsertInput(input, runIndex, options) {
|
|
|
32737
32877
|
}
|
|
32738
32878
|
|
|
32739
32879
|
//#endregion
|
|
32740
|
-
export {
|
|
32880
|
+
export { generateBaseInteractiveCSS as $, parseBlockColorToken as $n, NAV_LINK_BORDER_RADIUS_MAP as $t, getGradientPreset as A, buildThemeTokens as An, resolveThemeColorReferenceValue as At, generateCssVars as B, surfaceForegroundValue as Bn, eyebrowTreatmentValues as Bt, retargetCompiledBoundaryRuntimeForContentAdjacency as C, textColorStyle as Cn, MQ_MD_DOWN as Ct, compileTransitionRuntime as D, resolveSurfaceForeground as Dn, headerVariantValues as Dt, getCuratedSiteStyle as E, surfaceToneFromForegroundToken as En, MQ_TABLET_ONLY as Et, parseBackgroundAppearanceColorToken as F, hexToRgb as Fn, assertNever$1 as Ft, resolvedButtonColourDeclarations as G, mediaIdentifierSchema as Gn, offeringsPreviewCompositionTreatmentValues as Gt, PUBLIC_BUTTON_ROLES as H, cardRoleSchema as Hn, headingDecorationColorTokenValues as Ht, defineBlockDesignMetadata as I, oklchToHexGamut as In, defineBlockDesignCapability as It, contextualButtonSurfaceStyles as J, persistableMediaSchema as Jn, visibleHeadingDecorationFamilyValues as Jt, resolvedButtonFocusDeclarations as K, mediaSchema as Kn, testimonialsCompositionTreatmentValues as Kt, require_jsx_runtime as L, DEFAULT_SURFACE_TEXT_COLOR as Ln, defineFrameCapability as Lt, boundaryRuntimeMetricsForTransition as M, ORDINARY_TEXT_MIN_CONTRAST_RATIO as Mn, pageDesignEditorBackgroundOverrideOwner as Mt, backgroundAppearanceColorTokenNames as N, contrastRatio as Nn, asAppearancePresetId as Nt, gradientToCss as O, isOnColorBackgroundCandidateToken as On, isCssColorLiteral as Ot, backgroundAppearanceQuickColorTokenNames as P, featuresFromHex as Pn, asDesignBlockId as Pt, generateEffectsCSS as Q, unsafeAsOpaqueButtonColourToken as Qn, parseCustomCssRules as Qt, require_react as R, surfaceForegroundDeclarations as Rn, defineNoBlockDesignCapability as Rt, eventBookingOfferIntentSchema as S, rgbColorValue as Sn, MQ_LG_UP as St, readHeaderNavFontSizePreference as T, selectLogoVariant as Tn, MQ_SM_UP as Tt, generateButtonCss as U, cardVariantRoleValues as Un, introCompositionTreatmentValues as Ut, buttonStyleSelectionSchema as V, generateShadowValue$1 as Vn, featureCardCompositionTreatmentValues as Vt, RESOLVED_BUTTON_DISABLED_DECLARATIONS as W, normalizeCardRole as Wn, makeBoundaryId as Wt, resolveContextualButtonRole as X, VARIANT_ROLES as Xn, getComponentShadowVar as Xt, deriveButtonSurfaceContext as Y, footerModeSchema as Yn, getComponentBorderWidthPx as Yt, generateDefaultButtonSystem as Z, buttonVariantIdSchema as Zn, parseBlockCustomCssRules as Zt, entryIdentifierForCommand as _, TokenResolver as _n, renderHeaderPaintTargetRules as _t, classifySdkEventBookingOffer as a, INPUT_FONT_SIZE_MAP as an, createEventSeriesRef as ar, parseThemeForPersistence as at, pagePathForCommand as b, cssVarValue as bn, BREAKPOINT_SM as bt, stableStringify as c, ACCORDION_OPEN_ACCENT_THICKNESS as cn, createNavigationRef as cr, generateShadowValue as ct, mapEventCommandContent as d, ACCORDION_TRIGGER_LETTER_SPACING as dn, createVenueRef as dr, themeSchema as dt, NAV_LINK_LETTER_SPACING_MAP as en, createBlockRef as er, generateInteractiveChildInheritanceCSS as et, evaluateSiteCommandBatchExposure as f, ICON_CONFIG as fn, refSlug as fr, boxBackgroundOverlaySchema as ft, blockOrderIdentifiersForCommand as g, generateCardCss as gn, getHeaderPaintTargets as gt, blockIdentifierForCommand as h, getDefaultCardVariants as hn, generateMobileOverlayBackdropFilterFix as ht, classifySdkEventSchedule as i, FONT_WEIGHT_MAP$1 as in, createEventCategoryRef as ir, themeButtonVariantClassNames as it, parseGradientPresetId as j, defaultThemeTokens as jn, resolveTokenOrCssColorValue as jt, GRADIENT_PRESET_IDS as k, onColorTokenName as kn, resolveOnColorForThemeToken as kt, createDryRunReport as l, ACCORDION_SPACING_MAP as ln, createPageRef as lr, expandPalette as lt, getSiteCommandMetadata as m, generateCardCoreCss as mn, __toESM as mr, generateHeaderScrollTreatmentStyles as mt, sdkEventOccurrenceInputSchema as n, NAV_LINK_PADDING_X_MAP as nn, createCommandRef as nr, themeButtonExtraClassesWithTrailingIcon as nt, venueManagementFields as o, INPUT_SPACING_MAP as on, createFooterRef as or, compileButtonColourStates as ot, evaluateSiteCommandExposure as p, ICON_SIZE_PX as pn, slugPart as pr, boxBackgroundSchema as pt, contextualButtonSurfaceResetStyles as q, mediaTypeDiscriminants as qn, tileTreatmentValues as qt, sdkEventUpsertOptionalFieldSchemas as r, NAV_LINK_TEXT_SIZE_MAP as rn, createContentEntryRef as rr, themeButtonSizeClassName as rt, sortRecord as s, LABEL_FONT_SIZE_MAP as sn, createFormRef as sr, formatButtonColourContractError as st, classifySdkEventTiming as t, NAV_LINK_PADDING_MAP as tn, createBlocksRef as tr, parseThemeButtonVariantId as tt, parseAndPlanCommandBatchForTypes as u, ACCORDION_TRIGGER_FONT_SCALE as un, createSiteCommandSiteRef as ur, getTextColorForBackground as ut, pageIdentifierForBlockCommand as v, backgroundColorStyle as vn, BREAKPOINT_LG as vt, mergeHeaderNavTypographyPreference as w, textColorValue as wn, MQ_SM_DOWN as wt, hasConfiguredBookingVertical as x, mergeStyles as xn, BREAKPOINT_XL as xt, pageIdentifierForCommand as y, borderColorStyle as yn, BREAKPOINT_MD as yt, pickShadeTowardBackground as z, surfaceForegroundStyle as zn, eventListTreatmentValues as zt };
|
|
@@ -7008,4 +7008,79 @@ function parseSiteNavigationLocations(rows) {
|
|
|
7008
7008
|
}
|
|
7009
7009
|
|
|
7010
7010
|
//#endregion
|
|
7011
|
-
|
|
7011
|
+
//#region ../core/src/event-preset-vocabulary.ts
|
|
7012
|
+
const EVENT_PRESET_VOCABULARY = {
|
|
7013
|
+
event: {
|
|
7014
|
+
label: "Event",
|
|
7015
|
+
pluralLabel: "Events",
|
|
7016
|
+
description: "Any event, repeating or manually dated, that does not fit the other categories."
|
|
7017
|
+
},
|
|
7018
|
+
class: {
|
|
7019
|
+
label: "Class",
|
|
7020
|
+
pluralLabel: "Classes",
|
|
7021
|
+
description: "Regular scheduled classes and group sessions."
|
|
7022
|
+
},
|
|
7023
|
+
course: {
|
|
7024
|
+
label: "Course",
|
|
7025
|
+
pluralLabel: "Courses",
|
|
7026
|
+
description: "A fixed set of dates that people book together."
|
|
7027
|
+
},
|
|
7028
|
+
term: {
|
|
7029
|
+
label: "Term",
|
|
7030
|
+
pluralLabel: "Terms",
|
|
7031
|
+
description: "A fixed term of sessions that people book together."
|
|
7032
|
+
},
|
|
7033
|
+
workshop: {
|
|
7034
|
+
label: "Workshop",
|
|
7035
|
+
pluralLabel: "Workshops",
|
|
7036
|
+
description: "One-off workshops, day sessions, or special events."
|
|
7037
|
+
},
|
|
7038
|
+
retreat: {
|
|
7039
|
+
label: "Retreat",
|
|
7040
|
+
pluralLabel: "Retreats",
|
|
7041
|
+
description: "Multi-day or residential immersive experiences."
|
|
7042
|
+
},
|
|
7043
|
+
performance: {
|
|
7044
|
+
label: "Performance",
|
|
7045
|
+
pluralLabel: "Performances",
|
|
7046
|
+
description: "Audience-facing shows, concerts, recitals, or showcases."
|
|
7047
|
+
}
|
|
7048
|
+
};
|
|
7049
|
+
|
|
7050
|
+
//#endregion
|
|
7051
|
+
//#region ../core/src/event-catalogue.ts
|
|
7052
|
+
/** Accepts validated settings; defaults and raw configuration parsing belong to the caller. */
|
|
7053
|
+
function resolveEventCatalogue(settings) {
|
|
7054
|
+
const entries = (settings.verticalConfig?.selectedPresetIds ?? []).map(getVerticalPresetDefinition).filter(isEventSeriesVerticalPresetDefinition).map((preset) => ({
|
|
7055
|
+
preset: eventPresetForVerticalPreset(preset),
|
|
7056
|
+
verticalPresetId: preset.id,
|
|
7057
|
+
label: preset.label,
|
|
7058
|
+
pluralLabel: preset.pluralLabel,
|
|
7059
|
+
description: preset.description
|
|
7060
|
+
}));
|
|
7061
|
+
if (entries.length > 0) return {
|
|
7062
|
+
source: "business_profile",
|
|
7063
|
+
entries,
|
|
7064
|
+
catchAll: "implicit"
|
|
7065
|
+
};
|
|
7066
|
+
return {
|
|
7067
|
+
source: "generic",
|
|
7068
|
+
entries: settings.eventTypePresets.filter((preset) => preset !== "event").map((preset) => ({
|
|
7069
|
+
preset,
|
|
7070
|
+
verticalPresetId: null,
|
|
7071
|
+
...EVENT_PRESET_VOCABULARY[preset]
|
|
7072
|
+
})),
|
|
7073
|
+
catchAll: settings.eventTypePresets.includes("event") ? "selected" : "unavailable"
|
|
7074
|
+
};
|
|
7075
|
+
}
|
|
7076
|
+
/** Named choices retain authored order; catch-all is consistently last. */
|
|
7077
|
+
function eventCatalogueChoices(catalogue) {
|
|
7078
|
+
return catalogue.catchAll === "unavailable" ? catalogue.entries : [...catalogue.entries, {
|
|
7079
|
+
preset: "event",
|
|
7080
|
+
verticalPresetId: null,
|
|
7081
|
+
...EVENT_PRESET_VOCABULARY.event
|
|
7082
|
+
}];
|
|
7083
|
+
}
|
|
7084
|
+
|
|
7085
|
+
//#endregion
|
|
7086
|
+
export { formatEventPricing as $, parseFooterCompositionV1 as A, unsafeAsPositiveSeconds as At, formatBookingTime as B, unsafeAsUserId as Bt, parseMailingListContentVersionId as C, unsafeAsEventOfferingId as Ct, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as D, unsafeAsOccurrenceId as Dt, planMailingListChoicePresentation as E, unsafeAsMediaAssetId as Et, normalizeLocationAddressText as F, unsafeAsSiteScopedStoragePath as Ft, getLocalScheduleTime as G, formatLocalScheduleTime as H, ok as Ht, toLocationCoordinates as I, unsafeAsStaffMemberId as It, toScheduledBookingDateRange as J, parseUtcIsoDateTimeString as K, buildBookingUtcDateWindow as L, unsafeAsStorageBucketName as Lt, isCanonicalRichTextDoc as M, unsafeAsSafeDownloadFilename as Mt, assertAllowedPublicUrl as N, unsafeAsSiteFontId as Nt, parseMailingListProviderScope as O, unsafeAsOriginalFilename as Ot, isPresent as P, unsafeAsSiteId as Pt, formatBookingPriceDisplay as Q, formatBookingDate as R, unsafeAsStoragePath as Rt, parseMailingListBlockId as S, unsafeAsEntitlementId as St, parseMailingListRuntimeContext as T, unsafeAsFileChecksumSha256 as Tt, getBookingLocalDateKey as U, formatLocalScheduleDate as V, err as Vt, getLocalScheduleDate as W, parseBookingTimeZone as X, toScheduledBookingDateTime as Y, parseEventPageSurfaceSubject as Z, createSecret as _, unsafeAsBookingRequirementId as _t, parseVerticalId as a, resolvePricingOptionsPriceDisplay as at, stableJsonStringify as b, unsafeAsDemoCapability as bt, DEFAULT_EVENT_TYPE_PRESETS as c, formatCurrencyAmount as ct, SURFACE_EVENT_PRESET_VALUES as d, parseEventSeriesId as dt, isPublicEventPricingOptionDisplayable as et, WHOLE_SERIES_EVENT_PRESET_VALUES as f, parseMediaAssetId as ft, resolveWholeSeriesBookingPhase as g, unsafeAsAppointmentResourceId as gt, orderedLiveRunSessions as h, parseUserId as ht, canonicalizeConfiguredBookingVerticalConfig as i, resolveExactOrFreePriceDisplay as it, parseMailingListPlacementTargeting as j, unsafeAsProductId as jt, footerNavigationLayouts as k, unsafeAsPositiveByteCount as kt, EVENT_PRESET_VALUES as l, assertNever as lt, CANCELLED_SESSION_STATUS as m, parseSiteId as mt, NAVIGATION_LOCATIONS as n, publicEventPricingDisplay as nt, parseVerticalPresetId as o, fromArray as ot, publicReadFreshnessSeconds as p, parsePageId as pt, toBookingTimeZone as q, areConfiguredBookingVerticalConfigsEqual as r, publicEventPricingType as rt, resolveSiteVerticalBookingConfig as s, mapNonEmptyArray as st, resolveEventCatalogue as t, publicEventPricingCurrency as tt, ORDINARY_EVENT_PRESET_VALUES as u, parseApiKeyId as ut, exposeSecret as v, unsafeAsBookingSessionId as vt, parseMailingListSignedSourceToken as w, unsafeAsEventSeriesId as wt, buildMailingListSignupBlockSourceRef as x, unsafeAsDetectedMimeType as xt, parseManagementKey as y, unsafeAsDeclaredMimeType as yt, formatBookingDateParts as z, unsafeAsUploadSessionId as zt };
|
package/dist/testing.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./sdk-event-upsert-
|
|
3
|
-
import "./src-
|
|
4
|
-
import {
|
|
5
|
-
import "./sdk-peer-CADuG9SR.mjs";
|
|
2
|
+
import "./sdk-event-upsert-BNxbxaA0.mjs";
|
|
3
|
+
import "./src-DbmhanBI.mjs";
|
|
4
|
+
import { n as syncLocalMediaForPush, r as syncLocalMediaForPull, y as writeMediaManifest } from "./local-sync-DF-2DL_D.mjs";
|
|
6
5
|
|
|
7
|
-
export {
|
|
6
|
+
export { syncLocalMediaForPull, syncLocalMediaForPush, writeMediaManifest };
|
package/package.json
CHANGED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { n as assertCompatibleSdkPeer } from "./sdk-peer-CADuG9SR.mjs";
|
|
3
|
-
import { dirname, resolve } from "path";
|
|
4
|
-
import { createJiti } from "jiti";
|
|
5
|
-
import { existsSync } from "fs";
|
|
6
|
-
import { fileURLToPath } from "url";
|
|
7
|
-
|
|
8
|
-
//#region src/load-config.ts
|
|
9
|
-
/**
|
|
10
|
-
* Config file loader for riverbank.config.ts
|
|
11
|
-
*
|
|
12
|
-
* Uses jiti to load TypeScript config files at runtime without
|
|
13
|
-
* requiring a build step.
|
|
14
|
-
*/
|
|
15
|
-
const DEFAULT_CONFIG_FILENAME = "riverbank.config.ts";
|
|
16
|
-
const currentDir = dirname(fileURLToPath(import.meta.url));
|
|
17
|
-
/**
|
|
18
|
-
* Load builder config from a TypeScript file.
|
|
19
|
-
*
|
|
20
|
-
* @param configPath - Path to config file, or directory containing riverbank.config.ts
|
|
21
|
-
* @returns The loaded config object
|
|
22
|
-
* @throws Error if config file not found or invalid
|
|
23
|
-
*/
|
|
24
|
-
async function loadConfigFile(configPath) {
|
|
25
|
-
const resolvedPath = resolveConfigPath(configPath);
|
|
26
|
-
if (!existsSync(resolvedPath)) {
|
|
27
|
-
throw new Error(`Config file not found: ${resolvedPath}\n` + `Create a riverbank.config.ts file or specify a path with --config`);
|
|
28
|
-
}
|
|
29
|
-
assertCompatibleSdkPeer(resolvedPath);
|
|
30
|
-
process.stderr.write(`Loading config from ${resolvedPath}...\n`);
|
|
31
|
-
const alias = {};
|
|
32
|
-
const sourceConfigPath = resolve(currentDir, "..", "config", "index.ts");
|
|
33
|
-
const sourceIndexPath = resolve(currentDir, "..", "index.ts");
|
|
34
|
-
if (existsSync(sourceConfigPath)) {
|
|
35
|
-
alias["@riverbankcms/sdk/config"] = sourceConfigPath;
|
|
36
|
-
}
|
|
37
|
-
if (existsSync(sourceIndexPath)) {
|
|
38
|
-
alias["@riverbankcms/sdk"] = sourceIndexPath;
|
|
39
|
-
}
|
|
40
|
-
const blocksDir = resolve(currentDir, "../../../blocks/src");
|
|
41
|
-
if (existsSync(blocksDir)) {
|
|
42
|
-
alias["@riverbankcms/blocks"] = blocksDir;
|
|
43
|
-
}
|
|
44
|
-
const mediaCorePath = resolve(currentDir, "../../../media-core/src/index.ts");
|
|
45
|
-
if (existsSync(mediaCorePath)) {
|
|
46
|
-
alias["@riverbankcms/media-core"] = mediaCorePath;
|
|
47
|
-
}
|
|
48
|
-
const jiti = createJiti(import.meta.url, {
|
|
49
|
-
fsCache: false,
|
|
50
|
-
moduleCache: false,
|
|
51
|
-
alias: Object.keys(alias).length > 0 ? alias : undefined,
|
|
52
|
-
jsx: Object.keys(alias).length > 0
|
|
53
|
-
});
|
|
54
|
-
try {
|
|
55
|
-
const configModule = await jiti.import(resolvedPath);
|
|
56
|
-
const config = configModule.default ?? configModule.config ?? configModule;
|
|
57
|
-
if (!config || typeof config !== "object") {
|
|
58
|
-
throw new Error("Config file must export a configuration object");
|
|
59
|
-
}
|
|
60
|
-
return config;
|
|
61
|
-
} catch (error) {
|
|
62
|
-
if (error instanceof Error) {
|
|
63
|
-
throw new Error(`Failed to load config: ${error.message}`);
|
|
64
|
-
}
|
|
65
|
-
throw error;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Resolve config path from user input.
|
|
70
|
-
*
|
|
71
|
-
* If no path provided, looks for riverbank.config.ts in cwd.
|
|
72
|
-
* If path is a directory, looks for riverbank.config.ts in that directory.
|
|
73
|
-
* If path is a file, uses it directly.
|
|
74
|
-
*/
|
|
75
|
-
function resolveConfigPath(configPath) {
|
|
76
|
-
if (!configPath) {
|
|
77
|
-
return resolve(process.cwd(), DEFAULT_CONFIG_FILENAME);
|
|
78
|
-
}
|
|
79
|
-
const resolved = resolve(configPath);
|
|
80
|
-
if (existsSync(resolved) && !resolved.endsWith(".ts") && !resolved.endsWith(".js")) {
|
|
81
|
-
return resolve(resolved, DEFAULT_CONFIG_FILENAME);
|
|
82
|
-
}
|
|
83
|
-
return resolved;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
//#endregion
|
|
87
|
-
export { loadConfigFile as t };
|