create-volt 0.48.0 → 0.48.1

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/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@ All notable changes to `create-volt` are documented here. The format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/), and this project adheres to
5
5
  [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## [0.48.1] - 2026-06-29
8
+
9
+ ### Changed
10
+ - Config WYSIWYG loads RTEPro at a **major-version float** (`@1`) instead of a
11
+ pinned patch, so RTEPro 1.x updates flow without a create-volt release. Dropped
12
+ the marked dependency entirely — RTEPro takes markdown directly via setMarkdown().
13
+
7
14
  ## [0.48.0] - 2026-06-29
8
15
 
9
16
  ### Added
@@ -628,6 +635,7 @@ All notable changes to `create-volt` are documented here. The format follows
628
635
  watching and full-page hot reload. Supports `--skip-install` and `--force`,
629
636
  and auto-detects npm / pnpm / yarn / bun for the install step.
630
637
 
638
+ [0.48.1]: https://github.com/MIR-2025/volt/releases/tag/v0.48.1
631
639
  [0.48.0]: https://github.com/MIR-2025/volt/releases/tag/v0.48.0
632
640
  [0.47.0]: https://github.com/MIR-2025/volt/releases/tag/v0.47.0
633
641
  [0.46.0]: https://github.com/MIR-2025/volt/releases/tag/v0.46.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-volt",
3
- "version": "0.48.0",
3
+ "version": "0.48.1",
4
4
  "description": "Scaffold a new Volt app — no-build, signals-based UI with Socket.io hot reload.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -40,8 +40,7 @@
40
40
  });
41
41
  })();
42
42
  </script>
43
- <script src="https://cdn.jsdelivr.net/npm/rte-rich-text-editor-pro@1.0.22/rte-pro.js"></script>
44
- <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
43
+ <script src="https://cdn.jsdelivr.net/npm/rte-rich-text-editor-pro@1/rte-pro.js"></script>
45
44
  <script type="module" src="/setup.js"></script>
46
45
  </body>
47
46
  </html>
@@ -303,28 +303,28 @@ const items = signal({ pages: [], posts: [] });
303
303
  const editing = signal(null); // { type, slug, title, isNew } — set only on open/save/close
304
304
  let ed = null; // live RTEPro instance for the open editor
305
305
  const loadItems = async () => items(await (await fetch("/setup/content")).json());
306
- // raw .md → { title, bodyHtml } for the WYSIWYG (markdown rendered to HTML)
306
+ // raw .md → { title, body, isHtml }; RTEPro takes markdown directly (setMarkdown),
307
+ // so no markdown library is needed.
307
308
  function parseDoc(raw) {
308
309
  const fm = raw.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n/);
309
310
  const front = fm ? fm[1] : "";
310
311
  const title = ((front.match(/^title:\s*(.+)$/m) || [])[1] || "").trim();
311
- const body = fm ? raw.slice(fm[0].length) : raw;
312
- const bodyHtml = /^format:\s*html\s*$/m.test(front) ? body : window.marked.parse(body);
313
- return { title, bodyHtml };
312
+ return { title, body: fm ? raw.slice(fm[0].length) : raw, isHtml: /^format:\s*html\s*$/m.test(front) };
314
313
  }
315
- function mountEditor(bodyHtml) {
314
+ function mountEditor(doc) {
316
315
  ed = window.RTEPro.init("#mg-editor", { height: "60vh", placeholder: "Write…" });
317
- ed.setHTML(bodyHtml || "");
316
+ if (doc && doc.isHtml) ed.setHTML(doc.body || "");
317
+ else ed.setMarkdown((doc && doc.body) || "");
318
318
  }
319
319
  async function editItem(type, slug) {
320
320
  const d = await (await fetch(`/setup/content/raw?type=${type}&slug=${encodeURIComponent(slug)}`)).json();
321
- const { title, bodyHtml } = parseDoc(d.body || "");
322
- editing({ type, slug, title, isNew: false });
323
- queueMicrotask(() => mountEditor(bodyHtml));
321
+ const doc = parseDoc(d.body || "");
322
+ editing({ type, slug, title: doc.title, isNew: false });
323
+ queueMicrotask(() => mountEditor(doc));
324
324
  }
325
325
  function newItem(type) {
326
326
  editing({ type, slug: "", title: "", isNew: true });
327
- queueMicrotask(() => mountEditor(""));
327
+ queueMicrotask(() => mountEditor({ body: "", isHtml: false }));
328
328
  }
329
329
  // markdown can't round-trip complex layouts (columns, inline styles, merged cells,
330
330
  // embeds) — save those as HTML so they aren't flattened.
@@ -40,8 +40,7 @@
40
40
  });
41
41
  })();
42
42
  </script>
43
- <script src="https://cdn.jsdelivr.net/npm/rte-rich-text-editor-pro@1.0.22/rte-pro.js"></script>
44
- <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
43
+ <script src="https://cdn.jsdelivr.net/npm/rte-rich-text-editor-pro@1/rte-pro.js"></script>
45
44
  <script type="module" src="/setup.js"></script>
46
45
  </body>
47
46
  </html>
@@ -303,28 +303,28 @@ const items = signal({ pages: [], posts: [] });
303
303
  const editing = signal(null); // { type, slug, title, isNew } — set only on open/save/close
304
304
  let ed = null; // live RTEPro instance for the open editor
305
305
  const loadItems = async () => items(await (await fetch("/setup/content")).json());
306
- // raw .md → { title, bodyHtml } for the WYSIWYG (markdown rendered to HTML)
306
+ // raw .md → { title, body, isHtml }; RTEPro takes markdown directly (setMarkdown),
307
+ // so no markdown library is needed.
307
308
  function parseDoc(raw) {
308
309
  const fm = raw.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n/);
309
310
  const front = fm ? fm[1] : "";
310
311
  const title = ((front.match(/^title:\s*(.+)$/m) || [])[1] || "").trim();
311
- const body = fm ? raw.slice(fm[0].length) : raw;
312
- const bodyHtml = /^format:\s*html\s*$/m.test(front) ? body : window.marked.parse(body);
313
- return { title, bodyHtml };
312
+ return { title, body: fm ? raw.slice(fm[0].length) : raw, isHtml: /^format:\s*html\s*$/m.test(front) };
314
313
  }
315
- function mountEditor(bodyHtml) {
314
+ function mountEditor(doc) {
316
315
  ed = window.RTEPro.init("#mg-editor", { height: "60vh", placeholder: "Write…" });
317
- ed.setHTML(bodyHtml || "");
316
+ if (doc && doc.isHtml) ed.setHTML(doc.body || "");
317
+ else ed.setMarkdown((doc && doc.body) || "");
318
318
  }
319
319
  async function editItem(type, slug) {
320
320
  const d = await (await fetch(`/setup/content/raw?type=${type}&slug=${encodeURIComponent(slug)}`)).json();
321
- const { title, bodyHtml } = parseDoc(d.body || "");
322
- editing({ type, slug, title, isNew: false });
323
- queueMicrotask(() => mountEditor(bodyHtml));
321
+ const doc = parseDoc(d.body || "");
322
+ editing({ type, slug, title: doc.title, isNew: false });
323
+ queueMicrotask(() => mountEditor(doc));
324
324
  }
325
325
  function newItem(type) {
326
326
  editing({ type, slug: "", title: "", isNew: true });
327
- queueMicrotask(() => mountEditor(""));
327
+ queueMicrotask(() => mountEditor({ body: "", isHtml: false }));
328
328
  }
329
329
  // markdown can't round-trip complex layouts (columns, inline styles, merged cells,
330
330
  // embeds) — save those as HTML so they aren't flattened.
@@ -40,8 +40,7 @@
40
40
  });
41
41
  })();
42
42
  </script>
43
- <script src="https://cdn.jsdelivr.net/npm/rte-rich-text-editor-pro@1.0.22/rte-pro.js"></script>
44
- <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
43
+ <script src="https://cdn.jsdelivr.net/npm/rte-rich-text-editor-pro@1/rte-pro.js"></script>
45
44
  <script type="module" src="/setup.js"></script>
46
45
  </body>
47
46
  </html>
@@ -303,28 +303,28 @@ const items = signal({ pages: [], posts: [] });
303
303
  const editing = signal(null); // { type, slug, title, isNew } — set only on open/save/close
304
304
  let ed = null; // live RTEPro instance for the open editor
305
305
  const loadItems = async () => items(await (await fetch("/setup/content")).json());
306
- // raw .md → { title, bodyHtml } for the WYSIWYG (markdown rendered to HTML)
306
+ // raw .md → { title, body, isHtml }; RTEPro takes markdown directly (setMarkdown),
307
+ // so no markdown library is needed.
307
308
  function parseDoc(raw) {
308
309
  const fm = raw.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n/);
309
310
  const front = fm ? fm[1] : "";
310
311
  const title = ((front.match(/^title:\s*(.+)$/m) || [])[1] || "").trim();
311
- const body = fm ? raw.slice(fm[0].length) : raw;
312
- const bodyHtml = /^format:\s*html\s*$/m.test(front) ? body : window.marked.parse(body);
313
- return { title, bodyHtml };
312
+ return { title, body: fm ? raw.slice(fm[0].length) : raw, isHtml: /^format:\s*html\s*$/m.test(front) };
314
313
  }
315
- function mountEditor(bodyHtml) {
314
+ function mountEditor(doc) {
316
315
  ed = window.RTEPro.init("#mg-editor", { height: "60vh", placeholder: "Write…" });
317
- ed.setHTML(bodyHtml || "");
316
+ if (doc && doc.isHtml) ed.setHTML(doc.body || "");
317
+ else ed.setMarkdown((doc && doc.body) || "");
318
318
  }
319
319
  async function editItem(type, slug) {
320
320
  const d = await (await fetch(`/setup/content/raw?type=${type}&slug=${encodeURIComponent(slug)}`)).json();
321
- const { title, bodyHtml } = parseDoc(d.body || "");
322
- editing({ type, slug, title, isNew: false });
323
- queueMicrotask(() => mountEditor(bodyHtml));
321
+ const doc = parseDoc(d.body || "");
322
+ editing({ type, slug, title: doc.title, isNew: false });
323
+ queueMicrotask(() => mountEditor(doc));
324
324
  }
325
325
  function newItem(type) {
326
326
  editing({ type, slug: "", title: "", isNew: true });
327
- queueMicrotask(() => mountEditor(""));
327
+ queueMicrotask(() => mountEditor({ body: "", isHtml: false }));
328
328
  }
329
329
  // markdown can't round-trip complex layouts (columns, inline styles, merged cells,
330
330
  // embeds) — save those as HTML so they aren't flattened.
@@ -40,8 +40,7 @@
40
40
  });
41
41
  })();
42
42
  </script>
43
- <script src="https://cdn.jsdelivr.net/npm/rte-rich-text-editor-pro@1.0.22/rte-pro.js"></script>
44
- <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
43
+ <script src="https://cdn.jsdelivr.net/npm/rte-rich-text-editor-pro@1/rte-pro.js"></script>
45
44
  <script type="module" src="/setup.js"></script>
46
45
  </body>
47
46
  </html>
@@ -303,28 +303,28 @@ const items = signal({ pages: [], posts: [] });
303
303
  const editing = signal(null); // { type, slug, title, isNew } — set only on open/save/close
304
304
  let ed = null; // live RTEPro instance for the open editor
305
305
  const loadItems = async () => items(await (await fetch("/setup/content")).json());
306
- // raw .md → { title, bodyHtml } for the WYSIWYG (markdown rendered to HTML)
306
+ // raw .md → { title, body, isHtml }; RTEPro takes markdown directly (setMarkdown),
307
+ // so no markdown library is needed.
307
308
  function parseDoc(raw) {
308
309
  const fm = raw.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n/);
309
310
  const front = fm ? fm[1] : "";
310
311
  const title = ((front.match(/^title:\s*(.+)$/m) || [])[1] || "").trim();
311
- const body = fm ? raw.slice(fm[0].length) : raw;
312
- const bodyHtml = /^format:\s*html\s*$/m.test(front) ? body : window.marked.parse(body);
313
- return { title, bodyHtml };
312
+ return { title, body: fm ? raw.slice(fm[0].length) : raw, isHtml: /^format:\s*html\s*$/m.test(front) };
314
313
  }
315
- function mountEditor(bodyHtml) {
314
+ function mountEditor(doc) {
316
315
  ed = window.RTEPro.init("#mg-editor", { height: "60vh", placeholder: "Write…" });
317
- ed.setHTML(bodyHtml || "");
316
+ if (doc && doc.isHtml) ed.setHTML(doc.body || "");
317
+ else ed.setMarkdown((doc && doc.body) || "");
318
318
  }
319
319
  async function editItem(type, slug) {
320
320
  const d = await (await fetch(`/setup/content/raw?type=${type}&slug=${encodeURIComponent(slug)}`)).json();
321
- const { title, bodyHtml } = parseDoc(d.body || "");
322
- editing({ type, slug, title, isNew: false });
323
- queueMicrotask(() => mountEditor(bodyHtml));
321
+ const doc = parseDoc(d.body || "");
322
+ editing({ type, slug, title: doc.title, isNew: false });
323
+ queueMicrotask(() => mountEditor(doc));
324
324
  }
325
325
  function newItem(type) {
326
326
  editing({ type, slug: "", title: "", isNew: true });
327
- queueMicrotask(() => mountEditor(""));
327
+ queueMicrotask(() => mountEditor({ body: "", isHtml: false }));
328
328
  }
329
329
  // markdown can't round-trip complex layouts (columns, inline styles, merged cells,
330
330
  // embeds) — save those as HTML so they aren't flattened.