@tldraw/tlschema
Advanced tools
Comparing version 3.7.2 to 3.8.0-canary.0758b9af935c
@@ -404,2 +404,5 @@ import { BaseRecord } from '@tldraw/store'; | ||
}, { | ||
readonly label: "Bahasa Melayu"; | ||
readonly locale: "ms"; | ||
}, { | ||
readonly label: "Català"; | ||
@@ -423,2 +426,5 @@ readonly locale: "ca"; | ||
}, { | ||
readonly label: "Filipino"; | ||
readonly locale: "tl"; | ||
}, { | ||
readonly label: "Français"; | ||
@@ -439,2 +445,5 @@ readonly locale: "fr"; | ||
}, { | ||
readonly label: "Nederlands"; | ||
readonly locale: "nl"; | ||
}, { | ||
readonly label: "Norwegian"; | ||
@@ -455,5 +464,2 @@ readonly locale: "no"; | ||
}, { | ||
readonly label: "Russian"; | ||
readonly locale: "ru"; | ||
}, { | ||
readonly label: "Slovenščina"; | ||
@@ -477,3 +483,9 @@ readonly locale: "sl"; | ||
}, { | ||
readonly label: "Ukrainian"; | ||
readonly label: "Ελληνικά"; | ||
readonly locale: "el"; | ||
}, { | ||
readonly label: "Русский"; | ||
readonly locale: "ru"; | ||
}, { | ||
readonly label: "Українська"; | ||
readonly locale: "uk"; | ||
@@ -484,2 +496,5 @@ }, { | ||
}, { | ||
readonly label: "اردو"; | ||
readonly locale: "ur"; | ||
}, { | ||
readonly label: "عربي"; | ||
@@ -491,19 +506,37 @@ readonly locale: "ar"; | ||
}, { | ||
readonly label: "کوردی"; | ||
readonly locale: "ku"; | ||
}, { | ||
readonly label: "नेपाली"; | ||
readonly locale: "ne"; | ||
}, { | ||
readonly label: "मराठी"; | ||
readonly locale: "mr"; | ||
}, { | ||
readonly label: "हिन्दी"; | ||
readonly locale: "hi-in"; | ||
}, { | ||
readonly label: "বাংলা"; | ||
readonly locale: "bn"; | ||
}, { | ||
readonly label: "ਪੰਜਾਬੀ"; | ||
readonly locale: "pa"; | ||
}, { | ||
readonly label: "ગુજરાતી"; | ||
readonly locale: "gu-in"; | ||
}, { | ||
readonly label: "தமிழ்"; | ||
readonly locale: "ta"; | ||
}, { | ||
readonly label: "తెలుగు"; | ||
readonly locale: "te"; | ||
}, { | ||
readonly label: "ಕನ್ನಡ"; | ||
readonly locale: "kn"; | ||
}, { | ||
readonly label: "മലയാളം"; | ||
readonly locale: "ml"; | ||
}, { | ||
readonly label: "ภาษาไทย"; | ||
readonly locale: "th"; | ||
}, { | ||
readonly label: "မြန်မာစာ"; | ||
readonly locale: "my"; | ||
readonly label: "ភាសាខ្មែរ"; | ||
readonly locale: "km-kh"; | ||
}, { | ||
@@ -752,6 +785,26 @@ readonly label: "한국어"; | ||
export declare interface TLAssetContext { | ||
/** | ||
* The scale at which the asset is being rendered on-screen relative to its native dimensions. | ||
* If the asset is 1000px wide, but it's been resized/zoom so it takes 500px on-screen, this | ||
* will be 0.5. | ||
* | ||
* The scale measures CSS pixels, not device pixels. | ||
*/ | ||
screenScale: number; | ||
/** The {@link TLAssetContext.screenScale}, stepped to the nearest power-of-2 multiple. */ | ||
steppedScreenScale: number; | ||
/** The device pixel ratio - how many CSS pixels are in one device pixel? */ | ||
dpr: number; | ||
/** | ||
* An alias for | ||
* {@link https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/effectiveType | `navigator.connection.effectiveType` } | ||
* if it's available in the current browser. Use this to e.g. serve lower-resolution images to | ||
* users on slow connections. | ||
*/ | ||
networkEffectiveType: null | string; | ||
/** | ||
* In some circumstances, we need to resolve a URL that points to the original version of a | ||
* particular asset. This is used when the asset will leave the current tldraw instance - e.g. | ||
* for copy/paste, or exports. | ||
*/ | ||
shouldResolveToOriginal: boolean; | ||
@@ -800,3 +853,6 @@ } | ||
*/ | ||
upload(asset: TLAsset, file: File, abortSignal?: AbortSignal): Promise<string>; | ||
upload(asset: TLAsset, file: File, abortSignal?: AbortSignal): Promise<{ | ||
meta?: JsonObject; | ||
src: string; | ||
}>; | ||
/** | ||
@@ -803,0 +859,0 @@ * Resolve an asset to a URL. This is used when rendering the asset in the editor. By default, |
@@ -172,5 +172,5 @@ "use strict"; | ||
"@tldraw/tlschema", | ||
"3.7.2", | ||
"3.8.0-canary.0758b9af935c", | ||
"cjs" | ||
); | ||
//# sourceMappingURL=index.js.map |
@@ -26,2 +26,3 @@ "use strict"; | ||
{ locale: "id", label: "Bahasa Indonesia" }, | ||
{ locale: "ms", label: "Bahasa Melayu" }, | ||
{ locale: "ca", label: "Catal\xE0" }, | ||
@@ -33,2 +34,3 @@ { locale: "cs", label: "\u010Ce\u0161tina" }, | ||
{ locale: "es", label: "Espa\xF1ol" }, | ||
{ locale: "tl", label: "Filipino" }, | ||
{ locale: "fr", label: "Fran\xE7ais" }, | ||
@@ -39,2 +41,3 @@ { locale: "gl", label: "Galego" }, | ||
{ locale: "hu", label: "Magyar" }, | ||
{ locale: "nl", label: "Nederlands" }, | ||
{ locale: "no", label: "Norwegian" }, | ||
@@ -45,3 +48,2 @@ { locale: "pl", label: "Polski" }, | ||
{ locale: "ro", label: "Rom\xE2n\u0103" }, | ||
{ locale: "ru", label: "Russian" }, | ||
{ locale: "sl", label: "Sloven\u0161\u010Dina" }, | ||
@@ -53,12 +55,21 @@ { locale: "so", label: "Somali" }, | ||
{ locale: "tr", label: "T\xFCrk\xE7e" }, | ||
{ locale: "uk", label: "Ukrainian" }, | ||
{ locale: "el", label: "\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC" }, | ||
{ locale: "ru", label: "\u0420\u0443\u0441\u0441\u043A\u0438\u0439" }, | ||
{ locale: "uk", label: "\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430" }, | ||
{ locale: "he", label: "\u05E2\u05D1\u05E8\u05D9\u05EA" }, | ||
{ locale: "ur", label: "\u0627\u0631\u062F\u0648" }, | ||
{ locale: "ar", label: "\u0639\u0631\u0628\u064A" }, | ||
{ locale: "fa", label: "\u0641\u0627\u0631\u0633\u06CC" }, | ||
{ locale: "ku", label: "\u06A9\u0648\u0631\u062F\u06CC" }, | ||
{ locale: "ne", label: "\u0928\u0947\u092A\u093E\u0932\u0940" }, | ||
{ locale: "mr", label: "\u092E\u0930\u093E\u0920\u0940" }, | ||
{ locale: "hi-in", label: "\u0939\u093F\u0928\u094D\u0926\u0940" }, | ||
{ locale: "bn", label: "\u09AC\u09BE\u0982\u09B2\u09BE" }, | ||
{ locale: "pa", label: "\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40" }, | ||
{ locale: "gu-in", label: "\u0A97\u0AC1\u0A9C\u0AB0\u0ABE\u0AA4\u0AC0" }, | ||
{ locale: "ta", label: "\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD" }, | ||
{ locale: "te", label: "\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41" }, | ||
{ locale: "kn", label: "\u0C95\u0CA8\u0CCD\u0CA8\u0CA1" }, | ||
{ locale: "ml", label: "\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02" }, | ||
{ locale: "th", label: "\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22" }, | ||
{ locale: "my", label: "\u1019\u103C\u1014\u103A\u1019\u102C\u1005\u102C" }, | ||
{ locale: "km-kh", label: "\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A" }, | ||
{ locale: "ko-kr", label: "\uD55C\uAD6D\uC5B4" }, | ||
@@ -65,0 +76,0 @@ { locale: "ja", label: "\u65E5\u672C\u8A9E" }, |
{ | ||
"name": "@tldraw/tlschema", | ||
"description": "A tiny little drawing app (schema).", | ||
"version": "3.7.2", | ||
"version": "3.8.0-canary.0758b9af935c", | ||
"author": { | ||
@@ -56,6 +56,6 @@ "name": "tldraw Inc.", | ||
"dependencies": { | ||
"@tldraw/state": "3.7.2", | ||
"@tldraw/store": "3.7.2", | ||
"@tldraw/utils": "3.7.2", | ||
"@tldraw/validate": "3.7.2" | ||
"@tldraw/state": "3.8.0-canary.0758b9af935c", | ||
"@tldraw/store": "3.8.0-canary.0758b9af935c", | ||
"@tldraw/utils": "3.8.0-canary.0758b9af935c", | ||
"@tldraw/validate": "3.8.0-canary.0758b9af935c" | ||
}, | ||
@@ -62,0 +62,0 @@ "peerDependencies": { |
@@ -9,3 +9,3 @@ import { Signal } from '@tldraw/state' | ||
} from '@tldraw/store' | ||
import { IndexKey, annotateError, structuredClone } from '@tldraw/utils' | ||
import { IndexKey, JsonObject, annotateError, structuredClone } from '@tldraw/utils' | ||
import { TLAsset } from './records/TLAsset' | ||
@@ -52,6 +52,26 @@ import { CameraRecordType, TLCameraId } from './records/TLCamera' | ||
export interface TLAssetContext { | ||
/** | ||
* The scale at which the asset is being rendered on-screen relative to its native dimensions. | ||
* If the asset is 1000px wide, but it's been resized/zoom so it takes 500px on-screen, this | ||
* will be 0.5. | ||
* | ||
* The scale measures CSS pixels, not device pixels. | ||
*/ | ||
screenScale: number | ||
/** The {@link TLAssetContext.screenScale}, stepped to the nearest power-of-2 multiple. */ | ||
steppedScreenScale: number | ||
/** The device pixel ratio - how many CSS pixels are in one device pixel? */ | ||
dpr: number | ||
/** | ||
* An alias for | ||
* {@link https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/effectiveType | `navigator.connection.effectiveType` } | ||
* if it's available in the current browser. Use this to e.g. serve lower-resolution images to | ||
* users on slow connections. | ||
*/ | ||
networkEffectiveType: string | null | ||
/** | ||
* In some circumstances, we need to resolve a URL that points to the original version of a | ||
* particular asset. This is used when the asset will leave the current tldraw instance - e.g. | ||
* for copy/paste, or exports. | ||
*/ | ||
shouldResolveToOriginal: boolean | ||
@@ -82,3 +102,7 @@ } | ||
*/ | ||
upload(asset: TLAsset, file: File, abortSignal?: AbortSignal): Promise<string> | ||
upload( | ||
asset: TLAsset, | ||
file: File, | ||
abortSignal?: AbortSignal | ||
): Promise<{ src: string; meta?: JsonObject }> | ||
/** | ||
@@ -85,0 +109,0 @@ * Resolve an asset to a URL. This is used when rendering the asset in the editor. By default, |
@@ -7,2 +7,3 @@ // This file is automatically generated by internal/scripts/refresh-assets.ts. | ||
{ locale: 'id', label: 'Bahasa Indonesia' }, | ||
{ locale: 'ms', label: 'Bahasa Melayu' }, | ||
{ locale: 'ca', label: 'Català' }, | ||
@@ -14,2 +15,3 @@ { locale: 'cs', label: 'Čeština' }, | ||
{ locale: 'es', label: 'Español' }, | ||
{ locale: 'tl', label: 'Filipino' }, | ||
{ locale: 'fr', label: 'Français' }, | ||
@@ -20,2 +22,3 @@ { locale: 'gl', label: 'Galego' }, | ||
{ locale: 'hu', label: 'Magyar' }, | ||
{ locale: 'nl', label: 'Nederlands' }, | ||
{ locale: 'no', label: 'Norwegian' }, | ||
@@ -26,3 +29,2 @@ { locale: 'pl', label: 'Polski' }, | ||
{ locale: 'ro', label: 'Română' }, | ||
{ locale: 'ru', label: 'Russian' }, | ||
{ locale: 'sl', label: 'Slovenščina' }, | ||
@@ -34,12 +36,21 @@ { locale: 'so', label: 'Somali' }, | ||
{ locale: 'tr', label: 'Türkçe' }, | ||
{ locale: 'uk', label: 'Ukrainian' }, | ||
{ locale: 'el', label: 'Ελληνικά' }, | ||
{ locale: 'ru', label: 'Русский' }, | ||
{ locale: 'uk', label: 'Українська' }, | ||
{ locale: 'he', label: 'עברית' }, | ||
{ locale: 'ur', label: 'اردو' }, | ||
{ locale: 'ar', label: 'عربي' }, | ||
{ locale: 'fa', label: 'فارسی' }, | ||
{ locale: 'ku', label: 'کوردی' }, | ||
{ locale: 'ne', label: 'नेपाली' }, | ||
{ locale: 'mr', label: 'मराठी' }, | ||
{ locale: 'hi-in', label: 'हिन्दी' }, | ||
{ locale: 'bn', label: 'বাংলা' }, | ||
{ locale: 'pa', label: 'ਪੰਜਾਬੀ' }, | ||
{ locale: 'gu-in', label: 'ગુજરાતી' }, | ||
{ locale: 'ta', label: 'தமிழ்' }, | ||
{ locale: 'te', label: 'తెలుగు' }, | ||
{ locale: 'kn', label: 'ಕನ್ನಡ' }, | ||
{ locale: 'ml', label: 'മലയാളം' }, | ||
{ locale: 'th', label: 'ภาษาไทย' }, | ||
{ locale: 'my', label: 'မြန်မာစာ' }, | ||
{ locale: 'km-kh', label: 'ភាសាខ្មែរ' }, | ||
{ locale: 'ko-kr', label: '한국어' }, | ||
@@ -46,0 +57,0 @@ { locale: 'ja', label: '日本語' }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1120435
18140
1
+ Added@tldraw/state@3.8.0-canary.0758b9af935c(transitive)
+ Added@tldraw/store@3.8.0-canary.0758b9af935c(transitive)
+ Added@tldraw/utils@3.8.0-canary.0758b9af935c(transitive)
+ Added@tldraw/validate@3.8.0-canary.0758b9af935c(transitive)
- Removed@tldraw/state@3.7.2(transitive)
- Removed@tldraw/store@3.7.2(transitive)
- Removed@tldraw/utils@3.7.2(transitive)
- Removed@tldraw/validate@3.7.2(transitive)