sanity-plugin-markdown

9.0.99.0.10
dist/commonExports-DWE5Hc4n.d.ts
dist/commonExports-DWE5Hc4n.d.tsDeleted
−92
Index: package/dist/commonExports-DWE5Hc4n.d.ts
===================================================================
--- package/dist/commonExports-DWE5Hc4n.d.ts
+++ package/dist/commonExports-DWE5Hc4n.d.ts
@@ -1,92 +0,0 @@
-import { Plugin, StringDefinition, StringInputProps } from "sanity";
-import { SanityImageAssetDocument } from "@sanity/client";
-import { Options } from "easymde";
-import { SimpleMDEReactProps } from "react-simplemde-editor";
-declare const markdownTypeName = "markdown";
-interface MarkdownOptions {
-  /**
-   * Used to create image url for any uploaded image.
-   * The function will be invoked whenever an image is pasted or dragged into the
-   * markdown editor, after upload completes.
-   *
-   * The default implementation uses
-   * ```js
-   * imageAsset => `${imageAsset.url}?w=450`
-   * ```
-   * ## Example
-   * ```js
-   * {
-   *   imageUrl: imageAsset => `${imageAsset.url}?w=400&h=400`
-   * }
-   * ```
-   * @param imageAsset
-   */
-  imageUrl?: (imageAsset: SanityImageAssetDocument) => string;
-}
-/**
- * @public
- */
-interface MarkdownDefinition extends Omit<StringDefinition, 'type' | 'fields' | 'options'> {
-  type: typeof markdownTypeName;
-  options?: MarkdownOptions;
-}
-declare module 'sanity' {
-  interface IntrinsicDefinitions {
-    markdown: MarkdownDefinition;
-  }
-}
-declare const markdownSchemaType: {
-  type: "string";
-  name: "markdown";
-} & Omit<StringDefinition, "preview">;
-interface MarkdownInputProps extends StringInputProps {
-  /**
-   * These are passed along directly to
-   *
-   * Note: MarkdownInput sets certain reactMdeProps.options by default.
-   * These will be merged with any custom options.
-   */
-  reactMdeProps?: Omit<SimpleMDEReactProps, 'value' | 'onChange'>;
-}
-declare const defaultMdeTools: Options['toolbar'];
-declare function MarkdownInput(props: MarkdownInputProps): React.JSX.Element;
-interface MarkdownConfig {
-  /**
-   * When provided, will replace the default input component.
-   *
-   * Use this to customize MarkdownInput by wrapping it in a custom component,
-   * and provide any custom props for https://github.com/RIP21/react-simplemde-editor#react-simplemde-easymde-markdown-editor
-   * via the `reactMdeProps` prop.
-   *
-   * ### Example
-   *
-   * ```tsx
-   * // CustomMarkdownInput.tsx
-   * import { MarkdownInput, MarkdownInputProps } from 'sanity-plugin-markdown'
-   *
-   * export function CustomMarkdownInput(props) {
-   *   const reactMdeProps: MarkdownInputProps['reactMdeProps'] =
-   *     useMemo(() => {
-   *       return {
-   *         options: {
-   *           toolbar: ['bold', 'italic'],
-   *           // more options available, see:
-   *           // https://github.com/Ionaru/easy-markdown-editor#options-list
-   *         },
-   *         // more props available, see:
-   *         // https://github.com/RIP21/react-simplemde-editor#react-simplemde-easymde-markdown-editor
-   *       }
-   *     }, [])
-   *
-   *   return <MarkdownInput {...props} reactMdeProps={reactMdeProps} />
-   * }
-   *
-   * // studio.config.ts
-   * markdownSchema({input: CustomMarkdownInput})
-   * ```
-   */
-  input?: (props: StringInputProps) => React.ReactElement;
-}
-declare const markdownSchema: Plugin<MarkdownConfig | void>;
-export { defaultMdeTools as a, MarkdownInputProps as i, markdownSchema as n, MarkdownDefinition as o, MarkdownInput as r, markdownSchemaType as s, MarkdownConfig as t };
-//# sourceMappingURL=commonExports-DWE5Hc4n.d.ts.map
\ No newline at end of file