@gjermundgaraba/pixel-paper 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +50 -2
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/announcer/announcer.d.ts +35 -0
- package/dist/announcer/announcer.js +121 -0
- package/dist/announcer/index.d.ts +5 -0
- package/dist/announcer/index.js +11 -0
- package/dist/attributes/attributes.d.ts +4 -0
- package/dist/banner/banner.d.ts +20 -0
- package/dist/banner/banner.js +18 -0
- package/dist/banner/index.d.ts +5 -0
- package/dist/banner/index.js +6 -0
- package/dist/bench/bench.d.ts +16 -0
- package/dist/bench/bench.js +12 -0
- package/dist/bench/index.d.ts +5 -0
- package/dist/bench/index.js +6 -0
- package/dist/board/board.d.ts +1151 -0
- package/dist/board/board.js +449 -0
- package/dist/board/index.d.ts +6 -0
- package/dist/board/index.js +21 -0
- package/dist/button/button.d.ts +54 -0
- package/dist/button/button.js +50 -0
- package/dist/button/index.d.ts +5 -0
- package/dist/button/index.js +9 -0
- package/dist/card/card.d.ts +66 -0
- package/dist/card/card.js +70 -0
- package/dist/card/index.d.ts +5 -0
- package/dist/card/index.js +10 -0
- package/dist/chip/chip.d.ts +27 -0
- package/dist/chip/chip.js +34 -0
- package/dist/chip/index.d.ts +5 -0
- package/dist/chip/index.js +9 -0
- package/dist/choice/choice.d.ts +16 -0
- package/dist/choice/choice.js +17 -0
- package/dist/choice/index.d.ts +5 -0
- package/dist/choice/index.js +6 -0
- package/dist/code-editor/code-editor.d.ts +15 -0
- package/dist/code-editor/code-editor.js +22 -0
- package/dist/code-editor/index.d.ts +5 -0
- package/dist/code-editor/index.js +6 -0
- package/dist/code-surface/code-surface.d.ts +12 -0
- package/dist/code-surface/code-surface.js +12 -0
- package/dist/code-surface/index.d.ts +5 -0
- package/dist/code-surface/index.js +6 -0
- package/dist/command-palette/command-palette.d.ts +579 -0
- package/dist/command-palette/command-palette.js +600 -0
- package/dist/command-palette/index.d.ts +9 -0
- package/dist/command-palette/index.js +32 -0
- package/dist/command-palette/keys.d.ts +13 -0
- package/dist/command-palette/keys.js +71 -0
- package/dist/command-palette/match.d.ts +43 -0
- package/dist/command-palette/match.js +45 -0
- package/dist/command-palette/message.d.ts +94 -0
- package/dist/command-palette/message.js +46 -0
- package/dist/confirm-dialog/confirm-dialog.d.ts +287 -0
- package/dist/confirm-dialog/confirm-dialog.js +115 -0
- package/dist/confirm-dialog/index.d.ts +5 -0
- package/dist/confirm-dialog/index.js +17 -0
- package/dist/copy-button/copy-button.d.ts +99 -0
- package/dist/copy-button/copy-button.js +96 -0
- package/dist/copy-button/index.d.ts +5 -0
- package/dist/copy-button/index.js +13 -0
- package/dist/crumbs/crumbs.d.ts +15 -0
- package/dist/crumbs/crumbs.js +11 -0
- package/dist/crumbs/index.d.ts +5 -0
- package/dist/crumbs/index.js +6 -0
- package/dist/deck/deck.d.ts +9 -0
- package/dist/deck/deck.js +9 -0
- package/dist/deck/index.d.ts +5 -0
- package/dist/deck/index.js +6 -0
- package/dist/dialog/dialog.d.ts +278 -0
- package/dist/dialog/dialog.js +145 -0
- package/dist/dialog/fold.d.ts +58 -0
- package/dist/dialog/fold.js +63 -0
- package/dist/dialog/index.d.ts +6 -0
- package/dist/dialog/index.js +21 -0
- package/dist/disclosure/disclosure.d.ts +24 -0
- package/dist/disclosure/disclosure.js +25 -0
- package/dist/disclosure/index.d.ts +5 -0
- package/dist/disclosure/index.js +6 -0
- package/dist/dom/html-element.js +8 -0
- package/dist/drag/drag.d.ts +15 -0
- package/dist/drag/drag.js +123 -0
- package/dist/drop-zone/drop-zone.d.ts +119 -0
- package/dist/drop-zone/drop-zone.js +64 -0
- package/dist/drop-zone/index.d.ts +5 -0
- package/dist/drop-zone/index.js +14 -0
- package/dist/empty-state/empty-state.d.ts +18 -0
- package/dist/empty-state/empty-state.js +16 -0
- package/dist/empty-state/index.d.ts +5 -0
- package/dist/empty-state/index.js +6 -0
- package/dist/error-summary/error-summary.d.ts +34 -0
- package/dist/error-summary/error-summary.js +33 -0
- package/dist/error-summary/index.d.ts +5 -0
- package/dist/error-summary/index.js +6 -0
- package/dist/field/field.d.ts +35 -0
- package/dist/field/field.js +34 -0
- package/dist/field/index.d.ts +5 -0
- package/dist/field/index.js +6 -0
- package/dist/field-grid/field-grid.d.ts +8 -0
- package/dist/field-grid/field-grid.js +8 -0
- package/dist/field-grid/index.d.ts +5 -0
- package/dist/field-grid/index.js +6 -0
- package/dist/fields/fields.js +9 -0
- package/dist/fieldset/fieldset.d.ts +13 -0
- package/dist/fieldset/fieldset.js +13 -0
- package/dist/fieldset/index.d.ts +5 -0
- package/dist/fieldset/index.js +6 -0
- package/dist/filter-chip/filter-chip.d.ts +21 -0
- package/dist/filter-chip/filter-chip.js +28 -0
- package/dist/filter-chip/index.d.ts +5 -0
- package/dist/filter-chip/index.js +6 -0
- package/dist/filter-strip/filter-strip.d.ts +12 -0
- package/dist/filter-strip/filter-strip.js +13 -0
- package/dist/filter-strip/index.d.ts +5 -0
- package/dist/filter-strip/index.js +6 -0
- package/dist/flash-word/flash-word.d.ts +31 -0
- package/dist/flash-word/flash-word.js +31 -0
- package/dist/flash-word/index.d.ts +5 -0
- package/dist/flash-word/index.js +9 -0
- package/dist/focus/focus.d.ts +15 -0
- package/dist/focus/focus.js +17 -0
- package/dist/focus/index.d.ts +5 -0
- package/dist/focus/index.js +9 -0
- package/dist/format/format.js +52 -0
- package/dist/format/index.d.ts +5 -0
- package/dist/format/index.js +6 -0
- package/dist/glyph/glyph.d.ts +9 -0
- package/dist/glyph/glyph.js +25 -0
- package/dist/glyph/glyphs.d.ts +381 -0
- package/dist/glyph/glyphs.js +2603 -0
- package/dist/glyph/index.d.ts +5 -0
- package/dist/glyph/index.js +6 -0
- package/dist/group/group.d.ts +8 -0
- package/dist/group/group.js +9 -0
- package/dist/group/index.d.ts +5 -0
- package/dist/group/index.js +6 -0
- package/dist/history/history.d.ts +34 -0
- package/dist/history/history.js +15 -0
- package/dist/history/index.d.ts +5 -0
- package/dist/history/index.js +6 -0
- package/dist/icon-button/icon-button.d.ts +23 -0
- package/dist/icon-button/icon-button.js +23 -0
- package/dist/icon-button/index.d.ts +5 -0
- package/dist/icon-button/index.js +6 -0
- package/dist/identity/identity.d.ts +15 -0
- package/dist/identity/identity.js +15 -0
- package/dist/identity/index.d.ts +5 -0
- package/dist/identity/index.js +6 -0
- package/dist/index.d.ts +85 -0
- package/dist/index.js +85 -0
- package/dist/inline-input/index.d.ts +5 -0
- package/dist/inline-input/index.js +20 -0
- package/dist/inline-input/inline-input.d.ts +196 -0
- package/dist/inline-input/inline-input.js +212 -0
- package/dist/key-help/index.d.ts +5 -0
- package/dist/key-help/index.js +18 -0
- package/dist/key-help/key-help.d.ts +255 -0
- package/dist/key-help/key-help.js +137 -0
- package/dist/key-hint/index.d.ts +6 -0
- package/dist/key-hint/index.js +12 -0
- package/dist/key-hint/key-hint.d.ts +13 -0
- package/dist/key-hint/key-hint.js +7 -0
- package/dist/key-hint/key-label.d.ts +18 -0
- package/dist/key-hint/key-label.js +77 -0
- package/dist/keymap/keymap.d.ts +11 -0
- package/dist/keymap/keymap.js +9 -0
- package/dist/keys/keys.js +4 -0
- package/dist/line-diff/diff.d.ts +2 -0
- package/dist/line-diff/diff.js +73 -0
- package/dist/line-diff/index.d.ts +6 -0
- package/dist/line-diff/index.js +10 -0
- package/dist/line-diff/line-diff.d.ts +21 -0
- package/dist/line-diff/line-diff.js +75 -0
- package/dist/line-diff/patch.d.ts +15 -0
- package/dist/line-diff/patch.js +120 -0
- package/dist/link-button/index.d.ts +5 -0
- package/dist/link-button/index.js +6 -0
- package/dist/link-button/link-button.d.ts +11 -0
- package/dist/link-button/link-button.js +10 -0
- package/dist/link-state/index.d.ts +5 -0
- package/dist/link-state/index.js +6 -0
- package/dist/link-state/link-state.d.ts +15 -0
- package/dist/link-state/link-state.js +17 -0
- package/dist/live-region/index.d.ts +5 -0
- package/dist/live-region/index.js +9 -0
- package/dist/live-region/live-region.d.ts +39 -0
- package/dist/live-region/live-region.js +33 -0
- package/dist/loading/index.d.ts +5 -0
- package/dist/loading/index.js +6 -0
- package/dist/loading/loading.d.ts +19 -0
- package/dist/loading/loading.js +16 -0
- package/dist/locale/locale.d.ts +3 -0
- package/dist/locale/locale.js +5 -0
- package/dist/mark/index.d.ts +5 -0
- package/dist/mark/index.js +6 -0
- package/dist/mark/mark.d.ts +15 -0
- package/dist/mark/mark.js +30 -0
- package/dist/menu/index.d.ts +7 -0
- package/dist/menu/index.js +25 -0
- package/dist/menu/item.d.ts +236 -0
- package/dist/menu/item.js +19 -0
- package/dist/menu/menu.d.ts +206 -0
- package/dist/menu/menu.js +208 -0
- package/dist/menu/slip.js +163 -0
- package/dist/meter/index.d.ts +5 -0
- package/dist/meter/index.js +6 -0
- package/dist/meter/meter.d.ts +38 -0
- package/dist/meter/meter.js +69 -0
- package/dist/monogram/monogram.js +33 -0
- package/dist/nav-strip/index.d.ts +5 -0
- package/dist/nav-strip/index.js +6 -0
- package/dist/nav-strip/nav-strip.d.ts +19 -0
- package/dist/nav-strip/nav-strip.js +21 -0
- package/dist/notice/index.d.ts +5 -0
- package/dist/notice/index.js +6 -0
- package/dist/notice/notice.d.ts +23 -0
- package/dist/notice/notice.js +35 -0
- package/dist/outcome/index.d.ts +5 -0
- package/dist/outcome/index.js +6 -0
- package/dist/outcome/outcome.d.ts +19 -0
- package/dist/outcome/outcome.js +14 -0
- package/dist/page-head/index.d.ts +5 -0
- package/dist/page-head/index.js +6 -0
- package/dist/page-head/page-head.d.ts +13 -0
- package/dist/page-head/page-head.js +10 -0
- package/dist/panel/index.d.ts +5 -0
- package/dist/panel/index.js +6 -0
- package/dist/panel/panel.d.ts +35 -0
- package/dist/panel/panel.js +25 -0
- package/dist/password-field/index.d.ts +5 -0
- package/dist/password-field/index.js +6 -0
- package/dist/password-field/password-field.d.ts +33 -0
- package/dist/password-field/password-field.js +39 -0
- package/dist/places/index.d.ts +5 -0
- package/dist/places/index.js +6 -0
- package/dist/places/places.d.ts +32 -0
- package/dist/places/places.js +22 -0
- package/dist/props-list/index.d.ts +5 -0
- package/dist/props-list/index.js +6 -0
- package/dist/props-list/props-list.d.ts +18 -0
- package/dist/props-list/props-list.js +12 -0
- package/dist/prose/index.d.ts +5 -0
- package/dist/prose/index.js +6 -0
- package/dist/prose/prose.d.ts +14 -0
- package/dist/prose/prose.js +6 -0
- package/dist/query-chip/index.d.ts +5 -0
- package/dist/query-chip/index.js +6 -0
- package/dist/query-chip/query-chip.d.ts +18 -0
- package/dist/query-chip/query-chip.js +17 -0
- package/dist/radio-choices/index.d.ts +5 -0
- package/dist/radio-choices/index.js +12 -0
- package/dist/radio-choices/radio-choices.d.ts +105 -0
- package/dist/radio-choices/radio-choices.js +56 -0
- package/dist/rail/index.d.ts +5 -0
- package/dist/rail/index.js +22 -0
- package/dist/rail/rail.d.ts +403 -0
- package/dist/rail/rail.js +355 -0
- package/dist/reel/index.d.ts +6 -0
- package/dist/reel/index.js +26 -0
- package/dist/reel/layout.d.ts +58 -0
- package/dist/reel/layout.js +378 -0
- package/dist/reel/reel.d.ts +1070 -0
- package/dist/reel/reel.js +1019 -0
- package/dist/remote/index.d.ts +5 -0
- package/dist/remote/index.js +6 -0
- package/dist/remote/remote.d.ts +28 -0
- package/dist/remote/remote.js +41 -0
- package/dist/rows/index.d.ts +5 -0
- package/dist/rows/index.js +12 -0
- package/dist/rows/rows.d.ts +116 -0
- package/dist/rows/rows.js +67 -0
- package/dist/scheme/index.d.ts +6 -0
- package/dist/scheme/index.js +10 -0
- package/dist/scheme/scheme-switch.d.ts +98 -0
- package/dist/scheme/scheme-switch.js +118 -0
- package/dist/scheme/scheme.d.ts +5 -0
- package/dist/scheme/scheme.js +16 -0
- package/dist/scheme/script.d.ts +8 -0
- package/dist/scheme/script.js +10 -0
- package/dist/secret/index.d.ts +5 -0
- package/dist/secret/index.js +6 -0
- package/dist/secret/secret.d.ts +13 -0
- package/dist/secret/secret.js +9 -0
- package/dist/segmented/index.d.ts +5 -0
- package/dist/segmented/index.js +6 -0
- package/dist/segmented/segmented.d.ts +17 -0
- package/dist/segmented/segmented.js +17 -0
- package/dist/select-field/index.d.ts +5 -0
- package/dist/select-field/index.js +6 -0
- package/dist/select-field/select-field.d.ts +38 -0
- package/dist/select-field/select-field.js +29 -0
- package/dist/sheet/index.d.ts +5 -0
- package/dist/sheet/index.js +6 -0
- package/dist/sheet/sheet.d.ts +16 -0
- package/dist/sheet/sheet.js +15 -0
- package/dist/skip-link/index.d.ts +5 -0
- package/dist/skip-link/index.js +9 -0
- package/dist/skip-link/skip-link.d.ts +23 -0
- package/dist/skip-link/skip-link.js +36 -0
- package/dist/slot/slot.js +8 -0
- package/dist/sortable/index.d.ts +5 -0
- package/dist/sortable/index.js +16 -0
- package/dist/sortable/sortable.d.ts +1125 -0
- package/dist/sortable/sortable.js +431 -0
- package/dist/stack/index.d.ts +5 -0
- package/dist/stack/index.js +6 -0
- package/dist/stack/stack.d.ts +15 -0
- package/dist/stack/stack.js +12 -0
- package/dist/stage/index.d.ts +5 -0
- package/dist/stage/index.js +6 -0
- package/dist/stage/stage.d.ts +14 -0
- package/dist/stage/stage.js +11 -0
- package/dist/stat/index.d.ts +5 -0
- package/dist/stat/index.js +6 -0
- package/dist/stat/stat.d.ts +18 -0
- package/dist/stat/stat.js +13 -0
- package/dist/status-bar/index.d.ts +6 -0
- package/dist/status-bar/index.js +11 -0
- package/dist/status-bar/status-bar.d.ts +28 -0
- package/dist/status-bar/status-bar.js +19 -0
- package/dist/subscription/prefix-keys.js +12 -0
- package/dist/table/index.d.ts +5 -0
- package/dist/table/index.js +6 -0
- package/dist/table/table.d.ts +26 -0
- package/dist/table/table.js +18 -0
- package/dist/tabs/index.d.ts +5 -0
- package/dist/tabs/index.js +14 -0
- package/dist/tabs/tabs.d.ts +125 -0
- package/dist/tabs/tabs.js +57 -0
- package/dist/tag/index.d.ts +5 -0
- package/dist/tag/index.js +6 -0
- package/dist/tag/tag.d.ts +16 -0
- package/dist/tag/tag.js +25 -0
- package/dist/text-button/index.d.ts +5 -0
- package/dist/text-button/index.js +6 -0
- package/dist/text-button/text-button.d.ts +8 -0
- package/dist/text-button/text-button.js +12 -0
- package/dist/textarea-field/index.d.ts +5 -0
- package/dist/textarea-field/index.js +6 -0
- package/dist/textarea-field/textarea-field.d.ts +28 -0
- package/dist/textarea-field/textarea-field.js +30 -0
- package/dist/time/index.d.ts +5 -0
- package/dist/time/index.js +9 -0
- package/dist/time/time.d.ts +38 -0
- package/dist/time/time.js +63 -0
- package/dist/tips/index.d.ts +5 -0
- package/dist/tips/index.js +14 -0
- package/dist/tips/tips.d.ts +339 -0
- package/dist/tips/tips.js +308 -0
- package/dist/toast/index.d.ts +5 -0
- package/dist/toast/index.js +17 -0
- package/dist/toast/stack.d.ts +7 -0
- package/dist/toast/stack.js +23 -0
- package/dist/toast/toast.d.ts +559 -0
- package/dist/toast/toast.js +269 -0
- package/dist/toc/index.d.ts +5 -0
- package/dist/toc/index.js +9 -0
- package/dist/toc/toc.d.ts +42 -0
- package/dist/toc/toc.js +35 -0
- package/dist/top-bar/bar-height.d.ts +26 -0
- package/dist/top-bar/bar-height.js +43 -0
- package/dist/top-bar/index.d.ts +6 -0
- package/dist/top-bar/index.js +12 -0
- package/dist/top-bar/top-bar.d.ts +19 -0
- package/dist/top-bar/top-bar.js +18 -0
- package/dist/wall/index.d.ts +5 -0
- package/dist/wall/index.js +9 -0
- package/dist/wall/wall.d.ts +16 -0
- package/dist/wall/wall.js +15 -0
- package/dist/window/index.d.ts +5 -0
- package/dist/window/index.js +6 -0
- package/dist/window/window.d.ts +28 -0
- package/dist/window/window.js +29 -0
- package/dist/wordmark/index.d.ts +5 -0
- package/dist/wordmark/index.js +6 -0
- package/dist/wordmark/wordmark.d.ts +10 -0
- package/dist/wordmark/wordmark.js +10 -0
- package/dist/wrap/index.d.ts +5 -0
- package/dist/wrap/index.js +6 -0
- package/dist/wrap/wrap.d.ts +12 -0
- package/dist/wrap/wrap.js +9 -0
- package/fonts/DepartureMono-Regular.woff2 +0 -0
- package/fonts/LICENSE.txt +2 -0
- package/package.json +57 -3
- package/src/pixel-paper.css +4611 -0
- package/src/tokens.css +151 -0
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { Effect, Option, Schema } from "effect";
|
|
2
|
+
import "foldkit/command";
|
|
3
|
+
import * as Subscription from "foldkit/subscription";
|
|
4
|
+
import * as Update from "foldkit/update";
|
|
5
|
+
/** Schema for the page's one tip layer. `version` counts its waits, and tells the current one
|
|
6
|
+
* from an earlier one whose Command is still out. */
|
|
7
|
+
export declare const Model: Schema.Struct<{
|
|
8
|
+
readonly id: Schema.String;
|
|
9
|
+
readonly version: Schema.Finite;
|
|
10
|
+
readonly state: import("foldkit/schema").TaggedUnion<{
|
|
11
|
+
readonly Cold: {};
|
|
12
|
+
readonly Waiting: {
|
|
13
|
+
text: Schema.String;
|
|
14
|
+
maybeKey: Schema.Option<Schema.String>;
|
|
15
|
+
side: Schema.Literals<readonly ["Top", "Right"]>;
|
|
16
|
+
};
|
|
17
|
+
readonly Shown: {
|
|
18
|
+
text: Schema.String;
|
|
19
|
+
maybeKey: Schema.Option<Schema.String>;
|
|
20
|
+
side: Schema.Literals<readonly ["Top", "Right"]>;
|
|
21
|
+
trigger: Schema.Literals<readonly ["Pointer", "Focus"]>;
|
|
22
|
+
};
|
|
23
|
+
readonly Leaving: {
|
|
24
|
+
text: Schema.String;
|
|
25
|
+
maybeKey: Schema.Option<Schema.String>;
|
|
26
|
+
side: Schema.Literals<readonly ["Top", "Right"]>;
|
|
27
|
+
trigger: Schema.Literals<readonly ["Pointer", "Focus"]>;
|
|
28
|
+
};
|
|
29
|
+
readonly Warm: {};
|
|
30
|
+
}>;
|
|
31
|
+
}>;
|
|
32
|
+
export type Model = typeof Model.Type;
|
|
33
|
+
/** Union of all Messages the tip layer can produce. */
|
|
34
|
+
export declare const Message: import("foldkit/message").MessageUnion<{
|
|
35
|
+
readonly EnteredTipTarget: {
|
|
36
|
+
text: Schema.String;
|
|
37
|
+
maybeKey: Schema.Option<Schema.String>;
|
|
38
|
+
side: Schema.Literals<readonly ["Top", "Right"]>;
|
|
39
|
+
};
|
|
40
|
+
readonly LeftTipTarget: {};
|
|
41
|
+
readonly EnteredTip: {};
|
|
42
|
+
readonly FocusedTipTarget: {
|
|
43
|
+
text: Schema.String;
|
|
44
|
+
maybeKey: Schema.Option<Schema.String>;
|
|
45
|
+
side: Schema.Literals<readonly ["Top", "Right"]>;
|
|
46
|
+
};
|
|
47
|
+
readonly BlurredTipTarget: {};
|
|
48
|
+
readonly PressedPointer: {};
|
|
49
|
+
readonly PressedKey: {};
|
|
50
|
+
readonly CompletedWaitBeforeShowing: {
|
|
51
|
+
version: Schema.Finite;
|
|
52
|
+
};
|
|
53
|
+
readonly CompletedWaitBeforeHiding: {
|
|
54
|
+
version: Schema.Finite;
|
|
55
|
+
};
|
|
56
|
+
readonly CompletedWaitBeforeCooling: {
|
|
57
|
+
version: Schema.Finite;
|
|
58
|
+
};
|
|
59
|
+
readonly CompletedShowTip: {};
|
|
60
|
+
readonly CompletedHideTip: {};
|
|
61
|
+
}>;
|
|
62
|
+
export type Message = typeof Message.Type;
|
|
63
|
+
/** Configuration for creating the tip layer with `init`. The `id` is the tip element's. */
|
|
64
|
+
export type InitConfig = Readonly<{
|
|
65
|
+
id: string;
|
|
66
|
+
}>;
|
|
67
|
+
/** Creates the tip layer with no tip. */
|
|
68
|
+
export declare const init: (config: InitConfig) => Model;
|
|
69
|
+
/** The tip element's id, unique in the document. */
|
|
70
|
+
export declare const id: (model: Model) => string;
|
|
71
|
+
/** Processes a tip layer Message and returns the next Model and Commands. */
|
|
72
|
+
export declare const update: (model: Model, message: Message) => Readonly<{
|
|
73
|
+
model: {
|
|
74
|
+
readonly id: string;
|
|
75
|
+
readonly version: number;
|
|
76
|
+
readonly state: {
|
|
77
|
+
readonly _tag: "Cold";
|
|
78
|
+
} | {
|
|
79
|
+
readonly _tag: "Leaving";
|
|
80
|
+
readonly text: string;
|
|
81
|
+
readonly maybeKey: Option.Option<string>;
|
|
82
|
+
readonly side: "Right" | "Top";
|
|
83
|
+
readonly trigger: "Focus" | "Pointer";
|
|
84
|
+
} | {
|
|
85
|
+
readonly _tag: "Shown";
|
|
86
|
+
readonly text: string;
|
|
87
|
+
readonly maybeKey: Option.Option<string>;
|
|
88
|
+
readonly side: "Right" | "Top";
|
|
89
|
+
readonly trigger: "Focus" | "Pointer";
|
|
90
|
+
} | {
|
|
91
|
+
readonly _tag: "Waiting";
|
|
92
|
+
readonly text: string;
|
|
93
|
+
readonly maybeKey: Option.Option<string>;
|
|
94
|
+
readonly side: "Right" | "Top";
|
|
95
|
+
} | {
|
|
96
|
+
readonly _tag: "Warm";
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
commands?: Update.Commands<{
|
|
100
|
+
readonly _tag: "CompletedShowTip";
|
|
101
|
+
} | {
|
|
102
|
+
readonly _tag: "CompletedHideTip";
|
|
103
|
+
} | {
|
|
104
|
+
readonly _tag: "CompletedWaitBeforeShowing";
|
|
105
|
+
readonly version: number;
|
|
106
|
+
} | {
|
|
107
|
+
readonly _tag: "CompletedWaitBeforeHiding";
|
|
108
|
+
readonly version: number;
|
|
109
|
+
} | {
|
|
110
|
+
readonly _tag: "CompletedWaitBeforeCooling";
|
|
111
|
+
readonly version: number;
|
|
112
|
+
} | {
|
|
113
|
+
readonly _tag: "BlurredTipTarget";
|
|
114
|
+
} | {
|
|
115
|
+
readonly _tag: "EnteredTip";
|
|
116
|
+
} | {
|
|
117
|
+
readonly _tag: "EnteredTipTarget";
|
|
118
|
+
readonly text: string;
|
|
119
|
+
readonly maybeKey: Option.Option<string>;
|
|
120
|
+
readonly side: "Right" | "Top";
|
|
121
|
+
} | {
|
|
122
|
+
readonly _tag: "FocusedTipTarget";
|
|
123
|
+
readonly text: string;
|
|
124
|
+
readonly maybeKey: Option.Option<string>;
|
|
125
|
+
readonly side: "Right" | "Top";
|
|
126
|
+
} | {
|
|
127
|
+
readonly _tag: "LeftTipTarget";
|
|
128
|
+
} | {
|
|
129
|
+
readonly _tag: "PressedKey";
|
|
130
|
+
} | {
|
|
131
|
+
readonly _tag: "PressedPointer";
|
|
132
|
+
}, never>;
|
|
133
|
+
outMessage?: never;
|
|
134
|
+
}>;
|
|
135
|
+
/** The page's pointer, focus and keys, read for the tip: lift it into the application's
|
|
136
|
+
* Subscriptions with a key prefix of the parent's that no other record on the page uses
|
|
137
|
+
* (`subscriptions("tip")` is keyed `tipPointerAndFocus` and `tipKeys`). Keys are listened to
|
|
138
|
+
* only while a tip shows. */
|
|
139
|
+
export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) => {
|
|
140
|
+
readonly pointerAndFocus: Subscription.EntryWithoutKeepAlive<{
|
|
141
|
+
readonly id: string;
|
|
142
|
+
readonly version: number;
|
|
143
|
+
readonly state: {
|
|
144
|
+
readonly _tag: "Cold";
|
|
145
|
+
} | {
|
|
146
|
+
readonly _tag: "Leaving";
|
|
147
|
+
readonly text: string;
|
|
148
|
+
readonly maybeKey: Option.Option<string>;
|
|
149
|
+
readonly side: "Right" | "Top";
|
|
150
|
+
readonly trigger: "Focus" | "Pointer";
|
|
151
|
+
} | {
|
|
152
|
+
readonly _tag: "Shown";
|
|
153
|
+
readonly text: string;
|
|
154
|
+
readonly maybeKey: Option.Option<string>;
|
|
155
|
+
readonly side: "Right" | "Top";
|
|
156
|
+
readonly trigger: "Focus" | "Pointer";
|
|
157
|
+
} | {
|
|
158
|
+
readonly _tag: "Waiting";
|
|
159
|
+
readonly text: string;
|
|
160
|
+
readonly maybeKey: Option.Option<string>;
|
|
161
|
+
readonly side: "Right" | "Top";
|
|
162
|
+
} | {
|
|
163
|
+
readonly _tag: "Warm";
|
|
164
|
+
};
|
|
165
|
+
}, {
|
|
166
|
+
readonly _tag: "CompletedShowTip";
|
|
167
|
+
} | {
|
|
168
|
+
readonly _tag: "CompletedHideTip";
|
|
169
|
+
} | {
|
|
170
|
+
readonly _tag: "CompletedWaitBeforeShowing";
|
|
171
|
+
readonly version: number;
|
|
172
|
+
} | {
|
|
173
|
+
readonly _tag: "CompletedWaitBeforeHiding";
|
|
174
|
+
readonly version: number;
|
|
175
|
+
} | {
|
|
176
|
+
readonly _tag: "CompletedWaitBeforeCooling";
|
|
177
|
+
readonly version: number;
|
|
178
|
+
} | {
|
|
179
|
+
readonly _tag: "BlurredTipTarget";
|
|
180
|
+
} | {
|
|
181
|
+
readonly _tag: "EnteredTip";
|
|
182
|
+
} | {
|
|
183
|
+
readonly _tag: "EnteredTipTarget";
|
|
184
|
+
readonly text: string;
|
|
185
|
+
readonly maybeKey: Option.Option<string>;
|
|
186
|
+
readonly side: "Right" | "Top";
|
|
187
|
+
} | {
|
|
188
|
+
readonly _tag: "FocusedTipTarget";
|
|
189
|
+
readonly text: string;
|
|
190
|
+
readonly maybeKey: Option.Option<string>;
|
|
191
|
+
readonly side: "Right" | "Top";
|
|
192
|
+
} | {
|
|
193
|
+
readonly _tag: "LeftTipTarget";
|
|
194
|
+
} | {
|
|
195
|
+
readonly _tag: "PressedKey";
|
|
196
|
+
} | {
|
|
197
|
+
readonly _tag: "PressedPointer";
|
|
198
|
+
}, {
|
|
199
|
+
readonly tipId: string;
|
|
200
|
+
}, never> & {
|
|
201
|
+
readonly __subscription: never;
|
|
202
|
+
};
|
|
203
|
+
readonly keys: Subscription.EntryWithoutKeepAlive<{
|
|
204
|
+
readonly id: string;
|
|
205
|
+
readonly version: number;
|
|
206
|
+
readonly state: {
|
|
207
|
+
readonly _tag: "Cold";
|
|
208
|
+
} | {
|
|
209
|
+
readonly _tag: "Leaving";
|
|
210
|
+
readonly text: string;
|
|
211
|
+
readonly maybeKey: Option.Option<string>;
|
|
212
|
+
readonly side: "Right" | "Top";
|
|
213
|
+
readonly trigger: "Focus" | "Pointer";
|
|
214
|
+
} | {
|
|
215
|
+
readonly _tag: "Shown";
|
|
216
|
+
readonly text: string;
|
|
217
|
+
readonly maybeKey: Option.Option<string>;
|
|
218
|
+
readonly side: "Right" | "Top";
|
|
219
|
+
readonly trigger: "Focus" | "Pointer";
|
|
220
|
+
} | {
|
|
221
|
+
readonly _tag: "Waiting";
|
|
222
|
+
readonly text: string;
|
|
223
|
+
readonly maybeKey: Option.Option<string>;
|
|
224
|
+
readonly side: "Right" | "Top";
|
|
225
|
+
} | {
|
|
226
|
+
readonly _tag: "Warm";
|
|
227
|
+
};
|
|
228
|
+
}, {
|
|
229
|
+
readonly _tag: "CompletedShowTip";
|
|
230
|
+
} | {
|
|
231
|
+
readonly _tag: "CompletedHideTip";
|
|
232
|
+
} | {
|
|
233
|
+
readonly _tag: "CompletedWaitBeforeShowing";
|
|
234
|
+
readonly version: number;
|
|
235
|
+
} | {
|
|
236
|
+
readonly _tag: "CompletedWaitBeforeHiding";
|
|
237
|
+
readonly version: number;
|
|
238
|
+
} | {
|
|
239
|
+
readonly _tag: "CompletedWaitBeforeCooling";
|
|
240
|
+
readonly version: number;
|
|
241
|
+
} | {
|
|
242
|
+
readonly _tag: "BlurredTipTarget";
|
|
243
|
+
} | {
|
|
244
|
+
readonly _tag: "EnteredTip";
|
|
245
|
+
} | {
|
|
246
|
+
readonly _tag: "EnteredTipTarget";
|
|
247
|
+
readonly text: string;
|
|
248
|
+
readonly maybeKey: Option.Option<string>;
|
|
249
|
+
readonly side: "Right" | "Top";
|
|
250
|
+
} | {
|
|
251
|
+
readonly _tag: "FocusedTipTarget";
|
|
252
|
+
readonly text: string;
|
|
253
|
+
readonly maybeKey: Option.Option<string>;
|
|
254
|
+
readonly side: "Right" | "Top";
|
|
255
|
+
} | {
|
|
256
|
+
readonly _tag: "LeftTipTarget";
|
|
257
|
+
} | {
|
|
258
|
+
readonly _tag: "PressedKey";
|
|
259
|
+
} | {
|
|
260
|
+
readonly _tag: "PressedPointer";
|
|
261
|
+
}, {
|
|
262
|
+
readonly maybeTrigger: Option.Option<"Focus" | "Pointer">;
|
|
263
|
+
}, never> & {
|
|
264
|
+
readonly __subscription: never;
|
|
265
|
+
};
|
|
266
|
+
} extends (infer T) ? { readonly [Key in keyof T as `${Prefix}${Capitalize<Key>}`]: T[Key]; } : never;
|
|
267
|
+
/**
|
|
268
|
+
* The page's one tip: `div.tip[popover="manual"][aria-hidden="true"]`, which shows the words
|
|
269
|
+
* of any control carrying `data-tip` (IconButton, the glyph switch, a board's grip), then the
|
|
270
|
+
* key in its `data-tip-key` where it has one (an IconButton's `keyHint`). Render it
|
|
271
|
+
* once, beside the Announcer, and lift `subscriptions(keyPrefix)`. It opens on a resting
|
|
272
|
+
* pointer after a moment (at once while another has just closed), never on touch, and on
|
|
273
|
+
* keyboard focus; it can be hovered; leaving, blur, a press or any key closes it, and Escape
|
|
274
|
+
* closes a tip keyboard focus brought up and nothing else.
|
|
275
|
+
*
|
|
276
|
+
* Built as a page-level Submodel rather than over `@foldkit/ui`'s Tooltip, which is one
|
|
277
|
+
* Submodel per control and describes its control (`aria-describedby`). The Tip Rule is the
|
|
278
|
+
* opposite: a tip says its control's accessible name and nothing else, so it stays out of the
|
|
279
|
+
* accessibility tree, and any control takes one by carrying `data-tip`.
|
|
280
|
+
*/
|
|
281
|
+
export declare const view: import("foldkit/submodel").View<{
|
|
282
|
+
readonly id: string;
|
|
283
|
+
readonly version: number;
|
|
284
|
+
readonly state: {
|
|
285
|
+
readonly _tag: "Cold";
|
|
286
|
+
} | {
|
|
287
|
+
readonly _tag: "Leaving";
|
|
288
|
+
readonly text: string;
|
|
289
|
+
readonly maybeKey: Option.Option<string>;
|
|
290
|
+
readonly side: "Right" | "Top";
|
|
291
|
+
readonly trigger: "Focus" | "Pointer";
|
|
292
|
+
} | {
|
|
293
|
+
readonly _tag: "Shown";
|
|
294
|
+
readonly text: string;
|
|
295
|
+
readonly maybeKey: Option.Option<string>;
|
|
296
|
+
readonly side: "Right" | "Top";
|
|
297
|
+
readonly trigger: "Focus" | "Pointer";
|
|
298
|
+
} | {
|
|
299
|
+
readonly _tag: "Waiting";
|
|
300
|
+
readonly text: string;
|
|
301
|
+
readonly maybeKey: Option.Option<string>;
|
|
302
|
+
readonly side: "Right" | "Top";
|
|
303
|
+
} | {
|
|
304
|
+
readonly _tag: "Warm";
|
|
305
|
+
};
|
|
306
|
+
}, {
|
|
307
|
+
readonly _tag: "CompletedShowTip";
|
|
308
|
+
} | {
|
|
309
|
+
readonly _tag: "CompletedHideTip";
|
|
310
|
+
} | {
|
|
311
|
+
readonly _tag: "CompletedWaitBeforeShowing";
|
|
312
|
+
readonly version: number;
|
|
313
|
+
} | {
|
|
314
|
+
readonly _tag: "CompletedWaitBeforeHiding";
|
|
315
|
+
readonly version: number;
|
|
316
|
+
} | {
|
|
317
|
+
readonly _tag: "CompletedWaitBeforeCooling";
|
|
318
|
+
readonly version: number;
|
|
319
|
+
} | {
|
|
320
|
+
readonly _tag: "BlurredTipTarget";
|
|
321
|
+
} | {
|
|
322
|
+
readonly _tag: "EnteredTip";
|
|
323
|
+
} | {
|
|
324
|
+
readonly _tag: "EnteredTipTarget";
|
|
325
|
+
readonly text: string;
|
|
326
|
+
readonly maybeKey: Option.Option<string>;
|
|
327
|
+
readonly side: "Right" | "Top";
|
|
328
|
+
} | {
|
|
329
|
+
readonly _tag: "FocusedTipTarget";
|
|
330
|
+
readonly text: string;
|
|
331
|
+
readonly maybeKey: Option.Option<string>;
|
|
332
|
+
readonly side: "Right" | "Top";
|
|
333
|
+
} | {
|
|
334
|
+
readonly _tag: "LeftTipTarget";
|
|
335
|
+
} | {
|
|
336
|
+
readonly _tag: "PressedKey";
|
|
337
|
+
} | {
|
|
338
|
+
readonly _tag: "PressedPointer";
|
|
339
|
+
}, void>;
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
|
|
2
|
+
import { prefixKeys } from "../subscription/prefix-keys.js";
|
|
3
|
+
import { htmlElement } from "../dom/html-element.js";
|
|
4
|
+
import { Array, Duration, Effect, Equal, Match, Number, Option, Schema, Stream, pipe } from "effect";
|
|
5
|
+
import * as Command from "foldkit/command";
|
|
6
|
+
import { defineMessageUnion } from "foldkit/message";
|
|
7
|
+
import * as Render from "foldkit/render";
|
|
8
|
+
import { modifyFields } from "foldkit/struct";
|
|
9
|
+
import { defineView } from "foldkit/submodel";
|
|
10
|
+
import * as Subscription from "foldkit/subscription";
|
|
11
|
+
import * as Dom from "foldkit/dom";
|
|
12
|
+
import { defineTaggedUnion } from "foldkit/schema";
|
|
13
|
+
// src/tips/tips.ts
|
|
14
|
+
const Side = Schema.Literals(["Top", "Right"]);
|
|
15
|
+
/** What brought the tip: a resting pointer or keyboard focus. */
|
|
16
|
+
const Trigger = Schema.Literals(["Pointer", "Focus"]);
|
|
17
|
+
const Words = {
|
|
18
|
+
text: Schema.String,
|
|
19
|
+
maybeKey: Schema.Option(Schema.String),
|
|
20
|
+
side: Side
|
|
21
|
+
};
|
|
22
|
+
const ShownWords = {
|
|
23
|
+
...Words,
|
|
24
|
+
trigger: Trigger
|
|
25
|
+
};
|
|
26
|
+
const TipState = defineTaggedUnion({
|
|
27
|
+
Cold: {},
|
|
28
|
+
Waiting: Words,
|
|
29
|
+
Shown: ShownWords,
|
|
30
|
+
Leaving: ShownWords,
|
|
31
|
+
Warm: {}
|
|
32
|
+
});
|
|
33
|
+
/** Schema for the page's one tip layer. `version` counts its waits, and tells the current one
|
|
34
|
+
* from an earlier one whose Command is still out. */
|
|
35
|
+
const Model = Schema.Struct({
|
|
36
|
+
id: Schema.String,
|
|
37
|
+
version: Schema.Finite,
|
|
38
|
+
state: TipState
|
|
39
|
+
});
|
|
40
|
+
/** Union of all Messages the tip layer can produce. */
|
|
41
|
+
const Message = defineMessageUnion({
|
|
42
|
+
EnteredTipTarget: Words,
|
|
43
|
+
LeftTipTarget: {},
|
|
44
|
+
EnteredTip: {},
|
|
45
|
+
FocusedTipTarget: Words,
|
|
46
|
+
BlurredTipTarget: {},
|
|
47
|
+
PressedPointer: {},
|
|
48
|
+
PressedKey: {},
|
|
49
|
+
CompletedWaitBeforeShowing: { version: Schema.Finite },
|
|
50
|
+
CompletedWaitBeforeHiding: { version: Schema.Finite },
|
|
51
|
+
CompletedWaitBeforeCooling: { version: Schema.Finite },
|
|
52
|
+
CompletedShowTip: {},
|
|
53
|
+
CompletedHideTip: {}
|
|
54
|
+
});
|
|
55
|
+
/** Creates the tip layer with no tip. */
|
|
56
|
+
const init = (config) => (__foldkitBrandViewResult(({
|
|
57
|
+
id: config.id,
|
|
58
|
+
version: 0,
|
|
59
|
+
state: TipState.Cold()
|
|
60
|
+
}), "@gjermundgaraba/pixel-paper/tips/tips.js#init"));
|
|
61
|
+
/** The tip element's id, unique in the document. */
|
|
62
|
+
const id = (model) => __foldkitBrandViewResult((model.id), "@gjermundgaraba/pixel-paper/tips/tips.js#id");
|
|
63
|
+
const maybeShownTrigger = (model) => __foldkitBrandViewResult((Match.value(model.state).pipe(Match.withReturnType(), Match.tag("Shown", "Leaving", ({ trigger }) => __foldkitBrandViewResult((Option.some(trigger)), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous")), Match.orElse(() => __foldkitBrandViewResult((Option.none()), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~2")))), "@gjermundgaraba/pixel-paper/tips/tips.js#maybeShownTrigger");
|
|
64
|
+
const REST = Duration.millis(400);
|
|
65
|
+
const GRACE = Duration.millis(120);
|
|
66
|
+
const WARMTH = Duration.millis(400);
|
|
67
|
+
const TIP_ATTRIBUTE = "data-tip";
|
|
68
|
+
const TIP_KEY_ATTRIBUTE = "data-tip-key";
|
|
69
|
+
const TIP_SELECTOR = `[${TIP_ATTRIBUTE}]`;
|
|
70
|
+
const hasText = (element, text) => __foldkitBrandViewResult((element.isConnected && element.getAttribute(TIP_ATTRIBUTE) === text), "@gjermundgaraba/pixel-paper/tips/tips.js#hasText");
|
|
71
|
+
const findTipTarget = (trigger, text) => __foldkitBrandViewResult((Match.value(trigger).pipe(Match.withReturnType(), Match.when("Pointer", () => __foldkitBrandViewResult((Array.findLast(Array.fromIterable(document.querySelectorAll(`${TIP_SELECTOR}:hover`)), (element) => __foldkitBrandViewResult((hasText(element, text)), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~4"))), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~3")), Match.when("Focus", () => __foldkitBrandViewResult((pipe(Option.fromNullishOr(document.activeElement), Option.flatMap((element) => __foldkitBrandViewResult((Option.fromNullishOr(element.closest(TIP_SELECTOR))), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~6")), Option.filter((element) => __foldkitBrandViewResult((element.matches(":focus-visible") && hasText(element, text)), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~7")))), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~5")), Match.exhaustive)), "@gjermundgaraba/pixel-paper/tips/tips.js#findTipTarget");
|
|
72
|
+
const tipElement = (tipId) => __foldkitBrandViewResult((htmlElement(`#${CSS.escape(tipId)}`)), "@gjermundgaraba/pixel-paper/tips/tips.js#tipElement");
|
|
73
|
+
const hidePopover = (tip) => {
|
|
74
|
+
if (tip.matches(":popover-open")) tip.hidePopover();
|
|
75
|
+
};
|
|
76
|
+
/** Opens the tip on its control once the update that asked has rendered: focus that a closing
|
|
77
|
+
* dialog or menu hands back arrives while the top layer is still changing, and the control
|
|
78
|
+
* must still be on the page, and still the keyboard's or the pointer's, by then. The control
|
|
79
|
+
* is the tip's source, so its anchor. */
|
|
80
|
+
const ShowTip = Command.define("ShowTip", {
|
|
81
|
+
args: {
|
|
82
|
+
tipId: Schema.String,
|
|
83
|
+
text: Schema.String,
|
|
84
|
+
trigger: Trigger
|
|
85
|
+
},
|
|
86
|
+
messages: [Message.CompletedShowTip],
|
|
87
|
+
execute: ({ tipId, text, trigger }) => __foldkitBrandViewResult((Render.afterCommit.pipe(Effect.andThen(Effect.try(() => __foldkitBrandViewResult((Option.map(Option.all({
|
|
88
|
+
tip: tipElement(tipId),
|
|
89
|
+
source: findTipTarget(trigger, text)
|
|
90
|
+
}), ({ tip, source }) => {
|
|
91
|
+
hidePopover(tip);
|
|
92
|
+
tip.showPopover({ source });
|
|
93
|
+
})), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~8"))), Effect.ignore, Effect.as(Message.CompletedShowTip()))), "@gjermundgaraba/pixel-paper/tips/tips.js#execute")
|
|
94
|
+
});
|
|
95
|
+
/** Closes the tip. */
|
|
96
|
+
const HideTip = Command.define("HideTip", {
|
|
97
|
+
args: { tipId: Schema.String },
|
|
98
|
+
messages: [Message.CompletedHideTip],
|
|
99
|
+
execute: ({ tipId }) => __foldkitBrandViewResult((Effect.try(() => __foldkitBrandViewResult((Option.map(tipElement(tipId), hidePopover)), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~10")).pipe(Effect.ignore, Effect.as(Message.CompletedHideTip()))), "@gjermundgaraba/pixel-paper/tips/tips.js#execute~2")
|
|
100
|
+
});
|
|
101
|
+
/** Waits for a resting pointer. */
|
|
102
|
+
const WaitBeforeShowing = Command.define("WaitBeforeShowing", {
|
|
103
|
+
args: { version: Schema.Finite },
|
|
104
|
+
messages: [Message.CompletedWaitBeforeShowing],
|
|
105
|
+
execute: ({ version }) => __foldkitBrandViewResult((Effect.sleep(REST).pipe(Effect.as(Message.CompletedWaitBeforeShowing({ version })))), "@gjermundgaraba/pixel-paper/tips/tips.js#execute~3")
|
|
106
|
+
});
|
|
107
|
+
/** Waits for a pointer crossing onto the tip. */
|
|
108
|
+
const WaitBeforeHiding = Command.define("WaitBeforeHiding", {
|
|
109
|
+
args: { version: Schema.Finite },
|
|
110
|
+
messages: [Message.CompletedWaitBeforeHiding],
|
|
111
|
+
execute: ({ version }) => __foldkitBrandViewResult((Effect.sleep(GRACE).pipe(Effect.as(Message.CompletedWaitBeforeHiding({ version })))), "@gjermundgaraba/pixel-paper/tips/tips.js#execute~4")
|
|
112
|
+
});
|
|
113
|
+
/** Waits out the moment after a tip closes in which the next opens at once. */
|
|
114
|
+
const WaitBeforeCooling = Command.define("WaitBeforeCooling", {
|
|
115
|
+
args: { version: Schema.Finite },
|
|
116
|
+
messages: [Message.CompletedWaitBeforeCooling],
|
|
117
|
+
execute: ({ version }) => __foldkitBrandViewResult((Effect.sleep(WARMTH).pipe(Effect.as(Message.CompletedWaitBeforeCooling({ version })))), "@gjermundgaraba/pixel-paper/tips/tips.js#execute~5")
|
|
118
|
+
});
|
|
119
|
+
const wordsOf = ({ text, maybeKey, side }) => (__foldkitBrandViewResult(({
|
|
120
|
+
text,
|
|
121
|
+
maybeKey,
|
|
122
|
+
side
|
|
123
|
+
}), "@gjermundgaraba/pixel-paper/tips/tips.js#wordsOf"));
|
|
124
|
+
const show = (model, words, trigger) => (__foldkitBrandViewResult(({
|
|
125
|
+
model: modifyFields(model, { state: () => __foldkitBrandViewResult((TipState.Shown({
|
|
126
|
+
...wordsOf(words),
|
|
127
|
+
trigger
|
|
128
|
+
})), "@gjermundgaraba/pixel-paper/tips/tips.js#state") }),
|
|
129
|
+
commands: [ShowTip({
|
|
130
|
+
tipId: model.id,
|
|
131
|
+
text: words.text,
|
|
132
|
+
trigger
|
|
133
|
+
})]
|
|
134
|
+
}), "@gjermundgaraba/pixel-paper/tips/tips.js#show"));
|
|
135
|
+
const hide = (model) => {
|
|
136
|
+
const nextVersion = Number.increment(model.version);
|
|
137
|
+
return __foldkitBrandViewResult(({
|
|
138
|
+
model: modifyFields(model, {
|
|
139
|
+
version: () => __foldkitBrandViewResult((nextVersion), "@gjermundgaraba/pixel-paper/tips/tips.js#version"),
|
|
140
|
+
state: () => __foldkitBrandViewResult((TipState.Warm()), "@gjermundgaraba/pixel-paper/tips/tips.js#state~2")
|
|
141
|
+
}),
|
|
142
|
+
commands: [HideTip({ tipId: model.id }), WaitBeforeCooling({ version: nextVersion })]
|
|
143
|
+
}), "@gjermundgaraba/pixel-paper/tips/tips.js#hide");
|
|
144
|
+
};
|
|
145
|
+
const wait = (model, words) => {
|
|
146
|
+
const nextVersion = Number.increment(model.version);
|
|
147
|
+
return __foldkitBrandViewResult(({
|
|
148
|
+
model: modifyFields(model, {
|
|
149
|
+
version: () => __foldkitBrandViewResult((nextVersion), "@gjermundgaraba/pixel-paper/tips/tips.js#version~2"),
|
|
150
|
+
state: () => __foldkitBrandViewResult((TipState.Waiting(wordsOf(words))), "@gjermundgaraba/pixel-paper/tips/tips.js#state~3")
|
|
151
|
+
}),
|
|
152
|
+
commands: [WaitBeforeShowing({ version: nextVersion })]
|
|
153
|
+
}), "@gjermundgaraba/pixel-paper/tips/tips.js#wait");
|
|
154
|
+
};
|
|
155
|
+
const leave = (model, shown) => {
|
|
156
|
+
const nextVersion = Number.increment(model.version);
|
|
157
|
+
return __foldkitBrandViewResult(({
|
|
158
|
+
model: modifyFields(model, {
|
|
159
|
+
version: () => __foldkitBrandViewResult((nextVersion), "@gjermundgaraba/pixel-paper/tips/tips.js#version~3"),
|
|
160
|
+
state: () => __foldkitBrandViewResult((TipState.Leaving({
|
|
161
|
+
...wordsOf(shown),
|
|
162
|
+
trigger: shown.trigger
|
|
163
|
+
})), "@gjermundgaraba/pixel-paper/tips/tips.js#state~4")
|
|
164
|
+
}),
|
|
165
|
+
commands: [WaitBeforeHiding({ version: nextVersion })]
|
|
166
|
+
}), "@gjermundgaraba/pixel-paper/tips/tips.js#leave");
|
|
167
|
+
};
|
|
168
|
+
const cool = (model) => (__foldkitBrandViewResult(({ model: modifyFields(model, { state: () => __foldkitBrandViewResult((TipState.Cold()), "@gjermundgaraba/pixel-paper/tips/tips.js#state~5") }) }), "@gjermundgaraba/pixel-paper/tips/tips.js#cool"));
|
|
169
|
+
const dismiss = (model) => __foldkitBrandViewResult((TipState.match(model.state, {
|
|
170
|
+
Cold: () => (__foldkitBrandViewResult(({ model }), "@gjermundgaraba/pixel-paper/tips/tips.js#Cold")),
|
|
171
|
+
Waiting: () => __foldkitBrandViewResult((cool(model)), "@gjermundgaraba/pixel-paper/tips/tips.js#Waiting"),
|
|
172
|
+
Shown: () => __foldkitBrandViewResult((hide(model)), "@gjermundgaraba/pixel-paper/tips/tips.js#Shown"),
|
|
173
|
+
Leaving: () => __foldkitBrandViewResult((hide(model)), "@gjermundgaraba/pixel-paper/tips/tips.js#Leaving"),
|
|
174
|
+
Warm: () => (__foldkitBrandViewResult(({ model }), "@gjermundgaraba/pixel-paper/tips/tips.js#Warm"))
|
|
175
|
+
})), "@gjermundgaraba/pixel-paper/tips/tips.js#dismiss");
|
|
176
|
+
const entered = (model, words) => __foldkitBrandViewResult((TipState.match(model.state, {
|
|
177
|
+
Cold: () => __foldkitBrandViewResult((wait(model, words)), "@gjermundgaraba/pixel-paper/tips/tips.js#Cold~2"),
|
|
178
|
+
Waiting: (waiting) => __foldkitBrandViewResult((waiting.text === words.text ? { model } : wait(model, words)), "@gjermundgaraba/pixel-paper/tips/tips.js#Waiting~2"),
|
|
179
|
+
Shown: (shown) => __foldkitBrandViewResult((shown.text === words.text ? { model } : show(model, words, "Pointer")), "@gjermundgaraba/pixel-paper/tips/tips.js#Shown~2"),
|
|
180
|
+
Leaving: (leaving) => __foldkitBrandViewResult((leaving.text === words.text ? { model: modifyFields(model, { state: () => __foldkitBrandViewResult((TipState.Shown({
|
|
181
|
+
...wordsOf(words),
|
|
182
|
+
trigger: leaving.trigger
|
|
183
|
+
})), "@gjermundgaraba/pixel-paper/tips/tips.js#state~6") }) } : show(model, words, "Pointer")), "@gjermundgaraba/pixel-paper/tips/tips.js#Leaving~2"),
|
|
184
|
+
Warm: () => __foldkitBrandViewResult((show(model, words, "Pointer")), "@gjermundgaraba/pixel-paper/tips/tips.js#Warm~2")
|
|
185
|
+
})), "@gjermundgaraba/pixel-paper/tips/tips.js#entered");
|
|
186
|
+
/** Processes a tip layer Message and returns the next Model and Commands. */
|
|
187
|
+
const update = (model, message) => __foldkitBrandViewResult((Message.match(message, {
|
|
188
|
+
EnteredTipTarget: (words) => __foldkitBrandViewResult((entered(model, wordsOf(words))), "@gjermundgaraba/pixel-paper/tips/tips.js#EnteredTipTarget"),
|
|
189
|
+
LeftTipTarget: () => __foldkitBrandViewResult((TipState.matchOrElse(model.state, {
|
|
190
|
+
Waiting: () => __foldkitBrandViewResult((cool(model)), "@gjermundgaraba/pixel-paper/tips/tips.js#Waiting~3"),
|
|
191
|
+
Shown: (shown) => __foldkitBrandViewResult((shown.trigger === "Pointer" ? leave(model, shown) : { model }), "@gjermundgaraba/pixel-paper/tips/tips.js#Shown~3")
|
|
192
|
+
}, () => (__foldkitBrandViewResult(({ model }), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~11")))), "@gjermundgaraba/pixel-paper/tips/tips.js#LeftTipTarget"),
|
|
193
|
+
EnteredTip: () => __foldkitBrandViewResult((TipState.matchOrElse(model.state, { Leaving: (leaving) => (__foldkitBrandViewResult(({ model: modifyFields(model, { state: () => __foldkitBrandViewResult((TipState.Shown({
|
|
194
|
+
...wordsOf(leaving),
|
|
195
|
+
trigger: leaving.trigger
|
|
196
|
+
})), "@gjermundgaraba/pixel-paper/tips/tips.js#state~7") }) }), "@gjermundgaraba/pixel-paper/tips/tips.js#Leaving~3")) }, () => (__foldkitBrandViewResult(({ model }), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~12")))), "@gjermundgaraba/pixel-paper/tips/tips.js#EnteredTip"),
|
|
197
|
+
FocusedTipTarget: (words) => __foldkitBrandViewResult((show(model, wordsOf(words), "Focus")), "@gjermundgaraba/pixel-paper/tips/tips.js#FocusedTipTarget"),
|
|
198
|
+
BlurredTipTarget: () => __foldkitBrandViewResult((dismiss(model)), "@gjermundgaraba/pixel-paper/tips/tips.js#BlurredTipTarget"),
|
|
199
|
+
PressedPointer: () => __foldkitBrandViewResult((dismiss(model)), "@gjermundgaraba/pixel-paper/tips/tips.js#PressedPointer"),
|
|
200
|
+
PressedKey: () => __foldkitBrandViewResult((dismiss(model)), "@gjermundgaraba/pixel-paper/tips/tips.js#PressedKey"),
|
|
201
|
+
CompletedWaitBeforeShowing: ({ version }) => __foldkitBrandViewResult((TipState.matchOrElse(model.state, { Waiting: (waiting) => __foldkitBrandViewResult((model.version === version ? show(model, wordsOf(waiting), "Pointer") : { model }), "@gjermundgaraba/pixel-paper/tips/tips.js#Waiting~4") }, () => (__foldkitBrandViewResult(({ model }), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~13")))), "@gjermundgaraba/pixel-paper/tips/tips.js#CompletedWaitBeforeShowing"),
|
|
202
|
+
CompletedWaitBeforeHiding: ({ version }) => __foldkitBrandViewResult((TipState.matchOrElse(model.state, { Leaving: () => __foldkitBrandViewResult((model.version === version ? hide(model) : { model }), "@gjermundgaraba/pixel-paper/tips/tips.js#Leaving~4") }, () => (__foldkitBrandViewResult(({ model }), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~14")))), "@gjermundgaraba/pixel-paper/tips/tips.js#CompletedWaitBeforeHiding"),
|
|
203
|
+
CompletedWaitBeforeCooling: ({ version }) => __foldkitBrandViewResult((TipState.matchOrElse(model.state, { Warm: () => __foldkitBrandViewResult((model.version === version ? cool(model) : { model }), "@gjermundgaraba/pixel-paper/tips/tips.js#Warm~3") }, () => (__foldkitBrandViewResult(({ model }), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~15")))), "@gjermundgaraba/pixel-paper/tips/tips.js#CompletedWaitBeforeCooling"),
|
|
204
|
+
CompletedShowTip: () => (__foldkitBrandViewResult(({ model }), "@gjermundgaraba/pixel-paper/tips/tips.js#CompletedShowTip")),
|
|
205
|
+
CompletedHideTip: () => (__foldkitBrandViewResult(({ model }), "@gjermundgaraba/pixel-paper/tips/tips.js#CompletedHideTip"))
|
|
206
|
+
})), "@gjermundgaraba/pixel-paper/tips/tips.js#update");
|
|
207
|
+
const sideOf = (element) => __foldkitBrandViewResult((element.closest("[aria-orientation=\"vertical\"]") === null && !getComputedStyle(element).writingMode.startsWith("vertical") ? "Top" : "Right"), "@gjermundgaraba/pixel-paper/tips/tips.js#sideOf");
|
|
208
|
+
const tipTargetOf = (target) => __foldkitBrandViewResult((pipe(Option.liftPredicate(target, (node) => __foldkitBrandViewResult((node instanceof Element), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~16")), Option.flatMap((element) => __foldkitBrandViewResult((Option.fromNullishOr(element.closest(TIP_SELECTOR))), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~17")), Option.flatMap((element) => __foldkitBrandViewResult((Option.map(Option.fromNullishOr(element.getAttribute(TIP_ATTRIBUTE)), (text) => (__foldkitBrandViewResult(({
|
|
209
|
+
element,
|
|
210
|
+
text,
|
|
211
|
+
maybeKey: Option.fromNullishOr(element.getAttribute(TIP_KEY_ATTRIBUTE)),
|
|
212
|
+
side: sideOf(element)
|
|
213
|
+
}), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~19")))), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~18")))), "@gjermundgaraba/pixel-paper/tips/tips.js#tipTargetOf");
|
|
214
|
+
const pointerOverMessage = (tipId, event) => {
|
|
215
|
+
if (event.pointerType === "touch") return __foldkitBrandViewResult((Option.none()), "@gjermundgaraba/pixel-paper/tips/tips.js#pointerOverMessage");
|
|
216
|
+
if (event.target instanceof Element && event.target.closest(`#${CSS.escape(tipId)}`) !== null) return __foldkitBrandViewResult((Option.some(Message.EnteredTip())), "@gjermundgaraba/pixel-paper/tips/tips.js#pointerOverMessage");
|
|
217
|
+
return __foldkitBrandViewResult((Option.some(Option.match(tipTargetOf(event.target), {
|
|
218
|
+
onNone: () => __foldkitBrandViewResult((Message.LeftTipTarget()), "@gjermundgaraba/pixel-paper/tips/tips.js#onNone"),
|
|
219
|
+
onSome: (target) => __foldkitBrandViewResult((Message.EnteredTipTarget(wordsOf(target))), "@gjermundgaraba/pixel-paper/tips/tips.js#onSome")
|
|
220
|
+
}))), "@gjermundgaraba/pixel-paper/tips/tips.js#pointerOverMessage");
|
|
221
|
+
};
|
|
222
|
+
const focusInMessage = (event) => __foldkitBrandViewResult((Option.map(Option.filter(tipTargetOf(event.target), ({ element }) => __foldkitBrandViewResult((element.matches(":focus-visible")), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~20")), (target) => __foldkitBrandViewResult((Message.FocusedTipTarget(wordsOf(target))), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~21"))), "@gjermundgaraba/pixel-paper/tips/tips.js#focusInMessage");
|
|
223
|
+
const focusOutMessage = (event) => __foldkitBrandViewResult((Option.map(Option.filter(tipTargetOf(event.target), ({ element }) => __foldkitBrandViewResult((!(event.relatedTarget instanceof Node && element.contains(event.relatedTarget))), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~22")), () => __foldkitBrandViewResult((Message.BlurredTipTarget()), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~23"))), "@gjermundgaraba/pixel-paper/tips/tips.js#focusOutMessage");
|
|
224
|
+
const isEscapeOnFocusTip = (event, trigger) => __foldkitBrandViewResult((event.key === "Escape" && trigger === "Focus"), "@gjermundgaraba/pixel-paper/tips/tips.js#isEscapeOnFocusTip");
|
|
225
|
+
const keepFromMenusAndDialogs = (event) => {
|
|
226
|
+
event.preventDefault();
|
|
227
|
+
event.stopPropagation();
|
|
228
|
+
};
|
|
229
|
+
const keyMessage = (event, trigger) => {
|
|
230
|
+
if (event.isComposing) return __foldkitBrandViewResult((Option.none()), "@gjermundgaraba/pixel-paper/tips/tips.js#keyMessage");
|
|
231
|
+
if (isEscapeOnFocusTip(event, trigger)) keepFromMenusAndDialogs(event);
|
|
232
|
+
return __foldkitBrandViewResult((Option.some(Message.PressedKey())), "@gjermundgaraba/pixel-paper/tips/tips.js#keyMessage");
|
|
233
|
+
};
|
|
234
|
+
const sameWords = (previous, next) => __foldkitBrandViewResult((previous._tag !== "EnteredTipTarget" || next._tag !== "EnteredTipTarget" || previous.text === next.text && previous.side === next.side && Equal.equals(previous.maybeKey, next.maybeKey)), "@gjermundgaraba/pixel-paper/tips/tips.js#sameWords");
|
|
235
|
+
const pointerOverChanges = (tipId) => __foldkitBrandViewResult((Dom.streamFromEventFilterMap({
|
|
236
|
+
target: document,
|
|
237
|
+
type: "pointerover",
|
|
238
|
+
filterMapEvent: (event) => __foldkitBrandViewResult((pointerOverMessage(tipId, event)), "@gjermundgaraba/pixel-paper/tips/tips.js#filterMapEvent")
|
|
239
|
+
}).pipe(Stream.changesWith((previous, next) => __foldkitBrandViewResult((previous._tag === next._tag && sameWords(previous, next)), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~24")))), "@gjermundgaraba/pixel-paper/tips/tips.js#pointerOverChanges");
|
|
240
|
+
const tipSubscriptions = Subscription.make()((entry) => (__foldkitBrandViewResult(({
|
|
241
|
+
pointerAndFocus: entry({ tipId: Schema.String }, {
|
|
242
|
+
modelToDependencies: (model) => (__foldkitBrandViewResult(({ tipId: model.id }), "@gjermundgaraba/pixel-paper/tips/tips.js#modelToDependencies")),
|
|
243
|
+
dependenciesToStream: ({ tipId }) => __foldkitBrandViewResult((Stream.mergeAll([
|
|
244
|
+
pointerOverChanges(tipId),
|
|
245
|
+
Dom.streamFromEvent({
|
|
246
|
+
target: document,
|
|
247
|
+
type: "pointerdown",
|
|
248
|
+
mapEvent: () => __foldkitBrandViewResult((Message.PressedPointer()), "@gjermundgaraba/pixel-paper/tips/tips.js#mapEvent")
|
|
249
|
+
}),
|
|
250
|
+
Dom.streamFromEventFilterMap({
|
|
251
|
+
target: document,
|
|
252
|
+
type: "focusin",
|
|
253
|
+
filterMapEvent: focusInMessage
|
|
254
|
+
}),
|
|
255
|
+
Dom.streamFromEventFilterMap({
|
|
256
|
+
target: document,
|
|
257
|
+
type: "focusout",
|
|
258
|
+
filterMapEvent: focusOutMessage
|
|
259
|
+
})
|
|
260
|
+
], { concurrency: "unbounded" })), "@gjermundgaraba/pixel-paper/tips/tips.js#dependenciesToStream")
|
|
261
|
+
}),
|
|
262
|
+
keys: entry({ maybeTrigger: Schema.Option(Trigger) }, {
|
|
263
|
+
modelToDependencies: (model) => (__foldkitBrandViewResult(({ maybeTrigger: maybeShownTrigger(model) }), "@gjermundgaraba/pixel-paper/tips/tips.js#modelToDependencies~2")),
|
|
264
|
+
dependenciesToStream: ({ maybeTrigger }) => __foldkitBrandViewResult((Option.match(maybeTrigger, {
|
|
265
|
+
onNone: () => __foldkitBrandViewResult((Stream.empty), "@gjermundgaraba/pixel-paper/tips/tips.js#onNone~2"),
|
|
266
|
+
onSome: (trigger) => __foldkitBrandViewResult((Dom.streamFromEventFilterMap({
|
|
267
|
+
target: document,
|
|
268
|
+
type: "keydown",
|
|
269
|
+
filterMapEvent: (event) => __foldkitBrandViewResult((keyMessage(event, trigger)), "@gjermundgaraba/pixel-paper/tips/tips.js#filterMapEvent~2"),
|
|
270
|
+
options: { capture: true }
|
|
271
|
+
})), "@gjermundgaraba/pixel-paper/tips/tips.js#onSome~2")
|
|
272
|
+
})), "@gjermundgaraba/pixel-paper/tips/tips.js#dependenciesToStream~2")
|
|
273
|
+
})
|
|
274
|
+
}), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~25")));
|
|
275
|
+
/** The page's pointer, focus and keys, read for the tip: lift it into the application's
|
|
276
|
+
* Subscriptions with a key prefix of the parent's that no other record on the page uses
|
|
277
|
+
* (`subscriptions("tip")` is keyed `tipPointerAndFocus` and `tipKeys`). Keys are listened to
|
|
278
|
+
* only while a tip shows. */
|
|
279
|
+
const subscriptions = (keyPrefix) => __foldkitBrandViewResult((prefixKeys(keyPrefix, tipSubscriptions)), "@gjermundgaraba/pixel-paper/tips/tips.js#subscriptions");
|
|
280
|
+
const maybeWordsOf = (model) => __foldkitBrandViewResult((Match.value(model.state).pipe(Match.withReturnType(), Match.tag("Waiting", "Shown", "Leaving", (words) => __foldkitBrandViewResult((Option.some(wordsOf(words))), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~26")), Match.orElse(() => __foldkitBrandViewResult((Option.none()), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~27")))), "@gjermundgaraba/pixel-paper/tips/tips.js#maybeWordsOf");
|
|
281
|
+
/**
|
|
282
|
+
* The page's one tip: `div.tip[popover="manual"][aria-hidden="true"]`, which shows the words
|
|
283
|
+
* of any control carrying `data-tip` (IconButton, the glyph switch, a board's grip), then the
|
|
284
|
+
* key in its `data-tip-key` where it has one (an IconButton's `keyHint`). Render it
|
|
285
|
+
* once, beside the Announcer, and lift `subscriptions(keyPrefix)`. It opens on a resting
|
|
286
|
+
* pointer after a moment (at once while another has just closed), never on touch, and on
|
|
287
|
+
* keyboard focus; it can be hovered; leaving, blur, a press or any key closes it, and Escape
|
|
288
|
+
* closes a tip keyboard focus brought up and nothing else.
|
|
289
|
+
*
|
|
290
|
+
* Built as a page-level Submodel rather than over `@foldkit/ui`'s Tooltip, which is one
|
|
291
|
+
* Submodel per control and describes its control (`aria-describedby`). The Tip Rule is the
|
|
292
|
+
* opposite: a tip says its control's accessible name and nothing else, so it stays out of the
|
|
293
|
+
* accessibility tree, and any control takes one by carrying `data-tip`.
|
|
294
|
+
*/
|
|
295
|
+
const view = defineView((model, h) => {
|
|
296
|
+
const maybeWords = maybeWordsOf(model);
|
|
297
|
+
return __foldkitBrandViewResult((h.div([
|
|
298
|
+
h.Id(model.id),
|
|
299
|
+
h.Popover("manual"),
|
|
300
|
+
h.AriaHidden(true),
|
|
301
|
+
h.Class("tip"),
|
|
302
|
+
...Option.exists(maybeWords, ({ side }) => __foldkitBrandViewResult((side === "Right"), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~29")) ? [h.DataAttribute("side", "right")] : []
|
|
303
|
+
], Option.match(maybeWords, {
|
|
304
|
+
onNone: () => __foldkitBrandViewResult(([]), "@gjermundgaraba/pixel-paper/tips/tips.js#onNone~3"),
|
|
305
|
+
onSome: ({ text, maybeKey }) => __foldkitBrandViewResult(([text, ...Array.fromOption(Option.map(maybeKey, (key) => __foldkitBrandViewResult((h.kbd([h.Class("key-hint")], [key])), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~30")))]), "@gjermundgaraba/pixel-paper/tips/tips.js#onSome~3")
|
|
306
|
+
}))), "@gjermundgaraba/pixel-paper/tips/tips.js#anonymous~28");
|
|
307
|
+
});
|
|
308
|
+
export { HideTip, Message, Model, ShowTip, TipState, Trigger, WaitBeforeCooling, WaitBeforeHiding, WaitBeforeShowing, focusOutMessage, id, init, keyMessage, pointerOverMessage, subscriptions, update, view };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AnnounceSlip, InitConfig, Message, Model, ShowConfig, dismiss, id, init, sceneMounts, show, update, view } from "./toast.js";
|
|
2
|
+
declare namespace index_d_exports {
|
|
3
|
+
export { AnnounceSlip, InitConfig, Message, Model, ShowConfig, dismiss, id, init, sceneMounts, show, update, view };
|
|
4
|
+
}
|
|
5
|
+
export { AnnounceSlip, type InitConfig, Message, Model, type ShowConfig, dismiss, id, index_d_exports, init, sceneMounts, show, update, view };
|