Commit graph

82 commits

Author SHA1 Message Date
Myriad-Dreamin
483de6f00d
build: generate docs with internal links (#1831)
* build: generate docs with internal links

* build: detect link kind
2025-06-22 15:28:27 +08:00
Myriad-Dreamin
7ee2e53189
feat: export to tex by tasks (#1826)
* feat: export to tex by tasks

* test: update snapshot
2025-06-19 14:10:42 +08:00
Myriad-Dreamin
8e86a401ff
feat: update typlite crate features (#1825)
Some checks are pending
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / E2E Tests (darwin-arm64 on macos-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-22.04) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (win32-x64 on windows-2019) (push) Blocked by required conditions
tinymist::ci / E2E Tests (win32-x64 on windows-latest) (push) Blocked by required conditions
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / build-binary (push) Blocked by required conditions
tinymist::ci / build-vsc-assets (push) Blocked by required conditions
tinymist::ci / build-vscode (push) Blocked by required conditions
tinymist::ci / build-vscode-others (push) Blocked by required conditions
tinymist::ci / publish-vscode (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run
* build: turn off docx export feature in library mode

* feat: make less default feature and rename fonts feature

* dev: remove unused code
2025-06-19 11:16:18 +08:00
Myriad-Dreamin
bc15eb55ce
feat: add processor flag and finish sample to convert into tex paper (#1824)
* feat: add processor flag and finish sample to convert into tex paper

* test: update snapshot remove tex {document} env wrapping
2025-06-19 09:57:11 +08:00
Hong Jiarong
ee528810fb
fix: trailing linebreaks at end of paragraph (#1820)
Some checks failed
tinymist::ci / Duplicate Actions Detection (push) Has been cancelled
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Has been cancelled
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Has been cancelled
tinymist::ci / prepare-build (push) Has been cancelled
tinymist::gh_pages / build-gh-pages (push) Has been cancelled
tinymist::ci / E2E Tests (darwin-arm64 on macos-latest) (push) Has been cancelled
tinymist::ci / E2E Tests (linux-x64 on ubuntu-22.04) (push) Has been cancelled
tinymist::ci / E2E Tests (linux-x64 on ubuntu-latest) (push) Has been cancelled
tinymist::ci / E2E Tests (win32-x64 on windows-2019) (push) Has been cancelled
tinymist::ci / E2E Tests (win32-x64 on windows-latest) (push) Has been cancelled
tinymist::ci / build-binary (push) Has been cancelled
tinymist::ci / build-vsc-assets (push) Has been cancelled
tinymist::ci / build-vscode (push) Has been cancelled
tinymist::ci / build-vscode-others (push) Has been cancelled
tinymist::ci / publish-vscode (push) Has been cancelled
2025-06-17 17:57:02 +08:00
bluss
79fee262d7
fix(docs): small typo in typlite README (#1819)
Some checks are pending
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / E2E Tests (darwin-arm64 on macos-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-22.04) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (win32-x64 on windows-2019) (push) Blocked by required conditions
tinymist::ci / E2E Tests (win32-x64 on windows-latest) (push) Blocked by required conditions
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / build-binary (push) Blocked by required conditions
tinymist::ci / build-vsc-assets (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run
tinymist::ci / build-vscode (push) Blocked by required conditions
tinymist::ci / build-vscode-others (push) Blocked by required conditions
tinymist::ci / publish-vscode (push) Blocked by required conditions
2025-06-16 19:47:41 +08:00
Hong Jiarong
a24c516148
feat: import_context and contexual convert (#1816)
* feat: impl import_context

* dev: fmt, clippy

* fix: update import path handling to use rootless paths and normalize separators

* feat: fix errors for fletcher v0.5.8

---------

Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
2025-06-16 16:13:40 +08:00
Hong Jiarong
c0d5f0c800
refactor(typlite): use EcoString instead (#1815)
Some checks are pending
tinymist::ci / build-vsc-assets (push) Blocked by required conditions
tinymist::ci / build-vscode-others (push) Blocked by required conditions
tinymist::ci / publish-vscode (push) Blocked by required conditions
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / E2E Tests (win32-x64 on windows-latest) (push) Blocked by required conditions
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / E2E Tests (darwin-arm64 on macos-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-22.04) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (win32-x64 on windows-2019) (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run
tinymist::ci / build-binary (push) Blocked by required conditions
tinymist::ci / build-vscode (push) Blocked by required conditions
* feat: update cmark-writer to version 0.7.6 and refactor string handling to use EcoString

* dev: make use of eco string

---------

Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
2025-06-16 06:20:09 +08:00
Hong Jiarong
8fb118f3ff fix(typlite): table with table.header did not convert properly (#1812)
* chore: add TODO comment for table.header rendering in md-table function

* feat: enhance table parsing to support thead/tbody structure and complex cells

* fmt

* feat: add InlineNode for handling flattened inline content in table cells

* feat: update snapshot files and enhance DOCX/LaTeX writer to support InlineNode processing

* refactor: custom node handling in DOCX and LaTeX writers

* dev: md-grid should have similar signature to grid

---------

Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
2025-06-16 05:28:39 +08:00
Hong Jiarong
9a44074629
build: enable typlite distribution in dist.toml (#1810)
Some checks failed
tinymist::ci / prepare-build (push) Has been cancelled
tinymist::ci / Duplicate Actions Detection (push) Has been cancelled
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Has been cancelled
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Has been cancelled
tinymist::gh_pages / build-gh-pages (push) Has been cancelled
tinymist::ci / build-vscode-others (push) Has been cancelled
tinymist::ci / publish-vscode (push) Has been cancelled
tinymist::ci / E2E Tests (win32-x64 on windows-latest) (push) Has been cancelled
tinymist::ci / build-binary (push) Has been cancelled
tinymist::ci / build-vsc-assets (push) Has been cancelled
tinymist::ci / E2E Tests (darwin-arm64 on macos-latest) (push) Has been cancelled
tinymist::ci / E2E Tests (linux-x64 on ubuntu-22.04) (push) Has been cancelled
tinymist::ci / E2E Tests (linux-x64 on ubuntu-latest) (push) Has been cancelled
tinymist::ci / E2E Tests (win32-x64 on windows-2019) (push) Has been cancelled
tinymist::ci / build-vscode (push) Has been cancelled
* dev: enable typlite distribution

* dev: add cli feature to typlite distribution
2025-06-12 18:05:37 +08:00
Myriad-Dreamin
c85247a85c
fix: example impl is not correct (#1770)
Some checks are pending
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / E2E Tests (darwin-arm64 on macos-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-22.04) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (win32-x64 on windows-2019) (push) Blocked by required conditions
tinymist::ci / E2E Tests (win32-x64 on windows-latest) (push) Blocked by required conditions
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / build-binary (push) Blocked by required conditions
tinymist::ci / build-vsc-assets (push) Blocked by required conditions
tinymist::ci / build-vscode (push) Blocked by required conditions
tinymist::ci / build-vscode-others (push) Blocked by required conditions
tinymist::ci / publish-vscode (push) Blocked by required conditions
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::gh_pages / build-gh-pages (push) Waiting to run
* fix: example impl is not correct

* fix(typlite): example impl (#1800)

* fix: readme generation (#1754)

* fix: readme generation

* feat: markdown-aware export

* feat: add ieee example

* fix: fix wrong behavior of list parsing and <div> elem parsing

* test: update snapshot

Co-authored-by: Hong Jiarong <me@jrhim.com>

* fix: clippy warnings

* fix: handle br tag as hard break in HTML parsing (#1769)

* fix: handle br tag as hard break in HTML parsing

* Revert "svg gen"

This reverts commit 1ff4c0af33c209a9f653c879f2f7d504bad1ff32.

---------

Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>

* feat: some md-specific impl

* test: bad changes

---------

Co-authored-by: Hong Jiarong <me@jrhim.com>

* fix(typlite): recover readme (#1759)

* fix: recover readme

* docs: rewrite readme

* fix: compile warnings (#1774)

* fix: correct link to Automattic/haper (#1748)

* fix: correct link to Automattic/haper

* build: generate readme

* fix: heading-hash is broken by readme generation (#1779)

* feat: bump typstyle to v0.13.4 and add config for hard wrap (#1737)

* feat: only scroll when selection is not adjacent (#1787)

* fix: quote should work as a blocks container; escape special chars in text (#1771)

* feat: add protip component with markdown note block conversion

* refactor: remove ProtipNode and update related parsing and tag definitions

* fix: escape special characters in markdown output and update cmark-writer dependency

* fix: try getting font index again (#1213, #1645) (#1790)

* feat: build theme-aware pictures (equations) (#1772)

* revert: "test: bad changes"

* feat: m1source

* fix: example impl

* fix(typlite): highlight in docx export (#1798)

* fix: highlight in docx export

* fmt

* fix: correct hover docs generated by typlite (#1761)

* fix: annotate fn

* fix(typlite): duplicate docs description (#1799)

* fix: avoid duplicate docs description

* fix: clippy error

* test: flat repr of hover snapshots

* g

* test: update snapshots

---------

Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>

* test: update snapshot

---------

Co-authored-by: Hong Jiarong <me@jrhim.com>

* feat: `expr_tooltip` should not return docs (#1801)

* fix: render example

* fix: clean code

---------

Co-authored-by: Myriad-Dreamin <35292584+Myriad-Dreamin@users.noreply.github.com>
Co-authored-by: Wenzhuo Liu <mgt@oi-wiki.org>
Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>

* test: update snapshot

---------

Co-authored-by: Hong Jiarong <me@jrhim.com>
Co-authored-by: Wenzhuo Liu <mgt@oi-wiki.org>
2025-06-08 13:44:59 +08:00
Hong Jiarong
ae99016cd9
fix(typlite): highlight in docx export (#1798)
Some checks are pending
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / E2E Tests (darwin-arm64 on macos-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-22.04) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (win32-x64 on windows-2019) (push) Blocked by required conditions
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / build-vscode (push) Blocked by required conditions
tinymist::ci / build-vscode-others (push) Blocked by required conditions
tinymist::ci / publish-vscode (push) Blocked by required conditions
tinymist::ci / E2E Tests (win32-x64 on windows-latest) (push) Blocked by required conditions
tinymist::ci / build-binary (push) Blocked by required conditions
tinymist::ci / build-vsc-assets (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run
* fix: highlight in docx export

* fmt
2025-06-06 23:01:33 +08:00
Myriad-Dreamin
51db97ffcc
feat: build theme-aware pictures (equations) (#1772)
Some checks failed
tinymist::ci / Duplicate Actions Detection (push) Has been cancelled
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Has been cancelled
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Has been cancelled
tinymist::ci / prepare-build (push) Has been cancelled
tinymist::gh_pages / build-gh-pages (push) Has been cancelled
tinymist::ci / E2E Tests (darwin-arm64 on macos-latest) (push) Has been cancelled
tinymist::ci / E2E Tests (linux-x64 on ubuntu-22.04) (push) Has been cancelled
tinymist::ci / E2E Tests (linux-x64 on ubuntu-latest) (push) Has been cancelled
tinymist::ci / E2E Tests (win32-x64 on windows-2019) (push) Has been cancelled
tinymist::ci / E2E Tests (win32-x64 on windows-latest) (push) Has been cancelled
tinymist::ci / build-binary (push) Has been cancelled
tinymist::ci / build-vsc-assets (push) Has been cancelled
tinymist::ci / build-vscode (push) Has been cancelled
tinymist::ci / build-vscode-others (push) Has been cancelled
tinymist::ci / publish-vscode (push) Has been cancelled
* revert: "test: bad changes"

* feat: m1source
2025-06-05 11:10:04 +08:00
Hong Jiarong
08a104cd9c
fix: quote should work as a blocks container; escape special chars in text (#1771)
Some checks are pending
tinymist::ci / build-vscode (push) Blocked by required conditions
tinymist::ci / build-vscode-others (push) Blocked by required conditions
tinymist::ci / publish-vscode (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / E2E Tests (darwin-arm64 on macos-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-22.04) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (win32-x64 on windows-2019) (push) Blocked by required conditions
tinymist::ci / E2E Tests (win32-x64 on windows-latest) (push) Blocked by required conditions
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / build-binary (push) Blocked by required conditions
tinymist::ci / build-vsc-assets (push) Blocked by required conditions
* feat: add protip component with markdown note block conversion

* refactor: remove ProtipNode and update related parsing and tag definitions

* fix: escape special characters in markdown output and update cmark-writer dependency
2025-06-03 23:49:15 +08:00
Myriad-Dreamin
7de64aefe5
fix: compile warnings (#1774) 2025-05-22 11:37:44 +08:00
Myriad-Dreamin
7499dcb8c4
fix(typlite): recover readme (#1759)
* fix: recover readme

* docs: rewrite readme
2025-05-22 08:01:30 +08:00
Myriad-Dreamin
223a337736
fix: readme generation (#1754)
Some checks are pending
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / E2E Tests (darwin-arm64 on macos-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-22.04) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (win32-x64 on windows-2019) (push) Blocked by required conditions
tinymist::ci / E2E Tests (win32-x64 on windows-latest) (push) Blocked by required conditions
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / build-binary (push) Blocked by required conditions
tinymist::ci / build-vsc-assets (push) Blocked by required conditions
tinymist::ci / build-vscode (push) Blocked by required conditions
tinymist::ci / build-vscode-others (push) Blocked by required conditions
tinymist::ci / publish-vscode (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run
* fix: readme generation

* feat: markdown-aware export

* feat: add ieee example

* fix: fix wrong behavior of list parsing and <div> elem parsing

* test: update snapshot

Co-authored-by: Hong Jiarong <me@jrhim.com>

* fix: clippy warnings

* fix: handle br tag as hard break in HTML parsing (#1769)

* fix: handle br tag as hard break in HTML parsing

* Revert "svg gen"

This reverts commit 1ff4c0af33c209a9f653c879f2f7d504bad1ff32.

---------

Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>

* feat: some md-specific impl

* test: bad changes

---------

Co-authored-by: Hong Jiarong <me@jrhim.com>
2025-05-21 17:45:37 +08:00
Hong Jiarong
dd03bf22c8
fix(typlite): nodes nested in HTML element should render as HTML, disable strict mode (#1767)
Some checks are pending
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / E2E Tests (darwin-arm64 on macos-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-22.04) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (win32-x64 on windows-2019) (push) Blocked by required conditions
tinymist::ci / E2E Tests (win32-x64 on windows-latest) (push) Blocked by required conditions
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / build-binary (push) Blocked by required conditions
tinymist::ci / build-vsc-assets (push) Blocked by required conditions
tinymist::ci / build-vscode (push) Blocked by required conditions
tinymist::ci / build-vscode-others (push) Blocked by required conditions
tinymist::ci / publish-vscode (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run
* fix: nodes nested in HTML element should render as HTML

* fix: set strict mode to false to prevent panic

* chore: update cmark-writer to 0.7.3
2025-05-21 00:03:45 +08:00
Myriad-Dreamin
a33ab6a79b
fix: block math align center (#1762)
Some checks failed
tinymist::ci / Duplicate Actions Detection (push) Has been cancelled
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Has been cancelled
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Has been cancelled
tinymist::ci / prepare-build (push) Has been cancelled
tinymist::gh_pages / build-gh-pages (push) Has been cancelled
tinymist::ci / build-binary (push) Has been cancelled
tinymist::ci / build-vsc-assets (push) Has been cancelled
tinymist::ci / build-vscode (push) Has been cancelled
tinymist::ci / build-vscode-others (push) Has been cancelled
tinymist::ci / publish-vscode (push) Has been cancelled
tinymist::ci / E2E Tests (darwin-arm64 on macos-latest) (push) Has been cancelled
tinymist::ci / E2E Tests (linux-x64 on ubuntu-22.04) (push) Has been cancelled
tinymist::ci / E2E Tests (linux-x64 on ubuntu-latest) (push) Has been cancelled
tinymist::ci / E2E Tests (win32-x64 on windows-2019) (push) Has been cancelled
tinymist::ci / E2E Tests (win32-x64 on windows-latest) (push) Has been cancelled
* fix: block math align center

* fix: block math align center (#1764)

* fix: process block children

* test: update snapshot

---------

Co-authored-by: Hong Jiarong <me@jrhim.com>
2025-05-18 03:08:35 +08:00
Myriad-Dreamin
953f997281
build: rearrange and test dependency meta (#1760)
Some checks failed
tinymist::ci / prepare-build (push) Has been cancelled
tinymist::ci / Duplicate Actions Detection (push) Has been cancelled
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Has been cancelled
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Has been cancelled
tinymist::gh_pages / build-gh-pages (push) Has been cancelled
tinymist::ci / E2E Tests (darwin-arm64 on macos-latest) (push) Has been cancelled
tinymist::ci / E2E Tests (linux-x64 on ubuntu-22.04) (push) Has been cancelled
tinymist::ci / E2E Tests (linux-x64 on ubuntu-latest) (push) Has been cancelled
tinymist::ci / E2E Tests (win32-x64 on windows-2019) (push) Has been cancelled
tinymist::ci / E2E Tests (win32-x64 on windows-latest) (push) Has been cancelled
tinymist::ci / build-binary (push) Has been cancelled
tinymist::ci / build-vsc-assets (push) Has been cancelled
tinymist::ci / build-vscode (push) Has been cancelled
tinymist::ci / build-vscode-others (push) Has been cancelled
tinymist::ci / publish-vscode (push) Has been cancelled
* build: rearrange dependency meta

* feat: add feature testing about typlite

* dev: reorder
2025-05-14 14:45:43 +08:00
Hong Jiarong
28d416b852
fix: enhance error handling (#1758) 2025-05-14 13:43:40 +08:00
Myriad-Dreamin
8b0cef92b9
feat(typlite): print diagnostics (#1753)
* feat: print diagnostics

* fix: rebase errors
2025-05-13 16:26:28 +08:00
Hong Jiarong
58b5df97e1
feat(typlite): add plain text output support (#1731)
* feat: add plain text output support

* fix: correct task chaining in Typlite implementation

* feat: add process-math-eq function for improved math equation handling

* fix: simplify ordered and unordered list output formatting

* tests: update insta

* 更新 media.rs

* 更新 media.rs

* fix: expose a bit and remove unused deps

---------

Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
2025-05-13 11:58:26 +08:00
Myriad-Dreamin
e4ed9defb1
refactor: tidy up main and let converter know the target (#1729) 2025-05-01 18:48:29 +08:00
Myriad-Dreamin
d85bd7428a
refactor: remove unused code (#1728) 2025-05-01 17:58:15 +08:00
Myriad-Dreamin
6b7ca47f23
feat: typlite supports docx export (#1727)
* feat: docx impl

Revert "build: remove other cargo deps"

This reverts commit 059b480b1f635d1e8f5be7c191075efcf959b40b.

feat(typlite): Docx export and export markdown in cmark-writer (#1698)

* feat: docx export support

* refactor: simplify DocxConverter structure and improve content handling

* tests: add binary insta for docx

* feat: add MathBlock style and improve frame rendering in DocxConverter

* fix: enhance paragraph creation(silly method)

* fix: enhance math equation rendering

* use md5 instead of docx binary

* feat: enhance list numbering and paragraph handling in DocxConverter

* Refactor DOCX converter to improve list handling and document structure

- Introduced separate methods for creating ordered and unordered list numbering.
- Enhanced list management by tracking next numbering IDs.
- Consolidated paragraph and run management within the DocxConverter.
- Improved image processing with better error handling and placeholder support.
- Streamlined the handling of various HTML elements, including headings, lists, and images.
- Added functionality for processing captions and preformatted blocks.
- Updated methods for processing inline styles and links.

* feat: update cmark-writer to version 0.2.0

* feat: refactor code block handling in DOCX converter for improved readability

* refactor: refactor DOCX converter to enhance document structure

* refactor docx to separated files

* chore: update cmark-writer version to 0.3.0

* fix: ol custom value

* feat: table and grid processing

* use cmark-writer's ast node for consistency

* fix: update snapshot hashes for document generation tests

* fix: add preamble

* update snapshot hashes

* refactor DOCX conversion: Split writer functionality into separate module, enhance image processing, and clean up utility functions

* update comments in LaTeX and Markdown converters for clarity and consistency

* fmt

* delete utils

* feat: support figure node by custom node in cmark-writer

* fix

* fix: frame

* feat: enhance table conversion logic in MarkdownConverter

* refactor: simplify FigureNode implementation by removing CustomNode trait

* chore: update cmark-writer to version 0.5.0

* fix: update figure and raw inline snapshots for consistency

* fix: update snapshot hashes and correct caption reference in markdown.typ

* refactor proj structure

* feat: update CompileArgs to support multiple output files and remove debug option

* docs: update README to clarify usage of multiple output formats and comment out feature section

* remove DocxConverter module

* fix: update snapshots for figure caption, list, outline, and docx generation

* update tests

Co-Authored-By: Hong Jiarong <me@jrhim.com>

* test: docx snapshots

* fix: use old resvg

* feat: make docx opt-in

* fix: image process on our hand

* dev: remove support to rarely used image formats

* feat: use new base64

* test: update snapshot

* fix: dim calc

* fix: dim calc 2

* test: update snapshot

---------

Co-authored-by: Hong Jiarong <me@jrhim.com>
2025-05-01 17:23:46 +08:00
Myriad-Dreamin
3ba3211d1a
feat: typlite supports latex export (#1718)
* fix: remove global variable use

* dev: don't ignore rest variants

* feat: latex impl

feat: pass tests

refactor lib.rs to separated files (#1692)

* feat: add all_elements test

* refactor

* reimpl md export in cmark-writer

* feat: add support for highlight tag in MarkdownConverter

* feat: refactor LaTeXConverter to improve element processing and add new methods

* feat: impl assets-path feature and add ExternalFrameNode for handling external frames and update writers to support it

* feat: enhance HTML element conversion to include attributes and children handling

* feat: update cmark-writer to 0.6.1 and refactor related code

* feat: refactor HTML element conversion to use create_html_element method and enhance table processing

* fix

* feat: add HighlightNode for highlighted text and integrate with HTML to AST parser and LaTeX writer

* refactoor

refactor: simplify MarkdownDocument structure and parsing logic (#1724)

Co-Authored-By: Hong Jiarong <me@jrhim.com>

* feat: snapshot latex

* test: update snapshot

---------

Co-authored-by: Hong Jiarong <me@jrhim.com>
2025-05-01 16:16:43 +08:00
Myriad-Dreamin
33a9ea6088
fix: tests broken by new typlite (#1720)
* Revert "test: update bad snapshot"

This reverts commit 7ba7eb1793.

* fix: update cmark-writer to version 0.6.3 and adjust related snapshots (#1721)

* fix: annotate_docs_error and list level, but bring up 2 new errors.. (#1723)

* fix: adjust list level handling in ListParser during conversion

* fix: manually eval instead of include

* fix: annotate_docs_error, but bring up 2 new errors..

* fix: spaces

* fix: example

---------

Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>

* fix: no html

* test: update snapshot

---------

Co-authored-by: Hong Jiarong <me@jrhim.com>
2025-05-01 15:42:08 +08:00
Myriad-Dreamin
f35d1056ff
feat: reimplement typlite by html export (#1684)
* dev: init markdown file

* dev: typlite element derive

* feat: pass tests

refactor lib.rs to separated files (#1692)

feat(typlite): Docx export and export markdown in cmark-writer (#1698)

* feat: docx export support

* refactor: simplify DocxConverter structure and improve content handling

* tests: add binary insta for docx

* feat: add MathBlock style and improve frame rendering in DocxConverter

* fix: enhance paragraph creation(silly method)

* fix: enhance math equation rendering

* use md5 instead of docx binary

* feat: enhance list numbering and paragraph handling in DocxConverter

* feat: add all_elements test

* refactor

* reimpl md export in cmark-writer

* feat: add support for highlight tag in MarkdownConverter

* feat: refactor LaTeXConverter to improve element processing and add new methods

* fmt

* Refactor DOCX converter to improve list handling and document structure

- Introduced separate methods for creating ordered and unordered list numbering.
- Enhanced list management by tracking next numbering IDs.
- Consolidated paragraph and run management within the DocxConverter.
- Improved image processing with better error handling and placeholder support.
- Streamlined the handling of various HTML elements, including headings, lists, and images.
- Added functionality for processing captions and preformatted blocks.
- Updated methods for processing inline styles and links.

* feat: update cmark-writer to version 0.2.0

* feat: refactor code block handling in DOCX converter for improved readability

* refactor: refactor DOCX converter to enhance document structure

* refactor docx to separated files

* update instas

* fmt

* chore: update cmark-writer version to 0.3.0

* fix: ol custom value

* feat: table and grid processing

* use cmark-writer's ast node for consistency

* fix: update snapshot hashes for document generation tests

* fix: add preamble

* update snapshot hashes

* refactor DOCX conversion: Split writer functionality into separate module, enhance image processing, and clean up utility functions

* update comments in LaTeX and Markdown converters for clarity and consistency

* fmt

* delete utils

* feat: support figure node by custom node in cmark-writer

* fix

* fix: frame

* feat: enhance table conversion logic in MarkdownConverter

* refactor: simplify FigureNode implementation by removing CustomNode trait

* chore: update cmark-writer to version 0.5.0

* fix: update figure and raw inline snapshots for consistency

* fix: update snapshot hashes and correct caption reference in markdown.typ

* refactor proj structure

* feat: update CompileArgs to support multiple output files and remove debug option

* docs: update README to clarify usage of multiple output formats and comment out feature section

* remove DocxConverter module

* feat: impl assets-path feature and add ExternalFrameNode for handling external frames and update writers to support it

* feat: enhance HTML element conversion to include attributes and children handling

* feat: update cmark-writer to 0.6.1 and refactor related code

* fix: update snapshots for figure caption, list, outline, and docx generation

* feat: refactor HTML element conversion to use create_html_element method and enhance table processing

* fix

* feat: add HighlightNode for highlighted text and integrate with HTML to AST parser and LaTeX writer

* refactoor

* update tests

Co-Authored-By: Hong Jiarong <me@jrhim.com>

* feat: revert latex/docx conversions

* fix: warnings

* bad: convert docs

* build: remove other cargo deps

* build: update cargo.lock

* test: update snapshot

* chore: remove useless parser trait

* feat: annotate v1

* feat: annotate v2

* test: update snapshot

* question: is it a bug?

* test: update bad snapshot

---------

Co-authored-by: Hong Jiarong <me@jrhim.com>
2025-04-30 22:12:25 +08:00
Myriad-Dreamin
3103f3933c
test(typlite): add more cases (#1719)
* test: add more cases

* test: update snapshot
2025-04-30 21:36:54 +08:00
Myriad-Dreamin
c66d2996dd
test: typlite use snapshot_testing (#1717)
* feat: use snapshot_test

* test: add snapshots
2025-04-30 20:31:02 +08:00
Myriad-Dreamin
39d13c83f6
refactor: simplify world font impl and add docs (#1645)
* fix: remove unnecessary &mut in FontResolverImpl::append_font()

* refactor: better readablity in FontResolverImpl::rebuild()

* feat: FontResovlerImpl::clone_and_rebuild()

Change FontSlot to store Arc to QueryRef<Font, FontLoader>, so we can
clone FontSlot and share the cached loaded font between different slots.

Since CompilerUniverse only holds a immutable Arc to FontResovlerImpl,
adding clone_and_rebuild method allow us to append and rebuild without
mutable access to FontResovlerImpl.

* refactor: remove partial_book and modify methods from FontResolverImpl

partial_book is removed from FontResolverImpl, all the modifying methods
are also removed.
new method get_fonts and new_with_fonts are added.
If you want to modify fonts, you can get all fonts and modify them, then
call new_with_fonts to create a new FontResolverImpl.

* refactor: SystemFontSearch, BrowserFontSearch

- Both font searcher now is just a wrapper for Vec<(FontInfo,
  FontSlot)>, typst::FontBook will be built when converting into
  FontResolverImpl.

- Provide a method with_fonts_mut() so user can get a direct mutable
  access to the under lying fonts vector to do any changes.

- Support searcher -> resolver and resolver -> searcher conversion.

* refactor: api change to biulder pattern

Method new_with_resolver() is added since CompilerUniverse only holds
Arc reference to resolver, and we can't move it out.

* fix: add fontdb::Database to SystemFontSearcher

Store fonts info in db, load them in bulk when calling flush()

* chore: merge `FontResolverImpl` and `TinymistFontResolver`

* feat: remove font profile feature

* feat: remove project font

* docs: comment the font resolver trait

* docs: comment the font slot struct

* docs: comment the crate

* test: move system tests

* dev: clean resolver

* dev: clean searchers

* dev: clean par iters

* feat: enrich memory font resolver

* todo: useless reuse

* dev: remove reuse api

* dev: build font book in `fn build`

* fix: make clippy happy

* fix: bad use

---------

Co-authored-by: c0per <60544162+c0per@users.noreply.github.com>
2025-04-15 22:23:13 +08:00
Myriad-Dreamin
90f9949f8c
feat: support --feature and --pdf-standard. (#1596) 2025-03-28 17:42:03 +08:00
Myriad-Dreamin
157703ef67
docs: update description about testing (#1532) 2025-03-18 00:11:13 +08:00
Myriad-Dreamin
e81a071a00
docs: update roadmap (#1499) 2025-03-13 16:00:54 +08:00
Hong Jiarong
791a7f8314
docs(typlite): add examples for --assets-path and --assets-src-path (#1396)
* Update README.md

* docs: update README.md to enhance usage instructions and contextual content rendering details
2025-02-25 15:30:46 +08:00
LN Liberda
7c0d9130eb
fix: expose and default to no-content-hint in typlite (#1381) 2025-02-24 10:28:25 +08:00
Myriad-Dreamin
d21ebc38dc
feat: bump typst to v0.13.0-rc1 (#1342)
* dev: use range type from lsp-types

* feat: add html document variant

* feat: use new-style bytes constructors

* fix: broken span usages

* fix: syntax kind is changed

* fix: label use pico str

* fix: bib element is changed

* fix: raw element is changed

* fix: typst use codex

* fix: package fn is removed from world trait

* feat: reflexo accept typst document

* docs: update changelog

* dev: cargo patch

* fix: typst pdf timestamp is changed

* fix: pattern is renamed to tiling

* dev: make eval compat

* test: update snapshots

* build: bump version to nightly 0.12.19-rc4

* build: bump version to 0.12.19-rc1 (#1164)

  * build update changelog

  * build: bump version to 0.12.19-rc1

* build: bump version to nightly 0.12.19-rc2 (#1221)

  * feat: update typst to `85d1778`

  * deps: lock git deps version

  * build: bump version to 0.12.19-rc2

  * docs: remove rc in changelog

  * fix: mathtext formatting of typstyle

  * fix: completion related to mathtext

  * build: update cargo.lock

* build: bump version to nightly 0.12.19-rc3 (#1232)

* build: bump version to nightly 0.12.19-rc4 (#1239)

* feat: add typst-html

* feat: add typst-html

* cargo patch

* fix: features doesn't take effect

* fix: casting

* fix: broken no-content-hint

* fix: snapshot

* fix: remove unnecessary `fs` feature

* fix: move system features feature

* feat: remove nightly shim

* test: update snapshot

* dev: nightly v0.12.21 (#1279)

* feat: update typst to `0ea6680`

feat: update typst to `0ea6680`

build: bump version to nightly 0.12.19 (#1261)

* fix: fix lint errors

* styl: fotmat

* fix: build web ci

* build: update cargo.toml

* build: bump version to nightly 0.12.21-rc1 (#1280)

* build: update typstyle & reflexo (#1336)

* build: update typstyle & reflexo

* dev: remove useless patches

---------

Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>

* build: update version

* fix: pdf gate were broken (#1285)

* fix: panic on convert_datetime (#1286)

* feat: run language sever with targeting html (#1284)

* dev: add some debug logging

* feat: html compilation

* fix: revert changes

* feat: adjust html interfaces

* feat: lock reflexo

* feat: provide exportTarget configuration

* feat: export html actions when target is html

* build: bump reflexo

* fix: system feature gate

* fix: feature gate 2

* fix: feature gate 3

* feat: make tinymist-world featured by lsp

* feat: text export over typst's HTML export (#1289)

* feat: add more doc, world, and task apis (#1290)

* feat: add num of pages method

* feat: add from_snapshot_inner method

* feat: add clear_dedicates method

* feat: more convertion traits

* feat: add doc_get_as_value method

* feat: add doc_get_as_value method

* feat: add cast_run method

* fix: set is compiling flag (#1293)

* feat: publish {tinymist-{derive,analysis,std,vfs,world,project},typlite,crityp} crates (#1310)

* build: bump version to 0.12.21-pre-rc1

* fix: deps

* build: set nightly in nightly branch

* docs: add readmes for publish

* feat: add release crates action

* dev: remove publish of sync-lsp

* dev: remove useless setup

* fix: remove readme

* fix: publish ignore errors

* fix: specify version for publish

* fix: specify version for publish

* feat: update tinymist-web version

* test: update snapshot

* fix: diverged deps

---------

Co-authored-by: ParaN3xus <136563585+ParaN3xus@users.noreply.github.com>
2025-02-21 03:18:04 +08:00
Hong Jiarong
f5fb352a2a
fix(typlite): correct the wrong path (#1323)
* fix: wrong path

* fmt
2025-02-19 21:12:12 +08:00
Hong Jiarong
55f8392692
feat(typlite): render context block contextually (#1305)
* feat: render contexual node with environment at context

* fix: extend value check to include additional node types

* feat: add assets_path and assets_src_path, support render to external svg file

* fix: clippy

* fix

* fix test error

* fix: simplify write_error function

* refactor: rename 'pref' to 'prepend_code' for clarity; fix: wrong render_inner

* refactor: simplify file name generation for asset paths

* fix: use PathBuf instead of EcoString for path display

* fix: handle Hash

* fix: clippy

* tests: update test@annotate_docs_error.typ.snap
2025-02-19 12:04:05 +08:00
Hong Jiarong
33df227b17
feat: embed Markdown codes (#1296)
* feat: directly output raw language 'typlite'

* docs: raw output
2025-02-18 10:14:17 +08:00
Hong Jiarong
b24a7fd497
feat: evaluate table and grid (#1300)
* feat: add table and grid functions evaluating

* fix: clippy

* refactor: simplify table and grid functions by extracting common logic

* fix: handle invalid columns argument and set default value; handle no header situation
2025-02-18 10:14:02 +08:00
Myriad-Dreamin
5b2b34ee9e fix: make preview feature gate work 2025-02-08 14:55:47 +08:00
Myriad-Dreamin
7b8739487e
fix: cannot build clap/wrap_help in web (#1253) 2025-02-02 16:25:33 +08:00
Myriad-Dreamin
af47f578e4
dev: cleanup project creation (#1227) 2025-01-29 20:57:34 +08:00
Myriad-Dreamin
0f588c99d7
refactor: build and move comment and matcher crates to analysis crate (#1223) 2025-01-29 12:34:28 +08:00
Myriad-Dreamin
1f01ec1f6c
feat: track fine-grained revisions of font, registry, entry, and vfs (#1192)
* feat: set flag to indicate whether we are compiling files

g1

dev: stateless compile

dev: vfs revise apis

g1

feat: bump revision on state changes

feat: track font and package changes

dev: some cases that can change state of cache

changes

* feat: implement shared source cache

* fix: take db state

* dev: update take state location

* fix: example
2025-01-19 18:23:41 +08:00
Myriad-Dreamin
56714675b7
feat: encode and use workspace information into PackageSpec (#1187)
* feat: remove an unused API

* feat: encode workspace information into `PackageSpec`

* feat: remove unused real_path

* feat: remove unused mtime

* feat: add ResolveAccessModel

* feat: implement id overlay semantics

* feat: remove mtime checking in overlay model

* feat: remove mtime checking in notify model

* feat: format ids

* fix: cases

* feat: resolve root by world

* dev: add untitled root

* fix: warnings

* fix: a wrong usage

* fix: snapshots

* fix: tests
2025-01-19 11:51:00 +08:00
Myriad-Dreamin
6180e343e0
feat: move world implementation (#1183)
* feat: move world implementation

* dev: remove vector ir

* fix: errors

* fix: clippy

* fix: don't build world in web

* fix: unused patches

* fix: fmt

* fix: docs example

* fix: doc examples
2025-01-19 08:25:35 +08:00
Myriad-Dreamin
5659b0bc6c
dev: move package to reflexo_world part (#1177)
* dev: move package to reflexo_world part

fix: compile error

* dev: update the package.json

* fix: compile error

* dev: remove dry compile
2025-01-16 10:13:37 +08:00