@markdy/astro 0.8.13 → 0.8.15

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 CHANGED
@@ -81,7 +81,8 @@ export const code = `
81
81
  | `copyright` | `boolean` | `true` | Show a "Powered by Markdy" badge below the animation |
82
82
  | `progressBar` | `boolean` | `true` | Deprecated compatibility flag for the rainbow scene-boundary progress bar |
83
83
  | `sceneBoundaryProgress` | `boolean` | `progressBar` | Preferred flag for the rainbow scene-boundary progress bar |
84
- | `playbackRate` | `number` | `1` | Timeline speed multiplier |
84
+ | `playbackRate` | `number` | `1` | Normalized timeline speed multiplier; `1` is Markdy's normal pace |
85
+ | `interactiveViewport` | `boolean` | `false` | Enable wheel zoom and drag pan after hydration |
85
86
  | `class` | `string` | — | CSS class for the outer wrapper |
86
87
 
87
88
  > **Tip:** Match `width`, `height`, and `bg` props to your `scene` declaration values to avoid a visual flash on hydration.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markdy/astro",
3
- "version": "0.8.13",
3
+ "version": "0.8.15",
4
4
  "description": "Astro island component for diagram-native animated MarkdyScript architecture diagrams.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -38,7 +38,7 @@
38
38
  "access": "public"
39
39
  },
40
40
  "dependencies": {
41
- "@markdy/renderer-dom": "0.8.13"
41
+ "@markdy/renderer-dom": "0.8.15"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "astro": ">=4.0.0"
package/src/Markdy.astro CHANGED
@@ -44,8 +44,10 @@ export interface Props {
44
44
  progressBar?: boolean;
45
45
  /** Preferred flag to show/hide rainbow progress at scene boundary. Defaults to true. */
46
46
  sceneBoundaryProgress?: boolean;
47
- /** Playback speed multiplier. Defaults to 1. */
47
+ /** Playback speed multiplier. Defaults to 1, where 1 is Markdy's normal pace. */
48
48
  playbackRate?: number;
49
+ /** Enable wheel zoom and drag pan after hydration. Defaults to false. */
50
+ interactiveViewport?: boolean;
49
51
  class?: string;
50
52
  /**
51
53
  * Short human-readable title for the animation.
@@ -72,6 +74,7 @@ const {
72
74
  progressBar = true,
73
75
  sceneBoundaryProgress,
74
76
  playbackRate = 1,
77
+ interactiveViewport = false,
75
78
  class: className,
76
79
  title = "Markdy animation",
77
80
  description,
@@ -95,6 +98,7 @@ const codeB64 =
95
98
  data-markdy-progress-bar={String(progressBar)}
96
99
  data-markdy-scene-boundary-progress={String(sceneBoundaryProgress ?? progressBar)}
97
100
  data-markdy-playback-rate={String(playbackRate)}
101
+ data-markdy-interactive-viewport={String(interactiveViewport)}
98
102
  role="img"
99
103
  aria-label={title}
100
104
  aria-busy="true"
@@ -271,6 +275,7 @@ const codeB64 =
271
275
  const progressBar = el.dataset.markdyProgressBar !== "false";
272
276
  const sceneBoundaryProgress = el.dataset.markdySceneBoundaryProgress !== "false";
273
277
  const playbackRate = Number(el.dataset.markdyPlaybackRate ?? "1");
278
+ const interactiveViewport = el.dataset.markdyInteractiveViewport === "true";
274
279
 
275
280
  // Code-split: renderer-dom is NOT part of the initial page bundle.
276
281
  const { createDiagram } = await import("@markdy/renderer-dom");
@@ -289,6 +294,7 @@ const codeB64 =
289
294
  progressBar,
290
295
  sceneBoundaryProgress,
291
296
  playbackRate: Number.isFinite(playbackRate) && playbackRate > 0 ? playbackRate : 1,
297
+ interactiveViewport,
292
298
  });
293
299
 
294
300
  el.dataset.markdyInit = "done";