@lvce-editor/title-bar-worker 4.10.0 → 4.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4334,6 +4334,12 @@ const activeEntryLabelNode = {
|
|
|
4334
4334
|
className: TitleBarTopLevelEntryLabel,
|
|
4335
4335
|
type: Div
|
|
4336
4336
|
};
|
|
4337
|
+
const getActiveEntryLabelDom = isFocused => {
|
|
4338
|
+
if (!isFocused) {
|
|
4339
|
+
return [];
|
|
4340
|
+
}
|
|
4341
|
+
return [activeEntryLabelNode];
|
|
4342
|
+
};
|
|
4337
4343
|
const getItemVirtualDom = item => {
|
|
4338
4344
|
// @ts-ignore
|
|
4339
4345
|
const {
|
|
@@ -4357,7 +4363,7 @@ const getItemVirtualDom = item => {
|
|
|
4357
4363
|
// TODO have separate name attribute
|
|
4358
4364
|
role: MenuItem$1,
|
|
4359
4365
|
type: Button$1
|
|
4360
|
-
}, ...(isFocused
|
|
4366
|
+
}, ...getActiveEntryLabelDom(isFocused), text(label)];
|
|
4361
4367
|
};
|
|
4362
4368
|
const getTitleBarMenuBarItemsVirtualDom = visibleItems => {
|
|
4363
4369
|
const dom = visibleItems.flatMap(getItemVirtualDom);
|