From 8a9d90c746f5b0346b0f5bf62c488d298c93240a Mon Sep 17 00:00:00 2001 From: Steve Ruiz Date: Thu, 25 Apr 2024 15:33:51 +0100 Subject: [PATCH] ok --- packages/editor/src/lib/editor/Editor.ts | 1 - packages/tldraw/api/api.json | 504 +++++++++++++++++++- packages/tlschema/src/records/TLInstance.ts | 1 - 3 files changed, 501 insertions(+), 5 deletions(-) diff --git a/packages/editor/src/lib/editor/Editor.ts b/packages/editor/src/lib/editor/Editor.ts index 6510507cb..d83d667c8 100644 --- a/packages/editor/src/lib/editor/Editor.ts +++ b/packages/editor/src/lib/editor/Editor.ts @@ -61,7 +61,6 @@ import { import { EventEmitter } from 'eventemitter3' import { flushSync } from 'react-dom' import { createRoot } from 'react-dom/client' -import { TLResizeShapeOptions } from '../..' import { TLUser, createTLUser } from '../config/createTLUser' import { checkShapesAndAddCore } from '../config/defaultShapes' import { diff --git a/packages/tldraw/api/api.json b/packages/tldraw/api/api.json index 534b8df4b..80cf4a08c 100644 --- a/packages/tldraw/api/api.json +++ b/packages/tldraw/api/api.json @@ -3358,6 +3358,30 @@ "parameters": [], "name": "DefaultDebugMenuContent" }, + { + "kind": "Variable", + "canonicalReference": "tldraw!defaultEditorAssetUrls:var", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultEditorAssetUrls: " + }, + { + "kind": "Reference", + "text": "TLEditorAssetUrls", + "canonicalReference": "tldraw!~TLEditorAssetUrls:type" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/static-assets/assetUrls.ts", + "isReadonly": false, + "releaseTag": "Public", + "name": "defaultEditorAssetUrls", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, { "kind": "Function", "canonicalReference": "tldraw!DefaultHelperButtons:function(1)", @@ -6450,7 +6474,7 @@ { "kind": "Reference", "text": "TLExportType", - "canonicalReference": "tldraw!~TLExportType:type" + "canonicalReference": "tldraw!TLExportType:type" }, { "kind": "Content", @@ -9202,6 +9226,97 @@ ], "name": "getOccludedChildren" }, + { + "kind": "Function", + "canonicalReference": "tldraw!getPerfectDashProps:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function getPerfectDashProps(totalLength: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", strokeWidth: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", opts?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<{\n closed: boolean;\n end: 'none' | 'outset' | 'skip';\n lengthRatio: number;\n snap: number;\n start: 'none' | 'outset' | 'skip';\n style: " + }, + { + "kind": "Reference", + "text": "TLDefaultDashStyle", + "canonicalReference": "@tldraw/tlschema!TLDefaultDashStyle:type" + }, + { + "kind": "Content", + "text": ";\n}>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "{\n strokeDasharray: string;\n strokeDashoffset: string;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/shared/getPerfectDashProps.ts", + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "totalLength", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "strokeWidth", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "opts", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "isOptional": true + } + ], + "name": "getPerfectDashProps" + }, { "kind": "Function", "canonicalReference": "tldraw!getSvgAsImage:function(1)", @@ -13950,6 +14065,191 @@ "parameters": [], "name": "PasteMenuItem" }, + { + "kind": "Enum", + "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT:enum", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare enum PORTRAIT_BREAKPOINT " + } + ], + "fileUrlPath": "packages/tldraw/src/lib/ui/constants.ts", + "releaseTag": "Public", + "name": "PORTRAIT_BREAKPOINT", + "preserveMemberOrder": false, + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.DESKTOP:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "DESKTOP = " + }, + { + "kind": "Content", + "text": "7" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "DESKTOP" + }, + { + "kind": "EnumMember", + "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.MOBILE:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "MOBILE = " + }, + { + "kind": "Content", + "text": "4" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "MOBILE" + }, + { + "kind": "EnumMember", + "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.MOBILE_SM:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "MOBILE_SM = " + }, + { + "kind": "Content", + "text": "3" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "MOBILE_SM" + }, + { + "kind": "EnumMember", + "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.MOBILE_XS:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "MOBILE_XS = " + }, + { + "kind": "Content", + "text": "2" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "MOBILE_XS" + }, + { + "kind": "EnumMember", + "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.MOBILE_XXS:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "MOBILE_XXS = " + }, + { + "kind": "Content", + "text": "1" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "MOBILE_XXS" + }, + { + "kind": "EnumMember", + "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.TABLET:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "TABLET = " + }, + { + "kind": "Content", + "text": "6" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "TABLET" + }, + { + "kind": "EnumMember", + "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.TABLET_SM:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "TABLET_SM = " + }, + { + "kind": "Content", + "text": "5" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "TABLET_SM" + }, + { + "kind": "EnumMember", + "canonicalReference": "tldraw!PORTRAIT_BREAKPOINT.ZERO:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "ZERO = " + }, + { + "kind": "Content", + "text": "0" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "ZERO" + } + ] + }, { "kind": "Function", "canonicalReference": "tldraw!PreferencesGroup:function(1)", @@ -19960,6 +20260,32 @@ "endIndex": 7 } }, + { + "kind": "TypeAlias", + "canonicalReference": "tldraw!TLExportType:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TLExportType = " + }, + { + "kind": "Content", + "text": "'jpeg' | 'json' | 'png' | 'svg' | 'webp'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/utils/export/exportAs.ts", + "releaseTag": "Public", + "name": "TLExportType", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, { "kind": "Interface", "canonicalReference": "tldraw!TLUiActionItem:interface", @@ -20531,7 +20857,7 @@ }, { "kind": "Content", - "text": ", value: T, squashing: boolean) => void" + "text": ", value: T) => void" }, { "kind": "Content", @@ -24472,6 +24798,33 @@ "endIndex": 2 } }, + { + "kind": "PropertySignature", + "canonicalReference": "tldraw!TLUiInputProps#onFocus:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onFocus?: " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "onFocus", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, { "kind": "PropertySignature", "canonicalReference": "tldraw!TLUiInputProps#onValueChange:member", @@ -27339,6 +27692,151 @@ "parameters": [], "name": "useCurrentTranslation" }, + { + "kind": "Function", + "canonicalReference": "tldraw!useDefaultColorTheme:function(1)", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function useDefaultColorTheme(): " + }, + { + "kind": "Content", + "text": "{\n \"light-blue\": import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n \"light-green\": import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n \"light-red\": import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n \"light-violet\": import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n background: string;\n black: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n blue: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n green: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n grey: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n id: \"dark\" | \"light\";\n orange: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n red: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n solid: string;\n text: string;\n violet: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n white: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n yellow: import(\"@tldraw/editor\")." + }, + { + "kind": "Reference", + "text": "TLDefaultColorThemeColor", + "canonicalReference": "@tldraw/tlschema!TLDefaultColorThemeColor:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "packages/tldraw/src/lib/shapes/shared/ShapeFill.tsx", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 28 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "useDefaultColorTheme" + }, { "kind": "Function", "canonicalReference": "tldraw!useDefaultHelpers:function(1)", @@ -27625,7 +28123,7 @@ { "kind": "Reference", "text": "TLExportType", - "canonicalReference": "tldraw!~TLExportType:type" + "canonicalReference": "tldraw!TLExportType:type" }, { "kind": "Content", diff --git a/packages/tlschema/src/records/TLInstance.ts b/packages/tlschema/src/records/TLInstance.ts index 667b12a76..243e8bacb 100644 --- a/packages/tlschema/src/records/TLInstance.ts +++ b/packages/tlschema/src/records/TLInstance.ts @@ -148,7 +148,6 @@ export function createInstanceRecordType(stylesById: Map