캐드 지원 추가
This commit is contained in:
1 parent
c1ceec3fb1
commit
e18eab7a64
27 files changed
+2787
-89
No files matched your search
@@ -6,6 +6,7 @@ export const APP_NAME = "sejong-office";
|
||||
export const APP_DISPLAY_NAME = "Sejong Office";
|
||||
|
||||
export type DiagramKind = "excalidraw" | "mermaid" | "drawio";
|
||||
export type ViewerKind = "cad" | "model3d";
|
||||
|
||||
const DIAGRAM_EXTENSION_KIND: Record<string, DiagramKind> = {
|
||||
excalidraw: "excalidraw",
|
||||
@@ -15,6 +16,17 @@ const DIAGRAM_EXTENSION_KIND: Record<string, DiagramKind> = {
|
||||
xml: "drawio",
|
||||
};
|
||||
|
||||
const VIEWER_EXTENSION_KIND: Record<string, ViewerKind> = {
|
||||
dxf: "cad",
|
||||
dwg: "cad",
|
||||
glb: "model3d",
|
||||
gltf: "model3d",
|
||||
obj: "model3d",
|
||||
step: "model3d",
|
||||
stp: "model3d",
|
||||
ifc: "model3d",
|
||||
};
|
||||
|
||||
/** HWP/HWPX — client-side rhwp */
|
||||
export const HWP_EXTENSIONS = new Set(["hwp", "hwpx"]);
|
||||
|
||||
@@ -55,3 +67,7 @@ export function isOffice(filename: string): boolean {
|
||||
export function diagramKindFor(filename: string): DiagramKind | null {
|
||||
return DIAGRAM_EXTENSION_KIND[extensionOf(filename)] ?? null;
|
||||
}
|
||||
|
||||
export function viewerKindFor(filename: string): ViewerKind | null {
|
||||
return VIEWER_EXTENSION_KIND[extensionOf(filename)] ?? null;
|
||||
}
|
||||
Reference in new issue
Block a user