@commercetools/nimbus 0.0.8 → 0.0.9-rc2

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.
@@ -0,0 +1,2 @@
1
+ "use strict";function n(){typeof global.structuredClone!="function"&&(global.structuredClone=function(e){if(e==null)return e;try{return typeof e=="object"?JSON.parse(JSON.stringify(e)):e}catch(t){return console.warn("structuredClone polyfill failed:",t),Array.isArray(e)?[...e]:{...e}}}),Object.defineProperty(window,"matchMedia",{writable:!0,value:r=>({matches:!1,media:r,onchange:null,addListener:()=>{},removeListener:()=>{},addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1})})}module.exports={setupJsdomPolyfills:n};
2
+ //# sourceMappingURL=setup-jsdom-polyfills.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup-jsdom-polyfills.cjs.js","sources":["../src/test/setup-jsdom-polyfills.ts"],"sourcesContent":["function setupJsdomPolyfills() {\n // implementation of structuredClone polyfill to satisfy the Nimbus (Chakra UI) provider\n if (typeof global.structuredClone !== \"function\") {\n global.structuredClone = function structuredClone(value) {\n if (value === null || value === undefined) {\n return value;\n }\n\n try {\n // For objects and arrays, use JSON methods\n if (typeof value === \"object\") {\n return JSON.parse(JSON.stringify(value));\n }\n // For primitive values, return directly\n return value;\n } catch (error) {\n console.warn(\"structuredClone polyfill failed:\", error);\n\n // Returns a shallow copy as fallback\n return Array.isArray(value) ? [...value] : { ...value };\n }\n };\n }\n\n // Polyfill window.matchMedia for JSDOM (used by Nimbus/Chakra for theming)\n Object.defineProperty(window, \"matchMedia\", {\n writable: true,\n value: (query: unknown) => ({\n matches: false, // Default value, tests can override if needed\n media: query,\n onchange: null,\n addListener: () => {}, // Deprecated but needed for some libs\n removeListener: () => {}, // Deprecated but needed for some libs\n addEventListener: () => {},\n removeEventListener: () => {},\n dispatchEvent: () => false,\n }),\n });\n}\n\nmodule.exports = {\n setupJsdomPolyfills,\n};\n"],"names":["setupJsdomPolyfills","value","error","query"],"mappings":"aAAA,SAASA,GAAsB,CAEzB,OAAO,OAAO,iBAAoB,aAC7B,OAAA,gBAAkB,SAAyBC,EAAO,CACnD,GAAAA,GAAU,KACL,OAAAA,EAGL,GAAA,CAEE,OAAA,OAAOA,GAAU,SACZ,KAAK,MAAM,KAAK,UAAUA,CAAK,CAAC,EAGlCA,QACAC,EAAO,CACN,eAAA,KAAK,mCAAoCA,CAAK,EAG/C,MAAM,QAAQD,CAAK,EAAI,CAAC,GAAGA,CAAK,EAAI,CAAE,GAAGA,CAAM,CAAA,CAE1D,GAIK,OAAA,eAAe,OAAQ,aAAc,CAC1C,SAAU,GACV,MAAQE,IAAoB,CAC1B,QAAS,GACT,MAAOA,EACP,SAAU,KACV,YAAa,IAAM,CAAC,EACpB,eAAgB,IAAM,CAAC,EACvB,iBAAkB,IAAM,CAAC,EACzB,oBAAqB,IAAM,CAAC,EAC5B,cAAe,IAAM,EACvB,EAAA,CACD,CACH,CAEA,OAAO,QAAU,CACf,oBAAAH,CACF"}
@@ -0,0 +1 @@
1
+ export { }
@@ -0,0 +1,38 @@
1
+ var o = (r, e) => () => (e || r((e = { exports: {} }).exports, e), e.exports);
2
+ var s = o((d, t) => {
3
+ function i() {
4
+ typeof global.structuredClone != "function" && (global.structuredClone = function(e) {
5
+ if (e == null)
6
+ return e;
7
+ try {
8
+ return typeof e == "object" ? JSON.parse(JSON.stringify(e)) : e;
9
+ } catch (n) {
10
+ return console.warn("structuredClone polyfill failed:", n), Array.isArray(e) ? [...e] : { ...e };
11
+ }
12
+ }), Object.defineProperty(window, "matchMedia", {
13
+ writable: !0,
14
+ value: (r) => ({
15
+ matches: !1,
16
+ // Default value, tests can override if needed
17
+ media: r,
18
+ onchange: null,
19
+ addListener: () => {
20
+ },
21
+ // Deprecated but needed for some libs
22
+ removeListener: () => {
23
+ },
24
+ // Deprecated but needed for some libs
25
+ addEventListener: () => {
26
+ },
27
+ removeEventListener: () => {
28
+ },
29
+ dispatchEvent: () => !1
30
+ })
31
+ });
32
+ }
33
+ t.exports = {
34
+ setupJsdomPolyfills: i
35
+ };
36
+ });
37
+ export default s();
38
+ //# sourceMappingURL=setup-jsdom-polyfills.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup-jsdom-polyfills.es.js","sources":["../src/test/setup-jsdom-polyfills.ts"],"sourcesContent":["function setupJsdomPolyfills() {\n // implementation of structuredClone polyfill to satisfy the Nimbus (Chakra UI) provider\n if (typeof global.structuredClone !== \"function\") {\n global.structuredClone = function structuredClone(value) {\n if (value === null || value === undefined) {\n return value;\n }\n\n try {\n // For objects and arrays, use JSON methods\n if (typeof value === \"object\") {\n return JSON.parse(JSON.stringify(value));\n }\n // For primitive values, return directly\n return value;\n } catch (error) {\n console.warn(\"structuredClone polyfill failed:\", error);\n\n // Returns a shallow copy as fallback\n return Array.isArray(value) ? [...value] : { ...value };\n }\n };\n }\n\n // Polyfill window.matchMedia for JSDOM (used by Nimbus/Chakra for theming)\n Object.defineProperty(window, \"matchMedia\", {\n writable: true,\n value: (query: unknown) => ({\n matches: false, // Default value, tests can override if needed\n media: query,\n onchange: null,\n addListener: () => {}, // Deprecated but needed for some libs\n removeListener: () => {}, // Deprecated but needed for some libs\n addEventListener: () => {},\n removeEventListener: () => {},\n dispatchEvent: () => false,\n }),\n });\n}\n\nmodule.exports = {\n setupJsdomPolyfills,\n};\n"],"names":["require_setup_jsdom_polyfills_es","__commonJSMin","exports","module","setupJsdomPolyfills","value","error","query"],"mappings":";AAAA,IAAAA,IAAAC,EAAA,CAAAC,GAAAC,MAAA;AAAA,WAASC,IAAsB;AAEzB,IAAA,OAAO,OAAO,mBAAoB,eAC7B,OAAA,kBAAkB,SAAyBC,GAAO;AACnD,UAAAA,KAAU;AACL,eAAAA;AAGL,UAAA;AAEE,eAAA,OAAOA,KAAU,WACZ,KAAK,MAAM,KAAK,UAAUA,CAAK,CAAC,IAGlCA;AAAA,eACAC,GAAO;AACN,uBAAA,KAAK,oCAAoCA,CAAK,GAG/C,MAAM,QAAQD,CAAK,IAAI,CAAC,GAAGA,CAAK,IAAI,EAAE,GAAGA,EAAM;AAAA,MAAA;AAAA,IAE1D,IAIK,OAAA,eAAe,QAAQ,cAAc;AAAA,MAC1C,UAAU;AAAA,MACV,OAAO,CAACE,OAAoB;AAAA,QAC1B,SAAS;AAAA;AAAA,QACT,OAAOA;AAAA,QACP,UAAU;AAAA,QACV,aAAa,MAAM;AAAA,QAAC;AAAA;AAAA,QACpB,gBAAgB,MAAM;AAAA,QAAC;AAAA;AAAA,QACvB,kBAAkB,MAAM;AAAA,QAAC;AAAA,QACzB,qBAAqB,MAAM;AAAA,QAAC;AAAA,QAC5B,eAAe,MAAM;AAAA,MACvB;AAAA,IAAA,CACD;AAAA,EACH;AAEA,EAAAJ,EAAO,UAAU;AAAA,IACf,qBAAAC;AAAA,EACF;AAAA;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools/nimbus",
3
- "version": "0.0.8",
3
+ "version": "0.0.9-rc2",
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "type": "module",
@@ -16,7 +16,13 @@
16
16
  "default": "./dist/index.cjs"
17
17
  }
18
18
  },
19
- "./package.json": "./package.json"
19
+ "./package.json": "./package.json",
20
+ "./setupJsdomPolyfills": {
21
+ "require": {
22
+ "types": "./dist/setup-jsdom-polyfills.d.ts",
23
+ "default": "./dist/setup-jsdom-polyfills.cjs.js"
24
+ }
25
+ }
20
26
  },
21
27
  "files": [
22
28
  "dist",
@@ -50,7 +56,7 @@
50
56
  "@chakra-ui/react": "^3.19.2",
51
57
  "@internationalized/date": "^3.8.0",
52
58
  "@pandacss/types": "^0.53.6",
53
- "@react-aria/optimize-locales-plugin": "1.1.4",
59
+ "@react-aria/optimize-locales-plugin": "1.1.5",
54
60
  "@storybook/addon-a11y": "^9.0.13",
55
61
  "@storybook/addon-docs": "^9.0.13",
56
62
  "@storybook/addon-vitest": "^9.0.13",
@@ -73,8 +79,8 @@
73
79
  "vite-plugin-dts": "^4.5.4",
74
80
  "vite-tsconfig-paths": "^5.1.4",
75
81
  "vitest": "^3.2.4",
76
- "@commercetools/nimbus-tokens": "^0.0.3",
77
- "@commercetools/nimbus-icons": "^0.0.4"
82
+ "@commercetools/nimbus-icons": "^0.0.4",
83
+ "@commercetools/nimbus-tokens": "^0.0.3"
78
84
  },
79
85
  "peerDependencies": {
80
86
  "@chakra-ui/react": "^3.19.2",