@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,40 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Window {
|
|
3
|
+
__hyperfixi_behaviors_ready?: Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
export interface AttributeProcessorOptions {
|
|
7
|
+
attributeName?: string;
|
|
8
|
+
autoScan?: boolean;
|
|
9
|
+
processOnlyNewElements?: boolean;
|
|
10
|
+
lazyParsing?: boolean;
|
|
11
|
+
chunkedProcessing?: boolean;
|
|
12
|
+
chunkSize?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare class AttributeProcessor {
|
|
15
|
+
private processedElements;
|
|
16
|
+
private options;
|
|
17
|
+
private observer;
|
|
18
|
+
private processedCount;
|
|
19
|
+
private readyEventDispatched;
|
|
20
|
+
private initialized;
|
|
21
|
+
private lazyElements;
|
|
22
|
+
constructor(options?: AttributeProcessorOptions);
|
|
23
|
+
init(): Promise<void>;
|
|
24
|
+
scanAndProcessAll(): Promise<void>;
|
|
25
|
+
private processHyperscriptTag;
|
|
26
|
+
private processHyperscriptTagForElements;
|
|
27
|
+
private processHyperscriptTagGlobal;
|
|
28
|
+
processElement(element: HTMLElement): void;
|
|
29
|
+
processElementAsync(element: HTMLElement): Promise<void>;
|
|
30
|
+
private processElementsChunked;
|
|
31
|
+
private processElementLazy;
|
|
32
|
+
private hasMultipleHandlers;
|
|
33
|
+
private dispatchLoadEvent;
|
|
34
|
+
private dispatchReadyEvent;
|
|
35
|
+
private setupMutationObserver;
|
|
36
|
+
destroy(): void;
|
|
37
|
+
reset(): void;
|
|
38
|
+
}
|
|
39
|
+
export declare const defaultAttributeProcessor: AttributeProcessor;
|
|
40
|
+
//# sourceMappingURL=attribute-processor.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ExecutionContext } from '../types/base-types';
|
|
2
|
+
export interface MinimalRuntime {
|
|
3
|
+
execute(code: string, context?: ExecutionContext): Promise<any>;
|
|
4
|
+
parse(code: string): any;
|
|
5
|
+
}
|
|
6
|
+
export declare class MinimalAttributeProcessor {
|
|
7
|
+
private runtime;
|
|
8
|
+
private observer;
|
|
9
|
+
private initialized;
|
|
10
|
+
constructor(runtime: MinimalRuntime);
|
|
11
|
+
init(): void;
|
|
12
|
+
destroy(): void;
|
|
13
|
+
reset(): void;
|
|
14
|
+
scanAndProcessAll(): void;
|
|
15
|
+
private scanDocument;
|
|
16
|
+
scanElement(root: Element): void;
|
|
17
|
+
processElement(element: Element): void;
|
|
18
|
+
}
|
|
19
|
+
export declare function createMinimalAttributeProcessor(runtime: MinimalRuntime): MinimalAttributeProcessor;
|
|
20
|
+
//# sourceMappingURL=minimal-attribute-processor.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type AccessPath = (string | number)[];
|
|
2
|
+
export declare function get(buffer: ArrayBuffer, path: AccessPath): unknown;
|
|
3
|
+
export declare function getString(buffer: ArrayBuffer, path: AccessPath): string | null;
|
|
4
|
+
export declare function getNumber(buffer: ArrayBuffer, path: AccessPath): number | null;
|
|
5
|
+
export declare function getBoolean(buffer: ArrayBuffer, path: AccessPath): boolean | null;
|
|
6
|
+
export declare function has(buffer: ArrayBuffer, path: AccessPath): boolean;
|
|
7
|
+
export declare function getType(buffer: ArrayBuffer, path: AccessPath): 'null' | 'undefined' | 'boolean' | 'number' | 'string' | 'array' | 'object' | null;
|
|
8
|
+
export declare function getLength(buffer: ArrayBuffer, path: AccessPath): number | null;
|
|
9
|
+
export declare function getKeys(buffer: ArrayBuffer, path: AccessPath): string[] | null;
|
|
10
|
+
//# sourceMappingURL=accessor.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ASTNode } from '../../types/base-types';
|
|
2
|
+
export declare class BinaryAST {
|
|
3
|
+
private buffer;
|
|
4
|
+
constructor(ast: ASTNode);
|
|
5
|
+
getNodeType(): string;
|
|
6
|
+
getName(): string | null;
|
|
7
|
+
isBlocking(): boolean;
|
|
8
|
+
getLine(): number | null;
|
|
9
|
+
getColumn(): number | null;
|
|
10
|
+
getRaw(): string | null;
|
|
11
|
+
get(path: string[]): unknown;
|
|
12
|
+
getString(path: string[]): string | null;
|
|
13
|
+
getNumber(path: string[]): number | null;
|
|
14
|
+
getBoolean(path: string[]): boolean | null;
|
|
15
|
+
has(path: string[]): boolean;
|
|
16
|
+
getType(path: string[]): string | null;
|
|
17
|
+
toAST(): ASTNode;
|
|
18
|
+
getBuffer(): ArrayBuffer;
|
|
19
|
+
getByteLength(): number;
|
|
20
|
+
static fromBuffer(buffer: ArrayBuffer): BinaryAST;
|
|
21
|
+
clone(): BinaryAST;
|
|
22
|
+
}
|
|
23
|
+
export declare function isCommandNode(buffer: ArrayBuffer): boolean;
|
|
24
|
+
export declare function isExpressionNode(buffer: ArrayBuffer): boolean;
|
|
25
|
+
export declare function getCommandName(buffer: ArrayBuffer): string | null;
|
|
26
|
+
//# sourceMappingURL=ast-serializer.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface BenchmarkResult {
|
|
2
|
+
name: string;
|
|
3
|
+
iterations: number;
|
|
4
|
+
jsonTime: number;
|
|
5
|
+
binaryTime: number;
|
|
6
|
+
speedup: number;
|
|
7
|
+
jsonSize: number;
|
|
8
|
+
binarySize: number;
|
|
9
|
+
sizeRatio: number;
|
|
10
|
+
}
|
|
11
|
+
export interface BenchmarkSuite {
|
|
12
|
+
name: string;
|
|
13
|
+
results: BenchmarkResult[];
|
|
14
|
+
summary: {
|
|
15
|
+
avgSpeedup: number;
|
|
16
|
+
avgSizeRatio: number;
|
|
17
|
+
totalJsonTime: number;
|
|
18
|
+
totalBinaryTime: number;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export declare function runBenchmarks(iterations?: number): BenchmarkSuite;
|
|
22
|
+
export declare function formatBenchmarkResults(suite: BenchmarkSuite): string;
|
|
23
|
+
export declare function runAndPrintBenchmarks(iterations?: number): void;
|
|
24
|
+
//# sourceMappingURL=benchmark.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { WriteCursor, ReadCursor, BinaryTreeOptions } from './types';
|
|
2
|
+
export declare function createWriteCursor(options?: BinaryTreeOptions): WriteCursor;
|
|
3
|
+
export declare function ensureCapacity(cursor: WriteCursor, bytesNeeded: number, options?: BinaryTreeOptions): WriteCursor;
|
|
4
|
+
export declare function writeUint8(cursor: WriteCursor, value: number): WriteCursor;
|
|
5
|
+
export declare function writeUint32(cursor: WriteCursor, value: number): WriteCursor;
|
|
6
|
+
export declare function writeFloat64(cursor: WriteCursor, value: number): WriteCursor;
|
|
7
|
+
export declare function writeString(cursor: WriteCursor, value: string): {
|
|
8
|
+
cursor: WriteCursor;
|
|
9
|
+
byteLength: number;
|
|
10
|
+
};
|
|
11
|
+
export declare function writeBytes(cursor: WriteCursor, bytes: Uint8Array): WriteCursor;
|
|
12
|
+
export declare function writeHeader(cursor: WriteCursor, rootOffset: number): WriteCursor;
|
|
13
|
+
export declare function finalizeBuffer(cursor: WriteCursor): ArrayBuffer;
|
|
14
|
+
export declare function createReadCursor(buffer: ArrayBuffer, offset?: number): ReadCursor;
|
|
15
|
+
export declare function readUint8(cursor: ReadCursor, offset?: number): number;
|
|
16
|
+
export declare function readUint32(cursor: ReadCursor, offset?: number): number;
|
|
17
|
+
export declare function readFloat64(cursor: ReadCursor, offset?: number): number;
|
|
18
|
+
export declare function readString(cursor: ReadCursor, offset: number, length: number): string;
|
|
19
|
+
export declare function readHeader(cursor: ReadCursor): {
|
|
20
|
+
magic: number;
|
|
21
|
+
version: number;
|
|
22
|
+
rootOffset: number;
|
|
23
|
+
totalSize: number;
|
|
24
|
+
} | null;
|
|
25
|
+
export declare function compareStrings(a: string, b: string): number;
|
|
26
|
+
export declare function binarySearchKey(cursor: ReadCursor, entriesOffset: number, keyCount: number, targetKey: string): number;
|
|
27
|
+
//# sourceMappingURL=buffer-context.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare function deserialize(buffer: ArrayBuffer): unknown;
|
|
2
|
+
export declare function validate(buffer: ArrayBuffer): {
|
|
3
|
+
valid: boolean;
|
|
4
|
+
error?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function inspect(buffer: ArrayBuffer): {
|
|
7
|
+
valid: boolean;
|
|
8
|
+
header?: {
|
|
9
|
+
magic: number;
|
|
10
|
+
version: number;
|
|
11
|
+
rootOffset: number;
|
|
12
|
+
totalSize: number;
|
|
13
|
+
};
|
|
14
|
+
rootType?: string;
|
|
15
|
+
error?: string;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=deserializer.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { BinaryTreeOptions, SerializableValue, SerializablePrimitive, ValueType, MAGIC_NUMBER, FORMAT_VERSION, HEADER_SIZE, } from './types';
|
|
2
|
+
import { serialize, estimateSize } from './serializer';
|
|
3
|
+
import { deserialize, validate, inspect } from './deserializer';
|
|
4
|
+
import { get, getString, getNumber, getBoolean, has, getType, getLength, getKeys, type AccessPath } from './accessor';
|
|
5
|
+
export declare class BinaryTree {
|
|
6
|
+
static serialize: typeof serialize;
|
|
7
|
+
static estimateSize: typeof estimateSize;
|
|
8
|
+
static deserialize: typeof deserialize;
|
|
9
|
+
static validate: typeof validate;
|
|
10
|
+
static inspect: typeof inspect;
|
|
11
|
+
static get: typeof get;
|
|
12
|
+
static getString: typeof getString;
|
|
13
|
+
static getNumber: typeof getNumber;
|
|
14
|
+
static getBoolean: typeof getBoolean;
|
|
15
|
+
static has: typeof has;
|
|
16
|
+
static getType: typeof getType;
|
|
17
|
+
static getLength: typeof getLength;
|
|
18
|
+
static getKeys: typeof getKeys;
|
|
19
|
+
}
|
|
20
|
+
export { serialize, estimateSize, deserialize, validate, inspect, get, getString, getNumber, getBoolean, has, getType, getLength, getKeys, };
|
|
21
|
+
export type { AccessPath };
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export declare const MAGIC_NUMBER = 1279874099;
|
|
2
|
+
export declare const FORMAT_VERSION = 1;
|
|
3
|
+
export declare const HEADER_SIZE = 16;
|
|
4
|
+
export declare const enum ValueType {
|
|
5
|
+
Null = 0,
|
|
6
|
+
Boolean = 1,
|
|
7
|
+
Number = 2,
|
|
8
|
+
String = 3,
|
|
9
|
+
Array = 4,
|
|
10
|
+
Object = 5,
|
|
11
|
+
Undefined = 6
|
|
12
|
+
}
|
|
13
|
+
export interface HeaderLayout {
|
|
14
|
+
magic: number;
|
|
15
|
+
version: number;
|
|
16
|
+
rootOffset: number;
|
|
17
|
+
totalSize: number;
|
|
18
|
+
}
|
|
19
|
+
export interface ObjectEntry {
|
|
20
|
+
keyOffset: number;
|
|
21
|
+
keyLength: number;
|
|
22
|
+
valueOffset: number;
|
|
23
|
+
}
|
|
24
|
+
export interface BinaryTreeOptions {
|
|
25
|
+
initialSize?: number;
|
|
26
|
+
growthFactor?: number;
|
|
27
|
+
}
|
|
28
|
+
export interface SerializeResult {
|
|
29
|
+
buffer: ArrayBuffer;
|
|
30
|
+
bytesUsed: number;
|
|
31
|
+
}
|
|
32
|
+
export type SerializablePrimitive = null | undefined | boolean | number | string;
|
|
33
|
+
export type SerializableValue = SerializablePrimitive | SerializableValue[] | {
|
|
34
|
+
[key: string]: SerializableValue;
|
|
35
|
+
};
|
|
36
|
+
export interface WriteCursor {
|
|
37
|
+
buffer: ArrayBuffer;
|
|
38
|
+
view: DataView;
|
|
39
|
+
uint8: Uint8Array;
|
|
40
|
+
offset: number;
|
|
41
|
+
}
|
|
42
|
+
export interface ReadCursor {
|
|
43
|
+
view: DataView;
|
|
44
|
+
uint8: Uint8Array;
|
|
45
|
+
offset: number;
|
|
46
|
+
}
|
|
47
|
+
export declare const TYPE_TAG_SIZE = 1;
|
|
48
|
+
export declare const LENGTH_SIZE = 4;
|
|
49
|
+
export declare const OFFSET_SIZE = 4;
|
|
50
|
+
export declare const OBJECT_ENTRY_SIZE = 12;
|
|
51
|
+
export declare const ARRAY_ENTRY_SIZE = 4;
|
|
52
|
+
export declare const NUMBER_SIZE = 8;
|
|
53
|
+
export declare const BOOLEAN_SIZE = 1;
|
|
54
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { RuntimeValidator } from '../validation/lightweight-validators';
|
|
2
|
+
import type { TypedExpressionContext, EvaluationResult, ValidationResult, ValidationError, ExpressionMetadata, EvaluationType, ExpressionCategory } from '../types/base-types';
|
|
3
|
+
export declare abstract class BaseExpressionImpl<TInput = unknown, TOutput = unknown> {
|
|
4
|
+
abstract readonly name: string;
|
|
5
|
+
abstract readonly category: ExpressionCategory;
|
|
6
|
+
abstract readonly syntax: string;
|
|
7
|
+
abstract readonly description: string;
|
|
8
|
+
abstract readonly inputSchema: RuntimeValidator<TInput>;
|
|
9
|
+
abstract readonly outputType: EvaluationType;
|
|
10
|
+
abstract readonly metadata: ExpressionMetadata;
|
|
11
|
+
protected trackPerformance(context: TypedExpressionContext, input: unknown, result: EvaluationResult<TOutput>, startTime: number): void;
|
|
12
|
+
protected trackSimple(context: TypedExpressionContext, startTime: number, success: boolean, output?: unknown): void;
|
|
13
|
+
protected toBoolean(value: unknown): boolean;
|
|
14
|
+
protected success<T>(value: T, type: EvaluationResult<T>['type']): EvaluationResult<T>;
|
|
15
|
+
protected failure<T>(name: string, type: ValidationError['type'], message: string, code: string, suggestions?: readonly string[] | string[]): EvaluationResult<T>;
|
|
16
|
+
protected validationSuccess(): ValidationResult;
|
|
17
|
+
protected validationFailure(type: ValidationError['type'], message: string, suggestions?: string[]): ValidationResult;
|
|
18
|
+
protected isElement(value: unknown): value is Element;
|
|
19
|
+
protected inferType(value: unknown): EvaluationResult<unknown>['type'];
|
|
20
|
+
protected inferEvaluationType(value: unknown): EvaluationType;
|
|
21
|
+
protected normalizeCollection(collection: unknown): unknown[];
|
|
22
|
+
protected toNumber(value: unknown): number | null;
|
|
23
|
+
abstract evaluate(context: TypedExpressionContext, input: TInput): Promise<EvaluationResult<TOutput>>;
|
|
24
|
+
abstract validate(input: unknown): ValidationResult;
|
|
25
|
+
}
|
|
26
|
+
export declare function isBaseExpression(expr: unknown): expr is BaseExpressionImpl;
|
|
27
|
+
//# sourceMappingURL=base-expression.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ConfigurableExpressionEvaluator } from '../../core/configurable-expression-evaluator';
|
|
2
|
+
import { referencesExpressions } from '../references/index';
|
|
3
|
+
import { logicalExpressions } from '../logical/index';
|
|
4
|
+
import { specialExpressions } from '../special/index';
|
|
5
|
+
import { conversionExpressions } from '../conversion/index';
|
|
6
|
+
import { positionalExpressions } from '../positional/index';
|
|
7
|
+
export declare function createCommonExpressionEvaluator(): ConfigurableExpressionEvaluator;
|
|
8
|
+
export { referencesExpressions, logicalExpressions, specialExpressions, conversionExpressions, positionalExpressions, };
|
|
9
|
+
//# sourceMappingURL=common-expressions.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfigurableExpressionEvaluator } from '../../core/configurable-expression-evaluator';
|
|
2
|
+
import { referencesExpressions } from '../references/index';
|
|
3
|
+
import { logicalExpressions } from '../logical/index';
|
|
4
|
+
import { specialExpressions } from '../special/index';
|
|
5
|
+
export declare function createCoreExpressionEvaluator(): ConfigurableExpressionEvaluator;
|
|
6
|
+
export { referencesExpressions, logicalExpressions, specialExpressions };
|
|
7
|
+
//# sourceMappingURL=core-expressions.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ConfigurableExpressionEvaluator } from '../../core/configurable-expression-evaluator';
|
|
2
|
+
import { referencesExpressions } from '../references/index';
|
|
3
|
+
import { logicalExpressions } from '../logical/index';
|
|
4
|
+
import { specialExpressions } from '../special/index';
|
|
5
|
+
import { conversionExpressions } from '../conversion/index';
|
|
6
|
+
import { positionalExpressions } from '../positional/index';
|
|
7
|
+
import { propertiesExpressions } from '../properties/index';
|
|
8
|
+
export declare function createFullExpressionEvaluator(): ConfigurableExpressionEvaluator;
|
|
9
|
+
export { referencesExpressions, logicalExpressions, specialExpressions, conversionExpressions, positionalExpressions, propertiesExpressions, };
|
|
10
|
+
//# sourceMappingURL=full-expressions.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { createCoreExpressionEvaluator } from './core-expressions';
|
|
2
|
+
export { createCommonExpressionEvaluator } from './common-expressions';
|
|
3
|
+
export { createFullExpressionEvaluator } from './full-expressions';
|
|
4
|
+
export { referencesExpressions, logicalExpressions, specialExpressions } from './core-expressions';
|
|
5
|
+
export { conversionExpressions, positionalExpressions } from './common-expressions';
|
|
6
|
+
export { propertiesExpressions } from './full-expressions';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,80 @@
|
|
|
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 GreaterThanExpression implements BaseTypedExpression<boolean> {
|
|
12
|
+
readonly name = "greaterThan";
|
|
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<boolean>>;
|
|
18
|
+
validate(input: unknown): ValidationResult;
|
|
19
|
+
}
|
|
20
|
+
export declare class LessThanExpression implements BaseTypedExpression<boolean> {
|
|
21
|
+
readonly name = "lessThan";
|
|
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<boolean>>;
|
|
27
|
+
validate(input: unknown): ValidationResult;
|
|
28
|
+
}
|
|
29
|
+
export declare class GreaterThanOrEqualExpression implements BaseTypedExpression<boolean> {
|
|
30
|
+
readonly name = "greaterThanOrEqual";
|
|
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<boolean>>;
|
|
36
|
+
validate(input: unknown): ValidationResult;
|
|
37
|
+
}
|
|
38
|
+
export declare class LessThanOrEqualExpression implements BaseTypedExpression<boolean> {
|
|
39
|
+
readonly name = "lessThanOrEqual";
|
|
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<boolean>>;
|
|
45
|
+
validate(input: unknown): ValidationResult;
|
|
46
|
+
}
|
|
47
|
+
export declare class EqualityExpression implements BaseTypedExpression<boolean> {
|
|
48
|
+
readonly name = "equals";
|
|
49
|
+
readonly category: ExpressionCategory;
|
|
50
|
+
readonly syntax = "left == right";
|
|
51
|
+
readonly outputType: EvaluationType;
|
|
52
|
+
readonly metadata: ExpressionMetadata;
|
|
53
|
+
evaluate(_context: TypedExpressionContext, input: unknown): Promise<TypedResult<boolean>>;
|
|
54
|
+
validate(input: unknown): ValidationResult;
|
|
55
|
+
}
|
|
56
|
+
export declare class InequalityExpression implements BaseTypedExpression<boolean> {
|
|
57
|
+
readonly name = "notEquals";
|
|
58
|
+
readonly category: ExpressionCategory;
|
|
59
|
+
readonly syntax = "left != right";
|
|
60
|
+
readonly outputType: EvaluationType;
|
|
61
|
+
readonly metadata: ExpressionMetadata;
|
|
62
|
+
evaluate(_context: TypedExpressionContext, input: unknown): Promise<TypedResult<boolean>>;
|
|
63
|
+
validate(input: unknown): ValidationResult;
|
|
64
|
+
}
|
|
65
|
+
export declare function createGreaterThanExpression(): GreaterThanExpression;
|
|
66
|
+
export declare function createLessThanExpression(): LessThanExpression;
|
|
67
|
+
export declare function createGreaterThanOrEqualExpression(): GreaterThanOrEqualExpression;
|
|
68
|
+
export declare function createLessThanOrEqualExpression(): LessThanOrEqualExpression;
|
|
69
|
+
export declare function createEqualityExpression(): EqualityExpression;
|
|
70
|
+
export declare function createInequalityExpression(): InequalityExpression;
|
|
71
|
+
export declare const comparisonExpressions: {
|
|
72
|
+
readonly greaterThan: GreaterThanExpression;
|
|
73
|
+
readonly lessThan: LessThanExpression;
|
|
74
|
+
readonly greaterThanOrEqual: GreaterThanOrEqualExpression;
|
|
75
|
+
readonly lessThanOrEqual: LessThanOrEqualExpression;
|
|
76
|
+
readonly equals: EqualityExpression;
|
|
77
|
+
readonly notEquals: InequalityExpression;
|
|
78
|
+
};
|
|
79
|
+
export {};
|
|
80
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,117 @@
|
|
|
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 ConversionAdapter {
|
|
5
|
+
static evaluateAs(context: ExecutionContext, value: unknown, type: string): Promise<unknown>;
|
|
6
|
+
static evaluateIs(context: ExecutionContext, value: unknown, type: string): Promise<boolean>;
|
|
7
|
+
static getExpressionMetadata(expressionName: string): import("../../../types/base-types").ExpressionMetadata;
|
|
8
|
+
static getExpressionDocumentation(expressionName: string): import("../../../types/base-types").LLMDocumentation;
|
|
9
|
+
static validateExpressionInput(expressionName: string, input: unknown): import("../../../types/base-types").ValidationResult<unknown>;
|
|
10
|
+
}
|
|
11
|
+
export declare const EnhancedConversionAdapter: typeof ConversionAdapter;
|
|
12
|
+
export declare class LegacyCompatibilityLayer {
|
|
13
|
+
static asExpression: {
|
|
14
|
+
name: string;
|
|
15
|
+
category: "Conversion";
|
|
16
|
+
evaluatesTo: "Any";
|
|
17
|
+
evaluate(context: ExecutionContext, value: unknown, type: string): Promise<unknown>;
|
|
18
|
+
validate(args: unknown[]): string | null;
|
|
19
|
+
};
|
|
20
|
+
static isExpression: {
|
|
21
|
+
name: string;
|
|
22
|
+
category: "Conversion";
|
|
23
|
+
evaluatesTo: "Boolean";
|
|
24
|
+
evaluate(context: ExecutionContext, value: unknown, type: string): Promise<boolean>;
|
|
25
|
+
validate(args: unknown[]): string | null;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export declare class ExpressionMigrationUtility {
|
|
29
|
+
private static migrationMap;
|
|
30
|
+
static enableEnhanced(expressionName: string): void;
|
|
31
|
+
static disableEnhanced(expressionName: string): void;
|
|
32
|
+
static isEnhancedEnabled(expressionName: string): boolean;
|
|
33
|
+
static getMigrationStatus(): {
|
|
34
|
+
[k: string]: boolean;
|
|
35
|
+
};
|
|
36
|
+
static enableAllEnhanced(): void;
|
|
37
|
+
static disableAllEnhanced(): void;
|
|
38
|
+
}
|
|
39
|
+
export declare class ConversionUtilities {
|
|
40
|
+
static safeConvert(context: ExecutionContext, value: unknown, type: string, fallback?: unknown): Promise<{
|
|
41
|
+
success: boolean;
|
|
42
|
+
value: unknown;
|
|
43
|
+
error?: unknown;
|
|
44
|
+
}>;
|
|
45
|
+
static batchConvert(context: ExecutionContext, conversions: Array<{
|
|
46
|
+
value: unknown;
|
|
47
|
+
type: string;
|
|
48
|
+
key?: string;
|
|
49
|
+
}>): Promise<{
|
|
50
|
+
success: boolean;
|
|
51
|
+
results: Record<string, unknown>;
|
|
52
|
+
errors: Array<unknown>;
|
|
53
|
+
}>;
|
|
54
|
+
static getAvailableConversions(): {
|
|
55
|
+
String: {
|
|
56
|
+
description: string;
|
|
57
|
+
complexity: string;
|
|
58
|
+
};
|
|
59
|
+
Number: {
|
|
60
|
+
description: string;
|
|
61
|
+
complexity: string;
|
|
62
|
+
};
|
|
63
|
+
Int: {
|
|
64
|
+
description: string;
|
|
65
|
+
complexity: string;
|
|
66
|
+
};
|
|
67
|
+
Float: {
|
|
68
|
+
description: string;
|
|
69
|
+
complexity: string;
|
|
70
|
+
};
|
|
71
|
+
Boolean: {
|
|
72
|
+
description: string;
|
|
73
|
+
complexity: string;
|
|
74
|
+
};
|
|
75
|
+
Array: {
|
|
76
|
+
description: string;
|
|
77
|
+
complexity: string;
|
|
78
|
+
};
|
|
79
|
+
Object: {
|
|
80
|
+
description: string;
|
|
81
|
+
complexity: string;
|
|
82
|
+
};
|
|
83
|
+
Date: {
|
|
84
|
+
description: string;
|
|
85
|
+
complexity: string;
|
|
86
|
+
};
|
|
87
|
+
JSON: {
|
|
88
|
+
description: string;
|
|
89
|
+
complexity: string;
|
|
90
|
+
};
|
|
91
|
+
Values: {
|
|
92
|
+
description: string;
|
|
93
|
+
complexity: string;
|
|
94
|
+
};
|
|
95
|
+
'Values:Form': {
|
|
96
|
+
description: string;
|
|
97
|
+
complexity: string;
|
|
98
|
+
};
|
|
99
|
+
'Values:JSON': {
|
|
100
|
+
description: string;
|
|
101
|
+
complexity: string;
|
|
102
|
+
};
|
|
103
|
+
HTML: {
|
|
104
|
+
description: string;
|
|
105
|
+
complexity: string;
|
|
106
|
+
};
|
|
107
|
+
Fragment: {
|
|
108
|
+
description: string;
|
|
109
|
+
complexity: string;
|
|
110
|
+
};
|
|
111
|
+
'Fixed:N': {
|
|
112
|
+
description: string;
|
|
113
|
+
complexity: string;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=bridge.d.ts.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type RuntimeValidator } from '../../../validation/lightweight-validators';
|
|
2
|
+
import type { TypedExpressionContext, EvaluationResult, ExpressionMetadata, BaseTypedExpression, ValidationResult, EvaluationType } from '../../../types/base-types';
|
|
3
|
+
import type { ExpressionCategory, LLMDocumentation } from '../../../types/expression-types';
|
|
4
|
+
import { BaseExpressionImpl } from '../../base-expression';
|
|
5
|
+
export type SupportedConversionType = 'Array' | 'Boolean' | 'Date' | 'Float' | 'Fragment' | 'HTML' | 'Int' | 'JSON' | 'Number' | 'Object' | 'String' | 'Values' | 'Values:Form' | 'Values:JSON' | `Fixed:${number}` | string;
|
|
6
|
+
export interface EnhancedTypeConverter<T = unknown> {
|
|
7
|
+
(value: unknown, context: TypedExpressionContext): EvaluationResult<T>;
|
|
8
|
+
}
|
|
9
|
+
export declare const enhancedConverters: Record<string, EnhancedTypeConverter>;
|
|
10
|
+
export declare class AsExpression extends BaseExpressionImpl<{
|
|
11
|
+
value: unknown;
|
|
12
|
+
type: string;
|
|
13
|
+
}, unknown> implements BaseTypedExpression<unknown> {
|
|
14
|
+
readonly name = "as";
|
|
15
|
+
readonly category: ExpressionCategory;
|
|
16
|
+
readonly syntax = "value as Type";
|
|
17
|
+
readonly description = "Converts values between different types using the \"as\" keyword";
|
|
18
|
+
readonly outputType: EvaluationType;
|
|
19
|
+
readonly inputSchema: RuntimeValidator<{
|
|
20
|
+
value: unknown;
|
|
21
|
+
type: string;
|
|
22
|
+
}>;
|
|
23
|
+
readonly metadata: ExpressionMetadata;
|
|
24
|
+
readonly documentation: LLMDocumentation;
|
|
25
|
+
evaluate(context: TypedExpressionContext, input: {
|
|
26
|
+
value: unknown;
|
|
27
|
+
type: string;
|
|
28
|
+
}): Promise<EvaluationResult<unknown>>;
|
|
29
|
+
validate(input: unknown): ValidationResult;
|
|
30
|
+
}
|
|
31
|
+
export declare class IsExpression extends BaseExpressionImpl<{
|
|
32
|
+
value: unknown;
|
|
33
|
+
type: string;
|
|
34
|
+
}, boolean> implements BaseTypedExpression<boolean> {
|
|
35
|
+
readonly name = "is";
|
|
36
|
+
readonly category: ExpressionCategory;
|
|
37
|
+
readonly syntax = "value is Type";
|
|
38
|
+
readonly description = "Checks if a value is of a specific type";
|
|
39
|
+
readonly outputType: EvaluationType;
|
|
40
|
+
readonly inputSchema: RuntimeValidator<{
|
|
41
|
+
value: unknown;
|
|
42
|
+
type: string;
|
|
43
|
+
}>;
|
|
44
|
+
readonly metadata: ExpressionMetadata;
|
|
45
|
+
readonly documentation: LLMDocumentation;
|
|
46
|
+
evaluate(context: TypedExpressionContext, input: {
|
|
47
|
+
value: unknown;
|
|
48
|
+
type: string;
|
|
49
|
+
}): Promise<EvaluationResult<boolean>>;
|
|
50
|
+
validate(input: unknown): ValidationResult;
|
|
51
|
+
}
|
|
52
|
+
export declare const conversionExpressions: {
|
|
53
|
+
readonly as: AsExpression;
|
|
54
|
+
readonly is: IsExpression;
|
|
55
|
+
};
|
|
56
|
+
export type ConversionExpressionName = keyof typeof conversionExpressions;
|
|
57
|
+
export declare function createAsExpression(): AsExpression;
|
|
58
|
+
export declare function createIsExpression(): IsExpression;
|
|
59
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ExecutionContext, ExpressionImplementation } from '../../types/core';
|
|
2
|
+
export interface ConversionFunction {
|
|
3
|
+
(value: unknown, context?: ExecutionContext): unknown;
|
|
4
|
+
}
|
|
5
|
+
export declare const defaultConversions: Record<string, ConversionFunction>;
|
|
6
|
+
declare function getFormValues(form: HTMLFormElement): Record<string, unknown>;
|
|
7
|
+
declare function getFormValuesProcessed(form: HTMLFormElement): Record<string, unknown>;
|
|
8
|
+
declare function getInputValue(input: HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement): unknown;
|
|
9
|
+
declare function parseFixedPrecision(type: string): {
|
|
10
|
+
precision?: number;
|
|
11
|
+
};
|
|
12
|
+
export declare const asExpression: ExpressionImplementation;
|
|
13
|
+
export declare const isExpression: ExpressionImplementation;
|
|
14
|
+
export declare const asyncExpression: ExpressionImplementation;
|
|
15
|
+
export declare const conversionExpressions: {
|
|
16
|
+
readonly as: ExpressionImplementation;
|
|
17
|
+
readonly is: ExpressionImplementation;
|
|
18
|
+
readonly async: ExpressionImplementation;
|
|
19
|
+
};
|
|
20
|
+
export type ConversionExpressionName = keyof typeof conversionExpressions;
|
|
21
|
+
export { getFormValues, getFormValuesProcessed, getInputValue, parseFixedPrecision };
|
|
22
|
+
export { AsExpression, createAsExpression } from './impl/index';
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const EXPRESSION_TIERS: {
|
|
2
|
+
readonly core: readonly ["references", "logical", "special"];
|
|
3
|
+
readonly common: readonly ["properties", "conversion"];
|
|
4
|
+
readonly optional: readonly ["positional"];
|
|
5
|
+
};
|
|
6
|
+
export type ExpressionTier = keyof typeof EXPRESSION_TIERS;
|
|
7
|
+
export type ExpressionCategory = (typeof EXPRESSION_TIERS.core)[number] | (typeof EXPRESSION_TIERS.common)[number] | (typeof EXPRESSION_TIERS.optional)[number];
|
|
8
|
+
export declare const CATEGORY_TO_TIER: Record<ExpressionCategory, ExpressionTier>;
|
|
9
|
+
export declare function getTierForCategory(category: string): ExpressionTier | null;
|
|
10
|
+
export declare function getCategoriesForTier(tier: ExpressionTier): readonly string[];
|
|
11
|
+
export declare function isCategoryInTier(category: string, tier: ExpressionTier): boolean;
|
|
12
|
+
export declare function getAllCategories(): string[];
|
|
13
|
+
//# sourceMappingURL=expression-tiers.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { referencesExpressions as references } from './bundles/core-expressions';
|
|
2
|
+
export { logicalExpressions as logical } from './bundles/core-expressions';
|
|
3
|
+
export { specialExpressions as special } from './bundles/core-expressions';
|
|
4
|
+
export { conversionExpressions as conversion } from './bundles/common-expressions';
|
|
5
|
+
export { positionalExpressions as positional } from './bundles/common-expressions';
|
|
6
|
+
export { propertiesExpressions as properties } from './bundles/full-expressions';
|
|
7
|
+
export { createCoreExpressionEvaluator, createCommonExpressionEvaluator, createFullExpressionEvaluator, } from './bundles';
|
|
8
|
+
export { ConfigurableExpressionEvaluator } from '../core/configurable-expression-evaluator';
|
|
9
|
+
export { BaseExpressionEvaluator } from '../core/base-expression-evaluator';
|
|
10
|
+
export * from './bundles';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|