@gjermundgaraba-designs/pixel-paper 0.22.2 → 0.23.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 +13 -13
- 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/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/passwordField/passwordField.d.ts.map +1 -1
- package/dist/src/passwordField/passwordField.js +3 -7
- package/dist/src/rail/rail.d.ts +17 -3
- package/dist/src/rail/rail.d.ts.map +1 -1
- package/dist/src/rail/rail.js +6 -6
- 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/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/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/passwordField/passwordField.ts +3 -7
- package/src/pixel-paper.css +82 -131
- package/src/rail/rail.ts +8 -6
- 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/toast/index.ts +1 -1
- package/src/toast/toast.ts +2 -8
- package/src/tokens.css +6 -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
|
@@ -174,8 +174,6 @@ export type InitConfig = Readonly<{
|
|
|
174
174
|
}>;
|
|
175
175
|
/** Creates a sortable whose items may move, with nothing held. */
|
|
176
176
|
export declare const init: (config: InitConfig) => Model;
|
|
177
|
-
/** Whether an item is pressed or held. */
|
|
178
|
-
export declare const isHolding: (model: Model) => boolean;
|
|
179
177
|
/** Says a step of a move through the page's live region (as `Announcer.Announce` does). */
|
|
180
178
|
export declare const AnnounceReorder: Command.CommandDefinitionWithArgs<"AnnounceReorder", {
|
|
181
179
|
text: Schema.String;
|
|
@@ -245,6 +243,8 @@ export declare const update: (model: Model, message: Message) => Readonly<{
|
|
|
245
243
|
}>;
|
|
246
244
|
};
|
|
247
245
|
commands?: Update.Commands<{
|
|
246
|
+
readonly _tag: "PressedEscape";
|
|
247
|
+
} | {
|
|
248
248
|
readonly _tag: "CancelledPointer";
|
|
249
249
|
} | {
|
|
250
250
|
readonly _tag: "CompletedAnnounceReorder";
|
|
@@ -253,6 +253,9 @@ export declare const update: (model: Model, message: Message) => Readonly<{
|
|
|
253
253
|
} | {
|
|
254
254
|
readonly _tag: "GotDragAndDropMessage";
|
|
255
255
|
readonly message: {
|
|
256
|
+
readonly _tag: "PressedArrowKey";
|
|
257
|
+
readonly direction: "Down" | "Left" | "NextContainer" | "PreviousContainer" | "Right" | "Up";
|
|
258
|
+
} | {
|
|
256
259
|
readonly _tag: "ActivatedKeyboardDrag";
|
|
257
260
|
readonly itemId: string;
|
|
258
261
|
readonly containerId: string;
|
|
@@ -279,9 +282,6 @@ export declare const update: (model: Model, message: Message) => Readonly<{
|
|
|
279
282
|
readonly containerId: string;
|
|
280
283
|
readonly index: number;
|
|
281
284
|
}>;
|
|
282
|
-
} | {
|
|
283
|
-
readonly _tag: "PressedArrowKey";
|
|
284
|
-
readonly direction: "Down" | "Left" | "NextContainer" | "PreviousContainer" | "Right" | "Up";
|
|
285
285
|
} | {
|
|
286
286
|
readonly _tag: "PressedDraggable";
|
|
287
287
|
readonly itemId: string;
|
|
@@ -299,8 +299,6 @@ export declare const update: (model: Model, message: Message) => Readonly<{
|
|
|
299
299
|
readonly clientX: number;
|
|
300
300
|
readonly clientY: number;
|
|
301
301
|
readonly maybeIndex: Option.Option<number>;
|
|
302
|
-
} | {
|
|
303
|
-
readonly _tag: "PressedEscape";
|
|
304
302
|
} | {
|
|
305
303
|
readonly _tag: "PressedGripKey";
|
|
306
304
|
readonly itemId: string;
|
|
@@ -346,7 +344,7 @@ export declare const setMovable: (model: Model, isMovable: boolean) => UpdateRet
|
|
|
346
344
|
* of the parent's: `subscriptions("order")` is keyed `orderPointer`, `orderEscape`,
|
|
347
345
|
* `orderKeyboard` and `orderAutoScroll`. */
|
|
348
346
|
export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) => {
|
|
349
|
-
readonly
|
|
347
|
+
readonly pointer: Subscription.EntryWithoutKeepAlive<{
|
|
350
348
|
readonly dragAndDrop: {
|
|
351
349
|
readonly id: string;
|
|
352
350
|
readonly orientation: "Horizontal" | "Vertical";
|
|
@@ -405,6 +403,8 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
405
403
|
}>;
|
|
406
404
|
}>;
|
|
407
405
|
}, {
|
|
406
|
+
readonly _tag: "PressedEscape";
|
|
407
|
+
} | {
|
|
408
408
|
readonly _tag: "CancelledPointer";
|
|
409
409
|
} | {
|
|
410
410
|
readonly _tag: "CompletedAnnounceReorder";
|
|
@@ -413,6 +413,9 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
413
413
|
} | {
|
|
414
414
|
readonly _tag: "GotDragAndDropMessage";
|
|
415
415
|
readonly message: {
|
|
416
|
+
readonly _tag: "PressedArrowKey";
|
|
417
|
+
readonly direction: "Down" | "Left" | "NextContainer" | "PreviousContainer" | "Right" | "Up";
|
|
418
|
+
} | {
|
|
416
419
|
readonly _tag: "ActivatedKeyboardDrag";
|
|
417
420
|
readonly itemId: string;
|
|
418
421
|
readonly containerId: string;
|
|
@@ -439,9 +442,6 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
439
442
|
readonly containerId: string;
|
|
440
443
|
readonly index: number;
|
|
441
444
|
}>;
|
|
442
|
-
} | {
|
|
443
|
-
readonly _tag: "PressedArrowKey";
|
|
444
|
-
readonly direction: "Down" | "Left" | "NextContainer" | "PreviousContainer" | "Right" | "Up";
|
|
445
445
|
} | {
|
|
446
446
|
readonly _tag: "PressedDraggable";
|
|
447
447
|
readonly itemId: string;
|
|
@@ -459,8 +459,6 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
459
459
|
readonly clientX: number;
|
|
460
460
|
readonly clientY: number;
|
|
461
461
|
readonly maybeIndex: Option.Option<number>;
|
|
462
|
-
} | {
|
|
463
|
-
readonly _tag: "PressedEscape";
|
|
464
462
|
} | {
|
|
465
463
|
readonly _tag: "PressedGripKey";
|
|
466
464
|
readonly itemId: string;
|
|
@@ -488,11 +486,16 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
488
486
|
readonly clientY: number;
|
|
489
487
|
readonly maybeIndex: Option.Option<number>;
|
|
490
488
|
}, {
|
|
491
|
-
readonly
|
|
489
|
+
readonly maybeHold: Option.Option<{
|
|
490
|
+
readonly listId: string;
|
|
491
|
+
readonly heldHook: string;
|
|
492
|
+
readonly pointerId: number;
|
|
493
|
+
}>;
|
|
492
494
|
}, never> & {
|
|
493
495
|
readonly __subscription: never;
|
|
494
496
|
};
|
|
495
|
-
|
|
497
|
+
} & {
|
|
498
|
+
readonly escape: Subscription.EntryWithoutKeepAlive<{
|
|
496
499
|
readonly dragAndDrop: {
|
|
497
500
|
readonly id: string;
|
|
498
501
|
readonly orientation: "Horizontal" | "Vertical";
|
|
@@ -551,6 +554,8 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
551
554
|
}>;
|
|
552
555
|
}>;
|
|
553
556
|
}, {
|
|
557
|
+
readonly _tag: "PressedEscape";
|
|
558
|
+
} | {
|
|
554
559
|
readonly _tag: "CancelledPointer";
|
|
555
560
|
} | {
|
|
556
561
|
readonly _tag: "CompletedAnnounceReorder";
|
|
@@ -559,6 +564,9 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
559
564
|
} | {
|
|
560
565
|
readonly _tag: "GotDragAndDropMessage";
|
|
561
566
|
readonly message: {
|
|
567
|
+
readonly _tag: "PressedArrowKey";
|
|
568
|
+
readonly direction: "Down" | "Left" | "NextContainer" | "PreviousContainer" | "Right" | "Up";
|
|
569
|
+
} | {
|
|
562
570
|
readonly _tag: "ActivatedKeyboardDrag";
|
|
563
571
|
readonly itemId: string;
|
|
564
572
|
readonly containerId: string;
|
|
@@ -585,9 +593,6 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
585
593
|
readonly containerId: string;
|
|
586
594
|
readonly index: number;
|
|
587
595
|
}>;
|
|
588
|
-
} | {
|
|
589
|
-
readonly _tag: "PressedArrowKey";
|
|
590
|
-
readonly direction: "Down" | "Left" | "NextContainer" | "PreviousContainer" | "Right" | "Up";
|
|
591
596
|
} | {
|
|
592
597
|
readonly _tag: "PressedDraggable";
|
|
593
598
|
readonly itemId: string;
|
|
@@ -605,8 +610,6 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
605
610
|
readonly clientX: number;
|
|
606
611
|
readonly clientY: number;
|
|
607
612
|
readonly maybeIndex: Option.Option<number>;
|
|
608
|
-
} | {
|
|
609
|
-
readonly _tag: "PressedEscape";
|
|
610
613
|
} | {
|
|
611
614
|
readonly _tag: "PressedGripKey";
|
|
612
615
|
readonly itemId: string;
|
|
@@ -634,11 +637,7 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
634
637
|
readonly clientY: number;
|
|
635
638
|
readonly maybeIndex: Option.Option<number>;
|
|
636
639
|
}, {
|
|
637
|
-
readonly
|
|
638
|
-
readonly listId: string;
|
|
639
|
-
readonly heldHook: string;
|
|
640
|
-
readonly pointerId: number;
|
|
641
|
-
}>;
|
|
640
|
+
readonly isHolding: boolean;
|
|
642
641
|
}, never> & {
|
|
643
642
|
readonly __subscription: never;
|
|
644
643
|
};
|
|
@@ -702,6 +701,8 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
702
701
|
}>;
|
|
703
702
|
}>;
|
|
704
703
|
}, {
|
|
704
|
+
readonly _tag: "PressedEscape";
|
|
705
|
+
} | {
|
|
705
706
|
readonly _tag: "CancelledPointer";
|
|
706
707
|
} | {
|
|
707
708
|
readonly _tag: "CompletedAnnounceReorder";
|
|
@@ -710,6 +711,9 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
710
711
|
} | {
|
|
711
712
|
readonly _tag: "GotDragAndDropMessage";
|
|
712
713
|
readonly message: {
|
|
714
|
+
readonly _tag: "PressedArrowKey";
|
|
715
|
+
readonly direction: "Down" | "Left" | "NextContainer" | "PreviousContainer" | "Right" | "Up";
|
|
716
|
+
} | {
|
|
713
717
|
readonly _tag: "ActivatedKeyboardDrag";
|
|
714
718
|
readonly itemId: string;
|
|
715
719
|
readonly containerId: string;
|
|
@@ -736,9 +740,6 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
736
740
|
readonly containerId: string;
|
|
737
741
|
readonly index: number;
|
|
738
742
|
}>;
|
|
739
|
-
} | {
|
|
740
|
-
readonly _tag: "PressedArrowKey";
|
|
741
|
-
readonly direction: "Down" | "Left" | "NextContainer" | "PreviousContainer" | "Right" | "Up";
|
|
742
743
|
} | {
|
|
743
744
|
readonly _tag: "PressedDraggable";
|
|
744
745
|
readonly itemId: string;
|
|
@@ -756,8 +757,6 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
756
757
|
readonly clientX: number;
|
|
757
758
|
readonly clientY: number;
|
|
758
759
|
readonly maybeIndex: Option.Option<number>;
|
|
759
|
-
} | {
|
|
760
|
-
readonly _tag: "PressedEscape";
|
|
761
760
|
} | {
|
|
762
761
|
readonly _tag: "PressedGripKey";
|
|
763
762
|
readonly itemId: string;
|
|
@@ -849,6 +848,8 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
849
848
|
}>;
|
|
850
849
|
}>;
|
|
851
850
|
}, {
|
|
851
|
+
readonly _tag: "PressedEscape";
|
|
852
|
+
} | {
|
|
852
853
|
readonly _tag: "CancelledPointer";
|
|
853
854
|
} | {
|
|
854
855
|
readonly _tag: "CompletedAnnounceReorder";
|
|
@@ -857,6 +858,9 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
857
858
|
} | {
|
|
858
859
|
readonly _tag: "GotDragAndDropMessage";
|
|
859
860
|
readonly message: {
|
|
861
|
+
readonly _tag: "PressedArrowKey";
|
|
862
|
+
readonly direction: "Down" | "Left" | "NextContainer" | "PreviousContainer" | "Right" | "Up";
|
|
863
|
+
} | {
|
|
860
864
|
readonly _tag: "ActivatedKeyboardDrag";
|
|
861
865
|
readonly itemId: string;
|
|
862
866
|
readonly containerId: string;
|
|
@@ -883,9 +887,6 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
883
887
|
readonly containerId: string;
|
|
884
888
|
readonly index: number;
|
|
885
889
|
}>;
|
|
886
|
-
} | {
|
|
887
|
-
readonly _tag: "PressedArrowKey";
|
|
888
|
-
readonly direction: "Down" | "Left" | "NextContainer" | "PreviousContainer" | "Right" | "Up";
|
|
889
890
|
} | {
|
|
890
891
|
readonly _tag: "PressedDraggable";
|
|
891
892
|
readonly itemId: string;
|
|
@@ -903,8 +904,6 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
903
904
|
readonly clientX: number;
|
|
904
905
|
readonly clientY: number;
|
|
905
906
|
readonly maybeIndex: Option.Option<number>;
|
|
906
|
-
} | {
|
|
907
|
-
readonly _tag: "PressedEscape";
|
|
908
907
|
} | {
|
|
909
908
|
readonly _tag: "PressedGripKey";
|
|
910
909
|
readonly itemId: string;
|
|
@@ -1047,6 +1046,8 @@ export declare const view: import("foldkit/submodel").View<{
|
|
|
1047
1046
|
}>;
|
|
1048
1047
|
}>;
|
|
1049
1048
|
}, {
|
|
1049
|
+
readonly _tag: "PressedEscape";
|
|
1050
|
+
} | {
|
|
1050
1051
|
readonly _tag: "CancelledPointer";
|
|
1051
1052
|
} | {
|
|
1052
1053
|
readonly _tag: "CompletedAnnounceReorder";
|
|
@@ -1055,6 +1056,9 @@ export declare const view: import("foldkit/submodel").View<{
|
|
|
1055
1056
|
} | {
|
|
1056
1057
|
readonly _tag: "GotDragAndDropMessage";
|
|
1057
1058
|
readonly message: {
|
|
1059
|
+
readonly _tag: "PressedArrowKey";
|
|
1060
|
+
readonly direction: "Down" | "Left" | "NextContainer" | "PreviousContainer" | "Right" | "Up";
|
|
1061
|
+
} | {
|
|
1058
1062
|
readonly _tag: "ActivatedKeyboardDrag";
|
|
1059
1063
|
readonly itemId: string;
|
|
1060
1064
|
readonly containerId: string;
|
|
@@ -1081,9 +1085,6 @@ export declare const view: import("foldkit/submodel").View<{
|
|
|
1081
1085
|
readonly containerId: string;
|
|
1082
1086
|
readonly index: number;
|
|
1083
1087
|
}>;
|
|
1084
|
-
} | {
|
|
1085
|
-
readonly _tag: "PressedArrowKey";
|
|
1086
|
-
readonly direction: "Down" | "Left" | "NextContainer" | "PreviousContainer" | "Right" | "Up";
|
|
1087
1088
|
} | {
|
|
1088
1089
|
readonly _tag: "PressedDraggable";
|
|
1089
1090
|
readonly itemId: string;
|
|
@@ -1101,8 +1102,6 @@ export declare const view: import("foldkit/submodel").View<{
|
|
|
1101
1102
|
readonly clientX: number;
|
|
1102
1103
|
readonly clientY: number;
|
|
1103
1104
|
readonly maybeIndex: Option.Option<number>;
|
|
1104
|
-
} | {
|
|
1105
|
-
readonly _tag: "PressedEscape";
|
|
1106
1105
|
} | {
|
|
1107
1106
|
readonly _tag: "PressedGripKey";
|
|
1108
1107
|
readonly itemId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sortable.d.ts","sourceRoot":"","sources":["../../../src/sortable/sortable.ts"],"names":[],"mappings":"AACA,OAAO,EAA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Aa,CAAC,IAAI,CAAC,CAAC;CACrE,CAAC,CAAC;AAsNH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAjPR,aAAa,CAAC,IAAI,CAAC;IAC1B,yCAAyC;WAClC,MAAM;IACb;;gFAE4E;aACnE,MAAM;IACf;mDAC+C;iBAClC,OAAO;IACpB;6BACyB;gBACb,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,KAAK,aAAa,CAAC,IAAI,CAAC;GAkQnE,CAAC"}
|
|
@@ -10,7 +10,7 @@ import * as Subscription from "foldkit/subscription";
|
|
|
10
10
|
import * as Update from "foldkit/update";
|
|
11
11
|
import * as Announcer from "../announcer/announcer.js";
|
|
12
12
|
import * as Button from "../button/button.js";
|
|
13
|
-
import { LEFT_BUTTON, activatedKeyboardDrag, cancelledDrag,
|
|
13
|
+
import { LEFT_BUTTON, activatedKeyboardDrag, canLift, cancelledDrag, escapeSubscriptions, insertionIndex, isCarrying, markDragging, measureLift, movedPointer, phaseOf, pointerMessages as dragMessages, pressedDraggable, releasedPointer, settle as settleDrag, } from "../drag/drag.js";
|
|
14
14
|
import * as Glyph from "../glyph/glyph.js";
|
|
15
15
|
import * as IconButton from "../iconButton/iconButton.js";
|
|
16
16
|
import { LOCALE } from "../locale/locale.js";
|
|
@@ -19,13 +19,15 @@ import { prefixKeys } from "../subscription/prefixKeys.js";
|
|
|
19
19
|
/** Schema for one item as the list knows it: its id, unique in the list, and its name in
|
|
20
20
|
* words, which the grip and screen readers use. */
|
|
21
21
|
export const Item = Schema.Struct({ id: Schema.String, label: Schema.String });
|
|
22
|
+
/** How the keyboard carries what it holds: said on the grip and once it is picked up. */
|
|
23
|
+
const KEYBOARD_MOVES = "Arrow keys move it one place, space drops it, escape cancels.";
|
|
22
24
|
/** The words a sortable says. `{item}` stands for the item's label, `{position}` and `{total}`
|
|
23
25
|
* for where it is, counted from one. */
|
|
24
26
|
const COPY = {
|
|
25
27
|
gripLabel: "Move {item}",
|
|
26
|
-
gripHelp:
|
|
28
|
+
gripHelp: `Press space to pick the item up. ${KEYBOARD_MOVES}`,
|
|
27
29
|
pickedUp: "Picked up {item}.",
|
|
28
|
-
pickedUpByKeyboard:
|
|
30
|
+
pickedUpByKeyboard: `Picked up {item}, {position} of {total}. ${KEYBOARD_MOVES}`,
|
|
29
31
|
over: "{item}, {position} of {total}.",
|
|
30
32
|
dropped: "{item} dropped at {position} of {total}.",
|
|
31
33
|
putBack: "{item} put back where it was.",
|
|
@@ -108,8 +110,6 @@ export const init = (config) => (__foldkitBrandViewResult(({
|
|
|
108
110
|
// ACCESSORS
|
|
109
111
|
/** The list's id, unique in the document. */
|
|
110
112
|
const id = (model) => __foldkitBrandViewResult((model.dragAndDrop.id), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#id");
|
|
111
|
-
/** Whether an item is pressed or held. */
|
|
112
|
-
export const isHolding = (model) => __foldkitBrandViewResult((Option.isSome(UiDragAndDrop.maybeDraggedItemId(model.dragAndDrop))), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#isHolding");
|
|
113
113
|
// DOM HOOKS
|
|
114
114
|
const itemHook = (model, itemId) => __foldkitBrandViewResult((`${id(model)}/${itemId}`), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#itemHook");
|
|
115
115
|
const GRIP_ATTRIBUTE = "sortable-grip";
|
|
@@ -139,7 +139,7 @@ const placementOf = (model, held, rawIndex) => __foldkitBrandViewResult((Option.
|
|
|
139
139
|
itemId: held.item.id,
|
|
140
140
|
fromIndex,
|
|
141
141
|
toIndex,
|
|
142
|
-
maybeAfterItemId: Option.map(
|
|
142
|
+
maybeAfterItemId: Option.map(Array.get(others, toIndex - 1), (item) => __foldkitBrandViewResult((item.id), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#anonymous~5")),
|
|
143
143
|
maybeBeforeItemId: Option.map(Array.get(others, toIndex), (item) => __foldkitBrandViewResult((item.id), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#anonymous~6")),
|
|
144
144
|
})), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#anonymous~3");
|
|
145
145
|
})), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#placementOf");
|
|
@@ -185,28 +185,12 @@ const moveText = (held, previous, next, maybeOutMessage, putBack) => {
|
|
|
185
185
|
}
|
|
186
186
|
};
|
|
187
187
|
/** Announces the step a DragAndDrop update took and forgets the held item once it is down. */
|
|
188
|
-
const settle = (previous, putBack = COPY.putBack) => __foldkitBrandViewResult(((dragAndDropUpdate) => {
|
|
189
|
-
const nextModel = phaseOf(dragAndDropUpdate.model.dragAndDrop) === "Idle"
|
|
190
|
-
? modifyFields(dragAndDropUpdate.model, { maybeHeld: () => __foldkitBrandViewResult((Option.none()), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#maybeHeld") })
|
|
191
|
-
: dragAndDropUpdate.model;
|
|
192
|
-
const maybeText = Option.flatMap(previous.maybeHeld, (held) => __foldkitBrandViewResult((moveText(held, previous, dragAndDropUpdate.model, Option.fromNullishOr(dragAndDropUpdate.outMessage), putBack)), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#anonymous~14"));
|
|
193
|
-
return __foldkitBrandViewResult((Update.withOutMessage({
|
|
194
|
-
model: nextModel,
|
|
195
|
-
commands: [
|
|
196
|
-
...(dragAndDropUpdate.commands ?? []),
|
|
197
|
-
...Array.fromOption(Option.map(maybeText, (text) => __foldkitBrandViewResult((AnnounceReorder({ text })), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#anonymous~15"))),
|
|
198
|
-
],
|
|
199
|
-
}, dragAndDropUpdate.outMessage)), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#anonymous~13");
|
|
200
|
-
}), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#settle");
|
|
201
|
-
// NOTE: @foldkit/ui gap: DragAndDrop's pointer resolves a drop along one axis, which a
|
|
202
|
-
// wrapping grid cannot use, so the list reads the pointer itself and hands DragAndDrop its
|
|
203
|
-
// moves and release.
|
|
204
|
-
const canLift = (model) => __foldkitBrandViewResult((model.isMovable && phaseOf(model.dragAndDrop) === "Idle"), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#canLift");
|
|
188
|
+
const settle = (previous, putBack = COPY.putBack) => __foldkitBrandViewResult(((dragAndDropUpdate) => __foldkitBrandViewResult((settleDrag(dragAndDropUpdate, Option.map(Option.flatMap(previous.maybeHeld, (held) => __foldkitBrandViewResult((moveText(held, previous, dragAndDropUpdate.model, Option.fromNullishOr(dragAndDropUpdate.outMessage), putBack)), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#anonymous~14")), (text) => __foldkitBrandViewResult((AnnounceReorder({ text })), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#anonymous~15")))), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#anonymous~13")), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#settle");
|
|
205
189
|
/** The item `itemId` and its place, when the list may lift it now. */
|
|
206
|
-
const liftable = (model, items, itemId) => __foldkitBrandViewResult((Option.filter(Option.
|
|
190
|
+
const liftable = (model, items, itemId) => __foldkitBrandViewResult((Option.filter(Option.map(Array.findFirstWithIndex(items, (item) => __foldkitBrandViewResult((item.id === itemId), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#anonymous~16")), ([item, index]) => (__foldkitBrandViewResult(({ index, item }), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#anonymous~17"))), () => __foldkitBrandViewResult((canLift(model)), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#anonymous~18"))), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#liftable");
|
|
207
191
|
/** Lifts `held` with the DragAndDrop Message `lift` and says so. */
|
|
208
192
|
const lift = (model, held, liftMessage) => {
|
|
209
|
-
const pressed = modifyFields(model, { maybeHeld: () => __foldkitBrandViewResult((Option.some(held)), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#maybeHeld
|
|
193
|
+
const pressed = modifyFields(model, { maybeHeld: () => __foldkitBrandViewResult((Option.some(held)), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#maybeHeld") });
|
|
210
194
|
return __foldkitBrandViewResult((settle(pressed)(foldDragAndDrop(pressed, liftMessage))), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#lift");
|
|
211
195
|
};
|
|
212
196
|
const pointerMove = (model, pointer) => __foldkitBrandViewResult((movedPointer({
|
|
@@ -273,6 +257,9 @@ export const setMovable = (model, isMovable) => {
|
|
|
273
257
|
return __foldkitBrandViewResult((isMovable ? { model: next } : cancelDrag(next)), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#setMovable");
|
|
274
258
|
};
|
|
275
259
|
// SUBSCRIPTION
|
|
260
|
+
// NOTE: @foldkit/ui gap: DragAndDrop's pointer resolves a drop along one axis, which a
|
|
261
|
+
// wrapping grid cannot use, so the list reads the pointer itself and hands DragAndDrop its
|
|
262
|
+
// moves and release.
|
|
276
263
|
/** Where a pointer at this point would drop the held item in the list `listId`: none when the
|
|
277
264
|
* pointer is not over it. */
|
|
278
265
|
const pointerIndex = (listId, heldHook, clientX, clientY) => __foldkitBrandViewResult((pipe(Array.findFirst(document.elementsFromPoint(clientX, clientY), (element) => __foldkitBrandViewResult((element.getAttribute("data-droppable-id") === listId), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#anonymous~23")), Option.map((list) => __foldkitBrandViewResult((insertionIndex(list, heldHook, clientX, clientY)), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#anonymous~24")))), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#pointerIndex");
|
|
@@ -294,7 +281,7 @@ const pointerMessages = (hold) => __foldkitBrandViewResult((dragMessages(hold.po
|
|
|
294
281
|
released: (event) => __foldkitBrandViewResult((Message.ReleasedPointer(pointerAt(hold, event))), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#released"),
|
|
295
282
|
cancelled: () => __foldkitBrandViewResult((Message.CancelledPointer()), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#cancelled"),
|
|
296
283
|
})), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#pointerMessages");
|
|
297
|
-
const
|
|
284
|
+
const pointerSubscriptions = Subscription.make()((entry) => (__foldkitBrandViewResult(({
|
|
298
285
|
pointer: entry({ maybeHold: Schema.Option(PointerHold) }, {
|
|
299
286
|
modelToDependencies: (model) => (__foldkitBrandViewResult(({
|
|
300
287
|
maybeHold: Option.filter(Option.flatMap(model.maybeHeld, ({ item, maybePress }) => __foldkitBrandViewResult((Option.map(maybePress, ({ pointerId }) => (__foldkitBrandViewResult(({
|
|
@@ -311,10 +298,6 @@ const ownSubscriptions = Subscription.make()((entry) => (__foldkitBrandViewResul
|
|
|
311
298
|
onSome: (hold) => __foldkitBrandViewResult((Stream.merge(pointerMessages(hold), markDragging)), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#onSome~4"),
|
|
312
299
|
})), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#dependenciesToStream"),
|
|
313
300
|
}),
|
|
314
|
-
escape: entry({ isHolding: Schema.Boolean }, {
|
|
315
|
-
modelToDependencies: (model) => (__foldkitBrandViewResult(({ isHolding: isHolding(model) }), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#modelToDependencies~2")),
|
|
316
|
-
dependenciesToStream: ({ isHolding: isHoldingNow }) => __foldkitBrandViewResult((isHoldingNow ? escapeKeys(Message.PressedEscape()) : Stream.empty), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#dependenciesToStream~2"),
|
|
317
|
-
}),
|
|
318
301
|
}), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#anonymous~25")));
|
|
319
302
|
// NOTE: @foldkit/ui gap: DragAndDrop's Subscription keys are fixed, so two of its users on a
|
|
320
303
|
// page would share them. The list lifts the ones it uses under its own names, behind the
|
|
@@ -326,7 +309,7 @@ const dragSubscriptions = Subscription.lift({
|
|
|
326
309
|
read: (model) => __foldkitBrandViewResult((Option.some(model.dragAndDrop)), "@gjermundgaraba-designs/pixel-paper/src/sortable/sortable.js#read~2"),
|
|
327
310
|
toParentMessage: toDragAndDropMessage,
|
|
328
311
|
});
|
|
329
|
-
const sortableSubscriptions = Subscription.aggregate(
|
|
312
|
+
const sortableSubscriptions = Subscription.aggregate(pointerSubscriptions, escapeSubscriptions(Message.PressedEscape()), dragSubscriptions);
|
|
330
313
|
/** A held item follows the pointer, the arrows and Space move and drop it, Escape puts it back
|
|
331
314
|
* and the page scrolls near its edges, from listeners that run only while an item is pressed
|
|
332
315
|
* or held. Lift them into the application's Subscriptions, once per list, behind a key prefix
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import type { Html, HtmlBuilder } from "foldkit/html";
|
|
3
3
|
/** `S`: things in one line (8px). `M`: the parts of one body (14px). `L`: whole surfaces,
|
|
4
|
-
* panel to panel (24px).
|
|
4
|
+
* panel to panel (24px). */
|
|
5
5
|
export declare const Space: Schema.Literals<readonly ["S", "M", "L"]>;
|
|
6
6
|
export type Space = typeof Space.Type;
|
|
7
7
|
/** Configuration for rendering a stack with `view`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../../src/stack/stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAItD;
|
|
1
|
+
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../../src/stack/stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAItD;6BAC6B;AAC7B,eAAO,MAAM,KAAK,2CAAmC,CAAC;AACtD,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAC;AActC,uDAAuD;AACvD,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,IAAI,EAAE,aAAa,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;IACnC,qDAAqD;IACrD,GAAG,CAAC,EAAE,KAAK,CAAC;CACb,CAAC,CAAC;AAEH;;iBAEiB;AACjB,eAAO,MAAM,IAAI,GAAI,OAAO,UAAU,UAAU,KAAK,WAAW,CAAC,OAAO,CAAC,KAAG,IAI3E,CAAC"}
|
package/dist/src/stack/stack.js
CHANGED
|
@@ -2,7 +2,7 @@ import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
|
|
|
2
2
|
import { Match, Schema } from "effect";
|
|
3
3
|
// SPACE
|
|
4
4
|
/** `S`: things in one line (8px). `M`: the parts of one body (14px). `L`: whole surfaces,
|
|
5
|
-
* panel to panel (24px).
|
|
5
|
+
* panel to panel (24px). */
|
|
6
6
|
export const Space = Schema.Literals(["S", "M", "L"]);
|
|
7
7
|
/** The class that sets a layout's gap. */
|
|
8
8
|
const gapClassName = (gap) => __foldkitBrandViewResult((Match.value(gap).pipe(Match.withReturnType(), Match.when("S", () => __foldkitBrandViewResult(("gap-s"), "@gjermundgaraba-designs/pixel-paper/src/stack/stack.js#anonymous")), Match.when("M", () => __foldkitBrandViewResult(("gap-m"), "@gjermundgaraba-designs/pixel-paper/src/stack/stack.js#anonymous~2")), Match.when("L", () => __foldkitBrandViewResult(("gap-l"), "@gjermundgaraba-designs/pixel-paper/src/stack/stack.js#anonymous~3")), Match.exhaustive)), "@gjermundgaraba-designs/pixel-paper/src/stack/stack.js#gapClassName");
|
package/dist/src/tabs/tabs.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export type OutMessage = typeof OutMessage.Type;
|
|
|
40
40
|
export type InitConfig = Readonly<{
|
|
41
41
|
id: string;
|
|
42
42
|
}>;
|
|
43
|
-
/** Creates a tab strip. Arrows select as they move
|
|
43
|
+
/** Creates a tab strip. Arrows select as they move. */
|
|
44
44
|
export declare const init: (config: InitConfig) => Model;
|
|
45
45
|
/** The tab strip's id, unique in the document. */
|
|
46
46
|
export declare const id: (model: Model) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/tabs/tabs.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAIzC,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAMzC;yFACyF;AACzF,eAAO,MAAM,KAAK;;;;;;EAEhB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAC;AAItC,qDAAqD;AACrD,eAAO,MAAM,OAAO;;QACA,OAAO;;;;;;;;;;;EACzB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAC;AAI1C;iEACiE;AACjE,eAAO,MAAM,UAAU;;QACT,KAAK;;EACjB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,IAAI,CAAC;AAIhD;2DAC2D;AAC3D,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAElD,
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/tabs/tabs.ts"],"names":[],"mappings":"AACA,OAAO,EA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AM,CAAC;IACtB;;sEAEkE;IAClE,WAAW,EAAE,MAAM,aAAa,CAAC,IAAI,CAAC,CAAC;CACxC,CAAC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;IAjBf,6CAA6C;WACtC,MAAM;UACP,aAAa,CAAC,GAAG,CAAC;IACxB,yDAAyD;mBAC1C,MAAM;IACrB;;sEAEkE;iBACrD,MAAM,aAAa,CAAC,IAAI,CAAC;GA+CtC,CAAC"}
|
package/dist/src/tabs/tabs.js
CHANGED
|
@@ -23,7 +23,7 @@ export const Message = defineMessageUnion({
|
|
|
23
23
|
export const OutMessage = defineMessageUnion({
|
|
24
24
|
Selected: { value: Schema.String },
|
|
25
25
|
});
|
|
26
|
-
/** Creates a tab strip. Arrows select as they move
|
|
26
|
+
/** Creates a tab strip. Arrows select as they move. */
|
|
27
27
|
export const init = (config) => (__foldkitBrandViewResult(({
|
|
28
28
|
tabs: UiTabs.init({ id: config.id, activationMode: "Automatic" }),
|
|
29
29
|
}), "@gjermundgaraba-designs/pixel-paper/src/tabs/tabs.js#init"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textareaField.d.ts","sourceRoot":"","sources":["../../../src/textareaField/textareaField.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAMzF,gEAAgE;AAChE,MAAM,MAAM,UAAU,CAAC,OAAO,IAAI,QAAQ,CAAC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACpC,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;uCAEmC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,yFA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AAC,OAAO,CAAC,KAAK,WAAW,CAAC,OAAO,CAAC,KAAG,IAuCpF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
|
|
2
2
|
import { Textarea as UiTextarea } from "@foldkit/ui";
|
|
3
|
-
import {
|
|
3
|
+
import { controlAttributes, errorView, helpView } from "../field/field.js";
|
|
4
4
|
/** A labelled textarea with its help line, built on `@foldkit/ui`'s `Textarea`: the label
|
|
5
5
|
* names the textarea, the help line describes it (`aria-describedby`), an `error` sets
|
|
6
6
|
* `aria-invalid` and describes it before the help, and `isRequired` sets `aria-required`.
|
|
@@ -16,17 +16,13 @@ export const view = (config, h) => {
|
|
|
16
16
|
...(rows !== undefined && { rows }),
|
|
17
17
|
toView: (groups) => __foldkitBrandViewResult((h.div([h.Class(`field${isMono ? " mono" : ""}`)], [
|
|
18
18
|
h.label(groups.label, [label]),
|
|
19
|
-
// NOTE: @foldkit/ui gap: Textarea has no required option, so the wrapper says it.
|
|
20
19
|
h.textarea([
|
|
21
20
|
...textareaAttributes,
|
|
22
21
|
...groups.textarea,
|
|
23
|
-
...
|
|
24
|
-
...(isRequired ? [h.AriaRequired(true)] : []),
|
|
22
|
+
...controlAttributes(id, error, help, isRequired, h),
|
|
25
23
|
]),
|
|
26
24
|
...errorView(id, error, h),
|
|
27
|
-
...(help
|
|
28
|
-
? []
|
|
29
|
-
: [h.p([...groups.description, h.Class("field-help")], [help])]),
|
|
25
|
+
...helpView(help, groups.description, h),
|
|
30
26
|
])), "@gjermundgaraba-designs/pixel-paper/src/textareaField/textareaField.js#toView"),
|
|
31
27
|
}, h)), "@gjermundgaraba-designs/pixel-paper/src/textareaField/textareaField.js#view");
|
|
32
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../src/time/time.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,QAAQ,
|
|
1
|
+
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AAC,KAClC,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAC,EAAE,KAAK,CAS7E,CAAC"}
|
package/dist/src/time/time.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
|
|
2
|
-
import { Clock, Duration,
|
|
2
|
+
import { Clock, Duration, Match, Option, Schedule, Schema, Stream } from "effect";
|
|
3
3
|
import { formatDate, formatDateTime, formatRemaining, formatSpan } from "../format/format.js";
|
|
4
4
|
// FORMAT
|
|
5
5
|
/** How a moment is said. `Age`: `"19d"`, the age register. `Ago`: `"4m ago"`. `Until`:
|
|
@@ -57,5 +57,7 @@ const TICK = Duration.seconds(1);
|
|
|
57
57
|
export const clockEntry = (config) => (__foldkitBrandViewResult(({
|
|
58
58
|
dependenciesSchema: Schema.Struct({ isActive: Schema.Boolean }),
|
|
59
59
|
modelToDependencies: (model) => (__foldkitBrandViewResult(({ isActive: config.isActive(model) }), "@gjermundgaraba-designs/pixel-paper/src/time/time.js#modelToDependencies")),
|
|
60
|
-
dependenciesToStream: ({ isActive }) => __foldkitBrandViewResult((
|
|
60
|
+
dependenciesToStream: ({ isActive }) => __foldkitBrandViewResult((isActive
|
|
61
|
+
? Stream.fromEffectSchedule(Clock.currentTimeMillis, Schedule.spaced(TICK)).pipe(Stream.map(config.toMessage))
|
|
62
|
+
: Stream.empty), "@gjermundgaraba-designs/pixel-paper/src/time/time.js#dependenciesToStream"),
|
|
61
63
|
}), "@gjermundgaraba-designs/pixel-paper/src/time/time.js#clockEntry"));
|
package/dist/src/tips/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { HideTip, Message, Model, ShowTip, WaitBeforeCooling, WaitBeforeHiding, WaitBeforeShowing, id, init, subscriptions, update, view, } from "./tips.ts";
|
|
2
|
-
export type { InitConfig
|
|
2
|
+
export type { InitConfig } from "./tips.ts";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tips/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,OAAO,EACP,KAAK,EACL,OAAO,EACP,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,EAAE,EACF,IAAI,EACJ,aAAa,EACb,MAAM,EACN,IAAI,GACL,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tips/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,OAAO,EACP,KAAK,EACL,OAAO,EACP,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,EAAE,EACF,IAAI,EACJ,aAAa,EACb,MAAM,EACN,IAAI,GACL,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { AnnounceSlip, BindStack, FocusSlip, Message, Model, OutMessage, dismiss, id, init, sceneMounts, show, update, view, } from "./toast.ts";
|
|
2
|
-
export type { InitConfig, ShowConfig
|
|
2
|
+
export type { InitConfig, ShowConfig } from "./toast.ts";
|
|
3
3
|
export type { Action, Tone } from "./stack.ts";
|
|
4
4
|
export { Focus } from "../focus/focus.ts";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,SAAS,EACT,SAAS,EACT,OAAO,EACP,KAAK,EACL,UAAU,EACV,OAAO,EACP,EAAE,EACF,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,MAAM,EACN,IAAI,GACL,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,SAAS,EACT,SAAS,EACT,OAAO,EACP,KAAK,EACL,UAAU,EACV,OAAO,EACP,EAAE,EACF,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,MAAM,EACN,IAAI,GACL,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACzD,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -326,8 +326,6 @@ export declare const update: (model: Model, message: Message) => Readonly<{
|
|
|
326
326
|
readonly pendingDismissVersion: number;
|
|
327
327
|
readonly isHovered: boolean;
|
|
328
328
|
readonly swipeState: {
|
|
329
|
-
readonly _tag: "Idle";
|
|
330
|
-
} | {
|
|
331
329
|
readonly _tag: "Dismissing";
|
|
332
330
|
readonly offsetX: number;
|
|
333
331
|
readonly direction: "Left" | "Right";
|
|
@@ -336,6 +334,8 @@ export declare const update: (model: Model, message: Message) => Readonly<{
|
|
|
336
334
|
readonly pointerId: number;
|
|
337
335
|
readonly startX: number;
|
|
338
336
|
readonly currentX: number;
|
|
337
|
+
} | {
|
|
338
|
+
readonly _tag: "Idle";
|
|
339
339
|
} | {
|
|
340
340
|
readonly _tag: "Settling";
|
|
341
341
|
readonly offsetX: number;
|
|
@@ -421,7 +421,7 @@ export type ShowConfig = Readonly<{
|
|
|
421
421
|
}>;
|
|
422
422
|
/** What `show` returns: the next Model and Commands, and the new slip's id, to take it back
|
|
423
423
|
* with `dismiss`. */
|
|
424
|
-
|
|
424
|
+
type ShowReturn = Update.Return<Model, Message> & Readonly<{
|
|
425
425
|
entryId: string;
|
|
426
426
|
}>;
|
|
427
427
|
/**
|
|
@@ -557,8 +557,6 @@ export declare const view: import("foldkit/submodel").View<{
|
|
|
557
557
|
readonly pendingDismissVersion: number;
|
|
558
558
|
readonly isHovered: boolean;
|
|
559
559
|
readonly swipeState: {
|
|
560
|
-
readonly _tag: "Idle";
|
|
561
|
-
} | {
|
|
562
560
|
readonly _tag: "Dismissing";
|
|
563
561
|
readonly offsetX: number;
|
|
564
562
|
readonly direction: "Left" | "Right";
|
|
@@ -567,6 +565,8 @@ export declare const view: import("foldkit/submodel").View<{
|
|
|
567
565
|
readonly pointerId: number;
|
|
568
566
|
readonly startX: number;
|
|
569
567
|
readonly currentX: number;
|
|
568
|
+
} | {
|
|
569
|
+
readonly _tag: "Idle";
|
|
570
570
|
} | {
|
|
571
571
|
readonly _tag: "Settling";
|
|
572
572
|
readonly offsetX: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../src/toast/toast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,QAAQ,EAAE,MAAM,EAAS,MAAM,EAAE,MAAM,EAAgB,MAAM,QAAQ,CAAC;AACtF,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAI3C,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AAIvC,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AASzC,OAAO,EAAE,MAAM,EAAgB,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAI7D;;wDAEwD;AACxD,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKhB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAC;AAItC,yDAAyD;AACzD,eAAO,MAAM,OAAO;;QACC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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