@almadar/ui 4.6.6 → 4.6.10

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.
@@ -105,55 +105,56 @@ var apiClient = {
105
105
  // lib/debug.ts
106
106
  var DEBUG_ENABLED = typeof window !== "undefined" && (localStorage.getItem("debug") === "true" || process.env.NODE_ENV === "development");
107
107
  function isDebugEnabled() {
108
- return DEBUG_ENABLED;
108
+ if (DEBUG_ENABLED) return true;
109
+ return typeof window !== "undefined" && window.__ALMADAR_DEBUG_VERIFY__ === true;
109
110
  }
110
111
  function debug(...args) {
111
- if (DEBUG_ENABLED) {
112
+ if (isDebugEnabled()) {
112
113
  console.log("[DEBUG]", ...args);
113
114
  }
114
115
  }
115
116
  function debugGroup(label) {
116
- if (DEBUG_ENABLED) {
117
+ if (isDebugEnabled()) {
117
118
  console.group(`[DEBUG] ${label}`);
118
119
  }
119
120
  }
120
121
  function debugGroupEnd() {
121
- if (DEBUG_ENABLED) {
122
+ if (isDebugEnabled()) {
122
123
  console.groupEnd();
123
124
  }
124
125
  }
125
126
  function debugWarn(...args) {
126
- if (DEBUG_ENABLED) {
127
+ if (isDebugEnabled()) {
127
128
  console.warn("[DEBUG]", ...args);
128
129
  }
129
130
  }
130
131
  function debugError(...args) {
131
- if (DEBUG_ENABLED) {
132
+ if (isDebugEnabled()) {
132
133
  console.error("[DEBUG]", ...args);
133
134
  }
134
135
  }
135
136
  function debugTable(data) {
136
- if (DEBUG_ENABLED) {
137
+ if (isDebugEnabled()) {
137
138
  console.table(data);
138
139
  }
139
140
  }
140
141
  function debugTime(label) {
141
- if (DEBUG_ENABLED) {
142
+ if (isDebugEnabled()) {
142
143
  console.time(`[DEBUG] ${label}`);
143
144
  }
144
145
  }
145
146
  function debugTimeEnd(label) {
146
- if (DEBUG_ENABLED) {
147
+ if (isDebugEnabled()) {
147
148
  console.timeEnd(`[DEBUG] ${label}`);
148
149
  }
149
150
  }
150
151
  function debugInput(inputType, data) {
151
- if (DEBUG_ENABLED) {
152
+ if (isDebugEnabled()) {
152
153
  console.log(`[DEBUG:INPUT] ${inputType}:`, data);
153
154
  }
154
155
  }
155
156
  function debugCollision(entityA, entityB, details) {
156
- if (DEBUG_ENABLED) {
157
+ if (isDebugEnabled()) {
157
158
  console.log(
158
159
  `[DEBUG:COLLISION] ${entityA.type || entityA.id} <-> ${entityB.type || entityB.id}`,
159
160
  details ?? ""
@@ -161,12 +162,12 @@ function debugCollision(entityA, entityB, details) {
161
162
  }
162
163
  }
163
164
  function debugPhysics(entityId, physics) {
164
- if (DEBUG_ENABLED) {
165
+ if (isDebugEnabled()) {
165
166
  console.log(`[DEBUG:PHYSICS] ${entityId}:`, physics);
166
167
  }
167
168
  }
168
169
  function debugGameState(stateName, value) {
169
- if (DEBUG_ENABLED) {
170
+ if (isDebugEnabled()) {
170
171
  console.log(`[DEBUG:GAME_STATE] ${stateName}:`, value);
171
172
  }
172
173
  }
@@ -713,7 +714,7 @@ function bindEventBus(eventBus) {
713
714
  eventLog.length = 0;
714
715
  };
715
716
  if (eventBus.onAny) {
716
- eventBus.onAny((event) => {
717
+ const verificationRegistryEventLogger = (event) => {
717
718
  if (eventLog.length < 200) {
718
719
  eventLog.push({
719
720
  type: event.type,
@@ -721,7 +722,11 @@ function bindEventBus(eventBus) {
721
722
  timestamp: Date.now()
722
723
  });
723
724
  }
725
+ };
726
+ Object.defineProperty(verificationRegistryEventLogger, "name", {
727
+ value: "verificationRegistry:eventLog"
724
728
  });
729
+ eventBus.onAny(verificationRegistryEventLogger);
725
730
  }
726
731
  }
727
732
  }
package/dist/lib/index.js CHANGED
@@ -103,55 +103,56 @@ var apiClient = {
103
103
  // lib/debug.ts
104
104
  var DEBUG_ENABLED = typeof window !== "undefined" && (localStorage.getItem("debug") === "true" || process.env.NODE_ENV === "development");
105
105
  function isDebugEnabled() {
106
- return DEBUG_ENABLED;
106
+ if (DEBUG_ENABLED) return true;
107
+ return typeof window !== "undefined" && window.__ALMADAR_DEBUG_VERIFY__ === true;
107
108
  }
108
109
  function debug(...args) {
109
- if (DEBUG_ENABLED) {
110
+ if (isDebugEnabled()) {
110
111
  console.log("[DEBUG]", ...args);
111
112
  }
112
113
  }
113
114
  function debugGroup(label) {
114
- if (DEBUG_ENABLED) {
115
+ if (isDebugEnabled()) {
115
116
  console.group(`[DEBUG] ${label}`);
116
117
  }
117
118
  }
118
119
  function debugGroupEnd() {
119
- if (DEBUG_ENABLED) {
120
+ if (isDebugEnabled()) {
120
121
  console.groupEnd();
121
122
  }
122
123
  }
123
124
  function debugWarn(...args) {
124
- if (DEBUG_ENABLED) {
125
+ if (isDebugEnabled()) {
125
126
  console.warn("[DEBUG]", ...args);
126
127
  }
127
128
  }
128
129
  function debugError(...args) {
129
- if (DEBUG_ENABLED) {
130
+ if (isDebugEnabled()) {
130
131
  console.error("[DEBUG]", ...args);
131
132
  }
132
133
  }
133
134
  function debugTable(data) {
134
- if (DEBUG_ENABLED) {
135
+ if (isDebugEnabled()) {
135
136
  console.table(data);
136
137
  }
137
138
  }
138
139
  function debugTime(label) {
139
- if (DEBUG_ENABLED) {
140
+ if (isDebugEnabled()) {
140
141
  console.time(`[DEBUG] ${label}`);
141
142
  }
142
143
  }
143
144
  function debugTimeEnd(label) {
144
- if (DEBUG_ENABLED) {
145
+ if (isDebugEnabled()) {
145
146
  console.timeEnd(`[DEBUG] ${label}`);
146
147
  }
147
148
  }
148
149
  function debugInput(inputType, data) {
149
- if (DEBUG_ENABLED) {
150
+ if (isDebugEnabled()) {
150
151
  console.log(`[DEBUG:INPUT] ${inputType}:`, data);
151
152
  }
152
153
  }
153
154
  function debugCollision(entityA, entityB, details) {
154
- if (DEBUG_ENABLED) {
155
+ if (isDebugEnabled()) {
155
156
  console.log(
156
157
  `[DEBUG:COLLISION] ${entityA.type || entityA.id} <-> ${entityB.type || entityB.id}`,
157
158
  details ?? ""
@@ -159,12 +160,12 @@ function debugCollision(entityA, entityB, details) {
159
160
  }
160
161
  }
161
162
  function debugPhysics(entityId, physics) {
162
- if (DEBUG_ENABLED) {
163
+ if (isDebugEnabled()) {
163
164
  console.log(`[DEBUG:PHYSICS] ${entityId}:`, physics);
164
165
  }
165
166
  }
166
167
  function debugGameState(stateName, value) {
167
- if (DEBUG_ENABLED) {
168
+ if (isDebugEnabled()) {
168
169
  console.log(`[DEBUG:GAME_STATE] ${stateName}:`, value);
169
170
  }
170
171
  }
@@ -711,7 +712,7 @@ function bindEventBus(eventBus) {
711
712
  eventLog.length = 0;
712
713
  };
713
714
  if (eventBus.onAny) {
714
- eventBus.onAny((event) => {
715
+ const verificationRegistryEventLogger = (event) => {
715
716
  if (eventLog.length < 200) {
716
717
  eventLog.push({
717
718
  type: event.type,
@@ -719,7 +720,11 @@ function bindEventBus(eventBus) {
719
720
  timestamp: Date.now()
720
721
  });
721
722
  }
723
+ };
724
+ Object.defineProperty(verificationRegistryEventLogger, "name", {
725
+ value: "verificationRegistry:eventLog"
722
726
  });
727
+ eventBus.onAny(verificationRegistryEventLogger);
723
728
  }
724
729
  }
725
730
  }
@@ -29,26 +29,5 @@ interface EventBusProviderProps {
29
29
  /** Enable debug logging in development */
30
30
  debug?: boolean;
31
31
  }
32
- /**
33
- * Provider component for the page event bus.
34
- *
35
- * This is a pure pub/sub event bus. For selection state,
36
- * use SelectionProvider which listens to events and maintains state.
37
- *
38
- * @example
39
- * ```tsx
40
- * function TaskDetailPage() {
41
- * return (
42
- * <EventBusProvider debug={process.env.NODE_ENV === 'development'}>
43
- * <SelectionProvider>
44
- * <TaskHeader />
45
- * <TaskForm />
46
- * <TaskActions />
47
- * </SelectionProvider>
48
- * </EventBusProvider>
49
- * );
50
- * }
51
- * ```
52
- */
53
32
  export declare function EventBusProvider({ children, debug }: EventBusProviderProps): import("react/jsx-runtime").JSX.Element;
54
33
  export type { EventBusContextType };