@plasmicapp/loader-react 1.0.392 → 2.0.0-alpha.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 +2 -9
- package/dist/index.esm.js +1 -9
- package/dist/index.esm.js.map +3 -3
- package/dist/index.js +1 -9
- package/dist/index.js.map +3 -3
- package/dist/react-server.d.ts +2 -0
- package/dist/react-server.esm.js +2 -1
- package/dist/react-server.esm.js.map +2 -2
- package/dist/react-server.js +2 -1
- package/dist/react-server.js.map +2 -2
- package/package.json +20 -13
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ import { default as React_3 } from 'react';
|
|
|
38
38
|
import { reactDom } from 'react-dom';
|
|
39
39
|
import { reactJsxDevRuntime } from 'react/jsx-dev-runtime';
|
|
40
40
|
import { reactJsxRuntime } from 'react/jsx-runtime';
|
|
41
|
+
import { registerFunction } from '@plasmicapp/host';
|
|
41
42
|
import { Registry } from '@plasmicapp/loader-core';
|
|
42
43
|
import { repeatedElement } from '@plasmicapp/host';
|
|
43
44
|
import { Split } from '@plasmicapp/loader-fetcher';
|
|
@@ -121,6 +122,7 @@ declare interface BuiltinRegisteredModules {
|
|
|
121
122
|
"@plasmicapp/query": plasmicappQuery;
|
|
122
123
|
"@plasmicapp/data-sources-context": plasmicappDataSourcesContext;
|
|
123
124
|
"@plasmicapp/host": plasmicappHost;
|
|
125
|
+
"@plasmicapp/host/registerFunction": registerFunction;
|
|
124
126
|
"@plasmicapp/loader-runtime-registry": {
|
|
125
127
|
components: Record<string, React.ComponentType<any>>;
|
|
126
128
|
globalVariantHooks: Record<string, () => any>;
|
|
@@ -620,15 +622,6 @@ declare interface ReactServerOps {
|
|
|
620
622
|
fetchData: typeof useMutablePlasmicQueryData;
|
|
621
623
|
}
|
|
622
624
|
|
|
623
|
-
export declare function renderToElement(loader: PlasmicComponentLoader, target: HTMLElement, lookup: ComponentLookupSpec, opts?: {
|
|
624
|
-
prefetchedData?: ComponentRenderData;
|
|
625
|
-
componentProps?: any;
|
|
626
|
-
globalVariants?: GlobalVariantSpec[];
|
|
627
|
-
prefetchedQueryData?: Record<string, any>;
|
|
628
|
-
pageParams?: Record<string, any>;
|
|
629
|
-
pageQuery?: Record<string, any>;
|
|
630
|
-
}): Promise<void>;
|
|
631
|
-
|
|
632
625
|
export declare function renderToString(loader: PlasmicComponentLoader, lookup: ComponentLookupSpec, opts?: {
|
|
633
626
|
prefetchedData?: ComponentRenderData;
|
|
634
627
|
componentProps?: any;
|
package/dist/index.esm.js
CHANGED
|
@@ -1176,6 +1176,7 @@ var InternalPlasmicComponentLoader = class extends BaseInternalPlasmicComponentL
|
|
|
1176
1176
|
"@plasmicapp/query": PlasmicQuery,
|
|
1177
1177
|
"@plasmicapp/data-sources-context": PlasmicDataSourcesContext,
|
|
1178
1178
|
"@plasmicapp/host": PlasmicHost,
|
|
1179
|
+
"@plasmicapp/host/registerFunction": internalSetRegisteredFunction,
|
|
1179
1180
|
"@plasmicapp/loader-runtime-registry": {
|
|
1180
1181
|
components: SUBSTITUTED_COMPONENTS,
|
|
1181
1182
|
globalVariantHooks: SUBSTITUTED_GLOBAL_VARIANT_HOOKS,
|
|
@@ -1421,14 +1422,6 @@ import { extractPlasmicQueryData as extractPlasmicQueryData2 } from "@plasmicapp
|
|
|
1421
1422
|
import React6 from "react";
|
|
1422
1423
|
import ReactDOM2 from "react-dom";
|
|
1423
1424
|
import { renderToString as reactRenderToString } from "react-dom/server";
|
|
1424
|
-
function renderToElement(_0, _1, _2) {
|
|
1425
|
-
return __async(this, arguments, function* (loader, target, lookup, opts = {}) {
|
|
1426
|
-
return new Promise((resolve) => {
|
|
1427
|
-
const element = makeElement(loader, lookup, opts);
|
|
1428
|
-
ReactDOM2.render(element, target, () => resolve());
|
|
1429
|
-
});
|
|
1430
|
-
});
|
|
1431
|
-
}
|
|
1432
1425
|
function renderToString(loader, lookup, opts = {}) {
|
|
1433
1426
|
const element = makeElement(loader, lookup, opts);
|
|
1434
1427
|
return reactRenderToString(element);
|
|
@@ -1494,7 +1487,6 @@ export {
|
|
|
1494
1487
|
initPlasmicLoader,
|
|
1495
1488
|
matchesPagePath,
|
|
1496
1489
|
plasmicPrepass,
|
|
1497
|
-
renderToElement,
|
|
1498
1490
|
renderToString,
|
|
1499
1491
|
repeatedElement,
|
|
1500
1492
|
useDataEnv,
|