New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tldraw/tlschema

Package Overview
Dependencies
Maintainers
4
Versions
2242
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tldraw/tlschema - npm Package Compare versions

Comparing version 3.8.0-canary.962422478a23 to 3.8.0-canary.99db1910391e

25

dist-cjs/index.d.ts

@@ -778,6 +778,26 @@ import { BaseRecord } from '@tldraw/store';

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;

@@ -826,3 +846,6 @@ }

*/
upload(asset: TLAsset, file: File, abortSignal?: AbortSignal): Promise<string>;
upload(asset: TLAsset, file: File, abortSignal?: AbortSignal): Promise<{
meta?: JsonObject;
src: string;
}>;
/**

@@ -829,0 +852,0 @@ * Resolve an asset to a URL. This is used when rendering the asset in the editor. By default,

2

dist-cjs/index.js

@@ -172,5 +172,5 @@ "use strict";

"@tldraw/tlschema",
"3.8.0-canary.962422478a23",
"3.8.0-canary.99db1910391e",
"cjs"
);
//# sourceMappingURL=index.js.map
{
"name": "@tldraw/tlschema",
"description": "A tiny little drawing app (schema).",
"version": "3.8.0-canary.962422478a23",
"version": "3.8.0-canary.99db1910391e",
"author": {

@@ -56,6 +56,6 @@ "name": "tldraw Inc.",

"dependencies": {
"@tldraw/state": "3.8.0-canary.962422478a23",
"@tldraw/store": "3.8.0-canary.962422478a23",
"@tldraw/utils": "3.8.0-canary.962422478a23",
"@tldraw/validate": "3.8.0-canary.962422478a23"
"@tldraw/state": "3.8.0-canary.99db1910391e",
"@tldraw/store": "3.8.0-canary.99db1910391e",
"@tldraw/utils": "3.8.0-canary.99db1910391e",
"@tldraw/validate": "3.8.0-canary.99db1910391e"
},

@@ -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,

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc