@web-noise/core 0.0.10 → 0.0.11-fix2
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.
- package/dist/cjs/components.js +1179 -0
- package/dist/cjs/components.js.map +1 -0
- package/dist/{lib.js → cjs/lib.js} +1 -1
- package/dist/{lib.js.map → cjs/lib.js.map} +1 -1
- package/dist/esm/components.js +1122 -0
- package/dist/esm/components.js.map +1 -0
- package/dist/esm/constants.js +2 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/lib.js +2 -0
- package/dist/esm/lib.js.map +1 -0
- package/dist/main.js +91 -91
- package/dist/main.js.map +1 -1
- package/dist/module.js +83 -83
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +49 -22
- package/dist/components.css +0 -2
- package/dist/components.css.map +0 -1
- package/dist/components.js +0 -1179
- package/dist/components.js.map +0 -1
- /package/dist/{constants.js → cjs/constants.js} +0 -0
- /package/dist/{constants.js.map → cjs/constants.js.map} +0 -0
|
@@ -0,0 +1,1122 @@
|
|
|
1
|
+
let e,o;import{jsx as t,jsxs as r}from"react/jsx-runtime";import i from"@emotion/styled";import{useEffect as n,useState as l,useCallback as a,useRef as d}from"react";import{createPortal as s}from"react-dom";import{MdClose as c,MdSettings as h,MdInfoOutline as p}from"react-icons/md";import{useTheme as g,withTheme as m}from"@emotion/react";import"nanoid";import{FaPlus as f}from"react-icons/fa6";import"@web-noise/fetch";import{getConnectedEdges as u,addEdge as v,applyNodeChanges as b,applyEdgeChanges as w,Handle as x}from"reactflow";import{create as y}from"zustand";import{setAudioNodeTypes as $,createPatch as k}from"@web-noise/patch";import{reverse as C,patch as z,create as P}from"jsondiffpatch";import{injectGlobal as N}from"@emotion/css";import"reactflow/dist/style.css";import{Item as j,Menu as _}from"react-contexify";import"react-contexify/dist/ReactContexify.css";import"js-file-download";import"hotkeys-js";import"react-file-drop";import{FaFileUpload as E,FaVolumeOff as S,FaRegArrowAltCircleRight as F}from"react-icons/fa";import"re-resizable";import"react-grid-layout";import"react-grid-layout/css/styles.css";import"react-icons/ai";import"react-icons/rx";import"react-modern-drawer";import"react-modern-drawer/dist/index.css";import"marked";import{useThrottledCallback as I}from"use-debounce";import A from"rc-slider";import"rc-slider/assets/index.css";import{CanvasSpliner as R}from"CanvasSpliner";function T(e,o,t,r){Object.defineProperty(e,o,{get:t,set:r,enumerable:!0,configurable:!0})}var M,L,D={};T(D,"Modal",()=>B),T(D,"Checker",()=>em),T(D,"RadioGroup",()=>eu),T(D,"Input",()=>ew),T(D,"DropdownInput",()=>eP),T(D,"ColorInput",()=>e_),T(D,"NumberInput",()=>eF),T(D,"Button",()=>eI),T(D,"Select",()=>eR),T(D,"Slider",()=>eT),T(D,"SplineEditor",()=>eD),T(D,"ConfigRowLabel",()=>eH),T(D,"ConfigRowControl",()=>eG),T(D,"ConfigRowSeparator",()=>eO),T(D,"ConfigRow",()=>eW),T(D,"ConfigPanel",()=>eB),T(D,"ConfigRowInner",()=>eV);var H=()=>g();let G=i.div`
|
|
2
|
+
position: fixed;
|
|
3
|
+
z-index: ${({theme:e})=>e.zIndex.modal};
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
top: 0;
|
|
7
|
+
left: 0;
|
|
8
|
+
background: ${({theme:e})=>e.colors.elevation3}cc;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
`,O=i.div`
|
|
13
|
+
background: ${({theme:e})=>e.colors.elevation2};
|
|
14
|
+
box-shadow: 1px 1px 1px 1px ${({theme:e})=>e.colors.elevation1};
|
|
15
|
+
color: white;
|
|
16
|
+
width: 70%;
|
|
17
|
+
height: 80%;
|
|
18
|
+
overflow-y: scroll;
|
|
19
|
+
position: relative;
|
|
20
|
+
`,W=i(c)`
|
|
21
|
+
position: absolute;
|
|
22
|
+
top: 0.2rem;
|
|
23
|
+
right: 0.2rem;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
`,B=({children:e,onClose:o,...i})=>{let l=H();return n(()=>{let e=e=>{"Escape"===e.key&&o?.()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[o]),s(t(G,{theme:l,onClick:o,children:r(O,{...i,onClick:e=>{e.stopPropagation()},theme:l,children:[e,t(W,{theme:l,onClick:o})]})}),document.body)},V="web-noise-drag-handle",J=`.${V}`;(M=L||(L={})).Gate="gate",M.Number="number",M.Audio="audio",M.Any="any";let K=e=>JSON.parse(JSON.stringify(e)),U=(e,o)=>{let t=new Set(e.map(e=>e.id)),r=new Set(o.map(e=>e.id));return{added:o.filter(e=>!t.has(e.id)),removed:e.filter(e=>!r.has(e.id))}};y((e=(...e)=>{let[o,t]=e;return{...((e,o)=>({nodes:[],edges:[],onNodesChange:o=>{e(({nodes:e})=>({nodes:b(o,e).map(e=>({dragHandle:J,...e}))}))},onEdgesChange:o=>{e(({edges:e})=>({edges:w(o,e)}))},onConnect:o=>{e(({edges:e})=>({edges:v(o,e)}))},addNode:o=>{e(({nodes:e})=>({nodes:e.concat(o)}))},setNodes:o=>{e({nodes:o})},setEdges:o=>{e({edges:o})},setNodesAndEdges:({nodes:o,edges:t})=>{e({nodes:o,edges:t})},getNodesAndEdges:()=>{let{nodes:e,edges:t}=o();return{nodes:e,edges:t}},clearElements:()=>{e({nodes:[],edges:[]})},getNode:e=>{let{nodes:t}=o();return t.find(o=>o.id===e)||null},updateNodeData:(o,t)=>{e(({nodes:e})=>({nodes:e.map(e=>e.id===o?{...e,data:{...e.data,...t}}:e)}))},nodeTypes:{},setNodeTypes:o=>e({nodeTypes:o})}))(...e),...((e,o)=>({history:{maxHistoryLength:5,buffer:[],pointer:0,skipCollect:!1,push:t=>{let{history:r}=o(),{maxHistoryLength:i,skipCollect:n}=r;if(n)return void e({history:{...r,skipCollect:!1}});e(({history:e})=>{if(!e)return{};let{buffer:o,pointer:r}=e,n=o.slice(Math.max(r-i+1,0),r);return{history:{...e,buffer:[...n,t],pointer:Math.min(r+1,i)}}})},back:()=>{let{nodes:t,edges:r,controlPanel:i,history:n}=o(),{buffer:l,pointer:a}=n,d=l[a-1];if(!d)return;let s=C(d);s&&e({...z(K({nodes:t,edges:r,controlPanel:i}),s),history:{...n,pointer:a-1,skipCollect:!0}})},forward:()=>{let{nodes:t,edges:r,controlPanel:i,history:n}=o(),{buffer:l,pointer:a}=n,d=l[a];d&&e({...z(K({nodes:t,edges:r,controlPanel:i}),d),history:{...n,pointer:a+1,skipCollect:!0}})},clear:()=>{let{history:t}=o();e({history:{...t,buffer:[],pointer:0,skipCollect:!0}})}}}))(...e),...((e,o)=>({patch:k(),nodesState:{}}))(...e),...((e,o)=>({project:{files:[]},setProject(o){e({project:o,currentFileIndex:0})},getProject:()=>o().project,pullEditorChanges(){let{getEditorState:e,currentFileIndex:t,updateFileContent:r,project:i}=o(),n=i.files[t];"audio"!==n.type&&r(t,{...n,file:e()})},syncEditorWithCurrentFile:()=>{let{currentFileIndex:e,setEditorState:t,project:r}=o(),i=r.files[e];if("audio"===i.type)return void console.log("audio file. skipping");t(i.file)},currentFileIndex:0,setCurrentFileIndex(t){let{currentFileIndex:r}=o();t!==r&&e({currentFileIndex:t})},updateFileContent(t,r){let{project:i}=o();e({project:{...i,files:i.files.map((e,o)=>o===t?{...e,...r}:e)}})},updateFileName(t,r){let{project:i}=o();e({project:{...i,files:i.files.map((e,o)=>o===t?{...e,name:r}:e)}})},addFile(t){let{project:r}=o(),i=[...r.files,t];e({project:{...r,files:i}})},deleteFile:t=>{let{project:r,currentFileIndex:i}=o();e({project:{...r,files:r.files.filter((e,o)=>t!==o)}}),t<=i&&e({currentFileIndex:i-1})}}))(...e),setGraph:async({nodes:e,edges:o})=>{let{patch:r,createNodes:i,createEdges:n,setNodesAndEdges:l,nodes:a,edges:d}=t();l({nodes:[],edges:[]}),await i(e),n(o)},clearGraph:()=>{let{setGraph:e}=t();e({nodes:[],edges:[]})},createNodes:async e=>{let{createNode:o}=t();await Promise.all(e.map(e=>o(e)))},createNode:e=>{let{addNode:o,nodesConfiguration:r}=t(),{type:i,id:n,data:l}=e;if(void 0===i)throw Error(`node type is not defined for node: ${n}`);o({...e,data:{...l,config:{...r[i]?.defaultConfig,...l?.config}}})},removeNode:e=>t().removeNodes([e]),removeNodes:e=>{let{edges:r,nodes:i,onNodesDelete:n,removeEdges:l,removeNodesFromControlPanel:a}=t(),d=e.map(({id:e})=>e),s=[...e,...i.filter(({parentNode:e})=>e&&d.includes(e))];a(s),l(u(s,r)),n(s);let c=s.map(({id:e})=>e);o({nodes:i.filter(({id:e})=>!c.includes(e))})},removeEdges:e=>{let{edges:r,onEdgesDelete:i}=t(),n=e.map(({id:e})=>e);i(e),o({edges:r.filter(({id:e})=>!n.includes(e))})},createEdges:e=>{let{patch:o,edges:r,setEdges:i}=t();i(e)},onConnect:async e=>{let{edges:o,createEdges:r}=t();r(v(e,o))},onEdgesDelete:e=>{let{patch:o}=t()},onNodesDelete:async e=>{let{removeNodesFromControlPanel:o,patch:r}=t();o(e)},plugins:[],setPlugins:async e=>{let{setNodeTypes:r}=t();o({plugins:e});let i=e.reduce((e,o)=>({...e,...o.components.reduce((e,o)=>({...e,[o.type]:o}),{})}),{}),n=Object.keys(i).reduce((e,o)=>({...e,[o]:i[o].node}),{});$(Object.keys(i).reduce((e,o)=>({...e,[o]:i[o].audioNode}),{})),r(n),o(({nodesConfiguration:e})=>({nodesConfiguration:{...e,...i}}))},nodesConfiguration:{},config:{showMinimap:!1},setConfig:e=>{o(({config:o})=>({config:{...o,...e}}))},getEditorState:()=>{let{getNodesAndEdges:e,controlPanel:o,viewport:r}=t();return{...e(),controlPanel:o,viewport:r}},setEditorState:async({nodes:e,edges:r,controlPanel:i,viewport:n})=>{let{setGraph:l}=t();await l({nodes:e,edges:r}),await new Promise(e=>setTimeout(e,1e3)),o({controlPanel:i,viewport:n})},isHelpShown:!1,toggleHelp:()=>{let{isHelpShown:e}=t();o({isHelpShown:!e})},copyBuffer:{nodes:[],edges:[]},copy:e=>{o({copyBuffer:e})},copySelectedItems:()=>{let{nodes:e,edges:o,copy:r}=t(),i=e.filter(({selected:e})=>e),n=o.filter(({selected:e})=>e);i.length&&r({nodes:i,edges:n})},pasteBuffer:(e=0,r=0)=>{let{copyBuffer:i,createNodes:n,setEdges:l,nodes:a,edges:d}=t(),{nodes:s,edges:c}=i;if(!s.length)return;o({nodes:a.map(e=>({...e,selected:!1}))});let h=s.reduce((e,o)=>!e||o.position.x<e.position.x&&o.position.y<e.position.y?o:e),p=h.position.x-e,g=h.position.y-r,{nodes:m,mapping:f}=s.reduce((e,o)=>{let t=(e=>{let o=+new Date+Math.floor(1e3*Math.random());return e?.type?`${e.type}-${o}`:o.toString()})(o);return{nodes:[...e.nodes,{...o,id:t,position:{x:o.position.x-p,y:o.position.y-g},selected:!0}],mapping:{...e.mapping,[o.id]:t}}},{nodes:[],mapping:{}});n(m);let u=c.map(e=>{let o=f[e.source]||e.source,t=f[e.target]||e.target;return{...e,id:e.id.replace(e.source,o).replace(e.target,t),source:o,target:t,selected:!0}});l([...d.map(e=>({...e,selected:!1})),...u])},getControlPanelNode:e=>{let{nodesConfiguration:o}=t(),{type:r}=e;if(!r)return null;let i=o[r]?.controlPanelNode;return i||(console.error(`could not find node for type ${r}`),null)},controlPanel:{show:!0,nodes:[],size:{width:200,height:100}},showControlPanel:()=>o(({controlPanel:e})=>({controlPanel:{...e,show:!0}})),hideControlPanel:()=>o(({controlPanel:e})=>({controlPanel:{...e,show:!1}})),addNodeToControlPanel:e=>{let{nodesConfiguration:r}=t(),i=e.type?r[e.type]?.defaultConfig:{},{height:n}=i?.size||{},l={id:e.id,...n?{height:n/10}:{}};o(({controlPanel:e})=>({controlPanel:{...e,nodes:[...e.nodes,l]}}))},removeNodeFromControlPanel:e=>t().removeNodesFromControlPanel([e]),removeNodesFromControlPanel:e=>{let t=e.map(({id:e})=>e);o(({controlPanel:e})=>{let o=e.nodes.filter(({id:e})=>!t.includes(e));return{controlPanel:{...e,nodes:o}}})},setControlPanelNodes:e=>{o(({controlPanel:o})=>({controlPanel:{...o,nodes:e}}))},setControlPanelSize:e=>{o(({controlPanel:o})=>({controlPanel:{...o,size:e}}))},viewport:{x:0,y:0,zoom:1},setViewport:e=>o({viewport:e})}},o=(o,t,r)=>{let i=((e,o)=>{let t,r=P({propertyFilter:(e,o)=>!!(o.parent?.parent?.childName==="controlPanel"||["data","position","controlPanel"].includes(o.parent?.childName))||["controlPanel","size","edges","nodes","data","label","config","values","position","x","y"].includes(e)}),i=o();return(e,n)=>{e.currentFileIndex!==n.currentFileIndex&&o().history.clear(),clearTimeout(t),i||(i=n),t=setTimeout(()=>{let t=r.diff(i,e);i=null,t&&o().history.push(t)},500)}})(0,t);return r.subscribe(i),e((...e)=>o(...e),t,r)},(e,t,r)=>{r.subscribe(async(e,o)=>{});let i=new Set,n={...t(),nodes:[],edges:[]};return o(async(...o)=>{let r=t(),[l]=o,a={...n,..."function"==typeof l?l({...n}):l},d=U(n.nodes,a.nodes),s=U(n.edges,a.edges);n=a;let c=d.added,h=s.added,p=s.removed,g=d.removed,{patch:m}=r;if(c.length){let e=m.registerAudioNodes(c);i.add(e),await e,i.delete(e)}if(!(h.length||p.length||g.length))return void e(...o);if(i.size)try{await Promise.all([...i.values()])}catch(e){console.log("some error",e)}h.length&&m.registerAudioConnections(h),p.length&&m.unregisterAudioConnections(p),g.length&&m.unregisterAudioNodes(g),e(...o)},t,r)}));var Y="#292d39",X="#181c20",q="#373c4b",Q="#007bff",Z="#14df42";N`
|
|
26
|
+
.react-flow {
|
|
27
|
+
.react-flow__pane {
|
|
28
|
+
/* background: rgb(106 106 106); */
|
|
29
|
+
/* background: "white"; */
|
|
30
|
+
// background: #292d39;
|
|
31
|
+
background: ${q};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.react-flow__background {
|
|
35
|
+
/* background: #efefef; */
|
|
36
|
+
stroke: white;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.react-flow__node-default {
|
|
40
|
+
background: #292d39;
|
|
41
|
+
color: white;
|
|
42
|
+
border: none;
|
|
43
|
+
/* background: transparent; */
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.react-flow__node {
|
|
47
|
+
padding: 0;
|
|
48
|
+
width: auto;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.react-flow__edge-path {
|
|
52
|
+
stroke: ${Q};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.react-flow__node.selected {
|
|
56
|
+
border: 1px solid ${Q};
|
|
57
|
+
box-shadow: 0 0 0 0.5px #${Q};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.react-flow__node-default.selected, .react-flow__node-default.selected:hover {
|
|
61
|
+
box-shadow: 0 0 0 0.5px #${Q};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* .react-flow__minimap-mask {
|
|
65
|
+
fill: ${Y}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.react-flow__minimap-node {
|
|
69
|
+
fill:${Q}
|
|
70
|
+
} */
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
`,i(j)``,i(_)`
|
|
74
|
+
background: ${({colors:e})=>e.elevation2};
|
|
75
|
+
padding: 0;
|
|
76
|
+
border-radius: 0;
|
|
77
|
+
|
|
78
|
+
.react-contexify__item__content {
|
|
79
|
+
color: ${({colors:e})=>e.whitePrimary};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.react-contexify__separator {
|
|
83
|
+
background-color: ${({colors:e})=>e.elevation1};
|
|
84
|
+
margin: 0;
|
|
85
|
+
}
|
|
86
|
+
`,m(i.div`
|
|
87
|
+
width: 100%;
|
|
88
|
+
`),m(i.div`
|
|
89
|
+
padding: 1rem;
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-direction: column;
|
|
92
|
+
gap: 1rem;
|
|
93
|
+
`),m(i.ul`
|
|
94
|
+
list-style: none;
|
|
95
|
+
margin: 0;
|
|
96
|
+
padding: 0;
|
|
97
|
+
padding-bottom: 10px;
|
|
98
|
+
columns: 2;
|
|
99
|
+
|
|
100
|
+
li {
|
|
101
|
+
display: flex;
|
|
102
|
+
flex-direction: column;
|
|
103
|
+
gap: 8px;
|
|
104
|
+
padding: 4px;
|
|
105
|
+
overflow: hidden;
|
|
106
|
+
border: 1px solid ${({theme:e})=>e.colors.elevation3};
|
|
107
|
+
border-radius: 4px;
|
|
108
|
+
margin-bottom: 0.5rem;
|
|
109
|
+
&:hover {
|
|
110
|
+
border-color: ${({theme:e})=>e.colors.accent2};
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
`),m(i.div`
|
|
115
|
+
white-space: nowrap;
|
|
116
|
+
overflow: hidden;
|
|
117
|
+
text-overflow: ellipsis;
|
|
118
|
+
`),m(i.div`
|
|
119
|
+
color: ${({theme:e})=>e.colors.highlight2};
|
|
120
|
+
font-size: 12px;
|
|
121
|
+
`),m(i.div`
|
|
122
|
+
display: flex;
|
|
123
|
+
gap: 0.2rem;
|
|
124
|
+
flex-wrap: wrap;
|
|
125
|
+
`);let ee=m(i.span`
|
|
126
|
+
cursor: pointer;
|
|
127
|
+
font-size: 10px;
|
|
128
|
+
background: ${({theme:e,isActive:o})=>o?e.colors.highlight1:e.colors.elevation3};
|
|
129
|
+
border-radius: 2px;
|
|
130
|
+
padding: 0.1rem 0.2rem;
|
|
131
|
+
border: 1px solid;
|
|
132
|
+
border-color: ${({theme:e})=>e.colors.elevation2};
|
|
133
|
+
&:hover {
|
|
134
|
+
border-color: ${({theme:e})=>e.colors.accent2};
|
|
135
|
+
}
|
|
136
|
+
`);m(i.div``),m(i.div`
|
|
137
|
+
font-size: 1.1rem;
|
|
138
|
+
padding: 0.25rem 0;
|
|
139
|
+
color: ${({theme:e})=>e.colors.highlight3};
|
|
140
|
+
`),m(i.div`
|
|
141
|
+
color: ${({theme:e})=>e.colors.highlight2};
|
|
142
|
+
font-size: 12px;
|
|
143
|
+
`),i.div`
|
|
144
|
+
display: flex;
|
|
145
|
+
position: relative;
|
|
146
|
+
`,i.input`
|
|
147
|
+
padding-right: 2rem;
|
|
148
|
+
padding-left: 0.3rem;
|
|
149
|
+
width: 100%;
|
|
150
|
+
appearance: textfield;
|
|
151
|
+
font-size: inherit;
|
|
152
|
+
background: none;
|
|
153
|
+
border: none;
|
|
154
|
+
color: var(--leva-colors-highlight1);
|
|
155
|
+
font-family: var(--leva-fonts-mono);
|
|
156
|
+
cursor: inherit;
|
|
157
|
+
text-overflow: ellipsis;
|
|
158
|
+
outline: none;
|
|
159
|
+
appearance: textfield;
|
|
160
|
+
cursor: auto;
|
|
161
|
+
background-color: ${({theme:e})=>e.colors.elevation3};
|
|
162
|
+
border-radius: 0.1rem;
|
|
163
|
+
height: 2rem;
|
|
164
|
+
color: ${({theme:e})=>e.colors.highlight2};
|
|
165
|
+
|
|
166
|
+
&:focus,
|
|
167
|
+
&:hover {
|
|
168
|
+
box-shadow: 0 0 0 var(--leva-borderWidths-focus)
|
|
169
|
+
${({theme:e})=>e.colors.accent2};
|
|
170
|
+
color: ${({theme:e})=>e.colors.whitePrimary};
|
|
171
|
+
}
|
|
172
|
+
&::-webkit-inner-spin-button,
|
|
173
|
+
&::-webkit-outer-spin-button {
|
|
174
|
+
-webkit-appearance: none;
|
|
175
|
+
margin-right: 1rem;
|
|
176
|
+
}
|
|
177
|
+
`,i.div`
|
|
178
|
+
display: flex;
|
|
179
|
+
flex-direction: column;
|
|
180
|
+
padding: 0.6rem;
|
|
181
|
+
gap: 0.6rem;
|
|
182
|
+
border-right: 1px solid ${({theme:e})=>e.colors.elevation3};
|
|
183
|
+
min-width: 14rem;
|
|
184
|
+
`,i.label`
|
|
185
|
+
user-select: none;
|
|
186
|
+
input {
|
|
187
|
+
display: none;
|
|
188
|
+
}
|
|
189
|
+
input:checked + span {
|
|
190
|
+
color: ${({theme:e})=>e.colors.accent2};
|
|
191
|
+
}
|
|
192
|
+
&:hover {
|
|
193
|
+
color: ${({theme:e})=>e.colors.accent3};
|
|
194
|
+
cursor: pointer;
|
|
195
|
+
}
|
|
196
|
+
`,m(i(ee)`
|
|
197
|
+
font-size: 12px;
|
|
198
|
+
padding: 0.2rem 0.4rem;
|
|
199
|
+
&:hover {
|
|
200
|
+
}
|
|
201
|
+
&::after {
|
|
202
|
+
content: "×";
|
|
203
|
+
margin-left: 0.4rem;
|
|
204
|
+
}
|
|
205
|
+
`),i.div`
|
|
206
|
+
height: 100%;
|
|
207
|
+
width: 100%;
|
|
208
|
+
display: flex;
|
|
209
|
+
gap: 1rem;
|
|
210
|
+
`,i.div`
|
|
211
|
+
flex-grow: 1;
|
|
212
|
+
height: 100%;
|
|
213
|
+
overflow-y: scroll;
|
|
214
|
+
`,i.div`
|
|
215
|
+
display: flex;
|
|
216
|
+
align-items: center;
|
|
217
|
+
justify-content: center;
|
|
218
|
+
height: 100%;
|
|
219
|
+
width: 100%;
|
|
220
|
+
|
|
221
|
+
.drop-zone-wrapper {
|
|
222
|
+
width: 80%;
|
|
223
|
+
height: 80%;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.drop-zone {
|
|
227
|
+
height: 100%;
|
|
228
|
+
width: 100%;
|
|
229
|
+
border-style: dashed;
|
|
230
|
+
border-width: 2px;
|
|
231
|
+
border-color: ${({theme:e})=>e.colors.highlight2};
|
|
232
|
+
opacity: 0.5;
|
|
233
|
+
cursor: pointer;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.drop-zone:hover,
|
|
237
|
+
.drop-zone-drag-over {
|
|
238
|
+
opacity: 1;
|
|
239
|
+
}
|
|
240
|
+
`,i.div`
|
|
241
|
+
display: flex;
|
|
242
|
+
flex-wrap: wrap;
|
|
243
|
+
align-items: center;
|
|
244
|
+
justify-content: center;
|
|
245
|
+
height: 100%;
|
|
246
|
+
width: 100%;
|
|
247
|
+
`,i(E)`
|
|
248
|
+
width: 100%;
|
|
249
|
+
height: 8rem;
|
|
250
|
+
`,i.div`
|
|
251
|
+
font-size: 2rem;
|
|
252
|
+
`,i.div`
|
|
253
|
+
display: flex;
|
|
254
|
+
align-items: center;
|
|
255
|
+
justify-content: center;
|
|
256
|
+
height: 100%;
|
|
257
|
+
width: 100%;
|
|
258
|
+
|
|
259
|
+
.drop-zone-wrapper {
|
|
260
|
+
width: 80%;
|
|
261
|
+
height: 80%;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.drop-zone {
|
|
265
|
+
height: 100%;
|
|
266
|
+
width: 100%;
|
|
267
|
+
border-style: dashed;
|
|
268
|
+
border-width: 2px;
|
|
269
|
+
border-color: ${({theme:e})=>e.colors.highlight2};
|
|
270
|
+
opacity: 0.5;
|
|
271
|
+
cursor: pointer;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.drop-zone:hover,
|
|
275
|
+
.drop-zone-drag-over {
|
|
276
|
+
opacity: 1;
|
|
277
|
+
}
|
|
278
|
+
`,i.div`
|
|
279
|
+
display: flex;
|
|
280
|
+
flex-wrap: wrap;
|
|
281
|
+
align-items: center;
|
|
282
|
+
justify-content: center;
|
|
283
|
+
height: 100%;
|
|
284
|
+
width: 100%;
|
|
285
|
+
`,i(E)`
|
|
286
|
+
width: 100%;
|
|
287
|
+
height: 8rem;
|
|
288
|
+
`,i.div`
|
|
289
|
+
font-size: 2rem;
|
|
290
|
+
`,i.div`
|
|
291
|
+
display: flex;
|
|
292
|
+
align-items: center;
|
|
293
|
+
justify-content: center;
|
|
294
|
+
height: 100%;
|
|
295
|
+
width: 100%;
|
|
296
|
+
|
|
297
|
+
.drop-zone-wrapper {
|
|
298
|
+
width: 80%;
|
|
299
|
+
height: 80%;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.drop-zone {
|
|
303
|
+
height: 100%;
|
|
304
|
+
width: 100%;
|
|
305
|
+
border-style: dashed;
|
|
306
|
+
border-width: 2px;
|
|
307
|
+
border-color: ${({theme:e})=>e.colors.highlight2};
|
|
308
|
+
opacity: 0.5;
|
|
309
|
+
cursor: pointer;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.drop-zone:hover,
|
|
313
|
+
.drop-zone-drag-over {
|
|
314
|
+
opacity: 1;
|
|
315
|
+
}
|
|
316
|
+
`,i.div`
|
|
317
|
+
display: flex;
|
|
318
|
+
flex-wrap: wrap;
|
|
319
|
+
align-items: center;
|
|
320
|
+
justify-content: center;
|
|
321
|
+
height: 100%;
|
|
322
|
+
width: 100%;
|
|
323
|
+
`,i(E)`
|
|
324
|
+
width: 100%;
|
|
325
|
+
height: 8rem;
|
|
326
|
+
`,i.div`
|
|
327
|
+
font-size: 2rem;
|
|
328
|
+
`,i.input`
|
|
329
|
+
width: 100%;
|
|
330
|
+
background: none;
|
|
331
|
+
border: none;
|
|
332
|
+
text-align: center;
|
|
333
|
+
color: var(--leva-colors-highlight1);
|
|
334
|
+
font-family: var(--leva-fonts-mono);
|
|
335
|
+
font-size: var(--leva-fontSizes-root);
|
|
336
|
+
cursor: inherit;
|
|
337
|
+
text-overflow: ellipsis;
|
|
338
|
+
outline: none;
|
|
339
|
+
|
|
340
|
+
&:focus {
|
|
341
|
+
box-shadow: 0 0 0 green var(--leva-colors-accent2);
|
|
342
|
+
}
|
|
343
|
+
&:focus-within {
|
|
344
|
+
box-shadow: 0 0 0 green var(--leva-colors-accent2);
|
|
345
|
+
}
|
|
346
|
+
&:focus-vissible {
|
|
347
|
+
box-shadow: 0 0 0 green var(--leva-colors-accent2);
|
|
348
|
+
}
|
|
349
|
+
&:not([readonly]):focus {
|
|
350
|
+
color: #fff;
|
|
351
|
+
appearance: none;
|
|
352
|
+
cursor: auto;
|
|
353
|
+
background-color: var(--leva-colors-elevation2);
|
|
354
|
+
padding: 0.3rem;
|
|
355
|
+
border-radius: 0.2rem;
|
|
356
|
+
}
|
|
357
|
+
`,m(i.div`
|
|
358
|
+
height: 100%;
|
|
359
|
+
width: 100%;
|
|
360
|
+
overflow: scroll;
|
|
361
|
+
padding: 0.6rem;
|
|
362
|
+
box-sizing: border-box;
|
|
363
|
+
|
|
364
|
+
hr {
|
|
365
|
+
border: none;
|
|
366
|
+
border-bottom: 1px solid ${({theme:e})=>e.colors.elevation3};
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
code {
|
|
370
|
+
background-color: ${({theme:e})=>e.colors.elevation3};
|
|
371
|
+
color: ${({theme:e})=>e.colors.highlight3};
|
|
372
|
+
font-family:
|
|
373
|
+
source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
pre {
|
|
377
|
+
background-color: ${({theme:e})=>e.colors.elevation3};
|
|
378
|
+
padding: 0.2rem 0.3rem;
|
|
379
|
+
border-radius: 1px;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
a {
|
|
383
|
+
color: ${({theme:e})=>e.colors.accent1};
|
|
384
|
+
}
|
|
385
|
+
`);let eo=i.div`
|
|
386
|
+
background-color: var(--leva-colors-elevation1);
|
|
387
|
+
`;i(eo)`
|
|
388
|
+
padding: 2rem 5rem;
|
|
389
|
+
`,i(eo)`
|
|
390
|
+
padding: 1rem 2rem;
|
|
391
|
+
`,i(h)`
|
|
392
|
+
font-size: 1.2rem;
|
|
393
|
+
opacity: 0.4;
|
|
394
|
+
width: 1rem;
|
|
395
|
+
&:hover {
|
|
396
|
+
opacity: 1;
|
|
397
|
+
cursor: pointer;
|
|
398
|
+
}
|
|
399
|
+
`,i(p)`
|
|
400
|
+
font-size: 1.2rem;
|
|
401
|
+
opacity: 0.4;
|
|
402
|
+
width: 1rem;
|
|
403
|
+
&:hover {
|
|
404
|
+
opacity: 1;
|
|
405
|
+
cursor: pointer;
|
|
406
|
+
}
|
|
407
|
+
`;let et=i.div`
|
|
408
|
+
position: relative;
|
|
409
|
+
font-family: var(--leva-fonts-mono);
|
|
410
|
+
font-size: var(--leva-fontSizes-root);
|
|
411
|
+
background-color: var(--leva-colors-elevation1);
|
|
412
|
+
`,er=i(et)`
|
|
413
|
+
display: flex;
|
|
414
|
+
height: var(--leva-sizes-titleBarHeight);
|
|
415
|
+
touch-action: none;
|
|
416
|
+
align-items: center;
|
|
417
|
+
justify-content: center;
|
|
418
|
+
flex: 1 1 0%;
|
|
419
|
+
color: var(--leva-colors-highlight1);
|
|
420
|
+
padding: 0 0.4rem;
|
|
421
|
+
gap: 0.3rem;
|
|
422
|
+
`;i(et)(({theme:e})=>`
|
|
423
|
+
display: grid;
|
|
424
|
+
grid-template-areas: "inputs outputs";
|
|
425
|
+
background: ${e.colors.elevation2};
|
|
426
|
+
border-bottom: 1px solid ${e.colors.elevation1};
|
|
427
|
+
color: ${e.colors.highlight3};
|
|
428
|
+
font-size: 0.6rem;
|
|
429
|
+
`),i.div`
|
|
430
|
+
grid-area: inputs;
|
|
431
|
+
text-align: left;
|
|
432
|
+
`,i.div`
|
|
433
|
+
grid-area: outputs;
|
|
434
|
+
text-align: right;
|
|
435
|
+
`,i.div`
|
|
436
|
+
position: relative;
|
|
437
|
+
padding: 5px 10px;
|
|
438
|
+
`;let ei={[L.Audio]:"#4ade80",[L.Gate]:"#c084fc",[L.Number]:"#38bdf8",[L.Any]:"#ffffff"},en=m(i(x,{shouldForwardProp:e=>"portType"!==e})`
|
|
439
|
+
--port-color: ${e=>{if(!e.portType)return e.theme.colors.highlight2;if(!Array.isArray(e.portType))return ei[e.portType];{let o=e.portType.map(e=>ei[e]);return`linear-gradient(0.25turn, ${o.join(", ")});`}}};
|
|
440
|
+
border-color: var(--port-color);
|
|
441
|
+
background: var(--port-color);
|
|
442
|
+
box-shadow: 0px 0px 0px 1px ${({theme:e})=>e.colors.elevation2} inset;
|
|
443
|
+
`);m(i(en)`
|
|
444
|
+
left: -3px;
|
|
445
|
+
`),m(i(en)`
|
|
446
|
+
right: -3px;
|
|
447
|
+
`);let el=i.div`
|
|
448
|
+
width: 100%;
|
|
449
|
+
padding: 0.4rem 0;
|
|
450
|
+
white-space: nowrap;
|
|
451
|
+
overflow: hidden;
|
|
452
|
+
text-overflow: ellipsis;
|
|
453
|
+
`,ea=i(({className:e,...o})=>t(er,{...o,className:[e,V].join(" ")}))`
|
|
454
|
+
display: flex;
|
|
455
|
+
gap: 0.1rem;
|
|
456
|
+
padding: 0 0.4rem;
|
|
457
|
+
justify-content: start;
|
|
458
|
+
font-size: 0.6rem;
|
|
459
|
+
height: auto;
|
|
460
|
+
min-width: 0;
|
|
461
|
+
`,ed=i.div`
|
|
462
|
+
display: flex;
|
|
463
|
+
align-items: center;
|
|
464
|
+
height: 70%;
|
|
465
|
+
width: auto;
|
|
466
|
+
gap: 0.4rem;
|
|
467
|
+
`,es=i.span`
|
|
468
|
+
width: auto;
|
|
469
|
+
height: 100%;
|
|
470
|
+
cursor: pointer;
|
|
471
|
+
svg {
|
|
472
|
+
width: auto;
|
|
473
|
+
height: 100%;
|
|
474
|
+
}
|
|
475
|
+
&:hover {
|
|
476
|
+
color: ${({theme:e})=>e.colors.highlight2};
|
|
477
|
+
cursor: pointer;
|
|
478
|
+
}
|
|
479
|
+
`;i.div`
|
|
480
|
+
height: 100%;
|
|
481
|
+
display: grid;
|
|
482
|
+
grid-template-rows: auto 1fr;
|
|
483
|
+
`,i.div`
|
|
484
|
+
position: fixed;
|
|
485
|
+
z-index: 5;
|
|
486
|
+
box-shadow: 0px 1px 2px ${({theme:e})=>e.colors.elevation2};
|
|
487
|
+
left: 1rem;
|
|
488
|
+
top: 4rem;
|
|
489
|
+
width: 2rem;
|
|
490
|
+
height: 2rem;
|
|
491
|
+
border-radius: 50%;
|
|
492
|
+
overflow: hidden;
|
|
493
|
+
display: flex;
|
|
494
|
+
align-items: center;
|
|
495
|
+
justify-content: center;
|
|
496
|
+
background: ${({theme:e})=>e.colors.elevation1};
|
|
497
|
+
color: ${({theme:e})=>e.colors.highlight1};
|
|
498
|
+
|
|
499
|
+
:hover {
|
|
500
|
+
color: ${({theme:e})=>e.colors.highlight2};
|
|
501
|
+
cursor: pointer;
|
|
502
|
+
}
|
|
503
|
+
`,i(ed)`
|
|
504
|
+
height: 80%;
|
|
505
|
+
`,i(es)`
|
|
506
|
+
font-size: 1rem;
|
|
507
|
+
display: flex;
|
|
508
|
+
align-items: center;
|
|
509
|
+
`,i(ea)`
|
|
510
|
+
grid-template-columns: 1fr auto;
|
|
511
|
+
border-bottom: 1px solid ${({theme:e})=>e.colors.elevation3};
|
|
512
|
+
font-size: 0.7rem;
|
|
513
|
+
`,i(el)`
|
|
514
|
+
text-align: center;
|
|
515
|
+
`,i.div`
|
|
516
|
+
height: 100%;
|
|
517
|
+
width: 100%;
|
|
518
|
+
padding: 0.3rem 0.4rem;
|
|
519
|
+
box-sizing: border-box;
|
|
520
|
+
`,i.div`
|
|
521
|
+
height: auto;
|
|
522
|
+
padding: 0;
|
|
523
|
+
max-height: 95vh;
|
|
524
|
+
overflow-y: scroll;
|
|
525
|
+
border: 1px solid ${({theme:e})=>e.colors.elevation3};
|
|
526
|
+
`,i.div`
|
|
527
|
+
padding: 1rem 0;
|
|
528
|
+
font-family: var(--leva-fonts-mono);
|
|
529
|
+
font-size: 0.8rem;
|
|
530
|
+
`,i.div`
|
|
531
|
+
display: flex;
|
|
532
|
+
align-items: center;
|
|
533
|
+
gap: 0.5rem;
|
|
534
|
+
cursor: pointer;
|
|
535
|
+
color: ${({theme:e})=>e.colors.highlight1};
|
|
536
|
+
&:hover {
|
|
537
|
+
color: ${({theme:e})=>e.colors.highlight2};
|
|
538
|
+
}
|
|
539
|
+
`,i.div`
|
|
540
|
+
position: absolute;
|
|
541
|
+
height: 1rem;
|
|
542
|
+
top: 0;
|
|
543
|
+
bottom: 0;
|
|
544
|
+
margin: auto;
|
|
545
|
+
left: 0.5rem;
|
|
546
|
+
border-right: 1px solid ${({theme:e})=>e.colors.whitePrimary};
|
|
547
|
+
`,i.div`
|
|
548
|
+
box-sizing: border-box;
|
|
549
|
+
overflow: hidden;
|
|
550
|
+
.react-resizable-handle:after {
|
|
551
|
+
border-color: ${({theme:e})=>e.colors.whitePrimary};
|
|
552
|
+
border-width: 1px;
|
|
553
|
+
}
|
|
554
|
+
`,m(i.div`
|
|
555
|
+
font-family: var(--leva-fonts-mono);
|
|
556
|
+
font-size: 0.7rem;
|
|
557
|
+
box-sizing: border-box;
|
|
558
|
+
height: 100%;
|
|
559
|
+
width: 100%;
|
|
560
|
+
overflow: scroll;
|
|
561
|
+
color: ${({theme:e})=>e.colors.whitePrimary};
|
|
562
|
+
padding: 0 0.5rem;
|
|
563
|
+
|
|
564
|
+
code {
|
|
565
|
+
color: ${({theme:e})=>e.colors.accent3};
|
|
566
|
+
filter: hue-rotate(180deg);
|
|
567
|
+
}
|
|
568
|
+
`),m(i.div`
|
|
569
|
+
padding: 1rem;
|
|
570
|
+
height: 100%;
|
|
571
|
+
width: 100%;
|
|
572
|
+
box-sizing: border-box;
|
|
573
|
+
overflow: hidden;
|
|
574
|
+
`),i.div`
|
|
575
|
+
position: fixed;
|
|
576
|
+
z-index: ${({theme:e})=>e.zIndex.resumeContextLayout};
|
|
577
|
+
width: 100%;
|
|
578
|
+
height: 100%;
|
|
579
|
+
top: 0;
|
|
580
|
+
left: 0;
|
|
581
|
+
background: rgb(24 28 32 / 90%);
|
|
582
|
+
display: flex;
|
|
583
|
+
flex-wrap: wrap;
|
|
584
|
+
align-items: center;
|
|
585
|
+
justify-content: center;
|
|
586
|
+
color: ${({theme:e})=>e.colors.whitePrimary};
|
|
587
|
+
cursor: pointer;
|
|
588
|
+
`,i.div`
|
|
589
|
+
display: flex;
|
|
590
|
+
width: 100%;
|
|
591
|
+
align-items: center;
|
|
592
|
+
justify-content: center;
|
|
593
|
+
`,i.div`
|
|
594
|
+
font-family: var(--leva-fonts-mono);
|
|
595
|
+
font-size: 2rem;
|
|
596
|
+
`,i(S)`
|
|
597
|
+
width: 7rem;
|
|
598
|
+
height: 7rem;
|
|
599
|
+
`,m(i.div`
|
|
600
|
+
display: flex;
|
|
601
|
+
flex-direction: column;
|
|
602
|
+
height: 100%;
|
|
603
|
+
width: 100%;
|
|
604
|
+
`),m(i.div`
|
|
605
|
+
position: fixed;
|
|
606
|
+
height: 100%;
|
|
607
|
+
width: 100%;
|
|
608
|
+
background: rgba(0, 0, 0, 0.7);
|
|
609
|
+
color: white;
|
|
610
|
+
display: flex;
|
|
611
|
+
justify-content: center;
|
|
612
|
+
align-items: center;
|
|
613
|
+
font-size: 2rem;
|
|
614
|
+
`),m(i.div`
|
|
615
|
+
height: 100%;
|
|
616
|
+
width: 100%;
|
|
617
|
+
display: flex;
|
|
618
|
+
position: relative;
|
|
619
|
+
`),m(i.div`
|
|
620
|
+
display: flex;
|
|
621
|
+
flex: 1;
|
|
622
|
+
align-items: center;
|
|
623
|
+
justify-content: center;
|
|
624
|
+
background: ${({theme:e})=>e.colors.elevation3};
|
|
625
|
+
`),m(i.div`
|
|
626
|
+
background: ${({theme:e})=>e.colors.elevation2};
|
|
627
|
+
opacity: 0.7;
|
|
628
|
+
position: absolute;
|
|
629
|
+
width: 100%;
|
|
630
|
+
height: 100%;
|
|
631
|
+
left: 0;
|
|
632
|
+
top: 0;
|
|
633
|
+
z-index: 1;
|
|
634
|
+
font-family: var(--leva-fonts-mono);
|
|
635
|
+
color: ${({theme:e})=>e.colors.whitePrimary};
|
|
636
|
+
display: ${({show:e})=>e?"flex":"none"};
|
|
637
|
+
align-items: center;
|
|
638
|
+
justify-content: center;
|
|
639
|
+
font-size: 6rem;
|
|
640
|
+
`),m(i.div`
|
|
641
|
+
height: 2rem;
|
|
642
|
+
display: flex;
|
|
643
|
+
align-items: center;
|
|
644
|
+
background: ${({theme:e})=>e.colors.elevation2};
|
|
645
|
+
`),m(i.div`
|
|
646
|
+
display: flex;
|
|
647
|
+
align-items: center;
|
|
648
|
+
cursor: pointer;
|
|
649
|
+
height: 100%;
|
|
650
|
+
box-sizing: border-box;
|
|
651
|
+
padding: 0.3rem 0.4rem;
|
|
652
|
+
|
|
653
|
+
border-right: 1px solid ${({theme:e})=>e.colors.elevation1};
|
|
654
|
+
|
|
655
|
+
input {
|
|
656
|
+
color: ${({theme:e,active:o})=>o?e.colors.whitePrimary:e.colors.highlight1};
|
|
657
|
+
|
|
658
|
+
&:not([readonly]):focus {
|
|
659
|
+
background-color: ${({theme:e})=>e.colors.elevation1};
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
`),m(i.div`
|
|
663
|
+
display: flex;
|
|
664
|
+
align-items: center;
|
|
665
|
+
height: 100%;
|
|
666
|
+
padding: 0 0.5rem;
|
|
667
|
+
cursor: pointer;
|
|
668
|
+
|
|
669
|
+
color: ${({theme:e})=>e.colors.highlight1};
|
|
670
|
+
&:hover {
|
|
671
|
+
color: ${({theme:e})=>e.colors.whitePrimary};
|
|
672
|
+
}
|
|
673
|
+
`),m(i(f)`
|
|
674
|
+
height: 40%;
|
|
675
|
+
width: auto;
|
|
676
|
+
`),m(i(c)`
|
|
677
|
+
height: 70%;
|
|
678
|
+
width: auto;
|
|
679
|
+
cursor: pointer;
|
|
680
|
+
color: ${({theme:e})=>e.colors.highlight1};
|
|
681
|
+
&:hover {
|
|
682
|
+
color: ${({theme:e})=>e.colors.whitePrimary};
|
|
683
|
+
}
|
|
684
|
+
`);let ec=i.div`
|
|
685
|
+
display: flex;
|
|
686
|
+
align-items: center;
|
|
687
|
+
justify-content: center;
|
|
688
|
+
width: 0.6rem;
|
|
689
|
+
height: 0.6rem;
|
|
690
|
+
background: ${({theme:e})=>e.colors.whitePrimary};
|
|
691
|
+
border: 1px solid ${({theme:e})=>e.colors.highlight1};
|
|
692
|
+
&::after {
|
|
693
|
+
content: "";
|
|
694
|
+
background: ${({theme:e})=>e.colors.accent1};
|
|
695
|
+
}
|
|
696
|
+
`,eh=i.div``,ep=i.div`
|
|
697
|
+
font-size: 0.4rem;
|
|
698
|
+
color: ${({theme:e})=>e.colors.highlight1};
|
|
699
|
+
`,eg=i.label`
|
|
700
|
+
display: flex;
|
|
701
|
+
cursor: pointer;
|
|
702
|
+
gap: 0.4rem;
|
|
703
|
+
line-height: 0.7rem;
|
|
704
|
+
input {
|
|
705
|
+
display: none;
|
|
706
|
+
}
|
|
707
|
+
input[type="radio"] ~ .checker-box {
|
|
708
|
+
border-radius: 50%;
|
|
709
|
+
&::after {
|
|
710
|
+
border-radius: 50%;
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
input:checked ~ .checker-box:after {
|
|
714
|
+
width: 70%;
|
|
715
|
+
height: 70%;
|
|
716
|
+
}
|
|
717
|
+
`,em=({label:e,subtitle:o,name:i,type:n="checkbox",onChange:l,checked:a=!1})=>{let d=H();return r(eg,{children:[t("input",{type:n,name:i,checked:a,onChange:({target:e})=>l?.(e.checked)}),t(ec,{className:"checker-box",theme:d}),r("div",{children:[t(eh,{children:e}),o?t(ep,{theme:d,children:o}):null]})]})},ef=i.div`
|
|
718
|
+
display: flex;
|
|
719
|
+
flex-direction: column;
|
|
720
|
+
gap: 0.5rem;
|
|
721
|
+
font-family: var(--leva-fonts-mono);
|
|
722
|
+
font-size: 0.7rem;
|
|
723
|
+
color: ${({theme:e})=>e.colors.highlight2};
|
|
724
|
+
padding: 0.5rem;
|
|
725
|
+
`,eu=({options:e,value:o,onChange:r})=>t(ef,{theme:H(),children:e.map(({value:e,label:i,subtitle:n},l)=>t(em,{value:o,type:"radio",label:i,subtitle:n,onChange:()=>r(e),checked:e===o},l))}),ev=i.div`
|
|
726
|
+
display: flex;
|
|
727
|
+
position: relative;
|
|
728
|
+
`,eb=m(i.input`
|
|
729
|
+
padding-right: 2rem;
|
|
730
|
+
padding-left: 0.3rem;
|
|
731
|
+
padding-top: 0;
|
|
732
|
+
padding-bottom: 0;
|
|
733
|
+
width: 100%;
|
|
734
|
+
appearance: textfield;
|
|
735
|
+
font-size: inherit;
|
|
736
|
+
background: none;
|
|
737
|
+
border: none;
|
|
738
|
+
color: var(--leva-colors-highlight1);
|
|
739
|
+
font-family: var(--leva-fonts-mono);
|
|
740
|
+
cursor: inherit;
|
|
741
|
+
text-overflow: ellipsis;
|
|
742
|
+
outline: none;
|
|
743
|
+
appearance: textfield;
|
|
744
|
+
cursor: auto;
|
|
745
|
+
background-color: var(--leva-colors-elevation3);
|
|
746
|
+
border-radius: 0.2rem;
|
|
747
|
+
height: 1.5rem;
|
|
748
|
+
color: var(--leva-colors-highlight2);
|
|
749
|
+
|
|
750
|
+
&:focus,
|
|
751
|
+
&:hover {
|
|
752
|
+
box-shadow: 0 0 0 var(--leva-borderWidths-focus) var(--leva-colors-accent2);
|
|
753
|
+
color: ${({theme:e})=>e.colors.whitePrimary};
|
|
754
|
+
}
|
|
755
|
+
&::-webkit-inner-spin-button,
|
|
756
|
+
&::-webkit-outer-spin-button {
|
|
757
|
+
-webkit-appearance: none;
|
|
758
|
+
margin-right: 1rem;
|
|
759
|
+
}
|
|
760
|
+
`),ew=({type:e,value:o,placeholder:r,onChange:i=()=>{},inputProps:n,...l})=>t(ev,{...l,children:t(eb,{type:e,value:o,placeholder:r,onKeyDownCapture:e=>{e.stopPropagation()},onChange:e=>{i(e.target.value)},...n})}),ex=m(i.button`
|
|
761
|
+
position: absolute;
|
|
762
|
+
right: 0;
|
|
763
|
+
height: 100%;
|
|
764
|
+
outline: none;
|
|
765
|
+
background: none;
|
|
766
|
+
border: none;
|
|
767
|
+
color: ${({theme:e})=>e.colors.highlight1};
|
|
768
|
+
cursor: pointer;
|
|
769
|
+
display: flex;
|
|
770
|
+
align-items: center;
|
|
771
|
+
z-index: 2;
|
|
772
|
+
&:hover {
|
|
773
|
+
color: ${({theme:e})=>e.colors.highlight2};
|
|
774
|
+
}
|
|
775
|
+
&:active {
|
|
776
|
+
color: ${({theme:e})=>e.colors.highlight3};
|
|
777
|
+
}
|
|
778
|
+
`),ey=i.div`
|
|
779
|
+
position: relative;
|
|
780
|
+
width: 100%;
|
|
781
|
+
`,e$=m(i.div`
|
|
782
|
+
position: absolute;
|
|
783
|
+
top: calc(100% + 2px);
|
|
784
|
+
left: 0;
|
|
785
|
+
right: 0;
|
|
786
|
+
max-height: 200px;
|
|
787
|
+
overflow-y: auto;
|
|
788
|
+
background-color: ${({theme:e})=>e.colors.elevation2};
|
|
789
|
+
border: 1px solid ${({theme:e})=>e.colors.elevation3};
|
|
790
|
+
border-radius: 0.2rem;
|
|
791
|
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
|
|
792
|
+
z-index: 1000;
|
|
793
|
+
display: ${({isOpen:e})=>e?"block":"none"};
|
|
794
|
+
|
|
795
|
+
&::-webkit-scrollbar {
|
|
796
|
+
width: 8px;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
&::-webkit-scrollbar-track {
|
|
800
|
+
background: ${({theme:e})=>e.colors.elevation1};
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
&::-webkit-scrollbar-thumb {
|
|
804
|
+
background: ${({theme:e})=>e.colors.elevation3};
|
|
805
|
+
border-radius: 4px;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
&::-webkit-scrollbar-thumb:hover {
|
|
809
|
+
background: ${({theme:e})=>e.colors.highlight1};
|
|
810
|
+
}
|
|
811
|
+
`),ek=m(i.div`
|
|
812
|
+
padding: 0.4rem 0.5rem;
|
|
813
|
+
cursor: pointer;
|
|
814
|
+
color: ${({theme:e})=>e.colors.highlight1};
|
|
815
|
+
background-color: ${({theme:e,isHighlighted:o})=>o?e.colors.elevation3:"transparent"};
|
|
816
|
+
font-family: var(--leva-fonts-mono);
|
|
817
|
+
font-size: 0.9em;
|
|
818
|
+
|
|
819
|
+
&:hover {
|
|
820
|
+
background-color: ${({theme:e})=>e.colors.elevation3};
|
|
821
|
+
color: ${({theme:e})=>e.colors.highlight2};
|
|
822
|
+
}
|
|
823
|
+
`),eC=i.div`
|
|
824
|
+
font-size: 0.85em;
|
|
825
|
+
opacity: 0.7;
|
|
826
|
+
margin-top: 2px;
|
|
827
|
+
white-space: nowrap;
|
|
828
|
+
overflow: hidden;
|
|
829
|
+
text-overflow: ellipsis;
|
|
830
|
+
`,ez=i.div`
|
|
831
|
+
font-size: 1em;
|
|
832
|
+
white-space: nowrap;
|
|
833
|
+
overflow: hidden;
|
|
834
|
+
text-overflow: ellipsis;
|
|
835
|
+
`,eP=({value:e="",placeholder:o="",onSubmit:i=()=>{},options:s=[],...c})=>{let[h,p]=l(e),[g,m]=l(!1),[f,u]=l(-1),v=d(null),b=d(null),w=s.filter(e=>""===h||e.value.toLowerCase().includes(h.toLowerCase())||e.label?.toLowerCase().includes(h.toLowerCase())),x=a(()=>{i(h),m(!1),u(-1)},[h,i]),y=a(e=>{p(e.value),i(e.value),m(!1),u(-1)},[i]),$=a(e=>{switch(e.key){case"Escape":m(!1),u(-1);break;case"Enter":g&&f>=0&&w[f]?(e.preventDefault(),y(w[f])):x();break;case"ArrowDown":e.preventDefault(),g?u(e=>e<w.length-1?e+1:e):(m(!0),u(0));break;case"ArrowUp":e.preventDefault(),g&&u(e=>e>0?e-1:e)}},[x,g,f,w,y]);return n(()=>{let e=e=>{b.current&&!b.current.contains(e.target)&&v.current&&!v.current.contains(e.target)&&(m(!1),u(-1))};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),n(()=>{if(f>=0&&b.current){let e=b.current.children[f];e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})}},[f]),r(ey,{children:[r(ev,{children:[t(eb,{...c,ref:v,value:h,placeholder:o,onKeyDown:$,onChange:e=>{p(e.target.value),m(!0),u(-1)},onFocus:()=>{s.length>0&&m(!0)},onBlur:()=>{setTimeout(()=>{m(!1),u(-1)},200)},autoComplete:"off"}),t(ex,{onClick:x,children:t(F,{})})]}),s.length>0&&t(e$,{ref:b,isOpen:g&&w.length>0,children:w.map((e,o)=>r(ek,{isHighlighted:o===f,onClick:()=>y(e),onMouseEnter:()=>u(o),children:[t(ez,{children:e.label||e.value}),e.value&&t(eC,{children:e.value})]},e.value+o))})]})},eN=i(ev)`
|
|
836
|
+
gap: 0.5rem;
|
|
837
|
+
`,ej=i(eb)`
|
|
838
|
+
padding: 0;
|
|
839
|
+
aspect-ratio: 1 / 1;
|
|
840
|
+
width: auto;
|
|
841
|
+
cursor: pointer;
|
|
842
|
+
&::-webkit-color-swatch-wrapper {
|
|
843
|
+
padding: 0;
|
|
844
|
+
}
|
|
845
|
+
&::-webkit-color-swatch {
|
|
846
|
+
border-radius: 0.2rem;
|
|
847
|
+
border: none;
|
|
848
|
+
}
|
|
849
|
+
`,e_=({value:e,onChange:o=()=>{},...i})=>r(eN,{...i,children:[t(ej,{type:"color",value:e,onChange:e=>{o(e.target.value)}}),t(eb,{value:e,onChange:e=>{o(e.target.value)}})]}),eE=i.span`
|
|
850
|
+
position: relative;
|
|
851
|
+
&:after {
|
|
852
|
+
content: "↕";
|
|
853
|
+
position: absolute;
|
|
854
|
+
top: -1px;
|
|
855
|
+
right: 0;
|
|
856
|
+
height: 100%;
|
|
857
|
+
display: flex;
|
|
858
|
+
align-items: center;
|
|
859
|
+
font-size: 1.2em;
|
|
860
|
+
color: var(--leva-colors-highlight1);
|
|
861
|
+
}
|
|
862
|
+
`,eS=i.input`
|
|
863
|
+
width: 100%;
|
|
864
|
+
appearance: textfield;
|
|
865
|
+
font-size: inherit;
|
|
866
|
+
background: none;
|
|
867
|
+
border: none;
|
|
868
|
+
text-align: right;
|
|
869
|
+
color: var(--leva-colors-highlight1);
|
|
870
|
+
font-family: var(--leva-fonts-mono);
|
|
871
|
+
cursor: inherit;
|
|
872
|
+
text-overflow: ellipsis;
|
|
873
|
+
outline: none;
|
|
874
|
+
appearance: textfield;
|
|
875
|
+
cursor: auto;
|
|
876
|
+
background-color: var(--leva-colors-elevation3);
|
|
877
|
+
border-radius: 0.2rem;
|
|
878
|
+
height: 1.5rem;
|
|
879
|
+
color: var(--leva-colors-highlight2);
|
|
880
|
+
|
|
881
|
+
&:focus,
|
|
882
|
+
&:hover {
|
|
883
|
+
box-shadow: 0 0 0 var(--leva-borderWidths-focus) var(--leva-colors-accent2);
|
|
884
|
+
}
|
|
885
|
+
&::-webkit-inner-spin-button,
|
|
886
|
+
&::-webkit-outer-spin-button {
|
|
887
|
+
-webkit-appearance: none;
|
|
888
|
+
margin-right: 1rem;
|
|
889
|
+
}
|
|
890
|
+
`,eF=({max:e=1/0,min:o=-1/0,value:r,step:i=1,onChange:l=()=>{},placeholder:a,...s})=>{let c=d(null),h=I(t=>{if(void 0===r)return;let n=e<10?5:e/100,a=+(r+Math.round(t.deltaY/n)*i).toFixed(2);a<o||a>e||l(a)},100);return n(()=>{c.current&&(c.current.addEventListener("wheel",e=>{e.preventDefault(),e.stopPropagation(),h(e)}),c.current.onchange=e=>{l(+e.target.value)})},[c.current,l]),n(()=>{void 0!==r&&c.current&&(c.current.value=r.toString())},[c.current,r]),t(eE,{...s,children:t(eS,{ref:c,type:"number",step:i,min:o,max:e,placeholder:a})})},eI=i.button`
|
|
891
|
+
display: flex;
|
|
892
|
+
align-items: center;
|
|
893
|
+
justify-content: center;
|
|
894
|
+
outline: none;
|
|
895
|
+
font-size: inherit;
|
|
896
|
+
font-family: inherit;
|
|
897
|
+
border: none;
|
|
898
|
+
appearance: none;
|
|
899
|
+
font-weight: var(--leva-fontWeights-button);
|
|
900
|
+
height: var(--leva-sizes-rowHeight);
|
|
901
|
+
border-radius: var(--leva-radii-sm);
|
|
902
|
+
background-color: ${({theme:e})=>e.colors.elevation1};
|
|
903
|
+
color: ${({theme:e})=>e.colors.highlight3};
|
|
904
|
+
background-color: ${({theme:e})=>e.colors.accent2};
|
|
905
|
+
cursor: pointer;
|
|
906
|
+
font-family: var(--leva-fonts-mono);
|
|
907
|
+
font-size: var(--leva-fontSizes-root);
|
|
908
|
+
|
|
909
|
+
&:hover {
|
|
910
|
+
box-shadow: inset 0 0 0 var(--leva-borderWidths-hover)
|
|
911
|
+
${({theme:e})=>e.colors.accent3};
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
&:active {
|
|
915
|
+
box-shadow: inset 0 0 0 var(--leva-borderWidths-active)
|
|
916
|
+
${({theme:e})=>e.colors.accent3};
|
|
917
|
+
background-color: ${({theme:e})=>e.colors.accent1};
|
|
918
|
+
}
|
|
919
|
+
`,eA=m(i.div`
|
|
920
|
+
display: flex;
|
|
921
|
+
align-items: center;
|
|
922
|
+
position: relative;
|
|
923
|
+
|
|
924
|
+
select {
|
|
925
|
+
appearance: none;
|
|
926
|
+
border: none;
|
|
927
|
+
outline: none;
|
|
928
|
+
width: 100%;
|
|
929
|
+
font-weight: var(--leva-fontWeights-button);
|
|
930
|
+
padding: 0.3rem 0.5rem;
|
|
931
|
+
padding-right: 1rem;
|
|
932
|
+
border-radius: var(--leva-radii-sm);
|
|
933
|
+
background-color: ${({theme:e})=>e.colors.elevation1};
|
|
934
|
+
color: ${({theme:e})=>e.colors.highlight3};
|
|
935
|
+
cursor: pointer;
|
|
936
|
+
font-family: var(--leva-fonts-mono);
|
|
937
|
+
font-size: var(--leva-fontSizes-root);
|
|
938
|
+
|
|
939
|
+
&:hover {
|
|
940
|
+
box-shadow: inset 0 0 0 var(--leva-borderWidths-hover)
|
|
941
|
+
${({theme:e})=>e.colors.accent3};
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
&:active {
|
|
945
|
+
box-shadow: inset 0 0 0 var(--leva-borderWidths-active)
|
|
946
|
+
${({theme:e})=>e.colors.accent3};
|
|
947
|
+
background-color: ${({theme:e})=>e.colors.accent1};
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
&::after {
|
|
952
|
+
position: absolute;
|
|
953
|
+
right: 0.3rem;
|
|
954
|
+
content: "";
|
|
955
|
+
width: 0.5em;
|
|
956
|
+
height: 0.3em;
|
|
957
|
+
background-color: ${({theme:e})=>e.colors.highlight3};
|
|
958
|
+
clip-path: polygon(100% 0%, 0 0%, 50% 100%);
|
|
959
|
+
}
|
|
960
|
+
`),eR=({options:e,placeholder:o,value:i,onChange:n,...l})=>t(eA,{...l,children:r("select",{value:i||"",onChange:e=>n?.(e.target.value),children:[o&&t("option",{value:"",disabled:!0,children:o}),e.map(({value:e,label:o})=>t("option",{value:e,children:o},e+o))]})}),eT=i(A)`
|
|
961
|
+
padding: 0;
|
|
962
|
+
cursor: pointer;
|
|
963
|
+
position: relative;
|
|
964
|
+
|
|
965
|
+
&:hover {
|
|
966
|
+
filter: brightness(125%);
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
.rc-slider-dot {
|
|
970
|
+
border-radius: 0;
|
|
971
|
+
box-shadow: none;
|
|
972
|
+
margin: 0;
|
|
973
|
+
border: none;
|
|
974
|
+
background: ${({theme:e})=>e.colors.highlight2};
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
&.rc-slider-horizontal .rc-slider-dot {
|
|
978
|
+
width: 1px;
|
|
979
|
+
height: 0.25rem;
|
|
980
|
+
bottom: -6px;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
&.rc-slider-vertical .rc-slider-dot {
|
|
984
|
+
width: 0.25rem;
|
|
985
|
+
height: 1px;
|
|
986
|
+
left: 3px;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
.rc-slider-rail {
|
|
990
|
+
background: ${({theme:e})=>e.colors.elevation1};
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
.rc-slider-track {
|
|
994
|
+
background: ${({theme:e,color:o})=>o||e.colors.accent2};
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
.rc-slider-handle {
|
|
998
|
+
border-radius: 0.125rem;
|
|
999
|
+
background: ${({theme:e,color:o})=>o||e.colors.accent2};
|
|
1000
|
+
opacity: 1;
|
|
1001
|
+
cursor: pointer;
|
|
1002
|
+
border: none;
|
|
1003
|
+
&:hover {
|
|
1004
|
+
filter: brightness(110%);
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
.rc-slider-handle,
|
|
1009
|
+
.rc-slider-handle.rc-slider-handle-dragging {
|
|
1010
|
+
box-shadow: 0 0 0 2px ${({theme:e})=>e.colors.elevation2};
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
&:before {
|
|
1014
|
+
content: "";
|
|
1015
|
+
position: absolute;
|
|
1016
|
+
background: transparent;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
&.rc-slider-horizontal {
|
|
1020
|
+
height: 2px;
|
|
1021
|
+
|
|
1022
|
+
.rc-slider-rail,
|
|
1023
|
+
.rc-slider-track,
|
|
1024
|
+
.rc-slider-step {
|
|
1025
|
+
height: 100%;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
.rc-slider-handle {
|
|
1029
|
+
width: 0.5rem;
|
|
1030
|
+
height: 1rem;
|
|
1031
|
+
bottom: -7px;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
.rc-slider-handle-dragging {
|
|
1035
|
+
cursor: ew-resize;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
&:before {
|
|
1039
|
+
width: 100%;
|
|
1040
|
+
height: 1rem;
|
|
1041
|
+
top: -7px;
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
&.rc-slider-vertical {
|
|
1046
|
+
width: 2px;
|
|
1047
|
+
|
|
1048
|
+
.rc-slider-rail,
|
|
1049
|
+
.rc-slider-track,
|
|
1050
|
+
.rc-slider-step {
|
|
1051
|
+
width: 100%;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
.rc-slider-track {
|
|
1055
|
+
left: 0;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
.rc-slider-handle {
|
|
1059
|
+
width: 1rem;
|
|
1060
|
+
height: 0.5rem;
|
|
1061
|
+
right: -7px;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
.rc-slider-handle-dragging {
|
|
1065
|
+
cursor: ns-resize;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
&:before {
|
|
1069
|
+
height: 100%;
|
|
1070
|
+
width: 1rem;
|
|
1071
|
+
right: -7px;
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
&.rc-slider-horizontal .rc-slider-mark {
|
|
1076
|
+
top: 1rem;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
&.rc-slider-vertical .rc-slider-mark {
|
|
1080
|
+
left: 1rem;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
.rc-slider-mark-text {
|
|
1084
|
+
font-size: 0.4rem;
|
|
1085
|
+
}
|
|
1086
|
+
`;class eM extends R{_updateMousePosition(e){let o=this._canvas?.getBoundingClientRect(),t=this._canvas.width/o.width,r=this._canvas.height/o.height;this._mouse={x:(e.clientX-o.left)*t,y:this._height-(e.clientY-o.top)*r}}getPoints(){let e=1/this._width,o=1/this._height;return this._pointCollection._points.map(({x:t,y:r})=>({x:t*e,y:r*o}))}removeAll(){let e=this._pointCollection.getNumberOfPoints();for(let o=e;o>0;o--)this._pointCollection.remove(o-1)}update(e){this.removeAll();let o=this._width,t=this._height;e.forEach(({x:e,y:r})=>{this._pointCollection.add({x:e*o,y:r*t})}),this.draw()}off(e,o){}}let eL=i.div`
|
|
1087
|
+
height: 100%;
|
|
1088
|
+
width: 100%;
|
|
1089
|
+
position: relative;
|
|
1090
|
+
canvas {
|
|
1091
|
+
border: none !important;
|
|
1092
|
+
position: absolute;
|
|
1093
|
+
left: 0;
|
|
1094
|
+
right: 0;
|
|
1095
|
+
height: 100%;
|
|
1096
|
+
width: 100%;
|
|
1097
|
+
}
|
|
1098
|
+
`,eD=({onChange:e,onMove:o,points:r,type:i="monotonic",textColor:s="red",curveColor:c=Q,gridStep:h=.25,gridColor:p=X,controlPointRadius:g=14,controlPointColor:m=Z})=>{let f=d(null),[u,v]=l(),b=a(o=>{let t=o.getPoints();e?.(t)},[e]),w=a(e=>{let t=e.getPoints();o?.(t)},[o]);return n(()=>u?.update(r),[u,r]),n(()=>u?.setSplineType(i),[u,i]),n(()=>u?.setGridStep(h),[u,h]),n(()=>u?.setGridColor(p),[u,p]),n(()=>u?.setControlPointRadius(g),[u,g]),n(()=>u?.setTextColor(s),[u,s]),n(()=>{u?.setCurveColor("idle",c)},[u,c]),n(()=>{u?.setControlPointColor("idle",m)},[u,m]),n(()=>{if(u)return u.setCurveThickness(4),u.on("movePoint",w),u.on("releasePoint",b),u.on("pointAdded",b),u.on("pointRemoved",b),u.draw(),()=>{u.off("movePoint",w),u.off("releasePoint",b),u.off("pointAdded",b),u.off("pointRemoved",b)}},[u,b,w]),n(()=>{f.current&&v(new eM(f.current,1024,1024))},[f]),t(eL,{ref:f})},eH=i.div``,eG=i.div`
|
|
1099
|
+
font-family: var(--leva-fonts-mono);
|
|
1100
|
+
font-size: 0.7rem;
|
|
1101
|
+
color: ${({theme:e})=>e.colors.whitePrimary};
|
|
1102
|
+
`,eO=i.div`
|
|
1103
|
+
border-bottom: 1px solid ${({theme:e})=>e.colors.elevation1};
|
|
1104
|
+
`,eW=i.div`
|
|
1105
|
+
padding: 0.2rem 0.4rem;
|
|
1106
|
+
font-size: 0.7rem;
|
|
1107
|
+
color: ${({theme:e})=>e.colors.highlight2};
|
|
1108
|
+
position: relative;
|
|
1109
|
+
display: grid;
|
|
1110
|
+
align-items: center;
|
|
1111
|
+
grid-template-rows: minmax(1.5rem, max-content);
|
|
1112
|
+
grid-template-columns: ${({oneLineLabels:e})=>e?"1fr":"auto 10rem"};
|
|
1113
|
+
row-gap: 0.1rem;
|
|
1114
|
+
column-gap: 0.4rem;
|
|
1115
|
+
`,eB=i.div`
|
|
1116
|
+
display: flex;
|
|
1117
|
+
flex-direction: column;
|
|
1118
|
+
gap: 0.4rem;
|
|
1119
|
+
background: ${({theme:e})=>e.colors.elevation2};
|
|
1120
|
+
padding: 0.4rem 0.1rem;
|
|
1121
|
+
`,eV=i.div``;export{B as Modal,em as Checker,eu as RadioGroup,ew as Input,eP as DropdownInput,e_ as ColorInput,eF as NumberInput,eI as Button,eR as Select,eT as Slider,eD as SplineEditor,eH as ConfigRowLabel,eG as ConfigRowControl,eO as ConfigRowSeparator,eW as ConfigRow,eB as ConfigPanel,eV as ConfigRowInner};
|
|
1122
|
+
//# sourceMappingURL=components.js.map
|