@riverbankcms/sdk 0.64.0 → 0.67.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.
Files changed (78) hide show
  1. package/dist/_dts/api/src/aiPlayground.d.ts +18 -11
  2. package/dist/_dts/api/src/apiEndpointTypes.d.ts +12 -0
  3. package/dist/_dts/api/src/bookingOperations.d.ts +1 -1
  4. package/dist/_dts/api/src/endpoints.d.ts +25 -0
  5. package/dist/_dts/api/src/sdkConfig/contracts.d.ts +0 -40
  6. package/dist/_dts/api/src/sdkContracts.d.ts +1 -1
  7. package/dist/_dts/api/src/siteMembers.d.ts +1 -1
  8. package/dist/_dts/api/src/siteOperations.d.ts +1 -1
  9. package/dist/_dts/billing/src/plans/types.d.ts +1 -1
  10. package/dist/_dts/blocks/src/bindings/index.d.ts +1 -1
  11. package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
  12. package/dist/_dts/blocks/src/system/transforms/registry/formatting.d.ts +1 -0
  13. package/dist/_dts/blocks/src/system/transforms/typed.d.ts +2 -1
  14. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +81 -0
  15. package/dist/_dts/preview-next/src/client/blocks/pageDesignRuntimePreview.d.ts +7 -3
  16. package/dist/_dts/preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.d.ts +2 -2
  17. package/dist/_dts/sdk/src/cli/commands/push/execute/footer.d.ts +33 -0
  18. package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +2 -1
  19. package/dist/_dts/sdk/src/cli/env.d.ts +2 -1
  20. package/dist/_dts/sdk/src/cli/merge-remote/entryMergePush.d.ts +2 -1
  21. package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +13 -0
  22. package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +114 -0
  23. package/dist/_dts/sdk/src/cli/site-commands/entryCommands.d.ts +26 -48
  24. package/dist/_dts/sdk/src/cli/site-commands/footerCommands.d.ts +50 -0
  25. package/dist/_dts/sdk/src/cli/site-commands/formCommands.d.ts +57 -0
  26. package/dist/_dts/sdk/src/cli/site-commands/index.d.ts +5 -0
  27. package/dist/_dts/sdk/src/cli/site-commands/navigationCommands.d.ts +57 -0
  28. package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +83 -0
  29. package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +67 -14
  30. package/dist/_dts/sdk/src/cli/sync/executor.d.ts +10 -28
  31. package/dist/_dts/sdk/src/cli/sync/index.d.ts +1 -1
  32. package/dist/_dts/sdk/src/config/dashboard-validation.d.ts +0 -48
  33. package/dist/_dts/sdk/src/config/types.d.ts +1 -1
  34. package/dist/_dts/sdk/src/version.d.ts +1 -1
  35. package/dist/_dts/site-commands/src/adapter.d.ts +2 -2
  36. package/dist/_dts/site-commands/src/commands.d.ts +410 -13
  37. package/dist/_dts/site-commands/src/domain.d.ts +3 -3
  38. package/dist/_dts/site-commands/src/exposure.d.ts +41 -0
  39. package/dist/_dts/site-commands/src/index.d.ts +1 -0
  40. package/dist/_dts/site-commands/src/metadata.d.ts +93 -2
  41. package/dist/_dts/site-commands/src/planner.d.ts +13 -6
  42. package/dist/_dts/site-commands/src/refs.d.ts +13 -1
  43. package/dist/_dts/theme-core/src/palette/utils/index.d.ts +1 -0
  44. package/dist/_dts/theme-core/src/palette/utils/onColor.d.ts +2 -0
  45. package/dist/_dts/theme-core/src/site-styles/accessibleSurfaces.d.ts +83 -0
  46. package/dist/_dts/theme-core/src/site-styles/contentTemplateRuntimeCompiler.d.ts +2 -1
  47. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +89 -12
  48. package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +8 -2
  49. package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
  50. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +3 -2
  51. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +9 -6
  52. package/dist/_dts/ui/src/callout.d.ts +1 -1
  53. package/dist/cli/index.mjs +4290 -2513
  54. package/dist/client/client.mjs +598 -372
  55. package/dist/client/hooks.mjs +311 -123
  56. package/dist/client/rendering/client.mjs +209 -68
  57. package/dist/client/rendering/islands.mjs +281 -150
  58. package/dist/client/rendering.mjs +416 -190
  59. package/dist/preview-next/before-render.mjs +61 -13
  60. package/dist/preview-next/client/runtime.mjs +930 -376
  61. package/dist/preview-next/middleware.mjs +61 -13
  62. package/dist/server/components.mjs +526 -325
  63. package/dist/server/config-validation.mjs +313 -125
  64. package/dist/server/config.mjs +313 -125
  65. package/dist/server/data.mjs +311 -123
  66. package/dist/server/index.mjs +78 -16
  67. package/dist/server/next.mjs +527 -326
  68. package/dist/server/page-converter.mjs +159 -41
  69. package/dist/server/prebuild.mjs +1 -1
  70. package/dist/server/rendering/server.mjs +526 -325
  71. package/dist/server/rendering.mjs +526 -325
  72. package/dist/server/routing.mjs +392 -131
  73. package/dist/server/server.mjs +312 -124
  74. package/dist/server/theme-bridge.mjs +155 -48
  75. package/package.json +1 -1
  76. package/dist/_dts/path-utils/src/index.d.ts +0 -8
  77. package/dist/_dts/path-utils/src/redirectPaths.d.ts +0 -26
  78. package/dist/_dts/path-utils/src/safeAppPath.d.ts +0 -26
@@ -29,6 +29,15 @@ var MQ_TABLET_ONLY = mqBetween(BREAKPOINT_SM, BREAKPOINT_LG_DOWN);
29
29
  var MQ_MAX_640 = mqDown(BREAKPOINT_SM);
30
30
  var MQ_MAX_768 = mqDown(BREAKPOINT_MD);
31
31
 
32
+ // ../theme-core/src/palette/utils/colorConversion.ts
33
+ function hexToRgb(hex) {
34
+ const h = hex.replace(/^#/, "");
35
+ const m = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
36
+ if (m.length !== 6) throw new Error("Bad hex");
37
+ const int = parseInt(m, 16);
38
+ return { r: int >> 16 & 255, g: int >> 8 & 255, b: int & 255 };
39
+ }
40
+
32
41
  // ../theme-core/src/site-styles/appearancePresetResolution.ts
33
42
  function assertValidOptionGroups(preset) {
34
43
  preset.optionGroups?.forEach((group) => {
@@ -3630,6 +3639,9 @@ var curatedSiteStyleIdValues = [
3630
3639
  "site-style:bright-community",
3631
3640
  "site-style:quiet-luxury",
3632
3641
  "site-style:practical-services",
3642
+ "site-style:quiet-practice",
3643
+ "site-style:personal-retreat-journal",
3644
+ "site-style:tactile-workshop",
3633
3645
  "site-style:modern-wellness",
3634
3646
  "site-style:bold-launch",
3635
3647
  "site-style:south-west-twerk-school"
@@ -3712,7 +3724,8 @@ function defineCuratedSiteStyle(input) {
3712
3724
  name: input.name,
3713
3725
  description: input.description,
3714
3726
  generationBrief: input.generationBrief,
3715
- selectionKeywords: input.selectionKeywords ?? [],
3727
+ selectionKeywordRules: input.selectionKeywordRules ?? [],
3728
+ siteCreatorSelection: input.siteCreatorSelection ?? { kind: "explicit_only" },
3716
3729
  template: {
3717
3730
  id: asDesignSystemTemplateId(`template:${input.id.replace("site-style:", "")}`),
3718
3731
  name: input.name,
@@ -3856,12 +3869,13 @@ var curatedSiteStyles = [
3856
3869
  name: "Quiet Luxury",
3857
3870
  description: "Minimal, confident, and refined for premium experiences and private services.",
3858
3871
  generationBrief: "Use fewer claims, more specificity, and restrained sensory detail. Favor elegant media and low repetition over dense panels.",
3859
- selectionKeywords: [
3860
- "luxury",
3861
- "premium",
3862
- "boutique",
3863
- "bespoke",
3864
- "exclusive"
3872
+ siteCreatorSelection: { kind: "site_creator_keyword_heuristic", priority: 20 },
3873
+ selectionKeywordRules: [
3874
+ { kind: "word", value: "luxury" },
3875
+ { kind: "word", value: "premium" },
3876
+ { kind: "word", value: "boutique" },
3877
+ { kind: "word", value: "bespoke" },
3878
+ { kind: "word", value: "exclusive" }
3865
3879
  ],
3866
3880
  tokenRecipes: {
3867
3881
  palette: "high-contrast",
@@ -3890,13 +3904,14 @@ var curatedSiteStyles = [
3890
3904
  name: "Practical Services",
3891
3905
  description: "Efficient, plainspoken, and conversion-focused for trades and everyday services.",
3892
3906
  generationBrief: "Make services, location, trust signals, and contact paths obvious. Keep copy brief and avoid ornate visual treatments.",
3893
- selectionKeywords: [
3894
- "repair",
3895
- "plumb",
3896
- "electric",
3897
- "cleaning",
3898
- "landscap",
3899
- "contractor"
3907
+ siteCreatorSelection: { kind: "primary_goal_support" },
3908
+ selectionKeywordRules: [
3909
+ { kind: "word", value: "repair" },
3910
+ { kind: "substring", value: "plumb" },
3911
+ { kind: "substring", value: "electric" },
3912
+ { kind: "word", value: "cleaning" },
3913
+ { kind: "substring", value: "landscap" },
3914
+ { kind: "substring", value: "contractor" }
3900
3915
  ],
3901
3916
  tokenRecipes: {
3902
3917
  palette: "brand-led",
@@ -3947,18 +3962,134 @@ var curatedSiteStyles = [
3947
3962
  paletteChoice("warm-neutral-forest")
3948
3963
  ]
3949
3964
  }),
3965
+ defineCuratedSiteStyle({
3966
+ id: "site-style:quiet-practice",
3967
+ name: "Quiet Practice",
3968
+ description: "Grounded, calm, and practical for small appointment-first practices.",
3969
+ generationBrief: "Make services, practitioner trust, preparation notes, and booking routes easy to scan. Keep the tone warm and specific, with quiet confidence rather than spa cliches or medical claims.",
3970
+ siteCreatorSelection: { kind: "site_creator_keyword_heuristic", priority: 30 },
3971
+ selectionKeywordRules: [
3972
+ { kind: "substring", value: "massage" },
3973
+ { kind: "word", value: "bodywork" },
3974
+ { kind: "phrase", value: "appointment practice" },
3975
+ { kind: "phrase", value: "appointment-first" },
3976
+ { kind: "substring", value: "practitioner" },
3977
+ { kind: "substring", value: "therap" },
3978
+ { kind: "substring", value: "clinic" },
3979
+ { kind: "phrase", value: "wellness practice" }
3980
+ ],
3981
+ tokenRecipes: {
3982
+ palette: "soft-natural",
3983
+ contrast: "standard",
3984
+ radius: "soft",
3985
+ shadow: "subtle",
3986
+ typography: "clean-sans",
3987
+ spacing: "regular",
3988
+ motion: "subtle"
3989
+ },
3990
+ compositionBudget: quietBudget,
3991
+ recommendedHeaderLookIds: ["practical-utility", "clean-base", "centered-calm"],
3992
+ buttonPersonalityChoices: [
3993
+ buttonChoice("pebble"),
3994
+ buttonChoice("soft-pill"),
3995
+ buttonChoice("editorial-link")
3996
+ ],
3997
+ paletteVariantChoices: [
3998
+ paletteChoice("soft-natural-stone"),
3999
+ paletteChoice("soft-natural-sage"),
4000
+ paletteChoice("warm-neutral-clay")
4001
+ ]
4002
+ }),
4003
+ defineCuratedSiteStyle({
4004
+ id: "site-style:personal-retreat-journal",
4005
+ name: "Personal Retreat Journal",
4006
+ description: "Warm, story-led, and readable for solo practitioners with mixed offers.",
4007
+ generationBrief: "Center the practitioner as the guide, then make private sessions, classes, retreats, and resources feel like clear pathways. Keep retreat copy grounded and practical, with enough editorial warmth for longer reading.",
4008
+ siteCreatorSelection: { kind: "site_creator_keyword_heuristic", priority: 40 },
4009
+ selectionKeywordRules: [
4010
+ { kind: "substring", value: "retreat" },
4011
+ { kind: "phrase", value: "solo practitioner" },
4012
+ { kind: "phrase", value: "personal brand" },
4013
+ { kind: "substring", value: "teacher" },
4014
+ { kind: "substring", value: "coach" },
4015
+ { kind: "phrase", value: "retreat resources" },
4016
+ { kind: "substring", value: "journal" }
4017
+ ],
4018
+ tokenRecipes: {
4019
+ palette: "warm-neutral",
4020
+ contrast: "standard",
4021
+ radius: "soft",
4022
+ shadow: "subtle",
4023
+ typography: "serif-editorial",
4024
+ spacing: "airy",
4025
+ motion: "subtle"
4026
+ },
4027
+ compositionBudget: balancedBudget,
4028
+ recommendedHeaderLookIds: ["editorial-line", "centered-calm", "minimal-transparent"],
4029
+ buttonPersonalityChoices: [
4030
+ buttonChoice("editorial-link"),
4031
+ buttonChoice("soft-pill"),
4032
+ buttonChoice("brushed-wash")
4033
+ ],
4034
+ paletteVariantChoices: [
4035
+ paletteChoice("warm-neutral-forest"),
4036
+ paletteChoice("warm-neutral-clay"),
4037
+ paletteChoice("soft-natural-stone")
4038
+ ]
4039
+ }),
4040
+ defineCuratedSiteStyle({
4041
+ id: "site-style:tactile-workshop",
4042
+ name: "Tactile Workshop",
4043
+ description: "Bright, hands-on, and image-led for maker studios, workshops, and creative classes.",
4044
+ generationBrief: "Lead with objects, materials, studio process, and practical booking detail. Keep the tone warm and direct, with useful mess, clear dates, and enough gallery rhythm to feel like a real creative studio.",
4045
+ siteCreatorSelection: { kind: "site_creator_keyword_heuristic", priority: 50 },
4046
+ selectionKeywordRules: [
4047
+ { kind: "substring", value: "ceramic" },
4048
+ { kind: "word", value: "pottery" },
4049
+ { kind: "phrase", value: "maker studio" },
4050
+ { kind: "phrase", value: "craft class" },
4051
+ { kind: "phrase", value: "craft workshop" },
4052
+ { kind: "word", value: "clay" },
4053
+ { kind: "word", value: "kiln" }
4054
+ ],
4055
+ tokenRecipes: {
4056
+ palette: "brand-led",
4057
+ contrast: "standard",
4058
+ radius: "soft",
4059
+ shadow: "subtle",
4060
+ typography: "friendly-sans",
4061
+ spacing: "regular",
4062
+ motion: "subtle"
4063
+ },
4064
+ compositionBudget: balancedBudget,
4065
+ recommendedHeaderLookIds: ["brand-solid", "practical-utility", "clean-base"],
4066
+ recommendedFooterLookIds: ["site-footer-brand-two-band", "footer-muted-grounding"],
4067
+ buttonPersonalityChoices: [
4068
+ buttonChoice("pebble"),
4069
+ buttonChoice("confident-chip"),
4070
+ buttonChoice("ink-stamp"),
4071
+ buttonChoice("editorial-link")
4072
+ ],
4073
+ paletteVariantChoices: [
4074
+ paletteChoice("brand-led-warm"),
4075
+ paletteChoice("brand-led-cool"),
4076
+ paletteChoice("soft-natural-watercolor"),
4077
+ paletteChoice("warm-neutral-clay")
4078
+ ]
4079
+ }),
3950
4080
  defineCuratedSiteStyle({
3951
4081
  id: "site-style:bold-launch",
3952
4082
  name: "Bold Launch",
3953
4083
  description: "High-energy and punchy for launches, campaigns, and creative offers.",
3954
4084
  generationBrief: "Use crisp positioning, bold hero structure, strong calls to action, and confident visual rhythm. Keep it precise, not shouty.",
3955
- selectionKeywords: [
3956
- "launch",
3957
- "campaign",
3958
- "preorder",
3959
- "pre-order",
3960
- "waitlist",
3961
- "drop"
4085
+ siteCreatorSelection: { kind: "site_creator_keyword_heuristic", priority: 10 },
4086
+ selectionKeywordRules: [
4087
+ { kind: "substring", value: "launch" },
4088
+ { kind: "substring", value: "campaign" },
4089
+ { kind: "word", value: "preorder" },
4090
+ { kind: "phrase", value: "pre-order" },
4091
+ { kind: "substring", value: "waitlist" },
4092
+ { kind: "word", value: "drop" }
3962
4093
  ],
3963
4094
  tokenRecipes: {
3964
4095
  palette: "high-contrast",
@@ -3989,15 +4120,6 @@ var curatedSiteStyles = [
3989
4120
  name: "South West Twerk School",
3990
4121
  description: "Energetic, editorial, and high-contrast for a branded dance school presence.",
3991
4122
  generationBrief: "Use confident rhythm, bold burgundy-and-gold accents, large editorial intro copy, strong booking routes, and dark feature sections where proof or forms need emphasis.",
3992
- selectionKeywords: [
3993
- "dance",
3994
- "classes",
3995
- "workshop",
3996
- "school",
3997
- "movement",
3998
- "performance",
3999
- "community"
4000
- ],
4001
4123
  tokenRecipes: {
4002
4124
  palette: "brand-led",
4003
4125
  contrast: "maximum",
@@ -4304,25 +4426,19 @@ var defaultDesignRuntimeRules = defineDesignRuntimeRules({
4304
4426
  "muted-band": {
4305
4427
  background: {
4306
4428
  type: "color",
4307
- color: "muted",
4308
- textColor: "text",
4309
- headingColor: "text"
4429
+ color: "muted"
4310
4430
  }
4311
4431
  },
4312
4432
  "accent-band": {
4313
4433
  background: {
4314
4434
  type: "color",
4315
- color: "primary",
4316
- textColor: "primaryForeground",
4317
- headingColor: "primaryForeground"
4435
+ color: "primary"
4318
4436
  }
4319
4437
  },
4320
4438
  "brand-depth-band": {
4321
4439
  background: {
4322
4440
  type: "color",
4323
- color: "primary-800",
4324
- textColor: "primaryForeground",
4325
- headingColor: "primaryForeground"
4441
+ color: "primary-800"
4326
4442
  }
4327
4443
  },
4328
4444
  "hero-image": {
@@ -4677,15 +4793,6 @@ var themeTokenRecipesSchema = z22.object({
4677
4793
  motion: z22.enum(themeTokenRecipeOptions.motion)
4678
4794
  });
4679
4795
 
4680
- // ../theme-core/src/palette/utils/colorConversion.ts
4681
- function hexToRgb(hex) {
4682
- const h = hex.replace(/^#/, "");
4683
- const m = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
4684
- if (m.length !== 6) throw new Error("Bad hex");
4685
- const int = parseInt(m, 16);
4686
- return { r: int >> 16 & 255, g: int >> 8 & 255, b: int & 255 };
4687
- }
4688
-
4689
4796
  // ../theme-core/src/styles/shadow.ts
4690
4797
  function generateShadowCssVars(theme) {
4691
4798
  const level = theme.shadow.elevation;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riverbankcms/sdk",
3
- "version": "0.64.0",
3
+ "version": "0.67.0",
4
4
  "description": "Riverbank CMS SDK for headless content consumption",
5
5
  "main": "./dist/server/index.mjs",
6
6
  "module": "./dist/server/index.mjs",
@@ -1,8 +0,0 @@
1
- export type PathSegment = string | number;
2
- export declare function parsePath(path: string | Array<PathSegment>): Array<PathSegment>;
3
- export declare function segmentsToPath(segments: Array<PathSegment>): string | undefined;
4
- export declare function getAtPath<T = unknown>(source: unknown, path: string | Array<PathSegment>): T | undefined;
5
- export declare function setAtPath(target: Record<string, unknown> | Array<unknown>, path: string | Array<PathSegment>, value: unknown): void;
6
- export declare function toAbsolutePath(base: string | undefined | null, path: string): string;
7
- export * from './redirectPaths';
8
- export * from './safeAppPath';
@@ -1,26 +0,0 @@
1
- export type RedirectPathParseError = {
2
- tag: 'MISSING';
3
- } | {
4
- tag: 'EMPTY';
5
- } | {
6
- tag: 'CONTROL_CHAR';
7
- } | {
8
- tag: 'BACKSLASH';
9
- } | {
10
- tag: 'EXTERNAL_URL';
11
- } | {
12
- tag: 'INVALID_PATH';
13
- } | {
14
- tag: 'ENCODED_SEPARATOR';
15
- };
16
- export type RedirectPathParseResult = {
17
- ok: true;
18
- value: string;
19
- } | {
20
- ok: false;
21
- error: RedirectPathParseError;
22
- };
23
- export declare function parseInternalRedirectPath(value: unknown): RedirectPathParseResult;
24
- export declare function sanitizeInternalRedirectPath(value: unknown): string | null;
25
- export declare function parseSameOriginRedirectPath(value: unknown, baseUrl: string | URL): RedirectPathParseResult;
26
- export declare function sanitizeSameOriginRedirectPath(value: unknown, baseUrl: string | URL): string | null;
@@ -1,26 +0,0 @@
1
- import { type RedirectPathParseError } from './redirectPaths';
2
- declare const __brand: unique symbol;
3
- type Brand<T, B extends string> = T & {
4
- readonly [__brand]: B;
5
- };
6
- /**
7
- * A redirect path that has been validated as a safe, same-origin relative path.
8
- *
9
- * Parse once at the boundary, then carry the branded value inward instead of
10
- * re-validating ad hoc string inputs in every auth flow.
11
- */
12
- export type SafeAppPath = Brand<string, 'SafeAppPath'>;
13
- export type SafeAppPathParseError = RedirectPathParseError;
14
- export type SafeAppPathParseResult = {
15
- ok: true;
16
- value: SafeAppPath;
17
- } | {
18
- ok: false;
19
- error: SafeAppPathParseError;
20
- };
21
- export declare function parseSafeAppPath(value: unknown): SafeAppPathParseResult;
22
- export declare function sanitizeSafeAppPath(value: unknown): SafeAppPath | null;
23
- export declare function assertSafeAppPath(value: string): SafeAppPath;
24
- export declare function safeAppPathOrFallback(value: unknown, fallback: SafeAppPath): SafeAppPath;
25
- export declare function buildSafeRedirectUrl(path: SafeAppPath, baseUrl: string | URL): URL;
26
- export {};