mirror of
https://github.com/stan-smith/FossFLOW.git
synced 2025-12-25 23:49:10 -05:00
refactor: simplifies library exports and includes reducers as exports
This commit is contained in:
@@ -2,19 +2,8 @@ import React, { useEffect } from 'react';
|
||||
import { ThemeProvider } from '@mui/material/styles';
|
||||
import { Box } from '@mui/material';
|
||||
import { theme } from 'src/styles/theme';
|
||||
import {
|
||||
Model,
|
||||
ModelItem,
|
||||
Icon,
|
||||
Connector,
|
||||
Rectangle,
|
||||
IsoflowProps,
|
||||
InitialData,
|
||||
Colors,
|
||||
Icons
|
||||
} from 'src/types';
|
||||
import { IsoflowProps } from 'src/types';
|
||||
import { setWindowCursor, modelFromModelStore } from 'src/utils';
|
||||
import { modelSchema } from 'src/schemas/model';
|
||||
import { useModelStore, ModelProvider } from 'src/stores/modelStore';
|
||||
import { SceneProvider } from 'src/stores/sceneStore';
|
||||
import { GlobalStyles } from 'src/styles/GlobalStyles';
|
||||
@@ -123,21 +112,6 @@ const useIsoflow = () => {
|
||||
};
|
||||
};
|
||||
|
||||
export {
|
||||
useIsoflow,
|
||||
IsoflowProps,
|
||||
InitialData,
|
||||
Model,
|
||||
Icon,
|
||||
ModelItem,
|
||||
Rectangle,
|
||||
Colors,
|
||||
Icons,
|
||||
Connector,
|
||||
modelSchema
|
||||
};
|
||||
|
||||
export const version = PACKAGE_VERSION;
|
||||
export const initialData = INITIAL_DATA;
|
||||
|
||||
export { useIsoflow };
|
||||
export * from 'src/standaloneExports';
|
||||
export default Isoflow;
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
// This file will be exported as it's own bundle (separate to the main bundle). This is because the main
|
||||
// bundle requires `window` to be present and so can't be imported into a Node environment.
|
||||
export * as reducers from 'src/stores/reducers';
|
||||
export { INITIAL_DATA } from 'src/config';
|
||||
export { modelSchema } from 'src/schemas/model';
|
||||
export const version = PACKAGE_VERSION;
|
||||
export type {
|
||||
IsoflowProps,
|
||||
InitialData,
|
||||
Model,
|
||||
View,
|
||||
Views,
|
||||
ModelItems,
|
||||
ViewItem,
|
||||
Icon,
|
||||
ModelItem,
|
||||
Rectangle,
|
||||
Colors,
|
||||
Icons,
|
||||
Connector
|
||||
} from 'src/types';
|
||||
@@ -7,7 +7,7 @@ module.exports = {
|
||||
target: 'web',
|
||||
entry: {
|
||||
'index': './src/Isoflow.tsx',
|
||||
'/nodeExports': './src/nodeExports.ts',
|
||||
'/standaloneExports': './src/standaloneExports.ts',
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, '../dist'),
|
||||
|
||||
Reference in New Issue
Block a user