@almadar/ui 6.24.0 → 6.25.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.
@@ -59906,20 +59906,25 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
59906
59906
  entityAfter: JSON.stringify(liveEntity ?? {}),
59907
59907
  slotsTouched: Array.from(pendingSlots.keys()).join(",")
59908
59908
  }));
59909
- for (const [slot, patterns] of pendingSlots) {
59910
- log13.debug("flush:slot", {
59911
- traitName,
59912
- slot,
59913
- patternCount: patterns.length,
59914
- event: flushEvent,
59915
- transition: `${previousState}->${newState}`,
59916
- cleared: patterns.length === 0
59917
- });
59918
- flushSlot(traitName, slot, patterns, {
59919
- event: flushEvent,
59920
- state: previousState,
59921
- entity: binding.linkedEntity
59922
- });
59909
+ const stillActive = traitBindingsRef.current.some((b) => b.trait.name === traitName);
59910
+ if (!stillActive) {
59911
+ log13.debug("flush:skip-stale-navigation", { traitName, event: flushEvent });
59912
+ } else {
59913
+ for (const [slot, patterns] of pendingSlots) {
59914
+ log13.debug("flush:slot", {
59915
+ traitName,
59916
+ slot,
59917
+ patternCount: patterns.length,
59918
+ event: flushEvent,
59919
+ transition: `${previousState}->${newState}`,
59920
+ cleared: patterns.length === 0
59921
+ });
59922
+ flushSlot(traitName, slot, patterns, {
59923
+ event: flushEvent,
59924
+ state: previousState,
59925
+ entity: binding.linkedEntity
59926
+ });
59927
+ }
59923
59928
  }
59924
59929
  if (didWrite && sharedKey === void 0) {
59925
59930
  publishBindingSnapshot(traitName, liveEntity);
package/dist/avl/index.js CHANGED
@@ -59830,20 +59830,25 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
59830
59830
  entityAfter: JSON.stringify(liveEntity ?? {}),
59831
59831
  slotsTouched: Array.from(pendingSlots.keys()).join(",")
59832
59832
  }));
59833
- for (const [slot, patterns] of pendingSlots) {
59834
- log13.debug("flush:slot", {
59835
- traitName,
59836
- slot,
59837
- patternCount: patterns.length,
59838
- event: flushEvent,
59839
- transition: `${previousState}->${newState}`,
59840
- cleared: patterns.length === 0
59841
- });
59842
- flushSlot(traitName, slot, patterns, {
59843
- event: flushEvent,
59844
- state: previousState,
59845
- entity: binding.linkedEntity
59846
- });
59833
+ const stillActive = traitBindingsRef.current.some((b) => b.trait.name === traitName);
59834
+ if (!stillActive) {
59835
+ log13.debug("flush:skip-stale-navigation", { traitName, event: flushEvent });
59836
+ } else {
59837
+ for (const [slot, patterns] of pendingSlots) {
59838
+ log13.debug("flush:slot", {
59839
+ traitName,
59840
+ slot,
59841
+ patternCount: patterns.length,
59842
+ event: flushEvent,
59843
+ transition: `${previousState}->${newState}`,
59844
+ cleared: patterns.length === 0
59845
+ });
59846
+ flushSlot(traitName, slot, patterns, {
59847
+ event: flushEvent,
59848
+ state: previousState,
59849
+ entity: binding.linkedEntity
59850
+ });
59851
+ }
59847
59852
  }
59848
59853
  if (didWrite && sharedKey === void 0) {
59849
59854
  publishBindingSnapshot(traitName, liveEntity);
@@ -54030,20 +54030,25 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
54030
54030
  entityAfter: JSON.stringify(liveEntity ?? {}),
54031
54031
  slotsTouched: Array.from(pendingSlots.keys()).join(",")
54032
54032
  }));
54033
- for (const [slot, patterns] of pendingSlots) {
54034
- log12.debug("flush:slot", {
54035
- traitName,
54036
- slot,
54037
- patternCount: patterns.length,
54038
- event: flushEvent,
54039
- transition: `${previousState}->${newState}`,
54040
- cleared: patterns.length === 0
54041
- });
54042
- flushSlot(traitName, slot, patterns, {
54043
- event: flushEvent,
54044
- state: previousState,
54045
- entity: binding.linkedEntity
54046
- });
54033
+ const stillActive = traitBindingsRef.current.some((b) => b.trait.name === traitName);
54034
+ if (!stillActive) {
54035
+ log12.debug("flush:skip-stale-navigation", { traitName, event: flushEvent });
54036
+ } else {
54037
+ for (const [slot, patterns] of pendingSlots) {
54038
+ log12.debug("flush:slot", {
54039
+ traitName,
54040
+ slot,
54041
+ patternCount: patterns.length,
54042
+ event: flushEvent,
54043
+ transition: `${previousState}->${newState}`,
54044
+ cleared: patterns.length === 0
54045
+ });
54046
+ flushSlot(traitName, slot, patterns, {
54047
+ event: flushEvent,
54048
+ state: previousState,
54049
+ entity: binding.linkedEntity
54050
+ });
54051
+ }
54047
54052
  }
54048
54053
  if (didWrite && sharedKey === void 0) {
54049
54054
  publishBindingSnapshot(traitName, liveEntity);
@@ -53956,20 +53956,25 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
53956
53956
  entityAfter: JSON.stringify(liveEntity ?? {}),
53957
53957
  slotsTouched: Array.from(pendingSlots.keys()).join(",")
53958
53958
  }));
53959
- for (const [slot, patterns] of pendingSlots) {
53960
- log12.debug("flush:slot", {
53961
- traitName,
53962
- slot,
53963
- patternCount: patterns.length,
53964
- event: flushEvent,
53965
- transition: `${previousState}->${newState}`,
53966
- cleared: patterns.length === 0
53967
- });
53968
- flushSlot(traitName, slot, patterns, {
53969
- event: flushEvent,
53970
- state: previousState,
53971
- entity: binding.linkedEntity
53972
- });
53959
+ const stillActive = traitBindingsRef.current.some((b) => b.trait.name === traitName);
53960
+ if (!stillActive) {
53961
+ log12.debug("flush:skip-stale-navigation", { traitName, event: flushEvent });
53962
+ } else {
53963
+ for (const [slot, patterns] of pendingSlots) {
53964
+ log12.debug("flush:slot", {
53965
+ traitName,
53966
+ slot,
53967
+ patternCount: patterns.length,
53968
+ event: flushEvent,
53969
+ transition: `${previousState}->${newState}`,
53970
+ cleared: patterns.length === 0
53971
+ });
53972
+ flushSlot(traitName, slot, patterns, {
53973
+ event: flushEvent,
53974
+ state: previousState,
53975
+ entity: binding.linkedEntity
53976
+ });
53977
+ }
53973
53978
  }
53974
53979
  if (didWrite && sharedKey === void 0) {
53975
53980
  publishBindingSnapshot(traitName, liveEntity);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "6.24.0",
3
+ "version": "6.25.0",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "sideEffects": [