github zumerlab/snapdom v2.5.0

4 hours ago

What's Changed

Major overhaul for snapDOM: a significant effort to bring everything up to date with extensive fixes and performance improvements.

  • fix: CSS vars perf, scrollbar styles, SVG image inline, nested line-clamp, iframe pseudos & isolation, Tailwind border (#334 #341 #348 #362 #371 #372 #386) #387
  • fix: enable image download on iOS via Web Share API #384
  • feat(scrollbar): implement custom scrollbar style collection for capture, ensuring styles are applied correctly. Closes #334 #334
  • feat(styles): normalize Tailwind border styles in capture and inlineAllStyles to ensure consistent output. Closes #362 #362
  • feat(lineClamp): introduce lineClampTree function to apply line-clamp to nested elements, enhancing ellipsis rendering. Closes #386 #386
  • test(styles): add tests for excluding CSS properties from snapshots, ensuring fidelity with CSS variables. Closes #348 #348
  • test(capture): add test for iframe CSS isolation to ensure wrapper div does not inherit iframe styles. Closes #372 #372
  • refactor(capture): replace getComputedStyle with getStyle for improved iframe support and consistency across style retrieval. Closes #371 #371
  • feat(pseudo): implement suppression of native ::before/::after pseudo-elements in cloned styles to prevent double rendering. Closes #359 #359
  • fix(capture): update Safari padding logic to avoid edge clipping by applying padding only when necessary based on bounding box transforms. Closes #333 #333
  • test(fonts): add test for cross-origin CSS support in embedCustomFonts function, verifying correct handling of custom CDN stylesheets. Closes #309 #309
  • feat(fonts): add fontStylesheetDomains option to support cross-origin CSS fetching, enhancing font loading capabilities. Closes #309, closes #370 #309 #370
  • feat(styles): add support for capturing -webkit-text-stroke properties in Safari to enhance style snapshot accuracy. Closes #340 #340
  • fix(styles): normalize inline styles to ensure !important rules in stylesheets correctly override inline styles in clones. Fixes #328. #328
  • refactor: improve dimension handling in deepClone and createCheckboxRadioReplacement functions for better accuracy and consistency. Closes #321. See #378 #321
  • refactor: enhance checkbox/radio replacement for Firefox with SVG implementation for consistent rendering and improved styling. Closes #290 #290
  • fix(background): resolve relative URLs and fallback to background shorthand for url() when background-image is empty. Closes #343 #343
  • fix: enable image download on iOS via Web Share API #383
  • feat(tests): add comprehensive test coverage for various modules including exporters, utils, and modules to improve overall code reliability 06cc896
  • feat(debug): introduce debug option to log suppressed errors for troubleshooting, enhancing error visibility during capture processes f107bbe
  • fix: Firefox checkbox radio replacement b97e553
  • refactor(cache): implement EvictingMap for cache management to limit memory usage and improve performance 212cd4f
  • refactor(styles): improve height handling for transparent wrappers to support margin collapsing and enhance layout stability c50ccef
  • fix(styles): prevent overriding border styles when using border-image, and improve getStyle fallback handling a5857c5
  • feat(images): add support for inlining SVG <image> elements as data URLs, addressing #341. f7d4616
  • feat(safari): implement font and image decode warmup for Safari to address WebKit Bug #219770, enhancing capture reliability ad450ce
  • test(getStyle): add tests to ensure getStyle never returns undefined for elements and pseudo-elements 83c3854
  • refactor(snapdom): streamline plugin exports by consolidating export functions into a loop for improved maintainability ca35387
  • feat(capture): enhance DOM capture dimensions for root elements by measuring scroll dimensions and using a temporary container for accurate height and width calculations 31e50f2
  • fix(css): enhance getWindowForElement and getStyle functions to handle cross-document scenarios and improve fallback logic b0fbc8d
  • refactor(context): remove inline cache policy normalization and import from cache module for improved code organization 0492756
  • feat(safari): add safariWarmupAttempts option to optimize font and image decoding for improved capture performance 2474c05
  • fix(styles): prevent width constraints on inline and specific tags to avoid text wrapping issues 674ef27
  • chore: update contributors list b30de75
  • docs: update README files to replace NPM version badge with weekly downloads badge 8e12d01
  • chore(.gitignore): add 'demos/' directory to .gitignore to exclude demo files from version control fa34905
  • refactor(prepare): simplify deepClone call by removing redundant element argument for cleaner code 399bfaf
  • fix(styles): adjust inline style for timestamp demo to prevent text wrapping b88e8d7
  • fix(snapdom): remove redundant safariWarmup reset to improve iteration logic 72d3fb7
  • Merge PR #384: enable image download on iOS via Web Share API 05bc67c
  • Merge main into dev (2.1.0) 5f5ab34

New Contributors

Full Changelog: v2.1.0...v2.5.0

Don't miss a new snapdom release

NewReleases is sending notifications on new releases.