Skip to content

Releases: 3rChuss/react-canvas-masker

Release v.1.2.0

20 Jan 11:14

Choose a tag to compare

Added

  • initialMask prop: Added initialMask?: string prop to MaskEditor to pre-load a mask provided as a base64 data URL (e.g., saved from toMask()), enabling resuming editing sessions or switching between saved masks.
    • The mask is applied once per unique value (to avoid redundant re-applications).
    • When applied it overwrites the current mask canvas, saves the state in history (so undo/redo works from that base), and notifies onMaskChange immediately.
  • Storybook demo: Added a reliable "Pre-load existing mask" story demonstrating save → clear → load workflow (includes a forced reload mechanism so the same mask value can be re-applied).
  • Tests: Added tests (Vitest + Testing Library) to validate initialMask behavior and subsequent editing.

Changed

  • Package version bumped to 1.2.0.