@luzmo/lucero 2.0.0 → 2.1.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.
Files changed (155) hide show
  1. package/README.md +1 -0
  2. package/components/action-bar/index.cjs +1 -1
  3. package/components/action-bar/index.js +1 -1
  4. package/components/{action-bar-BhYEHEfo.js → action-bar-2FGCCKMW.js} +1 -1
  5. package/components/{action-bar-VhZT8kQM.cjs → action-bar-CXT4lT30.cjs} +1 -1
  6. package/components/action-button/index.cjs +1 -1
  7. package/components/action-button/index.js +1 -1
  8. package/components/action-button-BKnzGQR6.cjs +22 -0
  9. package/components/action-button-OB5MM04X.js +137 -0
  10. package/components/action-menu/index.cjs +1 -1
  11. package/components/action-menu/index.js +1 -1
  12. package/components/{action-menu-DREgNCXt.cjs → action-menu-CtMswuyc.cjs} +1 -1
  13. package/components/{action-menu-CkU-u55D.js → action-menu-Diehg1Kc.js} +2 -2
  14. package/components/badge/badge.d.ts +3 -0
  15. package/components/badge/index.cjs +1 -1
  16. package/components/badge/index.js +1 -1
  17. package/components/badge-CrUIOuV-.cjs +23 -0
  18. package/components/badge-DAGeawhJ.js +95 -0
  19. package/components/button/button-base.d.ts +3 -0
  20. package/components/button/index.cjs +1 -1
  21. package/components/button/index.js +2 -2
  22. package/components/button-DXWWEbir.js +125 -0
  23. package/components/{button-base-aTiE83bl.cjs → button-base-DiNxrttk.cjs} +3 -3
  24. package/components/{button-base-DsUg0bJB.js → button-base-DiPzVpp4.js} +12 -11
  25. package/components/button-l0fRopSN.cjs +20 -0
  26. package/components/calendar/index.cjs +1 -1
  27. package/components/calendar/index.js +1 -1
  28. package/components/{calendar-CXjdC7jm.js → calendar-C8u_88jX.js} +1 -1
  29. package/components/{calendar-DSlKZZCR.cjs → calendar-DZkKMs2L.cjs} +1 -1
  30. package/components/chat-message/index.cjs +1 -1
  31. package/components/chat-message/index.js +1 -1
  32. package/components/{chat-message-CJ7Xk7tz.js → chat-message-CXq0Trjx.js} +1 -1
  33. package/components/{chat-message-7cx2Bpo8.cjs → chat-message-t4a0r3R6.cjs} +1 -1
  34. package/components/{close-button-hicleVjQ.cjs → close-button-BntGLAcp.cjs} +1 -1
  35. package/components/{close-button-WomHVbgz.js → close-button-D12zZ9zC.js} +1 -1
  36. package/components/color-area/index.cjs +1 -1
  37. package/components/color-area/index.js +1 -1
  38. package/components/{color-area-ayGmH8dj.cjs → color-area-B_pRu9Vf.cjs} +6 -6
  39. package/components/{color-area-BRrtUbvH.js → color-area-DMpXKgPY.js} +9 -9
  40. package/components/color-menu/index.cjs +1 -1
  41. package/components/color-menu/index.js +1 -1
  42. package/components/{color-menu-DOq9PAWG.cjs → color-menu-CdETqhbP.cjs} +1 -1
  43. package/components/{color-menu-iKU6Vw8a.js → color-menu-jkdcr5ir.js} +2 -2
  44. package/components/color-picker/index.cjs +1 -1
  45. package/components/color-picker/index.js +1 -1
  46. package/components/{color-picker-D3WFls0M.cjs → color-picker-C4pvkA2k.cjs} +1 -1
  47. package/components/{color-picker-Bw5UKyME.js → color-picker-DF3gBQvH.js} +1 -1
  48. package/components/color-slider/index.cjs +1 -1
  49. package/components/color-slider/index.js +1 -1
  50. package/components/{color-slider-BiVpn9_U.cjs → color-slider-DLEM1nGA.cjs} +1 -1
  51. package/components/{color-slider-BtPNTmQu.js → color-slider-DejvUYrW.js} +1 -1
  52. package/components/date-range-picker/index.cjs +1 -1
  53. package/components/date-range-picker/index.js +1 -1
  54. package/components/{date-range-picker-DMq8EaiB.cjs → date-range-picker-9ioTuDZq.cjs} +1 -1
  55. package/components/{date-range-picker-DaHFLwQL.js → date-range-picker-DCOv5PYH.js} +2 -2
  56. package/components/date-time-picker/index.cjs +1 -1
  57. package/components/date-time-picker/index.js +1 -1
  58. package/components/{date-time-picker-hjeFVUz9.js → date-time-picker-ClgATXBy.js} +2 -2
  59. package/components/{date-time-picker-DdtcziBG.cjs → date-time-picker-DRjQTyGS.cjs} +1 -1
  60. package/components/index.cjs +1 -1
  61. package/components/index.js +34 -33
  62. package/components/infield-button/index.cjs +1 -1
  63. package/components/infield-button/index.js +1 -1
  64. package/components/{infield-button-BmGfFDDA.js → infield-button-C1mz69Qf.js} +1 -1
  65. package/components/{infield-button-Cdee_UPX.cjs → infield-button-CYO9V1eX.cjs} +1 -1
  66. package/components/language-resolution-BaKYDD1a.js +115 -0
  67. package/components/language-resolution-CSjktYg5.cjs +18 -0
  68. package/components/menu/index.cjs +1 -1
  69. package/components/menu/index.js +1 -1
  70. package/components/{menu-DXONqtwu.cjs → menu-Cq7BEv5Y.cjs} +2 -2
  71. package/components/{menu-C9ogB7Bq.js → menu-DY8q8qyn.js} +2 -2
  72. package/components/notice/index.cjs +1 -1
  73. package/components/notice/index.js +1 -1
  74. package/components/{notice-BeL9oE94.js → notice-s6QHF_tq.js} +1 -1
  75. package/components/{notice-COZLmk94.cjs → notice-xgrLOiC0.cjs} +1 -1
  76. package/components/number-field/index.cjs +1 -1
  77. package/components/number-field/index.js +1 -1
  78. package/components/number-field-04RFqrUa.cjs +57 -0
  79. package/components/{number-field-DjvWkjL8.js → number-field-BqnZS9Gx.js} +17 -17
  80. package/components/options/index.cjs +1 -1
  81. package/components/options/index.js +1 -1
  82. package/components/options/options.d.ts +3 -0
  83. package/components/{options-C1MoEq26.js → options-BqFBNoKA.js} +15 -14
  84. package/components/{options-yWbz0D6O.cjs → options-Dh4FJuAu.cjs} +13 -12
  85. package/components/picker/index.cjs +1 -1
  86. package/components/picker/index.js +1 -1
  87. package/components/picker/picker.d.ts +3 -0
  88. package/components/picker-D225VAbx.cjs +124 -0
  89. package/components/picker-button/index.cjs +1 -1
  90. package/components/picker-button/index.js +1 -1
  91. package/components/{picker-button-Dh2gGZ8R.cjs → picker-button-BR7oM7_M.cjs} +1 -1
  92. package/components/{picker-button-CF6yD_1d.js → picker-button-DVzLeTq8.js} +1 -1
  93. package/components/{picker-Bufw-biD.js → picker-f4fSGZX8.js} +58 -57
  94. package/components/prompt-box/index.cjs +1 -1
  95. package/components/prompt-box/index.js +1 -1
  96. package/components/{prompt-box-y7qWHF3P.js → prompt-box-BY1xKFZO.js} +2 -2
  97. package/components/{prompt-box-D358CWoY.cjs → prompt-box-Dg9S0C5x.cjs} +1 -1
  98. package/components/question-box/index.cjs +1 -1
  99. package/components/question-box/index.js +1 -1
  100. package/components/{question-box-9F6Ppakl.js → question-box-5VO9CM8H.js} +4 -4
  101. package/components/{question-box-DaAgC3_D.cjs → question-box-DvXRIiVG.cjs} +1 -1
  102. package/components/search/index.cjs +1 -1
  103. package/components/search/index.js +1 -1
  104. package/components/{search-CsNvKd8x.cjs → search-BhMhfCBh.cjs} +1 -1
  105. package/components/{search-B2DQb14U.js → search-C-EPZmTG.js} +1 -1
  106. package/components/select/index.cjs +1 -1
  107. package/components/select/index.js +1 -1
  108. package/components/{select-CE6pIRX3.js → select-CFtAPE-U.js} +9 -9
  109. package/components/{select-B_E-w1a2.cjs → select-JFwtVyhG.cjs} +2 -2
  110. package/components/slider/index.cjs +1 -1
  111. package/components/slider/index.js +1 -1
  112. package/components/{slider-CfgH3NK8.js → slider-B7QAhDTM.js} +2 -2
  113. package/components/{slider-CDrXecqO.cjs → slider-DxliwjT6.cjs} +2 -2
  114. package/components/{language-resolution-BUeKpSce.cjs → split-view/index.cjs} +1 -1
  115. package/components/split-view/index.d.ts +7 -0
  116. package/components/split-view/index.js +25 -0
  117. package/components/split-view/split-view-model.d.ts +12 -0
  118. package/components/split-view/split-view.d.ts +106 -0
  119. package/components/split-view-5uMSU_b7.cjs +43 -0
  120. package/components/split-view-FxpiSCem.js +359 -0
  121. package/components/status-light/index.cjs +1 -1
  122. package/components/status-light/index.js +1 -1
  123. package/components/status-light/status-light.d.ts +3 -0
  124. package/components/status-light-BYBYorYy.cjs +21 -0
  125. package/components/status-light-DC8qqO8q.js +86 -0
  126. package/components/tabs/index.cjs +1 -1
  127. package/components/tabs/index.js +1 -1
  128. package/components/{tabs-D1puCPrL.js → tabs-CjY4eX9W.js} +1 -1
  129. package/components/{tabs-CcnIX4jQ.cjs → tabs-ZwcVrVub.cjs} +1 -1
  130. package/components/tags/index.cjs +1 -1
  131. package/components/tags/index.js +1 -1
  132. package/components/tags/tag.d.ts +3 -0
  133. package/components/tags-B28zWEic.cjs +47 -0
  134. package/components/tags-BCKNzEaH.js +207 -0
  135. package/components/toast/index.cjs +1 -1
  136. package/components/toast/index.js +1 -1
  137. package/components/{toast-BPhdMJTx.cjs → toast-COQ7Xl5T.cjs} +1 -1
  138. package/components/{toast-D90C9Cim.js → toast-DlOeMDCI.js} +1 -1
  139. package/custom-elements.json +1 -1
  140. package/index.d.ts +1 -0
  141. package/package.json +7 -1
  142. package/utils/reactive-controllers/language-resolution.d.ts +32 -2
  143. package/components/action-button-CWAg-5tz.cjs +0 -22
  144. package/components/action-button-cULkUUi6.js +0 -137
  145. package/components/badge-BzQfqgq6.cjs +0 -23
  146. package/components/badge-Dnkh-mfN.js +0 -94
  147. package/components/button-BJ0Y6wlM.cjs +0 -20
  148. package/components/button-BtWr5Lag.js +0 -125
  149. package/components/language-resolution-DR30FsWE.js +0 -43
  150. package/components/number-field-D19qjVbk.cjs +0 -57
  151. package/components/picker-D6ZM08K8.cjs +0 -124
  152. package/components/status-light-BlfBJpqa.js +0 -85
  153. package/components/status-light-Bu0G8-lH.cjs +0 -21
  154. package/components/tags-Bw-y2Wfl.js +0 -206
  155. package/components/tags-Cr8ObbWn.cjs +0 -47
@@ -15,7 +15,7 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- const e=require("./decorate-Dq34MBGe.cjs"),t=require("./sized-mixin-BT7cv-fT.cjs"),n=require("./focusable-B6h03pAe.cjs"),r=require("./language-resolution-BUeKpSce.cjs"),i=require("./manage-help-text-DtFJsl0k.cjs");require("./number-field-D19qjVbk.cjs");let a=require("lit"),o=require("lit/decorators.js"),s=require("lit/directives/if-defined.js"),c=require("lit/directives/class-map.js"),l=require("lit/directives/style-map.js"),u=require("@internationalized/number"),d=require("lit/directives/repeat.js");var f={toNormalized(e,t,n){return n===t?0:(e-t)/(n-t)},fromNormalized(e,t,n){return e*(n-t)+t}},p=(e,t)=>{let n=e;for(let[e,r]of Object.entries(t))n=n.replaceAll(`{${e}}`,r);return n},m=e=>{if(!Number.isFinite(e))return 0;let t=Math.abs(e).toString(),n=t.match(/^\d+(?:\.(?<fraction>\d+))?e(?<exponent>[+-]\d+)$/);if(n?.groups){let{fraction:e=``,exponent:t}=n.groups;return Math.min(Math.max(e.length-Number(t),0),20)}let[,r=``]=t.split(`.`);return Math.min(r.length,20)},h=(e,t)=>{let n;try{n=e()}catch{n=void 0}if(typeof n==`number`&&!Number.isNaN(n))return n;let r=t();return Number.isNaN(r)?0:r},g=(e,t)=>Number.isFinite(e)?e:t,_=(e,t,n)=>Math.min(Math.max(e,Math.min(t,n)),Math.max(t,n)),v=(e,t,n,r)=>{let i=g(t,0),a=g(n,i),o=Number.isFinite(r)&&r>0?r:1,s=Number.isNaN(e)?i:e,c=Math.max(m(o),m(i),m(a)),l=i+Math.round((_(s,i,a)-i)/o)*o;return _(Number(l.toFixed(c)),i,a)},y=(e,t,n,r=f)=>_(h(()=>r.toNormalized(e,t,n),()=>f.toNormalized(e,t,n)),0,1),b=(e,t,n,r,i=f)=>{let a=_(e,0,1);return v(h(()=>i.fromNormalized(a,t,n),()=>f.fromNormalized(a,t,n)),t,n,r)},x=(e,t,n)=>{if(!Number.isFinite(e)||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||t<=e)return[];let r=Math.floor((t-e)/n)+1;if(r>250)return[];let i=Math.max(m(e),m(n));return Array.from({length:r},(t,r)=>Number((e+r*n).toFixed(i)))},S=(e,t,n,r,i=f)=>{let a=t+(n-t)/2,o=r===!0?a:r===void 0?t:r,s=y(Number.isNaN(o)?t:o,t,n,i),c=y(e,t,n,i);return[Math.min(s,c),Math.max(s,c)]},C=(e,t)=>e+(t-e)/2,w=class{constructor(e,t,n,r){this._applySingleValue=t,this._formatHandleValue=n,this._formatHandleLabel=r,this._attachedHandles=new Set,this._inputMap=new WeakMap,this.activeIndex=0,this.draggingIndex=-1,this._host=e,this._host.addController(this)}hostConnected(){this.invalidate(),this._syncAttachments()}hostDisconnected(){this.draggingIndex=-1,this._detachHandles(),this._inputMap=new WeakMap,this._cachedModels=void 0}hostUpdate(){this._syncAttachments(),this._cachedModels=this._resolveModels()}hostUpdated(){this._syncInputReferences(),this._commitClampedValues()}get handles(){let e=this._host.shadowRoot?.querySelector(`slot[name="handle"]`);return(e?e.assignedElements():[...this._host.children]).filter(e=>e.localName===`luzmo-slider-handle`&&e.slot===`handle`)}get models(){return this._cachedModels??this._resolveModels()}get values(){return Object.fromEntries(this.models.map(({name:e,value:t})=>[e,t]))}invalidate(){this._cachedModels=void 0}requestHostUpdate(){this.invalidate(),this._host.requestUpdate()}inputForHandle(e){return this._inputMap.get(e)}setValue(e,t){let n=this.models[e];if(!n)return!1;this.activeIndex=e;let r=v(t,n.effectiveMin,n.effectiveMax,n.step);return r===n.value?!1:(n.handle?n.handle.value=r:this._applySingleValue(r),this._cachedModels=this._resolveModels(),!0)}setNormalizedValue(e,t){let n=this.models[e];return n?this.setValue(e,b(t,n.min,n.max,n.step,n.normalization)):!1}nearestIndex(e){let t=this.models;return t.reduce((n,r,i)=>Math.abs(r.normalizedValue-e)<Math.abs(t[n].normalizedValue-e)?i:n,Math.min(Math.max(this.activeIndex,0),t.length-1))}reset(e){let t=this.models[e];return!t||t.defaultValue===void 0||!this.setValue(e,t.defaultValue)?!1:(this.dispatchInput(e),this.dispatchChange(e),!0)}dispatchInput(e){this._eventTarget(e).dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0}))}dispatchChange(e){this._eventTarget(e).dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0}))}formatValue(e){let t=this.models[e];return t?this._formatHandleValue(t):``}_eventTarget(e){return this.models[e]?.handle??this._host}_syncInputReferences(){this._inputMap=new WeakMap;let e=this._host.shadowRoot?.querySelectorAll(`input[type="range"]`)??[];this.models.forEach((t,n)=>{t.handle&&e[n]&&this._inputMap.set(t.handle,e[n])})}_commitClampedValues(){for(let e of this.models)e.handle&&e.handle.value!==e.value&&(e.handle.value=e.value)}_syncAttachments(){let e=new Set(this._host.isConnected?this.handles:[]);for(let t of this._attachedHandles)e.has(t)||t.detachController(this);for(let t of e)t.attachController(this);this._attachedHandles=e}_detachHandles(){for(let e of this._attachedHandles)e.detachController(this);this._attachedHandles.clear()}_resolveModels(){let e=this.handles;if(e.length===0)return[this._resolveSingleModel()];let t=e.map(e=>{let t=typeof e.min==`number`&&Number.isFinite(e.min)?e.min:this._host.min,n=typeof e.max==`number`&&Number.isFinite(e.max)?e.max:this._host.max;return{min:t,max:Math.max(t,n)}}),n=e.map((e,n)=>{let{min:r,max:i}=t[n],a=this._resolveStep(e.step);return v(Number.isFinite(e.value)?e.value:C(r,i),r,i,a)}),r=new Set;return e.map((i,a)=>{let{min:o,max:s}=t[a],c=this._resolveStep(i.step),l=i.min===`previous`&&a>0?Math.max(o,n[a-1]):o,u=Math.max(l,i.max===`next`&&a<e.length-1?Math.min(s,n[a+1]):s),d=v(n[a],l,u,c),f=i.normalization;return{handle:i,name:this._uniqueName(i.name,a,r),label:this._formatHandleLabel(i,a),value:d,min:o,max:s,effectiveMin:l,effectiveMax:u,step:c,defaultValue:i.defaultValue,normalizedValue:y(d,o,s,f),normalization:f}})}_resolveSingleModel(){let{min:e,max:t,step:n,normalization:r}=this._host,i=v(this._host.value,e,t,n);return{name:`value`,label:this._host.label,value:i,min:e,max:t,effectiveMin:e,effectiveMax:t,step:n,defaultValue:this._host.defaultValue,normalizedValue:y(i,e,t,r),normalization:r}}_resolveStep(e){return e!==void 0&&Number.isFinite(e)&&e>0?e:this._host.step}_uniqueName(e,t,n){let r=e||`handle${t+1}`;if(!n.has(r))return n.add(r),r;let i=t+1;for(;n.has(`${r}${i}`);)i+=1;let a=`${r}${i}`;return n.add(a),a}};function T({model:e,index:t,total:n,grouped:r,label:i,appliedLabel:o,helpTextId:u,labelVisibility:d,formattedValue:f,activeIndex:p,draggingIndex:m,focusedIndex:h,invalid:g,readonly:_,disabled:v}){let y=n>1?e.label:i||o||e.label;return a.html`
18
+ const e=require("./decorate-Dq34MBGe.cjs"),t=require("./sized-mixin-BT7cv-fT.cjs"),n=require("./focusable-B6h03pAe.cjs"),r=require("./language-resolution-CSjktYg5.cjs"),i=require("./manage-help-text-DtFJsl0k.cjs");require("./number-field-04RFqrUa.cjs");let a=require("lit"),o=require("lit/decorators.js"),s=require("lit/directives/if-defined.js"),c=require("lit/directives/class-map.js"),l=require("lit/directives/style-map.js"),u=require("@internationalized/number"),d=require("lit/directives/repeat.js");var f={toNormalized(e,t,n){return n===t?0:(e-t)/(n-t)},fromNormalized(e,t,n){return e*(n-t)+t}},p=(e,t)=>{let n=e;for(let[e,r]of Object.entries(t))n=n.replaceAll(`{${e}}`,r);return n},m=e=>{if(!Number.isFinite(e))return 0;let t=Math.abs(e).toString(),n=t.match(/^\d+(?:\.(?<fraction>\d+))?e(?<exponent>[+-]\d+)$/);if(n?.groups){let{fraction:e=``,exponent:t}=n.groups;return Math.min(Math.max(e.length-Number(t),0),20)}let[,r=``]=t.split(`.`);return Math.min(r.length,20)},h=(e,t)=>{let n;try{n=e()}catch{n=void 0}if(typeof n==`number`&&!Number.isNaN(n))return n;let r=t();return Number.isNaN(r)?0:r},g=(e,t)=>Number.isFinite(e)?e:t,_=(e,t,n)=>Math.min(Math.max(e,Math.min(t,n)),Math.max(t,n)),v=(e,t,n,r)=>{let i=g(t,0),a=g(n,i),o=Number.isFinite(r)&&r>0?r:1,s=Number.isNaN(e)?i:e,c=Math.max(m(o),m(i),m(a)),l=i+Math.round((_(s,i,a)-i)/o)*o;return _(Number(l.toFixed(c)),i,a)},y=(e,t,n,r=f)=>_(h(()=>r.toNormalized(e,t,n),()=>f.toNormalized(e,t,n)),0,1),b=(e,t,n,r,i=f)=>{let a=_(e,0,1);return v(h(()=>i.fromNormalized(a,t,n),()=>f.fromNormalized(a,t,n)),t,n,r)},x=(e,t,n)=>{if(!Number.isFinite(e)||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||t<=e)return[];let r=Math.floor((t-e)/n)+1;if(r>250)return[];let i=Math.max(m(e),m(n));return Array.from({length:r},(t,r)=>Number((e+r*n).toFixed(i)))},S=(e,t,n,r,i=f)=>{let a=t+(n-t)/2,o=r===!0?a:r===void 0?t:r,s=y(Number.isNaN(o)?t:o,t,n,i),c=y(e,t,n,i);return[Math.min(s,c),Math.max(s,c)]},C=(e,t)=>e+(t-e)/2,w=class{constructor(e,t,n,r){this._applySingleValue=t,this._formatHandleValue=n,this._formatHandleLabel=r,this._attachedHandles=new Set,this._inputMap=new WeakMap,this.activeIndex=0,this.draggingIndex=-1,this._host=e,this._host.addController(this)}hostConnected(){this.invalidate(),this._syncAttachments()}hostDisconnected(){this.draggingIndex=-1,this._detachHandles(),this._inputMap=new WeakMap,this._cachedModels=void 0}hostUpdate(){this._syncAttachments(),this._cachedModels=this._resolveModels()}hostUpdated(){this._syncInputReferences(),this._commitClampedValues()}get handles(){let e=this._host.shadowRoot?.querySelector(`slot[name="handle"]`);return(e?e.assignedElements():[...this._host.children]).filter(e=>e.localName===`luzmo-slider-handle`&&e.slot===`handle`)}get models(){return this._cachedModels??this._resolveModels()}get values(){return Object.fromEntries(this.models.map(({name:e,value:t})=>[e,t]))}invalidate(){this._cachedModels=void 0}requestHostUpdate(){this.invalidate(),this._host.requestUpdate()}inputForHandle(e){return this._inputMap.get(e)}setValue(e,t){let n=this.models[e];if(!n)return!1;this.activeIndex=e;let r=v(t,n.effectiveMin,n.effectiveMax,n.step);return r===n.value?!1:(n.handle?n.handle.value=r:this._applySingleValue(r),this._cachedModels=this._resolveModels(),!0)}setNormalizedValue(e,t){let n=this.models[e];return n?this.setValue(e,b(t,n.min,n.max,n.step,n.normalization)):!1}nearestIndex(e){let t=this.models;return t.reduce((n,r,i)=>Math.abs(r.normalizedValue-e)<Math.abs(t[n].normalizedValue-e)?i:n,Math.min(Math.max(this.activeIndex,0),t.length-1))}reset(e){let t=this.models[e];return!t||t.defaultValue===void 0||!this.setValue(e,t.defaultValue)?!1:(this.dispatchInput(e),this.dispatchChange(e),!0)}dispatchInput(e){this._eventTarget(e).dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0}))}dispatchChange(e){this._eventTarget(e).dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0}))}formatValue(e){let t=this.models[e];return t?this._formatHandleValue(t):``}_eventTarget(e){return this.models[e]?.handle??this._host}_syncInputReferences(){this._inputMap=new WeakMap;let e=this._host.shadowRoot?.querySelectorAll(`input[type="range"]`)??[];this.models.forEach((t,n)=>{t.handle&&e[n]&&this._inputMap.set(t.handle,e[n])})}_commitClampedValues(){for(let e of this.models)e.handle&&e.handle.value!==e.value&&(e.handle.value=e.value)}_syncAttachments(){let e=new Set(this._host.isConnected?this.handles:[]);for(let t of this._attachedHandles)e.has(t)||t.detachController(this);for(let t of e)t.attachController(this);this._attachedHandles=e}_detachHandles(){for(let e of this._attachedHandles)e.detachController(this);this._attachedHandles.clear()}_resolveModels(){let e=this.handles;if(e.length===0)return[this._resolveSingleModel()];let t=e.map(e=>{let t=typeof e.min==`number`&&Number.isFinite(e.min)?e.min:this._host.min,n=typeof e.max==`number`&&Number.isFinite(e.max)?e.max:this._host.max;return{min:t,max:Math.max(t,n)}}),n=e.map((e,n)=>{let{min:r,max:i}=t[n],a=this._resolveStep(e.step);return v(Number.isFinite(e.value)?e.value:C(r,i),r,i,a)}),r=new Set;return e.map((i,a)=>{let{min:o,max:s}=t[a],c=this._resolveStep(i.step),l=i.min===`previous`&&a>0?Math.max(o,n[a-1]):o,u=Math.max(l,i.max===`next`&&a<e.length-1?Math.min(s,n[a+1]):s),d=v(n[a],l,u,c),f=i.normalization;return{handle:i,name:this._uniqueName(i.name,a,r),label:this._formatHandleLabel(i,a),value:d,min:o,max:s,effectiveMin:l,effectiveMax:u,step:c,defaultValue:i.defaultValue,normalizedValue:y(d,o,s,f),normalization:f}})}_resolveSingleModel(){let{min:e,max:t,step:n,normalization:r}=this._host,i=v(this._host.value,e,t,n);return{name:`value`,label:this._host.label,value:i,min:e,max:t,effectiveMin:e,effectiveMax:t,step:n,defaultValue:this._host.defaultValue,normalizedValue:y(i,e,t,r),normalization:r}}_resolveStep(e){return e!==void 0&&Number.isFinite(e)&&e>0?e:this._host.step}_uniqueName(e,t,n){let r=e||`handle${t+1}`;if(!n.has(r))return n.add(r),r;let i=t+1;for(;n.has(`${r}${i}`);)i+=1;let a=`${r}${i}`;return n.add(a),a}};function T({model:e,index:t,total:n,grouped:r,label:i,appliedLabel:o,helpTextId:u,labelVisibility:d,formattedValue:f,activeIndex:p,draggingIndex:m,focusedIndex:h,invalid:g,readonly:_,disabled:v}){let y=n>1?e.label:i||o||e.label;return a.html`
19
19
  <span
20
20
  class=${(0,c.classMap)({handle:!0,"tooltip-open":m===t||h===t})}
21
21
  data-handle-index=${t}
@@ -132,4 +132,4 @@ const e=require("./decorate-Dq34MBGe.cjs"),t=require("./sized-mixin-BT7cv-fT.cjs
132
132
  ${n?E({model:n,label:this.label||this._appliedLabel,formatOptions:this.formatOptions,size:this.size,disabled:this.disabled,invalid:this.invalid,readonly:this.readonly,hideStepper:this.hideStepper,quiet:this.quiet,indeterminate:this.indeterminate,onInput:this.handleNumberInput,onChange:this.handleNumberChange}):a.nothing}
133
133
  </div>
134
134
  ${this.renderHelpText(this.invalid)}
135
- `}willUpdate(e){super.willUpdate(e),(e.has(`value`)||e.has(`min`)||e.has(`max`)||e.has(`step`))&&this._normalizeRawValue(),(e.has(r.n)||e.has(`formatOptions`))&&this._clearNumberFormatterCache()}updated(e){super.updated(e),(e.has(`disabled`)&&this.disabled||e.has(`readonly`)&&this.readonly)&&(this._endDrag(),this._pendingCommits.clear())}};e.t([(0,o.property)({type:String})],L.prototype,`label`,void 0),e.t([(0,o.property)({attribute:!1})],L.prototype,`labels`,void 0),e.t([(0,o.state)()],L.prototype,`_appliedLabel`,void 0),e.t([(0,o.property)({type:Number,reflect:!0})],L.prototype,`value`,null),e.t([(0,o.property)({type:Number,reflect:!0})],L.prototype,`min`,null),e.t([(0,o.property)({type:Number,reflect:!0})],L.prototype,`max`,null),e.t([(0,o.property)({type:Number,reflect:!0})],L.prototype,`step`,null),e.t([(0,o.property)({type:Number,reflect:!0,attribute:`default-value`})],L.prototype,`defaultValue`,void 0),e.t([(0,o.property)({type:String,reflect:!0})],L.prototype,`variant`,null),e.t([(0,o.property)({type:Boolean,reflect:!0})],L.prototype,`ramp`,void 0),e.t([(0,o.property)({type:Boolean,reflect:!0})],L.prototype,`ticks`,void 0),e.t([(0,o.property)({type:String,reflect:!0,attribute:`label-visibility`})],L.prototype,`labelVisibility`,null),e.t([(0,o.property)({reflect:!0,attribute:`fill-start`,converter:I})],L.prototype,`fillStart`,void 0),e.t([(0,o.property)({type:Number,reflect:!0,attribute:`tick-step`})],L.prototype,`tickStep`,null),e.t([(0,o.property)({type:Boolean,reflect:!0,attribute:`tick-labels`})],L.prototype,`tickLabels`,void 0),e.t([(0,o.property)({type:Boolean,reflect:!0})],L.prototype,`editable`,void 0),e.t([(0,o.property)({type:Boolean,reflect:!0,attribute:`hide-stepper`})],L.prototype,`hideStepper`,void 0),e.t([(0,o.property)({type:Boolean,reflect:!0})],L.prototype,`quiet`,void 0),e.t([(0,o.property)({type:Boolean,reflect:!0})],L.prototype,`indeterminate`,void 0),e.t([(0,o.property)({type:Boolean,reflect:!0})],L.prototype,`invalid`,void 0),e.t([(0,o.property)({type:Boolean,reflect:!0})],L.prototype,`readonly`,void 0),e.t([(0,o.property)({attribute:!1})],L.prototype,`formatOptions`,void 0),e.t([(0,o.property)({attribute:!1})],L.prototype,`normalization`,null),e.t([(0,o.property)({attribute:!1})],L.prototype,`getAriaHandleText`,null),e.t([(0,o.property)({attribute:!1})],L.prototype,`getAriaValueText`,null),e.t([(0,o.queryAll)(`input[type="range"]`)],L.prototype,`rangeInputs`,void 0),e.t([(0,o.state)()],L.prototype,`_focusedIndex`,void 0);var R={fromAttribute(e){if(e===null)return;if(e===`previous`)return e;let t=Number(e);return Number.isFinite(t)?t:void 0},toAttribute(e){return e===void 0?null:String(e)}},z={fromAttribute(e){if(e===null)return;if(e===`next`)return e;let t=Number(e);return Number.isFinite(t)?t:void 0},toAttribute(e){return e===void 0?null:String(e)}},B=class extends e.n{constructor(...e){super(...e),this.name=``,this.label=``,this.value=NaN,this.color=``}set normalization(e){let t=this.normalization;this._normalization=e,this.requestUpdate(`normalization`,t)}get normalization(){return this._normalization??f}#e;attachController(e){this.#e=e}detachController(e){this.#e===e&&(this.#e=void 0)}get hasController(){return this.#e!==void 0}focus(e){this.#e?.inputForHandle(this)?.focus(e)}render(){return a.nothing}updated(e){super.updated(e),(e.has(`value`)||e.has(`min`)||e.has(`max`)||e.has(`step`)||e.has(`color`)||e.has(`name`)||e.has(`label`)||e.has(`defaultValue`)||e.has(`formatOptions`)||e.has(`normalization`)||e.has(`getAriaHandleText`))&&this.#e?.requestHostUpdate()}};e.t([(0,o.property)({type:String,reflect:!0})],B.prototype,`name`,void 0),e.t([(0,o.property)({type:String})],B.prototype,`label`,void 0),e.t([(0,o.property)({type:Number,reflect:!0})],B.prototype,`value`,void 0),e.t([(0,o.property)({type:Number,reflect:!0,attribute:`default-value`})],B.prototype,`defaultValue`,void 0),e.t([(0,o.property)({reflect:!0,converter:R})],B.prototype,`min`,void 0),e.t([(0,o.property)({reflect:!0,converter:z})],B.prototype,`max`,void 0),e.t([(0,o.property)({type:Number,reflect:!0})],B.prototype,`step`,void 0),e.t([(0,o.property)({type:String,reflect:!0})],B.prototype,`color`,void 0),e.t([(0,o.property)({attribute:!1})],B.prototype,`formatOptions`,void 0),e.t([(0,o.property)({attribute:!1})],B.prototype,`normalization`,null),e.t([(0,o.property)({attribute:!1})],B.prototype,`getAriaHandleText`,void 0),typeof customElements<`u`&&!customElements.get(`luzmo-slider-handle`)&&customElements.define(`luzmo-slider-handle`,B),typeof customElements<`u`&&!customElements.get(`luzmo-slider`)&&customElements.define(`luzmo-slider`,L),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return B}});
135
+ `}willUpdate(e){super.willUpdate(e),(e.has(`value`)||e.has(`min`)||e.has(`max`)||e.has(`step`))&&this._normalizeRawValue(),(e.has(r.r)||e.has(`formatOptions`))&&this._clearNumberFormatterCache()}updated(e){super.updated(e),(e.has(`disabled`)&&this.disabled||e.has(`readonly`)&&this.readonly)&&(this._endDrag(),this._pendingCommits.clear())}};e.t([(0,o.property)({type:String})],L.prototype,`label`,void 0),e.t([(0,o.property)({attribute:!1})],L.prototype,`labels`,void 0),e.t([(0,o.state)()],L.prototype,`_appliedLabel`,void 0),e.t([(0,o.property)({type:Number,reflect:!0})],L.prototype,`value`,null),e.t([(0,o.property)({type:Number,reflect:!0})],L.prototype,`min`,null),e.t([(0,o.property)({type:Number,reflect:!0})],L.prototype,`max`,null),e.t([(0,o.property)({type:Number,reflect:!0})],L.prototype,`step`,null),e.t([(0,o.property)({type:Number,reflect:!0,attribute:`default-value`})],L.prototype,`defaultValue`,void 0),e.t([(0,o.property)({type:String,reflect:!0})],L.prototype,`variant`,null),e.t([(0,o.property)({type:Boolean,reflect:!0})],L.prototype,`ramp`,void 0),e.t([(0,o.property)({type:Boolean,reflect:!0})],L.prototype,`ticks`,void 0),e.t([(0,o.property)({type:String,reflect:!0,attribute:`label-visibility`})],L.prototype,`labelVisibility`,null),e.t([(0,o.property)({reflect:!0,attribute:`fill-start`,converter:I})],L.prototype,`fillStart`,void 0),e.t([(0,o.property)({type:Number,reflect:!0,attribute:`tick-step`})],L.prototype,`tickStep`,null),e.t([(0,o.property)({type:Boolean,reflect:!0,attribute:`tick-labels`})],L.prototype,`tickLabels`,void 0),e.t([(0,o.property)({type:Boolean,reflect:!0})],L.prototype,`editable`,void 0),e.t([(0,o.property)({type:Boolean,reflect:!0,attribute:`hide-stepper`})],L.prototype,`hideStepper`,void 0),e.t([(0,o.property)({type:Boolean,reflect:!0})],L.prototype,`quiet`,void 0),e.t([(0,o.property)({type:Boolean,reflect:!0})],L.prototype,`indeterminate`,void 0),e.t([(0,o.property)({type:Boolean,reflect:!0})],L.prototype,`invalid`,void 0),e.t([(0,o.property)({type:Boolean,reflect:!0})],L.prototype,`readonly`,void 0),e.t([(0,o.property)({attribute:!1})],L.prototype,`formatOptions`,void 0),e.t([(0,o.property)({attribute:!1})],L.prototype,`normalization`,null),e.t([(0,o.property)({attribute:!1})],L.prototype,`getAriaHandleText`,null),e.t([(0,o.property)({attribute:!1})],L.prototype,`getAriaValueText`,null),e.t([(0,o.queryAll)(`input[type="range"]`)],L.prototype,`rangeInputs`,void 0),e.t([(0,o.state)()],L.prototype,`_focusedIndex`,void 0);var R={fromAttribute(e){if(e===null)return;if(e===`previous`)return e;let t=Number(e);return Number.isFinite(t)?t:void 0},toAttribute(e){return e===void 0?null:String(e)}},z={fromAttribute(e){if(e===null)return;if(e===`next`)return e;let t=Number(e);return Number.isFinite(t)?t:void 0},toAttribute(e){return e===void 0?null:String(e)}},B=class extends e.n{constructor(...e){super(...e),this.name=``,this.label=``,this.value=NaN,this.color=``}set normalization(e){let t=this.normalization;this._normalization=e,this.requestUpdate(`normalization`,t)}get normalization(){return this._normalization??f}#e;attachController(e){this.#e=e}detachController(e){this.#e===e&&(this.#e=void 0)}get hasController(){return this.#e!==void 0}focus(e){this.#e?.inputForHandle(this)?.focus(e)}render(){return a.nothing}updated(e){super.updated(e),(e.has(`value`)||e.has(`min`)||e.has(`max`)||e.has(`step`)||e.has(`color`)||e.has(`name`)||e.has(`label`)||e.has(`defaultValue`)||e.has(`formatOptions`)||e.has(`normalization`)||e.has(`getAriaHandleText`))&&this.#e?.requestHostUpdate()}};e.t([(0,o.property)({type:String,reflect:!0})],B.prototype,`name`,void 0),e.t([(0,o.property)({type:String})],B.prototype,`label`,void 0),e.t([(0,o.property)({type:Number,reflect:!0})],B.prototype,`value`,void 0),e.t([(0,o.property)({type:Number,reflect:!0,attribute:`default-value`})],B.prototype,`defaultValue`,void 0),e.t([(0,o.property)({reflect:!0,converter:R})],B.prototype,`min`,void 0),e.t([(0,o.property)({reflect:!0,converter:z})],B.prototype,`max`,void 0),e.t([(0,o.property)({type:Number,reflect:!0})],B.prototype,`step`,void 0),e.t([(0,o.property)({type:String,reflect:!0})],B.prototype,`color`,void 0),e.t([(0,o.property)({attribute:!1})],B.prototype,`formatOptions`,void 0),e.t([(0,o.property)({attribute:!1})],B.prototype,`normalization`,null),e.t([(0,o.property)({attribute:!1})],B.prototype,`getAriaHandleText`,void 0),typeof customElements<`u`&&!customElements.get(`luzmo-slider-handle`)&&customElements.define(`luzmo-slider-handle`,B),typeof customElements<`u`&&!customElements.get(`luzmo-slider`)&&customElements.define(`luzmo-slider`,L),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return B}});
@@ -15,4 +15,4 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- var e=Symbol(`language resolver updated`),t=class{constructor(e){this.language=(typeof document>`u`?void 0:document?.documentElement?.lang)||(typeof navigator>`u`?void 0:navigator?.language)||`en`,this.host=e,this.host.addController(this)}hostConnected(){this.resolveLanguage()}hostDisconnected(){this.unsubscribe?.()}resolveLanguage(){let t=new CustomEvent(`luzmo-language-context`,{bubbles:!0,composed:!0,detail:{callback:(t,n)=>{let r=this.language;this.language=t,this.unsubscribe=n,this.host.requestUpdate(e,r)}},cancelable:!0});this.host.dispatchEvent(t)}};Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
18
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../split-view-5uMSU_b7.cjs");exports.LuzmoSplitView=e.t;
@@ -0,0 +1,7 @@
1
+ import { LuzmoSplitView } from './split-view';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'luzmo-split-view': LuzmoSplitView & HTMLElement;
5
+ }
6
+ }
7
+ export { LuzmoSplitView } from './split-view';
@@ -0,0 +1,25 @@
1
+ /*! * Lucero - The design system for Luzmo.
2
+ *
3
+ * Copyright © 2025 Luzmo
4
+ * All rights reserved.
5
+ * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
+ * This license allows users with a current active Luzmo account to use Lucero.
7
+ * This license terminates automatically if a user no longer has an active Luzmo account.
8
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
+ *
10
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
+ * SOFTWARE.
17
+ * */
18
+ (() => {
19
+ if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
20
+ let e = document.createElement("style");
21
+ e.setAttribute("data-luzmo-vars", ""), e.textContent = "html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: color-mix(in oklch, var(--luzmo-border-color-full), black 25%);--luzmo-border-color-full-down: color-mix(in oklch, var(--luzmo-border-color-full), black 45%);--luzmo-border-color-full-focus: color-mix(in oklch, var(--luzmo-border-color-full), black 25%);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-border-width: 1px;--luzmo-shadow-color-rgb: 0, 0, 0;--luzmo-shadow-opacity: 0.1;--luzmo-shadow-color: rgba( var(--luzmo-shadow-color-rgb), var(--luzmo-shadow-opacity) );--luzmo-font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: color-mix(in oklch, var(--luzmo-font-color), black 8%);--luzmo-font-color-down: color-mix(in oklch, var(--luzmo-font-color), black 20%);--luzmo-font-color-focus: color-mix(in oklch, var(--luzmo-font-color), black 8%);--luzmo-primary: #4434ff;--luzmo-primary-hover: color-mix(in oklch, var(--luzmo-primary), black 8%);--luzmo-primary-down: color-mix(in oklch, var(--luzmo-primary), black 20%);--luzmo-primary-focus: color-mix(in oklch, var(--luzmo-primary), black 8%);--luzmo-primary-inverse-color: #ffffff;--luzmo-accent-on-subtle-color: var(--luzmo-primary);--luzmo-primary-rgb: 68, 52, 255;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: color-mix(in oklch, color-mix(in oklch, var(--luzmo-background-color), var(--luzmo-primary) 5%), black 1.5%);--luzmo-background-color-down: color-mix(in oklch, color-mix(in oklch, var(--luzmo-background-color), var(--luzmo-primary) 7%), black 1%);--luzmo-background-color-focus: color-mix(in oklch, color-mix(in oklch, var(--luzmo-background-color), var(--luzmo-primary) 5%), black 1.5%);--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: color-mix(in oklch, var(--luzmo-background-color-highlight), black 10%);--luzmo-background-color-highlight-down: color-mix(in oklch, var(--luzmo-background-color-highlight), black 20%);--luzmo-background-color-highlight-focus: color-mix(in oklch, var(--luzmo-background-color-highlight), black 10%);--luzmo-secondary: #d000d0;--luzmo-secondary-hover: color-mix(in oklch, var(--luzmo-secondary), black 8%);--luzmo-secondary-down: color-mix(in oklch, var(--luzmo-secondary), black 20%);--luzmo-secondary-focus: color-mix(in oklch, var(--luzmo-secondary), black 8%);--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 208, 0, 208;--luzmo-scrollbar-size: 6px;--luzmo-scrollbar-thumb-background: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-scrollbar-thumb-border-radius: var(--luzmo-border-radius-s);--luzmo-scrollbar-thumb-hover-background: rgba( var(--luzmo-border-color-rgb), 0.4 );--luzmo-scrollbar-track-background: transparent;--luzmo-scrollbar-track-border-radius: var(--luzmo-border-radius-s);--luzmo-scrollbar-width: thin;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: color-mix(in oklch, var(--luzmo-negative-color), black 8%);--luzmo-negative-color-down: color-mix(in oklch, var(--luzmo-negative-color), black 20%);--luzmo-negative-color-focus: color-mix(in oklch, var(--luzmo-negative-color), black 8%);--luzmo-negative-on-subtle-color: var(--luzmo-negative-color);--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-negative-inverse-color: #ffffff;--luzmo-positive-color: rgb(18, 133, 90);--luzmo-positive-color-hover: color-mix(in oklch, var(--luzmo-positive-color), black 8%);--luzmo-positive-color-down: color-mix(in oklch, var(--luzmo-positive-color), black 20%);--luzmo-positive-color-focus: color-mix(in oklch, var(--luzmo-positive-color), black 8%);--luzmo-positive-on-subtle-color: color-mix( in oklch, var(--luzmo-positive-color), var(--luzmo-font-color) 11% );--luzmo-positive-color-rgb: 18, 133, 90;--luzmo-positive-inverse-color: #ffffff;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: color-mix(in oklch, var(--luzmo-selected-color), black 25%);--luzmo-selected-color-down: color-mix(in oklch, var(--luzmo-selected-color), black 45%);--luzmo-selected-color-focus: color-mix(in oklch, var(--luzmo-selected-color), black 25%);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: color-mix(in oklch, var(--luzmo-selected-color-hard), black 25%);--luzmo-selected-color-hard-down: color-mix(in oklch, var(--luzmo-selected-color-hard), black 45%);--luzmo-selected-color-hard-focus: color-mix(in oklch, var(--luzmo-selected-color-hard), black 25%);--luzmo-neutral-on-subtle-color: var(--luzmo-selected-color-hard);--luzmo-informative-color: #1670dd;--luzmo-informative-color-hover: color-mix(in oklch, var(--luzmo-informative-color), black 8%);--luzmo-informative-color-down: color-mix(in oklch, var(--luzmo-informative-color), black 20%);--luzmo-informative-color-focus: var(--luzmo-informative-color-hover);--luzmo-informative-on-subtle-color: color-mix( in oklch, var(--luzmo-informative-color), var(--luzmo-font-color) 9% );--luzmo-informative-color-rgb: 22, 112, 221;--luzmo-informative-inverse-color: #ffffff;--luzmo-notice-color: rgb(229, 127, 0);--luzmo-notice-color-hover: color-mix(in oklch, var(--luzmo-notice-color), black 8%);--luzmo-notice-color-down: color-mix(in oklch, var(--luzmo-notice-color), black 20%);--luzmo-notice-color-focus: var(--luzmo-notice-color-hover);--luzmo-notice-on-subtle-color: color-mix( in oklch, var(--luzmo-notice-color), var(--luzmo-font-color) 40% );--luzmo-notice-inverse-color: var(--luzmo-selected-color-hard);--luzmo-seafoam-color: rgb(0, 140, 140);--luzmo-indigo-color: rgb(68, 52, 255);--luzmo-purple-color: rgb(112, 48, 210);--luzmo-fuchsia-color: rgb(205, 30, 170);--luzmo-magenta-color: rgb(203, 36, 98);--luzmo-yellow-color: rgb(228, 208, 0);--luzmo-gray-color: rgb(110, 110, 110);--luzmo-red-color: rgb(202, 34, 28);--luzmo-orange-color: rgb(218, 123, 17);--luzmo-chartreuse-color: rgb(85, 135, 0);--luzmo-celery-color: rgb(48, 134, 22);--luzmo-green-color: rgb(18, 133, 90);--luzmo-cyan-color: rgb(0, 134, 180);--luzmo-blue-color: rgb(22, 112, 221);--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 10px;--luzmo-icon-size-xs: 12px;--luzmo-icon-size-s: 14px;--luzmo-icon-size-m: 16px;--luzmo-icon-size-l: 18px;--luzmo-icon-size-xl: 20px;--luzmo-icon-size-xxl: 32px}html.dark,html.dark-theme,:where(.dark-theme){--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.2);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.35);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-rgb: 255, 255, 255;--luzmo-border-color-full: #4c4c57;--luzmo-border-color-full-hover: color-mix(in oklch, var(--luzmo-border-color-full), white 20%);--luzmo-border-color-full-down: color-mix(in oklch, var(--luzmo-border-color-full), white 35%);--luzmo-border-color-full-focus: color-mix(in oklch, var(--luzmo-border-color-full), white 20%);--luzmo-border-color-disabled: #333;--luzmo-shadow-opacity: 0.35;--luzmo-shadow-color: rgba( var(--luzmo-shadow-color-rgb), var(--luzmo-shadow-opacity) );--luzmo-font-color: #ced4da;--luzmo-font-color-extra-dimmed: #72787f;--luzmo-font-color-hover: color-mix(in oklch, var(--luzmo-font-color), white 8%);--luzmo-font-color-down: color-mix(in oklch, var(--luzmo-font-color), white 20%);--luzmo-font-color-focus: color-mix(in oklch, var(--luzmo-font-color), white 8%);--luzmo-primary: #7b90ff;--luzmo-primary-hover: color-mix(in oklch, var(--luzmo-primary), white 12%);--luzmo-primary-down: color-mix(in oklch, var(--luzmo-primary), white 24%);--luzmo-primary-focus: color-mix(in oklch, var(--luzmo-primary), white 12%);--luzmo-accent-on-subtle-color: color-mix( in oklch, var(--luzmo-primary), var(--luzmo-font-color) 1% );--luzmo-background-color: #262626;--luzmo-background-color-rgb: 0, 0, 0;--luzmo-background-color-disabled: #939ea8;--luzmo-background-color-hover: color-mix(in oklch, color-mix(in oklch, var(--luzmo-background-color), var(--luzmo-primary) 3%), white 14%);--luzmo-background-color-down: color-mix(in oklch, color-mix(in oklch, var(--luzmo-background-color), var(--luzmo-primary) 3%), white 25%);--luzmo-background-color-focus: color-mix(in oklch, color-mix(in oklch, var(--luzmo-background-color), var(--luzmo-primary) 3%), white 14%);--luzmo-background-color-highlight: rgb(72, 72, 72);--luzmo-background-color-highlight-disabled: #313131;--luzmo-background-color-highlight-hover: color-mix(in oklch, var(--luzmo-background-color-highlight), white 20%);--luzmo-background-color-highlight-down: color-mix(in oklch, var(--luzmo-background-color-highlight), white 35%);--luzmo-background-color-highlight-focus: color-mix(in oklch, var(--luzmo-background-color-highlight), white 20%);--luzmo-primary-inverse-color: var(--luzmo-background-color);--luzmo-indicator-color: var(--luzmo-primary);--luzmo-primary-rgb: 94, 113, 208;--luzmo-secondary: #ebff00;--luzmo-secondary-inverse-color: #333;--luzmo-secondary-rgb: 200, 219, 0;--luzmo-negative-color: #f76d74;--luzmo-negative-color-hover: color-mix(in oklch, var(--luzmo-negative-color), white 12%);--luzmo-negative-color-down: color-mix(in oklch, var(--luzmo-negative-color), white 24%);--luzmo-negative-color-focus: color-mix(in oklch, var(--luzmo-negative-color), white 12%);--luzmo-negative-on-subtle-color: color-mix( in oklch, var(--luzmo-negative-color), var(--luzmo-font-color) 40% );--luzmo-negative-color-rgb: 247, 109, 116;--luzmo-negative-inverse-color: var(--luzmo-background-color);--luzmo-positive-color: #39a875;--luzmo-positive-color-hover: color-mix(in oklch, var(--luzmo-positive-color), white 12%);--luzmo-positive-color-down: color-mix(in oklch, var(--luzmo-positive-color), white 24%);--luzmo-positive-color-focus: color-mix(in oklch, var(--luzmo-positive-color), white 12%);--luzmo-positive-on-subtle-color: color-mix( in oklch, var(--luzmo-positive-color), var(--luzmo-font-color) 35% );--luzmo-positive-color-rgb: 57, 168, 117;--luzmo-positive-inverse-color: var(--luzmo-background-color);--luzmo-selected-color: #afafaf;--luzmo-selected-color-hover: color-mix(in oklch, var(--luzmo-selected-color), white 20%);--luzmo-selected-color-down: color-mix(in oklch, var(--luzmo-selected-color), white 35%);--luzmo-selected-color-focus: color-mix(in oklch, var(--luzmo-selected-color), white 20%);--luzmo-selected-color-hard: #e9e9e9;--luzmo-selected-color-hard-hover: color-mix(in oklch, var(--luzmo-selected-color-hard), white 20%);--luzmo-selected-color-hard-down: color-mix(in oklch, var(--luzmo-selected-color-hard), white 35%);--luzmo-selected-color-hard-focus: color-mix(in oklch, var(--luzmo-selected-color-hard), white 20%);--luzmo-neutral-on-subtle-color: var(--luzmo-selected-color-hard);--luzmo-informative-color: #5c94ff;--luzmo-informative-color-hover: color-mix(in oklch, var(--luzmo-informative-color), white 12%);--luzmo-informative-color-down: color-mix(in oklch, var(--luzmo-informative-color), white 24%);--luzmo-informative-color-focus: var(--luzmo-informative-color-hover);--luzmo-informative-on-subtle-color: color-mix( in oklch, var(--luzmo-informative-color), var(--luzmo-font-color) 36% );--luzmo-informative-color-rgb: 92, 148, 255;--luzmo-informative-inverse-color: var(--luzmo-background-color);--luzmo-notice-color-hover: color-mix(in oklch, var(--luzmo-notice-color), white 12%);--luzmo-notice-color-down: color-mix(in oklch, var(--luzmo-notice-color), white 24%);--luzmo-notice-color-focus: var(--luzmo-notice-color-hover);--luzmo-notice-on-subtle-color: var(--luzmo-notice-color);--luzmo-notice-inverse-color: var(--luzmo-background-color);--luzmo-disabled-color: #75797b}", document.head.appendChild(e);
22
+ }
23
+ })();
24
+ import { t as e } from "../split-view-FxpiSCem.js";
25
+ export { e as LuzmoSplitView };
@@ -0,0 +1,12 @@
1
+ export type SplitViewBounds = {
2
+ min: number;
3
+ max: number;
4
+ };
5
+ export type SplitViewConstraints = {
6
+ primaryMin: number;
7
+ primaryMax: number;
8
+ secondaryMin: number;
9
+ secondaryMax: number;
10
+ };
11
+ export declare function calculateSplitViewBounds(viewSize: number, constraints: SplitViewConstraints): SplitViewBounds;
12
+ export declare function clampSplitViewPosition(value: number, bounds: SplitViewBounds): number;
@@ -0,0 +1,106 @@
1
+ import { CSSResultArray, PropertyValues, TemplateResult } from 'lit';
2
+ import { Focusable } from '../../utils/focusable';
3
+ /**
4
+ * Divides two panes with an optionally interactive separator.
5
+ *
6
+ * @element luzmo-split-view
7
+ * @slot - The first two elements are rendered as panes.
8
+ * @attr primary-min - Minimum primary pane size in pixels.
9
+ * @attr primary-max - Maximum primary pane size in pixels.
10
+ * @attr secondary-min - Minimum secondary pane size in pixels.
11
+ * @attr secondary-max - Maximum secondary pane size in pixels.
12
+ * @attr primary-size - Initial primary pane size in pixels, percent, or `auto`.
13
+ * @attr splitter-pos - Current primary pane size in pixels.
14
+ * @fires input - The splitter position changes during interaction.
15
+ * @fires change - A splitter position change is committed.
16
+ * @cssprop --luzmo-split-view-divider-color - Divider color.
17
+ * @cssprop --luzmo-split-view-divider-color-hover - Hovered divider color.
18
+ * @cssprop --luzmo-split-view-divider-color-active - Active divider color.
19
+ * @cssprop --luzmo-split-view-divider-thickness - Visible divider thickness.
20
+ * @cssprop --luzmo-split-view-focus-color - Focus indicator color.
21
+ */
22
+ export declare class LuzmoSplitView extends Focusable {
23
+ static get styles(): CSSResultArray;
24
+ /** Stacks panes vertically instead of side by side. */
25
+ vertical: boolean;
26
+ /** Enables pointer and keyboard resizing. */
27
+ set resizable(value: boolean);
28
+ get resizable(): boolean;
29
+ /** Allows either pane to collapse at its edge. */
30
+ collapsible: boolean;
31
+ /** Accessible name for the separator. */
32
+ label: string;
33
+ /** Minimum primary pane size in pixels. */
34
+ set primaryMin(value: number);
35
+ get primaryMin(): number;
36
+ /** Maximum primary pane size in pixels. */
37
+ set primaryMax(value: number);
38
+ get primaryMax(): number;
39
+ /** Minimum secondary pane size in pixels. */
40
+ set secondaryMin(value: number);
41
+ get secondaryMin(): number;
42
+ /** Maximum secondary pane size in pixels. */
43
+ set secondaryMax(value: number);
44
+ get secondaryMax(): number;
45
+ /** Initial primary pane size in pixels, percentage, or `auto`. */
46
+ primarySize: string;
47
+ /** Current primary pane size in pixels. */
48
+ set splitterPos(value: number);
49
+ get splitterPos(): number;
50
+ private _paneSlot?;
51
+ private _separator?;
52
+ private _primaryMin;
53
+ private _primaryMax;
54
+ private _secondaryMin;
55
+ private _secondaryMax;
56
+ private _resizable;
57
+ private _splitterPos;
58
+ private _viewSize;
59
+ private _minPos;
60
+ private _maxPos;
61
+ private _enoughChildren;
62
+ private _positionInitialized;
63
+ private _initialSplitterPosSupplied;
64
+ private _activePanes;
65
+ private _restorePositionOnReconnect;
66
+ private _paneInlineStyles;
67
+ private _controlledElement?;
68
+ private _controlledElementGeneratedId?;
69
+ private _resizeObserver?;
70
+ private _dragStartPosition?;
71
+ private _dragPointerId?;
72
+ private _dragChanged;
73
+ private _capturedPointer?;
74
+ private _lastExpandedPosition?;
75
+ get focusElement(): HTMLElement;
76
+ connectedCallback(): void;
77
+ disconnectedCallback(): void;
78
+ private _normalizeBound;
79
+ private _measureView;
80
+ private _calculateBounds;
81
+ private _clampPosition;
82
+ private _resolveInitialPosition;
83
+ private _applyPaneSizes;
84
+ private _restorePaneStyles;
85
+ private _setActivePanes;
86
+ private _recalculate;
87
+ private _syncAriaControls;
88
+ private _clearControlledElementId;
89
+ private handleSlotChange;
90
+ private _dispatchValueEvent;
91
+ private _setPosition;
92
+ private handleKeydown;
93
+ private _capturePointer;
94
+ private _releasePointer;
95
+ private handlePointerDown;
96
+ private _pointerPosition;
97
+ private handlePointerMove;
98
+ private _finishDrag;
99
+ private handlePointerUp;
100
+ private _cancelDrag;
101
+ private handlePointerCancel;
102
+ protected render(): TemplateResult;
103
+ private _positionAsPercentage;
104
+ protected willUpdate(changes: PropertyValues): void;
105
+ protected updated(changes: PropertyValues): void;
106
+ }
@@ -0,0 +1,43 @@
1
+ /*! * Lucero - The design system for Luzmo.
2
+ *
3
+ * Copyright © 2025 Luzmo
4
+ * All rights reserved.
5
+ * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
+ * This license allows users with a current active Luzmo account to use Lucero.
7
+ * This license terminates automatically if a user no longer has an active Luzmo account.
8
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
+ *
10
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
+ * SOFTWARE.
17
+ * */
18
+ const e=require("./decorate-Dq34MBGe.cjs"),t=require("./focusable-B6h03pAe.cjs");let n=require("lit"),r=require("lit/decorators.js");function i(e,t){let n=Math.max(0,t.primaryMin,e-t.secondaryMax),r=Math.min(e,t.primaryMax,e-t.secondaryMin);if(n<=r)return{min:n,max:r};let i=Math.min(e,Math.max(0,e/2));return{min:i,max:i}}function a(e,t){return Math.min(t.max,Math.max(t.min,e))}var o=`:host{min-block-size:0;min-inline-size:0;display:flex;position:relative}:host([vertical]){flex-direction:column}slot{display:contents}::slotted(*){min-block-size:0;min-inline-size:0}::slotted(:nth-child(n+3)){display:none!important}.separator{cursor:col-resize;block-size:100%;inline-size:var(--split-view-target-size);touch-action:none;z-index:1;outline:none;justify-content:center;align-items:center;display:flex;position:absolute;inset-block-start:0;inset-inline-start:calc(var(--splitter-position,0) * 1px - var(--split-view-target-size) / 2)}:host([vertical]) .separator{block-size:var(--split-view-target-size);cursor:row-resize;inline-size:100%;inset-block-start:calc(var(--splitter-position,0) * 1px - var(--split-view-target-size) / 2);inset-inline-start:0}.separator .divider{background-color:var(--luzmo-split-view-divider-color,var(--split-view-divider-color));block-size:100%;inline-size:var(--luzmo-split-view-divider-thickness,var(--split-view-divider-thickness));pointer-events:none}.separator .handle{background-color:var(--luzmo-split-view-divider-color,var(--split-view-handle-color));block-size:var(--split-view-handle-length);border-radius:var(--split-view-handle-radius);inline-size:var(--split-view-handle-thickness);pointer-events:none;display:none;position:absolute}:host([resizable]) .separator .handle{display:block}:host([vertical]) .separator .divider{block-size:var(--luzmo-split-view-divider-thickness,var(--split-view-divider-thickness));inline-size:100%}:host([vertical]) .separator .handle{block-size:var(--split-view-handle-thickness);inline-size:var(--split-view-handle-length)}:host(:not([vertical])) .separator.start-edge{inset-inline-start:0}:host(:not([vertical])) .separator.end-edge{inset-inline-start:calc(100% - var(--split-view-target-size))}:host(:not([vertical])) .separator.start-edge .divider,:host(:not([vertical])) .separator.end-edge .divider,:host([vertical]) .separator.start-edge .divider,:host([vertical]) .separator.end-edge .divider{position:absolute}:host(:not([vertical])) .separator.start-edge .divider{inset-inline-start:0}:host(:not([vertical])) .separator.start-edge .handle{inset-inline-start:calc(var(--split-view-focus-width) + var(--split-view-focus-offset))}:host(:not([vertical])) .separator.end-edge .divider{inset-inline-end:0}:host(:not([vertical])) .separator.end-edge .handle{inset-inline-end:calc(var(--split-view-focus-width) + var(--split-view-focus-offset))}:host([vertical]) .separator.start-edge{inset-block-start:0}:host([vertical]) .separator.end-edge{inset-block-start:calc(100% - var(--split-view-target-size))}:host([vertical]) .separator.start-edge .divider{inset-block-start:0}:host([vertical]) .separator.start-edge .handle{inset-block-start:calc(var(--split-view-focus-width) + var(--split-view-focus-offset))}:host([vertical]) .separator.end-edge .divider{inset-block-end:0}:host([vertical]) .separator.end-edge .handle{inset-block-end:calc(var(--split-view-focus-width) + var(--split-view-focus-offset))}:host([resizable]:not([disabled])) .separator:hover .divider,:host([resizable]:not([disabled])) .separator:hover .handle{background-color:var(--luzmo-split-view-divider-color-hover,var(--split-view-divider-color-hover))}:host([dragging]) .separator .divider,:host([dragging]) .separator .handle{background-color:var(--luzmo-split-view-divider-color-active,var(--split-view-divider-color-active))}.separator:focus-visible .divider{background-color:var(--luzmo-split-view-focus-color,var(--split-view-focus-color))}.separator:focus-visible .handle{outline:var(--split-view-focus-width) solid var(--luzmo-split-view-focus-color,var(--split-view-focus-color));outline-offset:var(--split-view-focus-offset)}:host(:not([resizable])) .separator,:host([disabled]) .separator{cursor:default}@media (forced-colors:active){:host{--highcontrast-split-view-divider-color:CanvasText;--highcontrast-split-view-focus-color:Highlight}.separator .divider,.separator .handle{background-color:var(--highcontrast-split-view-divider-color,var(--luzmo-split-view-divider-color,var(--split-view-divider-color)))}:host([resizable]:not([disabled])) .separator:hover .divider,:host([resizable]:not([disabled])) .separator:hover .handle,:host([dragging]) .separator .divider,:host([dragging]) .separator .handle{background-color:highlight}.separator:focus-visible .divider{background-color:var(--highcontrast-split-view-focus-color,var(--luzmo-split-view-focus-color,var(--split-view-focus-color)))}.separator:focus-visible .handle{outline-color:var(--highcontrast-split-view-focus-color,var(--luzmo-split-view-focus-color,var(--split-view-focus-color)))}}:host{--split-view-divider-color:var(--luzmo-border-color-full);--split-view-divider-color-hover:var(--luzmo-primary-hover);--split-view-divider-color-active:var(--luzmo-primary-down);--split-view-divider-thickness:var(--luzmo-border-width);--split-view-focus-color:var(--luzmo-primary-focus);--split-view-target-size:var(--luzmo-component-height-xs);--split-view-focus-offset:var(--luzmo-border-width);--split-view-focus-width:var(--luzmo-indicator-width,1px);--split-view-handle-color:var(--luzmo-font-color-extra-dimmed);--split-view-handle-length:var(--luzmo-component-height);--split-view-handle-thickness:var(--luzmo-spacing-2);--split-view-handle-radius:var(--luzmo-border-radius-full)}`,s=3840,c=10,l=50,u=50,d=0,f=class extends t.t{constructor(...e){super(...e),this.vertical=!1,this.collapsible=!1,this.label=`Resize panels`,this.primarySize=`50%`,this._primaryMin=0,this._primaryMax=s,this._secondaryMin=0,this._secondaryMax=s,this._resizable=!1,this._splitterPos=0,this._viewSize=0,this._minPos=0,this._maxPos=0,this._enoughChildren=!1,this._positionInitialized=!1,this._initialSplitterPosSupplied=!1,this._activePanes=[],this._restorePositionOnReconnect=!1,this._paneInlineStyles=new Map,this._dragChanged=!1}static get styles(){let e=super.styles;return[...Array.isArray(e)?e:e?[e]:[],(0,n.unsafeCSS)(o)]}set resizable(e){let t=!!e;if(t===this._resizable)return;let n=this._resizable;this._resizable=t,t||this._cancelDrag(),this.requestUpdate(`resizable`,n)}get resizable(){return this._resizable}set primaryMin(e){let t=this._normalizeBound(e,0);if(t===this._primaryMin)return;let n=this._primaryMin;this._primaryMin=t,this.requestUpdate(`primaryMin`,n)}get primaryMin(){return this._primaryMin}set primaryMax(e){let t=this._normalizeBound(e,s);if(t===this._primaryMax)return;let n=this._primaryMax;this._primaryMax=t,this.requestUpdate(`primaryMax`,n)}get primaryMax(){return this._primaryMax}set secondaryMin(e){let t=this._normalizeBound(e,0);if(t===this._secondaryMin)return;let n=this._secondaryMin;this._secondaryMin=t,this.requestUpdate(`secondaryMin`,n)}get secondaryMin(){return this._secondaryMin}set secondaryMax(e){let t=this._normalizeBound(e,s);if(t===this._secondaryMax)return;let n=this._secondaryMax;this._secondaryMax=t,this.requestUpdate(`secondaryMax`,n)}get secondaryMax(){return this._secondaryMax}set splitterPos(e){this._positionInitialized||(this._initialSplitterPosSupplied=!0);let t=Number.isFinite(e)?e:0,n=this.collapsible&&(t===0||t===this._viewSize),r=this._positionInitialized&&!n?this._clampPosition(t):t;if(r===this._splitterPos)return;let i=this._splitterPos;this._splitterPos=r,this.requestUpdate(`splitterPos`,i)}get splitterPos(){return this._splitterPos}get focusElement(){return this._separator??this}connectedCallback(){this._positionInitialized||(this._initialSplitterPosSupplied=this._initialSplitterPosSupplied||this.hasAttribute(`splitter-pos`)),super.connectedCallback(),typeof ResizeObserver<`u`&&(this._resizeObserver??=new ResizeObserver(()=>{this._recalculate(!1)}),this._resizeObserver.observe(this)),this.updateComplete.then(()=>{this.isConnected&&this.handleSlotChange()})}disconnectedCallback(){this._cancelDrag(!1),this._resizeObserver?.disconnect(),this._restorePaneStyles(),this._activePanes=[],this._restorePositionOnReconnect=!0,this._clearControlledElementId(),this._controlledElement=void 0,super.disconnectedCallback()}_normalizeBound(e,t){return Number.isFinite(e)&&e>=0?e:t}_measureView(){let e=this.getBoundingClientRect();return this.vertical?e.height:e.width}_calculateBounds(){this._viewSize=this._measureView();let e=i(this._viewSize,{primaryMin:this.primaryMin,primaryMax:this.primaryMax,secondaryMin:this.secondaryMin,secondaryMax:this.secondaryMax});this._minPos=e.min,this._maxPos=e.max}_clampPosition(e){return a(e,{min:this._minPos,max:this._maxPos})}_resolveInitialPosition(){let e=this.primarySize.trim();if(/^\d+(?:\.\d+)?(?:px)?$/.test(e))return Number.parseFloat(e);if(/^\d+(?:\.\d+)?%$/.test(e))return Number.parseFloat(e)/100*this._viewSize;if(e===`auto`&&this._controlledElement){let e=Number.parseFloat(this._controlledElement.style.getPropertyValue(this.vertical?`block-size`:`inline-size`));if(Number.isFinite(e)&&e>0)return e;let t=Number.parseFloat(getComputedStyle(this._controlledElement).getPropertyValue(this.vertical?`height`:`width`));if(Number.isFinite(t)&&t>0)return t;let n=this._controlledElement.getBoundingClientRect(),r=this.vertical?n.height:n.width;if(Number.isFinite(r)&&r>0)return r}return this._viewSize/2}_applyPaneSizes(){let[e,t]=this._activePanes,n=Math.round(this.splitterPos),r=Math.round(this._viewSize);e&&(e.style.flex=`0 0 ${n}px`,e.style.display=r>0&&n<=0?`none`:this._paneInlineStyles.get(e)?.display??``),t&&(t.style.flex=`1 1 0`,t.style.display=r>0&&n>=r?`none`:this._paneInlineStyles.get(t)?.display??``)}_restorePaneStyles(){for(let[e,t]of this._paneInlineStyles)e.style.display=t.display,e.style.flex=t.flex;this._paneInlineStyles.clear()}_setActivePanes(e){let t=e.slice(0,2),n=t.length!==this._activePanes.length||t.some((e,t)=>e!==this._activePanes[t]);if(n&&(this._restorePaneStyles(),this._activePanes=t),n||this._paneInlineStyles.size===0)for(let e of t)this._paneInlineStyles.set(e,{display:e.style.display,flex:e.style.flex});return n}_recalculate(e){if(!this.isConnected||!this._enoughChildren)return;let t=this._viewSize,n=this._positionInitialized&&this.collapsible&&this.splitterPos===0,r=this._positionInitialized&&this.collapsible&&t>0&&this.splitterPos===t;this._calculateBounds();let i;this._positionInitialized?i=e?this._resolveInitialPosition():n?0:r?this._viewSize:this._clampPosition(this.splitterPos):(i=this._initialSplitterPosSupplied?this.splitterPos:this._resolveInitialPosition(),this._positionInitialized=!0),this.splitterPos=i,this._applyPaneSizes()}_syncAriaControls(){!this._separator||!this._controlledElement||(this._separator.ariaControlsElements=[this._controlledElement])}_clearControlledElementId(){this._controlledElement&&this._controlledElement.id===this._controlledElementGeneratedId&&this._controlledElement.removeAttribute(`id`),this._controlledElementGeneratedId=void 0}handleSlotChange(){let e=this._paneSlot?.assignedElements()??[],t=this._setActivePanes(e),n=e[0];n!==this._controlledElement&&(this._clearControlledElementId(),this._controlledElement=n),this._controlledElement&&!this._controlledElement.id&&(d+=1,this._controlledElementGeneratedId=`luzmo-split-view-pane-${d}`,this._controlledElement.id=this._controlledElementGeneratedId);let r=this._enoughChildren,i=e.length>=2;if(i!==this._enoughChildren&&(this._enoughChildren=i,this.requestUpdate()),i){let e=!r||t&&!this._restorePositionOnReconnect;this._restorePositionOnReconnect=!1,this.updateComplete.then(()=>{this._recalculate(e),this._syncAriaControls()})}}_dispatchValueEvent(e){this.dispatchEvent(new Event(e,{bubbles:!0,composed:!0}))}_setPosition(e,t={}){let n=this._clampPosition(e);return this.collapsible&&t.collapse&&(e<=0&&(n=0),e>=this._viewSize&&(n=this._viewSize)),n===this.splitterPos?!1:(this.splitterPos>0&&this.splitterPos<this._viewSize&&(this._lastExpandedPosition=this.splitterPos),this.splitterPos=n,this._applyPaneSizes(),(t.emit??!0)&&this._dispatchValueEvent(`input`),!0)}handleKeydown(e){if(!this.resizable||this.disabled)return;let t;switch(e.key){case`ArrowLeft`:this.vertical||(t=this.splitterPos+(this.isLTR?-10:c));break;case`ArrowRight`:this.vertical||(t=this.splitterPos+(this.isLTR?c:-10));break;case`ArrowUp`:this.vertical&&(t=this.splitterPos-c);break;case`ArrowDown`:this.vertical&&(t=this.splitterPos+c);break;case`PageUp`:t=this.splitterPos+(this.vertical?-50:l);break;case`PageDown`:t=this.splitterPos+(this.vertical?l:-50);break;case`Home`:t=this.collapsible?0:this._minPos;break;case`End`:t=this.collapsible?this._viewSize:this._maxPos;break;case`Enter`:if(!this.collapsible)return;t=this.splitterPos===0?this._lastExpandedPosition??this._viewSize/2:0;break;default:return}t!==void 0&&(e.preventDefault(),this._setPosition(t,{collapse:!0})&&this._dispatchValueEvent(`change`))}_capturePointer(e,t){try{e.setPointerCapture(t),this._capturedPointer={target:e,pointerId:t}}catch{this._capturedPointer=void 0}}_releasePointer(){let e=this._capturedPointer;this._capturedPointer=void 0,e?.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}handlePointerDown(e){!this.resizable||this.disabled||e.button!==0||this._dragStartPosition!==void 0||(this._dragPointerId=e.pointerId,this._dragStartPosition=this.splitterPos,this._dragChanged=!1,this.toggleAttribute(`dragging`,!0),this._capturePointer(e.currentTarget,e.pointerId))}_pointerPosition(e){let t=this.getBoundingClientRect();return this.vertical?e.clientY-t.top:this.isLTR?e.clientX-t.left:t.right-e.clientX}handlePointerMove(e){if(this._dragPointerId!==e.pointerId||this._dragStartPosition===void 0||!this.resizable||this.disabled)return;let t=this._pointerPosition(e);this.collapsible&&t<this._minPos-u&&(t=0),this.collapsible&&t>this._maxPos+u&&(t=this._viewSize),this._setPosition(t,{collapse:!0})&&(this._dragChanged=!0)}_finishDrag(){this._dragPointerId=void 0,this._releasePointer(),this._dragStartPosition=void 0,this._dragChanged=!1,this.toggleAttribute(`dragging`,!1)}handlePointerUp(e){if(this._dragPointerId!==e.pointerId||this._dragStartPosition===void 0)return;let t=this._dragChanged;this._finishDrag(),t&&this._dispatchValueEvent(`change`)}_cancelDrag(e=!0){if(this._dragStartPosition===void 0)return;let t=this._dragStartPosition,n=this._dragChanged;this._finishDrag(),e&&n&&this._setPosition(t,{collapse:!0})}handlePointerCancel(e){this._dragPointerId===e.pointerId&&this._cancelDrag()}render(){return n.html`
19
+ <slot @slotchange=${this.handleSlotChange}></slot>
20
+ ${this._enoughChildren?n.html`
21
+ <div
22
+ class="separator ${this.splitterPos<=0?`start-edge`:this._viewSize>0&&this.splitterPos>=this._viewSize?`end-edge`:``}"
23
+ role="separator"
24
+ aria-label=${this.label}
25
+ aria-disabled=${this.resizable?this.disabled?`true`:`false`:n.nothing}
26
+ aria-orientation=${this.vertical?`horizontal`:`vertical`}
27
+ aria-valuemin=${this.resizable?this._positionAsPercentage(this.collapsible?0:this._minPos):n.nothing}
28
+ aria-valuemax=${this.resizable?this._positionAsPercentage(this.collapsible?this._viewSize:this._maxPos):n.nothing}
29
+ aria-valuenow=${this.resizable?this._positionAsPercentage(this.splitterPos):n.nothing}
30
+ tabindex=${this.resizable?this.disabled?`-1`:`0`:n.nothing}
31
+ style=${`--splitter-position: ${this.splitterPos}`}
32
+ @keydown=${this.handleKeydown}
33
+ @pointerdown=${this.handlePointerDown}
34
+ @pointermove=${this.handlePointerMove}
35
+ @pointerup=${this.handlePointerUp}
36
+ @pointercancel=${this.handlePointerCancel}
37
+ @lostpointercapture=${this.handlePointerCancel}
38
+ >
39
+ <span class="divider" aria-hidden="true"></span>
40
+ <span class="handle" aria-hidden="true"></span>
41
+ </div>
42
+ `:n.nothing}
43
+ `}_positionAsPercentage(e){return String(this._viewSize>0?Math.round(e/this._viewSize*100):0)}willUpdate(e){super.willUpdate(e),(e.has(`vertical`)||e.has(`primaryMin`)||e.has(`primaryMax`)||e.has(`secondaryMin`)||e.has(`secondaryMax`)||e.has(`collapsible`))&&this._recalculate(!1),e.has(`primarySize`)&&this._recalculate(!0)}updated(e){super.updated(e),e.has(`splitterPos`)&&this._applyPaneSizes(),this._syncAriaControls(),e.has(`disabled`)&&this.disabled&&this._cancelDrag()}};e.t([(0,r.property)({type:Boolean,reflect:!0})],f.prototype,`vertical`,void 0),e.t([(0,r.property)({type:Boolean,reflect:!0})],f.prototype,`resizable`,null),e.t([(0,r.property)({type:Boolean,reflect:!0})],f.prototype,`collapsible`,void 0),e.t([(0,r.property)({type:String,reflect:!0})],f.prototype,`label`,void 0),e.t([(0,r.property)({type:Number,reflect:!0,attribute:`primary-min`})],f.prototype,`primaryMin`,null),e.t([(0,r.property)({type:Number,reflect:!0,attribute:`primary-max`})],f.prototype,`primaryMax`,null),e.t([(0,r.property)({type:Number,reflect:!0,attribute:`secondary-min`})],f.prototype,`secondaryMin`,null),e.t([(0,r.property)({type:Number,reflect:!0,attribute:`secondary-max`})],f.prototype,`secondaryMax`,null),e.t([(0,r.property)({type:String,reflect:!0,attribute:`primary-size`})],f.prototype,`primarySize`,void 0),e.t([(0,r.property)({type:Number,reflect:!0,attribute:`splitter-pos`})],f.prototype,`splitterPos`,null),e.t([(0,r.query)(`slot`)],f.prototype,`_paneSlot`,void 0),e.t([(0,r.query)(`[role="separator"]`)],f.prototype,`_separator`,void 0),typeof customElements<`u`&&!customElements.get(`luzmo-split-view`)&&customElements.define(`luzmo-split-view`,f),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return f}});