foldkit 0.95.1 → 0.96.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/overlay.js +2 -2
- package/dist/dom/dom.d.ts +53 -3
- package/dist/dom/dom.d.ts.map +1 -1
- package/dist/dom/dom.js +56 -6
- package/dist/dom/index.d.ts +1 -1
- package/dist/dom/index.d.ts.map +1 -1
- package/dist/dom/index.js +1 -1
- package/dist/dom/public.d.ts +1 -1
- package/dist/dom/public.d.ts.map +1 -1
- package/dist/dom/public.js +1 -1
- package/dist/runtime/runtime.js +7 -7
- package/dist/runtime/subscription.d.ts +7 -7
- package/dist/runtime/subscription.d.ts.map +1 -1
- package/dist/runtime/subscription.js +2 -2
- package/dist/subscription/animationFrame.d.ts +3 -3
- package/dist/subscription/animationFrame.js +3 -3
- package/dist/ui/dragAndDrop/index.d.ts +1 -1
- package/dist/ui/dragAndDrop/index.d.ts.map +1 -1
- package/dist/ui/dragAndDrop/index.js +2 -2
- package/dist/ui/dragAndDrop/public.d.ts +1 -1
- package/dist/ui/dragAndDrop/public.d.ts.map +1 -1
- package/dist/ui/dragAndDrop/public.js +1 -1
- package/dist/ui/slider/index.d.ts +1 -1
- package/dist/ui/slider/index.d.ts.map +1 -1
- package/dist/ui/slider/index.js +2 -2
- package/dist/ui/slider/public.d.ts +1 -1
- package/dist/ui/slider/public.d.ts.map +1 -1
- package/dist/ui/slider/public.js +1 -1
- package/dist/ui/virtualList/index.d.ts +1 -1
- package/dist/ui/virtualList/index.d.ts.map +1 -1
- package/dist/ui/virtualList/index.js +2 -2
- package/dist/ui/virtualList/public.d.ts +1 -1
- package/dist/ui/virtualList/public.d.ts.map +1 -1
- package/dist/ui/virtualList/public.js +1 -1
- package/package.json +1 -1
package/dist/devTools/overlay.js
CHANGED
|
@@ -433,7 +433,7 @@ const makeUpdate = (store, shadow, mode) => {
|
|
|
433
433
|
};
|
|
434
434
|
// SUBSCRIPTION
|
|
435
435
|
const ScrubberDragActivity = S.Literals(['Idle', 'Active']);
|
|
436
|
-
const
|
|
436
|
+
const SubscriptionDependencies = S.Struct({
|
|
437
437
|
storeUpdates: S.Boolean,
|
|
438
438
|
mobileBreakpoint: S.Null,
|
|
439
439
|
scrubberPointer: S.Struct({
|
|
@@ -448,7 +448,7 @@ const SubscriptionDeps = S.Struct({
|
|
|
448
448
|
});
|
|
449
449
|
const makeOverlaySubscriptions = (store, shadow) => {
|
|
450
450
|
const sliderSubscriptions = Slider.subscriptionsForRoot(() => shadow);
|
|
451
|
-
return makeSubscriptions(
|
|
451
|
+
return makeSubscriptions(SubscriptionDependencies)({
|
|
452
452
|
storeUpdates: {
|
|
453
453
|
modelToDependencies: () => true,
|
|
454
454
|
dependenciesToStream: () => Stream.concat(Stream.fromEffect(SubscriptionRef.get(store.stateRef).pipe(Effect.map(state => ReceivedStoreUpdate(toDisplayState(state))))), Stream.map(SubscriptionRef.changes(store.stateRef), state => ReceivedStoreUpdate(toDisplayState(state)))),
|
package/dist/dom/dom.d.ts
CHANGED
|
@@ -16,14 +16,29 @@ import { ElementNotFound } from './error.js';
|
|
|
16
16
|
* effects bound to a VNode existing where the live element handle is
|
|
17
17
|
* needed (positioning, portaling, observer attachment, library setup).
|
|
18
18
|
*
|
|
19
|
+
* Section headings, articles, and other non-natively-focusable elements
|
|
20
|
+
* are common URL fragment targets, but `.focus()` is a no-op on them
|
|
21
|
+
* without a `tabindex`. Pass `makeFocusable: true` to inject
|
|
22
|
+
* `tabindex="-1"` on the target if it has none, making programmatic
|
|
23
|
+
* focus actually land. Pass `preventScroll: true` to suppress the
|
|
24
|
+
* browser's default scroll-on-focus, useful when the focus call follows
|
|
25
|
+
* a deliberate scroll that should not be undone. The two options compose
|
|
26
|
+
* with `scrollIntoViewAfterPaint` for URL-fragment-navigation
|
|
27
|
+
* accessibility: scroll the section into view, then focus the same
|
|
28
|
+
* selector so keyboard users start Tab navigation from the target.
|
|
29
|
+
*
|
|
19
30
|
* Fails with `ElementNotFound` if the selector does not match an `HTMLElement`.
|
|
20
31
|
*
|
|
21
32
|
* @example
|
|
22
33
|
* ```typescript
|
|
23
34
|
* Dom.focus('#email-input').pipe(Effect.ignore, Effect.as(CompletedFocusInput()))
|
|
35
|
+
* Dom.focus('#section', { preventScroll: true, makeFocusable: true })
|
|
24
36
|
* ```
|
|
25
37
|
*/
|
|
26
|
-
export declare const focus: (selector: string
|
|
38
|
+
export declare const focus: (selector: string, options?: Readonly<{
|
|
39
|
+
preventScroll?: boolean;
|
|
40
|
+
makeFocusable?: boolean;
|
|
41
|
+
}>) => Effect.Effect<void, ElementNotFound>;
|
|
27
42
|
/**
|
|
28
43
|
* Opens a dialog element using `show()` with high z-index, focus trapping,
|
|
29
44
|
* and Escape key handling. Uses `show()` instead of `showModal()` so that
|
|
@@ -64,15 +79,50 @@ export declare const closeModal: (selector: string) => Effect.Effect<void, Eleme
|
|
|
64
79
|
*/
|
|
65
80
|
export declare const clickElement: (selector: string) => Effect.Effect<void, ElementNotFound>;
|
|
66
81
|
/**
|
|
67
|
-
* Scrolls an element into view by selector
|
|
82
|
+
* Scrolls an element into view by selector. Resolves the selector after
|
|
83
|
+
* `Render.afterCommit`. Defaults to `{ block: 'nearest' }`; pass a different
|
|
84
|
+
* `block` for use cases like URL-fragment landing where `'start'` is right.
|
|
85
|
+
* For a target the same Message just brought into the DOM,
|
|
86
|
+
* `scrollIntoViewAfterPaint` is the right choice.
|
|
87
|
+
*
|
|
68
88
|
* Fails with `ElementNotFound` if the selector does not match an `HTMLElement`.
|
|
69
89
|
*
|
|
70
90
|
* @example
|
|
71
91
|
* ```typescript
|
|
72
92
|
* Dom.scrollIntoView('#active-item').pipe(Effect.ignore, Effect.as(CompletedScrollIntoView()))
|
|
93
|
+
* Dom.scrollIntoView('#section-2', { block: 'start' })
|
|
73
94
|
* ```
|
|
74
95
|
*/
|
|
75
|
-
export declare const scrollIntoView: (selector: string
|
|
96
|
+
export declare const scrollIntoView: (selector: string, options?: Readonly<{
|
|
97
|
+
block?: ScrollLogicalPosition;
|
|
98
|
+
}>) => Effect.Effect<void, ElementNotFound>;
|
|
99
|
+
/**
|
|
100
|
+
* Like `scrollIntoView`, but waits for `Render.afterPaint` instead of
|
|
101
|
+
* `Render.afterCommit` before resolving the selector.
|
|
102
|
+
*
|
|
103
|
+
* Reach for this when the target was just brought into the DOM by the same
|
|
104
|
+
* Message that dispatches the scroll, such as a routing flow landing at a
|
|
105
|
+
* URL fragment. The two-frame wait gives the runtime time to commit the new
|
|
106
|
+
* Model and the browser time to lay it out before the scroll runs. For a
|
|
107
|
+
* target that's already on screen, `scrollIntoView` is the lighter choice.
|
|
108
|
+
*
|
|
109
|
+
* Defaults to `{ block: 'nearest' }`; pass `{ block: 'start' }` for URL
|
|
110
|
+
* fragment landings where the target should sit at the top of the viewport.
|
|
111
|
+
*
|
|
112
|
+
* Fails with `ElementNotFound` if the selector does not match an `HTMLElement`.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```typescript
|
|
116
|
+
* Dom.scrollIntoViewAfterPaint('#overview').pipe(
|
|
117
|
+
* Effect.ignore,
|
|
118
|
+
* Effect.as(CompletedScrollIntoViewAfterPaint()),
|
|
119
|
+
* )
|
|
120
|
+
* Dom.scrollIntoViewAfterPaint(`#${hash}`, { block: 'start' })
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
export declare const scrollIntoViewAfterPaint: (selector: string, options?: Readonly<{
|
|
124
|
+
block?: ScrollLogicalPosition;
|
|
125
|
+
}>) => Effect.Effect<void, ElementNotFound>;
|
|
76
126
|
/** Direction for focus advancement: forward or backward in tab order. */
|
|
77
127
|
export type FocusDirection = 'Next' | 'Previous';
|
|
78
128
|
/**
|
package/dist/dom/dom.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/dom/dom.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAMP,MAA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,wBAAwB,GACnC,UAAU,MAAM,EAChB,UAAU,QAAQ,CAAC;IAAE,KAAK,CAAC,EAAE,qBAAqB,CAAA;CAAE,CAAC,KACpD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAKlC,CAAA;AAEJ,yEAAyE;AACzE,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,UAAU,CAAA;AAEhD;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GACvB,UAAU,MAAM,EAChB,WAAW,cAAc,KACxB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAiClC,CAAA"}
|
package/dist/dom/dom.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Array, Effect, Equal, Function, Match as M, Number, Option, } from 'effect';
|
|
2
|
-
import { afterCommit } from '../render/render.js';
|
|
2
|
+
import { afterCommit, afterPaint } from '../render/render.js';
|
|
3
3
|
import { ElementNotFound } from './error.js';
|
|
4
4
|
const BASE_DIALOG_Z_INDEX = 2147483600;
|
|
5
5
|
let openDialogCount = 0;
|
|
@@ -34,17 +34,32 @@ const queryHTMLElement = (selector) => Effect.suspend(() => {
|
|
|
34
34
|
* effects bound to a VNode existing where the live element handle is
|
|
35
35
|
* needed (positioning, portaling, observer attachment, library setup).
|
|
36
36
|
*
|
|
37
|
+
* Section headings, articles, and other non-natively-focusable elements
|
|
38
|
+
* are common URL fragment targets, but `.focus()` is a no-op on them
|
|
39
|
+
* without a `tabindex`. Pass `makeFocusable: true` to inject
|
|
40
|
+
* `tabindex="-1"` on the target if it has none, making programmatic
|
|
41
|
+
* focus actually land. Pass `preventScroll: true` to suppress the
|
|
42
|
+
* browser's default scroll-on-focus, useful when the focus call follows
|
|
43
|
+
* a deliberate scroll that should not be undone. The two options compose
|
|
44
|
+
* with `scrollIntoViewAfterPaint` for URL-fragment-navigation
|
|
45
|
+
* accessibility: scroll the section into view, then focus the same
|
|
46
|
+
* selector so keyboard users start Tab navigation from the target.
|
|
47
|
+
*
|
|
37
48
|
* Fails with `ElementNotFound` if the selector does not match an `HTMLElement`.
|
|
38
49
|
*
|
|
39
50
|
* @example
|
|
40
51
|
* ```typescript
|
|
41
52
|
* Dom.focus('#email-input').pipe(Effect.ignore, Effect.as(CompletedFocusInput()))
|
|
53
|
+
* Dom.focus('#section', { preventScroll: true, makeFocusable: true })
|
|
42
54
|
* ```
|
|
43
55
|
*/
|
|
44
|
-
export const focus = (selector) => Effect.gen(function* () {
|
|
56
|
+
export const focus = (selector, options) => Effect.gen(function* () {
|
|
45
57
|
yield* afterCommit;
|
|
46
58
|
const element = yield* queryHTMLElement(selector);
|
|
47
|
-
element.
|
|
59
|
+
if (options?.makeFocusable && !element.hasAttribute('tabindex')) {
|
|
60
|
+
element.setAttribute('tabindex', '-1');
|
|
61
|
+
}
|
|
62
|
+
element.focus({ preventScroll: options?.preventScroll ?? false });
|
|
48
63
|
});
|
|
49
64
|
/**
|
|
50
65
|
* Opens a dialog element using `show()` with high z-index, focus trapping,
|
|
@@ -149,18 +164,53 @@ export const clickElement = (selector) => Effect.gen(function* () {
|
|
|
149
164
|
element.click();
|
|
150
165
|
});
|
|
151
166
|
/**
|
|
152
|
-
* Scrolls an element into view by selector
|
|
167
|
+
* Scrolls an element into view by selector. Resolves the selector after
|
|
168
|
+
* `Render.afterCommit`. Defaults to `{ block: 'nearest' }`; pass a different
|
|
169
|
+
* `block` for use cases like URL-fragment landing where `'start'` is right.
|
|
170
|
+
* For a target the same Message just brought into the DOM,
|
|
171
|
+
* `scrollIntoViewAfterPaint` is the right choice.
|
|
172
|
+
*
|
|
153
173
|
* Fails with `ElementNotFound` if the selector does not match an `HTMLElement`.
|
|
154
174
|
*
|
|
155
175
|
* @example
|
|
156
176
|
* ```typescript
|
|
157
177
|
* Dom.scrollIntoView('#active-item').pipe(Effect.ignore, Effect.as(CompletedScrollIntoView()))
|
|
178
|
+
* Dom.scrollIntoView('#section-2', { block: 'start' })
|
|
158
179
|
* ```
|
|
159
180
|
*/
|
|
160
|
-
export const scrollIntoView = (selector) => Effect.gen(function* () {
|
|
181
|
+
export const scrollIntoView = (selector, options) => Effect.gen(function* () {
|
|
161
182
|
yield* afterCommit;
|
|
162
183
|
const element = yield* queryHTMLElement(selector);
|
|
163
|
-
element.scrollIntoView({ block: 'nearest' });
|
|
184
|
+
element.scrollIntoView({ block: options?.block ?? 'nearest' });
|
|
185
|
+
});
|
|
186
|
+
/**
|
|
187
|
+
* Like `scrollIntoView`, but waits for `Render.afterPaint` instead of
|
|
188
|
+
* `Render.afterCommit` before resolving the selector.
|
|
189
|
+
*
|
|
190
|
+
* Reach for this when the target was just brought into the DOM by the same
|
|
191
|
+
* Message that dispatches the scroll, such as a routing flow landing at a
|
|
192
|
+
* URL fragment. The two-frame wait gives the runtime time to commit the new
|
|
193
|
+
* Model and the browser time to lay it out before the scroll runs. For a
|
|
194
|
+
* target that's already on screen, `scrollIntoView` is the lighter choice.
|
|
195
|
+
*
|
|
196
|
+
* Defaults to `{ block: 'nearest' }`; pass `{ block: 'start' }` for URL
|
|
197
|
+
* fragment landings where the target should sit at the top of the viewport.
|
|
198
|
+
*
|
|
199
|
+
* Fails with `ElementNotFound` if the selector does not match an `HTMLElement`.
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* ```typescript
|
|
203
|
+
* Dom.scrollIntoViewAfterPaint('#overview').pipe(
|
|
204
|
+
* Effect.ignore,
|
|
205
|
+
* Effect.as(CompletedScrollIntoViewAfterPaint()),
|
|
206
|
+
* )
|
|
207
|
+
* Dom.scrollIntoViewAfterPaint(`#${hash}`, { block: 'start' })
|
|
208
|
+
* ```
|
|
209
|
+
*/
|
|
210
|
+
export const scrollIntoViewAfterPaint = (selector, options) => Effect.gen(function* () {
|
|
211
|
+
yield* afterPaint;
|
|
212
|
+
const element = yield* queryHTMLElement(selector);
|
|
213
|
+
element.scrollIntoView({ block: options?.block ?? 'nearest' });
|
|
164
214
|
});
|
|
165
215
|
/**
|
|
166
216
|
* Focuses the next or previous focusable element in the document relative to the element matching the given selector.
|
package/dist/dom/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ElementNotFound } from './error.js';
|
|
2
|
-
export { advanceFocus, clickElement, closeModal, focus, scrollIntoView, showModal, } from './dom.js';
|
|
2
|
+
export { advanceFocus, clickElement, closeModal, focus, scrollIntoView, scrollIntoViewAfterPaint, showModal, } from './dom.js';
|
|
3
3
|
export type { FocusDirection } from './dom.js';
|
|
4
4
|
export { detectElementMovement } from './elementMovement.js';
|
|
5
5
|
export { inertOthers, restoreInert } from './inert.js';
|
package/dist/dom/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dom/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,KAAK,EACL,cAAc,EACd,SAAS,GACV,MAAM,UAAU,CAAA;AACjB,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACtD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dom/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,KAAK,EACL,cAAc,EACd,wBAAwB,EACxB,SAAS,GACV,MAAM,UAAU,CAAA;AACjB,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACtD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA"}
|
package/dist/dom/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ElementNotFound } from './error.js';
|
|
2
|
-
export { advanceFocus, clickElement, closeModal, focus, scrollIntoView, showModal, } from './dom.js';
|
|
2
|
+
export { advanceFocus, clickElement, closeModal, focus, scrollIntoView, scrollIntoViewAfterPaint, showModal, } from './dom.js';
|
|
3
3
|
export { detectElementMovement } from './elementMovement.js';
|
|
4
4
|
export { inertOthers, restoreInert } from './inert.js';
|
|
5
5
|
export { lockScroll, unlockScroll } from './scrollLock.js';
|
package/dist/dom/public.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ElementNotFound, advanceFocus, clickElement, closeModal, detectElementMovement, focus, inertOthers, lockScroll, restoreInert, scrollIntoView, showModal, unlockScroll, waitForAnimationSettled, } from './index.js';
|
|
1
|
+
export { ElementNotFound, advanceFocus, clickElement, closeModal, detectElementMovement, focus, inertOthers, lockScroll, restoreInert, scrollIntoView, scrollIntoViewAfterPaint, showModal, unlockScroll, waitForAnimationSettled, } from './index.js';
|
|
2
2
|
export type { FocusDirection } from './index.js';
|
|
3
3
|
//# sourceMappingURL=public.d.ts.map
|
package/dist/dom/public.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/dom/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,qBAAqB,EACrB,KAAK,EACL,WAAW,EACX,UAAU,EACV,YAAY,EACZ,cAAc,EACd,SAAS,EACT,YAAY,EACZ,uBAAuB,GACxB,MAAM,YAAY,CAAA;AACnB,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/dom/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,qBAAqB,EACrB,KAAK,EACL,WAAW,EACX,UAAU,EACV,YAAY,EACZ,cAAc,EACd,wBAAwB,EACxB,SAAS,EACT,YAAY,EACZ,uBAAuB,GACxB,MAAM,YAAY,CAAA;AACnB,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA"}
|
package/dist/dom/public.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ElementNotFound, advanceFocus, clickElement, closeModal, detectElementMovement, focus, inertOthers, lockScroll, restoreInert, scrollIntoView, showModal, unlockScroll, waitForAnimationSettled, } from './index.js';
|
|
1
|
+
export { ElementNotFound, advanceFocus, clickElement, closeModal, detectElementMovement, focus, inertOthers, lockScroll, restoreInert, scrollIntoView, scrollIntoViewAfterPaint, showModal, unlockScroll, waitForAnimationSettled, } from './index.js';
|
package/dist/runtime/runtime.js
CHANGED
|
@@ -284,7 +284,7 @@ const makeRuntime = ({ Model, flags: resolveFlags, init, update, view, subscript
|
|
|
284
284
|
const maybeCurrentVNode = yield* Ref.get(maybeCurrentVNodeRef);
|
|
285
285
|
const patchedVNode = yield* Effect.sync(() => patchVNode(maybeCurrentVNode, nullableNextVNode, container));
|
|
286
286
|
yield* Ref.set(maybeCurrentVNodeRef, Option.some(patchedVNode));
|
|
287
|
-
yield* Effect.sync(() => applyDocumentMetadata(nextDocument,
|
|
287
|
+
yield* Effect.sync(() => applyDocumentMetadata(nextDocument, patchedVNode.elm));
|
|
288
288
|
}).pipe(Effect.provideService(Dispatch, dispatchService), Effect.provideService(MountTracker, mountTracker));
|
|
289
289
|
const isInIframe = window.self !== window.top;
|
|
290
290
|
const resolvedDevTools = pipe(devTools ?? {}, Option.liftPredicate(config => config !== false), Option.filter(config => Match.value(config.show ?? DEFAULT_DEV_TOOLS_SHOW).pipe(Match.when('Always', () => true), Match.when('Development', () => !!import.meta.hot && !isInIframe), Match.exhaustive)), Option.map(config => ({
|
|
@@ -527,8 +527,8 @@ const upsertHeadElement = (tagName, selector, attributes) => {
|
|
|
527
527
|
element.setAttribute(key, value);
|
|
528
528
|
});
|
|
529
529
|
};
|
|
530
|
-
const applyDocumentMetadata = (nextDocument,
|
|
531
|
-
if (!document.body.contains(
|
|
530
|
+
const applyDocumentMetadata = (nextDocument, mountedRoot) => {
|
|
531
|
+
if (!mountedRoot || !document.body.contains(mountedRoot)) {
|
|
532
532
|
return;
|
|
533
533
|
}
|
|
534
534
|
if (document.title !== nextDocument.title) {
|
|
@@ -561,8 +561,8 @@ const renderCrashView = (context, crash, container, maybeCurrentVNodeRef) => {
|
|
|
561
561
|
: defaultCrashView(context);
|
|
562
562
|
const maybeCurrentVNode = Effect.runSync(Ref.get(maybeCurrentVNodeRef));
|
|
563
563
|
const vnode = crashDocument.body.pipe(Effect.provideService(Dispatch, noOpDispatch), Effect.runSync);
|
|
564
|
-
patchVNode(maybeCurrentVNode, vnode, container);
|
|
565
|
-
applyDocumentMetadata(crashDocument,
|
|
564
|
+
const patchedVNode = patchVNode(maybeCurrentVNode, vnode, container);
|
|
565
|
+
applyDocumentMetadata(crashDocument, patchedVNode.elm);
|
|
566
566
|
}
|
|
567
567
|
catch (viewError) {
|
|
568
568
|
console.error('[foldkit] crash.view failed:', viewError);
|
|
@@ -570,8 +570,8 @@ const renderCrashView = (context, crash, container, maybeCurrentVNodeRef) => {
|
|
|
570
570
|
const fallbackViewError = viewError instanceof Error ? viewError : new Error(String(viewError));
|
|
571
571
|
const fallbackDocument = defaultCrashView(context, fallbackViewError);
|
|
572
572
|
const vnode = fallbackDocument.body.pipe(Effect.provideService(Dispatch, noOpDispatch), Effect.runSync);
|
|
573
|
-
patchVNode(maybeCurrentVNode, vnode, container);
|
|
574
|
-
applyDocumentMetadata(fallbackDocument,
|
|
573
|
+
const patchedVNode = patchVNode(maybeCurrentVNode, vnode, container);
|
|
574
|
+
applyDocumentMetadata(fallbackDocument, patchedVNode.elm);
|
|
575
575
|
}
|
|
576
576
|
};
|
|
577
577
|
export function makeProgram(config) {
|
|
@@ -10,14 +10,14 @@ type SubscriptionConfig<Model, Message, StreamDeps, Resources = never> = {
|
|
|
10
10
|
readonly schema: Schema.Schema<StreamDeps>;
|
|
11
11
|
} & Subscription<Model, Message, StreamDeps, Resources>;
|
|
12
12
|
/** A record of named subscription configurations, keyed by dependency field name. */
|
|
13
|
-
export type Subscriptions<Model, Message,
|
|
14
|
-
readonly [K in keyof Schema.Schema.Type<
|
|
13
|
+
export type Subscriptions<Model, Message, SubscriptionDependencies extends Schema.Struct<any>, Resources = never> = {
|
|
14
|
+
readonly [K in keyof Schema.Schema.Type<SubscriptionDependencies>]: SubscriptionConfig<Model, Message, Schema.Schema.Type<SubscriptionDependencies>[K], Resources>;
|
|
15
15
|
};
|
|
16
16
|
/** Creates type-safe subscription configurations from a dependency schema. */
|
|
17
|
-
export declare const makeSubscriptions: <
|
|
18
|
-
readonly modelToDependencies: (model: Model) => Schema.Schema.Type<
|
|
19
|
-
readonly equivalence?: Equivalence.Equivalence<Schema.Schema.Type<
|
|
20
|
-
readonly dependenciesToStream: (deps: Schema.Schema.Type<
|
|
21
|
-
}; }) => Subscriptions<Model, Message,
|
|
17
|
+
export declare const makeSubscriptions: <SubscriptionDependencies extends Schema.Struct<any>>(SubscriptionDependencies: SubscriptionDependencies) => <Model, Message, Resources = never>(configs: { readonly [K in keyof Schema.Schema.Type<SubscriptionDependencies>]: {
|
|
18
|
+
readonly modelToDependencies: (model: Model) => Schema.Schema.Type<SubscriptionDependencies>[K];
|
|
19
|
+
readonly equivalence?: Equivalence.Equivalence<Schema.Schema.Type<SubscriptionDependencies>[K]> | undefined;
|
|
20
|
+
readonly dependenciesToStream: (deps: Schema.Schema.Type<SubscriptionDependencies>[K], readDependencies: () => Schema.Schema.Type<SubscriptionDependencies>[K]) => Stream.Stream<ResolveMessage<Message>, never, Resources>;
|
|
21
|
+
}; }) => Subscriptions<Model, Message, SubscriptionDependencies, Resources>;
|
|
22
22
|
export {};
|
|
23
23
|
//# sourceMappingURL=subscription.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../src/runtime/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAU,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE3E,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;AAEzE,oFAAoF;AACpF,MAAM,MAAM,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,GAAG,KAAK,IAAI;IACxE,QAAQ,CAAC,mBAAmB,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,UAAU,CAAA;IAC1D,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,CAAA;IAC1D,QAAQ,CAAC,oBAAoB,EAAE,CAC7B,IAAI,EAAE,UAAU,EAChB,gBAAgB,EAAE,MAAM,UAAU,KAC/B,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAA;CAC9D,CAAA;AAED,KAAK,kBAAkB,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,GAAG,KAAK,IAAI;IACvE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;CAC3C,GAAG,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,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
|
import { Record } from 'effect';
|
|
2
2
|
/** Creates type-safe subscription configurations from a dependency schema. */
|
|
3
|
-
export const makeSubscriptions = (
|
|
3
|
+
export const makeSubscriptions = (SubscriptionDependencies) => (configs) =>
|
|
4
4
|
/* eslint-disable @typescript-eslint/consistent-type-assertions */
|
|
5
5
|
Record.map(configs, ({ modelToDependencies, equivalence, dependenciesToStream }, key) => ({
|
|
6
|
-
schema:
|
|
6
|
+
schema: SubscriptionDependencies.fields[key],
|
|
7
7
|
modelToDependencies,
|
|
8
8
|
equivalence,
|
|
9
9
|
dependenciesToStream,
|
|
@@ -25,15 +25,15 @@ export type AnimationFrameSubscription<Model, Message> = Readonly<{
|
|
|
25
25
|
* Build a Subscription field config that emits a Message on every
|
|
26
26
|
* `requestAnimationFrame` tick, with the inter-frame delta in milliseconds.
|
|
27
27
|
*
|
|
28
|
-
* Pair with `S.Boolean` in the `
|
|
28
|
+
* Pair with `S.Boolean` in the `SubscriptionDependencies` schema:
|
|
29
29
|
*
|
|
30
30
|
* @example
|
|
31
31
|
* ```typescript
|
|
32
|
-
* const
|
|
32
|
+
* const SubscriptionDependencies = S.Struct({
|
|
33
33
|
* frame: S.Boolean,
|
|
34
34
|
* })
|
|
35
35
|
*
|
|
36
|
-
* const subscriptions = Subscription.makeSubscriptions(
|
|
36
|
+
* const subscriptions = Subscription.makeSubscriptions(SubscriptionDependencies)<
|
|
37
37
|
* Model,
|
|
38
38
|
* Message
|
|
39
39
|
* >({
|
|
@@ -17,15 +17,15 @@ const makeAnimationFrameStream = (toMessage) => Stream.callback(queue => Effect.
|
|
|
17
17
|
* Build a Subscription field config that emits a Message on every
|
|
18
18
|
* `requestAnimationFrame` tick, with the inter-frame delta in milliseconds.
|
|
19
19
|
*
|
|
20
|
-
* Pair with `S.Boolean` in the `
|
|
20
|
+
* Pair with `S.Boolean` in the `SubscriptionDependencies` schema:
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```typescript
|
|
24
|
-
* const
|
|
24
|
+
* const SubscriptionDependencies = S.Struct({
|
|
25
25
|
* frame: S.Boolean,
|
|
26
26
|
* })
|
|
27
27
|
*
|
|
28
|
-
* const subscriptions = Subscription.makeSubscriptions(
|
|
28
|
+
* const subscriptions = Subscription.makeSubscriptions(SubscriptionDependencies)<
|
|
29
29
|
* Model,
|
|
30
30
|
* Message
|
|
31
31
|
* >({
|
|
@@ -152,7 +152,7 @@ type UpdateReturn = readonly [
|
|
|
152
152
|
/** Processes a drag-and-drop message and returns the next model, commands, and an optional out-message for the parent. */
|
|
153
153
|
export declare const update: (model: Model, message: Message) => UpdateReturn;
|
|
154
154
|
/** Schema describing the subscription dependencies for document-level drag tracking. */
|
|
155
|
-
export declare const
|
|
155
|
+
export declare const SubscriptionDependencies: S.Struct<{
|
|
156
156
|
readonly documentPointer: S.Struct<{
|
|
157
157
|
readonly dragActivity: S.Literals<readonly ["Idle", "Active"]>;
|
|
158
158
|
readonly orientation: S.Literals<readonly ["Horizontal", "Vertical"]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/dragAndDrop/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAIN,MAAM,EAEN,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAA;AAEjD,OAAO,EAAE,KAAK,SAAS,EAAQ,MAAM,qBAAqB,CAAA;AAoB1D,QAAA,MAAM,UAAU;;;EAGd,CAAA;AA8BF,mHAAmH;AACnH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKhB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,sDAAsD;AACtD,eAAO,MAAM,gBAAgB;;;;;;EAM3B,CAAA;AACF,yEAAyE;AACzE,eAAO,MAAM,YAAY;;;;;;;;;EAMvB,CAAA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ACb,aAAa,CAAC,SAAS,CAAC,aAAa,CAAC,CAGxC,CAAA;AAKD,kGAAkG;AAClG,eAAO,MAAM,UAAU,GACrB,OAAO,KAAK,KACX,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAcpC,CAAA;AAEH,kFAAkF;AAClF,eAAO,MAAM,UAAU,GAAI,yBAAyB,KAAK,KAAG,OACR,CAAA;AAEpD,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB,GAAI,OAAO,KAAK,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAMnE,CAAA;AAEH,oJAAoJ;AACpJ,eAAO,MAAM,eAAe,GAC1B,OAAO,KAAK,KACX,MAAM,CAAC,MAAM,CAAC,OAAO,UAAU,CAAC,IAAI,CAUpC,CAAA"}
|
|
@@ -366,7 +366,7 @@ const pointerDragActivityFromModel = (model) => M.value(model.dragState).pipe(M.
|
|
|
366
366
|
const dragActivityFromModel = (model) => M.value(model.dragState).pipe(M.withReturnType(), M.tag('Idle', () => 'Idle'), M.orElse(() => 'Active'));
|
|
367
367
|
const keyboardDragActivityFromModel = (model) => M.value(model.dragState).pipe(M.withReturnType(), M.tag('KeyboardDragging', () => 'Active'), M.orElse(() => 'Idle'));
|
|
368
368
|
/** Schema describing the subscription dependencies for document-level drag tracking. */
|
|
369
|
-
export const
|
|
369
|
+
export const SubscriptionDependencies = S.Struct({
|
|
370
370
|
documentPointer: S.Struct({
|
|
371
371
|
dragActivity: PointerDragActivity,
|
|
372
372
|
orientation: Orientation,
|
|
@@ -379,7 +379,7 @@ export const SubscriptionDeps = S.Struct({
|
|
|
379
379
|
}),
|
|
380
380
|
});
|
|
381
381
|
/** Document-level subscriptions for pointer and keyboard events during drag operations. */
|
|
382
|
-
export const subscriptions = makeSubscriptions(
|
|
382
|
+
export const subscriptions = makeSubscriptions(SubscriptionDependencies)({
|
|
383
383
|
documentPointer: {
|
|
384
384
|
modelToDependencies: model => ({
|
|
385
385
|
dragActivity: pointerDragActivityFromModel(model),
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { init, update, draggable, droppable, sortable, ghostStyle, isDragging, maybeDraggedItemId, maybeDropTarget, subscriptions,
|
|
1
|
+
export { init, update, draggable, droppable, sortable, ghostStyle, isDragging, maybeDraggedItemId, maybeDropTarget, subscriptions, SubscriptionDependencies, Model, Message, OutMessage, PressedDraggable, MovedPointer, ReleasedPointer, CancelledDrag, ActivatedKeyboardDrag, ResolvedKeyboardMove, ConfirmedKeyboardDrop, PressedArrowKey, CompletedAutoScroll, CompletedFocusItem, FocusItem, ResolveKeyboardMove, Reordered, Cancelled, } from './index.js';
|
|
2
2
|
export type { InitConfig, DraggableConfig, DraggableMessage } from './index.js';
|
|
3
3
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/dragAndDrop/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,SAAS,EACT,SAAS,EACT,QAAQ,EACR,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/dragAndDrop/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,SAAS,EACT,SAAS,EACT,QAAQ,EACR,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,wBAAwB,EACxB,KAAK,EACL,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,SAAS,EACT,mBAAmB,EACnB,SAAS,EACT,SAAS,GACV,MAAM,YAAY,CAAA;AAEnB,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { init, update, draggable, droppable, sortable, ghostStyle, isDragging, maybeDraggedItemId, maybeDropTarget, subscriptions,
|
|
1
|
+
export { init, update, draggable, droppable, sortable, ghostStyle, isDragging, maybeDraggedItemId, maybeDropTarget, subscriptions, SubscriptionDependencies, Model, Message, OutMessage, PressedDraggable, MovedPointer, ReleasedPointer, CancelledDrag, ActivatedKeyboardDrag, ResolvedKeyboardMove, ConfirmedKeyboardDrop, PressedArrowKey, CompletedAutoScroll, CompletedFocusItem, FocusItem, ResolveKeyboardMove, Reordered, Cancelled, } from './index.js';
|
|
@@ -98,7 +98,7 @@ export declare const setRange: (model: Model, range: Readonly<{
|
|
|
98
98
|
* external state rather than user input. */
|
|
99
99
|
export declare const setValue: (model: Model, value: number) => Model;
|
|
100
100
|
/** Schema describing the subscription dependencies for slider drag. */
|
|
101
|
-
export declare const
|
|
101
|
+
export declare const SubscriptionDependencies: S.Struct<{
|
|
102
102
|
readonly dragPointer: S.Struct<{
|
|
103
103
|
readonly dragActivity: S.Literals<readonly ["Idle", "Active"]>;
|
|
104
104
|
readonly id: S.String;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/slider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,MAAM,EACN,MAAM,IAAI,CAAC,EAIZ,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,EACL,KAAK,SAAS,EACd,KAAK,IAAI,EAGV,MAAM,qBAAqB,CAAA;AAa5B;uDACuD;AACvD,eAAO,MAAM,KAAK;;;;;;;;;EAOhB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,4EAA4E;AAC5E,eAAO,MAAM,YAAY,0EAAoB,CAAA;AAC7C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AU,CAAC,aAAa,CAAC,CAAC,iBAAiB,CAAC,KAC1D,IAAI,CAgBR,CAAA"}
|
package/dist/ui/slider/index.js
CHANGED
|
@@ -184,7 +184,7 @@ const valueFromClientX = (clientX, trackElement_, min, max) => {
|
|
|
184
184
|
}
|
|
185
185
|
};
|
|
186
186
|
/** Schema describing the subscription dependencies for slider drag. */
|
|
187
|
-
export const
|
|
187
|
+
export const SubscriptionDependencies = S.Struct({
|
|
188
188
|
dragPointer: S.Struct({
|
|
189
189
|
dragActivity: DragActivity,
|
|
190
190
|
id: S.String,
|
|
@@ -199,7 +199,7 @@ export const SubscriptionDeps = S.Struct({
|
|
|
199
199
|
* element through the supplied root resolver. Use this when the slider is
|
|
200
200
|
* rendered inside a Shadow DOM. The root is read lazily so consumers can
|
|
201
201
|
* resolve it at subscription time. */
|
|
202
|
-
export const subscriptionsForRoot = (getTrackRoot) => makeSubscriptions(
|
|
202
|
+
export const subscriptionsForRoot = (getTrackRoot) => makeSubscriptions(SubscriptionDependencies)({
|
|
203
203
|
dragPointer: {
|
|
204
204
|
modelToDependencies: model => ({
|
|
205
205
|
dragActivity: dragActivityFromModel(model),
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { init, update, setRange, setValue, view, lazy, subscriptions, subscriptionsForRoot, fractionOfValue, Model, Message, OutMessage,
|
|
1
|
+
export { init, update, setRange, setValue, view, lazy, subscriptions, subscriptionsForRoot, fractionOfValue, Model, Message, OutMessage, SubscriptionDependencies, } from './index.js';
|
|
2
2
|
export type { InitConfig, ViewConfig, SliderAttributes, PressedThumb, PressedPointer, MovedDragPointer, ReleasedDragPointer, CancelledDrag, PressedKeyboardNavigation, } from './index.js';
|
|
3
3
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/slider/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,KAAK,EACL,OAAO,EACP,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/slider/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,KAAK,EACL,OAAO,EACP,UAAU,EACV,wBAAwB,GACzB,MAAM,YAAY,CAAA;AAEnB,YAAY,EACV,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,yBAAyB,GAC1B,MAAM,YAAY,CAAA"}
|
package/dist/ui/slider/public.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { init, update, setRange, setValue, view, lazy, subscriptions, subscriptionsForRoot, fractionOfValue, Model, Message, OutMessage,
|
|
1
|
+
export { init, update, setRange, setValue, view, lazy, subscriptions, subscriptionsForRoot, fractionOfValue, Model, Message, OutMessage, SubscriptionDependencies, } from './index.js';
|
|
@@ -125,7 +125,7 @@ export declare const visibleWindow: (model: Model, itemCount: number, overscan:
|
|
|
125
125
|
export declare const visibleWindowVariable: <Item>(model: Model, items: ReadonlyArray<Item>, itemToRowHeightPx: (item: Item, index: number) => number, overscan: number) => Option.Option<VisibleWindow>;
|
|
126
126
|
/** Schema describing the subscription dependencies for container scroll and
|
|
127
127
|
* resize tracking. */
|
|
128
|
-
export declare const
|
|
128
|
+
export declare const SubscriptionDependencies: S.Struct<{
|
|
129
129
|
readonly containerEvents: S.Struct<{
|
|
130
130
|
readonly id: S.String;
|
|
131
131
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/virtualList/index.ts"],"names":[],"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K,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,KAAK,IAAI,CAarD,CAAA"}
|
|
@@ -237,7 +237,7 @@ export const visibleWindowVariable = (model, items, itemToRowHeightPx, overscan)
|
|
|
237
237
|
const containerElement = (id) => Option.fromNullishOr(document.getElementById(id));
|
|
238
238
|
/** Schema describing the subscription dependencies for container scroll and
|
|
239
239
|
* resize tracking. */
|
|
240
|
-
export const
|
|
240
|
+
export const SubscriptionDependencies = S.Struct({
|
|
241
241
|
containerEvents: S.Struct({
|
|
242
242
|
id: S.String,
|
|
243
243
|
}),
|
|
@@ -255,7 +255,7 @@ export const SubscriptionDeps = S.Struct({
|
|
|
255
255
|
* makes the subscription robust across SPA route changes: navigating to a
|
|
256
256
|
* page that mounts the list, away, and back all reattach correctly without
|
|
257
257
|
* the consumer having to teach the framework about navigation. */
|
|
258
|
-
export const subscriptions = makeSubscriptions(
|
|
258
|
+
export const subscriptions = makeSubscriptions(SubscriptionDependencies)({
|
|
259
259
|
containerEvents: {
|
|
260
260
|
modelToDependencies: model => ({ id: model.id }),
|
|
261
261
|
dependenciesToStream: ({ id }) => Stream.callback(queue => Effect.acquireRelease(Effect.sync(() => {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { init, update, scrollToIndex, scrollToIndexVariable, view, lazy, subscriptions, visibleWindow, visibleWindowVariable, Model, Message, ScrolledContainer, MeasuredContainer, CompletedApplyScroll,
|
|
1
|
+
export { init, update, scrollToIndex, scrollToIndexVariable, view, lazy, subscriptions, visibleWindow, visibleWindowVariable, Model, Message, ScrolledContainer, MeasuredContainer, CompletedApplyScroll, SubscriptionDependencies, } from './index.js';
|
|
2
2
|
export type { InitConfig, ViewConfig, VisibleWindow } from './index.js';
|
|
3
3
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/virtualList/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,aAAa,EACb,qBAAqB,EACrB,IAAI,EACJ,IAAI,EACJ,aAAa,EACb,aAAa,EACb,qBAAqB,EACrB,KAAK,EACL,OAAO,EACP,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/ui/virtualList/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,MAAM,EACN,aAAa,EACb,qBAAqB,EACrB,IAAI,EACJ,IAAI,EACJ,aAAa,EACb,aAAa,EACb,qBAAqB,EACrB,KAAK,EACL,OAAO,EACP,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,YAAY,CAAA;AAEnB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { init, update, scrollToIndex, scrollToIndexVariable, view, lazy, subscriptions, visibleWindow, visibleWindowVariable, Model, Message, ScrolledContainer, MeasuredContainer, CompletedApplyScroll,
|
|
1
|
+
export { init, update, scrollToIndex, scrollToIndexVariable, view, lazy, subscriptions, visibleWindow, visibleWindowVariable, Model, Message, ScrolledContainer, MeasuredContainer, CompletedApplyScroll, SubscriptionDependencies, } from './index.js';
|