@classic-homes/slides 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,69 +0,0 @@
1
- import {
2
- DeckSchema,
3
- LAYOUTS,
4
- baseSlide,
5
- getLayout
6
- } from "./chunk-7FROOJCY.js";
7
-
8
- // src/catalog.ts
9
- import { z } from "zod";
10
- import { zodToJsonSchema } from "zod-to-json-schema";
11
- function listLayouts() {
12
- return LAYOUTS.map((l) => ({ name: l.name, description: l.description, whenToUse: l.whenToUse }));
13
- }
14
- function describeLayout(name) {
15
- const layout = getLayout(name);
16
- if (!layout) return void 0;
17
- const schema = z.object({ layout: z.literal(layout.name), ...layout.shape, ...baseSlide });
18
- return {
19
- name: layout.name,
20
- description: layout.description,
21
- whenToUse: layout.whenToUse,
22
- defaults: layout.defaults ?? {},
23
- schema: zodToJsonSchema(schema, { $refStrategy: "none" }),
24
- example: layout.example
25
- };
26
- }
27
- function deckJsonSchema() {
28
- return zodToJsonSchema(DeckSchema, { name: "ClassicDeck", $refStrategy: "none" });
29
- }
30
- var AUTHORING_GUIDE = `# Writing a Classic Homes deck
31
-
32
- A deck is a YAML (or JSON) file: deck-level fields plus a list of slides. Each slide
33
- picks a **layout** and fills its fields. Layouts own all styling \u2014 there is no way to
34
- set colours, fonts or sizes directly, which is what keeps every deck on-brand.
35
-
36
- ## Principles
37
- - **One idea per slide.** The headline states the point. Detail goes in \`notes\`.
38
- - **Short copy.** Titles under ~70 characters, bullets a few words, at most 6 bullets.
39
- \`validate\` warns when a slide gets crowded \u2014 split it rather than shrinking text.
40
- - **Speaker notes on every content slide.** Presenters press N to see them.
41
- - **Real photos over decoration.** Every image needs \`alt\` text.
42
- - **Tracks** colour the accent: \`value\` (red, default) for the homeowner/value story,
43
- \`build\` (teal) for construction/process, \`neutral\` (navy) for framing slides.
44
- - **Backgrounds**: \`paper\` (default) for content; solid \`navy\`/\`red\`/\`teal\`/\`plum\`/\`grey\`/\`stone\`
45
- for section dividers and moments of emphasis. Don't put dense content on solid grounds.
46
-
47
- ## Inline text
48
- \`**bold**\`, \`*highlight*\` (accent colour), \`\\\`code\\\`\`, \`[label](https://\u2026)\`. No HTML.
49
-
50
- ## Journey decks
51
- Set \`journey.steps\` at deck level to get a numbered agenda. Then:
52
- - a \`journey\` slide shows the full map,
53
- - \`step: 3\` on any slide draws the vertical STEP rail,
54
- - \`showJourney: true\` adds the compact "you are here" strip (great on \`section\` slides).
55
-
56
- ## Typical shape
57
- 1. \`title\`
58
- 2. \`statement\` or \`journey\` (why we're here / the agenda)
59
- 3. per part: \`section\` \u2192 2\u20135 content slides (\`bullets\`, \`split\`, \`cards\`, \`stats\`, \`photos\`, \`walkthrough\`)
60
- 4. \`qr\` (where to go next) \u2192 \`contacts\` \u2192 closing \`statement\`
61
- `;
62
-
63
- export {
64
- listLayouts,
65
- describeLayout,
66
- deckJsonSchema,
67
- AUTHORING_GUIDE
68
- };
69
- //# sourceMappingURL=chunk-33EPZMT6.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/catalog.ts"],"sourcesContent":["import { z } from 'zod';\nimport { zodToJsonSchema } from 'zod-to-json-schema';\nimport { LAYOUTS, getLayout } from './layouts/index.js';\nimport { baseSlide } from './schema/common.js';\nimport { DeckSchema } from './schema/deck.js';\n\nexport interface LayoutSummary {\n name: string;\n description: string;\n whenToUse: string;\n}\n\nexport function listLayouts(): LayoutSummary[] {\n return LAYOUTS.map((l) => ({ name: l.name, description: l.description, whenToUse: l.whenToUse }));\n}\n\n/** Full description of one layout: fields as JSON Schema plus a working example. */\nexport function describeLayout(name: string) {\n const layout = getLayout(name);\n if (!layout) return undefined;\n const schema = z.object({ layout: z.literal(layout.name), ...layout.shape, ...baseSlide });\n return {\n name: layout.name,\n description: layout.description,\n whenToUse: layout.whenToUse,\n defaults: layout.defaults ?? {},\n schema: zodToJsonSchema(schema, { $refStrategy: 'none' }),\n example: layout.example,\n };\n}\n\n/** JSON Schema for a whole deck (editor tooling, `$schema` in deck files). */\nexport function deckJsonSchema() {\n return zodToJsonSchema(DeckSchema, { name: 'ClassicDeck', $refStrategy: 'none' });\n}\n\n/** Authoring guidance shared by the CLI, MCP server and docs. */\nexport const AUTHORING_GUIDE = `# Writing a Classic Homes deck\n\nA deck is a YAML (or JSON) file: deck-level fields plus a list of slides. Each slide\npicks a **layout** and fills its fields. Layouts own all styling — there is no way to\nset colours, fonts or sizes directly, which is what keeps every deck on-brand.\n\n## Principles\n- **One idea per slide.** The headline states the point. Detail goes in \\`notes\\`.\n- **Short copy.** Titles under ~70 characters, bullets a few words, at most 6 bullets.\n \\`validate\\` warns when a slide gets crowded — split it rather than shrinking text.\n- **Speaker notes on every content slide.** Presenters press N to see them.\n- **Real photos over decoration.** Every image needs \\`alt\\` text.\n- **Tracks** colour the accent: \\`value\\` (red, default) for the homeowner/value story,\n \\`build\\` (teal) for construction/process, \\`neutral\\` (navy) for framing slides.\n- **Backgrounds**: \\`paper\\` (default) for content; solid \\`navy\\`/\\`red\\`/\\`teal\\`/\\`plum\\`/\\`grey\\`/\\`stone\\`\n for section dividers and moments of emphasis. Don't put dense content on solid grounds.\n\n## Inline text\n\\`**bold**\\`, \\`*highlight*\\` (accent colour), \\`\\\\\\`code\\\\\\`\\`, \\`[label](https://…)\\`. No HTML.\n\n## Journey decks\nSet \\`journey.steps\\` at deck level to get a numbered agenda. Then:\n- a \\`journey\\` slide shows the full map,\n- \\`step: 3\\` on any slide draws the vertical STEP rail,\n- \\`showJourney: true\\` adds the compact \"you are here\" strip (great on \\`section\\` slides).\n\n## Typical shape\n1. \\`title\\`\n2. \\`statement\\` or \\`journey\\` (why we're here / the agenda)\n3. per part: \\`section\\` → 2–5 content slides (\\`bullets\\`, \\`split\\`, \\`cards\\`, \\`stats\\`, \\`photos\\`, \\`walkthrough\\`)\n4. \\`qr\\` (where to go next) → \\`contacts\\` → closing \\`statement\\`\n`;\n"],"mappings":";;;;;;;;AAAA,SAAS,SAAS;AAClB,SAAS,uBAAuB;AAWzB,SAAS,cAA+B;AAC7C,SAAO,QAAQ,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,EAAE,aAAa,WAAW,EAAE,UAAU,EAAE;AAClG;AAGO,SAAS,eAAe,MAAc;AAC3C,QAAM,SAAS,UAAU,IAAI;AAC7B,MAAI,CAAC,OAAQ,QAAO;AACpB,QAAM,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,OAAO,IAAI,GAAG,GAAG,OAAO,OAAO,GAAG,UAAU,CAAC;AACzF,SAAO;AAAA,IACL,MAAM,OAAO;AAAA,IACb,aAAa,OAAO;AAAA,IACpB,WAAW,OAAO;AAAA,IAClB,UAAU,OAAO,YAAY,CAAC;AAAA,IAC9B,QAAQ,gBAAgB,QAAQ,EAAE,cAAc,OAAO,CAAC;AAAA,IACxD,SAAS,OAAO;AAAA,EAClB;AACF;AAGO,SAAS,iBAAiB;AAC/B,SAAO,gBAAgB,YAAY,EAAE,MAAM,eAAe,cAAc,OAAO,CAAC;AAClF;AAGO,IAAM,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;","names":[]}