@meowdown/react 0.81.2 → 0.82.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.d.ts +46 -3
- package/dist/index.js +23 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -548,10 +548,53 @@ interface EditorProps {
|
|
|
548
548
|
*/
|
|
549
549
|
readOnly?: boolean | undefined;
|
|
550
550
|
/**
|
|
551
|
-
*
|
|
552
|
-
*
|
|
551
|
+
* Whether to enable spell checking. Defaults to the browser's behavior.
|
|
552
|
+
*
|
|
553
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/spellcheck
|
|
553
554
|
*/
|
|
554
555
|
spellCheck?: boolean | undefined;
|
|
556
|
+
/**
|
|
557
|
+
* Whether to enable writing suggestions. Defaults to the browser's behavior.
|
|
558
|
+
*
|
|
559
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/writingsuggestions
|
|
560
|
+
*/
|
|
561
|
+
writingSuggestions?: boolean | undefined;
|
|
562
|
+
/**
|
|
563
|
+
* Whether to enable autocorrect. Defaults to the browser's behavior.
|
|
564
|
+
*
|
|
565
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/autocorrect
|
|
566
|
+
*/
|
|
567
|
+
autoCorrect?: boolean | undefined;
|
|
568
|
+
/**
|
|
569
|
+
* How the virtual keyboard capitalizes text. Defaults to the browser's behavior.
|
|
570
|
+
*
|
|
571
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/autocapitalize
|
|
572
|
+
*/
|
|
573
|
+
autoCapitalize?: EditorConfig['autoCapitalize'] | undefined;
|
|
574
|
+
/**
|
|
575
|
+
* The label of the Enter key on the virtual keyboard.
|
|
576
|
+
*
|
|
577
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/enterkeyhint
|
|
578
|
+
*/
|
|
579
|
+
enterKeyHint?: EditorConfig['enterKeyHint'] | undefined;
|
|
580
|
+
/**
|
|
581
|
+
* The text direction of the editor content.
|
|
582
|
+
*
|
|
583
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/dir
|
|
584
|
+
*/
|
|
585
|
+
dir?: EditorConfig['dir'] | undefined;
|
|
586
|
+
/**
|
|
587
|
+
* The language of the editor content.
|
|
588
|
+
*
|
|
589
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/lang
|
|
590
|
+
*/
|
|
591
|
+
lang?: string | undefined;
|
|
592
|
+
/**
|
|
593
|
+
* The accessible name of the editor.
|
|
594
|
+
*
|
|
595
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-label
|
|
596
|
+
*/
|
|
597
|
+
ariaLabel?: string | undefined;
|
|
555
598
|
/**
|
|
556
599
|
* The search query. Every match is highlighted, and the first match at or
|
|
557
600
|
* after the caret is selected whenever the query changes. An empty string
|
|
@@ -597,7 +640,7 @@ interface EditorProps {
|
|
|
597
640
|
*
|
|
598
641
|
* Callbacks and resolvers should be stable; pass them via `useCallback`.
|
|
599
642
|
*/
|
|
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;
|
|
643
|
+
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;
|
|
601
644
|
//#endregion
|
|
602
645
|
//#region src/components/markdown-view.d.ts
|
|
603
646
|
/**
|
package/dist/index.js
CHANGED
|
@@ -2016,7 +2016,7 @@ function findHeadingPosition(doc, fragment) {
|
|
|
2016
2016
|
});
|
|
2017
2017
|
return match;
|
|
2018
2018
|
}
|
|
2019
|
-
function ProseKitEditor({ markMode = "focus", initialMarkdown, singleParagraph = false, referenceDefinitions, onDocChange, onSlashMenuSearch, onTagSearch, onWikilinkSearch, onSelectionMenuSearch, selectionMenuAffordance = true, 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 = true, frontmatter = false, blockHandle = true, placeholder, readOnly, spellCheck, searchQuery = "", onSearchChange, timeFormat, editorClassName, CodeBlockView, ref, children }) {
|
|
2019
|
+
function ProseKitEditor({ markMode = "focus", initialMarkdown, singleParagraph = false, referenceDefinitions, onDocChange, onSlashMenuSearch, onTagSearch, onWikilinkSearch, onSelectionMenuSearch, selectionMenuAffordance = true, 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 = true, frontmatter = false, blockHandle = true, placeholder, readOnly, spellCheck, writingSuggestions, autoCorrect, autoCapitalize, enterKeyHint, dir, lang, ariaLabel, searchQuery = "", onSearchChange, timeFormat, editorClassName, CodeBlockView, ref, children }) {
|
|
2020
2020
|
const suppressDocChangeRef = useRef(false);
|
|
2021
2021
|
const handleDocChange = useMemo(() => {
|
|
2022
2022
|
if (!onDocChange) return;
|
|
@@ -2055,6 +2055,13 @@ function ProseKitEditor({ markMode = "focus", initialMarkdown, singleParagraph =
|
|
|
2055
2055
|
placeholder,
|
|
2056
2056
|
readOnly,
|
|
2057
2057
|
spellCheck,
|
|
2058
|
+
writingSuggestions,
|
|
2059
|
+
autoCorrect,
|
|
2060
|
+
autoCapitalize,
|
|
2061
|
+
enterKeyHint,
|
|
2062
|
+
dir,
|
|
2063
|
+
lang,
|
|
2064
|
+
ariaLabel,
|
|
2058
2065
|
editorClassName,
|
|
2059
2066
|
wikilinkEnabled,
|
|
2060
2067
|
referenceDefinitions
|
|
@@ -2087,6 +2094,13 @@ function ProseKitEditor({ markMode = "focus", initialMarkdown, singleParagraph =
|
|
|
2087
2094
|
placeholder,
|
|
2088
2095
|
readOnly,
|
|
2089
2096
|
spellCheck,
|
|
2097
|
+
writingSuggestions,
|
|
2098
|
+
autoCorrect,
|
|
2099
|
+
autoCapitalize,
|
|
2100
|
+
enterKeyHint,
|
|
2101
|
+
dir,
|
|
2102
|
+
lang,
|
|
2103
|
+
ariaLabel,
|
|
2090
2104
|
editorClassName,
|
|
2091
2105
|
wikilinkEnabled,
|
|
2092
2106
|
referenceDefinitions
|
|
@@ -2296,7 +2310,7 @@ const CARET_GLIDE_OFF = { "--meowdown-caret-glide": "0ms" };
|
|
|
2296
2310
|
*
|
|
2297
2311
|
* Callbacks and resolvers should be stable; pass them via `useCallback`.
|
|
2298
2312
|
*/
|
|
2299
|
-
function MarkdownEditor({ mode = "focus", initialMarkdown, singleParagraph, referenceDefinitions, onDocChange, onSlashMenuSearch, onTagSearch, onWikilinkSearch, onSelectionMenuSearch, selectionMenuAffordance = true, collisionBoundary, pendingReplacementActions, onPendingReplacementResolve, onWikilinkClick, onLinkClick, onLinkCopy, resolveLinkPreview, onTagClick, onExitBoundary, resolveImageUrl, resolveFileLink, resolveWikiEmbed, resolveWikilink, resolveFileInfo, resolveXPost, mediaUrlProtocols, resolveYouTubeVideo, onFileClick, onFilePaste, onFileSaveError, onImageClick, onXPostMediaClick, onYouTubeVideoClick, embedPaste = true, linkPaste = true, bulletAfterHeading = false, backspaceDeletesEmptyFirstBlock = false, substitution = true, frontmatter = false, blockHandle = true, caretGlide = true, placeholder, readOnly, spellCheck, searchQuery, onSearchChange, timeFormat, editorClassName, wrapperClassName, CodeBlockView, handleRef, children }) {
|
|
2313
|
+
function MarkdownEditor({ mode = "focus", initialMarkdown, singleParagraph, referenceDefinitions, onDocChange, onSlashMenuSearch, onTagSearch, onWikilinkSearch, onSelectionMenuSearch, selectionMenuAffordance = true, collisionBoundary, pendingReplacementActions, onPendingReplacementResolve, onWikilinkClick, onLinkClick, onLinkCopy, resolveLinkPreview, onTagClick, onExitBoundary, resolveImageUrl, resolveFileLink, resolveWikiEmbed, resolveWikilink, resolveFileInfo, resolveXPost, mediaUrlProtocols, resolveYouTubeVideo, onFileClick, onFilePaste, onFileSaveError, onImageClick, onXPostMediaClick, onYouTubeVideoClick, embedPaste = true, linkPaste = true, bulletAfterHeading = false, backspaceDeletesEmptyFirstBlock = false, substitution = true, frontmatter = false, blockHandle = true, caretGlide = true, placeholder, readOnly, spellCheck, writingSuggestions, autoCorrect, autoCapitalize, enterKeyHint, dir, lang, ariaLabel, searchQuery, onSearchChange, timeFormat, editorClassName, wrapperClassName, CodeBlockView, handleRef, children }) {
|
|
2300
2314
|
const childRef = useRef(null);
|
|
2301
2315
|
useImperativeHandle(handleRef, () => {
|
|
2302
2316
|
function getMarkdown() {
|
|
@@ -2442,6 +2456,13 @@ function MarkdownEditor({ mode = "focus", initialMarkdown, singleParagraph, refe
|
|
|
2442
2456
|
placeholder,
|
|
2443
2457
|
readOnly,
|
|
2444
2458
|
spellCheck,
|
|
2459
|
+
writingSuggestions,
|
|
2460
|
+
autoCorrect,
|
|
2461
|
+
autoCapitalize,
|
|
2462
|
+
enterKeyHint,
|
|
2463
|
+
dir,
|
|
2464
|
+
lang,
|
|
2465
|
+
ariaLabel,
|
|
2445
2466
|
searchQuery,
|
|
2446
2467
|
onSearchChange,
|
|
2447
2468
|
timeFormat,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meowdown/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.82.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@base-ui/react": "^1.9.0",
|
|
25
|
-
"@meowdown/core": "0.
|
|
25
|
+
"@meowdown/core": "0.82.0",
|
|
26
26
|
"@meowdown/embed": "0.3.1",
|
|
27
27
|
"@meowdown/markdown": "0.77.0",
|
|
28
28
|
"@ocavue/utils": "^1.9.0",
|