@carbonenginejs/runtime-utils 0.1.1 → 0.1.3

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 (104) hide show
  1. package/LICENSE +21 -21
  2. package/NOTICE +23 -23
  3. package/README.md +69 -69
  4. package/THIRD-PARTY-NOTICES.md +64 -64
  5. package/docs/README.md +74 -73
  6. package/docs/architecture.md +101 -101
  7. package/docs/concepts/foundation-consolidation.md +85 -85
  8. package/docs/concepts/model-lifecycle.md +111 -0
  9. package/docs/const-kb.md +85 -87
  10. package/docs/core-types/DECORATOR-TODOS.md +25 -25
  11. package/docs/core-types/README.md +229 -168
  12. package/docs/reference/api.md +105 -102
  13. package/docs/reference/classes/README.md +135 -135
  14. package/package.json +139 -139
  15. package/src/arrays.js +5 -5
  16. package/src/audio/audioFormats.js +34 -34
  17. package/src/audio/index.js +1 -1
  18. package/src/box3.js +331 -331
  19. package/src/bytes.js +56 -56
  20. package/src/compression.js +56 -56
  21. package/src/constants/index.js +7 -7
  22. package/src/constants/trinity.js +13 -13
  23. package/src/constants.js +15 -15
  24. package/src/curve.js +79 -79
  25. package/src/d3d/dxgiFormats.js +46 -46
  26. package/src/d3d/index.js +2 -2
  27. package/src/d3d/primitiveTopology.js +11 -11
  28. package/src/document/CjsCarbonDocument.js +212 -212
  29. package/src/document/CjsClassRegistry.js +373 -373
  30. package/src/document/CjsDocumentDehydrator.js +142 -142
  31. package/src/document/CjsDocumentHydrator.js +156 -156
  32. package/src/document/CjsStructRegistry.js +348 -348
  33. package/src/document/hydrationAdapter.js +129 -129
  34. package/src/document/index.js +6 -6
  35. package/src/errors/CjsError.js +286 -286
  36. package/src/errors/index.js +5 -5
  37. package/src/geometry/box.js +22 -22
  38. package/src/geometry/cylinder.js +22 -22
  39. package/src/geometry/helpers/earcut.js +1 -1
  40. package/src/geometry/helpers/misc.js +3 -3
  41. package/src/geometry/index.js +8 -8
  42. package/src/geometry/json.js +67 -67
  43. package/src/geometry/lathe.js +44 -44
  44. package/src/geometry/plane.js +14 -14
  45. package/src/geometry/shape.js +4 -4
  46. package/src/geometry/sphere.js +24 -24
  47. package/src/geometry/torus.js +14 -14
  48. package/src/graphics/colorSpaces.js +22 -22
  49. package/src/graphics/index.js +4 -4
  50. package/src/graphics/pixelFormats.js +158 -158
  51. package/src/graphics/textureDimensions.js +22 -22
  52. package/src/graphics/trinityEnums.js +87 -87
  53. package/src/index.js +62 -62
  54. package/src/is.js +108 -46
  55. package/src/json.js +23 -23
  56. package/src/lifecycle/CjsLifecycleState.js +77 -77
  57. package/src/lifecycle/index.js +1 -1
  58. package/src/lne3.js +70 -70
  59. package/src/lookup.js +48 -48
  60. package/src/mat3.js +51 -51
  61. package/src/mat4.js +699 -699
  62. package/src/math/index.js +25 -25
  63. package/src/math/scalar.js +63 -63
  64. package/src/media/index.js +1 -1
  65. package/src/media/mediaTypes.js +50 -50
  66. package/src/mesh.js +424 -424
  67. package/src/model/CjsEventEmitter.js +333 -333
  68. package/src/model/CjsModel.js +1589 -1544
  69. package/src/model/CjsModelState.js +72 -72
  70. package/src/model/index.js +4 -4
  71. package/src/model/sourceRecordUtils.js +54 -54
  72. package/src/noise.js +310 -310
  73. package/src/num.js +827 -827
  74. package/src/object.js +39 -39
  75. package/src/path.js +53 -53
  76. package/src/pln.js +125 -125
  77. package/src/pool.js +9 -9
  78. package/src/quat.js +144 -144
  79. package/src/ray3.js +188 -188
  80. package/src/renderContext/formats.js +145 -145
  81. package/src/renderContext/index.js +5 -5
  82. package/src/renderContext/presentation.js +125 -125
  83. package/src/renderContext/resources.js +27 -27
  84. package/src/renderContext/upscaling.js +22 -22
  85. package/src/renderContext/window.js +20 -20
  86. package/src/runtime/CjsRuntimeState.js +50 -50
  87. package/src/schema/CjsSchema.js +555 -318
  88. package/src/schema/index.js +4 -4
  89. package/src/shader/index.js +1 -1
  90. package/src/shader/shaderStages.js +37 -37
  91. package/src/sph3.js +181 -181
  92. package/src/tangent.js +288 -288
  93. package/src/text.js +40 -40
  94. package/src/tri3.js +98 -98
  95. package/src/types/carbonTypes.js +635 -635
  96. package/src/types/index.js +2 -2
  97. package/src/utils.js +58 -58
  98. package/src/validation.js +46 -46
  99. package/src/vec2.js +229 -229
  100. package/src/vec3.js +1188 -1172
  101. package/src/vec4.js +347 -347
  102. package/src/vertex.js +108 -108
  103. package/src/webgpu/index.js +1 -1
  104. package/src/webgpu/textureFormats.js +121 -121
@@ -1,112 +1,115 @@
1
- # Runtime utilities API
2
-
3
- Status: Evolving
4
- Scope: `@carbonenginejs/runtime-utils` version 0.1
5
- Audience: Library users and runtime authors
6
- Summary: Lists the consolidated public API families and utility primitives.
7
-
8
- ## Import contract
9
-
10
- The package root re-exports neutral utilities, math namespaces, and
11
- non-conflicting constants. Type, schema, model, document, hydration, and
12
- lifecycle APIs remain direct-subpath only.
13
-
14
- ```js
15
- import {
16
- asUint8Array,
17
- encodeJson,
18
- isArrayLike,
19
- normalizePath
20
- } from "@carbonenginejs/runtime-utils";
21
- ```
22
-
23
- Every documented subpath can also be imported independently. Subpath imports
24
- make a narrow dependency explicit:
25
-
26
- ```js
27
- import { encodeUtf8 } from "@carbonenginejs/runtime-utils/text";
28
- ```
29
-
30
- ## Current exports
31
-
32
- | Subpath | Purpose | Exports |
33
- | --- | --- | --- |
34
- | `.` | Neutral utilities, math namespaces/scalars, and non-conflicting constants. | Common root surface. |
35
- | [`./arrays`](../../src/arrays.js) | Normalizes nullable values and mutates writable array-like targets. | `toArray`, `copyArrayLike`, `fillArrayLike` |
36
- | [`./bytes`](../../src/bytes.js) | Creates byte views, owned copies, exact buffers, and prefix checks. | `asUint8Array`, `copyBytes`, `toArrayBuffer`, `hasBytePrefix` |
37
- | [`./compression`](../../src/compression.js) | Detects and decompresses gzip through Web-standard streams. | `isGzip`, `decompressBytes`, `decompressGzip`, `decompressGzipIfNeeded` |
38
- | [`./errors`](../../src/errors/index.js) | Represents coded operational failures and Web-compatible cancellation without logging or transport policy. | `CjsError`, `CjsCancellationError`, `CJS_OPERATION_CANCELLED` |
39
- | [`./is`](../../src/is.js) | Provides shared literal-boolean value predicates. | `isTypedArray`, `isArrayLike`, `isFunction`, `isNullish`, `isObject`, `isObjectLike`, `isPlainObject`, `isPromiseLike` |
40
- | [`./json`](../../src/json.js) | Encodes and decodes JSON with explicit UTF-8 behavior. | `encodeJson`, `decodeJson` |
1
+ # Runtime utilities API
2
+
3
+ Status: Evolving
4
+ Scope: `@carbonenginejs/runtime-utils` version 0.1
5
+ Audience: Library users and runtime authors
6
+ Summary: Lists the consolidated public API families and utility primitives.
7
+
8
+ ## Import contract
9
+
10
+ The package root re-exports neutral utilities, math namespaces, and
11
+ non-conflicting constants. Type, schema, model, document, hydration, and
12
+ lifecycle APIs remain direct-subpath only.
13
+
14
+ ```js
15
+ import {
16
+ asUint8Array,
17
+ encodeJson,
18
+ isArrayLike,
19
+ normalizePath
20
+ } from "@carbonenginejs/runtime-utils";
21
+ ```
22
+
23
+ Every documented subpath can also be imported independently. Subpath imports
24
+ make a narrow dependency explicit:
25
+
26
+ ```js
27
+ import { encodeUtf8 } from "@carbonenginejs/runtime-utils/text";
28
+ ```
29
+
30
+ ## Current exports
31
+
32
+ | Subpath | Purpose | Exports |
33
+ | --- | --- | --- |
34
+ | `.` | Neutral utilities, math namespaces/scalars, and non-conflicting constants. | Common root surface. |
35
+ | [`./arrays`](../../src/arrays.js) | Normalizes nullable values and mutates writable array-like targets. | `toArray`, `copyArrayLike`, `fillArrayLike` |
36
+ | [`./bytes`](../../src/bytes.js) | Creates byte views, owned copies, exact buffers, and prefix checks. | `asUint8Array`, `copyBytes`, `toArrayBuffer`, `hasBytePrefix` |
37
+ | [`./compression`](../../src/compression.js) | Detects and decompresses gzip through Web-standard streams. | `isGzip`, `decompressBytes`, `decompressGzip`, `decompressGzipIfNeeded` |
38
+ | [`./errors`](../../src/errors/index.js) | Represents coded operational failures and Web-compatible cancellation without logging or transport policy. | `CjsError`, `CjsCancellationError`, `CJS_OPERATION_CANCELLED` |
39
+ | [`./is`](../../src/is.js) | Provides shared literal-boolean value predicates. | `isTypedArray`, `isArrayLike`, `isFunction`, `isNullish`, `isObject`, `isObjectLike`, `isPlainObject`, `isPromiseLike` |
40
+ | [`./json`](../../src/json.js) | Encodes and decodes JSON with explicit UTF-8 behavior. | `encodeJson`, `decodeJson` |
41
41
  | [`./lookup`](../../src/lookup.js) | Supplies stable string ordering and duplicate-safe map construction. | `compareCodeUnits`, `sortStrings`, `indexBy` |
42
42
  | [`./math`](../../src/math/index.js) | Aggregates scalar and container math. | Scalar exports plus math namespaces. |
43
43
  | [`./math/scalar`](../../src/math/scalar.js) | Supplies scalar limits, interpolation, angle conversion, wrapping, and smooth steps. | `defaultEpsilon`, `tau`, `clamp`, `saturate`, `lerp`, `approximatelyEqual`, `degreesToRadians`, `radiansToDegrees`, `wrapDegrees`, `wrapRadians`, `cubicHermite`, `cubicHermiteDerivative`, `smoothStep`, `smootherStep` |
44
+ | [`./object`](../../src/object.js) | Provides promise-aware own-property lookup without changing the caller's object. | `hasOwnThen` |
44
45
  | [`./path`](../../src/path.js) | Normalizes generic and case-insensitive resource paths without filesystem access or dot-segment resolution. | `normalizePath`, `normalizeResourcePath`, `getResourceExtension`, `normalizeResourceExtension` |
45
- | [`./text`](../../src/text.js) | Encodes and decodes UTF-8 through Web-standard codecs. | `encodeUtf8`, `decodeUtf8` |
46
- | [`./validation`](../../src/validation.js) | Provides small labelled assertions for shared input contracts. | `isPlainObject`, `assertPlainObject`, `assertNonEmptyString`, `assertSupportedVersion` |
47
-
48
- Math containers retain top-level subpaths such as `./num`, `./vec2`, `./vec3`,
49
- `./vec4`, `./quat`, `./mat3`, `./mat4`, `./geometry`, `./mesh`, and
50
- `./tangent`. Matching `./math/*` aliases are also exported.
51
-
46
+ | [`./text`](../../src/text.js) | Encodes and decodes UTF-8 through Web-standard codecs. | `encodeUtf8`, `decodeUtf8` |
47
+ | [`./validation`](../../src/validation.js) | Provides small labelled assertions for shared input contracts. | `isPlainObject`, `assertPlainObject`, `assertNonEmptyString`, `assertSupportedVersion` |
48
+
49
+ Math containers retain top-level subpaths such as `./num`, `./vec2`, `./vec3`,
50
+ `./vec4`, `./quat`, `./mat3`, `./mat4`, `./geometry`, `./mesh`, and
51
+ `./tangent`. Matching `./math/*` aliases are also exported.
52
+
52
53
  Constant families use `./media`, `./graphics`, `./render-context`, `./audio`,
53
54
  `./shader`, `./d3d`, and `./webgpu`; matching `./const/*` aliases are
54
55
  available. `render-context` stays out of the root because its numeric
55
56
  `PixelFormat` intentionally differs from graphics' string vocabulary.
56
-
57
- Carbon foundation families use `./types`, `./schema`, `./model`,
58
- `./document`, `./hydration`, and `./lifecycle`.
59
-
60
- ## Operational error contract
61
-
62
- `CjsError` represents an operation that failed after valid input reached a
63
- runtime boundary. Package owners define their own stable uppercase `CJS_*`
64
- codes; this family does not maintain a central code registry.
65
-
66
- ```js
67
- import { CjsError } from "@carbonenginejs/runtime-utils/errors";
68
-
69
- throw new CjsError(
70
- "CJS_EXAMPLE_PROVIDER_FAILED",
71
- "The example provider could not resolve the requested item.",
72
- {
73
- cause,
74
- details: {
75
- itemId,
76
- provider
77
- }
78
- }
79
- );
80
- ```
81
-
82
- The optional `cause` retains its original identity. Optional `details` must be
83
- a plain record containing JSON-safe values; the constructor clones and deeply
84
- freezes it. It does not redact details, so callers must exclude credentials,
85
- private payloads, and other sensitive values.
86
-
87
- Use native `TypeError`, `RangeError`, and `SyntaxError` for programmer-contract
88
- violations. An expected `Find*` miss may return `null`; use a coded operational
89
- error when acquisition, provider, state, or resolution work actually fails.
90
- Native `AggregateError` remains the aggregate mechanism.
91
-
92
- `CjsCancellationError` has stable code `CJS_OPERATION_CANCELLED`, uses the
93
- Web-compatible name `AbortError`, and accepts the same cause/details options.
94
- `CjsCancellationError.is(error)` also recognizes platform abort errors.
95
- `CjsError.hasCode(error, code)` works with both `CjsError` and legacy errors
96
- that expose a stable `code`.
97
-
98
- These classes do not log, serialize, choose HTTP status, prescribe retries, or
99
- translate errors for user interfaces.
100
-
101
- ## Environment contract
102
-
103
- The source uses standard ECMAScript and browser APIs. Compression requires
104
- `DecompressionStream` and `Response`; text helpers require `TextEncoder` and
105
- `TextDecoder`. When an API is unavailable, the relevant helper reports an
106
- explicit unsupported-environment error rather than importing a Node fallback.
107
-
108
- ## Detailed family references
109
-
57
+ `./const/trinity` exports the shared `Tr2Lod` vocabulary.
58
+
59
+ Carbon foundation families use `./types`, `./schema`, `./model`,
60
+ `./document`, `./hydration`, and `./lifecycle`.
61
+
62
+ ## Operational error contract
63
+
64
+ `CjsError` represents an operation that failed after valid input reached a
65
+ runtime boundary. Package owners define their own stable uppercase `CJS_*`
66
+ codes; this family does not maintain a central code registry.
67
+
68
+ ```js
69
+ import { CjsError } from "@carbonenginejs/runtime-utils/errors";
70
+
71
+ throw new CjsError(
72
+ "CJS_EXAMPLE_PROVIDER_FAILED",
73
+ "The example provider could not resolve the requested item.",
74
+ {
75
+ cause,
76
+ details: {
77
+ itemId,
78
+ provider
79
+ }
80
+ }
81
+ );
82
+ ```
83
+
84
+ The optional `cause` retains its original identity. Optional `details` must be
85
+ a plain record containing JSON-safe values; the constructor clones and deeply
86
+ freezes it. It does not redact details, so callers must exclude credentials,
87
+ private payloads, and other sensitive values.
88
+
89
+ Use native `TypeError`, `RangeError`, and `SyntaxError` for programmer-contract
90
+ violations. An expected `Find*` miss may return `null`; use a coded operational
91
+ error when acquisition, provider, state, or resolution work actually fails.
92
+ Native `AggregateError` remains the aggregate mechanism.
93
+
94
+ `CjsCancellationError` has stable code `CJS_OPERATION_CANCELLED`, uses the
95
+ Web-compatible name `AbortError`, and accepts the same cause/details options.
96
+ `CjsCancellationError.is(error)` also recognizes platform abort errors.
97
+ `CjsError.hasCode(error, code)` works with both `CjsError` and legacy errors
98
+ that expose a stable `code`.
99
+
100
+ These classes do not log, serialize, choose HTTP status, prescribe retries, or
101
+ translate errors for user interfaces.
102
+
103
+ ## Environment contract
104
+
105
+ The source uses standard ECMAScript and browser APIs. Compression requires
106
+ `DecompressionStream` and `Response`; text helpers require `TextEncoder` and
107
+ `TextDecoder`. When an API is unavailable, the relevant helper reports an
108
+ explicit unsupported-environment error rather than importing a Node fallback.
109
+
110
+ ## Detailed family references
111
+
110
112
  See the package README, the retained
111
- [Carbon type/model guide](../core-types/README.md), and the source-backed
113
+ [Carbon type/model guide](../core-types/README.md),
114
+ [model lifecycle](../concepts/model-lifecycle.md), and the source-backed
112
115
  subpath tests for the complete per-family surface.
@@ -1,135 +1,135 @@
1
- # Runtime-utils class reference
2
-
3
- Status: Evolving
4
- Scope: `@carbonenginejs/runtime-utils` class exports
5
- Audience: Runtime authors and integrators
6
- Summary: Catalogs maintained named classes in the consolidated runtime foundation.
7
-
8
- <!-- class:CjsError -->
9
- ## `CjsError`
10
-
11
- Represents one structured operational failure with a stable CarbonEngineJS code.
12
-
13
- - Export: `@carbonenginejs/runtime-utils/errors`
14
- - Source: `src/errors/CjsError.js`
15
- - Visibility: Public
16
- - Kind: CarbonEngineJS
17
-
18
- <!-- class:CjsCancellationError -->
19
- ## `CjsCancellationError`
20
-
21
- Represents one cancelled operation using Web-compatible abort identity.
22
-
23
- - Export: `@carbonenginejs/runtime-utils/errors`
24
- - Source: `src/errors/CjsError.js`
25
- - Visibility: Public
26
- - Kind: CarbonEngineJS
27
-
28
- <!-- class:CjsCarbonDocument -->
29
- ## `CjsCarbonDocument`
30
-
31
- Represents one neutral Carbon document graph for hydration and dehydration.
32
-
33
- - Export: `@carbonenginejs/runtime-utils/document`
34
- - Source: `src/document/CjsCarbonDocument.js`
35
- - Visibility: Public
36
- - Kind: CarbonEngineJS
37
-
38
- <!-- class:CjsClassRegistry -->
39
- ## `CjsClassRegistry`
40
-
41
- Maps serialized Carbon class names to explicit runtime constructors.
42
-
43
- - Export: `@carbonenginejs/runtime-utils/document`
44
- - Source: `src/document/CjsClassRegistry.js`
45
- - Visibility: Public
46
- - Kind: CarbonEngineJS
47
-
48
- <!-- class:CjsDocumentDehydrator -->
49
- ## `CjsDocumentDehydrator`
50
-
51
- Converts runtime object graphs into neutral Carbon documents.
52
-
53
- - Export: `@carbonenginejs/runtime-utils/document`
54
- - Source: `src/document/CjsDocumentDehydrator.js`
55
- - Visibility: Public
56
- - Kind: CarbonEngineJS
57
-
58
- <!-- class:CjsDocumentHydrator -->
59
- ## `CjsDocumentHydrator`
60
-
61
- Constructs runtime object graphs from neutral Carbon documents.
62
-
63
- - Export: `@carbonenginejs/runtime-utils/document`
64
- - Source: `src/document/CjsDocumentHydrator.js`
65
- - Visibility: Public
66
- - Kind: CarbonEngineJS
67
-
68
- <!-- class:CjsStructRegistry -->
69
- ## `CjsStructRegistry`
70
-
71
- Maps serialized Carbon struct names to explicit constructors and layouts.
72
-
73
- - Export: `@carbonenginejs/runtime-utils/document`
74
- - Source: `src/document/CjsStructRegistry.js`
75
- - Visibility: Public
76
- - Kind: CarbonEngineJS
77
-
78
- <!-- class:CjsLifecycleState -->
79
- ## `CjsLifecycleState`
80
-
81
- Inspectable lifecycle state shared by participating runtime objects.
82
-
83
- - Export: `@carbonenginejs/runtime-utils/lifecycle`
84
- - Source: `src/lifecycle/CjsLifecycleState.js`
85
- - Visibility: Public
86
- - Kind: CarbonEngineJS
87
-
88
- <!-- class:CjsEventEmitter -->
89
- ## `CjsEventEmitter`
90
-
91
- Minimal event emitter with lowercase exact-name dispatch.
92
-
93
- - Export: `@carbonenginejs/runtime-utils/model`
94
- - Source: `src/model/CjsEventEmitter.js`
95
- - Visibility: Public
96
- - Kind: CarbonEngineJS
97
-
98
- <!-- class:CjsModel -->
99
- ## `CjsModel`
100
-
101
- Shared base for schema-backed CarbonEngineJS runtime classes.
102
-
103
- - Export: `@carbonenginejs/runtime-utils/model`
104
- - Source: `src/model/CjsModel.js`
105
- - Visibility: Public
106
- - Kind: CarbonEngineJS
107
-
108
- <!-- class:CjsPendingReference -->
109
- ## `CjsPendingReference`
110
-
111
- Represents one unresolved model reference during a single import operation.
112
-
113
- - Source: `src/model/CjsModel.js`
114
- - Visibility: Internal
115
- - Kind: CarbonEngineJS
116
-
117
- <!-- class:CjsModelState -->
118
- ## `CjsModelState`
119
-
120
- Per-model runtime state.
121
-
122
- - Export: `@carbonenginejs/runtime-utils/model`
123
- - Source: `src/model/CjsModelState.js`
124
- - Visibility: Public
125
- - Kind: CarbonEngineJS
126
-
127
- <!-- class:CjsSchema -->
128
- ## `CjsSchema`
129
-
130
- Reusable schema/decorator metadata surface.
131
-
132
- - Export: `@carbonenginejs/runtime-utils/schema`
133
- - Source: `src/schema/CjsSchema.js`
134
- - Visibility: Public
135
- - Kind: CarbonEngineJS
1
+ # Runtime-utils class reference
2
+
3
+ Status: Evolving
4
+ Scope: `@carbonenginejs/runtime-utils` class exports
5
+ Audience: Runtime authors and integrators
6
+ Summary: Catalogs maintained named classes in the consolidated runtime foundation.
7
+
8
+ <!-- class:CjsError -->
9
+ ## `CjsError`
10
+
11
+ Represents one structured operational failure with a stable CarbonEngineJS code.
12
+
13
+ - Export: `@carbonenginejs/runtime-utils/errors`
14
+ - Source: `src/errors/CjsError.js`
15
+ - Visibility: Public
16
+ - Kind: CarbonEngineJS
17
+
18
+ <!-- class:CjsCancellationError -->
19
+ ## `CjsCancellationError`
20
+
21
+ Represents one cancelled operation using Web-compatible abort identity.
22
+
23
+ - Export: `@carbonenginejs/runtime-utils/errors`
24
+ - Source: `src/errors/CjsError.js`
25
+ - Visibility: Public
26
+ - Kind: CarbonEngineJS
27
+
28
+ <!-- class:CjsCarbonDocument -->
29
+ ## `CjsCarbonDocument`
30
+
31
+ Represents one neutral Carbon document graph for hydration and dehydration.
32
+
33
+ - Export: `@carbonenginejs/runtime-utils/document`
34
+ - Source: `src/document/CjsCarbonDocument.js`
35
+ - Visibility: Public
36
+ - Kind: CarbonEngineJS
37
+
38
+ <!-- class:CjsClassRegistry -->
39
+ ## `CjsClassRegistry`
40
+
41
+ Maps serialized Carbon class names to explicit runtime constructors.
42
+
43
+ - Export: `@carbonenginejs/runtime-utils/document`
44
+ - Source: `src/document/CjsClassRegistry.js`
45
+ - Visibility: Public
46
+ - Kind: CarbonEngineJS
47
+
48
+ <!-- class:CjsDocumentDehydrator -->
49
+ ## `CjsDocumentDehydrator`
50
+
51
+ Converts runtime object graphs into neutral Carbon documents.
52
+
53
+ - Export: `@carbonenginejs/runtime-utils/document`
54
+ - Source: `src/document/CjsDocumentDehydrator.js`
55
+ - Visibility: Public
56
+ - Kind: CarbonEngineJS
57
+
58
+ <!-- class:CjsDocumentHydrator -->
59
+ ## `CjsDocumentHydrator`
60
+
61
+ Constructs runtime object graphs from neutral Carbon documents.
62
+
63
+ - Export: `@carbonenginejs/runtime-utils/document`
64
+ - Source: `src/document/CjsDocumentHydrator.js`
65
+ - Visibility: Public
66
+ - Kind: CarbonEngineJS
67
+
68
+ <!-- class:CjsStructRegistry -->
69
+ ## `CjsStructRegistry`
70
+
71
+ Maps serialized Carbon struct names to explicit constructors and layouts.
72
+
73
+ - Export: `@carbonenginejs/runtime-utils/document`
74
+ - Source: `src/document/CjsStructRegistry.js`
75
+ - Visibility: Public
76
+ - Kind: CarbonEngineJS
77
+
78
+ <!-- class:CjsLifecycleState -->
79
+ ## `CjsLifecycleState`
80
+
81
+ Inspectable lifecycle state shared by participating runtime objects.
82
+
83
+ - Export: `@carbonenginejs/runtime-utils/lifecycle`
84
+ - Source: `src/lifecycle/CjsLifecycleState.js`
85
+ - Visibility: Public
86
+ - Kind: CarbonEngineJS
87
+
88
+ <!-- class:CjsEventEmitter -->
89
+ ## `CjsEventEmitter`
90
+
91
+ Minimal event emitter with lowercase exact-name dispatch.
92
+
93
+ - Export: `@carbonenginejs/runtime-utils/model`
94
+ - Source: `src/model/CjsEventEmitter.js`
95
+ - Visibility: Public
96
+ - Kind: CarbonEngineJS
97
+
98
+ <!-- class:CjsModel -->
99
+ ## `CjsModel`
100
+
101
+ Shared base for schema-backed CarbonEngineJS runtime classes.
102
+
103
+ - Export: `@carbonenginejs/runtime-utils/model`
104
+ - Source: `src/model/CjsModel.js`
105
+ - Visibility: Public
106
+ - Kind: CarbonEngineJS
107
+
108
+ <!-- class:CjsPendingReference -->
109
+ ## `CjsPendingReference`
110
+
111
+ Represents one unresolved model reference during a single import operation.
112
+
113
+ - Source: `src/model/CjsModel.js`
114
+ - Visibility: Internal
115
+ - Kind: CarbonEngineJS
116
+
117
+ <!-- class:CjsModelState -->
118
+ ## `CjsModelState`
119
+
120
+ Per-model runtime state.
121
+
122
+ - Export: `@carbonenginejs/runtime-utils/model`
123
+ - Source: `src/model/CjsModelState.js`
124
+ - Visibility: Public
125
+ - Kind: CarbonEngineJS
126
+
127
+ <!-- class:CjsSchema -->
128
+ ## `CjsSchema`
129
+
130
+ Reusable schema/decorator metadata surface.
131
+
132
+ - Export: `@carbonenginejs/runtime-utils/schema`
133
+ - Source: `src/schema/CjsSchema.js`
134
+ - Visibility: Public
135
+ - Kind: CarbonEngineJS