@clipwright/core 0.32.0 → 0.34.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/CHANGELOG.md +180 -0
- package/dist/api-failure.d.ts +1 -0
- package/dist/api-failure.js +10 -4
- package/dist/api-failure.js.map +1 -1
- package/dist/asset-identity.d.ts +6 -0
- package/dist/asset-identity.js +7 -0
- package/dist/asset-identity.js.map +1 -0
- package/dist/assets.d.ts +641 -0
- package/dist/assets.js +214 -0
- package/dist/assets.js.map +1 -0
- package/dist/caption-language.d.ts +2 -0
- package/dist/caption-language.js +17 -0
- package/dist/caption-language.js.map +1 -0
- package/dist/contract-dispositions.d.ts +1133 -8
- package/dist/contract-dispositions.js +51 -11
- package/dist/contract-dispositions.js.map +1 -1
- package/dist/contracts/v1/workflow-brief.d.ts +1670 -2
- package/dist/contracts/v1/workflow-catalog.d.ts +1670 -2
- package/dist/contracts/v1/workflow-client.d.ts +835 -1
- package/dist/contracts/v1/workflow-execution.d.ts +2 -0
- package/dist/contracts/v1/workflow-plan.d.ts +2533 -31
- package/dist/endpoints.js +13 -0
- package/dist/endpoints.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +15 -0
- package/dist/errors.js.map +1 -1
- package/dist/generations.d.ts +48 -7
- package/dist/generations.js +86 -28
- package/dist/generations.js.map +1 -1
- package/dist/idempotency.d.ts +20 -0
- package/dist/idempotency.js +37 -0
- package/dist/idempotency.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/public-endpoints.d.ts +2 -0
- package/dist/public-endpoints.js +2 -0
- package/dist/public-endpoints.js.map +1 -1
- package/dist/resolved-timeline.d.ts +153 -0
- package/dist/resolved-timeline.js +46 -0
- package/dist/resolved-timeline.js.map +1 -1
- package/dist/run-static-warnings.js +5 -2
- package/dist/run-static-warnings.js.map +1 -1
- package/dist/semantic-inserts.d.ts +7 -0
- package/dist/semantic-inserts.js +19 -9
- package/dist/semantic-inserts.js.map +1 -1
- package/dist/skills.d.ts +4112 -77
- package/dist/skills.js +261 -16
- package/dist/skills.js.map +1 -1
- package/dist/templates/callout.d.ts +34 -0
- package/dist/templates/callout.js +51 -0
- package/dist/templates/callout.js.map +1 -0
- package/dist/templates/checklist.d.ts +42 -0
- package/dist/templates/checklist.js +47 -0
- package/dist/templates/checklist.js.map +1 -0
- package/dist/templates/compare.d.ts +26 -0
- package/dist/templates/compare.js +35 -0
- package/dist/templates/compare.js.map +1 -0
- package/dist/templates/end-card.d.ts +16 -0
- package/dist/templates/end-card.js +25 -0
- package/dist/templates/end-card.js.map +1 -0
- package/dist/templates/index.d.ts +164 -0
- package/dist/templates/index.js +382 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/templates/lower-third.d.ts +18 -0
- package/dist/templates/lower-third.js +26 -0
- package/dist/templates/lower-third.js.map +1 -0
- package/dist/templates/notification.d.ts +30 -0
- package/dist/templates/notification.js +32 -0
- package/dist/templates/notification.js.map +1 -0
- package/dist/templates/phone-call.d.ts +24 -0
- package/dist/templates/phone-call.js +36 -0
- package/dist/templates/phone-call.js.map +1 -0
- package/dist/templates/progress.d.ts +22 -0
- package/dist/templates/progress.js +42 -0
- package/dist/templates/progress.js.map +1 -0
- package/dist/templates/quote.d.ts +21 -0
- package/dist/templates/quote.js +29 -0
- package/dist/templates/quote.js.map +1 -0
- package/dist/templates/rating.d.ts +22 -0
- package/dist/templates/rating.js +29 -0
- package/dist/templates/rating.js.map +1 -0
- package/dist/templates/size.d.ts +13 -0
- package/dist/templates/size.js +10 -0
- package/dist/templates/size.js.map +1 -0
- package/dist/templates/slot.d.ts +10 -0
- package/dist/templates/slot.js +5 -0
- package/dist/templates/slot.js.map +1 -0
- package/dist/templates/sounds.d.ts +351 -0
- package/dist/templates/sounds.js +67 -0
- package/dist/templates/sounds.js.map +1 -0
- package/dist/templates/stat.d.ts +20 -0
- package/dist/templates/stat.js +33 -0
- package/dist/templates/stat.js.map +1 -0
- package/dist/templates/tag.d.ts +23 -0
- package/dist/templates/tag.js +31 -0
- package/dist/templates/tag.js.map +1 -0
- package/dist/templates/theme.d.ts +29 -0
- package/dist/templates/theme.js +47 -0
- package/dist/templates/theme.js.map +1 -0
- package/dist/templates/title-card.d.ts +21 -0
- package/dist/templates/title-card.js +30 -0
- package/dist/templates/title-card.js.map +1 -0
- package/dist/tts-backend.d.ts +9 -0
- package/dist/tts-backend.js +21 -0
- package/dist/tts-backend.js.map +1 -1
- package/dist/ugc-layers.d.ts +84 -0
- package/dist/ugc-layers.js +137 -0
- package/dist/ugc-layers.js.map +1 -0
- package/dist/ugc-video-media.d.ts +12 -0
- package/dist/ugc-video-media.js +39 -0
- package/dist/ugc-video-media.js.map +1 -0
- package/dist/uploads.d.ts +79 -0
- package/dist/uploads.js +65 -7
- package/dist/uploads.js.map +1 -1
- package/dist/voice-admission.d.ts +835 -1
- package/dist/workflows/methods/faceless-explainer.d.ts +329 -2
- package/dist/workflows/methods/kinetic-launch.d.ts +329 -2
- package/dist/workflows/methods/product-image-story.d.ts +329 -2
- package/dist/workflows/methods/shared.d.ts +329 -2
- package/dist/workflows/methods/ugc-faq-answer.d.ts +329 -2
- package/dist/workflows/methods/ugc-product-intro.d.ts +329 -2
- package/dist/workflows/methods/website-proof-demo.d.ts +329 -2
- package/dist/workflows/validate.js +14 -9
- package/dist/workflows/validate.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { faceZone, frameCanvasOf } from "../ugc-layers.js";
|
|
3
|
+
import { sizedScale, templateSize } from "./size.js";
|
|
4
|
+
import { templateMedia } from "./slot.js";
|
|
5
|
+
/** The phone's width at medium on a 1080 short side; it is twice as high. */
|
|
6
|
+
export const PHONE_CALL_WIDTH_PX = 360;
|
|
7
|
+
const data = z.object({ caller: z.string().min(1).max(24), subtitle: z.string().min(1).max(32).optional(), avatar: templateMedia.optional(),
|
|
8
|
+
answer_at: z.string().min(1).max(200), side: z.enum(["left", "right"]).optional(), size: templateSize }).strict();
|
|
9
|
+
/** An incoming call on a neutral phone at the side of the frame, ringing until it is answered on a word (reference seconds 26–43). */
|
|
10
|
+
export const phoneCall = {
|
|
11
|
+
kind: "phone_call",
|
|
12
|
+
kindVersion: 1,
|
|
13
|
+
description: "an incoming call on a neutral phone at the side (right unless side left): the caller, a subtitle and a round avatar ring, then " +
|
|
14
|
+
"the call is answered on answer_at and its timer runs; beside the face in wide frames, under it in tall ones",
|
|
15
|
+
placements: ["over"],
|
|
16
|
+
data,
|
|
17
|
+
text: { caller: 24, subtitle: 32 },
|
|
18
|
+
quotes: ["answer_at"],
|
|
19
|
+
beatsFrom: 9,
|
|
20
|
+
slots: { avatar: { type: "image", cover: 1 } },
|
|
21
|
+
hidesCaptions: () => false,
|
|
22
|
+
onInserts: false,
|
|
23
|
+
rect: (value, aspectRatio) => {
|
|
24
|
+
const canvas = frameCanvasOf(aspectRatio), { width: w, height: h } = canvas, margin = Math.round(0.04 * Math.min(w, h)), face = faceZone(aspectRatio);
|
|
25
|
+
let width = Math.round(PHONE_CALL_WIDTH_PX * sizedScale(value.size, canvas)), top = Math.round((face.top + face.height + 0.01) * h);
|
|
26
|
+
// A frame at least as wide as high has room beside the face, from the top; a tall one under it, down the side.
|
|
27
|
+
if (w >= h) {
|
|
28
|
+
width = Math.min(width, Math.floor((w * (1 - face.left - face.width) - 2 * margin) / 2) * 2, Math.floor((h - 2 * margin) / 4) * 2);
|
|
29
|
+
top = margin;
|
|
30
|
+
}
|
|
31
|
+
const left = value.side === "left" ? margin : w - margin - width;
|
|
32
|
+
return { left: left / w, top: top / h, width: width / w, height: (2 * width) / h };
|
|
33
|
+
},
|
|
34
|
+
sample: { caller: "+1 (305) 555-0147", subtitle: "incoming call", answer_at: "answers", side: "right" },
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=phone-call.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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AAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,KAAK,CAAC;QACjE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;IACrF,CAAC;IACD,MAAM,EAAE,EAAE,MAAM,EAAE,mBAAmB,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE;CACxG,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { TemplateKind } from "./index.js";
|
|
3
|
+
/** A step's label at medium on a 1080 short side. */
|
|
4
|
+
export declare const PROGRESS_FONT_PX = 56;
|
|
5
|
+
/** Label sizes: a step's row, the card's padding above and below, and the card's width. */
|
|
6
|
+
export declare const PROGRESS_EMS: {
|
|
7
|
+
readonly row: 1.6;
|
|
8
|
+
readonly pad: 0.4;
|
|
9
|
+
readonly width: 12;
|
|
10
|
+
};
|
|
11
|
+
declare const data: z.ZodObject<{
|
|
12
|
+
steps: z.ZodArray<z.ZodString>;
|
|
13
|
+
advance_at: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14
|
+
size: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
large: "large";
|
|
16
|
+
medium: "medium";
|
|
17
|
+
small: "small";
|
|
18
|
+
}>>;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
/** Steps in a column on a card, completing in turn: below the face in tall and square frames, beside it in wide ones. */
|
|
21
|
+
export declare const progress: TemplateKind<typeof data>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { faceZone, frameCanvasOf } from "../ugc-layers.js";
|
|
3
|
+
import { sizedScale, templateSize } from "./size.js";
|
|
4
|
+
/** A step's label at medium on a 1080 short side. */
|
|
5
|
+
export const PROGRESS_FONT_PX = 56;
|
|
6
|
+
/** Label sizes: a step's row, the card's padding above and below, and the card's width. */
|
|
7
|
+
export const PROGRESS_EMS = { row: 1.6, pad: 0.4, width: 12 };
|
|
8
|
+
const data = z.object({ steps: z.array(z.string().min(1).max(20)).min(2).max(5), advance_at: z.array(z.string().min(1).max(200)).min(2).max(5).optional(),
|
|
9
|
+
size: templateSize }).strict().superRefine((value, context) => {
|
|
10
|
+
if (value.advance_at && value.advance_at.length !== value.steps.length) {
|
|
11
|
+
context.addIssue({ code: z.ZodIssueCode.custom, path: ["advance_at"], message: `gives ${value.advance_at.length} quotes for ${value.steps.length} steps: one per step` });
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
/** Steps in a column on a card, completing in turn: below the face in tall and square frames, beside it in wide ones. */
|
|
15
|
+
export const progress = {
|
|
16
|
+
kind: "progress",
|
|
17
|
+
kindVersion: 1,
|
|
18
|
+
description: "2–5 steps in a column on a card, each completing with a check in turn, on its advance_at quote (one per step, in order) or " +
|
|
19
|
+
"spread evenly; below the face",
|
|
20
|
+
placements: ["over"],
|
|
21
|
+
data,
|
|
22
|
+
text: { steps: 20 },
|
|
23
|
+
quotes: ["advance_at"],
|
|
24
|
+
beatsFrom: 9,
|
|
25
|
+
spreads: "steps",
|
|
26
|
+
slots: {},
|
|
27
|
+
hidesCaptions: () => false,
|
|
28
|
+
onInserts: false,
|
|
29
|
+
rect: (value, aspectRatio) => {
|
|
30
|
+
const canvas = frameCanvasOf(aspectRatio), { width: w, height: h } = canvas, margin = Math.round(0.04 * Math.min(w, h)), face = faceZone(aspectRatio);
|
|
31
|
+
const ems = value.steps.length * PROGRESS_EMS.row + 2 * PROGRESS_EMS.pad, below = Math.round((face.top + face.height + 0.01) * h);
|
|
32
|
+
const wide = w > h, room = wide ? h - 2 * margin : h - margin - below;
|
|
33
|
+
// The size scales the card, and a frame without room under the face shrinks it to fit.
|
|
34
|
+
const em = Math.min(PROGRESS_FONT_PX * sizedScale(value.size, canvas), room / ems), height = Math.round(ems * em);
|
|
35
|
+
const width = Math.round(Math.min(wide ? face.left * w - 2 * margin : 0.9 * w, PROGRESS_EMS.width * em));
|
|
36
|
+
const left = wide ? margin : Math.round((w - width) / 2);
|
|
37
|
+
const top = wide ? Math.round((h - height) / 2) : Math.min(h - margin - height, Math.max(below, Math.round(0.71 * h - height / 2)));
|
|
38
|
+
return { left: left / w, top: top / h, width: width / w, height: height / h };
|
|
39
|
+
},
|
|
40
|
+
sample: { steps: ["call answered", "slot found", "visit booked"], advance_at: ["answers", "finds", "books"] },
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.js","sourceRoot":"","sources":["../../src/templates/progress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAErD,qDAAqD;AACrD,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC,2FAA2F;AAC3F,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAW,CAAC;AACvE,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,UAAU,E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,CAAC;QACzD,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,GAAG,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACpI,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,EAAE,CAAC;IAChF,CAAC;IACD,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,eAAe,EAAE,YAAY,EAAE,cAAc,CAAC,EAAE,UAAU,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE;CAC9G,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { TemplateKind } from "./index.js";
|
|
3
|
+
/** The quote's text at medium on a 1080 short side. */
|
|
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 = 8.5;
|
|
7
|
+
declare const data: z.ZodObject<{
|
|
8
|
+
text: z.ZodString;
|
|
9
|
+
author: z.ZodOptional<z.ZodString>;
|
|
10
|
+
photo: z.ZodOptional<z.ZodObject<{
|
|
11
|
+
asset_id: z.ZodString;
|
|
12
|
+
}, z.core.$strict>>;
|
|
13
|
+
size: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
large: "large";
|
|
15
|
+
medium: "medium";
|
|
16
|
+
small: "small";
|
|
17
|
+
}>>;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
/** A full-frame quote: marks, then the text in up to four lines, then the author with an optional round photo. */
|
|
20
|
+
export declare const quote: TemplateKind<typeof data>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { frameCanvasOf } from "../ugc-layers.js";
|
|
3
|
+
import { sizedScale, templateSize } from "./size.js";
|
|
4
|
+
import { templateMedia } from "./slot.js";
|
|
5
|
+
/** The quote's text at medium on a 1080 short side. */
|
|
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 = 8.5;
|
|
9
|
+
const data = z.object({ text: z.string().min(1).max(120), author: z.string().min(1).max(32).optional(), photo: templateMedia.optional(),
|
|
10
|
+
size: templateSize }).strict();
|
|
11
|
+
/** A full-frame quote: marks, then the text in up to four lines, then the author with an optional round photo. */
|
|
12
|
+
export const quote = {
|
|
13
|
+
kind: "quote",
|
|
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",
|
|
16
|
+
placements: ["full"],
|
|
17
|
+
data,
|
|
18
|
+
text: { text: 120, author: 32 },
|
|
19
|
+
slots: { photo: { type: "image", cover: 1 } },
|
|
20
|
+
hidesCaptions: () => true,
|
|
21
|
+
onInserts: false,
|
|
22
|
+
rect: (value, aspectRatio) => {
|
|
23
|
+
const canvas = frameCanvasOf(aspectRatio), { width: w, height: h } = canvas, scale = sizedScale(value.size, canvas);
|
|
24
|
+
const width = Math.round(Math.min(0.9 * w, 1000 * scale)), height = Math.round(Math.min(0.92 * h, QUOTE_RECT_EMS * QUOTE_FONT_PX * scale));
|
|
25
|
+
return { left: Math.round((w - width) / 2) / w, top: Math.round((h - height) / 2) / h, width: width / w, height: height / h };
|
|
26
|
+
},
|
|
27
|
+
sample: { text: "It answered every call while I was with patients, and nobody could tell.", author: "Maya Chen" },
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=quote.js.map
|
|
@@ -0,0 +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;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,uDAAuD;AACvD,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAAC;AAChC,6FAA6F;AAC7F,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAClC,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,EAAE;IACrI,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AAEjC,kHAAkH;AAClH,MAAM,CAAC,MAAM,KAAK,GAA8B;IAC9C,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,CAAC;IACd,WAAW,EAAE,wHAAwH;IACrI,UAAU,EAAE,CAAC,MAAM,CAAC;IACpB,IAAI;IACJ,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE;IAC/B,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAC7C,aAAa,EAAE,GAAG,EAAE,CAAC,IAAI;IACzB,SAAS,EAAE,KAAK;IAChB,IAAI,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE;QAC3B,MAAM,MAAM,GAAG,aAAa,CAAC,WAAW,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,MAAM,EAAE,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACpH,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,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;QAC3I,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,22 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { TemplateKind } from "./index.js";
|
|
3
|
+
/** A star's size at medium on a 1080 short side. */
|
|
4
|
+
export declare const RATING_STAR_PX = 104;
|
|
5
|
+
/** Star sizes: the card's height with the row of stars, the label's band under it, and the card's width (five stars, four gaps, padding). */
|
|
6
|
+
export declare const RATING_EMS: {
|
|
7
|
+
readonly row: 1.44;
|
|
8
|
+
readonly label: 0.62;
|
|
9
|
+
readonly width: 6.32;
|
|
10
|
+
};
|
|
11
|
+
declare const data: z.ZodObject<{
|
|
12
|
+
stars: z.ZodNumber;
|
|
13
|
+
label: z.ZodOptional<z.ZodString>;
|
|
14
|
+
size: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
large: "large";
|
|
16
|
+
medium: "medium";
|
|
17
|
+
small: "small";
|
|
18
|
+
}>>;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
/** Five stars on a card filling in turn up to a score, with an optional label: at chest level, off the face. */
|
|
21
|
+
export declare const rating: TemplateKind<typeof data>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { frameCanvasOf } from "../ugc-layers.js";
|
|
3
|
+
import { sizedScale, templateSize } from "./size.js";
|
|
4
|
+
/** A star's size at medium on a 1080 short side. */
|
|
5
|
+
export const RATING_STAR_PX = 104;
|
|
6
|
+
/** Star sizes: the card's height with the row of stars, the label's band under it, and the card's width (five stars, four gaps, padding). */
|
|
7
|
+
export const RATING_EMS = { row: 1.44, label: 0.62, width: 6.32 };
|
|
8
|
+
const data = z.object({ stars: z.number().min(1).max(5).multipleOf(0.5), label: z.string().min(1).max(32).optional(), size: templateSize }).strict();
|
|
9
|
+
/** Five stars on a card filling in turn up to a score, with an optional label: at chest level, off the face. */
|
|
10
|
+
export const rating = {
|
|
11
|
+
kind: "rating",
|
|
12
|
+
kindVersion: 1,
|
|
13
|
+
description: "five stars on a card filling in turn up to stars (1–5 in halves, a half star half filled), an optional label under them; " +
|
|
14
|
+
"at chest level",
|
|
15
|
+
placements: ["over"],
|
|
16
|
+
data,
|
|
17
|
+
text: { label: 32 },
|
|
18
|
+
slots: {},
|
|
19
|
+
hidesCaptions: () => false,
|
|
20
|
+
onInserts: false,
|
|
21
|
+
rect: (value, aspectRatio) => {
|
|
22
|
+
const canvas = frameCanvasOf(aspectRatio), { width: w, height: h } = canvas, star = RATING_STAR_PX * sizedScale(value.size, canvas);
|
|
23
|
+
const width = Math.round(Math.min(0.9 * w, RATING_EMS.width * star)), height = Math.round((RATING_EMS.row + (value.label ? RATING_EMS.label : 0)) * star);
|
|
24
|
+
// At chest level, as the stat over the presenter, off the face (62–80% of the height).
|
|
25
|
+
return { left: Math.round((w - width) / 2) / w, top: Math.round(0.71 * h - height / 2) / h, width: width / w, height: height / h };
|
|
26
|
+
},
|
|
27
|
+
sample: { stars: 4.5, label: "rated by 312 patients" },
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=rating.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rating.js","sourceRoot":"","sources":["../../src/templates/rating.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;AAErD,oDAAoD;AACpD,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAClC,6IAA6I;AAC7I,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAW,CAAC;AAC3E,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AAErJ,gHAAgH;AAChH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MAAM,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,uBAAuB,EAAE;CACvD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** How large a kind draws; absent is medium, the reference scale (#778 S3, owner 2026-10-22). No default in the schema (A8). */
|
|
3
|
+
export declare const TEMPLATE_SIZES: readonly ["small", "medium", "large"];
|
|
4
|
+
export declare const templateSize: z.ZodOptional<z.ZodEnum<{
|
|
5
|
+
large: "large";
|
|
6
|
+
medium: "medium";
|
|
7
|
+
small: "small";
|
|
8
|
+
}>>;
|
|
9
|
+
/** Pixels per pixel at a 1080 short side, times the size's scale. */
|
|
10
|
+
export declare function sizedScale(size: (typeof TEMPLATE_SIZES)[number] | undefined, canvas: {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
}): number;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** How large a kind draws; absent is medium, the reference scale (#778 S3, owner 2026-10-22). No default in the schema (A8). */
|
|
3
|
+
export const TEMPLATE_SIZES = ["small", "medium", "large"];
|
|
4
|
+
export const templateSize = z.enum(TEMPLATE_SIZES).optional();
|
|
5
|
+
const SCALE = { small: 0.75, medium: 1, large: 1.3 };
|
|
6
|
+
/** Pixels per pixel at a 1080 short side, times the size's scale. */
|
|
7
|
+
export function sizedScale(size, canvas) {
|
|
8
|
+
return (Math.min(canvas.width, canvas.height) / 1080) * SCALE[size ?? "medium"];
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=size.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"size.js","sourceRoot":"","sources":["../../src/templates/size.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gIAAgI;AAChI,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAC;AACpE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE,CAAC;AAC9D,MAAM,KAAK,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAW,CAAC;AAE9D,qEAAqE;AACrE,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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** A template's media slot: a ready asset of the account, pinned at admission by (template id, slot) (#778 S3a(ii), A1). */
|
|
3
|
+
export declare const templateMedia: z.ZodObject<{
|
|
4
|
+
asset_id: z.ZodString;
|
|
5
|
+
}, z.core.$strict>;
|
|
6
|
+
/** What a slot takes; `cover` is the shape it fills, width over height, so a picture of another shape is cut and named. */
|
|
7
|
+
export interface TemplateSlot {
|
|
8
|
+
type: "image" | "video";
|
|
9
|
+
cover?: number | undefined;
|
|
10
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { assetId } from "../asset-identity.js";
|
|
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 from list_assets, of the kind the slot takes.") }).strict();
|
|
5
|
+
//# sourceMappingURL=slot.js.map
|
|
@@ -0,0 +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,6DAA6D,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const TEMPLATE_SOUND_BEATS: readonly ["click", "toggle", "ring", "answer", "notify", "step", "whoosh", "flash"];
|
|
3
|
+
export type TemplateSoundBeat = (typeof TEMPLATE_SOUND_BEATS)[number];
|
|
4
|
+
/** Each beat's names, its default and where it plays; the composition bundles `<beat>__<name>.mp3` for each, and a test keeps the two equal. */
|
|
5
|
+
export declare const TEMPLATE_SOUNDS: {
|
|
6
|
+
readonly click: {
|
|
7
|
+
readonly default: "click_mouse";
|
|
8
|
+
readonly names: readonly ["click_mouse", "click_soft", "click_crisp", "click_light"];
|
|
9
|
+
readonly plays: "a checklist's cursor clicks a row, on each click";
|
|
10
|
+
};
|
|
11
|
+
readonly toggle: {
|
|
12
|
+
readonly default: "switch_flip";
|
|
13
|
+
readonly names: readonly ["switch_flip", "toggle_snap", "switch_heavy", "switch_light"];
|
|
14
|
+
readonly plays: "a checklist row's switch or check box lands, just after each click";
|
|
15
|
+
};
|
|
16
|
+
readonly ring: {
|
|
17
|
+
readonly default: "ring_classic";
|
|
18
|
+
readonly names: readonly ["ring_classic", "ring_marimba", "ring_digital"];
|
|
19
|
+
readonly plays: "a phone_call rings from its pop, repeating, until it is answered";
|
|
20
|
+
};
|
|
21
|
+
readonly answer: {
|
|
22
|
+
readonly default: "answer_confirm";
|
|
23
|
+
readonly names: readonly ["answer_confirm", "answer_open", "answer_pop", "answer_select"];
|
|
24
|
+
readonly plays: "a phone_call is answered, on answer_at";
|
|
25
|
+
};
|
|
26
|
+
readonly notify: {
|
|
27
|
+
readonly default: "chime";
|
|
28
|
+
readonly names: readonly ["chime", "glass_ping", "glass_soft", "bong", "question_ping"];
|
|
29
|
+
readonly plays: "a notification drops in";
|
|
30
|
+
};
|
|
31
|
+
readonly step: {
|
|
32
|
+
readonly default: "drop";
|
|
33
|
+
readonly names: readonly ["drop", "drop_high", "tick", "pluck", "pluck_bright"];
|
|
34
|
+
readonly plays: "a progress step fills, and each rating star";
|
|
35
|
+
};
|
|
36
|
+
readonly whoosh: {
|
|
37
|
+
readonly default: "whoosh";
|
|
38
|
+
readonly names: readonly ["whoosh", "whip", "paper_swipe", "sweep"];
|
|
39
|
+
readonly plays: "a full-frame template's wipe or zoom, in and out, and a compare's reveal";
|
|
40
|
+
};
|
|
41
|
+
readonly flash: {
|
|
42
|
+
readonly default: "shutter";
|
|
43
|
+
readonly names: readonly ["shutter", "glitch"];
|
|
44
|
+
readonly plays: "a full-frame template's flash, on each of its cuts";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
/** The beats each kind plays over the presenter; a full-frame template adds its transition's beat (see `templateSoundBeats`). */
|
|
48
|
+
export declare const TEMPLATE_KIND_SOUNDS: Readonly<Record<string, readonly TemplateSoundBeat[]>>;
|
|
49
|
+
export type TemplateSoundMap = {
|
|
50
|
+
[B in TemplateSoundBeat]: (typeof TEMPLATE_SOUNDS)[B]["names"][number];
|
|
51
|
+
};
|
|
52
|
+
export declare const DEFAULT_TEMPLATE_SOUNDS: TemplateSoundMap;
|
|
53
|
+
export declare const templateSounds: z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodObject<{
|
|
54
|
+
click: z.ZodOptional<z.ZodEnum<{
|
|
55
|
+
answer_confirm: "answer_confirm";
|
|
56
|
+
answer_open: "answer_open";
|
|
57
|
+
answer_pop: "answer_pop";
|
|
58
|
+
answer_select: "answer_select";
|
|
59
|
+
bong: "bong";
|
|
60
|
+
chime: "chime";
|
|
61
|
+
click_crisp: "click_crisp";
|
|
62
|
+
click_light: "click_light";
|
|
63
|
+
click_mouse: "click_mouse";
|
|
64
|
+
click_soft: "click_soft";
|
|
65
|
+
drop: "drop";
|
|
66
|
+
drop_high: "drop_high";
|
|
67
|
+
glass_ping: "glass_ping";
|
|
68
|
+
glass_soft: "glass_soft";
|
|
69
|
+
glitch: "glitch";
|
|
70
|
+
paper_swipe: "paper_swipe";
|
|
71
|
+
pluck: "pluck";
|
|
72
|
+
pluck_bright: "pluck_bright";
|
|
73
|
+
question_ping: "question_ping";
|
|
74
|
+
ring_classic: "ring_classic";
|
|
75
|
+
ring_digital: "ring_digital";
|
|
76
|
+
ring_marimba: "ring_marimba";
|
|
77
|
+
shutter: "shutter";
|
|
78
|
+
sweep: "sweep";
|
|
79
|
+
switch_flip: "switch_flip";
|
|
80
|
+
switch_heavy: "switch_heavy";
|
|
81
|
+
switch_light: "switch_light";
|
|
82
|
+
tick: "tick";
|
|
83
|
+
toggle_snap: "toggle_snap";
|
|
84
|
+
whip: "whip";
|
|
85
|
+
whoosh: "whoosh";
|
|
86
|
+
}>>;
|
|
87
|
+
toggle: z.ZodOptional<z.ZodEnum<{
|
|
88
|
+
answer_confirm: "answer_confirm";
|
|
89
|
+
answer_open: "answer_open";
|
|
90
|
+
answer_pop: "answer_pop";
|
|
91
|
+
answer_select: "answer_select";
|
|
92
|
+
bong: "bong";
|
|
93
|
+
chime: "chime";
|
|
94
|
+
click_crisp: "click_crisp";
|
|
95
|
+
click_light: "click_light";
|
|
96
|
+
click_mouse: "click_mouse";
|
|
97
|
+
click_soft: "click_soft";
|
|
98
|
+
drop: "drop";
|
|
99
|
+
drop_high: "drop_high";
|
|
100
|
+
glass_ping: "glass_ping";
|
|
101
|
+
glass_soft: "glass_soft";
|
|
102
|
+
glitch: "glitch";
|
|
103
|
+
paper_swipe: "paper_swipe";
|
|
104
|
+
pluck: "pluck";
|
|
105
|
+
pluck_bright: "pluck_bright";
|
|
106
|
+
question_ping: "question_ping";
|
|
107
|
+
ring_classic: "ring_classic";
|
|
108
|
+
ring_digital: "ring_digital";
|
|
109
|
+
ring_marimba: "ring_marimba";
|
|
110
|
+
shutter: "shutter";
|
|
111
|
+
sweep: "sweep";
|
|
112
|
+
switch_flip: "switch_flip";
|
|
113
|
+
switch_heavy: "switch_heavy";
|
|
114
|
+
switch_light: "switch_light";
|
|
115
|
+
tick: "tick";
|
|
116
|
+
toggle_snap: "toggle_snap";
|
|
117
|
+
whip: "whip";
|
|
118
|
+
whoosh: "whoosh";
|
|
119
|
+
}>>;
|
|
120
|
+
ring: z.ZodOptional<z.ZodEnum<{
|
|
121
|
+
answer_confirm: "answer_confirm";
|
|
122
|
+
answer_open: "answer_open";
|
|
123
|
+
answer_pop: "answer_pop";
|
|
124
|
+
answer_select: "answer_select";
|
|
125
|
+
bong: "bong";
|
|
126
|
+
chime: "chime";
|
|
127
|
+
click_crisp: "click_crisp";
|
|
128
|
+
click_light: "click_light";
|
|
129
|
+
click_mouse: "click_mouse";
|
|
130
|
+
click_soft: "click_soft";
|
|
131
|
+
drop: "drop";
|
|
132
|
+
drop_high: "drop_high";
|
|
133
|
+
glass_ping: "glass_ping";
|
|
134
|
+
glass_soft: "glass_soft";
|
|
135
|
+
glitch: "glitch";
|
|
136
|
+
paper_swipe: "paper_swipe";
|
|
137
|
+
pluck: "pluck";
|
|
138
|
+
pluck_bright: "pluck_bright";
|
|
139
|
+
question_ping: "question_ping";
|
|
140
|
+
ring_classic: "ring_classic";
|
|
141
|
+
ring_digital: "ring_digital";
|
|
142
|
+
ring_marimba: "ring_marimba";
|
|
143
|
+
shutter: "shutter";
|
|
144
|
+
sweep: "sweep";
|
|
145
|
+
switch_flip: "switch_flip";
|
|
146
|
+
switch_heavy: "switch_heavy";
|
|
147
|
+
switch_light: "switch_light";
|
|
148
|
+
tick: "tick";
|
|
149
|
+
toggle_snap: "toggle_snap";
|
|
150
|
+
whip: "whip";
|
|
151
|
+
whoosh: "whoosh";
|
|
152
|
+
}>>;
|
|
153
|
+
answer: z.ZodOptional<z.ZodEnum<{
|
|
154
|
+
answer_confirm: "answer_confirm";
|
|
155
|
+
answer_open: "answer_open";
|
|
156
|
+
answer_pop: "answer_pop";
|
|
157
|
+
answer_select: "answer_select";
|
|
158
|
+
bong: "bong";
|
|
159
|
+
chime: "chime";
|
|
160
|
+
click_crisp: "click_crisp";
|
|
161
|
+
click_light: "click_light";
|
|
162
|
+
click_mouse: "click_mouse";
|
|
163
|
+
click_soft: "click_soft";
|
|
164
|
+
drop: "drop";
|
|
165
|
+
drop_high: "drop_high";
|
|
166
|
+
glass_ping: "glass_ping";
|
|
167
|
+
glass_soft: "glass_soft";
|
|
168
|
+
glitch: "glitch";
|
|
169
|
+
paper_swipe: "paper_swipe";
|
|
170
|
+
pluck: "pluck";
|
|
171
|
+
pluck_bright: "pluck_bright";
|
|
172
|
+
question_ping: "question_ping";
|
|
173
|
+
ring_classic: "ring_classic";
|
|
174
|
+
ring_digital: "ring_digital";
|
|
175
|
+
ring_marimba: "ring_marimba";
|
|
176
|
+
shutter: "shutter";
|
|
177
|
+
sweep: "sweep";
|
|
178
|
+
switch_flip: "switch_flip";
|
|
179
|
+
switch_heavy: "switch_heavy";
|
|
180
|
+
switch_light: "switch_light";
|
|
181
|
+
tick: "tick";
|
|
182
|
+
toggle_snap: "toggle_snap";
|
|
183
|
+
whip: "whip";
|
|
184
|
+
whoosh: "whoosh";
|
|
185
|
+
}>>;
|
|
186
|
+
notify: z.ZodOptional<z.ZodEnum<{
|
|
187
|
+
answer_confirm: "answer_confirm";
|
|
188
|
+
answer_open: "answer_open";
|
|
189
|
+
answer_pop: "answer_pop";
|
|
190
|
+
answer_select: "answer_select";
|
|
191
|
+
bong: "bong";
|
|
192
|
+
chime: "chime";
|
|
193
|
+
click_crisp: "click_crisp";
|
|
194
|
+
click_light: "click_light";
|
|
195
|
+
click_mouse: "click_mouse";
|
|
196
|
+
click_soft: "click_soft";
|
|
197
|
+
drop: "drop";
|
|
198
|
+
drop_high: "drop_high";
|
|
199
|
+
glass_ping: "glass_ping";
|
|
200
|
+
glass_soft: "glass_soft";
|
|
201
|
+
glitch: "glitch";
|
|
202
|
+
paper_swipe: "paper_swipe";
|
|
203
|
+
pluck: "pluck";
|
|
204
|
+
pluck_bright: "pluck_bright";
|
|
205
|
+
question_ping: "question_ping";
|
|
206
|
+
ring_classic: "ring_classic";
|
|
207
|
+
ring_digital: "ring_digital";
|
|
208
|
+
ring_marimba: "ring_marimba";
|
|
209
|
+
shutter: "shutter";
|
|
210
|
+
sweep: "sweep";
|
|
211
|
+
switch_flip: "switch_flip";
|
|
212
|
+
switch_heavy: "switch_heavy";
|
|
213
|
+
switch_light: "switch_light";
|
|
214
|
+
tick: "tick";
|
|
215
|
+
toggle_snap: "toggle_snap";
|
|
216
|
+
whip: "whip";
|
|
217
|
+
whoosh: "whoosh";
|
|
218
|
+
}>>;
|
|
219
|
+
step: z.ZodOptional<z.ZodEnum<{
|
|
220
|
+
answer_confirm: "answer_confirm";
|
|
221
|
+
answer_open: "answer_open";
|
|
222
|
+
answer_pop: "answer_pop";
|
|
223
|
+
answer_select: "answer_select";
|
|
224
|
+
bong: "bong";
|
|
225
|
+
chime: "chime";
|
|
226
|
+
click_crisp: "click_crisp";
|
|
227
|
+
click_light: "click_light";
|
|
228
|
+
click_mouse: "click_mouse";
|
|
229
|
+
click_soft: "click_soft";
|
|
230
|
+
drop: "drop";
|
|
231
|
+
drop_high: "drop_high";
|
|
232
|
+
glass_ping: "glass_ping";
|
|
233
|
+
glass_soft: "glass_soft";
|
|
234
|
+
glitch: "glitch";
|
|
235
|
+
paper_swipe: "paper_swipe";
|
|
236
|
+
pluck: "pluck";
|
|
237
|
+
pluck_bright: "pluck_bright";
|
|
238
|
+
question_ping: "question_ping";
|
|
239
|
+
ring_classic: "ring_classic";
|
|
240
|
+
ring_digital: "ring_digital";
|
|
241
|
+
ring_marimba: "ring_marimba";
|
|
242
|
+
shutter: "shutter";
|
|
243
|
+
sweep: "sweep";
|
|
244
|
+
switch_flip: "switch_flip";
|
|
245
|
+
switch_heavy: "switch_heavy";
|
|
246
|
+
switch_light: "switch_light";
|
|
247
|
+
tick: "tick";
|
|
248
|
+
toggle_snap: "toggle_snap";
|
|
249
|
+
whip: "whip";
|
|
250
|
+
whoosh: "whoosh";
|
|
251
|
+
}>>;
|
|
252
|
+
whoosh: z.ZodOptional<z.ZodEnum<{
|
|
253
|
+
answer_confirm: "answer_confirm";
|
|
254
|
+
answer_open: "answer_open";
|
|
255
|
+
answer_pop: "answer_pop";
|
|
256
|
+
answer_select: "answer_select";
|
|
257
|
+
bong: "bong";
|
|
258
|
+
chime: "chime";
|
|
259
|
+
click_crisp: "click_crisp";
|
|
260
|
+
click_light: "click_light";
|
|
261
|
+
click_mouse: "click_mouse";
|
|
262
|
+
click_soft: "click_soft";
|
|
263
|
+
drop: "drop";
|
|
264
|
+
drop_high: "drop_high";
|
|
265
|
+
glass_ping: "glass_ping";
|
|
266
|
+
glass_soft: "glass_soft";
|
|
267
|
+
glitch: "glitch";
|
|
268
|
+
paper_swipe: "paper_swipe";
|
|
269
|
+
pluck: "pluck";
|
|
270
|
+
pluck_bright: "pluck_bright";
|
|
271
|
+
question_ping: "question_ping";
|
|
272
|
+
ring_classic: "ring_classic";
|
|
273
|
+
ring_digital: "ring_digital";
|
|
274
|
+
ring_marimba: "ring_marimba";
|
|
275
|
+
shutter: "shutter";
|
|
276
|
+
sweep: "sweep";
|
|
277
|
+
switch_flip: "switch_flip";
|
|
278
|
+
switch_heavy: "switch_heavy";
|
|
279
|
+
switch_light: "switch_light";
|
|
280
|
+
tick: "tick";
|
|
281
|
+
toggle_snap: "toggle_snap";
|
|
282
|
+
whip: "whip";
|
|
283
|
+
whoosh: "whoosh";
|
|
284
|
+
}>>;
|
|
285
|
+
flash: z.ZodOptional<z.ZodEnum<{
|
|
286
|
+
answer_confirm: "answer_confirm";
|
|
287
|
+
answer_open: "answer_open";
|
|
288
|
+
answer_pop: "answer_pop";
|
|
289
|
+
answer_select: "answer_select";
|
|
290
|
+
bong: "bong";
|
|
291
|
+
chime: "chime";
|
|
292
|
+
click_crisp: "click_crisp";
|
|
293
|
+
click_light: "click_light";
|
|
294
|
+
click_mouse: "click_mouse";
|
|
295
|
+
click_soft: "click_soft";
|
|
296
|
+
drop: "drop";
|
|
297
|
+
drop_high: "drop_high";
|
|
298
|
+
glass_ping: "glass_ping";
|
|
299
|
+
glass_soft: "glass_soft";
|
|
300
|
+
glitch: "glitch";
|
|
301
|
+
paper_swipe: "paper_swipe";
|
|
302
|
+
pluck: "pluck";
|
|
303
|
+
pluck_bright: "pluck_bright";
|
|
304
|
+
question_ping: "question_ping";
|
|
305
|
+
ring_classic: "ring_classic";
|
|
306
|
+
ring_digital: "ring_digital";
|
|
307
|
+
ring_marimba: "ring_marimba";
|
|
308
|
+
shutter: "shutter";
|
|
309
|
+
sweep: "sweep";
|
|
310
|
+
switch_flip: "switch_flip";
|
|
311
|
+
switch_heavy: "switch_heavy";
|
|
312
|
+
switch_light: "switch_light";
|
|
313
|
+
tick: "tick";
|
|
314
|
+
toggle_snap: "toggle_snap";
|
|
315
|
+
whip: "whip";
|
|
316
|
+
whoosh: "whoosh";
|
|
317
|
+
}>>;
|
|
318
|
+
}, z.core.$strict>]>;
|
|
319
|
+
export type TemplateSounds = z.infer<typeof templateSounds>;
|
|
320
|
+
/** The slim MCP field, which keeps tools/list small: any beat and name pass here, and the server checks them strictly (S3 D3). */
|
|
321
|
+
export declare const mcpTemplateSounds: z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
322
|
+
/** A run's sounds: the defaults with its overrides, or none for `false` (S3c C2, C4). */
|
|
323
|
+
export declare function templateSoundMap(sounds: TemplateSounds | undefined): TemplateSoundMap | undefined;
|
|
324
|
+
/** The beats one template plays: its kind's, and on a full frame its wipe or zoom (whoosh) or flash. */
|
|
325
|
+
export declare function templateSoundBeats(item: {
|
|
326
|
+
kind: string;
|
|
327
|
+
placement: string;
|
|
328
|
+
transition?: string | undefined;
|
|
329
|
+
}): TemplateSoundBeat[];
|
|
330
|
+
export declare const TEMPLATE_SOUNDS_PATH = "/v1/template-sounds";
|
|
331
|
+
/** The catalog `GET /v1/template-sounds` and `list_template_sounds` return. */
|
|
332
|
+
export declare const templateSoundsList: z.ZodObject<{
|
|
333
|
+
beats: z.ZodArray<z.ZodObject<{
|
|
334
|
+
beat: z.ZodEnum<{
|
|
335
|
+
answer: "answer";
|
|
336
|
+
click: "click";
|
|
337
|
+
flash: "flash";
|
|
338
|
+
notify: "notify";
|
|
339
|
+
ring: "ring";
|
|
340
|
+
step: "step";
|
|
341
|
+
toggle: "toggle";
|
|
342
|
+
whoosh: "whoosh";
|
|
343
|
+
}>;
|
|
344
|
+
default: z.ZodString;
|
|
345
|
+
names: z.ZodArray<z.ZodString>;
|
|
346
|
+
plays: z.ZodString;
|
|
347
|
+
}, z.core.$strict>>;
|
|
348
|
+
contract_version: z.ZodString;
|
|
349
|
+
}, z.core.$strict>;
|
|
350
|
+
export type TemplateSoundsList = z.infer<typeof templateSoundsList>;
|
|
351
|
+
export declare function listTemplateSounds(): TemplateSoundsList["beats"];
|