schema.ts 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. // Modified by ZCode: shared types inlined so the schema is self-contained. Derived from open-design 0.7.0 (Apache-2.0); see design-resources/NOTICE.md.
  2. /**
  3. * open-design-landing-deck — input schema.
  4. *
  5. * Sister skill to `open-design-landing`. Produces a single-file slide
  6. * deck (horizontal swipe pagination, magazine-style) in the Atelier
  7. * Zero visual language, reusing the same `styles.css` + the same
  8. * 16-slot image library.
  9. *
  10. * The schema is intentionally smaller than the landing page schema:
  11. * a deck is an ordered array of typed slides, each driving one
  12. * viewport-height/width frame. Brand identity is shared across slides.
  13. */
  14. /* ---------- shared blocks ---------- */
  15. /** One headline run: plain, italic-serif (`em`) or the coral full stop (`dot`). */
  16. export type MixedText = { text: string; em?: boolean; dot?: boolean }[];
  17. /**
  18. * Brand identity shared by every slide. The composer reads the named fields; any other key
  19. * of the landing page brand block (tagline, version, license, ...) may be carried over
  20. * verbatim and is left unread.
  21. */
  22. export interface BrandBlock {
  23. name: string;
  24. mark: string;
  25. description: string;
  26. edition?: string;
  27. year_roman?: string;
  28. year?: string;
  29. location?: string;
  30. /** `<html lang>`; defaults to `'en'`. */
  31. locale?: string;
  32. [key: string]: unknown;
  33. }
  34. /** Image library the slides' `image_slot` ids resolve against. */
  35. export interface ImageryConfig {
  36. /** Directory holding the 16-slot PNG library; the composer appends the trailing slash. */
  37. assets_path: string;
  38. strategy?: string;
  39. provider?: string;
  40. }
  41. /* ---------- slide variants ---------- */
  42. /** Cover slide — title plate at the start of the deck. */
  43. export interface CoverSlide {
  44. kind: 'cover';
  45. /** Eyebrow above the title — `'Open Design · Vol. 01'`. */
  46. eyebrow: string;
  47. /** Display title; encoded as `MixedText` for italic-serif rhythm. */
  48. title: MixedText;
  49. /** Optional sub-title under the title. */
  50. subtitle?: string;
  51. /** Lead paragraph below the title. */
  52. lead: string;
  53. /** Optional image slot id (`hero` | `cta` | …) from `image-manifest.json`. */
  54. image_slot?: string;
  55. /** Bottom-left meta line — date / location / coords. */
  56. meta?: string;
  57. }
  58. /** Section divider — Roman numeral plate between chapters. */
  59. export interface SectionSlide {
  60. kind: 'section';
  61. roman: string;
  62. /** Section title; rendered huge with italic-serif emphasis. */
  63. title: MixedText;
  64. /** Optional one-line description under the title. */
  65. lead?: string;
  66. }
  67. /** Content slide — eyebrow + title + body (+ optional bullets + image). */
  68. export interface ContentSlide {
  69. kind: 'content';
  70. eyebrow?: string;
  71. title: MixedText;
  72. /** Body paragraph; can include `<code>` raw HTML. */
  73. body?: string;
  74. /** Optional bullet list. */
  75. bullets?: string[];
  76. /** Optional image slot id from `image-manifest.json`. */
  77. image_slot?: string;
  78. /** Layout: `left` puts copy left of art, `right` flips it, `full` centers. */
  79. layout?: 'left' | 'right' | 'full';
  80. }
  81. /** Stats slide — eyebrow + title + 3-4 large stat rings. */
  82. export interface StatsSlide {
  83. kind: 'stats';
  84. eyebrow?: string;
  85. title: MixedText;
  86. stats: { value: string; label: string; sub?: string }[];
  87. /** Caption under the stat row. */
  88. caption?: string;
  89. }
  90. /** Quote slide — full-bleed pull quote. */
  91. export interface QuoteSlide {
  92. kind: 'quote';
  93. quote: MixedText;
  94. author: { initial: string; name: string; title: string };
  95. /** Optional image slot for the right-side portrait. */
  96. image_slot?: string;
  97. }
  98. /** CTA slide — closing pitch with primary action. */
  99. export interface CTASlide {
  100. kind: 'cta';
  101. eyebrow?: string;
  102. title: MixedText;
  103. body?: string;
  104. primary: { label: string; href: string };
  105. /** Optional secondary action. */
  106. secondary?: { label: string; href: string };
  107. }
  108. /** End slide — huge italic kicker word and footer signature. */
  109. export interface EndSlide {
  110. kind: 'end';
  111. /** The huge kicker — `'Open Design.'`. */
  112. mega: MixedText;
  113. /** Footer text under the kicker — `'Apache-2.0 · MMXXVI · Berlin'`. */
  114. footer?: string;
  115. }
  116. export type Slide =
  117. | CoverSlide
  118. | SectionSlide
  119. | ContentSlide
  120. | StatsSlide
  121. | QuoteSlide
  122. | CTASlide
  123. | EndSlide;
  124. /* ---------- top-level ---------- */
  125. export interface OpenDesignLandingDeckInputs {
  126. $schema?: string;
  127. brand: BrandBlock;
  128. /** Deck-wide title shown in the HUD — `'Open Design · Vol. 01'`. */
  129. deck_title: string;
  130. slides: Slide[];
  131. imagery: ImageryConfig;
  132. }
  133. /**
  134. * @deprecated Use `OpenDesignLandingDeckInputs`.
  135. *
  136. * Backwards-compat alias kept for the v0.3.x line and removed in the next
  137. * minor (v0.4.0). Migration steps live in `README.md` under
  138. * "Migrating from `editorial-collage-deck`".
  139. */
  140. export type EditorialCollageDeckInputs = OpenDesignLandingDeckInputs;