Spaces:
Running
Running
adjust tab label size; add function surface plot for bivariate functions; point tooltip for contour heatmap
Browse files
dist/assets/{index-D4A1ut36.css → index-DgnksOIx.css}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-700:oklch(50.5% .213 27.518);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-blue-600:oklch(54.6% .245 262.881);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-800:oklch(27.9% .041 260.031);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-950:oklch(13% .028 261.692);--color-stone-50:oklch(98.5% .001 106.423);--color-stone-100:oklch(97% .001 106.424);--color-stone-200:oklch(92.3% .003 48.717);--color-stone-300:oklch(86.9% .005 56.366);--color-stone-400:oklch(70.9% .01 56.259);--color-stone-500:oklch(55.3% .013 58.071);--color-stone-600:oklch(44.4% .011 73.639);--color-stone-700:oklch(37.4% .01 67.558);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--animate-spin:spin 1s linear infinite;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.z-50{z-index:50}.m-4{margin:calc(var(--spacing)*4)}.-mt-2{margin-top:calc(var(--spacing)*-2)}.-mt-5{margin-top:calc(var(--spacing)*-5)}.-mt-6{margin-top:calc(var(--spacing)*-6)}.mt-0{margin-top:calc(var(--spacing)*0)}.-mb-2{margin-bottom:calc(var(--spacing)*-2)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-3{height:calc(var(--spacing)*3)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-16{height:calc(var(--spacing)*16)}.h-64{height:calc(var(--spacing)*64)}.h-full{height:100%}.h-px{height:1px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-64{min-height:calc(var(--spacing)*64)}.min-h-\[320px\]{min-height:320px}.min-h-\[420px\]{min-height:420px}.w-3{width:calc(var(--spacing)*3)}.w-16{width:calc(var(--spacing)*16)}.w-fit{width:fit-content}.w-full{width:100%}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.translate-y-4{--tw-translate-y:calc(var(--spacing)*4);translate:var(--tw-translate-x)var(--tw-translate-y)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[1fr_12fr_1fr\]{grid-template-columns:1fr 12fr 1fr}.grid-cols-\[6rem_minmax\(0\,1fr\)\]{grid-template-columns:6rem minmax(0,1fr)}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-12{gap:calc(var(--spacing)*12)}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.justify-self-end{justify-self:flex-end}.overflow-auto{overflow:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.border{border-style:var(--tw-border-style);border-width:1px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-orange-400{border-color:var(--color-orange-400)}.border-slate-200{border-color:var(--color-slate-200)}.border-stone-200{border-color:var(--color-stone-200)}.border-stone-300{border-color:var(--color-stone-300)}.border-t-blue-600{border-top-color:var(--color-blue-600)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-orange-200{background-color:var(--color-orange-200)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-300{background-color:var(--color-slate-300)}.bg-stone-50{background-color:var(--color-stone-50)}.bg-stone-100{background-color:var(--color-stone-100)}.bg-white{background-color:var(--color-white)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-5{padding-inline:calc(var(--spacing)*5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.pr-0\.25{padding-right:calc(var(--spacing)*.25)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-center{text-align:center}.text-right{text-align:right}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-6{--tw-leading:calc(var(--spacing)*6);line-height:calc(var(--spacing)*6)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.whitespace-nowrap{white-space:nowrap}.text-gray-700{color:var(--color-gray-700)}.text-gray-950{color:var(--color-gray-950)}.text-orange-400{color:var(--color-orange-400)}.text-red-700{color:var(--color-red-700)}.text-slate-600{color:var(--color-slate-600)}.text-slate-800{color:var(--color-slate-800)}.text-stone-500{color:var(--color-stone-500)}.text-stone-600{color:var(--color-stone-600)}.text-stone-700{color:var(--color-stone-700)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.last\:mb-0:last-child{margin-bottom:calc(var(--spacing)*0)}@media(hover:hover){.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-orange-300:hover{background-color:var(--color-orange-300)}.hover\:bg-stone-200:hover{background-color:var(--color-stone-200)}}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-stone-400:focus{--tw-ring-color:var(--color-stone-400)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}@media(min-width:64rem){.lg\:flex{display:flex}.lg\:h-dvh{height:100dvh}.lg\:grid-cols-\[2fr_1fr\]{grid-template-columns:2fr 1fr}.lg\:gap-12{gap:calc(var(--spacing)*12)}}.\[\&_p\]\:mb-0 p{margin-bottom:calc(var(--spacing)*0)}}.title{font-size:32px;font-weight:700}.status{color:var(--ink-soft);border:1px solid var(--line);background:#ffffffbf;border-radius:999px;flex:none;align-items:center;gap:8px;padding:8px 12px;font-size:12px;display:flex}.status span{background:#d69b25;border-radius:50%;width:8px;height:8px;box-shadow:0 0 0 4px #f8ebca}.status.ready span{background:#2c9b68;box-shadow:0 0 0 4px #d9f0e5}.status.error span{background:#c74848;box-shadow:0 0 0 4px #f5dddd}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}
|
|
|
|
| 1 |
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-700:oklch(50.5% .213 27.518);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-blue-600:oklch(54.6% .245 262.881);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-800:oklch(27.9% .041 260.031);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-950:oklch(13% .028 261.692);--color-stone-50:oklch(98.5% .001 106.423);--color-stone-100:oklch(97% .001 106.424);--color-stone-200:oklch(92.3% .003 48.717);--color-stone-300:oklch(86.9% .005 56.366);--color-stone-400:oklch(70.9% .01 56.259);--color-stone-500:oklch(55.3% .013 58.071);--color-stone-600:oklch(44.4% .011 73.639);--color-stone-700:oklch(37.4% .01 67.558);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--animate-spin:spin 1s linear infinite;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.z-50{z-index:50}.m-4{margin:calc(var(--spacing)*4)}.-mt-2{margin-top:calc(var(--spacing)*-2)}.-mt-5{margin-top:calc(var(--spacing)*-5)}.-mt-6{margin-top:calc(var(--spacing)*-6)}.mt-0{margin-top:calc(var(--spacing)*0)}.-mb-2{margin-bottom:calc(var(--spacing)*-2)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-3{height:calc(var(--spacing)*3)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-16{height:calc(var(--spacing)*16)}.h-64{height:calc(var(--spacing)*64)}.h-full{height:100%}.h-px{height:1px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-64{min-height:calc(var(--spacing)*64)}.min-h-\[320px\]{min-height:320px}.min-h-\[420px\]{min-height:420px}.w-1\/2{width:50%}.w-3{width:calc(var(--spacing)*3)}.w-16{width:calc(var(--spacing)*16)}.w-fit{width:fit-content}.w-full{width:100%}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.translate-y-4{--tw-translate-y:calc(var(--spacing)*4);translate:var(--tw-translate-x)var(--tw-translate-y)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[1fr_12fr_1fr\]{grid-template-columns:1fr 12fr 1fr}.grid-cols-\[6rem_minmax\(0\,1fr\)\]{grid-template-columns:6rem minmax(0,1fr)}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-12{gap:calc(var(--spacing)*12)}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.justify-self-end{justify-self:flex-end}.overflow-auto{overflow:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.border{border-style:var(--tw-border-style);border-width:1px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-orange-400{border-color:var(--color-orange-400)}.border-slate-200{border-color:var(--color-slate-200)}.border-stone-200{border-color:var(--color-stone-200)}.border-stone-300{border-color:var(--color-stone-300)}.border-t-blue-600{border-top-color:var(--color-blue-600)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-orange-200{background-color:var(--color-orange-200)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-300{background-color:var(--color-slate-300)}.bg-stone-50{background-color:var(--color-stone-50)}.bg-stone-100{background-color:var(--color-stone-100)}.bg-white{background-color:var(--color-white)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-5{padding-inline:calc(var(--spacing)*5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.pr-0\.25{padding-right:calc(var(--spacing)*.25)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-center{text-align:center}.text-right{text-align:right}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-6{--tw-leading:calc(var(--spacing)*6);line-height:calc(var(--spacing)*6)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.whitespace-nowrap{white-space:nowrap}.text-gray-700{color:var(--color-gray-700)}.text-gray-950{color:var(--color-gray-950)}.text-orange-400{color:var(--color-orange-400)}.text-red-700{color:var(--color-red-700)}.text-slate-600{color:var(--color-slate-600)}.text-slate-800{color:var(--color-slate-800)}.text-stone-500{color:var(--color-stone-500)}.text-stone-600{color:var(--color-stone-600)}.text-stone-700{color:var(--color-stone-700)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.last\:mb-0:last-child{margin-bottom:calc(var(--spacing)*0)}@media(hover:hover){.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-orange-300:hover{background-color:var(--color-orange-300)}.hover\:bg-stone-200:hover{background-color:var(--color-stone-200)}}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-stone-400:focus{--tw-ring-color:var(--color-stone-400)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}@media(min-width:64rem){.lg\:flex{display:flex}.lg\:h-dvh{height:100dvh}.lg\:grid-cols-\[2fr_1fr\]{grid-template-columns:2fr 1fr}.lg\:gap-12{gap:calc(var(--spacing)*12)}}.\[\&_p\]\:mb-0 p{margin-bottom:calc(var(--spacing)*0)}.\[\&\>div\]\:w-full>div{width:100%}.\[\&\>div\>button\]\:w-1\/4>div>button{width:25%}.\[\&\>div\>button\]\:px-1>div>button{padding-inline:calc(var(--spacing)*1)}}.title{font-size:32px;font-weight:700}.status{color:var(--ink-soft);border:1px solid var(--line);background:#ffffffbf;border-radius:999px;flex:none;align-items:center;gap:8px;padding:8px 12px;font-size:12px;display:flex}.status span{background:#d69b25;border-radius:50%;width:8px;height:8px;box-shadow:0 0 0 4px #f8ebca}.status.ready span{background:#2c9b68;box-shadow:0 0 0 4px #d9f0e5}.status.error span{background:#c74848;box-shadow:0 0 0 4px #f5dddd}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}
|
dist/assets/{index-khD9IdcU.js → index-dM9JSh_J.js}
RENAMED
|
The diff for this file is too large to render.
See raw diff
|
|
|
dist/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
| 5 |
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 7 |
<title>Optimization</title>
|
| 8 |
-
<script type="module" crossorigin src="/assets/index-
|
| 9 |
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
| 10 |
</head>
|
| 11 |
<body>
|
| 12 |
<div id="root"></div>
|
|
|
|
| 5 |
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 7 |
<title>Optimization</title>
|
| 8 |
+
<script type="module" crossorigin src="/assets/index-dM9JSh_J.js"></script>
|
| 9 |
+
<link rel="stylesheet" crossorigin href="/assets/index-DgnksOIx.css">
|
| 10 |
</head>
|
| 11 |
<body>
|
| 12 |
<div id="root"></div>
|
frontends/react/src/App.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import { useEffect, useState, useRef } from "react";
|
|
| 2 |
import OptimizationPlot from "./OptimizationPlot.tsx";
|
| 3 |
import Sidebar from "./Sidebar.tsx";
|
| 4 |
import ComparePanel from "./ComparePanel";
|
| 5 |
-
import type { ComparisonEntry, SettingsUi } from "./types.ts";
|
| 6 |
import usePyodide from "./usePyodide.ts";
|
| 7 |
|
| 8 |
const INITIAL_SETTINGS_UI: SettingsUi = {
|
|
@@ -18,6 +18,16 @@ const INITIAL_SETTINGS_UI: SettingsUi = {
|
|
| 18 |
const INITIAL_XLIM: [number, number] = [-1, 1];
|
| 19 |
const INITIAL_YLIM: [number, number] = [-1, 1];
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
export default function App() {
|
| 22 |
const [settingsUi, setSettingsUi] = useState<SettingsUi>(INITIAL_SETTINGS_UI);
|
| 23 |
const [compareActive, setCompareActive] = useState(false);
|
|
@@ -27,6 +37,7 @@ export default function App() {
|
|
| 27 |
const nextId = useRef(1);
|
| 28 |
const [isAnimating, setIsAnimating] = useState(false);
|
| 29 |
const [showGradientField, setShowGradientField] = useState(false);
|
|
|
|
| 30 |
const xlimRef = useRef<[number, number]>(INITIAL_XLIM);
|
| 31 |
const ylimRef = useRef<[number, number]>(INITIAL_YLIM);
|
| 32 |
const settings = { ...settingsUi, xlim: xlimRef.current, ylim: ylimRef.current };
|
|
@@ -103,16 +114,37 @@ export default function App() {
|
|
| 103 |
</header>
|
| 104 |
|
| 105 |
<div className="grid grid-cols-1 lg:grid-cols-[2fr_1fr] gap-12 flex-1 min-h-0 overflow-auto">
|
| 106 |
-
<
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
<Sidebar
|
| 117 |
onTabChange={(tab) => { setCompareActive(tab === "Compare"); setIsAnimating(false); setComparisonAnimating(false); }}
|
| 118 |
comparison={<ComparePanel settings={settingsUi} entries={entries} trajectories={api.comparison}
|
|
@@ -120,7 +152,11 @@ export default function App() {
|
|
| 120 |
onAdd={(configured) => {
|
| 121 |
const id = nextId.current++;
|
| 122 |
setComparisonIteration(0);
|
| 123 |
-
setEntries(previous => [...previous, {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
}}
|
| 125 |
onRemove={(id) => { setComparisonAnimating(false); setEntries(previous => previous.filter(entry => entry.id !== id)); }}
|
| 126 |
onAction={(action) => {
|
|
|
|
| 2 |
import OptimizationPlot from "./OptimizationPlot.tsx";
|
| 3 |
import Sidebar from "./Sidebar.tsx";
|
| 4 |
import ComparePanel from "./ComparePanel";
|
| 5 |
+
import type { BivariatePlotView, ComparisonEntry, SettingsUi } from "./types.ts";
|
| 6 |
import usePyodide from "./usePyodide.ts";
|
| 7 |
|
| 8 |
const INITIAL_SETTINGS_UI: SettingsUi = {
|
|
|
|
| 18 |
const INITIAL_XLIM: [number, number] = [-1, 1];
|
| 19 |
const INITIAL_YLIM: [number, number] = [-1, 1];
|
| 20 |
|
| 21 |
+
const ALGORITHM_COLORS: Record<SettingsUi["algorithm"], string> = {
|
| 22 |
+
"Gradient Descent": "#0072B2",
|
| 23 |
+
"Nesterov": "#E69F00",
|
| 24 |
+
"Newton": "#009E73",
|
| 25 |
+
"Adam": "#D55E00",
|
| 26 |
+
"Adagrad": "#CC79A7",
|
| 27 |
+
"RMSProp": "#56B4E9",
|
| 28 |
+
"Adadelta": "#6F4EBA",
|
| 29 |
+
};
|
| 30 |
+
|
| 31 |
export default function App() {
|
| 32 |
const [settingsUi, setSettingsUi] = useState<SettingsUi>(INITIAL_SETTINGS_UI);
|
| 33 |
const [compareActive, setCompareActive] = useState(false);
|
|
|
|
| 37 |
const nextId = useRef(1);
|
| 38 |
const [isAnimating, setIsAnimating] = useState(false);
|
| 39 |
const [showGradientField, setShowGradientField] = useState(false);
|
| 40 |
+
const [bivariatePlotView, setBivariatePlotView] = useState<BivariatePlotView>("Contour heatmap");
|
| 41 |
const xlimRef = useRef<[number, number]>(INITIAL_XLIM);
|
| 42 |
const ylimRef = useRef<[number, number]>(INITIAL_YLIM);
|
| 43 |
const settings = { ...settingsUi, xlim: xlimRef.current, ylim: ylimRef.current };
|
|
|
|
| 114 |
</header>
|
| 115 |
|
| 116 |
<div className="grid grid-cols-1 lg:grid-cols-[2fr_1fr] gap-12 flex-1 min-h-0 overflow-auto">
|
| 117 |
+
<div className="flex h-full min-h-0 min-w-0 flex-col gap-2">
|
| 118 |
+
{settingsUi.mode === "Bivariate" && (
|
| 119 |
+
<div className="flex w-full border-b border-gray-200" role="tablist" aria-label="Bivariate plot view">
|
| 120 |
+
{(["Contour heatmap", "Function surface"] as const).map((view) => (
|
| 121 |
+
<button
|
| 122 |
+
key={view}
|
| 123 |
+
type="button"
|
| 124 |
+
role="tab"
|
| 125 |
+
aria-selected={bivariatePlotView === view}
|
| 126 |
+
onClick={() => setBivariatePlotView(view)}
|
| 127 |
+
className={`w-1/2 cursor-pointer rounded px-5 py-1 ${bivariatePlotView === view
|
| 128 |
+
? "border-b-2 border-orange-400 text-orange-400"
|
| 129 |
+
: "text-gray-950 hover:bg-gray-200"}`}
|
| 130 |
+
>
|
| 131 |
+
{view}
|
| 132 |
+
</button>
|
| 133 |
+
))}
|
| 134 |
+
</div>
|
| 135 |
+
)}
|
| 136 |
+
<OptimizationPlot
|
| 137 |
+
data={compareActive ? { functionValues: api.plotData.functionValues } : api.plotData}
|
| 138 |
+
comparisons={compareActive ? entries.map(entry => ({ ...entry, values: api.comparison.find(item => item.id === entry.id)?.values })) : undefined}
|
| 139 |
+
isLoading={api.isLoading}
|
| 140 |
+
xlim={xlimRef.current}
|
| 141 |
+
ylim={ylimRef.current}
|
| 142 |
+
setAxisLimits={setAxisLimits}
|
| 143 |
+
currentIteration={currentIteration}
|
| 144 |
+
showGradientField={showGradientField}
|
| 145 |
+
bivariatePlotView={bivariatePlotView}
|
| 146 |
+
/>
|
| 147 |
+
</div>
|
| 148 |
<Sidebar
|
| 149 |
onTabChange={(tab) => { setCompareActive(tab === "Compare"); setIsAnimating(false); setComparisonAnimating(false); }}
|
| 150 |
comparison={<ComparePanel settings={settingsUi} entries={entries} trajectories={api.comparison}
|
|
|
|
| 152 |
onAdd={(configured) => {
|
| 153 |
const id = nextId.current++;
|
| 154 |
setComparisonIteration(0);
|
| 155 |
+
setEntries(previous => [...previous, {
|
| 156 |
+
id,
|
| 157 |
+
settings: configured,
|
| 158 |
+
color: ALGORITHM_COLORS[configured.algorithm],
|
| 159 |
+
}]);
|
| 160 |
}}
|
| 161 |
onRemove={(id) => { setComparisonAnimating(false); setEntries(previous => previous.filter(entry => entry.id !== id)); }}
|
| 162 |
onAction={(action) => {
|
frontends/react/src/OptimizationPlot.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import { useMemo, useRef } from "react";
|
| 2 |
import Plot from "react-plotly.js";
|
| 3 |
-
import type { ComparisonEntry, TrajectoryValues, PlotData } from "./types";
|
| 4 |
import { Card } from "@elvis/ui";
|
| 5 |
|
| 6 |
interface OptimizationPlotProps {
|
|
@@ -12,17 +12,22 @@ interface OptimizationPlotProps {
|
|
| 12 |
setAxisLimits: (xlim: [number, number], ylim: [number, number]) => void;
|
| 13 |
currentIteration: number;
|
| 14 |
showGradientField: boolean;
|
|
|
|
| 15 |
}
|
| 16 |
|
| 17 |
-
export default function OptimizationPlot({ comparisons, data, isLoading, xlim, ylim, setAxisLimits, currentIteration, showGradientField }: OptimizationPlotProps) {
|
| 18 |
|
|
|
|
| 19 |
const comparisonTraces = (comparisons ?? []).flatMap((entry, index) => [
|
| 20 |
-
{ x: entry.values?.x ?? [], y: entry.values?.y ?? [],
|
|
|
|
| 21 |
name: `${index + 1}. ${entry.settings.algorithm}`, legendgroup: String(entry.id), showlegend: true,
|
| 22 |
-
line: { color: entry.color, width:
|
| 23 |
-
|
|
|
|
|
|
|
| 24 |
name: `${index + 1}. ${entry.settings.algorithm}`, legendgroup: String(entry.id), showlegend: false,
|
| 25 |
-
marker: { color: entry.color, size: 12, line: { color: "white", width: 2 } } }
|
| 26 |
]);
|
| 27 |
// data
|
| 28 |
let x: number[] = data.functionValues ? data.functionValues.x : [];
|
|
@@ -149,9 +154,20 @@ export default function OptimizationPlot({ comparisons, data, isLoading, xlim, y
|
|
| 149 |
|
| 150 |
const hasNoData = !data.functionValues && !data.trajectoryValues;
|
| 151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 152 |
if (isLoading && hasNoData) {
|
| 153 |
return (
|
| 154 |
-
<Card className="min-h-[320px] flex items-center justify-center p-6">
|
| 155 |
<div className="text-center">
|
| 156 |
<div className="text-lg font-medium">Loading...</div>
|
| 157 |
</div>
|
|
@@ -161,7 +177,7 @@ export default function OptimizationPlot({ comparisons, data, isLoading, xlim, y
|
|
| 161 |
|
| 162 |
if (z.length === 0) {
|
| 163 |
return (
|
| 164 |
-
<Card className="min-h-[320px]">
|
| 165 |
<Plot
|
| 166 |
ref={plotRef}
|
| 167 |
onRelayout={(event) => {
|
|
@@ -221,8 +237,62 @@ export default function OptimizationPlot({ comparisons, data, isLoading, xlim, y
|
|
| 221 |
</Card>
|
| 222 |
);
|
| 223 |
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 224 |
return (
|
| 225 |
-
<Card className="min-h-[420px]">
|
| 226 |
<Plot
|
| 227 |
ref={plotRef}
|
| 228 |
onRelayout={(event) => {
|
|
@@ -290,22 +360,22 @@ export default function OptimizationPlot({ comparisons, data, isLoading, xlim, y
|
|
| 290 |
{
|
| 291 |
x: trajX,
|
| 292 |
y: trajY,
|
| 293 |
-
|
| 294 |
type: 'scatter',
|
| 295 |
mode: 'lines+markers',
|
| 296 |
line: { color: '#d97871', width: 2 },
|
| 297 |
marker: { color: '#d97871', size: 10 },
|
| 298 |
-
|
| 299 |
showlegend: false,
|
| 300 |
},
|
| 301 |
{
|
| 302 |
x: trajX[currentIteration] !== undefined ? [trajX[currentIteration]] : [],
|
| 303 |
y: trajY[currentIteration] !== undefined ? [trajY[currentIteration]] : [],
|
| 304 |
-
|
| 305 |
type: 'scatter',
|
| 306 |
mode: 'markers',
|
| 307 |
marker: { color: 'red', size: 12 },
|
| 308 |
-
|
| 309 |
showlegend: false,
|
| 310 |
}
|
| 311 |
,...comparisonTraces
|
|
|
|
| 1 |
import { useMemo, useRef } from "react";
|
| 2 |
import Plot from "react-plotly.js";
|
| 3 |
+
import type { BivariatePlotView, ComparisonEntry, TrajectoryValues, PlotData } from "./types";
|
| 4 |
import { Card } from "@elvis/ui";
|
| 5 |
|
| 6 |
interface OptimizationPlotProps {
|
|
|
|
| 12 |
setAxisLimits: (xlim: [number, number], ylim: [number, number]) => void;
|
| 13 |
currentIteration: number;
|
| 14 |
showGradientField: boolean;
|
| 15 |
+
bivariatePlotView: BivariatePlotView;
|
| 16 |
}
|
| 17 |
|
| 18 |
+
export default function OptimizationPlot({ comparisons, data, isLoading, xlim, ylim, setAxisLimits, currentIteration, showGradientField, bivariatePlotView }: OptimizationPlotProps) {
|
| 19 |
|
| 20 |
+
const isSurface = bivariatePlotView === "Function surface" && Boolean(data.functionValues?.z);
|
| 21 |
const comparisonTraces = (comparisons ?? []).flatMap((entry, index) => [
|
| 22 |
+
{ x: entry.values?.x ?? [], y: entry.values?.y ?? [], z: isSurface ? entry.values?.z ?? [] : undefined,
|
| 23 |
+
type: isSurface ? "scatter3d" as const : "scatter" as const, mode: "lines+markers" as const,
|
| 24 |
name: `${index + 1}. ${entry.settings.algorithm}`, legendgroup: String(entry.id), showlegend: true,
|
| 25 |
+
line: { color: entry.color, width: isSurface ? 6 : 2 },
|
| 26 |
+
marker: { color: entry.color, size: isSurface ? 2.5 : 6 } },
|
| 27 |
+
{ x: entry.values?.x.slice(-1) ?? [], y: entry.values?.y.slice(-1) ?? [], z: isSurface ? entry.values?.z?.slice(-1) ?? [] : undefined,
|
| 28 |
+
type: isSurface ? "scatter3d" as const : "scatter" as const, mode: "markers" as const,
|
| 29 |
name: `${index + 1}. ${entry.settings.algorithm}`, legendgroup: String(entry.id), showlegend: false,
|
| 30 |
+
marker: { color: entry.color, size: isSurface ? 4 : 12, line: { color: "white", width: isSurface ? 1 : 2 } } }
|
| 31 |
]);
|
| 32 |
// data
|
| 33 |
let x: number[] = data.functionValues ? data.functionValues.x : [];
|
|
|
|
| 154 |
|
| 155 |
const hasNoData = !data.functionValues && !data.trajectoryValues;
|
| 156 |
|
| 157 |
+
function zoomSurfaceAxes(event: React.WheelEvent) {
|
| 158 |
+
event.preventDefault();
|
| 159 |
+
const factor = event.deltaY > 0 ? 1.2 : 1 / 1.2;
|
| 160 |
+
const resizeRange = (range: [number, number]): [number, number] => {
|
| 161 |
+
const center = (range[0] + range[1]) / 2;
|
| 162 |
+
const halfWidth = (range[1] - range[0]) * factor / 2;
|
| 163 |
+
return [center - halfWidth, center + halfWidth];
|
| 164 |
+
};
|
| 165 |
+
setAxisLimits(resizeRange(xlim), resizeRange(ylim));
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
if (isLoading && hasNoData) {
|
| 169 |
return (
|
| 170 |
+
<Card className="min-h-[320px] flex flex-1 items-center justify-center p-6">
|
| 171 |
<div className="text-center">
|
| 172 |
<div className="text-lg font-medium">Loading...</div>
|
| 173 |
</div>
|
|
|
|
| 177 |
|
| 178 |
if (z.length === 0) {
|
| 179 |
return (
|
| 180 |
+
<Card className="min-h-[320px] flex-1">
|
| 181 |
<Plot
|
| 182 |
ref={plotRef}
|
| 183 |
onRelayout={(event) => {
|
|
|
|
| 237 |
</Card>
|
| 238 |
);
|
| 239 |
} else {
|
| 240 |
+
if (isSurface) {
|
| 241 |
+
return (
|
| 242 |
+
<div className="min-h-[420px] flex-1" onWheel={zoomSurfaceAxes}>
|
| 243 |
+
<Card className="h-full">
|
| 244 |
+
<Plot
|
| 245 |
+
ref={plotRef}
|
| 246 |
+
data={[
|
| 247 |
+
{
|
| 248 |
+
x, y, z,
|
| 249 |
+
type: 'surface',
|
| 250 |
+
colorscale: 'Viridis',
|
| 251 |
+
opacity: 0.82,
|
| 252 |
+
showscale: true,
|
| 253 |
+
hovertemplate: 'x: %{x:.5g}<br>y: %{y:.5g}<br>z: %{z:.5g}<extra></extra>',
|
| 254 |
+
},
|
| 255 |
+
{
|
| 256 |
+
x: trajX, y: trajY, z: trajZ,
|
| 257 |
+
type: 'scatter3d', mode: 'lines+markers',
|
| 258 |
+
line: { color: '#d97871', width: 6 },
|
| 259 |
+
marker: { color: '#d97871', size: 2.5 },
|
| 260 |
+
hoverinfo: 'skip', showlegend: false,
|
| 261 |
+
},
|
| 262 |
+
{
|
| 263 |
+
x: trajX[currentIteration] !== undefined ? [trajX[currentIteration]] : [],
|
| 264 |
+
y: trajY[currentIteration] !== undefined ? [trajY[currentIteration]] : [],
|
| 265 |
+
z: trajZ[currentIteration] !== undefined ? [trajZ[currentIteration]] : [],
|
| 266 |
+
type: 'scatter3d', mode: 'markers',
|
| 267 |
+
marker: { color: 'red', size: 7 },
|
| 268 |
+
hoverinfo: 'skip', showlegend: false,
|
| 269 |
+
},
|
| 270 |
+
...comparisonTraces,
|
| 271 |
+
]}
|
| 272 |
+
layout={{
|
| 273 |
+
// Keep the user's camera angle while animation updates the trajectory data.
|
| 274 |
+
uirevision: 'bivariate-surface',
|
| 275 |
+
dragmode: 'orbit',
|
| 276 |
+
showlegend: comparisons !== undefined,
|
| 277 |
+
legend: { x: 0.02, y: 0.98, xanchor: 'left', yanchor: 'top', bgcolor: 'rgba(255,255,255,0.75)' },
|
| 278 |
+
scene: {
|
| 279 |
+
aspectmode: 'cube',
|
| 280 |
+
xaxis: { title: { text: 'x' }, range: xlim, autorange: false },
|
| 281 |
+
yaxis: { title: { text: 'y' }, range: ylim, autorange: false },
|
| 282 |
+
zaxis: { title: { text: 'z' }, range: colorScaleRange ?? undefined, autorange: false },
|
| 283 |
+
},
|
| 284 |
+
margin: { t: 30, r: 20, b: 20, l: 20 },
|
| 285 |
+
}}
|
| 286 |
+
style={{ width: '100%', height: '100%' }}
|
| 287 |
+
config={{ responsive: true, displayModeBar: true, scrollZoom: false }}
|
| 288 |
+
/>
|
| 289 |
+
</Card>
|
| 290 |
+
</div>
|
| 291 |
+
);
|
| 292 |
+
}
|
| 293 |
+
|
| 294 |
return (
|
| 295 |
+
<Card className="min-h-[420px] flex-1">
|
| 296 |
<Plot
|
| 297 |
ref={plotRef}
|
| 298 |
onRelayout={(event) => {
|
|
|
|
| 360 |
{
|
| 361 |
x: trajX,
|
| 362 |
y: trajY,
|
| 363 |
+
customdata: trajZ,
|
| 364 |
type: 'scatter',
|
| 365 |
mode: 'lines+markers',
|
| 366 |
line: { color: '#d97871', width: 2 },
|
| 367 |
marker: { color: '#d97871', size: 10 },
|
| 368 |
+
hovertemplate: 'x: %{x:.5g}<br>y: %{y:.5g}<br>f(x, y): %{customdata:.5g}<extra></extra>',
|
| 369 |
showlegend: false,
|
| 370 |
},
|
| 371 |
{
|
| 372 |
x: trajX[currentIteration] !== undefined ? [trajX[currentIteration]] : [],
|
| 373 |
y: trajY[currentIteration] !== undefined ? [trajY[currentIteration]] : [],
|
| 374 |
+
customdata: trajZ[currentIteration] !== undefined ? [trajZ[currentIteration]] : [],
|
| 375 |
type: 'scatter',
|
| 376 |
mode: 'markers',
|
| 377 |
marker: { color: 'red', size: 12 },
|
| 378 |
+
hovertemplate: 'x: %{x:.5g}<br>y: %{y:.5g}<br>f(x, y): %{customdata:.5g}<extra></extra>',
|
| 379 |
showlegend: false,
|
| 380 |
}
|
| 381 |
,...comparisonTraces
|
frontends/react/src/Sidebar.tsx
CHANGED
|
@@ -145,7 +145,9 @@ export default function Sidebar({
|
|
| 145 |
|
| 146 |
return (
|
| 147 |
<Card className="flex flex-col h-full p-4 gap-2 min-w-0 min-h-0 overflow-auto">
|
| 148 |
-
<
|
|
|
|
|
|
|
| 149 |
|
| 150 |
{/* Tab content */}
|
| 151 |
<div className="flex flex-1 flex-col gap-4 min-h-0 min-w-0 overflow-auto">
|
|
|
|
| 145 |
|
| 146 |
return (
|
| 147 |
<Card className="flex flex-col h-full p-4 gap-2 min-w-0 min-h-0 overflow-auto">
|
| 148 |
+
<div className="w-full [&>div]:w-full [&>div>button]:w-1/4 [&>div>button]:px-1">
|
| 149 |
+
<Tabs tabs={tabs} activeTab={activeTab} onChange={(tab) => { setActiveTab(tab); onTabChange(tab); }} />
|
| 150 |
+
</div>
|
| 151 |
|
| 152 |
{/* Tab content */}
|
| 153 |
<div className="flex flex-1 flex-col gap-4 min-h-0 min-w-0 overflow-auto">
|
frontends/react/src/types.ts
CHANGED
|
@@ -25,6 +25,8 @@ export interface Settings {
|
|
| 25 |
|
| 26 |
export type SettingsUi = Omit<Settings, "xlim" | "ylim">;
|
| 27 |
|
|
|
|
|
|
|
| 28 |
export type PlotValues = {
|
| 29 |
x: number[];
|
| 30 |
y: number[];
|
|
|
|
| 25 |
|
| 26 |
export type SettingsUi = Omit<Settings, "xlim" | "ylim">;
|
| 27 |
|
| 28 |
+
export type BivariatePlotView = "Contour heatmap" | "Function surface";
|
| 29 |
+
|
| 30 |
export type PlotValues = {
|
| 31 |
x: number[];
|
| 32 |
y: number[];
|