@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,54 @@
|
|
|
1
|
+
import type { TypedExpressionContext, EvaluationType, ValidationResult, EvaluationResult } from '../../../types/base-types';
|
|
2
|
+
import type { TypedExpressionImplementation, ExpressionMetadata, ExpressionCategory } from '../../../types/expression-types';
|
|
3
|
+
import { BaseExpressionImpl } from '../../base-expression';
|
|
4
|
+
type BinaryLogicalInput = any;
|
|
5
|
+
type UnaryLogicalInput = any;
|
|
6
|
+
export declare class AndExpression extends BaseExpressionImpl<BinaryLogicalInput, boolean> implements TypedExpressionImplementation<BinaryLogicalInput, boolean> {
|
|
7
|
+
readonly name = "and";
|
|
8
|
+
readonly category: ExpressionCategory;
|
|
9
|
+
readonly syntax = "left and right";
|
|
10
|
+
readonly description = "Logical AND operation with comprehensive boolean type coercion";
|
|
11
|
+
readonly inputSchema: import("../../../validation/lightweight-validators").RuntimeValidator<{
|
|
12
|
+
[x: string]: unknown;
|
|
13
|
+
}>;
|
|
14
|
+
readonly outputType: EvaluationType;
|
|
15
|
+
readonly metadata: ExpressionMetadata;
|
|
16
|
+
evaluate(context: TypedExpressionContext, input: BinaryLogicalInput): Promise<EvaluationResult<boolean>>;
|
|
17
|
+
validate(input: unknown): ValidationResult;
|
|
18
|
+
}
|
|
19
|
+
export declare class OrExpression extends BaseExpressionImpl<BinaryLogicalInput, boolean> implements TypedExpressionImplementation<BinaryLogicalInput, boolean> {
|
|
20
|
+
readonly name = "or";
|
|
21
|
+
readonly category: ExpressionCategory;
|
|
22
|
+
readonly syntax = "left or right";
|
|
23
|
+
readonly description = "Logical OR operation with comprehensive boolean type coercion";
|
|
24
|
+
readonly inputSchema: import("../../../validation/lightweight-validators").RuntimeValidator<{
|
|
25
|
+
[x: string]: unknown;
|
|
26
|
+
}>;
|
|
27
|
+
readonly outputType: EvaluationType;
|
|
28
|
+
readonly metadata: ExpressionMetadata;
|
|
29
|
+
evaluate(context: TypedExpressionContext, input: BinaryLogicalInput): Promise<EvaluationResult<boolean>>;
|
|
30
|
+
validate(input: unknown): ValidationResult;
|
|
31
|
+
}
|
|
32
|
+
export declare class NotExpression extends BaseExpressionImpl<UnaryLogicalInput, boolean> implements TypedExpressionImplementation<UnaryLogicalInput, boolean> {
|
|
33
|
+
readonly name = "not";
|
|
34
|
+
readonly category: ExpressionCategory;
|
|
35
|
+
readonly syntax = "not operand";
|
|
36
|
+
readonly description = "Logical NOT operation with comprehensive boolean type coercion";
|
|
37
|
+
readonly inputSchema: import("../../../validation/lightweight-validators").RuntimeValidator<{
|
|
38
|
+
[x: string]: unknown;
|
|
39
|
+
}>;
|
|
40
|
+
readonly outputType: EvaluationType;
|
|
41
|
+
readonly metadata: ExpressionMetadata;
|
|
42
|
+
evaluate(context: TypedExpressionContext, input: UnaryLogicalInput): Promise<EvaluationResult<boolean>>;
|
|
43
|
+
validate(input: unknown): ValidationResult;
|
|
44
|
+
}
|
|
45
|
+
export declare function createAndExpression(): AndExpression;
|
|
46
|
+
export declare function createOrExpression(): OrExpression;
|
|
47
|
+
export declare function createNotExpression(): NotExpression;
|
|
48
|
+
export declare const logicalExpressions: {
|
|
49
|
+
readonly and: AndExpression;
|
|
50
|
+
readonly or: OrExpression;
|
|
51
|
+
readonly not: NotExpression;
|
|
52
|
+
};
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { TypedExpressionContext, ExpressionCategory, EvaluationType, ExpressionMetadata, ValidationResult } from '../../../types/expression-types';
|
|
2
|
+
import type { EvaluationResult } from '../../../types/command-types';
|
|
3
|
+
import { BaseExpressionImpl } from '../../base-expression';
|
|
4
|
+
type PatternMatchInput = any;
|
|
5
|
+
type ContainsInput = any;
|
|
6
|
+
type InInput = any;
|
|
7
|
+
export declare class MatchesExpression extends BaseExpressionImpl<PatternMatchInput, boolean> {
|
|
8
|
+
readonly name = "matches";
|
|
9
|
+
readonly category: ExpressionCategory;
|
|
10
|
+
readonly syntax = "value matches pattern";
|
|
11
|
+
readonly description = "Pattern matching with CSS selectors and regular expressions";
|
|
12
|
+
readonly inputSchema: import("../../../validation/lightweight-validators").RuntimeValidator<{
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
}>;
|
|
15
|
+
readonly outputType: EvaluationType;
|
|
16
|
+
readonly metadata: ExpressionMetadata;
|
|
17
|
+
evaluate(context: TypedExpressionContext, input: PatternMatchInput): Promise<EvaluationResult<boolean>>;
|
|
18
|
+
validate(input: unknown): ValidationResult;
|
|
19
|
+
private matchCSSSelector;
|
|
20
|
+
private isCSSSelector;
|
|
21
|
+
private isValidCSSSelector;
|
|
22
|
+
}
|
|
23
|
+
export declare class ContainsExpression extends BaseExpressionImpl<ContainsInput, boolean> {
|
|
24
|
+
readonly name = "contains";
|
|
25
|
+
readonly category: ExpressionCategory;
|
|
26
|
+
readonly syntax = "container contains item";
|
|
27
|
+
readonly description = "Tests if a container (array, string, object) contains an item";
|
|
28
|
+
readonly inputSchema: import("../../../validation/lightweight-validators").RuntimeValidator<{
|
|
29
|
+
[x: string]: unknown;
|
|
30
|
+
}>;
|
|
31
|
+
readonly outputType: EvaluationType;
|
|
32
|
+
readonly metadata: ExpressionMetadata;
|
|
33
|
+
evaluate(context: TypedExpressionContext, input: ContainsInput): Promise<EvaluationResult<boolean>>;
|
|
34
|
+
validate(input: unknown): ValidationResult;
|
|
35
|
+
}
|
|
36
|
+
export declare class InExpression extends BaseExpressionImpl<InInput, boolean> {
|
|
37
|
+
readonly name = "in";
|
|
38
|
+
readonly category: ExpressionCategory;
|
|
39
|
+
readonly syntax = "item in container";
|
|
40
|
+
readonly description = "Tests if an item is in a container (reverse of contains)";
|
|
41
|
+
readonly inputSchema: import("../../../validation/lightweight-validators").RuntimeValidator<{
|
|
42
|
+
[x: string]: unknown;
|
|
43
|
+
}>;
|
|
44
|
+
readonly outputType: EvaluationType;
|
|
45
|
+
readonly metadata: ExpressionMetadata;
|
|
46
|
+
evaluate(context: TypedExpressionContext, input: InInput): Promise<EvaluationResult<boolean>>;
|
|
47
|
+
validate(input: unknown): ValidationResult;
|
|
48
|
+
}
|
|
49
|
+
export declare function createMatchesExpression(): MatchesExpression;
|
|
50
|
+
export declare function createContainsExpression(): ContainsExpression;
|
|
51
|
+
export declare function createInExpression(): InExpression;
|
|
52
|
+
export declare const enhancedPatternMatchingExpressions: {
|
|
53
|
+
readonly matches: MatchesExpression;
|
|
54
|
+
readonly contains: ContainsExpression;
|
|
55
|
+
readonly in: InExpression;
|
|
56
|
+
};
|
|
57
|
+
export {};
|
|
58
|
+
//# sourceMappingURL=pattern-matching.d.ts.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { RuntimeValidator } from '../../validation/lightweight-validators';
|
|
2
|
+
import type { ExpressionImplementation } from '../../types/core';
|
|
3
|
+
import type { ExpressionMetadata, LLMDocumentation } from '../../types/expression-types';
|
|
4
|
+
interface EnhancedExpressionImplementation extends ExpressionImplementation {
|
|
5
|
+
metadata?: ExpressionMetadata;
|
|
6
|
+
documentation?: LLMDocumentation;
|
|
7
|
+
inputSchema?: RuntimeValidator<unknown>;
|
|
8
|
+
}
|
|
9
|
+
export declare const equalsExpression: EnhancedExpressionImplementation;
|
|
10
|
+
export declare const strictEqualsExpression: ExpressionImplementation;
|
|
11
|
+
export declare const notEqualsExpression: ExpressionImplementation;
|
|
12
|
+
export declare const strictNotEqualsExpression: ExpressionImplementation;
|
|
13
|
+
export declare const lessThanExpression: ExpressionImplementation;
|
|
14
|
+
export declare const lessThanOrEqualExpression: ExpressionImplementation;
|
|
15
|
+
export declare const greaterThanExpression: ExpressionImplementation;
|
|
16
|
+
export declare const greaterThanOrEqualExpression: ExpressionImplementation;
|
|
17
|
+
export declare const andExpression: EnhancedExpressionImplementation;
|
|
18
|
+
export declare const orExpression: ExpressionImplementation;
|
|
19
|
+
export declare const notExpression: ExpressionImplementation;
|
|
20
|
+
export declare const isEmptyExpression: ExpressionImplementation;
|
|
21
|
+
export declare const noExpression: ExpressionImplementation;
|
|
22
|
+
export declare const isNotEmptyExpression: ExpressionImplementation;
|
|
23
|
+
export declare const existsExpression: ExpressionImplementation;
|
|
24
|
+
export declare const doesNotExistExpression: ExpressionImplementation;
|
|
25
|
+
export declare const containsExpression: ExpressionImplementation;
|
|
26
|
+
export declare const doesNotContainExpression: ExpressionImplementation;
|
|
27
|
+
export declare const startsWithExpression: ExpressionImplementation;
|
|
28
|
+
export declare const endsWithExpression: ExpressionImplementation;
|
|
29
|
+
export declare const matchesExpression: EnhancedExpressionImplementation;
|
|
30
|
+
export declare const hasExpression: ExpressionImplementation;
|
|
31
|
+
export declare const doesNotHaveExpression: ExpressionImplementation;
|
|
32
|
+
export declare const logicalExpressions: {
|
|
33
|
+
readonly equals: EnhancedExpressionImplementation;
|
|
34
|
+
readonly strictEquals: ExpressionImplementation;
|
|
35
|
+
readonly notEquals: ExpressionImplementation;
|
|
36
|
+
readonly strictNotEquals: ExpressionImplementation;
|
|
37
|
+
readonly lessThan: ExpressionImplementation;
|
|
38
|
+
readonly lessThanOrEqual: ExpressionImplementation;
|
|
39
|
+
readonly greaterThan: ExpressionImplementation;
|
|
40
|
+
readonly greaterThanOrEqual: ExpressionImplementation;
|
|
41
|
+
readonly and: EnhancedExpressionImplementation;
|
|
42
|
+
readonly or: ExpressionImplementation;
|
|
43
|
+
readonly not: ExpressionImplementation;
|
|
44
|
+
readonly no: ExpressionImplementation;
|
|
45
|
+
readonly isEmpty: ExpressionImplementation;
|
|
46
|
+
readonly isNotEmpty: ExpressionImplementation;
|
|
47
|
+
readonly exists: ExpressionImplementation;
|
|
48
|
+
readonly doesNotExist: ExpressionImplementation;
|
|
49
|
+
readonly contains: ExpressionImplementation;
|
|
50
|
+
readonly doesNotContain: ExpressionImplementation;
|
|
51
|
+
readonly startsWith: ExpressionImplementation;
|
|
52
|
+
readonly endsWith: ExpressionImplementation;
|
|
53
|
+
readonly matches: EnhancedExpressionImplementation;
|
|
54
|
+
readonly has: ExpressionImplementation;
|
|
55
|
+
readonly doesNotHave: ExpressionImplementation;
|
|
56
|
+
};
|
|
57
|
+
export type LogicalExpressionName = keyof typeof logicalExpressions;
|
|
58
|
+
export { AndExpression, OrExpression, NotExpression, createAndExpression, createOrExpression, createNotExpression, } from './impl/index';
|
|
59
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { ValidationResult, TypedExecutionContext as TypedExpressionContext, EvaluationType, ExpressionMetadata, TypedResult, ExpressionCategory } from '../../types/index';
|
|
2
|
+
interface BaseTypedExpression<T> {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly category: string;
|
|
5
|
+
readonly syntax: string;
|
|
6
|
+
readonly outputType: EvaluationType;
|
|
7
|
+
readonly metadata: ExpressionMetadata;
|
|
8
|
+
evaluate(context: TypedExpressionContext, input: unknown): Promise<TypedResult<T>>;
|
|
9
|
+
validate(input: unknown): ValidationResult;
|
|
10
|
+
}
|
|
11
|
+
export declare class AdditionExpression implements BaseTypedExpression<number> {
|
|
12
|
+
readonly name = "addition";
|
|
13
|
+
readonly category: ExpressionCategory;
|
|
14
|
+
readonly syntax = "left + right";
|
|
15
|
+
readonly outputType: EvaluationType;
|
|
16
|
+
readonly metadata: ExpressionMetadata;
|
|
17
|
+
evaluate(_context: TypedExpressionContext, input: unknown): Promise<TypedResult<number>>;
|
|
18
|
+
validate(input: unknown): ValidationResult;
|
|
19
|
+
}
|
|
20
|
+
export declare class SubtractionExpression implements BaseTypedExpression<number> {
|
|
21
|
+
readonly name = "subtraction";
|
|
22
|
+
readonly category: ExpressionCategory;
|
|
23
|
+
readonly syntax = "left - right";
|
|
24
|
+
readonly outputType: EvaluationType;
|
|
25
|
+
readonly metadata: ExpressionMetadata;
|
|
26
|
+
evaluate(_context: TypedExpressionContext, input: unknown): Promise<TypedResult<number>>;
|
|
27
|
+
validate(input: unknown): ValidationResult;
|
|
28
|
+
}
|
|
29
|
+
export declare class MultiplicationExpression implements BaseTypedExpression<number> {
|
|
30
|
+
readonly name = "multiplication";
|
|
31
|
+
readonly category: ExpressionCategory;
|
|
32
|
+
readonly syntax = "left * right";
|
|
33
|
+
readonly outputType: EvaluationType;
|
|
34
|
+
readonly metadata: ExpressionMetadata;
|
|
35
|
+
evaluate(_context: TypedExpressionContext, input: unknown): Promise<TypedResult<number>>;
|
|
36
|
+
validate(input: unknown): ValidationResult;
|
|
37
|
+
}
|
|
38
|
+
export declare class DivisionExpression implements BaseTypedExpression<number> {
|
|
39
|
+
readonly name = "division";
|
|
40
|
+
readonly category: ExpressionCategory;
|
|
41
|
+
readonly syntax = "left / right";
|
|
42
|
+
readonly outputType: EvaluationType;
|
|
43
|
+
readonly metadata: ExpressionMetadata;
|
|
44
|
+
evaluate(_context: TypedExpressionContext, input: unknown): Promise<TypedResult<number>>;
|
|
45
|
+
validate(input: unknown): ValidationResult;
|
|
46
|
+
}
|
|
47
|
+
export declare class ModuloExpression implements BaseTypedExpression<number> {
|
|
48
|
+
readonly name = "modulo";
|
|
49
|
+
readonly category: ExpressionCategory;
|
|
50
|
+
readonly syntax = "left mod right";
|
|
51
|
+
readonly outputType: EvaluationType;
|
|
52
|
+
readonly metadata: ExpressionMetadata;
|
|
53
|
+
evaluate(_context: TypedExpressionContext, input: unknown): Promise<TypedResult<number>>;
|
|
54
|
+
validate(input: unknown): ValidationResult;
|
|
55
|
+
}
|
|
56
|
+
export declare function createAdditionExpression(): AdditionExpression;
|
|
57
|
+
export declare function createSubtractionExpression(): SubtractionExpression;
|
|
58
|
+
export declare function createMultiplicationExpression(): MultiplicationExpression;
|
|
59
|
+
export declare function createDivisionExpression(): DivisionExpression;
|
|
60
|
+
export declare function createModuloExpression(): ModuloExpression;
|
|
61
|
+
export declare const mathematicalExpressions: {
|
|
62
|
+
readonly addition: AdditionExpression;
|
|
63
|
+
readonly subtraction: SubtractionExpression;
|
|
64
|
+
readonly multiplication: MultiplicationExpression;
|
|
65
|
+
readonly division: DivisionExpression;
|
|
66
|
+
readonly modulo: ModuloExpression;
|
|
67
|
+
};
|
|
68
|
+
export {};
|
|
69
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { ExecutionContext, TypedExpressionContext, ExpressionEvaluationOptions } from '../../../types/base-types';
|
|
2
|
+
export declare function createTypedExpressionContext(context: ExecutionContext, options?: ExpressionEvaluationOptions): TypedExpressionContext;
|
|
3
|
+
export declare function updateExecutionContext(originalContext: ExecutionContext, typedContext: TypedExpressionContext): ExecutionContext;
|
|
4
|
+
export declare class PositionalAdapter {
|
|
5
|
+
static evaluateFirst(context: ExecutionContext, collection?: unknown): Promise<unknown>;
|
|
6
|
+
static evaluateLast(context: ExecutionContext, collection?: unknown): Promise<unknown>;
|
|
7
|
+
static evaluateAt(context: ExecutionContext, index: number, collection?: unknown): Promise<unknown>;
|
|
8
|
+
static getExpressionMetadata(expressionName: string): import("../../../types/expression-types").ExpressionMetadata;
|
|
9
|
+
static getExpressionDocumentation(expressionName: string): unknown;
|
|
10
|
+
static validateExpressionInput(expressionName: string, input: unknown): import("../../../types/base-types").ValidationResult<unknown>;
|
|
11
|
+
}
|
|
12
|
+
export declare const EnhancedPositionalAdapter: typeof PositionalAdapter;
|
|
13
|
+
export declare class LegacyCompatibilityLayer {
|
|
14
|
+
static firstExpression: {
|
|
15
|
+
name: string;
|
|
16
|
+
category: "Reference";
|
|
17
|
+
evaluatesTo: "Any";
|
|
18
|
+
evaluate(context: ExecutionContext, collection?: unknown): Promise<unknown>;
|
|
19
|
+
validate(args: unknown[]): string | null;
|
|
20
|
+
};
|
|
21
|
+
static lastExpression: {
|
|
22
|
+
name: string;
|
|
23
|
+
category: "Reference";
|
|
24
|
+
evaluatesTo: "Any";
|
|
25
|
+
evaluate(context: ExecutionContext, collection?: unknown): Promise<unknown>;
|
|
26
|
+
validate(args: unknown[]): string | null;
|
|
27
|
+
};
|
|
28
|
+
static atExpression: {
|
|
29
|
+
name: string;
|
|
30
|
+
category: "Reference";
|
|
31
|
+
evaluatesTo: "Any";
|
|
32
|
+
evaluate(context: ExecutionContext, index: number, collection?: unknown): Promise<unknown>;
|
|
33
|
+
validate(args: unknown[]): string | null;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export declare class ExpressionMigrationUtility {
|
|
37
|
+
private static migrationMap;
|
|
38
|
+
static enableEnhanced(expressionName: string): void;
|
|
39
|
+
static disableEnhanced(expressionName: string): void;
|
|
40
|
+
static isEnhancedEnabled(expressionName: string): boolean;
|
|
41
|
+
static getMigrationStatus(): {
|
|
42
|
+
[k: string]: boolean;
|
|
43
|
+
};
|
|
44
|
+
static enableAllEnhanced(): void;
|
|
45
|
+
static disableAllEnhanced(): void;
|
|
46
|
+
}
|
|
47
|
+
export declare class PositionalUtilities {
|
|
48
|
+
static safeFirst(context: ExecutionContext, collection?: unknown, fallback?: unknown): Promise<{
|
|
49
|
+
success: boolean;
|
|
50
|
+
value: unknown;
|
|
51
|
+
error?: unknown;
|
|
52
|
+
}>;
|
|
53
|
+
static safeLast(context: ExecutionContext, collection?: unknown, fallback?: unknown): Promise<{
|
|
54
|
+
success: boolean;
|
|
55
|
+
value: unknown;
|
|
56
|
+
error?: unknown;
|
|
57
|
+
}>;
|
|
58
|
+
static safeAt(context: ExecutionContext, index: number, collection?: unknown, fallback?: unknown): Promise<{
|
|
59
|
+
success: boolean;
|
|
60
|
+
value: unknown;
|
|
61
|
+
error?: unknown;
|
|
62
|
+
}>;
|
|
63
|
+
static batchPositionalOperations(context: ExecutionContext, operations: Array<{
|
|
64
|
+
type: 'first' | 'last' | 'at';
|
|
65
|
+
collection: unknown;
|
|
66
|
+
index?: number;
|
|
67
|
+
key?: string;
|
|
68
|
+
}>): Promise<{
|
|
69
|
+
success: boolean;
|
|
70
|
+
results: Record<string, unknown>;
|
|
71
|
+
errors: Array<unknown>;
|
|
72
|
+
}>;
|
|
73
|
+
static getAvailableOperations(): {
|
|
74
|
+
first: {
|
|
75
|
+
description: string;
|
|
76
|
+
complexity: string;
|
|
77
|
+
};
|
|
78
|
+
last: {
|
|
79
|
+
description: string;
|
|
80
|
+
complexity: string;
|
|
81
|
+
};
|
|
82
|
+
at: {
|
|
83
|
+
description: string;
|
|
84
|
+
complexity: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
static analyzeCollection(collection: unknown): {
|
|
88
|
+
type: string;
|
|
89
|
+
length: number;
|
|
90
|
+
isIndexable: boolean;
|
|
91
|
+
supportsNegativeIndexing: boolean;
|
|
92
|
+
metadata: Record<string, unknown>;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=bridge.d.ts.map
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { TypedExpressionContext, EvaluationType, ValidationResult, EvaluationResult } from '../../../types/base-types';
|
|
2
|
+
import type { TypedExpressionImplementation, ExpressionMetadata, ExpressionCategory } from '../../../types/expression-types';
|
|
3
|
+
import { BaseExpressionImpl } from '../../base-expression';
|
|
4
|
+
type CollectionInput = any;
|
|
5
|
+
type IndexInput = any;
|
|
6
|
+
type RandomInput = any;
|
|
7
|
+
export declare class FirstExpression extends BaseExpressionImpl<CollectionInput, unknown> implements TypedExpressionImplementation<CollectionInput, unknown> {
|
|
8
|
+
readonly name = "first";
|
|
9
|
+
readonly category: ExpressionCategory;
|
|
10
|
+
readonly syntax = "first in collection";
|
|
11
|
+
readonly description = "Gets the first element from a collection";
|
|
12
|
+
readonly inputSchema: import("../../../validation/lightweight-validators").RuntimeValidator<{
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
}>;
|
|
15
|
+
readonly outputType: EvaluationType;
|
|
16
|
+
readonly metadata: ExpressionMetadata;
|
|
17
|
+
evaluate(context: TypedExpressionContext, input: CollectionInput): Promise<EvaluationResult<unknown>>;
|
|
18
|
+
validate(input: unknown): ValidationResult;
|
|
19
|
+
}
|
|
20
|
+
export declare class LastExpression extends BaseExpressionImpl<CollectionInput, unknown> implements TypedExpressionImplementation<CollectionInput, unknown> {
|
|
21
|
+
readonly name = "last";
|
|
22
|
+
readonly category: ExpressionCategory;
|
|
23
|
+
readonly syntax = "last in collection";
|
|
24
|
+
readonly description = "Gets the last element from a collection";
|
|
25
|
+
readonly inputSchema: import("../../../validation/lightweight-validators").RuntimeValidator<{
|
|
26
|
+
[x: string]: unknown;
|
|
27
|
+
}>;
|
|
28
|
+
readonly outputType: EvaluationType;
|
|
29
|
+
readonly metadata: ExpressionMetadata;
|
|
30
|
+
evaluate(context: TypedExpressionContext, input: CollectionInput): Promise<EvaluationResult<unknown>>;
|
|
31
|
+
validate(input: unknown): ValidationResult;
|
|
32
|
+
}
|
|
33
|
+
export declare class AtExpression extends BaseExpressionImpl<IndexInput, unknown> implements TypedExpressionImplementation<IndexInput, unknown> {
|
|
34
|
+
readonly name = "at";
|
|
35
|
+
readonly category: ExpressionCategory;
|
|
36
|
+
readonly syntax = "collection[index] or collection at index";
|
|
37
|
+
readonly description = "Gets element at specific index from a collection";
|
|
38
|
+
readonly inputSchema: import("../../../validation/lightweight-validators").RuntimeValidator<{
|
|
39
|
+
[x: string]: unknown;
|
|
40
|
+
}>;
|
|
41
|
+
readonly outputType: EvaluationType;
|
|
42
|
+
readonly metadata: ExpressionMetadata;
|
|
43
|
+
evaluate(context: TypedExpressionContext, input: IndexInput): Promise<EvaluationResult<unknown>>;
|
|
44
|
+
validate(input: unknown): ValidationResult;
|
|
45
|
+
private normalizeIndex;
|
|
46
|
+
}
|
|
47
|
+
export declare class RandomExpression extends BaseExpressionImpl<RandomInput, unknown> implements TypedExpressionImplementation<RandomInput, unknown> {
|
|
48
|
+
readonly name = "random";
|
|
49
|
+
readonly category: ExpressionCategory;
|
|
50
|
+
readonly syntax = "random in collection";
|
|
51
|
+
readonly description = "Gets a random element from a collection";
|
|
52
|
+
readonly inputSchema: import("../../../validation/lightweight-validators").RuntimeValidator<{
|
|
53
|
+
[x: string]: unknown;
|
|
54
|
+
}>;
|
|
55
|
+
readonly outputType: EvaluationType;
|
|
56
|
+
readonly metadata: ExpressionMetadata;
|
|
57
|
+
evaluate(context: TypedExpressionContext, input: RandomInput): Promise<EvaluationResult<unknown>>;
|
|
58
|
+
validate(input: unknown): ValidationResult;
|
|
59
|
+
private getSecureRandomIndex;
|
|
60
|
+
}
|
|
61
|
+
export declare function createFirstExpression(): FirstExpression;
|
|
62
|
+
export declare function createLastExpression(): LastExpression;
|
|
63
|
+
export declare function createAtExpression(): AtExpression;
|
|
64
|
+
export declare function createRandomExpression(): RandomExpression;
|
|
65
|
+
export declare const positionalExpressions: {
|
|
66
|
+
readonly first: FirstExpression;
|
|
67
|
+
readonly last: LastExpression;
|
|
68
|
+
readonly at: AtExpression;
|
|
69
|
+
readonly random: RandomExpression;
|
|
70
|
+
};
|
|
71
|
+
export type PositionalExpressionName = keyof typeof positionalExpressions;
|
|
72
|
+
export {};
|
|
73
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ExpressionImplementation } from '../../types/core';
|
|
2
|
+
export declare const firstExpression: ExpressionImplementation;
|
|
3
|
+
export declare const lastExpression: ExpressionImplementation;
|
|
4
|
+
export declare const atExpression: ExpressionImplementation;
|
|
5
|
+
export declare const nextExpression: ExpressionImplementation;
|
|
6
|
+
export declare const previousExpression: ExpressionImplementation;
|
|
7
|
+
declare function findNextElementInDOM(startElement: Element, selector: string): HTMLElement | null;
|
|
8
|
+
declare function findPreviousElementInDOM(startElement: Element, selector: string): HTMLElement | null;
|
|
9
|
+
export declare const nextWithinExpression: ExpressionImplementation;
|
|
10
|
+
export declare const previousWithinExpression: ExpressionImplementation;
|
|
11
|
+
declare function findNextElementWithinContainer(startElement: Element, selector: string, container: Element): HTMLElement | null;
|
|
12
|
+
declare function findPreviousElementWithinContainer(startElement: Element, selector: string, container: Element): HTMLElement | null;
|
|
13
|
+
declare function getElementPosition(element: Element): number;
|
|
14
|
+
export declare const positionalExpressions: {
|
|
15
|
+
readonly first: ExpressionImplementation;
|
|
16
|
+
readonly last: ExpressionImplementation;
|
|
17
|
+
readonly at: ExpressionImplementation;
|
|
18
|
+
readonly next: ExpressionImplementation;
|
|
19
|
+
readonly previous: ExpressionImplementation;
|
|
20
|
+
readonly nextWithin: ExpressionImplementation;
|
|
21
|
+
readonly previousWithin: ExpressionImplementation;
|
|
22
|
+
};
|
|
23
|
+
export type PositionalExpressionName = keyof typeof positionalExpressions;
|
|
24
|
+
export { findNextElementInDOM, findPreviousElementInDOM, findNextElementWithinContainer, findPreviousElementWithinContainer, getElementPosition, };
|
|
25
|
+
export { FirstExpression, LastExpression, createFirstExpression, createLastExpression, } from './impl/index';
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { BaseTypedExpression, TypedExpressionContext, EvaluationType, ExpressionMetadata, ValidationResult, EvaluationResult } from '../../../types/base-types';
|
|
2
|
+
import type { ExpressionCategory } from '../../../types/expression-types';
|
|
3
|
+
import { BaseExpressionImpl } from '../../base-expression';
|
|
4
|
+
type PropertyAccessInput = any;
|
|
5
|
+
type AttributeAccessInput = any;
|
|
6
|
+
type ContextPropertyInput = any;
|
|
7
|
+
type AttributeWithValueInput = any;
|
|
8
|
+
export declare class PossessiveExpression extends BaseExpressionImpl<PropertyAccessInput, unknown> implements BaseTypedExpression<unknown> {
|
|
9
|
+
readonly name = "possessive";
|
|
10
|
+
readonly category: ExpressionCategory;
|
|
11
|
+
readonly syntax = "element's property";
|
|
12
|
+
readonly description = "Access object or element properties using possessive syntax";
|
|
13
|
+
readonly inputSchema: import("../../../validation/lightweight-validators").RuntimeValidator<{
|
|
14
|
+
[x: string]: unknown;
|
|
15
|
+
}>;
|
|
16
|
+
readonly outputType: EvaluationType;
|
|
17
|
+
readonly metadata: ExpressionMetadata;
|
|
18
|
+
evaluate(context: TypedExpressionContext, input: PropertyAccessInput): Promise<EvaluationResult<unknown>>;
|
|
19
|
+
validate(input: unknown): ValidationResult;
|
|
20
|
+
private getProperty;
|
|
21
|
+
private getElementProperty;
|
|
22
|
+
private inferResultType;
|
|
23
|
+
}
|
|
24
|
+
export declare class MyExpression extends BaseExpressionImpl<ContextPropertyInput, unknown> implements BaseTypedExpression<unknown> {
|
|
25
|
+
readonly name = "my";
|
|
26
|
+
readonly category: ExpressionCategory;
|
|
27
|
+
readonly syntax = "my property";
|
|
28
|
+
readonly description = "Access properties of the current context element (me)";
|
|
29
|
+
readonly inputSchema: import("../../../validation/lightweight-validators").RuntimeValidator<{
|
|
30
|
+
[x: string]: unknown;
|
|
31
|
+
}>;
|
|
32
|
+
readonly outputType: EvaluationType;
|
|
33
|
+
readonly metadata: ExpressionMetadata;
|
|
34
|
+
evaluate(context: TypedExpressionContext, input: ContextPropertyInput): Promise<EvaluationResult<unknown>>;
|
|
35
|
+
validate(input: unknown): ValidationResult;
|
|
36
|
+
}
|
|
37
|
+
export declare class ItsExpression extends BaseExpressionImpl<ContextPropertyInput, unknown> implements BaseTypedExpression<unknown> {
|
|
38
|
+
readonly name = "its";
|
|
39
|
+
readonly category: ExpressionCategory;
|
|
40
|
+
readonly syntax = "its property";
|
|
41
|
+
readonly description = "Access properties of the it reference in context";
|
|
42
|
+
readonly inputSchema: import("../../../validation/lightweight-validators").RuntimeValidator<{
|
|
43
|
+
[x: string]: unknown;
|
|
44
|
+
}>;
|
|
45
|
+
readonly outputType: EvaluationType;
|
|
46
|
+
readonly metadata: ExpressionMetadata;
|
|
47
|
+
evaluate(context: TypedExpressionContext, input: ContextPropertyInput): Promise<EvaluationResult<unknown>>;
|
|
48
|
+
validate(input: unknown): ValidationResult;
|
|
49
|
+
}
|
|
50
|
+
export declare class YourExpression extends BaseExpressionImpl<ContextPropertyInput, unknown> implements BaseTypedExpression<unknown> {
|
|
51
|
+
readonly name = "your";
|
|
52
|
+
readonly category: ExpressionCategory;
|
|
53
|
+
readonly syntax = "your property";
|
|
54
|
+
readonly description = "Access properties of the you reference in context";
|
|
55
|
+
readonly inputSchema: import("../../../validation/lightweight-validators").RuntimeValidator<{
|
|
56
|
+
[x: string]: unknown;
|
|
57
|
+
}>;
|
|
58
|
+
readonly outputType: EvaluationType;
|
|
59
|
+
readonly metadata: ExpressionMetadata;
|
|
60
|
+
evaluate(context: TypedExpressionContext, input: ContextPropertyInput): Promise<EvaluationResult<unknown>>;
|
|
61
|
+
validate(input: unknown): ValidationResult;
|
|
62
|
+
}
|
|
63
|
+
export declare class AttributeExpression extends BaseExpressionImpl<AttributeAccessInput, string | null> implements BaseTypedExpression<string | null> {
|
|
64
|
+
readonly name = "attribute";
|
|
65
|
+
readonly category: ExpressionCategory;
|
|
66
|
+
readonly syntax = "@attribute or @attribute of element";
|
|
67
|
+
readonly description = "Access HTML attributes of DOM elements";
|
|
68
|
+
readonly inputSchema: import("../../../validation/lightweight-validators").RuntimeValidator<{
|
|
69
|
+
[x: string]: unknown;
|
|
70
|
+
}>;
|
|
71
|
+
readonly outputType: EvaluationType;
|
|
72
|
+
readonly metadata: ExpressionMetadata;
|
|
73
|
+
evaluate(context: TypedExpressionContext, input: AttributeAccessInput): Promise<EvaluationResult<string | null>>;
|
|
74
|
+
validate(input: unknown): ValidationResult;
|
|
75
|
+
}
|
|
76
|
+
export declare class AttributeWithValueExpression extends BaseExpressionImpl<AttributeWithValueInput, boolean> implements BaseTypedExpression<boolean> {
|
|
77
|
+
readonly name = "attributeWithValue";
|
|
78
|
+
readonly category: ExpressionCategory;
|
|
79
|
+
readonly syntax = "@attribute=value";
|
|
80
|
+
readonly description = "Check if element has attribute with specific value";
|
|
81
|
+
readonly inputSchema: import("../../../validation/lightweight-validators").RuntimeValidator<{
|
|
82
|
+
[x: string]: unknown;
|
|
83
|
+
}>;
|
|
84
|
+
readonly outputType: EvaluationType;
|
|
85
|
+
readonly metadata: ExpressionMetadata;
|
|
86
|
+
evaluate(context: TypedExpressionContext, input: AttributeWithValueInput): Promise<EvaluationResult<boolean>>;
|
|
87
|
+
validate(input: unknown): ValidationResult;
|
|
88
|
+
}
|
|
89
|
+
export declare function createPossessiveExpression(): PossessiveExpression;
|
|
90
|
+
export declare function createMyExpression(): MyExpression;
|
|
91
|
+
export declare function createItsExpression(): ItsExpression;
|
|
92
|
+
export declare function createYourExpression(): YourExpression;
|
|
93
|
+
export declare function createAttributeExpression(): AttributeExpression;
|
|
94
|
+
export declare function createAttributeWithValueExpression(): AttributeWithValueExpression;
|
|
95
|
+
export declare const propertyExpressions: {
|
|
96
|
+
readonly possessive: PossessiveExpression;
|
|
97
|
+
readonly my: MyExpression;
|
|
98
|
+
readonly its: ItsExpression;
|
|
99
|
+
readonly your: YourExpression;
|
|
100
|
+
readonly attribute: AttributeExpression;
|
|
101
|
+
readonly attributeWithValue: AttributeWithValueExpression;
|
|
102
|
+
};
|
|
103
|
+
export type PropertyExpressionName = keyof typeof propertyExpressions;
|
|
104
|
+
export {};
|
|
105
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ExpressionImplementation } from '../../types/core';
|
|
2
|
+
import { getElementProperty } from '../property-access-utils';
|
|
3
|
+
export { getElementProperty };
|
|
4
|
+
export declare const possessiveExpression: ExpressionImplementation;
|
|
5
|
+
export declare const myExpression: ExpressionImplementation;
|
|
6
|
+
export declare const itsExpression: ExpressionImplementation;
|
|
7
|
+
export declare const yourExpression: ExpressionImplementation;
|
|
8
|
+
export declare const ofExpression: ExpressionImplementation;
|
|
9
|
+
export declare const attributeExpression: ExpressionImplementation;
|
|
10
|
+
export declare const attributeWithValueExpression: ExpressionImplementation;
|
|
11
|
+
export declare const classReferenceExpression: ExpressionImplementation;
|
|
12
|
+
export declare const idReferenceExpression: ExpressionImplementation;
|
|
13
|
+
export { isDataAttribute, isAriaAttribute } from '../property-access-utils';
|
|
14
|
+
export declare const propertiesExpressions: {
|
|
15
|
+
readonly possessive: ExpressionImplementation;
|
|
16
|
+
readonly my: ExpressionImplementation;
|
|
17
|
+
readonly its: ExpressionImplementation;
|
|
18
|
+
readonly your: ExpressionImplementation;
|
|
19
|
+
readonly of: ExpressionImplementation;
|
|
20
|
+
readonly attribute: ExpressionImplementation;
|
|
21
|
+
readonly attributeWithValue: ExpressionImplementation;
|
|
22
|
+
readonly classReference: ExpressionImplementation;
|
|
23
|
+
readonly idReference: ExpressionImplementation;
|
|
24
|
+
};
|
|
25
|
+
export type PropertyExpressionName = keyof typeof propertiesExpressions;
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ValidationResult, TypedExpressionContext, EvaluationType, ExpressionMetadata, EvaluationResult, ExpressionCategory } from '../../types/base-types';
|
|
2
|
+
import type { HyperScriptValue } from '../../types/command-types';
|
|
3
|
+
import { BaseExpressionImpl } from '../base-expression';
|
|
4
|
+
type PropertyAccessInput = any;
|
|
5
|
+
type PossessiveAccessInput = any;
|
|
6
|
+
type AttributeAccessInput = any;
|
|
7
|
+
export declare class MyExpression extends BaseExpressionImpl<PropertyAccessInput, HyperScriptValue> {
|
|
8
|
+
readonly name = "my";
|
|
9
|
+
readonly category: ExpressionCategory;
|
|
10
|
+
readonly syntax = "my property";
|
|
11
|
+
readonly description = "Accesses properties of the current context element (me) with validation";
|
|
12
|
+
readonly inputSchema: import("../../validation/lightweight-validators").RuntimeValidator<{
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
}>;
|
|
15
|
+
readonly outputType: EvaluationType;
|
|
16
|
+
readonly metadata: ExpressionMetadata;
|
|
17
|
+
evaluate(context: TypedExpressionContext, input: PropertyAccessInput): Promise<EvaluationResult<HyperScriptValue>>;
|
|
18
|
+
validate(input: unknown): ValidationResult;
|
|
19
|
+
}
|
|
20
|
+
export declare class ItsExpression extends BaseExpressionImpl<PossessiveAccessInput, HyperScriptValue> {
|
|
21
|
+
readonly name = "its";
|
|
22
|
+
readonly category: ExpressionCategory;
|
|
23
|
+
readonly syntax = "target its property";
|
|
24
|
+
readonly description = "Generic possessive property access with comprehensive validation";
|
|
25
|
+
readonly inputSchema: import("../../validation/lightweight-validators").RuntimeValidator<{
|
|
26
|
+
[x: string]: unknown;
|
|
27
|
+
}>;
|
|
28
|
+
readonly outputType: EvaluationType;
|
|
29
|
+
readonly metadata: ExpressionMetadata;
|
|
30
|
+
evaluate(context: TypedExpressionContext, input: PossessiveAccessInput): Promise<EvaluationResult<HyperScriptValue>>;
|
|
31
|
+
validate(input: unknown): ValidationResult;
|
|
32
|
+
}
|
|
33
|
+
export declare class AttributeExpression extends BaseExpressionImpl<AttributeAccessInput, string | null> {
|
|
34
|
+
readonly name = "attribute";
|
|
35
|
+
readonly category: ExpressionCategory;
|
|
36
|
+
readonly syntax = "@attribute or element@attribute";
|
|
37
|
+
readonly description = "Accesses HTML attributes with comprehensive DOM validation";
|
|
38
|
+
readonly inputSchema: import("../../validation/lightweight-validators").RuntimeValidator<{
|
|
39
|
+
[x: string]: unknown;
|
|
40
|
+
}>;
|
|
41
|
+
readonly outputType: EvaluationType;
|
|
42
|
+
readonly metadata: ExpressionMetadata;
|
|
43
|
+
evaluate(context: TypedExpressionContext, input: AttributeAccessInput): Promise<EvaluationResult<string | null>>;
|
|
44
|
+
validate(input: unknown): ValidationResult;
|
|
45
|
+
}
|
|
46
|
+
export declare function createMyExpression(): MyExpression;
|
|
47
|
+
export declare function createItsExpression(): ItsExpression;
|
|
48
|
+
export declare function createAttributeExpression(): AttributeExpression;
|
|
49
|
+
export declare const propertyExpressions: {
|
|
50
|
+
readonly my: MyExpression;
|
|
51
|
+
readonly its: ItsExpression;
|
|
52
|
+
readonly attribute: AttributeExpression;
|
|
53
|
+
};
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare function isElement(value: unknown): value is Element;
|
|
2
|
+
export declare function isHTMLElement(value: unknown): value is HTMLElement;
|
|
3
|
+
export declare function isDataAttribute(property: string): boolean;
|
|
4
|
+
export declare function isAriaAttribute(property: string): boolean;
|
|
5
|
+
export declare function accessStyleProperty(element: Element, styleProp: string): string | null;
|
|
6
|
+
export declare function accessAttribute(element: Element, attrName: string): boolean | string | null;
|
|
7
|
+
export declare function hasAttribute(element: Element, attrName: string): boolean;
|
|
8
|
+
export declare function getElementProperty(element: Element, property: string): unknown;
|
|
9
|
+
export declare function accessObjectProperty(object: unknown, property: string): unknown;
|
|
10
|
+
export declare function accessProperty(object: unknown, property: string): Promise<unknown>;
|
|
11
|
+
export declare const propertyAccessUtils: {
|
|
12
|
+
readonly isElement: typeof isElement;
|
|
13
|
+
readonly isHTMLElement: typeof isHTMLElement;
|
|
14
|
+
readonly isDataAttribute: typeof isDataAttribute;
|
|
15
|
+
readonly isAriaAttribute: typeof isAriaAttribute;
|
|
16
|
+
readonly accessStyleProperty: typeof accessStyleProperty;
|
|
17
|
+
readonly accessAttribute: typeof accessAttribute;
|
|
18
|
+
readonly hasAttribute: typeof hasAttribute;
|
|
19
|
+
readonly getElementProperty: typeof getElementProperty;
|
|
20
|
+
readonly accessObjectProperty: typeof accessObjectProperty;
|
|
21
|
+
readonly accessProperty: typeof accessProperty;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=property-access-utils.d.ts.map
|