Merge remote-tracking branch 'origin/master' into payment-system

This commit is contained in:
Joooye_34 2023-10-27 16:04:48 +08:00
commit 385de7d33b
87 changed files with 1004 additions and 581 deletions

View File

@ -1,15 +0,0 @@
name: Setup maker
description: 'Setup maker dmg for electron'
runs:
using: 'composite'
steps:
- name: 'Install @electron-forge/maker-dmg'
if: runner.os == 'macos'
shell: bash
run: yarn workspace @affine/electron add @electron-forge/maker-dmg --dev
env:
HUSKY: '0'
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
ELECTRON_SKIP_BINARY_DOWNLOAD: '1'
SENTRYCLI_SKIP_DOWNLOAD: '1'

View File

@ -61,7 +61,7 @@ jobs:
environment: development
needs: build-core
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Build AFFiNE native

View File

@ -153,14 +153,14 @@ jobs:
fi
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
logout: false
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build front Dockerfile
@ -177,7 +177,7 @@ jobs:
# setup node without cache configuration
# Prisma cache is not compatible with docker build cache
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: https://npm.pkg.github.com

View File

@ -124,9 +124,6 @@ jobs:
hard-link-nm: false
build-plugins: false
nmHoistingLimits: workspaces
- name: Setup Maker
timeout-minutes: 10
uses: ./.github/actions/setup-maker
- name: Build AFFiNE native
uses: ./.github/actions/build-rust
with:
@ -217,7 +214,7 @@ jobs:
name: affine-linux-x64-builds
path: ./
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
- name: Generate Release yml

View File

@ -45,7 +45,7 @@ jobs:
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
NODE_OPTIONS: ${{ env.NODE_OPTIONS }}
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: always()
with:
name: chromatic-build-artifacts-${{ github.run_id }}

View File

@ -111,9 +111,6 @@ jobs:
hard-link-nm: false
build-plugins: false
nmHoistingLimits: workspaces
- name: Setup Maker
timeout-minutes: 10
uses: ./.github/actions/setup-maker
- name: Build AFFiNE native
uses: ./.github/actions/build-rust
with:
@ -188,9 +185,6 @@ jobs:
hard-link-nm: false
build-plugins: false
nmHoistingLimits: workspaces
- name: Setup Maker
timeout-minutes: 10
uses: ./.github/actions/setup-maker
- name: Build AFFiNE native
uses: ./.github/actions/build-rust
with:
@ -361,7 +355,7 @@ jobs:
with:
name: affine-linux-x64-builds
path: ./
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Generate Release yml
@ -371,8 +365,6 @@ jobs:
RELEASE_VERSION: ${{ github.event.inputs.version || needs.before-make.outputs.RELEASE_VERSION }}
- name: Create Release Draft
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
name: ${{ github.event.inputs.version || needs.before-make.outputs.RELEASE_VERSION }}
body: ''

View File

@ -117,14 +117,14 @@ jobs:
run: |
echo "GIT_SHORT_HASH=$(git rev-parse --short HEAD)" >> "$GITHUB_ENV"
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
logout: false
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build front Dockerfile
@ -141,7 +141,7 @@ jobs:
# setup node without cache configuration
# Prisma cache is not compatible with docker build cache
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: https://npm.pkg.github.com

View File

@ -13,7 +13,7 @@ jobs:
name: Deploy
environment: production
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Publish
uses: cloudflare/wrangler-action@v3.3.1
with:

View File

@ -1,6 +1,6 @@
{
"name": "@affine/monorepo",
"version": "0.10.0-canary.2",
"version": "0.10.0-canary.3",
"private": true,
"author": "toeverything",
"license": "MIT",

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@affine/storage",
"version": "0.10.0-canary.2",
"version": "0.10.0-canary.3",
"engines": {
"node": ">= 10.16.0 < 11 || >= 11.8.0"
},

View File

@ -8,5 +8,5 @@
"react": "18.2.0",
"react-dom": "18.2.0"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -9,5 +9,5 @@
"@types/debug": "^4.1.9",
"vitest": "0.34.6"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -3,8 +3,8 @@
"private": true,
"type": "module",
"devDependencies": {
"@blocksuite/global": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/store": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/global": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/store": "0.0.0-20231024064721-2aee7119-nightly",
"react": "18.2.0",
"react-dom": "18.2.0",
"vitest": "0.34.6",
@ -27,5 +27,5 @@
"dependencies": {
"lit": "^2.8.0"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -55,9 +55,9 @@
},
"dependencies": {
"@affine/sdk": "workspace:*",
"@blocksuite/blocks": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/global": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/store": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/blocks": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/global": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/store": "0.0.0-20231024064721-2aee7119-nightly",
"jotai": "^2.4.3",
"jotai-effect": "^0.1.0",
"tinykeys": "^2.1.0",
@ -66,8 +66,8 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine/templates": "workspace:*",
"@blocksuite/editor": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/lit": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/editor": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/lit": "0.0.0-20231024064721-2aee7119-nightly",
"@testing-library/react": "^14.0.0",
"async-call-rpc": "^6.3.1",
"electron": "link:../../frontend/electron/node_modules/electron",
@ -111,5 +111,5 @@
"optional": true
}
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -40,8 +40,18 @@ export interface AffineCommandOptions {
preconditionStrategy?: PreconditionStrategy | (() => boolean);
// main text on the left..
// make text a function so that we can do i18n and interpolation when we need to
label?: string | (() => string) | ReactNode | (() => ReactNode);
icon: React.ReactNode; // todo: need a mapping from string -> React element/SVG
label:
| string
| (() => string)
| {
title: string;
subTitle?: string;
}
| (() => {
title: string;
subTitle?: string;
});
icon: ReactNode; // todo: need a mapping from string -> React element/SVG
category?: CommandCategory;
// we use https://github.com/jamiebuilds/tinykeys so that we can use the same keybinding definition
// for both mac and windows
@ -53,8 +63,11 @@ export interface AffineCommandOptions {
export interface AffineCommand {
readonly id: string;
readonly preconditionStrategy: PreconditionStrategy | (() => boolean);
readonly label?: ReactNode | string;
readonly icon?: React.ReactNode; // icon name
readonly label: {
title: string;
subTitle?: string;
};
readonly icon?: ReactNode; // icon name
readonly category: CommandCategory;
readonly keyBinding?: KeybindingOptions;
run(): void | Promise<void>;
@ -71,8 +84,15 @@ export function createAffineCommand(
options.preconditionStrategy ?? PreconditionStrategy.Always,
category: options.category ?? 'affine:general',
get label() {
const label = options.label;
return typeof label === 'function' ? label?.() : label;
let label = options.label;
label = typeof label === 'function' ? label?.() : label;
label =
typeof label === 'string'
? {
title: label,
}
: label;
return label;
},
keyBinding:
typeof options.keyBinding === 'string'

View File

@ -1,6 +1,6 @@
{
"name": "@affine/sdk",
"version": "0.10.0-canary.2",
"version": "0.10.0-canary.3",
"type": "module",
"scripts": {
"build": "vite build",
@ -22,11 +22,11 @@
"dist"
],
"dependencies": {
"@blocksuite/block-std": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/blocks": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/editor": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/global": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/store": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/block-std": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/blocks": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/editor": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/global": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/store": "0.0.0-20231024064721-2aee7119-nightly",
"jotai": "^2.4.3",
"zod": "^3.22.4"
},

View File

@ -1,7 +1,7 @@
{
"name": "@toeverything/y-indexeddb",
"type": "module",
"version": "0.10.0-canary.2",
"version": "0.10.0-canary.3",
"description": "IndexedDB database adapter for Yjs",
"repository": "toeverything/AFFiNE",
"author": "toeverything",
@ -37,8 +37,8 @@
"y-provider": "workspace:*"
},
"devDependencies": {
"@blocksuite/blocks": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/store": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/blocks": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/store": "0.0.0-20231024064721-2aee7119-nightly",
"fake-indexeddb": "^5.0.0",
"vite": "^4.4.11",
"vite-plugin-dts": "3.6.0",

View File

@ -1,7 +1,7 @@
{
"name": "y-provider",
"type": "module",
"version": "0.10.0-canary.2",
"version": "0.10.0-canary.3",
"description": "Yjs provider protocol for multi document support",
"exports": {
".": "./src/index.ts"
@ -24,7 +24,7 @@
"build": "vite build"
},
"devDependencies": {
"@blocksuite/store": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/store": "0.0.0-20231024064721-2aee7119-nightly",
"vite": "^4.4.11",
"vite-plugin-dts": "3.6.0",
"vitest": "0.34.6",

View File

@ -63,12 +63,12 @@
"uuid": "^9.0.1"
},
"devDependencies": {
"@blocksuite/blocks": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/editor": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/global": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/icons": "2.1.34",
"@blocksuite/lit": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/store": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/blocks": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/editor": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/global": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/icons": "2.1.35",
"@blocksuite/lit": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/store": "0.0.0-20231024064721-2aee7119-nightly",
"@storybook/jest": "^0.2.3",
"@storybook/testing-library": "^0.2.2",
"@testing-library/react": "^14.0.0",
@ -84,5 +84,5 @@
"vitest": "0.34.6",
"yjs": "^13.6.8"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -1,5 +1,5 @@
import { CloseIcon } from '@blocksuite/icons';
import type React from 'react';
import type { ReactNode } from 'react';
import {
browserWarningStyle,
@ -14,7 +14,7 @@ export const BrowserWarning = ({
}: {
show: boolean;
onClose: () => void;
message: React.ReactNode;
message: ReactNode;
}) => {
if (!show) {
return null;

View File

@ -88,11 +88,7 @@ const CloudShareMenu = (props: ShareMenuProps) => {
modal: false,
}}
>
<Button
data-testid="cloud-share-menu-button"
type="plain"
onClick={() => console.log('gg')}
>
<Button data-testid="cloud-share-menu-button" type="plain">
<div
style={{
color: isSharedPage

View File

@ -2,7 +2,7 @@
"name": "@affine/core",
"type": "module",
"private": true,
"version": "0.10.0-canary.2",
"version": "0.10.0-canary.3",
"scripts": {
"build": "yarn -T run build-core",
"dev": "yarn -T run dev-core",
@ -24,13 +24,13 @@
"@affine/i18n": "workspace:*",
"@affine/templates": "workspace:*",
"@affine/workspace": "workspace:*",
"@blocksuite/block-std": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/blocks": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/editor": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/global": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/icons": "2.1.34",
"@blocksuite/lit": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/store": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/block-std": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/blocks": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/editor": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/global": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/icons": "2.1.35",
"@blocksuite/lit": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/store": "0.0.0-20231024064721-2aee7119-nightly",
"@dnd-kit/core": "^6.0.8",
"@dnd-kit/sortable": "^7.0.2",
"@emotion/cache": "^11.11.0",

View File

@ -1,4 +1,4 @@
import { atom, useAtom } from 'jotai';
import { atom } from 'jotai';
import { atomWithStorage } from 'jotai/utils';
export type DateFormats =
@ -75,7 +75,3 @@ export const appSettingAtom = atom<
set(appSettingBaseAtom, { ...prev, ...next });
}
);
export const useAppSetting = () => {
return useAtom(appSettingAtom);
};

View File

@ -20,7 +20,7 @@ export function registerAffineCreationCommands({
registerAffineCommand({
id: 'affine:new-page',
category: 'affine:creation',
label: t['com.affine.cmdk.affine.new-page'],
label: t['com.affine.cmdk.affine.new-page'](),
icon: <PlusIcon />,
keyBinding: environment.isDesktop
? {
@ -39,7 +39,7 @@ export function registerAffineCreationCommands({
id: 'affine:new-edgeless-page',
category: 'affine:creation',
icon: <PlusIcon />,
label: t['com.affine.cmdk.affine.new-edgeless-page'],
label: t['com.affine.cmdk.affine.new-edgeless-page'](),
run() {
pageHelper.createEdgeless();
},
@ -51,7 +51,7 @@ export function registerAffineCreationCommands({
id: 'affine:new-workspace',
category: 'affine:creation',
icon: <PlusIcon />,
label: t['com.affine.cmdk.affine.new-workspace'],
label: t['com.affine.cmdk.affine.new-workspace'](),
run() {
store.set(openCreateWorkspaceModalAtom, 'new');
},
@ -62,7 +62,7 @@ export function registerAffineCreationCommands({
id: 'affine:import-workspace',
category: 'affine:creation',
icon: <ImportIcon />,
label: t['com.affine.cmdk.affine.import-workspace'],
label: t['com.affine.cmdk.affine.import-workspace'](),
preconditionStrategy: () => {
return environment.isDesktop;
},

View File

@ -18,7 +18,7 @@ export function registerAffineHelpCommands({
id: 'affine:help-whats-new',
category: 'affine:help',
icon: <NewIcon />,
label: () => t['com.affine.cmdk.affine.whats-new'](),
label: t['com.affine.cmdk.affine.whats-new'](),
run() {
window.open(runtimeConfig.changelogUrl, '_blank');
},
@ -29,7 +29,7 @@ export function registerAffineHelpCommands({
id: 'affine:help-contact-us',
category: 'affine:help',
icon: <ContactWithUsIcon />,
label: () => t['com.affine.cmdk.affine.contact-us'](),
label: t['com.affine.cmdk.affine.contact-us'](),
run() {
store.set(openSettingModalAtom, {
open: true,
@ -44,7 +44,7 @@ export function registerAffineHelpCommands({
id: 'affine:help-getting-started',
category: 'affine:help',
icon: <UserGuideIcon />,
label: () => t['com.affine.cmdk.affine.getting-started'](),
label: t['com.affine.cmdk.affine.getting-started'](),
preconditionStrategy: () => environment.isDesktop,
run() {
store.set(openOnboardingModalAtom, true);

View File

@ -17,14 +17,11 @@ export function registerAffineLayoutCommands({
id: 'affine:toggle-left-sidebar',
category: 'affine:layout',
icon: <SidebarIcon />,
label: () => {
const open = store.get(appSidebarOpenAtom);
return t[
open
? 'com.affine.cmdk.affine.left-sidebar.collapse'
: 'com.affine.cmdk.affine.left-sidebar.expand'
]();
},
label: () =>
store.get(appSidebarOpenAtom)
? t['com.affine.cmdk.affine.left-sidebar.collapse']()
: t['com.affine.cmdk.affine.left-sidebar.expand'](),
keyBinding: {
binding: '$mod+/',
},

View File

@ -33,7 +33,7 @@ export function registerAffineNavigationCommands({
id: 'affine:goto-all-pages',
category: 'affine:navigation',
icon: <ArrowRightBigIcon />,
label: () => t['com.affine.cmdk.affine.navigation.goto-all-pages'](),
label: t['com.affine.cmdk.affine.navigation.goto-all-pages'](),
run() {
navigationHelper.jumpToSubPath(workspace.id, WorkspaceSubPath.ALL);
setPageListMode('all');
@ -49,7 +49,7 @@ export function registerAffineNavigationCommands({
preconditionStrategy: () => {
return pageListMode !== 'page';
},
label: () => t['com.affine.cmdk.affine.navigation.goto-page-list'](),
label: t['com.affine.cmdk.affine.navigation.goto-page-list'](),
run() {
navigationHelper.jumpToSubPath(workspace.id, WorkspaceSubPath.ALL);
setPageListMode('page');
@ -65,7 +65,7 @@ export function registerAffineNavigationCommands({
preconditionStrategy: () => {
return pageListMode !== 'edgeless';
},
label: () => t['com.affine.cmdk.affine.navigation.goto-edgeless-list'](),
label: t['com.affine.cmdk.affine.navigation.goto-edgeless-list'](),
run() {
navigationHelper.jumpToSubPath(workspace.id, WorkspaceSubPath.ALL);
setPageListMode('edgeless');
@ -78,7 +78,7 @@ export function registerAffineNavigationCommands({
id: 'affine:goto-workspace',
category: 'affine:navigation',
icon: <ArrowRightBigIcon />,
label: () => t['com.affine.cmdk.affine.navigation.goto-workspace'](),
label: t['com.affine.cmdk.affine.navigation.goto-workspace'](),
run() {
store.set(openWorkspaceListModalAtom, true);
},
@ -90,7 +90,7 @@ export function registerAffineNavigationCommands({
id: 'affine:open-settings',
category: 'affine:navigation',
icon: <ArrowRightBigIcon />,
label: () => t['com.affine.cmdk.affine.navigation.open-settings'](),
label: t['com.affine.cmdk.affine.navigation.open-settings'](),
run() {
store.set(openSettingModalAtom, {
activeTab: 'appearance',
@ -106,7 +106,7 @@ export function registerAffineNavigationCommands({
id: 'affine:goto-trash',
category: 'affine:navigation',
icon: <ArrowRightBigIcon />,
label: () => t['com.affine.cmdk.affine.navigation.goto-trash'](),
label: t['com.affine.cmdk.affine.navigation.goto-trash'](),
run() {
navigationHelper.jumpToSubPath(workspace.id, WorkspaceSubPath.TRASH);
setPageListMode('all');

View File

@ -1,76 +1,16 @@
import { Trans } from '@affine/i18n';
import type { useAFFiNEI18N } from '@affine/i18n/hooks';
import { SettingsIcon } from '@blocksuite/icons';
import {
PreconditionStrategy,
registerAffineCommand,
} from '@toeverything/infra/command';
import { type createStore, useAtomValue } from 'jotai';
import { type createStore } from 'jotai';
import type { useTheme } from 'next-themes';
import { openQuickSearchModalAtom } from '../atoms';
import { appSettingAtom } from '../atoms/settings';
import type { useLanguageHelper } from '../hooks/affine/use-language-helper';
// todo - find a better way to abstract the following translations components
const ClientBorderStyleLabel = () => {
const { clientBorder } = useAtomValue(appSettingAtom);
return (
<Trans
i18nKey="com.affine.cmdk.affine.client-border-style.to"
values={{
state: clientBorder ? 'OFF' : 'ON',
}}
>
Change Client Border Style to
<strong>state</strong>
</Trans>
);
};
const FullWidthLayoutLabel = () => {
const { fullWidthLayout } = useAtomValue(appSettingAtom);
return (
<Trans
i18nKey="com.affine.cmdk.affine.full-width-layout.to"
values={{
state: fullWidthLayout ? 'OFF' : 'ON',
}}
>
Change Full Width Layout to
<strong>state</strong>
</Trans>
);
};
const NoisyBackgroundLabel = () => {
const { enableNoisyBackground } = useAtomValue(appSettingAtom);
return (
<Trans
i18nKey="com.affine.cmdk.affine.noise-background-on-the-sidebar.to"
values={{
state: enableNoisyBackground ? 'OFF' : 'ON',
}}
>
Change Noise Background On The Sidebar to <strong>state</strong>
</Trans>
);
};
const BlurBackgroundLabel = () => {
const { enableBlurBackground } = useAtomValue(appSettingAtom);
return (
<Trans
i18nKey="com.affine.cmdk.affine.translucent-ui-on-the-sidebar.to"
values={{
state: enableBlurBackground ? 'OFF' : 'ON',
}}
>
Change Translucent UI On The Sidebar to <strong>state</strong>
</Trans>
);
};
export function registerAffineSettingsCommands({
t,
store,
@ -83,7 +23,7 @@ export function registerAffineSettingsCommands({
languageHelper: ReturnType<typeof useLanguageHelper>;
}) {
const unsubs: Array<() => void> = [];
const { onSelect, languagesList, currentLanguage } = languageHelper;
const { onLanguageChange, languagesList, currentLanguage } = languageHelper;
unsubs.push(
registerAffineCommand({
id: 'affine:show-quick-search',
@ -92,6 +32,7 @@ export function registerAffineSettingsCommands({
keyBinding: {
binding: '$mod+K',
},
label: '',
icon: <SettingsIcon />,
run() {
const quickSearchModalState = store.get(openQuickSearchModalAtom);
@ -104,14 +45,9 @@ export function registerAffineSettingsCommands({
unsubs.push(
registerAffineCommand({
id: 'affine:change-color-scheme-to-auto',
label: (
<Trans
i18nKey="com.affine.cmdk.affine.color-scheme.to"
values={{ colour: 'Auto' }}
>
Change Colour Scheme to <strong>colour</strong>
</Trans>
),
label: `${t['com.affine.cmdk.affine.color-scheme.to']()} ${t[
'com.affine.themeSettings.system'
]()}`,
category: 'affine:settings',
icon: <SettingsIcon />,
preconditionStrategy: () => theme.theme !== 'system',
@ -123,14 +59,9 @@ export function registerAffineSettingsCommands({
unsubs.push(
registerAffineCommand({
id: 'affine:change-color-scheme-to-dark',
label: (
<Trans
i18nKey="com.affine.cmdk.affine.color-scheme.to"
values={{ colour: 'Dark' }}
>
Change Colour Scheme to <strong>colour</strong>
</Trans>
),
label: `${t['com.affine.cmdk.affine.color-scheme.to']()} ${t[
'com.affine.themeSettings.dark'
]()}`,
category: 'affine:settings',
icon: <SettingsIcon />,
preconditionStrategy: () => theme.theme !== 'dark',
@ -143,14 +74,9 @@ export function registerAffineSettingsCommands({
unsubs.push(
registerAffineCommand({
id: 'affine:change-color-scheme-to-light',
label: (
<Trans
i18nKey="com.affine.cmdk.affine.color-scheme.to"
values={{ colour: 'Light' }}
>
Change Colour Scheme to <strong>colour</strong>
</Trans>
),
label: `${t['com.affine.cmdk.affine.color-scheme.to']()} ${t[
'com.affine.themeSettings.light'
]()}`,
category: 'affine:settings',
icon: <SettingsIcon />,
preconditionStrategy: () => theme.theme !== 'light',
@ -164,16 +90,9 @@ export function registerAffineSettingsCommands({
unsubs.push(
registerAffineCommand({
id: 'affine:change-font-style-to-sans',
label: (
<Trans
i18nKey="com.affine.cmdk.affine.font-style.to"
values={{
fontFamily: t['com.affine.appearanceSettings.fontStyle.sans'](),
}}
>
Change Font Style to <strong>fontFamily</strong>
</Trans>
),
label: `${t['com.affine.cmdk.affine.font-style.to']()} ${t[
'com.affine.appearanceSettings.fontStyle.sans'
]()}`,
category: 'affine:settings',
icon: <SettingsIcon />,
preconditionStrategy: () =>
@ -190,19 +109,9 @@ export function registerAffineSettingsCommands({
unsubs.push(
registerAffineCommand({
id: 'affine:change-font-style-to-serif',
label: (
<Trans
i18nKey="com.affine.cmdk.affine.font-style.to"
values={{
fontFamily: t['com.affine.appearanceSettings.fontStyle.serif'](),
}}
>
Change Font Style to
<strong style={{ fontFamily: 'var(--affine-font-serif-family)' }}>
fontFamily
</strong>
</Trans>
),
label: `${t['com.affine.cmdk.affine.font-style.to']()} ${t[
'com.affine.appearanceSettings.fontStyle.serif'
]()}`,
category: 'affine:settings',
icon: <SettingsIcon />,
preconditionStrategy: () =>
@ -219,19 +128,9 @@ export function registerAffineSettingsCommands({
unsubs.push(
registerAffineCommand({
id: 'affine:change-font-style-to-mono',
label: (
<Trans
i18nKey="com.affine.cmdk.affine.font-style.to"
values={{
fontFamily: t['com.affine.appearanceSettings.fontStyle.mono'](),
}}
>
Change Font Style to
<strong style={{ fontFamily: 'var(--affine-font-mono-family)' }}>
fontFamily
</strong>
</Trans>
),
label: `${t['com.affine.cmdk.affine.font-style.to']()} ${t[
'com.affine.appearanceSettings.fontStyle.mono'
]()}`,
category: 'affine:settings',
icon: <SettingsIcon />,
preconditionStrategy: () =>
@ -250,22 +149,14 @@ export function registerAffineSettingsCommands({
unsubs.push(
registerAffineCommand({
id: `affine:change-display-language-to-${language.name}`,
label: (
<Trans
i18nKey="com.affine.cmdk.affine.display-language.to"
values={{
language: language.originalName,
}}
>
Change Display Language to
<strong>language</strong>
</Trans>
),
label: `${t['com.affine.cmdk.affine.display-language.to']()} ${
language.originalName
}`,
category: 'affine:settings',
icon: <SettingsIcon />,
preconditionStrategy: () => currentLanguage?.tag !== language.tag,
run() {
onSelect(language.tag);
onLanguageChange(language.tag);
},
})
);
@ -275,7 +166,12 @@ export function registerAffineSettingsCommands({
unsubs.push(
registerAffineCommand({
id: `affine:change-client-border-style`,
label: <ClientBorderStyleLabel />,
label: () => `${t['com.affine.cmdk.affine.client-border-style.to']()} ${t[
store.get(appSettingAtom).clientBorder
? 'com.affine.cmdk.affine.switch-state.off'
: 'com.affine.cmdk.affine.switch-state.on'
]()}
`,
category: 'affine:settings',
icon: <SettingsIcon />,
preconditionStrategy: () => environment.isDesktop,
@ -291,7 +187,12 @@ export function registerAffineSettingsCommands({
unsubs.push(
registerAffineCommand({
id: `affine:change-full-width-layout`,
label: <FullWidthLayoutLabel />,
label: () =>
`${t['com.affine.cmdk.affine.full-width-layout.to']()} ${t[
store.get(appSettingAtom).fullWidthLayout
? 'com.affine.cmdk.affine.switch-state.off'
: 'com.affine.cmdk.affine.switch-state.on'
]()}`,
category: 'affine:settings',
icon: <SettingsIcon />,
run() {
@ -306,7 +207,14 @@ export function registerAffineSettingsCommands({
unsubs.push(
registerAffineCommand({
id: `affine:change-noise-background-on-the-sidebar`,
label: <NoisyBackgroundLabel />,
label: () =>
`${t[
'com.affine.cmdk.affine.noise-background-on-the-sidebar.to'
]()} ${t[
store.get(appSettingAtom).enableNoisyBackground
? 'com.affine.cmdk.affine.switch-state.off'
: 'com.affine.cmdk.affine.switch-state.on'
]()}`,
category: 'affine:settings',
icon: <SettingsIcon />,
preconditionStrategy: () => environment.isDesktop,
@ -322,7 +230,12 @@ export function registerAffineSettingsCommands({
unsubs.push(
registerAffineCommand({
id: `affine:change-translucent-ui-on-the-sidebar`,
label: <BlurBackgroundLabel />,
label: () =>
`${t['com.affine.cmdk.affine.translucent-ui-on-the-sidebar.to']()} ${t[
store.get(appSettingAtom).enableBlurBackground
? 'com.affine.cmdk.affine.switch-state.off'
: 'com.affine.cmdk.affine.switch-state.on'
]()}`,
category: 'affine:settings',
icon: <SettingsIcon />,
preconditionStrategy: () => environment.isDesktop,

View File

@ -18,7 +18,7 @@ export function registerAffineUpdatesCommands({
id: 'affine:restart-to-upgrade',
category: 'affine:updates',
icon: <ResetIcon />,
label: () => t['com.affine.cmdk.affine.restart-to-upgrade'](),
label: t['com.affine.cmdk.affine.restart-to-upgrade'](),
preconditionStrategy: () => !!store.get(updateReadyAtom),
run() {
window.apis?.updater.quitAndInstall().catch(err => {

View File

@ -3,10 +3,10 @@ import {
type WorkspaceRootProps,
} from '@affine/component/workspace';
import { useAppSetting } from '../../atoms/settings';
import { useAppSettingHelper } from '../../hooks/affine/use-app-setting-helper';
export const AppContainer = (props: WorkspaceRootProps) => {
const [appSettings] = useAppSetting();
const { appSettings } = useAppSettingHelper();
return (
<AppContainerWithoutSettings

View File

@ -5,7 +5,8 @@ import { useLanguageHelper } from '../../../hooks/affine/use-language-helper';
// Fixme: keyboard focus should be supported by Menu component
const LanguageMenuContent = memo(function LanguageMenuContent() {
const { currentLanguage, languagesList, onSelect } = useLanguageHelper();
const { currentLanguage, languagesList, onLanguageChange } =
useLanguageHelper();
return (
<>
{languagesList.map(option => {
@ -14,7 +15,7 @@ const LanguageMenuContent = memo(function LanguageMenuContent() {
key={option.name}
selected={currentLanguage?.originalName === option.originalName}
title={option.name}
onSelect={() => onSelect(option.tag)}
onSelect={() => onLanguageChange(option.tag)}
>
{option.originalName}
</MenuItem>

View File

@ -66,12 +66,7 @@ const PublishPanelAffine = (props: PublishPanelAffineProps) => {
marginBottom: isPublic ? '12px' : '25px',
}}
>
<Switch
checked={isPublic}
// onChange={useCallback(value => {
// console.log('onChange', value);
// }, [])}
/>
<Switch checked={isPublic} />
</SettingRow>
{isPublic ? (
<FlexWrapper justifyContent="space-between" marginBottom={25}>

View File

@ -15,7 +15,7 @@ export const relatedLinks = [
},
{
icon: <TwitterIcon />,
title: 'Twitter',
title: 'X',
link: 'https://twitter.com/AffineOfficial',
},
{

View File

@ -1,3 +1,6 @@
// The icons here have been specially adjusted, theyre different from the ones in the @blocksuite/icons.
export { TwitterIcon } from '@blocksuite/icons';
export const LogoIcon = () => {
return (
<svg
@ -33,23 +36,6 @@ export const DocIcon = () => {
);
};
export const TwitterIcon = () => {
return (
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M22 5.88235C21.2639 6.21176 20.4704 6.42824 19.6482 6.53176C20.4895 6.03294 21.1396 5.24235 21.4455 4.29176C20.652 4.76235 19.7725 5.09176 18.8451 5.28C18.0899 4.47059 17.0287 4 15.8241 4C13.5774 4 11.7419 5.80706 11.7419 8.03765C11.7419 8.35765 11.7801 8.66824 11.847 8.96C8.4436 8.79059 5.413 7.18118 3.39579 4.74353C3.04207 5.33647 2.8413 6.03294 2.8413 6.76706C2.8413 8.16941 3.55832 9.41176 4.6673 10.1176C3.98853 10.1176 3.35755 9.92941 2.80306 9.64706V9.67529C2.80306 11.6329 4.21797 13.2706 6.09178 13.6376C5.49018 13.7997 4.8586 13.8223 4.24665 13.7035C4.50632 14.5059 5.01485 15.2079 5.70078 15.711C6.38671 16.2141 7.21553 16.4929 8.07075 16.5082C6.62106 17.6381 4.82409 18.2488 2.97514 18.24C2.6501 18.24 2.32505 18.2212 2 18.1835C3.81644 19.3318 5.97706 20 8.29063 20C15.8241 20 19.9637 13.8447 19.9637 8.50824C19.9637 8.32941 19.9637 8.16 19.9541 7.98118C20.7572 7.41647 21.4455 6.70118 22 5.88235Z"
fill="#1D9BF0"
/>
</svg>
);
};
export const GithubIcon = () => {
return (
<svg

View File

@ -4,21 +4,14 @@ import { SettingRow } from '@affine/component/setting-components';
import { SettingWrapper } from '@affine/component/setting-components';
import { useAFFiNEI18N } from '@affine/i18n/hooks';
import { ArrowRightSmallIcon, OpenInNewIcon } from '@blocksuite/icons';
import { useCallback } from 'react';
import { type AppSetting, useAppSetting } from '../../../../../atoms/settings';
import { useAppSettingHelper } from '../../../../../hooks/affine/use-app-setting-helper';
import { relatedLinks } from './config';
import { communityItem, communityWrapper, link } from './style.css';
export const AboutAffine = () => {
const t = useAFFiNEI18N();
const [appSettings, setAppSettings] = useAppSetting();
const changeSwitch = useCallback(
(key: keyof AppSetting, checked: boolean) => {
setAppSettings({ [key]: checked });
},
[setAppSettings]
);
const { appSettings, updateSettings } = useAppSettingHelper();
return (
<>
<SettingHeader
@ -47,7 +40,7 @@ export const AboutAffine = () => {
>
<Switch
checked={appSettings.autoCheckUpdate}
onChange={checked => changeSwitch('autoCheckUpdate', checked)}
onChange={checked => updateSettings('autoCheckUpdate', checked)}
/>
</SettingRow>
<SettingRow
@ -58,7 +51,7 @@ export const AboutAffine = () => {
>
<Switch
checked={appSettings.autoCheckUpdate}
onChange={checked => changeSwitch('autoCheckUpdate', checked)}
onChange={checked => updateSettings('autoCheckUpdate', checked)}
/>
</SettingRow>
<SettingRow

View File

@ -5,8 +5,8 @@ import { useCallback } from 'react';
import {
dateFormatOptions,
type DateFormats,
useAppSetting,
} from '../../../../../atoms/settings';
import { useAppSettingHelper } from '../../../../../hooks/affine/use-app-setting-helper';
interface DateFormatMenuContentProps {
currentOption: DateFormats;
@ -35,12 +35,12 @@ const DateFormatMenuContent = ({
};
export const DateFormatSetting = () => {
const [appearanceSettings, setAppSettings] = useAppSetting();
const { appSettings, updateSettings } = useAppSettingHelper();
const handleSelect = useCallback(
(option: DateFormats) => {
setAppSettings({ dateFormat: option });
updateSettings('dateFormat', option);
},
[setAppSettings]
[updateSettings]
);
return (
@ -48,12 +48,12 @@ export const DateFormatSetting = () => {
items={
<DateFormatMenuContent
onSelect={handleSelect}
currentOption={appearanceSettings.dateFormat}
currentOption={appSettings.dateFormat}
/>
}
>
<MenuTrigger data-testid="date-format-menu-trigger" block>
{dayjs(new Date()).format(appearanceSettings.dateFormat)}
{dayjs(new Date()).format(appSettings.dateFormat)}
</MenuTrigger>
</Menu>
);

View File

@ -9,9 +9,9 @@ import { useCallback } from 'react';
import {
type AppSetting,
fontStyleOptions,
useAppSetting,
windowFrameStyleOptions,
} from '../../../../../atoms/settings';
import { useAppSettingHelper } from '../../../../../hooks/affine/use-app-setting-helper';
import { LanguageMenu } from '../../../language-menu';
import { DateFormatSetting } from './date-format-setting';
import { settingWrapper } from './style.css';
@ -47,7 +47,7 @@ export const ThemeSettings = () => {
const FontFamilySettings = () => {
const t = useAFFiNEI18N();
const [appSettings, setAppSettings] = useAppSetting();
const { appSettings, updateSettings } = useAppSettingHelper();
return (
<RadioButtonGroup
width={250}
@ -55,9 +55,9 @@ const FontFamilySettings = () => {
value={appSettings.fontStyle}
onValueChange={useCallback(
(key: AppSetting['fontStyle']) => {
setAppSettings({ fontStyle: key });
updateSettings('fontStyle', key);
},
[setAppSettings]
[updateSettings]
)}
>
{fontStyleOptions.map(({ key, value }) => {
@ -95,14 +95,8 @@ const FontFamilySettings = () => {
export const AppearanceSettings = () => {
const t = useAFFiNEI18N();
const [appSettings, setAppSettings] = useAppSetting();
const { appSettings, updateSettings } = useAppSettingHelper();
const changeSwitch = useCallback(
(key: keyof AppSetting, checked: boolean) => {
setAppSettings({ [key]: checked });
},
[setAppSettings]
);
return (
<>
<SettingHeader
@ -139,7 +133,7 @@ export const AppearanceSettings = () => {
>
<Switch
checked={appSettings.clientBorder}
onChange={checked => changeSwitch('clientBorder', checked)}
onChange={checked => updateSettings('clientBorder', checked)}
/>
</SettingRow>
) : null}
@ -151,7 +145,7 @@ export const AppearanceSettings = () => {
<Switch
data-testid="full-width-layout-trigger"
checked={appSettings.fullWidthLayout}
onChange={checked => changeSwitch('fullWidthLayout', checked)}
onChange={checked => updateSettings('fullWidthLayout', checked)}
/>
</SettingRow>
{runtimeConfig.enableNewSettingUnstableApi && environment.isDesktop ? (
@ -164,7 +158,7 @@ export const AppearanceSettings = () => {
width={250}
defaultValue={appSettings.windowFrameStyle}
onValueChange={(value: AppSetting['windowFrameStyle']) => {
setAppSettings({ windowFrameStyle: value });
updateSettings('windowFrameStyle', value);
}}
>
{windowFrameStyleOptions.map(option => {
@ -194,7 +188,7 @@ export const AppearanceSettings = () => {
>
<Switch
checked={appSettings.startWeekOnMonday}
onChange={checked => changeSwitch('startWeekOnMonday', checked)}
onChange={checked => updateSettings('startWeekOnMonday', checked)}
/>
</SettingRow>
</SettingWrapper>
@ -213,7 +207,7 @@ export const AppearanceSettings = () => {
<Switch
checked={appSettings.enableNoisyBackground}
onChange={checked =>
changeSwitch('enableNoisyBackground', checked)
updateSettings('enableNoisyBackground', checked)
}
/>
</SettingRow>
@ -227,7 +221,7 @@ export const AppearanceSettings = () => {
<Switch
checked={appSettings.enableBlurBackground}
onChange={checked =>
changeSwitch('enableBlurBackground', checked)
updateSettings('enableBlurBackground', checked)
}
/>
</SettingRow>

View File

@ -29,7 +29,8 @@ import {
import { Panel, PanelGroup, PanelResizeHandle } from 'react-resizable-panels';
import { pageSettingFamily } from '../atoms';
import { fontStyleOptions, useAppSetting } from '../atoms/settings';
import { fontStyleOptions } from '../atoms/settings';
import { useAppSettingHelper } from '../hooks/affine/use-app-setting-helper';
import { BlockSuiteEditor as Editor } from './blocksuite/block-suite-editor';
import { Bookmark } from './bookmark';
import * as styles from './page-detail-editor.css';
@ -68,7 +69,7 @@ const EditorWrapper = memo(function EditorWrapper({
const currentMode = pageSetting?.mode ?? 'page';
const setBlockHub = useSetAtom(rootBlockHubAtom);
const [appSettings] = useAppSetting();
const { appSettings } = useAppSettingHelper();
assertExists(meta);
const value = useMemo(() => {

View File

@ -1,7 +1,6 @@
import { commandScore } from '@affine/cmdk';
import { useCollectionManager } from '@affine/component/page-list';
import type { Collection } from '@affine/env/filter';
import { Trans } from '@affine/i18n';
import { useAFFiNEI18N } from '@affine/i18n/hooks';
import { EdgelessIcon, PageIcon, ViewLayersIcon } from '@blocksuite/icons';
import type { Page, PageMeta } from '@blocksuite/store';
@ -150,19 +149,28 @@ export const pageToCommand = (
page: PageMeta,
store: ReturnType<typeof getCurrentStore>,
navigationHelper: ReturnType<typeof useNavigateHelper>,
t: ReturnType<typeof useAFFiNEI18N>
t: ReturnType<typeof useAFFiNEI18N>,
label?: {
title: string;
subTitle?: string;
}
): CMDKCommand => {
const pageMode = store.get(pageSettingsAtom)?.[page.id]?.mode;
const currentWorkspaceId = store.get(currentWorkspaceIdAtom);
const label = page.title || t['Untitled']();
const title = page.title || t['Untitled']();
const commandLabel = label || {
title: title,
};
return {
id: page.id,
label: label,
label: commandLabel,
// hack: when comparing, the part between >>> and <<< will be ignored
// adding this patch so that CMDK will not complain about duplicated commands
value:
label + valueWrapperStart + page.id + '.' + category + valueWrapperEnd,
originalValue: label,
title + valueWrapperStart + page.id + '.' + category + valueWrapperEnd,
originalValue: title,
category: category,
run: () => {
if (!currentWorkspaceId) {
@ -179,8 +187,6 @@ export const pageToCommand = (
const contentMatchedMagicString = '__$$content_matched$$__';
export const usePageCommands = () => {
// todo: considering collections for searching pages
// const { savedCollections } = useCollectionManager(currentCollectionsAtom);
const recentPages = useRecentPages();
const pages = useWorkspacePages();
const store = getCurrentStore();
@ -203,11 +209,11 @@ export const usePageCommands = () => {
workspace.blockSuiteWorkspace.search({ query }).values()
) as unknown as { space: string; content: string }[];
const pageIds = searchResults.map(id => {
if (id.space.startsWith('space:')) {
return id.space.slice(6);
const pageIds = searchResults.map(result => {
if (result.space.startsWith('space:')) {
return result.space.slice(6);
} else {
return id.space;
return result.space;
}
});
@ -215,12 +221,21 @@ export const usePageCommands = () => {
const pageMode = store.get(pageSettingsAtom)?.[page.id]?.mode;
const category =
pageMode === 'edgeless' ? 'affine:edgeless' : 'affine:pages';
const label = {
title: page.title || t['Untitled'](), // Used to ensure that a title exists
subTitle:
searchResults.find(result => result.space === page.id)?.content ||
'',
};
const command = pageToCommand(
category,
page,
store,
navigationHelper,
t
t,
label
);
if (pageIds.includes(page.id)) {
@ -235,14 +250,7 @@ export const usePageCommands = () => {
if (results.every(command => command.originalValue !== query)) {
results.push({
id: 'affine:pages:create-page',
label: (
<Trans
i18nKey="com.affine.cmdk.affine.create-new-page-as"
values={{ query }}
>
Create New Page as: <strong>query</strong>
</Trans>
),
label: `${t['com.affine.cmdk.affine.create-new-page-as']()} ${query}`,
value: 'affine::create-page' + query, // hack to make the page always showing in the search result
category: 'affine:creation',
run: async () => {
@ -255,14 +263,9 @@ export const usePageCommands = () => {
results.push({
id: 'affine:pages:create-edgeless',
label: (
<Trans
values={{ query }}
i18nKey="com.affine.cmdk.affine.create-new-edgeless-as"
>
Create New Edgeless as: <strong>query</strong>
</Trans>
),
label: `${t[
'com.affine.cmdk.affine.create-new-edgeless-as'
]()} ${query}`,
value: 'affine::create-edgeless' + query, // hack to make the page always showing in the search result
category: 'affine:creation',
run: async () => {

View File

@ -0,0 +1,33 @@
import { style } from '@vanilla-extract/css';
export const highlightContainer = style({
display: 'flex',
flexWrap: 'nowrap',
});
export const highlightText = style({
whiteSpace: 'pre',
overflow: 'hidden',
textOverflow: 'ellipsis',
});
export const highlightKeyword = style({
color: 'var(--affine-primary-color)',
whiteSpace: 'pre',
overflow: 'visible',
flexShrink: 0,
});
export const labelTitle = style({
fontSize: 'var(--affine-font-base)',
lineHeight: '24px',
fontWeight: 400,
textAlign: 'justify',
});
export const labelContent = style({
fontSize: 'var(--affine-font-xs)',
lineHeight: '20px',
fontWeight: 400,
textAlign: 'justify',
});

View File

@ -0,0 +1,78 @@
import { escapeRegExp } from 'lodash-es';
import { memo } from 'react';
import {
highlightContainer,
highlightKeyword,
highlightText,
labelContent,
labelTitle,
} from './highlight.css';
type SearchResultLabel = {
title: string;
subTitle?: string;
};
type HighlightProps = {
text: string;
highlight: string;
};
type HighlightLabelProps = {
label: SearchResultLabel;
highlight: string;
};
export const Highlight = memo(function Highlight({
text = '',
highlight = '',
}: HighlightProps) {
//Regex is used to ignore case
const regex = highlight.trim()
? new RegExp(`(${escapeRegExp(highlight)})`, 'ig')
: null;
if (!regex) {
return <span>{text}</span>;
}
const parts = text.split(regex);
return (
<div className={highlightContainer}>
{parts.map((part, i) => {
if (regex.test(part)) {
return (
<span key={i} className={highlightKeyword}>
{part}
</span>
);
} else {
return (
<span key={i} className={highlightText}>
{part}
</span>
);
}
})}
</div>
);
});
export const HighlightLabel = memo(function HighlightLabel({
label,
highlight,
}: HighlightLabelProps) {
return (
<div>
<div className={labelTitle}>
<Highlight text={label.title} highlight={highlight} />
</div>
{label.subTitle ? (
<div className={labelContent}>
<Highlight text={label.subTitle} highlight={highlight} />
</div>
) : null}
</div>
);
});

View File

@ -76,6 +76,8 @@ export const timestamp = style({
display: 'flex',
fontSize: 'var(--affine-font-xs)',
color: 'var(--affine-text-secondary-color)',
minWidth: 120,
flexDirection: 'row-reverse',
});
export const keybinding = style({
@ -153,8 +155,8 @@ globalStyle(`${root} [cmdk-list]:hover::-webkit-scrollbar-thumb:hover`, {
globalStyle(`${root} [cmdk-item]`, {
display: 'flex',
height: 44,
padding: '0 12px',
minHeight: 44,
padding: '6px 12px',
alignItems: 'center',
cursor: 'default',
borderRadius: 4,

View File

@ -4,7 +4,7 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks';
import type { PageMeta } from '@blocksuite/store';
import type { CommandCategory } from '@toeverything/infra/command';
import clsx from 'clsx';
import { useAtom, useSetAtom } from 'jotai';
import { useAtom } from 'jotai';
import { Suspense, useLayoutEffect, useMemo, useState } from 'react';
import {
@ -13,8 +13,10 @@ import {
customCommandFilter,
useCMDKCommandGroups,
} from './data';
import { HighlightLabel } from './highlight';
import * as styles from './main.css';
import { CMDKModal, type CMDKModalProps } from './modal';
import { NotFoundGroup } from './not-found';
import type { CMDKCommand } from './types';
type NoParametersKeys<T> = {
@ -52,10 +54,16 @@ const QuickSearchGroup = ({
}) => {
const t = useAFFiNEI18N();
const i18nkey = categoryToI18nKey[category];
const setQuery = useSetAtom(cmdkQueryAtom);
const [query, setQuery] = useAtom(cmdkQueryAtom);
return (
<Command.Group key={category} heading={t[i18nkey]()}>
{commands.map(command => {
const label =
typeof command.label === 'string'
? {
title: command.label,
}
: command.label;
return (
<Command.Item
key={command.id}
@ -78,7 +86,7 @@ const QuickSearchGroup = ({
command.originalValue ? command.originalValue : undefined
}
>
{command.label}
<HighlightLabel highlight={query} label={label} />
</div>
{command.timestamp ? (
<div className={styles.timestamp}>
@ -197,6 +205,7 @@ export const CMDKContainer = ({
<Command.List data-opening={opening ? true : undefined}>
{children}
</Command.List>
<NotFoundGroup />
</Command>
);
};

View File

@ -0,0 +1,40 @@
import { style } from '@vanilla-extract/css';
export const notFoundContainer = style({
display: 'flex',
flexDirection: 'column',
padding: '0 8px',
marginBottom: 8,
});
export const notFoundItem = style({
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-start',
padding: '0 12px',
gap: 16,
});
export const notFoundIcon = style({
display: 'flex',
alignItems: 'center',
fontSize: 20,
color: 'var(--affine-icon-secondary)',
padding: '12px 0',
});
export const notFoundTitle = style({
fontSize: 'var(--affine-font-xs)',
color: 'var(--affine-text-secondary-color)',
fontWeight: '600',
lineHeight: '20px',
textAlign: 'justify',
padding: '8px',
});
export const notFoundText = style({
fontSize: 'var(--affine-font-sm)',
color: 'var(--affine-text-primary-color)',
lineHeight: '22px',
fontWeight: '400',
});

View File

@ -0,0 +1,31 @@
import { useCommandState } from '@affine/cmdk';
import { SearchIcon } from '@blocksuite/icons';
import { useAtomValue } from 'jotai';
import { cmdkQueryAtom } from './data';
import * as styles from './not-found.css';
export const NotFoundGroup = () => {
const query = useAtomValue(cmdkQueryAtom);
// hack: we know that the filtered count is 2 when there is no result (create page & edgeless)
const renderNoResult =
useCommandState(state => state.filtered.count === 2) || false;
if (!renderNoResult) {
return null;
}
return (
<div className={styles.notFoundContainer}>
<div
className={styles.notFoundTitle}
data-testid="cmdk-search-not-found"
>{`Search for "${query}"`}</div>
<div className={styles.notFoundItem}>
<div className={styles.notFoundIcon}>
<SearchIcon />
</div>
<div className={styles.notFoundText}>No results found</div>
</div>
</div>
);
};

View File

@ -11,7 +11,12 @@ export interface CommandContext {
// we can use a single render function to render all different commands
export interface CMDKCommand {
id: string;
label: string | React.ReactNode;
label:
| string
| {
title: string;
subTitle?: string;
};
icon?: React.ReactNode;
category: CommandCategory;
keyBinding?: string | { binding: string };

View File

@ -10,7 +10,7 @@ import { currentPageIdAtom } from '@toeverything/infra/atom';
import { useAtomValue } from 'jotai';
import { useCallback, useEffect, useRef, useState } from 'react';
import { useAppSetting } from '../../../atoms/settings';
import { useAppSettingHelper } from '../../../hooks/affine/use-app-setting-helper';
import { useBlockSuiteMetaHelper } from '../../../hooks/affine/use-block-suite-meta-helper';
import { useCurrentWorkspace } from '../../../hooks/current/use-current-workspace';
import { useNavigateHelper } from '../../../hooks/use-navigate-helper';
@ -29,7 +29,7 @@ export const TrashButtonGroup = () => {
);
assertExists(pageMeta);
const t = useAFFiNEI18N();
const [appSettings] = useAppSetting();
const { appSettings } = useAppSettingHelper();
const { jumpToSubPath } = useNavigateHelper();
const { restoreFromTrash } = useBlockSuiteMetaHelper(blockSuiteWorkspace);
const restoreRef = useRef(null);

View File

@ -26,7 +26,7 @@ import { forwardRef, useCallback, useEffect, useMemo } from 'react';
import { openWorkspaceListModalAtom } from '../../atoms';
import { useHistoryAtom } from '../../atoms/history';
import { useAppSetting } from '../../atoms/settings';
import { useAppSettingHelper } from '../../hooks/affine/use-app-setting-helper';
import { useGeneralShortcuts } from '../../hooks/affine/use-shortcuts';
import { useTrashModalHelper } from '../../hooks/affine/use-trash-modal-helper';
import { useRegisterBlocksuiteEditorCommands } from '../../hooks/use-shortcut-commands';
@ -100,7 +100,7 @@ export const RootAppSidebar = ({
onOpenSettingModal,
}: RootAppSidebarProps): ReactElement => {
const currentWorkspaceId = currentWorkspace.id;
const [appSettings] = useAppSetting();
const { appSettings } = useAppSettingHelper();
const { backToAll } = useCollectionManager(currentCollectionsAtom);
const blockSuiteWorkspace = currentWorkspace.blockSuiteWorkspace;
const t = useAFFiNEI18N();

View File

@ -0,0 +1,23 @@
import { useAtom } from 'jotai';
import { useCallback, useMemo } from 'react';
import { type AppSetting, appSettingAtom } from '../../atoms/settings';
export function useAppSettingHelper() {
const [appSettings, setAppSettings] = useAtom(appSettingAtom);
const updateSettings = useCallback(
<K extends keyof AppSetting>(key: K, value: AppSetting[K]) => {
setAppSettings(prevSettings => ({ ...prevSettings, [key]: value }));
},
[setAppSettings]
);
return useMemo(
() => ({
appSettings,
updateSettings,
}),
[appSettings, updateSettings]
);
}

View File

@ -16,7 +16,7 @@ export function useLanguageHelper() {
})),
[]
);
const onSelect = useCallback(
const onLanguageChange = useCallback(
(event: string) => {
i18n.changeLanguage(event);
},
@ -27,8 +27,8 @@ export function useLanguageHelper() {
() => ({
currentLanguage,
languagesList,
onSelect,
onLanguageChange,
}),
[currentLanguage, languagesList, onSelect]
[currentLanguage, languagesList, onLanguageChange]
);
}

View File

@ -0,0 +1,19 @@
import { appSidebarOpenAtom } from '@affine/component/app-sidebar';
import { useAtom } from 'jotai';
import { useCallback, useMemo } from 'react';
export function useSwitchSidebarStatus() {
const [isOpened, setOpened] = useAtom(appSidebarOpenAtom);
const onOpenChange = useCallback(() => {
setOpened(open => !open);
}, [setOpened]);
return useMemo(
() => ({
onOpenChange,
isOpened,
}),
[isOpened, onOpenChange]
);
}

View File

@ -52,7 +52,7 @@ export function useRegisterWorkspaceCommands() {
languageHelper,
})
);
unsubs.push(registerAffineLayoutCommands({ store, t }));
unsubs.push(registerAffineLayoutCommands({ t, store }));
unsubs.push(
registerAffineCreationCommands({
store,

View File

@ -38,7 +38,6 @@ import { Map as YMap } from 'yjs';
import { openQuickSearchModalAtom, openSettingModalAtom } from '../atoms';
import { mainContainerAtom } from '../atoms/element';
import { useAppSetting } from '../atoms/settings';
import { AdapterProviderWrapper } from '../components/adapter-worksapce-wrapper';
import { AppContainer } from '../components/affine/app-container';
import { usePageHelper } from '../components/blocksuite/block-suite-page-list/utils';
@ -50,6 +49,7 @@ import {
DROPPABLE_SIDEBAR_TRASH,
RootAppSidebar,
} from '../components/root-app-sidebar';
import { useAppSettingHelper } from '../hooks/affine/use-app-setting-helper';
import { useBlockSuiteMetaHelper } from '../hooks/affine/use-block-suite-meta-helper';
import { useCurrentWorkspace } from '../hooks/current/use-current-workspace';
import { useNavigateHelper } from '../hooks/use-navigate-helper';
@ -230,7 +230,7 @@ export const WorkspaceLayoutInner = ({
[moveToTrash, t]
);
const [appSetting] = useAppSetting();
const { appSettings } = useAppSettingHelper();
const location = useLocation();
const { pageId } = useParams();
const pageMeta = useBlockSuitePageMeta(
@ -269,7 +269,7 @@ export const WorkspaceLayoutInner = ({
<Suspense fallback={<MainContainer ref={setMainContainer} />}>
<MainContainer
ref={setMainContainer}
padding={appSetting.clientBorder}
padding={appSettings.clientBorder}
inTrashPage={inTrashPage}
>
{incompatible ? <MigrationFallback /> : children}

View File

@ -1,7 +1,7 @@
{
"name": "@affine/electron",
"private": true,
"version": "0.10.0-canary.2",
"version": "0.10.0-canary.3",
"author": "toeverything",
"repository": {
"url": "https://github.com/toeverything/AFFiNE",
@ -32,14 +32,15 @@
"@affine/sdk": "workspace:*",
"@affine/templates": "workspace:*",
"@affine/vue-hello-world-plugin": "workspace:*",
"@blocksuite/blocks": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/editor": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/lit": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/store": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/blocks": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/editor": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/lit": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/store": "0.0.0-20231024064721-2aee7119-nightly",
"@electron-forge/cli": "^6.4.2",
"@electron-forge/core": "^6.4.2",
"@electron-forge/core-utils": "^6.4.2",
"@electron-forge/maker-deb": "^6.4.2",
"@electron-forge/maker-dmg": "^6.4.2",
"@electron-forge/maker-squirrel": "^6.4.2",
"@electron-forge/maker-zip": "^6.4.2",
"@electron-forge/shared-types": "^6.4.2",

View File

@ -1,6 +1,6 @@
{
"name": "@affine/graphql",
"version": "0.10.0-canary.2",
"version": "0.10.0-canary.3",
"description": "Autogenerated GraphQL client for affine.pro",
"license": "MIT",
"type": "module",
@ -20,7 +20,7 @@
"vitest": "0.34.6"
},
"scripts": {
"postinstall": "gql-gen"
"postinstall": "gql-gen --errors-only"
},
"dependencies": {
"@affine/env": "workspace:*",

View File

@ -15,12 +15,12 @@
},
"devDependencies": {
"@affine/env": "workspace:*",
"@blocksuite/block-std": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/blocks": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/editor": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/global": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/lit": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/store": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/block-std": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/blocks": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/editor": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/global": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/lit": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/store": "0.0.0-20231024064721-2aee7119-nightly",
"@testing-library/react": "^14.0.0",
"@types/lodash.debounce": "^4.0.7",
"fake-indexeddb": "^5.0.0",
@ -62,5 +62,5 @@
"optional": true
}
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -37,5 +37,5 @@
"ts-node": "^10.9.1",
"typescript": "^5.2.2"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -591,9 +591,9 @@
"com.affine.cmdk.affine.new-page": "New Page",
"com.affine.cmdk.affine.new-edgeless-page": "New Edgeless",
"com.affine.cmdk.affine.new-workspace": "New Workspace",
"com.affine.cmdk.affine.create-new-page-as": "Create New Page as: <1>{{query}}</1>",
"com.affine.cmdk.affine.create-new-edgeless-as": "Create New Edgeless as: <1>{{query}}</1>",
"com.affine.cmdk.affine.color-scheme.to": "Change Colour Scheme to <1>{{colour}}</1>",
"com.affine.cmdk.affine.create-new-page-as": "Create New Page as:",
"com.affine.cmdk.affine.create-new-edgeless-as": "Create New Edgeless as:",
"com.affine.cmdk.affine.color-scheme.to": "Change Colour Scheme to",
"com.affine.cmdk.affine.left-sidebar.expand": "Expand Left Sidebar",
"com.affine.cmdk.affine.left-sidebar.collapse": "Collapse Left Sidebar",
"com.affine.cmdk.affine.navigation.goto-all-pages": "Go to All Pages",
@ -621,12 +621,12 @@
"com.affine.cmdk.affine.editor.add-to-favourites": "Add to Favourites",
"com.affine.cmdk.affine.editor.remove-from-favourites": "Remove from Favourites",
"com.affine.cmdk.affine.editor.restore-from-trash": "Restore from Trash",
"com.affine.cmdk.affine.font-style.to": "Change Font Style to <1>{{fontFamily}}</1>",
"com.affine.cmdk.affine.display-language.to": "Change Display Language to <1>{{language}}</1>",
"com.affine.cmdk.affine.client-border-style.to": "Change Client Border Style to <1>{{state}}</1>",
"com.affine.cmdk.affine.full-width-layout.to": "Change Full Width Layout to <1>{{state}}</1>",
"com.affine.cmdk.affine.noise-background-on-the-sidebar.to": "Change Noise Background On The Sidebar to <1>{{state}}</1>",
"com.affine.cmdk.affine.translucent-ui-on-the-sidebar.to": "Change Translucent UI On The Sidebar to <1>{{state}}</1>",
"com.affine.cmdk.affine.font-style.to": "Change Font Style to",
"com.affine.cmdk.affine.display-language.to": "Change Display Language to",
"com.affine.cmdk.affine.client-border-style.to": "Change Client Border Style to",
"com.affine.cmdk.affine.full-width-layout.to": "Change Full Width Layout to",
"com.affine.cmdk.affine.noise-background-on-the-sidebar.to": "Change Noise Background On The Sidebar to",
"com.affine.cmdk.affine.translucent-ui-on-the-sidebar.to": "Change Translucent UI On The Sidebar to",
"com.affine.cmdk.affine.whats-new": "What's New",
"com.affine.cmdk.affine.getting-started": "Getting Started",
"com.affine.cmdk.affine.contact-us": "Contact Us",
@ -721,5 +721,7 @@
"com.affine.other-page.nav.contact-us": "Contact us",
"com.affine.other-page.nav.download-app": "Download App",
"com.affine.other-page.nav.open-affine": "Open AFFiNE",
"com.affine.payment.member.description": "Manage members here. {{planName}} Users can invite up to {{memberLimit}}"
"com.affine.payment.member.description": "Manage members here. {{planName}} Users can invite up to {{memberLimit}}",
"com.affine.cmdk.affine.switch-state.on": "ON",
"com.affine.cmdk.affine.switch-state.off": "OFF"
}

View File

@ -58,5 +58,5 @@
"test": "ava",
"version": "napi version"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -7,5 +7,5 @@
"./v1/*.json": "./v1/*.json",
"./preloading.json": "./preloading.json"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -46,5 +46,5 @@
"vitest": "0.34.6",
"ws": "^8.14.2"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -16,7 +16,7 @@
"dependencies": {
"@affine/component": "workspace:*",
"@affine/sdk": "workspace:*",
"@blocksuite/icons": "2.1.34",
"@blocksuite/icons": "2.1.35",
"@toeverything/components": "^0.0.46",
"@vanilla-extract/css": "^1.13.0",
"clsx": "^2.0.0",
@ -38,5 +38,5 @@
"react": "*",
"react-dom": "*"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -3,7 +3,7 @@
"type": "module",
"private": true,
"description": "Hello world plugin",
"version": "0.10.0-canary.2",
"version": "0.10.0-canary.3",
"scripts": {
"dev": "af dev",
"build": "af build"
@ -17,7 +17,7 @@
"dependencies": {
"@affine/component": "workspace:*",
"@affine/sdk": "workspace:*",
"@blocksuite/icons": "2.1.34",
"@blocksuite/icons": "2.1.35",
"@toeverything/components": "^0.0.46"
},
"devDependencies": {

View File

@ -1,7 +1,7 @@
{
"name": "@affine/image-preview-plugin",
"type": "module",
"version": "0.10.0-canary.2",
"version": "0.10.0-canary.3",
"description": "Image preview plugin",
"affinePlugin": {
"release": true,
@ -16,7 +16,7 @@
"dependencies": {
"@affine/component": "workspace:*",
"@affine/sdk": "workspace:*",
"@blocksuite/icons": "2.1.34",
"@blocksuite/icons": "2.1.35",
"@toeverything/components": "^0.0.46",
"@toeverything/theme": "^0.7.20",
"clsx": "^2.0.0",

View File

@ -3,7 +3,7 @@
"type": "module",
"private": true,
"description": "Outline plugin",
"version": "0.10.0-canary.2",
"version": "0.10.0-canary.3",
"scripts": {
"dev": "af dev",
"build": "af build"
@ -17,7 +17,7 @@
"dependencies": {
"@affine/component": "workspace:*",
"@affine/sdk": "workspace:*",
"@blocksuite/icons": "2.1.34",
"@blocksuite/icons": "2.1.35",
"@toeverything/components": "^0.0.46"
},
"devDependencies": {

View File

@ -3,7 +3,7 @@
"type": "module",
"private": true,
"description": "Vue hello world plugin",
"version": "0.10.0-canary.2",
"version": "0.10.0-canary.3",
"scripts": {
"dev": "af dev",
"build": "af build"

View File

@ -17,5 +17,5 @@ for package in "${packages[@]}"; do
yarn npm publish
fi
cd ../../
cd ../../../
done

View File

@ -9,5 +9,5 @@
"@affine-test/kit": "workspace:*",
"@playwright/test": "^1.39.0"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -11,5 +11,5 @@
"@types/fs-extra": "^11.0.2",
"fs-extra": "^11.1.1"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -12,5 +12,5 @@
"fs-extra": "^11.1.1",
"playwright": "^1.39.0"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -9,14 +9,14 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine-test/kit": "workspace:*",
"@blocksuite/block-std": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/blocks": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/global": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/store": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/block-std": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/blocks": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/global": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/store": "0.0.0-20231024064721-2aee7119-nightly",
"@playwright/test": "^1.39.0",
"express": "^4.18.2",
"http-proxy-middleware": "^3.0.0-beta.1",
"serve": "^14.2.1"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -9,14 +9,14 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine-test/kit": "workspace:*",
"@blocksuite/block-std": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/blocks": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/global": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/store": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/block-std": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/blocks": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/global": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/store": "0.0.0-20231024064721-2aee7119-nightly",
"@playwright/test": "^1.39.0",
"express": "^4.18.2",
"http-proxy-middleware": "^3.0.0-beta.1",
"serve": "^14.2.1"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -9,14 +9,14 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine-test/kit": "workspace:*",
"@blocksuite/block-std": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/blocks": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/global": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/store": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/block-std": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/blocks": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/global": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/store": "0.0.0-20231024064721-2aee7119-nightly",
"@playwright/test": "^1.39.0",
"express": "^4.18.2",
"http-proxy-middleware": "^3.0.0-beta.1",
"serve": "^14.2.1"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -46,7 +46,9 @@ async function assertResultList(page: Page, texts: string[]) {
const actual = await page
.locator('[cmdk-item] [data-testid=cmdk-label]')
.allInnerTexts();
expect(actual).toEqual(texts);
const actualSplit = actual[0].split('\n');
expect(actualSplit[0]).toEqual(texts[0]);
expect(actualSplit[1]).toEqual(texts[0]);
}
async function titleIsFocused(page: Page) {
@ -100,9 +102,7 @@ test('Create a new page with keyword', async ({ page }) => {
await clickNewPageButton(page);
await openQuickSearchByShortcut(page);
await page.keyboard.insertText('test123456');
const addNewPage = page.locator(
'[cmdk-item] >> text=Create New Page as: test123456'
);
const addNewPage = page.locator('[cmdk-item] >> text=Create New Page as:');
await addNewPage.click();
await page.waitForTimeout(300);
await assertTitle(page, 'test123456');
@ -126,9 +126,7 @@ test('Create a new page and search this page', async ({ page }) => {
// input title and create new page
await page.keyboard.insertText('test123456');
await page.waitForTimeout(300);
const addNewPage = page.locator(
'[cmdk-item] >> text=Create New Page as: test123456'
);
const addNewPage = page.locator('[cmdk-item] >> text=Create New Page as:');
await addNewPage.click();
await page.waitForTimeout(300);
@ -218,36 +216,34 @@ test('assert the recent browse pages are on the recent list', async ({
// create first page
await clickNewPageButton(page);
await waitForEditorLoad(page);
{
const title = getBlockSuiteEditorTitle(page);
await title.pressSequentially('sgtokidoki', {
delay: 50,
});
await title.pressSequentially('sgtokidoki');
expect(await title.innerText()).toBe('sgtokidoki');
}
await page.waitForTimeout(200);
// create second page
await openQuickSearchByShortcut(page);
const addNewPage = page.locator('[cmdk-item] >> text=New Page');
await addNewPage.click();
await waitForEditorLoad(page);
{
const title = getBlockSuiteEditorTitle(page);
await title.pressSequentially('theliquidhorse', {
delay: 50,
});
await title.pressSequentially('theliquidhorse');
expect(await title.innerText()).toBe('theliquidhorse');
}
await page.waitForTimeout(200);
// create thrid page
await openQuickSearchByShortcut(page);
await addNewPage.click();
await waitForEditorLoad(page);
{
const title = getBlockSuiteEditorTitle(page);
await title.pressSequentially('battlekot', {
delay: 50,
});
await title.pressSequentially('battlekot');
expect(await title.innerText()).toBe('battlekot');
}
await page.waitForTimeout(200);
await openQuickSearchByShortcut(page);
{
@ -268,12 +264,11 @@ test('assert the recent browse pages are on the recent list', async ({
const addNewPage = page.locator('[cmdk-item] >> text=New Page');
await addNewPage.click();
}
await page.waitForTimeout(200);
await waitForEditorLoad(page);
{
const title = getBlockSuiteEditorTitle(page);
await title.pressSequentially('affine is the best', {
delay: 50,
});
await title.pressSequentially('affine is the best');
expect(await title.innerText()).toBe('affine is the best');
}
await page.waitForTimeout(1000);
await openQuickSearchByShortcut(page);
@ -332,3 +327,15 @@ test('can use cmdk to delete page and restore it', async ({ page }) => {
await keyboardDownAndSelect(page, 'Restore from Trash');
await expect(restoreButton).not.toBeVisible();
});
test('show not found item', async ({ page }) => {
await openHomePage(page);
await waitForEditorLoad(page);
await clickNewPageButton(page);
await openQuickSearchByShortcut(page);
// input title and create new page
await page.keyboard.insertText('test123456');
const notFoundItem = page.getByTestId('cmdk-search-not-found');
await expect(notFoundItem).toBeVisible();
await expect(notFoundItem).toHaveText('Search for "test123456"');
});

View File

@ -9,5 +9,5 @@
"@affine-test/kit": "workspace:*",
"@playwright/test": "^1.39.0"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -7,11 +7,11 @@
"devDependencies": {
"@affine-test/fixtures": "workspace:*",
"@affine-test/kit": "workspace:*",
"@blocksuite/block-std": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/blocks": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/global": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/store": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/block-std": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/blocks": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/global": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/store": "0.0.0-20231024064721-2aee7119-nightly",
"@playwright/test": "^1.39.0"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -9,5 +9,5 @@
"@affine-test/kit": "workspace:*",
"@playwright/test": "^1.39.0"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -3,5 +3,5 @@
"exports": {
"./*": "./*"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -2,7 +2,7 @@
"name": "@affine-test/kit",
"private": true,
"type": "module",
"version": "0.10.0-canary.2",
"version": "0.10.0-canary.3",
"exports": {
"./electron": "./electron.ts",
"./playwright": "./playwright.ts",

View File

@ -32,13 +32,13 @@
"wait-on": "^7.0.1"
},
"devDependencies": {
"@blocksuite/block-std": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/blocks": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/editor": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/global": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/icons": "2.1.34",
"@blocksuite/lit": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/store": "0.0.0-20231018100009-361737d3-nightly",
"@blocksuite/block-std": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/blocks": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/editor": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/global": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/icons": "2.1.35",
"@blocksuite/lit": "0.0.0-20231024064721-2aee7119-nightly",
"@blocksuite/store": "0.0.0-20231024064721-2aee7119-nightly",
"@dnd-kit/sortable": "^7.0.2",
"@tomfreudenberg/next-auth-mock": "^0.5.6",
"chromatic": "^7.4.0",
@ -57,5 +57,5 @@
"@blocksuite/lit": "*",
"@blocksuite/store": "*"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -4,6 +4,7 @@ import {
registerAffineSettingsCommands,
} from '@affine/core/commands';
import { CMDKQuickSearchModal } from '@affine/core/components/pure/cmdk';
import { HighlightLabel } from '@affine/core/components/pure/cmdk/highlight';
import { WorkspaceFlavour } from '@affine/env/workspace';
import { useAFFiNEI18N } from '@affine/i18n/hooks';
import { rootWorkspacesMetadataAtom } from '@affine/workspace/atom';
@ -12,7 +13,7 @@ import type { Page } from '@blocksuite/store';
import type { Meta, StoryFn } from '@storybook/react';
import { currentWorkspaceIdAtom } from '@toeverything/infra/atom';
import { useStore } from 'jotai';
import { useEffect, useLayoutEffect } from 'react';
import { useEffect, useLayoutEffect, useState } from 'react';
import { withRouter } from 'storybook-addon-react-router-v6';
export default {
@ -43,7 +44,7 @@ function useRegisterCommands() {
themes: ['auto', 'dark', 'light'],
},
languageHelper: {
onSelect: () => {},
onLanguageChange: () => {},
languagesList: [
{ tag: 'en', name: 'English', originalName: 'English' },
{
@ -65,7 +66,10 @@ function useRegisterCommands() {
isPreferredEdgeless: () => false,
},
}),
registerAffineLayoutCommands({ t, store }),
registerAffineLayoutCommands({
t,
store,
}),
];
return () => {
@ -98,3 +102,16 @@ export const CMDKStoryWithCommands: StoryFn = () => {
};
CMDKStoryWithCommands.decorators = [withRouter];
export const HighlightStory: StoryFn = () => {
const [query, setQuery] = useState('');
const label = {
title: 'title',
};
return (
<>
<input value={query} onChange={e => setQuery(e.target.value)} />
<HighlightLabel label={label} highlight={query} />
</>
);
};

View File

@ -7,5 +7,5 @@
"@affine/env": "workspace:*",
"@toeverything/infra": "workspace:*"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -22,5 +22,5 @@
"peerDependencies": {
"ts-node": "*"
},
"version": "0.10.0-canary.2"
"version": "0.10.0-canary.3"
}

View File

@ -1,7 +1,7 @@
{
"name": "@affine/plugin-cli",
"type": "module",
"version": "0.10.0-canary.2",
"version": "0.10.0-canary.3",
"bin": {
"af": "./src/af.mjs"
},

View File

@ -1,6 +1,6 @@
{
"name": "@affine/workers",
"version": "0.10.0-canary.2",
"version": "0.10.0-canary.3",
"private": true,
"scripts": {
"dev": "wrangler dev"

515
yarn.lock
View File

@ -25,10 +25,10 @@ __metadata:
dependencies:
"@affine-test/fixtures": "workspace:*"
"@affine-test/kit": "workspace:*"
"@blocksuite/block-std": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/blocks": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/global": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/store": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/block-std": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/blocks": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/global": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/store": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@playwright/test": "npm:^1.39.0"
express: "npm:^4.18.2"
http-proxy-middleware: "npm:^3.0.0-beta.1"
@ -42,10 +42,10 @@ __metadata:
dependencies:
"@affine-test/fixtures": "workspace:*"
"@affine-test/kit": "workspace:*"
"@blocksuite/block-std": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/blocks": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/global": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/store": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/block-std": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/blocks": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/global": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/store": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@playwright/test": "npm:^1.39.0"
express: "npm:^4.18.2"
http-proxy-middleware: "npm:^3.0.0-beta.1"
@ -59,10 +59,10 @@ __metadata:
dependencies:
"@affine-test/fixtures": "workspace:*"
"@affine-test/kit": "workspace:*"
"@blocksuite/block-std": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/blocks": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/global": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/store": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/block-std": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/blocks": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/global": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/store": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@playwright/test": "npm:^1.39.0"
express: "npm:^4.18.2"
http-proxy-middleware: "npm:^3.0.0-beta.1"
@ -121,10 +121,10 @@ __metadata:
dependencies:
"@affine-test/fixtures": "workspace:*"
"@affine-test/kit": "workspace:*"
"@blocksuite/block-std": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/blocks": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/global": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/store": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/block-std": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/blocks": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/global": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/store": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@playwright/test": "npm:^1.39.0"
languageName: unknown
linkType: soft
@ -195,12 +195,12 @@ __metadata:
"@affine/graphql": "workspace:*"
"@affine/i18n": "workspace:*"
"@affine/workspace": "workspace:*"
"@blocksuite/blocks": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/editor": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/global": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/icons": "npm:2.1.34"
"@blocksuite/lit": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/store": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/blocks": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/editor": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/global": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/icons": "npm:2.1.35"
"@blocksuite/lit": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/store": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@dnd-kit/core": "npm:^6.0.8"
"@dnd-kit/modifiers": "npm:^6.0.1"
"@dnd-kit/sortable": "npm:^7.0.2"
@ -273,7 +273,7 @@ __metadata:
"@affine/component": "workspace:*"
"@affine/plugin-cli": "workspace:*"
"@affine/sdk": "workspace:*"
"@blocksuite/icons": "npm:2.1.34"
"@blocksuite/icons": "npm:2.1.35"
"@toeverything/components": "npm:^0.0.46"
"@types/marked": "npm:^6.0.0"
"@vanilla-extract/css": "npm:^1.13.0"
@ -306,13 +306,13 @@ __metadata:
"@affine/templates": "workspace:*"
"@affine/workspace": "workspace:*"
"@aws-sdk/client-s3": "npm:3.433.0"
"@blocksuite/block-std": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/blocks": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/editor": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/global": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/icons": "npm:2.1.34"
"@blocksuite/lit": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/store": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/block-std": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/blocks": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/editor": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/global": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/icons": "npm:2.1.35"
"@blocksuite/lit": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/store": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@dnd-kit/core": "npm:^6.0.8"
"@dnd-kit/sortable": "npm:^7.0.2"
"@emotion/cache": "npm:^11.11.0"
@ -401,14 +401,15 @@ __metadata:
"@affine/sdk": "workspace:*"
"@affine/templates": "workspace:*"
"@affine/vue-hello-world-plugin": "workspace:*"
"@blocksuite/blocks": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/editor": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/lit": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/store": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/blocks": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/editor": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/lit": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/store": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@electron-forge/cli": "npm:^6.4.2"
"@electron-forge/core": "npm:^6.4.2"
"@electron-forge/core-utils": "npm:^6.4.2"
"@electron-forge/maker-deb": "npm:^6.4.2"
"@electron-forge/maker-dmg": "npm:^6.4.2"
"@electron-forge/maker-squirrel": "npm:^6.4.2"
"@electron-forge/maker-zip": "npm:^6.4.2"
"@electron-forge/shared-types": "npm:^6.4.2"
@ -450,8 +451,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "@affine/env@workspace:packages/common/env"
dependencies:
"@blocksuite/global": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/store": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/global": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/store": "npm:0.0.0-20231024064721-2aee7119-nightly"
lit: "npm:^2.8.0"
react: "npm:18.2.0"
react-dom: "npm:18.2.0"
@ -489,7 +490,7 @@ __metadata:
"@affine/component": "workspace:*"
"@affine/plugin-cli": "workspace:*"
"@affine/sdk": "workspace:*"
"@blocksuite/icons": "npm:2.1.34"
"@blocksuite/icons": "npm:2.1.35"
"@toeverything/components": "npm:^0.0.46"
languageName: unknown
linkType: soft
@ -515,7 +516,7 @@ __metadata:
"@affine/component": "workspace:*"
"@affine/plugin-cli": "workspace:*"
"@affine/sdk": "workspace:*"
"@blocksuite/icons": "npm:2.1.34"
"@blocksuite/icons": "npm:2.1.35"
"@toeverything/components": "npm:^0.0.46"
"@toeverything/theme": "npm:^0.7.20"
clsx: "npm:^2.0.0"
@ -616,7 +617,7 @@ __metadata:
"@affine/component": "workspace:*"
"@affine/plugin-cli": "workspace:*"
"@affine/sdk": "workspace:*"
"@blocksuite/icons": "npm:2.1.34"
"@blocksuite/icons": "npm:2.1.35"
"@toeverything/components": "npm:^0.0.46"
jotai: "npm:^2.4.3"
react: "npm:18.2.0"
@ -647,11 +648,11 @@ __metadata:
version: 0.0.0-use.local
resolution: "@affine/sdk@workspace:packages/common/sdk"
dependencies:
"@blocksuite/block-std": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/blocks": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/editor": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/global": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/store": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/block-std": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/blocks": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/editor": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/global": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/store": "npm:0.0.0-20231024064721-2aee7119-nightly"
jotai: "npm:^2.4.3"
vite: "npm:^4.4.11"
vite-plugin-dts: "npm:3.6.0"
@ -769,13 +770,13 @@ __metadata:
dependencies:
"@affine/component": "workspace:*"
"@affine/i18n": "workspace:*"
"@blocksuite/block-std": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/blocks": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/editor": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/global": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/icons": "npm:2.1.34"
"@blocksuite/lit": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/store": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/block-std": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/blocks": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/editor": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/global": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/icons": "npm:2.1.35"
"@blocksuite/lit": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/store": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@dnd-kit/sortable": "npm:^7.0.2"
"@mui/material": "npm:^5.14.14"
"@storybook/addon-actions": "npm:^7.4.6"
@ -3480,26 +3481,26 @@ __metadata:
languageName: node
linkType: hard
"@blocksuite/block-std@npm:0.0.0-20231018100009-361737d3-nightly":
version: 0.0.0-20231018100009-361737d3-nightly
resolution: "@blocksuite/block-std@npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/block-std@npm:0.0.0-20231024064721-2aee7119-nightly":
version: 0.0.0-20231024064721-2aee7119-nightly
resolution: "@blocksuite/block-std@npm:0.0.0-20231024064721-2aee7119-nightly"
dependencies:
"@blocksuite/global": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/global": "npm:0.0.0-20231024064721-2aee7119-nightly"
lz-string: "npm:^1.5.0"
w3c-keyname: "npm:^2.2.8"
zod: "npm:^3.22.2"
peerDependencies:
"@blocksuite/store": 0.0.0-20231018100009-361737d3-nightly
checksum: 8e19a257ead88a6c3c38971ae8496773f659d04793e224f7eb2427f53bc2d26e2dae499401bb6064056fd6909cd5260436bb72e0f947ae2c8c1d123163aef07c
"@blocksuite/store": 0.0.0-20231024064721-2aee7119-nightly
checksum: 794ee7e9906a461a6f21477b9a8f480ea6d36867d9b71210b5b72e7c5e77751cee514fc84d7c2380205c05f5821487f49b3bbf2ba5f81703f24f190be8d410d2
languageName: node
linkType: hard
"@blocksuite/blocks@npm:0.0.0-20231018100009-361737d3-nightly":
version: 0.0.0-20231018100009-361737d3-nightly
resolution: "@blocksuite/blocks@npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/blocks@npm:0.0.0-20231024064721-2aee7119-nightly":
version: 0.0.0-20231024064721-2aee7119-nightly
resolution: "@blocksuite/blocks@npm:0.0.0-20231024064721-2aee7119-nightly"
dependencies:
"@blocksuite/global": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/virgo": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/global": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/virgo": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@floating-ui/dom": "npm:^1.5.1"
"@types/webfontloader": "npm:^1.6.35"
buffer: "npm:^6.0.3"
@ -3516,41 +3517,51 @@ __metadata:
webfontloader: "npm:^1.6.28"
zod: "npm:^3.22.2"
peerDependencies:
"@blocksuite/block-std": 0.0.0-20231018100009-361737d3-nightly
"@blocksuite/lit": 0.0.0-20231018100009-361737d3-nightly
"@blocksuite/store": 0.0.0-20231018100009-361737d3-nightly
"@blocksuite/block-std": 0.0.0-20231024064721-2aee7119-nightly
"@blocksuite/lit": 0.0.0-20231024064721-2aee7119-nightly
"@blocksuite/store": 0.0.0-20231024064721-2aee7119-nightly
"@toeverything/theme": ^0.7.16
nanoid: ^4
checksum: e45ba843c6704a53051849cf19a626e228a2d11565f4c2c243f5bea3f83a8bb145ff424c8a77aebcc701c3691a436d725ac0e6ad277827dc81a6a22b6e14eaed
checksum: 7391144da8282882f5cc3f6076d844c0ce3366325bae1be147b26394d5b4db7422bca6cbf2d78d3f645d9524c6bef755962e1fc64adfe94eb64a943602d2bfd5
languageName: node
linkType: hard
"@blocksuite/editor@npm:0.0.0-20231018100009-361737d3-nightly":
version: 0.0.0-20231018100009-361737d3-nightly
resolution: "@blocksuite/editor@npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/editor@npm:0.0.0-20231024064721-2aee7119-nightly":
version: 0.0.0-20231024064721-2aee7119-nightly
resolution: "@blocksuite/editor@npm:0.0.0-20231024064721-2aee7119-nightly"
dependencies:
"@blocksuite/global": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/global": "npm:0.0.0-20231024064721-2aee7119-nightly"
lit: "npm:^2.8.0"
peerDependencies:
"@blocksuite/blocks": 0.0.0-20231018100009-361737d3-nightly
"@blocksuite/lit": 0.0.0-20231018100009-361737d3-nightly
"@blocksuite/store": 0.0.0-20231018100009-361737d3-nightly
"@blocksuite/blocks": 0.0.0-20231024064721-2aee7119-nightly
"@blocksuite/lit": 0.0.0-20231024064721-2aee7119-nightly
"@blocksuite/store": 0.0.0-20231024064721-2aee7119-nightly
"@toeverything/theme": ^0.7.16
checksum: aae4ed3217092dc64ae46ad26902e636b92513051ebd64072519fa223bb6c4dccf0f7046b04559783137db55218d23faa3baf0bce6c076f321a0303fcc950e26
checksum: 5784d5ceeebaf8e0cb3a84d10e6a6824707b891ef77499f40e4269d0738361055e65d3fc1ee2fccec8ad0843482714082998eb0ea5dab385faae5b8690691cac
languageName: node
linkType: hard
"@blocksuite/global@npm:0.0.0-20231018100009-361737d3-nightly":
version: 0.0.0-20231018100009-361737d3-nightly
resolution: "@blocksuite/global@npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/global@npm:0.0.0-20231024064721-2aee7119-nightly":
version: 0.0.0-20231024064721-2aee7119-nightly
resolution: "@blocksuite/global@npm:0.0.0-20231024064721-2aee7119-nightly"
dependencies:
ansi-colors: "npm:^4.1.3"
zod: "npm:^3.22.2"
checksum: 8ae7980c2f932ddc14f61f559113290730b9b22cbcec452c3ada3e16fbb92fcbb3b34e274ef9a00075d26ecc387d71147938b02ad0758f8ec8e892a2b6e98a43
checksum: 25b1797e1cf4aa5d2e468d82758e65362d28408e8e5ccd9353b5dac30df5bd7565cf29ecc4114fb26a7501fef62c1a98fa0a3c1c790ea585951de48712d91516
languageName: node
linkType: hard
"@blocksuite/icons@npm:2.1.34, @blocksuite/icons@npm:^2.1.33":
"@blocksuite/icons@npm:2.1.35":
version: 2.1.35
resolution: "@blocksuite/icons@npm:2.1.35"
peerDependencies:
"@types/react": ^18.0.25
react: ^18.2.0
checksum: 4a7c1d11ae573b5c2cd3fc0c570892ab3ea1b5108cf6c59759186f56022901ef99a7344d54df45d85d721d6a199c88aa12b22b5791c4357068ea3074318699c8
languageName: node
linkType: hard
"@blocksuite/icons@npm:^2.1.33":
version: 2.1.34
resolution: "@blocksuite/icons@npm:2.1.34"
peerDependencies:
@ -3560,26 +3571,26 @@ __metadata:
languageName: node
linkType: hard
"@blocksuite/lit@npm:0.0.0-20231018100009-361737d3-nightly":
version: 0.0.0-20231018100009-361737d3-nightly
resolution: "@blocksuite/lit@npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/lit@npm:0.0.0-20231024064721-2aee7119-nightly":
version: 0.0.0-20231024064721-2aee7119-nightly
resolution: "@blocksuite/lit@npm:0.0.0-20231024064721-2aee7119-nightly"
dependencies:
"@blocksuite/global": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/virgo": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/global": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/virgo": "npm:0.0.0-20231024064721-2aee7119-nightly"
lit: "npm:^2.8.0"
peerDependencies:
"@blocksuite/block-std": 0.0.0-20231018100009-361737d3-nightly
"@blocksuite/store": 0.0.0-20231018100009-361737d3-nightly
checksum: 2584f084b90aa7df1ce57232912b21153139032a2a65e29b6a529fe58410e697913ba57eb60d470437778c24e5a610db8ab37cc854da44787e6b8b152eb6d359
"@blocksuite/block-std": 0.0.0-20231024064721-2aee7119-nightly
"@blocksuite/store": 0.0.0-20231024064721-2aee7119-nightly
checksum: 8216c58648a43590111db140986a5d6cb67e0e9459560299302b3a1d54a05afd7786fe26990688de24c92b5948c1a160de3f75073563761aaaf688ff57b4b9f2
languageName: node
linkType: hard
"@blocksuite/store@npm:0.0.0-20231018100009-361737d3-nightly":
version: 0.0.0-20231018100009-361737d3-nightly
resolution: "@blocksuite/store@npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/store@npm:0.0.0-20231024064721-2aee7119-nightly":
version: 0.0.0-20231024064721-2aee7119-nightly
resolution: "@blocksuite/store@npm:0.0.0-20231024064721-2aee7119-nightly"
dependencies:
"@blocksuite/global": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/virgo": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/global": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/virgo": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@types/flexsearch": "npm:^0.7.3"
"@types/mdast": "npm:^4.0.1"
buffer: "npm:^6.0.3"
@ -3597,20 +3608,20 @@ __metadata:
peerDependencies:
async-call-rpc: ^6
yjs: ^13
checksum: 4e8a47ea584623fd7477d98f0e369e4b94c702236293e4ff8dcedd40c3cd27a7e94e7bbe67d55ad622f855032fcfd74fe5b7072a1285233cc4065beac7a5b783
checksum: fbbce9a927a842e8bce02cfb1346dafeacb18379e99b7e5281c9e2717b2ccbeaa78e142921a931a06a55ba6e39c03693d134be89d5034fdf7607a048eaa5387a
languageName: node
linkType: hard
"@blocksuite/virgo@npm:0.0.0-20231018100009-361737d3-nightly":
version: 0.0.0-20231018100009-361737d3-nightly
resolution: "@blocksuite/virgo@npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/virgo@npm:0.0.0-20231024064721-2aee7119-nightly":
version: 0.0.0-20231024064721-2aee7119-nightly
resolution: "@blocksuite/virgo@npm:0.0.0-20231024064721-2aee7119-nightly"
dependencies:
"@blocksuite/global": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/global": "npm:0.0.0-20231024064721-2aee7119-nightly"
zod: "npm:^3.22.2"
peerDependencies:
lit: ^2.7
yjs: ^13
checksum: af8c07e5f04fa7685ab8bfc4a2e4b5c2c881a9ce91c31c93a2df53e7e0464bac88f89f32ec6e22aa838761a7101e2e4ee4e21243d191d7d290fc268e54cf3f89
checksum: 1911206ae3de2b7fc74749ac6b57c49211967767eabbc555af2bbd2d9e6bda6b1e3f9b94d0cf8d51513b8d93dc85d6058102d1aebdb40bdd1d292f9dad334b17
languageName: node
linkType: hard
@ -4127,6 +4138,21 @@ __metadata:
languageName: node
linkType: hard
"@electron-forge/maker-dmg@npm:^6.4.2":
version: 6.4.2
resolution: "@electron-forge/maker-dmg@npm:6.4.2"
dependencies:
"@electron-forge/maker-base": "npm:6.4.2"
"@electron-forge/shared-types": "npm:6.4.2"
electron-installer-dmg: "npm:^4.0.0"
fs-extra: "npm:^10.0.0"
dependenciesMeta:
electron-installer-dmg:
optional: true
checksum: c83689f929d19dee23fd34644f50b56eec93917a1f069243969621706e8267c3474aca50c457b1ce52aa4c0e2b0f6fc76fedd9b4cbd08cd070f9c4e161a51565
languageName: node
linkType: hard
"@electron-forge/maker-squirrel@npm:^6.4.2":
version: 6.4.2
resolution: "@electron-forge/maker-squirrel@npm:6.4.2"
@ -12569,12 +12595,12 @@ __metadata:
resolution: "@toeverything/hooks@workspace:packages/frontend/hooks"
dependencies:
"@affine/env": "workspace:*"
"@blocksuite/block-std": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/blocks": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/editor": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/global": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/lit": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/store": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/block-std": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/blocks": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/editor": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/global": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/lit": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/store": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@testing-library/react": "npm:^14.0.0"
"@types/lodash.debounce": "npm:^4.0.7"
fake-indexeddb: "npm:^5.0.0"
@ -12621,11 +12647,11 @@ __metadata:
"@affine-test/fixtures": "workspace:*"
"@affine/sdk": "workspace:*"
"@affine/templates": "workspace:*"
"@blocksuite/blocks": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/editor": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/global": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/lit": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/store": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/blocks": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/editor": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/global": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/lit": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/store": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@testing-library/react": "npm:^14.0.0"
async-call-rpc: "npm:^6.3.1"
electron: "link:../../frontend/electron/node_modules/electron"
@ -12677,8 +12703,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "@toeverything/y-indexeddb@workspace:packages/common/y-indexeddb"
dependencies:
"@blocksuite/blocks": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/store": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/blocks": "npm:0.0.0-20231024064721-2aee7119-nightly"
"@blocksuite/store": "npm:0.0.0-20231024064721-2aee7119-nightly"
fake-indexeddb: "npm:^5.0.0"
idb: "npm:^7.1.1"
nanoid: "npm:^5.0.1"
@ -15196,6 +15222,27 @@ __metadata:
languageName: node
linkType: hard
"appdmg@npm:^0.6.4":
version: 0.6.6
resolution: "appdmg@npm:0.6.6"
dependencies:
async: "npm:^1.4.2"
ds-store: "npm:^0.1.5"
execa: "npm:^1.0.0"
fs-temp: "npm:^1.0.0"
fs-xattr: "npm:^0.3.0"
image-size: "npm:^0.7.4"
is-my-json-valid: "npm:^2.20.0"
minimist: "npm:^1.1.3"
parse-color: "npm:^1.0.0"
path-exists: "npm:^4.0.0"
repeat-string: "npm:^1.5.4"
bin:
appdmg: bin/appdmg.js
conditions: os=darwin
languageName: node
linkType: hard
"append-field@npm:^1.0.0":
version: 1.0.0
resolution: "append-field@npm:1.0.0"
@ -15549,6 +15596,13 @@ __metadata:
languageName: node
linkType: hard
"async@npm:^1.4.2":
version: 1.5.2
resolution: "async@npm:1.5.2"
checksum: 8afcdcee05168250926a3e7bd4dfaa74b681a74f634bae2af424fb716042461cbd20a375d9bc2534daa50a2d45286c9b174952fb239cee4ab8d6351a40c65327
languageName: node
linkType: hard
"async@npm:^3.2.3":
version: 3.2.4
resolution: "async@npm:3.2.4"
@ -15927,6 +15981,15 @@ __metadata:
languageName: node
linkType: hard
"base32-encode@npm:^0.1.0 || ^1.0.0":
version: 1.2.0
resolution: "base32-encode@npm:1.2.0"
dependencies:
to-data-view: "npm:^1.1.0"
checksum: b8df667599d50b2c9fca206fcab9bf6500d2e980b14da204eb7de5ce978c99e4874e8138d109bd88d5bca1bfb5ae83926bca37b084d2c9842f8acb12b4b839d9
languageName: node
linkType: hard
"base64-arraybuffer@npm:^1.0.2":
version: 1.0.2
resolution: "base64-arraybuffer@npm:1.0.2"
@ -16127,6 +16190,15 @@ __metadata:
languageName: node
linkType: hard
"bplist-creator@npm:~0.0.3":
version: 0.0.8
resolution: "bplist-creator@npm:0.0.8"
dependencies:
stream-buffers: "npm:~2.2.0"
checksum: f21a5a521f610027ab3ded29ff8e6b91cba31ef496ec0a4dec14c73bb95a787211dd93558ceef26c40cff7aaf35326811753b4be1476bac97e6e8c0ec6d16147
languageName: node
linkType: hard
"bplist-parser@npm:^0.2.0":
version: 0.2.0
resolution: "bplist-parser@npm:0.2.0"
@ -17130,6 +17202,13 @@ __metadata:
languageName: node
linkType: hard
"color-convert@npm:~0.5.0":
version: 0.5.3
resolution: "color-convert@npm:0.5.3"
checksum: 00dc4256c07ed8760d7bbba234ff969c139eb964fe165853696852001002695c492e327d83ddb7a8cad8d27b49fa543d001328928c12474ee8ecb335bf5f2eb4
languageName: node
linkType: hard
"color-name@npm:1.1.3":
version: 1.1.3
resolution: "color-name@npm:1.1.3"
@ -18909,6 +18988,17 @@ __metadata:
languageName: node
linkType: hard
"ds-store@npm:^0.1.5":
version: 0.1.6
resolution: "ds-store@npm:0.1.6"
dependencies:
bplist-creator: "npm:~0.0.3"
macos-alias: "npm:~0.2.5"
tn1150: "npm:^0.1.0"
checksum: afd033ddf3c2f5ed08bdf7ceb0d6dba480b27fed925cadcfde98dea86fc7f6af35da9cbebfac9bcfb31d11c725b5b111af044ea3f38ab4dde982b8a3424bd2d3
languageName: node
linkType: hard
"dset@npm:^3.1.2":
version: 3.1.2
resolution: "dset@npm:3.1.2"
@ -19017,6 +19107,22 @@ __metadata:
languageName: node
linkType: hard
"electron-installer-dmg@npm:^4.0.0":
version: 4.0.0
resolution: "electron-installer-dmg@npm:4.0.0"
dependencies:
appdmg: "npm:^0.6.4"
debug: "npm:^4.3.2"
minimist: "npm:^1.1.1"
dependenciesMeta:
appdmg:
optional: true
bin:
electron-installer-dmg: bin/electron-installer-dmg.js
checksum: 0434871266fc06ce0150d2bbd05397e5a7ec219dc91abee2a604f9e49a27e874254ac8e9bcc4bd9bf713f18f98532562de9434510430071d89090cc8f3b6defd
languageName: node
linkType: hard
"electron-log@npm:^5.0.0-rc.1":
version: 5.0.0-rc.1
resolution: "electron-log@npm:5.0.0-rc.1"
@ -19201,6 +19307,13 @@ __metadata:
languageName: node
linkType: hard
"encode-utf8@npm:^1.0.3":
version: 1.0.3
resolution: "encode-utf8@npm:1.0.3"
checksum: 0204c37cda21bf19bb8f87f7ec6c89a23d43488c2ef1e5cfa40b64ee9568e63e15dc323fa7f50a491e2c6d33843a6b409f6de09afbf6cf371cb8da596cc64b44
languageName: node
linkType: hard
"encodeurl@npm:~1.0.2":
version: 1.0.2
resolution: "encodeurl@npm:1.0.2"
@ -20949,6 +21062,15 @@ __metadata:
languageName: node
linkType: hard
"fmix@npm:^0.1.0":
version: 0.1.0
resolution: "fmix@npm:0.1.0"
dependencies:
imul: "npm:^1.0.0"
checksum: c465344d4f169eaf10d45c33949a1e7a633f09dba2ac7063ce8ae8be743df5979d708f7f24900163589f047f5194ac5fc2476177ce31175e8805adfa7b8fb7a4
languageName: node
linkType: hard
"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.14.0, follow-redirects@npm:^1.14.9, follow-redirects@npm:^1.15.0":
version: 1.15.3
resolution: "follow-redirects@npm:1.15.3"
@ -21180,6 +21302,24 @@ __metadata:
languageName: node
linkType: hard
"fs-temp@npm:^1.0.0":
version: 1.2.1
resolution: "fs-temp@npm:1.2.1"
dependencies:
random-path: "npm:^0.1.0"
checksum: 64d1b96c7adc172a0fbe6116f425f3588ac585dc7011524174e539df7794a4ca81874bb1c8ee74a47991cc35b7dc036f5bf880074844b2165027042b346b38d9
languageName: node
linkType: hard
"fs-xattr@npm:^0.3.0":
version: 0.3.1
resolution: "fs-xattr@npm:0.3.1"
dependencies:
node-gyp: "npm:latest"
conditions: "!os=win32"
languageName: node
linkType: hard
"fs.realpath@npm:^1.0.0":
version: 1.0.0
resolution: "fs.realpath@npm:1.0.0"
@ -21311,6 +21451,24 @@ __metadata:
languageName: node
linkType: hard
"generate-function@npm:^2.0.0":
version: 2.3.1
resolution: "generate-function@npm:2.3.1"
dependencies:
is-property: "npm:^1.0.2"
checksum: 318f85af87c3258d86df4ebbb56b63a2ae52e71bd6cde8d0a79de09450de7422a7047fb1f8d52ccc135564a36cb986d73c63149eed96b7ac57e38acba44f29e2
languageName: node
linkType: hard
"generate-object-property@npm:^1.1.0":
version: 1.2.0
resolution: "generate-object-property@npm:1.2.0"
dependencies:
is-property: "npm:^1.0.0"
checksum: 5141ca5fd545f0aabd24fd13f9f3ecf9cfea2255db00d46e282d65141d691d560c70b6361c3c0c4982f86f600361925bfd4773e0350c66d0210e6129ae553a09
languageName: node
linkType: hard
"gensync@npm:^1.0.0-beta.2":
version: 1.0.0-beta.2
resolution: "gensync@npm:1.0.0-beta.2"
@ -22626,6 +22784,15 @@ __metadata:
languageName: node
linkType: hard
"image-size@npm:^0.7.4":
version: 0.7.5
resolution: "image-size@npm:0.7.5"
bin:
image-size: bin/image-size.js
checksum: 7254eef24c37f18348b35aa820b0057a513b02592a47457e5526a914fae2082db6ef8afcfd86119c866e72f4bdefb28128ae4880d2f14dbd9bd69b0d5c09babd
languageName: node
linkType: hard
"immediate@npm:~3.0.5":
version: 3.0.6
resolution: "immediate@npm:3.0.6"
@ -22695,6 +22862,13 @@ __metadata:
languageName: node
linkType: hard
"imul@npm:^1.0.0":
version: 1.0.1
resolution: "imul@npm:1.0.1"
checksum: 6c2af3d5f09e2135e14d565a2c108412b825b221eb2c881f9130467f2adccf7ae201773ae8bcf1be169e2d090567a1fdfa9cf20d3b7da7b9cecb95b920ff3e52
languageName: node
linkType: hard
"imurmurhash@npm:^0.1.4":
version: 0.1.4
resolution: "imurmurhash@npm:0.1.4"
@ -23072,6 +23246,26 @@ __metadata:
languageName: node
linkType: hard
"is-my-ip-valid@npm:^1.0.0":
version: 1.0.1
resolution: "is-my-ip-valid@npm:1.0.1"
checksum: 97d28349e64b0c127f8e1c3c3f4fb92dfaadea7d34b67c43bbd9fe06d473fca66f3e1fd013b0a7c4b762db992d49a01af91b9cc994fac71db0cefb383f634ec6
languageName: node
linkType: hard
"is-my-json-valid@npm:^2.20.0":
version: 2.20.6
resolution: "is-my-json-valid@npm:2.20.6"
dependencies:
generate-function: "npm:^2.0.0"
generate-object-property: "npm:^1.1.0"
is-my-ip-valid: "npm:^1.0.0"
jsonpointer: "npm:^5.0.0"
xtend: "npm:^4.0.0"
checksum: 0c23fb1ead07442269d52e58d2a62796d091e3f4741dbd1e25a689e1bcad15d9351abd8c90a62a9a3e75a3a6104e6ca94699db55c536114ff1f94b54067a0ff9
languageName: node
linkType: hard
"is-nan@npm:^1.3.2":
version: 1.3.2
resolution: "is-nan@npm:1.3.2"
@ -23175,6 +23369,13 @@ __metadata:
languageName: node
linkType: hard
"is-property@npm:^1.0.0, is-property@npm:^1.0.2":
version: 1.0.2
resolution: "is-property@npm:1.0.2"
checksum: 2f66eacb3d7237ba5c725496672edec656a20b12c80790921988578e6b11c258a062ce1e602f3cd2e3c2e05dd8b6e24e1d59254375207f157424a02ef0abb3d7
languageName: node
linkType: hard
"is-regexp@npm:^1.0.0":
version: 1.0.0
resolution: "is-regexp@npm:1.0.0"
@ -24546,7 +24747,7 @@ __metadata:
languageName: node
linkType: hard
"jsonpointer@npm:^5.0.1":
"jsonpointer@npm:^5.0.0, jsonpointer@npm:^5.0.1":
version: 5.0.1
resolution: "jsonpointer@npm:5.0.1"
checksum: 0b40f712900ad0c846681ea2db23b6684b9d5eedf55807b4708c656f5894b63507d0e28ae10aa1bddbea551241035afe62b6df0800fc94c2e2806a7f3adecd7c
@ -25667,6 +25868,16 @@ __metadata:
languageName: node
linkType: hard
"macos-alias@npm:~0.2.5":
version: 0.2.11
resolution: "macos-alias@npm:0.2.11"
dependencies:
nan: "npm:^2.4.0"
node-gyp: "npm:latest"
conditions: os=darwin
languageName: node
linkType: hard
"madge@npm:^6.1.0":
version: 6.1.0
resolution: "madge@npm:6.1.0"
@ -26365,7 +26576,7 @@ __metadata:
languageName: node
linkType: hard
"minimist@npm:^1.1.0, minimist@npm:^1.2.0, minimist@npm:^1.2.5, minimist@npm:^1.2.6, minimist@npm:^1.2.7, minimist@npm:~1.2.5":
"minimist@npm:^1.1.0, minimist@npm:^1.1.1, minimist@npm:^1.1.3, minimist@npm:^1.2.0, minimist@npm:^1.2.5, minimist@npm:^1.2.6, minimist@npm:^1.2.7, minimist@npm:~1.2.5":
version: 1.2.8
resolution: "minimist@npm:1.2.8"
checksum: 908491b6cc15a6c440ba5b22780a0ba89b9810e1aea684e253e43c4e3b8d56ec1dcdd7ea96dde119c29df59c936cde16062159eae4225c691e19c70b432b6e6f
@ -26707,6 +26918,17 @@ __metadata:
languageName: node
linkType: hard
"murmur-32@npm:^0.1.0 || ^0.2.0":
version: 0.2.0
resolution: "murmur-32@npm:0.2.0"
dependencies:
encode-utf8: "npm:^1.0.3"
fmix: "npm:^0.1.0"
imul: "npm:^1.0.0"
checksum: 0a1132cbfc6d8a0409db66e0c874c6c80898bc67b256f5896c0d8d91693febd072f6b73bd8fc602f06a87b375fcef50f4b03ddc2b71ae00b042f6f62c6baaadf
languageName: node
linkType: hard
"mustache@npm:^4.2.0":
version: 4.2.0
resolution: "mustache@npm:4.2.0"
@ -26723,6 +26945,15 @@ __metadata:
languageName: node
linkType: hard
"nan@npm:^2.4.0":
version: 2.18.0
resolution: "nan@npm:2.18.0"
dependencies:
node-gyp: "npm:latest"
checksum: 5520e22c64e2b5b495b1d765d6334c989b848bbe1502fec89c5857cabcc7f9f0474563377259e7574bff1c8a041d3b90e9ffa1f5e15502ffddee7b2550cc26a0
languageName: node
linkType: hard
"nanoid@npm:^3.3.3, nanoid@npm:^3.3.6":
version: 3.3.6
resolution: "nanoid@npm:3.3.6"
@ -27944,6 +28175,15 @@ __metadata:
languageName: node
linkType: hard
"parse-color@npm:^1.0.0":
version: 1.0.0
resolution: "parse-color@npm:1.0.0"
dependencies:
color-convert: "npm:~0.5.0"
checksum: 9f988462af30929acbbce135286ce20dc2fb8efe48fd0693ed8bfd7da3a60e2465cffff6d35047fe94fd7863b43159bf41b377a9982939b7c65fdba1e30af24a
languageName: node
linkType: hard
"parse-duration@npm:^1.1.0":
version: 1.1.0
resolution: "parse-duration@npm:1.1.0"
@ -29399,6 +29639,16 @@ __metadata:
languageName: node
linkType: hard
"random-path@npm:^0.1.0":
version: 0.1.2
resolution: "random-path@npm:0.1.2"
dependencies:
base32-encode: "npm:^0.1.0 || ^1.0.0"
murmur-32: "npm:^0.1.0 || ^0.2.0"
checksum: 581b9eea25da11ddff462f459e787befd8e28f662eca2c64ef721235a6c53b5cbde2f973a05e9d91cea7722f3622bd127f2bb34897b4700ef8d0926a69fb3d11
languageName: node
linkType: hard
"randombytes@npm:^2.1.0":
version: 2.1.0
resolution: "randombytes@npm:2.1.0"
@ -30278,6 +30528,13 @@ __metadata:
languageName: node
linkType: hard
"repeat-string@npm:^1.5.4":
version: 1.6.1
resolution: "repeat-string@npm:1.6.1"
checksum: 1b809fc6db97decdc68f5b12c4d1a671c8e3f65ec4a40c238bc5200e44e85bcc52a54f78268ab9c29fcf5fe4f1343e805420056d1f30fa9a9ee4c2d93e3cc6c0
languageName: node
linkType: hard
"require-directory@npm:^2.1.1":
version: 2.1.1
resolution: "require-directory@npm:2.1.1"
@ -31722,6 +31979,13 @@ __metadata:
languageName: node
linkType: hard
"stream-buffers@npm:~2.2.0":
version: 2.2.0
resolution: "stream-buffers@npm:2.2.0"
checksum: 79f897cead810383b4181e4ee56f4855a69b51c9da4c96b91ccca6ee6fe90b908bea9b304225bedd1a5e2c41d72bc88d3ada7f897b51f8ffae3593f7460ecbc8
languageName: node
linkType: hard
"stream-shift@npm:^1.0.0":
version: 1.0.1
resolution: "stream-shift@npm:1.0.1"
@ -32671,6 +32935,22 @@ __metadata:
languageName: node
linkType: hard
"tn1150@npm:^0.1.0":
version: 0.1.0
resolution: "tn1150@npm:0.1.0"
dependencies:
unorm: "npm:^1.4.1"
checksum: ea560e04faebd21e814acf9ba27db280e56ef99d9ea7b68e49aeededbd2b624faa340f2d049c5e9f17258df68ab49063335d074565e3ff88c3d39c87808e098c
languageName: node
linkType: hard
"to-data-view@npm:^1.1.0":
version: 1.1.0
resolution: "to-data-view@npm:1.1.0"
checksum: 53bf818cf7ed4b481568085cfed5528b268efe1e95d0b90c2a45031de9cf40de91600771c046924348fdedbedb54f655f98e7bf1c51041ba06f0ec3f2fd53dc6
languageName: node
linkType: hard
"to-fast-properties@npm:^2.0.0":
version: 2.0.0
resolution: "to-fast-properties@npm:2.0.0"
@ -33365,6 +33645,13 @@ __metadata:
languageName: node
linkType: hard
"unorm@npm:^1.4.1":
version: 1.6.0
resolution: "unorm@npm:1.6.0"
checksum: af09a4c656830173571a547605a185916eb5ee2a684374282edf318ef54882f9b25d00bfd44591b686a292d8130e083755a3317eca62753d56e18616e98e501b
languageName: node
linkType: hard
"unpipe@npm:1.0.0, unpipe@npm:~1.0.0":
version: 1.0.0
resolution: "unpipe@npm:1.0.0"
@ -34850,7 +35137,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "y-provider@workspace:packages/common/y-provider"
dependencies:
"@blocksuite/store": "npm:0.0.0-20231018100009-361737d3-nightly"
"@blocksuite/store": "npm:0.0.0-20231024064721-2aee7119-nightly"
vite: "npm:^4.4.11"
vite-plugin-dts: "npm:3.6.0"
vitest: "npm:0.34.6"