From 1db27195f46db0532b6b231658177d85ddfbf43e Mon Sep 17 00:00:00 2001 From: okxlin Date: Mon, 4 Sep 2023 01:47:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0tldraw=E5=88=B0=E5=88=97?= =?UTF-8?q?=E8=A1=A8(=E6=84=9F=E8=B0=A2=E7=BD=91=E5=8F=8B=E5=8C=85?= =?UTF-8?q?=E5=AD=90=E5=8F=94=E7=9A=84=E6=8A=95=E7=A8=BF)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/tldraw/README.md | 112 ++++++++++++++++++++++++++ apps/tldraw/data.yml | 20 +++++ apps/tldraw/latest/.env.sample | 2 + apps/tldraw/latest/data.yml | 10 +++ apps/tldraw/latest/docker-compose.yml | 16 ++++ apps/tldraw/logo.png | Bin 0 -> 6116 bytes 6 files changed, 160 insertions(+) create mode 100644 apps/tldraw/README.md create mode 100644 apps/tldraw/data.yml create mode 100644 apps/tldraw/latest/.env.sample create mode 100644 apps/tldraw/latest/data.yml create mode 100644 apps/tldraw/latest/docker-compose.yml create mode 100644 apps/tldraw/logo.png diff --git a/apps/tldraw/README.md b/apps/tldraw/README.md new file mode 100644 index 00000000..48be447b --- /dev/null +++ b/apps/tldraw/README.md @@ -0,0 +1,112 @@ +
+ + + tldraw + +
+ +# tldraw + +Welcome to the public monorepo for [tldraw](https://tldraw.com). + +## What is tldraw? + +tldraw is a collaborative digital whiteboard available at [tldraw.com](https://tldraw.com). Its editor, user interface, and other underlying libraries are open source and available in this repository. They are also distributed on npm. You can use tldraw to create a drop-in whiteboard for your product or as the foundation on which to build your own infinite canvas applications. + +Learn more at [tldraw.dev](https://tldraw.dev). + +> **Note** This repo contains source code for the **current version** of tldraw. You can find the source for the original version [here](https://github.com/tldraw/tldraw-v1). + +## Installation & Usage + +To learn more about using tldraw in your React application, follow our guide [here](https://tldraw.dev/installation) or see the [examples sandbox](https://stackblitz.com/github/tldraw/tldraw/tree/examples?file=src%2F1-basic%2FBasicExample.tsx). + +```tsx +import { Tldraw } from '@tldraw/tldraw' +import '@tldraw/tldraw/tldraw.css' + +export default function () { + return ( +
+ +
+ ) +} +``` + +## Local development + +To run the local development server, first clone this repo. + +Install dependencies: + +```bash +yarn +``` + +Start the local development server: + +```bash +yarn dev +``` + +Open the example project at `localhost:5420`. + +### Examples + +Our development server contains several examples that demonstrates different ways that you can customize tldraw or use its APIs. Each example is found in the [**apps/examples**](https://github.com/tldraw/tldraw/tree/main/apps/examples) folder. + +- eg: `localhost:5420` for the basic example. +- eg: `localhost:5420/api` for the API example. + +To learn more about using tldraw, [visit our docs](https://tldraw.dev). + +## About this repository + +### Top-level layout + +This repository's contents is divided across four primary sections: + +- `/apps` contains the source for our applications +- `/packages` contains the source for our public packages +- `/scripts` contains scripts used for building and publishing +- `/assets` contains icons and translations relied on by the app +- `/docs` contains the content for our docs site at [tldraw.dev](https://tldraw.dev) + +### Applications + +- `examples`: our local development / examples project +- `vscode`: our [Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=tldraw-org.tldraw-vscode) + +### Packages + +- `assets`: a library for working with tldraw's fonts and translations +- `editor`: the tldraw editor +- `state`: a signals library, also known as signia +- `store`: an in-memory reactive database +- `tldraw`: the main tldraw package containing both the editor and the UI +- `tlschema`: shape definitions and migrations +- `utils`: low-level data utilities shared by other libraries +- `validate`: a validation library used for run-time validation + +## Community + +Have questions, comments or feedback? [Join our discord](https://discord.gg/rhsyWMUJxd) or [start a discussion](https://github.com/tldraw/tldraw/discussions/new). + +## Distributions + +You can find tldraw on npm [here](https://www.npmjs.com/package/@tldraw/tldraw?activeTab=versions). + +At the moment the tldraw package is in alpha. We also ship a canary version which is always up to date with the main branch of this repo. + +## License + +The source code for various apps and packages in this repository (as well as our 2.0+ distributions and releases) are currently licensed under Apache-2.0. These licenses are subject to change in our upcoming 2.0 release. If you are planning to use tldraw in a commercial product, please reach out at [hello@tldraw.com](mailto://hello@tldraw.com). + +## Contribution + +Please see our [contributing guide](https://github.com/tldraw/tldraw/blob/main/CONTRIBUTING.md). Found a bug? Please [submit an issue](https://github.com/tldraw/tldraw/issues/new). + +## Contact + +Find us on Twitter at [@tldraw](https://twitter.com/tldraw) or email [hello@tldraw.com](mailto://hello@tldraw.com). You can also [join our discord](https://discord.gg/rhsyWMUJxd) for quick help and support. diff --git a/apps/tldraw/data.yml b/apps/tldraw/data.yml new file mode 100644 index 00000000..2c0115e0 --- /dev/null +++ b/apps/tldraw/data.yml @@ -0,0 +1,20 @@ +name: tldraw +tags: + - 工具 +title: 一款协作式数字白板 +type: 工具 +description: 一款协作式数字白板 +additionalProperties: + key: tldraw + name: tldraw + tags: + - Tool + shortDescZh: 一款协作式数字白板 + shortDescEn: A collaborative digital whiteboard + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://www.tldraw.com + github: https://github.com/tldraw/tldraw + document: https://tldraw.dev diff --git a/apps/tldraw/latest/.env.sample b/apps/tldraw/latest/.env.sample new file mode 100644 index 00000000..51e757ed --- /dev/null +++ b/apps/tldraw/latest/.env.sample @@ -0,0 +1,2 @@ +CONTAINER_NAME="tldraw" +PANEL_APP_PORT_HTTP="40151" diff --git a/apps/tldraw/latest/data.yml b/apps/tldraw/latest/data.yml new file mode 100644 index 00000000..51e0c13c --- /dev/null +++ b/apps/tldraw/latest/data.yml @@ -0,0 +1,10 @@ +additionalProperties: + formFields: + - default: 40151 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number diff --git a/apps/tldraw/latest/docker-compose.yml b/apps/tldraw/latest/docker-compose.yml new file mode 100644 index 00000000..db049758 --- /dev/null +++ b/apps/tldraw/latest/docker-compose.yml @@ -0,0 +1,16 @@ +version: '3' +services: + tldraw: + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:80" + image: ratneo/tldraw:latest + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/tldraw/logo.png b/apps/tldraw/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..d20e4a5655db7445583c106c6b99fd7dea7ecaa6 GIT binary patch literal 6116 zcmbt&cOcY%{J)fvNGKU0Gs%j}ID2J;gseEL%#3VjRJMe~IWtaWUAmCt;;ggxx@p~0nh~X1m;rgD!96eF=w-1hMX;jRF!<2VIts`ye{nwrU<3DUE0&!;LTQJG;; zIIR5%X36*825NiTx@Tv3Zfjop^Wfq{FLBw|rGo9Xa{a#f!pPD#4Q6)%)1QO%`FxMZ z=aO-e2n#JE^*J^^uT%GNscm?+r;PmChL3D`gAKtOhA|rcl{yyU)_8;G`~4CVS4IsD zZT{RRGUM1YH`154q0M$lhD8x><0DwT5))n)T055WrDkuRN@xpS_3At6PWdh37Z!1MUO8uE$p^k4h6TkFqUnuKRr$V>yzLmtB-9H>Lxtjqd2#X6-&IVcIhmnGUv1Xr)Cmg z9`SnA9ZN~OPk1II>k7oS&ap(P+`QtM=Pr0P4~9wZC8dA(-~fkbpiMD$=FCP$M)Lc= zlb=si_3!5!4A0g|9b2Oq7=BRc+~h9}RZH!5koEdajj25lTB|!%#JVxXH5U?Hz$ImF zfQP$hthLp~nb^wiF7Yr&QBM@fi|pK(jT8H~PN27Exlf4aftZ>_IH)_(DX=Xyo}qJY zdE$X@Mq_F_E^q}ai?e*f<2gFZ3XO%*^0jf6?t51Pv{^1kYYQZwqdZeg6uK^IX>)pV z41R#Y7x_5@e=~$N;q)e`WVl7ieIZ0+nee}Td4vvCXPLZfGpu6Hr9ua1nQta+SYiUUs{Zkj z<`S=Ff`Jf%ZE0p{EO&!&tBYIJwXlI!0gA@J$FZ`3|M)y=_XVUqraqz3anGe5h$272 zFrYwc&s3G7h7+M&^<7=GL>GiQ4>+n{O|eWj6ob>^u8YC%+wI2ZiAPhfs3vy((8>wf zVJ*?IwOd7cI&m56W^c|MWqXAtQmbGvOXfvb zQBhHpYtn+e63_Pwt4BD)B5~09>5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