@holoscript/core 2.0.2 → 2.1.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.
- package/dist/{chunk-KWYIVRIH.js → chunk-2XXE34KS.js} +2 -2
- package/dist/chunk-2XXE34KS.js.map +1 -0
- package/dist/{chunk-EU6CZMGJ.js → chunk-AFFVFO4D.js} +511 -118
- package/dist/chunk-AFFVFO4D.js.map +1 -0
- package/dist/chunk-DGUM43GV.js +10 -0
- package/dist/{chunk-4CV4JOE5.js.map → chunk-DGUM43GV.js.map} +1 -1
- package/dist/{chunk-VYIDLUCV.js → chunk-DOY73HDH.js} +4 -4
- package/dist/{chunk-VYIDLUCV.js.map → chunk-DOY73HDH.js.map} +1 -1
- package/dist/chunk-JEQ2X3Z6.cjs +12 -0
- package/dist/{chunk-CZLDE2OZ.cjs.map → chunk-JEQ2X3Z6.cjs.map} +1 -1
- package/dist/{chunk-3N67RLQP.cjs → chunk-L6VLNVKP.cjs} +511 -118
- package/dist/chunk-L6VLNVKP.cjs.map +1 -0
- package/dist/{chunk-VMZN4EVR.cjs → chunk-MFNO57XL.cjs} +2 -2
- package/dist/chunk-MFNO57XL.cjs.map +1 -0
- package/dist/{chunk-WFI4T3XB.cjs → chunk-R75MREOS.cjs} +6 -6
- package/dist/{chunk-WFI4T3XB.cjs.map → chunk-R75MREOS.cjs.map} +1 -1
- package/dist/{chunk-4OHVW4XR.cjs → chunk-T57ZL7KR.cjs} +299 -45
- package/dist/chunk-T57ZL7KR.cjs.map +1 -0
- package/dist/{chunk-MCP6D4LT.js → chunk-U72GEJZT.js} +299 -45
- package/dist/chunk-U72GEJZT.js.map +1 -0
- package/dist/debugger.cjs +6 -6
- package/dist/debugger.d.cts +1 -1
- package/dist/debugger.d.ts +1 -1
- package/dist/debugger.js +4 -4
- package/dist/index.cjs +1896 -1099
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3145 -1534
- package/dist/index.d.ts +3145 -1534
- package/dist/index.js +1922 -1133
- package/dist/index.js.map +1 -1
- package/dist/parser.cjs +3 -3
- package/dist/parser.d.cts +34 -1
- package/dist/parser.d.ts +34 -1
- package/dist/parser.js +2 -2
- package/dist/runtime.cjs +3 -3
- package/dist/runtime.d.cts +47 -27
- package/dist/runtime.d.ts +47 -27
- package/dist/runtime.js +2 -2
- package/dist/type-checker.cjs +4 -4
- package/dist/type-checker.d.cts +3 -3
- package/dist/type-checker.d.ts +3 -3
- package/dist/type-checker.js +2 -2
- package/dist/{types-D6g4ACjP.d.cts → types-4h8cbtF_.d.cts} +80 -13
- package/dist/{types-D6g4ACjP.d.ts → types-4h8cbtF_.d.ts} +80 -13
- package/package.json +21 -20
- package/LICENSE +0 -21
- package/dist/chunk-3N67RLQP.cjs.map +0 -1
- package/dist/chunk-4CV4JOE5.js +0 -24
- package/dist/chunk-4OHVW4XR.cjs.map +0 -1
- package/dist/chunk-CZLDE2OZ.cjs +0 -28
- package/dist/chunk-EU6CZMGJ.js.map +0 -1
- package/dist/chunk-KWYIVRIH.js.map +0 -1
- package/dist/chunk-MCP6D4LT.js.map +0 -1
- package/dist/chunk-VMZN4EVR.cjs.map +0 -1
package/dist/parser.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkT57ZL7KR_cjs = require('./chunk-T57ZL7KR.cjs');
|
|
4
4
|
require('./chunk-3X2EGU7Z.cjs');
|
|
5
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-JEQ2X3Z6.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "HoloScriptCodeParser", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkT57ZL7KR_cjs.HoloScriptCodeParser; }
|
|
12
12
|
});
|
|
13
13
|
//# sourceMappingURL=parser.cjs.map
|
|
14
14
|
//# sourceMappingURL=parser.cjs.map
|
package/dist/parser.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ASTNode } from './types-
|
|
1
|
+
import { A as ASTNode } from './types-4h8cbtF_.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* HoloScript Code Parser
|
|
@@ -76,6 +76,10 @@ declare class HoloScriptCodeParser {
|
|
|
76
76
|
* Parse orb declaration
|
|
77
77
|
*/
|
|
78
78
|
private parseOrb;
|
|
79
|
+
/**
|
|
80
|
+
* Parse HoloScript+ directive: @name(...) or @name { ... }
|
|
81
|
+
*/
|
|
82
|
+
private parseDirective;
|
|
79
83
|
/**
|
|
80
84
|
* Parse function declaration
|
|
81
85
|
*/
|
|
@@ -84,6 +88,26 @@ declare class HoloScriptCodeParser {
|
|
|
84
88
|
* Parse connection
|
|
85
89
|
*/
|
|
86
90
|
private parseConnection;
|
|
91
|
+
/**
|
|
92
|
+
* Parse scale block: scale <magnitude> { body }
|
|
93
|
+
*/
|
|
94
|
+
private parseScale;
|
|
95
|
+
/**
|
|
96
|
+
* Parse focus block: focus <target> { body }
|
|
97
|
+
*/
|
|
98
|
+
private parseFocus;
|
|
99
|
+
/**
|
|
100
|
+
* Parse environment declaration
|
|
101
|
+
*/
|
|
102
|
+
private parseEnvironment;
|
|
103
|
+
/**
|
|
104
|
+
* Parse composition block
|
|
105
|
+
*/
|
|
106
|
+
private parseComposition;
|
|
107
|
+
/**
|
|
108
|
+
* Parse template declaration
|
|
109
|
+
*/
|
|
110
|
+
private parseTemplate;
|
|
87
111
|
/**
|
|
88
112
|
* Parse gate (conditional)
|
|
89
113
|
*/
|
|
@@ -100,6 +124,10 @@ declare class HoloScriptCodeParser {
|
|
|
100
124
|
* Parse building (class-like)
|
|
101
125
|
*/
|
|
102
126
|
private parseBuilding;
|
|
127
|
+
/**
|
|
128
|
+
* Parse a literal value (string, number, boolean, array, or object)
|
|
129
|
+
*/
|
|
130
|
+
private parseLiteral;
|
|
103
131
|
/**
|
|
104
132
|
* Parse a property (key: value)
|
|
105
133
|
*/
|
|
@@ -133,6 +161,11 @@ declare class HoloScriptCodeParser {
|
|
|
133
161
|
* Parse UI Element: ui2d dashboard#id { ... }
|
|
134
162
|
*/
|
|
135
163
|
private parseUIElement;
|
|
164
|
+
/**
|
|
165
|
+
* Parse settings command: settings
|
|
166
|
+
*/
|
|
167
|
+
private parseSettings;
|
|
168
|
+
private parseChat;
|
|
136
169
|
private skipNewlines;
|
|
137
170
|
}
|
|
138
171
|
|
package/dist/parser.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ASTNode } from './types-
|
|
1
|
+
import { A as ASTNode } from './types-4h8cbtF_.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* HoloScript Code Parser
|
|
@@ -76,6 +76,10 @@ declare class HoloScriptCodeParser {
|
|
|
76
76
|
* Parse orb declaration
|
|
77
77
|
*/
|
|
78
78
|
private parseOrb;
|
|
79
|
+
/**
|
|
80
|
+
* Parse HoloScript+ directive: @name(...) or @name { ... }
|
|
81
|
+
*/
|
|
82
|
+
private parseDirective;
|
|
79
83
|
/**
|
|
80
84
|
* Parse function declaration
|
|
81
85
|
*/
|
|
@@ -84,6 +88,26 @@ declare class HoloScriptCodeParser {
|
|
|
84
88
|
* Parse connection
|
|
85
89
|
*/
|
|
86
90
|
private parseConnection;
|
|
91
|
+
/**
|
|
92
|
+
* Parse scale block: scale <magnitude> { body }
|
|
93
|
+
*/
|
|
94
|
+
private parseScale;
|
|
95
|
+
/**
|
|
96
|
+
* Parse focus block: focus <target> { body }
|
|
97
|
+
*/
|
|
98
|
+
private parseFocus;
|
|
99
|
+
/**
|
|
100
|
+
* Parse environment declaration
|
|
101
|
+
*/
|
|
102
|
+
private parseEnvironment;
|
|
103
|
+
/**
|
|
104
|
+
* Parse composition block
|
|
105
|
+
*/
|
|
106
|
+
private parseComposition;
|
|
107
|
+
/**
|
|
108
|
+
* Parse template declaration
|
|
109
|
+
*/
|
|
110
|
+
private parseTemplate;
|
|
87
111
|
/**
|
|
88
112
|
* Parse gate (conditional)
|
|
89
113
|
*/
|
|
@@ -100,6 +124,10 @@ declare class HoloScriptCodeParser {
|
|
|
100
124
|
* Parse building (class-like)
|
|
101
125
|
*/
|
|
102
126
|
private parseBuilding;
|
|
127
|
+
/**
|
|
128
|
+
* Parse a literal value (string, number, boolean, array, or object)
|
|
129
|
+
*/
|
|
130
|
+
private parseLiteral;
|
|
103
131
|
/**
|
|
104
132
|
* Parse a property (key: value)
|
|
105
133
|
*/
|
|
@@ -133,6 +161,11 @@ declare class HoloScriptCodeParser {
|
|
|
133
161
|
* Parse UI Element: ui2d dashboard#id { ... }
|
|
134
162
|
*/
|
|
135
163
|
private parseUIElement;
|
|
164
|
+
/**
|
|
165
|
+
* Parse settings command: settings
|
|
166
|
+
*/
|
|
167
|
+
private parseSettings;
|
|
168
|
+
private parseChat;
|
|
136
169
|
private skipNewlines;
|
|
137
170
|
}
|
|
138
171
|
|
package/dist/parser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { HoloScriptCodeParser } from './chunk-
|
|
1
|
+
export { HoloScriptCodeParser } from './chunk-U72GEJZT.js';
|
|
2
2
|
import './chunk-SATNCODL.js';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-DGUM43GV.js';
|
|
4
4
|
//# sourceMappingURL=parser.js.map
|
|
5
5
|
//# sourceMappingURL=parser.js.map
|
package/dist/runtime.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkL6VLNVKP_cjs = require('./chunk-L6VLNVKP.cjs');
|
|
4
4
|
require('./chunk-3X2EGU7Z.cjs');
|
|
5
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-JEQ2X3Z6.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "HoloScriptRuntime", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkL6VLNVKP_cjs.HoloScriptRuntime; }
|
|
12
12
|
});
|
|
13
13
|
//# sourceMappingURL=runtime.cjs.map
|
|
14
14
|
//# sourceMappingURL=runtime.cjs.map
|
package/dist/runtime.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { v as ImportLoader, A as ASTNode, B as ExecutionResult,
|
|
1
|
+
import { v as ImportLoader, J as HoloScriptValue, A as ASTNode, B as ExecutionResult, K as ParticleSystem, z as RuntimeContext, Q as Animation, b as HologramProperties } from './types-4h8cbtF_.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* HoloScript Runtime Engine
|
|
@@ -19,29 +19,15 @@ import { v as ImportLoader, A as ASTNode, B as ExecutionResult, J as ParticleSys
|
|
|
19
19
|
/**
|
|
20
20
|
* Event handler type
|
|
21
21
|
*/
|
|
22
|
-
type EventHandler = (data?:
|
|
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
|
-
}
|
|
22
|
+
type EventHandler = (data?: HoloScriptValue) => void | Promise<void>;
|
|
37
23
|
/**
|
|
38
24
|
* UI Element state
|
|
39
25
|
*/
|
|
40
26
|
interface UIElementState {
|
|
41
27
|
type: string;
|
|
42
28
|
name: string;
|
|
43
|
-
properties: Record<string,
|
|
44
|
-
value?:
|
|
29
|
+
properties: Record<string, HoloScriptValue>;
|
|
30
|
+
value?: HoloScriptValue;
|
|
45
31
|
visible: boolean;
|
|
46
32
|
enabled: boolean;
|
|
47
33
|
}
|
|
@@ -57,7 +43,7 @@ declare class HoloScriptRuntime {
|
|
|
57
43
|
private animations;
|
|
58
44
|
private uiElements;
|
|
59
45
|
private builtinFunctions;
|
|
60
|
-
constructor(_importLoader?: ImportLoader);
|
|
46
|
+
constructor(_importLoader?: ImportLoader, customFunctions?: Record<string, (args: HoloScriptValue[]) => HoloScriptValue>);
|
|
61
47
|
/**
|
|
62
48
|
* Initialize built-in functions
|
|
63
49
|
*/
|
|
@@ -66,6 +52,10 @@ declare class HoloScriptRuntime {
|
|
|
66
52
|
* Execute a single AST node
|
|
67
53
|
*/
|
|
68
54
|
executeNode(node: ASTNode): Promise<ExecutionResult>;
|
|
55
|
+
/**
|
|
56
|
+
* Execute multiple nodes or a single node (unified entry point)
|
|
57
|
+
*/
|
|
58
|
+
execute(nodes: ASTNode | ASTNode[]): Promise<ExecutionResult>;
|
|
69
59
|
/**
|
|
70
60
|
* Execute multiple nodes in sequence
|
|
71
61
|
*/
|
|
@@ -73,23 +63,19 @@ declare class HoloScriptRuntime {
|
|
|
73
63
|
/**
|
|
74
64
|
* Call a function with arguments
|
|
75
65
|
*/
|
|
76
|
-
callFunction(name: string, args?:
|
|
66
|
+
callFunction(name: string, args?: HoloScriptValue[]): Promise<ExecutionResult>;
|
|
77
67
|
/**
|
|
78
68
|
* Set a variable in current scope
|
|
79
69
|
*/
|
|
80
|
-
setVariable(name: string, value:
|
|
70
|
+
setVariable(name: string, value: HoloScriptValue): void;
|
|
81
71
|
/**
|
|
82
72
|
* Get a variable from scope chain
|
|
83
73
|
*/
|
|
84
|
-
getVariable(name: string):
|
|
74
|
+
getVariable(name: string): HoloScriptValue;
|
|
85
75
|
/**
|
|
86
76
|
* Evaluate an expression
|
|
87
77
|
*/
|
|
88
|
-
evaluateExpression(expr: string):
|
|
89
|
-
/**
|
|
90
|
-
* Split string by comma, respecting nesting
|
|
91
|
-
*/
|
|
92
|
-
private splitByComma;
|
|
78
|
+
evaluateExpression(expr: string): HoloScriptValue;
|
|
93
79
|
private executeOrb;
|
|
94
80
|
private executeFunction;
|
|
95
81
|
private executeConnection;
|
|
@@ -141,6 +127,10 @@ declare class HoloScriptRuntime {
|
|
|
141
127
|
* Register event handler
|
|
142
128
|
*/
|
|
143
129
|
on(event: string, handler: EventHandler): void;
|
|
130
|
+
/**
|
|
131
|
+
* Register host function
|
|
132
|
+
*/
|
|
133
|
+
registerFunction(name: string, handler: (args: HoloScriptValue[]) => HoloScriptValue): void;
|
|
144
134
|
/**
|
|
145
135
|
* Remove event handler
|
|
146
136
|
*/
|
|
@@ -157,6 +147,24 @@ declare class HoloScriptRuntime {
|
|
|
157
147
|
* Update all animations
|
|
158
148
|
*/
|
|
159
149
|
updateAnimations(): void;
|
|
150
|
+
/**
|
|
151
|
+
* Update real-life and system variables ($time, $user, etc.)
|
|
152
|
+
*/
|
|
153
|
+
private updateSystemVariables;
|
|
154
|
+
private handleShop;
|
|
155
|
+
private handleInventory;
|
|
156
|
+
private handlePurchase;
|
|
157
|
+
private handlePresence;
|
|
158
|
+
private handleInvite;
|
|
159
|
+
private handleShare;
|
|
160
|
+
private handlePhysics;
|
|
161
|
+
private handleGravity;
|
|
162
|
+
private handleCollide;
|
|
163
|
+
/**
|
|
164
|
+
* Handle calculate_arc(start, end, speed)
|
|
165
|
+
*/
|
|
166
|
+
private handleCalculateArc;
|
|
167
|
+
private handleAnimate;
|
|
160
168
|
private applyEasing;
|
|
161
169
|
private createParticleEffect;
|
|
162
170
|
private createConnectionStream;
|
|
@@ -172,9 +180,21 @@ declare class HoloScriptRuntime {
|
|
|
172
180
|
getAnimations(): Map<string, Animation>;
|
|
173
181
|
reset(): void;
|
|
174
182
|
private createEmptyContext;
|
|
183
|
+
private executeScale;
|
|
184
|
+
private executeFocus;
|
|
185
|
+
private executeEnvironment;
|
|
186
|
+
private executeComposition;
|
|
187
|
+
private executeTemplate;
|
|
188
|
+
private executeServerNode;
|
|
189
|
+
private executeDatabaseNode;
|
|
190
|
+
private executeFetchNode;
|
|
191
|
+
private executeTarget;
|
|
192
|
+
private executeStateDeclaration;
|
|
193
|
+
private applyDirectives;
|
|
175
194
|
getExecutionHistory(): ExecutionResult[];
|
|
176
195
|
getHologramStates(): Map<string, HologramProperties>;
|
|
177
196
|
getCallStack(): string[];
|
|
197
|
+
getState(): Record<string, HoloScriptValue>;
|
|
178
198
|
}
|
|
179
199
|
|
|
180
200
|
export { HoloScriptRuntime };
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { v as ImportLoader, A as ASTNode, B as ExecutionResult,
|
|
1
|
+
import { v as ImportLoader, J as HoloScriptValue, A as ASTNode, B as ExecutionResult, K as ParticleSystem, z as RuntimeContext, Q as Animation, b as HologramProperties } from './types-4h8cbtF_.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* HoloScript Runtime Engine
|
|
@@ -19,29 +19,15 @@ import { v as ImportLoader, A as ASTNode, B as ExecutionResult, J as ParticleSys
|
|
|
19
19
|
/**
|
|
20
20
|
* Event handler type
|
|
21
21
|
*/
|
|
22
|
-
type EventHandler = (data?:
|
|
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
|
-
}
|
|
22
|
+
type EventHandler = (data?: HoloScriptValue) => void | Promise<void>;
|
|
37
23
|
/**
|
|
38
24
|
* UI Element state
|
|
39
25
|
*/
|
|
40
26
|
interface UIElementState {
|
|
41
27
|
type: string;
|
|
42
28
|
name: string;
|
|
43
|
-
properties: Record<string,
|
|
44
|
-
value?:
|
|
29
|
+
properties: Record<string, HoloScriptValue>;
|
|
30
|
+
value?: HoloScriptValue;
|
|
45
31
|
visible: boolean;
|
|
46
32
|
enabled: boolean;
|
|
47
33
|
}
|
|
@@ -57,7 +43,7 @@ declare class HoloScriptRuntime {
|
|
|
57
43
|
private animations;
|
|
58
44
|
private uiElements;
|
|
59
45
|
private builtinFunctions;
|
|
60
|
-
constructor(_importLoader?: ImportLoader);
|
|
46
|
+
constructor(_importLoader?: ImportLoader, customFunctions?: Record<string, (args: HoloScriptValue[]) => HoloScriptValue>);
|
|
61
47
|
/**
|
|
62
48
|
* Initialize built-in functions
|
|
63
49
|
*/
|
|
@@ -66,6 +52,10 @@ declare class HoloScriptRuntime {
|
|
|
66
52
|
* Execute a single AST node
|
|
67
53
|
*/
|
|
68
54
|
executeNode(node: ASTNode): Promise<ExecutionResult>;
|
|
55
|
+
/**
|
|
56
|
+
* Execute multiple nodes or a single node (unified entry point)
|
|
57
|
+
*/
|
|
58
|
+
execute(nodes: ASTNode | ASTNode[]): Promise<ExecutionResult>;
|
|
69
59
|
/**
|
|
70
60
|
* Execute multiple nodes in sequence
|
|
71
61
|
*/
|
|
@@ -73,23 +63,19 @@ declare class HoloScriptRuntime {
|
|
|
73
63
|
/**
|
|
74
64
|
* Call a function with arguments
|
|
75
65
|
*/
|
|
76
|
-
callFunction(name: string, args?:
|
|
66
|
+
callFunction(name: string, args?: HoloScriptValue[]): Promise<ExecutionResult>;
|
|
77
67
|
/**
|
|
78
68
|
* Set a variable in current scope
|
|
79
69
|
*/
|
|
80
|
-
setVariable(name: string, value:
|
|
70
|
+
setVariable(name: string, value: HoloScriptValue): void;
|
|
81
71
|
/**
|
|
82
72
|
* Get a variable from scope chain
|
|
83
73
|
*/
|
|
84
|
-
getVariable(name: string):
|
|
74
|
+
getVariable(name: string): HoloScriptValue;
|
|
85
75
|
/**
|
|
86
76
|
* Evaluate an expression
|
|
87
77
|
*/
|
|
88
|
-
evaluateExpression(expr: string):
|
|
89
|
-
/**
|
|
90
|
-
* Split string by comma, respecting nesting
|
|
91
|
-
*/
|
|
92
|
-
private splitByComma;
|
|
78
|
+
evaluateExpression(expr: string): HoloScriptValue;
|
|
93
79
|
private executeOrb;
|
|
94
80
|
private executeFunction;
|
|
95
81
|
private executeConnection;
|
|
@@ -141,6 +127,10 @@ declare class HoloScriptRuntime {
|
|
|
141
127
|
* Register event handler
|
|
142
128
|
*/
|
|
143
129
|
on(event: string, handler: EventHandler): void;
|
|
130
|
+
/**
|
|
131
|
+
* Register host function
|
|
132
|
+
*/
|
|
133
|
+
registerFunction(name: string, handler: (args: HoloScriptValue[]) => HoloScriptValue): void;
|
|
144
134
|
/**
|
|
145
135
|
* Remove event handler
|
|
146
136
|
*/
|
|
@@ -157,6 +147,24 @@ declare class HoloScriptRuntime {
|
|
|
157
147
|
* Update all animations
|
|
158
148
|
*/
|
|
159
149
|
updateAnimations(): void;
|
|
150
|
+
/**
|
|
151
|
+
* Update real-life and system variables ($time, $user, etc.)
|
|
152
|
+
*/
|
|
153
|
+
private updateSystemVariables;
|
|
154
|
+
private handleShop;
|
|
155
|
+
private handleInventory;
|
|
156
|
+
private handlePurchase;
|
|
157
|
+
private handlePresence;
|
|
158
|
+
private handleInvite;
|
|
159
|
+
private handleShare;
|
|
160
|
+
private handlePhysics;
|
|
161
|
+
private handleGravity;
|
|
162
|
+
private handleCollide;
|
|
163
|
+
/**
|
|
164
|
+
* Handle calculate_arc(start, end, speed)
|
|
165
|
+
*/
|
|
166
|
+
private handleCalculateArc;
|
|
167
|
+
private handleAnimate;
|
|
160
168
|
private applyEasing;
|
|
161
169
|
private createParticleEffect;
|
|
162
170
|
private createConnectionStream;
|
|
@@ -172,9 +180,21 @@ declare class HoloScriptRuntime {
|
|
|
172
180
|
getAnimations(): Map<string, Animation>;
|
|
173
181
|
reset(): void;
|
|
174
182
|
private createEmptyContext;
|
|
183
|
+
private executeScale;
|
|
184
|
+
private executeFocus;
|
|
185
|
+
private executeEnvironment;
|
|
186
|
+
private executeComposition;
|
|
187
|
+
private executeTemplate;
|
|
188
|
+
private executeServerNode;
|
|
189
|
+
private executeDatabaseNode;
|
|
190
|
+
private executeFetchNode;
|
|
191
|
+
private executeTarget;
|
|
192
|
+
private executeStateDeclaration;
|
|
193
|
+
private applyDirectives;
|
|
175
194
|
getExecutionHistory(): ExecutionResult[];
|
|
176
195
|
getHologramStates(): Map<string, HologramProperties>;
|
|
177
196
|
getCallStack(): string[];
|
|
197
|
+
getState(): Record<string, HoloScriptValue>;
|
|
178
198
|
}
|
|
179
199
|
|
|
180
200
|
export { HoloScriptRuntime };
|
package/dist/runtime.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { HoloScriptRuntime } from './chunk-
|
|
1
|
+
export { HoloScriptRuntime } from './chunk-AFFVFO4D.js';
|
|
2
2
|
import './chunk-SATNCODL.js';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-DGUM43GV.js';
|
|
4
4
|
//# sourceMappingURL=runtime.js.map
|
|
5
5
|
//# sourceMappingURL=runtime.js.map
|
package/dist/type-checker.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkMFNO57XL_cjs = require('./chunk-MFNO57XL.cjs');
|
|
4
|
+
require('./chunk-JEQ2X3Z6.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "HoloScriptTypeChecker", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkMFNO57XL_cjs.HoloScriptTypeChecker; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "createTypeChecker", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkMFNO57XL_cjs.createTypeChecker; }
|
|
15
15
|
});
|
|
16
16
|
//# sourceMappingURL=type-checker.cjs.map
|
|
17
17
|
//# sourceMappingURL=type-checker.cjs.map
|
package/dist/type-checker.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ASTNode } from './types-
|
|
1
|
+
import { A as ASTNode, J as HoloScriptValue } from './types-4h8cbtF_.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* HoloScript Type Checker
|
|
@@ -20,7 +20,7 @@ interface ParameterType {
|
|
|
20
20
|
name: string;
|
|
21
21
|
type: HoloScriptType;
|
|
22
22
|
optional?: boolean;
|
|
23
|
-
defaultValue?:
|
|
23
|
+
defaultValue?: HoloScriptValue;
|
|
24
24
|
}
|
|
25
25
|
interface TypeDiagnostic {
|
|
26
26
|
severity: 'error' | 'warning' | 'info';
|
|
@@ -67,7 +67,7 @@ declare class HoloScriptTypeChecker {
|
|
|
67
67
|
/**
|
|
68
68
|
* Infer type from a value
|
|
69
69
|
*/
|
|
70
|
-
|
|
70
|
+
inferType(value: HoloScriptValue): TypeInfo;
|
|
71
71
|
/**
|
|
72
72
|
* Parse type string to HoloScriptType
|
|
73
73
|
*/
|
package/dist/type-checker.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ASTNode } from './types-
|
|
1
|
+
import { A as ASTNode, J as HoloScriptValue } from './types-4h8cbtF_.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* HoloScript Type Checker
|
|
@@ -20,7 +20,7 @@ interface ParameterType {
|
|
|
20
20
|
name: string;
|
|
21
21
|
type: HoloScriptType;
|
|
22
22
|
optional?: boolean;
|
|
23
|
-
defaultValue?:
|
|
23
|
+
defaultValue?: HoloScriptValue;
|
|
24
24
|
}
|
|
25
25
|
interface TypeDiagnostic {
|
|
26
26
|
severity: 'error' | 'warning' | 'info';
|
|
@@ -67,7 +67,7 @@ declare class HoloScriptTypeChecker {
|
|
|
67
67
|
/**
|
|
68
68
|
* Infer type from a value
|
|
69
69
|
*/
|
|
70
|
-
|
|
70
|
+
inferType(value: HoloScriptValue): TypeInfo;
|
|
71
71
|
/**
|
|
72
72
|
* Parse type string to HoloScriptType
|
|
73
73
|
*/
|
package/dist/type-checker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { HoloScriptTypeChecker, createTypeChecker } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { HoloScriptTypeChecker, createTypeChecker } from './chunk-2XXE34KS.js';
|
|
2
|
+
import './chunk-DGUM43GV.js';
|
|
3
3
|
//# sourceMappingURL=type-checker.js.map
|
|
4
4
|
//# sourceMappingURL=type-checker.js.map
|