@hanzo/ui 8.27.42 → 8.27.44
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/chat/Chat.cjs +17 -2
- package/dist/chat/Chat.d.ts +12 -1
- package/dist/chat/Chat.d.ts.map +1 -1
- package/dist/chat/Chat.js +17 -2
- package/dist/chat/Chat.js.map +1 -1
- package/dist/consent/Consent.cjs +43 -8
- package/dist/consent/Consent.d.ts.map +1 -1
- package/dist/consent/Consent.js +45 -10
- package/dist/consent/Consent.js.map +1 -1
- package/dist/gallery.html +3 -5
- package/dist/onboarding/account.cjs +1 -1
- package/dist/onboarding/account.d.ts +3 -3
- package/dist/onboarding/account.d.ts.map +1 -1
- package/dist/onboarding/account.js +1 -1
- package/dist/onboarding/account.js.map +1 -1
- package/dist/onboarding/frame.cjs +1 -1
- package/dist/onboarding/frame.d.ts +1 -1
- package/dist/onboarding/frame.d.ts.map +1 -1
- package/dist/onboarding/frame.js +1 -1
- package/dist/onboarding/frame.js.map +1 -1
- package/dist/product/index.cjs +1 -0
- package/dist/product/index.d.ts +1 -0
- package/dist/product/index.d.ts.map +1 -1
- package/dist/product/index.js +1 -0
- package/dist/product/index.js.map +1 -1
- package/dist/product/useFileDrop.cjs +90 -0
- package/dist/product/useFileDrop.d.ts +6 -0
- package/dist/product/useFileDrop.d.ts.map +1 -0
- package/dist/product/useFileDrop.js +88 -0
- package/dist/product/useFileDrop.js.map +1 -0
- package/dist/styles.css +0 -2
- package/package.json +1 -1
package/dist/chat/Chat.cjs
CHANGED
|
@@ -40,6 +40,7 @@ const gui_1 = require("@hanzo/gui");
|
|
|
40
40
|
const react_1 = require("react");
|
|
41
41
|
const ink_1 = require("../backends/gui/ink.cjs");
|
|
42
42
|
const slot_1 = require("../backends/gui/slot.cjs");
|
|
43
|
+
const useFileDrop_1 = require("../product/useFileDrop.cjs");
|
|
43
44
|
const Composer_1 = require("./Composer.cjs");
|
|
44
45
|
const Message_1 = require("./Message.cjs");
|
|
45
46
|
const Parts_1 = require("./Parts.cjs");
|
|
@@ -62,8 +63,12 @@ const words_1 = require("./words.cjs");
|
|
|
62
63
|
* in exactly that direction: `Parts` reads `type` before it reads anything else.
|
|
63
64
|
*/
|
|
64
65
|
const draw = (said) => typeof said === 'string' || said == null ? ((0, ink_1.ink)((0, words_1.words)(said))) : ((0, jsx_runtime_1.jsx)(Parts_1.Parts, { parts: said }));
|
|
65
|
-
function Chat({ messages, streaming = false, send: onSend, stop: onStop, body, empty, composer, ...thread }) {
|
|
66
|
+
function Chat({ messages, streaming = false, send: onSend, stop: onStop, body, empty, composer, onFiles, ...thread }) {
|
|
66
67
|
const [draft, setDraft] = (0, react_1.useState)('');
|
|
68
|
+
// The ONE window-level drop, off the shared primitive. Enabled only when a
|
|
69
|
+
// host passed `onFiles` — a surface that cannot route a file leaves the
|
|
70
|
+
// window alone rather than swallowing the drop.
|
|
71
|
+
const { active: dropping } = (0, useFileDrop_1.useFileDrop)(onFiles ?? (() => { }), !!onFiles);
|
|
67
72
|
// Clearing here rather than in an effect on `messages` is what keeps a send
|
|
68
73
|
// from racing the answer: the draft is gone the moment it is sent, and a
|
|
69
74
|
// surface that rejects the turn does not get a cleared box back.
|
|
@@ -85,5 +90,15 @@ function Chat({ messages, streaming = false, send: onSend, stop: onStop, body, e
|
|
|
85
90
|
// from the composer lands on a `display: contents` wrapper or on the page,
|
|
86
91
|
// and then reports a component that is fine as broken, or one that is broken
|
|
87
92
|
// as fine.
|
|
88
|
-
return ((0, jsx_runtime_1.jsxs)(gui_1.YStack, { flex: 1, width: "100%", ...(0, slot_1.slot)('chat'), children: [messages.length === 0 && empty ? (empty) : ((0, jsx_runtime_1.jsx)(Thread_1.Thread, { flex: 1, ...thread, children: messages.map((turn, i) => ((0, jsx_runtime_1.jsx)(Message_1.Message, { role: turn.role, busy: streaming && i === last && turn.role === 'assistant', children: body ? body(turn) : draw(turn.content) }, turn.id))) })), (0, jsx_runtime_1.jsx)(Composer_1.Composer, { value: draft, onChange: setDraft, onSend: send, busy: streaming, ...(onStop ? { onStop } : {}), ...composer })
|
|
93
|
+
return ((0, jsx_runtime_1.jsxs)(gui_1.YStack, { flex: 1, width: "100%", ...(0, slot_1.slot)('chat'), children: [messages.length === 0 && empty ? (empty) : ((0, jsx_runtime_1.jsx)(Thread_1.Thread, { flex: 1, ...thread, children: messages.map((turn, i) => ((0, jsx_runtime_1.jsx)(Message_1.Message, { role: turn.role, busy: streaming && i === last && turn.role === 'assistant', children: body ? body(turn) : draw(turn.content) }, turn.id))) })), (0, jsx_runtime_1.jsx)(Composer_1.Composer, { value: draft, onChange: setDraft, onSend: send, busy: streaming, ...(onStop ? { onStop } : {}), ...composer }), dropping ? ((0, jsx_runtime_1.jsx)("div", { "aria-hidden": true, style: {
|
|
94
|
+
position: 'fixed',
|
|
95
|
+
inset: 0,
|
|
96
|
+
zIndex: 50,
|
|
97
|
+
display: 'flex',
|
|
98
|
+
alignItems: 'center',
|
|
99
|
+
justifyContent: 'center',
|
|
100
|
+
pointerEvents: 'none',
|
|
101
|
+
background: 'rgba(52, 211, 153, 0.08)',
|
|
102
|
+
border: '2px dashed #34d399',
|
|
103
|
+
}, children: (0, jsx_runtime_1.jsx)("span", { style: { fontSize: 15, fontWeight: 600, color: '#34d399' }, children: "Drop files to attach" }) })) : null] }));
|
|
89
104
|
}
|
package/dist/chat/Chat.d.ts
CHANGED
|
@@ -60,6 +60,17 @@ export interface ChatProps extends Omit<ThreadProps, 'children' | 'ref'> {
|
|
|
60
60
|
empty?: ReactNode;
|
|
61
61
|
/** The composer's own props — placeholder, hint, the send control, the field. */
|
|
62
62
|
composer?: Partial<ComposerProps>;
|
|
63
|
+
/**
|
|
64
|
+
* Route files dropped ANYWHERE in the window.
|
|
65
|
+
*
|
|
66
|
+
* Present, the surface lights a full-window overlay on a file drag and hands
|
|
67
|
+
* the dropped files here — the same window-level drop `@hanzo/chat` runs, off
|
|
68
|
+
* the one `useFileDrop` primitive, so a host gets "drop on any part of the
|
|
69
|
+
* interface" without writing a listener. Absent, the window is left untouched
|
|
70
|
+
* (the hook is disabled), because a drop with nowhere to go should not
|
|
71
|
+
* swallow the browser's own behaviour.
|
|
72
|
+
*/
|
|
73
|
+
onFiles?: (files: File[]) => void;
|
|
63
74
|
}
|
|
64
|
-
export declare function Chat({ messages, streaming, send: onSend, stop: onStop, body, empty, composer, ...thread }: ChatProps): import("react").JSX.Element;
|
|
75
|
+
export declare function Chat({ messages, streaming, send: onSend, stop: onStop, body, empty, composer, onFiles, ...thread }: ChatProps): import("react").JSX.Element;
|
|
65
76
|
//# sourceMappingURL=Chat.d.ts.map
|
package/dist/chat/Chat.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../src/chat/Chat.tsx"],"names":[],"mappings":"AAoCA,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../src/chat/Chat.tsx"],"names":[],"mappings":"AAoCA,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAK7D,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAW,KAAK,IAAI,EAAE,MAAM,WAAW,CAAA;AAE9C,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,EAAS,KAAK,IAAI,EAAE,MAAM,SAAS,CAAA;AAE1C;;;;;;;GAOG;AACH,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,IAAI,CAAA;IACV;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,IAAI,CAAA;CACf;AAED,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,KAAK,CAAC;IACtE,sCAAsC;IACtC,QAAQ,EAAE,IAAI,EAAE,CAAA;IAChB,iFAAiF;IACjF,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;;;;;;;;OAUG;IACH,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5B,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,IAAI,CAAA;IACjB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,SAAS,CAAA;IAChC,+DAA+D;IAC/D,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;IACjC;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAA;CAClC;AAyBD,wBAAgB,IAAI,CAAC,EACnB,QAAQ,EACR,SAAiB,EACjB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,OAAO,EACP,GAAG,MAAM,EACV,EAAE,SAAS,+BA6EX"}
|
package/dist/chat/Chat.js
CHANGED
|
@@ -37,6 +37,7 @@ import { YStack } from '@hanzo/gui';
|
|
|
37
37
|
import { useCallback, useState } from 'react';
|
|
38
38
|
import { ink } from '../backends/gui/ink.js';
|
|
39
39
|
import { slot } from '../backends/gui/slot.js';
|
|
40
|
+
import { useFileDrop } from '../product/useFileDrop.js';
|
|
40
41
|
import { Composer } from './Composer.js';
|
|
41
42
|
import { Message } from './Message.js';
|
|
42
43
|
import { Parts } from './Parts.js';
|
|
@@ -59,8 +60,12 @@ import { words } from './words.js';
|
|
|
59
60
|
* in exactly that direction: `Parts` reads `type` before it reads anything else.
|
|
60
61
|
*/
|
|
61
62
|
const draw = (said) => typeof said === 'string' || said == null ? (ink(words(said))) : (_jsx(Parts, { parts: said }));
|
|
62
|
-
export function Chat({ messages, streaming = false, send: onSend, stop: onStop, body, empty, composer, ...thread }) {
|
|
63
|
+
export function Chat({ messages, streaming = false, send: onSend, stop: onStop, body, empty, composer, onFiles, ...thread }) {
|
|
63
64
|
const [draft, setDraft] = useState('');
|
|
65
|
+
// The ONE window-level drop, off the shared primitive. Enabled only when a
|
|
66
|
+
// host passed `onFiles` — a surface that cannot route a file leaves the
|
|
67
|
+
// window alone rather than swallowing the drop.
|
|
68
|
+
const { active: dropping } = useFileDrop(onFiles ?? (() => { }), !!onFiles);
|
|
64
69
|
// Clearing here rather than in an effect on `messages` is what keeps a send
|
|
65
70
|
// from racing the answer: the draft is gone the moment it is sent, and a
|
|
66
71
|
// surface that rejects the turn does not get a cleared box back.
|
|
@@ -82,6 +87,16 @@ export function Chat({ messages, streaming = false, send: onSend, stop: onStop,
|
|
|
82
87
|
// from the composer lands on a `display: contents` wrapper or on the page,
|
|
83
88
|
// and then reports a component that is fine as broken, or one that is broken
|
|
84
89
|
// as fine.
|
|
85
|
-
return (_jsxs(YStack, { flex: 1, width: "100%", ...slot('chat'), children: [messages.length === 0 && empty ? (empty) : (_jsx(Thread, { flex: 1, ...thread, children: messages.map((turn, i) => (_jsx(Message, { role: turn.role, busy: streaming && i === last && turn.role === 'assistant', children: body ? body(turn) : draw(turn.content) }, turn.id))) })), _jsx(Composer, { value: draft, onChange: setDraft, onSend: send, busy: streaming, ...(onStop ? { onStop } : {}), ...composer })
|
|
90
|
+
return (_jsxs(YStack, { flex: 1, width: "100%", ...slot('chat'), children: [messages.length === 0 && empty ? (empty) : (_jsx(Thread, { flex: 1, ...thread, children: messages.map((turn, i) => (_jsx(Message, { role: turn.role, busy: streaming && i === last && turn.role === 'assistant', children: body ? body(turn) : draw(turn.content) }, turn.id))) })), _jsx(Composer, { value: draft, onChange: setDraft, onSend: send, busy: streaming, ...(onStop ? { onStop } : {}), ...composer }), dropping ? (_jsx("div", { "aria-hidden": true, style: {
|
|
91
|
+
position: 'fixed',
|
|
92
|
+
inset: 0,
|
|
93
|
+
zIndex: 50,
|
|
94
|
+
display: 'flex',
|
|
95
|
+
alignItems: 'center',
|
|
96
|
+
justifyContent: 'center',
|
|
97
|
+
pointerEvents: 'none',
|
|
98
|
+
background: 'rgba(52, 211, 153, 0.08)',
|
|
99
|
+
border: '2px dashed #34d399',
|
|
100
|
+
}, children: _jsx("span", { style: { fontSize: 15, fontWeight: 600, color: '#34d399' }, children: "Drop files to attach" }) })) : null] }));
|
|
86
101
|
}
|
|
87
102
|
//# sourceMappingURL=Chat.js.map
|
package/dist/chat/Chat.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chat.js","sourceRoot":"","sources":["../../src/chat/Chat.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AAE7D,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAsB,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,OAAO,EAAa,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,KAAK,EAAoB,MAAM,SAAS,CAAA;AACjD,OAAO,EAAE,MAAM,EAAoB,MAAM,UAAU,CAAA;AACnD,OAAO,EAAE,KAAK,EAAa,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"Chat.js","sourceRoot":"","sources":["../../src/chat/Chat.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AAE7D,OAAO,EAAE,GA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,CAAC,EAAE,CAAC,KAC1B,QAAQ,GACZ,EACD,QAAQ,CAAC,CAAC,CAAC,CACV,mCAEE,KAAK,EAAE;oBACL,QAAQ,EAAE,OAAO;oBACjB,KAAK,EAAE,CAAC;oBACR,MAAM,EAAE,EAAE;oBACV,OAAO,EAAE,MAAM;oBACf,UAAU,EAAE,QAAQ;oBACpB,cAAc,EAAE,QAAQ;oBACxB,aAAa,EAAE,MAAM;oBACrB,UAAU,EAAE,0BAA0B;oBACtC,MAAM,EAAE,oBAAoB;iBAC7B,YAED,eAAM,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,qCAEzD,GACH,CACP,CAAC,CAAC,CAAC,IAAI,IACD,CACV,CAAA;AACH,CAAC"}
|
package/dist/consent/Consent.cjs
CHANGED
|
@@ -43,6 +43,31 @@ const KINDS = [
|
|
|
43
43
|
{ key: 'marketing', title: 'Marketing', body: 'Lets ad platforms measure the sign-ups and orders their ads led to.' },
|
|
44
44
|
{ key: 'ads', title: 'Personalized ads', body: 'Lets those platforms use your visit to show you ads elsewhere.' },
|
|
45
45
|
];
|
|
46
|
+
/** Where the banner sits: fixed to the foot of the window, inset 12px, centred. */
|
|
47
|
+
const frame = {
|
|
48
|
+
...(0, slot_1.slot)('consent'),
|
|
49
|
+
role: 'dialog',
|
|
50
|
+
'aria-label': 'Cookie preferences',
|
|
51
|
+
position: 'fixed',
|
|
52
|
+
b: 12,
|
|
53
|
+
l: 12,
|
|
54
|
+
r: 12,
|
|
55
|
+
mx: 'auto',
|
|
56
|
+
z: 2147483000,
|
|
57
|
+
py: '$2.5',
|
|
58
|
+
px: '$3.5',
|
|
59
|
+
rounded: '$5',
|
|
60
|
+
borderWidth: 1,
|
|
61
|
+
borderColor: '$borderColor',
|
|
62
|
+
bg: '$background',
|
|
63
|
+
shadowColor: 'rgba(0,0,0,0.25)',
|
|
64
|
+
shadowRadius: 24,
|
|
65
|
+
shadowOffset: { width: 0, height: 8 },
|
|
66
|
+
};
|
|
67
|
+
/** The bar is as wide as its line and buttons, up to the window less its inset. */
|
|
68
|
+
const FIT = { width: 'fit-content' };
|
|
69
|
+
/** A link in the banner's line: the line's own ink, underlined, never broken across lines. */
|
|
70
|
+
const INLINE = { color: 'inherit', textDecoration: 'underline', whiteSpace: 'nowrap' };
|
|
46
71
|
const Consent = ({ privacy = 'https://hanzo.ai/privacy' }) => {
|
|
47
72
|
const [shown, setShown] = (0, react_1.useState)(false);
|
|
48
73
|
const [notice, setNotice] = (0, react_1.useState)(false);
|
|
@@ -82,14 +107,24 @@ const Consent = ({ privacy = 'https://hanzo.ai/privacy' }) => {
|
|
|
82
107
|
};
|
|
83
108
|
const link = (0, event_1.consentPolicy)()?.notice ?? 'Do not sell or share my personal information';
|
|
84
109
|
const small = notice && !shown;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
110
|
+
const optOut = done(() => (0, event_1.saveConsent)({ ...(0, event_1.readConsent)(), marketing: false, ads: false }));
|
|
111
|
+
if (choosing)
|
|
112
|
+
return ((0, jsx_runtime_1.jsxs)(gui_1.YStack, { ...frame, maxW: 440, gap: "$3", children: [(0, jsx_runtime_1.jsxs)(gui_1.Paragraph, { size: "$2", color: "$ink", m: 0, children: ['Choose what Hanzo may measure and share. You can change this at any time. ', (0, jsx_runtime_1.jsx)("a", { href: privacy, style: INLINE, children: "Privacy policy" })] }), locked ? ((0, jsx_runtime_1.jsx)(gui_1.Paragraph, { size: "$2", color: "$soft", m: 0, children: "Your browser sends Global Privacy Control, so marketing and personalized ads stay off." })) : null, KINDS.map((k) => {
|
|
113
|
+
const off = locked && k.key !== 'analytics';
|
|
114
|
+
return ((0, jsx_runtime_1.jsxs)(gui_1.XStack, { gap: "$3", items: "center", justify: "space-between", children: [(0, jsx_runtime_1.jsxs)(gui_1.YStack, { flex: 1, children: [(0, jsx_runtime_1.jsx)(gui_1.Paragraph, { size: "$2", color: "$ink", fontWeight: "500", m: 0, children: k.title }), (0, jsx_runtime_1.jsx)(gui_1.Paragraph, { size: "$1", color: "$soft", m: 0, children: k.body })] }), (0, jsx_runtime_1.jsx)(switch_1.Switch, { "aria-label": k.title, disabled: off, checked: off ? false : draft[k.key], onCheckedChange: (v) => setDraft({ ...draft, [k.key]: v === true }) })] }, k.key));
|
|
115
|
+
}), (0, jsx_runtime_1.jsxs)(gui_1.XStack, { gap: "$2", justify: "flex-end", children: [(0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", size: "sm", variant: "secondary", onClick: done(event_1.rejectAll), children: "Reject all" }), (0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", size: "sm", onClick: done(() => (0, event_1.saveConsent)(draft)), children: "Save choices" })] })] }));
|
|
116
|
+
// One bar: the line and its links, then the buttons. They share a row where
|
|
117
|
+
// the line fits beside them and the buttons drop under it where it does not,
|
|
118
|
+
// so a phone shows the line over one row of buttons and nothing breaks mid-control.
|
|
119
|
+
return ((0, jsx_runtime_1.jsxs)(gui_1.XStack, { ...frame, style: FIT, maxW: 960, flexWrap: "wrap", items: "center", columnGap: "$4", rowGap: "$2", children: [(0, jsx_runtime_1.jsx)(gui_1.YStack, { shrink: 1, minW: 0, children: (0, jsx_runtime_1.jsxs)(gui_1.Paragraph, { size: "$2", color: "$ink", m: 0, children: [small ? 'Cookies measure visits and ads. ' : 'Cookies measure visits and ads once you accept. ', (0, jsx_runtime_1.jsx)("a", { href: privacy, style: INLINE, children: "Privacy policy" }), small ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(gui_1.Span, { display: "none", $sm: { display: 'inline' }, children: ' · ' }), (0, jsx_runtime_1.jsx)(gui_1.Span, { render: "br", display: "block", $sm: { display: 'none' } }), (0, jsx_runtime_1.jsx)("a", { href: "#", role: "button", style: INLINE, onClick: (e) => {
|
|
120
|
+
e.preventDefault();
|
|
121
|
+
optOut();
|
|
122
|
+
}, onKeyDown: (e) => {
|
|
123
|
+
if (e.key !== ' ')
|
|
124
|
+
return;
|
|
125
|
+
e.preventDefault();
|
|
126
|
+
optOut();
|
|
127
|
+
}, children: link })] })) : null] }) }), (0, jsx_runtime_1.jsx)(gui_1.XStack, { gap: "$2", ml: "auto", items: "center", children: small ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", size: "sm", variant: "secondary", onClick: choose, children: "Manage" }), (0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", size: "sm", onClick: done(() => (0, event_1.saveConsent)((0, event_1.readConsent)())), children: "OK" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", size: "sm", variant: "link", onClick: choose, children: "Choose" }), (0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", size: "sm", variant: "secondary", onClick: done(event_1.rejectAll), children: "Reject all" }), (0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", size: "sm", onClick: done(event_1.acceptAll), children: "Accept all" })] })) })] }));
|
|
93
128
|
};
|
|
94
129
|
exports.Consent = Consent;
|
|
95
130
|
/** The footer link that reopens the choices, in every footer and every region. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Consent.d.ts","sourceRoot":"","sources":["../../src/consent/Consent.tsx"],"names":[],"mappings":"AAkCA,uCAAuC;AACvC,eAAO,MAAM,WAAW,QAAO,IAE9B,CAAA;
|
|
1
|
+
{"version":3,"file":"Consent.d.ts","sourceRoot":"","sources":["../../src/consent/Consent.tsx"],"names":[],"mappings":"AAkCA,uCAAuC;AACvC,eAAO,MAAM,WAAW,QAAO,IAE9B,CAAA;AAoCD,MAAM,MAAM,YAAY,GAAG;IACzB,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,QAAA,MAAM,OAAO,gBAA8C,YAAY,uCA0JtE,CAAA;AAED,kFAAkF;AAClF,QAAA,MAAM,WAAW,cAAmC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,gCAIrE,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
package/dist/consent/Consent.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
/**
|
|
4
4
|
* Consent — the one cookie banner every Hanzo, Lux and Zoo site mounts.
|
|
5
5
|
*
|
|
@@ -22,7 +22,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
22
22
|
* `Consent` mounts once near the root; `ConsentLink` goes wherever a footer
|
|
23
23
|
* link goes and opens the panel from anywhere.
|
|
24
24
|
*/
|
|
25
|
-
import { Paragraph, XStack, YStack } from '@hanzo/gui';
|
|
25
|
+
import { Paragraph, Span, XStack, YStack } from '@hanzo/gui';
|
|
26
26
|
import { acceptAll, asks, consentPolicy, gpc, notices, POLICY_EVENT, readConsent, rejectAll, saveConsent } from '@hanzo/event';
|
|
27
27
|
import { useEffect, useState } from 'react';
|
|
28
28
|
import { Button } from '../backends/gui/button.js';
|
|
@@ -39,6 +39,31 @@ const KINDS = [
|
|
|
39
39
|
{ key: 'marketing', title: 'Marketing', body: 'Lets ad platforms measure the sign-ups and orders their ads led to.' },
|
|
40
40
|
{ key: 'ads', title: 'Personalized ads', body: 'Lets those platforms use your visit to show you ads elsewhere.' },
|
|
41
41
|
];
|
|
42
|
+
/** Where the banner sits: fixed to the foot of the window, inset 12px, centred. */
|
|
43
|
+
const frame = {
|
|
44
|
+
...slot('consent'),
|
|
45
|
+
role: 'dialog',
|
|
46
|
+
'aria-label': 'Cookie preferences',
|
|
47
|
+
position: 'fixed',
|
|
48
|
+
b: 12,
|
|
49
|
+
l: 12,
|
|
50
|
+
r: 12,
|
|
51
|
+
mx: 'auto',
|
|
52
|
+
z: 2147483000,
|
|
53
|
+
py: '$2.5',
|
|
54
|
+
px: '$3.5',
|
|
55
|
+
rounded: '$5',
|
|
56
|
+
borderWidth: 1,
|
|
57
|
+
borderColor: '$borderColor',
|
|
58
|
+
bg: '$background',
|
|
59
|
+
shadowColor: 'rgba(0,0,0,0.25)',
|
|
60
|
+
shadowRadius: 24,
|
|
61
|
+
shadowOffset: { width: 0, height: 8 },
|
|
62
|
+
};
|
|
63
|
+
/** The bar is as wide as its line and buttons, up to the window less its inset. */
|
|
64
|
+
const FIT = { width: 'fit-content' };
|
|
65
|
+
/** A link in the banner's line: the line's own ink, underlined, never broken across lines. */
|
|
66
|
+
const INLINE = { color: 'inherit', textDecoration: 'underline', whiteSpace: 'nowrap' };
|
|
42
67
|
const Consent = ({ privacy = 'https://hanzo.ai/privacy' }) => {
|
|
43
68
|
const [shown, setShown] = useState(false);
|
|
44
69
|
const [notice, setNotice] = useState(false);
|
|
@@ -78,14 +103,24 @@ const Consent = ({ privacy = 'https://hanzo.ai/privacy' }) => {
|
|
|
78
103
|
};
|
|
79
104
|
const link = consentPolicy()?.notice ?? 'Do not sell or share my personal information';
|
|
80
105
|
const small = notice && !shown;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
106
|
+
const optOut = done(() => saveConsent({ ...readConsent(), marketing: false, ads: false }));
|
|
107
|
+
if (choosing)
|
|
108
|
+
return (_jsxs(YStack, { ...frame, maxW: 440, gap: "$3", children: [_jsxs(Paragraph, { size: "$2", color: "$ink", m: 0, children: ['Choose what Hanzo may measure and share. You can change this at any time. ', _jsx("a", { href: privacy, style: INLINE, children: "Privacy policy" })] }), locked ? (_jsx(Paragraph, { size: "$2", color: "$soft", m: 0, children: "Your browser sends Global Privacy Control, so marketing and personalized ads stay off." })) : null, KINDS.map((k) => {
|
|
109
|
+
const off = locked && k.key !== 'analytics';
|
|
110
|
+
return (_jsxs(XStack, { gap: "$3", items: "center", justify: "space-between", children: [_jsxs(YStack, { flex: 1, children: [_jsx(Paragraph, { size: "$2", color: "$ink", fontWeight: "500", m: 0, children: k.title }), _jsx(Paragraph, { size: "$1", color: "$soft", m: 0, children: k.body })] }), _jsx(Switch, { "aria-label": k.title, disabled: off, checked: off ? false : draft[k.key], onCheckedChange: (v) => setDraft({ ...draft, [k.key]: v === true }) })] }, k.key));
|
|
111
|
+
}), _jsxs(XStack, { gap: "$2", justify: "flex-end", children: [_jsx(Button, { type: "button", size: "sm", variant: "secondary", onClick: done(rejectAll), children: "Reject all" }), _jsx(Button, { type: "button", size: "sm", onClick: done(() => saveConsent(draft)), children: "Save choices" })] })] }));
|
|
112
|
+
// One bar: the line and its links, then the buttons. They share a row where
|
|
113
|
+
// the line fits beside them and the buttons drop under it where it does not,
|
|
114
|
+
// so a phone shows the line over one row of buttons and nothing breaks mid-control.
|
|
115
|
+
return (_jsxs(XStack, { ...frame, style: FIT, maxW: 960, flexWrap: "wrap", items: "center", columnGap: "$4", rowGap: "$2", children: [_jsx(YStack, { shrink: 1, minW: 0, children: _jsxs(Paragraph, { size: "$2", color: "$ink", m: 0, children: [small ? 'Cookies measure visits and ads. ' : 'Cookies measure visits and ads once you accept. ', _jsx("a", { href: privacy, style: INLINE, children: "Privacy policy" }), small ? (_jsxs(_Fragment, { children: [_jsx(Span, { display: "none", $sm: { display: 'inline' }, children: ' · ' }), _jsx(Span, { render: "br", display: "block", $sm: { display: 'none' } }), _jsx("a", { href: "#", role: "button", style: INLINE, onClick: (e) => {
|
|
116
|
+
e.preventDefault();
|
|
117
|
+
optOut();
|
|
118
|
+
}, onKeyDown: (e) => {
|
|
119
|
+
if (e.key !== ' ')
|
|
120
|
+
return;
|
|
121
|
+
e.preventDefault();
|
|
122
|
+
optOut();
|
|
123
|
+
}, children: link })] })) : null] }) }), _jsx(XStack, { gap: "$2", ml: "auto", items: "center", children: small ? (_jsxs(_Fragment, { children: [_jsx(Button, { type: "button", size: "sm", variant: "secondary", onClick: choose, children: "Manage" }), _jsx(Button, { type: "button", size: "sm", onClick: done(() => saveConsent(readConsent())), children: "OK" })] })) : (_jsxs(_Fragment, { children: [_jsx(Button, { type: "button", size: "sm", variant: "link", onClick: choose, children: "Choose" }), _jsx(Button, { type: "button", size: "sm", variant: "secondary", onClick: done(rejectAll), children: "Reject all" }), _jsx(Button, { type: "button", size: "sm", onClick: done(acceptAll), children: "Accept all" })] })) })] }));
|
|
89
124
|
};
|
|
90
125
|
/** The footer link that reopens the choices, in every footer and every region. */
|
|
91
126
|
const ConsentLink = ({ label = 'Cookie settings' }) => (_jsx(Button, { ...slot('consent-link'), type: "button", variant: "link", size: "sm", px: 0, minH: 0, onClick: openConsent, children: label }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Consent.js","sourceRoot":"","sources":["../../src/consent/Consent.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"Consent.js","sourceRoot":"","sources":["../../src/consent/Consent.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAC5D,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAe,MAAM,cAAc,CAAA;AAC3I,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3C,OAAO,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