forgeframe 0.0.3 → 0.0.5
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/communication/bridge.d.ts +2 -2
- package/dist/communication/messenger.d.ts +9 -0
- package/dist/core/component.d.ts +8 -0
- package/dist/core/consumer.d.ts +67 -1
- package/dist/core/host.d.ts +5 -0
- package/dist/forgeframe.js +746 -459
- package/dist/forgeframe.umd.cjs +2 -2
- package/dist/props/prop.d.ts +2 -0
- package/dist/types.d.ts +11 -5
- package/dist/utils/cleanup.d.ts +4 -3
- package/dist/window/helpers.d.ts +5 -1
- package/package.json +1 -1
|
@@ -150,7 +150,7 @@ export declare class FunctionBridge {
|
|
|
150
150
|
*
|
|
151
151
|
* @public
|
|
152
152
|
*/
|
|
153
|
-
export declare function serializeFunctions(obj: unknown, bridge: FunctionBridge,
|
|
153
|
+
export declare function serializeFunctions(obj: unknown, bridge: FunctionBridge, stack?: WeakSet<object>): unknown;
|
|
154
154
|
/**
|
|
155
155
|
* Recursively deserializes all function references in an object.
|
|
156
156
|
*
|
|
@@ -163,5 +163,5 @@ export declare function serializeFunctions(obj: unknown, bridge: FunctionBridge,
|
|
|
163
163
|
*
|
|
164
164
|
* @public
|
|
165
165
|
*/
|
|
166
|
-
export declare function deserializeFunctions(obj: unknown, bridge: FunctionBridge, targetWin: Window, targetDomain: string,
|
|
166
|
+
export declare function deserializeFunctions(obj: unknown, bridge: FunctionBridge, targetWin: Window, targetDomain: string, stack?: WeakSet<object>): unknown;
|
|
167
167
|
export {};
|
|
@@ -57,6 +57,10 @@ export declare class Messenger {
|
|
|
57
57
|
private allowedOrigins;
|
|
58
58
|
/** @internal */
|
|
59
59
|
private allowedOriginPatterns;
|
|
60
|
+
/** @internal */
|
|
61
|
+
private wildcardPatternRegistry;
|
|
62
|
+
/** @internal */
|
|
63
|
+
private sourceUidRegistry;
|
|
60
64
|
/**
|
|
61
65
|
* Creates a new Messenger instance.
|
|
62
66
|
*
|
|
@@ -86,6 +90,11 @@ export declare class Messenger {
|
|
|
86
90
|
* @internal
|
|
87
91
|
*/
|
|
88
92
|
private isOriginTrusted;
|
|
93
|
+
/**
|
|
94
|
+
* Resolves source identity from the browser event context.
|
|
95
|
+
* @internal
|
|
96
|
+
*/
|
|
97
|
+
private resolveVerifiedSource;
|
|
89
98
|
/**
|
|
90
99
|
* Sends a message and waits for a response.
|
|
91
100
|
*
|
package/dist/core/component.d.ts
CHANGED
|
@@ -60,6 +60,14 @@ export declare function create<P extends Record<string, unknown> = Record<string
|
|
|
60
60
|
* @public
|
|
61
61
|
*/
|
|
62
62
|
export declare function getComponent<P extends Record<string, unknown> = Record<string, unknown>, X = unknown>(tag: string): ForgeFrameComponent<P, X> | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Returns all registered components as tag/component pairs.
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
export declare function getRegisteredComponents(): Array<[
|
|
68
|
+
string,
|
|
69
|
+
ForgeFrameComponent<Record<string, unknown>>
|
|
70
|
+
]>;
|
|
63
71
|
/**
|
|
64
72
|
* Returns the internal options metadata for a component factory.
|
|
65
73
|
* @internal
|
package/dist/core/consumer.d.ts
CHANGED
|
@@ -50,6 +50,8 @@ export declare class ConsumerComponent<P extends Record<string, unknown>, X = un
|
|
|
50
50
|
/** @internal */
|
|
51
51
|
private props;
|
|
52
52
|
/** @internal */
|
|
53
|
+
private inputProps;
|
|
54
|
+
/** @internal */
|
|
53
55
|
private context;
|
|
54
56
|
/** @internal */
|
|
55
57
|
private messenger;
|
|
@@ -72,9 +74,13 @@ export declare class ConsumerComponent<P extends Record<string, unknown>, X = un
|
|
|
72
74
|
/** @internal */
|
|
73
75
|
private initPromise;
|
|
74
76
|
/** @internal */
|
|
77
|
+
private hostInitialized;
|
|
78
|
+
/** @internal */
|
|
75
79
|
private rendered;
|
|
76
80
|
/** @internal */
|
|
77
81
|
private destroyed;
|
|
82
|
+
/** @internal */
|
|
83
|
+
private pendingPropsUpdate;
|
|
78
84
|
/**
|
|
79
85
|
* Creates a new ConsumerComponent instance.
|
|
80
86
|
*
|
|
@@ -156,11 +162,51 @@ export declare class ConsumerComponent<P extends Record<string, unknown>, X = un
|
|
|
156
162
|
* Updates the component props and sends them to the host.
|
|
157
163
|
*
|
|
158
164
|
* @remarks
|
|
159
|
-
* Props are normalized and
|
|
165
|
+
* Props are normalized and validated before being sent to the host window.
|
|
160
166
|
*
|
|
161
167
|
* @param newProps - Partial props object to merge with existing props
|
|
162
168
|
*/
|
|
163
169
|
updateProps(newProps: Partial<P>): Promise<void>;
|
|
170
|
+
/**
|
|
171
|
+
* Applies a props update and synchronizes it to the host when connected.
|
|
172
|
+
* @internal
|
|
173
|
+
*/
|
|
174
|
+
private applyPropsUpdate;
|
|
175
|
+
/**
|
|
176
|
+
* Builds and validates the next props snapshot.
|
|
177
|
+
* @internal
|
|
178
|
+
*/
|
|
179
|
+
private buildNextProps;
|
|
180
|
+
/**
|
|
181
|
+
* Prevents origin changes after render for security and routing consistency.
|
|
182
|
+
* @internal
|
|
183
|
+
*/
|
|
184
|
+
private assertStableRenderedOrigin;
|
|
185
|
+
/**
|
|
186
|
+
* Sends the current props snapshot to the host window when available.
|
|
187
|
+
* @internal
|
|
188
|
+
*/
|
|
189
|
+
private sendPropsUpdateToHost;
|
|
190
|
+
/**
|
|
191
|
+
* Emits prop update lifecycle hooks.
|
|
192
|
+
* @internal
|
|
193
|
+
*/
|
|
194
|
+
private emitPropsUpdated;
|
|
195
|
+
/**
|
|
196
|
+
* Queues prop updates when a previous host sync is in flight.
|
|
197
|
+
* @internal
|
|
198
|
+
*/
|
|
199
|
+
private queuePropsUpdate;
|
|
200
|
+
/**
|
|
201
|
+
* Tracks pending updates only when host synchronization is active.
|
|
202
|
+
* @internal
|
|
203
|
+
*/
|
|
204
|
+
private trackPendingUpdateIfHostConnected;
|
|
205
|
+
/**
|
|
206
|
+
* Tracks a promise as the active queued update and clears it when settled.
|
|
207
|
+
* @internal
|
|
208
|
+
*/
|
|
209
|
+
private trackPendingUpdate;
|
|
164
210
|
/**
|
|
165
211
|
* Creates a clone of this instance with the same props.
|
|
166
212
|
*
|
|
@@ -254,6 +300,11 @@ export declare class ConsumerComponent<P extends Record<string, unknown>, X = un
|
|
|
254
300
|
* @internal
|
|
255
301
|
*/
|
|
256
302
|
private buildWindowName;
|
|
303
|
+
/**
|
|
304
|
+
* Serializes host props while keeping function bridge references in sync.
|
|
305
|
+
* @internal
|
|
306
|
+
*/
|
|
307
|
+
private serializePropsForHost;
|
|
257
308
|
/**
|
|
258
309
|
* Builds component references for nested host components.
|
|
259
310
|
* @internal
|
|
@@ -279,6 +330,21 @@ export declare class ConsumerComponent<P extends Record<string, unknown>, X = un
|
|
|
279
330
|
* @internal
|
|
280
331
|
*/
|
|
281
332
|
private setupMessageHandlers;
|
|
333
|
+
/**
|
|
334
|
+
* Sets up host lifecycle command handlers.
|
|
335
|
+
* @internal
|
|
336
|
+
*/
|
|
337
|
+
private setupHostLifecycleHandlers;
|
|
338
|
+
/**
|
|
339
|
+
* Sets up host data exchange handlers.
|
|
340
|
+
* @internal
|
|
341
|
+
*/
|
|
342
|
+
private setupHostDataHandlers;
|
|
343
|
+
/**
|
|
344
|
+
* Gets sibling component instances for a request.
|
|
345
|
+
* @internal
|
|
346
|
+
*/
|
|
347
|
+
private getSiblingInstances;
|
|
282
348
|
/**
|
|
283
349
|
* Registers cleanup handlers for the instance.
|
|
284
350
|
* @internal
|
package/dist/core/host.d.ts
CHANGED
|
@@ -180,6 +180,11 @@ export declare class HostComponent<P extends Record<string, unknown>> {
|
|
|
180
180
|
* @internal
|
|
181
181
|
*/
|
|
182
182
|
private setupMessageHandlers;
|
|
183
|
+
/**
|
|
184
|
+
* Removes stale prop keys that are no longer present in the latest consumer payload.
|
|
185
|
+
* @internal
|
|
186
|
+
*/
|
|
187
|
+
private removeStaleHostProps;
|
|
183
188
|
/**
|
|
184
189
|
* Destroys the host component and cleans up resources.
|
|
185
190
|
*/
|