jssm 5.85.2 → 5.85.5

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
@@ -303,12 +303,38 @@ declare class Machine<mDT> {
303
303
  *
304
304
  * const lswitch = jssm.from('a -> b; state a: { label: "Foo!"; };');
305
305
  * console.log( lswitch.label_for('a') ); // 'Foo!'
306
+ * console.log( lswitch.label_for('b') ); // undefined
306
307
  * ```
307
308
  *
309
+ * See also {@link display_text}.
310
+ *
308
311
  * @typeparam mDT The type of the machine data member; usually omitted
309
312
  *
310
313
  */
311
314
  label_for(state: StateType): string;
315
+ /*********
316
+ *
317
+ * Get whatever the node should show as text.
318
+ *
319
+ * Currently, this means to get the label for a given state, if any;
320
+ * otherwise to return the node's name. However, this definition is expected
321
+ * to grow with time, and it is currently considered ill-advised to manually
322
+ * parse this text.
323
+ *
324
+ * See also {@link label_for}.
325
+ *
326
+ * ```typescript
327
+ * import * as jssm from 'jssm';
328
+ *
329
+ * const lswitch = jssm.from('a -> b; state a: { label: "Foo!"; };');
330
+ * console.log( lswitch.display_text('a') ); // 'Foo!'
331
+ * console.log( lswitch.display_text('b') ); // 'b'
332
+ * ```
333
+ *
334
+ * @typeparam mDT The type of the machine data member; usually omitted
335
+ *
336
+ */
337
+ display_text(state: StateType): string;
312
338
  /*********
313
339
  *
314
340
  * Get the current data of a machine.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jssm",
3
- "version": "5.85.2",
3
+ "version": "5.85.5",
4
4
  "engines": {
5
5
  "node": ">=10.0.0"
6
6
  },
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const version: string;
2
- export { version };
1
+ declare const version: string, build_time: number;
2
+ export { version, build_time };