@anvpx/motion-build 0.1.28 → 0.1.30

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.
@@ -0,0 +1,11 @@
1
+ import type { LintRule } from "./types.ts";
2
+ /**
3
+ * A board where every scene is static and every cut is a fade is a slide deck,
4
+ * however good each card looks. The check is board-level on purpose: `flat-motion`
5
+ * fires on any run of three static scenes inside an otherwise moving film, while
6
+ * this fires once when the *whole* film never changes the frame.
7
+ *
8
+ * Source: a motion-graphics method that makes the same test mechanical — "scenes must
9
+ * change because the world or the camera moves, not because a section is faded".
10
+ */
11
+ export declare const fadeDeckRule: LintRule;
@@ -0,0 +1,40 @@
1
+ /** Transitions that change nothing but opacity. */
2
+ const FADES = new Set(["cut", "crossfade"]);
3
+ /**
4
+ * A board where every scene is static and every cut is a fade is a slide deck,
5
+ * however good each card looks. The check is board-level on purpose: `flat-motion`
6
+ * fires on any run of three static scenes inside an otherwise moving film, while
7
+ * this fires once when the *whole* film never changes the frame.
8
+ *
9
+ * Source: a motion-graphics method that makes the same test mechanical — "scenes must
10
+ * change because the world or the camera moves, not because a section is faded".
11
+ */
12
+ export const fadeDeckRule = ({ storyboard, timeline }) => {
13
+ const base = storyboard.scenes.filter((scene) => scene.layer !== "overlay");
14
+ if (base.length < 4)
15
+ return [];
16
+ // A short run of calm cards is a choice; a film that never changes the frame is a deck.
17
+ const total = timeline.scenes.reduce((end, scene) => Math.max(end, scene.start + scene.duration), 0);
18
+ if (total < 60)
19
+ return [];
20
+ const moves = base.some((scene) => scene.move !== undefined && scene.move !== "static");
21
+ if (moves)
22
+ return [];
23
+ const animated = base.some((scene, index) => {
24
+ if (index === 0)
25
+ return false;
26
+ const transition = scene.transition ?? "cut";
27
+ return !FADES.has(transition);
28
+ });
29
+ if (animated)
30
+ return [];
31
+ const first = base[0];
32
+ return [
33
+ {
34
+ severity: "warning",
35
+ path: "/scenes/0/move",
36
+ message: `${base.length} scenes, none with a move, every cut a fade: this reads as a slide deck`,
37
+ suggestion: "give at least one scene a move, or cut with push/wipe/zoom-through so the frame changes with the beat",
38
+ },
39
+ ];
40
+ };
@@ -1,4 +1,5 @@
1
1
  import { contentOverflowRule } from "./content-overflow.ts";
2
+ import { fadeDeckRule } from "./fade-deck.ts";
2
3
  import { flowEdgeLabelRule, flowTextSizeRule, flowWordBreakRule } from "./flow.ts";
3
4
  import { hookFirstRule } from "./hook-first.ts";
4
5
  import { linearEaseRule } from "./linear-ease.ts";
@@ -17,7 +18,7 @@ import { duplicatedEmphasisRule, lineLengthRule, offGridSpacingRule, typeDensity
17
18
  import type { LintInput, LintResult, LintRule } from "./types.ts";
18
19
  import { wordsOnScreenRule } from "./words-on-screen.ts";
19
20
  export type { LintFinding, LintInput, LintResult, LintRule, PlatformMarginLookup, PlatformMargins, } from "./types.ts";
20
- export { contentOverflowRule, duplicatedEmphasisRule, flatMotionRule, flowEdgeLabelRule, flowTextSizeRule, flowWordBreakRule, holdAfterAccentRule, hookFirstRule, linearEaseRule, lineLengthRule, longHoldRule, minHoldRule, narrationPaceRule, offGridSpacingRule, overlayFitRule, overlayStackRule, overlayTargetRule, readingTimeRule, safeZone9x16Rule, spanNeedsTwoBodiesRule, textFloorRule, transitionEaseMismatchRule, transitionImplementedRule, transitionLengthRule, typeDensityRule, unsupportedMotionRule, wordsOnScreenRule, };
21
+ export { contentOverflowRule, duplicatedEmphasisRule, fadeDeckRule, flatMotionRule, flowEdgeLabelRule, flowTextSizeRule, flowWordBreakRule, holdAfterAccentRule, hookFirstRule, linearEaseRule, lineLengthRule, longHoldRule, minHoldRule, narrationPaceRule, offGridSpacingRule, overlayFitRule, overlayStackRule, overlayTargetRule, readingTimeRule, safeZone9x16Rule, spanNeedsTwoBodiesRule, textFloorRule, transitionEaseMismatchRule, transitionImplementedRule, transitionLengthRule, typeDensityRule, unsupportedMotionRule, wordsOnScreenRule, };
21
22
  /**
22
23
  * All rules, in report order. Contrast lives in theme tokens.
23
24
  * Craft rules (motion-craft, type-grid) run after the timing and layout
@@ -1,4 +1,5 @@
1
1
  import { contentOverflowRule } from "./content-overflow.js";
2
+ import { fadeDeckRule } from "./fade-deck.js";
2
3
  import { flowEdgeLabelRule, flowTextSizeRule, flowWordBreakRule } from "./flow.js";
3
4
  import { hookFirstRule } from "./hook-first.js";
4
5
  import { linearEaseRule } from "./linear-ease.js";
@@ -15,7 +16,7 @@ import { transitionImplementedRule } from "./transition-implemented.js";
15
16
  import { transitionLengthRule } from "./transition-length.js";
16
17
  import { duplicatedEmphasisRule, lineLengthRule, offGridSpacingRule, typeDensityRule, } from "./type-grid.js";
17
18
  import { wordsOnScreenRule } from "./words-on-screen.js";
18
- export { contentOverflowRule, duplicatedEmphasisRule, flatMotionRule, flowEdgeLabelRule, flowTextSizeRule, flowWordBreakRule, holdAfterAccentRule, hookFirstRule, linearEaseRule, lineLengthRule, longHoldRule, minHoldRule, narrationPaceRule, offGridSpacingRule, overlayFitRule, overlayStackRule, overlayTargetRule, readingTimeRule, safeZone9x16Rule, spanNeedsTwoBodiesRule, textFloorRule, transitionEaseMismatchRule, transitionImplementedRule, transitionLengthRule, typeDensityRule, unsupportedMotionRule, wordsOnScreenRule, };
19
+ export { contentOverflowRule, duplicatedEmphasisRule, fadeDeckRule, flatMotionRule, flowEdgeLabelRule, flowTextSizeRule, flowWordBreakRule, holdAfterAccentRule, hookFirstRule, linearEaseRule, lineLengthRule, longHoldRule, minHoldRule, narrationPaceRule, offGridSpacingRule, overlayFitRule, overlayStackRule, overlayTargetRule, readingTimeRule, safeZone9x16Rule, spanNeedsTwoBodiesRule, textFloorRule, transitionEaseMismatchRule, transitionImplementedRule, transitionLengthRule, typeDensityRule, unsupportedMotionRule, wordsOnScreenRule, };
19
20
  /**
20
21
  * All rules, in report order. Contrast lives in theme tokens.
21
22
  * Craft rules (motion-craft, type-grid) run after the timing and layout
@@ -41,6 +42,7 @@ export const LINT_RULES = [
41
42
  hookFirstRule,
42
43
  safeZone9x16Rule,
43
44
  contentOverflowRule,
45
+ fadeDeckRule,
44
46
  flatMotionRule,
45
47
  unsupportedMotionRule,
46
48
  transitionEaseMismatchRule,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anvpx/motion-build",
3
- "version": "0.1.28",
3
+ "version": "0.1.30",
4
4
  "description": "Storyboard compiler for @anvpx/motion: validation, scene emission and HyperFrames project output.",
5
5
  "license": "MIT",
6
6
  "author": "anvpx",
@@ -31,9 +31,9 @@
31
31
  "@fontsource/jetbrains-mono": "5.3.0",
32
32
  "@fontsource/source-serif-4": "5.3.1",
33
33
  "@fontsource/space-grotesk": "5.3.0",
34
- "@anvpx/motion-scenes": "0.1.28",
35
- "@anvpx/motion-schema": "0.1.28",
36
- "@anvpx/motion-themes": "0.1.28",
34
+ "@anvpx/motion-scenes": "0.1.30",
35
+ "@anvpx/motion-schema": "0.1.30",
36
+ "@anvpx/motion-themes": "0.1.30",
37
37
  "postprocessing": "6.39.5",
38
38
  "three": "0.186.0"
39
39
  },