├── .github ├── FUNDING.yml └── workflows │ ├── check.yml │ └── release.yml ├── .gitignore ├── .npmrc ├── .nvmrc ├── .vscode ├── extensions.json └── settings.json ├── LICENSE ├── README.md ├── app ├── .eslintrc.cjs ├── .gitignore ├── components.json ├── index.html ├── package.json ├── postcss.config.js ├── public │ ├── fonts │ │ ├── Inter-roman.var.woff2 │ │ └── JetBrainsMono-Regular.woff2 │ ├── grid │ │ ├── grid-dark.svg │ │ └── grid-light.svg │ └── images │ │ ├── logo.png │ │ └── logo.svg ├── src-tauri │ ├── .gitignore │ ├── Cargo.lock │ ├── Cargo.toml │ ├── build.rs │ ├── icons │ │ ├── 128x128.png │ │ ├── 128x128@2x.png │ │ ├── 32x32.png │ │ ├── Square107x107Logo.png │ │ ├── Square142x142Logo.png │ │ ├── Square150x150Logo.png │ │ ├── Square284x284Logo.png │ │ ├── Square30x30Logo.png │ │ ├── Square310x310Logo.png │ │ ├── Square44x44Logo.png │ │ ├── Square71x71Logo.png │ │ ├── Square89x89Logo.png │ │ ├── StoreLogo.png │ │ ├── icon.icns │ │ ├── icon.ico │ │ └── icon.png │ ├── src │ │ └── main.rs │ └── tauri.conf.json ├── src │ ├── components │ │ ├── changeTheme.tsx │ │ ├── container.tsx │ │ ├── errorElement.tsx │ │ ├── explorer │ │ │ └── index.tsx │ │ ├── file │ │ │ ├── createFile.tsx │ │ │ ├── deleteFile.tsx │ │ │ ├── fileItem.tsx │ │ │ ├── fileList.tsx │ │ │ ├── openFile.tsx │ │ │ └── renameFile.tsx │ │ ├── folder │ │ │ ├── createFolder.tsx │ │ │ └── index.tsx │ │ ├── monaco │ │ │ └── index.tsx │ │ ├── pageNavbar │ │ │ └── index.tsx │ │ ├── providers │ │ │ └── index.tsx │ │ ├── search.tsx │ │ ├── settings │ │ │ ├── account.tsx │ │ │ ├── appearance.tsx │ │ │ ├── settingsGroup.tsx │ │ │ └── userSettings.tsx │ │ ├── sidebar │ │ │ ├── index.tsx │ │ │ ├── shared.ts │ │ │ └── sidebarGroup.tsx │ │ ├── tip.tsx │ │ └── workspaces │ │ │ ├── index.tsx │ │ │ └── manageWorkspaces.tsx │ ├── data │ │ └── fileExtensions.ts │ ├── main.tsx │ ├── providers │ │ └── themeProvider.tsx │ ├── routes │ │ ├── editor.tsx │ │ ├── index.tsx │ │ └── settings.tsx │ ├── store │ │ ├── appStore.ts │ │ ├── userStore.ts │ │ └── workspaceStore.ts │ ├── styles │ │ ├── globals.css │ │ ├── monaco-theme.json │ │ └── tiptap-code.css │ ├── utils │ │ ├── openLink.ts │ │ └── text.ts │ └── vite-env.d.ts ├── tailwind.config.ts ├── tsconfig.json ├── tsconfig.node.json └── vite.config.ts ├── package.json ├── packages ├── editor │ ├── .eslintrc.cjs │ ├── package.json │ ├── src │ │ ├── components │ │ │ ├── editor.tsx │ │ │ ├── menu.tsx │ │ │ └── tooltip.tsx │ │ ├── extensions │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── types │ │ │ ├── editorProps.d.ts │ │ │ ├── menuProps.d.ts │ │ │ └── tooltipProps.d.ts │ │ └── utils │ │ │ └── cn.ts │ ├── tsconfig.json │ └── tsup.config.ts ├── functions │ ├── .eslintrc.cjs │ ├── package.json │ ├── src │ │ ├── checkDirFile.ts │ │ ├── createFolder.ts │ │ ├── createUpdateFile.ts │ │ ├── deleteFile.ts │ │ ├── getAllPlatformInfo.ts │ │ ├── getFileName.ts │ │ ├── getFolderName.ts │ │ ├── index.ts │ │ ├── openFile.ts │ │ ├── readFiles.ts │ │ └── selectFolder.ts │ ├── tsconfig.json │ └── tsup.config.ts ├── shared │ └── tsconfig.json ├── tailwind-config │ ├── package.json │ └── tailwind.config.ts └── ui │ ├── .eslintrc.cjs │ ├── components.json │ ├── package.json │ ├── postcss.config.cjs │ ├── src │ ├── components │ │ ├── alert.tsx │ │ ├── button.tsx │ │ ├── collapsible.tsx │ │ ├── command.tsx │ │ ├── context-menu.tsx │ │ ├── dialog.tsx │ │ ├── dropdown-menu.tsx │ │ ├── externalLink.tsx │ │ ├── formGroup.tsx │ │ ├── input.tsx │ │ ├── popover.tsx │ │ ├── radio-group.tsx │ │ ├── tabs.tsx │ │ └── tooltip.tsx │ ├── extend │ │ └── prose.ts │ ├── index.tsx │ ├── styles │ │ └── globals.css │ └── utils │ │ └── cn.ts │ ├── tailwind.config.ts │ ├── tsconfig.json │ └── tsup.config.ts ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── prettier.config.cjs ├── turbo.json └── website ├── .eslintrc.json ├── next.config.mjs ├── package.json ├── postcss.config.cjs ├── public ├── fonts │ ├── Inter-roman.var.woff2 │ └── JetBrainsMono-Regular.woff2 └── images │ ├── logo.png │ ├── logo.svg │ ├── screenshot_en.png │ └── screenshot_es.png ├── src ├── app │ ├── api │ │ └── hello │ │ │ └── route.ts │ ├── layout.tsx │ └── page.tsx ├── components │ ├── cardSpotlight.tsx │ ├── container.tsx │ ├── hero.tsx │ ├── icons │ │ ├── mac.tsx │ │ ├── typethings.tsx │ │ └── windows.tsx │ ├── navbar.tsx │ └── socials.tsx ├── global │ └── data.ts └── styles │ └── globals.css ├── tailwind.config.ts └── tsconfig.json /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [pheralb] -------------------------------------------------------------------------------- /.github/workflows/check.yml: -------------------------------------------------------------------------------- 1 | name: 🔎 Check 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - dev 8 | 9 | concurrency: ${{ github.workflow }} - ${{ github.ref }} 10 | 11 | jobs: 12 | Typecheck: 13 | name: Packages Types 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v3 17 | 18 | - uses: pnpm/action-setup@v2 19 | with: 20 | version: 8 21 | 22 | - name: Install dependencies 23 | run: pnpm install 24 | 25 | - name: App Typecheck 26 | run: pnpm run typecheck-app 27 | 28 | - name: Editor Typecheck 29 | run: pnpm run typecheck-editor 30 | 31 | - name: UI Library Typecheck 32 | run: pnpm run typecheck-editor 33 | 34 | - name: Functions Typecheck 35 | run: pnpm run typecheck-editor 36 | 37 | Website: 38 | name: Build Website 39 | runs-on: ubuntu-latest 40 | steps: 41 | - uses: actions/checkout@v3 42 | 43 | - uses: pnpm/action-setup@v2 44 | with: 45 | version: 8 46 | 47 | - name: Install dependencies 48 | run: pnpm install 49 | 50 | - name: Build Website 51 | run: pnpm turbo run build --filter=website -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: "📦 Publish" 2 | on: 3 | push: 4 | branches: 5 | - release 6 | 7 | jobs: 8 | publish-tauri: 9 | permissions: 10 | contents: write 11 | strategy: 12 | fail-fast: false 13 | matrix: 14 | platform: [macos-latest, ubuntu-20.04, windows-latest] 15 | 16 | runs-on: ${{ matrix.platform }} 17 | steps: 18 | - uses: actions/checkout@v4 19 | - name: Setup Node 20 20 | uses: actions/setup-node@v4 21 | with: 22 | node-version: 20 23 | 24 | - name: Install Rust Stable 25 | uses: dtolnay/rust-toolchain@stable 26 | 27 | - name: Install Dependencies (ubuntu only) 28 | if: matrix.platform == 'ubuntu-20.04' 29 | run: | 30 | sudo apt-get update 31 | sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf 32 | 33 | - name: Install Dependencies 34 | run: pnpm install 35 | - uses: tauri-apps/tauri-action@v0 36 | env: 37 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 38 | with: 39 | tagName: typethings-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version 40 | releaseName: "v__VERSION__" 41 | releaseBody: "See the assets to download this version and install." 42 | releaseDraft: true 43 | prerelease: false 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | node_modules 3 | package-lock.json 4 | yarn.lock 5 | .pnp 6 | .pnp.js 7 | 8 | # Testing 9 | coverage 10 | 11 | # Build folders 12 | .next/ 13 | next-env.d.ts 14 | out/ 15 | build 16 | dist 17 | dist-ssr 18 | *.local 19 | 20 | # Astro generated types 21 | .astro/ 22 | 23 | # misc 24 | .DS_Store 25 | *.pem 26 | 27 | # debug 28 | npm-debug.log* 29 | yarn-debug.log* 30 | yarn-error.log* 31 | 32 | # local env files 33 | .env 34 | .env.local 35 | .env.development.local 36 | .env.test.local 37 | .env.production.local 38 | 39 | # turbo 40 | .turbo 41 | 42 | # vercel 43 | .vercel 44 | 45 | # Editor directories and files: 46 | .idea 47 | .DS_Store 48 | *.suo 49 | *.ntvs* 50 | *.njsproj 51 | *.sln 52 | *.sw? 53 | 54 | # Other: 55 | tsconfig.tsbuildinfo -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers = true 2 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | v18.18.0 -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "tauri-apps.tauri-vscode", 4 | "rust-lang.rust-analyzer", 5 | "tamasfe.even-better-toml", 6 | "esbenp.prettier-vscode", 7 | "dbaeumer.vscode-eslint" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "rust-analyzer.linkedProjects": ["app/src-tauri/Cargo.toml"] 3 | } 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 |
6 | 7 |

8 | 9 |
10 | 11 | Download 12 | 13 |  ✦  14 | 15 | Getting Started 16 | 17 |  ✦  18 | 19 | What's inside? 20 | 21 |  ✦  22 | 23 | Packages 24 | 25 |  ✦  26 | 27 | Website (soon) 28 | 29 |  ✦  30 | 31 | License 32 | 33 |
34 | 35 |

36 | 37 |
38 | 39 | ![Tauri](https://img.shields.io/badge/Tauri-FFC131?style=flat&logo=Tauri&logoColor=white) 40 | [![GitHub actions](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fpheralb%2Ftypethings%2Fbadge%3Fref%3Dmain&style=flat)](https://actions-badge.atrox.dev/pheralb/typethings/goto?ref=main) 41 | ![GitHub stars](https://img.shields.io/github/stars/pheralb/typethings) 42 | ![GitHub issues](https://img.shields.io/github/issues/pheralb/typethings) 43 | ![GitHub forks](https://img.shields.io/github/forks/pheralb/typethings) 44 | ![GitHub license](https://img.shields.io/github/license/pheralb/typethings) 45 | ![tailwindcss](https://img.shields.io/badge/tailwindcss%20-0F172A?logo=tailwindcss&style=flat&labelColor=38bdf8&logoColor=ffffff) 46 | 47 |
48 | 49 | > [!IMPORTANT] 50 | > This is a work-in-progress and not the finished product. 51 | > Typethings will be constantly updated and is not yet ready for its first release. 52 | 53 | ## Typethings logo  Introduction 54 | 55 | [**Typethings**](#) is an open source markdown editor built with [Tauri](https://tauri.app) and [React](https://react.dev). It is designed to be a simple, fast and beautiful for everyone. 56 | 57 | - [x] Create, read, delete markdown files. 58 | - [x] Create and delete workspaces. 59 | - [x] Open markdown files from a specific directory. 60 | - [x] Show files from workspace. 61 | - [x] CMD + K to search app settings & files. 62 | - [x] Support code with syntax highlighting. 63 | - [x] Light and dark mode. 64 | - [x] Works completely offline. 65 | 66 | ## 📦 Download 67 | 68 | **Download the latest release for your platform:** 69 | 70 | | | Platform | Version | Download | 71 | | --- | -------- | ---------------------------------------------------------------------------- | -------- | 72 | | ☁️ | Windows | ![GitHub releases](https://img.shields.io/github/release/pheralb/typethings) | _Soon_ | 73 | | ☁️ | Linux | ![GitHub releases](https://img.shields.io/github/release/pheralb/typethings) | _Soon_ | 74 | | ☁️ | MacOS | ![GitHub releases](https://img.shields.io/github/release/pheralb/typethings) | _Soon_ | 75 | 76 | ## 🚀 Getting Started 77 | 78 | To get a local copy up and running, please follow these simple steps. 79 | 80 | **Prerequisites:** 81 | 82 | - [Node.js +18 (LTS recommended)](https://nodejs.org/). Then run `node --version` in your terminal to check if it's installed correctly. 83 | - [pnpm (we are using +8.8.0)](https://pnpm.io/). Install with npm: `npm i pnpm -g`. Then run `pnpm --version` in your terminal to check if it's installed correctly. 84 | - [Visual Studio Code](https://code.visualstudio.com/) (recommended) or [Lapce](https://lapce.dev/). 85 | - Only for Windows: [Microsoft C++ Build Tools](https://visualstudio.microsoft.com/es/visual-cpp-build-tools/). 86 | - Rust. For Windows x64: [click here](https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe). For Linux: [click here](https://forge.rust-lang.org/infra/other-installation-methods.html#other-ways-to-install-rustup). Then, run `rustc --version` in your terminal to check if it's installed correctly. 87 | 88 | **Setup:** 89 | 90 | 1. Clone or [fork](https://github.com/pheralb/typethings/fork) this repository: 91 | 92 | ```bash 93 | git clone git@github.com:pheralb/typethings.git 94 | ``` 95 | 96 | 2. Install dependencies: 97 | 98 | ```bash 99 | # Access the project folder: 100 | cd typethings 101 | 102 | # Install dependencies: 103 | pnpm install 104 | ``` 105 | 106 | 3. Run the app: 107 | 108 | ```bash 109 | # Run all monorepo apps, websites and packages: 110 | pnpm dev 111 | 112 | # Run only website dev server: 113 | pnpm dev:web 114 | ``` 115 | 116 | ## 🤔 What's inside? 117 | 118 | ### Desktop App: 119 | 120 | Built with: 121 | 122 | - [Tauri](https://tauri.studio/en/) - Build smaller, faster, and more secure desktop applications with a web frontend. 123 | - [React](https://reactjs.org/) - A JavaScript library for building user interfaces. 124 | - [Zustand](https://docs.pmnd.rs/zustand/getting-started/introduction) - For state management in React. 125 | - [React Router v6](https://reactrouter.com/) - For routing in React. 126 | 127 | ### Website: 128 | 129 | Built with: 130 | 131 | - [Next.js](https://nextjs.org/) - The React Framework for Production. 132 | - [@typethings/ui](https://github.com/pheralb/typethings/tree/main/packages/ui) - A set of accessible UI components. 133 | 134 | ### Packages: 135 | 136 | For all websites & apps: 137 | 138 | | Package | Description | 139 | | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | 140 | | [@typethings/editor](https://github.com/pheralb/typethings/tree/main/packages/editor) | An unstyled primitives based on [Tiptap](https://tiptap.dev/) for building your custom WYSIWYG editor. | 141 | | [@typethings/functions](https://github.com/pheralb/typethings/tree/main/packages/functions) | A set of files/folders functions using Tauri API. | 142 | | [@typethings/ui](https://github.com/pheralb/typethings/tree/main/packages/ui) | A set of accessible UI components. Built with [React](https://react.dev), [shadcn/ui](https://ui.shadcn.com/) and [Tailwind CSS](https://tailwindcss.com/). | 143 | | [@typethings/tailwind-config](https://github.com/pheralb/typethings/tree/main/packages/ui) | [Tailwind CSS](https://tailwindcss.com/) configuration for Typethings App. | 144 | 145 | ## 📝 License 146 | 147 | - [Apache License 2.0](https://github.com/pheralb/typethings/blob/main/LICENSE). 148 | -------------------------------------------------------------------------------- /app/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { browser: true, es2020: true }, 4 | extends: [ 5 | "eslint:recommended", 6 | "plugin:@typescript-eslint/recommended", 7 | "plugin:react-hooks/recommended", 8 | ], 9 | ignorePatterns: ["dist", ".eslintrc.cjs"], 10 | parser: "@typescript-eslint/parser", 11 | plugins: ["react-refresh"], 12 | rules: { 13 | "react-refresh/only-export-components": [ 14 | "warn", 15 | { allowConstantExport: true }, 16 | ], 17 | }, 18 | }; 19 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs: 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | # Dependencies: 11 | node_modules 12 | dist 13 | dist-ssr 14 | *.local 15 | package-lock.json 16 | pnpm-lock.yaml 17 | yarn.lock 18 | 19 | # Editor directories and files: 20 | .vscode/* 21 | !.vscode/extensions.json 22 | .idea 23 | .DS_Store 24 | *.suo 25 | *.ntvs* 26 | *.njsproj 27 | *.sln 28 | *.sw? -------------------------------------------------------------------------------- /app/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": false, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "src/styles/globals.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true 11 | }, 12 | "aliases": { 13 | "components": "@/components", 14 | "utils": "@/utils" 15 | } 16 | } -------------------------------------------------------------------------------- /app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Tauri + React + TS 7 | 8 | 9 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@typethings/app", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "tauri dev", 8 | "icon": "tauri icon public/images/logo.png", 9 | "dev:vite": "vite", 10 | "build": "tsc && vite build", 11 | "build-tauri": "tauri build", 12 | "preview": "vite preview", 13 | "typecheck": "tsc --noEmit", 14 | "tauri": "tauri" 15 | }, 16 | "dependencies": { 17 | "@monaco-editor/react": "4.6.0", 18 | "@tauri-apps/api": "1.5.0", 19 | "@typethings/editor": "workspace:*", 20 | "@typethings/functions": "workspace:*", 21 | "@typethings/tailwind-config": "workspace:*", 22 | "@typethings/ui": "workspace:*", 23 | "boring-avatars": "1.10.1", 24 | "class-variance-authority": "0.7.0", 25 | "lucide-react": "0.286.0", 26 | "react": "18.2.0", 27 | "react-dom": "18.2.0", 28 | "react-hook-form": "7.47.0", 29 | "react-hotkeys-hook": "4.4.1", 30 | "react-router-dom": "6.16.0", 31 | "sonner": "1.0.3", 32 | "zustand": "4.4.3" 33 | }, 34 | "devDependencies": { 35 | "@tauri-apps/cli": "1.5.2", 36 | "@typescript-eslint/eslint-plugin": "6.7.5", 37 | "@typescript-eslint/parser": "6.7.5", 38 | "@vitejs/plugin-react": "4.1.0", 39 | "autoprefixer": "10.4.16", 40 | "eslint": "8.51.0", 41 | "eslint-plugin-react": "7.33.2", 42 | "postcss": "8.4.31", 43 | "tailwindcss": "3.3.3", 44 | "typescript": "5.2.2", 45 | "vite": "4.4.11" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | "postcss-import": {}, 4 | "tailwindcss/nesting": {}, 5 | tailwindcss: {}, 6 | autoprefixer: {}, 7 | }, 8 | }; 9 | -------------------------------------------------------------------------------- /app/public/fonts/Inter-roman.var.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/typethings/6a6fc777cc63c7cb4eea06dc97a61f1eac85ca14/app/public/fonts/Inter-roman.var.woff2 -------------------------------------------------------------------------------- /app/public/fonts/JetBrainsMono-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/typethings/6a6fc777cc63c7cb4eea06dc97a61f1eac85ca14/app/public/fonts/JetBrainsMono-Regular.woff2 -------------------------------------------------------------------------------- /app/public/grid/grid-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/public/grid/grid-light.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/public/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/typethings/6a6fc777cc63c7cb4eea06dc97a61f1eac85ca14/app/public/images/logo.png -------------------------------------------------------------------------------- /app/public/images/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | -------------------------------------------------------------------------------- /app/src-tauri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "typethings" 3 | version = "0.1.0" 4 | description = "A beautiful, minimal, and fast markdown editor" 5 | authors = ["pheralb"] 6 | license = "Apache-2.0" 7 | repository = "https://github.com/pheralb/typethings" 8 | edition = "2021" 9 | 10 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 11 | 12 | [build-dependencies] 13 | tauri-build = { version = "1.4", features = [] } 14 | 15 | [dependencies] 16 | tauri = { version = "1.4", features = [ 17 | "os-all", 18 | "process-relaunch-dangerous-allow-symlink-macos", 19 | "process-exit", 20 | "process-relaunch", 21 | "window-set-title", 22 | "path-all", 23 | "fs-remove-file", 24 | "fs-read-dir", 25 | "fs-write-file", 26 | "fs-rename-file", 27 | "fs-read-file", 28 | "fs-create-dir", 29 | "fs-remove-dir", 30 | "fs-exists", 31 | "dialog-confirm", 32 | "dialog-open", 33 | "dialog-save", 34 | "shell-open", 35 | ] } 36 | serde = { version = "1.0", features = ["derive"] } 37 | serde_json = "1.0" 38 | window-vibrancy = "0.4.2" 39 | 40 | [features] 41 | # this feature is used for production builds or when `devPath` points to the filesystem 42 | # DO NOT REMOVE!! 43 | custom-protocol = ["tauri/custom-protocol"] 44 | -------------------------------------------------------------------------------- /app/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /app/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/typethings/6a6fc777cc63c7cb4eea06dc97a61f1eac85ca14/app/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /app/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/typethings/6a6fc777cc63c7cb4eea06dc97a61f1eac85ca14/app/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /app/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/typethings/6a6fc777cc63c7cb4eea06dc97a61f1eac85ca14/app/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /app/src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/typethings/6a6fc777cc63c7cb4eea06dc97a61f1eac85ca14/app/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /app/src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/typethings/6a6fc777cc63c7cb4eea06dc97a61f1eac85ca14/app/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /app/src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/typethings/6a6fc777cc63c7cb4eea06dc97a61f1eac85ca14/app/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /app/src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/typethings/6a6fc777cc63c7cb4eea06dc97a61f1eac85ca14/app/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /app/src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/typethings/6a6fc777cc63c7cb4eea06dc97a61f1eac85ca14/app/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /app/src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/typethings/6a6fc777cc63c7cb4eea06dc97a61f1eac85ca14/app/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /app/src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/typethings/6a6fc777cc63c7cb4eea06dc97a61f1eac85ca14/app/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /app/src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/typethings/6a6fc777cc63c7cb4eea06dc97a61f1eac85ca14/app/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /app/src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/typethings/6a6fc777cc63c7cb4eea06dc97a61f1eac85ca14/app/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /app/src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/typethings/6a6fc777cc63c7cb4eea06dc97a61f1eac85ca14/app/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /app/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/typethings/6a6fc777cc63c7cb4eea06dc97a61f1eac85ca14/app/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /app/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/typethings/6a6fc777cc63c7cb4eea06dc97a61f1eac85ca14/app/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /app/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/typethings/6a6fc777cc63c7cb4eea06dc97a61f1eac85ca14/app/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /app/src-tauri/src/main.rs: -------------------------------------------------------------------------------- 1 | // Prevents additional console window on Windows in release, DO NOT REMOVE!! 2 | // #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] 3 | #![cfg_attr( 4 | all(not(debug_assertions), target_os = "windows"), 5 | windows_subsystem = "windows" 6 | )] 7 | 8 | use tauri::Manager; 9 | use window_vibrancy::{apply_vibrancy, NSVisualEffectMaterial}; 10 | 11 | fn main() { 12 | tauri::Builder::default() 13 | .setup(|app| { 14 | let window: tauri::Window = app.get_window("main").unwrap(); 15 | 16 | #[cfg(target_os = "macos")] 17 | apply_vibrancy(&window, NSVisualEffectMaterial::HudWindow, None, None) 18 | .expect("Unsupported platform! 'apply_vibrancy' is only supported on macOS"); 19 | 20 | Ok(()) 21 | }) 22 | .run(tauri::generate_context!()) 23 | .expect("error while running tauri application"); 24 | } 25 | -------------------------------------------------------------------------------- /app/src-tauri/tauri.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": { 3 | "beforeDevCommand": "npm run dev:vite", 4 | "beforeBuildCommand": "npm run build", 5 | "devPath": "http://localhost:1420", 6 | "distDir": "../dist", 7 | "withGlobalTauri": false 8 | }, 9 | "package": { 10 | "productName": "typethings", 11 | "version": "0.0.0" 12 | }, 13 | "tauri": { 14 | "allowlist": { 15 | "all": false, 16 | "process": { 17 | "all": false, 18 | "exit": true, 19 | "relaunch": true, 20 | "relaunchDangerousAllowSymlinkMacos": false 21 | }, 22 | "os": { 23 | "all": true 24 | }, 25 | "window": { 26 | "all": false, 27 | "center": false, 28 | "close": false, 29 | "create": false, 30 | "hide": false, 31 | "maximize": false, 32 | "minimize": false, 33 | "print": false, 34 | "requestUserAttention": false, 35 | "setAlwaysOnTop": false, 36 | "setClosable": false, 37 | "setContentProtected": false, 38 | "setCursorGrab": false, 39 | "setCursorIcon": false, 40 | "setCursorPosition": false, 41 | "setCursorVisible": false, 42 | "setDecorations": false, 43 | "setFocus": false, 44 | "setFullscreen": false, 45 | "setIcon": false, 46 | "setIgnoreCursorEvents": false, 47 | "setMaxSize": false, 48 | "setMaximizable": false, 49 | "setMinSize": false, 50 | "setMinimizable": false, 51 | "setPosition": false, 52 | "setResizable": false, 53 | "setSize": false, 54 | "setSkipTaskbar": false, 55 | "setTitle": true, 56 | "show": false, 57 | "startDragging": false, 58 | "unmaximize": false, 59 | "unminimize": false 60 | }, 61 | "shell": { 62 | "all": false, 63 | "open": true 64 | }, 65 | "dialog": { 66 | "all": false, 67 | "save": true, 68 | "open": true, 69 | "confirm": true 70 | }, 71 | "path": { 72 | "all": true 73 | }, 74 | "fs": { 75 | "all": false, 76 | "copyFile": false, 77 | "createDir": true, 78 | "exists": true, 79 | "readDir": true, 80 | "readFile": true, 81 | "removeDir": true, 82 | "removeFile": true, 83 | "renameFile": true, 84 | "scope": ["$DOCUMENT/*", "$DESKTOP/**/**"], 85 | "writeFile": true 86 | } 87 | }, 88 | "bundle": { 89 | "active": true, 90 | "targets": "all", 91 | "identifier": "com.typethings.dev", 92 | "icon": [ 93 | "icons/32x32.png", 94 | "icons/128x128.png", 95 | "icons/128x128@2x.png", 96 | "icons/icon.icns", 97 | "icons/icon.ico" 98 | ] 99 | }, 100 | "security": { 101 | "csp": null 102 | }, 103 | "windows": [ 104 | { 105 | "fullscreen": false, 106 | "resizable": true, 107 | "title": "Typethings", 108 | "width": 1100, 109 | "height": 600 110 | } 111 | ] 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /app/src/components/changeTheme.tsx: -------------------------------------------------------------------------------- 1 | import { Moon, Sun } from "lucide-react"; 2 | 3 | import { 4 | Button, 5 | DropdownMenu, 6 | DropdownMenuContent, 7 | DropdownMenuItem, 8 | DropdownMenuTrigger, 9 | } from "@typethings/ui"; 10 | 11 | import { useTheme } from "@/providers/themeProvider"; 12 | 13 | const ChangeTheme = () => { 14 | const { setTheme } = useTheme(); 15 | return ( 16 | 17 | 18 | 23 | 24 | 25 | setTheme("light")}> 26 | Light 27 | 28 | setTheme("dark")}> 29 | Dark 30 | 31 | setTheme("system")}> 32 | System 33 | 34 | 35 | 36 | ); 37 | }; 38 | 39 | export default ChangeTheme; 40 | -------------------------------------------------------------------------------- /app/src/components/container.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactNode } from "react"; 2 | import { cn } from "@typethings/ui"; 3 | 4 | interface ContainerProps { 5 | children: ReactNode; 6 | className?: string; 7 | } 8 | 9 | const Container = (props: ContainerProps) => { 10 | return ( 11 |
17 | {props.children} 18 |
19 | ); 20 | }; 21 | 22 | export default Container; 23 | -------------------------------------------------------------------------------- /app/src/components/errorElement.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "react"; 2 | import { useRouteError } from "react-router-dom"; 3 | import { exit, relaunch } from "@tauri-apps/api/process"; 4 | 5 | import { Button, buttonVariants, ExternalLink } from "@typethings/ui"; 6 | import { AlertTriangle, ArrowUpRight, LogOut, RefreshCw } from "lucide-react"; 7 | 8 | import { type OSInfo, getOSInfo } from "@typethings/functions"; 9 | 10 | const ErrorElement = () => { 11 | const error = useRouteError() as any; 12 | const [platform, setPlatform] = useState(); 13 | 14 | useEffect(() => { 15 | const handle = async () => { 16 | const platform = await getOSInfo(); 17 | setPlatform(platform!); 18 | }; 19 | handle(); 20 | }, []); 21 | 22 | return ( 23 |
24 |
25 |
26 |
27 | 28 |

Something went wrong.

29 |
30 |
31 |

Error:

32 |