@uipath/apollo-react 3.50.0-pr329.35863a7 → 3.50.0-pr329.37ed366

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.
@@ -67,6 +67,19 @@ const injectReactFlowStyles = (container)=>{
67
67
  if (container.firstChild) container.insertBefore(style, container.firstChild);
68
68
  else container.append(style);
69
69
  };
70
+ const getUixCanvasCSS = ()=>{
71
+ const stylesheets = Array.from(document.styleSheets);
72
+ const declarations = [];
73
+ for (const stylesheet of stylesheets)try {
74
+ if (stylesheet.cssRules) {
75
+ for (const rule of Array.from(stylesheet.cssRules))if (rule instanceof CSSStyleRule && rule.cssText.includes('--uix-canvas-')) {
76
+ const match = rule.cssText.match(/\{([^}]+)\}/);
77
+ if (match?.[1]) declarations.push(match[1].trim());
78
+ }
79
+ }
80
+ } catch {}
81
+ return declarations.length > 0 ? `:host { ${declarations.join(' ')} }` : '';
82
+ };
70
83
  const injectCSSVariables = (container)=>{
71
84
  const existingVars = container.querySelector('style[data-css-variables="true"]');
72
85
  if (existingVars) return;
@@ -77,16 +90,16 @@ const injectCSSVariables = (container)=>{
77
90
  '--spacing',
78
91
  '--font',
79
92
  '--shadow',
80
- '--border',
81
- '--uix-canvas'
93
+ '--border'
82
94
  ];
83
95
  for (const property of Array.from(rootStyles))if (varPrefixes.some((prefix)=>property.startsWith(prefix))) {
84
96
  const value = rootStyles.getPropertyValue(property);
85
97
  if (value) cssVariables.push(`${property}: ${value};`);
86
98
  }
99
+ const canvasCSS = getUixCanvasCSS();
87
100
  const style = document.createElement('style');
88
101
  style.dataset.cssVariables = 'true';
89
- style.textContent = `:host { ${cssVariables.join(' ')} }`;
102
+ style.textContent = `:host { ${cssVariables.join(' ')} }\n${canvasCSS}`;
90
103
  if (container.firstChild) container.insertBefore(style, container.firstChild);
91
104
  else container.append(style);
92
105
  };
@@ -1 +1 @@
1
- {"version":3,"file":"AgentFlowProvider.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/AgentCanvas/providers/AgentFlowProvider.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,iBAAiB,EAKvB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAsFlF,UAAU,4BAA4B;IACpC,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAkDD,UAAU,mCAAoC,SAAQ,iBAAiB;IAOrE,cAAc,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;IAC1C,cAAc,CAAC,EAAE,wBAAwB,CAAC;CAC3C;AAED,eAAO,MAAM,8BAA8B,GAAI,8CAI5C,mCAAmC,4CAQrC,CAAC;AAEF,eAAO,MAAM,YAAY,oCAMxB,CAAC"}
1
+ {"version":3,"file":"AgentFlowProvider.d.ts","sourceRoot":"","sources":["../../../../../src/canvas/components/AgentCanvas/providers/AgentFlowProvider.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,iBAAiB,EAKvB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAmHlF,UAAU,4BAA4B;IACpC,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAkDD,UAAU,mCAAoC,SAAQ,iBAAiB;IAOrE,cAAc,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;IAC1C,cAAc,CAAC,EAAE,wBAAwB,CAAC;CAC3C;AAED,eAAO,MAAM,8BAA8B,GAAI,8CAI5C,mCAAmC,4CAQrC,CAAC;AAEF,eAAO,MAAM,YAAY,oCAMxB,CAAC"}
@@ -28,6 +28,19 @@ const injectReactFlowStyles = (container)=>{
28
28
  if (container.firstChild) container.insertBefore(style, container.firstChild);
29
29
  else container.append(style);
30
30
  };
31
+ const getUixCanvasCSS = ()=>{
32
+ const stylesheets = Array.from(document.styleSheets);
33
+ const declarations = [];
34
+ for (const stylesheet of stylesheets)try {
35
+ if (stylesheet.cssRules) {
36
+ for (const rule of Array.from(stylesheet.cssRules))if (rule instanceof CSSStyleRule && rule.cssText.includes('--uix-canvas-')) {
37
+ const match = rule.cssText.match(/\{([^}]+)\}/);
38
+ if (match?.[1]) declarations.push(match[1].trim());
39
+ }
40
+ }
41
+ } catch {}
42
+ return declarations.length > 0 ? `:host { ${declarations.join(' ')} }` : '';
43
+ };
31
44
  const injectCSSVariables = (container)=>{
32
45
  const existingVars = container.querySelector('style[data-css-variables="true"]');
33
46
  if (existingVars) return;
@@ -38,16 +51,16 @@ const injectCSSVariables = (container)=>{
38
51
  '--spacing',
39
52
  '--font',
40
53
  '--shadow',
41
- '--border',
42
- '--uix-canvas'
54
+ '--border'
43
55
  ];
44
56
  for (const property of Array.from(rootStyles))if (varPrefixes.some((prefix)=>property.startsWith(prefix))) {
45
57
  const value = rootStyles.getPropertyValue(property);
46
58
  if (value) cssVariables.push(`${property}: ${value};`);
47
59
  }
60
+ const canvasCSS = getUixCanvasCSS();
48
61
  const style = document.createElement('style');
49
62
  style.dataset.cssVariables = 'true';
50
- style.textContent = `:host { ${cssVariables.join(' ')} }`;
63
+ style.textContent = `:host { ${cssVariables.join(' ')} }\n${canvasCSS}`;
51
64
  if (container.firstChild) container.insertBefore(style, container.firstChild);
52
65
  else container.append(style);
53
66
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/apollo-react",
3
- "version": "3.50.0-pr329.35863a7",
3
+ "version": "3.50.0-pr329.37ed366",
4
4
  "description": "Apollo Design System - React component library with Material UI theming",
5
5
  "repository": {
6
6
  "type": "git",
@@ -200,8 +200,8 @@
200
200
  "use-sync-external-store": "^1.2.0",
201
201
  "zod": "^4.3.5",
202
202
  "zustand": "^5.0.9",
203
- "@uipath/apollo-wind": "0.12.2",
204
- "@uipath/apollo-core": "5.7.1"
203
+ "@uipath/apollo-core": "5.7.1",
204
+ "@uipath/apollo-wind": "0.12.2"
205
205
  },
206
206
  "devDependencies": {
207
207
  "@lingui/cli": "^5.6.1",