@w6w/ui 0.2.62 → 0.2.64

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.
Files changed (38) hide show
  1. package/dist/{CodeBlock-CPKXSNEs.js → CodeBlock-Bp0SGY1m.js} +82 -57
  2. package/dist/{CodeBlock-CPKXSNEs.js.map → CodeBlock-Bp0SGY1m.js.map} +1 -1
  3. package/dist/{CodeBlock-BSX1pi6W.cjs → CodeBlock-a2aIm-0b.cjs} +5 -5
  4. package/dist/{CodeBlock-BSX1pi6W.cjs.map → CodeBlock-a2aIm-0b.cjs.map} +1 -1
  5. package/dist/EditConnectionModal.d.ts +1 -1
  6. package/dist/code.cjs +1 -1
  7. package/dist/code.mjs +1 -1
  8. package/dist/components/CallableBindingSetup.d.ts +15 -0
  9. package/dist/components/ConnectionList.d.ts +1 -1
  10. package/dist/components/DataStoreList.d.ts +1 -1
  11. package/dist/components/DataTable.d.ts +6 -0
  12. package/dist/components/IconButton.d.ts +4 -0
  13. package/dist/components/RunCallable.d.ts +52 -0
  14. package/dist/components/expression-authoring.d.ts +3 -2
  15. package/dist/components/expression-dom.d.ts +30 -0
  16. package/dist/components/icons.d.ts +1 -1
  17. package/dist/connection-app-meta-BRf92BmY.cjs +26 -0
  18. package/dist/connection-app-meta-BRf92BmY.cjs.map +1 -0
  19. package/dist/{connection-app-meta-CIfXp2O-.js → connection-app-meta-BWPwf8UR.js} +3372 -3235
  20. package/dist/connection-app-meta-BWPwf8UR.js.map +1 -0
  21. package/dist/flow.cjs +1 -1
  22. package/dist/flow.mjs +3 -3
  23. package/dist/index.cjs +2 -2
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.ts +5 -1
  26. package/dist/index.mjs +1696 -1284
  27. package/dist/index.mjs.map +1 -1
  28. package/dist/provider.d.ts +29 -0
  29. package/dist/run-callable.d.ts +50 -0
  30. package/dist/types.d.ts +13 -0
  31. package/package.json +2 -2
  32. package/src/styles/_connections.scss +43 -0
  33. package/src/styles/_data-stores.scss +26 -3
  34. package/src/styles/_data-table.scss +38 -1
  35. package/src/styles.css +122 -4
  36. package/dist/connection-app-meta-CIfXp2O-.js.map +0 -1
  37. package/dist/connection-app-meta-Cn39S3ED.cjs +0 -24
  38. package/dist/connection-app-meta-Cn39S3ED.cjs.map +0 -1
@@ -174,6 +174,21 @@ export interface DataStoreEntryOptions {
174
174
  /** True when further matching entries exist past this page. */
175
175
  more?: boolean;
176
176
  }
177
+ /** What a callable is, for the RunCallable components (plan P3). */
178
+ export type CallableKind = "workflow" | "function" | "endpoint";
179
+ export interface CallableRef {
180
+ kind: CallableKind;
181
+ id: string;
182
+ name: string;
183
+ tags: string[];
184
+ }
185
+ /** An explicit host-key binding: where the host's data goes when its button is pressed. */
186
+ export interface CallableBinding {
187
+ kind: CallableKind;
188
+ callableId: string;
189
+ entry?: string;
190
+ field: string;
191
+ }
177
192
  export interface W6WApi {
178
193
  /** Host route for opening a callable in a new tab. */
179
194
  callableHref?(kind: "function" | "workflow", id: string): string;
@@ -519,6 +534,20 @@ export interface W6WApi {
519
534
  * OPTIONAL, like `listTestRuns?` above.
520
535
  */
521
536
  listTriggerApps?(): Promise<AppSummary[]>;
537
+ /**
538
+ * OPTIONAL. List callables (workflows, functions, endpoints) carrying `tag` or a dotted
539
+ * descendant of it; an empty tag lists all. Drives `RunCallables` / `CallableBindingSetup`.
540
+ * GETs each kind's list with `?tag=`.
541
+ */
542
+ listCallables?(opts: {
543
+ tag: string;
544
+ }): Promise<CallableRef[]>;
545
+ /** OPTIONAL. Run an endpoint by id or key with `input`; resolves its raw output. */
546
+ invokeEndpoint?(idOrKey: string, input: Record<string, unknown>): Promise<unknown>;
547
+ /** OPTIONAL. Read the binding saved under a host key (`null` when none). */
548
+ getCallableBinding?(hostKey: string): Promise<CallableBinding | null>;
549
+ /** OPTIONAL. Create or replace the binding saved under a host key. */
550
+ saveCallableBinding?(hostKey: string, binding: CallableBinding): Promise<void>;
522
551
  /**
523
552
  * List one app's declared triggers. GETs `/apps/:id/triggers`.
524
553
  */
@@ -0,0 +1,50 @@
1
+ import { CallableBinding, CallableKind, CallableRef, W6WApi } from './provider.tsx';
2
+ import { TriggerFieldDef } from './trigger-fields.ts';
3
+ import { WorkflowDetail } from './types.ts';
4
+ /**
5
+ * Pure decisions behind the RunCallable components (plan.md P4). No JSX, no React: the
6
+ * components are thin over these so each rule is testable on its own.
7
+ */
8
+ /** Why a run could not be attempted (as opposed to the callable itself failing). */
9
+ export type CallableRunErrorCode = "unsupported" | "unbound" | "stale" | "no-trigger" | "failed";
10
+ export declare class CallableRunError extends Error {
11
+ readonly code: CallableRunErrorCode;
12
+ constructor(code: CallableRunErrorCode, message: string);
13
+ }
14
+ /** The property name the host data travels under: `as`, else the prefix's last segment. */
15
+ export declare function tagProp(prefix: string, as?: string): string;
16
+ /**
17
+ * The preselected callable: the first one carrying a tag EXACTLY equal to
18
+ * `<prefix>.<defaultAction>` (never a deeper `….send_confirmation.x`), else null.
19
+ */
20
+ export declare function defaultCallable(refs: CallableRef[], prefix: string, defaultAction?: string): CallableRef | null;
21
+ export interface ManualTrigger {
22
+ id: string;
23
+ fields: TriggerFieldDef[];
24
+ }
25
+ /** The definition's `@w6w/trigger`/`manual` nodes in definition order, with declared fields. */
26
+ export declare function manualTriggers(definition: WorkflowDetail): ManualTrigger[];
27
+ export interface RunPlan {
28
+ kind: CallableKind;
29
+ id: string;
30
+ entry?: string;
31
+ input: Record<string, unknown>;
32
+ }
33
+ /**
34
+ * Build the one call P4 prescribes. Tag mode (a `CallableRef`): `{[prop]: data}`, a workflow's
35
+ * entry being its FIRST manual trigger. Explicit mode (a `CallableBinding`): `{[field]: data}`
36
+ * to the bound `entry`. A workflow ref needs its `definition`.
37
+ */
38
+ export declare function buildRun(target: CallableRef | CallableBinding, data: unknown, prop: string, definition?: WorkflowDetail): RunPlan;
39
+ /** Issue exactly the call a plan names. Returns the callable's output. */
40
+ export declare function dispatchRun(api: W6WApi, plan: RunPlan): Promise<unknown>;
41
+ /** Tag-mode run: resolve a workflow's definition (for its entry), build, dispatch. */
42
+ export declare function runRef(api: W6WApi, ref: CallableRef, data: unknown, prop: string, extra?: Record<string, unknown>): Promise<unknown>;
43
+ /**
44
+ * Whether a saved binding still points at something runnable. Returns a reason, or null when
45
+ * fine. A workflow must still exist AND still carry the bound entry as a manual trigger; a
46
+ * function must still exist (endpoints have no detail read, so a missing one surfaces on run).
47
+ */
48
+ export declare function staleReason(api: W6WApi, binding: CallableBinding): Promise<string | null>;
49
+ /** Explicit-mode run: read the binding, verify it is not stale, send `{[field]: data}`. */
50
+ export declare function runBound(api: W6WApi, hostKey: string, data: unknown): Promise<unknown>;
package/dist/types.d.ts CHANGED
@@ -401,6 +401,8 @@ export interface CredentialSummary {
401
401
  /** Non-secret display values (e.g. the service account's email). */
402
402
  display: Record<string, string>;
403
403
  private: boolean;
404
+ /** Who may use it: `"user"` = only its creator. Absent (an older server) means the account. */
405
+ accessScope?: "account" | "user";
404
406
  connectionCount: number;
405
407
  createdAt: string;
406
408
  updatedAt: string;
@@ -433,6 +435,8 @@ export type CreateConnectionBody = {
433
435
  credentialId?: never;
434
436
  displayName?: string;
435
437
  profile?: Record<string, unknown>;
438
+ /** `"user"` = "Only me" (only where the auth says `userScope`); omitted = This account. */
439
+ accessScope?: "account" | "user";
436
440
  } | {
437
441
  authKey: string;
438
442
  credentialId: string;
@@ -440,6 +444,7 @@ export type CreateConnectionBody = {
440
444
  binding?: ConnectionBinding;
441
445
  displayName?: string;
442
446
  profile?: never;
447
+ accessScope?: "account" | "user";
443
448
  };
444
449
  /** Auth method declaration as exposed by an app's manifest. */
445
450
  export interface AuthDef {
@@ -485,6 +490,12 @@ export interface AuthDef {
485
490
  * app. The connect modal preselects it (among the available methods).
486
491
  */
487
492
  default?: boolean;
493
+ /**
494
+ * `true` when THIS caller may connect this method "Only me" (a personal key nobody else in the
495
+ * account can use): the platform allows it, the tenant's AI-key policy does, and the method takes
496
+ * a plain key. Absent otherwise; the connect modal then offers no ownership choice.
497
+ */
498
+ userScope?: boolean;
488
499
  }
489
500
  /** Public summary of a stored connection — never carries the credential. */
490
501
  /** The display meta the server inlines on each {@link ConnectionSummary} (`app`). */
@@ -501,6 +512,8 @@ export interface ConnectionSummary {
501
512
  authKey: string;
502
513
  /** The stored credential this connection uses, when it has one. */
503
514
  credentialId?: string | null;
515
+ /** Who may use it: `"user"` = only its creator. Absent (an older server) means the account. */
516
+ accessScope?: "account" | "user";
504
517
  /** The owning tenant. The server sends `tenant`/`subject`, never `owner`. */
505
518
  tenant?: string;
506
519
  /** The owning subject (the partner's user id). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w6w/ui",
3
- "version": "0.2.62",
3
+ "version": "0.2.64",
4
4
  "description": "React components for w6w — central API management. Build plugins, apps and integrations on them.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://w6w.io",
@@ -72,7 +72,7 @@
72
72
  "@codemirror/state": "^6.5.0",
73
73
  "@codemirror/view": "^6.35.0",
74
74
  "@uiw/react-codemirror": "^4.23.7",
75
- "@w6w/expr": "^0.1.3",
75
+ "@w6w/expr": "^0.1.4",
76
76
  "@xyflow/react": "^12.3.6",
77
77
  "prism-react-renderer": "^2.4.1",
78
78
  "react-markdown": "^10.1.0",
@@ -21,6 +21,7 @@
21
21
  .w6w-connection-cell-name {
22
22
  display: inline-flex;
23
23
  align-items: center;
24
+ flex-wrap: wrap;
24
25
  gap: var(--w6w-sp-2);
25
26
  }
26
27
  .w6w-connection-row-actions {
@@ -190,6 +191,48 @@
190
191
  white-space: nowrap;
191
192
  }
192
193
 
194
+ /* AddConnectionModal: "Advanced" — collapsed options (who can use the connection). */
195
+ .w6w-advanced {
196
+ font-size: var(--w6w-fs-sm);
197
+ }
198
+ .w6w-advanced-toggle {
199
+ display: inline-flex;
200
+ align-items: center;
201
+ gap: var(--w6w-sp-1);
202
+ padding: 0;
203
+ border: 0;
204
+ background: none;
205
+ color: var(--w6w-accent);
206
+ font: inherit;
207
+ font-weight: var(--w6w-fw-medium);
208
+ cursor: pointer;
209
+ }
210
+ .w6w-advanced-toggle::before {
211
+ content: "▸";
212
+ font-size: var(--w6w-fs-xs);
213
+ }
214
+ .w6w-advanced-toggle[aria-expanded="true"]::before {
215
+ content: "▾";
216
+ }
217
+ .w6w-advanced-panel {
218
+ display: flex;
219
+ flex-direction: column;
220
+ gap: var(--w6w-sp-2);
221
+ margin-top: var(--w6w-sp-2);
222
+ padding: var(--w6w-sp-3) var(--w6w-sp-4);
223
+ border-radius: var(--w6w-radius);
224
+ background: var(--w6w-panel-2);
225
+ }
226
+ .w6w-advanced-label {
227
+ font-weight: var(--w6w-fw-medium);
228
+ }
229
+ .w6w-advanced-panel .w6w-radio {
230
+ display: flex;
231
+ align-items: baseline;
232
+ gap: var(--w6w-sp-2);
233
+ cursor: pointer;
234
+ }
235
+
193
236
  /* AuthFieldsForm: a pasted key file, read back as its fields (secret parts masked). */
194
237
  .w6w-keyfile {
195
238
  display: flex;
@@ -44,7 +44,7 @@
44
44
  }
45
45
  .w6w-data-columns-colhead {
46
46
  font-size: var(--w6w-fs-xs);
47
- font-weight: 500;
47
+ font-weight: var(--w6w-fw-medium);
48
48
  color: var(--w6w-muted);
49
49
  }
50
50
  .w6w-data-columns-error {
@@ -58,11 +58,13 @@
58
58
  .w6w-data-entries-toolbar {
59
59
  display: flex;
60
60
  align-items: center;
61
+ flex-wrap: wrap;
61
62
  gap: var(--w6w-sp-2);
62
- margin: var(--w6w-sp-3) 0;
63
+ margin: var(--w6w-sp-4) 0;
63
64
  }
64
65
  .w6w-data-entries-toolbar input[type="search"] {
65
66
  flex: 1;
67
+ min-width: 8rem;
66
68
  max-width: 20rem;
67
69
  /* Same box as `.w6w-field` inputs — no host page styles a bare search input. */
68
70
  background: var(--w6w-panel-2);
@@ -77,12 +79,29 @@
77
79
  outline: none;
78
80
  border-color: var(--w6w-accent);
79
81
  }
82
+ .w6w-data-entry-new {
83
+ margin-inline-start: auto;
84
+ }
80
85
  /* Entries open a viewer. Keep the list quiet and bounded, even for long keys or JSON. */
81
86
  .w6w-data-entry-list {
82
87
  table-layout: fixed;
83
88
  }
84
- .w6w-data-entry-key,
89
+ .w6w-data-entry-list td {
90
+ vertical-align: top;
91
+ padding-block: var(--w6w-sp-3);
92
+ }
85
93
  .w6w-data-entry-preview {
94
+ display: -webkit-box;
95
+ -webkit-box-orient: vertical;
96
+ -webkit-line-clamp: 4;
97
+ overflow: hidden;
98
+ white-space: pre-wrap;
99
+ overflow-wrap: anywhere;
100
+ font-family: var(--w6w-font-mono);
101
+ font-size: var(--w6w-fs-sm);
102
+ line-height: var(--w6w-lh-normal);
103
+ }
104
+ .w6w-data-entry-key {
86
105
  display: block;
87
106
  width: 100%;
88
107
  overflow: hidden;
@@ -100,6 +119,10 @@
100
119
  text-align: left;
101
120
  cursor: pointer;
102
121
  }
122
+ .w6w-data-entry-key:hover {
123
+ color: var(--w6w-accent);
124
+ text-decoration: underline;
125
+ }
103
126
  .w6w-data-entry-key:focus-visible {
104
127
  outline: 2px solid var(--w6w-accent);
105
128
  outline-offset: 2px;
@@ -21,7 +21,8 @@
21
21
  .w6w-data-table td {
22
22
  border-right: 1px solid var(--w6w-border);
23
23
  border-bottom: 1px solid var(--w6w-border);
24
- padding: var(--w6w-sp-2) var(--w6w-sp-3);
24
+ padding: var(--w6w-sp-1-5) var(--w6w-sp-2-5);
25
+ line-height: 1.35;
25
26
  text-align: left;
26
27
  vertical-align: middle;
27
28
  }
@@ -45,8 +46,44 @@
45
46
  .w6w-data-table:not(:has(tbody tr)) th {
46
47
  border-bottom: 0;
47
48
  }
49
+ /* Density: cells use the scale's small step, the header a muted label one step smaller, and the
50
+ meta lines inside a cell (`.small`, `.muted.small`, `.w6w-small`) one step smaller than the cell.
51
+ One padding rule for th and td (above) keeps the rhythm uniform. */
52
+ .w6w-data-table td {
53
+ font-size: var(--w6w-fs-sm);
54
+ }
48
55
  .w6w-data-table th {
49
56
  color: var(--w6w-muted);
57
+ font-size: var(--w6w-fs-xs);
58
+ font-weight: 500;
59
+ }
60
+ .w6w-data-table td .small,
61
+ .w6w-data-table td .w6w-small,
62
+ .w6w-data-table td small {
63
+ font-size: var(--w6w-fs-xs);
64
+ }
65
+ /* Actions column (`DataTableColumn.actions`): as narrow as its buttons, never wrapping, right-aligned
66
+ and vertically centred. `width: 1%` makes the auto-layout column shrink to its content. */
67
+ .w6w-data-table th.w6w-data-table-actions,
68
+ .w6w-data-table td.w6w-data-table-actions {
69
+ width: 1%;
70
+ white-space: nowrap;
71
+ text-align: right;
72
+ vertical-align: middle;
73
+ padding-top: var(--w6w-sp-1);
74
+ padding-bottom: var(--w6w-sp-1);
75
+ }
76
+ .w6w-data-table-actions-row {
77
+ display: flex;
78
+ align-items: center;
79
+ justify-content: flex-end;
80
+ gap: var(--w6w-sp-1-5);
81
+ }
82
+ /* A message inside the actions cell (a row's conflict or error) still wraps, at a readable width. */
83
+ .w6w-data-table td.w6w-data-table-actions .w6w-error {
84
+ white-space: normal;
85
+ text-align: left;
86
+ min-width: 14rem;
50
87
  }
51
88
  .w6w-data-table-row-clickable {
52
89
  cursor: pointer;
package/src/styles.css CHANGED
@@ -6622,7 +6622,8 @@ button.w6w-rel-open:focus-visible strong {
6622
6622
  .w6w-data-table td {
6623
6623
  border-right: 1px solid var(--w6w-border);
6624
6624
  border-bottom: 1px solid var(--w6w-border);
6625
- padding: var(--w6w-sp-2) var(--w6w-sp-3);
6625
+ padding: var(--w6w-sp-1-5) var(--w6w-sp-2-5);
6626
+ line-height: 1.35;
6626
6627
  text-align: left;
6627
6628
  vertical-align: middle;
6628
6629
  }
@@ -6651,8 +6652,49 @@ button.w6w-rel-open:focus-visible strong {
6651
6652
  border-bottom: 0;
6652
6653
  }
6653
6654
 
6655
+ /* Density: cells use the scale's small step, the header a muted label one step smaller, and the
6656
+ meta lines inside a cell (`.small`, `.muted.small`, `.w6w-small`) one step smaller than the cell.
6657
+ One padding rule for th and td (above) keeps the rhythm uniform. */
6658
+ .w6w-data-table td {
6659
+ font-size: var(--w6w-fs-sm);
6660
+ }
6661
+
6654
6662
  .w6w-data-table th {
6655
6663
  color: var(--w6w-muted);
6664
+ font-size: var(--w6w-fs-xs);
6665
+ font-weight: 500;
6666
+ }
6667
+
6668
+ .w6w-data-table td .small,
6669
+ .w6w-data-table td .w6w-small,
6670
+ .w6w-data-table td small {
6671
+ font-size: var(--w6w-fs-xs);
6672
+ }
6673
+
6674
+ /* Actions column (`DataTableColumn.actions`): as narrow as its buttons, never wrapping, right-aligned
6675
+ and vertically centred. `width: 1%` makes the auto-layout column shrink to its content. */
6676
+ .w6w-data-table th.w6w-data-table-actions,
6677
+ .w6w-data-table td.w6w-data-table-actions {
6678
+ width: 1%;
6679
+ white-space: nowrap;
6680
+ text-align: right;
6681
+ vertical-align: middle;
6682
+ padding-top: var(--w6w-sp-1);
6683
+ padding-bottom: var(--w6w-sp-1);
6684
+ }
6685
+
6686
+ .w6w-data-table-actions-row {
6687
+ display: flex;
6688
+ align-items: center;
6689
+ justify-content: flex-end;
6690
+ gap: var(--w6w-sp-1-5);
6691
+ }
6692
+
6693
+ /* A message inside the actions cell (a row's conflict or error) still wraps, at a readable width. */
6694
+ .w6w-data-table td.w6w-data-table-actions .w6w-error {
6695
+ white-space: normal;
6696
+ text-align: left;
6697
+ min-width: 14rem;
6656
6698
  }
6657
6699
 
6658
6700
  .w6w-data-table-row-clickable {
@@ -6696,6 +6738,7 @@ button.w6w-rel-open:focus-visible strong {
6696
6738
  .w6w-connection-cell-name {
6697
6739
  display: inline-flex;
6698
6740
  align-items: center;
6741
+ flex-wrap: wrap;
6699
6742
  gap: var(--w6w-sp-2);
6700
6743
  }
6701
6744
 
@@ -6906,6 +6949,54 @@ button.w6w-rel-open:focus-visible strong {
6906
6949
  white-space: nowrap;
6907
6950
  }
6908
6951
 
6952
+ /* AddConnectionModal: "Advanced" — collapsed options (who can use the connection). */
6953
+ .w6w-advanced {
6954
+ font-size: var(--w6w-fs-sm);
6955
+ }
6956
+
6957
+ .w6w-advanced-toggle {
6958
+ display: inline-flex;
6959
+ align-items: center;
6960
+ gap: var(--w6w-sp-1);
6961
+ padding: 0;
6962
+ border: 0;
6963
+ background: none;
6964
+ color: var(--w6w-accent);
6965
+ font: inherit;
6966
+ font-weight: var(--w6w-fw-medium);
6967
+ cursor: pointer;
6968
+ }
6969
+
6970
+ .w6w-advanced-toggle::before {
6971
+ content: "▸";
6972
+ font-size: var(--w6w-fs-xs);
6973
+ }
6974
+
6975
+ .w6w-advanced-toggle[aria-expanded=true]::before {
6976
+ content: "▾";
6977
+ }
6978
+
6979
+ .w6w-advanced-panel {
6980
+ display: flex;
6981
+ flex-direction: column;
6982
+ gap: var(--w6w-sp-2);
6983
+ margin-top: var(--w6w-sp-2);
6984
+ padding: var(--w6w-sp-3) var(--w6w-sp-4);
6985
+ border-radius: var(--w6w-radius);
6986
+ background: var(--w6w-panel-2);
6987
+ }
6988
+
6989
+ .w6w-advanced-label {
6990
+ font-weight: var(--w6w-fw-medium);
6991
+ }
6992
+
6993
+ .w6w-advanced-panel .w6w-radio {
6994
+ display: flex;
6995
+ align-items: baseline;
6996
+ gap: var(--w6w-sp-2);
6997
+ cursor: pointer;
6998
+ }
6999
+
6909
7000
  /* AuthFieldsForm: a pasted key file, read back as its fields (secret parts masked). */
6910
7001
  .w6w-keyfile {
6911
7002
  display: flex;
@@ -7031,7 +7122,7 @@ button.w6w-rel-open:focus-visible strong {
7031
7122
 
7032
7123
  .w6w-data-columns-colhead {
7033
7124
  font-size: var(--w6w-fs-xs);
7034
- font-weight: 500;
7125
+ font-weight: var(--w6w-fw-medium);
7035
7126
  color: var(--w6w-muted);
7036
7127
  }
7037
7128
 
@@ -7048,12 +7139,14 @@ button.w6w-rel-open:focus-visible strong {
7048
7139
  .w6w-data-entries-toolbar {
7049
7140
  display: flex;
7050
7141
  align-items: center;
7142
+ flex-wrap: wrap;
7051
7143
  gap: var(--w6w-sp-2);
7052
- margin: var(--w6w-sp-3) 0;
7144
+ margin: var(--w6w-sp-4) 0;
7053
7145
  }
7054
7146
 
7055
7147
  .w6w-data-entries-toolbar input[type=search] {
7056
7148
  flex: 1;
7149
+ min-width: 8rem;
7057
7150
  max-width: 20rem;
7058
7151
  /* Same box as `.w6w-field` inputs — no host page styles a bare search input. */
7059
7152
  background: var(--w6w-panel-2);
@@ -7070,13 +7163,33 @@ button.w6w-rel-open:focus-visible strong {
7070
7163
  border-color: var(--w6w-accent);
7071
7164
  }
7072
7165
 
7166
+ .w6w-data-entry-new {
7167
+ margin-inline-start: auto;
7168
+ }
7169
+
7073
7170
  /* Entries open a viewer. Keep the list quiet and bounded, even for long keys or JSON. */
7074
7171
  .w6w-data-entry-list {
7075
7172
  table-layout: fixed;
7076
7173
  }
7077
7174
 
7078
- .w6w-data-entry-key,
7175
+ .w6w-data-entry-list td {
7176
+ vertical-align: top;
7177
+ padding-block: var(--w6w-sp-3);
7178
+ }
7179
+
7079
7180
  .w6w-data-entry-preview {
7181
+ display: -webkit-box;
7182
+ -webkit-box-orient: vertical;
7183
+ -webkit-line-clamp: 4;
7184
+ overflow: hidden;
7185
+ white-space: pre-wrap;
7186
+ overflow-wrap: anywhere;
7187
+ font-family: var(--w6w-font-mono);
7188
+ font-size: var(--w6w-fs-sm);
7189
+ line-height: var(--w6w-lh-normal);
7190
+ }
7191
+
7192
+ .w6w-data-entry-key {
7080
7193
  display: block;
7081
7194
  width: 100%;
7082
7195
  overflow: hidden;
@@ -7096,6 +7209,11 @@ button.w6w-rel-open:focus-visible strong {
7096
7209
  cursor: pointer;
7097
7210
  }
7098
7211
 
7212
+ .w6w-data-entry-key:hover {
7213
+ color: var(--w6w-accent);
7214
+ text-decoration: underline;
7215
+ }
7216
+
7099
7217
  .w6w-data-entry-key:focus-visible {
7100
7218
  outline: 2px solid var(--w6w-accent);
7101
7219
  outline-offset: 2px;