@wix/zero-config-implementation 1.49.0 → 1.50.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 +11 -2
- package/dist/index.js +3036 -3023
- package/package.json +2 -2
- package/src/component-renderer.ts +79 -1
- package/src/index.ts +1 -0
- package/src/information-extractors/react/extractors/core/runner.ts +7 -1
- package/src/manifest-pipeline.ts +6 -1
package/dist/index.d.ts
CHANGED
|
@@ -2427,6 +2427,10 @@ export declare interface RenderContext {
|
|
|
2427
2427
|
* @param componentProps - Props to pass to the component
|
|
2428
2428
|
* @param listeners - Listeners to notify on each DOM element creation
|
|
2429
2429
|
* @param store - Shared ExtractorStore, included in each CreateElementEvent
|
|
2430
|
+
* @param compiledEntryPath - Optional path to the user's compiled bundle. When
|
|
2431
|
+
* provided, the renderer additionally patches the React module instance
|
|
2432
|
+
* that the bundle resolves from its own `node_modules` (covers cases
|
|
2433
|
+
* where the host bundles its own React separately from the user's).
|
|
2430
2434
|
* @returns Static HTML string with trace IDs on DOM elements
|
|
2431
2435
|
*
|
|
2432
2436
|
* @example
|
|
@@ -2438,7 +2442,7 @@ export declare interface RenderContext {
|
|
|
2438
2442
|
* // tracker.stores now has prop→DOM bindings
|
|
2439
2443
|
* ```
|
|
2440
2444
|
*/
|
|
2441
|
-
export declare function renderWithExtractors(Component: ComponentType<unknown>, componentProps: unknown, listeners: CreateElementListener[], store: ExtractorStore): string;
|
|
2445
|
+
export declare function renderWithExtractors(Component: ComponentType<unknown>, componentProps: unknown, listeners: CreateElementListener[], store: ExtractorStore, compiledEntryPath?: string): string;
|
|
2442
2446
|
|
|
2443
2447
|
/**
|
|
2444
2448
|
* API to extract component props with full TypeScript type resolution
|
|
@@ -2518,9 +2522,14 @@ export declare class ResultAsync<T, E> implements PromiseLike<Result<T, E>> {
|
|
|
2518
2522
|
* @param componentInfo - TypeScript-extracted component information
|
|
2519
2523
|
* @param component - The React component to render
|
|
2520
2524
|
* @param extractors - Array of extractors to run
|
|
2525
|
+
* @param options - Optional caller-provided options (e.g. wrapper HOC)
|
|
2526
|
+
* @param compiledEntryPath - Optional path to the user's compiled bundle. When
|
|
2527
|
+
* provided, the renderer also patches the React module that the bundle
|
|
2528
|
+
* resolves from its own `node_modules`, so duplicate React instances
|
|
2529
|
+
* (e.g. when the host bundles its own React) still get intercepted.
|
|
2521
2530
|
* @returns Extraction results including HTML, store, and element tree
|
|
2522
2531
|
*/
|
|
2523
|
-
export declare function runExtractors(componentInfo: ComponentInfo, component: ComponentType<unknown>, extractors: ReactExtractor[], options?: RunExtractorsOptions): ExtractionResult;
|
|
2532
|
+
export declare function runExtractors(componentInfo: ComponentInfo, component: ComponentType<unknown>, extractors: ReactExtractor[], options?: RunExtractorsOptions, compiledEntryPath?: string): ExtractionResult;
|
|
2524
2533
|
|
|
2525
2534
|
export declare interface RunExtractorsOptions {
|
|
2526
2535
|
/** Optional HOC to wrap the component before rendering (e.g. a context provider). */
|