Skip to content

v0.2.1-alpha

Pre-release
Pre-release

Choose a tag to compare

@not0kkinex not0kkinex released this 27 May 14:24
· 17 commits to master since this release

oSlide2 v0.2.1 — Release Notes

Toast Notification System

  • js/components/toast.js — 5 notification types: SUCCESS (green), ERROR (red), WARNING (yellow), INFO (blue), LOADING (blue + spin animation)
  • Auto-dismiss (3s) or persistent (LOADING)
  • Returns .dismiss() for manual control
  • Integrated into AI chat errors, file save success/errors, export operations
  • main.js IPC handlers wrapped with try/catch; error/success events sent to renderer
  • preload.js exposes onFileSaved / onFileError listeners
  • css/toast.css — slide-in-right animation, color-coded backgrounds

Performance Improvements

  • Diff-based thumbnail rendering (renderThumbs) — DOM operations only for added/removed slides; existing nodes reused. dataset.bg and dataset.thumb skip innerHTML updates when unchanged
  • CSS caching (renderSlide) — dataset.css skips style.cssText writes when unchanged
  • Content caching (renderSlide) — dataset.ck skips element re-render when content unchanged
  • Batch updates (canvas.js onUp) — multi-select drag calls single renderSlide() + renderThumbs() instead of per-element updEl() (N renders → 1 render)
  • Element handles — only added to newly created elements, skipped on updates

Documentation

  • docs/ARCHITECTURE.md — state flow diagram, module dependency graphs, undo/redo flow, canvas coordinate system
  • docs/API.md — full IPC handler reference (with param/return types), config schema, .slidelab format, Element Schema and Type Definitions sections
  • docs/CONTRIBUTING.md — code style rules (no semicolons, JSDoc required), load order, security rules, PR process
  • docs/JSDoc-STYLE.md — JSDoc3 format templates, single-line/multi-line rules, typedef examples
  • docs/DEVELOPMENT.md — setup, project structure, build commands, known issues, debugging
  • JSDoc comments added to all 10 JS modules (state.js, actions.js, renderer.js, canvas.js, panels.js, ai.js, ai-ui.js, fileManager.js, export.js, main.js): @param, @returns, @throws, @async, @typedef CoreState

Security Fixes

  • main.jsvalidateConfig(): type/range checks for config values, catches corrupt configs
  • main.jsvalidateThemeColor(): enforces #RRGGBB format, rejects invalid colors, defaults to #ffffff
  • main.jssave-project-themes IPC handler validates colors before saving
  • homeTheme.js_sanitizeColor() added, XSS prevention in renderThemes() innerHTML
  • renderMD() — href protocol whitelist only allows http:// and https://
  • Missing read-image IPC handler added to main.js (was defined in preload but handler was missing)

File System Fixes

  • open-file-dialog IPC handler now returns { data, filePath, fileName } (structured object instead of raw JSON)
  • homeProject.js openFileDialog_projectName and _projectPath passed to editor
  • editor.js loadData — defensive theme object handling (defaults to 'default' if .name missing)
  • .slidelab rect elements corrected: fill (background), borderColor, borderWidth, borderRadius — old bg/color fields removed
  • .slidelab files added to .gitignore, removed from version control (git rm --cached)

Modularization & Maintenance

  • home.js split into homeTheme.js, homeSettings.js, homeProject.js; home.js reduced to 4-line orchestrator
  • All hardcoded hex colors migrated to CSS variables (19 variables in :root, managed via _setCSS())
  • theme.js_setCSS() sets both light and dark mode CSS variables
  • ai.js — 4 separate system prompts consolidated into single SYSTEM_PROMPT constant
  • cloneObj() replaced with structuredClone()
  • editor.js split into ai-ui.js + export.js
  • AGENTS.md preserved, new docs/ folder created
  • Old LICENSE links removed from README
  • Version bumped 0.2.0 → 0.2.1