foldkit 0.97.1 → 0.98.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/devTools/webSocketBridge.d.ts +5 -1
- package/dist/devTools/webSocketBridge.d.ts.map +1 -1
- package/dist/devTools/webSocketBridge.js +11 -6
- package/dist/html/index.d.ts +4 -21
- package/dist/html/index.d.ts.map +1 -1
- package/dist/html/index.js +4 -21
- package/dist/html/public.d.ts +1 -1
- package/dist/html/public.d.ts.map +1 -1
- package/dist/mount/index.d.ts +194 -33
- package/dist/mount/index.d.ts.map +1 -1
- package/dist/mount/index.js +42 -6
- package/dist/mount/public.d.ts +1 -1
- package/dist/mount/public.d.ts.map +1 -1
- package/dist/mount/public.js +1 -1
- package/dist/test/apps/mountPanel.d.ts.map +1 -1
- package/dist/test/apps/mountPanel.js +4 -13
- package/dist/ui/combobox/shared.d.ts.map +1 -1
- package/dist/ui/combobox/shared.js +43 -41
- package/dist/ui/listbox/shared.d.ts.map +1 -1
- package/dist/ui/listbox/shared.js +7 -7
- package/dist/ui/menu/index.d.ts.map +1 -1
- package/dist/ui/menu/index.js +6 -6
- package/dist/ui/popover/index.d.ts.map +1 -1
- package/dist/ui/popover/index.js +7 -7
- package/dist/ui/tooltip/index.d.ts.map +1 -1
- package/dist/ui/tooltip/index.js +4 -4
- package/package.json +1 -1
package/dist/mount/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Context, Effect, Schema } from 'effect';
|
|
2
|
-
import type { MountResult } from '../html/index.js';
|
|
1
|
+
import { Context, Effect, Schema, Scope, Stream } from 'effect';
|
|
3
2
|
declare const MountTracker_base: Context.ServiceClass<MountTracker, "@foldkit/MountTracker", {
|
|
4
3
|
readonly started: (name: string, args?: Record<string, unknown>) => void;
|
|
5
4
|
readonly ended: (name: string, args?: Record<string, unknown>) => void;
|
|
@@ -16,15 +15,21 @@ export declare class MountTracker extends MountTracker_base {
|
|
|
16
15
|
export declare const MountDefinitionTypeId: unique symbol;
|
|
17
16
|
/** Type-level brand for MountDefinition values. */
|
|
18
17
|
export type MountDefinitionTypeId = typeof MountDefinitionTypeId;
|
|
19
|
-
/** A named, type-constrained
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
18
|
+
/** A named, type-constrained per-element side effect, optionally carrying the
|
|
19
|
+
* args used to construct it. The runtime invokes `f` with the live `Element`
|
|
20
|
+
* when the element mounts, and dispatches each Message emitted by the
|
|
21
|
+
* returned Stream. The Stream's scope is tied to the element's lifetime: when
|
|
22
|
+
* the element unmounts, the runtime interrupts the fiber, which closes the
|
|
23
|
+
* Stream's scope and runs any registered `acquireRelease` finalizers.
|
|
24
|
+
*
|
|
25
|
+
* Authors typically don't construct Stream-returning factories directly.
|
|
26
|
+
* `Mount.define` wraps an `Effect<Message>` for the one-shot case; only
|
|
27
|
+
* `Mount.defineStream` exposes the raw Stream shape for continuous-event
|
|
28
|
+
* cases. */
|
|
24
29
|
export type MountAction<Message, E = never> = Readonly<{
|
|
25
30
|
name: string;
|
|
26
31
|
args?: Record<string, unknown>;
|
|
27
|
-
f: (element: Element) =>
|
|
32
|
+
f: (element: Element) => Stream.Stream<Message, E>;
|
|
28
33
|
}>;
|
|
29
34
|
/** A Mount definition for a Mount with no declared args. Call as `Definition()` to produce a MountAction. */
|
|
30
35
|
export interface MountDefinitionNoArgs<Name extends string, ResultMessage> {
|
|
@@ -32,7 +37,7 @@ export interface MountDefinitionNoArgs<Name extends string, ResultMessage> {
|
|
|
32
37
|
readonly name: Name;
|
|
33
38
|
(): Readonly<{
|
|
34
39
|
name: Name;
|
|
35
|
-
f: (element: Element) =>
|
|
40
|
+
f: (element: Element) => Stream.Stream<ResultMessage>;
|
|
36
41
|
}>;
|
|
37
42
|
}
|
|
38
43
|
/** A Mount definition for a Mount with declared args. Call as `Definition(args)` to produce a MountAction. */
|
|
@@ -42,30 +47,71 @@ export interface MountDefinitionWithArgs<Name extends string, Fields extends Sch
|
|
|
42
47
|
(args: Schema.Schema.Type<Schema.Struct<Fields>>): Readonly<{
|
|
43
48
|
name: Name;
|
|
44
49
|
args: Schema.Schema.Type<Schema.Struct<Fields>>;
|
|
45
|
-
f: (element: Element) =>
|
|
50
|
+
f: (element: Element) => Stream.Stream<ResultMessage>;
|
|
46
51
|
}>;
|
|
47
52
|
}
|
|
48
|
-
/** A Mount definition created with `Mount.define
|
|
49
|
-
* with-args shapes; consumers that only need
|
|
53
|
+
/** A Mount definition created with `Mount.define` or `Mount.defineStream`.
|
|
54
|
+
* Union over the no-args and with-args shapes; consumers that only need
|
|
55
|
+
* name/identity can accept this. */
|
|
50
56
|
export type MountDefinition<Name extends string = string, ResultMessage = any> = MountDefinitionNoArgs<Name, ResultMessage> | MountDefinitionWithArgs<Name, any, ResultMessage>;
|
|
51
57
|
/**
|
|
52
|
-
* Defines a Mount.
|
|
53
|
-
*
|
|
58
|
+
* Defines a one-shot Mount. The factory returns `Effect<Message>` that runs
|
|
59
|
+
* once when the element mounts and produces exactly one Message. Cleanup
|
|
60
|
+
* composes via `Effect.acquireRelease` inside the Effect: registered
|
|
61
|
+
* finalizers run when the element unmounts. The Mount's scope stays open
|
|
62
|
+
* across the element's full lifetime, even after the Effect completes.
|
|
63
|
+
*
|
|
64
|
+
* Two forms, distinguished by whether the second argument is a Schema (a
|
|
65
|
+
* result message) or a record of Schemas (the args declaration). Cleanup is
|
|
66
|
+
* asynchronous with respect to snabbdom's `destroy` hook: the runtime forks
|
|
67
|
+
* `Fiber.interrupt` and returns immediately, so finalizers run on a separate
|
|
68
|
+
* fiber after `destroy` has already completed. For idempotent DOM operations
|
|
69
|
+
* (`element.remove()`, observer `disconnect()`, `removeEventListener`) this
|
|
70
|
+
* is fine; if your cleanup has ordering requirements relative to other DOM
|
|
71
|
+
* removals, prefer doing the imperative work synchronously inside `acquire`
|
|
72
|
+
* and using `release` only for self-contained teardown.
|
|
73
|
+
*
|
|
74
|
+
* **Construct resources INSIDE the acquire body, never before it.**
|
|
75
|
+
* `Effect.acquireRelease` only guarantees atomicity of "acquire body
|
|
76
|
+
* completes → release is registered". If you construct a handle before
|
|
77
|
+
* calling `acquireRelease` and your acquire body just returns that handle
|
|
78
|
+
* (`Effect.sync(() => alreadyExistingValue)`), interruption between the
|
|
79
|
+
* construction and the registration leaks the handle. For third-party
|
|
80
|
+
* library instantiation, express the construction as the success value of
|
|
81
|
+
* the acquire Effect: `Effect.tryPromise(() => import(...)).pipe(Effect.map(...))`
|
|
82
|
+
* for async imports, `Effect.sync(() => new Thing(...))` for sync
|
|
83
|
+
* construction. The discipline: whatever the release function needs as
|
|
84
|
+
* input must be the success value of the acquire Effect.
|
|
54
85
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
86
|
+
* Use this form whenever a Mount produces a single Message at acquire and
|
|
87
|
+
* holds lifecycle-scoped resources for the element's lifetime. For Mounts
|
|
88
|
+
* that emit a continuum of events (scroll listeners, IntersectionObservers,
|
|
89
|
+
* MutationObservers), reach for `Mount.defineStream`.
|
|
58
90
|
*
|
|
59
|
-
* @example
|
|
91
|
+
* @example One-shot, no cleanup (read element geometry on mount)
|
|
60
92
|
* ```ts
|
|
61
|
-
* const
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
93
|
+
* const MeasurePanelWidth = Mount.define(
|
|
94
|
+
* 'MeasurePanelWidth',
|
|
95
|
+
* MeasuredPanelWidth,
|
|
96
|
+
* )(element =>
|
|
97
|
+
* Effect.sync(() =>
|
|
98
|
+
* MeasuredPanelWidth({ width: element.getBoundingClientRect().width }),
|
|
99
|
+
* ),
|
|
100
|
+
* )
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* @example One-shot with cleanup (portal-to-body)
|
|
104
|
+
* ```ts
|
|
105
|
+
* const PortalToBody = Mount.define('PortalToBody', CompletedPortalToBody)(
|
|
106
|
+
* element =>
|
|
107
|
+
* Effect.gen(function* () {
|
|
108
|
+
* yield* Effect.acquireRelease(
|
|
109
|
+
* Effect.sync(() => document.body.appendChild(element)),
|
|
110
|
+
* () => Effect.sync(() => element.remove()),
|
|
111
|
+
* )
|
|
112
|
+
* return CompletedPortalToBody()
|
|
113
|
+
* }),
|
|
66
114
|
* )
|
|
67
|
-
* // Call site:
|
|
68
|
-
* OnMount(FocusInput())
|
|
69
115
|
* ```
|
|
70
116
|
*
|
|
71
117
|
* @example With args
|
|
@@ -75,19 +121,134 @@ export type MountDefinition<Name extends string = string, ResultMessage = any> =
|
|
|
75
121
|
* { buttonId: S.String, anchor: AnchorConfig },
|
|
76
122
|
* CompletedAnchorPopover,
|
|
77
123
|
* )(({ buttonId, anchor }) => element =>
|
|
78
|
-
* Effect.
|
|
79
|
-
*
|
|
80
|
-
*
|
|
124
|
+
* Effect.gen(function* () {
|
|
125
|
+
* yield* Effect.acquireRelease(
|
|
126
|
+
* Effect.sync(() => anchorSetup({ buttonId, anchor })(element)),
|
|
127
|
+
* cleanup => Effect.sync(cleanup),
|
|
128
|
+
* )
|
|
129
|
+
* return CompletedAnchorPopover()
|
|
81
130
|
* }),
|
|
82
131
|
* )
|
|
83
|
-
* // Call site:
|
|
84
|
-
* AnchorPopover({ buttonId: `${id}-button`, anchor })
|
|
85
132
|
* ```
|
|
133
|
+
*
|
|
134
|
+
* **Args are captured at mount, not refreshed across renders.** The factory
|
|
135
|
+
* runs once when the element enters the DOM. Subsequent renders construct
|
|
136
|
+
* fresh `MountAction` values with updated arg values, but those values are
|
|
137
|
+
* captured in closures that never execute. `OnMount` only binds to
|
|
138
|
+
* snabbdom's `insert` and `destroy` hooks; there is no `update` hook in
|
|
139
|
+
* between. Name args to reflect this. Prefer `initialScroll` over
|
|
140
|
+
* `currentScroll` for values whose role is to seed state at mount time.
|
|
141
|
+
*
|
|
142
|
+
* If you need Model changes to drive ongoing DOM behavior post-mount, the
|
|
143
|
+
* proximate cause is the Message that updated the Model. Dispatch a Command
|
|
144
|
+
* from `update`'s handler for that Message. The Command can find the
|
|
145
|
+
* element and do the imperative work. Don't reach for a Subscription here.
|
|
146
|
+
* Subscriptions watch Model state via `modelToDependencies` to gate their
|
|
147
|
+
* lifetime, but their emissions come from external event sources (timers,
|
|
148
|
+
* document events, library callbacks), not from Model state itself.
|
|
149
|
+
* Translating Model changes into side effects is what `update` does on
|
|
150
|
+
* every Message, via the Commands it returns. (Subscriptions do legitimately
|
|
151
|
+
* touch the DOM in some contexts: calling `preventDefault` in an event
|
|
152
|
+
* handler where going through `update` would arrive too late, or
|
|
153
|
+
* maintaining DOM state for as long as a Model condition is true (like
|
|
154
|
+
* applying `user-select: none` to the document while a drag is in progress
|
|
155
|
+
* and undoing it when the drag ends).)
|
|
156
|
+
*/
|
|
157
|
+
export declare function define<const Name extends string, Results extends ReadonlyArray<Schema.Top>>(name: Name, ...results: Results): (factory: (element: Element) => Effect.Effect<Schema.Schema.Type<Results[number]>, never, Scope.Scope>) => MountDefinitionNoArgs<Name, Schema.Schema.Type<Results[number]>>;
|
|
158
|
+
export declare function define<const Name extends string, Fields extends Schema.Struct.Fields, Results extends ReadonlyArray<Schema.Top>>(name: Name, args: Fields, ...results: Results): (factoryBuilder: (args: Schema.Schema.Type<Schema.Struct<Fields>>) => (element: Element) => Effect.Effect<Schema.Schema.Type<Results[number]>, never, Scope.Scope>) => MountDefinitionWithArgs<Name, Fields, Schema.Schema.Type<Results[number]>>;
|
|
159
|
+
/**
|
|
160
|
+
* Defines a streaming Mount. The factory returns `Stream<Message>` whose
|
|
161
|
+
* lifetime is bound to the element's lifetime: each emitted Message is
|
|
162
|
+
* dispatched, and the Stream's scope is closed (running any registered
|
|
163
|
+
* `Effect.acquireRelease` finalizers) when the element unmounts. Use this
|
|
164
|
+
* form when the Mount emits a continuum of events from observers or
|
|
165
|
+
* listeners attached to the element.
|
|
166
|
+
*
|
|
167
|
+
* Two forms, distinguished by whether the second argument is a Schema or a
|
|
168
|
+
* record of Schemas (the args declaration). Cleanup timing relative to
|
|
169
|
+
* snabbdom's `destroy` hook is the same as `Mount.define` (asynchronous via
|
|
170
|
+
* `Fiber.interrupt`).
|
|
171
|
+
*
|
|
172
|
+
* For a Mount that produces exactly one Message at acquire and then holds
|
|
173
|
+
* lifecycle-scoped resources, prefer `Mount.define` with `Effect<Message>`.
|
|
174
|
+
* That form encodes "exactly one Message" in the type system and avoids the
|
|
175
|
+
* `Stream.callback` + `Queue.offerUnsafe` + `Effect.never` ceremony required
|
|
176
|
+
* here. Reserve `defineStream` for cases that genuinely emit a stream of
|
|
177
|
+
* events.
|
|
178
|
+
*
|
|
179
|
+
* @example Continuous scroll events from an element
|
|
180
|
+
* ```ts
|
|
181
|
+
* const SyncSidebarScroll = Mount.defineStream(
|
|
182
|
+
* 'SyncSidebarScroll',
|
|
183
|
+
* ScrolledSidebar,
|
|
184
|
+
* )(element =>
|
|
185
|
+
* Stream.callback<typeof ScrolledSidebar.Type>(queue =>
|
|
186
|
+
* Effect.gen(function* () {
|
|
187
|
+
* yield* Effect.acquireRelease(
|
|
188
|
+
* Effect.sync(() => {
|
|
189
|
+
* const handler = () =>
|
|
190
|
+
* Queue.offerUnsafe(
|
|
191
|
+
* queue,
|
|
192
|
+
* ScrolledSidebar({ scroll: element.scrollTop }),
|
|
193
|
+
* )
|
|
194
|
+
* element.addEventListener('scroll', handler, { passive: true })
|
|
195
|
+
* return handler
|
|
196
|
+
* }),
|
|
197
|
+
* handler =>
|
|
198
|
+
* Effect.sync(() =>
|
|
199
|
+
* element.removeEventListener('scroll', handler),
|
|
200
|
+
* ),
|
|
201
|
+
* )
|
|
202
|
+
* return yield* Effect.never
|
|
203
|
+
* }),
|
|
204
|
+
* ),
|
|
205
|
+
* )
|
|
206
|
+
* ```
|
|
207
|
+
*
|
|
208
|
+
* @example IntersectionObserver events
|
|
209
|
+
* ```ts
|
|
210
|
+
* const ObserveHeroVisibility = Mount.defineStream(
|
|
211
|
+
* 'ObserveHeroVisibility',
|
|
212
|
+
* ChangedHeroVisibility,
|
|
213
|
+
* )(element =>
|
|
214
|
+
* Stream.callback<typeof ChangedHeroVisibility.Type>(queue =>
|
|
215
|
+
* Effect.gen(function* () {
|
|
216
|
+
* yield* Effect.acquireRelease(
|
|
217
|
+
* Effect.sync(() => {
|
|
218
|
+
* const observer = new IntersectionObserver(entries => {
|
|
219
|
+
* pipe(
|
|
220
|
+
* Array.head(entries),
|
|
221
|
+
* Option.match({
|
|
222
|
+
* onNone: Function.constVoid,
|
|
223
|
+
* onSome: entry =>
|
|
224
|
+
* Queue.offerUnsafe(
|
|
225
|
+
* queue,
|
|
226
|
+
* ChangedHeroVisibility({
|
|
227
|
+
* isVisible: entry.isIntersecting,
|
|
228
|
+
* }),
|
|
229
|
+
* ),
|
|
230
|
+
* }),
|
|
231
|
+
* )
|
|
232
|
+
* })
|
|
233
|
+
* observer.observe(element)
|
|
234
|
+
* return observer
|
|
235
|
+
* }),
|
|
236
|
+
* observer => Effect.sync(() => observer.disconnect()),
|
|
237
|
+
* )
|
|
238
|
+
* return yield* Effect.never
|
|
239
|
+
* }),
|
|
240
|
+
* ),
|
|
241
|
+
* )
|
|
242
|
+
* ```
|
|
243
|
+
*
|
|
244
|
+
* The args-captured-at-mount and Subscriptions-vs-Mount guidance from
|
|
245
|
+
* `Mount.define` apply identically here. See that constructor's docs for
|
|
246
|
+
* the mental model.
|
|
86
247
|
*/
|
|
87
|
-
export declare function
|
|
88
|
-
export declare function
|
|
248
|
+
export declare function defineStream<const Name extends string, Results extends ReadonlyArray<Schema.Top>>(name: Name, ...results: Results): (factory: (element: Element) => Stream.Stream<Schema.Schema.Type<Results[number]>, never, never>) => MountDefinitionNoArgs<Name, Schema.Schema.Type<Results[number]>>;
|
|
249
|
+
export declare function defineStream<const Name extends string, Fields extends Schema.Struct.Fields, Results extends ReadonlyArray<Schema.Top>>(name: Name, args: Fields, ...results: Results): (factoryBuilder: (args: Schema.Schema.Type<Schema.Struct<Fields>>) => (element: Element) => Stream.Stream<Schema.Schema.Type<Results[number]>, never, never>) => MountDefinitionWithArgs<Name, Fields, Schema.Schema.Type<Results[number]>>;
|
|
89
250
|
/** Lifts a `MountAction` from one Message universe to another by mapping its
|
|
90
|
-
* dispatched
|
|
251
|
+
* dispatched Messages through a transform. Used by Submodel components to
|
|
91
252
|
* emit lifecycle action results into the parent's Message union via the
|
|
92
253
|
* consumer-supplied `toParentMessage` lift. Preserves `name` and `args`. */
|
|
93
254
|
export declare const mapMessage: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mount/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,MAAM,EAIN,MAAM,EACN,KAAK,EACL,MAAM,EACP,MAAM,QAAQ,CAAA;;sBAWO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI;oBACxD,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI;;AAV1E;;;;;4CAK4C;AAC5C,qBAAa,YAAa,SAAQ,iBAMN;CAAG;AAE/B,mDAAmD;AAEnD,eAAO,MAAM,qBAAqB,EAAE,OAAO,MAEN,CAAA;AAErC,mDAAmD;AACnD,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAA;AAEhE;;;;;;;;;;aAUa;AACb,MAAM,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK,IAAI,QAAQ,CAAC;IACrD,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC,MAAM,CAA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AAC,CAAC,EAAE,CAAC,EACH,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,GACnB,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACtD,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CAU9E,CAAA"}
|
package/dist/mount/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Context, Effect, Function, Predicate, Schema } from 'effect';
|
|
1
|
+
import { Context, Effect, Function, Predicate, Queue, Schema, Stream, } from 'effect';
|
|
2
2
|
/** Effect service tag that observes Mount lifecycle events. The runtime
|
|
3
3
|
* provides an implementation that buffers events for DevTools history;
|
|
4
4
|
* the OnMount snabbdom hooks call `started` synchronously when an element
|
|
@@ -10,7 +10,46 @@ export class MountTracker extends Context.Service()('@foldkit/MountTracker') {
|
|
|
10
10
|
/** Type-level brand for MountDefinition values. */
|
|
11
11
|
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
12
12
|
export const MountDefinitionTypeId = Symbol.for('foldkit/MountDefinition');
|
|
13
|
+
const wrapEffectAsStream = (factory) => (element) => Stream.callback(queue => Effect.gen(function* () {
|
|
14
|
+
const message = yield* factory(element);
|
|
15
|
+
Queue.offerUnsafe(queue, message);
|
|
16
|
+
return yield* Effect.never;
|
|
17
|
+
}));
|
|
13
18
|
export function define(name, ...rest) {
|
|
19
|
+
const [maybeArgs] = rest;
|
|
20
|
+
const isArgsRecord = Predicate.isObject(maybeArgs) && !Schema.isSchema(maybeArgs);
|
|
21
|
+
if (isArgsRecord) {
|
|
22
|
+
return (factoryBuilder) => {
|
|
23
|
+
const definition = (args) => ({
|
|
24
|
+
name,
|
|
25
|
+
args,
|
|
26
|
+
f: wrapEffectAsStream(factoryBuilder(args)),
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(definition, 'name', {
|
|
29
|
+
value: name,
|
|
30
|
+
configurable: true,
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(definition, MountDefinitionTypeId, {
|
|
33
|
+
value: MountDefinitionTypeId,
|
|
34
|
+
});
|
|
35
|
+
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
36
|
+
return definition;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
return (factory) => {
|
|
40
|
+
const definition = () => ({ name, f: wrapEffectAsStream(factory) });
|
|
41
|
+
Object.defineProperty(definition, 'name', {
|
|
42
|
+
value: name,
|
|
43
|
+
configurable: true,
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(definition, MountDefinitionTypeId, {
|
|
46
|
+
value: MountDefinitionTypeId,
|
|
47
|
+
});
|
|
48
|
+
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
|
|
49
|
+
return definition;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export function defineStream(name, ...rest) {
|
|
14
53
|
const [maybeArgs] = rest;
|
|
15
54
|
const isArgsRecord = Predicate.isObject(maybeArgs) && !Schema.isSchema(maybeArgs);
|
|
16
55
|
if (isArgsRecord) {
|
|
@@ -45,13 +84,10 @@ export function define(name, ...rest) {
|
|
|
45
84
|
};
|
|
46
85
|
}
|
|
47
86
|
/** Lifts a `MountAction` from one Message universe to another by mapping its
|
|
48
|
-
* dispatched
|
|
87
|
+
* dispatched Messages through a transform. Used by Submodel components to
|
|
49
88
|
* emit lifecycle action results into the parent's Message union via the
|
|
50
89
|
* consumer-supplied `toParentMessage` lift. Preserves `name` and `args`. */
|
|
51
90
|
export const mapMessage = Function.dual(2, (action, f) => ({
|
|
52
91
|
...action,
|
|
53
|
-
f: (element) => action.f(element).pipe(
|
|
54
|
-
message: f(message),
|
|
55
|
-
cleanup,
|
|
56
|
-
}))),
|
|
92
|
+
f: (element) => action.f(element).pipe(Stream.map(f)),
|
|
57
93
|
}));
|
package/dist/mount/public.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export type { MountAction, MountDefinition, MountDefinitionNoArgs, MountDefinitionWithArgs, } from './index.js';
|
|
2
|
-
export { MountDefinitionTypeId, MountTracker, define, mapMessage, } from './index.js';
|
|
2
|
+
export { MountDefinitionTypeId, MountTracker, define, defineStream, mapMessage, } from './index.js';
|
|
3
3
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/mount/public.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,qBAAqB,EACrB,YAAY,EACZ,MAAM,EACN,UAAU,GACX,MAAM,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/mount/public.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,qBAAqB,EACrB,YAAY,EACZ,MAAM,EACN,YAAY,EACZ,UAAU,GACX,MAAM,YAAY,CAAA"}
|
package/dist/mount/public.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MountDefinitionTypeId, MountTracker, define, mapMessage, } from './index.js';
|
|
1
|
+
export { MountDefinitionTypeId, MountTracker, define, defineStream, mapMessage, } from './index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mountPanel.d.ts","sourceRoot":"","sources":["../../../src/test/apps/mountPanel.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"mountPanel.d.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,
|
|
1
|
+
import { Effect, Match as M, Option, Schema as S } from 'effect';
|
|
2
2
|
import { html } from '../../html/index.js';
|
|
3
3
|
import { m } from '../../message/index.js';
|
|
4
4
|
import * as Mount from '../../mount/index.js';
|
|
@@ -30,22 +30,13 @@ export const Message = S.Union([
|
|
|
30
30
|
// `element.focus()` for focus) and emit synthetic result Messages so tests can
|
|
31
31
|
// pin specific values. See `ui/popover/popover.ts`, `ui/listbox/shared.ts`,
|
|
32
32
|
// etc. for production-shaped Mounts that read or write the element handle.
|
|
33
|
-
export const MeasurePanel = Mount.define('MeasurePanel', MeasuredPanel, FailedMountSidebar)(() => Effect.succeed({
|
|
34
|
-
|
|
35
|
-
cleanup: Function.constVoid,
|
|
36
|
-
}));
|
|
37
|
-
export const FocusButton = Mount.define('FocusButton', CompletedFocusButton)(() => Effect.succeed({
|
|
38
|
-
message: CompletedFocusButton(),
|
|
39
|
-
cleanup: Function.constVoid,
|
|
40
|
-
}));
|
|
33
|
+
export const MeasurePanel = Mount.define('MeasurePanel', MeasuredPanel, FailedMountSidebar)(() => Effect.succeed(MeasuredPanel({ width: 320 })));
|
|
34
|
+
export const FocusButton = Mount.define('FocusButton', CompletedFocusButton)(() => Effect.succeed(CompletedFocusButton()));
|
|
41
35
|
export const ScrollList = Mount.define('ScrollList', { offset: S.Number }, ScrolledTo)(({ offset }) => element => Effect.sync(() => {
|
|
42
36
|
if (element instanceof HTMLElement) {
|
|
43
37
|
element.scrollTop = offset;
|
|
44
38
|
}
|
|
45
|
-
return {
|
|
46
|
-
message: ScrolledTo({ offset }),
|
|
47
|
-
cleanup: Function.constVoid,
|
|
48
|
-
};
|
|
39
|
+
return ScrolledTo({ offset });
|
|
49
40
|
}));
|
|
50
41
|
// INIT
|
|
51
42
|
export const initialModel = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/ui/combobox/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,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AAQ,EAAE,MAAM,KAAK,YAAY,GAAG,SAAS,CAAA;IAC/D,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAA;IACzD,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,mBAAmB,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAA;IAC7D,MAAM,CAAC,EAAE,YAAY,CAAA;CACtB,CAAC,CAAA;AAIF,qFAAqF;AACrF,MAAM,MAAM,YAAY,CAAC,KAAK,SAAS,SAAS,IAAI,QAAQ,CAAC;IAC3D,cAAc,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAA;IAC5D,mBAAmB,EAAE,OAAO,CAAA;CAC7B,CAAC,CAAA;AAEF,gNAAgN;AAChN,eAAO,MAAM,QAAQ,GAClB,KAAK,SAAS,SAAS,EAAE,UAAU,YAAY,CAAC,KAAK,CAAC,MACtD,aAAa,EAAE,IAAI,SAAS,MAAM,EACjC,QAAQ,cAAc,CAAC,aAAa,EAAE,IAAI,EAAE,KAAK,CAAC,KACjD,IAghBF,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { Array, Effect, Match as M, Option, Predicate, Result, Schema as S, pipe
|
|
|
2
2
|
import * as Command from '../../command/index.js';
|
|
3
3
|
import * as Dom from '../../dom/index.js';
|
|
4
4
|
import { OptionExt } from '../../effectExtensions/index.js';
|
|
5
|
-
import { html
|
|
5
|
+
import { html } from '../../html/index.js';
|
|
6
6
|
import { m } from '../../message/index.js';
|
|
7
7
|
import * as Mount from '../../mount/index.js';
|
|
8
8
|
import { makeConstrainedEvo } from '../../struct/index.js';
|
|
@@ -330,63 +330,65 @@ export const makeUpdate = (handlers) => {
|
|
|
330
330
|
/** The anchor-positioning Mount this Combobox renders when an anchor is
|
|
331
331
|
* configured. Exposed so Scene tests can call
|
|
332
332
|
* `Scene.Mount.resolve(AnchorCombobox, CompletedAnchorCombobox())`. */
|
|
333
|
-
export const AnchorCombobox = Mount.define('AnchorCombobox', { buttonId: S.String, anchor: AnchorConfig }, CompletedAnchorCombobox)(({ buttonId, anchor }) =>
|
|
334
|
-
|
|
335
|
-
event
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
333
|
+
export const AnchorCombobox = Mount.define('AnchorCombobox', { buttonId: S.String, anchor: AnchorConfig }, CompletedAnchorCombobox)(({ buttonId, anchor }) => element => Effect.gen(function* () {
|
|
334
|
+
yield* Effect.acquireRelease(Effect.sync(() => {
|
|
335
|
+
const preventBlur = (event) => {
|
|
336
|
+
event.preventDefault();
|
|
337
|
+
};
|
|
338
|
+
element.addEventListener('pointerdown', preventBlur, {
|
|
339
|
+
capture: true,
|
|
340
|
+
});
|
|
341
|
+
const teardownAnchor = anchorSetup({
|
|
342
|
+
buttonId,
|
|
343
|
+
anchor,
|
|
344
|
+
interceptTab: false,
|
|
345
|
+
})(element);
|
|
346
|
+
return () => {
|
|
346
347
|
element.removeEventListener('pointerdown', preventBlur, {
|
|
347
348
|
capture: true,
|
|
348
349
|
});
|
|
349
350
|
teardownAnchor();
|
|
350
|
-
}
|
|
351
|
-
};
|
|
351
|
+
};
|
|
352
|
+
}), cleanup => Effect.sync(cleanup));
|
|
353
|
+
return CompletedAnchorCombobox();
|
|
352
354
|
}));
|
|
353
355
|
/** The Mount this Combobox renders to install a `pointerdown`-cancelling
|
|
354
356
|
* capture listener that prevents blur on item presses. Exposed so Scene
|
|
355
357
|
* tests can call
|
|
356
358
|
* `Scene.Mount.resolve(AttachComboboxPreventBlur, CompletedAttachComboboxPreventBlur())`. */
|
|
357
|
-
export const AttachComboboxPreventBlur = Mount.define('AttachComboboxPreventBlur', CompletedAttachComboboxPreventBlur)(
|
|
358
|
-
|
|
359
|
-
event
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
359
|
+
export const AttachComboboxPreventBlur = Mount.define('AttachComboboxPreventBlur', CompletedAttachComboboxPreventBlur)(element => Effect.gen(function* () {
|
|
360
|
+
yield* Effect.acquireRelease(Effect.sync(() => {
|
|
361
|
+
const handler = (event) => {
|
|
362
|
+
event.preventDefault();
|
|
363
|
+
};
|
|
364
|
+
element.addEventListener('pointerdown', handler, { capture: true });
|
|
365
|
+
return handler;
|
|
366
|
+
}), handler => Effect.sync(() => element.removeEventListener('pointerdown', handler, {
|
|
367
|
+
capture: true,
|
|
368
|
+
})));
|
|
369
|
+
return CompletedAttachComboboxPreventBlur();
|
|
368
370
|
}));
|
|
369
371
|
/** The Mount this Combobox renders to install the input's select-on-focus
|
|
370
372
|
* behavior. Exposed so Scene tests can call
|
|
371
373
|
* `Scene.Mount.resolve(AttachComboboxSelectOnFocus, CompletedAttachComboboxSelectOnFocus())`. */
|
|
372
|
-
export const AttachComboboxSelectOnFocus = Mount.define('AttachComboboxSelectOnFocus', CompletedAttachComboboxSelectOnFocus)(
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
element
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
374
|
+
export const AttachComboboxSelectOnFocus = Mount.define('AttachComboboxSelectOnFocus', CompletedAttachComboboxSelectOnFocus)(element => Effect.gen(function* () {
|
|
375
|
+
yield* Effect.acquireRelease(Effect.sync(() => {
|
|
376
|
+
const handler = () => {
|
|
377
|
+
if (element instanceof HTMLInputElement) {
|
|
378
|
+
element.select();
|
|
379
|
+
}
|
|
380
|
+
};
|
|
381
|
+
element.addEventListener('focus', handler);
|
|
382
|
+
return handler;
|
|
383
|
+
}), handler => Effect.sync(() => element.removeEventListener('focus', handler)));
|
|
384
|
+
return CompletedAttachComboboxSelectOnFocus();
|
|
383
385
|
}));
|
|
384
386
|
/** The backdrop-portaling Mount this Combobox renders. Exposed so Scene tests can
|
|
385
387
|
* call `Scene.Mount.resolve(PortalComboboxBackdrop, CompletedPortalComboboxBackdrop())` to
|
|
386
388
|
* acknowledge the mount produced by the rendered backdrop. */
|
|
387
|
-
export const PortalComboboxBackdrop = Mount.define('PortalComboboxBackdrop', CompletedPortalComboboxBackdrop)(
|
|
388
|
-
|
|
389
|
-
return
|
|
389
|
+
export const PortalComboboxBackdrop = Mount.define('PortalComboboxBackdrop', CompletedPortalComboboxBackdrop)(element => Effect.gen(function* () {
|
|
390
|
+
yield* Effect.acquireRelease(Effect.sync(() => portalToBody(element)), cleanup => Effect.sync(cleanup));
|
|
391
|
+
return CompletedPortalComboboxBackdrop();
|
|
390
392
|
}));
|
|
391
393
|
/** Creates a combobox view function from variant-specific behavior. Shared rendering logic (input, items, transitions, keyboard navigation) is handled internally; only selection display varies by variant. */
|
|
392
394
|
export const makeView = (behavior) => (config) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAGN,MAAM,EAEN,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAA;AAGjD,OAAO,
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/ui/listbox/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAGN,MAAM,EAEN,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAA;AAGjD,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,IAAI,EAAQ,MAAM,qBAAqB,CAAA;AAErE,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAA;AAE7C,OAAO,EA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