mates-devtools 0.1.0-beta.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/dist/mates-devtools.es.js +3464 -0
- package/dist/mates-devtools.umd.js +650 -0
- package/dist/types/Mates-DevTools/src/MatesDevTools.d.ts +5 -0
- package/dist/types/Mates-DevTools/src/MatesDevTools.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/MatesDevToolsComponent.d.ts +24 -0
- package/dist/types/Mates-DevTools/src/MatesDevToolsComponent.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/components/AtomsViewer.d.ts +2 -0
- package/dist/types/Mates-DevTools/src/components/AtomsViewer.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/components/ComponentInspector.d.ts +27 -0
- package/dist/types/Mates-DevTools/src/components/ComponentInspector.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/components/ComponentList.d.ts +11 -0
- package/dist/types/Mates-DevTools/src/components/ComponentList.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/components/ComponentTree.d.ts +9 -0
- package/dist/types/Mates-DevTools/src/components/ComponentTree.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/components/Header.d.ts +10 -0
- package/dist/types/Mates-DevTools/src/components/Header.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/components/Highlight.d.ts +6 -0
- package/dist/types/Mates-DevTools/src/components/Highlight.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/components/HooksViewer.d.ts +7 -0
- package/dist/types/Mates-DevTools/src/components/HooksViewer.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/components/LogsViewer.d.ts +6 -0
- package/dist/types/Mates-DevTools/src/components/LogsViewer.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/components/PerfViewer.d.ts +7 -0
- package/dist/types/Mates-DevTools/src/components/PerfViewer.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/components/PropsViewer.d.ts +2 -0
- package/dist/types/Mates-DevTools/src/components/PropsViewer.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/components/ScopesViewer.d.ts +2 -0
- package/dist/types/Mates-DevTools/src/components/ScopesViewer.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/components/TimerLogger.d.ts +5 -0
- package/dist/types/Mates-DevTools/src/components/TimerLogger.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/components/UseStateViewer.d.ts +12 -0
- package/dist/types/Mates-DevTools/src/components/UseStateViewer.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/components/ValueTree.d.ts +19 -0
- package/dist/types/Mates-DevTools/src/components/ValueTree.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/index.d.ts +23 -0
- package/dist/types/Mates-DevTools/src/index.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/interceptTimers.d.ts +11 -0
- package/dist/types/Mates-DevTools/src/interceptTimers.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/logStore.d.ts +38 -0
- package/dist/types/Mates-DevTools/src/logStore.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/perfStore.d.ts +36 -0
- package/dist/types/Mates-DevTools/src/perfStore.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/registry.d.ts +68 -0
- package/dist/types/Mates-DevTools/src/registry.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/styles.d.ts +833 -0
- package/dist/types/Mates-DevTools/src/styles.d.ts.map +1 -0
- package/dist/types/Mates-DevTools/src/types.d.ts +19 -0
- package/dist/types/Mates-DevTools/src/types.d.ts.map +1 -0
- package/dist/types/lib/Directives/$.d.ts +371 -0
- package/dist/types/lib/Directives/$.d.ts.map +1 -0
- package/dist/types/lib/Directives/animatedConditional.d.ts +67 -0
- package/dist/types/lib/Directives/animatedConditional.d.ts.map +1 -0
- package/dist/types/lib/Directives/animationClasses.d.ts +50 -0
- package/dist/types/lib/Directives/animationClasses.d.ts.map +1 -0
- package/dist/types/lib/Directives/attrDirective.d.ts +69 -0
- package/dist/types/lib/Directives/attrDirective.d.ts.map +1 -0
- package/dist/types/lib/Directives/classesDirective.d.ts +79 -0
- package/dist/types/lib/Directives/classesDirective.d.ts.map +1 -0
- package/dist/types/lib/Directives/eleHook.d.ts +84 -0
- package/dist/types/lib/Directives/eleHook.d.ts.map +1 -0
- package/dist/types/lib/Directives/eventBinding.d.ts +29 -0
- package/dist/types/lib/Directives/eventBinding.d.ts.map +1 -0
- package/dist/types/lib/Directives/htmlHook.d.ts +101 -0
- package/dist/types/lib/Directives/htmlHook.d.ts.map +1 -0
- package/dist/types/lib/Directives/index.d.ts +18 -0
- package/dist/types/lib/Directives/index.d.ts.map +1 -0
- package/dist/types/lib/Directives/intersectDirective.d.ts +67 -0
- package/dist/types/lib/Directives/intersectDirective.d.ts.map +1 -0
- package/dist/types/lib/Directives/lazyLoadDirective.d.ts +66 -0
- package/dist/types/lib/Directives/lazyLoadDirective.d.ts.map +1 -0
- package/dist/types/lib/Directives/lifecycleDirectives.d.ts +56 -0
- package/dist/types/lib/Directives/lifecycleDirectives.d.ts.map +1 -0
- package/dist/types/lib/Directives/masonryGrid.d.ts +114 -0
- package/dist/types/lib/Directives/masonryGrid.d.ts.map +1 -0
- package/dist/types/lib/Directives/memoTemplate.d.ts +94 -0
- package/dist/types/lib/Directives/memoTemplate.d.ts.map +1 -0
- package/dist/types/lib/Directives/onDirective.d.ts +71 -0
- package/dist/types/lib/Directives/onDirective.d.ts.map +1 -0
- package/dist/types/lib/Directives/onParentDirective.d.ts +34 -0
- package/dist/types/lib/Directives/onParentDirective.d.ts.map +1 -0
- package/dist/types/lib/Directives/renderSwitch.d.ts +55 -0
- package/dist/types/lib/Directives/renderSwitch.d.ts.map +1 -0
- package/dist/types/lib/Directives/resolveAttrValue.d.ts +35 -0
- package/dist/types/lib/Directives/resolveAttrValue.d.ts.map +1 -0
- package/dist/types/lib/Directives/styleDirective.d.ts +81 -0
- package/dist/types/lib/Directives/styleDirective.d.ts.map +1 -0
- package/dist/types/lib/Directives/timerDirective.d.ts +52 -0
- package/dist/types/lib/Directives/timerDirective.d.ts.map +1 -0
- package/dist/types/lib/Directives/virtualHelpers.d.ts +10 -0
- package/dist/types/lib/Directives/virtualHelpers.d.ts.map +1 -0
- package/dist/types/lib/Fetch/ErrorTypes.d.ts +74 -0
- package/dist/types/lib/Fetch/ErrorTypes.d.ts.map +1 -0
- package/dist/types/lib/Fetch/Fetch.d.ts +168 -0
- package/dist/types/lib/Fetch/Fetch.d.ts.map +1 -0
- package/dist/types/lib/Fetch/index.d.ts +3 -0
- package/dist/types/lib/Fetch/index.d.ts.map +1 -0
- package/dist/types/lib/Mutables/Extended Atoms/cacheAtom.d.ts +156 -0
- package/dist/types/lib/Mutables/Extended Atoms/cacheAtom.d.ts.map +1 -0
- package/dist/types/lib/Mutables/Extended Atoms/index.d.ts +4 -0
- package/dist/types/lib/Mutables/Extended Atoms/index.d.ts.map +1 -0
- package/dist/types/lib/Mutables/Extended Atoms/paginationAtom.d.ts +32 -0
- package/dist/types/lib/Mutables/Extended Atoms/paginationAtom.d.ts.map +1 -0
- package/dist/types/lib/Mutables/Extended Atoms/themeAtom.d.ts +59 -0
- package/dist/types/lib/Mutables/Extended Atoms/themeAtom.d.ts.map +1 -0
- package/dist/types/lib/Mutables/atom/atom.d.ts +148 -0
- package/dist/types/lib/Mutables/atom/atom.d.ts.map +1 -0
- package/dist/types/lib/Mutables/atom/createTimedAtom.d.ts +43 -0
- package/dist/types/lib/Mutables/atom/createTimedAtom.d.ts.map +1 -0
- package/dist/types/lib/Mutables/atom/debouncedAtom.d.ts +37 -0
- package/dist/types/lib/Mutables/atom/debouncedAtom.d.ts.map +1 -0
- package/dist/types/lib/Mutables/atom/index.d.ts +10 -0
- package/dist/types/lib/Mutables/atom/index.d.ts.map +1 -0
- package/dist/types/lib/Mutables/atom/mapAtom.d.ts +105 -0
- package/dist/types/lib/Mutables/atom/mapAtom.d.ts.map +1 -0
- package/dist/types/lib/Mutables/atom/setAtom.d.ts +107 -0
- package/dist/types/lib/Mutables/atom/setAtom.d.ts.map +1 -0
- package/dist/types/lib/Mutables/atom/storageAtom.d.ts +44 -0
- package/dist/types/lib/Mutables/atom/storageAtom.d.ts.map +1 -0
- package/dist/types/lib/Mutables/atom/throttledAtom.d.ts +37 -0
- package/dist/types/lib/Mutables/atom/throttledAtom.d.ts.map +1 -0
- package/dist/types/lib/Mutables/atom/titleAtom.d.ts +20 -0
- package/dist/types/lib/Mutables/atom/titleAtom.d.ts.map +1 -0
- package/dist/types/lib/Mutables/effect/effect.d.ts +31 -0
- package/dist/types/lib/Mutables/effect/effect.d.ts.map +1 -0
- package/dist/types/lib/Mutables/effect/index.d.ts +2 -0
- package/dist/types/lib/Mutables/effect/index.d.ts.map +1 -0
- package/dist/types/lib/Mutables/events/events.d.ts +123 -0
- package/dist/types/lib/Mutables/events/events.d.ts.map +1 -0
- package/dist/types/lib/Mutables/events/index.d.ts +2 -0
- package/dist/types/lib/Mutables/events/index.d.ts.map +1 -0
- package/dist/types/lib/Mutables/events/xTabEvent.d.ts +61 -0
- package/dist/types/lib/Mutables/events/xTabEvent.d.ts.map +1 -0
- package/dist/types/lib/Mutables/form/formAtom.d.ts +56 -0
- package/dist/types/lib/Mutables/form/formAtom.d.ts.map +1 -0
- package/dist/types/lib/Mutables/form/index.d.ts +5 -0
- package/dist/types/lib/Mutables/form/index.d.ts.map +1 -0
- package/dist/types/lib/Mutables/form/transformers.d.ts +4 -0
- package/dist/types/lib/Mutables/form/transformers.d.ts.map +1 -0
- package/dist/types/lib/Mutables/form/validateAll.d.ts +40 -0
- package/dist/types/lib/Mutables/form/validateAll.d.ts.map +1 -0
- package/dist/types/lib/Mutables/form/validators.d.ts +61 -0
- package/dist/types/lib/Mutables/form/validators.d.ts.map +1 -0
- package/dist/types/lib/Mutables/index.d.ts +13 -0
- package/dist/types/lib/Mutables/index.d.ts.map +1 -0
- package/dist/types/lib/Mutables/memo/index.d.ts +2 -0
- package/dist/types/lib/Mutables/memo/index.d.ts.map +1 -0
- package/dist/types/lib/Mutables/memo/memo.d.ts +47 -0
- package/dist/types/lib/Mutables/memo/memo.d.ts.map +1 -0
- package/dist/types/lib/Mutables/reactiveRunner/index.d.ts +4 -0
- package/dist/types/lib/Mutables/reactiveRunner/index.d.ts.map +1 -0
- package/dist/types/lib/Mutables/reactiveRunner/reactiveRunner.d.ts +56 -0
- package/dist/types/lib/Mutables/reactiveRunner/reactiveRunner.d.ts.map +1 -0
- package/dist/types/lib/Mutables/reactiveRunner/trackAndSubscribe.d.ts +6 -0
- package/dist/types/lib/Mutables/reactiveRunner/trackAndSubscribe.d.ts.map +1 -0
- package/dist/types/lib/Mutables/reactiveRunner/validateReactiveFunction.d.ts +6 -0
- package/dist/types/lib/Mutables/reactiveRunner/validateReactiveFunction.d.ts.map +1 -0
- package/dist/types/lib/Mutables/ref/index.d.ts +2 -0
- package/dist/types/lib/Mutables/ref/index.d.ts.map +1 -0
- package/dist/types/lib/Mutables/ref/ref.d.ts +74 -0
- package/dist/types/lib/Mutables/ref/ref.d.ts.map +1 -0
- package/dist/types/lib/Mutables/scope/index.d.ts +2 -0
- package/dist/types/lib/Mutables/scope/index.d.ts.map +1 -0
- package/dist/types/lib/Mutables/scope/scope.d.ts +60 -0
- package/dist/types/lib/Mutables/scope/scope.d.ts.map +1 -0
- package/dist/types/lib/Mutables/store/index.d.ts +2 -0
- package/dist/types/lib/Mutables/store/index.d.ts.map +1 -0
- package/dist/types/lib/Mutables/store/store.d.ts +73 -0
- package/dist/types/lib/Mutables/store/store.d.ts.map +1 -0
- package/dist/types/lib/Mutables/useState/index.d.ts +2 -0
- package/dist/types/lib/Mutables/useState/index.d.ts.map +1 -0
- package/dist/types/lib/Mutables/useState/useState.d.ts +54 -0
- package/dist/types/lib/Mutables/useState/useState.d.ts.map +1 -0
- package/dist/types/lib/Mutables/useStore/hostContext.d.ts +13 -0
- package/dist/types/lib/Mutables/useStore/hostContext.d.ts.map +1 -0
- package/dist/types/lib/Mutables/useStore/index.d.ts +9 -0
- package/dist/types/lib/Mutables/useStore/index.d.ts.map +1 -0
- package/dist/types/lib/Mutables/useStore/lifecycle.d.ts +94 -0
- package/dist/types/lib/Mutables/useStore/lifecycle.d.ts.map +1 -0
- package/dist/types/lib/Mutables/useStore/onError.d.ts +21 -0
- package/dist/types/lib/Mutables/useStore/onError.d.ts.map +1 -0
- package/dist/types/lib/Mutables/useStore/onReferenceChange.d.ts +2 -0
- package/dist/types/lib/Mutables/useStore/onReferenceChange.d.ts.map +1 -0
- package/dist/types/lib/Mutables/useStore/safetyCheck.d.ts +2 -0
- package/dist/types/lib/Mutables/useStore/safetyCheck.d.ts.map +1 -0
- package/dist/types/lib/Mutables/useStore/setter.d.ts +52 -0
- package/dist/types/lib/Mutables/useStore/setter.d.ts.map +1 -0
- package/dist/types/lib/Mutables/useStore/subscription.d.ts +50 -0
- package/dist/types/lib/Mutables/useStore/subscription.d.ts.map +1 -0
- package/dist/types/lib/Mutables/useStore/useContext.d.ts +3 -0
- package/dist/types/lib/Mutables/useStore/useContext.d.ts.map +1 -0
- package/dist/types/lib/Mutables/useStore/useStore.d.ts +7 -0
- package/dist/types/lib/Mutables/useStore/useStore.d.ts.map +1 -0
- package/dist/types/lib/Router/Router.d.ts +54 -0
- package/dist/types/lib/Router/Router.d.ts.map +1 -0
- package/dist/types/lib/Router/animatedRouter.d.ts +48 -0
- package/dist/types/lib/Router/animatedRouter.d.ts.map +1 -0
- package/dist/types/lib/Router/buildPath.d.ts +20 -0
- package/dist/types/lib/Router/buildPath.d.ts.map +1 -0
- package/dist/types/lib/Router/hashAtom.d.ts +12 -0
- package/dist/types/lib/Router/hashAtom.d.ts.map +1 -0
- package/dist/types/lib/Router/index.d.ts +11 -0
- package/dist/types/lib/Router/index.d.ts.map +1 -0
- package/dist/types/lib/Router/isPathMatching.d.ts +12 -0
- package/dist/types/lib/Router/isPathMatching.d.ts.map +1 -0
- package/dist/types/lib/Router/location.d.ts +74 -0
- package/dist/types/lib/Router/location.d.ts.map +1 -0
- package/dist/types/lib/Router/navigateTo.d.ts +31 -0
- package/dist/types/lib/Router/navigateTo.d.ts.map +1 -0
- package/dist/types/lib/Router/navigationLock.d.ts +50 -0
- package/dist/types/lib/Router/navigationLock.d.ts.map +1 -0
- package/dist/types/lib/Router/pathAtom.d.ts +42 -0
- package/dist/types/lib/Router/pathAtom.d.ts.map +1 -0
- package/dist/types/lib/Router/pathResolver.d.ts +9 -0
- package/dist/types/lib/Router/pathResolver.d.ts.map +1 -0
- package/dist/types/lib/Router/qsAtom.d.ts +12 -0
- package/dist/types/lib/Router/qsAtom.d.ts.map +1 -0
- package/dist/types/lib/Template/index.d.ts +6 -0
- package/dist/types/lib/Template/index.d.ts.map +1 -0
- package/dist/types/lib/Template/scheduler.d.ts +59 -0
- package/dist/types/lib/Template/scheduler.d.ts.map +1 -0
- package/dist/types/lib/Template/x-x.d.ts +60 -0
- package/dist/types/lib/Template/x-x.d.ts.map +1 -0
- package/dist/types/lib/Template/x-x.types.d.ts +91 -0
- package/dist/types/lib/Template/x-x.types.d.ts.map +1 -0
- package/dist/types/lib/Template/x-x.utils.d.ts +15 -0
- package/dist/types/lib/Template/x-x.utils.d.ts.map +1 -0
- package/dist/types/lib/Template/x.d.ts +5 -0
- package/dist/types/lib/Template/x.d.ts.map +1 -0
- package/dist/types/lib/Template/xProvider.d.ts +2 -0
- package/dist/types/lib/Template/xProvider.d.ts.map +1 -0
- package/dist/types/lib/Timers/createManagedTimer.d.ts +12 -0
- package/dist/types/lib/Timers/createManagedTimer.d.ts.map +1 -0
- package/dist/types/lib/Timers/index.d.ts +4 -0
- package/dist/types/lib/Timers/index.d.ts.map +1 -0
- package/dist/types/lib/Timers/interval.d.ts +2 -0
- package/dist/types/lib/Timers/interval.d.ts.map +1 -0
- package/dist/types/lib/Timers/timeout.d.ts +2 -0
- package/dist/types/lib/Timers/timeout.d.ts.map +1 -0
- package/dist/types/lib/TrackState/componentStatus.d.ts +105 -0
- package/dist/types/lib/TrackState/componentStatus.d.ts.map +1 -0
- package/dist/types/lib/TrackState/readTracking.d.ts +20 -0
- package/dist/types/lib/TrackState/readTracking.d.ts.map +1 -0
- package/dist/types/lib/Utils/Context.d.ts +6 -0
- package/dist/types/lib/Utils/Context.d.ts.map +1 -0
- package/dist/types/lib/Utils/Date/calendar.d.ts +30 -0
- package/dist/types/lib/Utils/Date/calendar.d.ts.map +1 -0
- package/dist/types/lib/Utils/Date/core.d.ts +29 -0
- package/dist/types/lib/Utils/Date/core.d.ts.map +1 -0
- package/dist/types/lib/Utils/Date/date.d.ts +60 -0
- package/dist/types/lib/Utils/Date/date.d.ts.map +1 -0
- package/dist/types/lib/Utils/Date/index.d.ts +3 -0
- package/dist/types/lib/Utils/Date/index.d.ts.map +1 -0
- package/dist/types/lib/Utils/deepClone.d.ts +7 -0
- package/dist/types/lib/Utils/deepClone.d.ts.map +1 -0
- package/dist/types/lib/Utils/deepFreeze.d.ts +2 -0
- package/dist/types/lib/Utils/deepFreeze.d.ts.map +1 -0
- package/dist/types/lib/Utils/getAllProps.d.ts +2 -0
- package/dist/types/lib/Utils/getAllProps.d.ts.map +1 -0
- package/dist/types/lib/Utils/helpers.d.ts +13 -0
- package/dist/types/lib/Utils/helpers.d.ts.map +1 -0
- package/dist/types/lib/Utils/index.d.ts +13 -0
- package/dist/types/lib/Utils/index.d.ts.map +1 -0
- package/dist/types/lib/Utils/is.d.ts +12 -0
- package/dist/types/lib/Utils/is.d.ts.map +1 -0
- package/dist/types/lib/Utils/isDefinedAsGetter.d.ts +2 -0
- package/dist/types/lib/Utils/isDefinedAsGetter.d.ts.map +1 -0
- package/dist/types/lib/Utils/logger.d.ts +22 -0
- package/dist/types/lib/Utils/logger.d.ts.map +1 -0
- package/dist/types/lib/Utils/notificationManager.d.ts +67 -0
- package/dist/types/lib/Utils/notificationManager.d.ts.map +1 -0
- package/dist/types/lib/Utils/registerCleanup.d.ts +7 -0
- package/dist/types/lib/Utils/registerCleanup.d.ts.map +1 -0
- package/dist/types/lib/Utils/svgIcon.d.ts +95 -0
- package/dist/types/lib/Utils/svgIcon.d.ts.map +1 -0
- package/dist/types/lib/Utils/uuid.d.ts +7 -0
- package/dist/types/lib/Utils/uuid.d.ts.map +1 -0
- package/dist/types/lib/ZeroPromise/index.d.ts +2 -0
- package/dist/types/lib/ZeroPromise/index.d.ts.map +1 -0
- package/dist/types/lib/ZeroPromise/zero.d.ts +23 -0
- package/dist/types/lib/ZeroPromise/zero.d.ts.map +1 -0
- package/dist/types/lib/actions/action.d.ts +14 -0
- package/dist/types/lib/actions/action.d.ts.map +1 -0
- package/dist/types/lib/actions/animatePresets.d.ts +38 -0
- package/dist/types/lib/actions/animatePresets.d.ts.map +1 -0
- package/dist/types/lib/actions/animateSwap.d.ts +79 -0
- package/dist/types/lib/actions/animateSwap.d.ts.map +1 -0
- package/dist/types/lib/actions/animateTypes.d.ts +103 -0
- package/dist/types/lib/actions/animateTypes.d.ts.map +1 -0
- package/dist/types/lib/actions/asyncAction.d.ts +4 -0
- package/dist/types/lib/actions/asyncAction.d.ts.map +1 -0
- package/dist/types/lib/actions/asyncActionCache.d.ts +16 -0
- package/dist/types/lib/actions/asyncActionCache.d.ts.map +1 -0
- package/dist/types/lib/actions/asyncActionPolling.d.ts +14 -0
- package/dist/types/lib/actions/asyncActionPolling.d.ts.map +1 -0
- package/dist/types/lib/actions/asyncActionTypes.d.ts +74 -0
- package/dist/types/lib/actions/asyncActionTypes.d.ts.map +1 -0
- package/dist/types/lib/actions/createTimingFunction.d.ts +23 -0
- package/dist/types/lib/actions/createTimingFunction.d.ts.map +1 -0
- package/dist/types/lib/actions/debounce.d.ts +10 -0
- package/dist/types/lib/actions/debounce.d.ts.map +1 -0
- package/dist/types/lib/actions/index.d.ts +12 -0
- package/dist/types/lib/actions/index.d.ts.map +1 -0
- package/dist/types/lib/actions/paginatedAsyncAction.d.ts +121 -0
- package/dist/types/lib/actions/paginatedAsyncAction.d.ts.map +1 -0
- package/dist/types/lib/actions/taskAction.d.ts +105 -0
- package/dist/types/lib/actions/taskAction.d.ts.map +1 -0
- package/dist/types/lib/actions/throttle.d.ts +9 -0
- package/dist/types/lib/actions/throttle.d.ts.map +1 -0
- package/dist/types/lib/css-in-js/cl.d.ts +37 -0
- package/dist/types/lib/css-in-js/cl.d.ts.map +1 -0
- package/dist/types/lib/css-in-js/index.d.ts +7 -0
- package/dist/types/lib/css-in-js/index.d.ts.map +1 -0
- package/dist/types/lib/css-in-js/sanitize.d.ts +31 -0
- package/dist/types/lib/css-in-js/sanitize.d.ts.map +1 -0
- package/dist/types/lib/css-in-js/serialize.d.ts +98 -0
- package/dist/types/lib/css-in-js/serialize.d.ts.map +1 -0
- package/dist/types/lib/css-in-js/stylesheet.d.ts +188 -0
- package/dist/types/lib/css-in-js/stylesheet.d.ts.map +1 -0
- package/dist/types/lib/css-in-js/theme.d.ts +110 -0
- package/dist/types/lib/css-in-js/theme.d.ts.map +1 -0
- package/dist/types/lib/devtools/devtoolsHooks.d.ts +101 -0
- package/dist/types/lib/devtools/devtoolsHooks.d.ts.map +1 -0
- package/dist/types/lib/devtools/index.d.ts +2 -0
- package/dist/types/lib/devtools/index.d.ts.map +1 -0
- package/dist/types/lib/index.d.ts +46 -0
- package/dist/types/lib/index.d.ts.map +1 -0
- package/dist/types/lib/on/hooks.d.ts +319 -0
- package/dist/types/lib/on/hooks.d.ts.map +1 -0
- package/dist/types/lib/on/index.d.ts +3 -0
- package/dist/types/lib/on/index.d.ts.map +1 -0
- package/dist/types/lib/on/on.d.ts +16 -0
- package/dist/types/lib/on/on.d.ts.map +1 -0
- package/dist/types/lib/portals/dialog.d.ts +56 -0
- package/dist/types/lib/portals/dialog.d.ts.map +1 -0
- package/dist/types/lib/portals/index.d.ts +9 -0
- package/dist/types/lib/portals/index.d.ts.map +1 -0
- package/dist/types/lib/portals/popup.d.ts +37 -0
- package/dist/types/lib/portals/popup.d.ts.map +1 -0
- package/dist/types/lib/portals/portal.d.ts +57 -0
- package/dist/types/lib/portals/portal.d.ts.map +1 -0
- package/dist/types/lib/portals/tip.d.ts +38 -0
- package/dist/types/lib/portals/tip.d.ts.map +1 -0
- package/dist/types/lib/socket/index.d.ts +2 -0
- package/dist/types/lib/socket/index.d.ts.map +1 -0
- package/dist/types/lib/socket/ws.d.ts +83 -0
- package/dist/types/lib/socket/ws.d.ts.map +1 -0
- package/dist/types/lib/ssr/index.d.ts +3 -0
- package/dist/types/lib/ssr/index.d.ts.map +1 -0
- package/dist/types/lib/ssr/ssr-bridge.d.ts +89 -0
- package/dist/types/lib/ssr/ssr-bridge.d.ts.map +1 -0
- package/dist/types/lib/ssr/ssrFlag.d.ts +38 -0
- package/dist/types/lib/ssr/ssrFlag.d.ts.map +1 -0
- package/dist/types/lib/virtualizer/ScrollerController.d.ts +54 -0
- package/dist/types/lib/virtualizer/ScrollerController.d.ts.map +1 -0
- package/dist/types/lib/virtualizer/Virtualizer.d.ts +214 -0
- package/dist/types/lib/virtualizer/Virtualizer.d.ts.map +1 -0
- package/dist/types/lib/virtualizer/events.d.ts +27 -0
- package/dist/types/lib/virtualizer/events.d.ts.map +1 -0
- package/dist/types/lib/virtualizer/layouts/flow.d.ts +123 -0
- package/dist/types/lib/virtualizer/layouts/flow.d.ts.map +1 -0
- package/dist/types/lib/virtualizer/layouts/grid.d.ts +25 -0
- package/dist/types/lib/virtualizer/layouts/grid.d.ts.map +1 -0
- package/dist/types/lib/virtualizer/layouts/masonry.d.ts +37 -0
- package/dist/types/lib/virtualizer/layouts/masonry.d.ts.map +1 -0
- package/dist/types/lib/virtualizer/layouts/shared/BaseLayout.d.ts +204 -0
- package/dist/types/lib/virtualizer/layouts/shared/BaseLayout.d.ts.map +1 -0
- package/dist/types/lib/virtualizer/layouts/shared/GridBaseLayout.d.ts +41 -0
- package/dist/types/lib/virtualizer/layouts/shared/GridBaseLayout.d.ts.map +1 -0
- package/dist/types/lib/virtualizer/layouts/shared/Layout.d.ts +138 -0
- package/dist/types/lib/virtualizer/layouts/shared/Layout.d.ts.map +1 -0
- package/dist/types/lib/virtualizer/layouts/shared/SizeCache.d.ts +19 -0
- package/dist/types/lib/virtualizer/layouts/shared/SizeCache.d.ts.map +1 -0
- package/dist/types/lib/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.d.ts +57 -0
- package/dist/types/lib/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.d.ts.map +1 -0
- package/dist/types/lib/virtualizer/mates-adapter.d.ts +201 -0
- package/dist/types/lib/virtualizer/mates-adapter.d.ts.map +1 -0
- package/dist/types/lib/virtualizer/virtualize.d.ts +52 -0
- package/dist/types/lib/virtualizer/virtualize.d.ts.map +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
type TState<T> = [T, (fn: () => void) => void];
|
|
2
|
+
/**
|
|
3
|
+
* Creates local component-level reactive state from a plain object.
|
|
4
|
+
*
|
|
5
|
+
* - Must be called inside a component function (restricted context check via `atom()`).
|
|
6
|
+
* - Returns `[wrapper, update]` where:
|
|
7
|
+
* - `wrapper` is a read-tracked proxy built by `wrapStateFunctions` — reads on data
|
|
8
|
+
* properties automatically subscribe the component (or any enclosing `memo`/`effect`)
|
|
9
|
+
* to re-run when the state changes.
|
|
10
|
+
* - `update` is `a.update` — the raw handle for batched external mutations.
|
|
11
|
+
* - Methods defined on the state object are automatically wrapped to call `a.update()`
|
|
12
|
+
* internally, so calling a method (e.g. `state.incr()`) triggers reactivity without
|
|
13
|
+
* needing to call `update()` manually.
|
|
14
|
+
* - Direct property assignment on `wrapper` also triggers reactivity:
|
|
15
|
+
* `wrapper.count = 5` is equivalent to `update(s => { s.count = 5; })`.
|
|
16
|
+
* - The state instance is registered on `host._useStates` for devtools inspection.
|
|
17
|
+
*
|
|
18
|
+
* @param stateObj - A plain object (with optional methods and getters) that defines
|
|
19
|
+
* the initial state shape.
|
|
20
|
+
* @returns A tuple `[wrapper, update]`.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // 1. Using update() explicitly with inline mutations:
|
|
24
|
+
* const counter = (props: PropsType<{}>) => {
|
|
25
|
+
* const [state, update] = useState({ count: 0 });
|
|
26
|
+
*
|
|
27
|
+
* return html`
|
|
28
|
+
* <div>
|
|
29
|
+
* <p>Count: ${state.count}</p>
|
|
30
|
+
* <button @click=${() => update(() => { state.count++; })}>+</button>
|
|
31
|
+
* </div>
|
|
32
|
+
* `;
|
|
33
|
+
* };
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* // 2. Using methods on the state object (no explicit update() needed):
|
|
37
|
+
* const counter = (props: PropsType<{}>) => {
|
|
38
|
+
* const [state] = useState({
|
|
39
|
+
* count: 0,
|
|
40
|
+
* incr() { this.count++; },
|
|
41
|
+
* get doubled() { return this.count * 2; },
|
|
42
|
+
* });
|
|
43
|
+
*
|
|
44
|
+
* return html`
|
|
45
|
+
* <div>
|
|
46
|
+
* <p>Count: ${state.count} (doubled: ${state.doubled})</p>
|
|
47
|
+
* <button @click=${state.incr}>+</button>
|
|
48
|
+
* </div>
|
|
49
|
+
* `;
|
|
50
|
+
* };
|
|
51
|
+
*/
|
|
52
|
+
export declare const useState: <T extends object>(stateObj: T) => TState<T>;
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=useState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useState.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/useState/useState.ts"],"names":[],"mappings":"AAIA,KAAK,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,MAAM,EAAE,UAAU,CAAC,KAAG,MAAM,CAAC,CAAC,CAehE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HostElement } from "../../Template/x-x.types";
|
|
2
|
+
export declare function withHost(host: HostElement, renderFn: (...args: any[]) => any): any;
|
|
3
|
+
/**
|
|
4
|
+
* Get the current host element (XX custom element instance)
|
|
5
|
+
*
|
|
6
|
+
* Returns the XX custom element instance with all its runtime properties
|
|
7
|
+
* including _setupStack, _setupIndex, state, cleanups, scopes, etc.
|
|
8
|
+
*
|
|
9
|
+
* @param throwError - Whether to throw an error if no host is found (default: true)
|
|
10
|
+
* @returns The current host element, or null if not found and throwError is false
|
|
11
|
+
*/
|
|
12
|
+
export declare function getCurrentHost(throwError?: boolean): HostElement | null;
|
|
13
|
+
//# sourceMappingURL=hostContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hostContext.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/useStore/hostContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAI5D,wBAAgB,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,OAS5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,UAAU,CAAC,EAAE,OAAO,GAAG,WAAW,GAAG,IAAI,CASvE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./hostContext";
|
|
2
|
+
export * from "./lifecycle";
|
|
3
|
+
export * from "./onError";
|
|
4
|
+
export * from "./onReferenceChange";
|
|
5
|
+
export * from "./safetyCheck";
|
|
6
|
+
export * from "./setter";
|
|
7
|
+
export * from "./subscription";
|
|
8
|
+
export * from "./useContext";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/useStore/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
type CleanupFn = () => void;
|
|
2
|
+
type MountFn = (() => CleanupFn | undefined | void) | (() => Promise<void>);
|
|
3
|
+
/**
|
|
4
|
+
* Runs `fn` once after the component's DOM is attached and ready
|
|
5
|
+
* (fires on the internal `DOMReadyEvent`).
|
|
6
|
+
*
|
|
7
|
+
* Accepts both sync and async functions.
|
|
8
|
+
*
|
|
9
|
+
* **Sync behaviour:**
|
|
10
|
+
* `fn` runs after the component's DOM is ready. If `fn` returns a function,
|
|
11
|
+
* that function is registered as a cleanup and called when the component unmounts.
|
|
12
|
+
*
|
|
13
|
+
* **Async behaviour — client:**
|
|
14
|
+
* `fn` is called after `DOMReadyEvent` fires (same timing as sync).
|
|
15
|
+
* State updates inside `fn` trigger reactive re-renders normally.
|
|
16
|
+
* Cleanup return values are not supported for async functions (a `Promise`
|
|
17
|
+
* is returned, not a `CleanupFn`).
|
|
18
|
+
*
|
|
19
|
+
* **Async behaviour — SSR:**
|
|
20
|
+
* `DOMReadyEvent` is a no-op on the server's fake host, so async functions
|
|
21
|
+
* would otherwise never run. Instead, when `isSSR()` is `true`, async functions
|
|
22
|
+
* are pushed onto `host._asyncMountQueue`. The renderer drains this queue
|
|
23
|
+
* (`await Promise.all`) **before** calling the template function, so by the
|
|
24
|
+
* time the HTML is serialized the state is already populated.
|
|
25
|
+
* Sync functions are silently ignored on the server (same as before —
|
|
26
|
+
* `DOMReadyEvent.__subscribe` is a no-op on the fake host).
|
|
27
|
+
*
|
|
28
|
+
* Must be called in the component outer function (guarded by `safetyCheck`).
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* // Sync — return a cleanup function to run on unmount:
|
|
32
|
+
* onMount(() => {
|
|
33
|
+
* console.log("component mounted");
|
|
34
|
+
* return () => console.log("component unmounted");
|
|
35
|
+
* });
|
|
36
|
+
*
|
|
37
|
+
* // Async — no cleanup return value supported:
|
|
38
|
+
* onMount(async () => {
|
|
39
|
+
* const data = await fetch("/api/init").then(r => r.json());
|
|
40
|
+
* myAtom.set(data);
|
|
41
|
+
* });
|
|
42
|
+
*/
|
|
43
|
+
export declare const onMount: (fn: MountFn) => void;
|
|
44
|
+
/**
|
|
45
|
+
* Runs `fn` after each paint of the current component and all its children,
|
|
46
|
+
* during both the initial mount and every subsequent update cycle.
|
|
47
|
+
*
|
|
48
|
+
* If `fn` returns a function, that function is registered as a cleanup and
|
|
49
|
+
* called before the next paint or when the component unmounts.
|
|
50
|
+
*
|
|
51
|
+
* Must be called in the component outer function (guarded by `safetyCheck`).
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* onPaint(() => {
|
|
55
|
+
* console.log("painted");
|
|
56
|
+
* return () => console.log("paint cleanup");
|
|
57
|
+
* });
|
|
58
|
+
*/
|
|
59
|
+
export declare const onPaint: (fn: () => CleanupFn | undefined) => void;
|
|
60
|
+
/**
|
|
61
|
+
* Runs `fn` once, after the current component **and all its children** have
|
|
62
|
+
* mounted, before the next paint.
|
|
63
|
+
*
|
|
64
|
+
* Uses `globalScheduler.onceIdle` — `fn` fires when the scheduler becomes idle,
|
|
65
|
+
* guaranteeing that the entire component subtree is fully mounted.
|
|
66
|
+
*
|
|
67
|
+
* If `fn` returns a function, that function is registered as a cleanup and
|
|
68
|
+
* called when the component unmounts.
|
|
69
|
+
*
|
|
70
|
+
* Must be called in the component outer function (guarded by `safetyCheck`).
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* onAllMount(() => {
|
|
74
|
+
* console.log("current component and all children are mounted");
|
|
75
|
+
* });
|
|
76
|
+
*/
|
|
77
|
+
export declare const onAllMount: (fn: () => CleanupFn | undefined) => void;
|
|
78
|
+
/**
|
|
79
|
+
* Registers `fn` to run when the component is unmounted (removed from the DOM).
|
|
80
|
+
*
|
|
81
|
+
* Equivalent to returning a cleanup function from `onMount`, but can be called
|
|
82
|
+
* independently at any point in the component outer function.
|
|
83
|
+
*
|
|
84
|
+
* Must be called in the component outer function (guarded by `safetyCheck`).
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* onCleanup(() => {
|
|
88
|
+
* console.log("component unmounted — cleaning up");
|
|
89
|
+
* subscription.unsubscribe();
|
|
90
|
+
* });
|
|
91
|
+
*/
|
|
92
|
+
export declare const onCleanup: (fn: () => void) => void;
|
|
93
|
+
export {};
|
|
94
|
+
//# sourceMappingURL=lifecycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/useStore/lifecycle.ts"],"names":[],"mappings":"AAKA,KAAK,SAAS,GAAG,MAAM,IAAI,CAAC;AAC5B,KAAK,OAAO,GAAG,CAAC,MAAM,SAAS,GAAG,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AAI5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,OAAO,GAAI,IAAI,OAAO,SAwClC,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,OAAO,GAAI,IAAI,MAAM,SAAS,GAAG,SAAS,SAStD,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,UAAU,GAAI,IAAI,MAAM,SAAS,GAAG,SAAS,SAazD,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,SAAS,GAAI,IAAI,MAAM,IAAI,SAKvC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register an error handler for the current component.
|
|
3
|
+
*
|
|
4
|
+
* Called in the outer function. When the component's outer function or
|
|
5
|
+
* template function throws during render, every registered handler
|
|
6
|
+
* receives the error object. The handler does not return anything —
|
|
7
|
+
* the component renders nothing in production or a dev error message
|
|
8
|
+
* in development.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const MyComponent: ComponentFn<{}> = () => {
|
|
13
|
+
* onError((error) => {
|
|
14
|
+
* reportToSentry(error);
|
|
15
|
+
* });
|
|
16
|
+
* return () => html`<div>${riskyStuff()}</div>`;
|
|
17
|
+
* };
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare const onError: (fn: (error: unknown) => void) => void;
|
|
21
|
+
//# sourceMappingURL=onError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onError.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/useStore/onError.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,OAAO,GAAI,IAAI,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,SAKnD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onReferenceChange.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/useStore/onReferenceChange.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM,IAAI,EAAE,MAAM,MAAM,GAAG,EAAE,SAgBtE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safetyCheck.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/useStore/safetyCheck.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,YASvB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { SetterReturnType } from "./subscription";
|
|
2
|
+
/**
|
|
3
|
+
* Wraps a function in a reactive setter that, when called:
|
|
4
|
+
* 1. Invokes the underlying function `fn` with any forwarded arguments.
|
|
5
|
+
* 2. Notifies all subscribers (scheduled via `effectScheduler`).
|
|
6
|
+
* 3. Schedules the host component for re-render (via `globalScheduler`).
|
|
7
|
+
*
|
|
8
|
+
* **Allowed call sites** — must be called in one of:
|
|
9
|
+
* - A component outer function
|
|
10
|
+
* - A `scope` class body (as a class property)
|
|
11
|
+
* - `useState`
|
|
12
|
+
* - A `view` component's outer function
|
|
13
|
+
*
|
|
14
|
+
* Cannot be created inside a template function (restricted context guard) or
|
|
15
|
+
* inside a `setup()` method.
|
|
16
|
+
*
|
|
17
|
+
* @param fn - The function to wrap. Its signature is preserved when the setter
|
|
18
|
+
* is invoked.
|
|
19
|
+
* @param doSafetyCheck - When `true` (default), enforces the call-site guard
|
|
20
|
+
* and the `setup()` restriction. Pass `false` only in advanced / internal
|
|
21
|
+
* scenarios where the guard is intentionally bypassed.
|
|
22
|
+
* @returns A callable `SetterReturnType` that forwards calls to `fn` and
|
|
23
|
+
* exposes the following extra members:
|
|
24
|
+
* - `__subscribe(fn)` — registers a zero-argument callback that fires
|
|
25
|
+
* (via `effectScheduler`) every time the setter is called; returns an
|
|
26
|
+
* unsubscribe function.
|
|
27
|
+
* - `__version__` — read-only numeric version counter (currently always `0`;
|
|
28
|
+
* reserved for future change-detection use).
|
|
29
|
+
* - `__isSetter___` — `true`; type/identity discriminator.
|
|
30
|
+
* - `set(newFn)` — swaps the underlying function without replacing the
|
|
31
|
+
* setter reference; useful for hot-reloading or derived setters.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* // Inside a component outer function or scope class:
|
|
36
|
+
* const count = atom(0);
|
|
37
|
+
* const incr = setter(() => count.set(count() + 1));
|
|
38
|
+
*
|
|
39
|
+
* incr(); // calls fn, notifies subscribers, schedules re-render
|
|
40
|
+
* incr.__subscribe(() => console.log("incr called")); // fires on every call
|
|
41
|
+
* incr.__isSetter___; // true
|
|
42
|
+
* incr.set(() => count.set(count() + 10)); // swap underlying fn
|
|
43
|
+
*
|
|
44
|
+
* // $ and _ are identical aliases:
|
|
45
|
+
* const decr = $(() => count.set(count() - 1));
|
|
46
|
+
* const reset = _(() => count.set(0));
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare const setter: <T extends (...args: any[]) => any>(fn: T, doSafetyCheck?: boolean) => SetterReturnType<Function>;
|
|
50
|
+
export declare const $: <T extends (...args: any[]) => any>(fn: T, doSafetyCheck?: boolean) => SetterReturnType<Function>;
|
|
51
|
+
export declare const _: <T extends (...args: any[]) => any>(fn: T, doSafetyCheck?: boolean) => SetterReturnType<Function>;
|
|
52
|
+
//# sourceMappingURL=setter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setter.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/useStore/setter.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACtD,IAAI,CAAC,EACL,gBAAe,OAAc,KAC5B,gBAAgB,CAAC,QAAQ,CAoD3B,CAAC;AAEF,eAAO,MAAM,CAAC,GAzDS,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,MAClD,CAAC,kBACU,OAAO,KACrB,gBAAgB,CAAC,QAAQ,CAsDL,CAAC;AACxB,eAAO,MAAM,CAAC,GA1DS,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,MAClD,CAAC,kBACU,OAAO,KACrB,gBAAgB,CAAC,QAAQ,CAuDL,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare function _subToView(store: any, throwError?: boolean, subscribeFn?: (fn: () => void) => () => void): void;
|
|
2
|
+
/**
|
|
3
|
+
* Subscribable type - any function or object that has subscribe or __subscribe method
|
|
4
|
+
*
|
|
5
|
+
* This type is compatible with:
|
|
6
|
+
* - Mates stores (atoms, setters, etc.) - use `__subscribe`
|
|
7
|
+
* - Zustand stores - use `subscribe`
|
|
8
|
+
* - Redux stores - use `subscribe`
|
|
9
|
+
* - Any custom store with a subscribe method
|
|
10
|
+
*/
|
|
11
|
+
export type Subscribable = {
|
|
12
|
+
subscribe?: (listener: () => void) => Function;
|
|
13
|
+
__subscribe?: (listener: () => void) => Function;
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Subscribe to a store and trigger re-renders when it changes
|
|
18
|
+
*
|
|
19
|
+
* Works with:
|
|
20
|
+
* - Mates stores (atoms, setters, getters, etc.)
|
|
21
|
+
* - Zustand stores
|
|
22
|
+
* - Redux stores
|
|
23
|
+
* - Any store with a `subscribe` or `__subscribe` method
|
|
24
|
+
*
|
|
25
|
+
* @param store - Any subscribable store
|
|
26
|
+
* @returns The same store (for chaining)
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* // Mates atom
|
|
31
|
+
* const count = atom(0);
|
|
32
|
+
* useStore(count);
|
|
33
|
+
*
|
|
34
|
+
* // Zustand store
|
|
35
|
+
* const useZustandStore = create((set) => ({ count: 0 }));
|
|
36
|
+
* useStore(useZustandStore);
|
|
37
|
+
*
|
|
38
|
+
* // Redux store
|
|
39
|
+
* useStore(reduxStore);
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function useStore<T extends Subscribable>(store: T): T;
|
|
43
|
+
export type SetterReturnType<T extends Function> = T & {
|
|
44
|
+
__subscribe: (listener: () => void) => Function;
|
|
45
|
+
__version__: number;
|
|
46
|
+
set: SetterReturnType<T>;
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
};
|
|
49
|
+
export declare const on: (callback: () => (() => void) | undefined, deps: any[]) => () => void;
|
|
50
|
+
//# sourceMappingURL=subscription.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/useStore/subscription.ts"],"names":[],"mappings":"AAMA,wBAAgB,UAAU,CACxB,KAAK,EAAE,GAAG,EACV,UAAU,UAAO,EACjB,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,QAY7C;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,QAAQ,CAAC;IAC/C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,QAAQ,CAAC;IACjD,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,YAAY,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAG5D;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,QAAQ,IAAI,CAAC,GAAG;IACrD,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,QAAQ,CAAC;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,EAAE,GAAI,UAAU,MAAM,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,EAAE,MAAM,GAAG,EAAE,eAyCvE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useContext.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/useStore/useContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAG/C,wBAAgB,UAAU,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAgBpD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { getCurrentHost, withHost } from "./hostContext";
|
|
2
|
+
export { onAllMount, onCleanup, onMount, onPaint } from "./lifecycle";
|
|
3
|
+
export { safetyCheck } from "./safetyCheck";
|
|
4
|
+
export { _, setter } from "./setter";
|
|
5
|
+
export { _subToView, type SetterReturnType, type Subscribable, useStore, } from "./subscription";
|
|
6
|
+
export { useContext } from "./useContext";
|
|
7
|
+
//# sourceMappingURL=useStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStore.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/useStore/useStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EACL,UAAU,EACV,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,QAAQ,GACT,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { nothing } from "lit-html";
|
|
2
|
+
import type { ComponentType, View } from "../Template/x-x.types";
|
|
3
|
+
/**
|
|
4
|
+
* Renders `view` if the current URL path matches `path`; otherwise returns `null`.
|
|
5
|
+
*
|
|
6
|
+
* Uses `isPathMatching` from `pathResolver` for pattern matching, making it
|
|
7
|
+
* SSR-safe and consistent with the rest of the Router module.
|
|
8
|
+
*
|
|
9
|
+
* @param path - The path pattern to match against the current URL pathname.
|
|
10
|
+
* @param options - Object containing a `view` factory function to render on match.
|
|
11
|
+
* @returns The result of `view()` when the path matches, or `null` when it does not.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* // Inside a template function:
|
|
15
|
+
* ${route("/about", { view: () => html`<about-page></about-page>` })}
|
|
16
|
+
*/
|
|
17
|
+
export declare const route: (path: string, { view: viewFn }: {
|
|
18
|
+
view: View;
|
|
19
|
+
}) => typeof nothing | import("lit-html").TemplateResult<1> | null;
|
|
20
|
+
type RouteConfig = {
|
|
21
|
+
path: string;
|
|
22
|
+
component: ComponentType;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Creates a router that matches the current URL path against `routeConfig` in
|
|
26
|
+
* order and returns a factory function that renders the first matching route.
|
|
27
|
+
*
|
|
28
|
+
* Supports both **eager** components (`Component`) and **lazy** components
|
|
29
|
+
* (`async () => import("...")`). Lazy components are passed directly to `x()`,
|
|
30
|
+
* which forwards them to the `x-view` element's view setter — the built-in
|
|
31
|
+
* `isAsyncValue` / `resolveAsyncValue` / `unwrapModule` pipeline handles
|
|
32
|
+
* resolution transparently.
|
|
33
|
+
*
|
|
34
|
+
* If no route matches and `NotFound` is provided, renders `NotFound`;
|
|
35
|
+
* otherwise renders `nothing`.
|
|
36
|
+
*
|
|
37
|
+
* @param routeConfig - Ordered array of `{ path, component }` entries.
|
|
38
|
+
* @param NotFound - Optional component rendered when no route matches.
|
|
39
|
+
* @returns A factory function whose return value can be rendered directly
|
|
40
|
+
* with lit-html's `render()`.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* const appRouter = Router([
|
|
44
|
+
* { path: "/", component: HomePage },
|
|
45
|
+
* { path: "/about", component: async () => import("./AboutPage") },
|
|
46
|
+
* { path: "/users", component: UsersPage },
|
|
47
|
+
* ], NotFoundPage);
|
|
48
|
+
*
|
|
49
|
+
* // In template:
|
|
50
|
+
* ${appRouter()}
|
|
51
|
+
*/
|
|
52
|
+
export declare const Router: (routeConfig: RouteConfig[], NotFound?: ComponentType) => (() => symbol) | (() => import("lit-html").TemplateResult<1>);
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=Router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Router.d.ts","sourceRoot":"","sources":["../../../../../lib/Router/Router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,KAAK,EAAa,aAAa,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAI5E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,KAAK,GAAI,MAAM,MAAM,EAAE,kBAAkB;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,iEAGnE,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,aAAa,CAAC;CAC1B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,MAAM,GACjB,aAAa,WAAW,EAAE,EAC1B,WAAW,aAAa,kEAuBzB,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { AnimationPreset } from "../actions/animateTypes";
|
|
2
|
+
import type { ComponentType } from "../Template/x-x.types";
|
|
3
|
+
export interface AnimatedRouteConfig {
|
|
4
|
+
path: string;
|
|
5
|
+
component: ComponentType;
|
|
6
|
+
props?: Record<string, any>;
|
|
7
|
+
enter?: AnimationPreset;
|
|
8
|
+
exit?: AnimationPreset;
|
|
9
|
+
}
|
|
10
|
+
export interface AnimatedRouterOptions {
|
|
11
|
+
notFound?: ComponentType;
|
|
12
|
+
enter?: AnimationPreset;
|
|
13
|
+
exit?: AnimationPreset;
|
|
14
|
+
}
|
|
15
|
+
export { animateContainer, nextFrame } from "../actions/animateSwap";
|
|
16
|
+
/**
|
|
17
|
+
* Animated client-side router with exit → swap → enter transitions.
|
|
18
|
+
*
|
|
19
|
+
* Matches the current URL (`pathAtom`) against `routes` in order and renders
|
|
20
|
+
* the first match. When the matched route changes, the old component plays
|
|
21
|
+
* its exit animation, the new component is mounted, and the enter animation
|
|
22
|
+
* plays.
|
|
23
|
+
*
|
|
24
|
+
* ### Scroll behaviour
|
|
25
|
+
*
|
|
26
|
+
* The router does **not** manage scroll position — following the same
|
|
27
|
+
* philosophy as React Router, which treats scroll as an application-level
|
|
28
|
+
* concern rather than a router concern.
|
|
29
|
+
*
|
|
30
|
+
* If you want scroll-to-top on navigation, handle it in your app code
|
|
31
|
+
* (e.g. via `onNavigate`):
|
|
32
|
+
*
|
|
33
|
+
* ```ts
|
|
34
|
+
* onNavigate(() => window.scrollTo(0, 0));
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* ### Nested / child routers
|
|
38
|
+
*
|
|
39
|
+
* `animatedRouter` can be used inside a component that is itself rendered
|
|
40
|
+
* by another `animatedRouter` (child routes). When a child route changes
|
|
41
|
+
* but the parent route stays the same, only the **child** router swaps —
|
|
42
|
+
* the parent sees the same route object and does nothing.
|
|
43
|
+
*
|
|
44
|
+
* @param routes - Ordered array of `{ path, component, enter?, exit? }`.
|
|
45
|
+
* @param options - Global enter/exit presets and notFound fallback.
|
|
46
|
+
*/
|
|
47
|
+
export declare function animatedRouter(routes: AnimatedRouteConfig[], options?: AnimatedRouterOptions): import("lit-html").TemplateResult<1>;
|
|
48
|
+
//# sourceMappingURL=animatedRouter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animatedRouter.d.ts","sourceRoot":"","sources":["../../../../../lib/Router/animatedRouter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAM/D,OAAO,KAAK,EAAE,aAAa,EAAS,MAAM,uBAAuB,CAAC;AAIlE,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,aAAa,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AAGD,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAuFrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,mBAAmB,EAAE,EAC7B,OAAO,GAAE,qBAA0B,wCAGpC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type IdStart = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" | "_";
|
|
2
|
+
type IdRest = IdStart | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
|
|
3
|
+
type TakeIdRest<S extends string> = S extends `${infer C}${infer R}` ? C extends IdRest ? `${C}${TakeIdRest<R>}` : "" : "";
|
|
4
|
+
type TakeIdentifier<S extends string> = S extends `${infer C}${infer R}` ? C extends IdStart ? `${C}${TakeIdRest<R>}` : "" : "";
|
|
5
|
+
type ExtractParams<Path extends string> = Path extends `${infer _Start}:${infer Param}/${infer Rest}` ? TakeIdentifier<Param> extends "" ? ExtractParams<Rest> : {
|
|
6
|
+
[K in TakeIdentifier<Param> | keyof ExtractParams<Rest>]: string | number | boolean;
|
|
7
|
+
} : Path extends `${infer _Start}:${infer Param}` ? TakeIdentifier<Param> extends "" ? never : {
|
|
8
|
+
[K in TakeIdentifier<Param>]: string | number | boolean;
|
|
9
|
+
} : never;
|
|
10
|
+
type BuildPathArgs<Path extends string> = ExtractParams<Path> extends never ? [path: Path, params?: undefined] : [path: Path, params: ExtractParams<Path>];
|
|
11
|
+
/**
|
|
12
|
+
* Build a concrete path from a route pattern with optional dynamic segments.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* buildPath("/users/:id", { id: 42 }) // "/users/42"
|
|
16
|
+
* buildPath("/posts/:postId/comments/:commentId", { postId: 1, commentId: 7 })
|
|
17
|
+
*/
|
|
18
|
+
export declare function buildPath<Path extends string>(...args: BuildPathArgs<Path>): string;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=buildPath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildPath.d.ts","sourceRoot":"","sources":["../../../../../lib/Router/buildPath.ts"],"names":[],"mappings":"AAEA,KAAK,OAAO,GACR,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,CAAC;AACR,KAAK,MAAM,GACP,OAAO,GACP,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,CAAC;AACR,KAAK,UAAU,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,EAAE,GAChE,CAAC,SAAS,MAAM,GACd,GAAG,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,GACtB,EAAE,GACJ,EAAE,CAAC;AACP,KAAK,cAAc,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,EAAE,GACpE,CAAC,SAAS,OAAO,GACf,GAAG,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,GACtB,EAAE,GACJ,EAAE,CAAC;AAEP,KAAK,aAAa,CAAC,IAAI,SAAS,MAAM,IACpC,IAAI,SAAS,GAAG,MAAM,MAAM,IAAI,MAAM,KAAK,IAAI,MAAM,IAAI,EAAE,GACvD,cAAc,CAAC,KAAK,CAAC,SAAS,EAAE,GAC9B,aAAa,CAAC,IAAI,CAAC,GACnB;KACG,CAAC,IAAI,cAAc,CAAC,KAAK,CAAC,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,GACnD,MAAM,GACN,MAAM,GACN,OAAO;CACZ,GACH,IAAI,SAAS,GAAG,MAAM,MAAM,IAAI,MAAM,KAAK,EAAE,GAC3C,cAAc,CAAC,KAAK,CAAC,SAAS,EAAE,GAC9B,KAAK,GACL;KAAG,CAAC,IAAI,cAAc,CAAC,KAAK,CAAC,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO;CAAE,GAC7D,KAAK,CAAC;AAEd,KAAK,aAAa,CAAC,IAAI,SAAS,MAAM,IACpC,aAAa,CAAC,IAAI,CAAC,SAAS,KAAK,GAC7B,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,SAAS,CAAC,GAChC,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;AAEhD;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,IAAI,SAAS,MAAM,EAC3C,GAAG,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,GAC3B,MAAM,CAUR"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Singleton atom holding the current URL hash fragment as a parsed object.
|
|
3
|
+
*
|
|
4
|
+
* Hydrated from `window.location.hash` at module load time. All reads are
|
|
5
|
+
* reactive — any effect or component that calls `hashAtom()` will re-run
|
|
6
|
+
* whenever the hash state changes.
|
|
7
|
+
*
|
|
8
|
+
* Setting the atom via `hashAtom.set(obj)` automatically serialises the new
|
|
9
|
+
* value back to the URL hash using `history.replaceState`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const hashAtom: import("..").AtomType<Record<string, any>>;
|
|
12
|
+
//# sourceMappingURL=hashAtom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hashAtom.d.ts","sourceRoot":"","sources":["../../../../../lib/Router/hashAtom.ts"],"names":[],"mappings":"AA+FA;;;;;;;;;GASG;AACH,eAAO,MAAM,QAAQ,4CAAqC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { type AnimatedRouteConfig, type AnimatedRouterOptions, animatedRouter, } from "./animatedRouter";
|
|
2
|
+
export { buildPath } from "./buildPath";
|
|
3
|
+
export { hashAtom } from "./hashAtom";
|
|
4
|
+
export { isPathMatching } from "./isPathMatching";
|
|
5
|
+
export { location } from "./location";
|
|
6
|
+
export { navigateTo } from "./navigateTo";
|
|
7
|
+
export { lockNavigation, navigationLocked, unlockNavigation, } from "./navigationLock";
|
|
8
|
+
export { pathAtom } from "./pathAtom";
|
|
9
|
+
export { qsAtom } from "./qsAtom";
|
|
10
|
+
export { Router, route } from "./Router";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/Router/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks whether the current pathname matches a route pattern.
|
|
3
|
+
*
|
|
4
|
+
* Supports dynamic params in the pattern using `:param` segments.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* // current path: /users/42
|
|
8
|
+
* isPathMatching("/users/:id") // true
|
|
9
|
+
* isPathMatching("/users") // false
|
|
10
|
+
*/
|
|
11
|
+
export declare const isPathMatching: (path: string) => boolean;
|
|
12
|
+
//# sourceMappingURL=isPathMatching.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isPathMatching.d.ts","sourceRoot":"","sources":["../../../../../lib/Router/isPathMatching.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,KAAG,OAuB7C,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export { lockNavigation, navigationLocked, unlockNavigation, } from "./navigationLock";
|
|
2
|
+
/**
|
|
3
|
+
* Read-only facade over the three URL-state atoms: `pathAtom`, `hashAtom`,
|
|
4
|
+
* and `qsAtom`.
|
|
5
|
+
*
|
|
6
|
+
* Every getter performs a **tracked read**, so any reactive context (effect,
|
|
7
|
+
* component render function) that accesses one of these properties will
|
|
8
|
+
* automatically re-run when that part of the URL changes.
|
|
9
|
+
*
|
|
10
|
+
* This module also re-exports `navigationLocked`, `lockNavigation`, and
|
|
11
|
+
* `unlockNavigation` from `navigationLock.ts` as a single convenient import
|
|
12
|
+
* point for consumers that need both location data and navigation control.
|
|
13
|
+
*
|
|
14
|
+
* **Intentionally read-only.** To navigate, use `navigateTo()`. To update
|
|
15
|
+
* the query string or hash state, use `qsAtom.set()` / `hashAtom.set()`.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* import { location } from "mates";
|
|
19
|
+
*
|
|
20
|
+
* location.path; // "/about" — current pathname
|
|
21
|
+
* location.hash; // { tab: "overview" } — parsed hash fragment
|
|
22
|
+
* location.qsObj; // { q: "react", page: 1 } — parsed query string
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* import { location, lockNavigation, unlockNavigation } from "mates";
|
|
26
|
+
*
|
|
27
|
+
* lockNavigation();
|
|
28
|
+
* navigateTo("/somewhere"); // no-op while locked
|
|
29
|
+
* unlockNavigation();
|
|
30
|
+
* navigateTo("/somewhere"); // works
|
|
31
|
+
*/
|
|
32
|
+
export declare const location: {
|
|
33
|
+
/**
|
|
34
|
+
* The current URL pathname (e.g. `"/about"`), sourced from `pathAtom`.
|
|
35
|
+
*
|
|
36
|
+
* Reading this property inside a reactive context registers a dependency on
|
|
37
|
+
* `pathAtom`, so the context re-runs whenever the path changes.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* location.path; // "/about"
|
|
41
|
+
*/
|
|
42
|
+
readonly path: string;
|
|
43
|
+
/**
|
|
44
|
+
* The current URL hash fragment as a parsed plain object, sourced from
|
|
45
|
+
* `hashAtom`.
|
|
46
|
+
*
|
|
47
|
+
* The hash is parsed as `URLSearchParams` — primitive values are strings,
|
|
48
|
+
* JSON-encoded objects/arrays are automatically deserialised.
|
|
49
|
+
*
|
|
50
|
+
* Reading this property inside a reactive context registers a dependency on
|
|
51
|
+
* `hashAtom`, so the context re-runs whenever the hash state changes.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* // URL: #tab=overview&page=2
|
|
55
|
+
* location.hash; // { tab: "overview", page: "2" }
|
|
56
|
+
*/
|
|
57
|
+
readonly hash: Record<string, any>;
|
|
58
|
+
/**
|
|
59
|
+
* The current URL query string as a parsed plain object, sourced from
|
|
60
|
+
* `qsAtom`.
|
|
61
|
+
*
|
|
62
|
+
* The query string is parsed via `URLSearchParams` — primitive values are
|
|
63
|
+
* strings, JSON-encoded objects/arrays are automatically deserialised.
|
|
64
|
+
*
|
|
65
|
+
* Reading this property inside a reactive context registers a dependency on
|
|
66
|
+
* `qsAtom`, so the context re-runs whenever the query string changes.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* // URL: ?q=react&page=1
|
|
70
|
+
* location.qsObj; // { q: "react", page: "1" }
|
|
71
|
+
*/
|
|
72
|
+
readonly qsObj: Record<string, any>;
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=location.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../../../lib/Router/location.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,QAAQ;IACnB;;;;;;;;OAQG;mBACS,MAAM;IAIlB;;;;;;;;;;;;;OAaG;mBACS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAI/B;;;;;;;;;;;;;OAaG;oBACU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAGjC,CAAC"}
|