Skip to content

Commit

Permalink
fix: package version, format
Browse files Browse the repository at this point in the history
  • Loading branch information
dineug committed Dec 16, 2023
1 parent 876ef31 commit d2c8324
Show file tree
Hide file tree
Showing 60 changed files with 2,564 additions and 2,222 deletions.
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,23 @@
"lint": "eslint \"**/*.{js,ts}\""
},
"resolutions": {
"typescript": "5.1.6"
"typescript": "5.3.3"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.3.0",
"@typescript-eslint/parser": "^6.3.0",
"eslint": "^8.46.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-prettier": "^5.0.0",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-simple-import-sort": "^10.0.0",
"husky": "^8.0.3",
"lint-staged": "^13.2.3",
"prettier": "^2.8.8",
"tslib": "^2.6.1",
"turbo": "^1.10.12",
"typescript": "5.1.6",
"vite": "^4.4.9"
"lint-staged": "^15.2.0",
"prettier": "^3.1.1",
"tslib": "^2.6.2",
"turbo": "^1.11.2",
"typescript": "5.3.3",
"vite": "^5.0.10"
},
"lint-staged": {
"**/*.{js,ts}": [
Expand Down
18 changes: 9 additions & 9 deletions packages/erd-editor-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@
},
"devDependencies": {
"@dineug/shared": "workspace:*",
"@rollup/plugin-typescript": "^11.1.2",
"@types/lodash-es": "^4.17.8",
"@rollup/plugin-typescript": "^11.1.5",
"@types/lodash-es": "^4.17.12",
"lodash-es": "^4.17.21",
"rollup-plugin-visualizer": "^5.9.2",
"ts-patch": "^3.0.2",
"tslib": "^2.6.1",
"rollup-plugin-visualizer": "^5.11.0",
"ts-patch": "^3.1.1",
"tslib": "^2.6.2",
"typescript-transform-paths": "^3.4.6",
"typescript": "5.1.6",
"nanoid": "^5.0.3",
"vite-tsconfig-paths": "^4.2.0",
"vite": "^4.4.9"
"typescript": "5.3.3",
"nanoid": "^5.0.4",
"vite-tsconfig-paths": "^4.2.2",
"vite": "^5.0.10"
}
}
12 changes: 6 additions & 6 deletions packages/erd-editor-schema/src/internal-types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ export type DeepPartial<T> = T extends
| symbol
? T | undefined
: T extends Array<infer ArrayType>
? Array<DeepPartial<ArrayType>>
: T extends ReadonlyArray<infer ArrayType>
? ReadonlyArray<ArrayType>
: {
[K in keyof T]?: DeepPartial<T[K]>;
};
? Array<DeepPartial<ArrayType>>
: T extends ReadonlyArray<infer ArrayType>
? ReadonlyArray<ArrayType>
: {
[K in keyof T]?: DeepPartial<T[K]>;
};

export type EntityMeta = {
updateAt: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ const migrationRelationshipTypeMap: Record<string, RelationshipType> = {
N: 'OneN',
};

export const migrationRelationshipType = (relationshipType: RelationshipType) =>
export const migrationRelationshipType = (
relationshipType: RelationshipType
) =>
migrationRelationshipTypes.includes(relationshipType)
? migrationRelationshipTypeMap[relationshipType]
: relationshipType;
16 changes: 8 additions & 8 deletions packages/erd-editor-shiki-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
"build": "vite build"
},
"devDependencies": {
"@rollup/plugin-typescript": "^11.1.2",
"@rollup/plugin-typescript": "^11.1.5",
"comlink": "4.4.1",
"rollup-plugin-visualizer": "^5.9.2",
"shiki": "0.14.5",
"ts-patch": "^3.0.2",
"tslib": "^2.6.1",
"rollup-plugin-visualizer": "^5.11.0",
"shiki": "0.14.7",
"ts-patch": "^3.1.1",
"tslib": "^2.6.2",
"typescript-transform-paths": "^3.4.6",
"typescript": "5.1.6",
"vite-tsconfig-paths": "^4.2.0",
"vite": "^4.4.9"
"typescript": "5.3.3",
"vite-tsconfig-paths": "^4.2.2",
"vite": "^5.0.10"
}
}
23 changes: 11 additions & 12 deletions packages/erd-editor/.storybook/ThemeProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@ type ThemeProviderProps = {
story: any;
};

const ThemeProvider: FC<ThemeProviderProps> = props => () =>
html`
<${GlobalStyles} />
<${Theme}
.theme=${createTheme({
grayColor: props.grayColor,
accentColor: props.accentColor,
appearance: props.appearance,
})}
/>
${props.story}
`;
const ThemeProvider: FC<ThemeProviderProps> = props => () => html`
<${GlobalStyles} />
<${Theme}
.theme=${createTheme({
grayColor: props.grayColor,
accentColor: props.accentColor,
appearance: props.appearance,
})}
/>
${props.story}
`;

export default ThemeProvider;
52 changes: 26 additions & 26 deletions packages/erd-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,44 +53,44 @@
"@dineug/vite-plugin-r-html": "workspace:*",
"@easylogic/colorpicker": "1.10.11",
"@floating-ui/dom": "1.5.3",
"@fortawesome/free-regular-svg-icons": "6.4.2",
"@fortawesome/free-solid-svg-icons": "6.4.2",
"@mdi/js": "7.2.96",
"@radix-ui/colors": "2.1.0",
"@rollup/plugin-typescript": "^11.1.2",
"@storybook/addon-essentials": "^7.5.3",
"@storybook/addon-interactions": "^7.5.3",
"@storybook/addon-links": "^7.5.3",
"@storybook/blocks": "^7.5.3",
"@storybook/html-vite": "^7.5.3",
"@storybook/html": "^7.5.3",
"@fortawesome/free-regular-svg-icons": "6.5.1",
"@fortawesome/free-solid-svg-icons": "6.5.1",
"@mdi/js": "7.3.67",
"@radix-ui/colors": "3.0.0",
"@rollup/plugin-typescript": "^11.1.5",
"@storybook/addon-essentials": "^7.6.5",
"@storybook/addon-interactions": "^7.6.5",
"@storybook/addon-links": "^7.6.5",
"@storybook/blocks": "^7.6.5",
"@storybook/html-vite": "^7.6.5",
"@storybook/html": "^7.6.5",
"@storybook/testing-library": "^0.2.2",
"@types/color": "^3.0.3",
"@types/color": "^3.0.6",
"@types/d3": "7.4.3",
"@types/highlight-words-core": "^1.2.3",
"@types/lodash-es": "^4.17.8",
"@types/luxon": "^3.3.1",
"@types/ua-parser-js": "^0.7.37",
"@types/lodash-es": "^4.17.12",
"@types/luxon": "^3.3.7",
"@types/ua-parser-js": "^0.7.39",
"color": "^4.2.3",
"comlink": "4.4.1",
"d3": "7.8.5",
"deepmerge": "^4.3.1",
"framer-motion": "^10.16.5",
"framer-motion": "^10.16.16",
"highlight-words-core": "^1.2.2",
"html-to-image": "^1.11.11",
"lodash-es": "^4.17.21",
"luxon": "^3.3.0",
"nanoid": "^5.0.3",
"rollup-plugin-visualizer": "^5.9.2",
"luxon": "^3.4.4",
"nanoid": "^5.0.4",
"rollup-plugin-visualizer": "^5.11.0",
"rxjs": "^7.8.1",
"stats.js": "^0.17.0",
"storybook": "^7.5.3",
"ts-patch": "^3.0.2",
"tslib": "^2.6.1",
"storybook": "^7.6.5",
"ts-patch": "^3.1.1",
"tslib": "^2.6.2",
"typescript-transform-paths": "^3.4.6",
"typescript": "5.1.6",
"ua-parser-js": "^1.0.36",
"vite-tsconfig-paths": "^4.2.0",
"vite": "^4.4.9"
"typescript": "5.3.3",
"ua-parser-js": "^1.0.37",
"vite-tsconfig-paths": "^4.2.2",
"vite": "^5.0.10"
}
}
28 changes: 14 additions & 14 deletions packages/erd-editor/src/components/erd-editor/ErdEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,20 +184,20 @@ const ErdEditor: FC<ErdEditorProps, ErdEditorElement> = (props, ctx) => {
${settings.canvasType === CanvasType.visualization
? html`<div class=${styles.scope}><${Visualization} /></div>`
: settings.canvasType === CanvasType.schemaSQL
? html`
<div class=${styles.scope}>
<${SchemaSQL} isDarkMode=${isDarkMode} />
</div>
`
: settings.canvasType === CanvasType.generatorCode
? html`
<div class=${styles.scope}>
<${GeneratorCode} isDarkMode=${isDarkMode} />
</div>
`
: settings.canvasType === CanvasType.settings
? html`<div class=${styles.scope}><${Settings} /></div>`
: null}
? html`
<div class=${styles.scope}>
<${SchemaSQL} isDarkMode=${isDarkMode} />
</div>
`
: settings.canvasType === CanvasType.generatorCode
? html`
<div class=${styles.scope}>
<${GeneratorCode} isDarkMode=${isDarkMode} />
</div>
`
: settings.canvasType === CanvasType.settings
? html`<div class=${styles.scope}><${Settings} /></div>`
: null}
<${ToastContainer} />
${text.span}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,14 @@ const AutomaticTablePlacement: FC<AutomaticTablePlacementProps> = (
handleClose();
}

return () =>
html`
<div class=${styles.root}>
<div class=${styles.container}>
<${Canvas} root=${props.root} canvas=${canvas} />
<${Minimap} />
</div>
return () => html`
<div class=${styles.root}>
<div class=${styles.container}>
<${Canvas} root=${props.root} canvas=${canvas} />
<${Minimap} />
</div>
`;
</div>
`;
};

export default AutomaticTablePlacement;
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,14 @@ const MemoSash: FC<MemoSashProps> = (props, ctx) => {

return () =>
html`${createSash(props.top, props.left).map(
sashProps =>
html`
<${Sash}
...${sashProps}
.onMousedown=${(event: MouseEvent) => {
handleMousedown(event, sashProps.position);
}}
/>
`
sashProps => html`
<${Sash}
...${sashProps}
.onMousedown=${(event: MouseEvent) => {
handleMousedown(event, sashProps.position);
}}
/>
`
)}`;
};

Expand Down
51 changes: 25 additions & 26 deletions packages/erd-editor/src/components/erd/canvas/table/Table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,32 +203,31 @@ const Table: FC<TableProps> = (props, ctx) => {
${repeat(
columns,
column => column.id,
column =>
html`
<${Column}
app=${app}
column=${column}
selected=${hasSelectColumn(column.id)}
widthName=${tableWidths.name}
widthDataType=${tableWidths.dataType}
widthDefault=${tableWidths.default}
widthComment=${tableWidths.comment}
focusName=${hasFocus(FocusType.columnName, column.id)}
focusDataType=${hasFocus(FocusType.columnDataType, column.id)}
focusNotNull=${hasFocus(FocusType.columnNotNull, column.id)}
focusDefault=${hasFocus(FocusType.columnDefault, column.id)}
focusComment=${hasFocus(FocusType.columnComment, column.id)}
focusUnique=${hasFocus(FocusType.columnUnique, column.id)}
focusAutoIncrement=${hasFocus(
FocusType.columnAutoIncrement,
column.id
)}
editName=${hasEdit(FocusType.columnName, column.id)}
editDataType=${hasEdit(FocusType.columnDataType, column.id)}
editDefault=${hasEdit(FocusType.columnDefault, column.id)}
editComment=${hasEdit(FocusType.columnComment, column.id)}
/>
`
column => html`
<${Column}
app=${app}
column=${column}
selected=${hasSelectColumn(column.id)}
widthName=${tableWidths.name}
widthDataType=${tableWidths.dataType}
widthDefault=${tableWidths.default}
widthComment=${tableWidths.comment}
focusName=${hasFocus(FocusType.columnName, column.id)}
focusDataType=${hasFocus(FocusType.columnDataType, column.id)}
focusNotNull=${hasFocus(FocusType.columnNotNull, column.id)}
focusDefault=${hasFocus(FocusType.columnDefault, column.id)}
focusComment=${hasFocus(FocusType.columnComment, column.id)}
focusUnique=${hasFocus(FocusType.columnUnique, column.id)}
focusAutoIncrement=${hasFocus(
FocusType.columnAutoIncrement,
column.id
)}
editName=${hasEdit(FocusType.columnName, column.id)}
editDataType=${hasEdit(FocusType.columnDataType, column.id)}
editDefault=${hasEdit(FocusType.columnDefault, column.id)}
editComment=${hasEdit(FocusType.columnComment, column.id)}
/>
`
)}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,22 +214,21 @@ const ColumnDataType: FC<ColumnDataTypeProps> = (props, ctx) => {
${repeat(
state.hints,
hint => hint.name,
(hint, index) =>
html`
<div
class=${[
styles.hintItem,
{ selected: index === state.index },
]}
@click=${() => handleSelectHint(index)}
>
<${HighlightedText}
searchWords=${[props.value]}
textToHighlight=${hint.name}
/>
<${Kbd} mini=${true} shortcut="Tab" />
</div>
`
(hint, index) => html`
<div
class=${[
styles.hintItem,
{ selected: index === state.index },
]}
@click=${() => handleSelectHint(index)}
>
<${HighlightedText}
searchWords=${[props.value]}
textToHighlight=${hint.name}
/>
<${Kbd} mini=${true} shortcut="Tab" />
</div>
`
)}
</div>
`
Expand Down
Loading

0 comments on commit d2c8324

Please sign in to comment.