cometchat-visual-builder-no-code 1.0.20-authtest35 → 1.0.20-authtest36

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.
@@ -1,3 +1,4 @@
1
+ import "./sdkStyleMarker";
1
2
  import "./noCodeGlobal.css";
2
3
  import "@cometchat/chat-uikit-react/css-variables.css";
3
4
  export declare const showOutgoingCallUI: (call: any) => void;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Monkeypatch document.createElement to auto-stamp all <style> elements
3
+ * created after the CometChat bundle loads with a `data-cometchat-sdk` attribute.
4
+ *
5
+ * This MUST be imported as the very first import in the bundle entry point (index.tsx).
6
+ *
7
+ * How it works:
8
+ * - Before the bundle loads, the host page may have already created <style> elements.
9
+ * Those won't have the marker.
10
+ * - After this script runs, every new <style> element created via document.createElement
11
+ * will automatically get `data-cometchat-sdk="true"`.
12
+ * - This covers: webpack style-loader injections, MUI/JSS runtime styles, CometChat Calls
13
+ * SDK styles (goober, .ccccn, .awssld), and any other SDK-created styles.
14
+ * - Host page styles added dynamically AFTER the bundle loads will also get the marker,
15
+ * but that's acceptable because host pages rarely create <style> elements after load.
16
+ * The key insight: host styles that exist BEFORE the bundle loads are the ones that
17
+ * cause CSS conflicts, and those won't have the marker.
18
+ *
19
+ * The IframePortal then uses this marker to decide what to copy into the iframe:
20
+ * - Has `data-cometchat-sdk` or `data-cometchat` → copy (SDK/widget style)
21
+ * - Doesn't have either → block (host page style)
22
+ */
23
+ declare const _origCreateElement: {
24
+ <K extends keyof HTMLElementTagNameMap>(tagName: K, options?: ElementCreationOptions | undefined): HTMLElementTagNameMap[K];
25
+ <K_1 extends keyof HTMLElementDeprecatedTagNameMap>(tagName: K_1, options?: ElementCreationOptions | undefined): HTMLElementDeprecatedTagNameMap[K_1];
26
+ (tagName: string, options?: ElementCreationOptions | undefined): HTMLElement;
27
+ };
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "cometchat-visual-builder-no-code",
3
- "version": "1.0.20-authtest35",
3
+ "version": "1.0.20-authtest36",
4
4
  "description": "CometChat Widget Builder No-Code Integration",
5
5
  "cometChatCustomConfig": {
6
6
  "prodVersion": "1.0.31",
7
- "devStagingVersion": "1.0.20-authtest35",
7
+ "devStagingVersion": "1.0.20-authtest36",
8
8
  "prodName": "@cometchat/chat-embed",
9
9
  "devName": "cometchat-visual-builder-no-code",
10
10
  "name": "cometchat-visual-builder-react-no-code",