@riverbankcms/sdk 0.74.0 → 0.75.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 (113) hide show
  1. package/dist/{PreviewEditorSidebar-5XL7M3OM.mjs → PreviewEditorSidebar-U2IHCBYN.mjs} +3 -3
  2. package/dist/{PreviewEditorUI-ZDFRDJID.mjs → PreviewEditorUI-ZGH2RQNP.mjs} +3 -3
  3. package/dist/SdkPreviewModeRuntime-MTUGBTLQ.mjs +8 -0
  4. package/dist/_dts/api/src/cache-tags.d.ts +22 -0
  5. package/dist/_dts/api/src/contentRuntime.d.ts +1 -0
  6. package/dist/_dts/api/src/endpoints.d.ts +24 -24
  7. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +2 -1
  8. package/dist/_dts/block-form/src/blockDraftSaveability.d.ts +4 -1
  9. package/dist/_dts/blocks/src/client/booking-form.d.ts +2 -0
  10. package/dist/_dts/blocks/src/client/carousel.d.ts +1 -0
  11. package/dist/_dts/blocks/src/client/course-registration.d.ts +2 -0
  12. package/dist/_dts/blocks/src/client/events.d.ts +4 -0
  13. package/dist/_dts/blocks/src/client/form.d.ts +2 -0
  14. package/dist/_dts/blocks/src/client/header.d.ts +1 -0
  15. package/dist/_dts/blocks/src/client/location-map.d.ts +1 -0
  16. package/dist/_dts/blocks/src/client/newsletter-form.d.ts +2 -0
  17. package/dist/_dts/blocks/src/client/shop.d.ts +6 -0
  18. package/dist/_dts/blocks/src/lib/video.d.ts +2 -0
  19. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +21 -1
  20. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +1 -0
  21. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +3 -2
  22. package/dist/_dts/blocks/src/system/runtime/nodes/events/index.d.ts +3 -0
  23. package/dist/_dts/blocks/src/system/runtime/nodes/header-section.client.d.ts +1 -0
  24. package/dist/_dts/blocks/src/system/runtime/nodes/header-section.server.d.ts +1 -0
  25. package/dist/_dts/content-editor/src/hooks/validateBlocksForPublish.d.ts +5 -0
  26. package/dist/_dts/preview-next/src/client/preview/SiteChromeEditableSurface.d.ts +12 -2
  27. package/dist/_dts/sdk/src/public-api/contracts.d.ts +1 -0
  28. package/dist/_dts/sdk/src/rendering/islands/deferredVideoEmbeds.d.ts +2 -0
  29. package/dist/_dts/sdk/src/rendering/server.d.ts +3 -0
  30. package/dist/_dts/sdk/src/version.d.ts +1 -1
  31. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  32. package/dist/{chunk-YY7K3QD2.mjs → chunk-BGMNDF6T.mjs} +7 -7
  33. package/dist/{chunk-2MIWNFJM.mjs → chunk-GFE74WRD.mjs} +309 -84
  34. package/dist/{chunk-CEQBBLMJ.mjs → chunk-RWXQBRQZ.mjs} +1 -1
  35. package/dist/{chunk-7RX72SK2.mjs → chunk-VX7B5VAC.mjs} +36 -25
  36. package/dist/{chunk-YRJKZEQ3.mjs → chunk-Z7JLNTJR.mjs} +1 -1
  37. package/dist/{chunk-CBD47MTM.mjs → chunk-ZSHFGFUG.mjs} +2 -2
  38. package/dist/cli/index.mjs +3395 -3753
  39. package/dist/client/{accordion-ZZVXWV3N.mjs → accordion-T2UD2ZTH.mjs} +1 -1
  40. package/dist/client/bookingForm-GUP75FKN.mjs +3022 -0
  41. package/dist/client/bookings.mjs +19 -10
  42. package/dist/client/{carousel-25WK2H7G.mjs → carousel-2NQA6V57.mjs} +3 -2
  43. package/dist/client/cart-5TFIAFDS.mjs +18 -0
  44. package/dist/client/checkout-TP4WAHZE.mjs +18 -0
  45. package/dist/client/chunk-2PHQZ666.mjs +383 -0
  46. package/dist/client/chunk-3DCJ45Z2.mjs +36 -0
  47. package/dist/client/chunk-3PEDD5KJ.mjs +146 -0
  48. package/dist/client/chunk-CY2ZTSE5.mjs +204 -0
  49. package/dist/client/chunk-F7LHOKEH.mjs +146 -0
  50. package/dist/client/{chunk-6VGXRE34.mjs → chunk-FU2QRZMX.mjs} +6 -6
  51. package/dist/client/chunk-I2MMZO53.mjs +6 -0
  52. package/dist/client/chunk-II7O4XN3.mjs +2206 -0
  53. package/dist/client/chunk-M3L3KYYR.mjs +1181 -0
  54. package/dist/client/chunk-NWOUL6JY.mjs +1378 -0
  55. package/dist/client/chunk-OJPZEZU2.mjs +31 -0
  56. package/dist/client/chunk-RTZ3JKKX.mjs +178 -0
  57. package/dist/client/chunk-TQ5MSPDX.mjs +74 -0
  58. package/dist/client/chunk-VUAOE3AG.mjs +5592 -0
  59. package/dist/client/chunk-WJXXNDSE.mjs +245 -0
  60. package/dist/client/chunk-YLMKMCSJ.mjs +86 -0
  61. package/dist/client/chunk-ZLMS67RR.mjs +106 -0
  62. package/dist/client/client.mjs +51626 -52074
  63. package/dist/client/courseRegistration-5DPU6PDY.mjs +1737 -0
  64. package/dist/client/{eventCalendar-X6GIPYFM.mjs → eventCalendar-F3GZGTEF.mjs} +13 -2
  65. package/dist/client/{eventCombined-EZUOPM3G.mjs → eventCombined-BQOB6QMY.mjs} +13 -2
  66. package/dist/client/eventDetails-PEM2EJWE.mjs +25 -0
  67. package/dist/client/{eventListing-HEFGAETC.mjs → eventListing-YMIQPVME.mjs} +13 -2
  68. package/dist/client/{eventRegistration-3LCP2V3P.mjs → eventRegistration-4I6ZNDUF.mjs} +13 -2
  69. package/dist/client/form-ZJVAYZ6G.mjs +300 -0
  70. package/dist/client/headerSection-TOT5MGTF.mjs +729 -0
  71. package/dist/client/hooks.mjs +49 -33
  72. package/dist/client/locationMap-J66NZREU.mjs +227 -0
  73. package/dist/client/newsletterForm-ET2XUMRO.mjs +208 -0
  74. package/dist/client/productDetail-C2XIH7C5.mjs +18 -0
  75. package/dist/client/productList-T2AZLFTP.mjs +18 -0
  76. package/dist/client/rendering/client.mjs +11763 -12445
  77. package/dist/client/rendering/islands.mjs +98 -21
  78. package/dist/client/rendering.mjs +46778 -47229
  79. package/dist/client/shop-UZ6IUZXD.mjs +20 -0
  80. package/dist/preview-next/before-render.mjs +37 -25
  81. package/dist/preview-next/client/runtime.mjs +5 -5
  82. package/dist/preview-next/middleware.mjs +37 -25
  83. package/dist/{sdk-runtime-OHNONZ5U.mjs → sdk-runtime-JCUQM63Y.mjs} +6 -6
  84. package/dist/server/components.mjs +409 -266
  85. package/dist/server/config-validation.mjs +49 -33
  86. package/dist/server/config.mjs +49 -33
  87. package/dist/server/data.mjs +49 -33
  88. package/dist/server/index.mjs +45 -33
  89. package/dist/server/next.mjs +405 -262
  90. package/dist/server/page-converter.mjs +12 -8
  91. package/dist/server/prebuild.mjs +1 -1
  92. package/dist/server/rendering/server.mjs +493 -265
  93. package/dist/server/rendering.mjs +411 -268
  94. package/dist/server/routing.mjs +49 -33
  95. package/dist/server/server.mjs +50 -34
  96. package/dist/server/theme-bridge.mjs +5 -0
  97. package/dist/styles/index.css +5 -0
  98. package/package.json +2 -1
  99. package/dist/SdkPreviewModeRuntime-CRYNDSPL.mjs +0 -8
  100. package/dist/client/bookingForm-4X77HKDS.mjs +0 -34
  101. package/dist/client/cart-JWD2VRFU.mjs +0 -11
  102. package/dist/client/checkout-V7KYGWL7.mjs +0 -11
  103. package/dist/client/chunk-5IYGMTUE.mjs +0 -18614
  104. package/dist/client/chunk-RKCFVIMS.mjs +0 -26
  105. package/dist/client/courseRegistration-O6ZPK4YT.mjs +0 -29
  106. package/dist/client/eventDetails-3WODIXET.mjs +0 -14
  107. package/dist/client/form-AKXQMY6Z.mjs +0 -85
  108. package/dist/client/headerSection-5KHCMU6B.mjs +0 -12
  109. package/dist/client/locationMap-7HIADW76.mjs +0 -14
  110. package/dist/client/newsletterForm-5N4YTMU3.mjs +0 -60
  111. package/dist/client/productDetail-IZUA7ZP3.mjs +0 -11
  112. package/dist/client/productList-KWIIJE6I.mjs +0 -11
  113. package/dist/client/shop-XZQFRQWZ.mjs +0 -13
@@ -1,26 +0,0 @@
1
- import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
2
- import { BlockApiProvider } from './chunk-5IYGMTUE.mjs';
3
- import { jsx } from 'react/jsx-runtime';
4
-
5
- function mountShopBlockIsland(root, props, Component, label) {
6
- const { siteId, apiBaseUrl, stage } = props;
7
- if (!siteId) {
8
- throw new Error(`[sdk:islands] ${label} requires siteId`);
9
- }
10
- if (!apiBaseUrl) {
11
- throw new Error(`[sdk:islands] ${label} requires apiBaseUrl`);
12
- }
13
- const apiConfig = {
14
- baseUrl: apiBaseUrl,
15
- auth: { type: "none" },
16
- siteId,
17
- isPreview: stage === "preview"
18
- };
19
- return mountReactIsland(root, ({ root: reactRoot }) => {
20
- reactRoot.render(
21
- /* @__PURE__ */ jsx(BlockApiProvider, { config: apiConfig, children: /* @__PURE__ */ jsx(Component, { ...props }) })
22
- );
23
- });
24
- }
25
-
26
- export { mountShopBlockIsland };
@@ -1,29 +0,0 @@
1
- import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
2
- import { BlockApiProvider, CourseRegistrationIslandClient } from './chunk-5IYGMTUE.mjs';
3
- import { defineIslandPropsDecoder } from './chunk-6VGXRE34.mjs';
4
- import './chunk-PMAIXMAB.mjs';
5
- import { jsx } from 'react/jsx-runtime';
6
-
7
- var decode = defineIslandPropsDecoder("course-registration");
8
- var enhance = (root, props) => {
9
- const { siteId, apiBaseUrl, stage, portalToken } = props;
10
- if (!siteId) {
11
- throw new Error("[sdk:islands] course-registration requires siteId");
12
- }
13
- if (!apiBaseUrl) {
14
- throw new Error("[sdk:islands] course-registration requires apiBaseUrl");
15
- }
16
- const apiConfig = {
17
- baseUrl: apiBaseUrl,
18
- auth: portalToken ? { type: "bearer", token: portalToken } : { type: "none" },
19
- siteId,
20
- isPreview: stage === "preview"
21
- };
22
- return mountReactIsland(root, ({ root: reactRoot }) => {
23
- reactRoot.render(
24
- /* @__PURE__ */ jsx(BlockApiProvider, { config: apiConfig, children: /* @__PURE__ */ jsx(CourseRegistrationIslandClient, { ...props }) })
25
- );
26
- });
27
- };
28
-
29
- export { decode, enhance };
@@ -1,14 +0,0 @@
1
- import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
2
- import { EventDetailsIslandClient } from './chunk-5IYGMTUE.mjs';
3
- import { defineIslandPropsDecoder } from './chunk-6VGXRE34.mjs';
4
- import './chunk-PMAIXMAB.mjs';
5
- import { jsx } from 'react/jsx-runtime';
6
-
7
- var decode = defineIslandPropsDecoder("event-details");
8
- var enhance = (root, props) => {
9
- return mountReactIsland(root, ({ root: reactRoot }) => {
10
- reactRoot.render(/* @__PURE__ */ jsx(EventDetailsIslandClient, { ...props }));
11
- });
12
- };
13
-
14
- export { decode, enhance };
@@ -1,85 +0,0 @@
1
- import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
2
- import { BlockApiProvider, FormNodeClient } from './chunk-5IYGMTUE.mjs';
3
- import { defineIslandPropsDecoder } from './chunk-6VGXRE34.mjs';
4
- import './chunk-PMAIXMAB.mjs';
5
- import { jsx } from 'react/jsx-runtime';
6
-
7
- var decode = defineIslandPropsDecoder("form");
8
- function snapshotFormValues(form) {
9
- if (!form) return [];
10
- const snapshots = [];
11
- const elements = Array.from(form.elements);
12
- for (const el of elements) {
13
- if (!(el instanceof HTMLInputElement || el instanceof HTMLTextAreaElement || el instanceof HTMLSelectElement)) {
14
- continue;
15
- }
16
- const name = el.name;
17
- if (!name) continue;
18
- if (el instanceof HTMLSelectElement && el.multiple) {
19
- const selected = Array.from(el.selectedOptions).map((o) => o.value);
20
- snapshots.push({ kind: "select-multiple", name, values: selected });
21
- continue;
22
- }
23
- if (el instanceof HTMLInputElement && (el.type === "checkbox" || el.type === "radio")) {
24
- snapshots.push({ kind: "checked", name, value: el.value, checked: el.checked });
25
- continue;
26
- }
27
- snapshots.push({ kind: "value", name, value: el.value });
28
- }
29
- return snapshots;
30
- }
31
- function applySnapshots(form, snapshots) {
32
- if (!form) return;
33
- for (const snapshot of snapshots) {
34
- if (snapshot.kind === "select-multiple") {
35
- const el2 = form.elements.namedItem(snapshot.name);
36
- if (!(el2 instanceof HTMLSelectElement) || !el2.multiple) continue;
37
- const selected = new Set(snapshot.values);
38
- Array.from(el2.options).forEach((opt) => {
39
- opt.selected = selected.has(opt.value);
40
- });
41
- continue;
42
- }
43
- const el = form.elements.namedItem(snapshot.name);
44
- if (snapshot.kind === "checked") {
45
- if (el instanceof RadioNodeList) {
46
- const inputs = Array.from(el).filter((i) => i instanceof HTMLInputElement);
47
- const match = inputs.find((i) => i.value === snapshot.value);
48
- if (match) match.checked = snapshot.checked;
49
- } else if (el instanceof HTMLInputElement) {
50
- if (el.type === "checkbox") el.checked = snapshot.checked;
51
- }
52
- continue;
53
- }
54
- if (el instanceof HTMLInputElement || el instanceof HTMLTextAreaElement || el instanceof HTMLSelectElement) {
55
- el.value = snapshot.value;
56
- }
57
- }
58
- }
59
- var enhance = (root, props) => {
60
- const { siteId, apiBaseUrl } = props;
61
- if (!siteId) {
62
- throw new Error("[sdk:islands] form requires siteId");
63
- }
64
- if (!apiBaseUrl) {
65
- throw new Error("[sdk:islands] form requires apiBaseUrl");
66
- }
67
- const apiConfig = {
68
- baseUrl: apiBaseUrl,
69
- auth: { type: "none" },
70
- siteId
71
- };
72
- const existingForm = root.querySelector("form");
73
- const snapshots = snapshotFormValues(existingForm);
74
- return mountReactIsland(root, ({ root: reactRoot }) => {
75
- reactRoot.render(
76
- /* @__PURE__ */ jsx(BlockApiProvider, { config: apiConfig, children: /* @__PURE__ */ jsx(FormNodeClient, { ...props }) })
77
- );
78
- requestAnimationFrame(() => {
79
- const nextForm = root.querySelector("form");
80
- applySnapshots(nextForm, snapshots);
81
- });
82
- });
83
- };
84
-
85
- export { decode, enhance };
@@ -1,12 +0,0 @@
1
- import { enhanceHeaderSection } from './chunk-5IYGMTUE.mjs';
2
- import { defineIslandPropsDecoder } from './chunk-6VGXRE34.mjs';
3
- import './chunk-PMAIXMAB.mjs';
4
-
5
- // src/rendering/islands/enhancers/headerSection.ts
6
- var decode = defineIslandPropsDecoder("headerSection");
7
- var enhance = (root, props) => {
8
- const scrollEnabled = typeof props?.scrollEnabled === "boolean" ? props.scrollEnabled : typeof props?.enabled === "boolean" ? props.enabled : void 0;
9
- return enhanceHeaderSection(root, { scrollEnabled });
10
- };
11
-
12
- export { decode, enhance };
@@ -1,14 +0,0 @@
1
- import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
2
- import { LocationMapIslandClient } from './chunk-5IYGMTUE.mjs';
3
- import { defineIslandPropsDecoder } from './chunk-6VGXRE34.mjs';
4
- import './chunk-PMAIXMAB.mjs';
5
- import { jsx } from 'react/jsx-runtime';
6
-
7
- var decode = defineIslandPropsDecoder("location-map");
8
- var enhance = (root, props) => {
9
- return mountReactIsland(root, ({ root: reactRoot }) => {
10
- reactRoot.render(/* @__PURE__ */ jsx(LocationMapIslandClient, { ...props }));
11
- });
12
- };
13
-
14
- export { decode, enhance };
@@ -1,60 +0,0 @@
1
- import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
2
- import { BlockApiProvider, NewsletterFormClient } from './chunk-5IYGMTUE.mjs';
3
- import { defineIslandPropsDecoder } from './chunk-6VGXRE34.mjs';
4
- import './chunk-PMAIXMAB.mjs';
5
- import { jsx } from 'react/jsx-runtime';
6
-
7
- var decode = defineIslandPropsDecoder("newsletter-form");
8
- function snapshotFormValues(form) {
9
- if (!form) return [];
10
- const snapshots = [];
11
- const elements = Array.from(form.elements);
12
- for (const el of elements) {
13
- if (!(el instanceof HTMLInputElement || el instanceof HTMLTextAreaElement)) {
14
- continue;
15
- }
16
- const name = el.name;
17
- if (!name) continue;
18
- snapshots.push({ name, value: el.value });
19
- }
20
- return snapshots;
21
- }
22
- function applySnapshots(form, snapshots) {
23
- if (!form) return;
24
- for (const snapshot of snapshots) {
25
- const el = form.elements.namedItem(snapshot.name);
26
- if (el instanceof HTMLInputElement || el instanceof HTMLTextAreaElement) {
27
- el.value = snapshot.value;
28
- }
29
- }
30
- }
31
- var enhance = (root, props) => {
32
- const { siteId, apiBaseUrl, render } = props;
33
- if (!siteId) {
34
- throw new Error("[sdk:islands] newsletter-form requires siteId");
35
- }
36
- if (!apiBaseUrl) {
37
- throw new Error("[sdk:islands] newsletter-form requires apiBaseUrl");
38
- }
39
- if (!render.hydration.listId) {
40
- throw new Error("[sdk:islands] newsletter-form requires listId");
41
- }
42
- const apiConfig = {
43
- baseUrl: apiBaseUrl,
44
- auth: { type: "none" },
45
- siteId
46
- };
47
- const existingForm = root.querySelector("form");
48
- const snapshots = snapshotFormValues(existingForm);
49
- return mountReactIsland(root, ({ root: reactRoot }) => {
50
- reactRoot.render(
51
- /* @__PURE__ */ jsx(BlockApiProvider, { config: apiConfig, children: /* @__PURE__ */ jsx(NewsletterFormClient, { ...props }) })
52
- );
53
- requestAnimationFrame(() => {
54
- const nextForm = root.querySelector("form");
55
- applySnapshots(nextForm, snapshots);
56
- });
57
- });
58
- };
59
-
60
- export { decode, enhance };
@@ -1,11 +0,0 @@
1
- import { mountShopBlockIsland } from './chunk-RKCFVIMS.mjs';
2
- import './chunk-N7PBWBWQ.mjs';
3
- import { ProductDetailClient } from './chunk-5IYGMTUE.mjs';
4
- import { defineIslandPropsDecoder } from './chunk-6VGXRE34.mjs';
5
- import './chunk-PMAIXMAB.mjs';
6
-
7
- // src/rendering/islands/enhancers/productDetail.tsx
8
- var decode = defineIslandPropsDecoder("product-detail");
9
- var enhance = (root, props) => mountShopBlockIsland(root, props, ProductDetailClient, "product-detail");
10
-
11
- export { decode, enhance };
@@ -1,11 +0,0 @@
1
- import { mountShopBlockIsland } from './chunk-RKCFVIMS.mjs';
2
- import './chunk-N7PBWBWQ.mjs';
3
- import { ProductListClient } from './chunk-5IYGMTUE.mjs';
4
- import { defineIslandPropsDecoder } from './chunk-6VGXRE34.mjs';
5
- import './chunk-PMAIXMAB.mjs';
6
-
7
- // src/rendering/islands/enhancers/productList.tsx
8
- var decode = defineIslandPropsDecoder("product-list");
9
- var enhance = (root, props) => mountShopBlockIsland(root, props, ProductListClient, "product-list");
10
-
11
- export { decode, enhance };
@@ -1,13 +0,0 @@
1
- import { mountShopBlockIsland } from './chunk-RKCFVIMS.mjs';
2
- import './chunk-N7PBWBWQ.mjs';
3
- import { ShopClient } from './chunk-5IYGMTUE.mjs';
4
- import { defineIslandPropsDecoder } from './chunk-6VGXRE34.mjs';
5
- import './chunk-PMAIXMAB.mjs';
6
-
7
- // src/rendering/islands/enhancers/shop.tsx
8
- var decode = defineIslandPropsDecoder("shop");
9
- var enhance = (root, props) => {
10
- return mountShopBlockIsland(root, props, ShopClient, "shop");
11
- };
12
-
13
- export { decode, enhance };