@particle-academy/fancy-slides 0.3.0 → 0.5.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/README.md +35 -0
- package/dist/index.cjs +570 -63
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +139 -10
- package/dist/index.d.ts +139 -10
- package/dist/index.js +563 -65
- package/dist/index.js.map +1 -1
- package/dist/registry.d.cts +1 -1
- package/dist/registry.d.ts +1 -1
- package/dist/{types-B2ecrEAz.d.cts → types-9BbelJX1.d.cts} +42 -1
- package/dist/{types-B2ecrEAz.d.ts → types-9BbelJX1.d.ts} +42 -1
- package/package.json +1 -1
package/dist/registry.d.cts
CHANGED
package/dist/registry.d.ts
CHANGED
|
@@ -68,6 +68,42 @@ interface ElementBase {
|
|
|
68
68
|
locked?: boolean;
|
|
69
69
|
/** Hide on this slide (still in the data — for animated reveals). */
|
|
70
70
|
hidden?: boolean;
|
|
71
|
+
/** Entrance build animation — when present the element participates in the slide's build sequence. */
|
|
72
|
+
animation?: ElementAnimation;
|
|
73
|
+
}
|
|
74
|
+
/** Visual entrance effect played when an element builds onto the slide. */
|
|
75
|
+
type AnimationEffect = "fade" | "fly-in" | "zoom" | "wipe";
|
|
76
|
+
/** When an element's build fires relative to the surrounding builds. */
|
|
77
|
+
type AnimationTrigger = "on-click" | "with-prev" | "after-prev";
|
|
78
|
+
/**
|
|
79
|
+
* Per-element entrance animation ("build step"). Elements with an `animation`
|
|
80
|
+
* start hidden and reveal as the presenter advances through the slide's build
|
|
81
|
+
* sequence. The shape is shared with the sibling `dark-slide` PHP package, so
|
|
82
|
+
* keep it byte-for-byte aligned.
|
|
83
|
+
*/
|
|
84
|
+
interface ElementAnimation {
|
|
85
|
+
/** Visual effect. */
|
|
86
|
+
effect: AnimationEffect;
|
|
87
|
+
/** When the build fires relative to its neighbours. Default `"on-click"`. */
|
|
88
|
+
trigger?: AnimationTrigger;
|
|
89
|
+
/** Direction for `fly-in` / `wipe`. Default `"left"`. */
|
|
90
|
+
direction?: "left" | "right" | "up" | "down";
|
|
91
|
+
/** Effect duration in ms. Default `500`. */
|
|
92
|
+
duration?: number;
|
|
93
|
+
/** Delay before the effect starts, in ms. Default `0`. */
|
|
94
|
+
delay?: number;
|
|
95
|
+
/** Build order within the slide, ascending; ties broken by element array index. */
|
|
96
|
+
order?: number;
|
|
97
|
+
/**
|
|
98
|
+
* Reveal a TEXT element one paragraph/line at a time (PowerPoint/Google
|
|
99
|
+
* Slides "By paragraph"). The element expands into one build per paragraph
|
|
100
|
+
* — the element's `content` split on `"\n"` (a trailing empty line is
|
|
101
|
+
* dropped). The first paragraph uses this animation's `trigger`; every
|
|
102
|
+
* subsequent paragraph reveals on a fresh click. Only meaningful for text
|
|
103
|
+
* elements; ignored for other types and when the element has 0/1 paragraphs
|
|
104
|
+
* (then it behaves like a normal single build).
|
|
105
|
+
*/
|
|
106
|
+
byParagraph?: boolean;
|
|
71
107
|
}
|
|
72
108
|
interface TextElement extends ElementBase {
|
|
73
109
|
type: "text";
|
|
@@ -289,6 +325,11 @@ type DeckOp = {
|
|
|
289
325
|
elementId: string;
|
|
290
326
|
w: number;
|
|
291
327
|
h: number;
|
|
328
|
+
} | {
|
|
329
|
+
kind: "element_set_animation";
|
|
330
|
+
slideId: string;
|
|
331
|
+
elementId: string;
|
|
332
|
+
animation?: ElementAnimation;
|
|
292
333
|
};
|
|
293
334
|
|
|
294
|
-
export type { ChartElement as C, Deck as D,
|
|
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 };
|
|
@@ -68,6 +68,42 @@ interface ElementBase {
|
|
|
68
68
|
locked?: boolean;
|
|
69
69
|
/** Hide on this slide (still in the data — for animated reveals). */
|
|
70
70
|
hidden?: boolean;
|
|
71
|
+
/** Entrance build animation — when present the element participates in the slide's build sequence. */
|
|
72
|
+
animation?: ElementAnimation;
|
|
73
|
+
}
|
|
74
|
+
/** Visual entrance effect played when an element builds onto the slide. */
|
|
75
|
+
type AnimationEffect = "fade" | "fly-in" | "zoom" | "wipe";
|
|
76
|
+
/** When an element's build fires relative to the surrounding builds. */
|
|
77
|
+
type AnimationTrigger = "on-click" | "with-prev" | "after-prev";
|
|
78
|
+
/**
|
|
79
|
+
* Per-element entrance animation ("build step"). Elements with an `animation`
|
|
80
|
+
* start hidden and reveal as the presenter advances through the slide's build
|
|
81
|
+
* sequence. The shape is shared with the sibling `dark-slide` PHP package, so
|
|
82
|
+
* keep it byte-for-byte aligned.
|
|
83
|
+
*/
|
|
84
|
+
interface ElementAnimation {
|
|
85
|
+
/** Visual effect. */
|
|
86
|
+
effect: AnimationEffect;
|
|
87
|
+
/** When the build fires relative to its neighbours. Default `"on-click"`. */
|
|
88
|
+
trigger?: AnimationTrigger;
|
|
89
|
+
/** Direction for `fly-in` / `wipe`. Default `"left"`. */
|
|
90
|
+
direction?: "left" | "right" | "up" | "down";
|
|
91
|
+
/** Effect duration in ms. Default `500`. */
|
|
92
|
+
duration?: number;
|
|
93
|
+
/** Delay before the effect starts, in ms. Default `0`. */
|
|
94
|
+
delay?: number;
|
|
95
|
+
/** Build order within the slide, ascending; ties broken by element array index. */
|
|
96
|
+
order?: number;
|
|
97
|
+
/**
|
|
98
|
+
* Reveal a TEXT element one paragraph/line at a time (PowerPoint/Google
|
|
99
|
+
* Slides "By paragraph"). The element expands into one build per paragraph
|
|
100
|
+
* — the element's `content` split on `"\n"` (a trailing empty line is
|
|
101
|
+
* dropped). The first paragraph uses this animation's `trigger`; every
|
|
102
|
+
* subsequent paragraph reveals on a fresh click. Only meaningful for text
|
|
103
|
+
* elements; ignored for other types and when the element has 0/1 paragraphs
|
|
104
|
+
* (then it behaves like a normal single build).
|
|
105
|
+
*/
|
|
106
|
+
byParagraph?: boolean;
|
|
71
107
|
}
|
|
72
108
|
interface TextElement extends ElementBase {
|
|
73
109
|
type: "text";
|
|
@@ -289,6 +325,11 @@ type DeckOp = {
|
|
|
289
325
|
elementId: string;
|
|
290
326
|
w: number;
|
|
291
327
|
h: number;
|
|
328
|
+
} | {
|
|
329
|
+
kind: "element_set_animation";
|
|
330
|
+
slideId: string;
|
|
331
|
+
elementId: string;
|
|
332
|
+
animation?: ElementAnimation;
|
|
292
333
|
};
|
|
293
334
|
|
|
294
|
-
export type { ChartElement as C, Deck as D,
|
|
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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-academy/fancy-slides",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.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",
|