nextjs-cms 0.9.4 → 0.9.5
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/dist/api/index.d.ts +3 -3
- package/dist/api/lib/serverActions.d.ts +3 -3
- package/dist/api/root.d.ts +6 -6
- package/dist/api/routers/navigation.d.ts +3 -3
- package/dist/core/fields/richText.d.ts.map +1 -1
- package/dist/core/fields/richText.js +2 -2
- package/dist/core/fields/select.d.ts +1 -1
- package/dist/core/sections/category.d.ts +4 -4
- package/dist/core/sections/hasItems.d.ts +4 -4
- package/dist/core/sections/section.d.ts +3 -3
- package/dist/core/sections/simple.d.ts +4 -4
- package/dist/core/security/dom.d.ts +1 -1
- package/dist/core/security/dom.d.ts.map +1 -1
- package/dist/core/security/dom.js +2 -2
- package/package.json +3 -3
|
@@ -7,5 +7,5 @@ export declare function escapeHTML(value: string | undefined | null): string | u
|
|
|
7
7
|
* Sanitize rich-text/HTML content using DOMPurify with a restrictive allow-list.
|
|
8
8
|
* Always returns a string (empty string when value is undefined or null).
|
|
9
9
|
*/
|
|
10
|
-
export declare function sanitizeRichText(value: string | undefined | null): string
|
|
10
|
+
export declare function sanitizeRichText(value: string | undefined | null): Promise<string>;
|
|
11
11
|
//# sourceMappingURL=dom.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../src/core/security/dom.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../src/core/security/dom.ts"],"names":[],"mappings":"AAaA;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAU/E;AA+DD;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAOxF"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import DOMPurify from 'isomorphic-dompurify';
|
|
2
1
|
const HTML_ESCAPE_LOOKUP = {
|
|
3
2
|
'&': '&',
|
|
4
3
|
'<': '<',
|
|
@@ -84,9 +83,10 @@ const RICH_TEXT_SANITIZE_CONFIG = {
|
|
|
84
83
|
* Sanitize rich-text/HTML content using DOMPurify with a restrictive allow-list.
|
|
85
84
|
* Always returns a string (empty string when value is undefined or null).
|
|
86
85
|
*/
|
|
87
|
-
export function sanitizeRichText(value) {
|
|
86
|
+
export async function sanitizeRichText(value) {
|
|
88
87
|
if (value === undefined || value === null || value.trim().length === 0) {
|
|
89
88
|
return '';
|
|
90
89
|
}
|
|
90
|
+
const { default: DOMPurify } = await import('isomorphic-dompurify');
|
|
91
91
|
return DOMPurify.sanitize(value, RICH_TEXT_SANITIZE_CONFIG);
|
|
92
92
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nextjs-cms",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -206,8 +206,8 @@
|
|
|
206
206
|
"tsx": "^4.20.6",
|
|
207
207
|
"typescript": "^5.9.2",
|
|
208
208
|
"@lzcms/eslint-config": "0.3.0",
|
|
209
|
-
"@lzcms/
|
|
210
|
-
"@lzcms/
|
|
209
|
+
"@lzcms/tsconfig": "0.1.0",
|
|
210
|
+
"@lzcms/prettier-config": "0.1.0"
|
|
211
211
|
},
|
|
212
212
|
"license": "MIT",
|
|
213
213
|
"keywords": [
|