Skip to content

Dev - #13

Merged
atom-tech9 merged 2 commits into
mainfrom
dev
Jul 14, 2026
Merged

Dev#13
atom-tech9 merged 2 commits into
mainfrom
dev

Conversation

@atom-tech9

Copy link
Copy Markdown
Owner

Summary

Type of Change

  • feat — new feature
  • fix — bug fix
  • docs — documentation only
  • refactor — code change that neither fixes a bug nor adds a feature
  • chore — tooling / maintenance
  • test — adding or updating tests
  • perf — performance improvement
  • ci — CI / build changes

Screenshots

Checklist

  • npm run typecheck passes
  • npm run lint passes
  • npm run build passes
  • Follows the project code style (no any, immutable updates, logical CSS)
  • i18n keys added for any new user-facing strings (en and ar)
  • RTL layout verified for UI changes
  • No console.log (uses @/lib/logger)
  • Documentation updated if needed

…+ editor)

Fenced blocks tagged ascii/diagram/ascii-art — or untagged blocks that score
as diagram-like — now render as chrome-free, auto-fitted figures instead of
line-numbered code blocks:

- src/markdown/asciiDiagram.ts: pure, single-pass detector (Unicode box/block/
  arrow chars score directly; classic +-|/arrow ink only when structural, so
  code with fat arrows, YAML, diffs, and GFM tables stay code blocks), plus
  codePointWidth/maxVisualColumns (tabs, CJK/emoji wide chars) and a defensive
  title="…" fence-meta parser; text/txt/plain fences are a hard escape hatch
- AsciiDiagram component: raw text in an aria-hidden pre inside a role=img
  figure (localized label en+ar), optional figcaption from the fence meta;
  emits --diagram-cols/rows for the CSS fit math
- document.css: JetBrains Mono, fixed 1.2 leading so verticals connect,
  ligatures/kerning off, never wraps; width auto-fit via container-query units
  (font-size: min(base, 100cqw / cols·0.6)) — zoom-proof, same math in the
  preview card and the Paged.js page box
- pageStyles.ts: rows-based font-size cap so a diagram taller than the page
  scales down intact instead of triggering the unbreakable-pre blank-page
  spill; verified 68-row fixture lands whole on one page with its heading
- rehypeFenceMeta plugin: copies code.data.meta into a data-meta attribute
  before rehype-raw reserializes the tree (raw drops data fields)
- editor: /Diagram (ASCII) and /Folder tree (ASCII) slash scaffolds (en+ar)
- polish: cheat-sheet row, formatting-help row, two diagram templates
  (ASCII Architecture, ASCII Folder Tree) with auto-generated marketing pages,
  TemplatePage pre override gets the same diagram branch, README/ARCHITECTURE
  docs

Verified: 25 new unit tests; preview screenshots (fixtures A–D, dark, 3 skins,
RTL, 50/150% zoom); PDF export (A intact on one page, wide fixture auto-shrunk
via cqw inside Paged.js, no blank pages); HTML/Word exports download clean;
Mermaid/KaTeX/code blocks unaffected; marketing build prerenders 104 pages.
@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
scripto Ready Ready Preview, Comment Jul 14, 2026 4:14pm

Request Review

@atom-tech9
atom-tech9 merged commit b200ea3 into main Jul 14, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 9c9c7e7a Deployed Jul 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants