@ni/nimble-components 35.5.3 → 35.5.5

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.
@@ -1863,6 +1863,7 @@ e&&$a.unsubscribe(e)}}const ah=(t,e)=>new sh(t,e),lh=Mt`
1863
1863
  :host([selected]) .control {
1864
1864
  --ni-private-step-icon-color: ${sc};
1865
1865
  --ni-private-step-icon-border-color: ${sc};
1866
+ --ni-private-step-icon-border-width: 2px;
1866
1867
  --ni-private-step-icon-background-color: rgb(from ${sc} r g b / 30%);
1867
1868
  --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-none-size);
1868
1869
  --ni-private-step-line-color: ${sc};
@@ -1902,10 +1903,6 @@ e&&$a.unsubscribe(e)}}const ah=(t,e)=>new sh(t,e),lh=Mt`
1902
1903
  box-shadow ${Od} ease-in-out;
1903
1904
  }
1904
1905
 
1905
- :host([selected]) .icon {
1906
- --ni-private-step-icon-border-width: 2px;
1907
- }
1908
-
1909
1906
  .icon::before {
1910
1907
  content: '';
1911
1908
  position: absolute;
@@ -1915,7 +1912,8 @@ e&&$a.unsubscribe(e)}}const ah=(t,e)=>new sh(t,e),lh=Mt`
1915
1912
  outline-color: var(--ni-private-step-icon-outline-inset-color);
1916
1913
  outline-style: solid;
1917
1914
  outline-width: 0px;
1918
- outline-offset: 0px;
1915
+ ${""}
1916
+ outline-offset: -1px;
1919
1917
  border: none;
1920
1918
  border-radius: 100%;
1921
1919
  color: transparent;
@@ -1993,9 +1991,9 @@ e&&$a.unsubscribe(e)}}const ah=(t,e)=>new sh(t,e),lh=Mt`
1993
1991
  min-width: ${Cc};
1994
1992
  height: 1px;
1995
1993
  min-height: 1px;
1994
+ transform: scale(1, 1);
1996
1995
  background: var(--ni-private-step-line-color);
1997
1996
  background-clip: content-box;
1998
- transform: scale(1, 1);
1999
1997
  transition:
2000
1998
  background-color ${Od} ease-in-out,
2001
1999
  transform ${Od} ease-in-out;
@@ -2009,8 +2007,8 @@ e&&$a.unsubscribe(e)}}const ah=(t,e)=>new sh(t,e),lh=Mt`
2009
2007
  width: 1px;
2010
2008
  min-width: 1px;
2011
2009
  height: 100%;
2012
- padding-top: ${wc};
2013
2010
  min-height: ${Cc};
2011
+ padding-top: ${wc};
2014
2012
  }
2015
2013
 
2016
2014
  .subtitle {
@@ -2039,6 +2037,7 @@ e&&$a.unsubscribe(e)}}const ah=(t,e)=>new sh(t,e),lh=Mt`
2039
2037
  @layer hover {
2040
2038
  .control:hover {
2041
2039
  --ni-private-step-icon-border-color: ${sc};
2040
+ --ni-private-step-icon-border-width: 2px;
2042
2041
  --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-inset-size);
2043
2042
  --ni-private-step-line-color: ${sc};
2044
2043
  }
@@ -2069,8 +2068,12 @@ e&&$a.unsubscribe(e)}}const ah=(t,e)=>new sh(t,e),lh=Mt`
2069
2068
  --ni-private-step-line-color: ${sc};
2070
2069
  }
2071
2070
 
2072
- .control:hover .icon {
2073
- --ni-private-step-icon-border-width: 2px;
2071
+ :host([readonly]) .control:hover {
2072
+ --ni-private-step-icon-color: revert-layer;
2073
+ --ni-private-step-icon-border-color: revert-layer;
2074
+ --ni-private-step-icon-border-width: revert-layer;
2075
+ --ni-private-step-icon-background-size: revert-layer;
2076
+ --ni-private-step-line-color: revert-layer;
2074
2077
  }
2075
2078
 
2076
2079
  .control:hover .line {
@@ -2080,11 +2083,16 @@ e&&$a.unsubscribe(e)}}const ah=(t,e)=>new sh(t,e),lh=Mt`
2080
2083
  .container.vertical .control:hover .line {
2081
2084
  transform: scale(2, 1);
2082
2085
  }
2086
+
2087
+ :host([readonly]) .container .control:hover .line {
2088
+ transform: revert-layer;
2089
+ }
2083
2090
  }
2084
2091
 
2085
2092
  @layer focusVisible {
2086
2093
  .control${Uo} {
2087
2094
  --ni-private-step-icon-border-color: ${sc};
2095
+ --ni-private-step-icon-border-width: 2px;
2088
2096
  --ni-private-step-icon-outline-inset-color: ${sc};
2089
2097
  --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-inset-size);
2090
2098
  --ni-private-step-line-color: ${sc};
@@ -2120,10 +2128,6 @@ e&&$a.unsubscribe(e)}}const ah=(t,e)=>new sh(t,e),lh=Mt`
2120
2128
  --ni-private-step-line-color: ${sc};
2121
2129
  }
2122
2130
 
2123
- .control${Uo} .icon {
2124
- --ni-private-step-icon-border-width: 2px;
2125
- }
2126
-
2127
2131
  .control${Uo} .icon::before {
2128
2132
  outline-width: ${Sc};
2129
2133
  ${""}
@@ -2142,6 +2146,7 @@ e&&$a.unsubscribe(e)}}const ah=(t,e)=>new sh(t,e),lh=Mt`
2142
2146
  @layer active {
2143
2147
  .control:active {
2144
2148
  --ni-private-step-icon-border-color: ${sc};
2149
+ --ni-private-step-icon-border-width: 2px;
2145
2150
  --ni-private-step-icon-background-color: ${Kl};
2146
2151
  --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-full-size);
2147
2152
  --ni-private-step-line-color: ${sc};
@@ -2173,26 +2178,45 @@ e&&$a.unsubscribe(e)}}const ah=(t,e)=>new sh(t,e),lh=Mt`
2173
2178
  --ni-private-step-line-color: ${sc};
2174
2179
  }
2175
2180
 
2176
- .control:active .icon {
2177
- --ni-private-step-icon-border-width: 2px;
2181
+ :host([readonly]) .control:active {
2182
+ --ni-private-step-icon-color: revert-layer;
2183
+ --ni-private-step-icon-border-color: revert-layer;
2184
+ --ni-private-step-icon-border-width: revert-layer;
2185
+ --ni-private-step-icon-background-color: revert-layer;
2186
+ --ni-private-step-icon-background-size: revert-layer;
2187
+ --ni-private-step-line-color: revert-layer;
2178
2188
  }
2179
2189
 
2180
2190
  .control:active .icon::before {
2181
2191
  outline-width: 0px;
2182
- outline-offset: 0px;
2192
+ outline-offset: -1px;
2193
+ }
2194
+
2195
+ :host([readonly]) .control:active .icon::before {
2196
+ outline-width: revert-layer;
2197
+ outline-offset: revert-layer;
2183
2198
  }
2184
2199
 
2185
2200
  .control:active .line {
2186
2201
  transform: scale(1, 1);
2187
2202
  }
2203
+
2204
+ :host([readonly]) .control:active .line {
2205
+ transform: revert-layer;
2206
+ }
2188
2207
  }
2189
2208
 
2190
2209
  @layer disabled {
2210
+ :host([readonly]) .control {
2211
+ cursor: default;
2212
+ }
2213
+
2191
2214
  :host([disabled]) .control {
2192
2215
  cursor: default;
2193
2216
  color: ${wd};
2194
2217
  --ni-private-step-icon-color: rgb(from ${yd} r g b / 30%);
2195
2218
  --ni-private-step-icon-border-color: transparent;
2219
+ --ni-private-step-icon-border-width: 1px;
2196
2220
  --ni-private-step-icon-background-color: rgba(${tc}, 0.1);
2197
2221
  --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-full-size);
2198
2222
  --ni-private-step-icon-outline-inset-color: transparent;
@@ -2303,7 +2327,7 @@ Pm("icon-check",class extends Bm{constructor(){super(xu)}})
2303
2327
  const Hm="nimble-icon-check",Um="Close",qm="Increment",jm="Decrement",Wm="Error",Gm="Warning",Zm="Completed",Km="Current",Ym="Information",Xm="Search",Jm="No items found",Qm="Loading…",tg="Scroll backward",eg="Scroll forward",ng="Remove",ig=Ci.create({name:"popup-dismiss-label",cssCustomPropertyName:null}).withDefault(Um),og=Ci.create({name:"numeric-decrement-label",cssCustomPropertyName:null}).withDefault(jm),rg=Ci.create({name:"numeric-increment-label",cssCustomPropertyName:null}).withDefault(qm),sg=Ci.create({name:"popup-icon-error-label",cssCustomPropertyName:null}).withDefault(Wm),ag=Ci.create({name:"popup-icon-warning-label",cssCustomPropertyName:null}).withDefault(Gm),lg=Ci.create({name:"popup-icon-completed-label",cssCustomPropertyName:null}).withDefault(Zm),cg=Ci.create({name:"popup-icon-current-label",cssCustomPropertyName:null}).withDefault(Km),dg=Ci.create({name:"popup-icon-information-label",cssCustomPropertyName:null}).withDefault(Ym),hg=Ci.create({name:"filter-search-label",cssCustomPropertyName:null}).withDefault(Xm),ug=Ci.create({name:"filter-no-results-label",cssCustomPropertyName:null}).withDefault(Jm),pg=Ci.create({name:"loading-label",cssCustomPropertyName:null}).withDefault(Qm),fg=Ci.create({name:"scroll-backward-label",cssCustomPropertyName:null}).withDefault(tg),mg=Ci.create({name:"scroll-forward-label",cssCustomPropertyName:null}).withDefault(eg),gg=Ci.create({name:"item-remove-label",cssCustomPropertyName:null}).withDefault(ng),vg=Ge
2304
2328
  class bg{constructor(){this.orientation=vg.horizontal,this.last=!1,this.position=1}}t([C],bg.prototype,"orientation",void 0),t([C],bg.prototype,"last",void 0),t([C],bg.prototype,"position",void 0)
2305
2329
  const yg=ph
2306
- class wg extends(fh(Vo)){constructor(){super(...arguments),this.severity=yg.default,this.disabled=!1,this.readOnly=!1,this.selected=!1,this.stepInternals=new bg}}t([ft()],wg.prototype,"severity",void 0),t([ft({mode:"boolean"})],wg.prototype,"disabled",void 0),t([ft({attribute:"readonly",mode:"boolean"})],wg.prototype,"readOnly",void 0),t([ft({mode:"boolean"})],wg.prototype,"selected",void 0),t([ft({attribute:"tabindex",converter:ut})],wg.prototype,"tabIndex",void 0)
2330
+ class wg extends(fh(Vo)){constructor(){super(...arguments),this.severity=yg.default,this.disabled=!1,this.readOnly=!1,this.selected=!1,this.stepInternals=new bg}onClick(t){(this.disabled||this.readOnly)&&(t.preventDefault(),t.stopImmediatePropagation())}}t([ft()],wg.prototype,"severity",void 0),t([ft({mode:"boolean"})],wg.prototype,"disabled",void 0),t([ft({attribute:"readonly",mode:"boolean"})],wg.prototype,"readOnly",void 0),t([ft({mode:"boolean"})],wg.prototype,"selected",void 0),t([ft({attribute:"tabindex",converter:ut})],wg.prototype,"tabIndex",void 0)
2307
2331
  const xg=wg.compose({baseName:"anchor-step",template:(t,e)=>Q`
2308
2332
  <template slot="step">
2309
2333
  <li class="
@@ -2343,6 +2367,7 @@ const xg=wg.compose({baseName:"anchor-step",template:(t,e)=>Q`
2343
2367
  aria-owns="${t=>t.ariaOwns}"
2344
2368
  aria-relevant="${t=>t.ariaRelevant}"
2345
2369
  aria-roledescription="${t=>t.ariaRoledescription}"
2370
+ @click="${(t,e)=>t.onClick(e.event)}"
2346
2371
  ${zt("control")}
2347
2372
  >
2348
2373
  <div class="icon-background"></div>
@@ -6378,14 +6403,14 @@ return tx.fromReplace(t,this.pos,this.pos+1,new jy(Py.from(n),0,e.isLeaf?0:1))}i
6378
6403
  return e&&this.mark.isInSet(e.marks)?new ox(this.pos,this.mark):this}map(t){let e=t.mapResult(this.pos,1)
6379
6404
  return e.deletedAfter?null:new rx(e.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON")
6380
6405
  return new rx(e.pos,t.markFromJSON(e.mark))}}Qw.jsonID("removeNodeMark",rx)
6381
- class sx extends Qw{constructor(t,e,n,i=!1){super(),this.from=t,this.to=e,this.slice=n,this.structure=i}apply(t){return this.structure&&lx(t,this.from,this.to)?tx.fail("Structure replace would overwrite content"):tx.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new Yw([this.from,this.to-this.from,this.slice.size])}invert(t){return new sx(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1)
6382
- return e.deletedAcross&&n.deletedAcross?null:new sx(e.pos,Math.max(e.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof sx)||t.structure||this.structure)return null
6406
+ class sx extends Qw{constructor(t,e,n,i=!1){super(),this.from=t,this.to=e,this.slice=n,this.structure=i}apply(t){return this.structure&&lx(t,this.from,this.to)?tx.fail("Structure replace would overwrite content"):tx.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new Yw([this.from,this.to-this.from,this.slice.size])}invert(t){return new sx(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let e=t.mapResult(this.to,-1),n=this.from==this.to&&sx.MAP_BIAS<0?e:t.mapResult(this.from,1)
6407
+ return n.deletedAcross&&e.deletedAcross?null:new sx(n.pos,Math.max(n.pos,e.pos),this.slice,this.structure)}merge(t){if(!(t instanceof sx)||t.structure||this.structure)return null
6383
6408
  if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null
6384
6409
  {let e=this.slice.size+t.slice.size==0?jy.empty:new jy(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd)
6385
6410
  return new sx(t.from,this.to,e,this.structure)}}{let e=this.slice.size+t.slice.size==0?jy.empty:new jy(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd)
6386
6411
  return new sx(this.from,this.to+(t.to-t.from),e,this.structure)}}toJSON(){let t={stepType:"replace",from:this.from,to:this.to}
6387
6412
  return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON")
6388
- return new sx(e.from,e.to,jy.fromJSON(t,e.slice),!!e.structure)}}Qw.jsonID("replace",sx)
6413
+ return new sx(e.from,e.to,jy.fromJSON(t,e.slice),!!e.structure)}}sx.MAP_BIAS=1,Qw.jsonID("replace",sx)
6389
6414
  class ax extends Qw{constructor(t,e,n,i,o,r,s=!1){super(),this.from=t,this.to=e,this.gapFrom=n,this.gapTo=i,this.slice=o,this.insert=r,this.structure=s}apply(t){if(this.structure&&(lx(t,this.from,this.gapFrom)||lx(t,this.gapTo,this.to)))return tx.fail("Structure gap-replace would overwrite content")
6390
6415
  let e=t.slice(this.gapFrom,this.gapTo)
6391
6416
  if(e.openStart||e.openEnd)return tx.fail("Gap is not a flat range")
@@ -6553,7 +6578,13 @@ if(i.node(t).canReplaceWith(e,e,n))return i.before(t+1)
6553
6578
  if(e>0)return null}if(i.parentOffset==i.parent.content.size)for(let t=i.depth-1;t>=0;t--){let e=i.indexAfter(t)
6554
6579
  if(i.node(t).canReplaceWith(e,e,n))return i.after(t+1)
6555
6580
  if(e<i.node(t).childCount)return null}return null}(t.doc,e,i.type)
6556
- null!=o&&(e=n=o)}t.replaceRange(e,n,new jy(Py.from(i),0,0))}(this,t,e,n),this}deleteRange(t,e){return function(t,e,n){let i=t.doc.resolve(e),o=t.doc.resolve(n),r=Tx(i,o)
6581
+ null!=o&&(e=n=o)}t.replaceRange(e,n,new jy(Py.from(i),0,0))}(this,t,e,n),this}deleteRange(t,e){return function(t,e,n){let i=t.doc.resolve(e),o=t.doc.resolve(n)
6582
+ if(i.parent.isTextblock&&o.parent.isTextblock&&i.start()!=o.start()&&0==i.parentOffset&&0==o.parentOffset){let r=i.sharedDepth(n),s=!1
6583
+ for(let t=i.depth;t>r;t--)i.node(t).type.spec.isolating&&(s=!0)
6584
+ for(let t=o.depth;t>r;t--)o.node(t).type.spec.isolating&&(s=!0)
6585
+ if(!s){for(let t=i.depth;t>0&&e==i.start(t);t--)e=i.before(t)
6586
+ for(let t=o.depth;t>0&&n==o.start(t);t--)n=o.before(t)
6587
+ i=t.doc.resolve(e),o=t.doc.resolve(n)}}let r=Tx(i,o)
6557
6588
  for(let e=0;e<r.length;e++){let n=r[e],s=e==r.length-1
6558
6589
  if(s&&0==n||i.node(n).type.contentMatch.validEnd)return t.delete(i.start(n),o.end(n))
6559
6590
  if(n>0&&(s||i.node(n-1).canReplace(i.index(n-1),o.indexAfter(n-1))))return t.delete(i.before(n),o.after(n))}for(let r=1;r<=i.depth&&r<=o.depth;r++)if(e-i.start(r)==i.depth-r&&n>i.end(r)&&o.end(r)-n!=o.depth-r&&i.start(r-1)==o.start(r-1)&&i.node(r-1).canReplace(i.index(r-1),o.index(r-1)))return t.delete(i.before(r),n)
@@ -7761,17 +7792,16 @@ if(!s||!o.canReplaceWith(r,r,s))return!1
7761
7792
  if(e){let i=n.after(),o=t.tr.replaceWith(i,i,s.createAndFill())
7762
7793
  o.setSelection(Lx.near(o.doc.resolve(i),1)),e(o.scrollIntoView())}return!0})(t,e)
7763
7794
  function x$(t){return"[object RegExp]"===Object.prototype.toString.call(t)}function C$(t,e,n={strict:!0}){const i=Object.keys(e)
7764
- return!i.length||i.every(i=>n.strict?e[i]===t[i]:x$(e[i])?e[i].test(t[i]):e[i]===t[i])}function k$(t,e,n={}){return t.find(t=>t.type===e&&C$(Object.fromEntries(Object.keys(n).map(e=>[e,t.attrs[e]])),n))}function S$(t,e,n={}){return!!k$(t,e,n)}function _$(t,e,n){var i
7765
- if(!t||!e)return
7766
- let o=t.parent.childAfter(t.parentOffset)
7767
- if(o.node&&o.node.marks.some(t=>t.type===e)||(o=t.parent.childBefore(t.parentOffset)),!o.node||!o.node.marks.some(t=>t.type===e))return
7768
- n=n||(null==(i=o.node.marks[0])?void 0:i.attrs)
7769
- if(!k$([...o.node.marks],e,n))return
7770
- let r=o.index,s=t.start()+o.offset,a=r+1,l=s+o.node.nodeSize
7771
- for(;r>0&&S$([...t.parent.child(r-1).marks],e,n);)r-=1,s-=t.parent.child(r).nodeSize
7772
- for(;a<t.parent.childCount&&S$([...t.parent.child(a).marks],e,n);)l+=t.parent.child(a).nodeSize,a+=1
7773
- return{from:s,to:l}}function $$(t,e){if("string"==typeof t){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`)
7774
- return e.marks[t]}return t}var M$=(t,e={})=>({tr:n,state:i,dispatch:o})=>{const r=$$(t,i.schema),{doc:s,selection:a}=n,{$from:l,from:c,to:d}=a
7795
+ return!i.length||i.every(i=>n.strict?e[i]===t[i]:x$(e[i])?e[i].test(t[i]):e[i]===t[i])}function k$(t,e,n={}){return t.find(t=>t.type===e&&C$(Object.fromEntries(Object.keys(n).map(e=>[e,t.attrs[e]])),n))}function S$(t,e,n={}){return!!k$(t,e,n)}function _$(t,e,n){if(!t||!e)return
7796
+ let i=t.parent.childAfter(t.parentOffset)
7797
+ if(i.node&&i.node.marks.some(t=>t.type===e)||(i=t.parent.childBefore(t.parentOffset)),!i.node||!i.node.marks.some(t=>t.type===e))return
7798
+ if(!n){const t=i.node.marks.find(t=>t.type===e)
7799
+ t&&(n=t.attrs)}if(!k$([...i.node.marks],e,n))return
7800
+ let o=i.index,r=t.start()+i.offset,s=o+1,a=r+i.node.nodeSize
7801
+ for(;o>0&&S$([...t.parent.child(o-1).marks],e,n);)o-=1,r-=t.parent.child(o).nodeSize
7802
+ for(;s<t.parent.childCount&&S$([...t.parent.child(s).marks],e,n);)a+=t.parent.child(s).nodeSize,s+=1
7803
+ return{from:r,to:a}}function $$(t,e){if("string"==typeof t){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`)
7804
+ return e.marks[t]}return t}var M$=(t,e)=>({tr:n,state:i,dispatch:o})=>{const r=$$(t,i.schema),{doc:s,selection:a}=n,{$from:l,from:c,to:d}=a
7775
7805
  if(o){const t=_$(l,r,e)
7776
7806
  if(t&&t.from<=c&&t.to>=d){const e=Vx.create(s,t.from,t.to)
7777
7807
  n.setSelection(e)}}return!0},I$=t=>e=>{const n="function"==typeof t?t(e):t
@@ -8199,7 +8229,7 @@ NM(s).forEach(e=>{s.mapping.mapResult(e.oldRange.from).deletedAfter&&s.mapping.m
8199
8229
  this.editor.emit("delete",{type:"node",node:n,from:i,to:o,newFrom:s.mapping.map(i),newTo:s.mapping.map(o),deletedRange:e.oldRange,newRange:e.newRange,partial:!r,editor:this.editor,transaction:t,combinedTransform:s})})})
8200
8230
  const a=s.mapping
8201
8231
  s.steps.forEach((e,n)=>{var i,o
8202
- if(e instanceof ix){const r=a.slice(n).map(e.from,-1),l=a.slice(n).map(e.to),c=a.invert().map(r,-1),d=a.invert().map(l),h=null==(i=s.doc.nodeAt(r-1))?void 0:i.marks.some(t=>t.eq(e.mark)),u=null==(o=s.doc.nodeAt(l))?void 0:o.marks.some(t=>t.eq(e.mark))
8232
+ if(e instanceof ix){const r=a.slice(n).map(e.from,-1),l=a.slice(n).map(e.to),c=a.invert().map(r,-1),d=a.invert().map(l),h=r>0&&(null==(i=s.doc.nodeAt(r-1))?void 0:i.marks.some(t=>t.eq(e.mark))),u=null==(o=s.doc.nodeAt(l))?void 0:o.marks.some(t=>t.eq(e.mark))
8203
8233
  this.editor.emit("delete",{type:"mark",mark:e.mark,from:e.from,to:e.to,deletedRange:{from:c,to:d},newRange:{from:r,to:l},partial:Boolean(u||h),editor:this.editor,transaction:t,combinedTransform:s})}})}
8204
8234
  null==(o=null==(i=null==(n=this.editor.options.coreExtensionOptions)?void 0:n.delete)?void 0:i.async)||o?setTimeout(r,0):r()}}),DI=II.create({name:"drop",addProseMirrorPlugins(){return[new nC({key:new rC("tiptapDrop"),props:{handleDrop:(t,e,n,i)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:i})}}})]}}),OI=II.create({name:"editable",addProseMirrorPlugins(){return[new nC({key:new rC("editable"),props:{editable:()=>this.editor.options.editable}})]}}),RI=new rC("focusEvents"),FI=II.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this
8205
8235
  return[new nC({key:RI,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0
@@ -10120,34 +10150,35 @@ let w=y+g[0].length
10120
10150
  return l&&d.test(f.slice(w-1,w+1))&&(g[0]+=" ",w+=1),y<a.pos&&w>=a.pos?{range:{from:y,to:w},query:g[0].slice(n.length),text:g[0]}:null}II.create({name:"listKit",addExtensions(){const t=[]
10121
10151
  return!1!==this.options.bulletList&&t.push(aF.configure(this.options.bulletList)),!1!==this.options.listItem&&t.push(lF.configure(this.options.listItem)),!1!==this.options.listKeymap&&t.push(yF.configure(this.options.listKeymap)),!1!==this.options.orderedList&&t.push(_F.configure(this.options.orderedList)),!1!==this.options.taskItem&&t.push(MF.configure(this.options.taskItem)),!1!==this.options.taskList&&t.push(IF.configure(this.options.taskList)),t}})
10122
10152
  var AF=new rC("suggestion")
10123
- function TF({pluginKey:t=AF,editor:e,char:n="@",allowSpaces:i=!1,allowToIncludeChar:o=!1,allowedPrefixes:r=[" "],startOfLine:s=!1,decorationTag:a="span",decorationClass:l="suggestion",decorationContent:c="",decorationEmptyClass:d="is-empty",command:h=()=>null,items:u=()=>[],render:p=()=>({}),allow:f=()=>!0,findSuggestionMatch:m=EF,shouldShow:g}){let v
10124
- const b=null==p?void 0:p(),y=()=>{const t=e.state.selection.$anchor.pos,n=e.view.coordsAtPos(t),{top:i,right:o,bottom:r,left:s}=n
10125
- try{return new DOMRect(s,i,o-s,r-i)}catch{return null}},w=(n,i)=>i?()=>{const i=t.getState(e.state),o=null==i?void 0:i.decorationId,r=n.dom.querySelector(`[data-decoration-id="${o}"]`)
10126
- return(null==r?void 0:r.getBoundingClientRect())||null}:y
10127
- const x=new nC({key:t,view(){return{update:async(t,n)=>{var i,o,r,s,a,l,c
10128
- const d=null==(i=this.key)?void 0:i.getState(n),p=null==(o=this.key)?void 0:o.getState(t.state),f=d.active&&p.active&&d.range.from!==p.range.from,m=!d.active&&p.active,g=d.active&&!p.active,y=!m&&!g&&d.query!==p.query,x=m||f&&y,C=y||f,k=g||f&&y
10129
- if(!x&&!C&&!k)return
10130
- const S=k&&!x?d:p,_=t.dom.querySelector(`[data-decoration-id="${S.decorationId}"]`)
10131
- v={editor:e,range:S.range,query:S.query,text:S.text,items:[],command:t=>h({editor:e,range:S.range,props:t}),decorationNode:_,clientRect:w(t,_)},x&&(null==(r=null==b?void 0:b.onBeforeStart)||r.call(b,v)),C&&(null==(s=null==b?void 0:b.onBeforeUpdate)||s.call(b,v)),(C||x)&&(v.items=await u({editor:e,query:S.query})),k&&(null==(a=null==b?void 0:b.onExit)||a.call(b,v)),C&&(null==(l=null==b?void 0:b.onUpdate)||l.call(b,v)),x&&(null==(c=null==b?void 0:b.onStart)||c.call(b,v))},destroy:()=>{var t
10132
- v&&(null==(t=null==b?void 0:b.onExit)||t.call(b,v))}}},state:{init:()=>({active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}),apply(a,l,c,d){const{isEditable:h}=e,{composing:u}=e.view,{selection:p}=a,{empty:v,from:b}=p,y={...l},w=a.getMeta(t)
10133
- if(w&&w.exit)return y.active=!1,y.decorationId=null,y.range={from:0,to:0},y.query=null,y.text=null,y
10134
- if(y.composing=u,h&&(v||e.view.composing)){!(b<l.range.from||b>l.range.to)||u||l.composing||(y.active=!1)
10153
+ function TF({pluginKey:t=AF,editor:e,char:n="@",allowSpaces:i=!1,allowToIncludeChar:o=!1,allowedPrefixes:r=[" "],startOfLine:s=!1,decorationTag:a="span",decorationClass:l="suggestion",decorationContent:c="",decorationEmptyClass:d="is-empty",command:h=()=>null,items:u=()=>[],render:p=()=>({}),allow:f=()=>!0,findSuggestionMatch:m=EF,shouldShow:g,shouldResetDismissed:v}){let b
10154
+ const y=null==p?void 0:p(),w=i&&!o,x=()=>{const t=e.state.selection.$anchor.pos,n=e.view.coordsAtPos(t),{top:i,right:o,bottom:r,left:s}=n
10155
+ try{return new DOMRect(s,i,o-s,r-i)}catch{return null}},C=(n,i)=>i?()=>{const i=t.getState(e.state),o=null==i?void 0:i.decorationId,r=n.dom.querySelector(`[data-decoration-id="${o}"]`)
10156
+ return(null==r?void 0:r.getBoundingClientRect())||null}:x
10157
+ const k=new nC({key:t,view(){return{update:async(t,n)=>{var i,o,r,s,a,l,c
10158
+ const d=null==(i=this.key)?void 0:i.getState(n),p=null==(o=this.key)?void 0:o.getState(t.state),f=d.active&&p.active&&d.range.from!==p.range.from,m=!d.active&&p.active,g=d.active&&!p.active,v=!m&&!g&&d.query!==p.query,w=m||f&&v,x=v||f,k=g||f&&v
10159
+ if(!w&&!x&&!k)return
10160
+ const S=k&&!w?d:p,_=t.dom.querySelector(`[data-decoration-id="${S.decorationId}"]`)
10161
+ b={editor:e,range:S.range,query:S.query,text:S.text,items:[],command:t=>h({editor:e,range:S.range,props:t}),decorationNode:_,clientRect:C(t,_)},w&&(null==(r=null==y?void 0:y.onBeforeStart)||r.call(y,b)),x&&(null==(s=null==y?void 0:y.onBeforeUpdate)||s.call(y,b)),(x||w)&&(b.items=await u({editor:e,query:S.query})),k&&(null==(a=null==y?void 0:y.onExit)||a.call(y,b)),x&&(null==(l=null==y?void 0:y.onUpdate)||l.call(y,b)),w&&(null==(c=null==y?void 0:y.onStart)||c.call(y,b))},destroy:()=>{var t
10162
+ b&&(null==(t=null==y?void 0:y.onExit)||t.call(y,b))}}},state:{init:()=>({active:!1,range:{from:0,to:0},query:null,text:null,composing:!1,dismissedRange:null}),apply(a,l,c,d){const{isEditable:h}=e,{composing:u}=e.view,{selection:p}=a,{empty:b,from:y}=p,x={...l},C=a.getMeta(t)
10163
+ if(C&&C.exit)return x.active=!1,x.decorationId=null,x.range={from:0,to:0},x.query=null,x.text=null,x.dismissedRange=l.active?{...l.range}:l.dismissedRange,x
10164
+ if(x.composing=u,a.docChanged&&null!==x.dismissedRange&&(x.dismissedRange={from:a.mapping.map(x.dismissedRange.from),to:a.mapping.map(x.dismissedRange.to)}),h&&(b||e.view.composing)){!(y<l.range.from||y>l.range.to)||u||l.composing||(x.active=!1)
10135
10165
  const t=m({char:n,allowSpaces:i,allowToIncludeChar:o,allowedPrefixes:r,startOfLine:s,$position:p.$from}),c=`id_${Math.floor(4294967295*Math.random())}`
10136
- t&&f({editor:e,state:d,range:t.range,isActive:l.active})&&(!g||g({editor:e,range:t.range,query:t.query,text:t.text,transaction:a}))?(y.active=!0,y.decorationId=l.decorationId?l.decorationId:c,y.range=t.range,y.query=t.query,y.text=t.text):y.active=!1}else y.active=!1
10137
- return y.active||(y.decorationId=null,y.range={from:0,to:0},y.query=null,y.text=null),y}},props:{handleKeyDown(n,i){var o,r,s,a
10138
- const{active:l,range:c}=x.getState(n.state)
10139
- if(!l)return!1
10140
- if("Escape"===i.key||"Esc"===i.key){const a=x.getState(n.state),l=null!=(o=null==v?void 0:v.decorationNode)?o:null,c=null!=l?l:(null==a?void 0:a.decorationId)?n.dom.querySelector(`[data-decoration-id="${a.decorationId}"]`):null
10141
- if((null==(r=null==b?void 0:b.onKeyDown)?void 0:r.call(b,{view:n,event:i,range:a.range}))||!1)return!0
10142
- const d={editor:e,range:a.range,query:a.query,text:a.text,items:[],command:t=>h({editor:e,range:a.range,props:t}),decorationNode:c,clientRect:c?()=>c.getBoundingClientRect()||null:null}
10143
- return null==(s=null==b?void 0:b.onExit)||s.call(b,d),function(n,i){var o
10144
- try{const i=t.getState(n.state),r=(null==i?void 0:i.decorationId)?n.dom.querySelector(`[data-decoration-id="${i.decorationId}"]`):null,s={editor:e,range:(null==i?void 0:i.range)||{from:0,to:0},query:(null==i?void 0:i.query)||null,text:(null==i?void 0:i.text)||null,items:[],command:t=>h({editor:e,range:(null==i?void 0:i.range)||{from:0,to:0},props:t}),decorationNode:r,clientRect:w(n,r)}
10145
- null==(o=null==b?void 0:b.onExit)||o.call(b,s)}catch{}const r=n.state.tr.setMeta(i,{exit:!0})
10146
- n.dispatch(r)}(n,t),!0}return(null==(a=null==b?void 0:b.onKeyDown)?void 0:a.call(b,{view:n,event:i,range:c}))||!1},decorations(t){const{active:e,range:n,decorationId:i,query:o}=x.getState(t)
10166
+ t&&f({editor:e,state:d,range:t.range,isActive:l.active})&&(!g||g({editor:e,range:t.range,query:t.query,text:t.text,transaction:a}))?(null===x.dismissedRange||(({match:t,dismissedRange:n,state:i,transaction:o})=>!(null==v?void 0:v({editor:e,state:i,range:n,match:t,transaction:o,allowSpaces:w}))&&(w?t.range.from===n.from:t.range.from===n.from&&!function(t){return!!t.docChanged&&t.steps.some(t=>{const e=t.slice
10167
+ if(!(null==e?void 0:e.content))return!1
10168
+ const n=e.content.textBetween(0,e.content.size,"\n")
10169
+ return/\s/.test(n)})}(o)))({match:t,dismissedRange:x.dismissedRange,state:d,transaction:a})||(x.dismissedRange=null),null===x.dismissedRange?(x.active=!0,x.decorationId=l.decorationId?l.decorationId:c,x.range=t.range,x.query=t.query,x.text=t.text):x.active=!1):(t||(x.dismissedRange=null),x.active=!1)}else x.active=!1
10170
+ return x.active||(x.decorationId=null,x.range={from:0,to:0},x.query=null,x.text=null),x}},props:{handleKeyDown(n,i){var o,r
10171
+ const{active:s,range:a}=k.getState(n.state)
10172
+ if(!s)return!1
10173
+ if("Escape"===i.key||"Esc"===i.key){const r=k.getState(n.state)
10174
+ return null==(o=null==y?void 0:y.onKeyDown)||o.call(y,{view:n,event:i,range:r.range}),function(n,i){var o
10175
+ try{const i=t.getState(n.state),r=(null==i?void 0:i.decorationId)?n.dom.querySelector(`[data-decoration-id="${i.decorationId}"]`):null,s={editor:e,range:(null==i?void 0:i.range)||{from:0,to:0},query:(null==i?void 0:i.query)||null,text:(null==i?void 0:i.text)||null,items:[],command:t=>h({editor:e,range:(null==i?void 0:i.range)||{from:0,to:0},props:t}),decorationNode:r,clientRect:C(n,r)}
10176
+ null==(o=null==y?void 0:y.onExit)||o.call(y,s)}catch{}const r=n.state.tr.setMeta(i,{exit:!0})
10177
+ n.dispatch(r)}(n,t),!0}return(null==(r=null==y?void 0:y.onKeyDown)?void 0:r.call(y,{view:n,event:i,range:a}))||!1},decorations(t){const{active:e,range:n,decorationId:i,query:o}=k.getState(t)
10147
10178
  if(!e)return null
10148
10179
  const r=!(null==o?void 0:o.length),s=[l]
10149
10180
  return r&&s.push(d),m_.create(t.doc,[u_.inline(n.from,n.to,{nodeName:a,class:s.join(" "),"data-decoration-id":i,"data-decoration-content":c})])}}})
10150
- return x}function DF(t){return(t.options.suggestions.length?t.options.suggestions:[t.options.suggestion]).map(e=>function({editor:t,overrideSuggestionOptions:e,extensionName:n,char:i="@"}){const o=new rC
10181
+ return k}function DF(t){return(t.options.suggestions.length?t.options.suggestions:[t.options.suggestion]).map(e=>function({editor:t,overrideSuggestionOptions:e,extensionName:n,char:i="@"}){const o=new rC
10151
10182
  return{editor:t,char:i,pluginKey:o,command:({editor:t,range:e,props:o})=>{var r,s,a
10152
10183
  const l=t.view.state.selection.$to.nodeAfter;(null==(r=null==l?void 0:l.text)?void 0:r.startsWith(" "))&&(e.to+=1),t.chain().focus().insertContentAt(e,[{type:n,attrs:{...o,mentionSuggestionChar:i}},{type:"text",text:" "}]).run(),null==(a=null==(s=t.view.dom.ownerDocument.defaultView)?void 0:s.getSelection())||a.collapseToEnd()},allow:({state:t,range:e})=>{const i=t.doc.resolve(e.from),o=t.schema.nodes[n]
10153
10184
  return!!i.parent.type.contentMatch.matchType(o)},...e}}({editor:t.editor,overrideSuggestionOptions:e,extensionName:t.name,char:e.char}))}function OF(t,e){const n=DF(t),i=n.find(t=>t.char===e)
@@ -10169,7 +10200,7 @@ let s=new cw,a=0
10169
10200
  return e.doc.nodesBetween(r-1,r,(t,e)=>{if(t.type.name===this.name)return n=!0,s=t,a=e,!1}),n&&t.insertText(this.options.deleteTriggerWithBackspace?"":s.attrs.mentionSuggestionChar,a,a+s.nodeSize),n})}},addProseMirrorPlugins(){return DF(this).map(TF)}}),FF=RF,NF="&nbsp;",LF=QI.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:t}){return["p",_M(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[]
10170
10201
  if(1===n.length&&"image"===n[0].type)return e.parseChildren([n[0]])
10171
10202
  const i=e.parseInline(n)
10172
- return 1!==i.length||"text"!==i[0].type||i[0].text!==NF&&" "!==i[0].text?e.createNode("paragraph",void 0,i):e.createNode("paragraph",void 0,[])},renderMarkdown:(t,e,n)=>{var i,o
10203
+ return!(1===n.length&&"text"===n[0].type&&(n[0].raw===NF||n[0].text===NF||" "===n[0].raw||" "===n[0].text))||1!==i.length||"text"!==i[0].type||i[0].text!==NF&&" "!==i[0].text?e.createNode("paragraph",void 0,i):e.createNode("paragraph",void 0,[])},renderMarkdown:(t,e,n)=>{var i,o
10173
10204
  if(!t)return""
10174
10205
  const r=Array.isArray(t.content)?t.content:[]
10175
10206
  if(0===r.length){const t=Array.isArray(null==(i=null==n?void 0:n.previousNode)?void 0:i.content)?n.previousNode.content:[]
@@ -10355,11 +10386,12 @@ if((i||!this.options.showOnlyCurrent)&&a){const o=[this.options.emptyNodeClass]
10355
10386
  s&&o.push(this.options.emptyEditorClass)
10356
10387
  const a=u_.node(n,n+e.nodeSize,{class:o.join(" "),[t]:"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:e,pos:n,hasAnchor:i}):this.options.placeholder})
10357
10388
  r.push(a)}return this.options.includeChildren}),m_.create(e,r)}}})]}})
10358
- function vN({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(null==e?void 0:e.type)===t}II.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){const{editor:t,options:e}=this
10359
- return[new nC({key:new rC("selection"),props:{decorations:n=>n.selection.empty||t.isFocused||!t.isEditable||n.selection instanceof Ux||t.view.dragging?null:m_.create(n.doc,[u_.inline(n.selection.from,n.selection.to,{class:e.className})])}})]}}),II.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var t
10389
+ II.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){const{editor:t,options:e}=this
10390
+ return[new nC({key:new rC("selection"),props:{decorations:n=>n.selection.empty||t.isFocused||!t.isEditable||n.selection instanceof Ux||t.view.dragging?null:m_.create(n.doc,[u_.inline(n.selection.from,n.selection.to,{class:e.className})])}})]}})
10391
+ function vN({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(null==e?void 0:e.type)===t}II.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var t
10360
10392
  const e=new rC(this.name),n=this.options.node||(null==(t=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:t.name)||"paragraph",i=Object.entries(this.editor.schema.nodes).map(([,t])=>t).filter(t=>(this.options.notAfter||[]).concat(n).includes(t.name))
10361
10393
  return[new nC({key:e,appendTransaction:(t,i,o)=>{const{doc:r,tr:s,schema:a}=o,l=e.getState(o),c=r.content.size,d=a.nodes[n]
10362
- if(l)return s.insert(c,d.create())},state:{init:(t,e)=>!vN({node:e.tr.doc.lastChild,types:i}),apply:(t,e)=>{if(!t.docChanged)return e
10394
+ if(!t.some(t=>t.getMeta("skipTrailingNode"))&&l)return s.insert(c,d.create())},state:{init:(t,e)=>!vN({node:e.tr.doc.lastChild,types:i}),apply:(t,e)=>{if(!t.docChanged)return e
10363
10395
  if(t.getMeta("__uniqueIDTransaction"))return e
10364
10396
  return!vN({node:t.doc.lastChild,types:i})}}})]}})
10365
10397
  var bN=II.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:t,dispatch:e})=>pN(t,e),redo:()=>({state:t,dispatch:e})=>fN(t,e)}),addProseMirrorPlugins(){return[hN(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}})
@@ -11023,7 +11055,7 @@ const GN=Mt`
11023
11055
  }
11024
11056
  }
11025
11057
  `,ZN=ph
11026
- class KN extends(fh(Ln)){constructor(){super(...arguments),this.severity=ZN.default,this.readOnly=!1,this.selected=!1,this.stepInternals=new bg}}t([ft()],KN.prototype,"severity",void 0),t([ft({attribute:"readonly",mode:"boolean"})],KN.prototype,"readOnly",void 0),t([ft({mode:"boolean"})],KN.prototype,"selected",void 0),t([ft({attribute:"tabindex",converter:ut})],KN.prototype,"tabIndex",void 0)
11058
+ class KN extends(fh(Ln)){constructor(){super(...arguments),this.severity=ZN.default,this.readOnly=!1,this.selected=!1,this.stepInternals=new bg}onClick(t){(this.disabled||this.readOnly)&&(t.preventDefault(),t.stopImmediatePropagation())}}t([ft()],KN.prototype,"severity",void 0),t([ft({attribute:"readonly",mode:"boolean"})],KN.prototype,"readOnly",void 0),t([ft({mode:"boolean"})],KN.prototype,"selected",void 0),t([ft({attribute:"tabindex",converter:ut})],KN.prototype,"tabIndex",void 0)
11027
11059
  const YN=KN.compose({baseName:"step",template:(t,e)=>Q`
11028
11060
  <template slot="step">
11029
11061
  <li class="
@@ -11067,6 +11099,7 @@ const YN=KN.compose({baseName:"step",template:(t,e)=>Q`
11067
11099
  aria-pressed="${t=>t.ariaPressed}"
11068
11100
  aria-relevant="${t=>t.ariaRelevant}"
11069
11101
  aria-roledescription="${t=>t.ariaRoledescription}"
11102
+ @click="${(t,e)=>t.onClick(e.event)}"
11070
11103
  ${zt("control")}
11071
11104
  >
11072
11105
  <div class="icon-background"></div>