chore: bump version (#1275)

This commit is contained in:
Himself65
2023-03-02 14:52:41 -06:00
committed by GitHub
parent 67c0d84d97
commit 0507300a29
11 changed files with 1464 additions and 1707 deletions

View File

@@ -21,20 +21,17 @@
"@emotion/react": "^11.10.6", "@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6", "@emotion/styled": "^11.10.6",
"@tauri-apps/api": "^1.2.0", "@tauri-apps/api": "^1.2.0",
"json-schema-to-typescript": "^11.0.2", "json-schema-to-typescript": "^11.0.5",
"lib0": "^0.2.62", "lib0": "^0.2.62",
"next": "13.1.0", "next": "13.1.0",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-is": "^18.2.0",
"react-router": "^6.5.0",
"react-router-dom": "^6.5.0",
"y-protocols": "^1.0.5", "y-protocols": "^1.0.5",
"yjs": "^13.5.47" "yjs": "^13.5.48"
}, },
"devDependencies": { "devDependencies": {
"@tauri-apps/cli": "^1.2.3", "@tauri-apps/cli": "^1.2.3",
"@types/node": "^18.14.0", "@types/node": "^18.14.4",
"@types/react": "^18.0.28", "@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11", "@types/react-dom": "^18.0.11",
"concurrently": "^7.6.0", "concurrently": "^7.6.0",
@@ -42,10 +39,10 @@
"esbuild": "^0.17.8", "esbuild": "^0.17.8",
"lit": "^2.6.1", "lit": "^2.6.1",
"prettier": "2.8.4", "prettier": "2.8.4",
"rimraf": "^4.1.2", "rimraf": "^4.1.3",
"typescript": "^4.9.4", "typescript": "^4.9.5",
"typesync": "^0.10.0", "typesync": "^0.10.0",
"vite": "^4.1.2", "vite": "^4.1.4",
"zx": "^7.1.1" "zx": "^7.2.0"
} }
} }

View File

@@ -1,80 +0,0 @@
import { Modal, ModalWrapper } from '@affine/component';
import { IconButton } from '@affine/component';
import { toast } from '@affine/component';
import { useTranslation } from '@affine/i18n';
import { CloseIcon } from '@blocksuite/icons';
import router from 'next/router';
import { useCallback, useState } from 'react';
import { useGlobalState } from '@/store/app';
import { Content, ContentTitle, Header, StyleButton, StyleTips } from './style';
interface EnableWorkspaceModalProps {
open: boolean;
onClose: () => void;
}
export const EnableWorkspaceModal = ({
open,
onClose,
}: EnableWorkspaceModalProps) => {
const { t } = useTranslation();
const login = useGlobalState(store => store.login);
const user = useGlobalState(store => store.user);
const dataCenter = useGlobalState(store => store.dataCenter);
const currentWorkspace = useGlobalState(
useCallback(store => store.currentDataCenterWorkspace, [])
);
const [loading, setLoading] = useState(false);
return (
<Modal open={open} onClose={onClose} data-testid="logout-modal">
<ModalWrapper width={560} height={292}>
<Header>
<IconButton
onClick={() => {
onClose();
}}
>
<CloseIcon />
</IconButton>
</Header>
<Content>
<ContentTitle>{t('Enable AFFiNE Cloud')}?</ContentTitle>
<StyleTips>{t('Enable AFFiNE Cloud Description')}</StyleTips>
{/* <StyleTips>{t('Retain local cached data')}</StyleTips> */}
<div>
<StyleButton
shape="round"
type="primary"
loading={loading}
onClick={async () => {
setLoading(true);
if (!user) {
await login();
}
if (currentWorkspace) {
const workspace = await dataCenter.enableWorkspaceCloud(
currentWorkspace
);
workspace &&
router.push(`/workspace/${workspace.id}/setting`);
toast(t('Enabled success'));
}
}}
>
{user ? t('Enable') : t('Sign in and Enable')}
</StyleButton>
<StyleButton
shape="round"
onClick={() => {
onClose();
}}
>
{t('Not now')}
</StyleButton>
</div>
</Content>
</ModalWrapper>
</Modal>
);
};

View File

@@ -16,17 +16,17 @@
"@affine/i18n": "workspace:*", "@affine/i18n": "workspace:*",
"@blocksuite/blocks": "0.5.0-20230302142916-8e090d3", "@blocksuite/blocks": "0.5.0-20230302142916-8e090d3",
"@blocksuite/editor": "0.5.0-20230302142916-8e090d3", "@blocksuite/editor": "0.5.0-20230302142916-8e090d3",
"@blocksuite/icons": "^2.0.17", "@blocksuite/icons": "2.0.17",
"@blocksuite/react": "0.5.0-20230302142916-8e090d3", "@blocksuite/react": "0.5.0-20230302142916-8e090d3",
"@blocksuite/store": "0.5.0-20230302142916-8e090d3", "@blocksuite/store": "0.5.0-20230302142916-8e090d3",
"@emotion/cache": "^11.10.5", "@emotion/cache": "^11.10.5",
"@emotion/css": "^11.10.6", "@emotion/css": "^11.10.6",
"@emotion/react": "^11.10.6", "@emotion/react": "^11.10.6",
"@mui/material": "^5.11.10", "@mui/material": "^5.11.11",
"cmdk": "^0.1.22", "cmdk": "^0.1.22",
"css-spring": "^4.1.0", "css-spring": "^4.1.0",
"dayjs": "^1.11.7", "dayjs": "^1.11.7",
"jotai": "^2.0.2", "jotai": "^2.0.3",
"jotai-devtools": "^0.2.0", "jotai-devtools": "^0.2.0",
"lit": "^2.6.1", "lit": "^2.6.1",
"react": "^18.2.0", "react": "^18.2.0",
@@ -35,7 +35,7 @@
"swr": "^2.0.4", "swr": "^2.0.4",
"y-indexeddb": "^9.0.9", "y-indexeddb": "^9.0.9",
"y-protocols": "^1.0.5", "y-protocols": "^1.0.5",
"yjs": "^13.5.47", "yjs": "^13.5.48",
"zod": "^3.20.6" "zod": "^3.20.6"
}, },
"devDependencies": { "devDependencies": {
@@ -47,7 +47,7 @@
"@types/react-dom": "^18.0.11", "@types/react-dom": "^18.0.11",
"@types/webpack-env": "^1.18.0", "@types/webpack-env": "^1.18.0",
"dotenv": "^16.0.3", "dotenv": "^16.0.3",
"eslint-config-next": "^13.2.2", "eslint-config-next": "^13.2.3",
"next": "^13.2.2", "next": "^13.2.2",
"next-debug-local": "^0.1.5", "next-debug-local": "^0.1.5",
"next-router-mock": "^0.9.2", "next-router-mock": "^0.9.2",

View File

@@ -6,6 +6,10 @@ const minimumChromeVersion = 102;
export const shouldShowWarning = () => { export const shouldShowWarning = () => {
const env = getEnvironment(); const env = getEnvironment();
if (env.isDesktop) {
// even though desktop have compatibility issues, we don't want to show the warning
return false;
}
if (!env.isBrowser) { if (!env.isBrowser) {
// disable in SSR // disable in SSR
return false; return false;

View File

@@ -29,17 +29,17 @@
}, },
"devDependencies": { "devDependencies": {
"@changesets/cli": "^2.26.0", "@changesets/cli": "^2.26.0",
"@playwright/test": "^1.30.0", "@playwright/test": "^1.31.1",
"@testing-library/react": "^14.0.0", "@testing-library/react": "^14.0.0",
"@types/eslint": "^8.21.1", "@types/eslint": "^8.21.1",
"@types/node": "^18.14.0", "@types/node": "^18.14.4",
"@typescript-eslint/eslint-plugin": "^5.52.0", "@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.52.0", "@typescript-eslint/parser": "^5.54.0",
"@vitejs/plugin-react": "^3.1.0", "@vitejs/plugin-react": "^3.1.0",
"@vitest/coverage-istanbul": "^0.28.5", "@vitest/coverage-istanbul": "^0.28.5",
"concurrently": "^7.6.0", "concurrently": "^7.6.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint": "^8.34.0", "eslint": "^8.35.0",
"eslint-config-prettier": "^8.6.0", "eslint-config-prettier": "^8.6.0",
"eslint-plugin-import": "^2.27.5", "eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-prettier": "^4.2.1",
@@ -48,7 +48,7 @@
"eslint-plugin-unused-imports": "^2.0.0", "eslint-plugin-unused-imports": "^2.0.0",
"fake-indexeddb": "4.0.1", "fake-indexeddb": "4.0.1",
"got": "^12.5.3", "got": "^12.5.3",
"happy-dom": "^8.7.1", "happy-dom": "^8.9.0",
"husky": "^8.0.3", "husky": "^8.0.3",
"lint-staged": "^13.1.2", "lint-staged": "^13.1.2",
"nyc": "^15.1.0", "nyc": "^15.1.0",

View File

@@ -18,31 +18,30 @@
"@blocksuite/store": "0.5.0-20230302142916-8e090d3", "@blocksuite/store": "0.5.0-20230302142916-8e090d3",
"@emotion/react": "^11.10.6", "@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6", "@emotion/styled": "^11.10.6",
"@mui/base": "5.0.0-alpha.118", "@mui/base": "5.0.0-alpha.119",
"@mui/icons-material": "^5.11.9", "@mui/icons-material": "^5.11.11",
"@mui/material": "^5.11.9", "@mui/material": "^5.11.11",
"lit": "^2.6.1", "lit": "^2.6.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0" "react-dom": "^18.2.0"
}, },
"devDependencies": { "devDependencies": {
"@storybook/addon-actions": "^7.0.0-beta.46", "@storybook/addon-actions": "7.0.0-beta.60",
"@storybook/addon-essentials": "^7.0.0-beta.46", "@storybook/addon-essentials": "7.0.0-beta.60",
"@storybook/addon-links": "^7.0.0-beta.46", "@storybook/addon-links": "7.0.0-beta.60",
"@storybook/builder-vite": "^7.0.0-beta.46", "@storybook/builder-vite": "7.0.0-beta.60",
"@storybook/react": "^7.0.0-beta.46", "@storybook/react": "7.0.0-beta.60",
"@storybook/react-vite": "7.0.0-beta.46", "@storybook/react-vite": "7.0.0-beta.60",
"@swc/core": "^1.3.35", "@swc/core": "^1.3.37",
"@types/react": "^18.0.28", "@types/react": "^18.0.28",
"@types/react-dom": "18.0.11", "@types/react-dom": "18.0.11",
"@vitejs/plugin-react": "^3.1.0", "@vitejs/plugin-react": "^3.1.0",
"storybook": "^7.0.0-beta.46", "storybook": "7.0.0-beta.60",
"storybook-dark-mode-v7": "3.0.0-alpha.0", "storybook-dark-mode-v7": "3.0.0-alpha.0",
"swc": "^1.0.11", "swc": "^1.0.11",
"swc-loader": "^0.2.3", "swc-loader": "^0.2.3",
"typescript": "^4.9.5", "typescript": "^4.9.5",
"vite": "^4.1.2", "vite": "^4.1.2",
"webpack": "^5.75.0", "yjs": "^13.5.48"
"yjs": "^13.5.47"
} }
} }

View File

@@ -26,6 +26,6 @@
"lib0": "^0.2.62", "lib0": "^0.2.62",
"lit": "^2.6.1", "lit": "^2.6.1",
"y-protocols": "^1.0.5", "y-protocols": "^1.0.5",
"yjs": "^13.5.47" "yjs": "^13.5.48"
} }
} }

View File

@@ -4,6 +4,8 @@
"main": "./src/index.ts", "main": "./src/index.ts",
"devDependencies": { "devDependencies": {
"next": "^13.2.3", "next": "^13.2.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"zod": "^3.20.6" "zod": "^3.20.6"
}, },
"dependencies": { "dependencies": {

View File

@@ -5,6 +5,7 @@ import { z } from 'zod';
import { getUaHelper } from './ua-helper'; import { getUaHelper } from './ua-helper';
type BrowserBase = { type BrowserBase = {
isDesktop: false;
isBrowser: true; isBrowser: true;
isServer: false; isServer: false;
isDebug: boolean; isDebug: boolean;
@@ -33,12 +34,20 @@ type ChromeBrowser = BrowserBase & {
type Browser = NonChromeBrowser | ChromeBrowser; type Browser = NonChromeBrowser | ChromeBrowser;
type Server = { type Server = {
isDesktop: false;
isBrowser: false; isBrowser: false;
isServer: true; isServer: true;
isDebug: boolean; isDebug: boolean;
}; };
export type Environment = Browser | Server; type Desktop = Browser & {
isDesktop: true;
isBrowser: true;
isServer: false;
isDebug: boolean;
};
export type Environment = Browser | Server | Desktop;
let environment: Environment | null = null; let environment: Environment | null = null;
@@ -49,6 +58,7 @@ export function getEnvironment() {
const isDebug = process.env.NODE_ENV === 'development'; const isDebug = process.env.NODE_ENV === 'development';
if (typeof window === 'undefined') { if (typeof window === 'undefined') {
environment = { environment = {
isDesktop: false,
isBrowser: false, isBrowser: false,
isServer: true, isServer: true,
isDebug, isDebug,
@@ -56,6 +66,7 @@ export function getEnvironment() {
} else { } else {
const uaHelper = getUaHelper(); const uaHelper = getUaHelper();
environment = { environment = {
isDesktop: window.CLIENT_APP,
isBrowser: true, isBrowser: true,
isServer: false, isServer: false,
isDebug, isDebug,

View File

@@ -32,11 +32,12 @@
"react-i18next": "^12.2.0" "react-i18next": "^12.2.0"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^18.14.2", "@types/node": "^18.14.4",
"@types/prettier": "^2.7.2", "@types/prettier": "^2.7.2",
"next": "^13.2.3",
"prettier": "^2.8.4", "prettier": "^2.8.4",
"react-dom": "^18.2.0",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "^4.9.5", "typescript": "^4.9.5"
"next": "^13.2.3"
} }
} }

2999
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff