meowtail 0.3.0-alpha.0 → 0.4.0-alpha.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.
Files changed (95) hide show
  1. package/AGENT-COMPONENTS.md +2 -1
  2. package/ASSISTANT.md +2 -1
  3. package/JSON.md +1 -1
  4. package/README.md +6 -5
  5. package/dist/src/chat/assistant-composer.js +8 -7
  6. package/dist/src/chat/assistant-content.d.ts +2 -1
  7. package/dist/src/chat/assistant-content.js +3 -2
  8. package/dist/src/chat/assistant-markdown.d.ts +2 -1
  9. package/dist/src/chat/assistant-markdown.js +2 -1
  10. package/dist/src/chat/assistant-question.d.ts +2 -1
  11. package/dist/src/chat/assistant-question.js +5 -4
  12. package/dist/src/chat/assistant-types.d.ts +2 -1
  13. package/dist/src/chat/assistant.js +6 -5
  14. package/dist/src/chat/attachments.d.ts +2 -1
  15. package/dist/src/chat/attachments.js +2 -1
  16. package/dist/src/chat/composer.d.ts +2 -1
  17. package/dist/src/chat/composer.js +2 -1
  18. package/dist/src/chat/conversation.js +2 -1
  19. package/dist/src/chat/reasoning.d.ts +2 -1
  20. package/dist/src/chat/reasoning.js +2 -1
  21. package/dist/src/chat/task.d.ts +2 -1
  22. package/dist/src/chat/task.js +2 -1
  23. package/dist/src/chat/tool-call.d.ts +2 -1
  24. package/dist/src/chat/tool-call.js +2 -1
  25. package/dist/src/components/accordion.d.ts +2 -1
  26. package/dist/src/components/accordion.js +3 -2
  27. package/dist/src/components/avatar.js +2 -1
  28. package/dist/src/components/checkbox.d.ts +2 -1
  29. package/dist/src/components/checkbox.js +2 -1
  30. package/dist/src/components/choice-group.d.ts +2 -1
  31. package/dist/src/components/choice-group.js +3 -2
  32. package/dist/src/components/choice-select.d.ts +2 -1
  33. package/dist/src/components/choice-select.js +7 -6
  34. package/dist/src/components/code-block.d.ts +2 -1
  35. package/dist/src/components/code-block.js +6 -5
  36. package/dist/src/components/context-menu.d.ts +2 -1
  37. package/dist/src/components/context-menu.js +3 -2
  38. package/dist/src/components/disclosure.d.ts +2 -1
  39. package/dist/src/components/drawer.d.ts +2 -1
  40. package/dist/src/components/drawer.js +2 -1
  41. package/dist/src/components/field.d.ts +2 -1
  42. package/dist/src/components/field.js +2 -1
  43. package/dist/src/components/hover-card.js +3 -2
  44. package/dist/src/components/icon-button.d.ts +2 -1
  45. package/dist/src/components/icon-rail.d.ts +2 -1
  46. package/dist/src/components/icon-rail.js +2 -1
  47. package/dist/src/components/image-preview.js +3 -2
  48. package/dist/src/components/json-block.js +2 -1
  49. package/dist/src/components/json-tree.js +3 -2
  50. package/dist/src/components/menu-button.d.ts +2 -1
  51. package/dist/src/components/menu.d.ts +2 -1
  52. package/dist/src/components/menu.js +4 -3
  53. package/dist/src/components/mermaid-diagram.d.ts +2 -1
  54. package/dist/src/components/mermaid-diagram.js +6 -5
  55. package/dist/src/components/meta-row.d.ts +2 -1
  56. package/dist/src/components/meta-row.js +2 -1
  57. package/dist/src/components/modal.d.ts +2 -1
  58. package/dist/src/components/modal.js +2 -1
  59. package/dist/src/components/nav-item.d.ts +2 -1
  60. package/dist/src/components/nav-item.js +2 -1
  61. package/dist/src/components/nav-list.d.ts +2 -1
  62. package/dist/src/components/nav-list.js +2 -1
  63. package/dist/src/components/number-input.d.ts +2 -1
  64. package/dist/src/components/number-input.js +5 -4
  65. package/dist/src/components/output-block.d.ts +2 -1
  66. package/dist/src/components/output-block.js +4 -3
  67. package/dist/src/components/path-picker.d.ts +2 -1
  68. package/dist/src/components/path-picker.js +4 -3
  69. package/dist/src/components/pill.d.ts +2 -1
  70. package/dist/src/components/pill.js +2 -1
  71. package/dist/src/components/popover.d.ts +2 -1
  72. package/dist/src/components/popover.js +3 -2
  73. package/dist/src/components/progress.d.ts +2 -1
  74. package/dist/src/components/read-block.js +2 -1
  75. package/dist/src/components/risk-confirmation.d.ts +2 -1
  76. package/dist/src/components/risk-confirmation.js +2 -1
  77. package/dist/src/components/search-input.d.ts +2 -1
  78. package/dist/src/components/segmented-control.d.ts +2 -1
  79. package/dist/src/components/segmented-control.js +2 -1
  80. package/dist/src/components/select.d.ts +2 -1
  81. package/dist/src/components/skeleton-boundary.d.ts +2 -1
  82. package/dist/src/components/skeleton-boundary.js +3 -2
  83. package/dist/src/components/slider.d.ts +2 -1
  84. package/dist/src/components/slider.js +3 -2
  85. package/dist/src/components/table.d.ts +2 -1
  86. package/dist/src/components/table.js +5 -4
  87. package/dist/src/components/tabs.d.ts +2 -1
  88. package/dist/src/components/tabs.js +4 -3
  89. package/dist/src/components/task-list.d.ts +2 -1
  90. package/dist/src/components/task-list.js +2 -1
  91. package/dist/src/components/text-shimmer.d.ts +2 -1
  92. package/dist/src/components/text-shimmer.js +2 -1
  93. package/dist/src/components/tooltip.js +2 -1
  94. package/dist/src/components/work-card.d.ts +2 -1
  95. package/package.json +6 -6
@@ -1,4 +1,5 @@
1
- import { type Child, type MaybeSignal } from "meowjsx";
1
+ import { type Child } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  import { type ButtonProps } from "./button.js";
3
4
  import { type MenuEntry } from "./menu.js";
4
5
  export interface MenuButtonProps extends Omit<ButtonProps, "id" | "onClick"> {
@@ -1,4 +1,5 @@
1
- import { type Child, type MaybeSignal, type Props, type Context } from "meowjsx";
1
+ import { type Child, type Props, type Context } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  import { type PopoverTriggerBindings } from "./popover.js";
3
4
  export interface MenuAction {
4
5
  id: string;
@@ -1,10 +1,11 @@
1
- import { h, unwrap } from "meowjsx";
1
+ import { h } from "meowjsx";
2
+ import { signal, unwrap } from "meowjsx/signal";
2
3
  import { Popover } from "./popover.js";
3
4
  import { Icon } from "../icons/icon.js";
4
5
  import { activeElementInRoot, elementByIdInRoot } from "../shared/dom-root.js";
5
6
  /** A list of actions in a popover, with keyboard navigation and nested submenus. */
6
7
  export function Menu({ id, trigger, items, open, onOpenChange, align, className, placement = "bottom", closeAncestors, anchorRect, anchorElement, }, context) {
7
- const local = context.signal(false);
8
+ const local = signal(false);
8
9
  const state = open !== undefined ? open : local;
9
10
  let root;
10
11
  let search = "";
@@ -37,7 +38,7 @@ export function Menu({ id, trigger, items, open, onOpenChange, align, className,
37
38
  item.shortcut ? (h("span", { "aria-hidden": "true", ref: [context.parts.shortcut] }, item.shortcut)) : null,
38
39
  ];
39
40
  if (item.children) {
40
- const childOpen = context.signal(false);
41
+ const childOpen = signal(false);
41
42
  let timer;
42
43
  const clear = () => {
43
44
  clearTimeout(timer);
@@ -1,4 +1,5 @@
1
- import { type Child, type MaybeSignal, type Props, type Context } from "meowjsx";
1
+ import { type Child, type Props, type Context } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  /** Bounds on what one diagram may cost; rendering is synchronous on the main thread. */
3
4
  export interface MermaidDiagramLimits {
4
5
  /** Longest source accepted, in characters. */
@@ -1,4 +1,5 @@
1
- import { derived, h, unwrap, } from "meowjsx";
1
+ import { h } from "meowjsx";
2
+ import { derived, signal, unwrap } from "meowjsx/signal";
2
3
  import { Button } from "./button.js";
3
4
  import { copyTextToClipboard } from "../clipboard.js";
4
5
  /** A header part appears only when its prop has content; a Signal counts as provided. */
@@ -12,10 +13,10 @@ function provided(value) {
12
13
  */
13
14
  export function MermaidDiagram({ source, title, caption, actions, zoom = "auto", limits, onCopy, ...props }, context) {
14
15
  // "source" until the first drawing lands, so server output and slow loads read as text.
15
- const state = context.signal("source");
16
- const errorText = context.signal("");
17
- const copying = context.signal(false);
18
- const feedback = context.signal("");
16
+ const state = signal("source");
17
+ const errorText = signal("");
18
+ const copying = signal(false);
19
+ const feedback = signal("");
19
20
  const options = {
20
21
  links: false,
21
22
  images: false,
@@ -1,5 +1,6 @@
1
1
  import { type ThemedProps } from "meowcss/meowjsx";
2
- import { type Child, type MaybeSignal, type Props, type Context } from "meowjsx";
2
+ import { type Child, type Props, type Context } from "meowjsx";
3
+ import { type MaybeSignal } from "meowjsx/signal";
3
4
  import { metaRowOptions } from "./meta-row.options.js";
4
5
  export { metaRowOptions } from "./meta-row.options.js";
5
6
  export interface MetaItem {
@@ -1,5 +1,6 @@
1
1
  import { defineStyleProps } from "meowcss/meowjsx";
2
- import { derived, h, keyed, unwrap, } from "meowjsx";
2
+ import { h, keyed } from "meowjsx";
3
+ import { derived, unwrap } from "meowjsx/signal";
3
4
  import { metaRowOptions } from "./meta-row.options.js";
4
5
  export { metaRowOptions } from "./meta-row.options.js";
5
6
  /**
@@ -1,4 +1,5 @@
1
- import { type Child, type MaybeSignal, type Props, type Context } from "meowjsx";
1
+ import { type Child, type Props, type Context } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  export interface ModalProps extends Props {
3
4
  /** Required; the host owns the state. A Signal keeps the dialog in sync after mount. */
4
5
  open: MaybeSignal<boolean>;
@@ -1,4 +1,5 @@
1
- import { h, unwrap } from "meowjsx";
1
+ import { h } from "meowjsx";
2
+ import { unwrap } from "meowjsx/signal";
2
3
  import { activeElementInRoot } from "../shared/dom-root.js";
3
4
  import { Icon } from "../icons/icon.js";
4
5
  import { Dialog, DialogActions, DialogHeader, DialogPanel } from "./dialog.js";
@@ -1,4 +1,5 @@
1
- import { type Child, type MaybeSignal, type Props, type Context } from "meowjsx";
1
+ import { type Child, type Props, type Context } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  export interface NavItemProps extends Props {
3
4
  label: Child;
4
5
  icon?: Child;
@@ -1,4 +1,5 @@
1
- import { h, derived, unwrap, } from "meowjsx";
1
+ import { h } from "meowjsx";
2
+ import { derived, unwrap } from "meowjsx/signal";
2
3
  /**
3
4
  * One navigation entry: an icon, a label and an optional badge, marked when it is the current
4
5
  * location.
@@ -1,4 +1,5 @@
1
- import { type Child, type MaybeSignal, type Props, type Context } from "meowjsx";
1
+ import { type Child, type Props, type Context } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  export interface NavListItem {
3
4
  id: string;
4
5
  label: Child;
@@ -1,4 +1,5 @@
1
- import { derived, h, isSignal, unwrap, } from "meowjsx";
1
+ import { h } from "meowjsx";
2
+ import { derived, isSignal, unwrap } from "meowjsx/signal";
2
3
  /** True when a slot was given; `false` and `null` mean the slot is omitted. */
3
4
  function hasSlot(slot) {
4
5
  return slot !== undefined && slot !== null && slot !== false;
@@ -1,4 +1,5 @@
1
- import { type MaybeSignal, type Props, type Context } from "meowjsx";
1
+ import { type Props, type Context } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  export interface NumberInputProps extends Props {
3
4
  value?: MaybeSignal<number | undefined>;
4
5
  defaultValue?: number;
@@ -1,4 +1,5 @@
1
- import { derived, h, unwrap } from "meowjsx";
1
+ import { h } from "meowjsx";
2
+ import { derived, signal, unwrap } from "meowjsx/signal";
2
3
  import { Icon } from "../icons/icon.js";
3
4
  export function numberPrecision(step, precision) {
4
5
  if (precision !== undefined)
@@ -37,11 +38,11 @@ export function NumberInput({ value, defaultValue, min, max, step = 1, precision
37
38
  const lower = min ?? Number.NEGATIVE_INFINITY;
38
39
  const upper = max ?? Number.POSITIVE_INFINITY;
39
40
  const origin = Number.isFinite(lower) ? lower : 0;
40
- const local = context.signal(value === undefined ? defaultValue : unwrap(value));
41
+ const local = signal(value === undefined ? defaultValue : unwrap(value));
41
42
  const current = value !== undefined ? value : local;
42
43
  const readValue = () => unwrap(current);
43
- const editing = context.signal(false);
44
- const draft = context.signal("");
44
+ const editing = signal(false);
45
+ const draft = signal("");
45
46
  const formatted = (next) => next === undefined ? "" : formatNumber(next, places);
46
47
  const text = derived(() => (editing.value ? draft.value : formatted(readValue())));
47
48
  const assign = (next) => {
@@ -1,4 +1,5 @@
1
- import { type Child, type Props, type MaybeSignal, type Context } from "meowjsx";
1
+ import { type Child, type Props, type Context } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  export interface OutputBlockProps extends Props {
3
4
  title: Child;
4
5
  rows: MaybeSignal<readonly Child[]>;
@@ -1,4 +1,5 @@
1
- import { derived, h, unwrap, } from "meowjsx";
1
+ import { h } from "meowjsx";
2
+ import { derived, signal, unwrap } from "meowjsx/signal";
2
3
  import { copyTextToClipboard } from "../clipboard.js";
3
4
  /** A display cap hides only the middle; copying always uses the complete payload. */
4
5
  export function outputWindow(length, maxLines = 16) {
@@ -8,8 +9,8 @@ export function outputWindow(length, maxLines = 16) {
8
9
  return { head, tail, hidden: Math.max(0, length - limit) };
9
10
  }
10
11
  export function OutputBlock({ title, rows, copyText, maxLines, wrap = false, emptyText = "No content", onCopy, ref, ...props }, context) {
11
- const feedback = context.signal("");
12
- const busy = context.signal(false);
12
+ const feedback = signal("");
13
+ const busy = signal(false);
13
14
  let disposed = false;
14
15
  context.onCleanup(() => {
15
16
  disposed = true;
@@ -1,4 +1,5 @@
1
- import { type MaybeSignal, type Props, type Context } from "meowjsx";
1
+ import { type Props, type Context } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  export interface PathPickerProps extends Props {
3
4
  label: string;
4
5
  value: MaybeSignal<string>;
@@ -1,4 +1,5 @@
1
- import { batch, derived, h, unwrap } from "meowjsx";
1
+ import { h } from "meowjsx";
2
+ import { batch, derived, signal, unwrap } from "meowjsx/signal";
2
3
  import { Button } from "./button.js";
3
4
  import { Input } from "./input.js";
4
5
  const messages = {
@@ -9,8 +10,8 @@ const messages = {
9
10
  };
10
11
  /** Controlled path editing with an optional host-owned chooser. */
11
12
  export function PathPicker({ label, value, onValueChange, onChoose, kind = "file", disabled = false, readOnly = false, className, children: _children, ...props }, context) {
12
- const pending = context.signal(false);
13
- const feedback = context.signal("");
13
+ const pending = signal(false);
14
+ const feedback = signal("");
14
15
  const locked = derived(() => unwrap(readOnly) || pending.value);
15
16
  const buttonDisabled = derived(() => unwrap(disabled) || unwrap(readOnly) || pending.value);
16
17
  const buttonLabel = derived(() => (pending.value ? messages.pending : messages[kind]));
@@ -1,4 +1,5 @@
1
- import { type MaybeSignal, type Props, type Context } from "meowjsx";
1
+ import { type Props, type Context } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  export interface PillProps extends Props {
3
4
  active?: MaybeSignal<boolean>;
4
5
  className?: Props["className"];
@@ -1,4 +1,5 @@
1
- import { derived, unwrap, h } from "meowjsx";
1
+ import { h } from "meowjsx";
2
+ import { derived, unwrap } from "meowjsx/signal";
2
3
  /** A capsule fact, or a native button when supplied an action. Selection belongs to its caller. */
3
4
  export function Pill({ active = false, onClick, children, ref, ...props }, context) {
4
5
  const selected = derived(() => String(unwrap(active)));
@@ -1,4 +1,5 @@
1
- import { type Child, type MaybeSignal, type Props, type Context } from "meowjsx";
1
+ import { type Child, type Props, type Context } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  export interface PopoverTriggerBindings {
3
4
  id: string;
4
5
  "aria-controls": string;
@@ -1,4 +1,5 @@
1
- import { derived, isSignal, unwrap, h, } from "meowjsx";
1
+ import { h } from "meowjsx";
2
+ import { derived, isSignal, signal, unwrap } from "meowjsx/signal";
2
3
  import { autoUpdate, computePosition, offset, flip, shift, size } from "@floating-ui/dom";
3
4
  import { activeElementInRoot, elementByIdInRoot } from "../shared/dom-root.js";
4
5
  // Opening order, rather than DOM order, determines which nested layer dismisses.
@@ -6,7 +7,7 @@ const layers = new WeakMap();
6
7
  const dismissedEvents = new WeakSet();
7
8
  /** A floating panel anchored to a trigger, in the top layer. */
8
9
  export function Popover({ id, triggerId = `${id}-trigger`, trigger, open, defaultOpen = false, onOpenChange, matchTriggerWidth = false, align = "start", placement = "bottom", anchorRect, anchorElement, role, labelledBy, onKeyDown, children, className, }, context) {
9
- const local = context.signal(defaultOpen);
10
+ const local = signal(defaultOpen);
10
11
  // A signal object is controlled even when its current value is false.
11
12
  const state = open !== undefined ? open : local;
12
13
  const expanded = derived(() => String(unwrap(state)));
@@ -1,4 +1,5 @@
1
- import { type MaybeSignal, type Props, type Context } from "meowjsx";
1
+ import { type Props, type Context } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  export interface ProgressProps extends Props {
3
4
  /** Accessible name. Spinner remains the wait with no known amount. */
4
5
  label: MaybeSignal<string>;
@@ -1,4 +1,5 @@
1
1
  import { h } from "meowjsx";
2
+ import { signal } from "meowjsx/signal";
2
3
  import { OutputBlock } from "./output-block.js";
3
4
  import { highlightCode } from "../syntax-highlight.js";
4
5
  /** Split an already highlighted window without restarting its grammar per row. */
@@ -17,7 +18,7 @@ export function readHighlightLines(spans) {
17
18
  /** Displays a supplied file window; never opens the named path. */
18
19
  export function ReadBlock({ label = "File content", lines, totalLines, lang, maxLines, onCopy, ...props }, context) {
19
20
  const raw = lines.map((line) => line.text).join("\n");
20
- const content = lines.map((line) => context.signal(line.text || "\u200b"));
21
+ const content = lines.map((line) => signal(line.text || "\u200b"));
21
22
  let disposed = false;
22
23
  context.onCleanup(() => {
23
24
  disposed = true;
@@ -1,4 +1,5 @@
1
- import { type MaybeSignal, type Props, type Context } from "meowjsx";
1
+ import { type Props, type Context } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  export interface RiskConfirmationProps extends Props {
3
4
  id: string;
4
5
  open: MaybeSignal<boolean>;
@@ -1,4 +1,5 @@
1
- import { derived, h, isSignal, unwrap } from "meowjsx";
1
+ import { h } from "meowjsx";
2
+ import { derived, isSignal, unwrap } from "meowjsx/signal";
2
3
  import { Dialog, DialogPanel, DialogHeader, DialogActions } from "./dialog.js";
3
4
  import { Checkbox } from "./checkbox.js";
4
5
  import { Button } from "./button.js";
@@ -1,4 +1,5 @@
1
- import { type MaybeSignal, type Props, type Context } from "meowjsx";
1
+ import { type Props, type Context } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  export interface SearchInputProps extends Props {
3
4
  /** Accessible name; placeholder text is only a hint. */
4
5
  label: string;
@@ -1,4 +1,5 @@
1
- import { type MaybeSignal, type Props, type Context } from "meowjsx";
1
+ import { type Props, type Context } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  export interface SegmentedControlOption {
3
4
  value: string;
4
5
  label: string;
@@ -1,4 +1,5 @@
1
- import { derived, unwrap, h } from "meowjsx";
1
+ import { h } from "meowjsx";
2
+ import { derived, unwrap } from "meowjsx/signal";
2
3
  /** A single choice, using native radio keyboard semantics; tabs remain a separate component. */
3
4
  export function SegmentedControl({ id, name = id, form, label, value, options, onValueChange, disabled, className, }, context) {
4
5
  const inputs = new Map();
@@ -1,4 +1,5 @@
1
- import { type Props, type MaybeSignal, type Context } from "meowjsx";
1
+ import { type Props, type Context } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  /** Native options, selection, keyboard interaction and form behavior. */
3
4
  export interface SelectProps extends Props {
4
5
  value?: MaybeSignal<string>;
@@ -1,4 +1,5 @@
1
- import { type MaybeSignal, type Props, type Context } from "meowjsx";
1
+ import { type Props, type Context } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  export interface SkeletonBoundaryProps extends Props {
3
4
  active: MaybeSignal<boolean>;
4
5
  label: string;
@@ -1,4 +1,5 @@
1
- import { derived, unwrap, h } from "meowjsx";
1
+ import { h } from "meowjsx";
2
+ import { derived, signal, unwrap } from "meowjsx/signal";
2
3
  import { createSkeletonController, useWebObservation } from "meowjsx/web";
3
4
  /**
4
5
  * Shows skeletons in place of a region while it loads. Loading presentation preserves the mounted
@@ -6,7 +7,7 @@ import { createSkeletonController, useWebObservation } from "meowjsx/web";
6
7
  */
7
8
  export function SkeletonBoundary({ active, label, children, ...props }, context) {
8
9
  const observation = useWebObservation();
9
- const mounted = context.signal(null);
10
+ const mounted = signal(null);
10
11
  const busy = derived(() => unwrap(active));
11
12
  const busyAttribute = derived(() => String(unwrap(active)));
12
13
  const announcement = derived(() => (unwrap(active) ? label : ""));
@@ -1,4 +1,5 @@
1
- import { type MaybeSignal, type Props, type Context } from "meowjsx";
1
+ import { type Props, type Context } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  export interface SliderProps extends Props {
3
4
  /** Accessible name for the native range control. */
4
5
  label: string;
@@ -1,4 +1,5 @@
1
- import { derived, unwrap, h } from "meowjsx";
1
+ import { h } from "meowjsx";
2
+ import { derived, signal, unwrap } from "meowjsx/signal";
2
3
  function asNumber(value, fallback) {
3
4
  const next = Number(value);
4
5
  return Number.isFinite(next) ? next : fallback;
@@ -6,7 +7,7 @@ function asNumber(value, fallback) {
6
7
  /** Native range control. The visible figure is the same value assistive technology reads. */
7
8
  export function Slider({ label, value, defaultValue, min = 0, max = 100, step = 1, disabled, name, id, onValueChange, className, onInput, ...props }, context) {
8
9
  const initial = value === undefined ? (defaultValue ?? min) : unwrap(value);
9
- const local = context.signal(initial);
10
+ const local = signal(initial);
10
11
  const current = value !== undefined ? value : local;
11
12
  const readValue = () => unwrap(current);
12
13
  const display = derived(() => String(readValue()));
@@ -1,4 +1,5 @@
1
- import { type Child, type MaybeSignal, type Props, type Context } from "meowjsx";
1
+ import { type Child, type Props, type Context } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  export { tableMinWidth } from "./table.options.js";
3
4
  export type TableSortDirection = "asc" | "desc";
4
5
  export interface TableSort {
@@ -1,4 +1,5 @@
1
- import { derived, h, keyed, unwrap, } from "meowjsx";
1
+ import { h, keyed } from "meowjsx";
2
+ import { derived, signal, unwrap } from "meowjsx/signal";
2
3
  import { Checkbox } from "./checkbox.js";
3
4
  import { Icon } from "../icons/icon.js";
4
5
  import { tableMinWidth } from "./table.options.js";
@@ -21,12 +22,12 @@ function ariaSort(column, current) {
21
22
  }
22
23
  /** Data table. Sorting and selection are reported; row order and records stay with the caller. */
23
24
  export function Table({ label, columns, rows, sort, defaultSort, onSortChange, selected, defaultSelected = [], onSelectedChange, selectable = false, className, ...props }, context) {
24
- const localSort = context.signal(defaultSort);
25
- const localSelected = context.signal(defaultSelected);
25
+ const localSort = signal(defaultSort);
26
+ const localSelected = signal(defaultSelected);
26
27
  const rowsView = derived(() => unwrap(rows));
27
28
  const sortState = derived(() => (sort === undefined ? localSort.value : unwrap(sort)));
28
29
  const selectedState = derived(() => selected === undefined ? localSelected.value : unwrap(selected));
29
- const widths = context.signal(Object.fromEntries(columns.flatMap((column) => (column.width !== undefined ? [[column.id, column.width]] : []))));
30
+ const widths = signal(Object.fromEntries(columns.flatMap((column) => (column.width !== undefined ? [[column.id, column.width]] : []))));
30
31
  const requestSort = (column) => {
31
32
  const next = sortFor(column, sortState.value);
32
33
  if (!next)
@@ -1,4 +1,5 @@
1
- import { type Child, type Context, type MaybeSignal, type Props } from "meowjsx";
1
+ import { type Child, type Context, type Props } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  export { tabsCount, tabsIndex } from "./tabs.options.js";
3
4
  export interface TabItem {
4
5
  value: string;
@@ -1,12 +1,13 @@
1
- import { derived, h, unwrap, } from "meowjsx";
1
+ import { h } from "meowjsx";
2
+ import { derived, signal, unwrap } from "meowjsx/signal";
2
3
  import { tabsCount, tabsIndex } from "./tabs.options.js";
3
4
  export { tabsCount, tabsIndex } from "./tabs.options.js";
4
5
  /** Horizontal tabs with automatic keyboard activation. Items are fixed for the mount, and panels stay mounted to preserve drafts. */
5
6
  export function Tabs({ id, label, items, value, defaultValue, onValueChange, className, children, ref, ...props }, context) {
6
7
  void children;
7
8
  const enabled = items.flatMap((item, index) => (item.disabled ? [] : [index]));
8
- const local = context.signal(defaultValue ?? items[enabled[0] ?? -1]?.value ?? "");
9
- const focus = context.signal(enabled[0] ?? -1);
9
+ const local = signal(defaultValue ?? items[enabled[0] ?? -1]?.value ?? "");
10
+ const focus = signal(enabled[0] ?? -1);
10
11
  const current = value !== undefined ? value : local;
11
12
  const activeIndex = derived(() => items.findIndex((item) => item.value === unwrap(current) && !item.disabled));
12
13
  const indicatorIndex = derived(() => Math.max(0, activeIndex.value));
@@ -1,4 +1,5 @@
1
- import { type Context, type MaybeSignal, type Props } from "meowjsx";
1
+ import { type Context, type Props } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  import { type ChatExecutionState } from "../shared/execution-state.js";
3
4
  /** Explicit host progress for the step that is running. */
4
5
  export interface TaskListProgress {
@@ -1,4 +1,5 @@
1
- import { derived, h, keyed, unwrap, } from "meowjsx";
1
+ import { h, keyed } from "meowjsx";
2
+ import { derived, unwrap } from "meowjsx/signal";
2
3
  import { Icon } from "../icons/icon.js";
3
4
  import { executionStateLabel } from "../shared/execution-state.js";
4
5
  import { Badge } from "./badge.js";
@@ -1,4 +1,5 @@
1
- import { type Child, type Context, type MaybeSignal, type Props } from "meowjsx";
1
+ import { type Child, type Context, type Props } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  export interface TextShimmerProps extends Props {
3
4
  text?: MaybeSignal<string>;
4
5
  /** Presentational fragments only: decoration duplicates them, so omit effects and element IDs. */
@@ -1,4 +1,5 @@
1
- import { createContext, derived, h, unwrap, useContext, } from "meowjsx";
1
+ import { createContext, h, useContext } from "meowjsx";
2
+ import { derived, unwrap } from "meowjsx/signal";
2
3
  const ShimmerContent = createContext(false);
3
4
  /**
4
5
  * Text with a light sweep across it, for work in progress. Nested fragments share the outer sweep;
@@ -1,8 +1,9 @@
1
1
  import { h } from "meowjsx";
2
+ import { signal } from "meowjsx/signal";
2
3
  import { Popover } from "./popover.js";
3
4
  /** Non-interactive help. Popover owns positioning, top-layer dismissal and cleanup. */
4
5
  export function Tooltip({ id, content, trigger, delay = 350, className, ref }, context) {
5
- const open = context.signal(false);
6
+ const open = signal(false);
6
7
  let timer;
7
8
  let hovered = false;
8
9
  let focused = false;
@@ -1,4 +1,5 @@
1
- import { type Child, type Context, type MaybeSignal, type Props } from "meowjsx";
1
+ import { type Child, type Context, type Props } from "meowjsx";
2
+ import { type MaybeSignal } from "meowjsx/signal";
2
3
  import { type StatusDotState } from "./status-dot.js";
3
4
  export interface WorkCardProps extends Props {
4
5
  title: Child;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meowtail",
3
- "version": "0.3.0-alpha.0",
3
+ "version": "0.4.0-alpha.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -63,13 +63,13 @@
63
63
  "shiki": "4.3.1"
64
64
  },
65
65
  "peerDependencies": {
66
- "meowjsx": "^0.2.0-alpha.0",
67
- "meowcss": "^0.2.0-alpha.0"
66
+ "meowjsx": "^0.3.0-alpha.0",
67
+ "meowcss": "^0.3.0-alpha.0"
68
68
  },
69
69
  "devDependencies": {
70
- "meowjsx": "0.2.0-alpha.0",
71
- "meowcss": "0.2.0-alpha.0",
72
- "meowbook": "0.2.0-alpha.0"
70
+ "meowjsx": "0.3.0-alpha.0",
71
+ "meowcss": "0.3.0-alpha.0",
72
+ "meowbook": "0.3.0-alpha.0"
73
73
  },
74
74
  "repository": {
75
75
  "type": "git",