@ai-matrx/content-ir-react 0.8.1 → 0.9.1

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 (38) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/{component-resolution.types-BS1ySIg-.d.cts → component-resolution.types-C1MzCf2s.d.cts} +13 -0
  3. package/dist/{component-resolution.types-BS1ySIg-.d.ts → component-resolution.types-C1MzCf2s.d.ts} +13 -0
  4. package/dist/{component-resolution.types-fvR92hW7.d.cts → component-resolution.types-DLO2w-0n.d.cts} +13 -0
  5. package/dist/{component-resolution.types-fvR92hW7.d.ts → component-resolution.types-DLO2w-0n.d.ts} +13 -0
  6. package/dist/db-component.d.cts +1 -1
  7. package/dist/db-component.d.ts +1 -1
  8. package/dist/{host-types-DvGv8s9L.d.cts → host-types-CDcLW0TD.d.cts} +7 -2
  9. package/dist/{host-types-CZ_Bkp4R.d.ts → host-types-CpItjcYh.d.ts} +7 -2
  10. package/dist/host.cjs.map +1 -1
  11. package/dist/host.d.cts +3 -3
  12. package/dist/host.d.ts +3 -3
  13. package/dist/host.js.map +1 -1
  14. package/dist/index.cjs +17 -0
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.d.cts +4 -4
  17. package/dist/index.d.ts +4 -4
  18. package/dist/index.js +17 -0
  19. package/dist/index.js.map +1 -1
  20. package/dist/react.cjs.map +1 -1
  21. package/dist/react.d.cts +2 -2
  22. package/dist/react.d.ts +2 -2
  23. package/dist/react.js.map +1 -1
  24. package/dist/resolver.cjs +15 -0
  25. package/dist/resolver.cjs.map +1 -1
  26. package/dist/resolver.d.cts +11 -2
  27. package/dist/resolver.d.ts +11 -2
  28. package/dist/resolver.js +15 -0
  29. package/dist/resolver.js.map +1 -1
  30. package/dist/{route-C1XNcubB.d.ts → route-PUuEuEug.d.ts} +7 -2
  31. package/dist/{route-C55jsF4B.d.cts → route-QL2Vqf2e.d.cts} +7 -2
  32. package/dist/route.cjs +2 -0
  33. package/dist/route.cjs.map +1 -1
  34. package/dist/route.d.cts +2 -2
  35. package/dist/route.d.ts +2 -2
  36. package/dist/route.js +2 -0
  37. package/dist/route.js.map +1 -1
  38. 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-fvR92hW7.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-fvR92hW7.cjs';
3
- import { C as ContentIrHost, K as KindRouteEnv, a as KindDefinitionSource } from './route-C55jsF4B.cjs';
4
- export { b as ContentIrRenderSeams, D as DB_KIND_COMPONENT_KEY, G as GENERIC_STRUCTURED_COMPONENT_KEY, c as GenericFallbackReason, I as IR_PROVISIONAL_KEY, d as IR_ROUTE_KEY, e as IrRenderBlock, f as IrRoutableBlock, g as IrRouteMarker, h as KindRouteBinding, i as KindRouteOptions, P as PartialRenderOptions, j as ProvisionalKindRender, S as StructuredValueRenderProps, k as applyIrKindRoute, l as createKindRouteBinding, m as envelopeFromPartialKind, n as isPartialReadyKind, o as isProvisionalBlock, p as kindServerDataFromStoredValue, q as markKindPartialUnsafe, r as readIrRouteMarker, s as resetPartialUnsafeKinds, t as resetSourcelessDbRowReports, u as resolveAnnouncedKindLoading, v as resolveProvisionalKindRender, w as routeEnvOf } from './route-C55jsF4B.cjs';
1
+ import { C as ComponentResolutionSource, a as ComponentResolution, b as ContentIrErrorReporter } from './component-resolution.types-DLO2w-0n.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-DLO2w-0n.cjs';
3
+ import { C as ContentIrHost, K as KindRouteEnv, a as KindDefinitionSource } from './route-QL2Vqf2e.cjs';
4
+ export { b as ContentIrRenderSeams, D as DB_KIND_COMPONENT_KEY, G as GENERIC_STRUCTURED_COMPONENT_KEY, c as GenericFallbackReason, I as IR_PROVISIONAL_KEY, d as IR_ROUTE_KEY, e as IrRenderBlock, f as IrRoutableBlock, g as IrRouteMarker, h as KindRouteBinding, i as KindRouteOptions, P as PartialRenderOptions, j as ProvisionalKindRender, S as StructuredValueRenderProps, k as applyIrKindRoute, l as createKindRouteBinding, m as envelopeFromPartialKind, n as isPartialReadyKind, o as isProvisionalBlock, p as kindServerDataFromStoredValue, q as markKindPartialUnsafe, r as readIrRouteMarker, s as resetPartialUnsafeKinds, t as resetSourcelessDbRowReports, u as resolveAnnouncedKindLoading, v as resolveProvisionalKindRender, w as routeEnvOf } from './route-QL2Vqf2e.cjs';
5
5
  import * as React from 'react';
6
6
  import React__default, { ReactNode } from 'react';
7
7
  export { ComponentResolver, ComponentResolverOptions } from './resolver.cjs';
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-fvR92hW7.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-fvR92hW7.js';
3
- import { C as ContentIrHost, K as KindRouteEnv, a as KindDefinitionSource } from './route-C1XNcubB.js';
4
- export { b as ContentIrRenderSeams, D as DB_KIND_COMPONENT_KEY, G as GENERIC_STRUCTURED_COMPONENT_KEY, c as GenericFallbackReason, I as IR_PROVISIONAL_KEY, d as IR_ROUTE_KEY, e as IrRenderBlock, f as IrRoutableBlock, g as IrRouteMarker, h as KindRouteBinding, i as KindRouteOptions, P as PartialRenderOptions, j as ProvisionalKindRender, S as StructuredValueRenderProps, k as applyIrKindRoute, l as createKindRouteBinding, m as envelopeFromPartialKind, n as isPartialReadyKind, o as isProvisionalBlock, p as kindServerDataFromStoredValue, q as markKindPartialUnsafe, r as readIrRouteMarker, s as resetPartialUnsafeKinds, t as resetSourcelessDbRowReports, u as resolveAnnouncedKindLoading, v as resolveProvisionalKindRender, w as routeEnvOf } from './route-C1XNcubB.js';
1
+ import { C as ComponentResolutionSource, a as ComponentResolution, b as ContentIrErrorReporter } from './component-resolution.types-DLO2w-0n.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-DLO2w-0n.js';
3
+ import { C as ContentIrHost, K as KindRouteEnv, a as KindDefinitionSource } from './route-PUuEuEug.js';
4
+ export { b as ContentIrRenderSeams, D as DB_KIND_COMPONENT_KEY, G as GENERIC_STRUCTURED_COMPONENT_KEY, c as GenericFallbackReason, I as IR_PROVISIONAL_KEY, d as IR_ROUTE_KEY, e as IrRenderBlock, f as IrRoutableBlock, g as IrRouteMarker, h as KindRouteBinding, i as KindRouteOptions, P as PartialRenderOptions, j as ProvisionalKindRender, S as StructuredValueRenderProps, k as applyIrKindRoute, l as createKindRouteBinding, m as envelopeFromPartialKind, n as isPartialReadyKind, o as isProvisionalBlock, p as kindServerDataFromStoredValue, q as markKindPartialUnsafe, r as readIrRouteMarker, s as resetPartialUnsafeKinds, t as resetSourcelessDbRowReports, u as resolveAnnouncedKindLoading, v as resolveProvisionalKindRender, w as routeEnvOf } from './route-PUuEuEug.js';
5
5
  import * as React from 'react';
6
6
  import React__default, { ReactNode } from 'react';
7
7
  export { ComponentResolver, ComponentResolverOptions } from './resolver.js';
package/dist/index.js CHANGED
@@ -60,6 +60,13 @@ var ComponentResolver = class {
60
60
  db = /* @__PURE__ */ new Map();
61
61
  warmPromise = null;
62
62
  warmFailureLogged = false;
63
+ /**
64
+ * True once a list load has RUN TO COMPLETION (success or failure), or once
65
+ * any rows have been ingested by any tier. Until then `resolve()` answering
66
+ * null means "I have not looked yet" — never "no such component". See THE
67
+ * COLD-VERDICT RULE on `ComponentResolutionSource.hasSettled`.
68
+ */
69
+ settled = false;
63
70
  /**
64
71
  * When the last successful wholesale refresh landed, or null for "never".
65
72
  * Explicitly nullable rather than 0: with a host-supplied clock that starts
@@ -173,6 +180,7 @@ var ComponentResolver = class {
173
180
  * and is_active flips all take effect. Always notifies.
174
181
  */
175
182
  replaceDbRows(rows) {
183
+ this.settled = true;
176
184
  this.db.clear();
177
185
  this.coldMisses.clear();
178
186
  for (const row of rows) {
@@ -317,6 +325,7 @@ var ComponentResolver = class {
317
325
  if (!this.warmPromise) {
318
326
  this.warmPromise = loadAll().then((rows) => {
319
327
  this.ingestDbRows(rows);
328
+ this.settled = true;
320
329
  }).catch((error) => {
321
330
  const message = `component-resolver warm load failed (compiled bootstrap still serving): ${describe(error)}`;
322
331
  if (!this.warmFailureLogged) {
@@ -329,11 +338,17 @@ var ComponentResolver = class {
329
338
  ...errorFields(error),
330
339
  raw: error
331
340
  });
341
+ this.settled = true;
332
342
  this.warmPromise = null;
333
343
  });
334
344
  }
335
345
  return this.warmPromise;
336
346
  }
347
+ /** @see ComponentResolutionSource.hasSettled */
348
+ hasSettled() {
349
+ if (!this.options.loadAll) return true;
350
+ return this.settled || this.db.size > 0;
351
+ }
337
352
  };
338
353
 
339
354
  // route/kind-route.ts
@@ -424,6 +439,8 @@ function applyIrKindRoute(block, env, options) {
424
439
  if (envelope.root.kindState === "pending_schema") return block;
425
440
  const def = env.kinds.getDefinition(kind);
426
441
  const resolution = env.components.resolve(kind, env.platform, "output");
442
+ const componentsSettled = env.components.hasSettled?.() ?? true;
443
+ if (!componentsSettled && !resolution && !def) return block;
427
444
  if (envelope.root.kindState === "raw") {
428
445
  return routeToGeneric(
429
446
  block,