Skip to content

Commit

Permalink
fix: refactoring folder
Browse files Browse the repository at this point in the history
  • Loading branch information
dineug committed Dec 2, 2023
1 parent e03ac56 commit bc2fe19
Show file tree
Hide file tree
Showing 45 changed files with 63 additions and 47 deletions.
4 changes: 2 additions & 2 deletions erd-editor.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"path": "packages/erd-editor-schema"
},
{
"name": "shiki-worker",
"path": "packages/shiki-worker"
"name": "erd-editor-shiki-worker",
"path": "packages/erd-editor-shiki-worker"
},
{
"name": "shared",
Expand Down
10 changes: 9 additions & 1 deletion packages/erd-editor-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@dineug/erd-editor-schema",
"version": "0.1.0",
"private": true,
"description": "ERD editor schema",
"description": "Entity-Relationship Diagram Editor Schema",
"type": "module",
"main": "./dist/erd-editor-schema.umd.cjs",
"module": "./dist/erd-editor-schema.js",
Expand All @@ -20,6 +20,14 @@
"dist/*.js",
"dist/**/*.ts"
],
"repository": {
"type": "git",
"url": "https://github.com/dineug/erd-editor.git"
},
"bugs": {
"url": "https://github.com/dineug/erd-editor/issues"
},
"homepage": "https://github.com/dineug/erd-editor#readme",
"author": "SeungHwan-Lee <[email protected]>",
"license": "MIT",
"scripts": {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
{
"name": "@dineug/shiki-worker",
"name": "@dineug/erd-editor-shiki-worker",
"version": "0.1.0",
"private": true,
"description": "shiki-worker",
"description": "Entity-Relationship Diagram Editor shiki-worker",
"type": "module",
"main": "./dist/shiki-worker.umd.cjs",
"module": "./dist/shiki-worker.js",
"main": "./dist/erd-editor-shiki-worker.umd.cjs",
"module": "./dist/erd-editor-shiki-worker.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/shiki-worker.js"
"default": "./dist/erd-editor-shiki-worker.js"
},
"require": "./dist/shiki-worker.umd.cjs"
"require": "./dist/erd-editor-shiki-worker.umd.cjs"
}
},
"files": [
"dist/*.js",
"dist/**/*.ts"
],
"repository": {
"type": "git",
"url": "https://github.com/dineug/erd-editor.git"
},
"bugs": {
"url": "https://github.com/dineug/erd-editor/issues"
},
"homepage": "https://github.com/dineug/erd-editor#readme",
"author": "SeungHwan-Lee <[email protected]>",
"license": "MIT",
"scripts": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default defineConfig({
lib: {
entry: './src/index.ts',
name: pkg.name,
fileName: 'shiki-worker',
fileName: 'erd-editor-shiki-worker',
formats: ['es', 'umd'],
},
rollupOptions: {
Expand Down
4 changes: 2 additions & 2 deletions packages/erd-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@dineug/erd-editor",
"version": "3.0.0",
"private": true,
"description": "ERD editor",
"description": "Entity-Relationship Diagram Editor",
"type": "module",
"main": "./dist/erd-editor.umd.cjs",
"module": "./dist/erd-editor.js",
Expand Down Expand Up @@ -46,10 +46,10 @@
},
"devDependencies": {
"@dineug/erd-editor-schema": "workspace:*",
"@dineug/erd-editor-shiki-worker": "workspace:*",
"@dineug/go": "^0.1.7",
"@dineug/r-html": "workspace:*",
"@dineug/shared": "workspace:*",
"@dineug/shiki-worker": "workspace:*",
"@dineug/vite-plugin-r-html": "workspace:*",
"@easylogic/colorpicker": "1.10.11",
"@floating-ui/dom": "1.5.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from '@/themes/radix-ui-theme';
import { Theme, ThemeTokens } from '@/themes/tokens';
import { KeyBindingName, KeyBindingNameList } from '@/utils/keyboard-shortcut';
import { createSchemaSQL } from '@/utils/schemaSQL';
import { createSchemaSQL } from '@/utils/schema-sql';
import { hasDatabaseVendor, toSafeString } from '@/utils/validation';

import { ErdEditorElement, ErdEditorProps } from './ErdEditor';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
changeTableNameAction,
} from '@/engine/modules/table/atom.actions';
import { removeTableAction$ } from '@/engine/modules/table/generator.actions';
import { addColumnAction$ } from '@/engine/modules/tableColumn/generator.actions';
import { addColumnAction$ } from '@/engine/modules/table-column/generator.actions';
import { Table } from '@/internal-types';
import { bHas } from '@/utils/bit';
import { calcTableHeight, calcTableWidths } from '@/utils/calcTable';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
isToggleColumnTypes,
removeColumnAction$,
toggleColumnValueAction$,
} from '@/engine/modules/tableColumn/generator.actions';
} from '@/engine/modules/table-column/generator.actions';
import { Column } from '@/internal-types';
import { bHas } from '@/utils/bit';
import { isMod, simpleShortcutToString } from '@/utils/keyboard-shortcut';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import EditInput from '@/components/primitives/edit-input/EditInput';
import HighlightedText from '@/components/primitives/highlighted-text/HighlightedText';
import Kbd from '@/components/primitives/kbd/Kbd';
import { DatabaseHintMap, DataTypeHint } from '@/constants/sql/dataType';
import { changeColumnDataTypeAction$ } from '@/engine/modules/tableColumn/generator.actions';
import { changeColumnDataTypeAction$ } from '@/engine/modules/table-column/generator.actions';
import { useUnmounted } from '@/hooks/useUnmounted';
import { lastCursorFocus } from '@/utils/focus';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { startAutomaticTablePlacementAction } from '@/engine/modules/editor/atom
import { addMemoAction$ } from '@/engine/modules/memo/generator.actions';
import { removeRelationshipAction } from '@/engine/modules/relationship/atom.actions';
import { addTableAction$ } from '@/engine/modules/table/generator.actions';
import { changeColumnPrimaryKeyAction$ } from '@/engine/modules/tableColumn/generator.actions';
import { changeColumnPrimaryKeyAction$ } from '@/engine/modules/table-column/generator.actions';
import { ValuesType } from '@/internal-types';
import { query } from '@/utils/collection/query';
import { openColorPickerAction } from '@/utils/emitter';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
exportPNG,
exportSchemaSQL,
} from '@/utils/file/exportFile';
import { createSchemaSQL } from '@/utils/schemaSQL';
import { createSchemaSQL } from '@/utils/schema-sql';

export function createExportMenus(
app: AppContext,
Expand Down
2 changes: 1 addition & 1 deletion packages/erd-editor/src/components/erd/useErdShortcut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
isToggleColumnTypes,
removeColumnAction$,
toggleColumnValueAction$,
} from '@/engine/modules/tableColumn/generator.actions';
} from '@/engine/modules/table-column/generator.actions';
import { useUnmounted } from '@/hooks/useUnmounted';
import { Ctx } from '@/internal-types';
import { focusEvent, forceFocusEvent } from '@/utils/internalEvents';
Expand Down
2 changes: 1 addition & 1 deletion packages/erd-editor/src/components/schema-sql/SchemaSQL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import SchemaSQLContextMenu from '@/components/schema-sql/schema-sql-context-men
import { useUnmounted } from '@/hooks/useUnmounted';
import { copyToClipboard } from '@/utils/clipboard';
import { openToastAction } from '@/utils/emitter';
import { createSchemaSQL } from '@/utils/schemaSQL';
import { createSchemaSQL } from '@/utils/schema-sql';

import * as styles from './SchemaSQL.styles';

Expand Down
10 changes: 5 additions & 5 deletions packages/erd-editor/src/engine/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { actions as editorActions } from '@/engine/modules/editor/atom.actions';
import { actions$ as editorActions$ } from '@/engine/modules/editor/generator.actions';
import { actions as indexActions } from '@/engine/modules/index/atom.actions';
import { actions$ as indexActions$ } from '@/engine/modules/index/generator.actions';
import { actions as indexColumnActions } from '@/engine/modules/indexColumn/atom.actions';
import { actions$ as indexColumnActions$ } from '@/engine/modules/indexColumn/generator.actions';
import { actions as indexColumnActions } from '@/engine/modules/index-column/atom.actions';
import { actions$ as indexColumnActions$ } from '@/engine/modules/index-column/generator.actions';
import { ActionMap as MemoActionMap } from '@/engine/modules/memo/actions';
import { actions as memoActions } from '@/engine/modules/memo/atom.actions';
import { actions$ as memoActions$ } from '@/engine/modules/memo/generator.actions';
Expand All @@ -21,9 +21,9 @@ import { actions$ as settingsActions$ } from '@/engine/modules/settings/generato
import { ActionMap as TableActionMap } from '@/engine/modules/table/actions';
import { actions as tableActions } from '@/engine/modules/table/atom.actions';
import { actions$ as tableActions$ } from '@/engine/modules/table/generator.actions';
import { ActionMap as TableColumnActionMap } from '@/engine/modules/tableColumn/actions';
import { actions as tableColumnActions } from '@/engine/modules/tableColumn/atom.actions';
import { actions$ as tableColumnActions$ } from '@/engine/modules/tableColumn/generator.actions';
import { ActionMap as TableColumnActionMap } from '@/engine/modules/table-column/actions';
import { actions as tableColumnActions } from '@/engine/modules/table-column/atom.actions';
import { actions$ as tableColumnActions$ } from '@/engine/modules/table-column/generator.actions';

export type Actions = typeof editorActions &
typeof editorActions$ &
Expand Down
2 changes: 1 addition & 1 deletion packages/erd-editor/src/engine/history.actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
tablePushStreamHistoryMap,
tablePushUndoHistoryMap,
} from '@/engine/modules/table/history';
import { tableColumnPushUndoHistoryMap } from '@/engine/modules/tableColumn/history';
import { tableColumnPushUndoHistoryMap } from '@/engine/modules/table-column/history';
import { RootState } from '@/engine/state';
import { Store } from '@/engine/store';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import { removeTableAction$ } from '@/engine/modules/table/generator.actions';
import {
addColumnAction,
changeColumnPrimaryKeyAction,
} from '@/engine/modules/tableColumn/atom.actions';
import { addColumnAction$ } from '@/engine/modules/tableColumn/generator.actions';
} from '@/engine/modules/table-column/atom.actions';
import { addColumnAction$ } from '@/engine/modules/table-column/generator.actions';
import { Point } from '@/internal-types';
import { bHas } from '@/utils/bit';
import { calcMemoHeight, calcMemoWidth } from '@/utils/calcMemo';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
changeColumnNotNullAction,
changeColumnPrimaryKeyAction,
removeColumnAction,
} from '@/engine/modules/tableColumn/atom.actions';
} from '@/engine/modules/table-column/atom.actions';
import { bHas } from '@/utils/bit';
import { query } from '@/utils/collection/query';
import { relationshipSort } from '@/utils/draw-relationship/sort';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
addRelationshipAction,
removeRelationshipAction,
} from '@/engine/modules/relationship/atom.actions';
import { changeColumnPrimaryKeyAction } from '@/engine/modules/tableColumn/atom.actions';
import { changeColumnPrimaryKeyAction } from '@/engine/modules/table-column/atom.actions';
import { bHas } from '@/utils/bit';
import { query } from '@/utils/collection/query';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChangeColumnValuePayload } from '@/engine/modules/tableColumn/actions';
import { ChangeColumnValuePayload } from '@/engine/modules/table-column/actions';
import { RootState } from '@/engine/state';
import { query } from '@/utils/collection/query';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
changeColumnDefaultAction,
changeColumnNameAction,
changeColumnNotNullAction,
} from '@/engine/modules/tableColumn/atom.actions';
} from '@/engine/modules/table-column/atom.actions';
import { nextPoint, nextZIndex } from '@/utils';
import { bHas } from '@/utils/bit';
import { query } from '@/utils/collection/query';
Expand Down
2 changes: 1 addition & 1 deletion packages/erd-editor/src/engine/store.hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { arrayHas } from '@dineug/shared';

import { hooks as relationshipHooks } from '@/engine/modules/relationship/hooks';
import { hooks as tableHooks } from '@/engine/modules/table/hooks';
import { hooks as tableColumnHooks } from '@/engine/modules/tableColumn/hooks';
import { hooks as tableColumnHooks } from '@/engine/modules/table-column/hooks';
import type { Store } from '@/engine/store';

type Task = {
Expand Down
2 changes: 1 addition & 1 deletion packages/erd-editor/src/engine/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { memoReducers } from '@/engine/modules/memo/atom.actions';
import { relationshipReducers } from '@/engine/modules/relationship/atom.actions';
import { settingsReducers } from '@/engine/modules/settings/atom.actions';
import { tableReducers } from '@/engine/modules/table/atom.actions';
import { tableColumnReducers } from '@/engine/modules/tableColumn/atom.actions';
import { tableColumnReducers } from '@/engine/modules/table-column/atom.actions';
import { RootState } from '@/engine/state';

export type Store = StoreType<RootState, EngineContext>;
Expand Down
2 changes: 1 addition & 1 deletion packages/erd-editor/src/index.dev.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ShikiService } from '@dineug/erd-editor-shiki-worker';
import { cssUnwrap, hmr } from '@dineug/r-html';
import { ShikiService } from '@dineug/shiki-worker';
// @ts-ignore
import Stats from 'stats.js';

Expand Down
Empty file.
24 changes: 12 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bc2fe19

Please sign in to comment.