domma-js 0.9.7-alpha → 0.9.8-alpha

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/bin/domma-cli.js CHANGED
@@ -123,8 +123,8 @@ async function handleInit() {
123
123
  // Copy all templates with variable substitution
124
124
  copyTemplatesRecursive(templatesDir, process.cwd(), vars);
125
125
 
126
- // Copy Domma dist files to frontend/dist
127
- const frontendDistDir = join(process.cwd(), 'frontend', 'dist');
126
+ // Copy Domma dist files to frontend/dist/domma
127
+ const frontendDistDir = join(process.cwd(), 'frontend', 'dist', 'domma');
128
128
  console.log(`\n Copying Domma distribution files...\n`);
129
129
 
130
130
  if (!existsSync(frontendDistDir)) {
@@ -232,7 +232,7 @@ async function handleAddPage() {
232
232
  * Create a new page from template
233
233
  */
234
234
  function createPage(pageName) {
235
- const pagesDir = join(process.cwd(), 'frontend', 'pages', pageName);
235
+ const pagesDir = join(process.cwd(), 'pages', pageName);
236
236
 
237
237
  if (existsSync(pagesDir)) {
238
238
  console.error(`\n ✗ Page "${pageName}" already exists`);
@@ -289,7 +289,7 @@ function createPage(pageName) {
289
289
  writeFileSync(join(pagesDir, 'index.html'), html);
290
290
  writeFileSync(join(pagesDir, `${pageName}.js`), js);
291
291
 
292
- console.log(`\n ✓ Page created: frontend/pages/${pageName}/`);
292
+ console.log(`\n ✓ Page created: pages/${pageName}/`);
293
293
  console.log(` - index.html`);
294
294
  console.log(` - ${pageName}.js\n`);
295
295
  console.log(` Don't forget to add it to your navbar in domma.config.json!\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "domma-js",
3
- "version": "0.9.7-alpha",
3
+ "version": "0.9.8-alpha",
4
4
  "description": "Dynamic Object Manipulation & Modeling API - A complete front-end toolkit.",
5
5
  "main": "public/dist/domma.min.js",
6
6
  "module": "public/dist/domma.esm.js",
@@ -6,11 +6,12 @@
6
6
  */
7
7
 
8
8
  $(() => {
9
- // Determine config path based on page depth
9
+ // Determine config path based on page location
10
10
  // Root pages (pages/index.html) need ../domma.config.json
11
11
  // Sub-pages (pages/about/index.html) need ../../domma.config.json
12
- const pathDepth = window.location.pathname.split('/').filter(Boolean).length;
13
- const configPath = pathDepth > 2 ? '../../domma.config.json' : '../domma.config.json';
12
+ const pathname = window.location.pathname;
13
+ const isSubPage = pathname.match(/\/pages\/[^/]+\//) !== null;
14
+ const configPath = isSubPage ? '../../domma.config.json' : '../domma.config.json';
14
15
 
15
16
  // Load configuration
16
17
  Domma.http.get(configPath).then(config => {
@@ -6,10 +6,10 @@
6
6
  <title>About - {{projectName}}</title>
7
7
 
8
8
  <!-- Domma CSS -->
9
- <link rel="stylesheet" href="../../dist/domma.css">
10
- <link rel="stylesheet" href="../../dist/grid.css">
11
- <link rel="stylesheet" href="../../dist/elements.css">
12
- <link rel="stylesheet" href="../../dist/themes/domma-themes.css">
9
+ <link rel="stylesheet" href="../../dist/domma/domma.css">
10
+ <link rel="stylesheet" href="../../dist/domma/grid.css">
11
+ <link rel="stylesheet" href="../../dist/domma/elements.css">
12
+ <link rel="stylesheet" href="../../dist/domma/themes/domma-themes.css">
13
13
 
14
14
  <!-- Custom CSS -->
15
15
  <link rel="stylesheet" href="../../css/custom.css">
@@ -218,8 +218,11 @@
218
218
  <!-- Footer -->
219
219
  <footer class="page-footer"></footer>
220
220
 
221
+ <!-- Security: DOMPurify for XSS protection -->
222
+ <script src="https://cdn.jsdelivr.net/npm/dompurify@3.2.5/dist/purify.min.js"></script>
223
+
221
224
  <!-- Domma JavaScript -->
222
- <script src="../../dist/domma.min.js"></script>
225
+ <script src="../../dist/domma/domma.min.js"></script>
223
226
 
224
227
  <!-- App Initialization -->
225
228
  <script src="../../js/app.js"></script>
@@ -6,10 +6,10 @@
6
6
  <title>Blog - {{projectName}}</title>
7
7
 
8
8
  <!-- Domma CSS -->
9
- <link rel="stylesheet" href="../../dist/domma.css">
10
- <link rel="stylesheet" href="../../dist/grid.css">
11
- <link rel="stylesheet" href="../../dist/elements.css">
12
- <link rel="stylesheet" href="../../dist/themes/domma-themes.css">
9
+ <link rel="stylesheet" href="../../dist/domma/domma.css">
10
+ <link rel="stylesheet" href="../../dist/domma/grid.css">
11
+ <link rel="stylesheet" href="../../dist/domma/elements.css">
12
+ <link rel="stylesheet" href="../../dist/domma/themes/domma-themes.css">
13
13
 
14
14
  <!-- Custom CSS -->
15
15
  <link rel="stylesheet" href="../../css/custom.css">
@@ -207,8 +207,11 @@
207
207
  <!-- Footer -->
208
208
  <footer class="page-footer"></footer>
209
209
 
210
+ <!-- Security: DOMPurify for XSS protection -->
211
+ <script src="https://cdn.jsdelivr.net/npm/dompurify@3.2.5/dist/purify.min.js"></script>
212
+
210
213
  <!-- Domma JavaScript -->
211
- <script src="../../dist/domma.min.js"></script>
214
+ <script src="../../dist/domma/domma.min.js"></script>
212
215
 
213
216
  <!-- App Initialization -->
214
217
  <script src="../../js/app.js"></script>
@@ -6,10 +6,10 @@
6
6
  <title>Contact - {{projectName}}</title>
7
7
 
8
8
  <!-- Domma CSS -->
9
- <link rel="stylesheet" href="../../dist/domma.css">
10
- <link rel="stylesheet" href="../../dist/grid.css">
11
- <link rel="stylesheet" href="../../dist/elements.css">
12
- <link rel="stylesheet" href="../../dist/themes/domma-themes.css">
9
+ <link rel="stylesheet" href="../../dist/domma/domma.css">
10
+ <link rel="stylesheet" href="../../dist/domma/grid.css">
11
+ <link rel="stylesheet" href="../../dist/domma/elements.css">
12
+ <link rel="stylesheet" href="../../dist/domma/themes/domma-themes.css">
13
13
 
14
14
  <!-- Custom CSS -->
15
15
  <link rel="stylesheet" href="../../css/custom.css">
@@ -183,8 +183,11 @@
183
183
  <!-- Footer -->
184
184
  <footer class="page-footer"></footer>
185
185
 
186
+ <!-- Security: DOMPurify for XSS protection -->
187
+ <script src="https://cdn.jsdelivr.net/npm/dompurify@3.2.5/dist/purify.min.js"></script>
188
+
186
189
  <!-- Domma JavaScript -->
187
- <script src="../../dist/domma.min.js"></script>
190
+ <script src="../../dist/domma/domma.min.js"></script>
188
191
 
189
192
  <!-- App Initialization -->
190
193
  <script src="../../js/app.js"></script>
@@ -6,10 +6,10 @@
6
6
  <title>Cookie Policy - {{projectName}}</title>
7
7
 
8
8
  <!-- Domma CSS -->
9
- <link rel="stylesheet" href="../../dist/domma.css">
10
- <link rel="stylesheet" href="../../dist/grid.css">
11
- <link rel="stylesheet" href="../../dist/elements.css">
12
- <link rel="stylesheet" href="../../dist/themes/domma-themes.css">
9
+ <link rel="stylesheet" href="../../dist/domma/domma.css">
10
+ <link rel="stylesheet" href="../../dist/domma/grid.css">
11
+ <link rel="stylesheet" href="../../dist/domma/elements.css">
12
+ <link rel="stylesheet" href="../../dist/domma/themes/domma-themes.css">
13
13
 
14
14
  <!-- Custom CSS -->
15
15
  <link rel="stylesheet" href="../../css/custom.css">
@@ -369,8 +369,11 @@
369
369
  <!-- Footer -->
370
370
  <footer class="page-footer"></footer>
371
371
 
372
+ <!-- Security: DOMPurify for XSS protection -->
373
+ <script src="https://cdn.jsdelivr.net/npm/dompurify@3.2.5/dist/purify.min.js"></script>
374
+
372
375
  <!-- Domma JavaScript -->
373
- <script src="../../dist/domma.min.js"></script>
376
+ <script src="../../dist/domma/domma.min.js"></script>
374
377
 
375
378
  <!-- Global App Initialization -->
376
379
  <script src="../../js/app.js"></script>
@@ -6,11 +6,11 @@
6
6
  <title>Documentation - {{projectName}}</title>
7
7
 
8
8
  <!-- Domma CSS -->
9
- <link rel="stylesheet" href="../../dist/domma.css">
10
- <link rel="stylesheet" href="../../dist/grid.css">
11
- <link rel="stylesheet" href="../../dist/elements.css">
12
- <link rel="stylesheet" href="../../dist/themes/domma-themes.css">
13
- <link rel="stylesheet" href="../../dist/syntax.css">
9
+ <link rel="stylesheet" href="../../dist/domma/domma.css">
10
+ <link rel="stylesheet" href="../../dist/domma/grid.css">
11
+ <link rel="stylesheet" href="../../dist/domma/elements.css">
12
+ <link rel="stylesheet" href="../../dist/domma/themes/domma-themes.css">
13
+ <link rel="stylesheet" href="../../dist/domma/syntax.css">
14
14
 
15
15
  <!-- Custom CSS -->
16
16
  <link rel="stylesheet" href="../../css/custom.css">
@@ -272,9 +272,12 @@ Domma.theme.get(); // 'ocean-dark'</code></pre>
272
272
  <!-- Footer -->
273
273
  <footer class="page-footer"></footer>
274
274
 
275
+ <!-- Security: DOMPurify for XSS protection -->
276
+ <script src="https://cdn.jsdelivr.net/npm/dompurify@3.2.5/dist/purify.min.js"></script>
277
+
275
278
  <!-- Domma JavaScript -->
276
- <script src="../../dist/domma.min.js"></script>
277
- <script src="../../dist/domma-syntax.min.js"></script>
279
+ <script src="../../dist/domma/domma.min.js"></script>
280
+ <script src="../../dist/domma/domma-syntax.min.js"></script>
278
281
 
279
282
  <!-- App Initialization -->
280
283
  <script src="../../js/app.js"></script>
@@ -6,10 +6,10 @@
6
6
  <title>{{projectName}} - Home</title>
7
7
 
8
8
  <!-- Domma CSS -->
9
- <link rel="stylesheet" href="../dist/domma.css">
10
- <link rel="stylesheet" href="../dist/grid.css">
11
- <link rel="stylesheet" href="../dist/elements.css">
12
- <link rel="stylesheet" href="../dist/themes/domma-themes.css">
9
+ <link rel="stylesheet" href="../dist/domma/domma.css">
10
+ <link rel="stylesheet" href="../dist/domma/grid.css">
11
+ <link rel="stylesheet" href="../dist/domma/elements.css">
12
+ <link rel="stylesheet" href="../dist/domma/themes/domma-themes.css">
13
13
 
14
14
  <!-- Custom CSS -->
15
15
  <link rel="stylesheet" href="../css/custom.css">
@@ -149,8 +149,11 @@
149
149
  <!-- Footer -->
150
150
  <footer class="page-footer"></footer>
151
151
 
152
+ <!-- Security: DOMPurify for XSS protection -->
153
+ <script src="https://cdn.jsdelivr.net/npm/dompurify@3.2.5/dist/purify.min.js"></script>
154
+
152
155
  <!-- Domma JavaScript -->
153
- <script src="../dist/domma.min.js"></script>
156
+ <script src="../dist/domma/domma.min.js"></script>
154
157
 
155
158
  <!-- Global App Initialization -->
156
159
  <script src="../js/app.js"></script>
@@ -265,8 +265,11 @@
265
265
  <!-- Footer -->
266
266
  <footer class="page-footer"></footer>
267
267
 
268
+ <!-- Security: DOMPurify for XSS protection -->
269
+ <script src="https://cdn.jsdelivr.net/npm/dompurify@3.2.5/dist/purify.min.js"></script>
270
+
268
271
  <!-- Domma JavaScript -->
269
- <script src="../../dist/domma.min.js"></script>
272
+ <script src="../../dist/domma/domma.min.js"></script>
270
273
 
271
274
  <!-- Global App Initialization -->
272
275
  <script src="../../js/app.js"></script>
@@ -6,10 +6,10 @@
6
6
  <title>Terms of Service - {{projectName}}</title>
7
7
 
8
8
  <!-- Domma CSS -->
9
- <link rel="stylesheet" href="../../dist/domma.css">
10
- <link rel="stylesheet" href="../../dist/grid.css">
11
- <link rel="stylesheet" href="../../dist/elements.css">
12
- <link rel="stylesheet" href="../../dist/themes/domma-themes.css">
9
+ <link rel="stylesheet" href="../../dist/domma/domma.css">
10
+ <link rel="stylesheet" href="../../dist/domma/grid.css">
11
+ <link rel="stylesheet" href="../../dist/domma/elements.css">
12
+ <link rel="stylesheet" href="../../dist/domma/themes/domma-themes.css">
13
13
 
14
14
  <!-- Custom CSS -->
15
15
  <link rel="stylesheet" href="../../css/custom.css">
@@ -357,8 +357,11 @@
357
357
  <!-- Footer -->
358
358
  <footer class="page-footer"></footer>
359
359
 
360
+ <!-- Security: DOMPurify for XSS protection -->
361
+ <script src="https://cdn.jsdelivr.net/npm/dompurify@3.2.5/dist/purify.min.js"></script>
362
+
360
363
  <!-- Domma JavaScript -->
361
- <script src="../../dist/domma.min.js"></script>
364
+ <script src="../../dist/domma/domma.min.js"></script>
362
365
 
363
366
  <!-- Global App Initialization -->
364
367
  <script src="../../js/app.js"></script>
@@ -6,10 +6,10 @@
6
6
  <title>{{pageTitle}} - My Project</title>
7
7
 
8
8
  <!-- Domma CSS -->
9
- <link rel="stylesheet" href="../../dist/domma.css">
10
- <link rel="stylesheet" href="../../dist/grid.css">
11
- <link rel="stylesheet" href="../../dist/elements.css">
12
- <link rel="stylesheet" href="../../dist/themes/domma-themes.css">
9
+ <link rel="stylesheet" href="../../dist/domma/domma.css">
10
+ <link rel="stylesheet" href="../../dist/domma/grid.css">
11
+ <link rel="stylesheet" href="../../dist/domma/elements.css">
12
+ <link rel="stylesheet" href="../../dist/domma/themes/domma-themes.css">
13
13
 
14
14
  <!-- Custom CSS -->
15
15
  <link rel="stylesheet" href="../../css/custom.css">
@@ -39,8 +39,11 @@
39
39
  <!-- Footer -->
40
40
  <footer class="page-footer"></footer>
41
41
 
42
+ <!-- Security: DOMPurify for XSS protection -->
43
+ <script src="https://cdn.jsdelivr.net/npm/dompurify@3.2.5/dist/purify.min.js"></script>
44
+
42
45
  <!-- Domma JavaScript -->
43
- <script src="../../dist/domma.min.js"></script>
46
+ <script src="../../dist/domma/domma.min.js"></script>
44
47
 
45
48
  <!-- Global App Initialization -->
46
49
  <script src="../../js/app.js"></script>