scjson 0.1.7 → 0.2.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/README.md +93 -0
- package/browser.cjs +243 -0
- package/browser.mjs +1 -1
- package/index.js +1 -1
- package/package.json +15 -2
- package/scjson.schema.json +1700 -0
- package/scjsonProps.ts +618 -0
- package/types/scjsonProps.d.ts +452 -0
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* scjsonProps.d.ts : Properties definition file for scjson types
|
|
3
|
+
*
|
|
4
|
+
* Part of the scjson project.
|
|
5
|
+
* Developed by Softoboros Technology Inc.
|
|
6
|
+
* Licensed under the BSD 1-Clause License.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export interface AssignProps {
|
|
10
|
+
location: string;
|
|
11
|
+
expr: string | null;
|
|
12
|
+
typeValue: typeof AssignTypeDatatypeProps;
|
|
13
|
+
attr: string | null;
|
|
14
|
+
otherAttributes: Record<string, object>;
|
|
15
|
+
content: Record<string, object>[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare const defaultAssign: () => AssignProps;
|
|
19
|
+
|
|
20
|
+
export type AssignTypeDatatypePropsType =
|
|
21
|
+
| "addattribute"
|
|
22
|
+
| "delete"
|
|
23
|
+
| "firstchild"
|
|
24
|
+
| "lastchild"
|
|
25
|
+
| "nextsibling"
|
|
26
|
+
| "previoussibling"
|
|
27
|
+
| "replace"
|
|
28
|
+
| "replacechildren"
|
|
29
|
+
;
|
|
30
|
+
|
|
31
|
+
export declare const AssignTypeDatatypeProps: {
|
|
32
|
+
readonly Addattribute: "addattribute",
|
|
33
|
+
readonly Delete: "delete",
|
|
34
|
+
readonly Firstchild: "firstchild",
|
|
35
|
+
readonly Lastchild: "lastchild",
|
|
36
|
+
readonly Nextsibling: "nextsibling",
|
|
37
|
+
readonly Previoussibling: "previoussibling",
|
|
38
|
+
readonly Replace: "replace",
|
|
39
|
+
readonly Replacechildren: "replacechildren",
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export type BindingDatatypePropsType =
|
|
43
|
+
| "early"
|
|
44
|
+
| "late"
|
|
45
|
+
;
|
|
46
|
+
|
|
47
|
+
export declare const BindingDatatypeProps: {
|
|
48
|
+
readonly Early: "early",
|
|
49
|
+
readonly Late: "late",
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export type BooleanDatatypePropsType =
|
|
53
|
+
| "false"
|
|
54
|
+
| "true"
|
|
55
|
+
;
|
|
56
|
+
|
|
57
|
+
export declare const BooleanDatatypeProps: {
|
|
58
|
+
readonly False: "false",
|
|
59
|
+
readonly True: "true",
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export interface CancelProps {
|
|
63
|
+
otherElement: Record<string, object>[];
|
|
64
|
+
sendid: string | null;
|
|
65
|
+
sendidexpr: string | null;
|
|
66
|
+
otherAttributes: Record<string, object>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export declare const defaultCancel: () => CancelProps;
|
|
70
|
+
|
|
71
|
+
export interface ContentProps {
|
|
72
|
+
otherAttributes: Record<string, object>;
|
|
73
|
+
expr: string | null;
|
|
74
|
+
content: Record<string, object>[];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export declare const defaultContent: () => ContentProps;
|
|
78
|
+
|
|
79
|
+
export interface DataProps {
|
|
80
|
+
id: string;
|
|
81
|
+
src: string | null;
|
|
82
|
+
expr: string | null;
|
|
83
|
+
otherAttributes: Record<string, object>;
|
|
84
|
+
content: Record<string, object>[];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export declare const defaultData: () => DataProps;
|
|
88
|
+
|
|
89
|
+
export interface DatamodelProps {
|
|
90
|
+
data: DataProps[];
|
|
91
|
+
otherElement: Record<string, object>[];
|
|
92
|
+
otherAttributes: Record<string, object>;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export declare const defaultDatamodel: () => DatamodelProps;
|
|
96
|
+
|
|
97
|
+
export interface DonedataProps {
|
|
98
|
+
content: ContentProps | null;
|
|
99
|
+
param: ParamProps[];
|
|
100
|
+
otherAttributes: Record<string, object>;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export declare const defaultDonedata: () => DonedataProps;
|
|
104
|
+
|
|
105
|
+
export interface ElseProps {
|
|
106
|
+
otherAttributes: Record<string, object>;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export declare const defaultElse: () => ElseProps;
|
|
110
|
+
|
|
111
|
+
export interface ElseifProps {
|
|
112
|
+
cond: string;
|
|
113
|
+
otherAttributes: Record<string, object>;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export declare const defaultElseif: () => ElseifProps;
|
|
117
|
+
|
|
118
|
+
export type ExmodeDatatypePropsType =
|
|
119
|
+
| "lax"
|
|
120
|
+
| "strict"
|
|
121
|
+
;
|
|
122
|
+
|
|
123
|
+
export declare const ExmodeDatatypeProps: {
|
|
124
|
+
readonly Lax: "lax",
|
|
125
|
+
readonly Strict: "strict",
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export interface FinalProps {
|
|
129
|
+
onentry: OnentryProps[];
|
|
130
|
+
onexit: OnexitProps[];
|
|
131
|
+
donedata: DonedataProps[];
|
|
132
|
+
otherElement: Record<string, object>[];
|
|
133
|
+
id: string | null;
|
|
134
|
+
otherAttributes: Record<string, object>;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export declare const defaultFinal: () => FinalProps;
|
|
138
|
+
|
|
139
|
+
export interface FinalizeProps {
|
|
140
|
+
otherElement: Record<string, object>[];
|
|
141
|
+
raiseValue: RaiseProps[];
|
|
142
|
+
ifValue: IfProps[];
|
|
143
|
+
foreach: ForeachProps[];
|
|
144
|
+
send: SendProps[];
|
|
145
|
+
script: ScriptProps[];
|
|
146
|
+
assign: AssignProps[];
|
|
147
|
+
log: LogProps[];
|
|
148
|
+
cancel: CancelProps[];
|
|
149
|
+
otherAttributes: Record<string, object>;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export declare const defaultFinalize: () => FinalizeProps;
|
|
153
|
+
|
|
154
|
+
export interface ForeachProps {
|
|
155
|
+
otherElement: Record<string, object>[];
|
|
156
|
+
raiseValue: RaiseProps[];
|
|
157
|
+
ifValue: IfProps[];
|
|
158
|
+
foreach: ForeachProps[];
|
|
159
|
+
send: SendProps[];
|
|
160
|
+
script: ScriptProps[];
|
|
161
|
+
assign: AssignProps[];
|
|
162
|
+
log: LogProps[];
|
|
163
|
+
cancel: CancelProps[];
|
|
164
|
+
array: string;
|
|
165
|
+
item: string;
|
|
166
|
+
index: string | null;
|
|
167
|
+
otherAttributes: Record<string, object>;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export declare const defaultForeach: () => ForeachProps;
|
|
171
|
+
|
|
172
|
+
export interface HistoryProps {
|
|
173
|
+
otherElement: Record<string, object>[];
|
|
174
|
+
transition: TransitionProps;
|
|
175
|
+
id: string | null;
|
|
176
|
+
typeValue: typeof HistoryTypeDatatypeProps | null;
|
|
177
|
+
otherAttributes: Record<string, object>;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export declare const defaultHistory: () => HistoryProps;
|
|
181
|
+
|
|
182
|
+
export type HistoryTypeDatatypePropsType =
|
|
183
|
+
| "deep"
|
|
184
|
+
| "shallow"
|
|
185
|
+
;
|
|
186
|
+
|
|
187
|
+
export declare const HistoryTypeDatatypeProps: {
|
|
188
|
+
readonly Deep: "deep",
|
|
189
|
+
readonly Shallow: "shallow",
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
export interface IfProps {
|
|
193
|
+
otherElement: Record<string, object>[];
|
|
194
|
+
raiseValue: RaiseProps[];
|
|
195
|
+
ifValue: IfProps[];
|
|
196
|
+
foreach: ForeachProps[];
|
|
197
|
+
send: SendProps[];
|
|
198
|
+
script: ScriptProps[];
|
|
199
|
+
assign: AssignProps[];
|
|
200
|
+
log: LogProps[];
|
|
201
|
+
cancel: CancelProps[];
|
|
202
|
+
elseif: ElseifProps | null;
|
|
203
|
+
elseValue: ElseProps | null;
|
|
204
|
+
cond: string;
|
|
205
|
+
otherAttributes: Record<string, object>;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export declare const defaultIf: () => IfProps;
|
|
209
|
+
|
|
210
|
+
export interface InitialProps {
|
|
211
|
+
otherElement: Record<string, object>[];
|
|
212
|
+
transition: TransitionProps;
|
|
213
|
+
otherAttributes: Record<string, object>;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export declare const defaultInitial: () => InitialProps;
|
|
217
|
+
|
|
218
|
+
export interface InvokeProps {
|
|
219
|
+
content: ContentProps[];
|
|
220
|
+
param: ParamProps[];
|
|
221
|
+
finalize: FinalizeProps[];
|
|
222
|
+
otherElement: Record<string, object>[];
|
|
223
|
+
typeValue: string;
|
|
224
|
+
typeexpr: string | null;
|
|
225
|
+
src: string | null;
|
|
226
|
+
srcexpr: string | null;
|
|
227
|
+
id: string | null;
|
|
228
|
+
idlocation: string | null;
|
|
229
|
+
namelist: string | null;
|
|
230
|
+
autoforward: typeof BooleanDatatypeProps;
|
|
231
|
+
otherAttributes: Record<string, object>;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export declare const defaultInvoke: () => InvokeProps;
|
|
235
|
+
|
|
236
|
+
export interface LogProps {
|
|
237
|
+
otherElement: Record<string, object>[];
|
|
238
|
+
label: string | null;
|
|
239
|
+
expr: string | null;
|
|
240
|
+
otherAttributes: Record<string, object>;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export declare const defaultLog: () => LogProps;
|
|
244
|
+
|
|
245
|
+
export interface OnentryProps {
|
|
246
|
+
otherElement: Record<string, object>[];
|
|
247
|
+
raiseValue: RaiseProps[];
|
|
248
|
+
ifValue: IfProps[];
|
|
249
|
+
foreach: ForeachProps[];
|
|
250
|
+
send: SendProps[];
|
|
251
|
+
script: ScriptProps[];
|
|
252
|
+
assign: AssignProps[];
|
|
253
|
+
log: LogProps[];
|
|
254
|
+
cancel: CancelProps[];
|
|
255
|
+
otherAttributes: Record<string, object>;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export declare const defaultOnentry: () => OnentryProps;
|
|
259
|
+
|
|
260
|
+
export interface OnexitProps {
|
|
261
|
+
otherElement: Record<string, object>[];
|
|
262
|
+
raiseValue: RaiseProps[];
|
|
263
|
+
ifValue: IfProps[];
|
|
264
|
+
foreach: ForeachProps[];
|
|
265
|
+
send: SendProps[];
|
|
266
|
+
script: ScriptProps[];
|
|
267
|
+
assign: AssignProps[];
|
|
268
|
+
log: LogProps[];
|
|
269
|
+
cancel: CancelProps[];
|
|
270
|
+
otherAttributes: Record<string, object>;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export declare const defaultOnexit: () => OnexitProps;
|
|
274
|
+
|
|
275
|
+
export interface ParallelProps {
|
|
276
|
+
onentry: OnentryProps[];
|
|
277
|
+
onexit: OnexitProps[];
|
|
278
|
+
transition: TransitionProps[];
|
|
279
|
+
state: StateProps[];
|
|
280
|
+
parallel: ParallelProps[];
|
|
281
|
+
history: HistoryProps[];
|
|
282
|
+
datamodel: DatamodelProps[];
|
|
283
|
+
invoke: InvokeProps[];
|
|
284
|
+
otherElement: Record<string, object>[];
|
|
285
|
+
id: string | null;
|
|
286
|
+
otherAttributes: Record<string, object>;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export declare const defaultParallel: () => ParallelProps;
|
|
290
|
+
|
|
291
|
+
export interface ParamProps {
|
|
292
|
+
otherElement: Record<string, object>[];
|
|
293
|
+
name: string;
|
|
294
|
+
expr: string | null;
|
|
295
|
+
location: string | null;
|
|
296
|
+
otherAttributes: Record<string, object>;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export declare const defaultParam: () => ParamProps;
|
|
300
|
+
|
|
301
|
+
export interface RaiseProps {
|
|
302
|
+
event: string;
|
|
303
|
+
otherAttributes: Record<string, object>;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
export declare const defaultRaise: () => RaiseProps;
|
|
307
|
+
|
|
308
|
+
export interface ScriptProps {
|
|
309
|
+
src: string | null;
|
|
310
|
+
otherAttributes: Record<string, object>;
|
|
311
|
+
content: Record<string, object>[];
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
export declare const defaultScript: () => ScriptProps;
|
|
315
|
+
|
|
316
|
+
export interface ScxmlProps {
|
|
317
|
+
state: StateProps[];
|
|
318
|
+
parallel: ParallelProps[];
|
|
319
|
+
final: FinalProps[];
|
|
320
|
+
datamodel: DatamodelProps[];
|
|
321
|
+
script: ScriptProps[];
|
|
322
|
+
otherElement: Record<string, object>[];
|
|
323
|
+
initial: string[];
|
|
324
|
+
name: string | null;
|
|
325
|
+
version: number | string;
|
|
326
|
+
datamodelAttribute: string;
|
|
327
|
+
binding: typeof BindingDatatypeProps | null;
|
|
328
|
+
exmode: typeof ExmodeDatatypeProps | null;
|
|
329
|
+
otherAttributes: Record<string, object>;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export declare const defaultScxml: () => ScxmlProps;
|
|
333
|
+
|
|
334
|
+
export interface SendProps {
|
|
335
|
+
content: ContentProps[];
|
|
336
|
+
param: ParamProps[];
|
|
337
|
+
otherElement: Record<string, object>[];
|
|
338
|
+
event: string | null;
|
|
339
|
+
eventexpr: string | null;
|
|
340
|
+
target: string | null;
|
|
341
|
+
targetexpr: string | null;
|
|
342
|
+
typeValue: string;
|
|
343
|
+
typeexpr: string | null;
|
|
344
|
+
id: string | null;
|
|
345
|
+
idlocation: string | null;
|
|
346
|
+
delay: string;
|
|
347
|
+
delayexpr: string | null;
|
|
348
|
+
namelist: string | null;
|
|
349
|
+
otherAttributes: Record<string, object>;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export declare const defaultSend: () => SendProps;
|
|
353
|
+
|
|
354
|
+
export interface StateProps {
|
|
355
|
+
onentry: OnentryProps[];
|
|
356
|
+
onexit: OnexitProps[];
|
|
357
|
+
transition: TransitionProps[];
|
|
358
|
+
initial: InitialProps[];
|
|
359
|
+
state: StateProps[];
|
|
360
|
+
parallel: ParallelProps[];
|
|
361
|
+
final: FinalProps[];
|
|
362
|
+
history: HistoryProps[];
|
|
363
|
+
datamodel: DatamodelProps[];
|
|
364
|
+
invoke: InvokeProps[];
|
|
365
|
+
otherElement: Record<string, object>[];
|
|
366
|
+
id: string | null;
|
|
367
|
+
initialAttribute: string[];
|
|
368
|
+
otherAttributes: Record<string, object>;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export declare const defaultState: () => StateProps;
|
|
372
|
+
|
|
373
|
+
export interface TransitionProps {
|
|
374
|
+
otherElement: Record<string, object>[];
|
|
375
|
+
raiseValue: RaiseProps[];
|
|
376
|
+
ifValue: IfProps[];
|
|
377
|
+
foreach: ForeachProps[];
|
|
378
|
+
send: SendProps[];
|
|
379
|
+
script: ScriptProps[];
|
|
380
|
+
assign: AssignProps[];
|
|
381
|
+
log: LogProps[];
|
|
382
|
+
cancel: CancelProps[];
|
|
383
|
+
event: string | null;
|
|
384
|
+
cond: string | null;
|
|
385
|
+
target: string[];
|
|
386
|
+
typeValue: typeof TransitionTypeDatatypeProps | null;
|
|
387
|
+
otherAttributes: Record<string, object>;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export declare const defaultTransition: () => TransitionProps;
|
|
391
|
+
|
|
392
|
+
export type TransitionTypeDatatypePropsType =
|
|
393
|
+
| "external"
|
|
394
|
+
| "internal"
|
|
395
|
+
;
|
|
396
|
+
|
|
397
|
+
export declare const TransitionTypeDatatypeProps: {
|
|
398
|
+
readonly External: "external",
|
|
399
|
+
readonly Internal: "internal",
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
export type Kind = "number" | "string" | "record<string, object>" | "number[]" | "string[]"
|
|
403
|
+
| "record<string, object>[]" | "assign" | "assigntypedatatype" | "bindingdatatype" | "booleandatatype"
|
|
404
|
+
| "cancel" | "content" | "data" | "datamodel" | "donedata" | "else" | "elseif"
|
|
405
|
+
| "exmodedatatype" | "final" | "finalize" | "foreach" | "history" | "historytypedatatype" | "if"
|
|
406
|
+
| "initial" | "invoke" | "log" | "onentry" | "onexit" | "parallel" | "param" | "raise"
|
|
407
|
+
| "script" | "scxml" | "send" | "state" | "transition" | "transitiontypedatatype";
|
|
408
|
+
|
|
409
|
+
export type PropsUnion = null | string | number | Record<string, object> | string[] | number[]
|
|
410
|
+
| Record<string, object>[] | AssignProps | typeof AssignTypeDatatypeProps | typeof BindingDatatypeProps
|
|
411
|
+
| typeof BooleanDatatypeProps | CancelProps | ContentProps | DataProps | DatamodelProps | DonedataProps
|
|
412
|
+
| ElseProps | ElseifProps | typeof ExmodeDatatypeProps | FinalProps | FinalizeProps
|
|
413
|
+
| ForeachProps | HistoryProps | typeof HistoryTypeDatatypeProps | IfProps | InitialProps
|
|
414
|
+
| InvokeProps | LogProps | OnentryProps | OnexitProps | ParallelProps | ParamProps
|
|
415
|
+
| RaiseProps | ScriptProps | ScxmlProps | SendProps | StateProps | TransitionProps
|
|
416
|
+
| typeof TransitionTypeDatatypeProps;
|
|
417
|
+
|
|
418
|
+
export type KindMap = {
|
|
419
|
+
assign: AssignProps
|
|
420
|
+
assigntypedatatype: typeof AssignTypeDatatypeProps
|
|
421
|
+
bindingdatatype: typeof BindingDatatypeProps
|
|
422
|
+
booleandatatype: typeof BooleanDatatypeProps
|
|
423
|
+
cancel: CancelProps
|
|
424
|
+
content: ContentProps
|
|
425
|
+
data: DataProps
|
|
426
|
+
datamodel: DatamodelProps
|
|
427
|
+
donedata: DonedataProps
|
|
428
|
+
else: ElseProps
|
|
429
|
+
elseif: ElseifProps
|
|
430
|
+
exmodedatatype: typeof ExmodeDatatypeProps
|
|
431
|
+
final: FinalProps
|
|
432
|
+
finalize: FinalizeProps
|
|
433
|
+
foreach: ForeachProps
|
|
434
|
+
history: HistoryProps
|
|
435
|
+
historytypedatatype: typeof HistoryTypeDatatypeProps
|
|
436
|
+
if: IfProps
|
|
437
|
+
initial: InitialProps
|
|
438
|
+
invoke: InvokeProps
|
|
439
|
+
log: LogProps
|
|
440
|
+
onentry: OnentryProps
|
|
441
|
+
onexit: OnexitProps
|
|
442
|
+
parallel: ParallelProps
|
|
443
|
+
param: ParamProps
|
|
444
|
+
raise: RaiseProps
|
|
445
|
+
script: ScriptProps
|
|
446
|
+
scxml: ScxmlProps
|
|
447
|
+
send: SendProps
|
|
448
|
+
state: StateProps
|
|
449
|
+
transition: TransitionProps
|
|
450
|
+
transitiontypedatatype: typeof TransitionTypeDatatypeProps
|
|
451
|
+
}
|
|
452
|
+
|