@backmatter/next 0.0.32 → 0.0.33
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/package.json +2 -2
- package/src/preview-refresh.tsx +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backmatter/next",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.33",
|
|
4
4
|
"description": "Experimental Next.js adapter for Backmatter. APIs will break. Not ready for production.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@backmatter/core": "^0.0.26",
|
|
51
51
|
"@mdx-js/mdx": "^3.1.1",
|
|
52
52
|
"remark-gfm": "^4.0.1",
|
|
53
|
-
"@backmatter/studio": "^0.0.
|
|
53
|
+
"@backmatter/studio": "^0.0.11"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"next": ">=16.3.0",
|
package/src/preview-refresh.tsx
CHANGED
|
@@ -22,6 +22,12 @@ export function PreviewPageReloader(props: { locale: string; type: string; slug:
|
|
|
22
22
|
router.refresh();
|
|
23
23
|
});
|
|
24
24
|
}, [router]);
|
|
25
|
+
// HEAD and other documents in this checkout. This document's own saves
|
|
26
|
+
// arrive on the doc stream below and must not refresh the page twice.
|
|
27
|
+
useEffect(
|
|
28
|
+
() => subscribeTreeStream({ locale: props.locale, type: props.type, slug: props.slug }, refresh),
|
|
29
|
+
[props.locale, props.type, props.slug, refresh],
|
|
30
|
+
);
|
|
25
31
|
return <PreviewStreamReloader {...props} refresh={refresh} />;
|
|
26
32
|
}
|
|
27
33
|
|