@meowdown/react 0.81.2 → 0.82.1

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +46 -25
  2. package/dist/index.js +4655 -1927
  3. package/package.json +6 -4
package/dist/index.d.ts CHANGED
@@ -3,17 +3,12 @@ import { AcceptPendingReplacementOptions, EditorConfig, ExitBoundaryHandler, Fil
3
3
  import { SelectionJSON, SelectionJSON as SelectionJSON$1 } from "@prosekit/core";
4
4
  import { ReactNodeViewComponent, ReactNodeViewComponent as ReactNodeViewComponent$1, useEditor, useExtension, useKeymap } from "@prosekit/react";
5
5
  import { Popover } from "@base-ui/react/popover";
6
- //#region src/components/collision-boundary.d.ts
7
6
  /**
8
7
  * The area the editor's floating menus and popovers stay inside. Same as the
9
8
  * `collisionBoundary` prop of Base UI positioners.
10
9
  */
11
10
  type CollisionBoundary = NonNullable<Popover.Positioner.Props['collisionBoundary']>;
12
- //#endregion
13
- //#region src/utils/date-format.d.ts
14
11
  type TimeFormat = '12' | '24';
15
- //#endregion
16
- //#region src/components/types.d.ts
17
12
  /**
18
13
  * A selection to restore: an exact JSON selection, or a document edge.
19
14
  */
@@ -270,8 +265,6 @@ type SelectionMenuSearchHandler = (query: string, context: SelectionMenuContext)
270
265
  * Reports how a pending replacement ended and its final staged value.
271
266
  */
272
267
  type PendingReplacementResolveHandler = (outcome: PendingReplacementOutcome, pending: PendingReplacement) => void;
273
- //#endregion
274
- //#region src/components/editor.d.ts
275
268
  type EditorMode = MarkMode;
276
269
  interface EditorProps {
277
270
  /**
@@ -548,10 +541,53 @@ interface EditorProps {
548
541
  */
549
542
  readOnly?: boolean | undefined;
550
543
  /**
551
- * Enables the browser's native spell checking. Defaults to the browser's
552
- * behavior.
544
+ * Whether to enable spell checking. Defaults to the browser's behavior.
545
+ *
546
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/spellcheck
553
547
  */
554
548
  spellCheck?: boolean | undefined;
549
+ /**
550
+ * Whether to enable writing suggestions. Defaults to the browser's behavior.
551
+ *
552
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/writingsuggestions
553
+ */
554
+ writingSuggestions?: boolean | undefined;
555
+ /**
556
+ * Whether to enable autocorrect. Defaults to the browser's behavior.
557
+ *
558
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/autocorrect
559
+ */
560
+ autoCorrect?: boolean | undefined;
561
+ /**
562
+ * How the virtual keyboard capitalizes text. Defaults to the browser's behavior.
563
+ *
564
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/autocapitalize
565
+ */
566
+ autoCapitalize?: EditorConfig['autoCapitalize'] | undefined;
567
+ /**
568
+ * The label of the Enter key on the virtual keyboard.
569
+ *
570
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/enterkeyhint
571
+ */
572
+ enterKeyHint?: EditorConfig['enterKeyHint'] | undefined;
573
+ /**
574
+ * The text direction of the editor content.
575
+ *
576
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/dir
577
+ */
578
+ dir?: EditorConfig['dir'] | undefined;
579
+ /**
580
+ * The language of the editor content.
581
+ *
582
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/lang
583
+ */
584
+ lang?: string | undefined;
585
+ /**
586
+ * The accessible name of the editor.
587
+ *
588
+ * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-label
589
+ */
590
+ ariaLabel?: string | undefined;
555
591
  /**
556
592
  * The search query. Every match is highlighted, and the first match at or
557
593
  * after the caret is selected whenever the query changes. An empty string
@@ -597,9 +633,7 @@ interface EditorProps {
597
633
  *
598
634
  * Callbacks and resolvers should be stable; pass them via `useCallback`.
599
635
  */
600
- export declare function MarkdownEditor({ mode, initialMarkdown, singleParagraph, referenceDefinitions, onDocChange, onSlashMenuSearch, onTagSearch, onWikilinkSearch, onSelectionMenuSearch, selectionMenuAffordance, collisionBoundary, pendingReplacementActions, onPendingReplacementResolve, onWikilinkClick, onLinkClick, onLinkCopy, resolveLinkPreview, onTagClick, onExitBoundary, resolveImageUrl, resolveFileLink, resolveWikiEmbed, resolveWikilink, resolveFileInfo, resolveXPost, mediaUrlProtocols, resolveYouTubeVideo, onFileClick, onFilePaste, onFileSaveError, onImageClick, onXPostMediaClick, onYouTubeVideoClick, embedPaste, linkPaste, bulletAfterHeading, backspaceDeletesEmptyFirstBlock, substitution, frontmatter, blockHandle, caretGlide, placeholder, readOnly, spellCheck, searchQuery, onSearchChange, timeFormat, editorClassName, wrapperClassName, CodeBlockView, handleRef, children }: EditorProps): ReactElement;
601
- //#endregion
602
- //#region src/components/markdown-view.d.ts
636
+ export declare function MarkdownEditor({ mode, initialMarkdown, singleParagraph, referenceDefinitions, onDocChange, onSlashMenuSearch, onTagSearch, onWikilinkSearch, onSelectionMenuSearch, selectionMenuAffordance, collisionBoundary, pendingReplacementActions, onPendingReplacementResolve, onWikilinkClick, onLinkClick, onLinkCopy, resolveLinkPreview, onTagClick, onExitBoundary, resolveImageUrl, resolveFileLink, resolveWikiEmbed, resolveWikilink, resolveFileInfo, resolveXPost, mediaUrlProtocols, resolveYouTubeVideo, onFileClick, onFilePaste, onFileSaveError, onImageClick, onXPostMediaClick, onYouTubeVideoClick, embedPaste, linkPaste, bulletAfterHeading, backspaceDeletesEmptyFirstBlock, substitution, frontmatter, blockHandle, caretGlide, placeholder, readOnly, spellCheck, writingSuggestions, autoCorrect, autoCapitalize, enterKeyHint, dir, lang, ariaLabel, searchQuery, onSearchChange, timeFormat, editorClassName, wrapperClassName, CodeBlockView, handleRef, children }: EditorProps): ReactElement;
603
637
  /**
604
638
  * Payload for {@link TaskClickHandler}.
605
639
  */
@@ -758,8 +792,6 @@ interface MarkdownViewProps {
758
792
  * `useCallback` to avoid re-rendering the whole tree.
759
793
  */
760
794
  export declare function MarkdownView({ markdown, singleParagraph, referenceDefinitions: suppliedDefinitions, markMode, frontmatter, interactive, expandCollapsed, resolveImageUrl, resolveFileLink, resolveWikiEmbed, resolveWikilink, resolveFileInfo, resolveXPost, mediaUrlProtocols, resolveYouTubeVideo, onWikilinkClick, onLinkClick, onImageClick, onXPostMediaClick, onYouTubeVideoClick, onFileClick, onTaskClick, className }: MarkdownViewProps): ReactElement;
761
- //#endregion
762
- //#region src/hooks/use-lightbox.d.ts
763
795
  /**
764
796
  * Something a lightbox can show.
765
797
  */
@@ -859,8 +891,6 @@ interface LightboxController {
859
891
  * lightbox, and loses it while the lightbox is mounted.
860
892
  */
861
893
  export declare function useLightbox(): LightboxController;
862
- //#endregion
863
- //#region src/components/lightbox-frame.d.ts
864
894
  /**
865
895
  * Props for {@link LightboxFrame}. Other props land on the `<iframe>`.
866
896
  */
@@ -872,8 +902,6 @@ interface LightboxFrameProps extends Omit<ComponentProps<'iframe'>, 'src' | 'tit
872
902
  * the item's aspect ratio that fits.
873
903
  */
874
904
  export declare function LightboxFrame({ item, className, style, ...props }: LightboxFrameProps): ReactNode;
875
- //#endregion
876
- //#region src/components/lightbox-image.d.ts
877
905
  /**
878
906
  * Props for {@link LightboxImage}. Other props land on the `<img>`.
879
907
  */
@@ -884,8 +912,6 @@ interface LightboxImageProps extends Omit<ComponentProps<'img'>, 'src' | 'alt'>
884
912
  * The image of a lightbox. It is the element the opened thumbnail zooms into.
885
913
  */
886
914
  export declare function LightboxImage({ item, className, style, ...props }: LightboxImageProps): ReactNode;
887
- //#endregion
888
- //#region src/components/lightbox-root.d.ts
889
915
  /**
890
916
  * Props for {@link LightboxRoot}. Other props land on the `<dialog>`.
891
917
  */
@@ -905,8 +931,6 @@ interface LightboxRootProps extends Omit<ComponentProps<'dialog'>, 'children' |
905
931
  * is open, and `Escape` closes it.
906
932
  */
907
933
  export declare function LightboxRoot({ lightbox, children, className, ...props }: LightboxRootProps): ReactNode;
908
- //#endregion
909
- //#region src/components/lightbox-video.d.ts
910
934
  /**
911
935
  * Props for {@link LightboxVideo}. Other props land on the `<video>`.
912
936
  */
@@ -918,8 +942,6 @@ interface LightboxVideoProps extends Omit<ComponentProps<'video'>, 'src' | 'post
918
942
  * that opened the lightbox is the user gesture that allows sound.
919
943
  */
920
944
  export declare function LightboxVideo({ item, className, style, ...props }: LightboxVideoProps): ReactNode;
921
- //#endregion
922
- //#region src/components/wikilink-hover-card.d.ts
923
945
  /**
924
946
  * Props for {@link WikilinkHoverCard}.
925
947
  */
@@ -943,5 +965,4 @@ interface WikilinkHoverCardProps {
943
965
  * open and close delays live in the core hover handler.
944
966
  */
945
967
  export declare function WikilinkHoverCard({ children, className }: WikilinkHoverCardProps): ReactNode;
946
- //#endregion
947
968
  export { type CollisionBoundary, type EditorHandle, type EditorMode, type EditorProps, type EditorStateSnapshot, type LightboxCloseOptions, type LightboxController, type LightboxFrameItem, type LightboxFrameProps, type LightboxImageItem, type LightboxImageProps, type LightboxItem, type LightboxRootProps, type LightboxVideoItem, type LightboxVideoProps, type LinkPreview, type LinkPreviewResolver, type MarkdownViewProps, type PendingReplacementResolveHandler, type ReactNodeViewComponent, type SelectionHint, type SelectionJSON, type SelectionMenuContext, type SelectionMenuItem, type SelectionMenuSearchHandler, type SlashMenuItem, type SlashMenuSearchHandler, type TagItem, type TagSearchHandler, type TaskClickHandler, type TaskClickPayload, type TimeFormat, type WikilinkHoverCardProps, type WikilinkItem, type WikilinkSearchHandler, type XPostResolver, type YouTubeVideoResolver, useEditor, useExtension, useKeymap };