@yahoo/uds-v5-wip 1.52.1 → 1.53.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/dist/config/dist/component-config.d.ts +77 -0
- package/dist/config/dist/createConfig.js +1 -1
- package/dist/core/dist/createComponent.js +1 -1
- package/dist/core/dist/getStyles.js +1 -1
- package/dist/loader/dist/packages/core/dist/getStyles.js +1 -1
- package/dist/remotion/dist/components/image-slide.d.ts +1 -2
- package/dist/remotion/dist/components/image-slide.js +3 -3
- package/dist/remotion/dist/components/index.js +7 -7
- package/dist/remotion/dist/components/lower-third.d.ts +1 -2
- package/dist/remotion/dist/components/lower-third.js +5 -5
- package/dist/remotion/dist/components/quote-card.d.ts +1 -2
- package/dist/remotion/dist/components/quote-card.js +4 -4
- package/dist/remotion/dist/components/split-screen.d.ts +1 -2
- package/dist/remotion/dist/components/split-screen.js +7 -7
- package/dist/remotion/dist/components/stat-card.d.ts +1 -2
- package/dist/remotion/dist/components/stat-card.js +3 -3
- package/dist/remotion/dist/components/text-overlay.d.ts +1 -2
- package/dist/remotion/dist/components/text-overlay.js +2 -2
- package/dist/remotion/dist/components/title-card.d.ts +1 -2
- package/dist/remotion/dist/components/title-card.js +3 -3
- package/dist/remotion/dist/components/typing-text.d.ts +1 -2
- package/dist/remotion/dist/components/typing-text.js +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -167,6 +167,78 @@ type PropBinding = PrimitivePropBinding;
|
|
|
167
167
|
* disabled: bool(),
|
|
168
168
|
* }
|
|
169
169
|
*/
|
|
170
|
+
/**
|
|
171
|
+
* Names of prop bindings that participate in matrix/strip iteration —
|
|
172
|
+
* i.e. props authored as `enums({...})` or `bool()`. Other prop bindings
|
|
173
|
+
* (style props, forwards, composites) don't have a fixed enumerable
|
|
174
|
+
* set of values to iterate over and so aren't valid axes.
|
|
175
|
+
*
|
|
176
|
+
* Resolves to `never` when `TProps` declares no enum/bool bindings.
|
|
177
|
+
*/
|
|
178
|
+
type IterableAxisOf<TProps> = { [K in keyof TProps]: TProps[K] extends EnumMarker<Record<string, unknown>> | BoolMarker ? K : never }[keyof TProps] & string;
|
|
179
|
+
/**
|
|
180
|
+
* A single example entry — describes one cell, one row, or one matrix.
|
|
181
|
+
*
|
|
182
|
+
* Three iteration shapes are supported, distinguished by which fields
|
|
183
|
+
* are present:
|
|
184
|
+
*
|
|
185
|
+
* - Static: only `props`. Renders one cell with `props` as the consumer-
|
|
186
|
+
* facing prop values.
|
|
187
|
+
* - 1D strip: `axis` plus `props`. Iterates the named enum/bool prop and
|
|
188
|
+
* renders one cell per value.
|
|
189
|
+
* - 2D matrix: `rows` and `cols` plus `props`. Iterates both and renders
|
|
190
|
+
* the Cartesian product as a labeled grid.
|
|
191
|
+
*
|
|
192
|
+
* `axis` and `rows`/`cols` are mutually exclusive; `rows` and `cols`
|
|
193
|
+
* must appear together. The runtime validator enforces both.
|
|
194
|
+
*
|
|
195
|
+
* `props` is keyed by *consumer-facing prop name* — the same names a
|
|
196
|
+
* caller of `<Link href='#'>` would pass — not by internal layer name.
|
|
197
|
+
* The renderer maps consumer props to layer bundles using the
|
|
198
|
+
* component's own `props` bindings.
|
|
199
|
+
*
|
|
200
|
+
* Authors don't control wrapper layout (gaps, padding, alignment) — the
|
|
201
|
+
* renderer (Studio / docs) owns those decisions so the matrix surface
|
|
202
|
+
* stays consistent across components.
|
|
203
|
+
*/
|
|
204
|
+
interface ExampleEntry<TAxis extends string = string> {
|
|
205
|
+
/** 1D iteration — one cell per value of this enum/bool prop. */
|
|
206
|
+
axis?: TAxis;
|
|
207
|
+
/** 2D iteration — rows × cols matrix. Mutually exclusive with `axis`. */
|
|
208
|
+
rows?: TAxis;
|
|
209
|
+
cols?: TAxis;
|
|
210
|
+
/**
|
|
211
|
+
* Consumer-facing prop values used by every cell. For 1D / 2D entries,
|
|
212
|
+
* the cell's axis coords are overlaid on top of these (axis values win
|
|
213
|
+
* on collision with `props.<axis>`).
|
|
214
|
+
*/
|
|
215
|
+
props?: Record<string, unknown>;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Component examples — required `default` plus any number of additional
|
|
219
|
+
* named entries. `default` is the canonical single-instance showcase
|
|
220
|
+
* Studio + docs fall back to when no specific example is requested.
|
|
221
|
+
*
|
|
222
|
+
* `default` is distinct from `defaultProps`: `defaultProps` is the
|
|
223
|
+
* runtime API default applied when a consumer omits a prop; `examples.default`
|
|
224
|
+
* is the showcase content (label, icons, href) used by tooling. A
|
|
225
|
+
* component can declare both without conflict.
|
|
226
|
+
*
|
|
227
|
+
* Axis types narrow to `IterableAxisOf<TProps>` so referencing a non-
|
|
228
|
+
* enum/bool prop name in `axis` / `rows` / `cols` is a type error.
|
|
229
|
+
*/
|
|
230
|
+
type Examples<TProps extends Record<string, unknown> = Record<string, unknown>> = {
|
|
231
|
+
default: ExampleEntry<IterableAxisOf<TProps>>;
|
|
232
|
+
} & Record<string, ExampleEntry<IterableAxisOf<TProps>>>;
|
|
233
|
+
/**
|
|
234
|
+
* The architecture-doc-target component config. Distinct from today's
|
|
235
|
+
* `SingleComponentDef` (`base` + `variants` shape) — this is the
|
|
236
|
+
* pure-data, layers-first shape the new `defineComponent` accepts.
|
|
237
|
+
*
|
|
238
|
+
* `TLayers` is inferred from the `layers` block so prop bindings can
|
|
239
|
+
* narrow their `layer` field against the component's actual layer
|
|
240
|
+
* names; typos surface at the authoring site.
|
|
241
|
+
*/
|
|
170
242
|
/**
|
|
171
243
|
* Branded shape returned by `defineComponent({...})`. Carries `layers`,
|
|
172
244
|
* `props`, AND a phantom `__tag` slot as const-narrowed types so
|
|
@@ -191,6 +263,11 @@ interface ComponentConfigValue<TLayers extends Record<string, LayerInput>, TProp
|
|
|
191
263
|
readonly layers: TLayers;
|
|
192
264
|
readonly props?: TProps;
|
|
193
265
|
readonly defaultProps?: Record<string, unknown>;
|
|
266
|
+
/**
|
|
267
|
+
* Component examples — see {@link Examples}. Carried through from
|
|
268
|
+
* `ComponentConfigInput.examples`.
|
|
269
|
+
*/
|
|
270
|
+
readonly examples?: Examples<TProps>;
|
|
194
271
|
}
|
|
195
272
|
/**
|
|
196
273
|
* The bundle passed to the render function for each layer — a ready-to-
|
|
@@ -5,9 +5,9 @@ import { getConfigurablePropMapping } from "../../core/dist/configurable-prop-he
|
|
|
5
5
|
import "../../core/dist/index.js";
|
|
6
6
|
import { buildMotionReference, resolveComponentMotionAliases, validateComponentVariants } from "./component-resolution.js";
|
|
7
7
|
import { setRegisteredStyleProps } from "./runtime-registry.js";
|
|
8
|
+
import { applyPresetToData, deepMerge, mergeAtomic } from "./preset-merge.js";
|
|
8
9
|
import { resolveTokenType, sniffTokenTypeFromValue } from "./resolveTokenTypes.js";
|
|
9
10
|
import { resolveStyleProp } from "./resolveStyleProp.js";
|
|
10
|
-
import { applyPresetToData, deepMerge, mergeAtomic } from "./preset-merge.js";
|
|
11
11
|
//#region ../config/dist/createConfig.js
|
|
12
12
|
/** biome-ignore-all lint/suspicious/noExplicitAny: necessary for dynamic builder to work correctly */
|
|
13
13
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { applySlotOverrides, assertTransformedConfig, buildSlotProps, buildUntransformedSlotProps, inferComponentNameFromRenderFn, mergeMotionConfig, mergeRootClassName, mergeSlotMotionProps, partitionMergedProps } from "./createComponent.boundaries.js";
|
|
1
2
|
import { processStyleProps } from "./getStyles.js";
|
|
2
3
|
import { createComponentStyler } from "./getComponentStyles.js";
|
|
3
|
-
import { applySlotOverrides, assertTransformedConfig, buildSlotProps, buildUntransformedSlotProps, inferComponentNameFromRenderFn, mergeMotionConfig, mergeRootClassName, mergeSlotMotionProps, partitionMergedProps } from "./createComponent.boundaries.js";
|
|
4
4
|
import { createElement } from "react";
|
|
5
5
|
//#region ../core/dist/createComponent.js
|
|
6
6
|
function createPrimitiveRenderFn(tag) {
|
|
@@ -3,8 +3,8 @@ import "../../utils/dist/index.js";
|
|
|
3
3
|
import { expandCompositeStyles, getCompositeStylesConfig } from "./compositeStyles.js";
|
|
4
4
|
import { propMappings } from "./style-prop-data.js";
|
|
5
5
|
import { stylePropsTwMap } from "./generated/stylePropsTwMap.js";
|
|
6
|
-
import { modifierMappings } from "./modifier-mappings.js";
|
|
7
6
|
import { colorPropToOpacityProp } from "./color-opacity-map.js";
|
|
7
|
+
import { modifierMappings } from "./modifier-mappings.js";
|
|
8
8
|
import { clsx } from "clsx";
|
|
9
9
|
//#region ../core/dist/getStyles.js
|
|
10
10
|
/** Convert kebab-case CSS property to camelCase for React inline styles.
|
|
@@ -2,8 +2,8 @@ import "../../../../../utils/dist/index.js";
|
|
|
2
2
|
import "./compositeStyles.js";
|
|
3
3
|
import { propMappings } from "./style-prop-data.js";
|
|
4
4
|
import { stylePropsTwMap } from "./generated/stylePropsTwMap.js";
|
|
5
|
-
import { modifierMappings } from "./modifier-mappings.js";
|
|
6
5
|
import { colorPropToOpacityProp } from "./color-opacity-map.js";
|
|
6
|
+
import { modifierMappings } from "./modifier-mappings.js";
|
|
7
7
|
//#region ../loader/dist/packages/core/dist/getStyles.js
|
|
8
8
|
/** Convert kebab-case CSS property to camelCase for React inline styles.
|
|
9
9
|
* CSS custom properties (--*) are kept as-is since React supports them verbatim. */
|
|
@@ -2,7 +2,6 @@ import * as _$react from "react";
|
|
|
2
2
|
import * as _$_uds_types0 from "@uds/types";
|
|
3
3
|
|
|
4
4
|
//#region ../remotion/dist/components/image-slide.d.ts
|
|
5
|
-
//#region src/components/image-slide.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* @description Full-screen image slide with optional caption overlay
|
|
8
7
|
*/
|
|
@@ -15,6 +14,6 @@ declare const ImageSlide: _$react.FC<_$_uds_types0.CreateComponentProps<string,
|
|
|
15
14
|
root: "div";
|
|
16
15
|
image: "img";
|
|
17
16
|
caption: "div";
|
|
18
|
-
}>>;
|
|
17
|
+
}>>;
|
|
19
18
|
//#endregion
|
|
20
19
|
export { ImageSlide };
|
|
@@ -5,15 +5,15 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
/**
|
|
6
6
|
* @description Full-screen image slide with optional caption overlay
|
|
7
7
|
*/
|
|
8
|
-
const ImageSlide = createComponent(({ props, src, alt, caption, children }) =>
|
|
8
|
+
const ImageSlide = createComponent(({ props, src, alt, caption, children }) => jsxs("div", {
|
|
9
9
|
...props.root,
|
|
10
10
|
children: [
|
|
11
|
-
|
|
11
|
+
jsx("img", {
|
|
12
12
|
...props.image,
|
|
13
13
|
src,
|
|
14
14
|
alt: alt ?? ""
|
|
15
15
|
}),
|
|
16
|
-
caption &&
|
|
16
|
+
caption && jsx("div", {
|
|
17
17
|
...props.caption,
|
|
18
18
|
children: caption
|
|
19
19
|
}),
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import "./image-slide.js";
|
|
2
|
-
import "./lower-third.js";
|
|
3
|
-
import "./quote-card.js";
|
|
4
|
-
import "./split-screen.js";
|
|
5
|
-
import "./stat-card.js";
|
|
6
|
-
import "./text-overlay.js";
|
|
7
|
-
import "./title-card.js";
|
|
8
|
-
import "./typing-text.js";
|
|
9
2
|
import "./image-slide.config.js";
|
|
3
|
+
import "./lower-third.js";
|
|
10
4
|
import "./lower-third.config.js";
|
|
5
|
+
import "./quote-card.js";
|
|
11
6
|
import "./quote-card.config.js";
|
|
7
|
+
import "./split-screen.js";
|
|
12
8
|
import "./split-screen.config.js";
|
|
9
|
+
import "./stat-card.js";
|
|
13
10
|
import "./stat-card.config.js";
|
|
11
|
+
import "./text-overlay.js";
|
|
14
12
|
import "./text-overlay.config.js";
|
|
13
|
+
import "./title-card.js";
|
|
15
14
|
import "./title-card.config.js";
|
|
15
|
+
import "./typing-text.js";
|
|
16
16
|
import "./typing-text.config.js";
|
|
@@ -2,7 +2,6 @@ import * as _$react from "react";
|
|
|
2
2
|
import * as _$_uds_types0 from "@uds/types";
|
|
3
3
|
|
|
4
4
|
//#region ../remotion/dist/components/lower-third.d.ts
|
|
5
|
-
//#region src/components/lower-third.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* @description Lower-third overlay with title and optional subtitle
|
|
8
7
|
*/
|
|
@@ -16,6 +15,6 @@ declare const LowerThird: _$react.FC<_$_uds_types0.CreateComponentProps<string,
|
|
|
16
15
|
content: "div";
|
|
17
16
|
title: "div";
|
|
18
17
|
subtitle: "div";
|
|
19
|
-
}>>;
|
|
18
|
+
}>>;
|
|
20
19
|
//#endregion
|
|
21
20
|
export { LowerThird };
|
|
@@ -5,16 +5,16 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
/**
|
|
6
6
|
* @description Lower-third overlay with title and optional subtitle
|
|
7
7
|
*/
|
|
8
|
-
const LowerThird = createComponent(({ props, title, subtitle, children }) =>
|
|
8
|
+
const LowerThird = createComponent(({ props, title, subtitle, children }) => jsxs("div", {
|
|
9
9
|
...props.root,
|
|
10
10
|
children: [
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
jsx("div", { ...props.bar }),
|
|
12
|
+
jsxs("div", {
|
|
13
13
|
...props.content,
|
|
14
|
-
children: [
|
|
14
|
+
children: [jsx("div", {
|
|
15
15
|
...props.title,
|
|
16
16
|
children: title
|
|
17
|
-
}), subtitle &&
|
|
17
|
+
}), subtitle && jsx("div", {
|
|
18
18
|
...props.subtitle,
|
|
19
19
|
children: subtitle
|
|
20
20
|
})]
|
|
@@ -2,7 +2,6 @@ import * as _$react from "react";
|
|
|
2
2
|
import * as _$_uds_types0 from "@uds/types";
|
|
3
3
|
|
|
4
4
|
//#region ../remotion/dist/components/quote-card.d.ts
|
|
5
|
-
//#region src/components/quote-card.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* @description Full-screen quote display with optional attribution
|
|
8
7
|
*/
|
|
@@ -16,6 +15,6 @@ declare const QuoteCard: _$react.FC<_$_uds_types0.CreateComponentProps<string, {
|
|
|
16
15
|
quote: "div";
|
|
17
16
|
divider: "div";
|
|
18
17
|
attribution: "div";
|
|
19
|
-
}>>;
|
|
18
|
+
}>>;
|
|
20
19
|
//#endregion
|
|
21
20
|
export { QuoteCard };
|
|
@@ -5,18 +5,18 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
/**
|
|
6
6
|
* @description Full-screen quote display with optional attribution
|
|
7
7
|
*/
|
|
8
|
-
const QuoteCard = createComponent(({ props, quote, attribution, children }) =>
|
|
8
|
+
const QuoteCard = createComponent(({ props, quote, attribution, children }) => jsxs("div", {
|
|
9
9
|
...props.root,
|
|
10
10
|
children: [
|
|
11
|
-
|
|
11
|
+
jsx("div", {
|
|
12
12
|
...props.mark,
|
|
13
13
|
children: "“"
|
|
14
14
|
}),
|
|
15
|
-
|
|
15
|
+
jsx("div", {
|
|
16
16
|
...props.quote,
|
|
17
17
|
children: quote
|
|
18
18
|
}),
|
|
19
|
-
attribution &&
|
|
19
|
+
attribution && jsxs(Fragment, { children: [jsx("div", { ...props.divider }), jsx("div", {
|
|
20
20
|
...props.attribution,
|
|
21
21
|
children: attribution
|
|
22
22
|
})] }),
|
|
@@ -2,7 +2,6 @@ import * as _$react from "react";
|
|
|
2
2
|
import * as _$_uds_types0 from "@uds/types";
|
|
3
3
|
|
|
4
4
|
//#region ../remotion/dist/components/split-screen.d.ts
|
|
5
|
-
//#region src/components/split-screen.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* @description Side-by-side split screen layout for comparing content
|
|
8
7
|
*/
|
|
@@ -20,6 +19,6 @@ declare const SplitScreen: _$react.FC<_$_uds_types0.CreateComponentProps<string,
|
|
|
20
19
|
leftBody: "div";
|
|
21
20
|
rightTitle: "div";
|
|
22
21
|
rightBody: "div";
|
|
23
|
-
}>>;
|
|
22
|
+
}>>;
|
|
24
23
|
//#endregion
|
|
25
24
|
export { SplitScreen };
|
|
@@ -5,25 +5,25 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
/**
|
|
6
6
|
* @description Side-by-side split screen layout for comparing content
|
|
7
7
|
*/
|
|
8
|
-
const SplitScreen = createComponent(({ props, leftTitle, leftBody, rightTitle, rightBody, children }) =>
|
|
8
|
+
const SplitScreen = createComponent(({ props, leftTitle, leftBody, rightTitle, rightBody, children }) => jsxs("div", {
|
|
9
9
|
...props.root,
|
|
10
10
|
children: [
|
|
11
|
-
|
|
11
|
+
jsxs("div", {
|
|
12
12
|
...props.left,
|
|
13
|
-
children: [leftTitle &&
|
|
13
|
+
children: [leftTitle && jsx("div", {
|
|
14
14
|
...props.leftTitle,
|
|
15
15
|
children: leftTitle
|
|
16
|
-
}), leftBody &&
|
|
16
|
+
}), leftBody && jsx("div", {
|
|
17
17
|
...props.leftBody,
|
|
18
18
|
children: leftBody
|
|
19
19
|
})]
|
|
20
20
|
}),
|
|
21
|
-
|
|
21
|
+
jsxs("div", {
|
|
22
22
|
...props.right,
|
|
23
|
-
children: [rightTitle &&
|
|
23
|
+
children: [rightTitle && jsx("div", {
|
|
24
24
|
...props.rightTitle,
|
|
25
25
|
children: rightTitle
|
|
26
|
-
}), rightBody &&
|
|
26
|
+
}), rightBody && jsx("div", {
|
|
27
27
|
...props.rightBody,
|
|
28
28
|
children: rightBody
|
|
29
29
|
})]
|
|
@@ -2,7 +2,6 @@ import * as _$react from "react";
|
|
|
2
2
|
import * as _$_uds_types0 from "@uds/types";
|
|
3
3
|
|
|
4
4
|
//#region ../remotion/dist/components/stat-card.d.ts
|
|
5
|
-
//#region src/components/stat-card.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* @description Full-screen statistic display with large value and label
|
|
8
7
|
*/
|
|
@@ -14,6 +13,6 @@ declare const StatCard: _$react.FC<_$_uds_types0.CreateComponentProps<string, {
|
|
|
14
13
|
root: "div";
|
|
15
14
|
value: "div";
|
|
16
15
|
label: "div";
|
|
17
|
-
}>>;
|
|
16
|
+
}>>;
|
|
18
17
|
//#endregion
|
|
19
18
|
export { StatCard };
|
|
@@ -5,14 +5,14 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
/**
|
|
6
6
|
* @description Full-screen statistic display with large value and label
|
|
7
7
|
*/
|
|
8
|
-
const StatCard = createComponent(({ props, value, label, children }) =>
|
|
8
|
+
const StatCard = createComponent(({ props, value, label, children }) => jsxs("div", {
|
|
9
9
|
...props.root,
|
|
10
10
|
children: [
|
|
11
|
-
|
|
11
|
+
jsx("div", {
|
|
12
12
|
...props.value,
|
|
13
13
|
children: value
|
|
14
14
|
}),
|
|
15
|
-
label &&
|
|
15
|
+
label && jsx("div", {
|
|
16
16
|
...props.label,
|
|
17
17
|
children: label
|
|
18
18
|
}),
|
|
@@ -2,7 +2,6 @@ import * as _$react from "react";
|
|
|
2
2
|
import * as _$_uds_types0 from "@uds/types";
|
|
3
3
|
|
|
4
4
|
//#region ../remotion/dist/components/text-overlay.d.ts
|
|
5
|
-
//#region src/components/text-overlay.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* @description Full-screen text overlay for displaying text over video or images
|
|
8
7
|
*/
|
|
@@ -12,6 +11,6 @@ declare const TextOverlay: _$react.FC<_$_uds_types0.CreateComponentProps<string,
|
|
|
12
11
|
}, {
|
|
13
12
|
root: "div";
|
|
14
13
|
text: "div";
|
|
15
|
-
}>>;
|
|
14
|
+
}>>;
|
|
16
15
|
//#endregion
|
|
17
16
|
export { TextOverlay };
|
|
@@ -5,9 +5,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
/**
|
|
6
6
|
* @description Full-screen text overlay for displaying text over video or images
|
|
7
7
|
*/
|
|
8
|
-
const TextOverlay = createComponent(({ props, text, children }) =>
|
|
8
|
+
const TextOverlay = createComponent(({ props, text, children }) => jsxs("div", {
|
|
9
9
|
...props.root,
|
|
10
|
-
children: [
|
|
10
|
+
children: [jsx("div", {
|
|
11
11
|
...props.text,
|
|
12
12
|
children: text
|
|
13
13
|
}), children]
|
|
@@ -2,7 +2,6 @@ import * as _$react from "react";
|
|
|
2
2
|
import * as _$_uds_types0 from "@uds/types";
|
|
3
3
|
|
|
4
4
|
//#region ../remotion/dist/components/title-card.d.ts
|
|
5
|
-
//#region src/components/title-card.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* @description Full-screen title card with optional subtitle for video scenes
|
|
8
7
|
*/
|
|
@@ -14,6 +13,6 @@ declare const TitleCard: _$react.FC<_$_uds_types0.CreateComponentProps<string, {
|
|
|
14
13
|
root: "div";
|
|
15
14
|
title: "div";
|
|
16
15
|
subtitle: "div";
|
|
17
|
-
}>>;
|
|
16
|
+
}>>;
|
|
18
17
|
//#endregion
|
|
19
18
|
export { TitleCard };
|
|
@@ -5,14 +5,14 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
/**
|
|
6
6
|
* @description Full-screen title card with optional subtitle for video scenes
|
|
7
7
|
*/
|
|
8
|
-
const TitleCard = createComponent(({ props, title, subtitle, children }) =>
|
|
8
|
+
const TitleCard = createComponent(({ props, title, subtitle, children }) => jsxs("div", {
|
|
9
9
|
...props.root,
|
|
10
10
|
children: [
|
|
11
|
-
|
|
11
|
+
jsx("div", {
|
|
12
12
|
...props.title,
|
|
13
13
|
children: title
|
|
14
14
|
}),
|
|
15
|
-
subtitle &&
|
|
15
|
+
subtitle && jsx("div", {
|
|
16
16
|
...props.subtitle,
|
|
17
17
|
children: subtitle
|
|
18
18
|
}),
|
|
@@ -2,7 +2,6 @@ import * as _$react from "react";
|
|
|
2
2
|
import * as _$_uds_types0 from "@uds/types";
|
|
3
3
|
|
|
4
4
|
//#region ../remotion/dist/components/typing-text.d.ts
|
|
5
|
-
//#region src/components/typing-text.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* @description Typing text animation that reveals characters frame by frame
|
|
8
7
|
*/
|
|
@@ -16,6 +15,6 @@ declare const TypingText: _$react.FC<_$_uds_types0.CreateComponentProps<string,
|
|
|
16
15
|
root: "div";
|
|
17
16
|
text: "div";
|
|
18
17
|
cursor: "div";
|
|
19
|
-
}>>;
|
|
18
|
+
}>>;
|
|
20
19
|
//#endregion
|
|
21
20
|
export { TypingText };
|
|
@@ -11,11 +11,11 @@ const TypingText = createComponent(({ props, text, speed = 1, delay = 0, frame,
|
|
|
11
11
|
const charsToShow = isAnimating ? Math.min(Math.floor(effectiveFrame * speed), text.length) : text.length;
|
|
12
12
|
const visibleText = text.slice(0, charsToShow);
|
|
13
13
|
const showCursor = isAnimating && charsToShow < text.length;
|
|
14
|
-
return
|
|
14
|
+
return jsxs("div", {
|
|
15
15
|
...props.root,
|
|
16
|
-
children: [
|
|
16
|
+
children: [jsxs("div", {
|
|
17
17
|
...props.text,
|
|
18
|
-
children: [visibleText, showCursor &&
|
|
18
|
+
children: [visibleText, showCursor && jsx("span", { ...props.cursor })]
|
|
19
19
|
}), children]
|
|
20
20
|
});
|
|
21
21
|
});
|