@almadar/ui 4.10.3 → 4.10.5

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.
@@ -3145,13 +3145,26 @@ function useEventBus() {
3145
3145
  const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
3146
3146
  const scope = useTraitScope();
3147
3147
  return React128.useMemo(() => {
3148
- if (!scope) return baseBus;
3148
+ if (!scope) {
3149
+ return {
3150
+ ...baseBus,
3151
+ emit: (type, payload, source) => {
3152
+ if (typeof type === "string" && type.startsWith("UI:") && !type.slice(3).includes(".")) {
3153
+ scopeLog.warn("emit:bare-key-no-scope", { type });
3154
+ }
3155
+ baseBus.emit(type, payload, source);
3156
+ }
3157
+ };
3158
+ }
3149
3159
  return {
3150
3160
  ...baseBus,
3151
3161
  emit: (type, payload, source) => {
3152
3162
  if (typeof type === "string" && type.startsWith("UI:")) {
3153
3163
  const tail = type.slice(3);
3154
3164
  const qualified = tail.includes(".") ? type : `UI:${scope.orbital}.${scope.trait}.${tail}`;
3165
+ if (qualified !== type) {
3166
+ scopeLog.info("emit:qualified", { from: type, to: qualified, scope });
3167
+ }
3155
3168
  baseBus.emit(qualified, payload, source);
3156
3169
  return;
3157
3170
  }
@@ -3183,7 +3196,7 @@ function useEmitEvent() {
3183
3196
  [eventBus]
3184
3197
  );
3185
3198
  }
3186
- var log, subLog2, fallbackListeners, fallbackAnyListeners, fallbackEventBus, useEventSubscription, useEventBus_default;
3199
+ var log, subLog2, scopeLog, fallbackListeners, fallbackAnyListeners, fallbackEventBus, useEventSubscription, useEventBus_default;
3187
3200
  var init_useEventBus = __esm({
3188
3201
  "hooks/useEventBus.ts"() {
3189
3202
  "use client";
@@ -3192,6 +3205,7 @@ var init_useEventBus = __esm({
3192
3205
  init_logger();
3193
3206
  log = createLogger("almadar:eventbus");
3194
3207
  subLog2 = createLogger("almadar:eventbus:subscribe");
3208
+ scopeLog = createLogger("almadar:ui:trait-scope");
3195
3209
  fallbackListeners = /* @__PURE__ */ new Map();
3196
3210
  fallbackAnyListeners = /* @__PURE__ */ new Set();
3197
3211
  fallbackEventBus = {
@@ -46676,7 +46690,15 @@ function MaybeTraitScope({
46676
46690
  }) {
46677
46691
  const schemaCtx = useEntitySchemaOptional();
46678
46692
  const orbital = sourceTrait !== void 0 && schemaCtx !== null ? schemaCtx.orbitalsByTrait.get(sourceTrait) : void 0;
46679
- if (sourceTrait !== void 0 && orbital !== void 0) {
46693
+ const wrap = sourceTrait !== void 0 && orbital !== void 0;
46694
+ scopeWrapLog.info("decide", {
46695
+ sourceTrait,
46696
+ schemaCtxPresent: schemaCtx !== null,
46697
+ orbitalsByTraitSize: schemaCtx?.orbitalsByTrait.size ?? 0,
46698
+ orbital,
46699
+ wrap
46700
+ });
46701
+ if (wrap) {
46680
46702
  return /* @__PURE__ */ jsxRuntime.jsx(TraitScopeProvider, { orbital, trait: sourceTrait, children });
46681
46703
  }
46682
46704
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
@@ -47161,7 +47183,7 @@ function UISlotRenderer({
47161
47183
  }
47162
47184
  return wrapped;
47163
47185
  }
47164
- var TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
47186
+ var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
47165
47187
  var init_UISlotRenderer = __esm({
47166
47188
  "components/organisms/UISlotRenderer.tsx"() {
47167
47189
  "use client";
@@ -47177,10 +47199,12 @@ var init_UISlotRenderer = __esm({
47177
47199
  init_SlotsContext();
47178
47200
  init_cn();
47179
47201
  init_ErrorBoundary();
47202
+ init_logger();
47180
47203
  init_Skeleton();
47181
47204
  init_renderer();
47182
47205
  init_TraitFrame();
47183
47206
  init_component_registry_generated();
47207
+ scopeWrapLog = createLogger("almadar:ui:scope-wrap");
47184
47208
  TRAIT_BINDING_RE = /^@trait\.([A-Z][A-Za-z0-9]*)$/;
47185
47209
  SuspenseConfigContext = React128.createContext({ enabled: false });
47186
47210
  SlotContainedContext = React128.createContext(false);
package/dist/avl/index.js CHANGED
@@ -3099,13 +3099,26 @@ function useEventBus() {
3099
3099
  const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
3100
3100
  const scope = useTraitScope();
3101
3101
  return useMemo(() => {
3102
- if (!scope) return baseBus;
3102
+ if (!scope) {
3103
+ return {
3104
+ ...baseBus,
3105
+ emit: (type, payload, source) => {
3106
+ if (typeof type === "string" && type.startsWith("UI:") && !type.slice(3).includes(".")) {
3107
+ scopeLog.warn("emit:bare-key-no-scope", { type });
3108
+ }
3109
+ baseBus.emit(type, payload, source);
3110
+ }
3111
+ };
3112
+ }
3103
3113
  return {
3104
3114
  ...baseBus,
3105
3115
  emit: (type, payload, source) => {
3106
3116
  if (typeof type === "string" && type.startsWith("UI:")) {
3107
3117
  const tail = type.slice(3);
3108
3118
  const qualified = tail.includes(".") ? type : `UI:${scope.orbital}.${scope.trait}.${tail}`;
3119
+ if (qualified !== type) {
3120
+ scopeLog.info("emit:qualified", { from: type, to: qualified, scope });
3121
+ }
3109
3122
  baseBus.emit(qualified, payload, source);
3110
3123
  return;
3111
3124
  }
@@ -3137,7 +3150,7 @@ function useEmitEvent() {
3137
3150
  [eventBus]
3138
3151
  );
3139
3152
  }
3140
- var log, subLog2, fallbackListeners, fallbackAnyListeners, fallbackEventBus, useEventSubscription, useEventBus_default;
3153
+ var log, subLog2, scopeLog, fallbackListeners, fallbackAnyListeners, fallbackEventBus, useEventSubscription, useEventBus_default;
3141
3154
  var init_useEventBus = __esm({
3142
3155
  "hooks/useEventBus.ts"() {
3143
3156
  "use client";
@@ -3146,6 +3159,7 @@ var init_useEventBus = __esm({
3146
3159
  init_logger();
3147
3160
  log = createLogger("almadar:eventbus");
3148
3161
  subLog2 = createLogger("almadar:eventbus:subscribe");
3162
+ scopeLog = createLogger("almadar:ui:trait-scope");
3149
3163
  fallbackListeners = /* @__PURE__ */ new Map();
3150
3164
  fallbackAnyListeners = /* @__PURE__ */ new Set();
3151
3165
  fallbackEventBus = {
@@ -46630,7 +46644,15 @@ function MaybeTraitScope({
46630
46644
  }) {
46631
46645
  const schemaCtx = useEntitySchemaOptional();
46632
46646
  const orbital = sourceTrait !== void 0 && schemaCtx !== null ? schemaCtx.orbitalsByTrait.get(sourceTrait) : void 0;
46633
- if (sourceTrait !== void 0 && orbital !== void 0) {
46647
+ const wrap = sourceTrait !== void 0 && orbital !== void 0;
46648
+ scopeWrapLog.info("decide", {
46649
+ sourceTrait,
46650
+ schemaCtxPresent: schemaCtx !== null,
46651
+ orbitalsByTraitSize: schemaCtx?.orbitalsByTrait.size ?? 0,
46652
+ orbital,
46653
+ wrap
46654
+ });
46655
+ if (wrap) {
46634
46656
  return /* @__PURE__ */ jsx(TraitScopeProvider, { orbital, trait: sourceTrait, children });
46635
46657
  }
46636
46658
  return /* @__PURE__ */ jsx(Fragment, { children });
@@ -47115,7 +47137,7 @@ function UISlotRenderer({
47115
47137
  }
47116
47138
  return wrapped;
47117
47139
  }
47118
- var TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
47140
+ var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
47119
47141
  var init_UISlotRenderer = __esm({
47120
47142
  "components/organisms/UISlotRenderer.tsx"() {
47121
47143
  "use client";
@@ -47131,10 +47153,12 @@ var init_UISlotRenderer = __esm({
47131
47153
  init_SlotsContext();
47132
47154
  init_cn();
47133
47155
  init_ErrorBoundary();
47156
+ init_logger();
47134
47157
  init_Skeleton();
47135
47158
  init_renderer();
47136
47159
  init_TraitFrame();
47137
47160
  init_component_registry_generated();
47161
+ scopeWrapLog = createLogger("almadar:ui:scope-wrap");
47138
47162
  TRAIT_BINDING_RE = /^@trait\.([A-Z][A-Za-z0-9]*)$/;
47139
47163
  SuspenseConfigContext = createContext({ enabled: false });
47140
47164
  SlotContainedContext = createContext(false);
@@ -192,13 +192,26 @@ function useEventBus() {
192
192
  const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
193
193
  const scope = providers.useTraitScope();
194
194
  return React111.useMemo(() => {
195
- if (!scope) return baseBus;
195
+ if (!scope) {
196
+ return {
197
+ ...baseBus,
198
+ emit: (type, payload, source) => {
199
+ if (typeof type === "string" && type.startsWith("UI:") && !type.slice(3).includes(".")) {
200
+ scopeLog.warn("emit:bare-key-no-scope", { type });
201
+ }
202
+ baseBus.emit(type, payload, source);
203
+ }
204
+ };
205
+ }
196
206
  return {
197
207
  ...baseBus,
198
208
  emit: (type, payload, source) => {
199
209
  if (typeof type === "string" && type.startsWith("UI:")) {
200
210
  const tail = type.slice(3);
201
211
  const qualified = tail.includes(".") ? type : `UI:${scope.orbital}.${scope.trait}.${tail}`;
212
+ if (qualified !== type) {
213
+ scopeLog.info("emit:qualified", { from: type, to: qualified, scope });
214
+ }
202
215
  baseBus.emit(qualified, payload, source);
203
216
  return;
204
217
  }
@@ -230,13 +243,14 @@ function useEmitEvent() {
230
243
  [eventBus]
231
244
  );
232
245
  }
233
- var log, subLog, fallbackListeners, fallbackAnyListeners, fallbackEventBus, useEventSubscription, useEventBus_default;
246
+ var log, subLog, scopeLog, fallbackListeners, fallbackAnyListeners, fallbackEventBus, useEventSubscription, useEventBus_default;
234
247
  var init_useEventBus = __esm({
235
248
  "hooks/useEventBus.ts"() {
236
249
  "use client";
237
250
  init_logger();
238
251
  log = createLogger("almadar:eventbus");
239
252
  subLog = createLogger("almadar:eventbus:subscribe");
253
+ scopeLog = createLogger("almadar:ui:trait-scope");
240
254
  fallbackListeners = /* @__PURE__ */ new Map();
241
255
  fallbackAnyListeners = /* @__PURE__ */ new Set();
242
256
  fallbackEventBus = {
@@ -37363,7 +37377,15 @@ function MaybeTraitScope({
37363
37377
  }) {
37364
37378
  const schemaCtx = useEntitySchemaOptional();
37365
37379
  const orbital = sourceTrait !== void 0 && schemaCtx !== null ? schemaCtx.orbitalsByTrait.get(sourceTrait) : void 0;
37366
- if (sourceTrait !== void 0 && orbital !== void 0) {
37380
+ const wrap = sourceTrait !== void 0 && orbital !== void 0;
37381
+ scopeWrapLog.info("decide", {
37382
+ sourceTrait,
37383
+ schemaCtxPresent: schemaCtx !== null,
37384
+ orbitalsByTraitSize: schemaCtx?.orbitalsByTrait.size ?? 0,
37385
+ orbital,
37386
+ wrap
37387
+ });
37388
+ if (wrap) {
37367
37389
  return /* @__PURE__ */ jsxRuntime.jsx(providers.TraitScopeProvider, { orbital, trait: sourceTrait, children });
37368
37390
  }
37369
37391
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
@@ -37848,7 +37870,7 @@ function UISlotRenderer({
37848
37870
  }
37849
37871
  return wrapped;
37850
37872
  }
37851
- var TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
37873
+ var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
37852
37874
  var init_UISlotRenderer = __esm({
37853
37875
  "components/organisms/UISlotRenderer.tsx"() {
37854
37876
  "use client";
@@ -37862,10 +37884,12 @@ var init_UISlotRenderer = __esm({
37862
37884
  init_SlotsContext();
37863
37885
  init_cn();
37864
37886
  init_ErrorBoundary();
37887
+ init_logger();
37865
37888
  init_Skeleton();
37866
37889
  init_renderer();
37867
37890
  init_TraitFrame();
37868
37891
  init_component_registry_generated();
37892
+ scopeWrapLog = createLogger("almadar:ui:scope-wrap");
37869
37893
  TRAIT_BINDING_RE = /^@trait\.([A-Z][A-Za-z0-9]*)$/;
37870
37894
  SuspenseConfigContext = React111.createContext({ enabled: false });
37871
37895
  SlotContainedContext = React111.createContext(false);
@@ -147,13 +147,26 @@ function useEventBus() {
147
147
  const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
148
148
  const scope = useTraitScope();
149
149
  return useMemo(() => {
150
- if (!scope) return baseBus;
150
+ if (!scope) {
151
+ return {
152
+ ...baseBus,
153
+ emit: (type, payload, source) => {
154
+ if (typeof type === "string" && type.startsWith("UI:") && !type.slice(3).includes(".")) {
155
+ scopeLog.warn("emit:bare-key-no-scope", { type });
156
+ }
157
+ baseBus.emit(type, payload, source);
158
+ }
159
+ };
160
+ }
151
161
  return {
152
162
  ...baseBus,
153
163
  emit: (type, payload, source) => {
154
164
  if (typeof type === "string" && type.startsWith("UI:")) {
155
165
  const tail = type.slice(3);
156
166
  const qualified = tail.includes(".") ? type : `UI:${scope.orbital}.${scope.trait}.${tail}`;
167
+ if (qualified !== type) {
168
+ scopeLog.info("emit:qualified", { from: type, to: qualified, scope });
169
+ }
157
170
  baseBus.emit(qualified, payload, source);
158
171
  return;
159
172
  }
@@ -185,13 +198,14 @@ function useEmitEvent() {
185
198
  [eventBus]
186
199
  );
187
200
  }
188
- var log, subLog, fallbackListeners, fallbackAnyListeners, fallbackEventBus, useEventSubscription, useEventBus_default;
201
+ var log, subLog, scopeLog, fallbackListeners, fallbackAnyListeners, fallbackEventBus, useEventSubscription, useEventBus_default;
189
202
  var init_useEventBus = __esm({
190
203
  "hooks/useEventBus.ts"() {
191
204
  "use client";
192
205
  init_logger();
193
206
  log = createLogger("almadar:eventbus");
194
207
  subLog = createLogger("almadar:eventbus:subscribe");
208
+ scopeLog = createLogger("almadar:ui:trait-scope");
195
209
  fallbackListeners = /* @__PURE__ */ new Map();
196
210
  fallbackAnyListeners = /* @__PURE__ */ new Set();
197
211
  fallbackEventBus = {
@@ -37318,7 +37332,15 @@ function MaybeTraitScope({
37318
37332
  }) {
37319
37333
  const schemaCtx = useEntitySchemaOptional();
37320
37334
  const orbital = sourceTrait !== void 0 && schemaCtx !== null ? schemaCtx.orbitalsByTrait.get(sourceTrait) : void 0;
37321
- if (sourceTrait !== void 0 && orbital !== void 0) {
37335
+ const wrap = sourceTrait !== void 0 && orbital !== void 0;
37336
+ scopeWrapLog.info("decide", {
37337
+ sourceTrait,
37338
+ schemaCtxPresent: schemaCtx !== null,
37339
+ orbitalsByTraitSize: schemaCtx?.orbitalsByTrait.size ?? 0,
37340
+ orbital,
37341
+ wrap
37342
+ });
37343
+ if (wrap) {
37322
37344
  return /* @__PURE__ */ jsx(TraitScopeProvider, { orbital, trait: sourceTrait, children });
37323
37345
  }
37324
37346
  return /* @__PURE__ */ jsx(Fragment, { children });
@@ -37803,7 +37825,7 @@ function UISlotRenderer({
37803
37825
  }
37804
37826
  return wrapped;
37805
37827
  }
37806
- var TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
37828
+ var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
37807
37829
  var init_UISlotRenderer = __esm({
37808
37830
  "components/organisms/UISlotRenderer.tsx"() {
37809
37831
  "use client";
@@ -37817,10 +37839,12 @@ var init_UISlotRenderer = __esm({
37817
37839
  init_SlotsContext();
37818
37840
  init_cn();
37819
37841
  init_ErrorBoundary();
37842
+ init_logger();
37820
37843
  init_Skeleton();
37821
37844
  init_renderer();
37822
37845
  init_TraitFrame();
37823
37846
  init_component_registry_generated();
37847
+ scopeWrapLog = createLogger("almadar:ui:scope-wrap");
37824
37848
  TRAIT_BINDING_RE = /^@trait\.([A-Z][A-Za-z0-9]*)$/;
37825
37849
  SuspenseConfigContext = createContext({ enabled: false });
37826
37850
  SlotContainedContext = createContext(false);
@@ -1427,6 +1427,7 @@ function createLogger(namespace) {
1427
1427
  // hooks/useEventBus.ts
1428
1428
  var log = createLogger("almadar:eventbus");
1429
1429
  var subLog = createLogger("almadar:eventbus:subscribe");
1430
+ var scopeLog = createLogger("almadar:ui:trait-scope");
1430
1431
  function getGlobalEventBus() {
1431
1432
  if (typeof window !== "undefined") {
1432
1433
  return window.__kflowEventBus ?? null;
@@ -1502,13 +1503,26 @@ function useEventBus() {
1502
1503
  const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
1503
1504
  const scope = providers.useTraitScope();
1504
1505
  return React21.useMemo(() => {
1505
- if (!scope) return baseBus;
1506
+ if (!scope) {
1507
+ return {
1508
+ ...baseBus,
1509
+ emit: (type, payload, source) => {
1510
+ if (typeof type === "string" && type.startsWith("UI:") && !type.slice(3).includes(".")) {
1511
+ scopeLog.warn("emit:bare-key-no-scope", { type });
1512
+ }
1513
+ baseBus.emit(type, payload, source);
1514
+ }
1515
+ };
1516
+ }
1506
1517
  return {
1507
1518
  ...baseBus,
1508
1519
  emit: (type, payload, source) => {
1509
1520
  if (typeof type === "string" && type.startsWith("UI:")) {
1510
1521
  const tail = type.slice(3);
1511
1522
  const qualified = tail.includes(".") ? type : `UI:${scope.orbital}.${scope.trait}.${tail}`;
1523
+ if (qualified !== type) {
1524
+ scopeLog.info("emit:qualified", { from: type, to: qualified, scope });
1525
+ }
1512
1526
  baseBus.emit(qualified, payload, source);
1513
1527
  return;
1514
1528
  }
@@ -1403,6 +1403,7 @@ function createLogger(namespace) {
1403
1403
  // hooks/useEventBus.ts
1404
1404
  var log = createLogger("almadar:eventbus");
1405
1405
  var subLog = createLogger("almadar:eventbus:subscribe");
1406
+ var scopeLog = createLogger("almadar:ui:trait-scope");
1406
1407
  function getGlobalEventBus() {
1407
1408
  if (typeof window !== "undefined") {
1408
1409
  return window.__kflowEventBus ?? null;
@@ -1478,13 +1479,26 @@ function useEventBus() {
1478
1479
  const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
1479
1480
  const scope = useTraitScope();
1480
1481
  return useMemo(() => {
1481
- if (!scope) return baseBus;
1482
+ if (!scope) {
1483
+ return {
1484
+ ...baseBus,
1485
+ emit: (type, payload, source) => {
1486
+ if (typeof type === "string" && type.startsWith("UI:") && !type.slice(3).includes(".")) {
1487
+ scopeLog.warn("emit:bare-key-no-scope", { type });
1488
+ }
1489
+ baseBus.emit(type, payload, source);
1490
+ }
1491
+ };
1492
+ }
1482
1493
  return {
1483
1494
  ...baseBus,
1484
1495
  emit: (type, payload, source) => {
1485
1496
  if (typeof type === "string" && type.startsWith("UI:")) {
1486
1497
  const tail = type.slice(3);
1487
1498
  const qualified = tail.includes(".") ? type : `UI:${scope.orbital}.${scope.trait}.${tail}`;
1499
+ if (qualified !== type) {
1500
+ scopeLog.info("emit:qualified", { from: type, to: qualified, scope });
1501
+ }
1488
1502
  baseBus.emit(qualified, payload, source);
1489
1503
  return;
1490
1504
  }
@@ -2565,6 +2565,7 @@ function useTraitScope() {
2565
2565
  // hooks/useEventBus.ts
2566
2566
  var log = createLogger("almadar:eventbus");
2567
2567
  var subLog2 = createLogger("almadar:eventbus:subscribe");
2568
+ var scopeLog = createLogger("almadar:ui:trait-scope");
2568
2569
  function getGlobalEventBus() {
2569
2570
  if (typeof window !== "undefined") {
2570
2571
  return window.__kflowEventBus ?? null;
@@ -2640,13 +2641,26 @@ function useEventBus() {
2640
2641
  const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
2641
2642
  const scope = useTraitScope();
2642
2643
  return React5.useMemo(() => {
2643
- if (!scope) return baseBus;
2644
+ if (!scope) {
2645
+ return {
2646
+ ...baseBus,
2647
+ emit: (type, payload, source) => {
2648
+ if (typeof type === "string" && type.startsWith("UI:") && !type.slice(3).includes(".")) {
2649
+ scopeLog.warn("emit:bare-key-no-scope", { type });
2650
+ }
2651
+ baseBus.emit(type, payload, source);
2652
+ }
2653
+ };
2654
+ }
2644
2655
  return {
2645
2656
  ...baseBus,
2646
2657
  emit: (type, payload, source) => {
2647
2658
  if (typeof type === "string" && type.startsWith("UI:")) {
2648
2659
  const tail = type.slice(3);
2649
2660
  const qualified = tail.includes(".") ? type : `UI:${scope.orbital}.${scope.trait}.${tail}`;
2661
+ if (qualified !== type) {
2662
+ scopeLog.info("emit:qualified", { from: type, to: qualified, scope });
2663
+ }
2650
2664
  baseBus.emit(qualified, payload, source);
2651
2665
  return;
2652
2666
  }
@@ -2541,6 +2541,7 @@ function useTraitScope() {
2541
2541
  // hooks/useEventBus.ts
2542
2542
  var log = createLogger("almadar:eventbus");
2543
2543
  var subLog2 = createLogger("almadar:eventbus:subscribe");
2544
+ var scopeLog = createLogger("almadar:ui:trait-scope");
2544
2545
  function getGlobalEventBus() {
2545
2546
  if (typeof window !== "undefined") {
2546
2547
  return window.__kflowEventBus ?? null;
@@ -2616,13 +2617,26 @@ function useEventBus() {
2616
2617
  const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
2617
2618
  const scope = useTraitScope();
2618
2619
  return useMemo(() => {
2619
- if (!scope) return baseBus;
2620
+ if (!scope) {
2621
+ return {
2622
+ ...baseBus,
2623
+ emit: (type, payload, source) => {
2624
+ if (typeof type === "string" && type.startsWith("UI:") && !type.slice(3).includes(".")) {
2625
+ scopeLog.warn("emit:bare-key-no-scope", { type });
2626
+ }
2627
+ baseBus.emit(type, payload, source);
2628
+ }
2629
+ };
2630
+ }
2620
2631
  return {
2621
2632
  ...baseBus,
2622
2633
  emit: (type, payload, source) => {
2623
2634
  if (typeof type === "string" && type.startsWith("UI:")) {
2624
2635
  const tail = type.slice(3);
2625
2636
  const qualified = tail.includes(".") ? type : `UI:${scope.orbital}.${scope.trait}.${tail}`;
2637
+ if (qualified !== type) {
2638
+ scopeLog.info("emit:qualified", { from: type, to: qualified, scope });
2639
+ }
2626
2640
  baseBus.emit(qualified, payload, source);
2627
2641
  return;
2628
2642
  }
@@ -919,6 +919,7 @@ function createLogger(namespace) {
919
919
  // hooks/useEventBus.ts
920
920
  var log = createLogger("almadar:eventbus");
921
921
  var subLog = createLogger("almadar:eventbus:subscribe");
922
+ var scopeLog = createLogger("almadar:ui:trait-scope");
922
923
  function getGlobalEventBus() {
923
924
  if (typeof window !== "undefined") {
924
925
  return window.__kflowEventBus ?? null;
@@ -994,13 +995,26 @@ function useEventBus() {
994
995
  const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
995
996
  const scope = providers.useTraitScope();
996
997
  return react.useMemo(() => {
997
- if (!scope) return baseBus;
998
+ if (!scope) {
999
+ return {
1000
+ ...baseBus,
1001
+ emit: (type, payload, source) => {
1002
+ if (typeof type === "string" && type.startsWith("UI:") && !type.slice(3).includes(".")) {
1003
+ scopeLog.warn("emit:bare-key-no-scope", { type });
1004
+ }
1005
+ baseBus.emit(type, payload, source);
1006
+ }
1007
+ };
1008
+ }
998
1009
  return {
999
1010
  ...baseBus,
1000
1011
  emit: (type, payload, source) => {
1001
1012
  if (typeof type === "string" && type.startsWith("UI:")) {
1002
1013
  const tail = type.slice(3);
1003
1014
  const qualified = tail.includes(".") ? type : `UI:${scope.orbital}.${scope.trait}.${tail}`;
1015
+ if (qualified !== type) {
1016
+ scopeLog.info("emit:qualified", { from: type, to: qualified, scope });
1017
+ }
1004
1018
  baseBus.emit(qualified, payload, source);
1005
1019
  return;
1006
1020
  }
@@ -917,6 +917,7 @@ function createLogger(namespace) {
917
917
  // hooks/useEventBus.ts
918
918
  var log = createLogger("almadar:eventbus");
919
919
  var subLog = createLogger("almadar:eventbus:subscribe");
920
+ var scopeLog = createLogger("almadar:ui:trait-scope");
920
921
  function getGlobalEventBus() {
921
922
  if (typeof window !== "undefined") {
922
923
  return window.__kflowEventBus ?? null;
@@ -992,13 +993,26 @@ function useEventBus() {
992
993
  const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
993
994
  const scope = useTraitScope();
994
995
  return useMemo(() => {
995
- if (!scope) return baseBus;
996
+ if (!scope) {
997
+ return {
998
+ ...baseBus,
999
+ emit: (type, payload, source) => {
1000
+ if (typeof type === "string" && type.startsWith("UI:") && !type.slice(3).includes(".")) {
1001
+ scopeLog.warn("emit:bare-key-no-scope", { type });
1002
+ }
1003
+ baseBus.emit(type, payload, source);
1004
+ }
1005
+ };
1006
+ }
996
1007
  return {
997
1008
  ...baseBus,
998
1009
  emit: (type, payload, source) => {
999
1010
  if (typeof type === "string" && type.startsWith("UI:")) {
1000
1011
  const tail = type.slice(3);
1001
1012
  const qualified = tail.includes(".") ? type : `UI:${scope.orbital}.${scope.trait}.${tail}`;
1013
+ if (qualified !== type) {
1014
+ scopeLog.info("emit:qualified", { from: type, to: qualified, scope });
1015
+ }
1002
1016
  baseBus.emit(qualified, payload, source);
1003
1017
  return;
1004
1018
  }
@@ -2565,6 +2565,7 @@ function useTraitScope() {
2565
2565
  // hooks/useEventBus.ts
2566
2566
  var log = createLogger("almadar:eventbus");
2567
2567
  var subLog2 = createLogger("almadar:eventbus:subscribe");
2568
+ var scopeLog = createLogger("almadar:ui:trait-scope");
2568
2569
  function getGlobalEventBus() {
2569
2570
  if (typeof window !== "undefined") {
2570
2571
  return window.__kflowEventBus ?? null;
@@ -2640,13 +2641,26 @@ function useEventBus() {
2640
2641
  const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
2641
2642
  const scope = useTraitScope();
2642
2643
  return React6.useMemo(() => {
2643
- if (!scope) return baseBus;
2644
+ if (!scope) {
2645
+ return {
2646
+ ...baseBus,
2647
+ emit: (type, payload, source) => {
2648
+ if (typeof type === "string" && type.startsWith("UI:") && !type.slice(3).includes(".")) {
2649
+ scopeLog.warn("emit:bare-key-no-scope", { type });
2650
+ }
2651
+ baseBus.emit(type, payload, source);
2652
+ }
2653
+ };
2654
+ }
2644
2655
  return {
2645
2656
  ...baseBus,
2646
2657
  emit: (type, payload, source) => {
2647
2658
  if (typeof type === "string" && type.startsWith("UI:")) {
2648
2659
  const tail = type.slice(3);
2649
2660
  const qualified = tail.includes(".") ? type : `UI:${scope.orbital}.${scope.trait}.${tail}`;
2661
+ if (qualified !== type) {
2662
+ scopeLog.info("emit:qualified", { from: type, to: qualified, scope });
2663
+ }
2650
2664
  baseBus.emit(qualified, payload, source);
2651
2665
  return;
2652
2666
  }
@@ -2541,6 +2541,7 @@ function useTraitScope() {
2541
2541
  // hooks/useEventBus.ts
2542
2542
  var log = createLogger("almadar:eventbus");
2543
2543
  var subLog2 = createLogger("almadar:eventbus:subscribe");
2544
+ var scopeLog = createLogger("almadar:ui:trait-scope");
2544
2545
  function getGlobalEventBus() {
2545
2546
  if (typeof window !== "undefined") {
2546
2547
  return window.__kflowEventBus ?? null;
@@ -2616,13 +2617,26 @@ function useEventBus() {
2616
2617
  const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
2617
2618
  const scope = useTraitScope();
2618
2619
  return useMemo(() => {
2619
- if (!scope) return baseBus;
2620
+ if (!scope) {
2621
+ return {
2622
+ ...baseBus,
2623
+ emit: (type, payload, source) => {
2624
+ if (typeof type === "string" && type.startsWith("UI:") && !type.slice(3).includes(".")) {
2625
+ scopeLog.warn("emit:bare-key-no-scope", { type });
2626
+ }
2627
+ baseBus.emit(type, payload, source);
2628
+ }
2629
+ };
2630
+ }
2620
2631
  return {
2621
2632
  ...baseBus,
2622
2633
  emit: (type, payload, source) => {
2623
2634
  if (typeof type === "string" && type.startsWith("UI:")) {
2624
2635
  const tail = type.slice(3);
2625
2636
  const qualified = tail.includes(".") ? type : `UI:${scope.orbital}.${scope.trait}.${tail}`;
2637
+ if (qualified !== type) {
2638
+ scopeLog.info("emit:qualified", { from: type, to: qualified, scope });
2639
+ }
2626
2640
  baseBus.emit(qualified, payload, source);
2627
2641
  return;
2628
2642
  }
@@ -439,13 +439,26 @@ function useEventBus() {
439
439
  const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
440
440
  const scope = providers.useTraitScope();
441
441
  return React116.useMemo(() => {
442
- if (!scope) return baseBus;
442
+ if (!scope) {
443
+ return {
444
+ ...baseBus,
445
+ emit: (type, payload, source) => {
446
+ if (typeof type === "string" && type.startsWith("UI:") && !type.slice(3).includes(".")) {
447
+ scopeLog.warn("emit:bare-key-no-scope", { type });
448
+ }
449
+ baseBus.emit(type, payload, source);
450
+ }
451
+ };
452
+ }
443
453
  return {
444
454
  ...baseBus,
445
455
  emit: (type, payload, source) => {
446
456
  if (typeof type === "string" && type.startsWith("UI:")) {
447
457
  const tail = type.slice(3);
448
458
  const qualified = tail.includes(".") ? type : `UI:${scope.orbital}.${scope.trait}.${tail}`;
459
+ if (qualified !== type) {
460
+ scopeLog.info("emit:qualified", { from: type, to: qualified, scope });
461
+ }
449
462
  baseBus.emit(qualified, payload, source);
450
463
  return;
451
464
  }
@@ -477,13 +490,14 @@ function useEmitEvent() {
477
490
  [eventBus]
478
491
  );
479
492
  }
480
- var log, subLog, fallbackListeners, fallbackAnyListeners, fallbackEventBus, useEventSubscription, useEventBus_default;
493
+ var log, subLog, scopeLog, fallbackListeners, fallbackAnyListeners, fallbackEventBus, useEventSubscription, useEventBus_default;
481
494
  var init_useEventBus = __esm({
482
495
  "hooks/useEventBus.ts"() {
483
496
  "use client";
484
497
  init_logger();
485
498
  log = createLogger("almadar:eventbus");
486
499
  subLog = createLogger("almadar:eventbus:subscribe");
500
+ scopeLog = createLogger("almadar:ui:trait-scope");
487
501
  fallbackListeners = /* @__PURE__ */ new Map();
488
502
  fallbackAnyListeners = /* @__PURE__ */ new Set();
489
503
  fallbackEventBus = {
@@ -37876,7 +37890,15 @@ function MaybeTraitScope({
37876
37890
  }) {
37877
37891
  const schemaCtx = useEntitySchemaOptional();
37878
37892
  const orbital = sourceTrait !== void 0 && schemaCtx !== null ? schemaCtx.orbitalsByTrait.get(sourceTrait) : void 0;
37879
- if (sourceTrait !== void 0 && orbital !== void 0) {
37893
+ const wrap = sourceTrait !== void 0 && orbital !== void 0;
37894
+ scopeWrapLog.info("decide", {
37895
+ sourceTrait,
37896
+ schemaCtxPresent: schemaCtx !== null,
37897
+ orbitalsByTraitSize: schemaCtx?.orbitalsByTrait.size ?? 0,
37898
+ orbital,
37899
+ wrap
37900
+ });
37901
+ if (wrap) {
37880
37902
  return /* @__PURE__ */ jsxRuntime.jsx(providers.TraitScopeProvider, { orbital, trait: sourceTrait, children });
37881
37903
  }
37882
37904
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
@@ -38361,7 +38383,7 @@ function UISlotRenderer({
38361
38383
  }
38362
38384
  return wrapped;
38363
38385
  }
38364
- var TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
38386
+ var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
38365
38387
  var init_UISlotRenderer = __esm({
38366
38388
  "components/organisms/UISlotRenderer.tsx"() {
38367
38389
  "use client";
@@ -38375,10 +38397,12 @@ var init_UISlotRenderer = __esm({
38375
38397
  init_SlotsContext();
38376
38398
  init_cn();
38377
38399
  init_ErrorBoundary();
38400
+ init_logger();
38378
38401
  init_Skeleton();
38379
38402
  init_renderer();
38380
38403
  init_TraitFrame();
38381
38404
  init_component_registry_generated();
38405
+ scopeWrapLog = createLogger("almadar:ui:scope-wrap");
38382
38406
  TRAIT_BINDING_RE = /^@trait\.([A-Z][A-Za-z0-9]*)$/;
38383
38407
  SuspenseConfigContext = React116.createContext({ enabled: false });
38384
38408
  SlotContainedContext = React116.createContext(false);
@@ -394,13 +394,26 @@ function useEventBus() {
394
394
  const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
395
395
  const scope = useTraitScope();
396
396
  return useMemo(() => {
397
- if (!scope) return baseBus;
397
+ if (!scope) {
398
+ return {
399
+ ...baseBus,
400
+ emit: (type, payload, source) => {
401
+ if (typeof type === "string" && type.startsWith("UI:") && !type.slice(3).includes(".")) {
402
+ scopeLog.warn("emit:bare-key-no-scope", { type });
403
+ }
404
+ baseBus.emit(type, payload, source);
405
+ }
406
+ };
407
+ }
398
408
  return {
399
409
  ...baseBus,
400
410
  emit: (type, payload, source) => {
401
411
  if (typeof type === "string" && type.startsWith("UI:")) {
402
412
  const tail = type.slice(3);
403
413
  const qualified = tail.includes(".") ? type : `UI:${scope.orbital}.${scope.trait}.${tail}`;
414
+ if (qualified !== type) {
415
+ scopeLog.info("emit:qualified", { from: type, to: qualified, scope });
416
+ }
404
417
  baseBus.emit(qualified, payload, source);
405
418
  return;
406
419
  }
@@ -432,13 +445,14 @@ function useEmitEvent() {
432
445
  [eventBus]
433
446
  );
434
447
  }
435
- var log, subLog, fallbackListeners, fallbackAnyListeners, fallbackEventBus, useEventSubscription, useEventBus_default;
448
+ var log, subLog, scopeLog, fallbackListeners, fallbackAnyListeners, fallbackEventBus, useEventSubscription, useEventBus_default;
436
449
  var init_useEventBus = __esm({
437
450
  "hooks/useEventBus.ts"() {
438
451
  "use client";
439
452
  init_logger();
440
453
  log = createLogger("almadar:eventbus");
441
454
  subLog = createLogger("almadar:eventbus:subscribe");
455
+ scopeLog = createLogger("almadar:ui:trait-scope");
442
456
  fallbackListeners = /* @__PURE__ */ new Map();
443
457
  fallbackAnyListeners = /* @__PURE__ */ new Set();
444
458
  fallbackEventBus = {
@@ -37831,7 +37845,15 @@ function MaybeTraitScope({
37831
37845
  }) {
37832
37846
  const schemaCtx = useEntitySchemaOptional();
37833
37847
  const orbital = sourceTrait !== void 0 && schemaCtx !== null ? schemaCtx.orbitalsByTrait.get(sourceTrait) : void 0;
37834
- if (sourceTrait !== void 0 && orbital !== void 0) {
37848
+ const wrap = sourceTrait !== void 0 && orbital !== void 0;
37849
+ scopeWrapLog.info("decide", {
37850
+ sourceTrait,
37851
+ schemaCtxPresent: schemaCtx !== null,
37852
+ orbitalsByTraitSize: schemaCtx?.orbitalsByTrait.size ?? 0,
37853
+ orbital,
37854
+ wrap
37855
+ });
37856
+ if (wrap) {
37835
37857
  return /* @__PURE__ */ jsx(TraitScopeProvider, { orbital, trait: sourceTrait, children });
37836
37858
  }
37837
37859
  return /* @__PURE__ */ jsx(Fragment, { children });
@@ -38316,7 +38338,7 @@ function UISlotRenderer({
38316
38338
  }
38317
38339
  return wrapped;
38318
38340
  }
38319
- var TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
38341
+ var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
38320
38342
  var init_UISlotRenderer = __esm({
38321
38343
  "components/organisms/UISlotRenderer.tsx"() {
38322
38344
  "use client";
@@ -38330,10 +38352,12 @@ var init_UISlotRenderer = __esm({
38330
38352
  init_SlotsContext();
38331
38353
  init_cn();
38332
38354
  init_ErrorBoundary();
38355
+ init_logger();
38333
38356
  init_Skeleton();
38334
38357
  init_renderer();
38335
38358
  init_TraitFrame();
38336
38359
  init_component_registry_generated();
38360
+ scopeWrapLog = createLogger("almadar:ui:scope-wrap");
38337
38361
  TRAIT_BINDING_RE = /^@trait\.([A-Z][A-Za-z0-9]*)$/;
38338
38362
  SuspenseConfigContext = createContext({ enabled: false });
38339
38363
  SlotContainedContext = createContext(false);
@@ -186,13 +186,26 @@ function useEventBus() {
186
186
  const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
187
187
  const scope = providers.useTraitScope();
188
188
  return React115.useMemo(() => {
189
- if (!scope) return baseBus;
189
+ if (!scope) {
190
+ return {
191
+ ...baseBus,
192
+ emit: (type, payload, source) => {
193
+ if (typeof type === "string" && type.startsWith("UI:") && !type.slice(3).includes(".")) {
194
+ scopeLog.warn("emit:bare-key-no-scope", { type });
195
+ }
196
+ baseBus.emit(type, payload, source);
197
+ }
198
+ };
199
+ }
190
200
  return {
191
201
  ...baseBus,
192
202
  emit: (type, payload, source) => {
193
203
  if (typeof type === "string" && type.startsWith("UI:")) {
194
204
  const tail = type.slice(3);
195
205
  const qualified = tail.includes(".") ? type : `UI:${scope.orbital}.${scope.trait}.${tail}`;
206
+ if (qualified !== type) {
207
+ scopeLog.info("emit:qualified", { from: type, to: qualified, scope });
208
+ }
196
209
  baseBus.emit(qualified, payload, source);
197
210
  return;
198
211
  }
@@ -224,13 +237,14 @@ function useEmitEvent() {
224
237
  [eventBus]
225
238
  );
226
239
  }
227
- var log, subLog, fallbackListeners, fallbackAnyListeners, fallbackEventBus, useEventSubscription, useEventBus_default;
240
+ var log, subLog, scopeLog, fallbackListeners, fallbackAnyListeners, fallbackEventBus, useEventSubscription, useEventBus_default;
228
241
  var init_useEventBus = __esm({
229
242
  "hooks/useEventBus.ts"() {
230
243
  "use client";
231
244
  init_logger();
232
245
  log = createLogger("almadar:eventbus");
233
246
  subLog = createLogger("almadar:eventbus:subscribe");
247
+ scopeLog = createLogger("almadar:ui:trait-scope");
234
248
  fallbackListeners = /* @__PURE__ */ new Map();
235
249
  fallbackAnyListeners = /* @__PURE__ */ new Set();
236
250
  fallbackEventBus = {
@@ -37563,7 +37577,15 @@ function MaybeTraitScope({
37563
37577
  }) {
37564
37578
  const schemaCtx = useEntitySchemaOptional();
37565
37579
  const orbital = sourceTrait !== void 0 && schemaCtx !== null ? schemaCtx.orbitalsByTrait.get(sourceTrait) : void 0;
37566
- if (sourceTrait !== void 0 && orbital !== void 0) {
37580
+ const wrap = sourceTrait !== void 0 && orbital !== void 0;
37581
+ scopeWrapLog.info("decide", {
37582
+ sourceTrait,
37583
+ schemaCtxPresent: schemaCtx !== null,
37584
+ orbitalsByTraitSize: schemaCtx?.orbitalsByTrait.size ?? 0,
37585
+ orbital,
37586
+ wrap
37587
+ });
37588
+ if (wrap) {
37567
37589
  return /* @__PURE__ */ jsxRuntime.jsx(providers.TraitScopeProvider, { orbital, trait: sourceTrait, children });
37568
37590
  }
37569
37591
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
@@ -38048,7 +38070,7 @@ function UISlotRenderer({
38048
38070
  }
38049
38071
  return wrapped;
38050
38072
  }
38051
- var TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
38073
+ var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
38052
38074
  var init_UISlotRenderer = __esm({
38053
38075
  "components/organisms/UISlotRenderer.tsx"() {
38054
38076
  "use client";
@@ -38062,10 +38084,12 @@ var init_UISlotRenderer = __esm({
38062
38084
  init_SlotsContext();
38063
38085
  init_cn();
38064
38086
  init_ErrorBoundary();
38087
+ init_logger();
38065
38088
  init_Skeleton();
38066
38089
  init_renderer();
38067
38090
  init_TraitFrame();
38068
38091
  init_component_registry_generated();
38092
+ scopeWrapLog = createLogger("almadar:ui:scope-wrap");
38069
38093
  TRAIT_BINDING_RE = /^@trait\.([A-Z][A-Za-z0-9]*)$/;
38070
38094
  SuspenseConfigContext = React115.createContext({ enabled: false });
38071
38095
  SlotContainedContext = React115.createContext(false);
@@ -141,13 +141,26 @@ function useEventBus() {
141
141
  const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
142
142
  const scope = useTraitScope();
143
143
  return useMemo(() => {
144
- if (!scope) return baseBus;
144
+ if (!scope) {
145
+ return {
146
+ ...baseBus,
147
+ emit: (type, payload, source) => {
148
+ if (typeof type === "string" && type.startsWith("UI:") && !type.slice(3).includes(".")) {
149
+ scopeLog.warn("emit:bare-key-no-scope", { type });
150
+ }
151
+ baseBus.emit(type, payload, source);
152
+ }
153
+ };
154
+ }
145
155
  return {
146
156
  ...baseBus,
147
157
  emit: (type, payload, source) => {
148
158
  if (typeof type === "string" && type.startsWith("UI:")) {
149
159
  const tail = type.slice(3);
150
160
  const qualified = tail.includes(".") ? type : `UI:${scope.orbital}.${scope.trait}.${tail}`;
161
+ if (qualified !== type) {
162
+ scopeLog.info("emit:qualified", { from: type, to: qualified, scope });
163
+ }
151
164
  baseBus.emit(qualified, payload, source);
152
165
  return;
153
166
  }
@@ -179,13 +192,14 @@ function useEmitEvent() {
179
192
  [eventBus]
180
193
  );
181
194
  }
182
- var log, subLog, fallbackListeners, fallbackAnyListeners, fallbackEventBus, useEventSubscription, useEventBus_default;
195
+ var log, subLog, scopeLog, fallbackListeners, fallbackAnyListeners, fallbackEventBus, useEventSubscription, useEventBus_default;
183
196
  var init_useEventBus = __esm({
184
197
  "hooks/useEventBus.ts"() {
185
198
  "use client";
186
199
  init_logger();
187
200
  log = createLogger("almadar:eventbus");
188
201
  subLog = createLogger("almadar:eventbus:subscribe");
202
+ scopeLog = createLogger("almadar:ui:trait-scope");
189
203
  fallbackListeners = /* @__PURE__ */ new Map();
190
204
  fallbackAnyListeners = /* @__PURE__ */ new Set();
191
205
  fallbackEventBus = {
@@ -37518,7 +37532,15 @@ function MaybeTraitScope({
37518
37532
  }) {
37519
37533
  const schemaCtx = useEntitySchemaOptional();
37520
37534
  const orbital = sourceTrait !== void 0 && schemaCtx !== null ? schemaCtx.orbitalsByTrait.get(sourceTrait) : void 0;
37521
- if (sourceTrait !== void 0 && orbital !== void 0) {
37535
+ const wrap = sourceTrait !== void 0 && orbital !== void 0;
37536
+ scopeWrapLog.info("decide", {
37537
+ sourceTrait,
37538
+ schemaCtxPresent: schemaCtx !== null,
37539
+ orbitalsByTraitSize: schemaCtx?.orbitalsByTrait.size ?? 0,
37540
+ orbital,
37541
+ wrap
37542
+ });
37543
+ if (wrap) {
37522
37544
  return /* @__PURE__ */ jsx(TraitScopeProvider, { orbital, trait: sourceTrait, children });
37523
37545
  }
37524
37546
  return /* @__PURE__ */ jsx(Fragment, { children });
@@ -38003,7 +38025,7 @@ function UISlotRenderer({
38003
38025
  }
38004
38026
  return wrapped;
38005
38027
  }
38006
- var TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
38028
+ var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
38007
38029
  var init_UISlotRenderer = __esm({
38008
38030
  "components/organisms/UISlotRenderer.tsx"() {
38009
38031
  "use client";
@@ -38017,10 +38039,12 @@ var init_UISlotRenderer = __esm({
38017
38039
  init_SlotsContext();
38018
38040
  init_cn();
38019
38041
  init_ErrorBoundary();
38042
+ init_logger();
38020
38043
  init_Skeleton();
38021
38044
  init_renderer();
38022
38045
  init_TraitFrame();
38023
38046
  init_component_registry_generated();
38047
+ scopeWrapLog = createLogger("almadar:ui:scope-wrap");
38024
38048
  TRAIT_BINDING_RE = /^@trait\.([A-Z][A-Za-z0-9]*)$/;
38025
38049
  SuspenseConfigContext = createContext({ enabled: false });
38026
38050
  SlotContainedContext = createContext(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "4.10.3",
3
+ "version": "4.10.5",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "main": "./dist/components/index.js",