@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,23 +0,0 @@
|
|
|
1
|
-
import type { ExecutionContext } from '../types/core';
|
|
2
|
-
import type { EventSource, EventSourceSubscribeOptions } from './event-source-registry';
|
|
3
|
-
import type { EventSourceRegistry } from './event-source-registry';
|
|
4
|
-
export interface RegistryIntegrationOptions {
|
|
5
|
-
enableEventSources?: boolean;
|
|
6
|
-
registry?: {
|
|
7
|
-
eventSources?: EventSourceRegistry;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export declare class RegistryIntegration {
|
|
11
|
-
private options;
|
|
12
|
-
private eventSourceRegistry;
|
|
13
|
-
constructor(options?: RegistryIntegrationOptions);
|
|
14
|
-
getEventSource(eventName: string): EventSource | undefined;
|
|
15
|
-
hasEventSource(eventName: string): boolean;
|
|
16
|
-
subscribeToEventSource(eventSourceName: string, options: EventSourceSubscribeOptions, context: ExecutionContext): import("./event-source-registry").EventSourceSubscription;
|
|
17
|
-
getEventSourceNames(): string[];
|
|
18
|
-
destroy(): void;
|
|
19
|
-
}
|
|
20
|
-
export declare function createRegistryIntegration(options?: RegistryIntegrationOptions): RegistryIntegration;
|
|
21
|
-
export declare function getDefaultRegistryIntegration(): RegistryIntegration;
|
|
22
|
-
export declare function resetDefaultRegistryIntegration(): void;
|
|
23
|
-
//# sourceMappingURL=runtime-integration.d.ts.map
|
|
@@ -1,91 +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
|
-
|
|
10
|
-
function createTimerEventSource(name, interval) {
|
|
11
|
-
return {
|
|
12
|
-
name,
|
|
13
|
-
description: `Timer that fires every ${interval}ms`,
|
|
14
|
-
supportedEvents: [name],
|
|
15
|
-
subscribe(options, context) {
|
|
16
|
-
const handler = () => {
|
|
17
|
-
const payload = {
|
|
18
|
-
type: name,
|
|
19
|
-
data: { timestamp: Date.now() },
|
|
20
|
-
target: isBrowserEnvironment() && typeof document !== 'undefined' ? document.body : {},
|
|
21
|
-
};
|
|
22
|
-
options.handler(payload, context);
|
|
23
|
-
};
|
|
24
|
-
const timerId = setInterval(handler, interval);
|
|
25
|
-
return {
|
|
26
|
-
id: `${name}_${Date.now()}_${Math.random().toString(36).slice(2)}`,
|
|
27
|
-
source: name,
|
|
28
|
-
event: name,
|
|
29
|
-
unsubscribe: () => clearInterval(timerId),
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
supports(event) {
|
|
33
|
-
return event === name;
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
function createAdaptiveEventSource(name, options) {
|
|
38
|
-
return {
|
|
39
|
-
name,
|
|
40
|
-
description: options?.description ?? `Adaptive ${name} events`,
|
|
41
|
-
supportedEvents: [name],
|
|
42
|
-
subscribe(subscribeOptions, context) {
|
|
43
|
-
let unsubscribe;
|
|
44
|
-
if (isBrowserEnvironment()) {
|
|
45
|
-
const handler = (e) => {
|
|
46
|
-
const customEvent = e;
|
|
47
|
-
const payload = {
|
|
48
|
-
type: name,
|
|
49
|
-
data: customEvent.detail,
|
|
50
|
-
target: e.target instanceof Element ? e.target : null,
|
|
51
|
-
nativeEvent: e,
|
|
52
|
-
};
|
|
53
|
-
subscribeOptions.handler(payload, context);
|
|
54
|
-
};
|
|
55
|
-
document.addEventListener(name, handler);
|
|
56
|
-
unsubscribe = () => document.removeEventListener(name, handler);
|
|
57
|
-
}
|
|
58
|
-
else if (isNodeEnvironment()) {
|
|
59
|
-
unsubscribe = () => {
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
unsubscribe = () => { };
|
|
64
|
-
}
|
|
65
|
-
return {
|
|
66
|
-
id: `${name}_${Date.now()}_${Math.random().toString(36).slice(2)}`,
|
|
67
|
-
source: name,
|
|
68
|
-
event: name,
|
|
69
|
-
unsubscribe,
|
|
70
|
-
};
|
|
71
|
-
},
|
|
72
|
-
supports(event) {
|
|
73
|
-
return event === name;
|
|
74
|
-
},
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
function isBrowserLikePayload(payload) {
|
|
78
|
-
return isBrowserEnvironment() && (payload.target == null || payload.target instanceof Element);
|
|
79
|
-
}
|
|
80
|
-
function isServerLikePayload(payload) {
|
|
81
|
-
return (isNodeEnvironment() &&
|
|
82
|
-
typeof payload.data === 'object' &&
|
|
83
|
-
payload.data !== null &&
|
|
84
|
-
'request' in payload.data);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
exports.createAdaptiveEventSource = createAdaptiveEventSource;
|
|
88
|
-
exports.createTimerEventSource = createTimerEventSource;
|
|
89
|
-
exports.isBrowserLikePayload = isBrowserLikePayload;
|
|
90
|
-
exports.isServerLikePayload = isServerLikePayload;
|
|
91
|
-
//# sourceMappingURL=universal-types.cjs.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { EventSourcePayload, EventSourceHandler, EventSource, RuntimeEnvironment } from './event-source-registry';
|
|
2
|
-
import type { ExecutionContext } from '../types/core';
|
|
3
|
-
import type { CommandWithParseInput } from '../runtime/command-adapter';
|
|
4
|
-
export type UniversalEventPayload = EventSourcePayload<'universal'>;
|
|
5
|
-
export type UniversalEventHandler = EventSourceHandler<'universal'>;
|
|
6
|
-
export interface UniversalEventSource<TEnv extends RuntimeEnvironment = 'universal'> extends EventSource {
|
|
7
|
-
}
|
|
8
|
-
export interface TypedRegistry<TEnv extends RuntimeEnvironment = 'universal'> {
|
|
9
|
-
eventSources: {
|
|
10
|
-
register(name: string, source: UniversalEventSource<TEnv>): void;
|
|
11
|
-
get(name: string): UniversalEventSource<TEnv> | undefined;
|
|
12
|
-
has(name: string): boolean;
|
|
13
|
-
getSourceNames(): string[];
|
|
14
|
-
};
|
|
15
|
-
context: {
|
|
16
|
-
register<T>(name: string, provide: (ctx: ExecutionContext) => T, options?: {
|
|
17
|
-
description?: string;
|
|
18
|
-
cache?: boolean;
|
|
19
|
-
}): void;
|
|
20
|
-
has(name: string): boolean;
|
|
21
|
-
getProviderNames(): string[];
|
|
22
|
-
};
|
|
23
|
-
commands: {
|
|
24
|
-
register(command: CommandWithParseInput): void;
|
|
25
|
-
has(name: string): boolean;
|
|
26
|
-
getCommandNames(): string[];
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
export declare function createTimerEventSource(name: string, interval: number): UniversalEventSource;
|
|
30
|
-
export declare function createAdaptiveEventSource(name: string, options?: {
|
|
31
|
-
description?: string;
|
|
32
|
-
}): UniversalEventSource;
|
|
33
|
-
export declare function isBrowserLikePayload(payload: UniversalEventPayload): boolean;
|
|
34
|
-
export declare function isServerLikePayload(payload: UniversalEventPayload): boolean;
|
|
35
|
-
//# sourceMappingURL=universal-types.d.ts.map
|
|
@@ -1,86 +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
|
-
|
|
8
|
-
function createTimerEventSource(name, interval) {
|
|
9
|
-
return {
|
|
10
|
-
name,
|
|
11
|
-
description: `Timer that fires every ${interval}ms`,
|
|
12
|
-
supportedEvents: [name],
|
|
13
|
-
subscribe(options, context) {
|
|
14
|
-
const handler = () => {
|
|
15
|
-
const payload = {
|
|
16
|
-
type: name,
|
|
17
|
-
data: { timestamp: Date.now() },
|
|
18
|
-
target: isBrowserEnvironment() && typeof document !== 'undefined' ? document.body : {},
|
|
19
|
-
};
|
|
20
|
-
options.handler(payload, context);
|
|
21
|
-
};
|
|
22
|
-
const timerId = setInterval(handler, interval);
|
|
23
|
-
return {
|
|
24
|
-
id: `${name}_${Date.now()}_${Math.random().toString(36).slice(2)}`,
|
|
25
|
-
source: name,
|
|
26
|
-
event: name,
|
|
27
|
-
unsubscribe: () => clearInterval(timerId),
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
supports(event) {
|
|
31
|
-
return event === name;
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
function createAdaptiveEventSource(name, options) {
|
|
36
|
-
return {
|
|
37
|
-
name,
|
|
38
|
-
description: options?.description ?? `Adaptive ${name} events`,
|
|
39
|
-
supportedEvents: [name],
|
|
40
|
-
subscribe(subscribeOptions, context) {
|
|
41
|
-
let unsubscribe;
|
|
42
|
-
if (isBrowserEnvironment()) {
|
|
43
|
-
const handler = (e) => {
|
|
44
|
-
const customEvent = e;
|
|
45
|
-
const payload = {
|
|
46
|
-
type: name,
|
|
47
|
-
data: customEvent.detail,
|
|
48
|
-
target: e.target instanceof Element ? e.target : null,
|
|
49
|
-
nativeEvent: e,
|
|
50
|
-
};
|
|
51
|
-
subscribeOptions.handler(payload, context);
|
|
52
|
-
};
|
|
53
|
-
document.addEventListener(name, handler);
|
|
54
|
-
unsubscribe = () => document.removeEventListener(name, handler);
|
|
55
|
-
}
|
|
56
|
-
else if (isNodeEnvironment()) {
|
|
57
|
-
unsubscribe = () => {
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
unsubscribe = () => { };
|
|
62
|
-
}
|
|
63
|
-
return {
|
|
64
|
-
id: `${name}_${Date.now()}_${Math.random().toString(36).slice(2)}`,
|
|
65
|
-
source: name,
|
|
66
|
-
event: name,
|
|
67
|
-
unsubscribe,
|
|
68
|
-
};
|
|
69
|
-
},
|
|
70
|
-
supports(event) {
|
|
71
|
-
return event === name;
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
function isBrowserLikePayload(payload) {
|
|
76
|
-
return isBrowserEnvironment() && (payload.target == null || payload.target instanceof Element);
|
|
77
|
-
}
|
|
78
|
-
function isServerLikePayload(payload) {
|
|
79
|
-
return (isNodeEnvironment() &&
|
|
80
|
-
typeof payload.data === 'object' &&
|
|
81
|
-
payload.data !== null &&
|
|
82
|
-
'request' in payload.data);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export { createAdaptiveEventSource, createTimerEventSource, isBrowserLikePayload, isServerLikePayload };
|
|
86
|
-
//# sourceMappingURL=universal-types.mjs.map
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export type CleanupType = 'listener' | 'observer' | 'interval' | 'timeout' | 'custom';
|
|
2
|
-
export interface CleanupEntry {
|
|
3
|
-
type: CleanupType;
|
|
4
|
-
cleanup: () => void;
|
|
5
|
-
target?: EventTarget;
|
|
6
|
-
eventName?: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface CleanupStats {
|
|
10
|
-
elementsTracked: number;
|
|
11
|
-
listeners: number;
|
|
12
|
-
observers: number;
|
|
13
|
-
intervals: number;
|
|
14
|
-
timeouts: number;
|
|
15
|
-
custom: number;
|
|
16
|
-
global: number;
|
|
17
|
-
}
|
|
18
|
-
export declare class CleanupRegistry {
|
|
19
|
-
private elementCleanups;
|
|
20
|
-
private elementCount;
|
|
21
|
-
private typeCounts;
|
|
22
|
-
private globalCleanups;
|
|
23
|
-
private debugMode;
|
|
24
|
-
constructor(options?: {
|
|
25
|
-
debug?: boolean;
|
|
26
|
-
});
|
|
27
|
-
registerListener(element: Element, target: EventTarget, eventName: string, handler: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
28
|
-
registerObserver(element: Element, observer: MutationObserver): void;
|
|
29
|
-
registerInterval(element: Element, intervalId: ReturnType<typeof setInterval>): void;
|
|
30
|
-
registerTimeout(element: Element, timeoutId: ReturnType<typeof setTimeout>): void;
|
|
31
|
-
registerCustom(element: Element, cleanup: () => void, description?: string): void;
|
|
32
|
-
registerGlobal(cleanup: () => void, type?: CleanupType, description?: string): void;
|
|
33
|
-
private addCleanup;
|
|
34
|
-
cleanupElement(element: Element): number;
|
|
35
|
-
cleanupElementTree(element: Element): number;
|
|
36
|
-
cleanupGlobal(): number;
|
|
37
|
-
cleanupAll(): number;
|
|
38
|
-
hasCleanups(element: Element): boolean;
|
|
39
|
-
getCleanupCount(element: Element): number;
|
|
40
|
-
getStats(): CleanupStats;
|
|
41
|
-
setDebugMode(enabled: boolean): void;
|
|
42
|
-
}
|
|
43
|
-
export declare function createAutoCleanupRegistry(options?: {
|
|
44
|
-
debug?: boolean;
|
|
45
|
-
root?: Element;
|
|
46
|
-
}): CleanupRegistry;
|
|
47
|
-
//# sourceMappingURL=cleanup-registry.d.ts.map
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { ExecutionContext, TypedExecutionContext, ValidationResult } from '../types/core';
|
|
2
|
-
import type { ASTNode } from '../types/base-types';
|
|
3
|
-
import { HookRegistry } from '../types/hooks';
|
|
4
|
-
import type { BodyOps } from '../types/program';
|
|
5
|
-
export interface RuntimeCommand {
|
|
6
|
-
name: string;
|
|
7
|
-
execute(context: ExecutionContext, ...args: unknown[]): Promise<unknown>;
|
|
8
|
-
validate?(input: unknown): ValidationResult<unknown>;
|
|
9
|
-
metadata?: {
|
|
10
|
-
description: string;
|
|
11
|
-
examples: readonly string[];
|
|
12
|
-
syntax: string;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export interface CommandMetadata {
|
|
16
|
-
description?: string;
|
|
17
|
-
examples?: readonly string[];
|
|
18
|
-
syntax?: string | readonly string[];
|
|
19
|
-
aliases?: readonly string[];
|
|
20
|
-
[extra: string]: unknown;
|
|
21
|
-
}
|
|
22
|
-
export interface CommandRawInput {
|
|
23
|
-
args: ASTNode[];
|
|
24
|
-
modifiers: Record<string, unknown>;
|
|
25
|
-
commandName?: string;
|
|
26
|
-
bodies?: BodyOps;
|
|
27
|
-
}
|
|
28
|
-
export interface CommandWithParseInput {
|
|
29
|
-
name: string;
|
|
30
|
-
parseInput?(raw: CommandRawInput, evaluator: {
|
|
31
|
-
evaluate(node: ASTNode, context: ExecutionContext): Promise<unknown>;
|
|
32
|
-
}, context: ExecutionContext): Promise<unknown>;
|
|
33
|
-
execute(input: unknown, context: TypedExecutionContext): unknown;
|
|
34
|
-
validate?(input: unknown): boolean;
|
|
35
|
-
readonly ownsConditionalModifier?: boolean;
|
|
36
|
-
metadata?: CommandMetadata;
|
|
37
|
-
}
|
|
38
|
-
export declare class CommandAdapterV2 implements RuntimeCommand {
|
|
39
|
-
private impl;
|
|
40
|
-
private hookRegistry;
|
|
41
|
-
constructor(impl: CommandWithParseInput, _legacySharedEvaluator?: unknown, hookRegistry?: HookRegistry);
|
|
42
|
-
setHookRegistry(registry: HookRegistry): void;
|
|
43
|
-
private createHookContext;
|
|
44
|
-
get name(): string;
|
|
45
|
-
get metadata(): {
|
|
46
|
-
description: string;
|
|
47
|
-
examples: readonly string[];
|
|
48
|
-
syntax: string;
|
|
49
|
-
};
|
|
50
|
-
execute(context: ExecutionContext, ...args: unknown[]): Promise<unknown>;
|
|
51
|
-
validate(input: unknown): ValidationResult<unknown>;
|
|
52
|
-
}
|
|
53
|
-
export declare class CommandRegistryV2 {
|
|
54
|
-
private adapters;
|
|
55
|
-
private implementations;
|
|
56
|
-
private hookRegistry?;
|
|
57
|
-
constructor(_legacySharedEvaluator?: unknown, hookRegistry?: HookRegistry);
|
|
58
|
-
setHookRegistry(registry: HookRegistry): void;
|
|
59
|
-
getHookRegistry(): HookRegistry | undefined;
|
|
60
|
-
register(impl: CommandWithParseInput): void;
|
|
61
|
-
getAdapter(name: string): CommandAdapterV2 | undefined;
|
|
62
|
-
has(name: string): boolean;
|
|
63
|
-
getCommandNames(): string[];
|
|
64
|
-
getImplementation(name: string): CommandWithParseInput | undefined;
|
|
65
|
-
getAdapters(): Map<string, CommandAdapterV2>;
|
|
66
|
-
validateCommand(name: string, input: unknown): ValidationResult<unknown>;
|
|
67
|
-
}
|
|
68
|
-
export declare function createCommandRegistryV2(commands: CommandWithParseInput[], _legacySharedEvaluator?: unknown, hookRegistry?: HookRegistry): CommandRegistryV2;
|
|
69
|
-
//# sourceMappingURL=command-adapter.d.ts.map
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
export declare const isDeno: boolean;
|
|
2
|
-
export declare const isNode: string | false;
|
|
3
|
-
export declare const isBrowser: boolean;
|
|
4
|
-
export interface RuntimeInfo {
|
|
5
|
-
name: 'deno' | 'node' | 'browser' | 'unknown';
|
|
6
|
-
version: string;
|
|
7
|
-
hasDOM: boolean;
|
|
8
|
-
hasWebAPIs: boolean;
|
|
9
|
-
hasFileSystem: boolean;
|
|
10
|
-
hasNetworking: boolean;
|
|
11
|
-
typescript: boolean;
|
|
12
|
-
supportsESM: boolean;
|
|
13
|
-
supportsWorkers: boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare function getRuntimeInfo(): RuntimeInfo;
|
|
16
|
-
export declare const logger: {
|
|
17
|
-
info: (message: string, ...args: unknown[]) => void;
|
|
18
|
-
warn: (message: string, ...args: unknown[]) => void;
|
|
19
|
-
error: (message: string, ...args: unknown[]) => void;
|
|
20
|
-
debug: (message: string, ...args: unknown[]) => void;
|
|
21
|
-
};
|
|
22
|
-
export declare const performance: {
|
|
23
|
-
now: () => number;
|
|
24
|
-
mark: (name: string) => void;
|
|
25
|
-
measure: (name: string, startMark?: string, endMark?: string) => void;
|
|
26
|
-
};
|
|
27
|
-
export declare class UniversalEventTarget {
|
|
28
|
-
private listeners;
|
|
29
|
-
addEventListener(type: string, listener: (event: any) => void): void;
|
|
30
|
-
removeEventListener(type: string, listener: (event: any) => void): void;
|
|
31
|
-
dispatchEvent(event: {
|
|
32
|
-
type: string;
|
|
33
|
-
[key: string]: any;
|
|
34
|
-
}): boolean;
|
|
35
|
-
}
|
|
36
|
-
export declare function getLLMRuntimeInfo(): {
|
|
37
|
-
runtime: "unknown" | "node" | "browser" | "deno";
|
|
38
|
-
version: string;
|
|
39
|
-
typescript: boolean;
|
|
40
|
-
capabilities: {
|
|
41
|
-
dom: boolean;
|
|
42
|
-
webapis: boolean;
|
|
43
|
-
filesystem: boolean;
|
|
44
|
-
networking: boolean;
|
|
45
|
-
workers: boolean;
|
|
46
|
-
esm: boolean;
|
|
47
|
-
};
|
|
48
|
-
features: {
|
|
49
|
-
dom?: boolean | undefined;
|
|
50
|
-
webapis?: boolean | undefined;
|
|
51
|
-
serviceWorkers?: boolean | undefined;
|
|
52
|
-
webAssembly?: boolean | undefined;
|
|
53
|
-
npm?: boolean | undefined;
|
|
54
|
-
packageJson?: boolean | undefined;
|
|
55
|
-
nodeModules?: boolean | undefined;
|
|
56
|
-
builtinModules?: boolean | undefined;
|
|
57
|
-
permissions?: string | undefined;
|
|
58
|
-
builtinTypescript?: boolean | undefined;
|
|
59
|
-
standardLibrary?: string | undefined;
|
|
60
|
-
jsr?: boolean | undefined;
|
|
61
|
-
denoDeploy?: boolean | undefined;
|
|
62
|
-
};
|
|
63
|
-
patterns: {
|
|
64
|
-
imports: string;
|
|
65
|
-
testing: string;
|
|
66
|
-
bundling: string;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
export declare function importForEnvironment<T>(imports: {
|
|
70
|
-
deno?: () => Promise<T>;
|
|
71
|
-
node?: () => Promise<T>;
|
|
72
|
-
browser?: () => Promise<T>;
|
|
73
|
-
fallback?: () => Promise<T>;
|
|
74
|
-
}): Promise<T>;
|
|
75
|
-
//# sourceMappingURL=environment.d.ts.map
|
package/dist/runtime/plugin.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { CommandRegistryV2 } from './command-adapter';
|
|
2
|
-
import type { ParserExtensionRegistry } from '../parser/extensions';
|
|
3
|
-
import type { Runtime } from './runtime';
|
|
4
|
-
export interface HyperfixiPluginContext {
|
|
5
|
-
commandRegistry: CommandRegistryV2;
|
|
6
|
-
parserExtensions: ParserExtensionRegistry;
|
|
7
|
-
runtime: Runtime;
|
|
8
|
-
}
|
|
9
|
-
export interface HyperfixiPlugin {
|
|
10
|
-
name: string;
|
|
11
|
-
install(ctx: HyperfixiPluginContext): void;
|
|
12
|
-
}
|
|
13
|
-
export declare function installPlugin(runtime: Runtime, plugin: HyperfixiPlugin): void;
|
|
14
|
-
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import type { ASTNode, ExecutionContext } from '../types/base-types';
|
|
2
|
-
import type { CommandNode, EventHandlerNode, DefNode, BehaviorNode, ProgramNode, BlockNode, InitBlockNode, ObjectLiteralNode } from '../ast/nodes';
|
|
3
|
-
import { type AnyNode } from '../ast/legacy';
|
|
4
|
-
import type { ExecutionResult, ExecutionSignal } from '../types/result';
|
|
5
|
-
import type { RuntimeHooks } from '../types/hooks';
|
|
6
|
-
import { HookRegistry } from '../types/hooks';
|
|
7
|
-
import type { ExpressionRegistry } from '../core/expression-registry';
|
|
8
|
-
export declare class StrayControlFlowError extends Error {
|
|
9
|
-
readonly signal: ExecutionSignal;
|
|
10
|
-
constructor(signal: ExecutionSignal);
|
|
11
|
-
}
|
|
12
|
-
import { CommandRegistryV2 as CommandRegistry } from './command-adapter';
|
|
13
|
-
import { CleanupRegistry } from './cleanup-registry';
|
|
14
|
-
import { RegistryIntegration, type RegistryIntegrationOptions } from '../registry/runtime-integration';
|
|
15
|
-
import type { Op, BodyOps } from '../types/program';
|
|
16
|
-
export interface RuntimeBaseOptions {
|
|
17
|
-
logAll?: () => boolean;
|
|
18
|
-
registry: CommandRegistry;
|
|
19
|
-
enableAsyncCommands?: boolean;
|
|
20
|
-
commandTimeout?: number;
|
|
21
|
-
enableErrorReporting?: boolean;
|
|
22
|
-
expressionRegistry: ExpressionRegistry;
|
|
23
|
-
hooks?: RuntimeHooks;
|
|
24
|
-
enableAutoCleanup?: boolean;
|
|
25
|
-
registryIntegration?: RegistryIntegrationOptions | boolean;
|
|
26
|
-
}
|
|
27
|
-
export type BehaviorEntry = {
|
|
28
|
-
name: string;
|
|
29
|
-
parameters: string[];
|
|
30
|
-
type: 'imperative';
|
|
31
|
-
install: (element: HTMLElement, parameters: Record<string, unknown>) => void | Promise<void>;
|
|
32
|
-
} | {
|
|
33
|
-
name: string;
|
|
34
|
-
parameters: string[];
|
|
35
|
-
type?: undefined;
|
|
36
|
-
eventHandlers: EventHandlerNode[];
|
|
37
|
-
initBlock?: ASTNode;
|
|
38
|
-
};
|
|
39
|
-
export interface BehaviorAPI {
|
|
40
|
-
has(name: string): boolean;
|
|
41
|
-
get(name: string): BehaviorEntry | undefined;
|
|
42
|
-
set(name: string, definition: BehaviorEntry): void;
|
|
43
|
-
resolve: ((name: string) => boolean) | null;
|
|
44
|
-
install(behaviorName: string, element: HTMLElement, parameters: Record<string, unknown>): Promise<void>;
|
|
45
|
-
}
|
|
46
|
-
export declare class RuntimeBase {
|
|
47
|
-
protected options: RuntimeBaseOptions;
|
|
48
|
-
protected registry: CommandRegistry;
|
|
49
|
-
protected expressionRegistry: ExpressionRegistry;
|
|
50
|
-
behaviorRegistry: Map<string, BehaviorEntry>;
|
|
51
|
-
behaviorAPI: BehaviorAPI;
|
|
52
|
-
protected globalVariables: Map<string, unknown>;
|
|
53
|
-
protected hookRegistry: HookRegistry;
|
|
54
|
-
protected cleanupRegistry: CleanupRegistry;
|
|
55
|
-
private autoCleanupObserver;
|
|
56
|
-
protected registryIntegration: RegistryIntegration | null;
|
|
57
|
-
protected runtimeWarnings: string[];
|
|
58
|
-
constructor(options: RuntimeBaseOptions);
|
|
59
|
-
private setupAutoCleanup;
|
|
60
|
-
registerHooks(name: string, hooks: RuntimeHooks): void;
|
|
61
|
-
unregisterHooks(name: string): boolean;
|
|
62
|
-
getRegisteredHooks(): string[];
|
|
63
|
-
cleanup(element: Element): number;
|
|
64
|
-
trackListener(element: Element, target: EventTarget, eventName: string, handler: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
65
|
-
cleanupTree(element: Element): number;
|
|
66
|
-
getCleanupStats(): ReturnType<CleanupRegistry['getStats']>;
|
|
67
|
-
getCleanupRegistry(): CleanupRegistry;
|
|
68
|
-
protected logError(...args: unknown[]): void;
|
|
69
|
-
protected logWarn(...args: unknown[]): void;
|
|
70
|
-
destroy(): void;
|
|
71
|
-
private hasErrorDiagnostics;
|
|
72
|
-
getWarnings(): readonly string[];
|
|
73
|
-
execute(node: AnyNode, context: ExecutionContext): Promise<unknown>;
|
|
74
|
-
protected executeNode(node: AnyNode, context: ExecutionContext): Promise<ExecutionResult<unknown>>;
|
|
75
|
-
private prepareContext;
|
|
76
|
-
private readonly ops;
|
|
77
|
-
compile(node: AnyNode): Op;
|
|
78
|
-
protected compileSequence(nodes: readonly AnyNode[]): Op;
|
|
79
|
-
private compileNode;
|
|
80
|
-
private dispatch;
|
|
81
|
-
protected processCommandWithResult(node: CommandNode, context: ExecutionContext, bodies?: BodyOps): Promise<ExecutionResult<unknown>>;
|
|
82
|
-
protected executeCommandSequenceWithResult(commands: readonly AnyNode[], context: ExecutionContext): Promise<ExecutionResult<unknown>>;
|
|
83
|
-
protected evaluateExpression(node: AnyNode, context: ExecutionContext): Promise<unknown>;
|
|
84
|
-
protected evaluateExpressionWithResult(node: AnyNode, context: ExecutionContext): Promise<ExecutionResult<unknown>>;
|
|
85
|
-
protected installFunction(node: DefNode, context: ExecutionContext): void;
|
|
86
|
-
protected executeProgram(node: ProgramNode, context: ExecutionContext): Promise<ExecutionResult<unknown>>;
|
|
87
|
-
protected executeBlock(node: BlockNode | InitBlockNode, context: ExecutionContext): Promise<ExecutionResult<unknown>>;
|
|
88
|
-
protected executeObjectLiteral(node: ObjectLiteralNode, context: ExecutionContext): Promise<Record<string, unknown>>;
|
|
89
|
-
protected executeBehaviorDefinition(node: BehaviorNode & {
|
|
90
|
-
readonly imperativeInstaller?: (element: HTMLElement, parameters: Record<string, any>) => void;
|
|
91
|
-
}, _context: ExecutionContext): Promise<void>;
|
|
92
|
-
protected installBehaviorOnElement(behaviorName: string, element: HTMLElement, parameters: Record<string, any>): Promise<void>;
|
|
93
|
-
protected executeEventHandler(node: EventHandlerNode, context: ExecutionContext): Promise<void>;
|
|
94
|
-
private static createEventHandler;
|
|
95
|
-
protected setupMutationObserver(targets: HTMLElement[], attr: string, commands: readonly AnyNode[], context: ExecutionContext): void;
|
|
96
|
-
protected setupChangeObserver(watchTarget: AnyNode, commands: readonly AnyNode[], context: ExecutionContext): Promise<void>;
|
|
97
|
-
protected queryElements(selector: string, context: ExecutionContext): HTMLElement[];
|
|
98
|
-
protected isElement(obj: unknown): obj is HTMLElement;
|
|
99
|
-
}
|
|
100
|
-
//# sourceMappingURL=runtime-base.d.ts.map
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { RuntimeBase } from './runtime-base';
|
|
2
|
-
import { type ExpressionRegistry } from '../core/expression-registry';
|
|
3
|
-
import type { ParserInterface } from '../parser/parser-interface';
|
|
4
|
-
import type { ExecutionContext } from '../types/core';
|
|
5
|
-
export interface TreeShakeableRuntimeOptions {
|
|
6
|
-
expressionRegistry: ExpressionRegistry;
|
|
7
|
-
enableAsyncCommands?: boolean;
|
|
8
|
-
commandTimeout?: number;
|
|
9
|
-
enableErrorReporting?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface RuntimeOptions {
|
|
12
|
-
commands: Array<() => any>;
|
|
13
|
-
expressions?: Record<string, any>[];
|
|
14
|
-
parser?: ParserInterface;
|
|
15
|
-
enableAsyncCommands?: boolean;
|
|
16
|
-
commandTimeout?: number;
|
|
17
|
-
enableErrorReporting?: boolean;
|
|
18
|
-
}
|
|
19
|
-
export interface LokaScriptRuntime {
|
|
20
|
-
runtime: RuntimeBase;
|
|
21
|
-
parser?: ParserInterface;
|
|
22
|
-
run(code: string, element?: Element): Promise<unknown>;
|
|
23
|
-
execute(ast: any, context: ExecutionContext): Promise<unknown>;
|
|
24
|
-
parse(code: string): any;
|
|
25
|
-
}
|
|
26
|
-
export declare function createTreeShakeableRuntime(commands: any[], options: TreeShakeableRuntimeOptions): RuntimeBase;
|
|
27
|
-
export declare function createRuntime(options: RuntimeOptions): LokaScriptRuntime;
|
|
28
|
-
export type { ExpressionRegistry, ParserInterface };
|
|
29
|
-
//# sourceMappingURL=runtime-factory.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { RuntimeBase } from './runtime-base';
|
|
2
|
-
import { CommandRegistryV2 } from './command-adapter';
|
|
3
|
-
export interface RuntimeOptions {
|
|
4
|
-
enableAsyncCommands?: boolean;
|
|
5
|
-
logAll?: () => boolean;
|
|
6
|
-
commandTimeout?: number;
|
|
7
|
-
enableErrorReporting?: boolean;
|
|
8
|
-
lazyLoad?: boolean;
|
|
9
|
-
expressionPreload?: 'core' | 'common' | 'all' | 'none';
|
|
10
|
-
registry?: CommandRegistryV2;
|
|
11
|
-
expressionRegistry?: import('../core/expression-registry').ExpressionRegistry;
|
|
12
|
-
useEnhancedCommands?: boolean;
|
|
13
|
-
commands?: string[];
|
|
14
|
-
}
|
|
15
|
-
export declare class Runtime extends RuntimeBase {
|
|
16
|
-
constructor(options?: RuntimeOptions);
|
|
17
|
-
getRegistry(): CommandRegistryV2;
|
|
18
|
-
}
|
|
19
|
-
export declare function createRuntime(options?: RuntimeOptions): Runtime;
|
|
20
|
-
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export interface TemporalState {
|
|
2
|
-
id: string;
|
|
3
|
-
command: string;
|
|
4
|
-
element: HTMLElement;
|
|
5
|
-
originalState: any;
|
|
6
|
-
untilEvent: string;
|
|
7
|
-
untilTarget?: HTMLElement | Document | Window | undefined;
|
|
8
|
-
cleanup: () => void;
|
|
9
|
-
timestamp: number;
|
|
10
|
-
}
|
|
11
|
-
export interface TemporalModifierOptions {
|
|
12
|
-
command: string;
|
|
13
|
-
element: HTMLElement;
|
|
14
|
-
untilEvent: string;
|
|
15
|
-
untilTarget?: HTMLElement | Document | Window | undefined;
|
|
16
|
-
stateCapture: () => any;
|
|
17
|
-
stateRestore: (state: any) => void;
|
|
18
|
-
}
|
|
19
|
-
export declare class TemporalModifierManager {
|
|
20
|
-
private static instance;
|
|
21
|
-
private activeStates;
|
|
22
|
-
private nextId;
|
|
23
|
-
private constructor();
|
|
24
|
-
static getInstance(): TemporalModifierManager;
|
|
25
|
-
register(options: TemporalModifierOptions): string;
|
|
26
|
-
unregister(id: string): boolean;
|
|
27
|
-
getActiveStates(): TemporalState[];
|
|
28
|
-
getStatesForElement(element: HTMLElement): TemporalState[];
|
|
29
|
-
clearAll(): void;
|
|
30
|
-
get activeCount(): number;
|
|
31
|
-
}
|
|
32
|
-
export declare function createToggleUntil(element: HTMLElement, targetType: 'class' | 'attribute', targetName: string, untilEvent: string, untilTarget?: HTMLElement | Document | Window): string;
|
|
33
|
-
export declare function createAddUntil(element: HTMLElement, targetType: 'class' | 'attribute', targetName: string, targetValue: string | undefined, untilEvent: string, untilTarget?: HTMLElement | Document | Window): string;
|
|
34
|
-
export declare function createRemoveUntil(element: HTMLElement, targetType: 'class' | 'attribute', targetName: string, untilEvent: string, untilTarget?: HTMLElement | Document | Window): string;
|
|
35
|
-
export declare const temporalModifierManager: TemporalModifierManager;
|
|
36
|
-
export default TemporalModifierManager;
|
|
37
|
-
//# sourceMappingURL=temporal-modifiers.d.ts.map
|
package/dist/test-setup.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
namespace Vi {
|
|
3
|
-
interface AsymmetricMatchersContaining {
|
|
4
|
-
toBeValidHyperscriptAST(): any;
|
|
5
|
-
toExecuteSuccessfully(): any;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
export declare const createTestElement: (html: string) => HTMLElement;
|
|
10
|
-
export declare const waitForEvent: (target: EventTarget, eventName: string, timeout?: number) => Promise<Event>;
|
|
11
|
-
export declare const createMockHyperscriptContext: (element?: HTMLElement) => {
|
|
12
|
-
me: HTMLElement | null;
|
|
13
|
-
it: any;
|
|
14
|
-
you: HTMLElement | null;
|
|
15
|
-
result: any;
|
|
16
|
-
locals: Map<string, any>;
|
|
17
|
-
globals: Map<string, any>;
|
|
18
|
-
registry: import("./core/expression-registry").ExpressionRegistry;
|
|
19
|
-
};
|
|
20
|
-
export declare const createTypedExecutionContext: (element?: HTMLElement) => {
|
|
21
|
-
me: HTMLElement | null;
|
|
22
|
-
it: any;
|
|
23
|
-
you: HTMLElement | null;
|
|
24
|
-
result: any;
|
|
25
|
-
locals: Map<string, any>;
|
|
26
|
-
globals: Map<string, any>;
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=test-setup.d.ts.map
|