@meowdown/core 0.33.0 → 0.33.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.
package/dist/index.js CHANGED
@@ -24,4 +24,4 @@ import{Priority as e,Priority as t,createMarkBuilders as n,createNodeBuilders as
24
24
  `,`
25
25
  `)}}}))}function Qo({allowEmpty:e}){return(t,n)=>{let{selection:r}=t;if(!g(r)||!e&&r.empty||!r.$head.sameParent(r.$anchor)||r.$head.parent.type.spec.code)return!1;let i=t.doc.textBetween(r.from,r.to);if(i.startsWith(`[[`))return!1;i.startsWith(`[`)&&(i=i.slice(1));let a=`[[`+i;if(n){let e=t.tr.insertText(a,r.from,r.to);e.setSelection(S.create(e.doc,r.from+a.length)),St(e),n(e.scrollIntoView())}return!0}}function $o(){return l({"Mod-Shift-k":Qo({allowEmpty:!0}),"[":Qo({allowEmpty:!1})})}function es(e){let{selection:t,schema:n}=e;if(t.empty)return``;let r=t.content().content;try{return $(n.topNodeType.create(null,r)).replace(/\n+$/,``)}catch{return e.doc.textBetween(t.from,t.to,`
26
26
 
27
- `)}}function ts(e,t){let n=new DOMRect(0,0,0,0),r=()=>{if(e.isDestroyed)return n;try{let r=e.coordsAtPos(t.from),i=e.coordsAtPos(t.to),a=Math.min(r.left,i.left),o=Math.max(r.right,i.right),s=Math.min(r.top,i.top),c=Math.max(r.bottom,i.bottom);n=new DOMRect(a,s,o-a,c-s)}catch{}return n};return{getBoundingClientRect:r,getClientRects:()=>[r()]}}function ns(e){return e instanceof Pe||e instanceof Fe||e instanceof Ie||e instanceof Le||e instanceof N}function rs(e){for(let t of e)for(let e of t.steps)if(!ns(e))return!0;return!1}function is(e){let t,n,r=!1,i,a=()=>{let n=t&&!t.isDestroyed&&t.dom;if(!n)return;let a=e&&!r;a!==i&&(i=a,n.spellcheck=a)},o=()=>{n&&clearTimeout(n),r=!0,a(),n=setTimeout(()=>{r=!1,a()},1200)};return{pause:o,apply(e){rs(e)&&o()},view(e){return t=e,{destroy(){t=void 0}}}}}function as(e){let t=new x(`spell-check`);return new b({key:t,state:{init:()=>is(e),apply:(e,t)=>t},view(e){return t.getState(e.state)?.view(e)||{}},props:{handleDOMEvents:{beforeinput:e=>{t.getState(e.state)?.pause()}}},appendTransaction(e,n){t.getState(n)?.apply(e)}})}function os(e){return m(as(e))}export{Go as EDITOR_KEY_BINDINGS,e as Priority,$a as buildFileMarkdown,wa as checkRoundTrip,Oa as codeBlockLanguages,zo as defaultResolveImageUrl,Ea as defineBulletAfterHeading,Gt as defineCodeBlockSyntaxHighlight,Fi as defineEditorExtension,Ka as defineEmbedPaste,Za as defineExitBoundaryHandler,co as defineFileClickHandler,ao as defineFilePaste,_o as defineFileView,Oo as defineFollowLinkHandler,un as defineHTMLComment,Fo as defineHTMLPaste,Wo as defineImage,Ro as defineImageClickHandler,qo as defineLinkClickHandler,Gr as defineLinkCommands,qr as defineLinkEditKeymap,Yo as defineLinkHoverHandler,Et as defineMarkMode,Zo as defineMarkdownCopy,Ni as definePendingReplacementHandler,ue as definePlaceholder,de as defineReadonly,os as defineSpellCheckPlugin,xo as defineTagClickHandler,wo as defineWikilinkClickHandler,$o as defineWikilinkTrigger,$ as docToMarkdown,qt as getCodeTokens,K as getLinkUnitAt,Ri as getMarkBuilders,J as getPendingReplacement,es as getSelectedText,ts as getVirtualElementFromRange,Gn as inlineTextToMarkChunks,Hr as insertLink,fi as isSelectionInTableCell,Pa as listenForTweetHeight,Y as markdownToDoc,Va as matchEmbed,Wr as removeLink,Ur as updateLink,ce as withPriority};
27
+ `)}}function ts(e,t){let n=new DOMRect(0,0,0,0),r=()=>{if(e.isDestroyed)return n;try{let r=rs(e,t.from,1),i=rs(e,t.to,-1),a=Math.min(r.left,i.left),o=Math.max(r.right,i.right),s=Math.min(r.top,i.top),c=Math.max(r.bottom,i.bottom);n=new DOMRect(a,s,o-a,c-s)}catch{}return n};return{getBoundingClientRect:r,getClientRects:()=>[r()]}}function ns(e){return e.left===0&&e.top===0&&e.right===0&&e.bottom===0}function rs(e,t,n){let r=e.coordsAtPos(t,n);return ns(r)?e.coordsAtPos(t,-n):r}function is(e){return e instanceof Pe||e instanceof Fe||e instanceof Ie||e instanceof Le||e instanceof N}function as(e){for(let t of e)for(let e of t.steps)if(!is(e))return!0;return!1}function os(e){let t,n,r=!1,i,a=()=>{let n=t&&!t.isDestroyed&&t.dom;if(!n)return;let a=e&&!r;a!==i&&(i=a,n.spellcheck=a)},o=()=>{n&&clearTimeout(n),r=!0,a(),n=setTimeout(()=>{r=!1,a()},1200)};return{pause:o,apply(e){as(e)&&o()},view(e){return t=e,{destroy(){t=void 0}}}}}function ss(e){let t=new x(`spell-check`);return new b({key:t,state:{init:()=>os(e),apply:(e,t)=>t},view(e){return t.getState(e.state)?.view(e)||{}},props:{handleDOMEvents:{beforeinput:e=>{t.getState(e.state)?.pause()}}},appendTransaction(e,n){t.getState(n)?.apply(e)}})}function cs(e){return m(ss(e))}export{Go as EDITOR_KEY_BINDINGS,e as Priority,$a as buildFileMarkdown,wa as checkRoundTrip,Oa as codeBlockLanguages,zo as defaultResolveImageUrl,Ea as defineBulletAfterHeading,Gt as defineCodeBlockSyntaxHighlight,Fi as defineEditorExtension,Ka as defineEmbedPaste,Za as defineExitBoundaryHandler,co as defineFileClickHandler,ao as defineFilePaste,_o as defineFileView,Oo as defineFollowLinkHandler,un as defineHTMLComment,Fo as defineHTMLPaste,Wo as defineImage,Ro as defineImageClickHandler,qo as defineLinkClickHandler,Gr as defineLinkCommands,qr as defineLinkEditKeymap,Yo as defineLinkHoverHandler,Et as defineMarkMode,Zo as defineMarkdownCopy,Ni as definePendingReplacementHandler,ue as definePlaceholder,de as defineReadonly,cs as defineSpellCheckPlugin,xo as defineTagClickHandler,wo as defineWikilinkClickHandler,$o as defineWikilinkTrigger,$ as docToMarkdown,qt as getCodeTokens,K as getLinkUnitAt,Ri as getMarkBuilders,J as getPendingReplacement,es as getSelectedText,ts as getVirtualElementFromRange,Gn as inlineTextToMarkChunks,Hr as insertLink,fi as isSelectionInTableCell,Pa as listenForTweetHeight,Y as markdownToDoc,Va as matchEmbed,Wr as removeLink,Ur as updateLink,ce as withPriority};
package/dist/style.css CHANGED
@@ -555,21 +555,20 @@
555
555
 
556
556
  .ProseMirror[data-mark-mode="focus"] {
557
557
  & .md-mark, & .md-link-uri, & .md-link-title {
558
- vertical-align: bottom;
559
- letter-spacing: -2em;
560
- display: inline-block;
561
- overflow: hidden;
558
+ opacity: 0;
559
+ font-size: 0;
560
+ display: inline;
562
561
 
563
562
  &:has(.show) {
564
- letter-spacing: 0;
563
+ opacity: 1;
564
+ font-size: inherit;
565
565
  }
566
566
  }
567
567
  }
568
568
 
569
569
  .ProseMirror {
570
570
  & .md-atom-view {
571
- vertical-align: bottom;
572
- display: inline-block;
571
+ display: contents;
573
572
  }
574
573
 
575
574
  & .md-atom-view-preview {
@@ -593,16 +592,7 @@
593
592
  }
594
593
 
595
594
  & .md-atom-view-content {
596
- letter-spacing: -2em;
597
- box-sizing: border-box;
598
- color: #0000;
599
- background-color: #0000;
600
- align-items: end;
601
- width: 2px;
602
- margin-left: 2px;
603
- margin-right: -4px;
604
- display: inline-flex;
605
- overflow: visible;
595
+ display: none;
606
596
  }
607
597
  }
608
598
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meowdown/core",
3
3
  "type": "module",
4
- "version": "0.33.0",
4
+ "version": "0.33.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",