Compare commits

..

27 Commits

Author SHA1 Message Date
LongYinan
d7464b9fad v0.8.4 2023-09-26 15:58:55 +08:00
LongYinan
2cc09c205d Merge pull request #4473 from toeverything/release-0.8.4
0.8.4 Release proposal
2023-09-26 02:58:00 -05:00
Alex Yang
80d1b7ff2a ci: workflow dispatch 2023-09-23 18:34:31 -07:00
Alex Yang
10de960b7f chore: bump version (#4352) 2023-09-23 18:12:38 -07:00
Peng Xiao
4e5d426edf fix: disable set-db-location step (#4263) 2023-09-23 18:12:37 -07:00
Peng Xiao
fd05bb3e39 fix: better transition (#4267) 2023-09-23 18:12:37 -07:00
Peng Xiao
e8e6f0ee95 fix: disable simutanous updater download (#4254) 2023-09-23 18:12:37 -07:00
Alex Yang
d703f6e138 chore(i18n): fix nx config (#4249) 2023-09-23 18:12:37 -07:00
Peng Xiao
ac653257a3 fix: workspace list dnd issues (#4219)
Co-authored-by: Alex Yang <himself65@outlook.com>
2023-09-23 18:12:37 -07:00
JimmFly
481e8891b0 style: add hover style to the setting button in workspace card (#4193) 2023-09-23 18:12:36 -07:00
Peng Xiao
c7f14cd48a fix: sidebar ui fix (#4187) 2023-09-23 18:12:36 -07:00
3720
2d2dafdd26 fix: filter of tags does not work (#4138) 2023-09-23 18:12:36 -07:00
Whitewater
017393e030 fix(core): sort tags by count (#4122) 2023-09-23 18:12:36 -07:00
Yifeng Wang
e089d7f465 fix: preload typo (#4096) 2023-09-23 18:12:36 -07:00
KaranPant
3d337b121b fix: show border around pagetitle when renaming (#4080) 2023-09-23 18:12:36 -07:00
Pranay Prajapati
ee2841a569 fix: corrected the preposition in "Save As New Collection" (#4070) 2023-09-23 18:12:35 -07:00
Qi
3b52acc269 feat: icon not align center in filter button (#3938) 2023-09-23 18:12:35 -07:00
Garfield Lee
cf8fe4288f chore: modify code style (#3914) 2023-09-23 18:12:35 -07:00
JimmFly
af3abe8a68 fix: the web version should not display client borders (#4040)
Co-authored-by: Alex Yang <himself65@outlook.com>
2023-09-23 18:12:35 -07:00
Peng Xiao
de0e3ab988 fix: electron white screen (#4048) 2023-09-23 18:12:35 -07:00
Qi
852a1447de fix: shortcut key style (#4072) 2023-09-23 18:08:05 -07:00
Alex Yang
c78e7983f3 v0.8.3 2023-08-31 07:47:10 -05:00
Alex Yang
10aaaeb1d7 v0.8.3-beta.0 2023-08-31 07:45:27 -05:00
Alex Yang
13323bcbc0 chore: bump version 2023-08-30 13:06:58 -05:00
Alex Yang
06455bee5e v0.8.2 2023-08-30 00:12:35 -05:00
Alex Yang
aa40d4be8f v0.8.2-beta.0 2023-08-30 00:11:41 -05:00
Alex Yang
448496c245 fix(core): incorrect blocksuite data format (#4039) 2023-08-30 00:10:12 -05:00
77 changed files with 578 additions and 458 deletions

View File

@@ -1,6 +1,7 @@
name: Build Canary Desktop App on Staging Branch
on:
workflow_dispatch:
push:
branches:
# 0.6.x-staging

View File

@@ -2,7 +2,7 @@
"name": "@affine/core",
"type": "module",
"private": true,
"version": "0.8.1",
"version": "0.8.4",
"scripts": {
"build": "yarn -T run build-core",
"dev": "yarn -T run dev-core",
@@ -24,13 +24,13 @@
"@affine/jotai": "workspace:*",
"@affine/templates": "workspace:*",
"@affine/workspace": "workspace:*",
"@blocksuite/block-std": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/blocks": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/editor": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/global": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/block-std": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/blocks": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/editor": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/global": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/icons": "^2.1.31",
"@blocksuite/lit": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/store": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/lit": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/store": "0.0.0-20230830111255-92eab248-nightly",
"@dnd-kit/core": "^6.0.8",
"@dnd-kit/sortable": "^7.0.2",
"@emotion/cache": "^11.11.0",
@@ -60,7 +60,7 @@
"react-resizable-panels": "^0.0.55",
"react-router-dom": "^6.15.0",
"rxjs": "^7.8.1",
"ses": "^0.18.7",
"ses": "^0.18.8",
"swr": "2.2.1",
"y-protocols": "^1.0.5",
"yjs": "^13.6.7",

View File

@@ -1,4 +1,3 @@
import { isDesktop } from '@affine/env/constant';
import { atom, useAtom } from 'jotai';
import { atomWithStorage } from 'jotai/utils';
@@ -50,7 +49,7 @@ export const fontStyleOptions = [
}[];
const appSettingBaseAtom = atomWithStorage<AppSetting>('affine-settings', {
clientBorder: isDesktop,
clientBorder: environment.isDesktop && globalThis.platform !== 'win32',
fullWidthLayout: false,
windowFrameStyle: 'frameless',
fontStyle: 'Sans',

View File

@@ -281,11 +281,7 @@ export const CreateWorkspaceModal = ({
console.error(err);
});
} else if (mode === 'new') {
setStep(
environment.isDesktop && runtimeConfig.enableSQLiteProvider
? 'set-db-location'
: 'name-workspace'
);
setStep('name-workspace');
} else {
setStep(undefined);
}

View File

@@ -24,11 +24,8 @@ export const shortcutKey = style({
alignItems: 'center',
justifyContent: 'center',
padding: '0 6px',
border: '1px solid var(--affine-border-color)',
borderRadius: '4px',
background: 'var(--affine-background-tertiary-color)',
boxShadow:
'0px 6px 4px 0px rgba(255, 255, 255, 0.24) inset, 0px 0px 0px 0.5px rgba(0, 0, 0, 0.10) inset',
fontSize: 'var(--affine-font-xs)',
selectors: {
'&:not(:last-of-type)': {

View File

@@ -25,6 +25,15 @@ export const titleInput = style({
margin: 'auto',
width: '100%',
height: '100%',
selectors: {
'&:focus': {
border: '1px solid var(--affine-black-10)',
borderRadius: '8px',
height: '32px',
padding: '6px 8px',
},
},
});
export const shadowTitle = style({
visibility: 'hidden',

View File

@@ -146,9 +146,11 @@ export const BlockSuitePageList = ({
const tagOptionMap = useMemo(
() =>
Object.fromEntries(
blockSuiteWorkspace.meta.properties.tags.options.map(v => [v.id, v])
(
blockSuiteWorkspace.meta.properties.tags ?? { options: [] }
).options.map(v => [v.id, v])
),
[blockSuiteWorkspace.meta.properties.tags.options]
[blockSuiteWorkspace.meta.properties.tags]
);
const list = useMemo(
() =>

View File

@@ -51,7 +51,7 @@ export const AddCollectionButton = ({
onConfirm={setting.saveCollection}
open={show}
onClose={() => showUpdateCollection(false)}
title={t['Save As New Collection']()}
title={t['Save as New Collection']()}
init={defaultCollection}
/>
</>

View File

@@ -33,8 +33,9 @@ import { usePassiveWorkspaceEffect } from '@toeverything/infra/__internal__/reac
import { currentWorkspaceIdAtom } from '@toeverything/infra/atom';
import { useAtom, useAtomValue, useSetAtom } from 'jotai';
import type { PropsWithChildren, ReactElement } from 'react';
import { lazy, Suspense, useCallback, useMemo } from 'react';
import { lazy, Suspense, useCallback, useEffect, useMemo } from 'react';
import { useLocation, useParams } from 'react-router-dom';
import { Map as YMap } from 'yjs';
import { WorkspaceAdapters } from '../adapters/workspace';
import {
@@ -150,6 +151,23 @@ export const WorkspaceLayoutInner = ({ children }: PropsWithChildren) => {
const [currentWorkspace] = useCurrentWorkspace();
const { openPage } = useNavigateHelper();
useEffect(() => {
// hotfix for blockVersions
// this is a mistake in the
// 0.8.0 ~ 0.8.1
// 0.8.0-beta.0 ~ 0.8.0-beta.3
// 0.9.0-canary.0 ~ 0.9.0-canary.3
const meta = currentWorkspace.blockSuiteWorkspace.doc.getMap('meta');
const blockVersions = meta.get('blockVersions');
if (!(blockVersions instanceof YMap)) {
console.log('fixing blockVersions');
meta.set(
'blockVersions',
new YMap(Object.entries(blockVersions as Record<string, number>))
);
}
}, [currentWorkspace.blockSuiteWorkspace.doc]);
usePassiveWorkspaceEffect(currentWorkspace.blockSuiteWorkspace);
const [, setOpenWorkspacesModal] = useAtom(openWorkspacesModalAtom);

View File

@@ -23,6 +23,7 @@ export const loader: LoaderFunction = async () => {
const target = (lastId && meta.find(({ id }) => id === lastId)) || meta.at(0);
if (target) {
const targetWorkspace = getWorkspace(target.id);
const nonTrashPages = targetWorkspace.meta.pageMetas.filter(
({ trash }) => !trash
);

View File

@@ -8,7 +8,13 @@ import {
} from '@toeverything/infra/atom';
import { useAtom, useAtomValue, useSetAtom } from 'jotai';
import type { ReactElement } from 'react';
import { lazy, Suspense, useCallback, useTransition } from 'react';
import {
lazy,
startTransition,
Suspense,
useCallback,
useTransition,
} from 'react';
import type { SettingAtom } from '../atoms';
import {
@@ -119,13 +125,14 @@ export const AllWorkspaceModals = (): ReactElement => {
);
const { jumpToSubPath } = useNavigateHelper();
const workspaces = useAtomValue(rootWorkspacesMetadataAtom);
const workspaces = useAtomValue(rootWorkspacesMetadataAtom, {
delay: 0,
});
const setWorkspaces = useSetAtom(rootWorkspacesMetadataAtom);
const [currentWorkspaceId, setCurrentWorkspaceId] = useAtom(
currentWorkspaceIdAtom
);
const setCurrentPageId = useSetAtom(currentPageIdAtom);
const [isPending, startTransition] = useTransition();
const [, startCloseTransition] = useTransition();
const [, setOpenSettingModalAtom] = useAtom(openSettingModalAtom);
@@ -146,7 +153,6 @@ export const AllWorkspaceModals = (): ReactElement => {
<>
<Suspense>
<WorkspaceListModal
disabled={isPending}
workspaces={workspaces}
currentWorkspaceId={currentWorkspaceId}
open={

View File

@@ -1,6 +1,6 @@
{
"name": "@affine/docs",
"version": "0.8.1",
"version": "0.8.4",
"type": "module",
"private": true,
"scripts": {
@@ -10,12 +10,12 @@
},
"dependencies": {
"@affine/component": "workspace:*",
"@blocksuite/block-std": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/blocks": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/editor": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/global": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/lit": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/store": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/block-std": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/blocks": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/editor": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/global": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/lit": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/store": "0.0.0-20230830111255-92eab248-nightly",
"express": "^4.18.2",
"jotai": "^2.3.1",
"react": "18.3.0-canary-7118f5dd7-20230705",

View File

@@ -154,9 +154,6 @@ test('windows only check', async ({ page }) => {
test('delete workspace', async ({ page }) => {
await page.getByTestId('current-workspace').click();
await page.getByTestId('new-workspace').click();
await page.getByTestId('create-workspace-default-location-button').click({
delay: 100,
});
await page.getByTestId('create-workspace-input').type('Delete Me', {
delay: 100,
});

View File

@@ -12,6 +12,8 @@ import fs from 'fs-extra';
import type { ElectronApplication, Page } from 'playwright';
import { _electron as electron } from 'playwright';
import { removeWithRetry } from '../tests/utils';
function generateUUID() {
return crypto.randomUUID();
}
@@ -102,7 +104,7 @@ export const test = base.extend<{
});
await use(electronApp);
try {
await fs.rm(clonedDist, { recursive: true, force: true });
await removeWithRetry(clonedDist);
} catch (error) {
console.log(error);
}

View File

@@ -1,11 +0,0 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "./lib",
"baseUrl": ".",
"target": "ESNext"
},
"references": [{ "path": "../../../tests/kit" }],
"include": ["**.spec.ts", "**.test.ts", "fixture.ts"],
"exclude": ["lib"]
}

View File

@@ -113,7 +113,6 @@ module.exports = {
: undefined,
// We need the following line for updater
extraResource: ['./resources/app-update.yml'],
ignore: ['e2e', 'tests'],
},
makers,
hooks: {

View File

@@ -1,7 +1,7 @@
{
"name": "@affine/electron",
"private": true,
"version": "0.8.1",
"version": "0.8.4",
"author": "affine",
"repository": {
"url": "https://github.com/toeverything/AFFiNE",
@@ -29,10 +29,10 @@
"@affine/env": "workspace:*",
"@affine/native": "workspace:*",
"@affine/sdk": "workspace:*",
"@blocksuite/blocks": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/editor": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/lit": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/store": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/blocks": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/editor": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/lit": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/store": "0.0.0-20230830111255-92eab248-nightly",
"@electron-forge/cli": "^6.4.0",
"@electron-forge/core": "^6.4.0",
"@electron-forge/core-utils": "^6.4.0",

View File

@@ -50,9 +50,11 @@ export const migrateToLatestDatabase = async (path: string) => {
const update = (
await connection.getUpdates(isRoot ? undefined : doc.guid)
).map(update => update.data);
// Buffer[] -> Uint8Array
const data = new Uint8Array(Buffer.concat(update).buffer);
applyUpdate(doc, data);
// Buffer[] -> Uint8Array[]
const data = update.map(update => new Uint8Array(update));
data.forEach(data => {
applyUpdate(doc, data);
});
// trigger data manually
if (isRoot) {
doc.getMap('meta');

View File

@@ -70,10 +70,13 @@ export const registerUpdater = async () => {
autoUpdater.on('checking-for-update', () => {
logger.info('Checking for update');
});
let downloading = false;
autoUpdater.on('update-available', info => {
logger.info('Update available', info);
if (allowAutoUpdate) {
if (allowAutoUpdate && !downloading) {
downloading = true;
autoUpdater?.downloadUpdate().catch(e => {
downloading = false;
logger.error('Failed to download update', e);
});
logger.info('Update available, downloading...', info);
@@ -91,6 +94,7 @@ export const registerUpdater = async () => {
updaterSubjects.downloadProgress.next(e.percent);
});
autoUpdater.on('update-downloaded', e => {
downloading = false;
updaterSubjects.updateReady.next({
version: e.version,
allowAutoUpdate,

View File

@@ -33,9 +33,6 @@
{
"path": "./tsconfig.node.json"
},
{
"path": "./e2e/tsconfig.json"
},
{ "path": "../../tests/kit" }
],
"ts-node": {

View File

@@ -3,7 +3,7 @@
"compilerOptions": {
"composite": true
},
"include": ["**/__tests__/**/*", "./tests"],
"include": ["**/__tests__/**/*", "./tests", "./e2e"],
"references": [
{
"path": "./tsconfig.json"

View File

@@ -1,7 +1,7 @@
{
"name": "@affine/prototype",
"private": true,
"version": "0.8.1",
"version": "0.8.4",
"type": "module",
"scripts": {
"dev": "vite --host --port 3003",
@@ -18,13 +18,13 @@
"@affine/jotai": "workspace:*",
"@affine/templates": "workspace:*",
"@affine/workspace": "workspace:*",
"@blocksuite/block-std": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/blocks": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/editor": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/global": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/block-std": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/blocks": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/editor": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/global": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/icons": "^2.1.31",
"@blocksuite/lit": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/store": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/lit": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/store": "0.0.0-20230830111255-92eab248-nightly",
"@toeverything/hooks": "workspace:*",
"@toeverything/y-indexeddb": "workspace:*",
"react": "^18.2.0",

View File

@@ -1,7 +1,7 @@
{
"name": "@affine/server",
"private": true,
"version": "0.8.1",
"version": "0.8.4",
"description": "Affine Node.js server",
"type": "module",
"bin": {

View File

@@ -25,19 +25,19 @@
"concurrently": "^8.2.0",
"jest-mock": "^29.6.2",
"serve": "^14.2.0",
"ses": "^0.18.7",
"ses": "^0.18.8",
"storybook": "^7.3.1",
"storybook-dark-mode": "^3.0.1",
"wait-on": "^7.0.1"
},
"devDependencies": {
"@blocksuite/block-std": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/blocks": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/editor": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/global": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/block-std": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/blocks": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/editor": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/global": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/icons": "^2.1.31",
"@blocksuite/lit": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/store": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/lit": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/store": "0.0.0-20230830111255-92eab248-nightly",
"chromatic": "^6.22.0",
"react": "18.2.0",
"react-dom": "18.2.0",
@@ -52,5 +52,5 @@
"@blocksuite/lit": "*",
"@blocksuite/store": "*"
},
"version": "0.8.1"
"version": "0.8.4"
}

View File

@@ -32,8 +32,7 @@
"{projectRoot}/dist",
"{projectRoot}/build",
"{projectRoot}/out",
"{projectRoot}/storybook-static",
"{workspaceRoot}/packages/i18n/src/i18n-generated.ts"
"{projectRoot}/storybook-static"
],
"inputs": [
"{workspaceRoot}/infra/**/*",

View File

@@ -1,6 +1,6 @@
{
"name": "@affine/monorepo",
"version": "0.8.1",
"version": "0.8.4",
"private": true,
"author": "toeverything",
"license": "MPL-2.0",

View File

@@ -7,5 +7,5 @@
"@affine/env": "workspace:*",
"@toeverything/infra": "workspace:*"
},
"version": "0.8.1"
"version": "0.8.4"
}

View File

@@ -20,5 +20,5 @@
"peerDependencies": {
"ts-node": "*"
},
"version": "0.8.1"
"version": "0.8.4"
}

View File

@@ -21,6 +21,7 @@
"@affine/jotai": "workspace:*",
"@affine/workspace": "workspace:*",
"@dnd-kit/core": "^6.0.8",
"@dnd-kit/modifiers": "^6.0.1",
"@dnd-kit/sortable": "^7.0.2",
"@emotion/cache": "^11.11.0",
"@emotion/react": "^11.11.1",
@@ -51,12 +52,12 @@
"rxjs": "^7.8.1"
},
"devDependencies": {
"@blocksuite/blocks": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/editor": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/global": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/blocks": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/editor": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/global": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/icons": "^2.1.31",
"@blocksuite/lit": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/store": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/lit": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/store": "0.0.0-20230830111255-92eab248-nightly",
"@types/react": "^18.2.20",
"@types/react-datepicker": "^4.15.0",
"@types/react-dnd": "^3.0.2",
@@ -66,5 +67,5 @@
"vite": "^4.4.9",
"yjs": "^13.6.7"
},
"version": "0.8.1"
"version": "0.8.4"
}

View File

@@ -35,7 +35,7 @@ export const navWrapperStyle = style({
'&[data-enable-animation="true"]': {
transition: 'margin-left .3s, width .3s',
},
'&.has-background': {
'&[data-is-floating="false"].has-background': {
backgroundColor: 'var(--affine-white-60)',
borderRight: '1px solid var(--affine-border-color)',
},

View File

@@ -2,6 +2,7 @@ import { Skeleton } from '@mui/material';
import { assignInlineVars } from '@vanilla-extract/dynamic';
import clsx from 'clsx';
import { useAtom, useAtomValue } from 'jotai';
import debounce from 'lodash/debounce';
import type { PropsWithChildren, ReactElement } from 'react';
import { useEffect, useRef, useState } from 'react';
@@ -77,10 +78,10 @@ export function AppSidebar(props: AppSidebarProps): ReactElement {
setAppSidebarFloating(isFloating && !!open);
}
onResize();
window.addEventListener('resize', onResize);
const dOnResize = debounce(onResize, 50);
window.addEventListener('resize', dOnResize);
return () => {
window.removeEventListener('resize', onResize);
window.removeEventListener('resize', dOnResize);
};
}, [appSidebarWidth, open, setAppSidebarFloating, setOpen]);

View File

@@ -47,7 +47,6 @@ export const StyledCard = styled('div')<{
borderRadius: '12px',
border: `1px solid ${borderColor}`,
...displayFlex('flex-start', 'flex-start'),
marginBottom: '12px',
transition: 'background .2s',
alignItems: 'center',
position: 'relative',
@@ -62,6 +61,12 @@ export const StyledCard = styled('div')<{
'.setting-entry': {
opacity: 1,
pointerEvents: 'auto',
backgroundColor: 'var(--affine-white-30)',
boxShadow: 'var(--affine-shadow-1)',
':hover': {
background:
'linear-gradient(0deg, var(--affine-hover-color) 0%, var(--affine-hover-color) 100%), var(--affine-white-30)',
},
},
},
'@media (max-width: 720px)': {

View File

@@ -63,9 +63,7 @@ export const Condition = ({
<div className={styles.filterTypeIconStyle}>
{variableDefineMap[ast.left.name].icon}
</div>
<div>
<FilterTag name={ast.left.name} />
</div>
<FilterTag name={ast.left.name} />
</div>
</Menu>
<Menu

View File

@@ -53,6 +53,8 @@ export const switchStyle = style({
color: 'var(--affine-text-secondary-color)',
padding: '2px 4px',
transition: 'all 0.15s ease-in-out',
display: 'flex',
alignItems: 'center',
':hover': {
cursor: 'pointer',
background: 'var(--affine-hover-color)',
@@ -62,6 +64,7 @@ export const switchStyle = style({
export const filterTypeStyle = style({
fontSize: 'var(--affine-font-sm)',
display: 'flex',
alignItems: 'center',
padding: '2px 4px',
transition: 'all 0.15s ease-in-out',
marginRight: '6px',
@@ -76,5 +79,6 @@ export const filterTypeIconStyle = style({
marginRight: '6px',
padding: '1px 0',
display: 'flex',
alignItems: 'center',
color: 'var(--affine-icon-color)',
});

View File

@@ -41,7 +41,7 @@ export const variableDefineMap = {
icon: <FavoriteIcon />,
},
Tags: {
type: meta => tArray(tTag.create({ tags: meta.tags.options })),
type: meta => tArray(tTag.create({ tags: meta.tags?.options ?? [] })),
icon: <TagsIcon />,
},
// Imported: {

View File

@@ -42,9 +42,15 @@ export const createDefaultFilter = (
}
return {
type: 'filter',
left: { type: 'ref', name: variable.name },
left: {
type: 'ref',
name: variable.name,
},
funcName: data.name,
args: data.defaultArgs().map(value => ({ type: 'literal', value })),
args: data.defaultArgs().map(value => ({
type: 'literal',
value,
})),
};
};
@@ -137,7 +143,10 @@ filterMatcher.register(
);
filterMatcher.register(
tFunction({ args: [tDate.create(), tDate.create()], rt: tBoolean.create() }),
tFunction({
args: [tDate.create(), tDate.create()],
rt: tBoolean.create(),
}),
{
name: 'after',
defaultArgs: () => {
@@ -153,7 +162,10 @@ filterMatcher.register(
);
filterMatcher.register(
tFunction({ args: [tDate.create(), tDate.create()], rt: tBoolean.create() }),
tFunction({
args: [tDate.create(), tDate.create()],
rt: tBoolean.create(),
}),
{
name: 'before',
defaultArgs: () => [dayjs().endOf('day').valueOf()],
@@ -165,31 +177,35 @@ filterMatcher.register(
},
}
);
const safeArray = (arr: unknown): LiteralValue[] => {
return Array.isArray(arr) ? arr : [];
};
filterMatcher.register(
tFunction({ args: [tArray(tTag.create())], rt: tBoolean.create() }),
tFunction({
args: [tArray(tTag.create())],
rt: tBoolean.create(),
}),
{
name: 'is not empty',
defaultArgs: () => [],
impl: tags => {
if (Array.isArray(tags)) {
return tags.length > 0;
}
return true;
const safeTags = safeArray(tags);
return safeTags.length > 0;
},
}
);
filterMatcher.register(
tFunction({ args: [tArray(tTag.create())], rt: tBoolean.create() }),
tFunction({
args: [tArray(tTag.create())],
rt: tBoolean.create(),
}),
{
name: 'is empty',
defaultArgs: () => [],
impl: tags => {
if (Array.isArray(tags)) {
return tags.length == 0;
}
return true;
const safeTags = safeArray(tags);
return safeTags.length == 0;
},
}
);
@@ -204,10 +220,11 @@ filterMatcher.register(
name: 'contains all',
defaultArgs: () => [],
impl: (tags, target) => {
if (Array.isArray(tags) && Array.isArray(target)) {
return target.every(id => tags.includes(id));
if (!Array.isArray(target)) {
return true;
}
return true;
const safeTags = safeArray(tags);
return target.every(id => safeTags.includes(id));
},
}
);
@@ -222,10 +239,11 @@ filterMatcher.register(
name: 'contains one of',
defaultArgs: () => [],
impl: (tags, target) => {
if (Array.isArray(tags) && Array.isArray(target)) {
return target.some(id => tags.includes(id));
if (!Array.isArray(target)) {
return true;
}
return true;
const safeTags = safeArray(tags);
return target.some(id => safeTags.includes(id));
},
}
);
@@ -240,10 +258,11 @@ filterMatcher.register(
name: 'does not contains all',
defaultArgs: () => [],
impl: (tags, target) => {
if (Array.isArray(tags) && Array.isArray(target)) {
return !target.every(id => tags.includes(id));
if (!Array.isArray(target)) {
return true;
}
return true;
const safeTags = safeArray(tags);
return !target.every(id => safeTags.includes(id));
},
}
);
@@ -258,10 +277,11 @@ filterMatcher.register(
name: 'does not contains one of',
defaultArgs: () => [],
impl: (tags, target) => {
if (Array.isArray(tags) && Array.isArray(target)) {
return !target.some(id => tags.includes(id));
if (!Array.isArray(target)) {
return true;
}
return true;
const safeTags = safeArray(tags);
return !target.some(id => safeTags.includes(id));
},
}
);

View File

@@ -1,19 +1,25 @@
import { useState } from 'react';
type SorterConfig<T> = {
type SorterConfig<
T extends Record<string | number | symbol, unknown> = Record<
string | number | symbol,
unknown
>,
> = {
data: T[];
key: keyof T;
order: 'asc' | 'desc' | 'none';
sortingFn?: (
ctx: {
key: keyof T;
order: 'asc' | 'desc';
},
a: T,
b: T
) => number;
};
const defaultSortingFn = <T extends Record<keyof any, unknown>>(
ctx: {
key: keyof T;
order: 'asc' | 'desc';
},
a: T,
b: T
) => {
const defaultSortingFn: SorterConfig['sortingFn'] = (ctx, a, b) => {
const valA = a[ctx.key];
const valB = b[ctx.key];
const revert = ctx.order === 'desc';
@@ -33,6 +39,10 @@ const defaultSortingFn = <T extends Record<keyof any, unknown>>(
if (!valB) {
return 1 * revertSymbol;
}
if (Array.isArray(valA) && Array.isArray(valB)) {
return (valA.length - valB.length) * revertSymbol;
}
console.warn(
'Unsupported sorting type! Please use custom sorting function.',
valA,
@@ -43,6 +53,7 @@ const defaultSortingFn = <T extends Record<keyof any, unknown>>(
export const useSorter = <T extends Record<keyof any, unknown>>({
data,
sortingFn = defaultSortingFn,
...defaultSorter
}: SorterConfig<T> & { order: 'asc' | 'desc' }) => {
const [sorter, setSorter] = useState<Omit<SorterConfig<T>, 'data'>>({
@@ -60,9 +71,8 @@ export const useSorter = <T extends Record<keyof any, unknown>>({
key: sorter.key,
order: sorter.order,
};
// TODO supports custom sorting function
const sortingFn = (a: T, b: T) => defaultSortingFn(sortCtx, a, b);
const sortedData = data.sort(sortingFn);
const compareFn = (a: T, b: T) => sortingFn(sortCtx, a, b);
const sortedData = data.sort(compareFn);
const shiftOrder = (key?: keyof T) => {
const orders = ['asc', 'desc', 'none'] as const;

View File

@@ -22,22 +22,15 @@ import {
import { FilterList } from '../filter';
import * as styles from './collection-list.css';
type CreateCollectionProps = {
interface EditCollectionModelProps {
init?: Collection;
title?: string;
init: Collection;
onConfirm: (collection: Collection) => void;
onConfirmText?: string;
open: boolean;
getPageInfo: GetPageInfoById;
propertiesMeta: PropertiesMeta;
};
type SaveCollectionButtonProps = {
onConfirm: (collection: Collection) => Promise<void>;
getPageInfo: GetPageInfoById;
propertiesMeta: PropertiesMeta;
filterList: Filter[];
workspaceId: string;
};
onClose: () => void;
onConfirm: (view: Collection) => Promise<void>;
}
export const EditCollectionModel = ({
init,
@@ -47,15 +40,7 @@ export const EditCollectionModel = ({
getPageInfo,
propertiesMeta,
title,
}: {
init?: Collection;
onConfirm: (view: Collection) => Promise<void>;
open: boolean;
onClose: () => void;
title?: string;
getPageInfo: GetPageInfoById;
propertiesMeta: PropertiesMeta;
}) => {
}: EditCollectionModelProps) => {
const t = useAFFiNEI18N();
const onConfirmOnCollection = useCallback(
(view: Collection) => {
@@ -95,47 +80,46 @@ export const EditCollectionModel = ({
);
};
const Page = ({
id,
onClick,
getPageInfo,
}: {
interface PageProps {
id: string;
onClick: (id: string) => void;
getPageInfo: GetPageInfoById;
}) => {
onClick: (id: string) => void;
}
const Page = ({ id, onClick, getPageInfo }: PageProps) => {
const page = getPageInfo(id);
if (!page) {
return null;
}
const icon = page.isEdgeless ? (
<EdgelessIcon
style={{
width: 17.5,
height: 17.5,
}}
/>
) : (
<PageIcon
style={{
width: 17.5,
height: 17.5,
}}
/>
);
const click = () => {
onClick(id);
};
const handleClick = useCallback(() => onClick(id), [id, onClick]);
return (
<div className={styles.pageContainer}>
<div className={styles.pageIcon}>{icon}</div>
<div className={styles.pageTitle}>{page.title}</div>
<div onClick={click} className={styles.deleteIcon}>
<RemoveIcon />
</div>
</div>
<>
{page ? (
<div className={styles.pageContainer}>
<div className={styles.pageIcon}>
{page.isEdgeless ? (
<EdgelessIcon style={{ width: 17.5, height: 17.5 }} />
) : (
<PageIcon style={{ width: 17.5, height: 17.5 }} />
)}
</div>
<div className={styles.pageTitle}>{page.title}</div>
<div onClick={handleClick} className={styles.deleteIcon}>
<RemoveIcon />
</div>
</div>
) : null}
</>
);
};
interface EditCollectionProps {
title?: string;
onConfirmText?: string;
init: Collection;
getPageInfo: GetPageInfoById;
propertiesMeta: PropertiesMeta;
onCancel: () => void;
onConfirm: (collection: Collection) => void;
}
export const EditCollection = ({
title,
init,
@@ -144,9 +128,7 @@ export const EditCollection = ({
onConfirmText,
getPageInfo,
propertiesMeta,
}: CreateCollectionProps & {
onCancel: () => void;
}) => {
}: EditCollectionProps) => {
const t = useAFFiNEI18N();
const [value, onChange] = useState<Collection>(init);
const removeFromExcludeList = useCallback(
@@ -223,13 +205,8 @@ export const EditCollection = ({
<FilterList
propertiesMeta={propertiesMeta}
value={value.filterList}
onChange={list =>
onChange({
...value,
filterList: list,
})
}
></FilterList>
onChange={filterList => onChange({ ...value, filterList })}
/>
{value.allowList ? (
<div className={styles.allowList}>
<div className={styles.allowTitle}>With follow pages:</div>
@@ -253,12 +230,7 @@ export const EditCollection = ({
data-testid="input-collection-title"
placeholder={t['Untitled Collection']()}
defaultValue={value.name}
onChange={text =>
onChange({
...value,
name: text,
})
}
onChange={name => onChange({ ...value, name })}
/>
</div>
</ScrollableContainer>
@@ -288,6 +260,15 @@ export const EditCollection = ({
</div>
);
};
interface SaveCollectionButtonProps {
getPageInfo: GetPageInfoById;
propertiesMeta: PropertiesMeta;
filterList: Filter[];
workspaceId: string;
onConfirm: (collection: Collection) => Promise<void>;
}
export const SaveCollectionButton = ({
onConfirm,
getPageInfo,
@@ -316,10 +297,10 @@ export const SaveCollectionButton = ({
size="large"
style={{ padding: '7px 8px' }}
>
{t['Save As New Collection']()}
{t['Save as New Collection']()}
</Button>
<EditCollectionModel
title={t['Save As New Collection']()}
title={t['Save as New Collection']()}
propertiesMeta={propertiesMeta}
init={init}
onConfirm={onConfirm}

View File

@@ -10,9 +10,13 @@ import {
useSensor,
useSensors,
} from '@dnd-kit/core';
import { SortableContext, useSortable } from '@dnd-kit/sortable';
import {
restrictToParentElement,
restrictToVerticalAxis,
} from '@dnd-kit/modifiers';
import { arrayMove, SortableContext, useSortable } from '@dnd-kit/sortable';
import type { CSSProperties } from 'react';
import { useMemo } from 'react';
import { useCallback, useEffect, useMemo, useState } from 'react';
import { WorkspaceCard } from '../../components/card/workspace-card';
import { workspaceItemStyle } from './index.css';
@@ -31,18 +35,20 @@ interface SortableWorkspaceItemProps extends Omit<WorkspaceListProps, 'items'> {
}
const SortableWorkspaceItem = (props: SortableWorkspaceItemProps) => {
const { setNodeRef, attributes, listeners, transform } = useSortable({
id: props.item.id,
});
const { setNodeRef, attributes, listeners, transform, transition } =
useSortable({
id: props.item.id,
});
const style: CSSProperties = useMemo(
() => ({
transform: transform
? `translate3d(${transform.x}px, ${transform.y}px, 0)`
: undefined,
transition,
pointerEvents: props.disabled ? 'none' : undefined,
opacity: props.disabled ? 0.6 : undefined,
}),
[props.disabled, transform]
[props.disabled, transform, transition]
);
return (
<div
@@ -63,6 +69,8 @@ const SortableWorkspaceItem = (props: SortableWorkspaceItemProps) => {
);
};
const modifiers = [restrictToParentElement, restrictToVerticalAxis];
export const WorkspaceList = (props: WorkspaceListProps) => {
const sensors = useSensors(
useSensor(PointerSensor, {
@@ -71,10 +79,33 @@ export const WorkspaceList = (props: WorkspaceListProps) => {
},
})
);
const workspaceList = props.items;
const [optimisticList, setOptimisticList] = useState(workspaceList);
useEffect(() => {
setOptimisticList(workspaceList);
}, [workspaceList]);
const onDragEnd = useCallback(
(event: DragEndEvent) => {
const { active, over } = event;
if (active.id !== over?.id) {
setOptimisticList(workspaceList => {
const oldIndex = workspaceList.findIndex(w => w.id === active.id);
const newIndex = workspaceList.findIndex(w => w.id === over?.id);
const newList = arrayMove(workspaceList, oldIndex, newIndex);
return newList;
});
props.onDragEnd(event);
}
},
[props]
);
return (
<DndContext sensors={sensors} onDragEnd={props.onDragEnd}>
<SortableContext items={props.items}>
{props.items.map(item => (
<DndContext sensors={sensors} onDragEnd={onDragEnd} modifiers={modifiers}>
<SortableContext items={optimisticList}>
{optimisticList.map(item => (
<SortableWorkspaceItem {...props} item={item} key={item.id} />
))}
</SortableContext>

View File

@@ -1,5 +1,6 @@
import { useAFFiNEI18N } from '@affine/i18n/hooks';
import { Button } from '@toeverything/components/button';
import { useCallback, useMemo } from 'react';
import type { ModalProps } from '../modal';
import { Modal, ModalCloseButton } from '../modal';
@@ -39,33 +40,36 @@ export const Confirm = ({
confirmButtonTestId = '',
}: ConfirmProps) => {
const t = useAFFiNEI18N();
const cancelText_ = useMemo<string>(() => {
return cancelText === 'Cancel' ? t['Cancel']() : cancelText;
}, [cancelText, t]);
const handleCancel = useCallback(() => {
onCancel?.();
}, [onCancel]);
const handleConfirm = useCallback(() => {
onConfirm?.();
}, [onConfirm]);
return (
<Modal open={open} disablePortal={false}>
<StyledModalWrapper>
<ModalCloseButton
onClick={() => {
onCancel?.();
}}
/>
<ModalCloseButton onClick={handleCancel} />
<StyledConfirmTitle>{title}</StyledConfirmTitle>
<StyledConfirmContent>{content}</StyledConfirmContent>
{buttonDirection === 'row' ? (
<StyledRowButtonWrapper>
<Button
onClick={() => {
onCancel?.();
}}
onClick={handleCancel}
size="large"
style={{ marginRight: '24px' }}
data-testid={cancelButtonTestId}
>
{cancelText === 'Cancel' ? t['Cancel']() : cancelText}
{cancelText_}
</Button>
<Button
type={confirmType}
onClick={() => {
onConfirm?.();
}}
onClick={handleConfirm}
size="large"
data-testid={confirmButtonTestId}
>
@@ -76,18 +80,14 @@ export const Confirm = ({
<StyledColumnButtonWrapper>
<Button
type={confirmType}
onClick={() => {
onConfirm?.();
}}
onClick={handleConfirm}
style={{ width: '284px', height: '38px', textAlign: 'center' }}
data-testid={confirmButtonTestId}
>
{confirmText}
</Button>
<Button
onClick={() => {
onCancel?.();
}}
onClick={handleCancel}
style={{
marginTop: '16px',
width: '284px',
@@ -96,7 +96,7 @@ export const Confirm = ({
}}
data-testid={cancelButtonTestId}
>
{cancelText === 'Cancel' ? t['Cancel']() : cancelText}
{cancelText_}
</Button>
</StyledColumnButtonWrapper>
)}

View File

@@ -8,5 +8,5 @@
"devDependencies": {
"@types/debug": "^4.1.8"
},
"version": "0.8.1"
"version": "0.8.4"
}

View File

@@ -5,7 +5,7 @@
"main": "./src/index.ts",
"module": "./src/index.ts",
"devDependencies": {
"@blocksuite/global": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/global": "0.0.0-20230830111255-92eab248-nightly",
"react": "18.2.0",
"react-dom": "18.2.0",
"zod": "^3.22.1"
@@ -27,5 +27,5 @@
"dependencies": {
"lit": "^2.8.0"
},
"version": "0.8.1"
"version": "0.8.4"
}

View File

@@ -1,6 +1,6 @@
{
"name": "@affine/graphql",
"version": "0.8.1",
"version": "0.8.4",
"description": "Autogenerated GraphQL client for affine.pro",
"license": "MPL-2.0",
"type": "module",

View File

@@ -11,12 +11,12 @@
"devDependencies": {
"@affine/env": "workspace:*",
"@affine/y-provider": "workspace:*",
"@blocksuite/block-std": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/blocks": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/editor": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/global": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/lit": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/store": "0.0.0-20230822230555-98129627-nightly"
"@blocksuite/block-std": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/blocks": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/editor": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/global": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/lit": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/store": "0.0.0-20230830111255-92eab248-nightly"
},
"peerDependencies": {
"@affine/y-provider": "workspace:*",
@@ -53,5 +53,5 @@
"optional": true
}
},
"version": "0.8.1"
"version": "0.8.4"
}

View File

@@ -37,5 +37,5 @@
"ts-node": "^10.9.1",
"typescript": "^5.1.6"
},
"version": "0.8.1"
"version": "0.8.4"
}

View File

@@ -5,6 +5,7 @@
"sourceRoot": "packages/i18n/src",
"targets": {
"build": {
"outputs": ["{workspaceRoot}/src/i18n-generated.ts"],
"executor": "nx:run-commands",
"options": {
"cwd": "packages/i18n",

View File

@@ -237,7 +237,7 @@
"Retain cached cloud data": "Retain cached cloud data",
"Retain local cached data": "Retain local cached data",
"Save": "Save",
"Save As New Collection": "Save As New Collection",
"Save as New Collection": "Save as New Collection",
"Saved then enable AFFiNE Cloud": "All changes are saved locally, click to enable AFFiNE Cloud.",
"Select": "Select",
"Select All": "Select All",

View File

@@ -237,7 +237,7 @@
"Retain cached cloud data": "Conserver les données mises en cache dans le cloud",
"Retain local cached data": "Conserver les données du cache local",
"Save": "Enregistrer",
"Save As New Collection": "Enregistrer en tant que nouvelle collection",
"Save as New Collection": "Enregistrer en tant que nouvelle collection",
"Saved then enable AFFiNE Cloud": "Toutes les modifications sont sauvegardées localement, cliquez ici pour activer la sauvegarde AFFiNE Cloud",
"Select": "Sélectionner ",
"Select All": "Sélectionner l'ensemble",

View File

@@ -237,7 +237,7 @@
"Retain cached cloud data": "保留緩衝的雲數據",
"Retain local cached data": "保留本機緩衝數據",
"Save": "保存",
"Save As New Collection": "另存為新收藏集",
"Save as New Collection": "另存為新收藏集",
"Saved then enable AFFiNE Cloud": "所有修訂已儲存在本機,點按以啟用 AFFiNE Cloud。",
"Select": "選擇",
"Select All": "全選",

View File

@@ -50,15 +50,15 @@
},
"dependencies": {
"@affine/sdk": "workspace:*",
"@blocksuite/blocks": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/global": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/store": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/blocks": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/global": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/store": "0.0.0-20230830111255-92eab248-nightly",
"jotai": "^2.3.1",
"zod": "^3.22.1"
},
"devDependencies": {
"@blocksuite/editor": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/lit": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/editor": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/lit": "0.0.0-20230830111255-92eab248-nightly",
"async-call-rpc": "^6.3.1",
"electron": "link:../../apps/electron/node_modules/electron",
"react": "^18.2.0",
@@ -98,5 +98,5 @@
"optional": true
}
},
"version": "0.8.1"
"version": "0.8.4"
}

View File

@@ -1,6 +1,7 @@
import type { PageMeta, Workspace } from '@blocksuite/store';
import { createIndexeddbStorage } from '@blocksuite/store';
import type { createStore, WritableAtom } from 'jotai/vanilla';
import { Array as YArray, Doc as YDoc, Map as YMap } from 'yjs';
export async function buildShowcaseWorkspace(
workspace: Workspace,
@@ -27,7 +28,9 @@ export async function buildShowcaseWorkspace(
'affine:bookmark': 1,
'affine:database': 2,
};
workspace.doc.getMap('meta').set('blockVersions', showcaseWorkspaceVersions);
workspace.doc
.getMap('meta')
.set('blockVersions', new YMap(Object.entries(showcaseWorkspaceVersions)));
const prototypes = {
tags: {
options: [
@@ -195,7 +198,6 @@ import { applyUpdate, encodeStateAsUpdate } from 'yjs';
const migrationOrigin = 'affine-migration';
import type { Schema } from '@blocksuite/store';
import { Array as YArray, Doc as YDoc, Map as YMap } from 'yjs';
type XYWH = [number, number, number, number];
@@ -489,7 +491,11 @@ const upgradeV2ToV3 = async (options: UpgradeOptions): Promise<boolean> => {
const spaces = rootDoc.getMap('spaces') as YMap<any>;
const meta = rootDoc.getMap('meta') as YMap<unknown>;
const versions = meta.get('blockVersions') as YMap<number>;
if (versions.get('affine:database') === 3) {
if ('affine:database' in versions) {
if (versions['affine:database'] === 3) {
return false;
}
} else if (versions.get('affine:database') === 3) {
return false;
}
const schema = options.getSchema();
@@ -510,7 +516,12 @@ const upgradeV2ToV3 = async (options: UpgradeOptions): Promise<boolean> => {
space
);
});
versions.set('affine:database', 3);
if ('affine:database' in versions) {
versions['affine:database'] = 3;
meta.set('blockVersions', new YMap(Object.entries(versions)));
} else {
versions.set('affine:database', 3);
}
return true;
};

View File

@@ -6,12 +6,12 @@
"jotai": "^2.3.1"
},
"devDependencies": {
"@blocksuite/block-std": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/blocks": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/editor": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/global": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/lit": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/store": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/block-std": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/blocks": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/editor": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/global": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/lit": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/store": "0.0.0-20230830111255-92eab248-nightly",
"lottie-web": "^5.12.2"
},
"peerDependencies": {
@@ -23,5 +23,5 @@
"@blocksuite/store": "*",
"lottie-web": "*"
},
"version": "0.8.1"
"version": "0.8.4"
}

View File

@@ -38,5 +38,5 @@
"test": "cross-env TS_NODE_TRANSPILE_ONLY=1 TS_NODE_PROJECT=./tsconfig.json node --test --loader ts-node/esm --experimental-specifier-resolution=node ./__tests__/**/*.mts",
"version": "napi version"
},
"version": "0.8.1"
"version": "0.8.4"
}

View File

@@ -1,7 +1,7 @@
{
"name": "@affine/plugin-cli",
"type": "module",
"version": "0.8.1",
"version": "0.8.4",
"bin": {
"af": "./src/af.mjs"
},
@@ -10,7 +10,7 @@
"tsconfig.json"
],
"dependencies": {
"@endo/static-module-record": "^0.8.1",
"@endo/static-module-record": "^0.8.2",
"@swc/core": "^1.3.77",
"@toeverything/infra": "workspace:^",
"@vanilla-extract/rollup-plugin": "^1.2.2",

View File

@@ -1,6 +1,6 @@
{
"name": "@affine/sdk",
"version": "0.8.1",
"version": "0.8.4",
"type": "module",
"scripts": {
"build": "vite build",
@@ -22,9 +22,9 @@
"dist"
],
"dependencies": {
"@blocksuite/blocks": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/global": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/store": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/blocks": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/global": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/store": "0.0.0-20230830111255-92eab248-nightly",
"jotai": "^2.3.1",
"zod": "^3.22.1"
},

View File

@@ -1,6 +1,6 @@
{
"name": "@affine/storage",
"version": "0.8.1",
"version": "0.8.4",
"engines": {
"node": ">= 10.16.0 < 11 || >= 11.8.0"
},

View File

@@ -7,5 +7,5 @@
"./v1/*.json": "./v1/*.json",
"./preloading.json": "./preloading.json"
},
"version": "0.8.1"
"version": "0.8.4"
}

View File

@@ -215,7 +215,7 @@
}
},
{
"insert": " feely."
"insert": " freely."
}
],
"prop:checked": false

View File

@@ -1,6 +1,6 @@
{
"name": "@affine/workers",
"version": "0.8.1",
"version": "0.8.4",
"private": true,
"scripts": {
"dev": "wrangler dev"

View File

@@ -34,5 +34,5 @@
"@types/ws": "^8.5.5",
"ws": "^8.13.0"
},
"version": "0.8.1"
"version": "0.8.4"
}

View File

@@ -1,7 +1,7 @@
{
"name": "@toeverything/y-indexeddb",
"type": "module",
"version": "0.8.1",
"version": "0.8.4",
"description": "IndexedDB database adapter for Yjs",
"repository": "toeverything/AFFiNE",
"author": "toeverything",
@@ -37,8 +37,8 @@
},
"devDependencies": {
"@affine/y-provider": "workspace:*",
"@blocksuite/blocks": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/store": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/blocks": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/store": "0.0.0-20230830111255-92eab248-nightly",
"vite": "^4.4.9",
"vite-plugin-dts": "3.5.2",
"y-indexeddb": "^9.0.11"

View File

@@ -1,7 +1,7 @@
{
"name": "@affine/y-provider",
"type": "module",
"version": "0.8.1",
"version": "0.8.4",
"description": "Yjs provider utilities for AFFiNE",
"main": "./src/index.ts",
"module": "./src/index.ts",
@@ -9,7 +9,7 @@
".": "./src/index.ts"
},
"devDependencies": {
"@blocksuite/store": "0.0.0-20230822230555-98129627-nightly"
"@blocksuite/store": "0.0.0-20230830111255-92eab248-nightly"
},
"peerDependencies": {
"yjs": "^13.5.51"

View File

@@ -1,7 +1,7 @@
{
"name": "@affine/bookmark-plugin",
"type": "module",
"version": "0.8.1",
"version": "0.8.4",
"description": "Bookmark Plugin",
"affinePlugin": {
"release": true,

View File

@@ -35,5 +35,5 @@
"react": "*",
"react-dom": "*"
},
"version": "0.8.1"
"version": "0.8.4"
}

View File

@@ -3,7 +3,7 @@
"type": "module",
"private": true,
"description": "Hello world plugin",
"version": "0.8.1",
"version": "0.8.4",
"scripts": {
"dev": "af dev",
"build": "af build"

View File

@@ -1,7 +1,7 @@
{
"name": "@affine/image-preview-plugin",
"type": "module",
"version": "0.8.1",
"version": "0.8.4",
"description": "Image preview plugin",
"affinePlugin": {
"release": true,

View File

@@ -3,7 +3,7 @@
"type": "module",
"private": true,
"description": "Outline plugin",
"version": "0.8.1",
"version": "0.8.4",
"scripts": {
"dev": "af dev",
"build": "af build"

View File

@@ -50,10 +50,17 @@ export const HeaderItem = ({
const [open, setOpen] = useState(false);
const pushLayout = useSetAtom(pushLayoutAtom);
const deleteLayout = useSetAtom(deleteLayoutAtom);
const [container, setContainer] = useState<HTMLButtonElement | null>(null);
return (
<Tooltip content={`${open ? 'Collapse' : 'Expand'} table of contents`}>
<Tooltip
content={`${open ? 'Collapse' : 'Expand'} table of contents`}
portalOptions={{
container,
}}
>
<IconButton
ref={setContainer}
onClick={useCallback(() => {
if (!open) {
setOpen(true);

View File

@@ -3,7 +3,7 @@
"type": "module",
"private": true,
"description": "Vue hello world plugin",
"version": "0.8.1",
"version": "0.8.4",
"scripts": {
"dev": "af dev",
"build": "af build"

View File

@@ -10,14 +10,14 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine-test/kit": "workspace:*",
"@blocksuite/block-std": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/blocks": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/global": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/store": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/block-std": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/blocks": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/global": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/store": "0.0.0-20230830111255-92eab248-nightly",
"@playwright/test": "^1.37.0",
"express": "^4.18.2",
"http-proxy-middleware": "^3.0.0-beta.1",
"serve": "^14.2.0"
},
"version": "0.8.1"
"version": "0.8.4"
}

View File

@@ -9,14 +9,14 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine-test/kit": "workspace:*",
"@blocksuite/block-std": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/blocks": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/global": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/store": "0.0.0-20230822230555-98129627-nightly",
"@blocksuite/block-std": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/blocks": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/global": "0.0.0-20230830111255-92eab248-nightly",
"@blocksuite/store": "0.0.0-20230830111255-92eab248-nightly",
"@playwright/test": "^1.37.0",
"express": "^4.18.2",
"http-proxy-middleware": "^3.0.0-beta.1",
"serve": "^14.2.0"
},
"version": "0.8.1"
"version": "0.8.4"
}

View File

@@ -9,5 +9,5 @@
"@affine-test/kit": "workspace:*",
"@playwright/test": "^1.37.0"
},
"version": "0.8.1"
"version": "0.8.4"
}

View File

@@ -9,5 +9,5 @@
"@affine-test/kit": "workspace:*",
"@playwright/test": "^1.37.0"
},
"version": "0.8.1"
"version": "0.8.4"
}

View File

@@ -9,5 +9,5 @@
"@affine-test/kit": "workspace:*",
"@playwright/test": "^1.37.0"
},
"version": "0.8.1"
"version": "0.8.4"
}

View File

@@ -3,5 +3,5 @@
"exports": {
"./*": "./*"
},
"version": "0.8.1"
"version": "0.8.4"
}

View File

@@ -1,7 +1,7 @@
{
"name": "@affine-test/kit",
"private": true,
"version": "0.8.1",
"version": "0.8.4",
"exports": {
"./playwright": "./playwright.ts",
"./utils/*": "./utils/*.ts"

326
yarn.lock
View File

@@ -25,10 +25,10 @@ __metadata:
dependencies:
"@affine-test/fixtures": "workspace:*"
"@affine-test/kit": "workspace:*"
"@blocksuite/block-std": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/blocks": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/global": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/store": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/block-std": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/blocks": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/global": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/store": 0.0.0-20230830111255-92eab248-nightly
"@playwright/test": ^1.37.0
express: ^4.18.2
http-proxy-middleware: ^3.0.0-beta.1
@@ -42,10 +42,10 @@ __metadata:
dependencies:
"@affine-test/fixtures": "workspace:*"
"@affine-test/kit": "workspace:*"
"@blocksuite/block-std": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/blocks": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/global": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/store": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/block-std": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/blocks": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/global": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/store": 0.0.0-20230830111255-92eab248-nightly
"@playwright/test": ^1.37.0
express: ^4.18.2
http-proxy-middleware: ^3.0.0-beta.1
@@ -136,13 +136,14 @@ __metadata:
"@affine/i18n": "workspace:*"
"@affine/jotai": "workspace:*"
"@affine/workspace": "workspace:*"
"@blocksuite/blocks": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/editor": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/global": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/blocks": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/editor": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/global": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/icons": ^2.1.31
"@blocksuite/lit": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/store": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/lit": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/store": 0.0.0-20230830111255-92eab248-nightly
"@dnd-kit/core": ^6.0.8
"@dnd-kit/modifiers": ^6.0.1
"@dnd-kit/sortable": ^7.0.2
"@emotion/cache": ^11.11.0
"@emotion/react": ^11.11.1
@@ -226,13 +227,13 @@ __metadata:
"@affine/jotai": "workspace:*"
"@affine/templates": "workspace:*"
"@affine/workspace": "workspace:*"
"@blocksuite/block-std": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/blocks": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/editor": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/global": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/block-std": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/blocks": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/editor": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/global": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/icons": ^2.1.31
"@blocksuite/lit": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/store": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/lit": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/store": 0.0.0-20230830111255-92eab248-nightly
"@dnd-kit/core": ^6.0.8
"@dnd-kit/sortable": ^7.0.2
"@emotion/cache": ^11.11.0
@@ -274,7 +275,7 @@ __metadata:
react-resizable-panels: ^0.0.55
react-router-dom: ^6.15.0
rxjs: ^7.8.1
ses: ^0.18.7
ses: ^0.18.8
source-map-loader: ^4.0.1
style-loader: ^3.3.3
swc-loader: ^0.2.3
@@ -305,12 +306,12 @@ __metadata:
resolution: "@affine/docs@workspace:apps/docs"
dependencies:
"@affine/component": "workspace:*"
"@blocksuite/block-std": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/blocks": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/editor": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/global": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/lit": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/store": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/block-std": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/blocks": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/editor": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/global": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/lit": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/store": 0.0.0-20230830111255-92eab248-nightly
"@types/react": ^18.2.20
"@types/react-dom": ^18.2.7
"@vanilla-extract/css": ^1.12.0
@@ -335,10 +336,10 @@ __metadata:
"@affine/env": "workspace:*"
"@affine/native": "workspace:*"
"@affine/sdk": "workspace:*"
"@blocksuite/blocks": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/editor": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/lit": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/store": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/blocks": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/editor": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/lit": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/store": 0.0.0-20230830111255-92eab248-nightly
"@electron-forge/cli": ^6.4.0
"@electron-forge/core": ^6.4.0
"@electron-forge/core-utils": ^6.4.0
@@ -382,7 +383,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@affine/env@workspace:packages/env"
dependencies:
"@blocksuite/global": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/global": 0.0.0-20230830111255-92eab248-nightly
lit: ^2.8.0
react: 18.2.0
react-dom: 18.2.0
@@ -456,12 +457,12 @@ __metadata:
version: 0.0.0-use.local
resolution: "@affine/jotai@workspace:packages/jotai"
dependencies:
"@blocksuite/block-std": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/blocks": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/editor": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/global": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/lit": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/store": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/block-std": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/blocks": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/editor": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/global": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/lit": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/store": 0.0.0-20230830111255-92eab248-nightly
jotai: ^2.3.1
lottie-web: ^5.12.2
peerDependencies:
@@ -573,7 +574,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@affine/plugin-cli@workspace:packages/plugin-cli"
dependencies:
"@endo/static-module-record": ^0.8.1
"@endo/static-module-record": ^0.8.2
"@swc/core": ^1.3.77
"@toeverything/infra": "workspace:^"
"@vanilla-extract/rollup-plugin": ^1.2.2
@@ -599,13 +600,13 @@ __metadata:
"@affine/jotai": "workspace:*"
"@affine/templates": "workspace:*"
"@affine/workspace": "workspace:*"
"@blocksuite/block-std": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/blocks": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/editor": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/global": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/block-std": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/blocks": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/editor": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/global": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/icons": ^2.1.31
"@blocksuite/lit": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/store": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/lit": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/store": 0.0.0-20230830111255-92eab248-nightly
"@toeverything/hooks": "workspace:*"
"@toeverything/y-indexeddb": "workspace:*"
"@types/react": ^18.2.20
@@ -622,9 +623,9 @@ __metadata:
version: 0.0.0-use.local
resolution: "@affine/sdk@workspace:packages/sdk"
dependencies:
"@blocksuite/blocks": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/global": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/store": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/blocks": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/global": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/store": 0.0.0-20230830111255-92eab248-nightly
jotai: ^2.3.1
vite: ^4.4.9
vite-plugin-dts: 3.5.2
@@ -697,13 +698,13 @@ __metadata:
dependencies:
"@affine/component": "workspace:*"
"@affine/i18n": "workspace:*"
"@blocksuite/block-std": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/blocks": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/editor": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/global": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/block-std": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/blocks": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/editor": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/global": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/icons": ^2.1.31
"@blocksuite/lit": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/store": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/lit": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/store": 0.0.0-20230830111255-92eab248-nightly
"@storybook/addon-actions": ^7.3.1
"@storybook/addon-essentials": ^7.3.1
"@storybook/addon-interactions": ^7.3.1
@@ -723,7 +724,7 @@ __metadata:
react: 18.2.0
react-dom: 18.2.0
serve: ^14.2.0
ses: ^0.18.7
ses: ^0.18.8
storybook: ^7.3.1
storybook-addon-react-router-v6: ^2.0.4
storybook-dark-mode: ^3.0.1
@@ -796,7 +797,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@affine/y-provider@workspace:packages/y-provider"
dependencies:
"@blocksuite/store": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/store": 0.0.0-20230830111255-92eab248-nightly
peerDependencies:
yjs: ^13.5.51
languageName: unknown
@@ -3386,25 +3387,25 @@ __metadata:
languageName: node
linkType: hard
"@blocksuite/block-std@npm:0.0.0-20230822230555-98129627-nightly":
version: 0.0.0-20230822230555-98129627-nightly
resolution: "@blocksuite/block-std@npm:0.0.0-20230822230555-98129627-nightly"
"@blocksuite/block-std@npm:0.0.0-20230830111255-92eab248-nightly":
version: 0.0.0-20230830111255-92eab248-nightly
resolution: "@blocksuite/block-std@npm:0.0.0-20230830111255-92eab248-nightly"
dependencies:
"@blocksuite/global": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/global": 0.0.0-20230830111255-92eab248-nightly
w3c-keyname: ^2.2.8
peerDependencies:
"@blocksuite/store": 0.0.0-20230822230555-98129627-nightly
checksum: 04d4d74274db0234c2c96d73594869ac18890b7466125f384591bb82ab76ef750385d4a58728ec95405dab52ccc8c4c6f4a54e163b1e8deac41932489d944053
"@blocksuite/store": 0.0.0-20230830111255-92eab248-nightly
checksum: 9e682758203795dff92dcaef99c19a8456ae442b642bda05f3489cb19798252dd1f5318d8a2db866946725d99bd64ed84ac8d516b0b13da90d849d9026839835
languageName: node
linkType: hard
"@blocksuite/blocks@npm:0.0.0-20230822230555-98129627-nightly":
version: 0.0.0-20230822230555-98129627-nightly
resolution: "@blocksuite/blocks@npm:0.0.0-20230822230555-98129627-nightly"
"@blocksuite/blocks@npm:0.0.0-20230830111255-92eab248-nightly":
version: 0.0.0-20230830111255-92eab248-nightly
resolution: "@blocksuite/blocks@npm:0.0.0-20230830111255-92eab248-nightly"
dependencies:
"@blocksuite/global": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/phasor": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/virgo": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/global": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/phasor": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/virgo": 0.0.0-20230830111255-92eab248-nightly
"@floating-ui/dom": ^1.5.1
"@types/webfontloader": ^1.6.35
buffer: ^6.0.3
@@ -3412,51 +3413,51 @@ __metadata:
file-type: ^16.5.4
html2canvas: ^1.4.1
jszip: ^3.10.1
lit: ^2.7.6
lit: ^2.8.0
marked: ^4.3.0
pdf-lib: ^1.17.1
shiki: ^0.14.3
sortablejs: ^1.15.0
turndown: ^7.1.2
webfontloader: ^1.6.28
zod: ^3.21.4
zod: ^3.22.2
peerDependencies:
"@blocksuite/block-std": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/lit": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/store": 0.0.0-20230822230555-98129627-nightly
"@toeverything/theme": ^0.7.12
"@blocksuite/block-std": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/lit": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/store": 0.0.0-20230830111255-92eab248-nightly
"@toeverything/theme": ^0.7.13
yjs: ^13
checksum: 1b533346b4b6345196edb0d9c9fdfc8e0b85ad428a19c395e9a1f7c63e38a4edf9506a4297707af7704802484d7fc61f1958b828b94d89cb68d4d34534d4299b
checksum: 14c58a5bccc6ce23ae4e71114bc260fec7e764ba24588738124c49869bc06f38f450ad46086cd964a3c740028336e561ebd442fdf2c3ff7ee5bce763ccbfa0a5
languageName: node
linkType: hard
"@blocksuite/editor@npm:0.0.0-20230822230555-98129627-nightly":
version: 0.0.0-20230822230555-98129627-nightly
resolution: "@blocksuite/editor@npm:0.0.0-20230822230555-98129627-nightly"
"@blocksuite/editor@npm:0.0.0-20230830111255-92eab248-nightly":
version: 0.0.0-20230830111255-92eab248-nightly
resolution: "@blocksuite/editor@npm:0.0.0-20230830111255-92eab248-nightly"
dependencies:
"@blocksuite/global": 0.0.0-20230822230555-98129627-nightly
lit: ^2.7.6
"@blocksuite/global": 0.0.0-20230830111255-92eab248-nightly
lit: ^2.8.0
peerDependencies:
"@blocksuite/blocks": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/lit": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/store": 0.0.0-20230822230555-98129627-nightly
"@toeverything/theme": ^0.7.12
checksum: 376729edaa588c7886b60c68c5ab8cd66d3f9e4e495a31fdb6749dfe8ed67781cf12f08b86d73e7d65955fc9381326938f57561b09ea34bde5e1fc70f081e04c
"@blocksuite/blocks": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/lit": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/store": 0.0.0-20230830111255-92eab248-nightly
"@toeverything/theme": ^0.7.13
checksum: ba2dcfa03ef0be06e0f0be022f301ea095b093d83aeab41ca8c5dcd0450c5e7cba6c8e5d3f99c383f6aa97e16b1967e4d9e884d8a827ca7aeda8bc12a31d44d0
languageName: node
linkType: hard
"@blocksuite/global@npm:0.0.0-20230822230555-98129627-nightly":
version: 0.0.0-20230822230555-98129627-nightly
resolution: "@blocksuite/global@npm:0.0.0-20230822230555-98129627-nightly"
"@blocksuite/global@npm:0.0.0-20230830111255-92eab248-nightly":
version: 0.0.0-20230830111255-92eab248-nightly
resolution: "@blocksuite/global@npm:0.0.0-20230830111255-92eab248-nightly"
dependencies:
ansi-colors: ^4.1.3
zod: ^3.21.4
zod: ^3.22.2
peerDependencies:
lit: ^2.7
peerDependenciesMeta:
lit:
optional: true
checksum: e5b8805052d3fbaf9cd499fd9932bee726ce32c8348f9ed5e7de6f3b8ba13f14e36fac3a087621bd7ac02b286655e1da83ede8c68fc8d7367c6ef2bc9490f214
checksum: 723fb9f8e8e3b0cd9c13c4b92dd8e04c0a580b09301af9bf59460974a58137570fc39c8a1f4488a39483b133f1856b663e46254138f3d61545e3ea3c128b0e3b
languageName: node
linkType: hard
@@ -3470,67 +3471,66 @@ __metadata:
languageName: node
linkType: hard
"@blocksuite/lit@npm:0.0.0-20230822230555-98129627-nightly":
version: 0.0.0-20230822230555-98129627-nightly
resolution: "@blocksuite/lit@npm:0.0.0-20230822230555-98129627-nightly"
"@blocksuite/lit@npm:0.0.0-20230830111255-92eab248-nightly":
version: 0.0.0-20230830111255-92eab248-nightly
resolution: "@blocksuite/lit@npm:0.0.0-20230830111255-92eab248-nightly"
dependencies:
"@blocksuite/global": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/virgo": 0.0.0-20230822230555-98129627-nightly
lit: ^2.7.6
"@blocksuite/global": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/virgo": 0.0.0-20230830111255-92eab248-nightly
lit: ^2.8.0
peerDependencies:
"@blocksuite/block-std": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/store": 0.0.0-20230822230555-98129627-nightly
checksum: f1b3ab41dd72b08a697895b478b574bfd3dd823a406c2cf795166b6fd07b8d4f7240253621dc053b88ec13453f566ecd0b29fe8626aa09bc33480cd4e952a59f
"@blocksuite/block-std": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/store": 0.0.0-20230830111255-92eab248-nightly
checksum: b7d81746b26930635bdf3539d6c1672135dc0452ba1837f27862e82c49b0f0fe4c576fc2319c4b6e8cfeeb5cf3af5834380aa43882e7037cdf8a0711430e0e29
languageName: node
linkType: hard
"@blocksuite/phasor@npm:0.0.0-20230822230555-98129627-nightly":
version: 0.0.0-20230822230555-98129627-nightly
resolution: "@blocksuite/phasor@npm:0.0.0-20230822230555-98129627-nightly"
"@blocksuite/phasor@npm:0.0.0-20230830111255-92eab248-nightly":
version: 0.0.0-20230830111255-92eab248-nightly
resolution: "@blocksuite/phasor@npm:0.0.0-20230830111255-92eab248-nightly"
dependencies:
"@blocksuite/global": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/global": 0.0.0-20230830111255-92eab248-nightly
fractional-indexing: ^3.2.0
peerDependencies:
nanoid: ^4
yjs: ^13
checksum: 2c13e7b3cc62e27b9ae34b5770fd5278675e2464d670e319f49a823f0ce252b241e7aefb1763543855a24fb57f5168097397b732bf7ab824f23e66be99f0ab1c
checksum: eae34ff320060daa11605a7433acdadcee53b85419f6bdca33bb0cb8d6659fe729425abee450667284b02ff6846377627aa5583fbc607601cdc678031ef6967e
languageName: node
linkType: hard
"@blocksuite/store@npm:0.0.0-20230822230555-98129627-nightly":
version: 0.0.0-20230822230555-98129627-nightly
resolution: "@blocksuite/store@npm:0.0.0-20230822230555-98129627-nightly"
"@blocksuite/store@npm:0.0.0-20230830111255-92eab248-nightly":
version: 0.0.0-20230830111255-92eab248-nightly
resolution: "@blocksuite/store@npm:0.0.0-20230830111255-92eab248-nightly"
dependencies:
"@blocksuite/global": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/virgo": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/global": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/virgo": 0.0.0-20230830111255-92eab248-nightly
"@types/flexsearch": ^0.7.3
buffer: ^6.0.3
flexsearch: 0.7.21
idb-keyval: ^6.2.1
ky: ^0.33.3
lib0: ^0.2.78
lib0: ^0.2.83
merge: ^2.1.1
minimatch: ^9.0.3
nanoid: ^4.0.2
y-protocols: ^1.0.5
zod: ^3.21.4
zod: ^3.22.2
peerDependencies:
async-call-rpc: ^6
yjs: ^13
checksum: ecb3e0bde5acf497c8565da37d5fc31cf62f0bb56815fee9d4a3d1380b68b41d88bd1d0f67a15ab5b85a5f79b97085efb462b2551aeb0ea793ff24ffdf0a1855
checksum: eedd18d53e6ed89e759bdd1b8cab44641ba5f4135715c2f1f7b6860cd0aa9453f225c60db17da591b8a97717bd809bf42e8abf07f157b0ab886c0d73e8ba4f7b
languageName: node
linkType: hard
"@blocksuite/virgo@npm:0.0.0-20230822230555-98129627-nightly":
version: 0.0.0-20230822230555-98129627-nightly
resolution: "@blocksuite/virgo@npm:0.0.0-20230822230555-98129627-nightly"
"@blocksuite/virgo@npm:0.0.0-20230830111255-92eab248-nightly":
version: 0.0.0-20230830111255-92eab248-nightly
resolution: "@blocksuite/virgo@npm:0.0.0-20230830111255-92eab248-nightly"
dependencies:
"@blocksuite/global": 0.0.0-20230822230555-98129627-nightly
zod: ^3.21.4
"@blocksuite/global": 0.0.0-20230830111255-92eab248-nightly
zod: ^3.22.2
peerDependencies:
lit: ^2.7
yjs: ^13
checksum: e524f0e45a4c66d86cf14d6f013a5db20d4651137f853584b1ac509bcc0befd11ce72bdb5629452c44e9a2f70c7d777e7b0f6073f34a55c404292b079ed0fa32
checksum: cf545c10e381c01c46fc776fbd692d28d630c2aa169e60f6e8b7696d6512a47434119b65f8b4299ab77a1b9b53f8af606db692fb0617cdcecce0aeddfa500024
languageName: node
linkType: hard
@@ -3862,6 +3862,19 @@ __metadata:
languageName: node
linkType: hard
"@dnd-kit/modifiers@npm:^6.0.1":
version: 6.0.1
resolution: "@dnd-kit/modifiers@npm:6.0.1"
dependencies:
"@dnd-kit/utilities": ^3.2.1
tslib: ^2.0.0
peerDependencies:
"@dnd-kit/core": ^6.0.6
react: ">=16.8.0"
checksum: cd31715aac81baa2398558dc7c877a483d1c4c41cdb2f466557fdc41bb742db5cd1b34b3b84332b94ac4a2835e7e5a0e28c64e621936e976399788f1dd029ea4
languageName: node
linkType: hard
"@dnd-kit/sortable@npm:^7.0.2":
version: 7.0.2
resolution: "@dnd-kit/sortable@npm:7.0.2"
@@ -4412,23 +4425,23 @@ __metadata:
languageName: node
linkType: hard
"@endo/env-options@npm:^0.1.3":
version: 0.1.3
resolution: "@endo/env-options@npm:0.1.3"
checksum: da8c66865d4d30b0053a00960657dc36f022975a888f0dd6a2f6bb37b9fe731f45a02a2cf263d93b1a40fcb37b25f8ba7076cb8af9e93fd95f496365d9382930
"@endo/env-options@npm:^0.1.4":
version: 0.1.4
resolution: "@endo/env-options@npm:0.1.4"
checksum: 6099f0a6b700a60bee7b226aa2a39bb5748e22f25e9606d70e5a66a8e62cbd8c972b0fe578735a658f80bf2ebece62e28c20aa3f16417cbfe6c19a8689966dd3
languageName: node
linkType: hard
"@endo/static-module-record@npm:^0.8.1":
version: 0.8.1
resolution: "@endo/static-module-record@npm:0.8.1"
"@endo/static-module-record@npm:^0.8.2":
version: 0.8.2
resolution: "@endo/static-module-record@npm:0.8.2"
dependencies:
"@agoric/babel-generator": ^7.17.6
"@babel/parser": ^7.17.3
"@babel/traverse": ^7.17.3
"@babel/types": ^7.17.0
ses: ^0.18.7
checksum: c9dc18a5b8ec13008784e30aa15214a67771c325759b42d54362f891d0328b0abf4cafc7be8fa17d539f5f7ca28b9555127e22e9596f5e52d9bf7f3fa90c7963
ses: ^0.18.8
checksum: 0e65f28e95d4ddd495de4cc7e5f0a47a70b89ba5449660158c8813121ab76aa3a8db7e6b2bb9efd3cb24833f8613a952e3a85a8af9fc9b7e4ad49d1d47a9f06c
languageName: node
linkType: hard
@@ -11739,12 +11752,12 @@ __metadata:
dependencies:
"@affine/env": "workspace:*"
"@affine/y-provider": "workspace:*"
"@blocksuite/block-std": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/blocks": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/editor": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/global": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/lit": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/store": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/block-std": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/blocks": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/editor": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/global": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/lit": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/store": 0.0.0-20230830111255-92eab248-nightly
foxact: ^0.2.20
peerDependencies:
"@affine/y-provider": "workspace:*"
@@ -11779,11 +11792,11 @@ __metadata:
resolution: "@toeverything/infra@workspace:packages/infra"
dependencies:
"@affine/sdk": "workspace:*"
"@blocksuite/blocks": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/editor": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/global": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/lit": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/store": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/blocks": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/editor": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/global": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/lit": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/store": 0.0.0-20230830111255-92eab248-nightly
async-call-rpc: ^6.3.1
electron: "link:../../apps/electron/node_modules/electron"
jotai: ^2.3.1
@@ -11830,8 +11843,8 @@ __metadata:
resolution: "@toeverything/y-indexeddb@workspace:packages/y-indexeddb"
dependencies:
"@affine/y-provider": "workspace:*"
"@blocksuite/blocks": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/store": 0.0.0-20230822230555-98129627-nightly
"@blocksuite/blocks": 0.0.0-20230830111255-92eab248-nightly
"@blocksuite/store": 0.0.0-20230830111255-92eab248-nightly
idb: ^7.1.1
vite: ^4.4.9
vite-plugin-dts: 3.5.2
@@ -23948,7 +23961,7 @@ __metadata:
languageName: node
linkType: hard
"lib0@npm:^0.2.42, lib0@npm:^0.2.74, lib0@npm:^0.2.78, lib0@npm:^0.2.82":
"lib0@npm:^0.2.42, lib0@npm:^0.2.74, lib0@npm:^0.2.82":
version: 0.2.82
resolution: "lib0@npm:0.2.82"
dependencies:
@@ -23960,6 +23973,18 @@ __metadata:
languageName: node
linkType: hard
"lib0@npm:^0.2.83":
version: 0.2.83
resolution: "lib0@npm:0.2.83"
dependencies:
isomorphic.js: ^0.2.4
bin:
0gentesthtml: bin/gentesthtml.js
0serve: bin/0serve.js
checksum: 2c05609146b25c14a72c99683f6f71e10c74b60be39618f25117d3f03a2435b6d6219876641fa019fe1acde7fdfa75dc3eb3a23e37c9ae30eae7be05225e2263
languageName: node
linkType: hard
"lie@npm:~3.3.0":
version: 3.3.0
resolution: "lie@npm:3.3.0"
@@ -24103,7 +24128,7 @@ __metadata:
languageName: node
linkType: hard
"lit@npm:^2.7.6, lit@npm:^2.8.0":
"lit@npm:^2.8.0":
version: 2.8.0
resolution: "lit@npm:2.8.0"
dependencies:
@@ -29759,12 +29784,12 @@ __metadata:
languageName: node
linkType: hard
"ses@npm:^0.18.7":
version: 0.18.7
resolution: "ses@npm:0.18.7"
"ses@npm:^0.18.8":
version: 0.18.8
resolution: "ses@npm:0.18.8"
dependencies:
"@endo/env-options": ^0.1.3
checksum: 75ac014771d9bc1f747193c6d0f9e7d2d7700a10311ba8d805d9bc78d4c20d4ef40537f0535b1ea6abf06babf67e70f8bd37b2ad68ad54992a0c5ce842181c87
"@endo/env-options": ^0.1.4
checksum: d7976d2ee218baec021c5cfdfb193d63b52bf2b6cbdbbb90c19d835915a1872b6924910f7fd42bc849eb2de78fc7bdd6e7b4667e1df3c79244cc92d4ede48aa6
languageName: node
linkType: hard
@@ -33851,6 +33876,13 @@ __metadata:
languageName: node
linkType: hard
"zod@npm:^3.22.2":
version: 3.22.2
resolution: "zod@npm:3.22.2"
checksum: 231e2180c8eabb56e88680d80baff5cf6cbe6d64df3c44c50ebe52f73081ecd0229b1c7215b9552537f537a36d9e36afac2737ddd86dc14e3519bdbc777e82b9
languageName: node
linkType: hard
"zx@npm:^7.2.3":
version: 7.2.3
resolution: "zx@npm:7.2.3"