@plasmicapp/loader-react 1.0.228 → 1.0.230

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
@@ -1,4 +1,4 @@
1
- import { ComponentMeta as InternalCodeComponentMeta, GlobalContextMeta as InternalGlobalContextMeta, TokenRegistration, TraitMeta } from '@plasmicapp/host';
1
+ import { ComponentMeta as InternalCodeComponentMeta, GlobalContextMeta as InternalGlobalContextMeta, StateHelpers, StateSpec, TokenRegistration, TraitMeta } from '@plasmicapp/host';
2
2
  import { ComponentMeta, LoaderBundleOutput, TrackRenderOptions } from '@plasmicapp/loader-core';
3
3
  import React from 'react';
4
4
  import { ComponentLookup } from './component-lookup';
@@ -15,7 +15,7 @@ export interface ComponentRenderData {
15
15
  interface PlasmicRootWatcher {
16
16
  onDataFetched?: () => void;
17
17
  }
18
- export declare type CodeComponentMeta<P> = Omit<InternalCodeComponentMeta<P>, 'importPath'> & {
18
+ export declare type CodeComponentMeta<P> = Omit<InternalCodeComponentMeta<P>, 'importPath' | 'componentHelpers'> & {
19
19
  /**
20
20
  * The path to be used when importing the component in the generated code.
21
21
  * It can be the name of the package that contains the component, or the path
@@ -23,6 +23,10 @@ export declare type CodeComponentMeta<P> = Omit<InternalCodeComponentMeta<P>, 'i
23
23
  * Optional: not used by Plasmic headless API, only by codegen.
24
24
  */
25
25
  importPath?: string;
26
+ /**
27
+ * The states helpers are registered together with the states for the Plasmic headless API
28
+ */
29
+ states?: Record<string, StateSpec & StateHelpers<P, any>>;
26
30
  };
27
31
  export declare type GlobalContextMeta<P> = Omit<InternalGlobalContextMeta<P>, 'importPath'> & {
28
32
  /**
@@ -1,4 +1,4 @@
1
- import { ComponentMeta as InternalCodeComponentMeta, GlobalContextMeta as InternalGlobalContextMeta, TokenRegistration, TraitMeta } from '@plasmicapp/host';
1
+ import { ComponentMeta as InternalCodeComponentMeta, GlobalContextMeta as InternalGlobalContextMeta, StateHelpers, StateSpec, TokenRegistration, TraitMeta } from '@plasmicapp/host';
2
2
  import { ComponentMeta, LoaderBundleOutput, TrackRenderOptions } from '@plasmicapp/loader-core';
3
3
  import React from 'react';
4
4
  import { ComponentLookup } from './component-lookup';
@@ -15,7 +15,7 @@ export interface ComponentRenderData {
15
15
  interface PlasmicRootWatcher {
16
16
  onDataFetched?: () => void;
17
17
  }
18
- export declare type CodeComponentMeta<P> = Omit<InternalCodeComponentMeta<P>, 'importPath'> & {
18
+ export declare type CodeComponentMeta<P> = Omit<InternalCodeComponentMeta<P>, 'importPath' | 'componentHelpers'> & {
19
19
  /**
20
20
  * The path to be used when importing the component in the generated code.
21
21
  * It can be the name of the package that contains the component, or the path
@@ -23,6 +23,10 @@ export declare type CodeComponentMeta<P> = Omit<InternalCodeComponentMeta<P>, 'i
23
23
  * Optional: not used by Plasmic headless API, only by codegen.
24
24
  */
25
25
  importPath?: string;
26
+ /**
27
+ * The states helpers are registered together with the states for the Plasmic headless API
28
+ */
29
+ states?: Record<string, StateSpec & StateHelpers<P, any>>;
26
30
  };
27
31
  export declare type GlobalContextMeta<P> = Omit<InternalGlobalContextMeta<P>, 'importPath'> & {
28
32
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicapp/loader-react",
3
- "version": "1.0.228",
3
+ "version": "1.0.230",
4
4
  "module": "dist/loader-react.esm.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "@plasmicapp/data-sources-context": "0.1.7",
55
- "@plasmicapp/host": "1.0.111",
55
+ "@plasmicapp/host": "1.0.113",
56
56
  "@plasmicapp/loader-core": "1.0.97",
57
57
  "@plasmicapp/loader-splits": "1.0.26",
58
58
  "@plasmicapp/query": "0.1.61",
@@ -113,5 +113,5 @@
113
113
  "typescript": "^4.3.2"
114
114
  },
115
115
  "license": "MIT",
116
- "gitHead": "c639a88566f317fdbdafb152b698b955262c5c44"
116
+ "gitHead": "256694dd227acca3600d2475b0985713252d99cb"
117
117
  }