sanity-plugin-markdown 8.0.7 → 9.0.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.
@@ -1 +1 @@
1
- {"version":3,"file":"commonExports.d.ts","names":["CreateAction","ReplaceDraftAction","EditAction","DeleteAction","DiscardAction","PublishAction","UnpublishAction","VersionAction","ReleaseAction","type","description","items","ActionErrorItem","error","value","index","async","TParamConfig","docIdRequired","ConstantAgentActionParam","FieldAgentActionParam","DocumentAgentActionParam","GroqAgentActionParam","Record","AgentActionParam","AgentActionPathSegment","_key","AgentActionSchema","localeSettings","locale","timeZone","temperature","schemaId","forcePublishedWrite","conditionalPaths","defaultReadOnly","defaultHidden","paths","path","AgentActionPath","readOnly","hidden","private","constructor","SanityClient","client","HttpRequest","httpRequest","generate","DocumentShape","Any","GenerateInstruction","request","Promise","_id","IdentifiedSanityDocumentStub","transform","TransformDocument","translate","TranslateDocument","prompt","PromptRequest","patch","PatchDocument","noWrite","maxPathDepth","exclude","types","AgentActionTypeConfig","include","BaseMutationOptions","returnFirst","returnDocuments","width","height","start","end","fps","format","AnimatedImageFormat","Exclude","message","statusCode","actionType","releaseId","upload","assetType","UploadBody","body","UploadClientConfig","options","SanityAssetDocument","SanityImageAssetDocument","key","name","title","url","providers","AuthProvider","RequestOptions","transactionId","skipCrossDatasetReferenceValidation","dryRun","visibility","autoGenerateArrayKeys","selection","PatchSelection","operations","PatchOperations","set","AttributeSet","attrs","setIfMissing","diffMatchPatch","unset","inc","dec","insert","at","selector","append","prepend","splice","deleteCount","ifRevisionId","rev","serialize","PatchMutationOperation","toJSON","reset","_assign","op","props","merge","_set","Mutation","trxId","create","R","SanityDocumentStub","doc","createIfNotExists","createOrReplace","delete","documentId","id","_add","mut","Error","data","projectId","dataset","useCdn","token","resource","ClientConfigResource","perspective","ClientPerspective","apiHost","apiVersion","proxy","requestTagPrefix","headers","ignoreBrowserTokenWarning","ignoreWarnings","RegExp","Array","withCredentials","allowReconfigure","timeout","maxRetries","retryDelay","attemptNumber","useProjectHostname","requester","Requester","resultSourceMap","fetch","cache","ResponseQueryOptions","next","stega","StegaConfig","lineage","_requestHandler","RequestHandler","response","ErrorProps","responseBody","traceId","details","res","HttpContext","context","DeprecatedPreviewDrafts","StackablePerspective","GroqString","Fallback","SanityQueries","EventName","EventSourceInstance","Observable","initEventSource","events","ServerSentEvent","mappings","ContentSourceMapMappings","documents","ContentSourceMapDocuments","ContentSourceMapPaths","ContentSourceMapDocumentBase","_projectId","_dataset","_type","ContentSourceMapDocument","ContentSourceMapRemoteDocument","document","ContentSourceMapValueMapping","ContentSourceMapMapping","ContentSourceMapDocumentValueSource","ContentSourceMapLiteralSource","ContentSourceMapUnknownSource","source","ContentSourceMapSource","addOriginUrl","URL","credentials","publishedId","attributes","ifExists","ClientConfig","config","metadata","Partial","ReleaseDocument","baseId","versionId","ifBaseRevisionId","email","profileImage","role","provider","aclMode","DatasetAclMode","embeddings","enabled","projection","datasetName","DatasetCreateOptions","DatasetResponse","edit","DatasetEditOptions","deleted","list","DatasetsResponse","getEmbeddingsSettings","EmbeddingsSettings","editEmbeddingsSettings","EmbeddingsSettingsBody","settings","createdAt","createdByUserId","addonFor","datasetProfile","features","tags","includeDrafts","purge","draftId","reason","ErrorOptions","DocIdParam","Omit","PartialExcept","status","Name","InstanceType","globalThis","EventSource","sourcePath","ContentSourceMapParsedPath","sourceDocument","ContentSourceMapDocuments_2","resultPath","filterDefault","FilterDefault","filterResponse","QueryParseError","tag","T","GenerateExistingDocumentRequest","GenerateTargetDocumentRequest","GenerateRequestBase","AgentActionAsync","targetDocument","GenerateSyncInstruction","GenerateAsyncInstruction","AgentActionRequestBase","instruction","instructionParams","AgentActionParams","target","GenerateTarget","AgentActionSync","AgentActionTarget","operation","GenerateOperation","GenerateTargetInclude","initialValues","GenerateTargetDocument","AgentActionTargetInclude","query","params","ClientPerspective_2","method","statusMessage","ReturnType","ResponseEvent","ProgressEvent_2","P","imageUrl","isDefaultApi","cdnUrl","InitializedStegaConfig","StegaConfigRequiredKeys","Required","Pick","before","after","replace","HttpError","ObservableSanityClient","this","ListenParams","MutationEvent","Opts","ListenOptions","ResumableListenOptions","ListenEventFromOptions","ReconnectEvent","WelcomeBackEvent","ResetEvent","WelcomeEvent","OpenEvent","ResumableListenEventNames","ListenEventName","MapListenEventNamesToListenEvents","ListenEvent","includeResult","includeMutations","includePreviousRevision","includeAllVersions","effectFormat","enableResume","includeMembers","includeFeatures","organizationId","onlyExplicitMembership","_tag","waitFor","LiveEvent","LiveEventRestart","LiveEventReconnect","LiveEventMessage","LiveEventWelcome","LiveEventGoAway","SyncTag","console","Events","E","SanityReference","transformations","MediaLibraryVideoPlaybackTransformations","expiration","getPlaybackInfo","MediaLibraryAssetInstanceIdentifier","assetIdentifier","MediaLibraryPlaybackInfoOptions","VideoPlaybackInfo","thumbnail","ThumbnailTransformOptions","animated","AnimatedTransformOptions","storyboard","StoryboardTransformOptions","documentIds","results","MutationOperation","MutationSelection","MutationErrorItem","eventId","identity","mutations","previousRev","resultRev","result","SanityDocument","previous","effects","apply","revert","timestamp","transition","transactionTotalEvents","transactionCurrentEvent","MutationSelectionQueryParams","HttpRequestEvent","BasePatch","clone","ObservablePatch","commit","FirstDocumentMutationOptions","AllDocumentsMutationOptions","FirstDocumentIdMutationOptions","SingleMutationResult","AllDocumentIdsMutationOptions","MultipleMutationResult","ListOptions","SanityProject","OmittedProjectFields","getById","get","signal","AbortSignal","BaseActionOptions","SingleActionResult","release","publish","archive","unarchive","schedule","publishAt","unschedule","fetchDocuments","RawQueryResponse","assets","ObservableAssetsClient","datasets","ObservableDatasetsClient","live","LiveClient","mediaLibrary","video","ObservableMediaLibraryVideoClient","projects","ObservableProjectsClient","users","ObservableUsersClient","agent","action","ObservableAgentsActionClient","releases","ObservableReleasesClient","listen","_listen","InitializedClientConfig","newConfig","withConfig","Q","QueryWithoutParams","G","ClientReturn","QueryParams","FilteredResponseQueryOptions","UnfilteredResponseQueryOptions","UnfilteredResponseWithoutQuery","RawQuerylessQueryResponse","getDocument","getDocuments","ids","createVersion","args","MultipleActionResult","discardVersion","replaceVersion","unpublishVersion","mutate","ObservableTransaction","transaction","Action","RawRequestOptions","getUrl","uri","canUseCdn","getDataUrl","BaseTransaction","TransactionFirstDocumentMutationOptions","TransactionAllDocumentsMutationOptions","TransactionFirstDocumentIdMutationOptions","TransactionAllDocumentIdsMutationOptions","ObservablePatchBuilder","patchOps","CurrentSanityUser","SanityUser","K","Patch","PatchDocumentSync","PatchDocumentAsync","PatchExistingDocumentRequest","PatchTargetDocumentRequest","PatchRequestBase","InsertPatch","ifRevisionID","PatchTarget","PatchOperation","AnyNonNullable","stage","percent","total","loaded","lengthComputable","PromptTextResponse","PromptJsonResponse","PromptRequestBase","ifDraftRevisionId","ifPublishedRevisionId","RequestInit","returnQuery","lastLiveEventId","cacheMode","ms","ContentSourceMap","syncTags","json","useGlobalApi","maxRedirects","CreateReleaseAction","EditReleaseAction","PublishReleaseAction","ArchiveReleaseAction","UnarchiveReleaseAction","ScheduleReleaseAction","UnscheduleReleaseAction","DeleteReleaseAction","ImportReleaseAction","_createdAt","_updatedAt","_rev","state","ReleaseState","finalDocumentStates","publishedAt","intendedPublishAt","releaseType","ReleaseType","cardinality","ReleaseCardinality","defaultRequester","size","assetId","mimeType","sha1hash","extension","uploadId","originalFilename","AssetsClient","DatasetsClient","MediaLibraryVideoClient","ProjectsClient","UsersClient","AgentActionsClient","ReleasesClient","observable","Transaction","dataRequest","endpoint","_originalId","hasAlpha","isOpaque","lqip","blurHash","thumbHash","dimensions","aspectRatio","palette","darkMuted","SanityImagePalette","darkVibrant","dominant","lightMuted","lightVibrant","muted","vibrant","image","exif","background","foreground","population","displayName","studioHost","isBlocked","isDisabled","isDisabledByUser","pendingInvites","maxRetentionDays","members","SanityProjectMember","cliInitializedAt","color","externalStudioHost","isRobot","isCurrentUser","_ref","familyName","givenName","middleName","updatedAt","studioUrl","StudioUrl","ResolveStudioUrl","filter","logger","Logger","omitCrossDatasetReferenceData","Extract","StillImageFormat","time","fit","FitMode","PatchBuilder","TransformDocumentSync","TransformDocumentAsync","TransformRequestBase","ImageDescriptionOperation","TransformTargetDocument","TransformTarget","TransformTargetInclude","TransformOperation","TranslateDocumentSync","TranslateDocumentAsync","TranslateRequestBase","fromLanguage","TranslateLanguage","toLanguage","styleGuide","styleGuideParams","protectedPhrases","languageFieldPath","TranslateTarget","TranslateTargetInclude","File","Blob","Buffer","NodeJS","ReadableStream","preserveFilename","filename","contentType","extract","AssetMetadataType","label","creditLine","CreateVersionAction","DiscardVersionAction","ReplaceVersionAction","UnpublishVersionAction","VideoPlaybackInfoItem","VideoRenditionInfo","VideoPlaybackInfoItemSigned","VideoRenditionInfoSigned","S","VideoSubtitleInfo","VideoSubtitleInfoSigned","stream","duration","renditions","subtitles","VideoPlaybackInfoItemPublic","VideoRenditionInfoPublic","resolution","expiresAt","VideoSubtitleInfoPublic","trackId","languageCode","closedCaptions","listenerName"],"sources":["../../../../node_modules/.pnpm/@sanity+client@7.22.1/node_modules/@sanity/client/dist/index.d.ts","../../src/schema.ts","../../src/components/MarkdownInput.tsx","../../src/plugin.tsx"],"x_google_ignoreList":[0],"mappings":";;;;;;;aAmZoB,GAAA;;kBA+7IK,mBAAA,SAA4B,cAAc;EACjEgG,GAAAA;EACA1D,IAAAA;EACA8f,IAAAA;EACAC,OAAAA;EACAC,QAAAA;EACAC,QAAAA;EACAC,SAAAA;EACAC,QAAAA;EACAC,gBAAAA;AAAAA;;aAgxBkB,cAAA,WAAyB,MAAA,SAAe,GAAA,IAAO,MAAA,SAAe,GAAA,mBACpE,CAAA,GAAI,CAAA,CAAE,CAAA;EAElBpf,GAAAA;EACAme,IAAAA;EACApU,KAAAA;EACAkU,UAAAA;EACAC,UAAAA;;;;EAIA8B,WAAAA;AAAAA;;kBAWuB,wBAAA,SAAiC,mBAAA;EACxD9U,QAAAA;IACEnB,KAAAA;IACAkW,QAAAA;IACAC,QAAAA;IACAC,IAAAA;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;EGpkLE,KAAA,IAAS,KAAA,EAAO,gBAAA,KAAqB,KAAA,CAAM,YAAY;AAAA;AAAA,cAG5C,cAAA,EAAgB,MAAM,CAAC,cAAA"}
1
+ {"version":3,"file":"commonExports.d.ts","names":["CreateAction","ReplaceDraftAction","EditAction","DeleteAction","DiscardAction","PublishAction","UnpublishAction","VersionAction","ReleaseAction","type","description","items","ActionErrorItem","error","value","index","async","TParamConfig","docIdRequired","ConstantAgentActionParam","FieldAgentActionParam","DocumentAgentActionParam","GroqAgentActionParam","Record","AgentActionParam","AgentActionPathSegment","_key","AgentActionSchema","localeSettings","locale","timeZone","temperature","schemaId","forcePublishedWrite","conditionalPaths","defaultReadOnly","defaultHidden","paths","path","AgentActionPath","readOnly","hidden","private","constructor","SanityClient","client","HttpRequest","httpRequest","generate","DocumentShape","Any","GenerateInstruction","request","Promise","_id","IdentifiedSanityDocumentStub","transform","TransformDocument","translate","TranslateDocument","prompt","PromptRequest","patch","PatchDocument","noWrite","maxPathDepth","exclude","types","AgentActionTypeConfig","include","BaseMutationOptions","returnFirst","returnDocuments","width","height","start","end","fps","format","AnimatedImageFormat","Exclude","message","statusCode","actionType","releaseId","upload","assetType","UploadBody","body","UploadClientConfig","options","SanityAssetDocument","SanityImageAssetDocument","key","name","title","url","providers","AuthProvider","RequestOptions","transactionId","skipCrossDatasetReferenceValidation","dryRun","visibility","autoGenerateArrayKeys","selection","PatchSelection","operations","PatchOperations","set","AttributeSet","attrs","setIfMissing","diffMatchPatch","unset","inc","dec","insert","at","selector","append","prepend","splice","deleteCount","ifRevisionId","rev","serialize","PatchMutationOperation","toJSON","reset","_assign","op","props","merge","_set","Mutation","trxId","create","R","SanityDocumentStub","doc","createIfNotExists","createOrReplace","delete","documentId","id","_add","mut","Error","data","projectId","dataset","useCdn","token","resource","ClientConfigResource","perspective","ClientPerspective","apiHost","apiVersion","proxy","requestTagPrefix","headers","ignoreBrowserTokenWarning","ignoreWarnings","RegExp","Array","withCredentials","allowReconfigure","timeout","maxRetries","retryDelay","attemptNumber","useProjectHostname","requester","Requester","resultSourceMap","fetch","cache","ResponseQueryOptions","next","stega","StegaConfig","lineage","_requestHandler","RequestHandler","response","ErrorProps","responseBody","traceId","details","res","HttpContext","context","DeprecatedPreviewDrafts","StackablePerspective","GroqString","Fallback","SanityQueries","EventName","EventSourceInstance","Observable","initEventSource","events","ServerSentEvent","mappings","ContentSourceMapMappings","documents","ContentSourceMapDocuments","ContentSourceMapPaths","ContentSourceMapDocumentBase","_projectId","_dataset","_type","ContentSourceMapDocument","ContentSourceMapRemoteDocument","document","ContentSourceMapValueMapping","ContentSourceMapMapping","ContentSourceMapDocumentValueSource","ContentSourceMapLiteralSource","ContentSourceMapUnknownSource","source","ContentSourceMapSource","addOriginUrl","URL","credentials","publishedId","attributes","ifExists","ClientConfig","config","metadata","Partial","ReleaseDocument","baseId","versionId","ifBaseRevisionId","email","profileImage","role","provider","aclMode","DatasetAclMode","embeddings","enabled","projection","datasetName","DatasetCreateOptions","DatasetResponse","edit","DatasetEditOptions","deleted","list","DatasetsResponse","getEmbeddingsSettings","EmbeddingsSettings","editEmbeddingsSettings","EmbeddingsSettingsBody","settings","createdAt","createdByUserId","addonFor","datasetProfile","features","tags","includeDrafts","purge","draftId","reason","ErrorOptions","DocIdParam","Omit","PartialExcept","status","Name","InstanceType","globalThis","EventSource","sourcePath","ContentSourceMapParsedPath","sourceDocument","ContentSourceMapDocuments_2","resultPath","filterDefault","FilterDefault","filterResponse","QueryParseError","tag","T","GenerateExistingDocumentRequest","GenerateTargetDocumentRequest","GenerateRequestBase","AgentActionAsync","targetDocument","GenerateSyncInstruction","GenerateAsyncInstruction","AgentActionRequestBase","instruction","instructionParams","AgentActionParams","target","GenerateTarget","AgentActionSync","AgentActionTarget","operation","GenerateOperation","GenerateTargetInclude","initialValues","GenerateTargetDocument","AgentActionTargetInclude","query","params","ClientPerspective_2","method","statusMessage","ReturnType","ResponseEvent","ProgressEvent_2","P","imageUrl","isDefaultApi","cdnUrl","InitializedStegaConfig","StegaConfigRequiredKeys","Required","Pick","before","after","replace","HttpError","ObservableSanityClient","this","ListenParams","MutationEvent","Opts","ListenOptions","ResumableListenOptions","ListenEventFromOptions","ReconnectEvent","WelcomeBackEvent","ResetEvent","WelcomeEvent","OpenEvent","ResumableListenEventNames","ListenEventName","MapListenEventNamesToListenEvents","ListenEvent","includeResult","includeMutations","includePreviousRevision","includeAllVersions","effectFormat","enableResume","includeMembers","includeFeatures","organizationId","onlyExplicitMembership","_tag","waitFor","LiveEvent","LiveEventRestart","LiveEventReconnect","LiveEventMessage","LiveEventWelcome","LiveEventGoAway","SyncTag","console","Events","E","SanityReference","transformations","MediaLibraryVideoPlaybackTransformations","expiration","getPlaybackInfo","MediaLibraryAssetInstanceIdentifier","assetIdentifier","MediaLibraryPlaybackInfoOptions","VideoPlaybackInfo","thumbnail","ThumbnailTransformOptions","animated","AnimatedTransformOptions","storyboard","StoryboardTransformOptions","documentIds","results","MutationOperation","MutationSelection","MutationErrorItem","eventId","identity","mutations","previousRev","resultRev","result","SanityDocument","previous","effects","apply","revert","timestamp","transition","transactionTotalEvents","transactionCurrentEvent","MutationSelectionQueryParams","HttpRequestEvent","BasePatch","clone","ObservablePatch","commit","FirstDocumentMutationOptions","AllDocumentsMutationOptions","FirstDocumentIdMutationOptions","SingleMutationResult","AllDocumentIdsMutationOptions","MultipleMutationResult","ListOptions","SanityProject","OmittedProjectFields","getById","get","signal","AbortSignal","BaseActionOptions","SingleActionResult","release","publish","archive","unarchive","schedule","publishAt","unschedule","fetchDocuments","RawQueryResponse","assets","ObservableAssetsClient","datasets","ObservableDatasetsClient","live","LiveClient","mediaLibrary","video","ObservableMediaLibraryVideoClient","projects","ObservableProjectsClient","users","ObservableUsersClient","agent","action","ObservableAgentsActionClient","releases","ObservableReleasesClient","listen","_listen","InitializedClientConfig","newConfig","withConfig","Q","QueryWithoutParams","G","ClientReturn","QueryParams","FilteredResponseQueryOptions","UnfilteredResponseQueryOptions","UnfilteredResponseWithoutQuery","RawQuerylessQueryResponse","getDocument","getDocuments","ids","documentsExists","Set","createVersion","args","MultipleActionResult","discardVersion","replaceVersion","unpublishVersion","mutate","ObservableTransaction","transaction","Action","RawRequestOptions","getUrl","uri","canUseCdn","getDataUrl","BaseTransaction","TransactionFirstDocumentMutationOptions","TransactionAllDocumentsMutationOptions","TransactionFirstDocumentIdMutationOptions","TransactionAllDocumentIdsMutationOptions","ObservablePatchBuilder","patchOps","CurrentSanityUser","SanityUser","K","Patch","PatchDocumentSync","PatchDocumentAsync","PatchExistingDocumentRequest","PatchTargetDocumentRequest","PatchRequestBase","InsertPatch","ifRevisionID","PatchTarget","PatchOperation","AnyNonNullable","stage","percent","total","loaded","lengthComputable","PromptTextResponse","PromptJsonResponse","PromptRequestBase","ifDraftRevisionId","ifPublishedRevisionId","RequestInit","returnQuery","lastLiveEventId","cacheMode","ms","ContentSourceMap","syncTags","json","useGlobalApi","maxRedirects","CreateReleaseAction","EditReleaseAction","PublishReleaseAction","ArchiveReleaseAction","UnarchiveReleaseAction","ScheduleReleaseAction","UnscheduleReleaseAction","DeleteReleaseAction","ImportReleaseAction","_createdAt","_updatedAt","_rev","state","ReleaseState","finalDocumentStates","publishedAt","intendedPublishAt","releaseType","ReleaseType","cardinality","ReleaseCardinality","defaultRequester","size","assetId","mimeType","sha1hash","extension","uploadId","originalFilename","AssetsClient","DatasetsClient","MediaLibraryVideoClient","ProjectsClient","UsersClient","AgentActionsClient","ReleasesClient","observable","Transaction","dataRequest","endpoint","_originalId","hasAlpha","isOpaque","lqip","blurHash","thumbHash","dimensions","aspectRatio","palette","darkMuted","SanityImagePalette","darkVibrant","dominant","lightMuted","lightVibrant","muted","vibrant","image","exif","background","foreground","population","displayName","studioHost","isBlocked","isDisabled","isDisabledByUser","pendingInvites","maxRetentionDays","members","SanityProjectMember","cliInitializedAt","color","externalStudioHost","isRobot","isCurrentUser","_ref","familyName","givenName","middleName","updatedAt","studioUrl","StudioUrl","ResolveStudioUrl","filter","logger","Logger","omitCrossDatasetReferenceData","Extract","StillImageFormat","time","fit","FitMode","PatchBuilder","TransformDocumentSync","TransformDocumentAsync","TransformRequestBase","ImageDescriptionOperation","TransformTargetDocument","TransformTarget","TransformTargetInclude","TransformOperation","TranslateDocumentSync","TranslateDocumentAsync","TranslateRequestBase","fromLanguage","TranslateLanguage","toLanguage","styleGuide","styleGuideParams","protectedPhrases","languageFieldPath","TranslateTarget","TranslateTargetInclude","File","Blob","Buffer","NodeJS","ReadableStream","preserveFilename","filename","contentType","extract","AssetMetadataType","label","creditLine","CreateVersionAction","DiscardVersionAction","ReplaceVersionAction","UnpublishVersionAction","VideoPlaybackInfoItem","VideoRenditionInfo","VideoPlaybackInfoItemSigned","VideoRenditionInfoSigned","S","VideoSubtitleInfo","VideoSubtitleInfoSigned","stream","duration","renditions","subtitles","VideoPlaybackInfoItemPublic","VideoRenditionInfoPublic","resolution","expiresAt","VideoSubtitleInfoPublic","trackId","languageCode","closedCaptions","listenerName"],"sources":["../../../../node_modules/.pnpm/@sanity+client@7.23.0/node_modules/@sanity/client/dist/index.d.ts","../../src/schema.ts","../../src/components/MarkdownInput.tsx","../../src/plugin.tsx"],"x_google_ignoreList":[0],"mappings":";;;;;;;aAmZoB,GAAA;;kBA68IK,mBAAA,SAA4B,cAAc;EACjEgG,GAAAA;EACA1D,IAAAA;EACAggB,IAAAA;EACAC,OAAAA;EACAC,QAAAA;EACAC,QAAAA;EACAC,SAAAA;EACAC,QAAAA;EACAC,gBAAAA;AAAAA;;aA8xBkB,cAAA,WAAyB,MAAA,SAAe,GAAA,IAAO,MAAA,SAAe,GAAA,mBACpE,CAAA,GAAI,CAAA,CAAE,CAAA;EAElBtf,GAAAA;EACAqe,IAAAA;EACAtU,KAAAA;EACAoU,UAAAA;EACAC,UAAAA;;;;EAIA8B,WAAAA;AAAAA;;kBAWuB,wBAAA,SAAiC,mBAAA;EACxDhV,QAAAA;IACEnB,KAAAA;IACAoW,QAAAA;IACAC,QAAAA;IACAC,IAA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EGhmLE,KAAA,IAAS,KAAA,EAAO,gBAAA,KAAqB,KAAA,CAAM,YAAY;AAAA;AAAA,cAG5C,cAAA,EAAgB,MAAM,CAAC,cAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sanity-plugin-markdown",
3
- "version": "8.0.7",
3
+ "version": "9.0.0",
4
4
  "description": "Markdown fields in Sanity Studio. Supports Github flavored Markdown and image uploads.",
5
5
  "keywords": [
6
6
  "github flavored markdown",
@@ -26,10 +26,7 @@
26
26
  "type": "module",
27
27
  "types": "./dist/index.d.ts",
28
28
  "exports": {
29
- ".": {
30
- "require": "./dist/index.cjs",
31
- "default": "./dist/index.js"
32
- },
29
+ ".": "./dist/index.js",
33
30
  "./next": "./dist/indexNext.js",
34
31
  "./package.json": "./package.json"
35
32
  },
@@ -38,15 +35,15 @@
38
35
  "react-simplemde-editor": "^5.2.0"
39
36
  },
40
37
  "devDependencies": {
41
- "@sanity/client": "^7.22.1",
42
- "@sanity/pkg-utils": "^10.5.4",
38
+ "@sanity/client": "^7.23.0",
39
+ "@sanity/pkg-utils": "^10.5.7",
43
40
  "@types/node": "^24.13.2",
44
- "@types/react": "^19.2.14",
41
+ "@types/react": "^19.2.17",
45
42
  "babel-plugin-react-compiler": "^1.0.0",
46
43
  "babel-plugin-styled-components": "^2.3.0",
47
44
  "easymde": "^2.20.0",
48
- "react": "^19.2.5",
49
- "sanity": "^6.0.0",
45
+ "react": "^19.2.7",
46
+ "sanity": "^6.1.0",
50
47
  "styled-components": "^6.4.2",
51
48
  "@repo/package.config": "0.0.0",
52
49
  "@repo/tsconfig": "0.0.0"
package/dist/index.cjs DELETED
@@ -1,141 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from == "object" || typeof from == "function")
9
- for (let key of __getOwnPropNames(from))
10
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- return to;
12
- };
13
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
14
- // If the importer is in node compatibility mode or this is not an ESM
15
- // file that has been converted to a CommonJS file using a Babel-
16
- // compatible transform (i.e. "__esModule" has not been set), then set
17
- // "default" to the CommonJS "module.exports" for node compatibility.
18
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
19
- mod
20
- ));
21
- Object.defineProperty(exports, "__esModule", { value: !0 });
22
- require("easymde/dist/easymde.min.css");
23
- var sanity = require("sanity"), jsxRuntime = require("react/jsx-runtime"), compilerRuntime = require("react/compiler-runtime"), ui = require("@sanity/ui"), react = require("react"), styledComponents = require("styled-components");
24
- const SimpleMdeReact = react.lazy(() => import("react-simplemde-editor")), MarkdownInputStyles = styledComponents.styled(ui.Box).withConfig({
25
- displayName: "MarkdownInputStyles",
26
- componentId: "sc-syau23-0"
27
- })`& .CodeMirror.CodeMirror{color:${({
28
- theme
29
- }) => theme.sanity.color.card.enabled.fg};border-color:${({
30
- theme
31
- }) => theme.sanity.color.card.enabled.border};background-color:inherit;}& .cm-s-easymde .CodeMirror-cursor{border-color:${({
32
- theme
33
- }) => theme.sanity.color.card.enabled.fg};}& .editor-toolbar,.editor-preview-side{border-color:${({
34
- theme
35
- }) => theme.sanity.color.card.enabled.border};}& .CodeMirror-focused .CodeMirror-selected.CodeMirror-selected.CodeMirror-selected{background-color:${({
36
- theme
37
- }) => theme.sanity.color.selectable?.primary?.hovered?.bg};}& .CodeMirror-selected.CodeMirror-selected.CodeMirror-selected{background-color:${({
38
- theme
39
- }) => theme.sanity.color.card.enabled.bg};}& .editor-toolbar > *{color:${({
40
- theme
41
- }) => theme.sanity.color.card.enabled.fg};}& .editor-toolbar > .active,.editor-toolbar > button:hover,.editor-preview pre,.cm-s-easymde .cm-comment{background-color:${({
42
- theme
43
- }) => theme.sanity.color.card.enabled.bg};}& .editor-preview{background-color:${({
44
- theme
45
- }) => theme.sanity.color.card.enabled.bg};& h1,h2,h3,h4,h5,h6{font-size:revert;}& ul,li{list-style:revert;padding:revert;}& a{text-decoration:revert;}}`, defaultMdeTools = ["heading", "bold", "italic", "|", "quote", "unordered-list", "ordered-list", "|", "link", "image", "code", "|", "preview", "side-by-side"];
46
- function MarkdownInput(props) {
47
- const $ = compilerRuntime.c(29), {
48
- value: t0,
49
- onChange,
50
- elementProps: t1,
51
- reactMdeProps: t2,
52
- schemaType,
53
- focused
54
- } = props, value = t0 === void 0 ? "" : t0, {
55
- onBlur,
56
- onFocus,
57
- ref: elementRef
58
- } = t1;
59
- let t3;
60
- $[0] !== t2 ? (t3 = t2 === void 0 ? {} : t2, $[0] = t2, $[1] = t3) : t3 = $[1];
61
- let mdeCustomOptions, reactMdeProps;
62
- $[2] !== t3 ? ({
63
- options: mdeCustomOptions,
64
- ...reactMdeProps
65
- } = t3, $[2] = t3, $[3] = mdeCustomOptions, $[4] = reactMdeProps) : (mdeCustomOptions = $[3], reactMdeProps = $[4]);
66
- let t4;
67
- $[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t4 = {
68
- apiVersion: "2022-01-01"
69
- }, $[5] = t4) : t4 = $[5];
70
- const client = sanity.useClient(t4);
71
- let t5;
72
- $[6] !== schemaType.options ? (t5 = schemaType.options ?? {}, $[6] = schemaType.options, $[7] = t5) : t5 = $[7];
73
- const {
74
- imageUrl
75
- } = t5, [shouldAutoFocus, setShouldAutoFocus] = react.useState(!1), ref = react.useRef(null);
76
- let t6;
77
- $[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t6 = () => ref.current, $[8] = t6) : t6 = $[8], react.useImperativeHandle(elementRef, t6);
78
- let t7;
79
- $[9] !== client || $[10] !== imageUrl ? (t7 = (file, onSuccess, onError) => {
80
- client.assets.upload("image", file).then((doc) => onSuccess(imageUrl ? imageUrl(doc) : `${doc.url}?w=450`)).catch((e) => {
81
- console.error(e), onError(e.message);
82
- });
83
- }, $[9] = client, $[10] = imageUrl, $[11] = t7) : t7 = $[11];
84
- const imageUpload = t7;
85
- let t8;
86
- $[12] !== imageUpload || $[13] !== mdeCustomOptions || $[14] !== shouldAutoFocus ? (t8 = {
87
- spellChecker: !1,
88
- sideBySideFullscreen: !1,
89
- uploadImage: !0,
90
- imageUploadFunction: imageUpload,
91
- toolbar: defaultMdeTools,
92
- status: !1,
93
- ...mdeCustomOptions,
94
- autofocus: shouldAutoFocus
95
- }, $[12] = imageUpload, $[13] = mdeCustomOptions, $[14] = shouldAutoFocus, $[15] = t8) : t8 = $[15];
96
- const mdeOptions = t8;
97
- let t10, t9;
98
- $[16] !== focused || $[17] !== shouldAutoFocus ? (t9 = () => {
99
- const node = ref.current;
100
- if (node) {
101
- if (focused && !shouldAutoFocus) {
102
- const raf = requestAnimationFrame(() => setShouldAutoFocus(!node.contains(document.activeElement)));
103
- return () => cancelAnimationFrame(raf);
104
- }
105
- if (!focused && shouldAutoFocus) {
106
- const raf_0 = requestAnimationFrame(() => setShouldAutoFocus(node.contains(document.activeElement)));
107
- return () => cancelAnimationFrame(raf_0);
108
- }
109
- }
110
- }, t10 = [focused, shouldAutoFocus], $[16] = focused, $[17] = shouldAutoFocus, $[18] = t10, $[19] = t9) : (t10 = $[18], t9 = $[19]), react.useEffect(t9, t10);
111
- let t11;
112
- $[20] !== onChange ? (t11 = (newValue) => {
113
- onChange(sanity.PatchEvent.from(newValue ? sanity.set(newValue) : sanity.unset()));
114
- }, $[20] = onChange, $[21] = t11) : t11 = $[21];
115
- const handleChange = t11;
116
- let t12;
117
- return $[22] !== handleChange || $[23] !== mdeOptions || $[24] !== onBlur || $[25] !== onFocus || $[26] !== reactMdeProps || $[27] !== value ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(MarkdownInputStyles, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback, children: /* @__PURE__ */ jsxRuntime.jsx(SimpleMdeReact, { ...reactMdeProps, ref, value, onChange: handleChange, onBlur, onFocus, options: mdeOptions, spellCheck: !1 }) }) }), $[22] = handleChange, $[23] = mdeOptions, $[24] = onBlur, $[25] = onFocus, $[26] = reactMdeProps, $[27] = value, $[28] = t12) : t12 = $[28], t12;
118
- }
119
- const fallback = /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { padding: 3, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { children: "Loading editor..." }) }), markdownTypeName = "markdown", markdownSchemaType = sanity.defineType({
120
- type: "string",
121
- name: markdownTypeName,
122
- title: "Markdown",
123
- components: {
124
- input: MarkdownInput
125
- }
126
- }), markdownSchema = sanity.definePlugin((config) => ({
127
- name: "markdown-editor",
128
- schema: {
129
- types: [config && config.input ? {
130
- ...markdownSchemaType,
131
- components: {
132
- input: config.input
133
- }
134
- } : markdownSchemaType]
135
- }
136
- }));
137
- exports.MarkdownInput = MarkdownInput;
138
- exports.defaultMdeTools = defaultMdeTools;
139
- exports.markdownSchema = markdownSchema;
140
- exports.markdownSchemaType = markdownSchemaType;
141
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sources":["../src/components/MarkdownInput.tsx","../src/schema.ts","../src/plugin.tsx"],"sourcesContent":["// TODO: when upgrading to @sanity/ui@4 start using the new tokens\n// oxlint-disable typescript/no-deprecated\n\nimport {Box, Text} from '@sanity/ui'\nimport {type Options as EasyMdeOptions} from 'easymde'\nimport {\n lazy,\n Suspense,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react'\n// dont import non-types here, it will break SSR on next\nimport type {SimpleMDEReactProps} from 'react-simplemde-editor'\nimport {PatchEvent, set, type StringInputProps, unset, useClient} from 'sanity'\nimport {styled} from 'styled-components'\n\nimport type {MarkdownOptions} from '../schema'\n\nconst SimpleMdeReact = lazy(() => import('react-simplemde-editor'))\n\nconst MarkdownInputStyles = styled(Box)`\n & .CodeMirror.CodeMirror {\n color: ${({theme}) => theme.sanity.color.card.enabled.fg};\n border-color: ${({theme}) => theme.sanity.color.card.enabled.border};\n background-color: inherit;\n }\n\n & .cm-s-easymde .CodeMirror-cursor {\n border-color: ${({theme}) => theme.sanity.color.card.enabled.fg};\n }\n\n & .editor-toolbar,\n .editor-preview-side {\n border-color: ${({theme}) => theme.sanity.color.card.enabled.border};\n }\n\n & .CodeMirror-focused .CodeMirror-selected.CodeMirror-selected.CodeMirror-selected {\n background-color: ${({theme}) => theme.sanity.color.selectable?.primary?.hovered?.bg};\n }\n\n & .CodeMirror-selected.CodeMirror-selected.CodeMirror-selected {\n background-color: ${({theme}) => theme.sanity.color.card.enabled.bg};\n }\n\n & .editor-toolbar > * {\n color: ${({theme}) => theme.sanity.color.card.enabled.fg};\n }\n\n & .editor-toolbar > .active,\n .editor-toolbar > button:hover,\n .editor-preview pre,\n .cm-s-easymde .cm-comment {\n background-color: ${({theme}) => theme.sanity.color.card.enabled.bg};\n }\n\n & .editor-preview {\n background-color: ${({theme}) => theme.sanity.color.card.enabled.bg};\n\n & h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-size: revert;\n }\n\n & ul,\n li {\n list-style: revert;\n padding: revert;\n }\n\n & a {\n text-decoration: revert;\n }\n }\n`\n\nexport interface MarkdownInputProps extends StringInputProps {\n /**\n * These are passed along directly to\n *\n * Note: MarkdownInput sets certain reactMdeProps.options by default.\n * These will be merged with any custom options.\n */\n reactMdeProps?: Omit<SimpleMDEReactProps, 'value' | 'onChange'>\n}\n\nexport const defaultMdeTools: EasyMdeOptions['toolbar'] = [\n 'heading',\n 'bold',\n 'italic',\n '|',\n 'quote',\n 'unordered-list',\n 'ordered-list',\n '|',\n 'link',\n 'image',\n 'code',\n '|',\n 'preview',\n 'side-by-side',\n]\n\nexport function MarkdownInput(props: MarkdownInputProps): React.JSX.Element {\n const {\n value = '',\n onChange,\n elementProps: {onBlur, onFocus, ref: elementRef},\n reactMdeProps: {options: mdeCustomOptions, ...reactMdeProps} = {},\n schemaType,\n focused,\n } = props\n const client = useClient({apiVersion: '2022-01-01'})\n // oxlint-disable-next-line no-unsafe-type-assertion\n const {imageUrl} = (schemaType.options as MarkdownOptions | undefined) ?? {}\n const [shouldAutoFocus, setShouldAutoFocus] = useState(false)\n const ref = useRef<HTMLDivElement>(null)\n\n // Forward ref to parent form state\n useImperativeHandle(elementRef, () => ref.current)\n\n const imageUpload = useCallback(\n (file: File, onSuccess: (url: string) => void, onError: (error: string) => void) => {\n client.assets\n .upload('image', file)\n .then((doc) => onSuccess(imageUrl ? imageUrl(doc) : `${doc.url}?w=450`))\n .catch((e) => {\n console.error(e)\n onError(e.message)\n })\n },\n [client, imageUrl],\n )\n\n const mdeOptions: EasyMdeOptions = useMemo(() => {\n return {\n spellChecker: false,\n sideBySideFullscreen: false,\n uploadImage: true,\n imageUploadFunction: imageUpload,\n toolbar: defaultMdeTools,\n status: false,\n ...mdeCustomOptions,\n autofocus: shouldAutoFocus,\n }\n }, [imageUpload, mdeCustomOptions, shouldAutoFocus])\n\n useEffect(() => {\n const node = ref.current\n if (!node) return undefined\n\n if (focused && !shouldAutoFocus) {\n // Do not set autofocus if the field already has focus\n const raf = requestAnimationFrame(() =>\n setShouldAutoFocus(!node.contains(document.activeElement)),\n )\n return () => cancelAnimationFrame(raf)\n }\n\n if (!focused && shouldAutoFocus) {\n // If `focused` is false, and the current active focus is no longer within the editor, reset autofocus state\n const raf = requestAnimationFrame(() =>\n setShouldAutoFocus(node.contains(document.activeElement)),\n )\n return () => cancelAnimationFrame(raf)\n }\n\n return undefined\n }, [focused, shouldAutoFocus])\n\n const handleChange = useCallback(\n (newValue: string) => {\n onChange(PatchEvent.from(newValue ? set(newValue) : unset()))\n },\n [onChange],\n )\n\n return (\n <MarkdownInputStyles>\n <Suspense fallback={fallback}>\n <SimpleMdeReact\n {...reactMdeProps}\n ref={ref}\n value={value}\n onChange={handleChange}\n onBlur={onBlur}\n onFocus={onFocus}\n options={mdeOptions}\n spellCheck={false}\n />\n </Suspense>\n </MarkdownInputStyles>\n )\n}\n\nconst fallback = (\n <Box padding={3}>\n <Text>Loading editor...</Text>\n </Box>\n)\n","import type {SanityImageAssetDocument} from '@sanity/client'\nimport {defineType, type StringDefinition} from 'sanity'\n\nimport {MarkdownInput} from './components/MarkdownInput'\n\nexport const markdownTypeName = 'markdown'\n\nexport interface MarkdownOptions {\n /**\n * Used to create image url for any uploaded image.\n * The function will be invoked whenever an image is pasted or dragged into the\n * markdown editor, after upload completes.\n *\n * The default implementation uses\n * ```js\n * imageAsset => `${imageAsset.url}?w=450`\n * ```\n * ## Example\n * ```js\n * {\n * imageUrl: imageAsset => `${imageAsset.url}?w=400&h=400`\n * }\n * ```\n * @param imageAsset\n */\n imageUrl?: (imageAsset: SanityImageAssetDocument) => string\n}\n\n/**\n * @public\n */\nexport interface MarkdownDefinition extends Omit<StringDefinition, 'type' | 'fields' | 'options'> {\n type: typeof markdownTypeName\n options?: MarkdownOptions\n}\n\ndeclare module 'sanity' {\n // makes type: 'markdown' narrow correctly when using defineType/defineField/defineArrayMember\n export interface IntrinsicDefinitions {\n markdown: MarkdownDefinition\n }\n}\n\nexport const markdownSchemaType = defineType({\n type: 'string',\n name: markdownTypeName,\n title: 'Markdown',\n components: {input: MarkdownInput},\n})\n","import {definePlugin, type Plugin, type StringInputProps} from 'sanity'\n\nimport {markdownSchemaType} from './schema'\n\nexport interface MarkdownConfig {\n /**\n * When provided, will replace the default input component.\n *\n * Use this to customize MarkdownInput by wrapping it in a custom component,\n * and provide any custom props for https://github.com/RIP21/react-simplemde-editor#react-simplemde-easymde-markdown-editor\n * via the `reactMdeProps` prop.\n *\n * ### Example\n *\n * ```tsx\n * // CustomMarkdownInput.tsx\n * import { MarkdownInput, MarkdownInputProps } from 'sanity-plugin-markdown'\n *\n * export function CustomMarkdownInput(props) {\n * const reactMdeProps: MarkdownInputProps['reactMdeProps'] =\n * useMemo(() => {\n * return {\n * options: {\n * toolbar: ['bold', 'italic'],\n * // more options available, see:\n * // https://github.com/Ionaru/easy-markdown-editor#options-list\n * },\n * // more props available, see:\n * // https://github.com/RIP21/react-simplemde-editor#react-simplemde-easymde-markdown-editor\n * }\n * }, [])\n *\n * return <MarkdownInput {...props} reactMdeProps={reactMdeProps} />\n * }\n *\n * // studio.config.ts\n * markdownSchema({input: CustomMarkdownInput})\n * ```\n */\n input?: (props: StringInputProps) => React.ReactElement\n}\n\nexport const markdownSchema: Plugin<MarkdownConfig | void> = definePlugin(\n (config: MarkdownConfig | void) => {\n return {\n name: 'markdown-editor',\n schema: {\n types: [\n config && config.input\n ? {...markdownSchemaType, components: {input: config.input}}\n : markdownSchemaType,\n ],\n },\n }\n },\n)\n"],"names":["SimpleMdeReact","lazy","MarkdownInputStyles","styled","Box","withConfig","displayName","componentId","theme","sanity","color","card","enabled","fg","border","selectable","primary","hovered","bg","defaultMdeTools","MarkdownInput","props","$","_c","value","t0","onChange","elementProps","t1","reactMdeProps","t2","schemaType","focused","undefined","onBlur","onFocus","ref","elementRef","t3","mdeCustomOptions","options","t4","for","apiVersion","client","useClient","t5","imageUrl","shouldAutoFocus","setShouldAutoFocus","useState","useRef","t6","Symbol","current","useImperativeHandle","t7","file","onSuccess","onError","assets","upload","then","doc","url","catch","e","console","error","message","imageUpload","t8","spellChecker","sideBySideFullscreen","uploadImage","imageUploadFunction","toolbar","status","autofocus","mdeOptions","t10","t9","node","raf","requestAnimationFrame","contains","document","activeElement","cancelAnimationFrame","raf_0","useEffect","t11","newValue","PatchEvent","from","set","unset","handleChange","t12","jsx","Suspense","fallback","Text","markdownTypeName","markdownSchemaType","defineType","type","name","title","components","input","markdownSchema","definePlugin","config","schema","types"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAMA,iBAAiBC,MA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AA,YACQ;AAAA,EACLN,MAAM;AAAA,EACNO,QAAQ;AAAA,IACNC,OAAO,CACLF,UAAUA,OAAOH,QACb;AAAA,MAAC,GAAGN;AAAAA,MAAoBK,YAAY;AAAA,QAACC,OAAOG,OAAOH;AAAAA,MAAAA;AAAAA,IAAK,IACxDN,kBAAkB;AAAA,EAAA;AAG5B,EAEJ;;;;;"}
package/dist/index.d.cts DELETED
@@ -1,162 +0,0 @@
1
- import { Plugin, StringDefinition, StringInputProps } from "sanity";
2
- import { Options } from "easymde";
3
- import { SimpleMDEReactProps } from "react-simplemde-editor";
4
- /**
5
- * Used to tag types that is set to `any` as a temporary measure, but should be replaced with proper typings in the future
6
- * @internal
7
- */
8
- declare type Any = any;
9
- /** @internal */
10
- declare interface SanityAssetDocument extends SanityDocument {
11
- url: string;
12
- path: string;
13
- size: number;
14
- assetId: string;
15
- mimeType: string;
16
- sha1hash: string;
17
- extension: string;
18
- uploadId?: string;
19
- originalFilename?: string;
20
- }
21
- /** @internal */
22
- declare type SanityDocument<T extends Record<string, Any> = Record<string, Any>> = { [P in keyof T]: T[P] } & {
23
- _id: string;
24
- _rev: string;
25
- _type: string;
26
- _createdAt: string;
27
- _updatedAt: string;
28
- /**
29
- * Present when `perspective` is set to `previewDrafts`
30
- */
31
- _originalId?: string;
32
- };
33
- /** @internal */
34
- declare interface SanityImageAssetDocument extends SanityAssetDocument {
35
- metadata: {
36
- _type: 'sanity.imageMetadata';
37
- hasAlpha: boolean;
38
- isOpaque: boolean;
39
- lqip?: string;
40
- blurHash?: string;
41
- thumbHash?: string;
42
- dimensions: {
43
- _type: 'sanity.imageDimensions';
44
- aspectRatio: number;
45
- height: number;
46
- width: number;
47
- };
48
- palette?: {
49
- _type: 'sanity.imagePalette';
50
- darkMuted?: SanityImagePalette;
51
- darkVibrant?: SanityImagePalette;
52
- dominant?: SanityImagePalette;
53
- lightMuted?: SanityImagePalette;
54
- lightVibrant?: SanityImagePalette;
55
- muted?: SanityImagePalette;
56
- vibrant?: SanityImagePalette;
57
- };
58
- image?: {
59
- _type: 'sanity.imageExifTags';
60
- [key: string]: Any;
61
- };
62
- exif?: {
63
- _type: 'sanity.imageExifMetadata';
64
- [key: string]: Any;
65
- };
66
- };
67
- }
68
- /** @internal */
69
- declare interface SanityImagePalette {
70
- background: string;
71
- foreground: string;
72
- population: number;
73
- title: string;
74
- }
75
- declare const markdownTypeName = "markdown";
76
- interface MarkdownOptions {
77
- /**
78
- * Used to create image url for any uploaded image.
79
- * The function will be invoked whenever an image is pasted or dragged into the
80
- * markdown editor, after upload completes.
81
- *
82
- * The default implementation uses
83
- * ```js
84
- * imageAsset => `${imageAsset.url}?w=450`
85
- * ```
86
- * ## Example
87
- * ```js
88
- * {
89
- * imageUrl: imageAsset => `${imageAsset.url}?w=400&h=400`
90
- * }
91
- * ```
92
- * @param imageAsset
93
- */
94
- imageUrl?: (imageAsset: SanityImageAssetDocument) => string;
95
- }
96
- /**
97
- * @public
98
- */
99
- interface MarkdownDefinition extends Omit<StringDefinition, 'type' | 'fields' | 'options'> {
100
- type: typeof markdownTypeName;
101
- options?: MarkdownOptions;
102
- }
103
- declare module 'sanity' {
104
- interface IntrinsicDefinitions {
105
- markdown: MarkdownDefinition;
106
- }
107
- }
108
- declare const markdownSchemaType: {
109
- type: "string";
110
- name: "markdown";
111
- } & Omit<StringDefinition, "preview">;
112
- interface MarkdownInputProps extends StringInputProps {
113
- /**
114
- * These are passed along directly to
115
- *
116
- * Note: MarkdownInput sets certain reactMdeProps.options by default.
117
- * These will be merged with any custom options.
118
- */
119
- reactMdeProps?: Omit<SimpleMDEReactProps, 'value' | 'onChange'>;
120
- }
121
- declare const defaultMdeTools: Options['toolbar'];
122
- declare function MarkdownInput(props: MarkdownInputProps): React.JSX.Element;
123
- interface MarkdownConfig {
124
- /**
125
- * When provided, will replace the default input component.
126
- *
127
- * Use this to customize MarkdownInput by wrapping it in a custom component,
128
- * and provide any custom props for https://github.com/RIP21/react-simplemde-editor#react-simplemde-easymde-markdown-editor
129
- * via the `reactMdeProps` prop.
130
- *
131
- * ### Example
132
- *
133
- * ```tsx
134
- * // CustomMarkdownInput.tsx
135
- * import { MarkdownInput, MarkdownInputProps } from 'sanity-plugin-markdown'
136
- *
137
- * export function CustomMarkdownInput(props) {
138
- * const reactMdeProps: MarkdownInputProps['reactMdeProps'] =
139
- * useMemo(() => {
140
- * return {
141
- * options: {
142
- * toolbar: ['bold', 'italic'],
143
- * // more options available, see:
144
- * // https://github.com/Ionaru/easy-markdown-editor#options-list
145
- * },
146
- * // more props available, see:
147
- * // https://github.com/RIP21/react-simplemde-editor#react-simplemde-easymde-markdown-editor
148
- * }
149
- * }, [])
150
- *
151
- * return <MarkdownInput {...props} reactMdeProps={reactMdeProps} />
152
- * }
153
- *
154
- * // studio.config.ts
155
- * markdownSchema({input: CustomMarkdownInput})
156
- * ```
157
- */
158
- input?: (props: StringInputProps) => React.ReactElement;
159
- }
160
- declare const markdownSchema: Plugin<MarkdownConfig | void>;
161
- export { type MarkdownConfig, type MarkdownDefinition, MarkdownInput, type MarkdownInputProps, defaultMdeTools, markdownSchema, markdownSchemaType };
162
- //# sourceMappingURL=index.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","names":["CreateAction","ReplaceDraftAction","EditAction","DeleteAction","DiscardAction","PublishAction","UnpublishAction","VersionAction","ReleaseAction","type","description","items","ActionErrorItem","error","value","index","async","TParamConfig","docIdRequired","ConstantAgentActionParam","FieldAgentActionParam","DocumentAgentActionParam","GroqAgentActionParam","Record","AgentActionParam","AgentActionPathSegment","_key","AgentActionSchema","localeSettings","locale","timeZone","temperature","schemaId","forcePublishedWrite","conditionalPaths","defaultReadOnly","defaultHidden","paths","path","AgentActionPath","readOnly","hidden","private","constructor","SanityClient","client","HttpRequest","httpRequest","generate","DocumentShape","Any","GenerateInstruction","request","Promise","_id","IdentifiedSanityDocumentStub","transform","TransformDocument","translate","TranslateDocument","prompt","PromptRequest","patch","PatchDocument","noWrite","maxPathDepth","exclude","types","AgentActionTypeConfig","include","BaseMutationOptions","returnFirst","returnDocuments","width","height","start","end","fps","format","AnimatedImageFormat","Exclude","message","statusCode","actionType","releaseId","upload","assetType","UploadBody","body","UploadClientConfig","options","SanityAssetDocument","SanityImageAssetDocument","key","name","title","url","providers","AuthProvider","RequestOptions","transactionId","skipCrossDatasetReferenceValidation","dryRun","visibility","autoGenerateArrayKeys","selection","PatchSelection","operations","PatchOperations","set","AttributeSet","attrs","setIfMissing","diffMatchPatch","unset","inc","dec","insert","at","selector","append","prepend","splice","deleteCount","ifRevisionId","rev","serialize","PatchMutationOperation","toJSON","reset","_assign","op","props","merge","_set","Mutation","trxId","create","R","SanityDocumentStub","doc","createIfNotExists","createOrReplace","delete","documentId","id","_add","mut","Error","data","projectId","dataset","useCdn","token","resource","ClientConfigResource","perspective","ClientPerspective","apiHost","apiVersion","proxy","requestTagPrefix","headers","ignoreBrowserTokenWarning","ignoreWarnings","RegExp","Array","withCredentials","allowReconfigure","timeout","maxRetries","retryDelay","attemptNumber","useProjectHostname","requester","Requester","resultSourceMap","fetch","cache","ResponseQueryOptions","next","stega","StegaConfig","lineage","_requestHandler","RequestHandler","response","ErrorProps","responseBody","traceId","details","res","HttpContext","context","DeprecatedPreviewDrafts","StackablePerspective","GroqString","Fallback","SanityQueries","EventName","EventSourceInstance","Observable","initEventSource","events","ServerSentEvent","mappings","ContentSourceMapMappings","documents","ContentSourceMapDocuments","ContentSourceMapPaths","ContentSourceMapDocumentBase","_projectId","_dataset","_type","ContentSourceMapDocument","ContentSourceMapRemoteDocument","document","ContentSourceMapValueMapping","ContentSourceMapMapping","ContentSourceMapDocumentValueSource","ContentSourceMapLiteralSource","ContentSourceMapUnknownSource","source","ContentSourceMapSource","addOriginUrl","URL","credentials","publishedId","attributes","ifExists","ClientConfig","config","metadata","Partial","ReleaseDocument","baseId","versionId","ifBaseRevisionId","email","profileImage","role","provider","aclMode","DatasetAclMode","embeddings","enabled","projection","datasetName","DatasetCreateOptions","DatasetResponse","edit","DatasetEditOptions","deleted","list","DatasetsResponse","getEmbeddingsSettings","EmbeddingsSettings","editEmbeddingsSettings","EmbeddingsSettingsBody","settings","createdAt","createdByUserId","addonFor","datasetProfile","features","tags","includeDrafts","purge","draftId","reason","ErrorOptions","DocIdParam","Omit","PartialExcept","status","Name","InstanceType","globalThis","EventSource","sourcePath","ContentSourceMapParsedPath","sourceDocument","ContentSourceMapDocuments_2","resultPath","filterDefault","FilterDefault","filterResponse","QueryParseError","tag","T","GenerateExistingDocumentRequest","GenerateTargetDocumentRequest","GenerateRequestBase","AgentActionAsync","targetDocument","GenerateSyncInstruction","GenerateAsyncInstruction","AgentActionRequestBase","instruction","instructionParams","AgentActionParams","target","GenerateTarget","AgentActionSync","AgentActionTarget","operation","GenerateOperation","GenerateTargetInclude","initialValues","GenerateTargetDocument","AgentActionTargetInclude","query","params","ClientPerspective_2","method","statusMessage","ReturnType","ResponseEvent","ProgressEvent_2","P","imageUrl","isDefaultApi","cdnUrl","InitializedStegaConfig","StegaConfigRequiredKeys","Required","Pick","before","after","replace","HttpError","ObservableSanityClient","this","ListenParams","MutationEvent","Opts","ListenOptions","ResumableListenOptions","ListenEventFromOptions","ReconnectEvent","WelcomeBackEvent","ResetEvent","WelcomeEvent","OpenEvent","ResumableListenEventNames","ListenEventName","MapListenEventNamesToListenEvents","ListenEvent","includeResult","includeMutations","includePreviousRevision","includeAllVersions","effectFormat","enableResume","includeMembers","includeFeatures","organizationId","onlyExplicitMembership","_tag","waitFor","LiveEvent","LiveEventRestart","LiveEventReconnect","LiveEventMessage","LiveEventWelcome","LiveEventGoAway","SyncTag","console","Events","E","SanityReference","transformations","MediaLibraryVideoPlaybackTransformations","expiration","getPlaybackInfo","MediaLibraryAssetInstanceIdentifier","assetIdentifier","MediaLibraryPlaybackInfoOptions","VideoPlaybackInfo","thumbnail","ThumbnailTransformOptions","animated","AnimatedTransformOptions","storyboard","StoryboardTransformOptions","documentIds","results","MutationOperation","MutationSelection","MutationErrorItem","eventId","identity","mutations","previousRev","resultRev","result","SanityDocument","previous","effects","apply","revert","timestamp","transition","transactionTotalEvents","transactionCurrentEvent","MutationSelectionQueryParams","HttpRequestEvent","BasePatch","clone","ObservablePatch","commit","FirstDocumentMutationOptions","AllDocumentsMutationOptions","FirstDocumentIdMutationOptions","SingleMutationResult","AllDocumentIdsMutationOptions","MultipleMutationResult","ListOptions","SanityProject","OmittedProjectFields","getById","get","signal","AbortSignal","BaseActionOptions","SingleActionResult","release","publish","archive","unarchive","schedule","publishAt","unschedule","fetchDocuments","RawQueryResponse","assets","ObservableAssetsClient","datasets","ObservableDatasetsClient","live","LiveClient","mediaLibrary","video","ObservableMediaLibraryVideoClient","projects","ObservableProjectsClient","users","ObservableUsersClient","agent","action","ObservableAgentsActionClient","releases","ObservableReleasesClient","listen","_listen","InitializedClientConfig","newConfig","withConfig","Q","QueryWithoutParams","G","ClientReturn","QueryParams","FilteredResponseQueryOptions","UnfilteredResponseQueryOptions","UnfilteredResponseWithoutQuery","RawQuerylessQueryResponse","getDocument","getDocuments","ids","createVersion","args","MultipleActionResult","discardVersion","replaceVersion","unpublishVersion","mutate","ObservableTransaction","transaction","Action","RawRequestOptions","getUrl","uri","canUseCdn","getDataUrl","BaseTransaction","TransactionFirstDocumentMutationOptions","TransactionAllDocumentsMutationOptions","TransactionFirstDocumentIdMutationOptions","TransactionAllDocumentIdsMutationOptions","ObservablePatchBuilder","patchOps","CurrentSanityUser","SanityUser","K","Patch","PatchDocumentSync","PatchDocumentAsync","PatchExistingDocumentRequest","PatchTargetDocumentRequest","PatchRequestBase","InsertPatch","ifRevisionID","PatchTarget","PatchOperation","AnyNonNullable","stage","percent","total","loaded","lengthComputable","PromptTextResponse","PromptJsonResponse","PromptRequestBase","ifDraftRevisionId","ifPublishedRevisionId","RequestInit","returnQuery","lastLiveEventId","cacheMode","ms","ContentSourceMap","syncTags","json","useGlobalApi","maxRedirects","CreateReleaseAction","EditReleaseAction","PublishReleaseAction","ArchiveReleaseAction","UnarchiveReleaseAction","ScheduleReleaseAction","UnscheduleReleaseAction","DeleteReleaseAction","ImportReleaseAction","_createdAt","_updatedAt","_rev","state","ReleaseState","finalDocumentStates","publishedAt","intendedPublishAt","releaseType","ReleaseType","cardinality","ReleaseCardinality","defaultRequester","size","assetId","mimeType","sha1hash","extension","uploadId","originalFilename","AssetsClient","DatasetsClient","MediaLibraryVideoClient","ProjectsClient","UsersClient","AgentActionsClient","ReleasesClient","observable","Transaction","dataRequest","endpoint","_originalId","hasAlpha","isOpaque","lqip","blurHash","thumbHash","dimensions","aspectRatio","palette","darkMuted","SanityImagePalette","darkVibrant","dominant","lightMuted","lightVibrant","muted","vibrant","image","exif","background","foreground","population","displayName","studioHost","isBlocked","isDisabled","isDisabledByUser","pendingInvites","maxRetentionDays","members","SanityProjectMember","cliInitializedAt","color","externalStudioHost","isRobot","isCurrentUser","_ref","familyName","givenName","middleName","updatedAt","studioUrl","StudioUrl","ResolveStudioUrl","filter","logger","Logger","omitCrossDatasetReferenceData","Extract","StillImageFormat","time","fit","FitMode","PatchBuilder","TransformDocumentSync","TransformDocumentAsync","TransformRequestBase","ImageDescriptionOperation","TransformTargetDocument","TransformTarget","TransformTargetInclude","TransformOperation","TranslateDocumentSync","TranslateDocumentAsync","TranslateRequestBase","fromLanguage","TranslateLanguage","toLanguage","styleGuide","styleGuideParams","protectedPhrases","languageFieldPath","TranslateTarget","TranslateTargetInclude","File","Blob","Buffer","NodeJS","ReadableStream","preserveFilename","filename","contentType","extract","AssetMetadataType","label","creditLine","CreateVersionAction","DiscardVersionAction","ReplaceVersionAction","UnpublishVersionAction","VideoPlaybackInfoItem","VideoRenditionInfo","VideoPlaybackInfoItemSigned","VideoRenditionInfoSigned","S","VideoSubtitleInfo","VideoSubtitleInfoSigned","stream","duration","renditions","subtitles","VideoPlaybackInfoItemPublic","VideoRenditionInfoPublic","resolution","expiresAt","VideoSubtitleInfoPublic","trackId","languageCode","closedCaptions","listenerName"],"sources":["../../../node_modules/.pnpm/@sanity+client@7.22.1/node_modules/@sanity/client/dist/index.d.ts","../src/schema.ts","../src/components/MarkdownInput.tsx","../src/plugin.tsx"],"x_google_ignoreList":[0],"mappings":";;;;;;;aAmZoB,GAAA;;kBA+7IK,mBAAA,SAA4B,cAAc;EACjEgG,GAAAA;EACA1D,IAAAA;EACA8f,IAAAA;EACAC,OAAAA;EACAC,QAAAA;EACAC,QAAAA;EACAC,SAAAA;EACAC,QAAAA;EACAC,gBAAAA;AAAAA;;aAgxBkB,cAAA,WAAyB,MAAA,SAAe,GAAA,IAAO,MAAA,SAAe,GAAA,mBACpE,CAAA,GAAI,CAAA,CAAE,CAAA;EAElBpf,GAAAA;EACAme,IAAAA;EACApU,KAAAA;EACAkU,UAAAA;EACAC,UAAAA;;;;EAIA8B,WAAAA;AAAAA;;kBAWuB,wBAAA,SAAiC,mBAAA;EACxD9U,QAAAA;IACEnB,KAAAA;IACAkW,QAAAA;IACAC,QAAAA;IACAC,IAAAA;IACAC,QAAAA;IACAC,SAAAA;IACAC,UAAAA;MACEvW,KAAAA;MACAwW,WAAAA;MACAnf,MAAAA;MACAD,KAAAA;IAAAA;IAEFqf,OAAAA;MACEzW,KAAAA;MACA0W,SAAAA,GAAY,kBAAA;MACZE,WAAAA,GAAc,kBAAA;MACdC,QAAAA,GAAW,kBAAA;MACXC,UAAAA,GAAa,kBAAA;MACbC,YAAAA,GAAe,kBAAA;MACfC,KAAAA,GAAQ,kBAAA;MACRC,OAAAA,GAAU,kBAAA;IAAA;IAEZC,KAAAA;MACElX,KAAAA;MAAAA,CACCxH,GAAAA,WAAc,GAAA;IAAA;IAEjB2e,IAAAA;MACEnX,KAAAA;MAAAA,CACCxH,GAAAA,WAAc,GAAA;IAAA;EAAA;AAAA;;kBAMI,kBAAA;EACvB4e,UAAAA;EACAC,UAAAA;EACAC,UAAAA;EACA5e,KAAAA;AAAAA;AAAAA,cCpqLW,gBAAA;AAAA,UAEI,eAAA;ED4YG;;;;AAAG;AA+7IvB;;;;;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