@grame/faust-ui 1.2.0 → 1.2.1
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/esm/index.css +6 -0
- package/dist/esm/index.css.map +1 -1
- package/dist/esm/index.js +63 -16
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +70 -17
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/esm/index.css
CHANGED
|
@@ -251,6 +251,12 @@
|
|
|
251
251
|
padding: 2px 4px;
|
|
252
252
|
width: calc(100% - 8px);
|
|
253
253
|
overflow: auto;
|
|
254
|
+
display: flex;
|
|
255
|
+
flex-direction: column;
|
|
256
|
+
}
|
|
257
|
+
.faust-ui-component.faust-ui-component-radio > .faust-ui-component-radio-group.faust-ui-component-radio-group-horizontal {
|
|
258
|
+
flex-direction: row;
|
|
259
|
+
justify-content: space-around;
|
|
254
260
|
}
|
|
255
261
|
.faust-ui-component.faust-ui-component-radio > .faust-ui-component-radio-group > div {
|
|
256
262
|
text-overflow: ellipsis;
|
package/dist/esm/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.css","mappings":";;;AAAA;EACI;EACA;EACA;EACA;AACJ;AAAI;EACI;AAER;AAAI;EACI;EACA;EACA;EACA;AAER;AADQ;EACI;EACA;EACA;EACA;AAGZ;AAAI;EACI;AAER,C;;;;ACvBA;EACI;AACJ;AAAI;EACI;AAER;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER;AADQ;EACI;EACA;EACA;EACA;AAGZ;AAFY;EACI;EACA;EACA;EACA;EACA;AAIhB;AADQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAGZ;AAFY;EAEI;EACA;AAGhB,C;;;;AC3CI;EACI;AAAR;AAEI;EACI;EACA;EACA;EACA;EACA;EACA;AAAR;AACQ;EACI;EACA;EACA;EACA;EACA;AACZ;AAAY;EACI;EACA;EACA;EACA;EACA;AAEhB;AACQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACZ;AAAY;EAEI;EACA;AAChB,C;;;;ACzCA;EACI;AACJ;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER;AADQ;EAEI;AAEZ,C;;;;ACZI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAAR;AACQ;EACI;EACA;AACZ,C;;;;ACZI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAAR;AACQ;EACI;EACA;AACZ,C;;;;ACbI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAAR;AACQ;EACI;EACA;AACZ,C;;;;ACdA;EACI;AACJ;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAER;AADQ;EAEI;EACA;AAEZ,C;;;;AC3BA;EACI;AACJ;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER,C;;;;ACVA;EACI;AACJ;AAAI;EACI;EACA;AAER;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;AAER;AADQ;EACI;EACA;EACA;AAGZ,C;;;;ACpBA;EACI;AACJ;AAAI;EACI;AAER;AAAI;EACI;EACA;EACA;EACA;AAER;AADQ;EACI;EACA;EACA;EACA;EACA;AAGZ,C;;;;AClBA;EACI;AACJ;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAER,C;;;;ACdA;EACI;AACJ;AAAI;EACI;AAER;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER;AADQ;EACI;EACA;EACA;EACA;AAGZ;AAFY;EACI;EACA;EACA;EACA;EACA;AAIhB;AADQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAGZ,C;;;;ACtCI;EACI;AAAR;AAEI;EACI;EACA;EACA;EACA;EACA;EACA;AAAR;AACQ;EACI;EACA;EACA;EACA;EACA;AACZ;AAAY;EACI;EACA;EACA;EACA;EACA;AAEhB;AACQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACZ,C;;;;ACnCA;EACI;EACA;EACA;EACA;EACA;AAAJ;AACI;EACI;EACA;EACA;EACA;AACR;AAAQ;EACI;EACA;EACA;EACA;AAEZ;AACI;EACI;EACA;EACA;EACA;AACR;AAAQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAEZ;AADY;EACI;AAGhB;AADY;EACI;EACA;AAGhB,C;;;;AC3CA;EACI;EACA;EACA;EACA;EACA;EACA;AACJ,C","sources":["webpack://@grame/faust-ui/./src/components/Base.scss","webpack://@grame/faust-ui/./src/components/VSlider.scss","webpack://@grame/faust-ui/./src/components/HSlider.scss","webpack://@grame/faust-ui/./src/components/Nentry.scss","webpack://@grame/faust-ui/./src/components/Soundfile.scss","webpack://@grame/faust-ui/./src/components/Button.scss","webpack://@grame/faust-ui/./src/components/Checkbox.scss","webpack://@grame/faust-ui/./src/components/Knob.scss","webpack://@grame/faust-ui/./src/components/Menu.scss","webpack://@grame/faust-ui/./src/components/Radio.scss","webpack://@grame/faust-ui/./src/components/Led.scss","webpack://@grame/faust-ui/./src/components/Numerical.scss","webpack://@grame/faust-ui/./src/components/VBargraph.scss","webpack://@grame/faust-ui/./src/components/HBargraph.scss","webpack://@grame/faust-ui/./src/components/Group.scss","webpack://@grame/faust-ui/./src/index.scss"],"sourcesContent":[".faust-ui-component {\n display: flex;\n position: absolute;\n flex-direction: column;\n overflow: hidden;\n &:focus {\n outline: none;\n }\n & > .faust-ui-component-label {\n position: relative;\n margin-top: 4px;\n width: 100%;\n user-select: none;\n & > canvas {\n position: relative;\n display: block;\n max-width: 100%;\n max-height: 100%;\n }\n }\n & input {\n box-shadow: none;\n }\n}",".faust-ui-component.faust-ui-component-vslider {\n align-items: center;\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n }\n & > .faust-ui-component-vslider-flexdiv {\n position: relative;\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n width: 100%;\n height: auto;\n & > .faust-ui-component-vslider-canvasdiv {\n position: relative;\n display: block;\n flex: 1 1 auto;\n width: 100%;\n & > canvas {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n touch-action: none;\n }\n }\n & input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: 5px auto auto auto;\n border-width: 0px;\n border-radius: 4px;\n height: 5%;\n max-width: calc(100% - 8px);\n padding: 2px 4px;\n -moz-appearance:textfield;\n &::-webkit-inner-spin-button, \n &::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n }\n }\n}",".faust-ui-component.faust-ui-component-hslider {\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n }\n & > .faust-ui-component-hslider-flexdiv {\n position: relative;\n display: flex;\n flex-direction: row-reverse;\n flex: 1 1 auto;\n width: 100%;\n height: auto;\n & > .faust-ui-component-hslider-canvasdiv {\n position: relative;\n display: block;\n flex: 1 1 auto;\n height: 100%;\n margin: auto;\n & > canvas {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n touch-action: none;\n }\n }\n & > input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: auto 5px auto auto;\n border-width: 0px;\n border-radius: 4px;\n width: calc(20% - 13px);\n padding: 2px 4px;\n -moz-appearance: textfield;\n &::-webkit-inner-spin-button, \n &::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n }\n }\n}\n",".faust-ui-component.faust-ui-component-nentry {\n align-items: center;\n & input {\n margin: 0px;\n text-align: center;\n border-width: 1px;\n border-radius: 4px;\n padding: 2px 4px;\n width: calc(100% - 8px);\n &::-webkit-inner-spin-button, \n &::-webkit-outer-spin-button {\n opacity: 1;\n }\n }\n}",".faust-ui-component.faust-ui-component-soundfile {\n & > div {\n display: flex;\n position: relative;\n cursor: pointer;\n border-width: 1px;\n text-align: center;\n border-radius: 4px;\n flex: 1 0 auto;\n border-style: solid;\n & > span {\n user-select: none;\n margin: auto;\n }\n }\n}",".faust-ui-component.faust-ui-component-button {\n & > div {\n display: flex;\n position: relative;\n cursor: pointer;\n border-width: 1px;\n text-align: center;\n border-radius: 4px;\n flex: 1 0 auto;\n border-style: solid;\n touch-action: none;\n & > span {\n user-select: none;\n margin: auto;\n }\n }\n}",".faust-ui-component.faust-ui-component-checkbox {\n & > div {\n display: flex;\n position: relative;\n cursor: pointer;\n border-width: 1px;\n text-align: center;\n border-radius: 1px;\n flex: 1 0 auto;\n border-style: solid;\n touch-action: none;\n & > span {\n margin: auto;\n user-select: none;\n }\n }\n}",".faust-ui-component.faust-ui-component-knob {\n align-items: center;\n & > canvas {\n position: relative;\n display: block;\n flex: 1 1 auto;\n min-height: 50%;\n width: 100%;\n touch-action: none;\n }\n & > input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: 0px;\n border-width: 0px;\n border-radius: 4px;\n max-width: calc(100% - 8px);\n padding: 2px 4px;\n -moz-appearance: textfield;\n &::-webkit-inner-spin-button, \n &::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n }\n}",".faust-ui-component.faust-ui-component-menu {\n align-items: center;\n & > select {\n margin: 0px;\n text-align: center;\n border-width: 1px;\n border-radius: 4px;\n padding: 2px 4px;\n width: calc(100% - 8px);\n }\n}",".faust-ui-component.faust-ui-component-radio {\n align-items: center;\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n margin-top: auto;\n }\n & > .faust-ui-component-radio-group {\n flex: 0 1 auto;\n margin-bottom: auto;\n border-width: 1px;\n border-radius: 4px;\n padding: 2px 4px;\n width: calc(100% - 8px);\n overflow: auto;\n & > div {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n }\n}",".faust-ui-component.faust-ui-component-led {\n align-items: center;\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n }\n & > .faust-ui-component-led-canvasdiv {\n position: relative;\n display: block;\n flex: 1 1 auto;\n width: 100%;\n & > canvas {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n touch-action: none;\n }\n }\n}\n",".faust-ui-component.faust-ui-component-numerical {\n align-items: center;\n & > input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: auto;\n border-width: 0px;\n border-radius: 4px;\n width: calc(100% - 8px);\n padding: 2px 4px;\n }\n}",".faust-ui-component.faust-ui-component-vbargraph {\n align-items: center;\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n }\n & > .faust-ui-component-vbargraph-flexdiv {\n position: relative;\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n width: 100%;\n height: inherit;\n & > .faust-ui-component-vbargraph-canvasdiv {\n position: relative;\n display: block;\n flex: 1 1 auto;\n width: 100%;\n & > canvas {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n touch-action: none;\n }\n }\n & > input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: 5px auto auto auto;\n border-width: 0px;\n border-radius: 4px;\n height: 5%;\n width: calc(100% - 8px);\n padding: 2px 4px;\n }\n }\n}\n",".faust-ui-component.faust-ui-component-hbargraph {\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n }\n & > .faust-ui-component-hbargraph-flexdiv {\n position: relative;\n display: flex;\n flex-direction: row-reverse;\n flex: 1 1 auto;\n width: 100%;\n height: auto;\n & > .faust-ui-component-hbargraph-canvasdiv {\n position: relative;\n display: block;\n flex: 1 1 auto;\n height: 100%;\n margin: auto;\n & > canvas {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n touch-action: none;\n }\n }\n & > input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: auto 5px auto auto;\n border-width: 0px;\n border-radius: 4px;\n width: calc(20% - 13px);\n padding: 2px 4px;\n }\n }\n}","\n.faust-ui-group {\n position: absolute;\n display: block;\n background-color: rgba(80, 80, 80, 0.75);\n border-radius: 4px;\n border: 1px rgba(255, 255, 255, 0.25) solid;\n & > .faust-ui-group-label {\n position: relative;\n margin: 4px;\n width: calc(100% - 8px);\n user-select: none;\n & > canvas {\n position: relative;\n display: block;\n max-width: 100%;\n max-height: 100%;\n }\n }\n & .faust-ui-tgroup-tabs {\n position: absolute;\n display: inline-block;\n white-space: nowrap;\n left: 0px;\n & .faust-ui-tgroup-tab {\n position: relative;\n display: inline-block;\n border-radius: 5px;\n cursor: pointer;\n text-overflow: ellipsis;\n white-space: nowrap;\n user-select: none;\n margin: 10px;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.5);\n &:hover {\n background-color: rgba(255, 255, 255, 1);\n }\n &.active {\n background-color: rgba(40, 40, 40, 1);\n color: white;\n }\n }\n }\n}",".faust-ui-root {\n margin: 0px auto;\n flex: 1 0 auto;\n position: relative !important;\n background-color: transparent !important;\n border: none !important;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n}"],"names":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"index.css","mappings":";;;AAAA;EACI;EACA;EACA;EACA;AACJ;AAAI;EACI;AAER;AAAI;EACI;EACA;EACA;EACA;AAER;AADQ;EACI;EACA;EACA;EACA;AAGZ;AAAI;EACI;AAER,C;;;;ACvBA;EACI;AACJ;AAAI;EACI;AAER;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER;AADQ;EACI;EACA;EACA;EACA;AAGZ;AAFY;EACI;EACA;EACA;EACA;EACA;AAIhB;AADQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAGZ;AAFY;EAEI;EACA;AAGhB,C;;;;AC3CI;EACI;AAAR;AAEI;EACI;EACA;EACA;EACA;EACA;EACA;AAAR;AACQ;EACI;EACA;EACA;EACA;EACA;AACZ;AAAY;EACI;EACA;EACA;EACA;EACA;AAEhB;AACQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACZ;AAAY;EAEI;EACA;AAChB,C;;;;ACzCA;EACI;AACJ;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER;AADQ;EAEI;AAEZ,C;;;;ACZI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAAR;AACQ;EACI;EACA;AACZ,C;;;;ACZI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAAR;AACQ;EACI;EACA;AACZ,C;;;;ACbI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAAR;AACQ;EACI;EACA;AACZ,C;;;;ACdA;EACI;AACJ;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAER;AADQ;EAEI;EACA;AAEZ,C;;;;AC3BA;EACI;AACJ;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER,C;;;;ACVA;EACI;AACJ;AAAI;EACI;EACA;AAER;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAER;AADQ;EACI;EACA;AAGZ;AADQ;EACI;EACA;EACA;AAGZ,C;;;;AC1BA;EACI;AACJ;AAAI;EACI;AAER;AAAI;EACI;EACA;EACA;EACA;AAER;AADQ;EACI;EACA;EACA;EACA;EACA;AAGZ,C;;;;AClBA;EACI;AACJ;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAER,C;;;;ACdA;EACI;AACJ;AAAI;EACI;AAER;AAAI;EACI;EACA;EACA;EACA;EACA;EACA;AAER;AADQ;EACI;EACA;EACA;EACA;AAGZ;AAFY;EACI;EACA;EACA;EACA;EACA;AAIhB;AADQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAGZ,C;;;;ACtCI;EACI;AAAR;AAEI;EACI;EACA;EACA;EACA;EACA;EACA;AAAR;AACQ;EACI;EACA;EACA;EACA;EACA;AACZ;AAAY;EACI;EACA;EACA;EACA;EACA;AAEhB;AACQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACZ,C;;;;ACnCA;EACI;EACA;EACA;EACA;EACA;AAAJ;AACI;EACI;EACA;EACA;EACA;AACR;AAAQ;EACI;EACA;EACA;EACA;AAEZ;AACI;EACI;EACA;EACA;EACA;AACR;AAAQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAEZ;AADY;EACI;AAGhB;AADY;EACI;EACA;AAGhB,C;;;;AC3CA;EACI;EACA;EACA;EACA;EACA;EACA;AACJ,C","sources":["webpack://@grame/faust-ui/./src/components/Base.scss","webpack://@grame/faust-ui/./src/components/VSlider.scss","webpack://@grame/faust-ui/./src/components/HSlider.scss","webpack://@grame/faust-ui/./src/components/Nentry.scss","webpack://@grame/faust-ui/./src/components/Soundfile.scss","webpack://@grame/faust-ui/./src/components/Button.scss","webpack://@grame/faust-ui/./src/components/Checkbox.scss","webpack://@grame/faust-ui/./src/components/Knob.scss","webpack://@grame/faust-ui/./src/components/Menu.scss","webpack://@grame/faust-ui/./src/components/Radio.scss","webpack://@grame/faust-ui/./src/components/Led.scss","webpack://@grame/faust-ui/./src/components/Numerical.scss","webpack://@grame/faust-ui/./src/components/VBargraph.scss","webpack://@grame/faust-ui/./src/components/HBargraph.scss","webpack://@grame/faust-ui/./src/components/Group.scss","webpack://@grame/faust-ui/./src/index.scss"],"sourcesContent":[".faust-ui-component {\n display: flex;\n position: absolute;\n flex-direction: column;\n overflow: hidden;\n &:focus {\n outline: none;\n }\n & > .faust-ui-component-label {\n position: relative;\n margin-top: 4px;\n width: 100%;\n user-select: none;\n & > canvas {\n position: relative;\n display: block;\n max-width: 100%;\n max-height: 100%;\n }\n }\n & input {\n box-shadow: none;\n }\n}",".faust-ui-component.faust-ui-component-vslider {\n align-items: center;\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n }\n & > .faust-ui-component-vslider-flexdiv {\n position: relative;\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n width: 100%;\n height: auto;\n & > .faust-ui-component-vslider-canvasdiv {\n position: relative;\n display: block;\n flex: 1 1 auto;\n width: 100%;\n & > canvas {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n touch-action: none;\n }\n }\n & input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: 5px auto auto auto;\n border-width: 0px;\n border-radius: 4px;\n height: 5%;\n max-width: calc(100% - 8px);\n padding: 2px 4px;\n -moz-appearance:textfield;\n &::-webkit-inner-spin-button, \n &::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n }\n }\n}",".faust-ui-component.faust-ui-component-hslider {\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n }\n & > .faust-ui-component-hslider-flexdiv {\n position: relative;\n display: flex;\n flex-direction: row-reverse;\n flex: 1 1 auto;\n width: 100%;\n height: auto;\n & > .faust-ui-component-hslider-canvasdiv {\n position: relative;\n display: block;\n flex: 1 1 auto;\n height: 100%;\n margin: auto;\n & > canvas {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n touch-action: none;\n }\n }\n & > input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: auto 5px auto auto;\n border-width: 0px;\n border-radius: 4px;\n width: calc(20% - 13px);\n padding: 2px 4px;\n -moz-appearance: textfield;\n &::-webkit-inner-spin-button, \n &::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n }\n }\n}\n",".faust-ui-component.faust-ui-component-nentry {\n align-items: center;\n & input {\n margin: 0px;\n text-align: center;\n border-width: 1px;\n border-radius: 4px;\n padding: 2px 4px;\n width: calc(100% - 8px);\n &::-webkit-inner-spin-button, \n &::-webkit-outer-spin-button {\n opacity: 1;\n }\n }\n}",".faust-ui-component.faust-ui-component-soundfile {\n & > div {\n display: flex;\n position: relative;\n cursor: pointer;\n border-width: 1px;\n text-align: center;\n border-radius: 4px;\n flex: 1 0 auto;\n border-style: solid;\n & > span {\n user-select: none;\n margin: auto;\n }\n }\n}",".faust-ui-component.faust-ui-component-button {\n & > div {\n display: flex;\n position: relative;\n cursor: pointer;\n border-width: 1px;\n text-align: center;\n border-radius: 4px;\n flex: 1 0 auto;\n border-style: solid;\n touch-action: none;\n & > span {\n user-select: none;\n margin: auto;\n }\n }\n}",".faust-ui-component.faust-ui-component-checkbox {\n & > div {\n display: flex;\n position: relative;\n cursor: pointer;\n border-width: 1px;\n text-align: center;\n border-radius: 1px;\n flex: 1 0 auto;\n border-style: solid;\n touch-action: none;\n & > span {\n margin: auto;\n user-select: none;\n }\n }\n}",".faust-ui-component.faust-ui-component-knob {\n align-items: center;\n & > canvas {\n position: relative;\n display: block;\n flex: 1 1 auto;\n min-height: 50%;\n width: 100%;\n touch-action: none;\n }\n & > input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: 0px;\n border-width: 0px;\n border-radius: 4px;\n max-width: calc(100% - 8px);\n padding: 2px 4px;\n -moz-appearance: textfield;\n &::-webkit-inner-spin-button, \n &::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n }\n}",".faust-ui-component.faust-ui-component-menu {\n align-items: center;\n & > select {\n margin: 0px;\n text-align: center;\n border-width: 1px;\n border-radius: 4px;\n padding: 2px 4px;\n width: calc(100% - 8px);\n }\n}",".faust-ui-component.faust-ui-component-radio {\n align-items: center;\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n margin-top: auto;\n }\n & > .faust-ui-component-radio-group {\n flex: 0 1 auto;\n margin-bottom: auto;\n border-width: 1px;\n border-radius: 4px;\n padding: 2px 4px;\n width: calc(100% - 8px);\n overflow: auto;\n display: flex;\n flex-direction: column;\n &.faust-ui-component-radio-group-horizontal {\n flex-direction: row;\n justify-content: space-around;\n }\n & > div {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n }\n}",".faust-ui-component.faust-ui-component-led {\n align-items: center;\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n }\n & > .faust-ui-component-led-canvasdiv {\n position: relative;\n display: block;\n flex: 1 1 auto;\n width: 100%;\n & > canvas {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n touch-action: none;\n }\n }\n}\n",".faust-ui-component.faust-ui-component-numerical {\n align-items: center;\n & > input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: auto;\n border-width: 0px;\n border-radius: 4px;\n width: calc(100% - 8px);\n padding: 2px 4px;\n }\n}",".faust-ui-component.faust-ui-component-vbargraph {\n align-items: center;\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n }\n & > .faust-ui-component-vbargraph-flexdiv {\n position: relative;\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n width: 100%;\n height: inherit;\n & > .faust-ui-component-vbargraph-canvasdiv {\n position: relative;\n display: block;\n flex: 1 1 auto;\n width: 100%;\n & > canvas {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n touch-action: none;\n }\n }\n & > input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: 5px auto auto auto;\n border-width: 0px;\n border-radius: 4px;\n height: 5%;\n width: calc(100% - 8px);\n padding: 2px 4px;\n }\n }\n}\n",".faust-ui-component.faust-ui-component-hbargraph {\n & > .faust-ui-component-label {\n flex: 0 0 auto;\n }\n & > .faust-ui-component-hbargraph-flexdiv {\n position: relative;\n display: flex;\n flex-direction: row-reverse;\n flex: 1 1 auto;\n width: 100%;\n height: auto;\n & > .faust-ui-component-hbargraph-canvasdiv {\n position: relative;\n display: block;\n flex: 1 1 auto;\n height: 100%;\n margin: auto;\n & > canvas {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n touch-action: none;\n }\n }\n & > input {\n position: relative;\n display: block;\n flex: 0 1 auto;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.25);\n margin: auto 5px auto auto;\n border-width: 0px;\n border-radius: 4px;\n width: calc(20% - 13px);\n padding: 2px 4px;\n }\n }\n}","\n.faust-ui-group {\n position: absolute;\n display: block;\n background-color: rgba(80, 80, 80, 0.75);\n border-radius: 4px;\n border: 1px rgba(255, 255, 255, 0.25) solid;\n & > .faust-ui-group-label {\n position: relative;\n margin: 4px;\n width: calc(100% - 8px);\n user-select: none;\n & > canvas {\n position: relative;\n display: block;\n max-width: 100%;\n max-height: 100%;\n }\n }\n & .faust-ui-tgroup-tabs {\n position: absolute;\n display: inline-block;\n white-space: nowrap;\n left: 0px;\n & .faust-ui-tgroup-tab {\n position: relative;\n display: inline-block;\n border-radius: 5px;\n cursor: pointer;\n text-overflow: ellipsis;\n white-space: nowrap;\n user-select: none;\n margin: 10px;\n text-align: center;\n background-color: rgba(255, 255, 255, 0.5);\n &:hover {\n background-color: rgba(255, 255, 255, 1);\n }\n &.active {\n background-color: rgba(40, 40, 40, 1);\n color: white;\n }\n }\n }\n}",".faust-ui-root {\n margin: 0px auto;\n flex: 1 0 auto;\n position: relative !important;\n background-color: transparent !important;\n border: none !important;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n}"],"names":[],"sourceRoot":""}
|
package/dist/esm/index.js
CHANGED
|
@@ -569,10 +569,12 @@ const _AbstractItem = class _AbstractItem extends _AbstractComponent__WEBPACK_IM
|
|
|
569
569
|
if (this.state.emitter) this.state.emitter.register(this.state.address, this);
|
|
570
570
|
}
|
|
571
571
|
/**
|
|
572
|
-
* Get a nearest valid number
|
|
572
|
+
* Get a nearest valid number. An entry of a menu or a radio is valid as
|
|
573
|
+
* written, even off the step grid: the C++ GUIs send it unchanged.
|
|
573
574
|
*/
|
|
574
575
|
toValidNumber(value) {
|
|
575
|
-
const { min, max, step } = this.state;
|
|
576
|
+
const { min, max, step, enums } = this.state;
|
|
577
|
+
if (enums && Object.values(enums).includes(value)) return value;
|
|
576
578
|
if (typeof min !== "number" || typeof max !== "number") return value;
|
|
577
579
|
const v = Math.min(max, Math.max(min, value));
|
|
578
580
|
if (!step) return v;
|
|
@@ -728,7 +730,7 @@ const _AbstractItem = class _AbstractItem extends _AbstractComponent__WEBPACK_IM
|
|
|
728
730
|
static getDistance(state) {
|
|
729
731
|
const { type, max, min, value, enums, scale } = state;
|
|
730
732
|
if (type === "enum") return value / (_AbstractItem.enumSteps(enums) || 1);
|
|
731
|
-
const v = scale === "exp" ? (0,_utils__WEBPACK_IMPORTED_MODULE_1__.
|
|
733
|
+
const v = scale === "exp" ? (0,_utils__WEBPACK_IMPORTED_MODULE_1__.iNormExp)(value, min, max) : scale === "log" ? (0,_utils__WEBPACK_IMPORTED_MODULE_1__.iNormLog)(value, min, max) : value;
|
|
732
734
|
return (0,_utils__WEBPACK_IMPORTED_MODULE_1__.normalize)(v, min, max);
|
|
733
735
|
}
|
|
734
736
|
/**
|
|
@@ -921,6 +923,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
921
923
|
/* harmony import */ var _VBargraph__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./VBargraph */ "./src/components/VBargraph.ts");
|
|
922
924
|
/* harmony import */ var _layout_Layout__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../layout/Layout */ "./src/layout/Layout.ts");
|
|
923
925
|
/* harmony import */ var _Group_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Group.scss */ "./src/components/Group.scss");
|
|
926
|
+
var __defProp = Object.defineProperty;
|
|
927
|
+
var __defProps = Object.defineProperties;
|
|
928
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
929
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
930
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
931
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
932
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
933
|
+
var __spreadValues = (a, b) => {
|
|
934
|
+
for (var prop in b || (b = {}))
|
|
935
|
+
if (__hasOwnProp.call(b, prop))
|
|
936
|
+
__defNormalProp(a, prop, b[prop]);
|
|
937
|
+
if (__getOwnPropSymbols)
|
|
938
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
939
|
+
if (__propIsEnum.call(b, prop))
|
|
940
|
+
__defNormalProp(a, prop, b[prop]);
|
|
941
|
+
}
|
|
942
|
+
return a;
|
|
943
|
+
};
|
|
944
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
924
945
|
|
|
925
946
|
|
|
926
947
|
|
|
@@ -1069,7 +1090,7 @@ class Group extends _AbstractComponent__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
1069
1090
|
if (type === "soundfile") return new _Soundfile__WEBPACK_IMPORTED_MODULE_4__["default"](props);
|
|
1070
1091
|
if (type === "knob") return new _Knob__WEBPACK_IMPORTED_MODULE_7__["default"](props);
|
|
1071
1092
|
if (type === "menu") return new _Menu__WEBPACK_IMPORTED_MODULE_8__["default"](props);
|
|
1072
|
-
if (type === "radio") return new _Radio__WEBPACK_IMPORTED_MODULE_9__["default"](props);
|
|
1093
|
+
if (type === "radio") return new _Radio__WEBPACK_IMPORTED_MODULE_9__["default"](__spreadProps(__spreadValues({}, props), { style: __spreadProps(__spreadValues({}, props.style), { direction: ioItem.type === "hslider" ? "horizontal" : "vertical" }) }));
|
|
1073
1094
|
if (type === "hslider") return new _HSlider__WEBPACK_IMPORTED_MODULE_1__["default"](props);
|
|
1074
1095
|
if (type === "vslider") return new _VSlider__WEBPACK_IMPORTED_MODULE_2__["default"](props);
|
|
1075
1096
|
if (type === "hbargraph") return new _HBargraph__WEBPACK_IMPORTED_MODULE_12__["default"](props);
|
|
@@ -2082,8 +2103,10 @@ class Radio extends _AbstractItem__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
2082
2103
|
}
|
|
2083
2104
|
};
|
|
2084
2105
|
this.setStyle = () => {
|
|
2085
|
-
const { height, width, grid, fontsize, textcolor, bgcolor, bordercolor } = this.state.style;
|
|
2086
|
-
const
|
|
2106
|
+
const { height, width, grid, fontsize, textcolor, bgcolor, bordercolor, direction } = this.state.style;
|
|
2107
|
+
const horizontal = direction === "horizontal";
|
|
2108
|
+
const fontSize = horizontal ? Math.min(height * grid * 0.25, width * grid * 0.1) : Math.min(height * grid * 0.1, width * grid * 0.1);
|
|
2109
|
+
this.group.classList.toggle("faust-ui-component-radio-group-horizontal", horizontal);
|
|
2087
2110
|
this.group.style.backgroundColor = bgcolor;
|
|
2088
2111
|
this.group.style.borderColor = bordercolor;
|
|
2089
2112
|
this.group.style.color = textcolor;
|
|
@@ -2100,7 +2123,8 @@ class Radio extends _AbstractItem__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
|
2100
2123
|
bgcolor: "rgba(255, 255, 255, 0.25)",
|
|
2101
2124
|
bordercolor: "rgba(80, 80, 80, 0)",
|
|
2102
2125
|
labelcolor: "rgba(226, 222, 255, 0.5)",
|
|
2103
|
-
textcolor: "rgba(18, 18, 18, 1)"
|
|
2126
|
+
textcolor: "rgba(18, 18, 18, 1)",
|
|
2127
|
+
direction: "vertical"
|
|
2104
2128
|
})
|
|
2105
2129
|
});
|
|
2106
2130
|
}
|
|
@@ -2683,8 +2707,21 @@ const iNormLog = (vIn, min, max) => {
|
|
|
2683
2707
|
const normalized = normalize(vLog, logMin, logMax);
|
|
2684
2708
|
return denormalize(normalized, min, max);
|
|
2685
2709
|
};
|
|
2686
|
-
const
|
|
2687
|
-
const
|
|
2710
|
+
const cappedExp = (x) => Math.min(Number.MAX_VALUE, Math.exp(x));
|
|
2711
|
+
const normExp = (x, min, max) => {
|
|
2712
|
+
const eMin = cappedExp(min);
|
|
2713
|
+
const eMax = cappedExp(max);
|
|
2714
|
+
if (!(eMax > eMin)) return Math.max(min, Math.min(max, x));
|
|
2715
|
+
const v = Math.log(denormalize(normalize(x, min, max), eMin, eMax));
|
|
2716
|
+
return Math.max(min, Math.min(max, v));
|
|
2717
|
+
};
|
|
2718
|
+
const iNormExp = (vIn, min, max) => {
|
|
2719
|
+
const eMin = cappedExp(min);
|
|
2720
|
+
const eMax = cappedExp(max);
|
|
2721
|
+
const v = Math.max(min, Math.min(max, vIn));
|
|
2722
|
+
if (!(eMax > eMin)) return v;
|
|
2723
|
+
return denormalize(normalize(cappedExp(v), eMin, eMax), min, max);
|
|
2724
|
+
};
|
|
2688
2725
|
const roundedRect = (ctx, x, y, width, height, radius) => {
|
|
2689
2726
|
const radii = [0, 0, 0, 0];
|
|
2690
2727
|
if (typeof radius === "number") radii.fill(radius);
|
|
@@ -3333,13 +3370,23 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3333
3370
|
class Radio extends _AbstractInputItem__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
3334
3371
|
constructor() {
|
|
3335
3372
|
super(...arguments);
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3373
|
+
/**
|
|
3374
|
+
* A radio menu takes the orientation of its slider, as the Faust manual
|
|
3375
|
+
* states: an `hslider` lays its buttons out in a row, one grid unit per
|
|
3376
|
+
* entry, a `vslider` or an `nentry` in a column.
|
|
3377
|
+
*/
|
|
3378
|
+
this.layout = this.type === "hslider" ? { type: "radio", width: Math.max(2, Radio.countEntries(this.meta)), height: 1, sizing: "horizontal" } : { type: "radio", width: 2, height: 2, sizing: "both" };
|
|
3379
|
+
}
|
|
3380
|
+
/**
|
|
3381
|
+
* Number of entries in the `radio{...}` style meta.
|
|
3382
|
+
*/
|
|
3383
|
+
static countEntries(meta = []) {
|
|
3384
|
+
var _a;
|
|
3385
|
+
const style = ((_a = meta.find((m) => {
|
|
3386
|
+
var _a2;
|
|
3387
|
+
return (_a2 = m.style) == null ? void 0 : _a2.startsWith("radio");
|
|
3388
|
+
})) == null ? void 0 : _a.style) || "";
|
|
3389
|
+
return (style.match(/'[^']*'\s*:/g) || []).length;
|
|
3343
3390
|
}
|
|
3344
3391
|
}
|
|
3345
3392
|
|