@object-ui/sdui-parser 17.1.0 → 17.3.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.ts CHANGED
@@ -10,12 +10,12 @@ export { parseJsx, interpretBrace } from './parse.js';
10
10
  export { validateTree } from './validate.js';
11
11
  export { generateDts, propsName, generateBlockList } from './codegen.js';
12
12
  export type { CodegenOptions } from './codegen.js';
13
- import type { Diagnostic, Manifest, SchemaElement, ValidationResult } from './types.js';
13
+ import type { Diagnostic, Manifest, SchemaElement, ManifestValidationResult } from './types.js';
14
14
  export interface CompileResult {
15
15
  tree: SchemaElement | null;
16
16
  diagnostics: Diagnostic[];
17
17
  requires: string[];
18
- bindings: ValidationResult['bindings'];
18
+ bindings: ManifestValidationResult['bindings'];
19
19
  /** true when there are no error-severity diagnostics — the save gate's pass/fail */
20
20
  ok: boolean;
21
21
  }
@@ -66,6 +66,23 @@ export interface RegistryConfigLike {
66
66
  * class of bug one layer down).
67
67
  */
68
68
  export declare function assertFullyLoaded(configs: RegistryConfigLike[]): void;
69
+ /**
70
+ * Project registry configs into the SDUI manifest.
71
+ *
72
+ * ⚠️ Every field here is copied from what the registration **declared**. In
73
+ * particular `inputs` is `config.inputs` verbatim — this function does not, and
74
+ * cannot, observe whether the renderer behind the block reads any of them.
75
+ *
76
+ * Worth stating because of what consumes the output. The framework's
77
+ * `check:react-blocks-declaration-parity` diffs this against the spec's zod
78
+ * schemas, and while that check was named `check:react-conformance` it was read
79
+ * — by its own file header — as confirming the components "ACTUALLY implement"
80
+ * the spec's props. It never could: both sides of that diff are declarations,
81
+ * and this is the side this file produces. Four blocks published an `objectName`
82
+ * no renderer read and sailed through it green (objectstack#4413; corrected in
83
+ * objectstack#4472). Evidence about the render path has to come from the render
84
+ * path — see `apps/console/src/__tests__/public-block-binding-reach.test.tsx`.
85
+ */
69
86
  export declare function manifestFromConfigs(configs: RegistryConfigLike[], opts?: {
70
87
  only?: Set<string>;
71
88
  publicOnly?: boolean;
package/dist/index.js CHANGED
@@ -65,6 +65,23 @@ const INPUT_TYPES = new Set([
65
65
  'file',
66
66
  'slot',
67
67
  ]);
68
+ /**
69
+ * Project registry configs into the SDUI manifest.
70
+ *
71
+ * ⚠️ Every field here is copied from what the registration **declared**. In
72
+ * particular `inputs` is `config.inputs` verbatim — this function does not, and
73
+ * cannot, observe whether the renderer behind the block reads any of them.
74
+ *
75
+ * Worth stating because of what consumes the output. The framework's
76
+ * `check:react-blocks-declaration-parity` diffs this against the spec's zod
77
+ * schemas, and while that check was named `check:react-conformance` it was read
78
+ * — by its own file header — as confirming the components "ACTUALLY implement"
79
+ * the spec's props. It never could: both sides of that diff are declarations,
80
+ * and this is the side this file produces. Four blocks published an `objectName`
81
+ * no renderer read and sailed through it green (objectstack#4413; corrected in
82
+ * objectstack#4472). Evidence about the render path has to come from the render
83
+ * path — see `apps/console/src/__tests__/public-block-binding-reach.test.tsx`.
84
+ */
68
85
  export function manifestFromConfigs(configs, opts = {}) {
69
86
  const components = {};
70
87
  for (const c of configs) {
package/dist/types.d.ts CHANGED
@@ -61,8 +61,23 @@ export interface Manifest {
61
61
  /** keyed by component `type` */
62
62
  components: Record<string, ManifestComponent>;
63
63
  }
64
- /** Result of validating a compiled tree against the manifest. */
65
- export interface ValidationResult {
64
+ /**
65
+ * Result of validating a compiled tree against the MANIFEST.
66
+ *
67
+ * Named `ManifestValidationResult`, not `ValidationResult` (objectui#3161,
68
+ * objectstack#4115 ledger batch 7), following the convention registered on
69
+ * objectstack#4115 for this name: **`<what was validated>Validation<Error |
70
+ * Result>`**. `ValidationResult` is exported twice by the spec — `kernel` and
71
+ * `contracts`, both `{ valid, errors?: [{ field, message, code? }], warnings? }`
72
+ * for PLUGIN MANIFEST validation — and `@object-ui/core` took
73
+ * `SchemaNodeValidationResult` under the same convention in batch 4
74
+ * (objectui#3188). Three results, three subjects: a plugin, a schema node, and
75
+ * this one, which carries no `valid` flag at all — it returns `diagnostics`
76
+ * (severity lives per entry), the `requires` set the compiled page needs, and
77
+ * the binding sites the server must resolve. Nothing here is assignable to
78
+ * anything there in either direction.
79
+ */
80
+ export interface ManifestValidationResult {
66
81
  diagnostics: Diagnostic[];
67
82
  /** unique plugin namespaces referenced — the page's `requires` */
68
83
  requires: string[];
@@ -6,5 +6,5 @@
6
6
  * and binding sites the SERVER must resolve against object schema (we cannot
7
7
  * resolve objects/fields here — that check is framework-side by design).
8
8
  */
9
- import type { Manifest, SchemaElement, ValidationResult } from './types.js';
10
- export declare function validateTree(tree: SchemaElement | null, manifest: Manifest): ValidationResult;
9
+ import type { Manifest, SchemaElement, ManifestValidationResult } from './types.js';
10
+ export declare function validateTree(tree: SchemaElement | null, manifest: Manifest): ManifestValidationResult;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@object-ui/sdui-parser",
3
- "version": "17.1.0",
3
+ "version": "17.3.0",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",
@@ -25,8 +25,9 @@
25
25
  "dist"
26
26
  ],
27
27
  "devDependencies": {
28
- "@object-ui/core": "17.1.0",
29
- "@object-ui/react": "17.1.0"
28
+ "@objectstack/spec": "^17.0.0-rc.2",
29
+ "@object-ui/core": "17.3.0",
30
+ "@object-ui/react": "17.3.0"
30
31
  },
31
32
  "scripts": {
32
33
  "build": "tsc",