@weaverse/react 1.0.57 → 1.0.59
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.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -50,7 +50,7 @@ var WeaverseContextConsumer = WeaverseContext.Consumer;
|
|
|
50
50
|
var import_core = require("@weaverse/core");
|
|
51
51
|
var import_react2 = __toESM(require("react"));
|
|
52
52
|
|
|
53
|
-
// ../../node_modules/clsx/dist/clsx.
|
|
53
|
+
// ../../node_modules/clsx/dist/clsx.m.js
|
|
54
54
|
function r(e) {
|
|
55
55
|
var t, f, n = "";
|
|
56
56
|
if ("string" == typeof e || "number" == typeof e)
|
|
@@ -69,7 +69,7 @@ function clsx() {
|
|
|
69
69
|
(e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
70
70
|
return n;
|
|
71
71
|
}
|
|
72
|
-
var
|
|
72
|
+
var clsx_m_default = clsx;
|
|
73
73
|
|
|
74
74
|
// src/utils/css.ts
|
|
75
75
|
function formatCSS(css) {
|
|
@@ -99,7 +99,7 @@ function generateItemClassName(instance, stitchesInstance) {
|
|
|
99
99
|
let newStitchesClass = stitchesInstance.css(formattedCss)().className || "";
|
|
100
100
|
let { stitchesClass } = instance;
|
|
101
101
|
let otherClass = (instance.ref.current?.className || "").replace(stitchesClass, "").replace(cls, "").replace(permanentClass, "").trim();
|
|
102
|
-
className =
|
|
102
|
+
className = clsx_m_default(permanentClass, cls, newStitchesClass, otherClass);
|
|
103
103
|
instance.stitchesClass = newStitchesClass;
|
|
104
104
|
}
|
|
105
105
|
return className;
|
|
@@ -179,7 +179,7 @@ var ItemComponent = (0, import_react2.memo)(({ instance }) => {
|
|
|
179
179
|
key: id,
|
|
180
180
|
"data-wv-type": type,
|
|
181
181
|
"data-wv-id": id,
|
|
182
|
-
className:
|
|
182
|
+
className: clsx_m_default(
|
|
183
183
|
platformType !== "shopify-hydrogen" && generateItemClassName(instance, stitchesInstance),
|
|
184
184
|
rest?.data?.className
|
|
185
185
|
),
|
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ var WeaverseContextConsumer = WeaverseContext.Consumer;
|
|
|
11
11
|
import { isBrowser } from "@weaverse/core";
|
|
12
12
|
import React, { memo, useContext, useEffect, useRef, useState } from "react";
|
|
13
13
|
|
|
14
|
-
// ../../node_modules/clsx/dist/clsx.
|
|
14
|
+
// ../../node_modules/clsx/dist/clsx.m.js
|
|
15
15
|
function r(e) {
|
|
16
16
|
var t, f, n = "";
|
|
17
17
|
if ("string" == typeof e || "number" == typeof e)
|
|
@@ -30,7 +30,7 @@ function clsx() {
|
|
|
30
30
|
(e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
31
31
|
return n;
|
|
32
32
|
}
|
|
33
|
-
var
|
|
33
|
+
var clsx_m_default = clsx;
|
|
34
34
|
|
|
35
35
|
// src/utils/css.ts
|
|
36
36
|
function formatCSS(css) {
|
|
@@ -60,7 +60,7 @@ function generateItemClassName(instance, stitchesInstance) {
|
|
|
60
60
|
let newStitchesClass = stitchesInstance.css(formattedCss)().className || "";
|
|
61
61
|
let { stitchesClass } = instance;
|
|
62
62
|
let otherClass = (instance.ref.current?.className || "").replace(stitchesClass, "").replace(cls, "").replace(permanentClass, "").trim();
|
|
63
|
-
className =
|
|
63
|
+
className = clsx_m_default(permanentClass, cls, newStitchesClass, otherClass);
|
|
64
64
|
instance.stitchesClass = newStitchesClass;
|
|
65
65
|
}
|
|
66
66
|
return className;
|
|
@@ -140,7 +140,7 @@ var ItemComponent = memo(({ instance }) => {
|
|
|
140
140
|
key: id,
|
|
141
141
|
"data-wv-type": type,
|
|
142
142
|
"data-wv-id": id,
|
|
143
|
-
className:
|
|
143
|
+
className: clsx_m_default(
|
|
144
144
|
platformType !== "shopify-hydrogen" && generateItemClassName(instance, stitchesInstance),
|
|
145
145
|
rest?.data?.className
|
|
146
146
|
),
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.59",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
@@ -32,6 +32,6 @@
|
|
|
32
32
|
"name": "@weaverse/react",
|
|
33
33
|
"author": "Weaverse Team",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@weaverse/core": "1.0.
|
|
35
|
+
"@weaverse/core": "1.0.59"
|
|
36
36
|
}
|
|
37
37
|
}
|