@heyramzi/ui 2.16.1 → 2.18.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyramzi/ui",
3
- "version": "2.16.1",
3
+ "version": "2.18.0",
4
4
  "description": "Svelte 5 UI for apps: primitives, effects and animations, plus work (tasks and docs), charts, slides, an editor, onboarding and a canvas as subpaths.",
5
5
  "homepage": "https://ui.heyramzi.com",
6
6
  "license": "MIT",
@@ -25,6 +25,8 @@ One comment thread for any subject: a task, a project, a doc or a diagram. The t
25
25
  - **Anchor.** `anchor` carries `{ nodeId, dx, dy, x, y }` for a canvas pin. A pinned comment shows a chip, and `onAnchor` fires on a click so the canvas can move to the node. `anchorChip` replaces the chip.
26
26
  - **Attachments.** The `attachments` snippet draws under a comment's body.
27
27
  - **Events.** `events` takes `ThreadEvent`s (a whole sentence, a time, an optional Phosphor icon) and draws each as one `Trace` line between the conversations, in time order. `whenEvent(event)` formats its time. `interleave(nodes, events)` gives the same order without the component.
28
+ - **Footer.** `footer` draws above the composer, such as an agent's question waiting on an answer. `onPost` decides where a root post goes.
29
+ - **Heading.** `heading={false}` keeps the title for screen readers only, for a thread its tab already names.
28
30
  - **Long bodies.** A body over 6 lines folds behind `showMore` and `showLess`.
29
31
  - **Labels.** Every string comes from `labels`, a partial of `ThreadLabels`. `showResolved` holds a `{count}` slot. `when(comment)` formats the time.
30
32
 
@@ -48,6 +48,8 @@
48
48
  canEdit?: (comment: ThreadComment) => boolean;
49
49
  /** False hides the visible title, for a thread already named by its tab. Screen readers still get it. */
50
50
  heading?: boolean;
51
+ /** Drawn above the composer, such as a question waiting on an answer. */
52
+ footer?: Snippet;
51
53
  class?: string;
52
54
  }
53
55
 
@@ -69,6 +71,7 @@
69
71
  onAnchor,
70
72
  canEdit = () => false,
71
73
  heading = true,
74
+ footer,
72
75
  class: className,
73
76
  }: Props = $props();
74
77
 
@@ -356,6 +359,8 @@
356
359
  <p class="text-[13px] text-muted-foreground">{labels.empty}</p>
357
360
  {/if}
358
361
 
362
+ {@render footer?.()}
363
+
359
364
  {#if onPost}
360
365
  {@render composer(draft, labels.placeholder, sendRoot, (next) => (draft = next), false)}
361
366
  {/if}