@hyperfixi/core 2.3.1 → 2.5.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 (194) hide show
  1. package/dist/api/dom-processor.d.ts +8 -4
  2. package/dist/api/hyperscript-api.d.ts +5 -1
  3. package/dist/ast-utils/index.js +25320 -94
  4. package/dist/ast-utils/index.mjs +25320 -94
  5. package/dist/ast-utils/interchange/types.d.ts +7 -1
  6. package/dist/behaviors/index.js +54 -100
  7. package/dist/behaviors/index.mjs +54 -100
  8. package/dist/bundle-generator/index.js +19 -2
  9. package/dist/bundle-generator/index.mjs +19 -2
  10. package/dist/bundle-generator/parser-templates.d.ts +1 -1
  11. package/dist/bundle-generator/template-capabilities.d.ts +1 -1
  12. package/dist/chunks/bridge-Ce2mO-nk.js +2 -0
  13. package/dist/chunks/browser-modular-D5vPrb2X.js +2 -0
  14. package/dist/chunks/feature-eventsource-BpZvPy_K.js +2 -0
  15. package/dist/chunks/{feature-sockets-ClOH7vk7.js → feature-sockets-CrYvjZ4j.js} +2 -2
  16. package/dist/chunks/feature-webworker-BSYguEIW.js +2 -0
  17. package/dist/chunks/index-DsBHN4zW.js +2 -0
  18. package/dist/commands/advanced/async.d.ts +6 -2
  19. package/dist/commands/advanced/js.d.ts +1 -1
  20. package/dist/commands/animation/start-view-transition.d.ts +24 -0
  21. package/dist/commands/async/fetch.d.ts +6 -1
  22. package/dist/commands/control-flow/repeat.d.ts +2 -0
  23. package/dist/commands/data/clear.d.ts +23 -0
  24. package/dist/commands/data/set.d.ts +6 -0
  25. package/dist/commands/dom/close.d.ts +19 -0
  26. package/dist/commands/dom/empty.d.ts +19 -0
  27. package/dist/commands/dom/open.d.ts +21 -0
  28. package/dist/commands/dom/reset.d.ts +19 -0
  29. package/dist/commands/dom/select.d.ts +19 -0
  30. package/dist/commands/dom/swap.d.ts +7 -4
  31. package/dist/commands/events/trigger.d.ts +1 -1
  32. package/dist/commands/execution/blur.d.ts +19 -0
  33. package/dist/commands/execution/call.d.ts +1 -2
  34. package/dist/commands/execution/focus.d.ts +19 -0
  35. package/dist/commands/helpers/element-resolution.d.ts +2 -2
  36. package/dist/commands/helpers/event-waiting.d.ts +1 -1
  37. package/dist/commands/helpers/numeric-target-parser.d.ts +7 -0
  38. package/dist/commands/index.d.ts +34 -2
  39. package/dist/commands/index.js +19353 -4845
  40. package/dist/commands/index.mjs +19321 -4846
  41. package/dist/commands/navigation/go.d.ts +3 -0
  42. package/dist/commands/navigation/scroll-to.d.ts +26 -0
  43. package/dist/commands/utility/beep.d.ts +2 -2
  44. package/dist/commands/utility/breakpoint.d.ts +19 -0
  45. package/dist/commands/utility/pick.d.ts +11 -2
  46. package/dist/compatibility/browser-bundle-modular.d.ts +2 -2
  47. package/dist/compatibility/browser-bundle-multilingual.d.ts +1 -1
  48. package/dist/compatibility/browser-bundle-semantic-complete.d.ts +3 -3
  49. package/dist/compatibility/browser-bundle.d.ts +13 -6
  50. package/dist/compatibility/browser-modular.d.ts +1 -3
  51. package/dist/core/expression-evaluator.d.ts +4 -4
  52. package/dist/core/expression-registry.d.ts +8 -0
  53. package/dist/expressions/bundles/common-expressions.d.ts +2 -2
  54. package/dist/expressions/bundles/core-expressions.d.ts +2 -2
  55. package/dist/expressions/bundles/full-expressions.d.ts +2 -2
  56. package/dist/expressions/bundles/index.d.ts +3 -3
  57. package/dist/expressions/collection/index.d.ts +35 -0
  58. package/dist/expressions/conversion/impl/index.d.ts +1 -1
  59. package/dist/expressions/index.d.ts +4 -3
  60. package/dist/expressions/index.js +1117 -1590
  61. package/dist/expressions/index.mjs +1113 -1586
  62. package/dist/expressions/logical/index.d.ts +2 -0
  63. package/dist/expressions/mathematical/index.d.ts +11 -0
  64. package/dist/expressions/shared/index.d.ts +1 -1
  65. package/dist/expressions/shared/number-utils.d.ts +1 -0
  66. package/dist/htmx/htmx-attribute-processor.d.ts +37 -1
  67. package/dist/htmx/htmx-translator.d.ts +2 -0
  68. package/dist/htmx/i18n-hooks.d.ts +15 -0
  69. package/dist/htmx/i18n-orchestrator.d.ts +15 -0
  70. package/dist/htmx/lang-resolver.d.ts +3 -0
  71. package/dist/htmx/sse.d.ts +60 -0
  72. package/dist/htmx/ws.d.ts +59 -0
  73. package/dist/hyperfixi-browser-classic-i18n.js +2 -0
  74. package/dist/hyperfixi-browser-minimal.js +1 -0
  75. package/dist/hyperfixi-browser-standard.js +2 -0
  76. package/dist/hyperfixi-browser.js +2 -0
  77. package/dist/hyperfixi-classic-i18n.js +1 -1
  78. package/dist/hyperfixi-hx-v4.js +1 -0
  79. package/dist/hyperfixi-hx.js +1 -1
  80. package/dist/hyperfixi-hybrid-complete.js +1 -1
  81. package/dist/hyperfixi-hybrid-hx.js +1 -0
  82. package/dist/hyperfixi-minimal.js +1 -1
  83. package/dist/hyperfixi-multilingual.js +1 -1
  84. package/dist/hyperfixi-standard.js +1 -1
  85. package/dist/hyperfixi.js +1 -1
  86. package/dist/hyperfixi.mjs +1 -1
  87. package/dist/index.d.ts +2 -0
  88. package/dist/index.js +43592 -45060
  89. package/dist/index.min.js +1 -1
  90. package/dist/index.mjs +43589 -45061
  91. package/dist/lib/index.d.ts +2 -2
  92. package/dist/lib/morph-adapter.d.ts +0 -13
  93. package/dist/lib/swap-executor.d.ts +0 -10
  94. package/dist/lib/view-transitions.d.ts +1 -30
  95. package/dist/lokascript-browser-classic-i18n.js +1 -1
  96. package/dist/lokascript-browser-minimal.js +1 -1
  97. package/dist/lokascript-browser-standard.js +1 -1
  98. package/dist/lokascript-browser.js +1 -1
  99. package/dist/lokascript-hybrid-complete.js +1 -1
  100. package/dist/lokascript-hybrid-hx.js +1 -1
  101. package/dist/lokascript-multilingual.js +1 -1
  102. package/dist/lsp-metadata.d.ts +9 -4
  103. package/dist/lsp-metadata.js +187 -3
  104. package/dist/lsp-metadata.mjs +185 -4
  105. package/dist/metadata.d.ts +1 -1
  106. package/dist/metadata.js +3 -3
  107. package/dist/metadata.mjs +3 -3
  108. package/dist/multilingual/bridge.d.ts +1 -1
  109. package/dist/multilingual/index.js +79 -22
  110. package/dist/multilingual/index.mjs +79 -22
  111. package/dist/parser/command-parsers/animation-commands.d.ts +1 -0
  112. package/dist/parser/command-parsers/utility-commands.d.ts +1 -0
  113. package/dist/parser/extensions.d.ts +51 -0
  114. package/dist/parser/full-parser.js +1223 -897
  115. package/dist/parser/full-parser.mjs +1223 -897
  116. package/dist/parser/helpers/ast-helpers.d.ts +1 -0
  117. package/dist/parser/helpers/parsing-helpers.d.ts +4 -0
  118. package/dist/parser/parser-types.d.ts +8 -28
  119. package/dist/parser/parser.d.ts +3 -7
  120. package/dist/parser/pratt-parser.d.ts +0 -3
  121. package/dist/parser/runtime.d.ts +4 -0
  122. package/dist/parser/semantic-integration.d.ts +17 -0
  123. package/dist/parser/types.d.ts +7 -1
  124. package/dist/reference/index.js +91 -0
  125. package/dist/reference/index.mjs +91 -0
  126. package/dist/registry/index.js +12867 -5876
  127. package/dist/registry/index.mjs +12867 -5876
  128. package/dist/registry/universal-types.d.ts +2 -1
  129. package/dist/runtime/command-adapter.d.ts +23 -16
  130. package/dist/runtime/plugin.d.ts +14 -0
  131. package/dist/runtime/runtime-base.d.ts +32 -7
  132. package/dist/runtime/runtime-factory.d.ts +3 -3
  133. package/dist/runtime/runtime.d.ts +2 -2
  134. package/dist/test-setup.d.ts +1 -0
  135. package/dist/types/base-types.d.ts +3 -0
  136. package/dist/types/feature-types.d.ts +1 -1
  137. package/dist/types/index.d.ts +2 -2
  138. package/package.json +29 -23
  139. package/vocab/htmx/ar.js +60 -0
  140. package/vocab/htmx/bn.js +49 -0
  141. package/vocab/htmx/de.js +60 -0
  142. package/vocab/htmx/en.js +21 -0
  143. package/vocab/htmx/es.js +60 -0
  144. package/vocab/htmx/fr.js +59 -0
  145. package/vocab/htmx/he.js +40 -0
  146. package/vocab/htmx/hi.js +60 -0
  147. package/vocab/htmx/id.js +57 -0
  148. package/vocab/htmx/it.js +58 -0
  149. package/vocab/htmx/ja.js +60 -0
  150. package/vocab/htmx/ko.js +60 -0
  151. package/vocab/htmx/ms.js +35 -0
  152. package/vocab/htmx/pl.js +60 -0
  153. package/vocab/htmx/pt.js +60 -0
  154. package/vocab/htmx/qu.js +60 -0
  155. package/vocab/htmx/ru.js +60 -0
  156. package/vocab/htmx/sw.js +59 -0
  157. package/vocab/htmx/th.js +49 -0
  158. package/vocab/htmx/tl.js +33 -0
  159. package/vocab/htmx/tr.js +60 -0
  160. package/vocab/htmx/uk.js +60 -0
  161. package/vocab/htmx/vi.js +51 -0
  162. package/vocab/htmx/zh.js +60 -0
  163. package/dist/bundles/test-minimal.d.ts +0 -3
  164. package/dist/bundles/test-standard.d.ts +0 -3
  165. package/dist/chunks/bridge-Clbh_xAj.js +0 -2
  166. package/dist/chunks/browser-modular-DIOxQqhV.js +0 -2
  167. package/dist/chunks/feature-eventsource-B5F2-H1r.js +0 -2
  168. package/dist/chunks/feature-webworker-3bAp0ac9.js +0 -2
  169. package/dist/chunks/index-DcxoRUBe.js +0 -2
  170. package/dist/compatibility/browser-bundle-minimal.d.ts +0 -8
  171. package/dist/compatibility/browser-bundle-standard.d.ts +0 -8
  172. package/dist/compatibility/hyperscript-tests/test-adapter.d.ts +0 -13
  173. package/dist/core/base-expression-evaluator.d.ts +0 -74
  174. package/dist/core/binary-expression-evaluator.d.ts +0 -7
  175. package/dist/core/call-expression-evaluator.d.ts +0 -7
  176. package/dist/core/configurable-expression-evaluator.d.ts +0 -5
  177. package/dist/core/lazy-expression-evaluator.d.ts +0 -22
  178. package/dist/core/parser.d.ts +0 -21
  179. package/dist/core/selector-evaluator.d.ts +0 -15
  180. package/dist/core/template-literal-evaluator.d.ts +0 -5
  181. package/dist/expressions/comparison/index.d.ts +0 -80
  182. package/dist/expressions/comparison/utils.d.ts +0 -2
  183. package/dist/expressions/conversion/impl/bridge.d.ts +0 -117
  184. package/dist/expressions/logical/impl/pattern-matching.d.ts +0 -58
  185. package/dist/expressions/positional/impl/bridge.d.ts +0 -95
  186. package/dist/expressions/property/index.d.ts +0 -55
  187. package/dist/expressions/references/impl/bridge.d.ts +0 -54
  188. package/dist/extensions/index.d.ts +0 -3
  189. package/dist/extensions/tailwind.d.ts +0 -22
  190. package/dist/mod.d.ts +0 -63
  191. package/dist/parser/expression-parser.d.ts +0 -6
  192. package/dist/runtime/runtime-experimental.d.ts +0 -18
  193. package/dist/scripts/code-generator.d.ts +0 -64
  194. package/dist/scripts/generate-missing-commands.d.ts +0 -4
@@ -19,7 +19,7 @@ export interface ParseToASTResult {
19
19
  warnings?: string[];
20
20
  }
21
21
  export declare class SemanticGrammarBridge {
22
- private analyzer;
22
+ private _initialized;
23
23
  private config;
24
24
  constructor(config?: BridgeConfig);
25
25
  initialize(): Promise<void>;
@@ -2,6 +2,75 @@
2
2
 
3
3
  var semantic = require('@lokascript/semantic');
4
4
 
5
+ function checkDebugEnabled() {
6
+ if (typeof localStorage !== 'undefined') {
7
+ try {
8
+ const ls = localStorage;
9
+ const setting = ls.getItem('hyperfixi:debug') || ls.getItem('lokascript:debug');
10
+ if (setting === '*' || setting === 'true')
11
+ return true;
12
+ }
13
+ catch {
14
+ }
15
+ }
16
+ if (typeof window !== 'undefined' && window.__HYPERFIXI_DEBUG__) {
17
+ return true;
18
+ }
19
+ if (typeof process !== 'undefined' && process.env?.HYPERFIXI_DEBUG === 'true') {
20
+ return true;
21
+ }
22
+ return false;
23
+ }
24
+ const isDebugEnabled = checkDebugEnabled();
25
+ const DEBUG = {
26
+ commands: isDebugEnabled,
27
+ events: isDebugEnabled,
28
+ parsing: isDebugEnabled,
29
+ expressions: isDebugEnabled,
30
+ styles: isDebugEnabled,
31
+ runtime: isDebugEnabled,
32
+ loops: isDebugEnabled,
33
+ async: isDebugEnabled,
34
+ };
35
+ const debug = {
36
+ command: (...args) => {
37
+ if (DEBUG.commands)
38
+ console.log('🔧', ...args);
39
+ },
40
+ event: (...args) => {
41
+ if (DEBUG.events)
42
+ console.log('🎯', ...args);
43
+ },
44
+ parse: (...args) => {
45
+ if (DEBUG.parsing)
46
+ console.log('📝', ...args);
47
+ },
48
+ expr: (...args) => {
49
+ if (DEBUG.expressions)
50
+ console.log('🔍', ...args);
51
+ },
52
+ expressions: (...args) => {
53
+ if (DEBUG.expressions)
54
+ console.log('🔍', ...args);
55
+ },
56
+ style: (...args) => {
57
+ if (DEBUG.styles)
58
+ console.log('🎨', ...args);
59
+ },
60
+ runtime: (...args) => {
61
+ if (DEBUG.runtime)
62
+ console.log('🚀', ...args);
63
+ },
64
+ loop: (...args) => {
65
+ if (DEBUG.loops)
66
+ console.log('🔁', ...args);
67
+ },
68
+ async: (...args) => {
69
+ if (DEBUG.async)
70
+ console.log('⏳', ...args);
71
+ },
72
+ };
73
+
5
74
  let _semanticModule = null;
6
75
  async function getSemanticModule() {
7
76
  if (!_semanticModule) {
@@ -11,18 +80,18 @@ async function getSemanticModule() {
11
80
  }
12
81
  class SemanticGrammarBridge {
13
82
  constructor(config = {}) {
14
- this.analyzer = null;
83
+ this._initialized = false;
15
84
  this.config = {
16
85
  confidenceThreshold: config.confidenceThreshold ?? semantic.DEFAULT_CONFIDENCE_THRESHOLD,
17
86
  fallbackOnLowConfidence: config.fallbackOnLowConfidence ?? true,
18
87
  };
19
88
  }
20
89
  async initialize() {
21
- const semantic = await getSemanticModule();
22
- this.analyzer = semantic.createSemanticAnalyzer();
90
+ await getSemanticModule();
91
+ this._initialized = true;
23
92
  }
24
93
  isInitialized() {
25
- return this.analyzer !== null;
94
+ return this._initialized;
26
95
  }
27
96
  async transform(input, sourceLang, targetLang) {
28
97
  if (!this.isInitialized()) {
@@ -64,9 +133,8 @@ class SemanticGrammarBridge {
64
133
  if (!this.isInitialized()) {
65
134
  await this.initialize();
66
135
  }
67
- if (!this.analyzer)
68
- return null;
69
- const result = this.analyzer.analyze(input, lang);
136
+ const semantic = await getSemanticModule();
137
+ const result = semantic.parseSemantic(input, lang);
70
138
  return result.node ?? null;
71
139
  }
72
140
  async render(node, targetLang) {
@@ -77,17 +145,15 @@ class SemanticGrammarBridge {
77
145
  if (!this.isInitialized()) {
78
146
  await this.initialize();
79
147
  }
80
- if (!this.analyzer)
81
- return null;
82
- const result = this.analyzer.analyze(input, lang);
148
+ const semantic = await getSemanticModule();
149
+ const result = semantic.parseSemantic(input, lang);
83
150
  if (result.confidence >= this.config.confidenceThreshold && result.node) {
84
- const semantic = await getSemanticModule();
85
151
  try {
86
152
  const buildResult = semantic.buildAST(result.node);
87
153
  return buildResult.ast;
88
154
  }
89
155
  catch (error) {
90
- console.warn('[SemanticGrammarBridge] AST build failed, using fallback:', error);
156
+ debug.runtime('[SemanticGrammarBridge] AST build failed, using fallback:', error);
91
157
  }
92
158
  }
93
159
  return null;
@@ -96,17 +162,8 @@ class SemanticGrammarBridge {
96
162
  if (!this.isInitialized()) {
97
163
  await this.initialize();
98
164
  }
99
- if (!this.analyzer) {
100
- return {
101
- ast: null,
102
- usedDirectPath: false,
103
- confidence: 0,
104
- lang,
105
- fallbackText: null,
106
- };
107
- }
108
- const result = this.analyzer.analyze(input, lang);
109
165
  const semantic = await getSemanticModule();
166
+ const result = semantic.parseSemantic(input, lang);
110
167
  if (result.confidence >= this.config.confidenceThreshold && result.node) {
111
168
  try {
112
169
  const buildResult = semantic.buildAST(result.node);
@@ -1,5 +1,74 @@
1
1
  import { DEFAULT_CONFIDENCE_THRESHOLD } from '@lokascript/semantic';
2
2
 
3
+ function checkDebugEnabled() {
4
+ if (typeof localStorage !== 'undefined') {
5
+ try {
6
+ const ls = localStorage;
7
+ const setting = ls.getItem('hyperfixi:debug') || ls.getItem('lokascript:debug');
8
+ if (setting === '*' || setting === 'true')
9
+ return true;
10
+ }
11
+ catch {
12
+ }
13
+ }
14
+ if (typeof window !== 'undefined' && window.__HYPERFIXI_DEBUG__) {
15
+ return true;
16
+ }
17
+ if (typeof process !== 'undefined' && process.env?.HYPERFIXI_DEBUG === 'true') {
18
+ return true;
19
+ }
20
+ return false;
21
+ }
22
+ const isDebugEnabled = checkDebugEnabled();
23
+ const DEBUG = {
24
+ commands: isDebugEnabled,
25
+ events: isDebugEnabled,
26
+ parsing: isDebugEnabled,
27
+ expressions: isDebugEnabled,
28
+ styles: isDebugEnabled,
29
+ runtime: isDebugEnabled,
30
+ loops: isDebugEnabled,
31
+ async: isDebugEnabled,
32
+ };
33
+ const debug = {
34
+ command: (...args) => {
35
+ if (DEBUG.commands)
36
+ console.log('🔧', ...args);
37
+ },
38
+ event: (...args) => {
39
+ if (DEBUG.events)
40
+ console.log('🎯', ...args);
41
+ },
42
+ parse: (...args) => {
43
+ if (DEBUG.parsing)
44
+ console.log('📝', ...args);
45
+ },
46
+ expr: (...args) => {
47
+ if (DEBUG.expressions)
48
+ console.log('🔍', ...args);
49
+ },
50
+ expressions: (...args) => {
51
+ if (DEBUG.expressions)
52
+ console.log('🔍', ...args);
53
+ },
54
+ style: (...args) => {
55
+ if (DEBUG.styles)
56
+ console.log('🎨', ...args);
57
+ },
58
+ runtime: (...args) => {
59
+ if (DEBUG.runtime)
60
+ console.log('🚀', ...args);
61
+ },
62
+ loop: (...args) => {
63
+ if (DEBUG.loops)
64
+ console.log('🔁', ...args);
65
+ },
66
+ async: (...args) => {
67
+ if (DEBUG.async)
68
+ console.log('⏳', ...args);
69
+ },
70
+ };
71
+
3
72
  let _semanticModule = null;
4
73
  async function getSemanticModule() {
5
74
  if (!_semanticModule) {
@@ -9,18 +78,18 @@ async function getSemanticModule() {
9
78
  }
10
79
  class SemanticGrammarBridge {
11
80
  constructor(config = {}) {
12
- this.analyzer = null;
81
+ this._initialized = false;
13
82
  this.config = {
14
83
  confidenceThreshold: config.confidenceThreshold ?? DEFAULT_CONFIDENCE_THRESHOLD,
15
84
  fallbackOnLowConfidence: config.fallbackOnLowConfidence ?? true,
16
85
  };
17
86
  }
18
87
  async initialize() {
19
- const semantic = await getSemanticModule();
20
- this.analyzer = semantic.createSemanticAnalyzer();
88
+ await getSemanticModule();
89
+ this._initialized = true;
21
90
  }
22
91
  isInitialized() {
23
- return this.analyzer !== null;
92
+ return this._initialized;
24
93
  }
25
94
  async transform(input, sourceLang, targetLang) {
26
95
  if (!this.isInitialized()) {
@@ -62,9 +131,8 @@ class SemanticGrammarBridge {
62
131
  if (!this.isInitialized()) {
63
132
  await this.initialize();
64
133
  }
65
- if (!this.analyzer)
66
- return null;
67
- const result = this.analyzer.analyze(input, lang);
134
+ const semantic = await getSemanticModule();
135
+ const result = semantic.parseSemantic(input, lang);
68
136
  return result.node ?? null;
69
137
  }
70
138
  async render(node, targetLang) {
@@ -75,17 +143,15 @@ class SemanticGrammarBridge {
75
143
  if (!this.isInitialized()) {
76
144
  await this.initialize();
77
145
  }
78
- if (!this.analyzer)
79
- return null;
80
- const result = this.analyzer.analyze(input, lang);
146
+ const semantic = await getSemanticModule();
147
+ const result = semantic.parseSemantic(input, lang);
81
148
  if (result.confidence >= this.config.confidenceThreshold && result.node) {
82
- const semantic = await getSemanticModule();
83
149
  try {
84
150
  const buildResult = semantic.buildAST(result.node);
85
151
  return buildResult.ast;
86
152
  }
87
153
  catch (error) {
88
- console.warn('[SemanticGrammarBridge] AST build failed, using fallback:', error);
154
+ debug.runtime('[SemanticGrammarBridge] AST build failed, using fallback:', error);
89
155
  }
90
156
  }
91
157
  return null;
@@ -94,17 +160,8 @@ class SemanticGrammarBridge {
94
160
  if (!this.isInitialized()) {
95
161
  await this.initialize();
96
162
  }
97
- if (!this.analyzer) {
98
- return {
99
- ast: null,
100
- usedDirectPath: false,
101
- confidence: 0,
102
- lang,
103
- fallbackText: null,
104
- };
105
- }
106
- const result = this.analyzer.analyze(input, lang);
107
163
  const semantic = await getSemanticModule();
164
+ const result = semantic.parseSemantic(input, lang);
108
165
  if (result.confidence >= this.config.confidenceThreshold && result.node) {
109
166
  try {
110
167
  const buildResult = semantic.buildAST(result.node);
@@ -2,4 +2,5 @@ import type { ParserContext, IdentifierNode } from '../parser-types';
2
2
  import type { Token } from '../../types/core';
3
3
  export declare function parseMeasureCommand(ctx: ParserContext, identifierNode: IdentifierNode): import("../../types/core").CommandNode;
4
4
  export declare function parseTransitionCommand(ctx: ParserContext, commandToken: Token): import("../../types/core").CommandNode;
5
+ export declare function parseStartCommand(ctx: ParserContext, identifierNode: IdentifierNode): import('../../types/core').CommandNode;
5
6
  //# sourceMappingURL=animation-commands.d.ts.map
@@ -6,4 +6,5 @@ export declare function parseMultiWordCommand(ctx: ParserContext, commandToken:
6
6
  export declare function parseFetchCommand(ctx: ParserContext, commandToken: Token): CommandNode;
7
7
  export declare function parseJsCommand(ctx: ParserContext, identifierNode: IdentifierNode): CommandNode;
8
8
  export declare function parseTellCommand(ctx: ParserContext, identifierNode: IdentifierNode): CommandNode;
9
+ export declare function parsePickCommand(ctx: ParserContext, identifierNode: IdentifierNode): CommandNode;
9
10
  //# sourceMappingURL=utility-commands.d.ts.map
@@ -0,0 +1,51 @@
1
+ import type { BindingPowerEntry, InfixHandler, PrefixHandler } from './pratt-parser';
2
+ import type { ASTNode, ExecutionContext } from '../types/base-types';
3
+ import type { Token } from '../types/core';
4
+ import type { ParserContext } from './parser-types';
5
+ export type FeatureParseFn = (ctx: ParserContext, token: Token) => ASTNode | null;
6
+ export type NodeEvaluatorFn = (node: ASTNode, context: ExecutionContext) => unknown | Promise<unknown>;
7
+ export type GlobalWriteHook = (name: string, value: unknown, context: ExecutionContext) => void;
8
+ export type GlobalReadHook = (name: string, context: ExecutionContext) => void;
9
+ export type LocalWriteHook = (name: string, value: unknown, context: ExecutionContext) => void;
10
+ export type LocalReadHook = (name: string, context: ExecutionContext) => void;
11
+ export type NodeWriterFn = (node: ASTNode, value: unknown, context: ExecutionContext) => void | Promise<void>;
12
+ export declare function getRegisteredFeature(name: string): FeatureParseFn | undefined;
13
+ export declare function getRegisteredNodeEvaluator(type: string): NodeEvaluatorFn | undefined;
14
+ export declare function getRegisteredNodeWriter(type: string): NodeWriterFn | undefined;
15
+ export declare function getGlobalWriteHooks(): Iterable<GlobalWriteHook>;
16
+ export declare function notifyGlobalRead(name: string, context: ExecutionContext): void;
17
+ export declare function getLocalWriteHooks(): Iterable<LocalWriteHook>;
18
+ export declare function notifyLocalWrite(name: string, value: unknown, context: ExecutionContext): void;
19
+ export declare function notifyLocalRead(name: string, context: ExecutionContext): void;
20
+ export interface ParserExtensionSnapshot {
21
+ commands: string[];
22
+ operators: string[];
23
+ prattEntries: Array<[string, BindingPowerEntry]>;
24
+ features: Array<[string, FeatureParseFn]>;
25
+ nodeEvaluators: Array<[string, NodeEvaluatorFn]>;
26
+ nodeWriters: Array<[string, NodeWriterFn]>;
27
+ globalWriteHooks: GlobalWriteHook[];
28
+ globalReadHooks: GlobalReadHook[];
29
+ localWriteHooks: LocalWriteHook[];
30
+ localReadHooks: LocalReadHook[];
31
+ }
32
+ export declare class ParserExtensionRegistry {
33
+ registerCommand(name: string): void;
34
+ registerCompoundOperator(token: string): void;
35
+ registerInfixOperator(token: string, leftBp: number, rightBp: number, handler: InfixHandler): void;
36
+ registerPrefixOperator(token: string, bp: number, handler: PrefixHandler): void;
37
+ hasCommand(name: string): boolean;
38
+ registerFeature(keyword: string, parseFn: FeatureParseFn): void;
39
+ hasFeature(name: string): boolean;
40
+ registerNodeEvaluator(nodeType: string, fn: NodeEvaluatorFn): void;
41
+ registerNodeWriter(nodeType: string, fn: NodeWriterFn): void;
42
+ registerGlobalWriteHook(hook: GlobalWriteHook): () => void;
43
+ registerGlobalReadHook(hook: GlobalReadHook): () => void;
44
+ registerLocalWriteHook(hook: LocalWriteHook): () => void;
45
+ registerLocalReadHook(hook: LocalReadHook): () => void;
46
+ snapshot(): ParserExtensionSnapshot;
47
+ restore(snapshot: ParserExtensionSnapshot): void;
48
+ }
49
+ export declare function getParserExtensionRegistry(): ParserExtensionRegistry;
50
+ export declare function setGlobal(context: ExecutionContext, name: string, value: unknown): void;
51
+ //# sourceMappingURL=extensions.d.ts.map