@myoc/excalidraw 0.19.504 → 0.19.506

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{a,b,c,d}from"./chunk-Z5NKEFVG.js";import"./chunk-KG57QRSG.js";import"./chunk-SRAX5OIU.js";export{a as Commands,b as subsetToBase64,c as subsetToBinary,d as toBase64};
1
+ import{a,b,c,d}from"./chunk-Z5NKEFVG.js";import"./chunk-74H5OWWZ.js";import"./chunk-SRAX5OIU.js";export{a as Commands,b as subsetToBase64,c as subsetToBinary,d as toBase64};
@@ -1 +1 @@
1
- import{a as r,c as t}from"./chunk-Z5NKEFVG.js";import"./chunk-KG57QRSG.js";import"./chunk-SRAX5OIU.js";var s=import.meta.url?new URL(import.meta.url):void 0;typeof window>"u"&&typeof self<"u"&&(self.onmessage=async e=>{switch(e.data.command){case r.Subset:let a=await t(e.data.arrayBuffer,e.data.codePoints);self.postMessage(a,{transfer:[a]});break}});export{s as WorkerUrl};
1
+ import{a as r,c as t}from"./chunk-Z5NKEFVG.js";import"./chunk-74H5OWWZ.js";import"./chunk-SRAX5OIU.js";var s=import.meta.url?new URL(import.meta.url):void 0;typeof window>"u"&&typeof self<"u"&&(self.onmessage=async e=>{switch(e.data.command){case r.Subset:let a=await t(e.data.arrayBuffer,e.data.codePoints);self.postMessage(a,{transfer:[a]});break}});export{s as WorkerUrl};
@@ -174,9 +174,8 @@ export declare const actionCopyStyles: {
174
174
  };
175
175
  captureUpdate: "EVENTUALLY";
176
176
  };
177
- keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
178
177
  } & {
179
- keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
178
+ keyTest?: undefined;
180
179
  };
181
180
  export declare const actionPasteStyles: {
182
181
  name: "pasteStyles";
@@ -192,7 +191,6 @@ export declare const actionPasteStyles: {
192
191
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
193
192
  captureUpdate: "IMMEDIATELY";
194
193
  };
195
- keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
196
194
  } & {
197
- keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
195
+ keyTest?: undefined;
198
196
  };
@@ -178,7 +178,6 @@ export declare const actionToggleZenMode: {
178
178
  };
179
179
  checked: (appState: Readonly<import("../types").AppState>) => boolean;
180
180
  predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
181
- keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
182
181
  } & {
183
- keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
182
+ keyTest?: undefined;
184
183
  };
@@ -382,6 +382,14 @@ declare class App extends React.Component<AppProps, AppState> {
382
382
  */
383
383
  value: number) => void;
384
384
  private cancelInProgressAnimation;
385
+ scrollToViewport: (target: {
386
+ scrollX: number;
387
+ scrollY: number;
388
+ zoom: number;
389
+ }, opts?: {
390
+ animate?: boolean;
391
+ duration?: number;
392
+ }) => void;
385
393
  scrollToContent: (
386
394
  /**
387
395
  * target to scroll to
@@ -16,6 +16,8 @@ export type StaticCanvasRenderConfig = {
16
16
  elementsPendingErasure: ElementsPendingErasure;
17
17
  pendingFlowchartNodes: PendingExcalidrawElements | null;
18
18
  theme: AppState["theme"];
19
+ gridColorBold?: string;
20
+ gridColorRegular?: string;
19
21
  };
20
22
  export type SVGRenderConfig = {
21
23
  offsetX: number;
@@ -649,6 +649,7 @@ export type AppClassProperties = {
649
649
  onInsertElements: App["onInsertElements"];
650
650
  onExportImage: App["onExportImage"];
651
651
  lastViewportPosition: App["lastViewportPosition"];
652
+ scrollToViewport: App["scrollToViewport"];
652
653
  scrollToContent: App["scrollToContent"];
653
654
  addFiles: App["addFiles"];
654
655
  addElementsFromPasteOrLibrary: App["addElementsFromPasteOrLibrary"];
@@ -761,6 +762,7 @@ export interface ExcalidrawImperativeAPI {
761
762
  getAppState: () => InstanceType<typeof App>["state"];
762
763
  getFiles: () => InstanceType<typeof App>["files"];
763
764
  getName: InstanceType<typeof App>["getName"];
765
+ scrollToViewport: InstanceType<typeof App>["scrollToViewport"];
764
766
  scrollToContent: InstanceType<typeof App>["scrollToContent"];
765
767
  registerAction: (action: Action) => void;
766
768
  refresh: InstanceType<typeof App>["refresh"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myoc/excalidraw",
3
- "version": "0.19.504",
3
+ "version": "0.19.506",
4
4
  "type": "module",
5
5
  "types": "./dist/types/excalidraw/index.d.ts",
6
6
  "main": "./dist/prod/index.js",
@@ -110,9 +110,9 @@
110
110
  "roughjs": "4.6.4",
111
111
  "sass": "1.51.0",
112
112
  "tunnel-rat": "0.1.2",
113
- "@excalidraw/common": "npm:@myoc/common@0.19.504",
114
- "@excalidraw/math": "npm:@myoc/math@0.19.504",
115
- "@excalidraw/element": "npm:@myoc/element@0.19.504"
113
+ "@excalidraw/common": "npm:@myoc/common@0.19.506",
114
+ "@excalidraw/math": "npm:@myoc/math@0.19.506",
115
+ "@excalidraw/element": "npm:@myoc/element@0.19.506"
116
116
  },
117
117
  "devDependencies": {
118
118
  "@size-limit/preset-big-lib": "9.0.0",
@@ -1 +0,0 @@
1
- import{S as a,T as b,U as c}from"../chunk-44LLHLSZ.js";import"../chunk-KG57QRSG.js";import"../chunk-SRAX5OIU.js";export{c as decodePngMetadata,b as encodePngMetadata,a as getTEXtChunk};