Releases: alexmacarthur/typeit
Make More Flexible in Isomorphic Contexts
Due to how webpack was configured using TypeIt with tools like NextJS was causing errors on build, dealing with the window
not being existing. This version sets the global object to this
rather than the window
, which should prevent issues like this from occurring.
Fix Handling of HTML Entities
A bug was causing HTML entities to be handled incorrectly, leading to strange behavior of instances that tried to type them.
Example:
//-- This would break.
new TypeIt('#element', {
strings: ["Oats & bananas.", "Carrots & beans."]
});
This release fixes this issue.
Fix Whitespace Issue
When a the cursor was disabled, instances of TypeIt would often show some extra whitespace that should not have been there. A small CSS adjustment fixed the problem.
Big New Release
TypeIt v6 is a significant update to the library with a couple of breaking changes, but also a whole lotta neatness.
Breaking Changes
- The
autoStart
option has been changed towaitUntilVisible
. - Checking for instance states requires the use of the
.is()
method. - By default, all instances are inactive until the
.go()
method is explicitly called. - As a result, the
autoInit
parameter no longer exists.
New Features / Improvements
- Leverages modern JS features like async/await.
- Introduces an improved, more intuitive, and flexible API.
- Significantly expands test coverage.
- Supports typing into form inputs and textareas.
- Introduces an asynchronous
.exec()
companion method.
Fix Cursor Alignment Issues When Lines Break
This release addresses some cursor alignment issues that were occurring in Firefox when lines broke.
Fix Further Alignment Issues with Cursor
Previously, when an instance lacked characters between typing strings, vertical alignment of the cursor was unpredictable and strange. This release addresses that issue, making it much more reliable and predictable.
Fix Vertical Alignment Issues with Cursor
Previously, the vertical positioning of the cursor was set to bottom: 0
, which was causing issues with varying line height values. To solve this, the positioning is now set to top: auto
.
Fix Cursor Alignment Issues
This change makes aligns a cursor via position: absolute
in order to resolve some displacement and line break issues that were occurring.
As a result, each instance now includes a .ti-wrapper
element, which houses the .ti-container
and .ti-cursor
elements.
Fix Bug Causing Jumbled Text, Improve Code Organization
This release fixes some bugs causing unexpected behavior involving the autoInit
option and companion functions. Additionally, code is more effectively organized to separate concerns.
Ensure Required Arguments are Passed to Instances After Reset
When an instance was reset, the autoInit
argument was not being passed to the constructor, resulting in errors.