@bettercms-ai/sdk 1.26.3 → 1.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -527,7 +527,7 @@ declare class BetterCMSError extends Error {
|
|
|
527
527
|
* every published site while the builder happily offers it. `radio`/`checkboxes`
|
|
528
528
|
* were exactly that gap.
|
|
529
529
|
*/
|
|
530
|
-
type DeliveryFormFieldType = "text" | "email" | "phone" | "url" | "number" | "date" | "textarea" | "select" | "radio" | "checkboxes" | "checkbox" | "consent" | "hidden";
|
|
530
|
+
type DeliveryFormFieldType = "text" | "email" | "phone" | "url" | "number" | "date" | "textarea" | "select" | "radio" | "checkboxes" | "checkbox" | "consent" | "hidden" | "step";
|
|
531
531
|
interface DeliveryFormField {
|
|
532
532
|
key: string;
|
|
533
533
|
label: string;
|
|
@@ -792,6 +792,8 @@ interface ManagedComponentInput {
|
|
|
792
792
|
* variant family, which is started from it when it has none.
|
|
793
793
|
*/
|
|
794
794
|
variantOf?: string;
|
|
795
|
+
/** Create only: a built-in section id (`builtin:<key>`) to copy in; the fields you send win. */
|
|
796
|
+
from?: string;
|
|
795
797
|
/** Update only: prop chrome by prop path (`cta.label`). Any of these, or `override`, needs `ifMatch`. */
|
|
796
798
|
propUi?: Record<string, Record<string, unknown> | null>;
|
|
797
799
|
propGroup?: Record<string, Record<string, unknown> | null>;
|
package/dist/index.d.ts
CHANGED
|
@@ -527,7 +527,7 @@ declare class BetterCMSError extends Error {
|
|
|
527
527
|
* every published site while the builder happily offers it. `radio`/`checkboxes`
|
|
528
528
|
* were exactly that gap.
|
|
529
529
|
*/
|
|
530
|
-
type DeliveryFormFieldType = "text" | "email" | "phone" | "url" | "number" | "date" | "textarea" | "select" | "radio" | "checkboxes" | "checkbox" | "consent" | "hidden";
|
|
530
|
+
type DeliveryFormFieldType = "text" | "email" | "phone" | "url" | "number" | "date" | "textarea" | "select" | "radio" | "checkboxes" | "checkbox" | "consent" | "hidden" | "step";
|
|
531
531
|
interface DeliveryFormField {
|
|
532
532
|
key: string;
|
|
533
533
|
label: string;
|
|
@@ -792,6 +792,8 @@ interface ManagedComponentInput {
|
|
|
792
792
|
* variant family, which is started from it when it has none.
|
|
793
793
|
*/
|
|
794
794
|
variantOf?: string;
|
|
795
|
+
/** Create only: a built-in section id (`builtin:<key>`) to copy in; the fields you send win. */
|
|
796
|
+
from?: string;
|
|
795
797
|
/** Update only: prop chrome by prop path (`cta.label`). Any of these, or `override`, needs `ifMatch`. */
|
|
796
798
|
propUi?: Record<string, Record<string, unknown> | null>;
|
|
797
799
|
propGroup?: Record<string, Record<string, unknown> | null>;
|
package/dist/index.js
CHANGED
|
@@ -1302,6 +1302,8 @@ function createClient(options) {
|
|
|
1302
1302
|
metaDescription: d.metaDescription ?? null,
|
|
1303
1303
|
metaJson: d.metaJson ?? null,
|
|
1304
1304
|
blocks: d.blockJson ?? [],
|
|
1305
|
+
// C3: the DRAFT field styles, present only when the page styles a field.
|
|
1306
|
+
...d.fieldStyles ? { fieldStyles: d.fieldStyles } : {},
|
|
1305
1307
|
updatedAt: d.updatedAt ?? null,
|
|
1306
1308
|
publishedAt: d.publishedAt ?? null
|
|
1307
1309
|
};
|
|
@@ -1860,6 +1862,7 @@ function shouldShowField(field, values) {
|
|
|
1860
1862
|
function formInitialValues(form, prefill = {}) {
|
|
1861
1863
|
const values = {};
|
|
1862
1864
|
for (const field of form.fields) {
|
|
1865
|
+
if (field.type === "step") continue;
|
|
1863
1866
|
if (field.type === "checkbox" || field.type === "consent") {
|
|
1864
1867
|
values[field.key] = false;
|
|
1865
1868
|
} else if (field.type === "checkboxes") {
|