@cosmos.gl/graph 2.3.0-beta.0 → 2.3.1-beta.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.
- package/.github/dco.yml +4 -0
- package/dist/helper.d.ts +13 -0
- package/dist/index.js +5657 -5093
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +69 -45
- package/dist/index.min.js.map +1 -1
- package/package.json +3 -1
- package/src/helper.ts +22 -0
- package/src/index.ts +7 -2
- package/src/modules/Lines/draw-curve-line.vert +7 -2
- package/src/modules/Points/draw-points.vert +19 -1
- package/src/modules/Points/index.ts +13 -1
package/.github/dco.yml
ADDED
package/dist/helper.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as regl } from 'regl';
|
|
2
|
+
import { default as DOMPurify } from 'dompurify';
|
|
2
3
|
export declare const isFunction: <T>(a: T) => boolean;
|
|
3
4
|
export declare const isArray: <T>(a: unknown | T[]) => a is T[];
|
|
4
5
|
export declare const isObject: <T>(a: T) => boolean;
|
|
@@ -9,3 +10,15 @@ export declare function rgbToBrightness(r: number, g: number, b: number): number
|
|
|
9
10
|
export declare function readPixels(reglInstance: regl.Regl, fbo: regl.Framebuffer2D): Float32Array;
|
|
10
11
|
export declare function clamp(num: number, min: number, max: number): number;
|
|
11
12
|
export declare function isNumber(value: number | undefined | null | typeof NaN): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Sanitizes HTML content to prevent XSS attacks using DOMPurify
|
|
15
|
+
*
|
|
16
|
+
* This function is used internally to sanitize HTML content before setting innerHTML,
|
|
17
|
+
* such as in attribution text. It uses a safe default configuration that allows
|
|
18
|
+
* only common safe HTML elements and attributes.
|
|
19
|
+
*
|
|
20
|
+
* @param html The HTML string to sanitize
|
|
21
|
+
* @param options Optional DOMPurify configuration options to override defaults
|
|
22
|
+
* @returns Sanitized HTML string safe for innerHTML usage
|
|
23
|
+
*/
|
|
24
|
+
export declare function sanitizeHtml(html: string, options?: DOMPurify.Config): string;
|