@measured/puck-plugin-emotion-cache 0.21.0-canary.1df9ddeb → 0.21.0-canary.29ef7131
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 +6 -2
- package/dist/index.d.ts +6 -2
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -52,7 +52,7 @@ type ArrayField<Props extends {
|
|
|
52
52
|
type: PropertyKey;
|
|
53
53
|
} ? Field<Props[0][SubPropName], UserField> | UserField : Field<Props[0][SubPropName], UserField>;
|
|
54
54
|
};
|
|
55
|
-
defaultItemProps?: Props[0];
|
|
55
|
+
defaultItemProps?: Props[0] | ((index: number) => Props[0]);
|
|
56
56
|
getItemSummary?: (item: Props[0], index?: number) => string;
|
|
57
57
|
max?: number;
|
|
58
58
|
min?: number;
|
|
@@ -82,10 +82,14 @@ type ExternalFieldWithAdaptor<Props extends any = {
|
|
|
82
82
|
adaptorParams?: object;
|
|
83
83
|
getItemSummary: (item: NotUndefined<Props>, index?: number) => string;
|
|
84
84
|
};
|
|
85
|
+
type CacheOpts = {
|
|
86
|
+
enabled?: boolean;
|
|
87
|
+
};
|
|
85
88
|
type ExternalField<Props extends any = {
|
|
86
89
|
[key: string]: any;
|
|
87
90
|
}> = BaseField & {
|
|
88
91
|
type: "external";
|
|
92
|
+
cache?: CacheOpts;
|
|
89
93
|
placeholder?: string;
|
|
90
94
|
fetchList: (params: {
|
|
91
95
|
query: string;
|
|
@@ -147,7 +151,7 @@ type DropZoneProps = {
|
|
|
147
151
|
};
|
|
148
152
|
|
|
149
153
|
type PuckContext = {
|
|
150
|
-
renderDropZone: React.
|
|
154
|
+
renderDropZone: (props: DropZoneProps) => React.ReactNode;
|
|
151
155
|
metadata: Metadata;
|
|
152
156
|
isEditing: boolean;
|
|
153
157
|
dragRef: ((element: Element | null) => void) | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ type ArrayField<Props extends {
|
|
|
52
52
|
type: PropertyKey;
|
|
53
53
|
} ? Field<Props[0][SubPropName], UserField> | UserField : Field<Props[0][SubPropName], UserField>;
|
|
54
54
|
};
|
|
55
|
-
defaultItemProps?: Props[0];
|
|
55
|
+
defaultItemProps?: Props[0] | ((index: number) => Props[0]);
|
|
56
56
|
getItemSummary?: (item: Props[0], index?: number) => string;
|
|
57
57
|
max?: number;
|
|
58
58
|
min?: number;
|
|
@@ -82,10 +82,14 @@ type ExternalFieldWithAdaptor<Props extends any = {
|
|
|
82
82
|
adaptorParams?: object;
|
|
83
83
|
getItemSummary: (item: NotUndefined<Props>, index?: number) => string;
|
|
84
84
|
};
|
|
85
|
+
type CacheOpts = {
|
|
86
|
+
enabled?: boolean;
|
|
87
|
+
};
|
|
85
88
|
type ExternalField<Props extends any = {
|
|
86
89
|
[key: string]: any;
|
|
87
90
|
}> = BaseField & {
|
|
88
91
|
type: "external";
|
|
92
|
+
cache?: CacheOpts;
|
|
89
93
|
placeholder?: string;
|
|
90
94
|
fetchList: (params: {
|
|
91
95
|
query: string;
|
|
@@ -147,7 +151,7 @@ type DropZoneProps = {
|
|
|
147
151
|
};
|
|
148
152
|
|
|
149
153
|
type PuckContext = {
|
|
150
|
-
renderDropZone: React.
|
|
154
|
+
renderDropZone: (props: DropZoneProps) => React.ReactNode;
|
|
151
155
|
metadata: Metadata;
|
|
152
156
|
isEditing: boolean;
|
|
153
157
|
dragRef: ((element: Element | null) => void) | null;
|
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.29ef7131",
|
|
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.29ef7131",
|
|
28
28
|
"@types/react": "^19.0.1",
|
|
29
29
|
"@types/react-dom": "^19.0.2",
|
|
30
30
|
"eslint": "^7.32.0",
|