@memberjunction/react-runtime 2.93.0 → 2.94.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/.turbo/turbo-build.log +6 -6
- package/CHANGELOG.md +16 -0
- package/README.md +180 -2
- package/dist/compiler/component-compiler.d.ts.map +1 -1
- package/dist/compiler/component-compiler.js +206 -57
- package/dist/compiler/component-compiler.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -4
- package/dist/index.js.map +1 -1
- package/dist/registry/component-registry-service.d.ts +4 -3
- package/dist/registry/component-registry-service.d.ts.map +1 -1
- package/dist/registry/component-registry-service.js +27 -11
- package/dist/registry/component-registry-service.js.map +1 -1
- package/dist/registry/component-registry.d.ts +4 -3
- package/dist/registry/component-registry.d.ts.map +1 -1
- package/dist/registry/component-registry.js.map +1 -1
- package/dist/registry/component-resolver.d.ts +2 -1
- package/dist/registry/component-resolver.d.ts.map +1 -1
- package/dist/registry/component-resolver.js +42 -10
- package/dist/registry/component-resolver.js.map +1 -1
- package/dist/runtime/component-hierarchy.d.ts.map +1 -1
- package/dist/runtime/component-hierarchy.js +8 -2
- package/dist/runtime/component-hierarchy.js.map +1 -1
- package/dist/runtime/prop-builder.d.ts +2 -2
- package/dist/runtime/prop-builder.d.ts.map +1 -1
- package/dist/runtime/prop-builder.js +32 -14
- package/dist/runtime/prop-builder.js.map +1 -1
- package/dist/runtime.umd.js +1 -1
- package/dist/types/dependency-types.d.ts +62 -0
- package/dist/types/dependency-types.d.ts.map +1 -0
- package/dist/types/dependency-types.js +3 -0
- package/dist/types/dependency-types.js.map +1 -0
- package/dist/types/index.d.ts +8 -10
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/utilities/index.d.ts +1 -0
- package/dist/utilities/index.d.ts.map +1 -1
- package/dist/utilities/index.js +1 -0
- package/dist/utilities/index.js.map +1 -1
- package/dist/utilities/library-dependency-resolver.d.ts +19 -0
- package/dist/utilities/library-dependency-resolver.d.ts.map +1 -0
- package/dist/utilities/library-dependency-resolver.js +410 -0
- package/dist/utilities/library-dependency-resolver.js.map +1 -0
- package/dist/utilities/library-loader.d.ts +9 -0
- package/dist/utilities/library-loader.d.ts.map +1 -1
- package/dist/utilities/library-loader.js +143 -0
- package/dist/utilities/library-loader.js.map +1 -1
- package/package.json +5 -5
- package/src/compiler/component-compiler.ts +227 -77
- package/src/index.ts +18 -4
- package/src/registry/component-registry-service.ts +32 -14
- package/src/registry/component-registry.ts +8 -7
- package/src/registry/component-resolver.ts +51 -10
- package/src/runtime/component-hierarchy.ts +12 -4
- package/src/runtime/prop-builder.ts +38 -18
- package/src/types/dependency-types.ts +110 -0
- package/src/types/index.ts +17 -21
- package/src/utilities/index.ts +1 -0
- package/src/utilities/library-dependency-resolver.ts +603 -0
- package/src/utilities/library-loader.ts +252 -0
|
@@ -30,25 +30,29 @@ export class ComponentResolver {
|
|
|
30
30
|
private compiler: ComponentCompiler | null = null;
|
|
31
31
|
private runtimeContext: RuntimeContext | null = null;
|
|
32
32
|
private componentEngine = ComponentMetadataEngine.Instance;
|
|
33
|
+
private debug: boolean = false;
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
36
|
* Creates a new ComponentResolver instance
|
|
36
37
|
* @param registry - Component registry to use for resolution
|
|
37
38
|
* @param compiler - Optional compiler for registry-based components
|
|
38
39
|
* @param runtimeContext - Optional runtime context for registry-based components
|
|
40
|
+
* @param debug - Enable debug logging (defaults to false)
|
|
39
41
|
*/
|
|
40
42
|
constructor(
|
|
41
43
|
registry: ComponentRegistry,
|
|
42
44
|
compiler?: ComponentCompiler,
|
|
43
|
-
runtimeContext?: RuntimeContext
|
|
45
|
+
runtimeContext?: RuntimeContext,
|
|
46
|
+
debug: boolean = false
|
|
44
47
|
) {
|
|
45
48
|
this.registry = registry;
|
|
46
49
|
this.resolverInstanceId = `resolver-${Date.now()}-${Math.random()}`;
|
|
50
|
+
this.debug = debug;
|
|
47
51
|
|
|
48
52
|
if (compiler && runtimeContext) {
|
|
49
53
|
this.compiler = compiler;
|
|
50
54
|
this.runtimeContext = runtimeContext;
|
|
51
|
-
this.registryService = ComponentRegistryService.getInstance(compiler, runtimeContext);
|
|
55
|
+
this.registryService = ComponentRegistryService.getInstance(compiler, runtimeContext, debug);
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
58
|
|
|
@@ -74,7 +78,27 @@ export class ComponentResolver {
|
|
|
74
78
|
// Resolve the component hierarchy
|
|
75
79
|
await this.resolveComponentHierarchy(spec, resolved, namespace, new Set(), contextUser);
|
|
76
80
|
|
|
77
|
-
|
|
81
|
+
// Unwrap component wrappers before returning
|
|
82
|
+
// Components from the registry come as objects with component/print/refresh properties
|
|
83
|
+
// We need to extract just the component function for use in child components
|
|
84
|
+
const unwrapped: ResolvedComponents = {};
|
|
85
|
+
for (const [name, value] of Object.entries(resolved)) {
|
|
86
|
+
if (value && typeof value === 'object' && 'component' in value) {
|
|
87
|
+
if (typeof value.component === 'function') {
|
|
88
|
+
// This is a wrapped component - extract the actual React component function
|
|
89
|
+
unwrapped[name] = value.component;
|
|
90
|
+
} else {
|
|
91
|
+
// ComponentObject has a component property but it's not a function
|
|
92
|
+
console.error(`Component ${name} has invalid component property:`, typeof value.component, value);
|
|
93
|
+
unwrapped[name] = value; // Pass through the problematic value so we can see the error
|
|
94
|
+
}
|
|
95
|
+
} else {
|
|
96
|
+
// This is already a plain component function or something else
|
|
97
|
+
unwrapped[name] = value;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return unwrapped;
|
|
78
102
|
}
|
|
79
103
|
|
|
80
104
|
/**
|
|
@@ -97,7 +121,9 @@ export class ComponentResolver {
|
|
|
97
121
|
|
|
98
122
|
// Prevent circular dependencies
|
|
99
123
|
if (visited.has(componentId)) {
|
|
100
|
-
|
|
124
|
+
if (this.debug) {
|
|
125
|
+
console.warn(`Circular dependency detected for component: ${componentId}`);
|
|
126
|
+
}
|
|
101
127
|
return;
|
|
102
128
|
}
|
|
103
129
|
visited.add(componentId);
|
|
@@ -120,12 +146,18 @@ export class ComponentResolver {
|
|
|
120
146
|
contextUser
|
|
121
147
|
);
|
|
122
148
|
resolved[spec.name] = compiledComponent;
|
|
123
|
-
|
|
149
|
+
if (this.debug) {
|
|
150
|
+
console.log(`📦 Resolved registry component: ${spec.name} from ${componentId}`);
|
|
151
|
+
}
|
|
124
152
|
} else {
|
|
125
|
-
|
|
153
|
+
if (this.debug) {
|
|
154
|
+
console.warn(`Registry component not found in database: ${spec.name}`);
|
|
155
|
+
}
|
|
126
156
|
}
|
|
127
157
|
} catch (error) {
|
|
128
|
-
|
|
158
|
+
if (this.debug) {
|
|
159
|
+
console.error(`Failed to load registry component ${spec.name}:`, error);
|
|
160
|
+
}
|
|
129
161
|
}
|
|
130
162
|
} else {
|
|
131
163
|
// Embedded component - get from local registry
|
|
@@ -134,15 +166,22 @@ export class ComponentResolver {
|
|
|
134
166
|
const component = this.registry.get(spec.name, componentNamespace);
|
|
135
167
|
if (component) {
|
|
136
168
|
resolved[spec.name] = component;
|
|
137
|
-
|
|
169
|
+
if (this.debug) {
|
|
170
|
+
console.log(`📄 Resolved embedded component: ${spec.name} from namespace ${componentNamespace}, type:`, typeof component);
|
|
171
|
+
}
|
|
138
172
|
} else {
|
|
139
173
|
// If not found with specified namespace, try the parent namespace as fallback
|
|
140
174
|
const fallbackComponent = this.registry.get(spec.name, namespace);
|
|
141
175
|
if (fallbackComponent) {
|
|
142
176
|
resolved[spec.name] = fallbackComponent;
|
|
143
|
-
|
|
177
|
+
if (this.debug) {
|
|
178
|
+
console.log(`📄 Resolved embedded component: ${spec.name} from fallback namespace ${namespace}, type:`, typeof fallbackComponent);
|
|
179
|
+
}
|
|
144
180
|
} else {
|
|
181
|
+
// Component not found - this might cause issues later
|
|
145
182
|
console.warn(`⚠️ Could not resolve embedded component: ${spec.name} in namespace ${componentNamespace} or ${namespace}`);
|
|
183
|
+
// Store undefined explicitly so we know it failed to resolve
|
|
184
|
+
resolved[spec.name] = undefined;
|
|
146
185
|
}
|
|
147
186
|
}
|
|
148
187
|
}
|
|
@@ -162,7 +201,9 @@ export class ComponentResolver {
|
|
|
162
201
|
if (this.registryService) {
|
|
163
202
|
// This would allow the registry service to clean up unused components
|
|
164
203
|
// Implementation would track which components this resolver referenced
|
|
165
|
-
|
|
204
|
+
if (this.debug) {
|
|
205
|
+
console.log(`Cleaning up resolver: ${this.resolverInstanceId}`);
|
|
206
|
+
}
|
|
166
207
|
}
|
|
167
208
|
}
|
|
168
209
|
|
|
@@ -197,13 +197,21 @@ export class ComponentHierarchyRegistrar {
|
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
//
|
|
201
|
-
const
|
|
200
|
+
// Call the factory to create the ComponentObject
|
|
201
|
+
const componentObject = compilationResult.component!.factory(this.runtimeContext, styles);
|
|
202
|
+
|
|
203
|
+
// Debug logging to verify ComponentObject structure
|
|
204
|
+
console.log(`📦 Registering ComponentObject for ${spec.name}:`, {
|
|
205
|
+
hasComponent: 'component' in componentObject,
|
|
206
|
+
componentType: typeof componentObject.component,
|
|
207
|
+
hasPrint: 'print' in componentObject,
|
|
208
|
+
hasRefresh: 'refresh' in componentObject
|
|
209
|
+
});
|
|
202
210
|
|
|
203
|
-
// Register the component
|
|
211
|
+
// Register the full ComponentObject (not just the React component)
|
|
204
212
|
this.registry.register(
|
|
205
213
|
spec.name,
|
|
206
|
-
|
|
214
|
+
componentObject,
|
|
207
215
|
spec.namespace || namespace,
|
|
208
216
|
version
|
|
209
217
|
);
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* @module @memberjunction/react-runtime/runtime
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { ComponentStyles } from '@memberjunction/interactive-component-types';
|
|
8
|
-
import { ComponentProps
|
|
7
|
+
import { ComponentStyles, ComponentCallbacks } from '@memberjunction/interactive-component-types';
|
|
8
|
+
import { ComponentProps } from '../types';
|
|
9
9
|
import { Subject, debounceTime, Subscription } from 'rxjs';
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -39,7 +39,10 @@ export function buildComponentProps(
|
|
|
39
39
|
data: any = {},
|
|
40
40
|
userState: any = {},
|
|
41
41
|
utilities: any = {},
|
|
42
|
-
callbacks: ComponentCallbacks = {
|
|
42
|
+
callbacks: ComponentCallbacks = {
|
|
43
|
+
OpenEntityRecord: () => {},
|
|
44
|
+
RegisterMethod: () => {}
|
|
45
|
+
},
|
|
43
46
|
components: Record<string, any> = {},
|
|
44
47
|
styles?: ComponentStyles,
|
|
45
48
|
options: PropBuilderOptions = {},
|
|
@@ -116,15 +119,19 @@ function deepEqual(obj1: any, obj2: any): boolean {
|
|
|
116
119
|
* @returns Normalized callbacks
|
|
117
120
|
*/
|
|
118
121
|
export function normalizeCallbacks(callbacks: any, debounceMs: number = 3000): ComponentCallbacks {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
122
|
+
// Provide default implementations for required callbacks
|
|
123
|
+
const normalized: ComponentCallbacks = {
|
|
124
|
+
OpenEntityRecord: callbacks?.OpenEntityRecord || (() => {}),
|
|
125
|
+
RegisterMethod: callbacks?.RegisterMethod || (() => {})
|
|
126
|
+
};
|
|
125
127
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
+
// Copy any additional callbacks that might exist
|
|
129
|
+
if (callbacks) {
|
|
130
|
+
Object.keys(callbacks).forEach(key => {
|
|
131
|
+
if (typeof callbacks[key] === 'function' && !normalized.hasOwnProperty(key)) {
|
|
132
|
+
(normalized as any)[key] = callbacks[key];
|
|
133
|
+
}
|
|
134
|
+
});
|
|
128
135
|
}
|
|
129
136
|
|
|
130
137
|
return normalized;
|
|
@@ -264,14 +271,20 @@ export function wrapCallbacksWithLogging(
|
|
|
264
271
|
callbacks: ComponentCallbacks,
|
|
265
272
|
componentName: string
|
|
266
273
|
): ComponentCallbacks {
|
|
267
|
-
const wrapped: ComponentCallbacks = {
|
|
274
|
+
const wrapped: ComponentCallbacks = {
|
|
275
|
+
OpenEntityRecord: callbacks?.OpenEntityRecord || (() => {}),
|
|
276
|
+
RegisterMethod: callbacks?.RegisterMethod || (() => {})
|
|
277
|
+
};
|
|
268
278
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
279
|
+
// Wrap any additional callbacks that might exist
|
|
280
|
+
Object.keys(callbacks).forEach(key => {
|
|
281
|
+
if (key !== 'OpenEntityRecord' && key !== 'RegisterMethod' && typeof (callbacks as any)[key] === 'function') {
|
|
282
|
+
(wrapped as any)[key] = (...args: any[]) => {
|
|
283
|
+
console.log(`[${componentName}] ${key} called with args:`, args);
|
|
284
|
+
return (callbacks as any)[key](...args);
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
});
|
|
275
288
|
|
|
276
289
|
if (callbacks.OpenEntityRecord) {
|
|
277
290
|
wrapped.OpenEntityRecord = (entityName: string, key: any) => {
|
|
@@ -280,6 +293,13 @@ export function wrapCallbacksWithLogging(
|
|
|
280
293
|
};
|
|
281
294
|
}
|
|
282
295
|
|
|
296
|
+
if (callbacks.RegisterMethod) {
|
|
297
|
+
wrapped.RegisterMethod = (methodName: any, handler: any) => {
|
|
298
|
+
console.log(`[${componentName}] RegisterMethod called for:`, methodName);
|
|
299
|
+
callbacks.RegisterMethod!(methodName, handler);
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
|
|
283
303
|
return wrapped;
|
|
284
304
|
}
|
|
285
305
|
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Type definitions for library dependency management
|
|
3
|
+
* @module @memberjunction/react-runtime/types
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { ComponentLibraryEntity } from '@memberjunction/core-entities';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents a parsed dependency with name and version specification
|
|
10
|
+
*/
|
|
11
|
+
export interface ParsedDependency {
|
|
12
|
+
name: string;
|
|
13
|
+
versionSpec: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Represents a version requirement for a library
|
|
18
|
+
*/
|
|
19
|
+
export interface VersionRequirement {
|
|
20
|
+
library: string;
|
|
21
|
+
versionSpec: string;
|
|
22
|
+
requestedBy: string; // Which library requested this dependency
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Represents a resolved version after conflict resolution
|
|
27
|
+
*/
|
|
28
|
+
export interface ResolvedVersion {
|
|
29
|
+
library: string;
|
|
30
|
+
version: string;
|
|
31
|
+
satisfies: VersionRequirement[];
|
|
32
|
+
warnings?: string[];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Node in the dependency graph
|
|
37
|
+
*/
|
|
38
|
+
export interface DependencyNode {
|
|
39
|
+
library: ComponentLibraryEntity;
|
|
40
|
+
dependencies: Map<string, string>; // dependency name -> version spec
|
|
41
|
+
dependents: Set<string>; // libraries that depend on this one
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Dependency graph structure
|
|
46
|
+
*/
|
|
47
|
+
export interface DependencyGraph {
|
|
48
|
+
nodes: Map<string, DependencyNode>;
|
|
49
|
+
roots: Set<string>; // libraries with no dependents
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Result of determining load order
|
|
54
|
+
*/
|
|
55
|
+
export interface LoadOrderResult {
|
|
56
|
+
success: boolean;
|
|
57
|
+
order?: ComponentLibraryEntity[];
|
|
58
|
+
cycles?: string[][];
|
|
59
|
+
errors?: string[];
|
|
60
|
+
warnings?: string[];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Semver version range types
|
|
65
|
+
*/
|
|
66
|
+
export type VersionRangeType = 'exact' | 'tilde' | 'caret' | 'range' | 'any';
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Parsed semver version
|
|
70
|
+
*/
|
|
71
|
+
export interface ParsedVersion {
|
|
72
|
+
major: number;
|
|
73
|
+
minor: number;
|
|
74
|
+
patch: number;
|
|
75
|
+
prerelease?: string;
|
|
76
|
+
build?: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Version range specification
|
|
81
|
+
*/
|
|
82
|
+
export interface VersionRange {
|
|
83
|
+
type: VersionRangeType;
|
|
84
|
+
operator?: string;
|
|
85
|
+
version?: ParsedVersion;
|
|
86
|
+
raw: string;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Library load state tracking
|
|
91
|
+
*/
|
|
92
|
+
export interface LoadedLibraryState {
|
|
93
|
+
name: string;
|
|
94
|
+
version: string;
|
|
95
|
+
globalVariable: string;
|
|
96
|
+
loadedAt: Date;
|
|
97
|
+
requestedBy: string[];
|
|
98
|
+
dependencies: string[];
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Options for dependency resolution
|
|
103
|
+
*/
|
|
104
|
+
export interface DependencyResolutionOptions {
|
|
105
|
+
allowPrerelease?: boolean;
|
|
106
|
+
preferLatest?: boolean;
|
|
107
|
+
strict?: boolean; // Fail on any version conflict
|
|
108
|
+
maxDepth?: number; // Maximum dependency depth to prevent infinite recursion
|
|
109
|
+
debug?: boolean;
|
|
110
|
+
}
|
package/src/types/index.ts
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
import { UserInfo } from '@memberjunction/core';
|
|
8
8
|
import { ComponentLibraryEntity } from '@memberjunction/core-entities';
|
|
9
|
-
import { ComponentLibraryDependency, ComponentStyles } from '@memberjunction/interactive-component-types';
|
|
9
|
+
import { ComponentLibraryDependency, ComponentStyles, ComponentObject } from '@memberjunction/interactive-component-types';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Represents a compiled React component with its metadata
|
|
13
13
|
*/
|
|
14
14
|
export interface CompiledComponent {
|
|
15
|
-
/**
|
|
16
|
-
|
|
15
|
+
/** Factory function that creates a ComponentObject when called with context */
|
|
16
|
+
factory: (context: RuntimeContext, styles?: ComponentStyles) => ComponentObject;
|
|
17
17
|
/** Unique identifier for the component */
|
|
18
18
|
id: string;
|
|
19
19
|
/** Original component name */
|
|
@@ -58,8 +58,8 @@ export interface CompileOptions {
|
|
|
58
58
|
* Registry entry for a compiled component
|
|
59
59
|
*/
|
|
60
60
|
export interface RegistryEntry {
|
|
61
|
-
/** The compiled component */
|
|
62
|
-
component:
|
|
61
|
+
/** The compiled component object with all methods */
|
|
62
|
+
component: ComponentObject;
|
|
63
63
|
/** Component metadata */
|
|
64
64
|
metadata: ComponentMetadata;
|
|
65
65
|
/** Last access time for LRU cache */
|
|
@@ -113,7 +113,7 @@ export interface ComponentProps {
|
|
|
113
113
|
/** Utility functions available to the component */
|
|
114
114
|
utilities: any;
|
|
115
115
|
/** Callback functions */
|
|
116
|
-
callbacks:
|
|
116
|
+
callbacks: any;
|
|
117
117
|
/** Child components available for use */
|
|
118
118
|
components?: Record<string, any>;
|
|
119
119
|
/** Component styles */
|
|
@@ -122,20 +122,6 @@ export interface ComponentProps {
|
|
|
122
122
|
onStateChanged?: (stateUpdate: Record<string, any>) => void;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
/**
|
|
126
|
-
* Callbacks available to React components
|
|
127
|
-
*/
|
|
128
|
-
export interface ComponentCallbacks {
|
|
129
|
-
/** Request data refresh */
|
|
130
|
-
RefreshData?: () => void;
|
|
131
|
-
/** Open an entity record */
|
|
132
|
-
OpenEntityRecord?: (entityName: string, key: any) => void;
|
|
133
|
-
/** Update user state */
|
|
134
|
-
UpdateUserState?: (state: any) => void;
|
|
135
|
-
/** Notify of a custom event */
|
|
136
|
-
NotifyEvent?: (event: string, data: any) => void;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
125
|
/**
|
|
140
126
|
* Configuration for the component compiler
|
|
141
127
|
*/
|
|
@@ -155,6 +141,8 @@ export interface CompilerConfig {
|
|
|
155
141
|
cache: boolean;
|
|
156
142
|
/** Maximum cache size */
|
|
157
143
|
maxCacheSize: number;
|
|
144
|
+
/** Enable debug logging */
|
|
145
|
+
debug?: boolean;
|
|
158
146
|
}
|
|
159
147
|
|
|
160
148
|
/**
|
|
@@ -169,6 +157,8 @@ export interface RegistryConfig {
|
|
|
169
157
|
useLRU: boolean;
|
|
170
158
|
/** Namespace isolation */
|
|
171
159
|
enableNamespaces: boolean;
|
|
160
|
+
/** Enable debug logging */
|
|
161
|
+
debug?: boolean;
|
|
172
162
|
}
|
|
173
163
|
|
|
174
164
|
/**
|
|
@@ -232,4 +222,10 @@ export interface ErrorBoundaryOptions {
|
|
|
232
222
|
}
|
|
233
223
|
|
|
234
224
|
// Export library configuration types
|
|
235
|
-
export * from './library-config';
|
|
225
|
+
export * from './library-config';
|
|
226
|
+
|
|
227
|
+
// Export dependency types
|
|
228
|
+
export * from './dependency-types';
|
|
229
|
+
|
|
230
|
+
// Re-export ComponentObject for convenience
|
|
231
|
+
export { ComponentObject } from '@memberjunction/interactive-component-types';
|
package/src/utilities/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './component-styles';
|
|
|
7
7
|
export * from './standard-libraries';
|
|
8
8
|
export * from './library-loader';
|
|
9
9
|
export * from './library-registry';
|
|
10
|
+
export * from './library-dependency-resolver';
|
|
10
11
|
export * from './component-error-analyzer';
|
|
11
12
|
export * from './resource-manager';
|
|
12
13
|
export * from './cache-manager';
|