@ni/nimble-components 20.16.3 → 20.16.4

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.
@@ -7164,7 +7164,7 @@ const NE=W`<span class="control"
7164
7164
  box-sizing: border-box;
7165
7165
  font: ${Dc};
7166
7166
  color: ${Fc};
7167
- white-space: normal;
7167
+ white-space: pre-wrap;
7168
7168
  }
7169
7169
 
7170
7170
  .control {
@@ -8234,7 +8234,7 @@ return!!n.parent.type.contentMatch.matchType(i)}}}},group:"inline",inline:!0,sel
8234
8234
  const{selection:i}=t,{empty:o,anchor:r}=i
8235
8235
  return!!o&&(t.doc.nodesBetween(r-1,r,((t,i)=>{if(t.type.name===this.name)return n=!0,e.insertText(this.options.suggestion.char||"",i,i+t.nodeSize),!1})),n)}))}},addProseMirrorPlugins(){return[OF({editor:this.editor,...this.options.suggestion})]}}),DF=/^https?:\/\//i
8236
8236
  function FF(e,t,n,i,o,r){const s=xF.extend({excludes:"_",inclusive:!1,parseHTML:()=>[{tag:rh},{tag:"a"}],renderHTML:({HTMLAttributes:e})=>["a",e]}).configure({HTMLAttributes:{rel:"noopener noreferrer",target:null,class:""},autolink:!0,openOnClick:!1,linkOnPaste:!1,validate:e=>DF.test(e)}),a=i.map((n=>function(e,t,n,i){return RF.extend({name:e.name,parseHTML:()=>[{tag:e.viewElement}],addAttributes:()=>({href:{default:null,parseHTML:e=>e.getAttribute("mention-href"),renderHTML:e=>({"mention-href":e.href})},label:{default:null,parseHTML:e=>e.getAttribute("mention-label"),renderHTML:e=>({"mention-label":e.label})}}),renderHTML({node:t,HTMLAttributes:n}){return[e.viewElement,n_(this.options.HTMLAttributes,n,{"disable-editing":""}),this.options.renderLabel({options:this.options,node:t})]}}).configure({suggestion:{char:e.character,decorationTag:e.viewElement,pluginKey:new vC(e.key),allowSpaces:!0,render:()=>{let o=!1
8237
- return{onStart:r=>{o=!0,e.mentionUpdateEmitter(r.query),t(r.text.slice(0,1)),n(r.command),i?.show({filter:r.query,anchorNode:r.decorationNode})},onUpdate:t=>{o&&(e.mentionUpdateEmitter(t.query),n(t.command),i?.show({filter:t.query,anchorNode:t.decorationNode}))},onKeyDown:e=>!!o&&(e.event.key===ha&&(o=!1),i?.keydownHandler(e.event)??!1),onExit:()=>{t(""),n(void 0),i?.close()}}}}})}(n,e,t,o))),l=new sE({element:n,enableInputRules:[aR,MF],enablePasteRules:!1,editorProps:{transformPasted:function(e){const t=NF(l,e.content)
8237
+ return{onStart:r=>{null!==r.decorationNode&&(o=!0,e.mentionUpdateEmitter(r.query),t(r.text.slice(0,1)),n(r.command),i?.show({filter:r.query,anchorNode:r.decorationNode}))},onUpdate:t=>{o&&(e.mentionUpdateEmitter(t.query),n(t.command),i?.show({filter:t.query,anchorNode:t.decorationNode}))},onKeyDown:e=>!!o&&(e.event.key===ha&&(o=!1),i?.keydownHandler(e.event)??!1),onExit:()=>{t(""),n(void 0),i?.close()}}}}})}(n,e,t,o))),l=new sE({element:n,enableInputRules:[aR,MF],enablePasteRules:!1,editorProps:{transformPasted:function(e){const t=NF(l,e.content)
8238
8238
  return new px(t,e.openStart,e.openEnd)}},extensions:[lR,_F,IF,aR,MF,kF,iR,RR,ER,EF.configure({placeholder:r,showOnlyWhenEditable:!1}),uE,s,...a]})
8239
8239
  return l}function NF(e,t){const n=[]
8240
8240
  return t.forEach((t=>{if(t.isText&&t.marks.length>0){const i=t.marks.find((e=>"link"===e.type.name&&e.attrs))