@prismicio/client 7.21.0-alpha.1 → 7.21.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/dist/Client.cjs +120 -132
- package/dist/Client.cjs.map +1 -1
- package/dist/Client.d.ts +7 -7
- package/dist/Client.js +120 -132
- package/dist/Client.js.map +1 -1
- package/dist/Migration.cjs +83 -101
- package/dist/Migration.cjs.map +1 -1
- package/dist/Migration.d.ts +9 -9
- package/dist/Migration.js +83 -101
- package/dist/Migration.js.map +1 -1
- package/dist/WriteClient.cjs +113 -98
- package/dist/WriteClient.cjs.map +1 -1
- package/dist/WriteClient.d.ts +6 -6
- package/dist/WriteClient.js +113 -98
- package/dist/WriteClient.js.map +1 -1
- package/dist/buildQueryURL.cjs.map +1 -1
- package/dist/buildQueryURL.d.ts +29 -21
- package/dist/buildQueryURL.js.map +1 -1
- package/dist/createClient.cjs.map +1 -1
- package/dist/createClient.d.ts +13 -10
- package/dist/createClient.js.map +1 -1
- package/dist/createMigration.cjs.map +1 -1
- package/dist/createMigration.d.ts +2 -2
- package/dist/createMigration.js.map +1 -1
- package/dist/createWriteClient.cjs.map +1 -1
- package/dist/createWriteClient.d.ts +2 -2
- package/dist/errors/ForbiddenError.d.ts +1 -1
- package/dist/errors/InvalidDataError.d.ts +1 -1
- package/dist/errors/NotFoundError.d.ts +1 -1
- package/dist/errors/ParsingError.d.ts +1 -1
- package/dist/errors/PreviewTokenExpired.d.ts +1 -1
- package/dist/errors/PrismicError.cjs +2 -5
- package/dist/errors/PrismicError.cjs.map +1 -1
- package/dist/errors/PrismicError.js +2 -5
- package/dist/errors/PrismicError.js.map +1 -1
- package/dist/errors/RefExpiredError.d.ts +1 -1
- package/dist/errors/RefNotFoundError.d.ts +1 -1
- package/dist/errors/RepositoryNotFoundError.d.ts +1 -1
- package/dist/filter.cjs.map +1 -1
- package/dist/filter.js.map +1 -1
- package/dist/getGraphQLEndpoint.cjs.map +1 -1
- package/dist/getGraphQLEndpoint.js.map +1 -1
- package/dist/getRepositoryEndpoint.cjs.map +1 -1
- package/dist/getRepositoryEndpoint.d.ts +9 -2
- package/dist/getRepositoryEndpoint.js.map +1 -1
- package/dist/getRepositoryName.cjs.map +1 -1
- package/dist/getRepositoryName.js.map +1 -1
- package/dist/getToolbarSrc.cjs.map +1 -1
- package/dist/getToolbarSrc.js.map +1 -1
- package/dist/helpers/asDate.cjs.map +1 -1
- package/dist/helpers/asDate.d.ts +13 -6
- package/dist/helpers/asDate.js.map +1 -1
- package/dist/helpers/asHTML.cjs +22 -22
- package/dist/helpers/asHTML.cjs.map +1 -1
- package/dist/helpers/asHTML.d.ts +37 -29
- package/dist/helpers/asHTML.js +22 -22
- package/dist/helpers/asHTML.js.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.cjs.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts +17 -16
- package/dist/helpers/asImagePixelDensitySrcSet.js.map +1 -1
- package/dist/helpers/asImageSrc.cjs.map +1 -1
- package/dist/helpers/asImageSrc.d.ts +12 -11
- package/dist/helpers/asImageSrc.js.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.cjs.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.d.ts +19 -18
- package/dist/helpers/asImageWidthSrcSet.js.map +1 -1
- package/dist/helpers/asLink.cjs.map +1 -1
- package/dist/helpers/asLink.d.ts +36 -35
- package/dist/helpers/asLink.js.map +1 -1
- package/dist/helpers/asLinkAttrs.cjs.map +1 -1
- package/dist/helpers/asLinkAttrs.d.ts +11 -14
- package/dist/helpers/asLinkAttrs.js.map +1 -1
- package/dist/helpers/asText.cjs.map +1 -1
- package/dist/helpers/asText.d.ts +21 -11
- package/dist/helpers/asText.js.map +1 -1
- package/dist/helpers/documentToLinkField.cjs +1 -2
- package/dist/helpers/documentToLinkField.cjs.map +1 -1
- package/dist/helpers/documentToLinkField.d.ts +2 -2
- package/dist/helpers/documentToLinkField.js +1 -2
- package/dist/helpers/documentToLinkField.js.map +1 -1
- package/dist/helpers/isFilled.cjs +1 -1
- package/dist/helpers/isFilled.cjs.map +1 -1
- package/dist/helpers/isFilled.d.ts +35 -34
- package/dist/helpers/isFilled.js +1 -1
- package/dist/helpers/isFilled.js.map +1 -1
- package/dist/helpers/mapSliceZone.cjs.map +1 -1
- package/dist/helpers/mapSliceZone.d.ts +11 -11
- package/dist/helpers/mapSliceZone.js.map +1 -1
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +121 -120
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/isRepositoryEndpoint.cjs.map +1 -1
- package/dist/isRepositoryEndpoint.d.ts +2 -2
- package/dist/isRepositoryEndpoint.js.map +1 -1
- package/dist/isRepositoryName.cjs.map +1 -1
- package/dist/isRepositoryName.js.map +1 -1
- package/dist/lib/appendFilters.cjs.map +1 -1
- package/dist/lib/appendFilters.js.map +1 -1
- package/dist/lib/castArray.cjs.map +1 -1
- package/dist/lib/castArray.js.map +1 -1
- package/dist/lib/castThunk.cjs.map +1 -1
- package/dist/lib/castThunk.js.map +1 -1
- package/dist/lib/devMsg.cjs.map +1 -1
- package/dist/lib/devMsg.js.map +1 -1
- package/dist/lib/escapeHTML.cjs.map +1 -1
- package/dist/lib/escapeHTML.js.map +1 -1
- package/dist/lib/everyTagFilter.cjs.map +1 -1
- package/dist/lib/everyTagFilter.js.map +1 -1
- package/dist/lib/findMasterRef.cjs.map +1 -1
- package/dist/lib/findMasterRef.d.ts +1 -1
- package/dist/lib/findMasterRef.js.map +1 -1
- package/dist/lib/findRef.cjs.map +1 -1
- package/dist/lib/findRef.d.ts +1 -1
- package/dist/lib/findRef.js.map +1 -1
- package/dist/lib/findRefByID.cjs.map +1 -1
- package/dist/lib/findRefByID.d.ts +1 -1
- package/dist/lib/findRefByID.js.map +1 -1
- package/dist/lib/findRefByLabel.cjs.map +1 -1
- package/dist/lib/findRefByLabel.d.ts +1 -1
- package/dist/lib/findRefByLabel.js.map +1 -1
- package/dist/lib/getOptionalLinkProperties.cjs.map +1 -1
- package/dist/lib/getOptionalLinkProperties.d.ts +1 -1
- package/dist/lib/getOptionalLinkProperties.js.map +1 -1
- package/dist/lib/getPreviewCookie.cjs.map +1 -1
- package/dist/lib/getPreviewCookie.js.map +1 -1
- package/dist/lib/isInternalURL.cjs.map +1 -1
- package/dist/lib/isInternalURL.js.map +1 -1
- package/dist/lib/isMigrationValue.cjs.map +1 -1
- package/dist/lib/isMigrationValue.d.ts +8 -8
- package/dist/lib/isMigrationValue.js.map +1 -1
- package/dist/lib/isValue.cjs.map +1 -1
- package/dist/lib/isValue.d.ts +10 -10
- package/dist/lib/isValue.js.map +1 -1
- package/dist/lib/minifyGraphQLQuery.cjs.map +1 -1
- package/dist/lib/minifyGraphQLQuery.js.map +1 -1
- package/dist/lib/pLimit.cjs +3 -4
- package/dist/lib/pLimit.cjs.map +1 -1
- package/dist/lib/pLimit.js +3 -4
- package/dist/lib/pLimit.js.map +1 -1
- package/dist/lib/request.cjs +8 -10
- package/dist/lib/request.cjs.map +1 -1
- package/dist/lib/request.js +8 -10
- package/dist/lib/request.js.map +1 -1
- package/dist/lib/resolveMigrationDocumentData.cjs +4 -6
- package/dist/lib/resolveMigrationDocumentData.cjs.map +1 -1
- package/dist/lib/resolveMigrationDocumentData.d.ts +8 -8
- package/dist/lib/resolveMigrationDocumentData.js +4 -6
- package/dist/lib/resolveMigrationDocumentData.js.map +1 -1
- package/dist/lib/serializerHelpers.cjs +2 -2
- package/dist/lib/serializerHelpers.cjs.map +1 -1
- package/dist/lib/serializerHelpers.d.ts +3 -3
- package/dist/lib/serializerHelpers.js +2 -2
- package/dist/lib/serializerHelpers.js.map +1 -1
- package/dist/lib/someTagsFilter.cjs.map +1 -1
- package/dist/lib/someTagsFilter.js.map +1 -1
- package/dist/lib/throttledLog.cjs.map +1 -1
- package/dist/lib/throttledLog.js.map +1 -1
- package/dist/lib/typeFilter.cjs.map +1 -1
- package/dist/lib/typeFilter.js.map +1 -1
- package/dist/lib/validateAssetMetadata.cjs.map +1 -1
- package/dist/lib/validateAssetMetadata.d.ts +1 -1
- package/dist/lib/validateAssetMetadata.js.map +1 -1
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.js +1 -1
- package/dist/richtext/asText.cjs.map +1 -1
- package/dist/richtext/asText.d.ts +6 -6
- package/dist/richtext/asText.js.map +1 -1
- package/dist/richtext/asTree.cjs.map +1 -1
- package/dist/richtext/asTree.d.ts +2 -2
- package/dist/richtext/asTree.js.map +1 -1
- package/dist/richtext/composeSerializers.cjs.map +1 -1
- package/dist/richtext/composeSerializers.d.ts +1 -1
- package/dist/richtext/composeSerializers.js.map +1 -1
- package/dist/richtext/index.d.ts +7 -7
- package/dist/richtext/serialize.cjs.map +1 -1
- package/dist/richtext/serialize.d.ts +10 -10
- package/dist/richtext/serialize.js.map +1 -1
- package/dist/richtext/types.cjs.map +1 -1
- package/dist/richtext/types.d.ts +7 -7
- package/dist/richtext/types.js.map +1 -1
- package/dist/richtext/wrapMapSerializer.cjs.map +1 -1
- package/dist/richtext/wrapMapSerializer.d.ts +1 -1
- package/dist/richtext/wrapMapSerializer.js.map +1 -1
- package/dist/types/api/asset/asset.d.ts +1 -1
- package/dist/types/api/integration.d.ts +1 -1
- package/dist/types/api/migration/document.d.ts +1 -1
- package/dist/types/api/query.d.ts +1 -1
- package/dist/types/api/release.d.ts +1 -1
- package/dist/types/api/repository.d.ts +1 -1
- package/dist/types/migration/Asset.cjs +12 -15
- package/dist/types/migration/Asset.cjs.map +1 -1
- package/dist/types/migration/Asset.d.ts +7 -7
- package/dist/types/migration/Asset.js +12 -15
- package/dist/types/migration/Asset.js.map +1 -1
- package/dist/types/migration/ContentRelationship.d.ts +3 -3
- package/dist/types/migration/Document.cjs +24 -27
- package/dist/types/migration/Document.cjs.map +1 -1
- package/dist/types/migration/Document.d.ts +9 -9
- package/dist/types/migration/Document.js +24 -27
- package/dist/types/migration/Document.js.map +1 -1
- package/dist/types/migration/Link.d.ts +1 -1
- package/dist/types/model/boolean.d.ts +1 -1
- package/dist/types/model/color.d.ts +1 -1
- package/dist/types/model/contentRelationship.d.ts +3 -2
- package/dist/types/model/customType.d.ts +1 -1
- package/dist/types/model/date.d.ts +1 -1
- package/dist/types/model/embed.d.ts +1 -1
- package/dist/types/model/geoPoint.d.ts +1 -1
- package/dist/types/model/group.d.ts +1 -1
- package/dist/types/model/image.d.ts +1 -1
- package/dist/types/model/integration.d.ts +1 -1
- package/dist/types/model/keyText.d.ts +1 -1
- package/dist/types/model/link.d.ts +1 -1
- package/dist/types/model/linkToMedia.d.ts +2 -2
- package/dist/types/model/number.d.ts +1 -1
- package/dist/types/model/range.d.ts +1 -1
- package/dist/types/model/richText.d.ts +1 -1
- package/dist/types/model/select.d.ts +1 -1
- package/dist/types/model/separator.d.ts +1 -1
- package/dist/types/model/sharedSlice.d.ts +2 -2
- package/dist/types/model/sharedSliceVariation.d.ts +1 -1
- package/dist/types/model/slice.d.ts +3 -3
- package/dist/types/model/sliceZone.d.ts +2 -2
- package/dist/types/model/table.d.ts +1 -1
- package/dist/types/model/timestamp.d.ts +1 -1
- package/dist/types/model/title.d.ts +1 -1
- package/dist/types/model/types.cjs.map +1 -1
- package/dist/types/model/types.d.ts +22 -23
- package/dist/types/model/types.js.map +1 -1
- package/dist/types/model/uid.d.ts +1 -1
- package/dist/types/value/color.d.ts +1 -1
- package/dist/types/value/contentRelationship.d.ts +3 -3
- package/dist/types/value/date.d.ts +1 -1
- package/dist/types/value/document.d.ts +4 -4
- package/dist/types/value/embed.d.ts +1 -1
- package/dist/types/value/geoPoint.d.ts +1 -1
- package/dist/types/value/group.d.ts +1 -1
- package/dist/types/value/image.d.ts +1 -1
- package/dist/types/value/integration.d.ts +1 -1
- package/dist/types/value/keyText.d.ts +1 -1
- package/dist/types/value/link.d.ts +5 -5
- package/dist/types/value/linkToMedia.d.ts +2 -2
- package/dist/types/value/number.d.ts +1 -1
- package/dist/types/value/richText.d.ts +3 -3
- package/dist/types/value/select.d.ts +1 -1
- package/dist/types/value/sharedSlice.d.ts +1 -1
- package/dist/types/value/sharedSliceVariation.d.ts +1 -1
- package/dist/types/value/slice.d.ts +1 -1
- package/dist/types/value/sliceZone.d.ts +3 -3
- package/dist/types/value/table.d.ts +2 -2
- package/dist/types/value/timestamp.d.ts +2 -2
- package/dist/types/value/title.d.ts +2 -2
- package/dist/types/value/types.d.ts +18 -18
- package/dist/types/webhook/apiUpdate.d.ts +1 -1
- package/dist/types/webhook/testTrigger.d.ts +1 -1
- package/dist/types/webhook/types.d.ts +2 -2
- package/package.json +11 -11
- package/src/WriteClient.ts +21 -32
- package/src/buildQueryURL.ts +29 -21
- package/src/createClient.ts +11 -8
- package/src/getRepositoryEndpoint.ts +9 -2
- package/src/helpers/asDate.ts +11 -4
- package/src/helpers/asHTML.ts +34 -26
- package/src/helpers/asImagePixelDensitySrcSet.ts +16 -15
- package/src/helpers/asImageSrc.ts +11 -10
- package/src/helpers/asImageWidthSrcSet.ts +18 -17
- package/src/helpers/asLink.ts +33 -32
- package/src/helpers/asLinkAttrs.ts +6 -9
- package/src/helpers/asText.ts +20 -10
- package/src/helpers/isFilled.ts +15 -14
- package/src/helpers/mapSliceZone.ts +10 -10
- package/src/index.ts +3 -2
- package/src/isRepositoryEndpoint.ts +2 -2
- package/src/richtext/asText.ts +5 -5
- package/src/richtext/serialize.ts +8 -8
- package/src/richtext/types.ts +6 -6
- package/src/types/migration/Asset.ts +10 -2
- package/src/types/model/contentRelationship.ts +1 -0
- package/src/types/model/types.ts +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import type { CustomTypeModelIntegrationField } from "./types/model/integration";
|
|
2
|
-
import type { IntegrationField } from "./types/value/integration";
|
|
3
|
-
import { RichTextNodeType } from "./types/value/richText";
|
|
4
|
-
import type { HTMLRichTextFunctionSerializer, HTMLRichTextMapSerializer } from "./helpers/asHTML";
|
|
5
|
-
import { mapSliceZone } from "./helpers/mapSliceZone";
|
|
6
|
-
import { filter } from "./filter";
|
|
7
|
-
export { createClient } from "./createClient";
|
|
8
|
-
export { Client } from "./Client";
|
|
9
|
-
export { createWriteClient } from "./createWriteClient";
|
|
10
|
-
export { WriteClient } from "./WriteClient";
|
|
11
|
-
export { createMigration } from "./createMigration";
|
|
12
|
-
export { Migration } from "./Migration";
|
|
13
|
-
export { getRepositoryEndpoint } from "./getRepositoryEndpoint";
|
|
14
|
-
export { getRepositoryName } from "./getRepositoryName";
|
|
15
|
-
export { getGraphQLEndpoint } from "./getGraphQLEndpoint";
|
|
16
|
-
export { isRepositoryName } from "./isRepositoryName";
|
|
17
|
-
export { isRepositoryEndpoint } from "./isRepositoryEndpoint";
|
|
18
|
-
export { buildQueryURL } from "./buildQueryURL";
|
|
19
|
-
export { getToolbarSrc } from "./getToolbarSrc";
|
|
1
|
+
import type { CustomTypeModelIntegrationField } from "./types/model/integration.js";
|
|
2
|
+
import type { IntegrationField } from "./types/value/integration.js";
|
|
3
|
+
import { RichTextNodeType } from "./types/value/richText.js";
|
|
4
|
+
import type { HTMLRichTextFunctionSerializer, HTMLRichTextMapSerializer } from "./helpers/asHTML.js";
|
|
5
|
+
import { mapSliceZone } from "./helpers/mapSliceZone.js";
|
|
6
|
+
import { filter } from "./filter.js";
|
|
7
|
+
export { createClient } from "./createClient.js";
|
|
8
|
+
export { Client } from "./Client.js";
|
|
9
|
+
export { createWriteClient } from "./createWriteClient.js";
|
|
10
|
+
export { WriteClient } from "./WriteClient.js";
|
|
11
|
+
export { createMigration } from "./createMigration.js";
|
|
12
|
+
export { Migration } from "./Migration.js";
|
|
13
|
+
export { getRepositoryEndpoint } from "./getRepositoryEndpoint.js";
|
|
14
|
+
export { getRepositoryName } from "./getRepositoryName.js";
|
|
15
|
+
export { getGraphQLEndpoint } from "./getGraphQLEndpoint.js";
|
|
16
|
+
export { isRepositoryName } from "./isRepositoryName.js";
|
|
17
|
+
export { isRepositoryEndpoint } from "./isRepositoryEndpoint.js";
|
|
18
|
+
export { buildQueryURL } from "./buildQueryURL.js";
|
|
19
|
+
export { getToolbarSrc } from "./getToolbarSrc.js";
|
|
20
20
|
/**
|
|
21
21
|
* @deprecated Renamed to `filter`
|
|
22
22
|
*/
|
|
@@ -51,32 +51,32 @@ declare const predicate: {
|
|
|
51
51
|
dateHourBefore: (path: string, hour: number) => string;
|
|
52
52
|
};
|
|
53
53
|
export { filter, predicate };
|
|
54
|
-
export * as cookie from "./cookie";
|
|
55
|
-
export type { CreateClient } from "./createClient";
|
|
56
|
-
export type { ClientConfig, HttpRequestLike } from "./Client";
|
|
57
|
-
export type { CreateWriteClient } from "./createWriteClient";
|
|
58
|
-
export type { WriteClientConfig, MigrateReporterEvents } from "./WriteClient";
|
|
59
|
-
export type { BuildQueryURLArgs, Ordering, QueryParams, Route, } from "./buildQueryURL";
|
|
60
|
-
export type { CreateMigration } from "./createMigration";
|
|
61
|
-
export type { AbortSignalLike, FetchLike, RequestInitLike, ResponseLike, } from "./lib/request";
|
|
62
|
-
export { asDate } from "./helpers/asDate";
|
|
63
|
-
export { asLink } from "./helpers/asLink";
|
|
64
|
-
export { asLinkAttrs } from "./helpers/asLinkAttrs";
|
|
65
|
-
export { asText } from "./helpers/asText";
|
|
66
|
-
export { asHTML } from "./helpers/asHTML";
|
|
67
|
-
export { asImageSrc } from "./helpers/asImageSrc";
|
|
68
|
-
export { asImageWidthSrcSet } from "./helpers/asImageWidthSrcSet";
|
|
69
|
-
export { asImagePixelDensitySrcSet } from "./helpers/asImagePixelDensitySrcSet";
|
|
70
|
-
export * as isFilled from "./helpers/isFilled";
|
|
54
|
+
export * as cookie from "./cookie.js";
|
|
55
|
+
export type { CreateClient } from "./createClient.js";
|
|
56
|
+
export type { ClientConfig, HttpRequestLike } from "./Client.js";
|
|
57
|
+
export type { CreateWriteClient } from "./createWriteClient.js";
|
|
58
|
+
export type { WriteClientConfig, MigrateReporterEvents } from "./WriteClient.js";
|
|
59
|
+
export type { BuildQueryURLArgs, Ordering, QueryParams, Route, } from "./buildQueryURL.js";
|
|
60
|
+
export type { CreateMigration } from "./createMigration.js";
|
|
61
|
+
export type { AbortSignalLike, FetchLike, RequestInitLike, ResponseLike, } from "./lib/request.js";
|
|
62
|
+
export { asDate } from "./helpers/asDate.js";
|
|
63
|
+
export { asLink } from "./helpers/asLink.js";
|
|
64
|
+
export { asLinkAttrs } from "./helpers/asLinkAttrs.js";
|
|
65
|
+
export { asText } from "./helpers/asText.js";
|
|
66
|
+
export { asHTML } from "./helpers/asHTML.js";
|
|
67
|
+
export { asImageSrc } from "./helpers/asImageSrc.js";
|
|
68
|
+
export { asImageWidthSrcSet } from "./helpers/asImageWidthSrcSet.js";
|
|
69
|
+
export { asImagePixelDensitySrcSet } from "./helpers/asImagePixelDensitySrcSet.js";
|
|
70
|
+
export * as isFilled from "./helpers/isFilled.js";
|
|
71
71
|
/**
|
|
72
72
|
* @deprecated Renamed to `mapSliceZone`
|
|
73
73
|
*/
|
|
74
74
|
declare const unstable_mapSliceZone: typeof mapSliceZone;
|
|
75
75
|
export { mapSliceZone, unstable_mapSliceZone };
|
|
76
|
-
export { documentToLinkField } from "./helpers/documentToLinkField";
|
|
77
|
-
export type { LinkResolverFunction } from "./helpers/asLink";
|
|
78
|
-
export type { AsLinkAttrsConfig } from "./helpers/asLinkAttrs";
|
|
79
|
-
export type { SliceMapper } from "./helpers/mapSliceZone";
|
|
76
|
+
export { documentToLinkField } from "./helpers/documentToLinkField.js";
|
|
77
|
+
export type { LinkResolverFunction } from "./helpers/asLink.js";
|
|
78
|
+
export type { AsLinkAttrsConfig } from "./helpers/asLinkAttrs.js";
|
|
79
|
+
export type { SliceMapper } from "./helpers/mapSliceZone.js";
|
|
80
80
|
/**
|
|
81
81
|
* @deprecated Renamed to `HTMLRichTextMapSerializer`
|
|
82
82
|
*/
|
|
@@ -86,15 +86,16 @@ type HTMLMapSerializer = HTMLRichTextMapSerializer;
|
|
|
86
86
|
*/
|
|
87
87
|
type HTMLFunctionSerializer = HTMLRichTextFunctionSerializer;
|
|
88
88
|
export type { HTMLRichTextMapSerializer, HTMLRichTextFunctionSerializer, HTMLMapSerializer, HTMLFunctionSerializer, };
|
|
89
|
-
export type { HTMLRichTextSerializer } from "./helpers/asHTML";
|
|
90
|
-
export { PrismicError } from "./errors/PrismicError";
|
|
91
|
-
export { ForbiddenError } from "./errors/ForbiddenError";
|
|
92
|
-
export {
|
|
93
|
-
export {
|
|
94
|
-
export {
|
|
95
|
-
export {
|
|
96
|
-
export {
|
|
97
|
-
export {
|
|
89
|
+
export type { HTMLRichTextSerializer } from "./helpers/asHTML.js";
|
|
90
|
+
export { PrismicError } from "./errors/PrismicError.js";
|
|
91
|
+
export { ForbiddenError } from "./errors/ForbiddenError.js";
|
|
92
|
+
export { InvalidDataError } from "./errors/InvalidDataError.js";
|
|
93
|
+
export { NotFoundError } from "./errors/NotFoundError.js";
|
|
94
|
+
export { RefNotFoundError } from "./errors/RefNotFoundError.js";
|
|
95
|
+
export { RefExpiredError } from "./errors/RefExpiredError.js";
|
|
96
|
+
export { PreviewTokenExpiredError } from "./errors/PreviewTokenExpired.js";
|
|
97
|
+
export { ParsingError } from "./errors/ParsingError.js";
|
|
98
|
+
export { RepositoryNotFoundError } from "./errors/RepositoryNotFoundError.js";
|
|
98
99
|
/**
|
|
99
100
|
* @deprecated Use {@link RichTextNodeType} instead.
|
|
100
101
|
*/
|
|
@@ -120,84 +121,84 @@ declare const Element: {
|
|
|
120
121
|
readonly span: "span";
|
|
121
122
|
};
|
|
122
123
|
export { RichTextNodeType, Element };
|
|
123
|
-
export { LinkType } from "./types/value/link";
|
|
124
|
-
export { OEmbedType } from "./types/value/embed";
|
|
125
|
-
export type { PrismicDocument, PrismicDocumentWithUID, PrismicDocumentWithoutUID, PrismicDocumentHeader, AlternateLanguage, } from "./types/value/document";
|
|
126
|
-
export type { RichTextField, RTTextNodeBase, RTHeading1Node, RTHeading2Node, RTHeading3Node, RTHeading4Node, RTHeading5Node, RTHeading6Node, RTParagraphNode, RTPreformattedNode, RTListItemNode, RTOListItemNode, RTSpanNodeBase, RTStrongNode, RTEmNode, RTLabelNode, RTImageNode, RTEmbedNode, RTLinkNode, RTListNode, RTOListNode, RTSpanNode, RTNode, RTTextNode, RTBlockNode, RTInlineNode, RTAnyNode, RichTextNodeTypes, } from "./types/value/richText";
|
|
127
|
-
export type { TitleField } from "./types/value/title";
|
|
128
|
-
export type { ImageField, ImageFieldImage, FilledImageFieldImage, EmptyImageFieldImage, } from "./types/value/image";
|
|
129
|
-
export type { EmptyLinkField, LinkField, FilledLinkToWebField, } from "./types/value/link";
|
|
130
|
-
export type { ContentRelationshipField, FilledContentRelationshipField, } from "./types/value/contentRelationship";
|
|
131
|
-
export type { LinkToMediaField, FilledLinkToMediaField, } from "./types/value/linkToMedia";
|
|
132
|
-
export type { OEmbedExtra, PhotoOEmbed, VideoOEmbed, LinkOEmbed, RichOEmbed, AnyOEmbed, EmbedField, } from "./types/value/embed";
|
|
133
|
-
export type { TableField, TableFieldHead, TableFieldHeadRow, TableFieldBody, TableFieldBodyRow, TableFieldHeaderCell, TableFieldDataCell, } from "./types/value/table";
|
|
134
|
-
export type { BooleanField } from "./types/value/boolean";
|
|
135
|
-
export type { ColorField } from "./types/value/color";
|
|
136
|
-
export type { DateField } from "./types/value/date";
|
|
137
|
-
export type { KeyTextField } from "./types/value/keyText";
|
|
138
|
-
export type { NumberField } from "./types/value/number";
|
|
139
|
-
export type { SelectField } from "./types/value/select";
|
|
140
|
-
export type { TimestampField } from "./types/value/timestamp";
|
|
141
|
-
export type { GeoPointField } from "./types/value/geoPoint";
|
|
124
|
+
export { LinkType } from "./types/value/link.js";
|
|
125
|
+
export { OEmbedType } from "./types/value/embed.js";
|
|
126
|
+
export type { PrismicDocument, PrismicDocumentWithUID, PrismicDocumentWithoutUID, PrismicDocumentHeader, AlternateLanguage, } from "./types/value/document.js";
|
|
127
|
+
export type { RichTextField, RTTextNodeBase, RTHeading1Node, RTHeading2Node, RTHeading3Node, RTHeading4Node, RTHeading5Node, RTHeading6Node, RTParagraphNode, RTPreformattedNode, RTListItemNode, RTOListItemNode, RTSpanNodeBase, RTStrongNode, RTEmNode, RTLabelNode, RTImageNode, RTEmbedNode, RTLinkNode, RTListNode, RTOListNode, RTSpanNode, RTNode, RTTextNode, RTBlockNode, RTInlineNode, RTAnyNode, RichTextNodeTypes, } from "./types/value/richText.js";
|
|
128
|
+
export type { TitleField } from "./types/value/title.js";
|
|
129
|
+
export type { ImageField, ImageFieldImage, FilledImageFieldImage, EmptyImageFieldImage, } from "./types/value/image.js";
|
|
130
|
+
export type { EmptyLinkField, LinkField, FilledLinkToWebField, } from "./types/value/link.js";
|
|
131
|
+
export type { ContentRelationshipField, FilledContentRelationshipField, } from "./types/value/contentRelationship.js";
|
|
132
|
+
export type { LinkToMediaField, FilledLinkToMediaField, } from "./types/value/linkToMedia.js";
|
|
133
|
+
export type { OEmbedExtra, PhotoOEmbed, VideoOEmbed, LinkOEmbed, RichOEmbed, AnyOEmbed, EmbedField, } from "./types/value/embed.js";
|
|
134
|
+
export type { TableField, TableFieldHead, TableFieldHeadRow, TableFieldBody, TableFieldBodyRow, TableFieldHeaderCell, TableFieldDataCell, } from "./types/value/table.js";
|
|
135
|
+
export type { BooleanField } from "./types/value/boolean.js";
|
|
136
|
+
export type { ColorField } from "./types/value/color.js";
|
|
137
|
+
export type { DateField } from "./types/value/date.js";
|
|
138
|
+
export type { KeyTextField } from "./types/value/keyText.js";
|
|
139
|
+
export type { NumberField } from "./types/value/number.js";
|
|
140
|
+
export type { SelectField } from "./types/value/select.js";
|
|
141
|
+
export type { TimestampField } from "./types/value/timestamp.js";
|
|
142
|
+
export type { GeoPointField } from "./types/value/geoPoint.js";
|
|
142
143
|
/**
|
|
143
144
|
* @deprecated Renamed to `IntegrationField`
|
|
144
145
|
*/
|
|
145
146
|
type IntegrationFields = IntegrationField;
|
|
146
147
|
export type { IntegrationField, IntegrationFields };
|
|
147
|
-
export type { IntegrationFieldData } from "./types/value/integration";
|
|
148
|
-
export type { GroupField, NestedGroupField } from "./types/value/group";
|
|
149
|
-
export type { SliceZone } from "./types/value/sliceZone";
|
|
150
|
-
export type { Slice } from "./types/value/slice";
|
|
151
|
-
export type { SharedSlice } from "./types/value/sharedSlice";
|
|
152
|
-
export type { SharedSliceVariation } from "./types/value/sharedSliceVariation";
|
|
153
|
-
export type { FieldState, AnyRegularField, AnySlicePrimaryField, Repeatable, } from "./types/value/types";
|
|
154
|
-
export { CustomTypeModelFieldType } from "./types/model/types";
|
|
155
|
-
export { CustomTypeModelLinkSelectType } from "./types/model/link";
|
|
156
|
-
export { CustomTypeModelSliceType } from "./types/model/sliceZone";
|
|
157
|
-
export { CustomTypeModelSliceDisplay } from "./types/model/slice";
|
|
158
|
-
export type { CustomTypeModel, CustomTypeModelDefinition, CustomTypeModelTab, } from "./types/model/customType";
|
|
159
|
-
export type { CustomTypeModelRichTextField, CustomTypeModelRichTextMultiField, CustomTypeModelRichTextSingleField, } from "./types/model/richText";
|
|
160
|
-
export type { CustomTypeModelTitleField } from "./types/model/title";
|
|
161
|
-
export type { CustomTypeModelImageField, CustomTypeModelImageConstraint, CustomTypeModelImageThumbnail, } from "./types/model/image";
|
|
162
|
-
export type { CustomTypeModelFetchCustomTypeLevel1, CustomTypeModelFetchContentRelationshipLevel1, CustomTypeModelFetchGroupLevel1, CustomTypeModelFetchCustomTypeLevel2, CustomTypeModelFetchGroupLevel2, CustomTypeModelContentRelationshipField, } from "./types/model/contentRelationship";
|
|
163
|
-
export type { CustomTypeModelLinkField } from "./types/model/link";
|
|
164
|
-
export type { CustomTypeModelLinkToMediaField } from "./types/model/linkToMedia";
|
|
165
|
-
export type { CustomTypeModelEmbedField } from "./types/model/embed";
|
|
166
|
-
export type { CustomTypeModelBooleanField } from "./types/model/boolean";
|
|
167
|
-
export type { CustomTypeModelColorField } from "./types/model/color";
|
|
168
|
-
export type { CustomTypeModelDateField } from "./types/model/date";
|
|
169
|
-
export type { CustomTypeModelKeyTextField } from "./types/model/keyText";
|
|
170
|
-
export type { CustomTypeModelNumberField } from "./types/model/number";
|
|
171
|
-
export type { CustomTypeModelSelectField } from "./types/model/select";
|
|
172
|
-
export type { CustomTypeModelTimestampField } from "./types/model/timestamp";
|
|
173
|
-
export type { CustomTypeModelGeoPointField } from "./types/model/geoPoint";
|
|
174
|
-
export type { CustomTypeModelTableField } from "./types/model/table";
|
|
148
|
+
export type { IntegrationFieldData } from "./types/value/integration.js";
|
|
149
|
+
export type { GroupField, NestedGroupField } from "./types/value/group.js";
|
|
150
|
+
export type { SliceZone } from "./types/value/sliceZone.js";
|
|
151
|
+
export type { Slice } from "./types/value/slice.js";
|
|
152
|
+
export type { SharedSlice } from "./types/value/sharedSlice.js";
|
|
153
|
+
export type { SharedSliceVariation } from "./types/value/sharedSliceVariation.js";
|
|
154
|
+
export type { FieldState, AnyRegularField, AnySlicePrimaryField, Repeatable, } from "./types/value/types.js";
|
|
155
|
+
export { CustomTypeModelFieldType } from "./types/model/types.js";
|
|
156
|
+
export { CustomTypeModelLinkSelectType } from "./types/model/link.js";
|
|
157
|
+
export { CustomTypeModelSliceType } from "./types/model/sliceZone.js";
|
|
158
|
+
export { CustomTypeModelSliceDisplay } from "./types/model/slice.js";
|
|
159
|
+
export type { CustomTypeModel, CustomTypeModelDefinition, CustomTypeModelTab, } from "./types/model/customType.js";
|
|
160
|
+
export type { CustomTypeModelRichTextField, CustomTypeModelRichTextMultiField, CustomTypeModelRichTextSingleField, } from "./types/model/richText.js";
|
|
161
|
+
export type { CustomTypeModelTitleField } from "./types/model/title.js";
|
|
162
|
+
export type { CustomTypeModelImageField, CustomTypeModelImageConstraint, CustomTypeModelImageThumbnail, } from "./types/model/image.js";
|
|
163
|
+
export type { CustomTypeModelFetchCustomTypeLevel1, CustomTypeModelFetchContentRelationshipLevel1, CustomTypeModelFetchGroupLevel1, CustomTypeModelFetchCustomTypeLevel2, CustomTypeModelFetchGroupLevel2, CustomTypeModelContentRelationshipField, } from "./types/model/contentRelationship.js";
|
|
164
|
+
export type { CustomTypeModelLinkField } from "./types/model/link.js";
|
|
165
|
+
export type { CustomTypeModelLinkToMediaField } from "./types/model/linkToMedia.js";
|
|
166
|
+
export type { CustomTypeModelEmbedField } from "./types/model/embed.js";
|
|
167
|
+
export type { CustomTypeModelBooleanField } from "./types/model/boolean.js";
|
|
168
|
+
export type { CustomTypeModelColorField } from "./types/model/color.js";
|
|
169
|
+
export type { CustomTypeModelDateField } from "./types/model/date.js";
|
|
170
|
+
export type { CustomTypeModelKeyTextField } from "./types/model/keyText.js";
|
|
171
|
+
export type { CustomTypeModelNumberField } from "./types/model/number.js";
|
|
172
|
+
export type { CustomTypeModelSelectField } from "./types/model/select.js";
|
|
173
|
+
export type { CustomTypeModelTimestampField } from "./types/model/timestamp.js";
|
|
174
|
+
export type { CustomTypeModelGeoPointField } from "./types/model/geoPoint.js";
|
|
175
|
+
export type { CustomTypeModelTableField } from "./types/model/table.js";
|
|
175
176
|
/**
|
|
176
177
|
* @deprecated Renamed to `CustomTypeModelIntegrationField`.
|
|
177
178
|
*/
|
|
178
179
|
type CustomTypeModelIntegrationFieldsField = CustomTypeModelIntegrationField;
|
|
179
180
|
export { CustomTypeModelIntegrationField, CustomTypeModelIntegrationFieldsField, };
|
|
180
|
-
export type { CustomTypeModelGroupField, CustomTypeModelNestedGroupField, } from "./types/model/group";
|
|
181
|
-
export type { CustomTypeModelSliceZoneField, CustomTypeModelSliceLabel, CustomTypeModelSharedSlice, } from "./types/model/sliceZone";
|
|
182
|
-
export type { CustomTypeModelSlice, CustomTypeModelLegacySlice, } from "./types/model/slice";
|
|
183
|
-
export type { SharedSliceModel } from "./types/model/sharedSlice";
|
|
184
|
-
export type { SharedSliceModelVariation } from "./types/model/sharedSliceVariation";
|
|
185
|
-
export type { CustomTypeModelUIDField } from "./types/model/uid";
|
|
186
|
-
export type { CustomTypeModelRangeField } from "./types/model/range";
|
|
187
|
-
export type { CustomTypeModelSeparatorField } from "./types/model/separator";
|
|
188
|
-
export type { CustomTypeModelField, CustomTypeModelFieldForGroup, CustomTypeModelFieldForNestedGroup, CustomTypeModelFieldForSlicePrimary, } from "./types/model/types";
|
|
189
|
-
export { PrismicMigrationDocument } from "./types/migration/Document";
|
|
190
|
-
export type { PendingPrismicDocument, ExistingPrismicDocument, InjectMigrationSpecificTypes, } from "./types/migration/Document";
|
|
191
|
-
export { PrismicMigrationAsset } from "./types/migration/Asset";
|
|
192
|
-
export type { MigrationImage, MigrationLinkToMedia, MigrationRTImageNode, } from "./types/migration/Asset";
|
|
193
|
-
export type { MigrationContentRelationship } from "./types/migration/ContentRelationship";
|
|
194
|
-
export type { Query } from "./types/api/query";
|
|
195
|
-
export type { Ref } from "./types/api/ref";
|
|
196
|
-
export type { Release } from "./types/api/release";
|
|
197
|
-
export type { Repository, Language, Form, FormField, } from "./types/api/repository";
|
|
198
|
-
export type { Tags } from "./types/api/tags";
|
|
199
|
-
export { IntegrationAPIItem, IntegrationAPIResults, } from "./types/api/integration";
|
|
200
|
-
export { WebhookType } from "./types/webhook/types";
|
|
201
|
-
export type { WebhookBody } from "./types/webhook/types";
|
|
202
|
-
export type { WebhookBodyAPIUpdate } from "./types/webhook/apiUpdate";
|
|
203
|
-
export type { WebhookBodyTestTrigger } from "./types/webhook/testTrigger";
|
|
181
|
+
export type { CustomTypeModelGroupField, CustomTypeModelNestedGroupField, } from "./types/model/group.js";
|
|
182
|
+
export type { CustomTypeModelSliceZoneField, CustomTypeModelSliceLabel, CustomTypeModelSharedSlice, } from "./types/model/sliceZone.js";
|
|
183
|
+
export type { CustomTypeModelSlice, CustomTypeModelLegacySlice, } from "./types/model/slice.js";
|
|
184
|
+
export type { SharedSliceModel } from "./types/model/sharedSlice.js";
|
|
185
|
+
export type { SharedSliceModelVariation } from "./types/model/sharedSliceVariation.js";
|
|
186
|
+
export type { CustomTypeModelUIDField } from "./types/model/uid.js";
|
|
187
|
+
export type { CustomTypeModelRangeField } from "./types/model/range.js";
|
|
188
|
+
export type { CustomTypeModelSeparatorField } from "./types/model/separator.js";
|
|
189
|
+
export type { CustomTypeModelField, CustomTypeModelFieldForGroup, CustomTypeModelFieldForNestedGroup, CustomTypeModelFieldForSlicePrimary, } from "./types/model/types.js";
|
|
190
|
+
export { PrismicMigrationDocument } from "./types/migration/Document.js";
|
|
191
|
+
export type { PendingPrismicDocument, ExistingPrismicDocument, InjectMigrationSpecificTypes, } from "./types/migration/Document.js";
|
|
192
|
+
export { PrismicMigrationAsset } from "./types/migration/Asset.js";
|
|
193
|
+
export type { MigrationImage, MigrationLinkToMedia, MigrationRTImageNode, } from "./types/migration/Asset.js";
|
|
194
|
+
export type { MigrationContentRelationship } from "./types/migration/ContentRelationship.js";
|
|
195
|
+
export type { Query } from "./types/api/query.js";
|
|
196
|
+
export type { Ref } from "./types/api/ref.js";
|
|
197
|
+
export type { Release } from "./types/api/release.js";
|
|
198
|
+
export type { Repository, Language, Form, FormField, } from "./types/api/repository.js";
|
|
199
|
+
export type { Tags } from "./types/api/tags.js";
|
|
200
|
+
export type { IntegrationAPIItem, IntegrationAPIResults, } from "./types/api/integration.js";
|
|
201
|
+
export { WebhookType } from "./types/webhook/types.js";
|
|
202
|
+
export type { WebhookBody } from "./types/webhook/types.js";
|
|
203
|
+
export type { WebhookBodyAPIUpdate } from "./types/webhook/apiUpdate.js";
|
|
204
|
+
export type { WebhookBodyTestTrigger } from "./types/webhook/testTrigger.js";
|
package/dist/index.js
CHANGED
|
@@ -27,6 +27,7 @@ import * as isFilled from "./helpers/isFilled.js";
|
|
|
27
27
|
import { documentToLinkField } from "./helpers/documentToLinkField.js";
|
|
28
28
|
import { PrismicError } from "./errors/PrismicError.js";
|
|
29
29
|
import { ForbiddenError } from "./errors/ForbiddenError.js";
|
|
30
|
+
import { InvalidDataError } from "./errors/InvalidDataError.js";
|
|
30
31
|
import { NotFoundError } from "./errors/NotFoundError.js";
|
|
31
32
|
import { RefNotFoundError } from "./errors/RefNotFoundError.js";
|
|
32
33
|
import { RefExpiredError } from "./errors/RefExpiredError.js";
|
|
@@ -53,6 +54,7 @@ export {
|
|
|
53
54
|
CustomTypeModelSliceType,
|
|
54
55
|
Element,
|
|
55
56
|
ForbiddenError,
|
|
57
|
+
InvalidDataError,
|
|
56
58
|
LinkType,
|
|
57
59
|
Migration,
|
|
58
60
|
NotFoundError,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["// Imports are used for deprecations.\nimport type { CustomTypeModelIntegrationField } from \"./types/model/integration\"\nimport type { IntegrationField } from \"./types/value/integration\"\nimport { RichTextNodeType } from \"./types/value/richText\"\n\nimport type {\n\tHTMLRichTextFunctionSerializer,\n\tHTMLRichTextMapSerializer,\n} from \"./helpers/asHTML\"\nimport { mapSliceZone } from \"./helpers/mapSliceZone\"\n\nimport { filter } from \"./filter\"\n\n//=============================================================================\n// Client - Query content from Prismic.\n//=============================================================================\n\n// Primary Client API.\nexport { createClient } from \"./createClient\"\nexport { Client } from \"./Client\"\n\n// Write Client API.\nexport { createWriteClient } from \"./createWriteClient\"\nexport { WriteClient } from \"./WriteClient\"\n\n// Migration helper.\nexport { createMigration } from \"./createMigration\"\nexport { Migration } from \"./Migration\"\n\n// API endpoint helpers.\nexport { getRepositoryEndpoint } from \"./getRepositoryEndpoint\"\nexport { getRepositoryName } from \"./getRepositoryName\"\nexport { getGraphQLEndpoint } from \"./getGraphQLEndpoint\"\nexport { isRepositoryName } from \"./isRepositoryName\"\nexport { isRepositoryEndpoint } from \"./isRepositoryEndpoint\"\nexport { buildQueryURL } from \"./buildQueryURL\"\n\n// Toolbar helpers.\nexport { getToolbarSrc } from \"./getToolbarSrc\"\n\n// Query filters API.\n/**\n * @deprecated Renamed to `filter`\n */\n// TODO: Remove when we remove support for deprecated `predicate` export.\nconst predicate = filter\nexport { filter, predicate }\n\n// A collection of well-known cookie names shared between Prismic libraries and systems.\nexport * as cookie from \"./cookie\"\n\n// General types used to query content from Prismic. These are made public to allow users to better type their projects.\nexport type { CreateClient } from \"./createClient\"\nexport type { ClientConfig, HttpRequestLike } from \"./Client\"\nexport type { CreateWriteClient } from \"./createWriteClient\"\nexport type { WriteClientConfig, MigrateReporterEvents } from \"./WriteClient\"\nexport type {\n\tBuildQueryURLArgs,\n\tOrdering,\n\tQueryParams,\n\tRoute,\n} from \"./buildQueryURL\"\nexport type { CreateMigration } from \"./createMigration\"\nexport type {\n\tAbortSignalLike,\n\tFetchLike,\n\tRequestInitLike,\n\tResponseLike,\n} from \"./lib/request\"\n\n//=============================================================================\n// Helpers - Manipulate content from Prismic.\n//=============================================================================\n\n// Primary Helpers API.\nexport { asDate } from \"./helpers/asDate\"\nexport { asLink } from \"./helpers/asLink\"\nexport { asLinkAttrs } from \"./helpers/asLinkAttrs\"\nexport { asText } from \"./helpers/asText\"\nexport { asHTML } from \"./helpers/asHTML\"\nexport { asImageSrc } from \"./helpers/asImageSrc\"\nexport { asImageWidthSrcSet } from \"./helpers/asImageWidthSrcSet\"\nexport { asImagePixelDensitySrcSet } from \"./helpers/asImagePixelDensitySrcSet\"\nexport * as isFilled from \"./helpers/isFilled\"\n\n/**\n * @deprecated Renamed to `mapSliceZone`\n */\nconst unstable_mapSliceZone = mapSliceZone\nexport { mapSliceZone, unstable_mapSliceZone }\n\n// Conversion helper.\nexport { documentToLinkField } from \"./helpers/documentToLinkField\"\n\nexport type { LinkResolverFunction } from \"./helpers/asLink\"\nexport type { AsLinkAttrsConfig } from \"./helpers/asLinkAttrs\"\nexport type { SliceMapper } from \"./helpers/mapSliceZone\"\n\n/**\n * @deprecated Renamed to `HTMLRichTextMapSerializer`\n */\ntype HTMLMapSerializer = HTMLRichTextMapSerializer\n/**\n * @deprecated Renamed to `HTMLRichTextFunctionSerializer`\n */\ntype HTMLFunctionSerializer = HTMLRichTextFunctionSerializer\nexport type {\n\tHTMLRichTextMapSerializer,\n\tHTMLRichTextFunctionSerializer,\n\tHTMLMapSerializer,\n\tHTMLFunctionSerializer,\n}\nexport type { HTMLRichTextSerializer } from \"./helpers/asHTML\"\n\n//=============================================================================\n// Errors - Custom errors for Prismic APIs.\n//=============================================================================\n\n// Client Errors\nexport { PrismicError } from \"./errors/PrismicError\"\nexport { ForbiddenError } from \"./errors/ForbiddenError\"\nexport { NotFoundError } from \"./errors/NotFoundError\"\nexport { RefNotFoundError } from \"./errors/RefNotFoundError\"\nexport { RefExpiredError } from \"./errors/RefExpiredError\"\nexport { PreviewTokenExpiredError } from \"./errors/PreviewTokenExpired\"\nexport { ParsingError } from \"./errors/ParsingError\"\nexport { RepositoryNotFoundError } from \"./errors/RepositoryNotFoundError\"\n\n//=============================================================================\n// Types - Types representing Prismic content, models, and API payloads.\n//=============================================================================\n\n// Values - Types representing Prismic content.\n/**\n * @deprecated Use {@link RichTextNodeType} instead.\n */\n// TODO: Remove in v8.\nconst Element = RichTextNodeType\nexport { RichTextNodeType, Element }\nexport { LinkType } from \"./types/value/link\"\nexport { OEmbedType } from \"./types/value/embed\"\n\nexport type {\n\tPrismicDocument,\n\tPrismicDocumentWithUID,\n\tPrismicDocumentWithoutUID,\n\tPrismicDocumentHeader,\n\tAlternateLanguage,\n} from \"./types/value/document\"\n\nexport type {\n\t// RichText & Title\n\tRichTextField,\n\t// RichText & Title (block nodes)\n\tRTTextNodeBase,\n\tRTHeading1Node,\n\tRTHeading2Node,\n\tRTHeading3Node,\n\tRTHeading4Node,\n\tRTHeading5Node,\n\tRTHeading6Node,\n\tRTParagraphNode,\n\tRTPreformattedNode,\n\tRTListItemNode,\n\tRTOListItemNode,\n\t// RichText & Title (span nodes)\n\tRTSpanNodeBase,\n\tRTStrongNode,\n\tRTEmNode,\n\tRTLabelNode,\n\t// RichText & Title (media nodes)\n\tRTImageNode,\n\tRTEmbedNode,\n\t// RichText & Title (link nodes)\n\tRTLinkNode,\n\t// RichText & Title (serialization related nodes)\n\tRTListNode,\n\tRTOListNode,\n\tRTSpanNode,\n\t// RichText & Title (helpers)\n\tRTNode,\n\tRTTextNode,\n\tRTBlockNode,\n\tRTInlineNode,\n\tRTAnyNode,\n\tRichTextNodeTypes,\n} from \"./types/value/richText\"\nexport type { TitleField } from \"./types/value/title\"\n\nexport type {\n\tImageField,\n\tImageFieldImage,\n\tFilledImageFieldImage,\n\tEmptyImageFieldImage,\n} from \"./types/value/image\"\n\nexport type {\n\tEmptyLinkField,\n\tLinkField,\n\tFilledLinkToWebField,\n} from \"./types/value/link\"\nexport type {\n\tContentRelationshipField,\n\tFilledContentRelationshipField,\n} from \"./types/value/contentRelationship\"\nexport type {\n\tLinkToMediaField,\n\tFilledLinkToMediaField,\n} from \"./types/value/linkToMedia\"\n\nexport type {\n\tOEmbedExtra,\n\tPhotoOEmbed,\n\tVideoOEmbed,\n\tLinkOEmbed,\n\tRichOEmbed,\n\tAnyOEmbed,\n\tEmbedField,\n} from \"./types/value/embed\"\n\nexport type {\n\tTableField,\n\tTableFieldHead,\n\tTableFieldHeadRow,\n\tTableFieldBody,\n\tTableFieldBodyRow,\n\tTableFieldHeaderCell,\n\tTableFieldDataCell,\n} from \"./types/value/table\"\n\nexport type { BooleanField } from \"./types/value/boolean\"\nexport type { ColorField } from \"./types/value/color\"\nexport type { DateField } from \"./types/value/date\"\nexport type { KeyTextField } from \"./types/value/keyText\"\nexport type { NumberField } from \"./types/value/number\"\nexport type { SelectField } from \"./types/value/select\"\nexport type { TimestampField } from \"./types/value/timestamp\"\nexport type { GeoPointField } from \"./types/value/geoPoint\"\n\n/**\n * @deprecated Renamed to `IntegrationField`\n */\n// TODO: Remove when we remove support for deprecated `IntegrationFields` export.\ntype IntegrationFields = IntegrationField\nexport type { IntegrationField, IntegrationFields }\nexport type { IntegrationFieldData } from \"./types/value/integration\"\n\nexport type { GroupField, NestedGroupField } from \"./types/value/group\"\n\nexport type { SliceZone } from \"./types/value/sliceZone\"\nexport type { Slice } from \"./types/value/slice\"\nexport type { SharedSlice } from \"./types/value/sharedSlice\"\nexport type { SharedSliceVariation } from \"./types/value/sharedSliceVariation\"\n\nexport type {\n\tFieldState,\n\tAnyRegularField,\n\tAnySlicePrimaryField,\n\tRepeatable,\n} from \"./types/value/types\"\n\n// Models - Types representing Prismic content models.\nexport { CustomTypeModelFieldType } from \"./types/model/types\"\nexport { CustomTypeModelLinkSelectType } from \"./types/model/link\"\nexport { CustomTypeModelSliceType } from \"./types/model/sliceZone\"\nexport { CustomTypeModelSliceDisplay } from \"./types/model/slice\"\n\nexport type {\n\tCustomTypeModel,\n\tCustomTypeModelDefinition,\n\tCustomTypeModelTab,\n} from \"./types/model/customType\"\n\nexport type {\n\tCustomTypeModelRichTextField,\n\tCustomTypeModelRichTextMultiField,\n\tCustomTypeModelRichTextSingleField,\n} from \"./types/model/richText\"\nexport type { CustomTypeModelTitleField } from \"./types/model/title\"\n\nexport type {\n\tCustomTypeModelImageField,\n\tCustomTypeModelImageConstraint,\n\tCustomTypeModelImageThumbnail,\n} from \"./types/model/image\"\n\nexport type {\n\tCustomTypeModelFetchCustomTypeLevel1,\n\tCustomTypeModelFetchContentRelationshipLevel1,\n\tCustomTypeModelFetchGroupLevel1,\n\tCustomTypeModelFetchCustomTypeLevel2,\n\tCustomTypeModelFetchGroupLevel2,\n\tCustomTypeModelContentRelationshipField,\n} from \"./types/model/contentRelationship\"\nexport type { CustomTypeModelLinkField } from \"./types/model/link\"\nexport type { CustomTypeModelLinkToMediaField } from \"./types/model/linkToMedia\"\n\nexport type { CustomTypeModelEmbedField } from \"./types/model/embed\"\n\nexport type { CustomTypeModelBooleanField } from \"./types/model/boolean\"\nexport type { CustomTypeModelColorField } from \"./types/model/color\"\nexport type { CustomTypeModelDateField } from \"./types/model/date\"\nexport type { CustomTypeModelKeyTextField } from \"./types/model/keyText\"\nexport type { CustomTypeModelNumberField } from \"./types/model/number\"\nexport type { CustomTypeModelSelectField } from \"./types/model/select\"\nexport type { CustomTypeModelTimestampField } from \"./types/model/timestamp\"\nexport type { CustomTypeModelGeoPointField } from \"./types/model/geoPoint\"\nexport type { CustomTypeModelTableField } from \"./types/model/table\"\n\n/**\n * @deprecated Renamed to `CustomTypeModelIntegrationField`.\n */\n// TODO: Remove when we remove support for deprecated `CustomTypeModelIntegrationField` export.\ntype CustomTypeModelIntegrationFieldsField = CustomTypeModelIntegrationField\nexport {\n\tCustomTypeModelIntegrationField,\n\tCustomTypeModelIntegrationFieldsField,\n}\nexport type {\n\tCustomTypeModelGroupField,\n\tCustomTypeModelNestedGroupField,\n} from \"./types/model/group\"\nexport type {\n\tCustomTypeModelSliceZoneField,\n\tCustomTypeModelSliceLabel,\n\tCustomTypeModelSharedSlice,\n} from \"./types/model/sliceZone\"\nexport type {\n\tCustomTypeModelSlice,\n\tCustomTypeModelLegacySlice,\n} from \"./types/model/slice\"\nexport type { SharedSliceModel } from \"./types/model/sharedSlice\"\nexport type { SharedSliceModelVariation } from \"./types/model/sharedSliceVariation\"\n\nexport type { CustomTypeModelUIDField } from \"./types/model/uid\"\n\nexport type { CustomTypeModelRangeField } from \"./types/model/range\"\nexport type { CustomTypeModelSeparatorField } from \"./types/model/separator\"\n\nexport type {\n\tCustomTypeModelField,\n\tCustomTypeModelFieldForGroup,\n\tCustomTypeModelFieldForNestedGroup,\n\tCustomTypeModelFieldForSlicePrimary,\n} from \"./types/model/types\"\n\n// Migrations - Types representing Prismic Migration API content values.\nexport { PrismicMigrationDocument } from \"./types/migration/Document\"\nexport type {\n\tPendingPrismicDocument,\n\tExistingPrismicDocument,\n\tInjectMigrationSpecificTypes,\n} from \"./types/migration/Document\"\n\nexport { PrismicMigrationAsset } from \"./types/migration/Asset\"\nexport type {\n\tMigrationImage,\n\tMigrationLinkToMedia,\n\tMigrationRTImageNode,\n} from \"./types/migration/Asset\"\nexport type { MigrationContentRelationship } from \"./types/migration/ContentRelationship\"\n\n// API - Types representing Prismic Rest API V2 responses.\nexport type { Query } from \"./types/api/query\"\n\nexport type { Ref } from \"./types/api/ref\"\n\nexport type { Release } from \"./types/api/release\"\n\nexport type {\n\tRepository,\n\tLanguage,\n\tForm,\n\tFormField,\n} from \"./types/api/repository\"\n\nexport type { Tags } from \"./types/api/tags\"\n\n// Integration - Types representing Prismic's integration API.\nexport {\n\tIntegrationAPIItem,\n\tIntegrationAPIResults,\n} from \"./types/api/integration\"\n\n// Webhook - Types representing Prismic webhooks.\nexport { WebhookType } from \"./types/webhook/types\"\n\nexport type { WebhookBody } from \"./types/webhook/types\"\n\nexport type { WebhookBodyAPIUpdate } from \"./types/webhook/apiUpdate\"\n\nexport type { WebhookBodyTestTrigger } from \"./types/webhook/testTrigger\"\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,MAAM,YAAY;AA2ClB,MAAM,wBAAwB;AAiD9B,MAAM,UAAU;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["// Imports are used for deprecations.\nimport type { CustomTypeModelIntegrationField } from \"./types/model/integration\"\nimport type { IntegrationField } from \"./types/value/integration\"\nimport { RichTextNodeType } from \"./types/value/richText\"\n\nimport type {\n\tHTMLRichTextFunctionSerializer,\n\tHTMLRichTextMapSerializer,\n} from \"./helpers/asHTML\"\nimport { mapSliceZone } from \"./helpers/mapSliceZone\"\n\nimport { filter } from \"./filter\"\n\n//=============================================================================\n// Client - Query content from Prismic.\n//=============================================================================\n\n// Primary Client API.\nexport { createClient } from \"./createClient\"\nexport { Client } from \"./Client\"\n\n// Write Client API.\nexport { createWriteClient } from \"./createWriteClient\"\nexport { WriteClient } from \"./WriteClient\"\n\n// Migration helper.\nexport { createMigration } from \"./createMigration\"\nexport { Migration } from \"./Migration\"\n\n// API endpoint helpers.\nexport { getRepositoryEndpoint } from \"./getRepositoryEndpoint\"\nexport { getRepositoryName } from \"./getRepositoryName\"\nexport { getGraphQLEndpoint } from \"./getGraphQLEndpoint\"\nexport { isRepositoryName } from \"./isRepositoryName\"\nexport { isRepositoryEndpoint } from \"./isRepositoryEndpoint\"\nexport { buildQueryURL } from \"./buildQueryURL\"\n\n// Toolbar helpers.\nexport { getToolbarSrc } from \"./getToolbarSrc\"\n\n// Query filters API.\n/**\n * @deprecated Renamed to `filter`\n */\n// TODO: Remove when we remove support for deprecated `predicate` export.\nconst predicate = filter\nexport { filter, predicate }\n\n// A collection of well-known cookie names shared between Prismic libraries and systems.\nexport * as cookie from \"./cookie\"\n\n// General types used to query content from Prismic. These are made public to allow users to better type their projects.\nexport type { CreateClient } from \"./createClient\"\nexport type { ClientConfig, HttpRequestLike } from \"./Client\"\nexport type { CreateWriteClient } from \"./createWriteClient\"\nexport type { WriteClientConfig, MigrateReporterEvents } from \"./WriteClient\"\nexport type {\n\tBuildQueryURLArgs,\n\tOrdering,\n\tQueryParams,\n\tRoute,\n} from \"./buildQueryURL\"\nexport type { CreateMigration } from \"./createMigration\"\nexport type {\n\tAbortSignalLike,\n\tFetchLike,\n\tRequestInitLike,\n\tResponseLike,\n} from \"./lib/request\"\n\n//=============================================================================\n// Helpers - Manipulate content from Prismic.\n//=============================================================================\n\n// Primary Helpers API.\nexport { asDate } from \"./helpers/asDate\"\nexport { asLink } from \"./helpers/asLink\"\nexport { asLinkAttrs } from \"./helpers/asLinkAttrs\"\nexport { asText } from \"./helpers/asText\"\nexport { asHTML } from \"./helpers/asHTML\"\nexport { asImageSrc } from \"./helpers/asImageSrc\"\nexport { asImageWidthSrcSet } from \"./helpers/asImageWidthSrcSet\"\nexport { asImagePixelDensitySrcSet } from \"./helpers/asImagePixelDensitySrcSet\"\nexport * as isFilled from \"./helpers/isFilled\"\n\n/**\n * @deprecated Renamed to `mapSliceZone`\n */\nconst unstable_mapSliceZone = mapSliceZone\nexport { mapSliceZone, unstable_mapSliceZone }\n\n// Conversion helper.\nexport { documentToLinkField } from \"./helpers/documentToLinkField\"\n\nexport type { LinkResolverFunction } from \"./helpers/asLink\"\nexport type { AsLinkAttrsConfig } from \"./helpers/asLinkAttrs\"\nexport type { SliceMapper } from \"./helpers/mapSliceZone\"\n\n/**\n * @deprecated Renamed to `HTMLRichTextMapSerializer`\n */\ntype HTMLMapSerializer = HTMLRichTextMapSerializer\n/**\n * @deprecated Renamed to `HTMLRichTextFunctionSerializer`\n */\ntype HTMLFunctionSerializer = HTMLRichTextFunctionSerializer\nexport type {\n\tHTMLRichTextMapSerializer,\n\tHTMLRichTextFunctionSerializer,\n\tHTMLMapSerializer,\n\tHTMLFunctionSerializer,\n}\nexport type { HTMLRichTextSerializer } from \"./helpers/asHTML\"\n\n//=============================================================================\n// Errors - Custom errors for Prismic APIs.\n//=============================================================================\n\n// Client Errors\nexport { PrismicError } from \"./errors/PrismicError\"\nexport { ForbiddenError } from \"./errors/ForbiddenError\"\nexport { InvalidDataError } from \"./errors/InvalidDataError\"\nexport { NotFoundError } from \"./errors/NotFoundError\"\nexport { RefNotFoundError } from \"./errors/RefNotFoundError\"\nexport { RefExpiredError } from \"./errors/RefExpiredError\"\nexport { PreviewTokenExpiredError } from \"./errors/PreviewTokenExpired\"\nexport { ParsingError } from \"./errors/ParsingError\"\nexport { RepositoryNotFoundError } from \"./errors/RepositoryNotFoundError\"\n\n//=============================================================================\n// Types - Types representing Prismic content, models, and API payloads.\n//=============================================================================\n\n// Values - Types representing Prismic content.\n/**\n * @deprecated Use {@link RichTextNodeType} instead.\n */\n// TODO: Remove in v8.\nconst Element = RichTextNodeType\nexport { RichTextNodeType, Element }\nexport { LinkType } from \"./types/value/link\"\nexport { OEmbedType } from \"./types/value/embed\"\n\nexport type {\n\tPrismicDocument,\n\tPrismicDocumentWithUID,\n\tPrismicDocumentWithoutUID,\n\tPrismicDocumentHeader,\n\tAlternateLanguage,\n} from \"./types/value/document\"\n\nexport type {\n\t// RichText & Title\n\tRichTextField,\n\t// RichText & Title (block nodes)\n\tRTTextNodeBase,\n\tRTHeading1Node,\n\tRTHeading2Node,\n\tRTHeading3Node,\n\tRTHeading4Node,\n\tRTHeading5Node,\n\tRTHeading6Node,\n\tRTParagraphNode,\n\tRTPreformattedNode,\n\tRTListItemNode,\n\tRTOListItemNode,\n\t// RichText & Title (span nodes)\n\tRTSpanNodeBase,\n\tRTStrongNode,\n\tRTEmNode,\n\tRTLabelNode,\n\t// RichText & Title (media nodes)\n\tRTImageNode,\n\tRTEmbedNode,\n\t// RichText & Title (link nodes)\n\tRTLinkNode,\n\t// RichText & Title (serialization related nodes)\n\tRTListNode,\n\tRTOListNode,\n\tRTSpanNode,\n\t// RichText & Title (helpers)\n\tRTNode,\n\tRTTextNode,\n\tRTBlockNode,\n\tRTInlineNode,\n\tRTAnyNode,\n\tRichTextNodeTypes,\n} from \"./types/value/richText\"\nexport type { TitleField } from \"./types/value/title\"\n\nexport type {\n\tImageField,\n\tImageFieldImage,\n\tFilledImageFieldImage,\n\tEmptyImageFieldImage,\n} from \"./types/value/image\"\n\nexport type {\n\tEmptyLinkField,\n\tLinkField,\n\tFilledLinkToWebField,\n} from \"./types/value/link\"\nexport type {\n\tContentRelationshipField,\n\tFilledContentRelationshipField,\n} from \"./types/value/contentRelationship\"\nexport type {\n\tLinkToMediaField,\n\tFilledLinkToMediaField,\n} from \"./types/value/linkToMedia\"\n\nexport type {\n\tOEmbedExtra,\n\tPhotoOEmbed,\n\tVideoOEmbed,\n\tLinkOEmbed,\n\tRichOEmbed,\n\tAnyOEmbed,\n\tEmbedField,\n} from \"./types/value/embed\"\n\nexport type {\n\tTableField,\n\tTableFieldHead,\n\tTableFieldHeadRow,\n\tTableFieldBody,\n\tTableFieldBodyRow,\n\tTableFieldHeaderCell,\n\tTableFieldDataCell,\n} from \"./types/value/table\"\n\nexport type { BooleanField } from \"./types/value/boolean\"\nexport type { ColorField } from \"./types/value/color\"\nexport type { DateField } from \"./types/value/date\"\nexport type { KeyTextField } from \"./types/value/keyText\"\nexport type { NumberField } from \"./types/value/number\"\nexport type { SelectField } from \"./types/value/select\"\nexport type { TimestampField } from \"./types/value/timestamp\"\nexport type { GeoPointField } from \"./types/value/geoPoint\"\n\n/**\n * @deprecated Renamed to `IntegrationField`\n */\n// TODO: Remove when we remove support for deprecated `IntegrationFields` export.\ntype IntegrationFields = IntegrationField\nexport type { IntegrationField, IntegrationFields }\nexport type { IntegrationFieldData } from \"./types/value/integration\"\n\nexport type { GroupField, NestedGroupField } from \"./types/value/group\"\n\nexport type { SliceZone } from \"./types/value/sliceZone\"\nexport type { Slice } from \"./types/value/slice\"\nexport type { SharedSlice } from \"./types/value/sharedSlice\"\nexport type { SharedSliceVariation } from \"./types/value/sharedSliceVariation\"\n\nexport type {\n\tFieldState,\n\tAnyRegularField,\n\tAnySlicePrimaryField,\n\tRepeatable,\n} from \"./types/value/types\"\n\n// Models - Types representing Prismic content models.\nexport { CustomTypeModelFieldType } from \"./types/model/types\"\nexport { CustomTypeModelLinkSelectType } from \"./types/model/link\"\nexport { CustomTypeModelSliceType } from \"./types/model/sliceZone\"\nexport { CustomTypeModelSliceDisplay } from \"./types/model/slice\"\n\nexport type {\n\tCustomTypeModel,\n\tCustomTypeModelDefinition,\n\tCustomTypeModelTab,\n} from \"./types/model/customType\"\n\nexport type {\n\tCustomTypeModelRichTextField,\n\tCustomTypeModelRichTextMultiField,\n\tCustomTypeModelRichTextSingleField,\n} from \"./types/model/richText\"\nexport type { CustomTypeModelTitleField } from \"./types/model/title\"\n\nexport type {\n\tCustomTypeModelImageField,\n\tCustomTypeModelImageConstraint,\n\tCustomTypeModelImageThumbnail,\n} from \"./types/model/image\"\n\nexport type {\n\tCustomTypeModelFetchCustomTypeLevel1,\n\tCustomTypeModelFetchContentRelationshipLevel1,\n\tCustomTypeModelFetchGroupLevel1,\n\tCustomTypeModelFetchCustomTypeLevel2,\n\tCustomTypeModelFetchGroupLevel2,\n\tCustomTypeModelContentRelationshipField,\n} from \"./types/model/contentRelationship\"\nexport type { CustomTypeModelLinkField } from \"./types/model/link\"\nexport type { CustomTypeModelLinkToMediaField } from \"./types/model/linkToMedia\"\n\nexport type { CustomTypeModelEmbedField } from \"./types/model/embed\"\n\nexport type { CustomTypeModelBooleanField } from \"./types/model/boolean\"\nexport type { CustomTypeModelColorField } from \"./types/model/color\"\nexport type { CustomTypeModelDateField } from \"./types/model/date\"\nexport type { CustomTypeModelKeyTextField } from \"./types/model/keyText\"\nexport type { CustomTypeModelNumberField } from \"./types/model/number\"\nexport type { CustomTypeModelSelectField } from \"./types/model/select\"\nexport type { CustomTypeModelTimestampField } from \"./types/model/timestamp\"\nexport type { CustomTypeModelGeoPointField } from \"./types/model/geoPoint\"\nexport type { CustomTypeModelTableField } from \"./types/model/table\"\n\n/**\n * @deprecated Renamed to `CustomTypeModelIntegrationField`.\n */\n// TODO: Remove when we remove support for deprecated `CustomTypeModelIntegrationField` export.\ntype CustomTypeModelIntegrationFieldsField = CustomTypeModelIntegrationField\nexport {\n\tCustomTypeModelIntegrationField,\n\tCustomTypeModelIntegrationFieldsField,\n}\nexport type {\n\tCustomTypeModelGroupField,\n\tCustomTypeModelNestedGroupField,\n} from \"./types/model/group\"\nexport type {\n\tCustomTypeModelSliceZoneField,\n\tCustomTypeModelSliceLabel,\n\tCustomTypeModelSharedSlice,\n} from \"./types/model/sliceZone\"\nexport type {\n\tCustomTypeModelSlice,\n\tCustomTypeModelLegacySlice,\n} from \"./types/model/slice\"\nexport type { SharedSliceModel } from \"./types/model/sharedSlice\"\nexport type { SharedSliceModelVariation } from \"./types/model/sharedSliceVariation\"\n\nexport type { CustomTypeModelUIDField } from \"./types/model/uid\"\n\nexport type { CustomTypeModelRangeField } from \"./types/model/range\"\nexport type { CustomTypeModelSeparatorField } from \"./types/model/separator\"\n\nexport type {\n\tCustomTypeModelField,\n\tCustomTypeModelFieldForGroup,\n\tCustomTypeModelFieldForNestedGroup,\n\tCustomTypeModelFieldForSlicePrimary,\n} from \"./types/model/types\"\n\n// Migrations - Types representing Prismic Migration API content values.\nexport { PrismicMigrationDocument } from \"./types/migration/Document\"\nexport type {\n\tPendingPrismicDocument,\n\tExistingPrismicDocument,\n\tInjectMigrationSpecificTypes,\n} from \"./types/migration/Document\"\n\nexport { PrismicMigrationAsset } from \"./types/migration/Asset\"\nexport type {\n\tMigrationImage,\n\tMigrationLinkToMedia,\n\tMigrationRTImageNode,\n} from \"./types/migration/Asset\"\nexport type { MigrationContentRelationship } from \"./types/migration/ContentRelationship\"\n\n// API - Types representing Prismic Content API responses.\nexport type { Query } from \"./types/api/query\"\n\nexport type { Ref } from \"./types/api/ref\"\n\nexport type { Release } from \"./types/api/release\"\n\nexport type {\n\tRepository,\n\tLanguage,\n\tForm,\n\tFormField,\n} from \"./types/api/repository\"\n\nexport type { Tags } from \"./types/api/tags\"\n\n// Integration - Types representing Prismic's integration API.\nexport type {\n\tIntegrationAPIItem,\n\tIntegrationAPIResults,\n} from \"./types/api/integration\"\n\n// Webhook - Types representing Prismic webhooks.\nexport { WebhookType } from \"./types/webhook/types\"\n\nexport type { WebhookBody } from \"./types/webhook/types\"\n\nexport type { WebhookBodyAPIUpdate } from \"./types/webhook/apiUpdate\"\n\nexport type { WebhookBodyTestTrigger } from \"./types/webhook/testTrigger\"\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,MAAM,YAAY;AA2ClB,MAAM,wBAAwB;AAkD9B,MAAM,UAAU;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRepositoryEndpoint.cjs","sources":["../../src/isRepositoryEndpoint.ts"],"sourcesContent":["/**\n * Determines if a string
|
|
1
|
+
{"version":3,"file":"isRepositoryEndpoint.cjs","sources":["../../src/isRepositoryEndpoint.ts"],"sourcesContent":["/**\n * Determines if a string is a Prismic Content API endpoint. Note that any valid\n * URL is a valid endpoint to support network proxies.\n *\n * @param input - Input to test.\n *\n * @returns `true` if `input` is a valid Prismic Content API endpoint, `false`\n * otherwise.\n */\nexport const isRepositoryEndpoint = (input: string): boolean => {\n\ttry {\n\t\tnew URL(input)\n\n\t\treturn true\n\t} catch {\n\t\treturn false\n\t}\n}\n"],"names":[],"mappings":";;AASO,MAAM,uBAAuB,CAAC,UAA0B;AAC9D,MAAI;AACH,QAAI,IAAI,KAAK;AAEb,WAAO;AAAA,EACR,QAAQ;AACP,WAAO;AAAA,EACR;AACD;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Determines if a string
|
|
2
|
+
* Determines if a string is a Prismic Content API endpoint. Note that any valid
|
|
3
3
|
* URL is a valid endpoint to support network proxies.
|
|
4
4
|
*
|
|
5
5
|
* @param input - Input to test.
|
|
6
6
|
*
|
|
7
|
-
* @returns `true` if `input` is a valid Prismic
|
|
7
|
+
* @returns `true` if `input` is a valid Prismic Content API endpoint, `false`
|
|
8
8
|
* otherwise.
|
|
9
9
|
*/
|
|
10
10
|
export declare const isRepositoryEndpoint: (input: string) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRepositoryEndpoint.js","sources":["../../src/isRepositoryEndpoint.ts"],"sourcesContent":["/**\n * Determines if a string
|
|
1
|
+
{"version":3,"file":"isRepositoryEndpoint.js","sources":["../../src/isRepositoryEndpoint.ts"],"sourcesContent":["/**\n * Determines if a string is a Prismic Content API endpoint. Note that any valid\n * URL is a valid endpoint to support network proxies.\n *\n * @param input - Input to test.\n *\n * @returns `true` if `input` is a valid Prismic Content API endpoint, `false`\n * otherwise.\n */\nexport const isRepositoryEndpoint = (input: string): boolean => {\n\ttry {\n\t\tnew URL(input)\n\n\t\treturn true\n\t} catch {\n\t\treturn false\n\t}\n}\n"],"names":[],"mappings":"AASO,MAAM,uBAAuB,CAAC,UAA0B;AAC9D,MAAI;AACH,QAAI,IAAI,KAAK;AAEb,WAAO;AAAA,EACR,QAAQ;AACP,WAAO;AAAA,EACR;AACD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRepositoryName.cjs","sources":["../../src/isRepositoryName.ts"],"sourcesContent":["/**\n * Determines if an input is a valid Prismic repository name.\n *\n * @param input - Input to test.\n *\n * @returns `true` if `input` is a valid Prismic repository name, `false`\n * otherwise.\n */\nexport const isRepositoryName = (input: string): boolean => {\n\treturn /^[a-zA-Z0-9][-a-zA-Z0-9]{2,}[a-zA-Z0-9]$/.test(input)\n}\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"isRepositoryName.cjs","sources":["../../src/isRepositoryName.ts"],"sourcesContent":["/**\n * Determines if an input is a valid Prismic repository name.\n *\n * @param input - Input to test.\n *\n * @returns `true` if `input` is a valid Prismic repository name, `false`\n * otherwise.\n */\nexport const isRepositoryName = (input: string): boolean => {\n\treturn /^[a-zA-Z0-9][-a-zA-Z0-9]{2,}[a-zA-Z0-9]$/.test(input)\n}\n"],"names":[],"mappings":";;AAQO,MAAM,mBAAmB,CAAC,UAA0B;AAC1D,SAAO,2CAA2C,KAAK,KAAK;AAC7D;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRepositoryName.js","sources":["../../src/isRepositoryName.ts"],"sourcesContent":["/**\n * Determines if an input is a valid Prismic repository name.\n *\n * @param input - Input to test.\n *\n * @returns `true` if `input` is a valid Prismic repository name, `false`\n * otherwise.\n */\nexport const isRepositoryName = (input: string): boolean => {\n\treturn /^[a-zA-Z0-9][-a-zA-Z0-9]{2,}[a-zA-Z0-9]$/.test(input)\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isRepositoryName.js","sources":["../../src/isRepositoryName.ts"],"sourcesContent":["/**\n * Determines if an input is a valid Prismic repository name.\n *\n * @param input - Input to test.\n *\n * @returns `true` if `input` is a valid Prismic repository name, `false`\n * otherwise.\n */\nexport const isRepositoryName = (input: string): boolean => {\n\treturn /^[a-zA-Z0-9][-a-zA-Z0-9]{2,}[a-zA-Z0-9]$/.test(input)\n}\n"],"names":[],"mappings":"AAQO,MAAM,mBAAmB,CAAC,UAA0B;AAC1D,SAAO,2CAA2C,KAAK,KAAK;AAC7D;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appendFilters.cjs","sources":["../../../src/lib/appendFilters.ts"],"sourcesContent":["import { castArray } from \"./castArray\"\n\ninterface WithFilters {\n\tfilters?: string | string[]\n}\n\n/**\n * Adds one or more filters to an object with a `filters` property. Appended\n * filters are added to the end of the existing list.\n *\n * @typeParam T - Object to which filters will be append.\n *\n * @param objWithFilters - Object to append filters on the `filters` property.\n * @param filters - One or more filters to append.\n *\n * @returns The object with the appended filters.\n */\nexport const appendFilters = <T extends WithFilters>(\n\tobjWithFilters: T = {} as T,\n\tfilters: string | string[],\n): T & { filters: string[] } => {\n\treturn {\n\t\t...objWithFilters,\n\t\tfilters: [...(objWithFilters.filters || []), ...castArray(filters)],\n\t}\n}\n"],"names":["castArray"],"mappings":";;;AAiBO,MAAM,gBAAgB,CAC5B,iBAAoB,
|
|
1
|
+
{"version":3,"file":"appendFilters.cjs","sources":["../../../src/lib/appendFilters.ts"],"sourcesContent":["import { castArray } from \"./castArray\"\n\ninterface WithFilters {\n\tfilters?: string | string[]\n}\n\n/**\n * Adds one or more filters to an object with a `filters` property. Appended\n * filters are added to the end of the existing list.\n *\n * @typeParam T - Object to which filters will be append.\n *\n * @param objWithFilters - Object to append filters on the `filters` property.\n * @param filters - One or more filters to append.\n *\n * @returns The object with the appended filters.\n */\nexport const appendFilters = <T extends WithFilters>(\n\tobjWithFilters: T = {} as T,\n\tfilters: string | string[],\n): T & { filters: string[] } => {\n\treturn {\n\t\t...objWithFilters,\n\t\tfilters: [...(objWithFilters.filters || []), ...castArray(filters)],\n\t}\n}\n"],"names":["castArray"],"mappings":";;;AAiBO,MAAM,gBAAgB,CAC5B,iBAAoB,CAAA,GACpB,YAC8B;AAC9B,SAAO;AAAA,IACN,GAAG;AAAA,IACH,SAAS,CAAC,GAAI,eAAe,WAAW,CAAA,GAAK,GAAGA,UAAAA,UAAU,OAAO,CAAC;AAAA,EAAA;AAEpE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appendFilters.js","sources":["../../../src/lib/appendFilters.ts"],"sourcesContent":["import { castArray } from \"./castArray\"\n\ninterface WithFilters {\n\tfilters?: string | string[]\n}\n\n/**\n * Adds one or more filters to an object with a `filters` property. Appended\n * filters are added to the end of the existing list.\n *\n * @typeParam T - Object to which filters will be append.\n *\n * @param objWithFilters - Object to append filters on the `filters` property.\n * @param filters - One or more filters to append.\n *\n * @returns The object with the appended filters.\n */\nexport const appendFilters = <T extends WithFilters>(\n\tobjWithFilters: T = {} as T,\n\tfilters: string | string[],\n): T & { filters: string[] } => {\n\treturn {\n\t\t...objWithFilters,\n\t\tfilters: [...(objWithFilters.filters || []), ...castArray(filters)],\n\t}\n}\n"],"names":[],"mappings":";AAiBO,MAAM,gBAAgB,CAC5B,iBAAoB,
|
|
1
|
+
{"version":3,"file":"appendFilters.js","sources":["../../../src/lib/appendFilters.ts"],"sourcesContent":["import { castArray } from \"./castArray\"\n\ninterface WithFilters {\n\tfilters?: string | string[]\n}\n\n/**\n * Adds one or more filters to an object with a `filters` property. Appended\n * filters are added to the end of the existing list.\n *\n * @typeParam T - Object to which filters will be append.\n *\n * @param objWithFilters - Object to append filters on the `filters` property.\n * @param filters - One or more filters to append.\n *\n * @returns The object with the appended filters.\n */\nexport const appendFilters = <T extends WithFilters>(\n\tobjWithFilters: T = {} as T,\n\tfilters: string | string[],\n): T & { filters: string[] } => {\n\treturn {\n\t\t...objWithFilters,\n\t\tfilters: [...(objWithFilters.filters || []), ...castArray(filters)],\n\t}\n}\n"],"names":[],"mappings":";AAiBO,MAAM,gBAAgB,CAC5B,iBAAoB,CAAA,GACpB,YAC8B;AAC9B,SAAO;AAAA,IACN,GAAG;AAAA,IACH,SAAS,CAAC,GAAI,eAAe,WAAW,CAAA,GAAK,GAAG,UAAU,OAAO,CAAC;AAAA,EAAA;AAEpE;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"castArray.cjs","sources":["../../../src/lib/castArray.ts"],"sourcesContent":["/**\n * Ensures that a value is an array. If it is already an array, it is returned\n * as is. If it is not an array, it is converted to an array with itself as its\n * only element.\n *\n * @typeParam A - Element of the array.\n *\n * @param a - Value to ensure is an array.\n *\n * @returns `a` as an array.\n */\nexport const castArray = <A>(a: A | A[]): A[] => {\n\treturn Array.isArray(a) ? a : [a]\n}\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"castArray.cjs","sources":["../../../src/lib/castArray.ts"],"sourcesContent":["/**\n * Ensures that a value is an array. If it is already an array, it is returned\n * as is. If it is not an array, it is converted to an array with itself as its\n * only element.\n *\n * @typeParam A - Element of the array.\n *\n * @param a - Value to ensure is an array.\n *\n * @returns `a` as an array.\n */\nexport const castArray = <A>(a: A | A[]): A[] => {\n\treturn Array.isArray(a) ? a : [a]\n}\n"],"names":[],"mappings":";;AAWO,MAAM,YAAY,CAAI,MAAmB;AAC/C,SAAO,MAAM,QAAQ,CAAC,IAAI,IAAI,CAAC,CAAC;AACjC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"castArray.js","sources":["../../../src/lib/castArray.ts"],"sourcesContent":["/**\n * Ensures that a value is an array. If it is already an array, it is returned\n * as is. If it is not an array, it is converted to an array with itself as its\n * only element.\n *\n * @typeParam A - Element of the array.\n *\n * @param a - Value to ensure is an array.\n *\n * @returns `a` as an array.\n */\nexport const castArray = <A>(a: A | A[]): A[] => {\n\treturn Array.isArray(a) ? a : [a]\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"castArray.js","sources":["../../../src/lib/castArray.ts"],"sourcesContent":["/**\n * Ensures that a value is an array. If it is already an array, it is returned\n * as is. If it is not an array, it is converted to an array with itself as its\n * only element.\n *\n * @typeParam A - Element of the array.\n *\n * @param a - Value to ensure is an array.\n *\n * @returns `a` as an array.\n */\nexport const castArray = <A>(a: A | A[]): A[] => {\n\treturn Array.isArray(a) ? a : [a]\n}\n"],"names":[],"mappings":"AAWO,MAAM,YAAY,CAAI,MAAmB;AAC/C,SAAO,MAAM,QAAQ,CAAC,IAAI,IAAI,CAAC,CAAC;AACjC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"castThunk.cjs","sources":["../../../src/lib/castThunk.ts"],"sourcesContent":["/**\n * Ensures that a value is a thunk. If it is already a thunk, it is returned as\n * is. If it is not a thunk, it is converted to a thunk.\n *\n * @typeParam A - Value returned by the thunk.\n *\n * @param a - Value to ensure is a thunk.\n *\n * @returns `a` as a a thunk.\n */\nexport const castThunk = <A>(a: A | (() => A)): (() => A) => {\n\treturn typeof a === \"function\" ? (a as () => A) : () => a\n}\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"castThunk.cjs","sources":["../../../src/lib/castThunk.ts"],"sourcesContent":["/**\n * Ensures that a value is a thunk. If it is already a thunk, it is returned as\n * is. If it is not a thunk, it is converted to a thunk.\n *\n * @typeParam A - Value returned by the thunk.\n *\n * @param a - Value to ensure is a thunk.\n *\n * @returns `a` as a a thunk.\n */\nexport const castThunk = <A>(a: A | (() => A)): (() => A) => {\n\treturn typeof a === \"function\" ? (a as () => A) : () => a\n}\n"],"names":[],"mappings":";;AAUO,MAAM,YAAY,CAAI,MAA+B;AAC3D,SAAO,OAAO,MAAM,aAAc,IAAgB,MAAM;AACzD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"castThunk.js","sources":["../../../src/lib/castThunk.ts"],"sourcesContent":["/**\n * Ensures that a value is a thunk. If it is already a thunk, it is returned as\n * is. If it is not a thunk, it is converted to a thunk.\n *\n * @typeParam A - Value returned by the thunk.\n *\n * @param a - Value to ensure is a thunk.\n *\n * @returns `a` as a a thunk.\n */\nexport const castThunk = <A>(a: A | (() => A)): (() => A) => {\n\treturn typeof a === \"function\" ? (a as () => A) : () => a\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"castThunk.js","sources":["../../../src/lib/castThunk.ts"],"sourcesContent":["/**\n * Ensures that a value is a thunk. If it is already a thunk, it is returned as\n * is. If it is not a thunk, it is converted to a thunk.\n *\n * @typeParam A - Value returned by the thunk.\n *\n * @param a - Value to ensure is a thunk.\n *\n * @returns `a` as a a thunk.\n */\nexport const castThunk = <A>(a: A | (() => A)): (() => A) => {\n\treturn typeof a === \"function\" ? (a as () => A) : () => a\n}\n"],"names":[],"mappings":"AAUO,MAAM,YAAY,CAAI,MAA+B;AAC3D,SAAO,OAAO,MAAM,aAAc,IAAgB,MAAM;AACzD;"}
|
package/dist/lib/devMsg.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devMsg.cjs","sources":["../../../src/lib/devMsg.ts"],"sourcesContent":["import { version } from \"../../package.json\"\n\n/**\n * Returns a `prismic.dev/msg` URL for a given message slug.\n *\n * @example\n *\n * ```ts\n * devMsg(\"missing-param\")\n * // => \"https://prismic.dev/msg/client/v1.2.3/missing-param.md\"\n * ```\n *\n * @param slug - Slug for the message. This corresponds to a Markdown file in\n * the Git repository's `/messages` directory.\n *\n * @returns The `prismic.dev/msg` URL for the given slug.\n */\nexport const devMsg = (slug: string): string => {\n\treturn `https://prismic.dev/msg/client/v${version}/${slug}`\n}\n"],"names":["version"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"devMsg.cjs","sources":["../../../src/lib/devMsg.ts"],"sourcesContent":["import { version } from \"../../package.json\"\n\n/**\n * Returns a `prismic.dev/msg` URL for a given message slug.\n *\n * @example\n *\n * ```ts\n * devMsg(\"missing-param\")\n * // => \"https://prismic.dev/msg/client/v1.2.3/missing-param.md\"\n * ```\n *\n * @param slug - Slug for the message. This corresponds to a Markdown file in\n * the Git repository's `/messages` directory.\n *\n * @returns The `prismic.dev/msg` URL for the given slug.\n */\nexport const devMsg = (slug: string): string => {\n\treturn `https://prismic.dev/msg/client/v${version}/${slug}`\n}\n"],"names":["version"],"mappings":";;;AAiBO,MAAM,SAAS,CAAC,SAAwB;AAC9C,SAAO,mCAAmCA,SAAAA,OAAO,IAAI,IAAI;AAC1D;;"}
|
package/dist/lib/devMsg.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devMsg.js","sources":["../../../src/lib/devMsg.ts"],"sourcesContent":["import { version } from \"../../package.json\"\n\n/**\n * Returns a `prismic.dev/msg` URL for a given message slug.\n *\n * @example\n *\n * ```ts\n * devMsg(\"missing-param\")\n * // => \"https://prismic.dev/msg/client/v1.2.3/missing-param.md\"\n * ```\n *\n * @param slug - Slug for the message. This corresponds to a Markdown file in\n * the Git repository's `/messages` directory.\n *\n * @returns The `prismic.dev/msg` URL for the given slug.\n */\nexport const devMsg = (slug: string): string => {\n\treturn `https://prismic.dev/msg/client/v${version}/${slug}`\n}\n"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"devMsg.js","sources":["../../../src/lib/devMsg.ts"],"sourcesContent":["import { version } from \"../../package.json\"\n\n/**\n * Returns a `prismic.dev/msg` URL for a given message slug.\n *\n * @example\n *\n * ```ts\n * devMsg(\"missing-param\")\n * // => \"https://prismic.dev/msg/client/v1.2.3/missing-param.md\"\n * ```\n *\n * @param slug - Slug for the message. This corresponds to a Markdown file in\n * the Git repository's `/messages` directory.\n *\n * @returns The `prismic.dev/msg` URL for the given slug.\n */\nexport const devMsg = (slug: string): string => {\n\treturn `https://prismic.dev/msg/client/v${version}/${slug}`\n}\n"],"names":[],"mappings":";AAiBO,MAAM,SAAS,CAAC,SAAwB;AAC9C,SAAO,mCAAmC,OAAO,IAAI,IAAI;AAC1D;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"escapeHTML.cjs","sources":["../../../src/lib/escapeHTML.ts"],"sourcesContent":["/*\n ** Core logic from https://github.com/component/escape-html\n ** Many thanks to @component\n */\n\nconst matchHtmlRegExp = /[\"'&<>]/\n\nexport const escapeHTML = (string?: string | null): string => {\n\tconst str = \"\" + string\n\tconst match = matchHtmlRegExp.exec(str)\n\n\tif (!match) {\n\t\treturn str\n\t}\n\n\tlet escape\n\tlet html = \"\"\n\tlet index = 0\n\tlet lastIndex = 0\n\n\tfor (index = match.index; index < str.length; index++) {\n\t\tswitch (str.charCodeAt(index)) {\n\t\t\tcase 34: // \"\n\t\t\t\tescape = \""\"\n\t\t\t\tbreak\n\t\t\tcase 38: // &\n\t\t\t\tescape = \"&\"\n\t\t\t\tbreak\n\t\t\tcase 39: // '\n\t\t\t\tescape = \"'\"\n\t\t\t\tbreak\n\t\t\tcase 60: // <\n\t\t\t\tescape = \"<\"\n\t\t\t\tbreak\n\t\t\tcase 62: // >\n\t\t\t\tescape = \">\"\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\t\tcontinue\n\t\t}\n\n\t\tif (lastIndex !== index) {\n\t\t\thtml += str.substring(lastIndex, index)\n\t\t}\n\n\t\tlastIndex = index + 1\n\t\thtml += escape\n\t}\n\n\treturn lastIndex !== index ? html + str.substring(lastIndex, index) : html\n}\n"],"names":[],"mappings":";;AAKA,MAAM,kBAAkB;
|
|
1
|
+
{"version":3,"file":"escapeHTML.cjs","sources":["../../../src/lib/escapeHTML.ts"],"sourcesContent":["/*\n ** Core logic from https://github.com/component/escape-html\n ** Many thanks to @component\n */\n\nconst matchHtmlRegExp = /[\"'&<>]/\n\nexport const escapeHTML = (string?: string | null): string => {\n\tconst str = \"\" + string\n\tconst match = matchHtmlRegExp.exec(str)\n\n\tif (!match) {\n\t\treturn str\n\t}\n\n\tlet escape\n\tlet html = \"\"\n\tlet index = 0\n\tlet lastIndex = 0\n\n\tfor (index = match.index; index < str.length; index++) {\n\t\tswitch (str.charCodeAt(index)) {\n\t\t\tcase 34: // \"\n\t\t\t\tescape = \""\"\n\t\t\t\tbreak\n\t\t\tcase 38: // &\n\t\t\t\tescape = \"&\"\n\t\t\t\tbreak\n\t\t\tcase 39: // '\n\t\t\t\tescape = \"'\"\n\t\t\t\tbreak\n\t\t\tcase 60: // <\n\t\t\t\tescape = \"<\"\n\t\t\t\tbreak\n\t\t\tcase 62: // >\n\t\t\t\tescape = \">\"\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\t\tcontinue\n\t\t}\n\n\t\tif (lastIndex !== index) {\n\t\t\thtml += str.substring(lastIndex, index)\n\t\t}\n\n\t\tlastIndex = index + 1\n\t\thtml += escape\n\t}\n\n\treturn lastIndex !== index ? html + str.substring(lastIndex, index) : html\n}\n"],"names":[],"mappings":";;AAKA,MAAM,kBAAkB;AAEjB,MAAM,aAAa,CAAC,WAAkC;AAC5D,QAAM,MAAM,KAAK;AACjB,QAAM,QAAQ,gBAAgB,KAAK,GAAG;AAEtC,MAAI,CAAC,OAAO;AACX,WAAO;AAAA,EACR;AAEA,MAAI;AACJ,MAAI,OAAO;AACX,MAAI,QAAQ;AACZ,MAAI,YAAY;AAEhB,OAAK,QAAQ,MAAM,OAAO,QAAQ,IAAI,QAAQ,SAAS;AACtD,YAAQ,IAAI,WAAW,KAAK,GAAA;AAAA,MAC3B,KAAK;AACJ,iBAAS;AACT;AAAA,MACD,KAAK;AACJ,iBAAS;AACT;AAAA,MACD,KAAK;AACJ,iBAAS;AACT;AAAA,MACD,KAAK;AACJ,iBAAS;AACT;AAAA,MACD,KAAK;AACJ,iBAAS;AACT;AAAA,MACD;AACC;AAAA,IAAA;AAGF,QAAI,cAAc,OAAO;AACxB,cAAQ,IAAI,UAAU,WAAW,KAAK;AAAA,IACvC;AAEA,gBAAY,QAAQ;AACpB,YAAQ;AAAA,EACT;AAEA,SAAO,cAAc,QAAQ,OAAO,IAAI,UAAU,WAAW,KAAK,IAAI;AACvE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"escapeHTML.js","sources":["../../../src/lib/escapeHTML.ts"],"sourcesContent":["/*\n ** Core logic from https://github.com/component/escape-html\n ** Many thanks to @component\n */\n\nconst matchHtmlRegExp = /[\"'&<>]/\n\nexport const escapeHTML = (string?: string | null): string => {\n\tconst str = \"\" + string\n\tconst match = matchHtmlRegExp.exec(str)\n\n\tif (!match) {\n\t\treturn str\n\t}\n\n\tlet escape\n\tlet html = \"\"\n\tlet index = 0\n\tlet lastIndex = 0\n\n\tfor (index = match.index; index < str.length; index++) {\n\t\tswitch (str.charCodeAt(index)) {\n\t\t\tcase 34: // \"\n\t\t\t\tescape = \""\"\n\t\t\t\tbreak\n\t\t\tcase 38: // &\n\t\t\t\tescape = \"&\"\n\t\t\t\tbreak\n\t\t\tcase 39: // '\n\t\t\t\tescape = \"'\"\n\t\t\t\tbreak\n\t\t\tcase 60: // <\n\t\t\t\tescape = \"<\"\n\t\t\t\tbreak\n\t\t\tcase 62: // >\n\t\t\t\tescape = \">\"\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\t\tcontinue\n\t\t}\n\n\t\tif (lastIndex !== index) {\n\t\t\thtml += str.substring(lastIndex, index)\n\t\t}\n\n\t\tlastIndex = index + 1\n\t\thtml += escape\n\t}\n\n\treturn lastIndex !== index ? html + str.substring(lastIndex, index) : html\n}\n"],"names":[],"mappings":"AAKA,MAAM,kBAAkB;
|
|
1
|
+
{"version":3,"file":"escapeHTML.js","sources":["../../../src/lib/escapeHTML.ts"],"sourcesContent":["/*\n ** Core logic from https://github.com/component/escape-html\n ** Many thanks to @component\n */\n\nconst matchHtmlRegExp = /[\"'&<>]/\n\nexport const escapeHTML = (string?: string | null): string => {\n\tconst str = \"\" + string\n\tconst match = matchHtmlRegExp.exec(str)\n\n\tif (!match) {\n\t\treturn str\n\t}\n\n\tlet escape\n\tlet html = \"\"\n\tlet index = 0\n\tlet lastIndex = 0\n\n\tfor (index = match.index; index < str.length; index++) {\n\t\tswitch (str.charCodeAt(index)) {\n\t\t\tcase 34: // \"\n\t\t\t\tescape = \""\"\n\t\t\t\tbreak\n\t\t\tcase 38: // &\n\t\t\t\tescape = \"&\"\n\t\t\t\tbreak\n\t\t\tcase 39: // '\n\t\t\t\tescape = \"'\"\n\t\t\t\tbreak\n\t\t\tcase 60: // <\n\t\t\t\tescape = \"<\"\n\t\t\t\tbreak\n\t\t\tcase 62: // >\n\t\t\t\tescape = \">\"\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\t\tcontinue\n\t\t}\n\n\t\tif (lastIndex !== index) {\n\t\t\thtml += str.substring(lastIndex, index)\n\t\t}\n\n\t\tlastIndex = index + 1\n\t\thtml += escape\n\t}\n\n\treturn lastIndex !== index ? html + str.substring(lastIndex, index) : html\n}\n"],"names":[],"mappings":"AAKA,MAAM,kBAAkB;AAEjB,MAAM,aAAa,CAAC,WAAkC;AAC5D,QAAM,MAAM,KAAK;AACjB,QAAM,QAAQ,gBAAgB,KAAK,GAAG;AAEtC,MAAI,CAAC,OAAO;AACX,WAAO;AAAA,EACR;AAEA,MAAI;AACJ,MAAI,OAAO;AACX,MAAI,QAAQ;AACZ,MAAI,YAAY;AAEhB,OAAK,QAAQ,MAAM,OAAO,QAAQ,IAAI,QAAQ,SAAS;AACtD,YAAQ,IAAI,WAAW,KAAK,GAAA;AAAA,MAC3B,KAAK;AACJ,iBAAS;AACT;AAAA,MACD,KAAK;AACJ,iBAAS;AACT;AAAA,MACD,KAAK;AACJ,iBAAS;AACT;AAAA,MACD,KAAK;AACJ,iBAAS;AACT;AAAA,MACD,KAAK;AACJ,iBAAS;AACT;AAAA,MACD;AACC;AAAA,IAAA;AAGF,QAAI,cAAc,OAAO;AACxB,cAAQ,IAAI,UAAU,WAAW,KAAK;AAAA,IACvC;AAEA,gBAAY,QAAQ;AACpB,YAAQ;AAAA,EACT;AAEA,SAAO,cAAc,QAAQ,OAAO,IAAI,UAAU,WAAW,KAAK,IAAI;AACvE;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"everyTagFilter.cjs","sources":["../../../src/lib/everyTagFilter.ts"],"sourcesContent":["import { filter } from \"../filter\"\n\nimport { castArray } from \"./castArray\"\n\n/**\n * Creates a filter to filter content by document tags. All tags are required on\n * the document.\n *\n * @param tags - Document tags to filter queried content.\n *\n * @returns A filter that can be used in a Prismic REST API V2 request.\n */\nexport const everyTagFilter = (tags: string | string[]): string => {\n\treturn filter.at(\"document.tags\", castArray(tags))\n}\n"],"names":["filter","castArray"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"everyTagFilter.cjs","sources":["../../../src/lib/everyTagFilter.ts"],"sourcesContent":["import { filter } from \"../filter\"\n\nimport { castArray } from \"./castArray\"\n\n/**\n * Creates a filter to filter content by document tags. All tags are required on\n * the document.\n *\n * @param tags - Document tags to filter queried content.\n *\n * @returns A filter that can be used in a Prismic REST API V2 request.\n */\nexport const everyTagFilter = (tags: string | string[]): string => {\n\treturn filter.at(\"document.tags\", castArray(tags))\n}\n"],"names":["filter","castArray"],"mappings":";;;;AAYO,MAAM,iBAAiB,CAAC,SAAmC;AACjE,SAAOA,OAAAA,OAAO,GAAG,iBAAiBC,UAAAA,UAAU,IAAI,CAAC;AAClD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"everyTagFilter.js","sources":["../../../src/lib/everyTagFilter.ts"],"sourcesContent":["import { filter } from \"../filter\"\n\nimport { castArray } from \"./castArray\"\n\n/**\n * Creates a filter to filter content by document tags. All tags are required on\n * the document.\n *\n * @param tags - Document tags to filter queried content.\n *\n * @returns A filter that can be used in a Prismic REST API V2 request.\n */\nexport const everyTagFilter = (tags: string | string[]): string => {\n\treturn filter.at(\"document.tags\", castArray(tags))\n}\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"everyTagFilter.js","sources":["../../../src/lib/everyTagFilter.ts"],"sourcesContent":["import { filter } from \"../filter\"\n\nimport { castArray } from \"./castArray\"\n\n/**\n * Creates a filter to filter content by document tags. All tags are required on\n * the document.\n *\n * @param tags - Document tags to filter queried content.\n *\n * @returns A filter that can be used in a Prismic REST API V2 request.\n */\nexport const everyTagFilter = (tags: string | string[]): string => {\n\treturn filter.at(\"document.tags\", castArray(tags))\n}\n"],"names":[],"mappings":";;AAYO,MAAM,iBAAiB,CAAC,SAAmC;AACjE,SAAO,OAAO,GAAG,iBAAiB,UAAU,IAAI,CAAC;AAClD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findMasterRef.cjs","sources":["../../../src/lib/findMasterRef.ts"],"sourcesContent":["import type { Ref } from \"../types/api/ref\"\n\nimport { findRef } from \"./findRef\"\n\n/**\n * Returns the master ref from a list of given refs.\n *\n * @param refs - A list of refs to search.\n *\n * @returns The master ref from the list.\n *\n * @throws If a matching ref cannot be found.\n */\nexport const findMasterRef = (refs: Ref[]): Ref => {\n\treturn findRef(refs, (ref) => ref.isMasterRef)\n}\n"],"names":["findRef"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"findMasterRef.cjs","sources":["../../../src/lib/findMasterRef.ts"],"sourcesContent":["import type { Ref } from \"../types/api/ref\"\n\nimport { findRef } from \"./findRef\"\n\n/**\n * Returns the master ref from a list of given refs.\n *\n * @param refs - A list of refs to search.\n *\n * @returns The master ref from the list.\n *\n * @throws If a matching ref cannot be found.\n */\nexport const findMasterRef = (refs: Ref[]): Ref => {\n\treturn findRef(refs, (ref) => ref.isMasterRef)\n}\n"],"names":["findRef"],"mappings":";;;AAaO,MAAM,gBAAgB,CAAC,SAAoB;AACjD,SAAOA,QAAAA,QAAQ,MAAM,CAAC,QAAQ,IAAI,WAAW;AAC9C;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findMasterRef.js","sources":["../../../src/lib/findMasterRef.ts"],"sourcesContent":["import type { Ref } from \"../types/api/ref\"\n\nimport { findRef } from \"./findRef\"\n\n/**\n * Returns the master ref from a list of given refs.\n *\n * @param refs - A list of refs to search.\n *\n * @returns The master ref from the list.\n *\n * @throws If a matching ref cannot be found.\n */\nexport const findMasterRef = (refs: Ref[]): Ref => {\n\treturn findRef(refs, (ref) => ref.isMasterRef)\n}\n"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"findMasterRef.js","sources":["../../../src/lib/findMasterRef.ts"],"sourcesContent":["import type { Ref } from \"../types/api/ref\"\n\nimport { findRef } from \"./findRef\"\n\n/**\n * Returns the master ref from a list of given refs.\n *\n * @param refs - A list of refs to search.\n *\n * @returns The master ref from the list.\n *\n * @throws If a matching ref cannot be found.\n */\nexport const findMasterRef = (refs: Ref[]): Ref => {\n\treturn findRef(refs, (ref) => ref.isMasterRef)\n}\n"],"names":[],"mappings":";AAaO,MAAM,gBAAgB,CAAC,SAAoB;AACjD,SAAO,QAAQ,MAAM,CAAC,QAAQ,IAAI,WAAW;AAC9C;"}
|
package/dist/lib/findRef.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findRef.cjs","sources":["../../../src/lib/findRef.ts"],"sourcesContent":["import type { Ref } from \"../types/api/ref\"\n\nimport { PrismicError } from \"../errors/PrismicError\"\n\n/**\n * Returns the first ref from a list that passes a filter (a function that\n * returns true).\n *\n * @param refs - A list of refs to search.\n * @param filter - A function that determines if a ref from the list matches the\n * criteria.\n *\n * @returns The first matching ref.\n *\n * @throws If a matching ref cannot be found.\n */\nexport const findRef = (refs: Ref[], filter: (ref: Ref) => boolean): Ref => {\n\tconst ref = refs.find((ref) => filter(ref))\n\n\tif (!ref) {\n\t\tthrow new PrismicError(\"Ref could not be found.\", undefined, undefined)\n\t}\n\n\treturn ref\n}\n"],"names":["ref","PrismicError"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"findRef.cjs","sources":["../../../src/lib/findRef.ts"],"sourcesContent":["import type { Ref } from \"../types/api/ref\"\n\nimport { PrismicError } from \"../errors/PrismicError\"\n\n/**\n * Returns the first ref from a list that passes a filter (a function that\n * returns true).\n *\n * @param refs - A list of refs to search.\n * @param filter - A function that determines if a ref from the list matches the\n * criteria.\n *\n * @returns The first matching ref.\n *\n * @throws If a matching ref cannot be found.\n */\nexport const findRef = (refs: Ref[], filter: (ref: Ref) => boolean): Ref => {\n\tconst ref = refs.find((ref) => filter(ref))\n\n\tif (!ref) {\n\t\tthrow new PrismicError(\"Ref could not be found.\", undefined, undefined)\n\t}\n\n\treturn ref\n}\n"],"names":["ref","PrismicError"],"mappings":";;;AAgBO,MAAM,UAAU,CAAC,MAAa,WAAsC;AAC1E,QAAM,MAAM,KAAK,KAAK,CAACA,SAAQ,OAAOA,IAAG,CAAC;AAE1C,MAAI,CAAC,KAAK;AACT,UAAM,IAAIC,aAAAA,aAAa,2BAA2B,QAAW,MAAS;AAAA,EACvE;AAEA,SAAO;AACR;;"}
|
package/dist/lib/findRef.d.ts
CHANGED
package/dist/lib/findRef.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findRef.js","sources":["../../../src/lib/findRef.ts"],"sourcesContent":["import type { Ref } from \"../types/api/ref\"\n\nimport { PrismicError } from \"../errors/PrismicError\"\n\n/**\n * Returns the first ref from a list that passes a filter (a function that\n * returns true).\n *\n * @param refs - A list of refs to search.\n * @param filter - A function that determines if a ref from the list matches the\n * criteria.\n *\n * @returns The first matching ref.\n *\n * @throws If a matching ref cannot be found.\n */\nexport const findRef = (refs: Ref[], filter: (ref: Ref) => boolean): Ref => {\n\tconst ref = refs.find((ref) => filter(ref))\n\n\tif (!ref) {\n\t\tthrow new PrismicError(\"Ref could not be found.\", undefined, undefined)\n\t}\n\n\treturn ref\n}\n"],"names":["ref"],"mappings":";
|
|
1
|
+
{"version":3,"file":"findRef.js","sources":["../../../src/lib/findRef.ts"],"sourcesContent":["import type { Ref } from \"../types/api/ref\"\n\nimport { PrismicError } from \"../errors/PrismicError\"\n\n/**\n * Returns the first ref from a list that passes a filter (a function that\n * returns true).\n *\n * @param refs - A list of refs to search.\n * @param filter - A function that determines if a ref from the list matches the\n * criteria.\n *\n * @returns The first matching ref.\n *\n * @throws If a matching ref cannot be found.\n */\nexport const findRef = (refs: Ref[], filter: (ref: Ref) => boolean): Ref => {\n\tconst ref = refs.find((ref) => filter(ref))\n\n\tif (!ref) {\n\t\tthrow new PrismicError(\"Ref could not be found.\", undefined, undefined)\n\t}\n\n\treturn ref\n}\n"],"names":["ref"],"mappings":";AAgBO,MAAM,UAAU,CAAC,MAAa,WAAsC;AAC1E,QAAM,MAAM,KAAK,KAAK,CAACA,SAAQ,OAAOA,IAAG,CAAC;AAE1C,MAAI,CAAC,KAAK;AACT,UAAM,IAAI,aAAa,2BAA2B,QAAW,MAAS;AAAA,EACvE;AAEA,SAAO;AACR;"}
|