@linker-design-plus/timeline-track 2.1.1 → 2.1.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/README.md +2 -0
- package/dist/core/controllers/index.d.ts +1 -0
- package/dist/core/controllers/previewBackend.d.ts +1 -0
- package/dist/core/controllers/timelinePlaybackResolver.d.ts +4 -1
- package/dist/core/controllers/timelinePreviewSession.d.ts +4 -0
- package/dist/core/controllers/timelineStructureSession.d.ts +66 -0
- package/dist/core/facade/timelineManager.d.ts +19 -4
- package/dist/core/history/history.d.ts +3 -3
- package/dist/core/history/timelineHistoryExecutor.d.ts +4 -0
- package/dist/core/history/timelineHistoryRecorder.d.ts +2 -2
- package/dist/core/models/types.d.ts +15 -0
- package/dist/core/theme/colorTokens.d.ts +3 -0
- package/dist/core/tracks/trackManager.d.ts +1 -1
- package/dist/index.cjs.js +93 -93
- package/dist/index.es.js +3995 -3525
- package/dist/utils/rendering/KonvaUtils.d.ts +3 -3
- package/dist/utils/rendering/clipCoverRenderer.d.ts +2 -0
- package/dist/utils/rendering/clipVisualRenderer.d.ts +3 -3
- package/package.json +9 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Konva from 'konva';
|
|
2
|
-
import type { Theme, TrackType } from '../../core/models';
|
|
2
|
+
import type { ClipMediaStatus, Theme, TrackType } from '../../core/models';
|
|
3
3
|
/**
|
|
4
4
|
* Konva工具类,封装常用的Konva操作
|
|
5
5
|
*/
|
|
@@ -47,11 +47,11 @@ export declare class KonvaUtils {
|
|
|
47
47
|
/**
|
|
48
48
|
* 创建片段组
|
|
49
49
|
*/
|
|
50
|
-
static createClipGroup(x: number, y: number, width: number, height: number, clipName: string, duration: number, theme: Theme, isSelected?: boolean, thumbnails?: string[], videoSrc?: string, clipType?: TrackType, hasSeparatedAudio?: boolean, deferCoverRender?: boolean, audioBadgeText?: string): Konva.Group;
|
|
50
|
+
static createClipGroup(x: number, y: number, width: number, height: number, clipName: string, duration: number, theme: Theme, isSelected?: boolean, thumbnails?: string[], videoSrc?: string, clipType?: TrackType, hasSeparatedAudio?: boolean, deferCoverRender?: boolean, audioBadgeText?: string, mediaStatus?: ClipMediaStatus, mediaStatusMessage?: string | null): Konva.Group;
|
|
51
51
|
/**
|
|
52
52
|
* 更新片段组
|
|
53
53
|
*/
|
|
54
|
-
static updateClipGroup(group: Konva.Group, width: number, height: number, clipName: string, duration: number, theme?: Theme, isSelected?: boolean, thumbnails?: string[], videoSrc?: string, clipType?: TrackType, hasSeparatedAudio?: boolean, deferCoverRender?: boolean, audioBadgeText?: string): void;
|
|
54
|
+
static updateClipGroup(group: Konva.Group, width: number, height: number, clipName: string, duration: number, theme?: Theme, isSelected?: boolean, thumbnails?: string[], videoSrc?: string, clipType?: TrackType, hasSeparatedAudio?: boolean, deferCoverRender?: boolean, audioBadgeText?: string, mediaStatus?: ClipMediaStatus, mediaStatusMessage?: string | null): void;
|
|
55
55
|
/**
|
|
56
56
|
* 创建选中效果
|
|
57
57
|
*/
|
|
@@ -2,6 +2,7 @@ import Konva from 'konva';
|
|
|
2
2
|
export declare class ClipCoverRenderer {
|
|
3
3
|
static readonly MIN_IMAGE_DISPLAY_WIDTH = 24;
|
|
4
4
|
private static readonly COVER_RENDER_VERSION_KEY;
|
|
5
|
+
private static readonly COVER_SOURCE_KEY;
|
|
5
6
|
private static readonly MAX_CACHE_SIZE;
|
|
6
7
|
private static readonly DEFAULT_DIMENSIONS;
|
|
7
8
|
private static keyframeDimensionsCache;
|
|
@@ -25,4 +26,5 @@ export declare class ClipCoverRenderer {
|
|
|
25
26
|
private static bindCoverImageLifecycle;
|
|
26
27
|
private static isImageRenderable;
|
|
27
28
|
private static listenToImageEvent;
|
|
29
|
+
private static syncCoverBackgroundState;
|
|
28
30
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Konva from 'konva';
|
|
2
|
-
import { type Theme, type TrackType } from '../../core/models';
|
|
3
|
-
export declare function createClipGroup(x: number, y: number, width: number, height: number, clipName: string, duration: number, theme: Theme, isSelected?: boolean, thumbnails?: string[], videoSrc?: string, clipType?: TrackType, hasSeparatedAudio?: boolean, deferCoverRender?: boolean, audioBadgeText?: string): Konva.Group;
|
|
4
|
-
export declare function updateClipGroup(group: Konva.Group, width: number, height: number, clipName: string, duration: number, theme?: Theme, isSelected?: boolean, thumbnails?: string[], videoSrc?: string, clipType?: TrackType, hasSeparatedAudio?: boolean, deferCoverRender?: boolean, audioBadgeText?: string): void;
|
|
2
|
+
import { type ClipMediaStatus, type Theme, type TrackType } from '../../core/models';
|
|
3
|
+
export declare function createClipGroup(x: number, y: number, width: number, height: number, clipName: string, duration: number, theme: Theme, isSelected?: boolean, thumbnails?: string[], videoSrc?: string, clipType?: TrackType, hasSeparatedAudio?: boolean, deferCoverRender?: boolean, audioBadgeText?: string, mediaStatus?: ClipMediaStatus, mediaStatusMessage?: string | null): Konva.Group;
|
|
4
|
+
export declare function updateClipGroup(group: Konva.Group, width: number, height: number, clipName: string, duration: number, theme?: Theme, isSelected?: boolean, thumbnails?: string[], videoSrc?: string, clipType?: TrackType, hasSeparatedAudio?: boolean, deferCoverRender?: boolean, audioBadgeText?: string, mediaStatus?: ClipMediaStatus, mediaStatusMessage?: string | null): void;
|
|
5
5
|
export declare function createSelectionEffect(x: number, y: number, width: number, height: number): Konva.Rect;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linker-design-plus/timeline-track",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "A TypeScript-based video editing library with timeline and track functionality",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -15,11 +15,19 @@
|
|
|
15
15
|
"dev": "vite",
|
|
16
16
|
"build": "vite build && tsc -p tsconfig.build.json",
|
|
17
17
|
"build:types": "tsc -p tsconfig.build.json",
|
|
18
|
+
"harness:install": "playwright install chromium",
|
|
19
|
+
"harness:test": "playwright test",
|
|
20
|
+
"harness:test:headed": "playwright test --headed",
|
|
21
|
+
"harness:test:dev": "PLAYWRIGHT_BASE_URL=http://127.0.0.1:5173 playwright test",
|
|
22
|
+
"harness:test:dev:headed": "PLAYWRIGHT_BASE_URL=http://127.0.0.1:5173 playwright test --headed",
|
|
23
|
+
"harness:test:isolated": "env -u PLAYWRIGHT_BASE_URL playwright test",
|
|
24
|
+
"harness:test:isolated:headed": "env -u PLAYWRIGHT_BASE_URL playwright test --headed",
|
|
18
25
|
"preview": "vite preview",
|
|
19
26
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
20
27
|
"test": "vitest run"
|
|
21
28
|
},
|
|
22
29
|
"devDependencies": {
|
|
30
|
+
"@playwright/test": "^1.60.0",
|
|
23
31
|
"@vitejs/plugin-vue": "^5.0.0",
|
|
24
32
|
"jsdom": "^29.0.1",
|
|
25
33
|
"typescript": "^5.3.0",
|