@hanzo/ui 8.0.70 → 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/glass.css +12 -1
- package/dist/gui-config.cjs +142 -4
- package/dist/gui-config.d.ts +27 -2
- package/dist/gui-config.d.ts.map +1 -1
- package/dist/gui-config.js +141 -4
- package/dist/gui-config.js.map +1 -1
- package/dist/product/accent.cjs +35 -0
- package/dist/product/accent.d.ts.map +1 -1
- package/dist/product/accent.js +35 -0
- package/dist/product/accent.js.map +1 -1
- 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/dist/styles.css +271 -258
- package/dist/theme.css +12 -1
- package/package.json +4 -3
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,qBAAqB,CAAA;
|
|
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;;;;;;qEAMqE;AACrE,IAAI,OAAO,GAAG,KAAK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