pixel-react 1.15.28 → 1.15.30

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.
Files changed (32) hide show
  1. package/lib/_virtual/index10.js +2 -2
  2. package/lib/_virtual/index11.js +2 -2
  3. package/lib/assets/icons/fail_result_icon.svg.js +6 -0
  4. package/lib/assets/icons/fail_result_icon.svg.js.map +1 -0
  5. package/lib/assets/icons/pass_result_icon.svg.js +6 -0
  6. package/lib/assets/icons/pass_result_icon.svg.js.map +1 -0
  7. package/lib/assets/icons/separator_icon.svg.js +6 -0
  8. package/lib/assets/icons/separator_icon.svg.js.map +1 -0
  9. package/lib/assets/icons/skipped_result_icon.svg.js +6 -0
  10. package/lib/assets/icons/skipped_result_icon.svg.js.map +1 -0
  11. package/lib/assets/icons/warning_result_icon.svg.js +6 -0
  12. package/lib/assets/icons/warning_result_icon.svg.js.map +1 -0
  13. package/lib/components/CreateVariable/CreateVariableSlider.js +1 -1
  14. package/lib/components/CreateVariable/CreateVariableSlider.js.map +1 -1
  15. package/lib/components/Icon/iconList.js +10 -0
  16. package/lib/components/Icon/iconList.js.map +1 -1
  17. package/lib/index.cjs +29 -10
  18. package/lib/index.cjs.map +1 -1
  19. package/lib/node_modules/js-beautify/js/src/css/options.js +1 -1
  20. package/lib/node_modules/js-beautify/js/src/html/beautifier.js +1 -1
  21. package/lib/node_modules/js-beautify/js/src/html/index.js +1 -1
  22. package/lib/node_modules/js-beautify/js/src/html/options.js +1 -1
  23. package/lib/node_modules/js-beautify/js/src/html/tokenizer.js +1 -1
  24. package/lib/node_modules/js-beautify/js/src/javascript/beautifier.js +1 -1
  25. package/lib/node_modules/js-beautify/js/src/javascript/index.js +1 -1
  26. package/lib/node_modules/js-beautify/js/src/javascript/options.js +1 -1
  27. package/lib/node_modules/js-beautify/js/src/javascript/tokenizer.js +1 -1
  28. package/lib/styles.css +1 -1
  29. package/lib/styles.css.map +1 -1
  30. package/lib/utils/getEncryptedData/getEncryptedData.js +13 -10
  31. package/lib/utils/getEncryptedData/getEncryptedData.js.map +1 -1
  32. package/package.json +1 -1
@@ -1,16 +1,19 @@
1
- import forge from 'node-forge';
2
-
3
1
  async function getEncryptedData(data, base64PublicKey) {
4
2
  // Decode the base64-encoded public key
5
- const publicKeyPem = `-----BEGIN PUBLIC KEY-----\n${base64PublicKey}\n-----END PUBLIC KEY-----`;
6
- // Load the public key using node-forge
7
- const publicKey = forge.pki.publicKeyFromPem(publicKeyPem);
8
- // Encrypt the data using RSA-OAEP with SHA-256
9
- const encrypted = publicKey.encrypt(data, 'RSA-OAEP', {
10
- md: forge.md.sha256.create()
11
- });
3
+ const keyBytes = Uint8Array.from(atob(base64PublicKey), c => c.charCodeAt(0));
4
+ // Import the public key in SPKI format
5
+ const publicKey = await crypto.subtle.importKey('spki', keyBytes, {
6
+ name: 'RSA-OAEP',
7
+ hash: 'SHA-256'
8
+ }, false, ['encrypt']);
9
+ // Convert data to Uint8Array
10
+ const encodedData = new TextEncoder().encode(data);
11
+ // Encrypt the data using RSA-OAEP
12
+ const encryptedData = await crypto.subtle.encrypt({
13
+ name: 'RSA-OAEP'
14
+ }, publicKey, encodedData);
12
15
  // Convert encrypted data to base64
13
- return forge.util.encode64(encrypted);
16
+ return btoa(String.fromCharCode(...new Uint8Array(encryptedData)));
14
17
  }
15
18
 
16
19
  export { getEncryptedData };
@@ -1 +1 @@
1
- {"version":3,"file":"getEncryptedData.js","sources":["../../../src/utils/getEncryptedData/getEncryptedData.ts"],"sourcesContent":[null],"names":["getEncryptedData","data","base64PublicKey","publicKeyPem","publicKey","forge","pki","publicKeyFromPem","encrypted","encrypt","md","sha256","create","util","encode64"],"mappings":";;AAEO,eAAeA,gBAAgBA,CAACC,IAAY,EAAEC,eAAuB,EAAA;AAC1E;AACA,EAAA,MAAMC,YAAY,GAAG,CAA+BD,4BAAAA,EAAAA,eAAe,CAA4B,0BAAA,CAAA;AAE/F;EACA,MAAME,SAAS,GAAGC,KAAK,CAACC,GAAG,CAACC,gBAAgB,CAACJ,YAAY,CAAC;AAE1D;EACA,MAAMK,SAAS,GAAGJ,SAAS,CAACK,OAAO,CAACR,IAAI,EAAE,UAAU,EAAE;IACpDS,EAAE,EAAEL,KAAK,CAACK,EAAE,CAACC,MAAM,CAACC,MAAM;AAC3B,GAAA,CAAC;AACF;AACA,EAAA,OAAOP,KAAK,CAACQ,IAAI,CAACC,QAAQ,CAACN,SAAS,CAAC;AACvC;;;;"}
1
+ {"version":3,"file":"getEncryptedData.js","sources":["../../../src/utils/getEncryptedData/getEncryptedData.ts"],"sourcesContent":[null],"names":["getEncryptedData","data","base64PublicKey","keyBytes","Uint8Array","from","atob","c","charCodeAt","publicKey","crypto","subtle","importKey","name","hash","encodedData","TextEncoder","encode","encryptedData","encrypt","btoa","String","fromCharCode"],"mappings":"AAAO,eAAeA,gBAAgBA,CAACC,IAAY,EAAEC,eAAuB,EAAA;AAC1E;AACA,EAAA,MAAMC,QAAQ,GAAGC,UAAU,CAACC,IAAI,CAACC,IAAI,CAACJ,eAAe,CAAC,EAAEK,CAAC,IAAIA,CAAC,CAACC,UAAU,CAAC,CAAC,CAAC,CAAC;AAE7E;AACA,EAAA,MAAMC,SAAS,GAAG,MAAMC,MAAM,CAACC,MAAM,CAACC,SAAS,CAC7C,MAAM,EACNT,QAAQ,EACR;AACEU,IAAAA,IAAI,EAAE,UAAU;AAChBC,IAAAA,IAAI,EAAE;AACP,GAAA,EACD,KAAK,EACL,CAAC,SAAS,CAAC,CACZ;AAED;EACA,MAAMC,WAAW,GAAG,IAAIC,WAAW,EAAE,CAACC,MAAM,CAAChB,IAAI,CAAC;AAElD;EACA,MAAMiB,aAAa,GAAG,MAAMR,MAAM,CAACC,MAAM,CAACQ,OAAO,CAC/C;AACEN,IAAAA,IAAI,EAAE;AACP,GAAA,EACDJ,SAAS,EACTM,WAAW,CACZ;AAED;AACA,EAAA,OAAOK,IAAI,CAACC,MAAM,CAACC,YAAY,CAAC,GAAG,IAAIlB,UAAU,CAACc,aAAa,CAAC,CAAC,CAAC;AACpE;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pixel-react",
3
3
  "description": "Great for pixel-perfect, design-focused components in React",
4
- "version": "1.15.28",
4
+ "version": "1.15.30",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "lib/index.js",
7
7
  "types": "lib/index.d.ts",