@estiva-app/ui 0.5.0 → 0.6.0
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/Divider.d.ts.map +1 -1
- package/dist/IconButton.d.ts +4 -1
- package/dist/IconButton.d.ts.map +1 -1
- package/dist/Kbd.d.ts +27 -0
- package/dist/Kbd.d.ts.map +1 -0
- package/dist/Menu.d.ts +56 -5
- package/dist/Menu.d.ts.map +1 -1
- package/dist/SearchInput.d.ts +1 -1
- package/dist/SearchInput.d.ts.map +1 -1
- package/dist/Tooltip.d.ts +8 -2
- package/dist/Tooltip.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +194 -140
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
- package/src/AppShell.stories.tsx +2 -2
- package/src/Divider.tsx +5 -1
- package/src/IconButton.tsx +5 -1
- package/src/Kbd.mdx +77 -0
- package/src/Kbd.stories.tsx +58 -0
- package/src/Kbd.tsx +42 -0
- package/src/Menu.mdx +8 -1
- package/src/Menu.stories.tsx +1 -1
- package/src/Menu.tsx +112 -18
- package/src/MenuItem.mdx +1 -1
- package/src/MenuItem.stories.tsx +5 -5
- package/src/SearchInput.mdx +2 -2
- package/src/SearchInput.stories.tsx +2 -2
- package/src/SearchInput.tsx +3 -6
- package/src/Tooltip.mdx +9 -0
- package/src/Tooltip.stories.tsx +15 -0
- package/src/Tooltip.tsx +12 -4
- package/src/TopBar.mdx +1 -1
- package/src/TopBar.stories.tsx +2 -2
- package/src/index.ts +2 -1
- package/tailwind-preset.js +9 -1
package/dist/Divider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../src/Divider.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,OAAO,CAAC,EAAE,WAA0B,EAAE,SAAS,EAAE,EAAE,YAAY,+
|
|
1
|
+
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../src/Divider.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,OAAO,CAAC,EAAE,WAA0B,EAAE,SAAS,EAAE,EAAE,YAAY,+BAY9E"}
|
package/dist/IconButton.d.ts
CHANGED
|
@@ -9,9 +9,12 @@ export type IconButtonVariant = 'muted' | 'outlined' | 'primary';
|
|
|
9
9
|
export interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
10
10
|
variant?: IconButtonVariant;
|
|
11
11
|
tooltip?: string;
|
|
12
|
+
/** A key hint drawn as the `Kbd` chip inside the tooltip — for a button
|
|
13
|
+
* whose only other affordance is a keyboard shortcut. */
|
|
14
|
+
tooltipShortcut?: string;
|
|
12
15
|
tooltipPlacement?: 'top' | 'bottom';
|
|
13
16
|
/** The icon: 16px, stroke 1.5. */
|
|
14
17
|
children: ReactNode;
|
|
15
18
|
}
|
|
16
|
-
export declare function IconButton({ variant, className, children, disabled, tooltip, tooltipPlacement, type, ...props }: IconButtonProps): import("react").JSX.Element;
|
|
19
|
+
export declare function IconButton({ variant, className, children, disabled, tooltip, tooltipShortcut, tooltipPlacement, type, ...props }: IconButtonProps): import("react").JSX.Element;
|
|
17
20
|
//# sourceMappingURL=IconButton.d.ts.map
|
package/dist/IconButton.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../src/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CA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
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A keyboard hint — the small chip that names the key which does the same thing.
|
|
4
|
+
*
|
|
5
|
+
* **The look is SearchInput's shortcut chip** (Katerina, 2026-09-05), which is
|
|
6
|
+
* the one the apps already show: an inset pill with a hairline border, and under
|
|
7
|
+
* Signal and Ship the keycap treatment — mono, 10px, a lighter fill and a thicker
|
|
8
|
+
* bottom edge, so it reads as a key rather than a label.
|
|
9
|
+
*
|
|
10
|
+
* It existed before this file did, drawn inline inside `MenuItem` and again
|
|
11
|
+
* inside `SearchInput`. Extracted when `Tooltip` needed a third copy.
|
|
12
|
+
*
|
|
13
|
+
* **Sizes are arbitrary values on purpose.** `text-caption` beside a
|
|
14
|
+
* `text-{color}` is dropped by tailwind-merge, so the chip silently inherited
|
|
15
|
+
* whatever size surrounded it — 10px in a composer, something else elsewhere.
|
|
16
|
+
* `text-[12px]` survives the merge.
|
|
17
|
+
*
|
|
18
|
+
* Content is whatever names the key — a trigger character (`/`, `@`), a chord
|
|
19
|
+
* (`Cmd+B`, `Ctrl+Alt+1`), or a word (`Esc`). It does not format anything: a caller
|
|
20
|
+
* that knows the platform passes the label it wants.
|
|
21
|
+
*/
|
|
22
|
+
export interface KbdProps {
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function Kbd({ children, className }: KbdProps): import("react").JSX.Element;
|
|
27
|
+
//# sourceMappingURL=Kbd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Kbd.d.ts","sourceRoot":"","sources":["../src/Kbd.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,QAAQ,+BAapD"}
|
package/dist/Menu.d.ts
CHANGED
|
@@ -64,6 +64,27 @@ export interface MenuProps {
|
|
|
64
64
|
children: ReactNode;
|
|
65
65
|
className?: string;
|
|
66
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* The menu's surface, with none of its behaviour — an elevated box with a
|
|
69
|
+
* hairline border, 8px radius, 8px padding and the large shadow.
|
|
70
|
+
*
|
|
71
|
+
* Split out of `Menu` on 2026-09-05. `Menu` owns Escape, outside-click and
|
|
72
|
+
* placement, and that is right for a menu opened from a trigger — but a
|
|
73
|
+
* type-ahead popup inside a text editor cannot have them: the editor's
|
|
74
|
+
* suggestion plugin already owns the keyboard and positions the popup, and a
|
|
75
|
+
* second Escape handler fights it. So Peek's `@`, `/` and `[` menus each drew
|
|
76
|
+
* this box by hand, and the three had already drifted apart.
|
|
77
|
+
*
|
|
78
|
+
* `Menu` renders this, so there is still exactly one definition of the
|
|
79
|
+
* surface — change it here and every menu in every app follows.
|
|
80
|
+
*
|
|
81
|
+
* Width, height and internal rhythm belong to the caller: a picker that lists
|
|
82
|
+
* people is not the width of one that lists verbs.
|
|
83
|
+
*/
|
|
84
|
+
export interface MenuPanelProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {
|
|
85
|
+
children: ReactNode;
|
|
86
|
+
}
|
|
87
|
+
export declare function MenuPanel({ children, className, ...props }: MenuPanelProps): import("react").JSX.Element;
|
|
67
88
|
export declare function Menu({ onClose, anchor, align, position, closeOnLeave, children, className }: MenuProps): import("react").JSX.Element;
|
|
68
89
|
/**
|
|
69
90
|
* A row that opens another menu beside it — the submenu two Peek menus
|
|
@@ -103,6 +124,23 @@ export interface MenuItemProps extends Omit<ComponentPropsWithRef<'button'>, 'ch
|
|
|
103
124
|
leading?: ReactNode;
|
|
104
125
|
/** At the right edge: a hint, a value — anything. Wins over `shortcut` and `submenu`. */
|
|
105
126
|
trailing?: ReactNode;
|
|
127
|
+
/**
|
|
128
|
+
* Shown at the right edge **only while this row is the one you are pointing
|
|
129
|
+
* at or have arrowed onto** — an `EnterHint`, typically.
|
|
130
|
+
*
|
|
131
|
+
* Pass it unconditionally. Do not do `trailing={active ? <EnterHint/> : undefined}`:
|
|
132
|
+
* that mounts the hint, and a mount is instant while the row's own fill is a
|
|
133
|
+
* 150ms fade, so the hint lands ahead of the highlight on the way in and
|
|
134
|
+
* vanishes ahead of it on the way out (measured 2026-09-05 — ~7 frames of a
|
|
135
|
+
* chip sitting on an unhighlighted row, and two rows lit at once when
|
|
136
|
+
* sweeping). This slot is always in the DOM and revealed by the *same*
|
|
137
|
+
* `:hover` / `selected` the fill uses, on the same duration and curve, so
|
|
138
|
+
* the two cannot come apart — and the row does not reflow when it appears.
|
|
139
|
+
*
|
|
140
|
+
* It cross-fades with `trailing`/`shortcut`/`submenu` rather than displacing
|
|
141
|
+
* them, and reserves the wider of the two, so nothing moves either way.
|
|
142
|
+
*/
|
|
143
|
+
hint?: ReactNode;
|
|
106
144
|
/** A keyboard hint, drawn as the kbd chip. */
|
|
107
145
|
shortcut?: string;
|
|
108
146
|
/** The row opens another menu: draws the chevron at the right edge. */
|
|
@@ -111,13 +149,26 @@ export interface MenuItemProps extends Omit<ComponentPropsWithRef<'button'>, 'ch
|
|
|
111
149
|
/** The row the menu currently points at (a submenu's chosen value). */
|
|
112
150
|
selected?: boolean;
|
|
113
151
|
}
|
|
114
|
-
export declare function MenuItem({ label, children, size, description, leading, trailing, shortcut, submenu, destructive, selected, className, ...props }: MenuItemProps): import("react").JSX.Element;
|
|
152
|
+
export declare function MenuItem({ label, children, size, description, leading, trailing, hint, shortcut, submenu, destructive, selected, className, ...props }: MenuItemProps): import("react").JSX.Element;
|
|
115
153
|
/**
|
|
116
|
-
* The keyboard hint a picker row shows while highlighted —
|
|
117
|
-
*
|
|
154
|
+
* The keyboard hint a picker row shows while highlighted — hand-rolled in
|
|
155
|
+
* five files before this (2026-09-01), and drawn as its own thing until
|
|
156
|
+
* 2026-09-05, when it became the `Kbd` chip every other key hint uses. A
|
|
157
|
+
* picker row and a menu row sit in the same menu; they named the same key
|
|
158
|
+
* two ways.
|
|
159
|
+
*
|
|
160
|
+
* `target` is what pressing it gives you, when that is worth saying — the
|
|
161
|
+
* topic picker's "↩ Enter #topic". It sits after the chip, in the picker's
|
|
162
|
+
* own 9px voice, because it is not a key.
|
|
163
|
+
*
|
|
164
|
+
* Katerina, 2026-09-05, told the measurement and asked again: the chip keeps
|
|
165
|
+
* the `↩` character. It is not in Geist Mono — the browser borrows it, so it
|
|
166
|
+
* advances 8.63px where the font's own characters advance 6 — and that is a
|
|
167
|
+
* knowing trade for the glyph, not an oversight. If the width ever has to go,
|
|
168
|
+
* Tabler's IconCornerDownLeft draws the same shape.
|
|
118
169
|
*/
|
|
119
|
-
export declare function EnterHint({
|
|
120
|
-
|
|
170
|
+
export declare function EnterHint({ target }: {
|
|
171
|
+
target?: string;
|
|
121
172
|
}): import("react").JSX.Element;
|
|
122
173
|
/** A section heading inside a menu: the 32px row with a SectionLabel, read
|
|
123
174
|
* secondary — a heading inside a menu labels the rows, it is not one of
|
package/dist/Menu.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../src/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwF,KAAK,qBAAqB,EAAsB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../src/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwF,KAAK,qBAAqB,EAAsB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAQ5K;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB;qEACiE;IACjE,MAAM,CAAC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,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAE3F"}
|
package/dist/SearchInput.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { type InputHTMLAttributes } from 'react';
|
|
|
13
13
|
* command launcher. The component is the same either way.
|
|
14
14
|
*/
|
|
15
15
|
export interface SearchInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className'> {
|
|
16
|
-
/** A keyboard hint drawn at the right edge, e.g. "
|
|
16
|
+
/** A keyboard hint drawn at the right edge, e.g. "Ctrl+K". */
|
|
17
17
|
shortcut?: string;
|
|
18
18
|
className?: string;
|
|
19
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../src/SearchInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../src/SearchInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,OAAO,CAAA;AAIhD;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,WAAW,CAAC;IAChG,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAuB,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,+BAkBvG"}
|
package/dist/Tooltip.d.ts
CHANGED
|
@@ -10,15 +10,21 @@ import { type ReactNode } from 'react';
|
|
|
10
10
|
*/
|
|
11
11
|
export interface TooltipProps {
|
|
12
12
|
label: string;
|
|
13
|
+
/** The key that does the same thing, drawn as the `Kbd` chip after the label.
|
|
14
|
+
* Pass it already formatted for the platform — this renders, it does not
|
|
15
|
+
* decide whether the modifier is a glyph or a word. */
|
|
16
|
+
shortcut?: string;
|
|
13
17
|
className?: string;
|
|
14
18
|
}
|
|
15
|
-
export declare function Tooltip({ label, className }: TooltipProps): import("react").JSX.Element;
|
|
19
|
+
export declare function Tooltip({ label, shortcut, className }: TooltipProps): import("react").JSX.Element;
|
|
16
20
|
export interface WithTooltipProps {
|
|
17
21
|
label: string;
|
|
22
|
+
/** Passed straight to the surface — see `TooltipProps.shortcut`. */
|
|
23
|
+
shortcut?: string;
|
|
18
24
|
placement?: 'top' | 'bottom';
|
|
19
25
|
/** Extra classes on the wrapper — e.g. `min-w-0 shrink` so a truncating label keeps truncating inside it. */
|
|
20
26
|
wrapperClassName?: string;
|
|
21
27
|
children: ReactNode;
|
|
22
28
|
}
|
|
23
|
-
export declare function WithTooltip({ label, placement, wrapperClassName, children }: WithTooltipProps): import("react").JSX.Element;
|
|
29
|
+
export declare function WithTooltip({ label, shortcut, placement, wrapperClassName, children }: WithTooltipProps): import("react").JSX.Element;
|
|
24
30
|
//# sourceMappingURL=Tooltip.d.ts.map
|
package/dist/Tooltip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../src/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../src/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAK1G;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb;;4DAEwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,YAAY,+BAOnE;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;IAC5B,6GAA6G;IAC7G,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAKD,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAiB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE,gBAAgB,+BAwC/G"}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { Checkbox, type CheckboxProps } from './Checkbox';
|
|
|
18
18
|
export { Chip, type ChipProps, type ChipType } from './Chip';
|
|
19
19
|
export { ChipInput, InputChip, type ChipInputOption, type ChipInputProps, type InputChipProps } from './ChipInput';
|
|
20
20
|
export { IconButton, type IconButtonProps, type IconButtonVariant } from './IconButton';
|
|
21
|
+
export { Kbd, type KbdProps } from './Kbd';
|
|
21
22
|
export { IdentityMenu, IdentityPanel, type Identity, type IdentityMenuProps, type IdentityPanelProps } from './IdentityMenu';
|
|
22
23
|
export { Tooltip, WithTooltip, type TooltipProps, type WithTooltipProps } from './Tooltip';
|
|
23
24
|
export { Field, useFieldControlId, type FieldProps } from './Field';
|
|
@@ -31,7 +32,7 @@ export { EditableText, type EditableTextProps } from './EditableText';
|
|
|
31
32
|
export { EmptyState, type EmptyStateProps } from './EmptyState';
|
|
32
33
|
export { SkeletonBar, SkeletonList, SkeletonRow } from './Skeleton';
|
|
33
34
|
export { Breadcrumb, type BreadcrumbProps, type Crumb } from './Breadcrumb';
|
|
34
|
-
export { EnterHint, Menu, MenuItem, MenuRow, MenuSection, MenuSub, type MenuItemProps, type MenuProps, type MenuSubProps } from './Menu';
|
|
35
|
+
export { EnterHint, Menu, MenuItem, MenuPanel, MenuRow, MenuSection, MenuSub, type MenuItemProps, type MenuPanelProps, type MenuProps, type MenuSubProps } from './Menu';
|
|
35
36
|
export { clampBox, fitMenu, fitSubmenu } from './fit';
|
|
36
37
|
export { NavItem, type NavItemProps } from './NavItem';
|
|
37
38
|
export { Person, type PersonProps } from './Person';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AACxE,OAAO,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAC1F,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAA;AACpE,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAA;AACxF,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAC5D,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;AAClH,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACvF,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,KAAK,QAA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