@tapcart/mobile-components 0.7.95 → 0.7.96

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.
@@ -1 +1 @@
1
- {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../components/ui/html.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,UAAU,SAAS;IACjB,SAAS,CAAC,EAAE,GAAG,CAAA;IACf,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,iBAAS,IAAI,CAAC,EAAE,SAAc,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,SAAS,2CAUvD;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
1
+ {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../components/ui/html.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,UAAU,SAAS;IACjB,SAAS,CAAC,EAAE,GAAG,CAAA;IACf,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,iBAAS,IAAI,CAAC,EAAE,SAAc,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,SAAS,2CAsBvD;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
@@ -1,7 +1,19 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import DOMPurify from "dompurify";
3
3
  function Html({ className = "", style, html }) {
4
- const cleanHtml = DOMPurify.sanitize(html);
4
+ // Configure DOMPurify to allow iframes and their common attributes
5
+ const cleanHtml = DOMPurify.sanitize(html, {
6
+ ADD_TAGS: ["iframe"],
7
+ ADD_ATTR: [
8
+ "allow",
9
+ "allowfullscreen",
10
+ "frameborder",
11
+ "scrolling",
12
+ "src",
13
+ "width",
14
+ "height",
15
+ ],
16
+ });
5
17
  return (_jsx("div", { className: className, style: style, dangerouslySetInnerHTML: { __html: cleanHtml } }));
6
18
  }
7
19
  export { Html };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tapcart/mobile-components",
3
- "version": "0.7.95",
3
+ "version": "0.7.96",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "style": "dist/styles.css",