@gjermundgaraba-designs/pixel-paper 0.22.2 → 0.24.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/DESIGN.md +18 -17
- package/dist/src/adapters/mermaid.d.ts.map +1 -1
- package/dist/src/adapters/mermaid.js +0 -24
- package/dist/src/announcer/announcer.d.ts.map +1 -1
- package/dist/src/announcer/announcer.js +12 -12
- package/dist/src/board/board.d.ts +0 -10
- package/dist/src/board/board.d.ts.map +1 -1
- package/dist/src/board/board.js +36 -64
- package/dist/src/board/index.d.ts +2 -1
- package/dist/src/board/index.d.ts.map +1 -1
- package/dist/src/board/index.js +2 -1
- package/dist/src/button/button.d.ts +1 -1
- package/dist/src/button/button.d.ts.map +1 -1
- package/dist/src/commandPalette/commandPalette.d.ts.map +1 -1
- package/dist/src/commandPalette/commandPalette.js +78 -83
- package/dist/src/commandPalette/keys.d.ts +2 -2
- package/dist/src/commandPalette/keys.d.ts.map +1 -1
- package/dist/src/commandPalette/keys.js +2 -4
- package/dist/src/commandPalette/match.d.ts.map +1 -1
- package/dist/src/commandPalette/match.js +2 -2
- package/dist/src/confirmDialog/confirmDialog.d.ts.map +1 -1
- package/dist/src/confirmDialog/confirmDialog.js +1 -2
- package/dist/src/copyButton/copyButton.d.ts +0 -5
- package/dist/src/copyButton/copyButton.d.ts.map +1 -1
- package/dist/src/copyButton/copyButton.js +2 -2
- package/dist/src/crumbs/crumbs.d.ts +0 -2
- package/dist/src/crumbs/crumbs.d.ts.map +1 -1
- package/dist/src/crumbs/crumbs.js +2 -2
- package/dist/src/dialog/dialog.d.ts +2 -0
- package/dist/src/dialog/dialog.d.ts.map +1 -1
- package/dist/src/dialog/dialog.js +3 -2
- package/dist/src/drag/drag.d.ts +28 -0
- package/dist/src/drag/drag.d.ts.map +1 -1
- package/dist/src/drag/drag.js +39 -17
- package/dist/src/editableTitle/editableTitle.d.ts +4 -4
- package/dist/src/field/field.d.ts +7 -1
- package/dist/src/field/field.d.ts.map +1 -1
- package/dist/src/field/field.js +14 -6
- package/dist/src/fieldset/fieldset.d.ts.map +1 -1
- package/dist/src/fieldset/fieldset.js +2 -4
- package/dist/src/fileTree/fileTree.d.ts.map +1 -1
- package/dist/src/fileTree/fileTree.js +16 -16
- package/dist/src/iconButton/iconButton.d.ts +6 -1
- package/dist/src/iconButton/iconButton.d.ts.map +1 -1
- package/dist/src/iconButton/iconButton.js +7 -2
- package/dist/src/inlineInput/inlineInput.d.ts +4 -0
- package/dist/src/inlineInput/inlineInput.d.ts.map +1 -1
- package/dist/src/inlineInput/inlineInput.js +9 -6
- package/dist/src/keyHelp/index.d.ts +1 -1
- package/dist/src/keyHelp/index.d.ts.map +1 -1
- package/dist/src/keyHelp/index.js +1 -1
- package/dist/src/keyHelp/keyHelp.d.ts +1 -3
- package/dist/src/keyHelp/keyHelp.d.ts.map +1 -1
- package/dist/src/keyHelp/keyHelp.js +3 -6
- package/dist/src/keyHint/keyLabel.d.ts +2 -0
- package/dist/src/keyHint/keyLabel.d.ts.map +1 -1
- package/dist/src/keyHint/keyLabel.js +3 -2
- package/dist/src/lineDiff/diff.d.ts +6 -3
- package/dist/src/lineDiff/diff.d.ts.map +1 -1
- package/dist/src/lineDiff/diff.js +40 -28
- package/dist/src/lineDiff/patch.d.ts.map +1 -1
- package/dist/src/lineDiff/patch.js +18 -13
- package/dist/src/linkState/linkState.d.ts.map +1 -1
- package/dist/src/linkState/linkState.js +1 -7
- package/dist/src/menu/slip.js +2 -2
- package/dist/src/meter/meter.d.ts.map +1 -1
- package/dist/src/meter/meter.js +22 -17
- package/dist/src/notice/notice.d.ts +2 -0
- package/dist/src/notice/notice.d.ts.map +1 -1
- package/dist/src/notice/notice.js +2 -1
- package/dist/src/panel/panel.d.ts +3 -0
- package/dist/src/panel/panel.d.ts.map +1 -1
- package/dist/src/panel/panel.js +2 -1
- package/dist/src/passwordField/passwordField.d.ts.map +1 -1
- package/dist/src/passwordField/passwordField.js +3 -7
- package/dist/src/rail/index.d.ts +1 -1
- package/dist/src/rail/index.d.ts.map +1 -1
- package/dist/src/rail/index.js +1 -1
- package/dist/src/rail/rail.d.ts +95 -20
- package/dist/src/rail/rail.d.ts.map +1 -1
- package/dist/src/rail/rail.js +103 -46
- package/dist/src/reel/layout.d.ts +9 -5
- package/dist/src/reel/layout.d.ts.map +1 -1
- package/dist/src/reel/layout.js +11 -5
- package/dist/src/reel/reel.d.ts.map +1 -1
- package/dist/src/reel/reel.js +122 -68
- package/dist/src/scheme/scheme.d.ts +1 -1
- package/dist/src/scheme/scheme.d.ts.map +1 -1
- package/dist/src/segmented/segmented.d.ts +0 -3
- package/dist/src/segmented/segmented.d.ts.map +1 -1
- package/dist/src/segmented/segmented.js +1 -6
- package/dist/src/selectField/selectField.d.ts.map +1 -1
- package/dist/src/selectField/selectField.js +3 -10
- package/dist/src/sortable/index.d.ts +1 -1
- package/dist/src/sortable/index.d.ts.map +1 -1
- package/dist/src/sortable/index.js +1 -1
- package/dist/src/sortable/sortable.d.ts +39 -40
- package/dist/src/sortable/sortable.d.ts.map +1 -1
- package/dist/src/sortable/sortable.js +14 -31
- package/dist/src/stack/stack.d.ts +1 -1
- package/dist/src/stack/stack.d.ts.map +1 -1
- package/dist/src/stack/stack.js +1 -1
- package/dist/src/tabs/tabs.d.ts +1 -1
- package/dist/src/tabs/tabs.d.ts.map +1 -1
- package/dist/src/tabs/tabs.js +1 -1
- package/dist/src/textareaField/textareaField.d.ts.map +1 -1
- package/dist/src/textareaField/textareaField.js +3 -7
- package/dist/src/time/time.d.ts.map +1 -1
- package/dist/src/time/time.js +4 -2
- package/dist/src/tips/index.d.ts +1 -1
- package/dist/src/tips/index.d.ts.map +1 -1
- package/dist/src/tips/tips.d.ts +30 -1
- package/dist/src/tips/tips.d.ts.map +1 -1
- package/dist/src/tips/tips.js +53 -31
- package/dist/src/toast/index.d.ts +1 -1
- package/dist/src/toast/index.d.ts.map +1 -1
- package/dist/src/toast/toast.d.ts +5 -5
- package/dist/src/toast/toast.d.ts.map +1 -1
- package/dist/src/toast/toast.js +1 -6
- package/dist/src/toolbar/toolbar.d.ts +0 -3
- package/dist/src/toolbar/toolbar.d.ts.map +1 -1
- package/dist/src/toolbar/toolbar.js +1 -2
- package/package.json +1 -1
- package/src/adapters/mermaid.ts +0 -24
- package/src/announcer/announcer.ts +13 -17
- package/src/board/board.ts +32 -80
- package/src/board/index.ts +1 -1
- package/src/button/button.ts +1 -1
- package/src/commandPalette/commandPalette.ts +21 -38
- package/src/commandPalette/keys.ts +2 -4
- package/src/commandPalette/match.ts +3 -3
- package/src/confirmDialog/confirmDialog.ts +5 -3
- package/src/copyButton/copyButton.ts +2 -5
- package/src/crumbs/crumbs.ts +2 -4
- package/src/dialog/dialog.ts +3 -2
- package/src/drag/drag.ts +54 -5
- package/src/field/field.ts +29 -7
- package/src/fieldset/fieldset.ts +2 -4
- package/src/fileTree/fileTree.ts +10 -12
- package/src/iconButton/iconButton.ts +19 -2
- package/src/inlineInput/inlineInput.ts +11 -2
- package/src/keyHelp/index.ts +0 -1
- package/src/keyHelp/keyHelp.ts +3 -9
- package/src/keyHint/keyLabel.ts +5 -2
- package/src/lineDiff/diff.ts +70 -54
- package/src/lineDiff/patch.ts +27 -14
- package/src/linkState/linkState.ts +1 -8
- package/src/menu/slip.ts +2 -2
- package/src/meter/meter.ts +25 -15
- package/src/notice/notice.ts +2 -1
- package/src/panel/panel.ts +5 -0
- package/src/passwordField/passwordField.ts +3 -7
- package/src/pixel-paper.css +200 -134
- package/src/rail/index.ts +2 -0
- package/src/rail/rail.ts +124 -44
- package/src/reel/layout.ts +14 -7
- package/src/reel/reel.ts +132 -63
- package/src/scheme/scheme.ts +1 -1
- package/src/segmented/segmented.ts +1 -9
- package/src/selectField/selectField.ts +3 -10
- package/src/sortable/index.ts +0 -1
- package/src/sortable/sortable.ts +35 -54
- package/src/stack/stack.ts +1 -1
- package/src/tabs/tabs.ts +1 -1
- package/src/textareaField/textareaField.ts +3 -7
- package/src/time/time.ts +6 -7
- package/src/tips/index.ts +1 -1
- package/src/tips/tips.ts +71 -35
- package/src/toast/index.ts +1 -1
- package/src/toast/toast.ts +2 -8
- package/src/tokens.css +7 -0
- package/src/toolbar/toolbar.ts +0 -5
- package/dist/src/inlineInput/inline.d.ts +0 -6
- package/dist/src/inlineInput/inline.d.ts.map +0 -1
- package/dist/src/inlineInput/inline.js +0 -7
- package/src/inlineInput/inline.ts +0 -13
package/dist/src/reel/reel.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
|
|
2
|
-
import { Array, Effect, Equal, Match, Number, Option, Order, Schema, Stream, String } from "effect";
|
|
2
|
+
import { Array, Effect, Equal, Match, Number, Option, Order, Queue, Schema, Stream, String, } from "effect";
|
|
3
3
|
import * as Command from "foldkit/command";
|
|
4
4
|
import { defineMessageUnion } from "foldkit/message";
|
|
5
5
|
import * as Mount from "foldkit/mount";
|
|
@@ -15,21 +15,23 @@ import * as Glyph from "../glyph/glyph.js";
|
|
|
15
15
|
import * as IconButton from "../iconButton/iconButton.js";
|
|
16
16
|
import { isPlain } from "../keys/keys.js";
|
|
17
17
|
import { prefixKeys } from "../subscription/prefixKeys.js";
|
|
18
|
-
import { OutMessage, Resize, Splitter, Step, Subject, Target, WHERE_IT_WAS, apply, columnOfTarget, fill, firstPlace, isSplitterPresent, isTargetPresent, landingWords, nextPreset, originOf, placeAt, placeOf, placeWords, requestOf, resizeOf, steppedTarget, subjectWords, targetAtPoint, whereWords, widthWords, } from "./layout.js";
|
|
18
|
+
import { OutMessage, Resize, Splitter, Step, Subject, Target, WHERE_IT_WAS, apply, columnOfTarget, fill, firstPlace, isChange, isSplitterPresent, isTargetPresent, landingWords, nextPreset, originOf, placeAt, placeOf, placeWords, requestOf, resizeOf, steppedTarget, subjectWords, targetAtPoint, whereWords, widthWords, } from "./layout.js";
|
|
19
19
|
// MODEL
|
|
20
|
+
/** How the keyboard carries what it holds: said on the grip and once it is picked up. */
|
|
21
|
+
const KEYBOARD_MOVES = "Arrow keys move it, space drops it, escape or tab puts it back.";
|
|
20
22
|
/** The words a reel says. `{pane}` is a pane's label, `{subject}` what moves (the held pane,
|
|
21
23
|
* or a column a key moves, by its first pane), `{where}` a place and `{column}` a column's
|
|
22
24
|
* number. */
|
|
23
25
|
const COPY = {
|
|
24
26
|
paneGrip: "Move {pane}",
|
|
25
|
-
gripHelp:
|
|
27
|
+
gripHelp: `Press space to pick it up. ${KEYBOARD_MOVES}`,
|
|
26
28
|
widthLabel: "Width of column {column}",
|
|
27
29
|
heightLabel: "Height of {pane}",
|
|
28
30
|
focused: "{pane}, {where}.",
|
|
29
31
|
moved: "{subject} moved to {where}.",
|
|
30
32
|
widened: "Column {column} takes {width}.",
|
|
31
33
|
pickedUp: "Picked up {subject}.",
|
|
32
|
-
pickedUpByKeyboard:
|
|
34
|
+
pickedUpByKeyboard: `Picked up {subject}. ${KEYBOARD_MOVES}`,
|
|
33
35
|
over: "{subject}, {where}.",
|
|
34
36
|
dropped: "{subject} dropped at {where}.",
|
|
35
37
|
putBack: "{subject} put back where it was.",
|
|
@@ -425,7 +427,7 @@ const focusStep = (model, layout, place) => (__foldkitBrandViewResult(({
|
|
|
425
427
|
}), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#focusStep"));
|
|
426
428
|
/** Asks for `request` with focus kept on the pane it moves, at its new place, the reel
|
|
427
429
|
* scrolled to it and the move said; nothing where it would change nothing. */
|
|
428
|
-
const requestStep = (model, layout, place, subject, maybeRequest) => __foldkitBrandViewResult((Option.match(Option.filter(maybeRequest, (request) => __foldkitBrandViewResult((
|
|
430
|
+
const requestStep = (model, layout, place, subject, maybeRequest) => __foldkitBrandViewResult((Option.match(Option.filter(maybeRequest, (request) => __foldkitBrandViewResult((isChange(layout, request)), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~36")), {
|
|
429
431
|
onNone: () => (__foldkitBrandViewResult(({ model }), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#onNone~12")),
|
|
430
432
|
onSome: (request) => {
|
|
431
433
|
const next = apply(layout, request);
|
|
@@ -495,29 +497,36 @@ export const perform = (model, action, context) => {
|
|
|
495
497
|
const EDGE_SCROLL = 40;
|
|
496
498
|
const EDGE_SCROLL_PIXELS_PER_MILLI = 0.8;
|
|
497
499
|
const LONGEST_FRAME_MILLIS = 50;
|
|
498
|
-
/** A column as the pointer reads it from the page: its edges
|
|
499
|
-
|
|
500
|
-
const columnBoxOf = (element, heldId) => {
|
|
500
|
+
/** A column as the pointer reads it from the page: its edges. */
|
|
501
|
+
const columnBoxOf = (element) => {
|
|
501
502
|
const rect = element.getBoundingClientRect();
|
|
502
503
|
return __foldkitBrandViewResult(({
|
|
503
504
|
id: element.getAttribute("data-reel-column") ?? "",
|
|
504
505
|
left: rect.left,
|
|
505
506
|
right: rect.right,
|
|
506
|
-
slotMiddles: Array.map(Array.filter(Array.fromIterable(element.querySelectorAll("[data-reel-slot]")), (slot) => __foldkitBrandViewResult((slot.getAttribute("data-reel-slot") !== heldId), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~60")), (slot) => {
|
|
507
|
-
const slotRect = slot.getBoundingClientRect();
|
|
508
|
-
return __foldkitBrandViewResult((slotRect.top + slotRect.height / 2), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~61");
|
|
509
|
-
}),
|
|
510
507
|
}), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#columnBoxOf");
|
|
511
508
|
};
|
|
509
|
+
/** The middles of a column's slots but the held pane's. */
|
|
510
|
+
const slotMiddlesOf = (element, heldId) => __foldkitBrandViewResult((Array.map(Array.filter(Array.fromIterable(element.querySelectorAll("[data-reel-slot]")), (slot) => __foldkitBrandViewResult((slot.getAttribute("data-reel-slot") !== heldId), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~60")), (slot) => {
|
|
511
|
+
const slotRect = slot.getBoundingClientRect();
|
|
512
|
+
return __foldkitBrandViewResult((slotRect.top + slotRect.height / 2), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~61");
|
|
513
|
+
})), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#slotMiddlesOf");
|
|
512
514
|
/** Where a pointer at (`clientX`, `clientY`) would drop the pane `paneId` in the reel
|
|
513
|
-
* `reelHook` names, read from where its columns and
|
|
515
|
+
* `reelHook` names, read from where its columns sit and the slots of the one it is over: none
|
|
516
|
+
* outside the reel. */
|
|
514
517
|
const pointerTarget = (reelHook, paneId, clientX, clientY) => __foldkitBrandViewResult((Option.map(Option.filter(scrollerOf(reelHook), (view) => {
|
|
515
518
|
const rect = view.getBoundingClientRect();
|
|
516
519
|
return (__foldkitBrandViewResult((clientX >= rect.left &&
|
|
517
520
|
clientX <= rect.right &&
|
|
518
521
|
clientY >= rect.top &&
|
|
519
522
|
clientY <= rect.bottom), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~62"));
|
|
520
|
-
}), (view) =>
|
|
523
|
+
}), (view) => {
|
|
524
|
+
const columns = Array.fromIterable(view.querySelectorAll("[data-reel-column]"));
|
|
525
|
+
return __foldkitBrandViewResult((targetAtPoint(Array.map(columns, columnBoxOf), clientX, clientY, (index) => __foldkitBrandViewResult((Option.match(Array.get(columns, index), {
|
|
526
|
+
onNone: () => __foldkitBrandViewResult(([]), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#onNone~16"),
|
|
527
|
+
onSome: (column) => __foldkitBrandViewResult((slotMiddlesOf(column, paneId)), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#onSome~15"),
|
|
528
|
+
})), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~64"))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~63");
|
|
529
|
+
})), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#pointerTarget");
|
|
521
530
|
const PointerHold = Schema.Struct({
|
|
522
531
|
reelHook: Schema.String,
|
|
523
532
|
paneId: Schema.String,
|
|
@@ -528,12 +537,51 @@ const pointerAt = (hold, event) => (__foldkitBrandViewResult(({
|
|
|
528
537
|
clientY: event.clientY,
|
|
529
538
|
maybeTarget: pointerTarget(hold.reelHook, hold.paneId, event.clientX, event.clientY),
|
|
530
539
|
}), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#pointerAt"));
|
|
531
|
-
/** The pressing pointer's moves, release and cancel; another pointer's are not the reel's.
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
540
|
+
/** The pressing pointer's moves, release and cancel; another pointer's are not the reel's. A
|
|
541
|
+
* pointer reports moves faster than the page draws, and each reads the reel's layout, so its
|
|
542
|
+
* moves are read once a frame, at the latest; a release first reads the move not read yet,
|
|
543
|
+
* so the pane is carried as far as the pointer went, and a cancel drops it. */
|
|
544
|
+
const pointerMessages = (hold) => __foldkitBrandViewResult((Stream.callback((queue) => __foldkitBrandViewResult((Effect.acquireRelease(Effect.sync(() => {
|
|
545
|
+
const state = { maybeMove: Option.none(), frame: 0 };
|
|
546
|
+
const offer = (message) => {
|
|
547
|
+
Queue.offerUnsafe(queue, message);
|
|
548
|
+
};
|
|
549
|
+
const readMove = () => {
|
|
550
|
+
cancelAnimationFrame(state.frame);
|
|
551
|
+
Option.map(state.maybeMove, (event) => __foldkitBrandViewResult((offer(Message.MovedPointer(pointerAt(hold, event)))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~67"));
|
|
552
|
+
state.maybeMove = Option.none();
|
|
553
|
+
};
|
|
554
|
+
const onMove = (event) => {
|
|
555
|
+
if (event.pointerId === hold.pointerId) {
|
|
556
|
+
if (Option.isNone(state.maybeMove)) {
|
|
557
|
+
state.frame = requestAnimationFrame(readMove);
|
|
558
|
+
}
|
|
559
|
+
state.maybeMove = Option.some(event);
|
|
560
|
+
}
|
|
561
|
+
};
|
|
562
|
+
const onUp = (event) => {
|
|
563
|
+
if (event.pointerId === hold.pointerId) {
|
|
564
|
+
readMove();
|
|
565
|
+
offer(Message.ReleasedPointer(pointerAt(hold, event)));
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
const onCancel = (event) => {
|
|
569
|
+
if (event.pointerId === hold.pointerId) {
|
|
570
|
+
cancelAnimationFrame(state.frame);
|
|
571
|
+
state.maybeMove = Option.none();
|
|
572
|
+
offer(Message.CancelledPointer());
|
|
573
|
+
}
|
|
574
|
+
};
|
|
575
|
+
document.addEventListener("pointermove", onMove);
|
|
576
|
+
document.addEventListener("pointerup", onUp);
|
|
577
|
+
document.addEventListener("pointercancel", onCancel);
|
|
578
|
+
return __foldkitBrandViewResult(({ state, onMove, onUp, onCancel }), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~66");
|
|
579
|
+
}), ({ state, onMove, onUp, onCancel }) => __foldkitBrandViewResult((Effect.sync(() => {
|
|
580
|
+
cancelAnimationFrame(state.frame);
|
|
581
|
+
document.removeEventListener("pointermove", onMove);
|
|
582
|
+
document.removeEventListener("pointerup", onUp);
|
|
583
|
+
document.removeEventListener("pointercancel", onCancel);
|
|
584
|
+
})), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~68"))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~65"))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#pointerMessages");
|
|
537
585
|
/** Which way a pointer at `at` scrolls a box from `low` to `high`: towards the edge it is near. */
|
|
538
586
|
const towards = (at, low, high) => {
|
|
539
587
|
if (at < low + EDGE_SCROLL) {
|
|
@@ -571,11 +619,11 @@ const edgeScroll = (hold) => __foldkitBrandViewResult((Stream.callback(() => __f
|
|
|
571
619
|
};
|
|
572
620
|
document.addEventListener("pointermove", onMove);
|
|
573
621
|
state.frame = requestAnimationFrame(step);
|
|
574
|
-
return __foldkitBrandViewResult(({ state, onMove }), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
622
|
+
return __foldkitBrandViewResult(({ state, onMove }), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~71");
|
|
575
623
|
}), ({ state, onMove }) => __foldkitBrandViewResult((Effect.sync(() => {
|
|
576
624
|
cancelAnimationFrame(state.frame);
|
|
577
625
|
document.removeEventListener("pointermove", onMove);
|
|
578
|
-
})), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
626
|
+
})), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~73")).pipe(Effect.flatMap(() => __foldkitBrandViewResult((Effect.never), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~75")))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~70"))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#edgeScroll");
|
|
579
627
|
const SplitterHold = Schema.Struct({
|
|
580
628
|
reelHook: Schema.String,
|
|
581
629
|
splitter: Splitter,
|
|
@@ -589,12 +637,12 @@ const heightOf = (element) => __foldkitBrandViewResult((element.getBoundingClien
|
|
|
589
637
|
* column's panes' height for a pane splitter. */
|
|
590
638
|
const scaleOf = (hold) => __foldkitBrandViewResult((Option.getOrElse(Option.map(scrollerOf(hold.reelHook), (view) => __foldkitBrandViewResult((Splitter.match(hold.splitter, {
|
|
591
639
|
Width: () => __foldkitBrandViewResult((view.clientWidth -
|
|
592
|
-
Option.getOrElse(Option.map(Option.fromNullishOr(view.querySelector(".reel-gap")), (gap) => __foldkitBrandViewResult((gap.getBoundingClientRect().width), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
640
|
+
Option.getOrElse(Option.map(Option.fromNullishOr(view.querySelector(".reel-gap")), (gap) => __foldkitBrandViewResult((gap.getBoundingClientRect().width), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~77")), () => __foldkitBrandViewResult((0), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~78"))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#Width"),
|
|
593
641
|
Split: ({ abovePaneId }) => __foldkitBrandViewResult((Number.sumAll(Array.map(Array.fromIterable(view
|
|
594
642
|
.querySelector(`[data-reel-slot="${CSS.escape(abovePaneId)}"]`)
|
|
595
643
|
?.closest(".reel-column")
|
|
596
644
|
?.querySelectorAll("[data-reel-slot]") ?? []), heightOf))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#Split"),
|
|
597
|
-
})), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
645
|
+
})), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~76")), () => __foldkitBrandViewResult((0), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~79"))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#scaleOf");
|
|
598
646
|
/** The dragging pointer's moves, release and cancel, as shares of the splitter's scale. */
|
|
599
647
|
const splitterMessages = (hold) => __foldkitBrandViewResult((Stream.suspend(() => {
|
|
600
648
|
const scale = scaleOf(hold);
|
|
@@ -603,28 +651,28 @@ const splitterMessages = (hold) => __foldkitBrandViewResult((Stream.suspend(() =
|
|
|
603
651
|
return __foldkitBrandViewResult((scale > 0 ? moved / scale : 0), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#shareOf");
|
|
604
652
|
};
|
|
605
653
|
return __foldkitBrandViewResult((dragMessages(hold.pointerId, {
|
|
606
|
-
moved: (event) => __foldkitBrandViewResult((Message.MovedSplitter({ share: shareOf(event) })), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#moved
|
|
607
|
-
released: (event) => __foldkitBrandViewResult((Message.ReleasedSplitter({ share: shareOf(event) })), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#released
|
|
608
|
-
cancelled: () => __foldkitBrandViewResult((Message.CancelledSplitter()), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#cancelled
|
|
609
|
-
})), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
654
|
+
moved: (event) => __foldkitBrandViewResult((Message.MovedSplitter({ share: shareOf(event) })), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#moved"),
|
|
655
|
+
released: (event) => __foldkitBrandViewResult((Message.ReleasedSplitter({ share: shareOf(event) })), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#released"),
|
|
656
|
+
cancelled: () => __foldkitBrandViewResult((Message.CancelledSplitter()), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#cancelled"),
|
|
657
|
+
})), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~80");
|
|
610
658
|
})), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#splitterMessages");
|
|
611
659
|
const pointerHoldOf = (model, isCarryingOnly) => __foldkitBrandViewResult((Option.flatMap(model.maybeHeld, ({ paneId, by }) => __foldkitBrandViewResult((By.match(by, {
|
|
612
660
|
Keyboard: () => __foldkitBrandViewResult((Option.none()), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#Keyboard~3"),
|
|
613
661
|
Pointer: ({ pointerId, isCarrying }) => __foldkitBrandViewResult((isCarryingOnly && !isCarrying
|
|
614
662
|
? Option.none()
|
|
615
663
|
: Option.some({ reelHook: model.id, paneId, pointerId })), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#Pointer~3"),
|
|
616
|
-
})), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
664
|
+
})), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~81"))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#pointerHoldOf");
|
|
617
665
|
const reelSubscriptions = Subscription.make()((entry) => (__foldkitBrandViewResult(({
|
|
618
666
|
pointer: entry({ maybeHold: Schema.Option(PointerHold) }, {
|
|
619
667
|
modelToDependencies: (model) => (__foldkitBrandViewResult(({ maybeHold: pointerHoldOf(model, false) }), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#modelToDependencies")),
|
|
620
668
|
dependenciesToStream: ({ maybeHold }) => __foldkitBrandViewResult((Option.match(maybeHold, {
|
|
621
|
-
onNone: () => __foldkitBrandViewResult((Stream.empty), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#onNone~
|
|
622
|
-
onSome: (hold) => __foldkitBrandViewResult((Stream.merge(pointerMessages(hold), markDragging)), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#onSome~
|
|
669
|
+
onNone: () => __foldkitBrandViewResult((Stream.empty), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#onNone~17"),
|
|
670
|
+
onSome: (hold) => __foldkitBrandViewResult((Stream.merge(pointerMessages(hold), markDragging)), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#onSome~16"),
|
|
623
671
|
})), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#dependenciesToStream"),
|
|
624
672
|
}),
|
|
625
673
|
edge: entry({ maybeHold: Schema.Option(PointerHold) }, {
|
|
626
674
|
modelToDependencies: (model) => (__foldkitBrandViewResult(({ maybeHold: pointerHoldOf(model, true) }), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#modelToDependencies~2")),
|
|
627
|
-
dependenciesToStream: ({ maybeHold }) => __foldkitBrandViewResult((Option.match(maybeHold, { onNone: () => __foldkitBrandViewResult((Stream.empty), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#onNone~
|
|
675
|
+
dependenciesToStream: ({ maybeHold }) => __foldkitBrandViewResult((Option.match(maybeHold, { onNone: () => __foldkitBrandViewResult((Stream.empty), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#onNone~18"), onSome: edgeScroll })), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#dependenciesToStream~2"),
|
|
628
676
|
}),
|
|
629
677
|
resize: entry({ maybeHold: Schema.Option(SplitterHold) }, {
|
|
630
678
|
modelToDependencies: (model) => (__foldkitBrandViewResult(({
|
|
@@ -634,11 +682,11 @@ const reelSubscriptions = Subscription.make()((entry) => (__foldkitBrandViewResu
|
|
|
634
682
|
pointerId,
|
|
635
683
|
pressX,
|
|
636
684
|
pressY,
|
|
637
|
-
}), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
685
|
+
}), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~83"))),
|
|
638
686
|
}), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#modelToDependencies~3")),
|
|
639
687
|
dependenciesToStream: ({ maybeHold }) => __foldkitBrandViewResult((Option.match(maybeHold, {
|
|
640
|
-
onNone: () => __foldkitBrandViewResult((Stream.empty), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#onNone~
|
|
641
|
-
onSome: (hold) => __foldkitBrandViewResult((Stream.merge(splitterMessages(hold), markDragging)), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#onSome~
|
|
688
|
+
onNone: () => __foldkitBrandViewResult((Stream.empty), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#onNone~19"),
|
|
689
|
+
onSome: (hold) => __foldkitBrandViewResult((Stream.merge(splitterMessages(hold), markDragging)), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#onSome~17"),
|
|
642
690
|
})), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#dependenciesToStream~3"),
|
|
643
691
|
}),
|
|
644
692
|
escape: entry({ isHolding: Schema.Boolean }, {
|
|
@@ -647,7 +695,7 @@ const reelSubscriptions = Subscription.make()((entry) => (__foldkitBrandViewResu
|
|
|
647
695
|
}), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#modelToDependencies~4")),
|
|
648
696
|
dependenciesToStream: ({ isHolding: isHoldingNow }) => __foldkitBrandViewResult((isHoldingNow ? escapeKeys(Message.PressedEscape()) : Stream.empty), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#dependenciesToStream~4"),
|
|
649
697
|
}),
|
|
650
|
-
}), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
698
|
+
}), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~82")));
|
|
651
699
|
/** A held pane follows the pointer (the reel scrolling near its edges), a dragged
|
|
652
700
|
* splitter resizes, and Escape puts either back, before a dialog or the page sees it, from
|
|
653
701
|
* listeners that run only while something is held. Lift them into the application's
|
|
@@ -662,7 +710,7 @@ export const SizeLiftedPane = Mount.define("SizeLiftedPane", {
|
|
|
662
710
|
messages: [Message.CompletedSizeLiftedPane],
|
|
663
711
|
execute: ({ element, sourceSelector, pressX, pressY }) => __foldkitBrandViewResult((Effect.sync(() => {
|
|
664
712
|
measureLift(element, sourceSelector, pressX, pressY);
|
|
665
|
-
return __foldkitBrandViewResult((Message.CompletedSizeLiftedPane()), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
713
|
+
return __foldkitBrandViewResult((Message.CompletedSizeLiftedPane()), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~84");
|
|
666
714
|
})), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#execute~5"),
|
|
667
715
|
});
|
|
668
716
|
const helpId = (model) => __foldkitBrandViewResult((`${model.id}-grip-help`), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#helpId");
|
|
@@ -679,30 +727,30 @@ const isDropKey = (key) => __foldkitBrandViewResult((key === " " || key === "Ent
|
|
|
679
727
|
* the pane's place in the id order, which the slot and the pane read from one list. */
|
|
680
728
|
const anchorName = (index) => __foldkitBrandViewResult((`--reel-${index}`), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anchorName");
|
|
681
729
|
/** The panes in their layer's order: by id, which no move changes. */
|
|
682
|
-
const byId = Order.mapInput(Order.String, (pane) => __foldkitBrandViewResult((pane.id), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
730
|
+
const byId = Order.mapInput(Order.String, (pane) => __foldkitBrandViewResult((pane.id), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~85"));
|
|
683
731
|
/** Where a carried drop would land, marked: none where it would change nothing. */
|
|
684
|
-
const markOf = (model, layout) => __foldkitBrandViewResult((Option.flatMap(Option.filter(model.maybeHeld, isCarried), (held) => __foldkitBrandViewResult((Option.filter(held.maybeTarget, (target) => __foldkitBrandViewResult((Option.isSome(requestOf(layout, held.paneId, target))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
685
|
-
const carriedIdOf = (model) => __foldkitBrandViewResult((Option.map(Option.filter(model.maybeHeld, isCarried), ({ paneId }) => __foldkitBrandViewResult((paneId), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
732
|
+
const markOf = (model, layout) => __foldkitBrandViewResult((Option.flatMap(Option.filter(model.maybeHeld, isCarried), (held) => __foldkitBrandViewResult((Option.filter(held.maybeTarget, (target) => __foldkitBrandViewResult((Option.isSome(requestOf(layout, held.paneId, target))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~87"))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~86"))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#markOf");
|
|
733
|
+
const carriedIdOf = (model) => __foldkitBrandViewResult((Option.map(Option.filter(model.maybeHeld, isCarried), ({ paneId }) => __foldkitBrandViewResult((paneId), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~88"))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#carriedIdOf");
|
|
686
734
|
const gripView = (model, pane, h) => {
|
|
687
|
-
const maybeHeldHere = Option.filter(model.maybeHeld, (held) => __foldkitBrandViewResult((held.paneId === pane.id), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
735
|
+
const maybeHeldHere = Option.filter(model.maybeHeld, (held) => __foldkitBrandViewResult((held.paneId === pane.id), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~89"));
|
|
688
736
|
const isHeld = Option.exists(maybeHeldHere, isCarried);
|
|
689
|
-
const isKeyboardHeld = Option.exists(maybeHeldHere, (held) => __foldkitBrandViewResult((held.by._tag === "Keyboard"), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
737
|
+
const isKeyboardHeld = Option.exists(maybeHeldHere, (held) => __foldkitBrandViewResult((held.by._tag === "Keyboard"), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~90"));
|
|
690
738
|
// the keyboard holds an item on its grip: the keys are the grip's own, and focus leaving the
|
|
691
739
|
// grip puts the item back, so a field reached by Tab types as it should
|
|
692
740
|
const onGripKey = h.OnKeyDownPreventDefault((key, modifiers) => {
|
|
693
741
|
if (!isPlain(modifiers)) {
|
|
694
|
-
return __foldkitBrandViewResult((Option.none()), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
742
|
+
return __foldkitBrandViewResult((Option.none()), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~91");
|
|
695
743
|
}
|
|
696
744
|
else if (isKeyboardHeld) {
|
|
697
745
|
return __foldkitBrandViewResult((isDropKey(key)
|
|
698
746
|
? Option.some(Message.DroppedHeld())
|
|
699
|
-
: Option.map(Option.fromNullishOr(HELD_STEPS[key]), (step) => __foldkitBrandViewResult((Message.SteppedHeld({ step })), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
747
|
+
: Option.map(Option.fromNullishOr(HELD_STEPS[key]), (step) => __foldkitBrandViewResult((Message.SteppedHeld({ step })), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~92"))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~91");
|
|
700
748
|
}
|
|
701
749
|
else {
|
|
702
|
-
return __foldkitBrandViewResult((Option.liftPredicate(Message.PressedGripKey({ paneId: pane.id }), () => __foldkitBrandViewResult((isIdle(model) && isDropKey(key)), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
750
|
+
return __foldkitBrandViewResult((Option.liftPredicate(Message.PressedGripKey({ paneId: pane.id }), () => __foldkitBrandViewResult((isIdle(model) && isDropKey(key)), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~93"))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~91");
|
|
703
751
|
}
|
|
704
752
|
});
|
|
705
|
-
const onGripPress = h.OnPointerDown((_pointerType, button, _screenX, _screenY, _time, clientX, clientY, pointerId) => __foldkitBrandViewResult((Option.liftPredicate(Message.PressedGrip({ paneId: pane.id, pointerId, clientX, clientY }), () => __foldkitBrandViewResult((isIdle(model) && button === LEFT_BUTTON), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
753
|
+
const onGripPress = h.OnPointerDown((_pointerType, button, _screenX, _screenY, _time, clientX, clientY, pointerId) => __foldkitBrandViewResult((Option.liftPredicate(Message.PressedGrip({ paneId: pane.id, pointerId, clientX, clientY }), () => __foldkitBrandViewResult((isIdle(model) && button === LEFT_BUTTON), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~95"))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~94"));
|
|
706
754
|
return __foldkitBrandViewResult((IconButton.view({
|
|
707
755
|
glyph: "grip",
|
|
708
756
|
label: fill(COPY.paneGrip, { pane: pane.label }),
|
|
@@ -725,16 +773,21 @@ const reelSplitterAttributes = (model, splitter, h) => __foldkitBrandViewResult(
|
|
|
725
773
|
onPress: (pointerId, clientX, clientY) => __foldkitBrandViewResult((Message.PressedSplitter({ splitter, pointerId, clientX, clientY })), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#onPress"),
|
|
726
774
|
onStep: (direction) => __foldkitBrandViewResult((Message.PressedSplitterKey({ splitter, share: direction * SPLITTER_STEP })), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#onStep"),
|
|
727
775
|
}, h)), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#reelSplitterAttributes");
|
|
728
|
-
|
|
776
|
+
/** The pane a drop into `column` is marked on, and the class that marks it: the pane it would
|
|
777
|
+
* land before, or the last one when it would land at the end, the carried pane left out. */
|
|
778
|
+
const dropMarkOf = (info, column) => __foldkitBrandViewResult((Option.flatMap(info.maybeMark, (mark) => {
|
|
729
779
|
if (mark._tag !== "Into" || mark.columnId !== column.id) {
|
|
730
|
-
return __foldkitBrandViewResult((Option.none()), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
780
|
+
return __foldkitBrandViewResult((Option.none()), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~96");
|
|
731
781
|
}
|
|
732
|
-
const others = Array.filter(column.panes, (pane) => __foldkitBrandViewResult((!Option.contains(info.maybeCarriedId, pane.id)), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
733
|
-
return __foldkitBrandViewResult((Option.orElse(Option.map(
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
782
|
+
const others = Array.filter(column.panes, (pane) => __foldkitBrandViewResult((!Option.contains(info.maybeCarriedId, pane.id)), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~97"));
|
|
783
|
+
return __foldkitBrandViewResult((Option.orElse(Option.map(Array.get(others, mark.index), ({ id }) => (__foldkitBrandViewResult(({
|
|
784
|
+
paneId: id,
|
|
785
|
+
markClass: " drop-before",
|
|
786
|
+
}), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~98"))), () => __foldkitBrandViewResult((Option.map(Option.filter(Array.last(others), () => __foldkitBrandViewResult((mark.index >= others.length), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~100")), ({ id }) => (__foldkitBrandViewResult(({ paneId: id, markClass: " drop-after" }), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~101")))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~99"))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~96");
|
|
787
|
+
})), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#dropMarkOf");
|
|
788
|
+
const isGapMarked = (info, maybeBeforeColumnId) => __foldkitBrandViewResult((Option.exists(info.maybeMark, (mark) => __foldkitBrandViewResult((mark._tag === "Gap" && Equal.equals(mark.maybeBeforeColumnId, maybeBeforeColumnId)), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~102"))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#isGapMarked");
|
|
789
|
+
const slotView = (anchors, maybeDropMark, pane, h) => __foldkitBrandViewResult((h.keyed("div")(pane.id, [
|
|
790
|
+
h.Class(`reel-slot${Option.match(Option.filter(maybeDropMark, ({ paneId }) => __foldkitBrandViewResult((paneId === pane.id), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~103")), { onNone: () => __foldkitBrandViewResult((""), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#onNone~20"), onSome: ({ markClass }) => __foldkitBrandViewResult((markClass), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#onSome~18") })}`),
|
|
738
791
|
h.DataAttribute("reel-slot", pane.id),
|
|
739
792
|
h.Style({ "--reel-weight": `${pane.weight}`, "--reel-anchor": anchors.get(pane.id) ?? "none" }),
|
|
740
793
|
])), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#slotView");
|
|
@@ -751,12 +804,13 @@ const splitView = (model, above, share, h) => __foldkitBrandViewResult((h.keyed(
|
|
|
751
804
|
])), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#splitView");
|
|
752
805
|
const columnView = (info, anchors, column, index, h) => {
|
|
753
806
|
const { model, layout } = info;
|
|
754
|
-
const total = Number.sumAll(Array.map(column.panes, (pane) => __foldkitBrandViewResult((pane.weight), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
807
|
+
const total = Number.sumAll(Array.map(column.panes, (pane) => __foldkitBrandViewResult((pane.weight), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~104")));
|
|
808
|
+
const maybeDropMark = dropMarkOf(info, column);
|
|
755
809
|
const stack = Array.flatMap(column.panes, (pane, row) => __foldkitBrandViewResult(([
|
|
756
|
-
...Array.fromOption(Option.map(Array.get(column.panes, row - 1), (above) => __foldkitBrandViewResult((splitView(model, above, total > 0 ? above.weight / total : 0, h)), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
757
|
-
slotView(
|
|
758
|
-
]), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
759
|
-
const maybeNextId = Option.map(Array.get(layout, index + 1), ({ id }) => __foldkitBrandViewResult((id), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
810
|
+
...Array.fromOption(Option.map(Array.get(column.panes, row - 1), (above) => __foldkitBrandViewResult((splitView(model, above, total > 0 ? above.weight / total : 0, h)), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~106"))),
|
|
811
|
+
slotView(anchors, maybeDropMark, pane, h),
|
|
812
|
+
]), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~105"));
|
|
813
|
+
const maybeNextId = Option.map(Array.get(layout, index + 1), ({ id }) => __foldkitBrandViewResult((id), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~107"));
|
|
760
814
|
return __foldkitBrandViewResult(([
|
|
761
815
|
h.keyed("div")(`column:${column.id}`, [
|
|
762
816
|
h.Class("reel-column"),
|
|
@@ -797,7 +851,7 @@ const paneLayerView = (info, panes, anchors, h) => {
|
|
|
797
851
|
grip: gripView(model, pane, h),
|
|
798
852
|
id: `${model.id}-${pane.id}`,
|
|
799
853
|
}),
|
|
800
|
-
])), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
854
|
+
])), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~108");
|
|
801
855
|
}))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#paneLayerView");
|
|
802
856
|
};
|
|
803
857
|
/** The copy a pointer carries: the held pane's title bar, drawn by the reel from its label,
|
|
@@ -823,11 +877,11 @@ const liftedCopyView = (info, h) => {
|
|
|
823
877
|
h.h2([], [heldLabel(layout, held)]),
|
|
824
878
|
]),
|
|
825
879
|
]),
|
|
826
|
-
]), () => __foldkitBrandViewResult((isCarrying), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
827
|
-
})), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
880
|
+
]), () => __foldkitBrandViewResult((isCarrying), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~110"))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#Pointer~4"),
|
|
881
|
+
})), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~109")))), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#liftedCopyView");
|
|
828
882
|
};
|
|
829
883
|
/** The layout as it prints, with a dragged splitter's resize shown before it is asked for. */
|
|
830
|
-
const previewed = (model, layout) => __foldkitBrandViewResult((Option.match(Option.flatMap(model.maybeResizing, ({ maybeResize }) => __foldkitBrandViewResult((maybeResize), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
884
|
+
const previewed = (model, layout) => __foldkitBrandViewResult((Option.match(Option.flatMap(model.maybeResizing, ({ maybeResize }) => __foldkitBrandViewResult((maybeResize), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~111")), { onNone: () => __foldkitBrandViewResult((layout), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#onNone~21"), onSome: (resize) => __foldkitBrandViewResult((apply(layout, resize)), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#onSome~19") })), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#previewed");
|
|
831
885
|
/**
|
|
832
886
|
* A row of columns wider than the view when it must be, each a stack of panes, scrolled
|
|
833
887
|
* sideways, and down where a column is taller than the view: `div.reel` holding the scroller
|
|
@@ -845,8 +899,8 @@ const previewed = (model, layout) => __foldkitBrandViewResult((Option.match(Opti
|
|
|
845
899
|
export const view = defineView((model, viewInputs, h) => {
|
|
846
900
|
const { label, toPaneView } = viewInputs;
|
|
847
901
|
const layout = previewed(model, viewInputs.layout);
|
|
848
|
-
const panes = Array.sort(Array.flatMap(layout, (column) => __foldkitBrandViewResult((column.panes), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
849
|
-
const anchors = new Map(Array.map(panes, (pane, index) => __foldkitBrandViewResult(([pane.id, anchorName(index)]), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
902
|
+
const panes = Array.sort(Array.flatMap(layout, (column) => __foldkitBrandViewResult((column.panes), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~113")), byId);
|
|
903
|
+
const anchors = new Map(Array.map(panes, (pane, index) => __foldkitBrandViewResult(([pane.id, anchorName(index)]), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~114")));
|
|
850
904
|
const info = {
|
|
851
905
|
model,
|
|
852
906
|
layout,
|
|
@@ -859,15 +913,15 @@ export const view = defineView((model, viewInputs, h) => {
|
|
|
859
913
|
h.div([h.Class("reel-view")], [
|
|
860
914
|
h.div([h.Class("reel-track")], [
|
|
861
915
|
h.keyed("div")("gap:start", [
|
|
862
|
-
h.Class(`reel-gap${isGapMarked(info, Option.map(Array.head(layout), ({ id }) => __foldkitBrandViewResult((id), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
916
|
+
h.Class(`reel-gap${isGapMarked(info, Option.map(Array.head(layout), ({ id }) => __foldkitBrandViewResult((id), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~115")))
|
|
863
917
|
? " drop-here"
|
|
864
918
|
: ""}`),
|
|
865
919
|
]),
|
|
866
|
-
...Array.flatMap(layout, (column, index) => __foldkitBrandViewResult((columnView(info, anchors, column, index, h)), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
920
|
+
...Array.flatMap(layout, (column, index) => __foldkitBrandViewResult((columnView(info, anchors, column, index, h)), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~116")),
|
|
867
921
|
paneLayerView(info, panes, anchors, h),
|
|
868
922
|
]),
|
|
869
923
|
]),
|
|
870
924
|
h.p([h.Id(helpId(model)), h.Class("sr-only")], [COPY.gripHelp]),
|
|
871
925
|
...liftedCopyView(info, h),
|
|
872
|
-
])), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~
|
|
926
|
+
])), "@gjermundgaraba-designs/pixel-paper/src/reel/reel.js#anonymous~112");
|
|
873
927
|
});
|
|
@@ -10,5 +10,5 @@ export type Palette = typeof Palette.Type;
|
|
|
10
10
|
/** The `data-scheme` value a scheme pins, or none for `System`. */
|
|
11
11
|
export declare const toPinnedValue: (scheme: Scheme) => Option.Option<string>;
|
|
12
12
|
/** The scheme a `data-scheme` value pins. Anything else, or nothing, is `System`. */
|
|
13
|
-
export declare const fromPinnedValue: (value: string | null
|
|
13
|
+
export declare const fromPinnedValue: (value: string | null) => Scheme;
|
|
14
14
|
//# sourceMappingURL=scheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheme.d.ts","sourceRoot":"","sources":["../../../src/scheme/scheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE/C;0FAC0F;AAC1F,eAAO,MAAM,MAAM,uDAA+C,CAAC;AACnE,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAC;AAExC;uCACuC;AACvC,eAAO,MAAM,OAAO,6CAAqC,CAAC;AAC1D,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAC;AAE1C,mEAAmE;AACnE,eAAO,MAAM,aAAa,WAAY,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAOhE,CAAC;AAEJ,qFAAqF;AACrF,eAAO,MAAM,eAAe,UAAW,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"scheme.d.ts","sourceRoot":"","sources":["../../../src/scheme/scheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE/C;0FAC0F;AAC1F,eAAO,MAAM,MAAM,uDAA+C,CAAC;AACnE,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAC;AAExC;uCACuC;AACvC,eAAO,MAAM,OAAO,6CAAqC,CAAC;AAC1D,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAC;AAE1C,mEAAmE;AACnE,eAAO,MAAM,aAAa,WAAY,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAOhE,CAAC;AAEJ,qFAAqF;AACrF,eAAO,MAAM,eAAe,UAAW,MAAM,GAAG,IAAI,KAAG,MAMpD,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Html, HtmlBuilder } from "foldkit/html";
|
|
2
|
-
import type { Attributes } from "../attributes/attributes.ts";
|
|
3
2
|
import type { GlyphName } from "../glyph/glyphs.ts";
|
|
4
3
|
/** One segment: its value, its words, and optionally a glyph printed instead of the words. */
|
|
5
4
|
export type Segment<Value extends string> = Readonly<{
|
|
@@ -15,8 +14,6 @@ export type ViewConfig<Value extends string, Message> = Readonly<{
|
|
|
15
14
|
options: ReadonlyArray<Segment<Value>>;
|
|
16
15
|
value: Value;
|
|
17
16
|
onSelect: (value: Value) => Message;
|
|
18
|
-
/** Further attributes for the group, never a class. */
|
|
19
|
-
attributes?: Attributes<Message>;
|
|
20
17
|
}>;
|
|
21
18
|
/** A choice of one: the pressed segment inverts and is `aria-pressed="true"`, the others
|
|
22
19
|
* `"false"`, in a `role="group"` named by the label. Words print as the nav strip; glyphs print as
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segmented.d.ts","sourceRoot":"","sources":["../../../src/segmented/segmented.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"segmented.d.ts","sourceRoot":"","sources":["../../../src/segmented/segmented.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAItD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAIpD,8FAA8F;AAC9F,MAAM,MAAM,OAAO,CAAC,KAAK,SAAS,MAAM,IAAI,QAAQ,CAAC;IACnD,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,iFAAiF;IACjF,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC,CAAC;AAEH,kEAAkE;AAClE,MAAM,MAAM,UAAU,CAAC,KAAK,SAAS,MAAM,EAAE,OAAO,IAAI,QAAQ,CAAC;IAC/D,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IACvC,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC;CACrC,CAAC,CAAC;AA0BH;;4DAE4D;AAC5D,eAAO,MAAM,IAAI,GAAI,KAAK,SAAS,MAAM,EAAE,OAAO,UACxC,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,KAC/B,WAAW,CAAC,OAAO,CAAC,KACtB,IAOF,CAAC"}
|
|
@@ -18,10 +18,5 @@ const segmentView = (config, option, h) => __foldkitBrandViewResult((UiButton.vi
|
|
|
18
18
|
* a compact switch of 26px cells (a layout, a density). */
|
|
19
19
|
export const view = (config, h) => {
|
|
20
20
|
const isGlyphs = Array.every(config.options, (option) => __foldkitBrandViewResult((option.glyph !== undefined), "@gjermundgaraba-designs/pixel-paper/src/segmented/segmented.js#anonymous"));
|
|
21
|
-
return __foldkitBrandViewResult((h.div([
|
|
22
|
-
...(config.attributes ?? []),
|
|
23
|
-
h.Role("group"),
|
|
24
|
-
h.AriaLabel(config.label),
|
|
25
|
-
h.Class(isGlyphs ? "switch" : "nav"),
|
|
26
|
-
], Array.map(config.options, (option) => __foldkitBrandViewResult((segmentView(config, option, h)), "@gjermundgaraba-designs/pixel-paper/src/segmented/segmented.js#anonymous~2")))), "@gjermundgaraba-designs/pixel-paper/src/segmented/segmented.js#view");
|
|
21
|
+
return __foldkitBrandViewResult((h.div([h.Role("group"), h.AriaLabel(config.label), h.Class(isGlyphs ? "switch" : "nav")], Array.map(config.options, (option) => __foldkitBrandViewResult((segmentView(config, option, h)), "@gjermundgaraba-designs/pixel-paper/src/segmented/segmented.js#anonymous~2")))), "@gjermundgaraba-designs/pixel-paper/src/segmented/segmented.js#view");
|
|
27
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectField.d.ts","sourceRoot":"","sources":["../../../src/selectField/selectField.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAMtD,qCAAqC;AACrC,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC,CAAC;AAEH,mDAAmD;AACnD,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IACjC,iDAAiD;IACjD,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;CACtC,CAAC,CAAC;AAEH,8DAA8D;AAC9D,MAAM,MAAM,UAAU,CAAC,OAAO,IAAI,QAAQ,CAAC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACrC,sEAAsE;IACtE,OAAO,EAAE,aAAa,CAAC,YAAY,GAAG,WAAW,CAAC,CAAC;IACnD,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;uCAEmC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,yFAAyF;IACzF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC,CAAC;AAoBH;;;8DAG8D;AAC9D,eAAO,MAAM,IAAI,GAAI,OAAO,UAAU,UAAU,CAAC,OAAO,CAAC,KAAK,WAAW,CAAC,OAAO,CAAC,KAAG,
|
|
1
|
+
{"version":3,"file":"selectField.d.ts","sourceRoot":"","sources":["../../../src/selectField/selectField.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAMtD,qCAAqC;AACrC,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC,CAAC;AAEH,mDAAmD;AACnD,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IACjC,iDAAiD;IACjD,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;CACtC,CAAC,CAAC;AAEH,8DAA8D;AAC9D,MAAM,MAAM,UAAU,CAAC,OAAO,IAAI,QAAQ,CAAC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACrC,sEAAsE;IACtE,OAAO,EAAE,aAAa,CAAC,YAAY,GAAG,WAAW,CAAC,CAAC;IACnD,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;uCAEmC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,yFAAyF;IACzF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC,CAAC;AAoBH;;;8DAG8D;AAC9D,eAAO,MAAM,IAAI,GAAI,OAAO,UAAU,UAAU,CAAC,OAAO,CAAC,KAAK,WAAW,CAAC,OAAO,CAAC,KAAG,IA0BpF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
|
|
2
2
|
import { Select as UiSelect } from "@foldkit/ui";
|
|
3
3
|
import { Array } from "effect";
|
|
4
|
-
import {
|
|
4
|
+
import { controlAttributes, errorView, helpView } from "../field/field.js";
|
|
5
5
|
const isGroup = (entry) => __foldkitBrandViewResult(("options" in entry), "@gjermundgaraba-designs/pixel-paper/src/selectField/selectField.js#isGroup");
|
|
6
6
|
const optionView = (h) => __foldkitBrandViewResult((({ value, label, isDisabled = false }) => __foldkitBrandViewResult((h.keyed("option")(value, [h.Value(value), h.Disabled(isDisabled)], [label])), "@gjermundgaraba-designs/pixel-paper/src/selectField/selectField.js#anonymous")), "@gjermundgaraba-designs/pixel-paper/src/selectField/selectField.js#optionView");
|
|
7
7
|
const entryView = (h) => __foldkitBrandViewResult(((entry) => __foldkitBrandViewResult((isGroup(entry)
|
|
@@ -21,16 +21,9 @@ export const view = (config, h) => {
|
|
|
21
21
|
hasDescription: help !== undefined,
|
|
22
22
|
toView: (groups) => __foldkitBrandViewResult((h.div([h.Class("field")], [
|
|
23
23
|
h.label(groups.label, [label]),
|
|
24
|
-
|
|
25
|
-
h.select([
|
|
26
|
-
...groups.select,
|
|
27
|
-
...describedByError(id, error, help !== undefined, h),
|
|
28
|
-
...(isRequired ? [h.AriaRequired(true)] : []),
|
|
29
|
-
], Array.map(options, entryView(h))),
|
|
24
|
+
h.select([...groups.select, ...controlAttributes(id, error, help, isRequired, h)], Array.map(options, entryView(h))),
|
|
30
25
|
...errorView(id, error, h),
|
|
31
|
-
...(help
|
|
32
|
-
? []
|
|
33
|
-
: [h.p([...groups.description, h.Class("field-help")], [help])]),
|
|
26
|
+
...helpView(help, groups.description, h),
|
|
34
27
|
])), "@gjermundgaraba-designs/pixel-paper/src/selectField/selectField.js#toView"),
|
|
35
28
|
}, h)), "@gjermundgaraba-designs/pixel-paper/src/selectField/selectField.js#view");
|
|
36
29
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { AnnounceReorder, Item, Message, Model, OutMessage, SizeLiftedItem, init,
|
|
1
|
+
export { AnnounceReorder, Item, Message, Model, OutMessage, SizeLiftedItem, init, setMovable, subscriptions, update, view, } from "./sortable.ts";
|
|
2
2
|
export type { InitConfig, ItemRender, Layout, ViewInputs } from "./sortable.ts";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sortable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,IAAI,EACJ,OAAO,EACP,KAAK,EACL,UAAU,EACV,cAAc,EACd,IAAI,EACJ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sortable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,IAAI,EACJ,OAAO,EACP,KAAK,EACL,UAAU,EACV,cAAc,EACd,IAAI,EACJ,UAAU,EACV,aAAa,EACb,MAAM,EACN,IAAI,GACL,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { AnnounceReorder, Item, Message, Model, OutMessage, SizeLiftedItem, init,
|
|
1
|
+
export { AnnounceReorder, Item, Message, Model, OutMessage, SizeLiftedItem, init, setMovable, subscriptions, update, view, } from "./sortable.js";
|