@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,670 @@
|
|
|
1
|
+
const COMMAND_KEYWORDS = [
|
|
2
|
+
'toggle',
|
|
3
|
+
'add',
|
|
4
|
+
'remove',
|
|
5
|
+
'show',
|
|
6
|
+
'hide',
|
|
7
|
+
'put',
|
|
8
|
+
'set',
|
|
9
|
+
'get',
|
|
10
|
+
'make',
|
|
11
|
+
'swap',
|
|
12
|
+
'morph',
|
|
13
|
+
'append',
|
|
14
|
+
'take',
|
|
15
|
+
'render',
|
|
16
|
+
'wait',
|
|
17
|
+
'fetch',
|
|
18
|
+
'settle',
|
|
19
|
+
'send',
|
|
20
|
+
'trigger',
|
|
21
|
+
'go',
|
|
22
|
+
'pushUrl',
|
|
23
|
+
'replaceUrl',
|
|
24
|
+
'if',
|
|
25
|
+
'else',
|
|
26
|
+
'unless',
|
|
27
|
+
'repeat',
|
|
28
|
+
'for',
|
|
29
|
+
'while',
|
|
30
|
+
'break',
|
|
31
|
+
'continue',
|
|
32
|
+
'call',
|
|
33
|
+
'return',
|
|
34
|
+
'throw',
|
|
35
|
+
'halt',
|
|
36
|
+
'exit',
|
|
37
|
+
'log',
|
|
38
|
+
'tell',
|
|
39
|
+
'copy',
|
|
40
|
+
'pick',
|
|
41
|
+
'beep',
|
|
42
|
+
'js',
|
|
43
|
+
'async',
|
|
44
|
+
'transition',
|
|
45
|
+
'measure',
|
|
46
|
+
'increment',
|
|
47
|
+
'decrement',
|
|
48
|
+
'default',
|
|
49
|
+
'install',
|
|
50
|
+
];
|
|
51
|
+
const REFERENCE_KEYWORDS = [
|
|
52
|
+
'me',
|
|
53
|
+
'you',
|
|
54
|
+
'it',
|
|
55
|
+
'result',
|
|
56
|
+
'event',
|
|
57
|
+
'target',
|
|
58
|
+
'detail',
|
|
59
|
+
'body',
|
|
60
|
+
'window',
|
|
61
|
+
'document',
|
|
62
|
+
];
|
|
63
|
+
const FEATURE_KEYWORDS = [
|
|
64
|
+
'on',
|
|
65
|
+
'behavior',
|
|
66
|
+
'def',
|
|
67
|
+
'init',
|
|
68
|
+
'worker',
|
|
69
|
+
'socket',
|
|
70
|
+
'eventsource',
|
|
71
|
+
];
|
|
72
|
+
const BLOCK_KEYWORDS = ['then', 'end', 'from', 'to', 'into', 'with', 'as', 'in'];
|
|
73
|
+
const POSITIONAL_KEYWORDS = [
|
|
74
|
+
'first',
|
|
75
|
+
'last',
|
|
76
|
+
'next',
|
|
77
|
+
'previous',
|
|
78
|
+
'closest',
|
|
79
|
+
'parent',
|
|
80
|
+
'children',
|
|
81
|
+
'random',
|
|
82
|
+
];
|
|
83
|
+
const LOGICAL_KEYWORDS = [
|
|
84
|
+
'and',
|
|
85
|
+
'or',
|
|
86
|
+
'not',
|
|
87
|
+
'is',
|
|
88
|
+
'are',
|
|
89
|
+
'exists',
|
|
90
|
+
'empty',
|
|
91
|
+
'matches',
|
|
92
|
+
'contains',
|
|
93
|
+
'includes',
|
|
94
|
+
'has',
|
|
95
|
+
'no',
|
|
96
|
+
'true',
|
|
97
|
+
'false',
|
|
98
|
+
'null',
|
|
99
|
+
];
|
|
100
|
+
const ALL_KEYWORDS = [
|
|
101
|
+
...COMMAND_KEYWORDS,
|
|
102
|
+
...REFERENCE_KEYWORDS,
|
|
103
|
+
...FEATURE_KEYWORDS,
|
|
104
|
+
...BLOCK_KEYWORDS,
|
|
105
|
+
...POSITIONAL_KEYWORDS,
|
|
106
|
+
...LOGICAL_KEYWORDS,
|
|
107
|
+
];
|
|
108
|
+
const HOVER_DOCS = {
|
|
109
|
+
toggle: {
|
|
110
|
+
title: 'toggle',
|
|
111
|
+
description: 'Toggles a class, attribute, or visibility state.',
|
|
112
|
+
example: 'toggle .active on me\ntoggle @disabled on #btn',
|
|
113
|
+
category: 'command',
|
|
114
|
+
},
|
|
115
|
+
add: {
|
|
116
|
+
title: 'add',
|
|
117
|
+
description: 'Adds a class or attribute to an element.',
|
|
118
|
+
example: 'add .highlight to me\nadd @disabled to #btn',
|
|
119
|
+
category: 'command',
|
|
120
|
+
},
|
|
121
|
+
remove: {
|
|
122
|
+
title: 'remove',
|
|
123
|
+
description: 'Removes a class, attribute, or element.',
|
|
124
|
+
example: 'remove .highlight from me\nremove #temp',
|
|
125
|
+
category: 'command',
|
|
126
|
+
},
|
|
127
|
+
show: {
|
|
128
|
+
title: 'show',
|
|
129
|
+
description: 'Makes an element visible.',
|
|
130
|
+
example: 'show #modal\nshow me with *opacity',
|
|
131
|
+
category: 'command',
|
|
132
|
+
},
|
|
133
|
+
hide: {
|
|
134
|
+
title: 'hide',
|
|
135
|
+
description: 'Hides an element.',
|
|
136
|
+
example: 'hide #modal\nhide me with *opacity',
|
|
137
|
+
category: 'command',
|
|
138
|
+
},
|
|
139
|
+
put: {
|
|
140
|
+
title: 'put',
|
|
141
|
+
description: 'Sets the content of an element.',
|
|
142
|
+
example: 'put "Hello" into #message\nput response into #results',
|
|
143
|
+
category: 'command',
|
|
144
|
+
},
|
|
145
|
+
set: {
|
|
146
|
+
title: 'set',
|
|
147
|
+
description: 'Sets a variable or property.',
|
|
148
|
+
example: 'set :count to 0\nset $globalVar to "value"',
|
|
149
|
+
category: 'command',
|
|
150
|
+
},
|
|
151
|
+
get: {
|
|
152
|
+
title: 'get',
|
|
153
|
+
description: 'Gets a value from an element or variable.',
|
|
154
|
+
example: 'get the value of #input\nget #myElement',
|
|
155
|
+
category: 'command',
|
|
156
|
+
},
|
|
157
|
+
make: {
|
|
158
|
+
title: 'make',
|
|
159
|
+
description: 'Creates a new element.',
|
|
160
|
+
example: 'make a <div/> then put it after me',
|
|
161
|
+
category: 'command',
|
|
162
|
+
},
|
|
163
|
+
swap: {
|
|
164
|
+
title: 'swap',
|
|
165
|
+
description: 'Swaps content between elements.',
|
|
166
|
+
example: 'swap #a with #b\nswap innerHTML of #target with response',
|
|
167
|
+
category: 'command',
|
|
168
|
+
},
|
|
169
|
+
morph: {
|
|
170
|
+
title: 'morph',
|
|
171
|
+
description: 'Morphs element content with smooth transitions.',
|
|
172
|
+
example: 'morph #content to response',
|
|
173
|
+
category: 'command',
|
|
174
|
+
},
|
|
175
|
+
append: {
|
|
176
|
+
title: 'append',
|
|
177
|
+
description: 'Appends content to an element.',
|
|
178
|
+
example: 'append "<li>Item</li>" to #list',
|
|
179
|
+
category: 'command',
|
|
180
|
+
},
|
|
181
|
+
take: {
|
|
182
|
+
title: 'take',
|
|
183
|
+
description: 'Takes/claims a class from sibling elements.',
|
|
184
|
+
example: 'take .active from .tabs',
|
|
185
|
+
category: 'command',
|
|
186
|
+
},
|
|
187
|
+
render: {
|
|
188
|
+
title: 'render',
|
|
189
|
+
description: 'Renders a template with data.',
|
|
190
|
+
example: 'render #template with {name: "World"}',
|
|
191
|
+
category: 'command',
|
|
192
|
+
},
|
|
193
|
+
wait: {
|
|
194
|
+
title: 'wait',
|
|
195
|
+
description: 'Pauses execution for a duration or until an event.',
|
|
196
|
+
example: 'wait 1s\nwait 500ms then remove .loading\nwait for htmx:afterSwap',
|
|
197
|
+
category: 'command',
|
|
198
|
+
},
|
|
199
|
+
fetch: {
|
|
200
|
+
title: 'fetch',
|
|
201
|
+
description: 'Makes an HTTP request.',
|
|
202
|
+
example: 'fetch /api/data as json\nfetch /api/users then put it into #list',
|
|
203
|
+
category: 'command',
|
|
204
|
+
},
|
|
205
|
+
settle: {
|
|
206
|
+
title: 'settle',
|
|
207
|
+
description: 'Waits for CSS transitions to complete.',
|
|
208
|
+
example: 'add .fade-out then settle then remove me',
|
|
209
|
+
category: 'command',
|
|
210
|
+
},
|
|
211
|
+
send: {
|
|
212
|
+
title: 'send',
|
|
213
|
+
description: 'Dispatches a custom event.',
|
|
214
|
+
example: 'send myEvent to #target\nsend refresh to <body/>',
|
|
215
|
+
category: 'command',
|
|
216
|
+
},
|
|
217
|
+
trigger: {
|
|
218
|
+
title: 'trigger',
|
|
219
|
+
description: 'Triggers an event on an element.',
|
|
220
|
+
example: 'trigger click on #btn\ntrigger submit on closest <form/>',
|
|
221
|
+
category: 'command',
|
|
222
|
+
},
|
|
223
|
+
go: {
|
|
224
|
+
title: 'go',
|
|
225
|
+
description: 'Navigates to a URL or scrolls to an element.',
|
|
226
|
+
example: 'go to url /home\ngo to #section\ngo back',
|
|
227
|
+
category: 'command',
|
|
228
|
+
},
|
|
229
|
+
if: {
|
|
230
|
+
title: 'if',
|
|
231
|
+
description: 'Conditional execution.',
|
|
232
|
+
example: 'if .active toggle .active\nif :count > 10 log "high"',
|
|
233
|
+
category: 'command',
|
|
234
|
+
},
|
|
235
|
+
else: {
|
|
236
|
+
title: 'else',
|
|
237
|
+
description: 'Alternative branch in conditional.',
|
|
238
|
+
example: 'if .active remove .active else add .active',
|
|
239
|
+
category: 'block',
|
|
240
|
+
},
|
|
241
|
+
unless: {
|
|
242
|
+
title: 'unless',
|
|
243
|
+
description: 'Inverse conditional (if not).',
|
|
244
|
+
example: 'unless .disabled add .clicked',
|
|
245
|
+
category: 'command',
|
|
246
|
+
},
|
|
247
|
+
repeat: {
|
|
248
|
+
title: 'repeat',
|
|
249
|
+
description: 'Loops a specified number of times or over items.',
|
|
250
|
+
example: 'repeat 5 times log "hello"\nrepeat for item in items',
|
|
251
|
+
category: 'command',
|
|
252
|
+
},
|
|
253
|
+
for: {
|
|
254
|
+
title: 'for',
|
|
255
|
+
description: 'Iterates over a collection.',
|
|
256
|
+
example: 'for item in items\n log item\nend',
|
|
257
|
+
category: 'command',
|
|
258
|
+
},
|
|
259
|
+
while: {
|
|
260
|
+
title: 'while',
|
|
261
|
+
description: 'Loops while condition is true.',
|
|
262
|
+
example: 'while :count < 10\n increment :count\nend',
|
|
263
|
+
category: 'command',
|
|
264
|
+
},
|
|
265
|
+
break: {
|
|
266
|
+
title: 'break',
|
|
267
|
+
description: 'Exits the current loop.',
|
|
268
|
+
example: 'repeat for x in items\n if x is empty break\nend',
|
|
269
|
+
category: 'command',
|
|
270
|
+
},
|
|
271
|
+
continue: {
|
|
272
|
+
title: 'continue',
|
|
273
|
+
description: 'Skips to the next iteration.',
|
|
274
|
+
example: 'repeat for x in items\n if x < 0 continue\n log x\nend',
|
|
275
|
+
category: 'command',
|
|
276
|
+
},
|
|
277
|
+
call: {
|
|
278
|
+
title: 'call',
|
|
279
|
+
description: 'Calls a function or method.',
|
|
280
|
+
example: 'call myFunction()\ncall element.focus()',
|
|
281
|
+
category: 'command',
|
|
282
|
+
},
|
|
283
|
+
return: {
|
|
284
|
+
title: 'return',
|
|
285
|
+
description: 'Returns a value from a function.',
|
|
286
|
+
example: 'return :result\nreturn x + y',
|
|
287
|
+
category: 'command',
|
|
288
|
+
},
|
|
289
|
+
throw: {
|
|
290
|
+
title: 'throw',
|
|
291
|
+
description: 'Throws an error.',
|
|
292
|
+
example: 'throw "Invalid input"',
|
|
293
|
+
category: 'command',
|
|
294
|
+
},
|
|
295
|
+
halt: {
|
|
296
|
+
title: 'halt',
|
|
297
|
+
description: 'Stops all execution and event bubbling.',
|
|
298
|
+
example: 'halt\nhalt the event',
|
|
299
|
+
category: 'command',
|
|
300
|
+
},
|
|
301
|
+
exit: {
|
|
302
|
+
title: 'exit',
|
|
303
|
+
description: 'Exits the current handler.',
|
|
304
|
+
example: 'if not valid exit',
|
|
305
|
+
category: 'command',
|
|
306
|
+
},
|
|
307
|
+
log: {
|
|
308
|
+
title: 'log',
|
|
309
|
+
description: 'Logs a value to the console.',
|
|
310
|
+
example: 'log "Hello"\nlog the value of #input',
|
|
311
|
+
category: 'command',
|
|
312
|
+
},
|
|
313
|
+
tell: {
|
|
314
|
+
title: 'tell',
|
|
315
|
+
description: 'Sets context for subsequent commands.',
|
|
316
|
+
example: 'tell #modal to show',
|
|
317
|
+
category: 'command',
|
|
318
|
+
},
|
|
319
|
+
copy: {
|
|
320
|
+
title: 'copy',
|
|
321
|
+
description: 'Copies text to clipboard.',
|
|
322
|
+
example: 'copy "Hello" to clipboard\ncopy the value of #input',
|
|
323
|
+
category: 'command',
|
|
324
|
+
},
|
|
325
|
+
pick: {
|
|
326
|
+
title: 'pick',
|
|
327
|
+
description: 'Opens a file picker dialog.',
|
|
328
|
+
example: 'pick file then log it',
|
|
329
|
+
category: 'command',
|
|
330
|
+
},
|
|
331
|
+
beep: {
|
|
332
|
+
title: 'beep',
|
|
333
|
+
description: 'Highlights element for debugging.',
|
|
334
|
+
example: 'beep! me\nbeep! #target',
|
|
335
|
+
category: 'command',
|
|
336
|
+
},
|
|
337
|
+
js: {
|
|
338
|
+
title: 'js',
|
|
339
|
+
description: 'Executes inline JavaScript.',
|
|
340
|
+
example: 'js(event) return event.clientX end',
|
|
341
|
+
category: 'command',
|
|
342
|
+
},
|
|
343
|
+
async: {
|
|
344
|
+
title: 'async',
|
|
345
|
+
description: 'Runs commands asynchronously (non-blocking).',
|
|
346
|
+
example: 'async do fetch /api/data end',
|
|
347
|
+
category: 'command',
|
|
348
|
+
},
|
|
349
|
+
transition: {
|
|
350
|
+
title: 'transition',
|
|
351
|
+
description: 'Applies CSS transition.',
|
|
352
|
+
example: "transition #box's opacity to 0 over 500ms",
|
|
353
|
+
category: 'command',
|
|
354
|
+
},
|
|
355
|
+
measure: {
|
|
356
|
+
title: 'measure',
|
|
357
|
+
description: 'Measures element dimensions.',
|
|
358
|
+
example: 'measure #box then log result.width',
|
|
359
|
+
category: 'command',
|
|
360
|
+
},
|
|
361
|
+
increment: {
|
|
362
|
+
title: 'increment',
|
|
363
|
+
description: 'Increments a numeric value.',
|
|
364
|
+
example: 'increment :count\nincrement #counter.value by 5',
|
|
365
|
+
category: 'command',
|
|
366
|
+
},
|
|
367
|
+
decrement: {
|
|
368
|
+
title: 'decrement',
|
|
369
|
+
description: 'Decrements a numeric value.',
|
|
370
|
+
example: 'decrement :count\ndecrement #counter.value by 2',
|
|
371
|
+
category: 'command',
|
|
372
|
+
},
|
|
373
|
+
default: {
|
|
374
|
+
title: 'default',
|
|
375
|
+
description: 'Sets a default value if undefined.',
|
|
376
|
+
example: 'default :count to 0',
|
|
377
|
+
category: 'command',
|
|
378
|
+
},
|
|
379
|
+
install: {
|
|
380
|
+
title: 'install',
|
|
381
|
+
description: 'Installs a behavior on an element.',
|
|
382
|
+
example: 'install Draggable',
|
|
383
|
+
category: 'command',
|
|
384
|
+
},
|
|
385
|
+
me: {
|
|
386
|
+
title: 'me',
|
|
387
|
+
description: 'References the current element (the element with this hyperscript).',
|
|
388
|
+
example: 'toggle .active on me',
|
|
389
|
+
category: 'reference',
|
|
390
|
+
},
|
|
391
|
+
you: {
|
|
392
|
+
title: 'you',
|
|
393
|
+
description: 'References the element that triggered the event.',
|
|
394
|
+
example: 'add .clicked to you',
|
|
395
|
+
category: 'reference',
|
|
396
|
+
},
|
|
397
|
+
it: {
|
|
398
|
+
title: 'it',
|
|
399
|
+
description: 'References the result of the last expression.',
|
|
400
|
+
example: 'fetch /api/data then put it into #result',
|
|
401
|
+
category: 'reference',
|
|
402
|
+
},
|
|
403
|
+
result: {
|
|
404
|
+
title: 'result',
|
|
405
|
+
description: 'Alias for `it` - the result of the last expression.',
|
|
406
|
+
example: 'call myFunction() then log result',
|
|
407
|
+
category: 'reference',
|
|
408
|
+
},
|
|
409
|
+
event: {
|
|
410
|
+
title: 'event',
|
|
411
|
+
description: 'References the current event object.',
|
|
412
|
+
example: 'log event.target\nif event.key is "Enter"',
|
|
413
|
+
category: 'reference',
|
|
414
|
+
},
|
|
415
|
+
target: {
|
|
416
|
+
title: 'target',
|
|
417
|
+
description: 'References the event target element.',
|
|
418
|
+
example: 'add .clicked to target',
|
|
419
|
+
category: 'reference',
|
|
420
|
+
},
|
|
421
|
+
detail: {
|
|
422
|
+
title: 'detail',
|
|
423
|
+
description: 'References the detail property of custom events.',
|
|
424
|
+
example: 'log detail.message',
|
|
425
|
+
category: 'reference',
|
|
426
|
+
},
|
|
427
|
+
body: {
|
|
428
|
+
title: 'body',
|
|
429
|
+
description: 'References document.body.',
|
|
430
|
+
example: 'add .dark-mode to body',
|
|
431
|
+
category: 'reference',
|
|
432
|
+
},
|
|
433
|
+
on: {
|
|
434
|
+
title: 'on',
|
|
435
|
+
description: 'Defines an event handler.',
|
|
436
|
+
example: 'on click toggle .active\non keydown[key=="Enter"] submit()',
|
|
437
|
+
category: 'feature',
|
|
438
|
+
},
|
|
439
|
+
behavior: {
|
|
440
|
+
title: 'behavior',
|
|
441
|
+
description: 'Defines a reusable behavior.',
|
|
442
|
+
example: 'behavior Clickable\n on click toggle .active\nend',
|
|
443
|
+
category: 'feature',
|
|
444
|
+
},
|
|
445
|
+
def: {
|
|
446
|
+
title: 'def',
|
|
447
|
+
description: 'Defines a function.',
|
|
448
|
+
example: 'def greet(name)\n log "Hello " + name\nend',
|
|
449
|
+
category: 'feature',
|
|
450
|
+
},
|
|
451
|
+
init: {
|
|
452
|
+
title: 'init',
|
|
453
|
+
description: 'Runs code when element initializes.',
|
|
454
|
+
example: 'init\n set :count to 0\nend',
|
|
455
|
+
category: 'feature',
|
|
456
|
+
},
|
|
457
|
+
then: {
|
|
458
|
+
title: 'then',
|
|
459
|
+
description: 'Chains commands sequentially.',
|
|
460
|
+
example: 'add .loading then fetch /api then remove .loading',
|
|
461
|
+
category: 'block',
|
|
462
|
+
},
|
|
463
|
+
end: {
|
|
464
|
+
title: 'end',
|
|
465
|
+
description: 'Ends a block (behavior, def, if, repeat, etc.).',
|
|
466
|
+
example: 'behavior Modal\n on open show me\nend',
|
|
467
|
+
category: 'block',
|
|
468
|
+
},
|
|
469
|
+
from: {
|
|
470
|
+
title: 'from',
|
|
471
|
+
description: 'Specifies source element.',
|
|
472
|
+
example: 'remove .active from .tabs',
|
|
473
|
+
category: 'block',
|
|
474
|
+
},
|
|
475
|
+
to: {
|
|
476
|
+
title: 'to',
|
|
477
|
+
description: 'Specifies destination or target.',
|
|
478
|
+
example: 'add .active to me\ngo to url /home',
|
|
479
|
+
category: 'block',
|
|
480
|
+
},
|
|
481
|
+
into: {
|
|
482
|
+
title: 'into',
|
|
483
|
+
description: 'Specifies insertion destination.',
|
|
484
|
+
example: 'put "Hello" into #message',
|
|
485
|
+
category: 'block',
|
|
486
|
+
},
|
|
487
|
+
with: {
|
|
488
|
+
title: 'with',
|
|
489
|
+
description: 'Specifies accompanying options or data.',
|
|
490
|
+
example: 'show me with *opacity\nrender #template with {name: "World"}',
|
|
491
|
+
category: 'block',
|
|
492
|
+
},
|
|
493
|
+
as: {
|
|
494
|
+
title: 'as',
|
|
495
|
+
description: 'Type conversion or format specification.',
|
|
496
|
+
example: 'fetch /api as json\nget #input as Int',
|
|
497
|
+
category: 'block',
|
|
498
|
+
},
|
|
499
|
+
in: {
|
|
500
|
+
title: 'in',
|
|
501
|
+
description: 'Specifies iteration target.',
|
|
502
|
+
example: 'for item in items',
|
|
503
|
+
category: 'block',
|
|
504
|
+
},
|
|
505
|
+
first: {
|
|
506
|
+
title: 'first',
|
|
507
|
+
description: 'Selects the first element from a collection.',
|
|
508
|
+
example: 'first <li/> in #list',
|
|
509
|
+
category: 'positional',
|
|
510
|
+
},
|
|
511
|
+
last: {
|
|
512
|
+
title: 'last',
|
|
513
|
+
description: 'Selects the last element from a collection.',
|
|
514
|
+
example: 'last <li/> in #list',
|
|
515
|
+
category: 'positional',
|
|
516
|
+
},
|
|
517
|
+
next: {
|
|
518
|
+
title: 'next',
|
|
519
|
+
description: 'Selects the next sibling element.',
|
|
520
|
+
example: 'next <input/>',
|
|
521
|
+
category: 'positional',
|
|
522
|
+
},
|
|
523
|
+
previous: {
|
|
524
|
+
title: 'previous',
|
|
525
|
+
description: 'Selects the previous sibling element.',
|
|
526
|
+
example: 'previous <div/>',
|
|
527
|
+
category: 'positional',
|
|
528
|
+
},
|
|
529
|
+
closest: {
|
|
530
|
+
title: 'closest',
|
|
531
|
+
description: 'Selects the nearest ancestor matching selector.',
|
|
532
|
+
example: 'closest <form/>\nclosest .container',
|
|
533
|
+
category: 'positional',
|
|
534
|
+
},
|
|
535
|
+
parent: {
|
|
536
|
+
title: 'parent',
|
|
537
|
+
description: 'Selects the parent element.',
|
|
538
|
+
example: 'parent of me',
|
|
539
|
+
category: 'positional',
|
|
540
|
+
},
|
|
541
|
+
random: {
|
|
542
|
+
title: 'random',
|
|
543
|
+
description: 'Selects a random element from a collection.',
|
|
544
|
+
example: 'random <li/> in #list',
|
|
545
|
+
category: 'positional',
|
|
546
|
+
},
|
|
547
|
+
and: {
|
|
548
|
+
title: 'and',
|
|
549
|
+
description: 'Logical AND operator.',
|
|
550
|
+
example: 'if .active and .visible',
|
|
551
|
+
category: 'logical',
|
|
552
|
+
},
|
|
553
|
+
or: {
|
|
554
|
+
title: 'or',
|
|
555
|
+
description: 'Logical OR operator.',
|
|
556
|
+
example: 'if .error or .warning',
|
|
557
|
+
category: 'logical',
|
|
558
|
+
},
|
|
559
|
+
not: {
|
|
560
|
+
title: 'not',
|
|
561
|
+
description: 'Logical NOT operator.',
|
|
562
|
+
example: 'if not .disabled',
|
|
563
|
+
category: 'logical',
|
|
564
|
+
},
|
|
565
|
+
is: {
|
|
566
|
+
title: 'is',
|
|
567
|
+
description: 'Equality or type check.',
|
|
568
|
+
example: 'if :count is 0\nif me is .active',
|
|
569
|
+
category: 'logical',
|
|
570
|
+
},
|
|
571
|
+
exists: {
|
|
572
|
+
title: 'exists',
|
|
573
|
+
description: 'Checks if element/value exists.',
|
|
574
|
+
example: 'if #modal exists',
|
|
575
|
+
category: 'logical',
|
|
576
|
+
},
|
|
577
|
+
empty: {
|
|
578
|
+
title: 'empty',
|
|
579
|
+
description: 'Checks if value is empty.',
|
|
580
|
+
example: 'if #input.value is empty',
|
|
581
|
+
category: 'logical',
|
|
582
|
+
},
|
|
583
|
+
matches: {
|
|
584
|
+
title: 'matches',
|
|
585
|
+
description: 'Tests against a selector or pattern.',
|
|
586
|
+
example: 'if me matches .active',
|
|
587
|
+
category: 'logical',
|
|
588
|
+
},
|
|
589
|
+
contains: {
|
|
590
|
+
title: 'contains',
|
|
591
|
+
description: 'Checks if element contains another.',
|
|
592
|
+
example: 'if #list contains #item',
|
|
593
|
+
category: 'logical',
|
|
594
|
+
},
|
|
595
|
+
has: {
|
|
596
|
+
title: 'has',
|
|
597
|
+
description: 'Checks if element has a class/attribute.',
|
|
598
|
+
example: 'if me has .active',
|
|
599
|
+
category: 'logical',
|
|
600
|
+
},
|
|
601
|
+
};
|
|
602
|
+
const EVENT_NAMES = [
|
|
603
|
+
'click',
|
|
604
|
+
'dblclick',
|
|
605
|
+
'mousedown',
|
|
606
|
+
'mouseup',
|
|
607
|
+
'mouseenter',
|
|
608
|
+
'mouseleave',
|
|
609
|
+
'mouseover',
|
|
610
|
+
'mouseout',
|
|
611
|
+
'mousemove',
|
|
612
|
+
'contextmenu',
|
|
613
|
+
'keydown',
|
|
614
|
+
'keyup',
|
|
615
|
+
'keypress',
|
|
616
|
+
'input',
|
|
617
|
+
'change',
|
|
618
|
+
'submit',
|
|
619
|
+
'reset',
|
|
620
|
+
'focus',
|
|
621
|
+
'blur',
|
|
622
|
+
'focusin',
|
|
623
|
+
'focusout',
|
|
624
|
+
'load',
|
|
625
|
+
'DOMContentLoaded',
|
|
626
|
+
'unload',
|
|
627
|
+
'beforeunload',
|
|
628
|
+
'resize',
|
|
629
|
+
'scroll',
|
|
630
|
+
'drag',
|
|
631
|
+
'dragstart',
|
|
632
|
+
'dragend',
|
|
633
|
+
'dragenter',
|
|
634
|
+
'dragleave',
|
|
635
|
+
'dragover',
|
|
636
|
+
'drop',
|
|
637
|
+
'touchstart',
|
|
638
|
+
'touchend',
|
|
639
|
+
'touchmove',
|
|
640
|
+
'touchcancel',
|
|
641
|
+
'pointerdown',
|
|
642
|
+
'pointerup',
|
|
643
|
+
'pointermove',
|
|
644
|
+
'pointerenter',
|
|
645
|
+
'pointerleave',
|
|
646
|
+
'pointerover',
|
|
647
|
+
'pointerout',
|
|
648
|
+
'pointercancel',
|
|
649
|
+
'animationstart',
|
|
650
|
+
'animationend',
|
|
651
|
+
'animationiteration',
|
|
652
|
+
'transitionstart',
|
|
653
|
+
'transitionend',
|
|
654
|
+
'transitionrun',
|
|
655
|
+
'transitioncancel',
|
|
656
|
+
'htmx:load',
|
|
657
|
+
'htmx:beforeRequest',
|
|
658
|
+
'htmx:afterRequest',
|
|
659
|
+
'htmx:beforeSwap',
|
|
660
|
+
'htmx:afterSwap',
|
|
661
|
+
'htmx:afterSettle',
|
|
662
|
+
'htmx:configRequest',
|
|
663
|
+
'htmx:responseError',
|
|
664
|
+
'htmx:sendError',
|
|
665
|
+
'intersect',
|
|
666
|
+
'appear',
|
|
667
|
+
];
|
|
668
|
+
|
|
669
|
+
export { ALL_KEYWORDS, BLOCK_KEYWORDS, COMMAND_KEYWORDS, EVENT_NAMES, FEATURE_KEYWORDS, HOVER_DOCS, LOGICAL_KEYWORDS, POSITIONAL_KEYWORDS, REFERENCE_KEYWORDS };
|
|
670
|
+
//# sourceMappingURL=lsp-metadata.mjs.map
|