@plasmicapp/loader-react 1.0.395 → 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 -5
- package/dist/index.esm.js +3 -11
- package/dist/index.esm.js.map +3 -3
- package/dist/index.js +2 -10
- package/dist/index.js.map +2 -2
- package/dist/react-server.d.ts +2 -5
- package/dist/react-server.esm.js +3 -13
- package/dist/react-server.esm.js.map +3 -3
- package/dist/react-server.js +2 -12
- package/dist/react-server.js.map +2 -2
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -29,7 +29,6 @@ import { PlasmicCanvasContext } from '@plasmicapp/host';
|
|
|
29
29
|
import { PlasmicCanvasHost } from '@plasmicapp/host';
|
|
30
30
|
import { PlasmicDataSourceContextValue } from '@plasmicapp/data-sources-context';
|
|
31
31
|
import { PlasmicModulesFetcher } from '@plasmicapp/loader-core';
|
|
32
|
-
import { PlasmicTracker } from '@plasmicapp/loader-core';
|
|
33
32
|
import { PlasmicTranslatorContext } from '@plasmicapp/host';
|
|
34
33
|
import { PropType } from '@plasmicapp/host';
|
|
35
34
|
import { react } from 'react';
|
|
@@ -58,7 +57,6 @@ import { useSelectors } from '@plasmicapp/host';
|
|
|
58
57
|
declare abstract class BaseInternalPlasmicComponentLoader {
|
|
59
58
|
readonly opts: InitOptions;
|
|
60
59
|
private readonly registry;
|
|
61
|
-
private readonly tracker;
|
|
62
60
|
private readonly fetcher;
|
|
63
61
|
private readonly onBundleMerged?;
|
|
64
62
|
private readonly onBundleFetched?;
|
|
@@ -68,7 +66,6 @@ declare abstract class BaseInternalPlasmicComponentLoader {
|
|
|
68
66
|
constructor(args: {
|
|
69
67
|
opts: InitOptions;
|
|
70
68
|
fetcher: PlasmicModulesFetcher;
|
|
71
|
-
tracker: PlasmicTracker;
|
|
72
69
|
/** Called after `mergeBundle` (including `fetch` calls). */
|
|
73
70
|
onBundleMerged?: () => void;
|
|
74
71
|
/** Called after any `fetch` calls. */
|
|
@@ -105,11 +102,11 @@ declare abstract class BaseInternalPlasmicComponentLoader {
|
|
|
105
102
|
getGlobalVariants(): GlobalVariantSpec[];
|
|
106
103
|
registerPrefetchedBundle(bundle: LoaderBundleOutput): void;
|
|
107
104
|
getLookup(): ComponentLookup;
|
|
108
|
-
trackConversion(
|
|
105
|
+
trackConversion(_value?: number): void;
|
|
109
106
|
getActiveVariation(opts: Omit<Parameters<typeof getActiveVariation>[0], "splits">): Promise<Record<string, string>>;
|
|
110
107
|
getTeamIds(): string[];
|
|
111
108
|
getProjectIds(): string[];
|
|
112
|
-
trackRender(
|
|
109
|
+
trackRender(_opts?: TrackRenderOptions): void;
|
|
113
110
|
loadServerQueriesModule(fileName: string): any;
|
|
114
111
|
}
|
|
115
112
|
|
package/dist/index.esm.js
CHANGED
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
registerTrait,
|
|
63
63
|
stateHelpersKeys
|
|
64
64
|
} from "@plasmicapp/host";
|
|
65
|
-
import { PlasmicModulesFetcher as PlasmicModulesFetcher2
|
|
65
|
+
import { PlasmicModulesFetcher as PlasmicModulesFetcher2 } from "@plasmicapp/loader-core";
|
|
66
66
|
import * as PlasmicQuery from "@plasmicapp/query";
|
|
67
67
|
import React3 from "react";
|
|
68
68
|
import ReactDOM from "react-dom";
|
|
@@ -774,7 +774,6 @@ var BaseInternalPlasmicComponentLoader = class {
|
|
|
774
774
|
};
|
|
775
775
|
this.opts = args.opts;
|
|
776
776
|
this.fetcher = args.fetcher;
|
|
777
|
-
this.tracker = args.tracker;
|
|
778
777
|
this.onBundleMerged = args.onBundleMerged;
|
|
779
778
|
this.onBundleFetched = args.onBundleFetched;
|
|
780
779
|
this.registerModules(args.builtinModules);
|
|
@@ -874,7 +873,6 @@ var BaseInternalPlasmicComponentLoader = class {
|
|
|
874
873
|
return __async(this, null, function* () {
|
|
875
874
|
var _a;
|
|
876
875
|
const bundle = yield this.fetcher.fetchAllData();
|
|
877
|
-
this.tracker.trackFetch();
|
|
878
876
|
this.mergeBundle(bundle);
|
|
879
877
|
(_a = this.onBundleFetched) == null ? void 0 : _a.call(this);
|
|
880
878
|
return bundle;
|
|
@@ -977,8 +975,7 @@ ${this.bundle.bundleKey}`
|
|
|
977
975
|
getLookup() {
|
|
978
976
|
return new ComponentLookup(this.getBundle(), this.registry);
|
|
979
977
|
}
|
|
980
|
-
trackConversion(
|
|
981
|
-
this.tracker.trackConversion(value);
|
|
978
|
+
trackConversion(_value = 0) {
|
|
982
979
|
}
|
|
983
980
|
getActiveVariation(opts) {
|
|
984
981
|
return __async(this, null, function* () {
|
|
@@ -1002,8 +999,7 @@ ${this.bundle.bundleKey}`
|
|
|
1002
999
|
)
|
|
1003
1000
|
);
|
|
1004
1001
|
}
|
|
1005
|
-
trackRender(
|
|
1006
|
-
this.tracker.trackRender(opts);
|
|
1002
|
+
trackRender(_opts) {
|
|
1007
1003
|
}
|
|
1008
1004
|
loadServerQueriesModule(fileName) {
|
|
1009
1005
|
return this.registry.load(fileName);
|
|
@@ -1150,12 +1146,8 @@ var PlasmicComponentLoader = class {
|
|
|
1150
1146
|
// src/loader-client.ts
|
|
1151
1147
|
var InternalPlasmicComponentLoader = class extends BaseInternalPlasmicComponentLoader {
|
|
1152
1148
|
constructor(opts) {
|
|
1153
|
-
const tracker = new PlasmicTracker2(__spreadProps(__spreadValues({}, opts), {
|
|
1154
|
-
projectIds: opts.projects.map((p) => p.id)
|
|
1155
|
-
}));
|
|
1156
1149
|
super({
|
|
1157
1150
|
opts,
|
|
1158
|
-
tracker,
|
|
1159
1151
|
fetcher: new PlasmicModulesFetcher2(opts),
|
|
1160
1152
|
onBundleMerged: () => {
|
|
1161
1153
|
this.refreshRegistry();
|