@dmitryvim/form-builder 0.1.33 → 0.1.34

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/index.html CHANGED
@@ -4,7 +4,28 @@
4
4
  <meta charset="utf-8" />
5
5
  <title>Form Builder - JSON Schema to Dynamic Forms</title>
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1" />
7
- <script src="https://cdn.tailwindcss.com"></script>
7
+ <!-- Development only - replace with local Tailwind build for production -->
8
+ <script>
9
+ if (
10
+ location.hostname === "localhost" ||
11
+ location.hostname === "127.0.0.1" ||
12
+ location.protocol === "file:"
13
+ ) {
14
+ // Development environment - load Tailwind CDN
15
+ const script = document.createElement("script");
16
+ script.src = "https://cdn.tailwindcss.com";
17
+ document.head.appendChild(script);
18
+ } else {
19
+ // Production environment - load local CSS (implement local build)
20
+ console.warn(
21
+ "Production mode: Please implement local Tailwind CSS build",
22
+ );
23
+ const link = document.createElement("link");
24
+ link.rel = "stylesheet";
25
+ link.href = "./tailwind.min.css"; // Local build file
26
+ document.head.appendChild(link);
27
+ }
28
+ </script>
8
29
  <script>
9
30
  tailwind.config = {
10
31
  darkMode: "media",
@@ -113,7 +134,11 @@
113
134
  </div>
114
135
  </div>
115
136
  <div class="flex items-center space-x-4">
116
- <a href="./elements.html" class="text-sm text-blue-600 hover:text-blue-800">Element Types Documentation →</a>
137
+ <a
138
+ href="./elements.html"
139
+ class="text-sm text-blue-600 hover:text-blue-800"
140
+ >Element Types Documentation →</a
141
+ >
117
142
  </div>
118
143
  </div>
119
144
  </div>
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.1.33",
6
+ "version": "0.1.34",
7
7
  "description": "A reusable JSON schema form builder library",
8
8
  "main": "dist/form-builder.js",
9
9
  "module": "dist/form-builder.js",
@@ -25,8 +25,9 @@
25
25
  "dev": "npm run build && serve dist --single",
26
26
  "test": "jest",
27
27
  "format": "prettier --write .",
28
- "lint": "eslint src/ public/ test/ *.config.js",
29
- "lint:fix": "eslint src/ public/ test/ *.config.js --fix",
28
+ "lint": "eslint src/ public/ *.config.js",
29
+ "lint:fix": "eslint src/ public/ *.config.js --fix",
30
+ "sec:scan": "node tools/sec-scan.js",
30
31
  "prepare": "npm run build",
31
32
  "prepublishOnly": "npm run test && npm run lint && npm run build"
32
33
  },
@@ -44,7 +45,11 @@
44
45
  },
45
46
  "devDependencies": {
46
47
  "@eslint/js": "^9.35.0",
48
+ "@html-eslint/eslint-plugin": "^0.46.2",
49
+ "@html-eslint/parser": "^0.46.2",
47
50
  "eslint": "^9.35.0",
51
+ "eslint-plugin-no-unsanitized": "^4.1.4",
52
+ "eslint-plugin-security": "^3.0.1",
48
53
  "jest": "^29.0.0",
49
54
  "jest-environment-jsdom": "^29.7.0",
50
55
  "prettier": "^3.0.0",