@netlisian/softconfig 0.1.3 → 0.1.5

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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["css-module:/media/manual_mount/osamuProjects/netlisian/packages/soft-config/src/puck/components/error-boundary/styles.module.css/#css-module-data","css-module:/media/manual_mount/osamuProjects/netlisian/packages/soft-config/src/puck/overrides/Header.module.css/#css-module-data","css-module:/media/manual_mount/osamuProjects/netlisian/packages/soft-config/src/puck/overrides/ActionBar.module.css/#css-module-data","css-module:/media/manual_mount/osamuProjects/netlisian/packages/soft-config/src/puck/overrides/DrawerItem.module.css/#css-module-data","css-module:/media/manual_mount/osamuProjects/netlisian/packages/soft-config/src/puck/components/modal/styles.module.css/#css-module-data","css-module:/media/manual_mount/osamuProjects/netlisian/packages/soft-config/src/puck/overrides/Drawer.module.css/#css-module-data"],"sourcesContent":["/* ErrorBoundary - Following SUIT CSS naming convention */\r\n\r\n._ErrorBoundary_1xl05_5 {\r\n padding: 20px;\r\n border: 1px solid #ff5858;\r\n border-radius: 4px;\r\n background-color: #fff0f0;\r\n margin: 10px 0;\r\n}\r\n\r\n._ErrorBoundary-title_1xl05_21 {\r\n color: #d32f2f;\r\n margin: 0 0 10px 0;\r\n}\r\n\r\n._ErrorBoundary-details_1xl05_31 {\r\n white-space: pre-wrap;\r\n}\r\n\r\n._ErrorBoundary-button_1xl05_39 {\r\n margin-top: 10px;\r\n padding: 5px 10px;\r\n background-color: #d32f2f;\r\n color: white;\r\n border: none;\r\n border-radius: 4px;\r\n cursor: pointer;\r\n}\r\n\r\n._ErrorBoundary-button_1xl05_39:hover {\r\n background-color: #b71c1c;\r\n}\r\n","._Header_19oj9_1 {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n gap: 0.5rem;\r\n flex-wrap: wrap;\r\n}\r\n","/* ActionBar - SUIT CSS naming convention (renamed from CustomActionBar) */\r\n\r\n._ActionBar_pvuie_5 {\r\n align-items: center;\r\n cursor: default;\r\n display: flex;\r\n width: auto;\r\n padding: 4px;\r\n padding-inline-start: 0;\r\n padding-inline-end: 0;\r\n border-top-left-radius: 8px;\r\n border-top-right-radius: 8px;\r\n border-radius: 8px;\r\n background: var(--puck-color-grey-01);\r\n color: var(--puck-color-white);\r\n font-family: var(--puck-font-family);\r\n min-height: 26px;\r\n}\r\n\r\n._ActionBar-label_pvuie_39 {\r\n color: var(--puck-color-grey-08);\r\n font-size: var(--puck-font-size-xxxs);\r\n font-weight: 500;\r\n padding-inline-start: 8px;\r\n padding-inline-end: 8px;\r\n margin-inline-start: 4px;\r\n margin-inline-end: 4px;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n._ActionBar-action_pvuie_63 + ._ActionBar-label_pvuie_39 {\r\n padding-inline-start: 0;\r\n}\r\n\r\n._ActionBar-label_pvuie_39 + ._ActionBar-action_pvuie_63 {\r\n margin-inline-start: -4px;\r\n}\r\n\r\n._ActionBar-group_pvuie_79 {\r\n align-items: center;\r\n border-inline-start: 0.5px solid var(--puck-color-grey-05);\r\n display: flex;\r\n height: 100%;\r\n padding-inline-start: 4px;\r\n padding-inline-end: 4px;\r\n}\r\n\r\n._ActionBar-group_pvuie_79:first-of-type {\r\n border-inline-start: 0;\r\n}\r\n\r\n._ActionBar-group_pvuie_79:empty {\r\n display: none;\r\n}\r\n\r\n._ActionBar-action_pvuie_63 {\r\n background: transparent;\r\n border: none;\r\n color: var(--puck-color-grey-08);\r\n cursor: pointer;\r\n padding: 6px 8px;\r\n margin-inline-start: 4px;\r\n margin-inline-end: 4px;\r\n border-radius: 4px;\r\n overflow: hidden;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: color 50ms ease-in;\r\n}\r\n\r\n._ActionBar-action_pvuie_63 svg {\r\n max-width: none !important;\r\n}\r\n\r\n._ActionBar-action_pvuie_63:focus-visible {\r\n outline: 2px solid var(--puck-color-azure-05);\r\n outline-offset: -2px;\r\n}\r\n\r\n@media (hover: hover) and (pointer: fine) {\r\n ._ActionBar-action_pvuie_63:hover {\r\n color: var(--puck-color-azure-06);\r\n transition: none;\r\n }\r\n}\r\n\r\n._ActionBar-action_pvuie_63:active {\r\n color: var(--puck-color-azure-07);\r\n transition: none;\r\n}\r\n\r\n._ActionBar-group_pvuie_79 * {\r\n margin: 0;\r\n}\r\n","._DrawerItem_182aj_1 {\n background: var(--puck-color-white);\n cursor: grab;\n border: 1px solid var(--puck-color-grey-09);\n font-size: var(--puck-font-size-xxs);\n border-radius: 4px;\n justify-content: space-between;\n align-items: center;\n padding: 12px;\n transition: background-color 50ms ease-in, color 50ms ease-in;\n display: flex;\n}\n\n._DrawerItem--insertDisabled_182aj_14 {\n cursor: not-allowed;\n color: var(--puck-color-grey-5);\n background: var(--puck-color-grey-11);\n pointer-events: none; /* Optional: prevents all interactions including settings */\n}\n\n._DrawerItem-content_182aj_21 {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 2px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow-x: hidden;\n}\n\n._DrawerItem-name_182aj_31 {\n font-weight: 400;\n}\n\n._DrawerItem-version_182aj_35 {\n font-size: 10px;\n color: var(--puck-color-grey-05);\n}\n\n._DrawerItem-actions_182aj_40 {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n._DrawerItem-settingsButton_182aj_46 {\n opacity: 0;\n transition: opacity 120ms ease;\n color: var(--puck-color-grey-05);\n}\n\n._DrawerItem_182aj_1:hover ._DrawerItem-settingsButton_182aj_46 {\n opacity: 1;\n}\n\n._DrawerItem-grip_182aj_56 {\n color: var(--puck-color-grey-05);\n display: flex;\n align-items: center;\n}\n\n/* Modal styles */\n._DrawerItem-modal_182aj_63 {\n background: var(--puck-color-white);\n display: flex;\n flex-direction: column;\n height: min(90dvh, 100%);\n min-height: 0;\n}\n\n._DrawerItem-modalHeader_182aj_71 {\n padding: 24px 32px;\n border-bottom: 1px solid var(--puck-color-grey-09);\n flex-shrink: 0;\n}\n\n._DrawerItem-modalTitle_182aj_77 {\n margin: 0 0 4px 0;\n font-size: 24px;\n font-weight: 600;\n color: var(--puck-color-black);\n}\n\n._DrawerItem-modalSubtitle_182aj_84 {\n margin: 0;\n font-size: 14px;\n color: var(--puck-color-grey-04);\n}\n\n._DrawerItem-modalBody_182aj_90 {\n flex: 1;\n min-height: 0;\n padding: 32px;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: 32px;\n}\n\n._DrawerItem-section_182aj_100 {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n._DrawerItem-sectionTitle_182aj_106 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--puck-color-black);\n}\n\n._DrawerItem-sectionDescription_182aj_113 {\n margin: 0;\n font-size: 14px;\n color: var(--puck-color-grey-04);\n}\n\n._DrawerItem-versionList_182aj_119 {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n._DrawerItem-versionRow_182aj_125 {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px;\n border-radius: 6px;\n border: 1px solid var(--puck-color-grey-09);\n background: var(--puck-color-white);\n transition: all 150ms ease;\n}\n\n._DrawerItem-versionRow--isDefault_182aj_136 {\n border-color: var(--puck-color-azure-07);\n background: var(--puck-color-azure-10);\n}\n\n._DrawerItem-versionRow--isMarkedForDeletion_182aj_141 {\n opacity: 0.6;\n background: var(--puck-color-grey-11);\n}\n\n._DrawerItem-versionInfo_182aj_146 {\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n}\n\n._DrawerItem-versionNumber_182aj_153 {\n font-size: 14px;\n font-weight: 500;\n color: var(--puck-color-black);\n}\n\n._DrawerItem-defaultBadge_182aj_159 {\n font-size: 11px;\n padding: 3px 8px;\n border-radius: 4px;\n background: var(--puck-color-azure-07);\n color: var(--puck-color-white);\n font-weight: 500;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n._DrawerItem-deleteBadge_182aj_170 {\n font-size: 11px;\n padding: 3px 8px;\n border-radius: 4px;\n background: var(--puck-color-grey-07);\n color: var(--puck-color-white);\n font-weight: 500;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n._DrawerItem-versionActions_182aj_181 {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n._DrawerItem-migrationOptions_182aj_187 {\n width: 100%;\n}\n\n._DrawerItem-migrationList_182aj_191 {\n display: flex;\n flex-direction: column;\n gap: 8px;\n max-height: 180px;\n overflow-y: auto;\n padding: 8px;\n border: 1px solid var(--puck-color-grey-09);\n border-radius: 6px;\n background: var(--puck-color-white);\n}\n\n._DrawerItem-migrationOption_182aj_187 {\n width: 100%;\n padding: 10px 12px;\n border: 1px solid var(--puck-color-grey-09);\n border-radius: 6px;\n font-size: 14px;\n background: var(--puck-color-white);\n color: var(--puck-color-black);\n cursor: pointer;\n transition: border-color 150ms ease;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n text-align: start;\n}\n\n._DrawerItem-migrationOption_182aj_187:hover {\n border-color: var(--puck-color-grey-07);\n}\n\n._DrawerItem-migrationOption_182aj_187:focus {\n outline: none;\n border-color: var(--puck-color-azure-07);\n}\n\n._DrawerItem-migrationOption--isSelected_182aj_229 {\n border-color: var(--puck-color-azure-07);\n background: var(--puck-color-azure-10);\n}\n\n._DrawerItem-migrationOptionLabel_182aj_234 {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n._DrawerItem-modalFooter_182aj_240 {\n padding: 20px 32px;\n border-top: 1px solid var(--puck-color-grey-09);\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: var(--puck-color-grey-11);\n flex-shrink: 0;\n}\n\n._DrawerItem-footerLeft_182aj_250 {\n display: flex;\n gap: 12px;\n}\n\n._DrawerItem-footerRight_182aj_255 {\n display: flex;\n gap: 12px;\n}\n","._Modal_1t9ot_1 {\r\n background: color-mix(in srgb, var(--puck-color-black) 75%, transparent);\r\n display: none;\r\n justify-content: center;\r\n align-items: center;\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n bottom: 0;\r\n right: 0;\r\n z-index: 1000;\r\n padding: 32px;\r\n}\r\n\r\n._Modal--isOpen_1t9ot_29 {\r\n display: flex;\r\n}\r\n\r\n._Modal-inner_1t9ot_37 {\r\n width: 100%;\r\n max-width: 1024px;\r\n border-radius: 8px;\r\n overflow: visible;\r\n background: var(--puck-color-white);\r\n display: flex;\r\n flex-direction: column;\r\n max-height: 90dvh;\r\n min-height: 0;\r\n}\r\n","._Drawer_12zq5_1 {\n display: flex;\n flex-direction: column;\n gap: 0;\n}\n\n._Drawer-category_12zq5_7 {\n max-width: 100%;\n}\n\n._Drawer-category_12zq5_7 + ._Drawer-category_12zq5_7 {\n margin-top: 4px;\n}\n\n._Drawer-category--isExpanded_12zq5_15 + ._Drawer-category_12zq5_7 {\n margin-top: 12px;\n}\n\n._Drawer-categoryContent_12zq5_19 {\n display: none;\n}\n\n._Drawer-category--isExpanded_12zq5_15 > ._Drawer-categoryContent_12zq5_19 {\n display: block;\n}\n\n._Drawer-categoryTitle_12zq5_27 {\n background-color: transparent;\n border: 0;\n color: var(--puck-color-grey-05);\n cursor: pointer;\n display: flex;\n font: inherit;\n font-size: var(--puck-font-size-xxxs);\n list-style: none;\n margin-bottom: 6px;\n padding: 8px;\n text-transform: uppercase;\n transition: background-color 50ms ease-in, color 50ms ease-in;\n gap: 4px;\n border-radius: 4px;\n width: 100%;\n}\n\n._Drawer-categoryTitle_12zq5_27:focus-visible {\n outline: 2px solid var(--puck-color-azure-05);\n outline-offset: 2px;\n}\n\n@media (hover: hover) and (pointer: fine) {\n ._Drawer-categoryTitle_12zq5_27:hover {\n background-color: var(--puck-color-azure-11);\n color: var(--puck-color-azure-04);\n transition: none;\n }\n}\n\n._Drawer-categoryTitle_12zq5_27:active {\n background-color: var(--puck-color-azure-10);\n transition: none;\n}\n\n._Drawer-categoryTitleIcon_12zq5_63 {\n margin-inline-start: auto;\n}\n"],"mappings":";AAEA,CAAC;AACC,WAAS;AACT,UAAQ,IAAI,MAAM;AAClB,iBAAe;AACf,oBAAkB;AAClB,UAAQ,KAAK;AACf;AAEA,CAAC;AACC,SAAO;AACP,UAAQ,EAAE,EAAE,KAAK;AACnB;AAEA,CAAC;AACC,eAAa;AACf;AAEA,CAAC;AACC,cAAY;AACZ,WAAS,IAAI;AACb,oBAAkB;AAClB,SAAO;AACP,UAAQ;AACR,iBAAe;AACf,UAAQ;AACV;AAEA,CAVC,8BAU8B;AAC7B,oBAAkB;AACpB;;;AC/BA,CAAC;AACC,WAAS;AACT,mBAAiB;AACjB,eAAa;AACb,OAAK;AACL,aAAW;AACb;;;ACJA,CAAC;AACC,eAAa;AACb,UAAQ;AACR,WAAS;AACT,SAAO;AACP,WAAS;AACT,wBAAsB;AACtB,sBAAoB;AACpB,0BAAwB;AACxB,2BAAyB;AACzB,iBAAe;AACf,cAAY,IAAI;AAChB,SAAO,IAAI;AACX,eAAa,IAAI;AACjB,cAAY;AACd;AAEA,CAAC;AACC,SAAO,IAAI;AACX,aAAW,IAAI;AACf,eAAa;AACb,wBAAsB;AACtB,sBAAoB;AACpB,uBAAqB;AACrB,qBAAmB;AACnB,iBAAe;AACf,eAAa;AACf;AAEA,CAAC,2BAA2B,EAAE,CAZ7B;AAaC,wBAAsB;AACxB;AAEA,CAhBC,0BAgB0B,EAAE,CAJ5B;AAKC,uBAAqB;AACvB;AAEA,CAAC;AACC,eAAa;AACb,uBAAqB,MAAM,MAAM,IAAI;AACrC,WAAS;AACT,UAAQ;AACR,wBAAsB;AACtB,sBAAoB;AACtB;AAEA,CATC,yBASyB;AACxB,uBAAqB;AACvB;AAEA,CAbC,yBAayB;AACxB,WAAS;AACX;AAEA,CAzBC;AA0BC,cAAY;AACZ,UAAQ;AACR,SAAO,IA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S;AACT,kBAAgB;AAChB,OAAK;AACP;AAEA,CAAC;AACC,aAAW;AACb;AAEA,CAJC,yBAIyB,EAAE,CAJ3B;AAKC,cAAY;AACd;AAEA,CAAC,sCAAsC,EAAE,CARxC;AASC,cAAY;AACd;AAEA,CAAC;AACC,WAAS;AACX;AAEA,CARC,sCAQsC,EAAE,CAJxC;AAKC,WAAS;AACX;AAEA,CAAC;AACC,oBAAkB;AAClB,UAAQ;AACR,SAAO,IAAI;AACX,UAAQ;AACR,WAAS;AACT,QAAM;AACN,aAAW,IAAI;AACf,cAAY;AACZ,iBAAe;AACf,WAAS;AACT,kBAAgB;AAChB,cAAY,iBAAiB,KAAK,OAAO,EAAE,MAAM,KAAK;AACtD,OAAK;AACL,iBAAe;AACf,SAAO;AACT;AAEA,CAlBC,8BAkB8B;AAC7B,WAAS,IAAI,MAAM,IAAI;AACvB,kBAAgB;AAClB;AAEA,OAAO,CAAC,KAAK,EAAE,OAAO,IAAI,CAAC,OAAO,EAAE;AAClC,GAxBD,8BAwBgC;AAC7B,sBAAkB,IAAI;AACtB,WAAO,IAAI;AACX,gBAAY;AACd;AACF;AAEA,CA/BC,8BA+B8B;AAC7B,oBAAkB,IAAI;AACtB,cAAY;AACd;AAEA,CAAC;AACC,uBAAqB;AACvB;","names":[]}
@@ -1,35 +1,104 @@
1
1
  import * as zustand from 'zustand';
2
2
  import { StoreApi } from 'zustand';
3
3
  import * as _measured_puck from '@measured/puck';
4
- import { DefaultComponentProps, Field, Config, Fields, History, AppState, PuckApi, ComponentData, ComponentConfig, RootData, AsFieldProps, WithChildren, Metadata, ResolveDataTrigger, PuckAction, Data } from '@measured/puck';
4
+ import { Field, Fields, Config, DefaultComponentProps, History, AppState, PuckApi, ComponentData, ComponentConfig, RootData, AsFieldProps, WithChildren, Metadata, ResolveDataTrigger, PuckAction, Data } from '@measured/puck';
5
5
  import * as React$1 from 'react';
6
6
  import React__default, { ReactNode, ReactElement } from 'react';
7
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
8
8
 
9
+ type BuiltInSoftFieldType = "text" | "textarea" | "number" | "select" | "radio" | "array" | "object" | "reference";
10
+ type SoftFieldType = BuiltInSoftFieldType | string;
11
+ type CustomFieldReturnType = "string" | "number" | "boolean" | "object" | "array";
12
+ type SoftFieldDefinition = {
13
+ name: string;
14
+ type: SoftFieldType;
15
+ };
16
+ type FieldOption = {
17
+ label: string;
18
+ value: string | number | boolean | object | null | undefined;
19
+ };
20
+ interface SharedFieldSettings<TSubFieldSettings> {
21
+ defaultValue?: unknown;
22
+ min?: number;
23
+ max?: number;
24
+ step?: number;
25
+ options?: FieldOption[];
26
+ summary?: string;
27
+ summaryField?: string;
28
+ summaryExpression?: string;
29
+ subFields?: SoftFieldDefinition[];
30
+ subFieldSettings?: TSubFieldSettings;
31
+ customFieldType?: string;
32
+ customFieldReturnType?: CustomFieldReturnType;
33
+ }
34
+ interface SoftFieldSettingsEntry extends SharedFieldSettings<SoftFieldSettings> {
35
+ }
36
+ type SoftFieldSettings = Record<string, SoftFieldSettingsEntry>;
37
+ interface FieldSettingsEntry extends SharedFieldSettings<FieldSettings> {
38
+ label: string;
39
+ }
40
+ type FieldSettings = Record<string, FieldSettingsEntry>;
41
+ type CustomFieldSettingsOverrideProps = {
42
+ fieldName: string;
43
+ fieldType: string;
44
+ fieldSettings?: SoftFieldSettingsEntry;
45
+ originalFieldSettings: Fields;
46
+ };
47
+ type CustomFieldDefinition = {
48
+ field: Field;
49
+ returnType: CustomFieldReturnType;
50
+ subFields?: SoftFieldDefinition[];
51
+ subFieldSettings?: SoftFieldSettings;
52
+ fieldSettingsOverride?: (props: CustomFieldSettingsOverrideProps) => Fields;
53
+ };
54
+ type CustomFields = Record<string, CustomFieldDefinition>;
55
+
56
+ type MapEntry = {
57
+ mode?: "simple" | "cva";
58
+ from?: string | string[];
59
+ to?: string | string[];
60
+ cva?: {
61
+ base?: string;
62
+ variants?: Array<{
63
+ fieldId?: string;
64
+ classes?: Record<string, string>;
65
+ }>;
66
+ };
67
+ transform?: (values: unknown[], props: Record<string, unknown>) => unknown;
68
+ unmappedArrayItemDefaultValues?: Record<string, unknown>;
69
+ /** @deprecated in favour of unmappedArrayItemDefaultValues – kept for back-compat */
70
+ defaultOverrides?: Record<string, unknown>;
71
+ };
72
+ type ApplyMappingResult = {
73
+ newProps: Record<string, unknown>;
74
+ mappedArrayPaths: Set<string>;
75
+ changed: boolean;
76
+ };
77
+ type ApplyMappingOptions = {
78
+ sourceProps?: Record<string, unknown>;
79
+ arrayDefaults?: Record<string, unknown[]>;
80
+ };
81
+ type MappingOption = {
82
+ label: string;
83
+ value: string;
84
+ type: Field["type"] | "reference";
85
+ };
86
+
9
87
  type BuilderRootConfig = {
10
88
  _name: string;
11
89
  _category?: string;
12
90
  _version?: string;
13
91
  _versions?: string[];
14
- _fields?: {
15
- name: string;
16
- type: Field["type"];
17
- }[];
18
- _fieldSettings?: {
19
- [key: string]: any;
20
- };
92
+ _fields?: SoftFieldDefinition[];
93
+ _fieldSettings?: SoftFieldSettings;
94
+ [key: string]: unknown;
21
95
  };
22
96
  type BuilderComponentConfig = {
23
97
  _slot?: {
24
98
  slot: string;
25
99
  }[];
26
- _map?: {
27
- to: string | string[];
28
- from: string | string[];
29
- transform?: (inputs: any[], props: DefaultComponentProps) => any;
30
- [key: string]: any;
31
- }[];
32
- [key: string]: any;
100
+ _map?: MapEntry[];
101
+ [key: string]: unknown;
33
102
  };
34
103
  type BuilderConfig = Config<any, BuilderRootConfig>;
35
104
 
@@ -49,8 +118,9 @@ type SoftComponent = {
49
118
  name: string;
50
119
  category?: string;
51
120
  fields: Fields;
52
- fieldSettings?: Record<string, any>;
121
+ fieldSettings?: SoftFieldSettings;
53
122
  defaultProps: DefaultComponentProps;
123
+ rootProps?: Record<string, unknown>;
54
124
  components: SoftSubComponent;
55
125
  slots: {
56
126
  [slot: string]: DefaultComponentProps;
@@ -63,8 +133,9 @@ type VersionedSoftComponent = {
63
133
  versions: {
64
134
  [version: string]: {
65
135
  fields: Fields;
66
- fieldSettings?: Record<string, any>;
136
+ fieldSettings?: SoftFieldSettings;
67
137
  defaultProps: DefaultComponentProps;
138
+ rootProps?: Record<string, unknown>;
68
139
  components: SoftSubComponent;
69
140
  slots: {
70
141
  [slot: string]: DefaultComponentProps;
@@ -229,28 +300,21 @@ type ActionEventPayload = {
229
300
  };
230
301
  type OnActionsCallback = (event: ActionEventPayload) => void | Promise<void>;
231
302
 
232
- type RenderFunc<Props extends {
233
- [key: string]: any;
234
- } = {
303
+ type RenderFunc<Props extends Record<string, unknown> = {
235
304
  children: ReactNode;
236
305
  }> = (props: Props) => ReactElement;
237
306
  type Overrides = {
238
- componentNameToKey?: (displayName: string, context: {
307
+ componentNameToKey?: (displayName: string, context: Partial<BuilderRootConfig> & {
239
308
  existingKeys: string[];
240
309
  state: "building" | "remodeling" | "ready" | "inspecting";
241
310
  }) => string;
311
+ componentKeyToName?: (key: string) => string;
312
+ onRemodel?: (key: string) => Record<string, unknown>;
313
+ additionalRootFields?: Record<string, Field>;
242
314
  map?: RenderFunc<{
243
315
  rootProps: BuilderRootConfig;
244
- toOptions: {
245
- label: string;
246
- value: string;
247
- type: Field["type"] | "reference";
248
- }[];
249
- fromOptions: {
250
- label: string;
251
- value: string;
252
- type: Field["type"] | "reference";
253
- }[];
316
+ toOptions: MappingOption[];
317
+ fromOptions: MappingOption[];
254
318
  props: DefaultComponentProps;
255
319
  value: BuilderComponentConfig["_map"];
256
320
  onChange: (value: BuilderComponentConfig["_map"]) => void;
@@ -261,18 +325,23 @@ type Overrides = {
261
325
  version: string;
262
326
  subComponentPath: string[];
263
327
  softComponent: VersionedSoftComponent["versions"][string];
264
- }) => ((inputs: any[], props: DefaultComponentProps) => any) | undefined;
328
+ }) => ((inputs: unknown[], props: Record<string, unknown>) => unknown) | undefined;
265
329
  onActions?: OnActionsCallback;
266
330
  name?: Field<string>;
267
331
  categories?: Field<string | undefined>;
268
- onRootsDataChange?: (data: RootData<AsFieldProps<WithChildren<BuilderRootConfig>>>, params: {
332
+ resolveRootData?: (props: RootData<AsFieldProps<WithChildren<BuilderRootConfig>>>, params: {
269
333
  changed: Partial<Record<keyof BuilderRootConfig, boolean> & {
270
334
  id: string;
271
335
  }>;
272
336
  lastData: RootData<AsFieldProps<WithChildren<BuilderRootConfig>>> | null;
273
337
  metadata: Metadata;
274
338
  trigger: ResolveDataTrigger;
275
- }) => void;
339
+ }, context: {
340
+ editingComponent?: string;
341
+ }) => {
342
+ props: RootData<AsFieldProps<WithChildren<BuilderRootConfig>>> | Promise<RootData<AsFieldProps<WithChildren<BuilderRootConfig>>>>;
343
+ readOnly: Readonly<Record<string, boolean>> | undefined;
344
+ };
276
345
  };
277
346
 
278
347
  type Status = "building" | "remodeling" | "ready" | "inspecting";
@@ -284,6 +353,7 @@ type AppStore = {
284
353
  originalHistory: History[];
285
354
  storedConfig?: Config;
286
355
  overrides: Overrides;
356
+ customFields: CustomFields;
287
357
  onActions?: OnActionsCallback;
288
358
  itemSelector: {
289
359
  index: number;
@@ -313,6 +383,7 @@ type AppStore = {
313
383
  hydrateTransforms: () => void;
314
384
  setSoftComponentDefaultVersion: (key: string, version: string) => void;
315
385
  removeSoftComponent: (key: string) => void;
386
+ editingComponent: string | null;
316
387
  editingComponentId: string | null;
317
388
  editableComponentIds: Set<string>;
318
389
  setEditableComponentIds: (ids: Set<string>) => void;
@@ -356,7 +427,7 @@ type AppStore = {
356
427
  setShowVersionFields: (show: boolean) => void;
357
428
  };
358
429
  type AppStoreApi = StoreApi<AppStore>;
359
- declare const createSoftConfigStore: (hardConfig?: Config, softComponents?: SoftComponents, overrides?: Overrides, onActions?: OnActionsCallback, showVersionFields?: boolean) => zustand.UseBoundStore<Omit<StoreApi<AppStore>, "subscribe"> & {
430
+ declare const createSoftConfigStore: (hardConfig?: Config, softComponents?: SoftComponents, overrides?: Overrides, onActions?: OnActionsCallback, showVersionFields?: boolean, customFields?: CustomFields) => zustand.UseBoundStore<Omit<StoreApi<AppStore>, "subscribe"> & {
360
431
  subscribe: {
361
432
  (listener: (selectedState: AppStore, previousSelectedState: AppStore) => void): () => void;
362
433
  <U>(selector: (state: AppStore) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
@@ -366,10 +437,11 @@ declare const createSoftConfigStore: (hardConfig?: Config, softComponents?: Soft
366
437
  };
367
438
  }>;
368
439
 
369
- declare const SoftConfigProvider: ({ children, hardConfig, softComponents, overrides, value, onActions, useVersioning, }: {
440
+ declare const SoftConfigProvider: ({ children, hardConfig, softComponents, customFields, overrides, value, onActions, useVersioning, }: {
370
441
  children: (softConfig: Config, softComponents: SoftComponents, iframeDoc: AppStore["setIframeDoc"], validateAction: (action: PuckAction) => boolean) => ReactNode;
371
442
  hardConfig: Config;
372
443
  softComponents: SoftComponents;
444
+ customFields?: CustomFields;
373
445
  overrides?: Overrides;
374
446
  value?: StoreApi<AppStore>;
375
447
  onActions?: OnActionsCallback;
@@ -390,8 +462,9 @@ declare const useRemodel: () => {
390
462
  version: string;
391
463
  softComponent: {
392
464
  fields: _measured_puck.Fields;
393
- fieldSettings?: Record<string, any>;
465
+ fieldSettings?: SoftFieldSettings;
394
466
  defaultProps: DefaultComponentProps;
467
+ rootProps?: Record<string, unknown>;
395
468
  components: SoftSubComponent;
396
469
  slots: {
397
470
  [slot: string]: DefaultComponentProps;
@@ -449,11 +522,13 @@ declare const ActionBarOverride: (props: {
449
522
 
450
523
  declare const DrawerItem: (props: {
451
524
  name: string;
525
+ label?: string;
452
526
  children: React.ReactNode;
453
527
  }) => React.ReactElement;
454
528
  /** @deprecated Use DrawerItem instead */
455
529
  declare const ComponentItem: (props: {
456
530
  name: string;
531
+ label?: string;
457
532
  children: React.ReactNode;
458
533
  }) => React.ReactElement;
459
534
 
@@ -528,4 +603,45 @@ declare const Modal: ({ children, onClose, isOpen, }: {
528
603
  isOpen: boolean;
529
604
  }) => react_jsx_runtime.JSX.Element;
530
605
 
531
- export { ActionBarOverride as ActionBar, type ActionEventPayload, type AppStore, type AppStoreApi, type BuilderComponentConfig, type BuilderConfig, type BuilderRootConfig, ComponentItem, Drawer as ComponentList, Drawer, DrawerItem, Header, Modal, type OnActionsCallback, type Overrides, type SoftComponent, type SoftComponents, SoftConfigProvider, type VersionedSoftComponent, confirm, createActionCallback, createSoftConfigStore, createUseSoftConfig, notify, resolveSoftConfig, setConfirmHandler, setNotificationHandler, useBuild, useCancel, useComplete, useDecompose, useDemolish, useInspect, useRemodel, useSetDefaultVersion, useSoftConfig };
606
+ /**
607
+ * Filters toOptions based on the selected fromPath.
608
+ * - If fromPath contains an array segment, only return array-path to-options.
609
+ * - If fromPath is a bare array, only return bare array to-options.
610
+ * - Otherwise, hide array-path to-options (prevent array-to-scalar mismatches).
611
+ */
612
+ declare function filterToOptionsForFrom(fromPath: string | undefined, toOptions: MappingOption[]): MappingOption[];
613
+
614
+ /**
615
+ * Shared helper: evaluates `_map` entries and applies mapped values to component props.
616
+ *
617
+ * Used by both the live builder effect (root-config.tsx) and the runtime
618
+ * resolver (resolve-soft-component-data.ts) so the logic stays in one place.
619
+ *
620
+ * Array construction order (for array targets like `items[].imageUrl`):
621
+ * 1. Start from `unmappedArrayItemDefaultValues` on the map entry (initially populated
622
+ * from the component's `defaultItemProps`). These are the single source of
623
+ * truth for the item "template".
624
+ * 2. Overlay the mapped value for each array index.
625
+ * The result is a freshly-constructed array whose length equals the mapped
626
+ * source array and whose unmapped props come from the defaults above.
627
+ */
628
+
629
+ declare const resolveValueByPath: (source: any, path: string) => any;
630
+ /**
631
+ * Evaluate every `_map` entry and apply the results to `props`.
632
+ *
633
+ * @param props The component props to mutate (caller should pass a shallow copy).
634
+ * @param fieldSettings Root-level `_fieldSettings` for resolving `from` paths.
635
+ * @param map The `_map` array from the component.
636
+ * @param resolveInput Strategy for resolving `from` values. Two modes:
637
+ * - `"fieldSettings"` (builder): read from `fieldSettings` only.
638
+ * - `"propsFirst"` (runtime): prefer live prop values, fall back
639
+ * to fieldSettings `defaultValue`.
640
+ */
641
+ declare function applyMapping(props: Record<string, any>, fieldSettings: Record<string, any>, map: MapEntry[], resolveInput?: "fieldSettings" | "propsFirst", options?: ApplyMappingOptions): ApplyMappingResult;
642
+
643
+ declare const isArrayMappingPath: (path: string) => boolean;
644
+ declare const getArrayBasePath: (arrayPath: string) => string | null;
645
+ declare const getArrayItemSubPath: (arrayPath: string) => string | null;
646
+
647
+ export { ActionBarOverride as ActionBar, type ActionEventPayload, type AppStore, type AppStoreApi, type ApplyMappingOptions, type ApplyMappingResult, type BuilderComponentConfig, type BuilderConfig, type BuilderRootConfig, ComponentItem, Drawer as ComponentList, type CustomFieldDefinition, type CustomFieldReturnType, type CustomFields, Drawer, DrawerItem, type FieldSettings, Header, type MapEntry, Modal, type OnActionsCallback, type Overrides, type SoftComponent, type SoftComponents, SoftConfigProvider, type SoftFieldDefinition, type SoftFieldSettings, type VersionedSoftComponent, applyMapping, confirm, createActionCallback, createSoftConfigStore, createUseSoftConfig, filterToOptionsForFrom, getArrayBasePath, getArrayItemSubPath, isArrayMappingPath, notify, resolveSoftConfig, resolveValueByPath, setConfirmHandler, setNotificationHandler, useBuild, useCancel, useComplete, useDecompose, useDemolish, useInspect, useRemodel, useSetDefaultVersion, useSoftConfig };
@@ -1,35 +1,104 @@
1
1
  import * as zustand from 'zustand';
2
2
  import { StoreApi } from 'zustand';
3
3
  import * as _measured_puck from '@measured/puck';
4
- import { DefaultComponentProps, Field, Config, Fields, History, AppState, PuckApi, ComponentData, ComponentConfig, RootData, AsFieldProps, WithChildren, Metadata, ResolveDataTrigger, PuckAction, Data } from '@measured/puck';
4
+ import { Field, Fields, Config, DefaultComponentProps, History, AppState, PuckApi, ComponentData, ComponentConfig, RootData, AsFieldProps, WithChildren, Metadata, ResolveDataTrigger, PuckAction, Data } from '@measured/puck';
5
5
  import * as React$1 from 'react';
6
6
  import React__default, { ReactNode, ReactElement } from 'react';
7
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
8
8
 
9
+ type BuiltInSoftFieldType = "text" | "textarea" | "number" | "select" | "radio" | "array" | "object" | "reference";
10
+ type SoftFieldType = BuiltInSoftFieldType | string;
11
+ type CustomFieldReturnType = "string" | "number" | "boolean" | "object" | "array";
12
+ type SoftFieldDefinition = {
13
+ name: string;
14
+ type: SoftFieldType;
15
+ };
16
+ type FieldOption = {
17
+ label: string;
18
+ value: string | number | boolean | object | null | undefined;
19
+ };
20
+ interface SharedFieldSettings<TSubFieldSettings> {
21
+ defaultValue?: unknown;
22
+ min?: number;
23
+ max?: number;
24
+ step?: number;
25
+ options?: FieldOption[];
26
+ summary?: string;
27
+ summaryField?: string;
28
+ summaryExpression?: string;
29
+ subFields?: SoftFieldDefinition[];
30
+ subFieldSettings?: TSubFieldSettings;
31
+ customFieldType?: string;
32
+ customFieldReturnType?: CustomFieldReturnType;
33
+ }
34
+ interface SoftFieldSettingsEntry extends SharedFieldSettings<SoftFieldSettings> {
35
+ }
36
+ type SoftFieldSettings = Record<string, SoftFieldSettingsEntry>;
37
+ interface FieldSettingsEntry extends SharedFieldSettings<FieldSettings> {
38
+ label: string;
39
+ }
40
+ type FieldSettings = Record<string, FieldSettingsEntry>;
41
+ type CustomFieldSettingsOverrideProps = {
42
+ fieldName: string;
43
+ fieldType: string;
44
+ fieldSettings?: SoftFieldSettingsEntry;
45
+ originalFieldSettings: Fields;
46
+ };
47
+ type CustomFieldDefinition = {
48
+ field: Field;
49
+ returnType: CustomFieldReturnType;
50
+ subFields?: SoftFieldDefinition[];
51
+ subFieldSettings?: SoftFieldSettings;
52
+ fieldSettingsOverride?: (props: CustomFieldSettingsOverrideProps) => Fields;
53
+ };
54
+ type CustomFields = Record<string, CustomFieldDefinition>;
55
+
56
+ type MapEntry = {
57
+ mode?: "simple" | "cva";
58
+ from?: string | string[];
59
+ to?: string | string[];
60
+ cva?: {
61
+ base?: string;
62
+ variants?: Array<{
63
+ fieldId?: string;
64
+ classes?: Record<string, string>;
65
+ }>;
66
+ };
67
+ transform?: (values: unknown[], props: Record<string, unknown>) => unknown;
68
+ unmappedArrayItemDefaultValues?: Record<string, unknown>;
69
+ /** @deprecated in favour of unmappedArrayItemDefaultValues – kept for back-compat */
70
+ defaultOverrides?: Record<string, unknown>;
71
+ };
72
+ type ApplyMappingResult = {
73
+ newProps: Record<string, unknown>;
74
+ mappedArrayPaths: Set<string>;
75
+ changed: boolean;
76
+ };
77
+ type ApplyMappingOptions = {
78
+ sourceProps?: Record<string, unknown>;
79
+ arrayDefaults?: Record<string, unknown[]>;
80
+ };
81
+ type MappingOption = {
82
+ label: string;
83
+ value: string;
84
+ type: Field["type"] | "reference";
85
+ };
86
+
9
87
  type BuilderRootConfig = {
10
88
  _name: string;
11
89
  _category?: string;
12
90
  _version?: string;
13
91
  _versions?: string[];
14
- _fields?: {
15
- name: string;
16
- type: Field["type"];
17
- }[];
18
- _fieldSettings?: {
19
- [key: string]: any;
20
- };
92
+ _fields?: SoftFieldDefinition[];
93
+ _fieldSettings?: SoftFieldSettings;
94
+ [key: string]: unknown;
21
95
  };
22
96
  type BuilderComponentConfig = {
23
97
  _slot?: {
24
98
  slot: string;
25
99
  }[];
26
- _map?: {
27
- to: string | string[];
28
- from: string | string[];
29
- transform?: (inputs: any[], props: DefaultComponentProps) => any;
30
- [key: string]: any;
31
- }[];
32
- [key: string]: any;
100
+ _map?: MapEntry[];
101
+ [key: string]: unknown;
33
102
  };
34
103
  type BuilderConfig = Config<any, BuilderRootConfig>;
35
104
 
@@ -49,8 +118,9 @@ type SoftComponent = {
49
118
  name: string;
50
119
  category?: string;
51
120
  fields: Fields;
52
- fieldSettings?: Record<string, any>;
121
+ fieldSettings?: SoftFieldSettings;
53
122
  defaultProps: DefaultComponentProps;
123
+ rootProps?: Record<string, unknown>;
54
124
  components: SoftSubComponent;
55
125
  slots: {
56
126
  [slot: string]: DefaultComponentProps;
@@ -63,8 +133,9 @@ type VersionedSoftComponent = {
63
133
  versions: {
64
134
  [version: string]: {
65
135
  fields: Fields;
66
- fieldSettings?: Record<string, any>;
136
+ fieldSettings?: SoftFieldSettings;
67
137
  defaultProps: DefaultComponentProps;
138
+ rootProps?: Record<string, unknown>;
68
139
  components: SoftSubComponent;
69
140
  slots: {
70
141
  [slot: string]: DefaultComponentProps;
@@ -229,28 +300,21 @@ type ActionEventPayload = {
229
300
  };
230
301
  type OnActionsCallback = (event: ActionEventPayload) => void | Promise<void>;
231
302
 
232
- type RenderFunc<Props extends {
233
- [key: string]: any;
234
- } = {
303
+ type RenderFunc<Props extends Record<string, unknown> = {
235
304
  children: ReactNode;
236
305
  }> = (props: Props) => ReactElement;
237
306
  type Overrides = {
238
- componentNameToKey?: (displayName: string, context: {
307
+ componentNameToKey?: (displayName: string, context: Partial<BuilderRootConfig> & {
239
308
  existingKeys: string[];
240
309
  state: "building" | "remodeling" | "ready" | "inspecting";
241
310
  }) => string;
311
+ componentKeyToName?: (key: string) => string;
312
+ onRemodel?: (key: string) => Record<string, unknown>;
313
+ additionalRootFields?: Record<string, Field>;
242
314
  map?: RenderFunc<{
243
315
  rootProps: BuilderRootConfig;
244
- toOptions: {
245
- label: string;
246
- value: string;
247
- type: Field["type"] | "reference";
248
- }[];
249
- fromOptions: {
250
- label: string;
251
- value: string;
252
- type: Field["type"] | "reference";
253
- }[];
316
+ toOptions: MappingOption[];
317
+ fromOptions: MappingOption[];
254
318
  props: DefaultComponentProps;
255
319
  value: BuilderComponentConfig["_map"];
256
320
  onChange: (value: BuilderComponentConfig["_map"]) => void;
@@ -261,18 +325,23 @@ type Overrides = {
261
325
  version: string;
262
326
  subComponentPath: string[];
263
327
  softComponent: VersionedSoftComponent["versions"][string];
264
- }) => ((inputs: any[], props: DefaultComponentProps) => any) | undefined;
328
+ }) => ((inputs: unknown[], props: Record<string, unknown>) => unknown) | undefined;
265
329
  onActions?: OnActionsCallback;
266
330
  name?: Field<string>;
267
331
  categories?: Field<string | undefined>;
268
- onRootsDataChange?: (data: RootData<AsFieldProps<WithChildren<BuilderRootConfig>>>, params: {
332
+ resolveRootData?: (props: RootData<AsFieldProps<WithChildren<BuilderRootConfig>>>, params: {
269
333
  changed: Partial<Record<keyof BuilderRootConfig, boolean> & {
270
334
  id: string;
271
335
  }>;
272
336
  lastData: RootData<AsFieldProps<WithChildren<BuilderRootConfig>>> | null;
273
337
  metadata: Metadata;
274
338
  trigger: ResolveDataTrigger;
275
- }) => void;
339
+ }, context: {
340
+ editingComponent?: string;
341
+ }) => {
342
+ props: RootData<AsFieldProps<WithChildren<BuilderRootConfig>>> | Promise<RootData<AsFieldProps<WithChildren<BuilderRootConfig>>>>;
343
+ readOnly: Readonly<Record<string, boolean>> | undefined;
344
+ };
276
345
  };
277
346
 
278
347
  type Status = "building" | "remodeling" | "ready" | "inspecting";
@@ -284,6 +353,7 @@ type AppStore = {
284
353
  originalHistory: History[];
285
354
  storedConfig?: Config;
286
355
  overrides: Overrides;
356
+ customFields: CustomFields;
287
357
  onActions?: OnActionsCallback;
288
358
  itemSelector: {
289
359
  index: number;
@@ -313,6 +383,7 @@ type AppStore = {
313
383
  hydrateTransforms: () => void;
314
384
  setSoftComponentDefaultVersion: (key: string, version: string) => void;
315
385
  removeSoftComponent: (key: string) => void;
386
+ editingComponent: string | null;
316
387
  editingComponentId: string | null;
317
388
  editableComponentIds: Set<string>;
318
389
  setEditableComponentIds: (ids: Set<string>) => void;
@@ -356,7 +427,7 @@ type AppStore = {
356
427
  setShowVersionFields: (show: boolean) => void;
357
428
  };
358
429
  type AppStoreApi = StoreApi<AppStore>;
359
- declare const createSoftConfigStore: (hardConfig?: Config, softComponents?: SoftComponents, overrides?: Overrides, onActions?: OnActionsCallback, showVersionFields?: boolean) => zustand.UseBoundStore<Omit<StoreApi<AppStore>, "subscribe"> & {
430
+ declare const createSoftConfigStore: (hardConfig?: Config, softComponents?: SoftComponents, overrides?: Overrides, onActions?: OnActionsCallback, showVersionFields?: boolean, customFields?: CustomFields) => zustand.UseBoundStore<Omit<StoreApi<AppStore>, "subscribe"> & {
360
431
  subscribe: {
361
432
  (listener: (selectedState: AppStore, previousSelectedState: AppStore) => void): () => void;
362
433
  <U>(selector: (state: AppStore) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
@@ -366,10 +437,11 @@ declare const createSoftConfigStore: (hardConfig?: Config, softComponents?: Soft
366
437
  };
367
438
  }>;
368
439
 
369
- declare const SoftConfigProvider: ({ children, hardConfig, softComponents, overrides, value, onActions, useVersioning, }: {
440
+ declare const SoftConfigProvider: ({ children, hardConfig, softComponents, customFields, overrides, value, onActions, useVersioning, }: {
370
441
  children: (softConfig: Config, softComponents: SoftComponents, iframeDoc: AppStore["setIframeDoc"], validateAction: (action: PuckAction) => boolean) => ReactNode;
371
442
  hardConfig: Config;
372
443
  softComponents: SoftComponents;
444
+ customFields?: CustomFields;
373
445
  overrides?: Overrides;
374
446
  value?: StoreApi<AppStore>;
375
447
  onActions?: OnActionsCallback;
@@ -390,8 +462,9 @@ declare const useRemodel: () => {
390
462
  version: string;
391
463
  softComponent: {
392
464
  fields: _measured_puck.Fields;
393
- fieldSettings?: Record<string, any>;
465
+ fieldSettings?: SoftFieldSettings;
394
466
  defaultProps: DefaultComponentProps;
467
+ rootProps?: Record<string, unknown>;
395
468
  components: SoftSubComponent;
396
469
  slots: {
397
470
  [slot: string]: DefaultComponentProps;
@@ -449,11 +522,13 @@ declare const ActionBarOverride: (props: {
449
522
 
450
523
  declare const DrawerItem: (props: {
451
524
  name: string;
525
+ label?: string;
452
526
  children: React.ReactNode;
453
527
  }) => React.ReactElement;
454
528
  /** @deprecated Use DrawerItem instead */
455
529
  declare const ComponentItem: (props: {
456
530
  name: string;
531
+ label?: string;
457
532
  children: React.ReactNode;
458
533
  }) => React.ReactElement;
459
534
 
@@ -528,4 +603,45 @@ declare const Modal: ({ children, onClose, isOpen, }: {
528
603
  isOpen: boolean;
529
604
  }) => react_jsx_runtime.JSX.Element;
530
605
 
531
- export { ActionBarOverride as ActionBar, type ActionEventPayload, type AppStore, type AppStoreApi, type BuilderComponentConfig, type BuilderConfig, type BuilderRootConfig, ComponentItem, Drawer as ComponentList, Drawer, DrawerItem, Header, Modal, type OnActionsCallback, type Overrides, type SoftComponent, type SoftComponents, SoftConfigProvider, type VersionedSoftComponent, confirm, createActionCallback, createSoftConfigStore, createUseSoftConfig, notify, resolveSoftConfig, setConfirmHandler, setNotificationHandler, useBuild, useCancel, useComplete, useDecompose, useDemolish, useInspect, useRemodel, useSetDefaultVersion, useSoftConfig };
606
+ /**
607
+ * Filters toOptions based on the selected fromPath.
608
+ * - If fromPath contains an array segment, only return array-path to-options.
609
+ * - If fromPath is a bare array, only return bare array to-options.
610
+ * - Otherwise, hide array-path to-options (prevent array-to-scalar mismatches).
611
+ */
612
+ declare function filterToOptionsForFrom(fromPath: string | undefined, toOptions: MappingOption[]): MappingOption[];
613
+
614
+ /**
615
+ * Shared helper: evaluates `_map` entries and applies mapped values to component props.
616
+ *
617
+ * Used by both the live builder effect (root-config.tsx) and the runtime
618
+ * resolver (resolve-soft-component-data.ts) so the logic stays in one place.
619
+ *
620
+ * Array construction order (for array targets like `items[].imageUrl`):
621
+ * 1. Start from `unmappedArrayItemDefaultValues` on the map entry (initially populated
622
+ * from the component's `defaultItemProps`). These are the single source of
623
+ * truth for the item "template".
624
+ * 2. Overlay the mapped value for each array index.
625
+ * The result is a freshly-constructed array whose length equals the mapped
626
+ * source array and whose unmapped props come from the defaults above.
627
+ */
628
+
629
+ declare const resolveValueByPath: (source: any, path: string) => any;
630
+ /**
631
+ * Evaluate every `_map` entry and apply the results to `props`.
632
+ *
633
+ * @param props The component props to mutate (caller should pass a shallow copy).
634
+ * @param fieldSettings Root-level `_fieldSettings` for resolving `from` paths.
635
+ * @param map The `_map` array from the component.
636
+ * @param resolveInput Strategy for resolving `from` values. Two modes:
637
+ * - `"fieldSettings"` (builder): read from `fieldSettings` only.
638
+ * - `"propsFirst"` (runtime): prefer live prop values, fall back
639
+ * to fieldSettings `defaultValue`.
640
+ */
641
+ declare function applyMapping(props: Record<string, any>, fieldSettings: Record<string, any>, map: MapEntry[], resolveInput?: "fieldSettings" | "propsFirst", options?: ApplyMappingOptions): ApplyMappingResult;
642
+
643
+ declare const isArrayMappingPath: (path: string) => boolean;
644
+ declare const getArrayBasePath: (arrayPath: string) => string | null;
645
+ declare const getArrayItemSubPath: (arrayPath: string) => string | null;
646
+
647
+ export { ActionBarOverride as ActionBar, type ActionEventPayload, type AppStore, type AppStoreApi, type ApplyMappingOptions, type ApplyMappingResult, type BuilderComponentConfig, type BuilderConfig, type BuilderRootConfig, ComponentItem, Drawer as ComponentList, type CustomFieldDefinition, type CustomFieldReturnType, type CustomFields, Drawer, DrawerItem, type FieldSettings, Header, type MapEntry, Modal, type OnActionsCallback, type Overrides, type SoftComponent, type SoftComponents, SoftConfigProvider, type SoftFieldDefinition, type SoftFieldSettings, type VersionedSoftComponent, applyMapping, confirm, createActionCallback, createSoftConfigStore, createUseSoftConfig, filterToOptionsForFrom, getArrayBasePath, getArrayItemSubPath, isArrayMappingPath, notify, resolveSoftConfig, resolveValueByPath, setConfirmHandler, setNotificationHandler, useBuild, useCancel, useComplete, useDecompose, useDemolish, useInspect, useRemodel, useSetDefaultVersion, useSoftConfig };