@weaverse/core 0.7.11 → 0.7.12
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 +19 -13
- package/dist/index.js +0 -0
- package/dist/index.mjs +0 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -46,7 +46,6 @@ declare const isReactNative: boolean;
|
|
|
46
46
|
declare const isBrowser: boolean;
|
|
47
47
|
declare const isIframe: boolean;
|
|
48
48
|
|
|
49
|
-
declare type TODO = any;
|
|
50
49
|
interface ProjectDataType {
|
|
51
50
|
items: ElementData[];
|
|
52
51
|
rootId: string;
|
|
@@ -64,10 +63,10 @@ interface InitializeData {
|
|
|
64
63
|
projectKey?: string;
|
|
65
64
|
studioUrl?: string;
|
|
66
65
|
}
|
|
67
|
-
|
|
66
|
+
interface BreakPoints {
|
|
68
67
|
mobile: string;
|
|
69
68
|
desktop: string;
|
|
70
|
-
}
|
|
69
|
+
}
|
|
71
70
|
interface WeaverseType {
|
|
72
71
|
mediaBreakPoints?: BreakPoints;
|
|
73
72
|
appUrl?: string;
|
|
@@ -95,7 +94,6 @@ interface ElementCatalog {
|
|
|
95
94
|
}
|
|
96
95
|
declare type FlagType = "draggable" | "resizable" | "sortable" | "droppable" | "deletable" | "duplicable";
|
|
97
96
|
declare type ElementFlags = Partial<Record<FlagType, boolean>>;
|
|
98
|
-
declare type ToolbarAction = "duplicate" | "delete" | "copy-styles" | "paste-styles";
|
|
99
97
|
interface ChildElement {
|
|
100
98
|
label: string;
|
|
101
99
|
selector: string;
|
|
@@ -105,6 +103,7 @@ declare type GridSize = {
|
|
|
105
103
|
rowSpan: number;
|
|
106
104
|
colSpan: number;
|
|
107
105
|
};
|
|
106
|
+
declare type ToolbarAction = "duplicate" | "delete" | "copy-styles" | "paste-styles";
|
|
108
107
|
interface ElementSchema {
|
|
109
108
|
title: string;
|
|
110
109
|
type: string;
|
|
@@ -135,18 +134,21 @@ interface ElementInspector {
|
|
|
135
134
|
settings?: (AdvancedGroup | BasicGroup)[];
|
|
136
135
|
styles?: (AdvancedGroup | BasicGroup)[];
|
|
137
136
|
}
|
|
138
|
-
|
|
139
|
-
groupType:
|
|
140
|
-
}
|
|
141
|
-
|
|
137
|
+
interface AdvancedGroup {
|
|
138
|
+
groupType: AdvancedGroupType;
|
|
139
|
+
}
|
|
140
|
+
interface BasicGroup {
|
|
142
141
|
groupType: "basic";
|
|
143
142
|
groupHeader: string;
|
|
144
143
|
inputs: BasicInput[];
|
|
145
|
-
}
|
|
146
|
-
declare type
|
|
144
|
+
}
|
|
145
|
+
declare type AdvancedGroupType = "border" | "alignment" | "background" | "dimensions" | "spacing" | "typography" | "visibility";
|
|
147
146
|
interface BasicInput {
|
|
148
147
|
type: InputType;
|
|
149
148
|
label: string;
|
|
149
|
+
/**
|
|
150
|
+
* The key of the value in the element data or css
|
|
151
|
+
*/
|
|
150
152
|
name: string;
|
|
151
153
|
defaultValue?: string;
|
|
152
154
|
placeholder?: string;
|
|
@@ -166,6 +168,10 @@ interface BasicInput {
|
|
|
166
168
|
min?: number;
|
|
167
169
|
max?: number;
|
|
168
170
|
step?: number;
|
|
171
|
+
/**
|
|
172
|
+
* For `sortable` input
|
|
173
|
+
*/
|
|
174
|
+
visibleType?: boolean;
|
|
169
175
|
/**
|
|
170
176
|
* Only display if condition matches.
|
|
171
177
|
*
|
|
@@ -183,8 +189,8 @@ interface BasicInput {
|
|
|
183
189
|
declare type InputType = "color" | "datepicker" | "image" | "range" | "select" | "sortable" | "switch" | "text" | "textarea" | "toggle-group" | "form" | "product" | "custom.html" | "instagram";
|
|
184
190
|
declare global {
|
|
185
191
|
interface Window {
|
|
186
|
-
WeaverseStudioBridge:
|
|
187
|
-
weaverseShopifyProducts:
|
|
192
|
+
WeaverseStudioBridge: any;
|
|
193
|
+
weaverseShopifyProducts: any;
|
|
188
194
|
}
|
|
189
195
|
}
|
|
190
196
|
|
|
@@ -314,4 +320,4 @@ declare class Weaverse {
|
|
|
314
320
|
initProjectItemData(): void;
|
|
315
321
|
}
|
|
316
322
|
|
|
317
|
-
export { AdvancedGroup,
|
|
323
|
+
export { AdvancedGroup, AdvancedGroupType, BasicGroup, BasicInput, BreakPoints, CatalogGroup, ChildElement, ChildElementCSS, ElementCSS, ElementCatalog, ElementData, ElementFlags, ElementInspector, ElementSchema, ElementsMap, FlagType, GridSize, InitializeData, InputType, ParentType, ProjectDataType, ToolbarAction, Weaverse, WeaverseCSSProperties, WeaverseElement, WeaverseItemStore, WeaverseType, isBrowser, isIframe, isReactNative, loadScript, stichesUtils };
|
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/index.mjs
CHANGED
|
File without changes
|
package/package.json
CHANGED