diff --git a/.vscode/settings.json b/.vscode/settings.json index a565aa8dc..784f0f182 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,6 @@ { - "eslint.packageManager": "pnpm" -} \ No newline at end of file + "eslint.packageManager": "pnpm", + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true, + "editor.formatOnSaveMode": "file" +} diff --git a/packages/app/package.json b/packages/app/package.json index 55f231b96..71a8eba7c 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -9,8 +9,8 @@ "lint": "next lint" }, "dependencies": { - "@blocksuite/blocks": "^0.2.22", - "@blocksuite/editor": "^0.2.22", + "@blocksuite/blocks": "^0.2.24", + "@blocksuite/editor": "^0.2.24", "@emotion/css": "^11.10.0", "@emotion/react": "^11.10.4", "@emotion/server": "^11.10.0", diff --git a/packages/app/src/styles/theme.ts b/packages/app/src/styles/theme.ts index 0ce8d0276..e54ba4a4f 100644 --- a/packages/app/src/styles/theme.ts +++ b/packages/app/src/styles/theme.ts @@ -17,7 +17,7 @@ export const getLightTheme = ( pageBackground: '#fff', hoverBackground: '#F1F3FF', popoverBackground: '#fff', - toolTipBackground: '#6880FF', + tooltipBackground: '#6880FF', codeBackground: '#f2f5f9', warningBackground: '#FFF9C7', @@ -28,6 +28,7 @@ export const getLightTheme = ( linkColor2: '#6880FF', linkVisitedColor: '#ABB8FE', popoverColor: '#4C6275', + tooltipColor: '#fff', codeColor: '#517ea6', quoteColor: '#4C6275', placeHolderColor: '#C7C7C7', @@ -78,11 +79,11 @@ export const getDarkTheme = ( pageBackground: '#2c2c2c', hoverBackground: '#3C3C42', popoverBackground: '#1F2021', + tooltipBackground: '#1F2021', codeBackground: editorMode === 'edgeless' ? lightTheme.colors.codeBackground : '#505662', - toolTipBackground: '#1F2021', warningBackground: '#FFF9C7', textColor: '#fff', @@ -92,6 +93,7 @@ export const getDarkTheme = ( linkColor2: '#6880FF', linkVisitedColor: '#505FAB', popoverColor: '#C6CBD9', + tooltipColor: '#fff', codeColor: editorMode === 'edgeless' ? lightTheme.colors.codeColor : '#BDDBFD', quoteColor: '#C6CBD9', @@ -125,7 +127,7 @@ export const globalThemeVariables: ( '--affine-popover-background': theme.colors.popoverBackground, '--affine-hover-background': theme.colors.hoverBackground, '--affine-code-background': theme.colors.codeBackground, - '--affine-tooltip-background': theme.colors.toolTipBackground, + '--affine-tooltip-background': theme.colors.tooltipBackground, '--affine-text-color': theme.colors.textColor, '--affine-edgeless-text-color': theme.colors.edgelessTextColor, @@ -141,6 +143,7 @@ export const globalThemeVariables: ( '--affine-placeholder-color': theme.colors.placeHolderColor, '--affine-border-color': theme.colors.borderColor, '--affine-disable-color': theme.colors.disableColor, + '--affine-tooltip-color': theme.colors.tooltipColor, '--affine-modal-shadow': theme.shadow.modal, '--affine-popover-shadow': theme.shadow.popover, diff --git a/packages/app/src/styles/types.ts b/packages/app/src/styles/types.ts index dc1459911..155842eeb 100644 --- a/packages/app/src/styles/types.ts +++ b/packages/app/src/styles/types.ts @@ -21,9 +21,9 @@ export interface AffineTheme { pageBackground: string; popoverBackground: string; + tooltipBackground: string; hoverBackground: string; codeBackground: string; - toolTipBackground: string; warningBackground: string; // Use for the page`s text textColor: string; @@ -35,6 +35,7 @@ export interface AffineTheme { linkVisitedColor: string; iconColor: string; popoverColor: string; + tooltipColor: string; codeColor: string; quoteColor: string; placeHolderColor: string; @@ -79,7 +80,7 @@ export interface AffineThemeCSSVariables { '--affine-popover-background': AffineTheme['colors']['popoverBackground']; '--affine-hover-background': AffineTheme['colors']['hoverBackground']; '--affine-code-background': AffineTheme['colors']['codeBackground']; - '--affine-tooltip-background': AffineTheme['colors']['toolTipBackground']; + '--affine-tooltip-background': AffineTheme['colors']['tooltipBackground']; '--affine-text-color': AffineTheme['colors']['textColor']; '--affine-edgeless-text-color': AffineTheme['colors']['edgelessTextColor']; @@ -95,6 +96,7 @@ export interface AffineThemeCSSVariables { '--affine-selected-color': AffineTheme['colors']['selectedColor']; '--affine-border-color': AffineTheme['colors']['borderColor']; '--affine-disable-color': AffineTheme['colors']['disableColor']; + '--affine-tooltip-color': AffineTheme['colors']['tooltipColor']; '--affine-modal-shadow': AffineTheme['shadow']['modal']; '--affine-popover-shadow': AffineTheme['shadow']['popover']; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0254375ce..e18ff4a86 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: packages/app: specifiers: - '@blocksuite/blocks': ^0.2.22 - '@blocksuite/editor': ^0.2.22 + '@blocksuite/blocks': ^0.2.24 + '@blocksuite/editor': ^0.2.24 '@emotion/css': ^11.10.0 '@emotion/react': ^11.10.4 '@emotion/server': ^11.10.0 @@ -48,8 +48,8 @@ importers: react-dom: 18.2.0 typescript: 4.8.3 dependencies: - '@blocksuite/blocks': 0.2.22 - '@blocksuite/editor': 0.2.22 + '@blocksuite/blocks': 0.2.24 + '@blocksuite/editor': 0.2.24 '@emotion/css': 11.10.0 '@emotion/react': 11.10.4_w5j4k42lgipnm43s3brx6h3c34 '@emotion/server': 11.10.0_@emotion+css@11.10.0 @@ -166,10 +166,10 @@ packages: to-fast-properties: 2.0.0 dev: false - /@blocksuite/blocks/0.2.22: - resolution: {integrity: sha512-66HqtUlXI44MZSffxF3uCDhaoMsMBABw4WKZxjCwFYxa2eeddm2Vl6+qNDrmsOK6ype5uVzY2u3BBis3k8A0Cw==} + /@blocksuite/blocks/0.2.24: + resolution: {integrity: sha512-gqKD1NwjL1NroMqmM9JUgvQaJB/W8tLTqt0+em7L5ys1Y9RjrIfIPKLe5Ea4oZR7HukKGyY+gDuEkOW0mqvtvg==} dependencies: - '@blocksuite/store': 0.2.22 + '@blocksuite/store': 0.2.24 hotkeys-js: 3.10.0 lit: 2.4.0 quill: 1.3.7 @@ -180,11 +180,11 @@ packages: - utf-8-validate dev: false - /@blocksuite/editor/0.2.22: - resolution: {integrity: sha512-TgJTNeNXynbYZW39hYBs/Z84Cha3wuNm2AngSa1f/GQV8Bbi0Q1C8KtBXATQ+WkHAAfZ7K1HXx0jrFbsiLk1sg==} + /@blocksuite/editor/0.2.24: + resolution: {integrity: sha512-L5sq4eq2cMJeGZ8akGkcRIrxahS9met8unyx9I0ELBqO1u43OkUcPCxemRTW4ECfV2T7lWR3GbJg4LL1udCPSA==} dependencies: - '@blocksuite/blocks': 0.2.22 - '@blocksuite/store': 0.2.22 + '@blocksuite/blocks': 0.2.24 + '@blocksuite/store': 0.2.24 lit: 2.4.0 marked: 4.1.1 turndown: 7.1.1 @@ -194,8 +194,8 @@ packages: - utf-8-validate dev: false - /@blocksuite/store/0.2.22: - resolution: {integrity: sha512-sc85o52s3ga3ZtOXzqkRUw763+JxQsvPnVK905QaQyoQLcbtfJx3yx0iVUGcturGaNCkiUFwJsUQHLOiDvRTMA==} + /@blocksuite/store/0.2.24: + resolution: {integrity: sha512-2eRccsokZVk1D0W6rnzIzP28YzF41JmEoRcyMmeppn5/wcXhmiWpaY1YNyVp/aSmhv+7Lmt6GOe/qx17PDXOVA==} dependencies: lib0: 0.2.52 y-protocols: 1.0.5 @@ -1438,7 +1438,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.38.0_eslint@8.22.0 + '@typescript-eslint/parser': 5.38.0_76twfck5d7crjqrmw4yltga7zm debug: 3.2.7 eslint: 8.22.0 eslint-import-resolver-node: 0.3.6 @@ -1457,7 +1457,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.38.0_eslint@8.22.0 + '@typescript-eslint/parser': 5.38.0_76twfck5d7crjqrmw4yltga7zm array-includes: 3.1.5 array.prototype.flat: 1.3.0 debug: 2.6.9