@weaverse/core 2.0.0 → 2.1.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.d.mts CHANGED
@@ -162,7 +162,7 @@ interface BasicInput<ConfigsType = AdditionalInputConfigs> {
162
162
  /**
163
163
  * Only display if condition matches.
164
164
  *
165
- * Format: `dataBindingKey.conditionalOperator.value`
165
+ * Format: `bindingName.conditionalOperator.value`
166
166
  *
167
167
  * Supported operators: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`
168
168
  *
@@ -172,11 +172,11 @@ interface BasicInput<ConfigsType = AdditionalInputConfigs> {
172
172
  * `imagesPerRow.gt.1`
173
173
  */
174
174
  condition?: string;
175
- defaultValue?: any;
175
+ defaultValue?: string | number | boolean | WeaverseImage;
176
176
  placeholder?: string;
177
177
  helpText?: string;
178
178
  }
179
- type AdditionalInputConfigs = SelectInputConfigs | ToggleGroupConfigs | RangeInputConfigs | ChildrenSortInputConfigs;
179
+ type AdditionalInputConfigs = SelectInputConfigs | ToggleGroupConfigs | RangeInputConfigs;
180
180
  interface SelectInputConfigs {
181
181
  options?: {
182
182
  value: string;
@@ -199,11 +199,14 @@ interface RangeInputConfigs {
199
199
  step?: number;
200
200
  unit?: string;
201
201
  }
202
- type SortableItemAction = "add" | "edit" | "duplicate" | "delete" | "toggle-visibility";
203
- interface ChildrenSortInputConfigs {
204
- actions: SortableItemAction[];
205
- }
206
- type InputType = "color" | "datepicker" | "image" | "range" | "select" | "children-sort" | "switch" | "text" | "textarea" | "toggle-group" | "position";
202
+ type WeaverseImage = {
203
+ id: string;
204
+ url: string;
205
+ alt: string;
206
+ width: number;
207
+ height: number;
208
+ };
209
+ type InputType = "article-list" | "collection" | "collection-list" | "color" | "datepicker" | "image" | "map-autocomplete" | "position" | "product" | "product-list" | "range" | "richtext" | "select" | "switch" | "text" | "textarea" | "toggle-group";
207
210
  declare global {
208
211
  interface Window {
209
212
  Blinkloader: any;
@@ -224,4 +227,4 @@ declare function merge(target: Record<string, any>, source: Record<string, any>)
224
227
  };
225
228
  declare function loadScript(src: string): Promise<unknown>;
226
229
 
227
- export { AdditionalInputConfigs, AdvancedGroupType, BasicInput, BreakPoints, ChildElementCSS, ChildrenSortInputConfigs, ElementCSS, ElementData, ElementSchema, InputType, PlatformTypeEnum, RangeInputConfigs, SelectInputConfigs, SortableItemAction, ToggleGroupConfigs, ToolbarAction, Weaverse, WeaverseCSSProperties, WeaverseCoreParams, WeaverseElement, WeaverseItemStore, WeaverseProjectDataType, isBrowser, isIframe, isReactNative, loadScript, merge };
230
+ export { AdditionalInputConfigs, AdvancedGroupType, BasicInput, BreakPoints, ChildElementCSS, ElementCSS, ElementData, ElementSchema, InputType, PlatformTypeEnum, RangeInputConfigs, SelectInputConfigs, ToggleGroupConfigs, ToolbarAction, Weaverse, WeaverseCSSProperties, WeaverseCoreParams, WeaverseElement, WeaverseImage, WeaverseItemStore, WeaverseProjectDataType, isBrowser, isIframe, isReactNative, loadScript, merge };
package/dist/index.d.ts CHANGED
@@ -162,7 +162,7 @@ interface BasicInput<ConfigsType = AdditionalInputConfigs> {
162
162
  /**
163
163
  * Only display if condition matches.
164
164
  *
165
- * Format: `dataBindingKey.conditionalOperator.value`
165
+ * Format: `bindingName.conditionalOperator.value`
166
166
  *
167
167
  * Supported operators: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`
168
168
  *
@@ -172,11 +172,11 @@ interface BasicInput<ConfigsType = AdditionalInputConfigs> {
172
172
  * `imagesPerRow.gt.1`
173
173
  */
174
174
  condition?: string;
175
- defaultValue?: any;
175
+ defaultValue?: string | number | boolean | WeaverseImage;
176
176
  placeholder?: string;
177
177
  helpText?: string;
178
178
  }
179
- type AdditionalInputConfigs = SelectInputConfigs | ToggleGroupConfigs | RangeInputConfigs | ChildrenSortInputConfigs;
179
+ type AdditionalInputConfigs = SelectInputConfigs | ToggleGroupConfigs | RangeInputConfigs;
180
180
  interface SelectInputConfigs {
181
181
  options?: {
182
182
  value: string;
@@ -199,11 +199,14 @@ interface RangeInputConfigs {
199
199
  step?: number;
200
200
  unit?: string;
201
201
  }
202
- type SortableItemAction = "add" | "edit" | "duplicate" | "delete" | "toggle-visibility";
203
- interface ChildrenSortInputConfigs {
204
- actions: SortableItemAction[];
205
- }
206
- type InputType = "color" | "datepicker" | "image" | "range" | "select" | "children-sort" | "switch" | "text" | "textarea" | "toggle-group" | "position";
202
+ type WeaverseImage = {
203
+ id: string;
204
+ url: string;
205
+ alt: string;
206
+ width: number;
207
+ height: number;
208
+ };
209
+ type InputType = "article-list" | "collection" | "collection-list" | "color" | "datepicker" | "image" | "map-autocomplete" | "position" | "product" | "product-list" | "range" | "richtext" | "select" | "switch" | "text" | "textarea" | "toggle-group";
207
210
  declare global {
208
211
  interface Window {
209
212
  Blinkloader: any;
@@ -224,4 +227,4 @@ declare function merge(target: Record<string, any>, source: Record<string, any>)
224
227
  };
225
228
  declare function loadScript(src: string): Promise<unknown>;
226
229
 
227
- export { AdditionalInputConfigs, AdvancedGroupType, BasicInput, BreakPoints, ChildElementCSS, ChildrenSortInputConfigs, ElementCSS, ElementData, ElementSchema, InputType, PlatformTypeEnum, RangeInputConfigs, SelectInputConfigs, SortableItemAction, ToggleGroupConfigs, ToolbarAction, Weaverse, WeaverseCSSProperties, WeaverseCoreParams, WeaverseElement, WeaverseItemStore, WeaverseProjectDataType, isBrowser, isIframe, isReactNative, loadScript, merge };
230
+ export { AdditionalInputConfigs, AdvancedGroupType, BasicInput, BreakPoints, ChildElementCSS, ElementCSS, ElementData, ElementSchema, InputType, PlatformTypeEnum, RangeInputConfigs, SelectInputConfigs, ToggleGroupConfigs, ToolbarAction, Weaverse, WeaverseCSSProperties, WeaverseCoreParams, WeaverseElement, WeaverseImage, WeaverseItemStore, WeaverseProjectDataType, isBrowser, isIframe, isReactNative, loadScript, merge };
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.0",
2
+ "version": "2.1.0",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",