@hanzo/ui 8.0.95 → 8.0.97
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/product/OrgMark.cjs
CHANGED
|
@@ -60,6 +60,23 @@ function monogram(name) {
|
|
|
60
60
|
.join('');
|
|
61
61
|
return (letters || name.trim().slice(0, 2)).toUpperCase();
|
|
62
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* A mark's glyph is sized by TOKEN, not by arithmetic.
|
|
65
|
+
*
|
|
66
|
+
* It used to be a ratio of the tile — `size * 0.4` — which bypasses the type
|
|
67
|
+
* system in two ways. It lands off the scale (at the 30px mark both identity
|
|
68
|
+
* controls use it computed 12, a value on no ladder, and the console's design
|
|
69
|
+
* sweep found it on every screen that renders a mark). And a raw pixel cannot
|
|
70
|
+
* answer to `--type-scale`: the ramp behind every token is
|
|
71
|
+
* `var(--text-sm, 13px)` and design multiplies it, so a person who turns their
|
|
72
|
+
* type up watches all text grow EXCEPT the monogram, which is the one place the
|
|
73
|
+
* drift is most visible because it sits beside their own name.
|
|
74
|
+
*
|
|
75
|
+
* So the tile's size chooses a token and the token carries the value. Bands
|
|
76
|
+
* rather than a formula, because a token IS a band — the ladder is not linear,
|
|
77
|
+
* and rounding onto it is the same mistake in a nicer coat.
|
|
78
|
+
*/
|
|
79
|
+
const glyphToken = (size) => size < 26 ? '$1' : size < 34 ? '$2' : size < 44 ? '$4' : '$6';
|
|
63
80
|
function OrgMark({ org, size = 22, maxW }) {
|
|
64
81
|
// Reset when the mark changes: switcher rows reuse instances, so a failure on
|
|
65
82
|
// one org must not blank the next org's logo.
|
|
@@ -82,5 +99,5 @@ function OrgMark({ org, size = 22, maxW }) {
|
|
|
82
99
|
flexShrink: 0,
|
|
83
100
|
} }));
|
|
84
101
|
}
|
|
85
|
-
return ((0, jsx_runtime_1.jsx)(gui_1.YStack, { width: size, height: size, rounded: "$3", bg: "$color4", items: "center", justify: "center", style: { flexShrink: 0 }, children: (0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize:
|
|
102
|
+
return ((0, jsx_runtime_1.jsx)(gui_1.YStack, { width: size, height: size, rounded: "$3", bg: "$color4", items: "center", justify: "center", style: { flexShrink: 0 }, children: (0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: glyphToken(size), fontWeight: "800", color: "$color12", children: monogram(org.displayName || org.name) }) }));
|
|
86
103
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrgMark.d.ts","sourceRoot":"","sources":["../../src/product/OrgMark.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAElC;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAU7C;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAO7C;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,gFAAgF;IAChF,GAAG,EAAE,GAAG,CAAA;IACR,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;
|
|
1
|
+
{"version":3,"file":"OrgMark.d.ts","sourceRoot":"","sources":["../../src/product/OrgMark.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAElC;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAU7C;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAO7C;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,gFAAgF;IAChF,GAAG,EAAE,GAAG,CAAA;IACR,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAqBD,wBAAgB,OAAO,CAAC,EAAE,GAAG,EAAE,IAAS,EAAE,IAAI,EAAE,EAAE,YAAY,2CA0D7D"}
|
package/dist/product/OrgMark.js
CHANGED
|
@@ -55,6 +55,23 @@ export function monogram(name) {
|
|
|
55
55
|
.join('');
|
|
56
56
|
return (letters || name.trim().slice(0, 2)).toUpperCase();
|
|
57
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* A mark's glyph is sized by TOKEN, not by arithmetic.
|
|
60
|
+
*
|
|
61
|
+
* It used to be a ratio of the tile — `size * 0.4` — which bypasses the type
|
|
62
|
+
* system in two ways. It lands off the scale (at the 30px mark both identity
|
|
63
|
+
* controls use it computed 12, a value on no ladder, and the console's design
|
|
64
|
+
* sweep found it on every screen that renders a mark). And a raw pixel cannot
|
|
65
|
+
* answer to `--type-scale`: the ramp behind every token is
|
|
66
|
+
* `var(--text-sm, 13px)` and design multiplies it, so a person who turns their
|
|
67
|
+
* type up watches all text grow EXCEPT the monogram, which is the one place the
|
|
68
|
+
* drift is most visible because it sits beside their own name.
|
|
69
|
+
*
|
|
70
|
+
* So the tile's size chooses a token and the token carries the value. Bands
|
|
71
|
+
* rather than a formula, because a token IS a band — the ladder is not linear,
|
|
72
|
+
* and rounding onto it is the same mistake in a nicer coat.
|
|
73
|
+
*/
|
|
74
|
+
const glyphToken = (size) => size < 26 ? '$1' : size < 34 ? '$2' : size < 44 ? '$4' : '$6';
|
|
58
75
|
export function OrgMark({ org, size = 22, maxW }) {
|
|
59
76
|
// Reset when the mark changes: switcher rows reuse instances, so a failure on
|
|
60
77
|
// one org must not blank the next org's logo.
|
|
@@ -77,6 +94,6 @@ export function OrgMark({ org, size = 22, maxW }) {
|
|
|
77
94
|
flexShrink: 0,
|
|
78
95
|
} }));
|
|
79
96
|
}
|
|
80
|
-
return (_jsx(YStack, { width: size, height: size, rounded: "$3", bg: "$color4", items: "center", justify: "center", style: { flexShrink: 0 }, children: _jsx(Text, { fontSize:
|
|
97
|
+
return (_jsx(YStack, { width: size, height: size, rounded: "$3", bg: "$color4", items: "center", justify: "center", style: { flexShrink: 0 }, children: _jsx(Text, { fontSize: glyphToken(size), fontWeight: "800", color: "$color12", children: monogram(org.displayName || org.name) }) }));
|
|
81
98
|
}
|
|
82
99
|
//# sourceMappingURL=OrgMark.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrgMark.js","sourceRoot":"","sources":["../../src/product/OrgMark.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAIzC;;;;;;;GAOG;AACH,MAAM,UAAU,OAAO,CAAC,IAAY;IAClC,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,CAAA;IACrB,IAAI,CAAC,CAAC,IAAI,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC;QAAE,OAAO,KAAK,CAAA;IACrD,2EAA2E;IAC3E,4EAA4E;IAC5E,sDAAsD;IACtD,IAAI,CAAC,oDAAoD,CAAC,IAAI,CAAC,CAAC,CAAC;QAAE,OAAO,KAAK,CAAA;IAC/E,MAAM,GAAG,GAAI,IAA8C,CAAC,SAAS,CAAA;IACrE,MAAM,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAA;IACpE,OAAO,KAAK,IAAI,CAAC,CAAA;AACnB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY;IACnC,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC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ACZ,EAAE,EAAC,SAAS,EACZ,KAAK,EAAC,QAAQ,EACd,OAAO,EAAC,QAAQ,EAChB,KAAK,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,YAExB,KAAC,IAAI,IAAC,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,UAAU,EAAC,KAAK,EAAC,KAAK,EAAC,UAAU,YAChE,QAAQ,CAAC,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,IAAI,CAAC,GACjC,GACA,CACV,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/ui",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.97",
|
|
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": {
|
|
@@ -197,9 +197,6 @@
|
|
|
197
197
|
"@hanzo/design": "^0.5.3",
|
|
198
198
|
"@hanzo/logo": "^1.0.13",
|
|
199
199
|
"@hanzo/products": "^0.2.0",
|
|
200
|
-
"@hanzogui/lucide-icons-2": "^8.1.0",
|
|
201
|
-
"@hanzogui/telemetry": "^8.1.0",
|
|
202
|
-
"@hanzogui/toast": "^8.1.0",
|
|
203
200
|
"clsx": "^2.1.1"
|
|
204
201
|
},
|
|
205
202
|
"peerDependencies": {
|
|
@@ -210,7 +207,10 @@
|
|
|
210
207
|
"@hanzo/gui": ">=8.1.0",
|
|
211
208
|
"@hanzo/usage": ">=0.1.0",
|
|
212
209
|
"@hanzogui/config": ">=8.1.0",
|
|
210
|
+
"@hanzogui/lucide-icons-2": ">=8.1.0",
|
|
213
211
|
"@hanzogui/next-theme": ">=8.1.0",
|
|
212
|
+
"@hanzogui/telemetry": ">=8.1.0",
|
|
213
|
+
"@hanzogui/toast": ">=8.1.0",
|
|
214
214
|
"next": ">=14",
|
|
215
215
|
"next-themes": ">=0.2.1",
|
|
216
216
|
"react": ">=19",
|
|
@@ -252,6 +252,8 @@
|
|
|
252
252
|
"@hanzogui/core": "8.1.0",
|
|
253
253
|
"@hanzogui/lucide-icons-2": "8.1.0",
|
|
254
254
|
"@hanzogui/next-theme": "8.1.0",
|
|
255
|
+
"@hanzogui/telemetry": "8.1.0",
|
|
256
|
+
"@hanzogui/toast": "8.1.0",
|
|
255
257
|
"@hanzogui/web": "8.1.0",
|
|
256
258
|
"@playwright/test": "^1.61.0",
|
|
257
259
|
"@types/react": "^19.1.10",
|