@asgard-js/react 0.0.27 → 0.0.31

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,20 @@
1
+ /**
2
+ * URI validation utilities for preventing XSS attacks via malicious URIs
3
+ */
4
+ /**
5
+ * Validates if a URI is safe to open with window.open()
6
+ *
7
+ * @param uri - The URI to validate
8
+ * @returns true if the URI is safe to open, false otherwise
9
+ */
10
+ export declare function isValidUri(uri: string | null | undefined): boolean;
11
+ /**
12
+ * Safely opens a URI after validation
13
+ *
14
+ * @param uri - The URI to open
15
+ * @param target - The window target (same as window.open target parameter)
16
+ * @param features - Window features (same as window.open features parameter)
17
+ * @returns The opened window reference or null if URI was blocked
18
+ */
19
+ export declare function safeWindowOpen(uri: string | null | undefined, target?: string, features?: string): Window | null;
20
+ //# sourceMappingURL=uri-validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uri-validation.d.ts","sourceRoot":"","sources":["../../src/utils/uri-validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAuBH;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAgDlE;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC9B,MAAM,CAAC,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,GAAG,IAAI,CASf"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asgard-js/react",
3
- "version": "0.0.27",
3
+ "version": "0.0.31",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -29,9 +29,13 @@
29
29
  "clsx": "^2.1.1",
30
30
  "dompurify": "^3.2.5",
31
31
  "highlight.js": "^11.11.1",
32
- "marked": "^15.0.8",
33
- "marked-highlight": "^2.2.1",
34
- "react-vega": "^7.6.0"
32
+ "katex": "^0.16.22",
33
+ "react-markdown": "^10.1.0",
34
+ "react-vega": "^7.6.0",
35
+ "rehype-highlight": "^7.0.2",
36
+ "rehype-katex": "^7.0.1",
37
+ "remark-gfm": "^4.0.1",
38
+ "remark-math": "^6.0.0"
35
39
  },
36
40
  "devDependencies": {
37
41
  "@testing-library/jest-dom": "^6.4.2",
@@ -46,7 +50,7 @@
46
50
  "vitest": "^1.6.0"
47
51
  },
48
52
  "peerDependencies": {
49
- "@asgard-js/core": "^0.0.27",
53
+ "@asgard-js/core": "^0.0.31",
50
54
  "react": "^18.0.0",
51
55
  "react-dom": "^18.0.0",
52
56
  "vega": "^6.1.2",
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-markdown-renderer.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/text-template/use-markdown-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAMV,MAAM,OAAO,CAAC;AAmBf,UAAU,oBAAoB;IAC5B,UAAU,EAAE,SAAS,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CACxB;AAuBD,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EACpB,KAAK,SAAM,GACV,oBAAoB,CAmFtB"}