Search documentation

↑↓ to move↵ to open

kirari


Changelog

New releases, improvements, and fixes across Kirari and its integrations.

  1. kirari 1.2.0

    Breaking changes

    Renamed from @vortexlabs/kirari to kirari

    The package is now published as kirari. @vortexlabs/kirari is deprecated and unsupported: it re-exports kirari 1.x, so existing imports keep working, but it gets no releases of its own and does not follow 2.0 or later. Switch to kirari to keep receiving updates.

    How to migrate

    1. Uninstall @vortexlabs/kirari and install kirari.
    2. Replace every @vortexlabs/kirari import specifier with kirari, including subpaths such as @vortexlabs/kirari/languages/python.
    3. Update any other mention of @vortexlabs/kirari, such as bundler configuration or optimizeDeps entries.
    Run
    npm uninstall @vortexlabs/kirari && npm install kirari
    
    Before
    import { highlight } from '@vortexlabs/kirari'
    import { python } from '@vortexlabs/kirari/languages/python'
    import '@vortexlabs/kirari/theme.css'
    
    After
    import { highlight } from 'kirari'
    import { python } from 'kirari/languages/python'
    import 'kirari/theme.css'
    

    Migrate with an AI assistant Copy a prompt with these steps and paste it into Claude, Cursor, or Codex in your project. It finds the affected code and updates it.

  2. kirari-react 1.2.0

    Breaking changes

    Renamed from @vortexlabs/kirari-react to kirari-react

    The package is now published as kirari-react. @vortexlabs/kirari-react is deprecated and unsupported: it re-exports kirari-react 1.x, so existing imports keep working, but it gets no releases of its own and does not follow 2.0 or later. Switch to kirari-react to keep receiving updates.

    How to migrate

    1. Uninstall @vortexlabs/kirari-react and install kirari-react.
    2. Replace every @vortexlabs/kirari-react import specifier with kirari-react, including subpaths such as @vortexlabs/kirari-react/stream.
    3. kirari-react requires kirari as a peer dependency. If the project still uses @vortexlabs/kirari, migrate it to kirari the same way.
    4. Update any other mention of @vortexlabs/kirari-react, such as bundler configuration or optimizeDeps entries.
    Run
    npm uninstall @vortexlabs/kirari @vortexlabs/kirari-react && npm install kirari kirari-react
    
    Before
    import { Code } from '@vortexlabs/kirari-react'
    import { useTokenStream } from '@vortexlabs/kirari-react/stream'
    
    After
    import { Code } from 'kirari-react'
    import { useTokenStream } from 'kirari-react/stream'
    

    Migrate with an AI assistant Copy a prompt with these steps and paste it into Claude, Cursor, or Codex in your project. It finds the affected code and updates it.

  3. kirari-rehype 1.1.0

    Breaking changes

    Renamed from @vortexlabs/kirari-rehype to kirari-rehype

    The package is now published as kirari-rehype. @vortexlabs/kirari-rehype is deprecated and unsupported: it re-exports kirari-rehype 1.x, so existing imports keep working, but it gets no releases of its own and does not follow 2.0 or later. Switch to kirari-rehype to keep receiving updates.

    How to migrate

    1. Uninstall @vortexlabs/kirari-rehype and install kirari-rehype.
    2. Replace every @vortexlabs/kirari-rehype import specifier with kirari-rehype.
    3. kirari-rehype requires kirari as a peer dependency. If the project still uses @vortexlabs/kirari, migrate it to kirari the same way.
    4. Update any other mention of @vortexlabs/kirari-rehype, such as bundler configuration or optimizeDeps entries.
    Run
    npm uninstall @vortexlabs/kirari @vortexlabs/kirari-rehype && npm install kirari kirari-rehype
    
    Before
    import rehypeKirari from '@vortexlabs/kirari-rehype'
    
    After
    import rehypeKirari from 'kirari-rehype'
    

    Migrate with an AI assistant Copy a prompt with these steps and paste it into Claude, Cursor, or Codex in your project. It finds the affected code and updates it.

  4. kirari 1.1.4

    Bug fixes

    • Python annotated parameters after commas, such as b in def f(a: str, b: str): pass, are highlighted as variables instead of dictionary keys. Multiline signatures keep the same highlighting when streamed.
    • Unparenthesized lambda parameters inside dictionaries, such as b in {'f': lambda a, b: 1}, keep their variable highlighting, including across streamed line breaks.
  5. kirari 1.1.3

    Breaking changes

    Public object types are type aliases

    Token, Rule, Language, RenderOptions, Decoration, TokenPatch, and TokenStream are now type aliases instead of interfaces. Their members are unchanged, but code that extends them through declaration merging (module augmentation) no longer compiles.

    How to migrate

    1. Replace declare module augmentations of these types with your own type that intersects them, such as type AppToken = Token & { line: number }.
    2. No change is needed if you only import and use the types.

    Migrate with an AI assistant Copy a prompt with these steps and paste it into Claude, Cursor, or Codex in your project. It finds the affected code and updates it.

    Bug fixes

    • Markdown heading tokens no longer include the trailing line break, so heading styles and line-based renderers stop at the end of the line.
    • JavaScript and TypeScript private class names such as #count are now one token, highlighted as properties at both the declaration and this.#count, and as functions for private methods.
  6. kirari 1.1.2

    Bug fixes

    • TypeScript and TSX member names after semicolons are now highlighted as properties, matching the first member in class, interface, and object type bodies.
  7. kirari-react 1.1.1

    Breaking changes

    Public object types are type aliases

    Line and StreamedTokens from @vortexlabs/kirari-react/stream are now type aliases instead of interfaces. Their members are unchanged, but code that extends them through declaration merging (module augmentation) no longer compiles. CodeProps remains an interface.

    How to migrate

    1. Replace declare module augmentations of these types with your own type that intersects them, such as type AppLine = Line & { id: string }.
    2. No change is needed if you only import and use the types.

    Migrate with an AI assistant Copy a prompt with these steps and paste it into Claude, Cursor, or Codex in your project. It finds the affected code and updates it.

  8. kirari 1.1.1

    Improvements

    • Reduce bundle overhead by consolidating function lookahead, simplifying equivalent JavaScript regexes, and sharing HTML escape replacements.

    Bug fixes

    • TypeScript enum declaration names are now highlighted as types, like class, interface, and type alias names.
    • JavaScript, TypeScript, and Python decorator markers are highlighted as operators and bare decorator names as functions, while qualified names and Python matrix multiplication retain their classifications.
  9. kirari 1.1.0

    Improvements

    • The default bundle shrinks from about 6.1 KB to about 4.3 KB gzipped. Function definition highlighting for languages other than JavaScript now ships with those language definitions instead of the core scanner, so highlight, tokenize, and @vortexlabs/kirari/core no longer include it. Highlighting output is unchanged.
    • Definitions can set a new optional definitions(tokens) callback that runs after tokenizing and can retype names as functions. Built-in definitions that highlight function definitions set it, and a copy made by spreading one keeps it even when renamed. A custom definition that only reuses a built-in name such as 'python' no longer gets that highlighting; set definitions: python.definitions to keep it.
  10. kirari 1.0.5

    Improvements

    • Streaming Python, JSX, TSX, and JSONC with createTokenStream now rescans only near the end of the source instead of retokenizing everything on every write. Streaming 8 KB one character at a time drops from about 5 seconds to 0.1 seconds for Python, and from about 13 seconds to 0.2 seconds for TSX.

    Bug fixes

    • Python names before a colon, such as ready in if ready: or count in count: int, are no longer highlighted as functions when a later line assigns a lambda.
    • Streamed JavaScript and TypeScript function names stay revisable while a slash on the last line could still start a regex literal.
    • renderDecorated with lines: true no longer adds an empty last line wrapper after a trailing newline.
  11. kirari-react 1.1.0

    Improvements

    • <Code> accepts text children the way React renders text, so <Code>let x = {count}</Code> highlights the joined source. Numbers and bigints are kept, null, undefined, and booleans render nothing, and element children throw a TypeError. The new CodeText type describes the accepted children.

    Bug fixes

    • lines and highlightLines no longer add an empty last line wrapper after a trailing newline.
  12. kirari-rehype 1.0.2

    Bug fixes

    • Line wrappers no longer add an empty last line after a code block's trailing newline, which showed an extra line, and an extra CSS line number, on every block rendered with lines or fence line metadata such as {2,4-6}.
  13. kirari 1.0.4

    Bug fixes

    • Long runs of short tokens in CSS, Makefile, TOML, YAML, and Markdown with embedded languages now tokenize in linear time instead of slowing down quadratically.
    • An unclosed Markdown fence on a single line no longer backtracks over the whole line.
    • YAML numbers, booleans, and nulls end before # only when whitespace precedes it, so 3#x reads as one plain scalar.
    • TOML numbers no longer split names such as 42n.
  14. kirari 1.0.3

    Improvements

    • JavaScript, JSX, TypeScript, and TSX handle multiline and parenthesized arrows, nested default parameters, typed bindings, and contextual method names.
    • Batch and streaming output stay consistent while signatures, comments, and arrow operators are incomplete.

    Bug fixes

    • Function names are no longer highlighted as ordinary variables. Declarations, generic signatures, quoted names, lambdas, and closures are recognized across the programming-language grammars.
  15. kirari 1.0.2

    Bug fixes

    • Adjacent JSX and TSX element snippets highlight without a fragment wrapper, and comparisons after JSX stay JavaScript.
  16. kirari 1.0.1

    Improvements

    • Package homepage and documentation links point to kirari.sh.
  17. kirari 1.0.0

    Improvements

    • First stable release of the core highlighting APIs.
    • Import languages by name from @vortexlabs/kirari/languages. Individual language entry points still work.
  18. kirari-react 1.0.1

    Improvements

    • Package homepage and documentation links point to kirari.sh.
  19. kirari-react 1.0.0

    Breaking changes

    Requires @vortexlabs/kirari 1.x

    The ^0.1.0 peer range no longer applies, so upgrading only @vortexlabs/kirari-react fails with a peer dependency conflict.

    How to migrate

    1. Upgrade @vortexlabs/kirari and @vortexlabs/kirari-react in the same install.
    2. No code changes are needed: Code and useTokenStream keep the same props and behavior.
    Run
    npm install @vortexlabs/kirari@^1 @vortexlabs/kirari-react@^1
    

    Migrate with an AI assistant Copy a prompt with these steps and paste it into Claude, Cursor, or Codex in your project. It finds the affected code and updates it.

    Improvements

    • First stable release, built on the Kirari 1.0 core APIs.
  20. kirari-rehype 1.0.1

    Improvements

    • Package homepage and documentation links point to kirari.sh.
  21. kirari-rehype 1.0.0

    Improvements

    • First stable release of the Rehype and MDX plugin. Install it with @vortexlabs/kirari 1.x.
  22. kirari 0.1.0

    Improvements

    • First preview release of the core library.
  23. kirari-react 0.1.0

    Improvements

    • First preview release of the React components and streaming hook.