refactor: moves model types to model file

This commit is contained in:
Mark Mankarious
2023-11-01 13:40:29 +00:00
parent 413567efd3
commit 3bf59ef2b9
2 changed files with 8 additions and 8 deletions

View File

@@ -1,5 +1,4 @@
import { Coords } from 'src/types';
import { StoreApi } from 'zustand';
import type { EditorModeEnum, MainMenuOptions } from './common';
import type { Model } from './model';
@@ -17,10 +16,3 @@ export interface IsoflowProps {
enableDebugTools?: boolean;
editorMode?: keyof typeof EditorModeEnum;
}
export type ModelStore = Model & {
actions: {
get: StoreApi<ModelStore>['getState'];
set: StoreApi<ModelStore>['setState'];
};
};

View File

@@ -13,6 +13,7 @@ import {
rectangleSchema,
connectorStyleOptions
} from 'src/schemas';
import { StoreApi } from 'zustand';
export { connectorStyleOptions } from 'src/schemas';
export type Model = z.infer<typeof modelSchema>;
@@ -29,3 +30,10 @@ export type ConnectorAnchor = z.infer<typeof anchorSchema>;
export type Connector = z.infer<typeof connectorSchema>;
export type TextBox = z.infer<typeof textBoxSchema>;
export type Rectangle = z.infer<typeof rectangleSchema>;
export type ModelStore = Model & {
actions: {
get: StoreApi<ModelStore>['getState'];
set: StoreApi<ModelStore>['setState'];
};
};