@deephaven/code-studio 0.55.0 → 0.55.1-beta.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 (24) hide show
  1. package/build/assets/{AppRoot-20a326c5.js → AppRoot-5eebed52.js} +3 -3
  2. package/build/assets/{AppRoot-20a326c5.js.map → AppRoot-5eebed52.js.map} +1 -1
  3. package/build/assets/{ControlType-062bf38d.js → ControlType-58330610.js} +2 -2
  4. package/build/assets/{ControlType-062bf38d.js.map → ControlType-58330610.js.map} +1 -1
  5. package/build/assets/{FontBootstrap-1b53d220.js → FontBootstrap-ee11a333.js} +2 -2
  6. package/build/assets/{FontBootstrap-1b53d220.js.map → FontBootstrap-ee11a333.js.map} +1 -1
  7. package/build/assets/{IrisGrid-a94f959b.js → IrisGrid-c3f117a4.js} +3 -3
  8. package/build/assets/{IrisGrid-a94f959b.js.map → IrisGrid-c3f117a4.js.map} +1 -1
  9. package/build/assets/{IrisGridModelFactory-b1167669.js → IrisGridModelFactory-9dfadcff.js} +2 -2
  10. package/build/assets/{IrisGridModelFactory-b1167669.js.map → IrisGridModelFactory-9dfadcff.js.map} +1 -1
  11. package/build/assets/{StyleGuideRoot-302c2e3d.js → StyleGuideRoot-c8e71114.js} +2 -2
  12. package/build/assets/{StyleGuideRoot-302c2e3d.js.map → StyleGuideRoot-c8e71114.js.map} +1 -1
  13. package/build/assets/{index-1e7ff795.js → index-33d63452.js} +2 -2
  14. package/build/assets/{index-1e7ff795.js.map → index-33d63452.js.map} +1 -1
  15. package/build/assets/{index-2e7ddd59.js → index-4c9e284e.js} +2 -2
  16. package/build/assets/{index-2e7ddd59.js.map → index-4c9e284e.js.map} +1 -1
  17. package/build/assets/{index-26f5375f.js → index-7ee3961d.js} +2 -2
  18. package/build/assets/{index-26f5375f.js.map → index-7ee3961d.js.map} +1 -1
  19. package/build/assets/{usePlugins-fe400a07.js → usePlugins-2f8c5bde.js} +2 -2
  20. package/build/assets/{usePlugins-fe400a07.js.map → usePlugins-2f8c5bde.js.map} +1 -1
  21. package/build/assets/{useUser-46c1575f.js → useUser-8bec1305.js} +2 -2
  22. package/build/assets/{useUser-46c1575f.js.map → useUser-8bec1305.js.map} +1 -1
  23. package/build/index.html +1 -1
  24. package/package.json +31 -31
@@ -1,4 +1,4 @@
1
- import{r as u,F as ee,C as e,G as f,H as ce,Q as nr,aH as D,M as se,_ as ie,L as _e,aI as wr,aJ as De,aK as Cr,aL as _,aM as Sr,aN as ke,a8 as j,Z as H,aO as B,a0 as Be,aP as Tr,a3 as cr,a5 as ir,a6 as Nr,aQ as kr,ac as Er,ab as te,aR as Ir,aS as Dr,aT as $r,ad as Mr,aU as Ar,aV as Rr,aW as V,aX as Lr,aY as he,aZ as k,a_ as Pr,a$ as Fr,b0 as _r,J as Br,Y as Vr}from"./vendor-fd5d5838.js";import{aN as Ve,aO as G,aP as $e,aQ as Me,aR as dr,aq as Or,aS as L,aT as Oe,D as Ue,aU as He,F as Ee,aV as Ur,aW as Hr,aM as Ie,aX as Gr,aY as Wr}from"./index-26f5375f.js";import{W as zr}from"./monaco-1410cbed.js";import{ab as de,a8 as hr,a5 as O,ac as ur,B as R,g as Y,m as qr,L as ue,ad as z,ae as Zr,I as Yr,R as Xr,f as X,C as Ge,O as Kr,a as Qr,S as Jr,c as Q,b as We,P as ze,h as eo,d as ro}from"./IrisGrid-a94f959b.js";import{M as qe,H as oo,A as to,V as ge,T as ao,D as lo,C as so,a as no,b as co,c as io}from"./FontBootstrap-1b53d220.js";import{u as gr,e as W,a2 as E,K as I,v as ae,B as C,t as ho,k as Ze,b8 as Ye,l as uo,C as P,a6 as K,S as me,Z as go,w as mo,d as Xe,g as le,z as vo,L as po,M as xo}from"./usePlugins-fe400a07.js";import{L as fo}from"./AppRoot-20a326c5.js";import{Q as bo,x as yo,s as jo}from"./ControlType-062bf38d.js";import"./helpers-042e6b4d.js";import"./plotly-1c1a0e42.js";import"./useUser-46c1575f.js";function Ke(t,r,o,a,l,n,s){try{var i=t[n](s),h=i.value}catch(d){o(d);return}i.done?r(h):Promise.resolve(h).then(a,l)}function ve(t){return function(){var r=this,o=arguments;return new Promise(function(a,l){var n=t.apply(r,o);function s(h){Ke(n,a,l,s,i,"next",h)}function i(h){Ke(n,a,l,s,i,"throw",h)}s(void 0)})}}function $(t,r,o){return r=wo(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function wo(t){var r=Co(t,"string");return typeof r=="symbol"?r:String(r)}function Co(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var a=o.call(t,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class So extends de{constructor(){var{rowCount:r=1e9,columnCount:o=100,floatingTopRowCount:a=0,floatingBottomRowCount:l=0,floatingLeftColumnCount:n=0,floatingRightColumnCount:s=0,isEditable:i=!1,editedData:h=[]}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),$(this,"numRows",void 0),$(this,"numColumns",void 0),$(this,"floatingTop",void 0),$(this,"floatingBottom",void 0),$(this,"floatingLeft",void 0),$(this,"floatingRight",void 0),$(this,"editable",void 0),$(this,"editedData",void 0),this.numRows=r,this.numColumns=o,this.floatingTop=a,this.floatingBottom=l,this.floatingLeft=n,this.floatingRight=s,this.editable=i,this.editedData=h}get rowCount(){return this.numRows}get columnCount(){return this.numColumns}get floatingTopRowCount(){return this.floatingTop}get floatingBottomRowCount(){return this.floatingBottom}get floatingLeftColumnCount(){return this.floatingLeft}get floatingRightColumnCount(){return this.floatingRight}get isEditable(){return this.editable}textForCell(r,o){var a,l;return(a=(l=this.editedData[r])===null||l===void 0?void 0:l[o])!==null&&a!==void 0?a:"".concat(r,",").concat(o)}colorForCell(r,o,a){return a.textColor}textForColumnHeader(r){return"".concat(r)}textForRowHeader(r){return"".concat(r)}textForRowFooter(r){return"".concat(r)}setValueForCell(r,o,a){var l=this;return ve(function*(){l.editedData[r]==null&&(l.editedData[r]=[]),l.editedData[r][o]="".concat(a)})()}setValueForRanges(r,o){var a=this;return ve(function*(){hr.forEachCell(r,(l,n)=>{a.setValueForCell(l,n,o)})})()}setValues(r){var o=this;return ve(function*(){for(var a=0;a<r.length;a+=1){var l,n,s=r[a];o.setValueForCell((l=s.column)!==null&&l!==void 0?l:s.x,(n=s.row)!==null&&n!==void 0?n:s.y,s.text)}})()}editValueForCell(r,o){return this.textForCell(r,o)}isValidForCell(r,o,a){return!0}isEditableRange(r){return this.isEditable}delete(r){throw new Error("Method not implemented.")}}const Ae=So;function w(t,r,o){return r=To(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function To(t){var r=No(t,"string");return typeof r=="symbol"?r:String(r)}function No(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var a=o.call(t,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class N extends Ae{constructor(){var{rowCount:r=N.DEFAULT_ROW_COUNT,columnCount:o=N.DEFAULT_COLUMN_COUNT,children:a=new Map,childRowCount:l=Math.ceil(Math.max(N.MIN_CHILD_ROW_COUNT,r*N.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:n=N.MAX_DEPTH}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super({rowCount:r,columnCount:o}),w(this,"children",void 0),w(this,"childRowCount",void 0),w(this,"maxDepth",void 0),w(this,"getCachedModelRowOffset",O((s,i)=>{for(var h=null,d=i,c=[...s].sort((b,M)=>b[0]-M[0]),g=0;g<c.length;g+=1){var[m,v]=c[g];if(d<=m)break;var x=v.rowCount;if(d<=m+x){h=m,d=d-m-1;break}d-=x}return{key:h,offsetRow:d}})),w(this,"getCachedTextForRowHeader",O((s,i)=>{var{key:h,offsetRow:d}=this.getCachedModelRowOffset(s,i);if(h!=null){var c=s.get(h);if(c!==void 0)return"".concat(h,".").concat(c.textForRowHeader(d))}return"".concat(d)})),w(this,"getCachedTextForCell",O((s,i,h)=>{var{key:d,offsetRow:c}=this.getCachedModelRowOffset(s,h);if(d!=null){var g=s.get(d);if(g!==void 0)return"".concat(d,".").concat(g.textForCell(i,c))}return"".concat(i,",").concat(c)})),w(this,"getCachedIsRowExpandable",O((s,i,h)=>{var d=this.getCachedDepthForRow(s,i);return d<h})),w(this,"getCachedIsRowExpanded",O((s,i)=>{var{key:h,offsetRow:d}=this.getCachedModelRowOffset(s,i);if(h!=null){var c=s.get(h);if(c!==void 0)return c.isRowExpanded(d)}return s.has(d)})),w(this,"getCachedDepthForRow",O((s,i)=>{var{key:h,offsetRow:d}=this.getCachedModelRowOffset(s,i);if(h!=null){var c=s.get(h);if(c!==void 0)return c.depthForRow(d)+1}return 0})),this.children=a,this.childRowCount=l,this.maxDepth=n}textForCell(r,o){return this.getCachedTextForCell(this.children,r,o)}textForRowHeader(r){return this.getCachedTextForRowHeader(this.children,r)}isRowMovable(r){return!1}get hasExpandableRows(){return!0}get isExpandAllAvailable(){return!1}get floatingBottomRowCount(){return 0}isRowExpandable(r){return this.getCachedIsRowExpandable(this.children,r,this.maxDepth)}isRowExpanded(r){return this.getCachedIsRowExpanded(this.children,r)}setRowExpanded(r,o){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{key:l,offsetRow:n}=this.getCachedModelRowOffset(this.children,r),s=new Map(this.children);if(l!=null){var i=this.children.get(l);if(i!==void 0){var{rowCount:h}=i;i.setRowExpanded(n,o,a),this.numRows+=i.rowCount-h}}else if(o){var c=new N({rowCount:this.childRowCount,columnCount:this.numColumns});s.set(n,c),this.numRows+=c.rowCount}else{var d=s.get(n);d!==void 0&&(this.numRows-=d.rowCount,s.delete(n))}this.children=s}expandAll(){throw new Error("Expand all not implemented.")}collapseAll(){throw new Error("Collapse all not implemented.")}depthForRow(r){return this.getCachedDepthForRow(this.children,r)}}w(N,"DEFAULT_ROW_COUNT",1e9);w(N,"DEFAULT_COLUMN_COUNT",100);w(N,"DEFAULT_CHILD_ROW_COUNT_FACTOR",.01);w(N,"MIN_CHILD_ROW_COUNT",10);w(N,"MAX_DEPTH",10);const Re=N;function pe(t,r,o){return r=ko(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function ko(t){var r=Eo(t,"string");return typeof r=="symbol"?r:String(r)}function Eo(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var a=o.call(t,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class Io extends de{constructor(r,o){var a;super(),pe(this,"data",void 0),pe(this,"columnHeaders",void 0),pe(this,"numberOfColumns",void 0),this.data=r,this.numberOfColumns=Math.max(...r.map(l=>l.length),(a=o?.length)!==null&&a!==void 0?a:0),this.columnHeaders=o}get rowCount(){return this.data.length}get columnCount(){return this.numberOfColumns}textForCell(r,o){var a;return"".concat((a=this.data[o])===null||a===void 0?void 0:a[r])}textForColumnHeader(r){var o,a;return(o=(a=this.columnHeaders)===null||a===void 0?void 0:a[r])!==null&&o!==void 0?o:""}}const Do=Io;function xe(t,r,o){return r=$o(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function $o(t){var r=Mo(t,"string");return typeof r=="symbol"?r:String(r)}function Mo(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var a=o.call(t,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class Ao extends de{constructor(r,o){super(),xe(this,"numberOfColumns",void 0),xe(this,"numberOfRows",void 0),xe(this,"viewportData",void 0),this.numberOfColumns=r,this.numberOfRows=o}get columnCount(){return this.numberOfColumns}get rowCount(){return this.numberOfRows}textForCell(r,o){var a,l,n,s,i,h,d,c=o-((a=(l=this.viewportData)===null||l===void 0?void 0:l.rowOffset)!==null&&a!==void 0?a:0),g=r-((n=(s=this.viewportData)===null||s===void 0?void 0:s.columnOffset)!==null&&n!==void 0?n:0);return"".concat((i=(h=this.viewportData)===null||h===void 0||(d=h.data[c])===null||d===void 0?void 0:d[g])!==null&&i!==void 0?i:"")}textForColumnHeader(r){return"".concat(r)}textForRowHeader(r){return"".concat(r)}}const Ro=Ao;function S(t,r,o){return r=Lo(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function Lo(t){var r=Po(t,"string");return typeof r=="symbol"?r:String(r)}function Po(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var a=o.call(t,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var Fo="proportional",_o=ur.positiveBarColor,Bo=ur.negativeBarColor,Vo="beside",Oo="LTR",Uo="right";function Ho(t){return Array.isArray(t)&&t.every(r=>typeof r=="number")}class Go extends de{constructor(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Map,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Map,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new Map,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:new Map,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:new Map,i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:new Map,h=arguments.length>7&&arguments[7]!==void 0?arguments[7]:new Map,d=arguments.length>8&&arguments[8]!==void 0?arguments[8]:new Map;super(),S(this,"numberOfColumns",void 0),S(this,"numberOfRows",void 0),S(this,"data",void 0),S(this,"columnMins",void 0),S(this,"columnMaxs",void 0),S(this,"columnAxes",void 0),S(this,"valuePlacements",void 0),S(this,"directions",void 0),S(this,"positiveColors",void 0),S(this,"negativeColors",void 0),S(this,"opacities",void 0),S(this,"textAlignments",void 0),S(this,"markers",void 0),this.positiveColors=a,this.negativeColors=l,this.data=r,this.columnAxes=o,this.valuePlacements=n,this.opacities=s,this.directions=i,this.textAlignments=h,this.markers=d,this.numberOfRows=Math.max(...r.map(m=>m.length)),this.numberOfColumns=r.length,this.columnMins=new Map,this.columnMaxs=new Map;for(var c=0;c<r.length;c+=1){var g=r[c];Ho(g)&&(this.columnMins.set(c,Math.min(...g)),this.columnMaxs.set(c,Math.max(...g)))}}get rowCount(){return this.numberOfRows}get columnCount(){return this.numberOfColumns}textForCell(r,o){var a;return"".concat((a=this.data[r])===null||a===void 0?void 0:a[o])}textForColumnHeader(r){return"".concat(r)}textAlignForCell(r,o){var a;return(a=this.textAlignments.get(r))!==null&&a!==void 0?a:Uo}renderTypeForCell(r,o){return r<20||r%2===o%2?"dataBar":"text"}dataBarOptionsForCell(r,o){var a,l,n,s,i,h,d,c=Ve(this.columnMins,r),g=Ve(this.columnMaxs,r),m=(a=this.columnAxes.get(r))!==null&&a!==void 0?a:Fo,v=(l=this.valuePlacements.get(r))!==null&&l!==void 0?l:Vo,x=this.opacities.get(r);x==null||x>1?x=1:x<0&&(x=0);var b=(n=this.directions.get(r))!==null&&n!==void 0?n:Oo,M=(s=this.positiveColors.get(r))!==null&&s!==void 0?s:_o,q=(i=this.negativeColors.get(r))!==null&&i!==void 0?i:Bo,A=Number((h=this.data[r])===null||h===void 0?void 0:h[o]),F=A>=0?M:q,re=(d=this.markers.get(r))!==null&&d!==void 0?d:[];return{columnMin:c,columnMax:g,axis:m,color:F,valuePlacement:v,opacity:x,markers:re,direction:b,value:A}}}const Wo=Go,fe="hide-from-e2e-tests",Qe="sample-section";function*mr(t=1){for(;;)t=t*16807%2147483647,yield t/2147483647}function zo(t=1){const[r]=u.useState(()=>mr(t));return u.useCallback(()=>{const o=r.next();if(o.done===!0)throw new Error("Random number generator unexpectedly finished");return o.value},[r])}function p(t,r=[]){const o=`${Qe}-${t.toLocaleLowerCase().replaceAll(" ","-")}`,a=ee(Qe,...r);return{id:o,className:a}}function T(t,r=[]){const{id:o,className:a}=p(t,r);return{id:o,UNSAFE_className:a}}class Le extends u.Component{static renderAlert(r){return e.jsxs("div",{className:ee("alert",`alert-${r}`),children:[e.jsx("strong",{children:"Well done!"}),"You successfully read this ",r," alert message."]},r)}render(){const r=["success","info","warning","danger"].map(o=>Le.renderAlert(o));return e.jsxs("div",{...p("alerts"),children:[e.jsx("h2",{className:"ui-title",children:"Alerts"}),e.jsx("div",{style:{padding:"1rem 0"},children:r})]})}}class J extends u.Component{static renderButtonBrand(r,o){const a=r.length?`btn-${r}-${o}`:`btn-${o}`;return e.jsx(R,{className:a,style:{marginBottom:"1rem",marginRight:"1rem"},children:o},o)}static renderButtons(r){const o=["primary","secondary","success","info","danger"].map(a=>J.renderButtonBrand(r,a));return e.jsxs("div",{...p(`buttons-${r.length?"outline":"regular"}`),children:[e.jsx("h5",{children:r.length?"Outline":"Regular"}),o]},r)}static renderSocketedButtons(){return e.jsxs("div",{...p("buttons-socketed"),children:[e.jsx("h5",{children:"Socketed Buttons (for linker)"}),e.jsx(Y,{style:{marginBottom:"1rem",marginRight:"1rem"},children:"Unlinked"}),e.jsx(Y,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,children:"Linked"}),e.jsx(Y,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinkedSource:!0,children:"Linked Source"}),e.jsx(Y,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,isInvalid:!0,children:"Error"}),e.jsx(Y,{style:{marginBottom:"1rem",marginRight:"1rem"},disabled:!0,children:"Disabled"})]})}constructor(r){super(r),this.state={toggle:!0}}renderInlineButtons(){const{toggle:r}=this.state;return e.jsxs("div",{...p("buttons-inline"),style:{padding:"1rem 0"},children:[e.jsx("h5",{children:"Inline Buttons"}),"Regular btn-inline:",e.jsx(R,{className:"btn-inline mx-2",children:e.jsx(f,{icon:G})}),"Toggle button (class active):",e.jsx(R,{className:ee("btn-inline mx-2",{active:r}),onClick:()=>{this.setState({toggle:!r})},children:e.jsx(f,{icon:G})}),"Disabled:",e.jsx(R,{className:"btn-inline mx-2",disabled:!0,children:e.jsx(f,{icon:G})}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("span",{children:"btn-link-icon (no text):"}),e.jsx(R,{className:"btn-link btn-link-icon px-2",children:e.jsx(f,{icon:G})}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(R,{className:"btn-link",children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsxs(R,{className:"btn-link",children:[e.jsx(f,{icon:G}),"Add Item"]})]})}render(){const r=["","outline"].map(l=>J.renderButtons(l)),o=this.renderInlineButtons(),a=J.renderSocketedButtons();return e.jsxs("div",{children:[e.jsx("h2",{className:"ui-title",children:"Buttons"}),e.jsxs("div",{style:{padding:"1rem 0"},children:[r,o,a]})]})}}function qo(){const t=gr();qe.random=zo();const[r]=u.useState(()=>new qe(t));return e.jsxs("div",{...p("charts"),children:[e.jsx("h2",{className:"ui-title",children:"Chart"}),e.jsx("div",{style:{height:500},children:e.jsx(qr,{model:r})})]})}function Zo(){const t=[["100","900"],["200","800"],["300","700"],["400","600"],["500","500"],["600","500"],["700","400"],["800","300"],["850","200"],["8XX","100"],["900","75"]].map(([o,a])=>e.jsxs("div",{className:ee("swatch","gray-swatch",`gray-swatch-${o}`),children:[e.jsxs("span",{children:["Gray-",o]}),e.jsxs("span",{style:{backgroundColor:`var(--dh-color-gray-${a})`},children:["--dh-gray-",a]})]},o)),r=["red","orange","yellow","green","blue","purple","white","black","content-bg","primary","primary-dark","background","foreground"].map(o=>e.jsx("div",{className:ee("swatch",`swatch-${o}`),children:o},o));return e.jsxs("div",{...p("colors"),children:[e.jsx("h2",{className:"ui-title",children:"Colors"}),e.jsxs("div",{className:"row",children:[e.jsx("div",{className:"col",children:t}),e.jsx("div",{className:"col",children:r}),e.jsxs("div",{className:"col",children:[e.jsx("p",{children:"Gray Range is available for background/tab colors, and should cover the full range used in mockups. Always use the semantic color names in your .scss files when applicable for UI elements."}),e.jsx("p",{children:"For refrence key colors are $primary for interactable elements, content-bg as background. White is same as gray-200. Gray-100 is used when white needs an active color. content-bg is between 800 and 900."}),e.jsx("pre",{children:`
1
+ import{r as u,F as ee,C as e,G as f,H as ce,Q as nr,aH as D,M as se,_ as ie,L as _e,aI as wr,aJ as De,aK as Cr,aL as _,aM as Sr,aN as ke,a8 as j,Z as H,aO as B,a0 as Be,aP as Tr,a3 as cr,a5 as ir,a6 as Nr,aQ as kr,ac as Er,ab as te,aR as Ir,aS as Dr,aT as $r,ad as Mr,aU as Ar,aV as Rr,aW as V,aX as Lr,aY as he,aZ as k,a_ as Pr,a$ as Fr,b0 as _r,J as Br,Y as Vr}from"./vendor-fd5d5838.js";import{aN as Ve,aO as G,aP as $e,aQ as Me,aR as dr,aq as Or,aS as L,aT as Oe,D as Ue,aU as He,F as Ee,aV as Ur,aW as Hr,aM as Ie,aX as Gr,aY as Wr}from"./index-7ee3961d.js";import{W as zr}from"./monaco-1410cbed.js";import{ab as de,a8 as hr,a5 as O,ac as ur,B as R,g as Y,m as qr,L as ue,ad as z,ae as Zr,I as Yr,R as Xr,f as X,C as Ge,O as Kr,a as Qr,S as Jr,c as Q,b as We,P as ze,h as eo,d as ro}from"./IrisGrid-c3f117a4.js";import{M as qe,H as oo,A as to,V as ge,T as ao,D as lo,C as so,a as no,b as co,c as io}from"./FontBootstrap-ee11a333.js";import{u as gr,e as W,a2 as E,K as I,v as ae,B as C,t as ho,k as Ze,b8 as Ye,l as uo,C as P,a6 as K,S as me,Z as go,w as mo,d as Xe,g as le,z as vo,L as po,M as xo}from"./usePlugins-2f8c5bde.js";import{L as fo}from"./AppRoot-5eebed52.js";import{Q as bo,x as yo,s as jo}from"./ControlType-58330610.js";import"./helpers-042e6b4d.js";import"./plotly-1c1a0e42.js";import"./useUser-8bec1305.js";function Ke(t,r,o,a,l,n,s){try{var i=t[n](s),h=i.value}catch(d){o(d);return}i.done?r(h):Promise.resolve(h).then(a,l)}function ve(t){return function(){var r=this,o=arguments;return new Promise(function(a,l){var n=t.apply(r,o);function s(h){Ke(n,a,l,s,i,"next",h)}function i(h){Ke(n,a,l,s,i,"throw",h)}s(void 0)})}}function $(t,r,o){return r=wo(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function wo(t){var r=Co(t,"string");return typeof r=="symbol"?r:String(r)}function Co(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var a=o.call(t,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class So extends de{constructor(){var{rowCount:r=1e9,columnCount:o=100,floatingTopRowCount:a=0,floatingBottomRowCount:l=0,floatingLeftColumnCount:n=0,floatingRightColumnCount:s=0,isEditable:i=!1,editedData:h=[]}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),$(this,"numRows",void 0),$(this,"numColumns",void 0),$(this,"floatingTop",void 0),$(this,"floatingBottom",void 0),$(this,"floatingLeft",void 0),$(this,"floatingRight",void 0),$(this,"editable",void 0),$(this,"editedData",void 0),this.numRows=r,this.numColumns=o,this.floatingTop=a,this.floatingBottom=l,this.floatingLeft=n,this.floatingRight=s,this.editable=i,this.editedData=h}get rowCount(){return this.numRows}get columnCount(){return this.numColumns}get floatingTopRowCount(){return this.floatingTop}get floatingBottomRowCount(){return this.floatingBottom}get floatingLeftColumnCount(){return this.floatingLeft}get floatingRightColumnCount(){return this.floatingRight}get isEditable(){return this.editable}textForCell(r,o){var a,l;return(a=(l=this.editedData[r])===null||l===void 0?void 0:l[o])!==null&&a!==void 0?a:"".concat(r,",").concat(o)}colorForCell(r,o,a){return a.textColor}textForColumnHeader(r){return"".concat(r)}textForRowHeader(r){return"".concat(r)}textForRowFooter(r){return"".concat(r)}setValueForCell(r,o,a){var l=this;return ve(function*(){l.editedData[r]==null&&(l.editedData[r]=[]),l.editedData[r][o]="".concat(a)})()}setValueForRanges(r,o){var a=this;return ve(function*(){hr.forEachCell(r,(l,n)=>{a.setValueForCell(l,n,o)})})()}setValues(r){var o=this;return ve(function*(){for(var a=0;a<r.length;a+=1){var l,n,s=r[a];o.setValueForCell((l=s.column)!==null&&l!==void 0?l:s.x,(n=s.row)!==null&&n!==void 0?n:s.y,s.text)}})()}editValueForCell(r,o){return this.textForCell(r,o)}isValidForCell(r,o,a){return!0}isEditableRange(r){return this.isEditable}delete(r){throw new Error("Method not implemented.")}}const Ae=So;function w(t,r,o){return r=To(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function To(t){var r=No(t,"string");return typeof r=="symbol"?r:String(r)}function No(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var a=o.call(t,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class N extends Ae{constructor(){var{rowCount:r=N.DEFAULT_ROW_COUNT,columnCount:o=N.DEFAULT_COLUMN_COUNT,children:a=new Map,childRowCount:l=Math.ceil(Math.max(N.MIN_CHILD_ROW_COUNT,r*N.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:n=N.MAX_DEPTH}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super({rowCount:r,columnCount:o}),w(this,"children",void 0),w(this,"childRowCount",void 0),w(this,"maxDepth",void 0),w(this,"getCachedModelRowOffset",O((s,i)=>{for(var h=null,d=i,c=[...s].sort((b,M)=>b[0]-M[0]),g=0;g<c.length;g+=1){var[m,v]=c[g];if(d<=m)break;var x=v.rowCount;if(d<=m+x){h=m,d=d-m-1;break}d-=x}return{key:h,offsetRow:d}})),w(this,"getCachedTextForRowHeader",O((s,i)=>{var{key:h,offsetRow:d}=this.getCachedModelRowOffset(s,i);if(h!=null){var c=s.get(h);if(c!==void 0)return"".concat(h,".").concat(c.textForRowHeader(d))}return"".concat(d)})),w(this,"getCachedTextForCell",O((s,i,h)=>{var{key:d,offsetRow:c}=this.getCachedModelRowOffset(s,h);if(d!=null){var g=s.get(d);if(g!==void 0)return"".concat(d,".").concat(g.textForCell(i,c))}return"".concat(i,",").concat(c)})),w(this,"getCachedIsRowExpandable",O((s,i,h)=>{var d=this.getCachedDepthForRow(s,i);return d<h})),w(this,"getCachedIsRowExpanded",O((s,i)=>{var{key:h,offsetRow:d}=this.getCachedModelRowOffset(s,i);if(h!=null){var c=s.get(h);if(c!==void 0)return c.isRowExpanded(d)}return s.has(d)})),w(this,"getCachedDepthForRow",O((s,i)=>{var{key:h,offsetRow:d}=this.getCachedModelRowOffset(s,i);if(h!=null){var c=s.get(h);if(c!==void 0)return c.depthForRow(d)+1}return 0})),this.children=a,this.childRowCount=l,this.maxDepth=n}textForCell(r,o){return this.getCachedTextForCell(this.children,r,o)}textForRowHeader(r){return this.getCachedTextForRowHeader(this.children,r)}isRowMovable(r){return!1}get hasExpandableRows(){return!0}get isExpandAllAvailable(){return!1}get floatingBottomRowCount(){return 0}isRowExpandable(r){return this.getCachedIsRowExpandable(this.children,r,this.maxDepth)}isRowExpanded(r){return this.getCachedIsRowExpanded(this.children,r)}setRowExpanded(r,o){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{key:l,offsetRow:n}=this.getCachedModelRowOffset(this.children,r),s=new Map(this.children);if(l!=null){var i=this.children.get(l);if(i!==void 0){var{rowCount:h}=i;i.setRowExpanded(n,o,a),this.numRows+=i.rowCount-h}}else if(o){var c=new N({rowCount:this.childRowCount,columnCount:this.numColumns});s.set(n,c),this.numRows+=c.rowCount}else{var d=s.get(n);d!==void 0&&(this.numRows-=d.rowCount,s.delete(n))}this.children=s}expandAll(){throw new Error("Expand all not implemented.")}collapseAll(){throw new Error("Collapse all not implemented.")}depthForRow(r){return this.getCachedDepthForRow(this.children,r)}}w(N,"DEFAULT_ROW_COUNT",1e9);w(N,"DEFAULT_COLUMN_COUNT",100);w(N,"DEFAULT_CHILD_ROW_COUNT_FACTOR",.01);w(N,"MIN_CHILD_ROW_COUNT",10);w(N,"MAX_DEPTH",10);const Re=N;function pe(t,r,o){return r=ko(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function ko(t){var r=Eo(t,"string");return typeof r=="symbol"?r:String(r)}function Eo(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var a=o.call(t,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class Io extends de{constructor(r,o){var a;super(),pe(this,"data",void 0),pe(this,"columnHeaders",void 0),pe(this,"numberOfColumns",void 0),this.data=r,this.numberOfColumns=Math.max(...r.map(l=>l.length),(a=o?.length)!==null&&a!==void 0?a:0),this.columnHeaders=o}get rowCount(){return this.data.length}get columnCount(){return this.numberOfColumns}textForCell(r,o){var a;return"".concat((a=this.data[o])===null||a===void 0?void 0:a[r])}textForColumnHeader(r){var o,a;return(o=(a=this.columnHeaders)===null||a===void 0?void 0:a[r])!==null&&o!==void 0?o:""}}const Do=Io;function xe(t,r,o){return r=$o(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function $o(t){var r=Mo(t,"string");return typeof r=="symbol"?r:String(r)}function Mo(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var a=o.call(t,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class Ao extends de{constructor(r,o){super(),xe(this,"numberOfColumns",void 0),xe(this,"numberOfRows",void 0),xe(this,"viewportData",void 0),this.numberOfColumns=r,this.numberOfRows=o}get columnCount(){return this.numberOfColumns}get rowCount(){return this.numberOfRows}textForCell(r,o){var a,l,n,s,i,h,d,c=o-((a=(l=this.viewportData)===null||l===void 0?void 0:l.rowOffset)!==null&&a!==void 0?a:0),g=r-((n=(s=this.viewportData)===null||s===void 0?void 0:s.columnOffset)!==null&&n!==void 0?n:0);return"".concat((i=(h=this.viewportData)===null||h===void 0||(d=h.data[c])===null||d===void 0?void 0:d[g])!==null&&i!==void 0?i:"")}textForColumnHeader(r){return"".concat(r)}textForRowHeader(r){return"".concat(r)}}const Ro=Ao;function S(t,r,o){return r=Lo(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function Lo(t){var r=Po(t,"string");return typeof r=="symbol"?r:String(r)}function Po(t,r){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var a=o.call(t,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var Fo="proportional",_o=ur.positiveBarColor,Bo=ur.negativeBarColor,Vo="beside",Oo="LTR",Uo="right";function Ho(t){return Array.isArray(t)&&t.every(r=>typeof r=="number")}class Go extends de{constructor(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Map,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Map,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new Map,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:new Map,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:new Map,i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:new Map,h=arguments.length>7&&arguments[7]!==void 0?arguments[7]:new Map,d=arguments.length>8&&arguments[8]!==void 0?arguments[8]:new Map;super(),S(this,"numberOfColumns",void 0),S(this,"numberOfRows",void 0),S(this,"data",void 0),S(this,"columnMins",void 0),S(this,"columnMaxs",void 0),S(this,"columnAxes",void 0),S(this,"valuePlacements",void 0),S(this,"directions",void 0),S(this,"positiveColors",void 0),S(this,"negativeColors",void 0),S(this,"opacities",void 0),S(this,"textAlignments",void 0),S(this,"markers",void 0),this.positiveColors=a,this.negativeColors=l,this.data=r,this.columnAxes=o,this.valuePlacements=n,this.opacities=s,this.directions=i,this.textAlignments=h,this.markers=d,this.numberOfRows=Math.max(...r.map(m=>m.length)),this.numberOfColumns=r.length,this.columnMins=new Map,this.columnMaxs=new Map;for(var c=0;c<r.length;c+=1){var g=r[c];Ho(g)&&(this.columnMins.set(c,Math.min(...g)),this.columnMaxs.set(c,Math.max(...g)))}}get rowCount(){return this.numberOfRows}get columnCount(){return this.numberOfColumns}textForCell(r,o){var a;return"".concat((a=this.data[r])===null||a===void 0?void 0:a[o])}textForColumnHeader(r){return"".concat(r)}textAlignForCell(r,o){var a;return(a=this.textAlignments.get(r))!==null&&a!==void 0?a:Uo}renderTypeForCell(r,o){return r<20||r%2===o%2?"dataBar":"text"}dataBarOptionsForCell(r,o){var a,l,n,s,i,h,d,c=Ve(this.columnMins,r),g=Ve(this.columnMaxs,r),m=(a=this.columnAxes.get(r))!==null&&a!==void 0?a:Fo,v=(l=this.valuePlacements.get(r))!==null&&l!==void 0?l:Vo,x=this.opacities.get(r);x==null||x>1?x=1:x<0&&(x=0);var b=(n=this.directions.get(r))!==null&&n!==void 0?n:Oo,M=(s=this.positiveColors.get(r))!==null&&s!==void 0?s:_o,q=(i=this.negativeColors.get(r))!==null&&i!==void 0?i:Bo,A=Number((h=this.data[r])===null||h===void 0?void 0:h[o]),F=A>=0?M:q,re=(d=this.markers.get(r))!==null&&d!==void 0?d:[];return{columnMin:c,columnMax:g,axis:m,color:F,valuePlacement:v,opacity:x,markers:re,direction:b,value:A}}}const Wo=Go,fe="hide-from-e2e-tests",Qe="sample-section";function*mr(t=1){for(;;)t=t*16807%2147483647,yield t/2147483647}function zo(t=1){const[r]=u.useState(()=>mr(t));return u.useCallback(()=>{const o=r.next();if(o.done===!0)throw new Error("Random number generator unexpectedly finished");return o.value},[r])}function p(t,r=[]){const o=`${Qe}-${t.toLocaleLowerCase().replaceAll(" ","-")}`,a=ee(Qe,...r);return{id:o,className:a}}function T(t,r=[]){const{id:o,className:a}=p(t,r);return{id:o,UNSAFE_className:a}}class Le extends u.Component{static renderAlert(r){return e.jsxs("div",{className:ee("alert",`alert-${r}`),children:[e.jsx("strong",{children:"Well done!"}),"You successfully read this ",r," alert message."]},r)}render(){const r=["success","info","warning","danger"].map(o=>Le.renderAlert(o));return e.jsxs("div",{...p("alerts"),children:[e.jsx("h2",{className:"ui-title",children:"Alerts"}),e.jsx("div",{style:{padding:"1rem 0"},children:r})]})}}class J extends u.Component{static renderButtonBrand(r,o){const a=r.length?`btn-${r}-${o}`:`btn-${o}`;return e.jsx(R,{className:a,style:{marginBottom:"1rem",marginRight:"1rem"},children:o},o)}static renderButtons(r){const o=["primary","secondary","success","info","danger"].map(a=>J.renderButtonBrand(r,a));return e.jsxs("div",{...p(`buttons-${r.length?"outline":"regular"}`),children:[e.jsx("h5",{children:r.length?"Outline":"Regular"}),o]},r)}static renderSocketedButtons(){return e.jsxs("div",{...p("buttons-socketed"),children:[e.jsx("h5",{children:"Socketed Buttons (for linker)"}),e.jsx(Y,{style:{marginBottom:"1rem",marginRight:"1rem"},children:"Unlinked"}),e.jsx(Y,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,children:"Linked"}),e.jsx(Y,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinkedSource:!0,children:"Linked Source"}),e.jsx(Y,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,isInvalid:!0,children:"Error"}),e.jsx(Y,{style:{marginBottom:"1rem",marginRight:"1rem"},disabled:!0,children:"Disabled"})]})}constructor(r){super(r),this.state={toggle:!0}}renderInlineButtons(){const{toggle:r}=this.state;return e.jsxs("div",{...p("buttons-inline"),style:{padding:"1rem 0"},children:[e.jsx("h5",{children:"Inline Buttons"}),"Regular btn-inline:",e.jsx(R,{className:"btn-inline mx-2",children:e.jsx(f,{icon:G})}),"Toggle button (class active):",e.jsx(R,{className:ee("btn-inline mx-2",{active:r}),onClick:()=>{this.setState({toggle:!r})},children:e.jsx(f,{icon:G})}),"Disabled:",e.jsx(R,{className:"btn-inline mx-2",disabled:!0,children:e.jsx(f,{icon:G})}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("span",{children:"btn-link-icon (no text):"}),e.jsx(R,{className:"btn-link btn-link-icon px-2",children:e.jsx(f,{icon:G})}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(R,{className:"btn-link",children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsxs(R,{className:"btn-link",children:[e.jsx(f,{icon:G}),"Add Item"]})]})}render(){const r=["","outline"].map(l=>J.renderButtons(l)),o=this.renderInlineButtons(),a=J.renderSocketedButtons();return e.jsxs("div",{children:[e.jsx("h2",{className:"ui-title",children:"Buttons"}),e.jsxs("div",{style:{padding:"1rem 0"},children:[r,o,a]})]})}}function qo(){const t=gr();qe.random=zo();const[r]=u.useState(()=>new qe(t));return e.jsxs("div",{...p("charts"),children:[e.jsx("h2",{className:"ui-title",children:"Chart"}),e.jsx("div",{style:{height:500},children:e.jsx(qr,{model:r})})]})}function Zo(){const t=[["100","900"],["200","800"],["300","700"],["400","600"],["500","500"],["600","500"],["700","400"],["800","300"],["850","200"],["8XX","100"],["900","75"]].map(([o,a])=>e.jsxs("div",{className:ee("swatch","gray-swatch",`gray-swatch-${o}`),children:[e.jsxs("span",{children:["Gray-",o]}),e.jsxs("span",{style:{backgroundColor:`var(--dh-color-gray-${a})`},children:["--dh-gray-",a]})]},o)),r=["red","orange","yellow","green","blue","purple","white","black","content-bg","primary","primary-dark","background","foreground"].map(o=>e.jsx("div",{className:ee("swatch",`swatch-${o}`),children:o},o));return e.jsxs("div",{...p("colors"),children:[e.jsx("h2",{className:"ui-title",children:"Colors"}),e.jsxs("div",{className:"row",children:[e.jsx("div",{className:"col",children:t}),e.jsx("div",{className:"col",children:r}),e.jsxs("div",{className:"col",children:[e.jsx("p",{children:"Gray Range is available for background/tab colors, and should cover the full range used in mockups. Always use the semantic color names in your .scss files when applicable for UI elements."}),e.jsx("p",{children:"For refrence key colors are $primary for interactable elements, content-bg as background. White is same as gray-200. Gray-100 is used when white needs an active color. content-bg is between 800 and 900."}),e.jsx("pre",{children:`
2
2
  // as semantic colours
3
3
  $primary: $interfaceblue;
4
4
  $secondary: $gray-600;
@@ -222,4 +222,4 @@ simulation = shares30min.update("Values=(double[])ss.update(Sym, TargetPosition,
222
222
  `,Rt="_themeColors_1nrrl_1",Lt="_label_1nrrl_8",Pt="_swatch_1nrrl_17",Se={themeColors:Rt,label:Lt,swatch:Pt},Ft={"--dh-color-black":"gray","--dh-color-white":"gray","--dh-color-visual-positive":"Visual Status","--dh-color-visual-negative":"Visual Status","--dh-color-visual-notice":"Visual Status","--dh-color-visual-info":"Visual Status","--dh-color-editor-bg":"editor","--dh-color-editor-fg":"editor","--dh-color-editor-context-menu-bg":"menus","--dh-color-editor-context-menu-fg":"menus","--dh-color-editor-menu-selection-bg":"menus","--dh-color-grid-bg":"grid","--dh-color-grid-number-positive":"Data Types","--dh-color-grid-number-negative":"Data Types","--dh-color-grid-number-zero":"Data Types","--dh-color-grid-date":"Data Types","--dh-color-grid-string-null":"Data Types"},oe={editor:{line:"editor",comment:"code",string:"code",number:"code",delimiter:"code",identifier:"code",keyword:"code",operator:"code",storage:"code",predefined:"code",selection:"state",focus:"state"},chart:{axis:"Chart",bg:"Chart",grid:"Chart",plot:"Chart",title:"Chart",active:"Data",trend:"Data",area:"Data",range:"Data",line:"Deprecated"},grid:{data:"Data Bars",context:"Context Menu"},semantic:{positive:"status",negative:"status",notice:"status",info:"status",well:"wells"}},_t={"Theme Color Palette":U(Et,1),"Semantic Colors":U(It,1,oe.semantic),"Chart Colors":U(Dt,2,oe.chart),"Editor Colors":U($t,2,oe.editor),"Grid Colors":U(Mt,2,oe.grid),"Component Colors":U(At,1)};function Bt(){return e.jsx(e.Fragment,{children:Object.entries(_t).map(([t,r])=>e.jsxs("div",{...p(t),children:[e.jsx("h2",{className:"ui-title",children:t}),e.jsx("div",{className:Se.themeColors,children:Object.entries(r).map(([o,a])=>e.jsxs("div",{style:{gridRow:`span ${a.length+1}`},children:[e.jsx("span",{className:Se.label,children:o}),a.map(({name:l,value:n})=>e.jsxs("div",{className:Se.swatch,style:{backgroundColor:n,color:`var(--dh-color-${Vt(n)})`},children:[e.jsxs(le,{children:[e.jsx("div",{children:l}),e.jsx("div",{children:n}),e.jsx("div",{children:Ie.normalizeCssColor(n).replace(/^(#[a-f0-9]{6})ff$/,"$1")})]}),e.jsx("span",{children:l.replace("--dh-color-","")}),l.endsWith("-hue")?e.jsx("span",{children:n}):null]},l))]},o))})]},t))})}function Vt(t){const r=Ie.parseRgba(Ie.asRgbOrRgbaString(t)??"");if(r==null||r.a<.5)return"white";const{r:o,g:a,b:l}=r;return(299*o+587*a+114*l)/1e3>=128?"black":"white"}function Ot(t){const r=getComputedStyle(document.documentElement);return t.split(/[\n;]/g).map(a=>/^(?:\s{2}|:root\{)?(--dh-color-(?:[^:]+))/.exec(a)?.[1]).filter(a=>!!a).map(a=>{const l=r.getPropertyValue(a);return a==="--dh-color-chart-colorway"?l.split("hsl").filter(Boolean).map(s=>`hsl${s.trim()}`).map((s,i)=>({name:`${a}-${i}`,value:s})):{name:a,value:l}}).flat()}function U(t,r,o={}){return Ot(t).reduce((n,{name:s,value:i})=>{const h=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(s);let d=Ft[s]??h?.[r]??h?.[1]??"???";return d=o[d]??d,n[d]==null&&(n[d]=[]),s==="--dh-color-black"&&n[d].push({name:"",value:""}),n[d].push({name:s,value:i}),n},{})}const Te="data-menu-category",Ut="data-no-menu",pr="spectrum-component-samples";function Ht(){return e.jsxs("div",{id:pr,children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Spectrum Components"}),e.jsxs(De,{gap:20,columns:Cr("0px","1fr"),children:[e.jsxs(_,{...T("spectrum-buttons"),children:[e.jsx("h3",{children:"Buttons"}),e.jsx(Gt,{})]}),e.jsxs(_,{...T("spectrum-collections"),children:[e.jsx("h3",{children:"Collections"}),e.jsx(Zt,{})]}),e.jsxs(_,{...T("spectrum-content"),children:[e.jsx("h3",{children:"Content"}),e.jsx(qt,{})]}),e.jsxs(_,{...T("spectrum-forms"),children:[e.jsx("h3",{children:"Forms"}),e.jsx(zt,{})]}),e.jsxs(_,{...T("spectrum-overlays"),children:[e.jsx("h3",{children:"Overlays"}),e.jsx(Wt,{})]}),e.jsxs(_,{...T("spectrum-well"),children:[e.jsx("h3",{children:"Wells"}),e.jsx(Sr,{children:"This is a well."})]})]})]})}function Gt(){return e.jsxs(De,{autoFlow:"column",columnGap:"size-250",rowGap:"size-150",columns:ke(4,"size-2000"),rows:ke(8,"size-400"),children:[e.jsx("label",{children:'Button style="outline"'}),e.jsx(j,{variant:"primary",style:"outline",children:"Primary"}),e.jsx(j,{variant:"secondary",style:"outline",children:"Secondary"}),e.jsx(j,{variant:"accent",style:"outline",children:"Accent"}),e.jsx(j,{variant:"negative",style:"outline",children:"Negative"}),e.jsx(j,{variant:"primary",staticColor:"black",style:"outline",children:"Static Black"}),e.jsx(j,{variant:"primary",staticColor:"white",style:"outline",children:"Static White"}),e.jsx(j,{variant:"primary",isDisabled:!0,style:"outline",children:"Disabled"}),e.jsx("label",{children:'Button style="fill"'}),e.jsx(j,{variant:"primary",style:"fill",children:"Primary"}),e.jsx(j,{variant:"secondary",style:"fill",children:"Secondary"}),e.jsx(j,{variant:"accent",style:"fill",children:"Accent"}),e.jsx(j,{variant:"negative",style:"fill",children:"Negative"}),e.jsx(j,{variant:"primary",staticColor:"black",style:"fill",children:"Static Black"}),e.jsx(j,{variant:"primary",staticColor:"white",style:"fill",children:"Static White"}),e.jsx(j,{variant:"primary",isDisabled:!0,style:"fill",children:"Disabled"}),e.jsx("label",{children:"Action Button"}),e.jsx(H,{children:"Normal"}),e.jsx(H,{gridRow:"span 3",isQuiet:!0,children:"Quiet"}),e.jsx(H,{staticColor:"black",children:"Static Black"}),e.jsx(H,{staticColor:"white",children:"Static White"}),e.jsx(H,{isDisabled:!0,children:"Disabled"}),e.jsx("label",{children:"Toggle Button"}),e.jsx(B,{children:"Normal"}),e.jsx(B,{isQuiet:!0,children:"Quiet"}),e.jsx(B,{gridRow:"span 2",isEmphasized:!0,children:"Emphasized"}),e.jsx(B,{staticColor:"black",children:"Static Black"}),e.jsx(B,{staticColor:"white",children:"Static White"}),e.jsx(B,{isDisabled:!0,children:"Disabled"})]})}function Wt(){return e.jsxs(e.Fragment,{children:[e.jsx(Be,{children:"Contextual Help"}),e.jsxs(Tr,{variant:"info",children:[e.jsx(cr,{children:"Need help?"}),e.jsx(ir,{children:e.jsx(Be,{children:"This is a helpful description of the thing you need help with."})})]})]})}function zt(){return e.jsx(Nr,{children:e.jsxs(De,{gap:20,columns:ke("auto-fit","210px"),children:[e.jsx(kr,{label:"Text Field"}),e.jsxs(Er,{label:"Combobox",menuTrigger:"focus",defaultSelectedKey:"two",children:[e.jsx(te,{children:"One"},"one"),e.jsx(te,{children:"Two"},"two"),e.jsx(te,{children:"Three"},"three")]}),e.jsx(Ir,{children:"Checkbox"}),e.jsx(Dr,{label:"Slider",defaultValue:24}),e.jsx($r,{children:"Switch"})]})})}function qt(){return e.jsxs(Mr,{children:[e.jsx(ie,{size:"XL",children:e.jsx(f,{icon:L.vsEmptyWindow})}),e.jsx(cr,{children:"Illustrated Message"}),e.jsx(ir,{children:"This is the content of the message."})]})}function Zt(){return e.jsxs(e.Fragment,{children:[e.jsx("label",{id:"table-view-sample",children:"Table View"}),e.jsxs(Ar,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",children:[e.jsxs(Rr,{children:[e.jsxs(V,{title:"Person",children:[e.jsx(V,{allowsResizing:!0,children:"Name"}),e.jsx(V,{children:"Age"})]}),e.jsxs(V,{title:"Address",children:[e.jsx(V,{allowsResizing:!0,children:"City"}),e.jsx(V,{children:"State"})]})]}),e.jsxs(Lr,{children:[e.jsxs(he,{children:[e.jsx(k,{children:"John"}),e.jsx(k,{children:"42"}),e.jsx(k,{children:"San Francisco"}),e.jsx(k,{children:"CA"})]}),e.jsxs(he,{children:[e.jsx(k,{children:"Jane"}),e.jsx(k,{children:"38"}),e.jsx(k,{children:"San Francisco"}),e.jsx(k,{children:"CA"})]}),e.jsxs(he,{children:[e.jsx(k,{children:"Becky"}),e.jsx(k,{children:"12"}),e.jsx(k,{children:"San Francisco"}),e.jsx(k,{children:"CA"})]})]})]})]})}function Ne({"data-menu-category":t}){return e.jsx("div",{"data-menu-category":t})}function Yt(){const[t,r]=u.useState([]);u.useEffect(()=>{let a={category:"",items:[]};const l=[a],n=document.querySelector(`#${pr}`);document.querySelectorAll(`h2,h3,[${Te}]`).forEach(s=>{if(s.textContent==null||s.hasAttribute(Ut))return;if(s.hasAttribute(Te)){a={category:s.getAttribute(Te)??"",items:[]},l.push(a);return}const i=`${n?.contains(s)===!0?"spectrum-":""}${s.textContent}`.toLowerCase().replace(/\s/g,"-");s.id=i,a.items.push({id:i,label:s.textContent})}),r(l)},[]),u.useEffect(()=>{const a=window.location.hash===""?null:document.querySelector(window.location.hash);a&&setTimeout(()=>{a.scrollIntoView()},0)},[]);const o=u.useCallback(a=>{const l=String(a);document.getElementById(l)?.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{window.location.hash=l},1e3)},[]);return e.jsxs(Pr,{children:[e.jsx(H,{children:e.jsx(ie,{children:e.jsx(f,{icon:Gr})})}),e.jsx(Fr,{items:t,onAction:o,children:({category:a,items:l})=>e.jsx(_r,{items:l,title:a,children:({id:n,label:s})=>e.jsx(te,{children:s},n)},a)})]})}function Xt(){const t=u.useCallback(()=>{window.scrollTo({top:0,behavior:"smooth"}),setTimeout(()=>{window.location.hash=""},500)},[]);return u.useEffect(()=>{function r(){document.documentElement.dataset.scroll=String(window.scrollY>120)}return document.addEventListener("scroll",r,{passive:!0}),()=>{document.removeEventListener("scroll",r)}},[]),e.jsx(j,{UNSAFE_className:"goto-top-button",variant:"accent",onPress:t,children:e.jsx(ie,{children:e.jsx(f,{icon:Wr})})})}const sr={position:"sticky",justifyContent:"end",zIndex:1,UNSAFE_style:{float:"right"}};function Kt(){const t=window.location.search.includes("isolateSection=true");return e.jsxs("div",{className:"container style-guide-container",children:[t&&e.jsx("style",{children:`.${fe}, .sample-section:not(${window.location.hash}), :not(.sample-section) > h2 {
223
223
  display: none;
224
224
  }`}),e.jsx(D,{justifyContent:"space-between",alignItems:"center",marginTop:"2rem",marginBottom:"1rem",children:e.jsx("h1",{style:{paddingTop:"2rem"},children:"Deephaven UI Components"})}),e.jsx(D,{...sr,UNSAFE_className:fe,marginTop:-56,top:20,children:e.jsx(Yt,{})}),e.jsx(D,{...sr,UNSAFE_className:fe,top:"calc(100vh - 40px)",marginTop:-32,children:e.jsx(Xt,{})}),e.jsx(yt,{}),e.jsx(Ne,{"data-menu-category":"Colors"}),e.jsx(Zo,{}),e.jsx(Bt,{}),e.jsx(Ne,{"data-menu-category":"Components"}),e.jsx(J,{}),e.jsx(xt,{}),e.jsx(Le,{}),e.jsx(gt,{}),e.jsx(vt,{}),e.jsx(ne,{}),e.jsx(ft,{}),e.jsx(Xo,{}),e.jsx(pt,{}),e.jsx(Yo,{}),e.jsx(Ko,{}),e.jsx(kt,{}),e.jsx(bt,{}),e.jsx(ht,{}),e.jsx(et,{}),e.jsx(ct,{}),e.jsx(qo,{}),e.jsx(vo,{}),e.jsx(Ne,{"data-menu-category":"Spectrum Components"}),e.jsx(Ht,{})]})}function Pe(t){const{workspace:r,setWorkspace:o}=t;return u.useEffect(()=>{fo.makeDefaultWorkspace({getLayouts:async()=>[],getLayout:async()=>({})}).then(o)},[o]),r!=null?e.jsx(Kt,{}):null}Pe.propTypes={workspace:se.shape({}),setWorkspace:se.func.isRequired};Pe.defaultProps={workspace:null};const Qt=t=>({workspace:yo(t)}),Jt=Br(Qt,{setWorkspace:bo})(Pe);function ha(){return po.register(new URL("./download/serviceWorker.js",window.location.href)),xo.init({getWorker:()=>new zr}),window["__react-beautiful-dnd-disable-dev-warnings"]=!0,e.jsx(io,{children:e.jsx(Vr,{store:jo,children:e.jsx(Jt,{})})})}export{ha as StyleGuideRoot,ha as default};
225
- //# sourceMappingURL=StyleGuideRoot-302c2e3d.js.map
225
+ //# sourceMappingURL=StyleGuideRoot-c8e71114.js.map