@hyperfixi/core 3.3.0 → 4.0.1
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/README.md +57 -179
- package/dist/ast-utils/index.cjs +74 -806
- package/dist/ast-utils/index.d.ts +1 -1
- package/dist/ast-utils/index.mjs +74 -805
- package/dist/ast-utils/interchange/engine-positions.d.ts +3 -0
- package/dist/ast-utils/interchange/index.d.ts +1 -2
- package/dist/hyperfixi.js +19 -2
- package/dist/index.d.ts +2 -22
- package/dist/index.mjs +3 -29128
- package/dist/lsp-metadata.cjs +77 -73
- package/dist/lsp-metadata.d.ts +4 -4
- package/dist/lsp-metadata.mjs +77 -73
- package/dist/metadata.cjs +34 -266
- package/dist/metadata.d.ts +31 -26
- package/dist/metadata.mjs +34 -266
- package/dist/multilingual/index.cjs +16 -382
- package/dist/multilingual/index.d.ts +4 -32
- package/dist/multilingual/index.mjs +15 -377
- package/dist/reference/index.cjs +67 -216
- package/dist/reference/index.d.ts +0 -3
- package/dist/reference/index.mjs +68 -216
- package/dist/version.d.ts +1 -1
- package/package.json +13 -179
- package/dist/__test-utils__/context-builders.d.ts +0 -42
- package/dist/__test-utils__/error-testing.d.ts +0 -18
- package/dist/__test-utils__/index.d.ts +0 -6
- package/dist/__test-utils__/mock-types.d.ts +0 -57
- package/dist/__test-utils__/parser-context-mock.d.ts +0 -7
- package/dist/__test-utils__/parser-helpers.d.ts +0 -38
- package/dist/api/hyperscript-api.d.ts +0 -90
- package/dist/api/lokascript-api.d.ts +0 -9
- package/dist/ast/command-slots.d.ts +0 -140
- package/dist/ast/guards.d.ts +0 -15
- package/dist/ast/legacy.d.ts +0 -15
- package/dist/ast/nodes.d.ts +0 -243
- package/dist/ast-utils/interchange/from-core.d.ts +0 -12
- package/dist/ast-utils/interchange/to-core.d.ts +0 -8
- package/dist/behaviors/boosted.d.ts +0 -29
- package/dist/behaviors/history-swap.d.ts +0 -24
- package/dist/behaviors/index.cjs +0 -1155
- package/dist/behaviors/index.d.ts +0 -4
- package/dist/behaviors/index.mjs +0 -1145
- package/dist/bundle-generator/executor-core.d.ts +0 -4
- package/dist/bundle-generator/generator.d.ts +0 -4
- package/dist/bundle-generator/index.cjs +0 -2804
- package/dist/bundle-generator/index.d.ts +0 -6
- package/dist/bundle-generator/index.mjs +0 -2779
- package/dist/bundle-generator/parser-templates.d.ts +0 -6
- package/dist/bundle-generator/template-capabilities.d.ts +0 -12
- package/dist/bundle-generator/templates.d.ts +0 -12
- package/dist/bundle-generator/types.d.ts +0 -34
- package/dist/chunks/bridge-CI9SOl8u.js +0 -2
- package/dist/chunks/browser-modular-7CpI5VF2.js +0 -2
- package/dist/chunks/index-BwXDEK0m.js +0 -2
- package/dist/chunks/index-DQi2o8Lk.js +0 -2
- package/dist/chunks/index-uCOQ8Qn0.js +0 -2
- package/dist/commands/advanced/js.d.ts +0 -40
- package/dist/commands/animation/measure.d.ts +0 -43
- package/dist/commands/animation/settle.d.ts +0 -38
- package/dist/commands/animation/start-view-transition.d.ts +0 -38
- package/dist/commands/animation/take.d.ts +0 -41
- package/dist/commands/animation/transition.d.ts +0 -49
- package/dist/commands/async/fetch.d.ts +0 -61
- package/dist/commands/async/wait.d.ts +0 -51
- package/dist/commands/behaviors/install.d.ts +0 -40
- package/dist/commands/content/append.d.ts +0 -26
- package/dist/commands/content/insertion-base.d.ts +0 -60
- package/dist/commands/content/prepend.d.ts +0 -26
- package/dist/commands/control-flow/break.d.ts +0 -29
- package/dist/commands/control-flow/continue.d.ts +0 -29
- package/dist/commands/control-flow/exit.d.ts +0 -29
- package/dist/commands/control-flow/halt.d.ts +0 -39
- package/dist/commands/control-flow/if.d.ts +0 -58
- package/dist/commands/control-flow/repeat.d.ts +0 -50
- package/dist/commands/control-flow/return.d.ts +0 -33
- package/dist/commands/control-flow/signal-base.d.ts +0 -18
- package/dist/commands/control-flow/throw.d.ts +0 -34
- package/dist/commands/control-flow/unless.d.ts +0 -3
- package/dist/commands/data/clear.d.ts +0 -37
- package/dist/commands/data/decrement.d.ts +0 -3
- package/dist/commands/data/default.d.ts +0 -60
- package/dist/commands/data/get.d.ts +0 -35
- package/dist/commands/data/increment.d.ts +0 -42
- package/dist/commands/data/set.d.ts +0 -76
- package/dist/commands/decorators/index.d.ts +0 -14
- package/dist/commands/dom/add.d.ts +0 -44
- package/dist/commands/dom/close.d.ts +0 -32
- package/dist/commands/dom/dom-modification-base.d.ts +0 -48
- package/dist/commands/dom/empty.d.ts +0 -32
- package/dist/commands/dom/hide.d.ts +0 -28
- package/dist/commands/dom/make.d.ts +0 -34
- package/dist/commands/dom/open.d.ts +0 -34
- package/dist/commands/dom/process-partials.d.ts +0 -51
- package/dist/commands/dom/put.d.ts +0 -42
- package/dist/commands/dom/remove.d.ts +0 -46
- package/dist/commands/dom/reset.d.ts +0 -32
- package/dist/commands/dom/select.d.ts +0 -32
- package/dist/commands/dom/show.d.ts +0 -29
- package/dist/commands/dom/swap.d.ts +0 -65
- package/dist/commands/dom/toggle.d.ts +0 -69
- package/dist/commands/dom/visibility-base.d.ts +0 -22
- package/dist/commands/events/send.d.ts +0 -3
- package/dist/commands/events/trigger.d.ts +0 -49
- package/dist/commands/execution/blur.d.ts +0 -32
- package/dist/commands/execution/call.d.ts +0 -35
- package/dist/commands/execution/focus.d.ts +0 -32
- package/dist/commands/execution/pseudo-command.d.ts +0 -41
- package/dist/commands/helpers/attribute-manipulation.d.ts +0 -11
- package/dist/commands/helpers/attribute-target.d.ts +0 -9
- package/dist/commands/helpers/batch-dom-operations.d.ts +0 -12
- package/dist/commands/helpers/body-ops.d.ts +0 -10
- package/dist/commands/helpers/class-manipulation.d.ts +0 -11
- package/dist/commands/helpers/condition-helpers.d.ts +0 -4
- package/dist/commands/helpers/dom-mutation.d.ts +0 -16
- package/dist/commands/helpers/duration-parsing.d.ts +0 -8
- package/dist/commands/helpers/element-property-access.d.ts +0 -7
- package/dist/commands/helpers/element-resolution.d.ts +0 -16
- package/dist/commands/helpers/error-helpers.d.ts +0 -17
- package/dist/commands/helpers/event-helpers.d.ts +0 -13
- package/dist/commands/helpers/event-waiting.d.ts +0 -37
- package/dist/commands/helpers/index.d.ts +0 -32
- package/dist/commands/helpers/input-validator.d.ts +0 -23
- package/dist/commands/helpers/loop-executor.d.ts +0 -56
- package/dist/commands/helpers/numeric-target-parser.d.ts +0 -21
- package/dist/commands/helpers/property-target.d.ts +0 -20
- package/dist/commands/helpers/selector-type-detection.d.ts +0 -24
- package/dist/commands/helpers/slots.d.ts +0 -5
- package/dist/commands/helpers/smart-element.d.ts +0 -16
- package/dist/commands/helpers/style-manipulation.d.ts +0 -16
- package/dist/commands/helpers/target-elements.d.ts +0 -5
- package/dist/commands/helpers/temporal-modifiers.d.ts +0 -15
- package/dist/commands/helpers/url-argument-parser.d.ts +0 -13
- package/dist/commands/helpers/url-validation.d.ts +0 -7
- package/dist/commands/helpers/variable-access.d.ts +0 -13
- package/dist/commands/helpers/visibility-target-parser.d.ts +0 -15
- package/dist/commands/helpers/write-target.d.ts +0 -42
- package/dist/commands/index.cjs +0 -24168
- package/dist/commands/index.d.ts +0 -171
- package/dist/commands/index.mjs +0 -23981
- package/dist/commands/manifest.d.ts +0 -17
- package/dist/commands/navigation/go.d.ts +0 -58
- package/dist/commands/navigation/push-url.d.ts +0 -48
- package/dist/commands/navigation/replace-url.d.ts +0 -3
- package/dist/commands/navigation/scroll-to.d.ts +0 -43
- package/dist/commands/templates/render.d.ts +0 -47
- package/dist/commands/utility/beep.d.ts +0 -41
- package/dist/commands/utility/breakpoint.d.ts +0 -32
- package/dist/commands/utility/copy.d.ts +0 -41
- package/dist/commands/utility/log.d.ts +0 -36
- package/dist/commands/utility/pick.d.ts +0 -47
- package/dist/commands/utility/tell.d.ts +0 -39
- package/dist/compatibility/browser-bundle-classic.d.ts +0 -17
- package/dist/compatibility/browser-bundle-hybrid-complete.d.ts +0 -22
- package/dist/compatibility/browser-bundle-hybrid-hx.d.ts +0 -43
- package/dist/compatibility/browser-bundle-lite.d.ts +0 -15
- package/dist/compatibility/browser-bundle-modular.d.ts +0 -18
- package/dist/compatibility/browser-bundle-multilingual.d.ts +0 -19
- package/dist/compatibility/browser-bundle-semantic-complete.d.ts +0 -24
- package/dist/compatibility/browser-bundle-textshelf-minimal.d.ts +0 -16
- package/dist/compatibility/browser-bundle-textshelf-profile.d.ts +0 -18
- package/dist/compatibility/browser-modular.d.ts +0 -42
- package/dist/compatibility/browser-tests/helpers/semantic-page.d.ts +0 -3
- package/dist/compatibility/browser-tests/test-utils.d.ts +0 -21
- package/dist/compatibility/bundle-shell.d.ts +0 -13
- package/dist/compatibility/bundle-sources.d.ts +0 -4
- package/dist/compatibility/eval-hyperscript.d.ts +0 -16
- package/dist/compatibility/hyperscript-adapter.d.ts +0 -38
- package/dist/core/ast-property-utils.d.ts +0 -2
- package/dist/core/context.d.ts +0 -19
- package/dist/core/dom.d.ts +0 -15
- package/dist/core/evaluator-types.d.ts +0 -5
- package/dist/core/events.d.ts +0 -48
- package/dist/core/executor.d.ts +0 -34
- package/dist/core/expression-evaluator.d.ts +0 -6
- package/dist/core/expression-registry.d.ts +0 -8
- package/dist/core/scope-hooks.d.ts +0 -24
- package/dist/debug/debug-controller.d.ts +0 -62
- package/dist/debug/index.d.ts +0 -5
- package/dist/dom/attribute-processor.d.ts +0 -75
- package/dist/dom/detect-language.d.ts +0 -3
- package/dist/dom/minimal-attribute-processor.d.ts +0 -20
- package/dist/expressions/base-expression.d.ts +0 -27
- package/dist/expressions/bundles/common-expressions.d.ts +0 -10
- package/dist/expressions/bundles/core-expressions.d.ts +0 -8
- package/dist/expressions/bundles/full-expressions.d.ts +0 -11
- package/dist/expressions/bundles/index.d.ts +0 -7
- package/dist/expressions/collection/index.d.ts +0 -10
- package/dist/expressions/conversion/index.d.ts +0 -31
- package/dist/expressions/expression-tiers.d.ts +0 -13
- package/dist/expressions/index.cjs +0 -4331
- package/dist/expressions/index.d.ts +0 -13
- package/dist/expressions/index.mjs +0 -4312
- package/dist/expressions/logical/index.d.ts +0 -61
- package/dist/expressions/mathematical/index.d.ts +0 -80
- package/dist/expressions/positional/index.d.ts +0 -31
- package/dist/expressions/properties/index.d.ts +0 -27
- package/dist/expressions/property-access-utils.d.ts +0 -23
- package/dist/expressions/references/index.d.ts +0 -39
- package/dist/expressions/shared/comparison-utils.d.ts +0 -10
- package/dist/expressions/shared/index.d.ts +0 -10
- package/dist/expressions/shared/number-utils.d.ts +0 -8
- package/dist/expressions/shared/tracking.d.ts +0 -20
- package/dist/expressions/shared/validation-utils.d.ts +0 -13
- package/dist/expressions/special/index.d.ts +0 -78
- package/dist/expressions/type-helpers.d.ts +0 -11
- package/dist/expressions/type-registry.d.ts +0 -57
- package/dist/expressions/validation-helpers.d.ts +0 -15
- package/dist/htmx/hcon.d.ts +0 -9
- package/dist/htmx/htmx-attribute-processor.d.ts +0 -120
- package/dist/htmx/htmx-translator.d.ts +0 -22
- package/dist/htmx/i18n-hooks.d.ts +0 -18
- package/dist/htmx/i18n-orchestrator.d.ts +0 -16
- package/dist/htmx/index.d.ts +0 -3
- package/dist/htmx/lang-resolver.d.ts +0 -3
- package/dist/htmx/sse.d.ts +0 -60
- package/dist/htmx/ws.d.ts +0 -59
- package/dist/hyperfixi-browser-classic-i18n.js +0 -2
- package/dist/hyperfixi-browser.js +0 -2
- package/dist/hyperfixi-classic-i18n.js +0 -2
- package/dist/hyperfixi-hx-v4.js +0 -1
- package/dist/hyperfixi-hx.js +0 -1
- package/dist/hyperfixi-hybrid-complete.js +0 -1
- package/dist/hyperfixi-hybrid-hx.js +0 -1
- package/dist/hyperfixi-multilingual.js +0 -2
- package/dist/hyperfixi.mjs +0 -2
- package/dist/i18n/error-catalog.d.ts +0 -12
- package/dist/index.cjs +0 -29159
- package/dist/index.min.js +0 -2
- package/dist/lib/dom-globals-shim.d.ts +0 -2
- package/dist/lib/index.d.ts +0 -4
- package/dist/lib/morph-adapter.d.ts +0 -9
- package/dist/lib/swap-executor.d.ts +0 -12
- package/dist/lib/view-transitions.d.ts +0 -7
- package/dist/lokascript-browser-classic-i18n.js +0 -2
- package/dist/lokascript-browser.js +0 -2
- package/dist/lokascript-hybrid-complete.js +0 -1
- package/dist/lokascript-hybrid-hx.js +0 -1
- package/dist/lokascript-multilingual.js +0 -2
- package/dist/lse/index.cjs +0 -84
- package/dist/lse/index.d.ts +0 -15
- package/dist/lse/index.mjs +0 -71
- package/dist/multilingual/bridge.d.ts +0 -38
- package/dist/multilingual/schema-roles.d.ts +0 -3
- package/dist/parser/__types__/test-helpers.d.ts +0 -25
- package/dist/parser/command-grammar.d.ts +0 -14
- package/dist/parser/command-node-builder.d.ts +0 -46
- package/dist/parser/command-parsers/animation-commands.d.ts +0 -6
- package/dist/parser/command-parsers/async-commands.d.ts +0 -5
- package/dist/parser/command-parsers/control-flow-commands.d.ts +0 -7
- package/dist/parser/command-parsers/declared-commands.d.ts +0 -6
- package/dist/parser/command-parsers/dom-commands.d.ts +0 -11
- package/dist/parser/command-parsers/event-commands.d.ts +0 -4
- package/dist/parser/command-parsers/navigation-commands.d.ts +0 -6
- package/dist/parser/command-parsers/utility-commands.d.ts +0 -14
- package/dist/parser/command-parsers/variable-commands.d.ts +0 -12
- package/dist/parser/error-handler.d.ts +0 -34
- package/dist/parser/extensions.d.ts +0 -43
- package/dist/parser/full-parser.cjs +0 -7943
- package/dist/parser/full-parser.d.ts +0 -4
- package/dist/parser/full-parser.mjs +0 -7940
- package/dist/parser/helpers/ast-helpers.d.ts +0 -24
- package/dist/parser/helpers/parsing-helpers.d.ts +0 -19
- package/dist/parser/helpers/token-helpers.d.ts +0 -28
- package/dist/parser/hybrid/aliases.cjs +0 -44
- package/dist/parser/hybrid/aliases.d.ts +0 -7
- package/dist/parser/hybrid/aliases.mjs +0 -37
- package/dist/parser/hybrid/ast-types.cjs +0 -3
- package/dist/parser/hybrid/ast-types.d.ts +0 -97
- package/dist/parser/hybrid/ast-types.mjs +0 -2
- package/dist/parser/hybrid/index.cjs +0 -1185
- package/dist/parser/hybrid/index.d.ts +0 -6
- package/dist/parser/hybrid/index.mjs +0 -1175
- package/dist/parser/hybrid/parser-core.cjs +0 -1171
- package/dist/parser/hybrid/parser-core.d.ts +0 -69
- package/dist/parser/hybrid/parser-core.mjs +0 -1169
- package/dist/parser/hybrid/tokenizer.cjs +0 -255
- package/dist/parser/hybrid/tokenizer.d.ts +0 -9
- package/dist/parser/hybrid/tokenizer.mjs +0 -252
- package/dist/parser/hybrid-parser.cjs +0 -1249
- package/dist/parser/hybrid-parser.d.ts +0 -10
- package/dist/parser/hybrid-parser.mjs +0 -1242
- package/dist/parser/parser-constants.d.ts +0 -100
- package/dist/parser/parser-interface.d.ts +0 -12
- package/dist/parser/parser-types.d.ts +0 -164
- package/dist/parser/parser.d.ts +0 -165
- package/dist/parser/pratt-parser.d.ts +0 -41
- package/dist/parser/regex-parser.cjs +0 -422
- package/dist/parser/regex-parser.d.ts +0 -4
- package/dist/parser/regex-parser.mjs +0 -419
- package/dist/parser/runtime.d.ts +0 -14
- package/dist/parser/semantic-integration.d.ts +0 -17
- package/dist/parser/token-consumer.d.ts +0 -34
- package/dist/parser/token-predicates.d.ts +0 -77
- package/dist/parser/tokenizer.d.ts +0 -28
- package/dist/parser/types.d.ts +0 -105
- package/dist/performance/expression-cache.d.ts +0 -78
- package/dist/performance/integration.d.ts +0 -40
- package/dist/performance/production-monitor.d.ts +0 -67
- package/dist/registry/browser-types.cjs +0 -81
- package/dist/registry/browser-types.d.ts +0 -20
- package/dist/registry/browser-types.mjs +0 -76
- package/dist/registry/environment.cjs +0 -36
- package/dist/registry/environment.d.ts +0 -19
- package/dist/registry/environment.mjs +0 -30
- package/dist/registry/event-source-registry.d.ts +0 -54
- package/dist/registry/examples/server-commands.d.ts +0 -6
- package/dist/registry/examples/server-event-source.d.ts +0 -32
- package/dist/registry/index.cjs +0 -14055
- package/dist/registry/index.d.ts +0 -39
- package/dist/registry/index.mjs +0 -14039
- package/dist/registry/runtime-integration.d.ts +0 -23
- package/dist/registry/universal-types.cjs +0 -91
- package/dist/registry/universal-types.d.ts +0 -35
- package/dist/registry/universal-types.mjs +0 -86
- package/dist/runtime/cleanup-registry.d.ts +0 -47
- package/dist/runtime/command-adapter.d.ts +0 -69
- package/dist/runtime/environment.d.ts +0 -75
- package/dist/runtime/plugin.d.ts +0 -14
- package/dist/runtime/runtime-base.d.ts +0 -100
- package/dist/runtime/runtime-factory.d.ts +0 -29
- package/dist/runtime/runtime.d.ts +0 -20
- package/dist/runtime/temporal-modifiers.d.ts +0 -37
- package/dist/test-setup.d.ts +0 -28
- package/dist/test-utilities.d.ts +0 -39
- package/dist/types/base-types.d.ts +0 -231
- package/dist/types/code-fix.d.ts +0 -39
- package/dist/types/command-metadata.d.ts +0 -57
- package/dist/types/command-types.d.ts +0 -262
- package/dist/types/context-types.d.ts +0 -106
- package/dist/types/core-context.d.ts +0 -22
- package/dist/types/core.d.ts +0 -143
- package/dist/types/error-codes.d.ts +0 -207
- package/dist/types/expression-types.d.ts +0 -155
- package/dist/types/hooks.d.ts +0 -45
- package/dist/types/index.d.ts +0 -32
- package/dist/types/program.d.ts +0 -8
- package/dist/types/result.d.ts +0 -73
- package/dist/types/template-types.d.ts +0 -162
- package/dist/types/type-guards.d.ts +0 -24
- package/dist/types/unified-types.d.ts +0 -91
- package/dist/utils/beep.d.ts +0 -8
- package/dist/utils/debug-events.d.ts +0 -41
- package/dist/utils/debug.d.ts +0 -35
- package/dist/utils/dom-utils.d.ts +0 -16
- package/dist/utils/element-check.d.ts +0 -8
- package/dist/utils/keyboard-shortcuts.d.ts +0 -18
- package/dist/utils/performance.d.ts +0 -40
- package/dist/validation/command-pattern-validator.d.ts +0 -53
- package/dist/validation/common-validators.d.ts +0 -24
- package/dist/validation/lightweight-validators.d.ts +0 -113
- package/dist/validation/partial-validation-types.d.ts +0 -50
- package/dist/validation/partial-validator.d.ts +0 -6
- package/dist/validation/partial-warning-formatter.d.ts +0 -6
- package/dist/validation/validate-cli.d.ts +0 -41
- package/vocab/htmx/ar.js +0 -62
- package/vocab/htmx/bn.js +0 -65
- package/vocab/htmx/de.js +0 -83
- package/vocab/htmx/en.js +0 -24
- package/vocab/htmx/es.js +0 -79
- package/vocab/htmx/fr.js +0 -79
- package/vocab/htmx/he.js +0 -61
- package/vocab/htmx/hi.js +0 -81
- package/vocab/htmx/id.js +0 -76
- package/vocab/htmx/it.js +0 -79
- package/vocab/htmx/ja.js +0 -85
- package/vocab/htmx/ko.js +0 -81
- package/vocab/htmx/ms.js +0 -58
- package/vocab/htmx/pl.js +0 -80
- package/vocab/htmx/pt.js +0 -81
- package/vocab/htmx/qu.js +0 -83
- package/vocab/htmx/ru.js +0 -82
- package/vocab/htmx/sw.js +0 -79
- package/vocab/htmx/th.js +0 -67
- package/vocab/htmx/tl.js +0 -56
- package/vocab/htmx/tr.js +0 -86
- package/vocab/htmx/uk.js +0 -82
- package/vocab/htmx/vi.js +0 -59
- package/vocab/htmx/zh.js +0 -79
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
-
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
3
|
-
import { type DecoratedCommand } from '../decorators';
|
|
4
|
-
import type { CommandRaw } from '../../ast/command-slots';
|
|
5
|
-
export type DefaultCommandInput = {
|
|
6
|
-
type: 'variable';
|
|
7
|
-
name: string;
|
|
8
|
-
value: unknown;
|
|
9
|
-
scope?: 'element' | 'global';
|
|
10
|
-
} | {
|
|
11
|
-
type: 'attribute';
|
|
12
|
-
elements: HTMLElement[];
|
|
13
|
-
name: string;
|
|
14
|
-
value: unknown;
|
|
15
|
-
} | {
|
|
16
|
-
type: 'property';
|
|
17
|
-
element: HTMLElement;
|
|
18
|
-
property: string;
|
|
19
|
-
value: unknown;
|
|
20
|
-
} | {
|
|
21
|
-
type: 'element';
|
|
22
|
-
element: HTMLElement;
|
|
23
|
-
value: unknown;
|
|
24
|
-
};
|
|
25
|
-
export interface DefaultCommandOutput {
|
|
26
|
-
target: string;
|
|
27
|
-
value: unknown;
|
|
28
|
-
wasSet: boolean;
|
|
29
|
-
existingValue?: unknown;
|
|
30
|
-
targetType: 'variable' | 'attribute' | 'property' | 'element';
|
|
31
|
-
}
|
|
32
|
-
export declare class DefaultCommand implements DecoratedCommand {
|
|
33
|
-
static readonly metadata: {
|
|
34
|
-
readonly description: "Set a value only if it doesn't already exist";
|
|
35
|
-
readonly syntax: readonly ["default <expression> to <expression>"];
|
|
36
|
-
readonly examples: readonly ["default myVar to \"fallback\"", "default @data-theme to \"light\"", "default my innerHTML to \"No content\""];
|
|
37
|
-
readonly sideEffects: readonly ["data-mutation", "dom-mutation"];
|
|
38
|
-
readonly category: "data";
|
|
39
|
-
readonly compatibility: "standard";
|
|
40
|
-
};
|
|
41
|
-
get metadata(): {
|
|
42
|
-
readonly description: "Set a value only if it doesn't already exist";
|
|
43
|
-
readonly syntax: readonly ["default <expression> to <expression>"];
|
|
44
|
-
readonly examples: readonly ["default myVar to \"fallback\"", "default @data-theme to \"light\"", "default my innerHTML to \"No content\""];
|
|
45
|
-
readonly sideEffects: readonly ["data-mutation", "dom-mutation"];
|
|
46
|
-
readonly category: "data";
|
|
47
|
-
readonly compatibility: "standard";
|
|
48
|
-
};
|
|
49
|
-
readonly name: string;
|
|
50
|
-
parseInput(raw: CommandRaw<'default'>, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<DefaultCommandInput>;
|
|
51
|
-
private extractValue;
|
|
52
|
-
execute(input: DefaultCommandInput, context: TypedExecutionContext): Promise<DefaultCommandOutput>;
|
|
53
|
-
private defaultVariable;
|
|
54
|
-
private defaultAttribute;
|
|
55
|
-
private defaultElementProperty;
|
|
56
|
-
private defaultElementValue;
|
|
57
|
-
}
|
|
58
|
-
export declare const createDefaultCommand: () => DefaultCommand;
|
|
59
|
-
export default DefaultCommand;
|
|
60
|
-
//# sourceMappingURL=default.d.ts.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
-
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
3
|
-
import { type DecoratedCommand } from '../decorators';
|
|
4
|
-
import type { CommandRaw } from '../../ast/command-slots';
|
|
5
|
-
export interface GetCommandInput {
|
|
6
|
-
value: unknown;
|
|
7
|
-
}
|
|
8
|
-
export interface GetCommandOutput {
|
|
9
|
-
value: unknown;
|
|
10
|
-
}
|
|
11
|
-
export declare class GetCommand implements DecoratedCommand {
|
|
12
|
-
static readonly metadata: {
|
|
13
|
-
readonly description: "Evaluate an expression and store the result in it";
|
|
14
|
-
readonly syntax: "get <expression>";
|
|
15
|
-
readonly examples: readonly ["get #my-dialog", "get <button/>", "get me.parentElement"];
|
|
16
|
-
readonly sideEffects: readonly ["context-mutation"];
|
|
17
|
-
readonly category: "data";
|
|
18
|
-
readonly compatibility: "standard";
|
|
19
|
-
};
|
|
20
|
-
get metadata(): {
|
|
21
|
-
readonly description: "Evaluate an expression and store the result in it";
|
|
22
|
-
readonly syntax: "get <expression>";
|
|
23
|
-
readonly examples: readonly ["get #my-dialog", "get <button/>", "get me.parentElement"];
|
|
24
|
-
readonly sideEffects: readonly ["context-mutation"];
|
|
25
|
-
readonly category: "data";
|
|
26
|
-
readonly compatibility: "standard";
|
|
27
|
-
};
|
|
28
|
-
readonly name: string;
|
|
29
|
-
parseInput(raw: CommandRaw<'get'>, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<GetCommandInput>;
|
|
30
|
-
execute(input: GetCommandInput, context: TypedExecutionContext): GetCommandOutput;
|
|
31
|
-
validate(input: unknown): input is GetCommandInput;
|
|
32
|
-
}
|
|
33
|
-
export declare const createGetCommand: () => GetCommand;
|
|
34
|
-
export default GetCommand;
|
|
35
|
-
//# sourceMappingURL=get.d.ts.map
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { TypedExecutionContext } from '../../types/base-types';
|
|
2
|
-
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
3
|
-
import { type DecoratedCommand } from '../decorators';
|
|
4
|
-
import { type NumericTargetRawInput, type NumericTargetInput } from '../helpers/numeric-target-parser';
|
|
5
|
-
export type NumericOperation = 'increment' | 'decrement';
|
|
6
|
-
export interface NumericModifyInput extends NumericTargetInput {
|
|
7
|
-
operation: NumericOperation;
|
|
8
|
-
}
|
|
9
|
-
export type { NumericTargetInput as IncrementCommandInput };
|
|
10
|
-
export type { NumericTargetInput as DecrementCommandInput };
|
|
11
|
-
export declare class NumericModifyCommand implements DecoratedCommand {
|
|
12
|
-
static readonly metadata: {
|
|
13
|
-
readonly description: "Modify a variable or property by a specified amount (default: 1)";
|
|
14
|
-
readonly syntax: readonly ["increment <target> [by <number>]", "decrement <target> [by <number>]"];
|
|
15
|
-
readonly examples: readonly ["increment counter", "increment counter by 5", "decrement counter", "decrement counter by 5"];
|
|
16
|
-
readonly sideEffects: readonly ["data-mutation", "context-modification"];
|
|
17
|
-
readonly aliases: readonly ["decrement"];
|
|
18
|
-
readonly category: "data";
|
|
19
|
-
readonly compatibility: "standard";
|
|
20
|
-
};
|
|
21
|
-
get metadata(): {
|
|
22
|
-
readonly description: "Modify a variable or property by a specified amount (default: 1)";
|
|
23
|
-
readonly syntax: readonly ["increment <target> [by <number>]", "decrement <target> [by <number>]"];
|
|
24
|
-
readonly examples: readonly ["increment counter", "increment counter by 5", "decrement counter", "decrement counter by 5"];
|
|
25
|
-
readonly sideEffects: readonly ["data-mutation", "context-modification"];
|
|
26
|
-
readonly aliases: readonly ["decrement"];
|
|
27
|
-
readonly category: "data";
|
|
28
|
-
readonly compatibility: "standard";
|
|
29
|
-
};
|
|
30
|
-
readonly name: string;
|
|
31
|
-
parseInput(raw: NumericTargetRawInput & {
|
|
32
|
-
commandName?: string;
|
|
33
|
-
}, evaluator: ExpressionEvaluator, context: TypedExecutionContext): Promise<NumericModifyInput>;
|
|
34
|
-
execute(input: NumericModifyInput, context: TypedExecutionContext): Promise<number>;
|
|
35
|
-
}
|
|
36
|
-
export { NumericModifyCommand as IncrementCommand };
|
|
37
|
-
export { NumericModifyCommand as DecrementCommand };
|
|
38
|
-
export declare const createNumericModifyCommand: () => NumericModifyCommand;
|
|
39
|
-
export declare const createIncrementCommand: () => NumericModifyCommand;
|
|
40
|
-
export declare const createDecrementCommand: () => NumericModifyCommand;
|
|
41
|
-
export default NumericModifyCommand;
|
|
42
|
-
//# sourceMappingURL=increment.d.ts.map
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
-
import type { ASTNode } from '../../types/base-types.ts';
|
|
3
|
-
import type { ExpressionEvaluator } from '../../core/expression-evaluator.ts';
|
|
4
|
-
import { type DecoratedCommand } from '../decorators';
|
|
5
|
-
import type { NodeWriterFn } from '../../parser/extensions';
|
|
6
|
-
import type { CommandRaw } from '../../ast/command-slots';
|
|
7
|
-
export type SetCommandInput = {
|
|
8
|
-
type: 'variable';
|
|
9
|
-
name: string;
|
|
10
|
-
value: unknown;
|
|
11
|
-
scope?: 'element' | 'global';
|
|
12
|
-
} | {
|
|
13
|
-
type: 'attribute';
|
|
14
|
-
elements: HTMLElement[];
|
|
15
|
-
name: string;
|
|
16
|
-
value: unknown;
|
|
17
|
-
} | {
|
|
18
|
-
type: 'property';
|
|
19
|
-
element: HTMLElement;
|
|
20
|
-
property: string;
|
|
21
|
-
value: unknown;
|
|
22
|
-
} | {
|
|
23
|
-
type: 'style';
|
|
24
|
-
element: HTMLElement;
|
|
25
|
-
property: string;
|
|
26
|
-
value: string;
|
|
27
|
-
} | {
|
|
28
|
-
type: 'object-literal';
|
|
29
|
-
properties: Record<string, unknown>;
|
|
30
|
-
targets: HTMLElement[];
|
|
31
|
-
} | {
|
|
32
|
-
type: 'member-assignment';
|
|
33
|
-
container: Record<string, unknown>;
|
|
34
|
-
property: string;
|
|
35
|
-
value: unknown;
|
|
36
|
-
} | {
|
|
37
|
-
type: 'node-write';
|
|
38
|
-
node: ASTNode;
|
|
39
|
-
value: unknown;
|
|
40
|
-
writer: NodeWriterFn;
|
|
41
|
-
};
|
|
42
|
-
export interface SetCommandOutput {
|
|
43
|
-
target: string | HTMLElement;
|
|
44
|
-
value: unknown;
|
|
45
|
-
targetType: 'variable' | 'attribute' | 'property';
|
|
46
|
-
}
|
|
47
|
-
export declare class SetCommand implements DecoratedCommand {
|
|
48
|
-
static readonly metadata: {
|
|
49
|
-
readonly description: "Set values to variables, attributes, or properties";
|
|
50
|
-
readonly syntax: readonly ["set <target> to <value>"];
|
|
51
|
-
readonly examples: readonly ["set myVar to \"value\"", "set @data-theme to \"dark\"", "set my innerHTML to \"content\""];
|
|
52
|
-
readonly sideEffects: readonly ["state-mutation", "dom-mutation"];
|
|
53
|
-
readonly category: "data";
|
|
54
|
-
readonly compatibility: "standard";
|
|
55
|
-
};
|
|
56
|
-
get metadata(): {
|
|
57
|
-
readonly description: "Set values to variables, attributes, or properties";
|
|
58
|
-
readonly syntax: readonly ["set <target> to <value>"];
|
|
59
|
-
readonly examples: readonly ["set myVar to \"value\"", "set @data-theme to \"dark\"", "set my innerHTML to \"content\""];
|
|
60
|
-
readonly sideEffects: readonly ["state-mutation", "dom-mutation"];
|
|
61
|
-
readonly category: "data";
|
|
62
|
-
readonly compatibility: "standard";
|
|
63
|
-
};
|
|
64
|
-
readonly name: string;
|
|
65
|
-
parseInput(raw: CommandRaw<'set'>, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<SetCommandInput>;
|
|
66
|
-
execute(input: SetCommandInput, context: TypedExecutionContext): Promise<SetCommandOutput>;
|
|
67
|
-
private tryParseMemberExpression;
|
|
68
|
-
private extractValue;
|
|
69
|
-
private resolveElement;
|
|
70
|
-
private resolveTargets;
|
|
71
|
-
private parseTheXofY;
|
|
72
|
-
validate(input: unknown): input is SetCommandInput;
|
|
73
|
-
}
|
|
74
|
-
export declare const createSetCommand: () => SetCommand;
|
|
75
|
-
export default SetCommand;
|
|
76
|
-
//# sourceMappingURL=set.d.ts.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { CommandMetadata, CommandCategory, CommandSideEffect } from '../../types/command-metadata';
|
|
2
|
-
export interface CommandConfig {
|
|
3
|
-
name: string;
|
|
4
|
-
}
|
|
5
|
-
export interface DecoratedCommand {
|
|
6
|
-
readonly name: string;
|
|
7
|
-
readonly metadata: CommandMetadata;
|
|
8
|
-
}
|
|
9
|
-
export declare function command(config: CommandConfig): <T extends new (...args: unknown[]) => object>(target: T, context: ClassDecoratorContext) => T | void;
|
|
10
|
-
export type CommandMetaInput = CommandMetadata;
|
|
11
|
-
export declare function commandMeta<const T extends CommandMetaInput>(metadata: T): T;
|
|
12
|
-
export declare function createFactory<T extends new () => object>(CommandClass: T): () => InstanceType<T>;
|
|
13
|
-
export type { CommandMetadata, CommandCategory, CommandSideEffect };
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
-
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
3
|
-
import { DOMModificationBase } from './dom-modification-base';
|
|
4
|
-
import type { CommandRaw } from '../../ast/command-slots';
|
|
5
|
-
export type AddCommandInput = {
|
|
6
|
-
type: 'classes';
|
|
7
|
-
classes: string[];
|
|
8
|
-
targets: HTMLElement[];
|
|
9
|
-
} | {
|
|
10
|
-
type: 'attribute';
|
|
11
|
-
name: string;
|
|
12
|
-
value: string;
|
|
13
|
-
targets: HTMLElement[];
|
|
14
|
-
} | {
|
|
15
|
-
type: 'styles';
|
|
16
|
-
styles: Record<string, string>;
|
|
17
|
-
targets: HTMLElement[];
|
|
18
|
-
};
|
|
19
|
-
export declare class AddCommand extends DOMModificationBase {
|
|
20
|
-
static readonly metadata: {
|
|
21
|
-
readonly description: "Add CSS classes, attributes, or styles to elements";
|
|
22
|
-
readonly syntax: "add <classes|@attr|{styles}> [to <target>]";
|
|
23
|
-
readonly examples: readonly ["add .active to me", "add \"active selected\" to <button/>", "add .highlighted to #modal", "add [@data-test=\"value\"] to #element"];
|
|
24
|
-
readonly sideEffects: readonly ["dom-mutation"];
|
|
25
|
-
readonly category: "dom";
|
|
26
|
-
readonly compatibility: "standard";
|
|
27
|
-
};
|
|
28
|
-
get metadata(): {
|
|
29
|
-
readonly description: "Add CSS classes, attributes, or styles to elements";
|
|
30
|
-
readonly syntax: "add <classes|@attr|{styles}> [to <target>]";
|
|
31
|
-
readonly examples: readonly ["add .active to me", "add \"active selected\" to <button/>", "add .highlighted to #modal", "add [@data-test=\"value\"] to #element"];
|
|
32
|
-
readonly sideEffects: readonly ["dom-mutation"];
|
|
33
|
-
readonly category: "dom";
|
|
34
|
-
readonly compatibility: "standard";
|
|
35
|
-
};
|
|
36
|
-
protected readonly mode: "add";
|
|
37
|
-
protected readonly preposition = "to";
|
|
38
|
-
parseInput(raw: CommandRaw<'add'>, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<AddCommandInput>;
|
|
39
|
-
execute(input: AddCommandInput, context: TypedExecutionContext): Promise<void>;
|
|
40
|
-
validate(input: unknown): input is AddCommandInput;
|
|
41
|
-
}
|
|
42
|
-
export declare const createAddCommand: () => AddCommand;
|
|
43
|
-
export default AddCommand;
|
|
44
|
-
//# sourceMappingURL=add.d.ts.map
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { ExecutionContext, TypedExecutionContext } from '../../types/base-types';
|
|
2
|
-
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
3
|
-
import { type DecoratedCommand } from '../decorators';
|
|
4
|
-
import type { CommandRaw } from '../../ast/command-slots';
|
|
5
|
-
export interface CloseCommandInput {
|
|
6
|
-
targets: HTMLElement[];
|
|
7
|
-
}
|
|
8
|
-
export declare class CloseCommand implements DecoratedCommand {
|
|
9
|
-
static readonly metadata: {
|
|
10
|
-
readonly description: "Close a dialog, details element, or popover";
|
|
11
|
-
readonly syntax: readonly ["close", "close <target>"];
|
|
12
|
-
readonly examples: readonly ["close", "close #myDialog", "close #details", "close #popup"];
|
|
13
|
-
readonly sideEffects: readonly ["dom-mutation"];
|
|
14
|
-
readonly category: "dom";
|
|
15
|
-
readonly compatibility: "standard";
|
|
16
|
-
};
|
|
17
|
-
get metadata(): {
|
|
18
|
-
readonly description: "Close a dialog, details element, or popover";
|
|
19
|
-
readonly syntax: readonly ["close", "close <target>"];
|
|
20
|
-
readonly examples: readonly ["close", "close #myDialog", "close #details", "close #popup"];
|
|
21
|
-
readonly sideEffects: readonly ["dom-mutation"];
|
|
22
|
-
readonly category: "dom";
|
|
23
|
-
readonly compatibility: "standard";
|
|
24
|
-
};
|
|
25
|
-
readonly name: string;
|
|
26
|
-
parseInput(raw: CommandRaw<'close'>, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<CloseCommandInput>;
|
|
27
|
-
execute(input: CloseCommandInput, _context: TypedExecutionContext): Promise<void>;
|
|
28
|
-
validate(input: unknown): input is CloseCommandInput;
|
|
29
|
-
}
|
|
30
|
-
export declare const createCloseCommand: () => CloseCommand;
|
|
31
|
-
export default CloseCommand;
|
|
32
|
-
//# sourceMappingURL=close.d.ts.map
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { ExecutionContext } from '../../types/core';
|
|
2
|
-
import type { ASTNode, ExpressionNode } from '../../types/base-types';
|
|
3
|
-
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
4
|
-
import type { DecoratedCommand, CommandMetadata } from '../decorators';
|
|
5
|
-
export type DOMModificationMode = 'add' | 'remove';
|
|
6
|
-
export type ClassModificationInput = {
|
|
7
|
-
type: 'classes';
|
|
8
|
-
classes: string[];
|
|
9
|
-
targets: HTMLElement[];
|
|
10
|
-
};
|
|
11
|
-
export type AttributeModificationInput = {
|
|
12
|
-
type: 'attribute';
|
|
13
|
-
name: string;
|
|
14
|
-
value?: string;
|
|
15
|
-
targets: HTMLElement[];
|
|
16
|
-
};
|
|
17
|
-
export type StyleModificationInput = {
|
|
18
|
-
type: 'styles';
|
|
19
|
-
styles?: Record<string, string>;
|
|
20
|
-
properties?: string[];
|
|
21
|
-
targets: HTMLElement[];
|
|
22
|
-
};
|
|
23
|
-
export type ElementRemovalInput = {
|
|
24
|
-
type: 'element';
|
|
25
|
-
targets: HTMLElement[];
|
|
26
|
-
};
|
|
27
|
-
export interface RawCommandInput {
|
|
28
|
-
args: ASTNode[];
|
|
29
|
-
modifiers: Record<string, ExpressionNode>;
|
|
30
|
-
commandName?: string;
|
|
31
|
-
}
|
|
32
|
-
export declare abstract class DOMModificationBase implements DecoratedCommand {
|
|
33
|
-
readonly name: string;
|
|
34
|
-
abstract readonly metadata: CommandMetadata;
|
|
35
|
-
protected abstract readonly mode: DOMModificationMode;
|
|
36
|
-
protected abstract readonly preposition: string;
|
|
37
|
-
protected resolveTargets(evaluator: ExpressionEvaluator, context: ExecutionContext, modifiers: Record<string, ExpressionNode>): Promise<HTMLElement[]>;
|
|
38
|
-
protected evaluateFirst(arg: ASTNode, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<{
|
|
39
|
-
value: unknown;
|
|
40
|
-
}>;
|
|
41
|
-
protected parseClassNames(value: unknown): string[];
|
|
42
|
-
protected isAttribute(value: string): boolean;
|
|
43
|
-
protected isCSSProperty(value: string): boolean;
|
|
44
|
-
protected validateTargets(targets: unknown): targets is HTMLElement[];
|
|
45
|
-
protected validateType<T extends string>(type: unknown, validTypes: readonly T[]): type is T;
|
|
46
|
-
protected validateStringArray(arr: unknown, minLength?: number): arr is string[];
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=dom-modification-base.d.ts.map
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { ExecutionContext, TypedExecutionContext } from '../../types/base-types';
|
|
2
|
-
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
3
|
-
import { type DecoratedCommand } from '../decorators';
|
|
4
|
-
import type { CommandRaw } from '../../ast/command-slots';
|
|
5
|
-
export interface EmptyCommandInput {
|
|
6
|
-
targets: HTMLElement[];
|
|
7
|
-
}
|
|
8
|
-
export declare class EmptyCommand implements DecoratedCommand {
|
|
9
|
-
static readonly metadata: {
|
|
10
|
-
readonly description: "Remove all children from an element (sets innerHTML to empty)";
|
|
11
|
-
readonly syntax: readonly ["empty", "empty <target>", "empty the <target>"];
|
|
12
|
-
readonly examples: readonly ["empty me", "empty #list", "empty .results"];
|
|
13
|
-
readonly sideEffects: readonly ["dom-mutation"];
|
|
14
|
-
readonly category: "dom";
|
|
15
|
-
readonly compatibility: "standard";
|
|
16
|
-
};
|
|
17
|
-
get metadata(): {
|
|
18
|
-
readonly description: "Remove all children from an element (sets innerHTML to empty)";
|
|
19
|
-
readonly syntax: readonly ["empty", "empty <target>", "empty the <target>"];
|
|
20
|
-
readonly examples: readonly ["empty me", "empty #list", "empty .results"];
|
|
21
|
-
readonly sideEffects: readonly ["dom-mutation"];
|
|
22
|
-
readonly category: "dom";
|
|
23
|
-
readonly compatibility: "standard";
|
|
24
|
-
};
|
|
25
|
-
readonly name: string;
|
|
26
|
-
parseInput(raw: CommandRaw<'empty'>, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<EmptyCommandInput>;
|
|
27
|
-
execute(input: EmptyCommandInput, _context: TypedExecutionContext): Promise<void>;
|
|
28
|
-
validate(input: unknown): input is EmptyCommandInput;
|
|
29
|
-
}
|
|
30
|
-
export declare const createEmptyCommand: () => EmptyCommand;
|
|
31
|
-
export default EmptyCommand;
|
|
32
|
-
//# sourceMappingURL=empty.d.ts.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { TypedExecutionContext } from '../../types/core';
|
|
2
|
-
import { VisibilityCommandBase, type VisibilityCommandInput } from './visibility-base';
|
|
3
|
-
import type { VisibilityInput } from '../helpers/visibility-target-parser';
|
|
4
|
-
export type HideCommandInput = VisibilityInput;
|
|
5
|
-
export declare class HideCommand extends VisibilityCommandBase {
|
|
6
|
-
static readonly metadata: {
|
|
7
|
-
readonly description: "Hide elements by setting display to none";
|
|
8
|
-
readonly syntax: "hide [<target>] [when <condition>]";
|
|
9
|
-
readonly examples: readonly ["hide me", "hide #modal", "hide .warnings", "hide <button/>", "hide <li/> when its textContent is empty"];
|
|
10
|
-
readonly sideEffects: readonly ["dom-mutation"];
|
|
11
|
-
readonly category: "dom";
|
|
12
|
-
readonly compatibility: "standard";
|
|
13
|
-
};
|
|
14
|
-
get metadata(): {
|
|
15
|
-
readonly description: "Hide elements by setting display to none";
|
|
16
|
-
readonly syntax: "hide [<target>] [when <condition>]";
|
|
17
|
-
readonly examples: readonly ["hide me", "hide #modal", "hide .warnings", "hide <button/>", "hide <li/> when its textContent is empty"];
|
|
18
|
-
readonly sideEffects: readonly ["dom-mutation"];
|
|
19
|
-
readonly category: "dom";
|
|
20
|
-
readonly compatibility: "standard";
|
|
21
|
-
};
|
|
22
|
-
protected readonly mode: "hide";
|
|
23
|
-
execute(input: VisibilityCommandInput, _context: TypedExecutionContext): Promise<void>;
|
|
24
|
-
validate(input: unknown): input is VisibilityCommandInput;
|
|
25
|
-
}
|
|
26
|
-
export declare const createHideCommand: () => HideCommand;
|
|
27
|
-
export default HideCommand;
|
|
28
|
-
//# sourceMappingURL=hide.d.ts.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { TypedExecutionContext } from '../../types/base-types';
|
|
2
|
-
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
3
|
-
import { type DecoratedCommand } from '../decorators';
|
|
4
|
-
import type { CommandRaw } from '../../ast/command-slots';
|
|
5
|
-
export interface MakeCommandInput {
|
|
6
|
-
article: 'a' | 'an';
|
|
7
|
-
expression: string | HTMLElement;
|
|
8
|
-
constructorArgs?: unknown[];
|
|
9
|
-
variableName?: string;
|
|
10
|
-
}
|
|
11
|
-
export declare class MakeCommand implements DecoratedCommand {
|
|
12
|
-
static readonly metadata: {
|
|
13
|
-
readonly description: "Create DOM elements or class instances";
|
|
14
|
-
readonly syntax: readonly ["make a <tag#id.class1.class2/>", "make a <ClassName> from <args> called <identifier>"];
|
|
15
|
-
readonly examples: readonly ["make an <a.navlink/> called linkElement", "make a URL from \"/path/\", \"https://origin.example.com\""];
|
|
16
|
-
readonly sideEffects: readonly ["dom-creation", "data-mutation"];
|
|
17
|
-
readonly category: "dom";
|
|
18
|
-
readonly compatibility: "standard";
|
|
19
|
-
};
|
|
20
|
-
get metadata(): {
|
|
21
|
-
readonly description: "Create DOM elements or class instances";
|
|
22
|
-
readonly syntax: readonly ["make a <tag#id.class1.class2/>", "make a <ClassName> from <args> called <identifier>"];
|
|
23
|
-
readonly examples: readonly ["make an <a.navlink/> called linkElement", "make a URL from \"/path/\", \"https://origin.example.com\""];
|
|
24
|
-
readonly sideEffects: readonly ["dom-creation", "data-mutation"];
|
|
25
|
-
readonly category: "dom";
|
|
26
|
-
readonly compatibility: "standard";
|
|
27
|
-
};
|
|
28
|
-
readonly name: string;
|
|
29
|
-
parseInput(raw: CommandRaw<'make'>, evaluator: ExpressionEvaluator, context: TypedExecutionContext): Promise<MakeCommandInput>;
|
|
30
|
-
execute(input: MakeCommandInput, context: TypedExecutionContext): Promise<unknown>;
|
|
31
|
-
}
|
|
32
|
-
export declare const createMakeCommand: () => MakeCommand;
|
|
33
|
-
export default MakeCommand;
|
|
34
|
-
//# sourceMappingURL=make.d.ts.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { ExecutionContext, TypedExecutionContext } from '../../types/base-types';
|
|
2
|
-
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
3
|
-
import { type DecoratedCommand } from '../decorators';
|
|
4
|
-
import type { CommandRaw } from '../../ast/command-slots';
|
|
5
|
-
export type OpenDialogMode = 'modal' | 'non-modal';
|
|
6
|
-
export interface OpenCommandInput {
|
|
7
|
-
targets: HTMLElement[];
|
|
8
|
-
dialogMode: OpenDialogMode;
|
|
9
|
-
}
|
|
10
|
-
export declare class OpenCommand implements DecoratedCommand {
|
|
11
|
-
static readonly metadata: {
|
|
12
|
-
readonly description: "Open a dialog, details element, or popover";
|
|
13
|
-
readonly syntax: readonly ["open [<target>]", "open <dialog> as modal", "open <dialog> as non-modal"];
|
|
14
|
-
readonly examples: readonly ["open", "open #myDialog", "open #details", "open #popup as non-modal"];
|
|
15
|
-
readonly sideEffects: readonly ["dom-mutation"];
|
|
16
|
-
readonly category: "dom";
|
|
17
|
-
readonly compatibility: "standard";
|
|
18
|
-
};
|
|
19
|
-
get metadata(): {
|
|
20
|
-
readonly description: "Open a dialog, details element, or popover";
|
|
21
|
-
readonly syntax: readonly ["open [<target>]", "open <dialog> as modal", "open <dialog> as non-modal"];
|
|
22
|
-
readonly examples: readonly ["open", "open #myDialog", "open #details", "open #popup as non-modal"];
|
|
23
|
-
readonly sideEffects: readonly ["dom-mutation"];
|
|
24
|
-
readonly category: "dom";
|
|
25
|
-
readonly compatibility: "standard";
|
|
26
|
-
};
|
|
27
|
-
readonly name: string;
|
|
28
|
-
parseInput(raw: CommandRaw<'open'>, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<OpenCommandInput>;
|
|
29
|
-
execute(input: OpenCommandInput, _context: TypedExecutionContext): Promise<void>;
|
|
30
|
-
validate(input: unknown): input is OpenCommandInput;
|
|
31
|
-
}
|
|
32
|
-
export declare const createOpenCommand: () => OpenCommand;
|
|
33
|
-
export default OpenCommand;
|
|
34
|
-
//# sourceMappingURL=open.d.ts.map
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
-
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
3
|
-
import { type MorphOptions } from '../../lib/morph-adapter';
|
|
4
|
-
import type { SwapStrategy } from './swap';
|
|
5
|
-
import { type DecoratedCommand } from '../decorators';
|
|
6
|
-
import type { PartialValidationResult } from '../../validation/partial-validation-types';
|
|
7
|
-
import type { CommandRaw } from '../../ast/command-slots';
|
|
8
|
-
export interface ParsedPartial {
|
|
9
|
-
target: string;
|
|
10
|
-
strategy: SwapStrategy;
|
|
11
|
-
content: string;
|
|
12
|
-
}
|
|
13
|
-
export interface ProcessPartialsCommandInput {
|
|
14
|
-
html: string;
|
|
15
|
-
useViewTransition?: boolean;
|
|
16
|
-
morphOptions?: MorphOptions;
|
|
17
|
-
}
|
|
18
|
-
export interface ProcessPartialsResult {
|
|
19
|
-
count: number;
|
|
20
|
-
targets: string[];
|
|
21
|
-
errors: string[];
|
|
22
|
-
validationWarnings: string[];
|
|
23
|
-
validationDetails?: Record<string, PartialValidationResult>;
|
|
24
|
-
}
|
|
25
|
-
export declare function extractPartials(html: string): ParsedPartial[];
|
|
26
|
-
export declare function processPartials(html: string, morphOptions?: MorphOptions): ProcessPartialsResult;
|
|
27
|
-
export declare class ProcessPartialsCommand implements DecoratedCommand {
|
|
28
|
-
static readonly metadata: {
|
|
29
|
-
readonly description: "Process <hx-partial> elements for multi-target swaps";
|
|
30
|
-
readonly syntax: readonly ["process partials in <content>", "process partials in <content> using view transition"];
|
|
31
|
-
readonly examples: readonly ["process partials in it", "process partials in fetchedHtml", "process partials in it using view transition"];
|
|
32
|
-
readonly sideEffects: readonly ["dom-mutation"];
|
|
33
|
-
readonly category: "dom";
|
|
34
|
-
readonly compatibility: "lokascript-extension";
|
|
35
|
-
};
|
|
36
|
-
get metadata(): {
|
|
37
|
-
readonly description: "Process <hx-partial> elements for multi-target swaps";
|
|
38
|
-
readonly syntax: readonly ["process partials in <content>", "process partials in <content> using view transition"];
|
|
39
|
-
readonly examples: readonly ["process partials in it", "process partials in fetchedHtml", "process partials in it using view transition"];
|
|
40
|
-
readonly sideEffects: readonly ["dom-mutation"];
|
|
41
|
-
readonly category: "dom";
|
|
42
|
-
readonly compatibility: "lokascript-extension";
|
|
43
|
-
};
|
|
44
|
-
readonly name: string;
|
|
45
|
-
parseInput(raw: CommandRaw<'process'>, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<ProcessPartialsCommandInput>;
|
|
46
|
-
execute(input: ProcessPartialsCommandInput, context: TypedExecutionContext): Promise<ProcessPartialsResult>;
|
|
47
|
-
}
|
|
48
|
-
export declare const createProcessPartialsCommand: () => ProcessPartialsCommand;
|
|
49
|
-
export declare const processPartialsCommand: ProcessPartialsCommand;
|
|
50
|
-
export default ProcessPartialsCommand;
|
|
51
|
-
//# sourceMappingURL=process-partials.d.ts.map
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
-
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
3
|
-
import { type ContentInsertPosition, type SemanticPosition } from '../helpers/dom-mutation';
|
|
4
|
-
import { type DecoratedCommand } from '../decorators';
|
|
5
|
-
import type { CommandRaw } from '../../ast/command-slots';
|
|
6
|
-
export type InsertPosition = ContentInsertPosition;
|
|
7
|
-
export interface PutCommandInput {
|
|
8
|
-
value: any;
|
|
9
|
-
targets: HTMLElement[];
|
|
10
|
-
position: SemanticPosition;
|
|
11
|
-
memberPath?: string;
|
|
12
|
-
variableName?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare class PutCommand implements DecoratedCommand {
|
|
15
|
-
static readonly metadata: {
|
|
16
|
-
readonly description: "Insert content into elements or properties";
|
|
17
|
-
readonly syntax: readonly ["put <value> into <target>", "put <value> before <target>", "put <value> after <target>"];
|
|
18
|
-
readonly examples: readonly ["put \"Hello World\" into me", "put <div>Content</div> before #target", "put value into #elem's innerHTML"];
|
|
19
|
-
readonly sideEffects: readonly ["dom-mutation"];
|
|
20
|
-
readonly category: "dom";
|
|
21
|
-
readonly compatibility: "standard";
|
|
22
|
-
};
|
|
23
|
-
get metadata(): {
|
|
24
|
-
readonly description: "Insert content into elements or properties";
|
|
25
|
-
readonly syntax: readonly ["put <value> into <target>", "put <value> before <target>", "put <value> after <target>"];
|
|
26
|
-
readonly examples: readonly ["put \"Hello World\" into me", "put <div>Content</div> before #target", "put value into #elem's innerHTML"];
|
|
27
|
-
readonly sideEffects: readonly ["dom-mutation"];
|
|
28
|
-
readonly category: "dom";
|
|
29
|
-
readonly compatibility: "standard";
|
|
30
|
-
};
|
|
31
|
-
readonly name: string;
|
|
32
|
-
parseInput(raw: CommandRaw<'put'>, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<PutCommandInput>;
|
|
33
|
-
execute(input: PutCommandInput, context: TypedExecutionContext): Promise<HTMLElement[]>;
|
|
34
|
-
private mapPosition;
|
|
35
|
-
private resolveTargets;
|
|
36
|
-
private parseValue;
|
|
37
|
-
private looksLikeCss;
|
|
38
|
-
private setProperty;
|
|
39
|
-
}
|
|
40
|
-
export declare const createPutCommand: () => PutCommand;
|
|
41
|
-
export default PutCommand;
|
|
42
|
-
//# sourceMappingURL=put.d.ts.map
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { ExecutionContext, TypedExecutionContext } from '../../types/core';
|
|
2
|
-
import type { ExpressionEvaluator } from '../../core/expression-evaluator';
|
|
3
|
-
import { DOMModificationBase } from './dom-modification-base';
|
|
4
|
-
import type { CommandRaw } from '../../ast/command-slots';
|
|
5
|
-
export type RemoveCommandInput = {
|
|
6
|
-
type: 'classes';
|
|
7
|
-
classes: string[];
|
|
8
|
-
targets: HTMLElement[];
|
|
9
|
-
} | {
|
|
10
|
-
type: 'attribute';
|
|
11
|
-
name: string;
|
|
12
|
-
targets: HTMLElement[];
|
|
13
|
-
} | {
|
|
14
|
-
type: 'styles';
|
|
15
|
-
properties: string[];
|
|
16
|
-
targets: HTMLElement[];
|
|
17
|
-
} | {
|
|
18
|
-
type: 'element';
|
|
19
|
-
targets: HTMLElement[];
|
|
20
|
-
};
|
|
21
|
-
export declare class RemoveCommand extends DOMModificationBase {
|
|
22
|
-
static readonly metadata: {
|
|
23
|
-
readonly description: "Remove CSS classes, attributes, styles, or elements from the DOM";
|
|
24
|
-
readonly syntax: "remove <classes|@attr|*prop|element> [from <target>]";
|
|
25
|
-
readonly examples: readonly ["remove .active from me", "remove \"active selected\" from <button/>", "remove .highlighted from #modal", "remove me", "remove closest .item"];
|
|
26
|
-
readonly sideEffects: readonly ["dom-mutation"];
|
|
27
|
-
readonly category: "dom";
|
|
28
|
-
readonly compatibility: "standard";
|
|
29
|
-
};
|
|
30
|
-
get metadata(): {
|
|
31
|
-
readonly description: "Remove CSS classes, attributes, styles, or elements from the DOM";
|
|
32
|
-
readonly syntax: "remove <classes|@attr|*prop|element> [from <target>]";
|
|
33
|
-
readonly examples: readonly ["remove .active from me", "remove \"active selected\" from <button/>", "remove .highlighted from #modal", "remove me", "remove closest .item"];
|
|
34
|
-
readonly sideEffects: readonly ["dom-mutation"];
|
|
35
|
-
readonly category: "dom";
|
|
36
|
-
readonly compatibility: "standard";
|
|
37
|
-
};
|
|
38
|
-
protected readonly mode: "remove";
|
|
39
|
-
protected readonly preposition = "from";
|
|
40
|
-
parseInput(raw: CommandRaw<'remove'>, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<RemoveCommandInput>;
|
|
41
|
-
execute(input: RemoveCommandInput, context: TypedExecutionContext): void;
|
|
42
|
-
validate(input: unknown): input is RemoveCommandInput;
|
|
43
|
-
}
|
|
44
|
-
export declare const createRemoveCommand: () => RemoveCommand;
|
|
45
|
-
export default RemoveCommand;
|
|
46
|
-
//# sourceMappingURL=remove.d.ts.map
|