Skip to content

v1.2.0 - Shadow DOM Isolation & Deploy Cleanup

Choose a tag to compare

@pralambomanarivo pralambomanarivo released this 28 May 14:57
· 15 commits to main since this release

v1.2.0 - Shadow DOM Isolation & Deploy Cleanup

Highlights

This release focuses on making YChart safer to embed in production applications by completing Shadow DOM isolation, removing global UI/CSS bleed, and aligning the package build output with the published package metadata.


What^[\s New

Full Shadow DOM-Safe Rendering

  • Chart rendering now passes DOM element containers through the org chart and force graph paths instead of relying on document-level selectors.
  • Sidebar, swap mode, column adjustment, details panel, and related managers now query within the scoped chart/root context.
  • Node detail close handling no longer depends on inline document access.

Resize Handling

  • Added chart canvas ResizeObserver handling so the rendered chart recalculates after container changes such as closing devtools or resizing the viewport.
  • Force graph rendering now supports element containers and explicit resize updates.

Production CSS Isolation

  • Library design tokens are scoped under .ychart-container instead of global :root.
  • Removed React/@mieweb UI runtime rendering from the package path and replaced the shared bridge with vanilla DOM helpers.
  • Removed Tailwind/global UI output from generated package assets.

Build & Package Output

  • Removed the inline CSS injection wrapper from ychart-editor.js.
  • The library now emits ychart-editor.css directly, matching package.json style and exports metadata.
  • Removed the old ychart.css output in favor of ychart-editor.css.
  • build:prod now clears /var/www/html/dist before copying new assets, preventing stale symlinks/files from surviving deploys.

Demo Header Restoration

  • Demo-only root tokens restore the expected header spacing and typography without leaking those variables into embedded production pages.

Dependency Maintenance

  • Updated safe build tooling within current major versions.
  • Added CodeMirror pnpm overrides to keep a single compatible EditorView version in the bundle.
  • Added Node type definitions for Vite config diagnostics.

Validation

  • pnpm build passes.
  • pnpm pack --dry-run includes dist/ychart-editor.js, dist/ychart-editor.css, package.json, README.md, and dist/vite.svg.
  • Generated dist assets no longer contain the old ychart-editor-styles injector, Tailwind output, React, react-dom, or @mieweb/ui references.
  • Remote runner service was verified active before release.

Full Changelog: v1.1.0...v1.2.0