@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.
Files changed (91) hide show
  1. package/dist/ast-utils/index.js +295 -85
  2. package/dist/ast-utils/index.mjs +295 -85
  3. package/dist/chunks/{bridge-DhmZ3Khh.js → bridge-CPNAPYAo.js} +2 -2
  4. package/dist/chunks/browser-modular-B0lGdcoP.js +2 -0
  5. package/dist/chunks/{index-DKrx4rv2.js → index-BQkkNlzO.js} +2 -2
  6. package/dist/commands/advanced/async.d.ts +0 -8
  7. package/dist/commands/advanced/js.d.ts +0 -8
  8. package/dist/commands/animation/measure.d.ts +0 -8
  9. package/dist/commands/animation/settle.d.ts +0 -8
  10. package/dist/commands/animation/start-view-transition.d.ts +0 -8
  11. package/dist/commands/animation/take.d.ts +0 -8
  12. package/dist/commands/animation/transition.d.ts +0 -8
  13. package/dist/commands/async/fetch.d.ts +0 -8
  14. package/dist/commands/async/wait.d.ts +0 -8
  15. package/dist/commands/behaviors/install.d.ts +0 -8
  16. package/dist/commands/content/append.d.ts +0 -8
  17. package/dist/commands/content/prepend.d.ts +0 -8
  18. package/dist/commands/control-flow/break.d.ts +0 -8
  19. package/dist/commands/control-flow/continue.d.ts +0 -8
  20. package/dist/commands/control-flow/exit.d.ts +0 -8
  21. package/dist/commands/control-flow/halt.d.ts +0 -8
  22. package/dist/commands/control-flow/if.d.ts +0 -8
  23. package/dist/commands/control-flow/repeat.d.ts +0 -8
  24. package/dist/commands/control-flow/return.d.ts +0 -8
  25. package/dist/commands/control-flow/throw.d.ts +0 -8
  26. package/dist/commands/data/clear.d.ts +0 -8
  27. package/dist/commands/data/default.d.ts +0 -8
  28. package/dist/commands/data/get.d.ts +0 -8
  29. package/dist/commands/data/increment.d.ts +0 -8
  30. package/dist/commands/data/set.d.ts +0 -8
  31. package/dist/commands/decorators/index.d.ts +2 -8
  32. package/dist/commands/dom/add.d.ts +0 -8
  33. package/dist/commands/dom/close.d.ts +0 -8
  34. package/dist/commands/dom/empty.d.ts +0 -8
  35. package/dist/commands/dom/hide.d.ts +0 -8
  36. package/dist/commands/dom/make.d.ts +0 -8
  37. package/dist/commands/dom/open.d.ts +0 -8
  38. package/dist/commands/dom/process-partials.d.ts +0 -8
  39. package/dist/commands/dom/put.d.ts +0 -8
  40. package/dist/commands/dom/remove.d.ts +0 -8
  41. package/dist/commands/dom/reset.d.ts +0 -8
  42. package/dist/commands/dom/select.d.ts +0 -8
  43. package/dist/commands/dom/show.d.ts +0 -8
  44. package/dist/commands/dom/swap.d.ts +2 -18
  45. package/dist/commands/dom/toggle.d.ts +0 -8
  46. package/dist/commands/events/trigger.d.ts +0 -8
  47. package/dist/commands/execution/blur.d.ts +0 -8
  48. package/dist/commands/execution/call.d.ts +0 -8
  49. package/dist/commands/execution/focus.d.ts +0 -8
  50. package/dist/commands/execution/pseudo-command.d.ts +0 -8
  51. package/dist/commands/index.js +82 -23
  52. package/dist/commands/index.mjs +82 -23
  53. package/dist/commands/navigation/go.d.ts +0 -8
  54. package/dist/commands/navigation/push-url.d.ts +0 -8
  55. package/dist/commands/navigation/scroll-to.d.ts +0 -8
  56. package/dist/commands/templates/render.d.ts +0 -8
  57. package/dist/commands/utility/beep.d.ts +0 -8
  58. package/dist/commands/utility/breakpoint.d.ts +0 -8
  59. package/dist/commands/utility/copy.d.ts +0 -8
  60. package/dist/commands/utility/log.d.ts +0 -8
  61. package/dist/commands/utility/pick.d.ts +0 -8
  62. package/dist/commands/utility/tell.d.ts +0 -8
  63. package/dist/hyperfixi-browser-classic-i18n.js +1 -1
  64. package/dist/hyperfixi-browser-minimal.js +1 -1
  65. package/dist/hyperfixi-browser-standard.js +1 -1
  66. package/dist/hyperfixi-browser.js +1 -1
  67. package/dist/hyperfixi-classic-i18n.js +1 -1
  68. package/dist/hyperfixi-hx-v4.js +1 -1
  69. package/dist/hyperfixi-minimal.js +1 -1
  70. package/dist/hyperfixi-multilingual.js +1 -1
  71. package/dist/hyperfixi-standard.js +1 -1
  72. package/dist/hyperfixi.js +1 -1
  73. package/dist/hyperfixi.mjs +1 -1
  74. package/dist/index.js +441 -143
  75. package/dist/index.min.js +1 -1
  76. package/dist/index.mjs +441 -143
  77. package/dist/lokascript-browser-classic-i18n.js +1 -1
  78. package/dist/lokascript-browser-minimal.js +1 -1
  79. package/dist/lokascript-browser-standard.js +1 -1
  80. package/dist/lokascript-browser.js +1 -1
  81. package/dist/lokascript-multilingual.js +1 -1
  82. package/dist/parser/command-parsers/dom-commands.d.ts +1 -0
  83. package/dist/parser/full-parser.js +47 -1
  84. package/dist/parser/full-parser.mjs +47 -1
  85. package/dist/reference/index.js +6 -5
  86. package/dist/reference/index.mjs +6 -5
  87. package/dist/registry/index.js +50 -6
  88. package/dist/registry/index.mjs +50 -6
  89. package/dist/runtime/command-adapter.d.ts +8 -8
  90. package/package.json +5 -5
  91. package/dist/chunks/browser-modular-BllAMlht.js +0 -2
@@ -1,2 +1,2 @@
1
- let t=null;async function n(){if(!t)try{t=await import("./browser-modular-BllAMlht.js").then(function(t){return t.m})}catch{throw Error("@lokascript/framework is required for LSE support. Install it: npm install @lokascript/framework")}return t}function r(){if(t)return!0;try{return require.resolve("@lokascript/framework"),!0}catch{return!1}}async function a(t,r){return(await n()).parseExplicit(t,r)}async function o(t){return(await n()).isExplicitSyntax(t)}async function i(t){return(await n()).renderExplicit(t)}async function e(t){return(await n()).fromInterchangeNode(t)}async function c(t){return(await n()).toProtocolJSON(t)}async function u(t){return(await n()).fromProtocolJSON(t)}async function s(t){return(await n()).validateProtocolJSON(t)}async function f(t){return(await n()).toEnvelopeJSON(t)}async function l(t){return(await n()).fromEnvelopeJSON(t)}async function w(t){return(await n()).isEnvelope(t)}async function p(t){return(await n()).semanticNodeToRuntimeAST(t)}export{l as fromEnvelopeJSON,e as fromInterchangeNode,u as fromProtocolJSON,w as isEnvelope,o as isExplicitSyntax,r as isLSEAvailable,a as parseExplicit,i as renderExplicit,p as semanticNodeToRuntimeAST,f as toEnvelopeJSON,c as toProtocolJSON,s as validateProtocolJSON};
2
- //# sourceMappingURL=index-DKrx4rv2.js.map
1
+ let t=null;async function n(){if(!t)try{t=await import("./browser-modular-B0lGdcoP.js").then(function(t){return t.m})}catch{throw Error("@lokascript/framework is required for LSE support. Install it: npm install @lokascript/framework")}return t}function r(){if(t)return!0;try{return require.resolve("@lokascript/framework"),!0}catch{return!1}}async function a(t,r){return(await n()).parseExplicit(t,r)}async function o(t){return(await n()).isExplicitSyntax(t)}async function i(t){return(await n()).renderExplicit(t)}async function e(t){return(await n()).fromInterchangeNode(t)}async function c(t){return(await n()).toProtocolJSON(t)}async function u(t){return(await n()).fromProtocolJSON(t)}async function s(t){return(await n()).validateProtocolJSON(t)}async function f(t){return(await n()).toEnvelopeJSON(t)}async function l(t){return(await n()).fromEnvelopeJSON(t)}async function w(t){return(await n()).isEnvelope(t)}async function p(t){return(await n()).semanticNodeToRuntimeAST(t)}export{l as fromEnvelopeJSON,e as fromInterchangeNode,u as fromProtocolJSON,w as isEnvelope,o as isExplicitSyntax,r as isLSEAvailable,a as parseExplicit,i as renderExplicit,p as semanticNodeToRuntimeAST,f as toEnvelopeJSON,c as toProtocolJSON,s as validateProtocolJSON};
2
+ //# sourceMappingURL=index-BQkkNlzO.js.map
@@ -17,10 +17,6 @@ export interface AsyncCommandOutput {
17
17
  }
18
18
  export declare class AsyncCommand implements DecoratedCommand {
19
19
  static readonly metadata: {
20
- isBlocking: boolean;
21
- hasBody: boolean;
22
- version: string;
23
- } & {
24
20
  readonly description: "Execute commands asynchronously without blocking";
25
21
  readonly syntax: readonly ["async <command> [<command> ...]"];
26
22
  readonly examples: readonly ["async command1 command2", "async fetchData processData", "async animateIn showContent"];
@@ -29,10 +25,6 @@ export declare class AsyncCommand implements DecoratedCommand {
29
25
  readonly compatibility: "lokascript-extension";
30
26
  };
31
27
  get metadata(): {
32
- isBlocking: boolean;
33
- hasBody: boolean;
34
- version: string;
35
- } & {
36
28
  readonly description: "Execute commands asynchronously without blocking";
37
29
  readonly syntax: readonly ["async <command> [<command> ...]"];
38
30
  readonly examples: readonly ["async command1 command2", "async fetchData processData", "async animateIn showContent"];
@@ -15,10 +15,6 @@ export interface JsCommandOutput {
15
15
  }
16
16
  export declare class JsCommand implements DecoratedCommand {
17
17
  static readonly metadata: {
18
- isBlocking: boolean;
19
- hasBody: boolean;
20
- version: string;
21
- } & {
22
18
  readonly description: "Execute inline JavaScript code with access to hyperscript context";
23
19
  readonly syntax: readonly ["js <code> end", "js(param1, param2) <code> end"];
24
20
  readonly examples: readonly ["js console.log(\"Hello\") end", "js(x, y) return x + y end", "js me.style.color = \"red\" end"];
@@ -27,10 +23,6 @@ export declare class JsCommand implements DecoratedCommand {
27
23
  readonly compatibility: "standard";
28
24
  };
29
25
  get metadata(): {
30
- isBlocking: boolean;
31
- hasBody: boolean;
32
- version: string;
33
- } & {
34
26
  readonly description: "Execute inline JavaScript code with access to hyperscript context";
35
27
  readonly syntax: readonly ["js <code> end", "js(param1, param2) <code> end"];
36
28
  readonly examples: readonly ["js console.log(\"Hello\") end", "js(x, y) return x + y end", "js me.style.color = \"red\" end"];
@@ -18,10 +18,6 @@ export interface MeasureCommandOutput {
18
18
  }
19
19
  export declare class MeasureCommand implements DecoratedCommand {
20
20
  static readonly metadata: {
21
- isBlocking: boolean;
22
- hasBody: boolean;
23
- version: string;
24
- } & {
25
21
  readonly description: "Measure DOM element dimensions, positions, and properties";
26
22
  readonly syntax: readonly ["measure", "measure <property>", "measure <target> <property>"];
27
23
  readonly examples: readonly ["measure", "measure width", "measure #element height", "measure x and set dragX"];
@@ -30,10 +26,6 @@ export declare class MeasureCommand implements DecoratedCommand {
30
26
  readonly compatibility: "standard";
31
27
  };
32
28
  get metadata(): {
33
- isBlocking: boolean;
34
- hasBody: boolean;
35
- version: string;
36
- } & {
37
29
  readonly description: "Measure DOM element dimensions, positions, and properties";
38
30
  readonly syntax: readonly ["measure", "measure <property>", "measure <target> <property>"];
39
31
  readonly examples: readonly ["measure", "measure width", "measure #element height", "measure x and set dragX"];
@@ -14,10 +14,6 @@ export interface SettleCommandOutput {
14
14
  }
15
15
  export declare class SettleCommand implements DecoratedCommand {
16
16
  static readonly metadata: {
17
- isBlocking: boolean;
18
- hasBody: boolean;
19
- version: string;
20
- } & {
21
17
  readonly description: "Wait for CSS transitions and animations to complete";
22
18
  readonly syntax: "settle [<target>] [for <timeout>]";
23
19
  readonly examples: readonly ["settle", "settle #animated-element", "settle for 3000"];
@@ -26,10 +22,6 @@ export declare class SettleCommand implements DecoratedCommand {
26
22
  readonly compatibility: "standard";
27
23
  };
28
24
  get metadata(): {
29
- isBlocking: boolean;
30
- hasBody: boolean;
31
- version: string;
32
- } & {
33
25
  readonly description: "Wait for CSS transitions and animations to complete";
34
26
  readonly syntax: "settle [<target>] [for <timeout>]";
35
27
  readonly examples: readonly ["settle", "settle #animated-element", "settle for 3000"];
@@ -12,10 +12,6 @@ export interface StartViewTransitionOutput {
12
12
  }
13
13
  export declare class StartViewTransitionCommand implements DecoratedCommand {
14
14
  static readonly metadata: {
15
- isBlocking: boolean;
16
- hasBody: boolean;
17
- version: string;
18
- } & {
19
15
  readonly description: "Wrap a block of commands in document.startViewTransition()";
20
16
  readonly syntax: readonly ["start view transition [using <type>] <body> end"];
21
17
  readonly examples: readonly ["start view transition add .highlight to me end", "start view transition using \"slide\" then put result into #panel end"];
@@ -24,10 +20,6 @@ export declare class StartViewTransitionCommand 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: "Wrap a block of commands in document.startViewTransition()";
32
24
  readonly syntax: readonly ["start view transition [using <type>] <body> end"];
33
25
  readonly examples: readonly ["start view transition add .highlight to me end", "start view transition using \"slide\" then put result into #panel end"];
@@ -14,10 +14,6 @@ export interface TakeCommandOutput {
14
14
  }
15
15
  export declare class TakeCommand implements DecoratedCommand {
16
16
  static readonly metadata: {
17
- isBlocking: boolean;
18
- hasBody: boolean;
19
- version: string;
20
- } & {
21
17
  readonly description: "Move classes, attributes, and properties from one element to another";
22
18
  readonly syntax: readonly ["take <class> [from <source>] [for <recipient>]", "take <property> from <source>", "take <property> from <source> and put it on <target>"];
23
19
  readonly examples: readonly ["take .active from .tab for me", "take class from <#source/>", "take @data-value from <.source/> and put it on <#target/>"];
@@ -26,10 +22,6 @@ export declare class TakeCommand implements DecoratedCommand {
26
22
  readonly compatibility: "standard";
27
23
  };
28
24
  get metadata(): {
29
- isBlocking: boolean;
30
- hasBody: boolean;
31
- version: string;
32
- } & {
33
25
  readonly description: "Move classes, attributes, and properties from one element to another";
34
26
  readonly syntax: readonly ["take <class> [from <source>] [for <recipient>]", "take <property> from <source>", "take <property> from <source> and put it on <target>"];
35
27
  readonly examples: readonly ["take .active from .tab for me", "take class from <#source/>", "take @data-value from <.source/> and put it on <#target/>"];
@@ -19,10 +19,6 @@ export interface TransitionCommandOutput {
19
19
  }
20
20
  export declare class TransitionCommand implements DecoratedCommand {
21
21
  static readonly metadata: {
22
- isBlocking: boolean;
23
- hasBody: boolean;
24
- version: string;
25
- } & {
26
22
  readonly description: "Animate CSS properties using CSS transitions";
27
23
  readonly syntax: "transition [<target>] <property> to <value> [over <duration>] [with <timing>]";
28
24
  readonly examples: readonly ["transition opacity to 0.5", "transition my *opacity to 0 over 200ms", "transition #box's *opacity to 0 over 200ms", "transition left to 100px over 500ms", "transition background-color to red over 1s with ease-in-out"];
@@ -31,10 +27,6 @@ export declare class TransitionCommand implements DecoratedCommand {
31
27
  readonly compatibility: "standard";
32
28
  };
33
29
  get metadata(): {
34
- isBlocking: boolean;
35
- hasBody: boolean;
36
- version: string;
37
- } & {
38
30
  readonly description: "Animate CSS properties using CSS transitions";
39
31
  readonly syntax: "transition [<target>] <property> to <value> [over <duration>] [with <timing>]";
40
32
  readonly examples: readonly ["transition opacity to 0.5", "transition my *opacity to 0 over 200ms", "transition #box's *opacity to 0 over 200ms", "transition left to 100px over 500ms", "transition background-color to red over 1s with ease-in-out"];
@@ -29,10 +29,6 @@ export interface FetchCommandOutput {
29
29
  }
30
30
  export declare class FetchCommand implements DecoratedCommand {
31
31
  static readonly metadata: {
32
- isBlocking: boolean;
33
- hasBody: boolean;
34
- version: string;
35
- } & {
36
32
  readonly description: "Make HTTP requests with lifecycle event support";
37
33
  readonly syntax: readonly ["fetch <url>", "fetch <url> as <type>", "fetch <url> with <options>"];
38
34
  readonly examples: readonly ["fetch \"/api/data\"", "fetch \"/api/users\" as json", "fetch \"/api/save\" with { method:\"POST\" }"];
@@ -41,10 +37,6 @@ export declare class FetchCommand implements DecoratedCommand {
41
37
  readonly compatibility: "standard";
42
38
  };
43
39
  get metadata(): {
44
- isBlocking: boolean;
45
- hasBody: boolean;
46
- version: string;
47
- } & {
48
40
  readonly description: "Make HTTP requests with lifecycle event support";
49
41
  readonly syntax: readonly ["fetch <url>", "fetch <url> as <type>", "fetch <url> with <options>"];
50
42
  readonly examples: readonly ["fetch \"/api/data\"", "fetch \"/api/users\" as json", "fetch \"/api/save\" with { method:\"POST\" }"];
@@ -24,10 +24,6 @@ export interface WaitCommandOutput {
24
24
  }
25
25
  export declare class WaitCommand implements DecoratedCommand {
26
26
  static readonly metadata: {
27
- isBlocking: boolean;
28
- hasBody: boolean;
29
- version: string;
30
- } & {
31
27
  readonly description: "Wait for time delay, event, or race condition";
32
28
  readonly syntax: readonly ["wait <time>", "wait for <event>", "wait for <event> or <condition>"];
33
29
  readonly examples: readonly ["wait 2s", "wait for click", "wait for click or 1s", "wait for mousemove(clientX, clientY)"];
@@ -36,10 +32,6 @@ export declare class WaitCommand implements DecoratedCommand {
36
32
  readonly compatibility: "standard";
37
33
  };
38
34
  get metadata(): {
39
- isBlocking: boolean;
40
- hasBody: boolean;
41
- version: string;
42
- } & {
43
35
  readonly description: "Wait for time delay, event, or race condition";
44
36
  readonly syntax: readonly ["wait <time>", "wait for <event>", "wait for <event> or <condition>"];
45
37
  readonly examples: readonly ["wait 2s", "wait for click", "wait for click or 1s", "wait for mousemove(clientX, clientY)"];
@@ -15,10 +15,6 @@ export interface InstallCommandOutput {
15
15
  export declare class InstallCommand {
16
16
  readonly name = "install";
17
17
  static readonly metadata: {
18
- isBlocking: boolean;
19
- hasBody: boolean;
20
- version: string;
21
- } & {
22
18
  readonly description: "Install a behavior on an element with optional parameters";
23
19
  readonly syntax: readonly ["install <BehaviorName>", "install <BehaviorName> on <element>", "install <BehaviorName>(param: value)", "install <BehaviorName>(param: value) on <element>"];
24
20
  readonly examples: readonly ["install Removable", "install Draggable on #box", "install Tooltip(text: \"Help\", position: \"top\")", "install Sortable(axis: \"y\") on .list", "install MyBehavior(foo: 42) on the first <div/>"];
@@ -27,10 +23,6 @@ export declare class InstallCommand {
27
23
  readonly sideEffects: readonly ["behavior-installation", "element-modification"];
28
24
  };
29
25
  get metadata(): {
30
- isBlocking: boolean;
31
- hasBody: boolean;
32
- version: string;
33
- } & {
34
26
  readonly description: "Install a behavior on an element with optional parameters";
35
27
  readonly syntax: readonly ["install <BehaviorName>", "install <BehaviorName> on <element>", "install <BehaviorName>(param: value)", "install <BehaviorName>(param: value) on <element>"];
36
28
  readonly examples: readonly ["install Removable", "install Draggable on #box", "install Tooltip(text: \"Help\", position: \"top\")", "install Sortable(axis: \"y\") on .list", "install MyBehavior(foo: 42) on the first <div/>"];
@@ -3,10 +3,6 @@ export type AppendCommandInput = InsertionCommandInput;
3
3
  export type AppendCommandOutput = InsertionCommandOutput;
4
4
  export declare class AppendCommand extends ContentInsertionCommand {
5
5
  static readonly metadata: {
6
- isBlocking: boolean;
7
- hasBody: boolean;
8
- version: string;
9
- } & {
10
6
  readonly description: "Add content to the end of a string, array, Set, or HTML element";
11
7
  readonly syntax: readonly ["append <content>", "append <content> to <target>"];
12
8
  readonly examples: readonly ["append \"Hello\"", "append \"World\" to greeting", "append item to myArray", "append \"<p>New</p>\" to #content", "append \" (edited)\" to #title's textContent"];
@@ -15,10 +11,6 @@ export declare class AppendCommand extends ContentInsertionCommand {
15
11
  readonly compatibility: "standard";
16
12
  };
17
13
  get metadata(): {
18
- isBlocking: boolean;
19
- hasBody: boolean;
20
- version: string;
21
- } & {
22
14
  readonly description: "Add content to the end of a string, array, Set, or HTML element";
23
15
  readonly syntax: readonly ["append <content>", "append <content> to <target>"];
24
16
  readonly examples: readonly ["append \"Hello\"", "append \"World\" to greeting", "append item to myArray", "append \"<p>New</p>\" to #content", "append \" (edited)\" to #title's textContent"];
@@ -3,10 +3,6 @@ export type PrependCommandInput = InsertionCommandInput;
3
3
  export type PrependCommandOutput = InsertionCommandOutput;
4
4
  export declare class PrependCommand extends ContentInsertionCommand {
5
5
  static readonly metadata: {
6
- isBlocking: boolean;
7
- hasBody: boolean;
8
- version: string;
9
- } & {
10
6
  readonly description: "Add content to the start of a string, array, Set, or HTML element";
11
7
  readonly syntax: readonly ["prepend <content>", "prepend <content> to <target>"];
12
8
  readonly examples: readonly ["prepend \"Hello\"", "prepend \"World\" to greeting", "prepend item to myArray", "prepend \"<p>First</p>\" to #content"];
@@ -15,10 +11,6 @@ export declare class PrependCommand extends ContentInsertionCommand {
15
11
  readonly compatibility: "lokascript-extension";
16
12
  };
17
13
  get metadata(): {
18
- isBlocking: boolean;
19
- hasBody: boolean;
20
- version: string;
21
- } & {
22
14
  readonly description: "Add content to the start of a string, array, Set, or HTML element";
23
15
  readonly syntax: readonly ["prepend <content>", "prepend <content> to <target>"];
24
16
  readonly examples: readonly ["prepend \"Hello\"", "prepend \"World\" to greeting", "prepend item to myArray", "prepend \"<p>First</p>\" to #content"];
@@ -7,10 +7,6 @@ export interface BreakCommandOutput {
7
7
  }
8
8
  export declare class BreakCommand extends ControlFlowSignalBase {
9
9
  static readonly metadata: {
10
- isBlocking: boolean;
11
- hasBody: boolean;
12
- version: string;
13
- } & {
14
10
  readonly description: "Exit from the current loop (repeat, for, while, until)";
15
11
  readonly syntax: readonly ["break"];
16
12
  readonly examples: readonly ["break", "if found then break", "repeat for item in items { if item == target then break }"];
@@ -19,10 +15,6 @@ export declare class BreakCommand extends ControlFlowSignalBase {
19
15
  readonly compatibility: "standard";
20
16
  };
21
17
  get metadata(): {
22
- isBlocking: boolean;
23
- hasBody: boolean;
24
- version: string;
25
- } & {
26
18
  readonly description: "Exit from the current loop (repeat, for, while, until)";
27
19
  readonly syntax: readonly ["break"];
28
20
  readonly examples: readonly ["break", "if found then break", "repeat for item in items { if item == target then break }"];
@@ -7,10 +7,6 @@ export interface ContinueCommandOutput {
7
7
  }
8
8
  export declare class ContinueCommand extends ControlFlowSignalBase {
9
9
  static readonly metadata: {
10
- isBlocking: boolean;
11
- hasBody: boolean;
12
- version: string;
13
- } & {
14
10
  readonly description: "Skip to the next iteration of the current loop";
15
11
  readonly syntax: readonly ["continue"];
16
12
  readonly examples: readonly ["continue", "if item.isInvalid then continue", "repeat for item in items { if item.skip then continue; process item }"];
@@ -19,10 +15,6 @@ export declare class ContinueCommand extends ControlFlowSignalBase {
19
15
  readonly compatibility: "standard";
20
16
  };
21
17
  get metadata(): {
22
- isBlocking: boolean;
23
- hasBody: boolean;
24
- version: string;
25
- } & {
26
18
  readonly description: "Skip to the next iteration of the current loop";
27
19
  readonly syntax: readonly ["continue"];
28
20
  readonly examples: readonly ["continue", "if item.isInvalid then continue", "repeat for item in items { if item.skip then continue; process item }"];
@@ -7,10 +7,6 @@ export interface ExitCommandOutput {
7
7
  }
8
8
  export declare class ExitCommand extends ControlFlowSignalBase {
9
9
  static readonly metadata: {
10
- isBlocking: boolean;
11
- hasBody: boolean;
12
- version: string;
13
- } & {
14
10
  readonly description: "Immediately terminate execution of the current event handler or behavior";
15
11
  readonly syntax: readonly ["exit"];
16
12
  readonly examples: readonly ["exit", "if no draggedItem exit", "on click if disabled exit"];
@@ -19,10 +15,6 @@ export declare class ExitCommand extends ControlFlowSignalBase {
19
15
  readonly compatibility: "standard";
20
16
  };
21
17
  get metadata(): {
22
- isBlocking: boolean;
23
- hasBody: boolean;
24
- version: string;
25
- } & {
26
18
  readonly description: "Immediately terminate execution of the current event handler or behavior";
27
19
  readonly syntax: readonly ["exit"];
28
20
  readonly examples: readonly ["exit", "if no draggedItem exit", "on click if disabled exit"];
@@ -12,10 +12,6 @@ export interface HaltCommandOutput {
12
12
  }
13
13
  export declare class HaltCommand implements DecoratedCommand {
14
14
  static readonly metadata: {
15
- isBlocking: boolean;
16
- hasBody: boolean;
17
- version: string;
18
- } & {
19
15
  readonly description: "Stop command execution or prevent event defaults";
20
16
  readonly syntax: readonly ["halt", "halt the event"];
21
17
  readonly examples: readonly ["halt", "halt the event", "if error then halt", "on click halt the event then log \"clicked\""];
@@ -24,10 +20,6 @@ export declare class HaltCommand 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: "Stop command execution or prevent event defaults";
32
24
  readonly syntax: readonly ["halt", "halt the event"];
33
25
  readonly examples: readonly ["halt", "halt the event", "if error then halt", "on click halt the event then log \"clicked\""];
@@ -25,10 +25,6 @@ export interface IfCommandOutput extends ConditionalCommandOutput {
25
25
  }
26
26
  export declare class ConditionalCommand implements DecoratedCommand {
27
27
  static readonly metadata: {
28
- isBlocking: boolean;
29
- hasBody: boolean;
30
- version: string;
31
- } & {
32
28
  readonly description: "Conditional execution based on boolean expressions";
33
29
  readonly syntax: readonly ["if <condition> then <commands>", "if <condition> then <commands> else <commands>", "unless <condition> <commands>"];
34
30
  readonly examples: readonly ["if x > 5 then add .active", "if user.isAdmin then show #adminPanel else hide #adminPanel", "unless user.isLoggedIn showLoginForm"];
@@ -38,10 +34,6 @@ export declare class ConditionalCommand implements DecoratedCommand {
38
34
  readonly compatibility: "standard";
39
35
  };
40
36
  get metadata(): {
41
- isBlocking: boolean;
42
- hasBody: boolean;
43
- version: string;
44
- } & {
45
37
  readonly description: "Conditional execution based on boolean expressions";
46
38
  readonly syntax: readonly ["if <condition> then <commands>", "if <condition> then <commands> else <commands>", "unless <condition> <commands>"];
47
39
  readonly examples: readonly ["if x > 5 then add .active", "if user.isAdmin then show #adminPanel else hide #adminPanel", "unless user.isLoggedIn showLoginForm"];
@@ -24,10 +24,6 @@ export interface RepeatCommandOutput {
24
24
  }
25
25
  export declare class RepeatCommand implements DecoratedCommand {
26
26
  static readonly metadata: {
27
- isBlocking: boolean;
28
- hasBody: boolean;
29
- version: string;
30
- } & {
31
27
  readonly description: "Iteration in hyperscript - for-in, counted, conditional, event-driven, and infinite loops";
32
28
  readonly syntax: readonly ["repeat for <var> in <collection> { <commands> }", "repeat <count> times { <commands> }", "repeat while <condition> { <commands> }", "repeat until <condition> { <commands> }", "repeat forever { <commands> }"];
33
29
  readonly examples: readonly ["repeat for item in items { log item }", "repeat 5 times { log \"hello\" }"];
@@ -36,10 +32,6 @@ export declare class RepeatCommand implements DecoratedCommand {
36
32
  readonly compatibility: "standard";
37
33
  };
38
34
  get metadata(): {
39
- isBlocking: boolean;
40
- hasBody: boolean;
41
- version: string;
42
- } & {
43
35
  readonly description: "Iteration in hyperscript - for-in, counted, conditional, event-driven, and infinite loops";
44
36
  readonly syntax: readonly ["repeat for <var> in <collection> { <commands> }", "repeat <count> times { <commands> }", "repeat while <condition> { <commands> }", "repeat until <condition> { <commands> }", "repeat forever { <commands> }"];
45
37
  readonly examples: readonly ["repeat for item in items { log item }", "repeat 5 times { log \"hello\" }"];
@@ -11,10 +11,6 @@ export interface ReturnCommandOutput {
11
11
  }
12
12
  export declare class ReturnCommand implements DecoratedCommand {
13
13
  static readonly metadata: {
14
- isBlocking: boolean;
15
- hasBody: boolean;
16
- version: string;
17
- } & {
18
14
  readonly description: "Return a value from a command sequence or function, terminating execution";
19
15
  readonly syntax: readonly ["return", "return <value>"];
20
16
  readonly examples: readonly ["return", "return 42", "return user.name", "if found then return result"];
@@ -23,10 +19,6 @@ export declare class ReturnCommand 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: "Return a value from a command sequence or function, terminating execution";
31
23
  readonly syntax: readonly ["return", "return <value>"];
32
24
  readonly examples: readonly ["return", "return 42", "return user.name", "if found then return result"];
@@ -10,10 +10,6 @@ export interface ThrowCommandOutput {
10
10
  }
11
11
  export declare class ThrowCommand implements DecoratedCommand {
12
12
  static readonly metadata: {
13
- isBlocking: boolean;
14
- hasBody: boolean;
15
- version: string;
16
- } & {
17
13
  readonly description: "Throw an error with a specified message";
18
14
  readonly syntax: readonly ["throw <message>"];
19
15
  readonly examples: readonly ["throw \"Invalid input\"", "if not valid then throw \"Validation failed\""];
@@ -22,10 +18,6 @@ export declare class ThrowCommand implements DecoratedCommand {
22
18
  readonly compatibility: "standard";
23
19
  };
24
20
  get metadata(): {
25
- isBlocking: boolean;
26
- hasBody: boolean;
27
- version: string;
28
- } & {
29
21
  readonly description: "Throw an error with a specified message";
30
22
  readonly syntax: readonly ["throw <message>"];
31
23
  readonly examples: readonly ["throw \"Invalid input\"", "if not valid then throw \"Validation failed\""];
@@ -10,10 +10,6 @@ export type ClearCommandInput = {
10
10
  };
11
11
  export declare class ClearCommand implements DecoratedCommand {
12
12
  static readonly metadata: {
13
- isBlocking: boolean;
14
- hasBody: boolean;
15
- version: string;
16
- } & {
17
13
  readonly description: "Reset a variable to null or clear the value of a form field (<input>, <textarea>, <select>)";
18
14
  readonly syntax: readonly ["clear <var>", "clear :var", "clear <target>"];
19
15
  readonly examples: readonly ["clear :count", "clear myVar", "clear #search", "clear <textarea/>"];
@@ -22,10 +18,6 @@ export declare class ClearCommand implements DecoratedCommand {
22
18
  readonly compatibility: "standard";
23
19
  };
24
20
  get metadata(): {
25
- isBlocking: boolean;
26
- hasBody: boolean;
27
- version: string;
28
- } & {
29
21
  readonly description: "Reset a variable to null or clear the value of a form field (<input>, <textarea>, <select>)";
30
22
  readonly syntax: readonly ["clear <var>", "clear :var", "clear <target>"];
31
23
  readonly examples: readonly ["clear :count", "clear myVar", "clear #search", "clear <textarea/>"];
@@ -31,10 +31,6 @@ export interface DefaultCommandOutput {
31
31
  }
32
32
  export declare class DefaultCommand implements DecoratedCommand {
33
33
  static readonly metadata: {
34
- isBlocking: boolean;
35
- hasBody: boolean;
36
- version: string;
37
- } & {
38
34
  readonly description: "Set a value only if it doesn't already exist";
39
35
  readonly syntax: readonly ["default <expression> to <expression>"];
40
36
  readonly examples: readonly ["default myVar to \"fallback\"", "default @data-theme to \"light\"", "default my innerHTML to \"No content\""];
@@ -43,10 +39,6 @@ export declare class DefaultCommand implements DecoratedCommand {
43
39
  readonly compatibility: "standard";
44
40
  };
45
41
  get metadata(): {
46
- isBlocking: boolean;
47
- hasBody: boolean;
48
- version: string;
49
- } & {
50
42
  readonly description: "Set a value only if it doesn't already exist";
51
43
  readonly syntax: readonly ["default <expression> to <expression>"];
52
44
  readonly examples: readonly ["default myVar to \"fallback\"", "default @data-theme to \"light\"", "default my innerHTML to \"No content\""];
@@ -10,10 +10,6 @@ export interface GetCommandOutput {
10
10
  }
11
11
  export declare class GetCommand implements DecoratedCommand {
12
12
  static readonly metadata: {
13
- isBlocking: boolean;
14
- hasBody: boolean;
15
- version: string;
16
- } & {
17
13
  readonly description: "Evaluate an expression and store the result in it";
18
14
  readonly syntax: "get <expression>";
19
15
  readonly examples: readonly ["get #my-dialog", "get <button/>", "get me.parentElement"];
@@ -22,10 +18,6 @@ export declare class GetCommand implements DecoratedCommand {
22
18
  readonly compatibility: "standard";
23
19
  };
24
20
  get metadata(): {
25
- isBlocking: boolean;
26
- hasBody: boolean;
27
- version: string;
28
- } & {
29
21
  readonly description: "Evaluate an expression and store the result in it";
30
22
  readonly syntax: "get <expression>";
31
23
  readonly examples: readonly ["get #my-dialog", "get <button/>", "get me.parentElement"];
@@ -10,10 +10,6 @@ export type { NumericTargetInput as IncrementCommandInput };
10
10
  export type { NumericTargetInput as DecrementCommandInput };
11
11
  export declare class NumericModifyCommand implements DecoratedCommand {
12
12
  static readonly metadata: {
13
- isBlocking: boolean;
14
- hasBody: boolean;
15
- version: string;
16
- } & {
17
13
  readonly description: "Modify a variable or property by a specified amount (default: 1)";
18
14
  readonly syntax: readonly ["increment <target> [by <number>]", "decrement <target> [by <number>]"];
19
15
  readonly examples: readonly ["increment counter", "increment counter by 5", "decrement counter", "decrement counter by 5"];
@@ -23,10 +19,6 @@ export declare class NumericModifyCommand 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: "Modify a variable or property by a specified amount (default: 1)";
31
23
  readonly syntax: readonly ["increment <target> [by <number>]", "decrement <target> [by <number>]"];
32
24
  readonly examples: readonly ["increment counter", "increment counter by 5", "decrement counter", "decrement counter by 5"];
@@ -45,10 +45,6 @@ export interface SetCommandOutput {
45
45
  }
46
46
  export declare class SetCommand implements DecoratedCommand {
47
47
  static readonly metadata: {
48
- isBlocking: boolean;
49
- hasBody: boolean;
50
- version: string;
51
- } & {
52
48
  readonly description: "Set values to variables, attributes, or properties";
53
49
  readonly syntax: readonly ["set <target> to <value>"];
54
50
  readonly examples: readonly ["set myVar to \"value\"", "set @data-theme to \"dark\"", "set my innerHTML to \"content\""];
@@ -57,10 +53,6 @@ export declare class SetCommand implements DecoratedCommand {
57
53
  readonly compatibility: "standard";
58
54
  };
59
55
  get metadata(): {
60
- isBlocking: boolean;
61
- hasBody: boolean;
62
- version: string;
63
- } & {
64
56
  readonly description: "Set values to variables, attributes, or properties";
65
57
  readonly syntax: readonly ["set <target> to <value>"];
66
58
  readonly examples: readonly ["set myVar to \"value\"", "set @data-theme to \"dark\"", "set my innerHTML to \"content\""];
@@ -7,14 +7,8 @@ export interface DecoratedCommand {
7
7
  readonly metadata: CommandMetadata;
8
8
  }
9
9
  export declare function command(config: CommandConfig): <T extends new (...args: unknown[]) => object>(target: T, context: ClassDecoratorContext) => T | void;
10
- export type CommandMetaInput = Omit<CommandMetadata, 'version'> & {
11
- readonly version?: string;
12
- };
13
- export declare function commandMeta<const T extends CommandMetaInput>(metadata: T): {
14
- isBlocking: boolean;
15
- hasBody: boolean;
16
- version: string;
17
- } & T;
10
+ export type CommandMetaInput = CommandMetadata;
11
+ export declare function commandMeta<const T extends CommandMetaInput>(metadata: T): T;
18
12
  export declare function createFactory<T extends new () => object>(CommandClass: T): () => InstanceType<T>;
19
13
  export type { CommandMetadata, CommandCategory, CommandSideEffect };
20
14
  //# sourceMappingURL=index.d.ts.map
@@ -18,10 +18,6 @@ export type AddCommandInput = {
18
18
  };
19
19
  export declare class AddCommand extends DOMModificationBase {
20
20
  static readonly metadata: {
21
- isBlocking: boolean;
22
- hasBody: boolean;
23
- version: string;
24
- } & {
25
21
  readonly description: "Add CSS classes, attributes, or styles to elements";
26
22
  readonly syntax: "add <classes|@attr|{styles}> [to <target>]";
27
23
  readonly examples: readonly ["add .active to me", "add \"active selected\" to <button/>", "add .highlighted to #modal", "add [@data-test=\"value\"] to #element"];
@@ -30,10 +26,6 @@ export declare class AddCommand extends DOMModificationBase {
30
26
  readonly compatibility: "standard";
31
27
  };
32
28
  get metadata(): {
33
- isBlocking: boolean;
34
- hasBody: boolean;
35
- version: string;
36
- } & {
37
29
  readonly description: "Add CSS classes, attributes, or styles to elements";
38
30
  readonly syntax: "add <classes|@attr|{styles}> [to <target>]";
39
31
  readonly examples: readonly ["add .active to me", "add \"active selected\" to <button/>", "add .highlighted to #modal", "add [@data-test=\"value\"] to #element"];