@typed/ui 1.0.0-beta.1 → 1.0.0-beta.11
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/LICENSE +21 -0
- package/README.md +54 -10
- package/dist/Alert.d.ts +72 -0
- package/dist/Alert.d.ts.map +1 -0
- package/dist/Alert.js +40 -0
- package/dist/Button.d.ts +100 -0
- package/dist/Button.d.ts.map +1 -0
- package/dist/Button.js +42 -0
- package/dist/Carousel.d.ts +346 -0
- package/dist/Carousel.d.ts.map +1 -0
- package/dist/Carousel.js +264 -0
- package/dist/Checkbox.d.ts +168 -0
- package/dist/Checkbox.d.ts.map +1 -0
- package/dist/Checkbox.js +146 -0
- package/dist/Collection.d.ts +254 -0
- package/dist/Collection.d.ts.map +1 -0
- package/dist/Collection.js +218 -0
- package/dist/Combobox.d.ts +367 -0
- package/dist/Combobox.d.ts.map +1 -0
- package/dist/Combobox.js +300 -0
- package/dist/Composite.d.ts +823 -0
- package/dist/Composite.d.ts.map +1 -0
- package/dist/Composite.js +615 -0
- package/dist/Dialog.d.ts +544 -0
- package/dist/Dialog.d.ts.map +1 -0
- package/dist/Dialog.js +357 -0
- package/dist/Disclosure.d.ts +219 -0
- package/dist/Disclosure.d.ts.map +1 -0
- package/dist/Disclosure.js +128 -0
- package/dist/Dom/Events.d.ts +122 -0
- package/dist/Dom/Events.d.ts.map +1 -0
- package/dist/Dom/Events.js +192 -0
- package/dist/Dom/Props.d.ts +161 -0
- package/dist/Dom/Props.d.ts.map +1 -0
- package/dist/Dom/Props.js +110 -0
- package/dist/Dom/Refs.d.ts +58 -0
- package/dist/Dom/Refs.d.ts.map +1 -0
- package/dist/Dom/Refs.js +61 -0
- package/dist/Dom/Render.d.ts +59 -0
- package/dist/Dom/Render.d.ts.map +1 -0
- package/dist/Dom/Render.js +71 -0
- package/dist/Dom/Types.d.ts +570 -0
- package/dist/Dom/Types.d.ts.map +1 -0
- package/dist/Dom/Types.js +1 -0
- package/dist/Dom/index.d.ts +20 -0
- package/dist/Dom/index.d.ts.map +1 -0
- package/dist/Dom/index.js +8 -0
- package/dist/Dom.d.ts +14 -0
- package/dist/Dom.d.ts.map +1 -0
- package/dist/Dom.js +13 -0
- package/dist/Focusable.d.ts +85 -0
- package/dist/Focusable.d.ts.map +1 -0
- package/dist/Focusable.js +35 -0
- package/dist/Form.d.ts +1727 -0
- package/dist/Form.d.ts.map +1 -0
- package/dist/Form.js +1142 -0
- package/dist/Grid.d.ts +388 -0
- package/dist/Grid.d.ts.map +1 -0
- package/dist/Grid.js +284 -0
- package/dist/Group.d.ts +128 -0
- package/dist/Group.d.ts.map +1 -0
- package/dist/Group.js +71 -0
- package/dist/Heading.d.ts +87 -0
- package/dist/Heading.d.ts.map +1 -0
- package/dist/Heading.js +58 -0
- package/dist/Hovercard.d.ts +297 -0
- package/dist/Hovercard.d.ts.map +1 -0
- package/dist/Hovercard.js +188 -0
- package/dist/HttpRouter.d.ts +129 -6
- package/dist/HttpRouter.d.ts.map +1 -1
- package/dist/HttpRouter.js +198 -55
- package/dist/Link.d.ts +63 -28
- package/dist/Link.d.ts.map +1 -1
- package/dist/Link.js +84 -37
- package/dist/Listbox.d.ts +305 -0
- package/dist/Listbox.d.ts.map +1 -0
- package/dist/Listbox.js +245 -0
- package/dist/Menu.d.ts +663 -0
- package/dist/Menu.d.ts.map +1 -0
- package/dist/Menu.js +569 -0
- package/dist/Menubar.d.ts +249 -0
- package/dist/Menubar.d.ts.map +1 -0
- package/dist/Menubar.js +207 -0
- package/dist/Meter.d.ts +157 -0
- package/dist/Meter.d.ts.map +1 -0
- package/dist/Meter.js +87 -0
- package/dist/NativeDetails.d.ts +41 -0
- package/dist/NativeDetails.d.ts.map +1 -0
- package/dist/NativeDetails.js +40 -0
- package/dist/NativeDialog.d.ts +66 -0
- package/dist/NativeDialog.d.ts.map +1 -0
- package/dist/NativeDialog.js +88 -0
- package/dist/NativePopover.d.ts +43 -0
- package/dist/NativePopover.d.ts.map +1 -0
- package/dist/NativePopover.js +84 -0
- package/dist/Popover.d.ts +240 -0
- package/dist/Popover.d.ts.map +1 -0
- package/dist/Popover.js +140 -0
- package/dist/RadioGroup.d.ts +330 -0
- package/dist/RadioGroup.d.ts.map +1 -0
- package/dist/RadioGroup.js +241 -0
- package/dist/Role.d.ts +64 -0
- package/dist/Role.d.ts.map +1 -0
- package/dist/Role.js +27 -0
- package/dist/Select.d.ts +418 -0
- package/dist/Select.d.ts.map +1 -0
- package/dist/Select.js +357 -0
- package/dist/Separator.d.ts +58 -0
- package/dist/Separator.d.ts.map +1 -0
- package/dist/Separator.js +32 -0
- package/dist/Slider.d.ts +141 -0
- package/dist/Slider.d.ts.map +1 -0
- package/dist/Slider.js +101 -0
- package/dist/SpinButton.d.ts +141 -0
- package/dist/SpinButton.d.ts.map +1 -0
- package/dist/SpinButton.js +101 -0
- package/dist/Storybook.d.ts +76 -0
- package/dist/Storybook.d.ts.map +1 -0
- package/dist/Storybook.js +102 -0
- package/dist/Switch.d.ts +148 -0
- package/dist/Switch.d.ts.map +1 -0
- package/dist/Switch.js +110 -0
- package/dist/Tab.d.ts +26 -0
- package/dist/Tab.d.ts.map +1 -0
- package/dist/Tab.js +25 -0
- package/dist/Tabs.d.ts +411 -0
- package/dist/Tabs.d.ts.map +1 -0
- package/dist/Tabs.js +262 -0
- package/dist/Toolbar.d.ts +248 -0
- package/dist/Toolbar.d.ts.map +1 -0
- package/dist/Toolbar.js +187 -0
- package/dist/Tooltip.d.ts +296 -0
- package/dist/Tooltip.d.ts.map +1 -0
- package/dist/Tooltip.js +172 -0
- package/dist/Tree.d.ts +405 -0
- package/dist/Tree.d.ts.map +1 -0
- package/dist/Tree.js +333 -0
- package/dist/TreeGrid.d.ts +426 -0
- package/dist/TreeGrid.d.ts.map +1 -0
- package/dist/TreeGrid.js +308 -0
- package/dist/VisuallyHidden.d.ts +68 -0
- package/dist/VisuallyHidden.d.ts.map +1 -0
- package/dist/VisuallyHidden.js +44 -0
- package/dist/WindowSplitter.d.ts +336 -0
- package/dist/WindowSplitter.d.ts.map +1 -0
- package/dist/WindowSplitter.js +305 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +48 -0
- package/package.json +48 -20
- package/src/HttpRouter.test.ts +0 -294
- package/src/HttpRouter.ts +0 -168
- package/src/Link.test.ts +0 -84
- package/src/Link.ts +0 -107
- package/src/index.ts +0 -2
package/dist/Menu.d.ts
ADDED
|
@@ -0,0 +1,663 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Menu coordinates trigger, manual native popover content, registered items, and nested submenu
|
|
3
|
+
* state. Keyboard handling covers opening, Escape, directional parent/child traversal, roving
|
|
4
|
+
* focus, and typeahead without synthetic events.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* The module keeps policy, state transitions, and DOM rendering separable so applications can use
|
|
8
|
+
* the state and pure operations without mounting UI, or supply custom hosts without replacing native
|
|
9
|
+
* events and browser-owned focus.
|
|
10
|
+
*
|
|
11
|
+
* Learn the interaction in the [Menu guide](/explore/ui-menu).
|
|
12
|
+
*
|
|
13
|
+
* @since 1.0.0
|
|
14
|
+
* @category modules
|
|
15
|
+
* @packageDocumentation
|
|
16
|
+
*/
|
|
17
|
+
import * as Effect from "effect/Effect";
|
|
18
|
+
import * as Scope from "effect/Scope";
|
|
19
|
+
import * as Schema from "effect/Schema";
|
|
20
|
+
import type { Fx } from "@typed/fx/Fx";
|
|
21
|
+
import { RefSubject } from "@typed/fx";
|
|
22
|
+
import { EventHandler, type Renderable, type RenderEvent, type RenderTemplate } from "@typed/template";
|
|
23
|
+
import * as Collection from "./Collection.js";
|
|
24
|
+
import * as Composite from "./Composite.js";
|
|
25
|
+
import * as Dom from "./Dom.js";
|
|
26
|
+
import type { HostResult } from "./Dom/Types.js";
|
|
27
|
+
/**
|
|
28
|
+
* Popup identity, visibility, and active command focus.
|
|
29
|
+
* Checked preferences and command results belong to the application, not this state.
|
|
30
|
+
*
|
|
31
|
+
* @since 1.0.0
|
|
32
|
+
* @category Popup state
|
|
33
|
+
*/
|
|
34
|
+
export interface State extends Omit<Composite.State, "orientation"> {
|
|
35
|
+
/**
|
|
36
|
+
* Axis used to interpret Arrow-key movement.
|
|
37
|
+
* @since 1.0.0
|
|
38
|
+
* @category Keyboard navigation
|
|
39
|
+
*/
|
|
40
|
+
readonly orientation: "vertical";
|
|
41
|
+
/**
|
|
42
|
+
* Stable id used for collection identity and ARIA relationships.
|
|
43
|
+
* @since 1.0.0
|
|
44
|
+
* @category Identity and relationships
|
|
45
|
+
*/
|
|
46
|
+
readonly id: string;
|
|
47
|
+
/**
|
|
48
|
+
* Whether the associated native popover is open.
|
|
49
|
+
* @since 1.0.0
|
|
50
|
+
* @category Popup visibility
|
|
51
|
+
*/
|
|
52
|
+
readonly open: boolean;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Initial Menu values. The caller supplies id; open defaults false, activeId null, loop true, and
|
|
56
|
+
* orientation vertical.
|
|
57
|
+
*
|
|
58
|
+
* @since 1.0.0
|
|
59
|
+
* @category Popup state
|
|
60
|
+
*/
|
|
61
|
+
export interface InitialState {
|
|
62
|
+
/**
|
|
63
|
+
* Stable id used for collection identity and ARIA relationships.
|
|
64
|
+
* @since 1.0.0
|
|
65
|
+
* @category Identity and relationships
|
|
66
|
+
*/
|
|
67
|
+
readonly id: string;
|
|
68
|
+
/**
|
|
69
|
+
* Whether the associated native popover is open.
|
|
70
|
+
* @since 1.0.0
|
|
71
|
+
* @category Popup visibility
|
|
72
|
+
*/
|
|
73
|
+
readonly open?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Id currently active for keyboard navigation; null means no active item.
|
|
76
|
+
* @since 1.0.0
|
|
77
|
+
* @category Keyboard focus
|
|
78
|
+
*/
|
|
79
|
+
readonly activeId?: string | null;
|
|
80
|
+
/**
|
|
81
|
+
* Whether movement wraps between the first and last enabled items.
|
|
82
|
+
* @since 1.0.0
|
|
83
|
+
* @category Keyboard navigation
|
|
84
|
+
*/
|
|
85
|
+
readonly loop?: boolean;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Effect Schema used by makeState to encode, decode, and hydrate Menu state.
|
|
89
|
+
*
|
|
90
|
+
* @remarks
|
|
91
|
+
* @example
|
|
92
|
+
* ```ts
|
|
93
|
+
* import * as Schema from "effect/Schema";
|
|
94
|
+
* import * as Menu from "@typed/ui/Menu";
|
|
95
|
+
*
|
|
96
|
+
* const decodeState = Schema.decodeUnknownEffect(Menu.StateSchema);
|
|
97
|
+
* ```
|
|
98
|
+
* @since 1.0.0
|
|
99
|
+
* @category Popup state
|
|
100
|
+
*/
|
|
101
|
+
export declare const StateSchema: Schema.Struct<{
|
|
102
|
+
readonly id: Schema.String;
|
|
103
|
+
readonly open: Schema.Boolean;
|
|
104
|
+
readonly activeId: Schema.NullOr<Schema.String>;
|
|
105
|
+
readonly orientation: Schema.Literals<readonly ["vertical"]>;
|
|
106
|
+
readonly loop: Schema.Boolean;
|
|
107
|
+
readonly rtl: Schema.Boolean;
|
|
108
|
+
readonly virtualFocus: Schema.Boolean;
|
|
109
|
+
}>;
|
|
110
|
+
/**
|
|
111
|
+
* Creates hydrated Menu state. The caller supplies id; open defaults false, activeId null, loop
|
|
112
|
+
* true, and orientation vertical.
|
|
113
|
+
*
|
|
114
|
+
* @remarks
|
|
115
|
+
* The returned Effect creates the RefSubject when run. That state is renderer-independent;
|
|
116
|
+
* collection registrations belong to the separate Scope that runs register or ref, not to state
|
|
117
|
+
* creation.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```ts
|
|
121
|
+
* import * as Effect from "effect/Effect";
|
|
122
|
+
* import * as Menu from "@typed/ui/Menu";
|
|
123
|
+
*
|
|
124
|
+
* const program = Effect.scoped(
|
|
125
|
+
* Effect.gen(function* () {
|
|
126
|
+
* const state = yield* Menu.makeState({ id: "file-menu" });
|
|
127
|
+
* const collection = yield* Menu.makeCollection();
|
|
128
|
+
* return { state: yield* state, collection: yield* collection };
|
|
129
|
+
* }),
|
|
130
|
+
* );
|
|
131
|
+
* ```
|
|
132
|
+
* @since 1.0.0
|
|
133
|
+
* @category Popup state
|
|
134
|
+
*/
|
|
135
|
+
export declare function makeState(initial: InitialState): Effect.Effect<RefSubject.HydratedRefSubject<{
|
|
136
|
+
readonly id: string;
|
|
137
|
+
readonly open: boolean;
|
|
138
|
+
readonly activeId: string | null;
|
|
139
|
+
readonly orientation: "vertical";
|
|
140
|
+
readonly loop: boolean;
|
|
141
|
+
readonly rtl: boolean;
|
|
142
|
+
readonly virtualFocus: boolean;
|
|
143
|
+
}, Schema.SchemaError, never, never>, never, Scope.Scope>;
|
|
144
|
+
/**
|
|
145
|
+
* Creates a scoped Collection for Menu items.
|
|
146
|
+
*
|
|
147
|
+
* @remarks
|
|
148
|
+
* The returned Effect allocates the RefSubject in the caller's Scope. Each later registration is
|
|
149
|
+
* owned by the Scope that runs register, independently of this construction Effect.
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* ```ts
|
|
153
|
+
* import * as Effect from "effect/Effect";
|
|
154
|
+
* import * as Menu from "@typed/ui/Menu";
|
|
155
|
+
*
|
|
156
|
+
* const program = Effect.scoped(
|
|
157
|
+
* Effect.gen(function* () {
|
|
158
|
+
* const collection = yield* Menu.makeCollection();
|
|
159
|
+
* return yield* collection;
|
|
160
|
+
* }),
|
|
161
|
+
* );
|
|
162
|
+
* ```
|
|
163
|
+
* @since 1.0.0
|
|
164
|
+
* @category Command registration
|
|
165
|
+
*/
|
|
166
|
+
export declare const makeCollection: (initial?: Collection.State<string, Element>) => Effect.Effect<RefSubject.RefSubject<Collection.State<string, Element>, never, never>, never, Scope.Scope>;
|
|
167
|
+
/**
|
|
168
|
+
* Updates only the menu's explicit open state.
|
|
169
|
+
*
|
|
170
|
+
* @remarks
|
|
171
|
+
* The operation exposes Menu's transition directly so callers can compose it in Effect programs
|
|
172
|
+
* and native event handlers.
|
|
173
|
+
*
|
|
174
|
+
* @since 1.0.0
|
|
175
|
+
* @category Popup state
|
|
176
|
+
*/
|
|
177
|
+
export declare function setOpen<E, R>(state: RefSubject.RefSubject<State, E, R>, open: boolean): Effect.Effect<State, E, R>;
|
|
178
|
+
/**
|
|
179
|
+
* Inputs accepted by Menu.Trigger in addition to the shared DOM host options.
|
|
180
|
+
*
|
|
181
|
+
* @remarks
|
|
182
|
+
* Separator orientation is an accessibility announcement only, so it remains independent from the
|
|
183
|
+
* orientation used by menu keyboard navigation.
|
|
184
|
+
*
|
|
185
|
+
* @since 1.0.0
|
|
186
|
+
* @category Opening a menu
|
|
187
|
+
*/
|
|
188
|
+
export interface TriggerOptions extends Dom.HostOptions<HTMLButtonElement> {
|
|
189
|
+
/**
|
|
190
|
+
* Renderer-independent RefSubject state consumed by this component or operation.
|
|
191
|
+
* @since 1.0.0
|
|
192
|
+
* @category State connection
|
|
193
|
+
*/
|
|
194
|
+
readonly state: RefSubject.HydratedRefSubject<State, Schema.SchemaError>;
|
|
195
|
+
/**
|
|
196
|
+
* Renderable child content for the component host.
|
|
197
|
+
* @since 1.0.0
|
|
198
|
+
* @category Rendered content
|
|
199
|
+
*/
|
|
200
|
+
readonly content: Renderable.Any;
|
|
201
|
+
}
|
|
202
|
+
declare function triggerProps<const Options extends TriggerOptions>(options: Options): () => {
|
|
203
|
+
readonly type: "button";
|
|
204
|
+
readonly popovertarget: RefSubject.Computed<string, Schema.SchemaError, never>;
|
|
205
|
+
readonly popovertargetaction: "toggle";
|
|
206
|
+
readonly "aria-haspopup": "menu";
|
|
207
|
+
readonly "aria-expanded": RefSubject.Computed<boolean, Schema.SchemaError, never>;
|
|
208
|
+
readonly onkeydown: EventHandler.EventHandler<KeyboardEvent, never, never>;
|
|
209
|
+
readonly ref: import("./Dom/Refs.js").ComposedRef<RefSubject.HydratedRefSubject<State, Schema.SchemaError, never, never>, (element: globalThis.Element) => Effect.Effect<void, never, Scope.Scope>> | undefined;
|
|
210
|
+
};
|
|
211
|
+
type TriggerProps<Options extends TriggerOptions> = ReturnType<ReturnType<typeof triggerProps<Options>>>;
|
|
212
|
+
/**
|
|
213
|
+
* Renders a native button targeting menu popover content and opens the menu on ArrowDown.
|
|
214
|
+
*
|
|
215
|
+
* @remarks
|
|
216
|
+
* The returned Fx installs DOM refs, native listeners, state subscriptions, and optional
|
|
217
|
+
* collection registrations only when rendered. The rendering Scope removes those resources;
|
|
218
|
+
* unrelated nodes and attributes remain caller-owned.
|
|
219
|
+
*
|
|
220
|
+
* @since 1.0.0
|
|
221
|
+
* @category Opening a menu
|
|
222
|
+
*/
|
|
223
|
+
export declare function Trigger<const Options extends TriggerOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<Options, TriggerProps<Options>>, Options["content"], Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;
|
|
224
|
+
/**
|
|
225
|
+
* Consumer-facing alias of the canonical Menu component with identical behavior and lifetime.
|
|
226
|
+
*
|
|
227
|
+
* @remarks
|
|
228
|
+
* The alias acquires nothing. Rendering it has exactly the canonical component's Scope and DOM
|
|
229
|
+
* ownership contract.
|
|
230
|
+
*
|
|
231
|
+
* @since 1.0.0
|
|
232
|
+
* @category Opening a menu
|
|
233
|
+
*/
|
|
234
|
+
export declare const Button: typeof Trigger;
|
|
235
|
+
/**
|
|
236
|
+
* Inputs accepted by Menu.Content in addition to the shared DOM host options.
|
|
237
|
+
*
|
|
238
|
+
* @remarks
|
|
239
|
+
* The model makes popup content, optional collection navigation, and optional parent-menu linkage
|
|
240
|
+
* explicit while retaining the shared custom-host boundary.
|
|
241
|
+
*
|
|
242
|
+
* @since 1.0.0
|
|
243
|
+
* @category Menu surface
|
|
244
|
+
*/
|
|
245
|
+
export interface ContentOptions extends Dom.HostOptions<HTMLDivElement> {
|
|
246
|
+
/**
|
|
247
|
+
* Renderer-independent RefSubject state consumed by this component or operation.
|
|
248
|
+
* @since 1.0.0
|
|
249
|
+
* @category State connection
|
|
250
|
+
*/
|
|
251
|
+
readonly state: RefSubject.HydratedRefSubject<State, Schema.SchemaError>;
|
|
252
|
+
/**
|
|
253
|
+
* Item registry used for collection-driven keyboard behavior and mounted ordering.
|
|
254
|
+
* @since 1.0.0
|
|
255
|
+
* @category Item registration
|
|
256
|
+
*/
|
|
257
|
+
readonly collection?: RefSubject.RefSubject<Collection.State<string>>;
|
|
258
|
+
/**
|
|
259
|
+
* Parent-menu state and collection used for nested directional navigation and focus return.
|
|
260
|
+
* @since 1.0.0
|
|
261
|
+
* @category Nested menus
|
|
262
|
+
*/
|
|
263
|
+
readonly parent?: ParentMenu;
|
|
264
|
+
/**
|
|
265
|
+
* Renderable child content for the component host.
|
|
266
|
+
* @since 1.0.0
|
|
267
|
+
* @category Rendered content
|
|
268
|
+
*/
|
|
269
|
+
readonly content: Renderable.Any;
|
|
270
|
+
/**
|
|
271
|
+
* Accessible label rendered through aria-label.
|
|
272
|
+
* @since 1.0.0
|
|
273
|
+
* @category Accessible naming
|
|
274
|
+
*/
|
|
275
|
+
readonly label?: Renderable.Any<string | null | undefined>;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Public Menu.ParentMenu behavioral model.
|
|
279
|
+
*
|
|
280
|
+
* @remarks
|
|
281
|
+
* The public model lets custom composites reuse Menu's deterministic policy without copying an
|
|
282
|
+
* internal shape.
|
|
283
|
+
*
|
|
284
|
+
* @since 1.0.0
|
|
285
|
+
* @category Nested menus
|
|
286
|
+
*/
|
|
287
|
+
export interface ParentMenu {
|
|
288
|
+
/**
|
|
289
|
+
* Renderer-independent RefSubject state consumed by this component or operation.
|
|
290
|
+
* @since 1.0.0
|
|
291
|
+
* @category State connection
|
|
292
|
+
*/
|
|
293
|
+
readonly state: RefSubject.HydratedRefSubject<State, Schema.SchemaError>;
|
|
294
|
+
/**
|
|
295
|
+
* Item registry used for collection-driven keyboard behavior and mounted ordering.
|
|
296
|
+
* @since 1.0.0
|
|
297
|
+
* @category Item registration
|
|
298
|
+
*/
|
|
299
|
+
readonly collection: RefSubject.RefSubject<Collection.State<string>>;
|
|
300
|
+
/**
|
|
301
|
+
* Id of the trigger that owns this menu and receives focus when the menu closes.
|
|
302
|
+
* @since 1.0.0
|
|
303
|
+
* @category Nested menus
|
|
304
|
+
*/
|
|
305
|
+
readonly triggerId: string;
|
|
306
|
+
}
|
|
307
|
+
declare function contentProps<const Options extends ContentOptions>(options: Options): ({ property }: Dom.InternalPropsHelpers<Options>) => {
|
|
308
|
+
readonly id: RefSubject.Computed<string, Schema.SchemaError, never>;
|
|
309
|
+
readonly role: "menu";
|
|
310
|
+
readonly popover: "manual";
|
|
311
|
+
readonly "aria-label": Exclude<Dom.Property<Options, "label">, Dom.Nullish> | undefined;
|
|
312
|
+
readonly onkeydown: EventHandler.EventHandler<KeyboardEvent, Schema.SchemaError, never> | undefined;
|
|
313
|
+
readonly ontoggle: EventHandler.EventHandler<Event, Schema.SchemaError, never>;
|
|
314
|
+
readonly ref: import("./Dom/Refs.js").ComposedRef<RefSubject.HydratedRefSubject<State, Schema.SchemaError, never, never>, (element: HTMLElement) => Effect.Effect<void, Schema.SchemaError, Scope.Scope>> | undefined;
|
|
315
|
+
};
|
|
316
|
+
type ContentProps<Options extends ContentOptions> = ReturnType<ReturnType<typeof contentProps<Options>>>;
|
|
317
|
+
/**
|
|
318
|
+
* Renders manual-popover menu content and coordinates focus, typeahead, Escape, and nested-menu
|
|
319
|
+
* traversal.
|
|
320
|
+
*
|
|
321
|
+
* @remarks
|
|
322
|
+
* The returned Fx installs DOM refs, native listeners, state subscriptions, and optional
|
|
323
|
+
* collection registrations only when rendered. The rendering Scope removes those resources;
|
|
324
|
+
* unrelated nodes and attributes remain caller-owned.
|
|
325
|
+
*
|
|
326
|
+
* @since 1.0.0
|
|
327
|
+
* @category Menu surface
|
|
328
|
+
*/
|
|
329
|
+
export declare function Content<const Options extends ContentOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<Options, ContentProps<Options>>, Options["content"], Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;
|
|
330
|
+
/**
|
|
331
|
+
* Consumer-facing alias of the canonical Menu component with identical behavior and lifetime.
|
|
332
|
+
*
|
|
333
|
+
* @remarks
|
|
334
|
+
* The alias acquires nothing. Rendering it has exactly the canonical component's Scope and DOM
|
|
335
|
+
* ownership contract.
|
|
336
|
+
*
|
|
337
|
+
* @since 1.0.0
|
|
338
|
+
* @category Menu surface
|
|
339
|
+
*/
|
|
340
|
+
export declare const Menu: typeof Content;
|
|
341
|
+
/**
|
|
342
|
+
* Inputs accepted by Menu.Item in addition to the shared DOM host options.
|
|
343
|
+
*
|
|
344
|
+
* @remarks
|
|
345
|
+
* The model makes item identity, content, optional registration metadata, and state ownership
|
|
346
|
+
* explicit before the item is rendered.
|
|
347
|
+
*
|
|
348
|
+
* @since 1.0.0
|
|
349
|
+
* @category Commands
|
|
350
|
+
*/
|
|
351
|
+
export interface ItemOptions extends Dom.HostOptions<HTMLDivElement> {
|
|
352
|
+
/**
|
|
353
|
+
* Renderer-independent RefSubject state consumed by this component or operation.
|
|
354
|
+
* @since 1.0.0
|
|
355
|
+
* @category State connection
|
|
356
|
+
*/
|
|
357
|
+
readonly state: RefSubject.HydratedRefSubject<State, Schema.SchemaError>;
|
|
358
|
+
/**
|
|
359
|
+
* Item registry used for collection-driven keyboard behavior and mounted ordering.
|
|
360
|
+
* @since 1.0.0
|
|
361
|
+
* @category Item registration
|
|
362
|
+
*/
|
|
363
|
+
readonly collection?: RefSubject.RefSubject<Collection.State<string>>;
|
|
364
|
+
/**
|
|
365
|
+
* Stable id used for collection identity and ARIA relationships.
|
|
366
|
+
* @since 1.0.0
|
|
367
|
+
* @category Identity and relationships
|
|
368
|
+
*/
|
|
369
|
+
readonly id: string;
|
|
370
|
+
/**
|
|
371
|
+
* Renderable child content for the component host.
|
|
372
|
+
* @since 1.0.0
|
|
373
|
+
* @category Rendered content
|
|
374
|
+
*/
|
|
375
|
+
readonly content: Renderable.Any;
|
|
376
|
+
/**
|
|
377
|
+
* Search text used by typeahead independently of rendered markup.
|
|
378
|
+
* @since 1.0.0
|
|
379
|
+
* @category Text matching
|
|
380
|
+
*/
|
|
381
|
+
readonly textValue?: string;
|
|
382
|
+
/**
|
|
383
|
+
* Flag used by collection movement and widget handlers to skip activation by default.
|
|
384
|
+
* @since 1.0.0
|
|
385
|
+
* @category Availability
|
|
386
|
+
*/
|
|
387
|
+
readonly disabled?: boolean;
|
|
388
|
+
/**
|
|
389
|
+
* ARIA role emitted by the item variant.
|
|
390
|
+
* @since 1.0.0
|
|
391
|
+
* @category Command semantics
|
|
392
|
+
*/
|
|
393
|
+
readonly role?: "menuitem" | "menuitemcheckbox" | "menuitemradio";
|
|
394
|
+
/**
|
|
395
|
+
* Checked state exposed by checkbox and radio menu-item variants.
|
|
396
|
+
* @since 1.0.0
|
|
397
|
+
* @category Checked state
|
|
398
|
+
*/
|
|
399
|
+
readonly checked?: Renderable.Any<boolean | null | undefined>;
|
|
400
|
+
}
|
|
401
|
+
declare function itemProps<const Options extends ItemOptions>(options: Options): () => {
|
|
402
|
+
readonly id: string;
|
|
403
|
+
readonly role: "menuitem" | "menuitemcheckbox" | "menuitemradio";
|
|
404
|
+
readonly "aria-disabled": boolean;
|
|
405
|
+
readonly "aria-checked": boolean | Effect.Effect<boolean | null | undefined, any, any> | Fx<boolean | null | undefined, any, any> | RefSubject.HydrationRef<any, any> | import("@typed/template").Many<unknown, any, any> | readonly Renderable<never, any, any>[] | readonly Renderable<boolean | null | undefined, any, any>[] | import("effect/Stream").Stream<boolean | null | undefined, any, any> | {
|
|
406
|
+
readonly [key: string]: unknown;
|
|
407
|
+
} | undefined;
|
|
408
|
+
readonly tabindex: RefSubject.Computed<-1 | 0, Schema.SchemaError, never>;
|
|
409
|
+
readonly onclick: Effect.Effect<void, never, never> | Effect.Effect<State, Schema.SchemaError, never>;
|
|
410
|
+
readonly onfocus: Effect.Effect<State, Schema.SchemaError, never>;
|
|
411
|
+
readonly onmouseenter: Effect.Effect<State, Schema.SchemaError, never>;
|
|
412
|
+
readonly ref: ((element: Element & HTMLDivElement & RefSubject.HydrationElement) => Effect.Effect<void, any, any>) | undefined;
|
|
413
|
+
};
|
|
414
|
+
type ItemProps<Options extends ItemOptions> = ReturnType<ReturnType<typeof itemProps<Options>>>;
|
|
415
|
+
/**
|
|
416
|
+
* Renders and optionally registers a menu item; disabled items remain announced but do not
|
|
417
|
+
* activate.
|
|
418
|
+
*
|
|
419
|
+
* @remarks
|
|
420
|
+
* The returned Fx installs DOM refs, native listeners, state subscriptions, and optional
|
|
421
|
+
* collection registrations only when rendered. The rendering Scope removes those resources;
|
|
422
|
+
* unrelated nodes and attributes remain caller-owned.
|
|
423
|
+
*
|
|
424
|
+
* @since 1.0.0
|
|
425
|
+
* @category Commands
|
|
426
|
+
*/
|
|
427
|
+
export declare function Item<const Options extends ItemOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<Options, ItemProps<Options>>, Options["content"], Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;
|
|
428
|
+
/**
|
|
429
|
+
* Inputs accepted by Menu.SubmenuTrigger in addition to the shared DOM host options.
|
|
430
|
+
*
|
|
431
|
+
* @since 1.0.0
|
|
432
|
+
* @category Nested menus
|
|
433
|
+
*/
|
|
434
|
+
export interface SubmenuTriggerOptions<ParentState extends Composite.State> extends Dom.HostOptions<HTMLButtonElement> {
|
|
435
|
+
/**
|
|
436
|
+
* Renderer-independent RefSubject state consumed by this component or operation.
|
|
437
|
+
* @since 1.0.0
|
|
438
|
+
* @category State connection
|
|
439
|
+
*/
|
|
440
|
+
readonly state: RefSubject.HydratedRefSubject<ParentState, Schema.SchemaError>;
|
|
441
|
+
/**
|
|
442
|
+
* Whether the item participates as a submenu entry.
|
|
443
|
+
* @since 1.0.0
|
|
444
|
+
* @category Nested menus
|
|
445
|
+
*/
|
|
446
|
+
readonly submenu: RefSubject.HydratedRefSubject<State, Schema.SchemaError>;
|
|
447
|
+
/**
|
|
448
|
+
* Item registry used for collection-driven keyboard behavior and mounted ordering.
|
|
449
|
+
* @since 1.0.0
|
|
450
|
+
* @category Item registration
|
|
451
|
+
*/
|
|
452
|
+
readonly collection?: RefSubject.RefSubject<Collection.State<string>>;
|
|
453
|
+
/**
|
|
454
|
+
* Stable id used for collection identity and ARIA relationships.
|
|
455
|
+
* @since 1.0.0
|
|
456
|
+
* @category Identity and relationships
|
|
457
|
+
*/
|
|
458
|
+
readonly id: string;
|
|
459
|
+
/**
|
|
460
|
+
* Renderable child content for the component host.
|
|
461
|
+
* @since 1.0.0
|
|
462
|
+
* @category Rendered content
|
|
463
|
+
*/
|
|
464
|
+
readonly content: Renderable.Any;
|
|
465
|
+
/**
|
|
466
|
+
* Search text used by typeahead independently of rendered markup.
|
|
467
|
+
* @since 1.0.0
|
|
468
|
+
* @category Text matching
|
|
469
|
+
*/
|
|
470
|
+
readonly textValue?: string;
|
|
471
|
+
/**
|
|
472
|
+
* Flag used by collection movement and widget handlers to skip activation by default.
|
|
473
|
+
* @since 1.0.0
|
|
474
|
+
* @category Availability
|
|
475
|
+
*/
|
|
476
|
+
readonly disabled?: boolean;
|
|
477
|
+
}
|
|
478
|
+
declare function submenuTriggerProps<ParentState extends Composite.State, const Options extends SubmenuTriggerOptions<ParentState>>(options: Options): () => {
|
|
479
|
+
readonly id: string;
|
|
480
|
+
readonly type: "button";
|
|
481
|
+
readonly role: "menuitem";
|
|
482
|
+
readonly popovertarget: RefSubject.Computed<string, Schema.SchemaError, never>;
|
|
483
|
+
readonly popovertargetaction: "toggle";
|
|
484
|
+
readonly "aria-haspopup": "menu";
|
|
485
|
+
readonly "aria-expanded": RefSubject.Computed<boolean, Schema.SchemaError, never>;
|
|
486
|
+
readonly "aria-disabled": boolean;
|
|
487
|
+
readonly tabindex: RefSubject.Computed<-1 | 0, Schema.SchemaError, never>;
|
|
488
|
+
readonly onclick: Effect.Effect<void, never, never> | Effect.Effect<ParentState, Schema.SchemaError, never>;
|
|
489
|
+
readonly onfocus: Effect.Effect<ParentState, Schema.SchemaError, never>;
|
|
490
|
+
readonly onmouseenter: Effect.Effect<void, never, never> | Effect.Effect<State, Schema.SchemaError, never>;
|
|
491
|
+
readonly ref: ((element: Element & HTMLButtonElement & RefSubject.HydrationElement) => Effect.Effect<void, any, any>) | undefined;
|
|
492
|
+
};
|
|
493
|
+
type SubmenuTriggerProps<ParentState extends Composite.State, Options extends SubmenuTriggerOptions<ParentState>> = ReturnType<ReturnType<typeof submenuTriggerProps<ParentState, Options>>>;
|
|
494
|
+
/**
|
|
495
|
+
* Renders a menuitem that targets nested popover content and coordinates parent/child directional
|
|
496
|
+
* focus.
|
|
497
|
+
*
|
|
498
|
+
* @remarks
|
|
499
|
+
* The returned Fx installs DOM refs, native listeners, state subscriptions, and optional
|
|
500
|
+
* collection registrations only when rendered. The rendering Scope removes those resources;
|
|
501
|
+
* unrelated nodes and attributes remain caller-owned.
|
|
502
|
+
*
|
|
503
|
+
* @since 1.0.0
|
|
504
|
+
* @category Nested menus
|
|
505
|
+
*/
|
|
506
|
+
export declare function SubmenuTrigger<ParentState extends Composite.State, const Options extends SubmenuTriggerOptions<NoInfer<ParentState>>, const Host extends HostResult = never>(options: Options & {
|
|
507
|
+
readonly state: RefSubject.HydratedRefSubject<ParentState, Schema.SchemaError>;
|
|
508
|
+
}, host?: Dom.HostOverride<Dom.RenderHostProps<Options, SubmenuTriggerProps<ParentState, Options>>, Options["content"], Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;
|
|
509
|
+
/**
|
|
510
|
+
* Inputs accepted by Menu.CheckboxItem in addition to the shared DOM host options.
|
|
511
|
+
*
|
|
512
|
+
* @since 1.0.0
|
|
513
|
+
* @category Checked commands
|
|
514
|
+
*/
|
|
515
|
+
export interface CheckboxItemOptions extends Omit<ItemOptions, "role" | "checked"> {
|
|
516
|
+
/**
|
|
517
|
+
* Checked state exposed by checkbox and radio menu-item variants.
|
|
518
|
+
* @since 1.0.0
|
|
519
|
+
* @category Checked state
|
|
520
|
+
*/
|
|
521
|
+
readonly checked: Renderable.Any<boolean | null | undefined>;
|
|
522
|
+
}
|
|
523
|
+
type CheckboxItemWithRole<Options extends CheckboxItemOptions> = Options & {
|
|
524
|
+
readonly role: "menuitemcheckbox";
|
|
525
|
+
};
|
|
526
|
+
/**
|
|
527
|
+
* Renders Item with menuitemcheckbox semantics and caller-supplied checked state.
|
|
528
|
+
*
|
|
529
|
+
* @remarks
|
|
530
|
+
* The returned Fx installs DOM refs, native listeners, state subscriptions, and optional
|
|
531
|
+
* collection registrations only when rendered. The rendering Scope removes those resources;
|
|
532
|
+
* unrelated nodes and attributes remain caller-owned.
|
|
533
|
+
*
|
|
534
|
+
* @since 1.0.0
|
|
535
|
+
* @category Checked commands
|
|
536
|
+
*/
|
|
537
|
+
export declare function CheckboxItem<const Options extends CheckboxItemOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<CheckboxItemWithRole<Options>, ItemProps<CheckboxItemWithRole<Options>>>, Options["content"], Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;
|
|
538
|
+
/**
|
|
539
|
+
* Inputs accepted by Menu.RadioItem in addition to the shared DOM host options.
|
|
540
|
+
*
|
|
541
|
+
* @since 1.0.0
|
|
542
|
+
* @category Checked commands
|
|
543
|
+
*/
|
|
544
|
+
export interface RadioItemOptions extends Omit<ItemOptions, "role" | "checked"> {
|
|
545
|
+
/**
|
|
546
|
+
* Checked state exposed by checkbox and radio menu-item variants.
|
|
547
|
+
* @since 1.0.0
|
|
548
|
+
* @category Checked state
|
|
549
|
+
*/
|
|
550
|
+
readonly checked: Renderable.Any<boolean | null | undefined>;
|
|
551
|
+
}
|
|
552
|
+
type RadioItemWithRole<Options extends RadioItemOptions> = Options & {
|
|
553
|
+
readonly role: "menuitemradio";
|
|
554
|
+
};
|
|
555
|
+
/**
|
|
556
|
+
* Renders Item with menuitemradio semantics and caller-supplied checked state.
|
|
557
|
+
*
|
|
558
|
+
* @remarks
|
|
559
|
+
* The returned Fx installs DOM refs, native listeners, state subscriptions, and optional
|
|
560
|
+
* collection registrations only when rendered. The rendering Scope removes those resources;
|
|
561
|
+
* unrelated nodes and attributes remain caller-owned.
|
|
562
|
+
*
|
|
563
|
+
* @since 1.0.0
|
|
564
|
+
* @category Checked commands
|
|
565
|
+
*/
|
|
566
|
+
export declare function RadioItem<const Options extends RadioItemOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<RadioItemWithRole<Options>, ItemProps<RadioItemWithRole<Options>>>, Options["content"], Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;
|
|
567
|
+
/**
|
|
568
|
+
* Inputs accepted by Menu.Group in addition to the shared DOM host options.
|
|
569
|
+
*
|
|
570
|
+
* @since 1.0.0
|
|
571
|
+
* @category Command grouping
|
|
572
|
+
*/
|
|
573
|
+
export interface GroupOptions extends Dom.HostOptions<HTMLDivElement> {
|
|
574
|
+
/**
|
|
575
|
+
* Renderable child content for the component host.
|
|
576
|
+
* @since 1.0.0
|
|
577
|
+
* @category Rendered content
|
|
578
|
+
*/
|
|
579
|
+
readonly content: Renderable.Any;
|
|
580
|
+
/**
|
|
581
|
+
* Accessible label rendered through aria-label.
|
|
582
|
+
* @since 1.0.0
|
|
583
|
+
* @category Accessible naming
|
|
584
|
+
*/
|
|
585
|
+
readonly label?: Renderable.Any<string | null | undefined>;
|
|
586
|
+
}
|
|
587
|
+
declare function groupProps<const Options extends GroupOptions>(_options: Options): ({ property }: Dom.InternalPropsHelpers<Options>) => {
|
|
588
|
+
readonly role: "group";
|
|
589
|
+
readonly "aria-label": Exclude<Dom.Property<Options, "label">, Dom.Nullish> | undefined;
|
|
590
|
+
};
|
|
591
|
+
type GroupProps<Options extends GroupOptions> = ReturnType<ReturnType<typeof groupProps<Options>>>;
|
|
592
|
+
/**
|
|
593
|
+
* Renders a labelled ARIA group inside menu content.
|
|
594
|
+
*
|
|
595
|
+
* @remarks
|
|
596
|
+
* The returned Fx installs DOM refs, native listeners, state subscriptions, and optional
|
|
597
|
+
* collection registrations only when rendered. The rendering Scope removes those resources;
|
|
598
|
+
* unrelated nodes and attributes remain caller-owned.
|
|
599
|
+
*
|
|
600
|
+
* @example
|
|
601
|
+
* ```ts
|
|
602
|
+
* import * as Menu from "@typed/ui/Menu";
|
|
603
|
+
*
|
|
604
|
+
* const view = Menu.Group({ label: "View", content: "Choices" });
|
|
605
|
+
* ```
|
|
606
|
+
* @since 1.0.0
|
|
607
|
+
* @category Command grouping
|
|
608
|
+
*/
|
|
609
|
+
export declare function Group<const Options extends GroupOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<Options, GroupProps<Options>>, Options["content"], Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;
|
|
610
|
+
/**
|
|
611
|
+
* Consumer-facing alias of the canonical Menu component with identical behavior and lifetime.
|
|
612
|
+
*
|
|
613
|
+
* @remarks
|
|
614
|
+
* The alias acquires nothing. Rendering it has exactly the canonical component's Scope and DOM
|
|
615
|
+
* ownership contract.
|
|
616
|
+
*
|
|
617
|
+
* @since 1.0.0
|
|
618
|
+
* @category Commands
|
|
619
|
+
*/
|
|
620
|
+
export declare const Dismiss: typeof Item;
|
|
621
|
+
/**
|
|
622
|
+
* Inputs accepted by Menu.Separator in addition to the shared DOM host options.
|
|
623
|
+
*
|
|
624
|
+
* @remarks
|
|
625
|
+
* The model adds separator orientation to the shared host options. Orientation is consumed only
|
|
626
|
+
* by the separator's `aria-orientation` attribute; it does not change menu navigation.
|
|
627
|
+
*
|
|
628
|
+
* @since 1.0.0
|
|
629
|
+
* @category Command grouping
|
|
630
|
+
*/
|
|
631
|
+
export interface SeparatorOptions extends Dom.HostOptions<HTMLHRElement> {
|
|
632
|
+
/**
|
|
633
|
+
* Value forwarded only to the separator's aria-orientation attribute.
|
|
634
|
+
* @since 1.0.0
|
|
635
|
+
* @category Keyboard navigation
|
|
636
|
+
*/
|
|
637
|
+
readonly orientation?: "horizontal" | "vertical";
|
|
638
|
+
}
|
|
639
|
+
declare function separatorProps<const Options extends SeparatorOptions>(_options: Options): ({ property }: Dom.InternalPropsHelpers<Options>) => {
|
|
640
|
+
readonly role: "separator";
|
|
641
|
+
readonly "aria-orientation": "horizontal" | Exclude<Dom.Property<Options, "orientation">, Dom.Nullish>;
|
|
642
|
+
};
|
|
643
|
+
type SeparatorProps<Options extends SeparatorOptions> = ReturnType<ReturnType<typeof separatorProps<Options>>>;
|
|
644
|
+
/**
|
|
645
|
+
* Renders a separator with explicit horizontal or vertical orientation.
|
|
646
|
+
*
|
|
647
|
+
* @remarks
|
|
648
|
+
* The returned Fx installs DOM refs, native listeners, state subscriptions, and optional
|
|
649
|
+
* collection registrations only when rendered. The rendering Scope removes those resources;
|
|
650
|
+
* unrelated nodes and attributes remain caller-owned.
|
|
651
|
+
*
|
|
652
|
+
* @example
|
|
653
|
+
* ```ts
|
|
654
|
+
* import * as Menu from "@typed/ui/Menu";
|
|
655
|
+
*
|
|
656
|
+
* const view = Menu.Separator({ orientation: "horizontal" });
|
|
657
|
+
* ```
|
|
658
|
+
* @since 1.0.0
|
|
659
|
+
* @category Command grouping
|
|
660
|
+
*/
|
|
661
|
+
export declare function Separator<const Options extends SeparatorOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<Options, SeparatorProps<Options>>, "", Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;
|
|
662
|
+
export {};
|
|
663
|
+
//# sourceMappingURL=Menu.d.ts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