@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,171 @@
1
+ import { HoloScriptRuntime } from './runtime.cjs';
2
+ import { A as ASTNode } from './types-D6g4ACjP.cjs';
3
+
4
+ /**
5
+ * HoloScript Debugger
6
+ *
7
+ * Step-through debugging with breakpoints, call stack inspection,
8
+ * and variable watch capabilities.
9
+ */
10
+
11
+ interface Breakpoint {
12
+ id: string;
13
+ line: number;
14
+ column?: number;
15
+ condition?: string;
16
+ hitCount: number;
17
+ enabled: boolean;
18
+ file?: string;
19
+ }
20
+ interface StackFrame {
21
+ id: number;
22
+ name: string;
23
+ file?: string;
24
+ line: number;
25
+ column: number;
26
+ variables: Map<string, unknown>;
27
+ node: ASTNode;
28
+ }
29
+ interface DebugState {
30
+ status: 'running' | 'paused' | 'stopped' | 'stepping';
31
+ currentLine: number;
32
+ currentColumn: number;
33
+ currentNode: ASTNode | null;
34
+ callStack: StackFrame[];
35
+ breakpoints: Breakpoint[];
36
+ }
37
+ type StepMode = 'into' | 'over' | 'out';
38
+ interface DebugEvent {
39
+ type: 'breakpoint-hit' | 'step-complete' | 'exception' | 'output' | 'state-change';
40
+ data: unknown;
41
+ }
42
+ type DebugEventHandler = (event: DebugEvent) => void;
43
+ /**
44
+ * HoloScript Debugger with breakpoints and step-through execution
45
+ */
46
+ declare class HoloScriptDebugger {
47
+ private runtime;
48
+ private parser;
49
+ private breakpoints;
50
+ private callStack;
51
+ private currentAST;
52
+ private currentNodeIndex;
53
+ private frameIdCounter;
54
+ private breakpointIdCounter;
55
+ private eventHandlers;
56
+ private state;
57
+ constructor(runtime?: HoloScriptRuntime);
58
+ /**
59
+ * Load source code for debugging
60
+ */
61
+ loadSource(code: string, file?: string): {
62
+ success: boolean;
63
+ errors?: string[];
64
+ };
65
+ /**
66
+ * Set a breakpoint at a line
67
+ */
68
+ setBreakpoint(line: number, options?: Partial<Breakpoint>): Breakpoint;
69
+ /**
70
+ * Remove a breakpoint by ID
71
+ */
72
+ removeBreakpoint(id: string): boolean;
73
+ /**
74
+ * Remove all breakpoints at a line
75
+ */
76
+ removeBreakpointsAtLine(line: number): number;
77
+ /**
78
+ * Toggle breakpoint enabled state
79
+ */
80
+ toggleBreakpoint(id: string): boolean;
81
+ /**
82
+ * Get all breakpoints
83
+ */
84
+ getBreakpoints(): Breakpoint[];
85
+ /**
86
+ * Clear all breakpoints
87
+ */
88
+ clearBreakpoints(): void;
89
+ /**
90
+ * Start debugging from the beginning
91
+ */
92
+ start(): Promise<void>;
93
+ /**
94
+ * Continue execution until next breakpoint or end
95
+ */
96
+ continue(): Promise<void>;
97
+ /**
98
+ * Step into the next node
99
+ */
100
+ stepInto(): Promise<void>;
101
+ /**
102
+ * Step over the current node
103
+ */
104
+ stepOver(): Promise<void>;
105
+ /**
106
+ * Step out of the current function
107
+ */
108
+ stepOut(): Promise<void>;
109
+ /**
110
+ * Stop debugging
111
+ */
112
+ stop(): void;
113
+ /**
114
+ * Pause execution
115
+ */
116
+ pause(): void;
117
+ /**
118
+ * Get current debug state
119
+ */
120
+ getState(): DebugState;
121
+ /**
122
+ * Get call stack
123
+ */
124
+ getCallStack(): StackFrame[];
125
+ /**
126
+ * Get variables at a specific stack frame
127
+ */
128
+ getVariables(frameId?: number): Map<string, unknown>;
129
+ /**
130
+ * Evaluate an expression in the current context
131
+ */
132
+ evaluate(expression: string): Promise<{
133
+ value: unknown;
134
+ error?: string;
135
+ }>;
136
+ /**
137
+ * Set a watch expression
138
+ */
139
+ watch(expression: string): {
140
+ id: string;
141
+ expression: string;
142
+ };
143
+ /**
144
+ * Register an event handler
145
+ */
146
+ on(event: string, handler: DebugEventHandler): void;
147
+ /**
148
+ * Remove an event handler
149
+ */
150
+ off(event: string, handler: DebugEventHandler): void;
151
+ /**
152
+ * Get the underlying runtime
153
+ */
154
+ getRuntime(): HoloScriptRuntime;
155
+ private runUntilBreakpoint;
156
+ private executeStep;
157
+ private executeNode;
158
+ private shouldBreakAt;
159
+ private findBreakpointAtLine;
160
+ private pushStackFrame;
161
+ private popStackFrame;
162
+ private updateCurrentState;
163
+ private updateBreakpointList;
164
+ private emitEvent;
165
+ }
166
+ /**
167
+ * Create a debugger instance
168
+ */
169
+ declare function createDebugger(runtime?: HoloScriptRuntime): HoloScriptDebugger;
170
+
171
+ export { type Breakpoint, type DebugEvent, type DebugState, HoloScriptDebugger, type StackFrame, type StepMode, createDebugger };
@@ -0,0 +1,171 @@
1
+ import { HoloScriptRuntime } from './runtime.js';
2
+ import { A as ASTNode } from './types-D6g4ACjP.js';
3
+
4
+ /**
5
+ * HoloScript Debugger
6
+ *
7
+ * Step-through debugging with breakpoints, call stack inspection,
8
+ * and variable watch capabilities.
9
+ */
10
+
11
+ interface Breakpoint {
12
+ id: string;
13
+ line: number;
14
+ column?: number;
15
+ condition?: string;
16
+ hitCount: number;
17
+ enabled: boolean;
18
+ file?: string;
19
+ }
20
+ interface StackFrame {
21
+ id: number;
22
+ name: string;
23
+ file?: string;
24
+ line: number;
25
+ column: number;
26
+ variables: Map<string, unknown>;
27
+ node: ASTNode;
28
+ }
29
+ interface DebugState {
30
+ status: 'running' | 'paused' | 'stopped' | 'stepping';
31
+ currentLine: number;
32
+ currentColumn: number;
33
+ currentNode: ASTNode | null;
34
+ callStack: StackFrame[];
35
+ breakpoints: Breakpoint[];
36
+ }
37
+ type StepMode = 'into' | 'over' | 'out';
38
+ interface DebugEvent {
39
+ type: 'breakpoint-hit' | 'step-complete' | 'exception' | 'output' | 'state-change';
40
+ data: unknown;
41
+ }
42
+ type DebugEventHandler = (event: DebugEvent) => void;
43
+ /**
44
+ * HoloScript Debugger with breakpoints and step-through execution
45
+ */
46
+ declare class HoloScriptDebugger {
47
+ private runtime;
48
+ private parser;
49
+ private breakpoints;
50
+ private callStack;
51
+ private currentAST;
52
+ private currentNodeIndex;
53
+ private frameIdCounter;
54
+ private breakpointIdCounter;
55
+ private eventHandlers;
56
+ private state;
57
+ constructor(runtime?: HoloScriptRuntime);
58
+ /**
59
+ * Load source code for debugging
60
+ */
61
+ loadSource(code: string, file?: string): {
62
+ success: boolean;
63
+ errors?: string[];
64
+ };
65
+ /**
66
+ * Set a breakpoint at a line
67
+ */
68
+ setBreakpoint(line: number, options?: Partial<Breakpoint>): Breakpoint;
69
+ /**
70
+ * Remove a breakpoint by ID
71
+ */
72
+ removeBreakpoint(id: string): boolean;
73
+ /**
74
+ * Remove all breakpoints at a line
75
+ */
76
+ removeBreakpointsAtLine(line: number): number;
77
+ /**
78
+ * Toggle breakpoint enabled state
79
+ */
80
+ toggleBreakpoint(id: string): boolean;
81
+ /**
82
+ * Get all breakpoints
83
+ */
84
+ getBreakpoints(): Breakpoint[];
85
+ /**
86
+ * Clear all breakpoints
87
+ */
88
+ clearBreakpoints(): void;
89
+ /**
90
+ * Start debugging from the beginning
91
+ */
92
+ start(): Promise<void>;
93
+ /**
94
+ * Continue execution until next breakpoint or end
95
+ */
96
+ continue(): Promise<void>;
97
+ /**
98
+ * Step into the next node
99
+ */
100
+ stepInto(): Promise<void>;
101
+ /**
102
+ * Step over the current node
103
+ */
104
+ stepOver(): Promise<void>;
105
+ /**
106
+ * Step out of the current function
107
+ */
108
+ stepOut(): Promise<void>;
109
+ /**
110
+ * Stop debugging
111
+ */
112
+ stop(): void;
113
+ /**
114
+ * Pause execution
115
+ */
116
+ pause(): void;
117
+ /**
118
+ * Get current debug state
119
+ */
120
+ getState(): DebugState;
121
+ /**
122
+ * Get call stack
123
+ */
124
+ getCallStack(): StackFrame[];
125
+ /**
126
+ * Get variables at a specific stack frame
127
+ */
128
+ getVariables(frameId?: number): Map<string, unknown>;
129
+ /**
130
+ * Evaluate an expression in the current context
131
+ */
132
+ evaluate(expression: string): Promise<{
133
+ value: unknown;
134
+ error?: string;
135
+ }>;
136
+ /**
137
+ * Set a watch expression
138
+ */
139
+ watch(expression: string): {
140
+ id: string;
141
+ expression: string;
142
+ };
143
+ /**
144
+ * Register an event handler
145
+ */
146
+ on(event: string, handler: DebugEventHandler): void;
147
+ /**
148
+ * Remove an event handler
149
+ */
150
+ off(event: string, handler: DebugEventHandler): void;
151
+ /**
152
+ * Get the underlying runtime
153
+ */
154
+ getRuntime(): HoloScriptRuntime;
155
+ private runUntilBreakpoint;
156
+ private executeStep;
157
+ private executeNode;
158
+ private shouldBreakAt;
159
+ private findBreakpointAtLine;
160
+ private pushStackFrame;
161
+ private popStackFrame;
162
+ private updateCurrentState;
163
+ private updateBreakpointList;
164
+ private emitEvent;
165
+ }
166
+ /**
167
+ * Create a debugger instance
168
+ */
169
+ declare function createDebugger(runtime?: HoloScriptRuntime): HoloScriptDebugger;
170
+
171
+ export { type Breakpoint, type DebugEvent, type DebugState, HoloScriptDebugger, type StackFrame, type StepMode, createDebugger };
@@ -0,0 +1,7 @@
1
+ export { HoloScriptDebugger, createDebugger } from './chunk-VYIDLUCV.js';
2
+ import './chunk-MCP6D4LT.js';
3
+ import './chunk-EU6CZMGJ.js';
4
+ import './chunk-SATNCODL.js';
5
+ import './chunk-4CV4JOE5.js';
6
+ //# sourceMappingURL=debugger.js.map
7
+ //# sourceMappingURL=debugger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"debugger.js"}