@hyperfixi/core 3.3.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -179
- package/dist/ast-utils/index.cjs +74 -806
- package/dist/ast-utils/index.d.ts +1 -1
- package/dist/ast-utils/index.mjs +74 -805
- package/dist/ast-utils/interchange/engine-positions.d.ts +3 -0
- package/dist/ast-utils/interchange/index.d.ts +1 -2
- package/dist/hyperfixi.js +19 -2
- package/dist/index.d.ts +2 -22
- package/dist/index.mjs +3 -29128
- package/dist/lsp-metadata.cjs +77 -73
- package/dist/lsp-metadata.d.ts +4 -4
- package/dist/lsp-metadata.mjs +77 -73
- package/dist/metadata.cjs +34 -266
- package/dist/metadata.d.ts +31 -26
- package/dist/metadata.mjs +34 -266
- package/dist/multilingual/index.cjs +16 -382
- package/dist/multilingual/index.d.ts +4 -32
- package/dist/multilingual/index.mjs +15 -377
- package/dist/reference/index.cjs +67 -216
- package/dist/reference/index.d.ts +0 -3
- package/dist/reference/index.mjs +68 -216
- package/dist/version.d.ts +1 -1
- package/package.json +13 -179
- package/dist/__test-utils__/context-builders.d.ts +0 -42
- package/dist/__test-utils__/error-testing.d.ts +0 -18
- package/dist/__test-utils__/index.d.ts +0 -6
- package/dist/__test-utils__/mock-types.d.ts +0 -57
- package/dist/__test-utils__/parser-context-mock.d.ts +0 -7
- package/dist/__test-utils__/parser-helpers.d.ts +0 -38
- package/dist/api/hyperscript-api.d.ts +0 -90
- package/dist/api/lokascript-api.d.ts +0 -9
- package/dist/ast/command-slots.d.ts +0 -140
- package/dist/ast/guards.d.ts +0 -15
- package/dist/ast/legacy.d.ts +0 -15
- package/dist/ast/nodes.d.ts +0 -243
- package/dist/ast-utils/interchange/from-core.d.ts +0 -12
- package/dist/ast-utils/interchange/to-core.d.ts +0 -8
- package/dist/behaviors/boosted.d.ts +0 -29
- package/dist/behaviors/history-swap.d.ts +0 -24
- package/dist/behaviors/index.cjs +0 -1155
- package/dist/behaviors/index.d.ts +0 -4
- package/dist/behaviors/index.mjs +0 -1145
- package/dist/bundle-generator/executor-core.d.ts +0 -4
- package/dist/bundle-generator/generator.d.ts +0 -4
- package/dist/bundle-generator/index.cjs +0 -2804
- package/dist/bundle-generator/index.d.ts +0 -6
- package/dist/bundle-generator/index.mjs +0 -2779
- package/dist/bundle-generator/parser-templates.d.ts +0 -6
- package/dist/bundle-generator/template-capabilities.d.ts +0 -12
- package/dist/bundle-generator/templates.d.ts +0 -12
- package/dist/bundle-generator/types.d.ts +0 -34
- package/dist/chunks/bridge-CI9SOl8u.js +0 -2
- package/dist/chunks/browser-modular-7CpI5VF2.js +0 -2
- package/dist/chunks/index-BwXDEK0m.js +0 -2
- package/dist/chunks/index-DQi2o8Lk.js +0 -2
- package/dist/chunks/index-uCOQ8Qn0.js +0 -2
- package/dist/commands/advanced/js.d.ts +0 -40
- package/dist/commands/animation/measure.d.ts +0 -43
- package/dist/commands/animation/settle.d.ts +0 -38
- package/dist/commands/animation/start-view-transition.d.ts +0 -38
- package/dist/commands/animation/take.d.ts +0 -41
- package/dist/commands/animation/transition.d.ts +0 -49
- package/dist/commands/async/fetch.d.ts +0 -61
- package/dist/commands/async/wait.d.ts +0 -51
- package/dist/commands/behaviors/install.d.ts +0 -40
- package/dist/commands/content/append.d.ts +0 -26
- package/dist/commands/content/insertion-base.d.ts +0 -60
- package/dist/commands/content/prepend.d.ts +0 -26
- package/dist/commands/control-flow/break.d.ts +0 -29
- package/dist/commands/control-flow/continue.d.ts +0 -29
- package/dist/commands/control-flow/exit.d.ts +0 -29
- package/dist/commands/control-flow/halt.d.ts +0 -39
- package/dist/commands/control-flow/if.d.ts +0 -58
- package/dist/commands/control-flow/repeat.d.ts +0 -50
- package/dist/commands/control-flow/return.d.ts +0 -33
- package/dist/commands/control-flow/signal-base.d.ts +0 -18
- package/dist/commands/control-flow/throw.d.ts +0 -34
- package/dist/commands/control-flow/unless.d.ts +0 -3
- package/dist/commands/data/clear.d.ts +0 -37
- package/dist/commands/data/decrement.d.ts +0 -3
- package/dist/commands/data/default.d.ts +0 -60
- package/dist/commands/data/get.d.ts +0 -35
- package/dist/commands/data/increment.d.ts +0 -42
- package/dist/commands/data/set.d.ts +0 -76
- package/dist/commands/decorators/index.d.ts +0 -14
- package/dist/commands/dom/add.d.ts +0 -44
- package/dist/commands/dom/close.d.ts +0 -32
- package/dist/commands/dom/dom-modification-base.d.ts +0 -48
- package/dist/commands/dom/empty.d.ts +0 -32
- package/dist/commands/dom/hide.d.ts +0 -28
- package/dist/commands/dom/make.d.ts +0 -34
- package/dist/commands/dom/open.d.ts +0 -34
- package/dist/commands/dom/process-partials.d.ts +0 -51
- package/dist/commands/dom/put.d.ts +0 -42
- package/dist/commands/dom/remove.d.ts +0 -46
- package/dist/commands/dom/reset.d.ts +0 -32
- package/dist/commands/dom/select.d.ts +0 -32
- package/dist/commands/dom/show.d.ts +0 -29
- package/dist/commands/dom/swap.d.ts +0 -65
- package/dist/commands/dom/toggle.d.ts +0 -69
- package/dist/commands/dom/visibility-base.d.ts +0 -22
- package/dist/commands/events/send.d.ts +0 -3
- package/dist/commands/events/trigger.d.ts +0 -49
- package/dist/commands/execution/blur.d.ts +0 -32
- package/dist/commands/execution/call.d.ts +0 -35
- package/dist/commands/execution/focus.d.ts +0 -32
- package/dist/commands/execution/pseudo-command.d.ts +0 -41
- package/dist/commands/helpers/attribute-manipulation.d.ts +0 -11
- package/dist/commands/helpers/attribute-target.d.ts +0 -9
- package/dist/commands/helpers/batch-dom-operations.d.ts +0 -12
- package/dist/commands/helpers/body-ops.d.ts +0 -10
- package/dist/commands/helpers/class-manipulation.d.ts +0 -11
- package/dist/commands/helpers/condition-helpers.d.ts +0 -4
- package/dist/commands/helpers/dom-mutation.d.ts +0 -16
- package/dist/commands/helpers/duration-parsing.d.ts +0 -8
- package/dist/commands/helpers/element-property-access.d.ts +0 -7
- package/dist/commands/helpers/element-resolution.d.ts +0 -16
- package/dist/commands/helpers/error-helpers.d.ts +0 -17
- package/dist/commands/helpers/event-helpers.d.ts +0 -13
- package/dist/commands/helpers/event-waiting.d.ts +0 -37
- package/dist/commands/helpers/index.d.ts +0 -32
- package/dist/commands/helpers/input-validator.d.ts +0 -23
- package/dist/commands/helpers/loop-executor.d.ts +0 -56
- package/dist/commands/helpers/numeric-target-parser.d.ts +0 -21
- package/dist/commands/helpers/property-target.d.ts +0 -20
- package/dist/commands/helpers/selector-type-detection.d.ts +0 -24
- package/dist/commands/helpers/slots.d.ts +0 -5
- package/dist/commands/helpers/smart-element.d.ts +0 -16
- package/dist/commands/helpers/style-manipulation.d.ts +0 -16
- package/dist/commands/helpers/target-elements.d.ts +0 -5
- package/dist/commands/helpers/temporal-modifiers.d.ts +0 -15
- package/dist/commands/helpers/url-argument-parser.d.ts +0 -13
- package/dist/commands/helpers/url-validation.d.ts +0 -7
- package/dist/commands/helpers/variable-access.d.ts +0 -13
- package/dist/commands/helpers/visibility-target-parser.d.ts +0 -15
- package/dist/commands/helpers/write-target.d.ts +0 -42
- package/dist/commands/index.cjs +0 -24168
- package/dist/commands/index.d.ts +0 -171
- package/dist/commands/index.mjs +0 -23981
- package/dist/commands/manifest.d.ts +0 -17
- package/dist/commands/navigation/go.d.ts +0 -58
- package/dist/commands/navigation/push-url.d.ts +0 -48
- package/dist/commands/navigation/replace-url.d.ts +0 -3
- package/dist/commands/navigation/scroll-to.d.ts +0 -43
- package/dist/commands/templates/render.d.ts +0 -47
- package/dist/commands/utility/beep.d.ts +0 -41
- package/dist/commands/utility/breakpoint.d.ts +0 -32
- package/dist/commands/utility/copy.d.ts +0 -41
- package/dist/commands/utility/log.d.ts +0 -36
- package/dist/commands/utility/pick.d.ts +0 -47
- package/dist/commands/utility/tell.d.ts +0 -39
- package/dist/compatibility/browser-bundle-classic.d.ts +0 -17
- package/dist/compatibility/browser-bundle-hybrid-complete.d.ts +0 -22
- package/dist/compatibility/browser-bundle-hybrid-hx.d.ts +0 -43
- package/dist/compatibility/browser-bundle-lite.d.ts +0 -15
- package/dist/compatibility/browser-bundle-modular.d.ts +0 -18
- package/dist/compatibility/browser-bundle-multilingual.d.ts +0 -19
- package/dist/compatibility/browser-bundle-semantic-complete.d.ts +0 -24
- package/dist/compatibility/browser-bundle-textshelf-minimal.d.ts +0 -16
- package/dist/compatibility/browser-bundle-textshelf-profile.d.ts +0 -18
- package/dist/compatibility/browser-modular.d.ts +0 -42
- package/dist/compatibility/browser-tests/helpers/semantic-page.d.ts +0 -3
- package/dist/compatibility/browser-tests/test-utils.d.ts +0 -21
- package/dist/compatibility/bundle-shell.d.ts +0 -13
- package/dist/compatibility/bundle-sources.d.ts +0 -4
- package/dist/compatibility/eval-hyperscript.d.ts +0 -16
- package/dist/compatibility/hyperscript-adapter.d.ts +0 -38
- package/dist/core/ast-property-utils.d.ts +0 -2
- package/dist/core/context.d.ts +0 -19
- package/dist/core/dom.d.ts +0 -15
- package/dist/core/evaluator-types.d.ts +0 -5
- package/dist/core/events.d.ts +0 -48
- package/dist/core/executor.d.ts +0 -34
- package/dist/core/expression-evaluator.d.ts +0 -6
- package/dist/core/expression-registry.d.ts +0 -8
- package/dist/core/scope-hooks.d.ts +0 -24
- package/dist/debug/debug-controller.d.ts +0 -62
- package/dist/debug/index.d.ts +0 -5
- package/dist/dom/attribute-processor.d.ts +0 -75
- package/dist/dom/detect-language.d.ts +0 -3
- package/dist/dom/minimal-attribute-processor.d.ts +0 -20
- package/dist/expressions/base-expression.d.ts +0 -27
- package/dist/expressions/bundles/common-expressions.d.ts +0 -10
- package/dist/expressions/bundles/core-expressions.d.ts +0 -8
- package/dist/expressions/bundles/full-expressions.d.ts +0 -11
- package/dist/expressions/bundles/index.d.ts +0 -7
- package/dist/expressions/collection/index.d.ts +0 -10
- package/dist/expressions/conversion/index.d.ts +0 -31
- package/dist/expressions/expression-tiers.d.ts +0 -13
- package/dist/expressions/index.cjs +0 -4331
- package/dist/expressions/index.d.ts +0 -13
- package/dist/expressions/index.mjs +0 -4312
- package/dist/expressions/logical/index.d.ts +0 -61
- package/dist/expressions/mathematical/index.d.ts +0 -80
- package/dist/expressions/positional/index.d.ts +0 -31
- package/dist/expressions/properties/index.d.ts +0 -27
- package/dist/expressions/property-access-utils.d.ts +0 -23
- package/dist/expressions/references/index.d.ts +0 -39
- package/dist/expressions/shared/comparison-utils.d.ts +0 -10
- package/dist/expressions/shared/index.d.ts +0 -10
- package/dist/expressions/shared/number-utils.d.ts +0 -8
- package/dist/expressions/shared/tracking.d.ts +0 -20
- package/dist/expressions/shared/validation-utils.d.ts +0 -13
- package/dist/expressions/special/index.d.ts +0 -78
- package/dist/expressions/type-helpers.d.ts +0 -11
- package/dist/expressions/type-registry.d.ts +0 -57
- package/dist/expressions/validation-helpers.d.ts +0 -15
- package/dist/htmx/hcon.d.ts +0 -9
- package/dist/htmx/htmx-attribute-processor.d.ts +0 -120
- package/dist/htmx/htmx-translator.d.ts +0 -22
- package/dist/htmx/i18n-hooks.d.ts +0 -18
- package/dist/htmx/i18n-orchestrator.d.ts +0 -16
- package/dist/htmx/index.d.ts +0 -3
- package/dist/htmx/lang-resolver.d.ts +0 -3
- package/dist/htmx/sse.d.ts +0 -60
- package/dist/htmx/ws.d.ts +0 -59
- package/dist/hyperfixi-browser-classic-i18n.js +0 -2
- package/dist/hyperfixi-browser.js +0 -2
- package/dist/hyperfixi-classic-i18n.js +0 -2
- package/dist/hyperfixi-hx-v4.js +0 -1
- package/dist/hyperfixi-hx.js +0 -1
- package/dist/hyperfixi-hybrid-complete.js +0 -1
- package/dist/hyperfixi-hybrid-hx.js +0 -1
- package/dist/hyperfixi-multilingual.js +0 -2
- package/dist/hyperfixi.mjs +0 -2
- package/dist/i18n/error-catalog.d.ts +0 -12
- package/dist/index.cjs +0 -29159
- package/dist/index.min.js +0 -2
- package/dist/lib/dom-globals-shim.d.ts +0 -2
- package/dist/lib/index.d.ts +0 -4
- package/dist/lib/morph-adapter.d.ts +0 -9
- package/dist/lib/swap-executor.d.ts +0 -12
- package/dist/lib/view-transitions.d.ts +0 -7
- package/dist/lokascript-browser-classic-i18n.js +0 -2
- package/dist/lokascript-browser.js +0 -2
- package/dist/lokascript-hybrid-complete.js +0 -1
- package/dist/lokascript-hybrid-hx.js +0 -1
- package/dist/lokascript-multilingual.js +0 -2
- package/dist/lse/index.cjs +0 -84
- package/dist/lse/index.d.ts +0 -15
- package/dist/lse/index.mjs +0 -71
- package/dist/multilingual/bridge.d.ts +0 -38
- package/dist/multilingual/schema-roles.d.ts +0 -3
- package/dist/parser/__types__/test-helpers.d.ts +0 -25
- package/dist/parser/command-grammar.d.ts +0 -14
- package/dist/parser/command-node-builder.d.ts +0 -46
- package/dist/parser/command-parsers/animation-commands.d.ts +0 -6
- package/dist/parser/command-parsers/async-commands.d.ts +0 -5
- package/dist/parser/command-parsers/control-flow-commands.d.ts +0 -7
- package/dist/parser/command-parsers/declared-commands.d.ts +0 -6
- package/dist/parser/command-parsers/dom-commands.d.ts +0 -11
- package/dist/parser/command-parsers/event-commands.d.ts +0 -4
- package/dist/parser/command-parsers/navigation-commands.d.ts +0 -6
- package/dist/parser/command-parsers/utility-commands.d.ts +0 -14
- package/dist/parser/command-parsers/variable-commands.d.ts +0 -12
- package/dist/parser/error-handler.d.ts +0 -34
- package/dist/parser/extensions.d.ts +0 -43
- package/dist/parser/full-parser.cjs +0 -7943
- package/dist/parser/full-parser.d.ts +0 -4
- package/dist/parser/full-parser.mjs +0 -7940
- package/dist/parser/helpers/ast-helpers.d.ts +0 -24
- package/dist/parser/helpers/parsing-helpers.d.ts +0 -19
- package/dist/parser/helpers/token-helpers.d.ts +0 -28
- package/dist/parser/hybrid/aliases.cjs +0 -44
- package/dist/parser/hybrid/aliases.d.ts +0 -7
- package/dist/parser/hybrid/aliases.mjs +0 -37
- package/dist/parser/hybrid/ast-types.cjs +0 -3
- package/dist/parser/hybrid/ast-types.d.ts +0 -97
- package/dist/parser/hybrid/ast-types.mjs +0 -2
- package/dist/parser/hybrid/index.cjs +0 -1185
- package/dist/parser/hybrid/index.d.ts +0 -6
- package/dist/parser/hybrid/index.mjs +0 -1175
- package/dist/parser/hybrid/parser-core.cjs +0 -1171
- package/dist/parser/hybrid/parser-core.d.ts +0 -69
- package/dist/parser/hybrid/parser-core.mjs +0 -1169
- package/dist/parser/hybrid/tokenizer.cjs +0 -255
- package/dist/parser/hybrid/tokenizer.d.ts +0 -9
- package/dist/parser/hybrid/tokenizer.mjs +0 -252
- package/dist/parser/hybrid-parser.cjs +0 -1249
- package/dist/parser/hybrid-parser.d.ts +0 -10
- package/dist/parser/hybrid-parser.mjs +0 -1242
- package/dist/parser/parser-constants.d.ts +0 -100
- package/dist/parser/parser-interface.d.ts +0 -12
- package/dist/parser/parser-types.d.ts +0 -164
- package/dist/parser/parser.d.ts +0 -165
- package/dist/parser/pratt-parser.d.ts +0 -41
- package/dist/parser/regex-parser.cjs +0 -422
- package/dist/parser/regex-parser.d.ts +0 -4
- package/dist/parser/regex-parser.mjs +0 -419
- package/dist/parser/runtime.d.ts +0 -14
- package/dist/parser/semantic-integration.d.ts +0 -17
- package/dist/parser/token-consumer.d.ts +0 -34
- package/dist/parser/token-predicates.d.ts +0 -77
- package/dist/parser/tokenizer.d.ts +0 -28
- package/dist/parser/types.d.ts +0 -105
- package/dist/performance/expression-cache.d.ts +0 -78
- package/dist/performance/integration.d.ts +0 -40
- package/dist/performance/production-monitor.d.ts +0 -67
- package/dist/registry/browser-types.cjs +0 -81
- package/dist/registry/browser-types.d.ts +0 -20
- package/dist/registry/browser-types.mjs +0 -76
- package/dist/registry/environment.cjs +0 -36
- package/dist/registry/environment.d.ts +0 -19
- package/dist/registry/environment.mjs +0 -30
- package/dist/registry/event-source-registry.d.ts +0 -54
- package/dist/registry/examples/server-commands.d.ts +0 -6
- package/dist/registry/examples/server-event-source.d.ts +0 -32
- package/dist/registry/index.cjs +0 -14055
- package/dist/registry/index.d.ts +0 -39
- package/dist/registry/index.mjs +0 -14039
- package/dist/registry/runtime-integration.d.ts +0 -23
- package/dist/registry/universal-types.cjs +0 -91
- package/dist/registry/universal-types.d.ts +0 -35
- package/dist/registry/universal-types.mjs +0 -86
- package/dist/runtime/cleanup-registry.d.ts +0 -47
- package/dist/runtime/command-adapter.d.ts +0 -69
- package/dist/runtime/environment.d.ts +0 -75
- package/dist/runtime/plugin.d.ts +0 -14
- package/dist/runtime/runtime-base.d.ts +0 -100
- package/dist/runtime/runtime-factory.d.ts +0 -29
- package/dist/runtime/runtime.d.ts +0 -20
- package/dist/runtime/temporal-modifiers.d.ts +0 -37
- package/dist/test-setup.d.ts +0 -28
- package/dist/test-utilities.d.ts +0 -39
- package/dist/types/base-types.d.ts +0 -231
- package/dist/types/code-fix.d.ts +0 -39
- package/dist/types/command-metadata.d.ts +0 -57
- package/dist/types/command-types.d.ts +0 -262
- package/dist/types/context-types.d.ts +0 -106
- package/dist/types/core-context.d.ts +0 -22
- package/dist/types/core.d.ts +0 -143
- package/dist/types/error-codes.d.ts +0 -207
- package/dist/types/expression-types.d.ts +0 -155
- package/dist/types/hooks.d.ts +0 -45
- package/dist/types/index.d.ts +0 -32
- package/dist/types/program.d.ts +0 -8
- package/dist/types/result.d.ts +0 -73
- package/dist/types/template-types.d.ts +0 -162
- package/dist/types/type-guards.d.ts +0 -24
- package/dist/types/unified-types.d.ts +0 -91
- package/dist/utils/beep.d.ts +0 -8
- package/dist/utils/debug-events.d.ts +0 -41
- package/dist/utils/debug.d.ts +0 -35
- package/dist/utils/dom-utils.d.ts +0 -16
- package/dist/utils/element-check.d.ts +0 -8
- package/dist/utils/keyboard-shortcuts.d.ts +0 -18
- package/dist/utils/performance.d.ts +0 -40
- package/dist/validation/command-pattern-validator.d.ts +0 -53
- package/dist/validation/common-validators.d.ts +0 -24
- package/dist/validation/lightweight-validators.d.ts +0 -113
- package/dist/validation/partial-validation-types.d.ts +0 -50
- package/dist/validation/partial-validator.d.ts +0 -6
- package/dist/validation/partial-warning-formatter.d.ts +0 -6
- package/dist/validation/validate-cli.d.ts +0 -41
- package/vocab/htmx/ar.js +0 -62
- package/vocab/htmx/bn.js +0 -65
- package/vocab/htmx/de.js +0 -83
- package/vocab/htmx/en.js +0 -24
- package/vocab/htmx/es.js +0 -79
- package/vocab/htmx/fr.js +0 -79
- package/vocab/htmx/he.js +0 -61
- package/vocab/htmx/hi.js +0 -81
- package/vocab/htmx/id.js +0 -76
- package/vocab/htmx/it.js +0 -79
- package/vocab/htmx/ja.js +0 -85
- package/vocab/htmx/ko.js +0 -81
- package/vocab/htmx/ms.js +0 -58
- package/vocab/htmx/pl.js +0 -80
- package/vocab/htmx/pt.js +0 -81
- package/vocab/htmx/qu.js +0 -83
- package/vocab/htmx/ru.js +0 -82
- package/vocab/htmx/sw.js +0 -79
- package/vocab/htmx/th.js +0 -67
- package/vocab/htmx/tl.js +0 -56
- package/vocab/htmx/tr.js +0 -86
- package/vocab/htmx/uk.js +0 -82
- package/vocab/htmx/vi.js +0 -59
- package/vocab/htmx/zh.js +0 -79
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
export declare class LRUCache<K, V> {
|
|
2
|
-
private readonly maxSize;
|
|
3
|
-
private readonly ttl;
|
|
4
|
-
private cache;
|
|
5
|
-
private accessOrder;
|
|
6
|
-
private accessCounter;
|
|
7
|
-
constructor(maxSize?: number, ttl?: number);
|
|
8
|
-
get(key: K): V | undefined;
|
|
9
|
-
set(key: K, value: V): void;
|
|
10
|
-
delete(key: K): boolean;
|
|
11
|
-
clear(): void;
|
|
12
|
-
size(): number;
|
|
13
|
-
private evictLRU;
|
|
14
|
-
getStats(): {
|
|
15
|
-
size: number;
|
|
16
|
-
maxSize: number;
|
|
17
|
-
hitRate: number;
|
|
18
|
-
avgAge: number;
|
|
19
|
-
totalAccesses: number;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export declare class HyperscriptCache {
|
|
23
|
-
private readonly domQueryCache;
|
|
24
|
-
private readonly exprResultCache;
|
|
25
|
-
private readonly cssMatchCache;
|
|
26
|
-
private readonly formValueCache;
|
|
27
|
-
private hits;
|
|
28
|
-
private misses;
|
|
29
|
-
querySelector(selector: string): Element | null;
|
|
30
|
-
querySelectorAll(selector: string): Element[];
|
|
31
|
-
getElementById(id: string): Element | null;
|
|
32
|
-
getElementsByClassName(className: string): Element[];
|
|
33
|
-
matches(element: Element, selector: string): boolean;
|
|
34
|
-
getExpressionResult(exprKey: string): any;
|
|
35
|
-
setExpressionResult(exprKey: string, result: any): void;
|
|
36
|
-
getFormValue(form: HTMLFormElement): any;
|
|
37
|
-
setFormValue(form: HTMLFormElement, value: any): void;
|
|
38
|
-
invalidateElementCache(element: Element): void;
|
|
39
|
-
invalidateAll(): void;
|
|
40
|
-
private getElementCacheKey;
|
|
41
|
-
private getElementPosition;
|
|
42
|
-
getPerformanceStats(): {
|
|
43
|
-
hits: number;
|
|
44
|
-
misses: number;
|
|
45
|
-
hitRate: number;
|
|
46
|
-
domQueryCache: {
|
|
47
|
-
size: number;
|
|
48
|
-
maxSize: number;
|
|
49
|
-
hitRate: number;
|
|
50
|
-
avgAge: number;
|
|
51
|
-
totalAccesses: number;
|
|
52
|
-
};
|
|
53
|
-
exprResultCache: {
|
|
54
|
-
size: number;
|
|
55
|
-
maxSize: number;
|
|
56
|
-
hitRate: number;
|
|
57
|
-
avgAge: number;
|
|
58
|
-
totalAccesses: number;
|
|
59
|
-
};
|
|
60
|
-
cssMatchCache: {
|
|
61
|
-
size: number;
|
|
62
|
-
maxSize: number;
|
|
63
|
-
hitRate: number;
|
|
64
|
-
avgAge: number;
|
|
65
|
-
totalAccesses: number;
|
|
66
|
-
};
|
|
67
|
-
formValueCache: {
|
|
68
|
-
size: number;
|
|
69
|
-
maxSize: number;
|
|
70
|
-
hitRate: number;
|
|
71
|
-
avgAge: number;
|
|
72
|
-
totalAccesses: number;
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
cleanup(): void;
|
|
76
|
-
}
|
|
77
|
-
export declare const globalCache: HyperscriptCache;
|
|
78
|
-
//# sourceMappingURL=expression-cache.d.ts.map
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { ExecutionContext, ExpressionImplementation } from '../types/core';
|
|
2
|
-
export interface PerformanceMetrics {
|
|
3
|
-
tokenizationTime: number;
|
|
4
|
-
evaluationTime: number;
|
|
5
|
-
cacheHitRate: number;
|
|
6
|
-
memoryUsage: number;
|
|
7
|
-
domOperations: number;
|
|
8
|
-
}
|
|
9
|
-
declare class PerformanceTracker {
|
|
10
|
-
private metrics;
|
|
11
|
-
private startTimes;
|
|
12
|
-
startTimer(operation: string): void;
|
|
13
|
-
endTimer(operation: string): number;
|
|
14
|
-
recordTokenization(duration: number): void;
|
|
15
|
-
recordEvaluation(duration: number): void;
|
|
16
|
-
updateCacheMetrics(): void;
|
|
17
|
-
getMetrics(): PerformanceMetrics;
|
|
18
|
-
reset(): void;
|
|
19
|
-
}
|
|
20
|
-
export declare const performanceTracker: PerformanceTracker;
|
|
21
|
-
export declare function evaluateExpressionWithCache<T>(cacheKey: string, evaluator: () => Promise<T>, _context: ExecutionContext): Promise<T>;
|
|
22
|
-
export declare function queryWithCache(selector: string): Element | null;
|
|
23
|
-
export declare function queryAllWithCache(selector: string): Element[];
|
|
24
|
-
export declare function matchesWithCache(element: Element, selector: string): boolean;
|
|
25
|
-
export declare function wrapExpressionForPerformance(expression: ExpressionImplementation): ExpressionImplementation;
|
|
26
|
-
export declare function tokenizeWithPerformance(input: string): import("..").Token[];
|
|
27
|
-
export declare function performCleanup(): void;
|
|
28
|
-
export declare function enableAutoCleanup(intervalMs?: number): void;
|
|
29
|
-
export declare function disableAutoCleanup(): void;
|
|
30
|
-
declare class DOMBatcher {
|
|
31
|
-
private pendingOperations;
|
|
32
|
-
private batchTimeout;
|
|
33
|
-
addOperation(operation: () => void): void;
|
|
34
|
-
flush(): void;
|
|
35
|
-
}
|
|
36
|
-
export declare const domBatcher: DOMBatcher;
|
|
37
|
-
export declare function batchDOMOperation(operation: () => void): void;
|
|
38
|
-
export declare function generatePerformanceReport(): string;
|
|
39
|
-
export {};
|
|
40
|
-
//# sourceMappingURL=integration.d.ts.map
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
export interface PerformanceMetric {
|
|
2
|
-
name: string;
|
|
3
|
-
category: 'command' | 'expression' | 'validation' | 'runtime' | 'system';
|
|
4
|
-
timestamp: number;
|
|
5
|
-
duration: number;
|
|
6
|
-
success: boolean;
|
|
7
|
-
metadata?: Record<string, any>;
|
|
8
|
-
severity: 'info' | 'warning' | 'error';
|
|
9
|
-
}
|
|
10
|
-
export interface PerformanceThresholds {
|
|
11
|
-
command: {
|
|
12
|
-
warning: number;
|
|
13
|
-
error: number;
|
|
14
|
-
};
|
|
15
|
-
expression: {
|
|
16
|
-
warning: number;
|
|
17
|
-
error: number;
|
|
18
|
-
};
|
|
19
|
-
validation: {
|
|
20
|
-
warning: number;
|
|
21
|
-
error: number;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
export interface SystemMetrics {
|
|
25
|
-
memoryUsage: NodeJS.MemoryUsage;
|
|
26
|
-
cpuUsage: NodeJS.CpuUsage;
|
|
27
|
-
timestamp: number;
|
|
28
|
-
}
|
|
29
|
-
export declare class ProductionPerformanceMonitor {
|
|
30
|
-
private metrics;
|
|
31
|
-
private systemMetrics;
|
|
32
|
-
private isEnabled;
|
|
33
|
-
private maxMetrics;
|
|
34
|
-
private flushInterval;
|
|
35
|
-
private lastCpuUsage;
|
|
36
|
-
private readonly thresholds;
|
|
37
|
-
constructor(options?: {
|
|
38
|
-
enabled?: boolean;
|
|
39
|
-
thresholds?: Partial<PerformanceThresholds>;
|
|
40
|
-
maxMetrics?: number;
|
|
41
|
-
flushIntervalMs?: number;
|
|
42
|
-
});
|
|
43
|
-
record(name: string, category: PerformanceMetric['category'], duration: number, success?: boolean, metadata?: Record<string, any>): void;
|
|
44
|
-
measure<T>(name: string, category: PerformanceMetric['category'], operation: () => Promise<T> | T, metadata?: Record<string, any>): Promise<T>;
|
|
45
|
-
getStats(category?: PerformanceMetric['category']): {
|
|
46
|
-
total: number;
|
|
47
|
-
successful: number;
|
|
48
|
-
failed: number;
|
|
49
|
-
averageDuration: number;
|
|
50
|
-
medianDuration: number;
|
|
51
|
-
maxDuration: number;
|
|
52
|
-
minDuration: number;
|
|
53
|
-
warnings: number;
|
|
54
|
-
errors: number;
|
|
55
|
-
};
|
|
56
|
-
getRecentMetrics(minutes?: number): PerformanceMetric[];
|
|
57
|
-
getCurrentSystemMetrics(): SystemMetrics;
|
|
58
|
-
generateReport(): string;
|
|
59
|
-
clear(): void;
|
|
60
|
-
setEnabled(enabled: boolean): void;
|
|
61
|
-
private startSystemMonitoring;
|
|
62
|
-
destroy(): void;
|
|
63
|
-
}
|
|
64
|
-
export declare const productionMonitor: ProductionPerformanceMonitor;
|
|
65
|
-
export declare function monitorPerformance(category: PerformanceMetric['category'], name?: string): <T extends (...args: any[]) => any>(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T>;
|
|
66
|
-
export declare function measureOperation<T>(name: string, operation: () => Promise<T> | T, category?: PerformanceMetric['category']): Promise<T>;
|
|
67
|
-
//# sourceMappingURL=production-monitor.d.ts.map
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function isBrowserPayload(payload) {
|
|
4
|
-
return (typeof window !== 'undefined' &&
|
|
5
|
-
typeof document !== 'undefined' &&
|
|
6
|
-
(payload.target == null || payload.target instanceof Element));
|
|
7
|
-
}
|
|
8
|
-
function isBrowserEventSource(source) {
|
|
9
|
-
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
10
|
-
}
|
|
11
|
-
function createDOMEventSource(eventName, options) {
|
|
12
|
-
const target = options?.target ?? document;
|
|
13
|
-
const capture = options?.capture ?? false;
|
|
14
|
-
return {
|
|
15
|
-
name: eventName,
|
|
16
|
-
description: options?.description ?? `DOM ${eventName} events`,
|
|
17
|
-
supportedEvents: [eventName],
|
|
18
|
-
subscribe(subscribeOptions, context) {
|
|
19
|
-
const handler = (e) => {
|
|
20
|
-
const payload = {
|
|
21
|
-
type: eventName,
|
|
22
|
-
data: e,
|
|
23
|
-
target: e.target instanceof Element ? e.target : null,
|
|
24
|
-
nativeEvent: e,
|
|
25
|
-
};
|
|
26
|
-
subscribeOptions.handler(payload, context);
|
|
27
|
-
};
|
|
28
|
-
target.addEventListener(eventName, handler, { capture });
|
|
29
|
-
return {
|
|
30
|
-
id: `${eventName}_${Date.now()}_${Math.random().toString(36).slice(2)}`,
|
|
31
|
-
source: eventName,
|
|
32
|
-
event: eventName,
|
|
33
|
-
unsubscribe: () => target.removeEventListener(eventName, handler, { capture }),
|
|
34
|
-
};
|
|
35
|
-
},
|
|
36
|
-
supports(event) {
|
|
37
|
-
return event === eventName;
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function createCustomEventSource(eventName, options) {
|
|
42
|
-
const target = options?.target ?? document;
|
|
43
|
-
return {
|
|
44
|
-
name: eventName,
|
|
45
|
-
description: options?.description ?? `Custom ${eventName} events`,
|
|
46
|
-
supportedEvents: [eventName],
|
|
47
|
-
subscribe(subscribeOptions, context) {
|
|
48
|
-
const handler = (e) => {
|
|
49
|
-
const customEvent = e;
|
|
50
|
-
const payload = {
|
|
51
|
-
type: eventName,
|
|
52
|
-
data: customEvent.detail,
|
|
53
|
-
target: e.target instanceof Element ? e.target : null,
|
|
54
|
-
nativeEvent: e,
|
|
55
|
-
meta: {
|
|
56
|
-
bubbles: customEvent.bubbles,
|
|
57
|
-
cancelable: customEvent.cancelable,
|
|
58
|
-
composed: customEvent.composed,
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
subscribeOptions.handler(payload, context);
|
|
62
|
-
};
|
|
63
|
-
target.addEventListener(eventName, handler);
|
|
64
|
-
return {
|
|
65
|
-
id: `${eventName}_${Date.now()}_${Math.random().toString(36).slice(2)}`,
|
|
66
|
-
source: eventName,
|
|
67
|
-
event: eventName,
|
|
68
|
-
unsubscribe: () => target.removeEventListener(eventName, handler),
|
|
69
|
-
};
|
|
70
|
-
},
|
|
71
|
-
supports(event) {
|
|
72
|
-
return event === eventName;
|
|
73
|
-
},
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
exports.createCustomEventSource = createCustomEventSource;
|
|
78
|
-
exports.createDOMEventSource = createDOMEventSource;
|
|
79
|
-
exports.isBrowserEventSource = isBrowserEventSource;
|
|
80
|
-
exports.isBrowserPayload = isBrowserPayload;
|
|
81
|
-
//# sourceMappingURL=browser-types.cjs.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { EventSourcePayload, EventSourceHandler, EventSource } from './event-source-registry';
|
|
2
|
-
export interface BrowserEventPayload extends EventSourcePayload<'browser'> {
|
|
3
|
-
target?: Element | null;
|
|
4
|
-
nativeEvent?: Event;
|
|
5
|
-
}
|
|
6
|
-
export type BrowserEventHandler = EventSourceHandler<'browser'>;
|
|
7
|
-
export interface BrowserEventSource extends EventSource {
|
|
8
|
-
}
|
|
9
|
-
export declare function isBrowserPayload(payload: EventSourcePayload): payload is BrowserEventPayload;
|
|
10
|
-
export declare function isBrowserEventSource(source: EventSource): source is BrowserEventSource;
|
|
11
|
-
export declare function createDOMEventSource(eventName: string, options?: {
|
|
12
|
-
description?: string;
|
|
13
|
-
target?: Element | Document;
|
|
14
|
-
capture?: boolean;
|
|
15
|
-
}): BrowserEventSource;
|
|
16
|
-
export declare function createCustomEventSource<TDetail = any>(eventName: string, options?: {
|
|
17
|
-
description?: string;
|
|
18
|
-
target?: Element | Document;
|
|
19
|
-
}): BrowserEventSource;
|
|
20
|
-
//# sourceMappingURL=browser-types.d.ts.map
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
function isBrowserPayload(payload) {
|
|
2
|
-
return (typeof window !== 'undefined' &&
|
|
3
|
-
typeof document !== 'undefined' &&
|
|
4
|
-
(payload.target == null || payload.target instanceof Element));
|
|
5
|
-
}
|
|
6
|
-
function isBrowserEventSource(source) {
|
|
7
|
-
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
8
|
-
}
|
|
9
|
-
function createDOMEventSource(eventName, options) {
|
|
10
|
-
const target = options?.target ?? document;
|
|
11
|
-
const capture = options?.capture ?? false;
|
|
12
|
-
return {
|
|
13
|
-
name: eventName,
|
|
14
|
-
description: options?.description ?? `DOM ${eventName} events`,
|
|
15
|
-
supportedEvents: [eventName],
|
|
16
|
-
subscribe(subscribeOptions, context) {
|
|
17
|
-
const handler = (e) => {
|
|
18
|
-
const payload = {
|
|
19
|
-
type: eventName,
|
|
20
|
-
data: e,
|
|
21
|
-
target: e.target instanceof Element ? e.target : null,
|
|
22
|
-
nativeEvent: e,
|
|
23
|
-
};
|
|
24
|
-
subscribeOptions.handler(payload, context);
|
|
25
|
-
};
|
|
26
|
-
target.addEventListener(eventName, handler, { capture });
|
|
27
|
-
return {
|
|
28
|
-
id: `${eventName}_${Date.now()}_${Math.random().toString(36).slice(2)}`,
|
|
29
|
-
source: eventName,
|
|
30
|
-
event: eventName,
|
|
31
|
-
unsubscribe: () => target.removeEventListener(eventName, handler, { capture }),
|
|
32
|
-
};
|
|
33
|
-
},
|
|
34
|
-
supports(event) {
|
|
35
|
-
return event === eventName;
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
function createCustomEventSource(eventName, options) {
|
|
40
|
-
const target = options?.target ?? document;
|
|
41
|
-
return {
|
|
42
|
-
name: eventName,
|
|
43
|
-
description: options?.description ?? `Custom ${eventName} events`,
|
|
44
|
-
supportedEvents: [eventName],
|
|
45
|
-
subscribe(subscribeOptions, context) {
|
|
46
|
-
const handler = (e) => {
|
|
47
|
-
const customEvent = e;
|
|
48
|
-
const payload = {
|
|
49
|
-
type: eventName,
|
|
50
|
-
data: customEvent.detail,
|
|
51
|
-
target: e.target instanceof Element ? e.target : null,
|
|
52
|
-
nativeEvent: e,
|
|
53
|
-
meta: {
|
|
54
|
-
bubbles: customEvent.bubbles,
|
|
55
|
-
cancelable: customEvent.cancelable,
|
|
56
|
-
composed: customEvent.composed,
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
subscribeOptions.handler(payload, context);
|
|
60
|
-
};
|
|
61
|
-
target.addEventListener(eventName, handler);
|
|
62
|
-
return {
|
|
63
|
-
id: `${eventName}_${Date.now()}_${Math.random().toString(36).slice(2)}`,
|
|
64
|
-
source: eventName,
|
|
65
|
-
event: eventName,
|
|
66
|
-
unsubscribe: () => target.removeEventListener(eventName, handler),
|
|
67
|
-
};
|
|
68
|
-
},
|
|
69
|
-
supports(event) {
|
|
70
|
-
return event === eventName;
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export { createCustomEventSource, createDOMEventSource, isBrowserEventSource, isBrowserPayload };
|
|
76
|
-
//# sourceMappingURL=browser-types.mjs.map
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function isBrowserEnvironment() {
|
|
4
|
-
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
5
|
-
}
|
|
6
|
-
function isNodeEnvironment() {
|
|
7
|
-
return (typeof process !== 'undefined' && process.versions != null && process.versions.node != null);
|
|
8
|
-
}
|
|
9
|
-
function getRuntimeEnvironment() {
|
|
10
|
-
if (isBrowserEnvironment())
|
|
11
|
-
return 'browser';
|
|
12
|
-
if (isNodeEnvironment())
|
|
13
|
-
return 'node';
|
|
14
|
-
return 'unknown';
|
|
15
|
-
}
|
|
16
|
-
function assertBrowserEnvironment() {
|
|
17
|
-
if (!isBrowserEnvironment()) {
|
|
18
|
-
throw new Error('This function requires a browser environment with DOM APIs. ' +
|
|
19
|
-
'Current environment: ' +
|
|
20
|
-
getRuntimeEnvironment());
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
function assertNodeEnvironment() {
|
|
24
|
-
if (!isNodeEnvironment()) {
|
|
25
|
-
throw new Error('This function requires a Node.js environment. ' +
|
|
26
|
-
'Current environment: ' +
|
|
27
|
-
getRuntimeEnvironment());
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
exports.assertBrowserEnvironment = assertBrowserEnvironment;
|
|
32
|
-
exports.assertNodeEnvironment = assertNodeEnvironment;
|
|
33
|
-
exports.getRuntimeEnvironment = getRuntimeEnvironment;
|
|
34
|
-
exports.isBrowserEnvironment = isBrowserEnvironment;
|
|
35
|
-
exports.isNodeEnvironment = isNodeEnvironment;
|
|
36
|
-
//# sourceMappingURL=environment.cjs.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export type RuntimeEnvironment = 'browser' | 'node' | 'universal';
|
|
2
|
-
export type DetectEnvironment<T = typeof globalThis> = T extends {
|
|
3
|
-
document: any;
|
|
4
|
-
window: any;
|
|
5
|
-
} ? 'browser' : T extends {
|
|
6
|
-
process: any;
|
|
7
|
-
require: any;
|
|
8
|
-
} ? 'node' : 'universal';
|
|
9
|
-
export declare function isBrowserEnvironment(): boolean;
|
|
10
|
-
export declare function isNodeEnvironment(): boolean;
|
|
11
|
-
export declare function getRuntimeEnvironment(): 'browser' | 'node' | 'unknown';
|
|
12
|
-
export declare function assertBrowserEnvironment(): asserts this is {
|
|
13
|
-
window: Window;
|
|
14
|
-
document: Document;
|
|
15
|
-
};
|
|
16
|
-
export declare function assertNodeEnvironment(): asserts this is {
|
|
17
|
-
process: NodeJS.Process;
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=environment.d.ts.map
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
function isBrowserEnvironment() {
|
|
2
|
-
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
3
|
-
}
|
|
4
|
-
function isNodeEnvironment() {
|
|
5
|
-
return (typeof process !== 'undefined' && process.versions != null && process.versions.node != null);
|
|
6
|
-
}
|
|
7
|
-
function getRuntimeEnvironment() {
|
|
8
|
-
if (isBrowserEnvironment())
|
|
9
|
-
return 'browser';
|
|
10
|
-
if (isNodeEnvironment())
|
|
11
|
-
return 'node';
|
|
12
|
-
return 'unknown';
|
|
13
|
-
}
|
|
14
|
-
function assertBrowserEnvironment() {
|
|
15
|
-
if (!isBrowserEnvironment()) {
|
|
16
|
-
throw new Error('This function requires a browser environment with DOM APIs. ' +
|
|
17
|
-
'Current environment: ' +
|
|
18
|
-
getRuntimeEnvironment());
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
function assertNodeEnvironment() {
|
|
22
|
-
if (!isNodeEnvironment()) {
|
|
23
|
-
throw new Error('This function requires a Node.js environment. ' +
|
|
24
|
-
'Current environment: ' +
|
|
25
|
-
getRuntimeEnvironment());
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export { assertBrowserEnvironment, assertNodeEnvironment, getRuntimeEnvironment, isBrowserEnvironment, isNodeEnvironment };
|
|
30
|
-
//# sourceMappingURL=environment.mjs.map
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import type { ExecutionContext } from '../types/core';
|
|
2
|
-
import type { RuntimeEnvironment } from './environment';
|
|
3
|
-
export type { RuntimeEnvironment } from './environment';
|
|
4
|
-
export type EventTarget<TEnv extends RuntimeEnvironment> = TEnv extends 'browser' ? Element : TEnv extends 'node' ? object : Element | object;
|
|
5
|
-
export type NativeEvent<TEnv extends RuntimeEnvironment> = TEnv extends 'browser' ? Event : TEnv extends 'node' ? never : Event | undefined;
|
|
6
|
-
export interface EventSourcePayload<TEnv extends RuntimeEnvironment = 'universal'> {
|
|
7
|
-
type: string;
|
|
8
|
-
data: unknown;
|
|
9
|
-
target?: EventTarget<TEnv> | null;
|
|
10
|
-
nativeEvent?: NativeEvent<TEnv>;
|
|
11
|
-
meta?: Record<string, unknown>;
|
|
12
|
-
}
|
|
13
|
-
export type EventSourceHandler<TEnv extends RuntimeEnvironment = 'universal'> = (payload: EventSourcePayload<TEnv>, context: ExecutionContext) => void;
|
|
14
|
-
export interface EventSourceSubscription {
|
|
15
|
-
id: string;
|
|
16
|
-
source: string;
|
|
17
|
-
event: string;
|
|
18
|
-
unsubscribe: () => void;
|
|
19
|
-
}
|
|
20
|
-
export interface EventSourceSubscribeOptions {
|
|
21
|
-
event: string;
|
|
22
|
-
handler: EventSourceHandler;
|
|
23
|
-
target?: string | RegExp;
|
|
24
|
-
selector?: string;
|
|
25
|
-
options?: Record<string, unknown>;
|
|
26
|
-
}
|
|
27
|
-
export interface EventSource {
|
|
28
|
-
readonly name: string;
|
|
29
|
-
readonly description?: string;
|
|
30
|
-
readonly supportedEvents?: string[];
|
|
31
|
-
subscribe(options: EventSourceSubscribeOptions, context: ExecutionContext): EventSourceSubscription;
|
|
32
|
-
supports?(event: string): boolean;
|
|
33
|
-
initialize?(): Promise<void> | void;
|
|
34
|
-
destroy?(): void;
|
|
35
|
-
}
|
|
36
|
-
export declare class EventSourceRegistry {
|
|
37
|
-
private sources;
|
|
38
|
-
private subscriptions;
|
|
39
|
-
private nextId;
|
|
40
|
-
register(name: string, source: EventSource): void;
|
|
41
|
-
unregister(name: string): boolean;
|
|
42
|
-
get(name: string): EventSource | undefined;
|
|
43
|
-
has(name: string): boolean;
|
|
44
|
-
subscribe(sourceName: string, options: EventSourceSubscribeOptions, context: ExecutionContext): EventSourceSubscription | undefined;
|
|
45
|
-
unsubscribe(subscriptionId: string): boolean;
|
|
46
|
-
getSourceNames(): string[];
|
|
47
|
-
getSubscriptions(): EventSourceSubscription[];
|
|
48
|
-
findSourceForEvent(event: string): string | undefined;
|
|
49
|
-
generateId(): string;
|
|
50
|
-
destroy(): void;
|
|
51
|
-
}
|
|
52
|
-
export declare function createEventSourceRegistry(): EventSourceRegistry;
|
|
53
|
-
export declare function getDefaultEventSourceRegistry(): EventSourceRegistry;
|
|
54
|
-
//# sourceMappingURL=event-source-registry.d.ts.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { CommandWithParseInput } from '../../runtime/command-adapter';
|
|
2
|
-
export declare const respondCommand: CommandWithParseInput;
|
|
3
|
-
export declare const redirectCommand: CommandWithParseInput;
|
|
4
|
-
export declare const setHeaderCommand: CommandWithParseInput;
|
|
5
|
-
export declare const serverPlugin: import("../index").LokaScriptPlugin;
|
|
6
|
-
//# sourceMappingURL=server-commands.d.ts.map
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { EventSource, EventSourcePayload } from '../event-source-registry';
|
|
2
|
-
import type { ExecutionContext } from '../../types/core';
|
|
3
|
-
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
4
|
-
export interface ServerRequest {
|
|
5
|
-
method: HttpMethod;
|
|
6
|
-
url: string;
|
|
7
|
-
path: string;
|
|
8
|
-
query: Record<string, string | string[]>;
|
|
9
|
-
params: Record<string, string>;
|
|
10
|
-
headers: Record<string, string | string[]>;
|
|
11
|
-
body: unknown;
|
|
12
|
-
}
|
|
13
|
-
export interface ServerResponse {
|
|
14
|
-
status(code: number): ServerResponse;
|
|
15
|
-
header(name: string, value: string): ServerResponse;
|
|
16
|
-
json(data: unknown): void;
|
|
17
|
-
html(content: string): void;
|
|
18
|
-
text(content: string): void;
|
|
19
|
-
redirect(url: string, code?: number): void;
|
|
20
|
-
send(data: unknown): void;
|
|
21
|
-
}
|
|
22
|
-
export interface RequestHandler {
|
|
23
|
-
method: HttpMethod | '*';
|
|
24
|
-
pattern: string | RegExp;
|
|
25
|
-
handler: (payload: EventSourcePayload, context: ExecutionContext) => void;
|
|
26
|
-
}
|
|
27
|
-
export declare function createRequestEventSource(): EventSource & {
|
|
28
|
-
handleRequest(request: ServerRequest, response: ServerResponse): boolean;
|
|
29
|
-
};
|
|
30
|
-
export declare function createWebSocketEventSource(): EventSource;
|
|
31
|
-
export declare function createSSEEventSource(): EventSource;
|
|
32
|
-
//# sourceMappingURL=server-event-source.d.ts.map
|