29 | {successMessage}
30 |
31 | ) : (
32 | successMessage
33 | ),
34 | })
35 | }
36 |
37 | /** Shows a failure notification with the given message. */
38 | export const showFailureMessage = (
39 | failureMessage: string,
40 | options?: MessageOptions,
41 | ) => {
42 | notifications.show({
43 | title: options?.title ?? i18n.t("failed") + "!",
44 | color: "red",
45 | icon:
48 | {failureMessage}
49 |
50 | ) : (
51 | failureMessage
52 | ),
53 | })
54 | }
55 |
56 | /** Shows a modal to confirm a possibly dangerous action. */
57 | export const showConfirmModal = (message: string, onConfirm: () => void) => {
58 | modals.openConfirmModal({
59 | title: i18n.t("pleaseConfirmYourAction"),
60 | children: message,
61 | onConfirm,
62 | labels: { confirm: i18n.t("confirm"), cancel: i18n.t("cancel") },
63 | })
64 | }
65 |
66 | export const getCurrentDocument = () => {
67 | const openDocuments = getLocalStorageTyX {update.version} is now available!
83 |{update.body}
84 | {contentLength && ( 85 | 92 | )} 93 |12 | A LyX-like experience rewritten for Typst and the modern era. 13 |
14 | 15 | > [!WARNING] 16 | > TyX is currently in early development and breaking changes 17 | > are introduced frequently. 18 | 19 | ## Getting Started 20 | 21 | Check out the [web editor](https://app.tyx-editor.com) or [download TyX](https://tyx-editor.com)! 22 | 23 | ## Features 24 | 25 | ### Math Editor 26 | 27 | TyX uses MathLive to make math formula editing easy by _seeing_ the formula you're editing! 28 | 29 |  30 | 31 | > [!NOTE] 32 | > This is currently LaTeX-based. We are working on a Typst-based editor! 33 | 34 | ### Keyboard Shortcuts 35 | 36 | TyX supports customizable keyboard shortcuts! 37 | 38 |  39 | 40 | ### Function Calls 41 | 42 | TyX supports an easy-to-use wrapper for Typst function calls, including types, labels and documentation for parameters! 43 | 44 |  45 | 46 | > [!TIP] 47 | > This is how the footnote node is currently implemented! 48 | 49 | More definitions can be added to [the functions file](src/functions.ts). 50 | 51 | ### Keyboard Map 52 | 53 | TyX supports keyboard maps (currently only a Hebrew keyboard map has been added [in the Keyboard Map Plugin](src/components/plugins/KeyboardMapPlugin.tsx)). 54 | This enables you to write in your language without having to switch to English every time you edit math environments! 55 | 56 |  57 | 58 | ### Typst Importing 59 | 60 | Thanks to [contributions by Myriad-Dreamin](https://github.com/tyx-editor/TyX/commits?author=Myriad-Dreamin) you can open `.typ` files into TyX! 61 | 62 | > [!NOTE] 63 | > This, as well, is still a work in progress. 64 | > Many Typst features are currently not imported correctly. 65 | 66 | ### Translations 67 | 68 | TyX currently has translations for Hebrew! Further translations can be added via GitHub PRs 69 | by adding a file to [the translations directory](src/translations) and adding it to [the translations file](src/translations/index.ts). 70 | 71 | ## Acknowledgements 72 | 73 | TyX would not be possible without the following open-source libraries: 74 | 75 | - [typst](https://github.com/typst/typst/) (Apache-2.0 License) 76 | - [typst.ts](https://github.com/Myriad-Dreamin/typst.ts/) (Apache-2.0 License) 77 | - [tyx2typst](https://github.com/qwinsi/tex2typst/) (Apache-2.0 License) 78 | - [tinymist](https://github.com/Myriad-Dreamin/tinymist/) (Apache-2.0 License) 79 | - [mathlive](https://github.com/arnog/mathlive/) (MIT License) 80 | - [lexical](https://github.com/facebook/lexical/) (MIT License) 81 | - [tauri](https://github.com/tauri-apps/tauri/) (Apache-2.0/MIT License) 82 | - [mantine](https://github.com/mantinedev/mantine/) (MIT License) 83 | - [tabler](https://github.com/tabler/tabler-icons/) (MIT License) 84 | - [vite](https://github.com/vitejs/vite/) (MIT License) 85 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: "publish" 2 | 3 | on: 4 | push: 5 | branches: 6 | - release 7 | 8 | jobs: 9 | publish-tauri: 10 | permissions: 11 | contents: write 12 | strategy: 13 | fail-fast: false 14 | matrix: 15 | include: 16 | - platform: "macos-latest" 17 | args: "--target aarch64-apple-darwin" 18 | - platform: "macos-latest" 19 | args: "--target x86_64-apple-darwin" 20 | - platform: "ubuntu-22.04" 21 | args: "" 22 | - platform: "windows-latest" 23 | args: "" 24 | 25 | runs-on: ${{ matrix.platform }} 26 | steps: 27 | - uses: actions/checkout@v4 28 | 29 | - name: setup node 30 | uses: actions/setup-node@v4 31 | with: 32 | node-version: lts/* 33 | 34 | - name: install Rust stable 35 | uses: dtolnay/rust-toolchain@stable 36 | with: 37 | # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. 38 | targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} 39 | 40 | - name: install go 41 | uses: actions/setup-go@v5 42 | with: 43 | go-version: "stable" 44 | 45 | - name: install bun 46 | uses: oven-sh/setup-bun@v2 47 | with: 48 | bun-version: latest 49 | 50 | - name: install relic for code signing (windows only) 51 | if: matrix.platform == 'windows-latest' 52 | run: go install github.com/sassoftware/relic/v8@latest 53 | 54 | - name: install dependencies (ubuntu only) 55 | if: matrix.platform == 'ubuntu-22.04' 56 | run: | 57 | sudo apt-get update 58 | sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf 59 | 60 | - name: install frontend dependencies 61 | run: bun install 62 | 63 | - name: Override linuxdeploy version (potential AppImage fix) 64 | if: matrix.platform == 'ubuntu-22.04' 65 | run: | 66 | # Pin linuxdeploy version to prevent @tauri-apps/cli-linux-x64-gnu from pulling in an outdated version 67 | TAURI_TOOLKIT_PATH="${XDG_CACHE_HOME:-$HOME/.cache}/tauri" 68 | mkdir -p "$TAURI_TOOLKIT_PATH" 69 | wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20250213-2/linuxdeploy-x86_64.AppImage -O "$TAURI_TOOLKIT_PATH/linuxdeploy-x86_64.AppImage" 70 | chmod +x "$TAURI_TOOLKIT_PATH/linuxdeploy-x86_64.AppImage" 71 | 72 | - name: Get current changelog 73 | id: changelog 74 | run: echo "changelog<This document appears to be corrupted!
91 |
92 | {error.message}
93 |
94 | {/* Invisible stub editor for TyX's commands. */}
95 |