@measured/puck 0.13.0-canary.2e1b5ef → 0.13.0-canary.3aa0057

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.
@@ -42,6 +42,16 @@ type ArrayField<Props extends {
42
42
  defaultItemProps?: Props[0];
43
43
  getItemSummary?: (item: Props[0], index?: number) => string;
44
44
  };
45
+ type ObjectField<Props extends {
46
+ [key: string]: any;
47
+ } = {
48
+ [key: string]: any;
49
+ }> = BaseField & {
50
+ type: "object";
51
+ objectFields: {
52
+ [SubPropName in keyof Props[0]]: Field<Props[0][SubPropName]>;
53
+ };
54
+ };
45
55
  type Adaptor<AdaptorParams = {}, TableShape extends Record<string, any> = {}, PropShape = TableShape> = {
46
56
  name: string;
47
57
  fetchList: (adaptorParams?: AdaptorParams) => Promise<TableShape[] | null>;
@@ -91,7 +101,7 @@ type Field<Props extends {
91
101
  [key: string]: any;
92
102
  } = {
93
103
  [key: string]: any;
94
- }> = TextField | SelectField | ArrayField<Props> | ExternalField<Props> | ExternalFieldWithAdaptor<Props> | CustomField;
104
+ }> = TextField | SelectField | ArrayField<Props> | ObjectField<Props> | ExternalField<Props> | ExternalFieldWithAdaptor<Props> | CustomField;
95
105
  type DefaultRootProps = {
96
106
  title?: string;
97
107
  [key: string]: any;
@@ -199,4 +209,4 @@ type AppState = {
199
209
  ui: UiState;
200
210
  };
201
211
 
202
- export { AppState as A, BaseField as B, Config as C, Data as D, ExternalFieldWithAdaptor as E, Field as F, ItemSelector as I, MappedItem as M, PuckComponent as P, RootDataWithProps as R, SelectField as S, TextField as T, UiState as U, DefaultRootProps as a, RootData as b, ArrayField as c, Adaptor as d, ExternalField as e, CustomField as f, DefaultComponentProps as g, Fields as h, Content as i, PuckContext as j, ComponentConfig as k, BaseData as l, ComponentData as m, RootDataWithoutProps as n, ItemWithId as o, ArrayState as p, DropZone as q };
212
+ export { AppState as A, BaseField as B, Config as C, Data as D, ExternalFieldWithAdaptor as E, Field as F, ItemSelector as I, MappedItem as M, ObjectField as O, PuckComponent as P, RootDataWithProps as R, SelectField as S, TextField as T, UiState as U, DefaultRootProps as a, RootData as b, ArrayField as c, Adaptor as d, ExternalField as e, CustomField as f, DefaultComponentProps as g, Fields as h, Content as i, PuckContext as j, ComponentConfig as k, BaseData as l, ComponentData as m, RootDataWithoutProps as n, ItemWithId as o, ArrayState as p, DropZone as q };
package/dist/index.css CHANGED
@@ -920,6 +920,20 @@
920
920
  font-size: var(--puck-font-size-xs);
921
921
  }
922
922
 
923
+ /* css-module:/home/runner/work/puck/puck/packages/core/components/InputOrGroup/fields/ObjectField/styles.module.css/#css-module-data */
924
+ ._ObjectField_56z4t_5 {
925
+ display: flex;
926
+ flex-direction: column;
927
+ background-color: white;
928
+ border: 1px solid var(--puck-color-grey-8);
929
+ border-radius: 4px;
930
+ }
931
+ ._ObjectField-fieldset_56z4t_13 {
932
+ border: none;
933
+ margin: 0;
934
+ padding: 16px 15px;
935
+ }
936
+
923
937
  /* css-module:/home/runner/work/puck/puck/packages/core/components/ComponentList/styles.module.css/#css-module-data */
924
938
  ._ComponentList_1m8r5_1 {
925
939
  font-family: var(--puck-font-stack);
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { D as Data, C as Config, I as ItemSelector, U as UiState, A as AppState, M as MappedItem, R as RootDataWithProps, a as DefaultRootProps, b as RootData } from './Config-162394d8.js';
2
- export { d as Adaptor, c as ArrayField, p as ArrayState, l as BaseData, B as BaseField, k as ComponentConfig, m as ComponentData, i as Content, f as CustomField, g as DefaultComponentProps, q as DropZone, e as ExternalField, E as ExternalFieldWithAdaptor, F as Field, h as Fields, o as ItemWithId, P as PuckComponent, j as PuckContext, n as RootDataWithoutProps, S as SelectField, T as TextField } from './Config-162394d8.js';
1
+ import { D as Data, C as Config, I as ItemSelector, U as UiState, A as AppState, M as MappedItem, R as RootDataWithProps, a as DefaultRootProps, b as RootData } from './Config-b8c102e9.js';
2
+ export { d as Adaptor, c as ArrayField, p as ArrayState, l as BaseData, B as BaseField, k as ComponentConfig, m as ComponentData, i as Content, f as CustomField, g as DefaultComponentProps, q as DropZone, e as ExternalField, E as ExternalFieldWithAdaptor, F as Field, h as Fields, o as ItemWithId, O as ObjectField, P as PuckComponent, j as PuckContext, n as RootDataWithoutProps, S as SelectField, T as TextField } from './Config-b8c102e9.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import { ReactNode, CSSProperties, SyntheticEvent, ReactElement } from 'react';