@twick/studio 0.15.12 → 0.15.14

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.mjs CHANGED
@@ -114,49 +114,49 @@ const createLucideIcon = (iconName, iconNode) => {
114
114
  * This source code is licensed under the ISC license.
115
115
  * See the LICENSE file in the root directory of this source tree.
116
116
  */
117
- const __iconNode$s = [
117
+ const __iconNode$u = [
118
118
  ["rect", { width: "18", height: "14", x: "3", y: "5", rx: "2", ry: "2", key: "12ruh7" }],
119
119
  ["path", { d: "M7 15h4M15 15h2M7 11h2M13 11h4", key: "1ueiar" }]
120
120
  ];
121
- const Captions = createLucideIcon("captions", __iconNode$s);
121
+ const Captions = createLucideIcon("captions", __iconNode$u);
122
122
  /**
123
123
  * @license lucide-react v0.511.0 - ISC
124
124
  *
125
125
  * This source code is licensed under the ISC license.
126
126
  * See the LICENSE file in the root directory of this source tree.
127
127
  */
128
- const __iconNode$r = [
128
+ const __iconNode$t = [
129
129
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
130
130
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
131
131
  ];
132
- const CircleCheck = createLucideIcon("circle-check", __iconNode$r);
132
+ const CircleCheck = createLucideIcon("circle-check", __iconNode$t);
133
133
  /**
134
134
  * @license lucide-react v0.511.0 - ISC
135
135
  *
136
136
  * This source code is licensed under the ISC license.
137
137
  * See the LICENSE file in the root directory of this source tree.
138
138
  */
139
- const __iconNode$q = [
139
+ const __iconNode$s = [
140
140
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
141
141
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
142
142
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
143
143
  ];
144
- const CircleX = createLucideIcon("circle-x", __iconNode$q);
144
+ const CircleX = createLucideIcon("circle-x", __iconNode$s);
145
145
  /**
146
146
  * @license lucide-react v0.511.0 - ISC
147
147
  *
148
148
  * This source code is licensed under the ISC license.
149
149
  * See the LICENSE file in the root directory of this source tree.
150
150
  */
151
- const __iconNode$p = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
152
- const Circle = createLucideIcon("circle", __iconNode$p);
151
+ const __iconNode$r = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
152
+ const Circle = createLucideIcon("circle", __iconNode$r);
153
153
  /**
154
154
  * @license lucide-react v0.511.0 - ISC
155
155
  *
156
156
  * This source code is licensed under the ISC license.
157
157
  * See the LICENSE file in the root directory of this source tree.
158
158
  */
159
- const __iconNode$o = [
159
+ const __iconNode$q = [
160
160
  [
161
161
  "path",
162
162
  { d: "M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z", key: "1tn4o7" }
@@ -165,112 +165,132 @@ const __iconNode$o = [
165
165
  ["path", { d: "m12.4 3.4 3.1 4", key: "6hsd6n" }],
166
166
  ["path", { d: "M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z", key: "ltgou9" }]
167
167
  ];
168
- const Clapperboard = createLucideIcon("clapperboard", __iconNode$o);
168
+ const Clapperboard = createLucideIcon("clapperboard", __iconNode$q);
169
169
  /**
170
170
  * @license lucide-react v0.511.0 - ISC
171
171
  *
172
172
  * This source code is licensed under the ISC license.
173
173
  * See the LICENSE file in the root directory of this source tree.
174
174
  */
175
- const __iconNode$n = [
175
+ const __iconNode$p = [
176
176
  ["path", { d: "M12 15V3", key: "m9g1x1" }],
177
177
  ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
178
178
  ["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
179
179
  ];
180
- const Download = createLucideIcon("download", __iconNode$n);
180
+ const Download = createLucideIcon("download", __iconNode$p);
181
181
  /**
182
182
  * @license lucide-react v0.511.0 - ISC
183
183
  *
184
184
  * This source code is licensed under the ISC license.
185
185
  * See the LICENSE file in the root directory of this source tree.
186
186
  */
187
- const __iconNode$m = [
187
+ const __iconNode$o = [
188
188
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
189
189
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }]
190
190
  ];
191
- const File = createLucideIcon("file", __iconNode$m);
191
+ const File = createLucideIcon("file", __iconNode$o);
192
192
  /**
193
193
  * @license lucide-react v0.511.0 - ISC
194
194
  *
195
195
  * This source code is licensed under the ISC license.
196
196
  * See the LICENSE file in the root directory of this source tree.
197
197
  */
198
- const __iconNode$l = [
198
+ const __iconNode$n = [
199
199
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
200
200
  ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
201
201
  ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
202
202
  ];
203
- const Image = createLucideIcon("image", __iconNode$l);
203
+ const Image = createLucideIcon("image", __iconNode$n);
204
204
  /**
205
205
  * @license lucide-react v0.511.0 - ISC
206
206
  *
207
207
  * This source code is licensed under the ISC license.
208
208
  * See the LICENSE file in the root directory of this source tree.
209
209
  */
210
- const __iconNode$k = [
210
+ const __iconNode$m = [
211
211
  ["path", { d: "M6 16c5 0 7-8 12-8a4 4 0 0 1 0 8c-5 0-7-8-12-8a4 4 0 1 0 0 8", key: "18ogeb" }]
212
212
  ];
213
- const Infinity = createLucideIcon("infinity", __iconNode$k);
213
+ const Infinity = createLucideIcon("infinity", __iconNode$m);
214
214
  /**
215
215
  * @license lucide-react v0.511.0 - ISC
216
216
  *
217
217
  * This source code is licensed under the ISC license.
218
218
  * See the LICENSE file in the root directory of this source tree.
219
219
  */
220
- const __iconNode$j = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
221
- const LoaderCircle = createLucideIcon("loader-circle", __iconNode$j);
220
+ const __iconNode$l = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
221
+ const LoaderCircle = createLucideIcon("loader-circle", __iconNode$l);
222
222
  /**
223
223
  * @license lucide-react v0.511.0 - ISC
224
224
  *
225
225
  * This source code is licensed under the ISC license.
226
226
  * See the LICENSE file in the root directory of this source tree.
227
227
  */
228
- const __iconNode$i = [
228
+ const __iconNode$k = [
229
229
  ["path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z", key: "1lielz" }]
230
230
  ];
231
- const MessageSquare = createLucideIcon("message-square", __iconNode$i);
231
+ const MessageSquare = createLucideIcon("message-square", __iconNode$k);
232
232
  /**
233
233
  * @license lucide-react v0.511.0 - ISC
234
234
  *
235
235
  * This source code is licensed under the ISC license.
236
236
  * See the LICENSE file in the root directory of this source tree.
237
237
  */
238
- const __iconNode$h = [
238
+ const __iconNode$j = [
239
239
  ["path", { d: "M9 18V5l12-2v13", key: "1jmyc2" }],
240
240
  ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
241
241
  ["circle", { cx: "18", cy: "16", r: "3", key: "1hluhg" }]
242
242
  ];
243
- const Music = createLucideIcon("music", __iconNode$h);
243
+ const Music = createLucideIcon("music", __iconNode$j);
244
244
  /**
245
245
  * @license lucide-react v0.511.0 - ISC
246
246
  *
247
247
  * This source code is licensed under the ISC license.
248
248
  * See the LICENSE file in the root directory of this source tree.
249
249
  */
250
- const __iconNode$g = [
250
+ const __iconNode$i = [
251
251
  ["rect", { x: "14", y: "4", width: "4", height: "16", rx: "1", key: "zuxfzm" }],
252
252
  ["rect", { x: "6", y: "4", width: "4", height: "16", rx: "1", key: "1okwgv" }]
253
253
  ];
254
- const Pause = createLucideIcon("pause", __iconNode$g);
254
+ const Pause = createLucideIcon("pause", __iconNode$i);
255
255
  /**
256
256
  * @license lucide-react v0.511.0 - ISC
257
257
  *
258
258
  * This source code is licensed under the ISC license.
259
259
  * See the LICENSE file in the root directory of this source tree.
260
260
  */
261
- const __iconNode$f = [["polygon", { points: "6 3 20 12 6 21 6 3", key: "1oa8hb" }]];
262
- const Play = createLucideIcon("play", __iconNode$f);
261
+ const __iconNode$h = [["polygon", { points: "6 3 20 12 6 21 6 3", key: "1oa8hb" }]];
262
+ const Play = createLucideIcon("play", __iconNode$h);
263
263
  /**
264
264
  * @license lucide-react v0.511.0 - ISC
265
265
  *
266
266
  * This source code is licensed under the ISC license.
267
267
  * See the LICENSE file in the root directory of this source tree.
268
268
  */
269
- const __iconNode$e = [
269
+ const __iconNode$g = [
270
270
  ["path", { d: "M5 12h14", key: "1ays0h" }],
271
271
  ["path", { d: "M12 5v14", key: "s699le" }]
272
272
  ];
273
- const Plus = createLucideIcon("plus", __iconNode$e);
273
+ const Plus = createLucideIcon("plus", __iconNode$g);
274
+ /**
275
+ * @license lucide-react v0.511.0 - ISC
276
+ *
277
+ * This source code is licensed under the ISC license.
278
+ * See the LICENSE file in the root directory of this source tree.
279
+ */
280
+ const __iconNode$f = [
281
+ ["rect", { width: "20", height: "12", x: "2", y: "6", rx: "2", key: "9lu3g6" }]
282
+ ];
283
+ const RectangleHorizontal = createLucideIcon("rectangle-horizontal", __iconNode$f);
284
+ /**
285
+ * @license lucide-react v0.511.0 - ISC
286
+ *
287
+ * This source code is licensed under the ISC license.
288
+ * See the LICENSE file in the root directory of this source tree.
289
+ */
290
+ const __iconNode$e = [
291
+ ["rect", { width: "12", height: "20", x: "6", y: "2", rx: "2", key: "1oxtiu" }]
292
+ ];
293
+ const RectangleVertical = createLucideIcon("rectangle-vertical", __iconNode$e);
274
294
  /**
275
295
  * @license lucide-react v0.511.0 - ISC
276
296
  *
@@ -567,6 +587,15 @@ const StudioHeader = ({
567
587
  setOrientation(orientation2);
568
588
  }
569
589
  }, []);
590
+ const handleOrientationChange = (nextOrientation) => {
591
+ if (nextOrientation === orientation) return;
592
+ const confirmMessage = "Changing orientation will create a new project with the new resolution. Do you want to continue?";
593
+ if (!window.confirm(confirmMessage)) {
594
+ return;
595
+ }
596
+ onNewProject();
597
+ setOrientation(nextOrientation);
598
+ };
570
599
  useEffect(() => {
571
600
  if (orientation === "horizontal") {
572
601
  localStorage.setItem("orientation", "horizontal");
@@ -577,10 +606,31 @@ const StudioHeader = ({
577
606
  }
578
607
  }, [orientation]);
579
608
  return /* @__PURE__ */ jsxs("header", { className: "header", children: [
580
- /* @__PURE__ */ jsx("div", { className: "flex-container", children: /* @__PURE__ */ jsxs("div", { className: "flex-container", children: [
609
+ /* @__PURE__ */ jsxs("div", { className: "flex-container", children: [
581
610
  /* @__PURE__ */ jsx(Clapperboard, { className: "icon-lg accent-purple" }),
582
611
  /* @__PURE__ */ jsx("h1", { className: "text-gradient", children: "Twick Studio" })
583
- ] }) }),
612
+ ] }),
613
+ /* @__PURE__ */ jsxs("div", { className: "flex-container", style: { gap: "0.5rem" }, children: [
614
+ /* @__PURE__ */ jsx("span", { className: "text-sm opacity-80", children: "Orientation" }),
615
+ /* @__PURE__ */ jsx(
616
+ "button",
617
+ {
618
+ className: `btn-ghost ${orientation === "vertical" ? "btn-primary" : ""}`,
619
+ title: "Portrait (720×1280)",
620
+ onClick: () => handleOrientationChange("vertical"),
621
+ children: /* @__PURE__ */ jsx(RectangleVertical, { className: "icon-sm" })
622
+ }
623
+ ),
624
+ /* @__PURE__ */ jsx(
625
+ "button",
626
+ {
627
+ className: `btn-ghost ${orientation === "horizontal" ? "btn-primary" : ""}`,
628
+ title: "Landscape (1280×720)",
629
+ onClick: () => handleOrientationChange("horizontal"),
630
+ children: /* @__PURE__ */ jsx(RectangleHorizontal, { className: "icon-sm" })
631
+ }
632
+ )
633
+ ] }),
584
634
  /* @__PURE__ */ jsxs("div", { className: "flex-container", children: [
585
635
  /* @__PURE__ */ jsxs(
586
636
  "button",
@@ -1477,6 +1527,9 @@ function TextPanel({
1477
1527
  applyShadow,
1478
1528
  shadowColor,
1479
1529
  strokeWidth,
1530
+ applyBackground,
1531
+ backgroundColor,
1532
+ backgroundOpacity,
1480
1533
  fonts,
1481
1534
  operation,
1482
1535
  setTextContent,
@@ -1489,6 +1542,9 @@ function TextPanel({
1489
1542
  setApplyShadow,
1490
1543
  setShadowColor,
1491
1544
  setStrokeWidth,
1545
+ setApplyBackground,
1546
+ setBackgroundColor,
1547
+ setBackgroundOpacity,
1492
1548
  handleApplyChanges
1493
1549
  }) {
1494
1550
  return /* @__PURE__ */ jsxs("div", { className: "panel-container", children: [
@@ -1657,6 +1713,69 @@ function TextPanel({
1657
1713
  /* @__PURE__ */ jsx("span", { className: "slider-value", children: strokeWidth })
1658
1714
  ] })
1659
1715
  ] }),
1716
+ /* @__PURE__ */ jsxs("div", { className: "panel-section", children: [
1717
+ /* @__PURE__ */ jsx("label", { className: "label-dark", children: "Background" }),
1718
+ /* @__PURE__ */ jsxs("div", { className: "color-section", children: [
1719
+ /* @__PURE__ */ jsx("div", { className: "checkbox-control", children: /* @__PURE__ */ jsxs("label", { className: "checkbox-label", children: [
1720
+ /* @__PURE__ */ jsx(
1721
+ "input",
1722
+ {
1723
+ type: "checkbox",
1724
+ checked: applyBackground,
1725
+ onChange: (e) => setApplyBackground(e.target.checked),
1726
+ className: "checkbox-purple"
1727
+ }
1728
+ ),
1729
+ "Apply Background"
1730
+ ] }) }),
1731
+ applyBackground && /* @__PURE__ */ jsxs(Fragment, { children: [
1732
+ /* @__PURE__ */ jsxs("div", { className: "color-control", children: [
1733
+ /* @__PURE__ */ jsx("label", { className: "label-small", children: "Background Color" }),
1734
+ /* @__PURE__ */ jsxs("div", { className: "color-inputs", children: [
1735
+ /* @__PURE__ */ jsx(
1736
+ "input",
1737
+ {
1738
+ type: "color",
1739
+ value: backgroundColor,
1740
+ onChange: (e) => setBackgroundColor(e.target.value),
1741
+ className: "color-picker"
1742
+ }
1743
+ ),
1744
+ /* @__PURE__ */ jsx(
1745
+ "input",
1746
+ {
1747
+ type: "text",
1748
+ value: backgroundColor,
1749
+ onChange: (e) => setBackgroundColor(e.target.value),
1750
+ className: "color-text"
1751
+ }
1752
+ )
1753
+ ] })
1754
+ ] }),
1755
+ /* @__PURE__ */ jsxs("div", { className: "panel-section", children: [
1756
+ /* @__PURE__ */ jsx("label", { className: "label-small", children: "Background Opacity" }),
1757
+ /* @__PURE__ */ jsxs("div", { className: "slider-container", children: [
1758
+ /* @__PURE__ */ jsx(
1759
+ "input",
1760
+ {
1761
+ type: "range",
1762
+ min: "0",
1763
+ max: "1",
1764
+ step: 0.1,
1765
+ value: backgroundOpacity,
1766
+ onChange: (e) => setBackgroundOpacity(Number(e.target.value)),
1767
+ className: "slider-purple"
1768
+ }
1769
+ ),
1770
+ /* @__PURE__ */ jsxs("span", { className: "slider-value", children: [
1771
+ Math.round(backgroundOpacity * 100),
1772
+ "%"
1773
+ ] })
1774
+ ] })
1775
+ ] })
1776
+ ] })
1777
+ ] })
1778
+ ] }),
1660
1779
  /* @__PURE__ */ jsx("div", { className: "flex panel-section", children: /* @__PURE__ */ jsx("button", { onClick: handleApplyChanges, className: "btn-primary w-full", children: operation }) })
1661
1780
  ] });
1662
1781
  }
@@ -1691,6 +1810,9 @@ const useTextPanel = ({
1691
1810
  const [applyShadow, setApplyShadow] = useState(DEFAULT_TEXT_PROPS.applyShadow);
1692
1811
  const [shadowColor, setShadowColor] = useState(DEFAULT_TEXT_PROPS.shadowColor);
1693
1812
  const [strokeWidth, setStrokeWidth] = useState(DEFAULT_TEXT_PROPS.strokeWidth);
1813
+ const [applyBackground, setApplyBackground] = useState(false);
1814
+ const [backgroundColor, setBackgroundColor] = useState("#FACC15");
1815
+ const [backgroundOpacity, setBackgroundOpacity] = useState(1);
1694
1816
  const fonts = Object.values(AVAILABLE_TEXT_FONTS);
1695
1817
  const handleApplyChanges = async () => {
1696
1818
  let textElement;
@@ -1705,35 +1827,41 @@ const useTextPanel = ({
1705
1827
  textElement.setStrokeColor(strokeColor);
1706
1828
  textElement.setLineWidth(strokeWidth);
1707
1829
  textElement.setTextAlign(DEFAULT_TEXT_PROPS.textAlign);
1830
+ const nextProps = { ...textElement.getProps() };
1708
1831
  if (applyShadow) {
1709
- textElement.setProps({
1710
- ...textElement.getProps(),
1711
- shadowColor,
1712
- shadowOffset: DEFAULT_TEXT_PROPS.shadowOffset,
1713
- shadowBlur: DEFAULT_TEXT_PROPS.shadowBlur,
1714
- shadowOpacity: DEFAULT_TEXT_PROPS.shadowOpacity
1715
- });
1832
+ nextProps.shadowColor = shadowColor;
1833
+ nextProps.shadowOffset = DEFAULT_TEXT_PROPS.shadowOffset;
1834
+ nextProps.shadowBlur = DEFAULT_TEXT_PROPS.shadowBlur;
1835
+ nextProps.shadowOpacity = DEFAULT_TEXT_PROPS.shadowOpacity;
1716
1836
  } else {
1717
- textElement.setProps({
1718
- ...textElement.getProps(),
1719
- shadowColor: void 0,
1720
- shadowOffset: void 0,
1721
- shadowBlur: void 0,
1722
- shadowOpacity: void 0
1723
- });
1837
+ nextProps.shadowColor = void 0;
1838
+ nextProps.shadowOffset = void 0;
1839
+ nextProps.shadowBlur = void 0;
1840
+ nextProps.shadowOpacity = void 0;
1841
+ }
1842
+ if (applyBackground) {
1843
+ nextProps.backgroundColor = backgroundColor;
1844
+ nextProps.backgroundOpacity = backgroundOpacity;
1845
+ } else {
1846
+ nextProps.backgroundColor = void 0;
1847
+ nextProps.backgroundOpacity = void 0;
1724
1848
  }
1849
+ textElement.setProps(nextProps);
1725
1850
  updateElement(textElement);
1726
1851
  } else {
1727
1852
  textElement = new TextElement(textContent).setFontSize(fontSize).setFontFamily(selectedFont).setFontWeight(isBold ? 700 : 400).setFontStyle(isItalic ? "italic" : "normal").setFill(textColor).setStrokeColor(strokeColor).setLineWidth(strokeWidth).setTextAlign("center");
1853
+ const nextProps = { ...textElement.getProps() };
1728
1854
  if (applyShadow) {
1729
- textElement.setProps({
1730
- ...textElement.getProps(),
1731
- shadowColor,
1732
- shadowOffset: DEFAULT_TEXT_PROPS.shadowOffset,
1733
- shadowBlur: DEFAULT_TEXT_PROPS.shadowBlur,
1734
- shadowOpacity: DEFAULT_TEXT_PROPS.shadowOpacity
1735
- });
1855
+ nextProps.shadowColor = shadowColor;
1856
+ nextProps.shadowOffset = DEFAULT_TEXT_PROPS.shadowOffset;
1857
+ nextProps.shadowBlur = DEFAULT_TEXT_PROPS.shadowBlur;
1858
+ nextProps.shadowOpacity = DEFAULT_TEXT_PROPS.shadowOpacity;
1859
+ }
1860
+ if (applyBackground) {
1861
+ nextProps.backgroundColor = backgroundColor;
1862
+ nextProps.backgroundOpacity = backgroundOpacity;
1736
1863
  }
1864
+ textElement.setProps(nextProps);
1737
1865
  await addElement(textElement);
1738
1866
  }
1739
1867
  };
@@ -1753,6 +1881,12 @@ const useTextPanel = ({
1753
1881
  if (hasShadow) {
1754
1882
  setShadowColor(textProps.shadowColor ?? DEFAULT_TEXT_PROPS.shadowColor);
1755
1883
  }
1884
+ const hasBackground = textProps.backgroundColor != null && textProps.backgroundColor !== "";
1885
+ setApplyBackground(hasBackground);
1886
+ if (hasBackground) {
1887
+ setBackgroundColor(textProps.backgroundColor ?? "#FACC15");
1888
+ setBackgroundOpacity(textProps.backgroundOpacity ?? 1);
1889
+ }
1756
1890
  } else {
1757
1891
  setTextContent(DEFAULT_TEXT_PROPS.text);
1758
1892
  setFontSize(DEFAULT_TEXT_PROPS.fontSize);
@@ -1764,6 +1898,9 @@ const useTextPanel = ({
1764
1898
  setStrokeWidth(DEFAULT_TEXT_PROPS.strokeWidth);
1765
1899
  setApplyShadow(DEFAULT_TEXT_PROPS.applyShadow);
1766
1900
  setShadowColor(DEFAULT_TEXT_PROPS.shadowColor);
1901
+ setApplyBackground(false);
1902
+ setBackgroundColor("#FACC15");
1903
+ setBackgroundOpacity(1);
1767
1904
  }
1768
1905
  }, [selectedElement]);
1769
1906
  return {
@@ -1789,6 +1926,12 @@ const useTextPanel = ({
1789
1926
  setApplyShadow,
1790
1927
  setShadowColor,
1791
1928
  setStrokeWidth,
1929
+ applyBackground,
1930
+ backgroundColor,
1931
+ backgroundOpacity,
1932
+ setApplyBackground,
1933
+ setBackgroundColor,
1934
+ setBackgroundOpacity,
1792
1935
  handleApplyChanges
1793
1936
  };
1794
1937
  };
@@ -2499,7 +2642,7 @@ const useSubtitlesPanel = () => {
2499
2642
  const subtitlesTrack = useRef(null);
2500
2643
  const { editor } = useTimelineContext();
2501
2644
  const fetchSubtitles = async () => {
2502
- const editorSubtitlesTrack = editor.getSubtiltesTrack();
2645
+ const editorSubtitlesTrack = editor.getSubtitlesTrack();
2503
2646
  if (editorSubtitlesTrack) {
2504
2647
  subtitlesTrack.current = editorSubtitlesTrack;
2505
2648
  setSubtitles(
@@ -3526,7 +3669,7 @@ function PropertiesPanelContainer({
3526
3669
  ] });
3527
3670
  }
3528
3671
  const useStudioOperation = (studioConfig) => {
3529
- const { editor, present } = useTimelineContext();
3672
+ const { editor, present, videoResolution } = useTimelineContext();
3530
3673
  const { setSeekTime, setPlayerState } = useLivePlayerContext();
3531
3674
  const [projectName, setProjectName] = useState("");
3532
3675
  const onNewProject = () => {
@@ -3574,14 +3717,13 @@ const useStudioOperation = (studioConfig) => {
3574
3717
  }
3575
3718
  };
3576
3719
  const onExportVideo = async () => {
3577
- var _a, _b;
3578
3720
  if ((studioConfig == null ? void 0 : studioConfig.exportVideo) && present) {
3579
3721
  await studioConfig.exportVideo(present, {
3580
3722
  outFile: "output.mp4",
3581
3723
  fps: 30,
3582
3724
  resolution: {
3583
- width: (_a = studioConfig.videoProps) == null ? void 0 : _a.width,
3584
- height: (_b = studioConfig.videoProps) == null ? void 0 : _b.height
3725
+ width: videoResolution.width,
3726
+ height: videoResolution.height
3585
3727
  }
3586
3728
  });
3587
3729
  } else {