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,94 @@
|
|
|
1
|
+
import type { TemplateResult } from "lit-html";
|
|
2
|
+
import type { DirectiveResult } from "lit-html/directive.js";
|
|
3
|
+
/**
|
|
4
|
+
* A factory function that produces the `TemplateResult` to render.
|
|
5
|
+
* Only called when the keys have changed.
|
|
6
|
+
*/
|
|
7
|
+
export type MemoTemplateFn = () => TemplateResult;
|
|
8
|
+
/**
|
|
9
|
+
* The keys array. Each element is compared with `Object.is` against the
|
|
10
|
+
* previous render's value at the same index.
|
|
11
|
+
*
|
|
12
|
+
* - Primitive keys (strings, numbers, booleans, symbols) are compared by value.
|
|
13
|
+
* - Object / array keys are compared by reference — if you want deep equality
|
|
14
|
+
* you should derive a primitive key (e.g. a serialised id or version number).
|
|
15
|
+
*/
|
|
16
|
+
export type MemoKeys = readonly unknown[];
|
|
17
|
+
/**
|
|
18
|
+
* `memoTemplate(keys, templateFn)` — a child-part directive that only calls
|
|
19
|
+
* `templateFn` when one or more of the `keys` have changed since the last
|
|
20
|
+
* render. When the keys are identical the previously rendered `TemplateResult`
|
|
21
|
+
* is returned as-is, and lit-html skips the DOM diff entirely.
|
|
22
|
+
*
|
|
23
|
+
* ### Key comparison
|
|
24
|
+
* Each key is compared with `Object.is` (value equality for primitives,
|
|
25
|
+
* reference equality for objects). A change in the length of the keys array
|
|
26
|
+
* is always treated as a change.
|
|
27
|
+
*
|
|
28
|
+
* ### When to use this
|
|
29
|
+
* Use `memoTemplate` to wrap expensive subtrees that depend on a known,
|
|
30
|
+
* finite set of values. It is the direct equivalent of React's
|
|
31
|
+
* `React.memo` / `useMemo` but expressed at the *template level*.
|
|
32
|
+
*
|
|
33
|
+
* ### Difference from lit-html's built-in `guard`
|
|
34
|
+
* `guard` is a thin lit-html built-in that does the same key-check but
|
|
35
|
+
* provides no TypeScript ergonomics, no named API, and no place to hook
|
|
36
|
+
* into the mates directive ecosystem. `memoTemplate` is idiomatic mates —
|
|
37
|
+
* built on `AsyncDirective` so it participates in the full
|
|
38
|
+
* connect/disconnect lifecycle.
|
|
39
|
+
*
|
|
40
|
+
* @param keys - Array of values to watch. Template only re-renders when
|
|
41
|
+
* at least one value changes (compared via `Object.is`).
|
|
42
|
+
* @param templateFn - Zero-argument factory that returns the `TemplateResult`
|
|
43
|
+
* to render. Only called when keys have changed.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* // ── Basic — skip re-render when `user` reference is unchanged ────────────
|
|
47
|
+
* html`
|
|
48
|
+
* <section>
|
|
49
|
+
* ${memoTemplate([user], () => html`
|
|
50
|
+
* <h2>${user.name}</h2>
|
|
51
|
+
* <p>${user.bio}</p>
|
|
52
|
+
* `)}
|
|
53
|
+
* </section>
|
|
54
|
+
* `
|
|
55
|
+
*
|
|
56
|
+
* // ── Multiple keys ─────────────────────────────────────────────────────────
|
|
57
|
+
* html`
|
|
58
|
+
* <ul>
|
|
59
|
+
* ${items.val.map(item =>
|
|
60
|
+
* memoTemplate([item.id, item.label, isSelected(item.id)], () => html`
|
|
61
|
+
* <li class="${isSelected(item.id) ? 'active' : ''}">${item.label}</li>
|
|
62
|
+
* `)
|
|
63
|
+
* )}
|
|
64
|
+
* </ul>
|
|
65
|
+
* `
|
|
66
|
+
*
|
|
67
|
+
* // ── Atom values as keys ───────────────────────────────────────────────────
|
|
68
|
+
* const count = atom(0);
|
|
69
|
+
* const theme = atom('light');
|
|
70
|
+
*
|
|
71
|
+
* html`
|
|
72
|
+
* <div>
|
|
73
|
+
* ${memoTemplate([count.val, theme.val], () => html`
|
|
74
|
+
* <span class="${theme.val}">${count.val}</span>
|
|
75
|
+
* `)}
|
|
76
|
+
* </div>
|
|
77
|
+
* `
|
|
78
|
+
*
|
|
79
|
+
* // ── Empty keys array — renders once, never again ──────────────────────────
|
|
80
|
+
* html`
|
|
81
|
+
* <footer>
|
|
82
|
+
* ${memoTemplate([], () => html`<p>© ${new Date().getFullYear()} Acme</p>`)}
|
|
83
|
+
* </footer>
|
|
84
|
+
* `
|
|
85
|
+
*
|
|
86
|
+
* // ── Single primitive key ─────────────────────────────────────────────────
|
|
87
|
+
* html`
|
|
88
|
+
* <div>
|
|
89
|
+
* ${memoTemplate([userId], () => expensiveUserCard(userId))}
|
|
90
|
+
* </div>
|
|
91
|
+
* `
|
|
92
|
+
*/
|
|
93
|
+
export declare function memoTemplate(keys: MemoKeys, templateFn: MemoTemplateFn): DirectiveResult;
|
|
94
|
+
//# sourceMappingURL=memoTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memoTemplate.d.ts","sourceRoot":"","sources":["../../../../../lib/Directives/memoTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,OAAO,KAAK,EAEV,eAAe,EAEhB,MAAM,uBAAuB,CAAC;AAK/B;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,cAAc,CAAC;AAElD;;;;;;;GAOG;AACH,MAAM,MAAM,QAAQ,GAAG,SAAS,OAAO,EAAE,CAAC;AA8E1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,QAAQ,EACd,UAAU,EAAE,cAAc,GACzB,eAAe,CAEjB"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/** Callback for the custom `enterViewport` event (IntersectionObserver). */
|
|
2
|
+
export type EnterViewportHandler = (entry: IntersectionObserverEntry) => void;
|
|
3
|
+
/** Callback for the custom `exitViewport` event (IntersectionObserver). */
|
|
4
|
+
export type ExitViewportHandler = (entry: IntersectionObserverEntry) => void;
|
|
5
|
+
/** Callback for the custom `clickOutside` event (mousedown outside element). */
|
|
6
|
+
export type ClickOutsideHandler = (event: MouseEvent) => void;
|
|
7
|
+
export interface MatesCustomEventMap {
|
|
8
|
+
/** Fires when the element enters the viewport (via IntersectionObserver). */
|
|
9
|
+
enterViewport: EnterViewportHandler;
|
|
10
|
+
/** Fires when the element exits the viewport (via IntersectionObserver). */
|
|
11
|
+
exitViewport: ExitViewportHandler;
|
|
12
|
+
/** Fires when the user clicks outside of this element. */
|
|
13
|
+
clickOutside: ClickOutsideHandler;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Full event handler map merging standard HTMLElement events with mates-specific
|
|
17
|
+
* custom events. Each key is an event name and each value is the handler
|
|
18
|
+
* function. All entries are optional.
|
|
19
|
+
*/
|
|
20
|
+
export type OnEventMap = {
|
|
21
|
+
[K in keyof HTMLElementEventMap]?: (event: HTMLElementEventMap[K]) => void;
|
|
22
|
+
} & {
|
|
23
|
+
[K in keyof MatesCustomEventMap]?: MatesCustomEventMap[K];
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Declarative event-binding directive for lit-html templates.
|
|
27
|
+
*
|
|
28
|
+
* Accepts a map of DOM event names (type-safe) plus mates-specific custom
|
|
29
|
+
* events: `enterViewport`, `exitViewport`, and `clickOutside`.
|
|
30
|
+
*
|
|
31
|
+
* Listeners and observers are created once and reused across re-renders.
|
|
32
|
+
* If a handler's identity changes, only the handler reference is swapped —
|
|
33
|
+
* the underlying listener / observer stays intact (no teardown/recreate).
|
|
34
|
+
* Handlers that are removed from the map between renders are cleaned up.
|
|
35
|
+
*
|
|
36
|
+
* When the host element is disconnected from the DOM, all listeners and
|
|
37
|
+
* observers are automatically torn down. They are re-created on the next
|
|
38
|
+
* render after reconnection.
|
|
39
|
+
*
|
|
40
|
+
* For element-level resize observation, use the `onResize` lifecycle hook
|
|
41
|
+
* instead.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* import { html } from "mates";
|
|
46
|
+
* import { on } from "mates";
|
|
47
|
+
*
|
|
48
|
+
* html`
|
|
49
|
+
* <div ${on({
|
|
50
|
+
* click(e) { console.log("clicked", e.clientX) },
|
|
51
|
+
* mouseenter() { console.log("hover in") },
|
|
52
|
+
* mouseleave() { console.log("hover out") },
|
|
53
|
+
* enterViewport(entry) { console.log("visible!", entry.intersectionRatio) },
|
|
54
|
+
* exitViewport(entry) { console.log("hidden!") },
|
|
55
|
+
* clickOutside(e) { console.log("clicked outside", e.target) },
|
|
56
|
+
* })}>
|
|
57
|
+
* Interactive element
|
|
58
|
+
* </div>
|
|
59
|
+
* `;
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export declare function on(events: OnEventMap): import("lit-html/directive.js").DirectiveResult<import("lit-html/directive.js").DirectiveClass>;
|
|
63
|
+
/**
|
|
64
|
+
* Imperatively tears down all event listeners and observers bound by `on()`
|
|
65
|
+
* on the given element. Useful when you need to clean up before the element
|
|
66
|
+
* is naturally disconnected from the DOM.
|
|
67
|
+
*
|
|
68
|
+
* Safe to call on elements that never had `on()` applied.
|
|
69
|
+
*/
|
|
70
|
+
export declare function removeOn(el: Element): void;
|
|
71
|
+
//# sourceMappingURL=onDirective.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onDirective.d.ts","sourceRoot":"","sources":["../../../../../lib/Directives/onDirective.ts"],"names":[],"mappings":"AAWA,4EAA4E;AAC5E,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;AAE9E,2EAA2E;AAC3E,MAAM,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;AAE7E,gFAAgF;AAChF,MAAM,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;AAI9D,MAAM,WAAW,mBAAmB;IAClC,6EAA6E;IAC7E,aAAa,EAAE,oBAAoB,CAAC;IACpC,4EAA4E;IAC5E,YAAY,EAAE,mBAAmB,CAAC;IAClC,0DAA0D;IAC1D,YAAY,EAAE,mBAAmB,CAAC;CACnC;AAID;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG;KACtB,CAAC,IAAI,MAAM,mBAAmB,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,KAAK,IAAI;CAC3E,GAAG;KACD,CAAC,IAAI,MAAM,mBAAmB,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC;CAC1D,CAAC;AA+KF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,EAAE,CAAC,MAAM,EAAE,UAAU,mGAEpC;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,CAE1C"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { MatesRef } from "../Mutables/ref/ref";
|
|
2
|
+
type AnyEventName = keyof HTMLElementEventMap;
|
|
3
|
+
export type OnParentMap = {
|
|
4
|
+
[K in AnyEventName]?: (event: HTMLElementEventMap[K]) => void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Attaches event listeners to a parent (or any ancestor) element via a
|
|
8
|
+
* `MatesRef`, scoped to the lifetime of the element the directive is on.
|
|
9
|
+
*
|
|
10
|
+
* - Listeners are bound as soon as the ref's element becomes available.
|
|
11
|
+
* - If the host element disconnects, all listeners are removed automatically.
|
|
12
|
+
* - Handler identity changes are handled via ref-swap — no rebind overhead.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* import { ref, setRef, onParent } from "@mates";
|
|
17
|
+
*
|
|
18
|
+
* const listRef = ref<HTMLUListElement>();
|
|
19
|
+
*
|
|
20
|
+
* html`
|
|
21
|
+
* <ul ${setRef(listRef)}>
|
|
22
|
+
* <li ${onParent(listRef, {
|
|
23
|
+
* click(e) { console.log("delegated click", e.target) },
|
|
24
|
+
* keydown(e) { if (e.key === "Enter") select(e.target) },
|
|
25
|
+
* })}>
|
|
26
|
+
* Item
|
|
27
|
+
* </li>
|
|
28
|
+
* </ul>
|
|
29
|
+
* `;
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare function onParent(target: MatesRef<HTMLElement>, events: OnParentMap): import("lit-html/directive.js").DirectiveResult<import("lit-html/directive.js").DirectiveClass>;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=onParentDirective.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onParentDirective.d.ts","sourceRoot":"","sources":["../../../../../lib/Directives/onParentDirective.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAMpD,KAAK,YAAY,GAAG,MAAM,mBAAmB,CAAC;AAE9C,MAAM,MAAM,WAAW,GAAG;KACvB,CAAC,IAAI,YAAY,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,KAAK,IAAI;CAC9D,CAAC;AA6CF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,WAAW,mGAE1E"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { nothing, type TemplateResult } from "lit-html";
|
|
2
|
+
/**
|
|
3
|
+
* A `[condition, template]` tuple — the condition is evaluated and when
|
|
4
|
+
* `true` its template is returned by {@link renderSwitch}.
|
|
5
|
+
*/
|
|
6
|
+
export type SwitchEntry = readonly [
|
|
7
|
+
condition: boolean,
|
|
8
|
+
template: TemplateResult
|
|
9
|
+
];
|
|
10
|
+
/**
|
|
11
|
+
* One item in the array passed to {@link renderSwitch}.
|
|
12
|
+
*
|
|
13
|
+
* Either:
|
|
14
|
+
* - `[condition, template]` — a conditional branch.
|
|
15
|
+
* - `TemplateResult` — an unconditional fallback (typically placed last).
|
|
16
|
+
*/
|
|
17
|
+
export type SwitchCase = SwitchEntry | TemplateResult;
|
|
18
|
+
/**
|
|
19
|
+
* `renderSwitch` — return the template for the first truthy branch.
|
|
20
|
+
*
|
|
21
|
+
* Iterates `cases` in order:
|
|
22
|
+
* - **`[condition, template]`** — if `condition` is truthy, `template` is returned.
|
|
23
|
+
* - **`TemplateResult`** — returned unconditionally (acts as a default / fallback).
|
|
24
|
+
*
|
|
25
|
+
* If no branch matches and there is no fallback, `nothing` is returned so the
|
|
26
|
+
* call site produces no DOM output.
|
|
27
|
+
*
|
|
28
|
+
* TypeScript narrows each element to either `SwitchEntry` (a 2-tuple) or
|
|
29
|
+
* `TemplateResult` — both can be inferred without explicit type annotations at
|
|
30
|
+
* the call site.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* // Three tabs + a fallback shown when no tab is active
|
|
35
|
+
* html`${renderSwitch([
|
|
36
|
+
* [tab === "home", html`<home-panel></home-panel>`],
|
|
37
|
+
* [tab === "settings", html`<settings-panel></settings-panel>`],
|
|
38
|
+
* [tab === "profile", html`<profile-panel></profile-panel>`],
|
|
39
|
+
* html`<p>Select a tab to get started.</p>`, // ← default
|
|
40
|
+
* ])}`
|
|
41
|
+
*
|
|
42
|
+
* // Without a default — returns nothing when no condition is met
|
|
43
|
+
* html`${renderSwitch([
|
|
44
|
+
* [isAdmin, html`<admin-tools></admin-tools>`],
|
|
45
|
+
* [isEditor, html`<editor-bar></editor-bar>`],
|
|
46
|
+
* ])}`
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @param cases Ordered list of `[condition, template]` entries and/or a
|
|
50
|
+
* plain `TemplateResult` default.
|
|
51
|
+
* @returns The first matching `TemplateResult`, or `nothing` when
|
|
52
|
+
* no branch matches.
|
|
53
|
+
*/
|
|
54
|
+
export declare function renderSwitch(cases: readonly SwitchCase[]): TemplateResult | typeof nothing;
|
|
55
|
+
//# sourceMappingURL=renderSwitch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderSwitch.d.ts","sourceRoot":"","sources":["../../../../../lib/Directives/renderSwitch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAIxD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS;IACjC,SAAS,EAAE,OAAO;IAClB,QAAQ,EAAE,cAAc;CACzB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,cAAc,CAAC;AAItD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,SAAS,UAAU,EAAE,GAC3B,cAAc,GAAG,OAAO,OAAO,CAYjC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The value type accepted by the `attr()` directive for a single attribute.
|
|
3
|
+
*
|
|
4
|
+
* - `string | number` — set the attribute to that value
|
|
5
|
+
* - `boolean` — true → set to "", false → remove
|
|
6
|
+
* - `null | undefined` — remove the attribute
|
|
7
|
+
* - `[condition, val]` — conditional: set when truthy, remove when falsy
|
|
8
|
+
* - `[condition, trueVal, falseVal]` — ternary
|
|
9
|
+
*/
|
|
10
|
+
export type AttrValue = string | number | boolean | null | undefined | [unknown, string | number | boolean] | [unknown, string | number | boolean, string | number | boolean];
|
|
11
|
+
/** A map of attribute names to their values. */
|
|
12
|
+
export type AttrMap = Record<string, AttrValue>;
|
|
13
|
+
/**
|
|
14
|
+
* Resolve a single attribute value to either a set-action (with a string value)
|
|
15
|
+
* or a remove-action.
|
|
16
|
+
*
|
|
17
|
+
* This is a pure function with zero dependencies — safe to import from anywhere.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* resolveAttrValue("hello") // { action: "set", value: "hello" }
|
|
21
|
+
* resolveAttrValue(42) // { action: "set", value: "42" }
|
|
22
|
+
* resolveAttrValue(true) // { action: "set", value: "" }
|
|
23
|
+
* resolveAttrValue(false) // { action: "remove" }
|
|
24
|
+
* resolveAttrValue(null) // { action: "remove" }
|
|
25
|
+
* resolveAttrValue([true, "yes"]) // { action: "set", value: "yes" }
|
|
26
|
+
* resolveAttrValue([false, "yes"]) // { action: "remove" }
|
|
27
|
+
* resolveAttrValue([true, "a", "b"]) // { action: "set", value: "a" }
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveAttrValue(value: AttrValue): {
|
|
30
|
+
action: "set";
|
|
31
|
+
value: string;
|
|
32
|
+
} | {
|
|
33
|
+
action: "remove";
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=resolveAttrValue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveAttrValue.d.ts","sourceRoot":"","sources":["../../../../../lib/Directives/resolveAttrValue.ts"],"names":[],"mappings":"AAOA;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,GACT,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GACpC,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;AAEpE,gDAAgD;AAChD,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAEhD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,GACf;IAAE,MAAM,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,QAAQ,CAAA;CAAE,CAmCzD"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type * as CSS from "csstype";
|
|
2
|
+
/**
|
|
3
|
+
* A plain style value — a string or number (numbers are treated as px for
|
|
4
|
+
* length-based properties, but we leave that to the browser).
|
|
5
|
+
*/
|
|
6
|
+
type PlainValue = string | number;
|
|
7
|
+
/**
|
|
8
|
+
* Conditional style value (2-element tuple):
|
|
9
|
+
* [condition, value]
|
|
10
|
+
* The style is only applied when `condition` is truthy.
|
|
11
|
+
*/
|
|
12
|
+
type ConditionalValue = [condition: unknown, value: PlainValue];
|
|
13
|
+
/**
|
|
14
|
+
* Ternary style value (3-element tuple):
|
|
15
|
+
* [condition, trueValue, falseValue]
|
|
16
|
+
* Applies `trueValue` when condition is truthy, `falseValue` otherwise.
|
|
17
|
+
*/
|
|
18
|
+
type TernaryValue = [
|
|
19
|
+
condition: unknown,
|
|
20
|
+
trueValue: PlainValue,
|
|
21
|
+
falseValue: PlainValue
|
|
22
|
+
];
|
|
23
|
+
/**
|
|
24
|
+
* Every value in the style map can be:
|
|
25
|
+
* - a plain string / number (always applied)
|
|
26
|
+
* - a 2-element array → [condition, value] (conditional)
|
|
27
|
+
* - a 3-element array → [condition, ifTrue, ifFalse] (ternary)
|
|
28
|
+
* - undefined / null / false (ignored)
|
|
29
|
+
*/
|
|
30
|
+
export type StyleValue = PlainValue | ConditionalValue | TernaryValue | undefined | null | false;
|
|
31
|
+
/**
|
|
32
|
+
* The style map accepted by the `style()` directive.
|
|
33
|
+
*
|
|
34
|
+
* Keys are camelCase CSS property names (type-safe via csstype) OR
|
|
35
|
+
* kebab-case strings (for custom properties like `--my-var`).
|
|
36
|
+
*/
|
|
37
|
+
export type StyleMap = {
|
|
38
|
+
[K in keyof CSS.Properties]?: StyleValue;
|
|
39
|
+
} & {
|
|
40
|
+
/** Allow arbitrary kebab-case or custom property names. */
|
|
41
|
+
[key: string]: StyleValue;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Declarative, conditional style directive for lit-html templates.
|
|
45
|
+
*
|
|
46
|
+
* Accepts a map of CSS property names to values. Values can be:
|
|
47
|
+
* - **plain**: always applied (`color: "red"`)
|
|
48
|
+
* - **conditional** (2-element array): applied only when condition is truthy
|
|
49
|
+
* (`color: [isError, "red"]`)
|
|
50
|
+
* - **ternary** (3-element array): picks between two values
|
|
51
|
+
* (`color: [isError, "red", "green"]`)
|
|
52
|
+
*
|
|
53
|
+
* Properties whose conditions are falsy (or whose keys are removed between
|
|
54
|
+
* renders) are automatically cleaned up from the element's inline style.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* import { html } from "mates";
|
|
59
|
+
* import { style } from "mates";
|
|
60
|
+
*
|
|
61
|
+
* const isEnabled = true;
|
|
62
|
+
* const isError = false;
|
|
63
|
+
*
|
|
64
|
+
* html`
|
|
65
|
+
* <div ${style({
|
|
66
|
+
* color: [isEnabled, "red"],
|
|
67
|
+
* background: "white",
|
|
68
|
+
* fontWeight: [isError, "bold", "normal"],
|
|
69
|
+
* "--custom-var": "42px",
|
|
70
|
+
* opacity: [isEnabled, 1, 0.5],
|
|
71
|
+
* })}>
|
|
72
|
+
* Styled content
|
|
73
|
+
* </div>
|
|
74
|
+
* `;
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
export declare function style(styles: StyleMap): import("lit-html/directive.js").DirectiveResult<import("lit-html/directive.js").DirectiveClass>;
|
|
78
|
+
/** No-op — kept for backwards compatibility. */
|
|
79
|
+
export declare function removeStyle(_el: Element): void;
|
|
80
|
+
export {};
|
|
81
|
+
//# sourceMappingURL=styleDirective.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styleDirective.d.ts","sourceRoot":"","sources":["../../../../../lib/Directives/styleDirective.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,MAAM,SAAS,CAAC;AAKpC;;;GAGG;AACH,KAAK,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAElC;;;;GAIG;AACH,KAAK,gBAAgB,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;AAEhE;;;;GAIG;AACH,KAAK,YAAY,GAAG;IAClB,SAAS,EAAE,OAAO;IAClB,SAAS,EAAE,UAAU;IACrB,UAAU,EAAE,UAAU;CACvB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,gBAAgB,GAChB,YAAY,GACZ,SAAS,GACT,IAAI,GACJ,KAAK,CAAC;AAEV;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG;KACpB,CAAC,IAAI,MAAM,GAAG,CAAC,UAAU,CAAC,CAAC,EAAE,UAAU;CACzC,GAAG;IACF,2DAA2D;IAC3D,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC;CAC3B,CAAC;AAgBF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,QAAQ,mGAErC;AAED,gDAAgD;AAChD,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAG"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export type TimerContent = () => unknown;
|
|
2
|
+
/**
|
|
3
|
+
* A self-ticking directive that updates a child part on a fixed interval
|
|
4
|
+
* without triggering a component re-render.
|
|
5
|
+
*
|
|
6
|
+
* The callback can return anything lit-html can render — a `TemplateResult`,
|
|
7
|
+
* a plain string, a number, etc.
|
|
8
|
+
*
|
|
9
|
+
* The interval is automatically cleared when the host element is removed
|
|
10
|
+
* from the DOM, and restarted when it reconnects.
|
|
11
|
+
*
|
|
12
|
+
* If `ms` changes between renders, the interval is restarted with the new
|
|
13
|
+
* duration.
|
|
14
|
+
*
|
|
15
|
+
* @param callback - Function called on every tick. Return value is rendered.
|
|
16
|
+
* @param ms - Interval in milliseconds. Required. Minimum 16ms (one frame
|
|
17
|
+
* at 60fps) — values below this are rejected with an error
|
|
18
|
+
* since the browser cannot paint any faster.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { html } from "@mates";
|
|
23
|
+
* import { timer } from "@mates";
|
|
24
|
+
*
|
|
25
|
+
* // Live clock — updates every second, no component re-render
|
|
26
|
+
* html`
|
|
27
|
+
* <div>
|
|
28
|
+
* Time: ${timer(() => new Date().toLocaleTimeString(), 1000)}
|
|
29
|
+
* </div>
|
|
30
|
+
* `;
|
|
31
|
+
*
|
|
32
|
+
* // Countdown
|
|
33
|
+
* const end = Date.now() + 60_000;
|
|
34
|
+
* html`
|
|
35
|
+
* <span>
|
|
36
|
+
* ${timer(() => {
|
|
37
|
+
* const remaining = Math.max(0, Math.ceil((end - Date.now()) / 1000));
|
|
38
|
+
* return remaining === 0 ? "Done!" : `${remaining}s`;
|
|
39
|
+
* }, 1000)}
|
|
40
|
+
* </span>
|
|
41
|
+
* `;
|
|
42
|
+
*
|
|
43
|
+
* // Dynamic HTML content
|
|
44
|
+
* html`
|
|
45
|
+
* <div>
|
|
46
|
+
* ${timer(() => html`<strong>${new Date().toLocaleTimeString()}</strong>`, 500)}
|
|
47
|
+
* </div>
|
|
48
|
+
* `;
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export declare function timer(callback: TimerContent, ms: number): import("lit-html/directive.js").DirectiveResult<import("lit-html/directive.js").DirectiveClass>;
|
|
52
|
+
//# sourceMappingURL=timerDirective.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timerDirective.d.ts","sourceRoot":"","sources":["../../../../../lib/Directives/timerDirective.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC;AA+CzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,mGAEvD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Virtual scrolling helpers — now backed by the forked @lit-labs/virtualizer
|
|
3
|
+
* engine (see lib/virtualizer).
|
|
4
|
+
*
|
|
5
|
+
* Key upgrade: `virtualList` no longer requires `itemHeight`. The FlowLayout
|
|
6
|
+
* uses ResizeObserver to measure each child's actual rendered height, so items
|
|
7
|
+
* can be any height — fixed, dynamic, or content-driven.
|
|
8
|
+
*/
|
|
9
|
+
export { type VirtualGridOptions, type VirtualItemTemplate, type VirtualKeyFn, type VirtualListOptions, type VirtualMasonryOptions, virtualGrid, virtualList, virtualMasonry, } from "../virtualizer/mates-adapter.js";
|
|
10
|
+
//# sourceMappingURL=virtualHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtualHelpers.d.ts","sourceRoot":"","sources":["../../../../../lib/Directives/virtualHelpers.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,WAAW,EACX,WAAW,EACX,cAAc,GACf,MAAM,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export declare const ErrorTypes: {
|
|
2
|
+
readonly 100: "CONTINUE";
|
|
3
|
+
readonly 101: "SWITCHING_PROTOCOLS";
|
|
4
|
+
readonly 102: "PROCESSING";
|
|
5
|
+
readonly 103: "EARLY_HINTS";
|
|
6
|
+
readonly 200: "OK";
|
|
7
|
+
readonly 201: "CREATED";
|
|
8
|
+
readonly 202: "ACCEPTED";
|
|
9
|
+
readonly 203: "NON_AUTHORITATIVE_INFORMATION";
|
|
10
|
+
readonly 204: "NO_CONTENT";
|
|
11
|
+
readonly 205: "RESET_CONTENT";
|
|
12
|
+
readonly 206: "PARTIAL_CONTENT";
|
|
13
|
+
readonly 207: "MULTI_STATUS";
|
|
14
|
+
readonly 208: "ALREADY_REPORTED";
|
|
15
|
+
readonly 226: "IM_USED";
|
|
16
|
+
readonly 300: "MULTIPLE_CHOICES";
|
|
17
|
+
readonly 301: "MOVED_PERMANENTLY";
|
|
18
|
+
readonly 302: "FOUND";
|
|
19
|
+
readonly 303: "SEE_OTHER";
|
|
20
|
+
readonly 304: "NOT_MODIFIED";
|
|
21
|
+
readonly 305: "USE_PROXY";
|
|
22
|
+
readonly 307: "TEMPORARY_REDIRECT";
|
|
23
|
+
readonly 308: "PERMANENT_REDIRECT";
|
|
24
|
+
readonly 400: "BAD_REQUEST";
|
|
25
|
+
readonly 401: "UNAUTHORIZED";
|
|
26
|
+
readonly 402: "PAYMENT_REQUIRED";
|
|
27
|
+
readonly 403: "FORBIDDEN";
|
|
28
|
+
readonly 404: "NOT_FOUND";
|
|
29
|
+
readonly 405: "METHOD_NOT_ALLOWED";
|
|
30
|
+
readonly 406: "NOT_ACCEPTABLE";
|
|
31
|
+
readonly 407: "PROXY_AUTHENTICATION_REQUIRED";
|
|
32
|
+
readonly 408: "REQUEST_TIMEOUT";
|
|
33
|
+
readonly 409: "CONFLICT";
|
|
34
|
+
readonly 410: "GONE";
|
|
35
|
+
readonly 411: "LENGTH_REQUIRED";
|
|
36
|
+
readonly 412: "PRECONDITION_FAILED";
|
|
37
|
+
readonly 413: "PAYLOAD_TOO_LARGE";
|
|
38
|
+
readonly 414: "URI_TOO_LONG";
|
|
39
|
+
readonly 415: "UNSUPPORTED_MEDIA_TYPE";
|
|
40
|
+
readonly 416: "RANGE_NOT_SATISFIABLE";
|
|
41
|
+
readonly 417: "EXPECTATION_FAILED";
|
|
42
|
+
readonly 418: "IM_A_TEAPOT";
|
|
43
|
+
readonly 421: "MISDIRECTED_REQUEST";
|
|
44
|
+
readonly 422: "UNPROCESSABLE_ENTITY";
|
|
45
|
+
readonly 423: "LOCKED";
|
|
46
|
+
readonly 424: "FAILED_DEPENDENCY";
|
|
47
|
+
readonly 425: "TOO_EARLY";
|
|
48
|
+
readonly 426: "UPGRADE_REQUIRED";
|
|
49
|
+
readonly 428: "PRECONDITION_REQUIRED";
|
|
50
|
+
readonly 429: "TOO_MANY_REQUESTS";
|
|
51
|
+
readonly 431: "REQUEST_HEADER_FIELDS_TOO_LARGE";
|
|
52
|
+
readonly 451: "UNAVAILABLE_FOR_LEGAL_REASONS";
|
|
53
|
+
readonly 500: "INTERNAL_SERVER_ERROR";
|
|
54
|
+
readonly 501: "NOT_IMPLEMENTED";
|
|
55
|
+
readonly 502: "BAD_GATEWAY";
|
|
56
|
+
readonly 503: "SERVICE_UNAVAILABLE";
|
|
57
|
+
readonly 504: "GATEWAY_TIMEOUT";
|
|
58
|
+
readonly 505: "HTTP_VERSION_NOT_SUPPORTED";
|
|
59
|
+
readonly 506: "VARIANT_ALSO_NEGOTIATES";
|
|
60
|
+
readonly 507: "INSUFFICIENT_STORAGE";
|
|
61
|
+
readonly 508: "LOOP_DETECTED";
|
|
62
|
+
readonly 510: "NOT_EXTENDED";
|
|
63
|
+
readonly 511: "NETWORK_AUTHENTICATION_REQUIRED";
|
|
64
|
+
};
|
|
65
|
+
export type ErrorType = (typeof ErrorTypes)[keyof typeof ErrorTypes];
|
|
66
|
+
/**
|
|
67
|
+
* Checks if a status code indicates a successful API response.
|
|
68
|
+
* Returns true for status codes in the 200-299 range (2xx Success).
|
|
69
|
+
*
|
|
70
|
+
* @param statusCode - The HTTP status code to check
|
|
71
|
+
* @returns true if the status code indicates success (2xx), false otherwise
|
|
72
|
+
*/
|
|
73
|
+
export declare function isApiResponseSuccess(statusCode: number): boolean;
|
|
74
|
+
//# sourceMappingURL=ErrorTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorTypes.d.ts","sourceRoot":"","sources":["../../../../../lib/Fetch/ErrorTypes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwEb,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAErE;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAEhE"}
|