@weaverse/core 0.7.54 → 0.7.55

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 CHANGED
@@ -39,7 +39,6 @@ declare let stichesUtils: {
39
39
  paddingBottom: string;
40
40
  };
41
41
  };
42
- declare function createGlobalStyles(stitches: Stitches$1): void;
43
42
 
44
43
  declare const isReactNative: boolean;
45
44
  declare const isBrowser: boolean;
@@ -346,4 +345,4 @@ declare class Weaverse {
346
345
  initProjectItemData(): void;
347
346
  }
348
347
 
349
- export { AdditionalInputConfigs, AdvancedGroup, AdvancedGroupType, BasicGroup, BasicInput, BreakPoints, CatalogGroup, ChildElement, ChildElementCSS, ChildElementSelector, ElementCSS, ElementCatalog, ElementData, ElementDataInCatalog, ElementFlags, ElementInspector, ElementSchema, FlagType, GridSize, InitializeData, InputType, ParentType, PositionInputConfigs, ProjectDataType, RangeInputConfigs, SelectInputConfigs, SortableInputConfigs, SortableItemAction, ToggleGroupConfigs, ToolbarAction, Weaverse, WeaverseCSSProperties, WeaverseElement, WeaverseItemStore, WeaverseType, createGlobalStyles, isBrowser, isIframe, isReactNative, merge, stichesUtils };
348
+ export { AdditionalInputConfigs, AdvancedGroup, AdvancedGroupType, BasicGroup, BasicInput, BreakPoints, CatalogGroup, ChildElement, ChildElementCSS, ChildElementSelector, ElementCSS, ElementCatalog, ElementData, ElementDataInCatalog, ElementFlags, ElementInspector, ElementSchema, FlagType, GridSize, InitializeData, InputType, ParentType, PositionInputConfigs, ProjectDataType, RangeInputConfigs, SelectInputConfigs, SortableInputConfigs, SortableItemAction, ToggleGroupConfigs, ToolbarAction, Weaverse, WeaverseCSSProperties, WeaverseElement, WeaverseItemStore, WeaverseType, isBrowser, isIframe, isReactNative, merge, stichesUtils };
package/dist/index.js CHANGED
@@ -28,7 +28,6 @@ var src_exports = {};
28
28
  __export(src_exports, {
29
29
  Weaverse: () => Weaverse,
30
30
  WeaverseItemStore: () => WeaverseItemStore,
31
- createGlobalStyles: () => createGlobalStyles,
32
31
  isBrowser: () => isBrowser,
33
32
  isIframe: () => isIframe,
34
33
  isReactNative: () => isReactNative,
@@ -78,168 +77,6 @@ var stichesUtils = {
78
77
  paddingBottom: value
79
78
  })
80
79
  };
81
- function createGlobalStyles(stitches2) {
82
- let globalStyles = stitches2.globalCss({
83
- "@keyframes spin": {
84
- from: { transform: "rotate(0deg)" },
85
- to: { transform: "rotate(360deg)" }
86
- },
87
- "@keyframes pulse": {
88
- "0%, 100%": { opacity: 1 },
89
- "50%": { opacity: 0.5 }
90
- },
91
- ".wv-tooltip-container": {
92
- position: "relative !important",
93
- display: "inline-flex !important",
94
- ".wv-tooltip": {
95
- position: "absolute",
96
- color: "#fff !important",
97
- backgroundColor: "#000 !important",
98
- fontSize: "13px",
99
- textAlign: "center",
100
- transition: ".3s all",
101
- borderRadius: "5px !important",
102
- lineHeight: "12px",
103
- bottom: "calc(100% + 5px)",
104
- left: "50%",
105
- transform: "translateX(-50%)",
106
- padding: "8px 12px",
107
- opacity: 0,
108
- visibility: "hidden",
109
- textTransform: "initial",
110
- width: "max-content !important",
111
- maxWidth: "initial !important",
112
- height: "auto !important",
113
- display: "inline-block !important",
114
- "&:after": {
115
- content: '""',
116
- position: "absolute",
117
- width: "10px",
118
- height: "10px",
119
- backgroundColor: "#000",
120
- bottom: "-4px",
121
- left: "50%",
122
- transform: "translateX(-50%) rotate(45deg)"
123
- }
124
- },
125
- "&:hover": {
126
- ".wv-tooltip": {
127
- opacity: 1,
128
- visibility: "visible",
129
- bottom: "calc(100% + 10px)"
130
- }
131
- }
132
- },
133
- ".wv-spinner-wrapper": {
134
- position: "absolute",
135
- inset: "0px",
136
- display: "flex",
137
- alignItems: "center",
138
- justifyContent: "center",
139
- backgroundColor: "inherit",
140
- ".wv-spinner": {
141
- width: "20px",
142
- height: "20px",
143
- animation: "spin .75s linear infinite"
144
- }
145
- },
146
- "[data-wv-placeholder]": {
147
- height: "100%",
148
- width: "100%",
149
- display: "flex",
150
- flexDirection: "column",
151
- alignItems: "center",
152
- justifyContent: "center",
153
- backgroundColor: "rgba(236, 236, 236, 0.5)",
154
- backgroundClip: "content-box",
155
- padding: "10px"
156
- },
157
- ".wv-pcard__quickview": {
158
- borderRadius: "0px !important",
159
- width: "950px !important"
160
- },
161
- "[data-blink-src]": {
162
- visibility: "hidden"
163
- },
164
- body: {
165
- "&.wv-modal-open": {
166
- ".weaverse-content-root": {
167
- zIndex: 9999,
168
- '[data-wv-type="product-details"]': {
169
- zIndex: 999
170
- }
171
- }
172
- }
173
- },
174
- ".weaverse-content-root": {
175
- position: "relative",
176
- zIndex: 0,
177
- "*": {
178
- WebkitFontSmoothing: "antialiased",
179
- MozOsxFontSmoothing: "auto",
180
- textRendering: "optimizeLegibility",
181
- boxSizing: "border-box"
182
- },
183
- input: {
184
- "&::-webkit-outer-spin-button, &::-webkit-inner-spin-button": {
185
- "-webkit-appearance": "none",
186
- margin: 0
187
- },
188
- "&[type=number]": {
189
- "-moz-appearance": "textfield"
190
- }
191
- },
192
- select: {
193
- WebkitAppearance: "none",
194
- MozAppearance: "none",
195
- appearance: "none",
196
- outline: "none",
197
- boxShadow: "none",
198
- color: "currentColor",
199
- verticalAlign: "middle",
200
- backgroundColor: "transparent",
201
- backgroundPosition: "center",
202
- backgroundRepeat: "no-repeat",
203
- backgroundImage: "url(https://ucarecdn.com/4bb6a6e7-1ce8-4201-8f2d-da00a50105f3/)",
204
- backgroundSize: "10px",
205
- backgroundPositionX: "calc(100% - 12px)",
206
- paddingLeft: "12px",
207
- paddingRight: "35px !important",
208
- cursor: "pointer"
209
- },
210
- button: {
211
- outline: "none",
212
- boxShadow: "none",
213
- cursor: "pointer",
214
- border: "none",
215
- "&:focus": {
216
- outline: "none",
217
- boxShadow: "none"
218
- }
219
- },
220
- ".animate-pulse": {
221
- animation: "pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"
222
- }
223
- },
224
- ".wv-error-boundary": {
225
- textAlign: "center",
226
- padding: "32px 0",
227
- button: {
228
- cursor: "pointer",
229
- fontSize: "14px",
230
- padding: "4px 10px"
231
- }
232
- },
233
- "@media (max-width: 768px)": {
234
- ".wv-tooltip-container": {
235
- ".wv-tooltip": {
236
- display: "none !important"
237
- }
238
- }
239
- }
240
- });
241
- globalStyles();
242
- }
243
80
 
244
81
  // src/utils/index.ts
245
82
  var isReactNative = typeof navigator === "object" && navigator.product === "ReactNative";
@@ -349,7 +186,6 @@ var Weaverse = class {
349
186
  media: this.mediaBreakPoints,
350
187
  utils: stichesUtils
351
188
  });
352
- createGlobalStyles(this.stitchesInstance);
353
189
  };
354
190
  this.init({ appUrl, projectKey, projectData, mediaBreakPoints, isDesignMode, ssrMode });
355
191
  }
@@ -430,7 +266,6 @@ Weaverse.WeaverseItemStore = WeaverseItemStore;
430
266
  0 && (module.exports = {
431
267
  Weaverse,
432
268
  WeaverseItemStore,
433
- createGlobalStyles,
434
269
  isBrowser,
435
270
  isIframe,
436
271
  isReactNative,
package/dist/index.mjs CHANGED
@@ -39,168 +39,6 @@ var stichesUtils = {
39
39
  paddingBottom: value
40
40
  })
41
41
  };
42
- function createGlobalStyles(stitches2) {
43
- let globalStyles = stitches2.globalCss({
44
- "@keyframes spin": {
45
- from: { transform: "rotate(0deg)" },
46
- to: { transform: "rotate(360deg)" }
47
- },
48
- "@keyframes pulse": {
49
- "0%, 100%": { opacity: 1 },
50
- "50%": { opacity: 0.5 }
51
- },
52
- ".wv-tooltip-container": {
53
- position: "relative !important",
54
- display: "inline-flex !important",
55
- ".wv-tooltip": {
56
- position: "absolute",
57
- color: "#fff !important",
58
- backgroundColor: "#000 !important",
59
- fontSize: "13px",
60
- textAlign: "center",
61
- transition: ".3s all",
62
- borderRadius: "5px !important",
63
- lineHeight: "12px",
64
- bottom: "calc(100% + 5px)",
65
- left: "50%",
66
- transform: "translateX(-50%)",
67
- padding: "8px 12px",
68
- opacity: 0,
69
- visibility: "hidden",
70
- textTransform: "initial",
71
- width: "max-content !important",
72
- maxWidth: "initial !important",
73
- height: "auto !important",
74
- display: "inline-block !important",
75
- "&:after": {
76
- content: '""',
77
- position: "absolute",
78
- width: "10px",
79
- height: "10px",
80
- backgroundColor: "#000",
81
- bottom: "-4px",
82
- left: "50%",
83
- transform: "translateX(-50%) rotate(45deg)"
84
- }
85
- },
86
- "&:hover": {
87
- ".wv-tooltip": {
88
- opacity: 1,
89
- visibility: "visible",
90
- bottom: "calc(100% + 10px)"
91
- }
92
- }
93
- },
94
- ".wv-spinner-wrapper": {
95
- position: "absolute",
96
- inset: "0px",
97
- display: "flex",
98
- alignItems: "center",
99
- justifyContent: "center",
100
- backgroundColor: "inherit",
101
- ".wv-spinner": {
102
- width: "20px",
103
- height: "20px",
104
- animation: "spin .75s linear infinite"
105
- }
106
- },
107
- "[data-wv-placeholder]": {
108
- height: "100%",
109
- width: "100%",
110
- display: "flex",
111
- flexDirection: "column",
112
- alignItems: "center",
113
- justifyContent: "center",
114
- backgroundColor: "rgba(236, 236, 236, 0.5)",
115
- backgroundClip: "content-box",
116
- padding: "10px"
117
- },
118
- ".wv-pcard__quickview": {
119
- borderRadius: "0px !important",
120
- width: "950px !important"
121
- },
122
- "[data-blink-src]": {
123
- visibility: "hidden"
124
- },
125
- body: {
126
- "&.wv-modal-open": {
127
- ".weaverse-content-root": {
128
- zIndex: 9999,
129
- '[data-wv-type="product-details"]': {
130
- zIndex: 999
131
- }
132
- }
133
- }
134
- },
135
- ".weaverse-content-root": {
136
- position: "relative",
137
- zIndex: 0,
138
- "*": {
139
- WebkitFontSmoothing: "antialiased",
140
- MozOsxFontSmoothing: "auto",
141
- textRendering: "optimizeLegibility",
142
- boxSizing: "border-box"
143
- },
144
- input: {
145
- "&::-webkit-outer-spin-button, &::-webkit-inner-spin-button": {
146
- "-webkit-appearance": "none",
147
- margin: 0
148
- },
149
- "&[type=number]": {
150
- "-moz-appearance": "textfield"
151
- }
152
- },
153
- select: {
154
- WebkitAppearance: "none",
155
- MozAppearance: "none",
156
- appearance: "none",
157
- outline: "none",
158
- boxShadow: "none",
159
- color: "currentColor",
160
- verticalAlign: "middle",
161
- backgroundColor: "transparent",
162
- backgroundPosition: "center",
163
- backgroundRepeat: "no-repeat",
164
- backgroundImage: "url(https://ucarecdn.com/4bb6a6e7-1ce8-4201-8f2d-da00a50105f3/)",
165
- backgroundSize: "10px",
166
- backgroundPositionX: "calc(100% - 12px)",
167
- paddingLeft: "12px",
168
- paddingRight: "35px !important",
169
- cursor: "pointer"
170
- },
171
- button: {
172
- outline: "none",
173
- boxShadow: "none",
174
- cursor: "pointer",
175
- border: "none",
176
- "&:focus": {
177
- outline: "none",
178
- boxShadow: "none"
179
- }
180
- },
181
- ".animate-pulse": {
182
- animation: "pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"
183
- }
184
- },
185
- ".wv-error-boundary": {
186
- textAlign: "center",
187
- padding: "32px 0",
188
- button: {
189
- cursor: "pointer",
190
- fontSize: "14px",
191
- padding: "4px 10px"
192
- }
193
- },
194
- "@media (max-width: 768px)": {
195
- ".wv-tooltip-container": {
196
- ".wv-tooltip": {
197
- display: "none !important"
198
- }
199
- }
200
- }
201
- });
202
- globalStyles();
203
- }
204
42
 
205
43
  // src/utils/index.ts
206
44
  var isReactNative = typeof navigator === "object" && navigator.product === "ReactNative";
@@ -310,7 +148,6 @@ var Weaverse = class {
310
148
  media: this.mediaBreakPoints,
311
149
  utils: stichesUtils
312
150
  });
313
- createGlobalStyles(this.stitchesInstance);
314
151
  };
315
152
  this.init({ appUrl, projectKey, projectData, mediaBreakPoints, isDesignMode, ssrMode });
316
153
  }
@@ -390,7 +227,6 @@ Weaverse.WeaverseItemStore = WeaverseItemStore;
390
227
  export {
391
228
  Weaverse,
392
229
  WeaverseItemStore,
393
- createGlobalStyles,
394
230
  isBrowser,
395
231
  isIframe,
396
232
  isReactNative,
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.7.54",
2
+ "version": "0.7.55",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",