@flowgram-vue/json-schema 0.2.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.
@@ -0,0 +1,152 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ import { injectable } from 'inversify';
7
+ import { type VNode } from 'vue';
8
+
9
+ import { BaseTypeManager } from '../base';
10
+ import { dateTimeRegistryCreator } from './type-definition/date-time';
11
+ import { defaultTypeDefinitionRegistry } from './type-definition/default';
12
+ import { emptyVNode } from './type-definition/svg-vnode';
13
+ import {
14
+ arrayRegistryCreator,
15
+ booleanRegistryCreator,
16
+ integerRegistryCreator,
17
+ mapRegistryCreator,
18
+ numberRegistryCreator,
19
+ objectRegistryCreator,
20
+ stringRegistryCreator,
21
+ unknownRegistryCreator,
22
+ } from './type-definition';
23
+ import { IJsonSchema, JsonSchemaTypeRegistry, JsonSchemaTypeRegistryCreator } from './types';
24
+
25
+ @injectable()
26
+ export class JsonSchemaTypeManager<
27
+ Schema extends Partial<IJsonSchema> = IJsonSchema,
28
+ Registry extends JsonSchemaTypeRegistry<Schema> = JsonSchemaTypeRegistry<Schema>
29
+ > extends BaseTypeManager<Schema, Registry, JsonSchemaTypeManager<Schema, Registry>> {
30
+ /**
31
+ * get type name
32
+ * @param typeSchema
33
+ * @returns
34
+ */
35
+ protected getTypeNameFromSchema(typeSchema: Schema): string {
36
+ if (!typeSchema) {
37
+ return 'unknown';
38
+ }
39
+ if (typeSchema.enum) {
40
+ return 'enum';
41
+ }
42
+ if (typeSchema.format && typeSchema.type === 'string') {
43
+ return typeSchema.format;
44
+ }
45
+
46
+ return typeSchema.type || typeSchema.$ref || 'unknown';
47
+ }
48
+
49
+ constructor() {
50
+ super();
51
+
52
+ const registries = [
53
+ defaultTypeDefinitionRegistry,
54
+ stringRegistryCreator,
55
+ integerRegistryCreator,
56
+ numberRegistryCreator,
57
+ booleanRegistryCreator,
58
+ objectRegistryCreator,
59
+ arrayRegistryCreator,
60
+ unknownRegistryCreator,
61
+ mapRegistryCreator,
62
+ dateTimeRegistryCreator,
63
+ ];
64
+
65
+ registries.forEach((registry) => {
66
+ this.register(
67
+ registry as unknown as JsonSchemaTypeRegistryCreator<
68
+ Schema,
69
+ Registry,
70
+ JsonSchemaTypeManager<Schema, Registry>
71
+ >
72
+ );
73
+ });
74
+ }
75
+
76
+ /**
77
+ * Get TypeRegistries based on the current parentType
78
+ */
79
+ public getTypeRegistriesWithParentType = (parentType = ''): Registry[] =>
80
+ this.getAllTypeRegistries()
81
+ .filter((v) => v.type !== 'default')
82
+ .filter((v) => !v.parentType || v.parentType.includes(parentType));
83
+
84
+ /**
85
+ * Get the deepest child field of a field
86
+ * Array<Array<String>> -> String
87
+ */
88
+ getTypeSchemaDeepChildField = (type: Schema) => {
89
+ let registry = this.getTypeBySchema(type);
90
+
91
+ let childType = type;
92
+
93
+ while (registry?.getItemType && registry.getItemType(childType)) {
94
+ childType = registry.getItemType(childType)!;
95
+ registry = this.getTypeBySchema(childType);
96
+ }
97
+
98
+ return childType;
99
+ };
100
+
101
+ /**
102
+ * Get the plain text display string of the type schema, for example:
103
+ * Array<Array<String>>, Map<String, Number>
104
+ */
105
+ public getComplexText = (type: Schema): string => {
106
+ const registry = this.getTypeBySchema(type);
107
+
108
+ if (registry?.customComplexText) {
109
+ return registry.customComplexText(type);
110
+ }
111
+
112
+ if (registry?.container && type.items) {
113
+ return `${registry.label}<${this.getComplexText(type.items as Schema)}>`;
114
+ } else if (registry?.container && type.additionalProperties) {
115
+ return `${registry.label}<String, ${this.getComplexText(
116
+ type.additionalProperties as Schema
117
+ )}>`;
118
+ } else {
119
+ return registry?.label || type.type || 'unknown';
120
+ }
121
+ };
122
+
123
+ public getDisplayIcon = (type: Schema): VNode => {
124
+ const registry = this.getTypeBySchema(type);
125
+ return registry?.getDisplayIcon?.(type) || registry?.icon || emptyVNode();
126
+ };
127
+
128
+ public getTypeSchemaProperties = (type: Schema) => {
129
+ const registry = this.getTypeBySchema(type);
130
+ return registry?.getTypeSchemaProperties(type);
131
+ };
132
+
133
+ public getPropertiesParent = (type: Schema) => {
134
+ const registry = this.getTypeBySchema(type);
135
+ return registry?.getPropertiesParent(type);
136
+ };
137
+
138
+ public getJsonPaths = (type: Schema) => {
139
+ const registry = this.getTypeBySchema(type);
140
+ return registry?.getJsonPaths(type);
141
+ };
142
+
143
+ public canAddField = (type: Schema) => {
144
+ const registry = this.getTypeBySchema(type);
145
+ return registry?.canAddField(type);
146
+ };
147
+
148
+ public getDefaultValue = (type: Schema) => {
149
+ const registry = this.getTypeBySchema(type);
150
+ return registry?.getDefaultValue();
151
+ };
152
+ }
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ import { createSvgVNode } from './svg-vnode';
7
+
8
+ export const arrayObjectIcon = createSvgVNode({
9
+ width: "16",
10
+ height: "16",
11
+ viewBox: "0 0 16 16",
12
+ fill: "none",
13
+ xmlns: "http://www.w3.org/2000/svg"
14
+ }, `<path fill-rule="evenodd" clip-rule="evenodd" d="M0 1.58105H3.6139V2.87326H1.36702V13.1264H3.6139V14.4186H0V1.58105ZM3.41656 13.3264V13.3266H1.17155V13.3264H3.41656ZM0.197344 14.2186H0.199219V1.78125H3.41656V1.78105H0.197344V14.2186ZM12.3861 1.58105H16V14.4186H12.3861V13.1264H14.633V2.87326H12.3861V1.58105ZM12.5834 2.67326V1.78105H15.8027V1.78125H12.5853V2.67326H12.5834ZM12.5853 13.3266V14.2186H12.5834V13.3264H14.8303V2.67345H14.8322V13.3266H12.5853ZM3.82031 5.9091C3.82031 5.18535 4.40703 4.59863 5.13078 4.59863C5.85453 4.59863 6.44124 5.18535 6.44124 5.9091C6.44124 6.56485 5.9596 7.1081 5.33078 7.2044V8.70018H5.32877C5.32982 8.75093 5.33078 8.80912 5.33078 8.87034V9.72111C5.33078 10.0195 5.57268 10.2614 5.87109 10.2614H6.24124C6.55613 10.2614 6.8114 10.5167 6.8114 10.8316C6.8114 11.1465 6.55613 11.4017 6.24124 11.4017H5.87109C4.94291 11.4017 4.19047 10.6493 4.19047 9.72111V6.82186C3.96158 6.58607 3.82031 6.26397 3.82031 5.9091ZM7.33679 5.9091C7.33679 5.59421 7.59205 5.33894 7.90694 5.33894H11.6085C11.9234 5.33894 12.1786 5.59421 12.1786 5.9091C12.1786 6.22399 11.9234 6.47925 11.6085 6.47925H7.90694C7.59205 6.47925 7.33679 6.22399 7.33679 5.9091ZM7.33679 9.86846C7.33679 9.55357 7.59205 9.2983 7.90694 9.2983H11.6085C11.9234 9.2983 12.1786 9.55357 12.1786 9.86846C12.1786 10.1833 11.9234 10.4386 11.6085 10.4386H7.90694C7.59205 10.4386 7.33679 10.1833 7.33679 9.86846Z" fill="currentColor" />`);
15
+
16
+ export const arrayStringIcon = createSvgVNode({
17
+ width: "16",
18
+ height: "16",
19
+ viewBox: "0 0 16 16",
20
+ fill: "none",
21
+ xmlns: "http://www.w3.org/2000/svg"
22
+ }, `<path fill-rule="evenodd" clip-rule="evenodd" d="M0 1.58105H3.6139V2.87326H1.36702V13.1264H3.6139V14.4186H0V1.58105ZM3.41656 13.3264V13.3266H1.17155V13.3264H3.41656ZM0.197344 14.2186H0.199219V1.78125H3.41656V1.78105H0.197344V14.2186ZM12.3861 1.58105H16V14.4186H12.3861V13.1264H14.633V2.87326H12.3861V1.58105ZM12.5834 2.67326V1.78105H15.8027V1.78125H12.5853V2.67326H12.5834ZM12.5853 13.3266V14.2186H12.5834V13.3264H14.8303V2.67345H14.8322V13.3266H12.5853ZM5.23701 4.07158C5.50364 3.3161 6.56205 3.28894 6.86709 4.02974L10 11.6383C10.1329 11.9609 9.979 12.3302 9.65631 12.4631C9.33363 12.596 8.96434 12.4421 8.83147 12.1194L7.8021 9.61951H4.61903L3.7474 12.0891C3.63126 12.4182 3.27034 12.5908 2.94127 12.4747C2.6122 12.3585 2.43958 11.9976 2.55573 11.6685L5.23701 4.07158ZM6.08814 5.45704L5.06505 8.35579H7.28174L6.08814 5.45704ZM8.81938 6.07534C8.81938 5.75166 9.08177 5.48926 9.40545 5.48926H12.8941C13.2178 5.48926 13.4802 5.75166 13.4802 6.07534C13.4802 6.39902 13.2178 6.66142 12.8941 6.66142H9.40545C9.08177 6.66142 8.81938 6.39902 8.81938 6.07534ZM10.2668 9.69181C10.2668 9.36812 10.5292 9.10573 10.8529 9.10573H12.8941C13.2178 9.10573 13.4802 9.36812 13.4802 9.69181C13.4802 10.0155 13.2178 10.2779 12.8941 10.2779H10.8529C10.5292 10.2779 10.2668 10.0155 10.2668 9.69181Z" fill="currentColor" />`);
23
+
24
+ export const arrayIntegerIcon = createSvgVNode({
25
+ width: "16",
26
+ height: "16",
27
+ viewBox: "0 0 16 16",
28
+ fill: "none",
29
+ xmlns: "http://www.w3.org/2000/svg"
30
+ }, `<path fill-rule="evenodd" clip-rule="evenodd" d="M0 1.58105H3.6139V2.87326H1.36702V13.1264H3.6139V14.4186H0V1.58105ZM3.41656 13.3264V13.3266H1.17155V13.3264H3.41656ZM0.197344 14.2186H0.199219V1.78125H3.41656V1.78105H0.197344V14.2186ZM12.3861 1.58105H16V14.4186H12.3861V13.1264H14.633V2.87326H12.3861V1.58105ZM12.5834 2.67326V1.78105H15.8027V1.78125H12.5853V2.67326H12.5834ZM12.5853 13.3266V14.2186H12.5834V13.3264H14.8303V2.67345H14.8322V13.3266H12.5853ZM10.3614 5.22374C10.7161 4.90585 11.1581 4.75 11.6762 4.75C12.2173 4.75 12.6723 4.91467 13.0281 5.25207L13.0291 5.253C13.3852 5.59688 13.561 6.03946 13.561 6.56767C13.561 6.89 13.4945 7.17448 13.3539 7.41445C13.2572 7.57972 13.1279 7.71948 12.9685 7.83428C13.1575 7.95643 13.3099 8.11182 13.4225 8.30109C13.5793 8.5644 13.6531 8.88311 13.6531 9.24936C13.6531 9.83787 13.4612 10.3151 13.0656 10.6612C12.6982 10.9795 12.2305 11.1341 11.6762 11.1341C11.1356 11.1341 10.6805 10.9925 10.324 10.6977C9.92124 10.3691 9.71723 9.90026 9.69942 9.31256L9.69473 9.15802H10.846L10.8539 9.2997C10.8689 9.5698 10.9591 9.75553 11.1096 9.87941L11.1106 9.88027C11.2519 9.99882 11.4365 10.0631 11.6762 10.0631C11.9765 10.0631 12.1743 9.98692 12.2984 9.86071C12.4229 9.73404 12.4984 9.53136 12.4984 9.22422C12.4984 8.92116 12.4215 8.72127 12.2939 8.59581C12.1658 8.46989 11.961 8.39373 11.6511 8.39373H11.3586V7.34788H11.6511C11.9297 7.34788 12.111 7.27834 12.2238 7.16555C12.3366 7.05276 12.4062 6.87138 12.4062 6.59281C12.4062 6.30696 12.3378 6.12041 12.2277 6.00501C12.1188 5.89092 11.9446 5.82098 11.6762 5.82098C11.4248 5.82098 11.2539 5.88537 11.1407 5.99325C11.0268 6.10185 10.9497 6.27522 10.9291 6.5375L10.9183 6.67577H9.76788L9.77492 6.51904C9.79886 5.98644 9.99237 5.54989 10.3614 5.22374ZM5.91032 5.26037C6.26612 4.92297 6.72112 4.7583 7.26219 4.7583C7.80751 4.7583 8.26297 4.91938 8.61401 5.25194L8.61501 5.25289C8.96719 5.59272 9.13852 6.04185 9.13852 6.58435C9.13852 6.84997 9.08709 7.09565 8.9817 7.31883L8.98114 7.31999C8.89563 7.49712 8.74775 7.71415 8.54418 7.96862L8.54322 7.96981L6.87446 10.0127H9.13852V11.0753H5.36909V10.1089L7.69946 7.27679C7.89456 7.04062 7.98374 6.80773 7.98374 6.57597C7.98374 6.29602 7.91626 6.11385 7.8078 6.00122C7.70036 5.88964 7.52811 5.8209 7.26219 5.8209C7.04017 5.8209 6.87439 5.88173 6.75075 5.99193C6.61227 6.11766 6.53226 6.30918 6.53226 6.59273V6.74273H5.37747V6.59273C5.37747 6.05443 5.55248 5.60586 5.90934 5.2613L5.91032 5.26037ZM3.50907 4.80865H4.56964V11.0754H3.41486V6.2201L2.25 7.24249V5.89561L3.50907 4.80865Z" fill="currentColor" />`);
31
+
32
+ export const arrayNumberIcon = createSvgVNode({
33
+ width: "16",
34
+ height: "16",
35
+ viewBox: "0 0 16 16",
36
+ fill: "none",
37
+ xmlns: "http://www.w3.org/2000/svg"
38
+ }, `<path fill-rule="evenodd" clip-rule="evenodd" d="M3.6139 1.58154H0V14.4191H3.6139V13.1269H1.36702V2.87375H3.6139V1.58154ZM3.41656 13.3271V13.3269H1.17155V13.3271H3.41656ZM0.199219 14.2191H0.197344V1.78154H3.41656V1.78174H0.199219V14.2191ZM16 1.58154H12.3861V2.87375H14.633V13.1269H12.3861V14.4191H16V1.58154ZM12.5834 1.78154V2.67375H12.5853V1.78174H15.8027V1.78154H12.5834ZM12.5853 14.2191V13.3271H14.8322V2.67394H14.8303V13.3269H12.5834V14.2191H12.5853ZM6.86771 4.5C5.87019 4.5 5.00104 5.30767 5.00104 6.31667V9.63333C5.00104 10.6423 5.87019 11.45 6.86771 11.45C7.86523 11.45 8.73438 10.6423 8.73438 9.63333V6.31667C8.73438 5.30767 7.86523 4.5 6.86771 4.5ZM11.1177 4.5C10.1202 4.5 9.25104 5.30767 9.25104 6.31667V9.63333C9.25104 10.6423 10.1202 11.45 11.1177 11.45C12.1152 11.45 12.9844 10.6423 12.9844 9.63333V6.31667C12.9844 5.30767 12.1152 4.5 11.1177 4.5ZM6.13438 6.31667C6.13438 5.9503 6.47884 5.63333 6.86771 5.63333C7.25657 5.63333 7.60104 5.9503 7.60104 6.31667V9.63333C7.60104 9.9997 7.25657 10.3167 6.86771 10.3167C6.47884 10.3167 6.13438 9.9997 6.13438 9.63333V6.31667ZM10.3844 6.31667C10.3844 5.9503 10.7288 5.63333 11.1177 5.63333C11.5066 5.63333 11.851 5.9503 11.851 6.31667V9.63333C11.851 9.9997 11.5066 10.3167 11.1177 10.3167C10.7288 10.3167 10.3844 9.9997 10.3844 9.63333V6.31667ZM3.75938 9.85C3.33135 9.85 2.98438 10.197 2.98438 10.625C2.98438 11.053 3.33135 11.4 3.75938 11.4C4.1874 11.4 4.53438 11.053 4.53438 10.625C4.53438 10.197 4.1874 9.85 3.75938 9.85Z" fill="currentColor" />`);
39
+
40
+ export const arrayBooleanIcon = createSvgVNode({
41
+ width: "16",
42
+ height: "16",
43
+ viewBox: "0 0 16 16",
44
+ fill: "none",
45
+ xmlns: "http://www.w3.org/2000/svg"
46
+ }, `<path fill-rule="evenodd" clip-rule="evenodd" d="M0 1.58105H3.6139V2.87326H1.36702V13.1264H3.6139V14.4186H0V1.58105ZM3.41656 13.3264V13.3266H1.17155V13.3264H3.41656ZM0.197344 14.2186H0.199219V1.78125H3.41656V1.78105H0.197344V14.2186ZM12.3861 1.58105H16V14.4186H12.3861V13.1264H14.633V2.87326H12.3861V1.58105ZM12.5834 2.67326V1.78105H15.8027V1.78125H12.5853V2.67326H12.5834ZM12.5853 13.3266V14.2186H12.5834V13.3264H14.8303V2.67345H14.8322V13.3266H12.5853ZM2.75 7.99993C2.75 6.14518 4.25358 4.6416 6.10833 4.6416H9.775C11.6298 4.6416 13.1333 6.14518 13.1333 7.99993C13.1333 9.85469 11.6298 11.3583 9.775 11.3583H6.10833C4.25358 11.3583 2.75 9.85469 2.75 7.99993ZM6.10833 5.85827C4.92552 5.85827 3.96667 6.81713 3.96667 7.99993C3.96667 9.18274 4.92552 10.1416 6.10833 10.1416H9.775C10.9578 10.1416 11.9167 9.18274 11.9167 7.99993C11.9167 6.81713 10.9578 5.85827 9.775 5.85827H6.10833ZM8.25 7.99993C8.25 7.1577 8.93277 6.47493 9.775 6.47493C10.6172 6.47493 11.3 7.1577 11.3 7.99993C11.3 8.84217 10.6172 9.52493 9.775 9.52493C8.93277 9.52493 8.25 8.84217 8.25 7.99993ZM9.775 7.6916C9.60471 7.6916 9.46667 7.82965 9.46667 7.99993C9.46667 8.17022 9.60471 8.30827 9.775 8.30827C9.94529 8.30827 10.0833 8.17022 10.0833 7.99993C10.0833 7.82965 9.94529 7.6916 9.775 7.6916Z" fill="currentColor" />`);
47
+
48
+ export const arrayDateTimeIcon = createSvgVNode({
49
+ width: "16",
50
+ height: "16",
51
+ viewBox: "0 0 16 16",
52
+ fill: "none",
53
+ xmlns: "http://www.w3.org/2000/svg"
54
+ }, `<path fill-rule="evenodd" clip-rule="evenodd" d="M3.6139 1.58105H0V14.4186H3.6139V13.1264H1.36702V2.87326H3.6139V1.58105ZM3.41656 13.3266V13.3264H1.16987V13.3266H3.41656ZM0.197537 14.2186H0.197344V1.78105H3.41656V1.78125H0.197537V14.2186ZM16 1.58105H12.3861V2.87326H14.633V13.1264H12.3861V14.4186H16V1.58105ZM12.5834 1.78105V2.67326H12.5836V1.78125H15.8027V1.78105H12.5834ZM12.5836 14.2186V13.3266H14.8305V2.67345H14.8303V13.3264H12.5834V14.2186H12.5836Z" fill="currentColor" /> <path fill-rule="evenodd" clip-rule="evenodd" d="M4.40039 4.00008C4.40039 3.63189 4.69887 3.33341 5.06706 3.33341H5.33372V3.06675C5.33372 2.7722 5.5725 2.53341 5.86706 2.53341C6.16161 2.53341 6.40039 2.7722 6.40039 3.06675V3.33341H9.60039V3.06675C9.60039 2.7722 9.83917 2.53341 10.1337 2.53341C10.4283 2.53341 10.6671 2.7722 10.6671 3.06675V3.33341H10.9337C11.3019 3.33341 11.6004 3.63189 11.6004 4.00008V6.20897C11.2633 6.00831 10.9047 5.84009 10.5292 5.70896V4.66675H5.47159V10.5144H5.92177C6.05468 10.8997 6.23605 11.2622 6.45957 11.5957H5.06706C4.69887 11.5957 4.40039 11.2972 4.40039 10.929V4.00008ZM6.13372 6.13341C6.13372 5.83886 6.3725 5.60008 6.66706 5.60008H7.33372C7.62828 5.60008 7.86706 5.83886 7.86706 6.13341C7.86706 6.42797 7.62828 6.66675 7.33372 6.66675H6.66706C6.3725 6.66675 6.13372 6.42797 6.13372 6.13341Z" fill="currentColor" /> <path fill-rule="evenodd" clip-rule="evenodd" d="M9.60039 6.66675C8.00437 6.66675 6.71016 7.96095 6.71016 9.55697C6.71016 11.153 8.00437 12.4472 9.60039 12.4472C11.1964 12.4472 12.4906 11.153 12.4906 9.55697C12.4906 7.96095 11.1964 6.66675 9.60039 6.66675ZM9.06706 8.40008C9.06706 8.10553 9.30584 7.86675 9.60039 7.86675C9.89494 7.86675 10.1337 8.10553 10.1337 8.40008V9.3362L10.7955 9.99795C11.0037 10.2062 11.0037 10.5438 10.7955 10.7521C10.5872 10.9604 10.2495 10.9604 10.0413 10.7521L9.2233 9.93412C9.12327 9.8341 9.06706 9.69844 9.06706 9.55697V8.40008Z" fill="currentColor" />`);
55
+
56
+ export const arrayMapIcon = createSvgVNode({
57
+ width: "16",
58
+ height: "16",
59
+ viewBox: "0 0 16 16",
60
+ fill: "none",
61
+ xmlns: "http://www.w3.org/2000/svg"
62
+ }, `<path fill-rule="evenodd" clip-rule="evenodd" d="M3.6139 1.58105H0V14.4186H3.6139V13.1264H1.36702V2.87326H3.6139V1.58105ZM3.41656 13.3266V13.3264H1.16987V13.3266H3.41656ZM0.197537 14.2186H0.197344V1.78105H3.41656V1.78125H0.197537V14.2186ZM16 1.58105H12.3861V2.87326H14.633V13.1264H12.3861V14.4186H16V1.58105ZM12.5834 1.78105V2.67326H12.5836V1.78125H15.8027V1.78105H12.5834ZM12.5836 14.2186V13.3266H14.8305V2.67345H14.8303V13.3264H12.5834V14.2186H12.5836Z" fill="currentColor" /> <path fill-rule="evenodd" clip-rule="evenodd" d="M5.02962 3.6001H10.7696C11.0983 3.6001 11.4119 3.73574 11.6424 3.97635C11.8719 4.21592 11.9994 4.53988 11.9994 4.87541V10.0898C12.0056 10.2146 11.9675 10.3376 11.8918 10.4372L11.8662 10.4709L11.8287 10.4905C11.6508 10.5836 11.5323 10.6684 11.4581 10.7562C11.3893 10.8377 11.3538 10.9274 11.3538 11.0488C11.3538 11.2093 11.3914 11.285 11.4495 11.3472C11.5199 11.4227 11.6265 11.4867 11.8093 11.5964C11.8188 11.6022 11.8286 11.608 11.8385 11.614L11.8704 11.6331L11.8927 11.6629C11.9509 11.7407 11.9869 11.8329 11.997 11.9295C12.007 12.0258 11.9909 12.123 11.9503 12.2109C11.9101 12.2996 11.8454 12.375 11.7639 12.4282C11.682 12.4817 11.5865 12.5106 11.4887 12.5114L11.487 12.5114H5.02962C4.70105 12.5114 4.38727 12.3758 4.1573 12.1349C3.92697 11.8925 3.79871 11.5702 3.79981 11.2358V4.87541C3.79981 4.54075 3.92717 4.21692 4.15725 3.97736C4.26942 3.85898 4.40438 3.76453 4.55403 3.69969C4.7039 3.63476 4.86629 3.60087 5.02962 3.6001ZM5.03192 4.65263C5.00441 4.65342 4.97731 4.65952 4.95211 4.6706C4.92641 4.6819 4.90318 4.69816 4.88376 4.71845C4.86435 4.73874 4.84912 4.76266 4.83897 4.78884C4.82881 4.81502 4.82391 4.84295 4.82456 4.87103L4.82467 4.87541L4.82461 9.64304C4.94924 9.6064 5.07861 9.5878 5.2092 9.58824L10.9746 9.58755V4.87065C10.9752 4.8426 10.9703 4.81472 10.9602 4.78858C10.95 4.76244 10.9348 4.73857 10.9153 4.71832C10.8959 4.69807 10.8727 4.68184 10.847 4.67056C10.8219 4.65951 10.7948 4.65342 10.7673 4.65263H10.7696V4.46303L10.7657 4.65259L10.7673 4.65263H5.03192ZM5.2088 10.6401C5.00466 10.6401 4.82461 10.8155 4.82461 11.0498C4.82461 11.2833 5.00452 11.4589 5.2088 11.4589H10.4698C10.4687 11.456 10.4676 11.4531 10.4665 11.4502C10.4145 11.3112 10.4004 11.1647 10.4 11.0496C10.4 10.9312 10.4101 10.7838 10.4699 10.6401L5.2088 10.6401Z" fill="currentColor" /> <path fill-rule="evenodd" clip-rule="evenodd" d="M5.71924 4.53617C5.71924 4.25475 5.94738 4.02661 6.2288 4.02661C6.51022 4.02661 6.73835 4.25475 6.73835 4.53617V9.65545C6.73835 9.93688 6.51022 10.165 6.2288 10.165C5.94737 10.165 5.71924 9.93688 5.71924 9.65545V4.53617Z" fill="currentColor" />`);
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ import { type VNode } from 'vue';
7
+
8
+ import { IJsonSchema, JsonSchemaTypeRegistryCreator } from '../types';
9
+ import { createSvgVNode } from './svg-vnode';
10
+
11
+ export const arrayRegistryCreator: JsonSchemaTypeRegistryCreator = ({ typeManager }) => {
12
+ const icon = createSvgVNode({
13
+ width: "16",
14
+ height: "16",
15
+ viewBox: "0 0 16 16",
16
+ fill: "none",
17
+ xmlns: "http://www.w3.org/2000/svg"
18
+ }, `<path d="M5.23759 1.00342H2.00391V14.997H5.23759V13.6251H3.35127V2.37534H5.23759V1.00342Z" fill="currentColor" /> <path d="M10.7624 1.00342H13.9961V14.997H10.7624V13.6251H12.6487V2.37534H10.7624V1.00342Z" fill="currentColor" />`);
19
+
20
+ const getDisplayIcon = (type: IJsonSchema): VNode => {
21
+ const item = type.items;
22
+ const config = item ? typeManager.getTypeBySchema(item) : undefined;
23
+
24
+ if (config?.type === 'array' && item) {
25
+ return getDisplayIcon(item);
26
+ }
27
+
28
+ return config?.arrayIcon || icon;
29
+ };
30
+ return {
31
+ type: 'array',
32
+
33
+ label: 'Array',
34
+
35
+ icon,
36
+
37
+ container: true,
38
+
39
+ getJsonPaths: (type: IJsonSchema) => {
40
+ const itemDefinition = type.items && typeManager.getTypeBySchema(type.items);
41
+ const childrenPath = itemDefinition?.getJsonPaths
42
+ ? itemDefinition.getJsonPaths(type.items!)
43
+ : [];
44
+
45
+ return ['items', ...childrenPath];
46
+ },
47
+
48
+ getDefaultValue: () => [],
49
+
50
+ getSupportedItemTypes: (): Array<{ type: string; disabled?: string }> =>
51
+ typeManager.getTypeRegistriesWithParentType('array'),
52
+
53
+ getTypeSchemaProperties: (type: IJsonSchema): Record<string, IJsonSchema> => {
54
+ const itemDefinition = type.items && typeManager.getTypeBySchema(type.items);
55
+ return (itemDefinition && itemDefinition.getTypeSchemaProperties?.(type.items!)) || {};
56
+ },
57
+
58
+ canAddField: (type: IJsonSchema) => {
59
+ if (!type.items) {
60
+ return false;
61
+ }
62
+
63
+ const childConfig = typeManager.getTypeBySchema(type.items);
64
+
65
+ return childConfig?.canAddField?.(type.items) || false;
66
+ },
67
+
68
+ getItemType: (type) => type.items,
69
+
70
+ getStringValueByTypeSchema: (type: IJsonSchema): string => {
71
+ if (!type.items) {
72
+ return type.type || '';
73
+ }
74
+
75
+ const childConfig = typeManager.getTypeBySchema(type.items);
76
+
77
+ return [type.type, childConfig?.getStringValueByTypeSchema?.(type.items)].join('-');
78
+ },
79
+
80
+ getTypeSchemaByStringValue: (optionValue: string): IJsonSchema => {
81
+ if (!optionValue) {
82
+ return { type: 'array' };
83
+ }
84
+
85
+ const [root, ...rest] = optionValue.split('-');
86
+
87
+ const rootType = typeManager.getTypeByName(root);
88
+
89
+ if (!rootType) {
90
+ return { type: 'array' };
91
+ }
92
+
93
+ let itemType;
94
+ if (rootType.getTypeSchemaByStringValue) {
95
+ itemType = rootType.getTypeSchemaByStringValue(rest.join('-'))!;
96
+ } else {
97
+ itemType = rootType?.getDefaultSchema();
98
+ }
99
+
100
+ return {
101
+ type: 'array',
102
+ items: itemType,
103
+ };
104
+ },
105
+
106
+ getDefaultSchema: (): IJsonSchema => ({
107
+ type: 'array',
108
+ items: { type: 'string' },
109
+ }),
110
+
111
+ getPropertiesParent: (type: IJsonSchema) => {
112
+ const itemDef = type.items && typeManager.getTypeBySchema(type.items);
113
+
114
+ return itemDef && itemDef.getPropertiesParent
115
+ ? itemDef.getPropertiesParent(type.items!)
116
+ : type;
117
+ },
118
+ getDisplayIcon,
119
+ };
120
+ };
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ import { JsonSchemaTypeRegistryCreator } from '../types';
7
+ import { createSvgVNode } from './svg-vnode';
8
+ import { arrayBooleanIcon } from './array-icons';
9
+
10
+ export const booleanRegistryCreator: JsonSchemaTypeRegistryCreator = () => ({
11
+ type: 'boolean',
12
+
13
+ label: 'Boolean',
14
+
15
+ icon: createSvgVNode({
16
+ width: "16",
17
+ height: "16",
18
+ viewBox: "0 0 16 16",
19
+ fill: "none",
20
+ xmlns: "http://www.w3.org/2000/svg"
21
+ }, `<path fill-rule="evenodd" clip-rule="evenodd" d="M10.668 4.66683H5.33463C3.49369 4.66683 2.0013 6.15921 2.0013 8.00016C2.0013 9.84111 3.49369 11.3335 5.33463 11.3335H10.668C12.5089 11.3335 14.0013 9.84111 14.0013 8.00016C14.0013 6.15921 12.5089 4.66683 10.668 4.66683ZM5.33463 3.3335C2.75731 3.3335 0.667969 5.42283 0.667969 8.00016C0.667969 10.5775 2.75731 12.6668 5.33463 12.6668H10.668C13.2453 12.6668 15.3346 10.5775 15.3346 8.00016C15.3346 5.42283 13.2453 3.3335 10.668 3.3335H5.33463Z" fill="currentColor" /> <path fill-rule="evenodd" clip-rule="evenodd" d="M8.66797 8.00016C8.66797 6.89559 9.5634 6.00016 10.668 6.00016C11.7725 6.00016 12.668 6.89559 12.668 8.00016C12.668 9.10473 11.7725 10.0002 10.668 10.0002C9.5634 10.0002 8.66797 9.10473 8.66797 8.00016ZM10.668 7.3335C10.2998 7.3335 10.0013 7.63197 10.0013 8.00016C10.0013 8.36835 10.2998 8.66683 10.668 8.66683C11.0362 8.66683 11.3346 8.36835 11.3346 8.00016C11.3346 7.63197 11.0362 7.3335 10.668 7.3335Z" fill="currentColor" />`),
22
+
23
+ arrayIcon: arrayBooleanIcon,
24
+
25
+ getDefaultSchema: () => ({ type: 'boolean' }),
26
+
27
+ getValueText: (value?: unknown) => (value === undefined ? '' : value ? 'True' : 'False'),
28
+
29
+ getDefaultValue: () => false,
30
+ });
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ import { JsonSchemaTypeRegistryCreator } from '../types';
7
+ import { createSvgVNode } from './svg-vnode';
8
+ import { arrayDateTimeIcon } from './array-icons';
9
+
10
+ export const dateTimeRegistryCreator: JsonSchemaTypeRegistryCreator = () => ({
11
+ type: 'date-time',
12
+
13
+ label: 'DateTime',
14
+
15
+ icon: createSvgVNode({
16
+ viewBox: "0 0 24 24",
17
+ fill: "none",
18
+ xmlns: "http://www.w3.org/2000/svg",
19
+ width: "1em",
20
+ height: "1em",
21
+ focusable: "false",
22
+ 'aria-hidden': "true"
23
+ }, `<path d="M2 5v14a3 3 0 0 0 3 3h7.1a7.02 7.02 0 0 1-1.43-2H6a2 2 0 0 1-2-2V8a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2.67c.75.36 1.43.85 2 1.43V5a3 3 0 0 0-3-3H5a3 3 0 0 0-3 3Z" fill="currentColor" ></path> <path d="M16 10h1c-.54 0-1.06.06-1.57.18A1 1 0 0 1 16 10Z" fill="currentColor"></path> <path d="M13.5 10.94a1 1 0 0 0-1-.94h-1a1 1 0 0 0-1 1v1a1 1 0 0 0 .77.97 7.03 7.03 0 0 1 2.23-2.03Z" fill="currentColor" ></path> <path d="M7 10a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1a1 1 0 0 0-1-1H7Z" fill="currentColor" ></path> <path d="M6 16a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-1Z" fill="currentColor" ></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M22 17a5 5 0 1 1-10 0 5 5 0 0 1 10 0Zm-4-2a1 1 0 1 0-2 0v2c0 .27.1.52.3.7l1.5 1.5a1 1 0 0 0 1.4-1.4L18 16.58V15Z" fill="currentColor" ></path>`),
24
+
25
+ arrayIcon: arrayDateTimeIcon,
26
+
27
+ // TODO date-time compat format
28
+ // https://json-schema.org/understanding-json-schema/reference/type#built-in-formats
29
+ getDefaultSchema: () => ({
30
+ type: 'date-time',
31
+ }),
32
+
33
+ getValueText: (value?: unknown) => (value ? `${value}` : ''),
34
+
35
+ getDefaultValue: () => '',
36
+ });
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ import { h, type VNode } from 'vue';
7
+
8
+ import { IJsonSchema, JsonSchemaTypeRegistryCreator } from '../types';
9
+ import { emptyVNode } from './svg-vnode';
10
+
11
+ export const defaultTypeDefinitionRegistry: JsonSchemaTypeRegistryCreator = ({ typeManager }) => ({
12
+ type: 'default',
13
+
14
+ label: '',
15
+
16
+ icon: emptyVNode(),
17
+
18
+ container: false,
19
+
20
+ getJsonPaths: () => [],
21
+
22
+ getDisplayIcon: (schema): VNode => typeManager.getTypeBySchema(schema)?.icon || emptyVNode(),
23
+
24
+ getPropertiesParent: () => undefined,
25
+
26
+ canAddField: () => false,
27
+
28
+ getDefaultValue: () => undefined,
29
+
30
+ getValueText: () => '',
31
+
32
+ getStringValueByTypeSchema: (type: IJsonSchema): string | undefined => type.type,
33
+
34
+ getTypeSchemaProperties: () => undefined,
35
+
36
+ getDisplayLabel: (schema) =>
37
+ h(
38
+ 'div',
39
+ {
40
+ style: {
41
+ width: '100%',
42
+ height: '100%',
43
+ display: 'flex',
44
+ alignItems: 'center',
45
+ gap: '8px',
46
+ },
47
+ },
48
+ [
49
+ typeManager.getTypeBySchema(schema)?.label,
50
+ h(
51
+ 'span',
52
+ {
53
+ style: {
54
+ fontSize: '12px',
55
+ whiteSpace: 'nowrap',
56
+ overflow: 'hidden',
57
+ textOverflow: 'ellipsis',
58
+ },
59
+ },
60
+ typeManager.getComplexText(schema)
61
+ ),
62
+ ]
63
+ ),
64
+
65
+ getDisplayText: (type: IJsonSchema) => typeManager.getComplexText(type),
66
+ });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ export { stringRegistryCreator } from './string';
7
+ export { objectRegistryCreator } from './object';
8
+ export { numberRegistryCreator } from './number';
9
+ export { booleanRegistryCreator } from './boolean';
10
+ export { arrayRegistryCreator } from './array';
11
+ export { integerRegistryCreator } from './integer';
12
+ export { unknownRegistryCreator } from './unknown';
13
+ export { mapRegistryCreator } from './map';
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ import { IJsonSchema, JsonSchemaTypeRegistryCreator } from '../types';
7
+ import { createSvgVNode } from './svg-vnode';
8
+ import { arrayIntegerIcon } from './array-icons';
9
+
10
+ export const integerRegistryCreator: JsonSchemaTypeRegistryCreator = () => ({
11
+ type: 'integer',
12
+ label: 'Integer',
13
+
14
+ icon: createSvgVNode({
15
+ width: "16",
16
+ height: "16",
17
+ viewBox: "0 0 16 16",
18
+ fill: "none",
19
+ xmlns: "http://www.w3.org/2000/svg"
20
+ }, `<path d="M15.132 11.4601C15.644 11.0121 15.9 10.3921 15.9 9.60007C15.9 8.60807 15.5 7.93607 14.7 7.58407C15.412 7.23207 15.768 6.62407 15.768 5.76007C15.768 5.05607 15.536 4.48007 15.072 4.03207C14.608 3.59207 14.012 3.37207 13.284 3.37207C12.588 3.37207 12.008 3.58007 11.544 3.99607C11.064 4.42007 10.808 4.98807 10.776 5.70007H12C12.064 4.88407 12.492 4.47607 13.284 4.47607C14.124 4.47607 14.544 4.91607 14.544 5.79607C14.544 6.66007 14.112 7.09207 13.248 7.09207H13.044V8.16007H13.248C14.2 8.16007 14.676 8.62807 14.676 9.56407C14.676 10.5081 14.212 10.9801 13.284 10.9801C12.9 10.9801 12.584 10.8761 12.336 10.6681C12.064 10.4441 11.916 10.1161 11.892 9.68407H10.668C10.692 10.4761 10.964 11.0841 11.484 11.5081C11.948 11.8921 12.548 12.0841 13.284 12.0841C14.036 12.0841 14.652 11.8761 15.132 11.4601Z" fill="currentColor" /> <path d="M4.46875 12.0003V10.9083L7.75675 6.91228C8.06075 6.54428 8.21275 6.16428 8.21275 5.77228C8.21275 4.90828 7.79675 4.47628 6.96475 4.47628C6.60475 4.47628 6.31275 4.57628 6.08875 4.77628C5.83275 5.00828 5.70475 5.34828 5.70475 5.79628H4.48075C4.48075 5.07628 4.71275 4.49228 5.17675 4.04428C5.64075 3.60428 6.23675 3.38428 6.96475 3.38428C7.70075 3.38428 8.29675 3.60028 8.75275 4.03228C9.20875 4.47228 9.43675 5.05628 9.43675 5.78428C9.43675 6.13628 9.36875 6.45628 9.23275 6.74428C9.12075 6.97628 8.92075 7.27228 8.63275 7.63228L5.95675 10.9083H9.43675V12.0003H4.46875Z" fill="currentColor" /> <path d="M1.668 12.0001V4.78805L0 6.25205V4.89605L1.668 3.45605H2.892V12.0001H1.668Z" fill="currentColor" />`),
21
+
22
+ arrayIcon: arrayIntegerIcon,
23
+
24
+ getDefaultSchema: (): IJsonSchema => ({ type: 'integer' }),
25
+
26
+ getValueText: (value: unknown) => (value !== undefined ? `${value}` : ''),
27
+
28
+ getDefaultValue: () => 0,
29
+ });
@@ -0,0 +1,118 @@
1
+ /**
2
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ import { IJsonSchema, JsonSchemaTypeRegistryCreator } from '../types';
7
+ import { createSvgVNode } from './svg-vnode';
8
+ import { arrayMapIcon } from './array-icons';
9
+
10
+ export const mapRegistryCreator: JsonSchemaTypeRegistryCreator = ({ typeManager }) => {
11
+ const icon = createSvgVNode({
12
+ viewBox: "0 0 1024 1024",
13
+ version: "1.1",
14
+ xmlns: "http://www.w3.org/2000/svg",
15
+ width: "16",
16
+ height: "16"
17
+ }, `<path d="M877.860571 938.642286h-645.851428c-27.574857 0-54.052571-11.337143-73.508572-31.744a110.957714 110.957714 0 0 1-30.500571-76.8V193.828571c0-28.745143 10.971429-56.32 30.500571-76.726857a101.888 101.888 0 0 1 73.508572-31.817143h574.171428c27.501714 0 53.979429 11.337143 73.508572 31.744 19.529143 20.333714 30.500571 48.054857 30.500571 76.8v522.020572a34.157714 34.157714 0 0 1-6.948571 22.820571c-37.156571 19.382857-57.636571 39.350857-57.636572 72.630857 0 39.716571 19.894857 50.029714 57.636572 72.777143a34.816 34.816 0 0 1-8.045714 49.298286 32.256 32.256 0 0 1-17.334858 5.193143z m-32.256-254.537143V193.828571a40.228571 40.228571 0 0 0-39.497142-41.179428H232.009143a40.301714 40.301714 0 0 0-39.497143 41.252571V699.245714c17.773714-9.874286 37.449143-14.994286 57.417143-14.921143h595.675428v-0.073142z m-595.675428 187.245714h566.198857c-22.893714-11.190857-27.940571-39.497143-28.013714-59.977143 0-20.260571 3.218286-43.885714 28.013714-59.904h-566.125714c-31.670857 0-57.417143 26.843429-57.417143 59.977143 0 33.060571 25.746286 59.904 57.344 59.904z" fill="currentColor" ></path> <path d="M320 128m32.036571 0l-0.073142 0q32.036571 0 32.036571 32.036571l0 511.926858q0 32.036571-32.036571 32.036571l0.073142 0q-32.036571 0-32.036571-32.036571l0-511.926858q0-32.036571 32.036571-32.036571Z" fill="currentColor" ></path>`);
18
+
19
+ return {
20
+ type: 'map',
21
+
22
+ label: 'Map',
23
+
24
+ icon,
25
+
26
+ arrayIcon: arrayMapIcon,
27
+
28
+ container: true,
29
+
30
+ getJsonPaths: (type: IJsonSchema) => {
31
+ const itemDefinition =
32
+ type.additionalProperties && typeManager.getTypeBySchema(type.additionalProperties);
33
+ const childrenPath = itemDefinition?.getJsonPaths
34
+ ? itemDefinition.getJsonPaths(type.additionalProperties!)
35
+ : [];
36
+
37
+ return ['additionalProperties', ...childrenPath];
38
+ },
39
+
40
+ getDefaultValue: () => [],
41
+
42
+ getSupportedItemTypes: (): Array<{ type: string; disabled?: string }> =>
43
+ typeManager.getTypeRegistriesWithParentType('map'),
44
+
45
+ getTypeSchemaProperties: (type: IJsonSchema): Record<string, IJsonSchema> => {
46
+ const itemDefinition =
47
+ type.additionalProperties && typeManager.getTypeBySchema(type.additionalProperties);
48
+ return (
49
+ (itemDefinition && itemDefinition.getTypeSchemaProperties?.(type.additionalProperties!)) ||
50
+ {}
51
+ );
52
+ },
53
+
54
+ canAddField: (type: IJsonSchema) => {
55
+ if (!type.additionalProperties) {
56
+ return false;
57
+ }
58
+
59
+ const childConfig = typeManager.getTypeBySchema(type.additionalProperties);
60
+
61
+ return childConfig?.canAddField?.(type.additionalProperties) || false;
62
+ },
63
+
64
+ getItemType: (type) => type.additionalProperties,
65
+
66
+ getStringValueByTypeSchema: (type: IJsonSchema): string => {
67
+ if (!type.additionalProperties) {
68
+ return type.type || '';
69
+ }
70
+
71
+ const childConfig = typeManager.getTypeBySchema(type.additionalProperties);
72
+
73
+ return [type.type, childConfig?.getStringValueByTypeSchema?.(type.additionalProperties)].join(
74
+ '-'
75
+ );
76
+ },
77
+
78
+ getTypeSchemaByStringValue: (optionValue: string): IJsonSchema => {
79
+ if (!optionValue) {
80
+ return { type: 'map' };
81
+ }
82
+
83
+ const [root, ...rest] = optionValue.split('-');
84
+
85
+ const rooType = typeManager.getTypeByName(root);
86
+
87
+ if (!rooType) {
88
+ return { type: 'map' };
89
+ }
90
+
91
+ let itemType;
92
+ if (rooType.getTypeSchemaByStringValue) {
93
+ itemType = rooType.getTypeSchemaByStringValue(rest.join('-'))!;
94
+ } else {
95
+ itemType = rooType?.getDefaultSchema();
96
+ }
97
+
98
+ return {
99
+ type: 'map',
100
+ additionalProperties: itemType,
101
+ };
102
+ },
103
+
104
+ getDefaultSchema: (): IJsonSchema => ({
105
+ type: 'map',
106
+ additionalProperties: { type: 'string' },
107
+ }),
108
+
109
+ getPropertiesParent: (type: IJsonSchema) => {
110
+ const itemDef =
111
+ type.additionalProperties && typeManager.getTypeBySchema(type.additionalProperties);
112
+
113
+ return itemDef && itemDef.getPropertiesParent
114
+ ? itemDef.getPropertiesParent(type.additionalProperties!)
115
+ : type;
116
+ },
117
+ };
118
+ };