@json-layout/vocabulary 1.4.1 → 1.5.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/package.json +3 -4
- package/src/index.js +1 -1
- package/src/layout-keyword/index.js +6 -7
- package/src/normalize.js +34 -1
- package/src/normalized-layout/index.js +3 -4
- package/src/types.ts +12 -1
- package/types/components/compile-types.d.ts +13 -0
- package/types/components/compile-types.d.ts.map +1 -0
- package/types/components/index.d.ts +54 -0
- package/types/components/index.d.ts.map +1 -0
- package/types/components/types.d.ts +420 -0
- package/types/components/types.d.ts.map +1 -0
- package/types/index.d.ts +7 -0
- package/types/index.d.ts.map +1 -0
- package/types/layout-keyword/index.d.ts +51 -0
- package/types/layout-keyword/index.d.ts.map +1 -0
- package/types/layout-keyword/schema.d.ts +387 -0
- package/types/layout-keyword/schema.d.ts.map +1 -0
- package/types/layout-keyword/types.d.ts +222 -0
- package/types/layout-keyword/types.d.ts.map +1 -0
- package/types/normalize.d.ts +32 -0
- package/types/normalize.d.ts.map +1 -0
- package/types/normalized-layout/index.d.ts +66 -0
- package/types/normalized-layout/index.d.ts.map +1 -0
- package/types/normalized-layout/schema.d.ts +583 -0
- package/types/normalized-layout/schema.d.ts.map +1 -0
- package/types/normalized-layout/types.d.ts +294 -0
- package/types/normalized-layout/types.d.ts.map +1 -0
- package/types/types.d.ts +50 -0
- package/types/types.d.ts.map +1 -0
- package/types/validate.d.ts +8 -0
- package/types/validate.d.ts.map +1 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
3
|
+
* via the `definition` "layout-keyword".
|
|
4
|
+
*/
|
|
5
|
+
export type LayoutKeyword = ComponentName | PartialChildren | PartialCompObject | PartialSwitch;
|
|
6
|
+
/**
|
|
7
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
8
|
+
* via the `definition` "comp-name".
|
|
9
|
+
*/
|
|
10
|
+
export type ComponentName = string;
|
|
11
|
+
/**
|
|
12
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
13
|
+
* via the `definition` "partial-child".
|
|
14
|
+
*/
|
|
15
|
+
export type PartialChild = string | PartialChild[] | PartialChildRef | PartialChildComposite | PartialChildSlot;
|
|
16
|
+
/**
|
|
17
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
18
|
+
* via the `definition` "partial-cols".
|
|
19
|
+
*/
|
|
20
|
+
export type PartialCols = PartialColsNumber | PartialColsObj;
|
|
21
|
+
/**
|
|
22
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
23
|
+
* via the `definition` "partial-cols-number".
|
|
24
|
+
*/
|
|
25
|
+
export type PartialColsNumber = number;
|
|
26
|
+
/**
|
|
27
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
28
|
+
* via the `definition` "partial-expression".
|
|
29
|
+
*/
|
|
30
|
+
export type PartialExpression = string | PartialExpressionObj;
|
|
31
|
+
/**
|
|
32
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
33
|
+
* via the `patternProperty` ".*".
|
|
34
|
+
*
|
|
35
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
36
|
+
* via the `patternProperty` ".*".
|
|
37
|
+
*
|
|
38
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
39
|
+
* via the `patternProperty` ".*".
|
|
40
|
+
*
|
|
41
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
42
|
+
* via the `definition` "partial-slot".
|
|
43
|
+
*/
|
|
44
|
+
export type PartialSlot = string | PartialSlotText | PartialSlotMarkdown | PartialSlotName;
|
|
45
|
+
export type PartialChildSlot = {
|
|
46
|
+
cols?: PartialCols;
|
|
47
|
+
if?: PartialExpression;
|
|
48
|
+
[k: string]: unknown;
|
|
49
|
+
} & PartialChildSlot1;
|
|
50
|
+
/**
|
|
51
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
52
|
+
* via the `definition` "partial-child-slot".
|
|
53
|
+
*/
|
|
54
|
+
export type PartialChildSlot1 = PartialSlotText | PartialSlotMarkdown | PartialSlotName;
|
|
55
|
+
/**
|
|
56
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
57
|
+
* via the `definition` "partial-children".
|
|
58
|
+
*/
|
|
59
|
+
export type PartialChildren = PartialChild[];
|
|
60
|
+
/**
|
|
61
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
62
|
+
* via the `definition` "partial-select-item".
|
|
63
|
+
*/
|
|
64
|
+
export type PartialSelectItem = string | {
|
|
65
|
+
key?: string;
|
|
66
|
+
title?: string;
|
|
67
|
+
value?: unknown;
|
|
68
|
+
[k: string]: unknown;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
72
|
+
* via the `definition` "partial-get-items".
|
|
73
|
+
*/
|
|
74
|
+
export type PartialGetItems = string | PartialGetItemsObj;
|
|
75
|
+
/**
|
|
76
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
77
|
+
* via the `definition` "partial-get-items-obj".
|
|
78
|
+
*/
|
|
79
|
+
export type PartialGetItemsObj = {
|
|
80
|
+
itemTitle?: PartialExpression;
|
|
81
|
+
itemKey?: PartialExpression;
|
|
82
|
+
itemValue?: PartialExpression;
|
|
83
|
+
itemIcon?: PartialExpression;
|
|
84
|
+
itemsResults?: PartialExpression;
|
|
85
|
+
[k: string]: unknown;
|
|
86
|
+
} & ({
|
|
87
|
+
[k: string]: unknown;
|
|
88
|
+
} | PartialExpressionObj | PartialGetItemsFetch);
|
|
89
|
+
export interface HttpsJsonLayoutGithubIoLayoutKeyword {
|
|
90
|
+
[k: string]: unknown;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
94
|
+
* via the `definition` "partial-child-ref".
|
|
95
|
+
*/
|
|
96
|
+
export interface PartialChildRef {
|
|
97
|
+
key: string | number;
|
|
98
|
+
cols?: PartialCols;
|
|
99
|
+
if?: PartialExpression;
|
|
100
|
+
slots?: {
|
|
101
|
+
[k: string]: PartialSlot;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
106
|
+
* via the `definition` "partial-cols-obj".
|
|
107
|
+
*/
|
|
108
|
+
export interface PartialColsObj {
|
|
109
|
+
xs?: PartialColsNumber;
|
|
110
|
+
sm?: PartialColsNumber;
|
|
111
|
+
md?: PartialColsNumber;
|
|
112
|
+
lg?: PartialColsNumber;
|
|
113
|
+
xl?: PartialColsNumber;
|
|
114
|
+
xxl?: PartialColsNumber;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
118
|
+
* via the `definition` "partial-expression-obj".
|
|
119
|
+
*/
|
|
120
|
+
export interface PartialExpressionObj {
|
|
121
|
+
type?: "js-fn" | "js-eval" | "js-tpl";
|
|
122
|
+
expr: string;
|
|
123
|
+
[k: string]: unknown;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
127
|
+
* via the `definition` "partial-slot-text".
|
|
128
|
+
*/
|
|
129
|
+
export interface PartialSlotText {
|
|
130
|
+
text: string;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
134
|
+
* via the `definition` "partial-slot-markdown".
|
|
135
|
+
*/
|
|
136
|
+
export interface PartialSlotMarkdown {
|
|
137
|
+
markdown: string;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
141
|
+
* via the `definition` "partial-slot-name".
|
|
142
|
+
*/
|
|
143
|
+
export interface PartialSlotName {
|
|
144
|
+
name: string;
|
|
145
|
+
props?: {
|
|
146
|
+
[k: string]: unknown;
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
151
|
+
* via the `definition` "partial-child-composite".
|
|
152
|
+
*/
|
|
153
|
+
export interface PartialChildComposite {
|
|
154
|
+
comp?: string;
|
|
155
|
+
title?: string | null;
|
|
156
|
+
subtitle?: string | null;
|
|
157
|
+
children: PartialChildren;
|
|
158
|
+
cols?: PartialCols;
|
|
159
|
+
if?: PartialExpression;
|
|
160
|
+
slots?: {
|
|
161
|
+
[k: string]: PartialSlot;
|
|
162
|
+
};
|
|
163
|
+
[k: string]: unknown;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
167
|
+
* via the `definition` "partial-comp-object".
|
|
168
|
+
*/
|
|
169
|
+
export interface PartialCompObject {
|
|
170
|
+
comp?: ComponentName;
|
|
171
|
+
help?: string;
|
|
172
|
+
children?: PartialChildren;
|
|
173
|
+
label?: string;
|
|
174
|
+
hint?: string | null;
|
|
175
|
+
title?: string | null;
|
|
176
|
+
subtitle?: string | null;
|
|
177
|
+
step?: number;
|
|
178
|
+
if?: PartialExpression;
|
|
179
|
+
items?: PartialSelectItem[];
|
|
180
|
+
getItems?: PartialGetItems;
|
|
181
|
+
listEditMode?: "inline" | "inline-single" | "menu" | "dialog";
|
|
182
|
+
listActions?: ("add" | "edit" | "delete" | "sort" | "duplicate")[];
|
|
183
|
+
cols?: PartialCols;
|
|
184
|
+
props?: {
|
|
185
|
+
[k: string]: unknown;
|
|
186
|
+
};
|
|
187
|
+
getProps?: PartialExpression;
|
|
188
|
+
slots?: {
|
|
189
|
+
[k: string]: PartialSlot;
|
|
190
|
+
};
|
|
191
|
+
options?: {
|
|
192
|
+
[k: string]: unknown;
|
|
193
|
+
};
|
|
194
|
+
getOptions?: PartialExpression;
|
|
195
|
+
messages?: {
|
|
196
|
+
[k: string]: unknown;
|
|
197
|
+
};
|
|
198
|
+
defaultData?: unknown;
|
|
199
|
+
getDefaultData?: PartialExpression;
|
|
200
|
+
constData?: unknown;
|
|
201
|
+
getConstData?: PartialExpression;
|
|
202
|
+
transformData?: PartialExpression;
|
|
203
|
+
autofocus?: boolean;
|
|
204
|
+
separator?: string;
|
|
205
|
+
[k: string]: unknown;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
209
|
+
* via the `definition` "partial-get-items-fetch".
|
|
210
|
+
*/
|
|
211
|
+
export interface PartialGetItemsFetch {
|
|
212
|
+
url: PartialExpression;
|
|
213
|
+
[k: string]: unknown;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* This interface was referenced by `HttpsJsonLayoutGithubIoLayoutKeyword`'s JSON-Schema
|
|
217
|
+
* via the `definition` "partial-switch".
|
|
218
|
+
*/
|
|
219
|
+
export interface PartialSwitch {
|
|
220
|
+
switch: PartialCompObject[];
|
|
221
|
+
}
|
|
222
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":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WAAW,CAAC,EAAE,CAAC,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC,EAAE,CAAC;IACnE,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE;QACN,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;KACtB,CAAC;IACF,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,KAAK,CAAC,EAAE;QACN,CAAC,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;KAC1B,CAAC;IACF,OAAO,CAAC,EAAE;QACR,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;KACtB,CAAC;IACF,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,QAAQ,CAAC,EAAE;QACT,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;KACtB,CAAC;IACF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB;AACD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,iBAAiB,CAAC;IACvB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB;AACD;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,iBAAiB,EAAE,CAAC;CAC7B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {string | number} key
|
|
3
|
+
* @param {SchemaFragment} schemaFragment
|
|
4
|
+
* @param {string} schemaPath
|
|
5
|
+
* @param {Record<string, import('./types.js').ComponentInfo>} components
|
|
6
|
+
* @param {(text: string) => string} markdown
|
|
7
|
+
* @param {Array<'help' | 'hint' | 'subtitle'>} useDescription
|
|
8
|
+
* @param {string[]} [optionsKeys]
|
|
9
|
+
* @param {'oneOf' | 'patternProperties'} [schemaChild]
|
|
10
|
+
* @param {string | undefined} [knownType]
|
|
11
|
+
* @param {boolean} [knownNullable]
|
|
12
|
+
* @returns {{layout: NormalizedLayout, errors: string[]}}
|
|
13
|
+
*/
|
|
14
|
+
export function normalizeLayoutFragment(key: string | number, schemaFragment: SchemaFragment, schemaPath: string, components: Record<string, import("./types.js").ComponentInfo>, markdown: ((text: string) => string) | undefined, useDescription: Array<"help" | "hint" | "subtitle">, optionsKeys?: string[], schemaChild?: "oneOf" | "patternProperties", knownType?: string | undefined, knownNullable?: boolean): {
|
|
15
|
+
layout: NormalizedLayout;
|
|
16
|
+
errors: string[];
|
|
17
|
+
};
|
|
18
|
+
export function mergeNullableSubSchema(schemaFragment: SchemaFragment): boolean | undefined;
|
|
19
|
+
export function getSchemaFragmentType(schemaFragment: SchemaFragment): {
|
|
20
|
+
type: string | undefined;
|
|
21
|
+
nullable: boolean;
|
|
22
|
+
};
|
|
23
|
+
export type Child = import("./index.js").Child;
|
|
24
|
+
export type Children = import("./index.js").Children;
|
|
25
|
+
export type BaseCompObject = import("./index.js").BaseCompObject;
|
|
26
|
+
export type Expression = import("./index.js").Expression;
|
|
27
|
+
export type NormalizedLayout = import("./index.js").NormalizedLayout;
|
|
28
|
+
export type LayoutKeyword = import("./index.js").LayoutKeyword;
|
|
29
|
+
export type PartialChildren = import("./index.js").PartialChildren;
|
|
30
|
+
export type PartialCompObject = import("./index.js").PartialCompObject;
|
|
31
|
+
export type SchemaFragment = import("./types.js").SchemaFragment;
|
|
32
|
+
//# sourceMappingURL=normalize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../src/normalize.js"],"names":[],"mappings":"AAwqBA;;;;;;;;;;;;GAYG;AACH,6CAZW,MAAM,GAAG,MAAM,kBACf,cAAc,cACd,MAAM,cACN,MAAM,CAAC,MAAM,EAAE,OAAO,YAAY,EAAE,aAAa,CAAC,aAClD,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,+BACxB,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC,gBACnC,MAAM,EAAE,gBACR,OAAO,GAAG,mBAAmB,cAC7B,MAAM,GAAG,SAAS,kBAClB,OAAO,GACL;IAAC,MAAM,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAC,CAwBxD;AAlaM,uDAHI,cAAc,GACZ,OAAO,GAAG,SAAS,CAyB/B;AAMM,sDAHI,cAAc,GACZ;IAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAC,CAkCzD;oBAjWY,OAAO,YAAY,EAAE,KAAK;uBAC1B,OAAO,YAAY,EAAE,QAAQ;6BAC7B,OAAO,YAAY,EAAE,cAAc;yBACnC,OAAO,YAAY,EAAE,UAAU;+BAC/B,OAAO,YAAY,EAAE,gBAAgB;4BACrC,OAAO,YAAY,EAAE,aAAa;8BAClC,OAAO,YAAY,EAAE,eAAe;gCACpC,OAAO,YAAY,EAAE,iBAAiB;6BACtC,OAAO,YAAY,EAAE,cAAc"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export function isSwitchStruct(layout: NormalizedLayout): layout is SwitchStruct;
|
|
2
|
+
export function isCompObject(layout: NormalizedLayout): layout is BaseCompObject;
|
|
3
|
+
export function childIsCompositeCompObject(child: Child): child is Child & CompositeCompObject;
|
|
4
|
+
export function childIsSlotCompObject(child: Child): child is Child & SlotCompObject;
|
|
5
|
+
export function isCompositeLayout(layout: BaseCompObject, components: Record<string, import("../types.js").ComponentInfo>): layout is CompositeCompObject;
|
|
6
|
+
export function isListLayout(layout: BaseCompObject): layout is import("../components/types.js").List;
|
|
7
|
+
export function isFocusableLayout(layout: BaseCompObject, components: Record<string, import("../types.js").ComponentInfo>): layout is FocusableCompObject;
|
|
8
|
+
export function isItemsLayout(layout: BaseCompObject, components: Record<string, import("../types.js").ComponentInfo>): layout is ItemsBasedCompObject;
|
|
9
|
+
export function isGetItemsExpression(getItems: GetItems): getItems is Expression;
|
|
10
|
+
export function isGetItemsFetch(getItems: GetItems): getItems is GetItemsFetch;
|
|
11
|
+
export function isTextSlot(slot: Slot): slot is {
|
|
12
|
+
text: string;
|
|
13
|
+
};
|
|
14
|
+
export function isMarkdownSlot(slot: Slot): slot is {
|
|
15
|
+
markdown: string;
|
|
16
|
+
};
|
|
17
|
+
export function isNameSlot(slot: Slot): slot is {
|
|
18
|
+
name: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* @typedef {import('./types.js').NormalizedLayout} NormalizedLayout
|
|
22
|
+
* @typedef {import('./types.js').SwitchStruct} SwitchStruct
|
|
23
|
+
* @typedef {import('./types.js').BaseCompObject} BaseCompObject
|
|
24
|
+
* @typedef {import('./types.js').SelectItem} SelectItem
|
|
25
|
+
* @typedef {import('./types.js').SelectItems} SelectItems
|
|
26
|
+
* @typedef {import('./types.js').GetItemsFetch} GetItemsFetch
|
|
27
|
+
* @typedef {import('./types.js').Child} Child
|
|
28
|
+
* @typedef {import('./types.js').Children} Children
|
|
29
|
+
* @typedef {import('./types.js').ChildSlot} ChildSlot
|
|
30
|
+
* @typedef {import('./types.js').CompositeCompObject} CompositeCompObject
|
|
31
|
+
* @typedef {import('./types.js').SlotCompObject} SlotCompObject
|
|
32
|
+
* @typedef {import('./types.js').ItemsBasedCompObject} ItemsBasedCompObject
|
|
33
|
+
* @typedef {import('./types.js').FocusableCompObject} FocusableCompObject
|
|
34
|
+
* @typedef {import('./types.js').GetItems} GetItems
|
|
35
|
+
* @typedef {import('./types.js').Expression} Expression
|
|
36
|
+
* @typedef {import('./types.js').Cols} Cols
|
|
37
|
+
* @typedef {import('./types.js').ColsObj} ColsObj
|
|
38
|
+
* @typedef {import('./types.js').StateNodeOptionsBase} StateNodeOptionsBase
|
|
39
|
+
* @typedef {import('./types.js').StateNodePropsLib} StateNodePropsLib
|
|
40
|
+
* @typedef {import('./types.js').Slot} Slot
|
|
41
|
+
* @typedef {import('./types.js').Slots} Slots
|
|
42
|
+
*/
|
|
43
|
+
export const validateNormalizedLayout: import("../types.js").ValidateNormalizedLayout;
|
|
44
|
+
export const normalizedLayoutSchema: any;
|
|
45
|
+
export type NormalizedLayout = import("./types.js").NormalizedLayout;
|
|
46
|
+
export type SwitchStruct = import("./types.js").SwitchStruct;
|
|
47
|
+
export type BaseCompObject = import("./types.js").BaseCompObject;
|
|
48
|
+
export type SelectItem = import("./types.js").SelectItem;
|
|
49
|
+
export type SelectItems = import("./types.js").SelectItems;
|
|
50
|
+
export type GetItemsFetch = import("./types.js").GetItemsFetch;
|
|
51
|
+
export type Child = import("./types.js").Child;
|
|
52
|
+
export type Children = import("./types.js").Children;
|
|
53
|
+
export type ChildSlot = import("./types.js").ChildSlot;
|
|
54
|
+
export type CompositeCompObject = import("./types.js").CompositeCompObject;
|
|
55
|
+
export type SlotCompObject = import("./types.js").SlotCompObject;
|
|
56
|
+
export type ItemsBasedCompObject = import("./types.js").ItemsBasedCompObject;
|
|
57
|
+
export type FocusableCompObject = import("./types.js").FocusableCompObject;
|
|
58
|
+
export type GetItems = import("./types.js").GetItems;
|
|
59
|
+
export type Expression = import("./types.js").Expression;
|
|
60
|
+
export type Cols = import("./types.js").Cols;
|
|
61
|
+
export type ColsObj = import("./types.js").ColsObj;
|
|
62
|
+
export type StateNodeOptionsBase = import("./types.js").StateNodeOptionsBase;
|
|
63
|
+
export type StateNodePropsLib = import("./types.js").StateNodePropsLib;
|
|
64
|
+
export type Slot = import("./types.js").Slot;
|
|
65
|
+
export type Slots = import("./types.js").Slots;
|
|
66
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"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