jssm 5.98.8 → 5.100.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/jssm_types.d.ts CHANGED
@@ -303,6 +303,11 @@ declare type ExitHook<mDT> = {
303
303
  from: string;
304
304
  handler: HookHandler<mDT>;
305
305
  };
306
+ declare type AfterHook<mDT> = {
307
+ kind: 'after';
308
+ from: string;
309
+ handler: HookHandler<mDT>;
310
+ };
306
311
  declare type PostBasicHookDescription<mDT> = {
307
312
  kind: 'post hook';
308
313
  from: string;
@@ -351,7 +356,7 @@ declare type PostExitHook<mDT> = {
351
356
  from: string;
352
357
  handler: PostHookHandler<mDT>;
353
358
  };
354
- declare type HookDescription<mDT> = BasicHookDescription<mDT> | HookDescriptionWithAction<mDT> | GlobalActionHook<mDT> | AnyActionHook<mDT> | StandardTransitionHook<mDT> | MainTransitionHook<mDT> | ForcedTransitionHook<mDT> | AnyTransitionHook<mDT> | EntryHook<mDT> | ExitHook<mDT> | PostBasicHookDescription<mDT> | PostHookDescriptionWithAction<mDT> | PostGlobalActionHook<mDT> | PostAnyActionHook<mDT> | PostStandardTransitionHook<mDT> | PostMainTransitionHook<mDT> | PostForcedTransitionHook<mDT> | PostAnyTransitionHook<mDT> | PostEntryHook<mDT> | PostExitHook<mDT>;
359
+ declare type HookDescription<mDT> = BasicHookDescription<mDT> | HookDescriptionWithAction<mDT> | GlobalActionHook<mDT> | AnyActionHook<mDT> | StandardTransitionHook<mDT> | MainTransitionHook<mDT> | ForcedTransitionHook<mDT> | AnyTransitionHook<mDT> | EntryHook<mDT> | ExitHook<mDT> | AfterHook<mDT> | PostBasicHookDescription<mDT> | PostHookDescriptionWithAction<mDT> | PostGlobalActionHook<mDT> | PostAnyActionHook<mDT> | PostStandardTransitionHook<mDT> | PostMainTransitionHook<mDT> | PostForcedTransitionHook<mDT> | PostAnyTransitionHook<mDT> | PostEntryHook<mDT> | PostExitHook<mDT>;
355
360
  declare type HookComplexResult<mDT> = {
356
361
  pass: boolean;
357
362
  state?: StateType;
package/jssm_util.d.ts CHANGED
@@ -102,4 +102,5 @@ declare const unique: <T>(arr?: T[]) => T[];
102
102
  *
103
103
  */
104
104
  declare function find_repeated<T>(arr: T[]): [T, number][];
105
- export { seq, unique, find_repeated, arr_uniq_p, histograph, weighted_histo_key, weighted_rand_select, weighted_sample_select, array_box_if_string, name_bind_prop_and_state, hook_name, named_hook_name, gen_splitmix32 };
105
+ declare function sleep(ms: number): Promise<unknown>;
106
+ export { seq, unique, find_repeated, arr_uniq_p, histograph, weighted_histo_key, weighted_rand_select, weighted_sample_select, array_box_if_string, name_bind_prop_and_state, hook_name, named_hook_name, gen_splitmix32, sleep };
package/package.json CHANGED
@@ -1,13 +1,22 @@
1
1
  {
2
2
  "name": "jssm",
3
- "version": "5.98.8",
3
+ "version": "5.100.0",
4
4
  "engines": {
5
5
  "node": ">=10.0.0"
6
6
  },
7
7
  "exports": {
8
- "require": "./dist/jssm.es5.cjs",
9
- "import": "./dist/jssm.es6.mjs",
10
- "default": "./dist/jssm.es5.cjs",
8
+ "require": {
9
+ "types": "./jssm.es5.d.cts",
10
+ "default": "./dist/jssm.es5.cjs"
11
+ },
12
+ "import": {
13
+ "types": "./jssm.es6.d.ts",
14
+ "default": "./dist/jssm.es6.mjs"
15
+ },
16
+ "default": {
17
+ "types": "./jssm.es5.d.cts",
18
+ "default": "./dist/jssm.es5.cjs"
19
+ },
11
20
  "browser": "dist/jssm.es5.iife.cjs"
12
21
  },
13
22
  "autoupdate": {
@@ -134,6 +143,7 @@
134
143
  "pegjs": "^0.10.0",
135
144
  "picocolors": "^1.0.0",
136
145
  "rollup": "^2.72.1",
146
+ "rollup-plugin-dts": "^4.2.3",
137
147
  "semver": "^7.5.4",
138
148
  "terser": "^5.14.2",
139
149
  "text_audit": "^0.9.3",
@@ -149,4 +159,4 @@
149
159
  "circular_buffer_js": "^1.10.0",
150
160
  "reduce-to-639-1": "^1.1.0"
151
161
  }
152
- }
162
+ }
@@ -2,13 +2,11 @@
2
2
  import nodeResolve from '@rollup/plugin-node-resolve';
3
3
  import commonjs from '@rollup/plugin-commonjs';
4
4
  import replace from '@rollup/plugin-replace';
5
+ import dts from "rollup-plugin-dts";
5
6
 
6
7
  const pkg = require('./package.json');
7
8
 
8
-
9
-
10
-
11
- const config = {
9
+ const config = [{
12
10
 
13
11
  input: 'dist/es6/jssm.js',
14
12
 
@@ -32,14 +30,21 @@ const config = {
32
30
  replace({
33
31
  preventAssignment : true,
34
32
  'process.env.NODE_ENV' : JSON.stringify( 'production' )
35
- })
36
-
37
- ]
33
+ }),
38
34
 
39
- };
35
+ ]}, {
40
36
 
37
+ input: 'dist/es6/jssm.d.ts',
41
38
 
39
+ output: {
40
+ file : './jssm.es5.d.cts',
41
+ format : 'cjs'
42
+ },
42
43
 
44
+ plugins : [
43
45
 
46
+ dts()
47
+ ]}
48
+ ];
44
49
 
45
50
  export default config;
@@ -2,13 +2,11 @@
2
2
  import nodeResolve from '@rollup/plugin-node-resolve';
3
3
  import commonjs from '@rollup/plugin-commonjs';
4
4
  import replace from '@rollup/plugin-replace';
5
+ import dts from "rollup-plugin-dts";
5
6
 
6
7
  const pkg = require('./package.json');
7
8
 
8
-
9
-
10
-
11
- const config = {
9
+ const config = [{
12
10
 
13
11
  input: 'dist/es6/jssm.js',
14
12
 
@@ -32,13 +30,23 @@ const config = {
32
30
  replace({
33
31
  preventAssignment : true,
34
32
  'process.env.NODE_ENV' : JSON.stringify( 'production' )
35
- })
33
+ }),
36
34
 
37
- ]
35
+ ]}, {
38
36
 
39
- };
37
+ input: 'dist/es6/jssm.d.ts',
40
38
 
39
+ output: {
40
+ file : './jssm.es6.d.ts',
41
+ format : 'es'
42
+ },
43
+
44
+ plugins : [
41
45
 
46
+ dts()
47
+ ]}
48
+ ];
49
+
42
50
 
43
51
 
44
52