@stll/workspace-ui 0.21.0 → 0.21.2

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,13 +1,13 @@
1
1
  import { formatCalculationResult } from "./calculation-format.js";
2
2
  import { applyCalculationSelection } from "./calculation-selection.js";
3
3
  import { useFormatter, useFormattingLocale } from "./formatting.js";
4
- import { runCalculation } from "@stll/calculations";
5
- import { formatMoneyCents } from "@stll/money";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
6
5
  import { Button } from "@stll/ui/button";
7
6
  import { CheckIcon, SigmaIcon } from "@stll/ui/icons";
8
7
  import { Menu, MenuItem, MenuPopup, MenuSub, MenuSubPopup, MenuSubTrigger, MenuTrigger } from "@stll/ui/menu";
8
+ import { formatMoneyCents } from "@stll/money";
9
+ import { runCalculation } from "@stll/calculations";
9
10
  import { Tooltip, TooltipPopup, TooltipTrigger } from "@stll/ui/tooltip";
10
- import { jsx, jsxs } from "react/jsx-runtime";
11
11
  // src/calculations.tsx
12
12
  /**
13
13
  * Choose what a view calculates: a property, then a reduction. Every step is a
@@ -1,14 +1,14 @@
1
1
  import { appendChild, asGroup, buildLeaf, isConditionOperator, isMultiValue, leafFromField, leafOperand, leafOperator, leafValueList, leafValueString, operandsEqual, operatorsFor, removeChild, replaceChild, valueEditorFor } from "./logic.js";
2
+ import { cn } from "@stll/ui/utils";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ import { Select, SelectItem, SelectPopup, SelectSeparator, SelectTrigger, SelectValue } from "@stll/ui/select";
2
5
  import { panic } from "better-result";
6
+ import { createContext, use } from "react";
3
7
  import { Button } from "@stll/ui/button";
4
8
  import { PlusIcon, XIcon } from "@stll/ui/icons";
5
- import { createContext, use } from "react";
6
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
- import { cn } from "@stll/ui/utils";
8
9
  import { DatePickerPopover } from "@stll/ui/date-picker-popover";
9
10
  import { Input } from "@stll/ui/input";
10
11
  import { NumberInput } from "@stll/ui/number-input";
11
- import { Select, SelectItem, SelectPopup, SelectSeparator, SelectTrigger, SelectValue } from "@stll/ui/select";
12
12
  // src/conditions/builder.tsx
13
13
  const BuilderContext = createContext(null);
14
14
  /**
@@ -1,10 +1,10 @@
1
1
  import { formatPreviewDate, formatPreviewHours } from "./format.js";
2
2
  import { PREVIEW_MATTERS } from "./mock-data.js";
3
3
  import { FeaturePreviewSurface } from "./surface.js";
4
- import { cents, formatMoneyCents, timeEntryAmount } from "@stll/money";
5
- import { BanknoteIcon } from "@stll/ui/icons";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
4
  import { TruncatedText } from "@stll/ui/truncated-text";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { BanknoteIcon } from "@stll/ui/icons";
7
+ import { cents, formatMoneyCents, timeEntryAmount } from "@stll/money";
8
8
  import { MatterIcon } from "@stll/ui/matter-icon";
9
9
  // src/feature-previews/billing-preview.tsx
10
10
  /** An invoice draft: the matter's time entries in date order with hours,
@@ -1,9 +1,9 @@
1
1
  import { formatPreviewDate } from "./format.js";
2
2
  import { PREVIEW_MATTERS } from "./mock-data.js";
3
3
  import { FeaturePreviewSurface } from "./surface.js";
4
- import { Building2Icon, ShieldCheckIcon } from "@stll/ui/icons";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
4
  import { TruncatedText } from "@stll/ui/truncated-text";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { Building2Icon, ShieldCheckIcon } from "@stll/ui/icons";
7
7
  import { MatterIcon } from "@stll/ui/matter-icon";
8
8
  import { DetailsGrid, DetailsItem } from "@stll/ui/details-grid";
9
9
  // src/feature-previews/contacts-preview.tsx
@@ -1,8 +1,8 @@
1
1
  import { formatPreviewCount, formatPreviewTime } from "./format.js";
2
2
  import { PREVIEW_PEOPLE } from "./mock-data.js";
3
3
  import { FeaturePreviewSurface, PreviewAvatarStack } from "./surface.js";
4
- import { FileTextIcon } from "@stll/ui/icons";
5
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { FileTextIcon } from "@stll/ui/icons";
6
6
  import { ReviewCommentCard } from "@stll/ui/review-comment-card";
7
7
  import { ReviewDiffDeletion, ReviewDiffInsertion } from "@stll/ui/review-diff-text";
8
8
  import { TextMark } from "@stll/ui/text-mark";
@@ -2,11 +2,11 @@ import { TASK_STATUS_COLORS, TASK_STATUS_ICONS } from "../task-status.js";
2
2
  import { formatPreviewCount, formatPreviewDate } from "./format.js";
3
3
  import { PREVIEW_MATTERS, PREVIEW_PEOPLE } from "./mock-data.js";
4
4
  import { FeaturePreviewSurface, PreviewAvatar, PreviewAvatarStack } from "./surface.js";
5
- import { CalendarIcon, FileTextIcon } from "@stll/ui/icons";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
5
  import { TruncatedText } from "@stll/ui/truncated-text";
8
6
  import { cn } from "@stll/ui/utils";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
9
8
  import { KanbanCardShell, KanbanColumnHeader } from "@stll/ui/kanban";
9
+ import { CalendarIcon, FileTextIcon } from "@stll/ui/icons";
10
10
  import { MatterIcon } from "@stll/ui/matter-icon";
11
11
  // src/feature-previews/matters-preview.tsx
12
12
  /** A matter's task board: three status columns of task cards with due dates,
@@ -1,8 +1,8 @@
1
1
  import { formatPreviewDate } from "./format.js";
2
2
  import { FeaturePreviewSurface } from "./surface.js";
3
- import { CaseLawIcon, SearchIcon } from "@stll/ui/icons";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
3
  import { TruncatedText } from "@stll/ui/truncated-text";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { CaseLawIcon, SearchIcon } from "@stll/ui/icons";
6
6
  import { SEARCH_HIT_MARK, TextMark } from "@stll/ui/text-mark";
7
7
  import { DocumentIdentityBadge } from "@stll/ui/document-identity-badge";
8
8
  // src/feature-previews/research-preview.tsx
@@ -1,6 +1,6 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
1
  import { TruncatedText } from "@stll/ui/truncated-text";
3
2
  import { cn } from "@stll/ui/utils";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { ReviewAuthorAvatar } from "@stll/ui/review-author-avatar";
5
5
  // src/feature-previews/surface.tsx
6
6
  /**
@@ -1,9 +1,9 @@
1
1
  import { formatPreviewDate, formatPreviewDuration, formatPreviewTime } from "./format.js";
2
2
  import { PREVIEW_MATTERS } from "./mock-data.js";
3
3
  import { FeaturePreviewSurface } from "./surface.js";
4
- import { ClockIcon, SquareIcon } from "@stll/ui/icons";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
4
  import { TruncatedText } from "@stll/ui/truncated-text";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { ClockIcon, SquareIcon } from "@stll/ui/icons";
7
7
  import { MatterIcon } from "@stll/ui/matter-icon";
8
8
  // src/feature-previews/time-tracking-preview.tsx
9
9
  /** A running timer on a matter above the day's recorded entries and their
@@ -1,16 +1,16 @@
1
1
  import { emptyColor, resolveOptionColor } from "./colors.js";
2
2
  import { getClipFieldValueLabel, summarizeRecordField } from "./field-value-logic.js";
3
3
  import { useFormatter, useFormattingLocale } from "./formatting.js";
4
+ import { BidiText } from "@stll/ui/bidi-text";
5
+ import { TruncatedText } from "@stll/ui/truncated-text";
6
+ import { cn } from "@stll/ui/utils";
7
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
8
  import { Result, panic } from "better-result";
5
- import { formatMoneyCents } from "@stll/money";
6
9
  import { SquareMinusIcon } from "@stll/ui/icons";
7
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
10
  import { Temporal } from "temporal-polyfill/full";
9
11
  import { useTranslations } from "use-intl";
10
- import { BidiText } from "@stll/ui/bidi-text";
12
+ import { formatMoneyCents } from "@stll/money";
11
13
  import { Skeleton } from "@stll/ui/skeleton";
12
- import { TruncatedText } from "@stll/ui/truncated-text";
13
- import { cn } from "@stll/ui/utils";
14
14
  // src/field-value.tsx
15
15
  const FieldValue = ({ content, property, pendingPreview, variant }) => {
16
16
  const resolvedVariant = variant ?? "default";
@@ -1,7 +1,7 @@
1
+ import { jsx } from "react/jsx-runtime";
1
2
  import { panic } from "better-result";
2
3
  import { createContext, useContext, useMemo } from "react";
3
4
  import { createFormatter } from "use-intl/core";
4
- import { jsx } from "react/jsx-runtime";
5
5
  // src/formatting.tsx
6
6
  const FormattingContext = createContext(void 0);
7
7
  /**
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { WorkspaceViewStrip, WorkspaceViewSwitcherFace, WorkspaceViewTabFace } from "./view-strip.js";
1
2
  import { CalculationKindPicker, CalculationPicker, CalculationSummary, ColumnCalculation, useCalculation } from "./calculations.js";
2
3
  import { formatCalculationResult } from "./calculation-format.js";
3
4
  import { applyCalculationSelection } from "./calculation-selection.js";
@@ -13,7 +14,6 @@ import { TableSkeletonRows } from "./table-skeleton-rows.js";
13
14
  import { FIELD_CONTENT_TYPES } from "./types.js";
14
15
  import { KANBAN_EMPTY_GROUP_VISIBILITIES, KANBAN_SAVED_VIEW_STATE_VERSION, createWorkspaceKanbanSchema, getWorkspaceKanbanGroupingChoices, normalizeKanbanSavedViewState, presentKanbanBoard, resolveWorkspaceKanbanView } from "./kanban-view.js";
15
16
  import { WorkspaceKanbanGroupingPicker } from "./kanban-grouping-picker.js";
16
- import { WorkspaceViewStrip, WorkspaceViewSwitcherFace, WorkspaceViewTabFace } from "./view-strip.js";
17
17
  import { WorkspaceViewSwitcher } from "./view-switcher.js";
18
18
  import { WorkspaceViewTabName } from "./view-switcher-face.js";
19
19
  import { WorkspaceFrame } from "./workspace-frame.js";
@@ -1,6 +1,6 @@
1
- import { AlertCircleIcon, BanknoteIcon, CalendarIcon, CircleDotIcon, DatabaseIcon, FileIcon, FileQuestionIcon, HashIcon, LinkIcon, ListChecksIcon, TextIcon, UserIcon } from "@stll/ui/icons";
2
- import { jsx } from "react/jsx-runtime";
3
1
  import { cn } from "@stll/ui/utils";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { AlertCircleIcon, BanknoteIcon, CalendarIcon, CircleDotIcon, DatabaseIcon, FileIcon, FileQuestionIcon, HashIcon, LinkIcon, ListChecksIcon, TextIcon, UserIcon } from "@stll/ui/icons";
4
4
  // src/property-icon.tsx
5
5
  const propertyMap = {
6
6
  text: {
@@ -1,5 +1,5 @@
1
- import { jsx } from "react/jsx-runtime";
2
1
  import { cn } from "@stll/ui/utils";
2
+ import { jsx } from "react/jsx-runtime";
3
3
  // src/responsive-action-toolbar.tsx
4
4
  const RESPONSIVE_ACTION_TOOLBAR_SLOT_CLASS = {
5
5
  primary: "min-w-56 flex-1",
@@ -1,6 +1,6 @@
1
1
  import { SORT_CHIP_CLASS, SORT_CHIP_TOGGLE, SORT_DIRECTION_CLASS, SORT_ICON_BUTTON } from "./sort-chip-classes.js";
2
- import { ArrowUpDownIcon, XIcon } from "@stll/ui/icons";
3
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { ArrowUpDownIcon, XIcon } from "@stll/ui/icons";
4
4
  import { ButtonFace, FaceLabelPending } from "@stll/ui/control-face";
5
5
  // src/sorts-face.tsx
6
6
  /**
package/dist/sorts.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { sortDirectionOf } from "./column-sort.js";
2
2
  import { PropertyIcon } from "./property-icon.js";
3
3
  import { SORT_CHIP_CLASS, SORT_DIRECTION_CLASS } from "./sort-chip-classes.js";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
5
  import { Button } from "@stll/ui/button";
5
6
  import { ArrowUpDownIcon, XIcon } from "@stll/ui/icons";
6
7
  import { Menu, MenuItem, MenuPopup, MenuTrigger } from "@stll/ui/menu";
7
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
8
  // src/sorts.tsx
9
9
  /**
10
10
  * The view's sorts as chips, plus the menu that adds one.
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
2
  import { BidiText } from "@stll/ui/bidi-text";
4
- import { cn } from "@stll/ui/utils";
5
3
  import { TOOLBAR_ROW_HEIGHT } from "@stll/ui/layout-tokens";
6
4
  import { Tabs, TabsList, TabsTab } from "@stll/ui/tabs";
7
5
  import { TRUNCATED_TEXT_LINES_CLASS } from "@stll/ui/truncated-text-face";
6
+ import { cn } from "@stll/ui/utils";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
8
  // src/view-strip.tsx
9
9
  /**
10
10
  * The saved-view strip without behaviour: one toolbar row of underline tabs
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { WORKSPACE_VIEW_TAB_NAME_CLASS, WorkspaceViewStrip, WorkspaceViewSwitcherFace, WorkspaceViewTabFace } from "./view-strip.js";
3
- import { jsx } from "react/jsx-runtime";
4
3
  import { BidiText } from "@stll/ui/bidi-text";
5
4
  import { TruncatedText } from "@stll/ui/truncated-text";
5
+ import { jsx } from "react/jsx-runtime";
6
6
  // src/view-switcher-face.tsx
7
7
  /** A view's name on its tab, cut short at a fixed width; a name that is cut
8
8
  * shows whole on hover, focus or tap. */
@@ -1,17 +1,17 @@
1
1
  "use client";
2
2
  import { WorkspaceViewStrip, WorkspaceViewTabFace } from "./view-strip.js";
3
3
  import { WorkspaceViewTabName } from "./view-switcher-face.js";
4
- import { Button } from "@stll/ui/button";
5
- import { EllipsisVerticalIcon } from "@stll/ui/icons";
6
- import { Menu, MenuPopup, MenuTrigger } from "@stll/ui/menu";
7
- import { useCallback, useEffect, useRef, useState } from "react";
8
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { useCallback, useEffect, useRef, useState } from "react";
9
6
  import { attachClosestEdge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge/attach-closest-edge";
10
7
  import { extractClosestEdge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge/extract-closest-edge";
11
8
  import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter";
12
9
  import { combine } from "@atlaskit/pragmatic-drag-and-drop/utils/combine";
10
+ import { Button } from "@stll/ui/button";
11
+ import { EllipsisVerticalIcon } from "@stll/ui/icons";
13
12
  import { InlineDropIndicator } from "@stll/ui/inline-drop-indicator";
14
13
  import { reorderInlineIds, toInlineDropPosition } from "@stll/ui/inline-reorder";
14
+ import { Menu, MenuPopup, MenuTrigger } from "@stll/ui/menu";
15
15
  // src/view-switcher.tsx
16
16
  const VIEW_DRAG_TYPE = "@stll/workspace-ui/view-switcher/drag-type";
17
17
  const VIEW_DRAG_ID = "@stll/workspace-ui/view-switcher/view-id";
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { resolveWorkspaceInspectorPresentation } from "./workspace-frame.logic.js";
3
+ import { TruncatedText } from "@stll/ui/truncated-text";
4
+ import { cn } from "@stll/ui/utils";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
3
6
  import { Button } from "@stll/ui/button";
4
7
  import { PanelLeftIcon } from "@stll/ui/icons";
5
8
  import { Tooltip, TooltipPopup, TooltipTrigger } from "@stll/ui/tooltip";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
- import { TruncatedText } from "@stll/ui/truncated-text";
8
- import { cn } from "@stll/ui/utils";
9
9
  import { ApplicationRail, ApplicationRailButton, ApplicationRailContent, ApplicationRailFooter, ApplicationRailHeader, ApplicationRailMenu } from "@stll/ui/application-rail";
10
10
  import { DirectionalIcon } from "@stll/ui/directional-icon";
11
11
  import { InspectorDock, SIDE_RAIL_ICON_BUTTON_SIZE, TOOLBAR_ROW_HEIGHT } from "@stll/ui/inspector";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stll/workspace-ui",
3
- "version": "0.21.0",
3
+ "version": "0.21.2",
4
4
  "description": "Reusable workspace presentation components and view helpers for Stella.",
5
5
  "keywords": [
6
6
  "calculations",
@@ -129,7 +129,7 @@
129
129
  },
130
130
  "scripts": {
131
131
  "clean": "git clean -xdf dist .cache .turbo node_modules",
132
- "build": "tsdown",
132
+ "build": "bun --bun tsdown",
133
133
  "pack:dry-run": "bun pm pack --dry-run",
134
134
  "test": "bun test src",
135
135
  "typecheck": "bun check --no-pretty --all --project=tsconfig.json",
@@ -142,7 +142,7 @@
142
142
  "@stll/calculations": "^0.1.5",
143
143
  "@stll/conditions": "^0.4.1",
144
144
  "@stll/money": "^0.4.0",
145
- "@stll/ui": "^0.77.0",
145
+ "@stll/ui": "^0.79.0",
146
146
  "better-result": "3.0.1",
147
147
  "temporal-polyfill": "1.0.8",
148
148
  "use-intl": "4.15.1"