@shapio/schema 0.5.2 → 0.5.4
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/dist/index.d.ts +20 -7
- package/dist/index.js +45 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare const createStableId: () => string;
|
|
|
17
17
|
//#endregion
|
|
18
18
|
//#region src/types/dataTypes.d.ts
|
|
19
19
|
/** Every stored data type. A field's data type is separate from the editor that renders it (brief §2.5). */
|
|
20
|
-
export declare const DATA_TYPES: readonly ["string", "text", "richtext", "number", "integer", "decimal", "biginteger", "boolean", "date", "datetime", "time", "enum", "json", "slug", "email", "url", "uid", "media", "relation", "component", "dynamiczone"];
|
|
20
|
+
export declare const DATA_TYPES: readonly ["string", "text", "code", "richtext", "number", "integer", "decimal", "biginteger", "boolean", "date", "datetime", "time", "enum", "json", "slug", "email", "url", "uid", "media", "relation", "component", "dynamiczone"];
|
|
21
21
|
export type DataType = (typeof DATA_TYPES)[number];
|
|
22
22
|
export declare const isDataType: (value: unknown) => value is DataType;
|
|
23
23
|
/**
|
|
@@ -48,6 +48,9 @@ export type JsonObject = {
|
|
|
48
48
|
//#region src/types/settings.d.ts
|
|
49
49
|
export declare const MEDIA_KINDS: readonly ["image", "video", "audio", "document", "other"];
|
|
50
50
|
export declare const RELATION_CARDINALITIES: readonly ["one", "many"];
|
|
51
|
+
/** Languages a `code` field can hold. The language reaches the API (OpenAPI, GraphQL, generated types). */
|
|
52
|
+
export declare const CODE_LANGUAGES: readonly ["plain", "html", "css", "javascript", "json", "yaml", "markdown"];
|
|
53
|
+
export type CodeLanguage = (typeof CODE_LANGUAGES)[number];
|
|
51
54
|
export declare const EnumValueSchema: Type.TObject<{
|
|
52
55
|
value: Type.TString;
|
|
53
56
|
label: Type.TString;
|
|
@@ -62,6 +65,13 @@ export declare const SETTINGS_SCHEMAS: {
|
|
|
62
65
|
minLength: Type.TOptional<Type.TInteger>;
|
|
63
66
|
maxLength: Type.TOptional<Type.TInteger>;
|
|
64
67
|
}>;
|
|
68
|
+
code: Type.TObject<{
|
|
69
|
+
/** JSON only: a value that does not parse is refused. */
|
|
70
|
+
validate: Type.TOptional<Type.TBoolean>;
|
|
71
|
+
minLength: Type.TOptional<Type.TInteger>;
|
|
72
|
+
maxLength: Type.TOptional<Type.TInteger>;
|
|
73
|
+
language: Type.TOptional<Type.TEnum<["plain", "html", "css", "javascript", "json", "yaml", "markdown"]>>;
|
|
74
|
+
}>;
|
|
65
75
|
richtext: Type.TObject<{
|
|
66
76
|
formatVersion: Type.TOptional<Type.TInteger>;
|
|
67
77
|
maxLength: Type.TOptional<Type.TInteger>;
|
|
@@ -146,7 +156,10 @@ type SettingsSchemas = typeof SETTINGS_SCHEMAS;
|
|
|
146
156
|
/** Settings as authored (defaults may be missing). */
|
|
147
157
|
export type DataTypeSettingsInput = { [T in DataType]: Static<SettingsSchemas[T]>; };
|
|
148
158
|
/** Settings after normalization: the defaulted keys are always present. */
|
|
149
|
-
export type DataTypeSettings = Omit<DataTypeSettingsInput, 'richtext' | 'enum' | 'media' | 'component'> & {
|
|
159
|
+
export type DataTypeSettings = Omit<DataTypeSettingsInput, 'code' | 'richtext' | 'enum' | 'media' | 'component'> & {
|
|
160
|
+
code: DataTypeSettingsInput['code'] & {
|
|
161
|
+
language: CodeLanguage;
|
|
162
|
+
};
|
|
150
163
|
richtext: DataTypeSettingsInput['richtext'] & {
|
|
151
164
|
formatVersion: number;
|
|
152
165
|
};
|
|
@@ -181,7 +194,7 @@ export declare const FieldInputSchema: Type.TObject<{
|
|
|
181
194
|
label: Type.TString;
|
|
182
195
|
/** Help text shown under the control. */
|
|
183
196
|
description: Type.TOptional<Type.TString>;
|
|
184
|
-
type: Type.TEnum<["string", "text", "richtext", "number", "integer", "decimal", "biginteger", "boolean", "date", "datetime", "time", "enum", "json", "slug", "email", "url", "uid", "media", "relation", "component", "dynamiczone"]>;
|
|
197
|
+
type: Type.TEnum<["string", "text", "code", "richtext", "number", "integer", "decimal", "biginteger", "boolean", "date", "datetime", "time", "enum", "json", "slug", "email", "url", "uid", "media", "relation", "component", "dynamiczone"]>;
|
|
185
198
|
required: Type.TOptional<Type.TBoolean>;
|
|
186
199
|
/** Per-locale value. Ignored (must be false) when the model is not localized. */
|
|
187
200
|
localized: Type.TOptional<Type.TBoolean>;
|
|
@@ -273,7 +286,7 @@ export declare const ModelDefinitionInputSchema: Type.TObject<{
|
|
|
273
286
|
label: Type.TString;
|
|
274
287
|
/** Help text shown under the control. */
|
|
275
288
|
description: Type.TOptional<Type.TString>;
|
|
276
|
-
type: Type.TEnum<["string", "text", "richtext", "number", "integer", "decimal", "biginteger", "boolean", "date", "datetime", "time", "enum", "json", "slug", "email", "url", "uid", "media", "relation", "component", "dynamiczone"]>;
|
|
289
|
+
type: Type.TEnum<["string", "text", "code", "richtext", "number", "integer", "decimal", "biginteger", "boolean", "date", "datetime", "time", "enum", "json", "slug", "email", "url", "uid", "media", "relation", "component", "dynamiczone"]>;
|
|
277
290
|
required: Type.TOptional<Type.TBoolean>;
|
|
278
291
|
/** Per-locale value. Ignored (must be false) when the model is not localized. */
|
|
279
292
|
localized: Type.TOptional<Type.TBoolean>;
|
|
@@ -316,7 +329,7 @@ export declare const ComponentDefinitionInputSchema: Type.TObject<{
|
|
|
316
329
|
label: Type.TString;
|
|
317
330
|
/** Help text shown under the control. */
|
|
318
331
|
description: Type.TOptional<Type.TString>;
|
|
319
|
-
type: Type.TEnum<["string", "text", "richtext", "number", "integer", "decimal", "biginteger", "boolean", "date", "datetime", "time", "enum", "json", "slug", "email", "url", "uid", "media", "relation", "component", "dynamiczone"]>;
|
|
332
|
+
type: Type.TEnum<["string", "text", "code", "richtext", "number", "integer", "decimal", "biginteger", "boolean", "date", "datetime", "time", "enum", "json", "slug", "email", "url", "uid", "media", "relation", "component", "dynamiczone"]>;
|
|
320
333
|
required: Type.TOptional<Type.TBoolean>;
|
|
321
334
|
/** Per-locale value. Ignored (must be false) when the model is not localized. */
|
|
322
335
|
localized: Type.TOptional<Type.TBoolean>;
|
|
@@ -379,7 +392,7 @@ export declare const DefinitionInputSchema: Type.TUnion<[Type.TObject<{
|
|
|
379
392
|
label: Type.TString;
|
|
380
393
|
/** Help text shown under the control. */
|
|
381
394
|
description: Type.TOptional<Type.TString>;
|
|
382
|
-
type: Type.TEnum<["string", "text", "richtext", "number", "integer", "decimal", "biginteger", "boolean", "date", "datetime", "time", "enum", "json", "slug", "email", "url", "uid", "media", "relation", "component", "dynamiczone"]>;
|
|
395
|
+
type: Type.TEnum<["string", "text", "code", "richtext", "number", "integer", "decimal", "biginteger", "boolean", "date", "datetime", "time", "enum", "json", "slug", "email", "url", "uid", "media", "relation", "component", "dynamiczone"]>;
|
|
383
396
|
required: Type.TOptional<Type.TBoolean>;
|
|
384
397
|
/** Per-locale value. Ignored (must be false) when the model is not localized. */
|
|
385
398
|
localized: Type.TOptional<Type.TBoolean>;
|
|
@@ -421,7 +434,7 @@ export declare const DefinitionInputSchema: Type.TUnion<[Type.TObject<{
|
|
|
421
434
|
label: Type.TString;
|
|
422
435
|
/** Help text shown under the control. */
|
|
423
436
|
description: Type.TOptional<Type.TString>;
|
|
424
|
-
type: Type.TEnum<["string", "text", "richtext", "number", "integer", "decimal", "biginteger", "boolean", "date", "datetime", "time", "enum", "json", "slug", "email", "url", "uid", "media", "relation", "component", "dynamiczone"]>;
|
|
437
|
+
type: Type.TEnum<["string", "text", "code", "richtext", "number", "integer", "decimal", "biginteger", "boolean", "date", "datetime", "time", "enum", "json", "slug", "email", "url", "uid", "media", "relation", "component", "dynamiczone"]>;
|
|
425
438
|
required: Type.TOptional<Type.TBoolean>;
|
|
426
439
|
/** Per-locale value. Ignored (must be false) when the model is not localized. */
|
|
427
440
|
localized: Type.TOptional<Type.TBoolean>;
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import { Value } from "typebox/value";
|
|
|
8
8
|
const DATA_TYPES = [
|
|
9
9
|
"string",
|
|
10
10
|
"text",
|
|
11
|
+
"code",
|
|
11
12
|
"richtext",
|
|
12
13
|
"number",
|
|
13
14
|
"integer",
|
|
@@ -74,6 +75,7 @@ const REFERENCE_DATA_TYPES = /* @__PURE__ */ new Set([
|
|
|
74
75
|
const STORAGE_FAMILY = {
|
|
75
76
|
string: "jsonString",
|
|
76
77
|
text: "jsonString",
|
|
78
|
+
code: "jsonString",
|
|
77
79
|
slug: "jsonString",
|
|
78
80
|
email: "jsonString",
|
|
79
81
|
url: "jsonString",
|
|
@@ -255,6 +257,16 @@ const MEDIA_KINDS = [
|
|
|
255
257
|
"other"
|
|
256
258
|
];
|
|
257
259
|
const RELATION_CARDINALITIES = ["one", "many"];
|
|
260
|
+
/** Languages a `code` field can hold. The language reaches the API (OpenAPI, GraphQL, generated types). */
|
|
261
|
+
const CODE_LANGUAGES = [
|
|
262
|
+
"plain",
|
|
263
|
+
"html",
|
|
264
|
+
"css",
|
|
265
|
+
"javascript",
|
|
266
|
+
"json",
|
|
267
|
+
"yaml",
|
|
268
|
+
"markdown"
|
|
269
|
+
];
|
|
258
270
|
const EnumValueSchema = Type.Object({
|
|
259
271
|
value: Type.String({
|
|
260
272
|
minLength: 1,
|
|
@@ -274,6 +286,12 @@ const SETTINGS_SCHEMAS = {
|
|
|
274
286
|
}))
|
|
275
287
|
}, closed$2),
|
|
276
288
|
text: Type.Object(lengthRules, closed$2),
|
|
289
|
+
code: Type.Object({
|
|
290
|
+
language: Type.Optional(Type.Enum(CODE_LANGUAGES)),
|
|
291
|
+
...lengthRules,
|
|
292
|
+
/** JSON only: a value that does not parse is refused. */
|
|
293
|
+
validate: Type.Optional(Type.Boolean())
|
|
294
|
+
}, closed$2),
|
|
277
295
|
richtext: Type.Object({
|
|
278
296
|
formatVersion: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
279
297
|
maxLength: Type.Optional(Type.Integer({ minimum: 1 }))
|
|
@@ -482,6 +500,14 @@ const entries = [
|
|
|
482
500
|
maximum: 80
|
|
483
501
|
})) }, closed$1)
|
|
484
502
|
},
|
|
503
|
+
{
|
|
504
|
+
id: "codeEditor",
|
|
505
|
+
dataTypes: ["code"],
|
|
506
|
+
optionsSchema: Type.Object({ rows: Type.Optional(Type.Integer({
|
|
507
|
+
minimum: 3,
|
|
508
|
+
maximum: 80
|
|
509
|
+
})) }, closed$1)
|
|
510
|
+
},
|
|
485
511
|
{
|
|
486
512
|
id: "mediaPicker",
|
|
487
513
|
dataTypes: ["media"],
|
|
@@ -514,6 +540,7 @@ const EDITOR_CATALOGUE = new Map(entries.map((entry) => [entry.id, entry]));
|
|
|
514
540
|
const DEFAULT_EDITORS = {
|
|
515
541
|
string: "textInput",
|
|
516
542
|
text: "textarea",
|
|
543
|
+
code: "codeEditor",
|
|
517
544
|
richtext: "richText",
|
|
518
545
|
number: "numberInput",
|
|
519
546
|
integer: "numberInput",
|
|
@@ -715,6 +742,7 @@ const suggestPlural = (apiKey) => {
|
|
|
715
742
|
//#endregion
|
|
716
743
|
//#region src/normalize.ts
|
|
717
744
|
const SETTINGS_DEFAULTS = {
|
|
745
|
+
code: { language: "plain" },
|
|
718
746
|
richtext: { formatVersion: 1 },
|
|
719
747
|
enum: { multiple: false },
|
|
720
748
|
media: { multiple: false },
|
|
@@ -823,6 +851,7 @@ const checkDefaultValue = (field) => {
|
|
|
823
851
|
switch (field.type) {
|
|
824
852
|
case "string":
|
|
825
853
|
case "text":
|
|
854
|
+
case "code":
|
|
826
855
|
case "email":
|
|
827
856
|
case "url": return isString ? null : "must be a string";
|
|
828
857
|
case "slug": return matches(SLUG_PATTERN) ? null : "must be a lower-case slug";
|
|
@@ -1167,6 +1196,7 @@ const checkSettings = (field, path, definition) => {
|
|
|
1167
1196
|
if (!source) issues.push(issue(`${path}/settings/sourceFieldId`, "UNKNOWN_FIELD_REFERENCE", "refers to no field of this definition"));
|
|
1168
1197
|
else if (source.type !== "string" && source.type !== "text") issues.push(issue(`${path}/settings/sourceFieldId`, "INVALID_FIELD_REFERENCE", "must refer to a string or text field"));
|
|
1169
1198
|
}
|
|
1199
|
+
if (field.type === "code" && field.settings.validate && field.settings.language !== "json") issues.push(issue(`${path}/settings/validate`, "INVALID_SETTINGS", "only a json code field can be validated"));
|
|
1170
1200
|
if (field.type === "richtext" && field.settings.formatVersion !== 1) issues.push(issue(`${path}/settings/formatVersion`, "INVALID_SETTINGS", "unsupported rich-text format version"));
|
|
1171
1201
|
if (field.type === "relation" && !isStableId(field.settings.target)) issues.push(issue(`${path}/settings/target`, "INVALID_ID", "must be the ID of a model"));
|
|
1172
1202
|
if (field.type === "component" && !isStableId(field.settings.component)) issues.push(issue(`${path}/settings/component`, "INVALID_ID", "must be the ID of a component"));
|
|
@@ -1813,6 +1843,7 @@ const hasIndex = (field) => Boolean(field && (field.filterable || field.sortable
|
|
|
1813
1843
|
const API_SCALAR = {
|
|
1814
1844
|
string: "String",
|
|
1815
1845
|
text: "String",
|
|
1846
|
+
code: "String",
|
|
1816
1847
|
slug: "String",
|
|
1817
1848
|
email: "String",
|
|
1818
1849
|
url: "String",
|
|
@@ -1834,6 +1865,12 @@ const API_SCALAR = {
|
|
|
1834
1865
|
dynamiczone: "DynamicZone"
|
|
1835
1866
|
};
|
|
1836
1867
|
const PLAIN_TEXT_TYPES = /* @__PURE__ */ new Set(["string", "text"]);
|
|
1868
|
+
/** Types any string value is valid for, so a same-family change to one without constraints only widens. */
|
|
1869
|
+
const TEXT_TARGETS = /* @__PURE__ */ new Set([
|
|
1870
|
+
"string",
|
|
1871
|
+
"text",
|
|
1872
|
+
"code"
|
|
1873
|
+
]);
|
|
1837
1874
|
const SCALAR_FAMILIES = /* @__PURE__ */ new Set([
|
|
1838
1875
|
"jsonString",
|
|
1839
1876
|
"jsonNumber",
|
|
@@ -1842,23 +1879,23 @@ const SCALAR_FAMILIES = /* @__PURE__ */ new Set([
|
|
|
1842
1879
|
]);
|
|
1843
1880
|
const hasTextConstraints = (field) => {
|
|
1844
1881
|
const settings = field?.settings ?? {};
|
|
1845
|
-
return settings.minLength !== void 0 || settings.maxLength !== void 0 || settings.pattern !== void 0;
|
|
1882
|
+
return settings.minLength !== void 0 || settings.maxLength !== void 0 || settings.pattern !== void 0 || settings.validate === true;
|
|
1846
1883
|
};
|
|
1847
1884
|
/**
|
|
1848
1885
|
* A type change. Within one storage family the stored JSON stays as it is: widening is live, anything else
|
|
1849
1886
|
* re-validates existing values. Across families Shapio converts values with a job, for the pairs it knows.
|
|
1850
1887
|
*/
|
|
1851
1888
|
const classifyTypeChange = (from, to, after) => {
|
|
1852
|
-
const breaking = API_SCALAR[from] !== API_SCALAR[to];
|
|
1889
|
+
const breaking = API_SCALAR[from] !== API_SCALAR[to] || to === "code" && from !== "code";
|
|
1853
1890
|
const fromFamily = STORAGE_FAMILY[from];
|
|
1854
1891
|
const toFamily = STORAGE_FAMILY[to];
|
|
1855
|
-
if (fromFamily === toFamily) return fromFamily === "jsonString" &&
|
|
1892
|
+
if (fromFamily === toFamily) return fromFamily === "jsonString" && TEXT_TARGETS.has(to) && !hasTextConstraints(after) || from === "integer" && to === "number" || from === "biginteger" && to === "decimal" && after?.type === "decimal" && after.settings.precision === void 0 ? result("additive", { breaking }) : result("validation", {
|
|
1856
1893
|
breaking,
|
|
1857
1894
|
prerequisites: ["validateValues"]
|
|
1858
1895
|
});
|
|
1859
1896
|
const numericPair = fromFamily === "jsonNumber" && toFamily === "numericString" || fromFamily === "numericString" && toFamily === "jsonNumber";
|
|
1860
1897
|
const toText = SCALAR_FAMILIES.has(fromFamily) && PLAIN_TEXT_TYPES.has(to);
|
|
1861
|
-
const textToRichtext = fromFamily === "jsonString" && to === "richtext";
|
|
1898
|
+
const textToRichtext = fromFamily === "jsonString" && from !== "code" && to === "richtext";
|
|
1862
1899
|
const richtextToText = from === "richtext" && PLAIN_TEXT_TYPES.has(to);
|
|
1863
1900
|
const supported = numericPair || toText || textToRichtext || richtextToText;
|
|
1864
1901
|
return result("conversion", {
|
|
@@ -1905,7 +1942,9 @@ const classifySettingsChange = (change) => {
|
|
|
1905
1942
|
case "components":
|
|
1906
1943
|
case "allowedKinds":
|
|
1907
1944
|
case "protocols": return validation(to !== void 0 && (from === void 0 || removesAny(from, to)));
|
|
1908
|
-
case "sourceFieldId":
|
|
1945
|
+
case "sourceFieldId":
|
|
1946
|
+
case "language": return result("metadata");
|
|
1947
|
+
case "validate": return validation(to === true);
|
|
1909
1948
|
case "multiple":
|
|
1910
1949
|
case "repeatable":
|
|
1911
1950
|
case "cardinality": return result("conversion", {
|
|
@@ -2633,6 +2672,6 @@ const SeoDefaultsSchema = Type.Object({
|
|
|
2633
2672
|
twitterHandle: Type.Union([Type.String({ pattern: SEO_TWITTER_HANDLE_PATTERN.source }), Type.Null()])
|
|
2634
2673
|
}, closed);
|
|
2635
2674
|
//#endregion
|
|
2636
|
-
export { API_KEY_PATTERN, BIGINTEGER_PATTERN, BUILT_IN_THEME_KEYS, CANVAS_ELIGIBLE, CHANGE_KINDS, COMPONENT_TYPE_SUFFIXES, CUSTOM_EDITOR_ID_PATTERN, ComponentDefinitionInputSchema, ComponentDisplayInputSchema, DATA_TYPES, DATETIME_PATTERN, DATE_PATTERN, DECIMAL_PATTERN, DEFAULT_EDITORS, DEFAULT_SEO_KEYS, DEFINITION_KINDS, DefinitionInputSchema, EDITOR_CATALOGUE, EMPTY_SEO_DEFAULTS, EditorChoiceInputSchema, EnumValueSchema, FieldInputSchema, INLINE_TITLE_TYPES, LOCALE_CODE_PATTERN, LOCK_FILE_FORMAT_VERSION, LOCK_FILE_PATH, LocaleInputSchema, LockEntrySchema, LockFileError, LockFileSchema, MARK_RULES, MAX_API_KEY_LENGTH, MAX_COMPONENT_DEPTH, MAX_DESCRIPTION_LENGTH, MAX_FALLBACK_CHAIN, MAX_FIELDS_PER_DEFINITION, MAX_LABEL_LENGTH, MAX_RICHTEXT_DEPTH, MEDIA_KINDS, MODEL_KINDS, MODEL_TYPE_SUFFIXES, MUTATION_PREFIXES, ModelDefinitionInputSchema, ModelDisplayInputSchema, NODE_RULES, PLURAL_FALLBACK_SUFFIX, REFERENCE_DATA_TYPES, RELATION_CARDINALITIES, RESERVED_DEFINITION_API_KEYS, RESERVED_FIELD_API_KEYS, RESERVED_QUERY_NAMES, RESERVED_TYPE_NAMES, RICHTEXT_FORMAT, RICHTEXT_FORMAT_VERSION, SAFE_LINK_PATTERN, SCALAR_DATA_TYPES, SCHEMA_KIND_DIRECTORIES, SEO_COMPONENT_API_KEY, SEO_COMPONENT_ID, SEO_DESCRIPTION_SOFT_MAX, SEO_EDITOR_ID, SEO_FIELD_IDS, SEO_TITLE_PLACEHOLDER, SEO_TITLE_SOFT_MAX, SEO_TITLE_TEMPLATE_PATTERN, SEO_TWITTER_HANDLE_PATTERN, SETTINGS_SCHEMAS, SITES_DIRECTORY, SLUG_PATTERN, SORT_DIRECTIONS, STABLE_ID_PATTERN, STORAGE_FAMILY, STRIP_DEFAULT_COUNT, SchemaValidationError, SeoDefaultsSchema, SeoLocaleDefaultsSchema, TEXT_TITLE_FIELD_TYPES, THEME_BRAND_TOKENS, THEME_COLOUR_PATTERN, THEME_DARK_UI_PAIRS, THEME_KEY_PATTERN, THEME_SEMANTIC_TOKENS, THEME_TEXT_PAIRS, THEME_TOKENS, THEME_UI_PAIRS, THEME_VARIANTS, TIME_PATTERN, TITLE_FIELD_TYPES, UID_PATTERN, UNIQUE_CAPABLE_DATA_TYPES, applyTitleTemplate, assignIds, canonicalJson, checkApiKeySyntax, checkDefaultValue, checkThemeContrast, classifyChange, classifyChanges, classifyLocaleChange, collectionQueryName, contrastRatio, createStableId, decideSync, diffDefinitions, effectiveLayout, effectiveTitleField, embeddedComponentIds, escapeHtml, findDependentModels, findReferencingDefinitions, foldApiKey, generatedNames, hashDefinition, isApiKeySyntaxValid, isCanvasEligible, isComponentDefinition, isCoverEligible, isCustomEditorId, isDataType, isDocumentPlaceable, isEmptyRichText, isModelDefinition, isSeoField, isStableId, isValidTitleTemplate, issue, listCompatibleEditors, lockCoversSite, lockEntriesForSite, mergePulledLock, normalizeDefinition, parseDefinition, parseLockFile, plainTextToRichText, renderRichTextHtml, renormalizeDefinition, resolveSeo, richTextMediaIds, richTextToPlainText, routeKeyOf, schemaFilePath, scopeDirectory, scopeOfSchemaFilePath, seoComponentDefinition, seoDefaultsForLocale, serializeDefinition, serializeLockFile, sha256, stripFieldsOf, suggestPlural, summarizeChanges, toTypeName, upgradeLockFile, validateDefinition, validateRichText, validateSchema, withDerivedPlural, withSiteCovered };
|
|
2675
|
+
export { API_KEY_PATTERN, BIGINTEGER_PATTERN, BUILT_IN_THEME_KEYS, CANVAS_ELIGIBLE, CHANGE_KINDS, CODE_LANGUAGES, COMPONENT_TYPE_SUFFIXES, CUSTOM_EDITOR_ID_PATTERN, ComponentDefinitionInputSchema, ComponentDisplayInputSchema, DATA_TYPES, DATETIME_PATTERN, DATE_PATTERN, DECIMAL_PATTERN, DEFAULT_EDITORS, DEFAULT_SEO_KEYS, DEFINITION_KINDS, DefinitionInputSchema, EDITOR_CATALOGUE, EMPTY_SEO_DEFAULTS, EditorChoiceInputSchema, EnumValueSchema, FieldInputSchema, INLINE_TITLE_TYPES, LOCALE_CODE_PATTERN, LOCK_FILE_FORMAT_VERSION, LOCK_FILE_PATH, LocaleInputSchema, LockEntrySchema, LockFileError, LockFileSchema, MARK_RULES, MAX_API_KEY_LENGTH, MAX_COMPONENT_DEPTH, MAX_DESCRIPTION_LENGTH, MAX_FALLBACK_CHAIN, MAX_FIELDS_PER_DEFINITION, MAX_LABEL_LENGTH, MAX_RICHTEXT_DEPTH, MEDIA_KINDS, MODEL_KINDS, MODEL_TYPE_SUFFIXES, MUTATION_PREFIXES, ModelDefinitionInputSchema, ModelDisplayInputSchema, NODE_RULES, PLURAL_FALLBACK_SUFFIX, REFERENCE_DATA_TYPES, RELATION_CARDINALITIES, RESERVED_DEFINITION_API_KEYS, RESERVED_FIELD_API_KEYS, RESERVED_QUERY_NAMES, RESERVED_TYPE_NAMES, RICHTEXT_FORMAT, RICHTEXT_FORMAT_VERSION, SAFE_LINK_PATTERN, SCALAR_DATA_TYPES, SCHEMA_KIND_DIRECTORIES, SEO_COMPONENT_API_KEY, SEO_COMPONENT_ID, SEO_DESCRIPTION_SOFT_MAX, SEO_EDITOR_ID, SEO_FIELD_IDS, SEO_TITLE_PLACEHOLDER, SEO_TITLE_SOFT_MAX, SEO_TITLE_TEMPLATE_PATTERN, SEO_TWITTER_HANDLE_PATTERN, SETTINGS_SCHEMAS, SITES_DIRECTORY, SLUG_PATTERN, SORT_DIRECTIONS, STABLE_ID_PATTERN, STORAGE_FAMILY, STRIP_DEFAULT_COUNT, SchemaValidationError, SeoDefaultsSchema, SeoLocaleDefaultsSchema, TEXT_TITLE_FIELD_TYPES, THEME_BRAND_TOKENS, THEME_COLOUR_PATTERN, THEME_DARK_UI_PAIRS, THEME_KEY_PATTERN, THEME_SEMANTIC_TOKENS, THEME_TEXT_PAIRS, THEME_TOKENS, THEME_UI_PAIRS, THEME_VARIANTS, TIME_PATTERN, TITLE_FIELD_TYPES, UID_PATTERN, UNIQUE_CAPABLE_DATA_TYPES, applyTitleTemplate, assignIds, canonicalJson, checkApiKeySyntax, checkDefaultValue, checkThemeContrast, classifyChange, classifyChanges, classifyLocaleChange, collectionQueryName, contrastRatio, createStableId, decideSync, diffDefinitions, effectiveLayout, effectiveTitleField, embeddedComponentIds, escapeHtml, findDependentModels, findReferencingDefinitions, foldApiKey, generatedNames, hashDefinition, isApiKeySyntaxValid, isCanvasEligible, isComponentDefinition, isCoverEligible, isCustomEditorId, isDataType, isDocumentPlaceable, isEmptyRichText, isModelDefinition, isSeoField, isStableId, isValidTitleTemplate, issue, listCompatibleEditors, lockCoversSite, lockEntriesForSite, mergePulledLock, normalizeDefinition, parseDefinition, parseLockFile, plainTextToRichText, renderRichTextHtml, renormalizeDefinition, resolveSeo, richTextMediaIds, richTextToPlainText, routeKeyOf, schemaFilePath, scopeDirectory, scopeOfSchemaFilePath, seoComponentDefinition, seoDefaultsForLocale, serializeDefinition, serializeLockFile, sha256, stripFieldsOf, suggestPlural, summarizeChanges, toTypeName, upgradeLockFile, validateDefinition, validateRichText, validateSchema, withDerivedPlural, withSiteCovered };
|
|
2637
2676
|
|
|
2638
2677
|
//# sourceMappingURL=index.js.map
|