@markdy/astro 0.8.3 → 0.8.4
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 +1 -1
- package/package.json +2 -2
- package/src/Markdy.astro +2 -2
package/README.md
CHANGED
|
@@ -89,7 +89,7 @@ export const code = `
|
|
|
89
89
|
|
|
90
90
|
1. **Server:** renders a sized placeholder `<div>` with a `▶ markdy` label
|
|
91
91
|
2. **Client:** an `IntersectionObserver` watches all `.markdy-root` elements
|
|
92
|
-
3. **On viewport entry:** the observer fires, clears the placeholder, and calls `
|
|
92
|
+
3. **On viewport entry:** the observer fires, clears the placeholder, and calls `createDiagram()` from `@markdy/renderer-dom`
|
|
93
93
|
4. **View Transitions:** listens for `astro:page-load` to re-observe newly added elements
|
|
94
94
|
|
|
95
95
|
## Documentation
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markdy/astro",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4",
|
|
4
4
|
"description": "Astro island component for animated MarkdyScript architecture diagrams.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@markdy/renderer-dom": "0.8.
|
|
40
|
+
"@markdy/renderer-dom": "0.8.4"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"astro": ">=4.0.0"
|
package/src/Markdy.astro
CHANGED
|
@@ -255,13 +255,13 @@ const {
|
|
|
255
255
|
const playbackRate = Number(el.dataset.markdyPlaybackRate ?? "1");
|
|
256
256
|
|
|
257
257
|
// Code-split: renderer-dom is NOT part of the initial page bundle.
|
|
258
|
-
const {
|
|
258
|
+
const { createDiagram } = await import("@markdy/renderer-dom");
|
|
259
259
|
|
|
260
260
|
// Clear the SSR placeholder and mount the canvas atomically after the
|
|
261
261
|
// async import resolves, so there is no flash of empty content.
|
|
262
262
|
el.innerHTML = "";
|
|
263
263
|
|
|
264
|
-
|
|
264
|
+
createDiagram({
|
|
265
265
|
container: el,
|
|
266
266
|
code,
|
|
267
267
|
assets,
|