@hanzo/ui 8.0.71 → 8.0.72
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 +20 -0
- package/dist/root.d.ts +1 -1
- package/dist/root.d.ts.map +1 -1
- package/dist/root.js +20 -0
- package/dist/root.js.map +1 -1
- package/package.json +2 -1
package/dist/root.cjs
CHANGED
|
@@ -39,6 +39,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
39
39
|
*/
|
|
40
40
|
const gui_1 = require("@hanzo/gui");
|
|
41
41
|
const telemetry_1 = require("@hanzogui/telemetry");
|
|
42
|
+
const react_1 = require("react");
|
|
43
|
+
const state_1 = require("@hanzo/appearance/state");
|
|
42
44
|
const gui_config_1 = require("./gui-config.cjs");
|
|
43
45
|
require("./styles.css");
|
|
44
46
|
/** A stylesheet that did not reach the document is invisible until someone opens
|
|
@@ -62,6 +64,24 @@ const assertStylesheet = () => {
|
|
|
62
64
|
const Hanzo = ({ children, theme = 'dark', analytics }) => {
|
|
63
65
|
if (process.env.NODE_ENV !== 'production')
|
|
64
66
|
assertStylesheet();
|
|
67
|
+
// A person's stored type size, density and accent, put on the document.
|
|
68
|
+
//
|
|
69
|
+
// Unconditional, unlike `analytics`, and the difference is the whole reason
|
|
70
|
+
// that one is a prop. Analytics starts a conversation with a server the app
|
|
71
|
+
// did not ask for; this reads a preference the PERSON already set on this
|
|
72
|
+
// device and honours it. An app that has to opt in is an app that forgets to,
|
|
73
|
+
// and then the setting silently does nothing on that surface — which is worse
|
|
74
|
+
// than not offering it.
|
|
75
|
+
//
|
|
76
|
+
// Costs nothing when unused: an axis nobody set is absent rather than
|
|
77
|
+
// neutral, so `apply()` removes the property instead of stamping a `1` that
|
|
78
|
+
// would outrank a brand's own scale.
|
|
79
|
+
//
|
|
80
|
+
// This is the MOUNT half only. First paint still wants `bootScript()` in
|
|
81
|
+
// <head>, because no component can run before the document exists.
|
|
82
|
+
(0, react_1.useEffect)(() => {
|
|
83
|
+
(0, state_1.apply)((0, state_1.read)());
|
|
84
|
+
}, []);
|
|
65
85
|
const tree = ((0, jsx_runtime_1.jsx)(gui_1.GuiProvider, { config: gui_config_1.config, defaultTheme: theme, disableInjectCSS: true, children: children }));
|
|
66
86
|
// OUTSIDE the gui provider: capture is delegated at the document, so it does
|
|
67
87
|
// not need to be inside the styled tree, and an app that renders its own
|
package/dist/root.d.ts
CHANGED
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,KAAK,
|
|
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;AAqBD,eAAO,MAAM,KAAK,GAAI,gCAAyC,UAAU,4CA+BxE,CAAA;AAED,eAAe,KAAK,CAAA"}
|
package/dist/root.js
CHANGED
|
@@ -36,6 +36,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
36
36
|
*/
|
|
37
37
|
import { GuiProvider } from '@hanzo/gui';
|
|
38
38
|
import { TelemetryProvider } from '@hanzogui/telemetry';
|
|
39
|
+
import { useEffect } from 'react';
|
|
40
|
+
import { apply, read } from '@hanzo/appearance/state';
|
|
39
41
|
import { config } from './gui-config.js';
|
|
40
42
|
import './styles.css';
|
|
41
43
|
/** A stylesheet that did not reach the document is invisible until someone opens
|
|
@@ -59,6 +61,24 @@ const assertStylesheet = () => {
|
|
|
59
61
|
export const Hanzo = ({ children, theme = 'dark', analytics }) => {
|
|
60
62
|
if (process.env.NODE_ENV !== 'production')
|
|
61
63
|
assertStylesheet();
|
|
64
|
+
// A person's stored type size, density and accent, put on the document.
|
|
65
|
+
//
|
|
66
|
+
// Unconditional, unlike `analytics`, and the difference is the whole reason
|
|
67
|
+
// that one is a prop. Analytics starts a conversation with a server the app
|
|
68
|
+
// did not ask for; this reads a preference the PERSON already set on this
|
|
69
|
+
// device and honours it. An app that has to opt in is an app that forgets to,
|
|
70
|
+
// and then the setting silently does nothing on that surface — which is worse
|
|
71
|
+
// than not offering it.
|
|
72
|
+
//
|
|
73
|
+
// Costs nothing when unused: an axis nobody set is absent rather than
|
|
74
|
+
// neutral, so `apply()` removes the property instead of stamping a `1` that
|
|
75
|
+
// would outrank a brand's own scale.
|
|
76
|
+
//
|
|
77
|
+
// This is the MOUNT half only. First paint still wants `bootScript()` in
|
|
78
|
+
// <head>, because no component can run before the document exists.
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
apply(read());
|
|
81
|
+
}, []);
|
|
62
82
|
const tree = (_jsx(GuiProvider, { config: config, defaultTheme: theme, disableInjectCSS: true, children: children }));
|
|
63
83
|
// OUTSIDE the gui provider: capture is delegated at the document, so it does
|
|
64
84
|
// not need to be inside the styled tree, and an app that renders its own
|
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,qBAAq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4EAA4E;IAC5E,qCAAqC;IACrC,EAAE;IACF,yEAAyE;IACzE,mEAAmE;IACnE,SAAS,CAAC,GAAG,EAAE;QACb,KAAK,CAAC,IAAI,EAAE,CAAC,CAAA;IACf,CAAC,EAAE,EAAE,CAAC,CAAA;IACN,MAAM,IAAI,GAAG,CACX,KAAC,WAAW,IAAC,MAAM,EAAE,MAAM,EAAE,YAAY,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.72",
|
|
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": {
|
|
@@ -187,6 +187,7 @@
|
|
|
187
187
|
"dist"
|
|
188
188
|
],
|
|
189
189
|
"dependencies": {
|
|
190
|
+
"@hanzo/appearance": "^0.1.4",
|
|
190
191
|
"@hanzo/design": "^0.5.1",
|
|
191
192
|
"@hanzo/logo": "^1.0.13",
|
|
192
193
|
"@hanzo/products": "^0.2.0",
|