@plasmicapp/loader-react 1.0.396-beta.0 → 1.0.396
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 -7
- package/dist/index.esm.js +4 -34
- package/dist/index.esm.js.map +3 -3
- package/dist/index.js +3 -33
- package/dist/index.js.map +2 -2
- package/dist/react-server.d.ts +2 -7
- package/dist/react-server.esm.js +3 -24
- package/dist/react-server.esm.js.map +3 -3
- package/dist/react-server.js +2 -23
- package/dist/react-server.js.map +2 -2
- package/package.json +4 -4
package/dist/react-server.esm.js
CHANGED
|
@@ -54,7 +54,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
54
54
|
import "server-only";
|
|
55
55
|
|
|
56
56
|
// src/loader-server.tsx
|
|
57
|
-
import { PlasmicModulesFetcher as PlasmicModulesFetcher2
|
|
57
|
+
import { PlasmicModulesFetcher as PlasmicModulesFetcher2 } from "@plasmicapp/loader-core";
|
|
58
58
|
import React2 from "react";
|
|
59
59
|
import ReactDOM from "react-dom";
|
|
60
60
|
import * as jsxDevRuntime from "react/jsx-dev-runtime";
|
|
@@ -218,7 +218,6 @@ function prepComponentData(bundle, compMetas, opts) {
|
|
|
218
218
|
"entrypoint.css",
|
|
219
219
|
...compPaths,
|
|
220
220
|
"root-provider.js",
|
|
221
|
-
...bundle.projects.map((x) => x.styleTokensProviderFileName).filter((x) => !!x),
|
|
222
221
|
...bundle.projects.map((x) => x.globalContextsProviderFileName).filter((x) => !!x),
|
|
223
222
|
// We need to explicitly include global context provider components
|
|
224
223
|
// to make sure they are kept in bundle.components. That's because
|
|
@@ -386,16 +385,6 @@ var ComponentLookup = class {
|
|
|
386
385
|
context: this.registry.load(meta.contextFile).default
|
|
387
386
|
}));
|
|
388
387
|
}
|
|
389
|
-
/** Returns StyleTokensProvider if the project has style token overrides. */
|
|
390
|
-
maybeGetStyleTokensProvider(spec) {
|
|
391
|
-
const compMeta = getFirstCompMeta(this.bundle.components, spec);
|
|
392
|
-
const projectMeta = compMeta ? this.bundle.projects.find((x) => x.id === compMeta.projectId) : void 0;
|
|
393
|
-
if (!projectMeta || !projectMeta.styleTokensProviderFileName || !this.registry.hasModule(projectMeta.styleTokensProviderFileName) || !projectMeta.hasStyleTokenOverrides) {
|
|
394
|
-
return void 0;
|
|
395
|
-
}
|
|
396
|
-
const entry = this.registry.load(projectMeta.styleTokensProviderFileName);
|
|
397
|
-
return entry.StyleTokensProvider;
|
|
398
|
-
}
|
|
399
388
|
getGlobalContextsProvider(spec) {
|
|
400
389
|
const compMeta = getFirstCompMeta(this.bundle.components, spec);
|
|
401
390
|
const projectMeta = compMeta ? this.bundle.projects.find((x) => x.id === compMeta.projectId) : void 0;
|
|
@@ -518,7 +507,6 @@ var BaseInternalPlasmicComponentLoader = class {
|
|
|
518
507
|
};
|
|
519
508
|
this.opts = args.opts;
|
|
520
509
|
this.fetcher = args.fetcher;
|
|
521
|
-
this.tracker = args.tracker;
|
|
522
510
|
this.onBundleMerged = args.onBundleMerged;
|
|
523
511
|
this.onBundleFetched = args.onBundleFetched;
|
|
524
512
|
this.registerModules(args.builtinModules);
|
|
@@ -618,7 +606,6 @@ var BaseInternalPlasmicComponentLoader = class {
|
|
|
618
606
|
return __async(this, null, function* () {
|
|
619
607
|
var _a2;
|
|
620
608
|
const bundle = yield this.fetcher.fetchAllData();
|
|
621
|
-
this.tracker.trackFetch();
|
|
622
609
|
this.mergeBundle(bundle);
|
|
623
610
|
(_a2 = this.onBundleFetched) == null ? void 0 : _a2.call(this);
|
|
624
611
|
return bundle;
|
|
@@ -721,8 +708,7 @@ ${this.bundle.bundleKey}`
|
|
|
721
708
|
getLookup() {
|
|
722
709
|
return new ComponentLookup(this.getBundle(), this.registry);
|
|
723
710
|
}
|
|
724
|
-
trackConversion(
|
|
725
|
-
this.tracker.trackConversion(value);
|
|
711
|
+
trackConversion(_value = 0) {
|
|
726
712
|
}
|
|
727
713
|
getActiveVariation(opts) {
|
|
728
714
|
return __async(this, null, function* () {
|
|
@@ -746,8 +732,7 @@ ${this.bundle.bundleKey}`
|
|
|
746
732
|
)
|
|
747
733
|
);
|
|
748
734
|
}
|
|
749
|
-
trackRender(
|
|
750
|
-
this.tracker.trackRender(opts);
|
|
735
|
+
trackRender(_opts) {
|
|
751
736
|
}
|
|
752
737
|
loadServerQueriesModule(fileName) {
|
|
753
738
|
return this.registry.load(fileName);
|
|
@@ -1090,12 +1075,6 @@ var InternalPrepassPlasmicLoader = class extends BaseInternalPlasmicComponentLoa
|
|
|
1090
1075
|
constructor(opts) {
|
|
1091
1076
|
super({
|
|
1092
1077
|
opts,
|
|
1093
|
-
tracker: new PlasmicTracker2({
|
|
1094
|
-
projectIds: opts.projects.map((p) => p.id),
|
|
1095
|
-
platform: opts.platform,
|
|
1096
|
-
preview: opts.preview,
|
|
1097
|
-
nativeFetch: opts.nativeFetch
|
|
1098
|
-
}),
|
|
1099
1078
|
onBundleMerged: () => {
|
|
1100
1079
|
this.refreshRegistry();
|
|
1101
1080
|
},
|