@riverbankcms/sdk 0.111.0 → 0.118.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 (193) hide show
  1. package/dist/{PreviewEditorSidebar-CTR6LUhN.mjs → PreviewEditorSidebar-BBcK1DjD.mjs} +4 -4
  2. package/dist/{PreviewEditorUI-DZg15Zip.mjs → PreviewEditorUI-CuBFoYes.mjs} +3 -3
  3. package/dist/{PreviewQueryProvider-kkmjklLG.mjs → PreviewQueryProvider-nKUT4TL-.mjs} +1 -1
  4. package/dist/{SdkPreviewModeRuntime-DeOTAFvR.mjs → SdkPreviewModeRuntime-BWIO_Dsi.mjs} +2579 -34325
  5. package/dist/{SiteChromeCustomizeContext-DOSDLCiJ.mjs → SiteChromeCustomizeContext-CciG60M5.mjs} +64575 -32787
  6. package/dist/_dts/ai/src/contracts/proposals.d.ts +5211 -639
  7. package/dist/_dts/ai/src/designer/themePatch.d.ts +1 -1
  8. package/dist/_dts/api/src/bookingAdjustments.d.ts +30 -36
  9. package/dist/_dts/api/src/bookingRecords.d.ts +6 -74
  10. package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +3 -3
  11. package/dist/_dts/api/src/contentRuntime.d.ts +5 -1
  12. package/dist/_dts/api/src/customerMembershipOutcomes.d.ts +4 -4
  13. package/dist/_dts/api/src/endpoints.d.ts +35 -0
  14. package/dist/_dts/api/src/event-presentation.d.ts +4 -0
  15. package/dist/_dts/api/src/index.d.ts +2 -2
  16. package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +2 -2
  17. package/dist/_dts/api/src/sdk-event-upsert.d.ts +2 -2
  18. package/dist/_dts/api/src/sdkContracts.d.ts +85 -7
  19. package/dist/_dts/api/src/siteBanner.d.ts +8 -8
  20. package/dist/_dts/api/src/siteOperations.d.ts +1 -1
  21. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +32 -4
  22. package/dist/_dts/block-form/src/widgets/RichTextField/richTextFieldDefaults.d.ts +3 -12
  23. package/dist/_dts/block-form/src/widgets/RichTextField/richTextFieldSchema.d.ts +1 -5
  24. package/dist/_dts/blocks/src/bindings/index.d.ts +1 -10
  25. package/dist/_dts/blocks/src/index.d.ts +3 -6
  26. package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +2 -2
  27. package/dist/_dts/blocks/src/system/blocks/body-text.d.ts +2 -2
  28. package/dist/_dts/blocks/src/system/blocks/events/recurring-schedule.d.ts +2 -2
  29. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +2 -8
  30. package/dist/_dts/blocks/src/system/blocks/feature-card-icons.d.ts +2 -2
  31. package/dist/_dts/blocks/src/system/blocks/feature-cards.d.ts +3 -3
  32. package/dist/_dts/blocks/src/system/blocks/form.d.ts +2 -15
  33. package/dist/_dts/blocks/src/system/blocks/intro.d.ts +2 -2
  34. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +66 -66
  35. package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +2 -16
  36. package/dist/_dts/blocks/src/system/blocks/site-footer.d.ts +0 -3
  37. package/dist/_dts/blocks/src/system/fragments/index.d.ts +0 -1
  38. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +19 -2
  39. package/dist/_dts/blocks/src/system/manifest/richTextSchema.d.ts +8 -70
  40. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +1 -0
  41. package/dist/_dts/blocks/src/system/manifest/validation.d.ts +6 -0
  42. package/dist/_dts/blocks/src/system/node/schema.d.ts +4 -4
  43. package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +1 -10
  44. package/dist/_dts/blocks/src/system/runtime/nodes/buttonAffordance.d.ts +5 -21
  45. package/dist/_dts/blocks/src/system/runtime/nodes/richText-coerce.d.ts +14 -2
  46. package/dist/_dts/blocks/src/system/transforms/typed.d.ts +1 -1
  47. package/dist/_dts/content-editor/src/controller/seedDraftBaselinesFromBlocks.d.ts +1 -1
  48. package/dist/_dts/content-editor/src/hooks/useBlockAutosave.d.ts +17 -1
  49. package/dist/_dts/content-editor/src/hooks/useDebouncedLatestSave.d.ts +1 -1
  50. package/dist/_dts/content-editor/src/hooks/useSimpleAutosave.d.ts +1 -1
  51. package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +3 -2
  52. package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +2 -2
  53. package/dist/_dts/content-editor/src/ui/stores/autosaveStore.d.ts +1 -1
  54. package/dist/_dts/content-editor/src/ui/stores/types.d.ts +1 -1
  55. package/dist/_dts/content-model/src/content-types/builtins.d.ts +3 -15
  56. package/dist/_dts/content-model/src/content-types/entryValidation.d.ts +2 -0
  57. package/dist/_dts/content-model/src/content-types/schema.d.ts +1 -1
  58. package/dist/_dts/content-model/src/templates/defaults.d.ts +1 -21
  59. package/dist/_dts/core/src/editor-state.d.ts +14 -1
  60. package/dist/_dts/core/src/footer-composition.d.ts +2 -1
  61. package/dist/_dts/core/src/index.d.ts +1 -0
  62. package/dist/_dts/core/src/rich-text.d.ts +16 -0
  63. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +178 -48
  64. package/dist/_dts/editor/src/index.d.ts +1 -1
  65. package/dist/_dts/editor/src/primitives/rich-text/utils.d.ts +3 -5
  66. package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +1 -1
  67. package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +2 -1
  68. package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +2 -1
  69. package/dist/_dts/editor-blocks/src/block-editor/blockDraftBaselineSeed.d.ts +15 -0
  70. package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockBaselineSync.d.ts +3 -7
  71. package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockDuplication.d.ts +12 -0
  72. package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +1 -0
  73. package/dist/_dts/editor-blocks/src/block-editor/utils.d.ts +1 -1
  74. package/dist/_dts/editor-blocks/src/index.d.ts +6 -5
  75. package/dist/_dts/editor-blocks/src/widgets/rich-text/RichTextField.d.ts +2 -2
  76. package/dist/_dts/media-core/src/contentMediaAudit.d.ts +104 -0
  77. package/dist/_dts/media-core/src/contentMediaAuditFieldAdapter.d.ts +8 -0
  78. package/dist/_dts/media-core/src/contentMediaSnapshotAudit.d.ts +22 -0
  79. package/dist/_dts/media-core/src/index.d.ts +3 -1
  80. package/dist/_dts/sdk/src/cli/commands/event.d.ts +18 -1
  81. package/dist/_dts/sdk/src/cli/commands/push/execute/theme.d.ts +2 -16
  82. package/dist/_dts/sdk/src/cli/content/reader.d.ts +8 -5
  83. package/dist/_dts/sdk/src/client/management/events.d.ts +2 -1
  84. package/dist/_dts/sdk/src/client/management/index.d.ts +1 -1
  85. package/dist/_dts/sdk/src/client/management/types.d.ts +36 -9
  86. package/dist/_dts/sdk/src/config/typed-entries.d.ts +7 -7
  87. package/dist/_dts/sdk/src/config/validation.d.ts +7 -7
  88. package/dist/_dts/sdk/src/contracts/content.d.ts +5 -15
  89. package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
  90. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +12 -25
  91. package/dist/_dts/sdk/src/contracts/theme.d.ts +2 -18
  92. package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +1 -1
  93. package/dist/_dts/sdk/src/manifest/three-pass-converter.d.ts +4 -4
  94. package/dist/_dts/sdk/src/rendering/helpers/bindings.d.ts +1 -2
  95. package/dist/_dts/sdk/src/rendering/helpers/index.d.ts +1 -1
  96. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +2 -13
  97. package/dist/_dts/sdk/src/theme/index.d.ts +0 -29
  98. package/dist/_dts/sdk/src/version.d.ts +1 -1
  99. package/dist/_dts/site-commands/src/commands.d.ts +31 -18
  100. package/dist/_dts/theme-core/src/buttons/affordanceIcons.d.ts +2 -2
  101. package/dist/_dts/theme-core/src/buttons/core.d.ts +0 -1
  102. package/dist/_dts/theme-core/src/buttons/effectClassification.d.ts +22 -9
  103. package/dist/_dts/theme-core/src/buttons/effects/presets/background.d.ts +1 -2
  104. package/dist/_dts/theme-core/src/buttons/effects/presets/border.d.ts +1 -2
  105. package/dist/_dts/theme-core/src/buttons/effects/presets/overlay.d.ts +3 -1
  106. package/dist/_dts/theme-core/src/buttons/effects/presets/shadow.d.ts +2 -2
  107. package/dist/_dts/theme-core/src/buttons/effects/types.d.ts +8 -18
  108. package/dist/_dts/theme-core/src/buttons/generateButtonCss.d.ts +2 -2
  109. package/dist/_dts/theme-core/src/buttons/generateDefaultButtonSystem.d.ts +5 -5
  110. package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -4
  111. package/dist/_dts/theme-core/src/buttons/parseThemeForPersistence.d.ts +36 -0
  112. package/dist/_dts/theme-core/src/buttons/types.d.ts +1638 -93
  113. package/dist/_dts/theme-core/src/cards/types.d.ts +13 -13
  114. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +969 -69
  115. package/dist/_dts/theme-core/src/navigation/types.d.ts +2 -2
  116. package/dist/_dts/theme-core/src/recommend/generateThemes.d.ts +0 -1
  117. package/dist/_dts/theme-core/src/schema.d.ts +1100 -116
  118. package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
  119. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +14 -14
  120. package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +2 -2
  121. package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +4 -4
  122. package/dist/cli/index.mjs +5706 -4852
  123. package/dist/cli/init-docs/content/cli-reference.md +40 -1
  124. package/dist/cli/init-docs/content/content-management.md +6 -0
  125. package/dist/client/{DiscountCodeDisclosure-C4xvTBux.mjs → DiscountCodeDisclosure-DIWj-P9v.mjs} +1 -1
  126. package/dist/client/{EventCombined.client-Cr7G131j.mjs → EventCombined.client-De8YWBSr.mjs} +2 -2
  127. package/dist/client/{EventListing.client-CAjbseNy.mjs → EventListing.client-seHTjimY.mjs} +2 -2
  128. package/dist/client/{LeafletStaticMap-BMlWfwz3.mjs → LeafletStaticMap-BmQxFcJW.mjs} +1 -1
  129. package/dist/client/{MagicLinkForm-ChdFz96y.mjs → MagicLinkForm-OoJAIUIj.mjs} +1 -1
  130. package/dist/client/{StepIndicator-7D3GaBeM.mjs → StepIndicator-CiZ8kdPk.mjs} +2 -2
  131. package/dist/client/{accordion-D8JTs2Si.mjs → accordion-6lnN__XJ.mjs} +1 -1
  132. package/dist/client/{bookingForm-H3DCRBHs.mjs → bookingForm-5uyqhONU.mjs} +6 -6
  133. package/dist/client/bookings.mjs +2219 -527
  134. package/dist/client/{carousel-DMr_QWlz.mjs → carousel-Dtnifil_.mjs} +1 -1
  135. package/dist/client/{cart-DWMbfBdR.mjs → cart-5Tc5S7NV.mjs} +3 -3
  136. package/dist/client/{checkout-zmfdkXLx.mjs → checkout-CYKKN5Hr.mjs} +3 -3
  137. package/dist/client/client.mjs +1652 -1580
  138. package/dist/client/{colorTokenParts-FSS3al6l.mjs → colorStyles-BWpj_h4C.mjs} +88 -1
  139. package/dist/client/{courseRegistration-Z_mn18jy.mjs → courseRegistration-CxCBybB4.mjs} +6 -6
  140. package/dist/client/{eventCalendar-CYp0YJGF.mjs → eventCalendar-Xj2jZS9X.mjs} +4 -4
  141. package/dist/client/{eventCombined-rKyYZUa9.mjs → eventCombined-CgcMoOgM.mjs} +2 -2
  142. package/dist/client/{eventDetails-X0ZaUuMj.mjs → eventDetails-CEAH8Edc.mjs} +3 -3
  143. package/dist/client/{eventListing-W1SuL7EP.mjs → eventListing-qyPVQ0wP.mjs} +2 -2
  144. package/dist/client/{eventRegistration-ClWricui.mjs → eventRegistration-DDu79CtL.mjs} +6 -6
  145. package/dist/client/{form--eKPwAAD.mjs → form-Bc7JKI7I.mjs} +1 -1
  146. package/dist/client/{headerSection-BSeGr-FS.mjs → headerSection-vTku_LEl.mjs} +2 -2
  147. package/dist/client/hooks.mjs +373 -555
  148. package/dist/client/{locationMap-BpOrtNYn.mjs → locationMap-Bg7X4Jna.mjs} +3 -3
  149. package/dist/client/{media-DoF0dcVx.mjs → media-CNE1Z-wb.mjs} +1 -2
  150. package/dist/client/{newsletterForm-Bt7it7Dy.mjs → newsletterForm-lpylVdp5.mjs} +1 -1
  151. package/dist/client/{pricing-BTjSDDr4.mjs → pricing-DE8fjJiT.mjs} +1 -1
  152. package/dist/client/{productDetail-ICnVTcCg.mjs → productDetail-D7Bo2RMH.mjs} +3 -3
  153. package/dist/client/{productList-ZHr6D604.mjs → productList-VjnZqiqN.mjs} +3 -3
  154. package/dist/client/{propsDecoder-wWN0tBDF.mjs → propsDecoder-DreFXjNP.mjs} +2212 -621
  155. package/dist/client/rendering/client.mjs +21612 -21646
  156. package/dist/client/rendering/islands.mjs +20 -20
  157. package/dist/client/rendering.mjs +1528 -1546
  158. package/dist/client/{shop-C1u_BUn0.mjs → shop-IRsHHbf7.mjs} +5 -5
  159. package/dist/client/{shop-commerce-CleZdRha.mjs → shop-commerce-gnI8PieZ.mjs} +27 -10
  160. package/dist/client/{shop-commerce-store-ycnoB2Ce.mjs → shop-commerce-store-BTbrhObn.mjs} +1 -1
  161. package/dist/client/{shopShared-CPhByt2a.mjs → shopShared-D6KS2_qk.mjs} +3 -3
  162. package/dist/client/{useDiscountCodeUi-cStSQI6C.mjs → useDiscountCodeUi-DCccGCxV.mjs} +1 -1
  163. package/dist/client/{useEventFilters-DKPN7hSY.mjs → useEventFilters-eGs3rPZQ.mjs} +3 -104
  164. package/dist/client/{usePolling-BKAd6pkZ.mjs → usePolling-CvSU2sur.mjs} +2 -2
  165. package/dist/preview-next/before-render.mjs +57 -0
  166. package/dist/preview-next/client/runtime.mjs +4 -4
  167. package/dist/preview-next/middleware.mjs +57 -0
  168. package/dist/{previewAuthStore-BkT1D06A.mjs → previewAuthStore-DN7vcRsv.mjs} +57 -0
  169. package/dist/{sdk-runtime-hu3wr3ng.mjs → sdk-runtime-vW8QbyPN.mjs} +2 -2
  170. package/dist/{separator-Bln8izQ9.mjs → separator-DJ4bkeY3.mjs} +1 -1
  171. package/dist/server/components.mjs +3638 -3696
  172. package/dist/server/config-template-validation.mjs +4 -23
  173. package/dist/server/config-validation.mjs +373 -555
  174. package/dist/server/config.mjs +410 -558
  175. package/dist/server/data.mjs +373 -555
  176. package/dist/server/index.mjs +58 -1
  177. package/dist/server/next.mjs +32384 -32394
  178. package/dist/server/page-converter.mjs +369 -526
  179. package/dist/server/prebuild.mjs +1 -1
  180. package/dist/server/rendering/server.mjs +5329 -3174
  181. package/dist/server/rendering.mjs +3645 -3712
  182. package/dist/server/routing.mjs +758 -966
  183. package/dist/server/server.mjs +448 -632
  184. package/dist/server/theme-bridge.mjs +472 -525
  185. package/dist/server/theme.mjs +1074 -392
  186. package/package.json +1 -1
  187. package/dist/_dts/blocks/src/primitives/content/components/Button.d.ts +0 -40
  188. package/dist/_dts/blocks/src/system/fragments/library/footerBottomText.d.ts +0 -19
  189. package/dist/_dts/media-core/src/legacyMediaValue.d.ts +0 -11
  190. package/dist/_dts/theme-core/src/styles/buttons.d.ts +0 -27
  191. package/dist/_dts/theme-core/src/styles/buttonsLibrary.d.ts +0 -2
  192. package/dist/_dts/theme-core/src/styles/glow.d.ts +0 -3
  193. package/dist/client/colorStyles-gcTh5yZT.mjs +0 -89
@@ -1,21 +1,5 @@
1
- /**
2
- * Public SDK theme contracts.
3
- *
4
- * The SDK keeps the full theme schema intentionally broad so consumers don't
5
- * couple to the underlying blocks package, while still exposing the pieces the
6
- * SDK runtime genuinely reads.
7
- */
8
- export type Theme = {
9
- header?: {
10
- variant?: 'classic' | 'centered' | 'transparent' | 'floating';
11
- [key: string]: unknown;
12
- };
13
- footer?: {
14
- mode?: 'default' | 'blocks' | 'default+blocks' | 'none';
15
- [key: string]: unknown;
16
- };
17
- [key: string]: unknown;
18
- };
1
+ /** The SDK consumes the same canonical theme contract as Riverbank rendering. */
2
+ export type { Theme } from '../../../theme-core/src/index';
19
3
  export declare const colorTokens: readonly ["background/base", "background/elevated", "surface/base", "surface/subtle", "surface/inverted", "content/primary", "content/secondary", "accent/primary", "accent/secondary", "border/base"];
20
4
  export declare const typographyTokens: readonly ["display/hero", "display/section", "heading/large", "heading/medium", "heading/small", "body/normal", "body/small", "caption"];
21
5
  export declare const spacingTokens: readonly ["none", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl"];
@@ -21,9 +21,9 @@ export declare const fieldTypeEnum: z.ZodEnum<{
21
21
  select: "select";
22
22
  link: "link";
23
23
  media: "media";
24
+ repeater: "repeater";
24
25
  group: "group";
25
26
  richText: "richText";
26
- repeater: "repeater";
27
27
  }>;
28
28
  /**
29
29
  * Combined field schema supporting all field types.
@@ -10,7 +10,8 @@
10
10
  * This approach ensures CSS rules reference classNames that actually exist
11
11
  * in the layout by applying patches programmatically between passes.
12
12
  */
13
- import { parseRichTextInlineMarkdown, parseRichTextParagraphInlineMarkdown, type TipTapNode } from '../../../blocks/src/index';
13
+ import { parseRichTextInlineMarkdown, parseRichTextParagraphInlineMarkdown } from '../../../blocks/src/index';
14
+ import { type RichTextDoc } from '../../../blocks/src/system/manifest/richTextSchema';
14
15
  import type { HtmlToManifestInput, HtmlToManifestOutput, ConversionResult, ConverterOptions } from './types';
15
16
  import { DEFAULT_MANIFEST_MODEL } from './constants';
16
17
  export { DEFAULT_MANIFEST_MODEL };
@@ -21,15 +22,14 @@ export { DEFAULT_MANIFEST_MODEL };
21
22
  * current paragraph as TipTap hardBreak nodes for line-oriented content such as
22
23
  * addresses and opening hours.
23
24
  */
24
- declare function stringToTipTapDoc(text: string): TipTapNode;
25
+ declare function stringToTipTapDoc(text: string): RichTextDoc;
25
26
  /**
26
27
  * Coerce a richText defaultValue to TipTap format.
27
28
  * Handles:
28
29
  * - Plain strings → TipTap doc with paragraphs
29
30
  * - Already valid TipTap docs → pass through
30
- * - Legacy { doc: {...} } wrapper → unwrap
31
31
  */
32
- declare function coerceRichTextDefaultValue(value: unknown): TipTapNode | null;
32
+ declare function coerceRichTextDefaultValue(value: unknown): RichTextDoc | null;
33
33
  export declare function convertHtmlToManifest(input: HtmlToManifestInput, options: ConverterOptions): Promise<ConversionResult>;
34
34
  /**
35
35
  * Validate HTML-to-manifest output structure.
@@ -5,7 +5,7 @@
5
5
  * the SDK's public type surface must remain SDK-owned so consumers don't need
6
6
  * to install `@riverbankcms/blocks`.
7
7
  */
8
- import { applyBindings as blocksApplyBindings, applyBindingsToContent as blocksApplyBindingsToContent, normalizeBindingOutput as blocksNormalizeBindingOutput, getPath as blocksGetPath, applyTransform as blocksApplyTransform, extractFirstParagraph as blocksExtractFirstParagraph, isBindingDescriptorLike as blocksIsBindingDescriptorLike, isRecord as blocksIsRecord } from '../../../../blocks/src/bindings/index';
8
+ import { applyBindings as blocksApplyBindings, applyBindingsToContent as blocksApplyBindingsToContent, getPath as blocksGetPath, applyTransform as blocksApplyTransform, extractFirstParagraph as blocksExtractFirstParagraph, isBindingDescriptorLike as blocksIsBindingDescriptorLike, isRecord as blocksIsRecord } from '../../../../blocks/src/bindings/index';
9
9
  import type { BindingSource, BindingDescriptor, BindingInput, BindingContext } from '../../contracts';
10
10
  export type { BindingSource, BindingDescriptor, BindingInput, BindingMap, BindingContext } from '../../contracts';
11
11
  export declare const TRANSFORMS: {
@@ -19,7 +19,6 @@ export declare const isRecord: typeof blocksIsRecord;
19
19
  export declare const isBindingDescriptor: (value: unknown) => value is BindingDescriptor;
20
20
  export declare const isBindingDescriptorLike: typeof blocksIsBindingDescriptorLike;
21
21
  export declare const normalizeBindingInput: (value: BindingInput) => BindingDescriptor | null;
22
- export declare const normalizeBindingOutput: typeof blocksNormalizeBindingOutput;
23
22
  export declare const applyBindings: typeof blocksApplyBindings;
24
23
  export declare const applyBindingsToContent: typeof blocksApplyBindingsToContent;
25
24
  export declare const resolveBindingValue: (descriptor: BindingDescriptor, context: BindingContext) => unknown;
@@ -3,5 +3,5 @@
3
3
  */
4
4
  export { loadPage } from './loadPage';
5
5
  export type { LoadPageParams, LoadPageResult } from './loadPage';
6
- export { applyBindings, normalizeBindingOutput } from './bindings';
6
+ export { applyBindings } from './bindings';
7
7
  export type { BindingContext } from './bindings';
@@ -1,4 +1,4 @@
1
- import type { EventScheduleScope as SystemEventScheduleScope, EventSurfacePreset as SystemEventSurfacePreset } from '../../contracts/system-block-content';
1
+ import type { EventScheduleScope as SystemEventScheduleScope, EventSurfacePreset as SystemEventSurfacePreset, RichTextDoc as SystemRichTextDoc } from '../../contracts/system-block-content';
2
2
  import type { PublicTeamMemberSummary } from '../../../../api/src/index';
3
3
  import type { BookingFlexibleBalanceConfig, BookingInstalmentPlanConfig, LocationCoordinates, PublicCoursePriceDisplay, PublicEventPriceDisplay, PublicEventPricing, PublicEventPricingType } from '../../../../core/src/index';
4
4
  import type { AccordionIslandProps as BlocksAccordionIslandProps, BookingFormConfig as BlocksBookingFormConfig, BookingFormInteractiveIslandProps as BlocksBookingFormIslandProps, BookingFormService as BlocksBookingFormService, CarouselIslandProps as BlocksCarouselIslandProps, CourseRegistrationInteractiveIslandProps as BlocksCourseRegistrationIslandProps, CartDisplay as BlocksCartDisplay, CartInteractiveIslandProps as BlocksCartIslandProps, CartLineDisplay as BlocksCartLineDisplay, CheckoutDisplay as BlocksCheckoutDisplay, CheckoutInteractiveIslandProps as BlocksCheckoutIslandProps, EventCalendarInteractiveIslandProps as BlocksEventCalendarIslandProps, EventCombinedInteractiveIslandProps as BlocksEventCombinedIslandProps, EventDetailsContentEntry as BlocksEventDetailsContentEntry, EventDetailsIslandProps as BlocksEventDetailsIslandProps, EventDetailsOccurrenceContext as BlocksEventDetailsOccurrenceContext, LocationMapIslandProps as BlocksLocationMapIslandProps, EventRegistrationInteractiveIslandProps as BlocksEventRegistrationIslandProps, EventListingDisplay as BlocksEventListingDisplay, EventListingHydration as BlocksEventListingHydration, EventListingInteractiveIslandProps as BlocksEventListingIslandProps, PublicEvent as BlocksPublicEvent, FormInteractiveIslandProps as BlocksFormIslandProps, HeaderSectionIslandProps as BlocksHeaderSectionIslandProps, MembershipCardDisplay as BlocksMembershipCardDisplay, NewsletterFormInteractiveIslandProps as BlocksNewsletterFormIslandProps, PassCardDisplay as BlocksPassCardDisplay, PassesMembershipsDisplay as BlocksPassesMembershipsDisplay, ProductCardDisplay as BlocksProductCardDisplay, ProductDetailDisplay as BlocksProductDetailDisplay, ProductDetailInteractiveIslandProps as BlocksProductDetailIslandProps, ProductListDisplay as BlocksProductListDisplay, ProductListInteractiveIslandProps as BlocksProductListIslandProps, ProductVariantOptionDisplay as BlocksProductVariantOptionDisplay, ShopInteractiveIslandProps as BlocksShopIslandProps } from '../../../../blocks/src/contracts/index';
@@ -49,18 +49,7 @@ export type EventCategory = {
49
49
  };
50
50
  export type PricingType = PublicEventPricingType;
51
51
  export type { PublicCoursePriceDisplay, PublicEventPriceDisplay, PublicEventPricing, };
52
- export type RichTextDoc = {
53
- type: 'doc';
54
- content?: Array<{
55
- type: string;
56
- content?: Array<{
57
- type: string;
58
- text?: string;
59
- [key: string]: unknown;
60
- }>;
61
- [key: string]: unknown;
62
- }>;
63
- };
52
+ export type RichTextDoc = SystemRichTextDoc;
64
53
  export type EventSurfacePreset = SystemEventSurfacePreset;
65
54
  export type EventScheduleScope = Exclude<SystemEventScheduleScope, 'any'>;
66
55
  export type AccessRestriction = 'none' | 'category';
@@ -7,32 +7,3 @@ import type { ZodTypeAny } from 'zod';
7
7
  export type { Theme } from '../contracts';
8
8
  export declare const themeSchema: ZodTypeAny;
9
9
  export { loadLocalTheme, listLocalThemes, type LoadedTheme } from './loader';
10
- /**
11
- * Apply a Builder theme to the DOM by injecting CSS variables
12
- *
13
- * @param theme - The theme object from Riverbank CMS
14
- * @param element - The element to apply the theme to (default: document.documentElement)
15
- *
16
- * @example
17
- * ```ts
18
- * const site = await client.getSite({ slug: 'my-site' });
19
- * applyTheme(site.theme);
20
- * ```
21
- */
22
- export declare function applyTheme(theme: Record<string, unknown>, element?: HTMLElement): void;
23
- /**
24
- * Create a theme object with type-safe defaults
25
- *
26
- * @param partial - Partial theme configuration
27
- * @returns Complete theme object
28
- *
29
- * @example
30
- * ```ts
31
- * const customTheme = createTheme({
32
- * colors: {
33
- * primary: '#007bff',
34
- * },
35
- * });
36
- * ```
37
- */
38
- export declare function createTheme(partial?: Record<string, unknown>): Record<string, unknown>;
@@ -8,4 +8,4 @@
8
8
  * 1. This constant
9
9
  * 2. The "version" field in package.json
10
10
  */
11
- export declare const SDK_VERSION = "0.111.0";
11
+ export declare const SDK_VERSION = "0.118.0";
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { type RichTextDoc } from '../../core/src/index';
2
3
  import { type BlockRef, type BlocksRef, type CommandRef, type ContentEntryRef, type CourseRef, type PassProductRef, type MembershipProductRef, type BookingCustomerRef, type CustomerPassRef, type CustomerMembershipRef, type AppointmentBookingRef, type CourseEnrollmentRef, type EventRegistrationRef, type PassRedemptionRef, type OrderRef, type EventSeriesRef, type FormRef, type FooterRef, type MediaRef, type NavigationRef, type PageRef, type SiteStyleRef, type StaffRef, type TicketTypeRef, type VenueRef, type EventCategoryRef, type AppointmentServiceRef, type AppointmentResourceRef, type AppointmentAvailabilityRef, type SiteCommandSiteRef } from './refs';
3
4
  export declare const navigationLocations: readonly ["main", "header", "footer"];
4
5
  export type NavigationLocation = (typeof navigationLocations)[number];
@@ -334,8 +335,8 @@ export declare const applySiteStyleSelectionCommandSchema: z.ZodObject<{
334
335
  }, z.core.$strip>;
335
336
  scale: z.ZodEnum<{
336
337
  compact: "compact";
337
- balanced: "balanced";
338
338
  spacious: "spacious";
339
+ balanced: "balanced";
339
340
  minorThird: "minorThird";
340
341
  majorThird: "majorThird";
341
342
  perfectFourth: "perfectFourth";
@@ -618,7 +619,7 @@ export declare const upsertFooterContentCommandSchema: z.ZodObject<{
618
619
  type: z.ZodLiteral<"upsertFooterContent">;
619
620
  ref: z.ZodPipe<z.ZodString, z.ZodTransform<FooterRef, string>>;
620
621
  input: z.ZodObject<{
621
- bottomText: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
622
+ bottomText: z.ZodOptional<z.ZodNullable<z.ZodCustom<RichTextDoc, RichTextDoc>>>;
622
623
  }, z.core.$strict>;
623
624
  }, z.core.$strict>;
624
625
  export declare const upsertContentEntryCommandSchema: z.ZodObject<{
@@ -865,8 +866,10 @@ export declare const upsertEventSeriesCommandSchema: z.ZodObject<{
865
866
  }, z.core.$strict>>>;
866
867
  content: z.ZodOptional<z.ZodObject<{
867
868
  summary: z.ZodOptional<z.ZodString>;
868
- body: z.ZodOptional<z.ZodUnknown>;
869
- image: z.ZodOptional<z.ZodUnknown>;
869
+ body: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RichTextDoc, RichTextDoc>]>>;
870
+ image: z.ZodOptional<z.ZodObject<{
871
+ identifier: z.ZodString;
872
+ }, z.core.$catchall<z.ZodUnknown>>>;
870
873
  imageRef: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<MediaRef, string>>>;
871
874
  mediaRefs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<MediaRef, string>>>>>;
872
875
  contentEntryRef: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<ContentEntryRef, string>>>;
@@ -979,8 +982,10 @@ export declare const upsertCourseCommandSchema: z.ZodObject<{
979
982
  }, z.core.$strict>>>;
980
983
  content: z.ZodOptional<z.ZodObject<{
981
984
  summary: z.ZodOptional<z.ZodString>;
982
- body: z.ZodOptional<z.ZodUnknown>;
983
- image: z.ZodOptional<z.ZodUnknown>;
985
+ body: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RichTextDoc, RichTextDoc>]>>;
986
+ image: z.ZodOptional<z.ZodObject<{
987
+ identifier: z.ZodString;
988
+ }, z.core.$catchall<z.ZodUnknown>>>;
984
989
  imageRef: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<MediaRef, string>>>;
985
990
  mediaRefs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<MediaRef, string>>>>>;
986
991
  contentEntryRef: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<ContentEntryRef, string>>>;
@@ -1710,8 +1715,8 @@ export declare const siteCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1710
1715
  }, z.core.$strip>;
1711
1716
  scale: z.ZodEnum<{
1712
1717
  compact: "compact";
1713
- balanced: "balanced";
1714
1718
  spacious: "spacious";
1719
+ balanced: "balanced";
1715
1720
  minorThird: "minorThird";
1716
1721
  majorThird: "majorThird";
1717
1722
  perfectFourth: "perfectFourth";
@@ -1941,7 +1946,7 @@ export declare const siteCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1941
1946
  type: z.ZodLiteral<"upsertFooterContent">;
1942
1947
  ref: z.ZodPipe<z.ZodString, z.ZodTransform<FooterRef, string>>;
1943
1948
  input: z.ZodObject<{
1944
- bottomText: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1949
+ bottomText: z.ZodOptional<z.ZodNullable<z.ZodCustom<RichTextDoc, RichTextDoc>>>;
1945
1950
  }, z.core.$strict>;
1946
1951
  }, z.core.$strict>, z.ZodObject<{
1947
1952
  type: z.ZodLiteral<"upsertContentEntry">;
@@ -2191,8 +2196,10 @@ export declare const siteCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2191
2196
  }, z.core.$strict>>>;
2192
2197
  content: z.ZodOptional<z.ZodObject<{
2193
2198
  summary: z.ZodOptional<z.ZodString>;
2194
- body: z.ZodOptional<z.ZodUnknown>;
2195
- image: z.ZodOptional<z.ZodUnknown>;
2199
+ body: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RichTextDoc, RichTextDoc>]>>;
2200
+ image: z.ZodOptional<z.ZodObject<{
2201
+ identifier: z.ZodString;
2202
+ }, z.core.$catchall<z.ZodUnknown>>>;
2196
2203
  imageRef: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<MediaRef, string>>>;
2197
2204
  mediaRefs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<MediaRef, string>>>>>;
2198
2205
  contentEntryRef: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<ContentEntryRef, string>>>;
@@ -2302,8 +2309,10 @@ export declare const siteCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2302
2309
  }, z.core.$strict>>>;
2303
2310
  content: z.ZodOptional<z.ZodObject<{
2304
2311
  summary: z.ZodOptional<z.ZodString>;
2305
- body: z.ZodOptional<z.ZodUnknown>;
2306
- image: z.ZodOptional<z.ZodUnknown>;
2312
+ body: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RichTextDoc, RichTextDoc>]>>;
2313
+ image: z.ZodOptional<z.ZodObject<{
2314
+ identifier: z.ZodString;
2315
+ }, z.core.$catchall<z.ZodUnknown>>>;
2307
2316
  imageRef: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<MediaRef, string>>>;
2308
2317
  mediaRefs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<MediaRef, string>>>>>;
2309
2318
  contentEntryRef: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<ContentEntryRef, string>>>;
@@ -2951,8 +2960,8 @@ export declare const siteCommandBatchSchema: z.ZodObject<{
2951
2960
  }, z.core.$strip>;
2952
2961
  scale: z.ZodEnum<{
2953
2962
  compact: "compact";
2954
- balanced: "balanced";
2955
2963
  spacious: "spacious";
2964
+ balanced: "balanced";
2956
2965
  minorThird: "minorThird";
2957
2966
  majorThird: "majorThird";
2958
2967
  perfectFourth: "perfectFourth";
@@ -3182,7 +3191,7 @@ export declare const siteCommandBatchSchema: z.ZodObject<{
3182
3191
  type: z.ZodLiteral<"upsertFooterContent">;
3183
3192
  ref: z.ZodPipe<z.ZodString, z.ZodTransform<FooterRef, string>>;
3184
3193
  input: z.ZodObject<{
3185
- bottomText: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
3194
+ bottomText: z.ZodOptional<z.ZodNullable<z.ZodCustom<RichTextDoc, RichTextDoc>>>;
3186
3195
  }, z.core.$strict>;
3187
3196
  }, z.core.$strict>, z.ZodObject<{
3188
3197
  type: z.ZodLiteral<"upsertContentEntry">;
@@ -3432,8 +3441,10 @@ export declare const siteCommandBatchSchema: z.ZodObject<{
3432
3441
  }, z.core.$strict>>>;
3433
3442
  content: z.ZodOptional<z.ZodObject<{
3434
3443
  summary: z.ZodOptional<z.ZodString>;
3435
- body: z.ZodOptional<z.ZodUnknown>;
3436
- image: z.ZodOptional<z.ZodUnknown>;
3444
+ body: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RichTextDoc, RichTextDoc>]>>;
3445
+ image: z.ZodOptional<z.ZodObject<{
3446
+ identifier: z.ZodString;
3447
+ }, z.core.$catchall<z.ZodUnknown>>>;
3437
3448
  imageRef: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<MediaRef, string>>>;
3438
3449
  mediaRefs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<MediaRef, string>>>>>;
3439
3450
  contentEntryRef: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<ContentEntryRef, string>>>;
@@ -3543,8 +3554,10 @@ export declare const siteCommandBatchSchema: z.ZodObject<{
3543
3554
  }, z.core.$strict>>>;
3544
3555
  content: z.ZodOptional<z.ZodObject<{
3545
3556
  summary: z.ZodOptional<z.ZodString>;
3546
- body: z.ZodOptional<z.ZodUnknown>;
3547
- image: z.ZodOptional<z.ZodUnknown>;
3557
+ body: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RichTextDoc, RichTextDoc>]>>;
3558
+ image: z.ZodOptional<z.ZodObject<{
3559
+ identifier: z.ZodString;
3560
+ }, z.core.$catchall<z.ZodUnknown>>>;
3548
3561
  imageRef: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<MediaRef, string>>>;
3549
3562
  mediaRefs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<MediaRef, string>>>>>;
3550
3563
  contentEntryRef: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<ContentEntryRef, string>>>;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * A button variant may declare a trailing `affordance` icon (see
5
5
  * `ButtonVariantAffordance`). The generated button CSS renders that icon as a
6
- * masked `::after` pseudo-element, so the personality supplies it to every
6
+ * masked `::after` pseudo-element, so the theme supplies it to every
7
7
  * button of the variant without per-node authoring.
8
8
  *
9
9
  * Icons live in the `@riverbankcms/blocks` registry, but the button CSS is
@@ -11,7 +11,7 @@
11
11
  * the *affordance-eligible* icon path data (arrows/chevrons — the action-oriented
12
12
  * subset). The `d` values below are duplicated verbatim from the matching entries
13
13
  * in `blocks/src/system/icons/svg.tsx`; ids match the registry ids exactly so a
14
- * node-level `trailingIcon` and a personality `affordance` share one id space.
14
+ * node-level `trailingIcon` and a theme-owned `affordance` share one id space.
15
15
  *
16
16
  * Keep this set intentionally tiny. It is not the full CTA icon set — only the
17
17
  * shapes that read as a trailing affordance.
@@ -15,7 +15,6 @@ export interface ButtonVariantCore {
15
15
  export interface ButtonCoreSettings {
16
16
  readonly corners: 'square' | 'soft' | 'rounded' | 'pill';
17
17
  readonly shadow: 'none' | 'low' | 'medium' | 'high';
18
- readonly borderWidth: 'none' | 'thin' | 'medium' | 'thick';
19
18
  readonly fontWeight?: number;
20
19
  readonly textTransform?: 'none' | 'uppercase' | 'lowercase' | 'capitalize';
21
20
  }
@@ -1,4 +1,5 @@
1
- export type ButtonUnsupportedEffectReason = 'alpha_requires_surface' | 'changes_foreground' | 'changes_border' | 'changes_element_opacity' | 'unresolved_background_overlay' | 'not_button_effect';
1
+ import { type ButtonEffectApplication } from './types';
2
+ export type ButtonUnsupportedEffectReason = 'alpha_requires_surface' | 'changes_foreground' | 'changes_border' | 'changes_shadow_colour' | 'changes_element_opacity' | 'unresolved_background_overlay' | 'not_button_effect';
2
3
  export type ButtonEffectPolicy = Readonly<{
3
4
  classification: 'colour-transition';
4
5
  transition: Readonly<{
@@ -9,6 +10,8 @@ export type ButtonEffectPolicy = Readonly<{
9
10
  }>;
10
11
  }> | Readonly<{
11
12
  classification: 'non-colour';
13
+ }> | Readonly<{
14
+ classification: 'decorative-colour';
12
15
  }> | Readonly<{
13
16
  classification: 'unsupported-colour' | 'unsupported-background-overlay' | 'not-button';
14
17
  reason: ButtonUnsupportedEffectReason;
@@ -101,22 +104,24 @@ export declare const BUTTON_EFFECT_POLICIES: {
101
104
  readonly classification: "non-colour";
102
105
  };
103
106
  readonly 'border-glow': {
104
- readonly classification: "non-colour";
107
+ readonly classification: "unsupported-colour";
108
+ readonly reason: "changes_shadow_colour";
105
109
  };
106
110
  readonly 'drop-shadow': {
107
- readonly classification: "non-colour";
111
+ readonly classification: "decorative-colour";
108
112
  };
109
113
  readonly 'inner-shadow': {
110
- readonly classification: "non-colour";
114
+ readonly classification: "decorative-colour";
111
115
  };
112
116
  readonly 'neumorphic-shadow': {
113
- readonly classification: "non-colour";
117
+ readonly classification: "decorative-colour";
114
118
  };
115
119
  readonly 'outer-glow': {
116
- readonly classification: "non-colour";
120
+ readonly classification: "unsupported-colour";
121
+ readonly reason: "changes_shadow_colour";
117
122
  };
118
123
  readonly 'retro-3d-shadow': {
119
- readonly classification: "non-colour";
124
+ readonly classification: "decorative-colour";
120
125
  };
121
126
  readonly 'scale-up': {
122
127
  readonly classification: "non-colour";
@@ -137,11 +142,19 @@ export declare const BUTTON_EFFECT_POLICIES: {
137
142
  readonly classification: "non-colour";
138
143
  };
139
144
  readonly 'sketchy-border': {
140
- readonly classification: "non-colour";
145
+ readonly classification: "decorative-colour";
141
146
  };
142
147
  readonly 'pulse-animation': {
143
- readonly classification: "non-colour";
148
+ readonly classification: "unsupported-colour";
149
+ readonly reason: "changes_element_opacity";
144
150
  };
145
151
  };
152
+ export type ButtonEffectOptionsValidation = Readonly<{
153
+ ok: true;
154
+ }> | Readonly<{
155
+ ok: false;
156
+ option: string;
157
+ }>;
158
+ export declare function validateButtonEffectOptions(effect: ButtonEffectApplication): ButtonEffectOptionsValidation;
146
159
  export declare function getButtonEffectPolicy(effectId: string): ButtonEffectPolicy | null;
147
160
  export declare function classifyButtonEffectId(effectId: string): ButtonEffectClassification;
@@ -20,8 +20,7 @@ export declare const fadeBackgroundEffect: EffectPreset;
20
20
  /**
21
21
  * Reduce opacity on hover (simple opacity reduction)
22
22
  *
23
- * Works with all background types. Reduces opacity by a percentage (default 15%).
24
- * This is useful for default button styles that need simple hover feedback.
23
+ * Navigation-link effect that reduces opacity by a percentage (default 15%).
25
24
  */
26
25
  export declare const opacityReduceEffect: EffectPreset;
27
26
  /**
@@ -8,7 +8,6 @@ export declare const borderColorChangeEffect: EffectPreset;
8
8
  /**
9
9
  * Sketchy/hand-drawn border effect
10
10
  *
11
- * Creates an imperfect, hand-drawn appearance using multiple shadows,
12
- * filters, and slight rotation to simulate hand-drawn lines.
11
+ * Creates an imperfect, hand-drawn appearance using slight rotations.
13
12
  */
14
13
  export declare const sketchyBorderEffect: EffectPreset;
@@ -57,8 +57,10 @@ export declare const animatedGradientBorderFillEffect: EffectPreset;
57
57
  * Creates an animated underline that grows from one side on hover.
58
58
  * Uses ::after pseudo-element positioned at the bottom of the button.
59
59
  *
60
+ * The underline inherits `currentColor`, so it cannot create a second button
61
+ * colour authority or drift from the canonical foreground.
62
+ *
60
63
  * Options:
61
- * - colorToken: Color token for the border (default: neutral-400)
62
64
  * - height: Height of the border in pixels (default: 1)
63
65
  * - origin: Transform origin - 'left', 'center', or 'right' (default: left)
64
66
  */
@@ -31,8 +31,8 @@ export declare const neumorphicShadowEffect: EffectPreset;
31
31
  /**
32
32
  * Outer glow effect
33
33
  *
34
- * Creates an outer glow using box-shadow with no offset.
35
- * Can be used in base, hover, or active states for retro/neon aesthetics.
34
+ * Creates an outer glow around a navigation link using box-shadow with no
35
+ * offset.
36
36
  */
37
37
  export declare const outerGlowEffect: EffectPreset;
38
38
  /**
@@ -4,10 +4,10 @@ import type { Theme } from '../../schema';
4
4
  import type { InteractiveElementConfig } from '../../interactive/types';
5
5
  import type { InteractiveElementType } from '../../interactive/types';
6
6
  /**
7
- * Valid effect preset IDs
7
+ * Valid generic interactive-effect preset IDs.
8
8
  *
9
- * This union type ensures type safety when referencing effects in button variants.
10
- * If you add a new effect to the registry, add its ID here.
9
+ * Button variants deliberately use the narrower `ButtonEffectApplication`
10
+ * contract from `buttons/types.ts`; this registry also serves navigation.
11
11
  */
12
12
  export type EffectId = 'darken-background' | 'lighten-background' | 'fade-background' | 'opacity-reduce' | 'animated-gradient' | 'background-on-hover' | 'background-on-hover-alpha' | 'border-glow' | 'drop-shadow' | 'inner-shadow' | 'neumorphic-shadow' | 'outer-glow' | 'retro-3d-shadow' | 'scale-up' | 'scale-down' | 'lift' | 'press-down' | 'pop' | 'aurora-glow' | 'cosmic-stardust' | 'gradient-border-fill' | 'animated-gradient-border-fill' | 'border-bottom-grow' | 'gradient-text' | 'text-color-change' | 'border-color-change' | 'sketchy-border' | 'pulse-animation' | 'nav-underline' | 'nav-frosted-base' | 'nav-frosted-hover' | 'nav-frosted-active';
13
13
  /**
@@ -66,9 +66,10 @@ export interface CustomizableOption {
66
66
  options?: unknown[];
67
67
  }
68
68
  /**
69
- * Effect preset - a reusable CSS generator for button effects
69
+ * Effect preset - a reusable CSS generator for interactive-element effects.
70
70
  *
71
- * Effect presets are composable building blocks that can be combined to create complex button styles.
71
+ * The generic registry serves navigation and button emitters. Button persistence
72
+ * is governed by the closed `ButtonEffectApplication` schema, not this catalog.
72
73
  * They must use theme tokens (not hardcoded colors) and declare which category they belong to.
73
74
  */
74
75
  export interface EffectPreset {
@@ -89,13 +90,13 @@ export interface EffectPreset {
89
90
  /**
90
91
  * Which interactive element types can use this effect
91
92
  *
92
- * If undefined, the effect is assumed to work with all element types (backward compatible).
93
+ * If undefined, the generic emitter supports all interactive element types.
93
94
  * Use this to restrict effects that only make sense for certain elements.
94
95
  *
95
96
  * Examples:
96
97
  * - 'button' only: darken-background, lighten-background (require solid background)
97
98
  * - 'nav-link' only: nav-underline, nav-frosted
98
- * - both: scale-up, border-glow, text-color-change
99
+ * - both: scale-up
99
100
  */
100
101
  applicableTo?: InteractiveElementType[];
101
102
  /**
@@ -128,14 +129,3 @@ export interface EffectPreset {
128
129
  */
129
130
  isApplicable?: (buttonConfig: ButtonVariant | InteractiveElementConfig) => boolean;
130
131
  }
131
- /**
132
- * Reference to an effect preset with customization options
133
- *
134
- * This is what's stored in ButtonPreset.effects and ButtonVariant.effects
135
- */
136
- export interface EffectReference {
137
- /** Effect preset ID (type-safe) */
138
- effectId: EffectId;
139
- /** User-provided customization options */
140
- options?: Record<string, unknown>;
141
- }
@@ -2,8 +2,8 @@ import type { Theme } from '../schema';
2
2
  import type { ButtonSystem } from './types';
3
3
  /**
4
4
  * Class the `button` runtime node adds when it renders its own trailing icon,
5
- * so a node-level icon suppresses the personality's CSS `::after` affordance
6
- * (node overrides personality). Shared so generator and renderer can't drift.
5
+ * so a node-level icon suppresses the theme's CSS `::after` affordance.
6
+ * Shared so generator and renderer can't drift.
7
7
  */
8
8
  export declare const AFFORDANCE_SUPPRESS_CLASS = "rb-affordance-off";
9
9
  export interface GenerateButtonCssOptions {
@@ -3,11 +3,11 @@ import { type ButtonSystem } from './types';
3
3
  /**
4
4
  * Generate default button system from theme settings.
5
5
  *
6
- * Creates 4 sized variants when theme.buttons is not defined:
7
- * 1. Primary - primary color background with opacity-reduce hover effect
8
- * 2. Secondary - neutral-700 background with opacity-reduce hover effect
9
- * 3. Outline - transparent background with primary border and opacity-reduce hover effect
10
- * 4. Ghost - transparent background, no border, with opacity-reduce hover effect
6
+ * Creates 4 sized canonical variants when theme.buttons is not defined:
7
+ * 1. Primary - solid primary treatment
8
+ * 2. Secondary - solid neutral treatment
9
+ * 3. Outline - surface treatment with a border
10
+ * 4. Ghost - surface treatment without a border
11
11
  *
12
12
  * All four are sized variants — they inherit padding/fontSize from the theme's
13
13
  * `sizes` config (or the system defaults) so they're consistent at any size.
@@ -4,6 +4,7 @@
4
4
  * Complete button system including types, schemas, presets, and CSS variable generation.
5
5
  */
6
6
  export * from './types';
7
+ export * from './parseThemeForPersistence';
7
8
  export * from './classNames';
8
9
  export * from './generateButtonCss';
9
10
  export * from './resolveButtonColourStates';
@@ -12,7 +13,3 @@ export * from './generateDefaultButtonSystem';
12
13
  export * from './constants';
13
14
  export * from './presets';
14
15
  export * from './styles';
15
- export * from './effects/types';
16
- export * from './effects/registry';
17
- export * from './effects/presets/transform';
18
- export * from './core';
@@ -0,0 +1,36 @@
1
+ import { type Theme } from '../schema';
2
+ import type { ZodIssue } from 'zod';
3
+ import { type ButtonColourContractError } from './resolveButtonColourStates';
4
+ export type ThemeButtonColourContractError = Readonly<{
5
+ kind: 'invalid-button-colour-contract';
6
+ variantId: string;
7
+ cause: ButtonColourContractError;
8
+ }>;
9
+ export type ThemePersistenceValidationError = Readonly<{
10
+ kind: 'invalid-theme-schema';
11
+ issues: readonly ZodIssue[];
12
+ }> | ThemeButtonColourContractError;
13
+ declare const validatedThemeForPersistenceBrand: unique symbol;
14
+ /**
15
+ * A schema-parsed Theme whose button variants all compile against its palette.
16
+ *
17
+ * The brand is intentionally phantom: validation does not mutate themes or add
18
+ * persistence-only data to the JSON document.
19
+ */
20
+ export type ValidatedThemeForPersistence = Theme & {
21
+ readonly [validatedThemeForPersistenceBrand]: true;
22
+ };
23
+ export type ThemeButtonColourContractResult = Readonly<{
24
+ ok: true;
25
+ value: ValidatedThemeForPersistence;
26
+ }> | Readonly<{
27
+ ok: false;
28
+ error: ThemePersistenceValidationError;
29
+ }>;
30
+ /**
31
+ * Proves that every persisted button variant compiles against the theme's
32
+ * concrete palette. Public rendering may still recover from malformed
33
+ * external/runtime input, but persistence boundaries must reject it.
34
+ */
35
+ export declare function parseThemeForPersistence(value: unknown): ThemeButtonColourContractResult;
36
+ export {};