@json-layout/core 0.33.1 → 0.33.2
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 +2 -2
- package/src/compile/index.js +2 -85
- package/src/compile/options.js +91 -0
- package/src/compile/types.ts +2 -2
- package/src/state/index.js +2 -33
- package/src/state/options.js +36 -0
- package/src/utils/doc-options.js +2 -2
- package/types/compile/index.d.ts +1 -2
- package/types/compile/index.d.ts.map +1 -1
- package/types/compile/options.d.ts +6 -0
- package/types/compile/options.d.ts.map +1 -0
- package/types/compile/types.d.ts +2 -2
- package/types/compile/types.d.ts.map +1 -1
- package/types/state/index.d.ts.map +1 -1
- package/types/state/options.d.ts +11 -0
- package/types/state/options.d.ts.map +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@json-layout/core",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.2",
|
|
4
4
|
"description": "Compilation and state management utilities for JSON Layout.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"debug": "^4.3.4",
|
|
69
69
|
"immer": "^10.0.3",
|
|
70
70
|
"magicast": "^0.3.3",
|
|
71
|
-
"
|
|
71
|
+
"marked": "^14.1.3"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@types/debug": "^4.1.7",
|
package/src/compile/index.js
CHANGED
|
@@ -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 {
|
|
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
|
+
})
|
package/src/compile/types.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type ajvModule from 'ajv/dist/2019.js'
|
|
2
|
-
import type
|
|
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
|
-
|
|
30
|
+
markedOptions?: MarkedOptions
|
|
31
31
|
locale: string
|
|
32
32
|
defaultLocale: string
|
|
33
33
|
messages: LocaleMessages
|
package/src/state/index.js
CHANGED
|
@@ -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
|
+
}
|
package/src/utils/doc-options.js
CHANGED
|
@@ -21,8 +21,8 @@ export const compileOptions = [
|
|
|
21
21
|
default: 'A markdown-it instance render function'
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
key: '
|
|
25
|
-
description: 'Some options for the
|
|
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
|
{
|
package/types/compile/index.d.ts
CHANGED
|
@@ -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
|
-
|
|
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":"
|
|
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"}
|
package/types/compile/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type ajvModule from 'ajv/dist/2019.js';
|
|
2
|
-
import type
|
|
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
|
-
|
|
17
|
+
markedOptions?: MarkedOptions;
|
|
18
18
|
locale: string;
|
|
19
19
|
defaultLocale: string;
|
|
20
20
|
messages: LocaleMessages;
|
|
@@ -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,
|
|
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,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAC3C,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,2BAA2B,CAAA;AACxD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEtD,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,EAAE,uBAAuB,GAAG,SAAS,GAAG,IAAI,CAAA;CACnD;AAED,MAAM,MAAM,kBAAkB,GAAG,CAC/B,IAAI,EAAE,GAAG,EACT,SAAS,EAAE,GAAG,EACd,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,cAAc,EACtB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAC3C,QAAQ,CAAC,EAAE,OAAO,EAClB,MAAM,CAAC,EAAE,uBAAuB,GAAG,IAAI,KACpC,GAAG,CAAA;AAER,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,SAAS,CAAC,OAAO,CAAA;IACtB,UAAU,C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AAI,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAA;IACzD,cAAc,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,WAAW,EAAE,KAAK,IAAI,CAAA;CAC1D;AAID,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb;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":"index.d.ts","sourceRoot":"","sources":["../../src/state/index.js"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/state/index.js"],"names":[],"mappings":";;AAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,mEAAmE;AACnE,+BADkB,SAAS,GAAG,SAAS,8CACoC;AAE3E,iLAAiL;AACjL,iCADkB,SAAS,GAAG,SAAS,cAAc,OAAO,MAAM,EAAE,OAAO,yBAAyB,EAAE,aAAa,CAAC,yHACnB;AAIjG;IA2HE;;;;;OAKG;IACH,4BALW,OAAO,aAAa,EAAE,cAAc,gBACpC,OAAO,aAAa,EAAE,YAAY,WAClC,QAAQ,qBAAqB,CAAC,SAC9B,OAAO,EAejB;IA7ID;;;;OAIG;IACH,iCAAe;IACf,mEAAqD;IAErD;;;OAG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"}
|
|
@@ -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"}
|