@ai-matrx/content-ir-react 0.8.0 → 0.9.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/CHANGELOG.md +51 -0
- package/dist/{component-resolution.types-BS1ySIg-.d.cts → component-resolution.types-C1MzCf2s.d.cts} +13 -0
- package/dist/{component-resolution.types-BS1ySIg-.d.ts → component-resolution.types-C1MzCf2s.d.ts} +13 -0
- package/dist/{component-resolution.types-fvR92hW7.d.cts → component-resolution.types-DLO2w-0n.d.cts} +13 -0
- package/dist/{component-resolution.types-fvR92hW7.d.ts → component-resolution.types-DLO2w-0n.d.ts} +13 -0
- package/dist/db-component.d.cts +1 -1
- package/dist/db-component.d.ts +1 -1
- package/dist/{host-types-DvGv8s9L.d.cts → host-types-CDcLW0TD.d.cts} +7 -2
- package/dist/{host-types-CZ_Bkp4R.d.ts → host-types-CpItjcYh.d.ts} +7 -2
- package/dist/host.cjs.map +1 -1
- package/dist/host.d.cts +3 -3
- package/dist/host.d.ts +3 -3
- package/dist/host.js.map +1 -1
- package/dist/index.cjs +16 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js.map +1 -1
- package/dist/resolver.cjs +14 -0
- package/dist/resolver.cjs.map +1 -1
- package/dist/resolver.d.cts +11 -2
- package/dist/resolver.d.ts +11 -2
- package/dist/resolver.js +14 -0
- package/dist/resolver.js.map +1 -1
- package/dist/{route-C1XNcubB.d.ts → route-PUuEuEug.d.ts} +7 -2
- package/dist/{route-C55jsF4B.d.cts → route-QL2Vqf2e.d.cts} +7 -2
- package/dist/route.cjs +2 -0
- package/dist/route.cjs.map +1 -1
- package/dist/route.d.cts +2 -2
- package/dist/route.d.ts +2 -2
- package/dist/route.js +2 -0
- package/dist/route.js.map +1 -1
- package/package.json +2 -2
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-
|
|
2
|
-
export { c as ComponentRole, d as ContentIrErrorReport, J as JsonObject, K as KindComponentRow, S as SystemComponentEntry, e as consoleErrorReporter } from './component-resolution.types-
|
|
3
|
-
import { C as ContentIrHost, K as KindRouteEnv, a as KindDefinitionSource } from './route-
|
|
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-
|
|
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-
|
|
2
|
-
export { c as ComponentRole, d as ContentIrErrorReport, J as JsonObject, K as KindComponentRow, S as SystemComponentEntry, e as consoleErrorReporter } from './component-resolution.types-
|
|
3
|
-
import { C as ContentIrHost, K as KindRouteEnv, a as KindDefinitionSource } from './route-
|
|
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-
|
|
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
|
|
@@ -317,6 +324,7 @@ var ComponentResolver = class {
|
|
|
317
324
|
if (!this.warmPromise) {
|
|
318
325
|
this.warmPromise = loadAll().then((rows) => {
|
|
319
326
|
this.ingestDbRows(rows);
|
|
327
|
+
this.settled = true;
|
|
320
328
|
}).catch((error) => {
|
|
321
329
|
const message = `component-resolver warm load failed (compiled bootstrap still serving): ${describe(error)}`;
|
|
322
330
|
if (!this.warmFailureLogged) {
|
|
@@ -329,11 +337,17 @@ var ComponentResolver = class {
|
|
|
329
337
|
...errorFields(error),
|
|
330
338
|
raw: error
|
|
331
339
|
});
|
|
340
|
+
this.settled = true;
|
|
332
341
|
this.warmPromise = null;
|
|
333
342
|
});
|
|
334
343
|
}
|
|
335
344
|
return this.warmPromise;
|
|
336
345
|
}
|
|
346
|
+
/** @see ComponentResolutionSource.hasSettled */
|
|
347
|
+
hasSettled() {
|
|
348
|
+
if (!this.options.loadAll) return true;
|
|
349
|
+
return this.settled || this.db.size > 0;
|
|
350
|
+
}
|
|
337
351
|
};
|
|
338
352
|
|
|
339
353
|
// route/kind-route.ts
|
|
@@ -424,6 +438,8 @@ function applyIrKindRoute(block, env, options) {
|
|
|
424
438
|
if (envelope.root.kindState === "pending_schema") return block;
|
|
425
439
|
const def = env.kinds.getDefinition(kind);
|
|
426
440
|
const resolution = env.components.resolve(kind, env.platform, "output");
|
|
441
|
+
const componentsSettled = env.components.hasSettled?.() ?? true;
|
|
442
|
+
if (!componentsSettled && !resolution && !def) return block;
|
|
427
443
|
if (envelope.root.kindState === "raw") {
|
|
428
444
|
return routeToGeneric(
|
|
429
445
|
block,
|