feat(core): add block and element toolbar widget custom config (#7886)

Upstreams: https://github.com/toeverything/blocksuite/pull/8001 https://github.com/toeverything/blocksuite/pull/7964

* add block/element toolbar widget config
* add `Copy link to block` to `more menu` on  block/element toolbar

<img width="376" alt="Screenshot 2024-08-16 at 16 20 08" src="https://github.com/user-attachments/assets/49b41de9-39d1-4f55-ac9b-445fe020187a">
This commit is contained in:
fundon
2024-09-03 03:52:08 +00:00
parent ad110078ac
commit c3ae219992
7 changed files with 120 additions and 8 deletions

View File

@@ -8,7 +8,7 @@ import { useCallback } from 'react';
import { useActiveBlocksuiteEditor } from '../use-block-suite-editor';
type UseSharingUrl = {
export type UseSharingUrl = {
workspaceId: string;
pageId: string;
shareMode?: DocMode;
@@ -20,7 +20,7 @@ type UseSharingUrl = {
/**
* to generate a url like https://app.affine.pro/workspace/workspaceId/docId?mode=DocMode?element=seletedBlockid#seletedBlockid
*/
const generateUrl = ({
export const generateUrl = ({
workspaceId,
pageId,
blockIds,