@jsenv/navi 0.29.93 → 0.29.94
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 +26 -3
- package/dist/jsenv_navi.js.map +3 -3
- package/docs/AI_INSTRUCTIONS.md +3 -2
- package/docs/control_object.md +13 -0
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -24679,7 +24679,7 @@ const useUIGroupStateController = (
|
|
|
24679
24679
|
|
|
24680
24680
|
// onChange and applyState live inside init so they close over the stable
|
|
24681
24681
|
// signals/pubsub without needing external refs.
|
|
24682
|
-
const onChange = (e, { notifyExternal }) => {
|
|
24682
|
+
const onChange = (e, { notifyExternal, actingChild }) => {
|
|
24683
24683
|
if (groupIsRenderingRef.current) {
|
|
24684
24684
|
// Held until the layout effect below, WITH what it asked for: a child
|
|
24685
24685
|
// whose bound signal was written from the outside changes during the
|
|
@@ -24692,6 +24692,7 @@ const useUIGroupStateController = (
|
|
|
24692
24692
|
e,
|
|
24693
24693
|
notifyExternal:
|
|
24694
24694
|
pendingChange?.notifyExternal === true ? true : notifyExternal,
|
|
24695
|
+
actingChild,
|
|
24695
24696
|
};
|
|
24696
24697
|
return;
|
|
24697
24698
|
}
|
|
@@ -24715,6 +24716,21 @@ const useUIGroupStateController = (
|
|
|
24715
24716
|
// Somebody answered: what the group is worth is what its children say
|
|
24716
24717
|
// between them, from here on.
|
|
24717
24718
|
controller.stateGivenFromAbove = false;
|
|
24719
|
+
if (resolvedDistributeChildStates) {
|
|
24720
|
+
// A group answering for all its children at once holds ONE answer
|
|
24721
|
+
// its children are views OF, rather than a value that IS what they
|
|
24722
|
+
// said: a list saying who plays and four seats saying who sits
|
|
24723
|
+
// where. One view speaking moves the answer, so the others have to
|
|
24724
|
+
// show it again — the same rule as a child arriving after the value
|
|
24725
|
+
// did, for a child that was there when the value moved without it.
|
|
24726
|
+
// The one that just acted is left alone: it is where the user put
|
|
24727
|
+
// it.
|
|
24728
|
+
controller.placeChildrenUIState(
|
|
24729
|
+
groupUIState,
|
|
24730
|
+
new CustomEvent("propagate_down_set_ui_state", { detail: {} }),
|
|
24731
|
+
{ except: actingChild },
|
|
24732
|
+
);
|
|
24733
|
+
}
|
|
24718
24734
|
applyState(groupUIState, e);
|
|
24719
24735
|
} else if (notifyExternal === "silent") {
|
|
24720
24736
|
controller.syncInternalState(groupUIState);
|
|
@@ -24795,7 +24811,7 @@ const useUIGroupStateController = (
|
|
|
24795
24811
|
// place — see warnChildAnswersForItself.
|
|
24796
24812
|
// One pass over every child, which is what a plural distribute needs:
|
|
24797
24813
|
// it is asked once, sees the whole group, and answers for all of them.
|
|
24798
|
-
placeChildrenUIState: (groupUIState, e) => {
|
|
24814
|
+
placeChildrenUIState: (groupUIState, e, { except } = {}) => {
|
|
24799
24815
|
if (!resolvedDistributeChildStates) {
|
|
24800
24816
|
for (const childUIStateController of childUIStateControllerArray) {
|
|
24801
24817
|
controller.placeChildUIState(
|
|
@@ -24817,6 +24833,9 @@ const useUIGroupStateController = (
|
|
|
24817
24833
|
return;
|
|
24818
24834
|
}
|
|
24819
24835
|
for (const childUIStateController of monitoredChildren) {
|
|
24836
|
+
if (childUIStateController === except) {
|
|
24837
|
+
continue;
|
|
24838
|
+
}
|
|
24820
24839
|
if (!stateByChild.has(childUIStateController)) {
|
|
24821
24840
|
// Not named by the answer: left where it is, the way
|
|
24822
24841
|
// CANNOT_DERIVE leaves a child a per-child distribute says
|
|
@@ -25016,7 +25035,10 @@ const useUIGroupStateController = (
|
|
|
25016
25035
|
)}`,
|
|
25017
25036
|
);
|
|
25018
25037
|
if (stateChanged) {
|
|
25019
|
-
onChange(e, {
|
|
25038
|
+
onChange(e, {
|
|
25039
|
+
notifyExternal: silent ? "silent" : true,
|
|
25040
|
+
actingChild: childUIStateController,
|
|
25041
|
+
});
|
|
25020
25042
|
} else {
|
|
25021
25043
|
controller.onUIAction(e);
|
|
25022
25044
|
}
|
|
@@ -25229,6 +25251,7 @@ const useUIGroupStateController = (
|
|
|
25229
25251
|
chainEvent(batchedEvent, pendingChange.e);
|
|
25230
25252
|
scope._onChange(batchedEvent, {
|
|
25231
25253
|
notifyExternal: pendingChange.notifyExternal,
|
|
25254
|
+
actingChild: pendingChange.actingChild,
|
|
25232
25255
|
});
|
|
25233
25256
|
}
|
|
25234
25257
|
});
|