@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,118 @@
|
|
|
1
|
+
export type TokenType = 'STRING' | 'NUMBER' | 'BOOLEAN' | 'NULL' | 'IDENTIFIER' | 'KEYWORD' | 'OPERATOR' | 'COMPARISON' | 'LOGICAL' | 'ASSIGNMENT' | 'LPAREN' | 'RPAREN' | 'LBRACKET' | 'RBRACKET' | 'LBRACE' | 'RBRACE' | 'COMMA' | 'DOT' | 'COLON' | 'SEMICOLON' | 'APOSTROPHE' | 'WHITESPACE' | 'NEWLINE' | 'EOF' | 'UNKNOWN';
|
|
2
|
+
export interface Token {
|
|
3
|
+
type: TokenType;
|
|
4
|
+
value: string;
|
|
5
|
+
position: number;
|
|
6
|
+
line: number;
|
|
7
|
+
column: number;
|
|
8
|
+
}
|
|
9
|
+
export type ASTNodeType = 'Literal' | 'Identifier' | 'BinaryExpression' | 'UnaryExpression' | 'CallExpression' | 'MemberExpression' | 'ConditionalExpression' | 'ExpressionStatement' | 'BlockStatement' | 'EventStatement' | 'CommandStatement' | 'EventHandler' | 'Command' | 'Selector' | 'PropertyAccess' | 'PossessiveExpression';
|
|
10
|
+
export interface BaseASTNode {
|
|
11
|
+
type: ASTNodeType;
|
|
12
|
+
position: {
|
|
13
|
+
start: number;
|
|
14
|
+
end: number;
|
|
15
|
+
line: number;
|
|
16
|
+
column: number;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface LiteralNode extends BaseASTNode {
|
|
20
|
+
type: 'Literal';
|
|
21
|
+
value: string | number | boolean | null;
|
|
22
|
+
raw: string;
|
|
23
|
+
}
|
|
24
|
+
export interface IdentifierNode extends BaseASTNode {
|
|
25
|
+
type: 'Identifier';
|
|
26
|
+
name: string;
|
|
27
|
+
}
|
|
28
|
+
export interface BinaryExpressionNode extends BaseASTNode {
|
|
29
|
+
type: 'BinaryExpression';
|
|
30
|
+
operator: string;
|
|
31
|
+
left: ASTNode;
|
|
32
|
+
right: ASTNode;
|
|
33
|
+
}
|
|
34
|
+
export interface UnaryExpressionNode extends BaseASTNode {
|
|
35
|
+
type: 'UnaryExpression';
|
|
36
|
+
operator: string;
|
|
37
|
+
argument: ASTNode;
|
|
38
|
+
prefix: boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface CallExpressionNode extends BaseASTNode {
|
|
41
|
+
type: 'CallExpression';
|
|
42
|
+
callee: ASTNode;
|
|
43
|
+
arguments: ASTNode[];
|
|
44
|
+
}
|
|
45
|
+
export interface MemberExpressionNode extends BaseASTNode {
|
|
46
|
+
type: 'MemberExpression';
|
|
47
|
+
object: ASTNode;
|
|
48
|
+
property: ASTNode;
|
|
49
|
+
computed: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface EventHandlerNode extends BaseASTNode {
|
|
52
|
+
type: 'EventHandler';
|
|
53
|
+
event: string;
|
|
54
|
+
selector?: string;
|
|
55
|
+
commands: CommandNode[];
|
|
56
|
+
}
|
|
57
|
+
export interface CommandNode extends BaseASTNode {
|
|
58
|
+
type: 'Command';
|
|
59
|
+
name: string;
|
|
60
|
+
arguments: ASTNode[];
|
|
61
|
+
target?: ASTNode;
|
|
62
|
+
}
|
|
63
|
+
export interface SelectorNode extends BaseASTNode {
|
|
64
|
+
type: 'Selector';
|
|
65
|
+
value: string;
|
|
66
|
+
}
|
|
67
|
+
export interface PossessiveExpressionNode extends BaseASTNode {
|
|
68
|
+
type: 'PossessiveExpression';
|
|
69
|
+
object: ASTNode;
|
|
70
|
+
property: ASTNode;
|
|
71
|
+
}
|
|
72
|
+
export type ASTNode = LiteralNode | IdentifierNode | BinaryExpressionNode | UnaryExpressionNode | CallExpressionNode | MemberExpressionNode | EventHandlerNode | CommandNode | SelectorNode | PossessiveExpressionNode;
|
|
73
|
+
export interface ParseResult {
|
|
74
|
+
ast: ASTNode;
|
|
75
|
+
tokens: Token[];
|
|
76
|
+
errors: ParseError[];
|
|
77
|
+
}
|
|
78
|
+
export interface ParseError {
|
|
79
|
+
name?: string;
|
|
80
|
+
message: string;
|
|
81
|
+
position: number;
|
|
82
|
+
line: number;
|
|
83
|
+
column: number;
|
|
84
|
+
token?: Token;
|
|
85
|
+
}
|
|
86
|
+
export interface KeywordResolver {
|
|
87
|
+
resolve(token: string): string | undefined;
|
|
88
|
+
isCommand(token: string): boolean;
|
|
89
|
+
isKeyword(token: string): boolean;
|
|
90
|
+
}
|
|
91
|
+
export interface SemanticAnalyzerInterface {
|
|
92
|
+
analyze(input: string, language: string): {
|
|
93
|
+
confidence: number;
|
|
94
|
+
command?: {
|
|
95
|
+
name: string;
|
|
96
|
+
roles: ReadonlyMap<string, {
|
|
97
|
+
type: string;
|
|
98
|
+
value: string;
|
|
99
|
+
}>;
|
|
100
|
+
};
|
|
101
|
+
errors?: string[];
|
|
102
|
+
tokensConsumed?: number;
|
|
103
|
+
};
|
|
104
|
+
supportsLanguage(language: string): boolean;
|
|
105
|
+
supportedLanguages(): string[];
|
|
106
|
+
}
|
|
107
|
+
export interface ParserOptions {
|
|
108
|
+
includeWhitespace?: boolean;
|
|
109
|
+
includeComments?: boolean;
|
|
110
|
+
strict?: boolean;
|
|
111
|
+
keywords?: KeywordResolver;
|
|
112
|
+
semanticAnalyzer?: SemanticAnalyzerInterface;
|
|
113
|
+
language?: string;
|
|
114
|
+
semanticConfidenceThreshold?: number;
|
|
115
|
+
registryIntegration?: any;
|
|
116
|
+
}
|
|
117
|
+
export declare const HYPERSCRIPT_KEYWORDS: Set<string>;
|
|
118
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export declare class LRUCache<K, V> {
|
|
2
|
+
private readonly maxSize;
|
|
3
|
+
private readonly ttl;
|
|
4
|
+
private cache;
|
|
5
|
+
private accessOrder;
|
|
6
|
+
private accessCounter;
|
|
7
|
+
constructor(maxSize?: number, ttl?: number);
|
|
8
|
+
get(key: K): V | undefined;
|
|
9
|
+
set(key: K, value: V): void;
|
|
10
|
+
delete(key: K): boolean;
|
|
11
|
+
clear(): void;
|
|
12
|
+
size(): number;
|
|
13
|
+
private evictLRU;
|
|
14
|
+
getStats(): {
|
|
15
|
+
size: number;
|
|
16
|
+
maxSize: number;
|
|
17
|
+
hitRate: number;
|
|
18
|
+
avgAge: number;
|
|
19
|
+
totalAccesses: number;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export declare class HyperscriptCache {
|
|
23
|
+
private readonly domQueryCache;
|
|
24
|
+
private readonly exprResultCache;
|
|
25
|
+
private readonly cssMatchCache;
|
|
26
|
+
private readonly formValueCache;
|
|
27
|
+
private hits;
|
|
28
|
+
private misses;
|
|
29
|
+
querySelector(selector: string): Element | null;
|
|
30
|
+
querySelectorAll(selector: string): Element[];
|
|
31
|
+
getElementById(id: string): Element | null;
|
|
32
|
+
getElementsByClassName(className: string): Element[];
|
|
33
|
+
matches(element: Element, selector: string): boolean;
|
|
34
|
+
getExpressionResult(exprKey: string): any;
|
|
35
|
+
setExpressionResult(exprKey: string, result: any): void;
|
|
36
|
+
getFormValue(form: HTMLFormElement): any;
|
|
37
|
+
setFormValue(form: HTMLFormElement, value: any): void;
|
|
38
|
+
invalidateElementCache(element: Element): void;
|
|
39
|
+
invalidateAll(): void;
|
|
40
|
+
private getElementCacheKey;
|
|
41
|
+
private getElementPosition;
|
|
42
|
+
getPerformanceStats(): {
|
|
43
|
+
hits: number;
|
|
44
|
+
misses: number;
|
|
45
|
+
hitRate: number;
|
|
46
|
+
domQueryCache: {
|
|
47
|
+
size: number;
|
|
48
|
+
maxSize: number;
|
|
49
|
+
hitRate: number;
|
|
50
|
+
avgAge: number;
|
|
51
|
+
totalAccesses: number;
|
|
52
|
+
};
|
|
53
|
+
exprResultCache: {
|
|
54
|
+
size: number;
|
|
55
|
+
maxSize: number;
|
|
56
|
+
hitRate: number;
|
|
57
|
+
avgAge: number;
|
|
58
|
+
totalAccesses: number;
|
|
59
|
+
};
|
|
60
|
+
cssMatchCache: {
|
|
61
|
+
size: number;
|
|
62
|
+
maxSize: number;
|
|
63
|
+
hitRate: number;
|
|
64
|
+
avgAge: number;
|
|
65
|
+
totalAccesses: number;
|
|
66
|
+
};
|
|
67
|
+
formValueCache: {
|
|
68
|
+
size: number;
|
|
69
|
+
maxSize: number;
|
|
70
|
+
hitRate: number;
|
|
71
|
+
avgAge: number;
|
|
72
|
+
totalAccesses: number;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
cleanup(): void;
|
|
76
|
+
}
|
|
77
|
+
export declare const globalCache: HyperscriptCache;
|
|
78
|
+
//# sourceMappingURL=expression-cache.d.ts.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ExecutionContext, ExpressionImplementation } from '../types/core';
|
|
2
|
+
export interface PerformanceMetrics {
|
|
3
|
+
tokenizationTime: number;
|
|
4
|
+
evaluationTime: number;
|
|
5
|
+
cacheHitRate: number;
|
|
6
|
+
memoryUsage: number;
|
|
7
|
+
domOperations: number;
|
|
8
|
+
}
|
|
9
|
+
declare class PerformanceTracker {
|
|
10
|
+
private metrics;
|
|
11
|
+
private startTimes;
|
|
12
|
+
startTimer(operation: string): void;
|
|
13
|
+
endTimer(operation: string): number;
|
|
14
|
+
recordTokenization(duration: number): void;
|
|
15
|
+
recordEvaluation(duration: number): void;
|
|
16
|
+
updateCacheMetrics(): void;
|
|
17
|
+
getMetrics(): PerformanceMetrics;
|
|
18
|
+
reset(): void;
|
|
19
|
+
}
|
|
20
|
+
export declare const performanceTracker: PerformanceTracker;
|
|
21
|
+
export declare function evaluateExpressionWithCache<T>(cacheKey: string, evaluator: () => Promise<T>, _context: ExecutionContext): Promise<T>;
|
|
22
|
+
export declare function queryWithCache(selector: string): Element | null;
|
|
23
|
+
export declare function queryAllWithCache(selector: string): Element[];
|
|
24
|
+
export declare function matchesWithCache(element: Element, selector: string): boolean;
|
|
25
|
+
export declare function wrapExpressionForPerformance(expression: ExpressionImplementation): ExpressionImplementation;
|
|
26
|
+
export declare function tokenizeWithPerformance(input: string): import("../types/core").Token[];
|
|
27
|
+
export declare function performCleanup(): void;
|
|
28
|
+
export declare function enableAutoCleanup(intervalMs?: number): void;
|
|
29
|
+
export declare function disableAutoCleanup(): void;
|
|
30
|
+
declare class DOMBatcher {
|
|
31
|
+
private pendingOperations;
|
|
32
|
+
private batchTimeout;
|
|
33
|
+
addOperation(operation: () => void): void;
|
|
34
|
+
flush(): void;
|
|
35
|
+
}
|
|
36
|
+
export declare const domBatcher: DOMBatcher;
|
|
37
|
+
export declare function batchDOMOperation(operation: () => void): void;
|
|
38
|
+
export declare function generatePerformanceReport(): string;
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=integration.d.ts.map
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export interface PerformanceMetric {
|
|
2
|
+
name: string;
|
|
3
|
+
category: 'command' | 'expression' | 'validation' | 'runtime' | 'system';
|
|
4
|
+
timestamp: number;
|
|
5
|
+
duration: number;
|
|
6
|
+
success: boolean;
|
|
7
|
+
metadata?: Record<string, any>;
|
|
8
|
+
severity: 'info' | 'warning' | 'error';
|
|
9
|
+
}
|
|
10
|
+
export interface PerformanceThresholds {
|
|
11
|
+
command: {
|
|
12
|
+
warning: number;
|
|
13
|
+
error: number;
|
|
14
|
+
};
|
|
15
|
+
expression: {
|
|
16
|
+
warning: number;
|
|
17
|
+
error: number;
|
|
18
|
+
};
|
|
19
|
+
validation: {
|
|
20
|
+
warning: number;
|
|
21
|
+
error: number;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export interface SystemMetrics {
|
|
25
|
+
memoryUsage: NodeJS.MemoryUsage;
|
|
26
|
+
cpuUsage: NodeJS.CpuUsage;
|
|
27
|
+
timestamp: number;
|
|
28
|
+
}
|
|
29
|
+
export declare class ProductionPerformanceMonitor {
|
|
30
|
+
private metrics;
|
|
31
|
+
private systemMetrics;
|
|
32
|
+
private isEnabled;
|
|
33
|
+
private maxMetrics;
|
|
34
|
+
private flushInterval;
|
|
35
|
+
private lastCpuUsage;
|
|
36
|
+
private readonly thresholds;
|
|
37
|
+
constructor(options?: {
|
|
38
|
+
enabled?: boolean;
|
|
39
|
+
thresholds?: Partial<PerformanceThresholds>;
|
|
40
|
+
maxMetrics?: number;
|
|
41
|
+
flushIntervalMs?: number;
|
|
42
|
+
});
|
|
43
|
+
record(name: string, category: PerformanceMetric['category'], duration: number, success?: boolean, metadata?: Record<string, any>): void;
|
|
44
|
+
measure<T>(name: string, category: PerformanceMetric['category'], operation: () => Promise<T> | T, metadata?: Record<string, any>): Promise<T>;
|
|
45
|
+
getStats(category?: PerformanceMetric['category']): {
|
|
46
|
+
total: number;
|
|
47
|
+
successful: number;
|
|
48
|
+
failed: number;
|
|
49
|
+
averageDuration: number;
|
|
50
|
+
medianDuration: number;
|
|
51
|
+
maxDuration: number;
|
|
52
|
+
minDuration: number;
|
|
53
|
+
warnings: number;
|
|
54
|
+
errors: number;
|
|
55
|
+
};
|
|
56
|
+
getRecentMetrics(minutes?: number): PerformanceMetric[];
|
|
57
|
+
getCurrentSystemMetrics(): SystemMetrics;
|
|
58
|
+
generateReport(): string;
|
|
59
|
+
clear(): void;
|
|
60
|
+
setEnabled(enabled: boolean): void;
|
|
61
|
+
private startSystemMonitoring;
|
|
62
|
+
destroy(): void;
|
|
63
|
+
}
|
|
64
|
+
export declare const productionMonitor: ProductionPerformanceMonitor;
|
|
65
|
+
export declare function monitorPerformance(category: PerformanceMetric['category'], name?: string): <T extends (...args: any[]) => any>(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T>;
|
|
66
|
+
export declare function measureOperation<T>(name: string, operation: () => Promise<T> | T, category?: PerformanceMetric['category']): Promise<T>;
|
|
67
|
+
//# sourceMappingURL=production-monitor.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface CommandRef {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
syntax: string;
|
|
5
|
+
category: CommandCategory;
|
|
6
|
+
availability: BundleAvailability;
|
|
7
|
+
examples: string[];
|
|
8
|
+
}
|
|
9
|
+
export type CommandCategory = 'dom' | 'async' | 'data' | 'utility' | 'events' | 'navigation' | 'control-flow' | 'execution' | 'content' | 'animation' | 'advanced' | 'behaviors' | 'templates';
|
|
10
|
+
export type BundleAvailability = 'lite' | 'lite-plus' | 'hybrid' | 'full';
|
|
11
|
+
export declare const commands: Record<string, CommandRef>;
|
|
12
|
+
export declare function getCommandsByCategory(category: CommandCategory): CommandRef[];
|
|
13
|
+
export declare function getCommandsByAvailability(availability: BundleAvailability): CommandRef[];
|
|
14
|
+
export declare function searchCommands(query: string): CommandRef[];
|
|
15
|
+
export interface BundleRef {
|
|
16
|
+
name: string;
|
|
17
|
+
file: string;
|
|
18
|
+
size: string;
|
|
19
|
+
commandCount: number;
|
|
20
|
+
hasBlocks: boolean;
|
|
21
|
+
hasEventModifiers: boolean;
|
|
22
|
+
hasPositional: boolean;
|
|
23
|
+
useCase: string;
|
|
24
|
+
importPath: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const bundles: BundleRef[];
|
|
27
|
+
export declare function findBundleForFeatures(options: {
|
|
28
|
+
commands?: string[];
|
|
29
|
+
blocks?: boolean;
|
|
30
|
+
eventModifiers?: boolean;
|
|
31
|
+
positional?: boolean;
|
|
32
|
+
}): BundleRef | undefined;
|
|
33
|
+
export interface PatternRef {
|
|
34
|
+
name: string;
|
|
35
|
+
description: string;
|
|
36
|
+
code: string;
|
|
37
|
+
commands: string[];
|
|
38
|
+
}
|
|
39
|
+
export declare const patterns: PatternRef[];
|
|
40
|
+
export declare function searchPatterns(query: string): PatternRef[];
|
|
41
|
+
//# sourceMappingURL=index.d.ts.map
|