@hypit/caption-fine 0.0.0-stage → 0.1.0
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/LICENSE +26 -0
- package/README.md +154 -2
- package/dist/activation.d.ts +8 -0
- package/dist/activation.js +30 -0
- package/dist/component.d.ts +37 -0
- package/dist/component.js +34 -0
- package/dist/fragment.d.ts +4 -0
- package/dist/fragment.js +84 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +9 -0
- package/dist/joined-box.d.ts +6 -0
- package/dist/joined-box.js +114 -0
- package/dist/manifest.d.ts +854 -0
- package/dist/manifest.js +387 -0
- package/dist/recipe.d.ts +18 -0
- package/dist/recipe.js +116 -0
- package/dist/render.d.ts +8 -0
- package/dist/render.js +1043 -0
- package/dist/schedule.d.ts +12 -0
- package/dist/schedule.js +135 -0
- package/dist/spacing.d.ts +7 -0
- package/dist/spacing.js +13 -0
- package/dist/studio.d.ts +7 -0
- package/dist/studio.js +175 -0
- package/dist/style.d.ts +8 -0
- package/dist/style.js +340 -0
- package/dist/surface.d.ts +3 -0
- package/dist/surface.js +171 -0
- package/dist/types.d.ts +163 -0
- package/dist/types.js +1 -0
- package/package.json +22 -4
- package/preview/Track.png +0 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import type { CaptionTimingUnit } from "@hypit/hypit/caption";
|
|
2
|
+
import type { FontArtifactRef } from "@hypit/hypit/media";
|
|
3
|
+
export type FineCaptionGlyphPaint = {
|
|
4
|
+
readonly fill: string;
|
|
5
|
+
readonly gradient?: {
|
|
6
|
+
readonly from: string;
|
|
7
|
+
readonly to: string;
|
|
8
|
+
readonly angleDeg: number;
|
|
9
|
+
};
|
|
10
|
+
readonly opacity: number;
|
|
11
|
+
readonly stroke: {
|
|
12
|
+
readonly color: string;
|
|
13
|
+
readonly widthPx: number;
|
|
14
|
+
};
|
|
15
|
+
readonly shadow: {
|
|
16
|
+
readonly color: string;
|
|
17
|
+
readonly opacity: number;
|
|
18
|
+
readonly offsetXPx: number;
|
|
19
|
+
readonly offsetYPx: number;
|
|
20
|
+
readonly blurPx: number;
|
|
21
|
+
readonly spreadPx: number;
|
|
22
|
+
};
|
|
23
|
+
readonly longShadow: {
|
|
24
|
+
readonly color: string;
|
|
25
|
+
readonly opacity: number;
|
|
26
|
+
readonly distancePx: number;
|
|
27
|
+
readonly angleDeg: number;
|
|
28
|
+
};
|
|
29
|
+
readonly glow: {
|
|
30
|
+
readonly color: string;
|
|
31
|
+
readonly opacity: number;
|
|
32
|
+
readonly blurPx: number;
|
|
33
|
+
readonly spreadPx: number;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export type FineCaptionUnderline = {
|
|
37
|
+
readonly mode: "off" | "always";
|
|
38
|
+
readonly color: string;
|
|
39
|
+
readonly thicknessPx: number;
|
|
40
|
+
readonly offsetPx: number;
|
|
41
|
+
};
|
|
42
|
+
export type FineCaptionActiveUnderline = Omit<FineCaptionUnderline, "mode"> & {
|
|
43
|
+
readonly mode: "off" | "current" | "trail";
|
|
44
|
+
};
|
|
45
|
+
export type FineCaptionBoxPaint = {
|
|
46
|
+
readonly mode: "off" | "current" | "trail";
|
|
47
|
+
readonly continuity: "isolated" | "joined";
|
|
48
|
+
readonly background: string;
|
|
49
|
+
readonly borderColor: string;
|
|
50
|
+
readonly borderWidthPx: number;
|
|
51
|
+
readonly paddingXPx: number;
|
|
52
|
+
readonly paddingYPx: number;
|
|
53
|
+
readonly radiusPx: number;
|
|
54
|
+
readonly enter: FineCaptionOneShotMotion;
|
|
55
|
+
readonly exit: FineCaptionOneShotMotion;
|
|
56
|
+
readonly transitionFrames: number;
|
|
57
|
+
};
|
|
58
|
+
export type FineCaptionOneShotMotion = "none" | "fade" | "pop" | "scale" | "spring" | "bounce" | "elastic" | "stamp" | "tilt" | "zoom-blur" | "flip-x" | "flip-y" | "spin" | "squash" | "stretch" | "slide-left" | "slide-right" | "slide-up" | "slide-down" | "blur-in" | "wipe-left" | "wipe-right" | "wipe-up" | "wipe-down";
|
|
59
|
+
export type FineCaptionParameters = {
|
|
60
|
+
readonly stackingOrder: number;
|
|
61
|
+
readonly placement: {
|
|
62
|
+
readonly x: number;
|
|
63
|
+
readonly y: number;
|
|
64
|
+
readonly width: number;
|
|
65
|
+
readonly height?: number;
|
|
66
|
+
readonly anchorX: "left" | "center" | "right";
|
|
67
|
+
readonly anchorY: "top" | "center" | "bottom";
|
|
68
|
+
};
|
|
69
|
+
readonly layout: {
|
|
70
|
+
readonly textAlign: "left" | "center" | "right";
|
|
71
|
+
readonly blockAlign: "start" | "center" | "end";
|
|
72
|
+
readonly direction: "ltr" | "rtl";
|
|
73
|
+
readonly inlineSize: "hug" | "fixed";
|
|
74
|
+
readonly wrap: "word" | "grapheme";
|
|
75
|
+
readonly maxLines?: number;
|
|
76
|
+
readonly maxWordsPerLine?: number;
|
|
77
|
+
readonly lineHeight: number;
|
|
78
|
+
readonly letterSpacingPx: number;
|
|
79
|
+
readonly wordGapPx: number;
|
|
80
|
+
};
|
|
81
|
+
readonly typography: {
|
|
82
|
+
readonly fontSizePx: number;
|
|
83
|
+
readonly kerning: "auto" | "normal" | "none";
|
|
84
|
+
readonly variantCaps: "normal" | "small-caps" | "all-small-caps";
|
|
85
|
+
readonly textTransform: "none" | "uppercase" | "lowercase" | "capitalize";
|
|
86
|
+
readonly exactFonts: readonly FontArtifactRef[];
|
|
87
|
+
};
|
|
88
|
+
readonly basePaint: FineCaptionGlyphPaint;
|
|
89
|
+
readonly activePaint: FineCaptionGlyphPaint;
|
|
90
|
+
readonly underline: FineCaptionUnderline;
|
|
91
|
+
readonly activeUnderline: FineCaptionActiveUnderline;
|
|
92
|
+
readonly cueBox: {
|
|
93
|
+
readonly background: string;
|
|
94
|
+
readonly borderColor: string;
|
|
95
|
+
readonly borderWidthPx: number;
|
|
96
|
+
readonly paddingXPx: number;
|
|
97
|
+
readonly paddingYPx: number;
|
|
98
|
+
readonly radiusPx: number;
|
|
99
|
+
readonly shadow: {
|
|
100
|
+
readonly color: string;
|
|
101
|
+
readonly opacity: number;
|
|
102
|
+
readonly offsetXPx: number;
|
|
103
|
+
readonly offsetYPx: number;
|
|
104
|
+
readonly blurPx: number;
|
|
105
|
+
readonly spreadPx: number;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
readonly karaoke: {
|
|
109
|
+
readonly mode: "off" | "current" | "trail";
|
|
110
|
+
readonly transition: "step" | "wipe";
|
|
111
|
+
};
|
|
112
|
+
readonly activeBox: FineCaptionBoxPaint;
|
|
113
|
+
readonly motion: {
|
|
114
|
+
readonly cueEnter: FineCaptionOneShotMotion;
|
|
115
|
+
readonly cueExit: FineCaptionOneShotMotion;
|
|
116
|
+
readonly cueEnterFrames: number;
|
|
117
|
+
readonly cueExitFrames: number;
|
|
118
|
+
readonly cueEnterStartScale?: number;
|
|
119
|
+
readonly atomEnter: FineCaptionOneShotMotion;
|
|
120
|
+
readonly atomEnterFrames: number;
|
|
121
|
+
readonly atomExit: FineCaptionOneShotMotion;
|
|
122
|
+
readonly atomExitFrames: number;
|
|
123
|
+
readonly atomReveal: "all" | "on-start" | "typewriter";
|
|
124
|
+
readonly activeResponse: FineCaptionOneShotMotion;
|
|
125
|
+
readonly activeResponseFrames: number;
|
|
126
|
+
readonly activeScale: number;
|
|
127
|
+
readonly slideDistancePx: number;
|
|
128
|
+
readonly loop: "none" | "shake" | "wobble" | "glow-pulse" | "breathe" | "float" | "pulse" | "flicker";
|
|
129
|
+
readonly loopTarget: "cue" | "active-atom";
|
|
130
|
+
readonly loopPeriodFrames: number;
|
|
131
|
+
readonly loopIntensity: number;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Public rules for expanding resolved Cue time into its visible envelope.
|
|
135
|
+
* The renderer never expands a Cue on its own; the package's schedule
|
|
136
|
+
* Producer resolves these rules before rendering.
|
|
137
|
+
*/
|
|
138
|
+
readonly timing: {
|
|
139
|
+
readonly leadFrames: number;
|
|
140
|
+
readonly tailFrames: number;
|
|
141
|
+
readonly handoff: "cut" | "overlap";
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
export type FineCaptionScheduledCue = {
|
|
145
|
+
readonly cueId: string;
|
|
146
|
+
readonly visibility: readonly {
|
|
147
|
+
readonly startFrame: number;
|
|
148
|
+
readonly endFrameExclusive: number;
|
|
149
|
+
}[];
|
|
150
|
+
readonly id: string;
|
|
151
|
+
readonly styleId: string;
|
|
152
|
+
readonly timedStartFrame: number;
|
|
153
|
+
readonly timedEndFrameExclusive: number;
|
|
154
|
+
readonly visibleStartFrame: number;
|
|
155
|
+
readonly visibleEndFrameExclusive: number;
|
|
156
|
+
readonly units: readonly CaptionTimingUnit[];
|
|
157
|
+
};
|
|
158
|
+
/** Explicit presentation schedule consumed by the Fine renderer. */
|
|
159
|
+
export type FineCaptionSchedule = {
|
|
160
|
+
readonly timelineId: string;
|
|
161
|
+
readonly documentId: string;
|
|
162
|
+
readonly cues: readonly FineCaptionScheduledCue[];
|
|
163
|
+
};
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hypit/caption-fine",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./dist/index.js",
|
|
8
|
+
"./studio": "./dist/studio.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"preview",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE"
|
|
15
|
+
],
|
|
16
|
+
"hypit": {
|
|
17
|
+
"activation": "./dist/activation.js"
|
|
18
|
+
},
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"@hypit/hypit": "^0.3.0",
|
|
21
|
+
"@hypit/studio-companion": "^0.1.0"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {}
|
|
24
|
+
}
|
|
Binary file
|