@hyperfixi/core 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +218 -0
- package/dist/__test-utils__/context-builders.d.ts +42 -0
- package/dist/__test-utils__/error-testing.d.ts +18 -0
- package/dist/__test-utils__/index.d.ts +6 -0
- package/dist/__test-utils__/mock-types.d.ts +57 -0
- package/dist/__test-utils__/parser-context-mock.d.ts +7 -0
- package/dist/__test-utils__/parser-helpers.d.ts +38 -0
- package/dist/api/dom-processor.d.ts +17 -0
- package/dist/api/hyperscript-api.d.ts +68 -0
- package/dist/api/lokascript-api.d.ts +9 -0
- package/dist/ast-utils/analyzer.d.ts +19 -0
- package/dist/ast-utils/documentation.d.ts +8 -0
- package/dist/ast-utils/generator.d.ts +9 -0
- package/dist/ast-utils/index.d.ts +12 -0
- package/dist/ast-utils/index.js +3366 -0
- package/dist/ast-utils/index.mjs +3320 -0
- package/dist/ast-utils/interchange/from-core.d.ts +8 -0
- package/dist/ast-utils/interchange/index.d.ts +6 -0
- package/dist/ast-utils/interchange/lsp.d.ts +108 -0
- package/dist/ast-utils/interchange/to-core.d.ts +8 -0
- package/dist/ast-utils/interchange/types.d.ts +113 -0
- package/dist/ast-utils/query.d.ts +25 -0
- package/dist/ast-utils/transformer.d.ts +14 -0
- package/dist/ast-utils/types.d.ts +162 -0
- package/dist/ast-utils/visitor.d.ts +40 -0
- package/dist/behaviors/boosted.d.ts +29 -0
- package/dist/behaviors/history-swap.d.ts +24 -0
- package/dist/behaviors/index.d.ts +4 -0
- package/dist/behaviors/index.js +1149 -0
- package/dist/behaviors/index.mjs +1139 -0
- package/dist/bundle-generator/generator.d.ts +4 -0
- package/dist/bundle-generator/index.d.ts +6 -0
- package/dist/bundle-generator/index.js +2294 -0
- package/dist/bundle-generator/index.mjs +2271 -0
- package/dist/bundle-generator/parser-templates.d.ts +6 -0
- package/dist/bundle-generator/template-capabilities.d.ts +10 -0
- package/dist/bundle-generator/templates.d.ts +11 -0
- package/dist/bundle-generator/types.d.ts +34 -0
- package/dist/bundles/test-minimal.d.ts +3 -0
- package/dist/bundles/test-standard.d.ts +3 -0
- package/dist/chunks/bridge-I6ceoWxV.js +2 -0
- package/dist/chunks/browser-modular-Dv6PAV3c.js +2 -0
- package/dist/chunks/feature-eventsource-DWb514fy.js +2 -0
- package/dist/chunks/feature-sockets-3PFuvCVY.js +2 -0
- package/dist/chunks/feature-webworker-DTm_eh-E.js +2 -0
- package/dist/commands/advanced/async.d.ts +28 -0
- package/dist/commands/advanced/js.d.ts +28 -0
- package/dist/commands/animation/measure.d.ts +31 -0
- package/dist/commands/animation/settle.d.ts +26 -0
- package/dist/commands/animation/take.d.ts +28 -0
- package/dist/commands/animation/transition.d.ts +31 -0
- package/dist/commands/async/fetch.d.ts +44 -0
- package/dist/commands/async/wait.d.ts +41 -0
- package/dist/commands/behaviors/install.d.ts +41 -0
- package/dist/commands/content/append.d.ts +27 -0
- package/dist/commands/control-flow/break.d.ts +15 -0
- package/dist/commands/control-flow/continue.d.ts +15 -0
- package/dist/commands/control-flow/exit.d.ts +15 -0
- package/dist/commands/control-flow/halt.d.ts +25 -0
- package/dist/commands/control-flow/if.d.ts +45 -0
- package/dist/commands/control-flow/repeat.d.ts +35 -0
- package/dist/commands/control-flow/return.d.ts +23 -0
- package/dist/commands/control-flow/signal-base.d.ts +25 -0
- package/dist/commands/control-flow/throw.d.ts +22 -0
- package/dist/commands/control-flow/unless.d.ts +3 -0
- package/dist/commands/data/decrement.d.ts +3 -0
- package/dist/commands/data/default.d.ts +31 -0
- package/dist/commands/data/get.d.ts +23 -0
- package/dist/commands/data/increment.d.ts +25 -0
- package/dist/commands/data/set.d.ts +56 -0
- package/dist/commands/decorators/index.d.ts +30 -0
- package/dist/commands/dom/__tests__/add-standalone-helpers.d.ts +11 -0
- package/dist/commands/dom/add.d.ts +31 -0
- package/dist/commands/dom/dom-modification-base.d.ts +48 -0
- package/dist/commands/dom/hide.d.ts +12 -0
- package/dist/commands/dom/make.d.ts +21 -0
- package/dist/commands/dom/process-partials.d.ts +39 -0
- package/dist/commands/dom/put.d.ts +31 -0
- package/dist/commands/dom/remove.d.ts +33 -0
- package/dist/commands/dom/show.d.ts +13 -0
- package/dist/commands/dom/swap.d.ts +38 -0
- package/dist/commands/dom/toggle.d.ts +55 -0
- package/dist/commands/dom/visibility-base.d.ts +20 -0
- package/dist/commands/events/send.d.ts +3 -0
- package/dist/commands/events/trigger.d.ts +36 -0
- package/dist/commands/execution/call.d.ts +24 -0
- package/dist/commands/execution/pseudo-command.d.ts +42 -0
- package/dist/commands/helpers/attribute-manipulation.d.ts +11 -0
- package/dist/commands/helpers/batch-dom-operations.d.ts +12 -0
- package/dist/commands/helpers/class-manipulation.d.ts +11 -0
- package/dist/commands/helpers/condition-helpers.d.ts +4 -0
- package/dist/commands/helpers/dom-mutation.d.ts +15 -0
- package/dist/commands/helpers/duration-parsing.d.ts +8 -0
- package/dist/commands/helpers/element-property-access.d.ts +7 -0
- package/dist/commands/helpers/element-resolution.d.ts +17 -0
- package/dist/commands/helpers/error-helpers.d.ts +17 -0
- package/dist/commands/helpers/event-helpers.d.ts +13 -0
- package/dist/commands/helpers/event-waiting.d.ts +37 -0
- package/dist/commands/helpers/index.d.ts +32 -0
- package/dist/commands/helpers/input-validator.d.ts +23 -0
- package/dist/commands/helpers/loop-executor.d.ts +53 -0
- package/dist/commands/helpers/numeric-target-parser.d.ts +14 -0
- package/dist/commands/helpers/property-target.d.ts +30 -0
- package/dist/commands/helpers/selector-type-detection.d.ts +24 -0
- package/dist/commands/helpers/smart-element.d.ts +16 -0
- package/dist/commands/helpers/style-manipulation.d.ts +16 -0
- package/dist/commands/helpers/temporal-modifiers.d.ts +15 -0
- package/dist/commands/helpers/url-argument-parser.d.ts +10 -0
- package/dist/commands/helpers/url-validation.d.ts +7 -0
- package/dist/commands/helpers/variable-access.d.ts +10 -0
- package/dist/commands/helpers/visibility-target-parser.d.ts +11 -0
- package/dist/commands/index.d.ts +139 -0
- package/dist/commands/index.js +9186 -0
- package/dist/commands/index.mjs +9032 -0
- package/dist/commands/navigation/go.d.ts +35 -0
- package/dist/commands/navigation/push-url.d.ts +35 -0
- package/dist/commands/navigation/replace-url.d.ts +3 -0
- package/dist/commands/templates/render.d.ts +48 -0
- package/dist/commands/utility/beep.d.ts +32 -0
- package/dist/commands/utility/copy.d.ts +29 -0
- package/dist/commands/utility/log.d.ts +24 -0
- package/dist/commands/utility/pick.d.ts +26 -0
- package/dist/commands/utility/tell.d.ts +26 -0
- package/dist/compatibility/browser-bundle-animation-generated.d.ts +16 -0
- package/dist/compatibility/browser-bundle-classic-i18n.d.ts +63 -0
- package/dist/compatibility/browser-bundle-classic.d.ts +17 -0
- package/dist/compatibility/browser-bundle-forms-generated.d.ts +16 -0
- package/dist/compatibility/browser-bundle-hybrid-complete.d.ts +28 -0
- package/dist/compatibility/browser-bundle-hybrid-hx.d.ts +43 -0
- package/dist/compatibility/browser-bundle-lite-plus.d.ts +25 -0
- package/dist/compatibility/browser-bundle-lite.d.ts +23 -0
- package/dist/compatibility/browser-bundle-minimal-generated.d.ts +16 -0
- package/dist/compatibility/browser-bundle-minimal-v2.d.ts +17 -0
- package/dist/compatibility/browser-bundle-minimal.d.ts +8 -0
- package/dist/compatibility/browser-bundle-modular.d.ts +18 -0
- package/dist/compatibility/browser-bundle-multilingual.d.ts +19 -0
- package/dist/compatibility/browser-bundle-semantic-complete.d.ts +24 -0
- package/dist/compatibility/browser-bundle-standard-v2.d.ts +17 -0
- package/dist/compatibility/browser-bundle-standard.d.ts +8 -0
- package/dist/compatibility/browser-bundle-textshelf-minimal.d.ts +16 -0
- package/dist/compatibility/browser-bundle-textshelf-profile.d.ts +18 -0
- package/dist/compatibility/browser-bundle.d.ts +140 -0
- package/dist/compatibility/browser-modular.d.ts +53 -0
- package/dist/compatibility/browser-tests/test-utils.d.ts +21 -0
- package/dist/compatibility/eval-hyperscript.d.ts +15 -0
- package/dist/compatibility/feature-loader.d.ts +8 -0
- package/dist/compatibility/hyperscript-adapter.d.ts +38 -0
- package/dist/compatibility/hyperscript-tests/test-adapter.d.ts +13 -0
- package/dist/core/ast-property-utils.d.ts +2 -0
- package/dist/core/base-expression-evaluator.d.ts +70 -0
- package/dist/core/binary-expression-evaluator.d.ts +7 -0
- package/dist/core/call-expression-evaluator.d.ts +7 -0
- package/dist/core/configurable-expression-evaluator.d.ts +5 -0
- package/dist/core/context.d.ts +15 -0
- package/dist/core/dom.d.ts +15 -0
- package/dist/core/evaluator-types.d.ts +5 -0
- package/dist/core/events.d.ts +48 -0
- package/dist/core/executor.d.ts +34 -0
- package/dist/core/expression-evaluator.d.ts +6 -0
- package/dist/core/lazy-expression-evaluator.d.ts +22 -0
- package/dist/core/parser.d.ts +21 -0
- package/dist/core/selector-evaluator.d.ts +15 -0
- package/dist/core/template-literal-evaluator.d.ts +5 -0
- package/dist/dom/attribute-processor.d.ts +40 -0
- package/dist/dom/minimal-attribute-processor.d.ts +20 -0
- package/dist/experimental/binary-tree/accessor.d.ts +10 -0
- package/dist/experimental/binary-tree/ast-serializer.d.ts +26 -0
- package/dist/experimental/binary-tree/benchmark.d.ts +24 -0
- package/dist/experimental/binary-tree/buffer-context.d.ts +27 -0
- package/dist/experimental/binary-tree/deserializer.d.ts +17 -0
- package/dist/experimental/binary-tree/index.d.ts +22 -0
- package/dist/experimental/binary-tree/serializer.d.ts +4 -0
- package/dist/experimental/binary-tree/types.d.ts +54 -0
- package/dist/expressions/base-expression.d.ts +27 -0
- package/dist/expressions/bundles/common-expressions.d.ts +9 -0
- package/dist/expressions/bundles/core-expressions.d.ts +7 -0
- package/dist/expressions/bundles/full-expressions.d.ts +10 -0
- package/dist/expressions/bundles/index.d.ts +7 -0
- package/dist/expressions/comparison/index.d.ts +80 -0
- package/dist/expressions/comparison/utils.d.ts +2 -0
- package/dist/expressions/conversion/impl/bridge.d.ts +117 -0
- package/dist/expressions/conversion/impl/index.d.ts +59 -0
- package/dist/expressions/conversion/index.d.ts +23 -0
- package/dist/expressions/expression-tiers.d.ts +13 -0
- package/dist/expressions/index.d.ts +11 -0
- package/dist/expressions/index.js +6930 -0
- package/dist/expressions/index.mjs +6912 -0
- package/dist/expressions/logical/impl/index.d.ts +54 -0
- package/dist/expressions/logical/impl/pattern-matching.d.ts +58 -0
- package/dist/expressions/logical/index.d.ts +59 -0
- package/dist/expressions/mathematical/index.d.ts +69 -0
- package/dist/expressions/positional/impl/bridge.d.ts +95 -0
- package/dist/expressions/positional/impl/index.d.ts +73 -0
- package/dist/expressions/positional/index.d.ts +26 -0
- package/dist/expressions/properties/impl/index.d.ts +105 -0
- package/dist/expressions/properties/index.d.ts +26 -0
- package/dist/expressions/property/index.d.ts +55 -0
- package/dist/expressions/property-access-utils.d.ts +23 -0
- package/dist/expressions/references/impl/bridge.d.ts +54 -0
- package/dist/expressions/references/impl/index.d.ts +65 -0
- package/dist/expressions/references/index.d.ts +40 -0
- package/dist/expressions/shared/comparison-utils.d.ts +10 -0
- package/dist/expressions/shared/index.d.ts +9 -0
- package/dist/expressions/shared/number-utils.d.ts +7 -0
- package/dist/expressions/shared/validation-utils.d.ts +13 -0
- package/dist/expressions/special/index.d.ts +104 -0
- package/dist/expressions/type-helpers.d.ts +11 -0
- package/dist/expressions/type-registry.d.ts +57 -0
- package/dist/expressions/validation-helpers.d.ts +15 -0
- package/dist/extensions/index.d.ts +3 -0
- package/dist/extensions/tailwind.d.ts +22 -0
- package/dist/features/behaviors.d.ts +153 -0
- package/dist/features/def.d.ts +135 -0
- package/dist/features/eventsource.d.ts +140 -0
- package/dist/features/init.d.ts +135 -0
- package/dist/features/on.d.ts +131 -0
- package/dist/features/predefined-behaviors/dropdown-behavior.d.ts +20 -0
- package/dist/features/predefined-behaviors/index.d.ts +12 -0
- package/dist/features/predefined-behaviors/modal-behavior.d.ts +18 -0
- package/dist/features/predefined-behaviors/toggle-group-behavior.d.ts +23 -0
- package/dist/features/predefined-behaviors/types.d.ts +14 -0
- package/dist/features/sockets.d.ts +162 -0
- package/dist/features/webworker.d.ts +135 -0
- package/dist/htmx/htmx-attribute-processor.d.ts +84 -0
- package/dist/htmx/htmx-translator.d.ts +19 -0
- package/dist/htmx/index.d.ts +3 -0
- package/dist/hyperfixi-classic-i18n.js +2 -0
- package/dist/hyperfixi-hx.js +1 -0
- package/dist/hyperfixi-hybrid-complete.js +1 -0
- package/dist/hyperfixi-lite-plus.js +1 -0
- package/dist/hyperfixi-lite.js +1 -0
- package/dist/hyperfixi-minimal.js +1 -0
- package/dist/hyperfixi-multilingual.js +2 -0
- package/dist/hyperfixi-standard.js +2 -0
- package/dist/hyperfixi.js +2 -0
- package/dist/hyperfixi.mjs +2 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +65387 -0
- package/dist/index.min.js +2 -0
- package/dist/index.mjs +65343 -0
- package/dist/lib/index.d.ts +4 -0
- package/dist/lib/morph-adapter.d.ts +22 -0
- package/dist/lib/swap-executor.d.ts +22 -0
- package/dist/lib/view-transitions.d.ts +33 -0
- package/dist/lokascript-browser-classic-i18n.js +2 -0
- package/dist/lokascript-browser-minimal.js +1 -0
- package/dist/lokascript-browser-standard.js +2 -0
- package/dist/lokascript-browser.js +2 -0
- package/dist/lokascript-hybrid-complete.js +1 -0
- package/dist/lokascript-hybrid-hx.js +1 -0
- package/dist/lokascript-lite-plus.js +1 -0
- package/dist/lokascript-lite.js +1 -0
- package/dist/lokascript-multilingual.js +2 -0
- package/dist/lsp-metadata.d.ts +25 -0
- package/dist/lsp-metadata.js +680 -0
- package/dist/lsp-metadata.mjs +670 -0
- package/dist/metadata.d.ts +213 -0
- package/dist/metadata.js +378 -0
- package/dist/metadata.mjs +368 -0
- package/dist/mod.d.ts +63 -0
- package/dist/multilingual/bridge.d.ts +36 -0
- package/dist/multilingual/index.d.ts +32 -0
- package/dist/multilingual/index.js +285 -0
- package/dist/multilingual/index.mjs +278 -0
- package/dist/parser/__types__/test-helpers.d.ts +25 -0
- package/dist/parser/command-node-builder.d.ts +45 -0
- package/dist/parser/command-parsers/animation-commands.d.ts +5 -0
- package/dist/parser/command-parsers/async-commands.d.ts +5 -0
- package/dist/parser/command-parsers/control-flow-commands.d.ts +7 -0
- package/dist/parser/command-parsers/dom-commands.d.ts +8 -0
- package/dist/parser/command-parsers/event-commands.d.ts +4 -0
- package/dist/parser/command-parsers/utility-commands.d.ts +9 -0
- package/dist/parser/command-parsers/variable-commands.d.ts +12 -0
- package/dist/parser/error-handler.d.ts +34 -0
- package/dist/parser/expression-parser.d.ts +6 -0
- package/dist/parser/full-parser.d.ts +4 -0
- package/dist/parser/full-parser.js +6532 -0
- package/dist/parser/full-parser.mjs +6529 -0
- package/dist/parser/helpers/ast-helpers.d.ts +22 -0
- package/dist/parser/helpers/parsing-helpers.d.ts +19 -0
- package/dist/parser/helpers/token-helpers.d.ts +28 -0
- package/dist/parser/hybrid/aliases.d.ts +7 -0
- package/dist/parser/hybrid/aliases.js +44 -0
- package/dist/parser/hybrid/aliases.mjs +37 -0
- package/dist/parser/hybrid/ast-types.d.ts +97 -0
- package/dist/parser/hybrid/ast-types.js +3 -0
- package/dist/parser/hybrid/ast-types.mjs +2 -0
- package/dist/parser/hybrid/index.d.ts +6 -0
- package/dist/parser/hybrid/index.js +1015 -0
- package/dist/parser/hybrid/index.mjs +1005 -0
- package/dist/parser/hybrid/parser-core.d.ts +57 -0
- package/dist/parser/hybrid/parser-core.js +1001 -0
- package/dist/parser/hybrid/parser-core.mjs +999 -0
- package/dist/parser/hybrid/tokenizer.d.ts +9 -0
- package/dist/parser/hybrid/tokenizer.js +242 -0
- package/dist/parser/hybrid/tokenizer.mjs +239 -0
- package/dist/parser/hybrid-parser.d.ts +10 -0
- package/dist/parser/hybrid-parser.js +1078 -0
- package/dist/parser/hybrid-parser.mjs +1071 -0
- package/dist/parser/parser-constants.d.ts +102 -0
- package/dist/parser/parser-interface.d.ts +11 -0
- package/dist/parser/parser-types.d.ts +175 -0
- package/dist/parser/parser.d.ts +146 -0
- package/dist/parser/regex-parser.d.ts +4 -0
- package/dist/parser/regex-parser.js +412 -0
- package/dist/parser/regex-parser.mjs +409 -0
- package/dist/parser/runtime.d.ts +3 -0
- package/dist/parser/semantic-integration.d.ts +61 -0
- package/dist/parser/token-consumer.d.ts +35 -0
- package/dist/parser/token-predicates.d.ts +77 -0
- package/dist/parser/tokenizer.d.ts +57 -0
- package/dist/parser/types.d.ts +118 -0
- package/dist/performance/expression-cache.d.ts +78 -0
- package/dist/performance/integration.d.ts +40 -0
- package/dist/performance/production-monitor.d.ts +67 -0
- package/dist/reference/index.d.ts +41 -0
- package/dist/reference/index.js +586 -0
- package/dist/reference/index.mjs +577 -0
- package/dist/registry/browser-types.d.ts +20 -0
- package/dist/registry/browser-types.js +81 -0
- package/dist/registry/browser-types.mjs +76 -0
- package/dist/registry/context-provider-registry.d.ts +38 -0
- package/dist/registry/environment.d.ts +19 -0
- package/dist/registry/environment.js +36 -0
- package/dist/registry/environment.mjs +30 -0
- package/dist/registry/event-source-registry.d.ts +54 -0
- package/dist/registry/examples/server-commands.d.ts +6 -0
- package/dist/registry/examples/server-event-source.d.ts +32 -0
- package/dist/registry/index.d.ts +54 -0
- package/dist/registry/index.js +7636 -0
- package/dist/registry/index.mjs +7612 -0
- package/dist/registry/multilingual/examples.d.ts +16 -0
- package/dist/registry/multilingual/index.d.ts +68 -0
- package/dist/registry/runtime-integration.d.ts +30 -0
- package/dist/registry/universal-types.d.ts +34 -0
- package/dist/registry/universal-types.js +91 -0
- package/dist/registry/universal-types.mjs +86 -0
- package/dist/runtime/cleanup-registry.d.ts +47 -0
- package/dist/runtime/command-adapter.d.ts +63 -0
- package/dist/runtime/environment.d.ts +75 -0
- package/dist/runtime/runtime-base.d.ts +78 -0
- package/dist/runtime/runtime-experimental.d.ts +18 -0
- package/dist/runtime/runtime-factory.d.ts +30 -0
- package/dist/runtime/runtime.d.ts +19 -0
- package/dist/runtime/temporal-modifiers.d.ts +37 -0
- package/dist/scripts/code-generator.d.ts +64 -0
- package/dist/scripts/generate-missing-commands.d.ts +4 -0
- package/dist/test-setup.d.ts +45 -0
- package/dist/test-utilities.d.ts +52 -0
- package/dist/tokenizer.d.ts +49 -0
- package/dist/types/base-types.d.ts +336 -0
- package/dist/types/code-fix.d.ts +39 -0
- package/dist/types/command-metadata.d.ts +57 -0
- package/dist/types/command-types.d.ts +272 -0
- package/dist/types/context-types.d.ts +106 -0
- package/dist/types/core-context.d.ts +21 -0
- package/dist/types/core.d.ts +203 -0
- package/dist/types/error-codes.d.ts +207 -0
- package/dist/types/expression-types.d.ts +155 -0
- package/dist/types/feature-types.d.ts +81 -0
- package/dist/types/hooks.d.ts +45 -0
- package/dist/types/index.d.ts +32 -0
- package/dist/types/result.d.ts +72 -0
- package/dist/types/template-types.d.ts +162 -0
- package/dist/types/type-guards.d.ts +24 -0
- package/dist/types/unified-types.d.ts +99 -0
- package/dist/utils/debug-events.d.ts +41 -0
- package/dist/utils/debug.d.ts +35 -0
- package/dist/utils/dom-utils.d.ts +16 -0
- package/dist/utils/element-check.d.ts +7 -0
- package/dist/utils/keyboard-shortcuts.d.ts +18 -0
- package/dist/utils/performance.d.ts +40 -0
- package/dist/validation/command-pattern-validator.d.ts +53 -0
- package/dist/validation/common-validators.d.ts +24 -0
- package/dist/validation/lightweight-validators.d.ts +113 -0
- package/dist/validation/partial-validation-types.d.ts +50 -0
- package/dist/validation/partial-validator.d.ts +6 -0
- package/dist/validation/partial-warning-formatter.d.ts +6 -0
- package/dist/validation/validate-cli.d.ts +41 -0
- package/package.json +292 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{v as e,z as n}from"./feature-sockets-3PFuvCVY.js";e.object({source:n.object({url:e.string().min(1),withCredentials:e.boolean().default(!1),headers:n.record(e.string(),e.string()).default({}),retry:e.object({enabled:e.boolean().default(!0),maxAttempts:e.number().default(5),delay:e.number().default(3e3),backoff:n.enum(["linear","exponential"]).default("exponential"),maxDelay:e.number().default(3e4)}).default({}),timeout:e.object({enabled:e.boolean().default(!0),duration:e.number().default(6e4)}).default({})}),eventHandlers:e.array(e.object({event:e.string().min(1),commands:e.array(e.any()).min(1),filter:e.string().optional(),options:n.object({throttle:e.number().optional(),debounce:e.number().optional()}).optional()})).default([]),messageProcessing:e.object({format:n.enum(["text","json","raw"]).default("text"),validation:n.object({enabled:e.boolean().default(!0),schema:e.any().optional()}).default({}),buffer:e.object({enabled:e.boolean().default(!0),maxSize:e.number().min(0).default(100),flushInterval:e.number().default(1e3)}).default({})}).default({}),context:e.object({variables:n.record(e.string(),e.any()).default({}),me:e.any().optional(),it:e.any().optional(),target:e.any().optional()}).default({}),options:e.object({enableAutoConnect:e.boolean().default(!0),enableMessageBuffer:e.boolean().default(!0),enableErrorHandling:e.boolean().default(!0),maxConnections:e.number().default(1),connectionTimeout:e.number().default(3e4)}).default({}),environment:n.enum(["frontend","backend","universal"]).default("frontend"),debug:e.boolean().default(!1)}),e.object({contextId:e.string(),timestamp:e.number(),category:e.literal("Frontend"),capabilities:e.array(e.string()),state:n.enum(["ready","connecting","connected","disconnecting","disconnected","error"]),connection:n.object({connect:e.any(),disconnect:e.any(),reconnect:e.any(),getState:e.any(),getConnectionInfo:e.any(),isConnected:e.any()}),events:e.object({addHandler:e.any(),removeHandler:e.any(),getHandlers:e.any(),emit:e.any()}),messages:e.object({getHistory:e.any(),getBuffer:e.any(),flushBuffer:e.any(),clearHistory:e.any(),subscribe:e.any(),unsubscribe:e.any()}),errors:e.object({handle:e.any(),getErrorHistory:e.any(),clearErrors:e.any(),setErrorHandler:e.any()})});
|
|
2
|
+
//# sourceMappingURL=feature-eventsource-DWb514fy.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(e,t,r,n=[]){return{type:e,message:t,suggestions:n,...r&&{path:r}}}const t="undefined"!=typeof process&&"production"===process.env.NODE_ENV||"undefined"!=typeof process&&"true"===process.env.HYPERFIXI_SKIP_VALIDATION||"undefined"!=typeof globalThis&&"true"===globalThis.HYPERFIXI_SKIP_VALIDATION;let r;function n(){return r({validate:e=>({success:!0,data:e})})}function s(a,o){if(t)return n();const c=r({validate:t=>{if("object"!=typeof t||null===t||Array.isArray(t))return{success:!1,error:e("type-mismatch","Expected object, received "+typeof t)};const r=t,n={};if(o?.strict){const t=Object.keys(a),n=Object.keys(r).filter(e=>!t.includes(e));if(n.length>0)return{success:!1,error:e("runtime-error","Unexpected properties: "+n.join(", "))}}for(const[t,s]of Object.entries(a)){const a=r[t];if(!(t in r)&&!s._isOptional)return{success:!1,error:e("missing-argument",`Required field "${t}" is missing`,t)};const o=s.validate(a);if(!o.success){return{success:!1,error:e("validation-error",o.error.message||`Field "${t}" validation failed`,o.error.path?`${t}.${o.error.path}`:t)}}void 0!==o.data&&(n[t]=o.data)}return{success:!0,data:n}}});return c.strict=()=>s(a,{strict:!0}),c}function a(s,a="Custom validation failed"){return t?n():r({validate:t=>s(t)?{success:!0,data:t}:{success:!1,error:e("runtime-error",a)}})}r=function(t){return t.describe||(t.describe=function(e){return this.description=e,this}),t.safeParse||(t.safeParse=function(e){const t=this.validate(e);return t.success?{success:!0,data:t.data}:{success:!1,error:{errors:t.error?[t.error]:[]}}}),t.parse||(t.parse=function(e){const t=this.validate(e);if(t.success&&void 0!==t.data)return t.data;throw Error(t.error?.message||"Validation failed")}),t.optional||(t.optional=function(){const e=this.validate.bind(this),t={...this,_isOptional:!0,validate:t=>null==t?{success:!0,data:void 0}:e(t)};return r(t)}),t.min||(t.min=function(t){const n=this.validate.bind(this),s={...this,validate:r=>{const s=n(r);return s.success&&"string"==typeof s.data&&t>s.data.length?{success:!1,error:e("runtime-error",`String must be at least ${t} characters long`)}:s}};return r(s)}),t.max||(t.max=function(t){const n=this.validate.bind(this),s={...this,validate:r=>{const s=n(r);return s.success&&"string"==typeof s.data&&s.data.length>t?{success:!1,error:e("runtime-error",`String must be at most ${t} characters long`)}:s}};return r(s)}),t.default||(t.default=function(e){const t=this.validate.bind(this),n={...this,_defaultValue:e,_hasDefault:!0,validate:r=>void 0===r?{success:!0,data:e}:t(r)};return r(n)}),t.rest||(t.rest=function(e){return this}),t.refine||(t.refine=function(t,n){const s=this.validate.bind(this),a={...this,validate:r=>{const a=s(r);return a.success?t(a.data)?a:{success:!1,error:e("runtime-error",n||"Refinement validation failed")}:a}};return r(a)}),new Proxy(t,{get:(e,t,r)=>t in e||"string"!=typeof t||t.startsWith("_")||"constructor"===t||"validate"===t||"then"===t?Reflect.get(e,t,r):function(...e){return r}})};const o={string:s=>function(s={}){return t?n():r({validate:t=>s.optional&&null==t?{success:!0,data:void 0}:"string"!=typeof t?{success:!1,error:e("type-mismatch","Expected string, received "+typeof t)}:void 0!==s.minLength&&s.minLength>t.length?{success:!1,error:e("runtime-error",`String must be at least ${s.minLength} characters long`)}:void 0!==s.maxLength&&t.length>s.maxLength?{success:!1,error:e("runtime-error",`String must be at most ${s.maxLength} characters long`)}:s.pattern&&!s.pattern.test(t)?s.pattern.source.startsWith("^")&&s.pattern.source.endsWith("$")?{success:!1,error:e("runtime-error",`Expected "${s.pattern.source.slice(1,-1)}", received "${t}"`)}:{success:!1,error:e("missing-argument","String does not match required pattern")}:{success:!0,data:t},...s.description&&{description:s.description}})}(s||{}),number:s=>function(s={}){return t?n():r({validate:t=>{const r=Number(t);return isNaN(r)?{success:!1,error:e("type-mismatch","Expected number, received "+typeof t)}:void 0!==s.min&&s.min>r?{success:!1,error:e("runtime-error","Number must be at least "+s.min)}:void 0!==s.max&&r>s.max?{success:!1,error:e("runtime-error","Number must be at most "+s.max)}:{success:!0,data:r}}})}(s||{}),boolean:()=>t?n():r({validate:t=>"boolean"!=typeof t?{success:!1,error:e("type-mismatch","Expected boolean, received "+typeof t)}:{success:!0,data:t}}),object:e=>s(e),array:s=>function(s){return t?n():r({validate:t=>{if(!Array.isArray(t))return{success:!1,error:e("type-mismatch","Expected array, received "+typeof t)};const r=[];for(let n=0;t.length>n;n++){const a=s.validate(t[n]);if(!a.success)return{success:!1,error:e("runtime-error",a.error.message,a.error.path?`${n}.${a.error.path}`:""+n)};r.push(a.data)}return{success:!0,data:r}}})}(s),tuple:s=>function(s){return t?n():r({validate:t=>{if(!Array.isArray(t))return{success:!1,error:e("type-mismatch","Expected array, received "+typeof t)};if(t.length!==s.length)return{success:!1,error:e("runtime-error",`Expected tuple of length ${s.length}, received length ${t.length}`)};const r=[];for(let n=0;s.length>n;n++){const a=s[n].validate(t[n]);if(!a.success)return{success:!1,error:e("runtime-error",a.error.message,a.error.path?`${n}.${a.error.path}`:""+n)};r.push(a.data)}return{success:!0,data:r}}})}(s),union:s=>function(s){return t?n():r({validate:t=>{const r=[];for(const e of s){const n=e.validate(t);if(n.success)return n;r.push(n.error.message)}return{success:!1,error:e("type-mismatch","Value does not match any union type")}}})}(s),literal:s=>{return a=s,t?n():r({validate:t=>t===a?{success:!0,data:t}:{success:!1,error:e("runtime-error",`Expected ${JSON.stringify(a)}, received ${JSON.stringify(t)}`)}});var a},custom:(e,t)=>a(e,t),record:(s,a)=>function(s,a){return t?n():r({validate:t=>{if("object"!=typeof t||null===t||Array.isArray(t))return{success:!1,error:e("type-mismatch","Expected record object, received "+typeof t)};const r=t,n={};for(const[t,o]of Object.entries(r)){const r=s.validate(t);if(!r.success)return{success:!1,error:e("invalid-argument",`Invalid key "${t}": ${r.error.message}`,t)};const c=a.validate(o);if(!c.success)return{success:!1,error:e("runtime-error",c.error.message,c.error.path?`${t}.${c.error.path}`:t)};n[t]=c.data}return{success:!0,data:n}}})}(s,a),enum:s=>function(s){return t?n():r({validate:t=>"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t?{success:!1,error:e("type-mismatch","Expected string, received "+typeof t)}:s.includes(t)?{success:!0,data:t}:{success:!1,error:e("runtime-error",`Expected one of [${s.join(", ")}], received "${t}"`)}})}(s),function:()=>a(e=>"function"==typeof e,"Expected function"),unknown:()=>n(),any:()=>n(),null:()=>a(e=>null===e,"Expected null"),undefined:()=>a(e=>void 0===e,"Expected undefined"),instanceOf:e=>a(t=>t instanceof e,"Expected instance of "+e.name),instanceof:e=>a(t=>t instanceof e,"Expected instance of "+e.name)},c=o;o.object({socket:c.object({url:o.string().url(),protocols:o.array(o.string()).default([]),reconnect:c.object({enabled:o.boolean().default(!0),maxAttempts:o.number().default(5),delay:o.number().default(1e3),backoff:c.enum(["linear","exponential"]).default("exponential"),maxDelay:o.number().default(3e4)}).default({}),heartbeat:o.object({enabled:o.boolean().default(!1),interval:o.number().default(3e4),message:o.string().default("ping"),timeout:o.number().default(5e3)}).default({}),compression:o.boolean().default(!1),binaryType:c.enum(["blob","arraybuffer"]).default("blob")}),eventHandlers:o.array(o.object({event:c.enum(["open","close","error","message"]),filter:o.string().optional(),commands:o.array(o.any()),options:c.object({once:o.boolean().default(!1),debounce:o.number().optional(),throttle:o.number().optional()}).default({})})).default([]),messageHandling:o.object({format:c.enum(["json","text","binary"]).default("json"),validation:c.object({enabled:o.boolean().default(!0),schema:o.any().optional()}).default({}),queue:o.object({enabled:o.boolean().default(!0),maxSize:o.number().default(100),persistence:o.boolean().default(!1)}).default({})}).default({}),context:o.object({variables:c.record(o.string(),o.any()).default({}),me:o.any().optional(),it:o.any().optional(),target:o.any().optional()}).default({}),options:o.object({enableAutoConnect:o.boolean().default(!0),enableMessageQueue:o.boolean().default(!0),enableErrorHandling:o.boolean().default(!0),maxConnections:o.number().default(5),connectionTimeout:o.number().default(1e4)}).default({}),environment:c.enum(["frontend","backend","universal"]).default("frontend"),debug:o.boolean().default(!1)}),o.object({contextId:o.string(),timestamp:o.number(),category:o.literal("Frontend"),capabilities:o.array(o.string()),state:c.enum(["ready","connecting","connected","disconnecting","disconnected","error"]),connection:c.object({connect:o.any(),disconnect:o.any(),reconnect:o.any(),isConnected:o.any(),getState:o.any(),getConnectionInfo:o.any()}),messaging:o.object({send:o.any(),sendJSON:o.any(),sendBinary:o.any(),subscribe:o.any(),unsubscribe:o.any(),getMessageHistory:o.any()}),events:o.object({addHandler:o.any(),removeHandler:o.any(),emit:o.any(),getHandlers:o.any()}),queue:o.object({add:o.any(),process:o.any(),clear:o.any(),getSize:o.any(),getPending:o.any()}),errors:o.object({handle:o.any(),getErrorHistory:o.any(),clearErrors:o.any(),setErrorHandler:o.any()})});var i=Object.freeze({__proto__:null});export{i as s,o as v,c as z};
|
|
2
|
+
//# sourceMappingURL=feature-sockets-3PFuvCVY.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{v as e,z as a}from"./feature-sockets-3PFuvCVY.js";e.object({worker:a.object({script:e.string().min(1),type:a.enum(["module","classic"]).default("classic"),name:e.string().optional(),credentials:a.enum(["omit","same-origin","include"]).default("same-origin"),inline:e.boolean().default(!1)}),messaging:e.object({format:a.enum(["json","text","binary"]).default("json"),serialization:a.enum(["structured-clone","json"]).default("structured-clone"),transferables:e.array(e.string()).default([]),validation:a.object({enabled:e.boolean().default(!0),schema:e.any().optional()}).default({}),queue:e.object({enabled:e.boolean().default(!0),maxSize:e.number().min(0).default(100),persistence:e.boolean().default(!1)}).default({})}).default({}),eventHandlers:e.array(e.object({event:a.enum(["message","error","messageerror"]),commands:e.array(e.any()).min(1),filter:e.string().optional(),options:a.object({throttle:e.number().optional(),debounce:e.number().optional()}).optional()})).default([]),context:e.object({variables:a.record(e.string(),e.any()).default({}),me:e.any().optional(),it:e.any().optional(),target:e.any().optional()}).default({}),options:e.object({enableAutoStart:e.boolean().default(!0),enableMessageQueue:e.boolean().default(!0),enableErrorHandling:e.boolean().default(!0),maxWorkers:e.number().default(4),workerTimeout:e.number().default(3e4),terminationTimeout:e.number().default(5e3)}).default({}),environment:a.enum(["frontend","backend","universal"]).default("frontend"),debug:e.boolean().default(!1)}),e.object({contextId:e.string(),timestamp:e.number(),category:e.literal("Frontend"),capabilities:e.array(e.string()),state:a.enum(["ready","starting","running","terminating","terminated","error"]),workers:a.object({create:e.any(),terminate:e.any(),restart:e.any(),getWorker:e.any(),listWorkers:e.any(),getWorkerInfo:e.any()}),messaging:e.object({send:e.any(),sendJSON:e.any(),sendBinary:e.any(),broadcast:e.any(),getMessageHistory:e.any(),subscribe:e.any(),unsubscribe:e.any()}),events:e.object({addHandler:e.any(),removeHandler:e.any(),getHandlers:e.any(),emit:e.any()}),queue:e.object({add:e.any(),process:e.any(),getSize:e.any(),getPending:e.any(),clear:e.any()}),errors:e.object({handle:e.any(),getErrorHistory:e.any(),clearErrors:e.any(),setErrorHandler:e.any()})});
|
|
2
|
+
//# sourceMappingURL=feature-webworker-DTm_eh-E.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
+
import type { ASTNode, ExpressionNode } from '../../types/base-types';
|
|
3
|
+
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
4
|
+
import { type DecoratedCommand, type CommandMetadata } from '../decorators';
|
|
5
|
+
export interface AsyncCommandInput {
|
|
6
|
+
commands: any[];
|
|
7
|
+
}
|
|
8
|
+
export interface AsyncCommandOutput {
|
|
9
|
+
commandCount: number;
|
|
10
|
+
results: any[];
|
|
11
|
+
executed: boolean;
|
|
12
|
+
duration: number;
|
|
13
|
+
}
|
|
14
|
+
export declare class AsyncCommand implements DecoratedCommand {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly metadata: CommandMetadata;
|
|
17
|
+
parseInput(raw: {
|
|
18
|
+
args: ASTNode[];
|
|
19
|
+
modifiers: Record<string, ExpressionNode>;
|
|
20
|
+
}, _evaluator: ExpressionEvaluator, _context: ExecutionContext): Promise<AsyncCommandInput>;
|
|
21
|
+
execute(input: AsyncCommandInput, context: TypedExecutionContext): Promise<AsyncCommandOutput>;
|
|
22
|
+
private executeCommandsAsync;
|
|
23
|
+
private executeCommand;
|
|
24
|
+
private getCommandName;
|
|
25
|
+
}
|
|
26
|
+
export declare const createAsyncCommand: () => AsyncCommand;
|
|
27
|
+
export default AsyncCommand;
|
|
28
|
+
//# sourceMappingURL=async.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
+
import type { ASTNode, ExpressionNode } from '../../types/base-types';
|
|
3
|
+
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
4
|
+
import { type DecoratedCommand, type CommandMetadata } from '../decorators';
|
|
5
|
+
export interface JsCommandInput {
|
|
6
|
+
code: string;
|
|
7
|
+
parameters?: string[];
|
|
8
|
+
}
|
|
9
|
+
export interface JsCommandOutput {
|
|
10
|
+
result: any;
|
|
11
|
+
executed: boolean;
|
|
12
|
+
codeLength: number;
|
|
13
|
+
parameters?: string[];
|
|
14
|
+
preserveArrayResult: true;
|
|
15
|
+
}
|
|
16
|
+
export declare class JsCommand implements DecoratedCommand {
|
|
17
|
+
readonly name: string;
|
|
18
|
+
readonly metadata: CommandMetadata;
|
|
19
|
+
parseInput(raw: {
|
|
20
|
+
args: ASTNode[];
|
|
21
|
+
modifiers: Record<string, ExpressionNode>;
|
|
22
|
+
}, _evaluator: ExpressionEvaluator, _context: ExecutionContext): Promise<JsCommandInput>;
|
|
23
|
+
execute(input: JsCommandInput, context: TypedExecutionContext): Promise<JsCommandOutput>;
|
|
24
|
+
private createExecutionContext;
|
|
25
|
+
}
|
|
26
|
+
export declare const createJsCommand: () => JsCommand;
|
|
27
|
+
export default JsCommand;
|
|
28
|
+
//# sourceMappingURL=js.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
+
import type { ASTNode, ExpressionNode } from '../../types/base-types';
|
|
3
|
+
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
4
|
+
import { type DecoratedCommand, type CommandMetadata } from '../decorators';
|
|
5
|
+
export interface MeasureCommandInput {
|
|
6
|
+
target?: string | HTMLElement;
|
|
7
|
+
property?: string;
|
|
8
|
+
variable?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface MeasureCommandOutput {
|
|
11
|
+
result: number;
|
|
12
|
+
wasAsync: boolean;
|
|
13
|
+
element: HTMLElement;
|
|
14
|
+
property: string;
|
|
15
|
+
value: number;
|
|
16
|
+
unit: string;
|
|
17
|
+
stored?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare class MeasureCommand implements DecoratedCommand {
|
|
20
|
+
readonly name: string;
|
|
21
|
+
readonly metadata: CommandMetadata;
|
|
22
|
+
parseInput(raw: {
|
|
23
|
+
args: ASTNode[];
|
|
24
|
+
modifiers: Record<string, ExpressionNode>;
|
|
25
|
+
}, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<MeasureCommandInput>;
|
|
26
|
+
execute(input: MeasureCommandInput, context: TypedExecutionContext): Promise<MeasureCommandOutput>;
|
|
27
|
+
private getMeasurement;
|
|
28
|
+
}
|
|
29
|
+
export declare const createMeasureCommand: () => MeasureCommand;
|
|
30
|
+
export default MeasureCommand;
|
|
31
|
+
//# sourceMappingURL=measure.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
+
import type { ASTNode, ExpressionNode } from '../../types/base-types';
|
|
3
|
+
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
4
|
+
import { type DecoratedCommand, type CommandMetadata } from '../decorators';
|
|
5
|
+
export interface SettleCommandInput {
|
|
6
|
+
target?: string | HTMLElement;
|
|
7
|
+
timeout?: number | string;
|
|
8
|
+
}
|
|
9
|
+
export interface SettleCommandOutput {
|
|
10
|
+
element: HTMLElement;
|
|
11
|
+
settled: boolean;
|
|
12
|
+
timeout: number;
|
|
13
|
+
duration: number;
|
|
14
|
+
}
|
|
15
|
+
export declare class SettleCommand implements DecoratedCommand {
|
|
16
|
+
readonly name: string;
|
|
17
|
+
readonly metadata: CommandMetadata;
|
|
18
|
+
parseInput(raw: {
|
|
19
|
+
args: ASTNode[];
|
|
20
|
+
modifiers: Record<string, ExpressionNode>;
|
|
21
|
+
}, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<SettleCommandInput>;
|
|
22
|
+
execute(input: SettleCommandInput, context: TypedExecutionContext): Promise<SettleCommandOutput>;
|
|
23
|
+
}
|
|
24
|
+
export declare const createSettleCommand: () => SettleCommand;
|
|
25
|
+
export default SettleCommand;
|
|
26
|
+
//# sourceMappingURL=settle.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
+
import type { ASTNode, ExpressionNode } from '../../types/base-types';
|
|
3
|
+
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
4
|
+
import { type DecoratedCommand, type CommandMetadata } from '../decorators';
|
|
5
|
+
export interface TakeCommandInput {
|
|
6
|
+
property: string;
|
|
7
|
+
source: unknown;
|
|
8
|
+
target?: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface TakeCommandOutput {
|
|
11
|
+
targetElement: HTMLElement;
|
|
12
|
+
property: string;
|
|
13
|
+
value: unknown;
|
|
14
|
+
}
|
|
15
|
+
export declare class TakeCommand implements DecoratedCommand {
|
|
16
|
+
readonly name: string;
|
|
17
|
+
readonly metadata: CommandMetadata;
|
|
18
|
+
parseInput(raw: {
|
|
19
|
+
args: ASTNode[];
|
|
20
|
+
modifiers: Record<string, ExpressionNode>;
|
|
21
|
+
}, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<TakeCommandInput>;
|
|
22
|
+
execute(input: TakeCommandInput, context: TypedExecutionContext): Promise<TakeCommandOutput>;
|
|
23
|
+
private takeProperty;
|
|
24
|
+
private putProperty;
|
|
25
|
+
}
|
|
26
|
+
export declare const createTakeCommand: () => TakeCommand;
|
|
27
|
+
export default TakeCommand;
|
|
28
|
+
//# sourceMappingURL=take.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
+
import type { ASTNode, ExpressionNode } from '../../types/base-types';
|
|
3
|
+
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
4
|
+
import { type DecoratedCommand, type CommandMetadata } from '../decorators';
|
|
5
|
+
export interface TransitionCommandInput {
|
|
6
|
+
target?: string | HTMLElement;
|
|
7
|
+
property: string;
|
|
8
|
+
value: string | number;
|
|
9
|
+
duration?: number | string;
|
|
10
|
+
timingFunction?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface TransitionCommandOutput {
|
|
13
|
+
element: HTMLElement;
|
|
14
|
+
property: string;
|
|
15
|
+
fromValue: string;
|
|
16
|
+
toValue: string;
|
|
17
|
+
duration: number;
|
|
18
|
+
completed: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare class TransitionCommand implements DecoratedCommand {
|
|
21
|
+
readonly name: string;
|
|
22
|
+
readonly metadata: CommandMetadata;
|
|
23
|
+
parseInput(raw: {
|
|
24
|
+
args: ASTNode[];
|
|
25
|
+
modifiers: Record<string, ExpressionNode>;
|
|
26
|
+
}, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<TransitionCommandInput>;
|
|
27
|
+
execute(input: TransitionCommandInput, context: TypedExecutionContext): Promise<TransitionCommandOutput>;
|
|
28
|
+
}
|
|
29
|
+
export declare const createTransitionCommand: () => TransitionCommand;
|
|
30
|
+
export default TransitionCommand;
|
|
31
|
+
//# sourceMappingURL=transition.d.ts.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
+
import type { ASTNode, ExpressionNode } from '../../types/base-types';
|
|
3
|
+
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
4
|
+
import { type DecoratedCommand, type CommandMetadata } from '../decorators';
|
|
5
|
+
export type FetchResponseType = 'text' | 'json' | 'html' | 'response' | 'blob' | 'arrayBuffer';
|
|
6
|
+
export interface FetchResponseTypeConfig {
|
|
7
|
+
accept?: string;
|
|
8
|
+
handler: (response: Response, context: TypedExecutionContext) => Promise<unknown>;
|
|
9
|
+
}
|
|
10
|
+
export declare function registerFetchResponseType(name: string, config: FetchResponseTypeConfig): void;
|
|
11
|
+
export declare function getCustomResponseType(name: string): FetchResponseTypeConfig | undefined;
|
|
12
|
+
export interface FetchCommandInput {
|
|
13
|
+
url: string;
|
|
14
|
+
responseType: string;
|
|
15
|
+
options: RequestInit;
|
|
16
|
+
}
|
|
17
|
+
export interface FetchCommandOutput {
|
|
18
|
+
status: number;
|
|
19
|
+
statusText: string;
|
|
20
|
+
headers: Headers;
|
|
21
|
+
data: any;
|
|
22
|
+
url: string;
|
|
23
|
+
duration: number;
|
|
24
|
+
}
|
|
25
|
+
export declare class FetchCommand implements DecoratedCommand {
|
|
26
|
+
readonly name: string;
|
|
27
|
+
readonly metadata: CommandMetadata;
|
|
28
|
+
parseInput(raw: {
|
|
29
|
+
args: ASTNode[];
|
|
30
|
+
modifiers: Record<string, ExpressionNode>;
|
|
31
|
+
}, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<FetchCommandInput>;
|
|
32
|
+
execute(input: FetchCommandInput, context: TypedExecutionContext): Promise<FetchCommandOutput>;
|
|
33
|
+
private parseURL;
|
|
34
|
+
private parseResponseType;
|
|
35
|
+
private parseRequestOptions;
|
|
36
|
+
private parseHeaders;
|
|
37
|
+
private parseBody;
|
|
38
|
+
private handleResponse;
|
|
39
|
+
private parseHTML;
|
|
40
|
+
private dispatchEvent;
|
|
41
|
+
}
|
|
42
|
+
export declare const createFetchCommand: () => FetchCommand;
|
|
43
|
+
export default FetchCommand;
|
|
44
|
+
//# sourceMappingURL=fetch.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
+
import type { ASTNode, ExpressionNode } from '../../types/base-types';
|
|
3
|
+
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
4
|
+
import { type DecoratedCommand, type CommandMetadata } from '../decorators';
|
|
5
|
+
export interface WaitTimeInput {
|
|
6
|
+
type: 'time';
|
|
7
|
+
milliseconds: number;
|
|
8
|
+
}
|
|
9
|
+
export interface WaitEventInput {
|
|
10
|
+
type: 'event';
|
|
11
|
+
eventName: string;
|
|
12
|
+
target?: EventTarget;
|
|
13
|
+
destructure?: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface WaitRaceInput {
|
|
16
|
+
type: 'race';
|
|
17
|
+
conditions: (WaitTimeInput | WaitEventInput)[];
|
|
18
|
+
}
|
|
19
|
+
export type WaitCommandInput = WaitTimeInput | WaitEventInput | WaitRaceInput;
|
|
20
|
+
export interface WaitCommandOutput {
|
|
21
|
+
type: 'time' | 'event';
|
|
22
|
+
result: number | Event;
|
|
23
|
+
duration: number;
|
|
24
|
+
}
|
|
25
|
+
export declare class WaitCommand implements DecoratedCommand {
|
|
26
|
+
readonly name: string;
|
|
27
|
+
readonly metadata: CommandMetadata;
|
|
28
|
+
parseInput(raw: {
|
|
29
|
+
args: ASTNode[];
|
|
30
|
+
modifiers: Record<string, ExpressionNode>;
|
|
31
|
+
}, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<WaitCommandInput>;
|
|
32
|
+
execute(input: WaitCommandInput, context: TypedExecutionContext): Promise<WaitCommandOutput>;
|
|
33
|
+
private parseTimeWait;
|
|
34
|
+
private parseEventWait;
|
|
35
|
+
private parseEventArrayWait;
|
|
36
|
+
private parseRaceCondition;
|
|
37
|
+
private executeRace;
|
|
38
|
+
}
|
|
39
|
+
export declare const createWaitCommand: () => WaitCommand;
|
|
40
|
+
export default WaitCommand;
|
|
41
|
+
//# sourceMappingURL=wait.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
+
import type { ASTNode, ExpressionNode } from '../../types/base-types';
|
|
3
|
+
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
4
|
+
export interface InstallCommandInput {
|
|
5
|
+
behaviorName: string;
|
|
6
|
+
parameters?: Record<string, unknown>;
|
|
7
|
+
target?: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface InstallCommandOutput {
|
|
10
|
+
success: boolean;
|
|
11
|
+
behaviorName: string;
|
|
12
|
+
installedCount: number;
|
|
13
|
+
instances: unknown[];
|
|
14
|
+
}
|
|
15
|
+
export declare class InstallCommand {
|
|
16
|
+
readonly name = "install";
|
|
17
|
+
static readonly metadata: {
|
|
18
|
+
readonly description: "Install a behavior on an element with optional parameters";
|
|
19
|
+
readonly syntax: readonly ["install <BehaviorName>", "install <BehaviorName> on <element>", "install <BehaviorName>(param: value)", "install <BehaviorName>(param: value) on <element>"];
|
|
20
|
+
readonly examples: readonly ["install Removable", "install Draggable on #box", "install Tooltip(text: \"Help\", position: \"top\")", "install Sortable(axis: \"y\") on .list", "install MyBehavior(foo: 42) on the first <div/>"];
|
|
21
|
+
readonly category: "behaviors";
|
|
22
|
+
readonly sideEffects: readonly ["behavior-installation", "element-modification"];
|
|
23
|
+
};
|
|
24
|
+
get metadata(): {
|
|
25
|
+
readonly description: "Install a behavior on an element with optional parameters";
|
|
26
|
+
readonly syntax: readonly ["install <BehaviorName>", "install <BehaviorName> on <element>", "install <BehaviorName>(param: value)", "install <BehaviorName>(param: value) on <element>"];
|
|
27
|
+
readonly examples: readonly ["install Removable", "install Draggable on #box", "install Tooltip(text: \"Help\", position: \"top\")", "install Sortable(axis: \"y\") on .list", "install MyBehavior(foo: 42) on the first <div/>"];
|
|
28
|
+
readonly category: "behaviors";
|
|
29
|
+
readonly sideEffects: readonly ["behavior-installation", "element-modification"];
|
|
30
|
+
};
|
|
31
|
+
parseInput(raw: {
|
|
32
|
+
args: ASTNode[];
|
|
33
|
+
modifiers: Record<string, ExpressionNode>;
|
|
34
|
+
}, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<InstallCommandInput>;
|
|
35
|
+
execute(input: InstallCommandInput, context: TypedExecutionContext): Promise<InstallCommandOutput>;
|
|
36
|
+
private resolveTarget;
|
|
37
|
+
private behaviorExists;
|
|
38
|
+
private installBehavior;
|
|
39
|
+
}
|
|
40
|
+
export declare function createInstallCommand(): InstallCommand;
|
|
41
|
+
//# sourceMappingURL=install.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
+
import type { ASTNode, ExpressionNode } from '../../types/base-types';
|
|
3
|
+
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
4
|
+
import { type DecoratedCommand, type CommandMetadata } from '../decorators';
|
|
5
|
+
export interface AppendCommandInput {
|
|
6
|
+
content: unknown;
|
|
7
|
+
target?: string | HTMLElement | unknown[];
|
|
8
|
+
}
|
|
9
|
+
export interface AppendCommandOutput {
|
|
10
|
+
result: unknown;
|
|
11
|
+
targetType: 'result' | 'variable' | 'array' | 'element' | 'string';
|
|
12
|
+
target?: string | HTMLElement;
|
|
13
|
+
}
|
|
14
|
+
export declare class AppendCommand implements DecoratedCommand {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly metadata: CommandMetadata;
|
|
17
|
+
parseInput(raw: {
|
|
18
|
+
args: ASTNode[];
|
|
19
|
+
modifiers: Record<string, ExpressionNode>;
|
|
20
|
+
}, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<AppendCommandInput>;
|
|
21
|
+
execute(input: AppendCommandInput, context: TypedExecutionContext): Promise<AppendCommandOutput>;
|
|
22
|
+
private resolveDOMElement;
|
|
23
|
+
private resolveContextRef;
|
|
24
|
+
}
|
|
25
|
+
export declare const createAppendCommand: () => AppendCommand;
|
|
26
|
+
export default AppendCommand;
|
|
27
|
+
//# sourceMappingURL=append.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ControlFlowSignalBase } from './signal-base';
|
|
2
|
+
export interface BreakCommandInput {
|
|
3
|
+
}
|
|
4
|
+
export interface BreakCommandOutput {
|
|
5
|
+
broken: true;
|
|
6
|
+
timestamp: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class BreakCommand extends ControlFlowSignalBase {
|
|
9
|
+
protected readonly signalType: "break";
|
|
10
|
+
protected readonly errorMessage = "BREAK_LOOP";
|
|
11
|
+
protected readonly errorFlag = "isBreak";
|
|
12
|
+
}
|
|
13
|
+
export declare const createBreakCommand: () => BreakCommand;
|
|
14
|
+
export default BreakCommand;
|
|
15
|
+
//# sourceMappingURL=break.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ControlFlowSignalBase } from './signal-base';
|
|
2
|
+
export interface ContinueCommandInput {
|
|
3
|
+
}
|
|
4
|
+
export interface ContinueCommandOutput {
|
|
5
|
+
continued: true;
|
|
6
|
+
timestamp: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class ContinueCommand extends ControlFlowSignalBase {
|
|
9
|
+
protected readonly signalType: "continue";
|
|
10
|
+
protected readonly errorMessage = "CONTINUE_LOOP";
|
|
11
|
+
protected readonly errorFlag = "isContinue";
|
|
12
|
+
}
|
|
13
|
+
export declare const createContinueCommand: () => ContinueCommand;
|
|
14
|
+
export default ContinueCommand;
|
|
15
|
+
//# sourceMappingURL=continue.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ControlFlowSignalBase } from './signal-base';
|
|
2
|
+
export interface ExitCommandInput {
|
|
3
|
+
}
|
|
4
|
+
export interface ExitCommandOutput {
|
|
5
|
+
exited: boolean;
|
|
6
|
+
timestamp: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class ExitCommand extends ControlFlowSignalBase {
|
|
9
|
+
protected readonly signalType: "exit";
|
|
10
|
+
protected readonly errorMessage = "EXIT_COMMAND";
|
|
11
|
+
protected readonly errorFlag = "isExit";
|
|
12
|
+
}
|
|
13
|
+
export declare const createExitCommand: () => ExitCommand;
|
|
14
|
+
export default ExitCommand;
|
|
15
|
+
//# sourceMappingURL=exit.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
+
import type { ASTNode, ExpressionNode } from '../../types/base-types';
|
|
3
|
+
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
4
|
+
import { type DecoratedCommand, type CommandMetadata } from '../decorators';
|
|
5
|
+
export interface HaltCommandInput {
|
|
6
|
+
target?: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface HaltCommandOutput {
|
|
9
|
+
halted: true;
|
|
10
|
+
timestamp: number;
|
|
11
|
+
eventHalted?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare class HaltCommand implements DecoratedCommand {
|
|
14
|
+
readonly name: string;
|
|
15
|
+
readonly metadata: CommandMetadata;
|
|
16
|
+
parseInput(raw: {
|
|
17
|
+
args: ASTNode[];
|
|
18
|
+
modifiers: Record<string, ExpressionNode>;
|
|
19
|
+
}, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<HaltCommandInput>;
|
|
20
|
+
execute(input: HaltCommandInput, context: TypedExecutionContext): Promise<HaltCommandOutput>;
|
|
21
|
+
private isEvent;
|
|
22
|
+
}
|
|
23
|
+
export declare const createHaltCommand: () => HaltCommand;
|
|
24
|
+
export default HaltCommand;
|
|
25
|
+
//# sourceMappingURL=halt.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
+
import type { ASTNode, ExpressionNode } from '../../types/base-types';
|
|
3
|
+
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
4
|
+
import { type DecoratedCommand, type CommandMetadata } from '../decorators';
|
|
5
|
+
export type ConditionalMode = 'if' | 'unless';
|
|
6
|
+
export interface ConditionalCommandInput {
|
|
7
|
+
mode: ConditionalMode;
|
|
8
|
+
condition: unknown;
|
|
9
|
+
thenCommands: ASTNode | ASTNode[];
|
|
10
|
+
elseCommands?: ASTNode | ASTNode[];
|
|
11
|
+
}
|
|
12
|
+
export interface IfCommandInput extends ConditionalCommandInput {
|
|
13
|
+
}
|
|
14
|
+
export interface UnlessCommandInput {
|
|
15
|
+
condition: unknown;
|
|
16
|
+
commands: ASTNode[];
|
|
17
|
+
}
|
|
18
|
+
export interface ConditionalCommandOutput {
|
|
19
|
+
mode: ConditionalMode;
|
|
20
|
+
conditionResult: boolean;
|
|
21
|
+
executedBranch: 'then' | 'else' | 'none';
|
|
22
|
+
result: unknown;
|
|
23
|
+
}
|
|
24
|
+
export interface IfCommandOutput extends ConditionalCommandOutput {
|
|
25
|
+
}
|
|
26
|
+
export declare class ConditionalCommand implements DecoratedCommand {
|
|
27
|
+
readonly name: string;
|
|
28
|
+
readonly metadata: CommandMetadata;
|
|
29
|
+
parseInput(raw: {
|
|
30
|
+
args: ASTNode[];
|
|
31
|
+
modifiers: Record<string, ExpressionNode>;
|
|
32
|
+
commandName?: string;
|
|
33
|
+
}, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<ConditionalCommandInput>;
|
|
34
|
+
execute(input: ConditionalCommandInput, context: TypedExecutionContext): Promise<ConditionalCommandOutput>;
|
|
35
|
+
private executeCommandsOrBlock;
|
|
36
|
+
private executeBlock;
|
|
37
|
+
private executeCommands;
|
|
38
|
+
}
|
|
39
|
+
export declare const createConditionalCommand: () => ConditionalCommand;
|
|
40
|
+
export { ConditionalCommand as IfCommand };
|
|
41
|
+
export declare const createIfCommand: () => ConditionalCommand;
|
|
42
|
+
export { ConditionalCommand as UnlessCommand };
|
|
43
|
+
export declare const createUnlessCommand: () => ConditionalCommand;
|
|
44
|
+
export default ConditionalCommand;
|
|
45
|
+
//# sourceMappingURL=if.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
+
import type { ASTNode, ExpressionNode } from '../../types/base-types';
|
|
3
|
+
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
4
|
+
import { type DecoratedCommand, type CommandMetadata } from '../decorators';
|
|
5
|
+
export interface RepeatCommandInput {
|
|
6
|
+
type: 'for' | 'times' | 'while' | 'until' | 'until-event' | 'forever';
|
|
7
|
+
variable?: string;
|
|
8
|
+
collection?: unknown[];
|
|
9
|
+
condition?: unknown;
|
|
10
|
+
count?: number;
|
|
11
|
+
indexVariable?: string;
|
|
12
|
+
commands?: unknown;
|
|
13
|
+
eventName?: string;
|
|
14
|
+
eventTarget?: EventTarget;
|
|
15
|
+
}
|
|
16
|
+
export interface RepeatCommandOutput {
|
|
17
|
+
type: string;
|
|
18
|
+
iterations: number;
|
|
19
|
+
completed: boolean;
|
|
20
|
+
lastResult?: unknown;
|
|
21
|
+
interrupted?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare class RepeatCommand implements DecoratedCommand {
|
|
24
|
+
readonly name: string;
|
|
25
|
+
readonly metadata: CommandMetadata;
|
|
26
|
+
parseInput(raw: {
|
|
27
|
+
args: ASTNode[];
|
|
28
|
+
modifiers: Record<string, ExpressionNode>;
|
|
29
|
+
}, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<RepeatCommandInput>;
|
|
30
|
+
execute(input: RepeatCommandInput, context: TypedExecutionContext): Promise<RepeatCommandOutput>;
|
|
31
|
+
private executeCommands;
|
|
32
|
+
}
|
|
33
|
+
export declare const createRepeatCommand: () => RepeatCommand;
|
|
34
|
+
export default RepeatCommand;
|
|
35
|
+
//# sourceMappingURL=repeat.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
+
import type { ASTNode, ExpressionNode } from '../../types/base-types';
|
|
3
|
+
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
4
|
+
import { type DecoratedCommand, type CommandMetadata } from '../decorators';
|
|
5
|
+
export interface ReturnCommandInput {
|
|
6
|
+
value?: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface ReturnCommandOutput {
|
|
9
|
+
returnValue: unknown;
|
|
10
|
+
timestamp: number;
|
|
11
|
+
}
|
|
12
|
+
export declare class ReturnCommand implements DecoratedCommand {
|
|
13
|
+
readonly name: string;
|
|
14
|
+
readonly metadata: CommandMetadata;
|
|
15
|
+
parseInput(raw: {
|
|
16
|
+
args: ASTNode[];
|
|
17
|
+
modifiers: Record<string, ExpressionNode>;
|
|
18
|
+
}, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<ReturnCommandInput>;
|
|
19
|
+
execute(input: ReturnCommandInput, context: TypedExecutionContext): Promise<ReturnCommandOutput>;
|
|
20
|
+
}
|
|
21
|
+
export declare const createReturnCommand: () => ReturnCommand;
|
|
22
|
+
export default ReturnCommand;
|
|
23
|
+
//# sourceMappingURL=return.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
+
import type { ASTNode, ExpressionNode } from '../../types/base-types';
|
|
3
|
+
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
4
|
+
import type { DecoratedCommand, CommandMetadata } from '../decorators';
|
|
5
|
+
export type SignalType = 'break' | 'continue' | 'exit';
|
|
6
|
+
export interface SignalCommandInput {
|
|
7
|
+
signalType: SignalType;
|
|
8
|
+
}
|
|
9
|
+
export interface SignalCommandOutput {
|
|
10
|
+
signalType: SignalType;
|
|
11
|
+
timestamp: number;
|
|
12
|
+
}
|
|
13
|
+
export declare abstract class ControlFlowSignalBase implements DecoratedCommand {
|
|
14
|
+
readonly name: string;
|
|
15
|
+
readonly metadata: CommandMetadata;
|
|
16
|
+
protected abstract readonly signalType: SignalType;
|
|
17
|
+
protected abstract readonly errorMessage: string;
|
|
18
|
+
protected abstract readonly errorFlag: string;
|
|
19
|
+
parseInput(_raw: {
|
|
20
|
+
args: ASTNode[];
|
|
21
|
+
modifiers: Record<string, ExpressionNode>;
|
|
22
|
+
}, _evaluator: ExpressionEvaluator, _context: ExecutionContext): Promise<SignalCommandInput>;
|
|
23
|
+
execute(_input: SignalCommandInput, _context: TypedExecutionContext): Promise<SignalCommandOutput>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=signal-base.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
+
import type { ASTNode, ExpressionNode } from '../../types/base-types';
|
|
3
|
+
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
4
|
+
import { type DecoratedCommand, type CommandMetadata } from '../decorators';
|
|
5
|
+
export interface ThrowCommandInput {
|
|
6
|
+
message: string | Error | unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface ThrowCommandOutput {
|
|
9
|
+
error: Error;
|
|
10
|
+
}
|
|
11
|
+
export declare class ThrowCommand implements DecoratedCommand {
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly metadata: CommandMetadata;
|
|
14
|
+
parseInput(raw: {
|
|
15
|
+
args: ASTNode[];
|
|
16
|
+
modifiers: Record<string, ExpressionNode>;
|
|
17
|
+
}, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<ThrowCommandInput>;
|
|
18
|
+
execute(input: ThrowCommandInput, _context: TypedExecutionContext): Promise<ThrowCommandOutput>;
|
|
19
|
+
}
|
|
20
|
+
export declare const createThrowCommand: () => ThrowCommand;
|
|
21
|
+
export default ThrowCommand;
|
|
22
|
+
//# sourceMappingURL=throw.d.ts.map
|