@sprawlify/primitives 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core-Bw_czdwX.cjs +383 -0
- package/dist/core-CTtbW9qh.mjs +288 -0
- package/dist/core.cjs +9 -1
- package/dist/core.d.cts +25 -2
- package/dist/core.d.mts +25 -2
- package/dist/core.mjs +2 -2
- package/dist/machines/accordion/index.cjs +1 -1
- package/dist/machines/accordion/index.d.cts +2 -2
- package/dist/machines/accordion/index.d.mts +2 -2
- package/dist/machines/accordion/index.mjs +1 -1
- package/dist/machines/angle-slider/index.cjs +1 -1
- package/dist/machines/angle-slider/index.d.cts +2 -2
- package/dist/machines/angle-slider/index.d.mts +2 -2
- package/dist/machines/angle-slider/index.mjs +1 -1
- package/dist/machines/aspect-ratio/index.cjs +1 -1
- package/dist/machines/aspect-ratio/index.d.cts +1 -1
- package/dist/machines/aspect-ratio/index.d.mts +1 -1
- package/dist/machines/aspect-ratio/index.mjs +1 -1
- package/dist/machines/async-list/index.cjs +1 -1
- package/dist/machines/async-list/index.d.cts +1 -1
- package/dist/machines/async-list/index.d.mts +1 -1
- package/dist/machines/async-list/index.mjs +1 -1
- package/dist/machines/avatar/index.cjs +1 -1
- package/dist/machines/avatar/index.d.cts +1 -1
- package/dist/machines/avatar/index.d.mts +1 -1
- package/dist/machines/avatar/index.mjs +1 -1
- package/dist/machines/carousel/index.cjs +69 -18
- package/dist/machines/carousel/index.d.cts +3 -3
- package/dist/machines/carousel/index.d.mts +3 -3
- package/dist/machines/carousel/index.mjs +69 -18
- package/dist/machines/cascade-select/index.cjs +1 -1
- package/dist/machines/cascade-select/index.d.cts +3 -3
- package/dist/machines/cascade-select/index.d.mts +3 -3
- package/dist/machines/cascade-select/index.mjs +1 -1
- package/dist/machines/checkbox/index.cjs +1 -1
- package/dist/machines/checkbox/index.d.cts +2 -2
- package/dist/machines/checkbox/index.d.mts +2 -2
- package/dist/machines/checkbox/index.mjs +1 -1
- package/dist/machines/clipboard/index.cjs +1 -1
- package/dist/machines/clipboard/index.d.cts +2 -2
- package/dist/machines/clipboard/index.d.mts +2 -2
- package/dist/machines/clipboard/index.mjs +1 -1
- package/dist/machines/collapsible/index.cjs +1 -1
- package/dist/machines/collapsible/index.d.cts +1 -1
- package/dist/machines/collapsible/index.d.mts +1 -1
- package/dist/machines/collapsible/index.mjs +1 -1
- package/dist/machines/color-picker/index.cjs +76 -102
- package/dist/machines/color-picker/index.d.cts +3 -3
- package/dist/machines/color-picker/index.d.mts +3 -3
- package/dist/machines/color-picker/index.mjs +76 -102
- package/dist/machines/combobox/index.cjs +1 -1
- package/dist/machines/combobox/index.d.cts +2 -2
- package/dist/machines/combobox/index.d.mts +2 -2
- package/dist/machines/combobox/index.mjs +1 -1
- package/dist/machines/date-picker/index.cjs +1 -1
- package/dist/machines/date-picker/index.d.cts +2 -2
- package/dist/machines/date-picker/index.d.mts +2 -2
- package/dist/machines/date-picker/index.mjs +1 -1
- package/dist/machines/dialog/index.cjs +1 -1
- package/dist/machines/dialog/index.d.cts +2 -2
- package/dist/machines/dialog/index.d.mts +2 -2
- package/dist/machines/dialog/index.mjs +1 -1
- package/dist/machines/drawer/index.cjs +1 -1
- package/dist/machines/drawer/index.d.cts +2 -2
- package/dist/machines/drawer/index.d.mts +2 -2
- package/dist/machines/drawer/index.mjs +1 -1
- package/dist/machines/dropdown-menu/index.cjs +1 -1
- package/dist/machines/dropdown-menu/index.d.cts +2 -2
- package/dist/machines/dropdown-menu/index.d.mts +2 -2
- package/dist/machines/dropdown-menu/index.mjs +1 -1
- package/dist/machines/editable/index.cjs +1 -1
- package/dist/machines/editable/index.d.cts +2 -2
- package/dist/machines/editable/index.d.mts +2 -2
- package/dist/machines/editable/index.mjs +1 -1
- package/dist/machines/file-upload/index.cjs +1 -1
- package/dist/machines/file-upload/index.d.cts +2 -2
- package/dist/machines/file-upload/index.d.mts +2 -2
- package/dist/machines/file-upload/index.mjs +1 -1
- package/dist/machines/floating-panel/index.cjs +96 -93
- package/dist/machines/floating-panel/index.d.cts +3 -3
- package/dist/machines/floating-panel/index.d.mts +3 -3
- package/dist/machines/floating-panel/index.mjs +96 -93
- package/dist/machines/hover-card/index.cjs +1 -1
- package/dist/machines/hover-card/index.d.cts +2 -2
- package/dist/machines/hover-card/index.d.mts +2 -2
- package/dist/machines/hover-card/index.mjs +1 -1
- package/dist/machines/image-cropper/index.cjs +1 -1
- package/dist/machines/image-cropper/index.d.cts +1 -1
- package/dist/machines/image-cropper/index.d.mts +1 -1
- package/dist/machines/image-cropper/index.mjs +1 -1
- package/dist/machines/listbox/index.cjs +1 -1
- package/dist/machines/listbox/index.d.cts +2 -2
- package/dist/machines/listbox/index.d.mts +2 -2
- package/dist/machines/listbox/index.mjs +1 -1
- package/dist/machines/marquee/index.cjs +1 -1
- package/dist/machines/marquee/index.d.cts +3 -3
- package/dist/machines/marquee/index.d.mts +3 -3
- package/dist/machines/marquee/index.mjs +1 -1
- package/dist/machines/navigation-menu/index.cjs +1 -1
- package/dist/machines/navigation-menu/index.d.cts +2 -2
- package/dist/machines/navigation-menu/index.d.mts +2 -2
- package/dist/machines/navigation-menu/index.mjs +1 -1
- package/dist/machines/number-input/index.cjs +1 -1
- package/dist/machines/number-input/index.d.cts +2 -2
- package/dist/machines/number-input/index.d.mts +2 -2
- package/dist/machines/number-input/index.mjs +1 -1
- package/dist/machines/pagination/index.cjs +1 -1
- package/dist/machines/pagination/index.d.cts +1 -1
- package/dist/machines/pagination/index.d.mts +1 -1
- package/dist/machines/pagination/index.mjs +1 -1
- package/dist/machines/password-input/index.cjs +1 -1
- package/dist/machines/password-input/index.d.cts +2 -2
- package/dist/machines/password-input/index.d.mts +2 -2
- package/dist/machines/password-input/index.mjs +1 -1
- package/dist/machines/pin-input/index.cjs +1 -1
- package/dist/machines/pin-input/index.d.cts +2 -2
- package/dist/machines/pin-input/index.d.mts +2 -2
- package/dist/machines/pin-input/index.mjs +1 -1
- package/dist/machines/popover/index.cjs +1 -1
- package/dist/machines/popover/index.d.cts +2 -2
- package/dist/machines/popover/index.d.mts +2 -2
- package/dist/machines/popover/index.mjs +1 -1
- package/dist/machines/presence/index.cjs +1 -1
- package/dist/machines/presence/index.d.cts +1 -1
- package/dist/machines/presence/index.d.mts +1 -1
- package/dist/machines/presence/index.mjs +1 -1
- package/dist/machines/progress/index.cjs +1 -1
- package/dist/machines/progress/index.d.cts +2 -2
- package/dist/machines/progress/index.d.mts +2 -2
- package/dist/machines/progress/index.mjs +1 -1
- package/dist/machines/qr-code/index.cjs +1 -1
- package/dist/machines/qr-code/index.d.cts +1 -1
- package/dist/machines/qr-code/index.d.mts +1 -1
- package/dist/machines/qr-code/index.mjs +1 -1
- package/dist/machines/radio-group/index.cjs +1 -1
- package/dist/machines/radio-group/index.d.cts +1 -1
- package/dist/machines/radio-group/index.d.mts +1 -1
- package/dist/machines/radio-group/index.mjs +1 -1
- package/dist/machines/rating-group/index.cjs +1 -1
- package/dist/machines/rating-group/index.d.cts +2 -2
- package/dist/machines/rating-group/index.d.mts +2 -2
- package/dist/machines/rating-group/index.mjs +1 -1
- package/dist/machines/scroll-area/index.cjs +1 -1
- package/dist/machines/scroll-area/index.d.cts +1 -1
- package/dist/machines/scroll-area/index.d.mts +1 -1
- package/dist/machines/scroll-area/index.mjs +1 -1
- package/dist/machines/select/index.cjs +1 -1
- package/dist/machines/select/index.d.cts +2 -2
- package/dist/machines/select/index.d.mts +2 -2
- package/dist/machines/select/index.mjs +1 -1
- package/dist/machines/separator/index.cjs +1 -1
- package/dist/machines/separator/index.d.cts +1 -1
- package/dist/machines/separator/index.d.mts +1 -1
- package/dist/machines/separator/index.mjs +1 -1
- package/dist/machines/signature-pad/index.cjs +1 -1
- package/dist/machines/signature-pad/index.d.cts +2 -2
- package/dist/machines/signature-pad/index.d.mts +2 -2
- package/dist/machines/signature-pad/index.mjs +1 -1
- package/dist/machines/slider/index.cjs +1 -1
- package/dist/machines/slider/index.d.cts +2 -2
- package/dist/machines/slider/index.d.mts +2 -2
- package/dist/machines/slider/index.mjs +1 -1
- package/dist/machines/splitter/index.cjs +1 -1
- package/dist/machines/splitter/index.d.cts +1 -1
- package/dist/machines/splitter/index.d.mts +1 -1
- package/dist/machines/splitter/index.mjs +1 -1
- package/dist/machines/steps/index.cjs +1 -1
- package/dist/machines/steps/index.d.cts +2 -2
- package/dist/machines/steps/index.d.mts +2 -2
- package/dist/machines/steps/index.mjs +1 -1
- package/dist/machines/switch/index.cjs +1 -1
- package/dist/machines/switch/index.d.cts +2 -2
- package/dist/machines/switch/index.d.mts +2 -2
- package/dist/machines/switch/index.mjs +1 -1
- package/dist/machines/tabs/index.cjs +1 -1
- package/dist/machines/tabs/index.d.cts +2 -2
- package/dist/machines/tabs/index.d.mts +2 -2
- package/dist/machines/tabs/index.mjs +1 -1
- package/dist/machines/tags-input/index.cjs +1 -1
- package/dist/machines/tags-input/index.d.cts +2 -2
- package/dist/machines/tags-input/index.d.mts +2 -2
- package/dist/machines/tags-input/index.mjs +1 -1
- package/dist/machines/timer/index.cjs +1 -1
- package/dist/machines/timer/index.d.cts +2 -2
- package/dist/machines/timer/index.d.mts +2 -2
- package/dist/machines/timer/index.mjs +1 -1
- package/dist/machines/toast/index.cjs +1 -1
- package/dist/machines/toast/index.d.cts +2 -2
- package/dist/machines/toast/index.d.mts +2 -2
- package/dist/machines/toast/index.mjs +1 -1
- package/dist/machines/toggle/index.cjs +1 -1
- package/dist/machines/toggle/index.d.cts +1 -1
- package/dist/machines/toggle/index.d.mts +1 -1
- package/dist/machines/toggle/index.mjs +1 -1
- package/dist/machines/toggle-group/index.cjs +1 -1
- package/dist/machines/toggle-group/index.d.cts +1 -1
- package/dist/machines/toggle-group/index.d.mts +1 -1
- package/dist/machines/toggle-group/index.mjs +1 -1
- package/dist/machines/tooltip/index.cjs +1 -1
- package/dist/machines/tooltip/index.d.cts +2 -2
- package/dist/machines/tooltip/index.d.mts +2 -2
- package/dist/machines/tooltip/index.mjs +1 -1
- package/dist/machines/tour/index.cjs +48 -46
- package/dist/machines/tour/index.d.cts +3 -3
- package/dist/machines/tour/index.d.mts +3 -3
- package/dist/machines/tour/index.mjs +48 -46
- package/dist/machines/tree-view/index.cjs +1 -1
- package/dist/machines/tree-view/index.d.cts +2 -2
- package/dist/machines/tree-view/index.d.mts +2 -2
- package/dist/machines/tree-view/index.mjs +1 -1
- package/dist/{types-B24gMTKq.d.cts → types-DvUmCWsb.d.mts} +28 -12
- package/dist/{types-DUM9rzfD.d.mts → types-u-LWCSDE.d.cts} +28 -12
- package/package.json +1 -1
- package/dist/core-Ci9Yu6QI.mjs +0 -123
- package/dist/core-DwdPztGA.cjs +0 -170
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_create_anatomy = require("../../create-anatomy-BnwEmNnc.cjs");
|
|
3
3
|
const require_dom_query = require("../../dom-query-BUO7rGsg.cjs");
|
|
4
4
|
const require_utils = require("../../utils-ByNiZU8f.cjs");
|
|
5
|
-
const require_core = require("../../core-
|
|
5
|
+
const require_core = require("../../core-Bw_czdwX.cjs");
|
|
6
6
|
const require_create_props = require("../../create-props-DP39rHnH.cjs");
|
|
7
7
|
//#region src/machines/toggle/toggle.anatomy.ts
|
|
8
8
|
const anatomy = require_create_anatomy.createAnatomy("toggle", ["root", "indicator"]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as Anatomy } from "../../create-anatomy-9eFQs7lO.cjs";
|
|
2
|
-
import {
|
|
2
|
+
import { b as Service, p as Machine, u as EventObject } from "../../types-u-LWCSDE.cjs";
|
|
3
3
|
import { b as NormalizeProps, x as PropTypes } from "../../index-CLRsezW5.cjs";
|
|
4
4
|
|
|
5
5
|
//#region src/machines/toggle/toggle.anatomy.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as Anatomy } from "../../create-anatomy-BedZVdg0.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { b as Service, p as Machine, u as EventObject } from "../../types-DvUmCWsb.mjs";
|
|
3
3
|
import { b as NormalizeProps, x as PropTypes } from "../../index-BVFlU3b9.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/machines/toggle/toggle.anatomy.d.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as createAnatomy } from "../../create-anatomy-Dr0evdYy.mjs";
|
|
2
2
|
import { xn as dataAttr } from "../../dom-query-BFuRs3l4.mjs";
|
|
3
3
|
import { u as createSplitProps } from "../../utils-VVoZ_v29.mjs";
|
|
4
|
-
import { a as createMachine } from "../../core-
|
|
4
|
+
import { a as createMachine } from "../../core-CTtbW9qh.mjs";
|
|
5
5
|
import { t as createProps } from "../../create-props-DFW8DUsC.mjs";
|
|
6
6
|
//#region src/machines/toggle/toggle.anatomy.ts
|
|
7
7
|
const anatomy = createAnatomy("toggle", ["root", "indicator"]);
|
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_create_anatomy = require("../../create-anatomy-BnwEmNnc.cjs");
|
|
3
3
|
const require_dom_query = require("../../dom-query-BUO7rGsg.cjs");
|
|
4
4
|
const require_utils = require("../../utils-ByNiZU8f.cjs");
|
|
5
|
-
const require_core = require("../../core-
|
|
5
|
+
const require_core = require("../../core-Bw_czdwX.cjs");
|
|
6
6
|
const require_create_props = require("../../create-props-DP39rHnH.cjs");
|
|
7
7
|
//#region src/machines/toggle-group/toggle-group.anatomy.ts
|
|
8
8
|
const anatomy = require_create_anatomy.createAnatomy("toggle-group").parts("root", "item");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as AnatomyInstance } from "../../create-anatomy-9eFQs7lO.cjs";
|
|
2
|
-
import {
|
|
2
|
+
import { b as Service, p as Machine, u as EventObject } from "../../types-u-LWCSDE.cjs";
|
|
3
3
|
import { b as NormalizeProps, d as Orientation, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-CLRsezW5.cjs";
|
|
4
4
|
|
|
5
5
|
//#region src/machines/toggle-group/toggle-group.anatomy.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as AnatomyInstance } from "../../create-anatomy-BedZVdg0.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { b as Service, p as Machine, u as EventObject } from "../../types-DvUmCWsb.mjs";
|
|
3
3
|
import { b as NormalizeProps, d as Orientation, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-BVFlU3b9.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/machines/toggle-group/toggle-group.anatomy.d.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as createAnatomy } from "../../create-anatomy-Dr0evdYy.mjs";
|
|
2
2
|
import { $t as contains, C as queryAll, Vt as isSafari, W as raf, b as nextById, ft as getEventKey, ht as getEventTarget, x as prevById, xn as dataAttr } from "../../dom-query-BFuRs3l4.mjs";
|
|
3
3
|
import { ft as isEqual, mt as addOrRemove, n as ensureProps, nt as isArray, u as createSplitProps, vt as first, wt as last } from "../../utils-VVoZ_v29.mjs";
|
|
4
|
-
import { a as createMachine, i as createGuards } from "../../core-
|
|
4
|
+
import { a as createMachine, i as createGuards } from "../../core-CTtbW9qh.mjs";
|
|
5
5
|
import { t as createProps } from "../../create-props-DFW8DUsC.mjs";
|
|
6
6
|
//#region src/machines/toggle-group/toggle-group.anatomy.ts
|
|
7
7
|
const anatomy = createAnatomy("toggle-group").parts("root", "item");
|
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_create_anatomy = require("../../create-anatomy-BnwEmNnc.cjs");
|
|
3
3
|
const require_dom_query = require("../../dom-query-BUO7rGsg.cjs");
|
|
4
4
|
const require_utils = require("../../utils-ByNiZU8f.cjs");
|
|
5
|
-
const require_core = require("../../core-
|
|
5
|
+
const require_core = require("../../core-Bw_czdwX.cjs");
|
|
6
6
|
const require_focus_visible = require("../../focus-visible-Co_9bW09.cjs");
|
|
7
7
|
const require_popper = require("../../popper-viCrafLC.cjs");
|
|
8
8
|
const require_create_props = require("../../create-props-DP39rHnH.cjs");
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as AnatomyInstance } from "../../create-anatomy-9eFQs7lO.cjs";
|
|
2
|
-
import {
|
|
2
|
+
import { b as Service, p as Machine, u as EventObject } from "../../types-u-LWCSDE.cjs";
|
|
3
3
|
import { b as NormalizeProps, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-CLRsezW5.cjs";
|
|
4
4
|
import { c as Placement, d as PositioningOptions } from "../../types-CZAtqGqH.cjs";
|
|
5
5
|
|
|
6
6
|
//#region src/machines/tooltip/tooltip.anatomy.d.ts
|
|
7
|
-
declare const anatomy: AnatomyInstance<"trigger" | "content" | "
|
|
7
|
+
declare const anatomy: AnatomyInstance<"trigger" | "content" | "positioner" | "arrow" | "arrowTip">;
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/machines/tooltip/tooltip.types.d.ts
|
|
10
10
|
interface OpenChangeDetails {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as AnatomyInstance } from "../../create-anatomy-BedZVdg0.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { b as Service, p as Machine, u as EventObject } from "../../types-DvUmCWsb.mjs";
|
|
3
3
|
import { b as NormalizeProps, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-BVFlU3b9.mjs";
|
|
4
4
|
import { p as PositioningOptions, u as Placement } from "../../index-fMh0VDkR.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/machines/tooltip/tooltip.anatomy.d.ts
|
|
7
|
-
declare const anatomy: AnatomyInstance<"trigger" | "content" | "
|
|
7
|
+
declare const anatomy: AnatomyInstance<"trigger" | "content" | "positioner" | "arrow" | "arrowTip">;
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/machines/tooltip/tooltip.types.d.ts
|
|
10
10
|
interface OpenChangeDetails {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as createAnatomy } from "../../create-anatomy-Dr0evdYy.mjs";
|
|
2
2
|
import { M as getOverflowAncestors, St as isLeftClick, _t as isComposingEvent, ut as addDomEvent, xn as dataAttr } from "../../dom-query-BFuRs3l4.mjs";
|
|
3
3
|
import { c as createStore, n as ensureProps, u as createSplitProps } from "../../utils-VVoZ_v29.mjs";
|
|
4
|
-
import { a as createMachine, i as createGuards } from "../../core-
|
|
4
|
+
import { a as createMachine, i as createGuards } from "../../core-CTtbW9qh.mjs";
|
|
5
5
|
import { o as trackFocusVisible, r as isFocusVisible } from "../../focus-visible-BuLf8M9F.mjs";
|
|
6
6
|
import { n as getPlacement, t as getPlacementStyles } from "../../popper-BlgbmdAn.mjs";
|
|
7
7
|
import { t as createProps } from "../../create-props-DFW8DUsC.mjs";
|
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_create_anatomy = require("../../create-anatomy-BnwEmNnc.cjs");
|
|
3
3
|
const require_dom_query = require("../../dom-query-BUO7rGsg.cjs");
|
|
4
4
|
const require_utils = require("../../utils-ByNiZU8f.cjs");
|
|
5
|
-
const require_core = require("../../core-
|
|
5
|
+
const require_core = require("../../core-Bw_czdwX.cjs");
|
|
6
6
|
const require_interact_outside = require("../../interact-outside-Bg-QSXqp.cjs");
|
|
7
7
|
const require_dismissable = require("../../dismissable-DxjbwsOf.cjs");
|
|
8
8
|
const require_focus_trap = require("../../focus-trap-BewqTQFt.cjs");
|
|
@@ -488,7 +488,7 @@ const machine = require_core.createMachine({
|
|
|
488
488
|
};
|
|
489
489
|
},
|
|
490
490
|
initialState() {
|
|
491
|
-
return "
|
|
491
|
+
return "tourInactive";
|
|
492
492
|
},
|
|
493
493
|
context({ prop, bindable, getContext }) {
|
|
494
494
|
return {
|
|
@@ -565,28 +565,28 @@ const machine = require_core.createMachine({
|
|
|
565
565
|
"STEP.CHANGED": [
|
|
566
566
|
{
|
|
567
567
|
guard: and("isValidStep", "hasResolvedTarget"),
|
|
568
|
-
target: "
|
|
568
|
+
target: "running.scrolling",
|
|
569
569
|
actions: ["cleanupStepEffect"]
|
|
570
570
|
},
|
|
571
571
|
{
|
|
572
572
|
guard: and("isValidStep", "hasTarget"),
|
|
573
|
-
target: "
|
|
573
|
+
target: "running.resolving",
|
|
574
574
|
actions: ["cleanupStepEffect"]
|
|
575
575
|
},
|
|
576
576
|
{
|
|
577
577
|
guard: and("isValidStep", "isWaitingStep"),
|
|
578
|
-
target: "
|
|
578
|
+
target: "running.waiting",
|
|
579
579
|
actions: ["cleanupStepEffect"]
|
|
580
580
|
},
|
|
581
581
|
{
|
|
582
582
|
guard: "isValidStep",
|
|
583
|
-
target: "
|
|
583
|
+
target: "running.active",
|
|
584
584
|
actions: ["cleanupStepEffect"]
|
|
585
585
|
}
|
|
586
586
|
],
|
|
587
587
|
DISMISS: [{
|
|
588
588
|
guard: "isLastStep",
|
|
589
|
-
target: "
|
|
589
|
+
target: "tourInactive",
|
|
590
590
|
actions: [
|
|
591
591
|
"cleanupAll",
|
|
592
592
|
"invokeOnDismiss",
|
|
@@ -594,7 +594,7 @@ const machine = require_core.createMachine({
|
|
|
594
594
|
"clearStep"
|
|
595
595
|
]
|
|
596
596
|
}, {
|
|
597
|
-
target: "
|
|
597
|
+
target: "tourInactive",
|
|
598
598
|
actions: [
|
|
599
599
|
"cleanupAll",
|
|
600
600
|
"invokeOnDismiss",
|
|
@@ -602,7 +602,7 @@ const machine = require_core.createMachine({
|
|
|
602
602
|
]
|
|
603
603
|
}],
|
|
604
604
|
SKIP: {
|
|
605
|
-
target: "
|
|
605
|
+
target: "tourInactive",
|
|
606
606
|
actions: [
|
|
607
607
|
"cleanupAll",
|
|
608
608
|
"invokeOnSkip",
|
|
@@ -611,49 +611,51 @@ const machine = require_core.createMachine({
|
|
|
611
611
|
}
|
|
612
612
|
},
|
|
613
613
|
states: {
|
|
614
|
-
|
|
614
|
+
tourInactive: {
|
|
615
615
|
tags: ["closed"],
|
|
616
616
|
entry: ["validateSteps"],
|
|
617
617
|
on: { START: { actions: ["setInitialStep", "invokeOnStart"] } }
|
|
618
618
|
},
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
619
|
+
running: { states: {
|
|
620
|
+
resolving: {
|
|
621
|
+
tags: ["closed"],
|
|
622
|
+
effects: ["waitForTarget", "waitForTargetTimeout"],
|
|
623
|
+
on: {
|
|
624
|
+
"TARGET.NOT_FOUND": {
|
|
625
|
+
target: "tourInactive",
|
|
626
|
+
actions: ["invokeOnNotFound", "clearStep"]
|
|
627
|
+
},
|
|
628
|
+
"TARGET.RESOLVED": {
|
|
629
|
+
target: "scrolling",
|
|
630
|
+
actions: ["setResolvedTarget"]
|
|
631
|
+
}
|
|
630
632
|
}
|
|
633
|
+
},
|
|
634
|
+
scrolling: {
|
|
635
|
+
tags: ["open"],
|
|
636
|
+
entry: ["scrollToTarget"],
|
|
637
|
+
effects: [
|
|
638
|
+
"waitForScrollEnd",
|
|
639
|
+
"trapFocus",
|
|
640
|
+
"trackPlacement",
|
|
641
|
+
"trackDismissableBranch",
|
|
642
|
+
"trackInteractOutside",
|
|
643
|
+
"trackEscapeKeydown"
|
|
644
|
+
],
|
|
645
|
+
on: { "SCROLL.END": { target: "active" } }
|
|
646
|
+
},
|
|
647
|
+
waiting: { tags: ["closed"] },
|
|
648
|
+
active: {
|
|
649
|
+
tags: ["open"],
|
|
650
|
+
effects: [
|
|
651
|
+
"trapFocus",
|
|
652
|
+
"trackPlacement",
|
|
653
|
+
"trackDismissableBranch",
|
|
654
|
+
"trackInteractOutside",
|
|
655
|
+
"trackEscapeKeydown"
|
|
656
|
+
]
|
|
631
657
|
}
|
|
632
|
-
}
|
|
633
|
-
"target.scrolling": {
|
|
634
|
-
tags: ["open"],
|
|
635
|
-
entry: ["scrollToTarget"],
|
|
636
|
-
effects: [
|
|
637
|
-
"waitForScrollEnd",
|
|
638
|
-
"trapFocus",
|
|
639
|
-
"trackPlacement",
|
|
640
|
-
"trackDismissableBranch",
|
|
641
|
-
"trackInteractOutside",
|
|
642
|
-
"trackEscapeKeydown"
|
|
643
|
-
],
|
|
644
|
-
on: { "SCROLL.END": { target: "tour.active" } }
|
|
645
|
-
},
|
|
646
|
-
"step.waiting": { tags: ["closed"] },
|
|
647
|
-
"tour.active": {
|
|
648
|
-
tags: ["open"],
|
|
649
|
-
effects: [
|
|
650
|
-
"trapFocus",
|
|
651
|
-
"trackPlacement",
|
|
652
|
-
"trackDismissableBranch",
|
|
653
|
-
"trackInteractOutside",
|
|
654
|
-
"trackEscapeKeydown"
|
|
655
|
-
]
|
|
656
|
-
}
|
|
658
|
+
} }
|
|
657
659
|
},
|
|
658
660
|
implementations: {
|
|
659
661
|
guards: {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { n as AnatomyInstance } from "../../create-anatomy-9eFQs7lO.cjs";
|
|
2
|
-
import {
|
|
2
|
+
import { b as Service, p as Machine, u as EventObject } from "../../types-u-LWCSDE.cjs";
|
|
3
3
|
import { b as NormalizeProps, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-CLRsezW5.cjs";
|
|
4
4
|
import { i as waitForElement, n as WaitForOptions, o as waitForPromise, r as WaitForPromiseReturn } from "../../wait-for-DGDBtAM2.cjs";
|
|
5
5
|
import { c as PointerDownOutsideEvent, i as InteractOutsideHandlers, n as FocusOutsideEvent, r as InteractOutsideEvent } from "../../index-DzWGFhcS.cjs";
|
|
6
6
|
import { c as Placement } from "../../types-CZAtqGqH.cjs";
|
|
7
7
|
|
|
8
8
|
//#region src/machines/tour/tour.anatomy.d.ts
|
|
9
|
-
declare const anatomy: AnatomyInstance<"
|
|
9
|
+
declare const anatomy: AnatomyInstance<"content" | "progressText" | "title" | "positioner" | "arrow" | "arrowTip" | "backdrop" | "closeTrigger" | "description" | "actionTrigger" | "spotlight">;
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/machines/tour/utils/rect.d.ts
|
|
12
12
|
interface Point {
|
|
@@ -140,7 +140,7 @@ type ComputedContext = Readonly<{
|
|
|
140
140
|
}>;
|
|
141
141
|
interface TourSchema {
|
|
142
142
|
tag: "open" | "closed";
|
|
143
|
-
state: "
|
|
143
|
+
state: "tourInactive" | "running.resolving" | "running.scrolling" | "running.waiting" | "running.active";
|
|
144
144
|
props: RequiredBy<TourProps, PropsWithDefault>;
|
|
145
145
|
context: PrivateContext;
|
|
146
146
|
refs: Refs;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { n as AnatomyInstance } from "../../create-anatomy-BedZVdg0.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { b as Service, p as Machine, u as EventObject } from "../../types-DvUmCWsb.mjs";
|
|
3
3
|
import { b as NormalizeProps, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-BVFlU3b9.mjs";
|
|
4
4
|
import { i as waitForElement, n as WaitForOptions, o as waitForPromise, r as WaitForPromiseReturn } from "../../wait-for-CV7JYddH.mjs";
|
|
5
5
|
import { c as PointerDownOutsideEvent, i as InteractOutsideHandlers, n as FocusOutsideEvent, r as InteractOutsideEvent } from "../../index-CGNNiDyE.mjs";
|
|
6
6
|
import { u as Placement } from "../../index-fMh0VDkR.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/machines/tour/tour.anatomy.d.ts
|
|
9
|
-
declare const anatomy: AnatomyInstance<"
|
|
9
|
+
declare const anatomy: AnatomyInstance<"content" | "progressText" | "title" | "positioner" | "arrow" | "arrowTip" | "backdrop" | "closeTrigger" | "description" | "actionTrigger" | "spotlight">;
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/machines/tour/utils/rect.d.ts
|
|
12
12
|
interface Point {
|
|
@@ -140,7 +140,7 @@ type ComputedContext = Readonly<{
|
|
|
140
140
|
}>;
|
|
141
141
|
interface TourSchema {
|
|
142
142
|
tag: "open" | "closed";
|
|
143
|
-
state: "
|
|
143
|
+
state: "tourInactive" | "running.resolving" | "running.scrolling" | "running.waiting" | "running.active";
|
|
144
144
|
props: RequiredBy<TourProps, PropsWithDefault>;
|
|
145
145
|
context: PrivateContext;
|
|
146
146
|
refs: Refs;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as createAnatomy } from "../../create-anatomy-Dr0evdYy.mjs";
|
|
2
2
|
import { $t as contains, Qt as getComputedStyle$1, W as raf, fn as isHTMLElement, on as getWindow, r as waitForPromise, t as waitForElement, xn as dataAttr } from "../../dom-query-BFuRs3l4.mjs";
|
|
3
3
|
import { Et as nextIndex, dt as isString, ft as isEqual, i as warn, kt as prevIndex, u as createSplitProps } from "../../utils-VVoZ_v29.mjs";
|
|
4
|
-
import { a as createMachine,
|
|
4
|
+
import { a as createMachine, g as mergeProps, i as createGuards } from "../../core-CTtbW9qh.mjs";
|
|
5
5
|
import { t as trackInteractOutside } from "../../interact-outside-Ba50N1a5.mjs";
|
|
6
6
|
import { t as trackDismissableBranch } from "../../dismissable-B9k5K6f9.mjs";
|
|
7
7
|
import { t as trapFocus } from "../../focus-trap-Do8IUXYh.mjs";
|
|
@@ -487,7 +487,7 @@ const machine = createMachine({
|
|
|
487
487
|
};
|
|
488
488
|
},
|
|
489
489
|
initialState() {
|
|
490
|
-
return "
|
|
490
|
+
return "tourInactive";
|
|
491
491
|
},
|
|
492
492
|
context({ prop, bindable, getContext }) {
|
|
493
493
|
return {
|
|
@@ -564,28 +564,28 @@ const machine = createMachine({
|
|
|
564
564
|
"STEP.CHANGED": [
|
|
565
565
|
{
|
|
566
566
|
guard: and("isValidStep", "hasResolvedTarget"),
|
|
567
|
-
target: "
|
|
567
|
+
target: "running.scrolling",
|
|
568
568
|
actions: ["cleanupStepEffect"]
|
|
569
569
|
},
|
|
570
570
|
{
|
|
571
571
|
guard: and("isValidStep", "hasTarget"),
|
|
572
|
-
target: "
|
|
572
|
+
target: "running.resolving",
|
|
573
573
|
actions: ["cleanupStepEffect"]
|
|
574
574
|
},
|
|
575
575
|
{
|
|
576
576
|
guard: and("isValidStep", "isWaitingStep"),
|
|
577
|
-
target: "
|
|
577
|
+
target: "running.waiting",
|
|
578
578
|
actions: ["cleanupStepEffect"]
|
|
579
579
|
},
|
|
580
580
|
{
|
|
581
581
|
guard: "isValidStep",
|
|
582
|
-
target: "
|
|
582
|
+
target: "running.active",
|
|
583
583
|
actions: ["cleanupStepEffect"]
|
|
584
584
|
}
|
|
585
585
|
],
|
|
586
586
|
DISMISS: [{
|
|
587
587
|
guard: "isLastStep",
|
|
588
|
-
target: "
|
|
588
|
+
target: "tourInactive",
|
|
589
589
|
actions: [
|
|
590
590
|
"cleanupAll",
|
|
591
591
|
"invokeOnDismiss",
|
|
@@ -593,7 +593,7 @@ const machine = createMachine({
|
|
|
593
593
|
"clearStep"
|
|
594
594
|
]
|
|
595
595
|
}, {
|
|
596
|
-
target: "
|
|
596
|
+
target: "tourInactive",
|
|
597
597
|
actions: [
|
|
598
598
|
"cleanupAll",
|
|
599
599
|
"invokeOnDismiss",
|
|
@@ -601,7 +601,7 @@ const machine = createMachine({
|
|
|
601
601
|
]
|
|
602
602
|
}],
|
|
603
603
|
SKIP: {
|
|
604
|
-
target: "
|
|
604
|
+
target: "tourInactive",
|
|
605
605
|
actions: [
|
|
606
606
|
"cleanupAll",
|
|
607
607
|
"invokeOnSkip",
|
|
@@ -610,49 +610,51 @@ const machine = createMachine({
|
|
|
610
610
|
}
|
|
611
611
|
},
|
|
612
612
|
states: {
|
|
613
|
-
|
|
613
|
+
tourInactive: {
|
|
614
614
|
tags: ["closed"],
|
|
615
615
|
entry: ["validateSteps"],
|
|
616
616
|
on: { START: { actions: ["setInitialStep", "invokeOnStart"] } }
|
|
617
617
|
},
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
618
|
+
running: { states: {
|
|
619
|
+
resolving: {
|
|
620
|
+
tags: ["closed"],
|
|
621
|
+
effects: ["waitForTarget", "waitForTargetTimeout"],
|
|
622
|
+
on: {
|
|
623
|
+
"TARGET.NOT_FOUND": {
|
|
624
|
+
target: "tourInactive",
|
|
625
|
+
actions: ["invokeOnNotFound", "clearStep"]
|
|
626
|
+
},
|
|
627
|
+
"TARGET.RESOLVED": {
|
|
628
|
+
target: "scrolling",
|
|
629
|
+
actions: ["setResolvedTarget"]
|
|
630
|
+
}
|
|
629
631
|
}
|
|
632
|
+
},
|
|
633
|
+
scrolling: {
|
|
634
|
+
tags: ["open"],
|
|
635
|
+
entry: ["scrollToTarget"],
|
|
636
|
+
effects: [
|
|
637
|
+
"waitForScrollEnd",
|
|
638
|
+
"trapFocus",
|
|
639
|
+
"trackPlacement",
|
|
640
|
+
"trackDismissableBranch",
|
|
641
|
+
"trackInteractOutside",
|
|
642
|
+
"trackEscapeKeydown"
|
|
643
|
+
],
|
|
644
|
+
on: { "SCROLL.END": { target: "active" } }
|
|
645
|
+
},
|
|
646
|
+
waiting: { tags: ["closed"] },
|
|
647
|
+
active: {
|
|
648
|
+
tags: ["open"],
|
|
649
|
+
effects: [
|
|
650
|
+
"trapFocus",
|
|
651
|
+
"trackPlacement",
|
|
652
|
+
"trackDismissableBranch",
|
|
653
|
+
"trackInteractOutside",
|
|
654
|
+
"trackEscapeKeydown"
|
|
655
|
+
]
|
|
630
656
|
}
|
|
631
|
-
}
|
|
632
|
-
"target.scrolling": {
|
|
633
|
-
tags: ["open"],
|
|
634
|
-
entry: ["scrollToTarget"],
|
|
635
|
-
effects: [
|
|
636
|
-
"waitForScrollEnd",
|
|
637
|
-
"trapFocus",
|
|
638
|
-
"trackPlacement",
|
|
639
|
-
"trackDismissableBranch",
|
|
640
|
-
"trackInteractOutside",
|
|
641
|
-
"trackEscapeKeydown"
|
|
642
|
-
],
|
|
643
|
-
on: { "SCROLL.END": { target: "tour.active" } }
|
|
644
|
-
},
|
|
645
|
-
"step.waiting": { tags: ["closed"] },
|
|
646
|
-
"tour.active": {
|
|
647
|
-
tags: ["open"],
|
|
648
|
-
effects: [
|
|
649
|
-
"trapFocus",
|
|
650
|
-
"trackPlacement",
|
|
651
|
-
"trackDismissableBranch",
|
|
652
|
-
"trackInteractOutside",
|
|
653
|
-
"trackEscapeKeydown"
|
|
654
|
-
]
|
|
655
|
-
}
|
|
657
|
+
} }
|
|
656
658
|
},
|
|
657
659
|
implementations: {
|
|
658
660
|
guards: {
|
|
@@ -3,7 +3,7 @@ const require_create_anatomy = require("../../create-anatomy-BnwEmNnc.cjs");
|
|
|
3
3
|
const require_dom_query = require("../../dom-query-BUO7rGsg.cjs");
|
|
4
4
|
const require_utils = require("../../utils-ByNiZU8f.cjs");
|
|
5
5
|
const require_collection = require("../../collection-BBgC8xCb.cjs");
|
|
6
|
-
const require_core = require("../../core-
|
|
6
|
+
const require_core = require("../../core-Bw_czdwX.cjs");
|
|
7
7
|
const require_create_props = require("../../create-props-DP39rHnH.cjs");
|
|
8
8
|
//#region src/machines/tree-view/tree-view.anatomy.ts
|
|
9
9
|
const anatomy = require_create_anatomy.createAnatomy("tree-view").parts("branch", "branchContent", "branchControl", "branchIndentGuide", "branchIndicator", "branchText", "branchTrigger", "item", "itemIndicator", "itemText", "label", "nodeCheckbox", "nodeRenameInput", "root", "tree");
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { n as AnatomyInstance } from "../../create-anatomy-9eFQs7lO.cjs";
|
|
2
2
|
import { f as TreeCollectionOptions, g as ValuePath, p as TreeNode, s as FilePathTreeNode, u as IndexPath } from "../../types-D-7AMgSE.cjs";
|
|
3
3
|
import { t as TreeCollection } from "../../tree-collection-DlqV5kYO.cjs";
|
|
4
|
-
import {
|
|
4
|
+
import { b as Service, p as Machine } from "../../types-u-LWCSDE.cjs";
|
|
5
5
|
import { b as NormalizeProps, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-CLRsezW5.cjs";
|
|
6
6
|
import { n as TypeaheadState } from "../../typeahead-DMooWbbX.cjs";
|
|
7
7
|
|
|
8
8
|
//#region src/machines/tree-view/tree-view.anatomy.d.ts
|
|
9
|
-
declare const anatomy: AnatomyInstance<"root" | "item" | "itemIndicator" | "
|
|
9
|
+
declare const anatomy: AnatomyInstance<"root" | "item" | "label" | "itemIndicator" | "itemText" | "branch" | "branchContent" | "branchControl" | "branchIndentGuide" | "branchIndicator" | "branchText" | "branchTrigger" | "nodeCheckbox" | "nodeRenameInput" | "tree">;
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/machines/tree-view/tree-view.collection.d.ts
|
|
12
12
|
declare const collection: {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { n as AnatomyInstance } from "../../create-anatomy-BedZVdg0.mjs";
|
|
2
2
|
import { f as TreeCollectionOptions, g as ValuePath, p as TreeNode, s as FilePathTreeNode, u as IndexPath } from "../../types-9uw8LHpE.mjs";
|
|
3
3
|
import { t as TreeCollection } from "../../tree-collection-Dlf9EUrT.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { b as Service, p as Machine } from "../../types-DvUmCWsb.mjs";
|
|
5
5
|
import { b as NormalizeProps, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-BVFlU3b9.mjs";
|
|
6
6
|
import { n as TypeaheadState } from "../../typeahead-Bbeb1fAR.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/machines/tree-view/tree-view.anatomy.d.ts
|
|
9
|
-
declare const anatomy: AnatomyInstance<"root" | "item" | "itemIndicator" | "
|
|
9
|
+
declare const anatomy: AnatomyInstance<"root" | "item" | "label" | "itemIndicator" | "itemText" | "branch" | "branchContent" | "branchControl" | "branchIndentGuide" | "branchIndicator" | "branchText" | "branchTrigger" | "nodeCheckbox" | "nodeRenameInput" | "tree">;
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/machines/tree-view/tree-view.collection.d.ts
|
|
12
12
|
declare const collection: {
|
|
@@ -2,7 +2,7 @@ import { t as createAnatomy } from "../../create-anatomy-Dr0evdYy.mjs";
|
|
|
2
2
|
import { Ct as isModifierKey, St as isLeftClick, W as raf, _t as isComposingEvent, bn as ariaAttr, cn as isAnchorElement, ct as setElementValue, ft as getEventKey, ht as getEventTarget, s as getByTypeahead, un as isEditableElement, xn as dataAttr } from "../../dom-query-BFuRs3l4.mjs";
|
|
3
3
|
import { At as remove, Dt as partition, Mt as toArray, Nt as uniq, _t as diff, ft as isEqual, mt as addOrRemove, nt as isArray, pt as add, t as ensure, u as createSplitProps, vt as first, wt as last } from "../../utils-VVoZ_v29.mjs";
|
|
4
4
|
import { n as filePathToTree, t as TreeCollection } from "../../collection-DgzidRvr.mjs";
|
|
5
|
-
import { a as createMachine, i as createGuards } from "../../core-
|
|
5
|
+
import { a as createMachine, i as createGuards } from "../../core-CTtbW9qh.mjs";
|
|
6
6
|
import { t as createProps } from "../../create-props-DFW8DUsC.mjs";
|
|
7
7
|
//#region src/machines/tree-view/tree-view.anatomy.ts
|
|
8
8
|
const anatomy = createAnatomy("tree-view").parts("branch", "branchContent", "branchControl", "branchIndentGuide", "branchIndicator", "branchText", "branchTrigger", "item", "itemIndicator", "itemText", "label", "nodeCheckbox", "nodeRenameInput", "root", "tree");
|
|
@@ -105,14 +105,26 @@ interface Params<T extends Dict> {
|
|
|
105
105
|
guard: (key: T["guard"] | GuardFn<T>) => boolean | undefined;
|
|
106
106
|
}
|
|
107
107
|
type GuardFn<T extends Dict> = (params: Params<T>) => boolean;
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
type TopLevelState<S extends string> = S extends `${infer Top}.${string}` ? Top : S;
|
|
109
|
+
type ChildStateKey<S extends string, Parent extends string> = S extends `${Parent}.${infer Rest}` ? Rest extends `${infer Child}.${string}` ? Child : Rest : never;
|
|
110
|
+
type ParentPath<S extends string> = S extends `${infer Parent}.${string}` ? Parent : never;
|
|
111
|
+
type AncestorPaths<S extends string> = S | (ParentPath<S> extends never ? never : AncestorPaths<ParentPath<S>>);
|
|
112
|
+
type RelativeStateTarget<S extends string, Source extends string> = ChildStateKey<S, AncestorPaths<Source>>;
|
|
113
|
+
type StateIdTarget = `#${string}`;
|
|
114
|
+
interface Transition<T extends Dict, Source extends string | undefined = string | undefined> {
|
|
115
|
+
target?: T["state"] | StateIdTarget | (Source extends string ? RelativeStateTarget<T["state"], Source> : never) | undefined;
|
|
110
116
|
actions?: T["action"][] | undefined;
|
|
111
117
|
guard?: T["guard"] | GuardFn<T> | undefined;
|
|
112
118
|
reenter?: boolean | undefined;
|
|
113
119
|
}
|
|
120
|
+
type TransitionSet<T extends Dict> = Transition<T> | Transition<T>[] | undefined;
|
|
121
|
+
type TransitionMap<T extends Dict> = Record<string, TransitionSet<T>>;
|
|
122
|
+
type TransitionMatch<T extends Dict> = {
|
|
123
|
+
transitions: TransitionSet<T>;
|
|
124
|
+
source: string | undefined;
|
|
125
|
+
};
|
|
114
126
|
type MaybeArray<T> = T | T[];
|
|
115
|
-
type ChooseFn<T extends Dict> = (transitions: MaybeArray<Omit<Transition<T>, "target">>) => Transition<T> | undefined;
|
|
127
|
+
type ChooseFn<T extends Dict> = (transitions: MaybeArray<Omit<Transition<T, string>, "target">> | null | undefined) => Transition<T> | undefined;
|
|
116
128
|
interface PropsParams<T extends Dict> {
|
|
117
129
|
props: Partial<T["props"]>;
|
|
118
130
|
scope: Scope;
|
|
@@ -123,6 +135,16 @@ interface RefsParams<T extends Dict> {
|
|
|
123
135
|
}
|
|
124
136
|
type ActionsOrFn<T extends Dict> = T["action"][] | ((params: Params<T>) => T["action"][] | undefined);
|
|
125
137
|
type EffectsOrFn<T extends Dict> = T["effect"][] | ((params: Params<T>) => T["effect"][] | undefined);
|
|
138
|
+
interface MachineState<T extends Dict, Parent extends string = string> {
|
|
139
|
+
id?: string | undefined;
|
|
140
|
+
tags?: T["tag"][] | undefined;
|
|
141
|
+
entry?: ActionsOrFn<T> | undefined;
|
|
142
|
+
exit?: ActionsOrFn<T> | undefined;
|
|
143
|
+
effects?: EffectsOrFn<T> | undefined;
|
|
144
|
+
initial?: ChildStateKey<T["state"], Parent> | undefined;
|
|
145
|
+
states?: { [K in ChildStateKey<T["state"], Parent>]?: MachineState<T, `${Parent}.${K}`> } | undefined;
|
|
146
|
+
on?: { [E in T["event"]["type"]]?: Transition<T, Parent> | Array<Transition<T, Parent>> } | undefined;
|
|
147
|
+
}
|
|
126
148
|
interface Machine<T extends Dict> {
|
|
127
149
|
debug?: boolean | undefined;
|
|
128
150
|
props?: ((params: PropsParams<T>) => T["props"]) | undefined;
|
|
@@ -136,14 +158,8 @@ interface Machine<T extends Dict> {
|
|
|
136
158
|
effects?: EffectsOrFn<T> | undefined;
|
|
137
159
|
refs?: ((params: RefsParams<T>) => T["refs"]) | undefined;
|
|
138
160
|
watch?: ((params: Params<T>) => void) | undefined;
|
|
139
|
-
on?: { [E in T["event"]["type"]]?: Transition<T> | Array<Transition<T>> } | undefined;
|
|
140
|
-
states: { [K in T["state"]]:
|
|
141
|
-
tags?: T["tag"][] | undefined;
|
|
142
|
-
entry?: ActionsOrFn<T> | undefined;
|
|
143
|
-
exit?: ActionsOrFn<T> | undefined;
|
|
144
|
-
effects?: EffectsOrFn<T> | undefined;
|
|
145
|
-
on?: { [E in T["event"]["type"]]?: Transition<T> | Array<Transition<T>> } | undefined;
|
|
146
|
-
} };
|
|
161
|
+
on?: { [E in T["event"]["type"]]?: Transition<T, undefined> | Array<Transition<T, undefined>> } | undefined;
|
|
162
|
+
states: { [K in TopLevelState<T["state"]>]: MachineState<T, K> };
|
|
147
163
|
implementations?: {
|
|
148
164
|
guards?: { [K in T["guard"]]: (params: Params<T>) => boolean } | undefined;
|
|
149
165
|
actions?: { [K in T["action"]]: (params: Params<T>) => void } | undefined;
|
|
@@ -198,4 +214,4 @@ declare enum MachineStatus {
|
|
|
198
214
|
}
|
|
199
215
|
declare const INIT_STATE = "__init__";
|
|
200
216
|
//#endregion
|
|
201
|
-
export {
|
|
217
|
+
export { TransitionMatch as C, TransitionMap as S, ValueOrFn as T, Params as _, BindableParams as a, Service as b, ComputedFn as c, GuardFn as d, INIT_STATE as f, MachineStatus as g, MachineState as h, BindableFn as i, EffectsOrFn as l, MachineSchema as m, Bindable as n, BindableRefs as o, Machine as p, BindableContext as r, ChooseFn as s, ActionsOrFn as t, EventObject as u, PropFn as v, TransitionSet as w, Transition as x, Scope as y };
|