@particle-academy/fancy-slides 0.8.0 → 0.10.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,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { j as SlideElement } from './types-9BbelJX1.cjs';
2
+ import { k as SlideElement } from './types-C3w37g3A.cjs';
3
3
 
4
4
  /**
5
5
  * Renderer signature compatible with `Slide`'s `renderElement` prop. Returns
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { j as SlideElement } from './types-9BbelJX1.js';
2
+ import { k as SlideElement } from './types-C3w37g3A.js';
3
3
 
4
4
  /**
5
5
  * Renderer signature compatible with `Slide`'s `renderElement` prop. Returns
@@ -22,9 +22,21 @@ interface Deck {
22
22
  slides: Slide[];
23
23
  /** Visual theme for the whole deck. */
24
24
  theme: Theme;
25
+ /**
26
+ * Schema version the deck was authored against. Omitted == version 1 (the
27
+ * implicit version for decks created before versioning). Used by the
28
+ * serialize / parse helpers to migrate older shapes forward. Mirrors
29
+ * `dark-slide`'s `Schema::SCHEMA_VERSION`.
30
+ */
31
+ version?: number;
25
32
  /** Free-form metadata — `{ author, createdAt, updatedAt, tags, … }`. */
26
33
  metadata?: Record<string, unknown>;
27
34
  }
35
+ /**
36
+ * Current deck schema version. Bump when a structural change needs migration on
37
+ * load. Kept in lockstep with the sibling `dark-slide` PHP package.
38
+ */
39
+ declare const SCHEMA_VERSION = 1;
28
40
  /** Layout presets that pre-populate / constrain element placement. */
29
41
  type SlideLayout = "blank" | "title" | "title-content" | "two-column" | "section-divider" | "image-text" | "text-image" | "quote";
30
42
  interface Slide {
@@ -68,6 +80,13 @@ interface ElementBase {
68
80
  locked?: boolean;
69
81
  /** Hide on this slide (still in the data — for animated reveals). */
70
82
  hidden?: boolean;
83
+ /**
84
+ * Whole-element hyperlink. When set, the element becomes a click target in
85
+ * the viewer (opens in a new tab) and the pptx writer emits an
86
+ * `<a:hlinkClick>` on the shape / picture. For rich inline links *within*
87
+ * text, use a markdown `[label](url)` in the text content instead.
88
+ */
89
+ href?: string;
71
90
  /** Entrance build animation — when present the element participates in the slide's build sequence. */
72
91
  animation?: ElementAnimation;
73
92
  }
@@ -273,6 +292,11 @@ type DeckOp = {
273
292
  } | {
274
293
  kind: "deck_apply_theme";
275
294
  theme: Theme;
295
+ }
296
+ /** Replace the entire deck atomically — stream a full presentation IN in one op. */
297
+ | {
298
+ kind: "deck_set";
299
+ deck: Deck;
276
300
  } | {
277
301
  kind: "slide_add";
278
302
  index: number;
@@ -332,4 +356,4 @@ type DeckOp = {
332
356
  animation?: ElementAnimation;
333
357
  };
334
358
 
335
- export type { AnimationEffect as A, ChartElement as C, Deck as D, ElementAnimation as E, ImageElement as I, ShapeElement as S, TableElement as T, AnimationTrigger as a, CodeElement as b, DeckActivity as c, DeckOp as d, ElementBase as e, EmbedElement as f, ShapeKind as g, Slide as h, SlideBackground as i, SlideElement as j, SlideLayout as k, SlideTransition as l, TextElement as m, TextStyle as n, Theme as o, ThemeColors as p, ThemeFonts as q, TransitionKind as r };
359
+ export { type AnimationEffect as A, type ChartElement as C, type Deck as D, type ElementAnimation as E, type ImageElement as I, SCHEMA_VERSION as S, type TableElement as T, type AnimationTrigger as a, type CodeElement as b, type DeckActivity as c, type DeckOp as d, type ElementBase as e, type EmbedElement as f, type ShapeElement as g, type ShapeKind as h, type Slide as i, type SlideBackground as j, type SlideElement as k, type SlideLayout as l, type SlideTransition as m, type TextElement as n, type TextStyle as o, type Theme as p, type ThemeColors as q, type ThemeFonts as r, type TransitionKind as s };
@@ -22,9 +22,21 @@ interface Deck {
22
22
  slides: Slide[];
23
23
  /** Visual theme for the whole deck. */
24
24
  theme: Theme;
25
+ /**
26
+ * Schema version the deck was authored against. Omitted == version 1 (the
27
+ * implicit version for decks created before versioning). Used by the
28
+ * serialize / parse helpers to migrate older shapes forward. Mirrors
29
+ * `dark-slide`'s `Schema::SCHEMA_VERSION`.
30
+ */
31
+ version?: number;
25
32
  /** Free-form metadata — `{ author, createdAt, updatedAt, tags, … }`. */
26
33
  metadata?: Record<string, unknown>;
27
34
  }
35
+ /**
36
+ * Current deck schema version. Bump when a structural change needs migration on
37
+ * load. Kept in lockstep with the sibling `dark-slide` PHP package.
38
+ */
39
+ declare const SCHEMA_VERSION = 1;
28
40
  /** Layout presets that pre-populate / constrain element placement. */
29
41
  type SlideLayout = "blank" | "title" | "title-content" | "two-column" | "section-divider" | "image-text" | "text-image" | "quote";
30
42
  interface Slide {
@@ -68,6 +80,13 @@ interface ElementBase {
68
80
  locked?: boolean;
69
81
  /** Hide on this slide (still in the data — for animated reveals). */
70
82
  hidden?: boolean;
83
+ /**
84
+ * Whole-element hyperlink. When set, the element becomes a click target in
85
+ * the viewer (opens in a new tab) and the pptx writer emits an
86
+ * `<a:hlinkClick>` on the shape / picture. For rich inline links *within*
87
+ * text, use a markdown `[label](url)` in the text content instead.
88
+ */
89
+ href?: string;
71
90
  /** Entrance build animation — when present the element participates in the slide's build sequence. */
72
91
  animation?: ElementAnimation;
73
92
  }
@@ -273,6 +292,11 @@ type DeckOp = {
273
292
  } | {
274
293
  kind: "deck_apply_theme";
275
294
  theme: Theme;
295
+ }
296
+ /** Replace the entire deck atomically — stream a full presentation IN in one op. */
297
+ | {
298
+ kind: "deck_set";
299
+ deck: Deck;
276
300
  } | {
277
301
  kind: "slide_add";
278
302
  index: number;
@@ -332,4 +356,4 @@ type DeckOp = {
332
356
  animation?: ElementAnimation;
333
357
  };
334
358
 
335
- export type { AnimationEffect as A, ChartElement as C, Deck as D, ElementAnimation as E, ImageElement as I, ShapeElement as S, TableElement as T, AnimationTrigger as a, CodeElement as b, DeckActivity as c, DeckOp as d, ElementBase as e, EmbedElement as f, ShapeKind as g, Slide as h, SlideBackground as i, SlideElement as j, SlideLayout as k, SlideTransition as l, TextElement as m, TextStyle as n, Theme as o, ThemeColors as p, ThemeFonts as q, TransitionKind as r };
359
+ export { type AnimationEffect as A, type ChartElement as C, type Deck as D, type ElementAnimation as E, type ImageElement as I, SCHEMA_VERSION as S, type TableElement as T, type AnimationTrigger as a, type CodeElement as b, type DeckActivity as c, type DeckOp as d, type ElementBase as e, type EmbedElement as f, type ShapeElement as g, type ShapeKind as h, type Slide as i, type SlideBackground as j, type SlideElement as k, type SlideLayout as l, type SlideTransition as m, type TextElement as n, type TextStyle as o, type Theme as p, type ThemeColors as q, type ThemeFonts as r, type TransitionKind as s };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-academy/fancy-slides",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "Presentation editor + web viewer for the fancy UI set — Google-Slides-style deck authoring with a JSON-friendly schema, full keyboard-driven viewer, and an agent bridge so LLMs can compose decks directly.",
5
5
  "repository": {
6
6
  "type": "git",