@ni/nimble-components 20.2.13 → 20.2.14

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.
@@ -7680,7 +7680,7 @@ var n=new this.core.State(e,this,t)
7680
7680
  return this.core.process(n),n.tokens},cO.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},cO.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t)
7681
7681
  return n.inlineMode=!0,this.core.process(n),n.tokens},cO.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)}
7682
7682
  var dO=$_(cO)
7683
- const hO=new oy({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:()=>["p",0]},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM:()=>["blockquote",0]},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:()=>["div",["hr"]]},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM:e=>["h"+e.attrs.level,0]},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({params:e.getAttribute("data-params")||""})}],toDOM:e=>["pre",e.attrs.params?{"data-params":e.attrs.params}:{},["code",0]]},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs:e=>({order:e.hasAttribute("start")?+e.getAttribute("start"):1,tight:e.hasAttribute("data-tight")})}],toDOM:e=>["ol",{start:1==e.attrs.order?null:e.attrs.order,"data-tight":e.attrs.tight?"true":null},0]},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>({tight:e.hasAttribute("data-tight")})}],toDOM:e=>["ul",{"data-tight":e.attrs.tight?"true":null},0]},list_item:{content:"paragraph block*",defining:!0,parseDOM:[{tag:"li"}],toDOM:()=>["li",0]},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs:e=>({src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")})}],toDOM:e=>["img",e.attrs]},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:()=>["br"]}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:e=>"italic"==e&&null}],toDOM:()=>["em"]},strong:{parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM:()=>["strong"]},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>({href:e.getAttribute("href"),title:e.getAttribute("title")})}],toDOM:e=>["a",e.attrs]},code:{parseDOM:[{tag:"code"}],toDOM:()=>["code"]}}})
7683
+ const hO=new oy({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:()=>["p",0]},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM:()=>["blockquote",0]},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:()=>["div",["hr"]]},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM:e=>["h"+e.attrs.level,0]},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({params:e.getAttribute("data-params")||""})}],toDOM:e=>["pre",e.attrs.params?{"data-params":e.attrs.params}:{},["code",0]]},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs:e=>({order:e.hasAttribute("start")?+e.getAttribute("start"):1,tight:e.hasAttribute("data-tight")})}],toDOM:e=>["ol",{start:1==e.attrs.order?null:e.attrs.order,"data-tight":e.attrs.tight?"true":null},0]},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>({tight:e.hasAttribute("data-tight")})}],toDOM:e=>["ul",{"data-tight":e.attrs.tight?"true":null},0]},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM:()=>["li",0]},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs:e=>({src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")})}],toDOM:e=>["img",e.attrs]},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:()=>["br"]}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:e=>"em"==e.type.name}],toDOM:()=>["em"]},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!=e.style.fontWeight&&null},{style:"font-weight=400",clearMark:e=>"strong"==e.type.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM:()=>["strong"]},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>({href:e.getAttribute("href"),title:e.getAttribute("title")})}],toDOM:e=>["a",e.attrs]},code:{parseDOM:[{tag:"code"}],toDOM:()=>["code"]}}})
7684
7684
  class uO{constructor(e,t){this.schema=e,this.tokenHandlers=t,this.stack=[{type:e.topNodeType,attrs:null,content:[],marks:yw.none}]}top(){return this.stack[this.stack.length-1]}push(e){this.stack.length&&this.top().content.push(e)}addText(e){if(!e)return
7685
7685
  let t,n=this.top(),i=n.content,o=i[i.length-1],r=this.schema.text(e,n.marks)
7686
7686
  o&&(t=function(e,t){if(e.isText&&t.isText&&yw.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}(o,r))?i[i.length-1]=t:i.push(r)}openMark(e){let t=this.top()
@@ -7725,9 +7725,11 @@ i&&i.type.name===this.options.hardBreakNodeName&&(s=s.filter((t=>{if(r+1==e.chil
7725
7725
  let n=e.child(r+1)
7726
7726
  return t.isInSet(n.marks)&&(!n.isText||/\S/.test(n.text))})))
7727
7727
  let a=n
7728
- if(n="",i&&i.isText&&s.some((n=>{let i=this.marks[n.type.name]
7729
- return i&&i.expelEnclosingWhitespace&&!(n.isInSet(t)||r<e.childCount-1&&n.isInSet(e.child(r+1).marks))}))){let[e,o,r,l]=/^(\s*)(.*?)(\s*)$/m.exec(i.text)
7730
- a+=o,n=l,(o||l)&&((i=r?i.withText(r):null)||(s=t))}let l=s.length?s[s.length-1]:null,c=l&&!1===this.marks[l.type.name].escape,d=s.length-(c?1:0)
7728
+ if(n="",i&&i.isText&&s.some((e=>{let n=this.marks[e.type.name]
7729
+ return n&&n.expelEnclosingWhitespace&&!e.isInSet(t)}))){let[e,n,o]=/^(\s*)(.*)$/m.exec(i.text)
7730
+ n&&(a+=n,(i=o?i.withText(o):null)||(s=t))}if(i&&i.isText&&s.some((t=>{let n=this.marks[t.type.name]
7731
+ return n&&n.expelEnclosingWhitespace&&(r==e.childCount-1||!t.isInSet(e.child(r+1).marks))}))){let[e,o,r]=/^(.*?)(\s*)$/m.exec(i.text)
7732
+ r&&(n=r,(i=o?i.withText(o):null)||(s=t))}let l=s.length?s[s.length-1]:null,c=l&&!1===this.marks[l.type.name].escape,d=s.length-(c?1:0)
7731
7733
  e:for(let e=0;e<d;e++){let n=s[e]
7732
7734
  if(!this.marks[n.type.name].mixable)break
7733
7735
  for(let i=0;i<t.length;i++){let o=t[i]
@@ -7737,10 +7739,10 @@ continue e}}}let h=0
7737
7739
  for(;h<Math.min(t.length,d)&&s[h].eq(t[h]);)++h
7738
7740
  for(;h<t.length;)this.text(this.markString(t.pop(),!1,e,r),!1)
7739
7741
  if(a&&this.text(a),i){for(;t.length<d;){let n=s[t.length]
7740
- t.push(n),this.text(this.markString(n,!0,e,r),!1)}c&&i.isText?this.text(this.markString(l,!0,e,r)+i.text+this.markString(l,!1,e,r+1),!1):this.render(i,e,r)}}
7742
+ t.push(n),this.text(this.markString(n,!0,e,r),!1),this.atBlockStart=!1}c&&i.isText?this.text(this.markString(l,!0,e,r)+i.text+this.markString(l,!1,e,r+1),!1):this.render(i,e,r),this.atBlockStart=!1}(null==i?void 0:i.isText)&&i.nodeSize>0&&(this.atBlockStart=!1)}
7741
7743
  e.forEach(i),i(null,0,e.childCount),this.atBlockStart=!1}renderList(e,t,n){this.closed&&this.closed.type==e.type?this.flushClose(3):this.inTightList&&this.flushClose(1)
7742
7744
  let i=void 0!==e.attrs.tight?e.attrs.tight:this.options.tightLists,o=this.inTightList
7743
- this.inTightList=i,e.forEach(((o,r,s)=>{s&&i&&this.flushClose(1),this.wrapBlock(t,n(s),e,(()=>this.render(o,e,s)))})),this.inTightList=o}esc(e,t=!1){return e=e.replace(/[`*\\~\[\]_]/g,((t,n)=>"_"==t&&n>0&&n+1<e.length&&e[n-1].match(/\w/)&&e[n+1].match(/\w/)?t:"\\"+t)),t&&(e=e.replace(/^[#\-*+>]/,"\\$&").replace(/^(\s*\d+)\./,"$1\\.")),this.options.escapeExtraCharacters&&(e=e.replace(this.options.escapeExtraCharacters,"\\$&")),e}quote(e){let t=-1==e.indexOf('"')?'""':-1==e.indexOf("'")?"''":"()"
7745
+ this.inTightList=i,e.forEach(((o,r,s)=>{s&&i&&this.flushClose(1),this.wrapBlock(t,n(s),e,(()=>this.render(o,e,s)))})),this.inTightList=o}esc(e,t=!1){return e=e.replace(/[`*\\~\[\]_]/g,((t,n)=>"_"==t&&n>0&&n+1<e.length&&e[n-1].match(/\w/)&&e[n+1].match(/\w/)?t:"\\"+t)),t&&(e=e.replace(/^[\-*+>]/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(e=e.replace(this.options.escapeExtraCharacters,"\\$&")),e}quote(e){let t=-1==e.indexOf('"')?'""':-1==e.indexOf("'")?"''":"()"
7744
7746
  return t[0]+e+t[1]}repeat(e,t){let n=""
7745
7747
  for(let i=0;i<t;i++)n+=e
7746
7748
  return n}markString(e,t,n,i){let o=this.marks[e.type.name],r=t?o.open:o.close