@onesy/ui-react 1.0.26 → 1.0.28

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/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license UiReact v1.0.26
1
+ /** @license UiReact v1.0.28
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/esm/utils.js CHANGED
@@ -1,7 +1,4 @@
1
1
  import { is, canvasFilterBrightness, canvasFilterContrast, canvasFilterSaturation, canvasFilterFade, canvasFilterInvert, canvasFilterOldPhoto, download, clamp, isEnvironment } from '@onesy/utils';
2
- if (isEnvironment('browser')) {
3
- window.Buffer = Buffer;
4
- }
5
2
  export function reflow(element) {
6
3
  element?.offsetHeight;
7
4
  }
@@ -1272,9 +1269,9 @@ export const audioFix = async (blob, duration) => {
1272
1269
  }
1273
1270
 
1274
1271
  // WebM duration EBML ID: 0x4489 (Segment Information -> Duration)
1275
- const durationPos = findElement("4489");
1272
+ const durationPos = findElement('4489');
1276
1273
  if (durationPos === -1) {
1277
- throw new Error("Duration element not found in the WebM file.");
1274
+ throw new Error('Duration element not found in the WebM file.');
1278
1275
  }
1279
1276
 
1280
1277
  // Encode new duration in IEEE 754 Float64 (Big Endian, 8 bytes)
@@ -1285,7 +1282,7 @@ export const audioFix = async (blob, duration) => {
1285
1282
 
1286
1283
  // Convert back to Blob
1287
1284
  const blobUpdated = new Blob([uint8Array], {
1288
- type: "video/webm"
1285
+ type: 'audio/webm'
1289
1286
  });
1290
1287
  return {
1291
1288
  blob: blobUpdated,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onesy/ui-react",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "description": "UI for React",
5
5
  "repository": "https://github.com/onesy-me/onesy.git",
6
6
  "author": "Lazar <lazareric2@gmail.com>",
package/utils.js CHANGED
@@ -2,9 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.audioFix = exports.currencies = exports.iconFontSize = exports.formats = exports.toNumber = exports.caret = exports.keyboardStyleCommands = exports.keyboardStandardCommands = exports.getOverflowParent = exports.importIframeStyles = exports.replace = exports.sanitize = exports.minMaxBetweenNumbers = exports.controlPoint = exports.line = exports.angleToCoordinates = exports.matches = exports.save = exports.print = exports.canvasOldPhoto = exports.canvasInvert = exports.canvasFade = exports.canvasSaturation = exports.canvasContrast = exports.canvasBrightness = exports.image = exports.valueBreakpoints = exports.iconSizeToFontSize = exports.staticClassName = exports.reflow = void 0;
4
4
  const utils_1 = require("@onesy/utils");
5
- if ((0, utils_1.isEnvironment)('browser')) {
6
- window.Buffer = Buffer;
7
- }
8
5
  function reflow(element) {
9
6
  element === null || element === void 0 ? void 0 : element.offsetHeight;
10
7
  }
@@ -1437,16 +1434,16 @@ const audioFix = async (blob, duration) => {
1437
1434
  return -1;
1438
1435
  }
1439
1436
  // WebM duration EBML ID: 0x4489 (Segment Information -> Duration)
1440
- const durationPos = findElement("4489");
1437
+ const durationPos = findElement('4489');
1441
1438
  if (durationPos === -1) {
1442
- throw new Error("Duration element not found in the WebM file.");
1439
+ throw new Error('Duration element not found in the WebM file.');
1443
1440
  }
1444
1441
  // Encode new duration in IEEE 754 Float64 (Big Endian, 8 bytes)
1445
1442
  const durationBytes = new Uint8Array(new Float64Array([duration]).buffer).reverse();
1446
1443
  // Overwrite duration bytes in the WebM file
1447
1444
  uint8Array.set(durationBytes, durationPos);
1448
1445
  // Convert back to Blob
1449
- const blobUpdated = new Blob([uint8Array], { type: "video/webm" });
1446
+ const blobUpdated = new Blob([uint8Array], { type: 'audio/webm' });
1450
1447
  return {
1451
1448
  blob: blobUpdated,
1452
1449
  duration