@hyperfixi/core 2.9.4 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ast-utils/index.js +295 -85
- package/dist/ast-utils/index.mjs +295 -85
- package/dist/chunks/{bridge-DhmZ3Khh.js → bridge-CPNAPYAo.js} +2 -2
- package/dist/chunks/browser-modular-B0lGdcoP.js +2 -0
- package/dist/chunks/{index-DKrx4rv2.js → index-BQkkNlzO.js} +2 -2
- package/dist/commands/advanced/async.d.ts +0 -8
- package/dist/commands/advanced/js.d.ts +0 -8
- package/dist/commands/animation/measure.d.ts +0 -8
- package/dist/commands/animation/settle.d.ts +0 -8
- package/dist/commands/animation/start-view-transition.d.ts +0 -8
- package/dist/commands/animation/take.d.ts +0 -8
- package/dist/commands/animation/transition.d.ts +0 -8
- package/dist/commands/async/fetch.d.ts +0 -8
- package/dist/commands/async/wait.d.ts +0 -8
- package/dist/commands/behaviors/install.d.ts +0 -8
- package/dist/commands/content/append.d.ts +0 -8
- package/dist/commands/content/prepend.d.ts +0 -8
- package/dist/commands/control-flow/break.d.ts +0 -8
- package/dist/commands/control-flow/continue.d.ts +0 -8
- package/dist/commands/control-flow/exit.d.ts +0 -8
- package/dist/commands/control-flow/halt.d.ts +0 -8
- package/dist/commands/control-flow/if.d.ts +0 -8
- package/dist/commands/control-flow/repeat.d.ts +0 -8
- package/dist/commands/control-flow/return.d.ts +0 -8
- package/dist/commands/control-flow/throw.d.ts +0 -8
- package/dist/commands/data/clear.d.ts +0 -8
- package/dist/commands/data/default.d.ts +0 -8
- package/dist/commands/data/get.d.ts +0 -8
- package/dist/commands/data/increment.d.ts +0 -8
- package/dist/commands/data/set.d.ts +0 -8
- package/dist/commands/decorators/index.d.ts +2 -8
- package/dist/commands/dom/add.d.ts +0 -8
- package/dist/commands/dom/close.d.ts +0 -8
- package/dist/commands/dom/empty.d.ts +0 -8
- package/dist/commands/dom/hide.d.ts +0 -8
- package/dist/commands/dom/make.d.ts +0 -8
- package/dist/commands/dom/open.d.ts +0 -8
- package/dist/commands/dom/process-partials.d.ts +0 -8
- package/dist/commands/dom/put.d.ts +0 -8
- package/dist/commands/dom/remove.d.ts +0 -8
- package/dist/commands/dom/reset.d.ts +0 -8
- package/dist/commands/dom/select.d.ts +0 -8
- package/dist/commands/dom/show.d.ts +0 -8
- package/dist/commands/dom/swap.d.ts +2 -18
- package/dist/commands/dom/toggle.d.ts +0 -8
- package/dist/commands/events/trigger.d.ts +0 -8
- package/dist/commands/execution/blur.d.ts +0 -8
- package/dist/commands/execution/call.d.ts +0 -8
- package/dist/commands/execution/focus.d.ts +0 -8
- package/dist/commands/execution/pseudo-command.d.ts +0 -8
- package/dist/commands/index.js +82 -23
- package/dist/commands/index.mjs +82 -23
- package/dist/commands/navigation/go.d.ts +0 -8
- package/dist/commands/navigation/push-url.d.ts +0 -8
- package/dist/commands/navigation/scroll-to.d.ts +0 -8
- package/dist/commands/templates/render.d.ts +0 -8
- package/dist/commands/utility/beep.d.ts +0 -8
- package/dist/commands/utility/breakpoint.d.ts +0 -8
- package/dist/commands/utility/copy.d.ts +0 -8
- package/dist/commands/utility/log.d.ts +0 -8
- package/dist/commands/utility/pick.d.ts +0 -8
- package/dist/commands/utility/tell.d.ts +0 -8
- package/dist/hyperfixi-browser-classic-i18n.js +1 -1
- package/dist/hyperfixi-browser-minimal.js +1 -1
- package/dist/hyperfixi-browser-standard.js +1 -1
- package/dist/hyperfixi-browser.js +1 -1
- package/dist/hyperfixi-classic-i18n.js +1 -1
- package/dist/hyperfixi-hx-v4.js +1 -1
- package/dist/hyperfixi-minimal.js +1 -1
- package/dist/hyperfixi-multilingual.js +1 -1
- package/dist/hyperfixi-standard.js +1 -1
- package/dist/hyperfixi.js +1 -1
- package/dist/hyperfixi.mjs +1 -1
- package/dist/index.js +441 -143
- package/dist/index.min.js +1 -1
- package/dist/index.mjs +441 -143
- package/dist/lokascript-browser-classic-i18n.js +1 -1
- package/dist/lokascript-browser-minimal.js +1 -1
- package/dist/lokascript-browser-standard.js +1 -1
- package/dist/lokascript-browser.js +1 -1
- package/dist/lokascript-multilingual.js +1 -1
- package/dist/parser/command-parsers/dom-commands.d.ts +1 -0
- package/dist/parser/full-parser.js +47 -1
- package/dist/parser/full-parser.mjs +47 -1
- package/dist/reference/index.js +6 -5
- package/dist/reference/index.mjs +6 -5
- package/dist/registry/index.js +50 -6
- package/dist/registry/index.mjs +50 -6
- package/dist/runtime/command-adapter.d.ts +8 -8
- package/package.json +5 -5
- package/dist/chunks/browser-modular-BllAMlht.js +0 -2
package/dist/commands/index.mjs
CHANGED
|
@@ -69,7 +69,7 @@ function command(config) {
|
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
function commandMeta(metadata) {
|
|
72
|
-
return {
|
|
72
|
+
return { ...metadata };
|
|
73
73
|
}
|
|
74
74
|
function createFactory(CommandClass) {
|
|
75
75
|
return () => new CommandClass();
|
|
@@ -7748,6 +7748,40 @@ function parseTakeCommand(ctx, identifierNode) {
|
|
|
7748
7748
|
.endingAt(ctx.getPosition())
|
|
7749
7749
|
.build();
|
|
7750
7750
|
}
|
|
7751
|
+
function consumeViewTransitionTail(ctx, args) {
|
|
7752
|
+
if (!ctx.check('using')) {
|
|
7753
|
+
return false;
|
|
7754
|
+
}
|
|
7755
|
+
ctx.advance();
|
|
7756
|
+
if (!ctx.match('view')) {
|
|
7757
|
+
throw new Error("expected 'view transition' after 'using'");
|
|
7758
|
+
}
|
|
7759
|
+
if (!ctx.match('transition')) {
|
|
7760
|
+
throw new Error("expected 'transition' after 'using view'");
|
|
7761
|
+
}
|
|
7762
|
+
args.push(ctx.createIdentifier('using'));
|
|
7763
|
+
args.push(ctx.createIdentifier('view'));
|
|
7764
|
+
args.push(ctx.createIdentifier('transition'));
|
|
7765
|
+
return true;
|
|
7766
|
+
}
|
|
7767
|
+
function parseProcessCommand(ctx, identifierNode) {
|
|
7768
|
+
if (!ctx.check('partials')) {
|
|
7769
|
+
return null;
|
|
7770
|
+
}
|
|
7771
|
+
const args = [];
|
|
7772
|
+
consumeKeywordToArgs(ctx, 'partials', args);
|
|
7773
|
+
if (consumeKeywordToArgs(ctx, KEYWORDS$1.IN, args)) {
|
|
7774
|
+
const contentArg = parseOneArgument(ctx, ['using']);
|
|
7775
|
+
if (contentArg) {
|
|
7776
|
+
args.push(contentArg);
|
|
7777
|
+
}
|
|
7778
|
+
}
|
|
7779
|
+
consumeViewTransitionTail(ctx, args);
|
|
7780
|
+
return CommandNodeBuilder.fromIdentifier(identifierNode)
|
|
7781
|
+
.withArgs(...args)
|
|
7782
|
+
.endingAt(ctx.getPosition())
|
|
7783
|
+
.build();
|
|
7784
|
+
}
|
|
7751
7785
|
function parseAddCommand(ctx, commandToken) {
|
|
7752
7786
|
const args = [];
|
|
7753
7787
|
if (ctx.match('{')) {
|
|
@@ -7869,6 +7903,7 @@ function parseSwapCommand(ctx, identifierNode) {
|
|
|
7869
7903
|
args.push(contentExpr);
|
|
7870
7904
|
}
|
|
7871
7905
|
}
|
|
7906
|
+
consumeViewTransitionTail(ctx, args);
|
|
7872
7907
|
return CommandNodeBuilder.fromIdentifier(identifierNode)
|
|
7873
7908
|
.withArgs(...args)
|
|
7874
7909
|
.endingAt(ctx.getPosition())
|
|
@@ -8382,6 +8417,9 @@ function parseCompoundCommand(ctx, identifierNode) {
|
|
|
8382
8417
|
case 'swap':
|
|
8383
8418
|
case 'morph':
|
|
8384
8419
|
return parseSwapCommand(ctx, identifierNode);
|
|
8420
|
+
case 'process':
|
|
8421
|
+
return (parseProcessCommand(ctx, identifierNode) ??
|
|
8422
|
+
parseRegularCommand(ctx, identifierNode));
|
|
8385
8423
|
default:
|
|
8386
8424
|
return parseRegularCommand(ctx, identifierNode);
|
|
8387
8425
|
}
|
|
@@ -8713,6 +8751,9 @@ function parseTellCommand(ctx, identifierNode) {
|
|
|
8713
8751
|
if (!target) {
|
|
8714
8752
|
throw new Error('tell command requires a target expression');
|
|
8715
8753
|
}
|
|
8754
|
+
if (ctx.check(KEYWORDS$1.TO)) {
|
|
8755
|
+
ctx.advance();
|
|
8756
|
+
}
|
|
8716
8757
|
const commands = [];
|
|
8717
8758
|
while (!ctx.isAtEnd()) {
|
|
8718
8759
|
if (ctx.checkIsCommand()) {
|
|
@@ -8732,7 +8773,11 @@ function parseTellCommand(ctx, identifierNode) {
|
|
|
8732
8773
|
if (ctx.match(KEYWORDS$1.AND) || ctx.match(KEYWORDS$1.THEN)) {
|
|
8733
8774
|
continue;
|
|
8734
8775
|
}
|
|
8735
|
-
if (ctx.check(KEYWORDS$1.ELSE)
|
|
8776
|
+
if (ctx.check(KEYWORDS$1.ELSE)) {
|
|
8777
|
+
break;
|
|
8778
|
+
}
|
|
8779
|
+
if (ctx.check(KEYWORDS$1.END)) {
|
|
8780
|
+
ctx.advance();
|
|
8736
8781
|
break;
|
|
8737
8782
|
}
|
|
8738
8783
|
if (ctx.checkIsCommand()) {
|
|
@@ -11070,6 +11115,7 @@ class Parser {
|
|
|
11070
11115
|
'js',
|
|
11071
11116
|
'tell',
|
|
11072
11117
|
'fetch',
|
|
11118
|
+
'process',
|
|
11073
11119
|
];
|
|
11074
11120
|
if (this.semanticAdapter && !skipSemanticParsing.includes(commandName.toLowerCase())) {
|
|
11075
11121
|
const remainingInput = this.getRemainingInput();
|
|
@@ -14333,7 +14379,7 @@ let SwapCommand = (() => {
|
|
|
14333
14379
|
};
|
|
14334
14380
|
}
|
|
14335
14381
|
}
|
|
14336
|
-
let useViewTransition =
|
|
14382
|
+
let useViewTransition = raw.modifiers?.viewTransition !== undefined;
|
|
14337
14383
|
if (usingIndex !== -1) {
|
|
14338
14384
|
const afterUsing = argKeywords.slice(usingIndex + 1);
|
|
14339
14385
|
if (afterUsing.includes('view') && afterUsing.includes('transition')) {
|
|
@@ -14543,7 +14589,7 @@ let MorphCommand = (() => {
|
|
|
14543
14589
|
const withIndex = argKeywords.findIndex(k => k === 'with');
|
|
14544
14590
|
const overIndex = argKeywords.findIndex(k => k === 'over');
|
|
14545
14591
|
const usingIndex = argKeywords.findIndex(k => k === 'using');
|
|
14546
|
-
let useViewTransition =
|
|
14592
|
+
let useViewTransition = raw.modifiers?.viewTransition !== undefined;
|
|
14547
14593
|
if (usingIndex !== -1) {
|
|
14548
14594
|
const afterUsing = argKeywords.slice(usingIndex + 1);
|
|
14549
14595
|
if (afterUsing.includes('view') && afterUsing.includes('transition')) {
|
|
@@ -14624,7 +14670,11 @@ let MorphCommand = (() => {
|
|
|
14624
14670
|
})();
|
|
14625
14671
|
_classThis.metadata = commandMeta({
|
|
14626
14672
|
description: 'Morph content into target elements (intelligent diffing, preserves state)',
|
|
14627
|
-
syntax: [
|
|
14673
|
+
syntax: [
|
|
14674
|
+
'morph <target> with <content>',
|
|
14675
|
+
'morph over <target> with <content>',
|
|
14676
|
+
'morph <target> with <content> using view transition',
|
|
14677
|
+
],
|
|
14628
14678
|
examples: ['morph #target with it', 'morph over #modal with fetchedContent'],
|
|
14629
14679
|
sideEffects: ['dom-mutation'],
|
|
14630
14680
|
category: 'dom',
|
|
@@ -15234,24 +15284,33 @@ let ProcessPartialsCommand = (() => {
|
|
|
15234
15284
|
if (!args || args.length === 0) {
|
|
15235
15285
|
throw new Error('process partials command requires content argument');
|
|
15236
15286
|
}
|
|
15237
|
-
const
|
|
15238
|
-
|
|
15239
|
-
|
|
15240
|
-
|
|
15241
|
-
|
|
15242
|
-
|
|
15243
|
-
|
|
15244
|
-
|
|
15245
|
-
|
|
15246
|
-
|
|
15287
|
+
const keywordOf = (node) => {
|
|
15288
|
+
const n = node;
|
|
15289
|
+
if (!n || typeof n !== 'object')
|
|
15290
|
+
return null;
|
|
15291
|
+
if (n.type === 'identifier' && typeof n.name === 'string')
|
|
15292
|
+
return n.name.toLowerCase();
|
|
15293
|
+
if (n.type === 'literal' && typeof n.value === 'string')
|
|
15294
|
+
return n.value.toLowerCase();
|
|
15295
|
+
return null;
|
|
15296
|
+
};
|
|
15297
|
+
const keywords = args.map(keywordOf);
|
|
15298
|
+
const partialsIndex = keywords.indexOf('partials');
|
|
15299
|
+
const inIndex = keywords.indexOf('in');
|
|
15300
|
+
let contentNode;
|
|
15247
15301
|
if (partialsIndex === -1) {
|
|
15248
|
-
|
|
15302
|
+
if (inIndex !== -1) {
|
|
15303
|
+
throw new Error('process command expects "partials" keyword: process partials in <content>');
|
|
15304
|
+
}
|
|
15305
|
+
contentNode = args[0];
|
|
15249
15306
|
}
|
|
15250
|
-
|
|
15251
|
-
|
|
15252
|
-
|
|
15307
|
+
else {
|
|
15308
|
+
if (inIndex === -1 || inIndex <= partialsIndex) {
|
|
15309
|
+
throw new Error('process partials command expects "in" keyword: process partials in <content>');
|
|
15310
|
+
}
|
|
15311
|
+
contentNode = args[inIndex + 1];
|
|
15253
15312
|
}
|
|
15254
|
-
const contentArg =
|
|
15313
|
+
const contentArg = contentNode ? await evaluator.evaluate(contentNode, context) : undefined;
|
|
15255
15314
|
let html;
|
|
15256
15315
|
if (typeof contentArg === 'string') {
|
|
15257
15316
|
html = contentArg;
|
|
@@ -15265,10 +15324,10 @@ let ProcessPartialsCommand = (() => {
|
|
|
15265
15324
|
else {
|
|
15266
15325
|
throw new Error('process partials: content must be an HTML string or element');
|
|
15267
15326
|
}
|
|
15268
|
-
|
|
15269
|
-
|
|
15327
|
+
let useViewTransition = raw.modifiers?.viewTransition !== undefined;
|
|
15328
|
+
const usingIndex = keywords.indexOf('using');
|
|
15270
15329
|
if (usingIndex !== -1) {
|
|
15271
|
-
const remaining =
|
|
15330
|
+
const remaining = keywords.slice(usingIndex + 1);
|
|
15272
15331
|
if (remaining.includes('view') && remaining.includes('transition')) {
|
|
15273
15332
|
useViewTransition = true;
|
|
15274
15333
|
}
|
|
@@ -11,10 +11,6 @@ export interface GoCommandOutput {
|
|
|
11
11
|
}
|
|
12
12
|
export declare class GoCommand implements DecoratedCommand {
|
|
13
13
|
static readonly metadata: {
|
|
14
|
-
isBlocking: boolean;
|
|
15
|
-
hasBody: boolean;
|
|
16
|
-
version: string;
|
|
17
|
-
} & {
|
|
18
14
|
readonly description: "Navigation functionality including URL navigation, element scrolling, and browser history";
|
|
19
15
|
readonly syntax: readonly ["go back", "go to url <url> [in new window]", "go to [position] [of] <element>"];
|
|
20
16
|
readonly examples: readonly ["go back", "go to url \"https://example.com\"", "go to top of #header"];
|
|
@@ -23,10 +19,6 @@ export declare class GoCommand implements DecoratedCommand {
|
|
|
23
19
|
readonly compatibility: "standard";
|
|
24
20
|
};
|
|
25
21
|
get metadata(): {
|
|
26
|
-
isBlocking: boolean;
|
|
27
|
-
hasBody: boolean;
|
|
28
|
-
version: string;
|
|
29
|
-
} & {
|
|
30
22
|
readonly description: "Navigation functionality including URL navigation, element scrolling, and browser history";
|
|
31
23
|
readonly syntax: readonly ["go back", "go to url <url> [in new window]", "go to [position] [of] <element>"];
|
|
32
24
|
readonly examples: readonly ["go back", "go to url \"https://example.com\"", "go to top of #header"];
|
|
@@ -14,10 +14,6 @@ export interface HistoryCommandOutput {
|
|
|
14
14
|
}
|
|
15
15
|
export declare class HistoryCommand implements DecoratedCommand {
|
|
16
16
|
static readonly metadata: {
|
|
17
|
-
isBlocking: boolean;
|
|
18
|
-
hasBody: boolean;
|
|
19
|
-
version: string;
|
|
20
|
-
} & {
|
|
21
17
|
readonly description: "Modify browser history URL without page reload";
|
|
22
18
|
readonly syntax: readonly ["push url <url>", "push url <url> with title <title>", "replace url <url>", "replace url <url> with title <title>"];
|
|
23
19
|
readonly examples: readonly ["push url \"/page/2\"", "push url \"/search\" with title \"Search Results\"", "replace url \"/search?q=test\"", "replace url \"/page\" with title \"Updated Page\""];
|
|
@@ -27,10 +23,6 @@ export declare class HistoryCommand implements DecoratedCommand {
|
|
|
27
23
|
readonly compatibility: "lokascript-extension";
|
|
28
24
|
};
|
|
29
25
|
get metadata(): {
|
|
30
|
-
isBlocking: boolean;
|
|
31
|
-
hasBody: boolean;
|
|
32
|
-
version: string;
|
|
33
|
-
} & {
|
|
34
26
|
readonly description: "Modify browser history URL without page reload";
|
|
35
27
|
readonly syntax: readonly ["push url <url>", "push url <url> with title <title>", "replace url <url>", "replace url <url> with title <title>"];
|
|
36
28
|
readonly examples: readonly ["push url \"/page/2\"", "push url \"/search\" with title \"Search Results\"", "replace url \"/search?q=test\"", "replace url \"/page\" with title \"Updated Page\""];
|
|
@@ -12,10 +12,6 @@ export interface ScrollCommandOutput {
|
|
|
12
12
|
}
|
|
13
13
|
export declare class ScrollCommand implements DecoratedCommand {
|
|
14
14
|
static readonly metadata: {
|
|
15
|
-
isBlocking: boolean;
|
|
16
|
-
hasBody: boolean;
|
|
17
|
-
version: string;
|
|
18
|
-
} & {
|
|
19
15
|
readonly description: "Scroll an element into view (upstream _hyperscript 0.9.90)";
|
|
20
16
|
readonly syntax: readonly ["scroll to <target>", "scroll to top of <target>", "scroll to <target> smoothly"];
|
|
21
17
|
readonly examples: readonly ["scroll to #top", "scroll to bottom of #chat", "scroll to me smoothly"];
|
|
@@ -24,10 +20,6 @@ export declare class ScrollCommand implements DecoratedCommand {
|
|
|
24
20
|
readonly compatibility: "standard";
|
|
25
21
|
};
|
|
26
22
|
get metadata(): {
|
|
27
|
-
isBlocking: boolean;
|
|
28
|
-
hasBody: boolean;
|
|
29
|
-
version: string;
|
|
30
|
-
} & {
|
|
31
23
|
readonly description: "Scroll an element into view (upstream _hyperscript 0.9.90)";
|
|
32
24
|
readonly syntax: readonly ["scroll to <target>", "scroll to top of <target>", "scroll to <target> smoothly"];
|
|
33
25
|
readonly examples: readonly ["scroll to #top", "scroll to bottom of #chat", "scroll to me smoothly"];
|
|
@@ -13,10 +13,6 @@ export interface RenderCommandOutput {
|
|
|
13
13
|
export declare class RenderCommand {
|
|
14
14
|
readonly name = "render";
|
|
15
15
|
static readonly metadata: {
|
|
16
|
-
isBlocking: boolean;
|
|
17
|
-
hasBody: boolean;
|
|
18
|
-
version: string;
|
|
19
|
-
} & {
|
|
20
16
|
readonly description: "Render templates with @if, @else, and @repeat directives";
|
|
21
17
|
readonly syntax: readonly ["render <template>", "render <template> with <variables>", "render <template> with (key: value, ...)"];
|
|
22
18
|
readonly examples: readonly ["render myTemplate", "render myTemplate with (name: \"Alice\")", "render \"<template>Hello ${name}!</template>\" with (name: \"World\")", "render template with (items: data)"];
|
|
@@ -25,10 +21,6 @@ export declare class RenderCommand {
|
|
|
25
21
|
readonly sideEffects: readonly ["dom-creation", "template-execution"];
|
|
26
22
|
};
|
|
27
23
|
get metadata(): {
|
|
28
|
-
isBlocking: boolean;
|
|
29
|
-
hasBody: boolean;
|
|
30
|
-
version: string;
|
|
31
|
-
} & {
|
|
32
24
|
readonly description: "Render templates with @if, @else, and @repeat directives";
|
|
33
25
|
readonly syntax: readonly ["render <template>", "render <template> with <variables>", "render <template> with (key: value, ...)"];
|
|
34
26
|
readonly examples: readonly ["render myTemplate", "render myTemplate with (name: \"Alice\")", "render \"<template>Hello ${name}!</template>\" with (name: \"World\")", "render template with (items: data)"];
|
|
@@ -16,10 +16,6 @@ export interface BeepCommandOutput {
|
|
|
16
16
|
}
|
|
17
17
|
export declare class BeepCommand implements DecoratedCommand {
|
|
18
18
|
static readonly metadata: {
|
|
19
|
-
isBlocking: boolean;
|
|
20
|
-
hasBody: boolean;
|
|
21
|
-
version: string;
|
|
22
|
-
} & {
|
|
23
19
|
readonly description: "Debug output for expressions with type information";
|
|
24
20
|
readonly syntax: readonly ["beep!", "beep! <expression>", "beep! <expression>, <expression>, ..."];
|
|
25
21
|
readonly examples: readonly ["beep!", "beep! myValue", "beep! me.id, me.className"];
|
|
@@ -28,10 +24,6 @@ export declare class BeepCommand implements DecoratedCommand {
|
|
|
28
24
|
readonly compatibility: "lokascript-extension";
|
|
29
25
|
};
|
|
30
26
|
get metadata(): {
|
|
31
|
-
isBlocking: boolean;
|
|
32
|
-
hasBody: boolean;
|
|
33
|
-
version: string;
|
|
34
|
-
} & {
|
|
35
27
|
readonly description: "Debug output for expressions with type information";
|
|
36
28
|
readonly syntax: readonly ["beep!", "beep! <expression>", "beep! <expression>, <expression>, ..."];
|
|
37
29
|
readonly examples: readonly ["beep!", "beep! myValue", "beep! me.id, me.className"];
|
|
@@ -6,10 +6,6 @@ export interface BreakpointCommandInput {
|
|
|
6
6
|
}
|
|
7
7
|
export declare class BreakpointCommand implements DecoratedCommand {
|
|
8
8
|
static readonly metadata: {
|
|
9
|
-
isBlocking: boolean;
|
|
10
|
-
hasBody: boolean;
|
|
11
|
-
version: string;
|
|
12
|
-
} & {
|
|
13
9
|
readonly description: "Drop into the debugger (emits a debugger; statement)";
|
|
14
10
|
readonly syntax: readonly ["breakpoint"];
|
|
15
11
|
readonly examples: readonly ["breakpoint", "on click breakpoint"];
|
|
@@ -18,10 +14,6 @@ export declare class BreakpointCommand implements DecoratedCommand {
|
|
|
18
14
|
readonly compatibility: "standard";
|
|
19
15
|
};
|
|
20
16
|
get metadata(): {
|
|
21
|
-
isBlocking: boolean;
|
|
22
|
-
hasBody: boolean;
|
|
23
|
-
version: string;
|
|
24
|
-
} & {
|
|
25
17
|
readonly description: "Drop into the debugger (emits a debugger; statement)";
|
|
26
18
|
readonly syntax: readonly ["breakpoint"];
|
|
27
19
|
readonly examples: readonly ["breakpoint", "on click breakpoint"];
|
|
@@ -14,10 +14,6 @@ export interface CopyCommandOutput {
|
|
|
14
14
|
}
|
|
15
15
|
export declare class CopyCommand implements DecoratedCommand {
|
|
16
16
|
static readonly metadata: {
|
|
17
|
-
isBlocking: boolean;
|
|
18
|
-
hasBody: boolean;
|
|
19
|
-
version: string;
|
|
20
|
-
} & {
|
|
21
17
|
readonly description: "Copy text or element content to the clipboard";
|
|
22
18
|
readonly syntax: readonly ["copy <source>", "copy <source> to clipboard"];
|
|
23
19
|
readonly examples: readonly ["copy \"Hello World\"", "copy #code-snippet", "copy my textContent"];
|
|
@@ -26,10 +22,6 @@ export declare class CopyCommand implements DecoratedCommand {
|
|
|
26
22
|
readonly compatibility: "lokascript-extension";
|
|
27
23
|
};
|
|
28
24
|
get metadata(): {
|
|
29
|
-
isBlocking: boolean;
|
|
30
|
-
hasBody: boolean;
|
|
31
|
-
version: string;
|
|
32
|
-
} & {
|
|
33
25
|
readonly description: "Copy text or element content to the clipboard";
|
|
34
26
|
readonly syntax: readonly ["copy <source>", "copy <source> to clipboard"];
|
|
35
27
|
readonly examples: readonly ["copy \"Hello World\"", "copy #code-snippet", "copy my textContent"];
|
|
@@ -11,10 +11,6 @@ export interface LogCommandOutput {
|
|
|
11
11
|
}
|
|
12
12
|
export declare class LogCommand implements DecoratedCommand {
|
|
13
13
|
static readonly metadata: {
|
|
14
|
-
isBlocking: boolean;
|
|
15
|
-
hasBody: boolean;
|
|
16
|
-
version: string;
|
|
17
|
-
} & {
|
|
18
14
|
readonly description: "Log values to the console";
|
|
19
15
|
readonly syntax: "log [<values...>]";
|
|
20
16
|
readonly examples: readonly ["log \"Hello World\"", "log me.value", "log x y z", "log \"Result:\" result"];
|
|
@@ -23,10 +19,6 @@ export declare class LogCommand implements DecoratedCommand {
|
|
|
23
19
|
readonly compatibility: "standard";
|
|
24
20
|
};
|
|
25
21
|
get metadata(): {
|
|
26
|
-
isBlocking: boolean;
|
|
27
|
-
hasBody: boolean;
|
|
28
|
-
version: string;
|
|
29
|
-
} & {
|
|
30
22
|
readonly description: "Log values to the console";
|
|
31
23
|
readonly syntax: "log [<values...>]";
|
|
32
24
|
readonly examples: readonly ["log \"Hello World\"", "log me.value", "log x y z", "log \"Result:\" result"];
|
|
@@ -23,10 +23,6 @@ export interface PickCommandOutput {
|
|
|
23
23
|
}
|
|
24
24
|
export declare class PickCommand implements DecoratedCommand {
|
|
25
25
|
static readonly metadata: {
|
|
26
|
-
isBlocking: boolean;
|
|
27
|
-
hasBody: boolean;
|
|
28
|
-
version: string;
|
|
29
|
-
} & {
|
|
30
26
|
readonly description: "Select from a collection (first/last/random/range/regex match)";
|
|
31
27
|
readonly syntax: readonly ["pick first <count> of <expr>", "pick last <count> of <expr>", "pick random [<count>] of <expr>", "pick items <i> to <j> of <expr>", "pick match of <regex> from <expr>", "pick from <array>", "pick <item1>, <item2>, ..."];
|
|
32
28
|
readonly examples: readonly ["pick first 3 of items", "pick last 2 of items", "pick random 2 of items", "pick items 1 to 3 of items", "pick match of \"[0-9]+\" from text", "pick from colors", "pick \"red\", \"green\", \"blue\""];
|
|
@@ -35,10 +31,6 @@ export declare class PickCommand implements DecoratedCommand {
|
|
|
35
31
|
readonly compatibility: "standard";
|
|
36
32
|
};
|
|
37
33
|
get metadata(): {
|
|
38
|
-
isBlocking: boolean;
|
|
39
|
-
hasBody: boolean;
|
|
40
|
-
version: string;
|
|
41
|
-
} & {
|
|
42
34
|
readonly description: "Select from a collection (first/last/random/range/regex match)";
|
|
43
35
|
readonly syntax: readonly ["pick first <count> of <expr>", "pick last <count> of <expr>", "pick random [<count>] of <expr>", "pick items <i> to <j> of <expr>", "pick match of <regex> from <expr>", "pick from <array>", "pick <item1>, <item2>, ..."];
|
|
44
36
|
readonly examples: readonly ["pick first 3 of items", "pick last 2 of items", "pick random 2 of items", "pick items 1 to 3 of items", "pick match of \"[0-9]+\" from text", "pick from colors", "pick \"red\", \"green\", \"blue\""];
|
|
@@ -13,10 +13,6 @@ export interface TellCommandOutput {
|
|
|
13
13
|
}
|
|
14
14
|
export declare class TellCommand implements DecoratedCommand {
|
|
15
15
|
static readonly metadata: {
|
|
16
|
-
isBlocking: boolean;
|
|
17
|
-
hasBody: boolean;
|
|
18
|
-
version: string;
|
|
19
|
-
} & {
|
|
20
16
|
readonly description: "Execute commands in the context of target elements";
|
|
21
17
|
readonly syntax: readonly ["tell <target> <command> [<command> ...]"];
|
|
22
18
|
readonly examples: readonly ["tell #sidebar hide", "tell .buttons add .disabled", "tell closest <form/> submit"];
|
|
@@ -25,10 +21,6 @@ export declare class TellCommand implements DecoratedCommand {
|
|
|
25
21
|
readonly compatibility: "standard";
|
|
26
22
|
};
|
|
27
23
|
get metadata(): {
|
|
28
|
-
isBlocking: boolean;
|
|
29
|
-
hasBody: boolean;
|
|
30
|
-
version: string;
|
|
31
|
-
} & {
|
|
32
24
|
readonly description: "Execute commands in the context of target elements";
|
|
33
25
|
readonly syntax: readonly ["tell <target> <command> [<command> ...]"];
|
|
34
26
|
readonly examples: readonly ["tell #sidebar hide", "tell .buttons add .disabled", "tell closest <form/> submit"];
|