@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,16 @@
|
|
|
1
|
+
import type { ASTNode } from '../parser/hybrid/ast-types';
|
|
2
|
+
declare function processElements(root?: Element | Document): void;
|
|
3
|
+
declare const api: {
|
|
4
|
+
version: string;
|
|
5
|
+
parse(code: string): ASTNode;
|
|
6
|
+
execute(code: string, element?: Element): Promise<any>;
|
|
7
|
+
run: (code: string, element?: Element) => Promise<any>;
|
|
8
|
+
eval: (code: string, element?: Element) => Promise<any>;
|
|
9
|
+
init: typeof processElements;
|
|
10
|
+
process: typeof processElements;
|
|
11
|
+
commands: string[];
|
|
12
|
+
parserName: string;
|
|
13
|
+
};
|
|
14
|
+
export default api;
|
|
15
|
+
export { api, processElements };
|
|
16
|
+
//# sourceMappingURL=browser-bundle-textshelf-minimal.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type LokaScriptRuntime } from '../runtime/runtime-factory';
|
|
2
|
+
declare const hyperfixi: LokaScriptRuntime;
|
|
3
|
+
declare function processElements(root?: Element | Document): void;
|
|
4
|
+
declare const api: {
|
|
5
|
+
version: string;
|
|
6
|
+
parse: (code: string) => any;
|
|
7
|
+
execute: (code: string, element?: Element) => Promise<unknown>;
|
|
8
|
+
run: (code: string, element?: Element) => Promise<unknown>;
|
|
9
|
+
eval: (code: string, element?: Element) => Promise<unknown>;
|
|
10
|
+
init: () => void;
|
|
11
|
+
process: typeof processElements;
|
|
12
|
+
runtime: import("..").RuntimeBase;
|
|
13
|
+
commands: string[];
|
|
14
|
+
parserName: string;
|
|
15
|
+
};
|
|
16
|
+
export default api;
|
|
17
|
+
export { hyperfixi, api, processElements };
|
|
18
|
+
//# sourceMappingURL=browser-bundle-textshelf-profile.d.ts.map
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { evalHyperScript, evalHyperScriptAsync, evalHyperScriptSmart } from './eval-hyperscript';
|
|
2
|
+
import { hyperscript, config } from '../api/lokascript-api';
|
|
3
|
+
import type { RuntimeHooks } from '../types/hooks';
|
|
4
|
+
import { defaultAttributeProcessor } from '../dom/attribute-processor';
|
|
5
|
+
import { tailwindExtension } from '../extensions/tailwind';
|
|
6
|
+
import { Parser } from '../parser/parser';
|
|
7
|
+
import { Runtime } from '../runtime/runtime';
|
|
8
|
+
import { tokenize } from '../parser/tokenizer';
|
|
9
|
+
import { debug, debugControl } from '../utils/debug';
|
|
10
|
+
import { styleBatcher, ObjectPool } from '../utils/performance';
|
|
11
|
+
import { enableDebugEvents, disableDebugEvents, isDebugEnabled, getDebugStats, resetDebugStats, getEventHistory, replayEvents } from '../utils/debug-events';
|
|
12
|
+
import { createSemanticAnalyzer, parse as semanticParse, translate, render, toExplicit, fromExplicit } from '@lokascript/semantic';
|
|
13
|
+
import type { LokaScriptRegistry } from '../registry';
|
|
14
|
+
import { registerFetchResponseType } from '../commands/async/fetch';
|
|
15
|
+
import type { CompileResult, NewCompileOptions } from '../api/hyperscript-api';
|
|
16
|
+
interface HyperFixiBrowserAPI {
|
|
17
|
+
evalHyperScript: typeof evalHyperScript;
|
|
18
|
+
evalHyperScriptAsync: typeof evalHyperScriptAsync;
|
|
19
|
+
evalHyperScriptSmart: typeof evalHyperScriptSmart;
|
|
20
|
+
tailwindExtension: typeof tailwindExtension;
|
|
21
|
+
compile: (code: string, options?: NewCompileOptions) => CompileResult;
|
|
22
|
+
compileSync: (code: string, options?: NewCompileOptions) => CompileResult;
|
|
23
|
+
compileMultilingual: (code: string, language: string) => Promise<CompileResult>;
|
|
24
|
+
execute: typeof hyperscript.execute;
|
|
25
|
+
run: (code: string, context?: any) => Promise<unknown>;
|
|
26
|
+
createContext: typeof hyperscript.createContext;
|
|
27
|
+
createRuntime: typeof hyperscript.createRuntime;
|
|
28
|
+
processNode: (element: Element | Document) => Promise<void>;
|
|
29
|
+
process: (element: Element | Document) => Promise<void>;
|
|
30
|
+
Parser: typeof Parser;
|
|
31
|
+
Runtime: typeof Runtime;
|
|
32
|
+
tokenize: typeof tokenize;
|
|
33
|
+
attributeProcessor: typeof defaultAttributeProcessor;
|
|
34
|
+
debug: typeof debug;
|
|
35
|
+
debugControl: typeof debugControl;
|
|
36
|
+
styleBatcher: typeof styleBatcher;
|
|
37
|
+
ObjectPool: typeof ObjectPool;
|
|
38
|
+
semantic: {
|
|
39
|
+
createAnalyzer: typeof createSemanticAnalyzer;
|
|
40
|
+
parse: typeof semanticParse;
|
|
41
|
+
translate: typeof translate;
|
|
42
|
+
render: typeof render;
|
|
43
|
+
toExplicit: typeof toExplicit;
|
|
44
|
+
fromExplicit: typeof fromExplicit;
|
|
45
|
+
supportedLanguages: string[];
|
|
46
|
+
};
|
|
47
|
+
semanticDebug: {
|
|
48
|
+
enable: typeof enableDebugEvents;
|
|
49
|
+
disable: typeof disableDebugEvents;
|
|
50
|
+
isEnabled: typeof isDebugEnabled;
|
|
51
|
+
getStats: typeof getDebugStats;
|
|
52
|
+
resetStats: typeof resetDebugStats;
|
|
53
|
+
getEventHistory: typeof getEventHistory;
|
|
54
|
+
replayEvents: typeof replayEvents;
|
|
55
|
+
};
|
|
56
|
+
config: typeof config;
|
|
57
|
+
registerHooks: (name: string, hooks: RuntimeHooks) => void;
|
|
58
|
+
unregisterHooks: (name: string) => boolean;
|
|
59
|
+
getRegisteredHooks: () => string[];
|
|
60
|
+
registry: LokaScriptRegistry;
|
|
61
|
+
registerFetchResponseType: typeof registerFetchResponseType;
|
|
62
|
+
}
|
|
63
|
+
declare global {
|
|
64
|
+
interface Window {
|
|
65
|
+
hyperfixi: HyperFixiBrowserAPI;
|
|
66
|
+
lokascript: HyperFixiBrowserAPI;
|
|
67
|
+
evalHyperScript: typeof evalHyperScript;
|
|
68
|
+
evalHyperScriptAsync: typeof evalHyperScriptAsync;
|
|
69
|
+
evalHyperScriptSmart: typeof evalHyperScriptSmart;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
declare const hyperfixiAPI: {
|
|
73
|
+
evalHyperScript: typeof evalHyperScript;
|
|
74
|
+
evalHyperScriptAsync: typeof evalHyperScriptAsync;
|
|
75
|
+
evalHyperScriptSmart: typeof evalHyperScriptSmart;
|
|
76
|
+
evaluate: typeof evalHyperScript;
|
|
77
|
+
compile: (code: string, options?: NewCompileOptions) => CompileResult;
|
|
78
|
+
compileSync: (code: string, options?: NewCompileOptions) => CompileResult;
|
|
79
|
+
compileMultilingual: (code: string, language: string) => Promise<CompileResult>;
|
|
80
|
+
execute: (ast: import("..").ASTNode, context?: import("../registry").ExecutionContext) => Promise<unknown>;
|
|
81
|
+
run: (code: string, context?: any) => Promise<unknown>;
|
|
82
|
+
createContext: (element?: HTMLElement | null, parent?: import("../registry").ExecutionContext) => import("../registry").ExecutionContext;
|
|
83
|
+
createRuntime: (options?: import("../runtime/runtime").RuntimeOptions) => Runtime;
|
|
84
|
+
Parser: typeof Parser;
|
|
85
|
+
Runtime: typeof Runtime;
|
|
86
|
+
tokenize: typeof tokenize;
|
|
87
|
+
processNode: (element: Element | Document) => Promise<void>;
|
|
88
|
+
process: (element: Element | Document) => Promise<void>;
|
|
89
|
+
attributeProcessor: import("../dom/attribute-processor").AttributeProcessor;
|
|
90
|
+
tailwindExtension: import("../extensions/tailwind").TailwindExtension;
|
|
91
|
+
styleBatcher: import("../utils/performance").StyleBatcher;
|
|
92
|
+
ObjectPool: typeof ObjectPool;
|
|
93
|
+
debug: {
|
|
94
|
+
command: (...args: any[]) => void;
|
|
95
|
+
event: (...args: any[]) => void;
|
|
96
|
+
parse: (...args: any[]) => void;
|
|
97
|
+
expr: (...args: any[]) => void;
|
|
98
|
+
expressions: (...args: any[]) => void;
|
|
99
|
+
style: (...args: any[]) => void;
|
|
100
|
+
runtime: (...args: any[]) => void;
|
|
101
|
+
loop: (...args: any[]) => void;
|
|
102
|
+
async: (...args: any[]) => void;
|
|
103
|
+
};
|
|
104
|
+
debugControl: {
|
|
105
|
+
enable(): void;
|
|
106
|
+
disable(): void;
|
|
107
|
+
isEnabled(): boolean;
|
|
108
|
+
status(): {
|
|
109
|
+
enabled: boolean;
|
|
110
|
+
source: string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
semantic: {
|
|
114
|
+
createAnalyzer: typeof createSemanticAnalyzer;
|
|
115
|
+
parse: typeof semanticParse;
|
|
116
|
+
translate: typeof translate;
|
|
117
|
+
render: typeof render;
|
|
118
|
+
toExplicit: typeof toExplicit;
|
|
119
|
+
fromExplicit: typeof fromExplicit;
|
|
120
|
+
supportedLanguages: string[];
|
|
121
|
+
};
|
|
122
|
+
semanticDebug: {
|
|
123
|
+
enable: typeof enableDebugEvents;
|
|
124
|
+
disable: typeof disableDebugEvents;
|
|
125
|
+
isEnabled: typeof isDebugEnabled;
|
|
126
|
+
getStats: typeof getDebugStats;
|
|
127
|
+
resetStats: typeof resetDebugStats;
|
|
128
|
+
getEventHistory: typeof getEventHistory;
|
|
129
|
+
replayEvents: typeof replayEvents;
|
|
130
|
+
};
|
|
131
|
+
config: import("../api/hyperscript-api").HyperscriptConfig;
|
|
132
|
+
registerHooks: (name: string, hooks: RuntimeHooks) => void;
|
|
133
|
+
unregisterHooks: (name: string) => boolean;
|
|
134
|
+
getRegisteredHooks: () => string[];
|
|
135
|
+
registry: LokaScriptRegistry;
|
|
136
|
+
registerFetchResponseType: typeof registerFetchResponseType;
|
|
137
|
+
version: string;
|
|
138
|
+
};
|
|
139
|
+
export default hyperfixiAPI;
|
|
140
|
+
//# sourceMappingURL=browser-bundle.d.ts.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { evalHyperScript, evalHyperScriptAsync, evalHyperScriptSmart } from './eval-hyperscript';
|
|
2
|
+
import { hyperscript } from '../api/hyperscript-api';
|
|
3
|
+
import { defaultAttributeProcessor } from '../dom/attribute-processor';
|
|
4
|
+
import { tailwindExtension } from '../extensions/tailwind';
|
|
5
|
+
import { Parser } from '../parser/parser';
|
|
6
|
+
import { Runtime } from '../runtime/runtime';
|
|
7
|
+
import { tokenize } from '../parser/tokenizer';
|
|
8
|
+
import { debug } from '../utils/debug';
|
|
9
|
+
import { styleBatcher, ObjectPool } from '../utils/performance';
|
|
10
|
+
import { preloadDocumentFeatures, loadRequiredFeatures, detectFeatures, isFeatureLoaded, getLoadedFeatures, preloadFeatures } from './feature-loader';
|
|
11
|
+
declare const hyperfixi: {
|
|
12
|
+
evalHyperScript: typeof evalHyperScript;
|
|
13
|
+
evalHyperScriptAsync: typeof evalHyperScriptAsync;
|
|
14
|
+
evalHyperScriptSmart: typeof evalHyperScriptSmart;
|
|
15
|
+
evaluate: typeof evalHyperScript;
|
|
16
|
+
compile: (code: string) => import("../api/hyperscript-api").CompileResult;
|
|
17
|
+
execute: (ast: import("..").ASTNode, context?: import("..").ExecutionContext) => Promise<unknown>;
|
|
18
|
+
run: (code: string, context?: any) => Promise<unknown>;
|
|
19
|
+
createContext: (element?: HTMLElement | null, parent?: import("..").ExecutionContext) => import("..").ExecutionContext;
|
|
20
|
+
createRuntime: (options?: import("../runtime/runtime").RuntimeOptions) => Runtime;
|
|
21
|
+
Parser: typeof Parser;
|
|
22
|
+
Runtime: typeof Runtime;
|
|
23
|
+
tokenize: typeof tokenize;
|
|
24
|
+
processNode: (element: Element | Document) => Promise<void>;
|
|
25
|
+
process: (element: Element | Document) => Promise<void>;
|
|
26
|
+
attributeProcessor: import("../dom/attribute-processor").AttributeProcessor;
|
|
27
|
+
tailwindExtension: import("../extensions/tailwind").TailwindExtension;
|
|
28
|
+
styleBatcher: import("../utils/performance").StyleBatcher;
|
|
29
|
+
ObjectPool: typeof ObjectPool;
|
|
30
|
+
debug: {
|
|
31
|
+
command: (...args: any[]) => void;
|
|
32
|
+
event: (...args: any[]) => void;
|
|
33
|
+
parse: (...args: any[]) => void;
|
|
34
|
+
expr: (...args: any[]) => void;
|
|
35
|
+
expressions: (...args: any[]) => void;
|
|
36
|
+
style: (...args: any[]) => void;
|
|
37
|
+
runtime: (...args: any[]) => void;
|
|
38
|
+
loop: (...args: any[]) => void;
|
|
39
|
+
async: (...args: any[]) => void;
|
|
40
|
+
};
|
|
41
|
+
features: {
|
|
42
|
+
preloadDocument: typeof preloadDocumentFeatures;
|
|
43
|
+
loadRequired: typeof loadRequiredFeatures;
|
|
44
|
+
detect: typeof detectFeatures;
|
|
45
|
+
isLoaded: typeof isFeatureLoaded;
|
|
46
|
+
getLoaded: typeof getLoadedFeatures;
|
|
47
|
+
preload: typeof preloadFeatures;
|
|
48
|
+
};
|
|
49
|
+
version: string;
|
|
50
|
+
};
|
|
51
|
+
export { evalHyperScript, evalHyperScriptAsync, evalHyperScriptSmart, hyperscript, Parser, Runtime, tokenize, defaultAttributeProcessor, tailwindExtension, debug, styleBatcher, ObjectPool, preloadDocumentFeatures, loadRequiredFeatures, detectFeatures, isFeatureLoaded, getLoadedFeatures, preloadFeatures, };
|
|
52
|
+
export default hyperfixi;
|
|
53
|
+
//# sourceMappingURL=browser-modular.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Page } from '@playwright/test';
|
|
2
|
+
export declare function waitForHyperfixi(page: Page, timeout?: number): Promise<void>;
|
|
3
|
+
export declare function waitForEvalHyperScript(page: Page, timeout?: number): Promise<void>;
|
|
4
|
+
export declare function waitForBehaviors(page: Page, timeout?: number): Promise<void>;
|
|
5
|
+
export declare function waitForSemantic(page: Page, timeout?: number): Promise<void>;
|
|
6
|
+
export declare function waitForMultilingual(page: Page, timeout?: number): Promise<void>;
|
|
7
|
+
export declare function waitForClass(page: Page, selector: string, className: string, timeout?: number): Promise<void>;
|
|
8
|
+
export declare function waitForNoClass(page: Page, selector: string, className: string, timeout?: number): Promise<void>;
|
|
9
|
+
export declare function waitForText(page: Page, selector: string, expectedText: string | RegExp, timeout?: number): Promise<void>;
|
|
10
|
+
export declare function waitForInnerHTML(page: Page, selector: string, expectedHTML: string, timeout?: number): Promise<void>;
|
|
11
|
+
export declare function waitForVisible(page: Page, selector: string, timeout?: number): Promise<void>;
|
|
12
|
+
export declare function waitForHidden(page: Page, selector: string, timeout?: number): Promise<void>;
|
|
13
|
+
export interface ErrorCollector {
|
|
14
|
+
errors: string[];
|
|
15
|
+
attach: () => void;
|
|
16
|
+
clear: () => void;
|
|
17
|
+
getCriticalErrors: () => string[];
|
|
18
|
+
}
|
|
19
|
+
export declare function createErrorCollector(page: Page): ErrorCollector;
|
|
20
|
+
export declare function expectNoCriticalErrors(collector: ErrorCollector): void;
|
|
21
|
+
//# sourceMappingURL=test-utils.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ExecutionContext } from '../types/core';
|
|
2
|
+
export interface HyperScriptContext {
|
|
3
|
+
me?: any;
|
|
4
|
+
locals?: Record<string, any>;
|
|
5
|
+
it?: any;
|
|
6
|
+
result?: any;
|
|
7
|
+
you?: any;
|
|
8
|
+
globals?: Record<string, any>;
|
|
9
|
+
language?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function evalHyperScript(script: string, context?: HyperScriptContext | ExecutionContext): Promise<any>;
|
|
12
|
+
export declare function evalHyperScriptAsync(expression: string, context?: HyperScriptContext | ExecutionContext): Promise<any>;
|
|
13
|
+
export declare function isAsyncExpression(expression: string): boolean;
|
|
14
|
+
export declare function evalHyperScriptSmart(expression: string, context?: HyperScriptContext | ExecutionContext): Promise<any>;
|
|
15
|
+
//# sourceMappingURL=eval-hyperscript.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function detectFeatures(code: string | string[]): Set<string>;
|
|
2
|
+
export declare function loadRequiredFeatures(code: string | string[]): Promise<void>;
|
|
3
|
+
export declare function collectHyperscriptFromDocument(): string[];
|
|
4
|
+
export declare function preloadDocumentFeatures(): Promise<void>;
|
|
5
|
+
export declare function isFeatureLoaded(feature: string): boolean;
|
|
6
|
+
export declare function getLoadedFeatures(): string[];
|
|
7
|
+
export declare function preloadFeatures(features: string[]): Promise<void>;
|
|
8
|
+
//# sourceMappingURL=feature-loader.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare function make(htmlString: string): HTMLElement;
|
|
2
|
+
export declare function clearWorkArea(): void;
|
|
3
|
+
export declare function evalHyperScript(expressionSource: string, contextOptions?: {
|
|
4
|
+
me?: HTMLElement;
|
|
5
|
+
locals?: Record<string, any>;
|
|
6
|
+
globals?: Record<string, any>;
|
|
7
|
+
it?: any;
|
|
8
|
+
you?: HTMLElement;
|
|
9
|
+
}): Promise<any>;
|
|
10
|
+
export declare function evalHyperScriptSync(expressionSource: string, contextOptions?: {
|
|
11
|
+
me?: HTMLElement;
|
|
12
|
+
locals?: Record<string, any>;
|
|
13
|
+
globals?: Record<string, any>;
|
|
14
|
+
it?: any;
|
|
15
|
+
you?: HTMLElement;
|
|
16
|
+
}): any;
|
|
17
|
+
export declare function getParseErrorFor(source: string): string | null;
|
|
18
|
+
export declare const testUtils: {
|
|
19
|
+
make: typeof make;
|
|
20
|
+
clearWorkArea: typeof clearWorkArea;
|
|
21
|
+
evalHyperScript: typeof evalHyperScript;
|
|
22
|
+
evalHyperScriptSync: typeof evalHyperScriptSync;
|
|
23
|
+
getParseErrorFor: typeof getParseErrorFor;
|
|
24
|
+
};
|
|
25
|
+
export declare function createHyperscriptCompat(): {
|
|
26
|
+
evaluate: typeof evalHyperScript;
|
|
27
|
+
make: typeof make;
|
|
28
|
+
clearWorkArea: typeof clearWorkArea;
|
|
29
|
+
getParseErrorFor: typeof getParseErrorFor;
|
|
30
|
+
version: string;
|
|
31
|
+
features: {
|
|
32
|
+
expressions: boolean;
|
|
33
|
+
commands: boolean;
|
|
34
|
+
parser: boolean;
|
|
35
|
+
events: boolean;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=hyperscript-adapter.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare function createHyperScriptTestAdapter(): (src: string, ctx?: any) => Promise<any>;
|
|
2
|
+
export declare const testUtils: {
|
|
3
|
+
evalHyperScript: (src: string, ctx?: any) => Promise<any>;
|
|
4
|
+
getParseErrorFor: (src: string, ctx?: any) => string;
|
|
5
|
+
byId: (id: string) => Element | null;
|
|
6
|
+
make: (htmlStr: string) => Element;
|
|
7
|
+
clearWorkArea: () => void;
|
|
8
|
+
getWorkArea: () => Element | null;
|
|
9
|
+
promiseAnIntIn: (millis: number) => Promise<number>;
|
|
10
|
+
promiseValueBackIn: (value: any, millis: number) => Promise<any>;
|
|
11
|
+
startsWith: (str: string, expected: string) => void;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=test-adapter.d.ts.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { ASTNode, ExecutionContext } from '../types/core';
|
|
2
|
+
import type { ExecutionResult } from '../types/result';
|
|
3
|
+
export declare class BaseExpressionEvaluator {
|
|
4
|
+
protected expressionRegistry: Map<string, any>;
|
|
5
|
+
constructor();
|
|
6
|
+
protected registerCategory(expressions: Record<string, any>): void;
|
|
7
|
+
protected unwrapSelectorResult<T>(value: T | T[] | NodeList): T;
|
|
8
|
+
evaluate(node: ASTNode, context: ExecutionContext): Promise<any>;
|
|
9
|
+
evaluateWithResult(node: ASTNode, context: ExecutionContext): Promise<ExecutionResult<unknown>>;
|
|
10
|
+
protected evaluateArrayLiteral(node: any, context: ExecutionContext): Promise<any[]>;
|
|
11
|
+
protected evaluateObjectLiteral(node: any, context: ExecutionContext): Promise<Record<string, any>>;
|
|
12
|
+
protected evaluateConditionalExpression(node: any, context: ExecutionContext): Promise<any>;
|
|
13
|
+
protected evaluateTemplateLiteral(node: any, context: ExecutionContext): Promise<string>;
|
|
14
|
+
protected evaluateSimpleExpression(exprCode: string, context: ExecutionContext): Promise<any>;
|
|
15
|
+
protected resolveValue(name: string, context: ExecutionContext): Promise<any>;
|
|
16
|
+
protected evaluateIdentifier(node: {
|
|
17
|
+
name: string;
|
|
18
|
+
scope?: 'local' | 'global';
|
|
19
|
+
}, context: ExecutionContext): Promise<any>;
|
|
20
|
+
protected evaluateLiteral(node: {
|
|
21
|
+
value: any;
|
|
22
|
+
}, _context: ExecutionContext): Promise<any>;
|
|
23
|
+
protected evaluateContextReference(node: {
|
|
24
|
+
contextType: string;
|
|
25
|
+
name: string;
|
|
26
|
+
}, context: ExecutionContext): Promise<any>;
|
|
27
|
+
protected evaluateMemberExpression(node: any, context: ExecutionContext): Promise<any>;
|
|
28
|
+
private coerceArithmeticOperand;
|
|
29
|
+
protected evaluateBinaryExpression(node: any, context: ExecutionContext): Promise<any>;
|
|
30
|
+
protected evaluateUnaryExpression(node: any, context: ExecutionContext): Promise<any>;
|
|
31
|
+
protected evaluateCallExpression(node: any, context: ExecutionContext): Promise<any>;
|
|
32
|
+
private evaluateMethodCall;
|
|
33
|
+
protected evaluateSelector(node: {
|
|
34
|
+
value: string;
|
|
35
|
+
}, context: ExecutionContext): Promise<HTMLElement[]>;
|
|
36
|
+
protected evaluateAttributeAccess(node: {
|
|
37
|
+
attributeName: string;
|
|
38
|
+
}, context: ExecutionContext): string | boolean | null;
|
|
39
|
+
getAvailableExpressions(): string[];
|
|
40
|
+
protected evaluateDollarExpression(node: {
|
|
41
|
+
expression: any;
|
|
42
|
+
}, context: ExecutionContext): Promise<any>;
|
|
43
|
+
protected evaluatePossessiveExpression(node: any, context: ExecutionContext): Promise<any>;
|
|
44
|
+
hasExpression(name: string): boolean;
|
|
45
|
+
protected evaluateCSSSelector(node: {
|
|
46
|
+
selectorType: string;
|
|
47
|
+
selector: string;
|
|
48
|
+
}, context: ExecutionContext): Promise<HTMLElement | HTMLElement[] | null>;
|
|
49
|
+
protected evaluateIdSelector(node: {
|
|
50
|
+
value: string;
|
|
51
|
+
}, context: ExecutionContext): Promise<Element | null>;
|
|
52
|
+
protected evaluateQueryReference(node: {
|
|
53
|
+
selector: string;
|
|
54
|
+
}, context: ExecutionContext): Promise<NodeList>;
|
|
55
|
+
protected evaluatePropertyAccess(node: {
|
|
56
|
+
object: ASTNode;
|
|
57
|
+
property: {
|
|
58
|
+
name?: string;
|
|
59
|
+
value?: string;
|
|
60
|
+
};
|
|
61
|
+
}, context: ExecutionContext): Promise<any>;
|
|
62
|
+
protected evaluatePropertyOfExpression(node: {
|
|
63
|
+
property: {
|
|
64
|
+
name?: string;
|
|
65
|
+
value?: string;
|
|
66
|
+
};
|
|
67
|
+
target: ASTNode;
|
|
68
|
+
}, context: ExecutionContext): Promise<any>;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=base-expression-evaluator.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ExecutionContext } from '../types/core';
|
|
2
|
+
import type { EvaluateFn, UnwrapFn } from './evaluator-types';
|
|
3
|
+
export declare function coerceArithmeticOperand(value: unknown): unknown;
|
|
4
|
+
export declare function evaluateBinaryExpression(node: any, context: ExecutionContext, evaluate: EvaluateFn, unwrap: UnwrapFn, expressionRegistry: Map<string, any>, evaluateSelector: (node: {
|
|
5
|
+
value: string;
|
|
6
|
+
}, context: ExecutionContext) => Promise<HTMLElement[]>): Promise<any>;
|
|
7
|
+
//# sourceMappingURL=binary-expression-evaluator.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ExecutionContext } from '../types/core';
|
|
2
|
+
import type { EvaluateFn, UnwrapFn } from './evaluator-types';
|
|
3
|
+
export declare function evaluateCallExpression(node: any, context: ExecutionContext, evaluate: EvaluateFn, unwrap: UnwrapFn, expressionRegistry: Map<string, any>, evaluateSelector: (node: {
|
|
4
|
+
value: string;
|
|
5
|
+
}, context: ExecutionContext) => Promise<HTMLElement[]>): Promise<any>;
|
|
6
|
+
export declare function evaluateMethodCall(callee: any, args: any[], context: ExecutionContext, evaluate: EvaluateFn, unwrap: UnwrapFn): Promise<any>;
|
|
7
|
+
//# sourceMappingURL=call-expression-evaluator.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BaseExpressionEvaluator } from './base-expression-evaluator';
|
|
2
|
+
export declare class ConfigurableExpressionEvaluator extends BaseExpressionEvaluator {
|
|
3
|
+
constructor(categories: Record<string, any>[]);
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=configurable-expression-evaluator.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ExecutionContext } from '../types/core';
|
|
2
|
+
export declare function createContext(element?: Element | null, globals?: Map<string, any>): ExecutionContext;
|
|
3
|
+
export declare function getSharedGlobals(): Map<string, any>;
|
|
4
|
+
export declare function createChildContext(parent: ExecutionContext, element?: Element | null): ExecutionContext;
|
|
5
|
+
export declare function ensureContext(userContext?: Partial<ExecutionContext> | any): ExecutionContext;
|
|
6
|
+
export declare function setContextValue(context: ExecutionContext, name: string, value: any, isGlobal?: boolean): void;
|
|
7
|
+
export declare function getContextValue(context: ExecutionContext, name: string): any;
|
|
8
|
+
export declare function hasContextValue(context: ExecutionContext, name: string): boolean;
|
|
9
|
+
export declare function deleteContextValue(context: ExecutionContext, name: string): boolean;
|
|
10
|
+
export declare function snapshotContext(context: ExecutionContext): Record<string, any>;
|
|
11
|
+
export declare function restoreContext(context: ExecutionContext, snapshot: Record<string, any>): void;
|
|
12
|
+
export declare function cloneContext(context: ExecutionContext): ExecutionContext;
|
|
13
|
+
export declare function mergeContexts(target: ExecutionContext, source: ExecutionContext): void;
|
|
14
|
+
export declare function getContextVariableNames(context: ExecutionContext): string[];
|
|
15
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const SWAP_STRATEGIES: {
|
|
2
|
+
readonly OUTER_HTML: "outerHTML";
|
|
3
|
+
readonly INNER_HTML: "innerHTML";
|
|
4
|
+
readonly BEFORE_END: "beforeend";
|
|
5
|
+
readonly AFTER_BEGIN: "afterbegin";
|
|
6
|
+
};
|
|
7
|
+
export type SwapStrategy = (typeof SWAP_STRATEGIES)[keyof typeof SWAP_STRATEGIES];
|
|
8
|
+
export type CustomSwapFn = (opts: {
|
|
9
|
+
target: Element;
|
|
10
|
+
text: string;
|
|
11
|
+
}) => void;
|
|
12
|
+
export declare function mapPlacementToSwap(placement: string): string;
|
|
13
|
+
export declare function applySwap(target: Element, content: string, swapStrategy: string | CustomSwapFn): boolean;
|
|
14
|
+
export declare function isElementInDocument(element: Element): boolean;
|
|
15
|
+
//# sourceMappingURL=dom.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ASTNode, ExecutionContext } from '../types/core';
|
|
2
|
+
export type EvaluateFn = (node: ASTNode | any, context: ExecutionContext) => Promise<any>;
|
|
3
|
+
export type UnwrapFn = (value: any) => any;
|
|
4
|
+
export type EvaluateSelectorFn = (node: any, context: ExecutionContext) => Promise<any>;
|
|
5
|
+
//# sourceMappingURL=evaluator-types.d.ts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { HyperscriptEvent, ExecutionContext } from '../types/core';
|
|
2
|
+
interface ListenerInfo {
|
|
3
|
+
element: HTMLElement;
|
|
4
|
+
eventType: string;
|
|
5
|
+
handler: EventListener;
|
|
6
|
+
options?: AddEventListenerOptions & {
|
|
7
|
+
delegated?: boolean;
|
|
8
|
+
};
|
|
9
|
+
wrappedHandler: EventListener;
|
|
10
|
+
}
|
|
11
|
+
export interface HyperscriptEventManager {
|
|
12
|
+
listeners: Map<string, ListenerInfo>;
|
|
13
|
+
delegatedListeners: Map<string, Set<string>>;
|
|
14
|
+
}
|
|
15
|
+
export type DelegationCleanupRegistrar = (cleanup: () => void, description: string) => void;
|
|
16
|
+
export declare function setDelegationCleanupRegistrar(registrar: DelegationCleanupRegistrar): void;
|
|
17
|
+
export declare function createEventManager(): HyperscriptEventManager;
|
|
18
|
+
export declare function registerEventListener(manager: HyperscriptEventManager, element: HTMLElement, eventType: string, handler: EventListener, options?: AddEventListenerOptions & {
|
|
19
|
+
delegated?: boolean;
|
|
20
|
+
}): string;
|
|
21
|
+
export declare function unregisterEventListener(manager: HyperscriptEventManager, listenerId: string): boolean;
|
|
22
|
+
export declare function dispatchCustomEvent(element: HTMLElement, eventType: string, detail?: any, options?: CustomEventInit): boolean;
|
|
23
|
+
export declare function createHyperscriptEvent(eventName: string, data: {
|
|
24
|
+
element: HTMLElement;
|
|
25
|
+
context: ExecutionContext;
|
|
26
|
+
command?: string;
|
|
27
|
+
result?: any;
|
|
28
|
+
error?: Error;
|
|
29
|
+
originalEvent?: Event;
|
|
30
|
+
}): HyperscriptEvent;
|
|
31
|
+
export declare function setupEventDelegation(): void;
|
|
32
|
+
export declare function cleanupEventDelegation(): void;
|
|
33
|
+
export declare function registerManagerForDelegation(manager: HyperscriptEventManager): void;
|
|
34
|
+
export declare function unregisterManagerFromDelegation(manager: HyperscriptEventManager): void;
|
|
35
|
+
export declare function getActiveListeners(manager: HyperscriptEventManager): ListenerInfo[];
|
|
36
|
+
export declare function getListenerCount(manager: HyperscriptEventManager): number;
|
|
37
|
+
export declare function createDebouncedHandler(handler: EventListener, delay: number): EventListener;
|
|
38
|
+
export declare function createThrottledHandler(handler: EventListener, limit: number): EventListener;
|
|
39
|
+
export declare function createOnceHandler(handler: EventListener): EventListener;
|
|
40
|
+
export declare function waitForEvent(element: EventTarget, eventType: string, timeout?: number): Promise<Event>;
|
|
41
|
+
export declare function emitConfigEvent(element: HTMLElement, cfg: any): boolean;
|
|
42
|
+
export declare function emitBeforeEvent(element: HTMLElement, cfg: any): boolean;
|
|
43
|
+
export declare function emitAfterEvent(element: HTMLElement, cfg: any): boolean;
|
|
44
|
+
export declare function emitErrorEvent(element: HTMLElement, error: Error, cfg: any, command: any): void;
|
|
45
|
+
export declare function emitFinallyEvent(element: HTMLElement, cfg: any): void;
|
|
46
|
+
export declare function emitSwappedEvent(element: HTMLElement, cfg: any): void;
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface HyperscriptRuntime {
|
|
2
|
+
resolve(expression: unknown, context: unknown): Promise<unknown>;
|
|
3
|
+
}
|
|
4
|
+
export interface FetchOptions {
|
|
5
|
+
method?: string;
|
|
6
|
+
body?: BodyInit | null;
|
|
7
|
+
headers?: HeadersInit;
|
|
8
|
+
}
|
|
9
|
+
export interface ParsedFetchCommand {
|
|
10
|
+
options?: {
|
|
11
|
+
method?: unknown;
|
|
12
|
+
body?: unknown;
|
|
13
|
+
headers?: unknown;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface FixiConfig {
|
|
17
|
+
url: string;
|
|
18
|
+
method: string;
|
|
19
|
+
body: BodyInit | null | undefined;
|
|
20
|
+
headers: HeadersInit;
|
|
21
|
+
target: Element;
|
|
22
|
+
swap: string;
|
|
23
|
+
trigger: Event;
|
|
24
|
+
response: Response | null;
|
|
25
|
+
text: string | null;
|
|
26
|
+
}
|
|
27
|
+
export declare function executeHTTPRequest(url: string, options?: Partial<FetchOptions>): Promise<{
|
|
28
|
+
response: Response;
|
|
29
|
+
text: string;
|
|
30
|
+
}>;
|
|
31
|
+
export declare function resolveExpression(expression: unknown, runtime: HyperscriptRuntime, context: unknown): Promise<unknown>;
|
|
32
|
+
export declare function buildFetchOptions(command: ParsedFetchCommand, runtime: HyperscriptRuntime, context: unknown): Promise<Partial<FetchOptions>>;
|
|
33
|
+
export declare function createFixiConfig(url: string, options: Partial<FetchOptions>, element: Element, event: Event, target?: Element | null, swap?: string): FixiConfig;
|
|
34
|
+
//# sourceMappingURL=executor.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ASTNode, ExecutionContext } from '../types/core';
|
|
2
|
+
import { type ExpressionCategory } from '../expressions/expression-tiers';
|
|
3
|
+
import { BaseExpressionEvaluator } from './base-expression-evaluator';
|
|
4
|
+
export interface LazyExpressionEvaluatorOptions {
|
|
5
|
+
preload?: 'core' | 'common' | 'all' | 'none';
|
|
6
|
+
categories?: ExpressionCategory[];
|
|
7
|
+
}
|
|
8
|
+
export declare class LazyExpressionEvaluator extends BaseExpressionEvaluator {
|
|
9
|
+
private loadedCategories;
|
|
10
|
+
private loadPromises;
|
|
11
|
+
private options;
|
|
12
|
+
constructor(options?: LazyExpressionEvaluatorOptions);
|
|
13
|
+
private preloadExpressions;
|
|
14
|
+
private preloadTier;
|
|
15
|
+
private loadCategory;
|
|
16
|
+
private _loadCategoryImpl;
|
|
17
|
+
private getCategoryForNodeType;
|
|
18
|
+
evaluate(node: ASTNode, context: ExecutionContext): Promise<any>;
|
|
19
|
+
warmupExpressions(categories: string[]): Promise<void>;
|
|
20
|
+
getLoadedCategories(): string[];
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=lazy-expression-evaluator.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface HyperscriptParser {
|
|
2
|
+
parseElementExpression(): unknown;
|
|
3
|
+
raiseParseError(tokens: TokenStream, message: string): never;
|
|
4
|
+
}
|
|
5
|
+
export interface TokenStream {
|
|
6
|
+
matchToken(token: string): boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface BaseCommand {
|
|
9
|
+
url: unknown;
|
|
10
|
+
placement: string | null;
|
|
11
|
+
target: unknown;
|
|
12
|
+
options: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
export declare function parseURL(parser: HyperscriptParser, tokens: TokenStream): unknown;
|
|
15
|
+
export declare function parseTarget(parser: HyperscriptParser, _tokens: TokenStream): unknown;
|
|
16
|
+
export declare function parseOptionValue(parser: HyperscriptParser, _tokens: TokenStream): unknown;
|
|
17
|
+
export declare function parseColon(parser: HyperscriptParser, tokens: TokenStream): void;
|
|
18
|
+
export declare function parseComma(tokens: TokenStream): boolean;
|
|
19
|
+
export declare function parseOptionalAnd(tokens: TokenStream): boolean;
|
|
20
|
+
export declare function createBaseCommand(url: unknown): BaseCommand;
|
|
21
|
+
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ExecutionContext } from '../types/core';
|
|
2
|
+
export declare function evaluateSelector(node: {
|
|
3
|
+
value: string;
|
|
4
|
+
}, context: ExecutionContext): HTMLElement[];
|
|
5
|
+
export declare function evaluateCSSSelector(node: {
|
|
6
|
+
selectorType: string;
|
|
7
|
+
selector: string;
|
|
8
|
+
}, context: ExecutionContext): HTMLElement | HTMLElement[] | null;
|
|
9
|
+
export declare function evaluateIdSelector(node: {
|
|
10
|
+
value: string;
|
|
11
|
+
}, context: ExecutionContext): Element | null;
|
|
12
|
+
export declare function evaluateQueryReference(node: {
|
|
13
|
+
selector: string;
|
|
14
|
+
}, context: ExecutionContext): NodeList;
|
|
15
|
+
//# sourceMappingURL=selector-evaluator.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ExecutionContext } from '../types/core';
|
|
2
|
+
export declare function resolveValue(name: string, context: ExecutionContext): Promise<any>;
|
|
3
|
+
export declare function evaluateSimpleExpression(exprCode: string, context: ExecutionContext): Promise<any>;
|
|
4
|
+
export declare function evaluateTemplateLiteral(node: any, context: ExecutionContext): Promise<string>;
|
|
5
|
+
//# sourceMappingURL=template-literal-evaluator.d.ts.map
|