mates 0.0.21 → 0.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1598 -257
- package/dist/Directives/$.d.ts +371 -0
- package/dist/Directives/$.d.ts.map +1 -0
- package/dist/Directives/animatedConditional.d.ts +67 -0
- package/dist/Directives/animatedConditional.d.ts.map +1 -0
- package/dist/Directives/animationClasses.d.ts +50 -0
- package/dist/Directives/animationClasses.d.ts.map +1 -0
- package/dist/Directives/attrDirective.d.ts +69 -0
- package/dist/Directives/attrDirective.d.ts.map +1 -0
- package/dist/Directives/classesDirective.d.ts +79 -0
- package/dist/Directives/classesDirective.d.ts.map +1 -0
- package/dist/Directives/eleHook.d.ts +84 -0
- package/dist/Directives/eleHook.d.ts.map +1 -0
- package/dist/Directives/eventBinding.d.ts +29 -0
- package/dist/Directives/eventBinding.d.ts.map +1 -0
- package/dist/Directives/htmlHook.d.ts +101 -0
- package/dist/Directives/htmlHook.d.ts.map +1 -0
- package/dist/Directives/index.d.ts +18 -0
- package/dist/Directives/index.d.ts.map +1 -0
- package/dist/Directives/intersectDirective.d.ts +67 -0
- package/dist/Directives/intersectDirective.d.ts.map +1 -0
- package/dist/Directives/lazyLoadDirective.d.ts +66 -0
- package/dist/Directives/lazyLoadDirective.d.ts.map +1 -0
- package/dist/Directives/lifecycleDirectives.d.ts +56 -0
- package/dist/Directives/lifecycleDirectives.d.ts.map +1 -0
- package/dist/Directives/masonryGrid.d.ts +114 -0
- package/dist/Directives/masonryGrid.d.ts.map +1 -0
- package/dist/Directives/memoTemplate.d.ts +94 -0
- package/dist/Directives/memoTemplate.d.ts.map +1 -0
- package/dist/Directives/onDirective.d.ts +71 -0
- package/dist/Directives/onDirective.d.ts.map +1 -0
- package/dist/Directives/onParentDirective.d.ts +34 -0
- package/dist/Directives/onParentDirective.d.ts.map +1 -0
- package/dist/Directives/renderSwitch.d.ts +55 -0
- package/dist/Directives/renderSwitch.d.ts.map +1 -0
- package/dist/Directives/resolveAttrValue.d.ts +35 -0
- package/dist/Directives/resolveAttrValue.d.ts.map +1 -0
- package/dist/Directives/styleDirective.d.ts +81 -0
- package/dist/Directives/styleDirective.d.ts.map +1 -0
- package/dist/Directives/timerDirective.d.ts +52 -0
- package/dist/Directives/timerDirective.d.ts.map +1 -0
- package/dist/Directives/virtualHelpers.d.ts +10 -0
- package/dist/Directives/virtualHelpers.d.ts.map +1 -0
- package/dist/Fetch/ErrorTypes.d.ts +74 -0
- package/dist/Fetch/ErrorTypes.d.ts.map +1 -0
- package/dist/Fetch/Fetch.d.ts +168 -0
- package/dist/Fetch/Fetch.d.ts.map +1 -0
- package/dist/Fetch/index.d.ts +3 -0
- package/dist/Fetch/index.d.ts.map +1 -0
- package/dist/Mutables/Extended Atoms/cacheAtom.d.ts +156 -0
- package/dist/Mutables/Extended Atoms/cacheAtom.d.ts.map +1 -0
- package/dist/Mutables/Extended Atoms/index.d.ts +4 -0
- package/dist/Mutables/Extended Atoms/index.d.ts.map +1 -0
- package/dist/Mutables/Extended Atoms/paginationAtom.d.ts +32 -0
- package/dist/Mutables/Extended Atoms/paginationAtom.d.ts.map +1 -0
- package/dist/Mutables/Extended Atoms/themeAtom.d.ts +59 -0
- package/dist/Mutables/Extended Atoms/themeAtom.d.ts.map +1 -0
- package/dist/Mutables/atom/atom.d.ts +148 -0
- package/dist/Mutables/atom/atom.d.ts.map +1 -0
- package/dist/Mutables/atom/createTimedAtom.d.ts +43 -0
- package/dist/Mutables/atom/createTimedAtom.d.ts.map +1 -0
- package/dist/Mutables/atom/debouncedAtom.d.ts +37 -0
- package/dist/Mutables/atom/debouncedAtom.d.ts.map +1 -0
- package/dist/Mutables/atom/index.d.ts +10 -0
- package/dist/Mutables/atom/index.d.ts.map +1 -0
- package/dist/Mutables/atom/mapAtom.d.ts +105 -0
- package/dist/Mutables/atom/mapAtom.d.ts.map +1 -0
- package/dist/Mutables/atom/setAtom.d.ts +107 -0
- package/dist/Mutables/atom/setAtom.d.ts.map +1 -0
- package/dist/Mutables/atom/storageAtom.d.ts +44 -0
- package/dist/Mutables/atom/storageAtom.d.ts.map +1 -0
- package/dist/Mutables/atom/throttledAtom.d.ts +37 -0
- package/dist/Mutables/atom/throttledAtom.d.ts.map +1 -0
- package/dist/Mutables/atom/titleAtom.d.ts +20 -0
- package/dist/Mutables/atom/titleAtom.d.ts.map +1 -0
- package/dist/Mutables/effect/effect.d.ts +31 -0
- package/dist/Mutables/effect/effect.d.ts.map +1 -0
- package/dist/Mutables/effect/index.d.ts +2 -0
- package/dist/Mutables/effect/index.d.ts.map +1 -0
- package/dist/Mutables/events/events.d.ts +123 -0
- package/dist/Mutables/events/events.d.ts.map +1 -0
- package/dist/Mutables/events/index.d.ts +2 -0
- package/dist/Mutables/events/index.d.ts.map +1 -0
- package/dist/Mutables/events/xTabEvent.d.ts +61 -0
- package/dist/Mutables/events/xTabEvent.d.ts.map +1 -0
- package/dist/Mutables/form/formAtom.d.ts +56 -0
- package/dist/Mutables/form/formAtom.d.ts.map +1 -0
- package/dist/Mutables/form/index.d.ts +5 -0
- package/dist/Mutables/form/index.d.ts.map +1 -0
- package/dist/Mutables/form/transformers.d.ts +4 -0
- package/dist/Mutables/form/transformers.d.ts.map +1 -0
- package/dist/Mutables/form/validateAll.d.ts +40 -0
- package/dist/Mutables/form/validateAll.d.ts.map +1 -0
- package/dist/Mutables/form/validators.d.ts +61 -0
- package/dist/Mutables/form/validators.d.ts.map +1 -0
- package/dist/Mutables/index.d.ts +13 -0
- package/dist/Mutables/index.d.ts.map +1 -0
- package/dist/Mutables/memo/index.d.ts +2 -0
- package/dist/Mutables/memo/index.d.ts.map +1 -0
- package/dist/Mutables/memo/memo.d.ts +47 -0
- package/dist/Mutables/memo/memo.d.ts.map +1 -0
- package/dist/Mutables/reactiveRunner/index.d.ts +4 -0
- package/dist/Mutables/reactiveRunner/index.d.ts.map +1 -0
- package/dist/Mutables/reactiveRunner/reactiveRunner.d.ts +56 -0
- package/dist/Mutables/reactiveRunner/reactiveRunner.d.ts.map +1 -0
- package/dist/Mutables/reactiveRunner/trackAndSubscribe.d.ts +6 -0
- package/dist/Mutables/reactiveRunner/trackAndSubscribe.d.ts.map +1 -0
- package/dist/Mutables/reactiveRunner/validateReactiveFunction.d.ts +6 -0
- package/dist/Mutables/reactiveRunner/validateReactiveFunction.d.ts.map +1 -0
- package/dist/Mutables/ref/index.d.ts +2 -0
- package/dist/Mutables/ref/index.d.ts.map +1 -0
- package/dist/Mutables/ref/ref.d.ts +74 -0
- package/dist/Mutables/ref/ref.d.ts.map +1 -0
- package/dist/Mutables/scope/index.d.ts +2 -0
- package/dist/Mutables/scope/index.d.ts.map +1 -0
- package/dist/Mutables/scope/scope.d.ts +60 -0
- package/dist/Mutables/scope/scope.d.ts.map +1 -0
- package/dist/Mutables/store/index.d.ts +2 -0
- package/dist/Mutables/store/index.d.ts.map +1 -0
- package/dist/Mutables/store/store.d.ts +73 -0
- package/dist/Mutables/store/store.d.ts.map +1 -0
- package/dist/Mutables/useState/index.d.ts +2 -0
- package/dist/Mutables/useState/index.d.ts.map +1 -0
- package/dist/Mutables/useState/useState.d.ts +54 -0
- package/dist/Mutables/useState/useState.d.ts.map +1 -0
- package/dist/Mutables/useStore/hostContext.d.ts +13 -0
- package/dist/Mutables/useStore/hostContext.d.ts.map +1 -0
- package/dist/Mutables/useStore/index.d.ts +9 -0
- package/dist/Mutables/useStore/index.d.ts.map +1 -0
- package/dist/Mutables/useStore/lifecycle.d.ts +94 -0
- package/dist/Mutables/useStore/lifecycle.d.ts.map +1 -0
- package/dist/Mutables/useStore/onError.d.ts +21 -0
- package/dist/Mutables/useStore/onError.d.ts.map +1 -0
- package/dist/Mutables/useStore/onReferenceChange.d.ts +2 -0
- package/dist/Mutables/useStore/onReferenceChange.d.ts.map +1 -0
- package/dist/Mutables/useStore/safetyCheck.d.ts +2 -0
- package/dist/Mutables/useStore/safetyCheck.d.ts.map +1 -0
- package/dist/Mutables/useStore/setter.d.ts +52 -0
- package/dist/Mutables/useStore/setter.d.ts.map +1 -0
- package/dist/Mutables/useStore/subscription.d.ts +50 -0
- package/dist/Mutables/useStore/subscription.d.ts.map +1 -0
- package/dist/Mutables/useStore/useContext.d.ts +3 -0
- package/dist/Mutables/useStore/useContext.d.ts.map +1 -0
- package/dist/Mutables/useStore/useStore.d.ts +7 -0
- package/dist/Mutables/useStore/useStore.d.ts.map +1 -0
- package/dist/Router/Router.d.ts +54 -0
- package/dist/Router/Router.d.ts.map +1 -0
- package/dist/Router/animatedRouter.d.ts +48 -0
- package/dist/Router/animatedRouter.d.ts.map +1 -0
- package/dist/Router/buildPath.d.ts +20 -0
- package/dist/Router/buildPath.d.ts.map +1 -0
- package/dist/Router/hashAtom.d.ts +12 -0
- package/dist/Router/hashAtom.d.ts.map +1 -0
- package/dist/Router/index.d.ts +11 -0
- package/dist/Router/index.d.ts.map +1 -0
- package/dist/Router/isPathMatching.d.ts +12 -0
- package/dist/Router/isPathMatching.d.ts.map +1 -0
- package/dist/Router/location.d.ts +74 -0
- package/dist/Router/location.d.ts.map +1 -0
- package/dist/Router/navigateTo.d.ts +31 -0
- package/dist/Router/navigateTo.d.ts.map +1 -0
- package/dist/Router/navigationLock.d.ts +50 -0
- package/dist/Router/navigationLock.d.ts.map +1 -0
- package/dist/Router/pathAtom.d.ts +42 -0
- package/dist/Router/pathAtom.d.ts.map +1 -0
- package/dist/Router/pathResolver.d.ts +9 -0
- package/dist/Router/pathResolver.d.ts.map +1 -0
- package/dist/Router/qsAtom.d.ts +12 -0
- package/dist/Router/qsAtom.d.ts.map +1 -0
- package/dist/Template/index.d.ts +6 -0
- package/dist/Template/index.d.ts.map +1 -0
- package/dist/Template/scheduler.d.ts +59 -0
- package/dist/Template/scheduler.d.ts.map +1 -0
- package/dist/Template/x-x.d.ts +60 -0
- package/dist/Template/x-x.d.ts.map +1 -0
- package/dist/Template/x-x.types.d.ts +91 -0
- package/dist/Template/x-x.types.d.ts.map +1 -0
- package/dist/Template/x-x.utils.d.ts +15 -0
- package/dist/Template/x-x.utils.d.ts.map +1 -0
- package/dist/Template/x.d.ts +5 -0
- package/dist/Template/x.d.ts.map +1 -0
- package/dist/{lib → Template}/xProvider.d.ts.map +1 -1
- package/dist/Timers/createManagedTimer.d.ts +12 -0
- package/dist/Timers/createManagedTimer.d.ts.map +1 -0
- package/dist/Timers/index.d.ts +4 -0
- package/dist/Timers/index.d.ts.map +1 -0
- package/dist/Timers/interval.d.ts +2 -0
- package/dist/Timers/interval.d.ts.map +1 -0
- package/dist/Timers/timeout.d.ts +2 -0
- package/dist/Timers/timeout.d.ts.map +1 -0
- package/dist/TrackState/componentStatus.d.ts +105 -0
- package/dist/TrackState/componentStatus.d.ts.map +1 -0
- package/dist/TrackState/index.d.ts +3 -0
- package/dist/TrackState/index.d.ts.map +1 -0
- package/dist/TrackState/readTracking.d.ts +20 -0
- package/dist/TrackState/readTracking.d.ts.map +1 -0
- package/dist/Utils/Context.d.ts.map +1 -0
- package/dist/Utils/Date/__tests__/shared.d.ts +13 -0
- package/dist/Utils/Date/__tests__/shared.d.ts.map +1 -0
- package/dist/Utils/Date/calendar.d.ts +30 -0
- package/dist/Utils/Date/calendar.d.ts.map +1 -0
- package/dist/Utils/Date/core.d.ts +29 -0
- package/dist/Utils/Date/core.d.ts.map +1 -0
- package/dist/Utils/Date/date.d.ts +60 -0
- package/dist/Utils/Date/date.d.ts.map +1 -0
- package/dist/Utils/Date/index.d.ts +3 -0
- package/dist/Utils/Date/index.d.ts.map +1 -0
- package/dist/Utils/deepClone.d.ts +7 -0
- package/dist/Utils/deepClone.d.ts.map +1 -0
- package/dist/Utils/deepFreeze.d.ts +2 -0
- package/dist/Utils/deepFreeze.d.ts.map +1 -0
- package/dist/Utils/getAllProps.d.ts +2 -0
- package/dist/Utils/getAllProps.d.ts.map +1 -0
- package/dist/Utils/helpers.d.ts +13 -0
- package/dist/Utils/helpers.d.ts.map +1 -0
- package/dist/Utils/index.d.ts +13 -0
- package/dist/Utils/index.d.ts.map +1 -0
- package/dist/Utils/is.d.ts +12 -0
- package/dist/Utils/is.d.ts.map +1 -0
- package/dist/Utils/isDefinedAsGetter.d.ts +2 -0
- package/dist/Utils/isDefinedAsGetter.d.ts.map +1 -0
- package/dist/Utils/logger.d.ts +22 -0
- package/dist/Utils/logger.d.ts.map +1 -0
- package/dist/Utils/notificationManager.d.ts +67 -0
- package/dist/Utils/notificationManager.d.ts.map +1 -0
- package/dist/Utils/registerCleanup.d.ts +7 -0
- package/dist/Utils/registerCleanup.d.ts.map +1 -0
- package/dist/Utils/svgIcon.d.ts +95 -0
- package/dist/Utils/svgIcon.d.ts.map +1 -0
- package/dist/Utils/uuid.d.ts +7 -0
- package/dist/Utils/uuid.d.ts.map +1 -0
- package/dist/ZeroPromise/index.d.ts +2 -0
- package/dist/ZeroPromise/index.d.ts.map +1 -0
- package/dist/ZeroPromise/zero.d.ts +23 -0
- package/dist/ZeroPromise/zero.d.ts.map +1 -0
- package/dist/actions/FetchAction.d.ts +2 -0
- package/dist/actions/FetchAction.d.ts.map +1 -0
- package/dist/actions/__benches__/asyncAction.bench.d.ts +24 -0
- package/dist/actions/__benches__/asyncAction.bench.d.ts.map +1 -0
- package/dist/actions/action.d.ts +14 -0
- package/dist/actions/action.d.ts.map +1 -0
- package/dist/actions/animatePresets.d.ts +38 -0
- package/dist/actions/animatePresets.d.ts.map +1 -0
- package/dist/actions/animateSwap.d.ts +79 -0
- package/dist/actions/animateSwap.d.ts.map +1 -0
- package/dist/actions/animateTypes.d.ts +103 -0
- package/dist/actions/animateTypes.d.ts.map +1 -0
- package/dist/actions/asyncAction.d.ts +4 -0
- package/dist/actions/asyncAction.d.ts.map +1 -0
- package/dist/actions/asyncActionCache.d.ts +16 -0
- package/dist/actions/asyncActionCache.d.ts.map +1 -0
- package/dist/actions/asyncActionPolling.d.ts +14 -0
- package/dist/actions/asyncActionPolling.d.ts.map +1 -0
- package/dist/actions/asyncActionTypes.d.ts +74 -0
- package/dist/actions/asyncActionTypes.d.ts.map +1 -0
- package/dist/actions/createTimingFunction.d.ts +23 -0
- package/dist/actions/createTimingFunction.d.ts.map +1 -0
- package/dist/actions/debounce.d.ts +10 -0
- package/dist/actions/debounce.d.ts.map +1 -0
- package/dist/actions/index.d.ts +12 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/paginatedAsyncAction.d.ts +121 -0
- package/dist/actions/paginatedAsyncAction.d.ts.map +1 -0
- package/dist/actions/taskAction.d.ts +105 -0
- package/dist/actions/taskAction.d.ts.map +1 -0
- package/dist/actions/throttle.d.ts +9 -0
- package/dist/actions/throttle.d.ts.map +1 -0
- package/dist/css-in-js/cl.d.ts +37 -0
- package/dist/css-in-js/cl.d.ts.map +1 -0
- package/dist/css-in-js/index.d.ts +7 -0
- package/dist/css-in-js/index.d.ts.map +1 -0
- package/dist/css-in-js/sanitize.d.ts +31 -0
- package/dist/css-in-js/sanitize.d.ts.map +1 -0
- package/dist/css-in-js/serialize.d.ts +98 -0
- package/dist/css-in-js/serialize.d.ts.map +1 -0
- package/dist/css-in-js/stylesheet.bench.d.ts +2 -0
- package/dist/css-in-js/stylesheet.bench.d.ts.map +1 -0
- package/dist/css-in-js/stylesheet.d.ts +188 -0
- package/dist/css-in-js/stylesheet.d.ts.map +1 -0
- package/dist/css-in-js/theme.d.ts +105 -0
- package/dist/css-in-js/theme.d.ts.map +1 -0
- package/dist/devtools/devtoolsHooks.d.ts +101 -0
- package/dist/devtools/devtoolsHooks.d.ts.map +1 -0
- package/dist/devtools/index.d.ts +2 -0
- package/dist/devtools/index.d.ts.map +1 -0
- package/dist/dist/styles.css +1 -0
- package/dist/index.d.ts +5439 -977
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +132 -16
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +135 -18
- package/dist/index.js.map +1 -1
- package/dist/on/hooks.d.ts +319 -0
- package/dist/on/hooks.d.ts.map +1 -0
- package/dist/on/index.d.ts +3 -0
- package/dist/on/index.d.ts.map +1 -0
- package/dist/on/on.d.ts +16 -0
- package/dist/on/on.d.ts.map +1 -0
- package/dist/portals/dialog.d.ts +56 -0
- package/dist/portals/dialog.d.ts.map +1 -0
- package/dist/portals/index.d.ts +9 -0
- package/dist/portals/index.d.ts.map +1 -0
- package/dist/portals/popup.d.ts +37 -0
- package/dist/portals/popup.d.ts.map +1 -0
- package/dist/portals/portal.d.ts +57 -0
- package/dist/portals/portal.d.ts.map +1 -0
- package/dist/portals/tip.d.ts +38 -0
- package/dist/portals/tip.d.ts.map +1 -0
- package/dist/socket/index.d.ts +2 -0
- package/dist/socket/index.d.ts.map +1 -0
- package/dist/socket/ws.d.ts +83 -0
- package/dist/socket/ws.d.ts.map +1 -0
- package/dist/ssr/index.d.ts +3 -0
- package/dist/ssr/index.d.ts.map +1 -0
- package/dist/ssr/ssr-bridge.d.ts +89 -0
- package/dist/ssr/ssr-bridge.d.ts.map +1 -0
- package/dist/ssr/ssrFlag.d.ts +38 -0
- package/dist/ssr/ssrFlag.d.ts.map +1 -0
- package/dist/virtualizer/LitVirtualizer.d.ts +62 -0
- package/dist/virtualizer/LitVirtualizer.d.ts.map +1 -0
- package/dist/virtualizer/ScrollerController.d.ts +54 -0
- package/dist/virtualizer/ScrollerController.d.ts.map +1 -0
- package/dist/virtualizer/Virtualizer.d.ts +214 -0
- package/dist/virtualizer/Virtualizer.d.ts.map +1 -0
- package/dist/virtualizer/events.d.ts +27 -0
- package/dist/virtualizer/events.d.ts.map +1 -0
- package/dist/virtualizer/index.d.ts +2 -0
- package/dist/virtualizer/index.d.ts.map +1 -0
- package/dist/virtualizer/layouts/flexWrap.d.ts +65 -0
- package/dist/virtualizer/layouts/flexWrap.d.ts.map +1 -0
- package/dist/virtualizer/layouts/flow.d.ts +123 -0
- package/dist/virtualizer/layouts/flow.d.ts.map +1 -0
- package/dist/virtualizer/layouts/grid.d.ts +25 -0
- package/dist/virtualizer/layouts/grid.d.ts.map +1 -0
- package/dist/virtualizer/layouts/masonry.d.ts +37 -0
- package/dist/virtualizer/layouts/masonry.d.ts.map +1 -0
- package/dist/virtualizer/layouts/shared/BaseLayout.d.ts +204 -0
- package/dist/virtualizer/layouts/shared/BaseLayout.d.ts.map +1 -0
- package/dist/virtualizer/layouts/shared/GridBaseLayout.d.ts +41 -0
- package/dist/virtualizer/layouts/shared/GridBaseLayout.d.ts.map +1 -0
- package/dist/virtualizer/layouts/shared/Layout.d.ts +138 -0
- package/dist/virtualizer/layouts/shared/Layout.d.ts.map +1 -0
- package/dist/virtualizer/layouts/shared/SizeCache.d.ts +19 -0
- package/dist/virtualizer/layouts/shared/SizeCache.d.ts.map +1 -0
- package/dist/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.d.ts +57 -0
- package/dist/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.d.ts.map +1 -0
- package/dist/virtualizer/lit-virtualizer.d.ts +23 -0
- package/dist/virtualizer/lit-virtualizer.d.ts.map +1 -0
- package/dist/virtualizer/mates-adapter.d.ts +201 -0
- package/dist/virtualizer/mates-adapter.d.ts.map +1 -0
- package/dist/virtualizer/support/method-interception.d.ts +33 -0
- package/dist/virtualizer/support/method-interception.d.ts.map +1 -0
- package/dist/virtualizer/support/resize-observer-errors.d.ts +53 -0
- package/dist/virtualizer/support/resize-observer-errors.d.ts.map +1 -0
- package/dist/virtualizer/virtualize.d.ts +52 -0
- package/dist/virtualizer/virtualize.d.ts.map +1 -0
- package/package.json +25 -6
- package/dist/examples/src/Counter/Counter.d.ts +0 -2
- package/dist/examples/src/Counter/Counter.d.ts.map +0 -1
- package/dist/examples/src/Counter/CounterWithAtoms.d.ts +0 -2
- package/dist/examples/src/Counter/CounterWithAtoms.d.ts.map +0 -1
- package/dist/examples/src/Counter/index.d.ts +0 -3
- package/dist/examples/src/Counter/index.d.ts.map +0 -1
- package/dist/examples/src/Scope Examples/MultiScopeDemo.d.ts +0 -2
- package/dist/examples/src/Scope Examples/MultiScopeDemo.d.ts.map +0 -1
- package/dist/examples/src/Scope Examples/ScopeDemo.d.ts +0 -2
- package/dist/examples/src/Scope Examples/ScopeDemo.d.ts.map +0 -1
- package/dist/examples/src/Scope Examples/SimpleScopeExample.d.ts +0 -2
- package/dist/examples/src/Scope Examples/SimpleScopeExample.d.ts.map +0 -1
- package/dist/examples/src/Scope Examples/index.d.ts +0 -4
- package/dist/examples/src/Scope Examples/index.d.ts.map +0 -1
- package/dist/examples/src/Scopes Test/A.d.ts +0 -3
- package/dist/examples/src/Scopes Test/A.d.ts.map +0 -1
- package/dist/examples/src/ThemeContext.ts/ThemeDemo.d.ts +0 -4
- package/dist/examples/src/ThemeContext.ts/ThemeDemo.d.ts.map +0 -1
- package/dist/examples/src/Todo/Todo.d.ts +0 -2
- package/dist/examples/src/Todo/Todo.d.ts.map +0 -1
- package/dist/examples/src/Todo/TodoWithAtoms.d.ts +0 -2
- package/dist/examples/src/Todo/TodoWithAtoms.d.ts.map +0 -1
- package/dist/examples/src/Todo/index.d.ts +0 -3
- package/dist/examples/src/Todo/index.d.ts.map +0 -1
- package/dist/examples/src/main.d.ts +0 -3
- package/dist/examples/src/main.d.ts.map +0 -1
- package/dist/examples/vite.config.d.ts +0 -3
- package/dist/examples/vite.config.d.ts.map +0 -1
- package/dist/lib/Context.d.ts.map +0 -1
- package/dist/lib/atom.d.ts +0 -45
- package/dist/lib/atom.d.ts.map +0 -1
- package/dist/lib/bubbles.d.ts +0 -2
- package/dist/lib/bubbles.d.ts.map +0 -1
- package/dist/lib/compute.d.ts +0 -9
- package/dist/lib/compute.d.ts.map +0 -1
- package/dist/lib/index.d.ts +0 -31
- package/dist/lib/index.d.ts.map +0 -1
- package/dist/lib/molecule.d.ts +0 -16
- package/dist/lib/molecule.d.ts.map +0 -1
- package/dist/lib/pathResolver.d.ts +0 -9
- package/dist/lib/pathResolver.d.ts.map +0 -1
- package/dist/lib/scope.d.ts +0 -14
- package/dist/lib/scope.d.ts.map +0 -1
- package/dist/lib/store.d.ts +0 -2
- package/dist/lib/store.d.ts.map +0 -1
- package/dist/lib/styleDirectives.d.ts +0 -14
- package/dist/lib/styleDirectives.d.ts.map +0 -1
- package/dist/lib/units.d.ts +0 -12
- package/dist/lib/units.d.ts.map +0 -1
- package/dist/lib/useRefEffect.d.ts +0 -2
- package/dist/lib/useRefEffect.d.ts.map +0 -1
- package/dist/lib/useStore.d.ts +0 -26
- package/dist/lib/useStore.d.ts.map +0 -1
- package/dist/lib/view.d.ts +0 -8
- package/dist/lib/view.d.ts.map +0 -1
- package/dist/lib/x-view.d.ts +0 -40
- package/dist/lib/x-view.d.ts.map +0 -1
- /package/dist/{lib → Template}/xProvider.d.ts +0 -0
- /package/dist/{lib → Utils}/Context.d.ts +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
export interface SizeCacheConfig {
|
|
7
|
+
roundAverageSize?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare class SizeCache {
|
|
10
|
+
private _map;
|
|
11
|
+
private _roundAverageSize;
|
|
12
|
+
totalSize: number;
|
|
13
|
+
constructor(config?: SizeCacheConfig);
|
|
14
|
+
set(index: number | string, value: number): void;
|
|
15
|
+
get averageSize(): number;
|
|
16
|
+
getSize(index: number | string): number | undefined;
|
|
17
|
+
clear(): void;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=SizeCache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SizeCache.d.ts","sourceRoot":"","sources":["../../../../lib/virtualizer/layouts/shared/SizeCache.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,eAAe;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,qBAAa,SAAS;IACpB,OAAO,CAAC,IAAI,CAAsC;IAClD,OAAO,CAAC,iBAAiB,CAAS;IAClC,SAAS,SAAK;gBAEF,MAAM,CAAC,EAAE,eAAe;IAMpC,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAMhD,IAAI,WAAW,IAAI,MAAM,CAMxB;IAED,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAI9B,KAAK;CAIN"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
import { BaseLayout } from "./BaseLayout.js";
|
|
7
|
+
import type { BaseLayoutConfig, ScrollDirection, Size } from "./Layout.js";
|
|
8
|
+
export type PixelSize = `${"0" | `${number}px`}`;
|
|
9
|
+
type GapValue = PixelSize;
|
|
10
|
+
type TwoGapValues = `${GapValue} ${GapValue}`;
|
|
11
|
+
export type GapSpec = GapValue | TwoGapValues;
|
|
12
|
+
export type AutoGapSpec = PixelSize | `${PixelSize} ${PixelSize}` | `auto ${PixelSize}` | `${PixelSize} auto`;
|
|
13
|
+
type PaddingValue = PixelSize | "match-gap";
|
|
14
|
+
type TwoPaddingValues = `${PaddingValue} ${PaddingValue}`;
|
|
15
|
+
type ThreePaddingValues = `${TwoPaddingValues} ${PaddingValue}`;
|
|
16
|
+
type FourPaddingValues = `${ThreePaddingValues} ${PaddingValue}`;
|
|
17
|
+
type PaddingSpec = PaddingValue | TwoPaddingValues | ThreePaddingValues | FourPaddingValues;
|
|
18
|
+
type PixelDimensions = {
|
|
19
|
+
width: PixelSize;
|
|
20
|
+
height: PixelSize;
|
|
21
|
+
};
|
|
22
|
+
export declare function gap1(direction: ScrollDirection): "column" | "row";
|
|
23
|
+
export declare function gap2(direction: ScrollDirection): "column" | "row";
|
|
24
|
+
export declare function padding1(direction: ScrollDirection): [side, side];
|
|
25
|
+
export declare function padding2(direction: ScrollDirection): [side, side];
|
|
26
|
+
export interface SizeGapPaddingBaseLayoutConfig extends BaseLayoutConfig {
|
|
27
|
+
padding?: PaddingSpec;
|
|
28
|
+
itemSize?: PixelDimensions | PixelSize;
|
|
29
|
+
}
|
|
30
|
+
type gap = "row" | "column";
|
|
31
|
+
type side = "top" | "right" | "bottom" | "left";
|
|
32
|
+
type Gaps = {
|
|
33
|
+
[key in gap]: number;
|
|
34
|
+
};
|
|
35
|
+
type Padding = {
|
|
36
|
+
[key in side]: number;
|
|
37
|
+
};
|
|
38
|
+
export declare abstract class SizeGapPaddingBaseLayout<C extends SizeGapPaddingBaseLayoutConfig> extends BaseLayout<C> {
|
|
39
|
+
protected _itemSize: Size | {};
|
|
40
|
+
protected _gaps: Gaps | {};
|
|
41
|
+
protected _padding: Padding | {};
|
|
42
|
+
protected _getDefaultConfig(): C;
|
|
43
|
+
protected get _gap(): number;
|
|
44
|
+
protected get _idealSize(): number;
|
|
45
|
+
protected get _idealSize1(): number;
|
|
46
|
+
protected get _idealSize2(): number;
|
|
47
|
+
protected get _gap1(): number;
|
|
48
|
+
protected get _gap2(): number;
|
|
49
|
+
protected get _padding1(): [number, number];
|
|
50
|
+
protected get _padding2(): [number, number];
|
|
51
|
+
set itemSize(dims: PixelDimensions | PixelSize);
|
|
52
|
+
set gap(spec: GapSpec | AutoGapSpec);
|
|
53
|
+
protected _setGap(spec: GapSpec | AutoGapSpec): void;
|
|
54
|
+
set padding(spec: PaddingSpec);
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=SizeGapPaddingBaseLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SizeGapPaddingBaseLayout.d.ts","sourceRoot":"","sources":["../../../../lib/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAc,MAAM,iBAAiB,CAAC;AAEzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,e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|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*
|
|
6
|
+
* Forked from @lit-labs/virtualizer and integrated into Mates.
|
|
7
|
+
* Replaces the full 'lit' package dependency with lit-html.
|
|
8
|
+
*/
|
|
9
|
+
import { LitVirtualizer } from "./LitVirtualizer.js";
|
|
10
|
+
export { LitVirtualizer };
|
|
11
|
+
export { RangeChangedEvent, UnpinnedEvent, VisibilityChangedEvent, } from "./events.js";
|
|
12
|
+
export { flow } from "./layouts/flow.js";
|
|
13
|
+
export { grid } from "./layouts/grid.js";
|
|
14
|
+
export { masonry } from "./layouts/masonry.js";
|
|
15
|
+
export type { VirtualizerHostElement } from "./Virtualizer.js";
|
|
16
|
+
export type { RenderItemFunction, VirtualizeDirectiveConfig, } from "./virtualize.js";
|
|
17
|
+
export { virtualize, virtualizerRef } from "./virtualize.js";
|
|
18
|
+
declare global {
|
|
19
|
+
interface HTMLElementTagNameMap {
|
|
20
|
+
"lit-virtualizer": LitVirtualizer;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=lit-virtualizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lit-virtualizer.d.ts","sourceRoot":"","sources":["../../lib/virtualizer/lit-virtualizer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,sBAAsB,GACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,YAAY,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,YAAY,EACV,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAU7D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,cAAc,CAAC;KACnC;CACF"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*
|
|
6
|
+
* Mates adapter for @lit-labs/virtualizer (forked).
|
|
7
|
+
*
|
|
8
|
+
* Exposes `virtualList`, `virtualGrid`, and `virtualMasonry` — the same
|
|
9
|
+
* friendly API that mates users already know — but now backed by the
|
|
10
|
+
* battle-tested lit virtualizer engine.
|
|
11
|
+
*
|
|
12
|
+
* Key improvement over the old repeatVirtual implementation:
|
|
13
|
+
* - `virtualList` no longer requires `itemHeight`. The FlowLayout uses
|
|
14
|
+
* ResizeObserver to measure each child's actual rendered height, just
|
|
15
|
+
* like the browser's native flow layout. Items can be any height and
|
|
16
|
+
* can change height dynamically.
|
|
17
|
+
* - `virtualGrid` and `virtualMasonry` still accept explicit sizes since
|
|
18
|
+
* the grid/masonry layouts need them for position pre-computation.
|
|
19
|
+
*/
|
|
20
|
+
import type { TemplateResult } from "lit-html";
|
|
21
|
+
import type { KeyFn } from "lit-html/directives/repeat.js";
|
|
22
|
+
export type VirtualItemTemplate<T> = (item: T, index: number) => TemplateResult;
|
|
23
|
+
export type VirtualKeyFn<T> = KeyFn<T>;
|
|
24
|
+
export interface VirtualListOptions {
|
|
25
|
+
/**
|
|
26
|
+
* Scrolling direction. Defaults to `'vertical'`.
|
|
27
|
+
*/
|
|
28
|
+
direction?: "vertical" | "horizontal";
|
|
29
|
+
/**
|
|
30
|
+
* If true the virtualizer element itself becomes the scroller.
|
|
31
|
+
* Set an explicit height/width on the host element when using this.
|
|
32
|
+
*/
|
|
33
|
+
scroller?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Pin a specific item into view on first render.
|
|
36
|
+
* e.g. `{ index: 100, block: 'start' }`
|
|
37
|
+
*/
|
|
38
|
+
pin?: {
|
|
39
|
+
index: number;
|
|
40
|
+
block?: ScrollLogicalPosition;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* `virtualList` — virtualised single-column list backed by the lit virtualizer
|
|
45
|
+
* FlowLayout.
|
|
46
|
+
*
|
|
47
|
+
* Unlike the previous implementation, **no `itemHeight` is required**. Each
|
|
48
|
+
* item is measured by a ResizeObserver after it renders, so items can have
|
|
49
|
+
* any height — fixed, dynamic, or content-driven — and the virtualizer adapts
|
|
50
|
+
* automatically.
|
|
51
|
+
*
|
|
52
|
+
* The parent element of the expression becomes the scroll container. Give it
|
|
53
|
+
* a fixed height via CSS or inline style.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* // Minimal — items can be any height
|
|
58
|
+
* html`<div style="height:600px;overflow:auto">
|
|
59
|
+
* ${virtualList(items, (item) => html`<div>${item.name}</div>`)}
|
|
60
|
+
* </div>`
|
|
61
|
+
*
|
|
62
|
+
* // With explicit key function
|
|
63
|
+
* html`<div style="height:600px;overflow:auto">
|
|
64
|
+
* ${virtualList(
|
|
65
|
+
* items,
|
|
66
|
+
* (item) => item.id,
|
|
67
|
+
* (item) => html`<div>${item.name}</div>`,
|
|
68
|
+
* )}
|
|
69
|
+
* </div>`
|
|
70
|
+
*
|
|
71
|
+
* // Horizontal list
|
|
72
|
+
* html`<div style="width:800px;overflow:auto">
|
|
73
|
+
* ${virtualList(
|
|
74
|
+
* items,
|
|
75
|
+
* (item) => item.id,
|
|
76
|
+
* (item) => html`<div style="width:120px">${item.name}</div>`,
|
|
77
|
+
* { direction: 'horizontal' },
|
|
78
|
+
* )}
|
|
79
|
+
* </div>`
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
export declare function virtualList<T>(items: readonly T[], template: VirtualItemTemplate<T>, options?: VirtualListOptions): unknown;
|
|
83
|
+
export declare function virtualList<T>(items: readonly T[], keyFn: VirtualKeyFn<T>, template: VirtualItemTemplate<T>, options?: VirtualListOptions): unknown;
|
|
84
|
+
export interface VirtualGridOptions {
|
|
85
|
+
/**
|
|
86
|
+
* Item width in CSS pixel string, e.g. `'200px'`. Required.
|
|
87
|
+
*/
|
|
88
|
+
itemWidth: `${number}px`;
|
|
89
|
+
/**
|
|
90
|
+
* Item height in CSS pixel string, e.g. `'200px'`. Required.
|
|
91
|
+
*/
|
|
92
|
+
itemHeight: `${number}px`;
|
|
93
|
+
/**
|
|
94
|
+
* Gap between cells. Accepts any value supported by the grid layout,
|
|
95
|
+
* e.g. `'12px'`, `'12px 8px'`. Defaults to `'8px'`.
|
|
96
|
+
*/
|
|
97
|
+
gap?: `${number}px` | `${number}px ${number}px`;
|
|
98
|
+
/**
|
|
99
|
+
* Scrolling direction. Defaults to `'vertical'`.
|
|
100
|
+
*/
|
|
101
|
+
direction?: "vertical" | "horizontal";
|
|
102
|
+
/**
|
|
103
|
+
* If true the virtualizer element itself becomes the scroller.
|
|
104
|
+
*/
|
|
105
|
+
scroller?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Whether to flex items to fill available space. Defaults to `false`.
|
|
108
|
+
* Set to `true` to let the grid decide how many columns fit.
|
|
109
|
+
*/
|
|
110
|
+
flex?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Pin a specific item into view on first render.
|
|
113
|
+
*/
|
|
114
|
+
pin?: {
|
|
115
|
+
index: number;
|
|
116
|
+
block?: ScrollLogicalPosition;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* `virtualGrid` — virtualised uniform multi-column grid.
|
|
121
|
+
*
|
|
122
|
+
* Pass flat items — no row-grouping needed. The grid layout computes row and
|
|
123
|
+
* column positions automatically. All cells have the same size.
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* ```ts
|
|
127
|
+
* html`<div style="height:600px;overflow:auto">
|
|
128
|
+
* ${virtualGrid(
|
|
129
|
+
* photos,
|
|
130
|
+
* (p) => p.id,
|
|
131
|
+
* (p) => html`<img src=${p.url} style="width:100%;height:100%;object-fit:cover" />`,
|
|
132
|
+
* { itemWidth: '220px', itemHeight: '220px', gap: '12px' },
|
|
133
|
+
* )}
|
|
134
|
+
* </div>`
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
137
|
+
export declare function virtualGrid<T>(items: readonly T[], template: VirtualItemTemplate<T>, options: VirtualGridOptions): unknown;
|
|
138
|
+
export declare function virtualGrid<T>(items: readonly T[], keyFn: VirtualKeyFn<T>, template: VirtualItemTemplate<T>, options: VirtualGridOptions): unknown;
|
|
139
|
+
export interface VirtualMasonryOptions {
|
|
140
|
+
/**
|
|
141
|
+
* A function that returns the aspect ratio (width / height) of each item.
|
|
142
|
+
* This is used by the masonry layout to compute item heights based on column
|
|
143
|
+
* width. Required.
|
|
144
|
+
*/
|
|
145
|
+
getAspectRatio: (item: unknown) => number;
|
|
146
|
+
/**
|
|
147
|
+
* Item size (column width) as a CSS pixel string, e.g. `'300px'`.
|
|
148
|
+
* The masonry layout derives height from the aspect ratio, so only one
|
|
149
|
+
* dimension is needed. Defaults to `'300px'`.
|
|
150
|
+
*/
|
|
151
|
+
itemSize?: `${number}px` | "0";
|
|
152
|
+
/**
|
|
153
|
+
* Gap between items. Defaults to `'8px'`.
|
|
154
|
+
*/
|
|
155
|
+
gap?: `${number}px` | `${number}px ${number}px`;
|
|
156
|
+
/**
|
|
157
|
+
* Scrolling direction. Defaults to `'vertical'`.
|
|
158
|
+
*/
|
|
159
|
+
direction?: "vertical" | "horizontal";
|
|
160
|
+
/**
|
|
161
|
+
* If true the virtualizer element itself becomes the scroller.
|
|
162
|
+
*/
|
|
163
|
+
scroller?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Pin a specific item into view on first render.
|
|
166
|
+
*/
|
|
167
|
+
pin?: {
|
|
168
|
+
index: number;
|
|
169
|
+
block?: ScrollLogicalPosition;
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* `virtualMasonry` — virtualised masonry grid with variable item heights.
|
|
174
|
+
*
|
|
175
|
+
* Positions are computed automatically using the lit virtualizer's MasonryLayout,
|
|
176
|
+
* which places items in the shortest column (greedy algorithm). Provide
|
|
177
|
+
* `getAspectRatio` to let the layout derive each item's height from its
|
|
178
|
+
* column width.
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* ```ts
|
|
182
|
+
* html`<div style="height:600px;overflow:auto">
|
|
183
|
+
* ${virtualMasonry(
|
|
184
|
+
* photos,
|
|
185
|
+
* (p) => p.id,
|
|
186
|
+
* (p) => html`
|
|
187
|
+
* <img src=${p.url}
|
|
188
|
+
* style="width:100%;height:100%;object-fit:cover;border-radius:8px" />
|
|
189
|
+
* `,
|
|
190
|
+
* {
|
|
191
|
+
* getAspectRatio: (p) => p.width / p.height,
|
|
192
|
+
* itemWidth: '220px',
|
|
193
|
+
* gap: '12px',
|
|
194
|
+
* },
|
|
195
|
+
* )}
|
|
196
|
+
* </div>`
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
export declare function virtualMasonry<T>(items: readonly T[], template: VirtualItemTemplate<T>, options: VirtualMasonryOptions): unknown;
|
|
200
|
+
export declare function virtualMasonry<T>(items: readonly T[], keyFn: VirtualKeyFn<T>, template: VirtualItemTemplate<T>, options: VirtualMasonryOptions): unknown;
|
|
201
|
+
//# sourceMappingURL=mates-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mates-adapter.d.ts","sourceRoot":"","sources":["../../lib/virtualizer/mates-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,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AC,CAAC,EAC9B,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,QAAQ,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAChC,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC;AACX,wBAAgB,cAAc,CAAC,CAAC,EAC9B,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,EACtB,QAAQ,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAChC,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
export type AnyFunction = (...args: any[]) => any;
|
|
7
|
+
/**
|
|
8
|
+
* An MethodInterceptor function is defined as accepting a function it is intercepting
|
|
9
|
+
* or "wrapping" calls to. It has the same signature as the original function, except
|
|
10
|
+
* that it has an additional first argument that is the "original" or wrapped
|
|
11
|
+
* function that may be called or not depending on the interceptor's logic. The
|
|
12
|
+
* approach is analagous to calling super() in a subclass's method.
|
|
13
|
+
*/
|
|
14
|
+
export type MethodInterceptor<T extends AnyFunction> = (originalFunction: T | undefined, ...args: Parameters<T>) => ReturnType<T>;
|
|
15
|
+
/**
|
|
16
|
+
* An InterceptorTeardown function reverses the effects of an interceptMethod().
|
|
17
|
+
*/
|
|
18
|
+
export type MethodInterceptorTeardown = () => void;
|
|
19
|
+
/**
|
|
20
|
+
* Replaces the method on the object with a new method that calls the interceptor
|
|
21
|
+
* function along with the original function so the interceptor can decided how to
|
|
22
|
+
* handle the call. Essentially enables wrapping an existing method with new logic
|
|
23
|
+
* similarly to how a subclass can call super() to invoke the superclass's method.
|
|
24
|
+
* @param object The method's host object
|
|
25
|
+
* @param methodName The name of the method to intercept/wrap
|
|
26
|
+
* @param interceptor The interceptor function that is called when the method is
|
|
27
|
+
* called. It is passed the original method as the first argument, followed by
|
|
28
|
+
* the original method's arguments.
|
|
29
|
+
* @returns a teardown function that can be called to restore the original method
|
|
30
|
+
* to the object.
|
|
31
|
+
*/
|
|
32
|
+
export declare function interceptMethod<T extends object, K extends keyof T, F extends AnyFunction>(target: T, methodName: K, interceptor: MethodInterceptor<F>): MethodInterceptorTeardown;
|
|
33
|
+
//# sourceMappingURL=method-interception.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"method-interception.d.ts","sourceRoot":"","sources":["../../../lib/virtualizer/support/method-interception.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAGlD;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,WAAW,IAAI,CACrD,gBAAgB,EAAE,CAAC,GAAG,SAAS,EAC/B,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KACnB,UAAU,CAAC,CAAC,CAAC,CAAC;AAEnB;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,MAAM,IAAI,CAAC;AAEnD;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAC7B,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,CAAC,EACjB,CAAC,SAAS,WAAW,EAErB,MAAM,EAAE,CAAC,EACT,UAAU,EAAE,CAAC,EACb,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAChC,yBAAyB,CAgB3B"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
import { type MethodInterceptorTeardown } from "./method-interception.js";
|
|
7
|
+
type IgnoreWindowOnErrorOptions = {
|
|
8
|
+
/**
|
|
9
|
+
* If this option is set to `true`, `ignoreWindowOnError` will not only prevent
|
|
10
|
+
* `window.onerror` from being called, but also prevent the error message from
|
|
11
|
+
* being logged to the console. This is useful for keeping your test output
|
|
12
|
+
* clean, but it will prevent you from observing whether / how many times the
|
|
13
|
+
* targeted error has been ignored.
|
|
14
|
+
*/
|
|
15
|
+
suppressErrorLogging?: boolean;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* In a testing environment with a setup/before and teardown/after callback pattern, this function
|
|
19
|
+
* can be used as a succinct declaration to ignore these errors in tests.
|
|
20
|
+
* @param before a setup callback; in Mocha, this would be the `beforeEach` function.
|
|
21
|
+
* @param after a teardown callback; in Mocha, this would be the `afterEach` function.
|
|
22
|
+
*/
|
|
23
|
+
export declare function setupIgnoreWindowResizeObserverLoopErrors(before: Function, after: Function, options?: IgnoreWindowOnErrorOptions): void;
|
|
24
|
+
/**
|
|
25
|
+
* Reads the message text and returns true if the message contains any text indicating an
|
|
26
|
+
* error due to too many ResizeObserver triggers.
|
|
27
|
+
* @param message The text to evaluate
|
|
28
|
+
* @returns True if text contains ResizeObserver loop limit exceeded message.
|
|
29
|
+
*/
|
|
30
|
+
export declare function isResizeObserverLoopErrorMessage(message: string): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Replaces the window.onerror method with a new method that tests the error message
|
|
33
|
+
* against the given predicate function. If the predicate returns true, the original
|
|
34
|
+
* window.onerror is not called. Otherwise, the original window.onerror is called.
|
|
35
|
+
* This is most useful for ignoring benign errors that are expected to occur in tests.
|
|
36
|
+
* @param messagePredicate A function that returns true if the error message should
|
|
37
|
+
* cause the skip the call to the original window.onerror.
|
|
38
|
+
*/
|
|
39
|
+
export declare function ignoreWindowOnError(messagePredicate: (message: string) => boolean, options?: IgnoreWindowOnErrorOptions): MethodInterceptorTeardown;
|
|
40
|
+
/**
|
|
41
|
+
* Patches window.onerror to ignore the "ResizeObserver loop limit
|
|
42
|
+
* exceeded" errors.
|
|
43
|
+
* @returns A function that can be used to restore the original window.onerror to the unpatched version.
|
|
44
|
+
*/
|
|
45
|
+
export declare function ignoreWindowResizeObserverLoopErrors(options?: IgnoreWindowOnErrorOptions): MethodInterceptorTeardown;
|
|
46
|
+
/**
|
|
47
|
+
* Adds an event listener to the window which prevents default event
|
|
48
|
+
* handling for "ResizeObserver loop limit exceeded errors."
|
|
49
|
+
* @returns A function that can be used to remove the event listener.
|
|
50
|
+
*/
|
|
51
|
+
export declare function preventResizeObserverLoopErrorEventDefaults(): () => void;
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=resize-observer-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resize-observer-errors.d.ts","sourceRoot":"","sources":["../../../lib/virtualizer/support/resize-observer-errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,0BAA0B,CAAC;AAElC,KAAK,0BAA0B,GAAG;IAChC;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,yCAAyC,CACvD,MAAM,EAAE,QAAQ,EAChB,KAAK,EAAE,QAAQ,EACf,OAAO,GAAE,0BAA+B,QAQzC;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAOzE;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,EAC9C,OAAO,GAAE,0BAA+B,GACvC,yBAAyB,CA8B3B;AAED;;;;GAIG;AACH,wBAAgB,oCAAoC,CAClD,OAAO,GAAE,0BAA+B,6BAGzC;AAED;;;;GAIG;AACH,wBAAgB,2CAA2C,eAoB1D"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
import { type ChildPart, type TemplateResult } from "lit-html";
|
|
7
|
+
import { AsyncDirective } from "lit-html/async-directive.js";
|
|
8
|
+
import { type DirectiveResult, type PartInfo } from "lit-html/directive.js";
|
|
9
|
+
import { type KeyFn } from "lit-html/directives/repeat.js";
|
|
10
|
+
import type { LayoutConfigValue } from "./layouts/shared/Layout.js";
|
|
11
|
+
import { Virtualizer } from "./Virtualizer.js";
|
|
12
|
+
export type { VirtualizerHostElement } from "./Virtualizer.js";
|
|
13
|
+
export { virtualizerRef } from "./Virtualizer.js";
|
|
14
|
+
/**
|
|
15
|
+
* Configuration options for the virtualize directive.
|
|
16
|
+
*/
|
|
17
|
+
export interface VirtualizeDirectiveConfig<T> {
|
|
18
|
+
/**
|
|
19
|
+
* A function that returns a lit-html TemplateResult. It will be used
|
|
20
|
+
* to generate the DOM for each item in the virtual list.
|
|
21
|
+
*/
|
|
22
|
+
renderItem?: RenderItemFunction<T>;
|
|
23
|
+
keyFunction?: KeyFn<T>;
|
|
24
|
+
scroller?: boolean;
|
|
25
|
+
layout?: LayoutConfigValue;
|
|
26
|
+
/**
|
|
27
|
+
* The list of items to display via the renderItem function.
|
|
28
|
+
*/
|
|
29
|
+
items?: Array<T>;
|
|
30
|
+
}
|
|
31
|
+
export type RenderItemFunction<T = unknown> = (item: T, index: number) => TemplateResult;
|
|
32
|
+
export declare const defaultKeyFunction: KeyFn<unknown>;
|
|
33
|
+
export declare const defaultRenderItem: RenderItemFunction<unknown>;
|
|
34
|
+
declare class VirtualizeDirective<T = unknown> extends AsyncDirective {
|
|
35
|
+
_virtualizer: Virtualizer | null;
|
|
36
|
+
_first: number;
|
|
37
|
+
_last: number;
|
|
38
|
+
_renderItem: RenderItemFunction<T>;
|
|
39
|
+
_keyFunction: KeyFn<T>;
|
|
40
|
+
_items: Array<T>;
|
|
41
|
+
constructor(part: PartInfo);
|
|
42
|
+
render(config?: VirtualizeDirectiveConfig<T>): unknown;
|
|
43
|
+
update(part: ChildPart, [config]: [VirtualizeDirectiveConfig<T>]): unknown;
|
|
44
|
+
private _updateVirtualizerConfig;
|
|
45
|
+
private _setFunctions;
|
|
46
|
+
private _makeVirtualizer;
|
|
47
|
+
private _initialize;
|
|
48
|
+
disconnected(): void;
|
|
49
|
+
reconnected(): void;
|
|
50
|
+
}
|
|
51
|
+
export declare const virtualize: <T>(config?: VirtualizeDirectiveConfig<T>) => DirectiveResult<typeof VirtualizeDirective>;
|
|
52
|
+
//# sourceMappingURL=virtualize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtualize.d.ts","sourceRoot":"","sources":["../../lib/virtualizer/virtualize.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAkB,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EACL,KAAK,eAAe,EAEpB,KAAK,QAAQ,EAEd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,KAAK,KAAK,EAAU,MAAM,+BAA+B,CAAC;AAEnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,YAAY,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,yBAAyB,CAAC,CAAC;IAC1C;;;OAGG;IACH,UAAU,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAEnC,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAEvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAE3B;;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
"description": "Mates is a front end framework for building web applications",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,14 +12,22 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "rollup -c",
|
|
14
14
|
"dev": "rollup -c -w",
|
|
15
|
-
"test": "
|
|
16
|
-
"test:watch": "
|
|
17
|
-
"test:coverage": "
|
|
15
|
+
"test": "vitest run",
|
|
16
|
+
"test:watch": "vitest",
|
|
17
|
+
"test:coverage": "vitest run --coverage",
|
|
18
|
+
"test:ui": "vitest --ui",
|
|
19
|
+
"bench": "vitest bench lib/actions/__benches__/asyncAction.bench.ts",
|
|
20
|
+
"bench:watch": "vitest bench lib/actions/__benches__/asyncAction.bench.ts --watch",
|
|
21
|
+
"bench:memory": "node --expose-gc scripts/asyncAction-memory-bench.mjs",
|
|
18
22
|
"type-check": "tsc --noEmit",
|
|
19
23
|
"lint": "eslint src --ext .ts,.tsx",
|
|
20
24
|
"lint:fix": "eslint src --ext .ts,.tsx --fix",
|
|
25
|
+
"biome:check": "biome check lib",
|
|
26
|
+
"biome:format": "biome format --write lib",
|
|
27
|
+
"biome:lint": "biome lint lib",
|
|
28
|
+
"biome:fix": "biome check --write lib",
|
|
21
29
|
"clean": "rimraf dist",
|
|
22
|
-
"prebuild": "npm run clean"
|
|
30
|
+
"prebuild": "npm run biome:check && npm run clean"
|
|
23
31
|
},
|
|
24
32
|
"keywords": [
|
|
25
33
|
"lit-html",
|
|
@@ -37,6 +45,9 @@
|
|
|
37
45
|
"author": "",
|
|
38
46
|
"license": "MIT",
|
|
39
47
|
"devDependencies": {
|
|
48
|
+
"@biomejs/biome": "^2.3.15",
|
|
49
|
+
"@js-temporal/polyfill": "^0.5.1",
|
|
50
|
+
"@material/material-color-utilities": "^0.4.0",
|
|
40
51
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
41
52
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
42
53
|
"@rollup/plugin-terser": "^0.4.4",
|
|
@@ -44,16 +55,24 @@
|
|
|
44
55
|
"@types/jest": "^29.5.8",
|
|
45
56
|
"@typescript-eslint/eslint-plugin": "^6.12.0",
|
|
46
57
|
"@typescript-eslint/parser": "^6.12.0",
|
|
58
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
59
|
+
"@vitest/ui": "^4.0.18",
|
|
47
60
|
"csstype": "^3.1.3",
|
|
48
61
|
"esbuild": "^0.25.9",
|
|
49
62
|
"eslint": "^8.54.0",
|
|
63
|
+
"happy-dom": "^20.5.0",
|
|
50
64
|
"jest": "^29.7.0",
|
|
51
65
|
"jest-environment-jsdom": "^30.0.5",
|
|
52
66
|
"rimraf": "^5.0.5",
|
|
53
67
|
"rollup": "^3.29.4",
|
|
68
|
+
"rollup-plugin-css-only": "^4.5.5",
|
|
54
69
|
"rollup-plugin-dts": "^6.1.0",
|
|
55
70
|
"ts-jest": "^29.1.1",
|
|
56
71
|
"tslib": "^2.8.1",
|
|
57
|
-
"typescript": "^5.3.2"
|
|
72
|
+
"typescript": "^5.3.2",
|
|
73
|
+
"vitest": "^4.0.18"
|
|
74
|
+
},
|
|
75
|
+
"peerDependencies": {
|
|
76
|
+
"lit-html": ">=3.0.0"
|
|
58
77
|
}
|
|
59
78
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Counter.d.ts","sourceRoot":"","sources":["../../../../examples/src/Counter/Counter.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,wEAQnB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CounterWithAtoms.d.ts","sourceRoot":"","sources":["../../../../examples/src/Counter/CounterWithAtoms.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,gBAAgB,wEAQ5B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../examples/src/Counter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MultiScopeDemo.d.ts","sourceRoot":"","sources":["../../../../examples/src/Scope Examples/MultiScopeDemo.ts"],"names":[],"mappings":"AAwPA,eAAO,MAAM,cAAc,wEAAU,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ScopeDemo.d.ts","sourceRoot":"","sources":["../../../../examples/src/Scope Examples/ScopeDemo.ts"],"names":[],"mappings":"AA4IA,eAAO,MAAM,SAAS,wEAAW,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleScopeExample.d.ts","sourceRoot":"","sources":["../../../../examples/src/Scope Examples/SimpleScopeExample.ts"],"names":[],"mappings":"AA8DA,eAAO,MAAM,kBAAkB,wEAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../examples/src/Scope Examples/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"A.d.ts","sourceRoot":"","sources":["../../../../examples/src/Scopes Test/A.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,CAAC,wEAKb,CAAC;AAEF,eAAO,MAAM,CAAC,wEAIb,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const ThemeDemo: () => () => import("../../../lib/lit-html/lit-html").TemplateResult<1>;
|
|
2
|
-
export declare const ThemeDemo2: () => () => import("../../../lib/lit-html/lit-html").TemplateResult<1>;
|
|
3
|
-
export declare const ThemeDemo3: () => () => import("../../../lib/lit-html/lit-html").TemplateResult<1>;
|
|
4
|
-
//# sourceMappingURL=ThemeDemo.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeDemo.d.ts","sourceRoot":"","sources":["../../../../examples/src/ThemeContext.ts/ThemeDemo.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,SAAS,wEAWrB,CAAC;AAEF,eAAO,MAAM,UAAU,wEAatB,CAAC;AAEF,eAAO,MAAM,UAAU,wEAGtB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Todo.d.ts","sourceRoot":"","sources":["../../../../examples/src/Todo/Todo.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,wEAyIhB,CAAC"}
|