@floegence/floe-webapp-core 0.101.28 → 0.101.30

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.
@@ -1,5 +1,5 @@
1
1
  import { type Component, type JSX } from 'solid-js';
2
- import { type BarItemContextMenuHandler } from '../layout/barItemContextMenu';
2
+ import { type BarItemContextMenuHandler, type BarItemContextMenuRequest } from '../layout/barItemContextMenu';
3
3
  import { type WorkbenchWidgetFrame } from './workbenchHelpers';
4
4
  import { type WorkbenchEdgeAutoPanFrame } from './workbenchEdgeAutoPan';
5
5
  import type { WorkbenchDockToolId, WorkbenchInteractionMode, WorkbenchViewport, WorkbenchWidgetDefinition, WorkbenchWidgetItem, WorkbenchWidgetType } from './types';
@@ -14,6 +14,7 @@ export interface WorkbenchFilterBarProps {
14
14
  activationMode?: WorkbenchDockItemActivationMode;
15
15
  /** Orders work-mode widgets and tools by id; unlisted entries retain their relative order at the end. */
16
16
  componentOrder?: readonly (WorkbenchWidgetType | WorkbenchDockToolId)[];
17
+ customization?: WorkbenchDockCustomization;
17
18
  /** Solo a single dock component in the supplied mode scope; soloing it again shows the full scope. */
18
19
  onSoloFilter: (id: string, scope: readonly string[]) => void;
19
20
  onSelectMode?: (mode: WorkbenchInteractionMode) => void;
@@ -42,6 +43,29 @@ export interface WorkbenchFilterBarProps {
42
43
  onViewportCommit?: (viewport: WorkbenchViewport) => void;
43
44
  onViewportInteractionStart?: (kind: 'pan') => void;
44
45
  }
46
+ /** Keys distinguish built-in components, host actions and host instances. */
47
+ export type WorkbenchDockEntry = Readonly<{
48
+ key: string;
49
+ kind: 'widget' | 'tool' | 'action' | 'host';
50
+ id: string;
51
+ label: string;
52
+ icon: Component<{
53
+ class?: string;
54
+ }>;
55
+ activate: (trigger: HTMLButtonElement) => void;
56
+ /** Focuses this entry after the host restores its visibility. */
57
+ focus: () => void;
58
+ }>;
59
+ export type WorkbenchDockCustomization = Readonly<{
60
+ order?: readonly string[];
61
+ hidden?: readonly string[];
62
+ onOrderChange?: (keys: string[]) => void;
63
+ onContextMenu?: (entry: WorkbenchDockEntry, request: BarItemContextMenuRequest) => void;
64
+ /** Host renders its localized overflow trigger/panel; hidden entries remain activatable. */
65
+ overflow?: Component<{
66
+ entries: readonly WorkbenchDockEntry[];
67
+ }>;
68
+ }>;
45
69
  export type WorkbenchDockItemActivationMode = 'solo-filter' | 'focus-cycle';
46
70
  export type WorkbenchDockItemPresentation = Readonly<{
47
71
  count: number;
@@ -63,6 +87,7 @@ export type WorkbenchDockAction = Readonly<{
63
87
  onActivate: (trigger: HTMLButtonElement) => void;
64
88
  /** Receives the concrete action button on mount and null on disposal. */
65
89
  buttonRef?: (button: HTMLButtonElement | null) => void;
90
+ onContextMenu?: BarItemContextMenuHandler;
66
91
  }>;
67
92
  export type WorkbenchHostDockItem = Readonly<{
68
93
  id: string;