@json-layout/core 0.33.1 → 0.33.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": "0.33.1",
3
+ "version": "0.33.3",
4
4
  "description": "Compilation and state management utilities for JSON Layout.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -60,7 +60,6 @@
60
60
  "homepage": "https://github.com/json-layout/json-layout#readme",
61
61
  "dependencies": {
62
62
  "@json-layout/vocabulary": "^0.23.2",
63
- "@types/markdown-it": "^13.0.1",
64
63
  "ajv": "^8.12.0",
65
64
  "ajv-errors": "^3.0.0",
66
65
  "ajv-formats": "^2.1.1",
@@ -68,7 +67,7 @@
68
67
  "debug": "^4.3.4",
69
68
  "immer": "^10.0.3",
70
69
  "magicast": "^0.3.3",
71
- "markdown-it": "^13.0.2"
70
+ "marked": "^14.1.3"
72
71
  },
73
72
  "devDependencies": {
74
73
  "@types/debug": "^4.1.7",
@@ -1,22 +1,16 @@
1
1
  // compileStatic is meant to produce a serializable result
2
2
 
3
- import ajvModule from 'ajv/dist/2019.js'
4
3
  // import { Parser as ExprEvalParser } from 'expr-eval'
5
- import addFormats from 'ajv-formats'
6
- import ajvErrors from 'ajv-errors'
7
4
  import ajvLocalizeModule from 'ajv-i18n'
8
- import MarkdownIt from 'markdown-it'
9
- import { produce } from 'immer'
10
- import i18n from '../i18n/index.js'
11
5
  import { makeSkeletonTree } from './skeleton-tree.js'
12
6
  import { resolveLocaleRefs } from './utils/resolve-refs.js'
13
7
  import { resolveXI18n } from './utils/x-i18n.js'
14
8
  import clone from '../utils/clone.js'
15
- import { standardComponents } from '@json-layout/vocabulary'
16
- import { shallowEqualArray } from '../state/utils/immutable.js'
9
+ import { fillOptions } from './options.js'
17
10
 
18
11
  export { resolveLocaleRefs } from './utils/resolve-refs.js'
19
12
  export { resolveXI18n } from './utils/x-i18n.js'
13
+ export { produceCompileOptions } from './options.js'
20
14
 
21
15
  /**
22
16
  * @typedef {import('./types.js').SkeletonTree} SkeletonTree
@@ -27,88 +21,11 @@ export { resolveXI18n } from './utils/x-i18n.js'
27
21
  * @typedef {import('./types.js').CompiledExpression} CompiledExpression
28
22
  */
29
23
 
30
- // @ts-ignore
31
- const Ajv = /** @type {typeof ajvModule.default} */ (ajvModule)
32
24
  // @ts-ignore
33
25
  const ajvLocalize = /** @type {typeof ajvLocalizeModule.default} */ (ajvLocalizeModule)
34
26
 
35
27
  // const exprEvalParser = new ExprEvalParser()
36
28
 
37
- // use Immer for efficient updating with immutability and no-op detection
38
- /** @type {(draft: PartialCompileOptions, newOptions: PartialCompileOptions) => PartialCompileOptions} */
39
- export const produceCompileOptions = produce((draft, newOptions) => {
40
- for (const key of ['ajv', 'ajvOptions', 'code', 'markdown', 'markdownItOptions', 'xI18n', 'locale', 'defaultLocale', 'messages', 'optionsKeys', 'components']) {
41
- // @ts-ignore
42
- if (key in newOptions) {
43
- // components is problematic because it is an object with nested objects
44
- // simply compare there keys instead of the whole object
45
- if (key === 'components' && shallowEqualArray(Object.keys(draft.components ?? []), Object.keys(newOptions.components ?? []))) {
46
- continue
47
- }
48
- // @ts-ignore
49
- draft[key] = newOptions[key]
50
- } else {
51
- // @ts-ignore
52
- delete draft[key]
53
- }
54
- }
55
- })
56
-
57
- /**
58
- * @param {PartialCompileOptions} partialOptions
59
- * @returns {CompileOptions}
60
- */
61
- const fillOptions = (partialOptions) => {
62
- let ajv = partialOptions.ajv
63
- if (!ajv) {
64
- /** @type {import('ajv').Options} */
65
- const ajvOpts = { allErrors: true, strict: false, verbose: true }
66
- if (partialOptions.ajvOptions) Object.assign(ajvOpts, partialOptions.ajvOptions)
67
- if (partialOptions.code) ajvOpts.code = { source: true, esm: true, lines: true }
68
- const newAjv = new Ajv(ajvOpts)
69
- addFormats.default(newAjv)
70
- ajvErrors.default(newAjv)
71
- ajv = newAjv
72
- }
73
- ajv.addKeyword('layout')
74
-
75
- let markdown = partialOptions.markdown
76
- if (!markdown) {
77
- const markdownIt = new MarkdownIt(partialOptions.markdownItOptions ?? {})
78
- markdown = markdownIt.render.bind(markdownIt)
79
- }
80
-
81
- const defaultLocale = partialOptions.defaultLocale || 'en'
82
- const locale = partialOptions.locale || defaultLocale
83
- const messages = { ...i18n[locale] || i18n[defaultLocale] }
84
- if (partialOptions.messages) Object.assign(messages, partialOptions.messages)
85
-
86
- const components = standardComponents.reduce((acc, component) => {
87
- acc[component.name] = component
88
- return acc
89
- }, /** @type {Record<string, import('@json-layout/vocabulary').ComponentInfo>} */({}))
90
-
91
- if (partialOptions.components) {
92
- for (const componentName of Object.keys(partialOptions.components)) {
93
- components[componentName] = { ...partialOptions.components[componentName], name: componentName }
94
- }
95
- Object.assign(components, partialOptions.components)
96
- }
97
-
98
- return {
99
- ajv,
100
- code: false,
101
- markdown,
102
- optionsKeys: [],
103
- ...partialOptions,
104
- locale,
105
- defaultLocale,
106
- messages,
107
- components,
108
- xI18n: !!partialOptions.xI18n
109
- }
110
- }
111
-
112
29
  /**
113
30
  * @param {object} _schema
114
31
  * @param {PartialCompileOptions} [partialOptions]
@@ -0,0 +1,91 @@
1
+ import ajvModule from 'ajv/dist/2019.js'
2
+ import addFormats from 'ajv-formats'
3
+ import ajvErrors from 'ajv-errors'
4
+ import { marked } from 'marked'
5
+ import { produce } from 'immer'
6
+ import i18n from '../i18n/index.js'
7
+ import { standardComponents } from '@json-layout/vocabulary'
8
+ import { shallowEqualArray } from '../state/utils/immutable.js'
9
+
10
+ /**
11
+ * @typedef {import('./types.js').CompileOptions} CompileOptions
12
+ * @typedef {import('./types.js').PartialCompileOptions} PartialCompileOptions
13
+ */
14
+
15
+ // @ts-ignore
16
+ const Ajv = /** @type {typeof ajvModule.default} */ (ajvModule)
17
+
18
+ /**
19
+ * @param {PartialCompileOptions} partialOptions
20
+ * @returns {CompileOptions}
21
+ */
22
+ export const fillOptions = (partialOptions) => {
23
+ let ajv = partialOptions.ajv
24
+ if (!ajv) {
25
+ /** @type {import('ajv').Options} */
26
+ const ajvOpts = { allErrors: true, strict: false, verbose: true }
27
+ if (partialOptions.ajvOptions) Object.assign(ajvOpts, partialOptions.ajvOptions)
28
+ if (partialOptions.code) ajvOpts.code = { source: true, esm: true, lines: true }
29
+ const newAjv = new Ajv(ajvOpts)
30
+ addFormats.default(newAjv)
31
+ ajvErrors.default(newAjv)
32
+ ajv = newAjv
33
+ }
34
+ ajv.addKeyword('layout')
35
+
36
+ let markdown = partialOptions.markdown
37
+ if (!markdown) {
38
+ const render = (/** @type {string} */text) => marked.parse(text, partialOptions.markedOptions)
39
+ markdown = /** @type {(text: string) => string} */(render)
40
+ }
41
+
42
+ const defaultLocale = partialOptions.defaultLocale || 'en'
43
+ const locale = partialOptions.locale || defaultLocale
44
+ const messages = { ...i18n[locale] || i18n[defaultLocale] }
45
+ if (partialOptions.messages) Object.assign(messages, partialOptions.messages)
46
+
47
+ const components = standardComponents.reduce((acc, component) => {
48
+ acc[component.name] = component
49
+ return acc
50
+ }, /** @type {Record<string, import('@json-layout/vocabulary').ComponentInfo>} */({}))
51
+
52
+ if (partialOptions.components) {
53
+ for (const componentName of Object.keys(partialOptions.components)) {
54
+ components[componentName] = { ...partialOptions.components[componentName], name: componentName }
55
+ }
56
+ Object.assign(components, partialOptions.components)
57
+ }
58
+
59
+ return {
60
+ ajv,
61
+ code: false,
62
+ markdown,
63
+ optionsKeys: [],
64
+ ...partialOptions,
65
+ locale,
66
+ defaultLocale,
67
+ messages,
68
+ components,
69
+ xI18n: !!partialOptions.xI18n
70
+ }
71
+ }
72
+
73
+ // use Immer for efficient updating with immutability and no-op detection
74
+ /** @type {(draft: PartialCompileOptions, newOptions: PartialCompileOptions) => PartialCompileOptions} */
75
+ export const produceCompileOptions = produce((draft, newOptions) => {
76
+ for (const key of ['ajv', 'ajvOptions', 'code', 'markdown', 'markedOptions', 'xI18n', 'locale', 'defaultLocale', 'messages', 'optionsKeys', 'components']) {
77
+ // @ts-ignore
78
+ if (key in newOptions) {
79
+ // components is problematic because it is an object with nested objects
80
+ // simply compare there keys instead of the whole object
81
+ if (key === 'components' && shallowEqualArray(Object.keys(draft.components ?? []), Object.keys(newOptions.components ?? []))) {
82
+ continue
83
+ }
84
+ // @ts-ignore
85
+ draft[key] = newOptions[key]
86
+ } else {
87
+ // @ts-ignore
88
+ delete draft[key]
89
+ }
90
+ }
91
+ })
@@ -10,7 +10,7 @@ import { partialResolveRefs } from './utils/resolve-refs.js'
10
10
  * @param {(schemaId: string, ref: string) => [any, string, string]} getJSONRef
11
11
  * @param {Record<string, import('./types.js').SkeletonTree>} skeletonTrees
12
12
  * @param {Record<string, import('./types.js').SkeletonNode>} skeletonNodes
13
- * @param {string[]} validates
13
+ * @param {string[]} validatePointers
14
14
  * @param {Record<string, string[]>} validationErrors
15
15
  * @param {Record<string, import('@json-layout/vocabulary').NormalizedLayout>} normalizedLayouts
16
16
  * @param {import('@json-layout/vocabulary').Expression[]} expressions
@@ -29,7 +29,7 @@ export function makeSkeletonNode (
29
29
  getJSONRef,
30
30
  skeletonTrees,
31
31
  skeletonNodes,
32
- validates,
32
+ validatePointers,
33
33
  validationErrors,
34
34
  normalizedLayouts,
35
35
  expressions,
@@ -170,7 +170,7 @@ export function makeSkeletonNode (
170
170
  getJSONRef,
171
171
  skeletonTrees,
172
172
  skeletonNodes,
173
- validates,
173
+ validatePointers,
174
174
  validationErrors,
175
175
  normalizedLayouts,
176
176
  expressions,
@@ -196,7 +196,7 @@ export function makeSkeletonNode (
196
196
  getJSONRef,
197
197
  skeletonTrees,
198
198
  skeletonNodes,
199
- validates,
199
+ validatePointers,
200
200
  validationErrors,
201
201
  normalizedLayouts,
202
202
  expressions,
@@ -225,7 +225,7 @@ export function makeSkeletonNode (
225
225
  getJSONRef,
226
226
  skeletonTrees,
227
227
  skeletonNodes,
228
- validates,
228
+ validatePointers,
229
229
  validationErrors,
230
230
  normalizedLayouts,
231
231
  expressions,
@@ -279,7 +279,7 @@ export function makeSkeletonNode (
279
279
  getJSONRef,
280
280
  skeletonTrees,
281
281
  skeletonNodes,
282
- validates,
282
+ validatePointers,
283
283
  validationErrors,
284
284
  normalizedLayouts,
285
285
  expressions,
@@ -336,7 +336,7 @@ export function makeSkeletonNode (
336
336
  getJSONRef,
337
337
  skeletonTrees,
338
338
  skeletonNodes,
339
- validates,
339
+ validatePointers,
340
340
  validationErrors,
341
341
  normalizedLayouts,
342
342
  expressions,
@@ -369,7 +369,7 @@ export function makeSkeletonNode (
369
369
  node.children.push(patternPropertiesPointer)
370
370
  }
371
371
  if (schema.if) {
372
- validates.push(`${pointer}/if`)
372
+ validatePointers.push(`${pointer}/if`)
373
373
  if (schema.then) {
374
374
  const childPointer = `${refPointer}/then`
375
375
  if (!skeletonNodes[childPointer]) {
@@ -382,7 +382,7 @@ export function makeSkeletonNode (
382
382
  getJSONRef,
383
383
  skeletonTrees,
384
384
  skeletonNodes,
385
- validates,
385
+ validatePointers,
386
386
  validationErrors,
387
387
  normalizedLayouts,
388
388
  expressions,
@@ -409,7 +409,7 @@ export function makeSkeletonNode (
409
409
  getJSONRef,
410
410
  skeletonTrees,
411
411
  skeletonNodes,
412
- validates,
412
+ validatePointers,
413
413
  validationErrors,
414
414
  normalizedLayouts,
415
415
  expressions,
@@ -454,7 +454,7 @@ export function makeSkeletonNode (
454
454
  getJSONRef,
455
455
  skeletonTrees,
456
456
  skeletonNodes,
457
- validates,
457
+ validatePointers,
458
458
  validationErrors,
459
459
  normalizedLayouts,
460
460
  expressions,
@@ -477,7 +477,7 @@ export function makeSkeletonNode (
477
477
  getJSONRef,
478
478
  skeletonTrees,
479
479
  skeletonNodes,
480
- validates,
480
+ validatePointers,
481
481
  validationErrors,
482
482
  normalizedLayouts,
483
483
  expressions,
@@ -10,7 +10,7 @@ import { makeSkeletonNode } from './skeleton-node.js'
10
10
  * @param {(schemaId: string, ref: string) => [any, string, string]} getJSONRef
11
11
  * @param {Record<string, import('./types.js').SkeletonTree>} skeletonTrees
12
12
  * @param {Record<string, import('./types.js').SkeletonNode>} skeletonNodes
13
- * @param {string[]} validates
13
+ * @param {string[]} validatePointers
14
14
  * @param {Record<string, string[]>} validationErrors
15
15
  * @param {Record<string, import('@json-layout/vocabulary').NormalizedLayout>} normalizedLayouts
16
16
  * @param {import('@json-layout/vocabulary').Expression[]} expressions
@@ -25,7 +25,7 @@ export function makeSkeletonTree (
25
25
  getJSONRef,
26
26
  skeletonTrees,
27
27
  skeletonNodes,
28
- validates,
28
+ validatePointers,
29
29
  validationErrors,
30
30
  normalizedLayouts,
31
31
  expressions,
@@ -42,7 +42,7 @@ export function makeSkeletonTree (
42
42
  getJSONRef,
43
43
  skeletonTrees,
44
44
  skeletonNodes,
45
- validates,
45
+ validatePointers,
46
46
  validationErrors,
47
47
  normalizedLayouts,
48
48
  expressions,
@@ -50,7 +50,7 @@ export function makeSkeletonTree (
50
50
  pointer,
51
51
  true
52
52
  )
53
- validates.push(pointer)
53
+ validatePointers.push(skeletonNodes[pointer].refPointer)
54
54
  }
55
- return { title, root: pointer }
55
+ return { title, root: pointer, refPointer: skeletonNodes[pointer].refPointer }
56
56
  }
@@ -1,5 +1,5 @@
1
1
  import type ajvModule from 'ajv/dist/2019.js'
2
- import type MarkdownIt from 'markdown-it'
2
+ import type { MarkedOptions } from 'marked'
3
3
  import { type ComponentInfo, type BaseCompObject, type NormalizedLayout, type StateNodeOptionsBase, type Expression } from '@json-layout/vocabulary'
4
4
  import { type ValidateFunction, type SchemaObject, type ErrorObject } from 'ajv/dist/2019.js'
5
5
  import { type Display } from '../state/utils/display.js'
@@ -27,7 +27,7 @@ export interface CompileOptions {
27
27
  ajvOptions?: ajvModule.Options
28
28
  code: boolean
29
29
  markdown: (text: string) => string
30
- markdownItOptions?: MarkdownIt.Options
30
+ markedOptions?: MarkedOptions
31
31
  locale: string
32
32
  defaultLocale: string
33
33
  messages: LocaleMessages
@@ -62,6 +62,7 @@ export interface CompiledLayout {
62
62
  export interface SkeletonTree {
63
63
  title: string
64
64
  root: string
65
+ refPointer: string
65
66
  }
66
67
 
67
68
  // a skeleton node is a light recursive structure
@@ -11,6 +11,7 @@ const prepareGetJSONRef = (schemas, ajv) => {
11
11
  const [schemaId, pointer] = fullRef.split('#')
12
12
  schemas[schemaId] = schemas[schemaId] ?? (ajv.getSchema(schemaId)?.schema)
13
13
  if (!schemas[schemaId]) throw new Error(`reference not found ${schemaId}`)
14
+ if (!pointer) return [schemas[schemaId], schemaId, fullRef]
14
15
  const pointerParts = pointer.split('/').filter(p => !!p)
15
16
  const { value: fragment } = pointerParts.reduce((a, pointerPart) => {
16
17
  a.path.push(pointerPart)
package/src/i18n/en.js CHANGED
@@ -16,7 +16,7 @@ export default {
16
16
  mdeImg1: '![](',
17
17
  mdeImg2: 'image url)',
18
18
  mdeTable1: '',
19
- mdeTable2: '\n\n| Column 1 | Column 2 | ColoColumnnne 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n',
19
+ mdeTable2: '\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n',
20
20
  bold: 'Bold',
21
21
  italic: 'Italic',
22
22
  heading: 'Title',
@@ -6,6 +6,7 @@ import { createStateTree } from './state-tree.js'
6
6
  import { Display } from './utils/display.js'
7
7
  import { isGetItemsExpression, isGetItemsFetch, isItemsLayout } from '@json-layout/vocabulary'
8
8
  import { shallowProduceArray } from './utils/immutable.js'
9
+ import { fillOptions } from './options.js'
9
10
 
10
11
  export { Display } from './utils/display.js'
11
12
  export { getRegexp } from './utils/regexps.js'
@@ -51,39 +52,6 @@ export const isItemsNode = (node, components) => !!node && isItemsLayout(node.la
51
52
 
52
53
  const logDataBinding = debug('jl:data-binding')
53
54
 
54
- /**
55
- * @param {Partial<StatefulLayoutOptions>} partialOptions
56
- * @param {import('../index.js').CompiledLayout} compiledLayout
57
- * @returns {StatefulLayoutOptions}
58
- */
59
- function fillOptions (partialOptions, compiledLayout) {
60
- const messages = { ...compiledLayout.messages }
61
- if (partialOptions.messages) Object.assign(messages, partialOptions.messages)
62
- return {
63
- context: {},
64
- width: 1000,
65
- readOnly: false,
66
- summary: false,
67
- density: 'default',
68
- indent: false,
69
- titleDepth: 2,
70
- validateOn: 'input',
71
- initialValidation: 'withData',
72
- updateOn: 'input',
73
- debounceInputMs: 300,
74
- defaultOn: 'empty',
75
- removeAdditional: 'error',
76
- autofocus: false,
77
- readOnlyPropertiesMode: 'show',
78
- fetchOptions: {},
79
- onAutofocus: () => {},
80
- onUpdate: () => {},
81
- onData: () => {},
82
- ...partialOptions,
83
- messages
84
- }
85
- }
86
-
87
55
  export class StatefulLayout {
88
56
  /**
89
57
  * @private
@@ -155,6 +123,7 @@ export class StatefulLayout {
155
123
  * @param {Partial<StatefulLayoutOptions>} options
156
124
  */
157
125
  set options (options) {
126
+ logDataBinding('apply main options setter', options)
158
127
  this.prepareOptions(options)
159
128
  this.updateState()
160
129
  }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @typedef {import('./types.js').StatefulLayoutOptions} StatefulLayoutOptions
3
+ */
4
+
5
+ /**
6
+ * @param {Partial<StatefulLayoutOptions>} partialOptions
7
+ * @param {import('../index.js').CompiledLayout} compiledLayout
8
+ * @returns {StatefulLayoutOptions}
9
+ */
10
+ export function fillOptions (partialOptions, compiledLayout) {
11
+ const messages = { ...compiledLayout.messages }
12
+ if (partialOptions.messages) Object.assign(messages, partialOptions.messages)
13
+ return {
14
+ context: {},
15
+ width: 1000,
16
+ readOnly: false,
17
+ summary: false,
18
+ density: 'default',
19
+ indent: false,
20
+ titleDepth: 2,
21
+ validateOn: 'input',
22
+ initialValidation: 'withData',
23
+ updateOn: 'input',
24
+ debounceInputMs: 300,
25
+ defaultOn: 'empty',
26
+ removeAdditional: 'error',
27
+ autofocus: false,
28
+ readOnlyPropertiesMode: 'show',
29
+ fetchOptions: {},
30
+ onAutofocus: () => {},
31
+ onUpdate: () => {},
32
+ onData: () => {},
33
+ ...partialOptions,
34
+ messages
35
+ }
36
+ }
@@ -408,7 +408,7 @@ export function createStateNode (
408
408
 
409
409
  if (key === '$oneOf' && skeleton.childrenTrees) {
410
410
  // find the oneOf child that was either previously selected, if none were selected select the child that is valid with current data
411
- const activeChildTreeIndex = /** @type {number} */(fullKey in context.activatedItems ? context.activatedItems[fullKey] : skeleton.childrenTrees?.findIndex((childTree) => compiledLayout.validates[compiledLayout.skeletonTrees[childTree].root](data)))
411
+ const activeChildTreeIndex = /** @type {number} */(fullKey in context.activatedItems ? context.activatedItems[fullKey] : skeleton.childrenTrees?.findIndex((childTree) => compiledLayout.validates[compiledLayout.skeletonTrees[childTree].refPointer](data)))
412
412
  if (activeChildTreeIndex !== -1) {
413
413
  context.errors = context.errors?.filter(error => {
414
414
  const originalError = error.params?.errors?.[0] ?? error
@@ -45,7 +45,7 @@ export function createStateTree (
45
45
  validationState,
46
46
  reusedStateTree
47
47
  ) {
48
- const validate = compiledLayout.validates[skeleton.root]
48
+ const validate = compiledLayout.validates[skeleton.refPointer]
49
49
  const valid = validate(data)
50
50
  if (validate.errors) {
51
51
  for (const error of validate.errors) {
@@ -8,7 +8,6 @@ export const commonjsDeps = [
8
8
  'ajv-formats/dist/formats.js',
9
9
  'ajv-i18n',
10
10
  'ajv-errors',
11
- 'markdown-it',
12
11
  'debug'
13
12
  ]
14
13
 
@@ -20,6 +19,5 @@ export const commonjsDepsPaths = [
20
19
  ['@json-layout/core', 'ajv-formats/dist/formats.js'],
21
20
  ['@json-layout/core', 'ajv-i18n'],
22
21
  ['@json-layout/core', 'ajv-errors'],
23
- ['@json-layout/core', 'markdown-it'],
24
22
  ['@json-layout/core', 'debug']
25
23
  ]
@@ -18,11 +18,11 @@ export const compileOptions = [
18
18
  {
19
19
  key: 'markdown',
20
20
  description: 'A function that takes a string in markdown format and returns HTML code.',
21
- default: 'A markdown-it instance render function'
21
+ default: 'A function using the marked parser'
22
22
  },
23
23
  {
24
- key: 'markdownItOptions',
25
- description: 'Some options for the markdown-it instance that will be created by default',
24
+ key: 'markedOptions',
25
+ description: 'Some options for the default <a href="https://marked.js.org/using_advanced#options">marked</a> parser',
26
26
  default: {}
27
27
  },
28
28
  {
@@ -6,8 +6,7 @@
6
6
  export function compile(_schema: object, partialOptions?: import("./types.js").PartialCompileOptions | undefined): CompiledLayout;
7
7
  export { resolveLocaleRefs } from "./utils/resolve-refs.js";
8
8
  export { resolveXI18n } from "./utils/x-i18n.js";
9
- /** @type {(draft: PartialCompileOptions, newOptions: PartialCompileOptions) => PartialCompileOptions} */
10
- export const produceCompileOptions: (draft: PartialCompileOptions, newOptions: PartialCompileOptions) => PartialCompileOptions;
9
+ export { produceCompileOptions } from "./options.js";
11
10
  export type SkeletonTree = import('./types.js').SkeletonTree;
12
11
  export type SkeletonNode = import('./types.js').SkeletonNode;
13
12
  export type CompiledLayout = import('./types.js').CompiledLayout;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compile/index.js"],"names":[],"mappings":"AA+GA;;;;GAIG;AACH,iCAJW,MAAM,4EAEJ,cAAc,CA+F1B;;;AA5KD,yGAAyG;AACzG,4CADmB,qBAAqB,cAAc,qBAAqB,KAAK,qBAAqB,CAiBnG;2BAjCW,OAAO,YAAY,EAAE,YAAY;2BACjC,OAAO,YAAY,EAAE,YAAY;6BACjC,OAAO,YAAY,EAAE,cAAc;6BACnC,OAAO,YAAY,EAAE,cAAc;oCACnC,OAAO,YAAY,EAAE,qBAAqB;iCAC1C,OAAO,YAAY,EAAE,kBAAkB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compile/index.js"],"names":[],"mappings":"AA4BA;;;;GAIG;AACH,iCAJW,MAAM,4EAEJ,cAAc,CA+F1B;;;;2BA/GY,OAAO,YAAY,EAAE,YAAY;2BACjC,OAAO,YAAY,EAAE,YAAY;6BACjC,OAAO,YAAY,EAAE,cAAc;6BACnC,OAAO,YAAY,EAAE,cAAc;oCACnC,OAAO,YAAY,EAAE,qBAAqB;iCAC1C,OAAO,YAAY,EAAE,kBAAkB"}
@@ -0,0 +1,6 @@
1
+ export function fillOptions(partialOptions: PartialCompileOptions): CompileOptions;
2
+ /** @type {(draft: PartialCompileOptions, newOptions: PartialCompileOptions) => PartialCompileOptions} */
3
+ export const produceCompileOptions: (draft: PartialCompileOptions, newOptions: PartialCompileOptions) => PartialCompileOptions;
4
+ export type CompileOptions = import('./types.js').CompileOptions;
5
+ export type PartialCompileOptions = import('./types.js').PartialCompileOptions;
6
+ //# sourceMappingURL=options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/compile/options.js"],"names":[],"mappings":"AAqBO,4CAHI,qBAAqB,GACnB,cAAc,CAmD1B;AAGD,yGAAyG;AACzG,4CADmB,qBAAqB,cAAc,qBAAqB,KAAK,qBAAqB,CAiBnG;6BAhFW,OAAO,YAAY,EAAE,cAAc;oCACnC,OAAO,YAAY,EAAE,qBAAqB"}
@@ -5,7 +5,7 @@
5
5
  * @param {(schemaId: string, ref: string) => [any, string, string]} getJSONRef
6
6
  * @param {Record<string, import('./types.js').SkeletonTree>} skeletonTrees
7
7
  * @param {Record<string, import('./types.js').SkeletonNode>} skeletonNodes
8
- * @param {string[]} validates
8
+ * @param {string[]} validatePointers
9
9
  * @param {Record<string, string[]>} validationErrors
10
10
  * @param {Record<string, import('@json-layout/vocabulary').NormalizedLayout>} normalizedLayouts
11
11
  * @param {import('@json-layout/vocabulary').Expression[]} expressions
@@ -17,5 +17,5 @@
17
17
  * @param {string} [knownType]
18
18
  * @returns {import('./types.js').SkeletonNode}
19
19
  */
20
- export function makeSkeletonNode(rawSchema: any, sourceSchemaId: string, options: import('./index.js').CompileOptions, getJSONRef: (schemaId: string, ref: string) => [any, string, string], skeletonTrees: Record<string, import('./types.js').SkeletonTree>, skeletonNodes: Record<string, import('./types.js').SkeletonNode>, validates: string[], validationErrors: Record<string, string[]>, normalizedLayouts: Record<string, import('@json-layout/vocabulary').NormalizedLayout>, expressions: import('@json-layout/vocabulary').Expression[], key: string | number, pointer: string, required: boolean, condition?: string | undefined, dependent?: boolean | undefined, knownType?: string | undefined): import('./types.js').SkeletonNode;
20
+ export function makeSkeletonNode(rawSchema: any, sourceSchemaId: string, options: import('./index.js').CompileOptions, getJSONRef: (schemaId: string, ref: string) => [any, string, string], skeletonTrees: Record<string, import('./types.js').SkeletonTree>, skeletonNodes: Record<string, import('./types.js').SkeletonNode>, validatePointers: string[], validationErrors: Record<string, string[]>, normalizedLayouts: Record<string, import('@json-layout/vocabulary').NormalizedLayout>, expressions: import('@json-layout/vocabulary').Expression[], key: string | number, pointer: string, required: boolean, condition?: string | undefined, dependent?: boolean | undefined, knownType?: string | undefined): import('./types.js').SkeletonNode;
21
21
  //# sourceMappingURL=skeleton-node.d.ts.map
@@ -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,yBACxB,MAAM,OAAO,MAAM,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,iBACxD,OAAO,MAAM,EAAE,OAAO,YAAY,EAAE,YAAY,CAAC,iBACjD,OAAO,MAAM,EAAE,OAAO,YAAY,EAAE,YAAY,CAAC,aACjD,MAAM,EAAE,oBACR,OAAO,MAAM,EAAE,MAAM,EAAE,CAAC,qBACxB,OAAO,MAAM,EAAE,OAAO,yBAAyB,EAAE,gBAAgB,CAAC,eAClE,OAAO,yBAAyB,EAAE,UAAU,EAAE,OAC9C,MAAM,GAAG,MAAM,WACf,MAAM,YACN,OAAO,oGAIL,OAAO,YAAY,EAAE,YAAY,CAse7C"}
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,yBACxB,MAAM,OAAO,MAAM,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,iBACxD,OAAO,MAAM,EAAE,OAAO,YAAY,EAAE,YAAY,CAAC,iBACjD,OAAO,MAAM,EAAE,OAAO,YAAY,EAAE,YAAY,CAAC,oBACjD,MAAM,EAAE,oBACR,OAAO,MAAM,EAAE,MAAM,EAAE,CAAC,qBACxB,OAAO,MAAM,EAAE,OAAO,yBAAyB,EAAE,gBAAgB,CAAC,eAClE,OAAO,yBAAyB,EAAE,UAAU,EAAE,OAC9C,MAAM,GAAG,MAAM,WACf,MAAM,YACN,OAAO,oGAIL,OAAO,YAAY,EAAE,YAAY,CAue7C"}
@@ -5,7 +5,7 @@
5
5
  * @param {(schemaId: string, ref: string) => [any, string, string]} getJSONRef
6
6
  * @param {Record<string, import('./types.js').SkeletonTree>} skeletonTrees
7
7
  * @param {Record<string, import('./types.js').SkeletonNode>} skeletonNodes
8
- * @param {string[]} validates
8
+ * @param {string[]} validatePointers
9
9
  * @param {Record<string, string[]>} validationErrors
10
10
  * @param {Record<string, import('@json-layout/vocabulary').NormalizedLayout>} normalizedLayouts
11
11
  * @param {import('@json-layout/vocabulary').Expression[]} expressions
@@ -13,5 +13,5 @@
13
13
  * @param {string} title
14
14
  * @returns {import('./types.js').SkeletonTree}
15
15
  */
16
- export function makeSkeletonTree(schema: any, schemaId: string, options: import('./index.js').CompileOptions, getJSONRef: (schemaId: string, ref: string) => [any, string, string], skeletonTrees: Record<string, import('./types.js').SkeletonTree>, skeletonNodes: Record<string, import('./types.js').SkeletonNode>, validates: string[], validationErrors: Record<string, string[]>, normalizedLayouts: Record<string, import('@json-layout/vocabulary').NormalizedLayout>, expressions: import('@json-layout/vocabulary').Expression[], pointer: string, title: string): import('./types.js').SkeletonTree;
16
+ export function makeSkeletonTree(schema: any, schemaId: string, options: import('./index.js').CompileOptions, getJSONRef: (schemaId: string, ref: string) => [any, string, string], skeletonTrees: Record<string, import('./types.js').SkeletonTree>, skeletonNodes: Record<string, import('./types.js').SkeletonNode>, validatePointers: string[], validationErrors: Record<string, string[]>, normalizedLayouts: Record<string, import('@json-layout/vocabulary').NormalizedLayout>, expressions: import('@json-layout/vocabulary').Expression[], pointer: string, title: string): import('./types.js').SkeletonTree;
17
17
  //# sourceMappingURL=skeleton-tree.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton-tree.d.ts","sourceRoot":"","sources":["../../src/compile/skeleton-tree.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;GAcG;AACH,yCAdW,GAAG,YACH,MAAM,WACN,OAAO,YAAY,EAAE,cAAc,yBACxB,MAAM,OAAO,MAAM,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,iBACxD,OAAO,MAAM,EAAE,OAAO,YAAY,EAAE,YAAY,CAAC,iBACjD,OAAO,MAAM,EAAE,OAAO,YAAY,EAAE,YAAY,CAAC,aACjD,MAAM,EAAE,oBACR,OAAO,MAAM,EAAE,MAAM,EAAE,CAAC,qBACxB,OAAO,MAAM,EAAE,OAAO,yBAAyB,EAAE,gBAAgB,CAAC,eAClE,OAAO,yBAAyB,EAAE,UAAU,EAAE,WAC9C,MAAM,SACN,MAAM,GACJ,OAAO,YAAY,EAAE,YAAY,CAqC7C"}
1
+ {"version":3,"file":"skeleton-tree.d.ts","sourceRoot":"","sources":["../../src/compile/skeleton-tree.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;GAcG;AACH,yCAdW,GAAG,YACH,MAAM,WACN,OAAO,YAAY,EAAE,cAAc,yBACxB,MAAM,OAAO,MAAM,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,iBACxD,OAAO,MAAM,EAAE,OAAO,YAAY,EAAE,YAAY,CAAC,iBACjD,OAAO,MAAM,EAAE,OAAO,YAAY,EAAE,YAAY,CAAC,oBACjD,MAAM,EAAE,oBACR,OAAO,MAAM,EAAE,MAAM,EAAE,CAAC,qBACxB,OAAO,MAAM,EAAE,OAAO,yBAAyB,EAAE,gBAAgB,CAAC,eAClE,OAAO,yBAAyB,EAAE,UAAU,EAAE,WAC9C,MAAM,SACN,MAAM,GACJ,OAAO,YAAY,EAAE,YAAY,CAqC7C"}
@@ -1,5 +1,5 @@
1
1
  import type ajvModule from 'ajv/dist/2019.js';
2
- import type MarkdownIt from 'markdown-it';
2
+ import type { MarkedOptions } from 'marked';
3
3
  import { type ComponentInfo, type BaseCompObject, type NormalizedLayout, type StateNodeOptionsBase, type Expression } from '@json-layout/vocabulary';
4
4
  import { type ValidateFunction, type SchemaObject } from 'ajv/dist/2019.js';
5
5
  import { type Display } from '../state/utils/display.js';
@@ -14,7 +14,7 @@ export interface CompileOptions {
14
14
  ajvOptions?: ajvModule.Options;
15
15
  code: boolean;
16
16
  markdown: (text: string) => string;
17
- markdownItOptions?: MarkdownIt.Options;
17
+ markedOptions?: MarkedOptions;
18
18
  locale: string;
19
19
  defaultLocale: string;
20
20
  messages: LocaleMessages;
@@ -44,6 +44,7 @@ export interface CompiledLayout {
44
44
  export interface SkeletonTree {
45
45
  title: string;
46
46
  root: string;
47
+ refPointer: string;
47
48
  }
48
49
  export interface SkeletonNode {
49
50
  key: string | number;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/compile/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,UAAU,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAE,KAAK,oBAAoB,EAAE,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpJ,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,YAAY,EAAoB,MAAM,kBAAkB,CAAA;AAC7F,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,2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MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB;AAID,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,SAAS,CAAC,EAAE,UAAU,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-refs.d.ts","sourceRoot":"","sources":["../../../src/compile/utils/resolve-refs.js"],"names":[],"mappings":"AAwBA;;;;;;;GAOG;AACH,0CANW,OAAO,KAAK,EAAE,YAAY,OAC1B,OAAO,kBAAkB,EAAE,OAAO,+EAGrB,MAAM,OAAO,MAAM,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,CASpE;AAuCD;;;;;GAKG;AACH,2CAJW,OAAO,KAAK,EAAE,YAAY,YAC1B,MAAM,yBACK,MAAM,OAAO,MAAM,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,OA+ClE"}
1
+ {"version":3,"file":"resolve-refs.d.ts","sourceRoot":"","sources":["../../../src/compile/utils/resolve-refs.js"],"names":[],"mappings":"AAyBA;;;;;;;GAOG;AACH,0CANW,OAAO,KAAK,EAAE,YAAY,OAC1B,OAAO,kBAAkB,EAAE,OAAO,+EAGrB,MAAM,OAAO,MAAM,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,CASpE;AAuCD;;;;;GAKG;AACH,2CAJW,OAAO,KAAK,EAAE,YA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,OACT,MAAM,QAuBhB;IAED;;OAEG;IACH,qBAFW,SAAS,QAUnB;IAED,wBASC;CACF;wBAhoBY,OAAO,YAAY,EAAE,SAAS;wBAC9B,OAAO,YAAY,EAAE,SAAS;oCAC9B,OAAO,YAAY,EAAE,qBAAqB;qCAC1C,OAAO,YAAY,EAAE,sBAAsB;4BAC3C,OAAO,YAAY,EAAE,aAAa;2BAClC,OAAO,YAAY,EAAE,YAAY;8BACjC,OAAO,YAAY,EAAE,eAAe;yBACpC,OAAO,YAAY,EAAE,UAAU;0BAC/B,OAAO,YAAY,EAAE,WAAW;yBAChC,OAAO,YAAY,EAAE,UAAU;+BAC/B,OAAO,YAAY,EAAE,gBAAgB;6BACrC,OAAO,YAAY,EAAE,cAAc;gCACnC,OAAO,YAAY,EAAE,iBAAiB;8BACtC,OAAO,YAAY,EAAE,eAAe;2BACpC,OAAO,YAAY,EAAE,YAAY;2BACjC,OAAO,YAAY,EAAE,YAAY;yBACjC,OAAO,YAAY,EAAE,UAAU;8BAC/B,OAAO,YAAY,EAAE,eAAe;6BACpC,OAAO,YAAY,EAAE,cAAc;iCACnC,OAAO,YAAY,EAAE,kBAAkB;6BACvC,OAAO,YAAY,EAAE,cAAc;kCACnC,OAAO,YAAY,EAAE,mBAAmB;uBACxC,OAAO,YAAY,EAAE,QAAQ;+BAC7B,OAAO,YAAY,EAAE,gBAAgB;0BACrC,OAAO,YAAY,EAAE,WAAW;8BAChC,OAAO,YAAY,EAAE,eAAe;uBACpC,OAAO,YAAY,EAAE,QAAQ;4BAC7B,OAAO,YAAY,EAAE,aAAa;uBAClC,OAAO,YAAY,EAAE,QAAQ;sBAC7B,OAAO,YAAY,EAAE,OAAO;wBAtCjB,oBAAoB"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @typedef {import('./types.js').StatefulLayoutOptions} StatefulLayoutOptions
3
+ */
4
+ /**
5
+ * @param {Partial<StatefulLayoutOptions>} partialOptions
6
+ * @param {import('../index.js').CompiledLayout} compiledLayout
7
+ * @returns {StatefulLayoutOptions}
8
+ */
9
+ export function fillOptions(partialOptions: Partial<StatefulLayoutOptions>, compiledLayout: import('../index.js').CompiledLayout): StatefulLayoutOptions;
10
+ export type StatefulLayoutOptions = import('./types.js').StatefulLayoutOptions;
11
+ //# sourceMappingURL=options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/state/options.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;GAIG;AACH,4CAJW,QAAQ,qBAAqB,CAAC,kBAC9B,OAAO,aAAa,EAAE,cAAc,GAClC,qBAAqB,CA4BjC;oCAlCY,OAAO,YAAY,EAAE,qBAAqB"}
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/utils/build.js"],"names":[],"mappings":"AAEA,uBAAuB;AACvB,2BADW,MAAM,EAAE,CASlB;AAED,yBAAyB;AACzB,gCADW,MAAM,EAAE,EAAE,CASpB"}