From c5bdbc0457493f3bc4c71732807bf214b1263903 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 9 Nov 2026 15:03:50 +0800 Subject: [PATCH] feat(creator-studio): portal dropdowns, hidden content, two-step block delete Toolbar - New ToolMenu renders menus through a portal on body, so they are no longer clipped by the horizontally scrolling toolbar and no longer fall back to a native 的风格断裂和滚动容器裁剪。 + * * @package Jio */ -import { useEffect, useRef, useState } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; +import { ToolMenu, type ToolMenuItem } from './tool-menu'; + type Capabilities = Record; type Props = { @@ -18,6 +22,8 @@ type Props = { canRedo: boolean; formatValue: string; onFormatChange: (value: string) => void; + alignValue: string; + blockValue: string; capabilities: Capabilities; onCommand: (name: string, value?: string) => void; onRememberSelection: () => void; @@ -25,6 +31,7 @@ type Props = { onOpenMedia: (type: 'image' | 'video' | 'file') => void; onInsertBlock: (kind: string) => void; onInsertQuote: (color: '' | 'qe_wzk_c-red' | 'qe_wzk_lan' | 'qe_wzk_lv') => void; + onInsertHidden: (kind: 'reply' | 'login' | 'vip' | 'payshow') => void; }; type ToolButtonProps = { @@ -33,17 +40,19 @@ type ToolButtonProps = { ready: boolean; onClick: () => void; title?: string; + active?: boolean; }; -function ToolButton({ label, icon, ready, onClick, title }: ToolButtonProps) { +function ToolButton({ label, icon, ready, onClick, title, active = false }: ToolButtonProps) { return (