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,37 @@
|
|
|
1
|
+
import type { CSSRulesInput } from "./serialize";
|
|
2
|
+
export type { CSSRulesInput };
|
|
3
|
+
/**
|
|
4
|
+
* A `Cl<R>` is a plain readonly object with one string property per key in `R`.
|
|
5
|
+
*
|
|
6
|
+
* - `cl.blockName` → the generated CSS class name string, ready to drop into
|
|
7
|
+
* `class=${cl.card}` or `classes([cl.card, isActive && cl.active])`.
|
|
8
|
+
* - Empty blocks (no valid properties) map to `""`.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const cl = css({
|
|
13
|
+
* card: { display: "flex", padding: "1rem" },
|
|
14
|
+
* active: { backgroundColor: "blue" },
|
|
15
|
+
* });
|
|
16
|
+
*
|
|
17
|
+
* // In template — direct class interpolation, zero overhead:
|
|
18
|
+
* html`<div class="${cl.card} ${isActive ? cl.active : ""}">…</div>`
|
|
19
|
+
*
|
|
20
|
+
* // Or with the classes() directive for conditional logic:
|
|
21
|
+
* html`<div ${classes([cl.card, [isActive, cl.active]])}>…</div>`
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export type Cl<R extends CSSRulesInput> = {
|
|
25
|
+
readonly [K in keyof R]: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Build a `Cl<R>` from a pre-computed `classMap` (block name → class string)
|
|
29
|
+
* that was returned by `serializeRules`.
|
|
30
|
+
*
|
|
31
|
+
* The returned object is frozen so block-name strings are immutable after
|
|
32
|
+
* creation — class names never change for a given `css()` call.
|
|
33
|
+
*
|
|
34
|
+
* @param classMap - `{ blockName: "generatedClassName" }`
|
|
35
|
+
*/
|
|
36
|
+
export declare function createCl<R extends CSSRulesInput>(classMap: Record<string, string>): Cl<R>;
|
|
37
|
+
//# sourceMappingURL=cl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cl.d.ts","sourceRoot":"","sources":["../../../../../lib/css-in-js/cl.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,YAAY,EAAE,aAAa,EAAE,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,EAAE,CAAC,CAAC,SAAS,aAAa,IAAI;IAAE,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,MAAM;CAAE,CAAC;AAI9E;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,aAAa,EAC9C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,EAAE,CAAC,CAAC,CAAC,CAEP"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type { Cl } from "./cl";
|
|
2
|
+
export type { CSSBlock, CSSNestedBlock, CSSRulesInput, SerializeOptions, } from "./serialize";
|
|
3
|
+
export type { CSSKeyframeStops } from "./stylesheet";
|
|
4
|
+
export { configureCSS, globalCSS, keyframes, stylesheet } from "./stylesheet";
|
|
5
|
+
export type { CssVars, GlobalThemeResult, ThemeMode, ThemesInput, ThemeTokenMap, } from "./theme";
|
|
6
|
+
export { globalTheme, rootCSS } from "./theme";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/css-in-js/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC/B,YAAY,EACV,QAAQ,EACR,cAAc,EACd,aAAa,EACb,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC9E,YAAY,EACV,OAAO,EACP,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sanitize a CSS property *value* before it is written into a style rule.
|
|
3
|
+
*
|
|
4
|
+
* Transformations applied (in order):
|
|
5
|
+
* 1. Strip null bytes (`\u0000`) — can confuse CSS parsers across environments.
|
|
6
|
+
* 2. Truncate at the first `{` or `}` character — prevents rule injection.
|
|
7
|
+
* Example: `"red}body{background:evil"` → `"red"`.
|
|
8
|
+
* 3. Strip dangerous URL protocols inside `url(...)` — removes `javascript:`,
|
|
9
|
+
* `vbscript:`, and `data:text/html` (case-insensitive) from url() arguments.
|
|
10
|
+
* Example: `url("javascript:evil")` → `url("evil")`.
|
|
11
|
+
*
|
|
12
|
+
* Safe values such as `calc(100% - 2px)`, `url("https://…")`,
|
|
13
|
+
* `url(data:image/png;base64,…)`, multi-stop gradients, `var(--x, fallback)`,
|
|
14
|
+
* and semicolons are passed through without modification.
|
|
15
|
+
*/
|
|
16
|
+
export declare function sanitizeValue(value: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Validate a CSS property *name*.
|
|
19
|
+
*
|
|
20
|
+
* Returns `true` when the name contains only ASCII letters and hyphens, which
|
|
21
|
+
* covers all standard CSS properties (e.g. `color`, `background-color`,
|
|
22
|
+
* `--my-custom-prop`) as well as camelCase variants used by the serializer
|
|
23
|
+
* (e.g. `backgroundColor`, `fontSize`).
|
|
24
|
+
*
|
|
25
|
+
* Returns `false` for anything containing digits, braces, semicolons, colons,
|
|
26
|
+
* or other characters that have no place in a property name — these are skipped
|
|
27
|
+
* with a console warning in the serializer, preventing malformed rules such as
|
|
28
|
+
* `color:red: …` or `font}size: …` from being written into the stylesheet.
|
|
29
|
+
*/
|
|
30
|
+
export declare function sanitizePropertyName(name: string): boolean;
|
|
31
|
+
//# sourceMappingURL=sanitize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../../../lib/css-in-js/sanitize.ts"],"names":[],"mappings":"AAyBA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAwBnD;AAYD;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE1D"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type * as CSS from "csstype";
|
|
2
|
+
/**
|
|
3
|
+
* A nested block — used for pseudo-selectors, breakpoint shorthands, and
|
|
4
|
+
* raw `@media` queries. Only flat CSS properties are allowed inside (no
|
|
5
|
+
* further nesting).
|
|
6
|
+
*
|
|
7
|
+
* Each key preserves its specific csstype value union — e.g. `display` only
|
|
8
|
+
* accepts `"flex" | "block" | "grid" | ...` not an arbitrary string.
|
|
9
|
+
*
|
|
10
|
+
* Examples of valid keys that hold a `CSSNestedBlock`:
|
|
11
|
+
* - `"&:hover"`, `"&::before"`, `"&:nth-child(2)"`, `"&[disabled]"`
|
|
12
|
+
* - `"md"`, `"lg"` (breakpoint shorthands)
|
|
13
|
+
* - `"@media (min-width: 900px)"` (raw media query)
|
|
14
|
+
*/
|
|
15
|
+
export type CSSNestedBlock = {
|
|
16
|
+
[K in keyof CSS.Properties]?: CSS.Properties[K];
|
|
17
|
+
} & {
|
|
18
|
+
[key: string]: CSS.Properties[keyof CSS.Properties] | undefined;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* A flat block of CSS properties.
|
|
22
|
+
*
|
|
23
|
+
* Known CSS property keys (camelCase, e.g. `display`, `backgroundColor`) get
|
|
24
|
+
* full value-level intellisense from csstype — typing `display:` will suggest
|
|
25
|
+
* `"flex"`, `"block"`, `"grid"`, etc.
|
|
26
|
+
*
|
|
27
|
+
* The index signature allows:
|
|
28
|
+
* - Pseudo-selector keys: `"&:hover"`, `"&::before"`, `"&[disabled]"` …
|
|
29
|
+
* - Breakpoint shorthands: `"md"`, `"lg"` …
|
|
30
|
+
* - Raw media queries: `"@media (min-width: 900px)"` …
|
|
31
|
+
* - CSS custom properties: `"--my-var"` …
|
|
32
|
+
*/
|
|
33
|
+
export type CSSBlock = {
|
|
34
|
+
[K in keyof CSS.Properties]?: CSS.Properties[K];
|
|
35
|
+
} & {
|
|
36
|
+
[key: string]: CSS.Properties[keyof CSS.Properties] | CSSNestedBlock | undefined;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* The full rules object accepted by `css()` and `globalCSS()`.
|
|
40
|
+
*
|
|
41
|
+
* Top-level keys are developer-chosen block names (`"button"`, `"card"`, …).
|
|
42
|
+
* Each block is a `CSSBlock` — typed CSS properties plus optional nested keys
|
|
43
|
+
* for pseudo-selectors, breakpoint shorthands, or raw `@media` strings.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const cl = css({
|
|
48
|
+
* button: {
|
|
49
|
+
* display: "inline-flex", // ✅ autocompletes "flex" | "block" | …
|
|
50
|
+
* padding: "0.5rem 1rem",
|
|
51
|
+
* "&:hover": { opacity: "0.9" },
|
|
52
|
+
* "md": { fontSize: "1.125rem" },
|
|
53
|
+
* },
|
|
54
|
+
* });
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export type CSSRulesInput = Record<string, CSSBlock>;
|
|
58
|
+
/**
|
|
59
|
+
* Configure global CSS-in-JS options.
|
|
60
|
+
* Shallow-merges additional or override existing breakpoint shorthand keys.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* configureCSS({ breakpoints: { md: "900px", "3xl": "1920px" } });
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export declare function configureCSS(options: {
|
|
68
|
+
breakpoints?: Record<string, string>;
|
|
69
|
+
}): void;
|
|
70
|
+
/**
|
|
71
|
+
* Options for `serializeRules`.
|
|
72
|
+
*/
|
|
73
|
+
export interface SerializeOptions {
|
|
74
|
+
/** When true, use the block name as-is as the CSS class name (no generated suffix). */
|
|
75
|
+
literal?: boolean;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Serialize a full `css()` rules object into a monolithic classMap.
|
|
79
|
+
*
|
|
80
|
+
* For each named block:
|
|
81
|
+
* - All plain CSS properties are collected into a single base rule.
|
|
82
|
+
* - Pseudo-selector blocks (`"&:hover"`, `"&::before"`, …) each become a
|
|
83
|
+
* separate rule sharing the same class name.
|
|
84
|
+
* - Breakpoint shorthands (`"md"`, `"lg"`, …) and raw `"@media ..."` keys
|
|
85
|
+
* each become a separate `@media` rule sharing the same class name.
|
|
86
|
+
* - Unknown nested object keys throw a descriptive error at call time.
|
|
87
|
+
* - Invalid or empty blocks produce an empty string entry and no rules.
|
|
88
|
+
*
|
|
89
|
+
* Returns `{ blockName → "className" }`.
|
|
90
|
+
* New CSS rule strings are pushed to `pendingRules` as a side-effect.
|
|
91
|
+
*/
|
|
92
|
+
export declare function serializeRules(rules: CSSRulesInput, pendingRules: string[], options?: SerializeOptions): Record<string, string>;
|
|
93
|
+
/**
|
|
94
|
+
* Resets the class counter back to 0 and restores the default breakpoints.
|
|
95
|
+
* Intended for test isolation only — never call this in production code.
|
|
96
|
+
*/
|
|
97
|
+
export declare function resetAtomicCache(): void;
|
|
98
|
+
//# sourceMappingURL=serialize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../../../../lib/css-in-js/serialize.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,KAAK,GAAG,MAAM,SAAS,CAAC;AAKpC;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,cAAc,GAAG;KAC1B,CAAC,IAAI,MAAM,GAAG,CAAC,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;CAChD,GAAG;IACF,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC;CACjE,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,QAAQ,GAAG;KACpB,CAAC,IAAI,MAAM,GAAG,CAAC,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;CAChD,GAAG;IACF,CAAC,GAAG,EAAE,MAAM,GACR,GAAG,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,UAAU,CAAC,GACpC,cAAc,GACd,SAAS,CAAC;CACf,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAiCrD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC,GAAG,IAAI,CAIP;AA4DD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,uFAAuF;IACvF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,aAAa,EACpB,YAAY,EAAE,MAAM,EAAE,EACtB,OAAO,CAAC,EAAE,gBAAgB,GACzB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAmFxB;AAID;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAmBvC"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { type SerializeOptions } from "./serialize";
|
|
2
|
+
export type { CSSBlock, CSSNestedBlock, CSSRulesInput } from "./serialize";
|
|
3
|
+
export { configureCSS } from "./serialize";
|
|
4
|
+
import type * as CSS from "csstype";
|
|
5
|
+
import type { Cl, CSSRulesInput } from "./cl";
|
|
6
|
+
/**
|
|
7
|
+
* One stop inside a `@keyframes` rule.
|
|
8
|
+
* Keys are `"from"`, `"to"`, or percentage strings like `"0%"`, `"50%"`.
|
|
9
|
+
*/
|
|
10
|
+
export type CSSKeyframeStops = Record<string, CSS.Properties>;
|
|
11
|
+
/**
|
|
12
|
+
* A ref-counted, lazily-mounted CSS stylesheet.
|
|
13
|
+
*
|
|
14
|
+
* - Rules are serialized and buffered in `#pendingRules` immediately.
|
|
15
|
+
* - The sheet is only injected into the DOM when `mount()` is called (i.e.
|
|
16
|
+
* when the first component that owns this sheet mounts).
|
|
17
|
+
* - A ref-count tracks how many component instances are using the sheet.
|
|
18
|
+
* When the last one unmounts the sheet is removed from the DOM; the rules
|
|
19
|
+
* are preserved as pending so a subsequent re-mount re-injects everything.
|
|
20
|
+
*/
|
|
21
|
+
declare class StylesheetInstance {
|
|
22
|
+
#private;
|
|
23
|
+
/**
|
|
24
|
+
* Register a `@keyframes` animation into this sheet.
|
|
25
|
+
*
|
|
26
|
+
* @param name - A human-readable hint used as a prefix for the scoped name.
|
|
27
|
+
* @param stops - Stop map: `{ "from": { opacity: "0" }, "to": { opacity: "1" } }`
|
|
28
|
+
* @returns The scoped keyframe name to use in `animation` or `animationName`.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const { css, mount, keyframes } = stylesheet();
|
|
33
|
+
* mount();
|
|
34
|
+
*
|
|
35
|
+
* const fadeIn = keyframes("fadeIn", {
|
|
36
|
+
* from: { opacity: "0", transform: "translateY(-4px)" },
|
|
37
|
+
* to: { opacity: "1", transform: "translateY(0)" },
|
|
38
|
+
* });
|
|
39
|
+
*
|
|
40
|
+
* const cl = css({
|
|
41
|
+
* box: { animation: `${fadeIn} 0.3s ease` },
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
keyframes(name: string, stops: CSSKeyframeStops): string;
|
|
46
|
+
/**
|
|
47
|
+
* Buffer new CSS text coming from a `css()` call.
|
|
48
|
+
* If the sheet is already mounted the pending text is flushed to the DOM
|
|
49
|
+
* immediately; otherwise it waits until the first `mount()`.
|
|
50
|
+
*/
|
|
51
|
+
appendRules(cssText: string): void;
|
|
52
|
+
/**
|
|
53
|
+
* Increment the ref-count. On first mount, flush any pending rules and
|
|
54
|
+
* inject the sheet into the DOM.
|
|
55
|
+
*/
|
|
56
|
+
mount(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Decrement the ref-count. When it reaches 0 the sheet is removed from the
|
|
59
|
+
* DOM. The `#cssText` is moved back to `#pendingRules` so a subsequent
|
|
60
|
+
* `mount()` re-injects everything cleanly.
|
|
61
|
+
*/
|
|
62
|
+
unmount(): void;
|
|
63
|
+
get refCount(): number;
|
|
64
|
+
get cssText(): string;
|
|
65
|
+
get isMounted(): boolean;
|
|
66
|
+
get sheet(): CSSStyleSheet | null;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Create a per-component stylesheet.
|
|
70
|
+
*
|
|
71
|
+
* Returns `{ css, mount }`:
|
|
72
|
+
*
|
|
73
|
+
* - `css(rules)` — serialize a rules object into class names and buffer the
|
|
74
|
+
* generated CSS. Returns a `Cl<R>` — a plain frozen object whose keys are
|
|
75
|
+
* the block names from `rules` and whose values are the generated class name
|
|
76
|
+
* strings. Use directly: `class=${cl.card}`.
|
|
77
|
+
* - `mount()` — ref-counts the sheet's DOM presence. When called inside a
|
|
78
|
+
* component it hooks into `onMount`/cleanup automatically. When called
|
|
79
|
+
* outside a component (e.g. standalone scripts or benchmarks) it mounts
|
|
80
|
+
* the sheet immediately and returns an unmount function.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```ts
|
|
84
|
+
* const { css, mount } = stylesheet();
|
|
85
|
+
* mount();
|
|
86
|
+
*
|
|
87
|
+
* const cl = css({
|
|
88
|
+
* card: { display: "flex", padding: "1rem" },
|
|
89
|
+
* active: { backgroundColor: "blue" },
|
|
90
|
+
* });
|
|
91
|
+
*
|
|
92
|
+
* // In template — plain property lookup, zero runtime overhead:
|
|
93
|
+
* // html`<div class="${cl.card} ${isActive ? cl.active : ""}">…</div>`
|
|
94
|
+
* // or with the classes() directive for conditional logic:
|
|
95
|
+
* // html`<div ${classes([cl.card, [isActive, cl.active]])}>…</div>`
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
export declare function stylesheet(): {
|
|
99
|
+
css: CssFn;
|
|
100
|
+
mount: () => (() => void) | undefined;
|
|
101
|
+
keyframes: (name: string, stops: CSSKeyframeStops) => string;
|
|
102
|
+
};
|
|
103
|
+
type CssFn = <R extends CSSRulesInput>(rules: R) => Cl<R>;
|
|
104
|
+
/**
|
|
105
|
+
* Ensures the global sheet exists and schedules a single microtask to mount it.
|
|
106
|
+
* Called by both `globalCSS()` and global `keyframes()` — whichever runs first
|
|
107
|
+
* creates the sheet and queues the mount; subsequent calls before the microtask
|
|
108
|
+
* fires are no-ops.
|
|
109
|
+
*/
|
|
110
|
+
export declare function getGlobalSheet(): StylesheetInstance;
|
|
111
|
+
export declare function ensureGlobalMounted(): void;
|
|
112
|
+
/**
|
|
113
|
+
* Register a `@keyframes` animation into the global stylesheet.
|
|
114
|
+
*
|
|
115
|
+
* Mirrors `stylesheet().keyframes()` but uses the shared global sheet so it
|
|
116
|
+
* can be called at module level alongside `globalCSS()`.
|
|
117
|
+
*
|
|
118
|
+
* @param name - Human-readable hint used as the scoped-name prefix.
|
|
119
|
+
* @param stops - Stop map: `{ from: { opacity: "0" }, to: { opacity: "1" } }`
|
|
120
|
+
* @returns The scoped keyframe name to use in `animation` / `animationName`.
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```ts
|
|
124
|
+
* const fadeIn = keyframes("fadeIn", {
|
|
125
|
+
* from: { opacity: "0" },
|
|
126
|
+
* to: { opacity: "1" },
|
|
127
|
+
* });
|
|
128
|
+
*
|
|
129
|
+
* const styles = globalCSS({
|
|
130
|
+
* card: { animation: `${fadeIn} 0.4s ease` },
|
|
131
|
+
* });
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
export declare function keyframes(name: string, stops: CSSKeyframeStops): string;
|
|
135
|
+
/**
|
|
136
|
+
* Register global (app-level) CSS rules.
|
|
137
|
+
*
|
|
138
|
+
* - All calls share a single `StylesheetInstance` that is mounted once, via a
|
|
139
|
+
* microtask, and never unmounted.
|
|
140
|
+
* - Multiple `globalCSS()` calls before the microtask fires are batched: only
|
|
141
|
+
* one `mount()` call is made.
|
|
142
|
+
* - Returns a `Cl<R>` so the generated class names can be used exactly like
|
|
143
|
+
* those from `css()`.
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```ts
|
|
147
|
+
* const utils = globalCSS({
|
|
148
|
+
* srOnly: { position: "absolute", width: "1px", height: "1px",
|
|
149
|
+
* overflow: "hidden", clip: "rect(0,0,0,0)" },
|
|
150
|
+
* });
|
|
151
|
+
* // html`<span ${utils(["srOnly"])}>Screen-reader text</span>`
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
export declare function globalCSS<R extends CSSRulesInput>(rules: R, options?: SerializeOptions): Cl<R>;
|
|
155
|
+
/**
|
|
156
|
+
* Inject a raw CSS string directly into the global stylesheet.
|
|
157
|
+
*
|
|
158
|
+
* Use this for rules that cannot be expressed via `globalCSS()` — e.g.
|
|
159
|
+
* wildcard attribute selectors (`[class*="..."]`) or `@keyframes` blocks
|
|
160
|
+
* that rely on CSS custom properties (`var()`).
|
|
161
|
+
*
|
|
162
|
+
* Like `globalCSS()`, this must be called at module level (not inside a
|
|
163
|
+
* component or template function).
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* ```ts
|
|
167
|
+
* globalRawCSS(`
|
|
168
|
+
* [class*="mates-"] {
|
|
169
|
+
* animation-fill-mode: both;
|
|
170
|
+
* }
|
|
171
|
+
* `);
|
|
172
|
+
* ```
|
|
173
|
+
*/
|
|
174
|
+
export declare function globalRawCSS(css: string): void;
|
|
175
|
+
/**
|
|
176
|
+
* Resets the module-level global sheet state.
|
|
177
|
+
* Intended for test isolation only — never call this in production code.
|
|
178
|
+
*
|
|
179
|
+
* Clears `globalSheet` and `globalMicrotaskQueued` so each test starts with a
|
|
180
|
+
* clean slate and any pending microtask from a prior test cannot bleed over.
|
|
181
|
+
*/
|
|
182
|
+
export declare function resetGlobalSheet(): void;
|
|
183
|
+
/**
|
|
184
|
+
* Resets the keyframe counter back to 0.
|
|
185
|
+
* Intended for test isolation only — never call this in production code.
|
|
186
|
+
*/
|
|
187
|
+
export declare function resetKeyframeCounter(): void;
|
|
188
|
+
//# sourceMappingURL=stylesheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stylesheet.d.ts","sourceRoot":"","sources":["../../../../../lib/css-in-js/stylesheet.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,gBAAgB,EAAkB,MAAM,aAAa,CAAC;AAEpE,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,KAAK,KAAK,GAAG,MAAM,SAAS,CAAC;AAIpC,OAAO,KAAK,EAAE,EAAE,EAAE,aAAa,EAAE,MAAM,MAAM,CA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AAS,aAAa,EAC/C,KAAK,EAAE,CAAC,EACR,OAAO,CAAC,EAAE,gBAAgB,GACzB,EAAE,CAAC,CAAC,CAAC,CAWP;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAI9C;AAID;;;;;;GAMG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAGvC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { type ThemeAtomType } from "../Mutables/Extended Atoms/themeAtom";
|
|
2
|
+
/**
|
|
3
|
+
* A flat map of token names to CSS values.
|
|
4
|
+
* Keys may include or omit the leading "--".
|
|
5
|
+
* e.g. { primary: "#3b82f6" } or { "--primary": "#3b82f6" }
|
|
6
|
+
*/
|
|
7
|
+
export type ThemeTokenMap = Record<string, string>;
|
|
8
|
+
/**
|
|
9
|
+
* The themes object passed to globalTheme().
|
|
10
|
+
* Keys are theme names ("light", "dark", "high-contrast", …).
|
|
11
|
+
* Values are flat token maps.
|
|
12
|
+
*
|
|
13
|
+
* Convention (Option A):
|
|
14
|
+
* - first key → light base → injected on :root
|
|
15
|
+
* - second key → dark theme → injected on [data-theme="<name>"] AND
|
|
16
|
+
* @media (prefers-color-scheme: dark) { :root:not([data-theme]) }
|
|
17
|
+
* - any further keys → explicit [data-theme="<name>"] only
|
|
18
|
+
*/
|
|
19
|
+
export type ThemesInput = Record<string, ThemeTokenMap>;
|
|
20
|
+
/**
|
|
21
|
+
* cssVars returned by globalTheme().
|
|
22
|
+
* Every key from the first (base) theme maps to its CSS variable name string.
|
|
23
|
+
* e.g. cssVars.primary → "--primary"
|
|
24
|
+
* Use as: `var(${cssVars.primary})`
|
|
25
|
+
*/
|
|
26
|
+
export type CssVars<T extends ThemeTokenMap> = {
|
|
27
|
+
readonly [K in keyof T]: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* "auto" is always included. All defined theme names are also valid.
|
|
31
|
+
*/
|
|
32
|
+
export type ThemeMode<T extends ThemesInput> = "auto" | (string & keyof T);
|
|
33
|
+
export type GlobalThemeResult<T extends ThemesInput> = {
|
|
34
|
+
/** Plain object: tokenKey → "--token-key" (the CSS variable name, no var() wrapper). */
|
|
35
|
+
cssVars: CssVars<T[keyof T]>;
|
|
36
|
+
/**
|
|
37
|
+
* The singleton theme atom shared across the entire app.
|
|
38
|
+
* Call `.setToDark()`, `.setToLight()`, `.setToAuto()`, or `.toggle()`.
|
|
39
|
+
* Reads/writes localStorage & data-theme on <html>.
|
|
40
|
+
* Always the same instance as `themeAtom()` from mates.
|
|
41
|
+
*/
|
|
42
|
+
themeAtom: ThemeAtomType;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Define your application's themes as named token maps.
|
|
46
|
+
*
|
|
47
|
+
* Convention (first key = light base, second key = dark):
|
|
48
|
+
*
|
|
49
|
+
* ```ts
|
|
50
|
+
* export const { cssVars, themeAtom } = globalTheme({
|
|
51
|
+
* light: { primary: "#3b82f6", bg: "#ffffff", text: "#111827" },
|
|
52
|
+
* dark: { primary: "#60a5fa", bg: "#0f172a", text: "#f1f5f9" },
|
|
53
|
+
* });
|
|
54
|
+
*
|
|
55
|
+
* // cssVars.primary → "--primary"
|
|
56
|
+
* // use as: `var(${cssVars.primary})`
|
|
57
|
+
*
|
|
58
|
+
* // themeAtom is AtomType<"auto" | "light" | "dark">
|
|
59
|
+
* themeAtom.set("dark");
|
|
60
|
+
* themeAtom.set("auto"); // hands control back to the OS
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* CSS injected (for the example above):
|
|
64
|
+
*
|
|
65
|
+
* ```css
|
|
66
|
+
* :root { --primary: #3b82f6; ... } ← light base
|
|
67
|
+
* [data-theme="light"] { --primary: #3b82f6; ... } ← explicit light
|
|
68
|
+
* [data-theme="dark"] { --primary: #60a5fa; ... } ← explicit dark
|
|
69
|
+
* @media (prefers-color-scheme: dark) {
|
|
70
|
+
* :root:not([data-theme]) { --primary: #60a5fa; ... } ← auto OS dark
|
|
71
|
+
* }
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* To prevent flash-of-wrong-theme, add this inline script as the very first
|
|
75
|
+
* child of <head> (before any stylesheet):
|
|
76
|
+
*
|
|
77
|
+
* ```html
|
|
78
|
+
* <script>
|
|
79
|
+
* (function(){
|
|
80
|
+
* var t = localStorage.getItem("mates-theme");
|
|
81
|
+
* if (t && t !== "auto") document.documentElement.setAttribute("data-theme", t);
|
|
82
|
+
* })();
|
|
83
|
+
* </script>
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
export declare function globalTheme<T extends ThemesInput>(themes: T): GlobalThemeResult<T>;
|
|
87
|
+
/**
|
|
88
|
+
* Inject a flat map of CSS properties into `:root` via the global sheet.
|
|
89
|
+
*
|
|
90
|
+
* Intended for base token overrides — e.g. Material Web component sizing,
|
|
91
|
+
* shape, and typography tokens. Keys may be CSS custom properties (`--my-var`)
|
|
92
|
+
* or plain camelCase/kebab-case properties (`fontFamily`, `font-family`).
|
|
93
|
+
*
|
|
94
|
+
* Like `globalCSS()`, injection is microtask-deferred and happens only once.
|
|
95
|
+
* Safe to call from multiple modules at startup — all rules accumulate into the
|
|
96
|
+
* same singleton sheet.
|
|
97
|
+
*
|
|
98
|
+
* ```ts
|
|
99
|
+
* // app/tokens.ts ← module level
|
|
100
|
+
* import { rootCSS } from "mates/css-in-js";
|
|
101
|
+
*
|
|
102
|
+
* rootCSS({
|
|
103
|
+
* "--md-filled-button-container-height": "2.125rem",
|
|
104
|
+
* "--md-sys-shape-corner-full": "9999px",
|
|
105
|
+
* fontFamily: '"Roboto", sans-serif',
|
|
106
|
+
* });
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
export declare function rootCSS<T extends Record<string, string>>(tokens: T): T;
|
|
110
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../../lib/css-in-js/theme.ts"],"names":[],"mappings":"AAeA,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,sCAAsC,CAAC;AAI9C;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAExD;;;;;GAKG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,aAAa,IAAI;IAC7C,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,MAAM;CAChC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,WAAW,IAAI,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC;AAE3E,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,WAAW,IAAI;IACrD,wFAAwF;IACxF,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC7B;;;;;OAKG;IACH,SAAS,EAAE,aAAa,CAAC;CAC1B,CAAC;AA4CF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,WAAW,EAC/C,MAAM,EAAE,CAAC,GACR,iBAAiB,CAAC,CAAC,CAAC,CAmDtB;AAID;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAQrE"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DevTools Hooks Bridge
|
|
3
|
+
*
|
|
4
|
+
* This module provides a set of no-op function stubs that `x-x.ts` (the core
|
|
5
|
+
* component system) and other core modules (`atom.ts`, `events.ts`) call
|
|
6
|
+
* instead of directly importing devtools modules.
|
|
7
|
+
*
|
|
8
|
+
* When devtools code is never imported (i.e. production), these remain as
|
|
9
|
+
* empty no-ops and the bundler can tree-shake the entire devtools directory.
|
|
10
|
+
*
|
|
11
|
+
* When devtools IS imported (dev mode), the devtools modules call the
|
|
12
|
+
* `installDevToolsHooks()` function to replace these stubs with real
|
|
13
|
+
* implementations, wiring up registry, logging, and perf tracking.
|
|
14
|
+
*
|
|
15
|
+
* This breaks the static import chain:
|
|
16
|
+
* x-x.ts ──✕──> devtools/registry.ts
|
|
17
|
+
* atom.ts ──✕──> devtools/logStore.ts
|
|
18
|
+
* events.ts ──✕──> devtools/logStore.ts
|
|
19
|
+
* x-x.ts ──✕──> devtools/perfStore.ts
|
|
20
|
+
*
|
|
21
|
+
* Instead:
|
|
22
|
+
* x-x.ts / atom.ts / events.ts ────> devtoolsHooks.ts (tiny, no-op stubs)
|
|
23
|
+
* mates-devtools package ────> installDevToolsHooks() (fills in real impls)
|
|
24
|
+
*/
|
|
25
|
+
export interface DevToolsHooks {
|
|
26
|
+
/** Register a component when it mounts */
|
|
27
|
+
registerComponent: (component: any, viewFn: Function) => void;
|
|
28
|
+
/** Unregister a component when it unmounts */
|
|
29
|
+
unregisterComponent: (component: any, viewFn: Function | null) => void;
|
|
30
|
+
/** Notify devtools that a component re-rendered */
|
|
31
|
+
notifyRender: (component: any) => void;
|
|
32
|
+
/** Get display name for a component */
|
|
33
|
+
getComponentName: (component: any) => string;
|
|
34
|
+
/** Log a component mount */
|
|
35
|
+
logComponentMount: (name: string) => void;
|
|
36
|
+
/** Log a component render with duration */
|
|
37
|
+
logComponentRender: (name: string, durationMs: number) => void;
|
|
38
|
+
/** Log a component unmount */
|
|
39
|
+
logComponentUnmount: (name: string) => void;
|
|
40
|
+
/** Log an atom set call */
|
|
41
|
+
logAtomSet: (name: string, value: unknown) => void;
|
|
42
|
+
/** Log an atom update call */
|
|
43
|
+
logAtomUpdate: (name: string) => void;
|
|
44
|
+
/** Log an event trigger */
|
|
45
|
+
logEventTrigger: (name: string, data: unknown) => void;
|
|
46
|
+
/** Log a cleanup event trigger */
|
|
47
|
+
logCleanupEventTrigger: (name: string, data: unknown) => void;
|
|
48
|
+
/** Log an outgoing fetch request */
|
|
49
|
+
logFetchRequest: (method: string, url: string, payload?: string) => void;
|
|
50
|
+
/** Log a successful fetch response */
|
|
51
|
+
logFetchResponse: (method: string, url: string, status: number, durationMs: number) => void;
|
|
52
|
+
/** Log a failed fetch request */
|
|
53
|
+
logFetchError: (method: string, url: string, error: string, durationMs: number) => void;
|
|
54
|
+
/** Record a render timing for the perf tab */
|
|
55
|
+
recordRender: (componentName: string, instanceId: number, durationMs: number) => void;
|
|
56
|
+
}
|
|
57
|
+
/** Register a component when it mounts (no-op until devtools is loaded) */
|
|
58
|
+
export declare function dtRegisterComponent(component: any, viewFn: Function): void;
|
|
59
|
+
/** Unregister a component when it unmounts (no-op until devtools is loaded) */
|
|
60
|
+
export declare function dtUnregisterComponent(component: any, viewFn: Function | null): void;
|
|
61
|
+
/** Notify devtools that a component re-rendered (no-op until devtools is loaded) */
|
|
62
|
+
export declare function dtNotifyRender(component: any): void;
|
|
63
|
+
/** Get display name for a component (returns "Anonymous" until devtools is loaded) */
|
|
64
|
+
export declare function dtGetComponentName(component: any): string;
|
|
65
|
+
/** Log a component mount (no-op until devtools is loaded) */
|
|
66
|
+
export declare function dtLogComponentMount(name: string): void;
|
|
67
|
+
/** Log a component render with duration (no-op until devtools is loaded) */
|
|
68
|
+
export declare function dtLogComponentRender(name: string, durationMs: number): void;
|
|
69
|
+
/** Log a component unmount (no-op until devtools is loaded) */
|
|
70
|
+
export declare function dtLogComponentUnmount(name: string): void;
|
|
71
|
+
/** Log an atom set call (no-op until devtools is loaded) */
|
|
72
|
+
export declare function dtLogAtomSet(name: string, value: unknown): void;
|
|
73
|
+
/** Log an atom update call (no-op until devtools is loaded) */
|
|
74
|
+
export declare function dtLogAtomUpdate(name: string): void;
|
|
75
|
+
/** Log an event trigger (no-op until devtools is loaded) */
|
|
76
|
+
export declare function dtLogEventTrigger(name: string, data: unknown): void;
|
|
77
|
+
/** Log a cleanup event trigger (no-op until devtools is loaded) */
|
|
78
|
+
export declare function dtLogCleanupEventTrigger(name: string, data: unknown): void;
|
|
79
|
+
/** Log an outgoing fetch request (no-op until devtools is loaded) */
|
|
80
|
+
export declare function dtLogFetchRequest(method: string, url: string, payload?: string): void;
|
|
81
|
+
/** Log a successful fetch response (no-op until devtools is loaded) */
|
|
82
|
+
export declare function dtLogFetchResponse(method: string, url: string, status: number, durationMs: number): void;
|
|
83
|
+
/** Log a failed fetch request (no-op until devtools is loaded) */
|
|
84
|
+
export declare function dtLogFetchError(method: string, url: string, error: string, durationMs: number): void;
|
|
85
|
+
/** Record a render timing for the perf tab (no-op until devtools is loaded) */
|
|
86
|
+
export declare function dtRecordRender(componentName: string, instanceId: number, durationMs: number): void;
|
|
87
|
+
/**
|
|
88
|
+
* Replace the no-op stubs with real devtools implementations.
|
|
89
|
+
*
|
|
90
|
+
* Called once when the mates-devtools package is first imported. This is what
|
|
91
|
+
* bridges the gap: devtools code calls this to wire itself into the
|
|
92
|
+
* component lifecycle without x-x.ts / atom.ts / events.ts needing a static
|
|
93
|
+
* import on any devtools module.
|
|
94
|
+
*/
|
|
95
|
+
export declare function installDevToolsHooks(real: Partial<DevToolsHooks>): void;
|
|
96
|
+
/**
|
|
97
|
+
* Returns true if devtools hooks have been installed (i.e. devtools is active).
|
|
98
|
+
* Can be used as a fast gate before doing devtools-only work.
|
|
99
|
+
*/
|
|
100
|
+
export declare function isDevToolsInstalled(): boolean;
|
|
101
|
+
//# sourceMappingURL=devtoolsHooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devtoolsHooks.d.ts","sourceRoot":"","sources":["../../../../../lib/devtools/devtoolsHooks.ts"],"names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