@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.
Files changed (2) hide show
  1. package/dist/index.d.ts +24 -5
  2. 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" | "edit-button" | "insert-link" | "select-template" | "copy-styles" | "paste-styles";
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 = "alignment" | "background" | "border" | "countdown" | "dimensions" | "visibility" | "spacing" | "form" | "product";
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
- conditions?: TODO[];
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" | "image" | "instagram" | "range" | "select" | "sortable" | "switch" | "text" | "textarea" | "toggle-group";
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
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.7.6",
2
+ "version": "0.7.9",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",