@memberjunction/react-runtime 6.2.0-edge.0 → 6.2.0-edge.2

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 (149) hide show
  1. package/.turbo/turbo-build.log +14 -14
  2. package/CHANGELOG.md +93 -0
  3. package/dist/compiler/babel-config.d.ts +14 -0
  4. package/dist/compiler/babel-config.d.ts.map +1 -1
  5. package/dist/compiler/babel-config.js +12 -3
  6. package/dist/compiler/babel-config.js.map +1 -1
  7. package/dist/compiler/component-compiler.d.ts +5 -0
  8. package/dist/compiler/component-compiler.d.ts.map +1 -1
  9. package/dist/compiler/component-compiler.js +24 -9
  10. package/dist/compiler/component-compiler.js.map +1 -1
  11. package/dist/compiler/index.d.ts +1 -1
  12. package/dist/compiler/index.d.ts.map +1 -1
  13. package/dist/compiler/index.js +1 -1
  14. package/dist/compiler/index.js.map +1 -1
  15. package/dist/component-manager/component-manager.d.ts +8 -0
  16. package/dist/component-manager/component-manager.d.ts.map +1 -1
  17. package/dist/component-manager/component-manager.js +18 -6
  18. package/dist/component-manager/component-manager.js.map +1 -1
  19. package/dist/index.d.ts +21 -9
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +13 -10
  22. package/dist/index.js.map +1 -1
  23. package/dist/registry/component-registry-service.d.ts +18 -0
  24. package/dist/registry/component-registry-service.d.ts.map +1 -1
  25. package/dist/registry/component-registry-service.js +65 -23
  26. package/dist/registry/component-registry-service.js.map +1 -1
  27. package/dist/registry/component-registry.d.ts +24 -1
  28. package/dist/registry/component-registry.d.ts.map +1 -1
  29. package/dist/registry/component-registry.js +74 -23
  30. package/dist/registry/component-registry.js.map +1 -1
  31. package/dist/registry/component-resolver.d.ts +10 -0
  32. package/dist/registry/component-resolver.d.ts.map +1 -1
  33. package/dist/registry/component-resolver.js +30 -9
  34. package/dist/registry/component-resolver.js.map +1 -1
  35. package/dist/registry/registry-provider.js.map +1 -1
  36. package/dist/runtime/component-hierarchy.d.ts +15 -0
  37. package/dist/runtime/component-hierarchy.d.ts.map +1 -1
  38. package/dist/runtime/component-hierarchy.js +28 -10
  39. package/dist/runtime/component-hierarchy.js.map +1 -1
  40. package/dist/runtime/error-boundary.d.ts +4 -0
  41. package/dist/runtime/error-boundary.d.ts.map +1 -1
  42. package/dist/runtime/error-boundary.js +50 -20
  43. package/dist/runtime/error-boundary.js.map +1 -1
  44. package/dist/runtime/index.d.ts +3 -3
  45. package/dist/runtime/index.d.ts.map +1 -1
  46. package/dist/runtime/index.js +3 -3
  47. package/dist/runtime/index.js.map +1 -1
  48. package/dist/runtime/prop-builder.d.ts +8 -0
  49. package/dist/runtime/prop-builder.d.ts.map +1 -1
  50. package/dist/runtime/prop-builder.js +39 -11
  51. package/dist/runtime/prop-builder.js.map +1 -1
  52. package/dist/runtime/react-root-manager.d.ts +10 -0
  53. package/dist/runtime/react-root-manager.d.ts.map +1 -1
  54. package/dist/runtime/react-root-manager.js +27 -9
  55. package/dist/runtime/react-root-manager.js.map +1 -1
  56. package/dist/runtime.umd.js +194 -125
  57. package/dist/utilities/cache-manager.d.ts +13 -0
  58. package/dist/utilities/cache-manager.d.ts.map +1 -1
  59. package/dist/utilities/cache-manager.js +40 -16
  60. package/dist/utilities/cache-manager.js.map +1 -1
  61. package/dist/utilities/component-error-analyzer.d.ts +3 -0
  62. package/dist/utilities/component-error-analyzer.d.ts.map +1 -1
  63. package/dist/utilities/component-error-analyzer.js +12 -3
  64. package/dist/utilities/component-error-analyzer.js.map +1 -1
  65. package/dist/utilities/component-hash.d.ts +1 -0
  66. package/dist/utilities/component-hash.d.ts.map +1 -1
  67. package/dist/utilities/component-hash.js +4 -1
  68. package/dist/utilities/component-hash.js.map +1 -1
  69. package/dist/utilities/component-library-theming.d.ts +4 -0
  70. package/dist/utilities/component-library-theming.d.ts.map +1 -1
  71. package/dist/utilities/component-library-theming.js +12 -6
  72. package/dist/utilities/component-library-theming.js.map +1 -1
  73. package/dist/utilities/component-styles.d.ts +1 -0
  74. package/dist/utilities/component-styles.d.ts.map +1 -1
  75. package/dist/utilities/component-styles.js +2 -1
  76. package/dist/utilities/component-styles.js.map +1 -1
  77. package/dist/utilities/component-unwrapper.d.ts +8 -2
  78. package/dist/utilities/component-unwrapper.d.ts.map +1 -1
  79. package/dist/utilities/component-unwrapper.js +19 -7
  80. package/dist/utilities/component-unwrapper.js.map +1 -1
  81. package/dist/utilities/core-libraries.d.ts +2 -0
  82. package/dist/utilities/core-libraries.d.ts.map +1 -1
  83. package/dist/utilities/core-libraries.js +9 -3
  84. package/dist/utilities/core-libraries.js.map +1 -1
  85. package/dist/utilities/entity-record-key.d.ts +1 -0
  86. package/dist/utilities/entity-record-key.d.ts.map +1 -1
  87. package/dist/utilities/entity-record-key.js +4 -1
  88. package/dist/utilities/entity-record-key.js.map +1 -1
  89. package/dist/utilities/library-dependency-resolver.d.ts +8 -0
  90. package/dist/utilities/library-dependency-resolver.d.ts.map +1 -1
  91. package/dist/utilities/library-dependency-resolver.js +39 -15
  92. package/dist/utilities/library-dependency-resolver.js.map +1 -1
  93. package/dist/utilities/library-loader.d.ts +12 -0
  94. package/dist/utilities/library-loader.d.ts.map +1 -1
  95. package/dist/utilities/library-loader.js +46 -16
  96. package/dist/utilities/library-loader.js.map +1 -1
  97. package/dist/utilities/library-registry.d.ts +5 -0
  98. package/dist/utilities/library-registry.d.ts.map +1 -1
  99. package/dist/utilities/library-registry.js +20 -5
  100. package/dist/utilities/library-registry.js.map +1 -1
  101. package/dist/utilities/resource-manager.d.ts +19 -0
  102. package/dist/utilities/resource-manager.d.ts.map +1 -1
  103. package/dist/utilities/resource-manager.js +63 -18
  104. package/dist/utilities/resource-manager.js.map +1 -1
  105. package/dist/utilities/runtime-utilities.d.ts +9 -7
  106. package/dist/utilities/runtime-utilities.d.ts.map +1 -1
  107. package/dist/utilities/runtime-utilities.js +22 -16
  108. package/dist/utilities/runtime-utilities.js.map +1 -1
  109. package/dist/utilities/standard-libraries.d.ts +10 -0
  110. package/dist/utilities/standard-libraries.d.ts.map +1 -1
  111. package/dist/utilities/standard-libraries.js +40 -10
  112. package/dist/utilities/standard-libraries.js.map +1 -1
  113. package/dist/utilities/user-state.d.ts +5 -0
  114. package/dist/utilities/user-state.d.ts.map +1 -1
  115. package/dist/utilities/user-state.js +20 -5
  116. package/dist/utilities/user-state.js.map +1 -1
  117. package/package.json +7 -7
  118. package/src/__tests__/error-boundary.test.ts +80 -0
  119. package/src/__tests__/runtime-utilities-factory.test.ts +4 -4
  120. package/src/__tests__/user-state.test.ts +44 -44
  121. package/src/compiler/babel-config.ts +18 -3
  122. package/src/compiler/component-compiler.ts +34 -9
  123. package/src/compiler/index.ts +3 -3
  124. package/src/component-manager/component-manager.ts +36 -6
  125. package/src/index.ts +35 -21
  126. package/src/registry/component-registry-service.ts +126 -23
  127. package/src/registry/component-registry.ts +122 -24
  128. package/src/registry/component-resolver.ts +51 -9
  129. package/src/registry/registry-provider.ts +40 -40
  130. package/src/runtime/component-hierarchy.ts +61 -10
  131. package/src/runtime/error-boundary.ts +77 -22
  132. package/src/runtime/index.ts +16 -16
  133. package/src/runtime/prop-builder.ts +69 -11
  134. package/src/runtime/react-root-manager.ts +48 -10
  135. package/src/utilities/cache-manager.ts +61 -16
  136. package/src/utilities/component-error-analyzer.ts +18 -3
  137. package/src/utilities/component-hash.ts +6 -1
  138. package/src/utilities/component-library-theming.ts +24 -6
  139. package/src/utilities/component-styles.ts +4 -1
  140. package/src/utilities/component-unwrapper.ts +34 -7
  141. package/src/utilities/core-libraries.ts +13 -3
  142. package/src/utilities/entity-record-key.ts +11 -1
  143. package/src/utilities/library-dependency-resolver.ts +66 -15
  144. package/src/utilities/library-loader.ts +81 -17
  145. package/src/utilities/library-registry.ts +30 -5
  146. package/src/utilities/resource-manager.ts +126 -19
  147. package/src/utilities/runtime-utilities.ts +26 -16
  148. package/src/utilities/standard-libraries.ts +60 -10
  149. package/src/utilities/user-state.ts +40 -5
@@ -69,7 +69,7 @@ export class ResourceManager {
69
69
  /**
70
70
  * Register a timeout with automatic cleanup
71
71
  */
72
- setTimeout(
72
+ SetTimeout(
73
73
  componentId: string,
74
74
  callback: () => void,
75
75
  delay: number,
@@ -90,10 +90,20 @@ export class ResourceManager {
90
90
  return id as any;
91
91
  }
92
92
 
93
+ /** @deprecated Use {@link SetTimeout}. */
94
+ setTimeout(
95
+ componentId: string,
96
+ callback: () => void,
97
+ delay: number,
98
+ metadata?: Record<string, any>
99
+ ): number {
100
+ return this.SetTimeout(componentId, callback, delay, metadata);
101
+ }
102
+
93
103
  /**
94
104
  * Register an interval with automatic cleanup
95
105
  */
96
- setInterval(
106
+ SetInterval(
97
107
  componentId: string,
98
108
  callback: () => void,
99
109
  delay: number,
@@ -111,17 +121,27 @@ export class ResourceManager {
111
121
  return id as any;
112
122
  }
113
123
 
124
+ /** @deprecated Use {@link SetInterval}. */
125
+ setInterval(
126
+ componentId: string,
127
+ callback: () => void,
128
+ delay: number,
129
+ metadata?: Record<string, any>
130
+ ): number {
131
+ return this.SetInterval(componentId, callback, delay, metadata);
132
+ }
133
+
114
134
  /**
115
135
  * Register an animation frame with automatic cleanup
116
136
  */
117
- requestAnimationFrame(
137
+ RequestAnimationFrame(
118
138
  componentId: string,
119
139
  callback: FrameRequestCallback,
120
140
  metadata?: Record<string, any>
121
141
  ): TimerId {
122
142
  if (!timers.requestAnimationFrame) {
123
143
  // Fallback to setTimeout in non-browser environments
124
- return this.setTimeout(componentId, () => callback(Date.now()), 16, metadata);
144
+ return this.SetTimeout(componentId, () => callback(Date.now()), 16, metadata);
125
145
  }
126
146
 
127
147
  const id = timers.requestAnimationFrame((time) => {
@@ -139,26 +159,45 @@ export class ResourceManager {
139
159
  return id as any;
140
160
  }
141
161
 
162
+ /** @deprecated Use {@link RequestAnimationFrame}. */
163
+ requestAnimationFrame(
164
+ componentId: string,
165
+ callback: FrameRequestCallback,
166
+ metadata?: Record<string, any>
167
+ ): TimerId {
168
+ return this.RequestAnimationFrame(componentId, callback, metadata);
169
+ }
170
+
142
171
  /**
143
172
  * Clear a specific timeout
144
173
  */
145
- clearTimeout(componentId: string, id: number): void {
174
+ ClearTimeout(componentId: string, id: number): void {
146
175
  timers.clearTimeout(id);
147
176
  this.removeResource(componentId, 'timer', id);
148
177
  }
149
178
 
179
+ /** @deprecated Use {@link ClearTimeout}. */
180
+ clearTimeout(componentId: string, id: number): void {
181
+ return this.ClearTimeout(componentId, id);
182
+ }
183
+
150
184
  /**
151
185
  * Clear a specific interval
152
186
  */
153
- clearInterval(componentId: string, id: number): void {
187
+ ClearInterval(componentId: string, id: number): void {
154
188
  timers.clearInterval(id);
155
189
  this.removeResource(componentId, 'interval', id);
156
190
  }
157
191
 
192
+ /** @deprecated Use {@link ClearInterval}. */
193
+ clearInterval(componentId: string, id: number): void {
194
+ return this.ClearInterval(componentId, id);
195
+ }
196
+
158
197
  /**
159
198
  * Cancel a specific animation frame
160
199
  */
161
- cancelAnimationFrame(componentId: string, id: TimerId): void {
200
+ CancelAnimationFrame(componentId: string, id: TimerId): void {
162
201
  if (timers.cancelAnimationFrame) {
163
202
  timers.cancelAnimationFrame(id as number);
164
203
  } else {
@@ -168,10 +207,15 @@ export class ResourceManager {
168
207
  this.removeResource(componentId, 'animationFrame', id);
169
208
  }
170
209
 
210
+ /** @deprecated Use {@link CancelAnimationFrame}. */
211
+ cancelAnimationFrame(componentId: string, id: TimerId): void {
212
+ return this.CancelAnimationFrame(componentId, id);
213
+ }
214
+
171
215
  /**
172
216
  * Register an event listener with automatic cleanup
173
217
  */
174
- addEventListener(
218
+ AddEventListener(
175
219
  componentId: string,
176
220
  target: EventTarget,
177
221
  type: string,
@@ -196,10 +240,21 @@ export class ResourceManager {
196
240
  }
197
241
  }
198
242
 
243
+ /** @deprecated Use {@link AddEventListener}. */
244
+ addEventListener(
245
+ componentId: string,
246
+ target: EventTarget,
247
+ type: string,
248
+ listener: EventListener,
249
+ options?: AddEventListenerOptions
250
+ ): void {
251
+ return this.AddEventListener(componentId, target, type, listener, options);
252
+ }
253
+
199
254
  /**
200
255
  * Register a DOM element that needs cleanup
201
256
  */
202
- registerDOMElement(
257
+ RegisterDOMElement(
203
258
  componentId: string,
204
259
  element: any, // Use 'any' to avoid HTMLElement type in Node.js
205
260
  cleanup?: () => void
@@ -223,10 +278,19 @@ export class ResourceManager {
223
278
  }
224
279
  }
225
280
 
281
+ /** @deprecated Use {@link RegisterDOMElement}. */
282
+ registerDOMElement(
283
+ componentId: string,
284
+ element: any, // Use 'any' to avoid HTMLElement type in Node.js
285
+ cleanup?: () => void
286
+ ): void {
287
+ return this.RegisterDOMElement(componentId, element, cleanup);
288
+ }
289
+
226
290
  /**
227
291
  * Register a React root for cleanup
228
292
  */
229
- registerReactRoot(
293
+ RegisterReactRoot(
230
294
  componentId: string,
231
295
  root: any,
232
296
  unmountFn: () => void
@@ -239,23 +303,42 @@ export class ResourceManager {
239
303
  });
240
304
  }
241
305
 
306
+ /** @deprecated Use {@link RegisterReactRoot}. */
307
+ registerReactRoot(
308
+ componentId: string,
309
+ root: any,
310
+ unmountFn: () => void
311
+ ): void {
312
+ return this.RegisterReactRoot(componentId, root, unmountFn);
313
+ }
314
+
242
315
  /**
243
316
  * Register a generic cleanup callback for a component
244
317
  */
245
- registerCleanup(componentId: string, cleanup: () => void): void {
318
+ RegisterCleanup(componentId: string, cleanup: () => void): void {
246
319
  if (!this.cleanupCallbacks.has(componentId)) {
247
320
  this.cleanupCallbacks.set(componentId, []);
248
321
  }
249
322
  this.cleanupCallbacks.get(componentId)!.push(cleanup);
250
323
  }
251
324
 
325
+ /** @deprecated Use {@link RegisterCleanup}. */
326
+ registerCleanup(componentId: string, cleanup: () => void): void {
327
+ return this.RegisterCleanup(componentId, cleanup);
328
+ }
329
+
252
330
  /**
253
331
  * Register a global resource (not tied to a specific component)
254
332
  */
255
- registerGlobalResource(resource: ManagedResource): void {
333
+ RegisterGlobalResource(resource: ManagedResource): void {
256
334
  this.globalResources.add(resource);
257
335
  }
258
336
 
337
+ /** @deprecated Use {@link RegisterGlobalResource}. */
338
+ registerGlobalResource(resource: ManagedResource): void {
339
+ return this.RegisterGlobalResource(resource);
340
+ }
341
+
259
342
  /**
260
343
  * Add a resource to be managed
261
344
  */
@@ -288,7 +371,7 @@ export class ResourceManager {
288
371
  /**
289
372
  * Clean up all resources for a specific component
290
373
  */
291
- cleanupComponent(componentId: string): void {
374
+ CleanupComponent(componentId: string): void {
292
375
  // Clean up tracked resources
293
376
  const componentResources = this.resources.get(componentId);
294
377
  if (componentResources) {
@@ -316,10 +399,15 @@ export class ResourceManager {
316
399
  }
317
400
  }
318
401
 
402
+ /** @deprecated Use {@link CleanupComponent}. */
403
+ cleanupComponent(componentId: string): void {
404
+ return this.CleanupComponent(componentId);
405
+ }
406
+
319
407
  /**
320
408
  * Clean up all global resources
321
409
  */
322
- cleanupGlobal(): void {
410
+ CleanupGlobal(): void {
323
411
  this.globalResources.forEach(resource => {
324
412
  try {
325
413
  resource.cleanup();
@@ -330,23 +418,33 @@ export class ResourceManager {
330
418
  this.globalResources.clear();
331
419
  }
332
420
 
421
+ /** @deprecated Use {@link CleanupGlobal}. */
422
+ cleanupGlobal(): void {
423
+ return this.CleanupGlobal();
424
+ }
425
+
333
426
  /**
334
427
  * Clean up all resources (components and global)
335
428
  */
336
- cleanupAll(): void {
429
+ CleanupAll(): void {
337
430
  // Clean up all component resources
338
431
  for (const componentId of this.resources.keys()) {
339
- this.cleanupComponent(componentId);
432
+ this.CleanupComponent(componentId);
340
433
  }
341
434
 
342
435
  // Clean up global resources
343
- this.cleanupGlobal();
436
+ this.CleanupGlobal();
437
+ }
438
+
439
+ /** @deprecated Use {@link CleanupAll}. */
440
+ cleanupAll(): void {
441
+ return this.CleanupAll();
344
442
  }
345
443
 
346
444
  /**
347
445
  * Get resource statistics for debugging
348
446
  */
349
- getStats(): {
447
+ GetStats(): {
350
448
  componentCount: number;
351
449
  resourceCounts: Record<string, number>;
352
450
  globalResourceCount: number;
@@ -365,7 +463,16 @@ export class ResourceManager {
365
463
  globalResourceCount: this.globalResources.size
366
464
  };
367
465
  }
466
+
467
+ /** @deprecated Use {@link GetStats}. */
468
+ getStats(): {
469
+ componentCount: number;
470
+ resourceCounts: Record<string, number>;
471
+ globalResourceCount: number;
472
+ } {
473
+ return this.GetStats();
474
+ }
368
475
  }
369
476
 
370
477
  // Singleton instance
371
- export const resourceManager = new ResourceManager();
478
+ export const resourceManager = new ResourceManager(); // case-violation-ok-legacy-back-compat: the PascalCase name is already taken in this scope
@@ -92,30 +92,35 @@ export class RuntimeUtilities {
92
92
  * passes its own `ProviderToUse`; omitting it falls back to the global default, named
93
93
  * explicitly rather than reached for via `new Metadata()`.
94
94
  */
95
- public buildUtilities(debug: boolean = false, provider?: IMetadataProvider): ComponentUtilities {
95
+ public BuildUtilities(debug: boolean = false, provider?: IMetadataProvider): ComponentUtilities {
96
96
  this.debug = debug;
97
97
  this.provider = provider ?? Metadata.Provider;
98
- return this.SetupUtilities(this.provider);
98
+ return this.setupUtilities(this.provider);
99
+ }
100
+
101
+ /** @deprecated Use {@link BuildUtilities}. */
102
+ public buildUtilities(debug: boolean = false, provider?: IMetadataProvider): ComponentUtilities {
103
+ return this.BuildUtilities(debug, provider);
99
104
  }
100
105
 
101
106
  /**
102
107
  * Sets up the utilities object - copied from skip-chat implementation
103
108
  */
104
- private SetupUtilities(md: IMetadataProvider): ComponentUtilities {
109
+ private setupUtilities(md: IMetadataProvider): ComponentUtilities {
105
110
  const rv = RunView.FromMetadataProvider(md);
106
111
  const rq = new RunQuery(md as unknown as IRunQueryProvider);
107
112
  const u: ComponentUtilities = {
108
- md: this.CreateSimpleMetadata(md),
109
- rv: this.CreateSimpleRunView(rv),
110
- rq: this.CreateSimpleRunQuery(rq),
111
- ai: this.CreateSimpleAITools(),
112
- geoDataEngine: this.CreateSimpleGeoDataEngine(),
113
- ml: this.CreateSimpleMLTools()
113
+ md: this.createSimpleMetadata(md),
114
+ rv: this.createSimpleRunView(rv),
115
+ rq: this.createSimpleRunQuery(rq),
116
+ ai: this.createSimpleAITools(),
117
+ geoDataEngine: this.createSimpleGeoDataEngine(),
118
+ ml: this.createSimpleMLTools()
114
119
  };
115
120
  return u;
116
121
  }
117
122
 
118
- private CreateSimpleAITools(): SimpleAITools {
123
+ private createSimpleAITools(): SimpleAITools {
119
124
  // Get the GraphQL provider - it's the same as the BaseEntity provider
120
125
  const provider = BaseEntity.Provider;
121
126
 
@@ -199,7 +204,7 @@ export class RuntimeUtilities {
199
204
  * Python sidecar lives server-side and cannot run in the browser). Returns `undefined` when no
200
205
  * GraphQL provider is available, so the `ml` capability degrades cleanly.
201
206
  */
202
- private CreateSimpleMLTools(): SimpleMLTools | undefined {
207
+ private createSimpleMLTools(): SimpleMLTools | undefined {
203
208
  const provider = BaseEntity.Provider;
204
209
  // Scoring requires a GraphQL provider to route the Remote Operation to the server engine.
205
210
  if (!(provider instanceof GraphQLDataProvider)) {
@@ -354,7 +359,7 @@ export class RuntimeUtilities {
354
359
  return value.replace(/'/g, "''");
355
360
  }
356
361
 
357
- private CreateSimpleMetadata(md: IMetadataProvider): SimpleMetadata {
362
+ private createSimpleMetadata(md: IMetadataProvider): SimpleMetadata {
358
363
  return {
359
364
  Entities: md.Entities,
360
365
  GetEntityObject: (entityName: string) => {
@@ -363,7 +368,7 @@ export class RuntimeUtilities {
363
368
  }
364
369
  }
365
370
 
366
- private CreateSimpleGeoDataEngine(): SimpleGeoDataEngine | undefined {
371
+ private createSimpleGeoDataEngine(): SimpleGeoDataEngine | undefined {
367
372
  try {
368
373
  const geo = GeoDataEngine.Instance;
369
374
  if (!geo) return undefined;
@@ -383,7 +388,7 @@ export class RuntimeUtilities {
383
388
  }
384
389
  }
385
390
 
386
- private CreateSimpleRunQuery(rq: RunQuery): SimpleRunQuery {
391
+ private createSimpleRunQuery(rq: RunQuery): SimpleRunQuery {
387
392
  return {
388
393
  RunQuery: async (params: RunQueryParams) => {
389
394
  // Run a single query and return the results
@@ -408,7 +413,7 @@ export class RuntimeUtilities {
408
413
  }
409
414
  }
410
415
 
411
- private CreateSimpleRunView(rv: RunView): SimpleRunView {
416
+ private createSimpleRunView(rv: RunView): SimpleRunView {
412
417
  return {
413
418
  RunView: async (params: RunViewParams) => {
414
419
  // Run a single view and return the results
@@ -457,7 +462,7 @@ export class RuntimeUtilities {
457
462
  * In a Node.js environment, this will use MJ's ClassFactory for runtime substitution
458
463
  * In a browser environment, it will use the base class directly
459
464
  */
460
- export function createRuntimeUtilities(): RuntimeUtilities {
465
+ export function CreateRuntimeUtilities(): RuntimeUtilities {
461
466
  try {
462
467
  // Resolve through ClassFactory so a host that registers a higher-priority subclass gets it.
463
468
  // `CreateInstance` with a null key matches any registration for this root class, and the
@@ -473,4 +478,9 @@ export function createRuntimeUtilities(): RuntimeUtilities {
473
478
  }
474
479
 
475
480
  return new RuntimeUtilities();
481
+ }
482
+
483
+ /** @deprecated Use {@link CreateRuntimeUtilities}. */
484
+ export function createRuntimeUtilities(): RuntimeUtilities {
485
+ return CreateRuntimeUtilities();
476
486
  }
@@ -33,56 +33,91 @@ export class StandardLibraryManager {
33
33
  /**
34
34
  * Set a custom library configuration
35
35
  */
36
- static setConfiguration(config: LibraryConfiguration): void {
36
+ static SetConfiguration(config: LibraryConfiguration): void {
37
37
  this.configuration = config;
38
38
  }
39
+
40
+ /** @deprecated Use {@link SetConfiguration}. */
41
+ static setConfiguration(config: LibraryConfiguration): void {
42
+ return this.SetConfiguration(config);
43
+ }
39
44
 
40
45
  /**
41
46
  * Get the current library configuration
42
47
  */
43
- static getConfiguration(): LibraryConfiguration {
48
+ static GetConfiguration(): LibraryConfiguration {
44
49
  return this.configuration;
45
50
  }
51
+
52
+ /** @deprecated Use {@link GetConfiguration}. */
53
+ static getConfiguration(): LibraryConfiguration {
54
+ return this.GetConfiguration();
55
+ }
46
56
 
47
57
  /**
48
58
  * Get all enabled libraries
49
59
  */
50
- static getEnabledLibraries(): ExternalLibraryConfig[] {
60
+ static GetEnabledLibraries(): ExternalLibraryConfig[] {
51
61
  return this.configuration.libraries.filter(lib => lib.isEnabled);
52
62
  }
63
+
64
+ /** @deprecated Use {@link GetEnabledLibraries}. */
65
+ static getEnabledLibraries(): ExternalLibraryConfig[] {
66
+ return this.GetEnabledLibraries();
67
+ }
53
68
 
54
69
  /**
55
70
  * Get libraries by category
56
71
  */
57
- static getLibrariesByCategory(category: ExternalLibraryConfig['category']): ExternalLibraryConfig[] {
72
+ static GetLibrariesByCategory(category: ExternalLibraryConfig['category']): ExternalLibraryConfig[] {
58
73
  return this.configuration.libraries.filter(lib => lib.category === category && lib.isEnabled);
59
74
  }
75
+
76
+ /** @deprecated Use {@link GetLibrariesByCategory}. */
77
+ static getLibrariesByCategory(category: ExternalLibraryConfig['category']): ExternalLibraryConfig[] {
78
+ return this.GetLibrariesByCategory(category);
79
+ }
60
80
 
61
81
  /**
62
82
  * Get core libraries (runtime essentials)
63
83
  */
64
- static getCoreLibraries(): ExternalLibraryConfig[] {
84
+ static GetCoreLibraries(): ExternalLibraryConfig[] {
65
85
  return this.configuration.libraries.filter(lib => lib.isCore && lib.isEnabled);
66
86
  }
87
+
88
+ /** @deprecated Use {@link GetCoreLibraries}. */
89
+ static getCoreLibraries(): ExternalLibraryConfig[] {
90
+ return this.GetCoreLibraries();
91
+ }
67
92
 
68
93
  /**
69
94
  * Get component libraries (non-runtime)
70
95
  */
71
- static getComponentLibraries(): ExternalLibraryConfig[] {
96
+ static GetComponentLibraries(): ExternalLibraryConfig[] {
72
97
  return this.configuration.libraries.filter(lib => !lib.isRuntimeOnly && lib.isEnabled);
73
98
  }
99
+
100
+ /** @deprecated Use {@link GetComponentLibraries}. */
101
+ static getComponentLibraries(): ExternalLibraryConfig[] {
102
+ return this.GetComponentLibraries();
103
+ }
74
104
 
75
105
  /**
76
106
  * Get library by ID
77
107
  */
78
- static getLibraryById(id: string): ExternalLibraryConfig | undefined {
108
+ static GetLibraryById(id: string): ExternalLibraryConfig | undefined {
79
109
  return this.configuration.libraries.find(lib => lib.id === id);
80
110
  }
111
+
112
+ /** @deprecated Use {@link GetLibraryById}. */
113
+ static getLibraryById(id: string): ExternalLibraryConfig | undefined {
114
+ return this.GetLibraryById(id);
115
+ }
81
116
 
82
117
  /**
83
118
  * Get library URLs as a simple object (for backward compatibility)
84
119
  */
85
- static getLibraryUrls(): Record<string, string> {
120
+ static GetLibraryUrls(): Record<string, string> {
86
121
  const urls: Record<string, string> = {};
87
122
  this.configuration.libraries
88
123
  .filter(lib => lib.isEnabled)
@@ -96,13 +131,23 @@ export class StandardLibraryManager {
96
131
  });
97
132
  return urls;
98
133
  }
134
+
135
+ /** @deprecated Use {@link GetLibraryUrls}. */
136
+ static getLibraryUrls(): Record<string, string> {
137
+ return this.GetLibraryUrls();
138
+ }
99
139
 
100
140
  /**
101
141
  * Reset to default configuration
102
142
  */
103
- static resetToDefault(): void {
143
+ static ResetToDefault(): void {
104
144
  this.configuration = DEFAULT_LIBRARY_CONFIG;
105
145
  }
146
+
147
+ /** @deprecated Use {@link ResetToDefault}. */
148
+ static resetToDefault(): void {
149
+ return this.ResetToDefault();
150
+ }
106
151
  }
107
152
 
108
153
 
@@ -110,7 +155,7 @@ export class StandardLibraryManager {
110
155
  * Creates a standard libraries object for browser environments
111
156
  * Dynamically collects all libraries based on current configuration
112
157
  */
113
- export function createStandardLibraries(): StandardLibraries {
158
+ export function CreateStandardLibraries(): StandardLibraries {
114
159
  if (typeof window === 'undefined') {
115
160
  // Return empty object in Node.js environments
116
161
  return {};
@@ -127,4 +172,9 @@ export function createStandardLibraries(): StandardLibraries {
127
172
  });
128
173
 
129
174
  return libs;
175
+ }
176
+
177
+ /** @deprecated Use {@link CreateStandardLibraries}. */
178
+ export function createStandardLibraries(): StandardLibraries {
179
+ return CreateStandardLibraries();
130
180
  }
@@ -35,7 +35,7 @@ export const USER_STATE_KEY_PREFIX = 'InteractiveComponents_UserState_Root/';
35
35
  * @returns the resolved scope, or `null` when no stable scope can be derived
36
36
  * (e.g. an unnamed component) — signaling the caller to skip persistence.
37
37
  */
38
- export function resolveUserStateScope(
38
+ export function ResolveUserStateScope(
39
39
  explicitScope: string | undefined | null,
40
40
  namespace: string | undefined | null,
41
41
  name: string | undefined | null
@@ -53,20 +53,34 @@ export function resolveUserStateScope(
53
53
  return scope.toLowerCase();
54
54
  }
55
55
 
56
+ /** @deprecated Use {@link ResolveUserStateScope}. */
57
+ export function resolveUserStateScope(
58
+ explicitScope: string | undefined | null,
59
+ namespace: string | undefined | null,
60
+ name: string | undefined | null
61
+ ): string | null {
62
+ return ResolveUserStateScope(explicitScope, namespace, name);
63
+ }
64
+
56
65
  /**
57
66
  * Build the full storage key for a resolved scope, or `null` when the scope is
58
67
  * `null` (persistence should be skipped).
59
68
  */
60
- export function userStateStorageKey(scope: string | null): string | null {
69
+ export function UserStateStorageKey(scope: string | null): string | null {
61
70
  return scope ? `${USER_STATE_KEY_PREFIX}${scope}` : null;
62
71
  }
63
72
 
73
+ /** @deprecated Use {@link UserStateStorageKey}. */
74
+ export function userStateStorageKey(scope: string | null): string | null {
75
+ return UserStateStorageKey(scope);
76
+ }
77
+
64
78
  /**
65
79
  * Safely parse a stored settings blob into a plain object. Returns `{}` for
66
80
  * null/empty input, invalid JSON, or any non-object JSON (arrays, primitives) —
67
81
  * persisted user settings are always a flat key/value object.
68
82
  */
69
- export function parseStoredUserSettings(raw: string | undefined | null): Record<string, unknown> {
83
+ export function ParseStoredUserSettings(raw: string | undefined | null): Record<string, unknown> {
70
84
  if (!raw) {
71
85
  return {};
72
86
  }
@@ -81,18 +95,31 @@ export function parseStoredUserSettings(raw: string | undefined | null): Record<
81
95
  }
82
96
  }
83
97
 
98
+ /** @deprecated Use {@link ParseStoredUserSettings}. */
99
+ export function parseStoredUserSettings(raw: string | undefined | null): Record<string, unknown> {
100
+ return ParseStoredUserSettings(raw);
101
+ }
102
+
84
103
  /**
85
104
  * Merge host-provided defaults with the stored per-user settings. Stored values
86
105
  * win, so a returning user sees their saved preferences while a host can still
87
106
  * seed sensible first-run defaults that fill any gaps.
88
107
  */
89
- export function mergeUserSettings(
108
+ export function MergeUserSettings(
90
109
  hostDefaults: Record<string, unknown> | undefined | null,
91
110
  stored: Record<string, unknown> | undefined | null
92
111
  ): Record<string, unknown> {
93
112
  return { ...(hostDefaults ?? {}), ...(stored ?? {}) };
94
113
  }
95
114
 
115
+ /** @deprecated Use {@link MergeUserSettings}. */
116
+ export function mergeUserSettings(
117
+ hostDefaults: Record<string, unknown> | undefined | null,
118
+ stored: Record<string, unknown> | undefined | null
119
+ ): Record<string, unknown> {
120
+ return MergeUserSettings(hostDefaults, stored);
121
+ }
122
+
96
123
  /**
97
124
  * Apply an `onSaveUserSettings` payload to the host's current settings snapshot.
98
125
  *
@@ -113,7 +140,7 @@ export function mergeUserSettings(
113
140
  *
114
141
  * @returns a new object — neither input is mutated.
115
142
  */
116
- export function applyUserSettingsUpdate(
143
+ export function ApplyUserSettingsUpdate(
117
144
  current: Record<string, unknown> | undefined | null,
118
145
  incoming: Record<string, unknown> | undefined | null
119
146
  ): Record<string, unknown> {
@@ -127,3 +154,11 @@ export function applyUserSettingsUpdate(
127
154
  }
128
155
  return next;
129
156
  }
157
+
158
+ /** @deprecated Use {@link ApplyUserSettingsUpdate}. */
159
+ export function applyUserSettingsUpdate(
160
+ current: Record<string, unknown> | undefined | null,
161
+ incoming: Record<string, unknown> | undefined | null
162
+ ): Record<string, unknown> {
163
+ return ApplyUserSettingsUpdate(current, incoming);
164
+ }