@columenlabs/lumen-ui 0.1.93 → 0.1.95

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/shell.d.ts CHANGED
@@ -12,6 +12,8 @@ interface ShellContext {
12
12
  openSettings: (section?: string) => void;
13
13
  /** Closes Settings (a section that sends the person to a page). */
14
14
  closeSettings: () => void;
15
+ /** Whether Settings has a section with this id, so a link to it is never dead. */
16
+ hasSettings: (section: string) => boolean;
15
17
  /** The header's Refresh: reloads the page's data, skipping the server cache. Null without `onRefresh`. */
16
18
  refresh: (() => Promise<void>) | null;
17
19
  refreshing: boolean;
package/dist/shell.js CHANGED
@@ -134,6 +134,7 @@ export function LumenShell({ app, appLabel, brand, nav, status, health, statusEn
134
134
  statusSlot,
135
135
  openSettings,
136
136
  closeSettings: () => setSettingsAt(null),
137
+ hasSettings: (section) => findSettings.some((s) => s.id === section),
137
138
  refresh: onRefresh ? refresh : null,
138
139
  refreshing,
139
140
  hideAmounts,
package/dist/tasks.js CHANGED
@@ -227,11 +227,11 @@ function Ring({ share }) {
227
227
  return (_jsxs("svg", { viewBox: "0 0 20 20", role: "img", "aria-label": "Progress", className: cn('size-4.5', share === null && 'animate-spin motion-reduce:animate-none'), children: [_jsx("circle", { cx: "10", cy: "10", r: "7.5", fill: "none", className: "stroke-muted", strokeWidth: "2.5" }), _jsx("circle", { cx: "10", cy: "10", r: "7.5", fill: "none", className: "stroke-primary", strokeWidth: "2.5", strokeLinecap: "round", strokeDasharray: `${arc} ${c}`, transform: "rotate(-90 10 10)" })] }));
228
228
  }
229
229
  function TaskPanel({ list, onClose }) {
230
- const { openSettings } = useShell();
231
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: "max-h-[60svh] overflow-y-auto", children: list.tasks.map((t) => (_jsx(TaskRow, { task: t, onClose: onClose }, t.id))) }), _jsxs("div", { className: "border-t px-3.5 py-2.5 text-xs text-muted-foreground", children: ["Phone or email when a task ends:", ' ', _jsx("button", { type: "button", className: "text-primary hover:underline", onClick: () => {
230
+ const { openSettings, hasSettings } = useShell();
231
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: "max-h-[60svh] overflow-y-auto", children: list.tasks.map((t) => (_jsx(TaskRow, { task: t, onClose: onClose }, t.id))) }), hasSettings('notifications') && (_jsxs("div", { className: "border-t px-3.5 py-2.5 text-xs text-muted-foreground", children: ["Phone or email when a task ends:", ' ', _jsx("button", { type: "button", className: "text-primary hover:underline", onClick: () => {
232
232
  onClose();
233
233
  openSettings('notifications');
234
- }, children: "Settings \u25B8 Notifications" })] })] }));
234
+ }, children: "Settings \u25B8 Notifications" })] }))] }));
235
235
  }
236
236
  function TaskRow({ task: t, onClose }) {
237
237
  const tasks = useTasks();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@columenlabs/lumen-ui",
3
- "version": "0.1.93",
3
+ "version": "0.1.95",
4
4
  "description": "Lumen: shared React components (frame, views, widgets, charts, drawers).",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -49,7 +49,7 @@
49
49
  "@codemirror/lang-javascript": "6.2.5",
50
50
  "@codemirror/lang-json": "6.0.2",
51
51
  "@codemirror/lang-sql": "6.10.0",
52
- "@columenlabs/lumen-ui-types": "0.1.93",
52
+ "@columenlabs/lumen-ui-types": "0.1.95",
53
53
  "@dnd-kit/core": "6.3.1",
54
54
  "@dnd-kit/sortable": "10.0.0",
55
55
  "@dnd-kit/utilities": "3.2.2",