@columenlabs/lumen-ui 0.1.244 → 0.1.245

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.
@@ -114,7 +114,6 @@ const wayTest = (k, plan = false) => k?.test
114
114
  }
115
115
  : null;
116
116
  /** A provider's mark: its initial on a tile. */
117
- const mark = (label) => _jsx(ConnectionLogo, { text: label.charAt(0) });
118
117
  /**
119
118
  * Whether the app lets this person use `w` of their own on `p` (the app's `ownWays`, the same
120
119
  * rule the server pays by). A way it does not allow never shows, even when one is still stored:
@@ -161,7 +160,7 @@ function OwnProviderKey({ client, p }) {
161
160
  onRemove: () => apply(`own:${p.id}`, () => client.ownKey(p.id, null), 'Key removed'),
162
161
  removeTitle: `Remove your ${p.label} key?`,
163
162
  });
164
- return (_jsx(LumenConnection, { id: p.id, name: p.label, logo: mark(p.label), ways: ways, use: p.use, onUse: (use) => apply(`use:${p.id}`, () => client.settings({ own_use: { [p.id]: use } })) }));
163
+ return (_jsx(LumenConnection, { id: p.id, name: p.label, ways: ways, use: p.use, onUse: (use) => apply(`use:${p.id}`, () => client.settings({ own_use: { [p.id]: use } })) }));
165
164
  }
166
165
  /** A person's own keys, one row a provider, and what they may spend on them. */
167
166
  function Providers({ client }) {
@@ -171,10 +170,7 @@ function Providers({ client }) {
171
170
  // is exactly what the server may pay with.
172
171
  const rows = s.providers.filter((p) => !p.own_ways || p.own_ways.length > 0);
173
172
  const ownSet = rows.some(ownUsable);
174
- return (_jsxs("div", { className: "flex flex-col", children: [_jsx(LumenExpandList, { children: rows.map((p) => (_jsx(OwnProviderKey, { client: client, p: p }, p.id))) }), ownSet && (_jsx(SettingField, { label: "Answers run on", info: "Your own key or plan first, with the shared credits behind it; or the shared credits first.", children: _jsx(LumenSelector, { label: "Answers run on", size: "sm", className: "w-44", value: s.pay, options: [
175
- { value: 'own', label: 'Your own first' },
176
- { value: 'app', label: 'Shared credits first' },
177
- ], onChange: (pay) => void apply('pay', () => client.settings({ pay: pay })) }) })), ownSet && (_jsx(SettingField, { label: "Your keys may spend", info: "On your keys, every provider together.", children: _jsx(CapInput, { label: "Your monthly cap", value: s.caps.own, onSave: (n) => void apply('own', () => client.ownCap(n)) }) })), ownSet && _jsx(OwnCapUse, { s: s }), _jsx(OwnKeyUsage, { client: client, always: ownSet })] }));
173
+ return (_jsxs("div", { className: "flex flex-col", children: [_jsx(LumenExpandList, { children: rows.map((p) => (_jsx(OwnProviderKey, { client: client, p: p }, p.id))) }), ownSet && (_jsx(SettingField, { label: "Answers run on", info: "Your own key or plan first, with the shared credits behind it; or the shared credits first.", children: _jsxs(ToggleGroup, { type: "single", variant: "outline", size: "sm", spacing: 0, value: s.pay, "aria-label": "Answers run on", onValueChange: (pay) => pay && void apply('pay', () => client.settings({ pay: pay })), children: [_jsx(ToggleGroupItem, { value: "own", children: "Your own first" }), _jsx(ToggleGroupItem, { value: "app", children: "Credits first" })] }) })), ownSet && (_jsx(SettingField, { label: "Your keys may spend", info: "On your keys, every provider together.", children: _jsx(CapInput, { label: "Your monthly cap", value: s.caps.own, onSave: (n) => void apply('own', () => client.ownCap(n)) }) })), ownSet && _jsx(OwnCapUse, { s: s }), _jsx(OwnKeyUsage, { client: client, always: ownSet })] }));
178
174
  } }));
179
175
  }
180
176
  /**
@@ -195,7 +191,7 @@ function OwnCapUse({ s }) {
195
191
  function SharedProviderKey({ client, p }) {
196
192
  const { apply, refresh } = useApply(client);
197
193
  const env = !p.app.set && !!p.app.from_env;
198
- return (_jsx(LumenConnection, { id: p.id, name: p.label, logo: mark(p.label), ways: [
194
+ return (_jsx(LumenConnection, { id: p.id, name: p.label, ways: [
199
195
  {
200
196
  id: 'key',
201
197
  label: 'Shared key',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@columenlabs/lumen-ui",
3
- "version": "0.1.244",
3
+ "version": "0.1.245",
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.244",
52
+ "@columenlabs/lumen-ui-types": "0.1.245",
53
53
  "@dnd-kit/core": "6.3.1",
54
54
  "@dnd-kit/sortable": "10.0.0",
55
55
  "@dnd-kit/utilities": "3.2.2",