@antimatter-audio/antimatter-ui 5.11.0 → 5.11.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/index.js CHANGED
@@ -2119,85 +2119,30 @@ function _unsupported_iterable_to_array(o, minLen) {
2119
2119
  if (n === "Map" || n === "Set") return Array.from(n);
2120
2120
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
2121
2121
  }
2122
- // // Subscribing
2123
- // const removalToken = window.__JUCE__.backend.addEventListener(eventId, (objectFromBackend) => {
2124
- // console.log(objectFromBackend.message);
2125
- // });
2126
- // // Unsubscribing
2127
- // window.__JUCE__.backend.removeEventListener(removalToken);
2128
2122
  function Oscilloscope(param) {
2129
2123
  var className = param.className, id = param.id;
2130
2124
  var _useState = _sliced_to_array(useState([]), 2), viewData = _useState[0], setViewData = _useState[1];
2131
- // const maxCycles = 3;
2132
- // const numCycles = useRef(0);
2133
- // const dataBuffer = useRef<Array<number>>(viewData);
2134
- // const prevValue = useRef<number>();
2135
- // const dataBuffer = useRef<Array<number>>([]);
2136
- // const dataBufferEnd = useRef<number>(0);
2137
- // const dataBufferTail = useRef<number>(0);
2138
- // const dataForView = useRef<Array<number>>([]);
2139
- // const viewBuffer = useRef<Array<number>>();
2140
- // start state:
2141
- // record data to the buffer
2142
- // set 'dataBufferEnd' to the current item
2143
- // if a rising edge is detected:
2144
- // increment the number of cycles
2145
- // on subsequent cycles:
2146
- // record data to the buffer
2147
- // if a new rising edge is detected:
2148
- // increment the number of cycles
2149
- // if the number of cycles is at or over the max:
2150
- // update the 'viewData' state:
2151
- //
2152
- // reset the number of cycles
2153
- //
2154
- // const setDataState = (data: any) => {
2155
- // if (dataBuffer.current[dataBuffer.current.length - 1] < 0 && data >= 0) {
2156
- // numCycles.current += 1;
2157
- // }
2158
- // dataBuffer.current[dataBuffer.current.length] = data;
2159
- // // dataBufferEnd.current += 1;
2160
- // if (numCycles.current >= maxCycles) {
2161
- // setViewData(dataBuffer.current);
2162
- // // dataBufferEnd.current = 0;
2163
- // numCycles.current = 0;
2164
- // }
2165
- // // const newDataArr =
2166
- // // Symbol.iterator in Object(data)
2167
- // // ? [...dataRef.current, ...data]
2168
- // // : [...dataRef.current, data];
2169
- // // dataRef.current = newDataArr.slice(-15);
2170
- // // setData(newDataArr);
2171
- // };
2172
2125
  useEffect(function() {
2173
2126
  //@ts-expect-error
2174
2127
  var removalToken = window.__JUCE__.backend.addEventListener('oscData', function() {
2175
- // setDataState(data);
2176
2128
  fetch(getBackendResourceAddress('oscOutput.json')).then(function(response) {
2177
2129
  return response.text();
2178
2130
  }).then(function(oscOutput) {
2179
2131
  var _JSON_parse;
2180
- // console.log(JSON.parse(oscOutput)?.oscData, 'oscData');
2181
2132
  setViewData((_JSON_parse = JSON.parse(oscOutput)) === null || _JSON_parse === void 0 ? void 0 : _JSON_parse.oscData);
2182
2133
  });
2183
- // setViewData(data);
2184
2134
  });
2185
2135
  return function() {
2186
2136
  //@ts-expect-error
2187
2137
  window.__JUCE__.backend.removeEventListener(removalToken);
2188
2138
  };
2189
2139
  }, []);
2190
- // useEffect(() => {
2191
- // {
2192
- // console.log(viewData, 'viewData');
2193
- // }
2194
- // }, [viewData]);
2195
2140
  return /*#__PURE__*/ React__default.createElement("div", {
2196
2141
  id: id,
2197
2142
  className: classnames(className, 'Oscilloscope')
2198
- }, viewData.length ? /*#__PURE__*/ React__default.createElement(LinePlot, {
2143
+ }, /*#__PURE__*/ React__default.createElement(LinePlot, {
2199
2144
  data: viewData
2200
- }) : null);
2145
+ }));
2201
2146
  }
2202
2147
 
2203
2148
  export { Button, Col, Dropdown, IndicatorLight, KeyValueDisplayScreen, Layout, Matrix, Oscilloscope, Row, Slider, Tabs, TextHeader, TextLabel };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":[],"mappings":";;;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;A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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.js","sources":["../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":[],"mappings":";;;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antimatter-audio/antimatter-ui",
3
- "version": "5.11.0",
3
+ "version": "5.11.1",
4
4
  "description": "React UI component library for Antimatter Audio.",
5
5
  "repository": {
6
6
  "type": "git",