@plaidev/karte-action-sdk 1.1.255-28836320.3f6425ea → 1.1.255-28867788.67db23bd

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.
@@ -12072,11 +12072,19 @@ const useClickable = ({ eventValue = {}, eventName = '', onClick, element = 'div
12072
12072
 
12073
12073
  const useInjectCustomizeCss = (props) => {
12074
12074
  function injectCss() {
12075
+ const modalElement = document.querySelector(`.${KARTE_MODAL_ROOT}`);
12075
12076
  const style = document.createElement('style');
12076
12077
  style.textContent = props.customizeCss;
12077
- document.head.appendChild(style);
12078
+ if (modalElement?.shadowRoot) {
12079
+ modalElement.shadowRoot.appendChild(style);
12080
+ }
12081
+ else {
12082
+ document.head.appendChild(style);
12083
+ }
12078
12084
  return () => {
12079
- document.head.removeChild(style);
12085
+ modalElement?.shadowRoot
12086
+ ? modalElement.shadowRoot.removeChild(style)
12087
+ : document.head.removeChild(style);
12080
12088
  };
12081
12089
  }
12082
12090
  onMount$1(() => {
package/dist/index.es.js CHANGED
@@ -11418,11 +11418,19 @@ const useClickable = ({ eventValue = {}, eventName = '', onClick, element = 'div
11418
11418
 
11419
11419
  const useInjectCustomizeCss = (props) => {
11420
11420
  function injectCss() {
11421
+ const modalElement = document.querySelector(`.${KARTE_MODAL_ROOT}`);
11421
11422
  const style = document.createElement('style');
11422
11423
  style.textContent = props.customizeCss;
11423
- document.head.appendChild(style);
11424
+ if (modalElement?.shadowRoot) {
11425
+ modalElement.shadowRoot.appendChild(style);
11426
+ }
11427
+ else {
11428
+ document.head.appendChild(style);
11429
+ }
11424
11430
  return () => {
11425
- document.head.removeChild(style);
11431
+ modalElement?.shadowRoot
11432
+ ? modalElement.shadowRoot.removeChild(style)
11433
+ : document.head.removeChild(style);
11426
11434
  };
11427
11435
  }
11428
11436
  onMount$1(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaidev/karte-action-sdk",
3
- "version": "1.1.255-28836320.3f6425ea",
3
+ "version": "1.1.255-28867788.67db23bd",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",
@@ -65,13 +65,13 @@
65
65
  "@rollup/plugin-node-resolve": "^15.0.0",
66
66
  "@rollup/plugin-replace": "^5.0.0",
67
67
  "@sveltejs/vite-plugin-svelte": "1.0.0-next.37",
68
- "@testing-library/svelte": "^3.1.3",
68
+ "@testing-library/svelte": "^5.2.4",
69
69
  "@tsconfig/svelte": "^2.0.1",
70
70
  "@types/brotli": "^1.3.1",
71
71
  "@types/serve-static": "^1.13.10",
72
72
  "brotli": "^1.3.3",
73
73
  "c8": "^7.12.0",
74
- "happy-dom": "^6.0.3",
74
+ "jsdom": "24.1.0",
75
75
  "isomorphic-fetch": "3.0.0",
76
76
  "listhen": "^0.2.13",
77
77
  "node-fetch": "2.6.7",
@@ -95,7 +95,7 @@
95
95
  "textlint-rule-preset-ja-spacing": "^2.3.0",
96
96
  "textlint-rule-preset-ja-technical-writing": "^7.0.0",
97
97
  "tslib": "^2.3.1",
98
- "tsx": "^3.12.3",
98
+ "tsx": "^4.19.1",
99
99
  "typescript": "^4.7.4",
100
100
  "vitepress": "1.0.0-alpha.30",
101
101
  "vitest": "latest",