@likec4/diagram 1.51.0 → 1.53.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/dist/LikeC4View.js +1 -1
- package/dist/_virtual/assign-6b5249c3.cjs.js +3 -0
- package/dist/_virtual/log-b8ad8428.cjs.js +3 -0
- package/dist/_virtual/raise-f23ccfcb.cjs.js +3 -0
- package/dist/_virtual/store-803b8f7d.cjs.js +3 -0
- package/dist/_virtual/xstate-actions.cjs.js +1 -1
- package/dist/_virtual/xstate-guards.cjs.js +1 -1
- package/dist/_virtual/xstate-store-react.cjs.js +1 -1
- package/dist/adhoc-editor/EditorPanel.js +1 -1
- package/dist/adhoc-editor/components/Tree.js +1 -1
- package/dist/base-primitives/compound/CompoundActionButton.js +1 -1
- package/dist/base-primitives/compound/CompoundDetailsButton.js +1 -1
- package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
- package/dist/base-primitives/element/ElementActionButtons.js +1 -1
- package/dist/base-primitives/element/ElementDetailsButton.js +1 -1
- package/dist/components/ErrorFallback.js +1 -1
- package/dist/components/Link.js +2 -2
- package/dist/components/NavigationPanel.js +4 -2
- package/dist/components/SearchControl.css.js +79 -0
- package/dist/components/SearchControl.js +17 -0
- package/dist/context/IconRenderer.js +7 -7
- package/dist/custom/index.d.ts +1 -0
- package/dist/custom/index.js +1 -0
- package/dist/editor/editorActor.actions.d.ts +142 -190
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/likec4diagram/custom/nodes/ElementActions.js +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +2 -2
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +4 -4
- package/dist/likec4diagram/relationship-popover/actor.d.ts +28 -130
- package/dist/likec4diagram/state/machine.actions.d.ts +1819 -2407
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +472 -628
- package/dist/likec4diagram/state/machine.setup.js +2 -2
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +148 -196
- package/dist/likec4diagram/state/machine.state.ready.d.ts +2921 -3807
- package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +413 -537
- package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +352 -413
- package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +91 -121
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +583 -775
- package/dist/likec4diagram/ui/notation/NotationPanel.js +2 -2
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +1 -2
- package/dist/navigationpanel/NavigationPanelDropdown.js +7 -7
- package/dist/navigationpanel/_common.js +1 -1
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +2 -2
- package/dist/navigationpanel/comparepanel/ComparePanelControls.js +1 -1
- package/dist/navigationpanel/controls/DetailsControls.js +2 -2
- package/dist/navigationpanel/controls/LayoutWarning.js +1 -1
- package/dist/navigationpanel/controls/NavigationButtons.js +2 -2
- package/dist/navigationpanel/controls/OpenSource.js +1 -1
- package/dist/navigationpanel/controls/SearchControl.js +1 -1
- package/dist/navigationpanel/controls/ToggleReadonly.js +2 -2
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +1 -1
- package/dist/navigationpanel/editorpanel/CenterCamera.js +1 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +1 -1
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +9 -9
- package/dist/navigationpanel/editorpanel/ToggleReadonly.js +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +3 -3
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +2 -2
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +31 -45
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.1_react@19.2.4 → @tabler_icons-react@3.40.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +1 -1
- package/dist/node_modules/.pnpm/{@xstate_store@3.14.0_react@19.2.4/node_modules/@xstate/store/dist/store-1b2fbb72.cjs.js → @xstate_store@3.17.0_react@19.2.4/node_modules/@xstate/store/dist/store-803b8f7d.cjs.js} +151 -132
- package/dist/node_modules/.pnpm/{@xstate_store@3.14.0_react@19.2.4 → @xstate_store@3.17.0_react@19.2.4}/node_modules/@xstate/store/react/dist/xstate-store-react.cjs.js +7 -2
- package/dist/node_modules/.pnpm/{xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c → xstate@5.28.0}/node_modules/xstate/actions/dist/xstate-actions.cjs.js +6 -6
- package/dist/node_modules/.pnpm/{xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/assign-dea9f7c8.cjs.js → xstate@5.28.0/node_modules/xstate/dist/assign-6b5249c3.cjs.js} +10 -10
- package/dist/node_modules/.pnpm/{xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/log-ec8d4df4.cjs.js → xstate@5.28.0/node_modules/xstate/dist/log-b8ad8428.cjs.js} +18 -18
- package/dist/node_modules/.pnpm/{xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/raise-da5b247f.cjs.js → xstate@5.28.0/node_modules/xstate/dist/raise-f23ccfcb.cjs.js} +223 -126
- package/dist/node_modules/.pnpm/{xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c → xstate@5.28.0}/node_modules/xstate/guards/dist/xstate-guards.cjs.js +2 -2
- package/dist/overlays/element-details/ElementDetailsCard.js +4 -4
- package/dist/overlays/element-details/MetadataValue.js +2 -2
- package/dist/overlays/element-details/TabPanelDeployments.js +3 -3
- package/dist/overlays/element-details/TabPanelRelationships.js +3 -3
- package/dist/overlays/element-details/TabPanelStructure.js +1 -1
- package/dist/overlays/relationship-details/RelationshipDetails.js +3 -3
- package/dist/overlays/relationship-details/SelectEdge.js +2 -2
- package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +6 -6
- package/dist/overlays/relationships-browser/SelectElement.js +2 -2
- package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
- package/dist/projects-overview/actor.d.ts +15 -21
- package/dist/projects-overview/custom/nodeTypes.js +1 -1
- package/dist/search/Search.d.ts +8 -0
- package/dist/search/Search.js +40 -47
- package/dist/search/SearchContext.d.ts +21 -0
- package/dist/search/SearchContext.js +20 -0
- package/dist/search/XStateSearchAdapter.d.ts +5 -0
- package/dist/search/XStateSearchAdapter.js +64 -0
- package/dist/search/components/ElementsColumn.js +6 -9
- package/dist/search/components/PickView.d.ts +1 -3
- package/dist/search/components/PickView.js +5 -5
- package/dist/search/components/SearchByTags.js +1 -1
- package/dist/search/components/SearchInput.js +6 -7
- package/dist/search/components/ViewsColum.js +8 -12
- package/dist/search/hooks.d.ts +0 -2
- package/dist/search/hooks.js +7 -33
- package/dist/styles.css2.js +1 -1
- package/package.json +23 -23
- package/panda.buildinfo.json +2 -3
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/dist/_virtual/assign-dea9f7c8.cjs.js +0 -3
- package/dist/_virtual/log-ec8d4df4.cjs.js +0 -3
- package/dist/_virtual/raise-da5b247f.cjs.js +0 -3
- package/dist/_virtual/store-1b2fbb72.cjs.js +0 -3
- /package/dist/node_modules/.pnpm/{xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c → xstate@5.28.0}/node_modules/xstate/dev/dist/xstate-dev.cjs.js +0 -0
|
@@ -1,44 +1,54 @@
|
|
|
1
|
-
import { __exports as
|
|
1
|
+
import { __exports as store803b8f7d_cjs } from '../../../../../../../_virtual/store-803b8f7d.cjs.js';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var hasRequiredStore803b8f7d_cjs;
|
|
4
4
|
|
|
5
|
-
function
|
|
6
|
-
if (
|
|
7
|
-
|
|
5
|
+
function requireStore803b8f7d_cjs () {
|
|
6
|
+
if (hasRequiredStore803b8f7d_cjs) return store803b8f7d_cjs;
|
|
7
|
+
hasRequiredStore803b8f7d_cjs = 1;
|
|
8
8
|
|
|
9
9
|
/* eslint-disable */
|
|
10
|
+
// Adapted from Alien Signals
|
|
11
|
+
// https://github.com/stackblitz/alien-signals/
|
|
12
|
+
|
|
13
|
+
let ReactiveFlags = /*#__PURE__*/function (ReactiveFlags) {
|
|
14
|
+
ReactiveFlags[ReactiveFlags["None"] = 0] = "None";
|
|
15
|
+
ReactiveFlags[ReactiveFlags["Mutable"] = 1] = "Mutable";
|
|
16
|
+
ReactiveFlags[ReactiveFlags["Watching"] = 2] = "Watching";
|
|
17
|
+
ReactiveFlags[ReactiveFlags["RecursedCheck"] = 4] = "RecursedCheck";
|
|
18
|
+
ReactiveFlags[ReactiveFlags["Recursed"] = 8] = "Recursed";
|
|
19
|
+
ReactiveFlags[ReactiveFlags["Dirty"] = 16] = "Dirty";
|
|
20
|
+
ReactiveFlags[ReactiveFlags["Pending"] = 32] = "Pending";
|
|
21
|
+
return ReactiveFlags;
|
|
22
|
+
}({});
|
|
10
23
|
function createReactiveSystem({
|
|
11
24
|
update,
|
|
12
25
|
notify,
|
|
13
26
|
unwatched
|
|
14
27
|
}) {
|
|
15
|
-
let currentVersion = 0;
|
|
16
28
|
return {
|
|
17
29
|
link,
|
|
18
30
|
unlink,
|
|
19
31
|
propagate,
|
|
20
32
|
checkDirty,
|
|
21
|
-
endTracking,
|
|
22
|
-
startTracking,
|
|
23
33
|
shallowPropagate
|
|
24
34
|
};
|
|
25
|
-
function link(dep, sub) {
|
|
26
|
-
const prevDep = sub.
|
|
35
|
+
function link(dep, sub, version) {
|
|
36
|
+
const prevDep = sub.depsTail;
|
|
27
37
|
if (prevDep !== undefined && prevDep.dep === dep) {
|
|
28
38
|
return;
|
|
29
39
|
}
|
|
30
|
-
const nextDep = prevDep !== undefined ? prevDep.nextDep : sub.
|
|
40
|
+
const nextDep = prevDep !== undefined ? prevDep.nextDep : sub.deps;
|
|
31
41
|
if (nextDep !== undefined && nextDep.dep === dep) {
|
|
32
|
-
nextDep.version =
|
|
33
|
-
sub.
|
|
42
|
+
nextDep.version = version;
|
|
43
|
+
sub.depsTail = nextDep;
|
|
34
44
|
return;
|
|
35
45
|
}
|
|
36
|
-
const prevSub = dep.
|
|
37
|
-
if (prevSub !== undefined && prevSub.version ===
|
|
46
|
+
const prevSub = dep.subsTail;
|
|
47
|
+
if (prevSub !== undefined && prevSub.version === version && prevSub.sub === sub) {
|
|
38
48
|
return;
|
|
39
49
|
}
|
|
40
|
-
const newLink = sub.
|
|
41
|
-
version
|
|
50
|
+
const newLink = sub.depsTail = dep.subsTail = {
|
|
51
|
+
version,
|
|
42
52
|
dep,
|
|
43
53
|
sub,
|
|
44
54
|
prevDep,
|
|
@@ -52,12 +62,12 @@ function requireStore1b2fbb72_cjs () {
|
|
|
52
62
|
if (prevDep !== undefined) {
|
|
53
63
|
prevDep.nextDep = newLink;
|
|
54
64
|
} else {
|
|
55
|
-
sub.
|
|
65
|
+
sub.deps = newLink;
|
|
56
66
|
}
|
|
57
67
|
if (prevSub !== undefined) {
|
|
58
68
|
prevSub.nextSub = newLink;
|
|
59
69
|
} else {
|
|
60
|
-
dep.
|
|
70
|
+
dep.subs = newLink;
|
|
61
71
|
}
|
|
62
72
|
}
|
|
63
73
|
function unlink(link, sub = link.sub) {
|
|
@@ -69,21 +79,21 @@ function requireStore1b2fbb72_cjs () {
|
|
|
69
79
|
if (nextDep !== undefined) {
|
|
70
80
|
nextDep.prevDep = prevDep;
|
|
71
81
|
} else {
|
|
72
|
-
sub.
|
|
82
|
+
sub.depsTail = prevDep;
|
|
73
83
|
}
|
|
74
84
|
if (prevDep !== undefined) {
|
|
75
85
|
prevDep.nextDep = nextDep;
|
|
76
86
|
} else {
|
|
77
|
-
sub.
|
|
87
|
+
sub.deps = nextDep;
|
|
78
88
|
}
|
|
79
89
|
if (nextSub !== undefined) {
|
|
80
90
|
nextSub.prevSub = prevSub;
|
|
81
91
|
} else {
|
|
82
|
-
dep.
|
|
92
|
+
dep.subsTail = prevSub;
|
|
83
93
|
}
|
|
84
94
|
if (prevSub !== undefined) {
|
|
85
95
|
prevSub.nextSub = nextSub;
|
|
86
|
-
} else if ((dep.
|
|
96
|
+
} else if ((dep.subs = nextSub) === undefined) {
|
|
87
97
|
unwatched(dep);
|
|
88
98
|
}
|
|
89
99
|
return nextDep;
|
|
@@ -93,24 +103,24 @@ function requireStore1b2fbb72_cjs () {
|
|
|
93
103
|
let stack;
|
|
94
104
|
top: do {
|
|
95
105
|
const sub = link.sub;
|
|
96
|
-
let flags = sub.
|
|
97
|
-
if (!(flags &
|
|
98
|
-
sub.
|
|
99
|
-
} else if (!(flags &
|
|
100
|
-
flags =
|
|
101
|
-
} else if (!(flags &
|
|
102
|
-
sub.
|
|
103
|
-
} else if (!(flags &
|
|
104
|
-
sub.
|
|
105
|
-
flags &=
|
|
106
|
+
let flags = sub.flags;
|
|
107
|
+
if (!(flags & (ReactiveFlags.RecursedCheck | ReactiveFlags.Recursed | ReactiveFlags.Dirty | ReactiveFlags.Pending))) {
|
|
108
|
+
sub.flags = flags | ReactiveFlags.Pending;
|
|
109
|
+
} else if (!(flags & (ReactiveFlags.RecursedCheck | ReactiveFlags.Recursed))) {
|
|
110
|
+
flags = ReactiveFlags.None;
|
|
111
|
+
} else if (!(flags & ReactiveFlags.RecursedCheck)) {
|
|
112
|
+
sub.flags = flags & ~ReactiveFlags.Recursed | ReactiveFlags.Pending;
|
|
113
|
+
} else if (!(flags & (ReactiveFlags.Dirty | ReactiveFlags.Pending)) && isValidLink(link, sub)) {
|
|
114
|
+
sub.flags = flags | (ReactiveFlags.Recursed | ReactiveFlags.Pending);
|
|
115
|
+
flags &= ReactiveFlags.Mutable;
|
|
106
116
|
} else {
|
|
107
|
-
flags =
|
|
117
|
+
flags = ReactiveFlags.None;
|
|
108
118
|
}
|
|
109
|
-
if (flags &
|
|
119
|
+
if (flags & ReactiveFlags.Watching) {
|
|
110
120
|
notify(sub);
|
|
111
121
|
}
|
|
112
|
-
if (flags &
|
|
113
|
-
const subSubs = sub.
|
|
122
|
+
if (flags & ReactiveFlags.Mutable) {
|
|
123
|
+
const subSubs = sub.subs;
|
|
114
124
|
if (subSubs !== undefined) {
|
|
115
125
|
const nextSub = (link = subSubs).nextSub;
|
|
116
126
|
if (nextSub !== undefined) {
|
|
@@ -138,44 +148,31 @@ function requireStore1b2fbb72_cjs () {
|
|
|
138
148
|
break;
|
|
139
149
|
} while (true);
|
|
140
150
|
}
|
|
141
|
-
function startTracking(sub) {
|
|
142
|
-
++currentVersion;
|
|
143
|
-
sub._depsTail = undefined;
|
|
144
|
-
sub._flags = sub._flags & -57 | 4;
|
|
145
|
-
}
|
|
146
|
-
function endTracking(sub) {
|
|
147
|
-
const depsTail = sub._depsTail;
|
|
148
|
-
let toRemove = depsTail !== undefined ? depsTail.nextDep : sub._deps;
|
|
149
|
-
while (toRemove !== undefined) {
|
|
150
|
-
toRemove = unlink(toRemove, sub);
|
|
151
|
-
}
|
|
152
|
-
sub._flags &= -5;
|
|
153
|
-
}
|
|
154
151
|
function checkDirty(link, sub) {
|
|
155
152
|
let stack;
|
|
156
153
|
let checkDepth = 0;
|
|
154
|
+
let dirty = false;
|
|
157
155
|
top: do {
|
|
158
156
|
const dep = link.dep;
|
|
159
|
-
const flags = dep.
|
|
160
|
-
|
|
161
|
-
if (sub._flags & 16) {
|
|
157
|
+
const flags = dep.flags;
|
|
158
|
+
if (sub.flags & ReactiveFlags.Dirty) {
|
|
162
159
|
dirty = true;
|
|
163
|
-
} else if ((flags &
|
|
160
|
+
} else if ((flags & (ReactiveFlags.Mutable | ReactiveFlags.Dirty)) === (ReactiveFlags.Mutable | ReactiveFlags.Dirty)) {
|
|
164
161
|
if (update(dep)) {
|
|
165
|
-
const subs = dep.
|
|
162
|
+
const subs = dep.subs;
|
|
166
163
|
if (subs.nextSub !== undefined) {
|
|
167
164
|
shallowPropagate(subs);
|
|
168
165
|
}
|
|
169
166
|
dirty = true;
|
|
170
167
|
}
|
|
171
|
-
} else if ((flags &
|
|
168
|
+
} else if ((flags & (ReactiveFlags.Mutable | ReactiveFlags.Pending)) === (ReactiveFlags.Mutable | ReactiveFlags.Pending)) {
|
|
172
169
|
if (link.nextSub !== undefined || link.prevSub !== undefined) {
|
|
173
170
|
stack = {
|
|
174
171
|
value: link,
|
|
175
172
|
prev: stack
|
|
176
173
|
};
|
|
177
174
|
}
|
|
178
|
-
link = dep.
|
|
175
|
+
link = dep.deps;
|
|
179
176
|
sub = dep;
|
|
180
177
|
++checkDepth;
|
|
181
178
|
continue;
|
|
@@ -188,7 +185,7 @@ function requireStore1b2fbb72_cjs () {
|
|
|
188
185
|
}
|
|
189
186
|
}
|
|
190
187
|
while (checkDepth--) {
|
|
191
|
-
const firstSub = sub.
|
|
188
|
+
const firstSub = sub.subs;
|
|
192
189
|
const hasMultipleSubs = firstSub.nextSub !== undefined;
|
|
193
190
|
if (hasMultipleSubs) {
|
|
194
191
|
link = stack.value;
|
|
@@ -204,8 +201,9 @@ function requireStore1b2fbb72_cjs () {
|
|
|
204
201
|
sub = link.sub;
|
|
205
202
|
continue;
|
|
206
203
|
}
|
|
204
|
+
dirty = false;
|
|
207
205
|
} else {
|
|
208
|
-
sub.
|
|
206
|
+
sub.flags &= ~ReactiveFlags.Pending;
|
|
209
207
|
}
|
|
210
208
|
sub = link.sub;
|
|
211
209
|
const nextDep = link.nextDep;
|
|
@@ -213,7 +211,6 @@ function requireStore1b2fbb72_cjs () {
|
|
|
213
211
|
link = nextDep;
|
|
214
212
|
continue top;
|
|
215
213
|
}
|
|
216
|
-
dirty = false;
|
|
217
214
|
}
|
|
218
215
|
return dirty;
|
|
219
216
|
} while (true);
|
|
@@ -221,17 +218,17 @@ function requireStore1b2fbb72_cjs () {
|
|
|
221
218
|
function shallowPropagate(link) {
|
|
222
219
|
do {
|
|
223
220
|
const sub = link.sub;
|
|
224
|
-
const flags = sub.
|
|
225
|
-
if ((flags &
|
|
226
|
-
sub.
|
|
227
|
-
if (flags &
|
|
221
|
+
const flags = sub.flags;
|
|
222
|
+
if ((flags & (ReactiveFlags.Pending | ReactiveFlags.Dirty)) === ReactiveFlags.Pending) {
|
|
223
|
+
sub.flags = flags | ReactiveFlags.Dirty;
|
|
224
|
+
if ((flags & (ReactiveFlags.Watching | ReactiveFlags.RecursedCheck)) === ReactiveFlags.Watching) {
|
|
228
225
|
notify(sub);
|
|
229
226
|
}
|
|
230
227
|
}
|
|
231
228
|
} while ((link = link.nextSub) !== undefined);
|
|
232
229
|
}
|
|
233
230
|
function isValidLink(checkLink, sub) {
|
|
234
|
-
let link = sub.
|
|
231
|
+
let link = sub.depsTail;
|
|
235
232
|
while (link !== undefined) {
|
|
236
233
|
if (link === checkLink) {
|
|
237
234
|
return true;
|
|
@@ -253,13 +250,12 @@ function requireStore1b2fbb72_cjs () {
|
|
|
253
250
|
}
|
|
254
251
|
|
|
255
252
|
const queuedEffects = [];
|
|
253
|
+
let cycle = 0;
|
|
256
254
|
const {
|
|
257
255
|
link,
|
|
258
256
|
unlink,
|
|
259
257
|
propagate,
|
|
260
258
|
checkDirty,
|
|
261
|
-
endTracking,
|
|
262
|
-
startTracking,
|
|
263
259
|
shallowPropagate
|
|
264
260
|
} = createReactiveSystem({
|
|
265
261
|
update(atom) {
|
|
@@ -267,20 +263,26 @@ function requireStore1b2fbb72_cjs () {
|
|
|
267
263
|
},
|
|
268
264
|
notify(effect) {
|
|
269
265
|
queuedEffects[queuedEffectsLength++] = effect;
|
|
266
|
+
effect.flags &= ~ReactiveFlags.Watching;
|
|
270
267
|
},
|
|
271
268
|
unwatched(atom) {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
atom.
|
|
275
|
-
|
|
276
|
-
toRemove = unlink(toRemove, atom);
|
|
277
|
-
} while (toRemove !== undefined);
|
|
269
|
+
if (atom.depsTail !== undefined) {
|
|
270
|
+
atom.depsTail = undefined;
|
|
271
|
+
atom.flags = ReactiveFlags.Mutable | ReactiveFlags.Dirty;
|
|
272
|
+
purgeDeps(atom);
|
|
278
273
|
}
|
|
279
274
|
}
|
|
280
275
|
});
|
|
281
276
|
let notifyIndex = 0;
|
|
282
277
|
let queuedEffectsLength = 0;
|
|
283
278
|
let activeSub;
|
|
279
|
+
function purgeDeps(sub) {
|
|
280
|
+
const depsTail = sub.depsTail;
|
|
281
|
+
let dep = depsTail !== undefined ? depsTail.nextDep : sub.deps;
|
|
282
|
+
while (dep !== undefined) {
|
|
283
|
+
dep = unlink(dep, sub);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
284
286
|
function flush() {
|
|
285
287
|
while (notifyIndex < queuedEffectsLength) {
|
|
286
288
|
const effect = queuedEffects[notifyIndex];
|
|
@@ -291,13 +293,15 @@ function requireStore1b2fbb72_cjs () {
|
|
|
291
293
|
queuedEffectsLength = 0;
|
|
292
294
|
}
|
|
293
295
|
function createAsyncAtom(getValue, options) {
|
|
296
|
+
const ref = {};
|
|
294
297
|
const atom = createAtom(() => {
|
|
295
298
|
getValue().then(data => {
|
|
296
|
-
|
|
299
|
+
const internalAtom = ref.current;
|
|
300
|
+
if (internalAtom._update({
|
|
297
301
|
status: 'done',
|
|
298
302
|
data
|
|
299
303
|
})) {
|
|
300
|
-
const subs =
|
|
304
|
+
const subs = internalAtom.subs;
|
|
301
305
|
if (subs !== undefined) {
|
|
302
306
|
propagate(subs);
|
|
303
307
|
shallowPropagate(subs);
|
|
@@ -305,11 +309,12 @@ function requireStore1b2fbb72_cjs () {
|
|
|
305
309
|
}
|
|
306
310
|
}
|
|
307
311
|
}, error => {
|
|
308
|
-
|
|
312
|
+
const internalAtom = ref.current;
|
|
313
|
+
if (internalAtom._update({
|
|
309
314
|
status: 'error',
|
|
310
315
|
error
|
|
311
316
|
})) {
|
|
312
|
-
const subs =
|
|
317
|
+
const subs = internalAtom.subs;
|
|
313
318
|
if (subs !== undefined) {
|
|
314
319
|
propagate(subs);
|
|
315
320
|
shallowPropagate(subs);
|
|
@@ -321,6 +326,7 @@ function requireStore1b2fbb72_cjs () {
|
|
|
321
326
|
status: 'pending'
|
|
322
327
|
};
|
|
323
328
|
}, options);
|
|
329
|
+
ref.current = atom;
|
|
324
330
|
return atom;
|
|
325
331
|
}
|
|
326
332
|
function createAtom(valueOrFn, options) {
|
|
@@ -330,12 +336,14 @@ function requireStore1b2fbb72_cjs () {
|
|
|
330
336
|
// Create plain object atom
|
|
331
337
|
const atom = {
|
|
332
338
|
_snapshot: isComputed ? undefined : valueOrFn,
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
339
|
+
subs: undefined,
|
|
340
|
+
subsTail: undefined,
|
|
341
|
+
deps: undefined,
|
|
342
|
+
depsTail: undefined,
|
|
343
|
+
flags: isComputed ? ReactiveFlags.None : ReactiveFlags.Mutable,
|
|
336
344
|
get() {
|
|
337
345
|
if (activeSub !== undefined) {
|
|
338
|
-
link(atom, activeSub);
|
|
346
|
+
link(atom, activeSub, cycle);
|
|
339
347
|
}
|
|
340
348
|
return atom._snapshot;
|
|
341
349
|
},
|
|
@@ -362,10 +370,14 @@ function requireStore1b2fbb72_cjs () {
|
|
|
362
370
|
const prevSub = activeSub;
|
|
363
371
|
const compare = options?.compare ?? Object.is;
|
|
364
372
|
activeSub = atom;
|
|
365
|
-
|
|
373
|
+
++cycle;
|
|
374
|
+
atom.depsTail = undefined;
|
|
375
|
+
if (isComputed) {
|
|
376
|
+
atom.flags = ReactiveFlags.Mutable | ReactiveFlags.RecursedCheck;
|
|
377
|
+
}
|
|
366
378
|
try {
|
|
367
379
|
const oldValue = atom._snapshot;
|
|
368
|
-
const read =
|
|
380
|
+
const read = a => a.get();
|
|
369
381
|
const newValue = typeof getValue === 'function' ? getValue(oldValue) : getValue === undefined && isComputed ? getter(read, oldValue) : getValue;
|
|
370
382
|
if (oldValue === undefined || !compare(oldValue, newValue)) {
|
|
371
383
|
atom._snapshot = newValue;
|
|
@@ -374,46 +386,43 @@ function requireStore1b2fbb72_cjs () {
|
|
|
374
386
|
return false;
|
|
375
387
|
} finally {
|
|
376
388
|
activeSub = prevSub;
|
|
377
|
-
|
|
389
|
+
if (isComputed) {
|
|
390
|
+
atom.flags &= ~ReactiveFlags.RecursedCheck;
|
|
391
|
+
}
|
|
392
|
+
purgeDeps(atom);
|
|
378
393
|
}
|
|
379
394
|
}
|
|
380
395
|
};
|
|
381
396
|
if (isComputed) {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
const subs = atom._subs;
|
|
391
|
-
if (subs !== undefined) {
|
|
392
|
-
shallowPropagate(subs);
|
|
393
|
-
}
|
|
397
|
+
atom.flags = ReactiveFlags.Mutable | ReactiveFlags.Dirty;
|
|
398
|
+
atom.get = function () {
|
|
399
|
+
const flags = atom.flags;
|
|
400
|
+
if (flags & ReactiveFlags.Dirty || flags & ReactiveFlags.Pending && checkDirty(atom.deps, atom)) {
|
|
401
|
+
if (atom._update()) {
|
|
402
|
+
const subs = atom.subs;
|
|
403
|
+
if (subs !== undefined) {
|
|
404
|
+
shallowPropagate(subs);
|
|
394
405
|
}
|
|
395
|
-
} else if (flags & 32) {
|
|
396
|
-
atom._flags = flags & -33;
|
|
397
406
|
}
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
}
|
|
401
|
-
return atom._snapshot;
|
|
407
|
+
} else if (flags & ReactiveFlags.Pending) {
|
|
408
|
+
atom.flags = flags & ~ReactiveFlags.Pending;
|
|
402
409
|
}
|
|
403
|
-
|
|
410
|
+
if (activeSub !== undefined) {
|
|
411
|
+
link(atom, activeSub, cycle);
|
|
412
|
+
}
|
|
413
|
+
return atom._snapshot;
|
|
414
|
+
};
|
|
404
415
|
} else {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
flush();
|
|
413
|
-
}
|
|
416
|
+
atom.set = function (valueOrFn) {
|
|
417
|
+
if (atom._update(valueOrFn)) {
|
|
418
|
+
const subs = atom.subs;
|
|
419
|
+
if (subs !== undefined) {
|
|
420
|
+
propagate(subs);
|
|
421
|
+
shallowPropagate(subs);
|
|
422
|
+
flush();
|
|
414
423
|
}
|
|
415
424
|
}
|
|
416
|
-
}
|
|
425
|
+
};
|
|
417
426
|
}
|
|
418
427
|
return atom;
|
|
419
428
|
}
|
|
@@ -421,29 +430,35 @@ function requireStore1b2fbb72_cjs () {
|
|
|
421
430
|
const run = () => {
|
|
422
431
|
const prevSub = activeSub;
|
|
423
432
|
activeSub = effectObj;
|
|
424
|
-
|
|
433
|
+
++cycle;
|
|
434
|
+
effectObj.depsTail = undefined;
|
|
435
|
+
effectObj.flags = ReactiveFlags.Watching | ReactiveFlags.RecursedCheck;
|
|
425
436
|
try {
|
|
426
437
|
return fn();
|
|
427
438
|
} finally {
|
|
428
439
|
activeSub = prevSub;
|
|
429
|
-
|
|
440
|
+
effectObj.flags &= ~ReactiveFlags.RecursedCheck;
|
|
441
|
+
purgeDeps(effectObj);
|
|
430
442
|
}
|
|
431
443
|
};
|
|
432
444
|
const effectObj = {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
445
|
+
deps: undefined,
|
|
446
|
+
depsTail: undefined,
|
|
447
|
+
subs: undefined,
|
|
448
|
+
subsTail: undefined,
|
|
449
|
+
flags: ReactiveFlags.Watching | ReactiveFlags.RecursedCheck,
|
|
436
450
|
notify() {
|
|
437
|
-
const flags = this.
|
|
438
|
-
if (flags &
|
|
451
|
+
const flags = this.flags;
|
|
452
|
+
if (flags & ReactiveFlags.Dirty || flags & ReactiveFlags.Pending && checkDirty(this.deps, this)) {
|
|
439
453
|
run();
|
|
440
|
-
} else
|
|
441
|
-
this.
|
|
454
|
+
} else {
|
|
455
|
+
this.flags = ReactiveFlags.Watching;
|
|
442
456
|
}
|
|
443
457
|
},
|
|
444
458
|
stop() {
|
|
445
|
-
|
|
446
|
-
|
|
459
|
+
this.flags = ReactiveFlags.None;
|
|
460
|
+
this.depsTail = undefined;
|
|
461
|
+
purgeDeps(this);
|
|
447
462
|
}
|
|
448
463
|
};
|
|
449
464
|
run();
|
|
@@ -466,6 +481,10 @@ function requireStore1b2fbb72_cjs () {
|
|
|
466
481
|
if (typeListeners) {
|
|
467
482
|
typeListeners.forEach(listener => listener(ev));
|
|
468
483
|
}
|
|
484
|
+
const wildcardListeners = listeners.get('*');
|
|
485
|
+
if (wildcardListeners) {
|
|
486
|
+
wildcardListeners.forEach(listener => listener(ev));
|
|
487
|
+
}
|
|
469
488
|
};
|
|
470
489
|
const transition = logic.transition;
|
|
471
490
|
function receive(event) {
|
|
@@ -730,13 +749,13 @@ function requireStore1b2fbb72_cjs () {
|
|
|
730
749
|
return Math.random().toString(36).slice(6);
|
|
731
750
|
}
|
|
732
751
|
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
return
|
|
752
|
+
store803b8f7d_cjs.createAsyncAtom = createAsyncAtom;
|
|
753
|
+
store803b8f7d_cjs.createAtom = createAtom;
|
|
754
|
+
store803b8f7d_cjs.createStore = createStore;
|
|
755
|
+
store803b8f7d_cjs.createStoreConfig = createStoreConfig;
|
|
756
|
+
store803b8f7d_cjs.createStoreTransition = createStoreTransition;
|
|
757
|
+
store803b8f7d_cjs.createStoreWithProducer = createStoreWithProducer;
|
|
758
|
+
return store803b8f7d_cjs;
|
|
740
759
|
}
|
|
741
760
|
|
|
742
|
-
export {
|
|
761
|
+
export { requireStore803b8f7d_cjs as __require };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __exports as xstateStoreReact_cjs } from '../../../../../../../../_virtual/xstate-store-react.cjs2.js';
|
|
2
2
|
import require$$0 from 'react';
|
|
3
|
-
import { __require as
|
|
3
|
+
import { __require as requireStore803b8f7d_cjs } from '../../dist/store-803b8f7d.cjs.js';
|
|
4
4
|
|
|
5
5
|
var hasRequiredXstateStoreReact_cjs;
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ function requireXstateStoreReact_cjs () {
|
|
|
11
11
|
Object.defineProperty(xstateStoreReact_cjs, '__esModule', { value: true });
|
|
12
12
|
|
|
13
13
|
var react = require$$0;
|
|
14
|
-
var store = /*@__PURE__*/
|
|
14
|
+
var store = /*@__PURE__*/ requireStore803b8f7d_cjs();
|
|
15
15
|
|
|
16
16
|
function defaultCompare(a, b) {
|
|
17
17
|
return a === b;
|
|
@@ -31,6 +31,7 @@ function requireXstateStoreReact_cjs () {
|
|
|
31
31
|
* A React hook that subscribes to the `store` and selects a value from the
|
|
32
32
|
* store's snapshot via a selector function, with an optional compare function.
|
|
33
33
|
*
|
|
34
|
+
* @deprecated Use `useSelector` from `@xstate/store-react` instead.
|
|
34
35
|
* @example
|
|
35
36
|
*
|
|
36
37
|
* ```ts
|
|
@@ -76,6 +77,8 @@ function requireXstateStoreReact_cjs () {
|
|
|
76
77
|
const selectorWithCompare = useSelectorWithCompare(selector, compare);
|
|
77
78
|
return react.useSyncExternalStore(react.useCallback(handleStoreChange => store.subscribe(handleStoreChange).unsubscribe, [store]), () => selectorWithCompare(store.get()), () => selectorWithCompare(store.get()));
|
|
78
79
|
}
|
|
80
|
+
|
|
81
|
+
/** @deprecated Use `useStore` from `@xstate/store-react` instead. */
|
|
79
82
|
const useStore = function useStoreImpl(definition) {
|
|
80
83
|
const storeRef = react.useRef(undefined);
|
|
81
84
|
if (!storeRef.current) {
|
|
@@ -88,6 +91,7 @@ function requireXstateStoreReact_cjs () {
|
|
|
88
91
|
* A React hook that subscribes to the `atom` and returns the current value of
|
|
89
92
|
* the atom.
|
|
90
93
|
*
|
|
94
|
+
* @deprecated Use `useAtom` from `@xstate/store-react` instead.
|
|
91
95
|
* @example
|
|
92
96
|
*
|
|
93
97
|
* ```ts
|
|
@@ -121,6 +125,7 @@ function requireXstateStoreReact_cjs () {
|
|
|
121
125
|
* Creates a custom hook that returns the selected value and the store from a
|
|
122
126
|
* store configuration object.
|
|
123
127
|
*
|
|
128
|
+
* @deprecated Use `createStoreHook` from `@xstate/store-react` instead.
|
|
124
129
|
* @example
|
|
125
130
|
*
|
|
126
131
|
* ```ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __exports as xstateActions_cjs } from '../../../../../../../_virtual/xstate-actions.cjs2.js';
|
|
2
|
-
import { __require as
|
|
3
|
-
import { __require as
|
|
4
|
-
import { __require as
|
|
2
|
+
import { __require as requireAssign6b5249c3_cjs } from '../../dist/assign-6b5249c3.cjs.js';
|
|
3
|
+
import { __require as requireRaiseF23ccfcb_cjs } from '../../dist/raise-f23ccfcb.cjs.js';
|
|
4
|
+
import { __require as requireLogB8ad8428_cjs } from '../../dist/log-b8ad8428.cjs.js';
|
|
5
5
|
import { __require as requireXstateDev_cjs } from '../../dev/dist/xstate-dev.cjs.js';
|
|
6
6
|
|
|
7
7
|
var hasRequiredXstateActions_cjs;
|
|
@@ -12,9 +12,9 @@ function requireXstateActions_cjs () {
|
|
|
12
12
|
|
|
13
13
|
Object.defineProperty(xstateActions_cjs, '__esModule', { value: true });
|
|
14
14
|
|
|
15
|
-
var assign = /*@__PURE__*/
|
|
16
|
-
var guards_dist_xstateGuards = /*@__PURE__*/
|
|
17
|
-
var log = /*@__PURE__*/
|
|
15
|
+
var assign = /*@__PURE__*/ requireAssign6b5249c3_cjs();
|
|
16
|
+
var guards_dist_xstateGuards = /*@__PURE__*/ requireRaiseF23ccfcb_cjs();
|
|
17
|
+
var log = /*@__PURE__*/ requireLogB8ad8428_cjs();
|
|
18
18
|
requireXstateDev_cjs();
|
|
19
19
|
|
|
20
20
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { __exports as
|
|
2
|
-
import { __require as
|
|
1
|
+
import { __exports as assign6b5249c3_cjs } from '../../../../../../_virtual/assign-6b5249c3.cjs.js';
|
|
2
|
+
import { __require as requireRaiseF23ccfcb_cjs } from './raise-f23ccfcb.cjs.js';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var hasRequiredAssign6b5249c3_cjs;
|
|
5
5
|
|
|
6
|
-
function
|
|
7
|
-
if (
|
|
8
|
-
|
|
6
|
+
function requireAssign6b5249c3_cjs () {
|
|
7
|
+
if (hasRequiredAssign6b5249c3_cjs) return assign6b5249c3_cjs;
|
|
8
|
+
hasRequiredAssign6b5249c3_cjs = 1;
|
|
9
9
|
|
|
10
|
-
var guards_dist_xstateGuards = /*@__PURE__*/
|
|
10
|
+
var guards_dist_xstateGuards = /*@__PURE__*/ requireRaiseF23ccfcb_cjs();
|
|
11
11
|
|
|
12
12
|
function createSpawner(actorScope, {
|
|
13
13
|
machine,
|
|
@@ -133,8 +133,8 @@ function requireAssignDea9f7c8_cjs () {
|
|
|
133
133
|
return assign;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
|
|
137
|
-
return
|
|
136
|
+
assign6b5249c3_cjs.assign = assign;
|
|
137
|
+
return assign6b5249c3_cjs;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
export {
|
|
140
|
+
export { requireAssign6b5249c3_cjs as __require };
|