@measured/puck-plugin-emotion-cache 0.21.0-canary.304940ae → 0.21.0-canary.38e79ba8

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 CHANGED
@@ -1,4 +1,4 @@
1
- import { ReactElement, CSSProperties, ElementType, ReactNode, JSX } from 'react';
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) => string;
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) => string;
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) => string;
100
+ getItemSummary?: (item: NotUndefined<Props>, index?: number) => ReactNode;
101
101
  showSearch?: boolean;
102
102
  renderFooter?: (props: {
103
103
  items: any[];
@@ -238,6 +238,7 @@ UserField extends BaseField = {}> = {
238
238
  permissions: Partial<Permissions>;
239
239
  appState: AppState;
240
240
  lastData: DataShape | null;
241
+ parent: ComponentData | null;
241
242
  }) => Promise<Partial<Permissions>> | Partial<Permissions>;
242
243
  metadata?: ComponentMetadata;
243
244
  } & ComponentConfigExtensions;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ReactElement, CSSProperties, ElementType, ReactNode, JSX } from 'react';
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) => string;
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) => string;
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) => string;
100
+ getItemSummary?: (item: NotUndefined<Props>, index?: number) => ReactNode;
101
101
  showSearch?: boolean;
102
102
  renderFooter?: (props: {
103
103
  items: any[];
@@ -238,6 +238,7 @@ UserField extends BaseField = {}> = {
238
238
  permissions: Partial<Permissions>;
239
239
  appState: AppState;
240
240
  lastData: DataShape | null;
241
+ parent: ComponentData | null;
241
242
  }) => Promise<Partial<Permissions>> | Partial<Permissions>;
242
243
  metadata?: ComponentMetadata;
243
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.304940ae",
3
+ "version": "0.21.0-canary.38e79ba8",
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.304940ae",
27
+ "@measured/puck": "^0.21.0-canary.38e79ba8",
28
28
  "@types/minimatch": "3.0.5",
29
29
  "@types/react": "^19.0.1",
30
30
  "@types/react-dom": "^19.0.2",