@holoscript/core 2.0.0 → 2.0.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 (137) hide show
  1. package/LICENSE +21 -0
  2. package/dist/chunk-3N67RLQP.cjs +1298 -0
  3. package/dist/chunk-3N67RLQP.cjs.map +1 -0
  4. package/dist/chunk-3X2EGU7Z.cjs +52 -0
  5. package/dist/chunk-3X2EGU7Z.cjs.map +1 -0
  6. package/dist/chunk-4CV4JOE5.js +24 -0
  7. package/dist/chunk-4CV4JOE5.js.map +1 -0
  8. package/dist/chunk-4OHVW4XR.cjs +1027 -0
  9. package/dist/chunk-4OHVW4XR.cjs.map +1 -0
  10. package/dist/chunk-CZLDE2OZ.cjs +28 -0
  11. package/dist/chunk-CZLDE2OZ.cjs.map +1 -0
  12. package/{src/HoloScriptRuntime.ts → dist/chunk-EU6CZMGJ.js} +437 -794
  13. package/dist/chunk-EU6CZMGJ.js.map +1 -0
  14. package/dist/chunk-KWYIVRIH.js +344 -0
  15. package/dist/chunk-KWYIVRIH.js.map +1 -0
  16. package/dist/chunk-MCP6D4LT.js +1025 -0
  17. package/dist/chunk-MCP6D4LT.js.map +1 -0
  18. package/dist/chunk-SATNCODL.js +45 -0
  19. package/dist/chunk-SATNCODL.js.map +1 -0
  20. package/dist/chunk-VMZN4EVR.cjs +347 -0
  21. package/dist/chunk-VMZN4EVR.cjs.map +1 -0
  22. package/{src/HoloScriptDebugger.ts → dist/chunk-VYIDLUCV.js} +118 -257
  23. package/dist/chunk-VYIDLUCV.js.map +1 -0
  24. package/dist/chunk-WFI4T3XB.cjs +424 -0
  25. package/dist/chunk-WFI4T3XB.cjs.map +1 -0
  26. package/dist/debugger.cjs +20 -0
  27. package/dist/debugger.cjs.map +1 -0
  28. package/dist/debugger.d.cts +171 -0
  29. package/dist/debugger.d.ts +171 -0
  30. package/dist/debugger.js +7 -0
  31. package/dist/debugger.js.map +1 -0
  32. package/dist/index.cjs +6006 -0
  33. package/dist/index.cjs.map +1 -0
  34. package/dist/index.d.cts +2482 -0
  35. package/dist/index.d.ts +2482 -0
  36. package/dist/index.js +5926 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/parser.cjs +14 -0
  39. package/dist/parser.cjs.map +1 -0
  40. package/dist/parser.d.cts +139 -0
  41. package/dist/parser.d.ts +139 -0
  42. package/dist/parser.js +5 -0
  43. package/dist/parser.js.map +1 -0
  44. package/dist/runtime.cjs +14 -0
  45. package/dist/runtime.cjs.map +1 -0
  46. package/dist/runtime.d.cts +180 -0
  47. package/dist/runtime.d.ts +180 -0
  48. package/dist/runtime.js +5 -0
  49. package/dist/runtime.js.map +1 -0
  50. package/dist/type-checker.cjs +17 -0
  51. package/dist/type-checker.cjs.map +1 -0
  52. package/dist/type-checker.d.cts +105 -0
  53. package/dist/type-checker.d.ts +105 -0
  54. package/dist/type-checker.js +4 -0
  55. package/dist/type-checker.js.map +1 -0
  56. package/dist/types-D6g4ACjP.d.cts +262 -0
  57. package/dist/types-D6g4ACjP.d.ts +262 -0
  58. package/package.json +11 -8
  59. package/src/HoloScript2DParser.js +0 -227
  60. package/src/HoloScript2DParser.ts +0 -261
  61. package/src/HoloScriptCodeParser.js +0 -1102
  62. package/src/HoloScriptCodeParser.ts +0 -1188
  63. package/src/HoloScriptDebugger.js +0 -458
  64. package/src/HoloScriptParser.js +0 -338
  65. package/src/HoloScriptParser.ts +0 -397
  66. package/src/HoloScriptPlusParser.js +0 -371
  67. package/src/HoloScriptPlusParser.ts +0 -543
  68. package/src/HoloScriptRuntime.js +0 -1399
  69. package/src/HoloScriptRuntime.test.js +0 -351
  70. package/src/HoloScriptRuntime.test.ts +0 -436
  71. package/src/HoloScriptTypeChecker.js +0 -356
  72. package/src/HoloScriptTypeChecker.ts +0 -475
  73. package/src/__tests__/GraphicsServices.test.js +0 -357
  74. package/src/__tests__/GraphicsServices.test.ts +0 -427
  75. package/src/__tests__/HoloScriptPlusParser.test.js +0 -317
  76. package/src/__tests__/HoloScriptPlusParser.test.ts +0 -392
  77. package/src/__tests__/integration.test.js +0 -336
  78. package/src/__tests__/integration.test.ts +0 -416
  79. package/src/__tests__/performance.bench.js +0 -218
  80. package/src/__tests__/performance.bench.ts +0 -262
  81. package/src/__tests__/type-checker.test.js +0 -60
  82. package/src/__tests__/type-checker.test.ts +0 -73
  83. package/src/index.js +0 -217
  84. package/src/index.ts +0 -426
  85. package/src/interop/Interoperability.js +0 -413
  86. package/src/interop/Interoperability.ts +0 -494
  87. package/src/logger.js +0 -42
  88. package/src/logger.ts +0 -57
  89. package/src/parser/EnhancedParser.js +0 -205
  90. package/src/parser/EnhancedParser.ts +0 -251
  91. package/src/parser/HoloScriptPlusParser.js +0 -928
  92. package/src/parser/HoloScriptPlusParser.ts +0 -1089
  93. package/src/runtime/HoloScriptPlusRuntime.js +0 -674
  94. package/src/runtime/HoloScriptPlusRuntime.ts +0 -861
  95. package/src/runtime/PerformanceTelemetry.js +0 -323
  96. package/src/runtime/PerformanceTelemetry.ts +0 -467
  97. package/src/runtime/RuntimeOptimization.js +0 -361
  98. package/src/runtime/RuntimeOptimization.ts +0 -416
  99. package/src/services/HololandGraphicsPipelineService.js +0 -506
  100. package/src/services/HololandGraphicsPipelineService.ts +0 -662
  101. package/src/services/PlatformPerformanceOptimizer.js +0 -356
  102. package/src/services/PlatformPerformanceOptimizer.ts +0 -503
  103. package/src/state/ReactiveState.js +0 -427
  104. package/src/state/ReactiveState.ts +0 -572
  105. package/src/tools/DeveloperExperience.js +0 -376
  106. package/src/tools/DeveloperExperience.ts +0 -438
  107. package/src/traits/AIDriverTrait.js +0 -322
  108. package/src/traits/AIDriverTrait.test.js +0 -329
  109. package/src/traits/AIDriverTrait.test.ts +0 -357
  110. package/src/traits/AIDriverTrait.ts +0 -474
  111. package/src/traits/LightingTrait.js +0 -313
  112. package/src/traits/LightingTrait.test.js +0 -410
  113. package/src/traits/LightingTrait.test.ts +0 -462
  114. package/src/traits/LightingTrait.ts +0 -505
  115. package/src/traits/MaterialTrait.js +0 -194
  116. package/src/traits/MaterialTrait.test.js +0 -286
  117. package/src/traits/MaterialTrait.test.ts +0 -329
  118. package/src/traits/MaterialTrait.ts +0 -324
  119. package/src/traits/RenderingTrait.js +0 -356
  120. package/src/traits/RenderingTrait.test.js +0 -363
  121. package/src/traits/RenderingTrait.test.ts +0 -427
  122. package/src/traits/RenderingTrait.ts +0 -555
  123. package/src/traits/VRTraitSystem.js +0 -740
  124. package/src/traits/VRTraitSystem.ts +0 -1040
  125. package/src/traits/VoiceInputTrait.js +0 -284
  126. package/src/traits/VoiceInputTrait.test.js +0 -226
  127. package/src/traits/VoiceInputTrait.test.ts +0 -252
  128. package/src/traits/VoiceInputTrait.ts +0 -401
  129. package/src/types/AdvancedTypeSystem.js +0 -226
  130. package/src/types/AdvancedTypeSystem.ts +0 -494
  131. package/src/types/HoloScriptPlus.d.ts +0 -853
  132. package/src/types.js +0 -6
  133. package/src/types.ts +0 -369
  134. package/tsconfig.json +0 -23
  135. package/tsup.config.d.ts +0 -2
  136. package/tsup.config.js +0 -18
  137. package/tsup.config.ts +0 -19
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var chunk4OHVW4XR_cjs = require('./chunk-4OHVW4XR.cjs');
4
+ require('./chunk-3X2EGU7Z.cjs');
5
+ require('./chunk-CZLDE2OZ.cjs');
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "HoloScriptCodeParser", {
10
+ enumerable: true,
11
+ get: function () { return chunk4OHVW4XR_cjs.HoloScriptCodeParser; }
12
+ });
13
+ //# sourceMappingURL=parser.cjs.map
14
+ //# sourceMappingURL=parser.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"parser.cjs"}
@@ -0,0 +1,139 @@
1
+ import { A as ASTNode } from './types-D6g4ACjP.cjs';
2
+
3
+ /**
4
+ * HoloScript Code Parser
5
+ *
6
+ * Parses HoloScript code strings into AST nodes that can be executed
7
+ * by the HoloScriptRuntime.
8
+ *
9
+ * Syntax Reference:
10
+ * - orb <name> { properties }
11
+ * - function <name>(<params>): <return> { body }
12
+ * - connect <from> to <to> [as <type>]
13
+ * - gate <name> { condition, true_path, false_path }
14
+ * - stream <name> from <source> { transformations }
15
+ */
16
+
17
+ interface ParseResult {
18
+ success: boolean;
19
+ ast: ASTNode[];
20
+ errors: ParseError[];
21
+ warnings: string[];
22
+ }
23
+ interface ParseError {
24
+ line: number;
25
+ column: number;
26
+ message: string;
27
+ }
28
+ declare class HoloScriptCodeParser {
29
+ private errors;
30
+ private warnings;
31
+ private tokens;
32
+ private position;
33
+ private keywordSet;
34
+ constructor();
35
+ /**
36
+ * Parse HoloScript code string into AST
37
+ */
38
+ parse(code: string): ParseResult;
39
+ /**
40
+ * Tokenize code into tokens
41
+ */
42
+ private tokenize;
43
+ /**
44
+ * Parse program (list of declarations)
45
+ */
46
+ private parseProgram;
47
+ /**
48
+ * Parse a single declaration
49
+ */
50
+ private parseDeclaration;
51
+ /**
52
+ * Parse for loop: for (init; condition; update) { body }
53
+ */
54
+ private parseForLoop;
55
+ /**
56
+ * Parse while loop: while (condition) { body }
57
+ */
58
+ private parseWhileLoop;
59
+ /**
60
+ * Parse forEach loop: forEach item in collection { body }
61
+ */
62
+ private parseForEachLoop;
63
+ /**
64
+ * Parse import: import { x, y } from "module"
65
+ */
66
+ private parseImport;
67
+ /**
68
+ * Parse export: export { x, y } or export function/orb
69
+ */
70
+ private parseExport;
71
+ /**
72
+ * Parse variable declaration: const/let/var name = value
73
+ */
74
+ private parseVariableDeclaration;
75
+ /**
76
+ * Parse orb declaration
77
+ */
78
+ private parseOrb;
79
+ /**
80
+ * Parse function declaration
81
+ */
82
+ private parseFunction;
83
+ /**
84
+ * Parse connection
85
+ */
86
+ private parseConnection;
87
+ /**
88
+ * Parse gate (conditional)
89
+ */
90
+ private parseGate;
91
+ /**
92
+ * Parse stream
93
+ */
94
+ private parseStream;
95
+ /**
96
+ * Parse nexus (multi-agent hub)
97
+ */
98
+ private parseNexus;
99
+ /**
100
+ * Parse building (class-like)
101
+ */
102
+ private parseBuilding;
103
+ /**
104
+ * Parse a property (key: value)
105
+ */
106
+ private parseProperty;
107
+ /**
108
+ * Parse array [...]
109
+ */
110
+ private parseArray;
111
+ /**
112
+ * Parse object {...}
113
+ */
114
+ private parseObject;
115
+ /**
116
+ * Parse position from value
117
+ */
118
+ private parsePosition;
119
+ private currentToken;
120
+ private advance;
121
+ private check;
122
+ private expect;
123
+ private expectIdentifier;
124
+ /**
125
+ * Parse animate command: animate target property: "..." from: 0 to: 1 duration: 1000
126
+ */
127
+ private parseAnimate;
128
+ /**
129
+ * Parse modify command: modify target { prop: value }
130
+ */
131
+ private parseModify;
132
+ /**
133
+ * Parse UI Element: ui2d dashboard#id { ... }
134
+ */
135
+ private parseUIElement;
136
+ private skipNewlines;
137
+ }
138
+
139
+ export { HoloScriptCodeParser, type ParseError, type ParseResult };
@@ -0,0 +1,139 @@
1
+ import { A as ASTNode } from './types-D6g4ACjP.js';
2
+
3
+ /**
4
+ * HoloScript Code Parser
5
+ *
6
+ * Parses HoloScript code strings into AST nodes that can be executed
7
+ * by the HoloScriptRuntime.
8
+ *
9
+ * Syntax Reference:
10
+ * - orb <name> { properties }
11
+ * - function <name>(<params>): <return> { body }
12
+ * - connect <from> to <to> [as <type>]
13
+ * - gate <name> { condition, true_path, false_path }
14
+ * - stream <name> from <source> { transformations }
15
+ */
16
+
17
+ interface ParseResult {
18
+ success: boolean;
19
+ ast: ASTNode[];
20
+ errors: ParseError[];
21
+ warnings: string[];
22
+ }
23
+ interface ParseError {
24
+ line: number;
25
+ column: number;
26
+ message: string;
27
+ }
28
+ declare class HoloScriptCodeParser {
29
+ private errors;
30
+ private warnings;
31
+ private tokens;
32
+ private position;
33
+ private keywordSet;
34
+ constructor();
35
+ /**
36
+ * Parse HoloScript code string into AST
37
+ */
38
+ parse(code: string): ParseResult;
39
+ /**
40
+ * Tokenize code into tokens
41
+ */
42
+ private tokenize;
43
+ /**
44
+ * Parse program (list of declarations)
45
+ */
46
+ private parseProgram;
47
+ /**
48
+ * Parse a single declaration
49
+ */
50
+ private parseDeclaration;
51
+ /**
52
+ * Parse for loop: for (init; condition; update) { body }
53
+ */
54
+ private parseForLoop;
55
+ /**
56
+ * Parse while loop: while (condition) { body }
57
+ */
58
+ private parseWhileLoop;
59
+ /**
60
+ * Parse forEach loop: forEach item in collection { body }
61
+ */
62
+ private parseForEachLoop;
63
+ /**
64
+ * Parse import: import { x, y } from "module"
65
+ */
66
+ private parseImport;
67
+ /**
68
+ * Parse export: export { x, y } or export function/orb
69
+ */
70
+ private parseExport;
71
+ /**
72
+ * Parse variable declaration: const/let/var name = value
73
+ */
74
+ private parseVariableDeclaration;
75
+ /**
76
+ * Parse orb declaration
77
+ */
78
+ private parseOrb;
79
+ /**
80
+ * Parse function declaration
81
+ */
82
+ private parseFunction;
83
+ /**
84
+ * Parse connection
85
+ */
86
+ private parseConnection;
87
+ /**
88
+ * Parse gate (conditional)
89
+ */
90
+ private parseGate;
91
+ /**
92
+ * Parse stream
93
+ */
94
+ private parseStream;
95
+ /**
96
+ * Parse nexus (multi-agent hub)
97
+ */
98
+ private parseNexus;
99
+ /**
100
+ * Parse building (class-like)
101
+ */
102
+ private parseBuilding;
103
+ /**
104
+ * Parse a property (key: value)
105
+ */
106
+ private parseProperty;
107
+ /**
108
+ * Parse array [...]
109
+ */
110
+ private parseArray;
111
+ /**
112
+ * Parse object {...}
113
+ */
114
+ private parseObject;
115
+ /**
116
+ * Parse position from value
117
+ */
118
+ private parsePosition;
119
+ private currentToken;
120
+ private advance;
121
+ private check;
122
+ private expect;
123
+ private expectIdentifier;
124
+ /**
125
+ * Parse animate command: animate target property: "..." from: 0 to: 1 duration: 1000
126
+ */
127
+ private parseAnimate;
128
+ /**
129
+ * Parse modify command: modify target { prop: value }
130
+ */
131
+ private parseModify;
132
+ /**
133
+ * Parse UI Element: ui2d dashboard#id { ... }
134
+ */
135
+ private parseUIElement;
136
+ private skipNewlines;
137
+ }
138
+
139
+ export { HoloScriptCodeParser, type ParseError, type ParseResult };
package/dist/parser.js ADDED
@@ -0,0 +1,5 @@
1
+ export { HoloScriptCodeParser } from './chunk-MCP6D4LT.js';
2
+ import './chunk-SATNCODL.js';
3
+ import './chunk-4CV4JOE5.js';
4
+ //# sourceMappingURL=parser.js.map
5
+ //# sourceMappingURL=parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"parser.js"}
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var chunk3N67RLQP_cjs = require('./chunk-3N67RLQP.cjs');
4
+ require('./chunk-3X2EGU7Z.cjs');
5
+ require('./chunk-CZLDE2OZ.cjs');
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "HoloScriptRuntime", {
10
+ enumerable: true,
11
+ get: function () { return chunk3N67RLQP_cjs.HoloScriptRuntime; }
12
+ });
13
+ //# sourceMappingURL=runtime.cjs.map
14
+ //# sourceMappingURL=runtime.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"runtime.cjs"}
@@ -0,0 +1,180 @@
1
+ import { v as ImportLoader, A as ASTNode, B as ExecutionResult, J as ParticleSystem, z as RuntimeContext, b as HologramProperties } from './types-D6g4ACjP.cjs';
2
+
3
+ /**
4
+ * HoloScript Runtime Engine
5
+ *
6
+ * Executes HoloScript AST in VR environment with spatial computation.
7
+ * Supports:
8
+ * - Orb creation and manipulation
9
+ * - Function definition and invocation with arguments
10
+ * - Connections and reactive data flow
11
+ * - Gates (conditionals)
12
+ * - Streams (data pipelines)
13
+ * - 2D UI elements
14
+ * - Built-in commands (show, hide, animate, pulse)
15
+ * - Expression evaluation
16
+ * - Event system
17
+ */
18
+
19
+ /**
20
+ * Event handler type
21
+ */
22
+ type EventHandler = (data?: unknown) => void | Promise<void>;
23
+ /**
24
+ * Animation state
25
+ */
26
+ interface Animation {
27
+ target: string;
28
+ property: string;
29
+ from: number;
30
+ to: number;
31
+ duration: number;
32
+ startTime: number;
33
+ easing: string;
34
+ loop?: boolean;
35
+ yoyo?: boolean;
36
+ }
37
+ /**
38
+ * UI Element state
39
+ */
40
+ interface UIElementState {
41
+ type: string;
42
+ name: string;
43
+ properties: Record<string, unknown>;
44
+ value?: unknown;
45
+ visible: boolean;
46
+ enabled: boolean;
47
+ }
48
+ declare class HoloScriptRuntime {
49
+ private context;
50
+ private particleSystems;
51
+ private executionHistory;
52
+ private startTime;
53
+ private nodeCount;
54
+ private currentScope;
55
+ private callStack;
56
+ private eventHandlers;
57
+ private animations;
58
+ private uiElements;
59
+ private builtinFunctions;
60
+ constructor(_importLoader?: ImportLoader);
61
+ /**
62
+ * Initialize built-in functions
63
+ */
64
+ private initBuiltins;
65
+ /**
66
+ * Execute a single AST node
67
+ */
68
+ executeNode(node: ASTNode): Promise<ExecutionResult>;
69
+ /**
70
+ * Execute multiple nodes in sequence
71
+ */
72
+ executeProgram(nodes: ASTNode[], depth?: number): Promise<ExecutionResult[]>;
73
+ /**
74
+ * Call a function with arguments
75
+ */
76
+ callFunction(name: string, args?: unknown[]): Promise<ExecutionResult>;
77
+ /**
78
+ * Set a variable in current scope
79
+ */
80
+ setVariable(name: string, value: unknown): void;
81
+ /**
82
+ * Get a variable from scope chain
83
+ */
84
+ getVariable(name: string): unknown;
85
+ /**
86
+ * Evaluate an expression
87
+ */
88
+ evaluateExpression(expr: string): unknown;
89
+ /**
90
+ * Split string by comma, respecting nesting
91
+ */
92
+ private splitByComma;
93
+ private executeOrb;
94
+ private executeFunction;
95
+ private executeConnection;
96
+ private executeGate;
97
+ private executeStream;
98
+ private executeCall;
99
+ private executeDebug;
100
+ private executeVisualize;
101
+ private executeUIElement;
102
+ /**
103
+ * Execute generic voice commands
104
+ * Handles commands like: show, hide, animate, pulse, create
105
+ */
106
+ private executeGeneric;
107
+ /**
108
+ * Execute 'show' command
109
+ */
110
+ private executeShowCommand;
111
+ /**
112
+ * Execute 'hide' command
113
+ */
114
+ private executeHideCommand;
115
+ /**
116
+ * Execute 'create' command
117
+ */
118
+ private executeCreateCommand;
119
+ /**
120
+ * Execute 'animate' command
121
+ */
122
+ private executeAnimateCommand;
123
+ /**
124
+ * Execute 'pulse' command
125
+ */
126
+ private executePulseCommand;
127
+ /**
128
+ * Execute 'move' command
129
+ */
130
+ private executeMoveCommand;
131
+ /**
132
+ * Execute 'delete' command
133
+ */
134
+ private executeDeleteCommand;
135
+ private executeStructure;
136
+ private executeAssignment;
137
+ private executeReturn;
138
+ private evaluateCondition;
139
+ private applyTransformation;
140
+ /**
141
+ * Register event handler
142
+ */
143
+ on(event: string, handler: EventHandler): void;
144
+ /**
145
+ * Remove event handler
146
+ */
147
+ off(event: string, handler?: EventHandler): void;
148
+ /**
149
+ * Emit event
150
+ */
151
+ emit(event: string, data?: unknown): Promise<void>;
152
+ /**
153
+ * Trigger UI event
154
+ */
155
+ triggerUIEvent(elementName: string, eventType: string, data?: unknown): Promise<void>;
156
+ /**
157
+ * Update all animations
158
+ */
159
+ updateAnimations(): void;
160
+ private applyEasing;
161
+ private createParticleEffect;
162
+ private createConnectionStream;
163
+ private createFlowingStream;
164
+ private createExecutionEffect;
165
+ private createDataVisualization;
166
+ private getDataTypeColor;
167
+ getParticleSystems(): Map<string, ParticleSystem>;
168
+ updateParticles(deltaTime: number): void;
169
+ getContext(): RuntimeContext;
170
+ getUIElements(): Map<string, UIElementState>;
171
+ getUIElement(name: string): UIElementState | undefined;
172
+ getAnimations(): Map<string, Animation>;
173
+ reset(): void;
174
+ private createEmptyContext;
175
+ getExecutionHistory(): ExecutionResult[];
176
+ getHologramStates(): Map<string, HologramProperties>;
177
+ getCallStack(): string[];
178
+ }
179
+
180
+ export { HoloScriptRuntime };
@@ -0,0 +1,180 @@
1
+ import { v as ImportLoader, A as ASTNode, B as ExecutionResult, J as ParticleSystem, z as RuntimeContext, b as HologramProperties } from './types-D6g4ACjP.js';
2
+
3
+ /**
4
+ * HoloScript Runtime Engine
5
+ *
6
+ * Executes HoloScript AST in VR environment with spatial computation.
7
+ * Supports:
8
+ * - Orb creation and manipulation
9
+ * - Function definition and invocation with arguments
10
+ * - Connections and reactive data flow
11
+ * - Gates (conditionals)
12
+ * - Streams (data pipelines)
13
+ * - 2D UI elements
14
+ * - Built-in commands (show, hide, animate, pulse)
15
+ * - Expression evaluation
16
+ * - Event system
17
+ */
18
+
19
+ /**
20
+ * Event handler type
21
+ */
22
+ type EventHandler = (data?: unknown) => void | Promise<void>;
23
+ /**
24
+ * Animation state
25
+ */
26
+ interface Animation {
27
+ target: string;
28
+ property: string;
29
+ from: number;
30
+ to: number;
31
+ duration: number;
32
+ startTime: number;
33
+ easing: string;
34
+ loop?: boolean;
35
+ yoyo?: boolean;
36
+ }
37
+ /**
38
+ * UI Element state
39
+ */
40
+ interface UIElementState {
41
+ type: string;
42
+ name: string;
43
+ properties: Record<string, unknown>;
44
+ value?: unknown;
45
+ visible: boolean;
46
+ enabled: boolean;
47
+ }
48
+ declare class HoloScriptRuntime {
49
+ private context;
50
+ private particleSystems;
51
+ private executionHistory;
52
+ private startTime;
53
+ private nodeCount;
54
+ private currentScope;
55
+ private callStack;
56
+ private eventHandlers;
57
+ private animations;
58
+ private uiElements;
59
+ private builtinFunctions;
60
+ constructor(_importLoader?: ImportLoader);
61
+ /**
62
+ * Initialize built-in functions
63
+ */
64
+ private initBuiltins;
65
+ /**
66
+ * Execute a single AST node
67
+ */
68
+ executeNode(node: ASTNode): Promise<ExecutionResult>;
69
+ /**
70
+ * Execute multiple nodes in sequence
71
+ */
72
+ executeProgram(nodes: ASTNode[], depth?: number): Promise<ExecutionResult[]>;
73
+ /**
74
+ * Call a function with arguments
75
+ */
76
+ callFunction(name: string, args?: unknown[]): Promise<ExecutionResult>;
77
+ /**
78
+ * Set a variable in current scope
79
+ */
80
+ setVariable(name: string, value: unknown): void;
81
+ /**
82
+ * Get a variable from scope chain
83
+ */
84
+ getVariable(name: string): unknown;
85
+ /**
86
+ * Evaluate an expression
87
+ */
88
+ evaluateExpression(expr: string): unknown;
89
+ /**
90
+ * Split string by comma, respecting nesting
91
+ */
92
+ private splitByComma;
93
+ private executeOrb;
94
+ private executeFunction;
95
+ private executeConnection;
96
+ private executeGate;
97
+ private executeStream;
98
+ private executeCall;
99
+ private executeDebug;
100
+ private executeVisualize;
101
+ private executeUIElement;
102
+ /**
103
+ * Execute generic voice commands
104
+ * Handles commands like: show, hide, animate, pulse, create
105
+ */
106
+ private executeGeneric;
107
+ /**
108
+ * Execute 'show' command
109
+ */
110
+ private executeShowCommand;
111
+ /**
112
+ * Execute 'hide' command
113
+ */
114
+ private executeHideCommand;
115
+ /**
116
+ * Execute 'create' command
117
+ */
118
+ private executeCreateCommand;
119
+ /**
120
+ * Execute 'animate' command
121
+ */
122
+ private executeAnimateCommand;
123
+ /**
124
+ * Execute 'pulse' command
125
+ */
126
+ private executePulseCommand;
127
+ /**
128
+ * Execute 'move' command
129
+ */
130
+ private executeMoveCommand;
131
+ /**
132
+ * Execute 'delete' command
133
+ */
134
+ private executeDeleteCommand;
135
+ private executeStructure;
136
+ private executeAssignment;
137
+ private executeReturn;
138
+ private evaluateCondition;
139
+ private applyTransformation;
140
+ /**
141
+ * Register event handler
142
+ */
143
+ on(event: string, handler: EventHandler): void;
144
+ /**
145
+ * Remove event handler
146
+ */
147
+ off(event: string, handler?: EventHandler): void;
148
+ /**
149
+ * Emit event
150
+ */
151
+ emit(event: string, data?: unknown): Promise<void>;
152
+ /**
153
+ * Trigger UI event
154
+ */
155
+ triggerUIEvent(elementName: string, eventType: string, data?: unknown): Promise<void>;
156
+ /**
157
+ * Update all animations
158
+ */
159
+ updateAnimations(): void;
160
+ private applyEasing;
161
+ private createParticleEffect;
162
+ private createConnectionStream;
163
+ private createFlowingStream;
164
+ private createExecutionEffect;
165
+ private createDataVisualization;
166
+ private getDataTypeColor;
167
+ getParticleSystems(): Map<string, ParticleSystem>;
168
+ updateParticles(deltaTime: number): void;
169
+ getContext(): RuntimeContext;
170
+ getUIElements(): Map<string, UIElementState>;
171
+ getUIElement(name: string): UIElementState | undefined;
172
+ getAnimations(): Map<string, Animation>;
173
+ reset(): void;
174
+ private createEmptyContext;
175
+ getExecutionHistory(): ExecutionResult[];
176
+ getHologramStates(): Map<string, HologramProperties>;
177
+ getCallStack(): string[];
178
+ }
179
+
180
+ export { HoloScriptRuntime };
@@ -0,0 +1,5 @@
1
+ export { HoloScriptRuntime } from './chunk-EU6CZMGJ.js';
2
+ import './chunk-SATNCODL.js';
3
+ import './chunk-4CV4JOE5.js';
4
+ //# sourceMappingURL=runtime.js.map
5
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"runtime.js"}
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var chunkVMZN4EVR_cjs = require('./chunk-VMZN4EVR.cjs');
4
+ require('./chunk-CZLDE2OZ.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "HoloScriptTypeChecker", {
9
+ enumerable: true,
10
+ get: function () { return chunkVMZN4EVR_cjs.HoloScriptTypeChecker; }
11
+ });
12
+ Object.defineProperty(exports, "createTypeChecker", {
13
+ enumerable: true,
14
+ get: function () { return chunkVMZN4EVR_cjs.createTypeChecker; }
15
+ });
16
+ //# sourceMappingURL=type-checker.cjs.map
17
+ //# sourceMappingURL=type-checker.cjs.map