@ai-matrx/content-ir-react 0.11.10 → 0.12.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-B9U-9QCw.cjs';
4
- export { b as ContentIrRenderSeams, D as DB_KIND_COMPONENT_KEY, c as DIRECTIVE_BLOCK_TYPE, d as DirectiveApplyResult, e as DirectiveCopyProps, f as DirectiveHost, g as DirectiveHostProvider, h as DirectiveHostProviderProps, i as DirectiveOpenItemOptions, G as GENERIC_STRUCTURED_COMPONENT_KEY, j as GenericFallbackReason, I as IR_PROVISIONAL_KEY, k as IR_ROUTE_KEY, l as IrRenderBlock, m as IrRoutableBlock, n as IrRouteMarker, o as KindRouteBinding, p as KindRouteOptions, P as PartialRenderOptions, q as ProvisionalKindRender, S as StructuredValueRenderProps, r as SupersededKindRender, s as applyIrKindRoute, t as createKindRouteBinding, u as envelopeFromPartialKind, v as isPartialReadyKind, w as isProvisionalBlock, x as kindServerDataFromStoredValue, y as markKindPartialUnsafe, z as readIrRouteMarker, A as resetPartialUnsafeKinds, B as resetSourcelessDbRowReports, E as resolveAnnouncedKindLoading, F as resolveProvisionalKindRender, H as resolveSupersededKindRender, J as routeEnvOf, L as useDirectiveHost } from './route-B9U-9QCw.cjs';
3
+ import { C as ContentIrHost, K as KindRouteEnv, a as KindDefinitionSource } from './route-DxK1SoPh.cjs';
4
+ export { b as ContentIrRenderSeams, D as DB_KIND_COMPONENT_KEY, c as DIRECTIVE_BLOCK_TYPE, d as DirectiveApplyResult, e as DirectiveAskRequest, f as DirectiveCopyProps, g as DirectiveHost, h as DirectiveHostProvider, i as DirectiveHostProviderProps, j as DirectiveOpenItemOptions, k as DirectiveRecordProps, l as DirectiveRecordRef, G as GENERIC_STRUCTURED_COMPONENT_KEY, m as GenericFallbackReason, I as IR_PROVISIONAL_KEY, n as IR_ROUTE_KEY, o as IrRenderBlock, p as IrRoutableBlock, q as IrRouteMarker, r as KindRouteBinding, s as KindRouteOptions, P as PartialRenderOptions, t as ProvisionalKindRender, S as StructuredValueRenderProps, u as SupersededKindRender, v as applyIrKindRoute, w as createKindRouteBinding, x as envelopeFromPartialKind, y as isPartialReadyKind, z as isProvisionalBlock, A as kindServerDataFromStoredValue, B as markKindPartialUnsafe, E as readIrRouteMarker, F as resetPartialUnsafeKinds, H as resetSourcelessDbRowReports, J as resolveAnnouncedKindLoading, L as resolveProvisionalKindRender, M as resolveSupersededKindRender, N as routeEnvOf, O as useDirectiveHost } from './route-DxK1SoPh.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';
@@ -268,12 +268,73 @@ interface DirectiveFallbackCardProps {
268
268
  }
269
269
  declare function DirectiveFallbackCard({ directive, reason }: DirectiveFallbackCardProps): react.JSX.Element;
270
270
 
271
+ /** The directive slug of a partial document, once its closing quote has arrived. */
272
+ declare function provisionalDirectiveSlug(content: string): string | null;
273
+ interface DirectiveProvisionalCardProps {
274
+ /** The partial fence body as received so far. */
275
+ content: string;
276
+ /**
277
+ * Whether the document may still be arriving. `false` means the stream is
278
+ * over and the document never completed — the card says it was cut off.
279
+ */
280
+ streaming: boolean;
281
+ className?: string | undefined;
282
+ }
283
+ declare function DirectiveProvisionalCard({ content, streaming, className }: DirectiveProvisionalCardProps): react.JSX.Element;
284
+
271
285
  interface DirectiveRenderProps {
272
286
  /** The fence body (JSON string) or an already-parsed shell / value. */
273
287
  content: unknown;
274
288
  className?: string;
289
+ /**
290
+ * Whether the document may still be arriving. A host that knows its stream
291
+ * has ended passes `false`, so an undecodable directive head is shown as CUT
292
+ * OFF rather than "writing…" forever. Omitted = it may still be arriving.
293
+ */
294
+ streaming?: boolean;
275
295
  }
276
- declare function DirectiveRender({ content, className }: DirectiveRenderProps): react.JSX.Element;
296
+ declare function DirectiveRender({ content, className, streaming }: DirectiveRenderProps): react.JSX.Element;
297
+
298
+ /**
299
+ * WHAT A DIRECTIVE ITEM WILL DO TO AN EXISTING RECORD — for the card, the
300
+ * confirm dialog, and anything else that must say it before the click.
301
+ *
302
+ * WHY (reviewer, 2026-09-30): an Update card and a Delete card showed each item
303
+ * as "Item" — they never named the record they would change, and an Update card
304
+ * never said what it would change. The item-summary helpers name a thing to be
305
+ * CREATED from its own fields; an update or delete item carries the TARGET's id
306
+ * and, for an update, the NEW values — so its "title" field is the new title,
307
+ * not the name of the record being changed. Naming the target is the host's
308
+ * live lookup (`DirectiveHost.renderRecord`); what changes is right here.
309
+ *
310
+ * Law: common-docs/policies/destructive-and-expensive-actions.md — the sentence
311
+ * names what changes.
312
+ */
313
+ /** Classes whose items point at an EXISTING record by `id`. */
314
+ declare const TARGETING_CLASSES: ReadonlySet<string>;
315
+ /** How long a changed value may read before it is shortened (full value on hover). */
316
+ declare const CHANGE_VALUE_MAX = 60;
317
+ /** The id of the existing record an update/delete item targets, or null. */
318
+ declare function itemRecordId(item: Record<string, unknown>): string | null;
319
+ /** "due_date" → "Due date". Underscores read as developer output. */
320
+ declare function fieldLabel(key: string): string;
321
+ /** A short, honest name for a record we could not look up: "Task 1a2b3c4d". */
322
+ declare function recordFallbackName(nounLabel: string, id: string): string;
323
+ interface ItemChange {
324
+ key: string;
325
+ /** "Due date". */
326
+ label: string;
327
+ /** What it becomes, shortened for a row; `full` carries the whole value. */
328
+ value: string;
329
+ full: string;
330
+ /** True when the new value empties the field. */
331
+ clears: boolean;
332
+ }
333
+ /**
334
+ * Every field an UPDATE item sets, in the order the item carries them — ALL of
335
+ * them, never a sample: a person approving an overwrite sees the whole of it.
336
+ */
337
+ declare function itemChanges(item: Record<string, unknown>): ItemChange[];
277
338
 
278
339
  /**
279
340
  * The DB-component COMPILE CACHE — session-scoped, keyed per winning row
@@ -538,4 +599,4 @@ declare class DbKindComponentErrorBoundary extends react.Component<DbKindCompone
538
599
  render(): react.ReactNode;
539
600
  }
540
601
 
541
- export { ApplyDirectiveButton, type ApplyDirectiveButtonProps, 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, DirectiveRender, type DirectiveRenderProps, type DirectiveRenderer, type DirectiveRendererProps, GenericStructuredView, type GenericStructuredViewProps, type KindComponentUiOptions, KindDefinitionSource, KindInstanceRender, type KindInstanceRenderProps, KindRouteEnv, type KindVersionSources, NodeOutcomeView, type NodeOutcomeViewProps, ProvisionalKindBoundary, ProvisionalKindFrame, type ResolveKindValue, type RunDbKindAction, RunResultView, type RunResultViewProps, SideEffectDirectiveCard, type SideEffectDirectiveCardProps, createDbKindComponentCache, getDirectiveRenderer, isDbKindComponentBodyPending, isRecordValue, kindIsRoutable, registerDirectiveRenderer, resetDirectiveRenderers, useContentIrHost, useContentIrHostOrNull, useContentIrKindVersion, useKindRouteEnv };
602
+ 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 };
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-gNpJ8zzW.js';
4
- export { b as ContentIrRenderSeams, D as DB_KIND_COMPONENT_KEY, c as DIRECTIVE_BLOCK_TYPE, d as DirectiveApplyResult, e as DirectiveCopyProps, f as DirectiveHost, g as DirectiveHostProvider, h as DirectiveHostProviderProps, i as DirectiveOpenItemOptions, G as GENERIC_STRUCTURED_COMPONENT_KEY, j as GenericFallbackReason, I as IR_PROVISIONAL_KEY, k as IR_ROUTE_KEY, l as IrRenderBlock, m as IrRoutableBlock, n as IrRouteMarker, o as KindRouteBinding, p as KindRouteOptions, P as PartialRenderOptions, q as ProvisionalKindRender, S as StructuredValueRenderProps, r as SupersededKindRender, s as applyIrKindRoute, t as createKindRouteBinding, u as envelopeFromPartialKind, v as isPartialReadyKind, w as isProvisionalBlock, x as kindServerDataFromStoredValue, y as markKindPartialUnsafe, z as readIrRouteMarker, A as resetPartialUnsafeKinds, B as resetSourcelessDbRowReports, E as resolveAnnouncedKindLoading, F as resolveProvisionalKindRender, H as resolveSupersededKindRender, J as routeEnvOf, L as useDirectiveHost } from './route-gNpJ8zzW.js';
3
+ import { C as ContentIrHost, K as KindRouteEnv, a as KindDefinitionSource } from './route-JGZfl2nL.js';
4
+ export { b as ContentIrRenderSeams, D as DB_KIND_COMPONENT_KEY, c as DIRECTIVE_BLOCK_TYPE, d as DirectiveApplyResult, e as DirectiveAskRequest, f as DirectiveCopyProps, g as DirectiveHost, h as DirectiveHostProvider, i as DirectiveHostProviderProps, j as DirectiveOpenItemOptions, k as DirectiveRecordProps, l as DirectiveRecordRef, G as GENERIC_STRUCTURED_COMPONENT_KEY, m as GenericFallbackReason, I as IR_PROVISIONAL_KEY, n as IR_ROUTE_KEY, o as IrRenderBlock, p as IrRoutableBlock, q as IrRouteMarker, r as KindRouteBinding, s as KindRouteOptions, P as PartialRenderOptions, t as ProvisionalKindRender, S as StructuredValueRenderProps, u as SupersededKindRender, v as applyIrKindRoute, w as createKindRouteBinding, x as envelopeFromPartialKind, y as isPartialReadyKind, z as isProvisionalBlock, A as kindServerDataFromStoredValue, B as markKindPartialUnsafe, E as readIrRouteMarker, F as resetPartialUnsafeKinds, H as resetSourcelessDbRowReports, J as resolveAnnouncedKindLoading, L as resolveProvisionalKindRender, M as resolveSupersededKindRender, N as routeEnvOf, O as useDirectiveHost } from './route-JGZfl2nL.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';
@@ -268,12 +268,73 @@ interface DirectiveFallbackCardProps {
268
268
  }
269
269
  declare function DirectiveFallbackCard({ directive, reason }: DirectiveFallbackCardProps): react.JSX.Element;
270
270
 
271
+ /** The directive slug of a partial document, once its closing quote has arrived. */
272
+ declare function provisionalDirectiveSlug(content: string): string | null;
273
+ interface DirectiveProvisionalCardProps {
274
+ /** The partial fence body as received so far. */
275
+ content: string;
276
+ /**
277
+ * Whether the document may still be arriving. `false` means the stream is
278
+ * over and the document never completed — the card says it was cut off.
279
+ */
280
+ streaming: boolean;
281
+ className?: string | undefined;
282
+ }
283
+ declare function DirectiveProvisionalCard({ content, streaming, className }: DirectiveProvisionalCardProps): react.JSX.Element;
284
+
271
285
  interface DirectiveRenderProps {
272
286
  /** The fence body (JSON string) or an already-parsed shell / value. */
273
287
  content: unknown;
274
288
  className?: string;
289
+ /**
290
+ * Whether the document may still be arriving. A host that knows its stream
291
+ * has ended passes `false`, so an undecodable directive head is shown as CUT
292
+ * OFF rather than "writing…" forever. Omitted = it may still be arriving.
293
+ */
294
+ streaming?: boolean;
275
295
  }
276
- declare function DirectiveRender({ content, className }: DirectiveRenderProps): react.JSX.Element;
296
+ declare function DirectiveRender({ content, className, streaming }: DirectiveRenderProps): react.JSX.Element;
297
+
298
+ /**
299
+ * WHAT A DIRECTIVE ITEM WILL DO TO AN EXISTING RECORD — for the card, the
300
+ * confirm dialog, and anything else that must say it before the click.
301
+ *
302
+ * WHY (reviewer, 2026-09-30): an Update card and a Delete card showed each item
303
+ * as "Item" — they never named the record they would change, and an Update card
304
+ * never said what it would change. The item-summary helpers name a thing to be
305
+ * CREATED from its own fields; an update or delete item carries the TARGET's id
306
+ * and, for an update, the NEW values — so its "title" field is the new title,
307
+ * not the name of the record being changed. Naming the target is the host's
308
+ * live lookup (`DirectiveHost.renderRecord`); what changes is right here.
309
+ *
310
+ * Law: common-docs/policies/destructive-and-expensive-actions.md — the sentence
311
+ * names what changes.
312
+ */
313
+ /** Classes whose items point at an EXISTING record by `id`. */
314
+ declare const TARGETING_CLASSES: ReadonlySet<string>;
315
+ /** How long a changed value may read before it is shortened (full value on hover). */
316
+ declare const CHANGE_VALUE_MAX = 60;
317
+ /** The id of the existing record an update/delete item targets, or null. */
318
+ declare function itemRecordId(item: Record<string, unknown>): string | null;
319
+ /** "due_date" → "Due date". Underscores read as developer output. */
320
+ declare function fieldLabel(key: string): string;
321
+ /** A short, honest name for a record we could not look up: "Task 1a2b3c4d". */
322
+ declare function recordFallbackName(nounLabel: string, id: string): string;
323
+ interface ItemChange {
324
+ key: string;
325
+ /** "Due date". */
326
+ label: string;
327
+ /** What it becomes, shortened for a row; `full` carries the whole value. */
328
+ value: string;
329
+ full: string;
330
+ /** True when the new value empties the field. */
331
+ clears: boolean;
332
+ }
333
+ /**
334
+ * Every field an UPDATE item sets, in the order the item carries them — ALL of
335
+ * them, never a sample: a person approving an overwrite sees the whole of it.
336
+ */
337
+ declare function itemChanges(item: Record<string, unknown>): ItemChange[];
277
338
 
278
339
  /**
279
340
  * The DB-component COMPILE CACHE — session-scoped, keyed per winning row
@@ -538,4 +599,4 @@ declare class DbKindComponentErrorBoundary extends react.Component<DbKindCompone
538
599
  render(): react.ReactNode;
539
600
  }
540
601
 
541
- export { ApplyDirectiveButton, type ApplyDirectiveButtonProps, 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, DirectiveRender, type DirectiveRenderProps, type DirectiveRenderer, type DirectiveRendererProps, GenericStructuredView, type GenericStructuredViewProps, type KindComponentUiOptions, KindDefinitionSource, KindInstanceRender, type KindInstanceRenderProps, KindRouteEnv, type KindVersionSources, NodeOutcomeView, type NodeOutcomeViewProps, ProvisionalKindBoundary, ProvisionalKindFrame, type ResolveKindValue, type RunDbKindAction, RunResultView, type RunResultViewProps, SideEffectDirectiveCard, type SideEffectDirectiveCardProps, createDbKindComponentCache, getDirectiveRenderer, isDbKindComponentBodyPending, isRecordValue, kindIsRoutable, registerDirectiveRenderer, resetDirectiveRenderers, useContentIrHost, useContentIrHostOrNull, useContentIrKindVersion, useKindRouteEnv };
602
+ 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 };