@measured/puck 0.20.0-canary.def0ecb5 → 0.20.0-canary.e25949a6

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.
@@ -87,7 +87,7 @@ var init_react_import = __esm({
87
87
  // lib/data/walk-tree.ts
88
88
  init_react_import();
89
89
 
90
- // lib/data/map-slots.ts
90
+ // lib/data/map-fields.ts
91
91
  init_react_import();
92
92
 
93
93
  // lib/data/default-slots.ts
@@ -97,14 +97,14 @@ var defaultSlots = (value, fields) => Object.keys(fields).reduce(
97
97
  value
98
98
  );
99
99
 
100
- // lib/data/map-slots.ts
100
+ // lib/data/map-fields.ts
101
101
  var isPromise = (v) => !!v && typeof v.then === "function";
102
102
  var flatten = (values) => values.reduce((acc, item) => __spreadValues(__spreadValues({}, acc), item), {});
103
103
  var containsPromise = (arr) => arr.some(isPromise);
104
104
  var walkField = ({
105
105
  value,
106
106
  fields,
107
- map,
107
+ mappers,
108
108
  propKey = "",
109
109
  propPath = "",
110
110
  id = "",
@@ -112,7 +112,9 @@ var walkField = ({
112
112
  recurseSlots = false
113
113
  }) => {
114
114
  var _a, _b, _c;
115
- if (((_a = fields[propKey]) == null ? void 0 : _a.type) === "slot") {
115
+ const fieldType = (_a = fields[propKey]) == null ? void 0 : _a.type;
116
+ const map = mappers[fieldType];
117
+ if (map && fieldType === "slot") {
116
118
  const content = value || [];
117
119
  const mappedContent = recurseSlots ? content.map((el) => {
118
120
  var _a2;
@@ -124,7 +126,7 @@ var walkField = ({
124
126
  return walkField({
125
127
  value: __spreadProps(__spreadValues({}, el), { props: defaultSlots(el.props, fields2) }),
126
128
  fields: fields2,
127
- map,
129
+ mappers,
128
130
  id: el.props.id,
129
131
  config,
130
132
  recurseSlots
@@ -133,7 +135,21 @@ var walkField = ({
133
135
  if (containsPromise(mappedContent)) {
134
136
  return Promise.all(mappedContent);
135
137
  }
136
- return map(mappedContent, id, propPath, fields[propKey], propPath);
138
+ return map({
139
+ value: mappedContent,
140
+ parentId: id,
141
+ propName: propKey,
142
+ field: fields[propKey],
143
+ propPath
144
+ });
145
+ } else if (map && fields[propKey]) {
146
+ return map({
147
+ value,
148
+ parentId: id,
149
+ propName: propKey,
150
+ field: fields[propKey],
151
+ propPath
152
+ });
137
153
  }
138
154
  if (value && typeof value === "object") {
139
155
  if (Array.isArray(value)) {
@@ -143,7 +159,7 @@ var walkField = ({
143
159
  (el, idx) => walkField({
144
160
  value: el,
145
161
  fields: arrayFields,
146
- map,
162
+ mappers,
147
163
  propKey,
148
164
  propPath: `${propPath}[${idx}]`,
149
165
  id,
@@ -162,7 +178,7 @@ var walkField = ({
162
178
  return walkObject({
163
179
  value,
164
180
  fields: objectFields,
165
- map,
181
+ mappers,
166
182
  id,
167
183
  getPropPath: (k) => `${propPath}.${k}`,
168
184
  config,
@@ -175,7 +191,7 @@ var walkField = ({
175
191
  var walkObject = ({
176
192
  value,
177
193
  fields,
178
- map,
194
+ mappers,
179
195
  id,
180
196
  getPropPath,
181
197
  config,
@@ -185,7 +201,7 @@ var walkObject = ({
185
201
  const opts = {
186
202
  value: v,
187
203
  fields,
188
- map,
204
+ mappers,
189
205
  propKey: k,
190
206
  propPath: getPropPath(k),
191
207
  id,
@@ -207,14 +223,14 @@ var walkObject = ({
207
223
  }
208
224
  return flatten(newProps);
209
225
  };
210
- function mapSlots(item, map, config, recurseSlots = false) {
226
+ function mapFields(item, mappers, config, recurseSlots = false) {
211
227
  var _a, _b, _c, _d, _e;
212
228
  const itemType = "type" in item ? item.type : "root";
213
229
  const componentConfig = itemType === "root" ? config.root : (_a = config.components) == null ? void 0 : _a[itemType];
214
230
  const newProps = walkObject({
215
231
  value: defaultSlots((_b = item.props) != null ? _b : {}, (_c = componentConfig == null ? void 0 : componentConfig.fields) != null ? _c : {}),
216
232
  fields: (_d = componentConfig == null ? void 0 : componentConfig.fields) != null ? _d : {},
217
- map,
233
+ mappers,
218
234
  id: item.props ? (_e = item.props.id) != null ? _e : "root" : "root",
219
235
  getPropPath: (k) => k,
220
236
  config,
@@ -234,11 +250,14 @@ function mapSlots(item, map, config, recurseSlots = false) {
234
250
  function walkTree(data, config, callbackFn) {
235
251
  var _a, _b;
236
252
  const walkItem = (item) => {
237
- return mapSlots(
253
+ return mapFields(
238
254
  item,
239
- (content, parentId, propName) => {
240
- var _a2;
241
- return (_a2 = callbackFn(content, { parentId, propName })) != null ? _a2 : content;
255
+ {
256
+ slot: ({ value, parentId, propName }) => {
257
+ var _a2;
258
+ const content = value;
259
+ return (_a2 = callbackFn(content, { parentId, propName })) != null ? _a2 : content;
260
+ }
242
261
  },
243
262
  config,
244
263
  true
@@ -289,35 +308,70 @@ var setupZone = (data, zoneKey) => {
289
308
 
290
309
  // lib/use-slots.tsx
291
310
  init_react_import();
311
+
312
+ // lib/field-transforms/use-field-transforms.tsx
313
+ init_react_import();
292
314
  import { useMemo } from "react";
293
- function useSlots(config, item, renderSlotEdit, renderSlotRender = renderSlotEdit, readOnly, forceReadOnly) {
294
- const slotProps = useMemo(() => {
295
- const mapped = mapSlots(
296
- item,
297
- (content, _parentId, propName, field, propPath) => {
298
- const wildcardPath = propPath.replace(/\[\d+\]/g, "[*]");
299
- const isReadOnly = (readOnly == null ? void 0 : readOnly[propPath]) || (readOnly == null ? void 0 : readOnly[wildcardPath]) || forceReadOnly;
300
- const render = isReadOnly ? renderSlotRender : renderSlotEdit;
301
- const Slot = (dzProps) => render(__spreadProps(__spreadValues({
302
- allow: (field == null ? void 0 : field.type) === "slot" ? field.allow : [],
303
- disallow: (field == null ? void 0 : field.type) === "slot" ? field.disallow : []
304
- }, dzProps), {
305
- zone: propName,
306
- content
307
- }));
308
- return Slot;
309
- },
310
- config
311
- ).props;
315
+ function useFieldTransforms(config, item, transforms, readOnly, forceReadOnly) {
316
+ const mappers = useMemo(() => {
317
+ return Object.keys(transforms).reduce((acc, _fieldType) => {
318
+ const fieldType = _fieldType;
319
+ return __spreadProps(__spreadValues({}, acc), {
320
+ [fieldType]: (_a) => {
321
+ var _b = _a, {
322
+ parentId
323
+ } = _b, params = __objRest(_b, [
324
+ "parentId"
325
+ ]);
326
+ const wildcardPath = params.propPath.replace(/\[\d+\]/g, "[*]");
327
+ const isReadOnly = (readOnly == null ? void 0 : readOnly[params.propPath]) || (readOnly == null ? void 0 : readOnly[wildcardPath]) || forceReadOnly || false;
328
+ const fn = transforms[fieldType];
329
+ return fn == null ? void 0 : fn(__spreadProps(__spreadValues({}, params), {
330
+ isReadOnly,
331
+ componentId: parentId
332
+ }));
333
+ }
334
+ });
335
+ }, {});
336
+ }, [transforms, readOnly, forceReadOnly]);
337
+ const transformedProps = useMemo(() => {
338
+ const mapped = mapFields(item, mappers, config).props;
312
339
  return mapped;
313
- }, [config, item, readOnly, forceReadOnly]);
340
+ }, [config, item, mappers]);
314
341
  const mergedProps = useMemo(
315
- () => __spreadValues(__spreadValues({}, item.props), slotProps),
316
- [item.props, slotProps]
342
+ () => __spreadValues(__spreadValues({}, item.props), transformedProps),
343
+ [item.props, transformedProps]
317
344
  );
318
345
  return mergedProps;
319
346
  }
320
347
 
348
+ // lib/field-transforms/default-transforms/slot-transform.tsx
349
+ init_react_import();
350
+ var getSlotTransform = (renderSlotEdit, renderSlotRender = renderSlotEdit) => ({
351
+ slot: ({ value: content, propName, field, isReadOnly }) => {
352
+ const render = isReadOnly ? renderSlotRender : renderSlotEdit;
353
+ const Slot = (dzProps) => render(__spreadProps(__spreadValues({
354
+ allow: (field == null ? void 0 : field.type) === "slot" ? field.allow : [],
355
+ disallow: (field == null ? void 0 : field.type) === "slot" ? field.disallow : []
356
+ }, dzProps), {
357
+ zone: propName,
358
+ content
359
+ }));
360
+ return Slot;
361
+ }
362
+ });
363
+
364
+ // lib/use-slots.tsx
365
+ function useSlots(config, item, renderSlotEdit, renderSlotRender = renderSlotEdit, readOnly, forceReadOnly) {
366
+ return useFieldTransforms(
367
+ config,
368
+ item,
369
+ getSlotTransform(renderSlotEdit, renderSlotRender),
370
+ readOnly,
371
+ forceReadOnly
372
+ );
373
+ }
374
+
321
375
  // components/SlotRender/server.tsx
322
376
  init_react_import();
323
377
  import { forwardRef } from "react";
@@ -530,7 +584,7 @@ import flat from "flat";
530
584
  // lib/data/strip-slots.ts
531
585
  init_react_import();
532
586
  var stripSlots = (data, config) => {
533
- return mapSlots(data, () => null, config);
587
+ return mapFields(data, { slot: () => null }, config);
534
588
  };
535
589
 
536
590
  // lib/data/flatten-node.ts
@@ -589,18 +643,21 @@ function walkAppState(state, config, mapContent = (content) => content, mapNodeO
589
643
  const mappedItem = mapNodeOrSkip(item, path, index);
590
644
  if (!mappedItem) return item;
591
645
  const id = mappedItem.props.id;
592
- const newProps = __spreadProps(__spreadValues({}, mapSlots(
646
+ const newProps = __spreadProps(__spreadValues({}, mapFields(
593
647
  mappedItem,
594
- (content, parentId2, slotId) => {
595
- const zoneCompound = `${parentId2}:${slotId}`;
596
- const [_2, newContent2] = processContent(
597
- path,
598
- zoneCompound,
599
- content,
600
- "slot",
601
- parentId2
602
- );
603
- return newContent2;
648
+ {
649
+ slot: ({ value, parentId: parentId2, propPath }) => {
650
+ const content = value;
651
+ const zoneCompound = `${parentId2}:${propPath}`;
652
+ const [_2, newContent2] = processContent(
653
+ path,
654
+ zoneCompound,
655
+ content,
656
+ "slot",
657
+ parentId2
658
+ );
659
+ return newContent2;
660
+ }
604
661
  },
605
662
  config
606
663
  ).props), {
@@ -879,24 +936,27 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
879
936
  resolvedItem.readOnly = readOnly;
880
937
  }
881
938
  }
882
- let itemWithResolvedChildren = yield mapSlots(
939
+ let itemWithResolvedChildren = yield mapFields(
883
940
  resolvedItem,
884
- (content) => __async(void 0, null, function* () {
885
- return yield Promise.all(
886
- content.map(
887
- (childItem) => __async(void 0, null, function* () {
888
- return (yield resolveComponentData(
889
- childItem,
890
- config,
891
- metadata,
892
- onResolveStart,
893
- onResolveEnd,
894
- trigger
895
- )).node;
896
- })
897
- )
898
- );
899
- }),
941
+ {
942
+ slot: (_02) => __async(void 0, [_02], function* ({ value }) {
943
+ const content = value;
944
+ return yield Promise.all(
945
+ content.map(
946
+ (childItem) => __async(void 0, null, function* () {
947
+ return (yield resolveComponentData(
948
+ childItem,
949
+ config,
950
+ metadata,
951
+ onResolveStart,
952
+ onResolveEnd,
953
+ trigger
954
+ )).node;
955
+ })
956
+ )
957
+ );
958
+ })
959
+ },
900
960
  config
901
961
  );
902
962
  if (shouldRunResolver && onResolveEnd) {
@@ -939,9 +999,9 @@ function resolveAllData(_0, _1) {
939
999
  },
940
1000
  "force"
941
1001
  )).node;
942
- const resolvedDeep = yield mapSlots(
1002
+ const resolvedDeep = yield mapFields(
943
1003
  resolved,
944
- processContent,
1004
+ { slot: ({ value }) => processContent(value) },
945
1005
  config
946
1006
  );
947
1007
  onResolveEnd == null ? void 0 : onResolveEnd(toComponent(resolvedDeep));
@@ -992,6 +1052,8 @@ export {
992
1052
  getChanged,
993
1053
  resolveComponentData,
994
1054
  defaultAppState,
1055
+ useFieldTransforms,
1056
+ getSlotTransform,
995
1057
  useSlots,
996
1058
  Render,
997
1059
  SlotRenderPure,
package/dist/index.css CHANGED
@@ -231,10 +231,10 @@
231
231
  }
232
232
 
233
233
  /* css-module:/home/runner/work/puck/puck/packages/core/components/AutoField/styles.module.css/#css-module-data */
234
- ._InputWrapper_py9hf_1 + ._InputWrapper_py9hf_1 {
234
+ ._InputWrapper_bsxfo_1 + ._InputWrapper_bsxfo_1 {
235
235
  margin-top: 12px;
236
236
  }
237
- ._Input-label_py9hf_5 {
237
+ ._Input-label_bsxfo_5 {
238
238
  align-items: center;
239
239
  color: var(--puck-color-grey-04);
240
240
  display: flex;
@@ -242,17 +242,17 @@
242
242
  font-size: var(--puck-font-size-xxs);
243
243
  font-weight: 600;
244
244
  }
245
- ._Input-labelIcon_py9hf_14 {
245
+ ._Input-labelIcon_bsxfo_14 {
246
246
  color: var(--puck-color-grey-07);
247
247
  display: flex;
248
248
  margin-inline-end: 4px;
249
249
  padding-inline-start: 4px;
250
250
  }
251
- ._Input-disabledIcon_py9hf_21 {
251
+ ._Input-disabledIcon_bsxfo_21 {
252
252
  color: var(--puck-color-grey-05);
253
253
  margin-inline-start: auto;
254
254
  }
255
- ._Input-input_py9hf_26 {
255
+ ._Input-input_bsxfo_26 {
256
256
  background: var(--puck-color-white);
257
257
  border-width: 1px;
258
258
  border-style: solid;
@@ -260,13 +260,18 @@
260
260
  border-radius: 4px;
261
261
  box-sizing: border-box;
262
262
  font-family: inherit;
263
- font-size: 14px;
263
+ font-size: 16px;
264
264
  padding: 12px 15px;
265
265
  transition: border-color 50ms ease-in;
266
266
  width: 100%;
267
267
  max-width: 100%;
268
268
  }
269
- select._Input-input_py9hf_26 {
269
+ @media (min-width: 458px) {
270
+ ._Input-input_bsxfo_26 {
271
+ font-size: 14px;
272
+ }
273
+ }
274
+ select._Input-input_bsxfo_26 {
270
275
  appearance: none;
271
276
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23c3c3c3'><polygon points='0,0 100,0 50,50'/></svg>") no-repeat;
272
277
  background-size: 12px;
@@ -275,29 +280,29 @@ select._Input-input_py9hf_26 {
275
280
  background-color: var(--puck-color-white);
276
281
  cursor: pointer;
277
282
  }
278
- select._Input-input_py9hf_26:dir(rtl) {
283
+ select._Input-input_bsxfo_26:dir(rtl) {
279
284
  background-position: 12px calc(50% + 3px);
280
285
  }
281
286
  @media (hover: hover) and (pointer: fine) {
282
- ._Input_py9hf_1:has(> input):hover ._Input-input_py9hf_26:not([readonly]),
283
- ._Input_py9hf_1:has(> textarea):hover ._Input-input_py9hf_26:not([readonly]) {
287
+ ._Input_bsxfo_1:has(> input):hover ._Input-input_bsxfo_26:not([readonly]),
288
+ ._Input_bsxfo_1:has(> textarea):hover ._Input-input_bsxfo_26:not([readonly]) {
284
289
  border-color: var(--puck-color-grey-05);
285
290
  transition: none;
286
291
  }
287
- ._Input_py9hf_1:has(> select):hover ._Input-input_py9hf_26:not([disabled]) {
292
+ ._Input_bsxfo_1:has(> select):hover ._Input-input_bsxfo_26:not([disabled]) {
288
293
  background-color: var(--puck-color-azure-12);
289
294
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%235a5a5a'><polygon points='0,0 100,0 50,50'/></svg>");
290
295
  border-color: var(--puck-color-grey-05);
291
296
  transition: none;
292
297
  }
293
298
  }
294
- ._Input-input_py9hf_26:focus {
299
+ ._Input-input_bsxfo_26:focus {
295
300
  border-color: var(--puck-color-grey-05);
296
301
  outline: 2px solid var(--puck-color-azure-05);
297
302
  transition: none;
298
303
  }
299
- ._Input--readOnly_py9hf_76 > ._Input-input_py9hf_26,
300
- ._Input--readOnly_py9hf_76 > select._Input-input_py9hf_26 {
304
+ ._Input--readOnly_bsxfo_82 > ._Input-input_bsxfo_26,
305
+ ._Input--readOnly_bsxfo_82 > select._Input-input_bsxfo_26 {
301
306
  background-color: var(--puck-color-grey-11);
302
307
  border-color: var(--puck-color-grey-09);
303
308
  color: var(--puck-color-grey-04);
@@ -306,34 +311,34 @@ select._Input-input_py9hf_26:dir(rtl) {
306
311
  outline: 0;
307
312
  transition: none;
308
313
  }
309
- ._Input-radioGroupItems_py9hf_87 {
314
+ ._Input-radioGroupItems_bsxfo_93 {
310
315
  display: flex;
311
316
  border: 1px solid var(--puck-color-grey-09);
312
317
  border-radius: 4px;
313
318
  flex-wrap: wrap;
314
319
  }
315
- ._Input-radio_py9hf_87 {
320
+ ._Input-radio_bsxfo_93 {
316
321
  border-inline-end: 1px solid var(--puck-color-grey-09);
317
322
  flex-grow: 1;
318
323
  }
319
- ._Input-radio_py9hf_87:first-of-type {
324
+ ._Input-radio_bsxfo_93:first-of-type {
320
325
  border-bottom-left-radius: 4px;
321
326
  border-top-left-radius: 4px;
322
327
  }
323
- ._Input-radio_py9hf_87:first-of-type ._Input-radioInner_py9hf_104 {
328
+ ._Input-radio_bsxfo_93:first-of-type ._Input-radioInner_bsxfo_110 {
324
329
  border-bottom-left-radius: 3px;
325
330
  border-top-left-radius: 3px;
326
331
  }
327
- ._Input-radio_py9hf_87:last-of-type {
332
+ ._Input-radio_bsxfo_93:last-of-type {
328
333
  border-bottom-right-radius: 4px;
329
334
  border-inline-end: 0;
330
335
  border-top-right-radius: 4px;
331
336
  }
332
- ._Input-radio_py9hf_87:last-of-type ._Input-radioInner_py9hf_104 {
337
+ ._Input-radio_bsxfo_93:last-of-type ._Input-radioInner_bsxfo_110 {
333
338
  border-bottom-right-radius: 3px;
334
339
  border-top-right-radius: 3px;
335
340
  }
336
- ._Input-radioInner_py9hf_104 {
341
+ ._Input-radioInner_bsxfo_110 {
337
342
  background-color: var(--puck-color-white);
338
343
  color: var(--puck-color-grey-04);
339
344
  cursor: pointer;
@@ -342,32 +347,32 @@ select._Input-input_py9hf_26:dir(rtl) {
342
347
  text-align: center;
343
348
  transition: background-color 50ms ease-in;
344
349
  }
345
- ._Input-radio_py9hf_87:has(:focus-visible) {
350
+ ._Input-radio_bsxfo_93:has(:focus-visible) {
346
351
  outline: 2px solid var(--puck-color-azure-05);
347
352
  outline-offset: 2px;
348
353
  position: relative;
349
354
  }
350
355
  @media (hover: hover) and (pointer: fine) {
351
- ._Input-radioInner_py9hf_104:hover {
356
+ ._Input-radioInner_bsxfo_110:hover {
352
357
  background-color: var(--puck-color-azure-12);
353
358
  transition: none;
354
359
  }
355
360
  }
356
- ._Input--readOnly_py9hf_76 ._Input-radioInner_py9hf_104 {
361
+ ._Input--readOnly_bsxfo_82 ._Input-radioInner_bsxfo_110 {
357
362
  background-color: var(--puck-color-white);
358
363
  color: var(--puck-color-grey-04);
359
364
  cursor: default;
360
365
  }
361
- ._Input-radio_py9hf_87 ._Input-radioInput_py9hf_149:checked ~ ._Input-radioInner_py9hf_104 {
366
+ ._Input-radio_bsxfo_93 ._Input-radioInput_bsxfo_155:checked ~ ._Input-radioInner_bsxfo_110 {
362
367
  background-color: var(--puck-color-azure-11);
363
368
  color: var(--puck-color-azure-04);
364
369
  font-weight: 500;
365
370
  }
366
- ._Input--readOnly_py9hf_76 ._Input-radioInput_py9hf_149:checked ~ ._Input-radioInner_py9hf_104 {
371
+ ._Input--readOnly_bsxfo_82 ._Input-radioInput_bsxfo_155:checked ~ ._Input-radioInner_bsxfo_110 {
367
372
  background-color: var(--puck-color-grey-11);
368
373
  color: var(--puck-color-grey-04);
369
374
  }
370
- ._Input-radio_py9hf_87 ._Input-radioInput_py9hf_149 {
375
+ ._Input-radio_bsxfo_93 ._Input-radioInput_bsxfo_155 {
371
376
  clip: rect(0 0 0 0);
372
377
  clip-path: inset(100%);
373
378
  height: 1px;
@@ -376,7 +381,7 @@ select._Input-input_py9hf_26:dir(rtl) {
376
381
  white-space: nowrap;
377
382
  width: 1px;
378
383
  }
379
- textarea._Input-input_py9hf_26 {
384
+ textarea._Input-input_bsxfo_26 {
380
385
  margin-bottom: -4px;
381
386
  }
382
387
 
@@ -1311,6 +1316,33 @@ body:has(._DropZone--isAnimating_1i2sv_68:empty) [data-puck-overlay] {
1311
1316
  opacity: 0 !important;
1312
1317
  }
1313
1318
 
1319
+ /* lib/overlay-portal/styles.css */
1320
+ [data-puck-overlay-portal],
1321
+ [data-puck-overlay-portal] * {
1322
+ pointer-events: auto !important;
1323
+ }
1324
+ [data-puck-overlay-portal]:hover {
1325
+ outline: 2px var(--puck-color-azure-09) dashed;
1326
+ outline-offset: 2px;
1327
+ }
1328
+ [data-puck-overlay-portal]:focus-within {
1329
+ outline: 2px var(--puck-color-azure-07) solid;
1330
+ outline-offset: 2px;
1331
+ }
1332
+
1333
+ /* css-module:/home/runner/work/puck/puck/packages/core/components/InlineTextField/styles.module.css/#css-module-data */
1334
+ ._InlineTextField_ilw2a_1 {
1335
+ cursor: text;
1336
+ display: inline-block;
1337
+ }
1338
+ [data-dnd-dragging] ._InlineTextField_ilw2a_1 {
1339
+ cursor: none;
1340
+ caret-color: transparent;
1341
+ }
1342
+ [data-dnd-dragging] ._InlineTextField_ilw2a_1::selection {
1343
+ display: none;
1344
+ }
1345
+
1314
1346
  /* css-module:/home/runner/work/puck/puck/packages/core/components/SidebarSection/styles.module.css/#css-module-data */
1315
1347
  ._SidebarSection_8boj8_1 {
1316
1348
  display: flex;
@@ -1883,23 +1915,25 @@ body:has(._DropZone--isAnimating_1i2sv_68:empty) [data-puck-overlay] {
1883
1915
  }
1884
1916
 
1885
1917
  /* css-module:/home/runner/work/puck/puck/packages/core/components/Puck/components/ResizeHandle/styles.module.css/#css-module-data */
1886
- ._ResizeHandle_v7w0r_1 {
1887
- position: absolute;
1888
- width: 5px;
1889
- height: 100%;
1890
- cursor: col-resize;
1891
- z-index: 10;
1892
- background: transparent;
1893
- top: 0;
1894
- }
1895
- ._ResizeHandle_v7w0r_1:hover {
1896
- background: rgba(0, 0, 0, 0.1);
1897
- }
1898
- ._ResizeHandle--left_v7w0r_15 {
1899
- right: -3px;
1900
- }
1901
- ._ResizeHandle--right_v7w0r_19 {
1902
- left: -3px;
1918
+ @media (min-width: 766px) {
1919
+ ._ResizeHandle_144bf_2 {
1920
+ position: absolute;
1921
+ width: 5px;
1922
+ height: 100%;
1923
+ cursor: col-resize;
1924
+ z-index: 10;
1925
+ background: transparent;
1926
+ top: 0;
1927
+ }
1928
+ ._ResizeHandle_144bf_2:hover {
1929
+ background: rgba(0, 0, 0, 0.1);
1930
+ }
1931
+ ._ResizeHandle--left_144bf_16 {
1932
+ right: -3px;
1933
+ }
1934
+ ._ResizeHandle--right_144bf_20 {
1935
+ left: -3px;
1936
+ }
1903
1937
  }
1904
1938
 
1905
1939
  /* components/Puck/components/ResizeHandle/styles.css */
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { H as History, P as Permissions, a as ComponentData, C as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as Field, h as FieldProps, D as DropZoneProps, i as Data, j as OnAction, k as InitialHistory, l as ItemSelector } from './walk-tree-mCPqBAls.mjs';
2
- export { a2 as Adaptor, a0 as ArrayField, x as ArrayState, af as AsFieldProps, E as BaseData, T as BaseField, N as ComponentDataMap, K as ComponentDataOptionalId, Q as Content, a6 as CustomField, a5 as CustomFieldRender, ac as DefaultComponentProps, a9 as DefaultRootFieldProps, ab as DefaultRootProps, aa as DefaultRootRenderProps, n as Direction, o as DragAxis, a4 as ExternalField, a3 as ExternalFieldWithAdaptor, ah as ExtractPropsFromConfig, ai as ExtractRootPropsFromConfig, u as FieldRenderFunctions, v as ItemWithId, L as MappedItem, Y as NumberField, a1 as ObjectField, s as OverrideKey, z as PuckComponent, a8 as PuckContext, $ as RadioField, B as RootConfig, J as RootData, G as RootDataWithoutProps, _ as SelectField, S as Slot, y as SlotComponent, a7 as SlotField, X as TextField, Z as TextareaField, p as Viewport, ag as WithChildren, ad as WithId, ae as WithPuckProps, W as WithSlotProps, m as migrate, q as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-mCPqBAls.mjs';
1
+ import { H as History, P as Permissions, a as ComponentData, C as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as FieldTransforms, h as Field, i as FieldProps, D as DropZoneProps, j as Data, k as OnAction, l as InitialHistory, n as ItemSelector } from './walk-tree-B57SgEEc.mjs';
2
+ export { a5 as Adaptor, a3 as ArrayField, B as ArrayState, ai as AsFieldProps, K as BaseData, Z as BaseField, X as ComponentDataMap, Q as ComponentDataOptionalId, Y as Content, a9 as CustomField, a8 as CustomFieldRender, af as DefaultComponentProps, ac as DefaultRootFieldProps, ae as DefaultRootProps, ad as DefaultRootRenderProps, o as Direction, p as DragAxis, a7 as ExternalField, a6 as ExternalFieldWithAdaptor, am as ExtractField, ak as ExtractPropsFromConfig, al as ExtractRootPropsFromConfig, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, z as ItemWithId, T as MappedItem, $ as NumberField, a4 as ObjectField, x as OverrideKey, G as PuckComponent, ab as PuckContext, a2 as RadioField, J as RootConfig, N as RootData, L as RootDataWithoutProps, a1 as SelectField, S as Slot, E as SlotComponent, aa as SlotField, _ as TextField, a0 as TextareaField, q as Viewport, aj as WithChildren, ag as WithId, ah as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-B57SgEEc.mjs';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
@@ -105,6 +105,7 @@ type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserCon
105
105
  history: HistorySlice;
106
106
  nodes: NodesSlice;
107
107
  permissions: PermissionsSlice;
108
+ fieldTransforms: FieldTransforms;
108
109
  };
109
110
 
110
111
  declare const ActionBar: {
@@ -207,6 +208,7 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
207
208
  permissions?: Partial<Permissions>;
208
209
  plugins?: Plugin[];
209
210
  overrides?: Partial<Overrides>;
211
+ fieldTransforms?: FieldTransforms;
210
212
  renderHeader?: (props: {
211
213
  children: ReactNode;
212
214
  dispatch: (action: PuckAction) => void;
@@ -249,6 +251,16 @@ declare function Render<UserConfig extends Config = Config, G extends UserGeneri
249
251
  metadata?: Metadata;
250
252
  }): react_jsx_runtime.JSX.Element;
251
253
 
254
+ declare const registerOverlayPortal: (el: HTMLElement | null | undefined, opts?: {
255
+ disableDrag?: boolean;
256
+ disableDragOnFocus?: boolean;
257
+ }) => (() => void) | undefined;
258
+
259
+ /**
260
+ * Helper function to set a value based on a dot-notated path
261
+ */
262
+ declare function setDeep<T extends Record<string, any>>(node: T, path: string, newVal: any): T;
263
+
252
264
  type UsePuckData<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
253
265
  appState: G["UserPublicAppState"];
254
266
  config: UserConfig;
@@ -290,4 +302,4 @@ declare function usePuck<UserConfig extends Config = Config>(): UsePuckStore<Use
290
302
  */
291
303
  declare function useGetPuck(): () => UsePuckStore<Config>;
292
304
 
293
- export { Action, ActionBar, AppState, AutoField, Button, ComponentConfig, ComponentData, Config, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, Fields, Group, History, IconButton, IframeConfig, InitialHistory, Label, Metadata, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, type PuckApi, Render, ResolveDataTrigger, RootDataWithProps, UiState, type UsePuckData, UserGenerics, Viewports, createUsePuck, renderContext, useGetPuck, usePuck };
305
+ export { Action, ActionBar, AppState, AutoField, Button, ComponentConfig, ComponentData, Config, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, FieldTransforms, Fields, Group, History, IconButton, IframeConfig, InitialHistory, Label, Metadata, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, type PuckApi, Render, ResolveDataTrigger, RootDataWithProps, UiState, type UsePuckData, UserGenerics, Viewports, createUsePuck, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck };