@nswds/app 1.85.1 → 1.86.0
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/index.cjs +10 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -17557,7 +17557,7 @@ function FormatToggle({ format, setFormat }) {
|
|
|
17557
17557
|
|
|
17558
17558
|
// package.json
|
|
17559
17559
|
var package_default = {
|
|
17560
|
-
version: "1.85.
|
|
17560
|
+
version: "1.85.1"};
|
|
17561
17561
|
var SluggerContext = React5__namespace.default.createContext(null);
|
|
17562
17562
|
function flattenText(nodes) {
|
|
17563
17563
|
if (nodes == null || typeof nodes === "boolean") return "";
|
|
@@ -33355,6 +33355,14 @@ function usePageHeadings() {
|
|
|
33355
33355
|
}, [pathname]);
|
|
33356
33356
|
return headings;
|
|
33357
33357
|
}
|
|
33358
|
+
function useStickyOffset(extraPadding = 0) {
|
|
33359
|
+
const headerHeight = useSelectorHeight("#nsw-header");
|
|
33360
|
+
const navigationHeight = useSelectorHeight("#nsw-main-navigation");
|
|
33361
|
+
return React5.useMemo(() => {
|
|
33362
|
+
const total = headerHeight + navigationHeight + extraPadding;
|
|
33363
|
+
return total > 0 ? total : 0;
|
|
33364
|
+
}, [extraPadding, headerHeight, navigationHeight]);
|
|
33365
|
+
}
|
|
33358
33366
|
function createFormStore(opts) {
|
|
33359
33367
|
const { storageKey, initialFormData, initialFormStatus } = opts;
|
|
33360
33368
|
return zustand.create()(
|
|
@@ -33908,6 +33916,7 @@ exports.usePageHeadings = usePageHeadings;
|
|
|
33908
33916
|
exports.usePromptInputAttachments = usePromptInputAttachments;
|
|
33909
33917
|
exports.useSelectorHeight = useSelectorHeight;
|
|
33910
33918
|
exports.useSidebar = useSidebar;
|
|
33919
|
+
exports.useStickyOffset = useStickyOffset;
|
|
33911
33920
|
exports.useToc = useToc;
|
|
33912
33921
|
//# sourceMappingURL=index.cjs.map
|
|
33913
33922
|
//# sourceMappingURL=index.cjs.map
|