@plasmicapp/loader-react 1.0.169 → 1.0.172

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
@@ -52,6 +52,14 @@ export declare type GlobalContextMeta<P> = Omit<InternalGlobalContextMeta<P>, 'i
52
52
  */
53
53
  importPath?: string;
54
54
  };
55
+ export declare type FetchPagesOpts = {
56
+ /**
57
+ * Whether to include dynamic pages in fetchPages() output. A page is
58
+ * considered dynamic if its path contains some param between brackets,
59
+ * e.g. "[slug]".
60
+ */
61
+ includeDynamicPages?: boolean;
62
+ };
55
63
  export declare class InternalPlasmicComponentLoader {
56
64
  private opts;
57
65
  private fetcher;
@@ -78,7 +86,7 @@ export declare class InternalPlasmicComponentLoader {
78
86
  private maybeGetCompMetas;
79
87
  maybeFetchComponentData(...specs: ComponentLookupSpec[]): Promise<ComponentRenderData | null>;
80
88
  fetchComponentData(...specs: ComponentLookupSpec[]): Promise<ComponentRenderData>;
81
- fetchPages(): Promise<PageMeta[]>;
89
+ fetchPages(opts?: FetchPagesOpts): Promise<PageMeta[]>;
82
90
  fetchComponents(): Promise<ComponentMeta[]>;
83
91
  getLookup(): ComponentLookup;
84
92
  getActiveSplits(): import("@plasmicapp/loader-core").Split[];
@@ -161,7 +169,7 @@ export declare class PlasmicComponentLoader {
161
169
  /**
162
170
  * Returns all the page component metadata for these projects.
163
171
  */
164
- fetchPages(): Promise<PageMeta[]>;
172
+ fetchPages(opts?: FetchPagesOpts): Promise<PageMeta[]>;
165
173
  /**
166
174
  * Returns all components metadata for these projects.
167
175
  */
package/dist/utils.d.ts CHANGED
@@ -21,6 +21,7 @@ export declare function useIsMounted(): () => boolean;
21
21
  export declare function matchesPagePath(pagePath: string, lookup: string): {
22
22
  params: Record<string, string>;
23
23
  } | false;
24
+ export declare function isDynamicPagePath(path: string): boolean;
24
25
  export declare function getCompMetas(metas: ComponentMeta[], lookup: ComponentLookupSpec): (ComponentMeta | {
25
26
  params: Record<string, string>;
26
27
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicapp/loader-react",
3
- "version": "1.0.169",
3
+ "version": "1.0.172",
4
4
  "module": "dist/loader-react.esm.js",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -22,7 +22,7 @@
22
22
  "analyze": "size-limit --why"
23
23
  },
24
24
  "dependencies": {
25
- "@plasmicapp/host": "1.0.75",
25
+ "@plasmicapp/host": "1.0.76",
26
26
  "@plasmicapp/loader-core": "1.0.81",
27
27
  "@plasmicapp/loader-splits": "1.0.15",
28
28
  "@plasmicapp/query": "0.1.53",
@@ -74,5 +74,5 @@
74
74
  "typescript": "^4.3.2"
75
75
  },
76
76
  "license": "MIT",
77
- "gitHead": "bd359c4a86335fe6884ae7eebcab34bc4c4b1358"
77
+ "gitHead": "472590fb64fd6984d5f90e2f83e622b7e31f7351"
78
78
  }