@weaverse/core 0.7.6 → 0.7.9
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.d.ts +24 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -95,9 +95,9 @@ interface ElementCatalog {
|
|
|
95
95
|
group?: CatalogGroup;
|
|
96
96
|
data?: ElementData[];
|
|
97
97
|
}
|
|
98
|
-
declare type FlagType = "draggable" | "resizable" | "sortable" | "droppable";
|
|
98
|
+
declare type FlagType = "draggable" | "resizable" | "sortable" | "droppable" | "deletable" | "duplicable";
|
|
99
99
|
declare type ElementFlags = Partial<Record<FlagType, boolean>>;
|
|
100
|
-
declare type ToolbarAction = "duplicate" | "delete" | "
|
|
100
|
+
declare type ToolbarAction = "duplicate" | "delete" | "copy-styles" | "paste-styles";
|
|
101
101
|
interface ChildElement {
|
|
102
102
|
label: string;
|
|
103
103
|
selector: string;
|
|
@@ -145,7 +145,7 @@ declare type BasicGroup = {
|
|
|
145
145
|
label: string;
|
|
146
146
|
inputs: BasicInput[];
|
|
147
147
|
};
|
|
148
|
-
declare type AdvancedInput = "
|
|
148
|
+
declare type AdvancedInput = "border" | "alignment" | "background" | "dimensions" | "spacing" | "visibility";
|
|
149
149
|
interface BasicInput {
|
|
150
150
|
type: InputType;
|
|
151
151
|
label: string;
|
|
@@ -153,17 +153,36 @@ interface BasicInput {
|
|
|
153
153
|
defaultValue?: string;
|
|
154
154
|
placeholder?: string;
|
|
155
155
|
helpText?: string;
|
|
156
|
+
/**
|
|
157
|
+
* For `select` or `toggle-group` input
|
|
158
|
+
*/
|
|
156
159
|
options?: {
|
|
157
160
|
value: string;
|
|
158
161
|
label: string;
|
|
159
162
|
icon?: string;
|
|
163
|
+
weight?: string;
|
|
160
164
|
}[];
|
|
165
|
+
/**
|
|
166
|
+
* For `range` input
|
|
167
|
+
*/
|
|
161
168
|
min?: number;
|
|
162
169
|
max?: number;
|
|
163
170
|
step?: number;
|
|
164
|
-
|
|
171
|
+
/**
|
|
172
|
+
* Only display if condition matches.
|
|
173
|
+
*
|
|
174
|
+
* Format: `bindingName.conditionalOperator.value`
|
|
175
|
+
*
|
|
176
|
+
* Supported operators: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* `clickAction.eq.openLink`
|
|
180
|
+
* `clickAction.ne.openLink`
|
|
181
|
+
* `imagesPerRow.gt.1`
|
|
182
|
+
*/
|
|
183
|
+
condition?: string;
|
|
165
184
|
}
|
|
166
|
-
declare type InputType = "color" | "
|
|
185
|
+
declare type InputType = "color" | "datepicker" | "image" | "range" | "select" | "sortable" | "switch" | "text" | "textarea" | "toggle-group" | "form" | "product" | "custom.html" | "instagram";
|
|
167
186
|
declare global {
|
|
168
187
|
interface Window {
|
|
169
188
|
WeaverseStudioBridge: TODO;
|
package/package.json
CHANGED