@measured/puck-plugin-emotion-cache 0.21.0-canary.ec77dd9f → 0.21.0-canary.ed10e2a4
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.mts +7 -5
- package/dist/index.d.ts +7 -5
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactElement, CSSProperties,
|
|
1
|
+
import { ReactElement, ReactNode, CSSProperties, ElementType, JSX } from 'react';
|
|
2
2
|
|
|
3
3
|
type ItemSelector = {
|
|
4
4
|
index: number;
|
|
@@ -53,7 +53,7 @@ interface ArrayField<Props extends {
|
|
|
53
53
|
} ? Field<Props[0][SubPropName], UserField> | UserField : Field<Props[0][SubPropName], UserField>;
|
|
54
54
|
};
|
|
55
55
|
defaultItemProps?: Props[0] | ((index: number) => Props[0]);
|
|
56
|
-
getItemSummary?: (item: Props[0], index?: number) =>
|
|
56
|
+
getItemSummary?: (item: Props[0], index?: number) => ReactNode;
|
|
57
57
|
max?: number;
|
|
58
58
|
min?: number;
|
|
59
59
|
}
|
|
@@ -80,7 +80,7 @@ type ExternalFieldWithAdaptor<Props extends any = {
|
|
|
80
80
|
placeholder?: string;
|
|
81
81
|
adaptor: Adaptor<any, any, Props>;
|
|
82
82
|
adaptorParams?: object;
|
|
83
|
-
getItemSummary: (item: NotUndefined<Props>, index?: number) =>
|
|
83
|
+
getItemSummary: (item: NotUndefined<Props>, index?: number) => ReactNode;
|
|
84
84
|
};
|
|
85
85
|
type CacheOpts = {
|
|
86
86
|
enabled?: boolean;
|
|
@@ -97,7 +97,7 @@ interface ExternalField<Props extends any = {
|
|
|
97
97
|
}) => Promise<any[] | null>;
|
|
98
98
|
mapProp?: (value: any) => Props;
|
|
99
99
|
mapRow?: (value: any) => Record<string, string | number | ReactElement>;
|
|
100
|
-
getItemSummary?: (item: NotUndefined<Props>, index?: number) =>
|
|
100
|
+
getItemSummary?: (item: NotUndefined<Props>, index?: number) => ReactNode;
|
|
101
101
|
showSearch?: boolean;
|
|
102
102
|
renderFooter?: (props: {
|
|
103
103
|
items: any[];
|
|
@@ -146,9 +146,10 @@ type DropZoneProps = {
|
|
|
146
146
|
allow?: string[];
|
|
147
147
|
disallow?: string[];
|
|
148
148
|
style?: CSSProperties;
|
|
149
|
-
minEmptyHeight?: number;
|
|
149
|
+
minEmptyHeight?: CSSProperties["minHeight"] | number;
|
|
150
150
|
className?: string;
|
|
151
151
|
collisionAxis?: DragAxis;
|
|
152
|
+
as?: ElementType;
|
|
152
153
|
};
|
|
153
154
|
|
|
154
155
|
type PuckContext = {
|
|
@@ -237,6 +238,7 @@ UserField extends BaseField = {}> = {
|
|
|
237
238
|
permissions: Partial<Permissions>;
|
|
238
239
|
appState: AppState;
|
|
239
240
|
lastData: DataShape | null;
|
|
241
|
+
parent: ComponentData | null;
|
|
240
242
|
}) => Promise<Partial<Permissions>> | Partial<Permissions>;
|
|
241
243
|
metadata?: ComponentMetadata;
|
|
242
244
|
} & ComponentConfigExtensions;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactElement, CSSProperties,
|
|
1
|
+
import { ReactElement, ReactNode, CSSProperties, ElementType, JSX } from 'react';
|
|
2
2
|
|
|
3
3
|
type ItemSelector = {
|
|
4
4
|
index: number;
|
|
@@ -53,7 +53,7 @@ interface ArrayField<Props extends {
|
|
|
53
53
|
} ? Field<Props[0][SubPropName], UserField> | UserField : Field<Props[0][SubPropName], UserField>;
|
|
54
54
|
};
|
|
55
55
|
defaultItemProps?: Props[0] | ((index: number) => Props[0]);
|
|
56
|
-
getItemSummary?: (item: Props[0], index?: number) =>
|
|
56
|
+
getItemSummary?: (item: Props[0], index?: number) => ReactNode;
|
|
57
57
|
max?: number;
|
|
58
58
|
min?: number;
|
|
59
59
|
}
|
|
@@ -80,7 +80,7 @@ type ExternalFieldWithAdaptor<Props extends any = {
|
|
|
80
80
|
placeholder?: string;
|
|
81
81
|
adaptor: Adaptor<any, any, Props>;
|
|
82
82
|
adaptorParams?: object;
|
|
83
|
-
getItemSummary: (item: NotUndefined<Props>, index?: number) =>
|
|
83
|
+
getItemSummary: (item: NotUndefined<Props>, index?: number) => ReactNode;
|
|
84
84
|
};
|
|
85
85
|
type CacheOpts = {
|
|
86
86
|
enabled?: boolean;
|
|
@@ -97,7 +97,7 @@ interface ExternalField<Props extends any = {
|
|
|
97
97
|
}) => Promise<any[] | null>;
|
|
98
98
|
mapProp?: (value: any) => Props;
|
|
99
99
|
mapRow?: (value: any) => Record<string, string | number | ReactElement>;
|
|
100
|
-
getItemSummary?: (item: NotUndefined<Props>, index?: number) =>
|
|
100
|
+
getItemSummary?: (item: NotUndefined<Props>, index?: number) => ReactNode;
|
|
101
101
|
showSearch?: boolean;
|
|
102
102
|
renderFooter?: (props: {
|
|
103
103
|
items: any[];
|
|
@@ -146,9 +146,10 @@ type DropZoneProps = {
|
|
|
146
146
|
allow?: string[];
|
|
147
147
|
disallow?: string[];
|
|
148
148
|
style?: CSSProperties;
|
|
149
|
-
minEmptyHeight?: number;
|
|
149
|
+
minEmptyHeight?: CSSProperties["minHeight"] | number;
|
|
150
150
|
className?: string;
|
|
151
151
|
collisionAxis?: DragAxis;
|
|
152
|
+
as?: ElementType;
|
|
152
153
|
};
|
|
153
154
|
|
|
154
155
|
type PuckContext = {
|
|
@@ -237,6 +238,7 @@ UserField extends BaseField = {}> = {
|
|
|
237
238
|
permissions: Partial<Permissions>;
|
|
238
239
|
appState: AppState;
|
|
239
240
|
lastData: DataShape | null;
|
|
241
|
+
parent: ComponentData | null;
|
|
240
242
|
}) => Promise<Partial<Permissions>> | Partial<Permissions>;
|
|
241
243
|
metadata?: ComponentMetadata;
|
|
242
244
|
} & ComponentConfigExtensions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@measured/puck-plugin-emotion-cache",
|
|
3
|
-
"version": "0.21.0-canary.
|
|
3
|
+
"version": "0.21.0-canary.ed10e2a4",
|
|
4
4
|
"author": "Chris Villa <chris@puckeditor.com>",
|
|
5
5
|
"repository": "measuredco/puck",
|
|
6
6
|
"bugs": "https://github.com/measuredco/puck/issues",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@emotion/react": "^11.13.3",
|
|
27
|
-
"@measured/puck": "^0.21.0-canary.
|
|
27
|
+
"@measured/puck": "^0.21.0-canary.ed10e2a4",
|
|
28
28
|
"@types/minimatch": "3.0.5",
|
|
29
29
|
"@types/react": "^19.0.1",
|
|
30
30
|
"@types/react-dom": "^19.0.2",
|