neiki-page-editor 0.1.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/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "neiki-page-editor",
3
+ "version": "0.1.0",
4
+ "description": "Lightweight, framework-agnostic visual page/CMS editor with iframe canvas rendering",
5
+ "type": "module",
6
+ "main": "dist/neiki-page-editor.js",
7
+ "module": "dist/neiki-page-editor.esm.js",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/neiki-page-editor.esm.js",
11
+ "require": "./dist/neiki-page-editor.js"
12
+ },
13
+ "./css": "./dist/neiki-page-editor.css"
14
+ },
15
+ "files": [
16
+ "dist/",
17
+ "php/",
18
+ "README.md"
19
+ ],
20
+ "scripts": {
21
+ "build": "node build.cjs",
22
+ "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --config jest.config.cjs test/unit/ --testPathPattern=\"\\.test\\.js$\"",
23
+ "test:property": "node --experimental-vm-modules node_modules/jest/bin/jest.js --config jest.config.cjs test/property/ --testPathPattern=\"\\.property\\.js$\"",
24
+ "test:integration": "node --experimental-vm-modules node_modules/jest/bin/jest.js --config jest.config.cjs test/integration/ --testPathPattern=\"\\.test\\.js$\"",
25
+ "test:all": "node --experimental-vm-modules node_modules/jest/bin/jest.js --config jest.config.cjs"
26
+ },
27
+ "keywords": [
28
+ "editor",
29
+ "page-editor",
30
+ "cms",
31
+ "rich-text",
32
+ "wysiwyg",
33
+ "iframe",
34
+ "vanilla-js"
35
+ ],
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "https://github.com/neikiri/neiki-page-editor"
39
+ },
40
+ "author": "neikiri",
41
+ "license": "SEE LICENSE IN LICENSE",
42
+ "devDependencies": {
43
+ "esbuild": "0.25.5",
44
+ "fast-check": "^3.22.0",
45
+ "jest": "29.7.0",
46
+ "jest-environment-jsdom": "29.7.0"
47
+ }
48
+ }
@@ -0,0 +1,24 @@
1
+ <?php
2
+ /**
3
+ * NeikiPageEditorSanitizer — server-side complement to the JS sanitizer.
4
+ * Uses PHP's built-in DOMDocument. No Composer dependencies.
5
+ *
6
+ * Usage:
7
+ * $safe = NeikiPageEditorSanitizer::sanitize($untrustedHtml);
8
+ *
9
+ * This is a stub — full implementation in Task 3.
10
+ */
11
+ class NeikiPageEditorSanitizer
12
+ {
13
+ /**
14
+ * Sanitize untrusted HTML using an allowlist approach.
15
+ *
16
+ * @param string $html Untrusted HTML input
17
+ * @return string Sanitized HTML safe for rendering and storage
18
+ */
19
+ public static function sanitize(string $html): string
20
+ {
21
+ // Stub — returns input unchanged until full implementation in Task 3.
22
+ return $html;
23
+ }
24
+ }