@hyperfixi/core 2.9.0 → 2.9.2

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 (65) hide show
  1. package/dist/ast-utils/index.js +905 -882
  2. package/dist/ast-utils/index.mjs +905 -882
  3. package/dist/bundle-generator/index.js +6 -0
  4. package/dist/bundle-generator/index.mjs +6 -0
  5. package/dist/bundle-generator/parser-templates.d.ts +1 -1
  6. package/dist/chunks/{bridge-D9JLmPkk.js → bridge-DwtNLKK3.js} +2 -2
  7. package/dist/chunks/browser-modular-6HT1r2AH.js +2 -0
  8. package/dist/chunks/feature-eventsource-Bxg_UNZo.js +2 -0
  9. package/dist/chunks/feature-sockets-CcTxD5sT.js +2 -0
  10. package/dist/chunks/feature-webworker-DoqZ0Grg.js +2 -0
  11. package/dist/chunks/{index-6DUg7Qjm.js → index-B8jwvuj_.js} +2 -2
  12. package/dist/commands/index.js +299 -184
  13. package/dist/commands/index.mjs +299 -184
  14. package/dist/hyperfixi-browser-classic-i18n.js +1 -1
  15. package/dist/hyperfixi-browser-minimal.js +1 -1
  16. package/dist/hyperfixi-browser-standard.js +1 -1
  17. package/dist/hyperfixi-browser.js +1 -1
  18. package/dist/hyperfixi-classic-i18n.js +1 -1
  19. package/dist/hyperfixi-hx-v4.js +1 -1
  20. package/dist/hyperfixi-hx.js +1 -1
  21. package/dist/hyperfixi-hybrid-complete.js +1 -1
  22. package/dist/hyperfixi-hybrid-hx.js +1 -1
  23. package/dist/hyperfixi-minimal.js +1 -1
  24. package/dist/hyperfixi-multilingual.js +1 -1
  25. package/dist/hyperfixi-standard.js +1 -1
  26. package/dist/hyperfixi.js +1 -1
  27. package/dist/hyperfixi.mjs +1 -1
  28. package/dist/index.js +1731 -1474
  29. package/dist/index.min.js +1 -1
  30. package/dist/index.mjs +1731 -1474
  31. package/dist/lokascript-browser-classic-i18n.js +1 -1
  32. package/dist/lokascript-browser-minimal.js +1 -1
  33. package/dist/lokascript-browser-standard.js +1 -1
  34. package/dist/lokascript-browser.js +1 -1
  35. package/dist/lokascript-hybrid-complete.js +1 -1
  36. package/dist/lokascript-hybrid-hx.js +1 -1
  37. package/dist/lokascript-multilingual.js +1 -1
  38. package/dist/lsp-metadata.js +5 -5
  39. package/dist/lsp-metadata.mjs +5 -5
  40. package/dist/metadata.js +25 -25
  41. package/dist/metadata.mjs +25 -25
  42. package/dist/multilingual/index.js +17 -17
  43. package/dist/multilingual/index.mjs +17 -17
  44. package/dist/parser/command-parsers/utility-commands.d.ts +2 -1
  45. package/dist/parser/full-parser.js +286 -178
  46. package/dist/parser/full-parser.mjs +286 -178
  47. package/dist/parser/hybrid/index.js +3 -0
  48. package/dist/parser/hybrid/index.mjs +3 -0
  49. package/dist/parser/hybrid/parser-core.js +3 -0
  50. package/dist/parser/hybrid/parser-core.mjs +3 -0
  51. package/dist/parser/hybrid-parser.js +3 -0
  52. package/dist/parser/hybrid-parser.mjs +3 -0
  53. package/dist/parser/parser.d.ts +1 -0
  54. package/dist/reference/index.js +2 -0
  55. package/dist/reference/index.mjs +2 -0
  56. package/dist/registry/index.js +286 -178
  57. package/dist/registry/index.mjs +286 -178
  58. package/dist/runtime/runtime-base.d.ts +2 -1
  59. package/dist/types/base-types.d.ts +3 -0
  60. package/dist/types/core.d.ts +1 -0
  61. package/package.json +6 -6
  62. package/dist/chunks/browser-modular-CPiVQXM0.js +0 -2
  63. package/dist/chunks/feature-eventsource-BpZvPy_K.js +0 -2
  64. package/dist/chunks/feature-sockets-CrYvjZ4j.js +0 -2
  65. package/dist/chunks/feature-webworker-BSYguEIW.js +0 -2
@@ -1,4 +1,4 @@
1
- import type { ASTNode, ExecutionContext, CommandNode, EventHandlerNode } from '../types/base-types';
1
+ import type { ASTNode, ExecutionContext, CommandNode, EventHandlerNode, DefNode } from '../types/base-types';
2
2
  import type { ExecutionResult, ExecutionSignal, ControlFlowError } from '../types/result';
3
3
  import type { RuntimeHooks } from '../types/hooks';
4
4
  import { HookRegistry } from '../types/hooks';
@@ -73,6 +73,7 @@ export declare class RuntimeBase {
73
73
  protected evaluateExpression(node: ASTNode, context: ExecutionContext): Promise<unknown>;
74
74
  protected evaluateExpressionWithResult(node: ASTNode, context: ExecutionContext): Promise<ExecutionResult<unknown>>;
75
75
  protected executeCommandFromPattern(commandName: string, selector: string, context: ExecutionContext): Promise<unknown>;
76
+ protected installFunction(node: DefNode, context: ExecutionContext): void;
76
77
  protected executeProgram(node: ASTNode & {
77
78
  statements?: ASTNode[];
78
79
  }, context: ExecutionContext): Promise<unknown>;
@@ -304,6 +304,9 @@ export interface EventHandlerNode extends ASTNode {
304
304
  readonly args?: string[];
305
305
  readonly commands: ASTNode[];
306
306
  readonly customEventSource?: string;
307
+ readonly errorSymbol?: string;
308
+ readonly errorHandler?: ASTNode[];
309
+ readonly finallyHandler?: ASTNode[];
307
310
  readonly modifiers?: {
308
311
  once?: boolean;
309
312
  prevent?: boolean;
@@ -120,6 +120,7 @@ export interface ParseResult<T = ASTNode> {
120
120
  ast?: T;
121
121
  error?: ParseError;
122
122
  errors?: ParseError[];
123
+ recovered?: boolean;
123
124
  warnings?: ParseWarning[];
124
125
  tokens: Token[];
125
126
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperfixi/core",
3
- "version": "2.9.0",
3
+ "version": "2.9.2",
4
4
  "description": "Multilingual, tree-shakeable hyperscript",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -187,7 +187,7 @@
187
187
  "build:browser:multilingual": "rollup -c rollup.browser-multilingual.config.mjs",
188
188
  "build:browser:semantic-complete": "rollup -c rollup.browser-semantic-complete.config.mjs",
189
189
  "build:browser:all": "npm run build:browser:dev && npm run build:browser:prod && npm run build:browser:llm && npm run build:browser:lite && npm run build:browser:minimal && npm run build:browser:standard && npm run build:browser:classic && npm run build:browser:classic-i18n && npm run build:browser:multilingual && npm run build:browser:semantic-complete",
190
- "build:browser:modular": "rollup -c rollup.browser-modular.config.mjs",
190
+ "build:browser:modular": "rm -rf dist/chunks && rollup -c rollup.browser-modular.config.mjs",
191
191
  "build:parser-modules": "rollup -c rollup.parser-modules.config.mjs",
192
192
  "snapshot:bundle-size": "node scripts/bundle-size-snapshot.mjs --check",
193
193
  "snapshot:bundle-size:update": "node scripts/bundle-size-snapshot.mjs --update",
@@ -279,14 +279,14 @@
279
279
  "access": "public"
280
280
  },
281
281
  "dependencies": {
282
- "@lokascript/intent": "^2.9.0",
283
- "@lokascript/semantic": "^2.9.0",
282
+ "@lokascript/intent": "^2.9.2",
283
+ "@lokascript/semantic": "^2.9.2",
284
284
  "morphlex": "^1.4.0",
285
285
  "tslib": "^2.8.1"
286
286
  },
287
287
  "peerDependencies": {
288
- "@hyperfixi/patterns-reference": "^2.9.0",
289
- "@lokascript/framework": "^2.9.0"
288
+ "@hyperfixi/patterns-reference": "^2.9.2",
289
+ "@lokascript/framework": "^2.9.2"
290
290
  },
291
291
  "peerDependenciesMeta": {
292
292
  "@hyperfixi/patterns-reference": {