@parallelworks/ui 0.65.1 → 0.66.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/README.md CHANGED
@@ -663,10 +663,11 @@ import { AddIcon, TrashIcon } from '@parallelworks/ui/icons'
663
663
  ```
664
664
 
665
665
  `@parallelworks/ui/icons` is the one import point for interface icons. Each
666
- name is a meaning, such as `RetryIcon` or `WarningIcon`, drawn from
667
- [Lucide](https://lucide.dev), so every icon shares one 24px grid and one 2px
668
- stroke. Don't import `lucide-react` directly: a name here keeps one glyph per
669
- meaning across the apps.
666
+ name is a meaning, such as `RetryIcon` or `WarningIcon`. Every icon is drawn
667
+ for this module by one hand: one path on a 16px grid with a 1.5px stroke, in
668
+ fewer and simpler shapes than a 24px set so it stays crisp at the 16px it's
669
+ mostly shown at. Don't bring in another icon library: a name here keeps one
670
+ glyph per meaning across the apps.
670
671
 
671
672
  - **Size and color:** an icon is `1em` square in `currentColor`, so it follows
672
673
  the text around it. A class such as `size-4` or `h-3 w-3` sets another size,
@@ -690,10 +691,13 @@ meaning across the apps.
690
691
  write-up to read, such as a case study, and `NotebookIcon` one notebook.
691
692
  `PendingIcon` is a requirement not met yet and `NotRunningIcon` a run not
692
693
  started; they share the empty circle, so keep them out of the same list.
693
- - **Adding an icon:** pick the [Lucide glyph](https://lucide.dev/icons) and add
694
- `export const NameIcon = /* @__PURE__ */ icon(Glyph)` to `src/icons.tsx`,
695
- named for what it means rather than what it shows. Reuse an existing name
696
- when the meaning is the same.
694
+ - **Adding an icon:** draw it as one path on the 16px grid and add
695
+ `export const NameIcon = /* @__PURE__ */ drawn('M…')` to `src/icons.tsx`,
696
+ named for what it means rather than what it shows. Reuse the existing parts
697
+ (the status circle, the person, the file and folder outlines, the
698
+ bottom-right corner for a plus, minus, check or X) so families match, and
699
+ check it at 16px beside its neighbours in the `UI/Icons` story. Reuse an
700
+ existing name when the meaning is the same.
697
701
 
698
702
  Logos of other companies' products, such as `GitHubIcon` or `UbuntuIcon`, are
699
703
  in `@parallelworks/ui/brand-icons`. They take the same props, are filled in the
@@ -35,7 +35,7 @@ function AllocationSelector() {
35
35
  if (!isOrgProvider || !allocations?.length) return null;
36
36
  const selected = allocations.find((a) => a.name === selectedAllocation);
37
37
  return /* @__PURE__ */ jsxs("div", {
38
- className: "flex min-w-0 items-center gap-2",
38
+ className: "flex min-w-0 shrink-[3] items-center gap-2",
39
39
  children: [/* @__PURE__ */ jsx(Select, {
40
40
  "aria-label": t.choose,
41
41
  items: allocations.map((a) => ({
@@ -56,7 +56,7 @@ function AllocationSelector() {
56
56
  })]
57
57
  })
58
58
  }), selected && /* @__PURE__ */ jsx("span", {
59
- className: "text-xs tabular-nums theme-muted-text whitespace-nowrap",
59
+ className: "hidden text-xs tabular-nums theme-muted-text whitespace-nowrap @md:inline",
60
60
  children: t.usage(money(selected.used ?? 0), money(selected.total))
61
61
  })]
62
62
  });
@@ -8,7 +8,7 @@ import { useChat } from "../core/ChatProvider.js";
8
8
  import BlockedGroupBanner from "./BlockedGroupBanner.js";
9
9
  import { getGreeting } from "../core/greeting.js";
10
10
  import useDragDrop from "../core/useDragDrop.js";
11
- import { ComposerControls, ConnectToolsLink } from "./ComposerChrome.js";
11
+ import { ComposerControls, ComposerUsage, ConnectToolsLink } from "./ComposerChrome.js";
12
12
  import DragOverlay from "./DragOverlay.js";
13
13
  import ChatInput from "./ChatInput.js";
14
14
  import ChatStage from "./ChatStage.js";
@@ -132,7 +132,7 @@ function ChatEmptyState({ targetSession }) {
132
132
  disabled: isLoading || isLoadingModels || models.length === 0,
133
133
  placeholder: isLoadingModels ? tInput.placeholderLoading : hasLoadedModels && models.length === 0 ? tInput.placeholderNoProviders : tInput.placeholder,
134
134
  settingsLeft: /* @__PURE__ */ jsx(ConnectToolsLink, {}),
135
- settingsRight: /* @__PURE__ */ jsxs(Fragment, { children: [slots.composerUsage, /* @__PURE__ */ jsx(ComposerControls, { targetSession })] })
135
+ settingsRight: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ComposerUsage, { children: slots.composerUsage }), /* @__PURE__ */ jsx(ComposerControls, { targetSession })] })
136
136
  }),
137
137
  prompts.length > 0 && !(hasLoadedModels && models.length === 0) && /* @__PURE__ */ jsx("ul", {
138
138
  className: "mx-auto max-w-[var(--chat-column,50rem)] px-8",
@@ -140,7 +140,7 @@ function ModelSelector({ targetSession }) {
140
140
  children: getModelLabel(selected)
141
141
  }),
142
142
  selected.provider && /* @__PURE__ */ jsx("span", {
143
- className: "max-w-[45%] shrink-0 truncate text-xs",
143
+ className: "hidden max-w-[45%] shrink-0 truncate text-xs @md:inline",
144
144
  children: selected.provider
145
145
  }),
146
146
  issue && /* @__PURE__ */ jsx(WarningIcon, { className: "h-3.5 w-3.5 shrink-0 text-(--theme-warning)" })
@@ -271,7 +271,7 @@ function ToolCallBlock({ part }) {
271
271
  }), /* @__PURE__ */ jsx(ResultBody, { part })]
272
272
  }),
273
273
  !isDiff && !expanded && /* @__PURE__ */ jsx("div", {
274
- className: cx("ml-5 mt-0.5 text-[13px]", part.status === "error" ? "text-(--theme-error-text)" : "theme-muted-text"),
274
+ className: cx("ml-5 mt-0.5 truncate text-[13px]", part.status === "error" ? "text-(--theme-error-text)" : "theme-muted-text"),
275
275
  children: summary
276
276
  }),
277
277
  isDiff && /* @__PURE__ */ jsx("div", {
@@ -27,7 +27,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
27
27
  */
28
28
  /** A one-color logo in the text's color, at the text's size. */
29
29
  function brand(viewBox, ...paths) {
30
- function Icon({ title, size = "1em", color = "currentColor", strokeWidth: _strokeWidth, absoluteStrokeWidth: _absoluteStrokeWidth, nonScalingStroke: _nonScalingStroke, children, ...props }) {
30
+ function Icon({ title, size = "1em", color = "currentColor", strokeWidth: _strokeWidth, children, ...props }) {
31
31
  const named = Boolean(title || props["aria-label"] || props["aria-labelledby"]);
32
32
  return /* @__PURE__ */ jsxs("svg", {
33
33
  xmlns: "http://www.w3.org/2000/svg",
package/dist/icons.d.ts CHANGED
@@ -1,6 +1,7 @@
1
- import type { LucideProps } from 'lucide-react';
2
- import type { ReactNode } from 'react';
3
- export interface IconProps extends LucideProps {
1
+ import type { ReactNode, SVGProps } from 'react';
2
+ export interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'ref'> {
3
+ /** Width and height; the text's size by default. */
4
+ size?: string | number | undefined;
4
5
  /** Names the icon for assistive technology. Without it, or an `aria-label`,
5
6
  * the icon is decoration and hidden from assistive technology. */
6
7
  title?: string | undefined;