@symbo.ls/scratch 2.34.25 → 2.34.29

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/cjs/index.js CHANGED
@@ -1710,6 +1710,46 @@ ${element}` : ""
1710
1710
  }
1711
1711
  return element;
1712
1712
  };
1713
+ function getRootState(param) {
1714
+ var _a, _b;
1715
+ let state2 = null;
1716
+ const hasRootState = (obj) => {
1717
+ var _a2;
1718
+ return obj.__element && ((_a2 = obj.root) == null ? void 0 : _a2.isRootState);
1719
+ };
1720
+ if (!this) {
1721
+ state2 = window.platformState || ((_a = window.smblsApp) == null ? void 0 : _a.state);
1722
+ } else if (hasRootState(this)) {
1723
+ state2 = this.root;
1724
+ } else if (this.__ref && this.__ref.path) {
1725
+ const hasPlatformState = this.state && hasRootState(this.state);
1726
+ const hasPlatformStateOnParent = this.call("isFunction", this.state) && this.parent.state && hasRootState(this.parent.state);
1727
+ if (hasPlatformState || hasPlatformStateOnParent) {
1728
+ state2 = this.state.root || this.parent.state.root;
1729
+ }
1730
+ }
1731
+ if (!state2) {
1732
+ state2 = window.platformState || ((_b = window.smblsApp) == null ? void 0 : _b.state);
1733
+ }
1734
+ return param ? state2[param] : state2;
1735
+ }
1736
+ function getRoot(key) {
1737
+ var _a;
1738
+ const rootElem = (_a = this.getRootState()) == null ? void 0 : _a.__element;
1739
+ return rootElem && Object.keys(rootElem).length > 0 && key ? rootElem[key] : rootElem;
1740
+ }
1741
+ function getRootData(key) {
1742
+ return this.getRoot("data") && Object.keys(this.getRoot("data")).length > 0 && key ? this.getRoot("data")[key] : this.getRoot("data");
1743
+ }
1744
+ function getRootContext(key) {
1745
+ var _a;
1746
+ const ctx = (_a = this.getRoot()) == null ? void 0 : _a.context;
1747
+ return key ? ctx[key] : ctx;
1748
+ }
1749
+ function getContext(key) {
1750
+ const ctx = this.context;
1751
+ return key ? ctx[key] : ctx;
1752
+ }
1713
1753
  var ROOT = {
1714
1754
  key: ":root",
1715
1755
  node: document22 ? document22.body : report("DocumentNotDefined", document22)
@@ -2000,6 +2040,11 @@ ${element}` : ""
2000
2040
  "getRef",
2001
2041
  "getChildren",
2002
2042
  "getPath",
2043
+ "getRootState",
2044
+ "getRoot",
2045
+ "getRootData",
2046
+ "getRootContext",
2047
+ "getContext",
2003
2048
  "setNodeStyles",
2004
2049
  "spotByPath",
2005
2050
  "keys",
@@ -3118,6 +3163,11 @@ ${element}` : ""
3118
3163
  lookdown,
3119
3164
  lookdownAll,
3120
3165
  getRef,
3166
+ getRootState,
3167
+ getRoot,
3168
+ getRootData,
3169
+ getRootContext,
3170
+ getContext,
3121
3171
  getPath,
3122
3172
  setNodeStyles,
3123
3173
  spotByPath,
@@ -6009,6 +6059,9 @@ var applyReset = (reset = {}) => {
6009
6059
  ...templates,
6010
6060
  ...body
6011
6061
  },
6062
+ a: {
6063
+ color: "currentColor"
6064
+ },
6012
6065
  // form elements
6013
6066
  fieldset: {
6014
6067
  border: 0,
package/dist/cjs/set.js CHANGED
@@ -1710,6 +1710,46 @@ ${element}` : ""
1710
1710
  }
1711
1711
  return element;
1712
1712
  };
1713
+ function getRootState(param) {
1714
+ var _a, _b;
1715
+ let state2 = null;
1716
+ const hasRootState = (obj) => {
1717
+ var _a2;
1718
+ return obj.__element && ((_a2 = obj.root) == null ? void 0 : _a2.isRootState);
1719
+ };
1720
+ if (!this) {
1721
+ state2 = window.platformState || ((_a = window.smblsApp) == null ? void 0 : _a.state);
1722
+ } else if (hasRootState(this)) {
1723
+ state2 = this.root;
1724
+ } else if (this.__ref && this.__ref.path) {
1725
+ const hasPlatformState = this.state && hasRootState(this.state);
1726
+ const hasPlatformStateOnParent = this.call("isFunction", this.state) && this.parent.state && hasRootState(this.parent.state);
1727
+ if (hasPlatformState || hasPlatformStateOnParent) {
1728
+ state2 = this.state.root || this.parent.state.root;
1729
+ }
1730
+ }
1731
+ if (!state2) {
1732
+ state2 = window.platformState || ((_b = window.smblsApp) == null ? void 0 : _b.state);
1733
+ }
1734
+ return param ? state2[param] : state2;
1735
+ }
1736
+ function getRoot(key) {
1737
+ var _a;
1738
+ const rootElem = (_a = this.getRootState()) == null ? void 0 : _a.__element;
1739
+ return rootElem && Object.keys(rootElem).length > 0 && key ? rootElem[key] : rootElem;
1740
+ }
1741
+ function getRootData(key) {
1742
+ return this.getRoot("data") && Object.keys(this.getRoot("data")).length > 0 && key ? this.getRoot("data")[key] : this.getRoot("data");
1743
+ }
1744
+ function getRootContext(key) {
1745
+ var _a;
1746
+ const ctx = (_a = this.getRoot()) == null ? void 0 : _a.context;
1747
+ return key ? ctx[key] : ctx;
1748
+ }
1749
+ function getContext(key) {
1750
+ const ctx = this.context;
1751
+ return key ? ctx[key] : ctx;
1752
+ }
1713
1753
  var ROOT = {
1714
1754
  key: ":root",
1715
1755
  node: document22 ? document22.body : report("DocumentNotDefined", document22)
@@ -2000,6 +2040,11 @@ ${element}` : ""
2000
2040
  "getRef",
2001
2041
  "getChildren",
2002
2042
  "getPath",
2043
+ "getRootState",
2044
+ "getRoot",
2045
+ "getRootData",
2046
+ "getRootContext",
2047
+ "getContext",
2003
2048
  "setNodeStyles",
2004
2049
  "spotByPath",
2005
2050
  "keys",
@@ -3118,6 +3163,11 @@ ${element}` : ""
3118
3163
  lookdown,
3119
3164
  lookdownAll,
3120
3165
  getRef,
3166
+ getRootState,
3167
+ getRoot,
3168
+ getRootData,
3169
+ getRootContext,
3170
+ getContext,
3121
3171
  getPath,
3122
3172
  setNodeStyles,
3123
3173
  spotByPath,
@@ -5472,6 +5522,9 @@ var applyReset = (reset = {}) => {
5472
5522
  ...templates,
5473
5523
  ...body
5474
5524
  },
5525
+ a: {
5526
+ color: "currentColor"
5527
+ },
5475
5528
  // form elements
5476
5529
  fieldset: {
5477
5530
  border: 0,
@@ -1710,6 +1710,46 @@ ${element}` : ""
1710
1710
  }
1711
1711
  return element;
1712
1712
  };
1713
+ function getRootState(param) {
1714
+ var _a, _b;
1715
+ let state2 = null;
1716
+ const hasRootState = (obj) => {
1717
+ var _a2;
1718
+ return obj.__element && ((_a2 = obj.root) == null ? void 0 : _a2.isRootState);
1719
+ };
1720
+ if (!this) {
1721
+ state2 = window.platformState || ((_a = window.smblsApp) == null ? void 0 : _a.state);
1722
+ } else if (hasRootState(this)) {
1723
+ state2 = this.root;
1724
+ } else if (this.__ref && this.__ref.path) {
1725
+ const hasPlatformState = this.state && hasRootState(this.state);
1726
+ const hasPlatformStateOnParent = this.call("isFunction", this.state) && this.parent.state && hasRootState(this.parent.state);
1727
+ if (hasPlatformState || hasPlatformStateOnParent) {
1728
+ state2 = this.state.root || this.parent.state.root;
1729
+ }
1730
+ }
1731
+ if (!state2) {
1732
+ state2 = window.platformState || ((_b = window.smblsApp) == null ? void 0 : _b.state);
1733
+ }
1734
+ return param ? state2[param] : state2;
1735
+ }
1736
+ function getRoot(key) {
1737
+ var _a;
1738
+ const rootElem = (_a = this.getRootState()) == null ? void 0 : _a.__element;
1739
+ return rootElem && Object.keys(rootElem).length > 0 && key ? rootElem[key] : rootElem;
1740
+ }
1741
+ function getRootData(key) {
1742
+ return this.getRoot("data") && Object.keys(this.getRoot("data")).length > 0 && key ? this.getRoot("data")[key] : this.getRoot("data");
1743
+ }
1744
+ function getRootContext(key) {
1745
+ var _a;
1746
+ const ctx = (_a = this.getRoot()) == null ? void 0 : _a.context;
1747
+ return key ? ctx[key] : ctx;
1748
+ }
1749
+ function getContext(key) {
1750
+ const ctx = this.context;
1751
+ return key ? ctx[key] : ctx;
1752
+ }
1713
1753
  var ROOT = {
1714
1754
  key: ":root",
1715
1755
  node: document22 ? document22.body : report("DocumentNotDefined", document22)
@@ -2000,6 +2040,11 @@ ${element}` : ""
2000
2040
  "getRef",
2001
2041
  "getChildren",
2002
2042
  "getPath",
2043
+ "getRootState",
2044
+ "getRoot",
2045
+ "getRootData",
2046
+ "getRootContext",
2047
+ "getContext",
2003
2048
  "setNodeStyles",
2004
2049
  "spotByPath",
2005
2050
  "keys",
@@ -3118,6 +3163,11 @@ ${element}` : ""
3118
3163
  lookdown,
3119
3164
  lookdownAll,
3120
3165
  getRef,
3166
+ getRootState,
3167
+ getRoot,
3168
+ getRootData,
3169
+ getRootContext,
3170
+ getContext,
3121
3171
  getPath,
3122
3172
  setNodeStyles,
3123
3173
  spotByPath,
@@ -1710,6 +1710,46 @@ ${element}` : ""
1710
1710
  }
1711
1711
  return element;
1712
1712
  };
1713
+ function getRootState(param) {
1714
+ var _a, _b;
1715
+ let state2 = null;
1716
+ const hasRootState = (obj) => {
1717
+ var _a2;
1718
+ return obj.__element && ((_a2 = obj.root) == null ? void 0 : _a2.isRootState);
1719
+ };
1720
+ if (!this) {
1721
+ state2 = window.platformState || ((_a = window.smblsApp) == null ? void 0 : _a.state);
1722
+ } else if (hasRootState(this)) {
1723
+ state2 = this.root;
1724
+ } else if (this.__ref && this.__ref.path) {
1725
+ const hasPlatformState = this.state && hasRootState(this.state);
1726
+ const hasPlatformStateOnParent = this.call("isFunction", this.state) && this.parent.state && hasRootState(this.parent.state);
1727
+ if (hasPlatformState || hasPlatformStateOnParent) {
1728
+ state2 = this.state.root || this.parent.state.root;
1729
+ }
1730
+ }
1731
+ if (!state2) {
1732
+ state2 = window.platformState || ((_b = window.smblsApp) == null ? void 0 : _b.state);
1733
+ }
1734
+ return param ? state2[param] : state2;
1735
+ }
1736
+ function getRoot(key) {
1737
+ var _a;
1738
+ const rootElem = (_a = this.getRootState()) == null ? void 0 : _a.__element;
1739
+ return rootElem && Object.keys(rootElem).length > 0 && key ? rootElem[key] : rootElem;
1740
+ }
1741
+ function getRootData(key) {
1742
+ return this.getRoot("data") && Object.keys(this.getRoot("data")).length > 0 && key ? this.getRoot("data")[key] : this.getRoot("data");
1743
+ }
1744
+ function getRootContext(key) {
1745
+ var _a;
1746
+ const ctx = (_a = this.getRoot()) == null ? void 0 : _a.context;
1747
+ return key ? ctx[key] : ctx;
1748
+ }
1749
+ function getContext(key) {
1750
+ const ctx = this.context;
1751
+ return key ? ctx[key] : ctx;
1752
+ }
1713
1753
  var ROOT = {
1714
1754
  key: ":root",
1715
1755
  node: document22 ? document22.body : report("DocumentNotDefined", document22)
@@ -2000,6 +2040,11 @@ ${element}` : ""
2000
2040
  "getRef",
2001
2041
  "getChildren",
2002
2042
  "getPath",
2043
+ "getRootState",
2044
+ "getRoot",
2045
+ "getRootData",
2046
+ "getRootContext",
2047
+ "getContext",
2003
2048
  "setNodeStyles",
2004
2049
  "spotByPath",
2005
2050
  "keys",
@@ -3118,6 +3163,11 @@ ${element}` : ""
3118
3163
  lookdown,
3119
3164
  lookdownAll,
3120
3165
  getRef,
3166
+ getRootState,
3167
+ getRoot,
3168
+ getRootData,
3169
+ getRootContext,
3170
+ getContext,
3121
3171
  getPath,
3122
3172
  setNodeStyles,
3123
3173
  spotByPath,
@@ -1710,6 +1710,46 @@ ${element}` : ""
1710
1710
  }
1711
1711
  return element;
1712
1712
  };
1713
+ function getRootState(param) {
1714
+ var _a, _b;
1715
+ let state2 = null;
1716
+ const hasRootState = (obj) => {
1717
+ var _a2;
1718
+ return obj.__element && ((_a2 = obj.root) == null ? void 0 : _a2.isRootState);
1719
+ };
1720
+ if (!this) {
1721
+ state2 = window.platformState || ((_a = window.smblsApp) == null ? void 0 : _a.state);
1722
+ } else if (hasRootState(this)) {
1723
+ state2 = this.root;
1724
+ } else if (this.__ref && this.__ref.path) {
1725
+ const hasPlatformState = this.state && hasRootState(this.state);
1726
+ const hasPlatformStateOnParent = this.call("isFunction", this.state) && this.parent.state && hasRootState(this.parent.state);
1727
+ if (hasPlatformState || hasPlatformStateOnParent) {
1728
+ state2 = this.state.root || this.parent.state.root;
1729
+ }
1730
+ }
1731
+ if (!state2) {
1732
+ state2 = window.platformState || ((_b = window.smblsApp) == null ? void 0 : _b.state);
1733
+ }
1734
+ return param ? state2[param] : state2;
1735
+ }
1736
+ function getRoot(key) {
1737
+ var _a;
1738
+ const rootElem = (_a = this.getRootState()) == null ? void 0 : _a.__element;
1739
+ return rootElem && Object.keys(rootElem).length > 0 && key ? rootElem[key] : rootElem;
1740
+ }
1741
+ function getRootData(key) {
1742
+ return this.getRoot("data") && Object.keys(this.getRoot("data")).length > 0 && key ? this.getRoot("data")[key] : this.getRoot("data");
1743
+ }
1744
+ function getRootContext(key) {
1745
+ var _a;
1746
+ const ctx = (_a = this.getRoot()) == null ? void 0 : _a.context;
1747
+ return key ? ctx[key] : ctx;
1748
+ }
1749
+ function getContext(key) {
1750
+ const ctx = this.context;
1751
+ return key ? ctx[key] : ctx;
1752
+ }
1713
1753
  var ROOT = {
1714
1754
  key: ":root",
1715
1755
  node: document22 ? document22.body : report("DocumentNotDefined", document22)
@@ -2000,6 +2040,11 @@ ${element}` : ""
2000
2040
  "getRef",
2001
2041
  "getChildren",
2002
2042
  "getPath",
2043
+ "getRootState",
2044
+ "getRoot",
2045
+ "getRootData",
2046
+ "getRootContext",
2047
+ "getContext",
2003
2048
  "setNodeStyles",
2004
2049
  "spotByPath",
2005
2050
  "keys",
@@ -3118,6 +3163,11 @@ ${element}` : ""
3118
3163
  lookdown,
3119
3164
  lookdownAll,
3120
3165
  getRef,
3166
+ getRootState,
3167
+ getRoot,
3168
+ getRootData,
3169
+ getRootContext,
3170
+ getContext,
3121
3171
  getPath,
3122
3172
  setNodeStyles,
3123
3173
  spotByPath,
@@ -1710,6 +1710,46 @@ ${element}` : ""
1710
1710
  }
1711
1711
  return element;
1712
1712
  };
1713
+ function getRootState(param) {
1714
+ var _a, _b;
1715
+ let state2 = null;
1716
+ const hasRootState = (obj) => {
1717
+ var _a2;
1718
+ return obj.__element && ((_a2 = obj.root) == null ? void 0 : _a2.isRootState);
1719
+ };
1720
+ if (!this) {
1721
+ state2 = window.platformState || ((_a = window.smblsApp) == null ? void 0 : _a.state);
1722
+ } else if (hasRootState(this)) {
1723
+ state2 = this.root;
1724
+ } else if (this.__ref && this.__ref.path) {
1725
+ const hasPlatformState = this.state && hasRootState(this.state);
1726
+ const hasPlatformStateOnParent = this.call("isFunction", this.state) && this.parent.state && hasRootState(this.parent.state);
1727
+ if (hasPlatformState || hasPlatformStateOnParent) {
1728
+ state2 = this.state.root || this.parent.state.root;
1729
+ }
1730
+ }
1731
+ if (!state2) {
1732
+ state2 = window.platformState || ((_b = window.smblsApp) == null ? void 0 : _b.state);
1733
+ }
1734
+ return param ? state2[param] : state2;
1735
+ }
1736
+ function getRoot(key) {
1737
+ var _a;
1738
+ const rootElem = (_a = this.getRootState()) == null ? void 0 : _a.__element;
1739
+ return rootElem && Object.keys(rootElem).length > 0 && key ? rootElem[key] : rootElem;
1740
+ }
1741
+ function getRootData(key) {
1742
+ return this.getRoot("data") && Object.keys(this.getRoot("data")).length > 0 && key ? this.getRoot("data")[key] : this.getRoot("data");
1743
+ }
1744
+ function getRootContext(key) {
1745
+ var _a;
1746
+ const ctx = (_a = this.getRoot()) == null ? void 0 : _a.context;
1747
+ return key ? ctx[key] : ctx;
1748
+ }
1749
+ function getContext(key) {
1750
+ const ctx = this.context;
1751
+ return key ? ctx[key] : ctx;
1752
+ }
1713
1753
  var ROOT = {
1714
1754
  key: ":root",
1715
1755
  node: document22 ? document22.body : report("DocumentNotDefined", document22)
@@ -2000,6 +2040,11 @@ ${element}` : ""
2000
2040
  "getRef",
2001
2041
  "getChildren",
2002
2042
  "getPath",
2043
+ "getRootState",
2044
+ "getRoot",
2045
+ "getRootData",
2046
+ "getRootContext",
2047
+ "getContext",
2003
2048
  "setNodeStyles",
2004
2049
  "spotByPath",
2005
2050
  "keys",
@@ -3118,6 +3163,11 @@ ${element}` : ""
3118
3163
  lookdown,
3119
3164
  lookdownAll,
3120
3165
  getRef,
3166
+ getRootState,
3167
+ getRoot,
3168
+ getRootData,
3169
+ getRootContext,
3170
+ getContext,
3121
3171
  getPath,
3122
3172
  setNodeStyles,
3123
3173
  spotByPath,
@@ -5671,6 +5721,9 @@ var applyReset = (reset = {}) => {
5671
5721
  ...templates,
5672
5722
  ...body
5673
5723
  },
5724
+ a: {
5725
+ color: "currentColor"
5726
+ },
5674
5727
  // form elements
5675
5728
  fieldset: {
5676
5729
  border: 0,
@@ -1710,6 +1710,46 @@ ${element}` : ""
1710
1710
  }
1711
1711
  return element;
1712
1712
  };
1713
+ function getRootState(param) {
1714
+ var _a, _b;
1715
+ let state2 = null;
1716
+ const hasRootState = (obj) => {
1717
+ var _a2;
1718
+ return obj.__element && ((_a2 = obj.root) == null ? void 0 : _a2.isRootState);
1719
+ };
1720
+ if (!this) {
1721
+ state2 = window.platformState || ((_a = window.smblsApp) == null ? void 0 : _a.state);
1722
+ } else if (hasRootState(this)) {
1723
+ state2 = this.root;
1724
+ } else if (this.__ref && this.__ref.path) {
1725
+ const hasPlatformState = this.state && hasRootState(this.state);
1726
+ const hasPlatformStateOnParent = this.call("isFunction", this.state) && this.parent.state && hasRootState(this.parent.state);
1727
+ if (hasPlatformState || hasPlatformStateOnParent) {
1728
+ state2 = this.state.root || this.parent.state.root;
1729
+ }
1730
+ }
1731
+ if (!state2) {
1732
+ state2 = window.platformState || ((_b = window.smblsApp) == null ? void 0 : _b.state);
1733
+ }
1734
+ return param ? state2[param] : state2;
1735
+ }
1736
+ function getRoot(key) {
1737
+ var _a;
1738
+ const rootElem = (_a = this.getRootState()) == null ? void 0 : _a.__element;
1739
+ return rootElem && Object.keys(rootElem).length > 0 && key ? rootElem[key] : rootElem;
1740
+ }
1741
+ function getRootData(key) {
1742
+ return this.getRoot("data") && Object.keys(this.getRoot("data")).length > 0 && key ? this.getRoot("data")[key] : this.getRoot("data");
1743
+ }
1744
+ function getRootContext(key) {
1745
+ var _a;
1746
+ const ctx = (_a = this.getRoot()) == null ? void 0 : _a.context;
1747
+ return key ? ctx[key] : ctx;
1748
+ }
1749
+ function getContext(key) {
1750
+ const ctx = this.context;
1751
+ return key ? ctx[key] : ctx;
1752
+ }
1713
1753
  var ROOT = {
1714
1754
  key: ":root",
1715
1755
  node: document22 ? document22.body : report("DocumentNotDefined", document22)
@@ -2000,6 +2040,11 @@ ${element}` : ""
2000
2040
  "getRef",
2001
2041
  "getChildren",
2002
2042
  "getPath",
2043
+ "getRootState",
2044
+ "getRoot",
2045
+ "getRootData",
2046
+ "getRootContext",
2047
+ "getContext",
2003
2048
  "setNodeStyles",
2004
2049
  "spotByPath",
2005
2050
  "keys",
@@ -3118,6 +3163,11 @@ ${element}` : ""
3118
3163
  lookdown,
3119
3164
  lookdownAll,
3120
3165
  getRef,
3166
+ getRootState,
3167
+ getRoot,
3168
+ getRootData,
3169
+ getRootContext,
3170
+ getContext,
3121
3171
  getPath,
3122
3172
  setNodeStyles,
3123
3173
  spotByPath,
@@ -4443,6 +4493,9 @@ var applyReset = (reset = {}) => {
4443
4493
  ...templates,
4444
4494
  ...body
4445
4495
  },
4496
+ a: {
4497
+ color: "currentColor"
4498
+ },
4446
4499
  // form elements
4447
4500
  fieldset: {
4448
4501
  border: 0,
@@ -1710,6 +1710,46 @@ ${element}` : ""
1710
1710
  }
1711
1711
  return element;
1712
1712
  };
1713
+ function getRootState(param) {
1714
+ var _a, _b;
1715
+ let state2 = null;
1716
+ const hasRootState = (obj) => {
1717
+ var _a2;
1718
+ return obj.__element && ((_a2 = obj.root) == null ? void 0 : _a2.isRootState);
1719
+ };
1720
+ if (!this) {
1721
+ state2 = window.platformState || ((_a = window.smblsApp) == null ? void 0 : _a.state);
1722
+ } else if (hasRootState(this)) {
1723
+ state2 = this.root;
1724
+ } else if (this.__ref && this.__ref.path) {
1725
+ const hasPlatformState = this.state && hasRootState(this.state);
1726
+ const hasPlatformStateOnParent = this.call("isFunction", this.state) && this.parent.state && hasRootState(this.parent.state);
1727
+ if (hasPlatformState || hasPlatformStateOnParent) {
1728
+ state2 = this.state.root || this.parent.state.root;
1729
+ }
1730
+ }
1731
+ if (!state2) {
1732
+ state2 = window.platformState || ((_b = window.smblsApp) == null ? void 0 : _b.state);
1733
+ }
1734
+ return param ? state2[param] : state2;
1735
+ }
1736
+ function getRoot(key) {
1737
+ var _a;
1738
+ const rootElem = (_a = this.getRootState()) == null ? void 0 : _a.__element;
1739
+ return rootElem && Object.keys(rootElem).length > 0 && key ? rootElem[key] : rootElem;
1740
+ }
1741
+ function getRootData(key) {
1742
+ return this.getRoot("data") && Object.keys(this.getRoot("data")).length > 0 && key ? this.getRoot("data")[key] : this.getRoot("data");
1743
+ }
1744
+ function getRootContext(key) {
1745
+ var _a;
1746
+ const ctx = (_a = this.getRoot()) == null ? void 0 : _a.context;
1747
+ return key ? ctx[key] : ctx;
1748
+ }
1749
+ function getContext(key) {
1750
+ const ctx = this.context;
1751
+ return key ? ctx[key] : ctx;
1752
+ }
1713
1753
  var ROOT = {
1714
1754
  key: ":root",
1715
1755
  node: document22 ? document22.body : report("DocumentNotDefined", document22)
@@ -2000,6 +2040,11 @@ ${element}` : ""
2000
2040
  "getRef",
2001
2041
  "getChildren",
2002
2042
  "getPath",
2043
+ "getRootState",
2044
+ "getRoot",
2045
+ "getRootData",
2046
+ "getRootContext",
2047
+ "getContext",
2003
2048
  "setNodeStyles",
2004
2049
  "spotByPath",
2005
2050
  "keys",
@@ -3118,6 +3163,11 @@ ${element}` : ""
3118
3163
  lookdown,
3119
3164
  lookdownAll,
3120
3165
  getRef,
3166
+ getRootState,
3167
+ getRoot,
3168
+ getRootData,
3169
+ getRootContext,
3170
+ getContext,
3121
3171
  getPath,
3122
3172
  setNodeStyles,
3123
3173
  spotByPath,
@@ -1710,6 +1710,46 @@ ${element}` : ""
1710
1710
  }
1711
1711
  return element;
1712
1712
  };
1713
+ function getRootState(param) {
1714
+ var _a, _b;
1715
+ let state2 = null;
1716
+ const hasRootState = (obj) => {
1717
+ var _a2;
1718
+ return obj.__element && ((_a2 = obj.root) == null ? void 0 : _a2.isRootState);
1719
+ };
1720
+ if (!this) {
1721
+ state2 = window.platformState || ((_a = window.smblsApp) == null ? void 0 : _a.state);
1722
+ } else if (hasRootState(this)) {
1723
+ state2 = this.root;
1724
+ } else if (this.__ref && this.__ref.path) {
1725
+ const hasPlatformState = this.state && hasRootState(this.state);
1726
+ const hasPlatformStateOnParent = this.call("isFunction", this.state) && this.parent.state && hasRootState(this.parent.state);
1727
+ if (hasPlatformState || hasPlatformStateOnParent) {
1728
+ state2 = this.state.root || this.parent.state.root;
1729
+ }
1730
+ }
1731
+ if (!state2) {
1732
+ state2 = window.platformState || ((_b = window.smblsApp) == null ? void 0 : _b.state);
1733
+ }
1734
+ return param ? state2[param] : state2;
1735
+ }
1736
+ function getRoot(key) {
1737
+ var _a;
1738
+ const rootElem = (_a = this.getRootState()) == null ? void 0 : _a.__element;
1739
+ return rootElem && Object.keys(rootElem).length > 0 && key ? rootElem[key] : rootElem;
1740
+ }
1741
+ function getRootData(key) {
1742
+ return this.getRoot("data") && Object.keys(this.getRoot("data")).length > 0 && key ? this.getRoot("data")[key] : this.getRoot("data");
1743
+ }
1744
+ function getRootContext(key) {
1745
+ var _a;
1746
+ const ctx = (_a = this.getRoot()) == null ? void 0 : _a.context;
1747
+ return key ? ctx[key] : ctx;
1748
+ }
1749
+ function getContext(key) {
1750
+ const ctx = this.context;
1751
+ return key ? ctx[key] : ctx;
1752
+ }
1713
1753
  var ROOT = {
1714
1754
  key: ":root",
1715
1755
  node: document22 ? document22.body : report("DocumentNotDefined", document22)
@@ -2000,6 +2040,11 @@ ${element}` : ""
2000
2040
  "getRef",
2001
2041
  "getChildren",
2002
2042
  "getPath",
2043
+ "getRootState",
2044
+ "getRoot",
2045
+ "getRootData",
2046
+ "getRootContext",
2047
+ "getContext",
2003
2048
  "setNodeStyles",
2004
2049
  "spotByPath",
2005
2050
  "keys",
@@ -3118,6 +3163,11 @@ ${element}` : ""
3118
3163
  lookdown,
3119
3164
  lookdownAll,
3120
3165
  getRef,
3166
+ getRootState,
3167
+ getRoot,
3168
+ getRootData,
3169
+ getRootContext,
3170
+ getContext,
3121
3171
  getPath,
3122
3172
  setNodeStyles,
3123
3173
  spotByPath,
@@ -1710,6 +1710,46 @@ ${element}` : ""
1710
1710
  }
1711
1711
  return element;
1712
1712
  };
1713
+ function getRootState(param) {
1714
+ var _a, _b;
1715
+ let state2 = null;
1716
+ const hasRootState = (obj) => {
1717
+ var _a2;
1718
+ return obj.__element && ((_a2 = obj.root) == null ? void 0 : _a2.isRootState);
1719
+ };
1720
+ if (!this) {
1721
+ state2 = window.platformState || ((_a = window.smblsApp) == null ? void 0 : _a.state);
1722
+ } else if (hasRootState(this)) {
1723
+ state2 = this.root;
1724
+ } else if (this.__ref && this.__ref.path) {
1725
+ const hasPlatformState = this.state && hasRootState(this.state);
1726
+ const hasPlatformStateOnParent = this.call("isFunction", this.state) && this.parent.state && hasRootState(this.parent.state);
1727
+ if (hasPlatformState || hasPlatformStateOnParent) {
1728
+ state2 = this.state.root || this.parent.state.root;
1729
+ }
1730
+ }
1731
+ if (!state2) {
1732
+ state2 = window.platformState || ((_b = window.smblsApp) == null ? void 0 : _b.state);
1733
+ }
1734
+ return param ? state2[param] : state2;
1735
+ }
1736
+ function getRoot(key) {
1737
+ var _a;
1738
+ const rootElem = (_a = this.getRootState()) == null ? void 0 : _a.__element;
1739
+ return rootElem && Object.keys(rootElem).length > 0 && key ? rootElem[key] : rootElem;
1740
+ }
1741
+ function getRootData(key) {
1742
+ return this.getRoot("data") && Object.keys(this.getRoot("data")).length > 0 && key ? this.getRoot("data")[key] : this.getRoot("data");
1743
+ }
1744
+ function getRootContext(key) {
1745
+ var _a;
1746
+ const ctx = (_a = this.getRoot()) == null ? void 0 : _a.context;
1747
+ return key ? ctx[key] : ctx;
1748
+ }
1749
+ function getContext(key) {
1750
+ const ctx = this.context;
1751
+ return key ? ctx[key] : ctx;
1752
+ }
1713
1753
  var ROOT = {
1714
1754
  key: ":root",
1715
1755
  node: document22 ? document22.body : report("DocumentNotDefined", document22)
@@ -2000,6 +2040,11 @@ ${element}` : ""
2000
2040
  "getRef",
2001
2041
  "getChildren",
2002
2042
  "getPath",
2043
+ "getRootState",
2044
+ "getRoot",
2045
+ "getRootData",
2046
+ "getRootContext",
2047
+ "getContext",
2003
2048
  "setNodeStyles",
2004
2049
  "spotByPath",
2005
2050
  "keys",
@@ -3118,6 +3163,11 @@ ${element}` : ""
3118
3163
  lookdown,
3119
3164
  lookdownAll,
3120
3165
  getRef,
3166
+ getRootState,
3167
+ getRoot,
3168
+ getRootData,
3169
+ getRootContext,
3170
+ getContext,
3121
3171
  getPath,
3122
3172
  setNodeStyles,
3123
3173
  spotByPath,
@@ -1710,6 +1710,46 @@ ${element}` : ""
1710
1710
  }
1711
1711
  return element;
1712
1712
  };
1713
+ function getRootState(param) {
1714
+ var _a, _b;
1715
+ let state2 = null;
1716
+ const hasRootState = (obj) => {
1717
+ var _a2;
1718
+ return obj.__element && ((_a2 = obj.root) == null ? void 0 : _a2.isRootState);
1719
+ };
1720
+ if (!this) {
1721
+ state2 = window.platformState || ((_a = window.smblsApp) == null ? void 0 : _a.state);
1722
+ } else if (hasRootState(this)) {
1723
+ state2 = this.root;
1724
+ } else if (this.__ref && this.__ref.path) {
1725
+ const hasPlatformState = this.state && hasRootState(this.state);
1726
+ const hasPlatformStateOnParent = this.call("isFunction", this.state) && this.parent.state && hasRootState(this.parent.state);
1727
+ if (hasPlatformState || hasPlatformStateOnParent) {
1728
+ state2 = this.state.root || this.parent.state.root;
1729
+ }
1730
+ }
1731
+ if (!state2) {
1732
+ state2 = window.platformState || ((_b = window.smblsApp) == null ? void 0 : _b.state);
1733
+ }
1734
+ return param ? state2[param] : state2;
1735
+ }
1736
+ function getRoot(key) {
1737
+ var _a;
1738
+ const rootElem = (_a = this.getRootState()) == null ? void 0 : _a.__element;
1739
+ return rootElem && Object.keys(rootElem).length > 0 && key ? rootElem[key] : rootElem;
1740
+ }
1741
+ function getRootData(key) {
1742
+ return this.getRoot("data") && Object.keys(this.getRoot("data")).length > 0 && key ? this.getRoot("data")[key] : this.getRoot("data");
1743
+ }
1744
+ function getRootContext(key) {
1745
+ var _a;
1746
+ const ctx = (_a = this.getRoot()) == null ? void 0 : _a.context;
1747
+ return key ? ctx[key] : ctx;
1748
+ }
1749
+ function getContext(key) {
1750
+ const ctx = this.context;
1751
+ return key ? ctx[key] : ctx;
1752
+ }
1713
1753
  var ROOT = {
1714
1754
  key: ":root",
1715
1755
  node: document22 ? document22.body : report("DocumentNotDefined", document22)
@@ -2000,6 +2040,11 @@ ${element}` : ""
2000
2040
  "getRef",
2001
2041
  "getChildren",
2002
2042
  "getPath",
2043
+ "getRootState",
2044
+ "getRoot",
2045
+ "getRootData",
2046
+ "getRootContext",
2047
+ "getContext",
2003
2048
  "setNodeStyles",
2004
2049
  "spotByPath",
2005
2050
  "keys",
@@ -3118,6 +3163,11 @@ ${element}` : ""
3118
3163
  lookdown,
3119
3164
  lookdownAll,
3120
3165
  getRef,
3166
+ getRootState,
3167
+ getRoot,
3168
+ getRootData,
3169
+ getRootContext,
3170
+ getContext,
3121
3171
  getPath,
3122
3172
  setNodeStyles,
3123
3173
  spotByPath,
@@ -1710,6 +1710,46 @@ ${element}` : ""
1710
1710
  }
1711
1711
  return element;
1712
1712
  };
1713
+ function getRootState(param) {
1714
+ var _a, _b;
1715
+ let state2 = null;
1716
+ const hasRootState = (obj) => {
1717
+ var _a2;
1718
+ return obj.__element && ((_a2 = obj.root) == null ? void 0 : _a2.isRootState);
1719
+ };
1720
+ if (!this) {
1721
+ state2 = window.platformState || ((_a = window.smblsApp) == null ? void 0 : _a.state);
1722
+ } else if (hasRootState(this)) {
1723
+ state2 = this.root;
1724
+ } else if (this.__ref && this.__ref.path) {
1725
+ const hasPlatformState = this.state && hasRootState(this.state);
1726
+ const hasPlatformStateOnParent = this.call("isFunction", this.state) && this.parent.state && hasRootState(this.parent.state);
1727
+ if (hasPlatformState || hasPlatformStateOnParent) {
1728
+ state2 = this.state.root || this.parent.state.root;
1729
+ }
1730
+ }
1731
+ if (!state2) {
1732
+ state2 = window.platformState || ((_b = window.smblsApp) == null ? void 0 : _b.state);
1733
+ }
1734
+ return param ? state2[param] : state2;
1735
+ }
1736
+ function getRoot(key) {
1737
+ var _a;
1738
+ const rootElem = (_a = this.getRootState()) == null ? void 0 : _a.__element;
1739
+ return rootElem && Object.keys(rootElem).length > 0 && key ? rootElem[key] : rootElem;
1740
+ }
1741
+ function getRootData(key) {
1742
+ return this.getRoot("data") && Object.keys(this.getRoot("data")).length > 0 && key ? this.getRoot("data")[key] : this.getRoot("data");
1743
+ }
1744
+ function getRootContext(key) {
1745
+ var _a;
1746
+ const ctx = (_a = this.getRoot()) == null ? void 0 : _a.context;
1747
+ return key ? ctx[key] : ctx;
1748
+ }
1749
+ function getContext(key) {
1750
+ const ctx = this.context;
1751
+ return key ? ctx[key] : ctx;
1752
+ }
1713
1753
  var ROOT = {
1714
1754
  key: ":root",
1715
1755
  node: document22 ? document22.body : report("DocumentNotDefined", document22)
@@ -2000,6 +2040,11 @@ ${element}` : ""
2000
2040
  "getRef",
2001
2041
  "getChildren",
2002
2042
  "getPath",
2043
+ "getRootState",
2044
+ "getRoot",
2045
+ "getRootData",
2046
+ "getRootContext",
2047
+ "getContext",
2003
2048
  "setNodeStyles",
2004
2049
  "spotByPath",
2005
2050
  "keys",
@@ -3118,6 +3163,11 @@ ${element}` : ""
3118
3163
  lookdown,
3119
3164
  lookdownAll,
3120
3165
  getRef,
3166
+ getRootState,
3167
+ getRoot,
3168
+ getRootData,
3169
+ getRootContext,
3170
+ getContext,
3121
3171
  getPath,
3122
3172
  setNodeStyles,
3123
3173
  spotByPath,
@@ -1710,6 +1710,46 @@ ${element}` : ""
1710
1710
  }
1711
1711
  return element;
1712
1712
  };
1713
+ function getRootState(param) {
1714
+ var _a, _b;
1715
+ let state2 = null;
1716
+ const hasRootState = (obj) => {
1717
+ var _a2;
1718
+ return obj.__element && ((_a2 = obj.root) == null ? void 0 : _a2.isRootState);
1719
+ };
1720
+ if (!this) {
1721
+ state2 = window.platformState || ((_a = window.smblsApp) == null ? void 0 : _a.state);
1722
+ } else if (hasRootState(this)) {
1723
+ state2 = this.root;
1724
+ } else if (this.__ref && this.__ref.path) {
1725
+ const hasPlatformState = this.state && hasRootState(this.state);
1726
+ const hasPlatformStateOnParent = this.call("isFunction", this.state) && this.parent.state && hasRootState(this.parent.state);
1727
+ if (hasPlatformState || hasPlatformStateOnParent) {
1728
+ state2 = this.state.root || this.parent.state.root;
1729
+ }
1730
+ }
1731
+ if (!state2) {
1732
+ state2 = window.platformState || ((_b = window.smblsApp) == null ? void 0 : _b.state);
1733
+ }
1734
+ return param ? state2[param] : state2;
1735
+ }
1736
+ function getRoot(key) {
1737
+ var _a;
1738
+ const rootElem = (_a = this.getRootState()) == null ? void 0 : _a.__element;
1739
+ return rootElem && Object.keys(rootElem).length > 0 && key ? rootElem[key] : rootElem;
1740
+ }
1741
+ function getRootData(key) {
1742
+ return this.getRoot("data") && Object.keys(this.getRoot("data")).length > 0 && key ? this.getRoot("data")[key] : this.getRoot("data");
1743
+ }
1744
+ function getRootContext(key) {
1745
+ var _a;
1746
+ const ctx = (_a = this.getRoot()) == null ? void 0 : _a.context;
1747
+ return key ? ctx[key] : ctx;
1748
+ }
1749
+ function getContext(key) {
1750
+ const ctx = this.context;
1751
+ return key ? ctx[key] : ctx;
1752
+ }
1713
1753
  var ROOT = {
1714
1754
  key: ":root",
1715
1755
  node: document22 ? document22.body : report("DocumentNotDefined", document22)
@@ -2000,6 +2040,11 @@ ${element}` : ""
2000
2040
  "getRef",
2001
2041
  "getChildren",
2002
2042
  "getPath",
2043
+ "getRootState",
2044
+ "getRoot",
2045
+ "getRootData",
2046
+ "getRootContext",
2047
+ "getContext",
2003
2048
  "setNodeStyles",
2004
2049
  "spotByPath",
2005
2050
  "keys",
@@ -3118,6 +3163,11 @@ ${element}` : ""
3118
3163
  lookdown,
3119
3164
  lookdownAll,
3120
3165
  getRef,
3166
+ getRootState,
3167
+ getRoot,
3168
+ getRootData,
3169
+ getRootContext,
3170
+ getContext,
3121
3171
  getPath,
3122
3172
  setNodeStyles,
3123
3173
  spotByPath,
@@ -1710,6 +1710,46 @@ ${element}` : ""
1710
1710
  }
1711
1711
  return element;
1712
1712
  };
1713
+ function getRootState(param) {
1714
+ var _a, _b;
1715
+ let state2 = null;
1716
+ const hasRootState = (obj) => {
1717
+ var _a2;
1718
+ return obj.__element && ((_a2 = obj.root) == null ? void 0 : _a2.isRootState);
1719
+ };
1720
+ if (!this) {
1721
+ state2 = window.platformState || ((_a = window.smblsApp) == null ? void 0 : _a.state);
1722
+ } else if (hasRootState(this)) {
1723
+ state2 = this.root;
1724
+ } else if (this.__ref && this.__ref.path) {
1725
+ const hasPlatformState = this.state && hasRootState(this.state);
1726
+ const hasPlatformStateOnParent = this.call("isFunction", this.state) && this.parent.state && hasRootState(this.parent.state);
1727
+ if (hasPlatformState || hasPlatformStateOnParent) {
1728
+ state2 = this.state.root || this.parent.state.root;
1729
+ }
1730
+ }
1731
+ if (!state2) {
1732
+ state2 = window.platformState || ((_b = window.smblsApp) == null ? void 0 : _b.state);
1733
+ }
1734
+ return param ? state2[param] : state2;
1735
+ }
1736
+ function getRoot(key) {
1737
+ var _a;
1738
+ const rootElem = (_a = this.getRootState()) == null ? void 0 : _a.__element;
1739
+ return rootElem && Object.keys(rootElem).length > 0 && key ? rootElem[key] : rootElem;
1740
+ }
1741
+ function getRootData(key) {
1742
+ return this.getRoot("data") && Object.keys(this.getRoot("data")).length > 0 && key ? this.getRoot("data")[key] : this.getRoot("data");
1743
+ }
1744
+ function getRootContext(key) {
1745
+ var _a;
1746
+ const ctx = (_a = this.getRoot()) == null ? void 0 : _a.context;
1747
+ return key ? ctx[key] : ctx;
1748
+ }
1749
+ function getContext(key) {
1750
+ const ctx = this.context;
1751
+ return key ? ctx[key] : ctx;
1752
+ }
1713
1753
  var ROOT = {
1714
1754
  key: ":root",
1715
1755
  node: document22 ? document22.body : report("DocumentNotDefined", document22)
@@ -2000,6 +2040,11 @@ ${element}` : ""
2000
2040
  "getRef",
2001
2041
  "getChildren",
2002
2042
  "getPath",
2043
+ "getRootState",
2044
+ "getRoot",
2045
+ "getRootData",
2046
+ "getRootContext",
2047
+ "getContext",
2003
2048
  "setNodeStyles",
2004
2049
  "spotByPath",
2005
2050
  "keys",
@@ -3118,6 +3163,11 @@ ${element}` : ""
3118
3163
  lookdown,
3119
3164
  lookdownAll,
3120
3165
  getRef,
3166
+ getRootState,
3167
+ getRoot,
3168
+ getRootData,
3169
+ getRootContext,
3170
+ getContext,
3121
3171
  getPath,
3122
3172
  setNodeStyles,
3123
3173
  spotByPath,
@@ -1710,6 +1710,46 @@ ${element}` : ""
1710
1710
  }
1711
1711
  return element;
1712
1712
  };
1713
+ function getRootState(param) {
1714
+ var _a, _b;
1715
+ let state2 = null;
1716
+ const hasRootState = (obj) => {
1717
+ var _a2;
1718
+ return obj.__element && ((_a2 = obj.root) == null ? void 0 : _a2.isRootState);
1719
+ };
1720
+ if (!this) {
1721
+ state2 = window.platformState || ((_a = window.smblsApp) == null ? void 0 : _a.state);
1722
+ } else if (hasRootState(this)) {
1723
+ state2 = this.root;
1724
+ } else if (this.__ref && this.__ref.path) {
1725
+ const hasPlatformState = this.state && hasRootState(this.state);
1726
+ const hasPlatformStateOnParent = this.call("isFunction", this.state) && this.parent.state && hasRootState(this.parent.state);
1727
+ if (hasPlatformState || hasPlatformStateOnParent) {
1728
+ state2 = this.state.root || this.parent.state.root;
1729
+ }
1730
+ }
1731
+ if (!state2) {
1732
+ state2 = window.platformState || ((_b = window.smblsApp) == null ? void 0 : _b.state);
1733
+ }
1734
+ return param ? state2[param] : state2;
1735
+ }
1736
+ function getRoot(key) {
1737
+ var _a;
1738
+ const rootElem = (_a = this.getRootState()) == null ? void 0 : _a.__element;
1739
+ return rootElem && Object.keys(rootElem).length > 0 && key ? rootElem[key] : rootElem;
1740
+ }
1741
+ function getRootData(key) {
1742
+ return this.getRoot("data") && Object.keys(this.getRoot("data")).length > 0 && key ? this.getRoot("data")[key] : this.getRoot("data");
1743
+ }
1744
+ function getRootContext(key) {
1745
+ var _a;
1746
+ const ctx = (_a = this.getRoot()) == null ? void 0 : _a.context;
1747
+ return key ? ctx[key] : ctx;
1748
+ }
1749
+ function getContext(key) {
1750
+ const ctx = this.context;
1751
+ return key ? ctx[key] : ctx;
1752
+ }
1713
1753
  var ROOT = {
1714
1754
  key: ":root",
1715
1755
  node: document22 ? document22.body : report("DocumentNotDefined", document22)
@@ -2000,6 +2040,11 @@ ${element}` : ""
2000
2040
  "getRef",
2001
2041
  "getChildren",
2002
2042
  "getPath",
2043
+ "getRootState",
2044
+ "getRoot",
2045
+ "getRootData",
2046
+ "getRootContext",
2047
+ "getContext",
2003
2048
  "setNodeStyles",
2004
2049
  "spotByPath",
2005
2050
  "keys",
@@ -3118,6 +3163,11 @@ ${element}` : ""
3118
3163
  lookdown,
3119
3164
  lookdownAll,
3120
3165
  getRef,
3166
+ getRootState,
3167
+ getRoot,
3168
+ getRootData,
3169
+ getRootContext,
3170
+ getContext,
3121
3171
  getPath,
3122
3172
  setNodeStyles,
3123
3173
  spotByPath,
@@ -1710,6 +1710,46 @@ ${element}` : ""
1710
1710
  }
1711
1711
  return element;
1712
1712
  };
1713
+ function getRootState(param) {
1714
+ var _a, _b;
1715
+ let state2 = null;
1716
+ const hasRootState = (obj) => {
1717
+ var _a2;
1718
+ return obj.__element && ((_a2 = obj.root) == null ? void 0 : _a2.isRootState);
1719
+ };
1720
+ if (!this) {
1721
+ state2 = window.platformState || ((_a = window.smblsApp) == null ? void 0 : _a.state);
1722
+ } else if (hasRootState(this)) {
1723
+ state2 = this.root;
1724
+ } else if (this.__ref && this.__ref.path) {
1725
+ const hasPlatformState = this.state && hasRootState(this.state);
1726
+ const hasPlatformStateOnParent = this.call("isFunction", this.state) && this.parent.state && hasRootState(this.parent.state);
1727
+ if (hasPlatformState || hasPlatformStateOnParent) {
1728
+ state2 = this.state.root || this.parent.state.root;
1729
+ }
1730
+ }
1731
+ if (!state2) {
1732
+ state2 = window.platformState || ((_b = window.smblsApp) == null ? void 0 : _b.state);
1733
+ }
1734
+ return param ? state2[param] : state2;
1735
+ }
1736
+ function getRoot(key) {
1737
+ var _a;
1738
+ const rootElem = (_a = this.getRootState()) == null ? void 0 : _a.__element;
1739
+ return rootElem && Object.keys(rootElem).length > 0 && key ? rootElem[key] : rootElem;
1740
+ }
1741
+ function getRootData(key) {
1742
+ return this.getRoot("data") && Object.keys(this.getRoot("data")).length > 0 && key ? this.getRoot("data")[key] : this.getRoot("data");
1743
+ }
1744
+ function getRootContext(key) {
1745
+ var _a;
1746
+ const ctx = (_a = this.getRoot()) == null ? void 0 : _a.context;
1747
+ return key ? ctx[key] : ctx;
1748
+ }
1749
+ function getContext(key) {
1750
+ const ctx = this.context;
1751
+ return key ? ctx[key] : ctx;
1752
+ }
1713
1753
  var ROOT = {
1714
1754
  key: ":root",
1715
1755
  node: document22 ? document22.body : report("DocumentNotDefined", document22)
@@ -2000,6 +2040,11 @@ ${element}` : ""
2000
2040
  "getRef",
2001
2041
  "getChildren",
2002
2042
  "getPath",
2043
+ "getRootState",
2044
+ "getRoot",
2045
+ "getRootData",
2046
+ "getRootContext",
2047
+ "getContext",
2003
2048
  "setNodeStyles",
2004
2049
  "spotByPath",
2005
2050
  "keys",
@@ -3118,6 +3163,11 @@ ${element}` : ""
3118
3163
  lookdown,
3119
3164
  lookdownAll,
3120
3165
  getRef,
3166
+ getRootState,
3167
+ getRoot,
3168
+ getRootData,
3169
+ getRootContext,
3170
+ getContext,
3121
3171
  getPath,
3122
3172
  setNodeStyles,
3123
3173
  spotByPath,
@@ -1710,6 +1710,46 @@ ${element}` : ""
1710
1710
  }
1711
1711
  return element;
1712
1712
  };
1713
+ function getRootState(param) {
1714
+ var _a, _b;
1715
+ let state2 = null;
1716
+ const hasRootState = (obj) => {
1717
+ var _a2;
1718
+ return obj.__element && ((_a2 = obj.root) == null ? void 0 : _a2.isRootState);
1719
+ };
1720
+ if (!this) {
1721
+ state2 = window.platformState || ((_a = window.smblsApp) == null ? void 0 : _a.state);
1722
+ } else if (hasRootState(this)) {
1723
+ state2 = this.root;
1724
+ } else if (this.__ref && this.__ref.path) {
1725
+ const hasPlatformState = this.state && hasRootState(this.state);
1726
+ const hasPlatformStateOnParent = this.call("isFunction", this.state) && this.parent.state && hasRootState(this.parent.state);
1727
+ if (hasPlatformState || hasPlatformStateOnParent) {
1728
+ state2 = this.state.root || this.parent.state.root;
1729
+ }
1730
+ }
1731
+ if (!state2) {
1732
+ state2 = window.platformState || ((_b = window.smblsApp) == null ? void 0 : _b.state);
1733
+ }
1734
+ return param ? state2[param] : state2;
1735
+ }
1736
+ function getRoot(key) {
1737
+ var _a;
1738
+ const rootElem = (_a = this.getRootState()) == null ? void 0 : _a.__element;
1739
+ return rootElem && Object.keys(rootElem).length > 0 && key ? rootElem[key] : rootElem;
1740
+ }
1741
+ function getRootData(key) {
1742
+ return this.getRoot("data") && Object.keys(this.getRoot("data")).length > 0 && key ? this.getRoot("data")[key] : this.getRoot("data");
1743
+ }
1744
+ function getRootContext(key) {
1745
+ var _a;
1746
+ const ctx = (_a = this.getRoot()) == null ? void 0 : _a.context;
1747
+ return key ? ctx[key] : ctx;
1748
+ }
1749
+ function getContext(key) {
1750
+ const ctx = this.context;
1751
+ return key ? ctx[key] : ctx;
1752
+ }
1713
1753
  var ROOT = {
1714
1754
  key: ":root",
1715
1755
  node: document22 ? document22.body : report("DocumentNotDefined", document22)
@@ -2000,6 +2040,11 @@ ${element}` : ""
2000
2040
  "getRef",
2001
2041
  "getChildren",
2002
2042
  "getPath",
2043
+ "getRootState",
2044
+ "getRoot",
2045
+ "getRootData",
2046
+ "getRootContext",
2047
+ "getContext",
2003
2048
  "setNodeStyles",
2004
2049
  "spotByPath",
2005
2050
  "keys",
@@ -3118,6 +3163,11 @@ ${element}` : ""
3118
3163
  lookdown,
3119
3164
  lookdownAll,
3120
3165
  getRef,
3166
+ getRootState,
3167
+ getRoot,
3168
+ getRootData,
3169
+ getRootContext,
3170
+ getContext,
3121
3171
  getPath,
3122
3172
  setNodeStyles,
3123
3173
  spotByPath,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@symbo.ls/scratch",
3
3
  "description": "Φ / CSS framework and methodology.",
4
4
  "author": "symbo.ls",
5
- "version": "2.34.25",
5
+ "version": "2.34.29",
6
6
  "files": [
7
7
  "src",
8
8
  "dist"
@@ -25,9 +25,9 @@
25
25
  "prepublish": "rimraf -I dist && npm run build && npm run copy:package:cjs"
26
26
  },
27
27
  "dependencies": {
28
- "@domql/utils": "^2.34.25",
29
- "@symbo.ls/utils": "^2.34.25",
28
+ "@domql/utils": "^2.34.29",
29
+ "@symbo.ls/utils": "^2.34.29",
30
30
  "color-contrast-checker": "^1.5.0"
31
31
  },
32
- "gitHead": "d5d0fa6c595ec8b35ddb5520084a06b7689ecf42"
32
+ "gitHead": "90cb8b61065249122ff356c3ea6eb56191c49bfa"
33
33
  }
@@ -15,7 +15,9 @@ export const applyReset = (reset = {}) => {
15
15
  const configTemplates = TYPOGRAPHY.templates
16
16
 
17
17
  configReset.body = {
18
- ...(CONFIG.useDocumentTheme ? getMediaTheme('document', `@${CONFIG.globalTheme}`) : {}),
18
+ ...(CONFIG.useDocumentTheme
19
+ ? getMediaTheme('document', `@${CONFIG.globalTheme}`)
20
+ : {}),
19
21
  ...configTemplates.body
20
22
  }
21
23
  configReset.h1 = configTemplates.h1
@@ -27,7 +29,9 @@ export const applyReset = (reset = {}) => {
27
29
  }
28
30
 
29
31
  const { body, ...templates } = TYPOGRAPHY.templates
30
- const globalTheme = (CONFIG.useDocumentTheme ? getMediaTheme('document', `@${CONFIG.globalTheme}`) : {})
32
+ const globalTheme = CONFIG.useDocumentTheme
33
+ ? getMediaTheme('document', `@${CONFIG.globalTheme}`)
34
+ : {}
31
35
  if (RESET.html) overwriteDeep(RESET.html, globalTheme)
32
36
 
33
37
  return deepMerge(merge(RESET, reset), {
@@ -56,12 +60,17 @@ export const applyReset = (reset = {}) => {
56
60
  margin: 0,
57
61
  fontFamily: DOCUMENT.fontFamily,
58
62
 
59
- fontSize: TYPOGRAPHY.base / TYPOGRAPHY.browserDefault + CONFIG.UNIT.default,
63
+ fontSize:
64
+ TYPOGRAPHY.base / TYPOGRAPHY.browserDefault + CONFIG.UNIT.default,
60
65
 
61
66
  ...templates,
62
67
  ...body
63
68
  },
64
69
 
70
+ a: {
71
+ color: 'currentColor'
72
+ },
73
+
65
74
  // form elements
66
75
  fieldset: {
67
76
  border: 0,