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

This commit is contained in:
upstream-mirror
2026-09-23 16:12:52 +05:00
commit a774ac673a
4541 changed files with 770499 additions and 0 deletions

1
internal/apps-script/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.clasp.json

View File

@@ -0,0 +1,23 @@
# tldraw Google Add-ons
This is an experimental/in-development library to create add-ons for Google Meet.
## Contribution
Found a bug? Please [submit an issue](https://github.com/tldraw/tldraw/issues/new).
## License
The code in this folder is Copyright (c) 2024-present tldraw Inc. The tldraw SDK is provided under the [tldraw license](https://github.com/tldraw/tldraw/blob/main/LICENSE.md).
## 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.
## Contact
Find us on Twitter/X at [@tldraw](https://twitter.com/tldraw).
## 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).

View File

@@ -0,0 +1,33 @@
{
"addOns": {
"common": {
"layoutProperties": {
"primaryColor": "#000",
"secondaryColor": "#fff"
},
"logoUrl": "TLDRAW_HOST/android-chrome-maskable-512x512.png",
"name": "tldraw"
},
"meet": {
"web": {
"sidePanelUri": "TLDRAW_HOST/ts-side",
"mainStageUri": "TLDRAW_HOST/ts",
"supportsScreenSharing": true,
"logoUrl": "TLDRAW_HOST/android-chrome-maskable-512x512.png",
"addOnOrigins": ["TLDRAW_HOST"]
}
}
},
"timeZone": "Europe/London",
"dependencies": {},
"exceptionLogging": "STACKDRIVER",
"runtimeVersion": "V8",
"oauthScopes": [
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/userinfo.profile",
"https://www.googleapis.com/auth/documents.currentonly",
"https://www.googleapis.com/auth/script.external_request",
"https://www.googleapis.com/auth/workspace.linkpreview"
],
"urlFetchWhitelist": ["TLDRAW_HOST/"]
}

View File

@@ -0,0 +1,30 @@
import { mkdirSync, writeFileSync } from 'fs'
import path from 'path'
import { exec } from '../../internal/scripts/lib/exec'
import { readFileIfExists } from '../../internal/scripts/lib/file'
async function build() {
await exec('rm', ['-rf', 'dist'])
mkdirSync('dist')
const appsScriptPath = './appsscript.json'
await exec('cp', ['-r', appsScriptPath, 'dist'])
const isProduction = process.env.IS_PRODUCTION === '1'
const scriptId = isProduction
? '1FWcAvz7Rl4iPXQX3KmXm2mNG_RK2kryS7Bja8Y7RHvuAHnic51p_pqe7'
: '1cJfZM0M_rGU-nYgG-4KR1DnERb7itkCsl1QmlqPxFvHnrz5n6Gfy8iht'
writeFileSync('./.clasp.json', `{"scriptId":"${scriptId}","rootDir":"./dist"}`)
const host = isProduction ? 'https://www.tldraw.com' : 'https://staging.tldraw.com'
await replaceInFile(appsScriptPath, 'TLDRAW_HOST', host)
}
async function replaceInFile(filename: string, searchValue: string, replaceValue: string) {
let contents = (await readFileIfExists(path.join('dist', filename))) ?? ''
contents = contents.replaceAll(searchValue, replaceValue)
writeFileSync(path.join('dist', filename), contents)
}
build()

View File

@@ -0,0 +1,47 @@
{
"name": "apps-scripts",
"description": "tldraw for Google Apps",
"version": "0.0.0",
"private": true,
"author": {
"name": "tldraw Inc.",
"email": "hello@tldraw.com"
},
"homepage": "https://tldraw.dev",
"license": "SEE LICENSE IN LICENSE.md",
"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"
],
"scripts": {
"lint": "yarn run -T tsx ../scripts/lint.ts",
"glogin": "clasp login",
"glogout": "clasp logout",
"gcreate": "clasp create --type standalone --title \"tldraw.com\" --rootDir ./dist",
"gpull": "yarn build && clasp pull",
"gpush": "yarn build && clasp push",
"gpull:staging": "yarn build:staging && clasp pull",
"gpush:staging": "yarn build:staging && clasp push",
"build": "IS_PRODUCTION=1 yarn run -T tsx build-workspace-app.ts",
"build:staging": "yarn run -T tsx build-workspace-app.ts"
},
"dependencies": {
"@google/clasp": "^3.2.0"
},
"devDependencies": {
"@types/google-apps-script": "^1.0.91"
}
}

View File

@@ -0,0 +1,23 @@
{
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"target": "esnext",
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"types": ["node"],
"jsx": "preserve",
"incremental": true,
"plugins": [{ "name": "next" }]
},
"include": ["**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"],
"references": []
}