@prismicio/client 7.7.4 → 7.8.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/index.cjs +0 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.js +1 -9
- package/dist/index.js.map +1 -1
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.js +1 -1
- package/package.json +3 -15
- package/src/index.ts +0 -8
- package/dist/errors/PrismicRichTextError.cjs +0 -6
- package/dist/errors/PrismicRichTextError.cjs.map +0 -1
- package/dist/errors/PrismicRichTextError.d.ts +0 -2
- package/dist/errors/PrismicRichTextError.js +0 -6
- package/dist/errors/PrismicRichTextError.js.map +0 -1
- package/dist/errors/PrismicRichTextSerializerError.cjs +0 -7
- package/dist/errors/PrismicRichTextSerializerError.cjs.map +0 -1
- package/dist/errors/PrismicRichTextSerializerError.d.ts +0 -3
- package/dist/errors/PrismicRichTextSerializerError.js +0 -7
- package/dist/errors/PrismicRichTextSerializerError.js.map +0 -1
- package/dist/helpers/unstable_htmlAsRichText.cjs +0 -11
- package/dist/helpers/unstable_htmlAsRichText.cjs.map +0 -1
- package/dist/helpers/unstable_htmlAsRichText.d.ts +0 -81
- package/dist/helpers/unstable_htmlAsRichText.js +0 -11
- package/dist/helpers/unstable_htmlAsRichText.js.map +0 -1
- package/dist/helpers/unstable_markdownAsRichText.cjs +0 -12
- package/dist/helpers/unstable_markdownAsRichText.cjs.map +0 -1
- package/dist/helpers/unstable_markdownAsRichText.d.ts +0 -30
- package/dist/helpers/unstable_markdownAsRichText.js +0 -12
- package/dist/helpers/unstable_markdownAsRichText.js.map +0 -1
- package/dist/lib/RichTextFieldBuilder.cjs +0 -115
- package/dist/lib/RichTextFieldBuilder.cjs.map +0 -1
- package/dist/lib/RichTextFieldBuilder.d.ts +0 -35
- package/dist/lib/RichTextFieldBuilder.js +0 -115
- package/dist/lib/RichTextFieldBuilder.js.map +0 -1
- package/dist/lib/filterRichTextField.cjs +0 -88
- package/dist/lib/filterRichTextField.cjs.map +0 -1
- package/dist/lib/filterRichTextField.d.ts +0 -12
- package/dist/lib/filterRichTextField.js +0 -88
- package/dist/lib/filterRichTextField.js.map +0 -1
- package/dist/lib/hastSerializerHelpers.cjs +0 -96
- package/dist/lib/hastSerializerHelpers.cjs.map +0 -1
- package/dist/lib/hastSerializerHelpers.d.ts +0 -28
- package/dist/lib/hastSerializerHelpers.js +0 -96
- package/dist/lib/hastSerializerHelpers.js.map +0 -1
- package/dist/lib/hastToRichText.cjs +0 -164
- package/dist/lib/hastToRichText.cjs.map +0 -1
- package/dist/lib/hastToRichText.d.ts +0 -30
- package/dist/lib/hastToRichText.js +0 -164
- package/dist/lib/hastToRichText.js.map +0 -1
- package/dist/lib/rehypeRichText.cjs +0 -59
- package/dist/lib/rehypeRichText.cjs.map +0 -1
- package/dist/lib/rehypeRichText.d.ts +0 -66
- package/dist/lib/rehypeRichText.js +0 -59
- package/dist/lib/rehypeRichText.js.map +0 -1
- package/src/errors/PrismicRichTextError.ts +0 -1
- package/src/errors/PrismicRichTextSerializerError.ts +0 -3
- package/src/helpers/unstable_htmlAsRichText.ts +0 -122
- package/src/helpers/unstable_markdownAsRichText.ts +0 -53
- package/src/lib/RichTextFieldBuilder.ts +0 -164
- package/src/lib/filterRichTextField.ts +0 -159
- package/src/lib/hastSerializerHelpers.ts +0 -157
- package/src/lib/hastToRichText.ts +0 -295
- package/src/lib/rehypeRichText.ts +0 -184
package/dist/index.cjs
CHANGED
|
@@ -22,8 +22,6 @@ const asImageWidthSrcSet = require("./helpers/asImageWidthSrcSet.cjs");
|
|
|
22
22
|
const asImagePixelDensitySrcSet = require("./helpers/asImagePixelDensitySrcSet.cjs");
|
|
23
23
|
const isFilled = require("./helpers/isFilled.cjs");
|
|
24
24
|
const documentToLinkField = require("./helpers/documentToLinkField.cjs");
|
|
25
|
-
const unstable_htmlAsRichText = require("./helpers/unstable_htmlAsRichText.cjs");
|
|
26
|
-
const unstable_markdownAsRichText = require("./helpers/unstable_markdownAsRichText.cjs");
|
|
27
25
|
const PrismicError = require("./errors/PrismicError.cjs");
|
|
28
26
|
const ForbiddenError = require("./errors/ForbiddenError.cjs");
|
|
29
27
|
const NotFoundError = require("./errors/NotFoundError.cjs");
|
|
@@ -32,8 +30,6 @@ const RefExpiredError = require("./errors/RefExpiredError.cjs");
|
|
|
32
30
|
const PreviewTokenExpired = require("./errors/PreviewTokenExpired.cjs");
|
|
33
31
|
const ParsingError = require("./errors/ParsingError.cjs");
|
|
34
32
|
const RepositoryNotFoundError = require("./errors/RepositoryNotFoundError.cjs");
|
|
35
|
-
const PrismicRichTextError = require("./errors/PrismicRichTextError.cjs");
|
|
36
|
-
const PrismicRichTextSerializerError = require("./errors/PrismicRichTextSerializerError.cjs");
|
|
37
33
|
const link = require("./types/value/link.cjs");
|
|
38
34
|
const embed = require("./types/value/embed.cjs");
|
|
39
35
|
const types = require("./types/model/types.cjs");
|
|
@@ -67,8 +63,6 @@ exports.asImageWidthSrcSet = asImageWidthSrcSet.asImageWidthSrcSet;
|
|
|
67
63
|
exports.asImagePixelDensitySrcSet = asImagePixelDensitySrcSet.asImagePixelDensitySrcSet;
|
|
68
64
|
exports.isFilled = isFilled;
|
|
69
65
|
exports.documentToLinkField = documentToLinkField.documentToLinkField;
|
|
70
|
-
exports.unstable_htmlAsRichText = unstable_htmlAsRichText.unstable_htmlAsRichText;
|
|
71
|
-
exports.unstable_markdownAsRichText = unstable_markdownAsRichText.unstable_markdownAsRichText;
|
|
72
66
|
exports.PrismicError = PrismicError.PrismicError;
|
|
73
67
|
exports.ForbiddenError = ForbiddenError.ForbiddenError;
|
|
74
68
|
exports.NotFoundError = NotFoundError.NotFoundError;
|
|
@@ -77,8 +71,6 @@ exports.RefExpiredError = RefExpiredError.RefExpiredError;
|
|
|
77
71
|
exports.PreviewTokenExpiredError = PreviewTokenExpired.PreviewTokenExpiredError;
|
|
78
72
|
exports.ParsingError = ParsingError.ParsingError;
|
|
79
73
|
exports.RepositoryNotFoundError = RepositoryNotFoundError.RepositoryNotFoundError;
|
|
80
|
-
exports.PrismicRichTextError = PrismicRichTextError.PrismicRichTextError;
|
|
81
|
-
exports.PrismicRichTextSerializerError = PrismicRichTextSerializerError.PrismicRichTextSerializerError;
|
|
82
74
|
exports.LinkType = link.LinkType;
|
|
83
75
|
exports.OEmbedType = embed.OEmbedType;
|
|
84
76
|
exports.CustomTypeModelFieldType = types.CustomTypeModelFieldType;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","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, Client } from \"./createClient\"\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 {\n\tAbortSignalLike,\n\tClientConfig,\n\tCreateClient,\n\tFetchLike,\n\tHttpRequestLike,\n\tRequestInitLike,\n\tResponseLike,\n} from \"./createClient\"\nexport type {\n\tBuildQueryURLArgs,\n\tOrdering,\n\tQueryParams,\n\tRoute,\n} from \"./buildQueryURL\"\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\"\nexport { unstable_htmlAsRichText } from \"./helpers/unstable_htmlAsRichText\"\nexport { unstable_markdownAsRichText } from \"./helpers/unstable_markdownAsRichText\"\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\nexport type { RichTextHTMLMapSerializer } from \"./helpers/unstable_htmlAsRichText\"\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// Rich Text Errors\nexport { PrismicRichTextError } from \"./errors/PrismicRichTextError\"\nexport { PrismicRichTextSerializerError } from \"./errors/PrismicRichTextSerializerError\"\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 { 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 { IntegrationField, IntegrationFields }\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} 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 { CustomTypeModelContentRelationshipField } 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\"\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// 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// 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":["filter","mapSliceZone","RichTextNodeType"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,YAAYA,OAAA;AAyClB,MAAM,wBAAwBC,aAAA;AAyD9B,MAAM,UAAUC,SAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.cjs","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, Client } from \"./createClient\"\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 {\n\tAbortSignalLike,\n\tClientConfig,\n\tCreateClient,\n\tFetchLike,\n\tHttpRequestLike,\n\tRequestInitLike,\n\tResponseLike,\n} from \"./createClient\"\nexport type {\n\tBuildQueryURLArgs,\n\tOrdering,\n\tQueryParams,\n\tRoute,\n} from \"./buildQueryURL\"\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 { 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 { IntegrationField, IntegrationFields }\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} 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 { CustomTypeModelContentRelationshipField } 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\"\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// 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// 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":["filter","mapSliceZone","RichTextNodeType"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,YAAYA,OAAA;AAyClB,MAAM,wBAAwBC,aAAA;AAiD9B,MAAM,UAAUC,SAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -64,8 +64,6 @@ export * as isFilled from "./helpers/isFilled";
|
|
|
64
64
|
declare const unstable_mapSliceZone: typeof mapSliceZone;
|
|
65
65
|
export { mapSliceZone, unstable_mapSliceZone };
|
|
66
66
|
export { documentToLinkField } from "./helpers/documentToLinkField";
|
|
67
|
-
export { unstable_htmlAsRichText } from "./helpers/unstable_htmlAsRichText";
|
|
68
|
-
export { unstable_markdownAsRichText } from "./helpers/unstable_markdownAsRichText";
|
|
69
67
|
export type { LinkResolverFunction } from "./helpers/asLink";
|
|
70
68
|
export type { AsLinkAttrsConfig } from "./helpers/asLinkAttrs";
|
|
71
69
|
export type { SliceMapper } from "./helpers/mapSliceZone";
|
|
@@ -79,7 +77,6 @@ type HTMLMapSerializer = HTMLRichTextMapSerializer;
|
|
|
79
77
|
type HTMLFunctionSerializer = HTMLRichTextFunctionSerializer;
|
|
80
78
|
export type { HTMLRichTextMapSerializer, HTMLRichTextFunctionSerializer, HTMLMapSerializer, HTMLFunctionSerializer, };
|
|
81
79
|
export type { HTMLRichTextSerializer } from "./helpers/asHTML";
|
|
82
|
-
export type { RichTextHTMLMapSerializer } from "./helpers/unstable_htmlAsRichText";
|
|
83
80
|
export { PrismicError } from "./errors/PrismicError";
|
|
84
81
|
export { ForbiddenError } from "./errors/ForbiddenError";
|
|
85
82
|
export { NotFoundError } from "./errors/NotFoundError";
|
|
@@ -88,8 +85,6 @@ export { RefExpiredError } from "./errors/RefExpiredError";
|
|
|
88
85
|
export { PreviewTokenExpiredError } from "./errors/PreviewTokenExpired";
|
|
89
86
|
export { ParsingError } from "./errors/ParsingError";
|
|
90
87
|
export { RepositoryNotFoundError } from "./errors/RepositoryNotFoundError";
|
|
91
|
-
export { PrismicRichTextError } from "./errors/PrismicRichTextError";
|
|
92
|
-
export { PrismicRichTextSerializerError } from "./errors/PrismicRichTextSerializerError";
|
|
93
88
|
/**
|
|
94
89
|
* @deprecated Use {@link RichTextNodeType} instead.
|
|
95
90
|
*/
|
package/dist/index.js
CHANGED
|
@@ -20,8 +20,6 @@ import { asImageWidthSrcSet } from "./helpers/asImageWidthSrcSet.js";
|
|
|
20
20
|
import { asImagePixelDensitySrcSet } from "./helpers/asImagePixelDensitySrcSet.js";
|
|
21
21
|
import * as isFilled from "./helpers/isFilled.js";
|
|
22
22
|
import { documentToLinkField } from "./helpers/documentToLinkField.js";
|
|
23
|
-
import { unstable_htmlAsRichText } from "./helpers/unstable_htmlAsRichText.js";
|
|
24
|
-
import { unstable_markdownAsRichText } from "./helpers/unstable_markdownAsRichText.js";
|
|
25
23
|
import { PrismicError } from "./errors/PrismicError.js";
|
|
26
24
|
import { ForbiddenError } from "./errors/ForbiddenError.js";
|
|
27
25
|
import { NotFoundError } from "./errors/NotFoundError.js";
|
|
@@ -30,8 +28,6 @@ import { RefExpiredError } from "./errors/RefExpiredError.js";
|
|
|
30
28
|
import { PreviewTokenExpiredError } from "./errors/PreviewTokenExpired.js";
|
|
31
29
|
import { ParsingError } from "./errors/ParsingError.js";
|
|
32
30
|
import { RepositoryNotFoundError } from "./errors/RepositoryNotFoundError.js";
|
|
33
|
-
import { PrismicRichTextError } from "./errors/PrismicRichTextError.js";
|
|
34
|
-
import { PrismicRichTextSerializerError } from "./errors/PrismicRichTextSerializerError.js";
|
|
35
31
|
import { LinkType } from "./types/value/link.js";
|
|
36
32
|
import { OEmbedType } from "./types/value/embed.js";
|
|
37
33
|
import { CustomTypeModelFieldType } from "./types/model/types.js";
|
|
@@ -56,8 +52,6 @@ export {
|
|
|
56
52
|
ParsingError,
|
|
57
53
|
PreviewTokenExpiredError,
|
|
58
54
|
PrismicError,
|
|
59
|
-
PrismicRichTextError,
|
|
60
|
-
PrismicRichTextSerializerError,
|
|
61
55
|
RefExpiredError,
|
|
62
56
|
RefNotFoundError,
|
|
63
57
|
RepositoryNotFoundError,
|
|
@@ -85,8 +79,6 @@ export {
|
|
|
85
79
|
isRepositoryName,
|
|
86
80
|
mapSliceZone,
|
|
87
81
|
predicate,
|
|
88
|
-
|
|
89
|
-
unstable_mapSliceZone,
|
|
90
|
-
unstable_markdownAsRichText
|
|
82
|
+
unstable_mapSliceZone
|
|
91
83
|
};
|
|
92
84
|
//# sourceMappingURL=index.js.map
|
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, Client } from \"./createClient\"\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 {\n\tAbortSignalLike,\n\tClientConfig,\n\tCreateClient,\n\tFetchLike,\n\tHttpRequestLike,\n\tRequestInitLike,\n\tResponseLike,\n} from \"./createClient\"\nexport type {\n\tBuildQueryURLArgs,\n\tOrdering,\n\tQueryParams,\n\tRoute,\n} from \"./buildQueryURL\"\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\"\nexport { unstable_htmlAsRichText } from \"./helpers/unstable_htmlAsRichText\"\nexport { unstable_markdownAsRichText } from \"./helpers/unstable_markdownAsRichText\"\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\nexport type { RichTextHTMLMapSerializer } from \"./helpers/unstable_htmlAsRichText\"\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// Rich Text Errors\nexport { PrismicRichTextError } from \"./errors/PrismicRichTextError\"\nexport { PrismicRichTextSerializerError } from \"./errors/PrismicRichTextSerializerError\"\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 { 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 { IntegrationField, IntegrationFields }\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} 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 { CustomTypeModelContentRelationshipField } 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\"\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// 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// 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,YAAY;AAyClB,MAAM,wBAAwB;AAyD9B,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, Client } from \"./createClient\"\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 {\n\tAbortSignalLike,\n\tClientConfig,\n\tCreateClient,\n\tFetchLike,\n\tHttpRequestLike,\n\tRequestInitLike,\n\tResponseLike,\n} from \"./createClient\"\nexport type {\n\tBuildQueryURLArgs,\n\tOrdering,\n\tQueryParams,\n\tRoute,\n} from \"./buildQueryURL\"\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 { 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 { IntegrationField, IntegrationFields }\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} 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 { CustomTypeModelContentRelationshipField } 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\"\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// 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// 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,YAAY;AAyClB,MAAM,wBAAwB;AAiD9B,MAAM,UAAU;"}
|
package/dist/package.json.cjs
CHANGED
package/dist/package.json.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prismicio/client",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.8.0",
|
|
4
4
|
"description": "The official JavaScript + TypeScript client library for Prismic",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -79,19 +79,7 @@
|
|
|
79
79
|
"test": "npm run lint && npm run types && npm run unit && npm run build && npm run size"
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"
|
|
83
|
-
"hast-util-select": "^6.0.2",
|
|
84
|
-
"hast-util-to-html": "^9.0.1",
|
|
85
|
-
"imgix-url-builder": "^0.0.5",
|
|
86
|
-
"mdast-util-to-string": "^4.0.0",
|
|
87
|
-
"rehype-minify-whitespace": "^6.0.0",
|
|
88
|
-
"rehype-parse": "^9.0.0",
|
|
89
|
-
"remark-parse": "^11.0.0",
|
|
90
|
-
"remark-rehype": "^11.1.0",
|
|
91
|
-
"unified": "^11.0.5",
|
|
92
|
-
"unist-util-remove": "^4.0.0",
|
|
93
|
-
"unist-util-visit": "^5.0.0",
|
|
94
|
-
"vfile": "^6.0.2"
|
|
82
|
+
"imgix-url-builder": "^0.0.5"
|
|
95
83
|
},
|
|
96
84
|
"devDependencies": {
|
|
97
85
|
"@prismicio/mock": "^0.3.7",
|
|
@@ -114,7 +102,7 @@
|
|
|
114
102
|
"standard-version": "^9.5.0",
|
|
115
103
|
"ts-expect": "^1.3.0",
|
|
116
104
|
"typescript": "^5.5.4",
|
|
117
|
-
"vite": "^5.3.
|
|
105
|
+
"vite": "^5.3.5",
|
|
118
106
|
"vite-plugin-sdk": "^0.1.2",
|
|
119
107
|
"vitest": "^2.0.4"
|
|
120
108
|
},
|
package/src/index.ts
CHANGED
|
@@ -80,8 +80,6 @@ export { mapSliceZone, unstable_mapSliceZone }
|
|
|
80
80
|
|
|
81
81
|
// Conversion helper.
|
|
82
82
|
export { documentToLinkField } from "./helpers/documentToLinkField"
|
|
83
|
-
export { unstable_htmlAsRichText } from "./helpers/unstable_htmlAsRichText"
|
|
84
|
-
export { unstable_markdownAsRichText } from "./helpers/unstable_markdownAsRichText"
|
|
85
83
|
|
|
86
84
|
export type { LinkResolverFunction } from "./helpers/asLink"
|
|
87
85
|
export type { AsLinkAttrsConfig } from "./helpers/asLinkAttrs"
|
|
@@ -103,8 +101,6 @@ export type {
|
|
|
103
101
|
}
|
|
104
102
|
export type { HTMLRichTextSerializer } from "./helpers/asHTML"
|
|
105
103
|
|
|
106
|
-
export type { RichTextHTMLMapSerializer } from "./helpers/unstable_htmlAsRichText"
|
|
107
|
-
|
|
108
104
|
//=============================================================================
|
|
109
105
|
// Errors - Custom errors for Prismic APIs.
|
|
110
106
|
//=============================================================================
|
|
@@ -119,10 +115,6 @@ export { PreviewTokenExpiredError } from "./errors/PreviewTokenExpired"
|
|
|
119
115
|
export { ParsingError } from "./errors/ParsingError"
|
|
120
116
|
export { RepositoryNotFoundError } from "./errors/RepositoryNotFoundError"
|
|
121
117
|
|
|
122
|
-
// Rich Text Errors
|
|
123
|
-
export { PrismicRichTextError } from "./errors/PrismicRichTextError"
|
|
124
|
-
export { PrismicRichTextSerializerError } from "./errors/PrismicRichTextSerializerError"
|
|
125
|
-
|
|
126
118
|
//=============================================================================
|
|
127
119
|
// Types - Types representing Prismic content, models, and API payloads.
|
|
128
120
|
//=============================================================================
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PrismicRichTextError.cjs","sources":["../../../src/errors/PrismicRichTextError.ts"],"sourcesContent":["export class PrismicRichTextError extends Error {}\n"],"names":[],"mappings":";;AAAM,MAAO,6BAA6B,MAAK;AAAG;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PrismicRichTextError.js","sources":["../../../src/errors/PrismicRichTextError.ts"],"sourcesContent":["export class PrismicRichTextError extends Error {}\n"],"names":[],"mappings":"AAAM,MAAO,6BAA6B,MAAK;AAAG;"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const PrismicRichTextError = require("./PrismicRichTextError.cjs");
|
|
4
|
-
class PrismicRichTextSerializerError extends PrismicRichTextError.PrismicRichTextError {
|
|
5
|
-
}
|
|
6
|
-
exports.PrismicRichTextSerializerError = PrismicRichTextSerializerError;
|
|
7
|
-
//# sourceMappingURL=PrismicRichTextSerializerError.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PrismicRichTextSerializerError.cjs","sources":["../../../src/errors/PrismicRichTextSerializerError.ts"],"sourcesContent":["import { PrismicRichTextError } from \"./PrismicRichTextError\"\n\nexport class PrismicRichTextSerializerError extends PrismicRichTextError {}\n"],"names":["PrismicRichTextError"],"mappings":";;;AAEM,MAAO,uCAAuCA,qBAAAA,qBAAoB;AAAG;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PrismicRichTextSerializerError.js","sources":["../../../src/errors/PrismicRichTextSerializerError.ts"],"sourcesContent":["import { PrismicRichTextError } from \"./PrismicRichTextError\"\n\nexport class PrismicRichTextSerializerError extends PrismicRichTextError {}\n"],"names":[],"mappings":";AAEM,MAAO,uCAAuC,qBAAoB;AAAG;"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const rehypeParse = require("rehype-parse");
|
|
4
|
-
const unified = require("unified");
|
|
5
|
-
const rehypeRichText = require("../lib/rehypeRichText.cjs");
|
|
6
|
-
const unstable_htmlAsRichText = (html, config) => {
|
|
7
|
-
const { result, messages } = unified.unified().use(rehypeParse, { emitParseErrors: true, missingDoctype: 0 }).use(rehypeRichText.rehypeRichText, config).processSync(html);
|
|
8
|
-
return { result, warnings: messages.map((message) => message.toString()) };
|
|
9
|
-
};
|
|
10
|
-
exports.unstable_htmlAsRichText = unstable_htmlAsRichText;
|
|
11
|
-
//# sourceMappingURL=unstable_htmlAsRichText.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unstable_htmlAsRichText.cjs","sources":["../../../src/helpers/unstable_htmlAsRichText.ts"],"sourcesContent":["import type { Element } from \"hast\"\nimport rehypeParse from \"rehype-parse\"\nimport { unified } from \"unified\"\n\nimport type { RTPartialInlineNode } from \"../lib/RichTextFieldBuilder\"\nimport type { RehypeRichTextConfig } from \"../lib/rehypeRichText\"\nimport { rehypeRichText } from \"../lib/rehypeRichText\"\n\nimport type {\n\tRTInlineNode,\n\tRTNode,\n\tRichTextField,\n\tRichTextNodeTypes,\n} from \"../types/value/richText\"\n\n// Used for TSDocs only.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { HTMLRichTextMapSerializer, asHTML } from \"./asHTML\"\n\n/**\n * A shorthand definition for {@link RichTextHTMLMapSerializer} rich text node\n * types.\n *\n * @remarks\n * The `label` rich text node type is not available as is. Use an object\n * containing your label name to convert to label nodes instead. For example:\n * `u: { label: \"underline\" }`\n * @remarks\n * The `span` rich text node type is not available as it is not relevant in the\n * context of going from HTML to Prismic rich text.\n */\nexport type RichTextHTMLMapSerializerShorthand =\n\t| Exclude<RichTextNodeTypes, \"label\" | \"span\">\n\t| { label: string }\n\n/**\n * The payload provided to a {@link RichTextHTMLMapSerializerFunction}.\n */\ntype RichTextHTMLMapSerializerFunctionPayload = {\n\t/**\n\t * The hast {@link Element} node to serialize.\n\t */\n\tnode: Element\n\n\t/**\n\t * Additional context information to help with the serialization.\n\t */\n\tcontext: {\n\t\t/**\n\t\t * The list type of the last list node encountered if any.\n\t\t */\n\t\tlistType?: \"group-list-item\" | \"group-o-list-item\"\n\t}\n}\n\n/**\n * Serializes a hast {@link Element} node to a\n * {@link RichTextHTMLMapSerializerShorthand} or a rich text node.\n *\n * @remarks\n * Serializing to a rich text node directly is not recommended and is only\n * available as an escape hatch. Prefer returning a\n * {@link RichTextHTMLMapSerializerShorthand} instead.\n */\nexport type RichTextHTMLMapSerializerFunction = (\n\tpayload: RichTextHTMLMapSerializerFunctionPayload,\n) =>\n\t| RichTextHTMLMapSerializerShorthand\n\t| RTNode\n\t| RTInlineNode\n\t| RTPartialInlineNode\n\t| undefined\n\n/**\n * Serializes a hast {@link Element} node matching the given HTML tag name or CSS\n * selector to a Prismic rich text node.\n *\n * @remarks\n * This serializer is used to serialize HTML to Prismic rich text. When\n * serializing Prismic rich text to HTML with {@link asHTML}, use the\n * {@link HTMLRichTextMapSerializer} type instead.\n */\nexport type RichTextHTMLMapSerializer = Record<\n\tstring,\n\tRichTextHTMLMapSerializerShorthand | RichTextHTMLMapSerializerFunction\n>\n\n/**\n * Configuration that determines the output of {@link htmlAsRichText}.\n */\nexport type HTMLAsRichTextConfig = RehypeRichTextConfig\n\n/**\n * The return type of {@link htmlAsRichText}.\n */\ntype HTMLAsRichTextReturnType = {\n\tresult: RichTextField\n\twarnings: string[]\n}\n\n/**\n * Converts an HTML string to a rich text field.\n *\n * @param html - An HTML string.\n * @param config - Configuration that determines the output the function.\n *\n * @returns `html` as rich text.\n *\n * @experimental Names and implementations may change in the future.\n * `unstable_htmlAsRichText()` does not follow SemVer.\n */\nexport const unstable_htmlAsRichText = (\n\thtml: string,\n\tconfig?: HTMLAsRichTextConfig,\n): HTMLAsRichTextReturnType => {\n\tconst { result, messages } = unified()\n\t\t.use(rehypeParse, { emitParseErrors: true, missingDoctype: 0 })\n\t\t.use(rehypeRichText, config)\n\t\t.processSync(html)\n\n\treturn { result, warnings: messages.map((message) => message.toString()) }\n}\n"],"names":["unified","rehypeRichText"],"mappings":";;;;;AA+Ga,MAAA,0BAA0B,CACtC,MACA,WAC6B;AACvB,QAAA,EAAE,QAAQ,aAAaA,QAAAA,QAC3B,EAAA,IAAI,aAAa,EAAE,iBAAiB,MAAM,gBAAgB,EAAA,CAAG,EAC7D,IAAIC,eAAAA,gBAAgB,MAAM,EAC1B,YAAY,IAAI;AAEX,SAAA,EAAE,QAAQ,UAAU,SAAS,IAAI,CAAC,YAAY,QAAQ,SAAU,CAAA;AACxE;;"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import type { Element } from "hast";
|
|
2
|
-
import type { RTPartialInlineNode } from "../lib/RichTextFieldBuilder";
|
|
3
|
-
import type { RehypeRichTextConfig } from "../lib/rehypeRichText";
|
|
4
|
-
import type { RTInlineNode, RTNode, RichTextField, RichTextNodeTypes } from "../types/value/richText";
|
|
5
|
-
/**
|
|
6
|
-
* A shorthand definition for {@link RichTextHTMLMapSerializer} rich text node
|
|
7
|
-
* types.
|
|
8
|
-
*
|
|
9
|
-
* @remarks
|
|
10
|
-
* The `label` rich text node type is not available as is. Use an object
|
|
11
|
-
* containing your label name to convert to label nodes instead. For example:
|
|
12
|
-
* `u: { label: "underline" }`
|
|
13
|
-
* @remarks
|
|
14
|
-
* The `span` rich text node type is not available as it is not relevant in the
|
|
15
|
-
* context of going from HTML to Prismic rich text.
|
|
16
|
-
*/
|
|
17
|
-
export type RichTextHTMLMapSerializerShorthand = Exclude<RichTextNodeTypes, "label" | "span"> | {
|
|
18
|
-
label: string;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* The payload provided to a {@link RichTextHTMLMapSerializerFunction}.
|
|
22
|
-
*/
|
|
23
|
-
type RichTextHTMLMapSerializerFunctionPayload = {
|
|
24
|
-
/**
|
|
25
|
-
* The hast {@link Element} node to serialize.
|
|
26
|
-
*/
|
|
27
|
-
node: Element;
|
|
28
|
-
/**
|
|
29
|
-
* Additional context information to help with the serialization.
|
|
30
|
-
*/
|
|
31
|
-
context: {
|
|
32
|
-
/**
|
|
33
|
-
* The list type of the last list node encountered if any.
|
|
34
|
-
*/
|
|
35
|
-
listType?: "group-list-item" | "group-o-list-item";
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Serializes a hast {@link Element} node to a
|
|
40
|
-
* {@link RichTextHTMLMapSerializerShorthand} or a rich text node.
|
|
41
|
-
*
|
|
42
|
-
* @remarks
|
|
43
|
-
* Serializing to a rich text node directly is not recommended and is only
|
|
44
|
-
* available as an escape hatch. Prefer returning a
|
|
45
|
-
* {@link RichTextHTMLMapSerializerShorthand} instead.
|
|
46
|
-
*/
|
|
47
|
-
export type RichTextHTMLMapSerializerFunction = (payload: RichTextHTMLMapSerializerFunctionPayload) => RichTextHTMLMapSerializerShorthand | RTNode | RTInlineNode | RTPartialInlineNode | undefined;
|
|
48
|
-
/**
|
|
49
|
-
* Serializes a hast {@link Element} node matching the given HTML tag name or CSS
|
|
50
|
-
* selector to a Prismic rich text node.
|
|
51
|
-
*
|
|
52
|
-
* @remarks
|
|
53
|
-
* This serializer is used to serialize HTML to Prismic rich text. When
|
|
54
|
-
* serializing Prismic rich text to HTML with {@link asHTML}, use the
|
|
55
|
-
* {@link HTMLRichTextMapSerializer} type instead.
|
|
56
|
-
*/
|
|
57
|
-
export type RichTextHTMLMapSerializer = Record<string, RichTextHTMLMapSerializerShorthand | RichTextHTMLMapSerializerFunction>;
|
|
58
|
-
/**
|
|
59
|
-
* Configuration that determines the output of {@link htmlAsRichText}.
|
|
60
|
-
*/
|
|
61
|
-
export type HTMLAsRichTextConfig = RehypeRichTextConfig;
|
|
62
|
-
/**
|
|
63
|
-
* The return type of {@link htmlAsRichText}.
|
|
64
|
-
*/
|
|
65
|
-
type HTMLAsRichTextReturnType = {
|
|
66
|
-
result: RichTextField;
|
|
67
|
-
warnings: string[];
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* Converts an HTML string to a rich text field.
|
|
71
|
-
*
|
|
72
|
-
* @param html - An HTML string.
|
|
73
|
-
* @param config - Configuration that determines the output the function.
|
|
74
|
-
*
|
|
75
|
-
* @returns `html` as rich text.
|
|
76
|
-
*
|
|
77
|
-
* @experimental Names and implementations may change in the future.
|
|
78
|
-
* `unstable_htmlAsRichText()` does not follow SemVer.
|
|
79
|
-
*/
|
|
80
|
-
export declare const unstable_htmlAsRichText: (html: string, config?: HTMLAsRichTextConfig) => HTMLAsRichTextReturnType;
|
|
81
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import rehypeParse from "rehype-parse";
|
|
2
|
-
import { unified } from "unified";
|
|
3
|
-
import { rehypeRichText } from "../lib/rehypeRichText.js";
|
|
4
|
-
const unstable_htmlAsRichText = (html, config) => {
|
|
5
|
-
const { result, messages } = unified().use(rehypeParse, { emitParseErrors: true, missingDoctype: 0 }).use(rehypeRichText, config).processSync(html);
|
|
6
|
-
return { result, warnings: messages.map((message) => message.toString()) };
|
|
7
|
-
};
|
|
8
|
-
export {
|
|
9
|
-
unstable_htmlAsRichText
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=unstable_htmlAsRichText.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unstable_htmlAsRichText.js","sources":["../../../src/helpers/unstable_htmlAsRichText.ts"],"sourcesContent":["import type { Element } from \"hast\"\nimport rehypeParse from \"rehype-parse\"\nimport { unified } from \"unified\"\n\nimport type { RTPartialInlineNode } from \"../lib/RichTextFieldBuilder\"\nimport type { RehypeRichTextConfig } from \"../lib/rehypeRichText\"\nimport { rehypeRichText } from \"../lib/rehypeRichText\"\n\nimport type {\n\tRTInlineNode,\n\tRTNode,\n\tRichTextField,\n\tRichTextNodeTypes,\n} from \"../types/value/richText\"\n\n// Used for TSDocs only.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { HTMLRichTextMapSerializer, asHTML } from \"./asHTML\"\n\n/**\n * A shorthand definition for {@link RichTextHTMLMapSerializer} rich text node\n * types.\n *\n * @remarks\n * The `label` rich text node type is not available as is. Use an object\n * containing your label name to convert to label nodes instead. For example:\n * `u: { label: \"underline\" }`\n * @remarks\n * The `span` rich text node type is not available as it is not relevant in the\n * context of going from HTML to Prismic rich text.\n */\nexport type RichTextHTMLMapSerializerShorthand =\n\t| Exclude<RichTextNodeTypes, \"label\" | \"span\">\n\t| { label: string }\n\n/**\n * The payload provided to a {@link RichTextHTMLMapSerializerFunction}.\n */\ntype RichTextHTMLMapSerializerFunctionPayload = {\n\t/**\n\t * The hast {@link Element} node to serialize.\n\t */\n\tnode: Element\n\n\t/**\n\t * Additional context information to help with the serialization.\n\t */\n\tcontext: {\n\t\t/**\n\t\t * The list type of the last list node encountered if any.\n\t\t */\n\t\tlistType?: \"group-list-item\" | \"group-o-list-item\"\n\t}\n}\n\n/**\n * Serializes a hast {@link Element} node to a\n * {@link RichTextHTMLMapSerializerShorthand} or a rich text node.\n *\n * @remarks\n * Serializing to a rich text node directly is not recommended and is only\n * available as an escape hatch. Prefer returning a\n * {@link RichTextHTMLMapSerializerShorthand} instead.\n */\nexport type RichTextHTMLMapSerializerFunction = (\n\tpayload: RichTextHTMLMapSerializerFunctionPayload,\n) =>\n\t| RichTextHTMLMapSerializerShorthand\n\t| RTNode\n\t| RTInlineNode\n\t| RTPartialInlineNode\n\t| undefined\n\n/**\n * Serializes a hast {@link Element} node matching the given HTML tag name or CSS\n * selector to a Prismic rich text node.\n *\n * @remarks\n * This serializer is used to serialize HTML to Prismic rich text. When\n * serializing Prismic rich text to HTML with {@link asHTML}, use the\n * {@link HTMLRichTextMapSerializer} type instead.\n */\nexport type RichTextHTMLMapSerializer = Record<\n\tstring,\n\tRichTextHTMLMapSerializerShorthand | RichTextHTMLMapSerializerFunction\n>\n\n/**\n * Configuration that determines the output of {@link htmlAsRichText}.\n */\nexport type HTMLAsRichTextConfig = RehypeRichTextConfig\n\n/**\n * The return type of {@link htmlAsRichText}.\n */\ntype HTMLAsRichTextReturnType = {\n\tresult: RichTextField\n\twarnings: string[]\n}\n\n/**\n * Converts an HTML string to a rich text field.\n *\n * @param html - An HTML string.\n * @param config - Configuration that determines the output the function.\n *\n * @returns `html` as rich text.\n *\n * @experimental Names and implementations may change in the future.\n * `unstable_htmlAsRichText()` does not follow SemVer.\n */\nexport const unstable_htmlAsRichText = (\n\thtml: string,\n\tconfig?: HTMLAsRichTextConfig,\n): HTMLAsRichTextReturnType => {\n\tconst { result, messages } = unified()\n\t\t.use(rehypeParse, { emitParseErrors: true, missingDoctype: 0 })\n\t\t.use(rehypeRichText, config)\n\t\t.processSync(html)\n\n\treturn { result, warnings: messages.map((message) => message.toString()) }\n}\n"],"names":[],"mappings":";;;AA+Ga,MAAA,0BAA0B,CACtC,MACA,WAC6B;AACvB,QAAA,EAAE,QAAQ,aAAa,QAC3B,EAAA,IAAI,aAAa,EAAE,iBAAiB,MAAM,gBAAgB,EAAA,CAAG,EAC7D,IAAI,gBAAgB,MAAM,EAC1B,YAAY,IAAI;AAEX,SAAA,EAAE,QAAQ,UAAU,SAAS,IAAI,CAAC,YAAY,QAAQ,SAAU,CAAA;AACxE;"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const remarkParse = require("remark-parse");
|
|
4
|
-
const remarkRehype = require("remark-rehype");
|
|
5
|
-
const unified = require("unified");
|
|
6
|
-
const rehypeRichText = require("../lib/rehypeRichText.cjs");
|
|
7
|
-
const unstable_markdownAsRichText = (markdown, config) => {
|
|
8
|
-
const { result, messages } = unified.unified().use(remarkParse).use(remarkRehype).use(rehypeRichText.rehypeRichText, config).processSync(markdown);
|
|
9
|
-
return { result, warnings: messages.map((message) => message.toString()) };
|
|
10
|
-
};
|
|
11
|
-
exports.unstable_markdownAsRichText = unstable_markdownAsRichText;
|
|
12
|
-
//# sourceMappingURL=unstable_markdownAsRichText.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unstable_markdownAsRichText.cjs","sources":["../../../src/helpers/unstable_markdownAsRichText.ts"],"sourcesContent":["import remarkParse from \"remark-parse\"\nimport remarkRehype from \"remark-rehype\"\nimport { unified } from \"unified\"\n\nimport type { RehypeRichTextConfig } from \"../lib/rehypeRichText\"\nimport { rehypeRichText } from \"../lib/rehypeRichText\"\n\nimport type { RichTextField } from \"../types/value/richText\"\n\n// Used for TSDocs only.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { unstable_htmlAsRichText } from \"./unstable_htmlAsRichText\"\n\n/**\n * Configuration that determines the output of {@link markdownAsRichText}.\n */\nexport type MarkdownAsRichTextConfig = RehypeRichTextConfig\n\n/**\n * The return type of {@link markdownAsRichText}.\n */\ntype MarkdownAsRichTextReturnType = {\n\tresult: RichTextField\n\twarnings: string[]\n}\n\n/**\n * Converts a markdown string to a rich text field.\n *\n * @remarks\n * To convert markdown to a rich text field, this function first converts it to\n * HTML. It's essentially a sugar above {@link unstable_htmlAsRichText}.\n *\n * @param markdown - A markdown string.\n * @param config - Configuration that determines the output of the function.\n *\n * @returns `markdown` as rich text.\n *\n * @experimental Names and implementations may change in the future.\n * `unstable_markdownAsRichText()` does not follow SemVer.\n */\nexport const unstable_markdownAsRichText = (\n\tmarkdown: string,\n\tconfig?: MarkdownAsRichTextConfig,\n): MarkdownAsRichTextReturnType => {\n\tconst { result, messages } = unified()\n\t\t.use(remarkParse)\n\t\t.use(remarkRehype)\n\t\t.use(rehypeRichText, config)\n\t\t.processSync(markdown)\n\n\treturn { result, warnings: messages.map((message) => message.toString()) }\n}\n"],"names":["unified","rehypeRichText"],"mappings":";;;;;;AAyCa,MAAA,8BAA8B,CAC1C,UACA,WACiC;AACjC,QAAM,EAAE,QAAQ,SAAA,IAAaA,QAAAA,UAC3B,IAAI,WAAW,EACf,IAAI,YAAY,EAChB,IAAIC,+BAAgB,MAAM,EAC1B,YAAY,QAAQ;AAEf,SAAA,EAAE,QAAQ,UAAU,SAAS,IAAI,CAAC,YAAY,QAAQ,SAAU,CAAA;AACxE;;"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { RehypeRichTextConfig } from "../lib/rehypeRichText";
|
|
2
|
-
import type { RichTextField } from "../types/value/richText";
|
|
3
|
-
/**
|
|
4
|
-
* Configuration that determines the output of {@link markdownAsRichText}.
|
|
5
|
-
*/
|
|
6
|
-
export type MarkdownAsRichTextConfig = RehypeRichTextConfig;
|
|
7
|
-
/**
|
|
8
|
-
* The return type of {@link markdownAsRichText}.
|
|
9
|
-
*/
|
|
10
|
-
type MarkdownAsRichTextReturnType = {
|
|
11
|
-
result: RichTextField;
|
|
12
|
-
warnings: string[];
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Converts a markdown string to a rich text field.
|
|
16
|
-
*
|
|
17
|
-
* @remarks
|
|
18
|
-
* To convert markdown to a rich text field, this function first converts it to
|
|
19
|
-
* HTML. It's essentially a sugar above {@link unstable_htmlAsRichText}.
|
|
20
|
-
*
|
|
21
|
-
* @param markdown - A markdown string.
|
|
22
|
-
* @param config - Configuration that determines the output of the function.
|
|
23
|
-
*
|
|
24
|
-
* @returns `markdown` as rich text.
|
|
25
|
-
*
|
|
26
|
-
* @experimental Names and implementations may change in the future.
|
|
27
|
-
* `unstable_markdownAsRichText()` does not follow SemVer.
|
|
28
|
-
*/
|
|
29
|
-
export declare const unstable_markdownAsRichText: (markdown: string, config?: MarkdownAsRichTextConfig) => MarkdownAsRichTextReturnType;
|
|
30
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import remarkParse from "remark-parse";
|
|
2
|
-
import remarkRehype from "remark-rehype";
|
|
3
|
-
import { unified } from "unified";
|
|
4
|
-
import { rehypeRichText } from "../lib/rehypeRichText.js";
|
|
5
|
-
const unstable_markdownAsRichText = (markdown, config) => {
|
|
6
|
-
const { result, messages } = unified().use(remarkParse).use(remarkRehype).use(rehypeRichText, config).processSync(markdown);
|
|
7
|
-
return { result, warnings: messages.map((message) => message.toString()) };
|
|
8
|
-
};
|
|
9
|
-
export {
|
|
10
|
-
unstable_markdownAsRichText
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=unstable_markdownAsRichText.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unstable_markdownAsRichText.js","sources":["../../../src/helpers/unstable_markdownAsRichText.ts"],"sourcesContent":["import remarkParse from \"remark-parse\"\nimport remarkRehype from \"remark-rehype\"\nimport { unified } from \"unified\"\n\nimport type { RehypeRichTextConfig } from \"../lib/rehypeRichText\"\nimport { rehypeRichText } from \"../lib/rehypeRichText\"\n\nimport type { RichTextField } from \"../types/value/richText\"\n\n// Used for TSDocs only.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { unstable_htmlAsRichText } from \"./unstable_htmlAsRichText\"\n\n/**\n * Configuration that determines the output of {@link markdownAsRichText}.\n */\nexport type MarkdownAsRichTextConfig = RehypeRichTextConfig\n\n/**\n * The return type of {@link markdownAsRichText}.\n */\ntype MarkdownAsRichTextReturnType = {\n\tresult: RichTextField\n\twarnings: string[]\n}\n\n/**\n * Converts a markdown string to a rich text field.\n *\n * @remarks\n * To convert markdown to a rich text field, this function first converts it to\n * HTML. It's essentially a sugar above {@link unstable_htmlAsRichText}.\n *\n * @param markdown - A markdown string.\n * @param config - Configuration that determines the output of the function.\n *\n * @returns `markdown` as rich text.\n *\n * @experimental Names and implementations may change in the future.\n * `unstable_markdownAsRichText()` does not follow SemVer.\n */\nexport const unstable_markdownAsRichText = (\n\tmarkdown: string,\n\tconfig?: MarkdownAsRichTextConfig,\n): MarkdownAsRichTextReturnType => {\n\tconst { result, messages } = unified()\n\t\t.use(remarkParse)\n\t\t.use(remarkRehype)\n\t\t.use(rehypeRichText, config)\n\t\t.processSync(markdown)\n\n\treturn { result, warnings: messages.map((message) => message.toString()) }\n}\n"],"names":[],"mappings":";;;;AAyCa,MAAA,8BAA8B,CAC1C,UACA,WACiC;AACjC,QAAM,EAAE,QAAQ,SAAA,IAAa,UAC3B,IAAI,WAAW,EACf,IAAI,YAAY,EAChB,IAAI,gBAAgB,MAAM,EAC1B,YAAY,QAAQ;AAEf,SAAA,EAAE,QAAQ,UAAU,SAAS,IAAI,CAAC,YAAY,QAAQ,SAAU,CAAA;AACxE;"}
|