@ai-matrx/content-ir-react 0.20.1 → 0.21.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 (39) hide show
  1. package/CHANGELOG.md +29 -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/directives.cjs +57 -28
  10. package/dist/directives.cjs.map +1 -1
  11. package/dist/directives.d.cts +18 -3
  12. package/dist/directives.d.ts +18 -3
  13. package/dist/directives.js +38 -10
  14. package/dist/directives.js.map +1 -1
  15. package/dist/{host-types-BpcRcZ48.d.ts → host-types-CGcK8Nib.d.ts} +1 -1
  16. package/dist/{host-types-BRLk_J_3.d.cts → host-types-mMFt5-hQ.d.cts} +1 -1
  17. package/dist/host.d.cts +3 -3
  18. package/dist/host.d.ts +3 -3
  19. package/dist/index.cjs +72 -43
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +23 -8
  22. package/dist/index.d.ts +23 -8
  23. package/dist/index.js +38 -10
  24. package/dist/index.js.map +1 -1
  25. package/dist/react.cjs +71 -44
  26. package/dist/react.cjs.map +1 -1
  27. package/dist/react.d.cts +3 -3
  28. package/dist/react.d.ts +3 -3
  29. package/dist/react.js +36 -10
  30. package/dist/react.js.map +1 -1
  31. package/dist/resolver.d.cts +2 -2
  32. package/dist/resolver.d.ts +2 -2
  33. package/dist/{route-CiCUQGAB.d.ts → route-Bq6db_zH.d.cts} +2 -2
  34. package/dist/{route-DMTBn8w4.d.cts → route-DStinBoZ.d.ts} +2 -2
  35. package/dist/route.cjs.map +1 -1
  36. package/dist/route.d.cts +2 -2
  37. package/dist/route.d.ts +2 -2
  38. package/dist/route.js.map +1 -1
  39. 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-DMTBn8w4.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-DMTBn8w4.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
  * --------
@@ -326,10 +326,25 @@ declare function directiveFieldLabel(key: string, titleColumn: string | null | u
326
326
  * fields; null → the value as stored.
327
327
  */
328
328
  type DirectiveValueWord = (field: string, value: string) => string | null;
329
+ /**
330
+ * The name a NEW item carries, or null when it has none — the one rule the card
331
+ * and a host's confirm share. `itemTitle`'s last resort ("Item", "Item 2 of 3")
332
+ * is a placeholder, never a name: a create with an empty title used to ask
333
+ * "Create project Item?" and its card row read "Item" (G10B review, 2026-10-02).
334
+ */
335
+ declare function itemOwnName(item: Record<string, unknown>, titleColumn: string | null): string | null;
336
+ /** What a nameless new item is called — said as such, never a placeholder name. */
337
+ declare const NO_TITLE_WORD = "No title";
329
338
  /** How an empty value reads — before or after, on the card and in the confirm. */
330
339
  declare const EMPTY_VALUE_WORD = "None";
331
- /** A short, honest name for a record we could not look up: "Task 1a2b3c4d". */
332
- declare function recordFallbackName(nounLabel: string, id: string): string;
340
+ /**
341
+ * What a record is called when its name cannot be read: its TYPE ("Task").
342
+ * Never its id, in any slot — text, tooltip or screen-reader label. It used to
343
+ * be "Task a8a00001", and a link to a record that no longer exists hovered
344
+ * "Open Task a8a00001" (G10B review, 2026-10-02). The host says WHY the name is
345
+ * missing (not found, no access) beside it.
346
+ */
347
+ declare function recordFallbackName(nounLabel: string): string;
333
348
  /** One value as a row reads it: shortened, the whole of it, and whether it is empty. */
334
349
  interface ChangeValue {
335
350
  value: string;
@@ -733,4 +748,4 @@ declare class DbKindComponentErrorBoundary extends react.Component<DbKindCompone
733
748
  render(): react.ReactNode;
734
749
  }
735
750
 
736
- export { ApplyDirectiveButton, type ApplyDirectiveButtonProps, CHANGE_VALUE_MAX, type ChangeValue, type CompiledDbKindComponent, ComponentResolution, ComponentResolutionSource, ContentIrErrorReporter, ContentIrHost, ContentIrRenderProvider, type ContentIrRenderProviderProps, type DbKindActionResult, type DbKindCompileResult, type DbKindComponentCache, type DbKindComponentCachePorts, type DbKindComponentCompiler, DbKindComponentErrorBoundary, type DbKindComponentErrorBoundaryProps, type DbKindComponentIncident, type DbKindComponentIncidentSink, type DbKindComponentIncidentType, type DbKindComponentRenderProps, DelegatedOutput, type DelegatedOutputProps, type DirectiveApplyPhase, DirectiveChangeList, DirectiveFailure, DirectiveFailureWords, DirectiveFallbackCard, type DirectiveFallbackCardProps, DirectiveHost, DirectiveProvisionalCard, type DirectiveProvisionalCardProps, DirectiveRecordRef, DirectiveRender, type DirectiveRenderProps, type DirectiveRenderer, type DirectiveRendererProps, type DirectiveValueWord, EMPTY_VALUE_WORD, GenericStructuredView, type GenericStructuredViewProps, type ItemChange, type ItemChangesOptions, type KindComponentUiOptions, KindDefinitionSource, KindInstanceRender, type KindInstanceRenderProps, KindRouteEnv, type KindVersionSources, NodeOutcomeView, type NodeOutcomeViewProps, ProvisionalKindBoundary, ProvisionalKindFrame, type RecordReader, type RecordValues, type RecordValuesStatus, type ResolveKindValue, type RunDbKindAction, RunResultView, type RunResultViewProps, SideEffectDirectiveCard, type SideEffectDirectiveCardProps, TARGETING_CLASSES, createDbKindComponentCache, defaultFailureWords, describeChangeValue, directiveFieldLabel, directiveValueWord, failureWords, fieldLabel, getDirectiveRenderer, isDbKindComponentBodyPending, isRecordValue, itemChanges, itemRecordId, kindIsRoutable, noteRecordChanged, provisionalDirectiveSlug, readsApplyLedger, recordFallbackName, recordRevision, registerDirectiveRenderer, resetDirectiveRenderers, useContentIrHost, useContentIrHostOrNull, useContentIrKindVersion, useKindRouteEnv, useRecordRevision, useRecordValues };
751
+ export { ApplyDirectiveButton, type ApplyDirectiveButtonProps, CHANGE_VALUE_MAX, type ChangeValue, type CompiledDbKindComponent, ComponentResolution, ComponentResolutionSource, ContentIrErrorReporter, ContentIrHost, ContentIrRenderProvider, type ContentIrRenderProviderProps, type DbKindActionResult, type DbKindCompileResult, type DbKindComponentCache, type DbKindComponentCachePorts, type DbKindComponentCompiler, DbKindComponentErrorBoundary, type DbKindComponentErrorBoundaryProps, type DbKindComponentIncident, type DbKindComponentIncidentSink, type DbKindComponentIncidentType, type DbKindComponentRenderProps, DelegatedOutput, type DelegatedOutputProps, type DirectiveApplyPhase, DirectiveChangeList, DirectiveFailure, DirectiveFailureWords, DirectiveFallbackCard, type DirectiveFallbackCardProps, DirectiveHost, DirectiveProvisionalCard, type DirectiveProvisionalCardProps, DirectiveRecordRef, DirectiveRender, type DirectiveRenderProps, type DirectiveRenderer, type DirectiveRendererProps, type DirectiveValueWord, EMPTY_VALUE_WORD, GenericStructuredView, type GenericStructuredViewProps, type ItemChange, type ItemChangesOptions, type KindComponentUiOptions, KindDefinitionSource, KindInstanceRender, type KindInstanceRenderProps, KindRouteEnv, type KindVersionSources, NO_TITLE_WORD, NodeOutcomeView, type NodeOutcomeViewProps, ProvisionalKindBoundary, ProvisionalKindFrame, type RecordReader, type RecordValues, type RecordValuesStatus, type ResolveKindValue, type RunDbKindAction, RunResultView, type RunResultViewProps, SideEffectDirectiveCard, type SideEffectDirectiveCardProps, TARGETING_CLASSES, createDbKindComponentCache, defaultFailureWords, describeChangeValue, directiveFieldLabel, directiveValueWord, failureWords, fieldLabel, getDirectiveRenderer, isDbKindComponentBodyPending, isRecordValue, itemChanges, itemOwnName, itemRecordId, kindIsRoutable, noteRecordChanged, provisionalDirectiveSlug, readsApplyLedger, recordFallbackName, recordRevision, registerDirectiveRenderer, resetDirectiveRenderers, useContentIrHost, useContentIrHostOrNull, useContentIrKindVersion, useKindRouteEnv, useRecordRevision, useRecordValues };
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-CiCUQGAB.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-CiCUQGAB.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
  * --------
@@ -326,10 +326,25 @@ declare function directiveFieldLabel(key: string, titleColumn: string | null | u
326
326
  * fields; null → the value as stored.
327
327
  */
328
328
  type DirectiveValueWord = (field: string, value: string) => string | null;
329
+ /**
330
+ * The name a NEW item carries, or null when it has none — the one rule the card
331
+ * and a host's confirm share. `itemTitle`'s last resort ("Item", "Item 2 of 3")
332
+ * is a placeholder, never a name: a create with an empty title used to ask
333
+ * "Create project Item?" and its card row read "Item" (G10B review, 2026-10-02).
334
+ */
335
+ declare function itemOwnName(item: Record<string, unknown>, titleColumn: string | null): string | null;
336
+ /** What a nameless new item is called — said as such, never a placeholder name. */
337
+ declare const NO_TITLE_WORD = "No title";
329
338
  /** How an empty value reads — before or after, on the card and in the confirm. */
330
339
  declare const EMPTY_VALUE_WORD = "None";
331
- /** A short, honest name for a record we could not look up: "Task 1a2b3c4d". */
332
- declare function recordFallbackName(nounLabel: string, id: string): string;
340
+ /**
341
+ * What a record is called when its name cannot be read: its TYPE ("Task").
342
+ * Never its id, in any slot — text, tooltip or screen-reader label. It used to
343
+ * be "Task a8a00001", and a link to a record that no longer exists hovered
344
+ * "Open Task a8a00001" (G10B review, 2026-10-02). The host says WHY the name is
345
+ * missing (not found, no access) beside it.
346
+ */
347
+ declare function recordFallbackName(nounLabel: string): string;
333
348
  /** One value as a row reads it: shortened, the whole of it, and whether it is empty. */
334
349
  interface ChangeValue {
335
350
  value: string;
@@ -733,4 +748,4 @@ declare class DbKindComponentErrorBoundary extends react.Component<DbKindCompone
733
748
  render(): react.ReactNode;
734
749
  }
735
750
 
736
- export { ApplyDirectiveButton, type ApplyDirectiveButtonProps, CHANGE_VALUE_MAX, type ChangeValue, type CompiledDbKindComponent, ComponentResolution, ComponentResolutionSource, ContentIrErrorReporter, ContentIrHost, ContentIrRenderProvider, type ContentIrRenderProviderProps, type DbKindActionResult, type DbKindCompileResult, type DbKindComponentCache, type DbKindComponentCachePorts, type DbKindComponentCompiler, DbKindComponentErrorBoundary, type DbKindComponentErrorBoundaryProps, type DbKindComponentIncident, type DbKindComponentIncidentSink, type DbKindComponentIncidentType, type DbKindComponentRenderProps, DelegatedOutput, type DelegatedOutputProps, type DirectiveApplyPhase, DirectiveChangeList, DirectiveFailure, DirectiveFailureWords, DirectiveFallbackCard, type DirectiveFallbackCardProps, DirectiveHost, DirectiveProvisionalCard, type DirectiveProvisionalCardProps, DirectiveRecordRef, DirectiveRender, type DirectiveRenderProps, type DirectiveRenderer, type DirectiveRendererProps, type DirectiveValueWord, EMPTY_VALUE_WORD, GenericStructuredView, type GenericStructuredViewProps, type ItemChange, type ItemChangesOptions, type KindComponentUiOptions, KindDefinitionSource, KindInstanceRender, type KindInstanceRenderProps, KindRouteEnv, type KindVersionSources, NodeOutcomeView, type NodeOutcomeViewProps, ProvisionalKindBoundary, ProvisionalKindFrame, type RecordReader, type RecordValues, type RecordValuesStatus, type ResolveKindValue, type RunDbKindAction, RunResultView, type RunResultViewProps, SideEffectDirectiveCard, type SideEffectDirectiveCardProps, TARGETING_CLASSES, createDbKindComponentCache, defaultFailureWords, describeChangeValue, directiveFieldLabel, directiveValueWord, failureWords, fieldLabel, getDirectiveRenderer, isDbKindComponentBodyPending, isRecordValue, itemChanges, itemRecordId, kindIsRoutable, noteRecordChanged, provisionalDirectiveSlug, readsApplyLedger, recordFallbackName, recordRevision, registerDirectiveRenderer, resetDirectiveRenderers, useContentIrHost, useContentIrHostOrNull, useContentIrKindVersion, useKindRouteEnv, useRecordRevision, useRecordValues };
751
+ export { ApplyDirectiveButton, type ApplyDirectiveButtonProps, CHANGE_VALUE_MAX, type ChangeValue, type CompiledDbKindComponent, ComponentResolution, ComponentResolutionSource, ContentIrErrorReporter, ContentIrHost, ContentIrRenderProvider, type ContentIrRenderProviderProps, type DbKindActionResult, type DbKindCompileResult, type DbKindComponentCache, type DbKindComponentCachePorts, type DbKindComponentCompiler, DbKindComponentErrorBoundary, type DbKindComponentErrorBoundaryProps, type DbKindComponentIncident, type DbKindComponentIncidentSink, type DbKindComponentIncidentType, type DbKindComponentRenderProps, DelegatedOutput, type DelegatedOutputProps, type DirectiveApplyPhase, DirectiveChangeList, DirectiveFailure, DirectiveFailureWords, DirectiveFallbackCard, type DirectiveFallbackCardProps, DirectiveHost, DirectiveProvisionalCard, type DirectiveProvisionalCardProps, DirectiveRecordRef, DirectiveRender, type DirectiveRenderProps, type DirectiveRenderer, type DirectiveRendererProps, type DirectiveValueWord, EMPTY_VALUE_WORD, GenericStructuredView, type GenericStructuredViewProps, type ItemChange, type ItemChangesOptions, type KindComponentUiOptions, KindDefinitionSource, KindInstanceRender, type KindInstanceRenderProps, KindRouteEnv, type KindVersionSources, NO_TITLE_WORD, NodeOutcomeView, type NodeOutcomeViewProps, ProvisionalKindBoundary, ProvisionalKindFrame, type RecordReader, type RecordValues, type RecordValuesStatus, type ResolveKindValue, type RunDbKindAction, RunResultView, type RunResultViewProps, SideEffectDirectiveCard, type SideEffectDirectiveCardProps, TARGETING_CLASSES, createDbKindComponentCache, defaultFailureWords, describeChangeValue, directiveFieldLabel, directiveValueWord, failureWords, fieldLabel, getDirectiveRenderer, isDbKindComponentBodyPending, isRecordValue, itemChanges, itemOwnName, itemRecordId, kindIsRoutable, noteRecordChanged, provisionalDirectiveSlug, readsApplyLedger, recordFallbackName, recordRevision, registerDirectiveRenderer, resetDirectiveRenderers, useContentIrHost, useContentIrHostOrNull, useContentIrKindVersion, useKindRouteEnv, useRecordRevision, useRecordValues };
package/dist/index.js CHANGED
@@ -757,8 +757,8 @@ import { useEffect as useEffect2, useRef, useState as useState2, useSyncExternal
757
757
  import { nounLabel } from "@ai-matrx/content-ir";
758
758
 
759
759
  // directives/item-changes.ts
760
- import { isUuidShape } from "@ai-matrx/kit/uuid";
761
760
  import { humanizeIdentifier } from "@ai-matrx/kit/text-case";
761
+ import { itemTitle } from "@ai-matrx/content-ir";
762
762
  var TARGETING_CLASSES = /* @__PURE__ */ new Set(["update", "delete"]);
763
763
  var NOT_A_CHANGE = /* @__PURE__ */ new Set(["__kind", "id"]);
764
764
  var CHANGE_VALUE_MAX = 280;
@@ -774,10 +774,14 @@ function fieldLabel(key) {
774
774
  function directiveFieldLabel(key, titleColumn) {
775
775
  return titleColumn && key === titleColumn ? "Title" : fieldLabel(key);
776
776
  }
777
+ function itemOwnName(item, titleColumn) {
778
+ const probe = itemTitle(item, titleColumn, 0, 2);
779
+ return probe === "Item 1 of 2" ? null : probe;
780
+ }
781
+ var NO_TITLE_WORD = "No title";
777
782
  var EMPTY_VALUE_WORD = "None";
778
- function recordFallbackName(nounLabel3, id) {
779
- const short = isUuidShape(id) ? id.slice(0, 8) : id.length > 12 ? `${id.slice(0, 12)}\u2026` : id;
780
- return `${nounLabel3} ${short}`;
783
+ function recordFallbackName(nounLabel3) {
784
+ return nounLabel3.trim() || "Record";
781
785
  }
782
786
  function describeChangeValue(value, word) {
783
787
  return describeValue(value, word);
@@ -1279,7 +1283,7 @@ function ApplyDirectiveButton({
1279
1283
  ) : null,
1280
1284
  records.map((record) => /* @__PURE__ */ jsx4("span", { className: "inline-flex min-w-0 items-center", children: host.renderRecord?.({
1281
1285
  ...record,
1282
- fallback: recordFallbackName(label2, record.id),
1286
+ fallback: recordFallbackName(label2),
1283
1287
  context: "applied",
1284
1288
  trashed
1285
1289
  }) }, `${record.noun}:${record.id}`)),
@@ -1327,6 +1331,14 @@ function ApplyDirectiveButton({
1327
1331
  }
1328
1332
  );
1329
1333
  }
1334
+ const warm = () => {
1335
+ const read2 = host.readRecord;
1336
+ if (!read2 || !TARGETING_CLASSES.has(directive.directiveClass)) return;
1337
+ for (const item of items) {
1338
+ const id = itemRecordId(item);
1339
+ if (id) void read2({ noun: directive.noun, id }).catch(() => null);
1340
+ }
1341
+ };
1330
1342
  const destructive = directive.directiveClass === "delete";
1331
1343
  const muted = nothingToChange && view.status === "idle";
1332
1344
  return /* @__PURE__ */ jsxs2("span", { className: "flex min-w-0 flex-wrap items-center justify-end gap-x-2 gap-y-1", children: [
@@ -1336,6 +1348,8 @@ function ApplyDirectiveButton({
1336
1348
  {
1337
1349
  type: "button",
1338
1350
  onClick: () => void handleApply(),
1351
+ onPointerEnter: warm,
1352
+ onFocus: warm,
1339
1353
  disabled: view.status === "applying" || view.status === "asking" || items.length === 0,
1340
1354
  "data-apply-tone": muted ? "muted" : destructive ? "destructive" : "default",
1341
1355
  title: muted ? "It sets no fields, so applying it changes nothing." : void 0,
@@ -1502,7 +1516,6 @@ import {
1502
1516
  directiveDisplay as directiveDisplay3,
1503
1517
  itemFacts,
1504
1518
  itemSubtitle,
1505
- itemTitle,
1506
1519
  nounLabel as nounLabel2,
1507
1520
  nounTitleColumn
1508
1521
  } from "@ai-matrx/content-ir";
@@ -1529,7 +1542,8 @@ function ItemRow({
1529
1542
  return /* @__PURE__ */ jsx7(TargetRow, { directive, item, recordId, index, phase });
1530
1543
  }
1531
1544
  const titleColumn = nounTitleColumn(directive.noun, host.nouns);
1532
- const title = itemTitle(item, titleColumn, index, total);
1545
+ const ownName = itemOwnName(item, titleColumn);
1546
+ const title = ownName ?? NO_TITLE_WORD;
1533
1547
  const subtitle = itemSubtitle(item);
1534
1548
  const valueWord = directiveValueWord(host, directive.noun);
1535
1549
  const facts = itemFacts(titleColumn ? omitKey(item, titleColumn) : item).map((fact) => ({
@@ -1541,7 +1555,14 @@ function ItemRow({
1541
1555
  const display = directiveDisplay3(directive.directiveClass, directive.noun, host.nouns);
1542
1556
  const openItem = host.openItem;
1543
1557
  const body = /* @__PURE__ */ jsxs5(Fragment, { children: [
1544
- /* @__PURE__ */ jsx7("span", { className: "min-w-0 shrink-0 truncate font-medium text-foreground", children: title }),
1558
+ /* @__PURE__ */ jsx7(
1559
+ "span",
1560
+ {
1561
+ className: `min-w-0 shrink-0 truncate font-medium ${ownName ? "text-foreground" : "italic text-muted-foreground"}`,
1562
+ "data-item-untitled": ownName ? void 0 : "",
1563
+ children: title
1564
+ }
1565
+ ),
1545
1566
  /* @__PURE__ */ jsx7("span", { className: "hidden min-w-0 flex-1 items-baseline gap-2 overflow-hidden sm:flex", children: facts.map((fact) => /* @__PURE__ */ jsxs5("span", { className: "truncate text-[11px] text-muted-foreground", "data-item-fact": fact.key, children: [
1546
1567
  fact.label,
1547
1568
  " ",
@@ -1570,7 +1591,12 @@ function ItemRow({
1570
1591
  children: body
1571
1592
  }
1572
1593
  ) : /* @__PURE__ */ jsx7("span", { className: "flex min-w-0 flex-1 items-center gap-2 px-1 py-0.5", children: body }),
1573
- host.renderCopy?.({ label: title, value: item, kind, size: "xs" })
1594
+ host.renderCopy?.({
1595
+ label: ownName ?? `this ${nounLabel2(directive.noun, host.nouns)}`,
1596
+ value: item,
1597
+ kind,
1598
+ size: "xs"
1599
+ })
1574
1600
  ] });
1575
1601
  }
1576
1602
  function DirectiveChangeList({
@@ -1624,7 +1650,7 @@ function TargetRow({
1624
1650
  phase
1625
1651
  }) {
1626
1652
  const host = useDirectiveHost();
1627
- const fallback = recordFallbackName(nounLabel2(directive.noun, host.nouns), recordId);
1653
+ const fallback = recordFallbackName(nounLabel2(directive.noun, host.nouns));
1628
1654
  const isUpdate = directive.directiveClass === "update";
1629
1655
  const readsLive = isUpdate && phase.phase === "open";
1630
1656
  const live = useRecordValues(
@@ -2191,6 +2217,7 @@ export {
2191
2217
  IR_PROVISIONAL_KEY,
2192
2218
  IR_ROUTE_KEY,
2193
2219
  KindInstanceRender,
2220
+ NO_TITLE_WORD,
2194
2221
  NodeOutcomeView,
2195
2222
  ProvisionalKindBoundary,
2196
2223
  ProvisionalKindFrame,
@@ -2214,6 +2241,7 @@ export {
2214
2241
  isProvisionalBlock,
2215
2242
  isRecordValue,
2216
2243
  itemChanges,
2244
+ itemOwnName,
2217
2245
  itemRecordId,
2218
2246
  kindIsRoutable,
2219
2247
  kindServerDataFromStoredValue,