@clipwright/core 0.39.0 → 0.41.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/account-actors.d.ts +94 -2
- package/dist/account-actors.js +151 -34
- package/dist/account-actors.js.map +1 -1
- package/dist/actor-bounds.d.ts +3 -3
- package/dist/actor-bounds.js +3 -3
- package/dist/actor-bounds.js.map +1 -1
- package/dist/actors.d.ts +24 -2
- package/dist/actors.js +30 -9
- package/dist/actors.js.map +1 -1
- package/dist/ad-pause-trim.d.ts +21 -0
- package/dist/ad-pause-trim.js +16 -0
- package/dist/ad-pause-trim.js.map +1 -0
- package/dist/aspect.d.ts +5 -0
- package/dist/aspect.js +7 -0
- package/dist/aspect.js.map +1 -1
- package/dist/assets.d.ts +2 -1
- package/dist/assets.js +10 -11
- package/dist/assets.js.map +1 -1
- package/dist/billing-terms.d.ts +8 -0
- package/dist/broll-policy.js +2 -3
- package/dist/broll-policy.js.map +1 -1
- package/dist/caption-geometry.js +10 -8
- package/dist/caption-geometry.js.map +1 -1
- package/dist/contract-dispositions.d.ts +1575 -100
- package/dist/contract-dispositions.js +100 -14
- package/dist/contract-dispositions.js.map +1 -1
- package/dist/contracts/v1/workflow-brief.d.ts +10764 -2790
- package/dist/contracts/v1/workflow-brief.js +19 -1
- package/dist/contracts/v1/workflow-brief.js.map +1 -1
- package/dist/contracts/v1/workflow-catalog.d.ts +11612 -3536
- package/dist/contracts/v1/workflow-client.d.ts +5429 -1187
- package/dist/contracts/v1/workflow-client.js +9 -5
- package/dist/contracts/v1/workflow-client.js.map +1 -1
- package/dist/contracts/v1/workflow-execution.d.ts +242 -0
- package/dist/contracts/v1/workflow-execution.js +2 -2
- package/dist/contracts/v1/workflow-execution.js.map +1 -1
- package/dist/contracts/v1/workflow-next.d.ts +225 -0
- package/dist/contracts/v1/workflow-next.js +21 -0
- package/dist/contracts/v1/workflow-next.js.map +1 -0
- package/dist/contracts/v1/workflow-plan.d.ts +18556 -6429
- package/dist/contracts/v1/workflow-plan.js +2 -1
- package/dist/contracts/v1/workflow-plan.js.map +1 -1
- package/dist/contracts/v1/workflow-primitives.d.ts +20 -1
- package/dist/contracts/v1/workflow-primitives.js +8 -2
- package/dist/contracts/v1/workflow-primitives.js.map +1 -1
- package/dist/contracts/v1/workflow-run-read.d.ts +50 -0
- package/dist/creator-profile.d.ts +1 -0
- package/dist/creator-profile.js +13 -7
- package/dist/creator-profile.js.map +1 -1
- package/dist/design.d.ts +921 -0
- package/dist/design.js +183 -0
- package/dist/design.js.map +1 -0
- package/dist/edit-candidate.d.ts +2 -0
- package/dist/edit-candidate.js +3 -0
- package/dist/edit-candidate.js.map +1 -1
- package/dist/edit-faceless.js +2 -1
- package/dist/edit-faceless.js.map +1 -1
- package/dist/endpoint-notes.js +19 -0
- package/dist/endpoint-notes.js.map +1 -1
- package/dist/endpoints.js +21 -4
- package/dist/endpoints.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +7 -0
- package/dist/errors.js.map +1 -1
- package/dist/face-billing.d.ts +39 -0
- package/dist/face-billing.js +11 -1
- package/dist/face-billing.js.map +1 -1
- package/dist/faceless-action-shots.d.ts +31 -0
- package/dist/faceless-action-shots.js +51 -0
- package/dist/faceless-action-shots.js.map +1 -0
- package/dist/faceless-media-record.d.ts +56 -0
- package/dist/faceless-media-record.js +6 -2
- package/dist/faceless-media-record.js.map +1 -1
- package/dist/faceless-price.d.ts +22 -0
- package/dist/faceless-price.js +27 -3
- package/dist/faceless-price.js.map +1 -1
- package/dist/faceless-public-plan.d.ts +10 -1
- package/dist/faceless-public-plan.js +4 -0
- package/dist/faceless-public-plan.js.map +1 -1
- package/dist/faceless-public.d.ts +5583 -184
- package/dist/faceless-public.js +114 -16
- package/dist/faceless-public.js.map +1 -1
- package/dist/feedback.js +1 -1
- package/dist/feedback.js.map +1 -1
- package/dist/generations-output.js +1 -1
- package/dist/generations-output.js.map +1 -1
- package/dist/generations.d.ts +1 -1
- package/dist/generations.js +2 -2
- package/dist/index.d.ts +10 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/live-shot-kinds.d.ts +22 -0
- package/dist/live-shot-kinds.js +17 -0
- package/dist/live-shot-kinds.js.map +1 -0
- package/dist/long-form-profile.d.ts +1 -1
- package/dist/long-form-profile.js +1 -1
- package/dist/mcp-ugc-descriptions.d.ts +32 -0
- package/dist/mcp-ugc-descriptions.js +112 -0
- package/dist/mcp-ugc-descriptions.js.map +1 -0
- package/dist/motion-styles.d.ts +54 -0
- package/dist/motion-styles.js +67 -0
- package/dist/motion-styles.js.map +1 -0
- package/dist/moves.d.ts +222 -0
- package/dist/moves.js +81 -0
- package/dist/moves.js.map +1 -0
- package/dist/music.d.ts +18 -0
- package/dist/music.js +29 -0
- package/dist/music.js.map +1 -0
- package/dist/openapi.d.ts +3 -1
- package/dist/openapi.js +32 -5
- package/dist/openapi.js.map +1 -1
- package/dist/parts-pricing.d.ts +14 -3
- package/dist/parts-pricing.js +23 -5
- package/dist/parts-pricing.js.map +1 -1
- package/dist/prices.d.ts +6 -1
- package/dist/prices.js +56 -17
- package/dist/prices.js.map +1 -1
- package/dist/reference-analysis.d.ts +134 -0
- package/dist/reference-analysis.js +45 -33
- package/dist/reference-analysis.js.map +1 -1
- package/dist/reference-display.js +3 -0
- package/dist/reference-display.js.map +1 -1
- package/dist/reference-kinds.d.ts +3 -2
- package/dist/reference-kinds.js +2 -1
- package/dist/reference-kinds.js.map +1 -1
- package/dist/reference-profile.d.ts +437 -0
- package/dist/reference-profile.js +46 -5
- package/dist/reference-profile.js.map +1 -1
- package/dist/reference-staging.d.ts +54 -2
- package/dist/reference-staging.js +28 -5
- package/dist/reference-staging.js.map +1 -1
- package/dist/reference-text-spans.d.ts +26 -0
- package/dist/reference-text-spans.js +76 -0
- package/dist/reference-text-spans.js.map +1 -0
- package/dist/resolved-timeline.d.ts +173 -0
- package/dist/resolved-timeline.js +16 -5
- package/dist/resolved-timeline.js.map +1 -1
- package/dist/run-media.d.ts +5 -0
- package/dist/run-media.js +17 -0
- package/dist/run-media.js.map +1 -0
- package/dist/run-static-warnings.js +12 -3
- package/dist/run-static-warnings.js.map +1 -1
- package/dist/runs.d.ts +49 -0
- package/dist/runs.js +5 -0
- package/dist/runs.js.map +1 -1
- package/dist/scene-graph.d.ts +547 -0
- package/dist/scene-graph.js +296 -0
- package/dist/scene-graph.js.map +1 -0
- package/dist/scene-place.d.ts +2 -0
- package/dist/scene-place.js +6 -0
- package/dist/scene-place.js.map +1 -1
- package/dist/semantic-inserts.d.ts +2 -1
- package/dist/semantic-inserts.js +4 -4
- package/dist/semantic-inserts.js.map +1 -1
- package/dist/skills.d.ts +11743 -5428
- package/dist/skills.js +248 -59
- package/dist/skills.js.map +1 -1
- package/dist/templates/chart.d.ts +35 -0
- package/dist/templates/chart.js +38 -0
- package/dist/templates/chart.js.map +1 -0
- package/dist/templates/chat-window.d.ts +58 -0
- package/dist/templates/chat-window.js +57 -0
- package/dist/templates/chat-window.js.map +1 -0
- package/dist/templates/compare.d.ts +10 -2
- package/dist/templates/compare.js +13 -9
- package/dist/templates/compare.js.map +1 -1
- package/dist/templates/hand-title.d.ts +32 -0
- package/dist/templates/hand-title.js +47 -0
- package/dist/templates/hand-title.js.map +1 -0
- package/dist/templates/index.d.ts +33 -7
- package/dist/templates/index.js +95 -51
- package/dist/templates/index.js.map +1 -1
- package/dist/templates/lower-third.d.ts +11 -0
- package/dist/templates/lower-third.js +8 -3
- package/dist/templates/lower-third.js.map +1 -1
- package/dist/templates/notification.d.ts +24 -2
- package/dist/templates/notification.js +21 -12
- package/dist/templates/notification.js.map +1 -1
- package/dist/templates/phone-screen.d.ts +37 -0
- package/dist/templates/phone-screen.js +41 -0
- package/dist/templates/phone-screen.js.map +1 -0
- package/dist/templates/pointer-chips.d.ts +40 -0
- package/dist/templates/pointer-chips.js +53 -0
- package/dist/templates/pointer-chips.js.map +1 -0
- package/dist/templates/quote.d.ts +2 -2
- package/dist/templates/quote.js +5 -5
- package/dist/templates/quote.js.map +1 -1
- package/dist/templates/race.d.ts +32 -0
- package/dist/templates/race.js +43 -0
- package/dist/templates/race.js.map +1 -0
- package/dist/templates/size.d.ts +20 -0
- package/dist/templates/size.js +14 -0
- package/dist/templates/size.js.map +1 -1
- package/dist/templates/slot.js +1 -1
- package/dist/templates/slot.js.map +1 -1
- package/dist/templates/sounds.d.ts +221 -4
- package/dist/templates/sounds.js +40 -10
- package/dist/templates/sounds.js.map +1 -1
- package/dist/templates/terminal.d.ts +46 -0
- package/dist/templates/terminal.js +46 -0
- package/dist/templates/terminal.js.map +1 -0
- package/dist/templates/video-grid.d.ts +52 -0
- package/dist/templates/video-grid.js +50 -0
- package/dist/templates/video-grid.js.map +1 -0
- package/dist/templates/word-fill.d.ts +22 -0
- package/dist/templates/word-fill.js +29 -0
- package/dist/templates/word-fill.js.map +1 -0
- package/dist/templates/word-title.d.ts +24 -0
- package/dist/templates/word-title.js +33 -0
- package/dist/templates/word-title.js.map +1 -0
- package/dist/trend-search.d.ts +336 -0
- package/dist/trend-search.js +307 -0
- package/dist/trend-search.js.map +1 -0
- package/dist/ugc-call.d.ts +4 -4
- package/dist/ugc-call.js +4 -4
- package/dist/ugc-call.js.map +1 -1
- package/dist/ugc-framing.d.ts +3 -2
- package/dist/ugc-framing.js +4 -3
- package/dist/ugc-framing.js.map +1 -1
- package/dist/ugc-interview.d.ts +3 -3
- package/dist/ugc-interview.js +3 -3
- package/dist/ugc-interview.js.map +1 -1
- package/dist/ugc-layers.d.ts +43 -7
- package/dist/ugc-layers.js +43 -11
- package/dist/ugc-layers.js.map +1 -1
- package/dist/ugc-scenes.d.ts +40 -0
- package/dist/ugc-scenes.js +35 -0
- package/dist/ugc-scenes.js.map +1 -0
- package/dist/uploads.d.ts +1 -1
- package/dist/uploads.js +9 -9
- package/dist/uploads.js.map +1 -1
- package/dist/voice-admission.d.ts +4767 -836
- package/dist/voice-catalog-data.d.ts +1 -0
- package/dist/voice-catalog.d.ts +2 -0
- package/dist/voice-catalog.generated.json +286 -0
- package/dist/voice-catalog.js +1 -0
- package/dist/voice-catalog.js.map +1 -1
- package/dist/voice-pace.generated.json +65 -0
- package/dist/voices.d.ts +1 -0
- package/dist/voices.js +2 -1
- package/dist/voices.js.map +1 -1
- package/dist/workflows/index.d.ts +2 -0
- package/dist/workflows/index.js +1 -0
- package/dist/workflows/index.js.map +1 -1
- package/dist/workflows/methods/faceless-explainer.d.ts +2275 -188
- package/dist/workflows/methods/kinetic-launch.d.ts +2275 -188
- package/dist/workflows/methods/product-image-story.d.ts +2275 -188
- package/dist/workflows/methods/reference-remake.d.ts +2275 -188
- package/dist/workflows/methods/shared.d.ts +2275 -188
- package/dist/workflows/methods/ugc-faq-answer.d.ts +2275 -188
- package/dist/workflows/methods/ugc-product-intro.d.ts +2275 -188
- package/dist/workflows/methods/website-proof-demo.d.ts +2275 -188
- package/dist/workflows/motion-director.d.ts +59 -0
- package/dist/workflows/motion-director.js +118 -0
- package/dist/workflows/motion-director.js.map +1 -0
- package/dist/workflows/reference-remake.d.ts +1172 -2
- package/dist/workflows/reference-remake.js +940 -115
- package/dist/workflows/reference-remake.js.map +1 -1
- package/dist/workflows/remake-chooser.d.ts +16 -0
- package/dist/workflows/remake-chooser.js +10 -0
- package/dist/workflows/remake-chooser.js.map +1 -0
- package/dist/workflows/remake-motion.d.ts +100 -0
- package/dist/workflows/remake-motion.js +237 -0
- package/dist/workflows/remake-motion.js.map +1 -0
- package/dist/workflows/validate.js +1 -1
- package/dist/workflows/validate.js.map +1 -1
- package/package.json +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lower-third.js","sourceRoot":"","sources":["../../src/templates/lower-third.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,WAAW,CA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AAK,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,EAAE,CAAC;IAC5G,CAAC;IACD,MAAM,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,2BAA2B,EAAE,IAAI,EAAE,MAAM,EAAE;CAC/E,CAAC;AAEF,yDAAyD;AACzD,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,GAAG,UAAU,EAAE,WAAW,EAAE,CAAC,EAA+B,CAAC"}
|
|
@@ -2,10 +2,12 @@ import { z } from "zod";
|
|
|
2
2
|
import type { TemplateKind } from "./index.js";
|
|
3
3
|
/** The title's line at medium on a 1080 short side; the band above the face shrinks it in square and wide frames. */
|
|
4
4
|
export declare const NOTIFICATION_FONT_PX = 38;
|
|
5
|
-
/** Font sizes: the card's height (app, title and body lines with padding)
|
|
5
|
+
/** Font sizes: the card's height (app, title and body lines with padding), its widest, and how far each card pushed back peeks below the
|
|
6
|
+
* one in front (#1119). */
|
|
6
7
|
export declare const NOTIFICATION_EMS: {
|
|
7
8
|
readonly height: 3.6;
|
|
8
9
|
readonly width: 26;
|
|
10
|
+
readonly peek: 0.45;
|
|
9
11
|
};
|
|
10
12
|
declare const data: z.ZodObject<{
|
|
11
13
|
app: z.ZodString;
|
|
@@ -19,12 +21,32 @@ declare const data: z.ZodObject<{
|
|
|
19
21
|
star: "star";
|
|
20
22
|
user: "user";
|
|
21
23
|
}>>;
|
|
24
|
+
stack: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
25
|
+
app: z.ZodOptional<z.ZodString>;
|
|
26
|
+
title: z.ZodString;
|
|
27
|
+
body: z.ZodString;
|
|
28
|
+
icon: z.ZodOptional<z.ZodEnum<{
|
|
29
|
+
briefcase: "briefcase";
|
|
30
|
+
chat: "chat";
|
|
31
|
+
clock: "clock";
|
|
32
|
+
phone: "phone";
|
|
33
|
+
star: "star";
|
|
34
|
+
user: "user";
|
|
35
|
+
}>>;
|
|
36
|
+
at: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strict>>>;
|
|
22
38
|
size: z.ZodOptional<z.ZodEnum<{
|
|
23
39
|
large: "large";
|
|
24
40
|
medium: "medium";
|
|
25
41
|
small: "small";
|
|
26
42
|
}>>;
|
|
27
43
|
}, z.core.$strict>;
|
|
28
|
-
/**
|
|
44
|
+
/** The stack's height in font sizes: the front card and the edges of the cards behind it. */
|
|
45
|
+
export declare const notificationEms: (value: {
|
|
46
|
+
stack?: readonly unknown[] | undefined;
|
|
47
|
+
}) => number;
|
|
48
|
+
/** A phone notification in the band above the face, centred at the top of every format; more of them stack on top on their beats. */
|
|
29
49
|
export declare const notification: TemplateKind<typeof data>;
|
|
50
|
+
/** Version 1: one card; its footprint is version 2's without a stack. */
|
|
51
|
+
export declare const notificationV1: TemplateKind<typeof data>;
|
|
30
52
|
export {};
|
|
@@ -4,29 +4,38 @@ import { CHECKLIST_ICONS } from "./checklist.js";
|
|
|
4
4
|
import { sizedScale, templateSize } from "./size.js";
|
|
5
5
|
/** The title's line at medium on a 1080 short side; the band above the face shrinks it in square and wide frames. */
|
|
6
6
|
export const NOTIFICATION_FONT_PX = 38;
|
|
7
|
-
/** Font sizes: the card's height (app, title and body lines with padding)
|
|
8
|
-
|
|
7
|
+
/** Font sizes: the card's height (app, title and body lines with padding), its widest, and how far each card pushed back peeks below the
|
|
8
|
+
* one in front (#1119). */
|
|
9
|
+
export const NOTIFICATION_EMS = { height: 3.6, width: 26, peek: 0.45 };
|
|
10
|
+
const card = z.object({ app: z.string().min(1).max(20).optional(), title: z.string().min(1).max(32), body: z.string().min(1).max(80),
|
|
11
|
+
icon: z.enum(CHECKLIST_ICONS).optional(), at: z.string().min(1).max(200).optional() }).strict();
|
|
9
12
|
const data = z.object({ app: z.string().min(1).max(20), title: z.string().min(1).max(32), body: z.string().min(1).max(80),
|
|
10
|
-
icon: z.enum(CHECKLIST_ICONS).optional(), size: templateSize }).strict();
|
|
11
|
-
/**
|
|
13
|
+
icon: z.enum(CHECKLIST_ICONS).optional(), stack: z.array(card).min(1).max(2).optional(), size: templateSize }).strict();
|
|
14
|
+
/** The stack's height in font sizes: the front card and the edges of the cards behind it. */
|
|
15
|
+
export const notificationEms = (value) => NOTIFICATION_EMS.height + (value.stack?.length ?? 0) * NOTIFICATION_EMS.peek;
|
|
16
|
+
/** A phone notification in the band above the face, centred at the top of every format; more of them stack on top on their beats. */
|
|
12
17
|
export const notification = {
|
|
13
18
|
kind: "notification",
|
|
14
|
-
kindVersion:
|
|
15
|
-
description: "a phone notification at the top, above the face: an icon (else the app's initial), the app, a title and a body line; it " +
|
|
16
|
-
"
|
|
19
|
+
kindVersion: 2,
|
|
20
|
+
description: "a phone notification at the top, above the face: an icon (else the app's initial), the app, a title and a body line; it drops " +
|
|
21
|
+
"in, holds at least 1.2 s and leaves before its span ends; each stack card drops in on top on its at, pushing earlier ones back",
|
|
17
22
|
placements: ["over"],
|
|
18
23
|
data,
|
|
19
|
-
text: { app: 20, title: 32, body: 80 },
|
|
24
|
+
text: { app: 20, title: 32, body: 80, "stack.app": 20, "stack.title": 32, "stack.body": 80 },
|
|
25
|
+
quotes: ["stack.at"],
|
|
20
26
|
slots: {},
|
|
21
27
|
hidesCaptions: () => false,
|
|
22
28
|
onInserts: false,
|
|
23
29
|
rect: (value, aspectRatio, _placement, framing) => {
|
|
24
|
-
const canvas = frameCanvasOf(aspectRatio), { width: w, height: h } = canvas;
|
|
30
|
+
const canvas = frameCanvasOf(aspectRatio), { width: w, height: h } = canvas, ems = notificationEms(value);
|
|
25
31
|
const top = Math.round(0.012 * h), room = Math.floor(faceZone(aspectRatio, framing).top * h) - top;
|
|
26
|
-
const em = Math.min(NOTIFICATION_FONT_PX * sizedScale(value.size, canvas), room /
|
|
27
|
-
const width = Math.round(Math.min(0.92 * w, NOTIFICATION_EMS.width * em)), height = Math.round(
|
|
32
|
+
const em = Math.min(NOTIFICATION_FONT_PX * sizedScale(value.size, canvas), room / ems);
|
|
33
|
+
const width = Math.round(Math.min(0.92 * w, NOTIFICATION_EMS.width * em)), height = Math.round(ems * em);
|
|
28
34
|
return { left: Math.round((w - width) / 2) / w, top: top / h, width: width / w, height: height / h };
|
|
29
35
|
},
|
|
30
|
-
sample: { app: "Front Desk", title: "New booking: Maya Chen", body: "Tomorrow at 10:30, teeth cleaning. Booked while you slept.", icon: "chat"
|
|
36
|
+
sample: { app: "Front Desk", title: "New booking: Maya Chen", body: "Tomorrow at 10:30, teeth cleaning. Booked while you slept.", icon: "chat",
|
|
37
|
+
stack: [{ app: "Front Desk", title: "New booking: Sam Ortiz", body: "Friday at 9:00, whitening.", icon: "chat", at: "Sam" }] },
|
|
31
38
|
};
|
|
39
|
+
/** Version 1: one card; its footprint is version 2's without a stack. */
|
|
40
|
+
export const notificationV1 = { ...notification, kindVersion: 1 };
|
|
32
41
|
//# sourceMappingURL=notification.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.js","sourceRoot":"","sources":["../../src/templates/notification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAErD,qHAAqH;AACrH,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AACvC
|
|
1
|
+
{"version":3,"file":"notification.js","sourceRoot":"","sources":["../../src/templates/notification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AA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tag add a pill, a badge or a chip that stays. */
|
|
4
|
+
export declare const PHONE_SCREEN_STATES: readonly ["lock", "play", "liked", "counter", "timer", "tag"];
|
|
5
|
+
/** The phone's size unit at medium on a 1080 short side; every pill's text is 0.95 of it. A tall frame's height caps it, so the phone fills most of
|
|
6
|
+
* the frame and its pills' lowercase letters stand at least 36 px (#1128). */
|
|
7
|
+
export declare const PHONE_SCREEN_FONT_PX = 84;
|
|
8
|
+
/** Units: the phone's width (a 9:16 screen in its bezel) and its height; the counter and the chips sit on the screen. */
|
|
9
|
+
export declare const PHONE_SCREEN_EMS: {
|
|
10
|
+
readonly phone: 11.5;
|
|
11
|
+
readonly phoneHeight: 21.2;
|
|
12
|
+
};
|
|
13
|
+
declare const data: z.ZodObject<{
|
|
14
|
+
screen: z.ZodOptional<z.ZodObject<{
|
|
15
|
+
asset_id: z.ZodString;
|
|
16
|
+
}, z.core.$strict>>;
|
|
17
|
+
states: z.ZodArray<z.ZodObject<{
|
|
18
|
+
state: z.ZodEnum<{
|
|
19
|
+
counter: "counter";
|
|
20
|
+
liked: "liked";
|
|
21
|
+
lock: "lock";
|
|
22
|
+
play: "play";
|
|
23
|
+
tag: "tag";
|
|
24
|
+
timer: "timer";
|
|
25
|
+
}>;
|
|
26
|
+
text: z.ZodOptional<z.ZodString>;
|
|
27
|
+
at: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, z.core.$strict>>;
|
|
29
|
+
size: z.ZodOptional<z.ZodEnum<{
|
|
30
|
+
large: "large";
|
|
31
|
+
medium: "medium";
|
|
32
|
+
small: "small";
|
|
33
|
+
}>>;
|
|
34
|
+
}, z.core.$strict>;
|
|
35
|
+
/** A phone at the centre of a full frame whose screen changes state on beats: the reel behind a lock, playing, liked, with counters and chips. */
|
|
36
|
+
export declare const phoneScreen: TemplateKind<typeof data>;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { frameCanvasOf } from "../ugc-layers.js";
|
|
3
|
+
import { centredArea, fillingStep, fullWidth, sizedScale, templateSize } from "./size.js";
|
|
4
|
+
import { templateMedia } from "./slot.js";
|
|
5
|
+
/** lock, play and liked set what the screen shows; counter, timer and tag add a pill, a badge or a chip that stays. */
|
|
6
|
+
export const PHONE_SCREEN_STATES = ["lock", "play", "liked", "counter", "timer", "tag"];
|
|
7
|
+
/** The phone's size unit at medium on a 1080 short side; every pill's text is 0.95 of it. A tall frame's height caps it, so the phone fills most of
|
|
8
|
+
* the frame and its pills' lowercase letters stand at least 36 px (#1128). */
|
|
9
|
+
export const PHONE_SCREEN_FONT_PX = 84;
|
|
10
|
+
/** Units: the phone's width (a 9:16 screen in its bezel) and its height; the counter and the chips sit on the screen. */
|
|
11
|
+
export const PHONE_SCREEN_EMS = { phone: 11.5, phoneHeight: 21.2 };
|
|
12
|
+
const state = z.object({ state: z.enum(PHONE_SCREEN_STATES), text: z.string().min(1).max(24).optional(), at: z.string().min(1).max(200).optional() })
|
|
13
|
+
.strict();
|
|
14
|
+
const data = z.object({ screen: templateMedia.optional(), states: z.array(state).min(1).max(6), size: templateSize }).strict();
|
|
15
|
+
/** A phone at the centre of a full frame whose screen changes state on beats: the reel behind a lock, playing, liked, with counters and chips. */
|
|
16
|
+
export const phoneScreen = {
|
|
17
|
+
kind: "phone_screen",
|
|
18
|
+
kindVersion: 1,
|
|
19
|
+
description: "a full-frame phone playing the screen video (muted; a gradient without one) whose states change in turn, each on its at " +
|
|
20
|
+
"quote or spread evenly: lock (dimmed, a lock and the text), play (the video clear, the text at its top), liked (a heart and the text), counter (a pill " +
|
|
21
|
+
"at the screen's foot), timer (a badge on its top edge), tag (a chip with a pointer line at the screen's side); lock, play and liked replace one " +
|
|
22
|
+
"another, tags add up, a later counter or timer replaces the earlier",
|
|
23
|
+
placements: ["full"],
|
|
24
|
+
data,
|
|
25
|
+
text: { "states.text": 24 },
|
|
26
|
+
quotes: ["states.at"],
|
|
27
|
+
spreads: "states",
|
|
28
|
+
// The phone is in by frame 6.
|
|
29
|
+
beatsFrom: 7,
|
|
30
|
+
slots: { screen: { type: "video", cover: 9 / 16 } },
|
|
31
|
+
hidesCaptions: () => true,
|
|
32
|
+
onInserts: false,
|
|
33
|
+
fillsFrame: true,
|
|
34
|
+
rect: (value, aspectRatio) => {
|
|
35
|
+
const canvas = frameCanvasOf(aspectRatio), em = fillingStep(value.size) * Math.min(PHONE_SCREEN_FONT_PX * sizedScale("medium", canvas), (0.92 * canvas.height) / PHONE_SCREEN_EMS.phoneHeight, fullWidth("medium", canvas) / PHONE_SCREEN_EMS.phone);
|
|
36
|
+
return centredArea(canvas, fullWidth(value.size, canvas), PHONE_SCREEN_EMS.phoneHeight * em);
|
|
37
|
+
},
|
|
38
|
+
sample: { states: [{ state: "lock", text: "Log in to watch", at: "locked" }, { state: "play", text: "now playing", at: "plays" }, { state: "liked", text: "watch only", at: "like" },
|
|
39
|
+
{ state: "counter", text: "41 broken down", at: "forty" }, { state: "tag", text: "hook", at: "hook" }] },
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=phone-screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-screen.js","sourceRoot":"","sources":["../../src/templates/phone-screen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,uHAAuH;AACvH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,CAAU,CAAC;AACjG;8EAC8E;AAC9E,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAC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layers.js";
|
|
3
|
+
import type { TemplateKind } from "./index.js";
|
|
4
|
+
/** A chip's text at medium on a 1080 short side. */
|
|
5
|
+
export declare const POINTER_CHIPS_FONT_PX = 44;
|
|
6
|
+
/** Text sizes: a chip's row, the gap between rows, the column's width, and the dot's radius at a target. */
|
|
7
|
+
export declare const POINTER_CHIPS_EMS: {
|
|
8
|
+
readonly row: 1.6;
|
|
9
|
+
readonly gap: 0.5;
|
|
10
|
+
readonly width: 9;
|
|
11
|
+
readonly dot: 0.35;
|
|
12
|
+
};
|
|
13
|
+
declare const data: z.ZodObject<{
|
|
14
|
+
items: z.ZodArray<z.ZodObject<{
|
|
15
|
+
target: z.ZodObject<{
|
|
16
|
+
x: z.ZodNumber;
|
|
17
|
+
y: z.ZodNumber;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
text: z.ZodString;
|
|
20
|
+
at: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strict>>;
|
|
22
|
+
side: z.ZodOptional<z.ZodEnum<{
|
|
23
|
+
left: "left";
|
|
24
|
+
right: "right";
|
|
25
|
+
}>>;
|
|
26
|
+
size: z.ZodOptional<z.ZodEnum<{
|
|
27
|
+
large: "large";
|
|
28
|
+
medium: "medium";
|
|
29
|
+
small: "small";
|
|
30
|
+
}>>;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
type Data = z.infer<typeof data>;
|
|
33
|
+
/** The chips' column below the face at the side, in every format, and a dot's radius in pixels. */
|
|
34
|
+
export declare function pointerChipsParts(value: Data, aspectRatio: string, framing?: PresenterFraming): {
|
|
35
|
+
chips: LayerRect;
|
|
36
|
+
dot: number;
|
|
37
|
+
};
|
|
38
|
+
/** Labelled chips in a column, each joined by a curved line to a point of the frame, appearing in turn; the chips keep off the face. */
|
|
39
|
+
export declare const pointerChips: TemplateKind<typeof data>;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { faceZone, frameCanvasOf } from "../ugc-layers.js";
|
|
3
|
+
import { sizedScale, templateSize } from "./size.js";
|
|
4
|
+
/** A chip's text at medium on a 1080 short side. */
|
|
5
|
+
export const POINTER_CHIPS_FONT_PX = 44;
|
|
6
|
+
/** Text sizes: a chip's row, the gap between rows, the column's width, and the dot's radius at a target. */
|
|
7
|
+
export const POINTER_CHIPS_EMS = { row: 1.6, gap: 0.5, width: 9, dot: 0.35 };
|
|
8
|
+
const percent = z.number().min(0).max(100);
|
|
9
|
+
const item = z.object({ target: z.object({ x: percent, y: percent }).strict(), text: z.string().min(1).max(20), at: z.string().min(1).max(200).optional() })
|
|
10
|
+
.strict();
|
|
11
|
+
const data = z.object({ items: z.array(item).min(1).max(4), side: z.enum(["left", "right"]).optional(), size: templateSize }).strict();
|
|
12
|
+
/** The chips' column below the face at the side, in every format, and a dot's radius in pixels. */
|
|
13
|
+
export function pointerChipsParts(value, aspectRatio, framing = "close") {
|
|
14
|
+
const canvas = frameCanvasOf(aspectRatio), { width: w, height: h } = canvas, margin = Math.round(0.04 * Math.min(w, h)), face = faceZone(aspectRatio, framing);
|
|
15
|
+
const rows = value.items.length, ems = rows * POINTER_CHIPS_EMS.row + (rows - 1) * POINTER_CHIPS_EMS.gap, below = Math.round((face.top + face.height + 0.01) * h);
|
|
16
|
+
const em = Math.min(POINTER_CHIPS_FONT_PX * sizedScale(value.size, canvas), (h - margin - below) / ems), height = Math.round(ems * em);
|
|
17
|
+
const width = Math.round(Math.min(0.6 * w, POINTER_CHIPS_EMS.width * em));
|
|
18
|
+
const right = (value.side ?? "right") === "right", left = right ? w - margin - width : margin;
|
|
19
|
+
const top = Math.min(h - margin - height, Math.max(below, Math.round(0.71 * h - height / 2)));
|
|
20
|
+
return { chips: { left: left / w, top: top / h, width: width / w, height: height / h }, dot: Math.ceil(POINTER_CHIPS_EMS.dot * em) + 2 };
|
|
21
|
+
}
|
|
22
|
+
/** The footprint: the column and every target with its dot, cropped to the frame; the lines run between them, inside it. */
|
|
23
|
+
function footprint(value, aspectRatio, _placement, framing) {
|
|
24
|
+
const { width: w, height: h } = frameCanvasOf(aspectRatio), { chips, dot } = pointerChipsParts(value, aspectRatio, framing);
|
|
25
|
+
const xs = [chips.left * w, (chips.left + chips.width) * w, ...value.items.flatMap(entry => [(entry.target.x / 100) * w - dot, (entry.target.x / 100) * w + dot])];
|
|
26
|
+
const ys = [chips.top * h, (chips.top + chips.height) * h, ...value.items.flatMap(entry => [(entry.target.y / 100) * h - dot, (entry.target.y / 100) * h + dot])];
|
|
27
|
+
const [left, top] = [Math.max(0, Math.floor(Math.min(...xs))), Math.max(0, Math.floor(Math.min(...ys)))];
|
|
28
|
+
const [right, bottom] = [Math.min(w, Math.ceil(Math.max(...xs))), Math.min(h, Math.ceil(Math.max(...ys)))];
|
|
29
|
+
return { left: left / w, top: top / h, width: (right - left) / w, height: (bottom - top) / h };
|
|
30
|
+
}
|
|
31
|
+
/** Labelled chips in a column, each joined by a curved line to a point of the frame, appearing in turn; the chips keep off the face. */
|
|
32
|
+
export const pointerChips = {
|
|
33
|
+
kind: "pointer_chips",
|
|
34
|
+
kindVersion: 1,
|
|
35
|
+
description: "1–4 chips in a column below the face (right unless side left), each joined by a curved line to a " +
|
|
36
|
+
"dot on its target {x,y} in % of the frame from its top left, appearing in turn on its at quote or spread evenly; the lines may cross " +
|
|
37
|
+
"the face, the chips keep off it; also over an insert",
|
|
38
|
+
placements: ["over"],
|
|
39
|
+
data,
|
|
40
|
+
text: { "items.text": 20 },
|
|
41
|
+
quotes: ["items.at"],
|
|
42
|
+
spreads: "items",
|
|
43
|
+
beatsFrom: 1,
|
|
44
|
+
slots: {},
|
|
45
|
+
hidesCaptions: () => false,
|
|
46
|
+
onInserts: true,
|
|
47
|
+
rect: footprint,
|
|
48
|
+
parts: (value, aspectRatio, framing) => ({ chips: pointerChipsParts(value, aspectRatio, framing).chips }),
|
|
49
|
+
faceRect: (value, aspectRatio, framing) => pointerChipsParts(value, aspectRatio, framing).chips,
|
|
50
|
+
sample: { items: [{ target: { x: 30, y: 62 }, text: "hook", at: "hook" }, { target: { x: 38, y: 74 }, text: "scenes", at: "scenes" },
|
|
51
|
+
{ target: { x: 46, y: 86 }, text: "comments", at: "comments" }] },
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=pointer-chips.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pointer-chips.js","sourceRoot":"","sources":["../../src/templates/pointer-chips.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAyC,MAAM,kBAAkB,CAAC;AAElG,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAErD,oDAAoD;AACpD,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACxC,4GAA4G;AAC5G,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAW,CAAC;AACtF,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC3C,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC;KACzJ,MA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AM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE;YAClI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE;CACpE,CAAC"}
|
|
@@ -2,8 +2,8 @@ import { z } from "zod";
|
|
|
2
2
|
import type { TemplateKind } from "./index.js";
|
|
3
3
|
/** The quote's text at medium on a 1080 short side. */
|
|
4
4
|
export declare const QUOTE_FONT_PX = 72;
|
|
5
|
-
/** The drawn area is this many text sizes high: the marks, four lines and the author row. */
|
|
6
|
-
export declare const QUOTE_RECT_EMS =
|
|
5
|
+
/** The drawn area is this many text sizes high: the card's padding, the marks, four lines and the author row. */
|
|
6
|
+
export declare const QUOTE_RECT_EMS = 9.5;
|
|
7
7
|
declare const data: z.ZodObject<{
|
|
8
8
|
text: z.ZodString;
|
|
9
9
|
author: z.ZodOptional<z.ZodString>;
|
package/dist/templates/quote.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { frameCanvasOf } from "../ugc-layers.js";
|
|
3
|
-
import { sizedScale, templateSize } from "./size.js";
|
|
3
|
+
import { fullWidth, sizedScale, templateSize } from "./size.js";
|
|
4
4
|
import { templateMedia } from "./slot.js";
|
|
5
5
|
/** The quote's text at medium on a 1080 short side. */
|
|
6
6
|
export const QUOTE_FONT_PX = 72;
|
|
7
|
-
/** The drawn area is this many text sizes high: the marks, four lines and the author row. */
|
|
8
|
-
export const QUOTE_RECT_EMS =
|
|
7
|
+
/** The drawn area is this many text sizes high: the card's padding, the marks, four lines and the author row. */
|
|
8
|
+
export const QUOTE_RECT_EMS = 9.5;
|
|
9
9
|
const data = z.object({ text: z.string().min(1).max(120), author: z.string().min(1).max(32).optional(), photo: templateMedia.optional(),
|
|
10
10
|
size: templateSize }).strict();
|
|
11
11
|
/** A full-frame quote: marks, then the text in up to four lines, then the author with an optional round photo. */
|
|
12
12
|
export const quote = {
|
|
13
13
|
kind: "quote",
|
|
14
14
|
kindVersion: 1,
|
|
15
|
-
description: "a full-frame quote: marks, the text in up to four lines, then the author with an optional round photo, cut to a circle",
|
|
15
|
+
description: "a full-frame quote card: marks, the text in up to four lines, then the author with an optional round photo, cut to a circle",
|
|
16
16
|
placements: ["full"],
|
|
17
17
|
data,
|
|
18
18
|
text: { text: 120, author: 32 },
|
|
@@ -21,7 +21,7 @@ export const quote = {
|
|
|
21
21
|
onInserts: false,
|
|
22
22
|
rect: (value, aspectRatio) => {
|
|
23
23
|
const canvas = frameCanvasOf(aspectRatio), { width: w, height: h } = canvas, scale = sizedScale(value.size, canvas);
|
|
24
|
-
const width = Math.round(
|
|
24
|
+
const width = Math.round(fullWidth(value.size, canvas)), height = Math.round(Math.min(0.92 * h, QUOTE_RECT_EMS * QUOTE_FONT_PX * scale));
|
|
25
25
|
return { left: Math.round((w - width) / 2) / w, top: Math.round((h - height) / 2) / h, width: width / w, height: height / h };
|
|
26
26
|
},
|
|
27
27
|
sample: { text: "It answered every call while I was with patients, and nobody could tell.", author: "Maya Chen" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quote.js","sourceRoot":"","sources":["../../src/templates/quote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"quote.js","sourceRoot":"","sources":["../../src/templates/quote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MA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AE,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACpH,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,EAAE,cAAc,GAAG,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC;QACzI,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,EAAE,CAAC;IAChI,CAAC;IACD,MAAM,EAAE,EAAE,IAAI,EAAE,0EAA0E,EAAE,MAAM,EAAE,WAAW,EAAE;CAClH,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { TemplateKind } from "./index.js";
|
|
3
|
+
/** The text size at medium on a 1080 short side: the title's lowercase letters at least 36 px tall, as captions keep (#1128). */
|
|
4
|
+
export declare const RACE_FONT_PX = 90;
|
|
5
|
+
/** Text sizes: the title, one row per name, the round's label under the rows and the padding; the width is the full frame's. */
|
|
6
|
+
export declare const RACE_EMS: {
|
|
7
|
+
readonly title: 1.7;
|
|
8
|
+
readonly row: 1.9;
|
|
9
|
+
readonly round: 2.2;
|
|
10
|
+
readonly pad: 0.7;
|
|
11
|
+
};
|
|
12
|
+
declare const data: z.ZodObject<{
|
|
13
|
+
title: z.ZodOptional<z.ZodString>;
|
|
14
|
+
suffix: z.ZodOptional<z.ZodString>;
|
|
15
|
+
names: z.ZodArray<z.ZodString>;
|
|
16
|
+
rounds: z.ZodArray<z.ZodObject<{
|
|
17
|
+
label: z.ZodOptional<z.ZodString>;
|
|
18
|
+
values: z.ZodArray<z.ZodNumber>;
|
|
19
|
+
at: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strict>>;
|
|
21
|
+
size: z.ZodOptional<z.ZodEnum<{
|
|
22
|
+
large: "large";
|
|
23
|
+
medium: "medium";
|
|
24
|
+
small: "small";
|
|
25
|
+
}>>;
|
|
26
|
+
}, z.core.$strict>;
|
|
27
|
+
/** The card's height in text sizes, with one row per name. */
|
|
28
|
+
export declare const raceEms: (names: number) => number;
|
|
29
|
+
/** A ranked bar race on a full frame: the first round's bars grow in, then on each later round's beat the bars move to its values and the rows
|
|
30
|
+
* trade places by rank (#1120). */
|
|
31
|
+
export declare const race: TemplateKind<typeof data>;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { frameCanvasOf } from "../ugc-layers.js";
|
|
3
|
+
import { centredArea, fullWidth, sizedScale, templateSize } from "./size.js";
|
|
4
|
+
/** The text size at medium on a 1080 short side: the title's lowercase letters at least 36 px tall, as captions keep (#1128). */
|
|
5
|
+
export const RACE_FONT_PX = 90;
|
|
6
|
+
/** Text sizes: the title, one row per name, the round's label under the rows and the padding; the width is the full frame's. */
|
|
7
|
+
export const RACE_EMS = { title: 1.7, row: 1.9, round: 2.2, pad: 0.7 };
|
|
8
|
+
const value = z.number().min(0).max(999_999_999).multipleOf(0.01);
|
|
9
|
+
const round = z.object({ label: z.string().min(1).max(10).optional(), values: z.array(value).min(3).max(6), at: z.string().min(1).max(200).optional() }).strict();
|
|
10
|
+
const data = z.object({ title: z.string().min(1).max(40).optional(), suffix: z.string().min(1).max(6).optional(), names: z.array(z.string().min(1).max(14)).min(3).max(6),
|
|
11
|
+
rounds: z.array(round).min(2).max(5), size: templateSize }).strict().superRefine((entry, context) => {
|
|
12
|
+
for (const [index, each] of entry.rounds.entries())
|
|
13
|
+
if (each.values.length !== entry.names.length) {
|
|
14
|
+
context.addIssue({ code: z.ZodIssueCode.custom, path: ["rounds", index, "values"], message: `a round takes one value per name (${entry.names.length})` });
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
/** The card's height in text sizes, with one row per name. */
|
|
18
|
+
export const raceEms = (names) => RACE_EMS.title + names * RACE_EMS.row + RACE_EMS.round + 2 * RACE_EMS.pad;
|
|
19
|
+
/** A ranked bar race on a full frame: the first round's bars grow in, then on each later round's beat the bars move to its values and the rows
|
|
20
|
+
* trade places by rank (#1120). */
|
|
21
|
+
export const race = {
|
|
22
|
+
kind: "race",
|
|
23
|
+
kindVersion: 1,
|
|
24
|
+
description: "a full-frame ranked bar race: one bar per name, longest on top; the first round's values show from the start, then on each later " +
|
|
25
|
+
"round's at, or spread evenly, the bars move to its values and swap places by rank, the round's label showing under them",
|
|
26
|
+
placements: ["full"],
|
|
27
|
+
data,
|
|
28
|
+
text: { title: 40, suffix: 6, names: 14, "rounds.label": 10 },
|
|
29
|
+
quotes: ["rounds.at"],
|
|
30
|
+
// The first round is the start: its bars grow in from the first frame, so a full frame is never bare.
|
|
31
|
+
firstBeatAtStart: true,
|
|
32
|
+
slots: {},
|
|
33
|
+
hidesCaptions: () => true,
|
|
34
|
+
onInserts: false,
|
|
35
|
+
rect: (value, aspectRatio) => {
|
|
36
|
+
const canvas = frameCanvasOf(aspectRatio), ems = raceEms(value.names.length);
|
|
37
|
+
const em = Math.min(RACE_FONT_PX * sizedScale(value.size, canvas), (0.92 * canvas.height) / ems);
|
|
38
|
+
return centredArea(canvas, fullWidth(value.size, canvas), ems * em);
|
|
39
|
+
},
|
|
40
|
+
sample: { title: "Signups by channel", suffix: "k", names: ["Search", "Shorts", "Referrals"], rounds: [{ label: "May", values: [40, 25, 10], at: "may" },
|
|
41
|
+
{ label: "June", values: [44, 61, 18], at: "june" }] },
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL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EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;CACzD,CAAC"}
|
package/dist/templates/size.d.ts
CHANGED
|
@@ -6,7 +6,27 @@ export declare const templateSize: z.ZodOptional<z.ZodEnum<{
|
|
|
6
6
|
medium: "medium";
|
|
7
7
|
small: "small";
|
|
8
8
|
}>>;
|
|
9
|
+
/** The share of a tall frame's width a full-frame UI kind's area takes at medium and large, as reference reels fill it (#1128). */
|
|
10
|
+
export declare const FULL_WIDTH = 0.96;
|
|
11
|
+
/** A full-frame kind's area width: that share of the short side, a quarter less at small, never past that share of the frame's width. Its text
|
|
12
|
+
* size moves with the size on its own, so large draws larger text in the same width. */
|
|
13
|
+
export declare function fullWidth(size: (typeof TEMPLATE_SIZES)[number] | undefined, canvas: {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
}): number;
|
|
17
|
+
/** The size's step for a kind that fills the frame at medium: there is no room for large to grow, so it draws as medium, and small a quarter less. */
|
|
18
|
+
export declare const fillingStep: (size: (typeof TEMPLATE_SIZES)[number] | undefined) => number;
|
|
9
19
|
/** Pixels per pixel at a 1080 short side, times the size's scale. */
|
|
20
|
+
/** A full frame's content area of `width` × `height` pixels, centred, as shares of the frame. */
|
|
21
|
+
export declare function centredArea(canvas: {
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
}, width: number, height: number): {
|
|
25
|
+
left: number;
|
|
26
|
+
top: number;
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
};
|
|
10
30
|
export declare function sizedScale(size: (typeof TEMPLATE_SIZES)[number] | undefined, canvas: {
|
|
11
31
|
width: number;
|
|
12
32
|
height: number;
|
package/dist/templates/size.js
CHANGED
|
@@ -3,7 +3,21 @@ import { z } from "zod";
|
|
|
3
3
|
export const TEMPLATE_SIZES = ["small", "medium", "large"];
|
|
4
4
|
export const templateSize = z.enum(TEMPLATE_SIZES).optional();
|
|
5
5
|
const SCALE = { small: 0.75, medium: 1, large: 1.3 };
|
|
6
|
+
/** The share of a tall frame's width a full-frame UI kind's area takes at medium and large, as reference reels fill it (#1128). */
|
|
7
|
+
export const FULL_WIDTH = 0.96;
|
|
8
|
+
/** A full-frame kind's area width: that share of the short side, a quarter less at small, never past that share of the frame's width. Its text
|
|
9
|
+
* size moves with the size on its own, so large draws larger text in the same width. */
|
|
10
|
+
export function fullWidth(size, canvas) {
|
|
11
|
+
return Math.min(FULL_WIDTH * canvas.width, FULL_WIDTH * Math.min(canvas.width, canvas.height) * fillingStep(size));
|
|
12
|
+
}
|
|
13
|
+
/** The size's step for a kind that fills the frame at medium: there is no room for large to grow, so it draws as medium, and small a quarter less. */
|
|
14
|
+
export const fillingStep = (size) => (size === "small" ? SCALE.small : 1);
|
|
6
15
|
/** Pixels per pixel at a 1080 short side, times the size's scale. */
|
|
16
|
+
/** A full frame's content area of `width` × `height` pixels, centred, as shares of the frame. */
|
|
17
|
+
export function centredArea(canvas, width, height) {
|
|
18
|
+
const { width: w, height: h } = canvas, [rw, rh] = [Math.round(width), Math.round(height)];
|
|
19
|
+
return { left: Math.round((w - rw) / 2) / w, top: Math.round((h - rh) / 2) / h, width: rw / w, height: rh / h };
|
|
20
|
+
}
|
|
7
21
|
export function sizedScale(size, canvas) {
|
|
8
22
|
return (Math.min(canvas.width, canvas.height) / 1080) * SCALE[size ?? "medium"];
|
|
9
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"size.js","sourceRoot":"","sources":["../../src/templates/size.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,+FAA+F;AAC/F,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAC;AACpE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,IAA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,EAAE,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/H,qEAAqE;AACrE,iGAAiG;AACjG,MAAM,UAAU,WAAW,CAAC,MAAyC,EAAE,KAAa,EAAE,MAAc;IAClG,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3F,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC;AAClH,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAiD,EAAE,MAAyC;IACrH,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,IAAI,QAAQ,CAAC,CAAC;AAClF,CAAC"}
|
package/dist/templates/slot.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { assetId } from "../asset-identity.js";
|
|
3
3
|
/** A template's media slot: a ready asset of the account, pinned at admission by (template id, slot) (#778 S3a(ii), A1). */
|
|
4
|
-
export const templateMedia = z.object({ asset_id: assetId.describe("A ready asset
|
|
4
|
+
export const templateMedia = z.object({ asset_id: assetId.describe("A ready asset (list_assets, or create_asset from a generate_* run) of the kind the slot takes.") }).strict();
|
|
5
5
|
//# sourceMappingURL=slot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot.js","sourceRoot":"","sources":["../../src/templates/slot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,4HAA4H;AAC5H,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"slot.js","sourceRoot":"","sources":["../../src/templates/slot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,4HAA4H;AAC5H,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,gGAAgG,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC"}
|