@ai-matrx/content-ir-react 0.20.0 → 0.20.2

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 (43) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +1 -1
  3. package/dist/{component-resolution.types-DwKSF64x.d.cts → component-resolution.types-BQa2ik3i.d.cts} +1 -1
  4. package/dist/{component-resolution.types-DwKSF64x.d.ts → component-resolution.types-BQa2ik3i.d.ts} +1 -1
  5. package/dist/{component-resolution.types-DY4pGymy.d.cts → component-resolution.types-C_irCaHc.d.cts} +1 -1
  6. package/dist/{component-resolution.types-DY4pGymy.d.ts → component-resolution.types-C_irCaHc.d.ts} +1 -1
  7. package/dist/db-component.d.cts +1 -1
  8. package/dist/db-component.d.ts +1 -1
  9. package/dist/{directive-host-B1hcjJxS.d.cts → directive-host-CtFMuSZc.d.cts} +7 -0
  10. package/dist/{directive-host-B1hcjJxS.d.ts → directive-host-CtFMuSZc.d.ts} +7 -0
  11. package/dist/directives.cjs +13 -8
  12. package/dist/directives.cjs.map +1 -1
  13. package/dist/directives.d.cts +2 -2
  14. package/dist/directives.d.ts +2 -2
  15. package/dist/directives.js +13 -8
  16. package/dist/directives.js.map +1 -1
  17. package/dist/{host-types-BOWu99zI.d.ts → host-types-CGcK8Nib.d.ts} +2 -2
  18. package/dist/{host-types-Cn2lf8q3.d.cts → host-types-mMFt5-hQ.d.cts} +2 -2
  19. package/dist/host.cjs.map +1 -1
  20. package/dist/host.d.cts +4 -4
  21. package/dist/host.d.ts +4 -4
  22. package/dist/host.js.map +1 -1
  23. package/dist/index.cjs +13 -8
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +5 -5
  26. package/dist/index.d.ts +5 -5
  27. package/dist/index.js +13 -8
  28. package/dist/index.js.map +1 -1
  29. package/dist/react.cjs +13 -8
  30. package/dist/react.cjs.map +1 -1
  31. package/dist/react.d.cts +4 -4
  32. package/dist/react.d.ts +4 -4
  33. package/dist/react.js +13 -8
  34. package/dist/react.js.map +1 -1
  35. package/dist/resolver.d.cts +2 -2
  36. package/dist/resolver.d.ts +2 -2
  37. package/dist/{route-DVfjdUYy.d.cts → route-Bq6db_zH.d.cts} +9 -2
  38. package/dist/{route-CDATmjfp.d.ts → route-DStinBoZ.d.ts} +9 -2
  39. package/dist/route.cjs.map +1 -1
  40. package/dist/route.d.cts +2 -2
  41. package/dist/route.d.ts +2 -2
  42. package/dist/route.js.map +1 -1
  43. package/package.json +1 -1
package/dist/react.d.cts CHANGED
@@ -1,9 +1,9 @@
1
- import { c as KindDefinitionSource, C as ContentIrHost } from './host-types-Cn2lf8q3.cjs';
2
- import { d as ComponentResolutionSource } from './component-resolution.types-DwKSF64x.cjs';
1
+ import { c as KindDefinitionSource, C as ContentIrHost } from './host-types-mMFt5-hQ.cjs';
2
+ import { d as ComponentResolutionSource } from './component-resolution.types-BQa2ik3i.cjs';
3
3
  import * as react from 'react';
4
4
  import react__default, { ReactNode } from 'react';
5
5
  import '@ai-matrx/content-ir';
6
- import './directive-host-B1hcjJxS.cjs';
6
+ import './directive-host-CtFMuSZc.cjs';
7
7
 
8
8
  /**
9
9
  * The two registries this hook watches. Passed explicitly by a host whose
@@ -87,7 +87,7 @@ declare function KindInstanceRender(props: KindInstanceRenderProps): react.JSX.E
87
87
  /**
88
88
  * The safety net + the "still arriving" affordance for a provisional kind
89
89
  * render (streaming partial kinds — see `route/partial-kind-route.ts` and
90
- * `common-docs/systems/architecture/content-ir/STREAMING_PARTIAL_KINDS.md`).
90
+ * `common-docs/systems/architecture/content-ir/FEATURE.md`).
91
91
  *
92
92
  * TWO JOBS
93
93
  * --------
package/dist/react.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { c as KindDefinitionSource, C as ContentIrHost } from './host-types-BOWu99zI.js';
2
- import { d as ComponentResolutionSource } from './component-resolution.types-DwKSF64x.js';
1
+ import { c as KindDefinitionSource, C as ContentIrHost } from './host-types-CGcK8Nib.js';
2
+ import { d as ComponentResolutionSource } from './component-resolution.types-BQa2ik3i.js';
3
3
  import * as react from 'react';
4
4
  import react__default, { ReactNode } from 'react';
5
5
  import '@ai-matrx/content-ir';
6
- import './directive-host-B1hcjJxS.js';
6
+ import './directive-host-CtFMuSZc.js';
7
7
 
8
8
  /**
9
9
  * The two registries this hook watches. Passed explicitly by a host whose
@@ -87,7 +87,7 @@ declare function KindInstanceRender(props: KindInstanceRenderProps): react.JSX.E
87
87
  /**
88
88
  * The safety net + the "still arriving" affordance for a provisional kind
89
89
  * render (streaming partial kinds — see `route/partial-kind-route.ts` and
90
- * `common-docs/systems/architecture/content-ir/STREAMING_PARTIAL_KINDS.md`).
90
+ * `common-docs/systems/architecture/content-ir/FEATURE.md`).
91
91
  *
92
92
  * TWO JOBS
93
93
  * --------
package/dist/react.js CHANGED
@@ -627,7 +627,7 @@ function ApplyDirectiveButton({
627
627
  type: "button",
628
628
  disabled: askingAgain,
629
629
  onClick: () => void handleApply(!bad),
630
- className: "inline-flex items-center gap-1 rounded px-1 py-0.5 text-muted-foreground hover:bg-accent hover:text-accent-foreground disabled:opacity-50",
630
+ className: "inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded px-1 py-0.5 text-muted-foreground hover:bg-accent hover:text-accent-foreground disabled:opacity-50",
631
631
  "data-apply-action": bad ? "retry" : "run-again",
632
632
  children: [
633
633
  /* @__PURE__ */ jsx4(RotateCcwIcon, { className: "h-3 w-3" }),
@@ -667,8 +667,8 @@ function ApplyDirectiveButton({
667
667
  }
668
668
  const destructive = directive.directiveClass === "delete";
669
669
  const muted = nothingToChange && view.status === "idle";
670
- return /* @__PURE__ */ jsxs2("span", { className: "inline-flex items-center gap-2", children: [
671
- muted ? /* @__PURE__ */ jsx4("span", { className: "text-xs text-muted-foreground", "data-apply-nothing": "", children: "Nothing to change" }) : null,
670
+ return /* @__PURE__ */ jsxs2("span", { className: "flex min-w-0 flex-wrap items-center justify-end gap-x-2 gap-y-1", children: [
671
+ muted ? /* @__PURE__ */ jsx4("span", { className: "min-w-0 text-xs text-muted-foreground", "data-apply-nothing": "", children: "Nothing to change" }) : null,
672
672
  /* @__PURE__ */ jsxs2(
673
673
  "button",
674
674
  {
@@ -677,7 +677,7 @@ function ApplyDirectiveButton({
677
677
  disabled: view.status === "applying" || view.status === "asking" || items.length === 0,
678
678
  "data-apply-tone": muted ? "muted" : destructive ? "destructive" : "default",
679
679
  title: muted ? "It sets no fields, so applying it changes nothing." : void 0,
680
- className: `inline-flex items-center gap-1 rounded-md border px-2 py-1 text-xs font-medium disabled:opacity-50 ${muted ? "border-border/60 bg-background text-muted-foreground hover:bg-accent" : destructive ? "border-destructive/50 bg-background text-destructive hover:bg-destructive/10" : "border-border bg-background hover:bg-accent"}`,
680
+ className: `inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-md border px-2 py-1 text-xs font-medium disabled:opacity-50 ${muted ? "border-border/60 bg-background text-muted-foreground hover:bg-accent" : destructive ? "border-destructive/50 bg-background text-destructive hover:bg-destructive/10" : "border-border bg-background hover:bg-accent"}`,
681
681
  children: [
682
682
  view.status === "applying" ? /* @__PURE__ */ jsx4(LoaderIcon, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx4(PlayIcon, { className: "h-3.5 w-3.5" }),
683
683
  view.status === "applying" ? `Applying${itemCount ? ` ${itemCount} ${itemCount === 1 ? "item" : "items"}` : ""}\u2026${elapsed ? ` ${elapsed}s` : ""}` : label
@@ -728,7 +728,7 @@ function FailureNotice({
728
728
  type: "button",
729
729
  onClick: () => setOpen((v) => !v),
730
730
  "aria-expanded": open,
731
- className: "ml-1 underline underline-offset-2 hover:no-underline",
731
+ className: "ml-1 whitespace-nowrap underline underline-offset-2 hover:no-underline",
732
732
  "data-apply-failure-details-toggle": true,
733
733
  children: open ? "Hide details" : "Details"
734
734
  }
@@ -970,7 +970,12 @@ function TargetRow({
970
970
  return /* @__PURE__ */ jsxs5("div", { className: "py-1 text-xs", "data-directive-target": recordId, children: [
971
971
  /* @__PURE__ */ jsxs5("div", { className: "flex min-w-0 items-center gap-2", children: [
972
972
  /* @__PURE__ */ jsx7("span", { className: "flex min-w-0 flex-1 items-center gap-1 px-1", children: name }),
973
- host.renderCopy?.({ label: fallback, value: item, size: "xs" })
973
+ host.renderCopy?.({
974
+ label: `this ${nounLabel2(directive.noun, host.nouns).toLowerCase()}`,
975
+ value: item,
976
+ size: "xs",
977
+ record: { noun: directive.noun, id: recordId }
978
+ })
974
979
  ] }),
975
980
  isUpdate ? /* @__PURE__ */ jsx7(DirectiveChangeList, { changes, className: "mt-0.5 px-1" }) : null
976
981
  ] });
@@ -998,7 +1003,7 @@ function SideEffectDirectiveCard({ directive }) {
998
1003
  " ",
999
1004
  total === 1 ? "item" : "items"
1000
1005
  ] }),
1001
- /* @__PURE__ */ jsxs5("div", { className: "ml-auto flex items-center gap-1", children: [
1006
+ /* @__PURE__ */ jsxs5("div", { className: "ml-auto flex min-w-0 flex-wrap items-center justify-end gap-1", children: [
1002
1007
  host.renderCopy?.({ label: display.title, value: directive.shell, size: "icon" }),
1003
1008
  /* @__PURE__ */ jsx7(
1004
1009
  ApplyDirectiveButton,
@@ -1020,7 +1025,7 @@ function SideEffectDirectiveCard({ directive }) {
1020
1025
  {
1021
1026
  type: "button",
1022
1027
  onClick: () => setExpanded((v) => !v),
1023
- className: "mt-0.5 inline-flex items-center gap-1 rounded px-1 py-0.5 text-[11px] text-muted-foreground hover:text-foreground",
1028
+ className: "mt-0.5 inline-flex items-center gap-1 whitespace-nowrap rounded px-1 py-0.5 text-[11px] text-muted-foreground hover:text-foreground",
1024
1029
  children: [
1025
1030
  expanded ? /* @__PURE__ */ jsx7(ChevronDownIcon, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx7(ChevronRightIcon, { className: "h-3 w-3" }),
1026
1031
  expanded ? "Show less" : `Show ${hidden} more`