@moontra/moonui-pro 2.32.36 → 2.32.37

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/index.mjs CHANGED
@@ -126,31 +126,50 @@ var init_cli_token_reader = __esm({
126
126
  */
127
127
  async getWebRTCIP() {
128
128
  return new Promise((resolve) => {
129
+ console.log("[MoonUI Pro] WebRTC IP detection starting...");
129
130
  try {
130
131
  const pc = new RTCPeerConnection({
131
132
  iceServers: [{ urls: "stun:stun.l.google.com:19302" }]
132
133
  });
133
134
  pc.createDataChannel("ip-detection");
135
+ let candidateCount = 0;
134
136
  pc.onicecandidate = (event) => {
137
+ candidateCount++;
138
+ console.log(`[MoonUI Pro] WebRTC candidate ${candidateCount}:`, event.candidate?.candidate);
135
139
  if (event.candidate) {
136
140
  const candidate = event.candidate.candidate;
137
141
  const ipMatch = candidate.match(/(\d+\.\d+\.\d+\.\d+)/);
138
142
  if (ipMatch && ipMatch[1]) {
139
143
  const ip = ipMatch[1];
144
+ console.log(`[MoonUI Pro] WebRTC IP found: ${ip}`);
140
145
  if (!ip.startsWith("127.") && !ip.startsWith("0.")) {
146
+ console.log(`[MoonUI Pro] WebRTC IP accepted: ${ip}`);
141
147
  pc.close();
142
148
  resolve(ip);
143
149
  return;
150
+ } else {
151
+ console.log(`[MoonUI Pro] WebRTC IP rejected (localhost): ${ip}`);
144
152
  }
145
153
  }
146
154
  }
147
155
  };
148
- pc.createOffer().then((offer) => pc.setLocalDescription(offer)).catch(() => resolve("unknown"));
156
+ pc.onicecandidateerror = (event) => {
157
+ console.error("[MoonUI Pro] WebRTC ICE candidate error:", event);
158
+ };
159
+ pc.createOffer().then((offer) => {
160
+ console.log("[MoonUI Pro] WebRTC offer created successfully");
161
+ return pc.setLocalDescription(offer);
162
+ }).catch((error) => {
163
+ console.error("[MoonUI Pro] WebRTC offer creation failed:", error);
164
+ resolve("unknown");
165
+ });
149
166
  setTimeout(() => {
167
+ console.log(`[MoonUI Pro] WebRTC timeout after ${candidateCount} candidates`);
150
168
  pc.close();
151
169
  resolve("unknown");
152
- }, 3e3);
170
+ }, 5e3);
153
171
  } catch (error) {
172
+ console.error("[MoonUI Pro] WebRTC initialization failed:", error);
154
173
  resolve("unknown");
155
174
  }
156
175
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moontra/moonui-pro",
3
- "version": "2.32.36",
3
+ "version": "2.32.37",
4
4
  "description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",