@plasmicapp/loader-react 1.0.88 → 1.0.94

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/loader.d.ts CHANGED
@@ -75,8 +75,14 @@ export declare class InternalPlasmicComponentLoader {
75
75
  fetchPages(): Promise<PageMeta[]>;
76
76
  fetchComponents(): Promise<ComponentMeta[]>;
77
77
  getLookup(): ComponentLookup;
78
+ getActiveSplits(): import("@plasmicapp/loader-core").Split[];
78
79
  private fetchMissingData;
79
80
  private maybeReportClientSideFetch;
81
+ getActiveVariation(opts: {
82
+ traits: Record<string, string | number>;
83
+ getKnownValue: (key: string) => string | undefined;
84
+ updateKnownValue: (key: string, value: string) => void;
85
+ }): Promise<Record<string, string>>;
80
86
  private fetchAllData;
81
87
  private mergeBundle;
82
88
  private refreshRegistry;
@@ -149,6 +155,16 @@ export declare class PlasmicComponentLoader {
149
155
  * Returns all components metadata for these projects.
150
156
  */
151
157
  fetchComponents(): Promise<ComponentMeta[]>;
158
+ protected _getActiveVariation(opts: {
159
+ traits: Record<string, string | number>;
160
+ getKnownValue: (key: string) => string | undefined;
161
+ updateKnownValue: (key: string, value: string) => void;
162
+ }): Promise<Record<string, string>>;
163
+ getActiveVariation(opts: {
164
+ known?: Record<string, string>;
165
+ traits: Record<string, string | number>;
166
+ }): Promise<Record<string, string>>;
167
+ getActiveSplits(): import("@plasmicapp/loader-core").Split[];
152
168
  clearCache(): void;
153
169
  }
154
170
  export {};
@@ -0,0 +1,8 @@
1
+ import { Split } from '@plasmicapp/loader-core';
2
+ import type { GlobalVariantSpec } from './PlasmicRootProvider';
3
+ export declare function getPlasmicCookieValues(): {
4
+ [k: string]: string;
5
+ };
6
+ export declare function updatePlasmicCookieValue(key: string, value: string): void;
7
+ export declare const getGlobalVariantsFromSplits: (splits: Split[], variation: Record<string, string>) => GlobalVariantSpec[];
8
+ export declare const mergeGlobalVariantsSpec: (target: GlobalVariantSpec[], from: GlobalVariantSpec[]) => GlobalVariantSpec[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicapp/loader-react",
3
- "version": "1.0.88",
3
+ "version": "1.0.94",
4
4
  "module": "dist/loader-react.esm.js",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -21,9 +21,10 @@
21
21
  "analyze": "size-limit --why"
22
22
  },
23
23
  "dependencies": {
24
- "@plasmicapp/host": "1.0.32",
25
- "@plasmicapp/loader-core": "1.0.69",
26
- "@plasmicapp/query": "0.1.39",
24
+ "@plasmicapp/host": "1.0.36",
25
+ "@plasmicapp/loader-core": "1.0.71",
26
+ "@plasmicapp/loader-splits": "1.0.1",
27
+ "@plasmicapp/query": "0.1.41",
27
28
  "pascalcase": "^1.0.0",
28
29
  "react-is": "^17.0.2",
29
30
  "react-ssr-prepass": "^1.4.0"
@@ -72,5 +73,5 @@
72
73
  "typescript": "^4.3.2"
73
74
  },
74
75
  "license": "MIT",
75
- "gitHead": "fa53f7d79f0e26d8b061102fda0c06788da6f8a7"
76
+ "gitHead": "baa29770ee1efd556c2cbe8e6d6266325bf24af6"
76
77
  }