@plasmicapp/react-web 0.2.294 → 0.2.296
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/all.d.ts +4 -2
- package/dist/index.cjs.js +126 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/react-web.esm.js +126 -1
- package/dist/react-web.esm.js.map +1 -1
- package/dist/states/helpers.d.ts +6 -0
- package/package.json +9 -9
- package/skinny/dist/index.js +126 -1
- package/skinny/dist/index.js.map +1 -1
- package/skinny/dist/states/helpers.d.ts +6 -0
package/dist/react-web.esm.js
CHANGED
|
@@ -13,7 +13,6 @@ import { SSRProvider, useIsSSR as useIsSSR$1 } from '@react-aria/ssr';
|
|
|
13
13
|
import { useFocusRing, useFocusable, FocusScope } from '@react-aria/focus';
|
|
14
14
|
import { proxy, useSnapshot, ref, getVersion, subscribe } from 'valtio';
|
|
15
15
|
import clone from 'clone';
|
|
16
|
-
import deepEqual from 'fast-deep-equal';
|
|
17
16
|
import { useCheckbox as useCheckbox$1 } from '@react-aria/checkbox';
|
|
18
17
|
import { VisuallyHidden } from '@react-aria/visually-hidden';
|
|
19
18
|
import { useToggleState } from '@react-stately/toggle';
|
|
@@ -2641,6 +2640,132 @@ function assignValue(object, key, value) {
|
|
|
2641
2640
|
baseAssignValue(object, key, value);
|
|
2642
2641
|
}
|
|
2643
2642
|
}
|
|
2643
|
+
var isInstanceOfMap = function (a) {
|
|
2644
|
+
return a != null &&
|
|
2645
|
+
typeof a === "object" &&
|
|
2646
|
+
"size" in a &&
|
|
2647
|
+
typeof a.entries === "function" &&
|
|
2648
|
+
typeof a.get === "function" &&
|
|
2649
|
+
typeof a.set === "function" &&
|
|
2650
|
+
typeof a.has === "function";
|
|
2651
|
+
};
|
|
2652
|
+
var isInstanceOfSet = function (a) {
|
|
2653
|
+
return a != null &&
|
|
2654
|
+
typeof a === "object" &&
|
|
2655
|
+
"size" in a &&
|
|
2656
|
+
typeof a.entries === "function" &&
|
|
2657
|
+
typeof a.add === "function" &&
|
|
2658
|
+
typeof a.has === "function" &&
|
|
2659
|
+
typeof a.delete === "function";
|
|
2660
|
+
};
|
|
2661
|
+
var isRegExp = function (a) {
|
|
2662
|
+
return Object.prototype.toString.call(a) === "[object RegExp]";
|
|
2663
|
+
};
|
|
2664
|
+
/**
|
|
2665
|
+
* Forked from https://github.com/jamesfoster/DeepEqual
|
|
2666
|
+
* Changes: removed the comparison between constructors and instanceof objects
|
|
2667
|
+
* because they are dependent on the window object
|
|
2668
|
+
*/
|
|
2669
|
+
function deepEqual(a, b) {
|
|
2670
|
+
var e_4, _a, e_5, _b, e_6, _c;
|
|
2671
|
+
if (a === b)
|
|
2672
|
+
return true;
|
|
2673
|
+
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
2674
|
+
// if (a.constructor !== b.constructor) return false;
|
|
2675
|
+
var length, i, keys;
|
|
2676
|
+
if (Array.isArray(a)) {
|
|
2677
|
+
length = a.length;
|
|
2678
|
+
if (length != b.length)
|
|
2679
|
+
return false;
|
|
2680
|
+
for (i = length; i-- !== 0;)
|
|
2681
|
+
if (!deepEqual(a[i], b[i]))
|
|
2682
|
+
return false;
|
|
2683
|
+
return true;
|
|
2684
|
+
}
|
|
2685
|
+
// if ((a instanceof Map) && (b instanceof Map)) {
|
|
2686
|
+
if (isInstanceOfMap(a) && isInstanceOfMap(b)) {
|
|
2687
|
+
if (a.size !== b.size)
|
|
2688
|
+
return false;
|
|
2689
|
+
try {
|
|
2690
|
+
for (var _d = __values(a.entries()), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
2691
|
+
i = _e.value;
|
|
2692
|
+
if (!b.has(i[0]))
|
|
2693
|
+
return false;
|
|
2694
|
+
}
|
|
2695
|
+
}
|
|
2696
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
2697
|
+
finally {
|
|
2698
|
+
try {
|
|
2699
|
+
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
|
|
2700
|
+
}
|
|
2701
|
+
finally { if (e_4) throw e_4.error; }
|
|
2702
|
+
}
|
|
2703
|
+
try {
|
|
2704
|
+
for (var _f = __values(a.entries()), _g = _f.next(); !_g.done; _g = _f.next()) {
|
|
2705
|
+
i = _g.value;
|
|
2706
|
+
if (!deepEqual(i[1], b.get(i[0])))
|
|
2707
|
+
return false;
|
|
2708
|
+
}
|
|
2709
|
+
}
|
|
2710
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
2711
|
+
finally {
|
|
2712
|
+
try {
|
|
2713
|
+
if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
|
|
2714
|
+
}
|
|
2715
|
+
finally { if (e_5) throw e_5.error; }
|
|
2716
|
+
}
|
|
2717
|
+
return true;
|
|
2718
|
+
}
|
|
2719
|
+
// if ((a instanceof Set) && (b instanceof Set)) {
|
|
2720
|
+
if (isInstanceOfSet(a) && isInstanceOfSet(b)) {
|
|
2721
|
+
if (a.size !== b.size)
|
|
2722
|
+
return false;
|
|
2723
|
+
try {
|
|
2724
|
+
for (var _h = __values(a.entries()), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
2725
|
+
i = _j.value;
|
|
2726
|
+
if (!b.has(i[0]))
|
|
2727
|
+
return false;
|
|
2728
|
+
}
|
|
2729
|
+
}
|
|
2730
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
2731
|
+
finally {
|
|
2732
|
+
try {
|
|
2733
|
+
if (_j && !_j.done && (_c = _h.return)) _c.call(_h);
|
|
2734
|
+
}
|
|
2735
|
+
finally { if (e_6) throw e_6.error; }
|
|
2736
|
+
}
|
|
2737
|
+
return true;
|
|
2738
|
+
}
|
|
2739
|
+
// if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
2740
|
+
if (isRegExp(a) && isRegExp(b))
|
|
2741
|
+
return a.source === b.source && a.flags === b.flags;
|
|
2742
|
+
if (a.valueOf !== Object.prototype.valueOf)
|
|
2743
|
+
return a.valueOf() === b.valueOf();
|
|
2744
|
+
if (a.toString !== Object.prototype.toString)
|
|
2745
|
+
return a.toString() === b.toString();
|
|
2746
|
+
keys = Object.keys(a);
|
|
2747
|
+
length = keys.length;
|
|
2748
|
+
if (length !== Object.keys(b).length)
|
|
2749
|
+
return false;
|
|
2750
|
+
for (i = length; i-- !== 0;)
|
|
2751
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
|
|
2752
|
+
return false;
|
|
2753
|
+
for (i = length; i-- !== 0;) {
|
|
2754
|
+
var key = keys[i];
|
|
2755
|
+
if (key === "_owner" && a.$$typeof) {
|
|
2756
|
+
// React-specific: avoid traversing React elements' _owner.
|
|
2757
|
+
// _owner contains circular references
|
|
2758
|
+
// and is not needed when comparing the actual elements (and not their owners)
|
|
2759
|
+
continue;
|
|
2760
|
+
}
|
|
2761
|
+
if (!deepEqual(a[key], b[key]))
|
|
2762
|
+
return false;
|
|
2763
|
+
}
|
|
2764
|
+
return true;
|
|
2765
|
+
}
|
|
2766
|
+
// true if both NaN, false otherwise
|
|
2767
|
+
return a !== a && b !== b;
|
|
2768
|
+
}
|
|
2644
2769
|
|
|
2645
2770
|
// Utilities used by generated code
|
|
2646
2771
|
var classNames = classNames$1;
|