@twick/video-editor 0.15.24 → 0.15.26

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.
@@ -112,16 +112,8 @@ export declare const AVAILABLE_TEXT_FONTS: {
112
112
  readonly PATTAYA: "Pattaya";
113
113
  /** Unique display font */
114
114
  readonly PERALTA: "Peralta";
115
- /** Bold impact font */
116
- readonly IMPACT: "Impact";
117
115
  /** Handwritten-style font */
118
116
  readonly LUMANOSIMO: "Lumanosimo";
119
117
  /** Custom display font */
120
118
  readonly KAPAKANA: "Kapakana";
121
- /** Handwritten font */
122
- readonly HANDYRUSH: "HandyRush";
123
- /** Decorative font */
124
- readonly DASHER: "Dasher";
125
- /** Signature-style font */
126
- readonly BRITTANY_SIGNATURE: "Brittany Signature";
127
119
  };
package/dist/index.js CHANGED
@@ -6865,8 +6865,6 @@ const DEFAULT_CAPTION_PROPS = {
6865
6865
  fill: "#FFFFFF",
6866
6866
  /** Font weight */
6867
6867
  fontWeight: 600,
6868
- /** Text stroke color */
6869
- stroke: "#000000",
6870
6868
  /** Stroke line width */
6871
6869
  lineWidth: 0.2,
6872
6870
  /** Shadow color */
@@ -7594,7 +7592,7 @@ const addTextElement = ({
7594
7592
  splitByGrapheme: false,
7595
7593
  textAlign: ((_q = element.props) == null ? void 0 : _q.textAlign) || "center",
7596
7594
  stroke: ((_r2 = element.props) == null ? void 0 : _r2.stroke) || DEFAULT_TEXT_PROPS.stroke,
7597
- strokeWidth: ((_s2 = element.props) == null ? void 0 : _s2.lineWidth) || DEFAULT_TEXT_PROPS.lineWidth,
7595
+ strokeWidth: (((_s2 = element.props) == null ? void 0 : _s2.lineWidth) || DEFAULT_TEXT_PROPS.lineWidth) * 0.025,
7598
7596
  ...backgroundColor && { backgroundColor },
7599
7597
  shadow: ((_t2 = element.props) == null ? void 0 : _t2.shadowColor) ? new Ds({
7600
7598
  offsetX: ((_v = (_u = element.props) == null ? void 0 : _u.shadowOffset) == null ? void 0 : _v.length) && ((_x = (_w = element.props) == null ? void 0 : _w.shadowOffset) == null ? void 0 : _x.length) > 1 ? element.props.shadowOffset[0] / 2 : 1,
@@ -7666,19 +7664,23 @@ const addCaptionElement = ({
7666
7664
  }
7667
7665
  const elementColors = (_g = element.props) == null ? void 0 : _g.colors;
7668
7666
  const resolvedFill = (applyToAll ? captionTextColor : ((_h2 = element.props) == null ? void 0 : _h2.fill) ?? (elementColors == null ? void 0 : elementColors.text) ?? captionTextColor) ?? DEFAULT_CAPTION_PROPS.fill;
7669
- const caption = new Uo(((_i2 = element.props) == null ? void 0 : _i2.text) || element.t || "", {
7667
+ const trackColors = captionProps == null ? void 0 : captionProps.colors;
7668
+ const trackStroke = trackColors == null ? void 0 : trackColors.outlineColor;
7669
+ const elementStroke = (elementColors == null ? void 0 : elementColors.outlineColor) ?? ((_i2 = element.props) == null ? void 0 : _i2.stroke);
7670
+ const resolvedStroke = (applyToAll ? trackStroke ?? elementStroke : elementStroke ?? trackStroke) ?? void 0;
7671
+ const caption = new Uo(((_j = element.props) == null ? void 0 : _j.text) || element.t || "", {
7670
7672
  left: x2,
7671
7673
  top: y2,
7672
7674
  originX: "center",
7673
7675
  originY: "center",
7674
- angle: ((_j = element.props) == null ? void 0 : _j.rotation) || 0,
7676
+ angle: ((_k = element.props) == null ? void 0 : _k.rotation) || 0,
7675
7677
  fontSize: Math.round(
7676
- ((applyToAll ? (_k = captionProps == null ? void 0 : captionProps.font) == null ? void 0 : _k.size : ((_m = (_l = element.props) == null ? void 0 : _l.font) == null ? void 0 : _m.size) ?? ((_n2 = captionProps == null ? void 0 : captionProps.font) == null ? void 0 : _n2.size)) ?? DEFAULT_CAPTION_PROPS.size) * canvasMetadata.scaleX
7678
+ ((applyToAll ? (_l = captionProps == null ? void 0 : captionProps.font) == null ? void 0 : _l.size : ((_n2 = (_m = element.props) == null ? void 0 : _m.font) == null ? void 0 : _n2.size) ?? ((_o2 = captionProps == null ? void 0 : captionProps.font) == null ? void 0 : _o2.size)) ?? DEFAULT_CAPTION_PROPS.size) * canvasMetadata.scaleX
7677
7679
  ),
7678
- fontFamily: (applyToAll ? (_o2 = captionProps == null ? void 0 : captionProps.font) == null ? void 0 : _o2.family : ((_q = (_p = element.props) == null ? void 0 : _p.font) == null ? void 0 : _q.family) ?? ((_r2 = captionProps == null ? void 0 : captionProps.font) == null ? void 0 : _r2.family)) ?? DEFAULT_CAPTION_PROPS.family,
7680
+ fontFamily: (applyToAll ? (_p = captionProps == null ? void 0 : captionProps.font) == null ? void 0 : _p.family : ((_r2 = (_q = element.props) == null ? void 0 : _q.font) == null ? void 0 : _r2.family) ?? ((_s2 = captionProps == null ? void 0 : captionProps.font) == null ? void 0 : _s2.family)) ?? DEFAULT_CAPTION_PROPS.family,
7679
7681
  fill: resolvedFill,
7680
- fontWeight: (applyToAll ? (_s2 = captionProps == null ? void 0 : captionProps.font) == null ? void 0 : _s2.weight : ((_u = (_t2 = element.props) == null ? void 0 : _t2.font) == null ? void 0 : _u.weight) ?? ((_v = captionProps == null ? void 0 : captionProps.font) == null ? void 0 : _v.weight)) ?? DEFAULT_CAPTION_PROPS.fontWeight,
7681
- stroke: (applyToAll ? captionProps == null ? void 0 : captionProps.stroke : ((_w = element.props) == null ? void 0 : _w.stroke) ?? (captionProps == null ? void 0 : captionProps.stroke)) ?? DEFAULT_CAPTION_PROPS.stroke,
7682
+ fontWeight: (applyToAll ? (_t2 = captionProps == null ? void 0 : captionProps.font) == null ? void 0 : _t2.weight : ((_v = (_u = element.props) == null ? void 0 : _u.font) == null ? void 0 : _v.weight) ?? ((_w = captionProps == null ? void 0 : captionProps.font) == null ? void 0 : _w.weight)) ?? DEFAULT_CAPTION_PROPS.fontWeight,
7683
+ ...resolvedStroke ? { stroke: resolvedStroke } : {},
7682
7684
  opacity: (applyToAll ? captionProps == null ? void 0 : captionProps.opacity : ((_x = element.props) == null ? void 0 : _x.opacity) ?? (captionProps == null ? void 0 : captionProps.opacity)) ?? 1,
7683
7685
  width,
7684
7686
  splitByGrapheme: false,
@@ -7689,7 +7691,7 @@ const addCaptionElement = ({
7689
7691
  blur: (applyToAll ? captionProps == null ? void 0 : captionProps.shadowBlur : ((_J = element.props) == null ? void 0 : _J.shadowBlur) ?? (captionProps == null ? void 0 : captionProps.shadowBlur)) ?? DEFAULT_CAPTION_PROPS.shadowBlur,
7690
7692
  color: (applyToAll ? captionProps == null ? void 0 : captionProps.shadowColor : ((_K = element.props) == null ? void 0 : _K.shadowColor) ?? (captionProps == null ? void 0 : captionProps.shadowColor)) ?? DEFAULT_CAPTION_PROPS.shadowColor
7691
7693
  }),
7692
- strokeWidth: (applyToAll ? captionProps == null ? void 0 : captionProps.lineWidth : ((_L = element.props) == null ? void 0 : _L.lineWidth) ?? (captionProps == null ? void 0 : captionProps.lineWidth)) ?? DEFAULT_CAPTION_PROPS.lineWidth
7694
+ strokeWidth: ((applyToAll ? captionProps == null ? void 0 : captionProps.lineWidth : ((_L = element.props) == null ? void 0 : _L.lineWidth) ?? (captionProps == null ? void 0 : captionProps.lineWidth)) ?? DEFAULT_CAPTION_PROPS.lineWidth) * 0.025
7693
7695
  });
7694
7696
  caption.set("id", element.id);
7695
7697
  caption.set("zIndex", index);
@@ -9188,18 +9190,10 @@ const AVAILABLE_TEXT_FONTS = {
9188
9190
  // CDN Fonts
9189
9191
  /** Unique display font */
9190
9192
  PERALTA: "Peralta",
9191
- /** Bold impact font */
9192
- IMPACT: "Impact",
9193
9193
  /** Handwritten-style font */
9194
9194
  LUMANOSIMO: "Lumanosimo",
9195
9195
  /** Custom display font */
9196
- KAPAKANA: "Kapakana",
9197
- /** Handwritten font */
9198
- HANDYRUSH: "HandyRush",
9199
- /** Decorative font */
9200
- DASHER: "Dasher",
9201
- /** Signature-style font */
9202
- BRITTANY_SIGNATURE: "Brittany Signature"
9196
+ KAPAKANA: "Kapakana"
9203
9197
  };
9204
9198
  const DEFAULT_DROP_DURATION = 5;
9205
9199
  function useTimelineDrop({