@hanzo/ui 8.29.22 → 8.29.23
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/Composer.cjs +181 -99
- package/dist/chat/Composer.d.ts +110 -81
- package/dist/chat/Composer.d.ts.map +1 -1
- package/dist/chat/Composer.js +183 -101
- package/dist/chat/Composer.js.map +1 -1
- package/dist/chat/Dial.cjs +96 -0
- package/dist/chat/Dial.d.ts +7 -0
- package/dist/chat/Dial.d.ts.map +1 -0
- package/dist/chat/Dial.js +94 -0
- package/dist/chat/Dial.js.map +1 -0
- package/dist/chat/Dictation.cjs +142 -0
- package/dist/chat/Dictation.d.ts +13 -0
- package/dist/chat/Dictation.d.ts.map +1 -0
- package/dist/chat/Dictation.js +140 -0
- package/dist/chat/Dictation.js.map +1 -0
- package/dist/chat/Families.cjs +41 -0
- package/dist/chat/Families.d.ts +3 -0
- package/dist/chat/Families.d.ts.map +1 -0
- package/dist/chat/Families.js +39 -0
- package/dist/chat/Families.js.map +1 -0
- package/dist/chat/Mention.cjs +25 -0
- package/dist/chat/Mention.d.ts +16 -0
- package/dist/chat/Mention.d.ts.map +1 -0
- package/dist/chat/Mention.js +22 -0
- package/dist/chat/Mention.js.map +1 -0
- package/dist/chat/Palette.cjs +22 -0
- package/dist/chat/Palette.d.ts +21 -0
- package/dist/chat/Palette.d.ts.map +1 -0
- package/dist/chat/Palette.js +20 -0
- package/dist/chat/Palette.js.map +1 -0
- package/dist/chat/Plus.cjs +76 -0
- package/dist/chat/Plus.d.ts +49 -0
- package/dist/chat/Plus.d.ts.map +1 -0
- package/dist/chat/Plus.js +74 -0
- package/dist/chat/Plus.js.map +1 -0
- package/dist/chat/Tune.cjs +55 -0
- package/dist/chat/Tune.d.ts +49 -0
- package/dist/chat/Tune.d.ts.map +1 -0
- package/dist/chat/Tune.js +51 -0
- package/dist/chat/Tune.js.map +1 -0
- package/dist/chat/index.cjs +25 -4
- package/dist/chat/index.d.ts +11 -3
- package/dist/chat/index.d.ts.map +1 -1
- package/dist/chat/index.js +10 -2
- package/dist/chat/index.js.map +1 -1
- package/dist/chat/languages.cjs +17 -0
- package/dist/chat/languages.d.ts +11 -0
- package/dist/chat/languages.d.ts.map +1 -0
- package/dist/chat/languages.js +15 -0
- package/dist/chat/languages.js.map +1 -0
- package/dist/chat/pure.cjs +7 -1
- package/dist/chat/pure.d.ts +3 -1
- package/dist/chat/pure.d.ts.map +1 -1
- package/dist/chat/pure.js +4 -0
- package/dist/chat/pure.js.map +1 -1
- package/dist/chat/ring.cjs +9 -0
- package/dist/chat/ring.d.ts +11 -0
- package/dist/chat/ring.d.ts.map +1 -0
- package/dist/chat/ring.js +7 -0
- package/dist/chat/ring.js.map +1 -0
- package/dist/chat/send.cjs +3 -2
- package/dist/chat/send.d.ts +4 -1
- package/dist/chat/send.d.ts.map +1 -1
- package/dist/chat/send.js +3 -2
- package/dist/chat/send.js.map +1 -1
- package/dist/chat/ways.cjs +19 -0
- package/dist/chat/ways.d.ts +11 -0
- package/dist/chat/ways.d.ts.map +1 -0
- package/dist/chat/ways.js +17 -0
- package/dist/chat/ways.js.map +1 -0
- package/dist/gallery.cjs +4 -1
- package/dist/gallery.d.ts.map +1 -1
- package/dist/gallery.html +41 -15
- package/dist/gallery.js +5 -2
- package/dist/gallery.js.map +1 -1
- package/dist/models/ModelPicker.cjs +3 -3
- package/dist/models/ModelPicker.d.ts +6 -1
- package/dist/models/ModelPicker.d.ts.map +1 -1
- package/dist/models/ModelPicker.js +3 -3
- package/dist/models/ModelPicker.js.map +1 -1
- package/dist/models/ModelPickerMenu.cjs +19 -13
- package/dist/models/ModelPickerMenu.d.ts +4 -0
- package/dist/models/ModelPickerMenu.d.ts.map +1 -1
- package/dist/models/ModelPickerMenu.js +19 -13
- package/dist/models/ModelPickerMenu.js.map +1 -1
- package/dist/models/catalog.cjs +7 -0
- package/dist/models/catalog.d.ts +2 -0
- package/dist/models/catalog.d.ts.map +1 -1
- package/dist/models/catalog.js +6 -0
- package/dist/models/catalog.js.map +1 -1
- package/dist/models/index.cjs +2 -1
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +1 -1
- package/dist/models/index.js.map +1 -1
- package/dist/product/BranchSelect.cjs +1 -1
- package/dist/product/BranchSelect.js +1 -1
- package/dist/product/BranchSelect.js.map +1 -1
- package/dist/product/ChipSelect.cjs +60 -11
- package/dist/product/ChipSelect.d.ts +13 -2
- package/dist/product/ChipSelect.d.ts.map +1 -1
- package/dist/product/ChipSelect.js +61 -12
- package/dist/product/ChipSelect.js.map +1 -1
- package/dist/product/RepoSelect.cjs +11 -5
- package/dist/product/RepoSelect.d.ts +6 -2
- package/dist/product/RepoSelect.d.ts.map +1 -1
- package/dist/product/RepoSelect.js +13 -7
- package/dist/product/RepoSelect.js.map +1 -1
- package/dist/product/chipSelect.logic.d.ts +4 -1
- package/dist/product/chipSelect.logic.d.ts.map +1 -1
- package/dist/product/chipSelect.logic.js.map +1 -1
- package/dist/product/index.cjs +3 -3
- package/dist/product/index.d.ts +1 -1
- package/dist/product/index.d.ts.map +1 -1
- package/dist/product/index.js +3 -3
- package/dist/product/index.js.map +1 -1
- package/dist/styles.css +37 -11
- package/package.json +8 -2
package/dist/chat/Composer.js
CHANGED
|
@@ -1,127 +1,209 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
/**
|
|
4
|
-
* Composer — the one
|
|
4
|
+
* Composer — the one composer every Hanzo surface draws: Chat, Dev, Studio, a
|
|
5
|
+
* room, a reply, a run being steered. A surface hands it slots and defaults and
|
|
6
|
+
* nothing else; the field, the keys, the controls and their look are here once.
|
|
5
7
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* ┌ pills ───────────────────────────────┐ where a run goes, which repository
|
|
9
|
+
* │ the field │
|
|
10
|
+
* │ + carried… children ✦ 🎙 ⬆ │ + menu, what the draft carries,
|
|
11
|
+
* └──────────────────────────────────────┘ commands, dictation, send / stop
|
|
12
|
+
* chips… model effort mode
|
|
10
13
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* surface got subtly different.
|
|
14
|
+
* Above the frame: the surface's `head`, the `/` or `@` list, and the `note`.
|
|
15
|
+
* Under it, one row: the surface's chips, then the model, the effort and the mode.
|
|
14
16
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
+
* THE PERSON'S SETTING (@hanzo/appearance `useComposing`, Settings →
|
|
18
|
+
* Appearance) decides which key sends and whether the chips, the model
|
|
19
|
+
* selector and the mode are drawn, everywhere at once. An axis they left on
|
|
20
|
+
* Auto takes the surface's `defaults`, and the model selector is off until
|
|
21
|
+
* they turn it on.
|
|
17
22
|
*
|
|
18
|
-
*
|
|
19
|
-
* the
|
|
23
|
+
* Its paint is @hanzo/design's: `$` tokens and `--primary`, sized through
|
|
24
|
+
* `--density` (the round controls are @hanzo/composer's `Control`), so text
|
|
25
|
+
* size, density and accent change it with the rest of the product.
|
|
26
|
+
*
|
|
27
|
+
* Its own words are the reader's language (@hanzo/i18n `t`). A host's words —
|
|
28
|
+
* its placeholder, a shelf's rows, a chip's label — are drawn as given.
|
|
20
29
|
*/
|
|
21
|
-
import { SizableText, XStack, YStack } from '@hanzo/gui';
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
30
|
+
import { SizableText, useMedia, XStack, YStack } from '@hanzo/gui';
|
|
31
|
+
import { useComposing } from '@hanzo/appearance';
|
|
32
|
+
import { Control } from '@hanzo/composer';
|
|
33
|
+
import { phrase } from '@hanzo/i18n';
|
|
34
|
+
import { useI18n } from '@hanzo/i18n/react';
|
|
35
|
+
import { ArrowUp, AudioLines, Square, X } from '@hanzogui/lucide-icons-2';
|
|
36
|
+
import { Voice } from '@hanzo/voice';
|
|
37
|
+
import { useEffect, useRef, useState } from 'react';
|
|
38
|
+
import { Textarea } from '../backends/gui/index.js';
|
|
39
|
+
import { slot } from '../backends/gui/slot.js';
|
|
40
|
+
import { Dial } from './Dial.js';
|
|
41
|
+
import { Dictation } from './Dictation.js';
|
|
42
|
+
import { Mention, trigger } from './Mention.js';
|
|
43
|
+
import { Palette } from './Palette.js';
|
|
44
|
+
import { Plus } from './Plus.js';
|
|
25
45
|
import { ready, sends } from './send.js';
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/** How tall the field may grow before it scrolls, px. Uncapped, a long paste
|
|
29
|
-
* pushes the thread off screen; narrower frames pass their own. */
|
|
30
|
-
const CEILING = 200;
|
|
31
|
-
/** Floor for the field, px. `Textarea` defaults to 64, which is three lines of
|
|
32
|
-
* chrome before anything is typed. 44 is the touch-target floor. */
|
|
33
|
-
const FLOOR = 44;
|
|
46
|
+
import { RING } from './ring.js';
|
|
47
|
+
import { Chips, Tune } from './Tune.js';
|
|
34
48
|
/**
|
|
35
|
-
* The
|
|
36
|
-
*
|
|
37
|
-
* is why the send control can be a 28px mark inside a row a thumb already hits.
|
|
49
|
+
* The resting placeholder. It addresses the person rather than the mechanism,
|
|
50
|
+
* and as one constant it never re-announces when the model changes.
|
|
38
51
|
*/
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
/** The
|
|
43
|
-
const
|
|
52
|
+
export const ASK = phrase('Ask anything');
|
|
53
|
+
/** The reading measure: @hanzo/design's prose width, which Width (appearance) retunes. */
|
|
54
|
+
export const MEASURE = 'var(--container-prose, 48rem)';
|
|
55
|
+
/** The space between turns, px: one rhythm for every thread. */
|
|
56
|
+
export const GAP = 20;
|
|
57
|
+
/** The composer's width under a thread: the measure less its 0.75rem gutters, centred, so its edges are the text's. */
|
|
58
|
+
export const measure = { width: 'calc(100% - 1.5rem)', maxW: `calc(${MEASURE} - 1.5rem)`, mx: 'auto' };
|
|
59
|
+
/** The round controls' box, px, and a phone's, a finger's width: `+`, the effort, the mic, its chevron and send all take it, so they share one centreline. */
|
|
60
|
+
export const ROUND = 36;
|
|
61
|
+
const TAP = 44;
|
|
62
|
+
/** The frame's corner, px: 12 on a laptop, 22 on a phone. */
|
|
63
|
+
const CORNER = 12;
|
|
64
|
+
const CORNER_PHONE = 22;
|
|
65
|
+
/** How tall the field grows before it scrolls, px. */
|
|
66
|
+
const CEILING = 200;
|
|
67
|
+
/** The ink on a filled round: the accent's own foreground. */
|
|
68
|
+
const ON = 'var(--primary-foreground)';
|
|
69
|
+
/** A round control with no ground of its own until it is pointed at. */
|
|
70
|
+
const QUIET = { bg: 'transparent', color: 'var(--foreground)', hoverStyle: { bg: '$hover' } };
|
|
71
|
+
/** Ctrl+U (⌘U) uploads, while a composer with an upload is on the page. */
|
|
72
|
+
export function useUpload(upload) {
|
|
73
|
+
const now = useRef(upload);
|
|
74
|
+
now.current = upload;
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
if (!upload)
|
|
77
|
+
return;
|
|
78
|
+
const key = (e) => {
|
|
79
|
+
if ((e.ctrlKey || e.metaKey) && !e.altKey && !e.shiftKey && e.key.toLowerCase() === 'u') {
|
|
80
|
+
e.preventDefault();
|
|
81
|
+
now.current?.();
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
window.addEventListener('keydown', key);
|
|
85
|
+
return () => window.removeEventListener('keydown', key);
|
|
86
|
+
}, [Boolean(upload)]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
87
|
+
}
|
|
88
|
+
/** The modifier state off a keydown, web or native. */
|
|
89
|
+
const modsOf = (e) => ({
|
|
90
|
+
shiftKey: e.shiftKey ?? e.nativeEvent?.shiftKey,
|
|
91
|
+
altKey: e.altKey ?? e.nativeEvent?.altKey,
|
|
92
|
+
metaKey: e.metaKey ?? e.nativeEvent?.metaKey,
|
|
93
|
+
ctrlKey: e.ctrlKey ?? e.nativeEvent?.ctrlKey,
|
|
94
|
+
isComposing: e.isComposing ?? e.nativeEvent?.isComposing,
|
|
95
|
+
// Safari's only honest IME signal on this keydown.
|
|
96
|
+
keyCode: e.keyCode ?? e.nativeEvent?.keyCode,
|
|
97
|
+
});
|
|
44
98
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* the
|
|
49
|
-
* it never has to be recomputed or re-announced when the model or endpoint
|
|
50
|
-
* changes — which is what a model-named placeholder forces a surface to do.
|
|
99
|
+
* How far the software keyboard covers the page, px: the layout viewport less the
|
|
100
|
+
* visual one. A phone keyboard that does not shrink the layout leaves a fixed
|
|
101
|
+
* composer under it; this is how far to lift it. Zero where the layout follows the
|
|
102
|
+
* keyboard (the browser resized it) and wherever there is no keyboard.
|
|
51
103
|
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
isComposing: e.isComposing ?? e.nativeEvent?.isComposing,
|
|
63
|
-
// Safari's only honest IME signal on this keydown. Dropping it here would
|
|
64
|
-
// put the mid-candidate submit straight back, whatever `sends` checks.
|
|
65
|
-
keyCode: e.keyCode ?? e.nativeEvent?.keyCode,
|
|
104
|
+
function useLift() {
|
|
105
|
+
const [lift, setLift] = useState(0);
|
|
106
|
+
useEffect(() => {
|
|
107
|
+
const vv = typeof window === 'undefined' ? null : window.visualViewport;
|
|
108
|
+
if (!vv)
|
|
109
|
+
return;
|
|
110
|
+
const read = () => {
|
|
111
|
+
const covered = Math.round(window.innerHeight - vv.height - vv.offsetTop);
|
|
112
|
+
// A bar of the browser's own coming and going is not a keyboard.
|
|
113
|
+
setLift(covered > 100 ? covered : 0);
|
|
66
114
|
};
|
|
67
|
-
|
|
115
|
+
read();
|
|
116
|
+
vv.addEventListener('resize', read);
|
|
117
|
+
vv.addEventListener('scroll', read);
|
|
118
|
+
return () => {
|
|
119
|
+
vv.removeEventListener('resize', read);
|
|
120
|
+
vv.removeEventListener('scroll', read);
|
|
121
|
+
};
|
|
122
|
+
}, []);
|
|
123
|
+
return lift;
|
|
124
|
+
}
|
|
125
|
+
export function Composer({ value, onChange, onSend, onStop, busy = false, disabled = false, ready: readyProp, placeholder, label, rows = 1, maxHeight = CEILING, field, hint, children, head, pills, carried, plus, slash, at, commands, chips, mind, effort, limits, onUpgrade, mode, voice, language = null, onLanguage, talk, starters, note, column = false, framed = false, narrow: narrowProp, defaults, ...props }) {
|
|
126
|
+
const { t } = useI18n();
|
|
127
|
+
const media = useMedia();
|
|
128
|
+
const narrow = narrowProp ?? !media.sm;
|
|
129
|
+
const hit = narrow ? TAP : ROUND;
|
|
130
|
+
const lift = useLift();
|
|
131
|
+
const chosen = useComposing();
|
|
132
|
+
const rule = chosen.send ?? defaults?.send ?? 'enter';
|
|
133
|
+
const showChips = chosen.chips ?? defaults?.chips ?? true;
|
|
134
|
+
const showModel = chosen.model ?? defaults?.model ?? false;
|
|
135
|
+
const showMode = chosen.mode ?? defaults?.mode ?? true;
|
|
136
|
+
const lit = readyProp ?? ready(value);
|
|
137
|
+
const live = busy ? Boolean(onStop) : lit && !disabled;
|
|
138
|
+
useUpload(plus?.upload);
|
|
139
|
+
// `/` and `@`: the shelf the caret's word opens, filtered by what follows it.
|
|
140
|
+
const [index, setIndex] = useState(0);
|
|
141
|
+
const [closed, setClosed] = useState(null);
|
|
142
|
+
const typed = trigger(value);
|
|
143
|
+
const shelf = typed ? (typed.char === '/' ? slash : at) : undefined;
|
|
144
|
+
const listed = shelf && typed && closed !== value ? shelf.rows.filter((r) => r.label.toLowerCase().includes(typed.query)).slice(0, 8) : null;
|
|
145
|
+
const row = Math.min(index, Math.max(0, (listed?.length ?? 1) - 1));
|
|
146
|
+
useEffect(() => setIndex(0), [typed?.char, typed?.query]);
|
|
147
|
+
const pick = (id) => {
|
|
148
|
+
if (!typed || !shelf)
|
|
68
149
|
return;
|
|
69
|
-
|
|
70
|
-
|
|
150
|
+
onChange(value.slice(0, typed.at).trimEnd() + (typed.at > 0 ? ' ' : ''));
|
|
151
|
+
shelf.pick(id);
|
|
152
|
+
};
|
|
153
|
+
const [palette, setPalette] = useState(false);
|
|
154
|
+
const submit = () => {
|
|
155
|
+
if (listed?.length)
|
|
156
|
+
return pick(listed[row].id);
|
|
157
|
+
if (live && !busy)
|
|
71
158
|
onSend();
|
|
72
159
|
};
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
160
|
+
const keyed = (e) => {
|
|
161
|
+
const key = e?.key ?? e?.nativeEvent?.key ?? '';
|
|
162
|
+
const mods = modsOf(e ?? {});
|
|
163
|
+
if (listed) {
|
|
164
|
+
if (key === 'ArrowDown') {
|
|
165
|
+
e.preventDefault?.();
|
|
166
|
+
return setIndex((i) => Math.min(i + 1, listed.length - 1));
|
|
167
|
+
}
|
|
168
|
+
if (key === 'ArrowUp') {
|
|
169
|
+
e.preventDefault?.();
|
|
170
|
+
return setIndex((i) => Math.max(0, i - 1));
|
|
82
171
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
172
|
+
if (key === 'Escape') {
|
|
173
|
+
e.preventDefault?.();
|
|
174
|
+
return setClosed(value);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (commands?.length && (mods.metaKey || mods.ctrlKey) && key.toLowerCase() === 'k') {
|
|
178
|
+
e.preventDefault?.();
|
|
179
|
+
return setPalette(true);
|
|
180
|
+
}
|
|
181
|
+
if (!sends(key, mods, rule))
|
|
182
|
+
return;
|
|
183
|
+
e.preventDefault?.();
|
|
184
|
+
submit();
|
|
185
|
+
};
|
|
186
|
+
const input = (_jsx(Textarea, { ...slot('composer-field'), rows: rows, placeholder: placeholder ?? t(ASK), disabled: disabled, borderWidth: 0, fontSize: 16, lineHeight: 24, px: 8, pt: 2, pb: 0, minH: 26, maxH: maxHeight, bg: "transparent", "aria-label": label ?? placeholder ?? t(ASK), ...field,
|
|
187
|
+
// After `field`: a caller's `onKeyDown` runs first and can claim the key,
|
|
188
|
+
// but cannot replace the send rule and the IME guard.
|
|
86
189
|
value: value, onChangeText: onChange, onKeyDown: (e) => {
|
|
87
190
|
field?.onKeyDown?.(e);
|
|
88
191
|
if (!e?.defaultPrevented)
|
|
89
192
|
keyed(e);
|
|
90
193
|
} }));
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
if (e?.key !== 'Enter' && e?.key !== ' ')
|
|
94
|
-
return;
|
|
95
|
-
e.preventDefault?.();
|
|
96
|
-
if (busy)
|
|
97
|
-
onStop?.();
|
|
98
|
-
else if (sendable)
|
|
99
|
-
onSend();
|
|
100
|
-
}, children: busy ? _jsx(Square, { size: 12, color: "$soft" }) : _jsx(CornerDownLeft, { size: 14, color: "$soft" }) }))] })) : (_jsxs(YStack, { ...slot('composer'), width: "100%", rounded: "$5", borderWidth: 1, borderColor: "$borderColor", bg: "$background", p: PAD, gap: PAD, ...props, children: [input, _jsxs(XStack, { items: "center", gap: PAD, children: [children, _jsx(XStack, { flex: 1 }), said, send ?? (_jsx(Button, { ...slot('composer-send'), size: "sm", disabled: busy ? !onStop : !sendable, onPress: busy ? onStop : onSend, "aria-label": busy ? 'Stop' : 'Send',
|
|
101
|
-
// A circle, and the room's one primary control. The height is the
|
|
102
|
-
// size's; `aspectRatio` takes the width from it, so no second number
|
|
103
|
-
// is written down. `--primary` is the accent a reader picks, and at
|
|
104
|
-
// rest it is the ink pair Send already paints in both themes.
|
|
105
|
-
px: 0, aspectRatio: 1, rounded: 'var(--radius-full, 9999px)', bg: "var(--primary)", borderWidth: 0, hoverStyle: { bg: 'var(--primary)', opacity: 0.9 }, pressStyle: { bg: 'var(--primary)', opacity: 0.85 }, children: busy ? (_jsx(Square, { size: 14, color: 'var(--primary-foreground)' })) : (_jsx(ArrowUp, { size: 16, color: 'var(--primary-foreground)' })) }))] })] }));
|
|
106
|
-
// With nothing above or below it the composer IS the frame, exactly as it
|
|
107
|
-
// was before either existed — no wrapper, so every caller's tree is unchanged.
|
|
108
|
-
if (!head && !foot)
|
|
109
|
-
return frame;
|
|
110
|
-
return (_jsxs(YStack, { ...slot('composer-shell'), width: "100%", gap: "$2.5", children: [head ? (_jsx(XStack, { ...slot('composer-head'), items: "center", gap: "$1.5", flexWrap: "wrap", children: head })) : null, frame, foot ? (_jsx(XStack, { ...slot('composer-foot'), items: "center", gap: "$2", px: "$1.5", mt: -4, children: foot })) : null] }));
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* ComposerTool — one quiet control in a composer's `foot` or `head`: attach,
|
|
114
|
-
* voice, a mode, the model. 24px tall, muted until pointed at, and a real
|
|
115
|
-
* button to the keyboard. Its name is `label` whether or not it shows words,
|
|
116
|
-
* because an icon-only control is the whole navigation for someone who cannot
|
|
117
|
-
* see the icon.
|
|
118
|
-
*/
|
|
119
|
-
export function ComposerTool({ label, icon, text, caret = false, onPress, disabled = false, ...rest }) {
|
|
120
|
-
return (_jsxs(XStack, { ...slot('composer-tool'), ...tip(label), role: "button", tabIndex: disabled ? -1 : 0, "aria-label": label, "aria-disabled": disabled || undefined, "aria-haspopup": caret ? 'menu' : undefined, height: 24, px: text ? '$1.5' : '$1', gap: "$1", items: "center", rounded: "$2", shrink: 0, cursor: disabled ? 'default' : 'pointer', opacity: disabled ? 0.5 : 1, hoverStyle: disabled ? undefined : { bg: '$hover' }, focusVisibleStyle: { outlineColor: '$outlineColor', outlineWidth: 2, outlineStyle: 'solid' }, hitSlop: { top: 10, bottom: 10, left: 2, right: 2 }, onPress: disabled ? undefined : onPress, onKeyDown: (e) => {
|
|
121
|
-
if (disabled || (e?.key !== 'Enter' && e?.key !== ' '))
|
|
194
|
+
const round = (_jsx(Control, { type: "button", size: hit, fill: true, rounded: 999, ...slot('composer-send'), "aria-label": t(busy ? 'Stop' : 'Send'), "aria-disabled": !live || undefined, opacity: live ? 1 : 0.4, focusVisibleStyle: RING, onClick: () => {
|
|
195
|
+
if (!live)
|
|
122
196
|
return;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
197
|
+
if (busy)
|
|
198
|
+
onStop?.();
|
|
199
|
+
else
|
|
200
|
+
onSend();
|
|
201
|
+
}, children: busy ? _jsx(Square, { size: 13, color: ON, fill: ON }) : _jsx(ArrowUp, { size: 16, strokeWidth: 2.5, color: ON }) }));
|
|
202
|
+
const mention = listed && shelf && typed ? _jsx(Mention, { shelf: shelf, rows: listed, index: row, onPick: pick, skills: typed.char === '/' }) : null;
|
|
203
|
+
const above = starters || head || note || mention ? (_jsxs(YStack, { ...slot('composer-head'), gap: "$1.5", children: [starters, head, mention, note ? (_jsx(SizableText, { ...slot('composer-note'), fontSize: 12, color: "$soft", text: "center", self: "center", children: note })) : null] })) : null;
|
|
204
|
+
const shown = showChips && chips?.length ? chips : null;
|
|
205
|
+
const tuned = (showModel && mind) || (showMode && mode);
|
|
206
|
+
const under = shown || tuned ? (_jsxs(XStack, { ...slot('composer-foot'), items: "center", gap: 6, flexWrap: "wrap", rowGap: 4, width: "100%", children: [shown ? _jsx(Chips, { chips: shown }) : null, tuned ? _jsx(Tune, { mind: showModel ? mind : null, mode: showMode ? mode : null, onUpgrade: onUpgrade, limits: limits }) : null] })) : null;
|
|
207
|
+
return (_jsxs(YStack, { ...slot('composer-shell'), ...(column ? measure : { width: '100%' }), gap: 6, ...(lift ? { mb: lift } : null), ...props, children: [above, _jsxs(YStack, { ...slot('composer'), width: "100%", rounded: CORNER, borderWidth: 1, borderColor: "$borderColor", bg: "$edge", p: 8, pt: pills ? 8 : 12, gap: 6, "$max-sm": { rounded: CORNER_PHONE }, ...(framed ? { boxShadow: 'var(--shadow-sheet-1)' } : null), children: [pills ? (_jsx(XStack, { ...slot('composer-pills'), items: "center", gap: 4, flexWrap: "wrap", rowGap: 4, px: 2, children: pills })) : null, input, _jsxs(XStack, { items: "center", gap: 4, children: [_jsxs(XStack, { ...slot('composer-start'), items: "center", gap: 4, flex: 1, minW: 0, flexWrap: "wrap", children: [plus ? _jsx(Plus, { ...plus, size: hit, disabled: disabled || plus.disabled }) : null, (carried ?? []).map((c) => (_jsxs(XStack, { ...slot('composer-carried'), items: "center", gap: 6, paddingInlineStart: 8, paddingInlineEnd: 4, height: 28, rounded: 8, bg: "$hover", maxW: 180, children: [c.icon ? _jsx(XStack, { "aria-hidden": true, children: c.icon }) : null, _jsx(SizableText, { fontSize: 13, color: "$ink", numberOfLines: 1, shrink: 1, children: c.label }), _jsx(XStack, { render: "button", "aria-label": t('Remove {name}', { name: c.label }), onPress: c.onRemove, width: 20, height: 20, rounded: 6, items: "center", justify: "center", hoverStyle: { bg: '$raised' }, cursor: "pointer", children: _jsx(X, { size: 12, color: "$hint" }) })] }, c.id))), children] }), _jsxs(XStack, { ...slot('composer-end'), items: "center", gap: 4, shrink: 0, children: [hint ? (_jsx(SizableText, { size: "$1", color: "$soft", numberOfLines: 1, children: hint })) : null, effort ? _jsx(Dial, { effort: effort, size: hit, disabled: disabled }) : null, commands?.length ? _jsx(Palette, { commands: commands, open: palette, onOpenChange: setPalette, size: hit, disabled: disabled }) : null, voice ? _jsx(Dictation, { voice: voice, disabled: disabled, size: hit, language: language, ...(onLanguage ? { onLanguage } : {}) }) : null, !busy && !lit && talk ? (_jsx(Control, { asChild: true, size: hit, fill: narrow, rounded: 999, ...(narrow ? null : QUIET), focusVisibleStyle: RING, children: _jsx(Voice, { voice: talk, disabled: disabled, "data-slot": "composer-talk", says: { idle: t('Voice mode'), listening: t('In conversation — click to hang up'), speaking: t('Hanzo is speaking — talk to interrupt') }, children: () => _jsx(AudioLines, { size: 16, color: narrow ? ON : 'var(--foreground)' }) }) })) : (round)] })] })] }), under] }));
|
|
126
208
|
}
|
|
127
209
|
//# sourceMappingURL=Composer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Composer.js","sourceRoot":"","sources":["../../src/chat/Composer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,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ACF,KAAK,CACN,IACM,IACF,IACF,EACR,KAAK,IACC,CACV,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
'use client';"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Dial = Dial;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
/**
|
|
7
|
+
* The effort, as ONE small icon button — a gauge with the level in a tiny pip —
|
|
8
|
+
* the same in Chat and Dev, in the composer's end row beside the mic.
|
|
9
|
+
*
|
|
10
|
+
* press opens a compact list of the levels, the one in force checked
|
|
11
|
+
* drag press the icon and move along the row: each step of the finger
|
|
12
|
+
* is a level (`STEP` px), snapped to the surface's own list, with a
|
|
13
|
+
* small label above the icon naming the level while it is held
|
|
14
|
+
* ← ↓ / → ↑ the arrows move one level, in the reading direction
|
|
15
|
+
* Enter, Space opens the list
|
|
16
|
+
*
|
|
17
|
+
* The list is the surface's (`Modes`): a chat offers six levels, a coding run four.
|
|
18
|
+
* The pointer events are the page's own — nothing is captured past the press.
|
|
19
|
+
*/
|
|
20
|
+
const gui_1 = require("@hanzo/gui");
|
|
21
|
+
const react_1 = require("@hanzo/i18n/react");
|
|
22
|
+
const lucide_icons_2_1 = require("@hanzogui/lucide-icons-2");
|
|
23
|
+
const react_2 = require("react");
|
|
24
|
+
const gui_2 = require("../backends/gui/index.cjs");
|
|
25
|
+
const ring_1 = require("./ring.cjs");
|
|
26
|
+
const Tune_1 = require("./Tune.cjs");
|
|
27
|
+
/** How far the finger travels for one level, px. */
|
|
28
|
+
const STEP = 22;
|
|
29
|
+
/** The pip: the level in a letter or two, so the icon says where it stands without a word. */
|
|
30
|
+
const PIP = { auto: 'A', low: 'L', medium: 'M', high: 'H', xhigh: 'XH', max: 'MAX' };
|
|
31
|
+
const pip = (id, label) => PIP[id] ?? label.slice(0, 1).toUpperCase();
|
|
32
|
+
function Dial({ effort, size = 36, disabled = false }) {
|
|
33
|
+
const { t, dir } = (0, react_1.useI18n)();
|
|
34
|
+
const [open, setOpen] = (0, react_2.useState)(false);
|
|
35
|
+
// The level under the finger while it is held, as a place in the list.
|
|
36
|
+
const [held, setHeld] = (0, react_2.useState)(null);
|
|
37
|
+
const press = (0, react_2.useRef)(null);
|
|
38
|
+
const index = Math.max(0, effort.items.findIndex((e) => e.id === effort.value));
|
|
39
|
+
const now = effort.items[index] ?? effort.items[0];
|
|
40
|
+
const shown = held === null ? now : (effort.items[held] ?? now);
|
|
41
|
+
const flip = dir === 'rtl' ? -1 : 1;
|
|
42
|
+
const clamp = (i) => Math.max(0, Math.min(effort.items.length - 1, i));
|
|
43
|
+
const go = (i) => {
|
|
44
|
+
const next = effort.items[clamp(i)];
|
|
45
|
+
if (next && next.id !== effort.value)
|
|
46
|
+
effort.set(next.id);
|
|
47
|
+
};
|
|
48
|
+
return ((0, jsx_runtime_1.jsxs)(gui_2.Popover, { open: open, onOpenChange: setOpen, allowFlip: true, placement: "top-end", children: [(0, jsx_runtime_1.jsx)(gui_2.PopoverAnchor, { asChild: true, children: (0, jsx_runtime_1.jsxs)(gui_1.XStack, { position: "relative", shrink: 0, "data-slot": "dial", children: [(0, jsx_runtime_1.jsxs)(gui_1.XStack, { render: "button", "data-slot": "dial-button", "aria-label": t('Effort: {level}', { level: t(now.label) }), "aria-haspopup": "listbox", "aria-expanded": open, "aria-disabled": disabled || undefined, tabIndex: disabled ? -1 : 0, width: size, height: size, rounded: 999, items: "center", justify: "center", shrink: 0, position: "relative", cursor: disabled ? 'default' : 'ew-resize', opacity: disabled ? 0.5 : 1, bg: open || held !== null ? '$hover' : 'transparent', hoverStyle: disabled ? undefined : { bg: '$hover' }, focusVisibleStyle: ring_1.RING,
|
|
49
|
+
// inline-style: the page must not scroll or select under a drag along the icon.
|
|
50
|
+
style: { touchAction: 'none', userSelect: 'none' }, onPointerDown: (e) => {
|
|
51
|
+
if (disabled)
|
|
52
|
+
return;
|
|
53
|
+
press.current = { x: e.clientX, at: index, moved: false };
|
|
54
|
+
e.currentTarget?.setPointerCapture?.(e.pointerId);
|
|
55
|
+
}, onPointerMove: (e) => {
|
|
56
|
+
const p = press.current;
|
|
57
|
+
if (!p)
|
|
58
|
+
return;
|
|
59
|
+
const dx = (e.clientX - p.x) * flip;
|
|
60
|
+
if (Math.abs(dx) > 4)
|
|
61
|
+
p.moved = true;
|
|
62
|
+
if (p.moved)
|
|
63
|
+
setHeld(clamp(p.at + Math.round(dx / STEP)));
|
|
64
|
+
}, onPointerUp: (e) => {
|
|
65
|
+
const p = press.current;
|
|
66
|
+
press.current = null;
|
|
67
|
+
e.currentTarget?.releasePointerCapture?.(e.pointerId);
|
|
68
|
+
if (!p)
|
|
69
|
+
return;
|
|
70
|
+
if (p.moved) {
|
|
71
|
+
go(held ?? p.at);
|
|
72
|
+
setHeld(null);
|
|
73
|
+
}
|
|
74
|
+
else
|
|
75
|
+
setOpen((o) => !o);
|
|
76
|
+
}, onPointerCancel: () => {
|
|
77
|
+
press.current = null;
|
|
78
|
+
setHeld(null);
|
|
79
|
+
}, onKeyDown: (e) => {
|
|
80
|
+
if (disabled)
|
|
81
|
+
return;
|
|
82
|
+
const key = e?.key;
|
|
83
|
+
const step = key === 'ArrowRight' || key === 'ArrowUp' ? flip : key === 'ArrowLeft' || key === 'ArrowDown' ? -flip : 0;
|
|
84
|
+
if (step) {
|
|
85
|
+
e.preventDefault?.();
|
|
86
|
+
go(index + step);
|
|
87
|
+
}
|
|
88
|
+
else if (key === 'Enter' || key === ' ') {
|
|
89
|
+
e.preventDefault?.();
|
|
90
|
+
setOpen((o) => !o);
|
|
91
|
+
}
|
|
92
|
+
}, children: [(0, jsx_runtime_1.jsx)(lucide_icons_2_1.Gauge, { size: 18, color: "var(--foreground)", "aria-hidden": true }), (0, jsx_runtime_1.jsx)(gui_1.SizableText, { "data-slot": "dial-pip", "aria-hidden": true, position: "absolute", b: 3, insetInlineEnd: 2, fontSize: 9, lineHeight: 10, fontWeight: "700", color: "$ink", px: 2, rounded: 4, bg: "$background", children: pip(shown.id, t(shown.label)) })] }), held !== null ? ((0, jsx_runtime_1.jsx)(gui_1.XStack, { "data-slot": "dial-tip", role: "status", position: "absolute", b: size + 6, self: "center", px: 8, py: 3, rounded: 6, bg: "$ink", pointerEvents: "none", style: { whiteSpace: 'nowrap' }, children: (0, jsx_runtime_1.jsx)(gui_1.SizableText, { fontSize: 12, color: "$background", children: t(shown.label) }) })) : null] }) }), (0, jsx_runtime_1.jsx)(gui_2.PopoverContent, { solid: true, p: 6, width: 288, maxW: "calc(100vw - 24px)", children: (0, jsx_runtime_1.jsx)(Tune_1.Choices, { title: t('Effort'), items: effort.items, value: effort.value, onPick: (id) => {
|
|
93
|
+
effort.set(id);
|
|
94
|
+
setOpen(false);
|
|
95
|
+
} }) })] }));
|
|
96
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dial.d.ts","sourceRoot":"","sources":["../../src/chat/Dial.tsx"],"names":[],"mappings":"AAuBA,OAAO,EAAW,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAA;AAU5C,wBAAgB,IAAI,CAAC,EAAE,MAAM,EAAE,IAAS,EAAE,QAAgB,EAAE,EAAE;IAAE,MAAM,EAAE,KAAK,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,+BAsIjH"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* The effort, as ONE small icon button — a gauge with the level in a tiny pip —
|
|
5
|
+
* the same in Chat and Dev, in the composer's end row beside the mic.
|
|
6
|
+
*
|
|
7
|
+
* press opens a compact list of the levels, the one in force checked
|
|
8
|
+
* drag press the icon and move along the row: each step of the finger
|
|
9
|
+
* is a level (`STEP` px), snapped to the surface's own list, with a
|
|
10
|
+
* small label above the icon naming the level while it is held
|
|
11
|
+
* ← ↓ / → ↑ the arrows move one level, in the reading direction
|
|
12
|
+
* Enter, Space opens the list
|
|
13
|
+
*
|
|
14
|
+
* The list is the surface's (`Modes`): a chat offers six levels, a coding run four.
|
|
15
|
+
* The pointer events are the page's own — nothing is captured past the press.
|
|
16
|
+
*/
|
|
17
|
+
import { SizableText, XStack } from '@hanzo/gui';
|
|
18
|
+
import { useI18n } from '@hanzo/i18n/react';
|
|
19
|
+
import { Gauge } from '@hanzogui/lucide-icons-2';
|
|
20
|
+
import { useRef, useState } from 'react';
|
|
21
|
+
import { Popover, PopoverAnchor, PopoverContent } from '../backends/gui/index.js';
|
|
22
|
+
import { RING } from './ring.js';
|
|
23
|
+
import { Choices } from './Tune.js';
|
|
24
|
+
/** How far the finger travels for one level, px. */
|
|
25
|
+
const STEP = 22;
|
|
26
|
+
/** The pip: the level in a letter or two, so the icon says where it stands without a word. */
|
|
27
|
+
const PIP = { auto: 'A', low: 'L', medium: 'M', high: 'H', xhigh: 'XH', max: 'MAX' };
|
|
28
|
+
const pip = (id, label) => PIP[id] ?? label.slice(0, 1).toUpperCase();
|
|
29
|
+
export function Dial({ effort, size = 36, disabled = false }) {
|
|
30
|
+
const { t, dir } = useI18n();
|
|
31
|
+
const [open, setOpen] = useState(false);
|
|
32
|
+
// The level under the finger while it is held, as a place in the list.
|
|
33
|
+
const [held, setHeld] = useState(null);
|
|
34
|
+
const press = useRef(null);
|
|
35
|
+
const index = Math.max(0, effort.items.findIndex((e) => e.id === effort.value));
|
|
36
|
+
const now = effort.items[index] ?? effort.items[0];
|
|
37
|
+
const shown = held === null ? now : (effort.items[held] ?? now);
|
|
38
|
+
const flip = dir === 'rtl' ? -1 : 1;
|
|
39
|
+
const clamp = (i) => Math.max(0, Math.min(effort.items.length - 1, i));
|
|
40
|
+
const go = (i) => {
|
|
41
|
+
const next = effort.items[clamp(i)];
|
|
42
|
+
if (next && next.id !== effort.value)
|
|
43
|
+
effort.set(next.id);
|
|
44
|
+
};
|
|
45
|
+
return (_jsxs(Popover, { open: open, onOpenChange: setOpen, allowFlip: true, placement: "top-end", children: [_jsx(PopoverAnchor, { asChild: true, children: _jsxs(XStack, { position: "relative", shrink: 0, "data-slot": "dial", children: [_jsxs(XStack, { render: "button", "data-slot": "dial-button", "aria-label": t('Effort: {level}', { level: t(now.label) }), "aria-haspopup": "listbox", "aria-expanded": open, "aria-disabled": disabled || undefined, tabIndex: disabled ? -1 : 0, width: size, height: size, rounded: 999, items: "center", justify: "center", shrink: 0, position: "relative", cursor: disabled ? 'default' : 'ew-resize', opacity: disabled ? 0.5 : 1, bg: open || held !== null ? '$hover' : 'transparent', hoverStyle: disabled ? undefined : { bg: '$hover' }, focusVisibleStyle: RING,
|
|
46
|
+
// inline-style: the page must not scroll or select under a drag along the icon.
|
|
47
|
+
style: { touchAction: 'none', userSelect: 'none' }, onPointerDown: (e) => {
|
|
48
|
+
if (disabled)
|
|
49
|
+
return;
|
|
50
|
+
press.current = { x: e.clientX, at: index, moved: false };
|
|
51
|
+
e.currentTarget?.setPointerCapture?.(e.pointerId);
|
|
52
|
+
}, onPointerMove: (e) => {
|
|
53
|
+
const p = press.current;
|
|
54
|
+
if (!p)
|
|
55
|
+
return;
|
|
56
|
+
const dx = (e.clientX - p.x) * flip;
|
|
57
|
+
if (Math.abs(dx) > 4)
|
|
58
|
+
p.moved = true;
|
|
59
|
+
if (p.moved)
|
|
60
|
+
setHeld(clamp(p.at + Math.round(dx / STEP)));
|
|
61
|
+
}, onPointerUp: (e) => {
|
|
62
|
+
const p = press.current;
|
|
63
|
+
press.current = null;
|
|
64
|
+
e.currentTarget?.releasePointerCapture?.(e.pointerId);
|
|
65
|
+
if (!p)
|
|
66
|
+
return;
|
|
67
|
+
if (p.moved) {
|
|
68
|
+
go(held ?? p.at);
|
|
69
|
+
setHeld(null);
|
|
70
|
+
}
|
|
71
|
+
else
|
|
72
|
+
setOpen((o) => !o);
|
|
73
|
+
}, onPointerCancel: () => {
|
|
74
|
+
press.current = null;
|
|
75
|
+
setHeld(null);
|
|
76
|
+
}, onKeyDown: (e) => {
|
|
77
|
+
if (disabled)
|
|
78
|
+
return;
|
|
79
|
+
const key = e?.key;
|
|
80
|
+
const step = key === 'ArrowRight' || key === 'ArrowUp' ? flip : key === 'ArrowLeft' || key === 'ArrowDown' ? -flip : 0;
|
|
81
|
+
if (step) {
|
|
82
|
+
e.preventDefault?.();
|
|
83
|
+
go(index + step);
|
|
84
|
+
}
|
|
85
|
+
else if (key === 'Enter' || key === ' ') {
|
|
86
|
+
e.preventDefault?.();
|
|
87
|
+
setOpen((o) => !o);
|
|
88
|
+
}
|
|
89
|
+
}, children: [_jsx(Gauge, { size: 18, color: "var(--foreground)", "aria-hidden": true }), _jsx(SizableText, { "data-slot": "dial-pip", "aria-hidden": true, position: "absolute", b: 3, insetInlineEnd: 2, fontSize: 9, lineHeight: 10, fontWeight: "700", color: "$ink", px: 2, rounded: 4, bg: "$background", children: pip(shown.id, t(shown.label)) })] }), held !== null ? (_jsx(XStack, { "data-slot": "dial-tip", role: "status", position: "absolute", b: size + 6, self: "center", px: 8, py: 3, rounded: 6, bg: "$ink", pointerEvents: "none", style: { whiteSpace: 'nowrap' }, children: _jsx(SizableText, { fontSize: 12, color: "$background", children: t(shown.label) }) })) : null] }) }), _jsx(PopoverContent, { solid: true, p: 6, width: 288, maxW: "calc(100vw - 24px)", children: _jsx(Choices, { title: t('Effort'), items: effort.items, value: effort.value, onPick: (id) => {
|
|
90
|
+
effort.set(id);
|
|
91
|
+
setOpen(false);
|
|
92
|
+
} }) })] }));
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=Dial.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dial.js","sourceRoot":"","sources":["../../src/chat/Dial.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,M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