Skip to content

Latest commit

 

History

History
187 lines (110 loc) · 4.12 KB

CHANGELOG.md

File metadata and controls

187 lines (110 loc) · 4.12 KB

Changelog

Unreleased...

  • ...

2.3.1

2023-10-07

  • docs: Add JSDoc comments with links to the v2-branch's README file

2.3.0

2023-10-06

  • feat: If the monitored element has no generated content, then retry a few times
  • feat: Make useFormatMonitor hooks return the media info object
  • fix: Actually remove legacy media properties .format, .lastFormat

2.2.0

2023-05-24

  • feat: Add pkg.exports to improve ESM import resolutions

2.1.0

2022-12-15

  • feat: Allow passing callback/getter function to makeFormatMonitorHook
  • fix(ts): Flag FormatMonitorOptions.manual as optional
  • fix: Prevent error messages in jsdom environments

2.0.0 – 2.0.2

2022-12-14

  • BREAKING feat: Remove support for ancient browsers
  • BREAKING feat: Stop reading media name from font-family, use ::after only
  • BREAKING feat: Use named export for FormatChange class
  • BREAKING feat: Always export FormatChange, perform no-op on missing window
  • BREAKING feat: Split FormatChange.jQueryPlugin factory into standalone module formatchange/jquery
  • BREAKING feat: Split FormatChange.makeGroups into standalone module formatchange/makeGroups
  • BREAKING feat: makeGroups's group values arrays of group names
  • BREAKING feat: Remove media.format and media.lastFormat
  • feat: Modernize and remove side-effects to improve tree-shaking

1.8.1

2022-03-01

  • fix: Publish react module as ES5, for backwards compatibility

1.8.0

2022-02-23

  • feat: React helpers:
    • feat: Add makeFormatMonitorHook custom react hook builder
    • feat: Add type declarations
    • feat: Deprecate withMediaProps HOC
  • fix: Bugs in Type declarations

1.7.0

2022-02-21

  • feat: Add TypeScript type declarations

1.6.3 / 1.6.4

2018-11-04

  • Fix error when run on server/node. Export nothing/undefined when no window is found.
  • Fix hydration of server-side-rendered HTML. Make HOC only use getPropsFromMedia on componentDidMount

1.6.2

2018-10-31

  • Fix broken FormatChange.makeGroups

1.6.1

2018-10-31

  • Fix missing minified script

1.6.0

2018-10-31

  • Add formatchange/react module exporting withMediaProps HOC
  • Add static helper FormatChange.makeGroups

1.5.0

2018-09-24

  • Add .subscribe(callback, runImmediately); signature

1.4.2

2016-03-11

  • Fix infinite recusion in window resize check.

1.4.1

2016-03-11

  • Add a public .check() method for faster media checks with the manual option
  • Fix errors and omissions in the documentation

1.4.0

2016-03-11

  • Add win option to specify custom window object.
    (This allows an <iframe> to be monitored by its host page.)
  • Add elm option to provide a pre-generated monitoring Element.
    • Expose an instance's element as .elm
    • Query DOM for a preexisting element with elmId
  • Add manual option to not bind window.onresize
    (This allows a fully manual triggering of .refresh() which is extremely useful when emulating "element-queries")
  • Improve the CSS "hiding" of the monitoring element.

1.3.1

2016-03-10

  • Fix jQuery plugin re-run returning undefined

1.3.0

2015-11-23

  • Always register the jQuery plugin if jQuery is defined
    (This should be generally harmless, and creates a more seamless experience for developers moving from <script> tags towards Browserify or other CommonJS-like environment.)

1.2.0

2015-07-02

  • Rename media.format/.lastFormat --> media.is/.was
    (While still supporting the old property names)

1.1.2

2015-06-16

  • Workaround for IE11 not computing ::after immediately on new elms
    (Apparent regression in v. 11.0.9600.17843)

1.1.1

2015-06-13

  • Prevent subscription of falsy callbacks + instant double-trigger edge case

1.1.0

2015-03-12

  • Auto-trigger bound jQuery events asynchronously - if they've not been manually triggered in the meantime.

1.0.2

2014-09-22

  • Improve the CSS "hiding" of the monitoring element.

1.0.1

2014-09-04

  • Improved documentation

1.0.0

2014-09-03

  • Initial release as npm module