@mcp-b/embedded-agent 1.2.1 → 1.2.3-beta.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.
@@ -28,6 +28,19 @@ interface EmbeddedAgentProps {
28
28
  * In production, leave this undefined to use your WebMCP plan.
29
29
  */
30
30
  devMode?: DevModeConfig;
31
+ /**
32
+ * Disable shadow DOM style isolation.
33
+ * NOT RECOMMENDED - only use this if you need to customize internal styles
34
+ * and understand the risks of style conflicts with the host page.
35
+ *
36
+ * When enabled:
37
+ * - Styles are injected globally into document.head
38
+ * - Host page styles may affect the agent widget
39
+ * - Agent styles may leak to the host page
40
+ *
41
+ * @default false
42
+ */
43
+ disableShadowDOM?: boolean;
31
44
  }
32
45
  /**
33
46
  * EmbeddedAgent - Drop-in AI chat widget
@@ -36,6 +49,7 @@ interface EmbeddedAgentProps {
36
49
  * - MCP tool support (connect to any MCP server)
37
50
  * - Voice mode (talk to your AI assistant)
38
51
  * - Action-first UI (shows what the AI is doing, not just typing)
52
+ * - Shadow DOM isolation (styles don't leak in or out)
39
53
  *
40
54
  * Just add your app ID and you're done. Everything else is handled.
41
55
  */
@@ -44,7 +58,14 @@ declare const EmbeddedAgent: FC<EmbeddedAgentProps>;
44
58
  * Register the <webmcp-agent> custom element
45
59
  *
46
60
  * Called automatically when importing this module.
47
- * Styles are injected into the document head.
61
+ *
62
+ * With shadow DOM (default):
63
+ * - Styles are injected into the shadow root, not the document
64
+ * - Complete isolation from host page styles
65
+ *
66
+ * With disableShadowDOM:
67
+ * - Styles are injected into document.head on first render
68
+ * - May conflict with host page styles
48
69
  */
49
70
  declare function registerWebMCPAgent(tagName?: string): void;
50
71
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"web-component.d.ts","names":[],"sources":["../src/web-component.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;UA8DiB,aAAA;;;;;;;;;;;UAYA,kBAAA;;;;;;;YAQN;;;;;;;;;;;;cAaE,eAAe,GAAG;;;;;;;iBAgDf,mBAAA"}
1
+ {"version":3,"file":"web-component.d.ts","names":[],"sources":["../src/web-component.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;UAuEiB,aAAA;;;;;;;;;;;UAYA,kBAAA;;;;;;;YAQN;;;;;;;;;;;;;;;;;;;;;;;;;;cA4BE,eAAe,GAAG;;;;;;;;;;;;;;iBA8Ef,mBAAA"}