@json-layout/core 0.9.1 → 0.9.3

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/package.json CHANGED
@@ -1,31 +1,31 @@
1
1
  {
2
2
  "name": "@json-layout/core",
3
- "version": "0.9.1",
3
+ "version": "0.9.3",
4
4
  "description": "Compilation and state management utilities for JSON Layout.",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
8
8
  "import": {
9
- "default": "./src/index.js",
10
- "types": "./types/index.d.ts"
9
+ "types": "./types/index.d.ts",
10
+ "default": "./src/index.js"
11
11
  }
12
12
  },
13
13
  "./src/compile/serialize": {
14
14
  "import": {
15
- "default": "./src/compile/serialize.js",
16
- "types": "./types/compile/serialize.d.ts"
15
+ "types": "./types/compile/serialize.d.ts",
16
+ "default": "./src/compile/serialize.js"
17
17
  }
18
18
  },
19
19
  "./utils/build": {
20
20
  "import": {
21
- "default": "./src/utils/build.js",
22
- "types": "./types/utils/build.d.ts"
21
+ "types": "./types/utils/build.d.ts",
22
+ "default": "./src/utils/build.js"
23
23
  }
24
24
  },
25
25
  "./utils/doc-options": {
26
26
  "import": {
27
- "default": "./src/utils/doc-options.js",
28
- "types": "./types/utils/doc-options.d.ts"
27
+ "types": "./types/utils/doc-options.d.ts",
28
+ "default": "./src/utils/doc-options.js"
29
29
  }
30
30
  }
31
31
  },
@@ -59,7 +59,7 @@
59
59
  },
60
60
  "homepage": "https://github.com/json-layout/json-layout#readme",
61
61
  "dependencies": {
62
- "@json-layout/vocabulary": "^0.9.0",
62
+ "@json-layout/vocabulary": "^0.9.1",
63
63
  "@types/markdown-it": "^13.0.1",
64
64
  "ajv": "^8.12.0",
65
65
  "ajv-errors": "^3.0.0",
@@ -30,8 +30,8 @@ export function serialize (compiledLayout) {
30
30
  // some internal imports to ajv are not translated to esm, we do it here
31
31
  // cf https://github.com/ajv-validator/ajv-formats/pull/73
32
32
  if (code.includes('require("ajv-formats/dist/formats")')) {
33
- code = 'import ajvFormats from "ajv-formats/dist/formats.js";\n' + code
34
- code = code.replace(/require\("ajv-formats\/dist\/formats"\)\.fullFormats/g, 'ajvFormats.fullFormats')
33
+ code = 'import { fullFormats } from "ajv-formats/dist/formats.js";\n' + code
34
+ code = code.replace(/require\("ajv-formats\/dist\/formats"\)\.fullFormats/g, 'fullFormats')
35
35
  }
36
36
  if (code.includes('require("ajv/dist/runtime/ucs2length")')) {
37
37
  code = 'import ucs2length from "ajv/dist/runtime/ucs2length.js";\n' + code
@@ -54,6 +54,7 @@ const produceStateNode = produce((draft, key, fullKey, parentFullKey, dataPath,
54
54
  if (autofocusChild) draft.autofocusChild = autofocusChild.key
55
55
  else delete draft.autofocusChild
56
56
  }
57
+ draft.props = props
57
58
 
58
59
  draft.children = children
59
60
  })
@@ -1,5 +1,8 @@
1
1
  // these dependencies are not pure ESM, users will probably need to inform their bundler to treat them as commonjs
2
+
3
+ /** @type {string[]} */
2
4
  export const commonjsDeps = [
5
+ 'ajv',
3
6
  'ajv/dist/2019.js',
4
7
  'ajv-formats',
5
8
  'ajv-formats/dist/formats.js',
@@ -8,3 +11,15 @@ export const commonjsDeps = [
8
11
  'markdown-it',
9
12
  'debug'
10
13
  ]
14
+
15
+ /** @type {string[][]} */
16
+ export const commonjsDepsPaths = [
17
+ ['@json-layout/core', 'ajv'],
18
+ ['@json-layout/core', 'ajv/dist/2019.js'],
19
+ ['@json-layout/core', 'ajv-formats'],
20
+ ['@json-layout/core', 'ajv-formats/dist/formats.js'],
21
+ ['@json-layout/core', 'ajv-i18n'],
22
+ ['@json-layout/core', 'ajv-errors'],
23
+ ['@json-layout/core', 'markdown-it'],
24
+ ['@json-layout/core', 'debug']
25
+ ]
@@ -1 +1 @@
1
- {"version":3,"file":"state-node.d.ts","sourceRoot":"","sources":["../../src/state/state-node.js"],"names":[],"mappings":"AA+JA;;;;;;;;;;GAUG;AACH,4CAVW,OAAO,aAAa,EAAE,kBAAkB,EAAE,cAC1C,OAAO,yBAAyB,E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kBACN,MAAM,GAAG,IAAI,YACb,OAAO,aAAa,EAAE,YAAY,mBAClC,OAAO,yBAAyB,EAAE,KAAK,GAAG,IAAI,iBAC9C,OAAO,oBAAoB,EAAE,OAAO,QACpC,OAAO,cACP,OAAO,mBACP,OAAO,YAAY,EAAE,eAAe,4DAElC,OAAO,YAAY,EAAE,SAAS,CAkO1C;AAED,uFAAuF;AACvF,yCADmB,GAAG,QAAQ,OAAO,YAAY,EAAE,SAAS,QAAQ,OAAO,KAAK,GAAG,CAOjF"}
@@ -1,2 +1,5 @@
1
+ /** @type {string[]} */
1
2
  export const commonjsDeps: string[];
3
+ /** @type {string[][]} */
4
+ export const commonjsDepsPaths: string[][];
2
5
  //# sourceMappingURL=build.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/utils/build.js"],"names":[],"mappings":"AACA,oCAQC"}
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/utils/build.js"],"names":[],"mappings":"AAEA,uBAAuB;AACvB,2BADW,MAAM,EAAE,CAUlB;AAED,yBAAyB;AACzB,gCADW,MAAM,EAAE,EAAE,CAUpB"}