@classic-homes/slides 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -4,18 +4,18 @@ import {
4
4
  deckJsonSchema,
5
5
  describeLayout,
6
6
  listLayouts
7
- } from "./chunk-YI7A4EWX.js";
7
+ } from "./chunk-JFUJ47TP.js";
8
8
  import {
9
9
  buildDeckFile,
10
10
  fileImageResolver,
11
11
  loadDeckFile
12
- } from "./chunk-2IPLZ3SA.js";
12
+ } from "./chunk-L7G3VH7K.js";
13
13
  import {
14
14
  DeckError,
15
15
  formatIssues,
16
16
  renderDeck,
17
17
  validateDeck
18
- } from "./chunk-GXGDPBAR.js";
18
+ } from "./chunk-PTTLL6PQ.js";
19
19
 
20
20
  // src/node/cli.ts
21
21
  import { watch } from "fs";
@@ -107,7 +107,7 @@ ${"".padEnd(12)} Use for: ${l.whenToUse}
107
107
  case "mcp": {
108
108
  let mcp;
109
109
  try {
110
- mcp = await import("./mcp-PUA45IS7.js");
110
+ mcp = await import("./mcp-UX32IP2J.js");
111
111
  } catch (e) {
112
112
  if (e.code === "ERR_MODULE_NOT_FOUND") {
113
113
  throw new Error(
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { L as LayoutCategory, B as BrandPalette } from './render-DcyKuBRD.js';
2
- export { a as BrandPaletteSchema, b as BrandProfile, c as BrandProfileInput, d as BrandProfileSchema, C as CLASSIC_HOMES_BRAND, e as CLASSIC_HOMES_PALETTE, D as Deck, f as DeckBrand, g as DeckBrandSchema, h as DeckError, i as DeckInput, j as DeckSchema, k as DeckSettings, l as DeckSettingsSchema, I as ImageInput, m as ImageResolver, n as ImageValue, o as ItemValue, p as LAYOUTS, q as LAYOUT_CATEGORIES, r as LAYOUT_CATEGORY_ORDER, s as LayoutDef, t as LayoutIssue, u as LayoutName, P as PREVIEW_SIZE, R as RenderOptions, v as RenderResult, w as ResolvedBrand, S as SlideData, x as SlideInput, y as SlideSchema, V as ValidateOptions, z as ValidationResult, A as checkPalette, E as collectImageSources, F as extractDeckSource, G as formatIssues, H as formatPath, J as getLayout, K as renderDeck, M as resolveBrand, N as validateBrandProfile, O as validateDeck } from './render-DcyKuBRD.js';
1
+ import { L as LayoutCategory, B as BrandPalette } from './render-CU0sXO2y.js';
2
+ export { a as BrandPaletteSchema, b as BrandProfile, c as BrandProfileInput, d as BrandProfileSchema, C as CLASSIC_HOMES_BRAND, e as CLASSIC_HOMES_PALETTE, D as Deck, f as DeckBrand, g as DeckBrandSchema, h as DeckError, i as DeckInput, j as DeckSchema, k as DeckSettings, l as DeckSettingsSchema, F as FieldMarker, I as ImageInput, m as ImageResolver, n as ImageValue, o as ItemValue, p as LAYOUTS, q as LAYOUT_CATEGORIES, r as LAYOUT_CATEGORY_ORDER, s as LayoutDef, t as LayoutIssue, u as LayoutName, P as PREVIEW_SIZE, R as RenderOptions, v as RenderResult, w as ResolvedBrand, S as SlideData, x as SlideInput, y as SlideSchema, V as ValidateOptions, z as ValidationResult, A as checkPalette, E as collectImageSources, G as extractDeckSource, H as fieldMarkers, J as formatIssues, K as formatPath, M as getLayout, N as renderDeck, O as resolveBrand, Q as validateBrandProfile, T as validateDeck } from './render-CU0sXO2y.js';
3
3
  import * as zod_to_json_schema from 'zod-to-json-schema';
4
4
  import { z } from 'zod';
5
5
 
@@ -155,6 +155,8 @@ interface FieldBase<K extends string> {
155
155
  * - point: {x, y} in % of an image (hotspot picker)
156
156
  */
157
157
  hint?: 'url' | 'video-url' | 'chart' | 'grid' | 'point';
158
+ /** Rarely changed; editors should tuck it behind an "Advanced" section. */
159
+ advanced?: boolean;
158
160
  }
159
161
  /** Deck-level fields for a settings panel: brand overrides and presentation settings. */
160
162
  declare function deckEditorFields(): {
@@ -179,6 +181,21 @@ interface LayoutEditorInfo {
179
181
  declare function commonSlideFields(): EditorField[];
180
182
  declare function layoutEditorInfo(name: string): LayoutEditorInfo | undefined;
181
183
  declare function allLayoutEditorInfo(): LayoutEditorInfo[];
184
+ /**
185
+ * One deck holding every layout's starting slide, in palette order, for
186
+ * rendering layout thumbnails once (render it, then show slide N of the
187
+ * result per layout). `slideFor[layout]` is that layout's slide index.
188
+ */
189
+ declare function layoutGalleryDeck(): {
190
+ deck: {
191
+ title: string;
192
+ journey: {
193
+ steps: string[];
194
+ };
195
+ slides: Record<string, unknown>[];
196
+ };
197
+ slideFor: Record<string, number>;
198
+ };
182
199
  /**
183
200
  * Stand-in image for new slides: a neutral frame reading "Add a photo".
184
201
  * It validates (so a fresh slide previews immediately) but lint warns until
@@ -289,6 +306,6 @@ interface EmbedOptions {
289
306
  declare function videoEmbedUrl(ref: VideoRef, o: EmbedOptions): string;
290
307
 
291
308
  /** CSP source for the inline presenter runtime: script-src '<hash>'. */
292
- declare const RUNTIME_SCRIPT_HASH = "sha256-oKFaVecqTMnaoeBzefA8f7poigISWe5hotztD1XgJP8=";
309
+ declare const RUNTIME_SCRIPT_HASH = "sha256-gElvQAb4VPvKu4UeyJRVKuoHYNp8NGhXwx2EhL7NB88=";
293
310
 
294
- export { AUTHORING_GUIDE, BrandPalette, CHART_TYPES, ChartSpec, type ChartSpecInput, type ChartSpecValue, type ChartType, type EditableDeck, type EditorField, LOGO_SVG, LayoutCategory, type LayoutEditorInfo, PALETTE, PLACEHOLDER_IMAGE, RUNTIME_SCRIPT_HASH, type SlideRef, type VideoRef, addSlide, allLayoutEditorInfo, blankSlide, chartOption, commonSlideFields, deckEditorFields, deckJsonSchema, describeChart, describeLayout, ensureSlideIds, escapeHtml, findSlide, formatValue, inline, isPlaceholderImage, layoutEditorInfo, listLayouts, logoLockup, moveSlide, newSlideId, outline, parseDeckSource, parseVideoUrl, prose, removeSlide, renderChartSvg, slideKey, stringifyDeck, updateSlide, videoEmbedUrl };
311
+ export { AUTHORING_GUIDE, BrandPalette, CHART_TYPES, ChartSpec, type ChartSpecInput, type ChartSpecValue, type ChartType, type EditableDeck, type EditorField, LOGO_SVG, LayoutCategory, type LayoutEditorInfo, PALETTE, PLACEHOLDER_IMAGE, RUNTIME_SCRIPT_HASH, type SlideRef, type VideoRef, addSlide, allLayoutEditorInfo, blankSlide, chartOption, commonSlideFields, deckEditorFields, deckJsonSchema, describeChart, describeLayout, ensureSlideIds, escapeHtml, findSlide, formatValue, inline, isPlaceholderImage, layoutEditorInfo, layoutGalleryDeck, listLayouts, logoLockup, moveSlide, newSlideId, outline, parseDeckSource, parseVideoUrl, prose, removeSlide, renderChartSvg, slideKey, stringifyDeck, updateSlide, videoEmbedUrl };
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  deckJsonSchema,
4
4
  describeLayout,
5
5
  listLayouts
6
- } from "./chunk-YI7A4EWX.js";
6
+ } from "./chunk-JFUJ47TP.js";
7
7
  import {
8
8
  BrandPaletteSchema,
9
9
  BrandProfileSchema,
@@ -35,6 +35,7 @@ import {
35
35
  ensureSlideIds,
36
36
  escapeHtml,
37
37
  extractDeckSource,
38
+ fieldMarkers,
38
39
  findSlide,
39
40
  formatIssues,
40
41
  formatPath,
@@ -43,6 +44,7 @@ import {
43
44
  inline,
44
45
  isPlaceholderImage,
45
46
  layoutEditorInfo,
47
+ layoutGalleryDeck,
46
48
  logoLockup,
47
49
  moveSlide,
48
50
  newSlideId,
@@ -60,10 +62,10 @@ import {
60
62
  validateBrandProfile,
61
63
  validateDeck,
62
64
  videoEmbedUrl
63
- } from "./chunk-GXGDPBAR.js";
65
+ } from "./chunk-PTTLL6PQ.js";
64
66
 
65
67
  // src/generated/runtime-hash.ts
66
- var RUNTIME_SCRIPT_HASH = "sha256-oKFaVecqTMnaoeBzefA8f7poigISWe5hotztD1XgJP8=";
68
+ var RUNTIME_SCRIPT_HASH = "sha256-gElvQAb4VPvKu4UeyJRVKuoHYNp8NGhXwx2EhL7NB88=";
67
69
  export {
68
70
  AUTHORING_GUIDE,
69
71
  BrandPaletteSchema,
@@ -99,6 +101,7 @@ export {
99
101
  ensureSlideIds,
100
102
  escapeHtml,
101
103
  extractDeckSource,
104
+ fieldMarkers,
102
105
  findSlide,
103
106
  formatIssues,
104
107
  formatPath,
@@ -107,6 +110,7 @@ export {
107
110
  inline,
108
111
  isPlaceholderImage,
109
112
  layoutEditorInfo,
113
+ layoutGalleryDeck,
110
114
  listLayouts,
111
115
  logoLockup,
112
116
  moveSlide,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/generated/runtime-hash.ts"],"sourcesContent":["// Generated by scripts/embed-fonts.ts. Do not edit.\n/** CSP source for the inline presenter runtime: script-src '<hash>'. */\nexport const RUNTIME_SCRIPT_HASH = 'sha256-oKFaVecqTMnaoeBzefA8f7poigISWe5hotztD1XgJP8=';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,IAAM,sBAAsB;","names":[]}
1
+ {"version":3,"sources":["../src/generated/runtime-hash.ts"],"sourcesContent":["// Generated by scripts/embed-fonts.ts. Do not edit.\n/** CSP source for the inline presenter runtime: script-src '<hash>'. */\nexport const RUNTIME_SCRIPT_HASH = 'sha256-gElvQAb4VPvKu4UeyJRVKuoHYNp8NGhXwx2EhL7NB88=';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,IAAM,sBAAsB;","names":[]}
@@ -2,13 +2,13 @@ import {
2
2
  AUTHORING_GUIDE,
3
3
  describeLayout,
4
4
  listLayouts
5
- } from "./chunk-YI7A4EWX.js";
5
+ } from "./chunk-JFUJ47TP.js";
6
6
  import {
7
7
  buildDeckFile,
8
8
  confinedPath,
9
9
  loadDeckFile,
10
10
  saveDeckFile
11
- } from "./chunk-2IPLZ3SA.js";
11
+ } from "./chunk-L7G3VH7K.js";
12
12
  import {
13
13
  addSlide,
14
14
  formatIssues,
@@ -18,7 +18,7 @@ import {
18
18
  stringifyDeck,
19
19
  updateSlide,
20
20
  validateDeck
21
- } from "./chunk-GXGDPBAR.js";
21
+ } from "./chunk-PTTLL6PQ.js";
22
22
 
23
23
  // src/node/mcp.ts
24
24
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
@@ -320,4 +320,4 @@ export {
320
320
  createSlidesMcpServer,
321
321
  runStdio
322
322
  };
323
- //# sourceMappingURL=mcp-PUA45IS7.js.map
323
+ //# sourceMappingURL=mcp-UX32IP2J.js.map
package/dist/node.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RenderOptions, v as RenderResult, m as ImageResolver } from './render-DcyKuBRD.js';
2
- export { K as renderDeck } from './render-DcyKuBRD.js';
1
+ import { R as RenderOptions, v as RenderResult, m as ImageResolver } from './render-CU0sXO2y.js';
2
+ export { N as renderDeck } from './render-CU0sXO2y.js';
3
3
  import 'zod';
4
4
 
5
5
  /** Largest single image we inline without warning. Big photos bloat the deck file. */
package/dist/node.js CHANGED
@@ -4,10 +4,10 @@ import {
4
4
  fileImageResolver,
5
5
  loadDeckFile,
6
6
  saveDeckFile
7
- } from "./chunk-2IPLZ3SA.js";
7
+ } from "./chunk-L7G3VH7K.js";
8
8
  import {
9
9
  renderDeck
10
- } from "./chunk-GXGDPBAR.js";
10
+ } from "./chunk-PTTLL6PQ.js";
11
11
  export {
12
12
  IMAGE_WARN_BYTES,
13
13
  buildDeckFile,
@@ -561,7 +561,31 @@ interface RenderOptions {
561
561
  speakerNotes?: boolean;
562
562
  /** Permit kiosk auto-advance in an isolated presentation host (editor previews stay paused). */
563
563
  allowEmbeddedKiosk?: boolean;
564
+ /**
565
+ * Click-to-edit for editor previews. Embeds each slide's text and image
566
+ * fields so that, inside an iframe, clicking a title, bullet or picture
567
+ * posts `{ type: 'classic-slides:select', index, path }` to the parent
568
+ * (`index` is the deck slide, `path` the field, or null for the slide
569
+ * itself), and the parent can outline a field with
570
+ * `{ type: 'classic-slides:highlight', index, path }`. Links inside slides
571
+ * stop navigating. Off by default; never use it for shared or exported decks.
572
+ */
573
+ editorMarkers?: boolean;
574
+ }
575
+ /** A field the editor runtime can match a clicked element to. */
576
+ interface FieldMarker {
577
+ /** Path inside the slide, e.g. ["title"] or ["items", 2, "text"] */
578
+ path: (string | number)[];
579
+ /** Visible text of a text field, whitespace collapsed */
580
+ text?: string;
581
+ /** Resolved src of an image field */
582
+ img?: string;
564
583
  }
584
+ /**
585
+ * The text and image fields of one slide, for click-to-edit matching.
586
+ * `resolveImage` maps an authored src to the src rendered in the page.
587
+ */
588
+ declare function fieldMarkers(slide: Record<string, unknown>, resolveImage?: (src: string) => string): FieldMarker[];
565
589
  interface RenderResult {
566
590
  html: string;
567
591
  deck: Deck;
@@ -577,4 +601,4 @@ declare function renderDeck(input: unknown, options?: RenderOptions): Promise<Re
577
601
  /** Pulls the embedded deck source back out of a rendered HTML file. */
578
602
  declare function extractDeckSource(html: string): unknown | undefined;
579
603
 
580
- export { checkPalette as A, type BrandPalette as B, CLASSIC_HOMES_BRAND as C, type Deck as D, collectImageSources as E, extractDeckSource as F, formatIssues as G, formatPath as H, type ImageInput as I, getLayout as J, renderDeck as K, type LayoutCategory as L, resolveBrand as M, validateBrandProfile as N, validateDeck as O, PREVIEW_SIZE as P, type RenderOptions as R, type SlideData as S, type ValidateOptions as V, BrandPaletteSchema as a, type BrandProfile as b, type BrandProfileInput as c, BrandProfileSchema as d, CLASSIC_HOMES_PALETTE as e, type DeckBrand as f, DeckBrandSchema as g, DeckError as h, type DeckInput as i, DeckSchema as j, type DeckSettings as k, DeckSettingsSchema as l, type ImageResolver as m, type ImageValue as n, type ItemValue as o, LAYOUTS as p, LAYOUT_CATEGORIES as q, LAYOUT_CATEGORY_ORDER as r, type LayoutDef as s, type LayoutIssue as t, type LayoutName as u, type RenderResult as v, type ResolvedBrand as w, type SlideInput as x, SlideSchema as y, type ValidationResult as z };
604
+ export { checkPalette as A, type BrandPalette as B, CLASSIC_HOMES_BRAND as C, type Deck as D, collectImageSources as E, type FieldMarker as F, extractDeckSource as G, fieldMarkers as H, type ImageInput as I, formatIssues as J, formatPath as K, type LayoutCategory as L, getLayout as M, renderDeck as N, resolveBrand as O, PREVIEW_SIZE as P, validateBrandProfile as Q, type RenderOptions as R, type SlideData as S, validateDeck as T, type ValidateOptions as V, BrandPaletteSchema as a, type BrandProfile as b, type BrandProfileInput as c, BrandProfileSchema as d, CLASSIC_HOMES_PALETTE as e, type DeckBrand as f, DeckBrandSchema as g, DeckError as h, type DeckInput as i, DeckSchema as j, type DeckSettings as k, DeckSettingsSchema as l, type ImageResolver as m, type ImageValue as n, type ItemValue as o, LAYOUTS as p, LAYOUT_CATEGORIES as q, LAYOUT_CATEGORY_ORDER as r, type LayoutDef as s, type LayoutIssue as t, type LayoutName as u, type RenderResult as v, type ResolvedBrand as w, type SlideInput as x, SlideSchema as y, type ValidationResult as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@classic-homes/slides",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Branded Classic Homes presentations from structured deck files: schema, layouts, renderer, CLI and MCP server",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",