react-modern-audio-player 1.4.0-rc.0 → 1.4.0-rc.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.
Files changed (2) hide show
  1. package/dist/index.es.js +8 -16
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -7891,20 +7891,20 @@ const useGridTemplate = (activeUI, templateArea, customComponentsArea) => {
7891
7891
  ...activeTemplatePlacementArr,
7892
7892
  ...Object.entries(customComponentsPlacement || {})
7893
7893
  ].map(([key, value]) => {
7894
- const [rowWithText, col] = value.split("-");
7895
- const row = rowWithText.split("row")[1];
7896
- maxRow = Math.max(maxRow, +row);
7897
- colsCntRecord[+row] = colsCntRecord[+row] ? colsCntRecord[+row] + 1 : 1;
7894
+ const [rowWithText, colStrNum] = value.split("-");
7895
+ const row = +rowWithText.split("row")[1];
7896
+ maxRow = Math.max(maxRow, row);
7897
+ colsCntRecord[row] = colsCntRecord[row] ? colsCntRecord[row] + 1 : 1;
7898
7898
  return {
7899
7899
  key,
7900
- row: Number(row.split("row")[1]),
7901
- col: Number(col)
7900
+ row,
7901
+ col: +colStrNum
7902
7902
  };
7903
7903
  }).sort((a, b) => a.col - b.col);
7904
7904
  const maxCol = Math.max(...Object.values(colsCntRecord));
7905
7905
  let progressColIdx;
7906
7906
  const gridAreas2 = new Array(maxRow).fill("").map((_, rowIdx) => {
7907
- var _a, _b, _c;
7907
+ var _a;
7908
7908
  let cols = "";
7909
7909
  let isWithProgress = false;
7910
7910
  const curRowPlacementArr = totalPlacementArr.filter(({ key, row }) => {
@@ -7929,16 +7929,8 @@ const useGridTemplate = (activeUI, templateArea, customComponentsArea) => {
7929
7929
  }
7930
7930
  }
7931
7931
  } else {
7932
- let extraColCnt = maxCol - curRowPlacementArr.length;
7933
- let curRowIdx = 0;
7934
7932
  for (let i = 0; i < maxCol; i++) {
7935
- if (!extraColCnt && ((_b = curRowPlacementArr[curRowIdx]) == null ? void 0 : _b.col) > i + 1) {
7936
- curRowIdx++;
7937
- cols += ` row${rowIdx + 1}-${((_c = curRowPlacementArr[curRowIdx]) == null ? void 0 : _c.col) ? curRowPlacementArr[curRowIdx].col : i + 1}`;
7938
- } else {
7939
- extraColCnt--;
7940
- cols += ` row${rowIdx + 1}-${i + 1}`;
7941
- }
7933
+ cols += ` row${rowIdx + 1}-${curRowPlacementArr[i] ? curRowPlacementArr[i].col : i + 1}`;
7942
7934
  }
7943
7935
  }
7944
7936
  return cols.trimStart();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-modern-audio-player",
3
- "version": "1.4.0-rc.0",
3
+ "version": "1.4.0-rc.1",
4
4
  "author": {
5
5
  "name": "LYH",
6
6
  "email": "slash9494@naver.com",