mirror of
https://github.com/stan-smith/FossFLOW.git
synced 2025-12-24 06:58:48 -05:00
refactor: moves model types to model file
This commit is contained in:
@@ -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'];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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'];
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user