@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/dist/lsp-metadata.cjs
CHANGED
|
@@ -18,22 +18,17 @@ const COMMAND_KEYWORDS = [
|
|
|
18
18
|
'swap',
|
|
19
19
|
'morph',
|
|
20
20
|
'append',
|
|
21
|
-
'prepend',
|
|
22
21
|
'take',
|
|
23
22
|
'render',
|
|
24
23
|
'scroll',
|
|
25
|
-
'process',
|
|
26
24
|
'wait',
|
|
27
25
|
'fetch',
|
|
28
26
|
'settle',
|
|
29
27
|
'send',
|
|
30
28
|
'trigger',
|
|
31
29
|
'go',
|
|
32
|
-
'push',
|
|
33
|
-
'replace',
|
|
34
30
|
'if',
|
|
35
31
|
'else',
|
|
36
|
-
'unless',
|
|
37
32
|
'repeat',
|
|
38
33
|
'for',
|
|
39
34
|
'while',
|
|
@@ -48,10 +43,11 @@ const COMMAND_KEYWORDS = [
|
|
|
48
43
|
'blur',
|
|
49
44
|
'log',
|
|
50
45
|
'tell',
|
|
51
|
-
'copy',
|
|
52
46
|
'pick',
|
|
53
|
-
'beep',
|
|
47
|
+
'beep!',
|
|
54
48
|
'breakpoint',
|
|
49
|
+
'ask',
|
|
50
|
+
'answer',
|
|
55
51
|
'js',
|
|
56
52
|
'transition',
|
|
57
53
|
'measure',
|
|
@@ -60,7 +56,6 @@ const COMMAND_KEYWORDS = [
|
|
|
60
56
|
'decrement',
|
|
61
57
|
'default',
|
|
62
58
|
'clear',
|
|
63
|
-
'install',
|
|
64
59
|
];
|
|
65
60
|
const REFERENCE_KEYWORDS = [
|
|
66
61
|
'me',
|
|
@@ -79,6 +74,10 @@ const FEATURE_KEYWORDS = [
|
|
|
79
74
|
'behavior',
|
|
80
75
|
'def',
|
|
81
76
|
'init',
|
|
77
|
+
'install',
|
|
78
|
+
'when',
|
|
79
|
+
'live',
|
|
80
|
+
'bind',
|
|
82
81
|
'worker',
|
|
83
82
|
'socket',
|
|
84
83
|
'eventsource',
|
|
@@ -108,7 +107,6 @@ const LOGICAL_KEYWORDS = [
|
|
|
108
107
|
'matches',
|
|
109
108
|
'contains',
|
|
110
109
|
'includes',
|
|
111
|
-
'has',
|
|
112
110
|
'no',
|
|
113
111
|
'true',
|
|
114
112
|
'false',
|
|
@@ -166,8 +164,8 @@ const HOVER_DOCS = {
|
|
|
166
164
|
},
|
|
167
165
|
put: {
|
|
168
166
|
title: 'put',
|
|
169
|
-
description: '
|
|
170
|
-
example: 'put "Hello" into #message\nput response
|
|
167
|
+
description: 'Puts a value into, before, after, or at the start or end of an element or variable.',
|
|
168
|
+
example: 'put "Hello" into #message\nput response at end of #results',
|
|
171
169
|
category: 'command',
|
|
172
170
|
},
|
|
173
171
|
set: {
|
|
@@ -236,12 +234,6 @@ const HOVER_DOCS = {
|
|
|
236
234
|
example: 'append "<li>Item</li>" to #list',
|
|
237
235
|
category: 'command',
|
|
238
236
|
},
|
|
239
|
-
prepend: {
|
|
240
|
-
title: 'prepend',
|
|
241
|
-
description: 'Prepends content to an element (hyperfixi extension).',
|
|
242
|
-
example: 'prepend "<li>Item</li>" to #list',
|
|
243
|
-
category: 'command',
|
|
244
|
-
},
|
|
245
237
|
take: {
|
|
246
238
|
title: 'take',
|
|
247
239
|
description: 'Takes/claims a class from sibling elements.',
|
|
@@ -251,7 +243,7 @@ const HOVER_DOCS = {
|
|
|
251
243
|
render: {
|
|
252
244
|
title: 'render',
|
|
253
245
|
description: 'Renders a template with data.',
|
|
254
|
-
example: 'render #template with
|
|
246
|
+
example: 'render #template with name: "World"',
|
|
255
247
|
category: 'command',
|
|
256
248
|
},
|
|
257
249
|
scroll: {
|
|
@@ -260,12 +252,6 @@ const HOVER_DOCS = {
|
|
|
260
252
|
example: 'scroll to #section\nscroll to the top of me\nscroll down by 200',
|
|
261
253
|
category: 'command',
|
|
262
254
|
},
|
|
263
|
-
process: {
|
|
264
|
-
title: 'process',
|
|
265
|
-
description: 'Processes hyperscript/partials in freshly-inserted content.',
|
|
266
|
-
example: 'process partials in result',
|
|
267
|
-
category: 'command',
|
|
268
|
-
},
|
|
269
255
|
wait: {
|
|
270
256
|
title: 'wait',
|
|
271
257
|
description: 'Pauses execution for a duration or until an event.',
|
|
@@ -302,18 +288,6 @@ const HOVER_DOCS = {
|
|
|
302
288
|
example: 'go to url /home\ngo to #section\ngo back',
|
|
303
289
|
category: 'command',
|
|
304
290
|
},
|
|
305
|
-
push: {
|
|
306
|
-
title: 'push',
|
|
307
|
-
description: 'Pushes a URL onto the browser history stack.',
|
|
308
|
-
example: 'push url "/page/2"',
|
|
309
|
-
category: 'command',
|
|
310
|
-
},
|
|
311
|
-
replace: {
|
|
312
|
-
title: 'replace',
|
|
313
|
-
description: 'Replaces the current browser history entry.',
|
|
314
|
-
example: 'replace url "/page/2"',
|
|
315
|
-
category: 'command',
|
|
316
|
-
},
|
|
317
291
|
if: {
|
|
318
292
|
title: 'if',
|
|
319
293
|
description: 'Conditional execution.',
|
|
@@ -326,12 +300,6 @@ const HOVER_DOCS = {
|
|
|
326
300
|
example: 'if .active remove .active else add .active',
|
|
327
301
|
category: 'block',
|
|
328
302
|
},
|
|
329
|
-
unless: {
|
|
330
|
-
title: 'unless',
|
|
331
|
-
description: 'Inverse conditional (if not).',
|
|
332
|
-
example: 'unless .disabled add .clicked',
|
|
333
|
-
category: 'command',
|
|
334
|
-
},
|
|
335
303
|
repeat: {
|
|
336
304
|
title: 'repeat',
|
|
337
305
|
description: 'Loops a specified number of times or over items.',
|
|
@@ -365,19 +333,19 @@ const HOVER_DOCS = {
|
|
|
365
333
|
call: {
|
|
366
334
|
title: 'call',
|
|
367
335
|
description: 'Calls a function or method.',
|
|
368
|
-
example: 'call myFunction()\ncall
|
|
336
|
+
example: 'call myFunction()\ncall me.focus()',
|
|
369
337
|
category: 'command',
|
|
370
338
|
},
|
|
371
339
|
focus: {
|
|
372
340
|
title: 'focus',
|
|
373
341
|
description: 'Focuses an element (calls HTMLElement.focus()).',
|
|
374
|
-
example: 'focus #search\nfocus
|
|
342
|
+
example: 'focus #search\nfocus the first <input/>',
|
|
375
343
|
category: 'command',
|
|
376
344
|
},
|
|
377
345
|
blur: {
|
|
378
346
|
title: 'blur',
|
|
379
347
|
description: 'Removes focus from an element (calls HTMLElement.blur()).',
|
|
380
|
-
example: 'blur #search\nblur
|
|
348
|
+
example: 'blur #search\nblur me',
|
|
381
349
|
category: 'command',
|
|
382
350
|
},
|
|
383
351
|
return: {
|
|
@@ -412,32 +380,38 @@ const HOVER_DOCS = {
|
|
|
412
380
|
},
|
|
413
381
|
tell: {
|
|
414
382
|
title: 'tell',
|
|
415
|
-
description: '
|
|
416
|
-
example: 'tell #modal
|
|
417
|
-
category: 'command',
|
|
418
|
-
},
|
|
419
|
-
copy: {
|
|
420
|
-
title: 'copy',
|
|
421
|
-
description: 'Copies text to clipboard.',
|
|
422
|
-
example: 'copy "Hello" to clipboard\ncopy the value of #input',
|
|
383
|
+
description: 'Runs commands with another element as `you` (and the implicit target).',
|
|
384
|
+
example: 'tell #modal show end',
|
|
423
385
|
category: 'command',
|
|
424
386
|
},
|
|
425
387
|
pick: {
|
|
426
388
|
title: 'pick',
|
|
427
|
-
description: '
|
|
428
|
-
example: 'pick
|
|
389
|
+
description: 'Picks a range of items or characters, or a regex match, out of a value.',
|
|
390
|
+
example: 'pick items 0 to 2 from :list\npick characters 0 to 3 from "hello"',
|
|
391
|
+
category: 'command',
|
|
392
|
+
},
|
|
393
|
+
'beep!': {
|
|
394
|
+
title: 'beep!',
|
|
395
|
+
description: 'Logs values to the console with their types, for debugging. Also an expression: `get beep! x` logs x and passes it on.',
|
|
396
|
+
example: 'beep! me\nbeep! :count, result',
|
|
397
|
+
category: 'command',
|
|
398
|
+
},
|
|
399
|
+
ask: {
|
|
400
|
+
title: 'ask',
|
|
401
|
+
description: 'Asks the user for text (`window.prompt`); the answer is in `it`.',
|
|
402
|
+
example: 'ask "Your name?" then put it into #name',
|
|
429
403
|
category: 'command',
|
|
430
404
|
},
|
|
431
|
-
|
|
432
|
-
title: '
|
|
433
|
-
description: '
|
|
434
|
-
example: '
|
|
405
|
+
answer: {
|
|
406
|
+
title: 'answer',
|
|
407
|
+
description: 'Shows a message (`window.alert`), or with `with a or b` asks to confirm and puts the chosen value in `it`.',
|
|
408
|
+
example: 'answer "Saved"\nanswer "Delete it?" with "yes" or "no"',
|
|
435
409
|
category: 'command',
|
|
436
410
|
},
|
|
437
411
|
breakpoint: {
|
|
438
412
|
title: 'breakpoint',
|
|
439
413
|
description: 'Emits a `debugger;` statement \u2014 pauses in DevTools when attached.',
|
|
440
|
-
example: 'breakpoint\
|
|
414
|
+
example: 'breakpoint\nlog "after"',
|
|
441
415
|
category: 'command',
|
|
442
416
|
},
|
|
443
417
|
js: {
|
|
@@ -486,7 +460,7 @@ const HOVER_DOCS = {
|
|
|
486
460
|
title: 'install',
|
|
487
461
|
description: 'Installs a behavior on an element.',
|
|
488
462
|
example: 'install Draggable',
|
|
489
|
-
category: '
|
|
463
|
+
category: 'feature',
|
|
490
464
|
},
|
|
491
465
|
me: {
|
|
492
466
|
title: 'me',
|
|
@@ -560,6 +534,42 @@ const HOVER_DOCS = {
|
|
|
560
534
|
example: 'init\n set :count to 0\nend',
|
|
561
535
|
category: 'feature',
|
|
562
536
|
},
|
|
537
|
+
when: {
|
|
538
|
+
title: 'when',
|
|
539
|
+
description: 'Runs commands whenever the value of an expression changes; the new value is in `it`.',
|
|
540
|
+
example: 'when $count changes\n put it into me\nend',
|
|
541
|
+
category: 'feature',
|
|
542
|
+
},
|
|
543
|
+
live: {
|
|
544
|
+
title: 'live',
|
|
545
|
+
description: 'Runs commands now, and again whenever anything they read changes.',
|
|
546
|
+
example: 'live\n put $count into me\nend',
|
|
547
|
+
category: 'feature',
|
|
548
|
+
},
|
|
549
|
+
worker: {
|
|
550
|
+
title: 'worker',
|
|
551
|
+
description: 'Defines functions that run in a Web Worker (upstream extension `ext/worker.js`; not in @hyperfixi/engine).',
|
|
552
|
+
example: 'worker Calculator\n def add(a, b)\n return a + b\n end\nend',
|
|
553
|
+
category: 'feature',
|
|
554
|
+
},
|
|
555
|
+
socket: {
|
|
556
|
+
title: 'socket',
|
|
557
|
+
description: 'Opens a WebSocket and handles its messages (upstream extension `ext/socket.js`; not in @hyperfixi/engine).',
|
|
558
|
+
example: 'socket Chat ws://localhost:8080/chat\n on message as json\n log message\nend',
|
|
559
|
+
category: 'feature',
|
|
560
|
+
},
|
|
561
|
+
eventsource: {
|
|
562
|
+
title: 'eventsource',
|
|
563
|
+
description: 'Subscribes to server-sent events (upstream extension `ext/eventsource.js`; not in @hyperfixi/engine).',
|
|
564
|
+
example: 'eventsource Updates from /events\n on update as json\n log it\n end\nend',
|
|
565
|
+
category: 'feature',
|
|
566
|
+
},
|
|
567
|
+
bind: {
|
|
568
|
+
title: 'bind',
|
|
569
|
+
description: 'Keeps two values in sync, in both directions.',
|
|
570
|
+
example: "bind $name and #input's value",
|
|
571
|
+
category: 'feature',
|
|
572
|
+
},
|
|
563
573
|
then: {
|
|
564
574
|
title: 'then',
|
|
565
575
|
description: 'Chains commands sequentially.',
|
|
@@ -593,7 +603,7 @@ const HOVER_DOCS = {
|
|
|
593
603
|
with: {
|
|
594
604
|
title: 'with',
|
|
595
605
|
description: 'Specifies accompanying options or data.',
|
|
596
|
-
example: 'show me with *opacity\nrender #template with
|
|
606
|
+
example: 'show me with *opacity\nrender #template with name: "World"',
|
|
597
607
|
category: 'block',
|
|
598
608
|
},
|
|
599
609
|
as: {
|
|
@@ -722,22 +732,16 @@ const HOVER_DOCS = {
|
|
|
722
732
|
example: "if name is 'Alice' ignoring case\nif str starts with 'hi' ignoring case",
|
|
723
733
|
category: 'logical',
|
|
724
734
|
},
|
|
725
|
-
has: {
|
|
726
|
-
title: 'has',
|
|
727
|
-
description: 'Checks if element has a class/attribute.',
|
|
728
|
-
example: 'if me has .active',
|
|
729
|
-
category: 'logical',
|
|
730
|
-
},
|
|
731
735
|
where: {
|
|
732
736
|
title: 'where',
|
|
733
737
|
description: 'Filter a collection by a per-element predicate. `it` is bound to each element during evaluation.',
|
|
734
|
-
example: 'set :actives to :items where it
|
|
738
|
+
example: 'set :actives to :items where it matches .active\n:names where it starts with "A"',
|
|
735
739
|
category: 'logical',
|
|
736
740
|
},
|
|
737
741
|
'sorted by': {
|
|
738
742
|
title: 'sorted by',
|
|
739
|
-
description: 'Sort a collection by a per-element key expression. Optional trailing `
|
|
740
|
-
example: 'set :byName to :users sorted by it.name\n:scores sorted by it
|
|
743
|
+
description: 'Sort a collection by a per-element key expression. Optional trailing `ascending` / `descending`; default is ascending.',
|
|
744
|
+
example: 'set :byName to :users sorted by it.name\n:scores sorted by it descending',
|
|
741
745
|
category: 'logical',
|
|
742
746
|
},
|
|
743
747
|
'mapped to': {
|
|
@@ -755,7 +759,7 @@ const HOVER_DOCS = {
|
|
|
755
759
|
'joined by': {
|
|
756
760
|
title: 'joined by',
|
|
757
761
|
description: 'Join an array into a string with a separator.',
|
|
758
|
-
example: 'set :csv to :parts joined by ","\n
|
|
762
|
+
example: 'set :csv to :parts joined by ","\n:names joined by " and "',
|
|
759
763
|
category: 'logical',
|
|
760
764
|
},
|
|
761
765
|
'#if': {
|
|
@@ -810,7 +814,7 @@ const HOVER_DOCS = {
|
|
|
810
814
|
'^': {
|
|
811
815
|
title: '^var',
|
|
812
816
|
description: 'Reactive prefix \u2014 `^name` reads from (or writes to) the nearest ancestor that has `name` set. `set ^name to value` writes through to the owner; if no owner is found, the write lands at the current `dom-scope` boundary. Tracked: any reactive effect that reads `^name` re-runs when it changes.',
|
|
813
|
-
example: 'set ^count to 0\nincrement ^count\nlog ^count
|
|
817
|
+
example: 'set ^count to 0\nincrement ^count\nlog ^count',
|
|
814
818
|
category: 'reactive',
|
|
815
819
|
since: '2.0',
|
|
816
820
|
},
|
package/dist/lsp-metadata.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export declare const COMMAND_KEYWORDS: readonly ["toggle", "add", "remove", "show", "hide", "put", "set", "get", "make", "empty", "open", "close", "select", "reset", "swap", "morph", "append", "
|
|
1
|
+
export declare const COMMAND_KEYWORDS: readonly ["toggle", "add", "remove", "show", "hide", "put", "set", "get", "make", "empty", "open", "close", "select", "reset", "swap", "morph", "append", "take", "render", "scroll", "wait", "fetch", "settle", "send", "trigger", "go", "if", "else", "repeat", "for", "while", "break", "continue", "call", "return", "throw", "halt", "exit", "focus", "blur", "log", "tell", "pick", "beep!", "breakpoint", "ask", "answer", "js", "transition", "measure", "start", "increment", "decrement", "default", "clear"];
|
|
2
2
|
export declare const REFERENCE_KEYWORDS: readonly ["me", "you", "it", "result", "event", "target", "detail", "body", "window", "document"];
|
|
3
|
-
export declare const FEATURE_KEYWORDS: readonly ["on", "behavior", "def", "init", "worker", "socket", "eventsource"];
|
|
3
|
+
export declare const FEATURE_KEYWORDS: readonly ["on", "behavior", "def", "init", "install", "when", "live", "bind", "worker", "socket", "eventsource"];
|
|
4
4
|
export declare const BLOCK_KEYWORDS: readonly ["then", "end", "from", "to", "into", "with", "as", "in"];
|
|
5
5
|
export declare const DIRECTIVE_KEYWORDS: readonly ["#if", "#else", "#end", "#for", "#continue"];
|
|
6
6
|
export declare const COMPONENT_KEYWORDS: readonly ["attrs", "dom-scope"];
|
|
7
7
|
export declare const REACTIVE_SIGILS: readonly ["^"];
|
|
8
8
|
export declare const POSITIONAL_KEYWORDS: readonly ["first", "last", "next", "previous", "closest", "parent", "children", "random"];
|
|
9
|
-
export declare const LOGICAL_KEYWORDS: readonly ["and", "or", "not", "is", "are", "exists", "empty", "matches", "contains", "includes", "
|
|
10
|
-
export declare const ALL_KEYWORDS: readonly ["toggle", "add", "remove", "show", "hide", "put", "set", "get", "make", "empty", "open", "close", "select", "reset", "swap", "morph", "append", "
|
|
9
|
+
export declare const LOGICAL_KEYWORDS: readonly ["and", "or", "not", "is", "are", "exists", "empty", "matches", "contains", "includes", "no", "true", "false", "null", "starts with", "ends with", "between", "ignoring case", "where", "sorted by", "mapped to", "split by", "joined by"];
|
|
10
|
+
export declare const ALL_KEYWORDS: readonly ["toggle", "add", "remove", "show", "hide", "put", "set", "get", "make", "empty", "open", "close", "select", "reset", "swap", "morph", "append", "take", "render", "scroll", "wait", "fetch", "settle", "send", "trigger", "go", "if", "else", "repeat", "for", "while", "break", "continue", "call", "return", "throw", "halt", "exit", "focus", "blur", "log", "tell", "pick", "beep!", "breakpoint", "ask", "answer", "js", "transition", "measure", "start", "increment", "decrement", "default", "clear", "me", "you", "it", "result", "event", "target", "detail", "body", "window", "document", "on", "behavior", "def", "init", "install", "when", "live", "bind", "worker", "socket", "eventsource", "then", "end", "from", "to", "into", "with", "as", "in", "first", "last", "next", "previous", "closest", "parent", "children", "random", "and", "or", "not", "is", "are", "exists", "empty", "matches", "contains", "includes", "no", "true", "false", "null", "starts with", "ends with", "between", "ignoring case", "where", "sorted by", "mapped to", "split by", "joined by", "#if", "#else", "#end", "#for", "#continue", "attrs", "dom-scope"];
|
|
11
11
|
export interface HoverDoc {
|
|
12
12
|
title: string;
|
|
13
13
|
description: string;
|
package/dist/lsp-metadata.mjs
CHANGED
|
@@ -16,22 +16,17 @@ const COMMAND_KEYWORDS = [
|
|
|
16
16
|
'swap',
|
|
17
17
|
'morph',
|
|
18
18
|
'append',
|
|
19
|
-
'prepend',
|
|
20
19
|
'take',
|
|
21
20
|
'render',
|
|
22
21
|
'scroll',
|
|
23
|
-
'process',
|
|
24
22
|
'wait',
|
|
25
23
|
'fetch',
|
|
26
24
|
'settle',
|
|
27
25
|
'send',
|
|
28
26
|
'trigger',
|
|
29
27
|
'go',
|
|
30
|
-
'push',
|
|
31
|
-
'replace',
|
|
32
28
|
'if',
|
|
33
29
|
'else',
|
|
34
|
-
'unless',
|
|
35
30
|
'repeat',
|
|
36
31
|
'for',
|
|
37
32
|
'while',
|
|
@@ -46,10 +41,11 @@ const COMMAND_KEYWORDS = [
|
|
|
46
41
|
'blur',
|
|
47
42
|
'log',
|
|
48
43
|
'tell',
|
|
49
|
-
'copy',
|
|
50
44
|
'pick',
|
|
51
|
-
'beep',
|
|
45
|
+
'beep!',
|
|
52
46
|
'breakpoint',
|
|
47
|
+
'ask',
|
|
48
|
+
'answer',
|
|
53
49
|
'js',
|
|
54
50
|
'transition',
|
|
55
51
|
'measure',
|
|
@@ -58,7 +54,6 @@ const COMMAND_KEYWORDS = [
|
|
|
58
54
|
'decrement',
|
|
59
55
|
'default',
|
|
60
56
|
'clear',
|
|
61
|
-
'install',
|
|
62
57
|
];
|
|
63
58
|
const REFERENCE_KEYWORDS = [
|
|
64
59
|
'me',
|
|
@@ -77,6 +72,10 @@ const FEATURE_KEYWORDS = [
|
|
|
77
72
|
'behavior',
|
|
78
73
|
'def',
|
|
79
74
|
'init',
|
|
75
|
+
'install',
|
|
76
|
+
'when',
|
|
77
|
+
'live',
|
|
78
|
+
'bind',
|
|
80
79
|
'worker',
|
|
81
80
|
'socket',
|
|
82
81
|
'eventsource',
|
|
@@ -106,7 +105,6 @@ const LOGICAL_KEYWORDS = [
|
|
|
106
105
|
'matches',
|
|
107
106
|
'contains',
|
|
108
107
|
'includes',
|
|
109
|
-
'has',
|
|
110
108
|
'no',
|
|
111
109
|
'true',
|
|
112
110
|
'false',
|
|
@@ -164,8 +162,8 @@ const HOVER_DOCS = {
|
|
|
164
162
|
},
|
|
165
163
|
put: {
|
|
166
164
|
title: 'put',
|
|
167
|
-
description: '
|
|
168
|
-
example: 'put "Hello" into #message\nput response
|
|
165
|
+
description: 'Puts a value into, before, after, or at the start or end of an element or variable.',
|
|
166
|
+
example: 'put "Hello" into #message\nput response at end of #results',
|
|
169
167
|
category: 'command',
|
|
170
168
|
},
|
|
171
169
|
set: {
|
|
@@ -234,12 +232,6 @@ const HOVER_DOCS = {
|
|
|
234
232
|
example: 'append "<li>Item</li>" to #list',
|
|
235
233
|
category: 'command',
|
|
236
234
|
},
|
|
237
|
-
prepend: {
|
|
238
|
-
title: 'prepend',
|
|
239
|
-
description: 'Prepends content to an element (hyperfixi extension).',
|
|
240
|
-
example: 'prepend "<li>Item</li>" to #list',
|
|
241
|
-
category: 'command',
|
|
242
|
-
},
|
|
243
235
|
take: {
|
|
244
236
|
title: 'take',
|
|
245
237
|
description: 'Takes/claims a class from sibling elements.',
|
|
@@ -249,7 +241,7 @@ const HOVER_DOCS = {
|
|
|
249
241
|
render: {
|
|
250
242
|
title: 'render',
|
|
251
243
|
description: 'Renders a template with data.',
|
|
252
|
-
example: 'render #template with
|
|
244
|
+
example: 'render #template with name: "World"',
|
|
253
245
|
category: 'command',
|
|
254
246
|
},
|
|
255
247
|
scroll: {
|
|
@@ -258,12 +250,6 @@ const HOVER_DOCS = {
|
|
|
258
250
|
example: 'scroll to #section\nscroll to the top of me\nscroll down by 200',
|
|
259
251
|
category: 'command',
|
|
260
252
|
},
|
|
261
|
-
process: {
|
|
262
|
-
title: 'process',
|
|
263
|
-
description: 'Processes hyperscript/partials in freshly-inserted content.',
|
|
264
|
-
example: 'process partials in result',
|
|
265
|
-
category: 'command',
|
|
266
|
-
},
|
|
267
253
|
wait: {
|
|
268
254
|
title: 'wait',
|
|
269
255
|
description: 'Pauses execution for a duration or until an event.',
|
|
@@ -300,18 +286,6 @@ const HOVER_DOCS = {
|
|
|
300
286
|
example: 'go to url /home\ngo to #section\ngo back',
|
|
301
287
|
category: 'command',
|
|
302
288
|
},
|
|
303
|
-
push: {
|
|
304
|
-
title: 'push',
|
|
305
|
-
description: 'Pushes a URL onto the browser history stack.',
|
|
306
|
-
example: 'push url "/page/2"',
|
|
307
|
-
category: 'command',
|
|
308
|
-
},
|
|
309
|
-
replace: {
|
|
310
|
-
title: 'replace',
|
|
311
|
-
description: 'Replaces the current browser history entry.',
|
|
312
|
-
example: 'replace url "/page/2"',
|
|
313
|
-
category: 'command',
|
|
314
|
-
},
|
|
315
289
|
if: {
|
|
316
290
|
title: 'if',
|
|
317
291
|
description: 'Conditional execution.',
|
|
@@ -324,12 +298,6 @@ const HOVER_DOCS = {
|
|
|
324
298
|
example: 'if .active remove .active else add .active',
|
|
325
299
|
category: 'block',
|
|
326
300
|
},
|
|
327
|
-
unless: {
|
|
328
|
-
title: 'unless',
|
|
329
|
-
description: 'Inverse conditional (if not).',
|
|
330
|
-
example: 'unless .disabled add .clicked',
|
|
331
|
-
category: 'command',
|
|
332
|
-
},
|
|
333
301
|
repeat: {
|
|
334
302
|
title: 'repeat',
|
|
335
303
|
description: 'Loops a specified number of times or over items.',
|
|
@@ -363,19 +331,19 @@ const HOVER_DOCS = {
|
|
|
363
331
|
call: {
|
|
364
332
|
title: 'call',
|
|
365
333
|
description: 'Calls a function or method.',
|
|
366
|
-
example: 'call myFunction()\ncall
|
|
334
|
+
example: 'call myFunction()\ncall me.focus()',
|
|
367
335
|
category: 'command',
|
|
368
336
|
},
|
|
369
337
|
focus: {
|
|
370
338
|
title: 'focus',
|
|
371
339
|
description: 'Focuses an element (calls HTMLElement.focus()).',
|
|
372
|
-
example: 'focus #search\nfocus
|
|
340
|
+
example: 'focus #search\nfocus the first <input/>',
|
|
373
341
|
category: 'command',
|
|
374
342
|
},
|
|
375
343
|
blur: {
|
|
376
344
|
title: 'blur',
|
|
377
345
|
description: 'Removes focus from an element (calls HTMLElement.blur()).',
|
|
378
|
-
example: 'blur #search\nblur
|
|
346
|
+
example: 'blur #search\nblur me',
|
|
379
347
|
category: 'command',
|
|
380
348
|
},
|
|
381
349
|
return: {
|
|
@@ -410,32 +378,38 @@ const HOVER_DOCS = {
|
|
|
410
378
|
},
|
|
411
379
|
tell: {
|
|
412
380
|
title: 'tell',
|
|
413
|
-
description: '
|
|
414
|
-
example: 'tell #modal
|
|
415
|
-
category: 'command',
|
|
416
|
-
},
|
|
417
|
-
copy: {
|
|
418
|
-
title: 'copy',
|
|
419
|
-
description: 'Copies text to clipboard.',
|
|
420
|
-
example: 'copy "Hello" to clipboard\ncopy the value of #input',
|
|
381
|
+
description: 'Runs commands with another element as `you` (and the implicit target).',
|
|
382
|
+
example: 'tell #modal show end',
|
|
421
383
|
category: 'command',
|
|
422
384
|
},
|
|
423
385
|
pick: {
|
|
424
386
|
title: 'pick',
|
|
425
|
-
description: '
|
|
426
|
-
example: 'pick
|
|
387
|
+
description: 'Picks a range of items or characters, or a regex match, out of a value.',
|
|
388
|
+
example: 'pick items 0 to 2 from :list\npick characters 0 to 3 from "hello"',
|
|
389
|
+
category: 'command',
|
|
390
|
+
},
|
|
391
|
+
'beep!': {
|
|
392
|
+
title: 'beep!',
|
|
393
|
+
description: 'Logs values to the console with their types, for debugging. Also an expression: `get beep! x` logs x and passes it on.',
|
|
394
|
+
example: 'beep! me\nbeep! :count, result',
|
|
395
|
+
category: 'command',
|
|
396
|
+
},
|
|
397
|
+
ask: {
|
|
398
|
+
title: 'ask',
|
|
399
|
+
description: 'Asks the user for text (`window.prompt`); the answer is in `it`.',
|
|
400
|
+
example: 'ask "Your name?" then put it into #name',
|
|
427
401
|
category: 'command',
|
|
428
402
|
},
|
|
429
|
-
|
|
430
|
-
title: '
|
|
431
|
-
description: '
|
|
432
|
-
example: '
|
|
403
|
+
answer: {
|
|
404
|
+
title: 'answer',
|
|
405
|
+
description: 'Shows a message (`window.alert`), or with `with a or b` asks to confirm and puts the chosen value in `it`.',
|
|
406
|
+
example: 'answer "Saved"\nanswer "Delete it?" with "yes" or "no"',
|
|
433
407
|
category: 'command',
|
|
434
408
|
},
|
|
435
409
|
breakpoint: {
|
|
436
410
|
title: 'breakpoint',
|
|
437
411
|
description: 'Emits a `debugger;` statement \u2014 pauses in DevTools when attached.',
|
|
438
|
-
example: 'breakpoint\
|
|
412
|
+
example: 'breakpoint\nlog "after"',
|
|
439
413
|
category: 'command',
|
|
440
414
|
},
|
|
441
415
|
js: {
|
|
@@ -484,7 +458,7 @@ const HOVER_DOCS = {
|
|
|
484
458
|
title: 'install',
|
|
485
459
|
description: 'Installs a behavior on an element.',
|
|
486
460
|
example: 'install Draggable',
|
|
487
|
-
category: '
|
|
461
|
+
category: 'feature',
|
|
488
462
|
},
|
|
489
463
|
me: {
|
|
490
464
|
title: 'me',
|
|
@@ -558,6 +532,42 @@ const HOVER_DOCS = {
|
|
|
558
532
|
example: 'init\n set :count to 0\nend',
|
|
559
533
|
category: 'feature',
|
|
560
534
|
},
|
|
535
|
+
when: {
|
|
536
|
+
title: 'when',
|
|
537
|
+
description: 'Runs commands whenever the value of an expression changes; the new value is in `it`.',
|
|
538
|
+
example: 'when $count changes\n put it into me\nend',
|
|
539
|
+
category: 'feature',
|
|
540
|
+
},
|
|
541
|
+
live: {
|
|
542
|
+
title: 'live',
|
|
543
|
+
description: 'Runs commands now, and again whenever anything they read changes.',
|
|
544
|
+
example: 'live\n put $count into me\nend',
|
|
545
|
+
category: 'feature',
|
|
546
|
+
},
|
|
547
|
+
worker: {
|
|
548
|
+
title: 'worker',
|
|
549
|
+
description: 'Defines functions that run in a Web Worker (upstream extension `ext/worker.js`; not in @hyperfixi/engine).',
|
|
550
|
+
example: 'worker Calculator\n def add(a, b)\n return a + b\n end\nend',
|
|
551
|
+
category: 'feature',
|
|
552
|
+
},
|
|
553
|
+
socket: {
|
|
554
|
+
title: 'socket',
|
|
555
|
+
description: 'Opens a WebSocket and handles its messages (upstream extension `ext/socket.js`; not in @hyperfixi/engine).',
|
|
556
|
+
example: 'socket Chat ws://localhost:8080/chat\n on message as json\n log message\nend',
|
|
557
|
+
category: 'feature',
|
|
558
|
+
},
|
|
559
|
+
eventsource: {
|
|
560
|
+
title: 'eventsource',
|
|
561
|
+
description: 'Subscribes to server-sent events (upstream extension `ext/eventsource.js`; not in @hyperfixi/engine).',
|
|
562
|
+
example: 'eventsource Updates from /events\n on update as json\n log it\n end\nend',
|
|
563
|
+
category: 'feature',
|
|
564
|
+
},
|
|
565
|
+
bind: {
|
|
566
|
+
title: 'bind',
|
|
567
|
+
description: 'Keeps two values in sync, in both directions.',
|
|
568
|
+
example: "bind $name and #input's value",
|
|
569
|
+
category: 'feature',
|
|
570
|
+
},
|
|
561
571
|
then: {
|
|
562
572
|
title: 'then',
|
|
563
573
|
description: 'Chains commands sequentially.',
|
|
@@ -591,7 +601,7 @@ const HOVER_DOCS = {
|
|
|
591
601
|
with: {
|
|
592
602
|
title: 'with',
|
|
593
603
|
description: 'Specifies accompanying options or data.',
|
|
594
|
-
example: 'show me with *opacity\nrender #template with
|
|
604
|
+
example: 'show me with *opacity\nrender #template with name: "World"',
|
|
595
605
|
category: 'block',
|
|
596
606
|
},
|
|
597
607
|
as: {
|
|
@@ -720,22 +730,16 @@ const HOVER_DOCS = {
|
|
|
720
730
|
example: "if name is 'Alice' ignoring case\nif str starts with 'hi' ignoring case",
|
|
721
731
|
category: 'logical',
|
|
722
732
|
},
|
|
723
|
-
has: {
|
|
724
|
-
title: 'has',
|
|
725
|
-
description: 'Checks if element has a class/attribute.',
|
|
726
|
-
example: 'if me has .active',
|
|
727
|
-
category: 'logical',
|
|
728
|
-
},
|
|
729
733
|
where: {
|
|
730
734
|
title: 'where',
|
|
731
735
|
description: 'Filter a collection by a per-element predicate. `it` is bound to each element during evaluation.',
|
|
732
|
-
example: 'set :actives to :items where it
|
|
736
|
+
example: 'set :actives to :items where it matches .active\n:names where it starts with "A"',
|
|
733
737
|
category: 'logical',
|
|
734
738
|
},
|
|
735
739
|
'sorted by': {
|
|
736
740
|
title: 'sorted by',
|
|
737
|
-
description: 'Sort a collection by a per-element key expression. Optional trailing `
|
|
738
|
-
example: 'set :byName to :users sorted by it.name\n:scores sorted by it
|
|
741
|
+
description: 'Sort a collection by a per-element key expression. Optional trailing `ascending` / `descending`; default is ascending.',
|
|
742
|
+
example: 'set :byName to :users sorted by it.name\n:scores sorted by it descending',
|
|
739
743
|
category: 'logical',
|
|
740
744
|
},
|
|
741
745
|
'mapped to': {
|
|
@@ -753,7 +757,7 @@ const HOVER_DOCS = {
|
|
|
753
757
|
'joined by': {
|
|
754
758
|
title: 'joined by',
|
|
755
759
|
description: 'Join an array into a string with a separator.',
|
|
756
|
-
example: 'set :csv to :parts joined by ","\n
|
|
760
|
+
example: 'set :csv to :parts joined by ","\n:names joined by " and "',
|
|
757
761
|
category: 'logical',
|
|
758
762
|
},
|
|
759
763
|
'#if': {
|
|
@@ -808,7 +812,7 @@ const HOVER_DOCS = {
|
|
|
808
812
|
'^': {
|
|
809
813
|
title: '^var',
|
|
810
814
|
description: 'Reactive prefix \u2014 `^name` reads from (or writes to) the nearest ancestor that has `name` set. `set ^name to value` writes through to the owner; if no owner is found, the write lands at the current `dom-scope` boundary. Tracked: any reactive effect that reads `^name` re-runs when it changes.',
|
|
811
|
-
example: 'set ^count to 0\nincrement ^count\nlog ^count
|
|
815
|
+
example: 'set ^count to 0\nincrement ^count\nlog ^count',
|
|
812
816
|
category: 'reactive',
|
|
813
817
|
since: '2.0',
|
|
814
818
|
},
|