snapshot of https://github.com/tldraw/tldraw.git (main, 2026-09-23; blobs > 131072B omitted)
Some checks failed
Deploy analytics worker / Deploy analytics worker to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Failing after 1s
i18n upload strings / Upload latest strings (push) Failing after 1s
Deploy bemo / Deploy bemo to ${{ (github.ref == 'refs/heads/bemo-production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Failing after 1s
Deploy grafana resources / ${{ github.event_name == 'push' && 'Deploy grafana resources' || 'Validate grafana resources (dry run)' }} (push) Failing after 0s
End to end tests (dotcom) / Check for relevant changes (push) Failing after 0s
End to end tests (examples) / Check for relevant changes (push) Failing after 0s
End to end tests (mermaid readability) / Check for relevant changes (push) Failing after 1s
End to end tests (perf) / Check for relevant changes (push) Failing after 0s
Publish editor extensions / Publish editor extensions (push) Failing after 1s
Publish SDK packages / Remove the publish-packages label (push) Has been skipped
Checks / Tests & checks (push) Has been cancelled
Checks / Build all projects (push) Has been cancelled
Deploy templates / Deploy templates (push) Has been cancelled
End to end tests (dotcom) / End to end tests (dotcom) (push) Has been cancelled
End to end tests (mermaid readability) / End to end tests (mermaid readability) (push) Has been cancelled
End to end tests (perf) / End to end tests (perf) (push) Has been cancelled
Deploy .com / Deploy dotcom to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Has been cancelled
End to end tests (examples) / End to end tests (examples) (push) Has been cancelled
Publish SDK packages / Publish SDK packages (push) Has been cancelled
Publish SDK packages / Tell user released version (push) Has been cancelled
Publish SDK packages / Publishes code templates to separate repositories (push) Has been cancelled
Publish SDK packages / Deploys the template demos with the new SDK version (push) Has been cancelled
Some checks failed
Deploy analytics worker / Deploy analytics worker to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Failing after 1s
i18n upload strings / Upload latest strings (push) Failing after 1s
Deploy bemo / Deploy bemo to ${{ (github.ref == 'refs/heads/bemo-production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Failing after 1s
Deploy grafana resources / ${{ github.event_name == 'push' && 'Deploy grafana resources' || 'Validate grafana resources (dry run)' }} (push) Failing after 0s
End to end tests (dotcom) / Check for relevant changes (push) Failing after 0s
End to end tests (examples) / Check for relevant changes (push) Failing after 0s
End to end tests (mermaid readability) / Check for relevant changes (push) Failing after 1s
End to end tests (perf) / Check for relevant changes (push) Failing after 0s
Publish editor extensions / Publish editor extensions (push) Failing after 1s
Publish SDK packages / Remove the publish-packages label (push) Has been skipped
Checks / Tests & checks (push) Has been cancelled
Checks / Build all projects (push) Has been cancelled
Deploy templates / Deploy templates (push) Has been cancelled
End to end tests (dotcom) / End to end tests (dotcom) (push) Has been cancelled
End to end tests (mermaid readability) / End to end tests (mermaid readability) (push) Has been cancelled
End to end tests (perf) / End to end tests (perf) (push) Has been cancelled
Deploy .com / Deploy dotcom to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Has been cancelled
End to end tests (examples) / End to end tests (examples) (push) Has been cancelled
Publish SDK packages / Publish SDK packages (push) Has been cancelled
Publish SDK packages / Tell user released version (push) Has been cancelled
Publish SDK packages / Publishes code templates to separate repositories (push) Has been cancelled
Publish SDK packages / Deploys the template demos with the new SDK version (push) Has been cancelled
This commit is contained in:
1
packages/namespaced-tldraw/LICENSE.md
Normal file
1
packages/namespaced-tldraw/LICENSE.md
Normal file
@@ -0,0 +1 @@
|
||||
This code is licensed under the [tldraw license](https://github.com/tldraw/tldraw/blob/main/LICENSE.md)
|
||||
35
packages/namespaced-tldraw/README.md
Normal file
35
packages/namespaced-tldraw/README.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# @tldraw/tldraw
|
||||
|
||||
This package is kept around for legacy purposes. It just tracks the normal `tldraw` package. Please install that one instead.
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation for the most recent release can be found on [tldraw.dev/docs](https://tldraw.dev/docs), including [reference docs](https://tldraw.dev/reference/editor/Editor). Our release notes can be found [here](https://tldraw.dev/releases).
|
||||
|
||||
For more agent-friendly docs, see our [LLMs.txt](https://tldraw.dev/llms.txt).
|
||||
|
||||
## License
|
||||
|
||||
This project is part of the tldraw SDK. It is provided under the [tldraw SDK license](https://github.com/tldraw/tldraw/blob/main/LICENSE.md).
|
||||
|
||||
You can use the tldraw SDK in commercial or non-commercial projects so long as you preserve the "Made with tldraw" watermark on the canvas. To remove the watermark, you can purchase a [business license](https://tldraw.dev/pricing). Visit [tldraw.dev](https://tldraw.dev) to learn more.
|
||||
|
||||
## Trademarks
|
||||
|
||||
Copyright (c) 2024-present tldraw Inc. The tldraw name and logo are trademarks of tldraw. Please see our [trademark guidelines](https://github.com/tldraw/tldraw/blob/main/TRADEMARKS.md) for info on acceptable usage.
|
||||
|
||||
## Distributions
|
||||
|
||||
You can find tldraw on npm [here](https://www.npmjs.com/package/@tldraw/tldraw?activeTab=versions).
|
||||
|
||||
## Contribution
|
||||
|
||||
Found a bug? Please [submit an issue](https://github.com/tldraw/tldraw/issues/new).
|
||||
|
||||
## Community
|
||||
|
||||
Have questions, comments or feedback? [Join our discord](https://discord.tldraw.com/?utm_source=github&utm_medium=readme&utm_campaign=sociallink). For the latest news and release notes, visit [tldraw.dev](https://tldraw.dev).
|
||||
|
||||
## Contact
|
||||
|
||||
Find us on Twitter/X at [@tldraw](https://twitter.com/tldraw).
|
||||
20
packages/namespaced-tldraw/api-extractor.json
Normal file
20
packages/namespaced-tldraw/api-extractor.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
||||
"extends": "../../internal/config/api-extractor.json",
|
||||
// the file paths in the shared api-extractor.json don't work for us here, so we specify them manually:
|
||||
"mainEntryPointFilePath": "<projectFolder>/packages/namespaced-tldraw/.tsbuild-api/index.d.ts",
|
||||
"compiler": {
|
||||
"tsconfigFilePath": "<projectFolder>/packages/namespaced-tldraw/tsconfig.json"
|
||||
},
|
||||
"apiReport": {
|
||||
"reportFolder": "<projectFolder>/packages/namespaced-tldraw/",
|
||||
"reportTempFolder": "<projectFolder>/packages/namespaced-tldraw/api/temp"
|
||||
},
|
||||
"docModel": {
|
||||
"apiJsonFilePath": "<projectFolder>/packages/namespaced-tldraw/api/api.json"
|
||||
},
|
||||
"dtsRollup": {
|
||||
"untrimmedFilePath": "<projectFolder>/packages/namespaced-tldraw/api/internal.d.ts",
|
||||
"publicTrimmedFilePath": "<projectFolder>/packages/namespaced-tldraw/api/public.d.ts"
|
||||
}
|
||||
}
|
||||
12
packages/namespaced-tldraw/api-report.api.md
Normal file
12
packages/namespaced-tldraw/api-report.api.md
Normal file
@@ -0,0 +1,12 @@
|
||||
## API Report File for "@tldraw/tldraw"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
|
||||
export * from "tldraw";
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
73
packages/namespaced-tldraw/package.json
Normal file
73
packages/namespaced-tldraw/package.json
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"name": "@tldraw/tldraw",
|
||||
"description": "A tiny little drawing editor.",
|
||||
"version": "5.4.2",
|
||||
"author": {
|
||||
"name": "tldraw Inc.",
|
||||
"email": "hello@tldraw.com"
|
||||
},
|
||||
"homepage": "https://tldraw.dev",
|
||||
"license": "SEE LICENSE IN LICENSE.md",
|
||||
"tldraw_product": {
|
||||
"stableId": "tldraw:sdk-core",
|
||||
"name": "SDK",
|
||||
"type": "product",
|
||||
"premium": false
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/tldraw/tldraw"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/tldraw/tldraw/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"tldraw",
|
||||
"sdk",
|
||||
"drawing",
|
||||
"app",
|
||||
"development",
|
||||
"whiteboard",
|
||||
"canvas",
|
||||
"infinite"
|
||||
],
|
||||
"/* NOTE */": "These `main` and `types` fields are rewritten by the build script. They are not the actual values we publish",
|
||||
"main": "./src/index.ts",
|
||||
"types": "./.tsbuild/index.d.ts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test-ci": "yarn run -T vitest run --passWithNoTests",
|
||||
"test": "yarn run -T vitest --passWithNoTests",
|
||||
"test-coverage": "yarn run -T vitest run --coverage --passWithNoTests",
|
||||
"predev": "node ./scripts/copy-css-files.mjs",
|
||||
"dev": "chokidar '../tldraw/tldraw.css' -c 'node ./scripts/copy-css-files.mjs'",
|
||||
"prebuild": "node ./scripts/copy-css-files.mjs",
|
||||
"build": "yarn run -T tsx ../../internal/scripts/build-package.ts",
|
||||
"build-api": "yarn run -T tsx ../../internal/scripts/build-api.ts",
|
||||
"prepack": "yarn run -T tsx ../../internal/scripts/prepack.ts",
|
||||
"postpack": "../../internal/scripts/postpack.sh",
|
||||
"pack-tarball": "yarn pack",
|
||||
"lint": "yarn run -T tsx ../../internal/scripts/lint.ts"
|
||||
},
|
||||
"files": [
|
||||
"tldraw.css"
|
||||
],
|
||||
"dependencies": {
|
||||
"tldraw": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^18.2.0 || ^19.2.1",
|
||||
"react-dom": "^18.2.0 || ^19.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.2.7",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"chokidar-cli": "^3.0.0",
|
||||
"lazyrepo": "0.0.0-alpha.27",
|
||||
"react": "^19.2.1",
|
||||
"react-dom": "^19.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
}
|
||||
}
|
||||
30
packages/namespaced-tldraw/scripts/copy-css-files.mjs
Normal file
30
packages/namespaced-tldraw/scripts/copy-css-files.mjs
Normal file
@@ -0,0 +1,30 @@
|
||||
import { readFileSync, writeFileSync } from 'fs'
|
||||
import { dirname, join } from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = dirname(__filename)
|
||||
|
||||
const packageDir = join(__dirname, '..')
|
||||
|
||||
// Generate CSS from source files directly (same sources as packages/tldraw)
|
||||
// to avoid depending on tldraw's generated tldraw.css which may not exist
|
||||
// when lazyrepo caching skips the prebuild step.
|
||||
let combinedContent = [
|
||||
join(packageDir, '..', 'editor', 'editor.css'),
|
||||
join(packageDir, '..', 'tldraw', 'src', 'lib', 'ui.css'),
|
||||
].reduce(
|
||||
(acc, path) => {
|
||||
const content = readFileSync(path, 'utf8')
|
||||
acc += content + '\n'
|
||||
return acc
|
||||
},
|
||||
`/* THIS CSS FILE IS GENERATED! DO NOT EDIT. OR EDIT. I'M A COMMENT NOT A COP */
|
||||
/* This file is created by the copy-css-files.mjs script in packages/namespaced-tldraw. */
|
||||
/* It combines @tldraw/editor's editor.css and tldraw's ui.css */
|
||||
|
||||
`
|
||||
)
|
||||
|
||||
const destination = join(packageDir, 'tldraw.css')
|
||||
writeFileSync(destination, combinedContent)
|
||||
10
packages/namespaced-tldraw/src/index.test.ts
Normal file
10
packages/namespaced-tldraw/src/index.test.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import * as tldraw from './index'
|
||||
|
||||
it('exports things from tldraw', () => {
|
||||
expect(tldraw).toHaveProperty('Tldraw')
|
||||
expect(new tldraw.Vec()).toMatchObject({ x: 0, y: 0 })
|
||||
})
|
||||
|
||||
it('exports types from tldraw', () => {
|
||||
const _thing: tldraw.VecModel = { x: 0, y: 0 }
|
||||
})
|
||||
9
packages/namespaced-tldraw/src/index.ts
Normal file
9
packages/namespaced-tldraw/src/index.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { registerTldrawLibraryVersion } from 'tldraw'
|
||||
// eslint-disable-next-line tldraw/no-export-star
|
||||
export * from 'tldraw'
|
||||
|
||||
registerTldrawLibraryVersion(
|
||||
(globalThis as any).TLDRAW_LIBRARY_NAME,
|
||||
(globalThis as any).TLDRAW_LIBRARY_VERSION,
|
||||
(globalThis as any).TLDRAW_LIBRARY_MODULES
|
||||
)
|
||||
7
packages/namespaced-tldraw/tsconfig.json
Normal file
7
packages/namespaced-tldraw/tsconfig.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends": "../../internal/config/tsconfig.base.json",
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "dist", "**/*.css", ".tsbuild*", "./scripts/legacy-translations"],
|
||||
"compilerOptions": { "outDir": "./.tsbuild", "noImplicitReturns": false, "rootDir": "src" },
|
||||
"references": [{ "path": "../tldraw" }]
|
||||
}
|
||||
6
packages/namespaced-tldraw/vitest.config.ts
Normal file
6
packages/namespaced-tldraw/vitest.config.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
/// <reference types="vitest" />
|
||||
import { mergeConfig } from 'vitest/config'
|
||||
import baseConfig from '../../internal/config/vitest/node-preset'
|
||||
|
||||
// namespaced-tldraw package uses the standard node preset with no overrides
|
||||
export default mergeConfig(baseConfig, {})
|
||||
Reference in New Issue
Block a user