@markdy/astro 0.8.17 → 0.8.19
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 +3 -3
- package/package.json +2 -2
- package/src/Markdy.astro +3 -3
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ const code = `
|
|
|
47
47
|
`;
|
|
48
48
|
---
|
|
49
49
|
|
|
50
|
-
<Markdy code={code} width={800} height={400} bg="#07111f" autoplay />
|
|
50
|
+
<Markdy code={code} width={800} height={400} bg="#07111f" autoplay controls />
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
### In MDX
|
|
@@ -64,7 +64,7 @@ export const code = `
|
|
|
64
64
|
Web -> API "GET /users"
|
|
65
65
|
`;
|
|
66
66
|
|
|
67
|
-
<Markdy code={code} width={600} height={300} bg="#07111f" autoplay />
|
|
67
|
+
<Markdy code={code} width={600} height={300} bg="#07111f" autoplay controls />
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
## Props
|
|
@@ -83,7 +83,7 @@ export const code = `
|
|
|
83
83
|
| `sceneBoundaryProgress` | `boolean` | `progressBar` | Preferred flag for the rainbow scene-boundary progress bar |
|
|
84
84
|
| `playbackRate` | `number` | `1` | Normalized timeline speed multiplier; `1` is Markdy's normal pace |
|
|
85
85
|
| `interactiveViewport` | `boolean` | `false` | Enable wheel zoom and drag pan after hydration |
|
|
86
|
-
| `controls` | `boolean` | `false` | Show a compact toolbar with play/pause, restart, speed, and view reset controls
|
|
86
|
+
| `controls` | `boolean` | `false` | Show a compact toolbar with play/pause, restart, speed, and view reset controls; also enables viewport interaction |
|
|
87
87
|
| `class` | `string` | — | CSS class for the outer wrapper |
|
|
88
88
|
|
|
89
89
|
> **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.
|
|
3
|
+
"version": "0.8.19",
|
|
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.
|
|
41
|
+
"@markdy/renderer-dom": "0.8.19"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"astro": ">=4.0.0"
|
package/src/Markdy.astro
CHANGED
|
@@ -48,7 +48,7 @@ export interface Props {
|
|
|
48
48
|
playbackRate?: number;
|
|
49
49
|
/** Enable wheel zoom and drag pan after hydration. Defaults to false. */
|
|
50
50
|
interactiveViewport?: boolean;
|
|
51
|
-
/** Show built-in playback and viewport controls. Defaults to false. */
|
|
51
|
+
/** Show built-in playback and viewport controls. Also enables viewport interaction. Defaults to false. */
|
|
52
52
|
controls?: boolean;
|
|
53
53
|
class?: string;
|
|
54
54
|
/**
|
|
@@ -76,8 +76,8 @@ const {
|
|
|
76
76
|
progressBar = true,
|
|
77
77
|
sceneBoundaryProgress,
|
|
78
78
|
playbackRate = 1,
|
|
79
|
-
interactiveViewport = false,
|
|
80
79
|
controls = false,
|
|
80
|
+
interactiveViewport = controls,
|
|
81
81
|
class: className,
|
|
82
82
|
title = "Markdy animation",
|
|
83
83
|
description,
|
|
@@ -279,8 +279,8 @@ const codeB64 =
|
|
|
279
279
|
const progressBar = el.dataset.markdyProgressBar !== "false";
|
|
280
280
|
const sceneBoundaryProgress = el.dataset.markdySceneBoundaryProgress !== "false";
|
|
281
281
|
const playbackRate = Number(el.dataset.markdyPlaybackRate ?? "1");
|
|
282
|
-
const interactiveViewport = el.dataset.markdyInteractiveViewport === "true";
|
|
283
282
|
const controls = el.dataset.markdyControls === "true";
|
|
283
|
+
const interactiveViewport = controls || el.dataset.markdyInteractiveViewport === "true";
|
|
284
284
|
|
|
285
285
|
// Code-split: renderer-dom is NOT part of the initial page bundle.
|
|
286
286
|
const { createDiagram } = await import("@markdy/renderer-dom");
|