diff --git a/package.json b/package.json index 6f59b72897..d1bf76efe4 100644 --- a/package.json +++ b/package.json @@ -77,5 +77,10 @@ "**/__tests__/**", "**/tests/**" ] + }, + "pnpm": { + "patchedDependencies": { + "next@13.1.0": "patches/next@13.1.0.patch" + } } } diff --git a/packages/app/package.json b/packages/app/package.json index 39dcfda30e..3a1f655483 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -12,10 +12,10 @@ "@affine/component": "workspace:*", "@affine/datacenter": "workspace:*", "@affine/i18n": "workspace:*", - "@blocksuite/blocks": "0.4.0-alpha.2", - "@blocksuite/editor": "0.4.0-alpha.2", + "@blocksuite/blocks": "0.4.0-alpha.3", + "@blocksuite/editor": "0.4.0-alpha.3", "@blocksuite/icons": "^2.0.2", - "@blocksuite/store": "0.4.0-alpha.2", + "@blocksuite/store": "0.4.0-alpha.3", "@emotion/css": "^11.10.5", "@emotion/react": "^11.10.5", "@emotion/server": "^11.10.0", diff --git a/packages/app/src/components/editor/index.tsx b/packages/app/src/components/editor/index.tsx index 176777f86f..46ea39204c 100644 --- a/packages/app/src/components/editor/index.tsx +++ b/packages/app/src/components/editor/index.tsx @@ -22,15 +22,26 @@ export const Editor = ({ page, workspace, setEditor }: Props) => { const editorContainer = useRef(null); // const { currentWorkspace, currentPage, setEditor } = useAppState(); useEffect(() => { + let blockHubElement: HTMLElement | null = null; const ret = () => { const node = editorContainer.current; while (node?.firstChild) { node.removeChild(node.firstChild); } + + blockHubElement?.remove(); }; const editor = new EditorContainer(); editor.page = page; + editor.createBlockHub().then(blockHub => { + const toolWrapper = document.querySelector('#toolWrapper'); + if (!toolWrapper) { + throw new Error('Can not find toolWrapper'); + } + blockHubElement = blockHub; + toolWrapper.appendChild(blockHub); + }); editorContainer.current?.appendChild(editor); if (page.isEmpty) { const isFirstPage = workspace?.meta.pageMetas.length === 1; diff --git a/packages/app/src/components/help-island/Icons.tsx b/packages/app/src/components/help-island/Icons.tsx index 7c8797265d..427e078dc8 100644 --- a/packages/app/src/components/help-island/Icons.tsx +++ b/packages/app/src/components/help-island/Icons.tsx @@ -1,16 +1,16 @@ export const HelpIcon = () => { return ( ); diff --git a/packages/app/src/components/help-island/index.tsx b/packages/app/src/components/help-island/index.tsx index 4f7b126843..714e43d04a 100644 --- a/packages/app/src/components/help-island/index.tsx +++ b/packages/app/src/components/help-island/index.tsx @@ -2,85 +2,71 @@ import { useState } from 'react'; import { StyledIsland, StyledIconWrapper, - StyledIslandWrapper, - StyledTransformIcon, + StyledAnimateWrapper, + StyledTriggerWrapper, } from './style'; import { CloseIcon, ContactIcon, HelpIcon, KeyboardIcon } from './Icons'; -import { MuiGrow } from '@affine/component'; import { Tooltip } from '@affine/component'; + import { useTranslation } from '@affine/i18n'; import { useModal } from '@/providers/GlobalModalProvider'; -import { useTheme } from '@/providers/ThemeProvider'; -import useCurrentPageMeta from '@/hooks/use-current-page-meta'; +import { MuiFade } from '@affine/component'; export type IslandItemNames = 'contact' | 'shortcuts'; export const HelpIsland = ({ showList = ['contact', 'shortcuts'], }: { showList?: IslandItemNames[]; }) => { - const [showContent, setShowContent] = useState(false); - const { mode } = useTheme(); - const { mode: editorMode } = useCurrentPageMeta() || {}; + const [spread, setShowSpread] = useState(false); const { triggerShortcutsModal, triggerContactModal } = useModal(); - const isEdgelessDark = mode === 'dark' && editorMode === 'edgeless'; const { t } = useTranslation(); return ( - <> - { - setShowContent(true); - }} - onMouseLeave={() => { - setShowContent(false); - }} - > - - - {showList.includes('contact') && ( - - { - setShowContent(false); - triggerContactModal(); - }} - > - - - - )} - {showList.includes('shortcuts') && ( - - { - setShowContent(false); - triggerShortcutsModal(); - }} - > - - - - )} - - + { + setShowSpread(!spread); + }} + > + + {showList.includes('contact') && ( + + { + setShowSpread(false); + triggerContactModal(); + }} + > + + + + )} + {showList.includes('shortcuts') && ( + + { + setShowSpread(false); + triggerShortcutsModal(); + }} + > + + + + )} + -
- - - - - - -
-
- + + + + + + + + + + +
); }; diff --git a/packages/app/src/components/help-island/style.ts b/packages/app/src/components/help-island/style.ts index 46b2e271ac..9095344182 100644 --- a/packages/app/src/components/help-island/style.ts +++ b/packages/app/src/components/help-island/style.ts @@ -1,71 +1,77 @@ -import { displayFlex, styled } from '@affine/component'; +import { displayFlex, positionAbsolute, styled } from '@affine/component'; -export const StyledIsland = styled('div')(({ theme }) => { +export const StyledIsland = styled('div')<{ + spread: boolean; +}>(({ theme, spread }) => { return { - width: '32px', - height: '32px', - color: theme.colors.iconColor, - position: 'fixed', - right: '30px', - bottom: '30px', - borderRadius: '50%', - zIndex: theme.zIndex.popover, - }; -}); -export const StyledTransformIcon = styled('div', { - shouldForwardProp: prop => prop !== 'in', -})<{ in: boolean }>(({ in: isIn, theme }) => ({ - height: '32px', - width: '32px', - borderRadius: '50%', - position: 'absolute', - left: '0', - right: '0', - bottom: '0', - top: '0', - margin: 'auto', - ...displayFlex('center', 'center'), - opacity: isIn ? 1 : 0, - backgroundColor: isIn - ? theme.colors.hoverBackground - : theme.colors.pageBackground, -})); -export const StyledIconWrapper = styled('div')<{ isEdgelessDark: boolean }>( - ({ theme, isEdgelessDark }) => { - return { - color: isEdgelessDark - ? theme.colors.popoverBackground - : theme.colors.iconColor, - marginBottom: '24px', - ...displayFlex('center', 'center'), - cursor: 'pointer', - backgroundColor: isEdgelessDark - ? 'transparent' - : theme.colors.pageBackground, - borderRadius: '50%', - width: '32px', - height: '32px', - transition: 'background-color 0.3s', - position: 'relative', - ':hover': { - color: isEdgelessDark - ? theme.colors.iconColor - : theme.colors.primaryColor, - backgroundColor: theme.colors.hoverBackground, - }, - }; - } -); - -export const StyledIslandWrapper = styled('div')(({ theme }) => { - return { - position: 'absolute', - bottom: '100%', - left: '0', - width: '100%', - color: theme.colors.iconColor, + transition: 'box-shadow 0.2s', + width: '44px', + position: 'relative', + boxShadow: spread + ? '4px 4px 7px rgba(58, 76, 92, 0.04), -4px -4px 13px rgba(58, 76, 92, 0.02), 6px 6px 36px rgba(58, 76, 92, 0.06)' + : 'unset', + padding: '0 4px 44px', + borderRadius: '10px', + backgroundColor: theme.colors.pageBackground, ':hover': { - color: theme.colors.popoverColor, + boxShadow: + '4px 4px 7px rgba(58, 76, 92, 0.04), -4px -4px 13px rgba(58, 76, 92, 0.02), 6px 6px 36px rgba(58, 76, 92, 0.06)', + }, + '::after': { + content: '""', + width: '36px', + height: '1px', + background: spread ? theme.colors.borderColor : 'transparent', + ...positionAbsolute({ + left: 0, + right: 0, + bottom: '44px', + }), + margin: 'auto', + transition: 'background 0.15s', + }, + }; +}); +export const StyledIconWrapper = styled('div')(({ theme }) => { + return { + color: theme.colors.iconColor, + ...displayFlex('center', 'center'), + cursor: 'pointer', + backgroundColor: theme.colors.pageBackground, + borderRadius: '5px', + width: '36px', + height: '36px', + margin: '4px auto 4px', + transition: 'background-color 0.2s', + position: 'relative', + ':hover': { + color: theme.colors.primaryColor, + backgroundColor: theme.colors.hoverBackground, + }, + }; +}); + +export const StyledAnimateWrapper = styled('div', { + shouldForwardProp: prop => prop !== 'spread', +})<{ spread: boolean }>(({ spread }) => ({ + height: spread ? '88px' : '0', + transition: 'height 0.2s cubic-bezier(0, 0, 0.55, 1.6)', + overflow: 'hidden', +})); + +export const StyledTriggerWrapper = styled('div')(({ theme }) => { + return { + width: '36px', + height: '36px', + cursor: 'pointer', + backgroundColor: theme.colors.pageBackground, + color: theme.colors.iconColor, + borderRadius: '5px', + ...displayFlex('center', 'center'), + ...positionAbsolute({ left: '4px', bottom: '4px' }), + ':hover': { + color: theme.colors.primaryColor, + backgroundColor: theme.colors.hoverBackground, }, }; }); diff --git a/packages/app/src/components/workspace-layout/index.tsx b/packages/app/src/components/workspace-layout/index.tsx index b77d86fada..eca2b6bbb0 100644 --- a/packages/app/src/components/workspace-layout/index.tsx +++ b/packages/app/src/components/workspace-layout/index.tsx @@ -1,7 +1,7 @@ import HelpIsland from '@/components/help-island'; import { WorkSpaceSliderBar } from '@/components/workspace-slider-bar'; import { useRouter } from 'next/router'; -import { StyledPage, StyledWrapper } from './styles'; +import { StyledPage, StyledToolWrapper, StyledWrapper } from './styles'; import { PropsWithChildren } from 'react'; import useEnsureWorkspace from '@/hooks/use-ensure-workspace'; import { PageLoading } from '@/components/loading'; @@ -19,7 +19,14 @@ export const WorkspaceLayout = ({ children }: PropsWithChildren) => { {children} - + +
+ {/* Slot for block hub */} +
+ +
); diff --git a/packages/app/src/components/workspace-layout/styles.ts b/packages/app/src/components/workspace-layout/styles.ts index 4c246db801..979f342dfd 100644 --- a/packages/app/src/components/workspace-layout/styles.ts +++ b/packages/app/src/components/workspace-layout/styles.ts @@ -16,3 +16,12 @@ export const StyledWrapper = styled('div')(() => { position: 'relative', }; }); + +export const StyledToolWrapper = styled('div')(({ theme }) => { + return { + position: 'fixed', + right: '30px', + bottom: '30px', + zIndex: theme.zIndex.popover, + }; +}); diff --git a/packages/app/src/pages/temporary.css b/packages/app/src/pages/temporary.css index 9bda7bdcf9..3df1e639f5 100644 --- a/packages/app/src/pages/temporary.css +++ b/packages/app/src/pages/temporary.css @@ -6,3 +6,10 @@ .affine-default-page-block-container { width: 686px !important; } + +affine-block-hub { + position: unset !important; +} +.block-hub-menu-container { + position: unset !important; +} diff --git a/packages/component/package.json b/packages/component/package.json index 4cf948d9c3..4117e52f4c 100644 --- a/packages/component/package.json +++ b/packages/component/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "@affine/i18n": "workspace:*", - "@blocksuite/editor": "0.4.0-alpha.2", + "@blocksuite/editor": "0.4.0-alpha.3", "@blocksuite/icons": "^2.0.2", "@emotion/react": "^11.10.5", "@emotion/styled": "^11.10.5", diff --git a/packages/component/src/ui/mui.ts b/packages/component/src/ui/mui.ts index 1d0a7f0b57..3d8281e38d 100644 --- a/packages/component/src/ui/mui.ts +++ b/packages/component/src/ui/mui.ts @@ -3,5 +3,6 @@ import MuiCollapse from '@mui/material/Collapse'; import MuiSlide from '@mui/material/Slide'; import MuiAvatar from '@mui/material/Avatar'; import MuiGrow from '@mui/material/Grow'; +import MuiFade from '@mui/material/Fade'; -export { MuiBreadcrumbs, MuiCollapse, MuiSlide, MuiAvatar, MuiGrow }; +export { MuiBreadcrumbs, MuiCollapse, MuiSlide, MuiAvatar, MuiGrow, MuiFade }; diff --git a/packages/data-center/package.json b/packages/data-center/package.json index f2b7382a99..9ee7ef4942 100644 --- a/packages/data-center/package.json +++ b/packages/data-center/package.json @@ -27,8 +27,8 @@ "yjs": "^13.5.45" }, "dependencies": { - "@blocksuite/blocks": "0.4.0-alpha.2", - "@blocksuite/store": "0.4.0-alpha.2", + "@blocksuite/blocks": "0.4.0-alpha.3", + "@blocksuite/store": "0.4.0-alpha.3", "debug": "^4.3.4", "encoding": "^0.1.13", "firebase": "^9.15.0", diff --git a/patches/next@13.1.0.patch b/patches/next@13.1.0.patch new file mode 100644 index 0000000000..b2788691ee --- /dev/null +++ b/patches/next@13.1.0.patch @@ -0,0 +1,15 @@ +diff --git a/dist/server/config.js b/dist/server/config.js +index 3222d6521a5473994ad1d42914106d9c611e18b8..b9ea8fbd541c9ce1a8c33c25ab0f493981f9b3e3 100644 +--- a/dist/server/config.js ++++ b/dist/server/config.js +@@ -180,8 +180,8 @@ const isAboveNodejs16 = (0, _semver).gte(process.version, NODE_16_VERSION); + const isAboveNodejs18 = (0, _semver).gte(process.version, NODE_18_VERSION); + const experimentalWarning = (0, _utils).execOnce((configFileName, features)=>{ + const s = features.length > 1 ? "s" : ""; +- Log.warn(_chalk.default.bold(`You have enabled experimental feature${s} (${features.join(", ")}) in ${configFileName}.`)); +- Log.warn(`Experimental features are not covered by semver, and may cause unexpected or broken application behavior. ` + `Use at your own risk.`); ++ // Log.warn(_chalk.default.bold(`You have enabled experimental feature${s} (${features.join(", ")}) in ${configFileName}.`)); ++ // Log.warn(`Experimental features are not covered by semver, and may cause unexpected or broken application behavior. ` + `Use at your own risk.`); + if (features.includes("appDir")) { + Log.info(`Thank you for testing \`appDir\` please leave your feedback at https://nextjs.link/app-feedback`); + } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 27cd7654f5..3caffd7e8c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,5 +1,10 @@ lockfileVersion: 5.4 +patchedDependencies: + next@13.1.0: + hash: rdilrli7uexa22ralt77ekax24 + path: patches/next@13.1.0.patch + importers: .: @@ -47,10 +52,10 @@ importers: '@affine/component': workspace:* '@affine/datacenter': workspace:* '@affine/i18n': workspace:* - '@blocksuite/blocks': 0.4.0-alpha.2 - '@blocksuite/editor': 0.4.0-alpha.2 + '@blocksuite/blocks': 0.4.0-alpha.3 + '@blocksuite/editor': 0.4.0-alpha.3 '@blocksuite/icons': ^2.0.2 - '@blocksuite/store': 0.4.0-alpha.2 + '@blocksuite/store': 0.4.0-alpha.3 '@emotion/css': ^11.10.5 '@emotion/react': ^11.10.5 '@emotion/server': ^11.10.0 @@ -89,10 +94,10 @@ importers: '@affine/component': link:../component '@affine/datacenter': link:../data-center '@affine/i18n': link:../i18n - '@blocksuite/blocks': 0.4.0-alpha.2_yjs@13.5.45 - '@blocksuite/editor': 0.4.0-alpha.2_yjs@13.5.45 + '@blocksuite/blocks': 0.4.0-alpha.3_yjs@13.5.45 + '@blocksuite/editor': 0.4.0-alpha.3_yjs@13.5.45 '@blocksuite/icons': 2.0.4_w5j4k42lgipnm43s3brx6h3c34 - '@blocksuite/store': 0.4.0-alpha.2_lit@2.6.1+yjs@13.5.45 + '@blocksuite/store': 0.4.0-alpha.3_lit@2.6.1+yjs@13.5.45 '@emotion/css': 11.10.5 '@emotion/react': 11.10.5_w5j4k42lgipnm43s3brx6h3c34 '@emotion/server': 11.10.0_@emotion+css@11.10.5 @@ -107,7 +112,7 @@ importers: css-spring: 4.1.0 dayjs: 1.11.7 lit: 2.6.1 - next: 13.1.0_biqbaboplfbrettd7655fr4n2y + next: 13.1.0_rdilrli7uexa22ralt77ekax24_biqbaboplfbrettd7655fr4n2y next-debug-local: 0.1.5 prettier: 2.7.1 quill: 1.3.7 @@ -132,7 +137,7 @@ importers: packages/component: specifiers: '@affine/i18n': workspace:* - '@blocksuite/editor': 0.4.0-alpha.2 + '@blocksuite/editor': 0.4.0-alpha.3 '@blocksuite/icons': ^2.0.2 '@emotion/react': ^11.10.5 '@emotion/styled': ^11.10.5 @@ -156,7 +161,7 @@ importers: webpack: ^5.75.0 dependencies: '@affine/i18n': link:../i18n - '@blocksuite/editor': 0.4.0-alpha.2 + '@blocksuite/editor': 0.4.0-alpha.3 '@blocksuite/icons': 2.0.4_3stiutgnnbnfnf3uowm5cip22i '@emotion/react': 11.10.5_3stiutgnnbnfnf3uowm5cip22i '@emotion/styled': 11.10.5_jrh5enlbqfbnumycmktdqgd6se @@ -182,8 +187,8 @@ importers: packages/data-center: specifiers: - '@blocksuite/blocks': 0.4.0-alpha.2 - '@blocksuite/store': 0.4.0-alpha.2 + '@blocksuite/blocks': 0.4.0-alpha.3 + '@blocksuite/store': 0.4.0-alpha.3 '@playwright/test': ^1.29.1 '@types/debug': ^4.1.7 debug: ^4.3.4 @@ -201,8 +206,8 @@ importers: y-protocols: ^1.0.5 yjs: ^13.5.45 dependencies: - '@blocksuite/blocks': 0.4.0-alpha.2_yjs@13.5.45 - '@blocksuite/store': 0.4.0-alpha.2_lit@2.6.1+yjs@13.5.45 + '@blocksuite/blocks': 0.4.0-alpha.3_yjs@13.5.45 + '@blocksuite/store': 0.4.0-alpha.3_lit@2.6.1+yjs@13.5.45 debug: 4.3.4 encoding: 0.1.13 firebase: 9.15.0_encoding@0.1.13 @@ -2615,21 +2620,21 @@ packages: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true - /@blocksuite/blocks/0.4.0-alpha.2: - resolution: {integrity: sha512-rsG1wXNmZpZrCQeADLYkJyFQJ6tTW5QutmN9kr5e1HI3cZgV6n1szcDBh+/32xp6xFn1q1RgknYVNS6jHsbd+A==} + /@blocksuite/blocks/0.4.0-alpha.3: + resolution: {integrity: sha512-DKRWJmNhaCLQSMYRdVMR6okuWRjvU3o+NZcrnXitNzEH2jes7gl9DxpCI4kfAWTGHKLtblDqkMwRtKJhhxE8ng==} dependencies: - '@blocksuite/global': 0.4.0-alpha.2_lit@2.6.1 - '@blocksuite/phasor': 0.4.0-alpha.2_lit@2.6.1 - '@blocksuite/store': 0.4.0-alpha.2_lit@2.6.1 - '@blocksuite/virgo': 0.4.0-alpha.2_lit@2.6.1 + '@blocksuite/global': 0.4.0-alpha.3_lit@2.6.1 + '@blocksuite/phasor': 0.4.0-alpha.3_lit@2.6.1 + '@blocksuite/store': 0.4.0-alpha.3_lit@2.6.1 + '@blocksuite/virgo': 0.4.0-alpha.3_lit@2.6.1 '@popperjs/core': 2.11.6 autosize: 5.0.2 highlight.js: 11.7.0 hotkeys-js: 3.10.1 lit: 2.6.1 quill: 1.3.7 - quill-cursors: 4.0.0 - zod: 3.20.2 + quill-cursors: 4.0.2 + zod: 3.20.5 transitivePeerDependencies: - bufferutil - supports-color @@ -2637,21 +2642,21 @@ packages: - yjs dev: false - /@blocksuite/blocks/0.4.0-alpha.2_yjs@13.5.45: - resolution: {integrity: sha512-rsG1wXNmZpZrCQeADLYkJyFQJ6tTW5QutmN9kr5e1HI3cZgV6n1szcDBh+/32xp6xFn1q1RgknYVNS6jHsbd+A==} + /@blocksuite/blocks/0.4.0-alpha.3_yjs@13.5.45: + resolution: {integrity: sha512-DKRWJmNhaCLQSMYRdVMR6okuWRjvU3o+NZcrnXitNzEH2jes7gl9DxpCI4kfAWTGHKLtblDqkMwRtKJhhxE8ng==} dependencies: - '@blocksuite/global': 0.4.0-alpha.2_lit@2.6.1 - '@blocksuite/phasor': 0.4.0-alpha.2_lit@2.6.1+yjs@13.5.45 - '@blocksuite/store': 0.4.0-alpha.2_lit@2.6.1+yjs@13.5.45 - '@blocksuite/virgo': 0.4.0-alpha.2_lit@2.6.1+yjs@13.5.45 + '@blocksuite/global': 0.4.0-alpha.3_lit@2.6.1 + '@blocksuite/phasor': 0.4.0-alpha.3_lit@2.6.1+yjs@13.5.45 + '@blocksuite/store': 0.4.0-alpha.3_lit@2.6.1+yjs@13.5.45 + '@blocksuite/virgo': 0.4.0-alpha.3_lit@2.6.1+yjs@13.5.45 '@popperjs/core': 2.11.6 autosize: 5.0.2 highlight.js: 11.7.0 hotkeys-js: 3.10.1 lit: 2.6.1 quill: 1.3.7 - quill-cursors: 4.0.0 - zod: 3.20.2 + quill-cursors: 4.0.2 + zod: 3.20.5 transitivePeerDependencies: - bufferutil - supports-color @@ -2659,12 +2664,12 @@ packages: - yjs dev: false - /@blocksuite/editor/0.4.0-alpha.2: - resolution: {integrity: sha512-77+uY8ljus+W70sf3J5sjzS6jzfLXeA5wBnPVALtq7LBIzkQesFZ/FCewpPPaqDy3Up8rnq4mvWDB2GCbpmwuA==} + /@blocksuite/editor/0.4.0-alpha.3: + resolution: {integrity: sha512-PLF8apMEOzvwS8sliZFRyHrgWKwR5XgpeIoqZ3CTUXvmkZ2cX6d8UP+GjS6GWKZarbpGJNtvuABYTFraJycMig==} dependencies: - '@blocksuite/blocks': 0.4.0-alpha.2 - '@blocksuite/global': 0.4.0-alpha.2_lit@2.6.1 - '@blocksuite/store': 0.4.0-alpha.2_lit@2.6.1 + '@blocksuite/blocks': 0.4.0-alpha.3 + '@blocksuite/global': 0.4.0-alpha.3_lit@2.6.1 + '@blocksuite/store': 0.4.0-alpha.3_lit@2.6.1 lit: 2.6.1 marked: 4.2.12 turndown: 7.1.1 @@ -2675,12 +2680,12 @@ packages: - yjs dev: false - /@blocksuite/editor/0.4.0-alpha.2_yjs@13.5.45: - resolution: {integrity: sha512-77+uY8ljus+W70sf3J5sjzS6jzfLXeA5wBnPVALtq7LBIzkQesFZ/FCewpPPaqDy3Up8rnq4mvWDB2GCbpmwuA==} + /@blocksuite/editor/0.4.0-alpha.3_yjs@13.5.45: + resolution: {integrity: sha512-PLF8apMEOzvwS8sliZFRyHrgWKwR5XgpeIoqZ3CTUXvmkZ2cX6d8UP+GjS6GWKZarbpGJNtvuABYTFraJycMig==} dependencies: - '@blocksuite/blocks': 0.4.0-alpha.2_yjs@13.5.45 - '@blocksuite/global': 0.4.0-alpha.2_lit@2.6.1 - '@blocksuite/store': 0.4.0-alpha.2_lit@2.6.1+yjs@13.5.45 + '@blocksuite/blocks': 0.4.0-alpha.3_yjs@13.5.45 + '@blocksuite/global': 0.4.0-alpha.3_lit@2.6.1 + '@blocksuite/store': 0.4.0-alpha.3_lit@2.6.1+yjs@13.5.45 lit: 2.6.1 marked: 4.2.12 turndown: 7.1.1 @@ -2691,8 +2696,8 @@ packages: - yjs dev: false - /@blocksuite/global/0.4.0-alpha.2_lit@2.6.1: - resolution: {integrity: sha512-LS58Itk+rrHmU51rEl6X4yqVpNRW9GCZBSrlLnlxSBaqqOwa7aE57vF2zfDiamjBXmCnwbcdAlucyMoHcuqrGA==} + /@blocksuite/global/0.4.0-alpha.3_lit@2.6.1: + resolution: {integrity: sha512-nCxWV8PoZNgoIMQjBX/c9x7BrvivCabY712bHy89K/QSNgXlKsPT0KN3tuLHdm96/q+3Suf6RhvB60SurPYv1g==} peerDependencies: lit: ^2.6 peerDependenciesMeta: @@ -2701,7 +2706,7 @@ packages: dependencies: ansi-colors: 4.1.3 lit: 2.6.1 - zod: 3.20.2 + zod: 3.20.5 dev: false /@blocksuite/icons/2.0.4_3stiutgnnbnfnf3uowm5cip22i: @@ -2724,12 +2729,12 @@ packages: react: 18.2.0 dev: false - /@blocksuite/phasor/0.4.0-alpha.2_lit@2.6.1: - resolution: {integrity: sha512-+T9hXOyadQh5A2TpzOvY7KntBImzt8fVMfgq0McGnPQP8whSDmgKmGn0N442ObUM09X9XwzmF1i2claYIiPW+g==} + /@blocksuite/phasor/0.4.0-alpha.3_lit@2.6.1: + resolution: {integrity: sha512-GLw+LPK5avc/fXZk9fxtAQtYxovTHMPrEs48OJtSlrVqvTAJwGQpK3W2BL7HKBhgHlsbOcaBQ2pAaqKAFypwEw==} peerDependencies: yjs: ^13 dependencies: - '@blocksuite/global': 0.4.0-alpha.2_lit@2.6.1 + '@blocksuite/global': 0.4.0-alpha.3_lit@2.6.1 fractional-indexing: 3.2.0 nanoid: 4.0.1 perfect-freehand: 1.2.0 @@ -2737,12 +2742,12 @@ packages: - lit dev: false - /@blocksuite/phasor/0.4.0-alpha.2_lit@2.6.1+yjs@13.5.45: - resolution: {integrity: sha512-+T9hXOyadQh5A2TpzOvY7KntBImzt8fVMfgq0McGnPQP8whSDmgKmGn0N442ObUM09X9XwzmF1i2claYIiPW+g==} + /@blocksuite/phasor/0.4.0-alpha.3_lit@2.6.1+yjs@13.5.45: + resolution: {integrity: sha512-GLw+LPK5avc/fXZk9fxtAQtYxovTHMPrEs48OJtSlrVqvTAJwGQpK3W2BL7HKBhgHlsbOcaBQ2pAaqKAFypwEw==} peerDependencies: yjs: ^13 dependencies: - '@blocksuite/global': 0.4.0-alpha.2_lit@2.6.1 + '@blocksuite/global': 0.4.0-alpha.3_lit@2.6.1 fractional-indexing: 3.2.0 nanoid: 4.0.1 perfect-freehand: 1.2.0 @@ -2751,23 +2756,23 @@ packages: - lit dev: false - /@blocksuite/store/0.4.0-alpha.2_lit@2.6.1: - resolution: {integrity: sha512-Tezn9P5EoggO03lBAusYTldUW+twoXSfaU+mJoTSCbW4DC8aDpgFRZgZlxjon2MC1aZnz1sShjFa6zKkNerRFg==} + /@blocksuite/store/0.4.0-alpha.3_lit@2.6.1: + resolution: {integrity: sha512-Ib8vjhMIC4PeWrbfz7usiXKIgw0VYPujfWwDZ3fDq+OWHbb2KzfnXBQ93W5oDZhv0tVpxoT2RYCtVSvrh7sY5A==} peerDependencies: yjs: ^13 dependencies: - '@blocksuite/global': 0.4.0-alpha.2_lit@2.6.1 + '@blocksuite/global': 0.4.0-alpha.3_lit@2.6.1 '@types/flexsearch': 0.7.3 buffer: 6.0.3 flexsearch: 0.7.21 idb-keyval: 6.2.0 ky: 0.33.2 - lib0: 0.2.61 + lib0: 0.2.62 merge: 2.1.1 nanoid: 4.0.1 y-protocols: 1.0.5 y-webrtc: 10.2.4 - zod: 3.20.2 + zod: 3.20.5 transitivePeerDependencies: - bufferutil - lit @@ -2775,24 +2780,24 @@ packages: - utf-8-validate dev: false - /@blocksuite/store/0.4.0-alpha.2_lit@2.6.1+yjs@13.5.45: - resolution: {integrity: sha512-Tezn9P5EoggO03lBAusYTldUW+twoXSfaU+mJoTSCbW4DC8aDpgFRZgZlxjon2MC1aZnz1sShjFa6zKkNerRFg==} + /@blocksuite/store/0.4.0-alpha.3_lit@2.6.1+yjs@13.5.45: + resolution: {integrity: sha512-Ib8vjhMIC4PeWrbfz7usiXKIgw0VYPujfWwDZ3fDq+OWHbb2KzfnXBQ93W5oDZhv0tVpxoT2RYCtVSvrh7sY5A==} peerDependencies: yjs: ^13 dependencies: - '@blocksuite/global': 0.4.0-alpha.2_lit@2.6.1 + '@blocksuite/global': 0.4.0-alpha.3_lit@2.6.1 '@types/flexsearch': 0.7.3 buffer: 6.0.3 flexsearch: 0.7.21 idb-keyval: 6.2.0 ky: 0.33.2 - lib0: 0.2.61 + lib0: 0.2.62 merge: 2.1.1 nanoid: 4.0.1 y-protocols: 1.0.5 y-webrtc: 10.2.4 yjs: 13.5.45 - zod: 3.20.2 + zod: 3.20.5 transitivePeerDependencies: - bufferutil - lit @@ -2800,23 +2805,23 @@ packages: - utf-8-validate dev: false - /@blocksuite/virgo/0.4.0-alpha.2_lit@2.6.1: - resolution: {integrity: sha512-ZLyQeBULa4yD0+wlP56miSZi4ljWYLvvZH54CEplVsOFqtYs0LruBsELc6z7cBkfJR1awdeJxNj/6qgKEwP5FA==} + /@blocksuite/virgo/0.4.0-alpha.3_lit@2.6.1: + resolution: {integrity: sha512-uEa2bH2XCNI5whF3LUJAOogmv+5gux4m80dge7dXslw+6UfbdS6tDTP268a0k7FCPiV7suAcGbT/y5wZUbJ0ow==} peerDependencies: lit: ^2 yjs: ^13 dependencies: - '@blocksuite/global': 0.4.0-alpha.2_lit@2.6.1 + '@blocksuite/global': 0.4.0-alpha.3_lit@2.6.1 lit: 2.6.1 dev: false - /@blocksuite/virgo/0.4.0-alpha.2_lit@2.6.1+yjs@13.5.45: - resolution: {integrity: sha512-ZLyQeBULa4yD0+wlP56miSZi4ljWYLvvZH54CEplVsOFqtYs0LruBsELc6z7cBkfJR1awdeJxNj/6qgKEwP5FA==} + /@blocksuite/virgo/0.4.0-alpha.3_lit@2.6.1+yjs@13.5.45: + resolution: {integrity: sha512-uEa2bH2XCNI5whF3LUJAOogmv+5gux4m80dge7dXslw+6UfbdS6tDTP268a0k7FCPiV7suAcGbT/y5wZUbJ0ow==} peerDependencies: lit: ^2 yjs: ^13 dependencies: - '@blocksuite/global': 0.4.0-alpha.2_lit@2.6.1 + '@blocksuite/global': 0.4.0-alpha.3_lit@2.6.1 lit: 2.6.1 yjs: 13.5.45 dev: false @@ -12871,6 +12876,13 @@ packages: dependencies: isomorphic.js: 0.2.5 + /lib0/0.2.62: + resolution: {integrity: sha512-DY0G8AaQloUvpiss7EpAo/t4R82b9m/AydbQRNAa9Khssn9oGDJnSN8Q1qQ8u82Wog4iaT1O8yM+DfhzGCrrpQ==} + engines: {node: '>=14'} + dependencies: + isomorphic.js: 0.2.5 + dev: false + /lilconfig/2.0.6: resolution: {integrity: sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==} engines: {node: '>=10'} @@ -13645,7 +13657,7 @@ packages: babel-loader: 8.3.0 clean-webpack-plugin: 4.0.0 globby: 11.1.0 - next: 13.1.0_biqbaboplfbrettd7655fr4n2y + next: 13.1.0_rdilrli7uexa22ralt77ekax24_biqbaboplfbrettd7655fr4n2y terser-webpack-plugin: 5.3.6 workbox-webpack-plugin: 6.5.4 workbox-window: 6.5.4 @@ -13704,7 +13716,7 @@ packages: - babel-plugin-macros dev: false - /next/13.1.0_biqbaboplfbrettd7655fr4n2y: + /next/13.1.0_rdilrli7uexa22ralt77ekax24_biqbaboplfbrettd7655fr4n2y: resolution: {integrity: sha512-lQMZH1V94L5IL/WaihQkTYabSY73aqgrkGPJB5uz+2O3ES4I3losV/maXLY7l7x5e+oNyE9N81upNQ8uRsR5/A==} engines: {node: '>=14.6.0'} hasBin: true @@ -13746,6 +13758,7 @@ packages: transitivePeerDependencies: - '@babel/core' - babel-plugin-macros + patched: true /nice-try/1.0.5: resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} @@ -14972,6 +14985,10 @@ packages: resolution: {integrity: sha512-nCwCZtQPl4EnxJSheHtb067Jo48A6mc8/t7waGSLqXvbE68a5vHBFfMOQPZI7jxjksbDhpfzQta3a3/MoPvKzQ==} dev: false + /quill-cursors/4.0.2: + resolution: {integrity: sha512-/5mEfB6rDXwBy9rt3XieMKmQE8+OMnMBi2DFwea3t06QXH6i/NsICpteEoC++WGkQ/qyurIACUNnY7eBVh4Bmg==} + dev: false + /quill-delta/3.6.3: resolution: {integrity: sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==} engines: {node: '>=0.10'} @@ -18046,7 +18063,7 @@ packages: engines: {node: '>=12'} hasBin: true dependencies: - lib0: 0.2.61 + lib0: 0.2.62 simple-peer: 9.11.1 y-protocols: 1.0.5 optionalDependencies: @@ -18160,8 +18177,8 @@ packages: engines: {node: '>=10'} dev: true - /zod/3.20.2: - resolution: {integrity: sha512-1MzNQdAvO+54H+EaK5YpyEy0T+Ejo/7YLHS93G3RnYWh5gaotGHwGeN/ZO687qEDU2y4CdStQYXVHIgrUl5UVQ==} + /zod/3.20.5: + resolution: {integrity: sha512-BTAAliwfoB9dWf2hC+TXlyWKk/YTqRGZjHQR0WLC2A2pzierWo7KuQ1ebjS4SNaFaxg/lDItzl9/QTgLjcHbgw==} dev: false /zwitch/1.0.5: diff --git a/tests/contact-us.spec.ts b/tests/contact-us.spec.ts index baf972d326..8a0a930565 100644 --- a/tests/contact-us.spec.ts +++ b/tests/contact-us.spec.ts @@ -26,6 +26,7 @@ test.describe('Open contact us', () => { const faqIcon = page.locator('[data-testid=faq-icon]'); const box = await faqIcon.boundingBox(); expect(box?.x).not.toBeUndefined(); + await faqIcon.click(); await page.mouse.move((box?.x ?? 0) + 10, (box?.y ?? 0) + 10); await page.mouse.move((box?.x ?? 0) + 5, (box?.y ?? 0) + 5); diff --git a/tests/shortcuts.spec.ts b/tests/shortcuts.spec.ts index a4a522dcaf..c46f9834f8 100644 --- a/tests/shortcuts.spec.ts +++ b/tests/shortcuts.spec.ts @@ -10,6 +10,7 @@ test.describe('Shortcuts Modal', () => { const box = await faqIcon.boundingBox(); expect(box?.x).not.toBeUndefined(); await page.mouse.move((box?.x ?? 0) + 5, (box?.y ?? 0) + 5); + await faqIcon.click(); const shortcutsIcon = page.locator('[data-testid=shortcuts-icon]'); expect(await shortcutsIcon.isVisible()).toEqual(true);