jssm 5.65.12 → 5.67.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/jssm.d.ts CHANGED
@@ -15,6 +15,8 @@ import { version } from './version';
15
15
  * arrow_direction('<~=>'); // 'both'
16
16
  * ```
17
17
  *
18
+ * @param arrow The arrow to be evaluated
19
+ *
18
20
  */
19
21
  declare function arrow_direction(arrow: JssmArrow): JssmArrowDirection;
20
22
  /*********
@@ -31,6 +33,8 @@ declare function arrow_direction(arrow: JssmArrow): JssmArrowDirection;
31
33
  * arrow_left_kind('->'); // 'none'
32
34
  * ```
33
35
  *
36
+ * @param arrow The arrow to be evaluated
37
+ *
34
38
  */
35
39
  declare function arrow_left_kind(arrow: JssmArrow): JssmArrowKind;
36
40
  /*********
@@ -47,6 +51,8 @@ declare function arrow_left_kind(arrow: JssmArrow): JssmArrowKind;
47
51
  * arrow_left_kind('<-'); // 'none'
48
52
  * ```
49
53
  *
54
+ * @param arrow The arrow to be evaluated
55
+ *
50
56
  */
51
57
  declare function arrow_right_kind(arrow: JssmArrow): JssmArrowKind;
52
58
  /*********
@@ -101,6 +107,10 @@ declare function arrow_right_kind(arrow: JssmArrow): JssmArrowKind;
101
107
  * `wrap_parse` itself is an internal convenience method for alting out an
102
108
  * object as the options call. Not generally meant for external use.
103
109
  *
110
+ * @param input The FSL code to be evaluated
111
+ *
112
+ * @param options Things to control about the instance
113
+ *
104
114
  */
105
115
  declare function wrap_parse(input: string, options?: Object): any;
106
116
  /*********
@@ -149,6 +159,10 @@ declare function wrap_parse(input: string, options?: Object): any;
149
159
  * const toggle = jssm.from('up <=> down;');
150
160
  * ```
151
161
  *
162
+ * @typeparam mDT The type of the machine data member; usually omitted
163
+ *
164
+ * @param tree The parse tree to be boiled down into a machine config
165
+ *
152
166
  */
153
167
  declare function compile<mDT>(tree: JssmParseTree): JssmGenericConfig<mDT>;
154
168
  /*********
@@ -157,6 +171,10 @@ declare function compile<mDT>(tree: JssmParseTree): JssmGenericConfig<mDT>;
157
171
  * Not generally meant for external use. Please see {@link compile} or
158
172
  * {@link sm}.
159
173
  *
174
+ * @typeparam mDT The type of the machine data member; usually omitted
175
+ *
176
+ * @param plan The FSL code to be evaluated and built into a machine config
177
+ *
160
178
  */
161
179
  declare function make<mDT>(plan: string): JssmGenericConfig<mDT>;
162
180
  /*********
@@ -165,6 +183,8 @@ declare function make<mDT>(plan: string): JssmGenericConfig<mDT>;
165
183
  * a single multi-faceted declaration, in the process of building a state. Not
166
184
  * generally meant for external use.
167
185
  *
186
+ * @internal
187
+ *
168
188
  */
169
189
  declare function transfer_state_properties(state_decl: JssmStateDeclaration): JssmStateDeclaration;
170
190
  declare class Machine<mDT> {
@@ -217,6 +237,8 @@ declare class Machine<mDT> {
217
237
  *
218
238
  * Internal method for fabricating states. Not meant for external use.
219
239
  *
240
+ * @internal
241
+ *
220
242
  */
221
243
  _new_state(state_config: JssmGenericState): StateType;
222
244
  /*********
@@ -233,6 +255,8 @@ declare class Machine<mDT> {
233
255
  * console.log( switch.state() ); // 'off'
234
256
  * ```
235
257
  *
258
+ * @typeparam mDT The type of the machine data member; usually omitted
259
+ *
236
260
  */
237
261
  state(): StateType;
238
262
  /********
@@ -249,6 +273,10 @@ declare class Machine<mDT> {
249
273
  * console.log( final_test.state_is_final('second') ); // true
250
274
  * ```
251
275
  *
276
+ * @typeparam mDT The type of the machine data member; usually omitted
277
+ *
278
+ * @param whichState The name of the state to check for finality
279
+ *
252
280
  */
253
281
  state_is_final(whichState: StateType): boolean;
254
282
  /********
@@ -266,6 +294,8 @@ declare class Machine<mDT> {
266
294
  * console.log( final_test.is_final() ); // true
267
295
  * ```
268
296
  *
297
+ * @typeparam mDT The type of the machine data member; usually omitted
298
+ *
269
299
  */
270
300
  is_final(): boolean;
271
301
  graph_layout(): string;
@@ -295,6 +325,8 @@ declare class Machine<mDT> {
295
325
  * console.log( switch.states() ); // ['on', 'off']
296
326
  * ```
297
327
  *
328
+ * @typeparam mDT The type of the machine data member; usually omitted
329
+ *
298
330
  */
299
331
  states(): Array<StateType>;
300
332
  state_for(whichState: StateType): JssmGenericState;
@@ -311,6 +343,10 @@ declare class Machine<mDT> {
311
343
  * console.log( switch.has_state('dance') ); // false
312
344
  * ```
313
345
  *
346
+ * @typeparam mDT The type of the machine data member; usually omitted
347
+ *
348
+ * @param whichState The state to be checked for extance
349
+ *
314
350
  */
315
351
  has_state(whichState: StateType): boolean;
316
352
  /*********
@@ -343,6 +379,8 @@ declare class Machine<mDT> {
343
379
  * ]
344
380
  * ```
345
381
  *
382
+ * @typeparam mDT The type of the machine data member; usually omitted
383
+ *
346
384
  */
347
385
  list_edges(): Array<JssmTransition<mDT>>;
348
386
  list_named_transitions(): Map<StateType, number>;
@@ -366,6 +404,10 @@ declare class Machine<mDT> {
366
404
  * light.list_transitions(); // { entrances: [ 'yellow', 'off' ], exits: [ 'green', 'off' ] }
367
405
  * ```
368
406
  *
407
+ * @typeparam mDT The type of the machine data member; usually omitted
408
+ *
409
+ * @param whichState The state whose transitions to have listed
410
+ *
369
411
  */
370
412
  list_transitions(whichState?: StateType): JssmTransitionList;
371
413
  /********
@@ -382,6 +424,10 @@ declare class Machine<mDT> {
382
424
  * light.list_entrances(); // [ 'yellow', 'off' ]
383
425
  * ```
384
426
  *
427
+ * @typeparam mDT The type of the machine data member; usually omitted
428
+ *
429
+ * @param whichState The state whose entrances to have listed
430
+ *
385
431
  */
386
432
  list_entrances(whichState?: StateType): Array<StateType>;
387
433
  /********
@@ -398,6 +444,10 @@ declare class Machine<mDT> {
398
444
  * light.list_exits(); // [ 'green', 'off' ]
399
445
  * ```
400
446
  *
447
+ * @typeparam mDT The type of the machine data member; usually omitted
448
+ *
449
+ * @param whichState The state whose exits to have listed
450
+ *
401
451
  */
402
452
  list_exits(whichState?: StateType): Array<StateType>;
403
453
  probable_exits_for(whichState: StateType): Array<JssmTransition<mDT>>;
@@ -433,6 +483,10 @@ declare class Machine<mDT> {
433
483
  * console.log( machine.actions() ); // logs ['next', 'shutdown']
434
484
  * ```
435
485
  *
486
+ * @typeparam mDT The type of the machine data member; usually omitted
487
+ *
488
+ * @param whichState The state whose actions to have listed
489
+ *
436
490
  */
437
491
  actions(whichState?: StateType): Array<StateType>;
438
492
  /********
@@ -452,6 +506,10 @@ declare class Machine<mDT> {
452
506
  * console.log( machine.list_states_having_action('start') ); // ['off']
453
507
  * ```
454
508
  *
509
+ * @typeparam mDT The type of the machine data member; usually omitted
510
+ *
511
+ * @param whichState The action to be checked for associated states
512
+ *
455
513
  */
456
514
  list_states_having_action(whichState: StateType): Array<StateType>;
457
515
  list_exit_actions(whichState?: StateType): Array<StateType>;
@@ -489,6 +547,12 @@ declare class Machine<mDT> {
489
547
  * light.state(); // 'green'
490
548
  * ```
491
549
  *
550
+ * @typeparam mDT The type of the machine data member; usually omitted
551
+ *
552
+ * @param actionName The action to engage
553
+ *
554
+ * @param newData The data change to insert during the action
555
+ *
492
556
  */
493
557
  action(actionName: StateType, newData?: mDT): boolean;
494
558
  /********
@@ -503,6 +567,12 @@ declare class Machine<mDT> {
503
567
  * light.state(); // 'green'
504
568
  * ```
505
569
  *
570
+ * @typeparam mDT The type of the machine data member; usually omitted
571
+ *
572
+ * @param newState The state to switch to
573
+ *
574
+ * @param newData The data change to insert during the transition
575
+ *
506
576
  */
507
577
  transition(newState: StateType, newData?: mDT): boolean;
508
578
  /********
@@ -520,6 +590,12 @@ declare class Machine<mDT> {
520
590
  * light.state(); // 'off'
521
591
  * ```
522
592
  *
593
+ * @typeparam mDT The type of the machine data member; usually omitted
594
+ *
595
+ * @param newState The state to switch to
596
+ *
597
+ * @param newData The data change to insert during the transition
598
+ *
523
599
  */
524
600
  force_transition(newState: StateType, newData?: mDT): boolean;
525
601
  current_action_for(action: StateType): number;
@@ -546,6 +622,12 @@ declare class Machine<mDT> {
546
622
  * const switch = jssm.from('on <=> off;');
547
623
  * ```
548
624
  *
625
+ * @typeparam mDT The type of the machine data member; usually omitted
626
+ *
627
+ * @param template_strings The assembled code
628
+ *
629
+ * @param remainder The mechanic for template argument insertion
630
+ *
549
631
  */
550
632
  declare function sm<mDT>(template_strings: TemplateStringsArray, ...remainder: any[]): Machine<mDT>;
551
633
  /*********
@@ -563,6 +645,12 @@ declare function sm<mDT>(template_strings: TemplateStringsArray, ...remainder: a
563
645
  * const switch = jssm.from('on <=> off;');
564
646
  * ```
565
647
  *
648
+ * @typeparam mDT The type of the machine data member; usually omitted
649
+ *
650
+ * @param MachineAsString The FSL code to evaluate
651
+ *
652
+ * @param ExtraConstructorFields Extra non-code configuration to pass at creation time
653
+ *
566
654
  */
567
655
  declare function from<mDT>(MachineAsString: string, ExtraConstructorFields?: Partial<JssmGenericConfig<mDT>> | undefined): Machine<mDT>;
568
656
  export { version, transfer_state_properties, Machine, make, wrap_parse as parse, compile, sm, from, arrow_direction, arrow_left_kind, arrow_right_kind, seq, weighted_rand_select, histograph, weighted_sample_select, weighted_histo_key, shapes, gviz_shapes, named_colors };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jssm",
3
- "version": "5.65.12",
3
+ "version": "5.67.2",
4
4
  "engines": {
5
5
  "node": ">=10.0.0"
6
6
  },
@@ -44,16 +44,16 @@
44
44
  "audit": "text_audit -r -t major MAJOR wasteful WASTEFUL any mixed fixme FIXME checkme CHECKME testme TESTME stochable STOCHABLE todo TODO comeback COMEBACK whargarbl WHARGARBL -g ./src/ts/**/*.{js,ts}",
45
45
  "vet": "npm run eslint && npm run audit",
46
46
  "benny": "node ./src/buildjs/benchmark.js",
47
- "build": "npm run vet && npm run test && npm run site && npm run docs && npm run benny",
48
- "buildnb": "npm run vet && npm run test && npm run site && npm run docs",
47
+ "build": "npm run vet && npm run test && npm run site && npm run changelog && npm run docs",
48
+ "clean_bench": "npm run test && npm run benny",
49
49
  "qbuild": "npm run test",
50
50
  "ci_build": "npm run vet && npm run test",
51
51
  "minify": "mv dist/es6/jssm-dot.js dist/es6/jssm-dot.nonmin.js && terser dist/es6/jssm-dot.nonmin.js > dist/es6/jssm-dot.js",
52
52
  "min_iife": "mv dist/jssm.es5.iife.js dist/jssm.es5.iife.nonmin.js && terser dist/jssm.es5.iife.nonmin.js > dist/jssm.es5.iife.js",
53
53
  "min_cjs": "mv dist/jssm.es5.cjs.js dist/jssm.es5.cjs.nonmin.js && terser dist/jssm.es5.cjs.nonmin.js > dist/jssm.es5.cjs.js",
54
- "site": "cp src/site/* docs/",
55
- "docs": "typedoc src/ts/jssm.ts --out docs/docs --customCss ./src/site/typedoc-addon.css",
56
- "changelog": "rm -f CHANGELOG.md && changelog-maker -a > CHANGELOG.md"
54
+ "site": "cp src/site/* docs/ && cp -r src/assets docs/assets/",
55
+ "docs": "typedoc src/ts/jssm.ts --options typedoc-options.js",
56
+ "changelog": "rm -f CHANGELOG.md && rm -f ./src/doc_md/CHANGELOG.md && better_git_changelog -b && cp CHANGELOG.* ./src/doc_md/"
57
57
  },
58
58
  "repository": {
59
59
  "type": "git",
@@ -96,6 +96,7 @@
96
96
  },
97
97
  "homepage": "https://stonecypher.github.io/jssm/",
98
98
  "devDependencies": {
99
+ "@knodes/typedoc-plugin-pages": "^0.22.5",
99
100
  "@rollup/plugin-commonjs": "^22.0.0",
100
101
  "@rollup/plugin-node-resolve": "^13.3.0",
101
102
  "@rollup/plugin-replace": "^4.0.0",
@@ -103,7 +104,6 @@
103
104
  "@typescript-eslint/eslint-plugin": "^4.13.0",
104
105
  "@typescript-eslint/parser": "^4.13.0",
105
106
  "benny": "^3.7.1",
106
- "changelog-maker": "^2.3.2",
107
107
  "coveralls": "^3.0.11",
108
108
  "eslint": "^7.32.0",
109
109
  "eslint-plugin-fp": "^2.3.0",
@@ -120,11 +120,11 @@
120
120
  "terser": "^5.13.1",
121
121
  "text_audit": "^0.9.3",
122
122
  "ts-jest": "^27.0.7",
123
- "tscheck": "^0.1.5",
124
123
  "typedoc": "^0.22.15",
125
124
  "typescript": "^4.6.4"
126
125
  },
127
126
  "dependencies": {
127
+ "better_git_changelog": "^1.6.1",
128
128
  "reduce-to-639-1": "^1.0.4"
129
129
  }
130
130
  }
@@ -0,0 +1,56 @@
1
+ module.exports = {
2
+ name: 'JSSM, a JavaScript state machine - the FSM for FSL',
3
+ readme: './src/doc_md/DocLandingPage.md',
4
+ out: 'docs/docs',
5
+ // entryPoints: [
6
+ // 'packages/*',
7
+ // ],
8
+ customCss: './src/site/typedoc-addon.css',
9
+ // entryPointStrategy: 'packages',
10
+ pluginPages: {
11
+ source: './src/doc_md/',
12
+ pages: [
13
+ { title: 'Tutorials', childrenDir: './', children: [
14
+ { title: '☕ Quick Start', source: 'GettingStarted.md' },
15
+ { title: 'What are state machines?', source: 'todo.md' },
16
+ { title: 'Language reference', source: 'todo.md' },
17
+ { title: 'API reference', source: 'todo.md' },
18
+ { title: 'Example machines', source: 'todo.md' },
19
+ { title: 'Howtos and Recipes', childrenDir: './', children: [
20
+ { title: 'Environments', source: 'todo.md' },
21
+ { title: 'Bundling', source: 'todo.md' },
22
+ { title: 'Publishing', source: 'todo.md' }
23
+ ] },
24
+ { title: 'Comparisons', childrenDir: './', children: [
25
+ { title: 'Feature comparison', source: 'FeatureComparison.md' },
26
+ { title: 'LOC Shootout', source: 'Shootout.md' }
27
+ ] },
28
+ ] },
29
+ { title: 'Tools', childrenDir: './', children: [
30
+ { title: 'Live Editor', source: 'live_editor.md' },
31
+ { title: 'Github Action', source: 'todo.md' }
32
+ ] },
33
+ { title: 'VIRTUAL', childrenDir: './', children: [
34
+ { title: 'Community', source: 'community.md' }
35
+ ] },
36
+ { title: 'VIRTUAL', childrenDir: './', children: [
37
+ { title: 'Changelog', source: 'CHANGELOG.md' }
38
+ ] },
39
+ // { title: '@knodes/typedoc-plugin-code-blocks', source: 'readme-extras.md', children: [
40
+ // { title: 'Using options', source: 'options.md' },
41
+ // ] },
42
+ // { title: '@knodes/typedoc-plugin-monorepo-readmes', children: [
43
+ // { title: 'Using options', source: 'options.md' },
44
+ // ] },
45
+ // { title: '@knodes/typedoc-plugin-pages', source: 'readme-extras.md', children: [
46
+ // { title: 'Using options', source: 'options.md' },
47
+ // { title: 'Pages tree', source: 'pages-tree.md' },
48
+ // ] },
49
+ // { title: '@knodes/typedoc-pluginutils', children: [
50
+ // { title: 'Providing options', source: 'providing-options.md' },
51
+ // ] },
52
+ ]
53
+ },
54
+ // pluginCodeBlocks: { source: '__tests__/mock-fs' },
55
+ excludePrivate: true
56
+ };