diff --git a/.vscode/settings.json b/.vscode/settings.json index a565aa8dc9..784f0f182b 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 55f231b965..82e298a0f8 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.23", + "@blocksuite/editor": "^0.2.23", "@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 6c75a75142..8ebafce72e 100644 --- a/packages/app/src/styles/theme.ts +++ b/packages/app/src/styles/theme.ts @@ -17,6 +17,7 @@ export const getLightTheme = ( pageBackground: '#fff', hoverBackground: '#F1F3FF', popoverBackground: '#fff', + tooltipBackground: '#6880FF', codeBackground: '#f2f5f9', textColor: '#3A4C5C', @@ -26,6 +27,7 @@ export const getLightTheme = ( linkColor2: '#6880FF', linkVisitedColor: '#ABB8FE', popoverColor: '#4C6275', + tooltipColor: '#fff', codeColor: '#517ea6', quoteColor: '#4C6275', placeHolderColor: '#C7C7C7', @@ -75,6 +77,7 @@ export const getDarkTheme = ( pageBackground: '#2c2c2c', hoverBackground: '#3C3C42', popoverBackground: '#1F2021', + tooltipBackground: '#1F2021', codeBackground: editorMode === 'edgeless' ? lightTheme.colors.codeBackground @@ -87,6 +90,7 @@ export const getDarkTheme = ( linkColor2: '#6880FF', linkVisitedColor: '#505FAB', popoverColor: '#C6CBD9', + tooltipColor: '#fff', codeColor: editorMode === 'edgeless' ? lightTheme.colors.codeColor : '#BDDBFD', quoteColor: '#C6CBD9', @@ -152,5 +156,8 @@ export const globalThemeVariables: ( '--affine-paragraph-space': theme.space.paragraph, '--affine-popover-radius': theme.radius.popover, + + '--affine-tooltip-color': theme.colors.tooltipColor, + '--affine-tooltip-background': theme.colors.tooltipBackground, }; }; diff --git a/packages/app/src/styles/types.ts b/packages/app/src/styles/types.ts index 41f5a2362f..af4c1f8661 100644 --- a/packages/app/src/styles/types.ts +++ b/packages/app/src/styles/types.ts @@ -21,6 +21,7 @@ export interface AffineTheme { pageBackground: string; popoverBackground: string; + tooltipBackground: string; hoverBackground: string; codeBackground: string; @@ -34,6 +35,7 @@ export interface AffineTheme { linkVisitedColor: string; iconColor: string; popoverColor: string; + tooltipColor: string; codeColor: string; quoteColor: string; placeHolderColor: string; @@ -111,6 +113,9 @@ export interface AffineThemeCSSVariables { '--affine-paragraph-space': AffineTheme['space']['paragraph']; '--affine-popover-radius': AffineTheme['radius']['popover']; + + '--affine-tooltip-color': AffineTheme['colors']['tooltipColor']; + '--affine-tooltip-background': AffineTheme['colors']['tooltipBackground']; } declare module '@emotion/react' { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8231fc0496..58b6a6df76 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.23 + '@blocksuite/editor': ^0.2.23 '@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.23 + '@blocksuite/editor': 0.2.23 '@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.23: + resolution: {integrity: sha512-fPGdiaQjp7Fe1HWSGhBtbIIP+1KbfZzG3XAQ4y6LPxS09lwKSYXTrMWrGVKtWLniylvF3bk4A1NoL0QzAWVmzw==} dependencies: - '@blocksuite/store': 0.2.22 + '@blocksuite/store': 0.2.23 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.23: + resolution: {integrity: sha512-yLnpLOFquDCAW85y4JOg2WtktpUQVLZ2T/4kqyW6Q+Z95l8tbz27gMjGeHggwUhsGvhkIj3mIi0GasQwE+YPJw==} dependencies: - '@blocksuite/blocks': 0.2.22 - '@blocksuite/store': 0.2.22 + '@blocksuite/blocks': 0.2.23 + '@blocksuite/store': 0.2.23 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.23: + resolution: {integrity: sha512-wOsiP3sk79LVBBL8ZCNOa4TGwNOK4vhXI712M5bo4TTH6zfrm4jqMkLfMHU3wRfv1H3HX84dKKzZBvhUjiRvPA==} dependencies: lib0: 0.2.52 y-protocols: 1.0.5