fimo-react 2.12.0 → 2.14.0

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.
@@ -36,8 +36,22 @@ function DefaultImage({ node }) {
36
36
  const alt = node.attrs?.alt ?? '';
37
37
  return _jsx("img", { src: src, alt: alt });
38
38
  }
39
+ function isHttpsUrl(value) {
40
+ if (typeof value !== 'string') {
41
+ return false;
42
+ }
43
+ try {
44
+ return new URL(value).protocol === 'https:';
45
+ }
46
+ catch {
47
+ return false;
48
+ }
49
+ }
39
50
  function DefaultIframe({ node }) {
40
51
  const src = node.attrs?.src;
52
+ if (!isHttpsUrl(src)) {
53
+ return null;
54
+ }
41
55
  return (_jsx("div", { style: {
42
56
  position: 'relative',
43
57
  width: '100%',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fimo-react",
3
- "version": "2.12.0",
3
+ "version": "2.14.0",
4
4
  "description": "React runtime for Fimo, the website platform for sites built with coding agents: CMS, previews, site agents, and hosting. Provides content clients, labels, and source-tracked primitives.",
5
5
  "keywords": [
6
6
  "cms",
@@ -51,12 +51,12 @@
51
51
  "test:watch": "vitest"
52
52
  },
53
53
  "devDependencies": {
54
- "@fimo/tsconfig": "2.12.0",
54
+ "@fimo/tsconfig": "2.14.0",
55
55
  "@tanstack/react-query": "^5.90.21",
56
56
  "@types/node": "22.18.6",
57
57
  "@types/react": "19.2.14",
58
58
  "@types/react-dom": "19.2.3",
59
- "fimo": "2.12.0",
59
+ "fimo": "2.14.0",
60
60
  "react": "19.2.4",
61
61
  "react-dom": "19.2.4",
62
62
  "typescript": "7.0.2",