@plasmicapp/host 1.0.205 → 1.0.207
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/exports.d.ts +1 -1
- package/dist/host.esm.js +1 -1
- package/dist/host.esm.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/prop-types.d.ts +15 -0
- package/dist/registerComponent.d.ts +7 -3
- package/dist/version.d.ts +1 -1
- package/package.json +2 -2
- package/registerComponent/dist/exports.d.ts +1 -1
- package/registerComponent/dist/index.cjs.js.map +1 -1
- package/registerComponent/dist/index.esm.js.map +1 -1
- package/registerComponent/dist/prop-types.d.ts +15 -0
- package/registerComponent/dist/registerComponent.d.ts +7 -3
- package/registerComponent/dist/version.d.ts +1 -1
- package/registerFunction/dist/exports.d.ts +1 -1
- package/registerFunction/dist/prop-types.d.ts +15 -0
- package/registerFunction/dist/registerComponent.d.ts +7 -3
- package/registerFunction/dist/version.d.ts +1 -1
- package/registerGlobalContext/dist/exports.d.ts +1 -1
- package/registerGlobalContext/dist/prop-types.d.ts +15 -0
- package/registerGlobalContext/dist/registerComponent.d.ts +7 -3
- package/registerGlobalContext/dist/version.d.ts +1 -1
- package/registerToken/dist/exports.d.ts +1 -1
- package/registerToken/dist/prop-types.d.ts +15 -0
- package/registerToken/dist/registerComponent.d.ts +7 -3
- package/registerToken/dist/version.d.ts +1 -1
- package/registerTrait/dist/exports.d.ts +1 -1
- package/registerTrait/dist/prop-types.d.ts +15 -0
- package/registerTrait/dist/registerComponent.d.ts +7 -3
- package/registerTrait/dist/version.d.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CodeComponentElement, CSSProperties } from "./element-types";
|
|
3
|
-
import { ContextDependentConfig, InferDataType, PropType, RestrictPropType, StudioOps } from "./prop-types";
|
|
3
|
+
import { ContextDependentConfig, InferDataType, ProjectData, PropType, RestrictPropType, StudioOps } from "./prop-types";
|
|
4
4
|
import { TupleUnion } from "./type-utils";
|
|
5
5
|
export type * from "./prop-types";
|
|
6
6
|
export interface ActionProps<P> {
|
|
@@ -15,6 +15,10 @@ export interface ActionProps<P> {
|
|
|
15
15
|
* Operations available to the editor that allow modifying the entire component.
|
|
16
16
|
*/
|
|
17
17
|
studioOps: StudioOps;
|
|
18
|
+
/**
|
|
19
|
+
* Metadata from the studio project.
|
|
20
|
+
*/
|
|
21
|
+
projectData: ProjectData;
|
|
18
22
|
/**
|
|
19
23
|
* The document that the component will be rendered into; instead of using
|
|
20
24
|
* `document` directly (for, say, `document.querySelector()` etc.), you
|
|
@@ -263,10 +267,10 @@ export interface CodeComponentMeta<P> {
|
|
|
263
267
|
*/
|
|
264
268
|
trapsFocus?: boolean;
|
|
265
269
|
/**
|
|
266
|
-
* An object
|
|
270
|
+
* An object registering code component's variants that should be allowed in Studio, when the component is
|
|
267
271
|
* used as the root of a Studio component.
|
|
268
272
|
*/
|
|
269
|
-
|
|
273
|
+
variants?: Record<string, {
|
|
270
274
|
cssSelector: string;
|
|
271
275
|
displayName: string;
|
|
272
276
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const hostVersion = "1.0.
|
|
1
|
+
export declare const hostVersion = "1.0.207";
|
|
@@ -4,7 +4,7 @@ export { PlasmicElement } from "./element-types";
|
|
|
4
4
|
export { registerFetcher as unstable_registerFetcher } from "./fetcher";
|
|
5
5
|
export * from "./global-actions";
|
|
6
6
|
export * from "./link";
|
|
7
|
-
export { ContextDependentConfig, PropType } from "./prop-types";
|
|
7
|
+
export { ContextDependentConfig, CustomControlProps, ProjectData, PropType, StudioOps, } from "./prop-types";
|
|
8
8
|
export { Action, ActionProps, CodeComponentMeta, CodeComponentMode, ComponentHelpers, ComponentMeta, ComponentRegistration, ComponentTemplates, StateHelpers, StateSpec, default as registerComponent, stateHelpersKeys, } from "./registerComponent";
|
|
9
9
|
export { CustomFunctionMeta, CustomFunctionRegistration, ParamType, default as registerFunction, } from "./registerFunction";
|
|
10
10
|
export { GlobalContextMeta, PropType as GlobalContextPropType, GlobalContextRegistration, default as registerGlobalContext, } from "./registerGlobalContext";
|
|
@@ -412,6 +412,17 @@ export interface StudioOps {
|
|
|
412
412
|
updateProps: (newValues: any) => void;
|
|
413
413
|
updateStates: (newValues: any) => void;
|
|
414
414
|
}
|
|
415
|
+
export interface ProjectData {
|
|
416
|
+
components: {
|
|
417
|
+
name: string;
|
|
418
|
+
}[];
|
|
419
|
+
pages: {
|
|
420
|
+
name: string;
|
|
421
|
+
pageMeta: {
|
|
422
|
+
path: string;
|
|
423
|
+
};
|
|
424
|
+
}[];
|
|
425
|
+
}
|
|
415
426
|
export interface CustomControlProps<P> {
|
|
416
427
|
componentProps: P;
|
|
417
428
|
/**
|
|
@@ -425,6 +436,10 @@ export interface CustomControlProps<P> {
|
|
|
425
436
|
* Can be null if the custom prop is used in a global context.
|
|
426
437
|
*/
|
|
427
438
|
studioOps: StudioOps | null;
|
|
439
|
+
/**
|
|
440
|
+
* Metadata from the studio project.
|
|
441
|
+
*/
|
|
442
|
+
projectData: ProjectData;
|
|
428
443
|
value: any;
|
|
429
444
|
/**
|
|
430
445
|
* Sets the value to be passed to the prop. Expects a JSON-compatible value.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CodeComponentElement, CSSProperties } from "./element-types";
|
|
3
|
-
import { ContextDependentConfig, InferDataType, PropType, RestrictPropType, StudioOps } from "./prop-types";
|
|
3
|
+
import { ContextDependentConfig, InferDataType, ProjectData, PropType, RestrictPropType, StudioOps } from "./prop-types";
|
|
4
4
|
import { TupleUnion } from "./type-utils";
|
|
5
5
|
export type * from "./prop-types";
|
|
6
6
|
export interface ActionProps<P> {
|
|
@@ -15,6 +15,10 @@ export interface ActionProps<P> {
|
|
|
15
15
|
* Operations available to the editor that allow modifying the entire component.
|
|
16
16
|
*/
|
|
17
17
|
studioOps: StudioOps;
|
|
18
|
+
/**
|
|
19
|
+
* Metadata from the studio project.
|
|
20
|
+
*/
|
|
21
|
+
projectData: ProjectData;
|
|
18
22
|
/**
|
|
19
23
|
* The document that the component will be rendered into; instead of using
|
|
20
24
|
* `document` directly (for, say, `document.querySelector()` etc.), you
|
|
@@ -263,10 +267,10 @@ export interface CodeComponentMeta<P> {
|
|
|
263
267
|
*/
|
|
264
268
|
trapsFocus?: boolean;
|
|
265
269
|
/**
|
|
266
|
-
* An object
|
|
270
|
+
* An object registering code component's variants that should be allowed in Studio, when the component is
|
|
267
271
|
* used as the root of a Studio component.
|
|
268
272
|
*/
|
|
269
|
-
|
|
273
|
+
variants?: Record<string, {
|
|
270
274
|
cssSelector: string;
|
|
271
275
|
displayName: string;
|
|
272
276
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const hostVersion = "1.0.
|
|
1
|
+
export declare const hostVersion = "1.0.207";
|
|
@@ -4,7 +4,7 @@ export { PlasmicElement } from "./element-types";
|
|
|
4
4
|
export { registerFetcher as unstable_registerFetcher } from "./fetcher";
|
|
5
5
|
export * from "./global-actions";
|
|
6
6
|
export * from "./link";
|
|
7
|
-
export { ContextDependentConfig, PropType } from "./prop-types";
|
|
7
|
+
export { ContextDependentConfig, CustomControlProps, ProjectData, PropType, StudioOps, } from "./prop-types";
|
|
8
8
|
export { Action, ActionProps, CodeComponentMeta, CodeComponentMode, ComponentHelpers, ComponentMeta, ComponentRegistration, ComponentTemplates, StateHelpers, StateSpec, default as registerComponent, stateHelpersKeys, } from "./registerComponent";
|
|
9
9
|
export { CustomFunctionMeta, CustomFunctionRegistration, ParamType, default as registerFunction, } from "./registerFunction";
|
|
10
10
|
export { GlobalContextMeta, PropType as GlobalContextPropType, GlobalContextRegistration, default as registerGlobalContext, } from "./registerGlobalContext";
|
|
@@ -412,6 +412,17 @@ export interface StudioOps {
|
|
|
412
412
|
updateProps: (newValues: any) => void;
|
|
413
413
|
updateStates: (newValues: any) => void;
|
|
414
414
|
}
|
|
415
|
+
export interface ProjectData {
|
|
416
|
+
components: {
|
|
417
|
+
name: string;
|
|
418
|
+
}[];
|
|
419
|
+
pages: {
|
|
420
|
+
name: string;
|
|
421
|
+
pageMeta: {
|
|
422
|
+
path: string;
|
|
423
|
+
};
|
|
424
|
+
}[];
|
|
425
|
+
}
|
|
415
426
|
export interface CustomControlProps<P> {
|
|
416
427
|
componentProps: P;
|
|
417
428
|
/**
|
|
@@ -425,6 +436,10 @@ export interface CustomControlProps<P> {
|
|
|
425
436
|
* Can be null if the custom prop is used in a global context.
|
|
426
437
|
*/
|
|
427
438
|
studioOps: StudioOps | null;
|
|
439
|
+
/**
|
|
440
|
+
* Metadata from the studio project.
|
|
441
|
+
*/
|
|
442
|
+
projectData: ProjectData;
|
|
428
443
|
value: any;
|
|
429
444
|
/**
|
|
430
445
|
* Sets the value to be passed to the prop. Expects a JSON-compatible value.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CodeComponentElement, CSSProperties } from "./element-types";
|
|
3
|
-
import { ContextDependentConfig, InferDataType, PropType, RestrictPropType, StudioOps } from "./prop-types";
|
|
3
|
+
import { ContextDependentConfig, InferDataType, ProjectData, PropType, RestrictPropType, StudioOps } from "./prop-types";
|
|
4
4
|
import { TupleUnion } from "./type-utils";
|
|
5
5
|
export type * from "./prop-types";
|
|
6
6
|
export interface ActionProps<P> {
|
|
@@ -15,6 +15,10 @@ export interface ActionProps<P> {
|
|
|
15
15
|
* Operations available to the editor that allow modifying the entire component.
|
|
16
16
|
*/
|
|
17
17
|
studioOps: StudioOps;
|
|
18
|
+
/**
|
|
19
|
+
* Metadata from the studio project.
|
|
20
|
+
*/
|
|
21
|
+
projectData: ProjectData;
|
|
18
22
|
/**
|
|
19
23
|
* The document that the component will be rendered into; instead of using
|
|
20
24
|
* `document` directly (for, say, `document.querySelector()` etc.), you
|
|
@@ -263,10 +267,10 @@ export interface CodeComponentMeta<P> {
|
|
|
263
267
|
*/
|
|
264
268
|
trapsFocus?: boolean;
|
|
265
269
|
/**
|
|
266
|
-
* An object
|
|
270
|
+
* An object registering code component's variants that should be allowed in Studio, when the component is
|
|
267
271
|
* used as the root of a Studio component.
|
|
268
272
|
*/
|
|
269
|
-
|
|
273
|
+
variants?: Record<string, {
|
|
270
274
|
cssSelector: string;
|
|
271
275
|
displayName: string;
|
|
272
276
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const hostVersion = "1.0.
|
|
1
|
+
export declare const hostVersion = "1.0.207";
|
|
@@ -4,7 +4,7 @@ export { PlasmicElement } from "./element-types";
|
|
|
4
4
|
export { registerFetcher as unstable_registerFetcher } from "./fetcher";
|
|
5
5
|
export * from "./global-actions";
|
|
6
6
|
export * from "./link";
|
|
7
|
-
export { ContextDependentConfig, PropType } from "./prop-types";
|
|
7
|
+
export { ContextDependentConfig, CustomControlProps, ProjectData, PropType, StudioOps, } from "./prop-types";
|
|
8
8
|
export { Action, ActionProps, CodeComponentMeta, CodeComponentMode, ComponentHelpers, ComponentMeta, ComponentRegistration, ComponentTemplates, StateHelpers, StateSpec, default as registerComponent, stateHelpersKeys, } from "./registerComponent";
|
|
9
9
|
export { CustomFunctionMeta, CustomFunctionRegistration, ParamType, default as registerFunction, } from "./registerFunction";
|
|
10
10
|
export { GlobalContextMeta, PropType as GlobalContextPropType, GlobalContextRegistration, default as registerGlobalContext, } from "./registerGlobalContext";
|
|
@@ -412,6 +412,17 @@ export interface StudioOps {
|
|
|
412
412
|
updateProps: (newValues: any) => void;
|
|
413
413
|
updateStates: (newValues: any) => void;
|
|
414
414
|
}
|
|
415
|
+
export interface ProjectData {
|
|
416
|
+
components: {
|
|
417
|
+
name: string;
|
|
418
|
+
}[];
|
|
419
|
+
pages: {
|
|
420
|
+
name: string;
|
|
421
|
+
pageMeta: {
|
|
422
|
+
path: string;
|
|
423
|
+
};
|
|
424
|
+
}[];
|
|
425
|
+
}
|
|
415
426
|
export interface CustomControlProps<P> {
|
|
416
427
|
componentProps: P;
|
|
417
428
|
/**
|
|
@@ -425,6 +436,10 @@ export interface CustomControlProps<P> {
|
|
|
425
436
|
* Can be null if the custom prop is used in a global context.
|
|
426
437
|
*/
|
|
427
438
|
studioOps: StudioOps | null;
|
|
439
|
+
/**
|
|
440
|
+
* Metadata from the studio project.
|
|
441
|
+
*/
|
|
442
|
+
projectData: ProjectData;
|
|
428
443
|
value: any;
|
|
429
444
|
/**
|
|
430
445
|
* Sets the value to be passed to the prop. Expects a JSON-compatible value.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CodeComponentElement, CSSProperties } from "./element-types";
|
|
3
|
-
import { ContextDependentConfig, InferDataType, PropType, RestrictPropType, StudioOps } from "./prop-types";
|
|
3
|
+
import { ContextDependentConfig, InferDataType, ProjectData, PropType, RestrictPropType, StudioOps } from "./prop-types";
|
|
4
4
|
import { TupleUnion } from "./type-utils";
|
|
5
5
|
export type * from "./prop-types";
|
|
6
6
|
export interface ActionProps<P> {
|
|
@@ -15,6 +15,10 @@ export interface ActionProps<P> {
|
|
|
15
15
|
* Operations available to the editor that allow modifying the entire component.
|
|
16
16
|
*/
|
|
17
17
|
studioOps: StudioOps;
|
|
18
|
+
/**
|
|
19
|
+
* Metadata from the studio project.
|
|
20
|
+
*/
|
|
21
|
+
projectData: ProjectData;
|
|
18
22
|
/**
|
|
19
23
|
* The document that the component will be rendered into; instead of using
|
|
20
24
|
* `document` directly (for, say, `document.querySelector()` etc.), you
|
|
@@ -263,10 +267,10 @@ export interface CodeComponentMeta<P> {
|
|
|
263
267
|
*/
|
|
264
268
|
trapsFocus?: boolean;
|
|
265
269
|
/**
|
|
266
|
-
* An object
|
|
270
|
+
* An object registering code component's variants that should be allowed in Studio, when the component is
|
|
267
271
|
* used as the root of a Studio component.
|
|
268
272
|
*/
|
|
269
|
-
|
|
273
|
+
variants?: Record<string, {
|
|
270
274
|
cssSelector: string;
|
|
271
275
|
displayName: string;
|
|
272
276
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const hostVersion = "1.0.
|
|
1
|
+
export declare const hostVersion = "1.0.207";
|
|
@@ -4,7 +4,7 @@ export { PlasmicElement } from "./element-types";
|
|
|
4
4
|
export { registerFetcher as unstable_registerFetcher } from "./fetcher";
|
|
5
5
|
export * from "./global-actions";
|
|
6
6
|
export * from "./link";
|
|
7
|
-
export { ContextDependentConfig, PropType } from "./prop-types";
|
|
7
|
+
export { ContextDependentConfig, CustomControlProps, ProjectData, PropType, StudioOps, } from "./prop-types";
|
|
8
8
|
export { Action, ActionProps, CodeComponentMeta, CodeComponentMode, ComponentHelpers, ComponentMeta, ComponentRegistration, ComponentTemplates, StateHelpers, StateSpec, default as registerComponent, stateHelpersKeys, } from "./registerComponent";
|
|
9
9
|
export { CustomFunctionMeta, CustomFunctionRegistration, ParamType, default as registerFunction, } from "./registerFunction";
|
|
10
10
|
export { GlobalContextMeta, PropType as GlobalContextPropType, GlobalContextRegistration, default as registerGlobalContext, } from "./registerGlobalContext";
|
|
@@ -412,6 +412,17 @@ export interface StudioOps {
|
|
|
412
412
|
updateProps: (newValues: any) => void;
|
|
413
413
|
updateStates: (newValues: any) => void;
|
|
414
414
|
}
|
|
415
|
+
export interface ProjectData {
|
|
416
|
+
components: {
|
|
417
|
+
name: string;
|
|
418
|
+
}[];
|
|
419
|
+
pages: {
|
|
420
|
+
name: string;
|
|
421
|
+
pageMeta: {
|
|
422
|
+
path: string;
|
|
423
|
+
};
|
|
424
|
+
}[];
|
|
425
|
+
}
|
|
415
426
|
export interface CustomControlProps<P> {
|
|
416
427
|
componentProps: P;
|
|
417
428
|
/**
|
|
@@ -425,6 +436,10 @@ export interface CustomControlProps<P> {
|
|
|
425
436
|
* Can be null if the custom prop is used in a global context.
|
|
426
437
|
*/
|
|
427
438
|
studioOps: StudioOps | null;
|
|
439
|
+
/**
|
|
440
|
+
* Metadata from the studio project.
|
|
441
|
+
*/
|
|
442
|
+
projectData: ProjectData;
|
|
428
443
|
value: any;
|
|
429
444
|
/**
|
|
430
445
|
* Sets the value to be passed to the prop. Expects a JSON-compatible value.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CodeComponentElement, CSSProperties } from "./element-types";
|
|
3
|
-
import { ContextDependentConfig, InferDataType, PropType, RestrictPropType, StudioOps } from "./prop-types";
|
|
3
|
+
import { ContextDependentConfig, InferDataType, ProjectData, PropType, RestrictPropType, StudioOps } from "./prop-types";
|
|
4
4
|
import { TupleUnion } from "./type-utils";
|
|
5
5
|
export type * from "./prop-types";
|
|
6
6
|
export interface ActionProps<P> {
|
|
@@ -15,6 +15,10 @@ export interface ActionProps<P> {
|
|
|
15
15
|
* Operations available to the editor that allow modifying the entire component.
|
|
16
16
|
*/
|
|
17
17
|
studioOps: StudioOps;
|
|
18
|
+
/**
|
|
19
|
+
* Metadata from the studio project.
|
|
20
|
+
*/
|
|
21
|
+
projectData: ProjectData;
|
|
18
22
|
/**
|
|
19
23
|
* The document that the component will be rendered into; instead of using
|
|
20
24
|
* `document` directly (for, say, `document.querySelector()` etc.), you
|
|
@@ -263,10 +267,10 @@ export interface CodeComponentMeta<P> {
|
|
|
263
267
|
*/
|
|
264
268
|
trapsFocus?: boolean;
|
|
265
269
|
/**
|
|
266
|
-
* An object
|
|
270
|
+
* An object registering code component's variants that should be allowed in Studio, when the component is
|
|
267
271
|
* used as the root of a Studio component.
|
|
268
272
|
*/
|
|
269
|
-
|
|
273
|
+
variants?: Record<string, {
|
|
270
274
|
cssSelector: string;
|
|
271
275
|
displayName: string;
|
|
272
276
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const hostVersion = "1.0.
|
|
1
|
+
export declare const hostVersion = "1.0.207";
|