|
@@ -29,9 +29,9 @@ import { isOverScrollBars } from "./scene";
|
|
import { MaybeTransformHandleType } from "./element/transformHandles";
|
|
import { MaybeTransformHandleType } from "./element/transformHandles";
|
|
import Library from "./data/library";
|
|
import Library from "./data/library";
|
|
import type { FileSystemHandle } from "./data/filesystem";
|
|
import type { FileSystemHandle } from "./data/filesystem";
|
|
-import type { ALLOWED_IMAGE_MIME_TYPES, MIME_TYPES } from "./constants";
|
|
|
|
|
|
+import type { IMAGE_MIME_TYPES, MIME_TYPES } from "./constants";
|
|
import { ContextMenuItems } from "./components/ContextMenu";
|
|
import { ContextMenuItems } from "./components/ContextMenu";
|
|
-import { Merge, ForwardRef } from "./utility-types";
|
|
|
|
|
|
+import { Merge, ForwardRef, ValueOf } from "./utility-types";
|
|
import React from "react";
|
|
import React from "react";
|
|
|
|
|
|
export type Point = Readonly<RoughPoint>;
|
|
export type Point = Readonly<RoughPoint>;
|
|
@@ -60,7 +60,7 @@ export type DataURL = string & { _brand: "DataURL" };
|
|
|
|
|
|
export type BinaryFileData = {
|
|
export type BinaryFileData = {
|
|
mimeType:
|
|
mimeType:
|
|
- | typeof ALLOWED_IMAGE_MIME_TYPES[number]
|
|
|
|
|
|
+ | ValueOf<typeof IMAGE_MIME_TYPES>
|
|
// future user or unknown file type
|
|
// future user or unknown file type
|
|
| typeof MIME_TYPES.binary;
|
|
| typeof MIME_TYPES.binary;
|
|
id: FileId;
|
|
id: FileId;
|
|
@@ -419,7 +419,7 @@ export type AppClassProperties = {
|
|
FileId,
|
|
FileId,
|
|
{
|
|
{
|
|
image: HTMLImageElement | Promise<HTMLImageElement>;
|
|
image: HTMLImageElement | Promise<HTMLImageElement>;
|
|
- mimeType: typeof ALLOWED_IMAGE_MIME_TYPES[number];
|
|
|
|
|
|
+ mimeType: ValueOf<typeof IMAGE_MIME_TYPES>;
|
|
}
|
|
}
|
|
>;
|
|
>;
|
|
files: BinaryFiles;
|
|
files: BinaryFiles;
|