@askrjs/askr 0.0.28 → 0.0.30
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 +44 -172
- package/dist/_virtual/_rolldown/runtime.js +7 -0
- package/dist/bench/components/benchmark-row.d.ts +20 -0
- package/dist/bench/components/benchmark-row.d.ts.map +1 -0
- package/dist/bench/components/benchmark-row.js +42 -0
- package/dist/bench/components/benchmark-row.js.map +1 -0
- package/dist/bench/components/benchmark-table.js +25 -0
- package/dist/bench/components/benchmark-table.js.map +1 -0
- package/dist/benchmark.d.ts +22 -0
- package/dist/benchmark.d.ts.map +1 -0
- package/dist/benchmark.js +64 -1
- package/dist/benchmark.js.map +1 -0
- package/dist/bin/askr-ssg.d.ts +22 -26
- package/dist/bin/askr-ssg.d.ts.map +1 -1
- package/dist/bin/askr-ssg.js +149 -2
- package/dist/bin/askr-ssg.js.map +1 -0
- package/dist/boot/index.d.ts +64 -42
- package/dist/boot/index.d.ts.map +1 -1
- package/dist/boot/index.js +416 -2
- package/dist/boot/index.js.map +1 -0
- package/dist/common/component.d.ts +14 -13
- package/dist/common/component.d.ts.map +1 -1
- package/dist/common/control.d.ts +13 -0
- package/dist/common/control.d.ts.map +1 -0
- package/dist/common/control.js +14 -0
- package/dist/common/control.js.map +1 -0
- package/dist/common/env.js +47 -0
- package/dist/common/env.js.map +1 -0
- package/dist/common/jsx.d.ts +17 -15
- package/dist/common/jsx.d.ts.map +1 -1
- package/dist/common/jsx.js +8 -1
- package/dist/common/jsx.js.map +1 -0
- package/dist/common/props.d.ts +14 -11
- package/dist/common/props.d.ts.map +1 -1
- package/dist/common/router.d.ts +190 -32
- package/dist/common/router.d.ts.map +1 -1
- package/dist/common/ssr-errors.d.ts +6 -3
- package/dist/common/ssr-errors.d.ts.map +1 -1
- package/dist/common/ssr-errors.js +16 -1
- package/dist/common/ssr-errors.js.map +1 -0
- package/dist/common/ssr.d.ts +12 -9
- package/dist/common/ssr.d.ts.map +1 -1
- package/dist/common/vnode.d.ts +17 -15
- package/dist/common/vnode.d.ts.map +1 -1
- package/dist/common/vnode.js +10 -1
- package/dist/common/vnode.js.map +1 -0
- package/dist/components/link.d.ts +37 -25
- package/dist/components/link.d.ts.map +1 -1
- package/dist/components/link.js +64 -1
- package/dist/components/link.js.map +1 -0
- package/dist/control/case.d.ts +17 -0
- package/dist/control/case.d.ts.map +1 -0
- package/dist/control/case.js +69 -0
- package/dist/control/case.js.map +1 -0
- package/dist/control/for.d.ts +23 -0
- package/dist/control/for.d.ts.map +1 -0
- package/dist/control/for.js +62 -0
- package/dist/control/for.js.map +1 -0
- package/dist/control/index.d.ts +4 -0
- package/dist/control/index.js +4 -0
- package/dist/control/shared.js +20 -0
- package/dist/control/shared.js.map +1 -0
- package/dist/control/show.d.ts +14 -0
- package/dist/control/show.d.ts.map +1 -0
- package/dist/control/show.js +33 -0
- package/dist/control/show.js.map +1 -0
- package/dist/dev/invariant.js +29 -2
- package/dist/dev/invariant.js.map +1 -0
- package/dist/dev/logger.js +37 -1
- package/dist/dev/logger.js.map +1 -0
- package/dist/foundations/core.d.ts +15 -23
- package/dist/foundations/core.js +13 -1
- package/dist/foundations/icon/icon.d.ts +53 -0
- package/dist/foundations/icon/icon.d.ts.map +1 -0
- package/dist/foundations/icon/icon.js +88 -0
- package/dist/foundations/icon/icon.js.map +1 -0
- package/dist/foundations/icon/icon.types.d.ts +21 -0
- package/dist/foundations/icon/icon.types.d.ts.map +1 -0
- package/dist/foundations/index.d.ts +23 -3
- package/dist/foundations/index.js +22 -1
- package/dist/foundations/interactions/dismissable.d.ts +25 -17
- package/dist/foundations/interactions/dismissable.d.ts.map +1 -1
- package/dist/foundations/interactions/dismissable.js +26 -1
- package/dist/foundations/interactions/dismissable.js.map +1 -0
- package/dist/foundations/interactions/focusable.d.ts +13 -7
- package/dist/foundations/interactions/focusable.d.ts.map +1 -1
- package/dist/foundations/interactions/focusable.js +18 -1
- package/dist/foundations/interactions/focusable.js.map +1 -0
- package/dist/foundations/interactions/hoverable.d.ts +17 -10
- package/dist/foundations/interactions/hoverable.d.ts.map +1 -1
- package/dist/foundations/interactions/hoverable.js +15 -1
- package/dist/foundations/interactions/hoverable.js.map +1 -0
- package/dist/foundations/interactions/interaction-policy.d.ts +32 -78
- package/dist/foundations/interactions/interaction-policy.d.ts.map +1 -1
- package/dist/foundations/interactions/interaction-policy.js +122 -1
- package/dist/foundations/interactions/interaction-policy.js.map +1 -0
- package/dist/foundations/interactions/pressable.d.ts +25 -18
- package/dist/foundations/interactions/pressable.d.ts.map +1 -1
- package/dist/foundations/interactions/pressable.js +51 -1
- package/dist/foundations/interactions/pressable.js.map +1 -0
- package/dist/foundations/interactions/roving-focus.d.ts +49 -114
- package/dist/foundations/interactions/roving-focus.d.ts.map +1 -1
- package/dist/foundations/interactions/roving-focus.js +71 -1
- package/dist/foundations/interactions/roving-focus.js.map +1 -0
- package/dist/foundations/state/controllable.d.ts +22 -41
- package/dist/foundations/state/controllable.d.ts.map +1 -1
- package/dist/foundations/state/controllable.js +81 -1
- package/dist/foundations/state/controllable.js.map +1 -0
- package/dist/foundations/structures/collection.d.ts +25 -40
- package/dist/foundations/structures/collection.d.ts.map +1 -1
- package/dist/foundations/structures/collection.js +51 -1
- package/dist/foundations/structures/collection.js.map +1 -0
- package/dist/foundations/structures/layer.d.ts +47 -68
- package/dist/foundations/structures/layer.d.ts.map +1 -1
- package/dist/foundations/structures/layer.js +81 -1
- package/dist/foundations/structures/layer.js.map +1 -0
- package/dist/foundations/structures/layout.d.ts +6 -3
- package/dist/foundations/structures/layout.d.ts.map +1 -1
- package/dist/foundations/structures/layout.js +13 -1
- package/dist/foundations/structures/layout.js.map +1 -0
- package/dist/foundations/structures/portal.d.ts +17 -10
- package/dist/foundations/structures/portal.d.ts.map +1 -1
- package/dist/foundations/structures/portal.js +105 -1
- package/dist/foundations/structures/portal.js.map +1 -0
- package/dist/foundations/structures/presence.d.ts +11 -5
- package/dist/foundations/structures/presence.d.ts.map +1 -1
- package/dist/foundations/structures/presence.js +39 -1
- package/dist/foundations/structures/presence.js.map +1 -0
- package/dist/foundations/structures/slot.d.ts +11 -8
- package/dist/foundations/structures/slot.d.ts.map +1 -1
- package/dist/foundations/structures/slot.js +41 -1
- package/dist/foundations/structures/slot.js.map +1 -0
- package/dist/foundations/structures.d.ts +7 -14
- package/dist/foundations/structures.js +6 -1
- package/dist/foundations/utilities/aria.d.ts +9 -6
- package/dist/foundations/utilities/aria.d.ts.map +1 -1
- package/dist/foundations/utilities/aria.js +17 -1
- package/dist/foundations/utilities/aria.js.map +1 -0
- package/dist/foundations/utilities/compose-handlers.d.ts +10 -7
- package/dist/foundations/utilities/compose-handlers.d.ts.map +1 -1
- package/dist/foundations/utilities/compose-handlers.js +20 -1
- package/dist/foundations/utilities/compose-handlers.js.map +1 -0
- package/dist/foundations/utilities/compose-ref.d.ts +7 -4
- package/dist/foundations/utilities/compose-ref.d.ts.map +1 -1
- package/dist/foundations/utilities/compose-ref.js +18 -1
- package/dist/foundations/utilities/compose-ref.js.map +1 -0
- package/dist/foundations/utilities/event-types.d.ts +14 -11
- package/dist/foundations/utilities/event-types.d.ts.map +1 -1
- package/dist/foundations/utilities/merge-props.d.ts +4 -1
- package/dist/foundations/utilities/merge-props.d.ts.map +1 -1
- package/dist/foundations/utilities/merge-props.js +49 -1
- package/dist/foundations/utilities/merge-props.js.map +1 -0
- package/dist/foundations/utilities/use-id.d.ts +9 -6
- package/dist/foundations/utilities/use-id.d.ts.map +1 -1
- package/dist/foundations/utilities/use-id.js +29 -1
- package/dist/foundations/utilities/use-id.js.map +1 -0
- package/dist/fx/fx.d.ts +24 -21
- package/dist/fx/fx.d.ts.map +1 -1
- package/dist/fx/fx.js +212 -1
- package/dist/fx/fx.js.map +1 -0
- package/dist/fx/index.d.ts +4 -7
- package/dist/fx/index.js +4 -1
- package/dist/fx/noop.js +9 -1
- package/dist/fx/noop.js.map +1 -0
- package/dist/fx/timing.d.ts +24 -21
- package/dist/fx/timing.d.ts.map +1 -1
- package/dist/fx/timing.js +236 -1
- package/dist/fx/timing.js.map +1 -0
- package/dist/index.d.ts +21 -23
- package/dist/index.js +34 -1
- package/dist/index.js.map +1 -0
- package/dist/jsx/index.d.ts +1 -4
- package/dist/jsx/index.js +3 -1
- package/dist/jsx/types.d.ts +18 -25
- package/dist/jsx/types.d.ts.map +1 -1
- package/dist/jsx/types.js +1 -1
- package/dist/jsx/utils.d.ts +4 -3
- package/dist/jsx/utils.d.ts.map +1 -1
- package/dist/jsx/utils.js +19 -1
- package/dist/jsx/utils.js.map +1 -0
- package/dist/jsx-dev-runtime.d.ts +8 -0
- package/dist/jsx-dev-runtime.d.ts.map +1 -0
- package/dist/jsx-dev-runtime.js +32 -1
- package/dist/jsx-dev-runtime.js.map +1 -0
- package/dist/jsx-runtime.d.ts +12 -0
- package/dist/jsx-runtime.d.ts.map +1 -0
- package/dist/jsx-runtime.js +45 -1
- package/dist/jsx-runtime.js.map +1 -0
- package/dist/jsx-runtime2.d.ts +2 -0
- package/dist/jsx-runtime2.js +3 -0
- package/dist/renderer/children.js +293 -0
- package/dist/renderer/children.js.map +1 -0
- package/dist/renderer/cleanup.js +150 -1
- package/dist/renderer/cleanup.js.map +1 -0
- package/dist/renderer/dom.js +2439 -1
- package/dist/renderer/dom.js.map +1 -0
- package/dist/renderer/env.js +1 -0
- package/dist/renderer/evaluate.js +450 -1
- package/dist/renderer/evaluate.js.map +1 -0
- package/dist/renderer/fastpath.js +145 -1
- package/dist/renderer/fastpath.js.map +1 -0
- package/dist/renderer/index.js +24 -1
- package/dist/renderer/index.js.map +1 -0
- package/dist/renderer/keyed.js +119 -1
- package/dist/renderer/keyed.js.map +1 -0
- package/dist/renderer/reconcile.js +359 -1
- package/dist/renderer/reconcile.js.map +1 -0
- package/dist/renderer/types.js +1 -1
- package/dist/renderer/utils.js +220 -1
- package/dist/renderer/utils.js.map +1 -0
- package/dist/resources/index.d.ts +3 -9
- package/dist/resources/index.js +3 -1
- package/dist/router/index.d.ts +6 -10
- package/dist/router/index.js +5 -1
- package/dist/router/match.js +83 -1
- package/dist/router/match.js.map +1 -0
- package/dist/router/navigate.d.ts +20 -8
- package/dist/router/navigate.d.ts.map +1 -1
- package/dist/router/navigate.js +288 -1
- package/dist/router/navigate.js.map +1 -0
- package/dist/router/policy.d.ts +22 -0
- package/dist/router/policy.d.ts.map +1 -0
- package/dist/router/policy.js +116 -0
- package/dist/router/policy.js.map +1 -0
- package/dist/router/route-context.js +79 -0
- package/dist/router/route-context.js.map +1 -0
- package/dist/router/route.d.ts +101 -34
- package/dist/router/route.d.ts.map +1 -1
- package/dist/router/route.js +599 -1
- package/dist/router/route.js.map +1 -0
- package/dist/runtime/child-scope.d.ts +21 -0
- package/dist/runtime/child-scope.d.ts.map +1 -0
- package/dist/runtime/child-scope.js +77 -0
- package/dist/runtime/child-scope.js.map +1 -0
- package/dist/runtime/component.d.ts +67 -56
- package/dist/runtime/component.d.ts.map +1 -1
- package/dist/runtime/component.js +462 -1
- package/dist/runtime/component.js.map +1 -0
- package/dist/runtime/context.d.ts +28 -42
- package/dist/runtime/context.d.ts.map +1 -1
- package/dist/runtime/context.js +205 -1
- package/dist/runtime/context.js.map +1 -0
- package/dist/runtime/control.d.ts +43 -0
- package/dist/runtime/control.d.ts.map +1 -0
- package/dist/runtime/control.js +125 -0
- package/dist/runtime/control.js.map +1 -0
- package/dist/runtime/derive.d.ts +12 -9
- package/dist/runtime/derive.d.ts.map +1 -1
- package/dist/runtime/derive.js +134 -1
- package/dist/runtime/derive.js.map +1 -0
- package/dist/runtime/dev-namespace.js +57 -1
- package/dist/runtime/dev-namespace.js.map +1 -0
- package/dist/runtime/effect.d.ts +32 -0
- package/dist/runtime/effect.d.ts.map +1 -0
- package/dist/runtime/effect.js +146 -0
- package/dist/runtime/effect.js.map +1 -0
- package/dist/runtime/events.js +162 -1
- package/dist/runtime/events.js.map +1 -0
- package/dist/runtime/execution-model.js +15 -1
- package/dist/runtime/execution-model.js.map +1 -0
- package/dist/runtime/fastlane.js +204 -1
- package/dist/runtime/fastlane.js.map +1 -0
- package/dist/runtime/for-bench.d.ts +41 -0
- package/dist/runtime/for-bench.d.ts.map +1 -0
- package/dist/runtime/for-bench.js +173 -0
- package/dist/runtime/for-bench.js.map +1 -0
- package/dist/runtime/for.d.ts +62 -49
- package/dist/runtime/for.d.ts.map +1 -1
- package/dist/runtime/for.js +668 -1
- package/dist/runtime/for.js.map +1 -0
- package/dist/runtime/operations.d.ts +18 -15
- package/dist/runtime/operations.d.ts.map +1 -1
- package/dist/runtime/operations.js +209 -1
- package/dist/runtime/operations.js.map +1 -0
- package/dist/runtime/perf-metrics.js +64 -1
- package/dist/runtime/perf-metrics.js.map +1 -0
- package/dist/runtime/readable.d.ts +24 -18
- package/dist/runtime/readable.d.ts.map +1 -1
- package/dist/runtime/readable.js +118 -1
- package/dist/runtime/readable.js.map +1 -0
- package/dist/runtime/resource-cell.js +102 -1
- package/dist/runtime/resource-cell.js.map +1 -0
- package/dist/runtime/scheduler.d.ts +51 -50
- package/dist/runtime/scheduler.d.ts.map +1 -1
- package/dist/runtime/scheduler.js +328 -1
- package/dist/runtime/scheduler.js.map +1 -0
- package/dist/runtime/selector.d.ts +7 -5
- package/dist/runtime/selector.d.ts.map +1 -1
- package/dist/runtime/selector.js +188 -1
- package/dist/runtime/selector.js.map +1 -0
- package/dist/runtime/ssr-bridge.js +24 -1
- package/dist/runtime/ssr-bridge.js.map +1 -0
- package/dist/runtime/state.d.ts +11 -19
- package/dist/runtime/state.d.ts.map +1 -1
- package/dist/runtime/state.js +99 -1
- package/dist/runtime/state.js.map +1 -0
- package/dist/ssg/batch-render.d.ts +10 -10
- package/dist/ssg/batch-render.d.ts.map +1 -1
- package/dist/ssg/batch-render.js +84 -1
- package/dist/ssg/batch-render.js.map +1 -0
- package/dist/ssg/create-static-gen.d.ts +28 -29
- package/dist/ssg/create-static-gen.d.ts.map +1 -1
- package/dist/ssg/create-static-gen.js +282 -1
- package/dist/ssg/create-static-gen.js.map +1 -0
- package/dist/ssg/generate-metadata.d.ts +12 -15
- package/dist/ssg/generate-metadata.d.ts.map +1 -1
- package/dist/ssg/generate-metadata.js +94 -1
- package/dist/ssg/generate-metadata.js.map +1 -0
- package/dist/ssg/incremental-manifest.js +56 -1
- package/dist/ssg/incremental-manifest.js.map +1 -0
- package/dist/ssg/index.d.ts +8 -28
- package/dist/ssg/index.js +7 -1
- package/dist/ssg/resolve-ssg-data.d.ts +10 -13
- package/dist/ssg/resolve-ssg-data.d.ts.map +1 -1
- package/dist/ssg/resolve-ssg-data.js +46 -1
- package/dist/ssg/resolve-ssg-data.js.map +1 -0
- package/dist/ssg/route-utils.d.ts +14 -10
- package/dist/ssg/route-utils.d.ts.map +1 -1
- package/dist/ssg/route-utils.js +24 -1
- package/dist/ssg/route-utils.js.map +1 -0
- package/dist/ssg/types.d.ts +157 -144
- package/dist/ssg/types.d.ts.map +1 -1
- package/dist/ssg/write-static-files.d.ts +8 -14
- package/dist/ssg/write-static-files.d.ts.map +1 -1
- package/dist/ssg/write-static-files.js +73 -1
- package/dist/ssg/write-static-files.js.map +1 -0
- package/dist/ssr/attrs.js +93 -1
- package/dist/ssr/attrs.js.map +1 -0
- package/dist/ssr/context.d.ts +31 -35
- package/dist/ssr/context.d.ts.map +1 -1
- package/dist/ssr/context.js +63 -1
- package/dist/ssr/context.js.map +1 -0
- package/dist/ssr/errors.d.ts +6 -4
- package/dist/ssr/errors.d.ts.map +1 -1
- package/dist/ssr/errors.js +4 -1
- package/dist/ssr/errors.js.map +1 -0
- package/dist/ssr/escape.js +153 -1
- package/dist/ssr/escape.js.map +1 -0
- package/dist/ssr/index.d.ts +74 -72
- package/dist/ssr/index.d.ts.map +1 -1
- package/dist/ssr/index.js +543 -1
- package/dist/ssr/index.js.map +1 -0
- package/dist/ssr/render-keys.d.ts +27 -29
- package/dist/ssr/render-keys.d.ts.map +1 -1
- package/dist/ssr/render-keys.js +39 -1
- package/dist/ssr/render-keys.js.map +1 -0
- package/dist/ssr/sink.js +86 -1
- package/dist/ssr/sink.js.map +1 -0
- package/dist/ssr/stream-render.js +76 -1
- package/dist/ssr/stream-render.js.map +1 -0
- package/dist/ssr/types.d.ts +14 -13
- package/dist/ssr/types.d.ts.map +1 -1
- package/package.json +49 -69
- package/dist/_virtual/___vite-browser-external.js +0 -1
- package/dist/_virtual/__vite-browser-external.js +0 -1
- package/dist/_virtual/_commonjsHelpers.js +0 -1
- package/dist/_virtual/_fs.js +0 -1
- package/dist/_virtual/_path.js +0 -1
- package/dist/_virtual/main.js +0 -1
- package/dist/_virtual/preload-helper.js +0 -1
- package/dist/bench/benchmark-entry.d.ts +0 -14
- package/dist/bench/benchmark-entry.d.ts.map +0 -1
- package/dist/common/errors.d.ts +0 -53
- package/dist/common/errors.d.ts.map +0 -1
- package/dist/common/index.d.ts +0 -14
- package/dist/common/index.d.ts.map +0 -1
- package/dist/dev/invariant.d.ts +0 -83
- package/dist/dev/invariant.d.ts.map +0 -1
- package/dist/dev/logger.d.ts +0 -13
- package/dist/dev/logger.d.ts.map +0 -1
- package/dist/dev/vite-plugin-askr.d.ts +0 -25
- package/dist/dev/vite-plugin-askr.d.ts.map +0 -1
- package/dist/dev/warnings.d.ts +0 -5
- package/dist/dev/warnings.d.ts.map +0 -1
- package/dist/for/for.d.ts +0 -16
- package/dist/for/for.d.ts.map +0 -1
- package/dist/for/for.js +0 -1
- package/dist/for/index.d.ts +0 -2
- package/dist/for/index.d.ts.map +0 -1
- package/dist/for/index.js +0 -1
- package/dist/foundations/core.d.ts.map +0 -1
- package/dist/foundations/index.d.ts.map +0 -1
- package/dist/foundations/interactions/index.d.ts +0 -5
- package/dist/foundations/interactions/index.d.ts.map +0 -1
- package/dist/foundations/state/index.d.ts +0 -2
- package/dist/foundations/state/index.d.ts.map +0 -1
- package/dist/foundations/structures/index.d.ts +0 -5
- package/dist/foundations/structures/index.d.ts.map +0 -1
- package/dist/foundations/structures.d.ts.map +0 -1
- package/dist/foundations/utilities/index.d.ts +0 -7
- package/dist/foundations/utilities/index.d.ts.map +0 -1
- package/dist/fx/index.d.ts.map +0 -1
- package/dist/fx/noop.d.ts +0 -12
- package/dist/fx/noop.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/jsx/index.d.ts.map +0 -1
- package/dist/jsx/jsx-dev-runtime.d.ts +0 -4
- package/dist/jsx/jsx-dev-runtime.d.ts.map +0 -1
- package/dist/jsx/jsx-runtime.d.ts +0 -10
- package/dist/jsx/jsx-runtime.d.ts.map +0 -1
- package/dist/node_modules/esbuild/lib/main.js +0 -65
- package/dist/renderer/cleanup.d.ts +0 -28
- package/dist/renderer/cleanup.d.ts.map +0 -1
- package/dist/renderer/dom.d.ts +0 -64
- package/dist/renderer/dom.d.ts.map +0 -1
- package/dist/renderer/evaluate.d.ts +0 -4
- package/dist/renderer/evaluate.d.ts.map +0 -1
- package/dist/renderer/fastpath.d.ts +0 -7
- package/dist/renderer/fastpath.d.ts.map +0 -1
- package/dist/renderer/index.d.ts +0 -6
- package/dist/renderer/index.d.ts.map +0 -1
- package/dist/renderer/keyed.d.ts +0 -23
- package/dist/renderer/keyed.d.ts.map +0 -1
- package/dist/renderer/reconcile.d.ts +0 -88
- package/dist/renderer/reconcile.d.ts.map +0 -1
- package/dist/renderer/types.d.ts +0 -3
- package/dist/renderer/types.d.ts.map +0 -1
- package/dist/renderer/utils.d.ts +0 -63
- package/dist/renderer/utils.d.ts.map +0 -1
- package/dist/resources/index.d.ts.map +0 -1
- package/dist/router/index.d.ts.map +0 -1
- package/dist/router/match.d.ts +0 -22
- package/dist/router/match.d.ts.map +0 -1
- package/dist/runtime/dev-namespace.d.ts +0 -31
- package/dist/runtime/dev-namespace.d.ts.map +0 -1
- package/dist/runtime/events.d.ts +0 -53
- package/dist/runtime/events.d.ts.map +0 -1
- package/dist/runtime/execution-model.d.ts +0 -4
- package/dist/runtime/execution-model.d.ts.map +0 -1
- package/dist/runtime/fastlane.d.ts +0 -27
- package/dist/runtime/fastlane.d.ts.map +0 -1
- package/dist/runtime/hydration.d.ts +0 -25
- package/dist/runtime/hydration.d.ts.map +0 -1
- package/dist/runtime/perf-metrics.d.ts +0 -25
- package/dist/runtime/perf-metrics.d.ts.map +0 -1
- package/dist/runtime/resource-cell.d.ts +0 -35
- package/dist/runtime/resource-cell.d.ts.map +0 -1
- package/dist/runtime/snapshot.d.ts +0 -25
- package/dist/runtime/snapshot.d.ts.map +0 -1
- package/dist/runtime/ssr-bridge.d.ts +0 -10
- package/dist/runtime/ssr-bridge.d.ts.map +0 -1
- package/dist/ssg/discover-resources.d.ts +0 -15
- package/dist/ssg/discover-resources.d.ts.map +0 -1
- package/dist/ssg/incremental-manifest.d.ts +0 -23
- package/dist/ssg/incremental-manifest.d.ts.map +0 -1
- package/dist/ssg/index.d.ts.map +0 -1
- package/dist/ssr/attrs.d.ts +0 -26
- package/dist/ssr/attrs.d.ts.map +0 -1
- package/dist/ssr/create-ssr.d.ts +0 -19
- package/dist/ssr/create-ssr.d.ts.map +0 -1
- package/dist/ssr/escape.d.ts +0 -38
- package/dist/ssr/escape.d.ts.map +0 -1
- package/dist/ssr/sink.d.ts +0 -23
- package/dist/ssr/sink.d.ts.map +0 -1
- package/dist/ssr/stream-render.d.ts +0 -7
- package/dist/ssr/stream-render.d.ts.map +0 -1
- package/dist/vite/index.js +0 -4
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
//#region src/foundations/utilities/use-id.d.ts
|
|
2
|
+
interface FormatIdOptions {
|
|
3
|
+
/** Defaults to 'askr' */
|
|
4
|
+
prefix?: string;
|
|
5
|
+
/** Stable, caller-provided identity */
|
|
6
|
+
id: string | number;
|
|
6
7
|
}
|
|
7
8
|
/**
|
|
8
9
|
* formatId
|
|
@@ -25,5 +26,7 @@ export interface FormatIdOptions {
|
|
|
25
26
|
* Numbers are coerced to strings via String().
|
|
26
27
|
* This is deterministic and consistent.
|
|
27
28
|
*/
|
|
28
|
-
|
|
29
|
+
declare function formatId(options: FormatIdOptions): string;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { FormatIdOptions, formatId };
|
|
29
32
|
//# sourceMappingURL=use-id.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-id.d.ts","
|
|
1
|
+
{"version":3,"file":"use-id.d.ts","names":[],"sources":["../../../src/foundations/utilities/use-id.ts"],"mappings":";UAAiB,eAAA;EAAA;EAEf,MAAA;;EAEA,EAAA;AAAA;AAwBF;;;;;;;;;;;;;;;;;;;;;AAAA,iBAAgB,QAAA,CAAS,OAAA,EAAS,eAAA"}
|
|
@@ -1 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/foundations/utilities/use-id.ts
|
|
2
|
+
/**
|
|
3
|
+
* formatId
|
|
4
|
+
*
|
|
5
|
+
* Formats a stable ID from a caller-provided identity.
|
|
6
|
+
* - Pure and deterministic (no time/randomness/global counters)
|
|
7
|
+
* - SSR-safe
|
|
8
|
+
*
|
|
9
|
+
* POLICY DECISIONS (LOCKED):
|
|
10
|
+
*
|
|
11
|
+
* 1. No Auto-Generation
|
|
12
|
+
* Caller must provide the `id`. No random/sequential generation.
|
|
13
|
+
* This ensures determinism and SSR safety.
|
|
14
|
+
*
|
|
15
|
+
* 2. Format Convention
|
|
16
|
+
* IDs are formatted as `{prefix}-{id}`.
|
|
17
|
+
* Default prefix is "askr".
|
|
18
|
+
*
|
|
19
|
+
* 3. Type Coercion
|
|
20
|
+
* Numbers are coerced to strings via String().
|
|
21
|
+
* This is deterministic and consistent.
|
|
22
|
+
*/
|
|
23
|
+
function formatId(options) {
|
|
24
|
+
return `${options.prefix ?? "askr"}-${String(options.id)}`;
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { formatId };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=use-id.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-id.js","names":[],"sources":["../../../src/foundations/utilities/use-id.ts"],"sourcesContent":["export interface FormatIdOptions {\n /** Defaults to 'askr' */\n prefix?: string;\n /** Stable, caller-provided identity */\n id: string | number;\n}\n\n/**\n * formatId\n *\n * Formats a stable ID from a caller-provided identity.\n * - Pure and deterministic (no time/randomness/global counters)\n * - SSR-safe\n *\n * POLICY DECISIONS (LOCKED):\n *\n * 1. No Auto-Generation\n * Caller must provide the `id`. No random/sequential generation.\n * This ensures determinism and SSR safety.\n *\n * 2. Format Convention\n * IDs are formatted as `{prefix}-{id}`.\n * Default prefix is \"askr\".\n *\n * 3. Type Coercion\n * Numbers are coerced to strings via String().\n * This is deterministic and consistent.\n */\nexport function formatId(options: FormatIdOptions): string {\n const prefix = options.prefix ?? 'askr';\n return `${prefix}-${String(options.id)}`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA4BA,SAAgB,SAAS,SAAkC;AAEzD,QAAO,GADQ,QAAQ,UAAU,OAChB,GAAG,OAAO,QAAQ,GAAG"}
|
package/dist/fx/fx.d.ts
CHANGED
|
@@ -1,30 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
//#region src/fx/fx.d.ts
|
|
2
|
+
type CancelFn = () => void;
|
|
3
|
+
declare function debounceEvent(ms: number, handler: EventListener, options?: {
|
|
4
|
+
leading?: boolean;
|
|
5
|
+
trailing?: boolean;
|
|
5
6
|
}): EventListener & {
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
cancel(): void;
|
|
8
|
+
flush(): void;
|
|
8
9
|
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
declare function throttleEvent(ms: number, handler: EventListener, options?: {
|
|
11
|
+
leading?: boolean;
|
|
12
|
+
trailing?: boolean;
|
|
12
13
|
}): EventListener & {
|
|
13
|
-
|
|
14
|
+
cancel(): void;
|
|
14
15
|
};
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
declare function rafEvent(handler: EventListener): EventListener & {
|
|
17
|
+
cancel(): void;
|
|
17
18
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
declare function scheduleTimeout(ms: number, fn: () => void): CancelFn;
|
|
20
|
+
declare function scheduleIdle(fn: () => void, options?: {
|
|
21
|
+
timeout?: number;
|
|
21
22
|
}): CancelFn;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
interface RetryOptions {
|
|
24
|
+
maxAttempts?: number;
|
|
25
|
+
delayMs?: number;
|
|
26
|
+
backoff?: (attemptIndex: number) => number;
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
declare function scheduleRetry<T>(fn: () => Promise<T>, options?: RetryOptions): {
|
|
29
|
+
cancel(): void;
|
|
29
30
|
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { debounceEvent, rafEvent, scheduleIdle, scheduleRetry, scheduleTimeout, throttleEvent };
|
|
30
33
|
//# sourceMappingURL=fx.d.ts.map
|
package/dist/fx/fx.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fx.d.ts","
|
|
1
|
+
{"version":3,"file":"fx.d.ts","names":[],"sources":["../../src/fx/fx.ts"],"mappings":";KAKY,QAAA;AAAA,iBAwCI,aAAA,CACd,EAAA,UACA,OAAA,EAAS,aAAA,EACT,OAAA;EAAY,OAAA;EAAmB,QAAA;AAAA,IAC9B,aAAA;EAAkB,MAAA;EAAgB,KAAA;AAAA;AAAA,iBAsErB,aAAA,CACd,EAAA,UACA,OAAA,EAAS,aAAA,EACT,OAAA;EAAY,OAAA;EAAmB,QAAA;AAAA,IAC9B,aAAA;EAAkB,MAAA;AAAA;AAAA,iBA0DL,QAAA,CACd,OAAA,EAAS,aAAA,GACR,aAAA;EAAkB,MAAA;AAAA;AAAA,iBAuDL,eAAA,CAAgB,EAAA,UAAY,EAAA,eAAiB,QAAA;AAAA,iBAuB7C,YAAA,CACd,EAAA,cACA,OAAA;EAAY,OAAA;AAAA,IACX,QAAA;AAAA,UA0Cc,YAAA;EACf,WAAA;EACA,OAAA;EACA,OAAA,IAAW,YAAA;AAAA;AAAA,iBAGG,aAAA,GAAA,CACd,EAAA,QAAU,OAAA,CAAQ,CAAA,GAClB,OAAA,GAAU,YAAA;EACP,MAAA;AAAA"}
|
package/dist/fx/fx.js
CHANGED
|
@@ -1 +1,212 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { logger } from "../dev/logger.js";
|
|
2
|
+
import { globalScheduler } from "../runtime/scheduler.js";
|
|
3
|
+
import { getCurrentComponentInstance } from "../runtime/component.js";
|
|
4
|
+
import { noopEventListener, noopEventListenerWithFlush } from "./noop.js";
|
|
5
|
+
//#region src/fx/fx.ts
|
|
6
|
+
function throwIfDuringRender() {
|
|
7
|
+
if (getCurrentComponentInstance() !== null) throw new Error("[Askr] calling FX handler during render is not allowed. Move calls to event handlers or effects.");
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Helper: schedule a user callback through the global scheduler
|
|
11
|
+
*/
|
|
12
|
+
function enqueueUserCallback(fn) {
|
|
13
|
+
globalScheduler.enqueue(() => {
|
|
14
|
+
try {
|
|
15
|
+
fn();
|
|
16
|
+
} catch (err) {
|
|
17
|
+
logger.error("[Askr] FX handler error:", err);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function debounceEvent(ms, handler, options) {
|
|
22
|
+
const { leading = false, trailing = true } = options || {};
|
|
23
|
+
const inst = getCurrentComponentInstance();
|
|
24
|
+
if (inst && inst.ssr) return noopEventListenerWithFlush;
|
|
25
|
+
let timeoutId = null;
|
|
26
|
+
let lastEvent = null;
|
|
27
|
+
let lastCallTime = 0;
|
|
28
|
+
const debounced = function(ev) {
|
|
29
|
+
throwIfDuringRender();
|
|
30
|
+
const now = Date.now();
|
|
31
|
+
lastEvent = ev;
|
|
32
|
+
if (timeoutId !== null) {
|
|
33
|
+
clearTimeout(timeoutId);
|
|
34
|
+
timeoutId = null;
|
|
35
|
+
}
|
|
36
|
+
if (leading && now - lastCallTime >= ms) {
|
|
37
|
+
enqueueUserCallback(() => handler.call(null, ev));
|
|
38
|
+
lastCallTime = now;
|
|
39
|
+
}
|
|
40
|
+
if (trailing) timeoutId = setTimeout(() => {
|
|
41
|
+
if (lastEvent) enqueueUserCallback(() => handler.call(null, lastEvent));
|
|
42
|
+
timeoutId = null;
|
|
43
|
+
lastCallTime = Date.now();
|
|
44
|
+
}, ms);
|
|
45
|
+
};
|
|
46
|
+
debounced.cancel = () => {
|
|
47
|
+
if (timeoutId !== null) {
|
|
48
|
+
clearTimeout(timeoutId);
|
|
49
|
+
timeoutId = null;
|
|
50
|
+
}
|
|
51
|
+
lastEvent = null;
|
|
52
|
+
};
|
|
53
|
+
debounced.flush = () => {
|
|
54
|
+
if (timeoutId !== null) {
|
|
55
|
+
clearTimeout(timeoutId);
|
|
56
|
+
const ev = lastEvent;
|
|
57
|
+
lastEvent = null;
|
|
58
|
+
timeoutId = null;
|
|
59
|
+
if (ev) enqueueUserCallback(() => handler.call(null, ev));
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
if (inst) (inst.cleanupFns ??= []).push(() => {
|
|
63
|
+
debounced.cancel();
|
|
64
|
+
});
|
|
65
|
+
return debounced;
|
|
66
|
+
}
|
|
67
|
+
function throttleEvent(ms, handler, options) {
|
|
68
|
+
const { leading = true, trailing = true } = options || {};
|
|
69
|
+
const inst = getCurrentComponentInstance();
|
|
70
|
+
if (inst && inst.ssr) return noopEventListener;
|
|
71
|
+
let lastCallTime = 0;
|
|
72
|
+
let timeoutId = null;
|
|
73
|
+
let lastEvent = null;
|
|
74
|
+
const throttled = function(ev) {
|
|
75
|
+
throwIfDuringRender();
|
|
76
|
+
const now = Date.now();
|
|
77
|
+
lastEvent = ev;
|
|
78
|
+
if (leading && now - lastCallTime >= ms) {
|
|
79
|
+
enqueueUserCallback(() => handler.call(null, ev));
|
|
80
|
+
lastCallTime = now;
|
|
81
|
+
if (timeoutId !== null) {
|
|
82
|
+
clearTimeout(timeoutId);
|
|
83
|
+
timeoutId = null;
|
|
84
|
+
}
|
|
85
|
+
} else if (!leading && lastCallTime === 0) lastCallTime = now;
|
|
86
|
+
if (trailing && timeoutId === null) {
|
|
87
|
+
const wait = ms - (now - lastCallTime);
|
|
88
|
+
timeoutId = setTimeout(() => {
|
|
89
|
+
if (lastEvent) enqueueUserCallback(() => handler.call(null, lastEvent));
|
|
90
|
+
lastCallTime = Date.now();
|
|
91
|
+
timeoutId = null;
|
|
92
|
+
}, Math.max(0, wait));
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
throttled.cancel = () => {
|
|
96
|
+
if (timeoutId !== null) {
|
|
97
|
+
clearTimeout(timeoutId);
|
|
98
|
+
timeoutId = null;
|
|
99
|
+
}
|
|
100
|
+
lastEvent = null;
|
|
101
|
+
};
|
|
102
|
+
if (inst) (inst.cleanupFns ??= []).push(() => throttled.cancel());
|
|
103
|
+
return throttled;
|
|
104
|
+
}
|
|
105
|
+
function rafEvent(handler) {
|
|
106
|
+
const inst = getCurrentComponentInstance();
|
|
107
|
+
if (inst && inst.ssr) return noopEventListener;
|
|
108
|
+
let frameId = null;
|
|
109
|
+
let lastEvent = null;
|
|
110
|
+
const scheduleFrame = () => {
|
|
111
|
+
frameId = (typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : (cb) => setTimeout(() => cb(Date.now()), 16))(() => {
|
|
112
|
+
frameId = null;
|
|
113
|
+
if (lastEvent) {
|
|
114
|
+
const ev = lastEvent;
|
|
115
|
+
lastEvent = null;
|
|
116
|
+
enqueueUserCallback(() => handler.call(null, ev));
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
const fn = function(ev) {
|
|
121
|
+
throwIfDuringRender();
|
|
122
|
+
lastEvent = ev;
|
|
123
|
+
if (frameId === null) scheduleFrame();
|
|
124
|
+
};
|
|
125
|
+
fn.cancel = () => {
|
|
126
|
+
if (frameId !== null) {
|
|
127
|
+
if (typeof cancelAnimationFrame !== "undefined" && typeof frameId === "number") cancelAnimationFrame(frameId);
|
|
128
|
+
else clearTimeout(frameId);
|
|
129
|
+
frameId = null;
|
|
130
|
+
}
|
|
131
|
+
lastEvent = null;
|
|
132
|
+
};
|
|
133
|
+
if (inst) (inst.cleanupFns ??= []).push(() => fn.cancel());
|
|
134
|
+
return fn;
|
|
135
|
+
}
|
|
136
|
+
function scheduleTimeout(ms, fn) {
|
|
137
|
+
throwIfDuringRender();
|
|
138
|
+
const inst = getCurrentComponentInstance();
|
|
139
|
+
if (inst && inst.ssr) return () => {};
|
|
140
|
+
let id = setTimeout(() => {
|
|
141
|
+
id = null;
|
|
142
|
+
enqueueUserCallback(fn);
|
|
143
|
+
}, ms);
|
|
144
|
+
const cancel = () => {
|
|
145
|
+
if (id !== null) {
|
|
146
|
+
clearTimeout(id);
|
|
147
|
+
id = null;
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
if (inst) (inst.cleanupFns ??= []).push(cancel);
|
|
151
|
+
return cancel;
|
|
152
|
+
}
|
|
153
|
+
function scheduleIdle(fn, options) {
|
|
154
|
+
throwIfDuringRender();
|
|
155
|
+
const inst = getCurrentComponentInstance();
|
|
156
|
+
if (inst && inst.ssr) return () => {};
|
|
157
|
+
let id = null;
|
|
158
|
+
let usingRIC = false;
|
|
159
|
+
if (typeof requestIdleCallback !== "undefined") {
|
|
160
|
+
usingRIC = true;
|
|
161
|
+
id = requestIdleCallback(() => {
|
|
162
|
+
id = null;
|
|
163
|
+
enqueueUserCallback(fn);
|
|
164
|
+
}, options);
|
|
165
|
+
} else id = setTimeout(() => {
|
|
166
|
+
id = null;
|
|
167
|
+
enqueueUserCallback(fn);
|
|
168
|
+
}, 0);
|
|
169
|
+
const cancel = () => {
|
|
170
|
+
if (id !== null) {
|
|
171
|
+
if (usingRIC && typeof cancelIdleCallback !== "undefined" && typeof id === "number") cancelIdleCallback(id);
|
|
172
|
+
else clearTimeout(id);
|
|
173
|
+
id = null;
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
if (inst) (inst.cleanupFns ??= []).push(cancel);
|
|
177
|
+
return cancel;
|
|
178
|
+
}
|
|
179
|
+
function scheduleRetry(fn, options) {
|
|
180
|
+
throwIfDuringRender();
|
|
181
|
+
const inst = getCurrentComponentInstance();
|
|
182
|
+
if (inst && inst.ssr) return { cancel: () => {} };
|
|
183
|
+
const { maxAttempts = 3, delayMs = 100, backoff = (i) => delayMs * Math.pow(2, i) } = options || {};
|
|
184
|
+
let cancelled = false;
|
|
185
|
+
const attempt = (index) => {
|
|
186
|
+
if (cancelled) return;
|
|
187
|
+
globalScheduler.enqueue(() => {
|
|
188
|
+
if (cancelled) return;
|
|
189
|
+
fn().then(() => {}, () => {
|
|
190
|
+
if (cancelled) return;
|
|
191
|
+
if (index + 1 < maxAttempts) {
|
|
192
|
+
const delay = backoff(index);
|
|
193
|
+
setTimeout(() => {
|
|
194
|
+
attempt(index + 1);
|
|
195
|
+
}, delay);
|
|
196
|
+
}
|
|
197
|
+
}).catch((e) => {
|
|
198
|
+
logger.error("[Askr] scheduleRetry error:", e);
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
};
|
|
202
|
+
attempt(0);
|
|
203
|
+
const cancel = () => {
|
|
204
|
+
cancelled = true;
|
|
205
|
+
};
|
|
206
|
+
if (inst) (inst.cleanupFns ??= []).push(cancel);
|
|
207
|
+
return { cancel };
|
|
208
|
+
}
|
|
209
|
+
//#endregion
|
|
210
|
+
export { debounceEvent, rafEvent, scheduleIdle, scheduleRetry, scheduleTimeout, throttleEvent };
|
|
211
|
+
|
|
212
|
+
//# sourceMappingURL=fx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fx.js","names":[],"sources":["../../src/fx/fx.ts"],"sourcesContent":["import { globalScheduler } from '../runtime/scheduler';\nimport { getCurrentComponentInstance } from '../runtime/component';\nimport { logger } from '../dev/logger';\nimport { noopEventListener, noopEventListenerWithFlush } from './noop';\n\nexport type CancelFn = () => void;\n\n// Platform-specific timer handle types\ntype TimeoutHandle = ReturnType<typeof setTimeout> | null;\n// rAF may fall back to setTimeout in some environments/tests, include both\ntype RafHandle =\n | ReturnType<typeof requestAnimationFrame>\n | ReturnType<typeof setTimeout>\n | null;\n// requestIdleCallback may be unavailable; allow setTimeout fallback handle\ntype IdleHandle =\n | ReturnType<typeof requestIdleCallback>\n | ReturnType<typeof setTimeout>\n | null;\n\nfunction throwIfDuringRender(): void {\n const inst = getCurrentComponentInstance();\n if (inst !== null) {\n throw new Error(\n '[Askr] calling FX handler during render is not allowed. Move calls to event handlers or effects.'\n );\n }\n}\n\n/**\n * Helper: schedule a user callback through the global scheduler\n */\nfunction enqueueUserCallback(fn: () => void) {\n globalScheduler.enqueue(() => {\n try {\n fn();\n } catch (err) {\n // Keep behavior consistent with other scheduler-queued work\n logger.error('[Askr] FX handler error:', err);\n }\n });\n}\n\n// ---------- Event handlers ----------\n\nexport function debounceEvent(\n ms: number,\n handler: EventListener,\n options?: { leading?: boolean; trailing?: boolean }\n): EventListener & { cancel(): void; flush(): void } {\n const { leading = false, trailing = true } = options || {};\n\n const inst = getCurrentComponentInstance();\n // On SSR, event handlers are inert\n if (inst && inst.ssr) {\n return noopEventListenerWithFlush;\n }\n\n let timeoutId: TimeoutHandle = null;\n let lastEvent: Event | null = null;\n let lastCallTime = 0;\n\n const debounced = function (this: unknown, ev: Event) {\n // Disallow using returned handler during render\n throwIfDuringRender();\n\n const now = Date.now();\n lastEvent = ev;\n\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n\n if (leading && now - lastCallTime >= ms) {\n enqueueUserCallback(() => handler.call(null, ev));\n lastCallTime = now;\n }\n\n if (trailing) {\n timeoutId = setTimeout(() => {\n // Schedule through scheduler\n if (lastEvent) {\n enqueueUserCallback(() => handler.call(null, lastEvent!));\n }\n timeoutId = null;\n lastCallTime = Date.now();\n }, ms);\n }\n } as EventListener & { cancel(): void; flush(): void };\n\n debounced.cancel = () => {\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n lastEvent = null;\n };\n\n debounced.flush = () => {\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n const ev = lastEvent;\n lastEvent = null;\n timeoutId = null;\n if (ev) enqueueUserCallback(() => handler.call(null, ev));\n }\n };\n\n // Auto-cleanup on component unmount\n if (inst) {\n (inst.cleanupFns ??= []).push(() => {\n debounced.cancel();\n });\n }\n\n return debounced;\n}\n\nexport function throttleEvent(\n ms: number,\n handler: EventListener,\n options?: { leading?: boolean; trailing?: boolean }\n): EventListener & { cancel(): void } {\n const { leading = true, trailing = true } = options || {};\n\n const inst = getCurrentComponentInstance();\n if (inst && inst.ssr) {\n return noopEventListener;\n }\n\n let lastCallTime = 0;\n let timeoutId: TimeoutHandle = null;\n let lastEvent: Event | null = null;\n\n const throttled = function (this: unknown, ev: Event) {\n throwIfDuringRender();\n\n const now = Date.now();\n lastEvent = ev;\n\n if (leading && now - lastCallTime >= ms) {\n enqueueUserCallback(() => handler.call(null, ev));\n lastCallTime = now;\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n } else if (!leading && lastCallTime === 0) {\n lastCallTime = now;\n }\n\n if (trailing && timeoutId === null) {\n const wait = ms - (now - lastCallTime);\n timeoutId = setTimeout(\n () => {\n if (lastEvent)\n enqueueUserCallback(() => handler.call(null, lastEvent!));\n lastCallTime = Date.now();\n timeoutId = null;\n },\n Math.max(0, wait)\n );\n }\n } as EventListener & { cancel(): void };\n\n throttled.cancel = () => {\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n lastEvent = null;\n };\n\n if (inst) {\n (inst.cleanupFns ??= []).push(() => throttled.cancel());\n }\n\n return throttled;\n}\n\nexport function rafEvent(\n handler: EventListener\n): EventListener & { cancel(): void } {\n const inst = getCurrentComponentInstance();\n if (inst && inst.ssr) {\n return noopEventListener;\n }\n\n let frameId: RafHandle = null;\n let lastEvent: Event | null = null;\n\n const scheduleFrame = () => {\n const rAF =\n typeof requestAnimationFrame !== 'undefined'\n ? requestAnimationFrame\n : (cb: FrameRequestCallback) => setTimeout(() => cb(Date.now()), 16);\n\n frameId = rAF(() => {\n frameId = null;\n if (lastEvent) {\n const ev = lastEvent;\n lastEvent = null;\n enqueueUserCallback(() => handler.call(null, ev));\n }\n });\n };\n\n const fn = function (this: unknown, ev: Event) {\n throwIfDuringRender();\n lastEvent = ev;\n if (frameId === null) scheduleFrame();\n } as EventListener & { cancel(): void };\n\n fn.cancel = () => {\n if (frameId !== null) {\n // If frameId is numeric and cancelAnimationFrame is available, use it;\n // otherwise fall back to clearTimeout for the setTimeout fallback.\n if (\n typeof cancelAnimationFrame !== 'undefined' &&\n typeof frameId === 'number'\n ) {\n cancelAnimationFrame(frameId);\n } else {\n clearTimeout(frameId as ReturnType<typeof setTimeout>);\n }\n frameId = null;\n }\n lastEvent = null;\n };\n\n if (inst) (inst.cleanupFns ??= []).push(() => fn.cancel());\n\n return fn;\n}\n\n// ---------- Scheduled work ----------\n\nexport function scheduleTimeout(ms: number, fn: () => void): CancelFn {\n throwIfDuringRender();\n const inst = getCurrentComponentInstance();\n if (inst && inst.ssr) {\n return () => {};\n }\n\n let id: TimeoutHandle = setTimeout(() => {\n id = null;\n enqueueUserCallback(fn);\n }, ms);\n\n const cancel = () => {\n if (id !== null) {\n clearTimeout(id);\n id = null;\n }\n };\n\n if (inst) (inst.cleanupFns ??= []).push(cancel);\n return cancel;\n}\n\nexport function scheduleIdle(\n fn: () => void,\n options?: { timeout?: number }\n): CancelFn {\n throwIfDuringRender();\n const inst = getCurrentComponentInstance();\n if (inst && inst.ssr) return () => {};\n\n let id: IdleHandle = null;\n let usingRIC = false;\n\n if (typeof requestIdleCallback !== 'undefined') {\n usingRIC = true;\n id = requestIdleCallback(() => {\n id = null;\n enqueueUserCallback(fn);\n }, options);\n } else {\n // Fallback: schedule on next macrotask\n id = setTimeout(() => {\n id = null;\n enqueueUserCallback(fn);\n }, 0);\n }\n\n const cancel = () => {\n if (id !== null) {\n // If using requestIdleCallback and available, call cancelIdleCallback for numeric ids.\n if (\n usingRIC &&\n typeof cancelIdleCallback !== 'undefined' &&\n typeof id === 'number'\n ) {\n cancelIdleCallback(id);\n } else {\n clearTimeout(id as ReturnType<typeof setTimeout>);\n }\n id = null;\n }\n };\n\n if (inst) (inst.cleanupFns ??= []).push(cancel);\n return cancel;\n}\n\nexport interface RetryOptions {\n maxAttempts?: number;\n delayMs?: number;\n backoff?: (attemptIndex: number) => number;\n}\n\nexport function scheduleRetry<T>(\n fn: () => Promise<T>,\n options?: RetryOptions\n): { cancel(): void } {\n throwIfDuringRender();\n const inst = getCurrentComponentInstance();\n if (inst && inst.ssr) return { cancel: () => {} };\n\n const {\n maxAttempts = 3,\n delayMs = 100,\n backoff = (i: number) => delayMs * Math.pow(2, i),\n } = options || {};\n\n let cancelled = false;\n\n const attempt = (index: number) => {\n if (cancelled) return;\n // Run user fn inside scheduler\n globalScheduler.enqueue(() => {\n if (cancelled) return;\n // Call fn (it may be async)\n const p = fn();\n p.then(\n () => {\n // Completed successfully\n },\n () => {\n if (cancelled) return;\n if (index + 1 < maxAttempts) {\n const delay = backoff(index);\n // Schedule next attempt via setTimeout so it gets enqueued through scheduleTimeout\n setTimeout(() => {\n attempt(index + 1);\n }, delay);\n }\n }\n ).catch((e) => {\n logger.error('[Askr] scheduleRetry error:', e);\n });\n });\n };\n\n // Start first attempt\n attempt(0);\n\n const cancel = () => {\n cancelled = true;\n };\n\n if (inst) (inst.cleanupFns ??= []).push(cancel);\n return { cancel };\n}\n"],"mappings":"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"}
|
package/dist/fx/index.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export { debounce, throttle, once, defer, raf, idle, timeout, retry, type DebounceOptions, type ThrottleOptions, type RetryOptions, } from './timing';
|
|
6
|
-
export { debounceEvent, throttleEvent, rafEvent, scheduleTimeout, scheduleIdle, scheduleRetry, } from './fx';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
import { scheduleEventHandler } from "../runtime/scheduler.js";
|
|
2
|
+
import { DebounceOptions, RetryOptions, ThrottleOptions, debounce, defer, idle, once, raf, retry, throttle, timeout } from "./timing.js";
|
|
3
|
+
import { debounceEvent, rafEvent, scheduleIdle, scheduleRetry, scheduleTimeout, throttleEvent } from "./fx.js";
|
|
4
|
+
export { type DebounceOptions, type RetryOptions, type ThrottleOptions, debounce, debounceEvent, defer, idle, once, raf, rafEvent, retry, scheduleEventHandler, scheduleIdle, scheduleRetry, scheduleTimeout, throttle, throttleEvent, timeout };
|
package/dist/fx/index.js
CHANGED
|
@@ -1 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { scheduleEventHandler } from "../runtime/scheduler.js";
|
|
2
|
+
import { debounce, defer, idle, once, raf, retry, throttle, timeout } from "./timing.js";
|
|
3
|
+
import { debounceEvent, rafEvent, scheduleIdle, scheduleRetry, scheduleTimeout, throttleEvent } from "./fx.js";
|
|
4
|
+
export { debounce, debounceEvent, defer, idle, once, raf, rafEvent, retry, scheduleEventHandler, scheduleIdle, scheduleRetry, scheduleTimeout, throttle, throttleEvent, timeout };
|
package/dist/fx/noop.js
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
|
-
const
|
|
1
|
+
const noopEventListener = Object.assign((_ev) => {}, { cancel() {} });
|
|
2
|
+
const noopEventListenerWithFlush = Object.assign((_ev) => {}, {
|
|
3
|
+
cancel() {},
|
|
4
|
+
flush() {}
|
|
5
|
+
});
|
|
6
|
+
//#endregion
|
|
7
|
+
export { noopEventListener, noopEventListenerWithFlush };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=noop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"noop.js","names":[],"sources":["../../src/fx/noop.ts"],"sourcesContent":["// Lightweight shared no-op helpers to avoid double-casts and duplicated definitions\n\nexport const noop: () => void = () => {};\n\nexport const noopEventListener: EventListener & { cancel(): void } =\n Object.assign((_ev?: Event) => {}, { cancel() {} });\n\nexport const noopEventListenerWithFlush: EventListener & {\n cancel(): void;\n flush(): void;\n} = Object.assign((_ev?: Event) => {}, { cancel() {}, flush() {} });\n\nexport const noopCancel: { cancel(): void } = { cancel() {} };\n"],"mappings":"AAIA,MAAa,oBACX,OAAO,QAAQ,QAAgB,IAAI,EAAE,SAAS,IAAI,CAAC;AAErD,MAAa,6BAGT,OAAO,QAAQ,QAAgB,IAAI;CAAE,SAAS;CAAI,QAAQ;CAAI,CAAC"}
|
package/dist/fx/timing.d.ts
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
+
//#region src/fx/timing.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Timing utilities — pure helpers for common async patterns
|
|
3
4
|
* No framework coupling. No lifecycle awareness.
|
|
4
5
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
interface DebounceOptions {
|
|
7
|
+
leading?: boolean;
|
|
8
|
+
trailing?: boolean;
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
interface ThrottleOptions {
|
|
11
|
+
leading?: boolean;
|
|
12
|
+
trailing?: boolean;
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
interface RetryOptions {
|
|
15
|
+
maxAttempts?: number;
|
|
16
|
+
delayMs?: number;
|
|
17
|
+
backoff?: (attemptIndex: number) => number;
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
* Debounce — delay execution, coalesce rapid calls
|
|
@@ -32,8 +33,8 @@ export interface RetryOptions {
|
|
|
32
33
|
* save.cancel(); // stop any pending execution
|
|
33
34
|
* ```
|
|
34
35
|
*/
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
declare function debounce<T extends (...args: unknown[]) => unknown>(fn: T, ms: number, options?: DebounceOptions): T & {
|
|
37
|
+
cancel(): void;
|
|
37
38
|
};
|
|
38
39
|
/**
|
|
39
40
|
* Throttle — rate-limit execution, keep first/last
|
|
@@ -52,8 +53,8 @@ export declare function debounce<T extends (...args: unknown[]) => unknown>(fn:
|
|
|
52
53
|
* handleScroll.cancel();
|
|
53
54
|
* ```
|
|
54
55
|
*/
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
declare function throttle<T extends (...args: unknown[]) => unknown>(fn: T, ms: number, options?: ThrottleOptions): T & {
|
|
57
|
+
cancel(): void;
|
|
57
58
|
};
|
|
58
59
|
/**
|
|
59
60
|
* Once — guard against double execution
|
|
@@ -71,7 +72,7 @@ export declare function throttle<T extends (...args: unknown[]) => unknown>(fn:
|
|
|
71
72
|
* init(); // does nothing
|
|
72
73
|
* ```
|
|
73
74
|
*/
|
|
74
|
-
|
|
75
|
+
declare function once<T extends (...args: unknown[]) => unknown>(fn: T): T;
|
|
75
76
|
/**
|
|
76
77
|
* Defer — schedule on microtask queue
|
|
77
78
|
*
|
|
@@ -85,7 +86,7 @@ export declare function once<T extends (...args: unknown[]) => unknown>(fn: T):
|
|
|
85
86
|
* defer(() => update()); // runs after current stack, before next macrotask
|
|
86
87
|
* ```
|
|
87
88
|
*/
|
|
88
|
-
|
|
89
|
+
declare function defer(fn: () => void): void;
|
|
89
90
|
/**
|
|
90
91
|
* RAF — coalesce multiple updates into single frame
|
|
91
92
|
*
|
|
@@ -101,7 +102,7 @@ export declare function defer(fn: () => void): void;
|
|
|
101
102
|
* update(); // same frame, no duplicate
|
|
102
103
|
* ```
|
|
103
104
|
*/
|
|
104
|
-
|
|
105
|
+
declare function raf<T extends (...args: unknown[]) => unknown>(fn: T): T;
|
|
105
106
|
/**
|
|
106
107
|
* Idle — schedule low-priority work
|
|
107
108
|
*
|
|
@@ -116,8 +117,8 @@ export declare function raf<T extends (...args: unknown[]) => unknown>(fn: T): T
|
|
|
116
117
|
* idle(() => prefetchData());
|
|
117
118
|
* ```
|
|
118
119
|
*/
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
declare function idle(fn: () => void, options?: {
|
|
121
|
+
timeout?: number;
|
|
121
122
|
}): void;
|
|
122
123
|
/**
|
|
123
124
|
* Timeout — Promise-based delay
|
|
@@ -133,7 +134,7 @@ export declare function idle(fn: () => void, options?: {
|
|
|
133
134
|
* console.log('300ms later');
|
|
134
135
|
* ```
|
|
135
136
|
*/
|
|
136
|
-
|
|
137
|
+
declare function timeout(ms: number): Promise<void>;
|
|
137
138
|
/**
|
|
138
139
|
* Retry — attempt function with backoff
|
|
139
140
|
*
|
|
@@ -151,5 +152,7 @@ export declare function timeout(ms: number): Promise<void>;
|
|
|
151
152
|
* });
|
|
152
153
|
* ```
|
|
153
154
|
*/
|
|
154
|
-
|
|
155
|
+
declare function retry<T>(fn: () => Promise<T>, options?: RetryOptions): Promise<T>;
|
|
156
|
+
//#endregion
|
|
157
|
+
export { DebounceOptions, RetryOptions, ThrottleOptions, debounce, defer, idle, once, raf, retry, throttle, timeout };
|
|
155
158
|
//# sourceMappingURL=timing.d.ts.map
|
package/dist/fx/timing.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timing.d.ts","
|
|
1
|
+
{"version":3,"file":"timing.d.ts","names":[],"sources":["../../src/fx/timing.ts"],"mappings":";;AAKA;;;UAAiB,eAAA;EACf,OAAA;EACA,QAAA;AAAA;AAAA,UAGe,eAAA;EACf,OAAA;EACA,QAAA;AAAA;AAAA,UAGe,YAAA;EACf,WAAA;EACA,OAAA;EACA,OAAA,IAAW,YAAA;AAAA;;;;;AAoBb;;;;;;;;;;;;;iBAAgB,QAAA,eAAuB,IAAA,wBAAA,CACrC,EAAA,EAAI,CAAA,EACJ,EAAA,UACA,OAAA,GAAU,eAAA,GACT,CAAA;EAAM,MAAA;AAAA;;;;AA0DT;;;;;;;;;;;;;;iBAAgB,QAAA,eAAuB,IAAA,wBAAA,CACrC,EAAA,EAAI,CAAA,EACJ,EAAA,UACA,OAAA,GAAU,eAAA,GACT,CAAA;EAAM,MAAA;AAAA;;;AA8DT;;;;;;;;;;;AA0BA;;;iBA1BgB,IAAA,eAAmB,IAAA,wBAAA,CAA6B,EAAA,EAAI,CAAA,GAAI,CAAA;;AA6CxE;;;;;;;;;;;AAiCA;iBApDgB,KAAA,CAAM,EAAA;;;;;;;;AA6EtB;;;;;AAqBA;;;iBA/EgB,GAAA,eAAkB,IAAA,wBAAA,CAA6B,EAAA,EAAI,CAAA,GAAI,CAAA;;;;;;;;;;;;;;;iBAiCvD,IAAA,CAAK,EAAA,cAAgB,OAAA;EAAY,OAAA;AAAA;;;;;;;;;;;;;;;iBAyBjC,OAAA,CAAQ,EAAA,WAAa,OAAA;;;;;;;;;;;;;;;;;;iBAqBf,KAAA,GAAA,CACpB,EAAA,QAAU,OAAA,CAAQ,CAAA,GAClB,OAAA,GAAU,YAAA,GACT,OAAA,CAAQ,CAAA"}
|