@sanity/schema 6.25.0-next.30 → 6.25.0-next.42
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/lib/{Schema-dJfwxOet.js → Schema-DQqUqcpq.js} +1 -1
- package/lib/{Schema-dJfwxOet.js.map → Schema-DQqUqcpq.js.map} +1 -1
- package/lib/_internal.d.ts +2 -2
- package/lib/_internal.js +7 -9
- package/lib/_internal.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +4 -4
- /package/lib/{typedefs-LNWlFyVi.d.ts → typedefs-C22ZQXIT.d.ts} +0 -0
package/lib/_internal.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as SchemaValidationResult, i as ProblemPathTypeSegment, l as Schema$1, n as ProblemPathPropertySegment, o as TypeWithProblems, r as ProblemPathSegment, s as _FIXME_, t as ProblemPath } from "./typedefs-LNWlFyVi.js";
|
|
2
1
|
import { Encoded, SetSynchronization, SynchronizationRequest, SynchronizationResult } from "@sanity/descriptors";
|
|
3
2
|
import { CustomValidator, MediaValidator, SanityDocumentLike, Schema, SchemaType, SchemaTypeDefinition, SchemaValidationProblem, SchemaValidationProblemGroup } from "@sanity/types";
|
|
4
3
|
import { RequestOptions } from "get-it";
|
|
5
|
-
import {
|
|
4
|
+
import { a as SchemaValidationResult, i as ProblemPathTypeSegment, l as Schema$1, n as ProblemPathPropertySegment, o as TypeWithProblems, r as ProblemPathSegment, s as _FIXME_, t as ProblemPath } from "./typedefs-C22ZQXIT.js";
|
|
6
5
|
import { ComponentType, ReactNode } from "react";
|
|
6
|
+
import { SchemaType as SchemaType$1 } from "groq-js";
|
|
7
7
|
/** The scheduler is capable of executing work in different ways. */
|
|
8
8
|
type Scheduler = {
|
|
9
9
|
map<T, U>(arr: T[], fn: (val: T) => U): Promise<U[]>;
|
package/lib/_internal.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { c as DEFAULT_MAX_FIELD_DEPTH, d as ALL_FIELDS_GROUP_NAME, f as OWN_PROPS_NAME, l as resolveSearchConfig, n as Schema$1, p as Rule, s as isGuessedPreview, u as resolveSearchConfigForBaseFieldPaths } from "./Schema-dJfwxOet.js";
|
|
2
1
|
import { SetBuilder, processSetSynchronization } from "@sanity/descriptors";
|
|
3
2
|
import { isSpanSchemaType } from "@sanity/types";
|
|
4
3
|
import { dequal } from "dequal/lite";
|
|
4
|
+
import { c as DEFAULT_MAX_FIELD_DEPTH, d as ALL_FIELDS_GROUP_NAME, f as OWN_PROPS_NAME, l as resolveSearchConfig, n as Schema$1, p as Rule, s as isGuessedPreview, u as resolveSearchConfigForBaseFieldPaths } from "./Schema-DQqUqcpq.js";
|
|
5
5
|
import { HttpError, createRequester } from "get-it";
|
|
6
6
|
import { retry } from "get-it/middleware";
|
|
7
7
|
import "@sanity/generate-help-url";
|
|
8
|
-
import startCase from "lodash-es/startCase.js";
|
|
9
|
-
import omit from "lodash-es/omit.js";
|
|
10
|
-
import isPlainObject from "lodash-es/isPlainObject.js";
|
|
11
8
|
import get from "lodash-es/get.js";
|
|
12
9
|
import humanizeList from "humanize-list";
|
|
10
|
+
import isPlainObject from "lodash-es/isPlainObject.js";
|
|
11
|
+
import omit from "lodash-es/omit.js";
|
|
13
12
|
import leven from "leven";
|
|
13
|
+
import startCase from "lodash-es/startCase.js";
|
|
14
14
|
import { createReferenceTypeNode } from "groq-js";
|
|
15
15
|
const internalValidators = /* @__PURE__ */ new WeakSet();
|
|
16
16
|
/** @internal */
|
|
@@ -1468,7 +1468,7 @@ function getDefaultProblems(type, path = []) {
|
|
|
1468
1468
|
}
|
|
1469
1469
|
function getTypeProblems(type, path = []) {
|
|
1470
1470
|
switch (type.type) {
|
|
1471
|
-
case "object":
|
|
1471
|
+
case "object":
|
|
1472
1472
|
case "document": return getObjectProblems(type, path);
|
|
1473
1473
|
case "array": return getArrayProblems(type, path);
|
|
1474
1474
|
case "reference": return getReferenceProblems(type, path);
|
|
@@ -2541,15 +2541,13 @@ function transformBlockType(blockType, context) {
|
|
|
2541
2541
|
};
|
|
2542
2542
|
}
|
|
2543
2543
|
function resolveEnabledStyles(blockType) {
|
|
2544
|
-
|
|
2545
|
-
return resolveTitleValueArray(styleField?.type?.options?.list);
|
|
2544
|
+
return resolveTitleValueArray((blockType.fields?.find((btField) => btField.name === "style"))?.type?.options?.list);
|
|
2546
2545
|
}
|
|
2547
2546
|
function resolveEnabledDecorators(spanType) {
|
|
2548
2547
|
return "decorators" in spanType ? resolveTitleValueArray(spanType.decorators) : void 0;
|
|
2549
2548
|
}
|
|
2550
2549
|
function resolveEnabledListItems(blockType) {
|
|
2551
|
-
|
|
2552
|
-
return resolveTitleValueArray(listField?.type?.options?.list);
|
|
2550
|
+
return resolveTitleValueArray((blockType.fields?.find((btField) => btField.name === "listItem"))?.type?.options?.list);
|
|
2553
2551
|
}
|
|
2554
2552
|
function resolveTitleValueArray(possibleArray) {
|
|
2555
2553
|
if (!possibleArray || !Array.isArray(possibleArray)) return;
|