@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/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- import { C as ComponentResolutionSource, a as ComponentResolution, b as ContentIrErrorReporter } from './component-resolution.types-DY4pGymy.cjs';
2
- export { c as ComponentRole, d as ContentIrErrorReport, J as JsonObject, K as KindComponentRow, S as SystemComponentEntry, e as consoleErrorReporter } from './component-resolution.types-DY4pGymy.cjs';
3
- import { C as ContentIrHost, K as KindRouteEnv, a as KindDefinitionSource, D as DirectiveHost, b as DirectiveFailure, c as DirectiveFailureWords, d as DirectiveRecordRef } from './route-DVfjdUYy.cjs';
4
- export { e as ContentIrRenderSeams, f as DB_KIND_COMPONENT_KEY, g as DIRECTIVE_BLOCK_TYPE, h as DirectiveApplyResult, i as DirectiveApplyState, j as DirectiveAskRequest, k as DirectiveCopyProps, l as DirectiveHostProvider, m as DirectiveHostProviderProps, n as DirectiveOpenItemOptions, o as DirectiveRecordProps, p as DirectiveScope, q as DirectiveScopeProvider, r as DirectiveShell, s as DirectiveValueRef, G as GENERIC_STRUCTURED_COMPONENT_KEY, t as GenericFallbackReason, I as IR_PROVISIONAL_KEY, u as IR_ROUTE_KEY, v as IrRenderBlock, w as IrRoutableBlock, x as IrRouteMarker, y as KindRouteBinding, z as KindRouteOptions, P as PartialRenderOptions, A as ProvisionalKindRender, S as StructuredValueRenderProps, B as SupersededKindRender, E as applyIrKindRoute, F as createKindRouteBinding, H as envelopeFromPartialKind, J as isPartialReadyKind, L as isProvisionalBlock, M as kindServerDataFromStoredValue, N as markKindPartialUnsafe, O as readIrRouteMarker, Q as resetPartialUnsafeKinds, R as resetSourcelessDbRowReports, T as resolveAnnouncedKindLoading, U as resolveProvisionalKindRender, V as resolveSupersededKindRender, W as routeEnvOf, X as useDirectiveHost, Y as useDirectiveScope } from './route-DVfjdUYy.cjs';
1
+ import { C as ComponentResolutionSource, a as ComponentResolution, b as ContentIrErrorReporter } from './component-resolution.types-C_irCaHc.cjs';
2
+ export { c as ComponentRole, d as ContentIrErrorReport, J as JsonObject, K as KindComponentRow, S as SystemComponentEntry, e as consoleErrorReporter } from './component-resolution.types-C_irCaHc.cjs';
3
+ import { C as ContentIrHost, K as KindRouteEnv, a as KindDefinitionSource, D as DirectiveHost, b as DirectiveFailure, c as DirectiveFailureWords, d as DirectiveRecordRef } from './route-Bq6db_zH.cjs';
4
+ export { e as ContentIrRenderSeams, f as DB_KIND_COMPONENT_KEY, g as DIRECTIVE_BLOCK_TYPE, h as DirectiveApplyResult, i as DirectiveApplyState, j as DirectiveAskRequest, k as DirectiveCopyProps, l as DirectiveHostProvider, m as DirectiveHostProviderProps, n as DirectiveOpenItemOptions, o as DirectiveRecordProps, p as DirectiveScope, q as DirectiveScopeProvider, r as DirectiveShell, s as DirectiveValueRef, G as GENERIC_STRUCTURED_COMPONENT_KEY, t as GenericFallbackReason, I as IR_PROVISIONAL_KEY, u as IR_ROUTE_KEY, v as IrRenderBlock, w as IrRoutableBlock, x as IrRouteMarker, y as KindRouteBinding, z as KindRouteOptions, P as PartialRenderOptions, A as ProvisionalKindRender, S as StructuredValueRenderProps, B as SupersededKindRender, E as applyIrKindRoute, F as createKindRouteBinding, H as envelopeFromPartialKind, J as isPartialReadyKind, L as isProvisionalBlock, M as kindServerDataFromStoredValue, N as markKindPartialUnsafe, O as readIrRouteMarker, Q as resetPartialUnsafeKinds, R as resetSourcelessDbRowReports, T as resolveAnnouncedKindLoading, U as resolveProvisionalKindRender, V as resolveSupersededKindRender, W as routeEnvOf, X as useDirectiveHost, Y as useDirectiveScope } from './route-Bq6db_zH.cjs';
5
5
  import * as react from 'react';
6
6
  import react__default, { ReactNode, ComponentType } from 'react';
7
7
  export { ComponentResolver, ComponentResolverOptions } from './resolver.cjs';
@@ -105,7 +105,7 @@ declare function KindInstanceRender(props: KindInstanceRenderProps): react.JSX.E
105
105
  /**
106
106
  * The safety net + the "still arriving" affordance for a provisional kind
107
107
  * render (streaming partial kinds — see `route/partial-kind-route.ts` and
108
- * `common-docs/systems/architecture/content-ir/STREAMING_PARTIAL_KINDS.md`).
108
+ * `common-docs/systems/architecture/content-ir/FEATURE.md`).
109
109
  *
110
110
  * TWO JOBS
111
111
  * --------
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { C as ComponentResolutionSource, a as ComponentResolution, b as ContentIrErrorReporter } from './component-resolution.types-DY4pGymy.js';
2
- export { c as ComponentRole, d as ContentIrErrorReport, J as JsonObject, K as KindComponentRow, S as SystemComponentEntry, e as consoleErrorReporter } from './component-resolution.types-DY4pGymy.js';
3
- import { C as ContentIrHost, K as KindRouteEnv, a as KindDefinitionSource, D as DirectiveHost, b as DirectiveFailure, c as DirectiveFailureWords, d as DirectiveRecordRef } from './route-CDATmjfp.js';
4
- export { e as ContentIrRenderSeams, f as DB_KIND_COMPONENT_KEY, g as DIRECTIVE_BLOCK_TYPE, h as DirectiveApplyResult, i as DirectiveApplyState, j as DirectiveAskRequest, k as DirectiveCopyProps, l as DirectiveHostProvider, m as DirectiveHostProviderProps, n as DirectiveOpenItemOptions, o as DirectiveRecordProps, p as DirectiveScope, q as DirectiveScopeProvider, r as DirectiveShell, s as DirectiveValueRef, G as GENERIC_STRUCTURED_COMPONENT_KEY, t as GenericFallbackReason, I as IR_PROVISIONAL_KEY, u as IR_ROUTE_KEY, v as IrRenderBlock, w as IrRoutableBlock, x as IrRouteMarker, y as KindRouteBinding, z as KindRouteOptions, P as PartialRenderOptions, A as ProvisionalKindRender, S as StructuredValueRenderProps, B as SupersededKindRender, E as applyIrKindRoute, F as createKindRouteBinding, H as envelopeFromPartialKind, J as isPartialReadyKind, L as isProvisionalBlock, M as kindServerDataFromStoredValue, N as markKindPartialUnsafe, O as readIrRouteMarker, Q as resetPartialUnsafeKinds, R as resetSourcelessDbRowReports, T as resolveAnnouncedKindLoading, U as resolveProvisionalKindRender, V as resolveSupersededKindRender, W as routeEnvOf, X as useDirectiveHost, Y as useDirectiveScope } from './route-CDATmjfp.js';
1
+ import { C as ComponentResolutionSource, a as ComponentResolution, b as ContentIrErrorReporter } from './component-resolution.types-C_irCaHc.js';
2
+ export { c as ComponentRole, d as ContentIrErrorReport, J as JsonObject, K as KindComponentRow, S as SystemComponentEntry, e as consoleErrorReporter } from './component-resolution.types-C_irCaHc.js';
3
+ import { C as ContentIrHost, K as KindRouteEnv, a as KindDefinitionSource, D as DirectiveHost, b as DirectiveFailure, c as DirectiveFailureWords, d as DirectiveRecordRef } from './route-DStinBoZ.js';
4
+ export { e as ContentIrRenderSeams, f as DB_KIND_COMPONENT_KEY, g as DIRECTIVE_BLOCK_TYPE, h as DirectiveApplyResult, i as DirectiveApplyState, j as DirectiveAskRequest, k as DirectiveCopyProps, l as DirectiveHostProvider, m as DirectiveHostProviderProps, n as DirectiveOpenItemOptions, o as DirectiveRecordProps, p as DirectiveScope, q as DirectiveScopeProvider, r as DirectiveShell, s as DirectiveValueRef, G as GENERIC_STRUCTURED_COMPONENT_KEY, t as GenericFallbackReason, I as IR_PROVISIONAL_KEY, u as IR_ROUTE_KEY, v as IrRenderBlock, w as IrRoutableBlock, x as IrRouteMarker, y as KindRouteBinding, z as KindRouteOptions, P as PartialRenderOptions, A as ProvisionalKindRender, S as StructuredValueRenderProps, B as SupersededKindRender, E as applyIrKindRoute, F as createKindRouteBinding, H as envelopeFromPartialKind, J as isPartialReadyKind, L as isProvisionalBlock, M as kindServerDataFromStoredValue, N as markKindPartialUnsafe, O as readIrRouteMarker, Q as resetPartialUnsafeKinds, R as resetSourcelessDbRowReports, T as resolveAnnouncedKindLoading, U as resolveProvisionalKindRender, V as resolveSupersededKindRender, W as routeEnvOf, X as useDirectiveHost, Y as useDirectiveScope } from './route-DStinBoZ.js';
5
5
  import * as react from 'react';
6
6
  import react__default, { ReactNode, ComponentType } from 'react';
7
7
  export { ComponentResolver, ComponentResolverOptions } from './resolver.js';
@@ -105,7 +105,7 @@ declare function KindInstanceRender(props: KindInstanceRenderProps): react.JSX.E
105
105
  /**
106
106
  * The safety net + the "still arriving" affordance for a provisional kind
107
107
  * render (streaming partial kinds — see `route/partial-kind-route.ts` and
108
- * `common-docs/systems/architecture/content-ir/STREAMING_PARTIAL_KINDS.md`).
108
+ * `common-docs/systems/architecture/content-ir/FEATURE.md`).
109
109
  *
110
110
  * TWO JOBS
111
111
  * --------
package/dist/index.js CHANGED
@@ -1289,7 +1289,7 @@ function ApplyDirectiveButton({
1289
1289
  type: "button",
1290
1290
  disabled: askingAgain,
1291
1291
  onClick: () => void handleApply(!bad),
1292
- 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",
1292
+ 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",
1293
1293
  "data-apply-action": bad ? "retry" : "run-again",
1294
1294
  children: [
1295
1295
  /* @__PURE__ */ jsx4(RotateCcwIcon, { className: "h-3 w-3" }),
@@ -1329,8 +1329,8 @@ function ApplyDirectiveButton({
1329
1329
  }
1330
1330
  const destructive = directive.directiveClass === "delete";
1331
1331
  const muted = nothingToChange && view.status === "idle";
1332
- return /* @__PURE__ */ jsxs2("span", { className: "inline-flex items-center gap-2", children: [
1333
- muted ? /* @__PURE__ */ jsx4("span", { className: "text-xs text-muted-foreground", "data-apply-nothing": "", children: "Nothing to change" }) : null,
1332
+ return /* @__PURE__ */ jsxs2("span", { className: "flex min-w-0 flex-wrap items-center justify-end gap-x-2 gap-y-1", children: [
1333
+ muted ? /* @__PURE__ */ jsx4("span", { className: "min-w-0 text-xs text-muted-foreground", "data-apply-nothing": "", children: "Nothing to change" }) : null,
1334
1334
  /* @__PURE__ */ jsxs2(
1335
1335
  "button",
1336
1336
  {
@@ -1339,7 +1339,7 @@ function ApplyDirectiveButton({
1339
1339
  disabled: view.status === "applying" || view.status === "asking" || items.length === 0,
1340
1340
  "data-apply-tone": muted ? "muted" : destructive ? "destructive" : "default",
1341
1341
  title: muted ? "It sets no fields, so applying it changes nothing." : void 0,
1342
- 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"}`,
1342
+ 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"}`,
1343
1343
  children: [
1344
1344
  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" }),
1345
1345
  view.status === "applying" ? `Applying${itemCount ? ` ${itemCount} ${itemCount === 1 ? "item" : "items"}` : ""}\u2026${elapsed ? ` ${elapsed}s` : ""}` : label
@@ -1390,7 +1390,7 @@ function FailureNotice({
1390
1390
  type: "button",
1391
1391
  onClick: () => setOpen((v) => !v),
1392
1392
  "aria-expanded": open,
1393
- className: "ml-1 underline underline-offset-2 hover:no-underline",
1393
+ className: "ml-1 whitespace-nowrap underline underline-offset-2 hover:no-underline",
1394
1394
  "data-apply-failure-details-toggle": true,
1395
1395
  children: open ? "Hide details" : "Details"
1396
1396
  }
@@ -1640,7 +1640,12 @@ function TargetRow({
1640
1640
  return /* @__PURE__ */ jsxs5("div", { className: "py-1 text-xs", "data-directive-target": recordId, children: [
1641
1641
  /* @__PURE__ */ jsxs5("div", { className: "flex min-w-0 items-center gap-2", children: [
1642
1642
  /* @__PURE__ */ jsx7("span", { className: "flex min-w-0 flex-1 items-center gap-1 px-1", children: name }),
1643
- host.renderCopy?.({ label: fallback, value: item, size: "xs" })
1643
+ host.renderCopy?.({
1644
+ label: `this ${nounLabel2(directive.noun, host.nouns).toLowerCase()}`,
1645
+ value: item,
1646
+ size: "xs",
1647
+ record: { noun: directive.noun, id: recordId }
1648
+ })
1644
1649
  ] }),
1645
1650
  isUpdate ? /* @__PURE__ */ jsx7(DirectiveChangeList, { changes, className: "mt-0.5 px-1" }) : null
1646
1651
  ] });
@@ -1668,7 +1673,7 @@ function SideEffectDirectiveCard({ directive }) {
1668
1673
  " ",
1669
1674
  total === 1 ? "item" : "items"
1670
1675
  ] }),
1671
- /* @__PURE__ */ jsxs5("div", { className: "ml-auto flex items-center gap-1", children: [
1676
+ /* @__PURE__ */ jsxs5("div", { className: "ml-auto flex min-w-0 flex-wrap items-center justify-end gap-1", children: [
1672
1677
  host.renderCopy?.({ label: display.title, value: directive.shell, size: "icon" }),
1673
1678
  /* @__PURE__ */ jsx7(
1674
1679
  ApplyDirectiveButton,
@@ -1690,7 +1695,7 @@ function SideEffectDirectiveCard({ directive }) {
1690
1695
  {
1691
1696
  type: "button",
1692
1697
  onClick: () => setExpanded((v) => !v),
1693
- className: "mt-0.5 inline-flex items-center gap-1 rounded px-1 py-0.5 text-[11px] text-muted-foreground hover:text-foreground",
1698
+ 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",
1694
1699
  children: [
1695
1700
  expanded ? /* @__PURE__ */ jsx7(ChevronDownIcon, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx7(ChevronRightIcon, { className: "h-3 w-3" }),
1696
1701
  expanded ? "Show less" : `Show ${hidden} more`