@riverbankcms/sdk 0.60.7 → 0.60.11

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 (44) hide show
  1. package/dist/_dts/api/src/index.d.ts +2 -1
  2. package/dist/_dts/api/src/navigation/linkValue.d.ts +15 -2
  3. package/dist/_dts/api/src/navigation.d.ts +2 -0
  4. package/dist/_dts/blocks/src/index.d.ts +2 -1
  5. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +185 -0
  6. package/dist/_dts/blocks/src/system/manifest/index.d.ts +1 -0
  7. package/dist/_dts/blocks/src/system/manifest/validation.d.ts +2 -84
  8. package/dist/_dts/blocks/src/system/node/fragments/ctaButton.d.ts +2 -2
  9. package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +2 -1
  10. package/dist/_dts/blocks/src/system/types/link.d.ts +100 -2
  11. package/dist/_dts/db/src/schemas/forms.d.ts +24 -3
  12. package/dist/_dts/editor-blocks/src/widgets/link/LinkSummary.d.ts +1 -1
  13. package/dist/_dts/editor-blocks/src/widgets/link/LinkWidget.d.ts +1 -1
  14. package/dist/_dts/editor-blocks/src/widgets/link/utils.d.ts +1 -1
  15. package/dist/_dts/sdk/src/config/typed-entries.d.ts +36 -1
  16. package/dist/_dts/sdk/src/contracts/content.d.ts +13 -2
  17. package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
  18. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +1 -0
  19. package/dist/_dts/sdk/src/version.d.ts +1 -1
  20. package/dist/_dts/theme-core/src/buttons/classNames.d.ts +21 -0
  21. package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
  22. package/dist/_dts/theme-core/src/buttons/types.d.ts +1 -0
  23. package/dist/cli/index.mjs +736 -427
  24. package/dist/client/bookings.mjs +746 -149
  25. package/dist/client/client.mjs +40389 -39847
  26. package/dist/client/hooks.mjs +1737 -1735
  27. package/dist/client/rendering/client.mjs +351 -113
  28. package/dist/client/rendering/islands.mjs +4549 -4366
  29. package/dist/client/rendering.mjs +1915 -1373
  30. package/dist/preview-next/client/runtime.mjs +1509 -945
  31. package/dist/server/components.mjs +3148 -2781
  32. package/dist/server/config-validation.mjs +1727 -1725
  33. package/dist/server/config.mjs +1727 -1725
  34. package/dist/server/data.mjs +1737 -1735
  35. package/dist/server/index.mjs +1 -1
  36. package/dist/server/next.mjs +3193 -2826
  37. package/dist/server/page-converter.mjs +10 -10
  38. package/dist/server/prebuild.mjs +1 -1
  39. package/dist/server/rendering/server.mjs +3161 -2794
  40. package/dist/server/rendering.mjs +3161 -2794
  41. package/dist/server/routing.mjs +297 -314
  42. package/dist/server/server.mjs +1738 -1736
  43. package/package.json +1 -1
  44. package/dist/_dts/blocks/src/system/runtime/shared/themedButtonClass.d.ts +0 -11
@@ -56,7 +56,42 @@ type InferDataFromTabs<Tabs extends readonly {
56
56
  * - Repeater: monomorphic (array) and polymorphic (discriminated union array)
57
57
  * - TabGroup: flattened fields from all tabs
58
58
  */
59
- export type FieldValueType<F extends FieldDefinition> = F extends TextFieldDefinition ? string : F extends BooleanFieldDefinition ? boolean : F extends NumberFieldDefinition ? number : F extends RichTextFieldDefinition ? TipTapNode : F extends MediaFieldDefinition ? Media | null : F extends LinkFieldDefinition ? LinkValue | null : F extends DateFieldDefinition ? string : F extends TimeFieldDefinition ? string : F extends DateTimeFieldDefinition ? string : F extends SlugFieldDefinition ? string : F extends UrlFieldDefinition ? string : F extends ReferenceFieldDefinition ? string : F extends PresetOrCustomFieldDefinition ? string : F extends ContentTypeSelectFieldDefinition ? string : F extends SelectFieldDefinition & {
59
+ export type FieldValueType<F extends FieldDefinition> = F extends {
60
+ type: 'text';
61
+ } ? string : F extends {
62
+ type: 'boolean';
63
+ } ? boolean : F extends {
64
+ type: 'number';
65
+ } ? number : F extends {
66
+ type: 'richText';
67
+ } ? TipTapNode : F extends {
68
+ type: 'media';
69
+ } ? Media | null : F extends {
70
+ type: 'link';
71
+ } ? LinkValue | null : F extends {
72
+ type: 'date';
73
+ } ? string : F extends {
74
+ type: 'time';
75
+ } ? string : F extends {
76
+ type: 'datetime';
77
+ } ? string : F extends {
78
+ type: 'slug';
79
+ } ? string : F extends {
80
+ type: 'url';
81
+ } ? string : F extends {
82
+ type: 'reference';
83
+ } ? string : F extends {
84
+ type: 'presetOrCustom';
85
+ } ? string : F extends {
86
+ type: 'contentTypeSelect';
87
+ } ? string : F extends {
88
+ type: 'select';
89
+ multiple: true;
90
+ } ? string[] : F extends {
91
+ type: 'select';
92
+ } ? string : F extends {
93
+ type: 'entryPicker';
94
+ } ? string | null : F extends TextFieldDefinition ? string : F extends BooleanFieldDefinition ? boolean : F extends NumberFieldDefinition ? number : F extends RichTextFieldDefinition ? TipTapNode : F extends MediaFieldDefinition ? Media | null : F extends LinkFieldDefinition ? LinkValue | null : F extends DateFieldDefinition ? string : F extends TimeFieldDefinition ? string : F extends DateTimeFieldDefinition ? string : F extends SlugFieldDefinition ? string : F extends UrlFieldDefinition ? string : F extends ReferenceFieldDefinition ? string : F extends PresetOrCustomFieldDefinition ? string : F extends ContentTypeSelectFieldDefinition ? string : F extends SelectFieldDefinition & {
60
95
  multiple: true;
61
96
  } ? string[] : F extends SelectFieldDefinition ? string : F extends EntryPickerFieldDefinition ? string | null : F extends GroupFieldDefinition & {
62
97
  schema: {
@@ -17,7 +17,11 @@ export type TipTapNode = {
17
17
  attrs?: Record<string, unknown>;
18
18
  marks?: TipTapMark[];
19
19
  };
20
- export type InternalLinkValue = {
20
+ export type InternalRouteOnlyLinkValue = {
21
+ kind: 'internal';
22
+ routeId: string;
23
+ };
24
+ export type InternalResolvedLinkValue = {
21
25
  kind: 'internal';
22
26
  routeId: string;
23
27
  entityId: string;
@@ -29,6 +33,7 @@ export type InternalLinkValue = {
29
33
  contentTypeName?: string | null;
30
34
  updatedAt?: string | null;
31
35
  };
36
+ export type InternalLinkValue = InternalRouteOnlyLinkValue | InternalResolvedLinkValue;
32
37
  export type ExternalLinkValue = {
33
38
  kind: 'external';
34
39
  href: string;
@@ -46,7 +51,13 @@ export type EntryLinkValue = {
46
51
  contentType: string;
47
52
  identifier: string;
48
53
  };
49
- export type LinkValue = InternalLinkValue | ExternalLinkValue | CustomLinkValue | PageLinkValue | EntryLinkValue;
54
+ export type AuthoredLinkValue = InternalLinkValue | ExternalLinkValue | CustomLinkValue | PageLinkValue | EntryLinkValue;
55
+ /**
56
+ * Broad authored/editor link value accepted by SDK content contracts.
57
+ * Route-only internal links remain part of the public wire contract; navigation
58
+ * persistence must narrow to a persistable lifecycle value first.
59
+ */
60
+ export type LinkValue = AuthoredLinkValue;
50
61
  export type MediaTypeDiscriminant = 'image' | 'video' | 'audio' | 'document' | 'spreadsheet' | 'archive';
51
62
  export type Media = {
52
63
  type: MediaTypeDiscriminant;
@@ -1,4 +1,4 @@
1
- export type { TipTapNode, TipTapMark, Media, LinkValue, InternalLinkValue, ExternalLinkValue, CustomLinkValue, PageLinkValue, EntryLinkValue, RichTextPrimitiveProps, RichTextVariant, } from './content';
1
+ export type { TipTapNode, TipTapMark, Media, LinkValue, InternalRouteOnlyLinkValue, InternalResolvedLinkValue, InternalLinkValue, ExternalLinkValue, CustomLinkValue, PageLinkValue, EntryLinkValue, RichTextPrimitiveProps, RichTextVariant, } from './content';
2
2
  export type { AppointmentBookingContent, BlogListingContent, BlogPostContent, BodyTextAlignment, BodyTextContent, ButtonVariant, CalendarTabViews, CartContent, CardStylesContent, CheckoutContent, CollectionContent, ColumnsContent, ColumnOption, ContainerStylesContent, CourseDetailsContent, CourseRegistrationContent, CtaFullContent, DisplayMode, EmbedContent, EventCalendarContent, EventDetailsContent, EventLayout, EventListingContent, EventRegistrationContent, EventSpotlightContent, FaqContent, FaqItem, FilterAutoShow, FormBlockContent, GiftingContent, HeroContent, HeroCta, HeroCtaInput, HeroMedia, ImageColSize, ImageGalleryContent, LocationMapContent, LayoutAlign, LayoutWidth, MediaTextAlignment, MediaTextAspectRatio, MediaTextContent, MediaTextImagePosition, NewsletterSignupContent, NewsletterSignupPreset, ProductDetailContent, ProductListContent, SectionStylesContent, SemanticSpacing, ShopContent, SingleButtonContent, SiteFooterContent, SiteHeaderContent, StackContentAlignment, StackImagePosition, SystemBlockContentByFullKind, SystemBlockContentByKind, SystemBlockContentFor, SystemBlockShortKind, TeamMembersContent, TestimonialEntryContent, TestimonialsBlockContent, ThumbnailPadding, ThumbnailShape, VideoGridContent, WeekStart, } from './system-block-content';
3
3
  export type { PageOutline, BlockOutline, RouteMap, RouteMapEntry, OccurrenceContextData, EntrySubrouteContextData, } from './page';
4
4
  export type { Theme, ThemeTokens } from './theme';
@@ -311,6 +311,7 @@ export type HeroContent = {
311
311
  contentMaxWidth?: 'default' | 'narrow' | 'medium' | 'wide';
312
312
  _sectionStyles?: SectionStylesContent;
313
313
  _containerStyles?: ContainerStylesContent;
314
+ _contentCardStyles?: ContainerStylesContent;
314
315
  ctas?: HeroCtaInput[];
315
316
  };
316
317
  export type HeroMedia = Media;
@@ -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.60.7";
11
+ export declare const SDK_VERSION = "0.60.11";
@@ -0,0 +1,21 @@
1
+ import { type ButtonSizeName, type DefaultVariantAliasId, type VariantId } from './types';
2
+ export type ThemeButtonVariantId = VariantId | DefaultVariantAliasId;
3
+ export type ThemeButtonClassName = string & {
4
+ readonly __brand: 'ThemeButtonClassName';
5
+ };
6
+ export type ThemeButtonSizeClassName = `btn-${ButtonSizeName}`;
7
+ export type ThemeButtonClassSpec = Readonly<{
8
+ variant: ThemeButtonVariantId;
9
+ size: ButtonSizeName;
10
+ extraClassName?: string | null;
11
+ }>;
12
+ /**
13
+ * Parse content/runtime variant identifiers into the closed theme-button class
14
+ * contract. Empty input is the intentional local/unstyled escape hatch used by
15
+ * a few block renderers; non-empty, non-semantic ids become branded special ids.
16
+ */
17
+ export declare function parseThemeButtonVariantId(value: string | null | undefined): ThemeButtonVariantId | null;
18
+ export declare function themeButtonVariantClassNames(variant: ThemeButtonVariantId): readonly [string] | readonly [string, string];
19
+ export declare function themeButtonSizeClassName(size: ButtonSizeName): ThemeButtonSizeClassName;
20
+ export declare function themeButtonSelector(variant: ThemeButtonVariantId, size?: ButtonSizeName): string;
21
+ export declare function themeButtonClassName(spec: ThemeButtonClassSpec): ThemeButtonClassName;
@@ -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 './classNames';
7
8
  export * from './generateButtonCss';
8
9
  export * from './generateDefaultButtonSystem';
9
10
  export * from './constants';
@@ -35,6 +35,7 @@ export type ButtonSizes = Record<ButtonSizeName, ButtonSizeConfig>;
35
35
  */
36
36
  export declare const VARIANT_ROLES: readonly ["primary", "secondary", "outline", "ghost", "link", "tertiary", "accent"];
37
37
  export type VariantRole = (typeof VARIANT_ROLES)[number];
38
+ export declare function isVariantRole(value: string): value is VariantRole;
38
39
  declare const SpecialVariantIdBrand: unique symbol;
39
40
  /**
40
41
  * Branded ID for theme-specific special variants that don't map to a standard role