@hanzo/ui 8.0.115 → 8.0.116
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/root.cjs +10 -4
- package/dist/root.d.ts.map +1 -1
- package/dist/root.js +10 -4
- package/dist/root.js.map +1 -1
- package/package.json +2 -2
package/dist/root.cjs
CHANGED
|
@@ -47,12 +47,18 @@ require("./styles.css");
|
|
|
47
47
|
* production. `styles.css` declares `--hanzo-ui-styles`, so the check is one
|
|
48
48
|
* lookup, it runs once, and it names the fix. Development only.
|
|
49
49
|
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
50
|
+
* Only a sheet with an OWNER ELEMENT counts. A bundler that processed the CSS
|
|
51
|
+
* emits a `<link>` or a `<style>`; jsdom loads no CSS at all, so a document
|
|
52
|
+
* with no such element cannot answer the question and must not be asked —
|
|
53
|
+
* throwing there breaks every consumer's unit tests to report a condition that
|
|
54
|
+
* cannot exist. Counting SHEETS instead of elements is what made that happen:
|
|
55
|
+
* the gui runtime inserts its own ownerless sheet while this module is being
|
|
56
|
+
* imported, so by first render jsdom was never empty and every jest consumer
|
|
57
|
+
* rendering `<Hanzo>` threw. */
|
|
53
58
|
let checked = false;
|
|
59
|
+
const styled = () => [...document.styleSheets].some((s) => s.ownerNode);
|
|
54
60
|
const assertStylesheet = () => {
|
|
55
|
-
if (checked || typeof document === 'undefined' ||
|
|
61
|
+
if (checked || typeof document === 'undefined' || !styled())
|
|
56
62
|
return;
|
|
57
63
|
checked = true;
|
|
58
64
|
if (getComputedStyle(document.documentElement).getPropertyValue('--hanzo-ui-styles').trim())
|
package/dist/root.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../src/root.tsx"],"names":[],"mappings":"AAqCA,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAKjD,OAAO,cAAc,CAAA;AAErB,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACxB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,eAAe,CAAA;CACtC,CAAA;
|
|
1
|
+
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../src/root.tsx"],"names":[],"mappings":"AAqCA,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAKjD,OAAO,cAAc,CAAA;AAErB,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACxB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,eAAe,CAAA;CACtC,CAAA;AA2BD,eAAO,MAAM,KAAK,GAAI,gCAAyC,UAAU,4CA+BxE,CAAA;AAED,eAAe,KAAK,CAAA"}
|
package/dist/root.js
CHANGED
|
@@ -44,12 +44,18 @@ import './styles.css';
|
|
|
44
44
|
* production. `styles.css` declares `--hanzo-ui-styles`, so the check is one
|
|
45
45
|
* lookup, it runs once, and it names the fix. Development only.
|
|
46
46
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
47
|
+
* Only a sheet with an OWNER ELEMENT counts. A bundler that processed the CSS
|
|
48
|
+
* emits a `<link>` or a `<style>`; jsdom loads no CSS at all, so a document
|
|
49
|
+
* with no such element cannot answer the question and must not be asked —
|
|
50
|
+
* throwing there breaks every consumer's unit tests to report a condition that
|
|
51
|
+
* cannot exist. Counting SHEETS instead of elements is what made that happen:
|
|
52
|
+
* the gui runtime inserts its own ownerless sheet while this module is being
|
|
53
|
+
* imported, so by first render jsdom was never empty and every jest consumer
|
|
54
|
+
* rendering `<Hanzo>` threw. */
|
|
50
55
|
let checked = false;
|
|
56
|
+
const styled = () => [...document.styleSheets].some((s) => s.ownerNode);
|
|
51
57
|
const assertStylesheet = () => {
|
|
52
|
-
if (checked || typeof document === 'undefined' ||
|
|
58
|
+
if (checked || typeof document === 'undefined' || !styled())
|
|
53
59
|
return;
|
|
54
60
|
checked = true;
|
|
55
61
|
if (getComputedStyle(document.documentElement).getPropertyValue('--hanzo-ui-styles').trim())
|
package/dist/root.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.js","sourceRoot":"","sources":["../src/root.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,iBAAiB,EAAwB,MAAM,qBAAqB,CAAA;AAC7E,OAAO,EAAE,SAAS,EAAkB,MAAM,OAAO,CAAA;AAEjD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,cAAc,CAAA;AAgCrB
|
|
1
|
+
{"version":3,"file":"root.js","sourceRoot":"","sources":["../src/root.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,iBAAiB,EAAwB,MAAM,qBAAqB,CAAA;AAC7E,OAAO,EAAE,SAAS,EAAkB,MAAM,OAAO,CAAA;AAEjD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAErD,OAAO,E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Y,EAAE,KAAK,EAAE,gBAAgB,kBAC/D,QAAQ,GACG,CACf,CAAA;IACD,6EAA6E;IAC7E,yEAAyE;IACzE,8EAA8E;IAC9E,qDAAqD;IACrD,IAAI,CAAC,SAAS;QAAE,OAAO,IAAI,CAAA;IAC3B,OAAO,KAAC,iBAAiB,OAAK,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,YAAG,IAAI,GAAqB,CAAA;AACjG,CAAC,CAAA;AAED,eAAe,KAAK,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/ui",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.116",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Hanzo UI — the one canonical Hanzo component library, on @hanzo/gui + @hanzo/design. ONE substrate: every component renders through @hanzo/gui primitives, so the same import works on web, native (expo) and desktop (Tauri). Self-contained (theme.css), presentational, host-agnostic, clean-room.",
|
|
6
6
|
"exports": {
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
"dist"
|
|
194
194
|
],
|
|
195
195
|
"dependencies": {
|
|
196
|
-
"@hanzo/appearance": "^0.
|
|
196
|
+
"@hanzo/appearance": "^0.2.2",
|
|
197
197
|
"@hanzo/brand": "^1.4.5",
|
|
198
198
|
"@hanzo/design": "^0.5.16",
|
|
199
199
|
"@hanzo/logo": "^1.0.13",
|