@drincs/pixi-vn-json 1.13.13 → 1.13.15
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/PixiVNJsonIfElse-B_OG8Qs1.d.cts +409 -0
- package/dist/PixiVNJsonIfElse-B_OG8Qs1.d.ts +409 -0
- package/dist/{PixiVNJsonLabelStep-DKmA62M_.d.cts → PixiVNJsonLabelStep-CELQY8TP.d.ts} +3 -408
- package/dist/{PixiVNJsonLabelStep-DKmA62M_.d.ts → PixiVNJsonLabelStep-D-FkTLeR.d.cts} +3 -408
- package/dist/actions.cjs +2 -2
- package/dist/actions.d.cts +2 -1
- package/dist/actions.d.ts +2 -1
- package/dist/actions.mjs +2 -2
- package/dist/constants.cjs +2 -0
- package/dist/constants.d.cts +30 -0
- package/dist/constants.d.ts +30 -0
- package/dist/constants.mjs +2 -0
- package/dist/core.d.cts +2 -1
- package/dist/core.d.ts +2 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +4 -29
- package/dist/index.d.ts +4 -29
- package/dist/index.mjs +2 -2
- package/dist/interpreter.d.cts +2 -1
- package/dist/interpreter.d.ts +2 -1
- package/dist/schema.d.cts +4 -2
- package/dist/schema.d.ts +4 -2
- package/dist/translator.d.cts +2 -1
- package/dist/translator.d.ts +2 -1
- package/package.json +10 -1
|
@@ -1,413 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as PixiVNJsonValueSet, m as PixiVNJsonFunction, P as PixiVNJsonIfElse, c as PixiVNJsonValueGet, f as PixiVNJsonConditionalStatements } from './PixiVNJsonIfElse-B_OG8Qs1.cjs';
|
|
2
|
+
import { CanvasBaseInterface, ImageSprite, ShakeEffectProps, ShowWithDissolveTransitionProps, ShowWithFadeTransitionProps, MoveInOutProps, ZoomInOutProps, PushInOutProps, ContainerOptions, ImageContainerOptions, ImageSpriteOptions, TextOptions, ImageSpriteMemory, VideoSpriteMemory, ImageContainerMemory, TextMemory, ContainerMemory, SoundPlayOptionsWithChannel, MediaInterface, LabelRunModeType, StorageObjectType, StepLabelPropsType } from '@drincs/pixi-vn';
|
|
2
3
|
import { KeyframesType, AnimationOptions, ObjectSegment, ObjectSegmentWithTransition, SequenceOptions } from '@drincs/pixi-vn/motion';
|
|
3
4
|
import { UPDATE_PRIORITY } from 'pixi.js';
|
|
4
5
|
|
|
5
|
-
/**
|
|
6
|
-
* A single element that can appear inside a step-switch, which may be a direct value,
|
|
7
|
-
* a conditional statement, or a result-to-combine.
|
|
8
|
-
*/
|
|
9
|
-
type PixiVNJsonStepSwitchElementType<Then> = Then | PixiVNJsonConditionalStatements<Then> | PixiVNJsonConditionalResultToCombine<Then>;
|
|
10
|
-
/**
|
|
11
|
-
* The elements collection of a step-switch — either a plain array or a conditional that produces an array.
|
|
12
|
-
*/
|
|
13
|
-
type PixiVNJsonStepSwitchElementsType<Then> = PixiVNJsonStepSwitchElementType<Then>[] | PixiVNJsonConditionalStatements<Then[]>;
|
|
14
|
-
/**
|
|
15
|
-
* Picks one element at random each time the step is visited.
|
|
16
|
-
*/
|
|
17
|
-
interface PixiVNJsonRandom<Then> {
|
|
18
|
-
type: "stepswitch";
|
|
19
|
-
choiceType: "random";
|
|
20
|
-
/**
|
|
21
|
-
* The pool of elements to choose from randomly.
|
|
22
|
-
*/
|
|
23
|
-
elements: PixiVNJsonStepSwitchElementsType<Then>;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Picks elements in a random order, advancing through the list across visits (no repeats until exhausted).
|
|
27
|
-
*/
|
|
28
|
-
interface PixiVNJsonSequentialRandom<Then> {
|
|
29
|
-
type: "stepswitch";
|
|
30
|
-
choiceType: "sequentialrandom";
|
|
31
|
-
/**
|
|
32
|
-
* The pool of elements to iterate through in randomised order.
|
|
33
|
-
*/
|
|
34
|
-
elements: PixiVNJsonStepSwitchElementsType<Then>;
|
|
35
|
-
/**
|
|
36
|
-
* When the sequential ends, what should be the value? If undefined, it will return undefined.
|
|
37
|
-
* If "lastItem", it will return the last item in the array.
|
|
38
|
-
*/
|
|
39
|
-
end: undefined | "lastItem";
|
|
40
|
-
/**
|
|
41
|
-
* The subId is used for managing nested switches
|
|
42
|
-
*/
|
|
43
|
-
nestedId?: string;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Advances through the elements list one by one on each visit (in order).
|
|
47
|
-
*/
|
|
48
|
-
interface PixiVNJsonSequential<Then> {
|
|
49
|
-
type: "stepswitch";
|
|
50
|
-
choiceType: "sequential";
|
|
51
|
-
/**
|
|
52
|
-
* The ordered list of elements to iterate through.
|
|
53
|
-
*/
|
|
54
|
-
elements: PixiVNJsonStepSwitchElementsType<Then>;
|
|
55
|
-
/**
|
|
56
|
-
* When the sequential ends, what should be the value? If undefined, it will return undefined.
|
|
57
|
-
* If "lastItem", it will return the last item in the array.
|
|
58
|
-
*/
|
|
59
|
-
end: undefined | "lastItem";
|
|
60
|
-
/**
|
|
61
|
-
* The subId is used for managing nested switches
|
|
62
|
-
*/
|
|
63
|
-
nestedId?: string;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Loops through the elements list indefinitely, cycling back to the first element after the last.
|
|
67
|
-
*/
|
|
68
|
-
interface PixiVNJsonLoop<Then> {
|
|
69
|
-
type: "stepswitch";
|
|
70
|
-
choiceType: "loop";
|
|
71
|
-
/**
|
|
72
|
-
* The list of elements to cycle through.
|
|
73
|
-
*/
|
|
74
|
-
elements: PixiVNJsonStepSwitchElementsType<Then>;
|
|
75
|
-
/**
|
|
76
|
-
* The subId is used for managing nested switches
|
|
77
|
-
*/
|
|
78
|
-
nestedId?: string;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* A step-switch selects one element from a list using a defined strategy (random, sequential, loop, or sequential-random).
|
|
82
|
-
*/
|
|
83
|
-
type PixiVNJsonStepSwitch<Then> = PixiVNJsonRandom<Then> | PixiVNJsonSequential<Then> | PixiVNJsonLoop<Then> | PixiVNJsonSequentialRandom<Then>;
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* This element is used in case a {@link PixiVNJsonConditionalStatements} gives a result that must be combined with another calculated through other {@link PixiVNJsonConditionalStatements}.
|
|
87
|
-
* in case this possibility is not managed, it will be taken into consideration {@link PixiVNJsonConditionalResultToCombine.firstItem}
|
|
88
|
-
*/
|
|
89
|
-
type PixiVNJsonConditionalResultToCombine<T> = {
|
|
90
|
-
type: "resulttocombine";
|
|
91
|
-
/**
|
|
92
|
-
* Defines how the two results are combined:
|
|
93
|
-
* - `"cross"` — cartesian product / pairwise combination of both results
|
|
94
|
-
* - `"union"` — concatenation / merge of both results into a single collection
|
|
95
|
-
*/
|
|
96
|
-
combine: "cross" | "union";
|
|
97
|
-
/**
|
|
98
|
-
* The first (primary) result item, used as a fallback if the second conditional produces no result.
|
|
99
|
-
*/
|
|
100
|
-
firstItem?: T;
|
|
101
|
-
/**
|
|
102
|
-
* The second conditional item(s) whose result will be combined with {@link firstItem}.
|
|
103
|
-
*/
|
|
104
|
-
secondConditionalItem?: PixiVNJsonStepSwitchElementType<T>[];
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* A conditional statement that evaluates to a value of type `Then`.
|
|
109
|
-
* It can be either:
|
|
110
|
-
* - a {@link PixiVNJsonStepSwitch} — selects a result from a list based on a strategy (random, sequential, loop)
|
|
111
|
-
* - a {@link PixiVNJsonIfElse} — evaluates a condition and returns the matching branch result,
|
|
112
|
-
* which may itself be another conditional or a {@link PixiVNJsonConditionalResultToCombine}
|
|
113
|
-
*/
|
|
114
|
-
type PixiVNJsonConditionalStatements<Then> = PixiVNJsonStepSwitch<Then> | PixiVNJsonIfElse<Then | PixiVNJsonConditionalStatements<Then> | PixiVNJsonConditionalResultToCombine<Then>>;
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Retrieves a value from the persistent storage, flag storage, or temporary storage.
|
|
118
|
-
*/
|
|
119
|
-
type PixiVNJsonStorageGet = {
|
|
120
|
-
type: "value";
|
|
121
|
-
storageOperationType: "get";
|
|
122
|
-
/**
|
|
123
|
-
* Key of the storage
|
|
124
|
-
*/
|
|
125
|
-
key: string;
|
|
126
|
-
/**
|
|
127
|
-
* Type of the storage, if it is a flagStorage or a storage.
|
|
128
|
-
* If it is a flagStorage, the value will be get with the function {@link getFlag}
|
|
129
|
-
*/
|
|
130
|
-
storageType: "storage" | "flagStorage" | "tempstorage";
|
|
131
|
-
};
|
|
132
|
-
type PixiVNJsonParamGet = {
|
|
133
|
-
type: "value";
|
|
134
|
-
storageOperationType: "get";
|
|
135
|
-
/**
|
|
136
|
-
* Index of the parameter in the params array.
|
|
137
|
-
*/
|
|
138
|
-
key: number;
|
|
139
|
-
storageType: "params";
|
|
140
|
-
};
|
|
141
|
-
/**
|
|
142
|
-
* Retrieves the number of times a label has been opened.
|
|
143
|
-
*/
|
|
144
|
-
type PixiVNJsonLabelGet = {
|
|
145
|
-
type: "value";
|
|
146
|
-
storageOperationType: "get";
|
|
147
|
-
/**
|
|
148
|
-
* Id of the label
|
|
149
|
-
*/
|
|
150
|
-
label: string;
|
|
151
|
-
/**
|
|
152
|
-
* If it is a label, the value will be get with the function {@link narration.getTimesLabelOpened}
|
|
153
|
-
*/
|
|
154
|
-
storageType: "label";
|
|
155
|
-
};
|
|
156
|
-
/**
|
|
157
|
-
* Retrieves the number of times a specific choice has been selected.
|
|
158
|
-
*/
|
|
159
|
-
type PixiVNJsonChoiceGet = {
|
|
160
|
-
type: "value";
|
|
161
|
-
storageOperationType: "get";
|
|
162
|
-
/**
|
|
163
|
-
* index of the choice
|
|
164
|
-
*/
|
|
165
|
-
index: number;
|
|
166
|
-
/**
|
|
167
|
-
* If it is a choice, the value will be get with the function {@link narration.getTimesChoiceOpened}
|
|
168
|
-
*/
|
|
169
|
-
storageType: "choice";
|
|
170
|
-
};
|
|
171
|
-
/**
|
|
172
|
-
* Retrieves a value from the logic/arithmetic layer (result of a computation or condition).
|
|
173
|
-
*/
|
|
174
|
-
type PixiVNJsonLogicGet = {
|
|
175
|
-
type: "value";
|
|
176
|
-
storageOperationType: "get";
|
|
177
|
-
/**
|
|
178
|
-
* The arithmetic or conditional operation whose result is the retrieved value.
|
|
179
|
-
*/
|
|
180
|
-
operation: PixiVNJsonArithmeticOperations | PixiVNJsonConditions;
|
|
181
|
-
storageType: "logic";
|
|
182
|
-
};
|
|
183
|
-
/**
|
|
184
|
-
* Union of all "get value" operations — reads from storage, params, labels, choices, or a logic expression.
|
|
185
|
-
*/
|
|
186
|
-
type PixiVNJsonValueGet = PixiVNJsonStorageGet | PixiVNJsonParamGet | PixiVNJsonLabelGet | PixiVNJsonChoiceGet | PixiVNJsonLogicGet | PixiVNJsonFunction;
|
|
187
|
-
/**
|
|
188
|
-
* Invokes a named function and returns its result.
|
|
189
|
-
* Functions are registered in the Pixi'VN runtime and can receive typed arguments.
|
|
190
|
-
*/
|
|
191
|
-
type PixiVNJsonFunction = {
|
|
192
|
-
type: "function";
|
|
193
|
-
/**
|
|
194
|
-
* The name of the registered function to call.
|
|
195
|
-
*/
|
|
196
|
-
functionName: string;
|
|
197
|
-
/**
|
|
198
|
-
* Arguments to pass to the function. Each argument can be a condition, a raw value,
|
|
199
|
-
* a value-get operation, or an arithmetic expression.
|
|
200
|
-
*/
|
|
201
|
-
args: (PixiVNJsonConditions | StorageElementType | PixiVNJsonValueGet | PixiVNJsonArithmeticOperations)[];
|
|
202
|
-
};
|
|
203
|
-
/**
|
|
204
|
-
* Sets a value in either the persistent storage or the temporary (session) storage.
|
|
205
|
-
*/
|
|
206
|
-
type PixiVNJsonOnlyStorageSet = {
|
|
207
|
-
type: "value";
|
|
208
|
-
storageOperationType: "set";
|
|
209
|
-
/**
|
|
210
|
-
* Key of the storage
|
|
211
|
-
*/
|
|
212
|
-
key: string;
|
|
213
|
-
/**
|
|
214
|
-
* Value to be set in the storage
|
|
215
|
-
*/
|
|
216
|
-
value: StorageElementType | PixiVNJsonValueGet | PixiVNJsonArithmeticOperations | PixiVNJsonConditionalStatements<StorageElementType>;
|
|
217
|
-
/**
|
|
218
|
-
* Type of the storage, if it is a flagStorage or a storage.
|
|
219
|
-
*/
|
|
220
|
-
storageType: "storage" | "tempstorage";
|
|
221
|
-
};
|
|
222
|
-
/**
|
|
223
|
-
* Sets a positional parameter value in the params temporary storage.
|
|
224
|
-
*/
|
|
225
|
-
type PixiVNJsonOnlyParamSet = {
|
|
226
|
-
type: "value";
|
|
227
|
-
storageOperationType: "set";
|
|
228
|
-
/**
|
|
229
|
-
* Index of the parameter in the params array to set.
|
|
230
|
-
*/
|
|
231
|
-
key: number;
|
|
232
|
-
/**
|
|
233
|
-
* Value to be set at the given param index.
|
|
234
|
-
*/
|
|
235
|
-
value: StorageElementType | PixiVNJsonValueGet | PixiVNJsonArithmeticOperations | PixiVNJsonConditionalStatements<StorageElementType>;
|
|
236
|
-
storageType: "params";
|
|
237
|
-
};
|
|
238
|
-
/**
|
|
239
|
-
* Sets a boolean flag in the flag storage.
|
|
240
|
-
* Flag storage is a dedicated boolean key-value store queried with {@link getFlag}.
|
|
241
|
-
*/
|
|
242
|
-
type PixiVNJsonFlagSet = {
|
|
243
|
-
type: "value";
|
|
244
|
-
storageOperationType: "set";
|
|
245
|
-
/**
|
|
246
|
-
* Key of the storage
|
|
247
|
-
*/
|
|
248
|
-
key: string;
|
|
249
|
-
/**
|
|
250
|
-
* Value to be set in the storage
|
|
251
|
-
*/
|
|
252
|
-
value: boolean;
|
|
253
|
-
/**
|
|
254
|
-
* Type of the storage, if it is a flagStorage or a storage.
|
|
255
|
-
*/
|
|
256
|
-
storageType: "flagStorage";
|
|
257
|
-
};
|
|
258
|
-
/**
|
|
259
|
-
* Union of all "set value" operations — writes to storage, flag storage, or params.
|
|
260
|
-
*/
|
|
261
|
-
type PixiVNJsonValueSet = PixiVNJsonOnlyStorageSet | PixiVNJsonFlagSet | PixiVNJsonOnlyParamSet;
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Binary arithmetic operation between two values (left OP right).
|
|
265
|
-
*/
|
|
266
|
-
interface PixiVNJsonArithmeticOperationsArithmetic {
|
|
267
|
-
type: "arithmetic";
|
|
268
|
-
/**
|
|
269
|
-
* Left value of the arithmetic operation
|
|
270
|
-
*/
|
|
271
|
-
leftValue: StorageElementType | PixiVNJsonValueGet | PixiVNJsonArithmeticOperations | PixiVNJsonConditionalStatements<StorageElementType | PixiVNJsonValueGet | PixiVNJsonArithmeticOperations>;
|
|
272
|
-
/**
|
|
273
|
-
* Right value of the arithmetic operation
|
|
274
|
-
*/
|
|
275
|
-
rightValue: StorageElementType | PixiVNJsonValueGet | PixiVNJsonArithmeticOperations | PixiVNJsonConditionalStatements<StorageElementType | PixiVNJsonValueGet | PixiVNJsonArithmeticOperations>;
|
|
276
|
-
/**
|
|
277
|
-
* Operator of the arithmetic operation:
|
|
278
|
-
* - `"*"` multiplication
|
|
279
|
-
* - `"/"` division
|
|
280
|
-
* - `"+"` addition (concatenation for strings and arrays)
|
|
281
|
-
* - `"-"` subtraction (removal of elements for arrays)
|
|
282
|
-
* - `"%"` modulo
|
|
283
|
-
* - `"POW"` exponentiation
|
|
284
|
-
* - `"RANDOM"` random integer between leftValue and rightValue (inclusive)
|
|
285
|
-
* - `"INTERSECTION"` intersection of two arrays (only elements present in both arrays are included in the result)
|
|
286
|
-
*/
|
|
287
|
-
operator: "*" | "/" | "+" | "-" | "%" | "POW" | "RANDOM" | "INTERSECTION";
|
|
288
|
-
}
|
|
289
|
-
/**
|
|
290
|
-
* Unary arithmetic operation applied to a single value (e.g. INT, FLOOR, FLOAT).
|
|
291
|
-
*/
|
|
292
|
-
interface PixiVNJsonArithmeticOperationsArithmeticSingle {
|
|
293
|
-
type: "arithmeticsingle";
|
|
294
|
-
/**
|
|
295
|
-
* Left value of the arithmetic operation
|
|
296
|
-
*/
|
|
297
|
-
leftValue: StorageElementType | PixiVNJsonValueGet | PixiVNJsonArithmeticOperations | PixiVNJsonConditionalStatements<StorageElementType | PixiVNJsonValueGet | PixiVNJsonArithmeticOperations>;
|
|
298
|
-
/**
|
|
299
|
-
* Operator of the arithmetic operation:
|
|
300
|
-
* - `"INT"` truncates the value to an integer (removes the decimal part)
|
|
301
|
-
* - `"FLOOR"` rounds down to the nearest integer
|
|
302
|
-
* - `"FLOAT"` converts the value to a floating-point number
|
|
303
|
-
*/
|
|
304
|
-
operator: "INT" | "FLOOR" | "FLOAT";
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
* Arithmetic operations for the PixiVNJson
|
|
308
|
-
*/
|
|
309
|
-
type PixiVNJsonArithmeticOperations = PixiVNJsonArithmeticOperationsArithmeticSingle | PixiVNJsonArithmeticOperationsArithmetic;
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
* Combines multiple conditions with a logical AND or OR.
|
|
313
|
-
*/
|
|
314
|
-
type PixiVNJsonUnionConditionAndOr = {
|
|
315
|
-
type: "union";
|
|
316
|
-
/**
|
|
317
|
-
* The list of conditions to combine.
|
|
318
|
-
*/
|
|
319
|
-
conditions: PixiVNJsonConditions[];
|
|
320
|
-
/**
|
|
321
|
-
* - `"and"` — all conditions must be true
|
|
322
|
-
* - `"or"` — at least one condition must be true
|
|
323
|
-
*/
|
|
324
|
-
unionType: "and" | "or";
|
|
325
|
-
};
|
|
326
|
-
/**
|
|
327
|
-
* Negates a single condition with a logical NOT.
|
|
328
|
-
*/
|
|
329
|
-
type PixiVNJsonUnionConditionNot = {
|
|
330
|
-
type: "union";
|
|
331
|
-
/**
|
|
332
|
-
* The condition to negate.
|
|
333
|
-
*/
|
|
334
|
-
condition: PixiVNJsonConditions;
|
|
335
|
-
unionType: "not";
|
|
336
|
-
};
|
|
337
|
-
/**
|
|
338
|
-
* Union of AND/OR and NOT logical operators over conditions.
|
|
339
|
-
*/
|
|
340
|
-
type PixiVNJsonUnionCondition = PixiVNJsonUnionConditionAndOr | PixiVNJsonUnionConditionNot;
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* Supported comparison operators.
|
|
344
|
-
* - `"=="` equal
|
|
345
|
-
* - `"!="` not equal
|
|
346
|
-
* - `"<"` less than
|
|
347
|
-
* - `"<="` less than or equal
|
|
348
|
-
* - `">"` greater than
|
|
349
|
-
* - `">="` greater than or equal
|
|
350
|
-
* - `"CONTAINS"` checks whether the left string/array contains the right value, if left and right are arrays, checks if all items in right are included in left
|
|
351
|
-
*/
|
|
352
|
-
type PixiVNJsonComparationOperatorsType = "==" | "!=" | "<" | "<=" | ">" | ">=" | "CONTAINS";
|
|
353
|
-
/**
|
|
354
|
-
* Comparation for PixiVNJson.
|
|
355
|
-
* In this comparation, the values to be converted to string and compared.
|
|
356
|
-
*/
|
|
357
|
-
type PixiVNJsonComparation = {
|
|
358
|
-
type: "compare";
|
|
359
|
-
/**
|
|
360
|
-
* Left value of the comparation
|
|
361
|
-
*/
|
|
362
|
-
leftValue: StorageElementType | PixiVNJsonValueGet | PixiVNJsonConditions;
|
|
363
|
-
/**
|
|
364
|
-
* Right value of the comparation
|
|
365
|
-
*/
|
|
366
|
-
rightValue: StorageElementType | PixiVNJsonValueGet | PixiVNJsonConditions;
|
|
367
|
-
/**
|
|
368
|
-
* Operator of the comparation
|
|
369
|
-
*/
|
|
370
|
-
operator: PixiVNJsonComparationOperatorsType;
|
|
371
|
-
};
|
|
372
|
-
/**
|
|
373
|
-
* A plain value condition — truthy/falsy evaluation of a raw value or a value-get result.
|
|
374
|
-
*/
|
|
375
|
-
type PixiVNJsonValueCondition = StorageElementType | PixiVNJsonValueGet;
|
|
376
|
-
/**
|
|
377
|
-
* Union of all condition types supported by PixiVNJson:
|
|
378
|
-
* - {@link PixiVNJsonComparation} — binary comparison between two values
|
|
379
|
-
* - {@link PixiVNJsonValueCondition} — truthy/falsy check on a plain value
|
|
380
|
-
* - {@link PixiVNJsonUnionCondition} — logical AND, OR, or NOT of other conditions
|
|
381
|
-
* - {@link PixiVNJsonArithmeticOperations} — arithmetic result used as a boolean (non-zero = true)
|
|
382
|
-
*/
|
|
383
|
-
type PixiVNJsonConditions = PixiVNJsonComparation | PixiVNJsonValueCondition | PixiVNJsonUnionCondition | PixiVNJsonArithmeticOperations;
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
* If-Else condition for PixiVNJson
|
|
387
|
-
*/
|
|
388
|
-
interface PixiVNJsonIfElse<Then> {
|
|
389
|
-
type: "ifelse";
|
|
390
|
-
/**
|
|
391
|
-
* The list of conditions to be checked.
|
|
392
|
-
*
|
|
393
|
-
* if is a {@link StorageElementType} or a {@link PixiVNJsonValueGet}:
|
|
394
|
-
* - if is a array or object, the condition is true if not empty
|
|
395
|
-
* - if is a string, the condition is true if not empty
|
|
396
|
-
* - if is a number, the condition is true if not zero
|
|
397
|
-
* - if is a boolean, the condition is true if true
|
|
398
|
-
* - if is null or undefined, the condition is false
|
|
399
|
-
*/
|
|
400
|
-
condition: PixiVNJsonConditions;
|
|
401
|
-
/**
|
|
402
|
-
* The value to be returned if the condition is true.
|
|
403
|
-
*/
|
|
404
|
-
then: Then | PixiVNJsonIfElse<Then>;
|
|
405
|
-
/**
|
|
406
|
-
* The value to be returned if the condition is false.
|
|
407
|
-
*/
|
|
408
|
-
else?: Then | PixiVNJsonIfElse<Then>;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
6
|
/**
|
|
412
7
|
* Animates one or more canvas elements simultaneously using keyframe-based animation.
|
|
413
8
|
*/
|
|
@@ -1004,4 +599,4 @@ type PixiVNJsonLabelStep = {
|
|
|
1004
599
|
conditionalStep?: PixiVNJsonConditionalStatements<PixiVNJsonLabelStep | PixiVNJsonLabelStep[]>;
|
|
1005
600
|
};
|
|
1006
601
|
|
|
1007
|
-
export type {
|
|
602
|
+
export type { PixiVNJsonDialogText as A, PixiVNJsonDialogue as B, PixiVNJsonInputRequest as C, PixiVNJsonLabelToOpen as D, PixiVNJsonMediaTransiotions as E, PixiVNJsonSoundEdit as F, PixiVNJsonSoundPauseResume as G, PixiVNJsonSoundPlay as H, PixiVNJsonSoundRemove as I, PixiVNJsonOperation as P, PixiVNJsonOperationString as a, PixiVNJsonSound as b, PixiVNJsonCanvasImageVideoShow as c, PixiVNJsonImageEdit as d, PixiVNJsonCanvasRemove as e, PixiVNJsonVideoEdit as f, PixiVNJsonVideoPauseResume as g, PixiVNJsonCanvasImageContainerShow as h, PixiVNJsonImageContainerEdit as i, PixiVNJsonCanvasTextShow as j, PixiVNJsonTextEdit as k, PixiVNJsonUnknownEdit as l, PixiVNJsonNarration as m, PixiVNJsonCanvasEffect as n, PixiVNJsonCanvasAnimate as o, PixiVNJsonCanvasClear as p, PixiVNJsonLabelStep as q, PixiVNJsonAnimateBase as r, PixiVNJsonAnimateSequence as s, PixiVNJsonCanvas as t, PixiVNJsonCanvasEdit as u, PixiVNJsonCanvasShow as v, PixiVNJsonChoice as w, PixiVNJsonChoices as x, PixiVNJsonConditionalOperation as y, PixiVNJsonDialog as z };
|
package/dist/actions.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';var core=require('@drincs/pixi-vn-json/core'),canvas=require('@drincs/pixi-vn/canvas'),translator=require('@drincs/pixi-vn-json/translator'),narration=require('@drincs/pixi-vn/narration'),sound=require('@drincs/pixi-vn/sound'),pixiVn=require('@drincs/pixi-vn'),storage=require('@drincs/pixi-vn/storage');async function Je(e){let t=core.JsonUnifier.getLogichValue(e,{});if(t)switch(t.type){case "assets":switch(t.operationType){case "load":await canvas.Assets.load(t.aliases);break;case "lazyload":canvas.Assets.backgroundLoad(t.aliases);break}break;case "bundle":switch(t.operationType){case "load":await canvas.Assets.loadBundle(t.aliases);break;case "lazyload":canvas.Assets.backgroundLoadBundle(t.aliases);break}break}}var n;(o=>(o.log=(r,...l)=>console.log(`[Pixi\u2019VN Json] ${r}`,...l),o.warn=(r,...l)=>console.warn(`[Pixi\u2019VN Json] ${r}`,...l),o.error=(r,...l)=>console.error(`[Pixi\u2019VN Json] ${r}`,...l),o.info=(r,...l)=>console.info(`[Pixi\u2019VN Json] ${r}`,...l)))(n||={});async function w(e,t,i){switch(i.type){case "fade":await canvas.showWithFade(t.alias,e,i.props,i.priority);break;case "dissolve":await canvas.showWithDissolve(t.alias,e,i.props,i.priority);break;case "movein":case "moveout":await canvas.moveIn(t.alias,e,i.props,i.priority);break;case "zoomin":case "zoomout":await canvas.zoomIn(t.alias,e,i.props,i.priority);break;case "pushin":case "pushout":await canvas.pushIn(t.alias,e,i.props,i.priority);break}}function v(e){if(e.transition)switch(e.transition.type){case "fade":canvas.removeWithFade(e.alias,e.transition.props,e.transition.priority);break;case "dissolve":canvas.removeWithDissolve(e.alias,e.transition.props,e.transition.priority);break;case "movein":case "moveout":canvas.moveOut(e.alias,e.transition.props,e.transition.priority);break;case "zoomin":case "zoomout":canvas.zoomOut(e.alias,e.transition.props,e.transition.priority);break;case "pushin":case "pushout":canvas.pushOut(e.alias,e.transition.props,e.transition.priority);break}else canvas.canvas.remove(e.alias);}async function Oe(e){switch(e.operationType){case "show":if(e.transition){let t=new canvas.ImageSprite(e.props,e.url||e.alias);await w(t,e,e.transition);}else await canvas.showImage(e.alias,e.url,e.props);break;case "edit":{let t=canvas.canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):n.error(`Image with alias ${e.alias} not found.`);break}case "remove":v(e);break}}async function Ae(e){switch(e.operationType){case "show":if(e.transition){let t=new canvas.VideoSprite(e.props,e.url||e.alias);await w(t,e,e.transition);}else await canvas.showVideo(e.alias,e.url,e.props);break;case "edit":{let t=canvas.canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):n.error(`Video with alias ${e.alias} not found.`);break}case "remove":v(e);break;case "pause":case "resume":{let t=canvas.canvas.find(e.alias);t?t.paused=e.operationType==="pause":n.error(`Video with alias ${e.alias} not found.`);break}}}async function ke(e){switch(e.operationType){case "show":if(e.transition){let t=new canvas.ImageContainer(e.props,e.urls);await w(t,e,e.transition);}else await canvas.showImageContainer(e.alias,e.urls,e.props);break;case "edit":{let t=canvas.canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):n.error(`ImageContainer with alias ${e.alias} not found.`);break}case "remove":v(e);break}}async function Le(e){switch(e.operationType){case "show":if(e.props=e.props||{},e.props.text=translator.translator.t(e.text),e.transition){let t=new canvas.Text(e.props);await w(t,e,e.transition);}else canvas.showText(e.alias,e.text,e.props);break;case "edit":{let t=canvas.canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):n.error(`Text with alias ${e.alias} not found.`);break}case "remove":v(e);break}}async function je(e){switch(e.operationType){case "edit":try{let t=canvas.canvas.find(e.alias);t?e.props&&t.setMemory({...t.memory,...e.props}):n.error(`Canvas Element with alias ${e.alias} not found.`);}catch(t){n.error(`There was an error while trying to edit the canvas element with alias ${e.alias}.`,t);}break;case "remove":v(e);break}}function Ie(e){e.operationType==="clear"&&canvas.canvas.removeAll();}async function Ee(e){e.type==="shake"&&await canvas.shakeEffect(e.alias,e.props,e.priority);}function Re(e){switch(e.type){case "animate":canvas.canvas.animate(e.alias,e.keyframes,e.options,e.priority);break;case "animate-sequence":canvas.canvas.animate(e.alias,e.sequence,e.options,e.priority);break}}function Me(e){switch(e.type){case "input":narration.narration.requestInput({type:e.valueType},e.defaultValue);break;case "dialogue":narration.narration.dialogue=void 0;break}}function Fe(e){switch(e.operationType){case "play":e.url?sound.sound.play(e.alias,e.url,e.props):sound.sound.play(e.alias,e.props);break;case "stop":switch(e.type){case "sound":sound.sound.stop(e.alias);break;case "all":sound.sound.stopAll();break}break;case "pause":switch(e.type){case "sound":sound.sound.pause(e.alias);break;case "channel":sound.sound.findChannel(e.alias).pauseAll();break;case "all":sound.sound.pauseAll();break}break;case "resume":switch(e.type){case "sound":sound.sound.resume(e.alias);break;case "channel":sound.sound.findChannel(e.alias).resumeAll();break;case "all":sound.sound.resumeAll();break}break;case "edit":Object.entries(e.props).forEach(([t,i])=>{let a=sound.sound.find(e.alias);a&&(t==="volume"?a.volume.value=i:a.paused=i);});break}}var b="___param___";var h=class e{static init(t){t.loadAssets&&(e._loadAssets=t.loadAssets),t.soundOperation&&(e._soundOperation=t.soundOperation),t.imageOperation&&(e._imageOperation=t.imageOperation),t.videoOperation&&(e._videoOperation=t.videoOperation),t.imageContainerOperation&&(e._imageContainerOperation=t.imageContainerOperation),t.textOperation&&(e._textOperation=t.textOperation),t.canvasElementOperation&&(e._canvasElementOperation=t.canvasElementOperation),t.setStorageValue&&(e._setStorageValue=t.setStorageValue),t.setInitialStorageValue&&(e._setInitialStorageValue=t.setInitialStorageValue),t.narrationOperation&&(e._narrationOperation=t.narrationOperation),t.effectOperation&&(e._effectOperation=t.effectOperation),t.animateOperation&&(e._animateOperation=t.animateOperation),t.canvasOperation&&(e._canvasOperation=t.canvasOperation),t.getLogichValue&&(e._getLogichValue=t.getLogichValue),t.getConditionalStep&&(e._getConditionalStep=t.getConditionalStep);}static _loadAssets=()=>{};static get loadAssets(){return e._loadAssets}static _soundOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get soundOperation(){return e._soundOperation}static _imageOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get imageOperation(){return e._imageOperation}static _videoOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get videoOperation(){return e._videoOperation}static _imageContainerOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get imageContainerOperation(){return e._imageContainerOperation}static _textOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get textOperation(){return e._textOperation}static _canvasElementOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get canvasElementOperation(){return e._canvasElementOperation}static _setStorageValue=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get setStorageValue(){return e._setStorageValue}static _setInitialStorageValue=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get setInitialStorageValue(){return e._setInitialStorageValue}static _narrationOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get narrationOperation(){return e._narrationOperation}static _effectOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get effectOperation(){return e._effectOperation}static _animateOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get animateOperation(){return e._animateOperation}static _canvasOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get canvasOperation(){return e._canvasOperation}static _getLogichValue=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get getLogichValue(){return e._getLogichValue}static _getConditionalStep=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get getConditionalStep(){return e._getConditionalStep}};function _(e,t){if(t&&typeof t=="object"&&typeof e.functionName=="string"&&e.functionName in t){let i=t[e.functionName];if(typeof i=="function"){let a=e.args.map(o=>h.getLogichValue(o,t));return i(...a)}else n.warn(`getLogichValue function ${e.functionName} not found in props`);}}function z(e,t){let i=core.JsonUnifier.getLogichValue(e,t);return i&&typeof i=="object"&&"type"in i?core.JsonUnifier.getLogichValue(i,t):i}function ui(e,t={}){let i=z(e.value,t);switch(e.storageType){case "flagStorage":storage.storage.setFlag(e.key,e.value);break;case "storage":storage.storage.set(e.key,i);break;case "tempstorage":storage.storage.setTempVariable(e.key,i);break;case "params":{let a=storage.storage.get(`${b}${narration.narration.openedLabels.length-1}`)||[];a.length>e.key&&(a[e.key]=i),storage.storage.setTempVariable(`${b}${narration.narration.openedLabels.length-1}`,a);break}}}function di(e,t={}){let i=z(e.value,t);switch(e.storageType){case "storage":case "tempstorage":storage.storage.default={[e.key]:i};break}}function k(e,t={}){let i=L(e,t);if(i&&typeof i=="object"&&"type"in i)switch(i.type){case "value":return xe(i,t);case "arithmetic":case "arithmeticsingle":return me(i,t);case "compare":case "union":return ge(i,t);case "function":return _(i,t)}return i}function me(e,t){let i=core.JsonUnifier.getLogichValue(e.leftValue,t);switch(e.type){case "arithmetic":{let a=core.JsonUnifier.getLogichValue(e.rightValue,t);switch(e.operator){case "*":return i*a;case "/":return i/a;case "+":return typeof i=="string"||typeof a=="string"?`${i}${a}`:Array.isArray(i)&&Array.isArray(a)?[...i,...a]:Array.isArray(i)?[...i,a]:Array.isArray(a)?[i,...a]:i+a;case "-":if(Array.isArray(i)&&Array.isArray(a))return i.filter(o=>!a.includes(o));if(Array.isArray(i))return i.filter(o=>o!==a);if(Array.isArray(a)){n.warn("getValueFromArithmeticOperations cannot subtract array from non-array");return}return i-a;case "%":return i%a;case "POW":return i**a;case "RANDOM":return narration.narration.getRandomNumber(i,a);case "INTERSECTION":if(Array.isArray(i)&&Array.isArray(a))return i.filter(o=>a.includes(o));n.warn("getValueFromArithmeticOperations cannot intersect non-array values");return;default:n.warn("getValueFromArithmeticOperations unknown operator",e);return}}case "arithmeticsingle":switch(e.operator){case "INT":return Number(i);case "FLOOR":return Math.floor(i);}break}}function xe(e,t){if(e&&typeof e=="object"&&"type"in e&&e.type==="value"&&e.storageOperationType==="get")switch(e.storageType){case "storage":case "tempstorage":return e.key==="_input_value_"?narration.narration.inputValue:storage.storage.get(e.key);case "flagStorage":return storage.storage.getFlag(e.key);case "label":return narration.narration.getTimesLabelOpened(e.label);case "choice":return narration.narration.getTimesChoiceMade(e.index);case "logic":return core.JsonUnifier.getLogichValue(e.operation,t);case "params":{let i=storage.storage.get(`${b}${narration.narration.openedLabels.length-1}`)||[];if(i&&i.length>e.key)return i[e.key];n.warn("getValue params not found");return}}return e}function ge(e,t){if(!e)return false;if(typeof e!="object"||!("type"in e))return !!e;switch(e.type){case "compare":{let i=core.JsonUnifier.getLogichValue(e.leftValue,t),a=core.JsonUnifier.getLogichValue(e.rightValue,t);switch(e.operator){case "==":return Array.isArray(i)&&Array.isArray(a)?i.length===a.length&&i.every(o=>a.includes(o)):i===a;case "!=":return Array.isArray(i)&&Array.isArray(a)?i.length!==a.length||!i.every(o=>a.includes(o)):i!==a;case "<":return typeof i=="string"&&typeof a=="string"?i.localeCompare(a)<0:Array.isArray(i)&&Array.isArray(a)?i.length<a.length:i<a;case "<=":return typeof i=="string"&&typeof a=="string"?i.localeCompare(a)<=0:Array.isArray(i)&&Array.isArray(a)?i.length<=a.length:i<=a;case ">":return typeof i=="string"&&typeof a=="string"?i.localeCompare(a)>0:Array.isArray(i)&&Array.isArray(a)?i.length>a.length:i>a;case ">=":return typeof i=="string"&&typeof a=="string"?i.localeCompare(a)>=0:Array.isArray(i)&&Array.isArray(a)?i.length>=a.length:i>=a;case "CONTAINS":return Array.isArray(i)&&Array.isArray(a)?a.every(o=>i.includes(o)):Array.isArray(i)?i.includes(a):i.toString().includes(a.toString())}break}case "value":{let i=core.JsonUnifier.getLogichValue(e,t);return Array.isArray(i)?i.length>0:i&&typeof i=="object"?Object.keys(i).length>0:!!i}case "union":return Ve(e,t)}return !!e}function Ve(e,t){if(e.unionType==="not"){let a=k(e.condition,t);return Array.isArray(a)?a.length===0:a&&typeof a=="object"?Object.keys(a).length===0:!a}let i=a=>core.JsonUnifier.getLogichValue(a,t)||false;return e.unionType==="and"?e.conditions.every(i):e.conditions.some(i)}function fe(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function L(e,t={}){if(Array.isArray(e)||!e)return e;if(e&&typeof e=="object"&&"type"in e)switch(e.type){case "resulttocombine":return ye(e,t);case "ifelse":return core.JsonUnifier.getLogichValue(e.condition,t)?core.JsonUnifier.getLogichValue(e.then,t):core.JsonUnifier.getLogichValue(e.else,t);case "stepswitch":{let i=core.JsonUnifier.getLogichValue(e.elements,t)||[];if(i.length===0){n.error("getValueFromConditionalStatements elements.length === 0");return}switch(e.choiceType){case "random":{let a=fe(0,i.length-1);return core.JsonUnifier.getLogichValue(i[a],t)}case "loop":{let a=narration.NarrationManagerStatic.getCurrentStepTimesCounter(e.nestedId)-1;return a>i.length-1?(a=a%i.length,core.JsonUnifier.getLogichValue(i[a],t)):core.JsonUnifier.getLogichValue(i[a],t)}case "sequential":{let a,o=narration.NarrationManagerStatic.getCurrentStepTimesCounter(e.nestedId)-1;return e.end==="lastItem"&&(a=core.JsonUnifier.getLogichValue(i[i.length-1],t)),o>i.length-1?a:core.JsonUnifier.getLogichValue(i[o],t)}case "sequentialrandom":{let a=narration.NarrationManagerStatic.getRandomNumber(0,i.length-1,{nestedId:e.nestedId,onceOnly:true});if(a===void 0&&e.end==="lastItem"){let o=narration.NarrationManagerStatic.getCurrentStepTimesCounterData(e.nestedId);if(!o?.usedRandomNumbers){n.warn("getValueFromConditionalStatements randomIndexWhitExclude == undefined");return}let r=o.usedRandomNumbers[`0-${i.length-1}`];return core.JsonUnifier.getLogichValue(i[r[r.length-1]],t)}if(a===void 0){n.warn("getValueFromConditionalStatements randomIndexWhitExclude == undefined");return}return core.JsonUnifier.getLogichValue(i[a],t)}}}}return e}function M(e,t={}){if(e.conditionalStep){let i=pixiVn.createExportableElement(core.JsonUnifier.getLogichValue(e.conditionalStep,t));if(i?.glueEnabled===void 0&&delete i?.glueEnabled,i?.goNextStep===void 0&&delete i?.goNextStep,i?.end===void 0&&delete i?.end,i?.choices===void 0&&delete i?.choices,i?.dialogue===void 0&&delete i?.dialogue,i?.labelToOpen===void 0&&delete i?.labelToOpen,i?.operations===void 0&&delete i?.operations,i){let a={...e,conditionalStep:void 0,...i};return M(a,t)}else narration.narration.dialogGlue&&(narration.narration.dialogGlue=false);}return e}function ye(e,t){let i=e.firstItem,a=(e.secondConditionalItem??[]).flatMap(r=>Array.isArray(r)?r.map(l=>core.JsonUnifier.getLogichValue(l,t)):[core.JsonUnifier.getLogichValue(r,t)]),o=i?[i,...a]:a;if(o.length===0){n.warn("combinateResult toCheck.length === 0");return}if(typeof o[0]=="string")return translator.translator.t(o);if(typeof o[0]=="object"){let r=o,l,P=false,N=r.map((c,f)=>{c=M(c,t);let u=core.JsonUnifier.getLogichValue(c.dialogue,t)||"";return f===0?(l=core.JsonUnifier.getLogichValue(c.glueEnabled,t)||false,u):(typeof u=="object"&&"text"in u&&(u=`${u.character}: ${u.text}`),l===false&&P&&(u=`
|
|
1
|
+
'use strict';var core=require('@drincs/pixi-vn-json/core'),canvas=require('@drincs/pixi-vn/canvas'),translator=require('@drincs/pixi-vn-json/translator'),narration=require('@drincs/pixi-vn/narration'),sound=require('@drincs/pixi-vn/sound'),pixiVn=require('@drincs/pixi-vn'),storage=require('@drincs/pixi-vn/storage');async function Je(e){let t=core.JsonUnifier.getLogichValue(e,{});if(t)switch(t.type){case "assets":switch(t.operationType){case "load":await canvas.Assets.load(t.aliases);break;case "lazyload":canvas.Assets.backgroundLoad(t.aliases);break}break;case "bundle":switch(t.operationType){case "load":await canvas.Assets.loadBundle(t.aliases);break;case "lazyload":canvas.Assets.backgroundLoadBundle(t.aliases);break}break}}var n;(o=>(o.log=(r,...l)=>console.log(`[Pixi\u2019VN Json] ${r}`,...l),o.warn=(r,...l)=>console.warn(`[Pixi\u2019VN Json] ${r}`,...l),o.error=(r,...l)=>console.error(`[Pixi\u2019VN Json] ${r}`,...l),o.info=(r,...l)=>console.info(`[Pixi\u2019VN Json] ${r}`,...l)))(n||={});async function w(e,t,i){switch(i.type){case "fade":await canvas.showWithFade(t.alias,e,i.props,i.priority);break;case "dissolve":await canvas.showWithDissolve(t.alias,e,i.props,i.priority);break;case "movein":case "moveout":await canvas.moveIn(t.alias,e,i.props,i.priority);break;case "zoomin":case "zoomout":await canvas.zoomIn(t.alias,e,i.props,i.priority);break;case "pushin":case "pushout":await canvas.pushIn(t.alias,e,i.props,i.priority);break}}function v(e){if(e.transition)switch(e.transition.type){case "fade":canvas.removeWithFade(e.alias,e.transition.props,e.transition.priority);break;case "dissolve":canvas.removeWithDissolve(e.alias,e.transition.props,e.transition.priority);break;case "movein":case "moveout":canvas.moveOut(e.alias,e.transition.props,e.transition.priority);break;case "zoomin":case "zoomout":canvas.zoomOut(e.alias,e.transition.props,e.transition.priority);break;case "pushin":case "pushout":canvas.pushOut(e.alias,e.transition.props,e.transition.priority);break}else canvas.canvas.remove(e.alias);}async function Oe(e){switch(e.operationType){case "show":if(e.transition){let t=new canvas.ImageSprite(e.props,e.url||e.alias);await w(t,e,e.transition);}else await canvas.showImage(e.alias,e.url,e.props);break;case "edit":{let t=canvas.canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):n.error(`Image with alias ${e.alias} not found.`);break}case "remove":v(e);break}}async function Ae(e){switch(e.operationType){case "show":if(e.transition){let t=new canvas.VideoSprite(e.props,e.url||e.alias);await w(t,e,e.transition);}else await canvas.showVideo(e.alias,e.url,e.props);break;case "edit":{let t=canvas.canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):n.error(`Video with alias ${e.alias} not found.`);break}case "remove":v(e);break;case "pause":case "resume":{let t=canvas.canvas.find(e.alias);t?t.paused=e.operationType==="pause":n.error(`Video with alias ${e.alias} not found.`);break}}}async function ke(e){switch(e.operationType){case "show":if(e.transition){let t=new canvas.ImageContainer(e.props,e.urls);await w(t,e,e.transition);}else await canvas.showImageContainer(e.alias,e.urls,e.props);break;case "edit":{let t=canvas.canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):n.error(`ImageContainer with alias ${e.alias} not found.`);break}case "remove":v(e);break}}async function je(e){switch(e.operationType){case "show":if(e.props=e.props||{},e.props.text=translator.translator.t(e.text),e.transition){let t=new canvas.Text(e.props);await w(t,e,e.transition);}else canvas.showText(e.alias,e.text,e.props);break;case "edit":{let t=canvas.canvas.find(e.alias);t?e.props&&await t.setMemory({...t.memory,...e.props}):n.error(`Text with alias ${e.alias} not found.`);break}case "remove":v(e);break}}async function Le(e){switch(e.operationType){case "edit":try{let t=canvas.canvas.find(e.alias);t?e.props&&t.setMemory({...t.memory,...e.props}):n.error(`Canvas Element with alias ${e.alias} not found.`);}catch(t){n.error(`There was an error while trying to edit the canvas element with alias ${e.alias}.`,t);}break;case "remove":v(e);break}}function Ie(e){e.operationType==="clear"&&canvas.canvas.removeAll();}async function Ee(e){e.type==="shake"&&await canvas.shakeEffect(e.alias,e.props,e.priority);}function Re(e){switch(e.type){case "animate":canvas.canvas.animate(e.alias,e.keyframes,e.options,e.priority);break;case "animate-sequence":canvas.canvas.animate(e.alias,e.sequence,e.options,e.priority);break}}function Me(e){switch(e.type){case "input":narration.narration.requestInput({type:e.valueType},e.defaultValue);break;case "dialogue":narration.narration.dialogue=void 0;break}}function Fe(e){switch(e.operationType){case "play":e.url?sound.sound.play(e.alias,e.url,e.props):sound.sound.play(e.alias,e.props);break;case "stop":switch(e.type){case "sound":sound.sound.stop(e.alias);break;case "all":sound.sound.stopAll();break}break;case "pause":switch(e.type){case "sound":sound.sound.pause(e.alias);break;case "channel":sound.sound.findChannel(e.alias).pauseAll();break;case "all":sound.sound.pauseAll();break}break;case "resume":switch(e.type){case "sound":sound.sound.resume(e.alias);break;case "channel":sound.sound.findChannel(e.alias).resumeAll();break;case "all":sound.sound.resumeAll();break}break;case "edit":Object.entries(e.props).forEach(([t,i])=>{let a=sound.sound.find(e.alias);a&&(t==="volume"?a.volume.value=i:a.paused=i);});break}}var b="___param___";var h=class e{static init(t){t.loadAssets&&(e._loadAssets=t.loadAssets),t.soundOperation&&(e._soundOperation=t.soundOperation),t.imageOperation&&(e._imageOperation=t.imageOperation),t.videoOperation&&(e._videoOperation=t.videoOperation),t.imageContainerOperation&&(e._imageContainerOperation=t.imageContainerOperation),t.textOperation&&(e._textOperation=t.textOperation),t.canvasElementOperation&&(e._canvasElementOperation=t.canvasElementOperation),t.setStorageValue&&(e._setStorageValue=t.setStorageValue),t.setInitialStorageValue&&(e._setInitialStorageValue=t.setInitialStorageValue),t.narrationOperation&&(e._narrationOperation=t.narrationOperation),t.effectOperation&&(e._effectOperation=t.effectOperation),t.animateOperation&&(e._animateOperation=t.animateOperation),t.canvasOperation&&(e._canvasOperation=t.canvasOperation),t.getLogichValue&&(e._getLogichValue=t.getLogichValue),t.getConditionalStep&&(e._getConditionalStep=t.getConditionalStep);}static _loadAssets=()=>{};static get loadAssets(){return e._loadAssets}static _soundOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get soundOperation(){return e._soundOperation}static _imageOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get imageOperation(){return e._imageOperation}static _videoOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get videoOperation(){return e._videoOperation}static _imageContainerOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get imageContainerOperation(){return e._imageContainerOperation}static _textOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get textOperation(){return e._textOperation}static _canvasElementOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get canvasElementOperation(){return e._canvasElementOperation}static _setStorageValue=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get setStorageValue(){return e._setStorageValue}static _setInitialStorageValue=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get setInitialStorageValue(){return e._setInitialStorageValue}static _narrationOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get narrationOperation(){return e._narrationOperation}static _effectOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get effectOperation(){return e._effectOperation}static _animateOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get animateOperation(){return e._animateOperation}static _canvasOperation=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get canvasOperation(){return e._canvasOperation}static _getLogichValue=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get getLogichValue(){return e._getLogichValue}static _getConditionalStep=()=>{throw n.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")};static get getConditionalStep(){return e._getConditionalStep}};function _(e,t){if(t&&typeof t=="object"&&typeof e.functionName=="string"&&e.functionName in t){let i=t[e.functionName];if(typeof i=="function"){let a=e.args.map(o=>h.getLogichValue(o,t));return i(...a)}else n.warn(`getLogichValue function ${e.functionName} not found in props`);}}function z(e,t){let i=core.JsonUnifier.getLogichValue(e,t);return i&&typeof i=="object"&&"type"in i?core.JsonUnifier.getLogichValue(i,t):i}function ui(e,t={}){let i=z(e.value,t);switch(e.storageType){case "flagStorage":storage.storage.setFlag(e.key,e.value);break;case "storage":storage.storage.set(e.key,i);break;case "tempstorage":storage.storage.setTempVariable(e.key,i);break;case "params":{let a=storage.storage.get(`${b}${narration.narration.openedLabels.length-1}`)||[];a.length>e.key&&(a[e.key]=i),storage.storage.setTempVariable(`${b}${narration.narration.openedLabels.length-1}`,a);break}}}function di(e,t={}){let i=z(e.value,t);switch(e.storageType){case "storage":case "tempstorage":storage.storage.default={[e.key]:i};break}}function k(e,t={}){let i=j(e,t);if(i&&typeof i=="object"&&"type"in i)switch(i.type){case "value":return xe(i,t);case "arithmetic":case "arithmeticsingle":return me(i,t);case "compare":case "union":return ge(i,t);case "function":return _(i,t)}return i}function me(e,t){let i=core.JsonUnifier.getLogichValue(e.leftValue,t);switch(e.type){case "arithmetic":{let a=core.JsonUnifier.getLogichValue(e.rightValue,t);switch(e.operator){case "*":return i*a;case "/":return i/a;case "+":return typeof i=="string"||typeof a=="string"?`${i}${a}`:Array.isArray(i)&&Array.isArray(a)?[...i,...a]:Array.isArray(i)?[...i,a]:Array.isArray(a)?[i,...a]:i+a;case "-":if(Array.isArray(i)&&Array.isArray(a))return i.filter(o=>!a.includes(o));if(Array.isArray(i))return i.filter(o=>o!==a);if(Array.isArray(a)){n.warn("getValueFromArithmeticOperations cannot subtract array from non-array");return}return i-a;case "%":return i%a;case "POW":return i**a;case "RANDOM":return narration.narration.getRandomNumber(i,a);case "INTERSECTION":if(Array.isArray(i)&&Array.isArray(a))return i.filter(o=>a.includes(o));n.warn("getValueFromArithmeticOperations cannot intersect non-array values");return;default:n.warn("getValueFromArithmeticOperations unknown operator",e);return}}case "arithmeticsingle":switch(e.operator){case "INT":return Number(i);case "FLOOR":return Math.floor(i);}break}}function xe(e,t){if(e&&typeof e=="object"&&"type"in e&&e.type==="value"&&e.storageOperationType==="get")switch(e.storageType){case "storage":case "tempstorage":return e.key==="_input_value_"?narration.narration.inputValue:storage.storage.get(e.key);case "flagStorage":return storage.storage.getFlag(e.key);case "label":return narration.narration.getTimesLabelOpened(e.label);case "choice":return narration.narration.getTimesChoiceMade(e.index);case "logic":return core.JsonUnifier.getLogichValue(e.operation,t);case "params":{let i=storage.storage.get(`${b}${narration.narration.openedLabels.length-1}`)||[];if(i&&i.length>e.key)return i[e.key];n.warn("getValue params not found");return}}return e}function ge(e,t){if(!e)return false;if(typeof e!="object"||!("type"in e))return !!e;switch(e.type){case "compare":{let i=core.JsonUnifier.getLogichValue(e.leftValue,t),a=core.JsonUnifier.getLogichValue(e.rightValue,t);switch(e.operator){case "==":return Array.isArray(i)&&Array.isArray(a)?i.length===a.length&&i.every(o=>a.includes(o)):i===a;case "!=":return Array.isArray(i)&&Array.isArray(a)?i.length!==a.length||!i.every(o=>a.includes(o)):i!==a;case "<":return typeof i=="string"&&typeof a=="string"?i.localeCompare(a)<0:Array.isArray(i)&&Array.isArray(a)?i.length<a.length:i<a;case "<=":return typeof i=="string"&&typeof a=="string"?i.localeCompare(a)<=0:Array.isArray(i)&&Array.isArray(a)?i.length<=a.length:i<=a;case ">":return typeof i=="string"&&typeof a=="string"?i.localeCompare(a)>0:Array.isArray(i)&&Array.isArray(a)?i.length>a.length:i>a;case ">=":return typeof i=="string"&&typeof a=="string"?i.localeCompare(a)>=0:Array.isArray(i)&&Array.isArray(a)?i.length>=a.length:i>=a;case "CONTAINS":return Array.isArray(i)&&Array.isArray(a)?a.every(o=>i.includes(o)):Array.isArray(i)?i.includes(a):i.toString().includes(a.toString())}break}case "value":{let i=core.JsonUnifier.getLogichValue(e,t);return Array.isArray(i)?i.length>0:i&&typeof i=="object"?Object.keys(i).length>0:!!i}case "union":return Ve(e,t)}return !!e}function Ve(e,t){if(e.unionType==="not"){let a=k(e.condition,t);return Array.isArray(a)?a.length===0:a&&typeof a=="object"?Object.keys(a).length===0:!a}let i=a=>core.JsonUnifier.getLogichValue(a,t)||false;return e.unionType==="and"?e.conditions.every(i):e.conditions.some(i)}function fe(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function j(e,t={}){if(Array.isArray(e)||!e)return e;if(e&&typeof e=="object"&&"type"in e)switch(e.type){case "resulttocombine":return ye(e,t);case "ifelse":return core.JsonUnifier.getLogichValue(e.condition,t)?core.JsonUnifier.getLogichValue(e.then,t):core.JsonUnifier.getLogichValue(e.else,t);case "stepswitch":{let i=core.JsonUnifier.getLogichValue(e.elements,t)||[];if(i.length===0){n.error("getValueFromConditionalStatements elements.length === 0");return}switch(e.choiceType){case "random":{let a=fe(0,i.length-1);return core.JsonUnifier.getLogichValue(i[a],t)}case "loop":{let a=narration.NarrationManagerStatic.getCurrentStepTimesCounter(e.nestedId)-1;return a>i.length-1?(a=a%i.length,core.JsonUnifier.getLogichValue(i[a],t)):core.JsonUnifier.getLogichValue(i[a],t)}case "sequential":{let a,o=narration.NarrationManagerStatic.getCurrentStepTimesCounter(e.nestedId)-1;return e.end==="lastItem"&&(a=core.JsonUnifier.getLogichValue(i[i.length-1],t)),o>i.length-1?a:core.JsonUnifier.getLogichValue(i[o],t)}case "sequentialrandom":{let a=narration.NarrationManagerStatic.getRandomNumber(0,i.length-1,{nestedId:e.nestedId,onceOnly:true});if(a===void 0&&e.end==="lastItem"){let o=narration.NarrationManagerStatic.getCurrentStepTimesCounterData(e.nestedId);if(!o?.usedRandomNumbers){n.warn("getValueFromConditionalStatements randomIndexWhitExclude == undefined");return}let r=o.usedRandomNumbers[`0-${i.length-1}`];return core.JsonUnifier.getLogichValue(i[r[r.length-1]],t)}if(a===void 0){n.warn("getValueFromConditionalStatements randomIndexWhitExclude == undefined");return}return core.JsonUnifier.getLogichValue(i[a],t)}}}}return e}function M(e,t={}){if(e.conditionalStep){let i=pixiVn.createExportableElement(core.JsonUnifier.getLogichValue(e.conditionalStep,t));if(i?.glueEnabled===void 0&&delete i?.glueEnabled,i?.goNextStep===void 0&&delete i?.goNextStep,i?.end===void 0&&delete i?.end,i?.choices===void 0&&delete i?.choices,i?.dialogue===void 0&&delete i?.dialogue,i?.labelToOpen===void 0&&delete i?.labelToOpen,i?.operations===void 0&&delete i?.operations,i){let a={...e,conditionalStep:void 0,...i};return M(a,t)}else narration.narration.dialogGlue&&(narration.narration.dialogGlue=false);}return e}function ye(e,t){let i=e.firstItem,a=(e.secondConditionalItem??[]).flatMap(r=>Array.isArray(r)?r.map(l=>core.JsonUnifier.getLogichValue(l,t)):[core.JsonUnifier.getLogichValue(r,t)]),o=i?[i,...a]:a;if(o.length===0){n.warn("combinateResult toCheck.length === 0");return}if(typeof o[0]=="string")return translator.translator.t(o);if(typeof o[0]=="object"){let r=o,l,P=false,N=r.map((c,f)=>{c=M(c,t);let u=core.JsonUnifier.getLogichValue(c.dialogue,t)||"";return f===0?(l=core.JsonUnifier.getLogichValue(c.glueEnabled,t)||false,u):(typeof u=="object"&&"text"in u&&(u=`${u.character}: ${u.text}`),l===false&&P&&(u=`
|
|
2
2
|
|
|
3
|
-
${u}`),u&&(P=true),l=core.JsonUnifier.getLogichValue(c.glueEnabled,t)||false,u)}),V=core.JsonUnifier.getLogichValue(N[0],t),y=typeof V=="object"&&"character"in V?V.character:void 0,J=N.flatMap(c=>{let f;c&&typeof c=="object"&&"text"in c?f=c.text:f=c;let u;return Array.isArray(f)?u=f.map(F=>{let D=core.JsonUnifier.getLogichValue(F,t);return translator.translator.t(`${D}`)}):u=core.JsonUnifier.getLogichValue(f,t)||"",translator.translator.t(u)}),C=r.find(c=>c.end),G=r.find(c=>c.choices),
|
|
3
|
+
${u}`),u&&(P=true),l=core.JsonUnifier.getLogichValue(c.glueEnabled,t)||false,u)}),V=core.JsonUnifier.getLogichValue(N[0],t),y=typeof V=="object"&&"character"in V?V.character:void 0,J=N.flatMap(c=>{let f;c&&typeof c=="object"&&"text"in c?f=c.text:f=c;let u;return Array.isArray(f)?u=f.map(F=>{let D=core.JsonUnifier.getLogichValue(F,t);return translator.translator.t(`${D}`)}):u=core.JsonUnifier.getLogichValue(f,t)||"",translator.translator.t(u)}),C=r.find(c=>c.end),G=r.find(c=>c.choices),L=false,I=false;r.length>0&&(r[0].glueEnabled&&r[0].goNextStep&&r[0].dialogue===void 0&&(narration.narration.dialogGlue=true),L=r[r.length-1].glueEnabled,I=r.reverse().find(c=>!(c.operations&&(!c.dialogue||!c.choices)))?.goNextStep);let $=r.find(c=>c.labelToOpen),O=[];return r.forEach(c=>{c.operations&&(O=[...O,...c.operations]);}),{dialogue:y?{character:y,text:J}:J,end:C?.end,choices:G?.choices,glueEnabled:L,goNextStep:I,labelToOpen:$?.labelToOpen,operations:O}}}exports.VariableGetter=void 0;(o=>{let e=new Set;function t(r){e.add(r);}o.add=t;function i(){e.clear();}o.clear=i;function a(r,l={}){let P=y=>k(y,l)??void 0,N=j(r,l);if(e.size===0)return P(N);let V=P;for(let y of e){let J=V;V=C=>y(C,J)??void 0;}return V(N)}o.getLogichValue=a;})(exports.VariableGetter||={});exports.animateOperation=Re;exports.canvasElementOperation=Le;exports.canvasOperation=Ie;exports.effectOperation=Ee;exports.getConditionalStep=M;exports.getLogichValue=k;exports.getValueFromConditionalStatements=j;exports.imageContainerOperation=ke;exports.imageOperation=Oe;exports.loadAssets=Je;exports.narrationOperation=Me;exports.setInitialStorageValue=di;exports.setStorageValue=ui;exports.soundOperation=Fe;exports.textOperation=je;exports.videoOperation=Ae;
|
package/dist/actions.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { P as
|
|
1
|
+
import { P as PixiVNJsonIfElse, c as PixiVNJsonValueGet, d as PixiVNJsonArithmeticOperations, e as PixiVNJsonConditions, m as PixiVNJsonFunction, f as PixiVNJsonConditionalStatements, l as PixiVNJsonConditionalResultToCombine, b as PixiVNJsonOnlyStorageSet, a as PixiVNJsonValueSet } from './PixiVNJsonIfElse-B_OG8Qs1.cjs';
|
|
2
|
+
import { P as PixiVNJsonOperation, a as PixiVNJsonOperationString, o as PixiVNJsonCanvasAnimate, l as PixiVNJsonUnknownEdit, e as PixiVNJsonCanvasRemove, p as PixiVNJsonCanvasClear, n as PixiVNJsonCanvasEffect, h as PixiVNJsonCanvasImageContainerShow, i as PixiVNJsonImageContainerEdit, c as PixiVNJsonCanvasImageVideoShow, d as PixiVNJsonImageEdit, j as PixiVNJsonCanvasTextShow, k as PixiVNJsonTextEdit, f as PixiVNJsonVideoEdit, g as PixiVNJsonVideoPauseResume, m as PixiVNJsonNarration, b as PixiVNJsonSound, q as PixiVNJsonLabelStep } from './PixiVNJsonLabelStep-D-FkTLeR.cjs';
|
|
2
3
|
import { ImageSpriteMemory, VideoSpriteMemory, ContainerMemory, ContainerChild } from '@drincs/pixi-vn/canvas';
|
|
3
4
|
import { StepLabelPropsType } from '@drincs/pixi-vn/narration';
|
|
4
5
|
import { StorageElementType } from '@drincs/pixi-vn/storage';
|
package/dist/actions.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { P as
|
|
1
|
+
import { P as PixiVNJsonIfElse, c as PixiVNJsonValueGet, d as PixiVNJsonArithmeticOperations, e as PixiVNJsonConditions, m as PixiVNJsonFunction, f as PixiVNJsonConditionalStatements, l as PixiVNJsonConditionalResultToCombine, b as PixiVNJsonOnlyStorageSet, a as PixiVNJsonValueSet } from './PixiVNJsonIfElse-B_OG8Qs1.js';
|
|
2
|
+
import { P as PixiVNJsonOperation, a as PixiVNJsonOperationString, o as PixiVNJsonCanvasAnimate, l as PixiVNJsonUnknownEdit, e as PixiVNJsonCanvasRemove, p as PixiVNJsonCanvasClear, n as PixiVNJsonCanvasEffect, h as PixiVNJsonCanvasImageContainerShow, i as PixiVNJsonImageContainerEdit, c as PixiVNJsonCanvasImageVideoShow, d as PixiVNJsonImageEdit, j as PixiVNJsonCanvasTextShow, k as PixiVNJsonTextEdit, f as PixiVNJsonVideoEdit, g as PixiVNJsonVideoPauseResume, m as PixiVNJsonNarration, b as PixiVNJsonSound, q as PixiVNJsonLabelStep } from './PixiVNJsonLabelStep-CELQY8TP.js';
|
|
2
3
|
import { ImageSpriteMemory, VideoSpriteMemory, ContainerMemory, ContainerChild } from '@drincs/pixi-vn/canvas';
|
|
3
4
|
import { StepLabelPropsType } from '@drincs/pixi-vn/narration';
|
|
4
5
|
import { StorageElementType } from '@drincs/pixi-vn/storage';
|