- perf:
render_syntax_htmlappends flat strings and fewer of them, sostylizeplus the first read of its result takes about a third less time: open tags are single strings instead of concatenation trees, a one-char leaf appends its whole span from the newTokenTypeInfo.char_spanscache, and text is sliced without a scan up to the next character that needs an escape; breaking:TokenTypeInfohas the new requiredchar_spansfield (6f060d6) - perf: the TypeScript, Rust and bash lexers classify a word from one integer instead of string-keyed
MapandSetlookups, so lexing takes about 8% less time for TypeScript, 12% less for bash and 5% less for Rust; breaking:WordIndextakes[word, value]entries (awords_mapresult as it is) in place of words, andfindreturns the word's value, or0for a miss, in place of the word orundefined(902cc6f) - perf: a Svelte
{expression}is lexed in one pass, about 3% less lex time on Svelte files and 9–18% on an expression: the TypeScript lexer finds the closing brace as it tokenizes through the new optionalSyntaxLang.lex_to_braceandLexer.embed_to_brace(withEMBED_UNAVAILABLE), in place of a scan for the brace followed by the lex; a brace inside a regex no longer closes the expression ({x.replace(/}/g, '')},{#if /}/.test(s)});{#each}and{#await}split at theas/thenthe TypeScript lexer reaches, through an optionalstop_wordon both, so{#await api.load().then(parse)}is no longer split at the.thencall (c10f87d) - feat: TypeScript type annotations are recognized without an initializer (
(x: T),let x: T;,): T {, class and interface members), along with a type alias's body and the tail of anasassertion, so names in type positions aretype_nameand each annotation has itstype_annotationandtypecontainers; fix: acaseclause, a destructuring rename with a default, and a template literal containing=are no longer read as annotations. TypeScript lexing takes about 9% longer and JavaScript 5% (b9882af)
- fix: in TypeScript a single uppercase letter (
T,K,V) is acapitalized_identifierinstead of aconstant, so a type parameter is styled as a type at its uses (c366894)
- fix: the shell lexer treats a backslash outside quotes as an escape, so
\``,', and"` no longer open a substitution or string that runs on through later lines; perf: the markdown inline scan and the CSS statement scan skip plain chars through a lookup table (4d72632) - perf:
WordIndexkeeps a 256-slot table with exact-size buckets, cutting each lexer's retained memory by about 15KB (9c9a3a5)
- perf: lexers allocate almost nothing per call: keywords are looked up with the new
WordIndexinstead of slicing every identifier, the TS and Rust number scanners make no closures, and the TS and shell lexers reuse their machines across embedded regions (dcf3bd9) - perf: lex into one reused buffer instead of allocating an input-sized
Int32Arrayper call; breaking: alex_syntax/SyntaxStyler#lexresult is valid until the next lex (keep one with the newcopy_lexed_syntax), andnew Lexer(events?)takes the buffer to emit into, not a capacity (a99d615)
- perf: keep the lexers' optimized code across major GCs:
advance_probereturns the newPROBE_NOT_FOUNDinstead ofInfinitywhen there is no further occurrence, andLexer.shape_anchorkeeps one lexer alive so its hidden class survives betweenlexcalls (aa1977a)
-
feat: require fuz_css 0.65 and read its OKLCH palette (db18591)
Breaking:
- The optional
@fuzdev/fuz_csspeer is>=0.65.0(was>=0.62.0). theme.cssandtheme_highlight.cssread--palette_a_50through--palette_j_50(was--color_a_50through--color_j_50), fuz_css's renamed palette variables. A consumer that sets the token colors itself sets the--palette_X_50names.theme_variables.css, the fallback for consumers not using fuz_css, declares--text_50and--palette_a_50through--palette_j_50as sRGB snapshots of fuz_css's derived OKLCH palette, so the default token colors shift.
- The optional
- fix: give
CodeTextarea's wrapper fuz_css's flow margin so it drops in for a<textarea>(503cf1f)
- replace the
create_range_highlightinggetter factory with aRangeHighlightingclass (the interface of that name is replaced by the class; construct during component init) (#47) (refactor) - fix:
theme_variables.cssdeclares the--text_50and--color_*_50variables that the themes read, replacing the stale--text_color_5and--color_*_5names (3c7017e)
- feat: add rust lexer (#42)
- make
shthe primary shell lang, withbashandshellas aliases (#41) (refactor)
- feat: support svelte syntax for attr comments and
{let/const(#40) (80008d4)
- perf: rewrite to lexer architecture dropping regexp grammars (#39)
- the regex-grammar engine is removed:
tokenize_syntax.ts, thegrammar_*.tsmodules,SyntaxToken,tokenize(), and the hooks system SyntaxStyleris now a lexer registry pluslex/stylizefacade;lex()returns the flat event stream (LexedSyntax); languages areSyntaxLanglexers registered withadd_langCode.svelteno longer has agrammarprop
- the regex-grammar engine is removed:
- fix: simplify
CodeTextareastyles to use fuz_css base (e45bccf)
- fix: clean up
CodeTextareastyles (3d2130e)
- feat: add
CodeTextarea(#34)
-
fix: reclassify preprocessor deps (b0d5932)
magic-stringandzimmerframefrom optional peers todependencies@fuzdev/fuz_utilfrom an optional to a required
-
upgrade peer deps (b89eabd)
- add
bashlang (#33)
- upgrade gro after fuzdev transfer (40103c3)
- improve
svelte_preprocess_fuz_codeto handle more cases (676e71c)
- extract static bindings for the preprocessor (#32)
- update peer deps (#31)
- rename
svelte_preprocess_fuz_codefromsvelte_preprocess_code_static(b35029d)
- upgrade fuz_css (#29)
- update fuz_css (#28)
- add bottom margin to
Codewithnomarginprop to opt out (908896a)
- upgrade fuz_css (518b803)
- move to fuzdev (4ce078d)
- rename
PascalCasefromUpper_Snake_Case(lol) (#25)
- unpublish samples (#24)
- remove belt peer dep (15311c3)
- upgrade belt (9ff109b)
- support functions with braces in attachments (#21)
- upgrade @ryanatkn/belt (11b7cd8)
- rename
SyntaxGrammarRawfromSyntaxGrammarandSyntaxGrammarfromNormalizedSyntaxGrammar(#20)
- add markdown support (#16)
- rename
GrammartoSyntaxGrammar(#13) - improve token styles (#14)
- factor out
tokenize_syntaxinto its own module (#13)
- add range highlighting (#12)
- bump [email protected] from 22.11 (105db95)
- fix: stop clobbering
pre_attrs.classonCode(5829701)
- update deps (e208d86)
- bump [email protected] (#10)
- add
syntax_stylerand remove Prism (#9)
- upgrade peer dep to Svelte 5 (5aa3efb)
- bump required node version to
20.17(b74b797)
- upgrade
@ryanatkn/[email protected]from0.11.1(5708c52)
- upgrade
@ryanatkn/[email protected]from0.8(64b1eeb)
- upgrade
@ryanatkn/[email protected]from0.108.3(73082df)
- enable tsconfig
declarationanddeclarationMap(b6abdd2) - add
sideEffectstopackage.json(88a50cc) - publish src files (3699312)
- add tsconfig
sourceRoot(6ede67a)
- upgrade gro with correctly formatted exports (dcc78db)
- support
[email protected]and later (23d7401)
- fix
inlineprop behavior (67bb1f7)
- upgrade
[email protected](#5)
- upgrade
svelte@5(#4)
- fix: remove peer dep on
@ryanatkn/fuzbecause of circularity (11c70e9)
- upgrade fuz (28edf9b)
- upgrade fuz (a49de52)
- upgrade deps (ec413b9)
- upgrade fuz (3b550b5)
- upgrade (33dd8e8)
- republish (0ab431c)
- unpublish
$lib/package.ts(9ae282d)
- add peer deps (7a497dc)
- add
"public": true,topackage.json(1ff962f)
- upgrade gro to fix
package.ts(6a6c372)
- upgrade deps (9010c5b)
- upgrade gro to fix default svelte exports (b06d22d)
- publish $lib/package.ts (#2)
- bump minor version for fuz upgrade (3b44dc1)
- upgrade @fuz.dev/[email protected] from 0.70 (42e89c7)
- change description (77d1f16)
- bump node engine to 20.7 (551dea9)
- publish
@ryanatkn/fuz_codeatcode.fuz.dev(#1)