@jsenv/navi 0.12.29 → 0.12.30
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/jsenv_navi.js +15 -24
- package/dist/jsenv_navi.js.map +7 -8
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -9678,26 +9678,16 @@ const useUITransitionContentId = value => {
|
|
|
9678
9678
|
}, []);
|
|
9679
9679
|
};
|
|
9680
9680
|
|
|
9681
|
-
|
|
9682
|
-
|
|
9683
|
-
renderSignal.value = {}; // force re-render
|
|
9684
|
-
};
|
|
9681
|
+
// import { signal } from "@preact/signals";
|
|
9682
|
+
|
|
9685
9683
|
|
|
9686
9684
|
const useForceRender = () => {
|
|
9687
|
-
|
|
9688
|
-
|
|
9689
|
-
|
|
9685
|
+
const [, setState] = useState(null);
|
|
9686
|
+
return () => {
|
|
9687
|
+
setState({});
|
|
9688
|
+
};
|
|
9690
9689
|
};
|
|
9691
9690
|
|
|
9692
|
-
// import { useState } from "preact/hooks";
|
|
9693
|
-
|
|
9694
|
-
// export const useForceRender = () => {
|
|
9695
|
-
// const [, setState] = useState(null);
|
|
9696
|
-
// return () => {
|
|
9697
|
-
// setState({});
|
|
9698
|
-
// };
|
|
9699
|
-
// };
|
|
9700
|
-
|
|
9701
9691
|
/**
|
|
9702
9692
|
*
|
|
9703
9693
|
* . Refactor les actions pour qu'elles utilisent use. Ce qui va ouvrir la voie pour
|
|
@@ -9728,12 +9718,9 @@ const Routes = ({
|
|
|
9728
9718
|
element = RootElement,
|
|
9729
9719
|
children
|
|
9730
9720
|
}) => {
|
|
9731
|
-
return jsx(
|
|
9732
|
-
|
|
9733
|
-
children:
|
|
9734
|
-
element: element,
|
|
9735
|
-
children: children
|
|
9736
|
-
})
|
|
9721
|
+
return jsx(Route, {
|
|
9722
|
+
element: element,
|
|
9723
|
+
children: children
|
|
9737
9724
|
});
|
|
9738
9725
|
};
|
|
9739
9726
|
const useActiveRouteInfo = () => useContext(RouteInfoContext);
|
|
@@ -9823,6 +9810,7 @@ const initRouteObserver = ({
|
|
|
9823
9810
|
onActiveInfoChange,
|
|
9824
9811
|
registerChildRouteFromContext
|
|
9825
9812
|
}) => {
|
|
9813
|
+
const [teardown, addTeardown] = createPubSub();
|
|
9826
9814
|
const elementId = getElementSignature(element);
|
|
9827
9815
|
const candidateElementIds = Array.from(candidateSet, c => getElementSignature(c.ActiveElement));
|
|
9828
9816
|
if (candidateElementIds.length === 0) ; else {
|
|
@@ -9921,15 +9909,18 @@ const initRouteObserver = ({
|
|
|
9921
9909
|
publishCompositeStatus();
|
|
9922
9910
|
};
|
|
9923
9911
|
if (route) {
|
|
9924
|
-
route.subscribeStatus(onChange);
|
|
9912
|
+
addTeardown(route.subscribeStatus(onChange));
|
|
9925
9913
|
}
|
|
9926
9914
|
for (const candidate of candidateSet) {
|
|
9927
|
-
candidate.route.subscribeStatus(onChange);
|
|
9915
|
+
addTeardown(candidate.route.subscribeStatus(onChange));
|
|
9928
9916
|
}
|
|
9929
9917
|
if (registerChildRouteFromContext) {
|
|
9930
9918
|
registerChildRouteFromContext(ActiveElement, compositeRoute, fallback, meta);
|
|
9931
9919
|
}
|
|
9932
9920
|
updateActiveInfo();
|
|
9921
|
+
return () => {
|
|
9922
|
+
teardown();
|
|
9923
|
+
};
|
|
9933
9924
|
};
|
|
9934
9925
|
const RouteSlot = () => {
|
|
9935
9926
|
const SlotElement = useContext(SlotContext);
|