@json-layout/core 1.10.1 → 1.10.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@json-layout/core",
3
- "version": "1.10.1",
3
+ "version": "1.10.3",
4
4
  "description": "Compilation and state management utilities for JSON Layout.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -58,7 +58,7 @@
58
58
  },
59
59
  "homepage": "https://github.com/json-layout/json-layout#readme",
60
60
  "peerDependencies": {
61
- "@json-layout/vocabulary": "^2.3.0"
61
+ "@json-layout/vocabulary": "^2.3.2"
62
62
  },
63
63
  "dependencies": {
64
64
  "ajv": "^8.17.1",
@@ -1,5 +1,6 @@
1
1
  // import Debug from 'debug'
2
- import { normalizeLayoutFragment, mergeNullableSubSchema, isSwitchStruct, isGetItemsExpression, isGetItemsFetch, isItemsLayout, getSchemaFragmentType, isCompositeLayout, childIsCompositeCompObject, isListLayout } from '@json-layout/vocabulary'
2
+ import { isSwitchStruct, isGetItemsExpression, isGetItemsFetch, isItemsLayout, isCompositeLayout, childIsCompositeCompObject, isListLayout } from '@json-layout/vocabulary'
3
+ import { normalizeLayoutFragment, mergeNullableSubSchema, getSchemaFragmentType } from '@json-layout/vocabulary/normalize'
3
4
  import { makeSkeletonTree } from './skeleton-tree.js'
4
5
  import { partialResolveRefs } from './utils/resolve-refs.js'
5
6
 
@@ -128,6 +129,7 @@ export function makeSkeletonNode (
128
129
  if (nullable) defaultData = null
129
130
  else if (type === 'object' && isCompositeLayout(compObject, options.components)) defaultData = {}
130
131
  else if (type === 'array') defaultData = []
132
+ else if (type === 'boolean') defaultData = false
131
133
  }
132
134
  if (defaultData !== undefined && compObject.defaultData === undefined) compObject.defaultData = defaultData
133
135
  if (compObject.defaultData !== undefined && !compObject.getDefaultData) compObject.getDefaultData = { type: 'js-eval', expr: 'layout.defaultData', pure: true, dataAlias: 'value' }
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton-node.d.ts","sourceRoot":"","sources":["../../src/compile/skeleton-node.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;GAkBG;AACH,4CAlBW,GAAG,kBACH,MAAM,WACN,OAAO,YAAY,EAAE,cAAc,cACnC,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,iBACxD,MAAM,CAAC,MAAM,EAAE,OAAO,YAAY,EAAE,YAAY,CAAC,iBACjD,MAAM,CAAC,MAAM,EAAE,OAAO,YAAY,EAAE,YAAY,CAAC,oBACjD,MAAM,EAAE,oBACR,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,qBACxB,MAAM,CAAC,MAAM,EAAE,OAAO,yBAAyB,EAAE,gBAAgB,CAAC,eAClE,OAAO,yBAAyB,EAAE,UAAU,EAAE,OAC9C,MAAM,GAAG,MAAM,WACf,MAAM,YACN,OAAO,cACP,MAAM,cACN,OAAO,cACP,MAAM,GACJ,OAAO,YAAY,EAAE,YAAY,CAygB7C"}
1
+ {"version":3,"file":"skeleton-node.d.ts","sourceRoot":"","sources":["../../src/compile/skeleton-node.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;GAkBG;AACH,4CAlBW,GAAG,kBACH,MAAM,WACN,OAAO,YAAY,EAAE,cAAc,cACnC,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,iBACxD,MAAM,CAAC,MAAM,EAAE,OAAO,YAAY,EAAE,YAAY,CAAC,iBACjD,MAAM,CAAC,MAAM,EAAE,OAAO,YAAY,EAAE,YAAY,CAAC,oBACjD,MAAM,EAAE,oBACR,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,qBACxB,MAAM,CAAC,MAAM,EAAE,OAAO,yBAAyB,EAAE,gBAAgB,CAAC,eAClE,OAAO,yBAAyB,EAAE,UAAU,EAAE,OAC9C,MAAM,GAAG,MAAM,WACf,MAAM,YACN,OAAO,cACP,MAAM,cACN,OAAO,cACP,MAAM,GACJ,OAAO,YAAY,EAAE,YAAY,CA0gB7C"}