hasting-swatchcart-module 0.0.9 → 0.0.10
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/{lib/components → components}/SwatchesModule.d.ts +1 -2
- package/dist/main.cjs +153 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +36514 -4
- package/package.json +31 -49
- package/dist/components/SwatchesModule.js +0 -23451
- package/dist/components/Test.js +0 -5
- package/dist/rootReducer-BqfJd5QI.js +0 -15247
- package/dist/store/LibraryProvider.js +0 -8
- package/dist/store/rootReducer.js +0 -4
- package/dist/store/store.js +0 -7
- package/dist/store/withStore.js +0 -9
- package/dist/store-BZ_1BK_I.js +0 -382
- /package/dist/assets/{SwatchesModule.css → main.css} +0 -0
- /package/dist/{lib/components → components}/Test.d.ts +0 -0
- /package/dist/{lib/store → store}/LibraryProvider.d.ts +0 -0
- /package/dist/{lib/store → store}/rootReducer.d.ts +0 -0
- /package/dist/{lib/store → store}/store.d.ts +0 -0
- /package/dist/{lib/store → store}/withStore.d.ts +0 -0
package/dist/store/store.js
DELETED
package/dist/store/withStore.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { LibraryProvider as o } from "./LibraryProvider.js";
|
|
3
|
-
function m(r) {
|
|
4
|
-
const e = (i) => /* @__PURE__ */ t(o, { children: /* @__PURE__ */ t(r, { ...i }) });
|
|
5
|
-
return e.displayName = `withStore(${r.displayName || r.name || "Component"})`, e;
|
|
6
|
-
}
|
|
7
|
-
export {
|
|
8
|
-
m as withStore
|
|
9
|
-
};
|
package/dist/store-BZ_1BK_I.js
DELETED
|
@@ -1,382 +0,0 @@
|
|
|
1
|
-
import { b as H, B as I } from "./rootReducer-BqfJd5QI.js";
|
|
2
|
-
import * as b from "react";
|
|
3
|
-
import A from "react";
|
|
4
|
-
var x = { exports: {} }, R = {};
|
|
5
|
-
/**
|
|
6
|
-
* @license React
|
|
7
|
-
* use-sync-external-store-with-selector.production.js
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
10
|
-
*
|
|
11
|
-
* This source code is licensed under the MIT license found in the
|
|
12
|
-
* LICENSE file in the root directory of this source tree.
|
|
13
|
-
*/
|
|
14
|
-
var N;
|
|
15
|
-
function U() {
|
|
16
|
-
if (N) return R;
|
|
17
|
-
N = 1;
|
|
18
|
-
var e = A;
|
|
19
|
-
function o(u, i) {
|
|
20
|
-
return u === i && (u !== 0 || 1 / u === 1 / i) || u !== u && i !== i;
|
|
21
|
-
}
|
|
22
|
-
var t = typeof Object.is == "function" ? Object.is : o, r = e.useSyncExternalStore, n = e.useRef, l = e.useEffect, m = e.useMemo, E = e.useDebugValue;
|
|
23
|
-
return R.useSyncExternalStoreWithSelector = function(u, i, f, p, d) {
|
|
24
|
-
var a = n(null);
|
|
25
|
-
if (a.current === null) {
|
|
26
|
-
var c = { hasValue: !1, value: null };
|
|
27
|
-
a.current = c;
|
|
28
|
-
} else c = a.current;
|
|
29
|
-
a = m(
|
|
30
|
-
function() {
|
|
31
|
-
function C(s) {
|
|
32
|
-
if (!w) {
|
|
33
|
-
if (w = !0, h = s, s = p(s), d !== void 0 && c.hasValue) {
|
|
34
|
-
var v = c.value;
|
|
35
|
-
if (d(v, s))
|
|
36
|
-
return y = v;
|
|
37
|
-
}
|
|
38
|
-
return y = s;
|
|
39
|
-
}
|
|
40
|
-
if (v = y, t(h, s)) return v;
|
|
41
|
-
var O = p(s);
|
|
42
|
-
return d !== void 0 && d(v, O) ? (h = s, v) : (h = s, y = O);
|
|
43
|
-
}
|
|
44
|
-
var w = !1, h, y, _ = f === void 0 ? null : f;
|
|
45
|
-
return [
|
|
46
|
-
function() {
|
|
47
|
-
return C(i());
|
|
48
|
-
},
|
|
49
|
-
_ === null ? void 0 : function() {
|
|
50
|
-
return C(_());
|
|
51
|
-
}
|
|
52
|
-
];
|
|
53
|
-
},
|
|
54
|
-
[i, f, p, d]
|
|
55
|
-
);
|
|
56
|
-
var S = r(u, a[0], a[1]);
|
|
57
|
-
return l(
|
|
58
|
-
function() {
|
|
59
|
-
c.hasValue = !0, c.value = S;
|
|
60
|
-
},
|
|
61
|
-
[S]
|
|
62
|
-
), E(S), S;
|
|
63
|
-
}, R;
|
|
64
|
-
}
|
|
65
|
-
var V = {};
|
|
66
|
-
/**
|
|
67
|
-
* @license React
|
|
68
|
-
* use-sync-external-store-with-selector.development.js
|
|
69
|
-
*
|
|
70
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
71
|
-
*
|
|
72
|
-
* This source code is licensed under the MIT license found in the
|
|
73
|
-
* LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/
|
|
75
|
-
var T;
|
|
76
|
-
function z() {
|
|
77
|
-
return T || (T = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
78
|
-
function e(u, i) {
|
|
79
|
-
return u === i && (u !== 0 || 1 / u === 1 / i) || u !== u && i !== i;
|
|
80
|
-
}
|
|
81
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
82
|
-
var o = A, t = typeof Object.is == "function" ? Object.is : e, r = o.useSyncExternalStore, n = o.useRef, l = o.useEffect, m = o.useMemo, E = o.useDebugValue;
|
|
83
|
-
V.useSyncExternalStoreWithSelector = function(u, i, f, p, d) {
|
|
84
|
-
var a = n(null);
|
|
85
|
-
if (a.current === null) {
|
|
86
|
-
var c = { hasValue: !1, value: null };
|
|
87
|
-
a.current = c;
|
|
88
|
-
} else c = a.current;
|
|
89
|
-
a = m(
|
|
90
|
-
function() {
|
|
91
|
-
function C(s) {
|
|
92
|
-
if (!w) {
|
|
93
|
-
if (w = !0, h = s, s = p(s), d !== void 0 && c.hasValue) {
|
|
94
|
-
var v = c.value;
|
|
95
|
-
if (d(v, s))
|
|
96
|
-
return y = v;
|
|
97
|
-
}
|
|
98
|
-
return y = s;
|
|
99
|
-
}
|
|
100
|
-
if (v = y, t(h, s))
|
|
101
|
-
return v;
|
|
102
|
-
var O = p(s);
|
|
103
|
-
return d !== void 0 && d(v, O) ? (h = s, v) : (h = s, y = O);
|
|
104
|
-
}
|
|
105
|
-
var w = !1, h, y, _ = f === void 0 ? null : f;
|
|
106
|
-
return [
|
|
107
|
-
function() {
|
|
108
|
-
return C(i());
|
|
109
|
-
},
|
|
110
|
-
_ === null ? void 0 : function() {
|
|
111
|
-
return C(_());
|
|
112
|
-
}
|
|
113
|
-
];
|
|
114
|
-
},
|
|
115
|
-
[i, f, p, d]
|
|
116
|
-
);
|
|
117
|
-
var S = r(u, a[0], a[1]);
|
|
118
|
-
return l(
|
|
119
|
-
function() {
|
|
120
|
-
c.hasValue = !0, c.value = S;
|
|
121
|
-
},
|
|
122
|
-
[S]
|
|
123
|
-
), E(S), S;
|
|
124
|
-
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
125
|
-
})()), V;
|
|
126
|
-
}
|
|
127
|
-
var k;
|
|
128
|
-
function B() {
|
|
129
|
-
return k || (k = 1, process.env.NODE_ENV === "production" ? x.exports = U() : x.exports = z()), x.exports;
|
|
130
|
-
}
|
|
131
|
-
var G = B();
|
|
132
|
-
function K(e) {
|
|
133
|
-
e();
|
|
134
|
-
}
|
|
135
|
-
function P() {
|
|
136
|
-
let e = null, o = null;
|
|
137
|
-
return {
|
|
138
|
-
clear() {
|
|
139
|
-
e = null, o = null;
|
|
140
|
-
},
|
|
141
|
-
notify() {
|
|
142
|
-
K(() => {
|
|
143
|
-
let t = e;
|
|
144
|
-
for (; t; )
|
|
145
|
-
t.callback(), t = t.next;
|
|
146
|
-
});
|
|
147
|
-
},
|
|
148
|
-
get() {
|
|
149
|
-
const t = [];
|
|
150
|
-
let r = e;
|
|
151
|
-
for (; r; )
|
|
152
|
-
t.push(r), r = r.next;
|
|
153
|
-
return t;
|
|
154
|
-
},
|
|
155
|
-
subscribe(t) {
|
|
156
|
-
let r = !0;
|
|
157
|
-
const n = o = {
|
|
158
|
-
callback: t,
|
|
159
|
-
next: null,
|
|
160
|
-
prev: o
|
|
161
|
-
};
|
|
162
|
-
return n.prev ? n.prev.next = n : e = n, function() {
|
|
163
|
-
!r || e === null || (r = !1, n.next ? n.next.prev = n.prev : o = n.prev, n.prev ? n.prev.next = n.next : e = n.next);
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
var M = {
|
|
169
|
-
notify() {
|
|
170
|
-
},
|
|
171
|
-
get: () => []
|
|
172
|
-
};
|
|
173
|
-
function Y(e, o) {
|
|
174
|
-
let t, r = M, n = 0, l = !1;
|
|
175
|
-
function m(S) {
|
|
176
|
-
f();
|
|
177
|
-
const C = r.subscribe(S);
|
|
178
|
-
let w = !1;
|
|
179
|
-
return () => {
|
|
180
|
-
w || (w = !0, C(), p());
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
function E() {
|
|
184
|
-
r.notify();
|
|
185
|
-
}
|
|
186
|
-
function u() {
|
|
187
|
-
c.onStateChange && c.onStateChange();
|
|
188
|
-
}
|
|
189
|
-
function i() {
|
|
190
|
-
return l;
|
|
191
|
-
}
|
|
192
|
-
function f() {
|
|
193
|
-
n++, t || (t = e.subscribe(u), r = P());
|
|
194
|
-
}
|
|
195
|
-
function p() {
|
|
196
|
-
n--, t && n === 0 && (t(), t = void 0, r.clear(), r = M);
|
|
197
|
-
}
|
|
198
|
-
function d() {
|
|
199
|
-
l || (l = !0, f());
|
|
200
|
-
}
|
|
201
|
-
function a() {
|
|
202
|
-
l && (l = !1, p());
|
|
203
|
-
}
|
|
204
|
-
const c = {
|
|
205
|
-
addNestedSub: m,
|
|
206
|
-
notifyNestedSubs: E,
|
|
207
|
-
handleChangeWrapper: u,
|
|
208
|
-
isSubscribed: i,
|
|
209
|
-
trySubscribe: d,
|
|
210
|
-
tryUnsubscribe: a,
|
|
211
|
-
getListeners: () => r
|
|
212
|
-
};
|
|
213
|
-
return c;
|
|
214
|
-
}
|
|
215
|
-
var F = () => typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", J = /* @__PURE__ */ F(), Q = () => typeof navigator < "u" && navigator.product === "ReactNative", X = /* @__PURE__ */ Q(), Z = () => J || X ? b.useLayoutEffect : b.useEffect, $ = /* @__PURE__ */ Z(), q = /* @__PURE__ */ Symbol.for("react-redux-context"), ee = typeof globalThis < "u" ? globalThis : (
|
|
216
|
-
/* fall back to a per-module scope (pre-8.1 behaviour) if `globalThis` is not available */
|
|
217
|
-
{}
|
|
218
|
-
);
|
|
219
|
-
function te() {
|
|
220
|
-
if (!b.createContext) return {};
|
|
221
|
-
const e = ee[q] ??= /* @__PURE__ */ new Map();
|
|
222
|
-
let o = e.get(b.createContext);
|
|
223
|
-
return o || (o = b.createContext(
|
|
224
|
-
null
|
|
225
|
-
), process.env.NODE_ENV !== "production" && (o.displayName = "ReactRedux"), e.set(b.createContext, o)), o;
|
|
226
|
-
}
|
|
227
|
-
var g = /* @__PURE__ */ te();
|
|
228
|
-
function re(e) {
|
|
229
|
-
const { children: o, context: t, serverState: r, store: n } = e, l = b.useMemo(() => {
|
|
230
|
-
const u = Y(n), i = {
|
|
231
|
-
store: n,
|
|
232
|
-
subscription: u,
|
|
233
|
-
getServerState: r ? () => r : void 0
|
|
234
|
-
};
|
|
235
|
-
if (process.env.NODE_ENV === "production")
|
|
236
|
-
return i;
|
|
237
|
-
{
|
|
238
|
-
const { identityFunctionCheck: f = "once", stabilityCheck: p = "once" } = e;
|
|
239
|
-
return /* @__PURE__ */ Object.assign(i, {
|
|
240
|
-
stabilityCheck: p,
|
|
241
|
-
identityFunctionCheck: f
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
}, [n, r]), m = b.useMemo(() => n.getState(), [n]);
|
|
245
|
-
$(() => {
|
|
246
|
-
const { subscription: u } = l;
|
|
247
|
-
return u.onStateChange = u.notifyNestedSubs, u.trySubscribe(), m !== n.getState() && u.notifyNestedSubs(), () => {
|
|
248
|
-
u.tryUnsubscribe(), u.onStateChange = void 0;
|
|
249
|
-
};
|
|
250
|
-
}, [l, m]);
|
|
251
|
-
const E = t || g;
|
|
252
|
-
return /* @__PURE__ */ b.createElement(E.Provider, { value: l }, o);
|
|
253
|
-
}
|
|
254
|
-
var de = re;
|
|
255
|
-
function D(e = g) {
|
|
256
|
-
return function() {
|
|
257
|
-
const t = b.useContext(e);
|
|
258
|
-
if (process.env.NODE_ENV !== "production" && !t)
|
|
259
|
-
throw new Error(
|
|
260
|
-
"could not find react-redux context value; please ensure the component is wrapped in a <Provider>"
|
|
261
|
-
);
|
|
262
|
-
return t;
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
var j = /* @__PURE__ */ D();
|
|
266
|
-
function W(e = g) {
|
|
267
|
-
const o = e === g ? j : (
|
|
268
|
-
// @ts-ignore
|
|
269
|
-
D(e)
|
|
270
|
-
), t = () => {
|
|
271
|
-
const { store: r } = o();
|
|
272
|
-
return r;
|
|
273
|
-
};
|
|
274
|
-
return Object.assign(t, {
|
|
275
|
-
withTypes: () => t
|
|
276
|
-
}), t;
|
|
277
|
-
}
|
|
278
|
-
var ne = /* @__PURE__ */ W();
|
|
279
|
-
function oe(e = g) {
|
|
280
|
-
const o = e === g ? ne : W(e), t = () => o().dispatch;
|
|
281
|
-
return Object.assign(t, {
|
|
282
|
-
withTypes: () => t
|
|
283
|
-
}), t;
|
|
284
|
-
}
|
|
285
|
-
var ue = /* @__PURE__ */ oe(), se = (e, o) => e === o;
|
|
286
|
-
function ie(e = g) {
|
|
287
|
-
const o = e === g ? j : D(e), t = (r, n = {}) => {
|
|
288
|
-
const { equalityFn: l = se } = typeof n == "function" ? { equalityFn: n } : n;
|
|
289
|
-
if (process.env.NODE_ENV !== "production") {
|
|
290
|
-
if (!r)
|
|
291
|
-
throw new Error("You must pass a selector to useSelector");
|
|
292
|
-
if (typeof r != "function")
|
|
293
|
-
throw new Error("You must pass a function as a selector to useSelector");
|
|
294
|
-
if (typeof l != "function")
|
|
295
|
-
throw new Error(
|
|
296
|
-
"You must pass a function as an equality function to useSelector"
|
|
297
|
-
);
|
|
298
|
-
}
|
|
299
|
-
const m = o(), { store: E, subscription: u, getServerState: i } = m, f = b.useRef(!0), p = b.useCallback(
|
|
300
|
-
{
|
|
301
|
-
[r.name](a) {
|
|
302
|
-
const c = r(a);
|
|
303
|
-
if (process.env.NODE_ENV !== "production") {
|
|
304
|
-
const { devModeChecks: S = {} } = typeof n == "function" ? {} : n, { identityFunctionCheck: C, stabilityCheck: w } = m, {
|
|
305
|
-
identityFunctionCheck: h,
|
|
306
|
-
stabilityCheck: y
|
|
307
|
-
} = {
|
|
308
|
-
stabilityCheck: w,
|
|
309
|
-
identityFunctionCheck: C,
|
|
310
|
-
...S
|
|
311
|
-
};
|
|
312
|
-
if (y === "always" || y === "once" && f.current) {
|
|
313
|
-
const _ = r(a);
|
|
314
|
-
if (!l(c, _)) {
|
|
315
|
-
let s;
|
|
316
|
-
try {
|
|
317
|
-
throw new Error();
|
|
318
|
-
} catch (v) {
|
|
319
|
-
({ stack: s } = v);
|
|
320
|
-
}
|
|
321
|
-
console.warn(
|
|
322
|
-
"Selector " + (r.name || "unknown") + ` returned a different result when called with the same parameters. This can lead to unnecessary rerenders.
|
|
323
|
-
Selectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization`,
|
|
324
|
-
{
|
|
325
|
-
state: a,
|
|
326
|
-
selected: c,
|
|
327
|
-
selected2: _,
|
|
328
|
-
stack: s
|
|
329
|
-
}
|
|
330
|
-
);
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
if ((h === "always" || h === "once" && f.current) && c === a) {
|
|
334
|
-
let _;
|
|
335
|
-
try {
|
|
336
|
-
throw new Error();
|
|
337
|
-
} catch (s) {
|
|
338
|
-
({ stack: _ } = s);
|
|
339
|
-
}
|
|
340
|
-
console.warn(
|
|
341
|
-
"Selector " + (r.name || "unknown") + ` returned the root state when called. This can lead to unnecessary rerenders.
|
|
342
|
-
Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,
|
|
343
|
-
{ stack: _ }
|
|
344
|
-
);
|
|
345
|
-
}
|
|
346
|
-
f.current && (f.current = !1);
|
|
347
|
-
}
|
|
348
|
-
return c;
|
|
349
|
-
}
|
|
350
|
-
}[r.name],
|
|
351
|
-
[r]
|
|
352
|
-
), d = G.useSyncExternalStoreWithSelector(
|
|
353
|
-
u.addNestedSub,
|
|
354
|
-
E.getState,
|
|
355
|
-
i || E.getState,
|
|
356
|
-
p,
|
|
357
|
-
l
|
|
358
|
-
);
|
|
359
|
-
return b.useDebugValue(d), d;
|
|
360
|
-
};
|
|
361
|
-
return Object.assign(t, {
|
|
362
|
-
withTypes: () => t
|
|
363
|
-
}), t;
|
|
364
|
-
}
|
|
365
|
-
var ce = /* @__PURE__ */ ie();
|
|
366
|
-
let L = null;
|
|
367
|
-
function ae() {
|
|
368
|
-
return H({
|
|
369
|
-
reducer: I,
|
|
370
|
-
devTools: !1,
|
|
371
|
-
middleware: (e) => e({ thunk: !0 })
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
|
-
const ve = () => (L || (L = ae()), L), pe = ue.withTypes(), Se = ce.withTypes();
|
|
375
|
-
export {
|
|
376
|
-
de as P,
|
|
377
|
-
ue as a,
|
|
378
|
-
pe as b,
|
|
379
|
-
Se as c,
|
|
380
|
-
ve as g,
|
|
381
|
-
ce as u
|
|
382
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|