@gjermundgaraba/pixel-paper 0.0.0-stage → 0.1.1
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,17 @@
|
|
|
1
|
+
import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
|
|
2
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { AnnounceSlip, Message, Model, dismiss, id, init, sceneMounts, show, update, view } from "./toast.js";
|
|
4
|
+
// src/toast/index.ts
|
|
5
|
+
var toast_exports = /* @__PURE__ */ __exportAll({
|
|
6
|
+
AnnounceSlip: () => __foldkitBrandViewResult((AnnounceSlip), "@gjermundgaraba/pixel-paper/toast/index.js#AnnounceSlip"),
|
|
7
|
+
Message: () => __foldkitBrandViewResult((Message), "@gjermundgaraba/pixel-paper/toast/index.js#Message"),
|
|
8
|
+
Model: () => __foldkitBrandViewResult((Model), "@gjermundgaraba/pixel-paper/toast/index.js#Model"),
|
|
9
|
+
dismiss: () => __foldkitBrandViewResult((dismiss), "@gjermundgaraba/pixel-paper/toast/index.js#dismiss"),
|
|
10
|
+
id: () => __foldkitBrandViewResult((id), "@gjermundgaraba/pixel-paper/toast/index.js#id"),
|
|
11
|
+
init: () => __foldkitBrandViewResult((init), "@gjermundgaraba/pixel-paper/toast/index.js#init"),
|
|
12
|
+
sceneMounts: () => __foldkitBrandViewResult((sceneMounts), "@gjermundgaraba/pixel-paper/toast/index.js#sceneMounts"),
|
|
13
|
+
show: () => __foldkitBrandViewResult((show), "@gjermundgaraba/pixel-paper/toast/index.js#show"),
|
|
14
|
+
update: () => __foldkitBrandViewResult((update), "@gjermundgaraba/pixel-paper/toast/index.js#update"),
|
|
15
|
+
view: () => __foldkitBrandViewResult((view), "@gjermundgaraba/pixel-paper/toast/index.js#view")
|
|
16
|
+
});
|
|
17
|
+
export { AnnounceSlip, Message, Model, dismiss, id, init, sceneMounts, show, toast_exports, update, view };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Option, Schema } from "effect";
|
|
2
|
+
import { Toast } from "@foldkit/ui";
|
|
3
|
+
/** `Ok`: a committed change, in ink, gone after the hold. `Error`: red, and it stays until it
|
|
4
|
+
* is dismissed or taken back; like every tone it is said politely. `Quiet`: news, nothing
|
|
5
|
+
* wrong, on the head tint, gone after the hold. */
|
|
6
|
+
export declare const Tone: Schema.Literals<readonly ["Ok", "Error", "Quiet"]>;
|
|
7
|
+
export type Tone = typeof Tone.Type;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
|
|
2
|
+
import { Array, Option, Schema } from "effect";
|
|
3
|
+
import { Toast } from "@foldkit/ui";
|
|
4
|
+
// src/toast/stack.ts
|
|
5
|
+
/** `Ok`: a committed change, in ink, gone after the hold. `Error`: red, and it stays until it
|
|
6
|
+
* is dismissed or taken back; like every tone it is said politely. `Quiet`: news, nothing
|
|
7
|
+
* wrong, on the head tint, gone after the hold. */
|
|
8
|
+
const Tone = Schema.Literals([
|
|
9
|
+
"Ok",
|
|
10
|
+
"Error",
|
|
11
|
+
"Quiet"
|
|
12
|
+
]);
|
|
13
|
+
const Payload = Schema.Struct({
|
|
14
|
+
tone: Tone,
|
|
15
|
+
title: Schema.String,
|
|
16
|
+
maybeBody: Schema.Option(Schema.String)
|
|
17
|
+
});
|
|
18
|
+
const { Entry, Model, Message, OutMessage, init, update, show, dismiss, view } = Toast.make(Payload);
|
|
19
|
+
const showing = (model) => __foldkitBrandViewResult((Array.filter(model.entries, (entry) => __foldkitBrandViewResult((entry.animation.isShowing), "@gjermundgaraba/pixel-paper/toast/stack.js#anonymous"))), "@gjermundgaraba/pixel-paper/toast/stack.js#showing");
|
|
20
|
+
const newestId = (model) => __foldkitBrandViewResult((Option.map(Array.last(model.entries), (entry) => __foldkitBrandViewResult((entry.id), "@gjermundgaraba/pixel-paper/toast/stack.js#anonymous~2"))), "@gjermundgaraba/pixel-paper/toast/stack.js#newestId");
|
|
21
|
+
const hold = (model, entryId) => __foldkitBrandViewResult((update(model, Message.HoveredEntry({ entryId }))), "@gjermundgaraba/pixel-paper/toast/stack.js#hold");
|
|
22
|
+
const release = (model, entryId) => __foldkitBrandViewResult((update(model, Message.LeftEntry({ entryId }))), "@gjermundgaraba/pixel-paper/toast/stack.js#release");
|
|
23
|
+
export { Message, Model, OutMessage, Payload, Tone, dismiss, hold, init, newestId, release, show, showing, update, view };
|
|
@@ -0,0 +1,559 @@
|
|
|
1
|
+
import { Tone } from "./stack.js";
|
|
2
|
+
import { Duration, Effect, Option, Schema } from "effect";
|
|
3
|
+
import * as Command from "foldkit/command";
|
|
4
|
+
import * as Mount from "foldkit/mount";
|
|
5
|
+
import * as Update from "foldkit/update";
|
|
6
|
+
/** Schema for the page's toast stack: the `@foldkit/ui` Toast stack it is built on, which
|
|
7
|
+
* holds the slips, what holds them on screen (the pointer on a slip, the keyboard in the
|
|
8
|
+
* stack), and where focus came into the stack from. */
|
|
9
|
+
export declare const Model: Schema.Struct<{
|
|
10
|
+
readonly stack: Schema.Struct<{
|
|
11
|
+
readonly id: Schema.String;
|
|
12
|
+
readonly defaultDuration: Schema.DurationFromMillis;
|
|
13
|
+
readonly entries: Schema.$Array<Schema.Struct<{
|
|
14
|
+
readonly id: Schema.String;
|
|
15
|
+
readonly variant: Schema.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
|
|
16
|
+
readonly animation: Schema.Struct<{
|
|
17
|
+
readonly id: Schema.String;
|
|
18
|
+
readonly isShowing: Schema.Boolean;
|
|
19
|
+
readonly transitionState: Schema.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
20
|
+
readonly transitionGeneration: Schema.Number;
|
|
21
|
+
}>;
|
|
22
|
+
readonly maybeDuration: Schema.Option<Schema.DurationFromMillis>;
|
|
23
|
+
readonly pendingDismissVersion: Schema.Number;
|
|
24
|
+
readonly isHovered: Schema.Boolean;
|
|
25
|
+
readonly swipeState: import("foldkit/schema").TaggedUnion<{
|
|
26
|
+
readonly Idle: {};
|
|
27
|
+
readonly Dragging: {
|
|
28
|
+
pointerId: Schema.Number;
|
|
29
|
+
startX: Schema.Number;
|
|
30
|
+
currentX: Schema.Number;
|
|
31
|
+
};
|
|
32
|
+
readonly Settling: {
|
|
33
|
+
offsetX: Schema.Number;
|
|
34
|
+
};
|
|
35
|
+
readonly Dismissing: {
|
|
36
|
+
offsetX: Schema.Number;
|
|
37
|
+
direction: Schema.Literals<readonly ["Left", "Right"]>;
|
|
38
|
+
};
|
|
39
|
+
}>;
|
|
40
|
+
readonly swipeVersion: Schema.Number;
|
|
41
|
+
readonly payload: Schema.Codec<{
|
|
42
|
+
readonly tone: "Error" | "Ok" | "Quiet";
|
|
43
|
+
readonly title: string;
|
|
44
|
+
readonly maybeBody: Option.Option<string>;
|
|
45
|
+
}, {
|
|
46
|
+
readonly tone: "Error" | "Ok" | "Quiet";
|
|
47
|
+
readonly title: string;
|
|
48
|
+
readonly maybeBody: Option.Option<string>;
|
|
49
|
+
}, never, never>;
|
|
50
|
+
}>>;
|
|
51
|
+
readonly nextEntryKey: Schema.Number;
|
|
52
|
+
readonly maybeSwipeConfig: Schema.Option<Schema.Struct<{
|
|
53
|
+
readonly direction: Schema.Literals<readonly ["Left", "Right"]>;
|
|
54
|
+
readonly threshold: Schema.Number;
|
|
55
|
+
}>>;
|
|
56
|
+
}>;
|
|
57
|
+
readonly isPointerIn: Schema.Boolean;
|
|
58
|
+
readonly isFocusIn: Schema.Boolean;
|
|
59
|
+
readonly maybeReturnFocusId: Schema.Option<Schema.String>;
|
|
60
|
+
}>;
|
|
61
|
+
export type Model = typeof Model.Type;
|
|
62
|
+
/** Union of all Messages the toast stack can produce. */
|
|
63
|
+
export declare const Message: import("foldkit/message").MessageUnion<{
|
|
64
|
+
readonly GotStackMessage: {
|
|
65
|
+
message: import("foldkit/message").MessageUnion<{
|
|
66
|
+
readonly Added: {
|
|
67
|
+
readonly entry: Schema.Struct<{
|
|
68
|
+
readonly id: Schema.String;
|
|
69
|
+
readonly variant: Schema.Literals<readonly ["Info", "Success", "Warning", "Error"]>;
|
|
70
|
+
readonly animation: Schema.Struct<{
|
|
71
|
+
readonly id: Schema.String;
|
|
72
|
+
readonly isShowing: Schema.Boolean;
|
|
73
|
+
readonly transitionState: Schema.Literals<readonly ["Idle", "EnterStart", "EnterAnimating", "LeaveStart", "LeaveAnimating"]>;
|
|
74
|
+
readonly transitionGeneration: Schema.Number;
|
|
75
|
+
}>;
|
|
76
|
+
readonly maybeDuration: Schema.Option<Schema.DurationFromMillis>;
|
|
77
|
+
readonly pendingDismissVersion: Schema.Number;
|
|
78
|
+
readonly isHovered: Schema.Boolean;
|
|
79
|
+
readonly swipeState: import("foldkit/schema").TaggedUnion<{
|
|
80
|
+
readonly Idle: {};
|
|
81
|
+
readonly Dragging: {
|
|
82
|
+
pointerId: Schema.Number;
|
|
83
|
+
startX: Schema.Number;
|
|
84
|
+
currentX: Schema.Number;
|
|
85
|
+
};
|
|
86
|
+
readonly Settling: {
|
|
87
|
+
offsetX: Schema.Number;
|
|
88
|
+
};
|
|
89
|
+
readonly Dismissing: {
|
|
90
|
+
offsetX: Schema.Number;
|
|
91
|
+
direction: Schema.Literals<readonly ["Left", "Right"]>;
|
|
92
|
+
};
|
|
93
|
+
}>;
|
|
94
|
+
readonly swipeVersion: Schema.Number;
|
|
95
|
+
readonly payload: Schema.Codec<{
|
|
96
|
+
readonly tone: "Error" | "Ok" | "Quiet";
|
|
97
|
+
readonly title: string;
|
|
98
|
+
readonly maybeBody: Option.Option<string>;
|
|
99
|
+
}, {
|
|
100
|
+
readonly tone: "Error" | "Ok" | "Quiet";
|
|
101
|
+
readonly title: string;
|
|
102
|
+
readonly maybeBody: Option.Option<string>;
|
|
103
|
+
}, never, never>;
|
|
104
|
+
}>;
|
|
105
|
+
};
|
|
106
|
+
readonly Dismissed: {
|
|
107
|
+
entryId: Schema.String;
|
|
108
|
+
};
|
|
109
|
+
readonly DismissedAll: {};
|
|
110
|
+
readonly CompletedWaitBeforeDismissal: {
|
|
111
|
+
entryId: Schema.String;
|
|
112
|
+
version: Schema.Number;
|
|
113
|
+
};
|
|
114
|
+
readonly HoveredEntry: {
|
|
115
|
+
entryId: Schema.String;
|
|
116
|
+
};
|
|
117
|
+
readonly LeftEntry: {
|
|
118
|
+
entryId: Schema.String;
|
|
119
|
+
};
|
|
120
|
+
readonly GotAnimationMessage: {
|
|
121
|
+
entryId: Schema.String;
|
|
122
|
+
message: import("foldkit/message").MessageUnion<{
|
|
123
|
+
readonly Showed: {};
|
|
124
|
+
readonly Hid: {};
|
|
125
|
+
readonly CompletedWaitForPaint: {
|
|
126
|
+
generation: Schema.Number;
|
|
127
|
+
};
|
|
128
|
+
readonly EndedAnimation: {
|
|
129
|
+
generation: Schema.Number;
|
|
130
|
+
};
|
|
131
|
+
}>;
|
|
132
|
+
};
|
|
133
|
+
readonly PressedEntryPointer: {
|
|
134
|
+
entryId: Schema.String;
|
|
135
|
+
pointerId: Schema.Number;
|
|
136
|
+
clientX: Schema.Number;
|
|
137
|
+
};
|
|
138
|
+
readonly MovedSwipePointer: {
|
|
139
|
+
pointerId: Schema.Number;
|
|
140
|
+
clientX: Schema.Number;
|
|
141
|
+
};
|
|
142
|
+
readonly ReleasedSwipePointer: {
|
|
143
|
+
pointerId: Schema.Number;
|
|
144
|
+
clientX: Schema.Number;
|
|
145
|
+
};
|
|
146
|
+
readonly CancelledSwipe: {
|
|
147
|
+
pointerId: Schema.Number;
|
|
148
|
+
};
|
|
149
|
+
readonly PressedEscape: {};
|
|
150
|
+
readonly CompletedWaitForSwipeSettled: {
|
|
151
|
+
entryId: Schema.String;
|
|
152
|
+
version: Schema.Number;
|
|
153
|
+
};
|
|
154
|
+
}>;
|
|
155
|
+
};
|
|
156
|
+
readonly FocusedStack: {
|
|
157
|
+
maybeFromId: Schema.Option<Schema.String>;
|
|
158
|
+
};
|
|
159
|
+
readonly BlurredStack: {};
|
|
160
|
+
readonly PressedEscape: {};
|
|
161
|
+
readonly MovedHost: {};
|
|
162
|
+
readonly ClickedDismiss: {
|
|
163
|
+
entryId: Schema.String;
|
|
164
|
+
};
|
|
165
|
+
readonly CompletedFocusSlip: {};
|
|
166
|
+
readonly CompletedFocus: {};
|
|
167
|
+
readonly CompletedAnnounceSlip: {};
|
|
168
|
+
}>;
|
|
169
|
+
export type Message = typeof Message.Type;
|
|
170
|
+
/** Configuration for creating the toast stack with `init`. The `id` must be unique in the
|
|
171
|
+
* document. */
|
|
172
|
+
export type InitConfig = Readonly<{
|
|
173
|
+
id: string;
|
|
174
|
+
}>;
|
|
175
|
+
/** Creates an empty toast stack. */
|
|
176
|
+
export declare const init: (config: InitConfig) => Model;
|
|
177
|
+
/** The stack's id, unique in the document. */
|
|
178
|
+
export declare const id: (model: Model) => string;
|
|
179
|
+
type StepReturn = Update.Return<Model, Message>;
|
|
180
|
+
/**
|
|
181
|
+
* Says a raised slip exactly once. `@foldkit/ui`'s stack is always a polite live region, so a
|
|
182
|
+
* slip added to a stack already on the page is read from there, and this says nothing more. A
|
|
183
|
+
* stack mounted in the same render (it moved to another host, a Dialog opening or closing in
|
|
184
|
+
* the same update) is a live region that arrives already holding the slip, which goes
|
|
185
|
+
* unheard: then the slip is said through the page's live region (as `Announcer.Announce` does),
|
|
186
|
+
* which follows the same host. It compares the stack element before and after the render.
|
|
187
|
+
*/
|
|
188
|
+
export declare const AnnounceSlip: Command.CommandDefinitionWithArgs<"AnnounceSlip", {
|
|
189
|
+
stackId: Schema.String;
|
|
190
|
+
text: Schema.String;
|
|
191
|
+
}, Effect.Effect<{
|
|
192
|
+
readonly _tag: "CompletedAnnounceSlip";
|
|
193
|
+
}, never, never>>;
|
|
194
|
+
/** Processes a toast stack Message and returns the next Model and Commands. */
|
|
195
|
+
export declare const update: (model: Model, message: Message) => Readonly<{
|
|
196
|
+
model: {
|
|
197
|
+
readonly stack: {
|
|
198
|
+
readonly id: string;
|
|
199
|
+
readonly defaultDuration: Duration.Duration;
|
|
200
|
+
readonly entries: readonly {
|
|
201
|
+
readonly id: string;
|
|
202
|
+
readonly variant: "Error" | "Info" | "Success" | "Warning";
|
|
203
|
+
readonly animation: {
|
|
204
|
+
readonly id: string;
|
|
205
|
+
readonly isShowing: boolean;
|
|
206
|
+
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
207
|
+
readonly transitionGeneration: number;
|
|
208
|
+
};
|
|
209
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
210
|
+
readonly pendingDismissVersion: number;
|
|
211
|
+
readonly isHovered: boolean;
|
|
212
|
+
readonly swipeState: {
|
|
213
|
+
readonly _tag: "Dismissing";
|
|
214
|
+
readonly offsetX: number;
|
|
215
|
+
readonly direction: "Left" | "Right";
|
|
216
|
+
} | {
|
|
217
|
+
readonly _tag: "Dragging";
|
|
218
|
+
readonly pointerId: number;
|
|
219
|
+
readonly startX: number;
|
|
220
|
+
readonly currentX: number;
|
|
221
|
+
} | {
|
|
222
|
+
readonly _tag: "Idle";
|
|
223
|
+
} | {
|
|
224
|
+
readonly _tag: "Settling";
|
|
225
|
+
readonly offsetX: number;
|
|
226
|
+
};
|
|
227
|
+
readonly swipeVersion: number;
|
|
228
|
+
readonly payload: {
|
|
229
|
+
readonly tone: "Error" | "Ok" | "Quiet";
|
|
230
|
+
readonly title: string;
|
|
231
|
+
readonly maybeBody: Option.Option<string>;
|
|
232
|
+
};
|
|
233
|
+
}[];
|
|
234
|
+
readonly nextEntryKey: number;
|
|
235
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
236
|
+
readonly direction: "Left" | "Right";
|
|
237
|
+
readonly threshold: number;
|
|
238
|
+
}>;
|
|
239
|
+
};
|
|
240
|
+
readonly isPointerIn: boolean;
|
|
241
|
+
readonly isFocusIn: boolean;
|
|
242
|
+
readonly maybeReturnFocusId: Option.Option<string>;
|
|
243
|
+
};
|
|
244
|
+
commands?: Update.Commands<{
|
|
245
|
+
readonly _tag: "CompletedFocusSlip";
|
|
246
|
+
} | {
|
|
247
|
+
readonly _tag: "CompletedAnnounceSlip";
|
|
248
|
+
} | {
|
|
249
|
+
readonly _tag: "BlurredStack";
|
|
250
|
+
} | {
|
|
251
|
+
readonly _tag: "ClickedDismiss";
|
|
252
|
+
readonly entryId: string;
|
|
253
|
+
} | {
|
|
254
|
+
readonly _tag: "CompletedFocus";
|
|
255
|
+
} | {
|
|
256
|
+
readonly _tag: "FocusedStack";
|
|
257
|
+
readonly maybeFromId: Option.Option<string>;
|
|
258
|
+
} | {
|
|
259
|
+
readonly _tag: "GotStackMessage";
|
|
260
|
+
readonly message: {
|
|
261
|
+
readonly _tag: "PressedEscape";
|
|
262
|
+
} | {
|
|
263
|
+
readonly _tag: "Added";
|
|
264
|
+
readonly entry: {
|
|
265
|
+
readonly id: string;
|
|
266
|
+
readonly variant: "Error" | "Info" | "Success" | "Warning";
|
|
267
|
+
readonly animation: {
|
|
268
|
+
readonly id: string;
|
|
269
|
+
readonly isShowing: boolean;
|
|
270
|
+
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
271
|
+
readonly transitionGeneration: number;
|
|
272
|
+
};
|
|
273
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
274
|
+
readonly pendingDismissVersion: number;
|
|
275
|
+
readonly isHovered: boolean;
|
|
276
|
+
readonly swipeState: {
|
|
277
|
+
readonly _tag: "Idle";
|
|
278
|
+
} | {
|
|
279
|
+
readonly _tag: "Dismissing";
|
|
280
|
+
readonly offsetX: number;
|
|
281
|
+
readonly direction: "Left" | "Right";
|
|
282
|
+
} | {
|
|
283
|
+
readonly _tag: "Dragging";
|
|
284
|
+
readonly pointerId: number;
|
|
285
|
+
readonly startX: number;
|
|
286
|
+
readonly currentX: number;
|
|
287
|
+
} | {
|
|
288
|
+
readonly _tag: "Settling";
|
|
289
|
+
readonly offsetX: number;
|
|
290
|
+
};
|
|
291
|
+
readonly swipeVersion: number;
|
|
292
|
+
readonly payload: {
|
|
293
|
+
readonly tone: "Error" | "Ok" | "Quiet";
|
|
294
|
+
readonly title: string;
|
|
295
|
+
readonly maybeBody: Option.Option<string>;
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
} | {
|
|
299
|
+
readonly _tag: "CancelledSwipe";
|
|
300
|
+
readonly pointerId: number;
|
|
301
|
+
} | {
|
|
302
|
+
readonly _tag: "CompletedWaitBeforeDismissal";
|
|
303
|
+
readonly entryId: string;
|
|
304
|
+
readonly version: number;
|
|
305
|
+
} | {
|
|
306
|
+
readonly _tag: "CompletedWaitForSwipeSettled";
|
|
307
|
+
readonly entryId: string;
|
|
308
|
+
readonly version: number;
|
|
309
|
+
} | {
|
|
310
|
+
readonly _tag: "Dismissed";
|
|
311
|
+
readonly entryId: string;
|
|
312
|
+
} | {
|
|
313
|
+
readonly _tag: "DismissedAll";
|
|
314
|
+
} | {
|
|
315
|
+
readonly _tag: "GotAnimationMessage";
|
|
316
|
+
readonly entryId: string;
|
|
317
|
+
readonly message: {
|
|
318
|
+
readonly _tag: "CompletedWaitForPaint";
|
|
319
|
+
readonly generation: number;
|
|
320
|
+
} | {
|
|
321
|
+
readonly _tag: "EndedAnimation";
|
|
322
|
+
readonly generation: number;
|
|
323
|
+
} | {
|
|
324
|
+
readonly _tag: "Hid";
|
|
325
|
+
} | {
|
|
326
|
+
readonly _tag: "Showed";
|
|
327
|
+
};
|
|
328
|
+
} | {
|
|
329
|
+
readonly _tag: "HoveredEntry";
|
|
330
|
+
readonly entryId: string;
|
|
331
|
+
} | {
|
|
332
|
+
readonly _tag: "LeftEntry";
|
|
333
|
+
readonly entryId: string;
|
|
334
|
+
} | {
|
|
335
|
+
readonly _tag: "MovedSwipePointer";
|
|
336
|
+
readonly pointerId: number;
|
|
337
|
+
readonly clientX: number;
|
|
338
|
+
} | {
|
|
339
|
+
readonly _tag: "PressedEntryPointer";
|
|
340
|
+
readonly entryId: string;
|
|
341
|
+
readonly pointerId: number;
|
|
342
|
+
readonly clientX: number;
|
|
343
|
+
} | {
|
|
344
|
+
readonly _tag: "ReleasedSwipePointer";
|
|
345
|
+
readonly pointerId: number;
|
|
346
|
+
readonly clientX: number;
|
|
347
|
+
};
|
|
348
|
+
} | {
|
|
349
|
+
readonly _tag: "MovedHost";
|
|
350
|
+
} | {
|
|
351
|
+
readonly _tag: "PressedEscape";
|
|
352
|
+
}, never>;
|
|
353
|
+
outMessage?: never;
|
|
354
|
+
}>;
|
|
355
|
+
/** What `show` raises. */
|
|
356
|
+
export type ShowConfig = Readonly<{
|
|
357
|
+
tone: Tone;
|
|
358
|
+
/** Pixel caps: what happened (`"Saved"`, `"Not sent"`). */
|
|
359
|
+
title: string;
|
|
360
|
+
/** One sans sentence: what it means, and for an error what to do. */
|
|
361
|
+
body?: string;
|
|
362
|
+
}>;
|
|
363
|
+
/** What `show` returns: the next Model and Commands, and the new slip's id, to take it back
|
|
364
|
+
* with `dismiss`. */
|
|
365
|
+
export type ShowReturn = Update.Return<Model, Message> & Readonly<{
|
|
366
|
+
entryId: string;
|
|
367
|
+
}>;
|
|
368
|
+
/**
|
|
369
|
+
* Raises a slip and says it once (see `AnnounceSlip`). At most `MOST_SHOWING` slips that are
|
|
370
|
+
* not errors show: one more takes the place of the oldest of them. Errors stack without limit,
|
|
371
|
+
* take nothing's place, and stay until the reader dismisses them or the application takes
|
|
372
|
+
* them back with `dismiss` and the returned `entryId`. Every tone, an error included, is said
|
|
373
|
+
* politely, never as an alert. A slip raised while the stack is held waits with the others.
|
|
374
|
+
*/
|
|
375
|
+
export declare const show: (model: Model, config: ShowConfig) => ShowReturn;
|
|
376
|
+
/** Takes a slip back by its id: what it reported has recovered. */
|
|
377
|
+
export declare const dismiss: (model: Model, entryId: string) => StepReturn;
|
|
378
|
+
/**
|
|
379
|
+
* The page's toasts: printed slips at the bottom right (across the bottom on a phone), the
|
|
380
|
+
* newest lowest, built on `@foldkit/ui`'s Toast, in a polite live region named
|
|
381
|
+
* "Notifications". Each slip is said once as it is raised: by the stack, or through the
|
|
382
|
+
* page's live region when the stack moved host in the same render (see `AnnounceSlip`). Ok
|
|
383
|
+
* and quiet slips leave after the hold, which waits while the pointer is on any slip or the
|
|
384
|
+
* keyboard is in the stack; Escape in the stack dismisses the newest, and focus moves to the
|
|
385
|
+
* slip now in its place, or back where it came from once none is left.
|
|
386
|
+
*
|
|
387
|
+
* Render it once, placed by the rule the Announcer follows: while a Dialog is open, inside the
|
|
388
|
+
* topmost one (in its `toLiveRegionView`, beside the Announcer), so a toast raised from a card
|
|
389
|
+
* shows above it and can be reached; otherwise in the body. Moving it lets go of its holds.
|
|
390
|
+
*/
|
|
391
|
+
export declare const view: import("foldkit/submodel").View<{
|
|
392
|
+
readonly stack: {
|
|
393
|
+
readonly id: string;
|
|
394
|
+
readonly defaultDuration: Duration.Duration;
|
|
395
|
+
readonly entries: readonly {
|
|
396
|
+
readonly id: string;
|
|
397
|
+
readonly variant: "Error" | "Info" | "Success" | "Warning";
|
|
398
|
+
readonly animation: {
|
|
399
|
+
readonly id: string;
|
|
400
|
+
readonly isShowing: boolean;
|
|
401
|
+
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
402
|
+
readonly transitionGeneration: number;
|
|
403
|
+
};
|
|
404
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
405
|
+
readonly pendingDismissVersion: number;
|
|
406
|
+
readonly isHovered: boolean;
|
|
407
|
+
readonly swipeState: {
|
|
408
|
+
readonly _tag: "Dismissing";
|
|
409
|
+
readonly offsetX: number;
|
|
410
|
+
readonly direction: "Left" | "Right";
|
|
411
|
+
} | {
|
|
412
|
+
readonly _tag: "Dragging";
|
|
413
|
+
readonly pointerId: number;
|
|
414
|
+
readonly startX: number;
|
|
415
|
+
readonly currentX: number;
|
|
416
|
+
} | {
|
|
417
|
+
readonly _tag: "Idle";
|
|
418
|
+
} | {
|
|
419
|
+
readonly _tag: "Settling";
|
|
420
|
+
readonly offsetX: number;
|
|
421
|
+
};
|
|
422
|
+
readonly swipeVersion: number;
|
|
423
|
+
readonly payload: {
|
|
424
|
+
readonly tone: "Error" | "Ok" | "Quiet";
|
|
425
|
+
readonly title: string;
|
|
426
|
+
readonly maybeBody: Option.Option<string>;
|
|
427
|
+
};
|
|
428
|
+
}[];
|
|
429
|
+
readonly nextEntryKey: number;
|
|
430
|
+
readonly maybeSwipeConfig: Option.Option<{
|
|
431
|
+
readonly direction: "Left" | "Right";
|
|
432
|
+
readonly threshold: number;
|
|
433
|
+
}>;
|
|
434
|
+
};
|
|
435
|
+
readonly isPointerIn: boolean;
|
|
436
|
+
readonly isFocusIn: boolean;
|
|
437
|
+
readonly maybeReturnFocusId: Option.Option<string>;
|
|
438
|
+
}, {
|
|
439
|
+
readonly _tag: "CompletedFocusSlip";
|
|
440
|
+
} | {
|
|
441
|
+
readonly _tag: "CompletedAnnounceSlip";
|
|
442
|
+
} | {
|
|
443
|
+
readonly _tag: "BlurredStack";
|
|
444
|
+
} | {
|
|
445
|
+
readonly _tag: "ClickedDismiss";
|
|
446
|
+
readonly entryId: string;
|
|
447
|
+
} | {
|
|
448
|
+
readonly _tag: "CompletedFocus";
|
|
449
|
+
} | {
|
|
450
|
+
readonly _tag: "FocusedStack";
|
|
451
|
+
readonly maybeFromId: Option.Option<string>;
|
|
452
|
+
} | {
|
|
453
|
+
readonly _tag: "GotStackMessage";
|
|
454
|
+
readonly message: {
|
|
455
|
+
readonly _tag: "PressedEscape";
|
|
456
|
+
} | {
|
|
457
|
+
readonly _tag: "Added";
|
|
458
|
+
readonly entry: {
|
|
459
|
+
readonly id: string;
|
|
460
|
+
readonly variant: "Error" | "Info" | "Success" | "Warning";
|
|
461
|
+
readonly animation: {
|
|
462
|
+
readonly id: string;
|
|
463
|
+
readonly isShowing: boolean;
|
|
464
|
+
readonly transitionState: "EnterAnimating" | "EnterStart" | "Idle" | "LeaveAnimating" | "LeaveStart";
|
|
465
|
+
readonly transitionGeneration: number;
|
|
466
|
+
};
|
|
467
|
+
readonly maybeDuration: Option.Option<Duration.Duration>;
|
|
468
|
+
readonly pendingDismissVersion: number;
|
|
469
|
+
readonly isHovered: boolean;
|
|
470
|
+
readonly swipeState: {
|
|
471
|
+
readonly _tag: "Idle";
|
|
472
|
+
} | {
|
|
473
|
+
readonly _tag: "Dismissing";
|
|
474
|
+
readonly offsetX: number;
|
|
475
|
+
readonly direction: "Left" | "Right";
|
|
476
|
+
} | {
|
|
477
|
+
readonly _tag: "Dragging";
|
|
478
|
+
readonly pointerId: number;
|
|
479
|
+
readonly startX: number;
|
|
480
|
+
readonly currentX: number;
|
|
481
|
+
} | {
|
|
482
|
+
readonly _tag: "Settling";
|
|
483
|
+
readonly offsetX: number;
|
|
484
|
+
};
|
|
485
|
+
readonly swipeVersion: number;
|
|
486
|
+
readonly payload: {
|
|
487
|
+
readonly tone: "Error" | "Ok" | "Quiet";
|
|
488
|
+
readonly title: string;
|
|
489
|
+
readonly maybeBody: Option.Option<string>;
|
|
490
|
+
};
|
|
491
|
+
};
|
|
492
|
+
} | {
|
|
493
|
+
readonly _tag: "CancelledSwipe";
|
|
494
|
+
readonly pointerId: number;
|
|
495
|
+
} | {
|
|
496
|
+
readonly _tag: "CompletedWaitBeforeDismissal";
|
|
497
|
+
readonly entryId: string;
|
|
498
|
+
readonly version: number;
|
|
499
|
+
} | {
|
|
500
|
+
readonly _tag: "CompletedWaitForSwipeSettled";
|
|
501
|
+
readonly entryId: string;
|
|
502
|
+
readonly version: number;
|
|
503
|
+
} | {
|
|
504
|
+
readonly _tag: "Dismissed";
|
|
505
|
+
readonly entryId: string;
|
|
506
|
+
} | {
|
|
507
|
+
readonly _tag: "DismissedAll";
|
|
508
|
+
} | {
|
|
509
|
+
readonly _tag: "GotAnimationMessage";
|
|
510
|
+
readonly entryId: string;
|
|
511
|
+
readonly message: {
|
|
512
|
+
readonly _tag: "CompletedWaitForPaint";
|
|
513
|
+
readonly generation: number;
|
|
514
|
+
} | {
|
|
515
|
+
readonly _tag: "EndedAnimation";
|
|
516
|
+
readonly generation: number;
|
|
517
|
+
} | {
|
|
518
|
+
readonly _tag: "Hid";
|
|
519
|
+
} | {
|
|
520
|
+
readonly _tag: "Showed";
|
|
521
|
+
};
|
|
522
|
+
} | {
|
|
523
|
+
readonly _tag: "HoveredEntry";
|
|
524
|
+
readonly entryId: string;
|
|
525
|
+
} | {
|
|
526
|
+
readonly _tag: "LeftEntry";
|
|
527
|
+
readonly entryId: string;
|
|
528
|
+
} | {
|
|
529
|
+
readonly _tag: "MovedSwipePointer";
|
|
530
|
+
readonly pointerId: number;
|
|
531
|
+
readonly clientX: number;
|
|
532
|
+
} | {
|
|
533
|
+
readonly _tag: "PressedEntryPointer";
|
|
534
|
+
readonly entryId: string;
|
|
535
|
+
readonly pointerId: number;
|
|
536
|
+
readonly clientX: number;
|
|
537
|
+
} | {
|
|
538
|
+
readonly _tag: "ReleasedSwipePointer";
|
|
539
|
+
readonly pointerId: number;
|
|
540
|
+
readonly clientX: number;
|
|
541
|
+
};
|
|
542
|
+
} | {
|
|
543
|
+
readonly _tag: "MovedHost";
|
|
544
|
+
} | {
|
|
545
|
+
readonly _tag: "PressedEscape";
|
|
546
|
+
}, void>;
|
|
547
|
+
/** What a parent's Scene resolves the stack's Mounts with, each with a Message that changes
|
|
548
|
+
* nothing: `Scene.Mount.resolveAll(...Toast.sceneMounts)`. */
|
|
549
|
+
export declare const sceneMounts: readonly [readonly [Mount.MountDefinitionNoArgs<"BindStack", {
|
|
550
|
+
readonly _tag: "BlurredStack";
|
|
551
|
+
} | {
|
|
552
|
+
readonly _tag: "FocusedStack";
|
|
553
|
+
readonly maybeFromId: Option.Option<string>;
|
|
554
|
+
} | {
|
|
555
|
+
readonly _tag: "PressedEscape";
|
|
556
|
+
}>, {
|
|
557
|
+
readonly _tag: "BlurredStack";
|
|
558
|
+
}]];
|
|
559
|
+
export {};
|