@twick/video-editor 0.14.2 → 0.14.3

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
@@ -6816,32 +6816,53 @@ let vh$1 = class vh extends Ba {
6816
6816
  };
6817
6817
  t(vh$1, "type", "Vibrance"), t(vh$1, "defaults", { vibrance: 0 }), t(vh$1, "uniformLocations", ["uVibrance"]), tt.setClass(vh$1);
6818
6818
  const DEFAULT_TEXT_PROPS = {
6819
+ /** Font family for text elements */
6819
6820
  family: "Poppins",
6821
+ /** Font size in pixels */
6820
6822
  size: 48,
6823
+ /** Text fill color */
6821
6824
  fill: "#FFFFFF",
6825
+ /** Text stroke color */
6822
6826
  stroke: "#000000",
6827
+ /** Stroke line width */
6823
6828
  lineWidth: 0
6824
6829
  };
6825
6830
  const DEFAULT_CAPTION_PROPS = {
6831
+ /** Font family for caption elements */
6826
6832
  family: "Poppins",
6833
+ /** Font size in pixels */
6827
6834
  size: 48,
6835
+ /** Text fill color */
6828
6836
  fill: "#FFFFFF",
6837
+ /** Font weight */
6829
6838
  fontWeight: 600,
6839
+ /** Text stroke color */
6830
6840
  stroke: "#000000",
6841
+ /** Stroke line width */
6831
6842
  lineWidth: 0.2,
6843
+ /** Shadow color */
6832
6844
  shadowColor: "#000000",
6845
+ /** Shadow blur radius */
6833
6846
  shadowBlur: 2,
6847
+ /** Shadow offset [x, y] */
6834
6848
  shadowOffset: [0, 0]
6835
6849
  };
6836
6850
  const CANVAS_OPERATIONS = {
6851
+ /** An item has been selected on the canvas */
6837
6852
  ITEM_SELECTED: "ITEM_SELECTED",
6853
+ /** An item has been updated/modified on the canvas */
6838
6854
  ITEM_UPDATED: "ITEM_UPDATED"
6839
6855
  };
6840
6856
  const ELEMENT_TYPES = {
6857
+ /** Text element type */
6841
6858
  TEXT: "text",
6859
+ /** Caption element type */
6842
6860
  CAPTION: "caption",
6861
+ /** Image element type */
6843
6862
  IMAGE: "image",
6863
+ /** Video element type */
6844
6864
  VIDEO: "video",
6865
+ /** Rectangle element type */
6845
6866
  RECT: "rect"
6846
6867
  };
6847
6868
  const isBrowser$2 = typeof window !== "undefined";
@@ -6944,14 +6965,21 @@ const getCurrentFrameEffect = (item, seekTime) => {
6944
6965
  return currentFrameEffect;
6945
6966
  };
6946
6967
  const disabledControl = new Hs({
6968
+ /** X position offset */
6947
6969
  x: 0,
6970
+ /** Y position offset */
6948
6971
  y: -0.5,
6972
+ /** Additional Y offset */
6949
6973
  offsetY: 0,
6974
+ /** Cursor style when hovering */
6950
6975
  cursorStyle: "pointer",
6976
+ /** Action handler that does nothing */
6951
6977
  actionHandler: () => {
6952
6978
  return true;
6953
6979
  },
6980
+ /** Name of the action */
6954
6981
  actionName: "scale",
6982
+ /** Render function for the control */
6955
6983
  render: function(ctx, left, top) {
6956
6984
  const size = 0;
6957
6985
  ctx.save();
@@ -6962,12 +6990,19 @@ const disabledControl = new Hs({
6962
6990
  }
6963
6991
  });
6964
6992
  const rotateControl = new Hs({
6993
+ /** X position offset */
6965
6994
  x: 0,
6995
+ /** Y position offset */
6966
6996
  y: -0.5,
6997
+ /** Additional Y offset for positioning */
6967
6998
  offsetY: -25,
6999
+ /** Cursor style when hovering */
6968
7000
  cursorStyle: "crosshair",
7001
+ /** Action handler with rotation and snapping */
6969
7002
  actionHandler: Ma.rotationWithSnapping,
7003
+ /** Name of the action */
6970
7004
  actionName: "rotate",
7005
+ /** Whether to show connection line */
6971
7006
  withConnection: true
6972
7007
  });
6973
7008
  const getThumbnail = async (videoUrl, seekTime = 0.1, playbackRate = 1) => {
@@ -7908,7 +7943,7 @@ const PlayerManager = ({
7908
7943
  {
7909
7944
  className: "twick-editor-loading-overlay",
7910
7945
  style: {
7911
- opacity: playerUpdating ? 1 : 0
7946
+ display: playerUpdating ? "flex" : "none"
7912
7947
  },
7913
7948
  children: playerUpdating ? /* @__PURE__ */ jsx("div", { className: "twick-editor-loading-spinner" }) : null
7914
7949
  }
@@ -16849,61 +16884,87 @@ const INITIAL_TIMELINE_DATA = {
16849
16884
  };
16850
16885
  const MIN_DURATION = 0.1;
16851
16886
  const DRAG_TYPE = {
16887
+ /** Drag operation is starting */
16852
16888
  START: "start",
16889
+ /** Drag operation is in progress */
16853
16890
  MOVE: "move",
16891
+ /** Drag operation has ended */
16854
16892
  END: "end"
16855
16893
  };
16856
16894
  const DEFAULT_TIMELINE_ZOOM = 1.5;
16857
16895
  const DEFAULT_ELEMENT_COLORS = {
16896
+ /** Fragment element color */
16858
16897
  fragment: "#111111",
16898
+ /** Video element color - muted deep violet */
16859
16899
  video: "#4B2E83",
16860
- // Muted deep violet (primary purple tone)
16900
+ /** Caption element color - faded violet/blue */
16861
16901
  caption: "#5C5470",
16862
- // Faded violet/blue
16902
+ /** Image element color - earthy brown-orange */
16863
16903
  image: "#805A38",
16864
- // Earthy brown-orange
16904
+ /** Audio element color - dark muted teal-green */
16865
16905
  audio: "#3C665B",
16866
- // Dark muted teal-green
16906
+ /** Text element color - dusty steel blue */
16867
16907
  text: "#375A7F",
16868
- // Dusty steel blue
16908
+ /** Generic element color - muted berry purple */
16869
16909
  element: "#6B3A5B",
16870
- // Muted berry purple
16910
+ /** Rectangle element color - desaturated deep indigo */
16871
16911
  rect: "#4C3A72",
16872
- // Desaturated deep indigo
16912
+ /** Frame effect color - dusty rose/maroon */
16873
16913
  frameEffect: "#703C57",
16874
- // Dusty rose/maroon
16914
+ /** Filters color - muted twilight purple */
16875
16915
  filters: "#5A4C82",
16876
- // Muted twilight purple
16916
+ /** Transition color - toasted copper */
16877
16917
  transition: "#7A573A",
16878
- // Toasted copper
16918
+ /** Animation color - slate pine green */
16879
16919
  animation: "#32645C"
16880
- // Slate pine green
16881
16920
  };
16882
16921
  const AVAILABLE_TEXT_FONTS = {
16883
16922
  // Google Fonts
16923
+ /** Modern sans-serif font */
16884
16924
  RUBIK: "Rubik",
16925
+ /** Clean and readable font */
16885
16926
  MULISH: "Mulish",
16927
+ /** Bold display font */
16886
16928
  LUCKIEST_GUY: "Luckiest Guy",
16929
+ /** Elegant serif font */
16887
16930
  PLAYFAIR_DISPLAY: "Playfair Display",
16931
+ /** Classic sans-serif font */
16888
16932
  ROBOTO: "Roboto",
16933
+ /** Modern geometric font */
16889
16934
  POPPINS: "Poppins",
16890
16935
  // Display and Decorative Fonts
16936
+ /** Comic-style display font */
16891
16937
  BANGERS: "Bangers",
16938
+ /** Handwritten-style font */
16892
16939
  BIRTHSTONE: "Birthstone",
16940
+ /** Elegant script font */
16893
16941
  CORINTHIA: "Corinthia",
16942
+ /** Formal script font */
16894
16943
  IMPERIAL_SCRIPT: "Imperial Script",
16944
+ /** Bold outline font */
16895
16945
  KUMAR_ONE_OUTLINE: "Kumar One Outline",
16946
+ /** Light outline font */
16896
16947
  LONDRI_OUTLINE: "Londrina Outline",
16948
+ /** Casual script font */
16897
16949
  MARCK_SCRIPT: "Marck Script",
16950
+ /** Modern sans-serif font */
16898
16951
  MONTSERRAT: "Montserrat",
16952
+ /** Stylish display font */
16899
16953
  PATTAYA: "Pattaya",
16900
16954
  // CDN Fonts
16955
+ /** Unique display font */
16901
16956
  PERALTA: "Peralta",
16957
+ /** Bold impact font */
16902
16958
  IMPACT: "Impact",
16959
+ /** Handwritten-style font */
16903
16960
  LUMANOSIMO: "Lumanosimo",
16961
+ /** Custom display font */
16904
16962
  KAPAKANA: "Kapakana",
16963
+ /** Handwritten font */
16905
16964
  HANDYRUSH: "HandyRush",
16965
+ /** Decorative font */
16906
16966
  DASHER: "Dasher",
16967
+ /** Signature-style font */
16907
16968
  BRITTANY_SIGNATURE: "Brittany Signature"
16908
16969
  };
16909
16970
  let ELEMENT_COLORS = { ...DEFAULT_ELEMENT_COLORS };