1
0
mirror of https://github.com/alexandrev/xslt-lab.git synced 2026-09-16 18:23:16 +00:00
Commit Graph

9 Commits

Author SHA1 Message Date
claude-code 9c6f81a043 Perf: hand-rolled CodeMirror to slim the critical editor chunk (-29KB gz)
@uiw/react-codemirror's basicSetup statically imports @codemirror/lint,
/autocomplete and /search, so they landed in the critical codemirror
chunk regardless of the runtime basicSetup flags. Since lint and
autocomplete are already loaded on demand via useEditorExtras, they were
being shipped twice — once eager, once deferred.

Replace the @uiw wrapper with a thin EditorView binding (controlled
value with an ExternalChange annotation to avoid onChange echo, plus
compartments for theme / base options / deferred extras) and hand-pick
only the primitives the critical path needs: state, view (lineNumbers,
highlightActiveLine, drawSelection, keymap), commands (history), and
language (syntaxHighlighting, indentOnInput, bracketMatching). lint,
autocomplete and the completions table stay in useEditorExtras.

Critical codemirror chunk 448KB/147KB gz -> 361KB/118KB gz. The
autocomplete + lint code moves to deferred chunks, off first paint.

Behaviour verified in a headless browser: typing/onChange, undo/redo,
auto-close tags, deferred autocomplete (65 options), XML lint markers,
and light/dark theme switch (oneDark applied) all work; no page errors.

LCP/FCP/CLS unchanged (already gated by the static skeleton since the
prior commit). Time-to-interactive-editor on throttled mobile improves
from 2111ms to 1821ms median, with far tighter run-to-run variance.

Drops the @uiw/react-codemirror dependency; promotes the four
@codemirror/* primitives to direct dependencies. @monaco-editor/react
stays (only referenced by a test mock).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JDk5guu51FjFxQMjgrrekW
2026-07-21 15:49:37 +00:00
alexandrev-tibco f67b2ab991 feat(editor): XSLT/XPath autocomplete with version-aware filtering
- Add @codemirror/autocomplete with a custom completion source
- New xsltCompletions.js: ~80 xsl:* elements + ~120 XPath functions,
  each tagged with minVersion (1.0/2.0/3.0) and optional blogSlug
- Completions filter to the active XSLT version of each workspace
- Tooltip info() renders argument signature + "Full docs →" link
  pointing to blog.xsltplayground.com/xslt/functions/<slug>
  (placeholders until Phase 2 blog pages are written)
- Auto-close tags, XML linting and Format button also wired up

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 14:23:24 +02:00
alexandrev-tibco c86026460c Perf: replace Monaco Editor with CodeMirror 6
Monaco loaded ~2MB from CDN on every visit causing LCP 8.8s.
CodeMirror 6 is bundled locally: 434KB (142KB gzip), no CDN dependency.

- @uiw/react-codemirror + @codemirror/lang-xml + @codemirror/theme-one-dark
- XML syntax highlighting, dark/light theme, readOnly, lineNumbers, wordWrap
- Removes CDN preload hints, loader config, Monaco external/chunk config
- Editor component simplified (no more lazy/Suspense/eager/requestIdleCallback)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 14:12:05 +02:00
alexandrev de28a305df version 0.2.0 2025-11-15 22:26:25 +01:00
alexandrev ab9da41bc5 +1 2025-07-06 09:06:05 +02:00
alexandrev 4f28dabc0b GA support 2025-07-06 08:56:20 +02:00
alexandrev 60d851e140 Add XML pretty print formatting 2025-07-05 08:53:14 +02:00
alexandrev 3f93c04c8d Add pro UI features with tabs and auth 2025-07-01 20:11:12 +02:00
alexandrev 09a8f99466 Add frontend React app 2025-07-01 09:34:58 +02:00