@hanzo/ui 8.29.20 → 8.29.22
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/consent/Consent.cjs +43 -24
- package/dist/consent/Consent.d.ts.map +1 -1
- package/dist/consent/Consent.js +43 -24
- package/dist/consent/Consent.js.map +1 -1
- package/dist/gallery.html +1 -1
- package/dist/marketing/heat.cjs +159 -0
- package/dist/marketing/heat.d.ts +73 -0
- package/dist/marketing/heat.d.ts.map +1 -0
- package/dist/marketing/heat.js +150 -0
- package/dist/marketing/heat.js.map +1 -0
- package/dist/marketing/index.cjs +15 -1
- package/dist/marketing/index.d.ts +2 -0
- package/dist/marketing/index.d.ts.map +1 -1
- package/dist/marketing/index.js +2 -0
- package/dist/marketing/index.js.map +1 -1
- package/dist/marketing/repo.cjs +72 -0
- package/dist/marketing/repo.d.ts +61 -0
- package/dist/marketing/repo.d.ts.map +1 -0
- package/dist/marketing/repo.js +65 -0
- package/dist/marketing/repo.js.map +1 -0
- package/package.json +1 -1
package/dist/consent/Consent.cjs
CHANGED
|
@@ -95,7 +95,7 @@ function linked() {
|
|
|
95
95
|
}
|
|
96
96
|
return false;
|
|
97
97
|
}
|
|
98
|
-
const kinds = (brand, strict) => [
|
|
98
|
+
const kinds = (brand, strict, locked) => [
|
|
99
99
|
{
|
|
100
100
|
id: 'necessary',
|
|
101
101
|
title: 'Strictly Necessary Cookies',
|
|
@@ -117,13 +117,15 @@ const kinds = (brand, strict) => [
|
|
|
117
117
|
id: 'ads',
|
|
118
118
|
key: 'ads',
|
|
119
119
|
title: 'Sell, Share, or Use Your Data for Targeted Advertising',
|
|
120
|
-
body: `Lets Google and Meta use your visits to choose the ads they show you on other sites and apps. Some US state privacy laws call this a “sale” or “sharing” of your personal information, or “targeted advertising”, and give you the right to opt out: ${strict ? 'it stays off unless you turn it on.' : 'turn this off to opt out.'}`,
|
|
120
|
+
body: `Lets Google and Meta use your visits to choose the ads they show you on other sites and apps. Some US state privacy laws call this a “sale” or “sharing” of your personal information, or “targeted advertising”, and give you the right to opt out: ${locked ? 'your browser’s signal keeps it off.' : strict ? 'it stays off unless you turn it on.' : 'turn this off to opt out.'}`,
|
|
121
121
|
},
|
|
122
122
|
];
|
|
123
123
|
/** The sheet's opening line, by rule: what runs before the visitor does anything, and how to change it. */
|
|
124
|
-
const intro = (strict) =>
|
|
125
|
-
? 'We use cookies and similar technologies to provide our services
|
|
126
|
-
:
|
|
124
|
+
const intro = (strict, locked) => locked
|
|
125
|
+
? 'We use cookies and similar technologies to provide our services. Essential cookies are required for the site to work and cannot be turned off. Learn more in our '
|
|
126
|
+
: strict
|
|
127
|
+
? 'We use cookies and similar technologies to provide our services, measure performance, and support advertising. Essential cookies are required for the site to work and cannot be turned off. You can allow or reject optional cookies below. Learn more in our '
|
|
128
|
+
: 'We use cookies and similar technologies to provide our services, measure performance, and support advertising. Google Analytics and the Meta pixel run on this site by default. Turn either off below, or turn off the last switch to opt out of the sale or sharing of your personal information for targeted advertising; each switch is saved as soon as you change it. Essential cookies are required for the site to work and cannot be turned off. Learn more in our ';
|
|
127
129
|
/** What a browser that sends Global Privacy Control or Do Not Track holds off, under every rule. */
|
|
128
130
|
const REFUSAL = 'Your browser asks sites not to track you, so all of these stay off.';
|
|
129
131
|
/** The bar's and the sheet's inset from the window's edges: 16px, or the device's inset and 8px where that is wider. */
|
|
@@ -253,14 +255,36 @@ const Consent = ({ cookies = 'https://hanzo.ai/cookies', privacy = 'https://hanz
|
|
|
253
255
|
const opened = (0, react_1.useRef)(false);
|
|
254
256
|
// The switches were filled from a stored choice, not left at the rule's defaults.
|
|
255
257
|
const seeded = (0, react_1.useRef)(false);
|
|
256
|
-
// The visitor has moved
|
|
257
|
-
const
|
|
258
|
+
// The switches the visitor has moved since the sheet opened.
|
|
259
|
+
const moved = (0, react_1.useRef)(new Set());
|
|
258
260
|
const id = (0, react_1.useId)();
|
|
259
261
|
// The browser refused, as the page sees it or as cloud saw the request. State,
|
|
260
262
|
// so cloud's answer redraws an open sheet.
|
|
261
263
|
const [locked, setLocked] = (0, react_1.useState)(false);
|
|
262
|
-
/**
|
|
263
|
-
|
|
264
|
+
/**
|
|
265
|
+
* What stands at the foot of the window under a rule: the eu bar until a
|
|
266
|
+
* choice, the global notice until seen (and never to a browser that refused,
|
|
267
|
+
* which agreed to nothing by browsing).
|
|
268
|
+
*/
|
|
269
|
+
const front = (m = rule.current) => (m === 'eu' ? (0, event_1.asks)() : m === 'global' ? !(0, event_1.noticed)() && !(0, event_1.declined)() : false);
|
|
270
|
+
/**
|
|
271
|
+
* The switches under rule `m`: the rule's own state, with the visitor's moves
|
|
272
|
+
* kept. Under eu only a move to off carries, so nothing arrives pre-ticked.
|
|
273
|
+
*/
|
|
274
|
+
const merged = (m) => {
|
|
275
|
+
const next = (0, event_1.readConsent)();
|
|
276
|
+
for (const k of moved.current)
|
|
277
|
+
if (m !== 'eu' || !latest.current[k])
|
|
278
|
+
next[k] = latest.current[k];
|
|
279
|
+
return next;
|
|
280
|
+
};
|
|
281
|
+
/** Redraws the open sheet's switches under rule `m`; an opt-out rule saves what they say. */
|
|
282
|
+
const redraw = (m) => {
|
|
283
|
+
const next = merged(m);
|
|
284
|
+
setDraft(next);
|
|
285
|
+
if (m !== 'eu' && moved.current.size)
|
|
286
|
+
(0, event_1.saveConsent)(next);
|
|
287
|
+
};
|
|
264
288
|
const choose = () => {
|
|
265
289
|
// Already open: the visitor's unsaved switches and the focus to return stay as they are.
|
|
266
290
|
if (asked.current)
|
|
@@ -268,7 +292,7 @@ const Consent = ({ cookies = 'https://hanzo.ai/cookies', privacy = 'https://hanz
|
|
|
268
292
|
const at = document.activeElement;
|
|
269
293
|
back.current = at instanceof HTMLElement && at !== document.body ? at : null;
|
|
270
294
|
asked.current = true;
|
|
271
|
-
|
|
295
|
+
moved.current = new Set();
|
|
272
296
|
setLocked((0, event_1.declined)());
|
|
273
297
|
seeded.current = (0, event_1.storedConsent)();
|
|
274
298
|
setDraft((0, event_1.readConsent)());
|
|
@@ -288,7 +312,7 @@ const Consent = ({ cookies = 'https://hanzo.ai/cookies', privacy = 'https://hanz
|
|
|
288
312
|
// sheet opened with were an old grant, and fall back to the rule's own.
|
|
289
313
|
if (asked.current && seeded.current && !(0, event_1.storedConsent)()) {
|
|
290
314
|
seeded.current = false;
|
|
291
|
-
|
|
315
|
+
redraw(rule.current ?? 'eu');
|
|
292
316
|
}
|
|
293
317
|
};
|
|
294
318
|
const decide = (m) => {
|
|
@@ -296,15 +320,10 @@ const Consent = ({ cookies = 'https://hanzo.ai/cookies', privacy = 'https://hanz
|
|
|
296
320
|
rule.current = m;
|
|
297
321
|
setMode(m);
|
|
298
322
|
sync();
|
|
299
|
-
// A rule that changes under an open sheet changes what its switches mean
|
|
300
|
-
//
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
return;
|
|
304
|
-
if (!touched.current)
|
|
305
|
-
setDraft((0, event_1.readConsent)());
|
|
306
|
-
else if (m !== 'eu')
|
|
307
|
-
(0, event_1.saveConsent)(latest.current);
|
|
323
|
+
// A rule that changes under an open sheet changes what its switches mean:
|
|
324
|
+
// they show the new rule's state, with the visitor's moves kept.
|
|
325
|
+
if (changed && asked.current)
|
|
326
|
+
redraw(m);
|
|
308
327
|
};
|
|
309
328
|
// Cloud answered on this page: its rule, whether or not it placed the visitor.
|
|
310
329
|
const policy = () => decide((0, event_1.consentPolicy)().mode);
|
|
@@ -397,7 +416,7 @@ const Consent = ({ cookies = 'https://hanzo.ai/cookies', privacy = 'https://hanz
|
|
|
397
416
|
if (el?.isConnected)
|
|
398
417
|
el.focus();
|
|
399
418
|
else
|
|
400
|
-
manage.current?.focus();
|
|
419
|
+
(manage.current ?? document.querySelector('[data-slot="consent-choices"] button'))?.focus();
|
|
401
420
|
return;
|
|
402
421
|
}
|
|
403
422
|
opened.current = true;
|
|
@@ -443,7 +462,7 @@ const Consent = ({ cookies = 'https://hanzo.ai/cookies', privacy = 'https://hanz
|
|
|
443
462
|
const strict = (mode ?? 'eu') === 'eu';
|
|
444
463
|
// Under eu the switches wait for Save preferences; elsewhere each one is an opt-out, saved as it moves.
|
|
445
464
|
const flip = (key, on) => {
|
|
446
|
-
|
|
465
|
+
moved.current.add(key);
|
|
447
466
|
const next = { ...draft, [key]: on };
|
|
448
467
|
setDraft(next);
|
|
449
468
|
if (!strict)
|
|
@@ -451,7 +470,7 @@ const Consent = ({ cookies = 'https://hanzo.ai/cookies', privacy = 'https://hanz
|
|
|
451
470
|
};
|
|
452
471
|
panel = ((0, jsx_runtime_1.jsxs)(gui_1.YStack, { ...(0, slot_1.slot)('consent-sheet'), ...COVER, z: "var(--z-modal, 600)", items: "center", justify: "center",
|
|
453
472
|
// The device's insets are physical sides, so the shorthand names them in order.
|
|
454
|
-
style: { padding: `${EDGE.top} ${EDGE.right} ${EDGE.bottom} ${EDGE.left}` }, children: [(0, jsx_runtime_1.jsx)(gui_1.YStack, { ...COVER, position: "absolute", z: 0, bg: "rgba(0,0,0,0.6)", "aria-hidden": true, onPress: close }), (0, jsx_runtime_1.jsxs)(gui_1.YStack, { ...(0, slot_1.slot)('consent'), ...PANEL, ref: sheet, role: "dialog", "aria-modal": true, "aria-labelledby": `${id}-title`, position: "relative", width: "100%", maxW: 560, maxH: "100%", overflow: "hidden", children: [(0, jsx_runtime_1.jsxs)(gui_1.XStack, { items: "center", justify: "space-between", gap: "$3", pt: "$5", pb: "$3", paddingInlineStart: "$5", paddingInlineEnd: "$4", children: [(0, jsx_runtime_1.jsx)(gui_1.Text, { render: "h2", id: `${id}-title`, m: 0, fontSize: "$6", lineHeight: "$6", fontWeight: "600", color: "$ink", children: "Cookie Preferences" }), (0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", size: "icon", ...CLOSE, "aria-label": "Close", onClick: close, children: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.X, { size: 16 }) })] }), (0, jsx_runtime_1.jsxs)(gui_1.YStack, { shrink: 1, minH: 0, overflowY: "auto", px: "$5", pb: "$2", style: { overscrollBehavior: 'contain' }, children: [(0, jsx_runtime_1.jsxs)(gui_1.Paragraph, { size: "$2", color: "$aside", m: 0, pb: "$3", children: [intro(strict), (0, jsx_runtime_1.jsx)("a", { href: cookies, style: INLINE, children: "Cookie Policy" }), ', ', (0, jsx_runtime_1.jsx)("a", { href: privacy, style: INLINE, children: "Privacy Policy" }), ', and ', (0, jsx_runtime_1.jsx)("a", { href: terms, style: INLINE, children: "Terms of Service" }), "."] }), locked ? ((0, jsx_runtime_1.jsx)(gui_1.Paragraph, { size: "$2", color: "$ink", m: 0, pb: "$3", children: REFUSAL })) : null, kinds(brand, strict).map((k) => {
|
|
473
|
+
style: { padding: `${EDGE.top} ${EDGE.right} ${EDGE.bottom} ${EDGE.left}` }, children: [(0, jsx_runtime_1.jsx)(gui_1.YStack, { ...COVER, position: "absolute", z: 0, bg: "rgba(0,0,0,0.6)", "aria-hidden": true, onPress: close }), (0, jsx_runtime_1.jsxs)(gui_1.YStack, { ...(0, slot_1.slot)('consent'), ...PANEL, ref: sheet, role: "dialog", "aria-modal": true, "aria-labelledby": `${id}-title`, position: "relative", width: "100%", maxW: 560, maxH: "100%", overflow: "hidden", children: [(0, jsx_runtime_1.jsxs)(gui_1.XStack, { items: "center", justify: "space-between", gap: "$3", pt: "$5", pb: "$3", paddingInlineStart: "$5", paddingInlineEnd: "$4", children: [(0, jsx_runtime_1.jsx)(gui_1.Text, { render: "h2", id: `${id}-title`, m: 0, fontSize: "$6", lineHeight: "$6", fontWeight: "600", color: "$ink", children: "Cookie Preferences" }), (0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", size: "icon", ...CLOSE, "aria-label": "Close", onClick: close, children: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.X, { size: 16 }) })] }), (0, jsx_runtime_1.jsxs)(gui_1.YStack, { shrink: 1, minH: 0, overflowY: "auto", px: "$5", pb: "$2", style: { overscrollBehavior: 'contain' }, children: [(0, jsx_runtime_1.jsxs)(gui_1.Paragraph, { size: "$2", color: "$aside", m: 0, pb: "$3", children: [intro(strict, locked), (0, jsx_runtime_1.jsx)("a", { href: cookies, style: INLINE, children: "Cookie Policy" }), ', ', (0, jsx_runtime_1.jsx)("a", { href: privacy, style: INLINE, children: "Privacy Policy" }), ', and ', (0, jsx_runtime_1.jsx)("a", { href: terms, style: INLINE, children: "Terms of Service" }), "."] }), locked ? ((0, jsx_runtime_1.jsx)(gui_1.Paragraph, { size: "$2", color: "$ink", m: 0, pb: "$3", children: REFUSAL })) : null, kinds(brand, strict, locked).map((k) => {
|
|
455
474
|
const open = expanded[k.id] === true;
|
|
456
475
|
const body = `${id}-${k.id}`;
|
|
457
476
|
return ((0, jsx_runtime_1.jsxs)(gui_1.YStack, { ...(0, slot_1.slot)('consent-section'), borderTopWidth: 1, borderColor: "$borderColor", children: [(0, jsx_runtime_1.jsxs)(gui_1.XStack, { items: "center", gap: "$3", minH: 52, py: "$2", children: [(0, jsx_runtime_1.jsx)(gui_1.XStack, { render: "h3", flex: 1, minW: 0, m: 0, children: (0, jsx_runtime_1.jsxs)(gui_1.XStack, { render: "button", ...BUTTON, "aria-expanded": open, "aria-controls": body, onPress: () => setExpanded({ ...expanded, [k.id]: !open }), flex: 1, minW: 0, items: "center", gap: "$2", p: 0, bg: "transparent", borderWidth: 0, cursor: "pointer", children: [(0, jsx_runtime_1.jsx)(gui_1.XStack, { shrink: 0, rotate: open ? '180deg' : '0deg', opacity: 0.7, children: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.ChevronDown, { size: 16 }) }), (0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$3", lineHeight: "$3", fontWeight: "600", color: "$ink", ...(0, dir_1.align)('start'), children: k.title })] }) }), k.key ? ((0, jsx_runtime_1.jsx)(switch_1.Switch, { "aria-label": k.title, "aria-describedby": body,
|
|
@@ -472,7 +491,7 @@ const Consent = ({ cookies = 'https://hanzo.ai/cookies', privacy = 'https://hanz
|
|
|
472
491
|
// the line over one row of buttons and nothing breaks mid-control.
|
|
473
492
|
else if (shown && mode === 'eu')
|
|
474
493
|
surface = ((0, jsx_runtime_1.jsxs)(gui_1.XStack, { ...frame, role: "dialog", "aria-label": "Cookie preferences", style: FIT, maxW: 1200, flexWrap: "wrap", items: "center", columnGap: "$4", rowGap: "$3", children: [(0, jsx_runtime_1.jsx)(gui_1.YStack, { shrink: 1, minW: 0, children: (0, jsx_runtime_1.jsx)(gui_1.Paragraph, { size: "$2", color: "$ink", m: 0, children: `Essential cookies keep ${brand} running. With your OK, optional cookies help us measure performance and ads.` }) }), (0, jsx_runtime_1.jsxs)(gui_1.XStack, { gap: "$2", marginInlineStart: "auto", items: "center", flexWrap: "wrap", children: [(0, jsx_runtime_1.jsx)(button_1.Button, { ref: manage, type: "button", ...SECONDARY, onClick: choose, children: "Manage preferences" }), (0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", ...PRIMARY, onClick: done(event_1.acceptAll), children: "Accept all" })] }), (0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", size: "icon", ...CLOSE, "aria-label": "Close and use essential cookies only", position: "absolute", t: "$3", insetInlineEnd: "$3", onClick: done(event_1.rejectAll), children: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.X, { size: 16 }) })] }));
|
|
475
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [surface, panel] }));
|
|
494
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { inert: choosing || undefined, style: { display: 'contents' }, children: surface }), panel] }));
|
|
476
495
|
};
|
|
477
496
|
exports.Consent = Consent;
|
|
478
497
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Consent.d.ts","sourceRoot":"","sources":["../../src/consent/Consent.tsx"],"names":[],"mappings":"AA+DA,uCAAuC;AACvC,eAAO,MAAM,WAAW,QAAO,IAE9B,CAAA;
|
|
1
|
+
{"version":3,"file":"Consent.d.ts","sourceRoot":"","sources":["../../src/consent/Consent.tsx"],"names":[],"mappings":"AA+DA,uCAAuC;AACvC,eAAO,MAAM,WAAW,QAAO,IAE9B,CAAA;AA8MD,MAAM,MAAM,YAAY,GAAG;IACzB,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,QAAA,MAAM,OAAO,wCAKV,YAAY,uCA6cd,CAAA;AAED;;;GAGG;AACH,QAAA,MAAM,WAAW,cAAwC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,gCAO1E,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
package/dist/consent/Consent.js
CHANGED
|
@@ -91,7 +91,7 @@ function linked() {
|
|
|
91
91
|
}
|
|
92
92
|
return false;
|
|
93
93
|
}
|
|
94
|
-
const kinds = (brand, strict) => [
|
|
94
|
+
const kinds = (brand, strict, locked) => [
|
|
95
95
|
{
|
|
96
96
|
id: 'necessary',
|
|
97
97
|
title: 'Strictly Necessary Cookies',
|
|
@@ -113,13 +113,15 @@ const kinds = (brand, strict) => [
|
|
|
113
113
|
id: 'ads',
|
|
114
114
|
key: 'ads',
|
|
115
115
|
title: 'Sell, Share, or Use Your Data for Targeted Advertising',
|
|
116
|
-
body: `Lets Google and Meta use your visits to choose the ads they show you on other sites and apps. Some US state privacy laws call this a “sale” or “sharing” of your personal information, or “targeted advertising”, and give you the right to opt out: ${strict ? 'it stays off unless you turn it on.' : 'turn this off to opt out.'}`,
|
|
116
|
+
body: `Lets Google and Meta use your visits to choose the ads they show you on other sites and apps. Some US state privacy laws call this a “sale” or “sharing” of your personal information, or “targeted advertising”, and give you the right to opt out: ${locked ? 'your browser’s signal keeps it off.' : strict ? 'it stays off unless you turn it on.' : 'turn this off to opt out.'}`,
|
|
117
117
|
},
|
|
118
118
|
];
|
|
119
119
|
/** The sheet's opening line, by rule: what runs before the visitor does anything, and how to change it. */
|
|
120
|
-
const intro = (strict) =>
|
|
121
|
-
? 'We use cookies and similar technologies to provide our services
|
|
122
|
-
:
|
|
120
|
+
const intro = (strict, locked) => locked
|
|
121
|
+
? 'We use cookies and similar technologies to provide our services. Essential cookies are required for the site to work and cannot be turned off. Learn more in our '
|
|
122
|
+
: strict
|
|
123
|
+
? 'We use cookies and similar technologies to provide our services, measure performance, and support advertising. Essential cookies are required for the site to work and cannot be turned off. You can allow or reject optional cookies below. Learn more in our '
|
|
124
|
+
: 'We use cookies and similar technologies to provide our services, measure performance, and support advertising. Google Analytics and the Meta pixel run on this site by default. Turn either off below, or turn off the last switch to opt out of the sale or sharing of your personal information for targeted advertising; each switch is saved as soon as you change it. Essential cookies are required for the site to work and cannot be turned off. Learn more in our ';
|
|
123
125
|
/** What a browser that sends Global Privacy Control or Do Not Track holds off, under every rule. */
|
|
124
126
|
const REFUSAL = 'Your browser asks sites not to track you, so all of these stay off.';
|
|
125
127
|
/** The bar's and the sheet's inset from the window's edges: 16px, or the device's inset and 8px where that is wider. */
|
|
@@ -249,14 +251,36 @@ const Consent = ({ cookies = 'https://hanzo.ai/cookies', privacy = 'https://hanz
|
|
|
249
251
|
const opened = useRef(false);
|
|
250
252
|
// The switches were filled from a stored choice, not left at the rule's defaults.
|
|
251
253
|
const seeded = useRef(false);
|
|
252
|
-
// The visitor has moved
|
|
253
|
-
const
|
|
254
|
+
// The switches the visitor has moved since the sheet opened.
|
|
255
|
+
const moved = useRef(new Set());
|
|
254
256
|
const id = useId();
|
|
255
257
|
// The browser refused, as the page sees it or as cloud saw the request. State,
|
|
256
258
|
// so cloud's answer redraws an open sheet.
|
|
257
259
|
const [locked, setLocked] = useState(false);
|
|
258
|
-
/**
|
|
259
|
-
|
|
260
|
+
/**
|
|
261
|
+
* What stands at the foot of the window under a rule: the eu bar until a
|
|
262
|
+
* choice, the global notice until seen (and never to a browser that refused,
|
|
263
|
+
* which agreed to nothing by browsing).
|
|
264
|
+
*/
|
|
265
|
+
const front = (m = rule.current) => (m === 'eu' ? asks() : m === 'global' ? !noticed() && !declined() : false);
|
|
266
|
+
/**
|
|
267
|
+
* The switches under rule `m`: the rule's own state, with the visitor's moves
|
|
268
|
+
* kept. Under eu only a move to off carries, so nothing arrives pre-ticked.
|
|
269
|
+
*/
|
|
270
|
+
const merged = (m) => {
|
|
271
|
+
const next = readConsent();
|
|
272
|
+
for (const k of moved.current)
|
|
273
|
+
if (m !== 'eu' || !latest.current[k])
|
|
274
|
+
next[k] = latest.current[k];
|
|
275
|
+
return next;
|
|
276
|
+
};
|
|
277
|
+
/** Redraws the open sheet's switches under rule `m`; an opt-out rule saves what they say. */
|
|
278
|
+
const redraw = (m) => {
|
|
279
|
+
const next = merged(m);
|
|
280
|
+
setDraft(next);
|
|
281
|
+
if (m !== 'eu' && moved.current.size)
|
|
282
|
+
saveConsent(next);
|
|
283
|
+
};
|
|
260
284
|
const choose = () => {
|
|
261
285
|
// Already open: the visitor's unsaved switches and the focus to return stay as they are.
|
|
262
286
|
if (asked.current)
|
|
@@ -264,7 +288,7 @@ const Consent = ({ cookies = 'https://hanzo.ai/cookies', privacy = 'https://hanz
|
|
|
264
288
|
const at = document.activeElement;
|
|
265
289
|
back.current = at instanceof HTMLElement && at !== document.body ? at : null;
|
|
266
290
|
asked.current = true;
|
|
267
|
-
|
|
291
|
+
moved.current = new Set();
|
|
268
292
|
setLocked(declined());
|
|
269
293
|
seeded.current = storedConsent();
|
|
270
294
|
setDraft(readConsent());
|
|
@@ -284,7 +308,7 @@ const Consent = ({ cookies = 'https://hanzo.ai/cookies', privacy = 'https://hanz
|
|
|
284
308
|
// sheet opened with were an old grant, and fall back to the rule's own.
|
|
285
309
|
if (asked.current && seeded.current && !storedConsent()) {
|
|
286
310
|
seeded.current = false;
|
|
287
|
-
|
|
311
|
+
redraw(rule.current ?? 'eu');
|
|
288
312
|
}
|
|
289
313
|
};
|
|
290
314
|
const decide = (m) => {
|
|
@@ -292,15 +316,10 @@ const Consent = ({ cookies = 'https://hanzo.ai/cookies', privacy = 'https://hanz
|
|
|
292
316
|
rule.current = m;
|
|
293
317
|
setMode(m);
|
|
294
318
|
sync();
|
|
295
|
-
// A rule that changes under an open sheet changes what its switches mean
|
|
296
|
-
//
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
return;
|
|
300
|
-
if (!touched.current)
|
|
301
|
-
setDraft(readConsent());
|
|
302
|
-
else if (m !== 'eu')
|
|
303
|
-
saveConsent(latest.current);
|
|
319
|
+
// A rule that changes under an open sheet changes what its switches mean:
|
|
320
|
+
// they show the new rule's state, with the visitor's moves kept.
|
|
321
|
+
if (changed && asked.current)
|
|
322
|
+
redraw(m);
|
|
304
323
|
};
|
|
305
324
|
// Cloud answered on this page: its rule, whether or not it placed the visitor.
|
|
306
325
|
const policy = () => decide(consentPolicy().mode);
|
|
@@ -393,7 +412,7 @@ const Consent = ({ cookies = 'https://hanzo.ai/cookies', privacy = 'https://hanz
|
|
|
393
412
|
if (el?.isConnected)
|
|
394
413
|
el.focus();
|
|
395
414
|
else
|
|
396
|
-
manage.current?.focus();
|
|
415
|
+
(manage.current ?? document.querySelector('[data-slot="consent-choices"] button'))?.focus();
|
|
397
416
|
return;
|
|
398
417
|
}
|
|
399
418
|
opened.current = true;
|
|
@@ -439,7 +458,7 @@ const Consent = ({ cookies = 'https://hanzo.ai/cookies', privacy = 'https://hanz
|
|
|
439
458
|
const strict = (mode ?? 'eu') === 'eu';
|
|
440
459
|
// Under eu the switches wait for Save preferences; elsewhere each one is an opt-out, saved as it moves.
|
|
441
460
|
const flip = (key, on) => {
|
|
442
|
-
|
|
461
|
+
moved.current.add(key);
|
|
443
462
|
const next = { ...draft, [key]: on };
|
|
444
463
|
setDraft(next);
|
|
445
464
|
if (!strict)
|
|
@@ -447,7 +466,7 @@ const Consent = ({ cookies = 'https://hanzo.ai/cookies', privacy = 'https://hanz
|
|
|
447
466
|
};
|
|
448
467
|
panel = (_jsxs(YStack, { ...slot('consent-sheet'), ...COVER, z: "var(--z-modal, 600)", items: "center", justify: "center",
|
|
449
468
|
// The device's insets are physical sides, so the shorthand names them in order.
|
|
450
|
-
style: { padding: `${EDGE.top} ${EDGE.right} ${EDGE.bottom} ${EDGE.left}` }, children: [_jsx(YStack, { ...COVER, position: "absolute", z: 0, bg: "rgba(0,0,0,0.6)", "aria-hidden": true, onPress: close }), _jsxs(YStack, { ...slot('consent'), ...PANEL, ref: sheet, role: "dialog", "aria-modal": true, "aria-labelledby": `${id}-title`, position: "relative", width: "100%", maxW: 560, maxH: "100%", overflow: "hidden", children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$3", pt: "$5", pb: "$3", paddingInlineStart: "$5", paddingInlineEnd: "$4", children: [_jsx(Text, { render: "h2", id: `${id}-title`, m: 0, fontSize: "$6", lineHeight: "$6", fontWeight: "600", color: "$ink", children: "Cookie Preferences" }), _jsx(Button, { type: "button", size: "icon", ...CLOSE, "aria-label": "Close", onClick: close, children: _jsx(X, { size: 16 }) })] }), _jsxs(YStack, { shrink: 1, minH: 0, overflowY: "auto", px: "$5", pb: "$2", style: { overscrollBehavior: 'contain' }, children: [_jsxs(Paragraph, { size: "$2", color: "$aside", m: 0, pb: "$3", children: [intro(strict), _jsx("a", { href: cookies, style: INLINE, children: "Cookie Policy" }), ', ', _jsx("a", { href: privacy, style: INLINE, children: "Privacy Policy" }), ', and ', _jsx("a", { href: terms, style: INLINE, children: "Terms of Service" }), "."] }), locked ? (_jsx(Paragraph, { size: "$2", color: "$ink", m: 0, pb: "$3", children: REFUSAL })) : null, kinds(brand, strict).map((k) => {
|
|
469
|
+
style: { padding: `${EDGE.top} ${EDGE.right} ${EDGE.bottom} ${EDGE.left}` }, children: [_jsx(YStack, { ...COVER, position: "absolute", z: 0, bg: "rgba(0,0,0,0.6)", "aria-hidden": true, onPress: close }), _jsxs(YStack, { ...slot('consent'), ...PANEL, ref: sheet, role: "dialog", "aria-modal": true, "aria-labelledby": `${id}-title`, position: "relative", width: "100%", maxW: 560, maxH: "100%", overflow: "hidden", children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$3", pt: "$5", pb: "$3", paddingInlineStart: "$5", paddingInlineEnd: "$4", children: [_jsx(Text, { render: "h2", id: `${id}-title`, m: 0, fontSize: "$6", lineHeight: "$6", fontWeight: "600", color: "$ink", children: "Cookie Preferences" }), _jsx(Button, { type: "button", size: "icon", ...CLOSE, "aria-label": "Close", onClick: close, children: _jsx(X, { size: 16 }) })] }), _jsxs(YStack, { shrink: 1, minH: 0, overflowY: "auto", px: "$5", pb: "$2", style: { overscrollBehavior: 'contain' }, children: [_jsxs(Paragraph, { size: "$2", color: "$aside", m: 0, pb: "$3", children: [intro(strict, locked), _jsx("a", { href: cookies, style: INLINE, children: "Cookie Policy" }), ', ', _jsx("a", { href: privacy, style: INLINE, children: "Privacy Policy" }), ', and ', _jsx("a", { href: terms, style: INLINE, children: "Terms of Service" }), "."] }), locked ? (_jsx(Paragraph, { size: "$2", color: "$ink", m: 0, pb: "$3", children: REFUSAL })) : null, kinds(brand, strict, locked).map((k) => {
|
|
451
470
|
const open = expanded[k.id] === true;
|
|
452
471
|
const body = `${id}-${k.id}`;
|
|
453
472
|
return (_jsxs(YStack, { ...slot('consent-section'), borderTopWidth: 1, borderColor: "$borderColor", children: [_jsxs(XStack, { items: "center", gap: "$3", minH: 52, py: "$2", children: [_jsx(XStack, { render: "h3", flex: 1, minW: 0, m: 0, children: _jsxs(XStack, { render: "button", ...BUTTON, "aria-expanded": open, "aria-controls": body, onPress: () => setExpanded({ ...expanded, [k.id]: !open }), flex: 1, minW: 0, items: "center", gap: "$2", p: 0, bg: "transparent", borderWidth: 0, cursor: "pointer", children: [_jsx(XStack, { shrink: 0, rotate: open ? '180deg' : '0deg', opacity: 0.7, children: _jsx(ChevronDown, { size: 16 }) }), _jsx(Text, { fontSize: "$3", lineHeight: "$3", fontWeight: "600", color: "$ink", ...align('start'), children: k.title })] }) }), k.key ? (_jsx(Switch, { "aria-label": k.title, "aria-describedby": body,
|
|
@@ -468,7 +487,7 @@ const Consent = ({ cookies = 'https://hanzo.ai/cookies', privacy = 'https://hanz
|
|
|
468
487
|
// the line over one row of buttons and nothing breaks mid-control.
|
|
469
488
|
else if (shown && mode === 'eu')
|
|
470
489
|
surface = (_jsxs(XStack, { ...frame, role: "dialog", "aria-label": "Cookie preferences", style: FIT, maxW: 1200, flexWrap: "wrap", items: "center", columnGap: "$4", rowGap: "$3", children: [_jsx(YStack, { shrink: 1, minW: 0, children: _jsx(Paragraph, { size: "$2", color: "$ink", m: 0, children: `Essential cookies keep ${brand} running. With your OK, optional cookies help us measure performance and ads.` }) }), _jsxs(XStack, { gap: "$2", marginInlineStart: "auto", items: "center", flexWrap: "wrap", children: [_jsx(Button, { ref: manage, type: "button", ...SECONDARY, onClick: choose, children: "Manage preferences" }), _jsx(Button, { type: "button", ...PRIMARY, onClick: done(acceptAll), children: "Accept all" })] }), _jsx(Button, { type: "button", size: "icon", ...CLOSE, "aria-label": "Close and use essential cookies only", position: "absolute", t: "$3", insetInlineEnd: "$3", onClick: done(rejectAll), children: _jsx(X, { size: 16 }) })] }));
|
|
471
|
-
return (_jsxs(_Fragment, { children: [surface, panel] }));
|
|
490
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { inert: choosing || undefined, style: { display: 'contents' }, children: surface }), panel] }));
|
|
472
491
|
};
|
|
473
492
|
/**
|
|
474
493
|
* "Your Privacy Choices" with California's privacy options icon: the link to the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Consent.js","sourceRoot":"","sources":["../../src/consent/Consent.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAC5D,OAAO,EAAE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K,IACL,CACJ,CAAA;AACH,CAAC,CAAA;AAED;;;GAGG;AACH,MAAM,WAAW,GAAG,CAAC,EAAE,KAAK,GAAG,sBAAsB,EAAsB,EAAE,EAAE;IAC7E,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAA;IAC3B,OAAO,CACL,KAAC,MAAM,OAAK,IAAI,CAAC,cAAc,CAAC,KAAM,OAAO,EAAE,OAAO,EAAE,WAAW,YAChE,KAAK,GACC,CACV,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
package/dist/gallery.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!doctype html><html lang="en" class="t_dark"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>@hanzo/ui 8.29.
|
|
1
|
+
<!doctype html><html lang="en" class="t_dark"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>@hanzo/ui 8.29.22</title><style>/* @hanzo/ui — generated by scripts/gen-css.mjs. Do not edit. */
|
|
2
2
|
:root { --hanzo-ui-styles: 1; }
|
|
3
3
|
/* Hanzo Design System — the entry point. Import THIS one file.
|
|
4
4
|
*
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
'use client';"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.shade = void 0;
|
|
5
|
+
exports.span = span;
|
|
6
|
+
exports.cuts = cuts;
|
|
7
|
+
exports.weeks = weeks;
|
|
8
|
+
exports.monthLabels = monthLabels;
|
|
9
|
+
exports.Heatmap = Heatmap;
|
|
10
|
+
exports.Sparkline = Sparkline;
|
|
11
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
12
|
+
/**
|
|
13
|
+
* A year of days as one grid, and a run of values as one line of bars.
|
|
14
|
+
*
|
|
15
|
+
* Heatmap a count a day over a window, a week a column, four shades; the
|
|
16
|
+
* day under the pointer is named in the line beneath
|
|
17
|
+
* Sparkline a run of values as bars, tallest to the height given
|
|
18
|
+
*
|
|
19
|
+
* Both take their data as props and fetch nothing: a figure the caller does not
|
|
20
|
+
* hold is not passed, and a grid with no count in it draws nothing. The shades
|
|
21
|
+
* are the ink at a share of its strength, so the grid retunes with the theme,
|
|
22
|
+
* and four of them are cut at the quartiles of the days that had any count, so
|
|
23
|
+
* it reads the same in a quiet year and a loud one. The grid is wiped into place
|
|
24
|
+
* once, the first time it is seen, and stands drawn for a reader who wants no
|
|
25
|
+
* motion (`reveal`).
|
|
26
|
+
*/
|
|
27
|
+
const react_1 = require("react");
|
|
28
|
+
const gui_1 = require("@hanzo/gui");
|
|
29
|
+
const slot_1 = require("../backends/gui/slot.cjs");
|
|
30
|
+
const DAY = 86_400_000;
|
|
31
|
+
const WEEK = 7;
|
|
32
|
+
/** The day, UTC, as `YYYY-MM-DD`. */
|
|
33
|
+
const key = (t) => new Date(t).toISOString().slice(0, 10);
|
|
34
|
+
/** The days of a window, oldest first, `from` and `to` included. */
|
|
35
|
+
function span(from, to) {
|
|
36
|
+
const out = [];
|
|
37
|
+
for (let t = Date.parse(`${from}T00:00:00Z`); t <= Date.parse(`${to}T00:00:00Z`); t += DAY)
|
|
38
|
+
out.push(key(t));
|
|
39
|
+
return out;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The three cuts between four shades: the quartiles of the days that had any
|
|
43
|
+
* count. A year with none has nothing to cut.
|
|
44
|
+
*/
|
|
45
|
+
function cuts(days) {
|
|
46
|
+
const counts = Object.values(days)
|
|
47
|
+
.filter((n) => n > 0)
|
|
48
|
+
.sort((a, b) => a - b);
|
|
49
|
+
const at = (q) => counts[Math.min(counts.length - 1, Math.floor(q * counts.length))] ?? 0;
|
|
50
|
+
return [at(0.25), at(0.5), at(0.75)];
|
|
51
|
+
}
|
|
52
|
+
/** The shade a count earns: 0 for none, then 1 to 4 up the quartiles. */
|
|
53
|
+
const shade = (n, cut) => n <= 0 ? 0 : n <= cut[0] ? 1 : n <= cut[1] ? 2 : n <= cut[2] ? 3 : 4;
|
|
54
|
+
exports.shade = shade;
|
|
55
|
+
/** A fill the colour table does not name: a page's own CSS value, which gui emits as written. */
|
|
56
|
+
const fill = (c) => ({ backgroundColor: c });
|
|
57
|
+
/** The ink of each shade, from the page's own so the grid follows the theme. */
|
|
58
|
+
const INK = [
|
|
59
|
+
'var(--muted)',
|
|
60
|
+
'color-mix(in srgb, var(--foreground) 22%, transparent)',
|
|
61
|
+
'color-mix(in srgb, var(--foreground) 42%, transparent)',
|
|
62
|
+
'color-mix(in srgb, var(--foreground) 68%, transparent)',
|
|
63
|
+
'var(--foreground)',
|
|
64
|
+
];
|
|
65
|
+
/** The weeks of a window, Sunday first, with the days outside it kept as unseen cells so the columns stay whole. */
|
|
66
|
+
function weeks(days, from, to) {
|
|
67
|
+
const first = Date.parse(`${from}T00:00:00Z`);
|
|
68
|
+
const last = Date.parse(`${to}T00:00:00Z`);
|
|
69
|
+
const cut = cuts(days);
|
|
70
|
+
const start = first - new Date(first).getUTCDay() * DAY;
|
|
71
|
+
const out = [];
|
|
72
|
+
for (let t = start; t <= last; t += WEEK * DAY) {
|
|
73
|
+
out.push(Array.from({ length: WEEK }, (_, d) => {
|
|
74
|
+
const at = t + d * DAY;
|
|
75
|
+
const count = days[key(at)] ?? 0;
|
|
76
|
+
return {
|
|
77
|
+
day: key(at),
|
|
78
|
+
count,
|
|
79
|
+
level: (0, exports.shade)(count, cut),
|
|
80
|
+
shown: at >= first && at <= last,
|
|
81
|
+
};
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
return out;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Each week's month label: a month is named over the first week that holds its
|
|
88
|
+
* first seven days, and the window's first column is named too, unless the next
|
|
89
|
+
* month is named within two columns of it and the two would run together.
|
|
90
|
+
*/
|
|
91
|
+
function monthLabels(grid, from, locale) {
|
|
92
|
+
const name = (day) => new Date(`${day}T00:00:00Z`).toLocaleDateString(locale, {
|
|
93
|
+
timeZone: 'UTC',
|
|
94
|
+
month: 'short',
|
|
95
|
+
});
|
|
96
|
+
const labels = grid.map((w, i) => {
|
|
97
|
+
const first = w.find((c) => c.shown)?.day ?? from;
|
|
98
|
+
return i === 0 || Number(first.slice(8, 10)) <= 7 ? name(first) : '';
|
|
99
|
+
});
|
|
100
|
+
const next = labels.findIndex((l, i) => i > 0 && l);
|
|
101
|
+
if (labels[0] && next > 0 && next < 3)
|
|
102
|
+
labels[0] = '';
|
|
103
|
+
return labels;
|
|
104
|
+
}
|
|
105
|
+
/** The least width a week's column may be drawn at: a cell is nine pixels and a gap three. */
|
|
106
|
+
const CELL = 12;
|
|
107
|
+
const still = () => typeof matchMedia === 'function' &&
|
|
108
|
+
matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
109
|
+
function Heatmap({ days, from, to, label, line, rest, legend, locale, reveal = true, }) {
|
|
110
|
+
const grid = (0, react_1.useMemo)(() => weeks(days, from, to), [days, from, to]);
|
|
111
|
+
const [at, setAt] = (0, react_1.useState)(null);
|
|
112
|
+
// The container is watched and the grid inside it is wiped: a grid clipped to nothing is never seen to intersect.
|
|
113
|
+
const box = (0, react_1.useRef)(null);
|
|
114
|
+
const wipe = (0, react_1.useRef)(null);
|
|
115
|
+
// A narrow screen scrolls the year sideways, and starts at its newest week.
|
|
116
|
+
(0, react_1.useEffect)(() => {
|
|
117
|
+
const el = wipe.current;
|
|
118
|
+
if (el)
|
|
119
|
+
el.scrollLeft = el.scrollWidth;
|
|
120
|
+
}, [days, from, to]);
|
|
121
|
+
// The grid waits fully clipped from its first frame, so it needs no style of its own to hide it,
|
|
122
|
+
// and plays when it is first seen. Where animation or observation is missing it stays drawn.
|
|
123
|
+
(0, react_1.useEffect)(() => {
|
|
124
|
+
const el = wipe.current;
|
|
125
|
+
const watched = box.current;
|
|
126
|
+
if (!reveal ||
|
|
127
|
+
!el ||
|
|
128
|
+
!watched ||
|
|
129
|
+
typeof el.animate !== 'function' ||
|
|
130
|
+
typeof IntersectionObserver === 'undefined' ||
|
|
131
|
+
still())
|
|
132
|
+
return;
|
|
133
|
+
const a = el.animate([{ clipPath: 'inset(0 100% 0 0)' }, { clipPath: 'inset(0 0 0 0)' }], { duration: 1100, easing: 'cubic-bezier(0.2, 0.7, 0.2, 1)', fill: 'both' });
|
|
134
|
+
a.pause();
|
|
135
|
+
const io = new IntersectionObserver(([e]) => {
|
|
136
|
+
if (!e?.isIntersecting)
|
|
137
|
+
return;
|
|
138
|
+
a.play();
|
|
139
|
+
io.disconnect();
|
|
140
|
+
}, { threshold: 0.3 });
|
|
141
|
+
io.observe(watched);
|
|
142
|
+
return () => {
|
|
143
|
+
io.disconnect();
|
|
144
|
+
a.cancel();
|
|
145
|
+
};
|
|
146
|
+
}, [reveal]);
|
|
147
|
+
if (!Object.values(days).some((n) => n > 0))
|
|
148
|
+
return null;
|
|
149
|
+
const columns = `repeat(${grid.length}, minmax(0, 1fr))`;
|
|
150
|
+
const named = at && at >= from && at <= to ? at : null;
|
|
151
|
+
const months = monthLabels(grid, from, locale);
|
|
152
|
+
return ((0, jsx_runtime_1.jsxs)(gui_1.YStack, { gap: 14, ...(0, slot_1.slot)('heatmap'), children: [(0, jsx_runtime_1.jsx)(gui_1.View, { ref: box, children: (0, jsx_runtime_1.jsx)(gui_1.View, { ref: wipe, overflowX: "auto", children: (0, jsx_runtime_1.jsxs)(gui_1.View, { minW: grid.length * CELL, children: [(0, jsx_runtime_1.jsx)(gui_1.View, { display: "grid", gridTemplateColumns: columns, gap: 3, pb: 6, "aria-hidden": true, children: months.map((m, i) => ((0, jsx_runtime_1.jsx)(gui_1.Text, { fontFamily: "$mono", fontSize: "$1", lineHeight: "$1", color: "var(--muted-foreground)", whiteSpace: "nowrap", overflow: "visible", children: m }, i))) }), (0, jsx_runtime_1.jsx)(gui_1.View, { role: "img", "aria-label": label, display: "grid", gridTemplateColumns: columns, gridTemplateRows: "repeat(7, auto)", gap: 3, gridAutoFlow: "column", onPointerMove: (e) => setAt(e.target.dataset?.day ?? null), onPointerLeave: () => setAt(null), children: grid.flat().map((c) => ((0, jsx_runtime_1.jsx)(gui_1.View, { "data-day": c.shown ? c.day : undefined, aspectRatio: 1, rounded: 2, opacity: c.shown ? 1 : 0, ...fill(INK[c.level]) }, c.day))) })] }) }) }), (0, jsx_runtime_1.jsxs)(gui_1.XStack, { justify: "space-between", items: "center", flexWrap: "wrap", gap: 12, children: [(0, jsx_runtime_1.jsx)(gui_1.Text, { fontFamily: "$mono", fontSize: "$1", lineHeight: "$1", color: "var(--muted-foreground)", "aria-live": "polite", ...(0, slot_1.slot)('heatmap-line'), children: named && line ? line(named, days[named] ?? 0) : rest }), legend ? ((0, jsx_runtime_1.jsxs)(gui_1.XStack, { items: "center", gap: 6, "aria-hidden": true, children: [(0, jsx_runtime_1.jsx)(gui_1.Text, { fontFamily: "$mono", fontSize: "$1", color: "var(--muted-foreground)", children: legend.less }), INK.map((s) => ((0, jsx_runtime_1.jsx)(gui_1.View, { width: 11, height: 11, rounded: 2, ...fill(s) }, s))), (0, jsx_runtime_1.jsx)(gui_1.Text, { fontFamily: "$mono", fontSize: "$1", color: "var(--muted-foreground)", children: legend.more })] })) : null] })] }));
|
|
153
|
+
}
|
|
154
|
+
function Sparkline({ values, label, height = 40 }) {
|
|
155
|
+
const top = Math.max(0, ...values);
|
|
156
|
+
if (!values.length || top <= 0)
|
|
157
|
+
return null;
|
|
158
|
+
return ((0, jsx_runtime_1.jsx)(gui_1.XStack, { role: "img", "aria-label": label, items: "flex-end", gap: 2, height: height, ...(0, slot_1.slot)('sparkline'), children: values.map((v, i) => ((0, jsx_runtime_1.jsx)(gui_1.View, { flex: 1, minW: 1, height: (v > 0 ? `${Math.max(4, (100 * v) / top)}%` : 1), rounded: 1, ...fill(v > 0 ? 'var(--foreground)' : 'var(--muted)') }, i))) }));
|
|
159
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A year of days as one grid, and a run of values as one line of bars.
|
|
3
|
+
*
|
|
4
|
+
* Heatmap a count a day over a window, a week a column, four shades; the
|
|
5
|
+
* day under the pointer is named in the line beneath
|
|
6
|
+
* Sparkline a run of values as bars, tallest to the height given
|
|
7
|
+
*
|
|
8
|
+
* Both take their data as props and fetch nothing: a figure the caller does not
|
|
9
|
+
* hold is not passed, and a grid with no count in it draws nothing. The shades
|
|
10
|
+
* are the ink at a share of its strength, so the grid retunes with the theme,
|
|
11
|
+
* and four of them are cut at the quartiles of the days that had any count, so
|
|
12
|
+
* it reads the same in a quiet year and a loud one. The grid is wiped into place
|
|
13
|
+
* once, the first time it is seen, and stands drawn for a reader who wants no
|
|
14
|
+
* motion (`reveal`).
|
|
15
|
+
*/
|
|
16
|
+
import { type ReactNode } from 'react';
|
|
17
|
+
/** The days of a window, oldest first, `from` and `to` included. */
|
|
18
|
+
export declare function span(from: string, to: string): string[];
|
|
19
|
+
/**
|
|
20
|
+
* The three cuts between four shades: the quartiles of the days that had any
|
|
21
|
+
* count. A year with none has nothing to cut.
|
|
22
|
+
*/
|
|
23
|
+
export declare function cuts(days: Record<string, number>): [number, number, number];
|
|
24
|
+
/** The shade a count earns: 0 for none, then 1 to 4 up the quartiles. */
|
|
25
|
+
export declare const shade: (n: number, cut: readonly [number, number, number]) => 0 | 1 | 2 | 3 | 4;
|
|
26
|
+
type Cell = {
|
|
27
|
+
day: string;
|
|
28
|
+
count: number;
|
|
29
|
+
level: number;
|
|
30
|
+
shown: boolean;
|
|
31
|
+
};
|
|
32
|
+
/** The weeks of a window, Sunday first, with the days outside it kept as unseen cells so the columns stay whole. */
|
|
33
|
+
export declare function weeks(days: Record<string, number>, from: string, to: string): Cell[][];
|
|
34
|
+
/**
|
|
35
|
+
* Each week's month label: a month is named over the first week that holds its
|
|
36
|
+
* first seven days, and the window's first column is named too, unless the next
|
|
37
|
+
* month is named within two columns of it and the two would run together.
|
|
38
|
+
*/
|
|
39
|
+
export declare function monthLabels(grid: Cell[][], from: string, locale?: string): string[];
|
|
40
|
+
export type HeatmapProps = {
|
|
41
|
+
/** The count of each day, keyed `YYYY-MM-DD`; a day not named had none. */
|
|
42
|
+
days: Record<string, number>;
|
|
43
|
+
/** The first and last day shown, inclusive. */
|
|
44
|
+
from: string;
|
|
45
|
+
to: string;
|
|
46
|
+
/** What the grid says to a reader who cannot see it. */
|
|
47
|
+
label: string;
|
|
48
|
+
/** The line for the day under the pointer. */
|
|
49
|
+
line?: (day: string, count: number) => ReactNode;
|
|
50
|
+
/** The line when no day is under the pointer. */
|
|
51
|
+
rest?: ReactNode;
|
|
52
|
+
/** The two ends of the legend; with none the legend is not drawn. */
|
|
53
|
+
legend?: {
|
|
54
|
+
less: ReactNode;
|
|
55
|
+
more: ReactNode;
|
|
56
|
+
};
|
|
57
|
+
/** The language month names are written in; the reader's by default. */
|
|
58
|
+
locale?: string;
|
|
59
|
+
/** Wipe the grid in the first time it is seen. */
|
|
60
|
+
reveal?: boolean;
|
|
61
|
+
};
|
|
62
|
+
export declare function Heatmap({ days, from, to, label, line, rest, legend, locale, reveal, }: HeatmapProps): import("react").JSX.Element | null;
|
|
63
|
+
export type SparklineProps = {
|
|
64
|
+
/** The values, oldest first. */
|
|
65
|
+
values: readonly number[];
|
|
66
|
+
/** What the bars say to a reader who cannot see them. */
|
|
67
|
+
label: string;
|
|
68
|
+
/** The height of the tallest bar, in px. */
|
|
69
|
+
height?: number;
|
|
70
|
+
};
|
|
71
|
+
export declare function Sparkline({ values, label, height }: SparklineProps): import("react").JSX.Element | null;
|
|
72
|
+
export {};
|
|
73
|
+
//# sourceMappingURL=heat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heat.d.ts","sourceRoot":"","sources":["../../src/marketing/heat.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAW5E,oEA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CAAC,EAAE;QAAE,IAAI,EAAE,SAAS,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE,CAAA;IAC7C,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kDAAkD;IAClD,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AASD,wBAAgB,OAAO,CAAC,EACtB,IAAI,EACJ,IAAI,EACJ,EAAE,EACF,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,MAAM,EACN,MAAa,GACd,EAAE,YAAY,sCA4Id;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,gCAAgC;IAChC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;IACzB,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAA;IACb,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,wBAAgB,SAAS,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAW,EAAE,EAAE,cAAc,sCAwBvE"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* A year of days as one grid, and a run of values as one line of bars.
|
|
5
|
+
*
|
|
6
|
+
* Heatmap a count a day over a window, a week a column, four shades; the
|
|
7
|
+
* day under the pointer is named in the line beneath
|
|
8
|
+
* Sparkline a run of values as bars, tallest to the height given
|
|
9
|
+
*
|
|
10
|
+
* Both take their data as props and fetch nothing: a figure the caller does not
|
|
11
|
+
* hold is not passed, and a grid with no count in it draws nothing. The shades
|
|
12
|
+
* are the ink at a share of its strength, so the grid retunes with the theme,
|
|
13
|
+
* and four of them are cut at the quartiles of the days that had any count, so
|
|
14
|
+
* it reads the same in a quiet year and a loud one. The grid is wiped into place
|
|
15
|
+
* once, the first time it is seen, and stands drawn for a reader who wants no
|
|
16
|
+
* motion (`reveal`).
|
|
17
|
+
*/
|
|
18
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
19
|
+
import { Text, View, XStack, YStack } from '@hanzo/gui';
|
|
20
|
+
import { slot } from '../backends/gui/slot.js';
|
|
21
|
+
const DAY = 86_400_000;
|
|
22
|
+
const WEEK = 7;
|
|
23
|
+
/** The day, UTC, as `YYYY-MM-DD`. */
|
|
24
|
+
const key = (t) => new Date(t).toISOString().slice(0, 10);
|
|
25
|
+
/** The days of a window, oldest first, `from` and `to` included. */
|
|
26
|
+
export function span(from, to) {
|
|
27
|
+
const out = [];
|
|
28
|
+
for (let t = Date.parse(`${from}T00:00:00Z`); t <= Date.parse(`${to}T00:00:00Z`); t += DAY)
|
|
29
|
+
out.push(key(t));
|
|
30
|
+
return out;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The three cuts between four shades: the quartiles of the days that had any
|
|
34
|
+
* count. A year with none has nothing to cut.
|
|
35
|
+
*/
|
|
36
|
+
export function cuts(days) {
|
|
37
|
+
const counts = Object.values(days)
|
|
38
|
+
.filter((n) => n > 0)
|
|
39
|
+
.sort((a, b) => a - b);
|
|
40
|
+
const at = (q) => counts[Math.min(counts.length - 1, Math.floor(q * counts.length))] ?? 0;
|
|
41
|
+
return [at(0.25), at(0.5), at(0.75)];
|
|
42
|
+
}
|
|
43
|
+
/** The shade a count earns: 0 for none, then 1 to 4 up the quartiles. */
|
|
44
|
+
export const shade = (n, cut) => n <= 0 ? 0 : n <= cut[0] ? 1 : n <= cut[1] ? 2 : n <= cut[2] ? 3 : 4;
|
|
45
|
+
/** A fill the colour table does not name: a page's own CSS value, which gui emits as written. */
|
|
46
|
+
const fill = (c) => ({ backgroundColor: c });
|
|
47
|
+
/** The ink of each shade, from the page's own so the grid follows the theme. */
|
|
48
|
+
const INK = [
|
|
49
|
+
'var(--muted)',
|
|
50
|
+
'color-mix(in srgb, var(--foreground) 22%, transparent)',
|
|
51
|
+
'color-mix(in srgb, var(--foreground) 42%, transparent)',
|
|
52
|
+
'color-mix(in srgb, var(--foreground) 68%, transparent)',
|
|
53
|
+
'var(--foreground)',
|
|
54
|
+
];
|
|
55
|
+
/** The weeks of a window, Sunday first, with the days outside it kept as unseen cells so the columns stay whole. */
|
|
56
|
+
export function weeks(days, from, to) {
|
|
57
|
+
const first = Date.parse(`${from}T00:00:00Z`);
|
|
58
|
+
const last = Date.parse(`${to}T00:00:00Z`);
|
|
59
|
+
const cut = cuts(days);
|
|
60
|
+
const start = first - new Date(first).getUTCDay() * DAY;
|
|
61
|
+
const out = [];
|
|
62
|
+
for (let t = start; t <= last; t += WEEK * DAY) {
|
|
63
|
+
out.push(Array.from({ length: WEEK }, (_, d) => {
|
|
64
|
+
const at = t + d * DAY;
|
|
65
|
+
const count = days[key(at)] ?? 0;
|
|
66
|
+
return {
|
|
67
|
+
day: key(at),
|
|
68
|
+
count,
|
|
69
|
+
level: shade(count, cut),
|
|
70
|
+
shown: at >= first && at <= last,
|
|
71
|
+
};
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
return out;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Each week's month label: a month is named over the first week that holds its
|
|
78
|
+
* first seven days, and the window's first column is named too, unless the next
|
|
79
|
+
* month is named within two columns of it and the two would run together.
|
|
80
|
+
*/
|
|
81
|
+
export function monthLabels(grid, from, locale) {
|
|
82
|
+
const name = (day) => new Date(`${day}T00:00:00Z`).toLocaleDateString(locale, {
|
|
83
|
+
timeZone: 'UTC',
|
|
84
|
+
month: 'short',
|
|
85
|
+
});
|
|
86
|
+
const labels = grid.map((w, i) => {
|
|
87
|
+
const first = w.find((c) => c.shown)?.day ?? from;
|
|
88
|
+
return i === 0 || Number(first.slice(8, 10)) <= 7 ? name(first) : '';
|
|
89
|
+
});
|
|
90
|
+
const next = labels.findIndex((l, i) => i > 0 && l);
|
|
91
|
+
if (labels[0] && next > 0 && next < 3)
|
|
92
|
+
labels[0] = '';
|
|
93
|
+
return labels;
|
|
94
|
+
}
|
|
95
|
+
/** The least width a week's column may be drawn at: a cell is nine pixels and a gap three. */
|
|
96
|
+
const CELL = 12;
|
|
97
|
+
const still = () => typeof matchMedia === 'function' &&
|
|
98
|
+
matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
99
|
+
export function Heatmap({ days, from, to, label, line, rest, legend, locale, reveal = true, }) {
|
|
100
|
+
const grid = useMemo(() => weeks(days, from, to), [days, from, to]);
|
|
101
|
+
const [at, setAt] = useState(null);
|
|
102
|
+
// The container is watched and the grid inside it is wiped: a grid clipped to nothing is never seen to intersect.
|
|
103
|
+
const box = useRef(null);
|
|
104
|
+
const wipe = useRef(null);
|
|
105
|
+
// A narrow screen scrolls the year sideways, and starts at its newest week.
|
|
106
|
+
useEffect(() => {
|
|
107
|
+
const el = wipe.current;
|
|
108
|
+
if (el)
|
|
109
|
+
el.scrollLeft = el.scrollWidth;
|
|
110
|
+
}, [days, from, to]);
|
|
111
|
+
// The grid waits fully clipped from its first frame, so it needs no style of its own to hide it,
|
|
112
|
+
// and plays when it is first seen. Where animation or observation is missing it stays drawn.
|
|
113
|
+
useEffect(() => {
|
|
114
|
+
const el = wipe.current;
|
|
115
|
+
const watched = box.current;
|
|
116
|
+
if (!reveal ||
|
|
117
|
+
!el ||
|
|
118
|
+
!watched ||
|
|
119
|
+
typeof el.animate !== 'function' ||
|
|
120
|
+
typeof IntersectionObserver === 'undefined' ||
|
|
121
|
+
still())
|
|
122
|
+
return;
|
|
123
|
+
const a = el.animate([{ clipPath: 'inset(0 100% 0 0)' }, { clipPath: 'inset(0 0 0 0)' }], { duration: 1100, easing: 'cubic-bezier(0.2, 0.7, 0.2, 1)', fill: 'both' });
|
|
124
|
+
a.pause();
|
|
125
|
+
const io = new IntersectionObserver(([e]) => {
|
|
126
|
+
if (!e?.isIntersecting)
|
|
127
|
+
return;
|
|
128
|
+
a.play();
|
|
129
|
+
io.disconnect();
|
|
130
|
+
}, { threshold: 0.3 });
|
|
131
|
+
io.observe(watched);
|
|
132
|
+
return () => {
|
|
133
|
+
io.disconnect();
|
|
134
|
+
a.cancel();
|
|
135
|
+
};
|
|
136
|
+
}, [reveal]);
|
|
137
|
+
if (!Object.values(days).some((n) => n > 0))
|
|
138
|
+
return null;
|
|
139
|
+
const columns = `repeat(${grid.length}, minmax(0, 1fr))`;
|
|
140
|
+
const named = at && at >= from && at <= to ? at : null;
|
|
141
|
+
const months = monthLabels(grid, from, locale);
|
|
142
|
+
return (_jsxs(YStack, { gap: 14, ...slot('heatmap'), children: [_jsx(View, { ref: box, children: _jsx(View, { ref: wipe, overflowX: "auto", children: _jsxs(View, { minW: grid.length * CELL, children: [_jsx(View, { display: "grid", gridTemplateColumns: columns, gap: 3, pb: 6, "aria-hidden": true, children: months.map((m, i) => (_jsx(Text, { fontFamily: "$mono", fontSize: "$1", lineHeight: "$1", color: "var(--muted-foreground)", whiteSpace: "nowrap", overflow: "visible", children: m }, i))) }), _jsx(View, { role: "img", "aria-label": label, display: "grid", gridTemplateColumns: columns, gridTemplateRows: "repeat(7, auto)", gap: 3, gridAutoFlow: "column", onPointerMove: (e) => setAt(e.target.dataset?.day ?? null), onPointerLeave: () => setAt(null), children: grid.flat().map((c) => (_jsx(View, { "data-day": c.shown ? c.day : undefined, aspectRatio: 1, rounded: 2, opacity: c.shown ? 1 : 0, ...fill(INK[c.level]) }, c.day))) })] }) }) }), _jsxs(XStack, { justify: "space-between", items: "center", flexWrap: "wrap", gap: 12, children: [_jsx(Text, { fontFamily: "$mono", fontSize: "$1", lineHeight: "$1", color: "var(--muted-foreground)", "aria-live": "polite", ...slot('heatmap-line'), children: named && line ? line(named, days[named] ?? 0) : rest }), legend ? (_jsxs(XStack, { items: "center", gap: 6, "aria-hidden": true, children: [_jsx(Text, { fontFamily: "$mono", fontSize: "$1", color: "var(--muted-foreground)", children: legend.less }), INK.map((s) => (_jsx(View, { width: 11, height: 11, rounded: 2, ...fill(s) }, s))), _jsx(Text, { fontFamily: "$mono", fontSize: "$1", color: "var(--muted-foreground)", children: legend.more })] })) : null] })] }));
|
|
143
|
+
}
|
|
144
|
+
export function Sparkline({ values, label, height = 40 }) {
|
|
145
|
+
const top = Math.max(0, ...values);
|
|
146
|
+
if (!values.length || top <= 0)
|
|
147
|
+
return null;
|
|
148
|
+
return (_jsx(XStack, { role: "img", "aria-label": label, items: "flex-end", gap: 2, height: height, ...slot('sparkline'), children: values.map((v, i) => (_jsx(View, { flex: 1, minW: 1, height: (v > 0 ? `${Math.max(4, (100 * v) / top)}%` : 1), rounded: 1, ...fill(v > 0 ? 'var(--foreground)' : 'var(--muted)') }, i))) }));
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=heat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heat.js","sourceRoot":"","sources":["../../src/marketing/heat.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AAC5E,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAEvD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAE3C,MAAM,GAAG,GAAG,UAAU,CAAA;AACtB,MAAM,IAAI,GAAG,CAAC,CAAA;AAEd,qCAAqC;AACrC,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;AAEjE,oEAAoE;AACpE,MAAM,UAAU,IAAI,CAAC,IAAY,EAAE,EAAU;IAC3C,MAAM,GAAG,GAAa,EAAE,CAAA;IACxB,KACE,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,YAAY,CAAC,EACvC,CAAC,IAAI,IAAI,CAAC,KAAK,CA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AO,CACL,KAAC,MAAM,IACL,IAAI,EAAC,KAAK,gBACE,KAAK,EACjB,KAAK,EAAC,UAAU,EAChB,GAAG,EAAE,CAAC,EACN,MAAM,EAAE,MAAM,KACV,IAAI,CAAC,WAAW,CAAC,YAEpB,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACpB,KAAC,IAAI,IAEH,IAAI,EAAE,CAAC,EACP,IAAI,EAAE,CAAC,EACP,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAU,EACjE,OAAO,EAAE,CAAC,KACN,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,cAAc,CAAC,IALjD,CAAC,CAMN,CACH,CAAC,GACK,CACV,CAAA;AACH,CAAC"}
|
package/dist/marketing/index.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.FeatureGrid = exports.Feature = exports.Section = exports.PageHeader = exports.initials = exports.Repo = exports.Languages = exports.Faces = exports.Counts = exports.weeks = exports.span = exports.shade = exports.cuts = exports.Sparkline = exports.Heatmap = exports.Run = exports.Document = exports.Pager = exports.Pair = exports.Lattice = exports.Reveal = exports.Lift = exports.Cell = exports.Leaf = exports.More = exports.Chip = exports.Action = exports.Claim = exports.Lede = exports.Eyebrow = exports.Title = exports.Display = exports.Line = exports.TextLink = exports.Cta = exports.ClosingCta = exports.Faq = exports.Footer = exports.way = exports.termOf = exports.seats = exports.saving = exports.money = exports.merged = exports.charge = exports.audience = exports.Plans = exports.Media = exports.Hero = exports.PageLoading = void 0;
|
|
4
|
+
exports.LogoRow = exports.Quote = exports.Steps = void 0;
|
|
4
5
|
/**
|
|
5
6
|
* The marketing surface every Hanzo, Lux and Zoo site shares: the first screen,
|
|
6
7
|
* the plans, the questions, the closing call and the blocks a feature page is
|
|
@@ -57,6 +58,19 @@ var document_1 = require("./document.cjs");
|
|
|
57
58
|
Object.defineProperty(exports, "Document", { enumerable: true, get: function () { return document_1.Document; } });
|
|
58
59
|
var run_1 = require("./run.cjs");
|
|
59
60
|
Object.defineProperty(exports, "Run", { enumerable: true, get: function () { return run_1.Run; } });
|
|
61
|
+
var heat_1 = require("./heat.cjs");
|
|
62
|
+
Object.defineProperty(exports, "Heatmap", { enumerable: true, get: function () { return heat_1.Heatmap; } });
|
|
63
|
+
Object.defineProperty(exports, "Sparkline", { enumerable: true, get: function () { return heat_1.Sparkline; } });
|
|
64
|
+
Object.defineProperty(exports, "cuts", { enumerable: true, get: function () { return heat_1.cuts; } });
|
|
65
|
+
Object.defineProperty(exports, "shade", { enumerable: true, get: function () { return heat_1.shade; } });
|
|
66
|
+
Object.defineProperty(exports, "span", { enumerable: true, get: function () { return heat_1.span; } });
|
|
67
|
+
Object.defineProperty(exports, "weeks", { enumerable: true, get: function () { return heat_1.weeks; } });
|
|
68
|
+
var repo_1 = require("./repo.cjs");
|
|
69
|
+
Object.defineProperty(exports, "Counts", { enumerable: true, get: function () { return repo_1.Counts; } });
|
|
70
|
+
Object.defineProperty(exports, "Faces", { enumerable: true, get: function () { return repo_1.Faces; } });
|
|
71
|
+
Object.defineProperty(exports, "Languages", { enumerable: true, get: function () { return repo_1.Languages; } });
|
|
72
|
+
Object.defineProperty(exports, "Repo", { enumerable: true, get: function () { return repo_1.Repo; } });
|
|
73
|
+
Object.defineProperty(exports, "initials", { enumerable: true, get: function () { return repo_1.initials; } });
|
|
60
74
|
var blocks_1 = require("./blocks.cjs");
|
|
61
75
|
Object.defineProperty(exports, "PageHeader", { enumerable: true, get: function () { return blocks_1.PageHeader; } });
|
|
62
76
|
Object.defineProperty(exports, "Section", { enumerable: true, get: function () { return blocks_1.Section; } });
|
|
@@ -19,5 +19,7 @@ export { Pair, type PairProps } from './pair.js';
|
|
|
19
19
|
export { Pager, type PagerProps } from './pager.js';
|
|
20
20
|
export { Document, type DocumentProps } from './document.js';
|
|
21
21
|
export { Run, type RunProps } from './run.js';
|
|
22
|
+
export { Heatmap, Sparkline, cuts, shade, span, weeks, type HeatmapProps, type SparklineProps } from './heat.js';
|
|
23
|
+
export { Counts, Faces, Languages, Repo, initials, type CountsProps, type FacesProps, type LanguagesProps, type RepoProps } from './repo.js';
|
|
22
24
|
export { PageHeader, Section, Feature, FeatureGrid, Steps, Quote, LogoRow, type Step, type Logo, type PageHeaderProps, type SectionProps, type FeatureProps, type QuoteProps, } from './blocks.js';
|
|
23
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/marketing/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,KAAK,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,QAAQ,CAAA;AAC1I,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AACvF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YAAY,EAAE,MAAM,WAAW,CAAA;AACnG,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,GAAG,EAAE,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,QAAQ,CAAA;AAC7G,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAA;AACzI,OAAO,EACL,UAAU,EACV,OAAO,EACP,OAAO,EACP,WAAW,EACX,KAAK,EACL,KAAK,EACL,OAAO,EACP,KAAK,IAAI,EACT,KAAK,IAAI,EACT,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,UAAU,GAChB,MAAM,UAAU,CAAA"}
|
package/dist/marketing/index.js
CHANGED
|
@@ -19,5 +19,7 @@ export { Pair } from './pair.js';
|
|
|
19
19
|
export { Pager } from './pager.js';
|
|
20
20
|
export { Document } from './document.js';
|
|
21
21
|
export { Run } from './run.js';
|
|
22
|
+
export { Heatmap, Sparkline, cuts, shade, span, weeks } from './heat.js';
|
|
23
|
+
export { Counts, Faces, Languages, Repo, initials } from './repo.js';
|
|
22
24
|
export { PageHeader, Section, Feature, FeatureGrid, Steps, Quote, LogoRow, } from './blocks.js';
|
|
23
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":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MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAA0E,MAAM,QAAQ,CAAA;AACzI,OAAO,EACL,UAAU,EACV,OAAO,EACP,OAAO,EACP,WAAW,EACX,KAAK,EACL,KAAK,EACL,OAAO,GAOR,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use client';"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.initials = void 0;
|
|
5
|
+
exports.Counts = Counts;
|
|
6
|
+
exports.Repo = Repo;
|
|
7
|
+
exports.Languages = Languages;
|
|
8
|
+
exports.Faces = Faces;
|
|
9
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
10
|
+
const gui_1 = require("@hanzo/gui");
|
|
11
|
+
const lucide_icons_2_1 = require("@hanzogui/lucide-icons-2");
|
|
12
|
+
const slot_1 = require("../backends/gui/slot.cjs");
|
|
13
|
+
/** A fill the colour table does not name: a page's own CSS value, which gui emits as written. */
|
|
14
|
+
const fill = (c) => ({ backgroundColor: c });
|
|
15
|
+
const group = (n) => n.toLocaleString('en-US');
|
|
16
|
+
const real = (n) => typeof n === 'number' && Number.isFinite(n) && n >= 0;
|
|
17
|
+
function Counts({ stars, forks, size = 'md' }) {
|
|
18
|
+
const icon = size === 'sm' ? 12 : 14;
|
|
19
|
+
const one = (n, mark, name) => ((0, jsx_runtime_1.jsxs)(gui_1.XStack, { items: "center", gap: 4, ...(0, slot_1.slot)(`count-${name}`), children: [mark, (0, jsx_runtime_1.jsx)(gui_1.Text, { fontFamily: "$mono", fontSize: size === 'sm' ? '$1' : '$2', color: "var(--muted-foreground)", fontVariant: ['tabular-nums'], "aria-label": `${group(n)} ${name}`, children: group(n) })] }, name));
|
|
20
|
+
const shown = [
|
|
21
|
+
real(stars)
|
|
22
|
+
? one(stars, (0, jsx_runtime_1.jsx)(lucide_icons_2_1.Star, { size: icon, color: "var(--muted-foreground)", "aria-hidden": true }), 'stars')
|
|
23
|
+
: null,
|
|
24
|
+
real(forks)
|
|
25
|
+
? one(forks, (0, jsx_runtime_1.jsx)(lucide_icons_2_1.GitFork, { size: icon, color: "var(--muted-foreground)", "aria-hidden": true }), 'forks')
|
|
26
|
+
: null,
|
|
27
|
+
].filter(Boolean);
|
|
28
|
+
if (!shown.length)
|
|
29
|
+
return null;
|
|
30
|
+
return ((0, jsx_runtime_1.jsx)(gui_1.XStack, { items: "center", gap: 12, ...(0, slot_1.slot)('counts'), children: shown }));
|
|
31
|
+
}
|
|
32
|
+
function Repo({ name, description, href, target, rel, language, tag, stars, forks, actions, }) {
|
|
33
|
+
const linked = href != null;
|
|
34
|
+
return ((0, jsx_runtime_1.jsxs)(gui_1.YStack, { ...(0, slot_1.slot)('repo'), gap: 10, p: 16, rounded: "var(--radius-xl)", borderWidth: 1, borderColor: "var(--border)", ...fill('var(--surface-card)'), ...(linked
|
|
35
|
+
? { hoverStyle: { borderColor: 'var(--border-strong)' } }
|
|
36
|
+
: null), minW: 0, children: [(0, jsx_runtime_1.jsxs)(gui_1.YStack, { gap: 6, grow: 1, shrink: 0, ...(linked
|
|
37
|
+
? {
|
|
38
|
+
render: (0, jsx_runtime_1.jsx)("a", { href: href, target: target, rel: rel }),
|
|
39
|
+
textDecorationLine: 'none',
|
|
40
|
+
}
|
|
41
|
+
: null), children: [(0, jsx_runtime_1.jsx)(gui_1.Text, { fontFamily: "$mono", fontSize: "$2", fontWeight: "600", color: "var(--foreground)", numberOfLines: 1, "data-i18n-ltr": "", children: name }), description ? ((0, jsx_runtime_1.jsx)(gui_1.Text, { fontSize: "$2", lineHeight: "$3", color: "var(--muted-foreground)", numberOfLines: 2, minH: 38, children: description })) : null] }), (0, jsx_runtime_1.jsxs)(gui_1.XStack, { items: "center", justify: "space-between", gap: 8, flexWrap: "wrap", children: [(0, jsx_runtime_1.jsxs)(gui_1.XStack, { items: "center", gap: 12, children: [language ? ((0, jsx_runtime_1.jsx)(gui_1.Text, { fontFamily: "$mono", fontSize: "$1", color: "var(--muted-foreground)", children: language })) : null, tag ? ((0, jsx_runtime_1.jsx)(gui_1.Text, { fontFamily: "$mono", fontSize: "$1", color: "var(--muted-foreground)", px: 6, py: 1, rounded: 4, borderWidth: 1, borderColor: "var(--border)", children: tag })) : null, (0, jsx_runtime_1.jsx)(Counts, { stars: stars, forks: forks, size: "sm" })] }), actions] })] }));
|
|
42
|
+
}
|
|
43
|
+
/** Four inks cycle down the shares, so neighbours differ in the page's own monochrome. */
|
|
44
|
+
const SHARE = [
|
|
45
|
+
'var(--foreground)',
|
|
46
|
+
'color-mix(in srgb, var(--foreground) 62%, transparent)',
|
|
47
|
+
'color-mix(in srgb, var(--foreground) 36%, transparent)',
|
|
48
|
+
'color-mix(in srgb, var(--foreground) 18%, transparent)',
|
|
49
|
+
];
|
|
50
|
+
function Languages({ share, label }) {
|
|
51
|
+
const rows = share.filter((s) => s.share > 0);
|
|
52
|
+
const total = rows.reduce((n, s) => n + s.share, 0);
|
|
53
|
+
if (!total)
|
|
54
|
+
return null;
|
|
55
|
+
return ((0, jsx_runtime_1.jsxs)(gui_1.YStack, { gap: 8, ...(0, slot_1.slot)('languages'), children: [(0, jsx_runtime_1.jsx)(gui_1.XStack, { role: "img", "aria-label": label, height: 8, rounded: 9999, overflow: "hidden", gap: 2, children: rows.map((s, i) => ((0, jsx_runtime_1.jsx)(gui_1.View, { height: "100%", width: `${((100 * s.share) / total).toFixed(2)}%`, ...fill(SHARE[i % SHARE.length]) }, s.name))) }), (0, jsx_runtime_1.jsx)(gui_1.XStack, { gap: 14, flexWrap: "wrap", children: rows.map((s, i) => ((0, jsx_runtime_1.jsxs)(gui_1.XStack, { items: "center", gap: 6, children: [(0, jsx_runtime_1.jsx)(gui_1.View, { width: 8, height: 8, rounded: 9999, ...fill(SHARE[i % SHARE.length]) }), (0, jsx_runtime_1.jsxs)(gui_1.Text, { fontFamily: "$mono", fontSize: "$1", color: "var(--muted-foreground)", children: [s.name, " ", ((100 * s.share) / total).toFixed(1), "%"] })] }, s.name))) })] }));
|
|
56
|
+
}
|
|
57
|
+
/** Up to two initials of a name. */
|
|
58
|
+
const initials = (name) => name
|
|
59
|
+
.trim()
|
|
60
|
+
.split(/\s+/)
|
|
61
|
+
.slice(0, 2)
|
|
62
|
+
.map((w) => Array.from(w)[0] ?? '')
|
|
63
|
+
.join('')
|
|
64
|
+
.toUpperCase();
|
|
65
|
+
exports.initials = initials;
|
|
66
|
+
function Faces({ people, max = 5 }) {
|
|
67
|
+
if (!people.length)
|
|
68
|
+
return null;
|
|
69
|
+
const shown = people.slice(0, max);
|
|
70
|
+
const more = people.length - shown.length;
|
|
71
|
+
return ((0, jsx_runtime_1.jsxs)(gui_1.XStack, { items: "center", ...(0, slot_1.slot)('faces'), children: [shown.map((p, i) => ((0, jsx_runtime_1.jsx)(gui_1.View, { width: 28, height: 28, rounded: 9999, items: "center", justify: "center", borderWidth: 2, borderColor: "var(--background)", ...fill('var(--secondary)'), marginInlineStart: i ? -8 : 0, title: p.name, children: (0, jsx_runtime_1.jsx)(gui_1.Text, { fontFamily: "$mono", fontSize: "$1", fontWeight: "600", color: "var(--foreground)", children: (0, exports.initials)(p.name) }) }, `${p.name}-${i}`))), more > 0 ? ((0, jsx_runtime_1.jsxs)(gui_1.Text, { fontFamily: "$mono", fontSize: "$1", color: "var(--muted-foreground)", marginInlineStart: 8, children: ["+", group(more)] })) : null] }));
|
|
72
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A repository, and the small counts that describe it.
|
|
3
|
+
*
|
|
4
|
+
* Repo a card: its name, a line on it, its counts and language, and the
|
|
5
|
+
* actions the caller puts at its foot; the whole card is a link when
|
|
6
|
+
* it is given an `href`
|
|
7
|
+
* Counts stars and forks, each with its mark; a count the caller does not
|
|
8
|
+
* hold is not drawn
|
|
9
|
+
* Languages the share of each language as one bar and a legend
|
|
10
|
+
* Faces people as overlapping initials, with the rest counted
|
|
11
|
+
*
|
|
12
|
+
* Each takes its data as props and fetches nothing, draws from tokens, and is a
|
|
13
|
+
* gui element, so one import serves web, native and desktop.
|
|
14
|
+
*/
|
|
15
|
+
import type { ReactNode } from 'react';
|
|
16
|
+
export type CountsProps = {
|
|
17
|
+
stars?: number;
|
|
18
|
+
forks?: number;
|
|
19
|
+
/** The size of the marks and figures. */
|
|
20
|
+
size?: 'sm' | 'md';
|
|
21
|
+
};
|
|
22
|
+
export declare function Counts({ stars, forks, size }: CountsProps): import("react").JSX.Element | null;
|
|
23
|
+
export type RepoProps = {
|
|
24
|
+
/** `owner/name`. */
|
|
25
|
+
name: string;
|
|
26
|
+
description?: ReactNode;
|
|
27
|
+
/** Where the card goes; with none the card is not a link. */
|
|
28
|
+
href?: string;
|
|
29
|
+
target?: string;
|
|
30
|
+
rel?: string;
|
|
31
|
+
language?: ReactNode;
|
|
32
|
+
/** A word that files the repository, in an outline beside the counts. */
|
|
33
|
+
tag?: ReactNode;
|
|
34
|
+
stars?: number;
|
|
35
|
+
forks?: number;
|
|
36
|
+
/** What sits at the card's foot: a star button, a link. */
|
|
37
|
+
actions?: ReactNode;
|
|
38
|
+
};
|
|
39
|
+
export declare function Repo({ name, description, href, target, rel, language, tag, stars, forks, actions, }: RepoProps): import("react").JSX.Element;
|
|
40
|
+
export type LanguagesProps = {
|
|
41
|
+
/** Each language and its share, any scale: the bar is each over the sum. */
|
|
42
|
+
share: readonly {
|
|
43
|
+
name: string;
|
|
44
|
+
share: number;
|
|
45
|
+
}[];
|
|
46
|
+
/** What the bar says to a reader who cannot see it. */
|
|
47
|
+
label: string;
|
|
48
|
+
};
|
|
49
|
+
export declare function Languages({ share, label }: LanguagesProps): import("react").JSX.Element | null;
|
|
50
|
+
export type FacesProps = {
|
|
51
|
+
/** Each person by the name their initials are read from. */
|
|
52
|
+
people: readonly {
|
|
53
|
+
name: string;
|
|
54
|
+
}[];
|
|
55
|
+
/** How many are drawn; the rest are counted. */
|
|
56
|
+
max?: number;
|
|
57
|
+
};
|
|
58
|
+
/** Up to two initials of a name. */
|
|
59
|
+
export declare const initials: (name: string) => string;
|
|
60
|
+
export declare function Faces({ people, max }: FacesProps): import("react").JSX.Element | null;
|
|
61
|
+
//# sourceMappingURL=repo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo.d.ts","sourceRoot":"","sources":["../../src/marketing/repo.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAatC,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,yCAAyC;IACzC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;CACnB,CAAA;AAED,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAW,EAAE,EAAE,WAAW,sCAsChE;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,yEAAyE;IACzE,GAAG,CAAC,EAAE,SAAS,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2DAA2D;IAC3D,OAAO,CAAC,EAAE,SAAS,CAAA;CACpB,CAAA;AAED,wBAAgB,IAAI,CAAC,EACnB,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,MAAM,EACN,GAAG,EACH,QAAQ,EACR,GAAG,EACH,KAAK,EACL,KAAK,EACL,OAAO,GACR,EAAE,SAAS,+BAgFX;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,4EAA4E;IAC5E,KAAK,EAAE,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACjD,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAUD,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,cAAc,sCA4CzD;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,4DAA4D;IAC5D,MAAM,EAAE,SAAS;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACnC,gDAAgD;IAChD,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED,oCAAoC;AACpC,eAAO,MAAM,QAAQ,SAAU,MAAM,WAOnB,CAAA;AAElB,wBAAgB,KAAK,CAAC,EAAE,MAAM,EAAE,GAAO,EAAE,EAAE,UAAU,sCA0CpD"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Text, View, XStack, YStack } from '@hanzo/gui';
|
|
4
|
+
import { GitFork, Star } from '@hanzogui/lucide-icons-2';
|
|
5
|
+
import { slot } from '../backends/gui/slot.js';
|
|
6
|
+
/** A fill the colour table does not name: a page's own CSS value, which gui emits as written. */
|
|
7
|
+
const fill = (c) => ({ backgroundColor: c });
|
|
8
|
+
const group = (n) => n.toLocaleString('en-US');
|
|
9
|
+
const real = (n) => typeof n === 'number' && Number.isFinite(n) && n >= 0;
|
|
10
|
+
export function Counts({ stars, forks, size = 'md' }) {
|
|
11
|
+
const icon = size === 'sm' ? 12 : 14;
|
|
12
|
+
const one = (n, mark, name) => (_jsxs(XStack, { items: "center", gap: 4, ...slot(`count-${name}`), children: [mark, _jsx(Text, { fontFamily: "$mono", fontSize: size === 'sm' ? '$1' : '$2', color: "var(--muted-foreground)", fontVariant: ['tabular-nums'], "aria-label": `${group(n)} ${name}`, children: group(n) })] }, name));
|
|
13
|
+
const shown = [
|
|
14
|
+
real(stars)
|
|
15
|
+
? one(stars, _jsx(Star, { size: icon, color: "var(--muted-foreground)", "aria-hidden": true }), 'stars')
|
|
16
|
+
: null,
|
|
17
|
+
real(forks)
|
|
18
|
+
? one(forks, _jsx(GitFork, { size: icon, color: "var(--muted-foreground)", "aria-hidden": true }), 'forks')
|
|
19
|
+
: null,
|
|
20
|
+
].filter(Boolean);
|
|
21
|
+
if (!shown.length)
|
|
22
|
+
return null;
|
|
23
|
+
return (_jsx(XStack, { items: "center", gap: 12, ...slot('counts'), children: shown }));
|
|
24
|
+
}
|
|
25
|
+
export function Repo({ name, description, href, target, rel, language, tag, stars, forks, actions, }) {
|
|
26
|
+
const linked = href != null;
|
|
27
|
+
return (_jsxs(YStack, { ...slot('repo'), gap: 10, p: 16, rounded: "var(--radius-xl)", borderWidth: 1, borderColor: "var(--border)", ...fill('var(--surface-card)'), ...(linked
|
|
28
|
+
? { hoverStyle: { borderColor: 'var(--border-strong)' } }
|
|
29
|
+
: null), minW: 0, children: [_jsxs(YStack, { gap: 6, grow: 1, shrink: 0, ...(linked
|
|
30
|
+
? {
|
|
31
|
+
render: _jsx("a", { href: href, target: target, rel: rel }),
|
|
32
|
+
textDecorationLine: 'none',
|
|
33
|
+
}
|
|
34
|
+
: null), children: [_jsx(Text, { fontFamily: "$mono", fontSize: "$2", fontWeight: "600", color: "var(--foreground)", numberOfLines: 1, "data-i18n-ltr": "", children: name }), description ? (_jsx(Text, { fontSize: "$2", lineHeight: "$3", color: "var(--muted-foreground)", numberOfLines: 2, minH: 38, children: description })) : null] }), _jsxs(XStack, { items: "center", justify: "space-between", gap: 8, flexWrap: "wrap", children: [_jsxs(XStack, { items: "center", gap: 12, children: [language ? (_jsx(Text, { fontFamily: "$mono", fontSize: "$1", color: "var(--muted-foreground)", children: language })) : null, tag ? (_jsx(Text, { fontFamily: "$mono", fontSize: "$1", color: "var(--muted-foreground)", px: 6, py: 1, rounded: 4, borderWidth: 1, borderColor: "var(--border)", children: tag })) : null, _jsx(Counts, { stars: stars, forks: forks, size: "sm" })] }), actions] })] }));
|
|
35
|
+
}
|
|
36
|
+
/** Four inks cycle down the shares, so neighbours differ in the page's own monochrome. */
|
|
37
|
+
const SHARE = [
|
|
38
|
+
'var(--foreground)',
|
|
39
|
+
'color-mix(in srgb, var(--foreground) 62%, transparent)',
|
|
40
|
+
'color-mix(in srgb, var(--foreground) 36%, transparent)',
|
|
41
|
+
'color-mix(in srgb, var(--foreground) 18%, transparent)',
|
|
42
|
+
];
|
|
43
|
+
export function Languages({ share, label }) {
|
|
44
|
+
const rows = share.filter((s) => s.share > 0);
|
|
45
|
+
const total = rows.reduce((n, s) => n + s.share, 0);
|
|
46
|
+
if (!total)
|
|
47
|
+
return null;
|
|
48
|
+
return (_jsxs(YStack, { gap: 8, ...slot('languages'), children: [_jsx(XStack, { role: "img", "aria-label": label, height: 8, rounded: 9999, overflow: "hidden", gap: 2, children: rows.map((s, i) => (_jsx(View, { height: "100%", width: `${((100 * s.share) / total).toFixed(2)}%`, ...fill(SHARE[i % SHARE.length]) }, s.name))) }), _jsx(XStack, { gap: 14, flexWrap: "wrap", children: rows.map((s, i) => (_jsxs(XStack, { items: "center", gap: 6, children: [_jsx(View, { width: 8, height: 8, rounded: 9999, ...fill(SHARE[i % SHARE.length]) }), _jsxs(Text, { fontFamily: "$mono", fontSize: "$1", color: "var(--muted-foreground)", children: [s.name, " ", ((100 * s.share) / total).toFixed(1), "%"] })] }, s.name))) })] }));
|
|
49
|
+
}
|
|
50
|
+
/** Up to two initials of a name. */
|
|
51
|
+
export const initials = (name) => name
|
|
52
|
+
.trim()
|
|
53
|
+
.split(/\s+/)
|
|
54
|
+
.slice(0, 2)
|
|
55
|
+
.map((w) => Array.from(w)[0] ?? '')
|
|
56
|
+
.join('')
|
|
57
|
+
.toUpperCase();
|
|
58
|
+
export function Faces({ people, max = 5 }) {
|
|
59
|
+
if (!people.length)
|
|
60
|
+
return null;
|
|
61
|
+
const shown = people.slice(0, max);
|
|
62
|
+
const more = people.length - shown.length;
|
|
63
|
+
return (_jsxs(XStack, { items: "center", ...slot('faces'), children: [shown.map((p, i) => (_jsx(View, { width: 28, height: 28, rounded: 9999, items: "center", justify: "center", borderWidth: 2, borderColor: "var(--background)", ...fill('var(--secondary)'), marginInlineStart: i ? -8 : 0, title: p.name, children: _jsx(Text, { fontFamily: "$mono", fontSize: "$1", fontWeight: "600", color: "var(--foreground)", children: initials(p.name) }) }, `${p.name}-${i}`))), more > 0 ? (_jsxs(Text, { fontFamily: "$mono", fontSize: "$1", color: "var(--muted-foreground)", marginInlineStart: 8, children: ["+", group(more)] })) : null] }));
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=repo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo.js","sourceRoot":"","sources":["../../src/marketing/repo.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAiBZ,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AAExD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAE3C,iGAAiG;AACjG,MAAM,IAAI,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,CAAW,CAAA;AAE9D,MAAM,KAAK,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA;AACtD,MAAM,IAAI,GAAG,CAAC,CAAqB,EAAe,EAAE,CAClD,OAAO,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AASvD,MAAM,UAAU,MAAM,CA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I,YAEnB,KAAC,IAAI,IACH,UAAU,EAAC,OAAO,EAClB,QAAQ,EAAC,IAAI,EACb,UAAU,EAAC,KAAK,EAChB,KAAK,EAAC,mBAAmB,YAExB,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GACZ,IAnBF,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,EAAE,CAoBhB,CACR,CAAC,EACD,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CACV,MAAC,IAAI,IACH,UAAU,EAAC,OAAO,EAClB,QAAQ,EAAC,IAAI,EACb,KAAK,EAAC,yBAAyB,EAC/B,iBAAiB,EAAE,CAAC,kBAElB,KAAK,CAAC,IAAI,CAAC,IACR,CACR,CAAC,CAAC,CAAC,IAAI,IACD,CACV,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/ui",
|
|
3
|
-
"version": "8.29.
|
|
3
|
+
"version": "8.29.22",
|
|
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": {
|