feat: allow peek view to be closed by the caller && bump bs (#8542)
depends on https://github.com/toeverything/blocksuite/pull/8558 fix BS-1570
This commit is contained in:
2
packages/common/env/package.json
vendored
2
packages/common/env/package.json
vendored
@@ -3,7 +3,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blocksuite/affine": "0.17.19",
|
"@blocksuite/affine": "0.0.0-canary-20241028080828",
|
||||||
"vitest": "2.1.1"
|
"vitest": "2.1.1"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
"@affine/debug": "workspace:*",
|
"@affine/debug": "workspace:*",
|
||||||
"@affine/env": "workspace:*",
|
"@affine/env": "workspace:*",
|
||||||
"@affine/templates": "workspace:*",
|
"@affine/templates": "workspace:*",
|
||||||
"@blocksuite/affine": "0.17.19",
|
"@blocksuite/affine": "0.0.0-canary-20241028080828",
|
||||||
"@datastructures-js/binary-search-tree": "^5.3.2",
|
"@datastructures-js/binary-search-tree": "^5.3.2",
|
||||||
"foxact": "^0.2.33",
|
"foxact": "^0.2.33",
|
||||||
"fractional-indexing": "^3.2.0",
|
"fractional-indexing": "^3.2.0",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
"@affine/component": "workspace:*",
|
"@affine/component": "workspace:*",
|
||||||
"@affine/core": "workspace:*",
|
"@affine/core": "workspace:*",
|
||||||
"@affine/i18n": "workspace:*",
|
"@affine/i18n": "workspace:*",
|
||||||
"@blocksuite/affine": "0.17.19",
|
"@blocksuite/affine": "0.0.0-canary-20241028080828",
|
||||||
"@blocksuite/icons": "^2.1.67",
|
"@blocksuite/icons": "^2.1.67",
|
||||||
"@capacitor/android": "^6.1.2",
|
"@capacitor/android": "^6.1.2",
|
||||||
"@capacitor/core": "^6.1.2",
|
"@capacitor/core": "^6.1.2",
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
"@affine/core": "workspace:*",
|
"@affine/core": "workspace:*",
|
||||||
"@affine/i18n": "workspace:*",
|
"@affine/i18n": "workspace:*",
|
||||||
"@affine/native": "workspace:*",
|
"@affine/native": "workspace:*",
|
||||||
"@blocksuite/affine": "0.17.19",
|
"@blocksuite/affine": "0.0.0-canary-20241028080828",
|
||||||
"@electron-forge/cli": "^7.3.0",
|
"@electron-forge/cli": "^7.3.0",
|
||||||
"@electron-forge/core": "^7.3.0",
|
"@electron-forge/core": "^7.3.0",
|
||||||
"@electron-forge/core-utils": "^7.3.0",
|
"@electron-forge/core-utils": "^7.3.0",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
"@affine/component": "workspace:*",
|
"@affine/component": "workspace:*",
|
||||||
"@affine/core": "workspace:*",
|
"@affine/core": "workspace:*",
|
||||||
"@affine/i18n": "workspace:*",
|
"@affine/i18n": "workspace:*",
|
||||||
"@blocksuite/affine": "0.17.19",
|
"@blocksuite/affine": "0.0.0-canary-20241028080828",
|
||||||
"@blocksuite/icons": "^2.1.67",
|
"@blocksuite/icons": "^2.1.67",
|
||||||
"@capacitor/app": "^6.0.1",
|
"@capacitor/app": "^6.0.1",
|
||||||
"@capacitor/browser": "^6.0.3",
|
"@capacitor/browser": "^6.0.3",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
"@affine/component": "workspace:*",
|
"@affine/component": "workspace:*",
|
||||||
"@affine/core": "workspace:*",
|
"@affine/core": "workspace:*",
|
||||||
"@affine/i18n": "workspace:*",
|
"@affine/i18n": "workspace:*",
|
||||||
"@blocksuite/affine": "0.17.19",
|
"@blocksuite/affine": "0.0.0-canary-20241028080828",
|
||||||
"@blocksuite/icons": "^2.1.67",
|
"@blocksuite/icons": "^2.1.67",
|
||||||
"@sentry/react": "^8.0.0",
|
"@sentry/react": "^8.0.0",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
"zod": "^3.22.4"
|
"zod": "^3.22.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blocksuite/affine": "0.17.19",
|
"@blocksuite/affine": "0.0.0-canary-20241028080828",
|
||||||
"@blocksuite/icons": "2.1.69",
|
"@blocksuite/icons": "2.1.69",
|
||||||
"@chromatic-com/storybook": "^3.0.0",
|
"@chromatic-com/storybook": "^3.0.0",
|
||||||
"@storybook/addon-essentials": "^8.2.9",
|
"@storybook/addon-essentials": "^8.2.9",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
"@affine/i18n": "workspace:*",
|
"@affine/i18n": "workspace:*",
|
||||||
"@affine/templates": "workspace:*",
|
"@affine/templates": "workspace:*",
|
||||||
"@affine/track": "workspace:*",
|
"@affine/track": "workspace:*",
|
||||||
"@blocksuite/affine": "0.17.19",
|
"@blocksuite/affine": "0.0.0-canary-20241028080828",
|
||||||
"@blocksuite/icons": "2.1.69",
|
"@blocksuite/icons": "2.1.69",
|
||||||
"@capacitor/app": "^6.0.1",
|
"@capacitor/app": "^6.0.1",
|
||||||
"@capacitor/browser": "^6.0.3",
|
"@capacitor/browser": "^6.0.3",
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import {
|
|||||||
} from '@blocksuite/affine/blocks';
|
} from '@blocksuite/affine/blocks';
|
||||||
import {
|
import {
|
||||||
Bound,
|
Bound,
|
||||||
getElementsBound,
|
getCommonBoundWithRotation,
|
||||||
type SerializedXYWH,
|
type SerializedXYWH,
|
||||||
} from '@blocksuite/affine/global/utils';
|
} from '@blocksuite/affine/global/utils';
|
||||||
import type { Doc } from '@blocksuite/affine/store';
|
import type { Doc } from '@blocksuite/affine/store';
|
||||||
@@ -398,7 +398,7 @@ const ADD_TO_EDGELESS_AS_NOTE = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (elements.length > 0) {
|
if (elements.length > 0) {
|
||||||
const bound = getElementsBound(
|
const bound = getCommonBoundWithRotation(
|
||||||
elements.map(e => Bound.deserialize(e.xywh))
|
elements.map(e => Bound.deserialize(e.xywh))
|
||||||
);
|
);
|
||||||
const newBound = new Bound(bound.x, bound.maxY + 10, bound.w);
|
const newBound = new Bound(bound.x, bound.maxY + 10, bound.w);
|
||||||
@@ -494,7 +494,7 @@ const CREATE_AS_LINKED_DOC = {
|
|||||||
let y = 0;
|
let y = 0;
|
||||||
if (elements.length) {
|
if (elements.length) {
|
||||||
// Calculate the bound of the selected elements first
|
// Calculate the bound of the selected elements first
|
||||||
const bound = getElementsBound(
|
const bound = getCommonBoundWithRotation(
|
||||||
elements.map(e => Bound.deserialize(e.xywh))
|
elements.map(e => Bound.deserialize(e.xywh))
|
||||||
);
|
);
|
||||||
x = bound.x;
|
x = bound.x;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import type {
|
|||||||
import {
|
import {
|
||||||
type AIItemGroupConfig,
|
type AIItemGroupConfig,
|
||||||
type AISubItemConfig,
|
type AISubItemConfig,
|
||||||
type CopilotSelectionController,
|
type CopilotTool,
|
||||||
EDGELESS_ELEMENT_TOOLBAR_WIDGET,
|
EDGELESS_ELEMENT_TOOLBAR_WIDGET,
|
||||||
type EdgelessElementToolbarWidget,
|
type EdgelessElementToolbarWidget,
|
||||||
matchFlavours,
|
matchFlavours,
|
||||||
@@ -251,10 +251,9 @@ function edgelessHandler<T extends keyof BlockSuitePresets.AIActions>(
|
|||||||
if (!edgeless) {
|
if (!edgeless) {
|
||||||
AIProvider.slots.requestRunInEdgeless.emit({ host });
|
AIProvider.slots.requestRunInEdgeless.emit({ host });
|
||||||
} else {
|
} else {
|
||||||
edgeless.tools.setEdgelessTool({ type: 'copilot' });
|
edgeless.gfx.tool.setTool({ type: 'copilot' });
|
||||||
const currentController = edgeless.tools.controllers[
|
const currentController =
|
||||||
'copilot'
|
edgeless.gfx.tool.currentTool$.peek() as CopilotTool;
|
||||||
] as CopilotSelectionController;
|
|
||||||
const selectedElements = edgeless.service.selection.selectedElements;
|
const selectedElements = edgeless.service.selection.selectedElements;
|
||||||
currentController.updateDragPointsWith(selectedElements, 10);
|
currentController.updateDragPointsWith(selectedElements, 10);
|
||||||
currentController.draggingAreaUpdated.emit(false); // do not show edgeless panel
|
currentController.draggingAreaUpdated.emit(false); // do not show edgeless panel
|
||||||
|
|||||||
@@ -388,7 +388,8 @@ function updateEdgelessAIPanelConfig<
|
|||||||
config.hideCallback = () => {
|
config.hideCallback = () => {
|
||||||
aiPanel.updateComplete
|
aiPanel.updateComplete
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
edgelessCopilot.edgeless.service.tool.switchToDefaultMode({
|
edgelessCopilot.edgeless.gfx.tool.setTool('default');
|
||||||
|
edgelessCopilot.edgeless.gfx.selection.set({
|
||||||
elements: [],
|
elements: [],
|
||||||
editing: false,
|
editing: false,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import type {
|
|||||||
SurfaceBlockModel,
|
SurfaceBlockModel,
|
||||||
} from '@blocksuite/affine/blocks';
|
} from '@blocksuite/affine/blocks';
|
||||||
import {
|
import {
|
||||||
|
addImages,
|
||||||
DeleteIcon,
|
DeleteIcon,
|
||||||
EDGELESS_ELEMENT_TOOLBAR_WIDGET,
|
EDGELESS_ELEMENT_TOOLBAR_WIDGET,
|
||||||
EDGELESS_TEXT_BLOCK_MIN_HEIGHT,
|
EDGELESS_TEXT_BLOCK_MIN_HEIGHT,
|
||||||
@@ -312,8 +313,7 @@ const imageHandler = (host: EditorHost) => {
|
|||||||
const [x, y] = edgelessRoot.service.viewport.toViewCoord(minX, minY);
|
const [x, y] = edgelessRoot.service.viewport.toViewCoord(minX, minY);
|
||||||
|
|
||||||
host.doc.transact(() => {
|
host.doc.transact(() => {
|
||||||
edgelessRoot
|
addImages(edgelessRoot.std, [img], [x, y])
|
||||||
.addImages([img], [x, y])
|
|
||||||
.then(blockIds => {
|
.then(blockIds => {
|
||||||
const imageBlockId = blockIds[0];
|
const imageBlockId = blockIds[0];
|
||||||
const imageBlock = host.doc.getBlock(imageBlockId);
|
const imageBlock = host.doc.getBlock(imageBlockId);
|
||||||
@@ -413,7 +413,7 @@ export const responses: {
|
|||||||
const mindmap = elements[0].group as MindmapElementModel;
|
const mindmap = elements[0].group as MindmapElementModel;
|
||||||
const xywh = mindmap.tree.element.xywh;
|
const xywh = mindmap.tree.element.xywh;
|
||||||
|
|
||||||
surface.removeElement(mindmap.id);
|
surface.deleteElement(mindmap.id);
|
||||||
|
|
||||||
if (data.node) {
|
if (data.node) {
|
||||||
data.node.xywh = xywh;
|
data.node.xywh = xywh;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import {
|
|||||||
EdgelessCopilotWidget,
|
EdgelessCopilotWidget,
|
||||||
EdgelessElementToolbarWidget,
|
EdgelessElementToolbarWidget,
|
||||||
EdgelessRootBlockSpec,
|
EdgelessRootBlockSpec,
|
||||||
edgelessRootWigetViewMap,
|
edgelessRootWidgetViewMap,
|
||||||
ImageBlockSpec,
|
ImageBlockSpec,
|
||||||
PageRootBlockSpec,
|
PageRootBlockSpec,
|
||||||
pageRootWidgetViewMap,
|
pageRootWidgetViewMap,
|
||||||
@@ -114,7 +114,7 @@ export const AIEdgelessRootBlockSpec: ExtensionType[] = [
|
|||||||
setup: di => {
|
setup: di => {
|
||||||
di.override(WidgetViewMapIdentifier('affine:page'), () => {
|
di.override(WidgetViewMapIdentifier('affine:page'), () => {
|
||||||
return {
|
return {
|
||||||
...edgelessRootWigetViewMap,
|
...edgelessRootWidgetViewMap,
|
||||||
[AFFINE_EDGELESS_COPILOT_WIDGET]: literal`${unsafeStatic(
|
[AFFINE_EDGELESS_COPILOT_WIDGET]: literal`${unsafeStatic(
|
||||||
AFFINE_EDGELESS_COPILOT_WIDGET
|
AFFINE_EDGELESS_COPILOT_WIDGET
|
||||||
)}`,
|
)}`,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { EditorHost } from '@blocksuite/affine/block-std';
|
import type { EditorHost } from '@blocksuite/affine/block-std';
|
||||||
import {
|
import {
|
||||||
type CopilotSelectionController,
|
type CopilotTool,
|
||||||
type FrameBlockModel,
|
type FrameBlockModel,
|
||||||
ImageBlockModel,
|
ImageBlockModel,
|
||||||
type SurfaceBlockComponent,
|
type SurfaceBlockComponent,
|
||||||
@@ -279,7 +279,7 @@ export function getCopilotSelectedElems(
|
|||||||
const copilotWidget = getEdgelessCopilotWidget(host);
|
const copilotWidget = getEdgelessCopilotWidget(host);
|
||||||
|
|
||||||
if (copilotWidget.visible) {
|
if (copilotWidget.visible) {
|
||||||
return (service.tool.controllers['copilot'] as CopilotSelectionController)
|
return (service.gfx.tool.currentTool$.peek() as CopilotTool)
|
||||||
.selectedElements;
|
.selectedElements;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -83,7 +83,11 @@ export function AffinePageReference({
|
|||||||
if (e.shiftKey && ref.current) {
|
if (e.shiftKey && ref.current) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
peekView.open(ref.current).catch(console.error);
|
peekView
|
||||||
|
.open({
|
||||||
|
element: ref.current,
|
||||||
|
})
|
||||||
|
.catch(console.error);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isInPeekView) {
|
if (isInPeekView) {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import {
|
|||||||
useRef,
|
useRef,
|
||||||
} from 'react';
|
} from 'react';
|
||||||
|
|
||||||
|
import type { DefaultOpenProperty } from '../../doc-properties';
|
||||||
import { BlocksuiteDocEditor, BlocksuiteEdgelessEditor } from './lit-adaper';
|
import { BlocksuiteDocEditor, BlocksuiteEdgelessEditor } from './lit-adaper';
|
||||||
import * as styles from './styles.css';
|
import * as styles from './styles.css';
|
||||||
|
|
||||||
@@ -29,6 +30,7 @@ interface BlocksuiteEditorContainerProps {
|
|||||||
mode: DocMode;
|
mode: DocMode;
|
||||||
shared?: boolean;
|
shared?: boolean;
|
||||||
className?: string;
|
className?: string;
|
||||||
|
defaultOpenProperty?: DefaultOpenProperty;
|
||||||
style?: React.CSSProperties;
|
style?: React.CSSProperties;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,7 +45,7 @@ export const BlocksuiteEditorContainer = forwardRef<
|
|||||||
AffineEditorContainer,
|
AffineEditorContainer,
|
||||||
BlocksuiteEditorContainerProps
|
BlocksuiteEditorContainerProps
|
||||||
>(function AffineEditorContainer(
|
>(function AffineEditorContainer(
|
||||||
{ page, mode, className, style, shared },
|
{ page, mode, className, style, shared, defaultOpenProperty },
|
||||||
ref
|
ref
|
||||||
) {
|
) {
|
||||||
const rootRef = useRef<HTMLDivElement>(null);
|
const rootRef = useRef<HTMLDivElement>(null);
|
||||||
@@ -171,6 +173,7 @@ export const BlocksuiteEditorContainer = forwardRef<
|
|||||||
ref={docRef}
|
ref={docRef}
|
||||||
titleRef={docTitleRef}
|
titleRef={docTitleRef}
|
||||||
onClickBlank={handleClickPageModeBlank}
|
onClickBlank={handleClickPageModeBlank}
|
||||||
|
defaultOpenProperty={defaultOpenProperty}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<BlocksuiteEdgelessEditor
|
<BlocksuiteEdgelessEditor
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import { use } from 'foxact/use';
|
|||||||
import type { CSSProperties } from 'react';
|
import type { CSSProperties } from 'react';
|
||||||
import { Suspense, useEffect } from 'react';
|
import { Suspense, useEffect } from 'react';
|
||||||
|
|
||||||
|
import type { DefaultOpenProperty } from '../../doc-properties';
|
||||||
import { BlocksuiteEditorContainer } from './blocksuite-editor-container';
|
import { BlocksuiteEditorContainer } from './blocksuite-editor-container';
|
||||||
import { NoPageRootError } from './no-page-error';
|
import { NoPageRootError } from './no-page-error';
|
||||||
|
|
||||||
@@ -23,6 +24,7 @@ export type EditorProps = {
|
|||||||
page: Doc;
|
page: Doc;
|
||||||
mode: DocMode;
|
mode: DocMode;
|
||||||
shared?: boolean;
|
shared?: boolean;
|
||||||
|
defaultOpenProperty?: DefaultOpenProperty;
|
||||||
// on Editor ready
|
// on Editor ready
|
||||||
onEditorReady?: (editor: AffineEditorContainer) => (() => void) | void;
|
onEditorReady?: (editor: AffineEditorContainer) => (() => void) | void;
|
||||||
style?: CSSProperties;
|
style?: CSSProperties;
|
||||||
@@ -58,6 +60,7 @@ const BlockSuiteEditorImpl = ({
|
|||||||
shared,
|
shared,
|
||||||
style,
|
style,
|
||||||
onEditorReady,
|
onEditorReady,
|
||||||
|
defaultOpenProperty,
|
||||||
}: EditorProps) => {
|
}: EditorProps) => {
|
||||||
usePageRoot(page);
|
usePageRoot(page);
|
||||||
|
|
||||||
@@ -134,6 +137,7 @@ const BlockSuiteEditorImpl = ({
|
|||||||
mode={mode}
|
mode={mode}
|
||||||
page={page}
|
page={page}
|
||||||
shared={shared}
|
shared={shared}
|
||||||
|
defaultOpenProperty={defaultOpenProperty}
|
||||||
ref={editorRef}
|
ref={editorRef}
|
||||||
className={className}
|
className={className}
|
||||||
style={style}
|
style={style}
|
||||||
|
|||||||
@@ -39,7 +39,10 @@ import {
|
|||||||
AffinePageReference,
|
AffinePageReference,
|
||||||
AffineSharedPageReference,
|
AffineSharedPageReference,
|
||||||
} from '../../affine/reference-link';
|
} from '../../affine/reference-link';
|
||||||
import { DocPropertiesTable } from '../../doc-properties';
|
import {
|
||||||
|
type DefaultOpenProperty,
|
||||||
|
DocPropertiesTable,
|
||||||
|
} from '../../doc-properties';
|
||||||
import { BiDirectionalLinkPanel } from './bi-directional-link-panel';
|
import { BiDirectionalLinkPanel } from './bi-directional-link-panel';
|
||||||
import { BlocksuiteEditorJournalDocTitle } from './journal-doc-title';
|
import { BlocksuiteEditorJournalDocTitle } from './journal-doc-title';
|
||||||
import {
|
import {
|
||||||
@@ -76,6 +79,7 @@ const adapted = {
|
|||||||
interface BlocksuiteEditorProps {
|
interface BlocksuiteEditorProps {
|
||||||
page: Doc;
|
page: Doc;
|
||||||
shared?: boolean;
|
shared?: boolean;
|
||||||
|
defaultOpenProperty?: DefaultOpenProperty;
|
||||||
}
|
}
|
||||||
|
|
||||||
const usePatchSpecs = (shared: boolean, mode: DocMode) => {
|
const usePatchSpecs = (shared: boolean, mode: DocMode) => {
|
||||||
@@ -191,7 +195,13 @@ export const BlocksuiteDocEditor = forwardRef<
|
|||||||
titleRef?: React.Ref<DocTitle>;
|
titleRef?: React.Ref<DocTitle>;
|
||||||
}
|
}
|
||||||
>(function BlocksuiteDocEditor(
|
>(function BlocksuiteDocEditor(
|
||||||
{ page, shared, onClickBlank, titleRef: externalTitleRef },
|
{
|
||||||
|
page,
|
||||||
|
shared,
|
||||||
|
onClickBlank,
|
||||||
|
titleRef: externalTitleRef,
|
||||||
|
defaultOpenProperty,
|
||||||
|
},
|
||||||
ref
|
ref
|
||||||
) {
|
) {
|
||||||
const titleRef = useRef<DocTitle | null>(null);
|
const titleRef = useRef<DocTitle | null>(null);
|
||||||
@@ -245,7 +255,9 @@ export const BlocksuiteDocEditor = forwardRef<
|
|||||||
) : (
|
) : (
|
||||||
<BlocksuiteEditorJournalDocTitle page={page} />
|
<BlocksuiteEditorJournalDocTitle page={page} />
|
||||||
)}
|
)}
|
||||||
{!shared ? <DocPropertiesTable /> : null}
|
{!shared ? (
|
||||||
|
<DocPropertiesTable defaultOpenProperty={defaultOpenProperty} />
|
||||||
|
) : null}
|
||||||
<adapted.DocEditor
|
<adapted.DocEditor
|
||||||
className={styles.docContainer}
|
className={styles.docContainer}
|
||||||
ref={onDocRef}
|
ref={onDocRef}
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ import {
|
|||||||
type ExtensionType,
|
type ExtensionType,
|
||||||
} from '@blocksuite/affine/block-std';
|
} from '@blocksuite/affine/block-std';
|
||||||
import {
|
import {
|
||||||
|
EdgelessBuiltInManager,
|
||||||
EdgelessRootBlockSpec,
|
EdgelessRootBlockSpec,
|
||||||
|
EdgelessToolExtension,
|
||||||
EditorSettingExtension,
|
EditorSettingExtension,
|
||||||
FontLoaderService,
|
FontLoaderService,
|
||||||
PageRootBlockSpec,
|
PageRootBlockSpec,
|
||||||
@@ -74,6 +76,8 @@ export function createEdgelessRootBlockSpec(
|
|||||||
return [
|
return [
|
||||||
enableAI ? AIEdgelessRootBlockSpec : EdgelessRootBlockSpec,
|
enableAI ? AIEdgelessRootBlockSpec : EdgelessRootBlockSpec,
|
||||||
FontLoaderService,
|
FontLoaderService,
|
||||||
|
EdgelessToolExtension,
|
||||||
|
EdgelessBuiltInManager,
|
||||||
getFontConfigExtension(),
|
getFontConfigExtension(),
|
||||||
getTelemetryExtension(),
|
getTelemetryExtension(),
|
||||||
getEditorConfigExtension(framework),
|
getEditorConfigExtension(framework),
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import type { EditorService } from '@affine/core/modules/editor';
|
|||||||
import { EditorSettingService } from '@affine/core/modules/editor-settting';
|
import { EditorSettingService } from '@affine/core/modules/editor-settting';
|
||||||
import { resolveLinkToDoc } from '@affine/core/modules/navigation';
|
import { resolveLinkToDoc } from '@affine/core/modules/navigation';
|
||||||
import type { PeekViewService } from '@affine/core/modules/peek-view';
|
import type { PeekViewService } from '@affine/core/modules/peek-view';
|
||||||
import type { ActivePeekView } from '@affine/core/modules/peek-view/entities/peek-view';
|
|
||||||
import {
|
import {
|
||||||
CreationQuickSearchSession,
|
CreationQuickSearchSession,
|
||||||
DocsQuickSearchSession,
|
DocsQuickSearchSession,
|
||||||
@@ -35,6 +34,8 @@ import type {
|
|||||||
AffineReference,
|
AffineReference,
|
||||||
DocMode,
|
DocMode,
|
||||||
DocModeProvider,
|
DocModeProvider,
|
||||||
|
PeekOptions,
|
||||||
|
PeekViewService as BSPeekViewService,
|
||||||
QuickSearchResult,
|
QuickSearchResult,
|
||||||
RootService,
|
RootService,
|
||||||
} from '@blocksuite/affine/blocks';
|
} from '@blocksuite/affine/blocks';
|
||||||
@@ -243,11 +244,28 @@ export function patchEmbedLinkedDocBlockConfig(framework: FrameworkProvider) {
|
|||||||
|
|
||||||
export function patchPeekViewService(service: PeekViewService) {
|
export function patchPeekViewService(service: PeekViewService) {
|
||||||
return PeekViewExtension({
|
return PeekViewExtension({
|
||||||
peek: (target: ActivePeekView['target'], template?: TemplateResult) => {
|
peek: (
|
||||||
logger.debug('center peek', target, template);
|
element: {
|
||||||
return service.peekView.open(target, template);
|
target: HTMLElement;
|
||||||
|
docId: string;
|
||||||
|
blockIds?: string[];
|
||||||
|
template?: TemplateResult;
|
||||||
|
},
|
||||||
|
options?: PeekOptions
|
||||||
|
) => {
|
||||||
|
logger.debug('center peek', element);
|
||||||
|
const { template, target, ...props } = element;
|
||||||
|
|
||||||
|
return service.peekView.open(
|
||||||
|
{
|
||||||
|
element: target,
|
||||||
|
docRef: props,
|
||||||
|
},
|
||||||
|
template,
|
||||||
|
options?.abortSignal
|
||||||
|
);
|
||||||
},
|
},
|
||||||
});
|
} satisfies BSPeekViewService);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function patchDocModeService(
|
export function patchDocModeService(
|
||||||
|
|||||||
@@ -41,6 +41,20 @@ type DocBacklinksPopupProps = PropsWithChildren<{
|
|||||||
backlinks: { docId: string; blockId: string; title: string }[];
|
backlinks: { docId: string; blockId: string; title: string }[];
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
export type DefaultOpenProperty =
|
||||||
|
| {
|
||||||
|
type: 'workspace';
|
||||||
|
}
|
||||||
|
| {
|
||||||
|
type: 'database';
|
||||||
|
databaseId: string;
|
||||||
|
databaseRowId: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export interface DocPropertiesTableProps {
|
||||||
|
defaultOpenProperty?: DefaultOpenProperty;
|
||||||
|
}
|
||||||
|
|
||||||
export const DocBacklinksPopup = ({
|
export const DocBacklinksPopup = ({
|
||||||
backlinks,
|
backlinks,
|
||||||
children,
|
children,
|
||||||
@@ -231,18 +245,19 @@ export const DocPropertyRow = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
interface DocPropertiesTableBodyProps {
|
interface DocWorkspacePropertiesTableBodyProps {
|
||||||
className?: string;
|
className?: string;
|
||||||
style?: React.CSSProperties;
|
style?: React.CSSProperties;
|
||||||
|
defaultOpen?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 🏷️ Tags (⋅ xxx) (⋅ yyy)
|
// 🏷️ Tags (⋅ xxx) (⋅ yyy)
|
||||||
// #️⃣ Number 123456
|
// #️⃣ Number 123456
|
||||||
// + Add a property
|
// + Add a property
|
||||||
export const DocPropertiesTableBody = forwardRef<
|
const DocWorkspacePropertiesTableBody = forwardRef<
|
||||||
HTMLDivElement,
|
HTMLDivElement,
|
||||||
DocPropertiesTableBodyProps & HTMLProps<HTMLDivElement>
|
DocWorkspacePropertiesTableBodyProps & HTMLProps<HTMLDivElement>
|
||||||
>(({ className, style, ...props }, ref) => {
|
>(({ className, style, defaultOpen, ...props }, ref) => {
|
||||||
const t = useI18n();
|
const t = useI18n();
|
||||||
const docsService = useService(DocsService);
|
const docsService = useService(DocsService);
|
||||||
const workbenchService = useService(WorkbenchService);
|
const workbenchService = useService(WorkbenchService);
|
||||||
@@ -258,6 +273,7 @@ export const DocPropertiesTableBody = forwardRef<
|
|||||||
className={clsx(styles.tableBodyRoot, className)}
|
className={clsx(styles.tableBodyRoot, className)}
|
||||||
style={style}
|
style={style}
|
||||||
title={t.t('com.affine.workspace.properties')}
|
title={t.t('com.affine.workspace.properties')}
|
||||||
|
defaultCollapsed={!defaultOpen}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
<PropertyCollapsibleContent
|
<PropertyCollapsibleContent
|
||||||
@@ -334,10 +350,12 @@ export const DocPropertiesTableBody = forwardRef<
|
|||||||
</PropertyCollapsibleSection>
|
</PropertyCollapsibleSection>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
DocPropertiesTableBody.displayName = 'PagePropertiesTableBody';
|
DocWorkspacePropertiesTableBody.displayName = 'PagePropertiesTableBody';
|
||||||
|
|
||||||
const DocPropertiesTableInner = () => {
|
const DocPropertiesTableInner = ({
|
||||||
const [expanded, setExpanded] = useState(false);
|
defaultOpenProperty,
|
||||||
|
}: DocPropertiesTableProps) => {
|
||||||
|
const [expanded, setExpanded] = useState(!!defaultOpenProperty);
|
||||||
return (
|
return (
|
||||||
<div className={styles.root}>
|
<div className={styles.root}>
|
||||||
<Collapsible.Root
|
<Collapsible.Root
|
||||||
@@ -347,9 +365,24 @@ const DocPropertiesTableInner = () => {
|
|||||||
>
|
>
|
||||||
<DocPropertiesTableHeader open={expanded} onOpenChange={setExpanded} />
|
<DocPropertiesTableHeader open={expanded} onOpenChange={setExpanded} />
|
||||||
<Collapsible.Content>
|
<Collapsible.Content>
|
||||||
<DocPropertiesTableBody />
|
<DocWorkspacePropertiesTableBody
|
||||||
|
defaultOpen={
|
||||||
|
!defaultOpenProperty || defaultOpenProperty.type === 'workspace'
|
||||||
|
}
|
||||||
|
/>
|
||||||
<div className={styles.tableHeaderDivider} />
|
<div className={styles.tableHeaderDivider} />
|
||||||
<DocDatabaseBacklinkInfo />
|
<DocDatabaseBacklinkInfo
|
||||||
|
defaultOpen={
|
||||||
|
defaultOpenProperty?.type === 'database'
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
databaseId: defaultOpenProperty.databaseId,
|
||||||
|
rowId: defaultOpenProperty.databaseRowId,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: []
|
||||||
|
}
|
||||||
|
/>
|
||||||
</Collapsible.Content>
|
</Collapsible.Content>
|
||||||
</Collapsible.Root>
|
</Collapsible.Root>
|
||||||
</div>
|
</div>
|
||||||
@@ -358,6 +391,8 @@ const DocPropertiesTableInner = () => {
|
|||||||
|
|
||||||
// this is the main component that renders the page properties table at the top of the page below
|
// this is the main component that renders the page properties table at the top of the page below
|
||||||
// the page title
|
// the page title
|
||||||
export const DocPropertiesTable = () => {
|
export const DocPropertiesTable = ({
|
||||||
return <DocPropertiesTableInner />;
|
defaultOpenProperty,
|
||||||
|
}: DocPropertiesTableProps) => {
|
||||||
|
return <DocPropertiesTableInner defaultOpenProperty={defaultOpenProperty} />;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ export interface PageDetailEditorProps {
|
|||||||
export const PageDetailEditor = ({ onLoad }: PageDetailEditorProps) => {
|
export const PageDetailEditor = ({ onLoad }: PageDetailEditorProps) => {
|
||||||
const editor = useService(EditorService).editor;
|
const editor = useService(EditorService).editor;
|
||||||
const mode = useLiveData(editor.mode$);
|
const mode = useLiveData(editor.mode$);
|
||||||
|
const defaultOpenProperty = useLiveData(editor.defaultOpenProperty$);
|
||||||
|
|
||||||
const isSharedMode = editor.isSharedMode;
|
const isSharedMode = editor.isSharedMode;
|
||||||
const editorSetting = useService(EditorSettingService).editorSetting;
|
const editorSetting = useService(EditorSettingService).editorSetting;
|
||||||
@@ -68,6 +69,7 @@ export const PageDetailEditor = ({ onLoad }: PageDetailEditorProps) => {
|
|||||||
} as CSSProperties
|
} as CSSProperties
|
||||||
}
|
}
|
||||||
mode={mode}
|
mode={mode}
|
||||||
|
defaultOpenProperty={defaultOpenProperty}
|
||||||
page={editor.doc.blockSuiteDoc}
|
page={editor.doc.blockSuiteDoc}
|
||||||
shared={isSharedMode}
|
shared={isSharedMode}
|
||||||
onEditorReady={onLoad}
|
onEditorReady={onLoad}
|
||||||
|
|||||||
@@ -152,19 +152,12 @@ const WorkspacePage = ({ meta }: { meta: WorkspaceMetadata }) => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
window.exportWorkspaceSnapshot = async (docs?: string[]) => {
|
window.exportWorkspaceSnapshot = async (docs?: string[]) => {
|
||||||
const zip = await ZipTransformer.exportDocs(
|
await ZipTransformer.exportDocs(
|
||||||
workspace.docCollection,
|
workspace.docCollection,
|
||||||
Array.from(workspace.docCollection.docs.values())
|
Array.from(workspace.docCollection.docs.values())
|
||||||
.filter(doc => (docs ? docs.includes(doc.id) : true))
|
.filter(doc => (docs ? docs.includes(doc.id) : true))
|
||||||
.map(doc => doc.getDoc())
|
.map(doc => doc.getDoc())
|
||||||
);
|
);
|
||||||
const url = URL.createObjectURL(zip);
|
|
||||||
// download url
|
|
||||||
const a = document.createElement('a');
|
|
||||||
a.href = url;
|
|
||||||
a.download = `${workspace.docCollection.meta.name}.zip`;
|
|
||||||
a.click();
|
|
||||||
URL.revokeObjectURL(url);
|
|
||||||
};
|
};
|
||||||
window.importWorkspaceSnapshot = async () => {
|
window.importWorkspaceSnapshot = async () => {
|
||||||
const input = document.createElement('input');
|
const input = document.createElement('input');
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
import { Divider, Scrollable } from '@affine/component';
|
import { Divider, Scrollable } from '@affine/component';
|
||||||
import { DocPropertiesTable } from '@affine/core/components/doc-properties';
|
import {
|
||||||
|
type DefaultOpenProperty,
|
||||||
|
DocPropertiesTable,
|
||||||
|
} from '@affine/core/components/doc-properties';
|
||||||
import { LinksRow } from '@affine/core/components/doc-properties/info-modal/links-row';
|
import { LinksRow } from '@affine/core/components/doc-properties/info-modal/links-row';
|
||||||
import { TimeRow } from '@affine/core/components/doc-properties/info-modal/time-row';
|
import { TimeRow } from '@affine/core/components/doc-properties/info-modal/time-row';
|
||||||
import { DocsSearchService } from '@affine/core/modules/docs-search';
|
import { DocsSearchService } from '@affine/core/modules/docs-search';
|
||||||
@@ -9,7 +12,13 @@ import { Suspense, useMemo } from 'react';
|
|||||||
|
|
||||||
import * as styles from './doc-info.css';
|
import * as styles from './doc-info.css';
|
||||||
|
|
||||||
export const DocInfoSheet = ({ docId }: { docId: string }) => {
|
export const DocInfoSheet = ({
|
||||||
|
docId,
|
||||||
|
defaultOpenProperty,
|
||||||
|
}: {
|
||||||
|
docId: string;
|
||||||
|
defaultOpenProperty?: DefaultOpenProperty;
|
||||||
|
}) => {
|
||||||
const docsSearchService = useService(DocsSearchService);
|
const docsSearchService = useService(DocsSearchService);
|
||||||
const t = useI18n();
|
const t = useI18n();
|
||||||
|
|
||||||
@@ -52,7 +61,7 @@ export const DocInfoSheet = ({ docId }: { docId: string }) => {
|
|||||||
<Divider size="thinner" />
|
<Divider size="thinner" />
|
||||||
</>
|
</>
|
||||||
) : null}
|
) : null}
|
||||||
<DocPropertiesTable />
|
<DocPropertiesTable defaultOpenProperty={defaultOpenProperty} />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</Scrollable.Viewport>
|
</Scrollable.Viewport>
|
||||||
<Scrollable.Scrollbar className={styles.scrollBar} />
|
<Scrollable.Scrollbar className={styles.scrollBar} />
|
||||||
|
|||||||
@@ -95,6 +95,14 @@ const DatabaseBacklinkRow = ({
|
|||||||
}, [row?.cells]);
|
}, [row?.cells]);
|
||||||
const t = useI18n();
|
const t = useI18n();
|
||||||
|
|
||||||
|
const pageRefParams = useMemo(() => {
|
||||||
|
const params = new URLSearchParams();
|
||||||
|
if (row?.id) {
|
||||||
|
params.set('blockIds', row.databaseId);
|
||||||
|
}
|
||||||
|
return params;
|
||||||
|
}, [row]);
|
||||||
|
|
||||||
if (!row || !sortedCells) {
|
if (!row || !sortedCells) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -105,7 +113,11 @@ const DatabaseBacklinkRow = ({
|
|||||||
defaultCollapsed={!defaultOpen}
|
defaultCollapsed={!defaultOpen}
|
||||||
icon={<DatabaseTableViewIcon />}
|
icon={<DatabaseTableViewIcon />}
|
||||||
suffix={
|
suffix={
|
||||||
<AffinePageReference className={styles.docRefLink} pageId={row.docId} />
|
<AffinePageReference
|
||||||
|
className={styles.docRefLink}
|
||||||
|
pageId={row.docId}
|
||||||
|
params={pageRefParams}
|
||||||
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<PropertyCollapsibleContent
|
<PropertyCollapsibleContent
|
||||||
@@ -131,8 +143,8 @@ export const DocDatabaseBacklinkInfo = ({
|
|||||||
defaultOpen = [],
|
defaultOpen = [],
|
||||||
}: {
|
}: {
|
||||||
defaultOpen?: {
|
defaultOpen?: {
|
||||||
docId: string;
|
databaseId: string;
|
||||||
blockId: string;
|
rowId: string;
|
||||||
}[];
|
}[];
|
||||||
}) => {
|
}) => {
|
||||||
const doc = useService(DocService).doc;
|
const doc = useService(DocService).doc;
|
||||||
@@ -151,11 +163,13 @@ export const DocDatabaseBacklinkInfo = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.root}>
|
<div className={styles.root}>
|
||||||
{rows.map(({ docId, rowId, row$ }) => (
|
{rows.map(({ docId, databaseBlockId, rowId, row$ }) => (
|
||||||
<Fragment key={`${docId}-${rowId}`}>
|
<Fragment key={`${docId}-${rowId}`}>
|
||||||
<DatabaseBacklinkRow
|
<DatabaseBacklinkRow
|
||||||
defaultOpen={defaultOpen?.some(
|
defaultOpen={defaultOpen?.some(
|
||||||
backlink => backlink.docId === docId && backlink.blockId === rowId
|
backlink =>
|
||||||
|
backlink.databaseId === databaseBlockId &&
|
||||||
|
backlink.rowId === rowId
|
||||||
)}
|
)}
|
||||||
row$={row$}
|
row$={row$}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import type { DefaultOpenProperty } from '@affine/core/components/doc-properties';
|
||||||
import type {
|
import type {
|
||||||
DocMode,
|
DocMode,
|
||||||
EdgelessRootService,
|
EdgelessRootService,
|
||||||
@@ -8,6 +9,7 @@ import type {
|
|||||||
DocTitle,
|
DocTitle,
|
||||||
} from '@blocksuite/affine/presets';
|
} from '@blocksuite/affine/presets';
|
||||||
import type { InlineEditor } from '@blocksuite/inline';
|
import type { InlineEditor } from '@blocksuite/inline';
|
||||||
|
import { effect } from '@preact/signals-core';
|
||||||
import type { DocService, WorkspaceService } from '@toeverything/infra';
|
import type { DocService, WorkspaceService } from '@toeverything/infra';
|
||||||
import { Entity, LiveData } from '@toeverything/infra';
|
import { Entity, LiveData } from '@toeverything/infra';
|
||||||
import { defaults, isEqual, omit } from 'lodash-es';
|
import { defaults, isEqual, omit } from 'lodash-es';
|
||||||
@@ -29,6 +31,9 @@ export class Editor extends Entity {
|
|||||||
this.workspaceService.workspace.openOptions.isSharedMode;
|
this.workspaceService.workspace.openOptions.isSharedMode;
|
||||||
|
|
||||||
readonly editorContainer$ = new LiveData<AffineEditorContainer | null>(null);
|
readonly editorContainer$ = new LiveData<AffineEditorContainer | null>(null);
|
||||||
|
readonly defaultOpenProperty$ = new LiveData<DefaultOpenProperty | undefined>(
|
||||||
|
undefined
|
||||||
|
);
|
||||||
|
|
||||||
isPresenting$ = new LiveData<boolean>(false);
|
isPresenting$ = new LiveData<boolean>(false);
|
||||||
|
|
||||||
@@ -39,7 +44,7 @@ export class Editor extends Entity {
|
|||||||
) as EdgelessRootService;
|
) as EdgelessRootService;
|
||||||
if (!edgelessRootService) return;
|
if (!edgelessRootService) return;
|
||||||
|
|
||||||
edgelessRootService.tool.setEdgelessTool({
|
edgelessRootService.gfx.tool.setTool({
|
||||||
type: !this.isPresenting$.value ? 'frameNavigator' : 'default',
|
type: !this.isPresenting$.value ? 'frameNavigator' : 'default',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -60,6 +65,10 @@ export class Editor extends Entity {
|
|||||||
this.editorContainer$.next(editorContainer);
|
this.editorContainer$.next(editorContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setDefaultOpenProperty(defaultOpenProperty: DefaultOpenProperty | undefined) {
|
||||||
|
this.defaultOpenProperty$.next(defaultOpenProperty);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sync editor params with view query string
|
* sync editor params with view query string
|
||||||
*/
|
*/
|
||||||
@@ -102,6 +111,17 @@ export class Editor extends Entity {
|
|||||||
if (!isEqual(selector, omit(editorParams, ['mode']))) {
|
if (!isEqual(selector, omit(editorParams, ['mode']))) {
|
||||||
this.setSelector(selector);
|
this.setSelector(selector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (params.databaseId && params.databaseRowId) {
|
||||||
|
const defaultOpenProperty: DefaultOpenProperty = {
|
||||||
|
type: 'database',
|
||||||
|
databaseId: params.databaseId,
|
||||||
|
databaseRowId: params.databaseRowId,
|
||||||
|
};
|
||||||
|
if (!isEqual(defaultOpenProperty, this.defaultOpenProperty$.value)) {
|
||||||
|
this.setDefaultOpenProperty(defaultOpenProperty);
|
||||||
|
}
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
updating = false;
|
updating = false;
|
||||||
}
|
}
|
||||||
@@ -194,15 +214,15 @@ export class Editor extends Entity {
|
|||||||
this.isPresenting$.next(false);
|
this.isPresenting$.next(false);
|
||||||
} else {
|
} else {
|
||||||
this.isPresenting$.next(
|
this.isPresenting$.next(
|
||||||
edgelessPage.edgelessTool.type === 'frameNavigator'
|
edgelessPage.gfx.tool.currentToolName$.peek() === 'frameNavigator'
|
||||||
);
|
);
|
||||||
|
|
||||||
const disposable = edgelessPage.slots.edgelessToolUpdated.on(() => {
|
const disposable = effect(() => {
|
||||||
this.isPresenting$.next(
|
this.isPresenting$.next(
|
||||||
edgelessPage.edgelessTool.type === 'frameNavigator'
|
edgelessPage.gfx.tool.currentToolName$.value === 'frameNavigator'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
unsubs.push(disposable.dispose.bind(disposable));
|
unsubs.push(disposable);
|
||||||
}
|
}
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
|||||||
@@ -129,7 +129,14 @@ export const preprocessParams = (
|
|||||||
result.elementIds = result.elementIds.filter(v => v.length);
|
result.elementIds = result.elementIds.filter(v => v.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pick(result, ['mode', 'blockIds', 'elementIds', 'refreshKey']);
|
return pick(result, [
|
||||||
|
'mode',
|
||||||
|
'blockIds',
|
||||||
|
'elementIds',
|
||||||
|
'databaseId',
|
||||||
|
'databaseRowId',
|
||||||
|
'refreshKey',
|
||||||
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const paramsParseOptions: ParseOptions = {
|
export const paramsParseOptions: ParseOptions = {
|
||||||
@@ -142,6 +149,8 @@ export const paramsParseOptions: ParseOptions = {
|
|||||||
value.length ? value.split(',').filter(v => v.length) : [],
|
value.length ? value.split(',').filter(v => v.length) : [],
|
||||||
elementIds: value =>
|
elementIds: value =>
|
||||||
value.length ? value.split(',').filter(v => v.length) : [],
|
value.length ? value.split(',').filter(v => v.length) : [],
|
||||||
|
databaseId: 'string',
|
||||||
|
databaseRowId: 'string',
|
||||||
refreshKey: 'string',
|
refreshKey: 'string',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,31 +17,43 @@ import { firstValueFrom, map, race } from 'rxjs';
|
|||||||
import { resolveLinkToDoc } from '../../navigation';
|
import { resolveLinkToDoc } from '../../navigation';
|
||||||
import type { WorkbenchService } from '../../workbench';
|
import type { WorkbenchService } from '../../workbench';
|
||||||
|
|
||||||
export type PeekViewTarget =
|
export type DocReferenceInfo = {
|
||||||
| HTMLElement
|
|
||||||
| BlockComponent
|
|
||||||
| AffineReference
|
|
||||||
| HTMLAnchorElement
|
|
||||||
| { docId: string; blockIds?: string[] };
|
|
||||||
|
|
||||||
export interface DocPeekViewInfo {
|
|
||||||
type: 'doc';
|
|
||||||
docId: string;
|
docId: string;
|
||||||
mode?: DocMode;
|
mode?: DocMode;
|
||||||
blockIds?: string[];
|
blockIds?: string[];
|
||||||
elementIds?: string[];
|
elementIds?: string[];
|
||||||
|
databaseId?: string;
|
||||||
|
databaseRowId?: string;
|
||||||
|
/**
|
||||||
|
* viewport in edgeless mode
|
||||||
|
*/
|
||||||
xywh?: `[${number},${number},${number},${number}]`;
|
xywh?: `[${number},${number},${number},${number}]`;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PeekViewElement =
|
||||||
|
| HTMLElement
|
||||||
|
| BlockComponent
|
||||||
|
| AffineReference
|
||||||
|
| HTMLAnchorElement;
|
||||||
|
|
||||||
|
export interface PeekViewTarget {
|
||||||
|
element?: PeekViewElement;
|
||||||
|
docRef?: DocReferenceInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DocPeekViewInfo {
|
||||||
|
type: 'doc';
|
||||||
|
docRef: DocReferenceInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ImagePeekViewInfo = {
|
export type ImagePeekViewInfo = {
|
||||||
type: 'image';
|
type: 'image';
|
||||||
docId: string;
|
docRef: DocReferenceInfo;
|
||||||
blockIds: [string];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export type AIChatBlockPeekViewInfo = {
|
export type AIChatBlockPeekViewInfo = {
|
||||||
type: 'ai-chat-block';
|
type: 'ai-chat-block';
|
||||||
docId: string;
|
docRef: DocReferenceInfo;
|
||||||
host: EditorHost;
|
host: EditorHost;
|
||||||
model: AIChatBlockModel;
|
model: AIChatBlockModel;
|
||||||
};
|
};
|
||||||
@@ -101,83 +113,90 @@ function resolvePeekInfoFromPeekTarget(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (peekTarget instanceof AffineReference) {
|
const element = peekTarget.element;
|
||||||
const referenceInfo = peekTarget.referenceInfo;
|
|
||||||
if (referenceInfo) {
|
if (element) {
|
||||||
const { pageId: docId } = referenceInfo;
|
if (element instanceof AffineReference) {
|
||||||
const info: DocPeekViewInfo = {
|
const referenceInfo = element.referenceInfo;
|
||||||
type: 'doc',
|
if (referenceInfo) {
|
||||||
docId,
|
const { pageId: docId } = referenceInfo;
|
||||||
};
|
const info: DocPeekViewInfo = {
|
||||||
Object.assign(info, referenceInfo.params);
|
type: 'doc',
|
||||||
return info;
|
docRef: {
|
||||||
}
|
docId,
|
||||||
} else if ('model' in peekTarget) {
|
},
|
||||||
const blockModel = peekTarget.model;
|
};
|
||||||
if (isEmbedLinkedDocModel(blockModel)) {
|
Object.assign(info, referenceInfo.params);
|
||||||
const info: DocPeekViewInfo = {
|
return info;
|
||||||
type: 'doc',
|
}
|
||||||
docId: blockModel.pageId,
|
} else if ('model' in element) {
|
||||||
};
|
const blockModel = element.model;
|
||||||
Object.assign(info, blockModel.params);
|
if (isEmbedLinkedDocModel(blockModel)) {
|
||||||
return info;
|
const info: DocPeekViewInfo = {
|
||||||
} else if (isEmbedSyncedDocModel(blockModel)) {
|
type: 'doc',
|
||||||
return {
|
docRef: {
|
||||||
type: 'doc',
|
docId: blockModel.pageId,
|
||||||
docId: blockModel.pageId,
|
},
|
||||||
};
|
};
|
||||||
} else if (isSurfaceRefModel(blockModel)) {
|
Object.assign(info, blockModel.params);
|
||||||
const refModel = (peekTarget as SurfaceRefBlockComponent).referenceModel;
|
return info;
|
||||||
// refModel can be null if the reference is invalid
|
} else if (isEmbedSyncedDocModel(blockModel)) {
|
||||||
if (refModel) {
|
|
||||||
const docId =
|
|
||||||
'doc' in refModel ? refModel.doc.id : refModel.surface.doc.id;
|
|
||||||
return {
|
return {
|
||||||
type: 'doc',
|
type: 'doc',
|
||||||
docId,
|
docRef: {
|
||||||
mode: 'edgeless',
|
docId: blockModel.pageId,
|
||||||
xywh: refModel.xywh,
|
},
|
||||||
|
};
|
||||||
|
} else if (isSurfaceRefModel(blockModel)) {
|
||||||
|
const refModel = (element as SurfaceRefBlockComponent).referenceModel;
|
||||||
|
// refModel can be null if the reference is invalid
|
||||||
|
if (refModel) {
|
||||||
|
const docId =
|
||||||
|
'doc' in refModel ? refModel.doc.id : refModel.surface.doc.id;
|
||||||
|
return {
|
||||||
|
type: 'doc',
|
||||||
|
docRef: {
|
||||||
|
docId,
|
||||||
|
mode: 'edgeless',
|
||||||
|
xywh: refModel.xywh,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
} else if (isImageBlockModel(blockModel)) {
|
||||||
|
return {
|
||||||
|
type: 'image',
|
||||||
|
docRef: {
|
||||||
|
docId: blockModel.doc.id,
|
||||||
|
blockIds: [blockModel.id],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
} else if (isAIChatBlockModel(blockModel)) {
|
||||||
|
return {
|
||||||
|
type: 'ai-chat-block',
|
||||||
|
docRef: {
|
||||||
|
docId: blockModel.doc.id,
|
||||||
|
blockIds: [blockModel.id],
|
||||||
|
},
|
||||||
|
model: blockModel,
|
||||||
|
host: element.host,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} else if (isImageBlockModel(blockModel)) {
|
} else if (element instanceof HTMLAnchorElement) {
|
||||||
return {
|
const maybeDoc = resolveLinkToDoc(element.href);
|
||||||
type: 'image',
|
if (maybeDoc) {
|
||||||
docId: blockModel.doc.id,
|
const info: DocPeekViewInfo = {
|
||||||
blockIds: [blockModel.id],
|
type: 'doc',
|
||||||
};
|
docRef: maybeDoc,
|
||||||
} else if (isAIChatBlockModel(blockModel)) {
|
};
|
||||||
return {
|
return info;
|
||||||
type: 'ai-chat-block',
|
}
|
||||||
docId: blockModel.doc.id,
|
|
||||||
model: blockModel,
|
|
||||||
host: peekTarget.host,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
} else if (peekTarget instanceof HTMLAnchorElement) {
|
}
|
||||||
const maybeDoc = resolveLinkToDoc(peekTarget.href);
|
|
||||||
if (maybeDoc) {
|
|
||||||
const info: DocPeekViewInfo = {
|
|
||||||
type: 'doc',
|
|
||||||
docId: maybeDoc.docId,
|
|
||||||
};
|
|
||||||
|
|
||||||
if (maybeDoc.mode) {
|
if ('docRef' in peekTarget && peekTarget.docRef) {
|
||||||
info.mode = maybeDoc.mode;
|
|
||||||
}
|
|
||||||
if (maybeDoc.blockIds?.length) {
|
|
||||||
info.blockIds = maybeDoc.blockIds;
|
|
||||||
}
|
|
||||||
if (maybeDoc.elementIds?.length) {
|
|
||||||
info.elementIds = maybeDoc.elementIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
} else if ('docId' in peekTarget) {
|
|
||||||
return {
|
return {
|
||||||
type: 'doc',
|
type: 'doc',
|
||||||
docId: peekTarget.docId,
|
docRef: peekTarget.docRef,
|
||||||
blockIds: peekTarget.blockIds,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -208,7 +227,8 @@ export class PeekViewEntity extends Entity {
|
|||||||
// return true if the peek view will be handled
|
// return true if the peek view will be handled
|
||||||
open = async (
|
open = async (
|
||||||
target: ActivePeekView['target'],
|
target: ActivePeekView['target'],
|
||||||
template?: TemplateResult
|
template?: TemplateResult,
|
||||||
|
abortSignal?: AbortSignal
|
||||||
) => {
|
) => {
|
||||||
const resolvedInfo = resolvePeekInfoFromPeekTarget(target, template);
|
const resolvedInfo = resolvePeekInfoFromPeekTarget(target, template);
|
||||||
if (!resolvedInfo) {
|
if (!resolvedInfo) {
|
||||||
@@ -220,7 +240,7 @@ export class PeekViewEntity extends Entity {
|
|||||||
// if there is an active peek view and it is a doc peek view, we will navigate it first
|
// if there is an active peek view and it is a doc peek view, we will navigate it first
|
||||||
if (active?.info.type === 'doc' && this.show$.value?.value) {
|
if (active?.info.type === 'doc' && this.show$.value?.value) {
|
||||||
// TODO(@pengx17): scroll to the viewing position?
|
// TODO(@pengx17): scroll to the viewing position?
|
||||||
this.workbenchService.workbench.openDoc(active.info.docId);
|
this.workbenchService.workbench.openDoc(active.info.docRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._active$.next({ target, info: resolvedInfo });
|
this._active$.next({ target, info: resolvedInfo });
|
||||||
@@ -231,6 +251,24 @@ export class PeekViewEntity extends Entity {
|
|||||||
? 'zoom'
|
? 'zoom'
|
||||||
: 'fade',
|
: 'fade',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (abortSignal) {
|
||||||
|
const abortListener = () => {
|
||||||
|
if (this.active$.value?.target === target) {
|
||||||
|
this.close();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
abortSignal.addEventListener('abort', abortListener);
|
||||||
|
|
||||||
|
const showSubscription = this.show$.subscribe(v => {
|
||||||
|
if (!v && !abortSignal.aborted) {
|
||||||
|
abortSignal.removeEventListener('abort', abortListener);
|
||||||
|
showSubscription.unsubscribe();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return firstValueFrom(race(this._active$, this.show$).pipe(map(() => {})));
|
return firstValueFrom(race(this._active$, this.show$).pipe(map(() => {})));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { PageNotFound } from '@affine/core/desktop/pages/404';
|
|||||||
import { EditorService } from '@affine/core/modules/editor';
|
import { EditorService } from '@affine/core/modules/editor';
|
||||||
import { DebugLogger } from '@affine/debug';
|
import { DebugLogger } from '@affine/debug';
|
||||||
import {
|
import {
|
||||||
type DocMode,
|
|
||||||
type EdgelessRootService,
|
type EdgelessRootService,
|
||||||
RefNodeSlotsProvider,
|
RefNodeSlotsProvider,
|
||||||
} from '@blocksuite/affine/blocks';
|
} from '@blocksuite/affine/blocks';
|
||||||
@@ -24,6 +23,7 @@ import clsx from 'clsx';
|
|||||||
import { useCallback, useEffect } from 'react';
|
import { useCallback, useEffect } from 'react';
|
||||||
|
|
||||||
import { WorkbenchService } from '../../../workbench';
|
import { WorkbenchService } from '../../../workbench';
|
||||||
|
import type { DocReferenceInfo } from '../../entities/peek-view';
|
||||||
import { PeekViewService } from '../../services/peek-view';
|
import { PeekViewService } from '../../services/peek-view';
|
||||||
import { useEditor } from '../utils';
|
import { useEditor } from '../utils';
|
||||||
import * as styles from './doc-peek-view.css';
|
import * as styles from './doc-peek-view.css';
|
||||||
@@ -81,6 +81,7 @@ function DocPeekPreviewEditor({
|
|||||||
const doc = editor.doc;
|
const doc = editor.doc;
|
||||||
const workspace = editor.doc.workspace;
|
const workspace = editor.doc.workspace;
|
||||||
const mode = useLiveData(editor.mode$);
|
const mode = useLiveData(editor.mode$);
|
||||||
|
const defaultOpenProperty = useLiveData(editor.defaultOpenProperty$);
|
||||||
const workbench = useService(WorkbenchService).workbench;
|
const workbench = useService(WorkbenchService).workbench;
|
||||||
const peekView = useService(PeekViewService).peekView;
|
const peekView = useService(PeekViewService).peekView;
|
||||||
const editorElement = useLiveData(editor.editorContainer$);
|
const editorElement = useLiveData(editor.editorContainer$);
|
||||||
@@ -96,11 +97,11 @@ function DocPeekPreviewEditor({
|
|||||||
if (!refNodeSlots) return;
|
if (!refNodeSlots) return;
|
||||||
// doc change event inside peek view should be handled by peek view
|
// doc change event inside peek view should be handled by peek view
|
||||||
disposableGroup.add(
|
disposableGroup.add(
|
||||||
|
// todo(@pengx17): seems not working
|
||||||
refNodeSlots.docLinkClicked.on(options => {
|
refNodeSlots.docLinkClicked.on(options => {
|
||||||
peekView
|
peekView
|
||||||
.open({
|
.open({
|
||||||
type: 'doc',
|
docRef: { docId: options.pageId },
|
||||||
docId: options.pageId,
|
|
||||||
...options.params,
|
...options.params,
|
||||||
})
|
})
|
||||||
.catch(console.error);
|
.catch(console.error);
|
||||||
@@ -158,6 +159,7 @@ function DocPeekPreviewEditor({
|
|||||||
mode={mode}
|
mode={mode}
|
||||||
page={doc.blockSuiteDoc}
|
page={doc.blockSuiteDoc}
|
||||||
onEditorReady={handleOnEditorReady}
|
onEditorReady={handleOnEditorReady}
|
||||||
|
defaultOpenProperty={defaultOpenProperty}
|
||||||
/>
|
/>
|
||||||
</Scrollable.Viewport>
|
</Scrollable.Viewport>
|
||||||
<Scrollable.Scrollbar />
|
<Scrollable.Scrollbar />
|
||||||
@@ -171,23 +173,24 @@ function DocPeekPreviewEditor({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function DocPeekPreview({
|
export function DocPeekPreview({ docRef }: { docRef: DocReferenceInfo }) {
|
||||||
docId,
|
const { docId, blockIds, elementIds, mode, xywh, databaseId, databaseRowId } =
|
||||||
blockIds,
|
docRef;
|
||||||
elementIds,
|
const { doc, editor, loading } = useEditor(
|
||||||
mode,
|
docId,
|
||||||
xywh,
|
mode,
|
||||||
}: {
|
{
|
||||||
docId: string;
|
blockIds,
|
||||||
blockIds?: string[];
|
elementIds,
|
||||||
elementIds?: string[];
|
},
|
||||||
mode?: DocMode;
|
databaseId && databaseRowId
|
||||||
xywh?: `[${number},${number},${number},${number}]`;
|
? {
|
||||||
}) {
|
databaseId,
|
||||||
const { doc, editor, loading } = useEditor(docId, mode, {
|
databaseRowId,
|
||||||
blockIds,
|
type: 'database',
|
||||||
elementIds,
|
}
|
||||||
});
|
: undefined
|
||||||
|
);
|
||||||
|
|
||||||
// if sync engine has been synced and the page is null, show 404 page.
|
// if sync engine has been synced and the page is null, show 404 page.
|
||||||
if (!doc || !editor) {
|
if (!doc || !editor) {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import {
|
|||||||
|
|
||||||
import { DocInfoService } from '../../doc-info';
|
import { DocInfoService } from '../../doc-info';
|
||||||
import { WorkbenchService } from '../../workbench';
|
import { WorkbenchService } from '../../workbench';
|
||||||
|
import type { DocReferenceInfo } from '../entities/peek-view';
|
||||||
import { PeekViewService } from '../services/peek-view';
|
import { PeekViewService } from '../services/peek-view';
|
||||||
import * as styles from './peek-view-controls.css';
|
import * as styles from './peek-view-controls.css';
|
||||||
|
|
||||||
@@ -60,10 +61,8 @@ export const ControlButton = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
type DocPeekViewControlsProps = HTMLAttributes<HTMLDivElement> & {
|
type DocPeekViewControlsProps = HTMLAttributes<HTMLDivElement> & {
|
||||||
docId: string;
|
|
||||||
mode?: DocMode;
|
mode?: DocMode;
|
||||||
blockIds?: string[];
|
docRef: DocReferenceInfo;
|
||||||
elementIds?: string[];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DefaultPeekViewControls = ({
|
export const DefaultPeekViewControls = ({
|
||||||
@@ -92,10 +91,7 @@ export const DefaultPeekViewControls = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const DocPeekViewControls = ({
|
export const DocPeekViewControls = ({
|
||||||
docId,
|
docRef,
|
||||||
mode,
|
|
||||||
blockIds,
|
|
||||||
elementIds,
|
|
||||||
className,
|
className,
|
||||||
...rest
|
...rest
|
||||||
}: DocPeekViewControlsProps) => {
|
}: DocPeekViewControlsProps) => {
|
||||||
@@ -116,7 +112,7 @@ export const DocPeekViewControls = ({
|
|||||||
name: t['com.affine.peek-view-controls.open-doc'](),
|
name: t['com.affine.peek-view-controls.open-doc'](),
|
||||||
nameKey: 'open',
|
nameKey: 'open',
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
workbench.openDoc({ docId, mode, blockIds, elementIds });
|
workbench.openDoc(docRef);
|
||||||
peekView.close('none');
|
peekView.close('none');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -125,10 +121,7 @@ export const DocPeekViewControls = ({
|
|||||||
nameKey: 'new-tab',
|
nameKey: 'new-tab',
|
||||||
name: t['com.affine.peek-view-controls.open-doc-in-new-tab'](),
|
name: t['com.affine.peek-view-controls.open-doc-in-new-tab'](),
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
workbench.openDoc(
|
workbench.openDoc(docRef, { at: 'new-tab' });
|
||||||
{ docId, mode, blockIds, elementIds },
|
|
||||||
{ at: 'new-tab' }
|
|
||||||
);
|
|
||||||
peekView.close('none');
|
peekView.close('none');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -137,7 +130,7 @@ export const DocPeekViewControls = ({
|
|||||||
nameKey: 'split-view',
|
nameKey: 'split-view',
|
||||||
name: t['com.affine.peek-view-controls.open-doc-in-split-view'](),
|
name: t['com.affine.peek-view-controls.open-doc-in-split-view'](),
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
workbench.openDoc({ docId, mode }, { at: 'beside' });
|
workbench.openDoc(docRef, { at: 'beside' });
|
||||||
peekView.close('none');
|
peekView.close('none');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -146,20 +139,13 @@ export const DocPeekViewControls = ({
|
|||||||
nameKey: 'info',
|
nameKey: 'info',
|
||||||
name: t['com.affine.peek-view-controls.open-info'](),
|
name: t['com.affine.peek-view-controls.open-info'](),
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
docInfoService.modal.open(docId);
|
docInfoService.modal.open(
|
||||||
|
typeof docRef === 'string' ? docRef : docRef.docId
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
].filter((opt): opt is ControlButtonProps => Boolean(opt));
|
].filter((opt): opt is ControlButtonProps => Boolean(opt));
|
||||||
}, [
|
}, [t, peekView, workbench, docRef, docInfoService.modal]);
|
||||||
t,
|
|
||||||
peekView,
|
|
||||||
workbench,
|
|
||||||
docId,
|
|
||||||
mode,
|
|
||||||
blockIds,
|
|
||||||
elementIds,
|
|
||||||
docInfoService.modal,
|
|
||||||
]);
|
|
||||||
return (
|
return (
|
||||||
<div {...rest} className={clsx(styles.root, className)}>
|
<div {...rest} className={clsx(styles.root, className)}>
|
||||||
{controls.map(option => (
|
{controls.map(option => (
|
||||||
|
|||||||
@@ -22,20 +22,15 @@ function renderPeekView({ info }: ActivePeekView) {
|
|||||||
return toReactNode(info.template);
|
return toReactNode(info.template);
|
||||||
}
|
}
|
||||||
if (info.type === 'doc') {
|
if (info.type === 'doc') {
|
||||||
return (
|
return <DocPeekPreview docRef={info.docRef} />;
|
||||||
<DocPeekPreview
|
|
||||||
mode={info.mode}
|
|
||||||
xywh={info.xywh}
|
|
||||||
docId={info.docId}
|
|
||||||
blockIds={info.blockIds}
|
|
||||||
elementIds={info.elementIds}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.type === 'image') {
|
if (info.type === 'image' && info.docRef.blockIds?.[0]) {
|
||||||
return (
|
return (
|
||||||
<ImagePreviewPeekView docId={info.docId} blockId={info.blockIds[0]} />
|
<ImagePreviewPeekView
|
||||||
|
docId={info.docRef.docId}
|
||||||
|
blockId={info.docRef.blockIds?.[0]}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,14 +44,7 @@ function renderPeekView({ info }: ActivePeekView) {
|
|||||||
|
|
||||||
const renderControls = ({ info }: ActivePeekView) => {
|
const renderControls = ({ info }: ActivePeekView) => {
|
||||||
if (info.type === 'doc') {
|
if (info.type === 'doc') {
|
||||||
return (
|
return <DocPeekViewControls docRef={info.docRef} />;
|
||||||
<DocPeekViewControls
|
|
||||||
mode={info.mode}
|
|
||||||
docId={info.docId}
|
|
||||||
blockIds={info.blockIds}
|
|
||||||
elementIds={info.elementIds}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.type === 'image') {
|
if (info.type === 'image') {
|
||||||
@@ -86,8 +74,8 @@ const getRendererProps = (
|
|||||||
children: preview,
|
children: preview,
|
||||||
controls,
|
controls,
|
||||||
target:
|
target:
|
||||||
activePeekView?.target instanceof HTMLElement
|
activePeekView?.target.element instanceof HTMLElement
|
||||||
? activePeekView.target
|
? activePeekView.target.element
|
||||||
: undefined,
|
: undefined,
|
||||||
mode: getMode(activePeekView.info),
|
mode: getMode(activePeekView.info),
|
||||||
dialogFrame: activePeekView.info.type !== 'image',
|
dialogFrame: activePeekView.info.type !== 'image',
|
||||||
@@ -108,8 +96,8 @@ export const PeekViewManagerModal = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const subscription = peekViewEntity.show$.subscribe(() => {
|
const subscription = peekViewEntity.show$.subscribe(() => {
|
||||||
if (activePeekView?.target instanceof BlockComponent) {
|
if (activePeekView?.target.element instanceof BlockComponent) {
|
||||||
activePeekView.target.requestUpdate();
|
activePeekView.target.element.requestUpdate();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import type { DefaultOpenProperty } from '@affine/core/components/doc-properties';
|
||||||
import type { DocMode } from '@blocksuite/affine/blocks';
|
import type { DocMode } from '@blocksuite/affine/blocks';
|
||||||
import type { Doc } from '@toeverything/infra';
|
import type { Doc } from '@toeverything/infra';
|
||||||
import {
|
import {
|
||||||
@@ -13,7 +14,8 @@ import { type Editor, type EditorSelector, EditorsService } from '../../editor';
|
|||||||
export const useEditor = (
|
export const useEditor = (
|
||||||
pageId: string,
|
pageId: string,
|
||||||
preferMode?: DocMode,
|
preferMode?: DocMode,
|
||||||
preferSelector?: EditorSelector
|
preferSelector?: EditorSelector,
|
||||||
|
defaultOpenProperty?: DefaultOpenProperty
|
||||||
) => {
|
) => {
|
||||||
const currentWorkspace = useService(WorkspaceService).workspace;
|
const currentWorkspace = useService(WorkspaceService).workspace;
|
||||||
const docsService = useService(DocsService);
|
const docsService = useService(DocsService);
|
||||||
@@ -22,7 +24,7 @@ export const useEditor = (
|
|||||||
const docRecord = docRecordList.doc$(pageId).value;
|
const docRecord = docRecordList.doc$(pageId).value;
|
||||||
const preferModeRef = useRef(preferMode);
|
const preferModeRef = useRef(preferMode);
|
||||||
const preferSelectorRef = useRef(preferSelector);
|
const preferSelectorRef = useRef(preferSelector);
|
||||||
|
const defaultOpenPropertyRef = useRef(defaultOpenProperty);
|
||||||
const [doc, setDoc] = useState<Doc | null>(null);
|
const [doc, setDoc] = useState<Doc | null>(null);
|
||||||
const [editor, setEditor] = useState<Editor | null>(null);
|
const [editor, setEditor] = useState<Editor | null>(null);
|
||||||
|
|
||||||
@@ -44,6 +46,7 @@ export const useEditor = (
|
|||||||
const editor = doc.scope.get(EditorsService).createEditor();
|
const editor = doc.scope.get(EditorsService).createEditor();
|
||||||
editor.setMode(preferModeRef.current || doc.primaryMode$.value);
|
editor.setMode(preferModeRef.current || doc.primaryMode$.value);
|
||||||
editor.setSelector(preferSelectorRef.current);
|
editor.setSelector(preferSelectorRef.current);
|
||||||
|
editor.setDefaultOpenProperty(defaultOpenPropertyRef.current);
|
||||||
setEditor(editor);
|
setEditor(editor);
|
||||||
return () => {
|
return () => {
|
||||||
editor.dispose();
|
editor.dispose();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"@affine/env": "workspace:*",
|
"@affine/env": "workspace:*",
|
||||||
"@affine/templates": "workspace:*",
|
"@affine/templates": "workspace:*",
|
||||||
"@aws-sdk/client-s3": "^3.620.0",
|
"@aws-sdk/client-s3": "^3.620.0",
|
||||||
"@blocksuite/affine": "0.17.19",
|
"@blocksuite/affine": "0.0.0-canary-20241028080828",
|
||||||
"@clack/core": "^0.3.4",
|
"@clack/core": "^0.3.4",
|
||||||
"@clack/prompts": "^0.7.0",
|
"@clack/prompts": "^0.7.0",
|
||||||
"@magic-works/i18n-codegen": "^0.6.0",
|
"@magic-works/i18n-codegen": "^0.6.0",
|
||||||
|
|||||||
330
yarn.lock
330
yarn.lock
@@ -213,7 +213,7 @@ __metadata:
|
|||||||
"@affine/component": "workspace:*"
|
"@affine/component": "workspace:*"
|
||||||
"@affine/core": "workspace:*"
|
"@affine/core": "workspace:*"
|
||||||
"@affine/i18n": "workspace:*"
|
"@affine/i18n": "workspace:*"
|
||||||
"@blocksuite/affine": "npm:0.17.19"
|
"@blocksuite/affine": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/icons": "npm:^2.1.67"
|
"@blocksuite/icons": "npm:^2.1.67"
|
||||||
"@capacitor/android": "npm:^6.1.2"
|
"@capacitor/android": "npm:^6.1.2"
|
||||||
"@capacitor/cli": "npm:^6.1.2"
|
"@capacitor/cli": "npm:^6.1.2"
|
||||||
@@ -260,7 +260,7 @@ __metadata:
|
|||||||
"@affine/env": "workspace:*"
|
"@affine/env": "workspace:*"
|
||||||
"@affine/templates": "workspace:*"
|
"@affine/templates": "workspace:*"
|
||||||
"@aws-sdk/client-s3": "npm:^3.620.0"
|
"@aws-sdk/client-s3": "npm:^3.620.0"
|
||||||
"@blocksuite/affine": "npm:0.17.19"
|
"@blocksuite/affine": "npm:0.0.0-canary-20241028080828"
|
||||||
"@clack/core": "npm:^0.3.4"
|
"@clack/core": "npm:^0.3.4"
|
||||||
"@clack/prompts": "npm:^0.7.0"
|
"@clack/prompts": "npm:^0.7.0"
|
||||||
"@magic-works/i18n-codegen": "npm:^0.6.0"
|
"@magic-works/i18n-codegen": "npm:^0.6.0"
|
||||||
@@ -317,7 +317,7 @@ __metadata:
|
|||||||
"@affine/i18n": "workspace:*"
|
"@affine/i18n": "workspace:*"
|
||||||
"@atlaskit/pragmatic-drag-and-drop": "npm:^1.2.1"
|
"@atlaskit/pragmatic-drag-and-drop": "npm:^1.2.1"
|
||||||
"@atlaskit/pragmatic-drag-and-drop-hitbox": "npm:^1.0.3"
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "npm:^1.0.3"
|
||||||
"@blocksuite/affine": "npm:0.17.19"
|
"@blocksuite/affine": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/icons": "npm:2.1.69"
|
"@blocksuite/icons": "npm:2.1.69"
|
||||||
"@chromatic-com/storybook": "npm:^3.0.0"
|
"@chromatic-com/storybook": "npm:^3.0.0"
|
||||||
"@emotion/react": "npm:^11.11.4"
|
"@emotion/react": "npm:^11.11.4"
|
||||||
@@ -389,7 +389,7 @@ __metadata:
|
|||||||
"@affine/i18n": "workspace:*"
|
"@affine/i18n": "workspace:*"
|
||||||
"@affine/templates": "workspace:*"
|
"@affine/templates": "workspace:*"
|
||||||
"@affine/track": "workspace:*"
|
"@affine/track": "workspace:*"
|
||||||
"@blocksuite/affine": "npm:0.17.19"
|
"@blocksuite/affine": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/icons": "npm:2.1.69"
|
"@blocksuite/icons": "npm:2.1.69"
|
||||||
"@capacitor/app": "npm:^6.0.1"
|
"@capacitor/app": "npm:^6.0.1"
|
||||||
"@capacitor/browser": "npm:^6.0.3"
|
"@capacitor/browser": "npm:^6.0.3"
|
||||||
@@ -496,7 +496,7 @@ __metadata:
|
|||||||
"@affine/core": "workspace:*"
|
"@affine/core": "workspace:*"
|
||||||
"@affine/i18n": "workspace:*"
|
"@affine/i18n": "workspace:*"
|
||||||
"@affine/native": "workspace:*"
|
"@affine/native": "workspace:*"
|
||||||
"@blocksuite/affine": "npm:0.17.19"
|
"@blocksuite/affine": "npm:0.0.0-canary-20241028080828"
|
||||||
"@electron-forge/cli": "npm:^7.3.0"
|
"@electron-forge/cli": "npm:^7.3.0"
|
||||||
"@electron-forge/core": "npm:^7.3.0"
|
"@electron-forge/core": "npm:^7.3.0"
|
||||||
"@electron-forge/core-utils": "npm:^7.3.0"
|
"@electron-forge/core-utils": "npm:^7.3.0"
|
||||||
@@ -549,7 +549,7 @@ __metadata:
|
|||||||
version: 0.0.0-use.local
|
version: 0.0.0-use.local
|
||||||
resolution: "@affine/env@workspace:packages/common/env"
|
resolution: "@affine/env@workspace:packages/common/env"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@blocksuite/affine": "npm:0.17.19"
|
"@blocksuite/affine": "npm:0.0.0-canary-20241028080828"
|
||||||
vitest: "npm:2.1.1"
|
vitest: "npm:2.1.1"
|
||||||
zod: "npm:^3.22.4"
|
zod: "npm:^3.22.4"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -598,7 +598,7 @@ __metadata:
|
|||||||
"@affine/component": "workspace:*"
|
"@affine/component": "workspace:*"
|
||||||
"@affine/core": "workspace:*"
|
"@affine/core": "workspace:*"
|
||||||
"@affine/i18n": "workspace:*"
|
"@affine/i18n": "workspace:*"
|
||||||
"@blocksuite/affine": "npm:0.17.19"
|
"@blocksuite/affine": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/icons": "npm:^2.1.67"
|
"@blocksuite/icons": "npm:^2.1.67"
|
||||||
"@capacitor/app": "npm:^6.0.1"
|
"@capacitor/app": "npm:^6.0.1"
|
||||||
"@capacitor/browser": "npm:^6.0.3"
|
"@capacitor/browser": "npm:^6.0.3"
|
||||||
@@ -623,7 +623,7 @@ __metadata:
|
|||||||
"@affine/component": "workspace:*"
|
"@affine/component": "workspace:*"
|
||||||
"@affine/core": "workspace:*"
|
"@affine/core": "workspace:*"
|
||||||
"@affine/i18n": "workspace:*"
|
"@affine/i18n": "workspace:*"
|
||||||
"@blocksuite/affine": "npm:0.17.19"
|
"@blocksuite/affine": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/icons": "npm:^2.1.67"
|
"@blocksuite/icons": "npm:^2.1.67"
|
||||||
"@sentry/react": "npm:^8.0.0"
|
"@sentry/react": "npm:^8.0.0"
|
||||||
"@types/react": "npm:^18.2.75"
|
"@types/react": "npm:^18.2.75"
|
||||||
@@ -2488,19 +2488,19 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@blocksuite/affine-block-embed@npm:0.17.19":
|
"@blocksuite/affine-block-embed@npm:0.0.0-canary-20241028080828":
|
||||||
version: 0.17.19
|
version: 0.0.0-canary-20241028080828
|
||||||
resolution: "@blocksuite/affine-block-embed@npm:0.17.19"
|
resolution: "@blocksuite/affine-block-embed@npm:0.0.0-canary-20241028080828"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@blocksuite/affine-block-surface": "npm:0.17.19"
|
"@blocksuite/affine-block-surface": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-components": "npm:0.17.19"
|
"@blocksuite/affine-components": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-model": "npm:0.17.19"
|
"@blocksuite/affine-model": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-shared": "npm:0.17.19"
|
"@blocksuite/affine-shared": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/block-std": "npm:0.17.19"
|
"@blocksuite/block-std": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/global": "npm:0.17.19"
|
"@blocksuite/global": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/icons": "npm:^2.1.68"
|
"@blocksuite/icons": "npm:^2.1.68"
|
||||||
"@blocksuite/inline": "npm:0.17.19"
|
"@blocksuite/inline": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/store": "npm:0.17.19"
|
"@blocksuite/store": "npm:0.0.0-canary-20241028080828"
|
||||||
"@floating-ui/dom": "npm:^1.6.10"
|
"@floating-ui/dom": "npm:^1.6.10"
|
||||||
"@lit/context": "npm:^1.1.2"
|
"@lit/context": "npm:^1.1.2"
|
||||||
"@preact/signals-core": "npm:^1.8.0"
|
"@preact/signals-core": "npm:^1.8.0"
|
||||||
@@ -2508,21 +2508,21 @@ __metadata:
|
|||||||
lit: "npm:^3.2.0"
|
lit: "npm:^3.2.0"
|
||||||
minimatch: "npm:^10.0.1"
|
minimatch: "npm:^10.0.1"
|
||||||
zod: "npm:^3.23.8"
|
zod: "npm:^3.23.8"
|
||||||
checksum: 10/33586d045e67766ab2f2ef6f2df1776fb1a43e036e4bf10b99d523c4844d781ef9037afbd5203665cf5e30566d934e33a292593afb4e15261efe8268ff051290
|
checksum: 10/5d2d16f32eafc65dbde3a340d96a509c8b5cda870fe80c851ca11fb23abd16344273b9d574b0e43404491e6dda59bdb7d54dd6ea4d008f2bc8aad48ce37937a2
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@blocksuite/affine-block-list@npm:0.17.19":
|
"@blocksuite/affine-block-list@npm:0.0.0-canary-20241028080828":
|
||||||
version: 0.17.19
|
version: 0.0.0-canary-20241028080828
|
||||||
resolution: "@blocksuite/affine-block-list@npm:0.17.19"
|
resolution: "@blocksuite/affine-block-list@npm:0.0.0-canary-20241028080828"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@blocksuite/affine-components": "npm:0.17.19"
|
"@blocksuite/affine-components": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-model": "npm:0.17.19"
|
"@blocksuite/affine-model": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-shared": "npm:0.17.19"
|
"@blocksuite/affine-shared": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/block-std": "npm:0.17.19"
|
"@blocksuite/block-std": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/global": "npm:0.17.19"
|
"@blocksuite/global": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/inline": "npm:0.17.19"
|
"@blocksuite/inline": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/store": "npm:0.17.19"
|
"@blocksuite/store": "npm:0.0.0-canary-20241028080828"
|
||||||
"@floating-ui/dom": "npm:^1.6.10"
|
"@floating-ui/dom": "npm:^1.6.10"
|
||||||
"@lit/context": "npm:^1.1.2"
|
"@lit/context": "npm:^1.1.2"
|
||||||
"@preact/signals-core": "npm:^1.8.0"
|
"@preact/signals-core": "npm:^1.8.0"
|
||||||
@@ -2530,21 +2530,21 @@ __metadata:
|
|||||||
lit: "npm:^3.2.0"
|
lit: "npm:^3.2.0"
|
||||||
minimatch: "npm:^10.0.1"
|
minimatch: "npm:^10.0.1"
|
||||||
zod: "npm:^3.23.8"
|
zod: "npm:^3.23.8"
|
||||||
checksum: 10/e804d4ea2bef41efe7ee323aecde1339b3c8a499f16854c4a67877a39bae2d100e590dc758f004ec90fb8b7ebe1a61f003d045389557838230a905f2a187446d
|
checksum: 10/e2944f7494b8c83820ded20420fed1b9db5fdf581d5b36adcb4440d40eb8cac509659cc3d931c9be26270c57f16a64bb6f786a5743611a14a02f1fd6c09b31ec
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@blocksuite/affine-block-paragraph@npm:0.17.19":
|
"@blocksuite/affine-block-paragraph@npm:0.0.0-canary-20241028080828":
|
||||||
version: 0.17.19
|
version: 0.0.0-canary-20241028080828
|
||||||
resolution: "@blocksuite/affine-block-paragraph@npm:0.17.19"
|
resolution: "@blocksuite/affine-block-paragraph@npm:0.0.0-canary-20241028080828"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@blocksuite/affine-components": "npm:0.17.19"
|
"@blocksuite/affine-components": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-model": "npm:0.17.19"
|
"@blocksuite/affine-model": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-shared": "npm:0.17.19"
|
"@blocksuite/affine-shared": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/block-std": "npm:0.17.19"
|
"@blocksuite/block-std": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/global": "npm:0.17.19"
|
"@blocksuite/global": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/inline": "npm:0.17.19"
|
"@blocksuite/inline": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/store": "npm:0.17.19"
|
"@blocksuite/store": "npm:0.0.0-canary-20241028080828"
|
||||||
"@floating-ui/dom": "npm:^1.6.10"
|
"@floating-ui/dom": "npm:^1.6.10"
|
||||||
"@lit/context": "npm:^1.1.2"
|
"@lit/context": "npm:^1.1.2"
|
||||||
"@preact/signals-core": "npm:^1.8.0"
|
"@preact/signals-core": "npm:^1.8.0"
|
||||||
@@ -2552,21 +2552,21 @@ __metadata:
|
|||||||
lit: "npm:^3.2.0"
|
lit: "npm:^3.2.0"
|
||||||
minimatch: "npm:^10.0.1"
|
minimatch: "npm:^10.0.1"
|
||||||
zod: "npm:^3.23.8"
|
zod: "npm:^3.23.8"
|
||||||
checksum: 10/a8caa526260b16ded0dae7bd4caae0d38f4fa7bcbdf96e36acf5cdb7e0fc14c330b2d0727b08c84384e19e3115ea1eec6a4061d29ccbc638bd68f7bcadb6fb98
|
checksum: 10/499f162f77f09b6d558f741b8296743f59eb9c424a696c4faa9f43bab99444065089bc3683c1ea11eed3f4d65a1dc4ca7d2137290333008d18267c563c53d690
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@blocksuite/affine-block-surface@npm:0.17.19":
|
"@blocksuite/affine-block-surface@npm:0.0.0-canary-20241028080828":
|
||||||
version: 0.17.19
|
version: 0.0.0-canary-20241028080828
|
||||||
resolution: "@blocksuite/affine-block-surface@npm:0.17.19"
|
resolution: "@blocksuite/affine-block-surface@npm:0.0.0-canary-20241028080828"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@blocksuite/affine-components": "npm:0.17.19"
|
"@blocksuite/affine-components": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-model": "npm:0.17.19"
|
"@blocksuite/affine-model": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-shared": "npm:0.17.19"
|
"@blocksuite/affine-shared": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/block-std": "npm:0.17.19"
|
"@blocksuite/block-std": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/global": "npm:0.17.19"
|
"@blocksuite/global": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/inline": "npm:0.17.19"
|
"@blocksuite/inline": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/store": "npm:0.17.19"
|
"@blocksuite/store": "npm:0.0.0-canary-20241028080828"
|
||||||
"@lit/context": "npm:^1.1.2"
|
"@lit/context": "npm:^1.1.2"
|
||||||
"@preact/signals-core": "npm:^1.8.0"
|
"@preact/signals-core": "npm:^1.8.0"
|
||||||
"@toeverything/theme": "npm:^1.0.8"
|
"@toeverything/theme": "npm:^1.0.8"
|
||||||
@@ -2575,21 +2575,21 @@ __metadata:
|
|||||||
lodash.chunk: "npm:^4.2.0"
|
lodash.chunk: "npm:^4.2.0"
|
||||||
nanoid: "npm:^5.0.7"
|
nanoid: "npm:^5.0.7"
|
||||||
zod: "npm:^3.23.8"
|
zod: "npm:^3.23.8"
|
||||||
checksum: 10/037831fca259761d23972958eff52d93068cf564efc4a149195a1979e754bad225232c20adb4eff0dbdfad37d1c07850042dde50efdeba1f9446bf5075cd9183
|
checksum: 10/74ef2f7e26a88c713468837f86c78d404fd77bd19b0d684d7c2f2208452414c15a70556a37a23f676d48560063797859efa413ec9e606d2b7a732931ef142aba
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@blocksuite/affine-components@npm:0.17.19":
|
"@blocksuite/affine-components@npm:0.0.0-canary-20241028080828":
|
||||||
version: 0.17.19
|
version: 0.0.0-canary-20241028080828
|
||||||
resolution: "@blocksuite/affine-components@npm:0.17.19"
|
resolution: "@blocksuite/affine-components@npm:0.0.0-canary-20241028080828"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@blocksuite/affine-model": "npm:0.17.19"
|
"@blocksuite/affine-model": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-shared": "npm:0.17.19"
|
"@blocksuite/affine-shared": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/block-std": "npm:0.17.19"
|
"@blocksuite/block-std": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/global": "npm:0.17.19"
|
"@blocksuite/global": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/icons": "npm:^2.1.68"
|
"@blocksuite/icons": "npm:^2.1.68"
|
||||||
"@blocksuite/inline": "npm:0.17.19"
|
"@blocksuite/inline": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/store": "npm:0.17.19"
|
"@blocksuite/store": "npm:0.0.0-canary-20241028080828"
|
||||||
"@floating-ui/dom": "npm:^1.6.10"
|
"@floating-ui/dom": "npm:^1.6.10"
|
||||||
"@lit/context": "npm:^1.1.2"
|
"@lit/context": "npm:^1.1.2"
|
||||||
"@lottiefiles/dotlottie-wc": "npm:^0.2.16"
|
"@lottiefiles/dotlottie-wc": "npm:^0.2.16"
|
||||||
@@ -2600,33 +2600,33 @@ __metadata:
|
|||||||
lit: "npm:^3.2.0"
|
lit: "npm:^3.2.0"
|
||||||
shiki: "npm:^1.12.0"
|
shiki: "npm:^1.12.0"
|
||||||
zod: "npm:^3.23.8"
|
zod: "npm:^3.23.8"
|
||||||
checksum: 10/d77ec6a908851b06c3efb97ce6e8d3e944ce383f1804763a20b1956bb4fac9feb5d61e8bdd1abb968102989716a64246908017c93002d2d7996b4271ebdae324
|
checksum: 10/3db08fd6fd2a8398628cca0aa5764c238e84a1f29def6774359c41406b9e22468b739f460c318907a62f9588f622477a050fec22f62bceada21af0e8bccf256d
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@blocksuite/affine-model@npm:0.17.19":
|
"@blocksuite/affine-model@npm:0.0.0-canary-20241028080828":
|
||||||
version: 0.17.19
|
version: 0.0.0-canary-20241028080828
|
||||||
resolution: "@blocksuite/affine-model@npm:0.17.19"
|
resolution: "@blocksuite/affine-model@npm:0.0.0-canary-20241028080828"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@blocksuite/block-std": "npm:0.17.19"
|
"@blocksuite/block-std": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/global": "npm:0.17.19"
|
"@blocksuite/global": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/inline": "npm:0.17.19"
|
"@blocksuite/inline": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/store": "npm:0.17.19"
|
"@blocksuite/store": "npm:0.0.0-canary-20241028080828"
|
||||||
fractional-indexing: "npm:^3.2.0"
|
fractional-indexing: "npm:^3.2.0"
|
||||||
zod: "npm:^3.23.8"
|
zod: "npm:^3.23.8"
|
||||||
checksum: 10/a47c149ed8dfde0bd56cc81be38d12884eb52e94df0484870fe6bb44ad5ea0ad82abe7a1a33e71d2ea9d6a1ffdf48d7bbb543318c4a97dbf0f09b39278700eaa
|
checksum: 10/89ff1a3fef8d4a307e0d8794244e26ecfecc1adaf4c0a8f77fc0b6dd32d50c1e11c29c607e8413225b75f211336d474623d7ddb0e5be0469b68dd558800d8303
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@blocksuite/affine-shared@npm:0.17.19":
|
"@blocksuite/affine-shared@npm:0.0.0-canary-20241028080828":
|
||||||
version: 0.17.19
|
version: 0.0.0-canary-20241028080828
|
||||||
resolution: "@blocksuite/affine-shared@npm:0.17.19"
|
resolution: "@blocksuite/affine-shared@npm:0.0.0-canary-20241028080828"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@blocksuite/affine-model": "npm:0.17.19"
|
"@blocksuite/affine-model": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/block-std": "npm:0.17.19"
|
"@blocksuite/block-std": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/global": "npm:0.17.19"
|
"@blocksuite/global": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/inline": "npm:0.17.19"
|
"@blocksuite/inline": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/store": "npm:0.17.19"
|
"@blocksuite/store": "npm:0.0.0-canary-20241028080828"
|
||||||
"@floating-ui/dom": "npm:^1.6.10"
|
"@floating-ui/dom": "npm:^1.6.10"
|
||||||
"@lit/context": "npm:^1.1.2"
|
"@lit/context": "npm:^1.1.2"
|
||||||
"@preact/signals-core": "npm:^1.8.0"
|
"@preact/signals-core": "npm:^1.8.0"
|
||||||
@@ -2636,46 +2636,46 @@ __metadata:
|
|||||||
lodash.mergewith: "npm:^4.6.2"
|
lodash.mergewith: "npm:^4.6.2"
|
||||||
minimatch: "npm:^10.0.1"
|
minimatch: "npm:^10.0.1"
|
||||||
zod: "npm:^3.23.8"
|
zod: "npm:^3.23.8"
|
||||||
checksum: 10/2771454709f2a6f595b386464707c51a8e952cc36424ca1efe2fbb89444401f725a24bd66bddd1afa1f9668f005d4a6462306e70c672936f50e0d37092495a66
|
checksum: 10/38aac5892970bc60a2196d0ab834b88c85fe8c26a712060ae7ffeec01ab0210a4cf9a702b221c7ee341a78e9e56c094f7c20209b035d961d342ae3e9073af1e1
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@blocksuite/affine-widget-scroll-anchoring@npm:0.17.19":
|
"@blocksuite/affine-widget-scroll-anchoring@npm:0.0.0-canary-20241028080828":
|
||||||
version: 0.17.19
|
version: 0.0.0-canary-20241028080828
|
||||||
resolution: "@blocksuite/affine-widget-scroll-anchoring@npm:0.17.19"
|
resolution: "@blocksuite/affine-widget-scroll-anchoring@npm:0.0.0-canary-20241028080828"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@blocksuite/affine-model": "npm:0.17.19"
|
"@blocksuite/affine-model": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-shared": "npm:0.17.19"
|
"@blocksuite/affine-shared": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/block-std": "npm:0.17.19"
|
"@blocksuite/block-std": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/global": "npm:0.17.19"
|
"@blocksuite/global": "npm:0.0.0-canary-20241028080828"
|
||||||
"@preact/signals-core": "npm:^1.8.0"
|
"@preact/signals-core": "npm:^1.8.0"
|
||||||
"@toeverything/theme": "npm:^1.0.8"
|
"@toeverything/theme": "npm:^1.0.8"
|
||||||
lit: "npm:^3.2.0"
|
lit: "npm:^3.2.0"
|
||||||
checksum: 10/ef2bbfe1b024404356ad4ceee00c0373bcd3627d32dc5ea4a241cf3539a6de2f5feb02e09f14b54721add9a30e7616c6f56234d3cf481f0625ea81ddbb555fab
|
checksum: 10/ad85aab8874499c363b4a847498c6f4f82b56a661bcc86bdcdad268bd8416e430f6f5cce3d8854de3dc22de48ee52d4715f31cc5160779f25901c2d6d206d8a6
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@blocksuite/affine@npm:0.17.19":
|
"@blocksuite/affine@npm:0.0.0-canary-20241028080828":
|
||||||
version: 0.17.19
|
version: 0.0.0-canary-20241028080828
|
||||||
resolution: "@blocksuite/affine@npm:0.17.19"
|
resolution: "@blocksuite/affine@npm:0.0.0-canary-20241028080828"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@blocksuite/block-std": "npm:0.17.19"
|
"@blocksuite/block-std": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/blocks": "npm:0.17.19"
|
"@blocksuite/blocks": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/global": "npm:0.17.19"
|
"@blocksuite/global": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/inline": "npm:0.17.19"
|
"@blocksuite/inline": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/presets": "npm:0.17.19"
|
"@blocksuite/presets": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/store": "npm:0.17.19"
|
"@blocksuite/store": "npm:0.0.0-canary-20241028080828"
|
||||||
checksum: 10/58ec92eaa00624fbe9a6a180315afe7bbebafa5465cb86b01b38c378fa18a1a8cf5f9ff9325bf356fbd96448cdf5a6fcc4c002d08db3d34fc84b0b0b2b28f23a
|
checksum: 10/9ed3b923bb04007024c6256cd4af1bfecf14db7a67c8208fe5b50c99597c3ac9b4be93547cc2d12580d558bffcf05916179985fd2c9a6cf3f1682f4d05291916
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@blocksuite/block-std@npm:0.17.19":
|
"@blocksuite/block-std@npm:0.0.0-canary-20241028080828":
|
||||||
version: 0.17.19
|
version: 0.0.0-canary-20241028080828
|
||||||
resolution: "@blocksuite/block-std@npm:0.17.19"
|
resolution: "@blocksuite/block-std@npm:0.0.0-canary-20241028080828"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@blocksuite/global": "npm:0.17.19"
|
"@blocksuite/global": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/inline": "npm:0.17.19"
|
"@blocksuite/inline": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/store": "npm:0.17.19"
|
"@blocksuite/store": "npm:0.0.0-canary-20241028080828"
|
||||||
"@lit/context": "npm:^1.1.2"
|
"@lit/context": "npm:^1.1.2"
|
||||||
"@preact/signals-core": "npm:^1.8.0"
|
"@preact/signals-core": "npm:^1.8.0"
|
||||||
"@types/hast": "npm:^3.0.4"
|
"@types/hast": "npm:^3.0.4"
|
||||||
@@ -2687,28 +2687,28 @@ __metadata:
|
|||||||
unified: "npm:^11.0.5"
|
unified: "npm:^11.0.5"
|
||||||
w3c-keyname: "npm:^2.2.8"
|
w3c-keyname: "npm:^2.2.8"
|
||||||
zod: "npm:^3.23.8"
|
zod: "npm:^3.23.8"
|
||||||
checksum: 10/b6011fc979f9711811b9ed8357df6c943fe4769db7fe4911a211964dbfd1fa38ba006df0a9d3c859c827a7f9f785d1865084b68d64c558a240139817b16c919f
|
checksum: 10/6c0ef2920d65d0e56e08f51adbd5d5a1f20aa51f0909870c17c299596762b7581a4003d44e25fbb0572ee8173fd17afc11817ca3cbd09b71f6e195740c54669e
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@blocksuite/blocks@npm:0.17.19":
|
"@blocksuite/blocks@npm:0.0.0-canary-20241028080828":
|
||||||
version: 0.17.19
|
version: 0.0.0-canary-20241028080828
|
||||||
resolution: "@blocksuite/blocks@npm:0.17.19"
|
resolution: "@blocksuite/blocks@npm:0.0.0-canary-20241028080828"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@blocksuite/affine-block-embed": "npm:0.17.19"
|
"@blocksuite/affine-block-embed": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-block-list": "npm:0.17.19"
|
"@blocksuite/affine-block-list": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-block-paragraph": "npm:0.17.19"
|
"@blocksuite/affine-block-paragraph": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-block-surface": "npm:0.17.19"
|
"@blocksuite/affine-block-surface": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-components": "npm:0.17.19"
|
"@blocksuite/affine-components": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-model": "npm:0.17.19"
|
"@blocksuite/affine-model": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-shared": "npm:0.17.19"
|
"@blocksuite/affine-shared": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-widget-scroll-anchoring": "npm:0.17.19"
|
"@blocksuite/affine-widget-scroll-anchoring": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/block-std": "npm:0.17.19"
|
"@blocksuite/block-std": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/data-view": "npm:0.17.19"
|
"@blocksuite/data-view": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/global": "npm:0.17.19"
|
"@blocksuite/global": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/icons": "npm:^2.1.68"
|
"@blocksuite/icons": "npm:^2.1.68"
|
||||||
"@blocksuite/inline": "npm:0.17.19"
|
"@blocksuite/inline": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/store": "npm:0.17.19"
|
"@blocksuite/store": "npm:0.0.0-canary-20241028080828"
|
||||||
"@floating-ui/dom": "npm:^1.6.10"
|
"@floating-ui/dom": "npm:^1.6.10"
|
||||||
"@lit/context": "npm:^1.1.2"
|
"@lit/context": "npm:^1.1.2"
|
||||||
"@preact/signals-core": "npm:^1.8.0"
|
"@preact/signals-core": "npm:^1.8.0"
|
||||||
@@ -2747,20 +2747,20 @@ __metadata:
|
|||||||
sortablejs: "npm:^1.15.2"
|
sortablejs: "npm:^1.15.2"
|
||||||
unified: "npm:^11.0.5"
|
unified: "npm:^11.0.5"
|
||||||
zod: "npm:^3.23.8"
|
zod: "npm:^3.23.8"
|
||||||
checksum: 10/b3ab015d3d622638056bc831a2a21ba4877e8beb303895e0e8ca1dbe722172714f248c26fec52dab065db3976c47b76fb57a897bee5f2cd4fe70792eb6d3a92c
|
checksum: 10/a50124338441a3386ca82fcdf28d31f4d80cbed5cbe04a32788886b008f5d9f3bfa843f15129cd36a92ac7ae80cc9f7d141b81b013cdcc0da056856ab339a184
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@blocksuite/data-view@npm:0.17.19":
|
"@blocksuite/data-view@npm:0.0.0-canary-20241028080828":
|
||||||
version: 0.17.19
|
version: 0.0.0-canary-20241028080828
|
||||||
resolution: "@blocksuite/data-view@npm:0.17.19"
|
resolution: "@blocksuite/data-view@npm:0.0.0-canary-20241028080828"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@blocksuite/affine-components": "npm:0.17.19"
|
"@blocksuite/affine-components": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-shared": "npm:0.17.19"
|
"@blocksuite/affine-shared": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/block-std": "npm:0.17.19"
|
"@blocksuite/block-std": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/global": "npm:0.17.19"
|
"@blocksuite/global": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/icons": "npm:^2.1.68"
|
"@blocksuite/icons": "npm:^2.1.68"
|
||||||
"@blocksuite/store": "npm:0.17.19"
|
"@blocksuite/store": "npm:0.0.0-canary-20241028080828"
|
||||||
"@floating-ui/dom": "npm:^1.6.10"
|
"@floating-ui/dom": "npm:^1.6.10"
|
||||||
"@lit/context": "npm:^1.1.2"
|
"@lit/context": "npm:^1.1.2"
|
||||||
"@preact/signals-core": "npm:^1.8.0"
|
"@preact/signals-core": "npm:^1.8.0"
|
||||||
@@ -2769,19 +2769,19 @@ __metadata:
|
|||||||
lit: "npm:^3.2.0"
|
lit: "npm:^3.2.0"
|
||||||
sortablejs: "npm:^1.15.2"
|
sortablejs: "npm:^1.15.2"
|
||||||
zod: "npm:^3.23.8"
|
zod: "npm:^3.23.8"
|
||||||
checksum: 10/8e874f7038f1ca35f0f01db8b03d2ba8f84b83ae268ca92d7ebd6e3341e3fff9897bcb281e6321fe42e00aae9f8d9025d2ee7770ee0741783acedb15f0181dfe
|
checksum: 10/a5284f185be426900af87dfce6e7e488618262a504bd88e747b62f7081bbd0b8263fe1e0905f501b084a0dc6ef16dca5c2e35f75e8776e09960b3bf4c24b707b
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@blocksuite/global@npm:0.17.19":
|
"@blocksuite/global@npm:0.0.0-canary-20241028080828":
|
||||||
version: 0.17.19
|
version: 0.0.0-canary-20241028080828
|
||||||
resolution: "@blocksuite/global@npm:0.17.19"
|
resolution: "@blocksuite/global@npm:0.0.0-canary-20241028080828"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@preact/signals-core": "npm:^1.8.0"
|
"@preact/signals-core": "npm:^1.8.0"
|
||||||
lib0: "npm:^0.2.97"
|
lib0: "npm:^0.2.97"
|
||||||
lit: "npm:^3.2.0"
|
lit: "npm:^3.2.0"
|
||||||
zod: "npm:^3.23.8"
|
zod: "npm:^3.23.8"
|
||||||
checksum: 10/eac517fb270f7680f465af3874d64492fcf41d4313336dee2ba778b696b8019fb64cbe0e982da2bc1d4cc4c6b21726e5d81ad06a90017517ffaa579274f87b73
|
checksum: 10/cea8aa492d7dbd701ecce8b1c5e0f032cdec7d22d10505b4ad8d3f35d32836fc438f56837d9e25080434f7641980e5ea07ec8e0c3f4d30758bd367deefc0a912
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -2801,49 +2801,49 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@blocksuite/inline@npm:0.17.19":
|
"@blocksuite/inline@npm:0.0.0-canary-20241028080828":
|
||||||
version: 0.17.19
|
version: 0.0.0-canary-20241028080828
|
||||||
resolution: "@blocksuite/inline@npm:0.17.19"
|
resolution: "@blocksuite/inline@npm:0.0.0-canary-20241028080828"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@blocksuite/global": "npm:0.17.19"
|
"@blocksuite/global": "npm:0.0.0-canary-20241028080828"
|
||||||
"@preact/signals-core": "npm:^1.8.0"
|
"@preact/signals-core": "npm:^1.8.0"
|
||||||
zod: "npm:^3.23.8"
|
zod: "npm:^3.23.8"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
lit: ^3.2.0
|
lit: ^3.2.0
|
||||||
yjs: ^13.6.18
|
yjs: ^13.6.18
|
||||||
checksum: 10/fa03765e69847b2677548b2f491cd53e9028ca7d48e2ec102147d43d155fb1084bbc7c72cde51070a700e9b511cb462c9406e5f6f68cf8872a5a4f7ae0770b70
|
checksum: 10/3ee6bfd337288ce94744a6e6184189daed0fb8222fef8731789792bde983ee872a6ab554a6ccb0d7ad91dd994d5d58a33aff22416278fa30264a7178ac46d962
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@blocksuite/presets@npm:0.17.19":
|
"@blocksuite/presets@npm:0.0.0-canary-20241028080828":
|
||||||
version: 0.17.19
|
version: 0.0.0-canary-20241028080828
|
||||||
resolution: "@blocksuite/presets@npm:0.17.19"
|
resolution: "@blocksuite/presets@npm:0.0.0-canary-20241028080828"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@blocksuite/affine-block-surface": "npm:0.17.19"
|
"@blocksuite/affine-block-surface": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-model": "npm:0.17.19"
|
"@blocksuite/affine-model": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/affine-shared": "npm:0.17.19"
|
"@blocksuite/affine-shared": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/block-std": "npm:0.17.19"
|
"@blocksuite/block-std": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/blocks": "npm:0.17.19"
|
"@blocksuite/blocks": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/global": "npm:0.17.19"
|
"@blocksuite/global": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/inline": "npm:0.17.19"
|
"@blocksuite/inline": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/store": "npm:0.17.19"
|
"@blocksuite/store": "npm:0.0.0-canary-20241028080828"
|
||||||
"@floating-ui/dom": "npm:^1.6.10"
|
"@floating-ui/dom": "npm:^1.6.10"
|
||||||
"@lottiefiles/dotlottie-wc": "npm:^0.2.16"
|
"@lottiefiles/dotlottie-wc": "npm:^0.2.16"
|
||||||
"@preact/signals-core": "npm:^1.8.0"
|
"@preact/signals-core": "npm:^1.8.0"
|
||||||
"@toeverything/theme": "npm:^1.0.8"
|
"@toeverything/theme": "npm:^1.0.8"
|
||||||
lit: "npm:^3.2.0"
|
lit: "npm:^3.2.0"
|
||||||
zod: "npm:^3.23.8"
|
zod: "npm:^3.23.8"
|
||||||
checksum: 10/9f7c34223df50f23f872241e7fd05d163f6731710af01ba8a37fe91eb88596dd565f5e86a71717ba6e07ba888e22e72c75b0298959aebefc1583819a61629384
|
checksum: 10/d260fe305a8b4d2569d064a2ce3b1b913a0d517b793af3ead8fc501d40e588272de0a2b49b24785ba37edb205006b658e56ab4ee36e335de24c5b09cb8aa7190
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@blocksuite/store@npm:0.17.19":
|
"@blocksuite/store@npm:0.0.0-canary-20241028080828":
|
||||||
version: 0.17.19
|
version: 0.0.0-canary-20241028080828
|
||||||
resolution: "@blocksuite/store@npm:0.17.19"
|
resolution: "@blocksuite/store@npm:0.0.0-canary-20241028080828"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@blocksuite/global": "npm:0.17.19"
|
"@blocksuite/global": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/inline": "npm:0.17.19"
|
"@blocksuite/inline": "npm:0.0.0-canary-20241028080828"
|
||||||
"@blocksuite/sync": "npm:0.17.19"
|
"@blocksuite/sync": "npm:0.0.0-canary-20241028080828"
|
||||||
"@preact/signals-core": "npm:^1.8.0"
|
"@preact/signals-core": "npm:^1.8.0"
|
||||||
"@types/flexsearch": "npm:^0.7.6"
|
"@types/flexsearch": "npm:^0.7.6"
|
||||||
"@types/lodash.ismatch": "npm:^4.4.9"
|
"@types/lodash.ismatch": "npm:^4.4.9"
|
||||||
@@ -2859,21 +2859,21 @@ __metadata:
|
|||||||
zod: "npm:^3.23.8"
|
zod: "npm:^3.23.8"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
yjs: ^13.6.18
|
yjs: ^13.6.18
|
||||||
checksum: 10/64418424c466af8fec004f338fe1931c872af0cc2ec75c669a85ea52bd44c02b359e4f9def5ef1d99518397aae75e0931fe52be080d35410039b46d00243b404
|
checksum: 10/53d1309267775258392b75cec9b11d66386c28e2f8dbc34d1d90213d053679e1589018b397b00f14a2e00d4f693ab317ccb3a643f7f6af8fb3f08fb4b98a06d2
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@blocksuite/sync@npm:0.17.19":
|
"@blocksuite/sync@npm:0.0.0-canary-20241028080828":
|
||||||
version: 0.17.19
|
version: 0.0.0-canary-20241028080828
|
||||||
resolution: "@blocksuite/sync@npm:0.17.19"
|
resolution: "@blocksuite/sync@npm:0.0.0-canary-20241028080828"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@blocksuite/global": "npm:0.17.19"
|
"@blocksuite/global": "npm:0.0.0-canary-20241028080828"
|
||||||
idb: "npm:^8.0.0"
|
idb: "npm:^8.0.0"
|
||||||
idb-keyval: "npm:^6.2.1"
|
idb-keyval: "npm:^6.2.1"
|
||||||
y-protocols: "npm:^1.0.6"
|
y-protocols: "npm:^1.0.6"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
yjs: ^13.6.15
|
yjs: ^13.6.15
|
||||||
checksum: 10/e3893e09122559df5d373e8f693683aa971e5c241b032ab2e5236bd91a544d1487ac00e1413805f1c657cf9475842073eeadfbaa6f307998830e40f0591ac921
|
checksum: 10/c007bd85538cd6cd74d5eea21eb87c58d4815fdc5aa5fb0d71e0ebc63744fe22d086fa6f20a1ca6d049aa6974cb0a6bfe32cb72647ba7f196b2a5519807c721a
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -13163,7 +13163,7 @@ __metadata:
|
|||||||
"@affine/debug": "workspace:*"
|
"@affine/debug": "workspace:*"
|
||||||
"@affine/env": "workspace:*"
|
"@affine/env": "workspace:*"
|
||||||
"@affine/templates": "workspace:*"
|
"@affine/templates": "workspace:*"
|
||||||
"@blocksuite/affine": "npm:0.17.19"
|
"@blocksuite/affine": "npm:0.0.0-canary-20241028080828"
|
||||||
"@datastructures-js/binary-search-tree": "npm:^5.3.2"
|
"@datastructures-js/binary-search-tree": "npm:^5.3.2"
|
||||||
"@testing-library/react": "npm:^16.0.0"
|
"@testing-library/react": "npm:^16.0.0"
|
||||||
fake-indexeddb: "npm:^6.0.0"
|
fake-indexeddb: "npm:^6.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user