Clone any viral video with AI agents. Not just a script, the whole workflow: swap the face, the words, the B-roll, ship 100 variants in one command, and get your 100M views.
TypeScript agentic-aiaiai-agentsai-videocompilerdslffmpeggenerative-aillmmarkup-languagemonorepoplugin-systemprogramming-languagetext-to-videotypescriptvideovideo-automationvideo-clonevideo-editingvideo-generation
feat(ranking): drop the TierBoard variant
rponea469964acbab
diff --git a/.agents/skills/hypit/references/playbooks/formats/ranking-listicle.md b/.agents/skills/hypit/references/playbooks/formats/ranking-listicle.mdindex ae8adf08..53d308df 100644--- a/.agents/skills/hypit/references/playbooks/formats/ranking-listicle.md+++ b/.agents/skills/hypit/references/playbooks/formats/ranking-listicle.md@@ -6,27 +6,25 @@ explain why every item belongs where it is placed.## Author the Script schedule- Write one outer Script Selection covering the complete ranking window. It must resolve exactly once.-- `ranking:TierBoard` and `ranking:TopThree` are driven by Moments: declare one repeated Script- Moment for item reveals and one terminal Moment for the completed board, which must resolve exactly- once. Repeat the same reveal Moment id once per item — both apply strict `each` semantics, so the- occurrence count must equal the number of authored items and trigger frames must increase.+- `ranking:TopThree` is driven by Moments: declare one repeated Script Moment for item reveals and+ one terminal Moment for the completed board, which must resolve exactly once. Repeat the same+ reveal Moment id once per item — it applies strict `each` semantics, so the occurrence count must+ equal the number of authored items and trigger frames must increase.- `ranking:Column` is driven by its items: give each item that is not `preset` its own ScriptSelection, and declare no Moments for it.-- Give every item a stable id, its rank or tier, its icon or image, and one evidence beat. Copy- belongs to the item only where the component carries it: `ColumnItem` and `TopThreeItem` require a- `label`, while a `TierItem` requires an `icon` and carries no copy of its own.+- Give every item a stable id, its rank, its icon or image, and one evidence beat. `ColumnItem` and+ `TopThreeItem` both require a `label`; the icon is optional on each.## Author the SVML program1. Normalize each accepted speaking or audio-only source, create its `whisperx:SemanticTake`, thenassemble those Takes with `speech:Track` so Selections and Moments resolve against real audio.2. Declare exact font bytes and the variant's package-owned Style.-3. Choose exactly one primary component: `ranking:TierBoard`, `ranking:Column`, or- `ranking:TopThree`.+3. Choose exactly one primary component: `ranking:Column` or `ranking:TopThree`.4. Connect `semantic={speech.semantic}`, the outer `during`, an explicit `frame`, the Style, and the- complete ordered item list. `TierBoard` and `TopThree` also take the repeated `triggers` Moment- and the `terminal` Moment; `Column` takes a required `canvas` instead and reads its timing from- each item's own `during`.+ complete ordered item list. `TopThree` also takes the repeated `triggers` Moment and the+ `terminal` Moment; `Column` takes a required `canvas` instead and reads its timing from each+ item's own `during`.5. Add the component's `.visual` output to `film:Film`; add its optional `.audio` output only whenauthored sound is present.6. Put screenshots, demonstrations, or proof clips on a separate `media-track:Track`. Use@@ -38,7 +36,7 @@ explain why every item belongs where it is placed.- Use setup → concrete evidence or cost → punchline for each spoken item.- Give higher-ranked entries stronger proof and a more decisive close, not merely a brighter color.-- Keep row/tier vocabulary stable. Do not change layout grammar, label style, or icon logic halfway+- Keep row vocabulary stable. Do not change layout grammar, label style, or icon logic halfwaythrough the list.- Keep claims verifiable. Do not invent performance numbers, votes, comparisons, or product facts.- Separate ranking copy from captions: item labels belong to the Ranking component; spoken dialogue@@ -47,7 +45,7 @@ explain why every item belongs where it is placed.## Review and reuseReview the resolved trigger count and order and the terminal timing where the component uses them,-item identity, rank/tier, labels, icon assets,+item identity, rank, labels, icon assets,evidence alignment, safe zones, stack order, and optional sounds. Pin accepted generated evidencemedia through `.svrun` before the final ranking Build.diff --git a/docs/quickstart/tracks.md b/docs/quickstart/tracks.mdindex 2d3ecb3b..08ea268c 100644--- a/docs/quickstart/tracks.md+++ b/docs/quickstart/tracks.md@@ -326,12 +326,11 @@ placement, timing, style and motion. Use inline `P`/`Span`/`Break` when the auth## Ranking boardsA board animates an ordered list against the Script: it enters on a Selection, moves on Moments, and-settles on a Moment that ends it. Three variants share one shape — a container, its own item tag,+settles on a Moment that ends it. Two variants share one shape — a container, its own item tag,and its own style tag.| Container | Item | Style ||---|---|---|-| `ranking:TierBoard` | `ranking:TierItem` | `ranking:TierBoardStyle` || `ranking:Column` | `ranking:ColumnItem` | `ranking:ColumnStyle` || `ranking:TopThree` | `ranking:TopThreeItem` | `ranking:TopThreeStyle` |@@ -342,8 +341,8 @@ and its own style tag.### The style tagEmpty, and all three attributes required: `id`, `recipe` (an SVS Recipe) and `font` (a Font Stack or-Font artifact). The recipe carries the board's own keys — rows, colours, motion — and is validated-against the variant, so a Column recipe on a TierBoard is refused by name.+Font artifact). The recipe carries the board's own keys — colours, geometry, motion — and is+validated against the variant, so a Column recipe on a TopThree is refused by name.### The container tag@@ -354,23 +353,19 @@ against the variant, so a Column recipe on a TierBoard is refused by name.| `during` | a Selection — the board is on screen for it || `style` | the matching style record, and only that variant's || `appear-sound`, `move-sound` | optional Synchronized Media |-| `triggers`, `terminal` | Moments — rows move on one, the board settles on the other. `TierBoard` and `TopThree` only |+| `triggers`, `terminal` | Moments — rows move on one, the board settles on the other. `TopThree` only || `canvas` | a `space:Canvas` — the reveal stage. `Column` only |`Column` separates placement from reveal time, so it takes neither `triggers` nor `terminal`: eachitem carries its own reveal window instead, and the Column resolves siblings into non-overlappingwindows inside the container's `during` span.-`move-sound` is refused on `TopThree`, which has no move phase. On a `TierBoard` it needs at least-one item with `entry="stage"` — a sound with nothing to sound on is an authoring mistake, not a-silent no-op.+`move-sound` is refused on `TopThree`, which has no move phase.### The item tagsEach variant takes its own, at least one, and ids must be unique within a board.-- **`TierItem`** — `tier` (required, matching a row id in the recipe), `icon` (required), optional- `entry="direct" | "stage"` and `stack`. Row labels come from the recipe, not the tag.- **`TopThreeItem`** — `label` (required: a string or a Text reference), optional `icon` and `stack`.At most three.- **`ColumnItem`** — `label` (required) and `rank` (required, a positive integer that decides thediff --git a/docs/zh/quickstart/tracks.md b/docs/zh/quickstart/tracks.mdindex 7fc53452..20bf88f0 100644--- a/docs/zh/quickstart/tracks.md+++ b/docs/zh/quickstart/tracks.md@@ -271,11 +271,10 @@ Run 时,继续使用内联 `P`/`Span`/`Break`。## 榜单板-榜单板让一份有序列表跟着 Script 动起来:在某个 Selection 期间出现,在 Moment 上移动,在另一个 Moment 上定格。三个变体共用同一套形状——一个容器、它专属的条目标签、以及它专属的样式标签。+榜单板让一份有序列表跟着 Script 动起来:在某个 Selection 期间出现,在 Moment 上移动,在另一个 Moment 上定格。两个变体共用同一套形状——一个容器、它专属的条目标签、以及它专属的样式标签。| 容器 | 条目 | 样式 ||---|---|---|-| `ranking:TierBoard` | `ranking:TierItem` | `ranking:TierBoardStyle` || `ranking:Column` | `ranking:ColumnItem` | `ranking:ColumnStyle` || `ranking:TopThree` | `ranking:TopThreeItem` | `ranking:TopThreeStyle` |@@ -285,7 +284,7 @@ Run 时,继续使用内联 `P`/`Span`/`Break`。### 样式标签-标签必须为空,三个属性全部必填:`id`、`recipe`(一份 SVS Recipe)与 `font`(Font Stack 或字体产物)。Recipe 承载这块板自己的键——行、配色、动效——并且会按变体校验,把 Column 的 recipe 给 TierBoard 会被指名拒绝。+标签必须为空,三个属性全部必填:`id`、`recipe`(一份 SVS Recipe)与 `font`(Font Stack 或字体产物)。Recipe 承载这块板自己的键——配色、几何、动效——并且会按变体校验,把 Column 的 recipe 给 TopThree 会被指名拒绝。### 容器标签@@ -295,17 +294,16 @@ Run 时,继续使用内联 `P`/`Span`/`Break`。| `frame` | 一个 `space:Frame`——对 `Column` 来说是固定的排名轨 || `during` | 一个 Selection——板在此期间留在画面上 || `style` | 对应的样式记录,且只接受本变体的 |-| `triggers`、`terminal` | 两个 Moment——行在前者上移动,板在后者上定格。仅 `TierBoard` 与 `TopThree` |+| `triggers`、`terminal` | 两个 Moment——行在前者上移动,板在后者上定格。仅 `TopThree` || `canvas` | 一个 `space:Canvas`——揭示舞台。仅 `Column` || `appear-sound`、`move-sound` | 可选,Synchronized Media |-`move-sound` 在 `TopThree` 上会被拒绝——它没有移动阶段。在 `TierBoard` 上它要求至少有一个 `entry="stage"` 的条目:声音没有可响之处是创作错误,而不是静默的空操作。+`move-sound` 在 `TopThree` 上会被拒绝——它没有移动阶段。### 条目标签每个变体只接受自己的那一种,至少一个,且 id 在同一块板内不可重复。-- **`TierItem`** —— `tier`(必填,须与 recipe 中某一行的 id 对上)、`icon`(必填),可选 `entry="direct" | "stage"` 与 `stack`。行的文字来自 recipe,不写在标签上。- **`ColumnItem`** 与 **`TopThreeItem`** —— `label`(必填:字符串或 Text 引用),可选 `icon` 与 `stack`。`TopThree` 最多三条。```svmldiff --git a/packages/hyperframes/test/browser-visual.test.ts b/packages/hyperframes/test/browser-visual.test.tsindex b71d0b15..5bafd85b 100644--- a/packages/hyperframes/test/browser-visual.test.ts+++ b/packages/hyperframes/test/browser-visual.test.ts@@ -1584,14 +1584,14 @@ test("DepthStack Deck reflow, exact labels and old-system layout survive partiti}});-test("all three Ranking components paint frame-pure progressive states under partitioned browser rendering", {+test("both Ranking components paint frame-pure progressive states under partitioned browser rendering", {skip: !enabled,timeout: 120_000,}, async () => {const temp = await mkdtemp(path.join(os.tmpdir(), "hypit-ranking-visual-"));try {const width = 480;- const height = 512;+ const height = 352;const fps = 12;const frames = 24;const installed = await installedOpenFont("inter", 700, "normal");@@ -1648,24 +1648,6 @@ test("all three Ranking components paint frame-pure progressive states under parconst recipe = (path: string, properties: SvsRecipe["properties"]): SvsRecipe => ({path, properties,});- const tierHeader = rankingTrack.sealRankingHeader({ id: "browser-tier", variant: "tier-board" });- const tierSpecs = [- { variant: "tier-board", id: "tier-one", tier: "s", entry: "stage" },- { variant: "tier-board", id: "tier-two", tier: "a", entry: "direct" },- { variant: "tier-board", id: "tier-three", tier: "s", entry: "direct" },- ] as const;- let tierItems = rankingTrack.createTierBoardItemSet();- tierSpecs.forEach((spec, index) => { tierItems = rankingTrack.appendTierBoardItem(tierItems, spec, icons[index]!.artifact); });- const tierStyle = rankingTrack.decodeTierBoardStyle(recipe("browser.tier", {- rows: "s:S:#ef4444|a:A:#22c55e", "font-size": 15, "appear-frames": 2, "move-frames": 2,- padding: 6, "label-width": 36, "row-height": 54, "row-gap": 4, "cell-gap": 5,- "icon-size": 42, "icon-radius": 7, "stage-size": 56,- }), font).style;- const tierTrack = rankingTrack.renderTierBoard(space, rankingTrack.buildTierBoardProgram(- tierHeader, { xPx: 20, yPx: 20, widthPx: 440, heightPx: 140 },- schedule(tierHeader, tierSpecs), tierStyle, tierItems,- ));-const columnHeader = rankingTrack.sealRankingHeader({ id: "browser-column", variant: "column" });const columnSpecs = ["one", "two", "three"].map((id, index) => ({variant: "column" as const, id: `column-${id}`, label: `${index + 1}. ${id}`,@@ -1690,7 +1672,7 @@ test("all three Ranking components paint frame-pure progressive states under parorigin: "top-left", xDirection: "right", yDirection: "down", pixelAspect: "square",});const columnTrack = rankingTrack.renderColumn(space, rankingTrack.buildColumnProgram(- columnHeader, columnCanvas, { xPx: 20, yPx: 180, widthPx: 440, heightPx: 140 },+ columnHeader, columnCanvas, { xPx: 20, yPx: 20, widthPx: 440, heightPx: 140 },columnSchedule, columnStyle, columnItems,));@@ -1705,14 +1687,14 @@ test("all three Ranking components paint frame-pure progressive states under par"slot-gap": 30, "ring-width": 3, "label-gap": 5, "baseline-y": 0.45,}), font).style;const topTrack = rankingTrack.renderTopThree(space, rankingTrack.buildTopThreeProgram(- topHeader, { xPx: 20, yPx: 340, widthPx: 440, heightPx: 140 },+ topHeader, { xPx: 20, yPx: 180, widthPx: 440, heightPx: 140 },schedule(topHeader, topSpecs), topStyle, topItems,));const document = compileHyperframesDocument(sealComposition({id: "ranking-browser-proof",canvas: { width, height, clearColor: "#090b12" },- tracks: [tierTrack, columnTrack, topTrack],+ tracks: [columnTrack, topTrack],}), space);await writeFile(path.join(temp, "index.html"), materializeHyperframesHtml(document, (artifact) => {const materialized = paths.get(artifact.digest);@@ -1771,7 +1753,7 @@ test("all three Ranking components paint frame-pure progressive states under parassert.notDeepEqual(sequential[3], sequential[9], "Ranking stages produced no visual state change");assert.notDeepEqual(sequential[9], sequential[15], "later Ranking triggers produced no visual state change");const settled = sequential[22]!;- for (const [name, top, bottom] of [["TierBoard", 20, 160], ["Column", 180, 320], ["TopThree", 340, 480]] as const) {+ for (const [name, top, bottom] of [["Column", 20, 160], ["TopThree", 180, 320]] as const) {assert.ok(matchingPixels(settled, width, { left: 20, top, right: 460, bottom }, (red, green, blue) => red + green + blue > 120) > 500,`${name} did not paint its settled suffix`);}diff --git a/packages/ranking/README.md b/packages/ranking/README.mdindex c3e9da2b..e0dc1f7d 100644--- a/packages/ranking/README.md+++ b/packages/ranking/README.md@@ -1,8 +1,7 @@# @hypit/ranking-Three independent progressive-ranking author components over one private schedule utility:+Two independent progressive-ranking author components over one private schedule utility:-- `TierBoard`- `Column`- `TopThree`@@ -15,11 +14,9 @@ Each `*Style` declaration compiles one SVS Recipe and exact font reference intoplus a private named `.sound` Style output. A Ranking component connects both outputs when authoredsound exists; no sound produces no audio branch.-Visible author copy may be literal or an ordinary graph `Text` reference. Column and TopThree use+Visible author copy may be literal or an ordinary graph `Text` reference. Both components use`label={copy}`. When a reference is used, the graph first materializes the package-owned item shell-from that exact Text and then shares the one result across schedule, event and render work. Tier row-names remain Style configuration because they define the board vocabulary rather than dynamic item-copy.+from that exact Text and then shares the one result across schedule, event and render work.```svml<import as="copy" from="@hypit/text@1"/>diff --git a/packages/ranking/src/activation.ts b/packages/ranking/src/activation.tsindex cf9ef4fd..60a14dba 100644--- a/packages/ranking/src/activation.ts+++ b/packages/ranking/src/activation.ts@@ -3,8 +3,6 @@ import { createMarkupSurfaceHostFacet } from "@hypit/markup";import {decodeColumnStyleSurface,decodeColumnSurface,- decodeTierBoardStyleSurface,- decodeTierBoardSurface,decodeTopThreeStyleSurface,decodeTopThreeSurface,rankingComponent,@@ -14,10 +12,8 @@ import {} from "./index.js";const facets = [- ["tier-style", decodeTierBoardStyleSurface],["column-style", decodeColumnStyleSurface],["top-three-style", decodeTopThreeStyleSurface],- ["tier", decodeTierBoardSurface],["column", decodeColumnSurface],["top-three", decodeTopThreeSurface],] as const;diff --git a/packages/ranking/src/component.ts b/packages/ranking/src/component.tsindex 4f92e6ce..c8be75f0 100644--- a/packages/ranking/src/component.ts+++ b/packages/ranking/src/component.ts@@ -10,11 +10,10 @@ import type { CanvasSpace, SpatialFrame } from "@hypit/spatial";import type { Text } from "@hypit/text";import { rankingProducers, rankingTypes } from "./manifest.js";-import { appendColumnItem, appendColumnWindowCandidate, appendRankingItemSpec, appendRankingSound, appendTierBoardItem, appendTopThreeItem, assertColumnProgram, assertRankingSchedule, assertRankingSoundEventPlan, assertTierBoardProgram, assertTopThreeProgram, buildColumnProgram, buildColumnSchedule, buildColumnSoundEvents, buildRankingSchedule, buildTierBoardProgram, buildTierBoardSoundEvents, buildTopThreeProgram, buildTopThreeSoundEvents, createColumnItemSet, createColumnWindowCandidateSet, createRankingItemSpecSet, createRankingSoundSet, createTierBoardItemSet, createTopThreeItemSet, materializeRankingTextItem, projectColumnSegmentOuterWindow, projectColumnSelectionOuterWindow } from "./schedule.js";+import { appendColumnItem, appendColumnWindowCandidate, appendRankingItemSpec, appendRankingSound, appendTopThreeItem, assertColumnProgram, assertRankingSchedule, assertRankingSoundEventPlan, assertTopThreeProgram, buildColumnProgram, buildColumnSchedule, buildColumnSoundEvents, buildRankingSchedule, buildTopThreeProgram, buildTopThreeSoundEvents, createColumnItemSet, createColumnWindowCandidateSet, createRankingItemSpecSet, createRankingSoundSet, createTopThreeItemSet, materializeRankingTextItem, projectColumnSegmentOuterWindow, projectColumnSelectionOuterWindow } from "./schedule.js";import {renderColumn,renderRankingAudio,- renderTierBoard,renderTopThree,} from "./render.js";import type {@@ -32,10 +31,6 @@ import type {RankingSoundEventPlan,RankingSoundSet,RankingSoundStyle,- TierBoardItemSet,- TierBoardItemSpec,- TierBoardProgram,- TierBoardStyle,TopThreeItemSet,TopThreeItemSpec,TopThreeProgram,@@ -127,21 +122,12 @@ export const rankingComponent = {})) }, needs: {} }),},...([- [rankingProducers.createTierItems, createTierBoardItemSet],[rankingProducers.createColumnItems, createColumnItemSet],[rankingProducers.createTopThreeItems, createTopThreeItemSet],] as const).map(([producer, create]) => ({producer,handler: () => ({ outputs: { set: output(create()) }, needs: {} }),})),- {- producer: rankingProducers.appendTierItem,- handler: ({ inputs }) => ({ outputs: { set: output(appendTierBoardItem(- inline<TierBoardItemSet>(inputs.set?.value, "TierBoardItemSet"),- inline<TierBoardItemSpec>(inputs.spec?.value, "TierBoardItemSpec"),- blob(inputs.icon?.value, "TierBoard icon"),- )) }, needs: {} }),- },...([[rankingProducers.appendColumnItem, false],[rankingProducers.appendColumnIconItem, true],@@ -164,14 +150,6 @@ export const rankingComponent = {...(hasIcon ? [blob(inputs.icon?.value, "TopThree icon")] : []),)) }, needs: {} }),})),- {- producer: rankingProducers.tierProgram,- handler: ({ inputs }) => {- const common = programInputs(inputs);- return { outputs: { program: output(buildTierBoardProgram(common.header, common.frame, common.schedule,- inline<TierBoardStyle>(inputs.style?.value, "TierBoardStyle"), inline<TierBoardItemSet>(inputs.set?.value, "TierBoardItemSet"))) }, needs: {} };- },- },{producer: rankingProducers.columnProgram,handler: ({ inputs }) => {@@ -190,7 +168,6 @@ export const rankingComponent = {},},...([- [rankingProducers.tierEvents, buildTierBoardSoundEvents, "TierBoardStyle"],[rankingProducers.columnEvents, buildColumnSoundEvents, "ColumnStyle"],[rankingProducers.topThreeEvents, buildTopThreeSoundEvents, "TopThreeStyle"],] as const).map(([producer, build, styleLabel]) => ({@@ -225,7 +202,6 @@ export const rankingComponent = {)) }, needs: {} }),},...([- [rankingProducers.renderTier, renderTierBoard, "TierBoardProgram"],[rankingProducers.renderColumn, renderColumn, "ColumnProgram"],[rankingProducers.renderTopThree, renderTopThree, "TopThreeProgram"],] as const).map(([producer, render, label]) => ({@@ -238,8 +214,6 @@ export const rankingComponent = {validators: [{ type: rankingTypes.schedule,handler: ({ value }) => assertRankingSchedule(inline<RankingSchedule>(value, "RankingSchedule")) },- { type: rankingTypes.tierProgram,- handler: ({ value }) => assertTierBoardProgram(inline<TierBoardProgram>(value, "TierBoardProgram")) },{ type: rankingTypes.columnProgram,handler: ({ value }) => assertColumnProgram(inline<ColumnProgram>(value, "ColumnProgram")) },{ type: rankingTypes.topThreeProgram,diff --git a/packages/ranking/src/fragment.ts b/packages/ranking/src/fragment.tsindex b938443e..c05aff09 100644--- a/packages/ranking/src/fragment.ts+++ b/packages/ranking/src/fragment.ts@@ -27,12 +27,6 @@ export type RankingFragmentSound = {};const definition = (variant: RankingVariant) => {- if (variant === "tier-board") return {- style: rankingTypes.tierStyle, set: rankingTypes.tierItems, program: rankingTypes.tierProgram,- create: rankingProducers.createTierItems, append: rankingProducers.appendTierItem,- appendIcon: rankingProducers.appendTierItem, build: rankingProducers.tierProgram,- events: rankingProducers.tierEvents, render: rankingProducers.renderTier,- } as const;if (variant === "column") return {style: rankingTypes.columnStyle, set: rankingTypes.columnItems, program: rankingTypes.columnProgram,create: rankingProducers.createColumnItems, append: rankingProducers.appendColumnItem,diff --git a/packages/ranking/src/index.ts b/packages/ranking/src/index.tsindex 7fe4bf95..792cf1e9 100644--- a/packages/ranking/src/index.ts+++ b/packages/ranking/src/index.ts@@ -1,13 +1,11 @@-export { appendColumnWindowCandidate, appendRankingItemSpec, appendRankingSound, appendColumnItem, appendTierBoardItem, appendTopThreeItem, assertColumnProgram, assertColumnStyle, assertColumnWindowCandidateSet, assertRankingHeader, assertRankingItemSpec, assertRankingItemSpecSet, assertRankingTextItemShell, assertRankingSchedule, assertRankingSoundEventPlan, assertRankingSoundStyle, assertTierBoardProgram, assertTierBoardStyle, assertTopThreeProgram, assertTopThreeStyle, buildColumnProgram, buildColumnSchedule, buildColumnSoundEvents, buildRankingSchedule, buildTierBoardProgram, buildTierBoardSoundEvents, buildTopThreeProgram, buildTopThreeSoundEvents, createColumnItemSet, createColumnWindowCandidateSet, createRankingItemSpecSet, createRankingSoundSet, createTierBoardItemSet, createTopThreeItemSet, projectColumnSegmentOuterWindow, projectColumnSelectionOuterWindow, sealRankingHeader, sealRankingTextItemShell, materializeRankingTextItem } from "./schedule.js";+export { appendColumnWindowCandidate, appendRankingItemSpec, appendRankingSound, appendColumnItem, appendTopThreeItem, assertColumnProgram, assertColumnStyle, assertColumnWindowCandidateSet, assertRankingHeader, assertRankingItemSpec, assertRankingItemSpecSet, assertRankingTextItemShell, assertRankingSchedule, assertRankingSoundEventPlan, assertRankingSoundStyle, assertTopThreeProgram, assertTopThreeStyle, buildColumnProgram, buildColumnSchedule, buildColumnSoundEvents, buildRankingSchedule, buildTopThreeProgram, buildTopThreeSoundEvents, createColumnItemSet, createColumnWindowCandidateSet, createRankingItemSpecSet, createRankingSoundSet, createTopThreeItemSet, projectColumnSegmentOuterWindow, projectColumnSelectionOuterWindow, sealRankingHeader, sealRankingTextItemShell, materializeRankingTextItem } from "./schedule.js";export {decodeColumnStyle,- decodeTierBoardStyle,decodeTopThreeStyle,} from "./style.js";export {renderColumn,renderRankingAudio,- renderTierBoard,renderTopThree,} from "./render.js";export { rankingComponent } from "./component.js";@@ -17,8 +15,6 @@ export { columnOuterWindowSchema, columnWindowCandidateSetSchema, rankingDependeexport {decodeColumnStyleSurface,decodeColumnSurface,- decodeTierBoardStyleSurface,- decodeTierBoardSurface,decodeTopThreeStyleSurface,decodeTopThreeSurface,} from "./surface.js";diff --git a/packages/ranking/src/manifest.ts b/packages/ranking/src/manifest.tsindex 42f1d564..d752552f 100644--- a/packages/ranking/src/manifest.ts+++ b/packages/ranking/src/manifest.ts@@ -29,13 +29,10 @@ export const rankingTypes = {soundStyle: { module: rankingModuleRef, name: "RankingSoundStyle" },soundEvents: { module: rankingModuleRef, name: "RankingSoundEventPlan" },sounds: { module: rankingModuleRef, name: "RankingSoundSet" },- tierStyle: { module: rankingModuleRef, name: "TierBoardStyle" },columnStyle: { module: rankingModuleRef, name: "ColumnStyle" },topThreeStyle: { module: rankingModuleRef, name: "TopThreeStyle" },- tierItems: { module: rankingModuleRef, name: "TierBoardItemSet" },columnItems: { module: rankingModuleRef, name: "ColumnItemSet" },topThreeItems: { module: rankingModuleRef, name: "TopThreeItemSet" },- tierProgram: { module: rankingModuleRef, name: "TierBoardProgram" },columnProgram: { module: rankingModuleRef, name: "ColumnProgram" },topThreeProgram: { module: rankingModuleRef, name: "TopThreeProgram" },} satisfies Record<string, TypeRef>;@@ -49,25 +46,20 @@ export const rankingProducers = {createColumnCandidates: { module: rankingModuleRef, name: "create-column-window-candidates" },appendColumnCandidate: { module: rankingModuleRef, name: "append-column-window-candidate" },columnSchedule: { module: rankingModuleRef, name: "build-column-schedule" },- createTierItems: { module: rankingModuleRef, name: "create-tier-board-items" },- appendTierItem: { module: rankingModuleRef, name: "append-tier-board-item" },createColumnItems: { module: rankingModuleRef, name: "create-column-items" },appendColumnItem: { module: rankingModuleRef, name: "append-column-item" },appendColumnIconItem: { module: rankingModuleRef, name: "append-column-icon-item" },createTopThreeItems: { module: rankingModuleRef, name: "create-top-three-items" },appendTopThreeItem: { module: rankingModuleRef, name: "append-top-three-item" },appendTopThreeIconItem: { module: rankingModuleRef, name: "append-top-three-icon-item" },- tierProgram: { module: rankingModuleRef, name: "build-tier-board-program" },columnProgram: { module: rankingModuleRef, name: "build-column-program" },topThreeProgram: { module: rankingModuleRef, name: "build-top-three-program" },- tierEvents: { module: rankingModuleRef, name: "build-tier-board-sound-events" },columnEvents: { module: rankingModuleRef, name: "build-column-sound-events" },topThreeEvents: { module: rankingModuleRef, name: "build-top-three-sound-events" },createSounds: { module: rankingModuleRef, name: "create-ranking-sounds" },appendAppearSound: { module: rankingModuleRef, name: "append-ranking-appear-sound" },appendMoveSound: { module: rankingModuleRef, name: "append-ranking-move-sound" },renderAudio: { module: rankingModuleRef, name: "render-ranking-audio" },- renderTier: { module: rankingModuleRef, name: "render-tier-board" },renderColumn: { module: rankingModuleRef, name: "render-column" },renderTopThree: { module: rankingModuleRef, name: "render-top-three" },materializeTextItem: { module: rankingModuleRef, name: "materialize-text-item" },@@ -79,7 +71,7 @@ const unsigned = { kind: "number", integer: true, minimum: 0 } as const;const object = (fields: Readonly<Record<string, { readonly schema: ValueSchema; readonly optional?: boolean }>>, allowUnknown = false): ValueSchema => ({kind: "object", fields, ...(allowUnknown ? { allowUnknown: true } : {}),});-const variants = { kind: "string", enum: ["tier-board", "column", "top-three"] } as const;+const variants = { kind: "string", enum: ["column", "top-three"] } as const;const itemBase = {id: { schema: string },stackingOrder: { schema: integer, optional: true },@@ -88,7 +80,6 @@ export const rankingHeaderSchema: ValueSchema = object({id: { schema: string }, variant: { schema: variants },});export const rankingItemSpecSchema: ValueSchema = { kind: "oneOf", variants: [- object({ variant: { schema: { kind: "literal", value: "tier-board" } }, ...itemBase, tier: { schema: string }, entry: { schema: { kind: "string", enum: ["direct", "stage"] } } }),object({ variant: { schema: { kind: "literal", value: "column" } }, ...itemBase,label: { schema: string }, rank: { schema: { kind: "number", integer: true, minimum: 1 } }, preset: { schema: { kind: "boolean" } },}),@@ -113,7 +104,7 @@ export const columnWindowCandidateSetSchema: ValueSchema = object({});const triggeredScheduleSchema: ValueSchema = object({id: { schema: string },- variant: { schema: { kind: "string", enum: ["tier-board", "top-three"] } },+ variant: { schema: { kind: "literal", value: "top-three" } },outer: { schema: frameSpan }, terminalFrame: { schema: unsigned },entries: { schema: { kind: "array", minItems: 1, items: object({itemId: { schema: string }, triggerFrame: { schema: unsigned },@@ -148,110 +139,11 @@ export const rankingSoundSetSchema: ValueSchema = object({appear: { schema: object({}, true), optional: true }, move: { schema: object({}, true), optional: true },});const programDefinitions = [- [rankingTypes.tierProgram, rankingTypes.tierStyle, rankingTypes.tierItems, rankingProducers.tierProgram, rankingProducers.tierEvents, rankingProducers.renderTier],[rankingTypes.columnProgram, rankingTypes.columnStyle, rankingTypes.columnItems, rankingProducers.columnProgram, rankingProducers.columnEvents, rankingProducers.renderColumn],[rankingTypes.topThreeProgram, rankingTypes.topThreeStyle, rankingTypes.topThreeItems, rankingProducers.topThreeProgram, rankingProducers.topThreeEvents, rankingProducers.renderTopThree],] as const;export const rankingMarkupSurfaces = [- { name: "tier-style", tag: "TierBoardStyle", mode: "structured", outputs: [rankingTypes.tierStyle, rankingTypes.soundStyle],- vocabulary: {- summary: "Compiles one SVS Recipe and one exact font into the Style a TierBoard is drawn in, and the private sound Style it connects.",- attributes: [- { name: "id", kind: "identifier", required: true,- summary: "Names this Style so a TierBoard can reference it." },- { name: "recipe", kind: "reference", required: true, accepts: [svsRecipeType],- summary: "Chooses the Recipe carrying the tier rows, board Paint, row and cell geometry, icon treatment, staging pose and motion.",- recipe: [- { name: "rows", required: false, fallback: "s:S:#ef4444|a:A:#f59e0b|b:B:#22c55e|c:C:#3b82f6",- summary: "Defines the tier rows the board draws, each written `id:label:color` and separated by `|`." },- { name: "font-size", required: false, fallback: "28",- summary: "Sets the size in pixels the Item copy is set at." },- { name: "font-weight", required: false, fallback: "700",- summary: "Sets the weight the Item copy is set at." },- { name: "text-color", required: false, fallback: "#ffffff",- summary: "Sets the color the Item copy is drawn in." },- { name: "line-height", required: false, fallback: "1.15",- summary: "Sets the line height the Item copy is set on, as a multiple of its size." },- { name: "board-background", required: false, fallback: "#151821",- summary: "Sets the color the board fills with." },- { name: "board-border-color", required: false, fallback: "#ffffff33",- summary: "Sets the color of the board's border." },- { name: "board-border-width", required: false, fallback: "1",- summary: "Sets the width in pixels of the board's border." },- { name: "board-radius", required: false, fallback: "18",- summary: "Sets the corner radius in pixels of the board." },- { name: "board-shadow-x", required: false, fallback: "0",- summary: "Offsets the board's shadow horizontally in pixels." },- { name: "board-shadow-y", required: false, fallback: "10",- summary: "Offsets the board's shadow vertically in pixels." },- { name: "board-shadow-blur", required: false, fallback: "24",- summary: "Sets the blur radius in pixels of the board's shadow." },- { name: "board-shadow-spread", required: false, fallback: "0",- summary: "Sets the spread in pixels of the board's shadow." },- { name: "board-shadow-color", required: false, fallback: "#00000066",- summary: "Sets the color of the board's shadow." },- { name: "appear-frames", required: false, fallback: "6",- summary: "Sets how many frames an Item takes to appear." },- { name: "move-frames", required: false, fallback: "8",- summary: "Sets how many frames a staged Item takes to move into its row." },- { name: "motion-easing", required: false, fallback: "ease-in-out",- values: ["linear", "ease-in", "ease-out", "ease-in-out"],- summary: "Selects the easing both the appearance and the move are timed with." },- { name: "label-width", required: false, fallback: "72",- summary: "Sets the width in pixels of the column the row labels are set in." },- { name: "padding", required: false, fallback: "18",- summary: "Sets the inset in pixels between the board's edge and its rows." },- { name: "row-height", required: false, fallback: "92",- summary: "Sets the height in pixels of one tier row." },- { name: "row-gap", required: false, fallback: "10",- summary: "Sets the gap in pixels between tier rows." },- { name: "cell-gap", required: false, fallback: "12",- summary: "Sets the gap in pixels between the Items within one row." },- { name: "icon-size", required: false, fallback: "72",- summary: "Sets the size in pixels an Item's icon is drawn at." },- { name: "icon-radius", required: false, fallback: "12",- summary: "Sets the corner radius in pixels of an Item's icon." },- { name: "icon-fit", required: false, fallback: "cover",- values: ["contain", "cover"],- summary: "Decides whether an Item's icon fits inside its box or fills it." },- { name: "stage-x", required: false, fallback: "0.5",- summary: "Places the staging point horizontally, as a fraction of the Frame's width." },- { name: "stage-y", required: false, fallback: "0.23",- summary: "Places the staging point vertically, as a fraction of the Frame's height." },- { name: "stage-size", required: false, fallback: "108",- summary: "Sets the size in pixels a staged Item is drawn at before it moves in." },- { name: "board-stack", required: false, fallback: "20",- summary: "Sets the draw order the board itself is placed at." },- { name: "stage-stack", required: false, fallback: "25",- summary: "Sets the draw order the staging area is placed at." },- { name: "item-stack", required: false, fallback: "30",- summary: "Sets the draw order every Item is placed at, unless the Item overrides it." },- { name: "appear-gain", required: false, fallback: "1",- summary: "Sets the gain the appear sound is played at." },- { name: "move-gain", required: false, fallback: "1",- summary: "Sets the gain the move sound is played at." },- { name: "sound-fade-frames", required: false, fallback: "0",- summary: "Sets how many frames each sound fades in and out over." },- ] },- { name: "font", kind: "reference", required: true,- accepts: [mediaTypes.fontArtifact, mediaTypes.fontStack],- summary: "Chooses the exact face, or a whole stack that already carries its own fallbacks, the board copy is set in." },- ],- ports: [- { name: "", type: rankingTypes.tierStyle,- summary: "The compiled visual Style, addressed by the element's own id." },- { name: "sound", type: rankingTypes.soundStyle,- summary: "The compiled sound Style, connected only when the board authors a sound." },- ],- example: `<ranking:TierBoardStyle id="tier-style" recipe={recipes.ranking.tier} font={ui-font}/>`,- notes: [- "The element is empty; it accepts no children and no text.",- "The Recipe is validated against the variant, so a Recipe holding another board's keys is refused by name.",- "The Recipe accepts exactly the properties listed here; every other property is refused by name.",- "Tier row ids, labels and colors are Recipe configuration, because they define the board vocabulary rather than item copy.",- ],- } },{ name: "column-style", tag: "ColumnStyle", mode: "structured", outputs: [rankingTypes.columnStyle, rankingTypes.soundStyle],vocabulary: {summary: "Compiles one SVS Recipe and one exact font into the Style a Column is drawn in, and the private sound Style it connects.",@@ -417,71 +309,6 @@ export const rankingMarkupSurfaces = ["Every other property is refused by name, except the board Paint and `stage-stack` keys, which a podium accepts and never reads.",],} },- { name: "tier", tag: "TierBoard", mode: "structured", outputs: [rankingTypes.header, rankingTypes.itemSpec, rankingTypes.schedule, rankingTypes.tierProgram, compositionTypes.visualTrack, compositionTypes.audioTrack],- vocabulary: {- summary: "Places ordered Items into tier rows, one on each occurrence of a Moment, and publishes the board and the Tracks it renders to.",- appearance:- "One rounded, bordered, shadowed board filling its Frame, with the Style's tier rows stacked down it from the top: each row is a full-width bar in that tier's own color, its short label set in a fixed-width column at the row's left edge. Items are square rounded icon tiles with no copy of their own; each lands in the row its `tier` names and packs left to right after the label column, one tile per trigger occurrence in document order. A tile written `direct` fades and rises into its cell over the appear frames; a tile written `stage` appears first inside a dashed square floating near the top of the Frame, holds there at stage size, then shrinks and travels into its cell. Every tile already placed stays exactly where it landed while the later ones arrive.",- preview: previewImage("TierBoard.png"),- attributes: [- { name: "id", kind: "identifier", required: true,- summary: "Names this board so its Schedule, Program and Tracks can be referenced elsewhere in the Source." },- { name: "semantic", kind: "reference", required: true, accepts: [semanticTrackTypes.track],- summary: "Chooses the SemanticTrack that owns the frame domain and gives every trigger its frame." },- { name: "frame", kind: "reference", required: true, accepts: [spatialTypes.frame],- summary: "Chooses the Frame the whole board occupies." },- { name: "during", kind: "reference", required: true, accepts: [narrativeTypes.selection],- summary: "Chooses the Selection the board is on screen for." },- { name: "triggers", kind: "reference", required: true, accepts: [narrativeTypes.moment],- summary: "Chooses the Moment whose occurrences place one TierItem each, in document order." },- { name: "terminal", kind: "reference", required: true, accepts: [narrativeTypes.moment],- summary: "Chooses the Moment the board settles on and ends after." },- { name: "style", kind: "reference", required: true, accepts: [rankingTypes.tierStyle],- summary: "Chooses the TierBoardStyle this board is drawn in, and only that variant's." },- { name: "appear-sound", kind: "reference", required: false, accepts: [mediaTypes.synchronized],- summary: "Chooses the Synchronized Medium played as each Item appears." },- { name: "move-sound", kind: "reference", required: false, accepts: [mediaTypes.synchronized],- summary: "Chooses the Synchronized Medium played as a staged Item moves into its row." },- ],- children: [- { tag: "TierItem", cardinality: "many",- summary: "One Item of the board, placed at its own trigger occurrence in document order; it is empty.",- attributes: [- { name: "id", kind: "identifier", required: false,- summary: "Names this Item within the board; an omitted id is generated from the Item's position." },- { name: "tier", kind: "literal", required: true,- summary: "Chooses the row of the Style Recipe this Item is placed into." },- { name: "entry", kind: "literal", required: false, values: ["direct", "stage"],- summary: "Decides whether the Item lands in its row directly or stages first and moves in, and defaults to direct." },- { name: "icon", kind: "reference", required: true, accepts: [mediaTypes.blobArtifact],- summary: "Chooses the image drawn beside the Item." },- { name: "stack", kind: "literal", required: false,- summary: "Overrides the Style's draw order for this Item alone." },- ] },- ],- ports: [- { name: "schedule", type: rankingTypes.schedule,- summary: "The resolved Schedule: each Item's trigger frame and its staged, cumulative and settled spans." },- { name: "program", type: rankingTypes.tierProgram,- summary: "The resolved board: its Frame, Style, Schedule and ordered Items." },- { name: "visual", type: compositionTypes.visualTrack,- summary: "The rendered board, an ordinary peer VisualTrack." },- { name: "audio", type: compositionTypes.audioTrack,- summary: "The rendered board sound, published only when a sound is authored." },- ],- example: `<ranking:TierBoardStyle id="tier-style" recipe={recipes.ranking.tier} font={ui-font}/>-<ranking:TierBoard id="tiers" semantic={speech.semantic} frame={board-frame}- during={story.selection.board} triggers={story.moment.place} terminal={story.moment.done}- style={tier-style}>- <ranking:TierItem id="row-regen" tier="s" icon={icon-regen}/>- <ranking:TierItem id="row-remini" tier="a" entry="stage" icon={icon-remini}/>-</ranking:TierBoard>`,- notes: [- "The board requires at least one TierItem, accepts no other child and no text of its own, and Item ids must be unique within it.",- "`move-sound` requires at least one TierItem written `entry=\"stage\"`; a sound with nothing to sound on is refused.",- "Authoring either sound also connects the Style's `.sound` output, so `style` must name a TierBoardStyle written in this Source.",- ],- } },{ name: "column", tag: "Column", mode: "structured", outputs: [rankingTypes.header, rankingTypes.itemSpec, rankingTypes.textItemShell, rankingTypes.schedule, rankingTypes.columnProgram, compositionTypes.visualTrack, compositionTypes.audioTrack],vocabulary: {summary: "Places rows by explicit rank, reveals each non-preset row in its own Selection, and publishes the board and the Tracks it renders to.",@@ -633,13 +460,10 @@ export const rankingManifest: ModuleManifest = {{ name: rankingTypes.soundStyle.name },{ name: rankingTypes.soundEvents.name },{ name: rankingTypes.sounds.name },- { name: rankingTypes.tierStyle.name },{ name: rankingTypes.columnStyle.name },{ name: rankingTypes.topThreeStyle.name },- { name: rankingTypes.tierItems.name },{ name: rankingTypes.columnItems.name },{ name: rankingTypes.topThreeItems.name },- { name: rankingTypes.tierProgram.name },{ name: rankingTypes.columnProgram.name },{ name: rankingTypes.topThreeProgram.name },],@@ -674,13 +498,11 @@ export const rankingManifest: ModuleManifest = {{ name: "outer", type: rankingTypes.columnOuter }, { name: "candidates", type: rankingTypes.columnCandidates },], outputs: [{ name: "schedule", type: rankingTypes.schedule }], needs: [] },...([- [rankingProducers.createTierItems, rankingTypes.tierItems],[rankingProducers.createColumnItems, rankingTypes.columnItems],[rankingProducers.createTopThreeItems, rankingTypes.topThreeItems],] as const).map(([producer, type]) => ({name: producer.name, inputs: [], outputs: [{ name: "set", type }], needs: [],})),- { name: rankingProducers.appendTierItem.name, inputs: [{ name: "set", type: rankingTypes.tierItems }, { name: "spec", type: rankingTypes.itemSpec }, { name: "icon", type: mediaTypes.blobArtifact }], outputs: [{ name: "set", type: rankingTypes.tierItems }], needs: [] },...([[rankingProducers.appendColumnItem, rankingTypes.columnItems],[rankingProducers.appendTopThreeItem, rankingTypes.topThreeItems],diff --git a/packages/ranking/src/render.ts b/packages/ranking/src/render.tsindex 7aa92abd..08e8f086 100644--- a/packages/ranking/src/render.ts+++ b/packages/ranking/src/render.ts@@ -14,6 +14,7 @@ import type {VisualTrack,} from "@hypit/composition";import { synchronizedMediaSampleFrames, verifySynchronizedMedia } from "@hypit/media";+import type { BlobRef } from "@hypit/protocol";import {assertProgramSpaceIdentity,programFrameSampleBoundary,@@ -25,10 +26,9 @@ import {assertColumnProgram,assertRankingSoundEventPlan,assertRankingSoundStyle,- assertTierBoardProgram,assertTopThreeProgram,fitColumnRevealMotion,- fitRankingStageMotion,+ fitRankingStageAppearFrames,} from "./schedule.js";import type {ColumnItem,@@ -38,8 +38,6 @@ import type {RankingSoundSet,RankingSoundStyle,RankingTextStyle,- TierBoardItem,- TierBoardProgram,TopThreeItem,TopThreeProgram,} from "./types.js";@@ -147,7 +145,7 @@ function iconElement(input: {readonly id: string;readonly order: number;readonly parent: string;- readonly artifact: TierBoardItem["icon"];+ readonly artifact: BlobRef;readonly x: number;readonly y: number;readonly size: number;@@ -212,26 +210,6 @@ function finalTransform(): string {return "translate(0px,0px) scale(1)";}-function stageTransform(finalX: number, finalY: number, stageX: number, stageY: number, scale: number): string {- return `translate(${px(stageX - finalX)},${px(stageY - finalY)}) scale(${scale})`;-}--function settledItemAnimation(input: {- readonly duration: number;- readonly appearFrames: number;- readonly moveStart: number;- readonly moveEnd: number;- readonly stageTransform: string;- readonly easing: "linear" | "ease-in" | "ease-out" | "ease-in-out";-}): VisualAnimation {- return animation(input.duration, [- { atFrame: 0, style: transformStyle(`${input.stageTransform} scale(0.82)`, 0), easing: "ease-out" },- { atFrame: input.appearFrames, style: transformStyle(input.stageTransform, 1) },- { atFrame: input.moveStart, style: transformStyle(input.stageTransform, 1), easing: input.easing },- { atFrame: input.moveEnd, style: transformStyle(finalTransform(), 1) },- ]);-}-function directItemAnimation(duration: number, appearFrames: number): VisualAnimation {return animation(duration, [{ atFrame: 0, style: transformStyle("translate(0px,8px) scale(0.82)", 0), easing: "ease-out" },@@ -245,102 +223,6 @@ function sealTrack(space: ProgramSpace, id: string, presents: readonly VisualPrereturn value;}-export function renderTierBoard(space: ProgramSpace, program: TierBoardProgram): VisualTrack {- assertProgramSpaceIdentity(space);- assertTierBoardProgram(program);- const { frame, style, schedule } = program;- const presents: VisualPresent[] = [];- const boardElements: VisualElement[] = [absoluteBox({- id: "tier-board", order: 0, x: frame.xPx, y: frame.yPx, width: frame.widthPx, height: frame.heightPx,- style: boardStyle(style.board),- })];- for (const [index, row] of style.rows.entries()) {- const y = style.paddingPx + index * (style.rowHeightPx + style.rowGapPx);- boardElements.push(absoluteBox({- id: `tier-row-${row.id}`, parent: "tier-board", order: boardElements.length,- x: style.paddingPx, y, width: frame.widthPx - style.paddingPx * 2, height: style.rowHeightPx,- style: [{ name: "background", value: row.color }, { name: "border-radius", value: px(Math.min(12, style.iconRadiusPx)) }],- }));- boardElements.push(simpleText({- id: `tier-label-${row.id}`, parent: `tier-row-${row.id}`, order: boardElements.length,- text: row.label, typography: style.text, x: 0, y: 0, width: style.labelWidthPx, height: style.rowHeightPx,- }));- }- presents.push(present({- id: `${program.id}:board`, start: schedule.outer.startFrame, end: schedule.outer.endFrameExclusive,- stacking: style.boardStackingOrder, tieBreak: `${program.id}:0000:board`, elements: boardElements,- }));- if (program.items.some((item) => item.entry === "stage")) {- const size = style.stageSizePx;- presents.push(present({- id: `${program.id}:stage`, start: schedule.entries[0]!.triggerFrame, end: schedule.terminalFrame,- stacking: style.stageStackingOrder, tieBreak: `${program.id}:0001:stage`, elements: [absoluteBox({- id: "tier-stage", order: 0,- x: frame.xPx + frame.widthPx * style.stagePoint.x - size / 2,- y: frame.yPx + frame.heightPx * style.stagePoint.y - size / 2,- width: size, height: size,- style: [- { name: "border", value: `${px(2)} dashed ${style.text.color}` },- { name: "border-radius", value: px(style.iconRadiusPx) },- { name: "opacity", value: 0.45 },- ],- })],- }));- }- const rowCounts = new Map<string, number>();- for (const [index, item] of program.items.entries()) {- const entry = schedule.entries[index]!;- const rowIndex = style.rows.findIndex((row) => row.id === item.tier);- const cell = rowCounts.get(item.tier) ?? 0;- rowCounts.set(item.tier, cell + 1);- const x = frame.xPx + style.paddingPx + style.labelWidthPx + cell * (style.iconSizePx + style.cellGapPx);- const y = frame.yPx + style.paddingPx + rowIndex * (style.rowHeightPx + style.rowGapPx)- + (style.rowHeightPx - style.iconSizePx) / 2;- assert(x + style.iconSizePx <= frame.xPx + frame.widthPx - style.paddingPx,- `TierBoard row ${item.tier} cannot fit Item ${item.id}.`);- const duration = entry.stage.endFrameExclusive - entry.stage.startFrame;- const fitted = fitRankingStageMotion(duration, style.motion.appearFrames, style.motion.moveFrames, item.entry === "stage");- const rootAnimation = item.entry === "direct"- ? directItemAnimation(duration, fitted.appearFrames)- : settledItemAnimation({- duration,- appearFrames: fitted.appearFrames,- moveStart: entry.stage.endFrameExclusive - fitted.moveFrames - entry.triggerFrame,- moveEnd: entry.stage.endFrameExclusive - entry.triggerFrame,- stageTransform: stageTransform(- x, y,- frame.xPx + frame.widthPx * style.stagePoint.x - style.iconSizePx / 2,- frame.yPx + frame.heightPx * style.stagePoint.y - style.iconSizePx / 2,- style.stageSizePx / style.iconSizePx,- ),- easing: style.motion.easing,- });- const root = `tier-item-${item.id}`;- const itemElements = (animationValue?: VisualAnimation): VisualElement[] => [- absoluteBox({ id: root, order: 0, x, y, width: style.iconSizePx, height: style.iconSizePx,- ...(animationValue === undefined ? {} : { animation: animationValue }) }),- iconElement({ id: "icon", parent: root, order: 1, artifact: item.icon, x: 0, y: 0, size: style.iconSizePx, radius: style.iconRadiusPx, fit: style.iconFit }),- ];- presents.push(present({- id: `${program.id}:item:${item.id}:stage`,- start: entry.stage.startFrame,- end: entry.stage.endFrameExclusive,- stacking: item.stackingOrder ?? style.itemStackingOrder,- tieBreak: `${program.id}:item:${String(index).padStart(4, "0")}:${item.id}:stage`,- elements: itemElements(rootAnimation),- }));- if (entry.settled.endFrameExclusive > entry.settled.startFrame) presents.push(present({- id: `${program.id}:item:${item.id}:settled`,- start: entry.settled.startFrame,- end: entry.settled.endFrameExclusive,- stacking: item.stackingOrder ?? style.itemStackingOrder,- tieBreak: `${program.id}:item:${String(index).padStart(4, "0")}:${item.id}:settled`,- elements: itemElements(),- }));- }- return sealTrack(space, program.id, presents);-}-function rowY(frameY: number, frameHeight: number, padding: number, count: number, index: number, height: number, gap: number): number {const total = count * height + Math.max(0, count - 1) * gap;return frameY + Math.max(padding, frameHeight - padding - total) + index * (height + gap);@@ -585,7 +467,7 @@ export function renderTopThree(space: ProgramSpace, program: TopThreeProgram): Vid: root, order: 0, x, y, width: style.iconSizePx,height: style.iconSizePx + style.labelGapPx + style.text.sizePx * style.text.lineHeight,...(active ? { animation: directItemAnimation(duration,- fitRankingStageMotion(duration, style.motion.appearFrames, style.motion.moveFrames, false).appearFrames) } : {}),+ fitRankingStageAppearFrames(duration, style.motion.appearFrames)) } : {}),})];if (active) elements.push(absoluteBox({ id: accent, parent: root, order: 1, x: 0, y: 0, width: style.iconSizePx, height: style.iconSizePx,style: [diff --git a/packages/ranking/src/schedule.ts b/packages/ranking/src/schedule.tsindex 60b0a4e1..a6258043 100644--- a/packages/ranking/src/schedule.ts+++ b/packages/ranking/src/schedule.ts@@ -51,11 +51,6 @@ import type {RankingTextStyle,RankingVariant,TriggeredRankingSchedule,- TierBoardItem,- TierBoardItemSet,- TierBoardItemSpec,- TierBoardProgram,- TierBoardStyle,TopThreeItem,TopThreeItemSet,TopThreeItemSpec,@@ -108,7 +103,7 @@ function assertBlobImage(value: { readonly digest: string; readonly size: numberexport function assertRankingHeader(value: RankingHeader): void {identity(value.id, "RankingHeader.id");- assert(["tier-board", "column", "top-three"].includes(value.variant),+ assert(["column", "top-three"].includes(value.variant),"RankingHeader.variant is invalid.");}@@ -171,30 +166,6 @@ function assertCommonStyle(input: {stacking(input.itemStackingOrder, `${label}.itemStackingOrder`);}-export function assertTierBoardStyle(value: TierBoardStyle): void {- assertCommonStyle(value, "TierBoardStyle");- assertRankingBoardPaint(value.board, "TierBoardStyle.board");- assert(value.rows.length > 0, "TierBoardStyle.rows is empty.");- const rows = new Set<string>();- for (const [index, row] of value.rows.entries()) {- identity(row.id, `TierBoardStyle.rows.${index}.id`);- assert(!rows.has(row.id), `TierBoardStyle repeats row ${row.id}.`);- rows.add(row.id);- assert(row.label.trim().length > 0, `TierBoardStyle.rows.${index}.label is empty.`);- color(row.color, `TierBoardStyle.rows.${index}.color`);- }- for (const [name, numberValue] of Object.entries({- labelWidthPx: value.labelWidthPx, paddingPx: value.paddingPx, rowHeightPx: value.rowHeightPx,- rowGapPx: value.rowGapPx, cellGapPx: value.cellGapPx, stageSizePx: value.stageSizePx,- })) nonNegative(numberValue, `TierBoardStyle.${name}`);- assert(value.labelWidthPx > 0 && value.rowHeightPx > 0 && value.stageSizePx > 0,- "TierBoardStyle positive geometry is invalid.");- for (const [name, coordinate] of Object.entries(value.stagePoint)) {- assert(Number.isFinite(coordinate) && coordinate >= 0 && coordinate <= 1, `TierBoardStyle.stagePoint.${name} is invalid.`);- }- stacking(value.stageStackingOrder, "TierBoardStyle.stageStackingOrder");-}-export function assertColumnStyle(value: ColumnStyle): void {assertCommonStyle(value, "ColumnStyle");assertRankingBoardPaint(value.board, "ColumnStyle.board");@@ -224,10 +195,7 @@ export function assertTopThreeStyle(value: TopThreeStyle): void {export function assertRankingItemSpec(value: RankingItemSpec): void {identity(value.id, "RankingItemSpec.id");- if (value.variant === "tier-board") {- identity(value.tier, `TierBoardItemSpec.${value.id}.tier`);- assert(value.entry === "direct" || value.entry === "stage", `TierBoardItemSpec.${value.id}.entry is invalid.`);- } else if (value.variant === "column") {+ if (value.variant === "column") {assert(value.label.trim().length > 0, `ColumnItemSpec.${value.id}.label is empty.`);integer(value.rank, `ColumnItemSpec.${value.id}.rank`, 1);assert(typeof value.preset === "boolean", `ColumnItemSpec.${value.id}.preset is invalid.`);@@ -265,7 +233,7 @@ export function createRankingItemSpecSet(header: RankingHeader): RankingItemSpec}export function assertRankingItemSpecSet(value: RankingItemSpecSet): void {- assert(["tier-board", "column", "top-three"].includes(value.variant),+ assert(["column", "top-three"].includes(value.variant),"RankingItemSpecSet.variant is invalid.");const ids = new Set<string>();const ranks = new Set<number>();@@ -496,8 +464,7 @@ export function buildColumnSchedule(input: {function assertTriggeredRankingSchedule(value: TriggeredRankingSchedule): void {identity(value.id, "RankingSchedule.id");- assert(["tier-board", "top-three"].includes(value.variant),- "Triggered RankingSchedule.variant is invalid.");+ assert(value.variant === "top-three", "Triggered RankingSchedule.variant is invalid.");frame(value.outer.startFrame, "RankingSchedule.outer.startFrame");frame(value.outer.endFrameExclusive, "RankingSchedule.outer.endFrameExclusive");assert(value.outer.endFrameExclusive > value.outer.startFrame, "RankingSchedule.outer is empty.");@@ -582,7 +549,6 @@ function emptySet<T extends { readonly items: readonly unknown[] }>(): T {return { items: [] } as unknown as T;}-export const createTierBoardItemSet = (): TierBoardItemSet => emptySet();export const createColumnItemSet = (): ColumnItemSet => emptySet();export const createTopThreeItemSet = (): TopThreeItemSet => emptySet();@@ -590,14 +556,6 @@ function ensureNew(items: readonly { readonly id: string }[], id: string): voidassert(!items.some((item) => item.id === id), `Ranking Item ${id} is duplicated.`);}-export function appendTierBoardItem(set: TierBoardItemSet, spec: TierBoardItemSpec, icon: TierBoardItem["icon"]): TierBoardItemSet {- assert(Array.isArray(set.items), "TierBoardItemSet is invalid.");- assertRankingItemSpec(spec);- assertBlobImage(icon, `TierBoardItem.${spec.id}.icon`);- ensureNew(set.items, spec.id);- return canonicalize({ ...set, items: [...set.items, { ...structuredClone(spec), icon: structuredClone(icon) }] }) as unknown as TierBoardItemSet;-}-export function appendColumnItem(set: ColumnItemSet, spec: ColumnItemSpec, icon?: ColumnItem["icon"]): ColumnItemSet {assert(Array.isArray(set.items), "ColumnItemSet is invalid.");assertRankingItemSpec(spec);@@ -628,16 +586,9 @@ function columnIdsEqual(schedule: ColumnSchedule, items: readonly { readonly id:"Column Program Items differ from its Schedule.");}-export function fitRankingStageMotion(- durationFrames: number,- preferredAppearFrames: number,- preferredMoveFrames: number,- needsMove: boolean,-): { readonly appearFrames: number; readonly moveFrames: number } {+export function fitRankingStageAppearFrames(durationFrames: number, preferredAppearFrames: number): number {assert(Number.isSafeInteger(durationFrames) && durationFrames > 0, "Ranking stage duration is invalid.");- if (!needsMove) return { appearFrames: Math.min(preferredAppearFrames, durationFrames), moveFrames: 0 };- const moveFrames = Math.min(preferredMoveFrames, durationFrames);- return { appearFrames: Math.min(preferredAppearFrames, durationFrames - moveFrames), moveFrames };+ return Math.min(preferredAppearFrames, durationFrames);}export function fitColumnRevealMotion(@@ -658,18 +609,6 @@ export function fitColumnRevealMotion(return { mode: "stage", appearFrames, moveFrames: durationFrames - appearFrames };}-export function buildTierBoardProgram(header: RankingHeader, frameValue: import("@hypit/spatial").SpatialFrame, schedule: RankingSchedule, style: TierBoardStyle, set: TierBoardItemSet): TierBoardProgram {- assert(header.variant === "tier-board" && schedule.variant === "tier-board", "TierBoard variant is inconsistent.");- assertSpatialFrame(frameValue);- assertTierBoardStyle(style);- idsEqual(schedule, set.items);- const rows = new Set(style.rows.map((row) => row.id));- for (const item of set.items) assert(rows.has(item.tier), `TierBoard Item ${item.id} references unknown tier ${item.tier}.`);- const result: TierBoardProgram = { id: header.id, frame: structuredClone(frameValue), schedule: structuredClone(schedule), style: structuredClone(style), items: structuredClone(set.items) };- assertTierBoardProgram(result);- return canonicalize(result) as unknown as TierBoardProgram;-}-export function buildColumnProgram(header: RankingHeader, canvasValue: CanvasSpace, frameValue: import("@hypit/spatial").SpatialFrame, schedule: RankingSchedule, style: ColumnStyle, set: ColumnItemSet): ColumnProgram {assert(header.variant === "column" && schedule.variant === "column", "Column variant is inconsistent.");assertCanvasSpace(canvasValue);@@ -693,15 +632,6 @@ export function buildTopThreeProgram(header: RankingHeader, frameValue: import("return canonicalize(result) as unknown as TopThreeProgram;}-export function assertTierBoardProgram(value: TierBoardProgram): void {- assertRankingSchedule(value.schedule);- assert(value.schedule.variant === "tier-board", "TierBoardProgram Schedule variant is invalid.");- assertSpatialFrame(value.frame);- assertTierBoardStyle(value.style);- idsEqual(value.schedule, value.items);- value.items.forEach((item) => { assertRankingItemSpec(item); assertBlobImage(item.icon, `TierBoardItem.${item.id}.icon`); });-}-export function assertColumnProgram(value: ColumnProgram): void {assertRankingSchedule(value.schedule);assert(value.schedule.variant === "column", "ColumnProgram Schedule variant is invalid.");@@ -735,20 +665,6 @@ function sealEvents(id: string, variant: RankingVariant, events: readonly Rankinreturn canonicalize(value) as unknown as RankingSoundEventPlan;}-export function buildTierBoardSoundEvents(schedule: RankingSchedule, style: TierBoardStyle, specs: RankingItemSpecSet): RankingSoundEventPlan {- assert(schedule.variant === "tier-board" && specs.variant === "tier-board", "TierBoard event inputs disagree.");- assertTierBoardStyle(style);- idsEqual(schedule, specs.items);- const events = schedule.entries.flatMap((entry, index) => {- const spec = specs.items[index] as TierBoardItemSpec;- const duration = entry.stage.endFrameExclusive - entry.triggerFrame;- const fitted = fitRankingStageMotion(duration, style.motion.appearFrames, style.motion.moveFrames, spec.entry === "stage");- return [event(schedule.id, entry.itemId, "appear", entry.triggerFrame),- ...(spec.entry === "stage" ? [event(schedule.id, entry.itemId, "move", entry.stage.endFrameExclusive - fitted.moveFrames)] : [])];- });- return sealEvents(schedule.id, schedule.variant, events);-}-export function buildColumnSoundEvents(schedule: RankingSchedule, style: ColumnStyle, specs: RankingItemSpecSet): RankingSoundEventPlan {assert(schedule.variant === "column" && specs.variant === "column", "Column event inputs disagree.");assertColumnStyle(style);@@ -774,7 +690,7 @@ export function buildTopThreeSoundEvents(schedule: RankingSchedule, style: TopThexport function assertRankingSoundEventPlan(value: RankingSoundEventPlan): void {identity(value.id, "RankingSoundEventPlan.id");- assert(["tier-board", "column", "top-three"].includes(value.variant),+ assert(["column", "top-three"].includes(value.variant),"RankingSoundEventPlan.variant is invalid.");const ids = new Set<string>();for (const item of value.events) {diff --git a/packages/ranking/src/style.ts b/packages/ranking/src/style.tsindex 7b16b56d..6965a68e 100644--- a/packages/ranking/src/style.ts+++ b/packages/ranking/src/style.ts@@ -12,7 +12,6 @@ import type { SvsRecipe } from "@hypit/svs";import {assertColumnStyle,assertRankingSoundStyle,- assertTierBoardStyle,assertTopThreeStyle,} from "./schedule.js";import type {@@ -21,8 +20,6 @@ import type {RankingMotionStyle,RankingSoundStyle,RankingTextStyle,- TierBoardStyle,- TierRowStyle,TopThreeStyle,} from "./types.js";@@ -35,12 +32,6 @@ const COMMON_KEYS = ["appear-gain", "move-gain", "sound-fade-frames",] as const;-const TIER_KEYS = [- ...COMMON_KEYS,- "rows", "label-width", "padding", "row-height", "row-gap", "cell-gap",- "icon-size", "icon-radius", "icon-fit", "stage-x", "stage-y", "stage-size",-] as const;-const COLUMN_KEYS = [...COMMON_KEYS,"rank-colors", "padding", "row-height", "row-gap", "icon-size", "icon-radius", "icon-fit",@@ -143,51 +134,12 @@ function sound(recipe: SvsRecipe): RankingSoundStyle {return canonicalize(value) as unknown as RankingSoundStyle;}-function rowList(recipe: SvsRecipe): TierRowStyle[] {- const raw = text(recipe, "rows", "s:S:#ef4444|a:A:#f59e0b|b:B:#22c55e|c:C:#3b82f6");- return raw.split("|").map((item, index) => {- const [id, label, color] = item.split(":").map((part) => part.trim());- if (!id || !label || !color) fail(recipe, `rows entry ${index + 1} must be id:label:color.`);- return { id, label, color };- });-}-function colorList(recipe: SvsRecipe, name: string, fallback: string): string[] {const result = text(recipe, name, fallback).split("|").map((value) => value.trim()).filter(Boolean);if (result.length === 0) fail(recipe, `${name} is empty.`);return result;}-export function decodeTierBoardStyle(- recipe: SvsRecipe,- font: FontStackRef | FontArtifactRef,-): { readonly style: TierBoardStyle; readonly sound: RankingSoundStyle } {- known(recipe, TIER_KEYS);- const fonts = exactFonts(font);- const style: TierBoardStyle = {-- rows: rowList(recipe),- board: board(recipe),- text: typography(recipe, fonts),- labelWidthPx: number(recipe, "label-width", 72),- paddingPx: number(recipe, "padding", 18),- rowHeightPx: number(recipe, "row-height", 92),- rowGapPx: number(recipe, "row-gap", 10),- cellGapPx: number(recipe, "cell-gap", 12),- iconSizePx: number(recipe, "icon-size", 72),- iconRadiusPx: number(recipe, "icon-radius", 12),- iconFit: oneOf(recipe, "icon-fit", ["contain", "cover"] as const, "cover"),- stagePoint: { x: number(recipe, "stage-x", 0.5), y: number(recipe, "stage-y", 0.23) },- stageSizePx: number(recipe, "stage-size", 108),- motion: motion(recipe),- boardStackingOrder: integer(recipe, "board-stack", 20),- stageStackingOrder: integer(recipe, "stage-stack", 25),- itemStackingOrder: integer(recipe, "item-stack", 30),- };- assertTierBoardStyle(style);- return { style: canonicalize(style) as unknown as TierBoardStyle, sound: sound(recipe) };-}-export function decodeColumnStyle(recipe: SvsRecipe,font: FontStackRef | FontArtifactRef,diff --git a/packages/ranking/src/surface.ts b/packages/ranking/src/surface.tsindex 5b0e3805..b3f54631 100644--- a/packages/ranking/src/surface.ts+++ b/packages/ranking/src/surface.ts@@ -30,7 +30,6 @@ import {} from "./schedule.js";import {decodeColumnStyle,- decodeTierBoardStyle,decodeTopThreeStyle,} from "./style.js";import type {@@ -39,7 +38,6 @@ import type {RankingSoundStyle,RankingTextItemShell,RankingVariant,- TierBoardItemSpec,TopThreeItemSpec,} from "./types.js";@@ -109,7 +107,6 @@ function styleSurface<T>(};}-export const decodeTierBoardStyleSurface = styleSurface(rankingTypes.tierStyle, decodeTierBoardStyle);export const decodeColumnStyleSurface = styleSurface(rankingTypes.columnStyle, decodeColumnStyle);export const decodeTopThreeStyleSurface = styleSurface(rankingTypes.topThreeStyle, decodeTopThreeStyle);function textValue(@@ -134,18 +131,7 @@ function itemSpec(const id = itemIdentity(element, suffix);const stackingOrder = integer(element, "stack");let value: RankingItemSpec;- if (variant === "tier-board") {- allowed(element, ["id", "tier", "entry", "icon", "stack"]);- empty(element);- const entry = text(element, "entry", "direct");- if (entry !== "direct" && entry !== "stage") throw new Error(`${element.name}.entry must be direct or stage.`);- value = {- variant, id, tier: text(element, "tier"), entry,- ...(stackingOrder === undefined ? {} : { stackingOrder }),- } satisfies TierBoardItemSpec;- assertRankingItemSpec(value);- return { spec: value };- } else if (variant === "column") {+ if (variant === "column") {allowed(element, ["id", "label", "icon", "rank", "preset", "during", "stack"]);empty(element);const rank = integer(element, "rank");@@ -184,7 +170,6 @@ function itemSpec(}const variantDefinition = {- "tier-board": { tag: "TierItem", style: rankingTypes.tierStyle },column: { tag: "ColumnItem", style: rankingTypes.columnStyle },"top-three": { tag: "TopThreeItem", style: rankingTypes.topThreeStyle },} as const;@@ -229,7 +214,6 @@ function rankingSurface(variant: RankingVariant): StructuredSurfaceHandler {const items: RankingFragmentItem[] = [];const itemIds = new Set<string>();let index = 0;- let hasStage = false;for (const child of element.children) {if (child.kind === "text") {if (child.value.trim().length > 0) throw new Error(`${element.name} accepts ${selected.tag} children only.`);@@ -242,7 +226,6 @@ function rankingSurface(variant: RankingVariant): StructuredSurfaceHandler {const spec = authored.spec;if (itemIds.has(spec.id)) throw new Error(`${element.name} has duplicate Item id ${spec.id}.`);itemIds.add(spec.id);- hasStage ||= spec.variant === "tier-board" && spec.entry === "stage";const specId = `${id}.item.${suffix}.spec`;const specName = `item-${suffix}-spec`;records.push({ id: specId, type: authored.content === undefined ? rankingTypes.itemSpec : rankingTypes.textItemShell, value: { kind: "inline", value: spec as unknown as CanonicalValue }, range: child.range });@@ -252,7 +235,7 @@ function rankingSurface(variant: RankingVariant): StructuredSurfaceHandler {const timingName = authored.timing === undefined ? undefined : `item-${suffix}-timing`;if (authored.timing !== undefined) inputs[timingName!] = authored.timing.ref;let iconName: string | undefined;- if (variant === "tier-board" || child.attributes.icon !== undefined) {+ if (child.attributes.icon !== undefined) {const icon = reference(child.attributes.icon, `${child.name}.icon`, mediaTypes.blobArtifact, resolveReference);iconName = `item-${suffix}-icon`;inputs[iconName] = icon.ref;@@ -269,7 +252,6 @@ function rankingSurface(variant: RankingVariant): StructuredSurfaceHandler {...(element.attributes["move-sound"] === undefined ? {} : { moveName: "move-sound" }),};if (sound.moveName !== undefined && variant === "top-three") throw new Error(`${element.name} has no move sound phase.`);- if (sound.moveName !== undefined && variant === "tier-board" && !hasStage) throw new Error(`${element.name}.move-sound requires one staged TierItem.`);for (const [attribute, inputName] of [["appear-sound", sound.appearName], ["move-sound", sound.moveName]] as const) {if (inputName === undefined) continue;inputs[inputName] = reference(element.attributes[attribute], `${element.name}.${attribute}`, mediaTypes.synchronized, resolveReference).ref;@@ -299,6 +281,5 @@ function rankingSurface(variant: RankingVariant): StructuredSurfaceHandler {};}-export const decodeTierBoardSurface = rankingSurface("tier-board");export const decodeColumnSurface = rankingSurface("column");export const decodeTopThreeSurface = rankingSurface("top-three");diff --git a/packages/ranking/src/types.ts b/packages/ranking/src/types.tsindex e22d1280..d63bcc28 100644--- a/packages/ranking/src/types.ts+++ b/packages/ranking/src/types.ts@@ -6,7 +6,7 @@ import type {import type { BlobRef } from "@hypit/protocol";import type { CanvasSpace, SpatialFrame } from "@hypit/spatial";-export type RankingVariant = "tier-board" | "column" | "top-three";+export type RankingVariant = "column" | "top-three";export type RankingHeader = {readonly id: string;@@ -23,7 +23,7 @@ export type TriggeredRankingScheduleEntry = {export type TriggeredRankingSchedule = {readonly id: string;- readonly variant: Exclude<RankingVariant, "column">;+ readonly variant: "top-three";readonly outer: FrameSpan;readonly terminalFrame: number;readonly entries: readonly TriggeredRankingScheduleEntry[];@@ -100,32 +100,6 @@ export type RankingSoundStyle = {readonly fadeFrames: number;};-export type TierRowStyle = {- readonly id: string;- readonly label: string;- readonly color: string;-};--export type TierBoardStyle = {- readonly rows: readonly TierRowStyle[];- readonly board: RankingBoardPaint;- readonly text: RankingTextStyle;- readonly labelWidthPx: number;- readonly paddingPx: number;- readonly rowHeightPx: number;- readonly rowGapPx: number;- readonly cellGapPx: number;- readonly iconSizePx: number;- readonly iconRadiusPx: number;- readonly iconFit: "contain" | "cover";- readonly stagePoint: { readonly x: number; readonly y: number };- readonly stageSizePx: number;- readonly motion: RankingMotionStyle;- readonly boardStackingOrder: number;- readonly stageStackingOrder: number;- readonly itemStackingOrder: number;-};-export type ColumnStyle = {readonly board: RankingBoardPaint;readonly text: RankingTextStyle;@@ -160,14 +134,6 @@ export type TopThreeStyle = {readonly itemStackingOrder: number;};-export type TierBoardItemSpec = {- readonly variant: "tier-board";- readonly id: string;- readonly tier: string;- readonly entry: "direct" | "stage";- readonly stackingOrder?: number;-};-export type ColumnItemSpec = {readonly variant: "column";readonly id: string;@@ -184,7 +150,7 @@ export type TopThreeItemSpec = {readonly stackingOrder?: number;};-export type RankingItemSpec = TierBoardItemSpec | ColumnItemSpec | TopThreeItemSpec;+export type RankingItemSpec = ColumnItemSpec | TopThreeItemSpec;/** Structural half of an Item whose visible copy arrives on a Text graph edge. */export type RankingTextItemShell =@@ -196,13 +162,9 @@ export type RankingItemSpecSet = {readonly items: readonly RankingItemSpec[];};-export type TierBoardItem = TierBoardItemSpec & { readonly icon: BlobRef };export type ColumnItem = ColumnItemSpec & { readonly icon?: BlobRef };export type TopThreeItem = TopThreeItemSpec & { readonly icon?: BlobRef };-export type TierBoardItemSet = {- readonly items: readonly TierBoardItem[];-};export type ColumnItemSet = {readonly items: readonly ColumnItem[];};@@ -210,13 +172,6 @@ export type TopThreeItemSet = {readonly items: readonly TopThreeItem[];};-export type TierBoardProgram = {- readonly id: string;- readonly frame: SpatialFrame;- readonly schedule: TriggeredRankingSchedule;- readonly style: TierBoardStyle;- readonly items: readonly TierBoardItem[];-};export type ColumnProgram = {readonly id: string;readonly canvas: CanvasSpace;@@ -232,7 +187,7 @@ export type TopThreeProgram = {readonly style: TopThreeStyle;readonly items: readonly TopThreeItem[];};-export type RankingProgram = TierBoardProgram | ColumnProgram | TopThreeProgram;+export type RankingProgram = ColumnProgram | TopThreeProgram;export type RankingSoundEvent = {readonly id: string;diff --git a/packages/ranking/test/ranking.test.ts b/packages/ranking/test/ranking.test.tsindex cb2d4793..df67ce5a 100644--- a/packages/ranking/test/ranking.test.ts+++ b/packages/ranking/test/ranking.test.ts@@ -17,34 +17,26 @@ import {appendColumnWindowCandidate,appendRankingItemSpec,appendRankingSound,- appendTierBoardItem,appendTopThreeItem,buildColumnProgram,buildColumnSchedule,buildColumnSoundEvents,buildRankingSchedule,- buildTierBoardProgram,- buildTierBoardSoundEvents,buildTopThreeProgram,buildTopThreeSoundEvents,createColumnItemSet,createColumnWindowCandidateSet,createRankingItemSpecSet,createRankingSoundSet,- createTierBoardItemSet,createTopThreeItemSet,decodeColumnStyle,decodeColumnStyleSurface,decodeColumnSurface,- decodeTierBoardStyle,- decodeTierBoardStyleSurface,- decodeTierBoardSurface,decodeTopThreeStyle,decodeTopThreeStyleSurface,decodeTopThreeSurface,renderColumn,renderRankingAudio,- renderTierBoard,renderTopThree,rankingComponent,rankingManifest,@@ -60,7 +52,6 @@ import type {RankingHeader,RankingItemSpec,TriggeredRankingSchedule,- TierBoardItemSpec,TopThreeItemSpec,} from "@hypit/ranking";import { narrativeTypes } from "@hypit/narrative";@@ -154,9 +145,6 @@ function schedule(headerValue: RankingHeader, values: readonly RankingItemSpec[]});}-const tierSpec = (id: string, tier: string, entry: "direct" | "stage" = "direct"): TierBoardItemSpec => ({- variant: "tier-board", id, tier, entry,-});const columnSpec = (id: string, rank: number, preset = false): ColumnItemSpec => ({variant: "column", id, label: id.toUpperCase(), rank, preset,});@@ -192,8 +180,8 @@ test("RankingSchedule zips authored item and Moment order and preserves a settle});test("RankingSchedule rejects cardinality, outer/terminal ambiguity and authored physical reversal", () => {- const owner = header("tier-board");- const values = [tierSpec("a", "s"), tierSpec("b", "a")];+ const owner = header("top-three", "cardinality");+ const values = [topSpec("a"), topSpec("b")];assert.throws(() => buildRankingSchedule({header: owner, items: specs(owner, values), semantic: semanticTrack, outer, triggers: triggers(1), terminal,}), /cardinality/u);@@ -209,35 +197,16 @@ test("RankingSchedule rejects cardinality, outer/terminal ambiguity and authored});test("variant Style decoders reject unknown Recipes and keep exact fonts and independent stacks", () => {- const tier = decodeTierBoardStyle(recipe("ranking.tier", {- rows: "s:S:#ef4444|a:A:#22c55e", "board-stack": 8, "stage-stack": 20, "item-stack": 31,+ const column = decodeColumnStyle(recipe("ranking.column", {+ "rank-colors": "#ef4444|#22c55e", "board-stack": 8, "stage-stack": 20, "item-stack": 31,}), font);- assert.deepEqual(tier.style.rows.map((row) => row.id), ["s", "a"]);- assert.equal(tier.style.text.fonts[0]?.sources[0]?.artifact.digest, font.sources[0]!.artifact.digest);- assert.deepEqual([tier.style.boardStackingOrder, tier.style.stageStackingOrder, tier.style.itemStackingOrder], [8, 20, 31]);- assert.throws(() => decodeColumnStyle(recipe("ranking.column", { "tier-only": 1 }), font), /does not accept/u);+ assert.deepEqual(column.style.rankColors, ["#ef4444", "#22c55e"]);+ assert.equal(column.style.text.fonts[0]?.sources[0]?.artifact.digest, font.sources[0]!.artifact.digest);+ assert.deepEqual([column.style.boardStackingOrder, column.style.stageStackingOrder, column.style.itemStackingOrder], [8, 20, 31]);+ assert.throws(() => decodeColumnStyle(recipe("ranking.column", { "podium-only": 1 }), font), /does not accept/u);assert.equal(decodeTopThreeStyle(recipe("ranking.top"), font).style.slotColors.length, 3);});-test("TierBoard owns cumulative direct/stage placement and rejects invalid schedule boundaries", () => {- const owner = header("tier-board", "tiers");- const semantic = [tierSpec("alpha", "s", "stage"), tierSpec("beta", "a")];- const style = decodeTierBoardStyle(recipe("ranking.tier", {- rows: "s:S:#ef4444|a:A:#22c55e", "appear-frames": 5, "move-frames": 8,- }), font).style;- let set = createTierBoardItemSet();- set = appendTierBoardItem(set, semantic[0]!, image("alpha"));- set = appendTierBoardItem(set, semantic[1]!, image("beta"));- const program = buildTierBoardProgram(owner, frame, schedule(owner, semantic), style, set);- const track = renderTierBoard(space, program);- assert.deepEqual(track.presents.map((item) => item.stacking.order).sort((a, b) => a - b), [20, 25, 30, 30, 30, 30]);- assert.equal(track.presents.find((item) => item.id.endsWith(":item:alpha:settled"))?.span.endFrameExclusive, 230);- const tightTerminal = { ...terminal, occurrences: [{ occurrence: 0, anchorId: "two" }] };- assert.throws(() => buildRankingSchedule({- header: owner, items: specs(owner, semantic), semantic: semanticTrack, outer, triggers: triggers(2), terminal: tightTerminal,- }), /outside|strictly increasing/u);-});-test("Column projects a Segment outer, keeps rank independent from reveal time, presets rows and avoids overlaps", () => {const owner = header("column", "column");const semantic = [@@ -329,12 +298,6 @@ test("visual and sound event plans share exact phase frames while absent sound s});test("each component owns a distinct event law and repeated lowering is canonical", () => {- const tierOwner = header("tier-board", "tier-events");- const tierItems = [tierSpec("direct", "s"), tierSpec("stage", "a", "stage")];- const tier = decodeTierBoardStyle(recipe("ranking.tier", { rows: "s:S:#ef4444|a:A:#22c55e" }), font).style;- assert.deepEqual(buildTierBoardSoundEvents(schedule(tierOwner, tierItems), tier, specs(tierOwner, tierItems)).events.map((item) => item.kind),- ["appear", "appear", "move"]);-const topOwner = header("top-three", "top-events");const topItems = [topSpec("one")];const top = decodeTopThreeStyle(recipe("ranking.top"), font).style;@@ -348,7 +311,7 @@ test("each component owns a distinct event law and repeated lowering is canonicaassert.deepEqual(renderColumn(space, program), renderColumn(space, program));});-test("all three author Surfaces preserve explicit semantic, spatial, font, image and optional sound graph edges", async () => {+test("both author Surfaces preserve explicit semantic, spatial, font, image and optional sound graph edges", async () => {createResolvedClosure([...videoContractManifests, textManifest, rankingManifest]);const range = { source: "ranking.svml", start: 0, end: 1 };const ref = (path: string): MarkupAttributeValue => ({ kind: "reference", path });@@ -375,7 +338,6 @@ test("all three author Surfaces preserve explicit semantic, spatial, font, image["copy", inlineReference("copy", textTypes.text, sealText("Dynamic ranking copy"))],]);const styleCases = [- ["tier-style", rankingTypes.tierStyle, decodeTierBoardStyleSurface, { rows: "s:S:#ef4444|a:A:#22c55e" }],["column-style", rankingTypes.columnStyle, decodeColumnStyleSurface, {}],["top-style", rankingTypes.topThreeStyle, decodeTopThreeStyleSurface, {}],] as const;@@ -394,10 +356,6 @@ test("all three author Surfaces preserve explicit semantic, spatial, font, imagereferences.set(`${id}.sound`, { path: `${id}.sound`, ref: { kind: "record", id: `${id}.sound` }, type: rankingTypes.soundStyle, record: soundRecord as never });}const cases = [- [decodeTierBoardSurface, node("ranking:TierBoard", {- id: "tier", semantic: ref("semantic"), frame: ref("frame"), during: ref("outer"),- triggers: ref("triggers"), terminal: ref("terminal"), style: ref("tier-style"),- }, [node("ranking:TierItem", { id: "tier-one", tier: "s", entry: "stage", icon: ref("icon-1") })])],[decodeColumnSurface, node("ranking:Column", {id: "column", semantic: ref("semantic"), canvas: ref("canvas"), frame: ref("frame"), during: ref("ranking-segment"),style: ref("column-style"),@@ -426,7 +384,7 @@ test("all three author Surfaces preserve explicit semantic, spatial, font, imageassert.ok(fragment.inputs.some((input) => input.name === "frame"));}const column = await decodeColumnSurface({- sourceName: "ranking.svml", element: cases[1][1],+ sourceName: "ranking.svml", element: cases[0][1],resolveReference: (path) => references.get(path),resolveAsset: async () => { throw new Error("no asset resolution expected"); },});@@ -437,20 +395,20 @@ test("all three author Surfaces preserve explicit semantic, spatial, font, image});test("Ranking Surfaces declare their sealed Records and icon Producers consume Blob values", async () => {- for (const name of ["tier", "column", "top-three"]) {+ for (const name of ["column", "top-three"]) {const surface = rankingMarkupSurfaces.find((item) => item.name === name);assert.ok(surface?.outputs.some((type) => type.name === rankingTypes.header.name), `${name} header output`);assert.ok(surface?.outputs.some((type) => type.name === rankingTypes.itemSpec.name), `${name} item output`);}const producer = rankingComponent.producers.find((item) =>- item.producer.name === rankingProducers.appendTierItem.name);+ item.producer.name === rankingProducers.appendColumnIconItem.name);assert.ok(producer !== undefined);const icon = image("producer");const result = await producer.handler({inputs: {- set: { value: { kind: "inline", value: createTierBoardItemSet() } },- spec: { value: { kind: "inline", value: tierSpec("one", "s") } },+ set: { value: { kind: "inline", value: createColumnItemSet() } },+ spec: { value: { kind: "inline", value: columnSpec("one", 1) } },icon: { value: icon },},} as never);@@ -467,7 +425,7 @@ test("Ranking author Surfaces fail closed on impossible image and sound combinat["semantic", plain("semantic", semanticTrackTypes.track)],["frame", plain("frame", spatialTypes.frame)], ["outer", plain("outer", narrativeTypes.selection)],["triggers", plain("triggers", narrativeTypes.moment)], ["terminal", plain("terminal", narrativeTypes.moment)],- ["style", plain("style", rankingTypes.tierStyle)], ["style.sound", plain("style.sound", rankingTypes.soundStyle)],+ ["style", plain("style", rankingTypes.topThreeStyle)], ["style.sound", plain("style.sound", rankingTypes.soundStyle)],["move", plain("move", mediaTypes.synchronized)],]);const common = { id: "bad", semantic: ref("semantic"), frame: ref("frame"), during: ref("outer"), triggers: ref("triggers"), terminal: ref("terminal"), style: ref("style") };@@ -475,12 +433,12 @@ test("Ranking author Surfaces fail closed on impossible image and sound combinatsourceName: "ranking.svml", element, resolveReference: (path: string) => references.get(path),resolveAsset: async () => { throw new Error("no asset resolution expected"); },});- assert.throws(() => decodeTierBoardSurface(context({- kind: "element", name: "ranking:TierBoard", attributes: common,- children: [{ kind: "element", name: "ranking:TierItem", attributes: { tier: "s" }, children: [], range }], range,+ assert.throws(() => decodeTopThreeSurface(context({+ kind: "element", name: "ranking:TopThree", attributes: common,+ children: [{ kind: "element", name: "ranking:TopThreeItem", attributes: { label: "One", icon: ref("missing") }, children: [], range }], range,})), /icon/u);- assert.throws(() => decodeTierBoardSurface(context({- kind: "element", name: "ranking:TierBoard", attributes: { ...common, "move-sound": ref("move") },- children: [{ kind: "element", name: "ranking:TierItem", attributes: { tier: "s", icon: ref("missing") }, children: [], range }], range,- })), /wrong Type|move-sound/u);+ assert.throws(() => decodeTopThreeSurface(context({+ kind: "element", name: "ranking:TopThree", attributes: { ...common, "move-sound": ref("move") },+ children: [{ kind: "element", name: "ranking:TopThreeItem", attributes: { label: "One" }, children: [], range }], range,+ })), /move sound phase/u);});