Skip to content

Releases: ianclemence/zenscript

v1.7.0 — 11 New Features

Choose a tag to compare

@ianclemence ianclemence released this 22 Aug 04:45

What's New in v1.7.0

Features

F1: Enhanced Word Count Progress Bar

  • Animated progress bar with smooth cubic-bezier transitions
  • Milestone markers at 25%, 50%, 75% that light up as you write
  • Celebration animation when reaching your goal

F2: Offline Resilience

  • Service worker now properly caches esm.sh/* wildcard imports
  • Separate CDN cache layer for immutable assets (cache-first strategy)
  • Offline fallback page with retry button when disconnected

F3: Improved Footnotes

  • Footnote section now has a 'Footnotes' heading
  • Better backref styling with accent color and hover effects
  • Proper footnote content parsing (strips single

    wrapper)

F4: Backlinks Panel

  • Toggle button added to viewer header
  • Keyboard shortcut: Ctrl+Shift+B
  • Auto-refreshes when switching files
  • Active state indicator on button

F5: Full-Text Vault Search

  • Now also scans idb-keyval stored files (not just DB list)
  • Keyboard shortcut: Ctrl+Shift+F focuses the search input
  • Results grouped by file with line numbers and highlighted matches

F6: Frontmatter Metadata UI

  • New aliases field (comma-separated, writes \�liases: [...])
  • Custom fields section with add/remove key-value pairs
  • Parses existing frontmatter including custom fields on open

F7: PDF Export Improvements

  • Title header and date stamp on every page
  • Header and footer lines for professional appearance
  • Enhanced @media print CSS with page-break rules for headings, code blocks, tables, and images

F8: Image/Attachment Embedding

  • Paste images directly from clipboard (Ctrl+V) — stored as attachments
  • Drop files onto the editor — automatically stored and inserted
  • Works with any image format supported by the browser

F9: Multi-Cursor Commands

  • Added to command palette: Add Cursor, Select Next/All Occurrences, Undo Cursor
  • Documented in help modal under new 'Multi-Cursor' section
  • Shortcuts: Alt+Click, Ctrl+D, Ctrl+U, Ctrl+Shift+L

F10: Note Templates

  • Template variables: {{date}}, {{weekday}}, {{time}}, {{title}}\
  • Custom templates saved to IndexedDB (persist across sessions)
  • 'Save Current' card in template picker to save any note as template

F11: Explorer Drag-and-Drop Reordering

  • Position-aware drop indicators (shows before/after with colored border)
  • Sort order persisted in localStorage per folder
  • Visual feedback during drag operations

Bug Fixes

  • Template content now uses variables instead of hardcoded dates
  • Backlinks panel properly toggles active state on button
  • Metadata panel correctly parses and preserves custom frontmatter fields

Technical

  • Service worker updated to v7 with CDN_CACHE separation
  • Template system generalized with \expandTemplateVars()\ function
  • Explorer sort respects custom order from localStorage

v1.6.0

Choose a tag to compare

@ianclemence ianclemence released this 22 Aug 02:44

v1.6.0 — Explorer, Restore, and Save-as Fixes

Explorer visibility

  • Imported/single-file-opened files now appear in the file explorer after saving. A vault copy is kept in IndexedDB on open and stays in sync on every save, so they appear in the explorer like any other open file. Name collisions are guarded so an existing vault file is never silently overwritten.

Tab switching save bug

  • Autosave no longer fires for already-saved files when switching tabs. Autosave now only writes when \isUnsaved\ is true, and any pending timer is cancelled on tab switch. This prevents redundant 'Saved' notifications for files that were not edited.

Restore flow

  • Restore no longer prompts twice for the same folder. Pending mount entries are de-duplicated by name, already-granted entries skip the permission prompt, and re-entrancy is guarded so a double-click can't spawn duplicate OS dialogs.
  • Stale mounts are cleaned up — a mounted folder whose underlying directory was deleted on disk no longer surfaces a useless 'Restore' banner on every refresh.

Stale mount / refresh crash

  • refreshExplorer no longer crashes when a mounted folder is missing. \�uildFileTree\ and \scanDirectory\ now skip any mount that throws \NotFoundError, so a single deleted folder can no longer break the entire explorer rebuild or prevent new files from appearing.

Reload survival

  • Imported files survive a page reload.
    estoreTabsState\ now detects orphaned \ s\ tabs (no handle) that have a DB copy and converts them to \db\ source, so saving works normally after reload.

Delete cleanup

  • Deleting a vault file now cleans up the imported-file tracking set, so a later save does not silently resurrect a deleted vault copy.

Save-as flow

  • The save-as prompt no longer loops with an endless alert. The 'already exists' branch now uses a confirm-overwrite instead of alert+continue, and the prompt is pre-filled with the file's current name so an unsaved file keeps its own name on save.
  • New tabs get unique names (\untitled.md, \untitled 2.md, …) instead of all being \Untitled.md, so they don't visually collide or clobber each other.

Stats

  • 1 file changed, 219 insertions, 42 deletions
  • 7 issues fixed

v1.5.0

Choose a tag to compare

@ianclemence ianclemence released this 10 Aug 02:29

Implemented Changes

  • Offline editor (Service Worker precache)

    • Bumped SW cache to v6 and precached CodeMirror 6 + its esm.sh dependency tree so the editor mounts offline: sw.js
  • Filesystem autosave & restored-tab re-linking

    • Re-link restored fs tabs to freshly mounted folder handles after a refresh so Ctrl+S / autosave write to the original file instead of spawning a duplicate
    • Re-enabled autosave for filesystem files, gated on write permission (picker-opened files stay read-only until granted)
    • Refuse to auto-create a file at the mount root when its subfolder is not open
  • Synchronous undo/redo

    • Removed CodeMirror's async history extension; toolbar undo/redo now push/pop the per-tab stack synchronously
    • Programmatic writes no longer pollute the undo stack or mark tabs dirty
  • History cleanup

    • Split session history into per-file storage keys with automatic migration of legacy data
    • Removed dead Copy Link UI; deduped shadowed markAsUnsaved/openFileFromDB definitions

Quick Verification Checklist

  • Offline: load once online, then DevTools "Offline" + refresh - the editor should still mount and work.
  • FS autosave: mount a folder, toggle autosave on, edit a file, refresh, then press Ctrl+S - it should write to the original file (no duplicate at mount root).
  • History: open the History panel - existing per-file snapshots should still render after migration.
  • Undo/redo: type and press Ctrl+Z / toolbar Undo - should revert instantly.

v1.4.0 — DOMPurify XSS

Choose a tag to compare

@ianclemence ianclemence released this 23 May 09:50

Implemented Changes

  • DOMPurify XSS sanitization

    • Added DOMPurify CDN script to the head: index.html
    • Sanitized compiled Markdown HTML before injecting into the preview, with an allowlist regex that permits attachment: and blob: (plus http, https, mailto, data): updatePreview
  • Offline mode (Service Worker caching)

    • Added Service Worker registration during init: index.html
    • Implemented caching Service Worker (app shell + CDN assets): sw.js
  • Performance (Search debouncing)

    • Debounced global search execution by 300ms: index.html
  • Performance (Web Worker for LCS diff)

    • Moved LCS/diff computation into a Web Worker (inline blob worker code), added async diff rendering with a loading state: history diff worker + openHistoryDiff
  • Programmatic event binding (removed inline handlers)

    • Removed all inline onclick="..." handlers and bound actions in JS (toolbar format buttons, dropdown items, panel/modal close buttons): setupEventListeners

Quick Verification Checklist

  • XSS: type <img src=x onerror=alert(1)> or <script>alert(1)</script> in the editor → preview should not execute.
  • Offline: load once online → then DevTools “Offline” + refresh → app and CDN features should still load (after SW install/activation).
  • Search: type into global search → results should update after ~300ms pause.
  • Diff: open a history diff → should show “Computing diff…” briefly and stay responsive.

v1.3.0 — Linked Knowledge

Choose a tag to compare

@ianclemence ianclemence released this 13 Apr 14:20

✨ New Features

  • Wiki-Linked Notes — Write [[note-name]] in any markdown file to create clickable cross-references between notes. Existing notes open instantly; missing notes are created on-demand with a single click, hyphenated filenames, and .md extension auto-added.

  • Links Dropdown — A toolbar button (↪) opens a floating panel listing all outgoing [[wiki-links]] from the current note, styled and positioned identically to the Table of Contents panel. Click any link to navigate or create the target note.

  • Backlinks Panel — A sidebar panel automatically surfaces all notes that link to the current file, showing the filename and a context snippet. Click any backlink to jump to the source note.

  • Knowledge Graph — A full-screen modal visualizes your notes as an animated force-directed graph — nodes represent notes, lines represent [[wiki-links]] between them. The current note is highlighted in accent color. Click any node to open that note. Built entirely in vanilla SVG with no external graph library.

  • Auto-Hyphenated Filenames — Notes created from wiki-links or via the file explorer (inline or prompt) automatically have spaces replaced with hyphens (Soren Kierkegaard → Soren-Kierkegaard.md), while the heading inside the file remains clean.


🐛 Bug Fixes

  • Graph Node Click Errors — Clicking nodes in the Knowledge Graph no longer throws "Error reading file." Previously the graph called openFile() with only a path (no FileSystemFileHandle), which always failed. Now correctly uses the same open logic as the rest of the app.

  • Duplicate Tabs After Refresh — Opening a file from the explorer after a browser refresh no longer creates duplicate tabs. Previously, tabs restored from storage had fileHandle = null (unserializable), causing the existing-tab check to always miss them.

  • Auto-Created Notes Not Showing in Explorer — Notes created from wiki-links now immediately appear in the file explorer tree without requiring a manual refresh.

  • Auto-Created Notes Not Highlighted in Tab Bar — Opening a newly created note now correctly activates its tab in the tab bar.

  • False "Created" Notifications — Clicking a wiki-link to an existing note no longer incorrectly shows a "Created" notification. The system now checks whether the file already exists before saving.

  • Incomplete Backlinks & Graph Data — Backlinks and Knowledge Graph now correctly read from the primary file storage (IndexedDB Dexie store) in addition to idbKeyval, fixing missing connections for files created through the explorer.


🔧 Improvements

  • Deduplicated Tab Opening Logic — All entry points for opening files (explorer clicks, backlinks, graph nodes, wiki-links) now consistently check whether a tab is already open before creating a new one, and switch to the existing tab if so.

  • Cleaner Filename Conventions — Hyphenated filenames enforced across all creation paths (wiki-links, inline create, prompt create) for consistent, URL-safe note naming.

  • Graph Modal UX — Knowledge Graph moved from a side panel to a centered modal with backdrop blur, matching the Help modal pattern for better focus and readability.


💎 Compatibility

  • No breaking changes. Existing workspaces and files remain fully compatible.

v1.2.0 — Folder Operations & Mobile Polish

Choose a tag to compare

@ianclemence ianclemence released this 19 Mar 05:17
c54eaa0

✨ New Features

  • Recursive Folder Moves — Full support for moving folders with all their contents in both IndexedDB and File System Access API workspaces. Open tabs automatically update to reflect new paths.
  • File System Renaming — Enabled rename functionality for files and folders when using the File System Access API, with proper path propagation to all descendant items.

🐛 Bug Fixes

  • Mobile Context Menu Layering — Fixed an issue where the explorer context menu would appear behind the sidebar on mobile devices by increasing its z-index priority.
  • Mobile Toolbar Disappearance — Resolved a layout bug where the formatting toolbar could be crushed or hidden on mobile screens with short filenames. The action buttons now properly occupy their own row with improved visual separation.

🔧 Improvements

  • Unified Rename Logic — Consolidated rename operations across storage backends for consistent behavior.
  • Enhanced Path Synchronization — All path changes (moves and renames) now correctly propagate to active editor tabs, preventing "file not found" scenarios.

Compatibility

  • No breaking changes. Existing workspaces and files remain fully compatible.

v1.1.0 — Search, Export, and Performance Updates

Choose a tag to compare

@ianclemence ianclemence released this 16 Mar 04:00

Search

  • Recursive search across folders
  • DB workspace search parity
  • Click results to jump to the exact line

Export

  • New embedded HTML export with attachments included

History

  • Retention controls (7/30/90 days)

Attachments

  • Attachment manager to review size and remove items

Performance

  • Live preview toggle with throttled updates for large documents

v1.0.0 — First Release

Choose a tag to compare

@ianclemence ianclemence released this 16 Mar 01:54

Highlights

  • Initial public release of ZenScript
  • Multi‑tab editor with autosave and live preview
  • Offline‑first storage using IndexedDB

Exports

  • Export to Markdown, HTML, PDF, and image

UX

  • Theme switching and font size preferences
  • Templates, metadata, and history tools