@zync/zync-screnplay-player 0.1.246 → 0.1.248
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/bundle.js +1 -1
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabColdOpenVisual.js +3 -6
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabConversationSpine.js +3 -6
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabDocumentaryInset.js +3 -6
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabRackFocus.js +3 -6
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabSplit.js +2 -3
- package/dist/screenplay/RemotionRenderer/components/layouts/CreatorCollabStudioSet.js +3 -6
- package/dist/screenplay/RemotionRenderer/components/layouts/DynamicTriangle.js +2 -3
- package/dist/screenplay/RemotionRenderer/components/layouts/HookVideo.js +2 -3
- package/dist/screenplay/RemotionRenderer/components/layouts/IntroVideo.js +2 -3
- package/dist/screenplay/RemotionRenderer/components/layouts/KeyPointOverlayDepth.js +2 -3
- package/dist/screenplay/RemotionRenderer/components/layouts/Keyword.js +2 -3
- package/dist/screenplay/RemotionRenderer/components/layouts/KeywordStudioBackdrop.js +2 -3
- package/dist/screenplay/RemotionRenderer/components/layouts/MotionStill.js +2 -3
- package/dist/screenplay/RemotionRenderer/components/layouts/TextWithVideo.js +2 -3
- package/dist/screenplay/RemotionRenderer/fontRegistry.js +423 -0
- package/dist/screenplay/RemotionRenderer/registeredComponents.js +2 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/bigbold/BigBoldNameTag.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/bigbold/BigBoldSentence.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/bigbold/BigBoldTitle.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/boxwipe/Nametag.js +2 -6
- package/dist/screenplay/RemotionRenderer/theme/themes/centerline/Nametag.js +2 -6
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionBold.js +80 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionColor.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionColorInverse.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionColorShadow.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionElegant.js +3 -6
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionEmphasis.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionPunctuated.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionWordBoom.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionWordBubble.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionWordPopup.js +3 -6
- package/dist/screenplay/RemotionRenderer/theme/themes/default/DefaultCaption.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/default/HandoffNametag.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Nametag.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Sentence.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Title.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/fullcover/TextFullCover.js +2 -6
- package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/Nametag.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/Sentence.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/Title.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/GlitchNametag.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/GlitchSentence.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/GlitchTitle.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/PushPullNametag.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/PushPullSentence.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/PushPullTitle.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/rightslide/Nametag.js +2 -6
- package/dist/screenplay/RemotionRenderer/theme/themes/sports/Nametag.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/sports/SportsCaption.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/sports/SportsSentence.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/sports/Title.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/sportsbounce/Nametag.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/sportsbounce/SportsBounceSentence.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/sportsbounce/Title.js +2 -3
- package/dist/screenplay/RemotionRenderer/theme/themes/stackfill/Nametag.js +2 -6
- package/dist/screenplay/RemotionRenderer/tracks/DynamicVideoComposition.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
4
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
5
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
6
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
7
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
9
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
10
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
11
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
18
|
+
import { getInfo as getCherryBombOneInfo, loadFont as loadCherryBombOneFont } from "@remotion/google-fonts/CherryBombOne";
|
|
19
|
+
import { getInfo as getKanitInfo, loadFont as loadKanitFont } from "@remotion/google-fonts/Kanit";
|
|
20
|
+
import { getInfo as getMontserratInfo, loadFont as loadMontserratFont } from "@remotion/google-fonts/Montserrat";
|
|
21
|
+
import { getInfo as getOswaldInfo, loadFont as loadOswaldFont } from "@remotion/google-fonts/Oswald";
|
|
22
|
+
import { getInfo as getPoppinsInfo, loadFont as loadPoppinsFont } from "@remotion/google-fonts/Poppins";
|
|
23
|
+
import { getInfo as getRobotoInfo, loadFont as loadRobotoFont } from "@remotion/google-fonts/Roboto";
|
|
24
|
+
import { getInfo as getRochesterInfo, loadFont as loadRochesterFont } from "@remotion/google-fonts/Rochester";
|
|
25
|
+
import { getInfo as getTitanOneInfo, loadFont as loadTitanOneFont } from "@remotion/google-fonts/TitanOne";
|
|
26
|
+
var LATIN_SUBSETS = ["latin", "latin-ext"];
|
|
27
|
+
var LATIN_ONLY_SUBSETS = ["latin"];
|
|
28
|
+
var GENERIC_SUBSETS = new Set(["math", "symbols"]);
|
|
29
|
+
export var FONT_FAMILIES = Object.freeze({
|
|
30
|
+
CHERRY_BOMB_ONE: "Cherry Bomb One",
|
|
31
|
+
KANIT: "Kanit",
|
|
32
|
+
MONTSERRAT: "Montserrat",
|
|
33
|
+
OSWALD: "Oswald",
|
|
34
|
+
POPPINS: "Poppins",
|
|
35
|
+
ROBOTO: "Roboto",
|
|
36
|
+
ROCHESTER: "Rochester",
|
|
37
|
+
TITAN_ONE: "Titan One"
|
|
38
|
+
});
|
|
39
|
+
var FONT_METADATA = Object.freeze(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, FONT_FAMILIES.CHERRY_BOMB_ONE, getCherryBombOneInfo()), FONT_FAMILIES.KANIT, getKanitInfo()), FONT_FAMILIES.MONTSERRAT, getMontserratInfo()), FONT_FAMILIES.OSWALD, getOswaldInfo()), FONT_FAMILIES.POPPINS, getPoppinsInfo()), FONT_FAMILIES.ROBOTO, getRobotoInfo()), FONT_FAMILIES.ROCHESTER, getRochesterInfo()), FONT_FAMILIES.TITAN_ONE, getTitanOneInfo()));
|
|
40
|
+
var createProfile = function createProfile(style, weights) {
|
|
41
|
+
var subsets = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : LATIN_SUBSETS;
|
|
42
|
+
return Object.freeze({
|
|
43
|
+
style: style,
|
|
44
|
+
weights: Object.freeze(weights),
|
|
45
|
+
subsets: Object.freeze(subsets)
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
export var FONT_PROFILES = Object.freeze(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, FONT_FAMILIES.POPPINS, Object.freeze([createProfile("normal", ["300", "400", "500", "600", "700", "800", "900"]), createProfile("italic", ["800"])])), FONT_FAMILIES.KANIT, Object.freeze([createProfile("normal", ["400", "500", "600", "700", "800", "900"]), createProfile("italic", ["600", "800", "900"])])), FONT_FAMILIES.MONTSERRAT, Object.freeze([createProfile("normal", ["400", "500", "600", "700", "800", "900"])])), FONT_FAMILIES.ROBOTO, Object.freeze([createProfile("normal", ["300", "400", "700", "900"])])), FONT_FAMILIES.OSWALD, Object.freeze([createProfile("normal", ["400", "500", "600", "700"])])), FONT_FAMILIES.ROCHESTER, Object.freeze([createProfile("normal", ["400"], LATIN_ONLY_SUBSETS)])), FONT_FAMILIES.TITAN_ONE, Object.freeze([createProfile("normal", ["400"])])), FONT_FAMILIES.CHERRY_BOMB_ONE, Object.freeze([createProfile("normal", ["400"])])));
|
|
49
|
+
var FONT_LOADERS = Object.freeze(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, FONT_FAMILIES.CHERRY_BOMB_ONE, loadCherryBombOneFont), FONT_FAMILIES.KANIT, loadKanitFont), FONT_FAMILIES.MONTSERRAT, loadMontserratFont), FONT_FAMILIES.OSWALD, loadOswaldFont), FONT_FAMILIES.POPPINS, loadPoppinsFont), FONT_FAMILIES.ROBOTO, loadRobotoFont), FONT_FAMILIES.ROCHESTER, loadRochesterFont), FONT_FAMILIES.TITAN_ONE, loadTitanOneFont));
|
|
50
|
+
var DEFAULT_COMPONENT_DEPENDENCIES = Object.freeze({
|
|
51
|
+
Caption: [FONT_FAMILIES.POPPINS],
|
|
52
|
+
CaptionSimple: [FONT_FAMILIES.POPPINS],
|
|
53
|
+
HandoffNametag: [FONT_FAMILIES.ROBOTO],
|
|
54
|
+
Nametag: [FONT_FAMILIES.POPPINS],
|
|
55
|
+
Sentence: [FONT_FAMILIES.KANIT],
|
|
56
|
+
Title: [FONT_FAMILIES.POPPINS]
|
|
57
|
+
});
|
|
58
|
+
var THEME_COMPONENT_DEPENDENCIES = Object.freeze({
|
|
59
|
+
"default": DEFAULT_COMPONENT_DEPENDENCIES,
|
|
60
|
+
glitch: _objectSpread(_objectSpread({}, DEFAULT_COMPONENT_DEPENDENCIES), {}, {
|
|
61
|
+
Nametag: [FONT_FAMILIES.KANIT],
|
|
62
|
+
Sentence: [FONT_FAMILIES.KANIT],
|
|
63
|
+
Title: [FONT_FAMILIES.KANIT]
|
|
64
|
+
}),
|
|
65
|
+
glassmorphism: _objectSpread(_objectSpread({}, DEFAULT_COMPONENT_DEPENDENCIES), {}, {
|
|
66
|
+
Nametag: [FONT_FAMILIES.POPPINS],
|
|
67
|
+
Sentence: [FONT_FAMILIES.POPPINS],
|
|
68
|
+
Title: [FONT_FAMILIES.POPPINS]
|
|
69
|
+
}),
|
|
70
|
+
sports: _objectSpread(_objectSpread({}, DEFAULT_COMPONENT_DEPENDENCIES), {}, {
|
|
71
|
+
Nametag: [FONT_FAMILIES.KANIT],
|
|
72
|
+
Sentence: [FONT_FAMILIES.KANIT],
|
|
73
|
+
Title: [FONT_FAMILIES.KANIT]
|
|
74
|
+
}),
|
|
75
|
+
sportsbounce: _objectSpread(_objectSpread({}, DEFAULT_COMPONENT_DEPENDENCIES), {}, {
|
|
76
|
+
Nametag: [FONT_FAMILIES.MONTSERRAT],
|
|
77
|
+
Sentence: [FONT_FAMILIES.MONTSERRAT],
|
|
78
|
+
Title: [FONT_FAMILIES.KANIT]
|
|
79
|
+
}),
|
|
80
|
+
bigbold: _objectSpread(_objectSpread({}, DEFAULT_COMPONENT_DEPENDENCIES), {}, {
|
|
81
|
+
Nametag: [FONT_FAMILIES.MONTSERRAT],
|
|
82
|
+
Sentence: [FONT_FAMILIES.MONTSERRAT],
|
|
83
|
+
Title: [FONT_FAMILIES.MONTSERRAT]
|
|
84
|
+
}),
|
|
85
|
+
pushpull: _objectSpread(_objectSpread({}, DEFAULT_COMPONENT_DEPENDENCIES), {}, {
|
|
86
|
+
Nametag: [FONT_FAMILIES.KANIT],
|
|
87
|
+
Sentence: [FONT_FAMILIES.KANIT],
|
|
88
|
+
Title: [FONT_FAMILIES.KANIT]
|
|
89
|
+
}),
|
|
90
|
+
none: _objectSpread(_objectSpread({}, DEFAULT_COMPONENT_DEPENDENCIES), {}, {
|
|
91
|
+
Nametag: [],
|
|
92
|
+
Title: []
|
|
93
|
+
}),
|
|
94
|
+
collabintro: _objectSpread(_objectSpread({}, DEFAULT_COMPONENT_DEPENDENCIES), {}, {
|
|
95
|
+
Nametag: [FONT_FAMILIES.OSWALD, FONT_FAMILIES.POPPINS],
|
|
96
|
+
Title: [FONT_FAMILIES.OSWALD, FONT_FAMILIES.POPPINS]
|
|
97
|
+
}),
|
|
98
|
+
centerline: _objectSpread(_objectSpread({}, DEFAULT_COMPONENT_DEPENDENCIES), {}, {
|
|
99
|
+
Nametag: [FONT_FAMILIES.KANIT]
|
|
100
|
+
}),
|
|
101
|
+
boxwipe: _objectSpread(_objectSpread({}, DEFAULT_COMPONENT_DEPENDENCIES), {}, {
|
|
102
|
+
Nametag: [FONT_FAMILIES.KANIT]
|
|
103
|
+
}),
|
|
104
|
+
stackfill: _objectSpread(_objectSpread({}, DEFAULT_COMPONENT_DEPENDENCIES), {}, {
|
|
105
|
+
Nametag: [FONT_FAMILIES.KANIT]
|
|
106
|
+
}),
|
|
107
|
+
rightslide: _objectSpread(_objectSpread({}, DEFAULT_COMPONENT_DEPENDENCIES), {}, {
|
|
108
|
+
Nametag: [FONT_FAMILIES.KANIT]
|
|
109
|
+
}),
|
|
110
|
+
depth: _objectSpread(_objectSpread({}, DEFAULT_COMPONENT_DEPENDENCIES), {}, {
|
|
111
|
+
Sentence: [FONT_FAMILIES.POPPINS]
|
|
112
|
+
}),
|
|
113
|
+
fullcover: _objectSpread(_objectSpread({}, DEFAULT_COMPONENT_DEPENDENCIES), {}, {
|
|
114
|
+
Sentence: [FONT_FAMILIES.POPPINS]
|
|
115
|
+
})
|
|
116
|
+
});
|
|
117
|
+
var DIRECT_COMPONENT_DEPENDENCIES = Object.freeze({
|
|
118
|
+
CaptionColor: [FONT_FAMILIES.POPPINS],
|
|
119
|
+
CaptionColorInverse: [FONT_FAMILIES.POPPINS],
|
|
120
|
+
CaptionColorShadow: [FONT_FAMILIES.MONTSERRAT],
|
|
121
|
+
CaptionBold: [FONT_FAMILIES.MONTSERRAT],
|
|
122
|
+
CaptionElegant: [FONT_FAMILIES.MONTSERRAT, FONT_FAMILIES.ROCHESTER],
|
|
123
|
+
CaptionEmphasis: [FONT_FAMILIES.MONTSERRAT],
|
|
124
|
+
CaptionPunctuated: [FONT_FAMILIES.POPPINS],
|
|
125
|
+
CaptionWordBoom: [FONT_FAMILIES.TITAN_ONE],
|
|
126
|
+
CaptionWordBubble: [FONT_FAMILIES.MONTSERRAT],
|
|
127
|
+
CaptionWordPopup: [FONT_FAMILIES.MONTSERRAT, FONT_FAMILIES.CHERRY_BOMB_ONE],
|
|
128
|
+
DefaultCaption: [FONT_FAMILIES.POPPINS],
|
|
129
|
+
GlitchNametag: [FONT_FAMILIES.KANIT],
|
|
130
|
+
GlitchSentence: [FONT_FAMILIES.KANIT],
|
|
131
|
+
GlitchTitle: [FONT_FAMILIES.KANIT],
|
|
132
|
+
PhraseRainbowEffect: [FONT_FAMILIES.ROBOTO],
|
|
133
|
+
SportsCaption: [FONT_FAMILIES.KANIT]
|
|
134
|
+
});
|
|
135
|
+
var COMPONENT_ALIASES = Object.freeze({
|
|
136
|
+
CaptionSimple: "Caption",
|
|
137
|
+
NametagFold: "Nametag",
|
|
138
|
+
SentenceSimple: "Sentence",
|
|
139
|
+
SimpleFrameSentence: "Sentence"
|
|
140
|
+
});
|
|
141
|
+
var LAYOUT_COMPONENT_DEPENDENCIES = Object.freeze({
|
|
142
|
+
CreatorCollabColdOpen: [FONT_FAMILIES.OSWALD, FONT_FAMILIES.POPPINS],
|
|
143
|
+
CreatorCollabConversationSpine: [FONT_FAMILIES.OSWALD, FONT_FAMILIES.POPPINS],
|
|
144
|
+
CreatorCollabDocumentaryInset: [FONT_FAMILIES.OSWALD, FONT_FAMILIES.POPPINS],
|
|
145
|
+
CreatorCollabRackFocus: [FONT_FAMILIES.OSWALD, FONT_FAMILIES.POPPINS],
|
|
146
|
+
CreatorCollabSplit: [FONT_FAMILIES.POPPINS],
|
|
147
|
+
CreatorCollabStudioSet: [FONT_FAMILIES.OSWALD, FONT_FAMILIES.POPPINS],
|
|
148
|
+
DynamicTriangle: [FONT_FAMILIES.KANIT],
|
|
149
|
+
HookVideo: [FONT_FAMILIES.OSWALD],
|
|
150
|
+
IntroVideo: [FONT_FAMILIES.OSWALD],
|
|
151
|
+
KeyPointOverlayDepth: [FONT_FAMILIES.POPPINS],
|
|
152
|
+
Keyword: [FONT_FAMILIES.POPPINS],
|
|
153
|
+
KeywordStudioBackdrop: [FONT_FAMILIES.POPPINS],
|
|
154
|
+
MotionStill: [FONT_FAMILIES.POPPINS],
|
|
155
|
+
TextWithVideo: [FONT_FAMILIES.POPPINS],
|
|
156
|
+
TextFullCover: [FONT_FAMILIES.POPPINS]
|
|
157
|
+
});
|
|
158
|
+
var getComponentDependencies = function getComponentDependencies(component, theme) {
|
|
159
|
+
if (!component) {
|
|
160
|
+
return [];
|
|
161
|
+
}
|
|
162
|
+
var normalizedComponent = COMPONENT_ALIASES[component] || component;
|
|
163
|
+
if (DIRECT_COMPONENT_DEPENDENCIES[normalizedComponent]) {
|
|
164
|
+
return DIRECT_COMPONENT_DEPENDENCIES[normalizedComponent];
|
|
165
|
+
}
|
|
166
|
+
if (LAYOUT_COMPONENT_DEPENDENCIES[normalizedComponent]) {
|
|
167
|
+
return LAYOUT_COMPONENT_DEPENDENCIES[normalizedComponent];
|
|
168
|
+
}
|
|
169
|
+
var themeDependencies = THEME_COMPONENT_DEPENDENCIES[theme] || THEME_COMPONENT_DEPENDENCIES["default"];
|
|
170
|
+
return themeDependencies[normalizedComponent] || DEFAULT_COMPONENT_DEPENDENCIES[normalizedComponent] || [];
|
|
171
|
+
};
|
|
172
|
+
var addEntryDependencies = function addEntryDependencies(families, entry, theme) {
|
|
173
|
+
if (!entry) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
var entryTheme = entry.theme || theme;
|
|
177
|
+
var _iterator = _createForOfIteratorHelper(getComponentDependencies(entry.component, entryTheme)),
|
|
178
|
+
_step;
|
|
179
|
+
try {
|
|
180
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
181
|
+
var family = _step.value;
|
|
182
|
+
families.add(family);
|
|
183
|
+
}
|
|
184
|
+
} catch (err) {
|
|
185
|
+
_iterator.e(err);
|
|
186
|
+
} finally {
|
|
187
|
+
_iterator.f();
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
var parseUnicodeRange = function parseUnicodeRange(unicodeRange) {
|
|
191
|
+
return unicodeRange.split(",").map(function (range) {
|
|
192
|
+
var _range$trim$replace$s = range.trim().replace(/^U\+/i, "").split("-"),
|
|
193
|
+
_range$trim$replace$s2 = _slicedToArray(_range$trim$replace$s, 2),
|
|
194
|
+
start = _range$trim$replace$s2[0],
|
|
195
|
+
end = _range$trim$replace$s2[1];
|
|
196
|
+
return [Number.parseInt(start, 16), Number.parseInt(end || start, 16)];
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
var getTimelineText = function getTimelineText(timeline) {
|
|
200
|
+
var text = [];
|
|
201
|
+
var visited = new WeakSet();
|
|
202
|
+
var _visit = function visit(value) {
|
|
203
|
+
if (typeof value === "string") {
|
|
204
|
+
text.push(value);
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
if (!value || _typeof(value) !== "object" || visited.has(value)) {
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
visited.add(value);
|
|
211
|
+
for (var _i = 0, _Object$values = Object.values(value); _i < _Object$values.length; _i++) {
|
|
212
|
+
var child = _Object$values[_i];
|
|
213
|
+
_visit(child);
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
_visit(timeline);
|
|
217
|
+
return text.join("\n");
|
|
218
|
+
};
|
|
219
|
+
var getSubsetsForProfile = function getSubsetsForProfile(family, profile, timelineText) {
|
|
220
|
+
var metadata = FONT_METADATA[family];
|
|
221
|
+
var subsets = _toConsumableArray(profile.subsets);
|
|
222
|
+
var codePoints = _toConsumableArray(timelineText).map(function (character) {
|
|
223
|
+
return character.codePointAt(0);
|
|
224
|
+
});
|
|
225
|
+
var subsetRanges = new Map();
|
|
226
|
+
var metadataSubsets = new Set([].concat(_toConsumableArray(metadata.subsets || []), _toConsumableArray(Object.keys(metadata.unicodeRanges || {}))));
|
|
227
|
+
var _iterator2 = _createForOfIteratorHelper(metadataSubsets),
|
|
228
|
+
_step2;
|
|
229
|
+
try {
|
|
230
|
+
var _loop = function _loop() {
|
|
231
|
+
var _metadata$unicodeRang;
|
|
232
|
+
var subset = _step2.value;
|
|
233
|
+
if (!profile.weights.every(function (weight) {
|
|
234
|
+
var _metadata$fonts, _metadata$fonts$profi, _metadata$fonts$profi2;
|
|
235
|
+
return (_metadata$fonts = metadata.fonts) === null || _metadata$fonts === void 0 ? void 0 : (_metadata$fonts$profi = _metadata$fonts[profile.style]) === null || _metadata$fonts$profi === void 0 ? void 0 : (_metadata$fonts$profi2 = _metadata$fonts$profi[weight]) === null || _metadata$fonts$profi2 === void 0 ? void 0 : _metadata$fonts$profi2[subset];
|
|
236
|
+
})) {
|
|
237
|
+
return 0; // continue
|
|
238
|
+
}
|
|
239
|
+
var unicodeRange = (_metadata$unicodeRang = metadata.unicodeRanges) === null || _metadata$unicodeRang === void 0 ? void 0 : _metadata$unicodeRang[subset];
|
|
240
|
+
if (!unicodeRange) {
|
|
241
|
+
return 0; // continue
|
|
242
|
+
}
|
|
243
|
+
subsetRanges.set(subset, parseUnicodeRange(unicodeRange));
|
|
244
|
+
},
|
|
245
|
+
_ret;
|
|
246
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
247
|
+
_ret = _loop();
|
|
248
|
+
if (_ret === 0) continue;
|
|
249
|
+
}
|
|
250
|
+
} catch (err) {
|
|
251
|
+
_iterator2.e(err);
|
|
252
|
+
} finally {
|
|
253
|
+
_iterator2.f();
|
|
254
|
+
}
|
|
255
|
+
var matchesSubset = function matchesSubset(subset, codePoint) {
|
|
256
|
+
var _subsetRanges$get;
|
|
257
|
+
return (_subsetRanges$get = subsetRanges.get(subset)) === null || _subsetRanges$get === void 0 ? void 0 : _subsetRanges$get.some(function (_ref) {
|
|
258
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
259
|
+
start = _ref2[0],
|
|
260
|
+
end = _ref2[1];
|
|
261
|
+
return codePoint >= start && codePoint <= end;
|
|
262
|
+
});
|
|
263
|
+
};
|
|
264
|
+
var specificSubsets = _toConsumableArray(subsetRanges.keys()).filter(function (subset) {
|
|
265
|
+
return !GENERIC_SUBSETS.has(subset);
|
|
266
|
+
});
|
|
267
|
+
var _iterator3 = _createForOfIteratorHelper(specificSubsets),
|
|
268
|
+
_step3;
|
|
269
|
+
try {
|
|
270
|
+
var _loop2 = function _loop2() {
|
|
271
|
+
var subset = _step3.value;
|
|
272
|
+
if (!subsets.includes(subset) && codePoints.some(function (codePoint) {
|
|
273
|
+
return matchesSubset(subset, codePoint);
|
|
274
|
+
})) {
|
|
275
|
+
subsets.push(subset);
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
279
|
+
_loop2();
|
|
280
|
+
}
|
|
281
|
+
} catch (err) {
|
|
282
|
+
_iterator3.e(err);
|
|
283
|
+
} finally {
|
|
284
|
+
_iterator3.f();
|
|
285
|
+
}
|
|
286
|
+
var _iterator4 = _createForOfIteratorHelper(GENERIC_SUBSETS),
|
|
287
|
+
_step4;
|
|
288
|
+
try {
|
|
289
|
+
var _loop3 = function _loop3() {
|
|
290
|
+
var subset = _step4.value;
|
|
291
|
+
var isUsedByUnmatchedCodePoint = codePoints.some(function (codePoint) {
|
|
292
|
+
return matchesSubset(subset, codePoint) && !specificSubsets.some(function (specificSubset) {
|
|
293
|
+
return matchesSubset(specificSubset, codePoint);
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
if (isUsedByUnmatchedCodePoint && !subsets.includes(subset)) {
|
|
297
|
+
subsets.push(subset);
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
301
|
+
_loop3();
|
|
302
|
+
}
|
|
303
|
+
} catch (err) {
|
|
304
|
+
_iterator4.e(err);
|
|
305
|
+
} finally {
|
|
306
|
+
_iterator4.f();
|
|
307
|
+
}
|
|
308
|
+
return subsets;
|
|
309
|
+
};
|
|
310
|
+
export var getFontRequestsForTimeline = function getFontRequestsForTimeline() {
|
|
311
|
+
var _timeline$output;
|
|
312
|
+
var timeline = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
313
|
+
var families = new Set();
|
|
314
|
+
var theme = ((_timeline$output = timeline.output) === null || _timeline$output === void 0 ? void 0 : _timeline$output.theme) || "default";
|
|
315
|
+
var timelineText = getTimelineText(timeline);
|
|
316
|
+
var visitTrackEntry = function visitTrackEntry(entry) {
|
|
317
|
+
addEntryDependencies(families, entry === null || entry === void 0 ? void 0 : entry.layout, theme);
|
|
318
|
+
var _iterator5 = _createForOfIteratorHelper((entry === null || entry === void 0 ? void 0 : entry.effects) || []),
|
|
319
|
+
_step5;
|
|
320
|
+
try {
|
|
321
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
322
|
+
var effect = _step5.value;
|
|
323
|
+
addEntryDependencies(families, effect, effect.theme || theme);
|
|
324
|
+
}
|
|
325
|
+
} catch (err) {
|
|
326
|
+
_iterator5.e(err);
|
|
327
|
+
} finally {
|
|
328
|
+
_iterator5.f();
|
|
329
|
+
}
|
|
330
|
+
addEntryDependencies(families, entry, theme);
|
|
331
|
+
};
|
|
332
|
+
visitTrackEntry(timeline.mainVideoTrack);
|
|
333
|
+
var _iterator6 = _createForOfIteratorHelper(timeline.layoutVideoTrack || []),
|
|
334
|
+
_step6;
|
|
335
|
+
try {
|
|
336
|
+
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
337
|
+
var entry = _step6.value;
|
|
338
|
+
visitTrackEntry(entry);
|
|
339
|
+
}
|
|
340
|
+
} catch (err) {
|
|
341
|
+
_iterator6.e(err);
|
|
342
|
+
} finally {
|
|
343
|
+
_iterator6.f();
|
|
344
|
+
}
|
|
345
|
+
var _iterator7 = _createForOfIteratorHelper(timeline.effectsVideoTrack || []),
|
|
346
|
+
_step7;
|
|
347
|
+
try {
|
|
348
|
+
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
|
349
|
+
var _entry = _step7.value;
|
|
350
|
+
addEntryDependencies(families, _entry, _entry.theme || theme);
|
|
351
|
+
}
|
|
352
|
+
} catch (err) {
|
|
353
|
+
_iterator7.e(err);
|
|
354
|
+
} finally {
|
|
355
|
+
_iterator7.f();
|
|
356
|
+
}
|
|
357
|
+
var _iterator8 = _createForOfIteratorHelper(timeline.captionsVideoTrack || []),
|
|
358
|
+
_step8;
|
|
359
|
+
try {
|
|
360
|
+
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
|
361
|
+
var _entry2 = _step8.value;
|
|
362
|
+
addEntryDependencies(families, _entry2, _entry2.theme || theme);
|
|
363
|
+
}
|
|
364
|
+
} catch (err) {
|
|
365
|
+
_iterator8.e(err);
|
|
366
|
+
} finally {
|
|
367
|
+
_iterator8.f();
|
|
368
|
+
}
|
|
369
|
+
return _toConsumableArray(families).sort().map(function (family) {
|
|
370
|
+
return {
|
|
371
|
+
family: family,
|
|
372
|
+
profiles: FONT_PROFILES[family].map(function (profile) {
|
|
373
|
+
return createProfile(profile.style, profile.weights, getSubsetsForProfile(family, profile, timelineText));
|
|
374
|
+
})
|
|
375
|
+
};
|
|
376
|
+
});
|
|
377
|
+
};
|
|
378
|
+
var loadedProfilesByDocument = new WeakMap();
|
|
379
|
+
export var loadFontsForTimeline = function loadFontsForTimeline() {
|
|
380
|
+
var timeline = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
381
|
+
if (typeof document === "undefined" || typeof FontFace === "undefined") {
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
var loadedProfiles = loadedProfilesByDocument.get(document);
|
|
385
|
+
if (!loadedProfiles) {
|
|
386
|
+
loadedProfiles = new Set();
|
|
387
|
+
loadedProfilesByDocument.set(document, loadedProfiles);
|
|
388
|
+
}
|
|
389
|
+
var _iterator9 = _createForOfIteratorHelper(getFontRequestsForTimeline(timeline)),
|
|
390
|
+
_step9;
|
|
391
|
+
try {
|
|
392
|
+
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
|
393
|
+
var _step9$value = _step9.value,
|
|
394
|
+
family = _step9$value.family,
|
|
395
|
+
profiles = _step9$value.profiles;
|
|
396
|
+
var loadFont = FONT_LOADERS[family];
|
|
397
|
+
var _iterator10 = _createForOfIteratorHelper(profiles),
|
|
398
|
+
_step10;
|
|
399
|
+
try {
|
|
400
|
+
for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
|
|
401
|
+
var profile = _step10.value;
|
|
402
|
+
var key = [family, profile.style, profile.weights.join(","), profile.subsets.join(",")].join(":");
|
|
403
|
+
if (loadedProfiles.has(key)) {
|
|
404
|
+
continue;
|
|
405
|
+
}
|
|
406
|
+
loadFont(profile.style, {
|
|
407
|
+
weights: profile.weights,
|
|
408
|
+
subsets: profile.subsets
|
|
409
|
+
});
|
|
410
|
+
loadedProfiles.add(key);
|
|
411
|
+
}
|
|
412
|
+
} catch (err) {
|
|
413
|
+
_iterator10.e(err);
|
|
414
|
+
} finally {
|
|
415
|
+
_iterator10.f();
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
} catch (err) {
|
|
419
|
+
_iterator9.e(err);
|
|
420
|
+
} finally {
|
|
421
|
+
_iterator9.f();
|
|
422
|
+
}
|
|
423
|
+
};
|
|
@@ -32,6 +32,7 @@ import { CaptionWordBubble } from "./theme/themes/default/CaptionWordBubble";
|
|
|
32
32
|
import { CaptionWordPopup } from "./theme/themes/default/CaptionWordPopup";
|
|
33
33
|
import { CaptionEmphasis } from "./theme/themes/default/CaptionEmphasis";
|
|
34
34
|
import { CaptionElegant } from "./theme/themes/default/CaptionElegant";
|
|
35
|
+
import { CaptionBold } from "./theme/themes/default/CaptionBold";
|
|
35
36
|
import { BrollGreenScreen } from "./components/layouts/BrollGreenScreen";
|
|
36
37
|
import { IntroVideo } from "./components/layouts/IntroVideo";
|
|
37
38
|
import StretchText from "./components/utils/StretchText";
|
|
@@ -100,6 +101,7 @@ export var RegisteredComponents = {
|
|
|
100
101
|
CaptionWordBubble: CaptionWordBubble,
|
|
101
102
|
CaptionWordPopup: CaptionWordPopup,
|
|
102
103
|
CaptionElegant: CaptionElegant,
|
|
104
|
+
CaptionBold: CaptionBold,
|
|
103
105
|
CaptionColor: CaptionColor,
|
|
104
106
|
CaptionColorInverse: CaptionColorInverse,
|
|
105
107
|
CaptionColorShadow: CaptionColorShadow,
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { Easing, spring, useCurrentFrame, useVideoConfig } from "remotion";
|
|
2
2
|
import { useOrientationBased } from "../../../hooks/useOrientationBased.js";
|
|
3
|
-
import {
|
|
3
|
+
import { FONT_FAMILIES } from "../../../fontRegistry.js";
|
|
4
4
|
import { useTimeInterpolate } from "../../../hooks/useTimeInterpolate.js";
|
|
5
5
|
import { convertToSeconds } from "../../../helpers/convertToSeconds.js";
|
|
6
6
|
import { useTheme } from "../../hooks/useTheme.js";
|
|
7
7
|
import React from "react";
|
|
8
8
|
import { getContrastColor } from "../../../helpers/getContrastColor";
|
|
9
9
|
import { CHROME_PADDING } from "../../../config";
|
|
10
|
-
var
|
|
11
|
-
fontFamily = _loadFont.fontFamily;
|
|
10
|
+
var fontFamily = FONT_FAMILIES.MONTSERRAT;
|
|
12
11
|
export var BigBoldNametag = function BigBoldNametag(_ref) {
|
|
13
12
|
var name = _ref.name,
|
|
14
13
|
title = _ref.title,
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { AbsoluteFill, Easing, useCurrentFrame, useVideoConfig } from "remotion";
|
|
2
2
|
import { timeInterpolate, useTimeInterpolate } from "../../../hooks/useTimeInterpolate.js";
|
|
3
3
|
import { convertToSeconds } from "../../../helpers/convertToSeconds.js";
|
|
4
|
-
import {
|
|
4
|
+
import { FONT_FAMILIES } from "../../../fontRegistry.js";
|
|
5
5
|
import { CHROME_PADDING } from "../../../config.js";
|
|
6
6
|
import { distributeTextToFit } from "../default/Sentence/SentenceSimple.helpers.js";
|
|
7
7
|
import { useOrientationBased } from "../../../hooks/useOrientationBased.js";
|
|
8
8
|
import React from "react";
|
|
9
|
-
var
|
|
10
|
-
fontFamily = _loadFont.fontFamily;
|
|
9
|
+
var fontFamily = FONT_FAMILIES.MONTSERRAT;
|
|
11
10
|
export var BigBoldSentence = function BigBoldSentence(_ref) {
|
|
12
11
|
var sentence = _ref.sentence;
|
|
13
12
|
var _useVideoConfig = useVideoConfig(),
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { AbsoluteFill, Easing, useVideoConfig } from "remotion";
|
|
2
2
|
import { useTimeInterpolate } from "../../../hooks/useTimeInterpolate.js";
|
|
3
3
|
import { convertToSeconds } from "../../../helpers/convertToSeconds.js";
|
|
4
|
-
import {
|
|
4
|
+
import { FONT_FAMILIES } from "../../../fontRegistry.js";
|
|
5
5
|
import { CHROME_PADDING } from "../../../config.js";
|
|
6
6
|
import { distributeTextToFit } from "../default/Sentence/SentenceSimple.helpers.js";
|
|
7
7
|
import { useOrientationBased } from "../../../hooks/useOrientationBased.js";
|
|
8
8
|
import { useTheme } from "../../hooks/useTheme.js";
|
|
9
9
|
import React from "react";
|
|
10
|
-
var
|
|
11
|
-
fontFamily = _loadFont.fontFamily;
|
|
10
|
+
var fontFamily = FONT_FAMILIES.MONTSERRAT;
|
|
12
11
|
export var BigBoldTitle = function BigBoldTitle(_ref) {
|
|
13
12
|
var text = _ref.text;
|
|
14
13
|
// Calculate time-based values using convertToSeconds
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Easing, interpolate, useCurrentFrame, useVideoConfig } from "remotion";
|
|
3
|
-
import {
|
|
3
|
+
import { FONT_FAMILIES } from "../../../fontRegistry.js";
|
|
4
4
|
import { useOrientationBased } from "../../../hooks/useOrientationBased.js";
|
|
5
5
|
import { useTheme } from "../../hooks/useTheme.js";
|
|
6
6
|
import { getContrastColor } from "../../../helpers/getContrastColor";
|
|
7
|
-
var
|
|
8
|
-
subsets: ["latin"],
|
|
9
|
-
weights: ["400", "500", "600", "700"]
|
|
10
|
-
}),
|
|
11
|
-
fontFamily = _loadFont.fontFamily;
|
|
7
|
+
var fontFamily = FONT_FAMILIES.KANIT;
|
|
12
8
|
var clamp = function clamp(value, min, max) {
|
|
13
9
|
return Math.max(min, Math.min(max, value));
|
|
14
10
|
};
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Easing, interpolate, useCurrentFrame, useVideoConfig } from "remotion";
|
|
3
|
-
import {
|
|
3
|
+
import { FONT_FAMILIES } from "../../../fontRegistry.js";
|
|
4
4
|
import { useOrientationBased } from "../../../hooks/useOrientationBased.js";
|
|
5
5
|
import { useTheme } from "../../hooks/useTheme.js";
|
|
6
6
|
import { getContrastColor } from "../../../helpers/getContrastColor";
|
|
7
7
|
import { distributeTextToFit } from "../default/Sentence/SentenceSimple.helpers.js";
|
|
8
|
-
var
|
|
9
|
-
subsets: ["latin"],
|
|
10
|
-
weights: ["400", "500", "600", "700"]
|
|
11
|
-
}),
|
|
12
|
-
fontFamily = _loadFont.fontFamily;
|
|
8
|
+
var fontFamily = FONT_FAMILIES.KANIT;
|
|
13
9
|
var clamp = function clamp(value, min, max) {
|
|
14
10
|
return Math.max(min, Math.min(max, value));
|
|
15
11
|
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { AbsoluteFill, Sequence, useVideoConfig } from "remotion";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { FONT_FAMILIES } from "../../../fontRegistry.js";
|
|
4
|
+
import { useOrientationBased } from "../../../hooks/useOrientationBased.js";
|
|
5
|
+
import { distributeTextToFit } from "./Sentence/SentenceSimple.helpers.js";
|
|
6
|
+
import { CAPTION_PORTRAIT_BOTTOM_OFFSET } from "./constants";
|
|
7
|
+
var fontFamily = FONT_FAMILIES.MONTSERRAT;
|
|
8
|
+
var getWordLength = function getWordLength(word) {
|
|
9
|
+
var sanitizedLength = word.replace(/[^A-Za-z0-9]/g, "").length;
|
|
10
|
+
return sanitizedLength || word.length;
|
|
11
|
+
};
|
|
12
|
+
export var CaptionBold = function CaptionBold(_ref) {
|
|
13
|
+
var transcripts = _ref.transcripts;
|
|
14
|
+
var _useVideoConfig = useVideoConfig(),
|
|
15
|
+
width = _useVideoConfig.width;
|
|
16
|
+
var _useOrientationBased = useOrientationBased({
|
|
17
|
+
portrait: {
|
|
18
|
+
fontSize: 75,
|
|
19
|
+
bottom: CAPTION_PORTRAIT_BOTTOM_OFFSET
|
|
20
|
+
},
|
|
21
|
+
landscape: {
|
|
22
|
+
fontSize: 60,
|
|
23
|
+
bottom: 110
|
|
24
|
+
},
|
|
25
|
+
square: {
|
|
26
|
+
fontSize: 75,
|
|
27
|
+
bottom: 110
|
|
28
|
+
}
|
|
29
|
+
}),
|
|
30
|
+
bottom = _useOrientationBased.bottom,
|
|
31
|
+
fontSize = _useOrientationBased.fontSize;
|
|
32
|
+
var containerWidth = width * 0.8;
|
|
33
|
+
return /*#__PURE__*/React.createElement(AbsoluteFill, null, transcripts.map(function (transcript, index) {
|
|
34
|
+
var _distributeTextToFit = distributeTextToFit(transcript.text, width * 0.7, fontSize * 1.6, fontSize),
|
|
35
|
+
textFontSize = _distributeTextToFit.fontSize;
|
|
36
|
+
var words = transcript.text.split(/\s+/).filter(Boolean);
|
|
37
|
+
var longestWordIndex = words.reduce(function (longestIndex, word, wordIndex) {
|
|
38
|
+
if (longestIndex === -1) {
|
|
39
|
+
return wordIndex;
|
|
40
|
+
}
|
|
41
|
+
return getWordLength(word) > getWordLength(words[longestIndex]) ? wordIndex : longestIndex;
|
|
42
|
+
}, -1);
|
|
43
|
+
return /*#__PURE__*/React.createElement(Sequence, {
|
|
44
|
+
key: index,
|
|
45
|
+
from: transcript.from,
|
|
46
|
+
durationInFrames: transcript.durationInFrames
|
|
47
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
48
|
+
style: {
|
|
49
|
+
display: "flex",
|
|
50
|
+
alignItems: "center",
|
|
51
|
+
justifyContent: "center",
|
|
52
|
+
height: fontSize * 1.6,
|
|
53
|
+
position: "absolute",
|
|
54
|
+
bottom: bottom,
|
|
55
|
+
left: "50%",
|
|
56
|
+
width: containerWidth,
|
|
57
|
+
margin: "0 auto",
|
|
58
|
+
transform: "translateX(-50%)",
|
|
59
|
+
color: "white",
|
|
60
|
+
fontSize: textFontSize,
|
|
61
|
+
fontFamily: fontFamily,
|
|
62
|
+
fontWeight: 900,
|
|
63
|
+
textTransform: "uppercase",
|
|
64
|
+
letterSpacing: "-1px",
|
|
65
|
+
textShadow: "-2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000, 0px 4px 5px rgba(0, 0, 0, 0.75)",
|
|
66
|
+
textAlign: "center",
|
|
67
|
+
lineHeight: 1,
|
|
68
|
+
textWrap: "nowrap"
|
|
69
|
+
}
|
|
70
|
+
}, words.map(function (word, wordIndex) {
|
|
71
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
72
|
+
key: "".concat(word, "-").concat(wordIndex),
|
|
73
|
+
style: {
|
|
74
|
+
color: wordIndex === longestWordIndex ? "#ffff00" : "white",
|
|
75
|
+
marginRight: wordIndex < words.length - 1 ? textFontSize * 0.28 : 0
|
|
76
|
+
}
|
|
77
|
+
}, word);
|
|
78
|
+
})));
|
|
79
|
+
}));
|
|
80
|
+
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { AbsoluteFill, Sequence, useVideoConfig } from "remotion";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { FONT_FAMILIES } from "../../../fontRegistry.js";
|
|
4
4
|
import { useOrientationBased } from "../../../hooks/useOrientationBased.js";
|
|
5
5
|
import { distributeTextToFit } from "./Sentence/SentenceSimple.helpers.js";
|
|
6
6
|
import { useTheme } from "../../hooks/useTheme.js";
|
|
7
7
|
import { CAPTION_PORTRAIT_BOTTOM_OFFSET } from "./constants";
|
|
8
|
-
var
|
|
9
|
-
fontFamily = _loadFont.fontFamily;
|
|
8
|
+
var fontFamily = FONT_FAMILIES.POPPINS;
|
|
10
9
|
export var CaptionColor = function CaptionColor(_ref) {
|
|
11
10
|
var transcripts = _ref.transcripts;
|
|
12
11
|
var _useTheme = useTheme(),
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { AbsoluteFill, Sequence, useVideoConfig } from "remotion";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { FONT_FAMILIES } from "../../../fontRegistry.js";
|
|
4
4
|
import { useOrientationBased } from "../../../hooks/useOrientationBased.js";
|
|
5
5
|
import { distributeTextToFit } from "./Sentence/SentenceSimple.helpers.js";
|
|
6
6
|
import { useTheme } from "../../hooks/useTheme.js";
|
|
7
7
|
import { CAPTION_PORTRAIT_BOTTOM_OFFSET } from "./constants";
|
|
8
|
-
var
|
|
9
|
-
fontFamily = _loadFont.fontFamily;
|
|
8
|
+
var fontFamily = FONT_FAMILIES.POPPINS;
|
|
10
9
|
export var CaptionColorInverse = function CaptionColorInverse(_ref) {
|
|
11
10
|
var transcripts = _ref.transcripts;
|
|
12
11
|
var _useTheme = useTheme(),
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { AbsoluteFill, Sequence, useVideoConfig } from "remotion";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { FONT_FAMILIES } from "../../../fontRegistry.js";
|
|
4
4
|
import { useOrientationBased } from "../../../hooks/useOrientationBased.js";
|
|
5
5
|
import { distributeTextToFit } from "./Sentence/SentenceSimple.helpers.js";
|
|
6
6
|
import { useTheme } from "../../hooks/useTheme.js";
|
|
7
7
|
import { CAPTION_PORTRAIT_BOTTOM_OFFSET } from "./constants";
|
|
8
|
-
var
|
|
9
|
-
fontFamily = _loadFont.fontFamily;
|
|
8
|
+
var fontFamily = FONT_FAMILIES.MONTSERRAT;
|
|
10
9
|
export var CaptionColorShadow = function CaptionColorShadow(_ref) {
|
|
11
10
|
var transcripts = _ref.transcripts;
|
|
12
11
|
var _useTheme = useTheme(),
|