@almadar/ui 5.125.0 → 5.126.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.
@@ -18989,17 +18989,27 @@ function getWeekDays(start) {
18989
18989
  }
18990
18990
  return days;
18991
18991
  }
18992
- function generateDefaultTimeSlots() {
18992
+ function generateDefaultTimeSlots(events2) {
18993
+ let first = DEFAULT_FIRST_HOUR;
18994
+ let last = DEFAULT_LAST_HOUR;
18995
+ for (const ev of events2) {
18996
+ const start = new Date(ev.startTime);
18997
+ if (Number.isNaN(start.getTime())) continue;
18998
+ const hour = start.getHours();
18999
+ if (hour < first) first = hour;
19000
+ if (hour > last) last = hour;
19001
+ }
18993
19002
  const slots = [];
18994
- for (let hour = 9; hour <= 17; hour++) {
18995
- slots.push(`${hour.toString().padStart(2, "0")}:00`);
19003
+ for (let hour = first; hour <= last; hour++) {
19004
+ slots.push(slotLabel(hour));
18996
19005
  }
18997
19006
  return slots;
18998
19007
  }
18999
19008
  function eventInSlot(event, day, slotTime) {
19000
19009
  const eventStart = new Date(event.startTime);
19001
- const [slotHour, slotMinute] = slotTime.split(":").map(Number);
19002
- return eventStart.toDateString() === day.toDateString() && eventStart.getHours() === slotHour && eventStart.getMinutes() === slotMinute;
19010
+ if (Number.isNaN(eventStart.getTime())) return false;
19011
+ const [slotHour] = slotTime.split(":").map(Number);
19012
+ return eventStart.toDateString() === day.toDateString() && eventStart.getHours() === slotHour;
19003
19013
  }
19004
19014
  function CalendarGrid({
19005
19015
  weekStart,
@@ -19028,8 +19038,8 @@ function CalendarGrid({
19028
19038
  [resolvedWeekStart]
19029
19039
  );
19030
19040
  const resolvedTimeSlots = React84.useMemo(
19031
- () => timeSlots ?? generateDefaultTimeSlots(),
19032
- [timeSlots]
19041
+ () => timeSlots ?? generateDefaultTimeSlots(evs),
19042
+ [timeSlots, evs]
19033
19043
  );
19034
19044
  const visibleCount = useDayWindow(dayWindow);
19035
19045
  const [dayOffset, setDayOffset] = React84.useState(0);
@@ -19216,7 +19226,7 @@ function CalendarGrid({
19216
19226
  }
19217
19227
  );
19218
19228
  }
19219
- var SHORT_DATE;
19229
+ var SHORT_DATE, DEFAULT_FIRST_HOUR, DEFAULT_LAST_HOUR, slotLabel;
19220
19230
  var init_CalendarGrid = __esm({
19221
19231
  "components/core/molecules/CalendarGrid.tsx"() {
19222
19232
  "use client";
@@ -19231,6 +19241,9 @@ var init_CalendarGrid = __esm({
19231
19241
  init_useEventBus();
19232
19242
  init_useSwipeGesture();
19233
19243
  SHORT_DATE = { month: "short", day: "numeric" };
19244
+ DEFAULT_FIRST_HOUR = 9;
19245
+ DEFAULT_LAST_HOUR = 17;
19246
+ slotLabel = (hour) => `${hour.toString().padStart(2, "0")}:00`;
19234
19247
  CalendarGrid.displayName = "CalendarGrid";
19235
19248
  }
19236
19249
  });
@@ -43957,6 +43970,13 @@ function MaybeTraitScope({
43957
43970
  if (wrap) {
43958
43971
  return /* @__PURE__ */ jsxRuntime.jsx(providers.TraitScopeProvider, { orbital, trait: sourceTrait, children });
43959
43972
  }
43973
+ if (sourceTrait !== void 0 && schemaCtx !== null) {
43974
+ scopeWrapLog.warn("decline", {
43975
+ sourceTrait,
43976
+ orbitalsByTraitSize: schemaCtx.orbitalsByTrait.size,
43977
+ reason: "sourceTrait not in orbitalsByTrait \u2014 children render unscoped"
43978
+ });
43979
+ }
43960
43980
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
43961
43981
  }
43962
43982
  function UISlotComponent({
@@ -44254,7 +44274,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
44254
44274
  const childId = `${parentId}-${index}`;
44255
44275
  const childPath = parentPath === "root" ? `root.children.${index}` : `${parentPath}.children.${index}`;
44256
44276
  const childAsRecord = child;
44257
- const { type: _childType, props: nestedProps, _id: _childNodeId, children: _childChildren, ...flatProps } = childAsRecord;
44277
+ const { type: _childType, props: nestedProps, _id: _childNodeId, _sourceTrait: childSourceTrait, children: _childChildren, ...flatProps } = childAsRecord;
44258
44278
  const resolvedProps = nestedProps !== void 0 ? nestedProps : flatProps;
44259
44279
  if (_childChildren !== void 0 && nestedProps === void 0) {
44260
44280
  resolvedProps.children = _childChildren;
@@ -44269,11 +44289,14 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
44269
44289
  // (e.g. form-section inside a stack) can resolve entityDef via
44270
44290
  // the trait's linkedEntity for form-field enrichment. The orbCtx
44271
44291
  // (slot/transition/state/entity) propagates the same way so every
44272
- // nested node carries a complete contextual-edit address.
44273
- ...sourceTrait !== void 0 && { sourceTrait },
44292
+ // nested node carries a complete contextual-edit address. A child
44293
+ // carrying its own `_sourceTrait` (multi-source slot stack) owns it
44294
+ // outright — inheriting the synthetic wrapper's sentinel instead
44295
+ // would erase the real owner.
44296
+ ...childSourceTrait !== void 0 ? { sourceTrait: childSourceTrait } : sourceTrait !== void 0 && { sourceTrait },
44274
44297
  ...orbCtx ?? {}
44275
44298
  };
44276
- return /* @__PURE__ */ jsxRuntime.jsx(
44299
+ const renderedChild = /* @__PURE__ */ jsxRuntime.jsx(
44277
44300
  SlotContentRenderer,
44278
44301
  {
44279
44302
  content: childContent,
@@ -44282,6 +44305,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
44282
44305
  },
44283
44306
  childId
44284
44307
  );
44308
+ return childSourceTrait !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(MaybeTraitScope, { sourceTrait: childSourceTrait, children: renderedChild }, childId) : renderedChild;
44285
44309
  });
44286
44310
  }
44287
44311
  function toDrawableNodes(children) {
@@ -18914,17 +18914,27 @@ function getWeekDays(start) {
18914
18914
  }
18915
18915
  return days;
18916
18916
  }
18917
- function generateDefaultTimeSlots() {
18917
+ function generateDefaultTimeSlots(events2) {
18918
+ let first = DEFAULT_FIRST_HOUR;
18919
+ let last = DEFAULT_LAST_HOUR;
18920
+ for (const ev of events2) {
18921
+ const start = new Date(ev.startTime);
18922
+ if (Number.isNaN(start.getTime())) continue;
18923
+ const hour = start.getHours();
18924
+ if (hour < first) first = hour;
18925
+ if (hour > last) last = hour;
18926
+ }
18918
18927
  const slots = [];
18919
- for (let hour = 9; hour <= 17; hour++) {
18920
- slots.push(`${hour.toString().padStart(2, "0")}:00`);
18928
+ for (let hour = first; hour <= last; hour++) {
18929
+ slots.push(slotLabel(hour));
18921
18930
  }
18922
18931
  return slots;
18923
18932
  }
18924
18933
  function eventInSlot(event, day, slotTime) {
18925
18934
  const eventStart = new Date(event.startTime);
18926
- const [slotHour, slotMinute] = slotTime.split(":").map(Number);
18927
- return eventStart.toDateString() === day.toDateString() && eventStart.getHours() === slotHour && eventStart.getMinutes() === slotMinute;
18935
+ if (Number.isNaN(eventStart.getTime())) return false;
18936
+ const [slotHour] = slotTime.split(":").map(Number);
18937
+ return eventStart.toDateString() === day.toDateString() && eventStart.getHours() === slotHour;
18928
18938
  }
18929
18939
  function CalendarGrid({
18930
18940
  weekStart,
@@ -18953,8 +18963,8 @@ function CalendarGrid({
18953
18963
  [resolvedWeekStart]
18954
18964
  );
18955
18965
  const resolvedTimeSlots = useMemo(
18956
- () => timeSlots ?? generateDefaultTimeSlots(),
18957
- [timeSlots]
18966
+ () => timeSlots ?? generateDefaultTimeSlots(evs),
18967
+ [timeSlots, evs]
18958
18968
  );
18959
18969
  const visibleCount = useDayWindow(dayWindow);
18960
18970
  const [dayOffset, setDayOffset] = useState(0);
@@ -19141,7 +19151,7 @@ function CalendarGrid({
19141
19151
  }
19142
19152
  );
19143
19153
  }
19144
- var SHORT_DATE;
19154
+ var SHORT_DATE, DEFAULT_FIRST_HOUR, DEFAULT_LAST_HOUR, slotLabel;
19145
19155
  var init_CalendarGrid = __esm({
19146
19156
  "components/core/molecules/CalendarGrid.tsx"() {
19147
19157
  "use client";
@@ -19156,6 +19166,9 @@ var init_CalendarGrid = __esm({
19156
19166
  init_useEventBus();
19157
19167
  init_useSwipeGesture();
19158
19168
  SHORT_DATE = { month: "short", day: "numeric" };
19169
+ DEFAULT_FIRST_HOUR = 9;
19170
+ DEFAULT_LAST_HOUR = 17;
19171
+ slotLabel = (hour) => `${hour.toString().padStart(2, "0")}:00`;
19159
19172
  CalendarGrid.displayName = "CalendarGrid";
19160
19173
  }
19161
19174
  });
@@ -43882,6 +43895,13 @@ function MaybeTraitScope({
43882
43895
  if (wrap) {
43883
43896
  return /* @__PURE__ */ jsx(TraitScopeProvider, { orbital, trait: sourceTrait, children });
43884
43897
  }
43898
+ if (sourceTrait !== void 0 && schemaCtx !== null) {
43899
+ scopeWrapLog.warn("decline", {
43900
+ sourceTrait,
43901
+ orbitalsByTraitSize: schemaCtx.orbitalsByTrait.size,
43902
+ reason: "sourceTrait not in orbitalsByTrait \u2014 children render unscoped"
43903
+ });
43904
+ }
43885
43905
  return /* @__PURE__ */ jsx(Fragment, { children });
43886
43906
  }
43887
43907
  function UISlotComponent({
@@ -44179,7 +44199,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
44179
44199
  const childId = `${parentId}-${index}`;
44180
44200
  const childPath = parentPath === "root" ? `root.children.${index}` : `${parentPath}.children.${index}`;
44181
44201
  const childAsRecord = child;
44182
- const { type: _childType, props: nestedProps, _id: _childNodeId, children: _childChildren, ...flatProps } = childAsRecord;
44202
+ const { type: _childType, props: nestedProps, _id: _childNodeId, _sourceTrait: childSourceTrait, children: _childChildren, ...flatProps } = childAsRecord;
44183
44203
  const resolvedProps = nestedProps !== void 0 ? nestedProps : flatProps;
44184
44204
  if (_childChildren !== void 0 && nestedProps === void 0) {
44185
44205
  resolvedProps.children = _childChildren;
@@ -44194,11 +44214,14 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
44194
44214
  // (e.g. form-section inside a stack) can resolve entityDef via
44195
44215
  // the trait's linkedEntity for form-field enrichment. The orbCtx
44196
44216
  // (slot/transition/state/entity) propagates the same way so every
44197
- // nested node carries a complete contextual-edit address.
44198
- ...sourceTrait !== void 0 && { sourceTrait },
44217
+ // nested node carries a complete contextual-edit address. A child
44218
+ // carrying its own `_sourceTrait` (multi-source slot stack) owns it
44219
+ // outright — inheriting the synthetic wrapper's sentinel instead
44220
+ // would erase the real owner.
44221
+ ...childSourceTrait !== void 0 ? { sourceTrait: childSourceTrait } : sourceTrait !== void 0 && { sourceTrait },
44199
44222
  ...orbCtx ?? {}
44200
44223
  };
44201
- return /* @__PURE__ */ jsx(
44224
+ const renderedChild = /* @__PURE__ */ jsx(
44202
44225
  SlotContentRenderer,
44203
44226
  {
44204
44227
  content: childContent,
@@ -44207,6 +44230,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
44207
44230
  },
44208
44231
  childId
44209
44232
  );
44233
+ return childSourceTrait !== void 0 ? /* @__PURE__ */ jsx(MaybeTraitScope, { sourceTrait: childSourceTrait, children: renderedChild }, childId) : renderedChild;
44210
44234
  });
44211
44235
  }
44212
44236
  function toDrawableNodes(children) {
@@ -18557,17 +18557,27 @@ function getWeekDays(start) {
18557
18557
  }
18558
18558
  return days;
18559
18559
  }
18560
- function generateDefaultTimeSlots() {
18560
+ function generateDefaultTimeSlots(events2) {
18561
+ let first = DEFAULT_FIRST_HOUR;
18562
+ let last = DEFAULT_LAST_HOUR;
18563
+ for (const ev of events2) {
18564
+ const start = new Date(ev.startTime);
18565
+ if (Number.isNaN(start.getTime())) continue;
18566
+ const hour = start.getHours();
18567
+ if (hour < first) first = hour;
18568
+ if (hour > last) last = hour;
18569
+ }
18561
18570
  const slots = [];
18562
- for (let hour = 9; hour <= 17; hour++) {
18563
- slots.push(`${hour.toString().padStart(2, "0")}:00`);
18571
+ for (let hour = first; hour <= last; hour++) {
18572
+ slots.push(slotLabel(hour));
18564
18573
  }
18565
18574
  return slots;
18566
18575
  }
18567
18576
  function eventInSlot(event, day, slotTime) {
18568
18577
  const eventStart = new Date(event.startTime);
18569
- const [slotHour, slotMinute] = slotTime.split(":").map(Number);
18570
- return eventStart.toDateString() === day.toDateString() && eventStart.getHours() === slotHour && eventStart.getMinutes() === slotMinute;
18578
+ if (Number.isNaN(eventStart.getTime())) return false;
18579
+ const [slotHour] = slotTime.split(":").map(Number);
18580
+ return eventStart.toDateString() === day.toDateString() && eventStart.getHours() === slotHour;
18571
18581
  }
18572
18582
  function CalendarGrid({
18573
18583
  weekStart,
@@ -18596,8 +18606,8 @@ function CalendarGrid({
18596
18606
  [resolvedWeekStart]
18597
18607
  );
18598
18608
  const resolvedTimeSlots = React82.useMemo(
18599
- () => timeSlots ?? generateDefaultTimeSlots(),
18600
- [timeSlots]
18609
+ () => timeSlots ?? generateDefaultTimeSlots(evs),
18610
+ [timeSlots, evs]
18601
18611
  );
18602
18612
  const visibleCount = useDayWindow(dayWindow);
18603
18613
  const [dayOffset, setDayOffset] = React82.useState(0);
@@ -18784,7 +18794,7 @@ function CalendarGrid({
18784
18794
  }
18785
18795
  );
18786
18796
  }
18787
- var SHORT_DATE;
18797
+ var SHORT_DATE, DEFAULT_FIRST_HOUR, DEFAULT_LAST_HOUR, slotLabel;
18788
18798
  var init_CalendarGrid = __esm({
18789
18799
  "components/core/molecules/CalendarGrid.tsx"() {
18790
18800
  "use client";
@@ -18799,6 +18809,9 @@ var init_CalendarGrid = __esm({
18799
18809
  init_useEventBus();
18800
18810
  init_useSwipeGesture();
18801
18811
  SHORT_DATE = { month: "short", day: "numeric" };
18812
+ DEFAULT_FIRST_HOUR = 9;
18813
+ DEFAULT_LAST_HOUR = 17;
18814
+ slotLabel = (hour) => `${hour.toString().padStart(2, "0")}:00`;
18802
18815
  CalendarGrid.displayName = "CalendarGrid";
18803
18816
  }
18804
18817
  });
@@ -43328,6 +43341,13 @@ function MaybeTraitScope({
43328
43341
  if (wrap) {
43329
43342
  return /* @__PURE__ */ jsxRuntime.jsx(providers.TraitScopeProvider, { orbital, trait: sourceTrait, children });
43330
43343
  }
43344
+ if (sourceTrait !== void 0 && schemaCtx !== null) {
43345
+ scopeWrapLog.warn("decline", {
43346
+ sourceTrait,
43347
+ orbitalsByTraitSize: schemaCtx.orbitalsByTrait.size,
43348
+ reason: "sourceTrait not in orbitalsByTrait \u2014 children render unscoped"
43349
+ });
43350
+ }
43331
43351
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
43332
43352
  }
43333
43353
  function UISlotComponent({
@@ -43625,7 +43645,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
43625
43645
  const childId = `${parentId}-${index}`;
43626
43646
  const childPath = parentPath === "root" ? `root.children.${index}` : `${parentPath}.children.${index}`;
43627
43647
  const childAsRecord = child;
43628
- const { type: _childType, props: nestedProps, _id: _childNodeId, children: _childChildren, ...flatProps } = childAsRecord;
43648
+ const { type: _childType, props: nestedProps, _id: _childNodeId, _sourceTrait: childSourceTrait, children: _childChildren, ...flatProps } = childAsRecord;
43629
43649
  const resolvedProps = nestedProps !== void 0 ? nestedProps : flatProps;
43630
43650
  if (_childChildren !== void 0 && nestedProps === void 0) {
43631
43651
  resolvedProps.children = _childChildren;
@@ -43640,11 +43660,14 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
43640
43660
  // (e.g. form-section inside a stack) can resolve entityDef via
43641
43661
  // the trait's linkedEntity for form-field enrichment. The orbCtx
43642
43662
  // (slot/transition/state/entity) propagates the same way so every
43643
- // nested node carries a complete contextual-edit address.
43644
- ...sourceTrait !== void 0 && { sourceTrait },
43663
+ // nested node carries a complete contextual-edit address. A child
43664
+ // carrying its own `_sourceTrait` (multi-source slot stack) owns it
43665
+ // outright — inheriting the synthetic wrapper's sentinel instead
43666
+ // would erase the real owner.
43667
+ ...childSourceTrait !== void 0 ? { sourceTrait: childSourceTrait } : sourceTrait !== void 0 && { sourceTrait },
43645
43668
  ...orbCtx ?? {}
43646
43669
  };
43647
- return /* @__PURE__ */ jsxRuntime.jsx(
43670
+ const renderedChild = /* @__PURE__ */ jsxRuntime.jsx(
43648
43671
  SlotContentRenderer,
43649
43672
  {
43650
43673
  content: childContent,
@@ -43653,6 +43676,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
43653
43676
  },
43654
43677
  childId
43655
43678
  );
43679
+ return childSourceTrait !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(MaybeTraitScope, { sourceTrait: childSourceTrait, children: renderedChild }, childId) : renderedChild;
43656
43680
  });
43657
43681
  }
43658
43682
  function toDrawableNodes(children) {
@@ -18483,17 +18483,27 @@ function getWeekDays(start) {
18483
18483
  }
18484
18484
  return days;
18485
18485
  }
18486
- function generateDefaultTimeSlots() {
18486
+ function generateDefaultTimeSlots(events2) {
18487
+ let first = DEFAULT_FIRST_HOUR;
18488
+ let last = DEFAULT_LAST_HOUR;
18489
+ for (const ev of events2) {
18490
+ const start = new Date(ev.startTime);
18491
+ if (Number.isNaN(start.getTime())) continue;
18492
+ const hour = start.getHours();
18493
+ if (hour < first) first = hour;
18494
+ if (hour > last) last = hour;
18495
+ }
18487
18496
  const slots = [];
18488
- for (let hour = 9; hour <= 17; hour++) {
18489
- slots.push(`${hour.toString().padStart(2, "0")}:00`);
18497
+ for (let hour = first; hour <= last; hour++) {
18498
+ slots.push(slotLabel(hour));
18490
18499
  }
18491
18500
  return slots;
18492
18501
  }
18493
18502
  function eventInSlot(event, day, slotTime) {
18494
18503
  const eventStart = new Date(event.startTime);
18495
- const [slotHour, slotMinute] = slotTime.split(":").map(Number);
18496
- return eventStart.toDateString() === day.toDateString() && eventStart.getHours() === slotHour && eventStart.getMinutes() === slotMinute;
18504
+ if (Number.isNaN(eventStart.getTime())) return false;
18505
+ const [slotHour] = slotTime.split(":").map(Number);
18506
+ return eventStart.toDateString() === day.toDateString() && eventStart.getHours() === slotHour;
18497
18507
  }
18498
18508
  function CalendarGrid({
18499
18509
  weekStart,
@@ -18522,8 +18532,8 @@ function CalendarGrid({
18522
18532
  [resolvedWeekStart]
18523
18533
  );
18524
18534
  const resolvedTimeSlots = useMemo(
18525
- () => timeSlots ?? generateDefaultTimeSlots(),
18526
- [timeSlots]
18535
+ () => timeSlots ?? generateDefaultTimeSlots(evs),
18536
+ [timeSlots, evs]
18527
18537
  );
18528
18538
  const visibleCount = useDayWindow(dayWindow);
18529
18539
  const [dayOffset, setDayOffset] = useState(0);
@@ -18710,7 +18720,7 @@ function CalendarGrid({
18710
18720
  }
18711
18721
  );
18712
18722
  }
18713
- var SHORT_DATE;
18723
+ var SHORT_DATE, DEFAULT_FIRST_HOUR, DEFAULT_LAST_HOUR, slotLabel;
18714
18724
  var init_CalendarGrid = __esm({
18715
18725
  "components/core/molecules/CalendarGrid.tsx"() {
18716
18726
  "use client";
@@ -18725,6 +18735,9 @@ var init_CalendarGrid = __esm({
18725
18735
  init_useEventBus();
18726
18736
  init_useSwipeGesture();
18727
18737
  SHORT_DATE = { month: "short", day: "numeric" };
18738
+ DEFAULT_FIRST_HOUR = 9;
18739
+ DEFAULT_LAST_HOUR = 17;
18740
+ slotLabel = (hour) => `${hour.toString().padStart(2, "0")}:00`;
18728
18741
  CalendarGrid.displayName = "CalendarGrid";
18729
18742
  }
18730
18743
  });
@@ -43254,6 +43267,13 @@ function MaybeTraitScope({
43254
43267
  if (wrap) {
43255
43268
  return /* @__PURE__ */ jsx(TraitScopeProvider, { orbital, trait: sourceTrait, children });
43256
43269
  }
43270
+ if (sourceTrait !== void 0 && schemaCtx !== null) {
43271
+ scopeWrapLog.warn("decline", {
43272
+ sourceTrait,
43273
+ orbitalsByTraitSize: schemaCtx.orbitalsByTrait.size,
43274
+ reason: "sourceTrait not in orbitalsByTrait \u2014 children render unscoped"
43275
+ });
43276
+ }
43257
43277
  return /* @__PURE__ */ jsx(Fragment, { children });
43258
43278
  }
43259
43279
  function UISlotComponent({
@@ -43551,7 +43571,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
43551
43571
  const childId = `${parentId}-${index}`;
43552
43572
  const childPath = parentPath === "root" ? `root.children.${index}` : `${parentPath}.children.${index}`;
43553
43573
  const childAsRecord = child;
43554
- const { type: _childType, props: nestedProps, _id: _childNodeId, children: _childChildren, ...flatProps } = childAsRecord;
43574
+ const { type: _childType, props: nestedProps, _id: _childNodeId, _sourceTrait: childSourceTrait, children: _childChildren, ...flatProps } = childAsRecord;
43555
43575
  const resolvedProps = nestedProps !== void 0 ? nestedProps : flatProps;
43556
43576
  if (_childChildren !== void 0 && nestedProps === void 0) {
43557
43577
  resolvedProps.children = _childChildren;
@@ -43566,11 +43586,14 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
43566
43586
  // (e.g. form-section inside a stack) can resolve entityDef via
43567
43587
  // the trait's linkedEntity for form-field enrichment. The orbCtx
43568
43588
  // (slot/transition/state/entity) propagates the same way so every
43569
- // nested node carries a complete contextual-edit address.
43570
- ...sourceTrait !== void 0 && { sourceTrait },
43589
+ // nested node carries a complete contextual-edit address. A child
43590
+ // carrying its own `_sourceTrait` (multi-source slot stack) owns it
43591
+ // outright — inheriting the synthetic wrapper's sentinel instead
43592
+ // would erase the real owner.
43593
+ ...childSourceTrait !== void 0 ? { sourceTrait: childSourceTrait } : sourceTrait !== void 0 && { sourceTrait },
43571
43594
  ...orbCtx ?? {}
43572
43595
  };
43573
- return /* @__PURE__ */ jsx(
43596
+ const renderedChild = /* @__PURE__ */ jsx(
43574
43597
  SlotContentRenderer,
43575
43598
  {
43576
43599
  content: childContent,
@@ -43579,6 +43602,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
43579
43602
  },
43580
43603
  childId
43581
43604
  );
43605
+ return childSourceTrait !== void 0 ? /* @__PURE__ */ jsx(MaybeTraitScope, { sourceTrait: childSourceTrait, children: renderedChild }, childId) : renderedChild;
43582
43606
  });
43583
43607
  }
43584
43608
  function toDrawableNodes(children) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "5.125.0",
3
+ "version": "5.126.0",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -231,7 +231,7 @@
231
231
  "@almadar/core": "$@almadar/core"
232
232
  },
233
233
  "scripts": {
234
- "build": "NODE_OPTIONS=--max-old-space-size=8192 tsup",
234
+ "build": "rm -rf dist && NODE_OPTIONS=--max-old-space-size=8192 tsup",
235
235
  "build:watch": "tsup --watch",
236
236
  "typecheck": "tsc --noEmit",
237
237
  "lint": "eslint --no-warn-ignored --max-warnings 0 .",