@stll/workspace-ui 0.18.3 → 0.19.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.
package/dist/index.d.ts CHANGED
@@ -13,6 +13,7 @@ import { TableSkeletonRows } from "./table-skeleton-rows.js";
13
13
  import { WorkspaceFrame, WorkspaceFrameEndRail, WorkspaceFrameInspector, WorkspaceFrameNavigation, WorkspaceFrameNavigationItem, WorkspaceFrameProps, WorkspaceFrameTopBar } from "./workspace-frame.js";
14
14
  import { WorkspaceKanbanGroupingPicker } from "./kanban-grouping-picker.js";
15
15
  import { WorkspaceUiFormattingProvider, WorkspaceUiFormattingProviderProps } from "./formatting.js";
16
- import { WorkspaceViewSwitcher, WorkspaceViewSwitcherEditing, WorkspaceViewSwitcherItem, WorkspaceViewSwitcherProps, WorkspaceViewSwitcherReorder } from "./view-switcher.js";
16
+ import { WorkspaceViewStrip, WorkspaceViewStripProps, WorkspaceViewSwitcherFace, WorkspaceViewSwitcherFaceProps, WorkspaceViewSwitcherItem, WorkspaceViewTabFace, WorkspaceViewTabFaceProps, WorkspaceViewTabName } from "./view-switcher-face.js";
17
+ import { WorkspaceViewSwitcher, WorkspaceViewSwitcherEditing, WorkspaceViewSwitcherProps, WorkspaceViewSwitcherReorder } from "./view-switcher.js";
17
18
  import { getClipFieldValueLabel } from "./field-value-logic.js";
18
- export { type ApplyCalculationSelectionParams, CONDITION_OPERATORS, type CalculationFormatters, CalculationKindPicker, type CalculationKindPickerProps, type CalculationLabels, CalculationPicker, type CalculationPickerProps, type CalculationProperty, type CalculationResult, type CalculationSelection, CalculationSummary, type CalculationSummaryProps, type ColorVariants, ColumnCalculation, ConditionBuilder, type ConditionBuilderLabels, type ConditionCapabilities, type ConditionOperator, type CreateWorkspaceKanbanSchemaParams, FIELD_CONTENT_TYPES, type FieldContent, type FieldOption, type FieldOptionChoice, FieldValue, type FieldValueType, type FormatCalculationParams, type FormattedCalculation, type FormulaCellRenderCtx, type GenericProperty, IntFieldValue, KANBAN_EMPTY_GROUP_VISIBILITIES, KANBAN_SAVED_VIEW_STATE_VERSION, type KanbanBoardPresentation, type KanbanEmptyGroupVisibility, type KanbanPresentedBand, type KanbanPresentedLane, type KanbanSavedAxisState, type KanbanSavedGroupAxisState, type KanbanSavedGroupReference, type KanbanSavedSubgroupState, type KanbanSavedViewState, type KanbanSavedViewStateV1, MoneyFieldValue, type OptionColor, PersonFieldValue, PropertyIcon, type PropertyIconType, type ResolveWorkspaceKanbanViewParams, type ResolvedWorkspaceKanbanView, SortChips, type SortChipsLabels, type SortChipsProps, type SortDescriptor, type SortableProperty, TableSkeletonRows, type UseCalculationParams, type ValueEditorKind, type ValueEditorRenderCtx, type WorkspaceCalculationLabels, type WorkspaceFieldContent, WorkspaceFrame, type WorkspaceFrameEndRail, type WorkspaceFrameInspector, type WorkspaceFrameNavigation, type WorkspaceFrameNavigationItem, type WorkspaceFrameProps, type WorkspaceFrameTopBar, type WorkspaceKanbanBuiltInGroupLabel, type WorkspaceKanbanGroupingChoice, WorkspaceKanbanGroupingPicker, type WorkspaceKanbanGroupingPickerLabels, type WorkspaceKanbanGroupingPickerProps, type WorkspaceKanbanProperty, WorkspaceUiFormattingProvider, type WorkspaceUiFormattingProviderProps, WorkspaceViewSwitcher, type WorkspaceViewSwitcherEditing, type WorkspaceViewSwitcherItem, type WorkspaceViewSwitcherProps, type WorkspaceViewSwitcherReorder, appendChild, applyCalculationSelection, asGroup, buildLeaf, createWorkspaceKanbanSchema, emptyColor, fieldForNode, formatCalculationResult, getClipFieldValueLabel, getWorkspaceKanbanGroupingChoices, isConditionOperator, isMultiValue, leafFromField, leafOperand, leafOperator, leafValueList, leafValueString, normalizeKanbanSavedViewState, operandsEqual, operatorsFor, optionColors, presentKanbanBoard, removeChild, replaceChild, resolveOptionColor, resolveWorkspaceKanbanView, useCalculation, valueEditorFor };
19
+ export { type ApplyCalculationSelectionParams, CONDITION_OPERATORS, type CalculationFormatters, CalculationKindPicker, type CalculationKindPickerProps, type CalculationLabels, CalculationPicker, type CalculationPickerProps, type CalculationProperty, type CalculationResult, type CalculationSelection, CalculationSummary, type CalculationSummaryProps, type ColorVariants, ColumnCalculation, ConditionBuilder, type ConditionBuilderLabels, type ConditionCapabilities, type ConditionOperator, type CreateWorkspaceKanbanSchemaParams, FIELD_CONTENT_TYPES, type FieldContent, type FieldOption, type FieldOptionChoice, FieldValue, type FieldValueType, type FormatCalculationParams, type FormattedCalculation, type FormulaCellRenderCtx, type GenericProperty, IntFieldValue, KANBAN_EMPTY_GROUP_VISIBILITIES, KANBAN_SAVED_VIEW_STATE_VERSION, type KanbanBoardPresentation, type KanbanEmptyGroupVisibility, type KanbanPresentedBand, type KanbanPresentedLane, type KanbanSavedAxisState, type KanbanSavedGroupAxisState, type KanbanSavedGroupReference, type KanbanSavedSubgroupState, type KanbanSavedViewState, type KanbanSavedViewStateV1, MoneyFieldValue, type OptionColor, PersonFieldValue, PropertyIcon, type PropertyIconType, type ResolveWorkspaceKanbanViewParams, type ResolvedWorkspaceKanbanView, SortChips, type SortChipsLabels, type SortChipsProps, type SortDescriptor, type SortableProperty, TableSkeletonRows, type UseCalculationParams, type ValueEditorKind, type ValueEditorRenderCtx, type WorkspaceCalculationLabels, type WorkspaceFieldContent, WorkspaceFrame, type WorkspaceFrameEndRail, type WorkspaceFrameInspector, type WorkspaceFrameNavigation, type WorkspaceFrameNavigationItem, type WorkspaceFrameProps, type WorkspaceFrameTopBar, type WorkspaceKanbanBuiltInGroupLabel, type WorkspaceKanbanGroupingChoice, WorkspaceKanbanGroupingPicker, type WorkspaceKanbanGroupingPickerLabels, type WorkspaceKanbanGroupingPickerProps, type WorkspaceKanbanProperty, WorkspaceUiFormattingProvider, type WorkspaceUiFormattingProviderProps, WorkspaceViewStrip, type WorkspaceViewStripProps, WorkspaceViewSwitcher, type WorkspaceViewSwitcherEditing, WorkspaceViewSwitcherFace, type WorkspaceViewSwitcherFaceProps, type WorkspaceViewSwitcherItem, type WorkspaceViewSwitcherProps, type WorkspaceViewSwitcherReorder, WorkspaceViewTabFace, type WorkspaceViewTabFaceProps, WorkspaceViewTabName, appendChild, applyCalculationSelection, asGroup, buildLeaf, createWorkspaceKanbanSchema, emptyColor, fieldForNode, formatCalculationResult, getClipFieldValueLabel, getWorkspaceKanbanGroupingChoices, isConditionOperator, isMultiValue, leafFromField, leafOperand, leafOperator, leafValueList, leafValueString, normalizeKanbanSavedViewState, operandsEqual, operatorsFor, optionColors, presentKanbanBoard, removeChild, replaceChild, resolveOptionColor, resolveWorkspaceKanbanView, useCalculation, valueEditorFor };
package/dist/index.js CHANGED
@@ -14,5 +14,6 @@ import { FIELD_CONTENT_TYPES } from "./types.js";
14
14
  import { KANBAN_EMPTY_GROUP_VISIBILITIES, KANBAN_SAVED_VIEW_STATE_VERSION, createWorkspaceKanbanSchema, getWorkspaceKanbanGroupingChoices, normalizeKanbanSavedViewState, presentKanbanBoard, resolveWorkspaceKanbanView } from "./kanban-view.js";
15
15
  import { WorkspaceKanbanGroupingPicker } from "./kanban-grouping-picker.js";
16
16
  import { WorkspaceViewSwitcher } from "./view-switcher.js";
17
+ import { WorkspaceViewStrip, WorkspaceViewSwitcherFace, WorkspaceViewTabFace, WorkspaceViewTabName } from "./view-switcher-face.js";
17
18
  import { WorkspaceFrame } from "./workspace-frame.js";
18
- export { CONDITION_OPERATORS, CalculationKindPicker, CalculationPicker, CalculationSummary, ColumnCalculation, ConditionBuilder, FIELD_CONTENT_TYPES, FieldValue, IntFieldValue, KANBAN_EMPTY_GROUP_VISIBILITIES, KANBAN_SAVED_VIEW_STATE_VERSION, MoneyFieldValue, PersonFieldValue, PropertyIcon, SortChips, TableSkeletonRows, WorkspaceFrame, WorkspaceKanbanGroupingPicker, WorkspaceUiFormattingProvider, WorkspaceViewSwitcher, appendChild, applyCalculationSelection, asGroup, buildLeaf, createWorkspaceKanbanSchema, emptyColor, fieldForNode, formatCalculationResult, getClipFieldValueLabel, getWorkspaceKanbanGroupingChoices, isConditionOperator, isMultiValue, leafFromField, leafOperand, leafOperator, leafValueList, leafValueString, normalizeKanbanSavedViewState, operandsEqual, operatorsFor, optionColors, presentKanbanBoard, removeChild, replaceChild, resolveOptionColor, resolveWorkspaceKanbanView, useCalculation, valueEditorFor };
19
+ export { CONDITION_OPERATORS, CalculationKindPicker, CalculationPicker, CalculationSummary, ColumnCalculation, ConditionBuilder, FIELD_CONTENT_TYPES, FieldValue, IntFieldValue, KANBAN_EMPTY_GROUP_VISIBILITIES, KANBAN_SAVED_VIEW_STATE_VERSION, MoneyFieldValue, PersonFieldValue, PropertyIcon, SortChips, TableSkeletonRows, WorkspaceFrame, WorkspaceKanbanGroupingPicker, WorkspaceUiFormattingProvider, WorkspaceViewStrip, WorkspaceViewSwitcher, WorkspaceViewSwitcherFace, WorkspaceViewTabFace, WorkspaceViewTabName, appendChild, applyCalculationSelection, asGroup, buildLeaf, createWorkspaceKanbanSchema, emptyColor, fieldForNode, formatCalculationResult, getClipFieldValueLabel, getWorkspaceKanbanGroupingChoices, isConditionOperator, isMultiValue, leafFromField, leafOperand, leafOperator, leafValueList, leafValueString, normalizeKanbanSavedViewState, operandsEqual, operatorsFor, optionColors, presentKanbanBoard, removeChild, replaceChild, resolveOptionColor, resolveWorkspaceKanbanView, useCalculation, valueEditorFor };
@@ -0,0 +1,48 @@
1
+ import { ComponentProps, ReactNode, Ref } from "react";
2
+ import { InlineDirection } from "@stll/ui/inline-reorder";
3
+ import { TabsTab } from "@stll/ui/tabs";
4
+ export type WorkspaceViewSwitcherItem = {
5
+ id: string;
6
+ name: string;
7
+ };
8
+ export type WorkspaceViewStripProps = {
9
+ activeViewId: string;
10
+ ariaLabel: string;
11
+ direction: InlineDirection;
12
+ addControl?: ReactNode;
13
+ onViewChange?: (viewId: string) => void;
14
+ /** The element that holds the tabs, for a drop target around them. */
15
+ stripRef?: Ref<HTMLDivElement>;
16
+ children: ReactNode;
17
+ };
18
+ /**
19
+ * The saved-view strip without behaviour: one toolbar row of underline tabs
20
+ * and, after them, the add control. `WorkspaceViewSwitcher` renders its tabs
21
+ * inside it; a loading view renders `WorkspaceViewSwitcherFace` in the same
22
+ * strip, so the row does not move when the switcher takes over.
23
+ */
24
+ export declare const WorkspaceViewStrip: ({ activeViewId, ariaLabel, direction, addControl, onViewChange, stripRef, children }: WorkspaceViewStripProps) => import("react").JSX.Element;
25
+ export type WorkspaceViewTabFaceProps = Omit<ComponentProps<typeof TabsTab>, "className"> & {
26
+ /** Room at the end of each tab for the active tab's action menu. */
27
+ reserveActionSpace: boolean;
28
+ };
29
+ /** One view's tab, sized the same with or without its behaviour. */
30
+ export declare const WorkspaceViewTabFace: ({ reserveActionSpace, ...props }: WorkspaceViewTabFaceProps) => import("react").JSX.Element;
31
+ /** A view's name on its tab, cut short at a fixed width. */
32
+ export declare const WorkspaceViewTabName: ({ name }: {
33
+ name: string;
34
+ }) => import("react").JSX.Element;
35
+ export type WorkspaceViewSwitcherFaceProps<View extends WorkspaceViewSwitcherItem> = {
36
+ activeViewId: string;
37
+ ariaLabel: string;
38
+ direction: InlineDirection;
39
+ views: readonly View[];
40
+ renderIcon: (view: View) => ReactNode;
41
+ reserveActionSpace: boolean;
42
+ addControl?: ReactNode;
43
+ };
44
+ /**
45
+ * The strip as it looks before its behaviour has loaded: the same tabs, names
46
+ * and icons, with no reordering, menus or renaming.
47
+ */
48
+ export declare const WorkspaceViewSwitcherFace: <View extends WorkspaceViewSwitcherItem>({ activeViewId, ariaLabel, direction, views, renderIcon, reserveActionSpace, addControl }: WorkspaceViewSwitcherFaceProps<View>) => import("react").JSX.Element;
@@ -0,0 +1,69 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { BidiText } from "@stll/ui/bidi-text";
4
+ import { TruncatedText } from "@stll/ui/truncated-text";
5
+ import { cn } from "@stll/ui/utils";
6
+ import { TOOLBAR_ROW_HEIGHT } from "@stll/ui/layout-tokens";
7
+ import { Tabs, TabsList, TabsTab } from "@stll/ui/tabs";
8
+ // src/view-switcher-face.tsx
9
+ /**
10
+ * The saved-view strip without behaviour: one toolbar row of underline tabs
11
+ * and, after them, the add control. `WorkspaceViewSwitcher` renders its tabs
12
+ * inside it; a loading view renders `WorkspaceViewSwitcherFace` in the same
13
+ * strip, so the row does not move when the switcher takes over.
14
+ */
15
+ const WorkspaceViewStrip = ({ activeViewId, ariaLabel, direction, addControl, onViewChange, stripRef, children }) => /* @__PURE__ */ jsxs("div", {
16
+ className: cn("flex min-w-0 flex-1 items-center gap-1 px-2", TOOLBAR_ROW_HEIGHT),
17
+ "data-slot": "workspace-view-switcher",
18
+ dir: direction,
19
+ children: [/* @__PURE__ */ jsx("div", {
20
+ className: "h-full min-w-0 flex-1",
21
+ ref: stripRef,
22
+ children: /* @__PURE__ */ jsx(Tabs, {
23
+ className: "h-full gap-0",
24
+ onValueChange: (value) => {
25
+ if (typeof value === "string") onViewChange?.(value);
26
+ },
27
+ value: activeViewId,
28
+ children: /* @__PURE__ */ jsx(TabsList, {
29
+ "aria-label": ariaLabel,
30
+ className: "h-full data-[orientation=horizontal]:py-0",
31
+ variant: "underline",
32
+ children
33
+ })
34
+ })
35
+ }), addControl === null || addControl === void 0 ? null : /* @__PURE__ */ jsx("div", {
36
+ className: "border-border flex shrink-0 translate-y-1 items-center border-s ps-1",
37
+ children: addControl
38
+ })]
39
+ });
40
+ /** One view's tab, sized the same with or without its behaviour. */
41
+ const WorkspaceViewTabFace = ({ reserveActionSpace, ...props }) => /* @__PURE__ */ jsx(TabsTab, {
42
+ ...props,
43
+ className: cn("h-full pt-2 sm:h-full", reserveActionSpace ? "pe-6.5" : void 0)
44
+ });
45
+ /** A view's name on its tab, cut short at a fixed width. */
46
+ const WorkspaceViewTabName = ({ name }) => /* @__PURE__ */ jsx(TruncatedText, {
47
+ className: "max-w-36 whitespace-pre",
48
+ render: /* @__PURE__ */ jsx(BidiText, { as: "span" }),
49
+ children: name
50
+ });
51
+ /**
52
+ * The strip as it looks before its behaviour has loaded: the same tabs, names
53
+ * and icons, with no reordering, menus or renaming.
54
+ */
55
+ const WorkspaceViewSwitcherFace = ({ activeViewId, ariaLabel, direction, views, renderIcon, reserveActionSpace, addControl }) => /* @__PURE__ */ jsx(WorkspaceViewStrip, {
56
+ activeViewId,
57
+ addControl,
58
+ ariaLabel,
59
+ direction,
60
+ children: views.map((view) => /* @__PURE__ */ jsx("div", {
61
+ className: "relative flex h-full items-center",
62
+ children: /* @__PURE__ */ jsxs(WorkspaceViewTabFace, {
63
+ reserveActionSpace,
64
+ value: view.id,
65
+ children: [renderIcon(view), /* @__PURE__ */ jsx(WorkspaceViewTabName, { name: view.name })]
66
+ })
67
+ }, view.id))
68
+ });
69
+ export { WorkspaceViewStrip, WorkspaceViewSwitcherFace, WorkspaceViewTabFace, WorkspaceViewTabName };
@@ -1,8 +1,5 @@
1
1
  import { InlineDirection } from "@stll/ui/inline-reorder";
2
- export type WorkspaceViewSwitcherItem = {
3
- id: string;
4
- name: string;
5
- };
2
+ import { WorkspaceViewSwitcherItem } from "./view-switcher-face.js";
6
3
  export type WorkspaceViewSwitcherEditing<View> = {
7
4
  viewId: string;
8
5
  renderLabel: (view: View) => React.ReactNode;
@@ -31,4 +28,5 @@ export type WorkspaceViewSwitcherProps<View extends WorkspaceViewSwitcherItem> =
31
28
  };
32
29
  renderIcon: (view: View) => React.ReactNode;
33
30
  };
34
- export declare const WorkspaceViewSwitcher: <View extends WorkspaceViewSwitcherItem>({ activeViewId, ariaLabel, direction, reorder, views, addControl, editing, onViewChange, onViewContextMenu, onViewDoubleClick, actionMenu, renderIcon }: WorkspaceViewSwitcherProps<View>) => import("react").JSX.Element;
31
+ export declare const WorkspaceViewSwitcher: <View extends WorkspaceViewSwitcherItem>({ activeViewId, ariaLabel, direction, reorder, views, addControl, editing, onViewChange, onViewContextMenu, onViewDoubleClick, actionMenu, renderIcon }: WorkspaceViewSwitcherProps<View>) => import("react").JSX.Element;
32
+ export type { WorkspaceViewSwitcherItem };
@@ -1,20 +1,16 @@
1
1
  "use client";
2
+ import { WorkspaceViewStrip, WorkspaceViewTabFace, WorkspaceViewTabName } from "./view-switcher-face.js";
2
3
  import { Button } from "@stll/ui/button";
3
4
  import { EllipsisVerticalIcon } from "@stll/ui/icons";
4
5
  import { Menu, MenuPopup, MenuTrigger } from "@stll/ui/menu";
5
6
  import { useCallback, useEffect, useRef, useState } from "react";
6
7
  import { jsx, jsxs } from "react/jsx-runtime";
7
- import { BidiText } from "@stll/ui/bidi-text";
8
- import { TruncatedText } from "@stll/ui/truncated-text";
9
- import { cn } from "@stll/ui/utils";
10
8
  import { attachClosestEdge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge/attach-closest-edge";
11
9
  import { extractClosestEdge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge/extract-closest-edge";
12
10
  import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter";
13
11
  import { combine } from "@atlaskit/pragmatic-drag-and-drop/utils/combine";
14
12
  import { InlineDropIndicator } from "@stll/ui/inline-drop-indicator";
15
13
  import { reorderInlineIds, toInlineDropPosition } from "@stll/ui/inline-reorder";
16
- import { TOOLBAR_ROW_HEIGHT } from "@stll/ui/inspector";
17
- import { Tabs, TabsList, TabsTab } from "@stll/ui/tabs";
18
14
  // src/view-switcher.tsx
19
15
  const VIEW_DRAG_TYPE = "@stll/workspace-ui/view-switcher/drag-type";
20
16
  const VIEW_DRAG_ID = "@stll/workspace-ui/view-switcher/view-id";
@@ -76,53 +72,37 @@ const WorkspaceViewSwitcher = ({ activeViewId, ariaLabel, direction, reorder, vi
76
72
  });
77
73
  if (reordered) reorder?.onReorder(reordered);
78
74
  };
79
- return /* @__PURE__ */ jsxs("div", {
80
- className: cn("flex min-w-0 flex-1 items-center gap-1 px-2", TOOLBAR_ROW_HEIGHT),
81
- "data-slot": "workspace-view-switcher",
82
- dir: direction,
83
- children: [/* @__PURE__ */ jsx("div", {
84
- className: "h-full min-w-0 flex-1",
85
- ref: setStripContainer,
86
- children: /* @__PURE__ */ jsx(Tabs, {
87
- className: "h-full gap-0",
88
- onValueChange: (value) => {
89
- if (typeof value === "string") onViewChange(value);
90
- },
91
- value: activeViewId,
92
- children: /* @__PURE__ */ jsx(TabsList, {
93
- "aria-label": ariaLabel,
94
- className: "h-full data-[orientation=horizontal]:py-0",
95
- variant: "underline",
96
- children: viewTabs.map(({ view, actions }) => {
97
- if (editing?.viewId === view.id) return /* @__PURE__ */ jsxs(TabsTab, {
98
- className: cn("h-full pt-2 sm:h-full", reserveActionSpace ? "pe-6.5" : void 0),
99
- nativeButton: false,
100
- render: /* @__PURE__ */ jsx("div", {}),
101
- value: view.id,
102
- children: [renderIcon(view), editing.renderLabel(view)]
103
- }, view.id);
104
- return /* @__PURE__ */ jsx(WorkspaceViewTab, {
105
- actions,
106
- canReorder,
107
- direction,
108
- getDragData: reorder?.getDragData,
109
- getDropData: reorder?.getDropData,
110
- isDragBlocked: openMenuId !== null || (reorder?.isBlocked ?? false),
111
- instanceId,
112
- onContextMenu: onViewContextMenu,
113
- onDoubleClick: onViewDoubleClick,
114
- onReorder: handleReorder,
115
- renderIcon,
116
- reserveActionSpace,
117
- view
118
- }, view.id);
119
- })
120
- })
121
- })
122
- }), addControl === null || addControl === void 0 ? null : /* @__PURE__ */ jsx("div", {
123
- className: "border-border flex shrink-0 translate-y-1 items-center border-s ps-1",
124
- children: addControl
125
- })]
75
+ return /* @__PURE__ */ jsx(WorkspaceViewStrip, {
76
+ activeViewId,
77
+ addControl,
78
+ ariaLabel,
79
+ direction,
80
+ onViewChange,
81
+ stripRef: setStripContainer,
82
+ children: viewTabs.map(({ view, actions }) => {
83
+ if (editing?.viewId === view.id) return /* @__PURE__ */ jsxs(WorkspaceViewTabFace, {
84
+ nativeButton: false,
85
+ render: /* @__PURE__ */ jsx("div", {}),
86
+ reserveActionSpace,
87
+ value: view.id,
88
+ children: [renderIcon(view), editing.renderLabel(view)]
89
+ }, view.id);
90
+ return /* @__PURE__ */ jsx(WorkspaceViewTab, {
91
+ actions,
92
+ canReorder,
93
+ direction,
94
+ getDragData: reorder?.getDragData,
95
+ getDropData: reorder?.getDropData,
96
+ isDragBlocked: openMenuId !== null || (reorder?.isBlocked ?? false),
97
+ instanceId,
98
+ onContextMenu: onViewContextMenu,
99
+ onDoubleClick: onViewDoubleClick,
100
+ onReorder: handleReorder,
101
+ renderIcon,
102
+ reserveActionSpace,
103
+ view
104
+ }, view.id);
105
+ })
126
106
  });
127
107
  };
128
108
  const WorkspaceViewTab = ({ actions, canReorder, direction, getDragData, getDropData, isDragBlocked, instanceId, onContextMenu, onDoubleClick, onReorder, renderIcon, reserveActionSpace, view }) => {
@@ -180,16 +160,12 @@ const WorkspaceViewTab = ({ actions, canReorder, direction, getDragData, getDrop
180
160
  ref: setTabContainer,
181
161
  children: [
182
162
  /* @__PURE__ */ jsx(InlineDropIndicator, { position: dropPosition }),
183
- /* @__PURE__ */ jsxs(TabsTab, {
184
- className: cn("h-full pt-2 sm:h-full", reserveActionSpace ? "pe-6.5" : void 0),
163
+ /* @__PURE__ */ jsxs(WorkspaceViewTabFace, {
185
164
  onContextMenu: (event) => onContextMenu?.(view, event),
186
165
  onDoubleClick: (event) => onDoubleClick?.(view, event),
166
+ reserveActionSpace,
187
167
  value: view.id,
188
- children: [renderIcon(view), /* @__PURE__ */ jsx(TruncatedText, {
189
- className: "max-w-36 whitespace-pre",
190
- render: /* @__PURE__ */ jsx(BidiText, { as: "span" }),
191
- children: view.name
192
- })]
168
+ children: [renderIcon(view), /* @__PURE__ */ jsx(WorkspaceViewTabName, { name: view.name })]
193
169
  }),
194
170
  actions === null || actions === void 0 ? null : /* @__PURE__ */ jsx("div", {
195
171
  className: "absolute inset-e-0 top-1/2 mt-1 -translate-y-1/2",
@@ -91,6 +91,7 @@ export type WorkspaceFrameProps = {
91
91
  topBar: ComponentProps<typeof WorkspaceShell>["topBar"];
92
92
  /** Omitted when the host has nothing for the inline-end edge. */
93
93
  endDock?: ReactElement | undefined;
94
+ skipToContentLabel?: ComponentProps<typeof WorkspaceShell>["skipToContentLabel"];
94
95
  });
95
96
  export type WorkspaceFrameTopBar = {
96
97
  leading?: ReactNode;
@@ -6,9 +6,9 @@ import { Tooltip, TooltipPopup, TooltipTrigger } from "@stll/ui/tooltip";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  import { TruncatedText } from "@stll/ui/truncated-text";
8
8
  import { cn } from "@stll/ui/utils";
9
- import { InspectorDock, SIDE_RAIL_ICON_BUTTON_SIZE, TOOLBAR_ROW_HEIGHT } from "@stll/ui/inspector";
10
9
  import { ApplicationRail, ApplicationRailButton, ApplicationRailContent, ApplicationRailFooter, ApplicationRailHeader, ApplicationRailMenu } from "@stll/ui/application-rail";
11
10
  import { DirectionalIcon } from "@stll/ui/directional-icon";
11
+ import { InspectorDock, SIDE_RAIL_ICON_BUTTON_SIZE, TOOLBAR_ROW_HEIGHT } from "@stll/ui/inspector";
12
12
  import { Sheet, SheetPopup, SheetTitle } from "@stll/ui/sheet";
13
13
  import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarProvider, useSidebar } from "@stll/ui/sidebar";
14
14
  import { useIsMobile } from "@stll/ui/use-mobile";
@@ -35,6 +35,7 @@ const WorkspaceFrame = (props) => {
35
35
  if (props.composition === "host-responsive") return /* @__PURE__ */ jsx(WorkspaceShell, {
36
36
  endDock: props.endDock,
37
37
  navigation: props.navigation,
38
+ skipToContentLabel: props.skipToContentLabel,
38
39
  topBar: props.topBar,
39
40
  children: props.children
40
41
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stll/workspace-ui",
3
- "version": "0.18.3",
3
+ "version": "0.19.0",
4
4
  "description": "Reusable workspace presentation components and view helpers for Stella.",
5
5
  "keywords": [
6
6
  "calculations",
@@ -107,6 +107,10 @@
107
107
  "types": "./dist/view-switcher.d.ts",
108
108
  "import": "./dist/view-switcher.js"
109
109
  },
110
+ "./view-switcher-face": {
111
+ "types": "./dist/view-switcher-face.d.ts",
112
+ "import": "./dist/view-switcher-face.js"
113
+ },
110
114
  "./workspace-frame": {
111
115
  "types": "./dist/workspace-frame.d.ts",
112
116
  "import": "./dist/workspace-frame.js"
@@ -130,10 +134,10 @@
130
134
  "@stll/calculations": "^0.1.5",
131
135
  "@stll/conditions": "^0.4.1",
132
136
  "@stll/money": "^0.4.0",
133
- "@stll/ui": "^0.73.0",
137
+ "@stll/ui": "^0.75.0",
134
138
  "better-result": "3.0.1",
135
139
  "temporal-polyfill": "1.0.8",
136
- "use-intl": "4.14.9"
140
+ "use-intl": "4.14.10"
137
141
  },
138
142
  "devDependencies": {
139
143
  "@atlaskit/pragmatic-drag-and-drop": "^4.0.0",