@twick/studio 0.15.26 → 0.15.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.
@@ -0,0 +1,3 @@
1
+ import { PanelProps } from '../../types';
2
+
3
+ export declare function EmojiPanelContainer({ addElement, videoResolution }: PanelProps): import("react/jsx-runtime").JSX.Element;
@@ -1,46 +1,9 @@
1
- /**
2
- * CaptionsPanel Component
3
- *
4
- * A presentational panel for managing caption entries in the studio.
5
- * Renders a list of caption items, each with a text input and two actions:
6
- * Split and Delete. A single Add button appears below the list.
7
- *
8
- * State is controlled by the parent via props; this component is stateless.
9
- *
10
- * Entry shape (CaptionEntry):
11
- * - `s`: start time (seconds)
12
- * - `e`: end time (seconds)
13
- * - `t`: caption text
14
- *
15
- * Props:
16
- * - `captions`: CaptionEntry[] — ordered list of captions
17
- * - `addCaption()`: add a new caption at the end
18
- * - `splitCaption(index)`: split the caption at `index`
19
- * - `deleteCaption(index)`: remove the caption at `index`
20
- * - `updateCaption(index, caption)`: update the caption at `index`
21
- *
22
- * @component
23
- * @example
24
- * ```tsx
25
- * <CaptionsPanel
26
- * captions={captions}
27
- * addCaption={addCaption}
28
- * splitCaption={splitCaption}
29
- * deleteCaption={deleteCaption}
30
- * updateCaption={updateCaption}
31
- * />
32
- * ```
33
- */
34
- interface CaptionEntry {
35
- s: number;
36
- e: number;
37
- t: string;
38
- }
1
+ import { CaptionPanelEntry } from '../../types';
2
+
39
3
  export declare function CaptionsPanel({ captions, addCaption, splitCaption, deleteCaption, updateCaption, }: {
40
- captions: CaptionEntry[];
4
+ captions: CaptionPanelEntry[];
41
5
  addCaption: () => void;
42
- splitCaption: (index: number) => void;
6
+ splitCaption: (index: number) => void | Promise<void>;
43
7
  deleteCaption: (index: number) => void;
44
- updateCaption: (index: number, caption: CaptionEntry) => void;
8
+ updateCaption: (index: number, caption: CaptionPanelEntry) => void;
45
9
  }): import("react/jsx-runtime").JSX.Element;
46
- export {};
@@ -0,0 +1,8 @@
1
+ import { EmojiAsset } from '../../helpers/emoji-catalog';
2
+
3
+ interface EmojiPanelProps {
4
+ items: EmojiAsset[];
5
+ onItemSelect: (item: EmojiAsset) => void;
6
+ }
7
+ export declare function EmojiPanel({ items, onItemSelect }: EmojiPanelProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -16,5 +16,5 @@ interface CaptionPropPanelProps {
16
16
  /** No-op when using fixed config. Kept for API compatibility. */
17
17
  setApplyPropsToAllCaption?: (apply: boolean) => void;
18
18
  }
19
- export declare function CaptionPropPanel({ selectedElement, updateElement, }: CaptionPropPanelProps & PropertiesPanelProps): import("react/jsx-runtime").JSX.Element | null;
19
+ export declare function CaptionPropPanel({ selectedElement, updateElement, setApplyPropsToAllCaption, }: CaptionPropPanelProps & PropertiesPanelProps): import("react/jsx-runtime").JSX.Element | null;
20
20
  export default CaptionPropPanel;
@@ -0,0 +1,3 @@
1
+ import { PropertiesPanelProps } from '../../types';
2
+
3
+ export declare function ColorFilterPropsPanel({ selectedElement, updateElement, }: PropertiesPanelProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,5 +1,5 @@
1
1
  import { TrackElement, VideoElement } from '@twick/timeline';
2
- import { ICaptionGenerationPollingResponse } from '../../types';
2
+ import { CaptionPhraseLength, ICaptionGenerationPollingResponse } from '../../types';
3
3
 
4
4
  export declare function GenerateCaptionsPanel({ selectedElement, addCaptionsToTimeline, onGenerateCaptions, getCaptionstatus, pollingIntervalMs, }: {
5
5
  selectedElement: TrackElement;
@@ -7,8 +7,9 @@ export declare function GenerateCaptionsPanel({ selectedElement, addCaptionsToTi
7
7
  s: number;
8
8
  e: number;
9
9
  t: string;
10
+ w?: number[];
10
11
  }[]) => void;
11
- onGenerateCaptions: (videoElement: VideoElement, language?: string, wordsPerPhrase?: number) => Promise<string | null>;
12
+ onGenerateCaptions: (videoElement: VideoElement, language?: string, phraseLength?: CaptionPhraseLength) => Promise<string | null>;
12
13
  getCaptionstatus: (reqId: string) => Promise<ICaptionGenerationPollingResponse>;
13
14
  pollingIntervalMs?: number;
14
15
  }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ export interface EmojiAsset {
2
+ emoji: string;
3
+ label: string;
4
+ imageUrl: string;
5
+ category: EmojiCategory;
6
+ }
7
+ export type EmojiCategory = "Smileys" | "Symbols" | "Objects" | "Hands" | "Media";
8
+ export declare const EMOJI_CATEGORIES: Array<EmojiCategory | "All">;
9
+ export declare const EMOJI_CATALOG: EmojiAsset[];
@@ -1,5 +1,5 @@
1
1
  import { ProjectJSON, VideoElement } from '@twick/timeline';
2
- import { ICaptionGenerationPollingResponse, ICaptionGenerationService, CaptionEntry } from '../types';
2
+ import { CaptionEntry, CaptionPhraseLength, ICaptionGenerationPollingResponse, ICaptionGenerationService } from '../types';
3
3
 
4
4
  declare class GenerateCaptionsService implements ICaptionGenerationService {
5
5
  /**
@@ -8,13 +8,13 @@ declare class GenerateCaptionsService implements ICaptionGenerationService {
8
8
  */
9
9
  videoElement: VideoElement | null;
10
10
  projectJSON: ProjectJSON | null;
11
- generateSubtiltesApi: (videoUrl: string) => Promise<string>;
11
+ generateSubtiltesApi: (videoUrl: string, language?: string, phraseLength?: CaptionPhraseLength) => Promise<string>;
12
12
  requestStatusApi: (reqId: string) => Promise<ICaptionGenerationPollingResponse>;
13
13
  constructor({ generateSubtiltesApi, requestStatusApi, }: {
14
- generateSubtiltesApi: (videoUrl: string) => Promise<string>;
14
+ generateSubtiltesApi: (videoUrl: string, language?: string, phraseLength?: CaptionPhraseLength) => Promise<string>;
15
15
  requestStatusApi: (reqId: string) => Promise<ICaptionGenerationPollingResponse>;
16
16
  });
17
- generateCaptions(videoElement: VideoElement, projectJSON: ProjectJSON): Promise<string>;
17
+ generateCaptions(videoElement: VideoElement, projectJSON: ProjectJSON, language?: string, phraseLength?: CaptionPhraseLength): Promise<string>;
18
18
  getRequestStatus(reqId: string): Promise<ICaptionGenerationPollingResponse>;
19
19
  updateProjectWithCaptions(captions: CaptionEntry[]): ProjectJSON;
20
20
  generateCaptionVideo(videoUrl: string, videoSize?: {
@@ -1,13 +1,9 @@
1
- interface CaptionEntry {
2
- s: number;
3
- e: number;
4
- t: string;
5
- }
1
+ import { CaptionPanelEntry } from '../types';
2
+
6
3
  export declare const useCaptionsPanel: () => {
7
- captions: CaptionEntry[];
4
+ captions: CaptionPanelEntry[];
8
5
  addCaption: () => void;
9
6
  splitCaption: (index: number) => Promise<void>;
10
7
  deleteCaption: (index: number) => void;
11
- updateCaption: (index: number, caption: CaptionEntry) => void;
8
+ updateCaption: (index: number, caption: CaptionPanelEntry) => void;
12
9
  };
13
- export {};
@@ -1,8 +1,8 @@
1
1
  import { VideoElement } from '@twick/timeline';
2
- import { ICaptionGenerationPollingResponse, StudioConfig, CaptionEntry } from '../types';
2
+ import { ICaptionGenerationPollingResponse, StudioConfig, CaptionEntry, CaptionPhraseLength } from '../types';
3
3
 
4
4
  declare const useGenerateCaptions: (studioConfig?: StudioConfig) => {
5
- onGenerateCaptions: (videoElement: VideoElement, language?: string, wordsPerPhrase?: number) => Promise<string | null>;
5
+ onGenerateCaptions: (videoElement: VideoElement, language?: string, phraseLength?: CaptionPhraseLength) => Promise<string | null>;
6
6
  addCaptionsToTimeline: (captions: CaptionEntry[]) => void;
7
7
  getCaptionstatus: (reqId: string) => Promise<ICaptionGenerationPollingResponse>;
8
8
  pollingIntervalMs: number;
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ import { ImagePanel } from './components/panel/image-panel';
9
9
  import { TextPanel } from './components/panel/text-panel';
10
10
  import { CirclePanel } from './components/panel/circle-panel';
11
11
  import { RectPanel } from './components/panel/rect-panel';
12
+ import { EmojiPanel } from './components/panel/emoji-panel';
12
13
  import { CaptionsPanel } from './components/panel/captions-panel';
13
14
  import { TemplateGalleryPanel } from './components/panel/template-gallery-panel';
14
15
  import { RecordPanel } from './components/panel/record-panel';
@@ -52,7 +53,9 @@ ScriptPanel,
52
53
  /** Panel for adding circles */
53
54
  CirclePanel,
54
55
  /** Panel for adding rectangles */
55
- RectPanel, };
56
+ RectPanel,
57
+ /** Panel for adding emoji stickers */
58
+ EmojiPanel, };
56
59
  export { DEFAULT_PROJECT_TEMPLATES, };
57
60
  export { DEFAULT_STUDIO_CONFIG, EDU_STUDIO_CONFIG, DEMO_STUDIO_CONFIG, MARKETING_STUDIO_CONFIG, };
58
61
  export {
@@ -150,7 +153,7 @@ export type { TimelineProviderProps } from '@twick/timeline';
150
153
  /**
151
154
  * Timeline element classes
152
155
  */
153
- export { Track, TrackElement, TextElement, VideoElement, ImageElement, AudioElement, CircleElement, RectElement, IconElement, CaptionElement, ElementAnimation, ElementFrameEffect, ElementTextEffect } from '@twick/timeline';
156
+ export { Track, TrackElement, TextElement, VideoElement, ImageElement, AudioElement, CircleElement, RectElement, IconElement, EmojiElement, CaptionElement, ElementAnimation, ElementFrameEffect, ElementTextEffect } from '@twick/timeline';
154
157
  /**
155
158
  * Timeline visitor pattern classes for element manipulation
156
159
  */
@@ -162,7 +165,7 @@ export { generateShortUuid, getTotalDuration, getCurrentElements, isTrackId, isE
162
165
  /**
163
166
  * Timeline types
164
167
  */
165
- export type { ProjectJSON, Size, Position, Frame, ElementJSON, TrackJSON, VideoProps, AudioProps, ImageProps, TextProps, RectProps, CircleProps, IconProps, TextEffect as TimelineTextEffect, FrameEffect, FrameEffectProps, Animation as TimelineAnimation, ObjectFit, TextAlign, BaseMediaProps } from '@twick/timeline';
168
+ export type { ProjectJSON, Size, Position, Frame, ElementJSON, TrackJSON, VideoProps, AudioProps, ImageProps, TextProps, RectProps, CircleProps, IconProps, EmojiProps, TextEffect as TimelineTextEffect, FrameEffect, FrameEffectProps, Animation as TimelineAnimation, ObjectFit, TextAlign, BaseMediaProps } from '@twick/timeline';
166
169
  /**
167
170
  * Timeline constants
168
171
  */