# v4.2.1 Convenience build. * Changed internals so that `CommandHandler` does not keep a reference to an engine -- this is to avoid circular references, which the browser doesn't care about but other embedded environments do. * The engine for commands are now typed as `InkEngine`, which contains all of the getters that the engine has (The actual object passed in has not changed) * commands now also have a `text` field, so you don't have to check whether it exists now. # v4.2.0 * **Removed the optional `tokens` field on inkLine** - this was always an experimental and undocumented feature. * Separated token generation from `ink-processor` into its own package `@a-morphous/frontispiece-line-parser`. # v4.1.1 * Remove dependency on immer. * Use external version of `at-shorthand`. * Add unit tests. # v4.1.0 * Export more types. # v4.0.0 ## BREAKING CHANGES ### EventHandler changes The `eventHandler` on configuration no longer exists, and `ink-processor` now ships with a custom event handler that doesn't rely upon browser `Event`s. In order to call events, now you should run the following: ```js let engine = new InkProcessorEngine(story); engine.events.on('madeChoice', (evt) => { console.log("we have made a choice!") console.log(evt.data.choice) }); ``` Specifically, the event handler has been renamed to `events`, and listening to events are now named `on` (`once` for one-time events), and `off`. The callback also now only takes a single Event parameter, where the `data` holds all of the information in the event. This also removes the specific `on` and `off` functions on the `InkProcessorEngine` itself; to return to previous functionality and listen to new ink story or visual state updates, you can call them the same way as any other event: via `engine.events.on('setInkStory')` or similar. This change was made both to remove a dependency on the browser (and allow `ink-processor` to work in Node or more obscure environments), but also to improve type safety. # v3.0.3 * Remove hard dependencies on `inkjs`, instead using interfaces that define the subset of commands that `ink-processor` needs to run. # v3.0.2 * Shim CustomEvent and use a new EventTarget to allow `ink-processor` to work in Node.JS. # v3.0.1 * Remove extraeneous console.log # v3.0.0 * Remove CJS build and restrict to Node 16 and above. # v2.3.2 * Bump linear version and also use custom build of `moo` to remove remaining CJS artifacts from module. # v2.3.1 * Bump linear version to work on Safari, which doesn't support negative lookbehinds. # v2.3.0 * Modify path behavior so lines have the full path, and sections have both an array of all paths and a `primaryPath` which is the first unique path. # v2.2.0 * Update to the latest version of `inkjs`. * Update build chain to latest `esbuild`, and add typescript typings. * Default command from `>> ` to `$`. * `InkParserConfigParams` `eventHandler` is now optional, as the documentation claims. # v2.1.0 * Update to latest version of `inkjs`. # v2.0.0 * Commands now use `linear`, and the shape of them have changed; the `currentState` is no longer passed in separately from the engine, and `mutatedVisualState` no longer needs to be set from the command itself * Plugin infrastructure - plugins need to be added as the Ink Engine is created * Event infrastructure - now plugins and other sources can listen to events that the ink engine creates on a designated event handler (by default the window) # v1.4.0 * Adds new `hideOlderLines` function that lets you ensure at max `x` latest lines are visible. # v1.3.4 * undefined check for `getLatestVisibleLineInSection` got lost somehow, this re-adds it. # v1.3.3 * Fixed crash that occurred with 1.3.2 when story was not started # v1.3.2 * Fixed possible infinite loop where the if the story ended on a non-interrupting command, it'd recursively attempt to advance while not moving the pointer at all # v1.3.0 * Added `reset` functionality to the engine to allow you to set a story back to the beginning. # v1.2.1 * Added `startingPath` variable to visible state sections to use for determining frontmatter meta right after a choice. # v1.2.0 * Added `path` variable to the visible lines to determine the ink path for that line * First version of a changelog, so changes are retroactive. # v1.1.3 * Add lock and unlock ability to the engine, to allow or disallow advancing via the `locked` variable # v1.1.2 * Make inkJS a peer dependency. # v1.0.0 Initial version.