foldkit-primitives 0.11.0 → 0.12.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/dom/index.d.mts +31 -2
- package/dist/dom/index.d.mts.map +1 -1
- package/dist/dom/index.mjs +43 -2
- package/dist/dom/index.mjs.map +1 -1
- package/dist/{editable-text-Dvm-Fuqs.d.mts → editable-text-1D31qthY.d.mts} +12 -4
- package/dist/{editable-text-Dvm-Fuqs.d.mts.map → editable-text-1D31qthY.d.mts.map} +1 -1
- package/dist/{follow-tab-stop-Ci1tqAIW.mjs → follow-tab-stop-Caog2qg1.mjs} +53 -12
- package/dist/follow-tab-stop-Caog2qg1.mjs.map +1 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/interaction/index.d.mts +1 -1
- package/dist/interaction/index.mjs +1 -1
- package/package.json +3 -3
- package/dist/follow-tab-stop-Ci1tqAIW.mjs.map +0 -1
|
@@ -166,6 +166,13 @@ type DragCancelled = typeof DragCancelled.Type;
|
|
|
166
166
|
type DragFact = DragStarted | DraggedOver | DragDropped | DragCancelled;
|
|
167
167
|
/** How far, in CSS pixels, a press moves before it is a drag rather than a click. */
|
|
168
168
|
declare const DRAG_THRESHOLD = 4;
|
|
169
|
+
/**
|
|
170
|
+
* How long a finger is held still before its press is a drag. A touch that moves first is a
|
|
171
|
+
* scroll, so a list of draggable rows still scrolls under a finger.
|
|
172
|
+
*/
|
|
173
|
+
declare const HOLD_TO_DRAG_MS = 400;
|
|
174
|
+
/** How far, in CSS pixels, a held finger may wander before the hold is a scroll. */
|
|
175
|
+
declare const HOLD_SLOP = 8;
|
|
169
176
|
interface Box {
|
|
170
177
|
readonly top: number;
|
|
171
178
|
readonly height: number;
|
|
@@ -180,8 +187,9 @@ declare const boxOf: (element: Element) => Box;
|
|
|
180
187
|
/**
|
|
181
188
|
* Dragging one marked descendant of an element onto another, as a Mount. A
|
|
182
189
|
* descendant is marked by an attribute whose value is its id, as `Targets`
|
|
183
|
-
* marks them; a press on one that then moves past a threshold starts a drag
|
|
184
|
-
*
|
|
190
|
+
* marks them; a press on one that then moves past a threshold starts a drag (a
|
|
191
|
+
* finger's, held still for `HOLD_TO_DRAG_MS`, as a touch that moves first scrolls), and
|
|
192
|
+
* the pointer's place over another marked descendant is reported with the
|
|
185
193
|
* zone of it the pointer is in: its first third (`before`), its middle
|
|
186
194
|
* (`inside`), or its last third (`after`). Releasing drops, and Escape or a
|
|
187
195
|
* cancelled pointer ends the drag with nothing dropped.
|
|
@@ -307,5 +315,5 @@ declare const EditableText: Mount.MountDefinitionWithArgs<"EditableText", {
|
|
|
307
315
|
readonly field: string;
|
|
308
316
|
}>;
|
|
309
317
|
//#endregion
|
|
310
|
-
export {
|
|
311
|
-
//# sourceMappingURL=editable-text-
|
|
318
|
+
export { Moved as A, TargetPressed as C, Move as D, Fact as E, ScrollLock as M, FocusScope as N, MoveEnded as O, tabbableWithin as P, TargetHovered as S, targetOf as T, HOLD_TO_DRAG_MS as _, TextEdited as a, zoneOf as b, DRAG_THRESHOLD as c, DragFact as d, DragPlace as f, HOLD_SLOP as g, DraggedOver as h, TextCommitted as i, HideOutside as j, MoveStarted as k, DragCancelled as l, DragZone as m, EditableText as n, TextFact as o, DragStarted as p, TextCancelled as r, textOf as s, EditAsked as t, DragDropped as u, PointerDrag as v, Targets as w, TargetFact as x, boxOf as y };
|
|
319
|
+
//# sourceMappingURL=editable-text-1D31qthY.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editable-text-
|
|
1
|
+
{"version":3,"file":"editable-text-1D31qthY.d.mts","names":[],"sources":["../src/dom/focus-scope.ts","../src/dom/layers.ts","../src/dom/move.ts","../src/dom/targets.ts","../src/dom/pointer-drag.ts","../src/dom/editable-text.ts"],"mappings":";;;;cAmBa,iBAAc,MAAU,YAAU,cAAc;;;;;;;;cAmBhD,YAAU,MAAA;;;;;;;;;;;;cCtBV,YAAU,MAAA;;c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;;cA0CnB,cAAY,MAAA;;aAAZ,OAAA"}
|
|
@@ -316,6 +316,13 @@ const DragDropped = Schema.TaggedStruct("DragDropped", {
|
|
|
316
316
|
const DragCancelled = Schema.TaggedStruct("DragCancelled", { id: Schema.String });
|
|
317
317
|
/** How far, in CSS pixels, a press moves before it is a drag rather than a click. */
|
|
318
318
|
const DRAG_THRESHOLD = 4;
|
|
319
|
+
/**
|
|
320
|
+
* How long a finger is held still before its press is a drag. A touch that moves first is a
|
|
321
|
+
* scroll, so a list of draggable rows still scrolls under a finger.
|
|
322
|
+
*/
|
|
323
|
+
const HOLD_TO_DRAG_MS = 400;
|
|
324
|
+
/** How far, in CSS pixels, a held finger may wander before the hold is a scroll. */
|
|
325
|
+
const HOLD_SLOP = 8;
|
|
319
326
|
/** The zone of a box a vertical position falls in, by thirds. */
|
|
320
327
|
const zoneOf = (box, y) => {
|
|
321
328
|
if (box.height <= 0) return "inside";
|
|
@@ -335,8 +342,9 @@ const boxOf = (element) => {
|
|
|
335
342
|
/**
|
|
336
343
|
* Dragging one marked descendant of an element onto another, as a Mount. A
|
|
337
344
|
* descendant is marked by an attribute whose value is its id, as `Targets`
|
|
338
|
-
* marks them; a press on one that then moves past a threshold starts a drag
|
|
339
|
-
*
|
|
345
|
+
* marks them; a press on one that then moves past a threshold starts a drag (a
|
|
346
|
+
* finger's, held still for `HOLD_TO_DRAG_MS`, as a touch that moves first scrolls), and
|
|
347
|
+
* the pointer's place over another marked descendant is reported with the
|
|
340
348
|
* zone of it the pointer is in: its first third (`before`), its middle
|
|
341
349
|
* (`inside`), or its last third (`after`). Releasing drops, and Escape or a
|
|
342
350
|
* cancelled pointer ends the drag with nothing dropped.
|
|
@@ -397,6 +405,12 @@ const PointerDrag = Mount.defineStream("PointerDrag", {
|
|
|
397
405
|
};
|
|
398
406
|
};
|
|
399
407
|
let pressed = null;
|
|
408
|
+
let holding;
|
|
409
|
+
const begin = (id) => {
|
|
410
|
+
dragging = id;
|
|
411
|
+
owner.getSelection()?.removeAllRanges();
|
|
412
|
+
Queue.offerUnsafe(queue, DragStarted.make({ id }));
|
|
413
|
+
};
|
|
400
414
|
let dragging = null;
|
|
401
415
|
let over = null;
|
|
402
416
|
let inRegion = false;
|
|
@@ -422,6 +436,8 @@ const PointerDrag = Mount.defineStream("PointerDrag", {
|
|
|
422
436
|
const withRegion = (region) => targets === void 0 ? {} : { region };
|
|
423
437
|
const ours = (event) => pressed !== null && (pressed.pointer === void 0 || event.pointerId === pressed.pointer);
|
|
424
438
|
const end = (dropped, at, inside = false) => {
|
|
439
|
+
clearTimeout(holding);
|
|
440
|
+
holding = void 0;
|
|
425
441
|
const id = dragging;
|
|
426
442
|
if (id !== null && at?.clientX !== void 0 && at.clientY !== void 0) {
|
|
427
443
|
const { place, region } = placeAt(at);
|
|
@@ -449,10 +465,10 @@ const PointerDrag = Mount.defineStream("PointerDrag", {
|
|
|
449
465
|
if (!ours(positioned) || pressed === null) return;
|
|
450
466
|
if (positioned.buttons !== void 0 && (positioned.buttons & 1) === 0) return end(false);
|
|
451
467
|
if (dragging === null) {
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
468
|
+
const moved = Math.hypot((positioned.clientX ?? 0) - pressed.x, (positioned.clientY ?? 0) - pressed.y);
|
|
469
|
+
if (pressed.touch) return moved < 8 ? void 0 : end(false);
|
|
470
|
+
if (moved < 4) return;
|
|
471
|
+
begin(pressed.id);
|
|
456
472
|
}
|
|
457
473
|
const { place, region } = placeAt(positioned);
|
|
458
474
|
if (place?.id === over?.id && place?.zone === over?.zone && place?.part === over?.part && region === inRegion) return;
|
|
@@ -478,18 +494,28 @@ const PointerDrag = Mount.defineStream("PointerDrag", {
|
|
|
478
494
|
event.stopPropagation();
|
|
479
495
|
end(false);
|
|
480
496
|
};
|
|
497
|
+
const heldStill = (event) => {
|
|
498
|
+
if (dragging !== null) event.preventDefault();
|
|
499
|
+
};
|
|
500
|
+
const noMenu = (event) => {
|
|
501
|
+
if (pressed?.touch === true) event.preventDefault();
|
|
502
|
+
};
|
|
481
503
|
let listening = false;
|
|
482
504
|
const listen = () => {
|
|
483
505
|
if (listening) return;
|
|
484
506
|
listening = true;
|
|
485
507
|
for (const [type, listener] of onDocument) owner.addEventListener(type, listener);
|
|
486
508
|
owner.addEventListener("keydown", onEscape, true);
|
|
509
|
+
owner.addEventListener("touchmove", heldStill, { passive: false });
|
|
510
|
+
owner.addEventListener("contextmenu", noMenu);
|
|
487
511
|
};
|
|
488
512
|
const release = () => {
|
|
489
513
|
if (!listening) return;
|
|
490
514
|
listening = false;
|
|
491
515
|
for (const [type, listener] of onDocument) owner.removeEventListener(type, listener);
|
|
492
516
|
owner.removeEventListener("keydown", onEscape, true);
|
|
517
|
+
owner.removeEventListener("touchmove", heldStill);
|
|
518
|
+
owner.removeEventListener("contextmenu", noMenu);
|
|
493
519
|
};
|
|
494
520
|
const onElement = [
|
|
495
521
|
[
|
|
@@ -502,13 +528,19 @@ const PointerDrag = Mount.defineStream("PointerDrag", {
|
|
|
502
528
|
if (event.target instanceof Element && event.target.closest("[contenteditable]:not([contenteditable=\"false\"])") !== null) return;
|
|
503
529
|
const id = targetOf(element, event.target, attribute);
|
|
504
530
|
if (id === null) return;
|
|
531
|
+
const touch = positioned.pointerType === "touch";
|
|
505
532
|
pressed = {
|
|
506
533
|
id,
|
|
507
534
|
pointer: positioned.pointerId,
|
|
508
535
|
x: positioned.clientX ?? 0,
|
|
509
|
-
y: positioned.clientY ?? 0
|
|
536
|
+
y: positioned.clientY ?? 0,
|
|
537
|
+
touch
|
|
510
538
|
};
|
|
511
539
|
listen();
|
|
540
|
+
if (touch) holding = setTimeout(() => {
|
|
541
|
+
holding = void 0;
|
|
542
|
+
if (pressed !== null && dragging === null) begin(pressed.id);
|
|
543
|
+
}, 400);
|
|
512
544
|
},
|
|
513
545
|
false
|
|
514
546
|
],
|
|
@@ -529,13 +561,22 @@ const PointerDrag = Mount.defineStream("PointerDrag", {
|
|
|
529
561
|
]
|
|
530
562
|
];
|
|
531
563
|
for (const [type, listener, capture] of onElement) element.addEventListener(type, listener, capture);
|
|
564
|
+
const callout = element instanceof HTMLElement ? element.style.getPropertyValue("-webkit-touch-callout") : void 0;
|
|
565
|
+
if (element instanceof HTMLElement) element.style.setProperty("-webkit-touch-callout", "none");
|
|
566
|
+
const stop = () => {
|
|
567
|
+
clearTimeout(holding);
|
|
568
|
+
release();
|
|
569
|
+
if (!(element instanceof HTMLElement)) return;
|
|
570
|
+
if (callout === void 0 || callout === "") element.style.removeProperty("-webkit-touch-callout");
|
|
571
|
+
else element.style.setProperty("-webkit-touch-callout", callout);
|
|
572
|
+
};
|
|
532
573
|
return {
|
|
533
574
|
onElement,
|
|
534
|
-
|
|
575
|
+
stop
|
|
535
576
|
};
|
|
536
|
-
}), ({ onElement,
|
|
577
|
+
}), ({ onElement, stop }) => Effect.sync(() => {
|
|
537
578
|
for (const [type, listener, capture] of onElement) element.removeEventListener(type, listener, capture);
|
|
538
|
-
|
|
579
|
+
stop();
|
|
539
580
|
})))
|
|
540
581
|
});
|
|
541
582
|
//#endregion
|
|
@@ -817,6 +858,6 @@ const FollowTabStop = Mount.defineStream("FollowTabStop", {
|
|
|
817
858
|
}), (stop) => Effect.sync(stop)))
|
|
818
859
|
});
|
|
819
860
|
//#endregion
|
|
820
|
-
export {
|
|
861
|
+
export { FocusScope as A, targetOf as C, Moved as D, MoveStarted as E, HideOutside as O, Targets as S, MoveEnded as T, PointerDrag as _, TextCommitted as a, TargetHovered as b, DRAG_THRESHOLD as c, DragPlace as d, DragStarted as f, HOLD_TO_DRAG_MS as g, HOLD_SLOP as h, TextCancelled as i, tabbableWithin as j, ScrollLock as k, DragCancelled as l, DraggedOver as m, EditAsked as n, TextEdited as o, DragZone as p, EditableText as r, textOf as s, FollowTabStop as t, DragDropped as u, boxOf as v, Move as w, TargetPressed as x, zoneOf as y };
|
|
821
862
|
|
|
822
|
-
//# sourceMappingURL=follow-tab-stop-
|
|
863
|
+
//# sourceMappingURL=follow-tab-stop-Caog2qg1.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"follow-tab-stop-Caog2qg1.mjs","names":[],"sources":["../src/dom/focus-scope.ts","../src/dom/layers.ts","../src/dom/move.ts","../src/dom/targets.ts","../src/dom/pointer-drag.ts","../src/dom/editable-text.ts","../src/dom/follow-tab-stop.ts"],"sourcesContent":["import { Effect, Schema, Stream } from 'effect'\nimport * as Mount from 'foldkit/mount'\n\nconst FOCUSABLE = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled]):not([type=\"hidden\"])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]',\n '[contenteditable=\"true\"]',\n].join(', ')\n\nconst isVisible = (element: Element): boolean => {\n const probe = element as { checkVisibility?: () => boolean }\n return element.closest('[hidden], [inert]') === null && (probe.checkVisibility?.() ?? true)\n}\n\n/** Tabbable descendants in DOM order: focusable, visible, and not `tabindex=\"-1\"`. */\nexport const tabbableWithin = (root: Element): ReadonlyArray<HTMLElement> =>\n Array.from(root.querySelectorAll<HTMLElement>(FOCUSABLE)).filter(\n element => element.tabIndex >= 0 && isVisible(element),\n )\n\nconst focusFirst = (elements: ReadonlyArray<HTMLElement>): boolean => {\n const first = elements[0]\n if (first === undefined) return false\n first.focus()\n return true\n}\n\n/**\n * A focus scope as a Mount: on insert it remembers what was focused, focuses\n * an initial element inside, and with `contain` keeps Tab and Shift+Tab\n * cycling inside; on unmount it gives focus back. Nothing crosses to the\n * Model: which element had focus is a DOM fact, so this is element lifecycle,\n * not state. It emits no Messages.\n */\nexport const FocusScope = Mount.defineStream('FocusScope', {\n messages: [Schema.Never],\n args: {\n /** Keep Tab, Shift+Tab, and a stray focus inside. */\n contain: Schema.Boolean,\n /** Give focus back to what had it, on unmount. */\n restore: Schema.Boolean,\n /** A selector inside the element to focus first; else the first tabbable\n * descendant, else the element itself when it is focusable. */\n initialFocus: Schema.NullOr(Schema.String),\n },\n execute: ({ element, contain, restore, initialFocus }) =>\n Stream.callback<never>(() =>\n Effect.acquireRelease(\n Effect.sync(() => {\n const ownerDocument = element.ownerDocument\n const previous = ownerDocument.activeElement\n const initial =\n initialFocus === null ? null : element.querySelector<HTMLElement>(initialFocus)\n if (initial !== null) initial.focus()\n else if (!focusFirst(tabbableWithin(element)) && element instanceof HTMLElement) {\n element.focus()\n }\n const onKeyDown = (event: Event) => {\n const key = event as KeyboardEvent\n if (key.key !== 'Tab') return\n const tabbable = tabbableWithin(element)\n const first = tabbable[0]\n const last = tabbable[tabbable.length - 1]\n if (first === undefined || last === undefined) {\n key.preventDefault()\n return\n }\n const active = ownerDocument.activeElement\n if (key.shiftKey && (active === first || !element.contains(active))) {\n key.preventDefault()\n last.focus()\n } else if (!key.shiftKey && (active === last || !element.contains(active))) {\n key.preventDefault()\n first.focus()\n }\n }\n const onFocusIn = (event: Event) => {\n const target = event.target\n if (target instanceof Node && element.contains(target)) return\n focusFirst(tabbableWithin(element))\n }\n if (contain) {\n element.addEventListener('keydown', onKeyDown)\n ownerDocument.addEventListener('focusin', onFocusIn)\n }\n return { previous, onKeyDown, onFocusIn, ownerDocument }\n }),\n ({ previous, onKeyDown, onFocusIn, ownerDocument }) =>\n Effect.sync(() => {\n if (contain) {\n element.removeEventListener('keydown', onKeyDown)\n ownerDocument.removeEventListener('focusin', onFocusIn)\n }\n if (restore && previous instanceof HTMLElement && ownerDocument.contains(previous)) {\n previous.focus()\n }\n }),\n ),\n ),\n})\n","/**\n * Two Mounts over Foldkit's own DOM helpers, for an overlay that is not a\n * native `<dialog>` or `popover`:\n *\n * - `ScrollLock` locks the document's scroll while mounted. Foldkit's lock is\n * refcounted, so nested overlays release it only when the last one goes.\n * - `HideOutside` marks everything outside the element inert while mounted,\n * through `Dom.inertOthers`, keyed by an id this Mount mints.\n *\n * Both emit no Messages; they are element lifecycle.\n */\nimport { Effect, Schema, Stream } from 'effect'\nimport * as Dom from 'foldkit/dom'\nimport * as Mount from 'foldkit/mount'\n\n/** Locks the document's scroll while the element is mounted; nested locks release with the last. */\nexport const ScrollLock = Mount.defineStream('ScrollLock', {\n messages: [Schema.Never],\n execute: () =>\n Stream.callback<never>(() => Effect.acquireRelease(Dom.lockScroll, () => Dom.unlockScroll)),\n})\n\nconst HIDE_OUTSIDE_ATTRIBUTE = 'data-foldkit-plus-hide-outside'\n\nlet minted = 0\n\n/** Makes everything outside the element inert while it is mounted, and restores it after. */\nexport const HideOutside = Mount.defineStream('HideOutside', {\n messages: [Schema.Never],\n execute: ({ element }) =>\n Stream.callback<never>(() =>\n Effect.acquireRelease(\n Effect.gen(function* () {\n // A per-mount id: Foldkit keys the inert set by it, so two overlays\n // restore independently. The attribute is how the element is found.\n const id = `hide-outside-${(minted += 1)}`\n element.setAttribute(HIDE_OUTSIDE_ATTRIBUTE, id)\n yield* Dom.inertOthers(id, [`[${HIDE_OUTSIDE_ATTRIBUTE}=\"${id}\"]`])\n return id\n }),\n id =>\n Effect.andThen(Dom.restoreInert(id), () =>\n Effect.sync(() => element.removeAttribute(HIDE_OUTSIDE_ATTRIBUTE)),\n ),\n ),\n ),\n})\n","import { Effect, Queue, Schema, Stream } from 'effect'\nimport * as Mount from 'foldkit/mount'\n\nexport const MoveStarted = Schema.TaggedStruct('MoveStarted', {\n pointerId: Schema.Number,\n pointerType: Schema.String,\n})\nexport type MoveStarted = typeof MoveStarted.Type\n\nexport const Moved = Schema.TaggedStruct('Moved', {\n pointerId: Schema.Number,\n /** From where the pointer went down, in CSS pixels. */\n deltaX: Schema.Number,\n deltaY: Schema.Number,\n pointerType: Schema.String,\n})\nexport type Moved = typeof Moved.Type\n\nexport const MoveEnded = Schema.TaggedStruct('MoveEnded', {\n pointerId: Schema.Number,\n /** `false` when the pointer was cancelled or capture was lost. */\n completed: Schema.Boolean,\n})\nexport type MoveEnded = typeof MoveEnded.Type\n\nexport type Fact = MoveStarted | Moved | MoveEnded\n\ntype PointerLike = Event & {\n readonly pointerId?: number\n readonly button?: number\n readonly pointerType?: string\n readonly clientX?: number\n readonly clientY?: number\n}\n\ntype Capturing = Element & {\n setPointerCapture?: (pointerId: number) => void\n releasePointerCapture?: (pointerId: number) => void\n}\n\n/**\n * Pointer movement on an element as a Mount: a primary-button pointer down\n * captures the pointer, each move reports the delta from where it started,\n * and up, cancel, or lost capture ends it. Nothing is decided here: a drag\n * threshold, a snap, or a constraint is the parent's `update`. Capture is\n * released with the Mount.\n */\nexport const Move = Mount.defineStream('Move', {\n messages: [MoveStarted, Moved, MoveEnded],\n execute: ({ element }) =>\n Stream.callback<Fact>(queue =>\n Effect.acquireRelease(\n Effect.sync(() => {\n const target = element as Capturing\n let active: {\n readonly pointerId: number\n readonly x: number\n readonly y: number\n } | null = null\n const offer = (fact: Fact) => Queue.offerUnsafe(queue, fact)\n const end = (pointerId: number, completed: boolean) => {\n if (active === null || active.pointerId !== pointerId) return\n active = null\n try {\n target.releasePointerCapture?.(pointerId)\n } catch {\n // Capture may already be gone; the end is still reported.\n }\n offer(MoveEnded.make({ pointerId, completed }))\n }\n const listeners: ReadonlyArray<readonly [string, (event: Event) => void]> = [\n [\n 'pointerdown',\n event => {\n const pointer = event as PointerLike\n if ((pointer.button ?? 0) !== 0 || active !== null) return\n const pointerId = pointer.pointerId ?? 0\n active = { pointerId, x: pointer.clientX ?? 0, y: pointer.clientY ?? 0 }\n try {\n target.setPointerCapture?.(pointerId)\n } catch {\n // Without capture the move still reports while over the element.\n }\n offer(MoveStarted.make({ pointerId, pointerType: pointer.pointerType ?? 'mouse' }))\n },\n ],\n [\n 'pointermove',\n event => {\n const pointer = event as PointerLike\n const pointerId = pointer.pointerId ?? 0\n if (active === null || active.pointerId !== pointerId) return\n offer(\n Moved.make({\n pointerId,\n deltaX: (pointer.clientX ?? 0) - active.x,\n deltaY: (pointer.clientY ?? 0) - active.y,\n pointerType: pointer.pointerType ?? 'mouse',\n }),\n )\n },\n ],\n ['pointerup', event => end((event as PointerLike).pointerId ?? 0, true)],\n ['pointercancel', event => end((event as PointerLike).pointerId ?? 0, false)],\n ['lostpointercapture', event => end((event as PointerLike).pointerId ?? 0, false)],\n ]\n for (const [type, listener] of listeners) element.addEventListener(type, listener)\n return { listeners, current: () => active }\n }),\n ({ listeners, current }) =>\n Effect.sync(() => {\n for (const [type, listener] of listeners) element.removeEventListener(type, listener)\n const pointer = current()\n if (pointer !== null) {\n try {\n ;(element as Capturing).releasePointerCapture?.(pointer.pointerId)\n } catch {\n // Already released.\n }\n }\n }),\n ),\n ),\n})\n","import { Effect, Queue, Schema, Stream } from 'effect'\nimport * as Mount from 'foldkit/mount'\n\nexport const TargetHovered = Schema.TaggedStruct('TargetHovered', {\n /** The marked descendant under the pointer, or `null` when there is none. */\n id: Schema.NullOr(Schema.String),\n})\nexport type TargetHovered = typeof TargetHovered.Type\n\nexport const TargetPressed = Schema.TaggedStruct('TargetPressed', {\n id: Schema.String,\n shiftKey: Schema.Boolean,\n altKey: Schema.Boolean,\n ctrlKey: Schema.Boolean,\n metaKey: Schema.Boolean,\n})\nexport type TargetPressed = typeof TargetPressed.Type\n\nexport type TargetFact = TargetHovered | TargetPressed\n\ntype Modified = Event & {\n readonly shiftKey?: boolean\n readonly altKey?: boolean\n readonly ctrlKey?: boolean\n readonly metaKey?: boolean\n}\n\n/** The id of the nearest marked element at or above `from`, inside `container`. */\nexport const targetOf = (container: Element, from: EventTarget | null, attribute: string) => {\n if (!(from instanceof Element)) return null\n const marked = from.closest(`[${attribute}]`)\n return marked !== null && container.contains(marked) ? marked.getAttribute(attribute) : null\n}\n\n/**\n * Which marked descendant of an element the pointer is over, and which one was\n * pressed, as a Mount: one set of listeners on the container, not one per item.\n * A descendant is marked by an attribute whose value is its id, such as a\n * canvas's `data-composition-node` or a table's `data-row`. The nearest marked\n * ancestor of the event's target, inside the container, is the one reported.\n *\n * What hovering or pressing means (a selection, an outline, a menu) is the\n * parent's `update`.\n */\nexport const Targets = Mount.defineStream('Targets', {\n messages: [TargetHovered, TargetPressed],\n args: {\n /** The attribute that marks a descendant, holding its id. */\n attribute: Schema.String,\n /** Prevent a press's default, such as a link navigating inside an editor's canvas. */\n preventDefault: Schema.Boolean,\n },\n execute: ({ element, attribute, preventDefault }) =>\n Stream.callback<TargetFact>(queue =>\n Effect.acquireRelease(\n Effect.sync(() => {\n let hovered: string | null = null\n const hover = (id: string | null) => {\n if (id === hovered) return\n hovered = id\n Queue.offerUnsafe(queue, TargetHovered.make({ id }))\n }\n const listeners: ReadonlyArray<readonly [string, (event: Event) => void]> = [\n ['pointerover', event => hover(targetOf(element, event.target, attribute))],\n ['pointerleave', () => hover(null)],\n [\n 'click',\n event => {\n const id = targetOf(element, event.target, attribute)\n if (id === null) return\n if (preventDefault) event.preventDefault()\n const modified = event as Modified\n Queue.offerUnsafe(\n queue,\n TargetPressed.make({\n id,\n shiftKey: modified.shiftKey === true,\n altKey: modified.altKey === true,\n ctrlKey: modified.ctrlKey === true,\n metaKey: modified.metaKey === true,\n }),\n )\n },\n ],\n ]\n for (const [type, listener] of listeners) element.addEventListener(type, listener)\n return listeners\n }),\n listeners =>\n Effect.sync(() => {\n for (const [type, listener] of listeners) element.removeEventListener(type, listener)\n }),\n ),\n ),\n})\n","import { Effect, Queue, Schema, Stream } from 'effect'\nimport * as Mount from 'foldkit/mount'\nimport { targetOf } from './targets.js'\n\nexport const DragZone = Schema.Literals(['before', 'inside', 'after'])\nexport type DragZone = typeof DragZone.Type\n\n/**\n * A marked descendant under the pointer, and the zone of it the pointer is in.\n * `part` is the value of the `part` attribute on the element found, such as\n * the empty Region of a node a drop goes into; a place with one is `inside`.\n */\nexport const DragPlace = Schema.Struct({\n id: Schema.String,\n zone: DragZone,\n part: Schema.optionalKey(Schema.String),\n})\nexport type DragPlace = typeof DragPlace.Type\n\nexport const DragStarted = Schema.TaggedStruct('DragStarted', {\n /** The marked descendant being dragged. */\n id: Schema.String,\n})\nexport type DragStarted = typeof DragStarted.Type\n\nexport const DraggedOver = Schema.TaggedStruct('DraggedOver', {\n /** Where the pointer is, or `null` over nothing marked, or over what is dragged. */\n over: Schema.NullOr(DragPlace),\n /**\n * For a drag onto `targets`: whether the pointer is inside the region they\n * are in, so `over: null` with `region: true` is its empty space (an empty\n * page, the space below the last node). Absent for a drag among its own.\n */\n region: Schema.optionalKey(Schema.Boolean),\n})\nexport type DraggedOver = typeof DraggedOver.Type\n\nexport const DragDropped = Schema.TaggedStruct('DragDropped', {\n id: Schema.String,\n over: Schema.NullOr(DragPlace),\n /** As `DraggedOver`'s: released inside the `targets` region. */\n region: Schema.optionalKey(Schema.Boolean),\n})\nexport type DragDropped = typeof DragDropped.Type\n\nexport const DragCancelled = Schema.TaggedStruct('DragCancelled', { id: Schema.String })\nexport type DragCancelled = typeof DragCancelled.Type\n\nexport type DragFact = DragStarted | DraggedOver | DragDropped | DragCancelled\n\n/** How far, in CSS pixels, a press moves before it is a drag rather than a click. */\nexport const DRAG_THRESHOLD = 4\n\n/**\n * How long a finger is held still before its press is a drag. A touch that moves first is a\n * scroll, so a list of draggable rows still scrolls under a finger.\n */\nexport const HOLD_TO_DRAG_MS = 400\n\n/** How far, in CSS pixels, a held finger may wander before the hold is a scroll. */\nexport const HOLD_SLOP = 8\n\ninterface Box {\n readonly top: number\n readonly height: number\n}\n\n/** The zone of a box a vertical position falls in, by thirds. */\nexport const zoneOf = (box: Box, y: number): DragZone => {\n if (box.height <= 0) return 'inside'\n const at = (y - box.top) / box.height\n return at < 1 / 3 ? 'before' : at > 2 / 3 ? 'after' : 'inside'\n}\n\n/**\n * An element's box. An element drawn as `display: contents` has none, so its\n * first child's stands for it, as an editor's node wrapper's does.\n */\nexport const boxOf = (element: Element): Box => {\n const own = element.getBoundingClientRect()\n if (own.width > 0 || own.height > 0) return own\n const child = element.firstElementChild\n return child === null ? own : boxOf(child)\n}\n\ntype Positioned = Event & {\n readonly clientX?: number\n readonly clientY?: number\n readonly button?: number\n readonly buttons?: number\n readonly pointerId?: number\n readonly pointerType?: string\n readonly key?: string\n}\n\n/**\n * Dragging one marked descendant of an element onto another, as a Mount. A\n * descendant is marked by an attribute whose value is its id, as `Targets`\n * marks them; a press on one that then moves past a threshold starts a drag (a\n * finger's, held still for `HOLD_TO_DRAG_MS`, as a touch that moves first scrolls), and\n * the pointer's place over another marked descendant is reported with the\n * zone of it the pointer is in: its first third (`before`), its middle\n * (`inside`), or its last third (`after`). Releasing drops, and Escape or a\n * cancelled pointer ends the drag with nothing dropped.\n *\n * It writes no roles, no `tabindex` and no key handling, so the marked\n * elements can be anything: a tree's rows, a canvas's nodes. The keyboard's way\n * to do what a drag does is the parent's to give. Geometry is measured when the\n * pointer moves and never kept; what a drop means is the parent's `update`.\n */\nexport const PointerDrag = Mount.defineStream('PointerDrag', {\n messages: [DragStarted, DraggedOver, DragDropped, DragCancelled],\n args: {\n /** The attribute that marks a descendant, holding its id. */\n attribute: Schema.String,\n /**\n * Where a drag may land, when not on the element's own marked descendants:\n * the elements marked by `attribute` inside the one `within` selects, such\n * as a palette's Blocks dragged onto a page. A drop's `over` is then one of\n * those; what is dragged is still one of the element's own. `within` is\n * looked for nearest first, under the element's closest ancestor that holds\n * a match, so two editors on one page each drop onto their own.\n */\n targets: Schema.optionalKey(Schema.Struct({ attribute: Schema.String, within: Schema.String })),\n /**\n * An attribute that names a part of what a drop lands on, on an element\n * also marked as one: a place over it carries the part and is `inside`.\n */\n part: Schema.optionalKey(Schema.String),\n },\n execute: ({ element, attribute, targets, part }) =>\n Stream.callback<DragFact>(queue =>\n Effect.acquireRelease(\n Effect.sync(() => {\n const owner = element.ownerDocument\n // What a drop lands on: the element's own marked descendants, or those of `targets`.\n const landsOn = targets?.attribute ?? attribute\n // Looked for at each move, so a redraw that replaced it is followed.\n const regionOf = (within: string): Element | null => {\n for (let at = element.parentElement; at !== null; at = at.parentElement) {\n const found = at.querySelector(within)\n if (found !== null) return found\n }\n return null\n }\n const find = (from: EventTarget | null) => {\n if (!(from instanceof Element)) return { marked: null, inRegion: false }\n const region = targets === undefined ? element : regionOf(targets.within)\n const marked = from.closest(`[${landsOn}]`)\n return {\n marked: marked !== null && region !== null && region.contains(marked) ? marked : null,\n // Only a drag onto `targets` tells its region's empty space from elsewhere.\n inRegion: targets !== undefined && region !== null && region.contains(from),\n }\n }\n // A press not yet a drag, or a drag under way: one pointer's, the first down.\n let pressed: {\n readonly id: string\n readonly pointer: number | undefined\n readonly x: number\n readonly y: number\n /** A finger's: a drag once held still, a scroll if it moves first. */\n readonly touch: boolean\n } | null = null\n let holding: ReturnType<typeof setTimeout> | undefined\n const begin = (id: string) => {\n dragging = id\n owner.getSelection()?.removeAllRanges()\n Queue.offerUnsafe(queue, DragStarted.make({ id }))\n }\n let dragging: string | null = null\n let over: DragPlace | null = null\n let inRegion = false\n // The click that ends a drag is not a press on what it ends over.\n let swallowClick = false\n\n const placeAt = (event: Positioned) => {\n // Touch and pen capture the pointer to where it went down, so the\n // event's target is the dragged element: ask what is under it instead.\n const under =\n typeof owner.elementFromPoint === 'function' && event.clientX !== undefined\n ? owner.elementFromPoint(event.clientX, event.clientY ?? 0)\n : null\n const { marked, inRegion: region } = find(under ?? event.target)\n const id = marked?.getAttribute(landsOn) ?? null\n // Over itself is over nothing, where what is dragged is among what it lands on.\n const named = part === undefined ? null : (marked?.getAttribute(part) ?? null)\n const place: DragPlace | null =\n marked === null || id === null || (targets === undefined && id === dragging)\n ? null\n : named === null\n ? { id, zone: zoneOf(boxOf(marked), event.clientY ?? 0) }\n : { id, zone: 'inside', part: named }\n return { place, region }\n }\n /** The region flag a fact carries: only for a drag onto `targets`. */\n const withRegion = (region: boolean) => (targets === undefined ? {} : { region })\n const ours = (event: Positioned) =>\n pressed !== null &&\n (pressed.pointer === undefined || event.pointerId === pressed.pointer)\n // `inside`: the release was on the container, so its click will reach it.\n // The release is hit-tested again: the layout may have moved since\n // the last move (a scroll, a row that shifted), and the drop says\n // where the pointer was let go, not where it was last seen. A\n // release with no position of its own keeps the last move's answer.\n const end = (dropped: boolean, at?: Positioned, inside = false) => {\n clearTimeout(holding)\n holding = undefined\n const id = dragging\n if (id !== null && at?.clientX !== undefined && at.clientY !== undefined) {\n const { place, region } = placeAt(at)\n over = place\n inRegion = region\n }\n pressed = null\n dragging = null\n const last = over\n const lastRegion = inRegion\n over = null\n inRegion = false\n release()\n if (id === null) return\n swallowClick = dropped && inside\n Queue.offerUnsafe(\n queue,\n dropped\n ? DragDropped.make({ id, over: last, ...withRegion(lastRegion) })\n : DragCancelled.make({ id }),\n )\n }\n\n const onDocument: ReadonlyArray<readonly [string, (event: Event) => void]> = [\n [\n 'pointermove',\n event => {\n const positioned = event as Positioned\n if (!ours(positioned) || pressed === null) return\n // Released where no pointerup reached us, such as over a frame.\n if (positioned.buttons !== undefined && (positioned.buttons & 1) === 0)\n return end(false)\n if (dragging === null) {\n const moved = Math.hypot(\n (positioned.clientX ?? 0) - pressed.x,\n (positioned.clientY ?? 0) - pressed.y,\n )\n // A finger that moves before its hold is up is scrolling, not dragging.\n if (pressed.touch) return moved < HOLD_SLOP ? undefined : end(false)\n if (moved < DRAG_THRESHOLD) return\n begin(pressed.id)\n }\n const { place, region } = placeAt(positioned)\n if (\n place?.id === over?.id &&\n place?.zone === over?.zone &&\n place?.part === over?.part &&\n region === inRegion\n )\n return\n over = place\n inRegion = region\n Queue.offerUnsafe(queue, DraggedOver.make({ over: place, ...withRegion(region) }))\n },\n ],\n [\n 'pointerup',\n event => {\n if (!ours(event as Positioned)) return\n if (dragging === null) end(false)\n else\n end(\n true,\n event as Positioned,\n event.target instanceof Node && element.contains(event.target),\n )\n },\n ],\n [\n 'pointercancel',\n event => {\n if (ours(event as Positioned)) end(false)\n },\n ],\n ]\n // Heard on the way down, and kept there: an Escape that ends a drag is the\n // drag's, not also the focused element's (a canvas that would deselect).\n const onEscape = (event: Event) => {\n if (pressed === null || (event as Positioned).key !== 'Escape') return\n event.preventDefault()\n event.stopPropagation()\n end(false)\n }\n // Once a finger's drag is under way, the browser must not take its moves for a scroll,\n // and a held finger opens no menu of its own (Android's `contextmenu`). Not passive:\n // only a listener that may cancel can keep the page still.\n const heldStill = (event: Event) => {\n if (dragging !== null) event.preventDefault()\n }\n const noMenu = (event: Event) => {\n if (pressed?.touch === true) event.preventDefault()\n }\n // The document is listened to only while a press is under way.\n let listening = false\n const listen = () => {\n if (listening) return\n listening = true\n for (const [type, listener] of onDocument) owner.addEventListener(type, listener)\n owner.addEventListener('keydown', onEscape, true)\n owner.addEventListener('touchmove', heldStill, { passive: false })\n owner.addEventListener('contextmenu', noMenu)\n }\n const release = () => {\n if (!listening) return\n listening = false\n for (const [type, listener] of onDocument) owner.removeEventListener(type, listener)\n owner.removeEventListener('keydown', onEscape, true)\n owner.removeEventListener('touchmove', heldStill)\n owner.removeEventListener('contextmenu', noMenu)\n }\n\n const onElement: ReadonlyArray<readonly [string, (event: Event) => void, boolean]> = [\n [\n 'pointerdown',\n event => {\n const positioned = event as Positioned\n // Any press is past the drop a swallowed click was waiting for.\n swallowClick = false\n // A second pointer while one is down is not a new drag.\n if (pressed !== null) return\n if ((positioned.button ?? 0) !== 0) return\n // A press in text being edited selects text: it is no drag.\n if (\n event.target instanceof Element &&\n event.target.closest('[contenteditable]:not([contenteditable=\"false\"])') !== null\n )\n return\n const id = targetOf(element, event.target, attribute)\n if (id === null) return\n const touch = positioned.pointerType === 'touch'\n pressed = {\n id,\n pointer: positioned.pointerId,\n x: positioned.clientX ?? 0,\n y: positioned.clientY ?? 0,\n touch,\n }\n listen()\n if (touch) {\n holding = setTimeout(() => {\n holding = undefined\n if (pressed !== null && dragging === null) begin(pressed.id)\n }, HOLD_TO_DRAG_MS)\n }\n },\n false,\n ],\n [\n 'click',\n event => {\n if (!swallowClick) return\n swallowClick = false\n event.preventDefault()\n event.stopImmediatePropagation()\n },\n true,\n ],\n // A link or an image would start the browser's own drag instead.\n ['dragstart', event => event.preventDefault(), false],\n ]\n for (const [type, listener, capture] of onElement)\n element.addEventListener(type, listener, capture)\n // No callout of iOS's own over a finger held to drag, on anything inside (inherited).\n const callout =\n element instanceof HTMLElement\n ? element.style.getPropertyValue('-webkit-touch-callout')\n : undefined\n if (element instanceof HTMLElement) {\n element.style.setProperty('-webkit-touch-callout', 'none')\n }\n // Ended mid-hold: the hold must not start a drag after it.\n const stop = () => {\n clearTimeout(holding)\n release()\n if (!(element instanceof HTMLElement)) return\n if (callout === undefined || callout === '') {\n element.style.removeProperty('-webkit-touch-callout')\n } else element.style.setProperty('-webkit-touch-callout', callout)\n }\n return { onElement, stop }\n }),\n ({ onElement, stop }) =>\n Effect.sync(() => {\n for (const [type, listener, capture] of onElement)\n element.removeEventListener(type, listener, capture)\n stop()\n }),\n ),\n ),\n})\n","import { Effect, Queue, Schema, Stream } from 'effect'\nimport * as Mount from 'foldkit/mount'\n\nexport const TextEdited = Schema.TaggedStruct('TextEdited', {\n /** The field, by its marking attribute's value. */\n field: Schema.String,\n text: Schema.String,\n})\nexport type TextEdited = typeof TextEdited.Type\n\nexport const TextCommitted = Schema.TaggedStruct('TextCommitted', {\n field: Schema.String,\n text: Schema.String,\n})\nexport type TextCommitted = typeof TextCommitted.Type\n\nexport const TextCancelled = Schema.TaggedStruct('TextCancelled', {\n field: Schema.String,\n /** The text the field had when editing began, which the DOM shows again. */\n initial: Schema.String,\n})\nexport type TextCancelled = typeof TextCancelled.Type\n\nexport const EditAsked = Schema.TaggedStruct('EditAsked', {\n /** A marked field, not editable yet, that was double-clicked. */\n field: Schema.String,\n})\nexport type EditAsked = typeof EditAsked.Type\n\nexport type TextFact = TextEdited | TextCommitted | TextCancelled | EditAsked\n\n/** Whether a field takes more than one line. */\nconst multiline = (element: HTMLElement) => element.getAttribute('aria-multiline') === 'true'\n\n/**\n * A field's text. A browser ends an edited element with a line break it adds\n * itself, which is not the author's; in one line, the author's breaks are spaces.\n */\nexport const textOf = (element: HTMLElement): string => {\n const text = element.innerText.replace(/\\r\\n?/g, '\\n').replace(/\\n$/, '')\n return multiline(element) ? text : text.replace(/\\n+/g, ' ')\n}\n\n/** Puts the caret at the end of a field, which focuses it too. */\nconst caretAtEnd = (field: HTMLElement) => {\n // Chromium also focuses on the selection below; no standard says a browser must.\n field.focus()\n const caret = document.createRange()\n caret.selectNodeContents(field)\n caret.collapse(false)\n const selection = window.getSelection()\n selection?.removeAllRanges()\n selection?.addRange(caret)\n}\n\n/** Whether a key press belongs to an input method still composing, not to the field. */\nconst composing = (event: KeyboardEvent) => event.isComposing || event.keyCode === 229\n\n/**\n * Text typed into an editable descendant of an element, as a Mount: one set of\n * listeners on the container, like `Targets`. A field is a descendant marked\n * by an attribute whose value names it, while it is `contenteditable`. The\n * view decides which one is; the Mount focuses it as it becomes so (made\n * editable, or drawn editable), with the caret at its end, and at no other\n * time. When Enter or Escape ends an edit and the view then removes the field\n * or makes it no longer editable, focus, left on nothing, comes back to the\n * container, so the next key reaches it; give the container a `tabindex`. A double-click on a marked field that is not editable yet asks for it\n * to be (`EditAsked`).\n *\n * It reads `innerText`, never `innerHTML`, so what arrives is text. A field is\n * one line unless it carries `aria-multiline=\"true\"`: in one line, a line\n * break becomes a space. Nothing is reported while an input method composes;\n * the composed text arrives once, when it is done.\n *\n * Enter commits (Shift+Enter breaks a line in a multiline field), and so does\n * leaving the field. Escape cancels, and puts the text the field had when\n * editing began back in the DOM, since a view that stopped redrawing the field\n * while it was edited will not. Where the browser lacks `plaintext-only`, a\n * paste is inserted as text. What an edit means is the parent's `update`.\n */\nexport const EditableText = Mount.defineStream('EditableText', {\n messages: [TextEdited, TextCommitted, TextCancelled, EditAsked],\n args: {\n /** The attribute that marks a field, holding its name. */\n attribute: Schema.String,\n },\n execute: ({ element, attribute }) =>\n Stream.callback<TextFact>(queue =>\n Effect.acquireRelease(\n Effect.sync(() => {\n /** The field being edited: its name, its text when editing began, and the last reported. */\n let current:\n | {\n readonly field: HTMLElement\n readonly name: string\n readonly initial: string\n reported: string\n ended: boolean\n }\n | undefined\n let composingText = false\n // A field whose edit a key ended: when it leaves with focus on nothing, focus\n // comes back to the container, where the keys that began the edit are.\n let ending: HTMLElement | undefined\n\n /** The marked field at or above an event's target, inside the container. */\n const markedOf = (target: EventTarget | null): HTMLElement | undefined => {\n if (!(target instanceof Element)) return undefined\n const field = target.closest(`[${attribute}]`)\n return field instanceof HTMLElement && element.contains(field) ? field : undefined\n }\n /** The same, while it is editable. */\n const fieldOf = (target: EventTarget | null): HTMLElement | undefined => {\n const field = markedOf(target)\n return field?.isContentEditable === true ? field : undefined\n }\n /** Begins an edit of `field`, unless one of it is under way: on focus, or typing. */\n const begin = (field: HTMLElement) => {\n if (current?.field === field && !current.ended) return current\n const text = textOf(field)\n current = {\n field,\n name: field.getAttribute(attribute) ?? '',\n initial: text,\n reported: text,\n ended: false,\n }\n return current\n }\n /**\n * The edit of `field`: the one under way or just ended, else one begun\n * now, for a field focused before these listeners came. An ended edit\n * reports nothing more, so the blur that follows a commit or a cancel\n * does not commit again.\n */\n const editOf = (field: HTMLElement) => (current?.field === field ? current : begin(field))\n const report = (field: HTMLElement) => {\n const edit = editOf(field)\n if (edit.ended) return\n const text = textOf(field)\n // A browser may follow a composition with an input of the same text.\n if (text === edit.reported) return\n edit.reported = text\n Queue.offerUnsafe(queue, TextEdited.make({ field: edit.name, text }))\n }\n const commit = (field: HTMLElement) => {\n const edit = editOf(field)\n if (edit.ended) return\n edit.ended = true\n Queue.offerUnsafe(queue, TextCommitted.make({ field: edit.name, text: textOf(field) }))\n }\n const cancel = (field: HTMLElement) => {\n const edit = editOf(field)\n if (edit.ended) return\n edit.ended = true\n field.innerText = edit.initial\n // Writing the text moved the caret to its start; typing on goes after it.\n caretAtEnd(field)\n Queue.offerUnsafe(\n queue,\n TextCancelled.make({ field: edit.name, initial: edit.initial }),\n )\n }\n\n const listeners: ReadonlyArray<readonly [string, (event: Event) => void]> = [\n [\n 'dblclick',\n event => {\n const field = markedOf(event.target)\n // In an editable field, a double-click selects a word.\n if (field === undefined || field.isContentEditable) return\n Queue.offerUnsafe(\n queue,\n EditAsked.make({ field: field.getAttribute(attribute) ?? '' }),\n )\n },\n ],\n [\n 'focusin',\n event => {\n // A composition that never ended, in a field left, holds no other field silent.\n composingText = false\n const field = fieldOf(event.target)\n if (field !== undefined) begin(field)\n },\n ],\n // Before the change: a field focused before these listeners came is begun here.\n [\n 'beforeinput',\n event => {\n const field = fieldOf(event.target)\n if (field !== undefined) begin(field)\n },\n ],\n ['compositionstart', () => (composingText = true)],\n [\n 'compositionend',\n event => {\n composingText = false\n const field = fieldOf(event.target)\n if (field !== undefined) report(field)\n },\n ],\n [\n 'input',\n event => {\n const field = fieldOf(event.target)\n if (field !== undefined && !composingText) report(field)\n },\n ],\n [\n 'keydown',\n event => {\n const field = fieldOf(event.target)\n const key = event as KeyboardEvent\n if (field === undefined || composing(key)) return\n if (key.key === 'Escape') {\n event.preventDefault()\n ending = field\n cancel(field)\n } else if (key.key === 'Enter' && !(key.shiftKey && multiline(field))) {\n event.preventDefault()\n ending = field\n commit(field)\n }\n },\n ],\n [\n 'focusout',\n event => {\n const field = fieldOf(event.target)\n if (field === undefined) return\n // Left while still there and editable, asked once the change that may have\n // taken it away is done: the author went elsewhere, and focus is theirs.\n queueMicrotask(() => {\n if (field === ending && field.isConnected && field.isContentEditable)\n ending = undefined\n })\n commit(field)\n },\n ],\n [\n 'paste',\n event => {\n const field = fieldOf(event.target)\n // `plaintext-only` pastes text itself; elsewhere, markup would arrive.\n if (field === undefined || field.contentEditable === 'plaintext-only') return\n const pasted = (event as ClipboardEvent).clipboardData?.getData('text/plain') ?? ''\n event.preventDefault()\n // `insertText` fires no `beforeinput`: begun here, a paste after Enter is an edit.\n begin(field)\n // As typing is, so the browser's undo takes it back; `textOf` makes one line of it.\n document.execCommand('insertText', false, pasted)\n },\n ],\n ]\n // Focuses a field as it becomes editable, and only then: made so, or drawn so.\n // A field editable all along, or another going away, moves no focus.\n const editable = `[${attribute}][contenteditable]:not([contenteditable=\"false\"])`\n const becoming = new MutationObserver(records => {\n if (ending !== undefined && !(ending.isConnected && ending.isContentEditable)) {\n ending = undefined\n const focused = document.activeElement\n if ((focused === null || focused === document.body) && element instanceof HTMLElement)\n element.focus({ preventScroll: true })\n }\n for (const record of records) {\n const changed =\n record.type === 'attributes' ? [record.target] : Array.from(record.addedNodes)\n for (const node of changed) {\n if (!(node instanceof HTMLElement)) continue\n const field = node.matches(editable) ? node : node.querySelector(editable)\n if (field instanceof HTMLElement) return caretAtEnd(field)\n }\n }\n })\n\n for (const [type, listener] of listeners) element.addEventListener(type, listener)\n // A field made editable, drawn editable, or leaving.\n becoming.observe(element, {\n subtree: true,\n childList: true,\n attributes: true,\n attributeFilter: ['contenteditable'],\n })\n return { listeners, becoming }\n }),\n ({ listeners, becoming }) =>\n Effect.sync(() => {\n becoming.disconnect()\n for (const [type, listener] of listeners) element.removeEventListener(type, listener)\n }),\n ),\n ),\n})\n","import { Effect, Schema, Stream } from 'effect'\nimport * as Mount from 'foldkit/mount'\n\n/**\n * Keeps focus that is inside a container of roving tab stops on its stop, as a\n * Mount: when a transition moves the stop (a row made current by a command the\n * container did not see, such as a duplicate) or removes the focused\n * descendant (a deleted row), focus goes to the descendant with\n * `tabindex=\"0\"`. It sends no Message. Focus outside the container is never\n * taken, and focus the user moved away stays where it went.\n */\nexport const FollowTabStop = Mount.defineStream('FollowTabStop', {\n messages: [Schema.Never],\n execute: ({ element }) =>\n Stream.callback<never>(() =>\n Effect.acquireRelease(\n Effect.sync(() => {\n let within = element.contains(document.activeElement)\n const entered = () => {\n within = true\n }\n const left = (event: Event) => {\n const next = (event as FocusEvent).relatedTarget\n if (next instanceof Node && element.contains(next)) return\n const from = event.target\n // Asked once the change that may have taken it away is done: a descendant\n // removed with focus in it keeps the claim, one the user left does not.\n queueMicrotask(() => {\n if (!(from instanceof Node) || from.isConnected) within = false\n })\n }\n const follow = () => {\n if (!within) return\n const stop = element.querySelector('[tabindex=\"0\"]')\n const focused = document.activeElement\n if (!(stop instanceof HTMLElement) || stop === focused) return\n const lost = focused === null || focused === document.body\n const passed =\n focused !== null &&\n element.contains(focused) &&\n focused.getAttribute('tabindex') === '-1'\n if (lost || passed) stop.focus()\n }\n const changes = new MutationObserver(follow)\n element.addEventListener('focusin', entered)\n element.addEventListener('focusout', left)\n // A stop moved, or a descendant drawn or removed.\n changes.observe(element, {\n subtree: true,\n childList: true,\n attributes: true,\n attributeFilter: ['tabindex'],\n })\n return () => {\n changes.disconnect()\n element.removeEventListener('focusin', entered)\n element.removeEventListener('focusout', left)\n }\n }),\n stop => Effect.sync(stop),\n ),\n ),\n})\n"],"mappings":";;;;AAGA,MAAM,YAAY;CAChB;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC,CAAC,KAAK,IAAI;AAEX,MAAM,aAAa,YAA8B;CAC/C,MAAM,QAAQ;CACd,OAAO,QAAQ,QAAQ,mBAAmB,MAAM,SAAS,MAAM,kBAAkB,KAAK;AACxF;;AAGA,MAAa,kBAAkB,SAC7B,MAAM,KAAK,KAAK,iBAA8B,SAAS,CAAC,CAAC,CAAC,QACxD,YAAW,QAAQ,YAAY,KAAK,UAAU,OAAO,CACvD;AAEF,MAAM,cAAc,aAAkD;CACpE,MAAM,QAAQ,SAAS;CACvB,IAAI,UAAU,KAAA,GAAW,OAAO;CAChC,MAAM,MAAM;CACZ,OAAO;AACT;;;;;;;;AASA,MAAa,aAAa,MAAM,aAAa,cAAc;CACzD,UAAU,CAAC,OAAO,KAAK;CACvB,MAAM;;EAEJ,SAAS,OAAO;;EAEhB,SAAS,OAAO;;;EAGhB,cAAc,OAAO,OAAO,OAAO,MAAM;CAC3C;CACA,UAAU,EAAE,SAAS,SAAS,SAAS,mBACrC,OAAO,eACL,OAAO,eACL,OAAO,WAAW;EAChB,MAAM,gBAAgB,QAAQ;EAC9B,MAAM,WAAW,cAAc;EAC/B,MAAM,UACJ,iBAAiB,OAAO,OAAO,QAAQ,cAA2B,YAAY;EAChF,IAAI,YAAY,MAAM,QAAQ,MAAM;OAC/B,IAAI,CAAC,WAAW,eAAe,OAAO,CAAC,KAAK,mBAAmB,aAClE,QAAQ,MAAM;EAEhB,MAAM,aAAa,UAAiB;GAClC,MAAM,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AAI;EAEzC,QAAQ,QAAQ,SAAS;GACvB,SAAS;GACT,WAAW;GACX,YAAY;GACZ,iBAAiB,CAAC,UAAU;EAC9B,CAAC;EACD,aAAa;GACX,QAAQ,WAAW;GACnB,QAAQ,oBAAoB,WAAW,OAAO;GAC9C,QAAQ,oBAAoB,YAAY,IAAI;EAC9C;CACF,CAAC,IACD,SAAQ,OAAO,KAAK,IAAI,CAC1B,CACF;AACJ,CAAC"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Coordinates, FullscreenMessage, Geolocation, GeolocationMessage, GeolocationModel, LiveStream, LiveStreamService, MediaDevice, MediaDevicesHandle, MediaDevicesMessage, MediaDevicesModel, MediaStreamConstraints, MediaStreamHandle, MediaStreamMessage, MediaStreamModel, MediaTrackHandle, PermissionState, PermissionStatusHandle, PermissionsHandle, PermissionsMessage, PermissionsModel, Watch, WatchService, enterFullscreen, exitFullscreen, fullscreenChanges, mediaDevices, mediaStream, permissions } from "./device/index.mjs";
|
|
2
|
-
import { A as
|
|
3
|
-
import { Autofocus, ClipboardMessage, ClipboardReadMessage, FLUID_HOVER_ATTRIBUTE, FLUID_LIT_ATTRIBUTE, FLUID_PRESS_ATTRIBUTE, FluidAxis, FluidHover, Focused, FollowTabStop, Input, InputMask, KeepInView, KeepScrollOptions, Measure, PointerFact, PointerMoved, PointerPoint, PointerPosition, PointerPressed, PointerReleased, Rect, SCROLL_BAR_ATTRIBUTE, SCROLL_OVERLAID_ATTRIBUTE, SETTLE_QUIET, SWIPE_WINDOW, ScriptMessage, ScrollBars, ScrollSettle, ScrollSettled, ShareData, ShareMessage, Swipe, SwipeEnded, SwipeFact, SwipeStarted, Swiped, TRACK_TARGET_ATTRIBUTE, TrackBox, TrackedTarget, applyMask, copyText, cornerRadius, fluidHovered, keepScroll, loadScript, measurePaddingBox, measured, paddingBoxOf, pointedLinks, readText, scrollThumb, share, trackedBox, velocityOf } from "./dom/index.mjs";
|
|
2
|
+
import { A as Moved, C as TargetPressed, D as Move, E as Fact, M as ScrollLock, N as FocusScope, O as MoveEnded, P as tabbableWithin, S as TargetHovered, T as targetOf, _ as HOLD_TO_DRAG_MS, a as TextEdited, b as zoneOf, c as DRAG_THRESHOLD, d as DragFact, f as DragPlace, g as HOLD_SLOP, h as DraggedOver, i as TextCommitted, j as HideOutside, k as MoveStarted, l as DragCancelled, m as DragZone, n as EditableText, o as TextFact, p as DragStarted, r as TextCancelled, s as textOf, t as EditAsked, u as DragDropped, v as PointerDrag, w as Targets, x as TargetFact, y as boxOf } from "./editable-text-1D31qthY.mjs";
|
|
3
|
+
import { Autofocus, ClipboardMessage, ClipboardReadMessage, FLUID_HOVER_ATTRIBUTE, FLUID_LIT_ATTRIBUTE, FLUID_PRESS_ATTRIBUTE, FluidAxis, FluidHover, Focused, FollowTabStop, Input, InputMask, KEYBOARD_INSET, KeepInView, KeepScrollOptions, KeyboardInset, Measure, PointerFact, PointerMoved, PointerPoint, PointerPosition, PointerPressed, PointerReleased, Rect, SCROLL_BAR_ATTRIBUTE, SCROLL_OVERLAID_ATTRIBUTE, SETTLE_QUIET, SWIPE_WINDOW, ScriptMessage, ScrollBars, ScrollSettle, ScrollSettled, ShareData, ShareMessage, Swipe, SwipeEnded, SwipeFact, SwipeStarted, Swiped, TRACK_TARGET_ATTRIBUTE, TrackBox, TrackedTarget, applyMask, copyText, cornerRadius, fluidHovered, keepScroll, keyboardInset, loadScript, measurePaddingBox, measured, paddingBoxOf, pointedLinks, readText, scrollThumb, share, trackedBox, velocityOf } from "./dom/index.mjs";
|
|
4
4
|
import { a as modalityOfKey, i as Modality, n as InputModalityMessage, r as InputModalityModel, t as InputModality } from "./input-modality-BY-bSrEc.mjs";
|
|
5
5
|
import { ActiveElementMessage, Idle, IdleMessage, IdleModel, KeyPress, KeyboardMessage, PointerMessage, ScrollMessage, Visibility, VisibilityMessage, VisibilityModel, WindowSize, WindowSizeMessage, WindowSizeModel, activeElementEvents, keyboardEvents, matchHotkey, pointerEvents, scrollEvents } from "./events/index.mjs";
|
|
6
6
|
import { Breakpoints, BreakpointsMessage, BreakpointsModel, MediaQuery, MediaQueryMessage, MediaQueryModel, Platform, PlatformHints, PrefersDark, PrefersReducedMotion, breakpointFor, isBrowser, isServer, platformFromUA } from "./media/index.mjs";
|
|
@@ -9,4 +9,4 @@ import { Acquired, AcquiredSource, BroadcastChannelHandle, BroadcastMessage, Con
|
|
|
9
9
|
import { Bounds, Intersection, IntersectionChanged, Measured, Mutated, Mutation, Resize, Resized } from "./observers/index.mjs";
|
|
10
10
|
import { History, HistoryModel, Locale, LocaleMessage, LocaleModel, MasonryPlacement, MeasureRow, Pagination, PaginationMessage, PaginationModel, RowMeasured, SelectionSet, SelectionSetMessage, SelectionSetModel, Viewport, ViewportScrolled, Virtual, VirtualLayout, VirtualMessage, VirtualModel, VirtualWindow, canRedo, canUndo, distanceToEnd, history, isAtEnd, isSelected, masonry, offset, offsetFor, pageCount, range, stickyHeader, totalHeight, visibleRange, windowFor } from "./state/index.mjs";
|
|
11
11
|
import { Interval, IntervalMessage, IntervalModel, Throttle, ThrottleMessage, ThrottleModel, Throttled, Timer, TimerMessage, TimerModel, debounce, formatRelativeTime, ticks } from "./time/index.mjs";
|
|
12
|
-
export { Acquired, AcquiredSource, ActiveElementMessage, Autofocus, Bounds, Breakpoints, BreakpointsMessage, BreakpointsModel, BroadcastChannelHandle, BroadcastMessage, ClipboardMessage, ClipboardReadMessage, Conversation, ConversationHandler, Coordinates, DRAG_THRESHOLD, DragCancelled, DragDropped, DragFact, DragPlace, DragStarted, DragZone, DraggedOver, EditAsked, EditableText, FLUID_HOVER_ATTRIBUTE, FLUID_LIT_ATTRIBUTE, FLUID_PRESS_ATTRIBUTE, Fact, FluidAxis, FluidHover, FocusScope, Focused, FollowTabStop, FullscreenMessage, Geolocation, GeolocationMessage, GeolocationModel, HideOutside, History, HistoryModel, Idle, IdleMessage, IdleModel, Input, InputMask, InputModality, InputModalityMessage, InputModalityModel, Intersection, IntersectionChanged, Interval, IntervalMessage, IntervalModel, KeepInView, KeepScrollOptions, KeyPress, KeyboardMessage, LiveStream, LiveStreamService, Locale, LocaleMessage, LocaleModel, MasonryPlacement, Measure, MeasureRow, Measured, MediaDevice, MediaDevicesHandle, MediaDevicesMessage, MediaDevicesModel, MediaQuery, MediaQueryMessage, MediaQueryModel, MediaStreamConstraints, MediaStreamHandle, MediaStreamMessage, MediaStreamModel, MediaTrackHandle, Modality, motion_d_exports as Motion, Move, MoveEnded, MoveStarted, Moved, Mutated, Mutation, Online, OnlineMessage, OnlineModel, Pagination, PaginationMessage, PaginationModel, PermissionState, PermissionStatusHandle, PermissionsHandle, PermissionsMessage, PermissionsModel, Platform, PlatformHints, PointerDrag, PointerFact, PointerMessage, PointerMoved, PointerPoint, PointerPosition, PointerPressed, PointerReleased, PrefersDark, PrefersReducedMotion, Presence, PresenceMessage, PresenceModel, Rect, Resize, Resized, RowMeasured, SCROLL_BAR_ATTRIBUTE, SCROLL_OVERLAID_ATTRIBUTE, SETTLE_QUIET, SWIPE_WINDOW, ScriptMessage, ScrollBars, ScrollLock, ScrollMessage, ScrollSettle, ScrollSettled, SelectionSet, SelectionSetMessage, SelectionSetModel, ShareData, ShareMessage, SharedHost, SharedHostConnection, SharedHostOptions, Socket, SocketHandle, SocketService, SocketView, Source, SourceHandle, SourceService, Spring, SpringMessage, SpringModel, SseMessage, SseModel, SseView, StartHost, Swipe, SwipeEnded, SwipeFact, SwipeStarted, Swiped, TRACK_TARGET_ATTRIBUTE, TargetFact, TargetHovered, TargetPressed, Targets, TextCancelled, TextCommitted, TextEdited, TextFact, Throttle, ThrottleMessage, ThrottleModel, Throttled, Timer, TimerMessage, TimerModel, TrackBox, TrackedTarget, Tween, TweenMessage, TweenModel, Viewport, ViewportScrolled, Virtual, VirtualLayout, VirtualMessage, VirtualModel, VirtualWindow, Visibility, VisibilityMessage, VisibilityModel, Watch, WatchService, WebSocketMessage, WebSocketModel, WindowSize, WindowSizeMessage, WindowSizeModel, activeElementEvents, applyMask, boxOf, breakpointFor, broadcastMessages, canRedo, canUndo, copyText, cornerRadius, debounce, distanceToEnd, enterFullscreen, exitFullscreen, fluidHovered, formatRelativeTime, fullscreenChanges, history, isAtEnd, isBrowser, isLive, isOpen, isSelected, isServer, isVisible, keepScroll, keyboardEvents, loadScript, masonry, matchHotkey, measurePaddingBox, measured, mediaDevices, mediaStream, modalityOfKey, offset, offsetFor, paddingBoxOf, pageCount, permissions, platformFromUA, pointedLinks, pointerEvents, postBroadcast, range, readText, scrollEvents, scrollThumb, share, sse, stickyHeader, tabbableWithin, targetOf, textOf, ticks, totalHeight, trackedBox, velocityOf, viewOf, viewOfSse, visibleRange, websocket, windowFor, zoneOf };
|
|
12
|
+
export { Acquired, AcquiredSource, ActiveElementMessage, Autofocus, Bounds, Breakpoints, BreakpointsMessage, BreakpointsModel, BroadcastChannelHandle, BroadcastMessage, ClipboardMessage, ClipboardReadMessage, Conversation, ConversationHandler, Coordinates, DRAG_THRESHOLD, DragCancelled, DragDropped, DragFact, DragPlace, DragStarted, DragZone, DraggedOver, EditAsked, EditableText, FLUID_HOVER_ATTRIBUTE, FLUID_LIT_ATTRIBUTE, FLUID_PRESS_ATTRIBUTE, Fact, FluidAxis, FluidHover, FocusScope, Focused, FollowTabStop, FullscreenMessage, Geolocation, GeolocationMessage, GeolocationModel, HOLD_SLOP, HOLD_TO_DRAG_MS, HideOutside, History, HistoryModel, Idle, IdleMessage, IdleModel, Input, InputMask, InputModality, InputModalityMessage, InputModalityModel, Intersection, IntersectionChanged, Interval, IntervalMessage, IntervalModel, KEYBOARD_INSET, KeepInView, KeepScrollOptions, KeyPress, KeyboardInset, KeyboardMessage, LiveStream, LiveStreamService, Locale, LocaleMessage, LocaleModel, MasonryPlacement, Measure, MeasureRow, Measured, MediaDevice, MediaDevicesHandle, MediaDevicesMessage, MediaDevicesModel, MediaQuery, MediaQueryMessage, MediaQueryModel, MediaStreamConstraints, MediaStreamHandle, MediaStreamMessage, MediaStreamModel, MediaTrackHandle, Modality, motion_d_exports as Motion, Move, MoveEnded, MoveStarted, Moved, Mutated, Mutation, Online, OnlineMessage, OnlineModel, Pagination, PaginationMessage, PaginationModel, PermissionState, PermissionStatusHandle, PermissionsHandle, PermissionsMessage, PermissionsModel, Platform, PlatformHints, PointerDrag, PointerFact, PointerMessage, PointerMoved, PointerPoint, PointerPosition, PointerPressed, PointerReleased, PrefersDark, PrefersReducedMotion, Presence, PresenceMessage, PresenceModel, Rect, Resize, Resized, RowMeasured, SCROLL_BAR_ATTRIBUTE, SCROLL_OVERLAID_ATTRIBUTE, SETTLE_QUIET, SWIPE_WINDOW, ScriptMessage, ScrollBars, ScrollLock, ScrollMessage, ScrollSettle, ScrollSettled, SelectionSet, SelectionSetMessage, SelectionSetModel, ShareData, ShareMessage, SharedHost, SharedHostConnection, SharedHostOptions, Socket, SocketHandle, SocketService, SocketView, Source, SourceHandle, SourceService, Spring, SpringMessage, SpringModel, SseMessage, SseModel, SseView, StartHost, Swipe, SwipeEnded, SwipeFact, SwipeStarted, Swiped, TRACK_TARGET_ATTRIBUTE, TargetFact, TargetHovered, TargetPressed, Targets, TextCancelled, TextCommitted, TextEdited, TextFact, Throttle, ThrottleMessage, ThrottleModel, Throttled, Timer, TimerMessage, TimerModel, TrackBox, TrackedTarget, Tween, TweenMessage, TweenModel, Viewport, ViewportScrolled, Virtual, VirtualLayout, VirtualMessage, VirtualModel, VirtualWindow, Visibility, VisibilityMessage, VisibilityModel, Watch, WatchService, WebSocketMessage, WebSocketModel, WindowSize, WindowSizeMessage, WindowSizeModel, activeElementEvents, applyMask, boxOf, breakpointFor, broadcastMessages, canRedo, canUndo, copyText, cornerRadius, debounce, distanceToEnd, enterFullscreen, exitFullscreen, fluidHovered, formatRelativeTime, fullscreenChanges, history, isAtEnd, isBrowser, isLive, isOpen, isSelected, isServer, isVisible, keepScroll, keyboardEvents, keyboardInset, loadScript, masonry, matchHotkey, measurePaddingBox, measured, mediaDevices, mediaStream, modalityOfKey, offset, offsetFor, paddingBoxOf, pageCount, permissions, platformFromUA, pointedLinks, pointerEvents, postBroadcast, range, readText, scrollEvents, scrollThumb, share, sse, stickyHeader, tabbableWithin, targetOf, textOf, ticks, totalHeight, trackedBox, velocityOf, viewOf, viewOfSse, visibleRange, websocket, windowFor, zoneOf };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { Autofocus, ClipboardMessage, ClipboardReadMessage, FLUID_HOVER_ATTRIBUTE, FLUID_LIT_ATTRIBUTE, FLUID_PRESS_ATTRIBUTE, FluidHover, Focused, Input, InputMask, KeepInView, Measure, PointerMoved, PointerPoint, PointerPosition, PointerPressed, PointerReleased, SCROLL_BAR_ATTRIBUTE, SCROLL_OVERLAID_ATTRIBUTE, SETTLE_QUIET, SWIPE_WINDOW, ScriptMessage, ScrollBars, ScrollSettle, ScrollSettled, ShareData, ShareMessage, Swipe, SwipeEnded, SwipeStarted, Swiped, TRACK_TARGET_ATTRIBUTE, TrackBox, TrackedTarget, applyMask, copyText, cornerRadius, fluidHovered, keepScroll, loadScript, measurePaddingBox, measured, paddingBoxOf, pointedLinks, readText, scrollThumb, share, trackedBox, velocityOf } from "./dom/index.mjs";
|
|
1
|
+
import { A as FocusScope, C as targetOf, D as Moved, E as MoveStarted, O as HideOutside, S as Targets, T as MoveEnded, _ as PointerDrag, a as TextCommitted, b as TargetHovered, c as DRAG_THRESHOLD, d as DragPlace, f as DragStarted, g as HOLD_TO_DRAG_MS, h as HOLD_SLOP, i as TextCancelled, j as tabbableWithin, k as ScrollLock, l as DragCancelled, m as DraggedOver, n as EditAsked, o as TextEdited, p as DragZone, r as EditableText, s as textOf, t as FollowTabStop, u as DragDropped, v as boxOf, w as Move, x as TargetPressed, y as zoneOf } from "./follow-tab-stop-Caog2qg1.mjs";
|
|
2
|
+
import { Autofocus, ClipboardMessage, ClipboardReadMessage, FLUID_HOVER_ATTRIBUTE, FLUID_LIT_ATTRIBUTE, FLUID_PRESS_ATTRIBUTE, FluidHover, Focused, Input, InputMask, KEYBOARD_INSET, KeepInView, KeyboardInset, Measure, PointerMoved, PointerPoint, PointerPosition, PointerPressed, PointerReleased, SCROLL_BAR_ATTRIBUTE, SCROLL_OVERLAID_ATTRIBUTE, SETTLE_QUIET, SWIPE_WINDOW, ScriptMessage, ScrollBars, ScrollSettle, ScrollSettled, ShareData, ShareMessage, Swipe, SwipeEnded, SwipeStarted, Swiped, TRACK_TARGET_ATTRIBUTE, TrackBox, TrackedTarget, applyMask, copyText, cornerRadius, fluidHovered, keepScroll, keyboardInset, loadScript, measurePaddingBox, measured, paddingBoxOf, pointedLinks, readText, scrollThumb, share, trackedBox, velocityOf } from "./dom/index.mjs";
|
|
3
3
|
import { Coordinates, FullscreenMessage, Geolocation, GeolocationMessage, GeolocationModel, LiveStream, MediaDevice, MediaDevicesMessage, MediaDevicesModel, MediaStreamMessage, MediaStreamModel, PermissionState, PermissionsMessage, PermissionsModel, Watch, enterFullscreen, exitFullscreen, fullscreenChanges, mediaDevices, mediaStream, permissions } from "./device/index.mjs";
|
|
4
4
|
import { a as modalityOfKey, i as Modality, n as InputModalityMessage, r as InputModalityModel, t as InputModality } from "./input-modality-BXD383jg.mjs";
|
|
5
5
|
import { ActiveElementMessage, Idle, IdleMessage, IdleModel, KeyboardMessage, PointerMessage, ScrollMessage, Visibility, VisibilityMessage, VisibilityModel, WindowSize, WindowSizeMessage, WindowSizeModel, activeElementEvents, keyboardEvents, matchHotkey, pointerEvents, scrollEvents } from "./events/index.mjs";
|
|
@@ -9,4 +9,4 @@ import { BroadcastMessage, Online, OnlineMessage, OnlineModel, SharedHost, Socke
|
|
|
9
9
|
import { Bounds, Intersection, IntersectionChanged, Measured, Mutated, Mutation, Resize, Resized } from "./observers/index.mjs";
|
|
10
10
|
import { History, HistoryModel, Locale, LocaleMessage, LocaleModel, MeasureRow, Pagination, PaginationMessage, PaginationModel, RowMeasured, SelectionSet, SelectionSetMessage, SelectionSetModel, Viewport, ViewportScrolled, Virtual, VirtualMessage, VirtualModel, canRedo, canUndo, distanceToEnd, history, isAtEnd, isSelected, masonry, offset, offsetFor, pageCount, range, stickyHeader, totalHeight, visibleRange, windowFor } from "./state/index.mjs";
|
|
11
11
|
import { Interval, IntervalMessage, IntervalModel, Throttle, ThrottleMessage, ThrottleModel, Throttled, Timer, TimerMessage, TimerModel, debounce, formatRelativeTime, ticks } from "./time/index.mjs";
|
|
12
|
-
export { ActiveElementMessage, Autofocus, Bounds, Breakpoints, BreakpointsMessage, BreakpointsModel, BroadcastMessage, ClipboardMessage, ClipboardReadMessage, Coordinates, DRAG_THRESHOLD, DragCancelled, DragDropped, DragPlace, DragStarted, DragZone, DraggedOver, EditAsked, EditableText, FLUID_HOVER_ATTRIBUTE, FLUID_LIT_ATTRIBUTE, FLUID_PRESS_ATTRIBUTE, FluidHover, FocusScope, Focused, FollowTabStop, FullscreenMessage, Geolocation, GeolocationMessage, GeolocationModel, HideOutside, History, HistoryModel, Idle, IdleMessage, IdleModel, Input, InputMask, InputModality, InputModalityMessage, InputModalityModel, Intersection, IntersectionChanged, Interval, IntervalMessage, IntervalModel, KeepInView, KeyboardMessage, LiveStream, Locale, LocaleMessage, LocaleModel, Measure, MeasureRow, Measured, MediaDevice, MediaDevicesMessage, MediaDevicesModel, MediaQuery, MediaQueryMessage, MediaQueryModel, MediaStreamMessage, MediaStreamModel, Modality, motion_exports as Motion, Move, MoveEnded, MoveStarted, Moved, Mutated, Mutation, Online, OnlineMessage, OnlineModel, Pagination, PaginationMessage, PaginationModel, PermissionState, PermissionsMessage, PermissionsModel, Platform, PointerDrag, PointerMessage, PointerMoved, PointerPoint, PointerPosition, PointerPressed, PointerReleased, PrefersDark, PrefersReducedMotion, Presence, PresenceMessage, PresenceModel, Resize, Resized, RowMeasured, SCROLL_BAR_ATTRIBUTE, SCROLL_OVERLAID_ATTRIBUTE, SETTLE_QUIET, SWIPE_WINDOW, ScriptMessage, ScrollBars, ScrollLock, ScrollMessage, ScrollSettle, ScrollSettled, SelectionSet, SelectionSetMessage, SelectionSetModel, ShareData, ShareMessage, SharedHost, Socket, SocketView, Source, Spring, SpringMessage, SpringModel, SseMessage, SseModel, SseView, Swipe, SwipeEnded, SwipeStarted, Swiped, TRACK_TARGET_ATTRIBUTE, TargetHovered, TargetPressed, Targets, TextCancelled, TextCommitted, TextEdited, Throttle, ThrottleMessage, ThrottleModel, Throttled, Timer, TimerMessage, TimerModel, TrackBox, TrackedTarget, Tween, TweenMessage, TweenModel, Viewport, ViewportScrolled, Virtual, VirtualMessage, VirtualModel, Visibility, VisibilityMessage, VisibilityModel, Watch, WebSocketMessage, WebSocketModel, WindowSize, WindowSizeMessage, WindowSizeModel, activeElementEvents, applyMask, boxOf, breakpointFor, broadcastMessages, canRedo, canUndo, copyText, cornerRadius, debounce, distanceToEnd, enterFullscreen, exitFullscreen, fluidHovered, formatRelativeTime, fullscreenChanges, history, isAtEnd, isBrowser, isLive, isOpen, isSelected, isServer, isVisible, keepScroll, keyboardEvents, loadScript, masonry, matchHotkey, measurePaddingBox, measured, mediaDevices, mediaStream, modalityOfKey, offset, offsetFor, paddingBoxOf, pageCount, permissions, platformFromUA, pointedLinks, pointerEvents, postBroadcast, range, readText, scrollEvents, scrollThumb, share, sse, stickyHeader, tabbableWithin, targetOf, textOf, ticks, totalHeight, trackedBox, velocityOf, viewOf, viewOfSse, visibleRange, websocket, windowFor, zoneOf };
|
|
12
|
+
export { ActiveElementMessage, Autofocus, Bounds, Breakpoints, BreakpointsMessage, BreakpointsModel, BroadcastMessage, ClipboardMessage, ClipboardReadMessage, Coordinates, DRAG_THRESHOLD, DragCancelled, DragDropped, DragPlace, DragStarted, DragZone, DraggedOver, EditAsked, EditableText, FLUID_HOVER_ATTRIBUTE, FLUID_LIT_ATTRIBUTE, FLUID_PRESS_ATTRIBUTE, FluidHover, FocusScope, Focused, FollowTabStop, FullscreenMessage, Geolocation, GeolocationMessage, GeolocationModel, HOLD_SLOP, HOLD_TO_DRAG_MS, HideOutside, History, HistoryModel, Idle, IdleMessage, IdleModel, Input, InputMask, InputModality, InputModalityMessage, InputModalityModel, Intersection, IntersectionChanged, Interval, IntervalMessage, IntervalModel, KEYBOARD_INSET, KeepInView, KeyboardInset, KeyboardMessage, LiveStream, Locale, LocaleMessage, LocaleModel, Measure, MeasureRow, Measured, MediaDevice, MediaDevicesMessage, MediaDevicesModel, MediaQuery, MediaQueryMessage, MediaQueryModel, MediaStreamMessage, MediaStreamModel, Modality, motion_exports as Motion, Move, MoveEnded, MoveStarted, Moved, Mutated, Mutation, Online, OnlineMessage, OnlineModel, Pagination, PaginationMessage, PaginationModel, PermissionState, PermissionsMessage, PermissionsModel, Platform, PointerDrag, PointerMessage, PointerMoved, PointerPoint, PointerPosition, PointerPressed, PointerReleased, PrefersDark, PrefersReducedMotion, Presence, PresenceMessage, PresenceModel, Resize, Resized, RowMeasured, SCROLL_BAR_ATTRIBUTE, SCROLL_OVERLAID_ATTRIBUTE, SETTLE_QUIET, SWIPE_WINDOW, ScriptMessage, ScrollBars, ScrollLock, ScrollMessage, ScrollSettle, ScrollSettled, SelectionSet, SelectionSetMessage, SelectionSetModel, ShareData, ShareMessage, SharedHost, Socket, SocketView, Source, Spring, SpringMessage, SpringModel, SseMessage, SseModel, SseView, Swipe, SwipeEnded, SwipeStarted, Swiped, TRACK_TARGET_ATTRIBUTE, TargetHovered, TargetPressed, Targets, TextCancelled, TextCommitted, TextEdited, Throttle, ThrottleMessage, ThrottleModel, Throttled, Timer, TimerMessage, TimerModel, TrackBox, TrackedTarget, Tween, TweenMessage, TweenModel, Viewport, ViewportScrolled, Virtual, VirtualMessage, VirtualModel, Visibility, VisibilityMessage, VisibilityModel, Watch, WebSocketMessage, WebSocketModel, WindowSize, WindowSizeMessage, WindowSizeModel, activeElementEvents, applyMask, boxOf, breakpointFor, broadcastMessages, canRedo, canUndo, copyText, cornerRadius, debounce, distanceToEnd, enterFullscreen, exitFullscreen, fluidHovered, formatRelativeTime, fullscreenChanges, history, isAtEnd, isBrowser, isLive, isOpen, isSelected, isServer, isVisible, keepScroll, keyboardEvents, keyboardInset, loadScript, masonry, matchHotkey, measurePaddingBox, measured, mediaDevices, mediaStream, modalityOfKey, offset, offsetFor, paddingBoxOf, pageCount, permissions, platformFromUA, pointedLinks, pointerEvents, postBroadcast, range, readText, scrollEvents, scrollThumb, share, sse, stickyHeader, tabbableWithin, targetOf, textOf, ticks, totalHeight, trackedBox, velocityOf, viewOf, viewOfSse, visibleRange, websocket, windowFor, zoneOf };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as Moved, C as TargetPressed, D as Move, E as Fact$1, M as ScrollLock, N as FocusScope, O as MoveEnded, P as tabbableWithin, S as TargetHovered, T as targetOf, a as TextEdited, b as zoneOf, c as DRAG_THRESHOLD, d as DragFact, f as DragPlace, h as DraggedOver, i as TextCommitted, j as HideOutside, k as MoveStarted, l as DragCancelled, m as DragZone, n as EditableText, o as TextFact, p as DragStarted, r as TextCancelled, s as textOf, t as EditAsked, u as DragDropped, v as PointerDrag, w as Targets, x as TargetFact, y as boxOf } from "../editable-text-1D31qthY.mjs";
|
|
2
2
|
import { a as modalityOfKey, i as Modality, r as InputModalityModel, t as InputModality } from "../input-modality-BY-bSrEc.mjs";
|
|
3
3
|
import { Option, Schema } from "effect";
|
|
4
4
|
import * as Mount from "foldkit/mount";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
-
import { C as
|
|
2
|
+
import { A as FocusScope, C as targetOf, D as Moved, E as MoveStarted, O as HideOutside, S as Targets, T as MoveEnded, _ as PointerDrag, a as TextCommitted, b as TargetHovered, d as DragPlace, f as DragStarted, i as TextCancelled, j as tabbableWithin, k as ScrollLock, l as DragCancelled, m as DraggedOver, n as EditAsked, o as TextEdited, p as DragZone, r as EditableText, s as textOf, t as FollowTabStop, u as DragDropped, v as boxOf, w as Move, x as TargetPressed, y as zoneOf } from "../follow-tab-stop-Caog2qg1.mjs";
|
|
3
3
|
import { n as perInput, r as sameIds, t as clearQuery } from "../internal-DP-xLKbT.mjs";
|
|
4
4
|
import { a as modalityOfKey, i as Modality, t as InputModality } from "../input-modality-BXD383jg.mjs";
|
|
5
5
|
import { Effect, Option, Queue, Schema, Stream } from "effect";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foldkit-primitives",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Ready-made primitives for the Elm architecture, packaged with foldkit-bundle: media queries, presence, timers, pagination, history, sockets, observers, clipboard, and interaction Bundles with their Behaviors.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"foldkit",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"peerDependencies": {
|
|
95
95
|
"effect": "^4.0.0",
|
|
96
96
|
"foldkit": "^0.168.0",
|
|
97
|
-
"foldkit-mixins": "^0.
|
|
97
|
+
"foldkit-mixins": "^0.13.0"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
100
|
"@effect/platform-browser": "^4.0.4",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"tsdown": "^0.23.1",
|
|
106
106
|
"typescript": "7.0.2",
|
|
107
107
|
"ws": "^8.22.0",
|
|
108
|
-
"foldkit-mixins": "0.
|
|
108
|
+
"foldkit-mixins": "0.13.0"
|
|
109
109
|
},
|
|
110
110
|
"peerDependenciesMeta": {
|
|
111
111
|
"foldkit-mixins": {
|