@poodle64/ui 2026.10.7 → 2026.10.8

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.
@@ -427,6 +427,7 @@
427
427
 
428
428
  const money = (value: number | string) => ledgerMoney(value, currency, locale);
429
429
  const number = (n: number) => n.toLocaleString(locale);
430
+ const titleColumn = $derived(resolved.find((c) => c.key === 'title'));
430
431
  const count = (n: number) => `${number(n)} ${n === 1 ? noun[0] : noun[1]}`;
431
432
  const income = (value: number | string | null | undefined) => cents(value) > 0;
432
433
  /** Green for money in; a conversion is neither in nor out, so plain. */
@@ -500,6 +501,7 @@
500
501
  {#if c.key === 'date'}
501
502
  <span class={cn(CELL, through, 'text-muted-foreground self-center tabular-nums')} {style}>
502
503
  {ledgerDate(r.date, WIDE)}
504
+ {#if c.actions}<span class="pointer-events-auto flex flex-none items-center gap-1" data-slot="ledger-actions">{@render c.actions(r)}</span>{/if}
503
505
  </span>
504
506
  {:else if c.key === 'title'}
505
507
  <span
@@ -514,6 +516,7 @@
514
516
  <span class="min-w-0 truncate">{r.title}</span>
515
517
  {#if r.attachment}{@render clip(r)}{/if}
516
518
  {@render chip(r)}
519
+ {#if c.actions}<span class="pointer-events-auto flex flex-none items-center gap-1" data-slot="ledger-actions">{@render c.actions(r)}</span>{/if}
517
520
  </span>
518
521
  {#if r.note || r.origins}
519
522
  <span class="text-muted-foreground flex min-w-0 items-center gap-2 text-xs font-normal">
@@ -535,18 +538,22 @@
535
538
  data-slot="ledger-amount"
536
539
  >
537
540
  {money(r.amount)}
541
+ {#if c.actions}<span class="pointer-events-auto flex flex-none items-center gap-1" data-slot="ledger-actions">{@render c.actions(r)}</span>{/if}
538
542
  </span>
539
543
  {:else if c.key === 'balance'}
540
544
  <span class={cn(CELL, END, through, 'self-center tabular-nums')} {style}
541
- >{balanceText(r)}</span
545
+ >{balanceText(r)}
546
+ {#if c.actions}<span class="pointer-events-auto flex flex-none items-center gap-1" data-slot="ledger-actions">{@render c.actions(r)}</span>{/if}</span
542
547
  >
543
548
  {:else if c.cell}
544
549
  <span class={cn(CELL, through, 'flex items-center self-center')} {style}
545
- >{@render c.cell(r)}</span
550
+ >{@render c.cell(r)}
551
+ {#if c.actions}<span class="pointer-events-auto flex flex-none items-center gap-1" data-slot="ledger-actions">{@render c.actions(r)}</span>{/if}</span
546
552
  >
547
553
  {:else}
548
554
  <span class={cn(CELL, through, 'self-center', c.align === 'end' && END)} {style}>
549
555
  {c.text?.(r) ?? ''}
556
+ {#if c.actions}<span class="pointer-events-auto flex flex-none items-center gap-1" data-slot="ledger-actions">{@render c.actions(r)}</span>{/if}
550
557
  </span>
551
558
  {/if}
552
559
  {/each}
@@ -661,6 +668,7 @@
661
668
  <span class="min-w-0 truncate font-medium">{r.title}</span>
662
669
  {#if r.attachment}{@render clip(r)}{/if}
663
670
  {@render chip(r)}
671
+ {#if titleColumn?.actions}<span class="pointer-events-auto flex flex-none items-center gap-1" data-slot="ledger-actions">{@render titleColumn.actions(r)}</span>{/if}
664
672
  </span>
665
673
  {#if two || r.origins}
666
674
  <span class="text-muted-foreground flex min-w-0 items-center gap-2 text-xs">
@@ -88,7 +88,15 @@ export interface ListColumn<R> {
88
88
  * order; the balance is always last, and off until ticked. Every other key is
89
89
  * the module's, in its order.
90
90
  */
91
- export type LedgerColumn<R extends LedgerRow = LedgerRow> = ListColumn<R>;
91
+ export interface LedgerColumn<R extends LedgerRow = LedgerRow> extends ListColumn<R> {
92
+ /**
93
+ * Controls after the column's value in each row, the ledger's own cells
94
+ * included: a payee's "Show only / Hide". Drawn `pointer-events-auto`, so
95
+ * a click lands on a control and not on the row; on a phone, only the
96
+ * title's are drawn, after its chips.
97
+ */
98
+ actions?: Snippet<[R]>;
99
+ }
92
100
  /** The viewer's own choices, which the consumer persists. */
93
101
  export interface LedgerPreferences {
94
102
  /** The ticked columns' keys, `balance` included. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poodle64/ui",
3
- "version": "2026.10.7",
3
+ "version": "2026.10.8",
4
4
  "description": "Household shared component layer: shadcn-svelte primitives (bits-ui) plus the composed page chrome every app builds its routes from, restyled by each app's @poodle64/design-tokens alias layer. One fix reaches every app.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "package": "@poodle64/ui",
4
- "version": "2026.10.7",
4
+ "version": "2026.10.8",
5
5
  "generatedBy": "scripts/generate-registry.mjs",
6
6
  "source": "scripts/situations.json + package source (DO NOT EDIT the outputs by hand)",
7
7
  "componentCount": 67,
@@ -1,7 +1,7 @@
1
1
  # @poodle64/ui — situation → component map
2
2
 
3
3
  <!-- GENERATED by scripts/generate-registry.mjs from scripts/situations.json + package source. DO NOT EDIT. -->
4
- Generated from `@poodle64/ui@2026.10.7`. 67 components, 18 situations.
4
+ Generated from `@poodle64/ui@2026.10.8`. 67 components, 18 situations.
5
5
 
6
6
  **Read this before writing a `<div>`.** Find the SITUATION you are in below, then compose the component named for it — do not hand-build it from raw `Card` or utility classes. Import is `import { Name } from '<import path>'`. Props marked `?` are optional. This map is the retrieval step the [`frontend-design` skill] makes mandatory; the [CHI 2026 study] measured composing-from-a-registry at 95% design-system compliance against 71% for writing the CSS from a prose style guide.
7
7