@usecrow/ui 0.1.56 → 0.1.57

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.d.cts CHANGED
@@ -389,8 +389,13 @@ interface CrowWidgetProps {
389
389
  * responds in that language and the welcome message is translated.
390
390
  */
391
391
  language?: string;
392
+ /**
393
+ * Custom CSS to inject into the widget's Shadow DOM.
394
+ * Appended after default styles, allowing overrides.
395
+ */
396
+ customCss?: string;
392
397
  }
393
- declare function CrowWidget({ productId, apiUrl, subdomain, variant, styles: propStyles, previewMode, showThinking: showThinkingProp, agentName: agentNameProp, welcomeMessage: welcomeMessageProp, onReady, onIdentify, tools, navigate, onToolResult, getIdentityToken, context, toolRenderers, language, }: CrowWidgetProps): react_jsx_runtime.JSX.Element;
398
+ declare function CrowWidget({ productId, apiUrl, subdomain, variant, styles: propStyles, previewMode, showThinking: showThinkingProp, agentName: agentNameProp, welcomeMessage: welcomeMessageProp, onReady, onIdentify, tools, navigate, onToolResult, getIdentityToken, context, toolRenderers, language, customCss, }: CrowWidgetProps): react_jsx_runtime.JSX.Element;
394
399
 
395
400
  interface CrowCopilotProps {
396
401
  /** Product ID for this copilot */
package/dist/index.d.ts CHANGED
@@ -389,8 +389,13 @@ interface CrowWidgetProps {
389
389
  * responds in that language and the welcome message is translated.
390
390
  */
391
391
  language?: string;
392
+ /**
393
+ * Custom CSS to inject into the widget's Shadow DOM.
394
+ * Appended after default styles, allowing overrides.
395
+ */
396
+ customCss?: string;
392
397
  }
393
- declare function CrowWidget({ productId, apiUrl, subdomain, variant, styles: propStyles, previewMode, showThinking: showThinkingProp, agentName: agentNameProp, welcomeMessage: welcomeMessageProp, onReady, onIdentify, tools, navigate, onToolResult, getIdentityToken, context, toolRenderers, language, }: CrowWidgetProps): react_jsx_runtime.JSX.Element;
398
+ declare function CrowWidget({ productId, apiUrl, subdomain, variant, styles: propStyles, previewMode, showThinking: showThinkingProp, agentName: agentNameProp, welcomeMessage: welcomeMessageProp, onReady, onIdentify, tools, navigate, onToolResult, getIdentityToken, context, toolRenderers, language, customCss, }: CrowWidgetProps): react_jsx_runtime.JSX.Element;
394
399
 
395
400
  interface CrowCopilotProps {
396
401
  /** Product ID for this copilot */
package/dist/index.js CHANGED
@@ -3513,7 +3513,8 @@ function CrowWidget({
3513
3513
  getIdentityToken,
3514
3514
  context,
3515
3515
  toolRenderers,
3516
- language
3516
+ language,
3517
+ customCss
3517
3518
  }) {
3518
3519
  const effectiveGetIdentityToken = getIdentityToken || window.__crow_identity_token_fetcher;
3519
3520
  const effectiveOnToolResult = onToolResult || window.__crow_on_tool_result;
@@ -4039,7 +4040,14 @@ function CrowWidget({
4039
4040
  )
4040
4041
  ] })
4041
4042
  ] });
4042
- return /* @__PURE__ */ jsx(ShadowContainer, { styles: WIDGET_CSS, children: /* @__PURE__ */ jsx("div", { className: "crow-widget-root", style: cssVars, children: /* @__PURE__ */ jsxs(
4043
+ const combinedStyles = useMemo(
4044
+ () => customCss ? `${WIDGET_CSS}
4045
+
4046
+ /* Custom CSS */
4047
+ ${customCss}` : WIDGET_CSS,
4048
+ [customCss]
4049
+ );
4050
+ return /* @__PURE__ */ jsx(ShadowContainer, { styles: combinedStyles, children: /* @__PURE__ */ jsx("div", { className: "crow-widget-root", style: cssVars, children: /* @__PURE__ */ jsxs(
4043
4051
  WidgetStyleProvider,
4044
4052
  {
4045
4053
  styles,