@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
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperfixi/core",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
|
+
"description": "Hyperscript: @hyperfixi/engine, its script-tag bundle, and the multilingual and editor tooling around it",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "dist/index.
|
|
6
|
+
"main": "dist/index.mjs",
|
|
7
7
|
"unpkg": "dist/hyperfixi.js",
|
|
8
8
|
"jsdelivr": "dist/hyperfixi.js",
|
|
9
9
|
"module": "dist/index.mjs",
|
|
@@ -11,109 +11,14 @@
|
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
13
|
"types": "./dist/index.d.ts",
|
|
14
|
-
"import": "./dist/index.mjs"
|
|
15
|
-
"require": "./dist/index.cjs"
|
|
16
|
-
},
|
|
17
|
-
"./browser": {
|
|
18
|
-
"types": "./dist/index.d.ts",
|
|
19
|
-
"default": "./dist/hyperfixi.js"
|
|
20
|
-
},
|
|
21
|
-
"./browser/multilingual": {
|
|
22
|
-
"types": "./dist/index.d.ts",
|
|
23
|
-
"default": "./dist/hyperfixi-multilingual.js"
|
|
24
|
-
},
|
|
25
|
-
"./browser/hybrid-complete": {
|
|
26
|
-
"default": "./dist/hyperfixi-hybrid-complete.js"
|
|
27
|
-
},
|
|
28
|
-
"./browser/hybrid-hx": {
|
|
29
|
-
"default": "./dist/hyperfixi-hx.js"
|
|
30
|
-
},
|
|
31
|
-
"./browser/hybrid-hx-v4": {
|
|
32
|
-
"default": "./dist/hyperfixi-hx-v4.js"
|
|
33
|
-
},
|
|
34
|
-
"./commands": {
|
|
35
|
-
"types": "./dist/commands/index.d.ts",
|
|
36
|
-
"import": "./dist/commands/index.mjs",
|
|
37
|
-
"require": "./dist/commands/index.cjs"
|
|
38
|
-
},
|
|
39
|
-
"./expressions": {
|
|
40
|
-
"types": "./dist/expressions/index.d.ts",
|
|
41
|
-
"import": "./dist/expressions/index.mjs",
|
|
42
|
-
"require": "./dist/expressions/index.cjs"
|
|
43
|
-
},
|
|
44
|
-
"./parser/full": {
|
|
45
|
-
"types": "./dist/parser/full-parser.d.ts",
|
|
46
|
-
"import": "./dist/parser/full-parser.mjs",
|
|
47
|
-
"require": "./dist/parser/full-parser.cjs"
|
|
48
|
-
},
|
|
49
|
-
"./parser/hybrid": {
|
|
50
|
-
"types": "./dist/parser/hybrid-parser.d.ts",
|
|
51
|
-
"import": "./dist/parser/hybrid-parser.mjs",
|
|
52
|
-
"require": "./dist/parser/hybrid-parser.cjs"
|
|
53
|
-
},
|
|
54
|
-
"./parser/hybrid/parser-core": {
|
|
55
|
-
"types": "./dist/parser/hybrid/parser-core.d.ts",
|
|
56
|
-
"import": "./dist/parser/hybrid/parser-core.mjs",
|
|
57
|
-
"require": "./dist/parser/hybrid/parser-core.cjs"
|
|
58
|
-
},
|
|
59
|
-
"./parser/hybrid/ast-types": {
|
|
60
|
-
"types": "./dist/parser/hybrid/ast-types.d.ts",
|
|
61
|
-
"import": "./dist/parser/hybrid/ast-types.mjs",
|
|
62
|
-
"require": "./dist/parser/hybrid/ast-types.cjs"
|
|
63
|
-
},
|
|
64
|
-
"./parser/hybrid/tokenizer": {
|
|
65
|
-
"types": "./dist/parser/hybrid/tokenizer.d.ts",
|
|
66
|
-
"import": "./dist/parser/hybrid/tokenizer.mjs",
|
|
67
|
-
"require": "./dist/parser/hybrid/tokenizer.cjs"
|
|
68
|
-
},
|
|
69
|
-
"./parser/hybrid/aliases": {
|
|
70
|
-
"types": "./dist/parser/hybrid/aliases.d.ts",
|
|
71
|
-
"import": "./dist/parser/hybrid/aliases.mjs",
|
|
72
|
-
"require": "./dist/parser/hybrid/aliases.cjs"
|
|
73
|
-
},
|
|
74
|
-
"./parser/regex": {
|
|
75
|
-
"types": "./dist/parser/regex-parser.d.ts",
|
|
76
|
-
"import": "./dist/parser/regex-parser.mjs",
|
|
77
|
-
"require": "./dist/parser/regex-parser.cjs"
|
|
78
|
-
},
|
|
79
|
-
"./browser/modular": {
|
|
80
|
-
"default": "./dist/hyperfixi.mjs"
|
|
81
|
-
},
|
|
82
|
-
"./behaviors": {
|
|
83
|
-
"types": "./dist/behaviors/index.d.ts",
|
|
84
|
-
"import": "./dist/behaviors/index.mjs",
|
|
85
|
-
"require": "./dist/behaviors/index.cjs"
|
|
14
|
+
"import": "./dist/index.mjs"
|
|
86
15
|
},
|
|
16
|
+
"./browser": "./dist/hyperfixi.js",
|
|
87
17
|
"./multilingual": {
|
|
88
18
|
"types": "./dist/multilingual/index.d.ts",
|
|
89
19
|
"import": "./dist/multilingual/index.mjs",
|
|
90
20
|
"require": "./dist/multilingual/index.cjs"
|
|
91
21
|
},
|
|
92
|
-
"./bundle-generator": {
|
|
93
|
-
"types": "./dist/bundle-generator/index.d.ts",
|
|
94
|
-
"import": "./dist/bundle-generator/index.mjs",
|
|
95
|
-
"require": "./dist/bundle-generator/index.cjs"
|
|
96
|
-
},
|
|
97
|
-
"./registry": {
|
|
98
|
-
"types": "./dist/registry/index.d.ts",
|
|
99
|
-
"import": "./dist/registry/index.mjs",
|
|
100
|
-
"require": "./dist/registry/index.cjs"
|
|
101
|
-
},
|
|
102
|
-
"./registry/browser": {
|
|
103
|
-
"types": "./dist/registry/browser-types.d.ts",
|
|
104
|
-
"import": "./dist/registry/browser-types.mjs",
|
|
105
|
-
"require": "./dist/registry/browser-types.cjs"
|
|
106
|
-
},
|
|
107
|
-
"./registry/universal": {
|
|
108
|
-
"types": "./dist/registry/universal-types.d.ts",
|
|
109
|
-
"import": "./dist/registry/universal-types.mjs",
|
|
110
|
-
"require": "./dist/registry/universal-types.cjs"
|
|
111
|
-
},
|
|
112
|
-
"./registry/environment": {
|
|
113
|
-
"types": "./dist/registry/environment.d.ts",
|
|
114
|
-
"import": "./dist/registry/environment.mjs",
|
|
115
|
-
"require": "./dist/registry/environment.cjs"
|
|
116
|
-
},
|
|
117
22
|
"./package.json": "./package.json",
|
|
118
23
|
"./reference": {
|
|
119
24
|
"types": "./dist/reference/index.d.ts",
|
|
@@ -134,11 +39,6 @@
|
|
|
134
39
|
"types": "./dist/ast-utils/index.d.ts",
|
|
135
40
|
"import": "./dist/ast-utils/index.mjs",
|
|
136
41
|
"require": "./dist/ast-utils/index.cjs"
|
|
137
|
-
},
|
|
138
|
-
"./lse": {
|
|
139
|
-
"types": "./dist/lse/index.d.ts",
|
|
140
|
-
"import": "./dist/lse/index.mjs",
|
|
141
|
-
"require": "./dist/lse/index.cjs"
|
|
142
42
|
}
|
|
143
43
|
},
|
|
144
44
|
"files": [
|
|
@@ -146,54 +46,26 @@
|
|
|
146
46
|
"dist/**/*.mjs",
|
|
147
47
|
"dist/**/*.cjs",
|
|
148
48
|
"dist/**/*.d.ts",
|
|
149
|
-
"dist/**/*.d.cts",
|
|
150
|
-
"dist/**/*.d.mts",
|
|
151
|
-
"vocab/**/*.js",
|
|
152
49
|
"README.md",
|
|
153
50
|
"LICENSE",
|
|
154
51
|
"CHANGELOG.md"
|
|
155
52
|
],
|
|
156
53
|
"scripts": {
|
|
157
|
-
"build": "rollup -c &&
|
|
54
|
+
"build": "rollup -c && tsc -p tsconfig.build.json",
|
|
158
55
|
"build:types": "tsc -p tsconfig.build.json",
|
|
159
|
-
"build:multilingual-dist": "rollup -c",
|
|
160
56
|
"build:browser": "node scripts/build-browser-bundles.mjs",
|
|
161
|
-
"build:browser:main-only": "
|
|
162
|
-
"postbuild:browser": "node scripts/create-bundle-aliases.mjs",
|
|
163
|
-
"build:browser:dev": "rollup -c rollup.browser.dev.config.mjs",
|
|
164
|
-
"build:browser:prod": "rollup -c rollup.browser.prod.config.mjs",
|
|
165
|
-
"build:browser:llm": "rollup -c rollup.browser.llm.config.mjs",
|
|
166
|
-
"build:browser:hybrid-complete": "rollup -c rollup.browser-hybrid-complete.config.mjs",
|
|
167
|
-
"build:browser:hybrid-hx": "rollup -c rollup.browser-hybrid-hx.config.mjs",
|
|
168
|
-
"build:browser:hybrid-hx-v4": "rollup -c rollup.browser-hybrid-hx-v4.config.mjs",
|
|
169
|
-
"build:browser:classic": "rollup -c rollup.browser-classic.config.mjs",
|
|
170
|
-
"build:browser:classic-i18n": "rollup -c rollup.browser-classic-i18n.config.mjs",
|
|
171
|
-
"build:browser:multilingual": "rollup -c rollup.browser-multilingual.config.mjs",
|
|
172
|
-
"build:browser:semantic-complete": "rollup -c rollup.browser-semantic-complete.config.mjs",
|
|
173
|
-
"build:browser:all": "npm run build:browser:dev && npm run build:browser:prod && npm run build:browser:llm && npm run build:browser:classic && npm run build:browser:classic-i18n && npm run build:browser:multilingual && npm run build:browser:semantic-complete",
|
|
174
|
-
"build:browser:modular": "rm -rf dist/chunks && rollup -c rollup.browser-modular.config.mjs",
|
|
175
|
-
"build:parser-modules": "rollup -c rollup.parser-modules.config.mjs",
|
|
57
|
+
"build:browser:main-only": "node scripts/copy-engine-bundle.mjs",
|
|
176
58
|
"snapshot:bundle-size": "node scripts/bundle-size-snapshot.mjs --check",
|
|
177
59
|
"snapshot:bundle-size:update": "node scripts/bundle-size-snapshot.mjs --update",
|
|
178
|
-
"generate:bundle": "tsx scripts/generate-inline-bundle.ts",
|
|
179
|
-
"generate:bundle:textshelf": "tsx scripts/generate-inline-bundle.ts --config bundle-configs/textshelf.config.json",
|
|
180
|
-
"generate:htmx-vocab": "node scripts/gen-htmx-vocab.mjs",
|
|
181
|
-
"check:htmx-vocab": "node scripts/gen-htmx-vocab.mjs --check",
|
|
182
60
|
"dev": "rollup -c -w",
|
|
183
61
|
"test": "bash ../../scripts/vitest-run.sh",
|
|
184
62
|
"test:watch": "vitest",
|
|
185
63
|
"test:coverage": "bash ../../scripts/vitest-run.sh --coverage",
|
|
186
|
-
"bench": "vitest bench",
|
|
187
|
-
"bench:run": "vitest bench --run",
|
|
188
|
-
"bench:ci": "vitest bench --run --outputJson=benchmark-results/latest.json",
|
|
189
|
-
"bench:check": "node scripts/bench-baseline.mjs --check",
|
|
190
|
-
"bench:check:update": "node scripts/bench-baseline.mjs --update",
|
|
191
64
|
"test:ui": "vitest --ui",
|
|
192
65
|
"test:browser": "npm run build:browser && npx playwright test --project=full",
|
|
193
66
|
"test:browser:smoke": "node scripts/check-dist-freshness.mjs && npx playwright test --project=smoke --reporter=list",
|
|
194
67
|
"test:browser:quick": "npm run build:browser && npx playwright test --project=quick --reporter=list",
|
|
195
68
|
"test:browser:integration": "node scripts/check-dist-freshness.mjs && npx playwright test --project=integration --reporter=list",
|
|
196
|
-
"test:browser:debug": "node scripts/check-dist-freshness.mjs && npx playwright test --project=debug --reporter=list",
|
|
197
69
|
"test:browser:commands": "node scripts/check-dist-freshness.mjs && npx playwright test --project=commands --reporter=list",
|
|
198
70
|
"test:browser:expressions": "node scripts/check-dist-freshness.mjs && npx playwright test --project=expressions --reporter=list",
|
|
199
71
|
"test:browser:i18n": "node scripts/check-dist-freshness.mjs && npx playwright test --project=i18n --reporter=list",
|
|
@@ -204,56 +76,32 @@
|
|
|
204
76
|
"test:comprehensive": "npm run build:browser && npx playwright test --grep '@comprehensive' --reporter=list",
|
|
205
77
|
"test:check": "VITEST_QUIET=1 bash ../../scripts/vitest-run.sh --reporter=dot",
|
|
206
78
|
"test:quick": "npm run build:browser && bash ../../scripts/vitest-run.sh --reporter=dot",
|
|
207
|
-
"test:prod": "NODE_ENV=production node production-test-runner.js --quiet",
|
|
208
|
-
"test:prod:verbose": "node production-test-runner.js",
|
|
209
79
|
"typecheck": "tsc --noEmit && tsc -p tsconfig.scripts.json --noEmit",
|
|
210
80
|
"typecheck:scripts": "tsc -p tsconfig.scripts.json --noEmit",
|
|
211
81
|
"clean": "rm -rf dist",
|
|
212
|
-
"analyze:usage": "node scripts/analyze-usage.mjs",
|
|
213
|
-
"size": "npm run size:analysis",
|
|
214
|
-
"size:analysis": "echo 'Size Analysis:' && echo 'ES Module: '$(wc -c < dist/index.mjs)' bytes' && echo 'CJS Module: '$(wc -c < dist/index.js)' bytes' && echo 'Gzipped: '$(gzip -c dist/index.mjs | wc -c)' bytes'",
|
|
215
82
|
"verify:reference": "tsx scripts/verify-reference-data.ts",
|
|
216
|
-
"baseline:ast-equivalence": "tsx scripts/generate-ast-equivalence-baseline.ts",
|
|
217
|
-
"census:parse-input": "tsx scripts/generate-parse-input-census.ts",
|
|
218
|
-
"census:parse-input:update": "tsx scripts/generate-parse-input-census.ts --update",
|
|
219
|
-
"docs:commands": "tsx scripts/generate-command-docs.ts && tsx scripts/generate-command-docs.ts --format json",
|
|
220
|
-
"docs:commands:check": "tsx scripts/generate-command-docs.ts --check && tsx scripts/generate-command-docs.ts --format json --check",
|
|
221
|
-
"generate:bundles": "tsx scripts/generate-bundles.ts",
|
|
222
|
-
"generate:bundles:check": "tsx scripts/generate-bundles.ts --check",
|
|
223
83
|
"update:sizes": "tsx scripts/update-bundle-sizes.ts",
|
|
224
84
|
"update:sizes:auto": "tsx scripts/update-bundle-sizes.ts --update"
|
|
225
85
|
},
|
|
226
86
|
"devDependencies": {
|
|
227
87
|
"@playwright/test": "^1.63.0",
|
|
228
|
-
"@rollup/plugin-alias": "^6.0.0",
|
|
229
|
-
"@rollup/plugin-commonjs": "^29.0.3",
|
|
230
88
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
231
|
-
"@rollup/plugin-replace": "^6.0.3",
|
|
232
|
-
"@rollup/plugin-terser": "^1.0.0",
|
|
233
89
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
234
90
|
"@vitest/coverage-v8": "^5.0.0",
|
|
235
91
|
"@vitest/ui": "^5.0.2",
|
|
236
|
-
"better-sqlite3": "^13.0.3",
|
|
237
|
-
"esbuild": "^0.25.12",
|
|
238
92
|
"happy-dom": "^20.14.5",
|
|
239
93
|
"http-server": "^14.1.1",
|
|
240
|
-
"jsdom": "^30.1.1",
|
|
241
|
-
"prettier": "^3.0.0",
|
|
242
94
|
"rollup": "^4.63.5",
|
|
243
|
-
"rollup-plugin-visualizer": "^7.1.1",
|
|
244
95
|
"tsx": "^4.23.15",
|
|
245
96
|
"typescript": "^5.8.3",
|
|
246
|
-
"
|
|
247
|
-
"vitest": "^5.0.2",
|
|
248
|
-
"zod": "^4.6.5"
|
|
97
|
+
"vitest": "^5.0.2"
|
|
249
98
|
},
|
|
250
99
|
"keywords": [
|
|
251
100
|
"hyperscript",
|
|
252
|
-
"
|
|
253
|
-
"
|
|
101
|
+
"_hyperscript",
|
|
102
|
+
"multilingual",
|
|
254
103
|
"dom",
|
|
255
|
-
"typescript"
|
|
256
|
-
"ast"
|
|
104
|
+
"typescript"
|
|
257
105
|
],
|
|
258
106
|
"author": "LokaScript Contributors",
|
|
259
107
|
"license": "MIT",
|
|
@@ -274,22 +122,8 @@
|
|
|
274
122
|
"access": "public"
|
|
275
123
|
},
|
|
276
124
|
"dependencies": {
|
|
277
|
-
"@
|
|
278
|
-
"@lokascript/semantic": "^
|
|
279
|
-
"morphlex": "^1.4.0",
|
|
280
|
-
"tslib": "^2.8.1"
|
|
281
|
-
},
|
|
282
|
-
"peerDependencies": {
|
|
283
|
-
"@hyperfixi/patterns-reference": "^3.3.0",
|
|
284
|
-
"@lokascript/framework": "^3.3.0"
|
|
285
|
-
},
|
|
286
|
-
"peerDependenciesMeta": {
|
|
287
|
-
"@hyperfixi/patterns-reference": {
|
|
288
|
-
"optional": true
|
|
289
|
-
},
|
|
290
|
-
"@lokascript/framework": {
|
|
291
|
-
"optional": true
|
|
292
|
-
}
|
|
125
|
+
"@hyperfixi/engine": "^4.0.1",
|
|
126
|
+
"@lokascript/semantic": "^4.0.1"
|
|
293
127
|
},
|
|
294
128
|
"directories": {
|
|
295
129
|
"doc": "docs"
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { TestExpressionContext } from '../test-utilities';
|
|
2
|
-
export interface TestContextOptions {
|
|
3
|
-
element?: Element;
|
|
4
|
-
me?: Element;
|
|
5
|
-
you?: Element;
|
|
6
|
-
it?: unknown;
|
|
7
|
-
result?: unknown;
|
|
8
|
-
target?: EventTarget;
|
|
9
|
-
event?: Event;
|
|
10
|
-
globals?: Record<string, unknown>;
|
|
11
|
-
locals?: Map<string, unknown>;
|
|
12
|
-
meta?: Map<string, unknown> | Record<string, unknown>;
|
|
13
|
-
[key: string]: unknown;
|
|
14
|
-
}
|
|
15
|
-
export declare class TestContextBuilder {
|
|
16
|
-
private options;
|
|
17
|
-
withElement(element: Element): this;
|
|
18
|
-
withMe(me: Element): this;
|
|
19
|
-
withYou(you: Element): this;
|
|
20
|
-
withIt(it: unknown): this;
|
|
21
|
-
withResult(result: unknown): this;
|
|
22
|
-
withTarget(target: EventTarget): this;
|
|
23
|
-
withEvent(event: Event): this;
|
|
24
|
-
withGlobal<T>(key: string, value: T): this;
|
|
25
|
-
withGlobals(globals: Record<string, unknown>): this;
|
|
26
|
-
withLocal<T>(key: string, value: T): this;
|
|
27
|
-
withLocals(locals: Record<string, unknown>): this;
|
|
28
|
-
withMeta(key: string, value: unknown): this;
|
|
29
|
-
withProperty<T>(key: string, value: T): this;
|
|
30
|
-
build(): TestExpressionContext;
|
|
31
|
-
}
|
|
32
|
-
export declare function createTestContext(options?: TestContextOptions): TestExpressionContext;
|
|
33
|
-
export declare function createMinimalContext(element?: Element): TestExpressionContext;
|
|
34
|
-
export declare function createMockElement(tagName?: string, attributes?: Record<string, string>): Element;
|
|
35
|
-
export declare function createMockEvent(type: string, options?: {
|
|
36
|
-
target?: EventTarget;
|
|
37
|
-
currentTarget?: EventTarget;
|
|
38
|
-
bubbles?: boolean;
|
|
39
|
-
cancelable?: boolean;
|
|
40
|
-
[key: string]: unknown;
|
|
41
|
-
}): Event;
|
|
42
|
-
//# sourceMappingURL=context-builders.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare function assertIsError(value: unknown): asserts value is Error;
|
|
2
|
-
export declare function assertErrorType<T extends Error>(value: unknown, ErrorType: new (...args: unknown[]) => T): asserts value is T;
|
|
3
|
-
export declare function expectErrorMessage(error: unknown, pattern: string | RegExp): void;
|
|
4
|
-
export declare function expectThrows<T extends Error = Error>(fn: () => void, ErrorType?: new (...args: unknown[]) => T, messagePattern?: string | RegExp): T;
|
|
5
|
-
export declare function expectThrowsAsync<T extends Error = Error>(fn: () => Promise<void>, ErrorType?: new (...args: unknown[]) => T, messagePattern?: string | RegExp): Promise<T>;
|
|
6
|
-
export declare function handleError<T>(error: unknown, handler: (error: Error) => T, fallback?: (value: unknown) => T): T;
|
|
7
|
-
export declare function hasErrorProperty<K extends string>(error: unknown, property: K): error is Error & Record<K, unknown>;
|
|
8
|
-
export declare function getErrorProperty<T = unknown>(error: unknown, property: string): T | undefined;
|
|
9
|
-
export declare function assertErrorHasProperty<K extends string>(error: unknown, property: K): asserts error is Error & Record<K, unknown>;
|
|
10
|
-
export interface ErrorExpectation<T extends Error = Error> {
|
|
11
|
-
type?: new (...args: unknown[]) => T;
|
|
12
|
-
message?: string | RegExp;
|
|
13
|
-
code?: string;
|
|
14
|
-
properties?: Record<string, unknown>;
|
|
15
|
-
}
|
|
16
|
-
export declare function expectThrowsMatching<T extends Error = Error>(fn: () => void, expectation: ErrorExpectation<T>): T;
|
|
17
|
-
export declare function expectThrowsMatchingAsync<T extends Error = Error>(fn: () => Promise<void>, expectation: ErrorExpectation<T>): Promise<T>;
|
|
18
|
-
//# sourceMappingURL=error-testing.d.ts.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export * from './parser-helpers';
|
|
2
|
-
export * from './mock-types';
|
|
3
|
-
export * from './error-testing';
|
|
4
|
-
export * from './context-builders';
|
|
5
|
-
export { isCommandNode, assertCommandNode, assertNodeHasProperty, type ParsedStatementResult, type ParsingMetadata, type ASTNodeAssertable, } from '../parser/__types__/test-helpers';
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
export interface MockFunction<TArgs extends unknown[] = unknown[], TReturn = unknown> {
|
|
2
|
-
(...args: TArgs): TReturn;
|
|
3
|
-
calls: TArgs[];
|
|
4
|
-
lastCall?: TArgs;
|
|
5
|
-
returnValue?: TReturn;
|
|
6
|
-
callCount: number;
|
|
7
|
-
}
|
|
8
|
-
export declare function createMockFunction<TArgs extends unknown[] = unknown[], TReturn = unknown>(implementation?: (...args: TArgs) => TReturn): MockFunction<TArgs, TReturn>;
|
|
9
|
-
export interface MockWebSocketAPI {
|
|
10
|
-
postMessage<T extends Record<string, unknown> = Record<string, unknown>>(data: T, transferables?: Transferable[]): void;
|
|
11
|
-
addEventListener(event: string, handler: EventListener): void;
|
|
12
|
-
removeEventListener(event: string, handler: EventListener): void;
|
|
13
|
-
close(): void;
|
|
14
|
-
readyState: number;
|
|
15
|
-
url: string;
|
|
16
|
-
}
|
|
17
|
-
export declare function createMockWebSocket(url?: string): MockWebSocketAPI;
|
|
18
|
-
export interface MockEventSourceAPI {
|
|
19
|
-
simulateMessage<T = string>(data: T, eventType?: 'message' | 'open' | 'error', lastEventId?: string): void;
|
|
20
|
-
addEventListener(event: string, handler: EventListener): void;
|
|
21
|
-
removeEventListener(event: string, handler: EventListener): void;
|
|
22
|
-
close(): void;
|
|
23
|
-
readyState: number;
|
|
24
|
-
url: string;
|
|
25
|
-
}
|
|
26
|
-
export declare function createMockEventSource(url?: string): MockEventSourceAPI;
|
|
27
|
-
export interface MockWorkerAPI {
|
|
28
|
-
postMessage<T = unknown>(message: T, transfer?: Transferable[]): void;
|
|
29
|
-
addEventListener(type: string, listener: EventListener): void;
|
|
30
|
-
removeEventListener(type: string, listener: EventListener): void;
|
|
31
|
-
terminate(): void;
|
|
32
|
-
onmessage: ((event: MessageEvent) => void) | null;
|
|
33
|
-
onerror: ((event: ErrorEvent) => void) | null;
|
|
34
|
-
}
|
|
35
|
-
export declare function createMockWorker(): MockWorkerAPI;
|
|
36
|
-
export interface MockExpressResponse<T = unknown> {
|
|
37
|
-
json(data: T): this;
|
|
38
|
-
send(data: T): this;
|
|
39
|
-
status(code: number): this;
|
|
40
|
-
header(name: string, value: string): this;
|
|
41
|
-
contentType(type: string): this;
|
|
42
|
-
getStatusCode(): number;
|
|
43
|
-
getData(): T | undefined;
|
|
44
|
-
getHeaders(): Record<string, string>;
|
|
45
|
-
}
|
|
46
|
-
export declare function createMockExpressResponse<T = unknown>(): MockExpressResponse<T>;
|
|
47
|
-
export interface MockExpressRequest<T = unknown> {
|
|
48
|
-
method: string;
|
|
49
|
-
url: string;
|
|
50
|
-
body: T;
|
|
51
|
-
params: Record<string, string>;
|
|
52
|
-
query: Record<string, string>;
|
|
53
|
-
headers: Record<string, string>;
|
|
54
|
-
get(header: string): string | undefined;
|
|
55
|
-
}
|
|
56
|
-
export declare function createMockExpressRequest<T = unknown>(options?: Partial<MockExpressRequest<T>>): MockExpressRequest<T>;
|
|
57
|
-
//# sourceMappingURL=mock-types.d.ts.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ParserContext } from '../parser/parser-types';
|
|
2
|
-
import type { Token } from '../types/core';
|
|
3
|
-
export declare function createMockParserContext(tokens?: Token[], overrides?: Record<string, any>): ParserContext;
|
|
4
|
-
export declare function createToken(value: string, kind?: string, start?: number): Token;
|
|
5
|
-
export declare function createTokenStream(values: string[], kinds?: string[]): Token[];
|
|
6
|
-
export declare function createMockParserContextAt(tokens: Token[], position: number, overrides?: Record<string, any>): ParserContext;
|
|
7
|
-
//# sourceMappingURL=parser-context-mock.d.ts.map
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { CommandNode, ASTNode, Token, ParseError } from '../parser/types';
|
|
2
|
-
export interface ParserTestSuccess {
|
|
3
|
-
success: true;
|
|
4
|
-
node: CommandNode;
|
|
5
|
-
tokens: Token[];
|
|
6
|
-
errors?: ParseError[];
|
|
7
|
-
}
|
|
8
|
-
export interface ParserTestFailure {
|
|
9
|
-
success: false;
|
|
10
|
-
error: Error | ParseError;
|
|
11
|
-
input: string;
|
|
12
|
-
tokens?: Token[];
|
|
13
|
-
}
|
|
14
|
-
export type ParserTestResult = ParserTestSuccess | ParserTestFailure;
|
|
15
|
-
export declare function isParseSuccess(result: ParserTestResult): result is ParserTestSuccess;
|
|
16
|
-
export declare function isParseFailure(result: ParserTestResult): result is ParserTestFailure;
|
|
17
|
-
export declare function assertParseSuccess(result: ParserTestResult): asserts result is ParserTestSuccess;
|
|
18
|
-
export declare function assertParseFailure(result: ParserTestResult): asserts result is ParserTestFailure;
|
|
19
|
-
export declare function expectASTStructure(node: ASTNode | CommandNode, expected: Partial<CommandNode | ASTNode>): void;
|
|
20
|
-
export declare function expectNodeProperty<T = unknown>(node: ASTNode | CommandNode, property: string, expectedValue?: T): void;
|
|
21
|
-
export declare function expectCommandNode(node: ASTNode, expectedName: string): asserts node is CommandNode;
|
|
22
|
-
export declare function expectNodeType<T extends ASTNode>(node: ASTNode, expectedType: T['type']): asserts node is T;
|
|
23
|
-
export declare function getCommandArguments(node: ASTNode): ASTNode[];
|
|
24
|
-
export declare function getCommandTarget(node: ASTNode): ASTNode | undefined;
|
|
25
|
-
export declare function getNodeProperty<T = unknown>(node: ASTNode | CommandNode, property: string): T | undefined;
|
|
26
|
-
export declare class TestNodeBuilder {
|
|
27
|
-
private node;
|
|
28
|
-
withName(name: string): this;
|
|
29
|
-
withArguments(...args: ASTNode[]): this;
|
|
30
|
-
withTarget(target: ASTNode): this;
|
|
31
|
-
withPosition(start: number, end: number, line?: number, column?: number): this;
|
|
32
|
-
build(): CommandNode;
|
|
33
|
-
}
|
|
34
|
-
export declare function createTestCommandNode(name: string, args?: ASTNode[]): CommandNode;
|
|
35
|
-
export declare function createTestLiteral(value: string | number | boolean | null): ASTNode;
|
|
36
|
-
export declare function createTestIdentifier(name: string): ASTNode;
|
|
37
|
-
export declare function createTestSelector(selector: string): ASTNode;
|
|
38
|
-
//# sourceMappingURL=parser-helpers.d.ts.map
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { Runtime, type RuntimeOptions } from '../runtime/runtime';
|
|
2
|
-
import type { ASTNode, ExecutionContext } from '../types/base-types';
|
|
3
|
-
import type { RuntimeHooks } from '../types/hooks';
|
|
4
|
-
import type { FrontEnd } from '../parser/semantic-integration';
|
|
5
|
-
import { type ConversionConfig } from '../expressions/conversion';
|
|
6
|
-
import { DebugController } from '../debug/debug-controller';
|
|
7
|
-
declare global {
|
|
8
|
-
interface Window {
|
|
9
|
-
_hyperscript?: {
|
|
10
|
-
runtime?: Runtime;
|
|
11
|
-
behaviors?: Runtime['behaviorAPI'];
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
export interface HyperscriptConfig {
|
|
16
|
-
semantic: boolean;
|
|
17
|
-
language: string;
|
|
18
|
-
confidenceThreshold: number;
|
|
19
|
-
logAll: boolean;
|
|
20
|
-
conversions: ConversionConfig;
|
|
21
|
-
onCompileError: ((info: {
|
|
22
|
-
source: 'attribute' | 'script';
|
|
23
|
-
code: string;
|
|
24
|
-
errors: CompileError[];
|
|
25
|
-
element: Element | null;
|
|
26
|
-
}) => void) | null;
|
|
27
|
-
}
|
|
28
|
-
export declare const config: HyperscriptConfig;
|
|
29
|
-
export interface CompileError {
|
|
30
|
-
message: string;
|
|
31
|
-
line: number;
|
|
32
|
-
column: number;
|
|
33
|
-
suggestion?: string;
|
|
34
|
-
}
|
|
35
|
-
export interface NewCompileOptions {
|
|
36
|
-
language?: string;
|
|
37
|
-
traditional?: boolean;
|
|
38
|
-
}
|
|
39
|
-
export interface CompileResult {
|
|
40
|
-
ok: boolean;
|
|
41
|
-
ast?: ASTNode;
|
|
42
|
-
errors?: CompileError[];
|
|
43
|
-
lse?: import('@lokascript/framework').SemanticNode;
|
|
44
|
-
meta: {
|
|
45
|
-
parser: 'semantic' | 'traditional' | 'lse';
|
|
46
|
-
confidence?: number;
|
|
47
|
-
language: string;
|
|
48
|
-
timeMs: number;
|
|
49
|
-
directPath?: boolean;
|
|
50
|
-
warnings?: string[];
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
export interface ValidateResult {
|
|
54
|
-
valid: boolean;
|
|
55
|
-
errors?: CompileError[];
|
|
56
|
-
}
|
|
57
|
-
export interface HyperscriptAPI {
|
|
58
|
-
compile(code: string, options?: NewCompileOptions): Promise<CompileResult>;
|
|
59
|
-
compileSync(code: string, options?: NewCompileOptions): CompileResult;
|
|
60
|
-
execute(ast: ASTNode, context?: ExecutionContext): Promise<unknown>;
|
|
61
|
-
eval(code: string, context?: ExecutionContext | Element, options?: NewCompileOptions): Promise<unknown>;
|
|
62
|
-
validate(code: string, options?: NewCompileOptions): Promise<ValidateResult>;
|
|
63
|
-
process(element: Element): void;
|
|
64
|
-
cleanup(element: Element): number;
|
|
65
|
-
createContext(element?: HTMLElement | null, parent?: ExecutionContext): ExecutionContext;
|
|
66
|
-
version: string;
|
|
67
|
-
config: HyperscriptConfig;
|
|
68
|
-
createRuntime(options?: RuntimeOptions): Runtime;
|
|
69
|
-
getDefaultRuntime(): Runtime;
|
|
70
|
-
registerHooks(name: string, hooks: RuntimeHooks): void;
|
|
71
|
-
unregisterHooks(name: string): boolean;
|
|
72
|
-
getRegisteredHooks(): string[];
|
|
73
|
-
debug: DebugController;
|
|
74
|
-
evalLSE(lse: string, element?: Element): Promise<unknown>;
|
|
75
|
-
evalLSENode(node: import('@lokascript/framework').SemanticNode, element?: Element): Promise<unknown>;
|
|
76
|
-
compileLSE(lse: string): Promise<CompileResult>;
|
|
77
|
-
toLSE(code: string, language?: string): Promise<string>;
|
|
78
|
-
fromLSE(lse: string, language: string): Promise<string>;
|
|
79
|
-
clearCache(): void;
|
|
80
|
-
use(frontEnd: FrontEnd): void;
|
|
81
|
-
getCacheStats(): {
|
|
82
|
-
size: number;
|
|
83
|
-
hits: number;
|
|
84
|
-
misses: number;
|
|
85
|
-
hitRate: number;
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
export declare const hyperscript: HyperscriptAPI;
|
|
89
|
-
export declare const _hyperscript: HyperscriptAPI;
|
|
90
|
-
//# sourceMappingURL=hyperscript-api.d.ts.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { hyperscript, config } from './hyperscript-api.js';
|
|
2
|
-
import type { HyperscriptAPI } from './hyperscript-api.js';
|
|
3
|
-
export declare const lokascript: HyperscriptAPI;
|
|
4
|
-
export declare const _lokascript: HyperscriptAPI;
|
|
5
|
-
export { hyperscript };
|
|
6
|
-
export { config };
|
|
7
|
-
export type LokascriptAPI = HyperscriptAPI;
|
|
8
|
-
export type { HyperscriptAPI, HyperscriptConfig, CompileResult, CompileError, NewCompileOptions, ValidateResult, } from './hyperscript-api.js';
|
|
9
|
-
//# sourceMappingURL=lokascript-api.d.ts.map
|