@ai-matrx/content-ir-react 0.15.1 → 0.16.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/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { C as ComponentResolutionSource, a as ComponentResolution, b as ContentIrErrorReporter } from './component-resolution.types-DLO2w-0n.cjs';
2
2
  export { c as ComponentRole, d as ContentIrErrorReport, J as JsonObject, K as KindComponentRow, S as SystemComponentEntry, e as consoleErrorReporter } from './component-resolution.types-DLO2w-0n.cjs';
3
- import { C as ContentIrHost, K as KindRouteEnv, a as KindDefinitionSource } from './route-BCtPhF7W.cjs';
4
- export { b as ContentIrRenderSeams, D as DB_KIND_COMPONENT_KEY, c as DIRECTIVE_BLOCK_TYPE, d as DirectiveApplyResult, e as DirectiveApplyState, f as DirectiveAskRequest, g as DirectiveCopyProps, h as DirectiveHost, i as DirectiveHostProvider, j as DirectiveHostProviderProps, k as DirectiveOpenItemOptions, l as DirectiveRecordProps, m as DirectiveRecordRef, n as DirectiveScope, o as DirectiveScopeProvider, p as DirectiveShell, G as GENERIC_STRUCTURED_COMPONENT_KEY, q as GenericFallbackReason, I as IR_PROVISIONAL_KEY, r as IR_ROUTE_KEY, s as IrRenderBlock, t as IrRoutableBlock, u as IrRouteMarker, v as KindRouteBinding, w as KindRouteOptions, P as PartialRenderOptions, x as ProvisionalKindRender, S as StructuredValueRenderProps, y as SupersededKindRender, z as applyIrKindRoute, A as createKindRouteBinding, B as envelopeFromPartialKind, E as isPartialReadyKind, F as isProvisionalBlock, H as kindServerDataFromStoredValue, J as markKindPartialUnsafe, L as readIrRouteMarker, M as resetPartialUnsafeKinds, N as resetSourcelessDbRowReports, O as resolveAnnouncedKindLoading, Q as resolveProvisionalKindRender, R as resolveSupersededKindRender, T as routeEnvOf, U as useDirectiveHost, V as useDirectiveScope } from './route-BCtPhF7W.cjs';
3
+ import { C as ContentIrHost, K as KindRouteEnv, a as KindDefinitionSource, D as DirectiveRecordRef } from './route-YcoyR3Fj.cjs';
4
+ export { b as ContentIrRenderSeams, c as DB_KIND_COMPONENT_KEY, d as DIRECTIVE_BLOCK_TYPE, e as DirectiveApplyResult, f as DirectiveApplyState, g as DirectiveAskRequest, h as DirectiveCopyProps, i as DirectiveHost, j as DirectiveHostProvider, k as DirectiveHostProviderProps, l as DirectiveOpenItemOptions, m as DirectiveRecordProps, n as DirectiveScope, o as DirectiveScopeProvider, p as DirectiveShell, G as GENERIC_STRUCTURED_COMPONENT_KEY, q as GenericFallbackReason, I as IR_PROVISIONAL_KEY, r as IR_ROUTE_KEY, s as IrRenderBlock, t as IrRoutableBlock, u as IrRouteMarker, v as KindRouteBinding, w as KindRouteOptions, P as PartialRenderOptions, x as ProvisionalKindRender, S as StructuredValueRenderProps, y as SupersededKindRender, z as applyIrKindRoute, A as createKindRouteBinding, B as envelopeFromPartialKind, E as isPartialReadyKind, F as isProvisionalBlock, H as kindServerDataFromStoredValue, J as markKindPartialUnsafe, L as readIrRouteMarker, M as resetPartialUnsafeKinds, N as resetSourcelessDbRowReports, O as resolveAnnouncedKindLoading, Q as resolveProvisionalKindRender, R as resolveSupersededKindRender, T as routeEnvOf, U as useDirectiveHost, V as useDirectiveScope } from './route-YcoyR3Fj.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';
@@ -256,9 +256,75 @@ interface ApplyDirectiveButtonProps {
256
256
  }
257
257
  declare function ApplyDirectiveButton({ directive, label, itemCount, onApplied, }: ApplyDirectiveButtonProps): react.JSX.Element | null;
258
258
 
259
+ /**
260
+ * WHAT A DIRECTIVE ITEM WILL DO TO AN EXISTING RECORD — for the card, the
261
+ * confirm dialog, and anything else that must say it before the click.
262
+ *
263
+ * WHY (reviewer, 2026-09-30): an Update card and a Delete card showed each item
264
+ * as "Item" — they never named the record they would change, and an Update card
265
+ * never said what it would change. The item-summary helpers name a thing to be
266
+ * CREATED from its own fields; an update or delete item carries the TARGET's id
267
+ * and, for an update, the NEW values — so its "title" field is the new title,
268
+ * not the name of the record being changed. Naming the target is the host's
269
+ * live lookup (`DirectiveHost.renderRecord`); what changes is right here.
270
+ *
271
+ * Law: common-docs/policies/destructive-and-expensive-actions.md — the sentence
272
+ * names what changes.
273
+ */
274
+ /** Classes whose items point at an EXISTING record by `id`. */
275
+ declare const TARGETING_CLASSES: ReadonlySet<string>;
276
+ /** How long a changed value may read before it is shortened (full value on hover). */
277
+ declare const CHANGE_VALUE_MAX = 60;
278
+ /** The id of the existing record an update/delete item targets, or null. */
279
+ declare function itemRecordId(item: Record<string, unknown>): string | null;
280
+ /** "due_date" → "Due date". Underscores read as developer output. */
281
+ declare function fieldLabel(key: string): string;
282
+ /** A short, honest name for a record we could not look up: "Task 1a2b3c4d". */
283
+ declare function recordFallbackName(nounLabel: string, id: string): string;
284
+ /** One value as a row reads it: shortened, the whole of it, and whether it is empty. */
285
+ interface ChangeValue {
286
+ value: string;
287
+ full: string;
288
+ clears: boolean;
289
+ }
290
+ interface ItemChange extends ChangeValue {
291
+ key: string;
292
+ /** "Due date". */
293
+ label: string;
294
+ /**
295
+ * What the field holds NOW, when the host could read the record — so an
296
+ * update reads "old → new", never just the new value (reviewer, 2026-10-02).
297
+ * Absent when the current record is unknown.
298
+ */
299
+ before?: ChangeValue;
300
+ /** True when the record already holds exactly this value — nothing changes. */
301
+ same?: boolean;
302
+ }
303
+ /** One value, described for a change row (`value` shortened, `full` whole). */
304
+ declare function describeChangeValue(value: unknown): ChangeValue;
305
+ /**
306
+ * Every field an UPDATE item sets, in the order the item carries them — ALL of
307
+ * them, never a sample: a person approving an overwrite sees the whole of it.
308
+ *
309
+ * Pass `current` — the record as it is now (`DirectiveHost.readRecord`) — and
310
+ * each change also carries what it REPLACES (`before`) and whether it changes
311
+ * anything at all (`same`). A field the record does not carry gets no `before`.
312
+ */
313
+ declare function itemChanges(item: Record<string, unknown>, current?: Record<string, unknown> | null): ItemChange[];
314
+
259
315
  interface SideEffectDirectiveCardProps {
260
316
  directive: DecodedDirective;
261
317
  }
318
+ /**
319
+ * THE CHANGE LIST — every field an update sets, as "Label old → new" when the
320
+ * record's current value is known, "Label → new" when it is not. ONE component
321
+ * for the card row and the host's confirm dialog, so the two can never read
322
+ * differently (reviewer, 2026-10-02: the confirm showed only the new value).
323
+ */
324
+ declare function DirectiveChangeList({ changes, className, }: {
325
+ changes: ItemChange[];
326
+ className?: string;
327
+ }): react.JSX.Element;
262
328
  declare function SideEffectDirectiveCard({ directive }: SideEffectDirectiveCardProps): react.JSX.Element;
263
329
 
264
330
  interface DirectiveFallbackCardProps {
@@ -302,46 +368,14 @@ interface DirectiveRenderProps {
302
368
  }
303
369
  declare function DirectiveRender({ conversationId, ...props }: DirectiveRenderProps): react.JSX.Element;
304
370
 
305
- /**
306
- * WHAT A DIRECTIVE ITEM WILL DO TO AN EXISTING RECORD — for the card, the
307
- * confirm dialog, and anything else that must say it before the click.
308
- *
309
- * WHY (reviewer, 2026-09-30): an Update card and a Delete card showed each item
310
- * as "Item" — they never named the record they would change, and an Update card
311
- * never said what it would change. The item-summary helpers name a thing to be
312
- * CREATED from its own fields; an update or delete item carries the TARGET's id
313
- * and, for an update, the NEW values — so its "title" field is the new title,
314
- * not the name of the record being changed. Naming the target is the host's
315
- * live lookup (`DirectiveHost.renderRecord`); what changes is right here.
316
- *
317
- * Law: common-docs/policies/destructive-and-expensive-actions.md — the sentence
318
- * names what changes.
319
- */
320
- /** Classes whose items point at an EXISTING record by `id`. */
321
- declare const TARGETING_CLASSES: ReadonlySet<string>;
322
- /** How long a changed value may read before it is shortened (full value on hover). */
323
- declare const CHANGE_VALUE_MAX = 60;
324
- /** The id of the existing record an update/delete item targets, or null. */
325
- declare function itemRecordId(item: Record<string, unknown>): string | null;
326
- /** "due_date" → "Due date". Underscores read as developer output. */
327
- declare function fieldLabel(key: string): string;
328
- /** A short, honest name for a record we could not look up: "Task 1a2b3c4d". */
329
- declare function recordFallbackName(nounLabel: string, id: string): string;
330
- interface ItemChange {
331
- key: string;
332
- /** "Due date". */
333
- label: string;
334
- /** What it becomes, shortened for a row; `full` carries the whole value. */
335
- value: string;
336
- full: string;
337
- /** True when the new value empties the field. */
338
- clears: boolean;
371
+ type RecordValuesStatus = "idle" | "loading" | "ready" | "unavailable";
372
+ interface RecordValues {
373
+ /** The record's fields now, or null until (or unless) they are read. */
374
+ values: Record<string, unknown> | null;
375
+ status: RecordValuesStatus;
339
376
  }
340
- /**
341
- * Every field an UPDATE item sets, in the order the item carries them — ALL of
342
- * them, never a sample: a person approving an overwrite sees the whole of it.
343
- */
344
- declare function itemChanges(item: Record<string, unknown>): ItemChange[];
377
+ type RecordReader = (ref: DirectiveRecordRef) => Promise<Record<string, unknown> | null>;
378
+ declare function useRecordValues(read: RecordReader | undefined, ref: DirectiveRecordRef | null): RecordValues;
345
379
 
346
380
  /**
347
381
  * The DB-component COMPILE CACHE — session-scoped, keyed per winning row
@@ -606,4 +640,4 @@ declare class DbKindComponentErrorBoundary extends react.Component<DbKindCompone
606
640
  render(): react.ReactNode;
607
641
  }
608
642
 
609
- export { ApplyDirectiveButton, type ApplyDirectiveButtonProps, CHANGE_VALUE_MAX, 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, DirectiveFallbackCard, type DirectiveFallbackCardProps, DirectiveProvisionalCard, type DirectiveProvisionalCardProps, DirectiveRender, type DirectiveRenderProps, type DirectiveRenderer, type DirectiveRendererProps, GenericStructuredView, type GenericStructuredViewProps, type ItemChange, type KindComponentUiOptions, KindDefinitionSource, KindInstanceRender, type KindInstanceRenderProps, KindRouteEnv, type KindVersionSources, NodeOutcomeView, type NodeOutcomeViewProps, ProvisionalKindBoundary, ProvisionalKindFrame, type ResolveKindValue, type RunDbKindAction, RunResultView, type RunResultViewProps, SideEffectDirectiveCard, type SideEffectDirectiveCardProps, TARGETING_CLASSES, createDbKindComponentCache, fieldLabel, getDirectiveRenderer, isDbKindComponentBodyPending, isRecordValue, itemChanges, itemRecordId, kindIsRoutable, provisionalDirectiveSlug, recordFallbackName, registerDirectiveRenderer, resetDirectiveRenderers, useContentIrHost, useContentIrHostOrNull, useContentIrKindVersion, useKindRouteEnv };
643
+ 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, DirectiveChangeList, DirectiveFallbackCard, type DirectiveFallbackCardProps, DirectiveProvisionalCard, type DirectiveProvisionalCardProps, DirectiveRecordRef, DirectiveRender, type DirectiveRenderProps, type DirectiveRenderer, type DirectiveRendererProps, GenericStructuredView, type GenericStructuredViewProps, type ItemChange, 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, describeChangeValue, fieldLabel, getDirectiveRenderer, isDbKindComponentBodyPending, isRecordValue, itemChanges, itemRecordId, kindIsRoutable, provisionalDirectiveSlug, recordFallbackName, registerDirectiveRenderer, resetDirectiveRenderers, useContentIrHost, useContentIrHostOrNull, useContentIrKindVersion, useKindRouteEnv, useRecordValues };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { C as ComponentResolutionSource, a as ComponentResolution, b as ContentIrErrorReporter } from './component-resolution.types-DLO2w-0n.js';
2
2
  export { c as ComponentRole, d as ContentIrErrorReport, J as JsonObject, K as KindComponentRow, S as SystemComponentEntry, e as consoleErrorReporter } from './component-resolution.types-DLO2w-0n.js';
3
- import { C as ContentIrHost, K as KindRouteEnv, a as KindDefinitionSource } from './route-DDbgc-ID.js';
4
- export { b as ContentIrRenderSeams, D as DB_KIND_COMPONENT_KEY, c as DIRECTIVE_BLOCK_TYPE, d as DirectiveApplyResult, e as DirectiveApplyState, f as DirectiveAskRequest, g as DirectiveCopyProps, h as DirectiveHost, i as DirectiveHostProvider, j as DirectiveHostProviderProps, k as DirectiveOpenItemOptions, l as DirectiveRecordProps, m as DirectiveRecordRef, n as DirectiveScope, o as DirectiveScopeProvider, p as DirectiveShell, G as GENERIC_STRUCTURED_COMPONENT_KEY, q as GenericFallbackReason, I as IR_PROVISIONAL_KEY, r as IR_ROUTE_KEY, s as IrRenderBlock, t as IrRoutableBlock, u as IrRouteMarker, v as KindRouteBinding, w as KindRouteOptions, P as PartialRenderOptions, x as ProvisionalKindRender, S as StructuredValueRenderProps, y as SupersededKindRender, z as applyIrKindRoute, A as createKindRouteBinding, B as envelopeFromPartialKind, E as isPartialReadyKind, F as isProvisionalBlock, H as kindServerDataFromStoredValue, J as markKindPartialUnsafe, L as readIrRouteMarker, M as resetPartialUnsafeKinds, N as resetSourcelessDbRowReports, O as resolveAnnouncedKindLoading, Q as resolveProvisionalKindRender, R as resolveSupersededKindRender, T as routeEnvOf, U as useDirectiveHost, V as useDirectiveScope } from './route-DDbgc-ID.js';
3
+ import { C as ContentIrHost, K as KindRouteEnv, a as KindDefinitionSource, D as DirectiveRecordRef } from './route-De9c5YgW.js';
4
+ export { b as ContentIrRenderSeams, c as DB_KIND_COMPONENT_KEY, d as DIRECTIVE_BLOCK_TYPE, e as DirectiveApplyResult, f as DirectiveApplyState, g as DirectiveAskRequest, h as DirectiveCopyProps, i as DirectiveHost, j as DirectiveHostProvider, k as DirectiveHostProviderProps, l as DirectiveOpenItemOptions, m as DirectiveRecordProps, n as DirectiveScope, o as DirectiveScopeProvider, p as DirectiveShell, G as GENERIC_STRUCTURED_COMPONENT_KEY, q as GenericFallbackReason, I as IR_PROVISIONAL_KEY, r as IR_ROUTE_KEY, s as IrRenderBlock, t as IrRoutableBlock, u as IrRouteMarker, v as KindRouteBinding, w as KindRouteOptions, P as PartialRenderOptions, x as ProvisionalKindRender, S as StructuredValueRenderProps, y as SupersededKindRender, z as applyIrKindRoute, A as createKindRouteBinding, B as envelopeFromPartialKind, E as isPartialReadyKind, F as isProvisionalBlock, H as kindServerDataFromStoredValue, J as markKindPartialUnsafe, L as readIrRouteMarker, M as resetPartialUnsafeKinds, N as resetSourcelessDbRowReports, O as resolveAnnouncedKindLoading, Q as resolveProvisionalKindRender, R as resolveSupersededKindRender, T as routeEnvOf, U as useDirectiveHost, V as useDirectiveScope } from './route-De9c5YgW.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';
@@ -256,9 +256,75 @@ interface ApplyDirectiveButtonProps {
256
256
  }
257
257
  declare function ApplyDirectiveButton({ directive, label, itemCount, onApplied, }: ApplyDirectiveButtonProps): react.JSX.Element | null;
258
258
 
259
+ /**
260
+ * WHAT A DIRECTIVE ITEM WILL DO TO AN EXISTING RECORD — for the card, the
261
+ * confirm dialog, and anything else that must say it before the click.
262
+ *
263
+ * WHY (reviewer, 2026-09-30): an Update card and a Delete card showed each item
264
+ * as "Item" — they never named the record they would change, and an Update card
265
+ * never said what it would change. The item-summary helpers name a thing to be
266
+ * CREATED from its own fields; an update or delete item carries the TARGET's id
267
+ * and, for an update, the NEW values — so its "title" field is the new title,
268
+ * not the name of the record being changed. Naming the target is the host's
269
+ * live lookup (`DirectiveHost.renderRecord`); what changes is right here.
270
+ *
271
+ * Law: common-docs/policies/destructive-and-expensive-actions.md — the sentence
272
+ * names what changes.
273
+ */
274
+ /** Classes whose items point at an EXISTING record by `id`. */
275
+ declare const TARGETING_CLASSES: ReadonlySet<string>;
276
+ /** How long a changed value may read before it is shortened (full value on hover). */
277
+ declare const CHANGE_VALUE_MAX = 60;
278
+ /** The id of the existing record an update/delete item targets, or null. */
279
+ declare function itemRecordId(item: Record<string, unknown>): string | null;
280
+ /** "due_date" → "Due date". Underscores read as developer output. */
281
+ declare function fieldLabel(key: string): string;
282
+ /** A short, honest name for a record we could not look up: "Task 1a2b3c4d". */
283
+ declare function recordFallbackName(nounLabel: string, id: string): string;
284
+ /** One value as a row reads it: shortened, the whole of it, and whether it is empty. */
285
+ interface ChangeValue {
286
+ value: string;
287
+ full: string;
288
+ clears: boolean;
289
+ }
290
+ interface ItemChange extends ChangeValue {
291
+ key: string;
292
+ /** "Due date". */
293
+ label: string;
294
+ /**
295
+ * What the field holds NOW, when the host could read the record — so an
296
+ * update reads "old → new", never just the new value (reviewer, 2026-10-02).
297
+ * Absent when the current record is unknown.
298
+ */
299
+ before?: ChangeValue;
300
+ /** True when the record already holds exactly this value — nothing changes. */
301
+ same?: boolean;
302
+ }
303
+ /** One value, described for a change row (`value` shortened, `full` whole). */
304
+ declare function describeChangeValue(value: unknown): ChangeValue;
305
+ /**
306
+ * Every field an UPDATE item sets, in the order the item carries them — ALL of
307
+ * them, never a sample: a person approving an overwrite sees the whole of it.
308
+ *
309
+ * Pass `current` — the record as it is now (`DirectiveHost.readRecord`) — and
310
+ * each change also carries what it REPLACES (`before`) and whether it changes
311
+ * anything at all (`same`). A field the record does not carry gets no `before`.
312
+ */
313
+ declare function itemChanges(item: Record<string, unknown>, current?: Record<string, unknown> | null): ItemChange[];
314
+
259
315
  interface SideEffectDirectiveCardProps {
260
316
  directive: DecodedDirective;
261
317
  }
318
+ /**
319
+ * THE CHANGE LIST — every field an update sets, as "Label old → new" when the
320
+ * record's current value is known, "Label → new" when it is not. ONE component
321
+ * for the card row and the host's confirm dialog, so the two can never read
322
+ * differently (reviewer, 2026-10-02: the confirm showed only the new value).
323
+ */
324
+ declare function DirectiveChangeList({ changes, className, }: {
325
+ changes: ItemChange[];
326
+ className?: string;
327
+ }): react.JSX.Element;
262
328
  declare function SideEffectDirectiveCard({ directive }: SideEffectDirectiveCardProps): react.JSX.Element;
263
329
 
264
330
  interface DirectiveFallbackCardProps {
@@ -302,46 +368,14 @@ interface DirectiveRenderProps {
302
368
  }
303
369
  declare function DirectiveRender({ conversationId, ...props }: DirectiveRenderProps): react.JSX.Element;
304
370
 
305
- /**
306
- * WHAT A DIRECTIVE ITEM WILL DO TO AN EXISTING RECORD — for the card, the
307
- * confirm dialog, and anything else that must say it before the click.
308
- *
309
- * WHY (reviewer, 2026-09-30): an Update card and a Delete card showed each item
310
- * as "Item" — they never named the record they would change, and an Update card
311
- * never said what it would change. The item-summary helpers name a thing to be
312
- * CREATED from its own fields; an update or delete item carries the TARGET's id
313
- * and, for an update, the NEW values — so its "title" field is the new title,
314
- * not the name of the record being changed. Naming the target is the host's
315
- * live lookup (`DirectiveHost.renderRecord`); what changes is right here.
316
- *
317
- * Law: common-docs/policies/destructive-and-expensive-actions.md — the sentence
318
- * names what changes.
319
- */
320
- /** Classes whose items point at an EXISTING record by `id`. */
321
- declare const TARGETING_CLASSES: ReadonlySet<string>;
322
- /** How long a changed value may read before it is shortened (full value on hover). */
323
- declare const CHANGE_VALUE_MAX = 60;
324
- /** The id of the existing record an update/delete item targets, or null. */
325
- declare function itemRecordId(item: Record<string, unknown>): string | null;
326
- /** "due_date" → "Due date". Underscores read as developer output. */
327
- declare function fieldLabel(key: string): string;
328
- /** A short, honest name for a record we could not look up: "Task 1a2b3c4d". */
329
- declare function recordFallbackName(nounLabel: string, id: string): string;
330
- interface ItemChange {
331
- key: string;
332
- /** "Due date". */
333
- label: string;
334
- /** What it becomes, shortened for a row; `full` carries the whole value. */
335
- value: string;
336
- full: string;
337
- /** True when the new value empties the field. */
338
- clears: boolean;
371
+ type RecordValuesStatus = "idle" | "loading" | "ready" | "unavailable";
372
+ interface RecordValues {
373
+ /** The record's fields now, or null until (or unless) they are read. */
374
+ values: Record<string, unknown> | null;
375
+ status: RecordValuesStatus;
339
376
  }
340
- /**
341
- * Every field an UPDATE item sets, in the order the item carries them — ALL of
342
- * them, never a sample: a person approving an overwrite sees the whole of it.
343
- */
344
- declare function itemChanges(item: Record<string, unknown>): ItemChange[];
377
+ type RecordReader = (ref: DirectiveRecordRef) => Promise<Record<string, unknown> | null>;
378
+ declare function useRecordValues(read: RecordReader | undefined, ref: DirectiveRecordRef | null): RecordValues;
345
379
 
346
380
  /**
347
381
  * The DB-component COMPILE CACHE — session-scoped, keyed per winning row
@@ -606,4 +640,4 @@ declare class DbKindComponentErrorBoundary extends react.Component<DbKindCompone
606
640
  render(): react.ReactNode;
607
641
  }
608
642
 
609
- export { ApplyDirectiveButton, type ApplyDirectiveButtonProps, CHANGE_VALUE_MAX, 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, DirectiveFallbackCard, type DirectiveFallbackCardProps, DirectiveProvisionalCard, type DirectiveProvisionalCardProps, DirectiveRender, type DirectiveRenderProps, type DirectiveRenderer, type DirectiveRendererProps, GenericStructuredView, type GenericStructuredViewProps, type ItemChange, type KindComponentUiOptions, KindDefinitionSource, KindInstanceRender, type KindInstanceRenderProps, KindRouteEnv, type KindVersionSources, NodeOutcomeView, type NodeOutcomeViewProps, ProvisionalKindBoundary, ProvisionalKindFrame, type ResolveKindValue, type RunDbKindAction, RunResultView, type RunResultViewProps, SideEffectDirectiveCard, type SideEffectDirectiveCardProps, TARGETING_CLASSES, createDbKindComponentCache, fieldLabel, getDirectiveRenderer, isDbKindComponentBodyPending, isRecordValue, itemChanges, itemRecordId, kindIsRoutable, provisionalDirectiveSlug, recordFallbackName, registerDirectiveRenderer, resetDirectiveRenderers, useContentIrHost, useContentIrHostOrNull, useContentIrKindVersion, useKindRouteEnv };
643
+ 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, DirectiveChangeList, DirectiveFallbackCard, type DirectiveFallbackCardProps, DirectiveProvisionalCard, type DirectiveProvisionalCardProps, DirectiveRecordRef, DirectiveRender, type DirectiveRenderProps, type DirectiveRenderer, type DirectiveRendererProps, GenericStructuredView, type GenericStructuredViewProps, type ItemChange, 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, describeChangeValue, fieldLabel, getDirectiveRenderer, isDbKindComponentBodyPending, isRecordValue, itemChanges, itemRecordId, kindIsRoutable, provisionalDirectiveSlug, recordFallbackName, registerDirectiveRenderer, resetDirectiveRenderers, useContentIrHost, useContentIrHostOrNull, useContentIrKindVersion, useKindRouteEnv, useRecordValues };