@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.
@@ -41,4 +41,10 @@ export declare function assert<T>(cond: T, msg?: StringGen): asserts cond;
41
41
  * Changes: fixed setting a deep value to a proxy object
42
42
  */
43
43
  export declare function set(obj: any, keys: any, val: any): void;
44
+ /**
45
+ * Forked from https://github.com/jamesfoster/DeepEqual
46
+ * Changes: removed the comparison between constructors and instanceof objects
47
+ * because they are dependent on the window object
48
+ */
49
+ export declare function deepEqual(a: any, b: any): boolean;
44
50
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicapp/react-web",
3
- "version": "0.2.294",
3
+ "version": "0.2.296",
4
4
  "description": "plasmic library for rendering in the presentational style",
5
5
  "main": "dist/index.cjs.js",
6
6
  "types": "dist/index.d.ts",
@@ -86,13 +86,13 @@
86
86
  "test-storybook": "test-storybook"
87
87
  },
88
88
  "dependencies": {
89
- "@plasmicapp/auth-react": "0.0.17",
90
- "@plasmicapp/data-sources": "0.1.136",
91
- "@plasmicapp/data-sources-context": "0.1.18",
92
- "@plasmicapp/host": "1.0.178",
93
- "@plasmicapp/loader-splits": "1.0.47",
94
- "@plasmicapp/prepass": "1.0.11",
95
- "@plasmicapp/query": "0.1.75",
89
+ "@plasmicapp/auth-react": "0.0.18",
90
+ "@plasmicapp/data-sources": "0.1.137",
91
+ "@plasmicapp/data-sources-context": "0.1.19",
92
+ "@plasmicapp/host": "1.0.179",
93
+ "@plasmicapp/loader-splits": "1.0.48",
94
+ "@plasmicapp/prepass": "1.0.12",
95
+ "@plasmicapp/query": "0.1.76",
96
96
  "@react-aria/checkbox": "^3.11.2",
97
97
  "@react-aria/focus": "^3.14.3",
98
98
  "@react-aria/interactions": "^3.19.1",
@@ -157,5 +157,5 @@
157
157
  "react": ">=16.8.0",
158
158
  "react-dom": ">=16.8.0"
159
159
  },
160
- "gitHead": "6f034859cd2316dfed75d01006abbc002149374c"
160
+ "gitHead": "48a2877c3dc093d101508fcdde2fd213055fdab9"
161
161
  }
@@ -15,7 +15,6 @@ import ReactDOM__default from 'react-dom';
15
15
  import { useFocusRing } from '@react-aria/focus';
16
16
  import { proxy, useSnapshot, ref, getVersion, subscribe } from 'valtio';
17
17
  import clone from 'clone';
18
- import deepEqual from 'fast-deep-equal';
19
18
  import '@react-aria/ssr';
20
19
  import '@plasmicapp/host';
21
20
 
@@ -1604,6 +1603,132 @@ function assignValue(object, key, value) {
1604
1603
  baseAssignValue(object, key, value);
1605
1604
  }
1606
1605
  }
1606
+ var isInstanceOfMap = function (a) {
1607
+ return a != null &&
1608
+ typeof a === "object" &&
1609
+ "size" in a &&
1610
+ typeof a.entries === "function" &&
1611
+ typeof a.get === "function" &&
1612
+ typeof a.set === "function" &&
1613
+ typeof a.has === "function";
1614
+ };
1615
+ var isInstanceOfSet = function (a) {
1616
+ return a != null &&
1617
+ typeof a === "object" &&
1618
+ "size" in a &&
1619
+ typeof a.entries === "function" &&
1620
+ typeof a.add === "function" &&
1621
+ typeof a.has === "function" &&
1622
+ typeof a.delete === "function";
1623
+ };
1624
+ var isRegExp = function (a) {
1625
+ return Object.prototype.toString.call(a) === "[object RegExp]";
1626
+ };
1627
+ /**
1628
+ * Forked from https://github.com/jamesfoster/DeepEqual
1629
+ * Changes: removed the comparison between constructors and instanceof objects
1630
+ * because they are dependent on the window object
1631
+ */
1632
+ function deepEqual(a, b) {
1633
+ var e_4, _a, e_5, _b, e_6, _c;
1634
+ if (a === b)
1635
+ return true;
1636
+ if (a && b && typeof a == "object" && typeof b == "object") {
1637
+ // if (a.constructor !== b.constructor) return false;
1638
+ var length, i, keys;
1639
+ if (Array.isArray(a)) {
1640
+ length = a.length;
1641
+ if (length != b.length)
1642
+ return false;
1643
+ for (i = length; i-- !== 0;)
1644
+ if (!deepEqual(a[i], b[i]))
1645
+ return false;
1646
+ return true;
1647
+ }
1648
+ // if ((a instanceof Map) && (b instanceof Map)) {
1649
+ if (isInstanceOfMap(a) && isInstanceOfMap(b)) {
1650
+ if (a.size !== b.size)
1651
+ return false;
1652
+ try {
1653
+ for (var _d = __values(a.entries()), _e = _d.next(); !_e.done; _e = _d.next()) {
1654
+ i = _e.value;
1655
+ if (!b.has(i[0]))
1656
+ return false;
1657
+ }
1658
+ }
1659
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
1660
+ finally {
1661
+ try {
1662
+ if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
1663
+ }
1664
+ finally { if (e_4) throw e_4.error; }
1665
+ }
1666
+ try {
1667
+ for (var _f = __values(a.entries()), _g = _f.next(); !_g.done; _g = _f.next()) {
1668
+ i = _g.value;
1669
+ if (!deepEqual(i[1], b.get(i[0])))
1670
+ return false;
1671
+ }
1672
+ }
1673
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
1674
+ finally {
1675
+ try {
1676
+ if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
1677
+ }
1678
+ finally { if (e_5) throw e_5.error; }
1679
+ }
1680
+ return true;
1681
+ }
1682
+ // if ((a instanceof Set) && (b instanceof Set)) {
1683
+ if (isInstanceOfSet(a) && isInstanceOfSet(b)) {
1684
+ if (a.size !== b.size)
1685
+ return false;
1686
+ try {
1687
+ for (var _h = __values(a.entries()), _j = _h.next(); !_j.done; _j = _h.next()) {
1688
+ i = _j.value;
1689
+ if (!b.has(i[0]))
1690
+ return false;
1691
+ }
1692
+ }
1693
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
1694
+ finally {
1695
+ try {
1696
+ if (_j && !_j.done && (_c = _h.return)) _c.call(_h);
1697
+ }
1698
+ finally { if (e_6) throw e_6.error; }
1699
+ }
1700
+ return true;
1701
+ }
1702
+ // if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
1703
+ if (isRegExp(a) && isRegExp(b))
1704
+ return a.source === b.source && a.flags === b.flags;
1705
+ if (a.valueOf !== Object.prototype.valueOf)
1706
+ return a.valueOf() === b.valueOf();
1707
+ if (a.toString !== Object.prototype.toString)
1708
+ return a.toString() === b.toString();
1709
+ keys = Object.keys(a);
1710
+ length = keys.length;
1711
+ if (length !== Object.keys(b).length)
1712
+ return false;
1713
+ for (i = length; i-- !== 0;)
1714
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
1715
+ return false;
1716
+ for (i = length; i-- !== 0;) {
1717
+ var key = keys[i];
1718
+ if (key === "_owner" && a.$$typeof) {
1719
+ // React-specific: avoid traversing React elements' _owner.
1720
+ // _owner contains circular references
1721
+ // and is not needed when comparing the actual elements (and not their owners)
1722
+ continue;
1723
+ }
1724
+ if (!deepEqual(a[key], b[key]))
1725
+ return false;
1726
+ }
1727
+ return true;
1728
+ }
1729
+ // true if both NaN, false otherwise
1730
+ return a !== a && b !== b;
1731
+ }
1607
1732
 
1608
1733
  // Utilities used by generated code
1609
1734
  var classNames = classNames$1;