wiki-formant 0.89.1 → 0.89.2
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/dist/react.js +8 -2
- package/package.json +1 -1
package/dist/react.js
CHANGED
|
@@ -96,10 +96,16 @@ function useCollapsibleSidebar(options = {}) {
|
|
|
96
96
|
}, [storageKey]);
|
|
97
97
|
const toggle = useCallback(() => setOpen(!open), [open, setOpen]);
|
|
98
98
|
// One source of truth either side of hydration: the boot script writes this
|
|
99
|
-
// attribute before first paint, and
|
|
99
|
+
// attribute before first paint, and once storage has been read the hook owns
|
|
100
|
+
// it. Not before: this effect runs in the same commit as the read above, with
|
|
101
|
+
// `open` still the server's `true`, and writing "open" there over a stamped
|
|
102
|
+
// "closed" widened a remembered-closed rail for one frame and then slid it
|
|
103
|
+
// shut — the very slide the boot script exists to prevent.
|
|
100
104
|
useEffect(() => {
|
|
105
|
+
if (!ready)
|
|
106
|
+
return;
|
|
101
107
|
document.documentElement.setAttribute(SIDEBAR_ATTRIBUTE, open ? 'open' : 'closed');
|
|
102
|
-
}, [open]);
|
|
108
|
+
}, [open, ready]);
|
|
103
109
|
return { open, setOpen, toggle, isMobile, ready };
|
|
104
110
|
}
|
|
105
111
|
// ---- sharing that state across the layout -----------------------------------
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wiki-formant",
|
|
3
|
-
"version": "0.89.
|
|
3
|
+
"version": "0.89.2",
|
|
4
4
|
"description": "The portable half of a wiki: derived taxonomy and facet controls, a version-negotiating MCP transport, markdown twins, block rendering, a rich-text editor engine, conditional-GET plumbing, and the headers and CSP every origin sends.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|