@smart-cloud/ai-kit-ui 1.5.8 → 1.5.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smart-cloud/ai-kit-ui",
3
- "version": "1.5.8",
3
+ "version": "1.5.9",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -312,6 +312,23 @@ export function withAiKitShell<P extends object>(
312
312
  : "light"
313
313
  : colorMode;
314
314
 
315
+ // Modal content is portalled into a different shadow tree. Mantine
316
+ // color-scheme attributes do not cross that boundary, so copy the
317
+ // contextual attributes that the global overlay needs explicitly.
318
+ if (usesSeparateModalPortal && modalRootElement) {
319
+ modalRootElement.setAttribute("data-ai-kit-variation", "modal");
320
+ modalRootElement.setAttribute(
321
+ "data-mantine-color-scheme",
322
+ resolved ?? "light",
323
+ );
324
+ modalRootElement.setAttribute("dir", currentDirection);
325
+ if (currentLanguage) {
326
+ modalRootElement.setAttribute("lang", currentLanguage);
327
+ } else {
328
+ modalRootElement.removeAttribute("lang");
329
+ }
330
+ }
331
+
315
332
  return (
316
333
  <DirectionProvider initialDirection={currentDirection}>
317
334
  <MantineProvider