@measured/puck 0.14.0-canary.5bb1708 → 0.14.0-canary.674ac43

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.js CHANGED
@@ -93,7 +93,8 @@ var init_react_import = __esm({
93
93
 
94
94
  // ../../node_modules/classnames/index.js
95
95
  var require_classnames = __commonJS({
96
- "../../node_modules/classnames/index.js"(exports, module2) {
96
+ "../../node_modules/classnames/index.js"(exports2, module2) {
97
+ "use strict";
97
98
  init_react_import();
98
99
  (function() {
99
100
  "use strict";
@@ -145,7 +146,7 @@ var require_classnames = __commonJS({
145
146
 
146
147
  // ../../node_modules/scheduler/cjs/scheduler.production.min.js
147
148
  var require_scheduler_production_min = __commonJS({
148
- "../../node_modules/scheduler/cjs/scheduler.production.min.js"(exports) {
149
+ "../../node_modules/scheduler/cjs/scheduler.production.min.js"(exports2) {
149
150
  "use strict";
150
151
  init_react_import();
151
152
  function f(a, b) {
@@ -188,12 +189,12 @@ var require_scheduler_production_min = __commonJS({
188
189
  }
189
190
  if ("object" === typeof performance && "function" === typeof performance.now) {
190
191
  l = performance;
191
- exports.unstable_now = function() {
192
+ exports2.unstable_now = function() {
192
193
  return l.now();
193
194
  };
194
195
  } else {
195
196
  p = Date, q = p.now();
196
- exports.unstable_now = function() {
197
+ exports2.unstable_now = function() {
197
198
  return p.now() - q;
198
199
  };
199
200
  }
@@ -247,7 +248,7 @@ var require_scheduler_production_min = __commonJS({
247
248
  v.callback = null;
248
249
  y = v.priorityLevel;
249
250
  var e = d(v.expirationTime <= b);
250
- b = exports.unstable_now();
251
+ b = exports2.unstable_now();
251
252
  "function" === typeof e ? v.callback = e : v === h(r) && k(r);
252
253
  G(b);
253
254
  } else
@@ -272,11 +273,11 @@ var require_scheduler_production_min = __commonJS({
272
273
  var P = 5;
273
274
  var Q = -1;
274
275
  function M() {
275
- return exports.unstable_now() - Q < P ? false : true;
276
+ return exports2.unstable_now() - Q < P ? false : true;
276
277
  }
277
278
  function R() {
278
279
  if (null !== O) {
279
- var a = exports.unstable_now();
280
+ var a = exports2.unstable_now();
280
281
  Q = a;
281
282
  var b = true;
282
283
  try {
@@ -310,31 +311,31 @@ var require_scheduler_production_min = __commonJS({
310
311
  }
311
312
  function K(a, b) {
312
313
  L = D(function() {
313
- a(exports.unstable_now());
314
+ a(exports2.unstable_now());
314
315
  }, b);
315
316
  }
316
- exports.unstable_IdlePriority = 5;
317
- exports.unstable_ImmediatePriority = 1;
318
- exports.unstable_LowPriority = 4;
319
- exports.unstable_NormalPriority = 3;
320
- exports.unstable_Profiling = null;
321
- exports.unstable_UserBlockingPriority = 2;
322
- exports.unstable_cancelCallback = function(a) {
317
+ exports2.unstable_IdlePriority = 5;
318
+ exports2.unstable_ImmediatePriority = 1;
319
+ exports2.unstable_LowPriority = 4;
320
+ exports2.unstable_NormalPriority = 3;
321
+ exports2.unstable_Profiling = null;
322
+ exports2.unstable_UserBlockingPriority = 2;
323
+ exports2.unstable_cancelCallback = function(a) {
323
324
  a.callback = null;
324
325
  };
325
- exports.unstable_continueExecution = function() {
326
+ exports2.unstable_continueExecution = function() {
326
327
  A || z || (A = true, I(J));
327
328
  };
328
- exports.unstable_forceFrameRate = function(a) {
329
+ exports2.unstable_forceFrameRate = function(a) {
329
330
  0 > a || 125 < a ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : P = 0 < a ? Math.floor(1e3 / a) : 5;
330
331
  };
331
- exports.unstable_getCurrentPriorityLevel = function() {
332
+ exports2.unstable_getCurrentPriorityLevel = function() {
332
333
  return y;
333
334
  };
334
- exports.unstable_getFirstCallbackNode = function() {
335
+ exports2.unstable_getFirstCallbackNode = function() {
335
336
  return h(r);
336
337
  };
337
- exports.unstable_next = function(a) {
338
+ exports2.unstable_next = function(a) {
338
339
  switch (y) {
339
340
  case 1:
340
341
  case 2:
@@ -352,11 +353,11 @@ var require_scheduler_production_min = __commonJS({
352
353
  y = c;
353
354
  }
354
355
  };
355
- exports.unstable_pauseExecution = function() {
356
+ exports2.unstable_pauseExecution = function() {
356
357
  };
357
- exports.unstable_requestPaint = function() {
358
+ exports2.unstable_requestPaint = function() {
358
359
  };
359
- exports.unstable_runWithPriority = function(a, b) {
360
+ exports2.unstable_runWithPriority = function(a, b) {
360
361
  switch (a) {
361
362
  case 1:
362
363
  case 2:
@@ -375,8 +376,8 @@ var require_scheduler_production_min = __commonJS({
375
376
  y = c;
376
377
  }
377
378
  };
378
- exports.unstable_scheduleCallback = function(a, b, c) {
379
- var d = exports.unstable_now();
379
+ exports2.unstable_scheduleCallback = function(a, b, c) {
380
+ var d = exports2.unstable_now();
380
381
  "object" === typeof c && null !== c ? (c = c.delay, c = "number" === typeof c && 0 < c ? d + c : d) : c = d;
381
382
  switch (a) {
382
383
  case 1:
@@ -399,8 +400,8 @@ var require_scheduler_production_min = __commonJS({
399
400
  c > d ? (a.sortIndex = c, f(t, a), null === h(r) && a === h(t) && (B ? (E(L), L = -1) : B = true, K(H, c - d))) : (a.sortIndex = e, f(r, a), A || z || (A = true, I(J)));
400
401
  return a;
401
402
  };
402
- exports.unstable_shouldYield = M;
403
- exports.unstable_wrapCallback = function(a) {
403
+ exports2.unstable_shouldYield = M;
404
+ exports2.unstable_wrapCallback = function(a) {
404
405
  var b = y;
405
406
  return function() {
406
407
  var c = y;
@@ -417,7 +418,7 @@ var require_scheduler_production_min = __commonJS({
417
418
 
418
419
  // ../../node_modules/scheduler/cjs/scheduler.development.js
419
420
  var require_scheduler_development = __commonJS({
420
- "../../node_modules/scheduler/cjs/scheduler.development.js"(exports) {
421
+ "../../node_modules/scheduler/cjs/scheduler.development.js"(exports2) {
421
422
  "use strict";
422
423
  init_react_import();
423
424
  if (process.env.NODE_ENV !== "production") {
@@ -505,13 +506,13 @@ var require_scheduler_development = __commonJS({
505
506
  var hasPerformanceNow = typeof performance === "object" && typeof performance.now === "function";
506
507
  if (hasPerformanceNow) {
507
508
  var localPerformance = performance;
508
- exports.unstable_now = function() {
509
+ exports2.unstable_now = function() {
509
510
  return localPerformance.now();
510
511
  };
511
512
  } else {
512
513
  var localDate = Date;
513
514
  var initialTime = localDate.now();
514
- exports.unstable_now = function() {
515
+ exports2.unstable_now = function() {
515
516
  return localDate.now() - initialTime;
516
517
  };
517
518
  }
@@ -577,7 +578,7 @@ var require_scheduler_development = __commonJS({
577
578
  return workLoop(hasTimeRemaining, initialTime2);
578
579
  } catch (error) {
579
580
  if (currentTask !== null) {
580
- var currentTime = exports.unstable_now();
581
+ var currentTime = exports2.unstable_now();
581
582
  markTaskErrored(currentTask, currentTime);
582
583
  currentTask.isQueued = false;
583
584
  }
@@ -606,7 +607,7 @@ var require_scheduler_development = __commonJS({
606
607
  currentPriorityLevel = currentTask.priorityLevel;
607
608
  var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;
608
609
  var continuationCallback = callback(didUserCallbackTimeout);
609
- currentTime = exports.unstable_now();
610
+ currentTime = exports2.unstable_now();
610
611
  if (typeof continuationCallback === "function") {
611
612
  currentTask.callback = continuationCallback;
612
613
  } else {
@@ -682,7 +683,7 @@ var require_scheduler_development = __commonJS({
682
683
  };
683
684
  }
684
685
  function unstable_scheduleCallback(priorityLevel, callback, options) {
685
- var currentTime = exports.unstable_now();
686
+ var currentTime = exports2.unstable_now();
686
687
  var startTime2;
687
688
  if (typeof options === "object" && options !== null) {
688
689
  var delay = options.delay;
@@ -766,7 +767,7 @@ var require_scheduler_development = __commonJS({
766
767
  var frameInterval = frameYieldMs;
767
768
  var startTime = -1;
768
769
  function shouldYieldToHost() {
769
- var timeElapsed = exports.unstable_now() - startTime;
770
+ var timeElapsed = exports2.unstable_now() - startTime;
770
771
  if (timeElapsed < frameInterval) {
771
772
  return false;
772
773
  }
@@ -787,7 +788,7 @@ var require_scheduler_development = __commonJS({
787
788
  }
788
789
  var performWorkUntilDeadline = function() {
789
790
  if (scheduledHostCallback !== null) {
790
- var currentTime = exports.unstable_now();
791
+ var currentTime = exports2.unstable_now();
791
792
  startTime = currentTime;
792
793
  var hasTimeRemaining = true;
793
794
  var hasMoreWork = true;
@@ -831,7 +832,7 @@ var require_scheduler_development = __commonJS({
831
832
  }
832
833
  function requestHostTimeout(callback, ms) {
833
834
  taskTimeoutID = localSetTimeout(function() {
834
- callback(exports.unstable_now());
835
+ callback(exports2.unstable_now());
835
836
  }, ms);
836
837
  }
837
838
  function cancelHostTimeout() {
@@ -840,24 +841,24 @@ var require_scheduler_development = __commonJS({
840
841
  }
841
842
  var unstable_requestPaint = requestPaint;
842
843
  var unstable_Profiling = null;
843
- exports.unstable_IdlePriority = IdlePriority;
844
- exports.unstable_ImmediatePriority = ImmediatePriority;
845
- exports.unstable_LowPriority = LowPriority;
846
- exports.unstable_NormalPriority = NormalPriority;
847
- exports.unstable_Profiling = unstable_Profiling;
848
- exports.unstable_UserBlockingPriority = UserBlockingPriority;
849
- exports.unstable_cancelCallback = unstable_cancelCallback;
850
- exports.unstable_continueExecution = unstable_continueExecution;
851
- exports.unstable_forceFrameRate = forceFrameRate;
852
- exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
853
- exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;
854
- exports.unstable_next = unstable_next;
855
- exports.unstable_pauseExecution = unstable_pauseExecution;
856
- exports.unstable_requestPaint = unstable_requestPaint;
857
- exports.unstable_runWithPriority = unstable_runWithPriority;
858
- exports.unstable_scheduleCallback = unstable_scheduleCallback;
859
- exports.unstable_shouldYield = shouldYieldToHost;
860
- exports.unstable_wrapCallback = unstable_wrapCallback;
844
+ exports2.unstable_IdlePriority = IdlePriority;
845
+ exports2.unstable_ImmediatePriority = ImmediatePriority;
846
+ exports2.unstable_LowPriority = LowPriority;
847
+ exports2.unstable_NormalPriority = NormalPriority;
848
+ exports2.unstable_Profiling = unstable_Profiling;
849
+ exports2.unstable_UserBlockingPriority = UserBlockingPriority;
850
+ exports2.unstable_cancelCallback = unstable_cancelCallback;
851
+ exports2.unstable_continueExecution = unstable_continueExecution;
852
+ exports2.unstable_forceFrameRate = forceFrameRate;
853
+ exports2.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
854
+ exports2.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;
855
+ exports2.unstable_next = unstable_next;
856
+ exports2.unstable_pauseExecution = unstable_pauseExecution;
857
+ exports2.unstable_requestPaint = unstable_requestPaint;
858
+ exports2.unstable_runWithPriority = unstable_runWithPriority;
859
+ exports2.unstable_scheduleCallback = unstable_scheduleCallback;
860
+ exports2.unstable_shouldYield = shouldYieldToHost;
861
+ exports2.unstable_wrapCallback = unstable_wrapCallback;
861
862
  if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
862
863
  __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
863
864
  }
@@ -868,7 +869,7 @@ var require_scheduler_development = __commonJS({
868
869
 
869
870
  // ../../node_modules/scheduler/index.js
870
871
  var require_scheduler = __commonJS({
871
- "../../node_modules/scheduler/index.js"(exports, module2) {
872
+ "../../node_modules/scheduler/index.js"(exports2, module2) {
872
873
  "use strict";
873
874
  init_react_import();
874
875
  if (process.env.NODE_ENV === "production") {
@@ -881,7 +882,7 @@ var require_scheduler = __commonJS({
881
882
 
882
883
  // ../../node_modules/react-dom/cjs/react-dom.production.min.js
883
884
  var require_react_dom_production_min = __commonJS({
884
- "../../node_modules/react-dom/cjs/react-dom.production.min.js"(exports) {
885
+ "../../node_modules/react-dom/cjs/react-dom.production.min.js"(exports2) {
885
886
  "use strict";
886
887
  init_react_import();
887
888
  var aa = require("react");
@@ -7938,14 +7939,14 @@ var require_react_dom_production_min = __commonJS({
7938
7939
  }
7939
7940
  }
7940
7941
  var wl;
7941
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = tl;
7942
- exports.createPortal = function(a, b) {
7942
+ exports2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = tl;
7943
+ exports2.createPortal = function(a, b) {
7943
7944
  var c = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
7944
7945
  if (!ol(b))
7945
7946
  throw Error(p(200));
7946
7947
  return dl(a, b, null, c);
7947
7948
  };
7948
- exports.createRoot = function(a, b) {
7949
+ exports2.createRoot = function(a, b) {
7949
7950
  if (!ol(a))
7950
7951
  throw Error(p(299));
7951
7952
  var c = false, d = "", e = ll;
@@ -7955,7 +7956,7 @@ var require_react_dom_production_min = __commonJS({
7955
7956
  sf(8 === a.nodeType ? a.parentNode : a);
7956
7957
  return new ml(b);
7957
7958
  };
7958
- exports.findDOMNode = function(a) {
7959
+ exports2.findDOMNode = function(a) {
7959
7960
  if (null == a)
7960
7961
  return null;
7961
7962
  if (1 === a.nodeType)
@@ -7971,15 +7972,15 @@ var require_react_dom_production_min = __commonJS({
7971
7972
  a = null === a ? null : a.stateNode;
7972
7973
  return a;
7973
7974
  };
7974
- exports.flushSync = function(a) {
7975
+ exports2.flushSync = function(a) {
7975
7976
  return Sk(a);
7976
7977
  };
7977
- exports.hydrate = function(a, b, c) {
7978
+ exports2.hydrate = function(a, b, c) {
7978
7979
  if (!pl(b))
7979
7980
  throw Error(p(200));
7980
7981
  return sl(null, a, b, true, c);
7981
7982
  };
7982
- exports.hydrateRoot = function(a, b, c) {
7983
+ exports2.hydrateRoot = function(a, b, c) {
7983
7984
  if (!ol(a))
7984
7985
  throw Error(p(405));
7985
7986
  var d = null != c && c.hydratedSources || null, e = false, f = "", g = ll;
@@ -7995,12 +7996,12 @@ var require_react_dom_production_min = __commonJS({
7995
7996
  );
7996
7997
  return new nl(b);
7997
7998
  };
7998
- exports.render = function(a, b, c) {
7999
+ exports2.render = function(a, b, c) {
7999
8000
  if (!pl(b))
8000
8001
  throw Error(p(200));
8001
8002
  return sl(null, a, b, false, c);
8002
8003
  };
8003
- exports.unmountComponentAtNode = function(a) {
8004
+ exports2.unmountComponentAtNode = function(a) {
8004
8005
  if (!pl(a))
8005
8006
  throw Error(p(40));
8006
8007
  return a._reactRootContainer ? (Sk(function() {
@@ -8010,21 +8011,21 @@ var require_react_dom_production_min = __commonJS({
8010
8011
  });
8011
8012
  }), true) : false;
8012
8013
  };
8013
- exports.unstable_batchedUpdates = Rk;
8014
- exports.unstable_renderSubtreeIntoContainer = function(a, b, c, d) {
8014
+ exports2.unstable_batchedUpdates = Rk;
8015
+ exports2.unstable_renderSubtreeIntoContainer = function(a, b, c, d) {
8015
8016
  if (!pl(c))
8016
8017
  throw Error(p(200));
8017
8018
  if (null == a || void 0 === a._reactInternals)
8018
8019
  throw Error(p(38));
8019
8020
  return sl(a, b, c, false, d);
8020
8021
  };
8021
- exports.version = "18.2.0-next-9e3b772b8-20220608";
8022
+ exports2.version = "18.2.0-next-9e3b772b8-20220608";
8022
8023
  }
8023
8024
  });
8024
8025
 
8025
8026
  // ../../node_modules/react-dom/cjs/react-dom.development.js
8026
8027
  var require_react_dom_development = __commonJS({
8027
- "../../node_modules/react-dom/cjs/react-dom.development.js"(exports) {
8028
+ "../../node_modules/react-dom/cjs/react-dom.development.js"(exports2) {
8028
8029
  "use strict";
8029
8030
  init_react_import();
8030
8031
  if (process.env.NODE_ENV !== "production") {
@@ -8084,7 +8085,7 @@ var require_react_dom_development = __commonJS({
8084
8085
  var HostPortal = 4;
8085
8086
  var HostComponent = 5;
8086
8087
  var HostText = 6;
8087
- var Fragment13 = 7;
8088
+ var Fragment17 = 7;
8088
8089
  var Mode = 8;
8089
8090
  var ContextConsumer = 9;
8090
8091
  var ContextProvider = 10;
@@ -8264,8 +8265,8 @@ var require_react_dom_development = __commonJS({
8264
8265
  if (propertyInfo !== null) {
8265
8266
  return !propertyInfo.acceptsBooleans;
8266
8267
  } else {
8267
- var prefix2 = name.toLowerCase().slice(0, 5);
8268
- return prefix2 !== "data-" && prefix2 !== "aria-";
8268
+ var prefix3 = name.toLowerCase().slice(0, 5);
8269
+ return prefix3 !== "data-" && prefix3 !== "aria-";
8269
8270
  }
8270
8271
  }
8271
8272
  default:
@@ -8937,18 +8938,18 @@ var require_react_dom_development = __commonJS({
8937
8938
  }
8938
8939
  }
8939
8940
  var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
8940
- var prefix;
8941
+ var prefix2;
8941
8942
  function describeBuiltInComponentFrame(name, source, ownerFn) {
8942
8943
  {
8943
- if (prefix === void 0) {
8944
+ if (prefix2 === void 0) {
8944
8945
  try {
8945
8946
  throw Error();
8946
8947
  } catch (x) {
8947
8948
  var match = x.stack.trim().match(/\n( *(at )?)/);
8948
- prefix = match && match[1] || "";
8949
+ prefix2 = match && match[1] || "";
8949
8950
  }
8950
8951
  }
8951
- return "\n" + prefix + name;
8952
+ return "\n" + prefix2 + name;
8952
8953
  }
8953
8954
  }
8954
8955
  var reentry = false;
@@ -9240,7 +9241,7 @@ var require_react_dom_development = __commonJS({
9240
9241
  return "DehydratedFragment";
9241
9242
  case ForwardRef:
9242
9243
  return getWrappedName$1(type, type.render, "ForwardRef");
9243
- case Fragment13:
9244
+ case Fragment17:
9244
9245
  return "Fragment";
9245
9246
  case HostComponent:
9246
9247
  return type;
@@ -10033,13 +10034,13 @@ var require_react_dom_development = __commonJS({
10033
10034
  strokeOpacity: true,
10034
10035
  strokeWidth: true
10035
10036
  };
10036
- function prefixKey(prefix2, key) {
10037
- return prefix2 + key.charAt(0).toUpperCase() + key.substring(1);
10037
+ function prefixKey(prefix3, key) {
10038
+ return prefix3 + key.charAt(0).toUpperCase() + key.substring(1);
10038
10039
  }
10039
10040
  var prefixes = ["Webkit", "ms", "Moz", "O"];
10040
10041
  Object.keys(isUnitlessNumber).forEach(function(prop) {
10041
- prefixes.forEach(function(prefix2) {
10042
- isUnitlessNumber[prefixKey(prefix2, prop)] = isUnitlessNumber[prop];
10042
+ prefixes.forEach(function(prefix3) {
10043
+ isUnitlessNumber[prefixKey(prefix3, prop)] = isUnitlessNumber[prop];
10043
10044
  });
10044
10045
  });
10045
10046
  function dangerousStyleValue(name, value, isCustomProperty) {
@@ -18911,7 +18912,7 @@ var require_react_dom_development = __commonJS({
18911
18912
  }
18912
18913
  }
18913
18914
  function updateFragment2(returnFiber, current2, fragment, lanes, key) {
18914
- if (current2 === null || current2.tag !== Fragment13) {
18915
+ if (current2 === null || current2.tag !== Fragment17) {
18915
18916
  var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
18916
18917
  created.return = returnFiber;
18917
18918
  return created;
@@ -19314,7 +19315,7 @@ var require_react_dom_development = __commonJS({
19314
19315
  if (child.key === key) {
19315
19316
  var elementType = element.type;
19316
19317
  if (elementType === REACT_FRAGMENT_TYPE) {
19317
- if (child.tag === Fragment13) {
19318
+ if (child.tag === Fragment17) {
19318
19319
  deleteRemainingChildren(returnFiber, child.sibling);
19319
19320
  var existing = useFiber(child, element.props.children);
19320
19321
  existing.return = returnFiber;
@@ -23489,7 +23490,7 @@ var require_react_dom_development = __commonJS({
23489
23490
  var _resolvedProps2 = workInProgress2.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
23490
23491
  return updateForwardRef(current2, workInProgress2, type, _resolvedProps2, renderLanes2);
23491
23492
  }
23492
- case Fragment13:
23493
+ case Fragment17:
23493
23494
  return updateFragment(current2, workInProgress2, renderLanes2);
23494
23495
  case Mode:
23495
23496
  return updateMode(current2, workInProgress2, renderLanes2);
@@ -23762,7 +23763,7 @@ var require_react_dom_development = __commonJS({
23762
23763
  case SimpleMemoComponent:
23763
23764
  case FunctionComponent:
23764
23765
  case ForwardRef:
23765
- case Fragment13:
23766
+ case Fragment17:
23766
23767
  case Mode:
23767
23768
  case Profiler:
23768
23769
  case ContextConsumer:
@@ -28021,7 +28022,7 @@ var require_react_dom_development = __commonJS({
28021
28022
  return fiber;
28022
28023
  }
28023
28024
  function createFiberFromFragment(elements, mode, lanes, key) {
28024
- var fiber = createFiber(Fragment13, elements, key, mode);
28025
+ var fiber = createFiber(Fragment17, elements, key, mode);
28025
28026
  fiber.lanes = lanes;
28026
28027
  return fiber;
28027
28028
  }
@@ -29094,18 +29095,18 @@ var require_react_dom_development = __commonJS({
29094
29095
  }
29095
29096
  }
29096
29097
  }
29097
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
29098
- exports.createPortal = createPortal$1;
29099
- exports.createRoot = createRoot$1;
29100
- exports.findDOMNode = findDOMNode;
29101
- exports.flushSync = flushSync$1;
29102
- exports.hydrate = hydrate;
29103
- exports.hydrateRoot = hydrateRoot$1;
29104
- exports.render = render;
29105
- exports.unmountComponentAtNode = unmountComponentAtNode;
29106
- exports.unstable_batchedUpdates = batchedUpdates$1;
29107
- exports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;
29108
- exports.version = ReactVersion;
29098
+ exports2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
29099
+ exports2.createPortal = createPortal$1;
29100
+ exports2.createRoot = createRoot$1;
29101
+ exports2.findDOMNode = findDOMNode;
29102
+ exports2.flushSync = flushSync$1;
29103
+ exports2.hydrate = hydrate;
29104
+ exports2.hydrateRoot = hydrateRoot$1;
29105
+ exports2.render = render;
29106
+ exports2.unmountComponentAtNode = unmountComponentAtNode;
29107
+ exports2.unstable_batchedUpdates = batchedUpdates$1;
29108
+ exports2.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;
29109
+ exports2.version = ReactVersion;
29109
29110
  if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
29110
29111
  __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
29111
29112
  }
@@ -29116,7 +29117,7 @@ var require_react_dom_development = __commonJS({
29116
29117
 
29117
29118
  // ../../node_modules/react-dom/index.js
29118
29119
  var require_react_dom = __commonJS({
29119
- "../../node_modules/react-dom/index.js"(exports, module2) {
29120
+ "../../node_modules/react-dom/index.js"(exports2, module2) {
29120
29121
  "use strict";
29121
29122
  init_react_import();
29122
29123
  function checkDCE() {
@@ -29171,9 +29172,19 @@ init_react_import();
29171
29172
  init_react_import();
29172
29173
  var import_react2 = require("react");
29173
29174
 
29174
- // css-module:/home/runner/work/puck/puck/packages/core/components/Button/Button.module.css#css-module
29175
- init_react_import();
29176
- var Button_module_default = { "Button": "_Button_8fn3a_1", "Button--medium": "_Button--medium_8fn3a_29", "Button--large": "_Button--large_8fn3a_37", "Button-icon": "_Button-icon_8fn3a_44", "Button--primary": "_Button--primary_8fn3a_48", "Button--secondary": "_Button--secondary_8fn3a_67", "Button--flush": "_Button--flush_8fn3a_82", "Button--disabled": "_Button--disabled_8fn3a_86", "Button--fullWidth": "_Button--fullWidth_8fn3a_93", "Button-spinner": "_Button-spinner_8fn3a_98" };
29175
+ // components/Button/Button.module.css
29176
+ var Button_default = {
29177
+ Button: "Button_Button",
29178
+ "Button--medium": "Button_Button--medium",
29179
+ "Button--large": "Button_Button--large",
29180
+ "Button-icon": "Button_Button-icon",
29181
+ "Button--primary": "Button_Button--primary",
29182
+ "Button--secondary": "Button_Button--secondary",
29183
+ "Button--flush": "Button_Button--flush",
29184
+ "Button--disabled": "Button_Button--disabled",
29185
+ "Button--fullWidth": "Button_Button--fullWidth",
29186
+ "Button-spinner": "Button_Button-spinner"
29187
+ };
29177
29188
 
29178
29189
  // lib/get-class-name-factory.ts
29179
29190
  init_react_import();
@@ -29210,7 +29221,7 @@ var get_class_name_factory_default = getClassNameFactory;
29210
29221
  // components/Button/Button.tsx
29211
29222
  var import_react_spinners = require("react-spinners");
29212
29223
  var import_jsx_runtime = require("react/jsx-runtime");
29213
- var getClassName = get_class_name_factory_default("Button", Button_module_default);
29224
+ var getClassName = get_class_name_factory_default("Button", Button_default);
29214
29225
  var Button = ({
29215
29226
  children,
29216
29227
  href,
@@ -29264,16 +29275,190 @@ var Button = ({
29264
29275
 
29265
29276
  // components/Drawer/index.tsx
29266
29277
  init_react_import();
29267
- var import_dnd2 = require("@hello-pangea/dnd");
29268
29278
 
29269
- // css-module:/home/runner/work/puck/puck/packages/core/components/Drawer/styles.module.css#css-module
29279
+ // components/Droppable/index.tsx
29270
29280
  init_react_import();
29271
- var styles_module_default = { "Drawer": "_Drawer_6zh0b_1", "DrawerItem-default": "_DrawerItem-default_6zh0b_5", "DrawerItem-draggableWrapper": "_DrawerItem-draggableWrapper_6zh0b_5", "DrawerItem": "_DrawerItem_6zh0b_5", "DrawerItem-draggable": "_DrawerItem-draggable_6zh0b_5", "Drawer--isDraggingFrom": "_Drawer--isDraggingFrom_6zh0b_31", "DrawerItem-name": "_DrawerItem-name_6zh0b_47" };
29281
+ var import_dnd = require("@measured/dnd");
29272
29282
 
29273
- // components/Draggable/index.tsx
29283
+ // components/Puck/context.tsx
29284
+ init_react_import();
29285
+ var import_react3 = require("react");
29286
+
29287
+ // lib/get-item.ts
29274
29288
  init_react_import();
29275
- var import_dnd = require("@hello-pangea/dnd");
29289
+
29290
+ // lib/root-droppable-id.ts
29291
+ init_react_import();
29292
+ var rootDroppableId = "default-zone";
29293
+
29294
+ // lib/setup-zone.ts
29295
+ init_react_import();
29296
+ var setupZone = (data, zoneKey) => {
29297
+ if (zoneKey === rootDroppableId) {
29298
+ return data;
29299
+ }
29300
+ const newData = __spreadValues({}, data);
29301
+ newData.zones = data.zones || {};
29302
+ newData.zones[zoneKey] = newData.zones[zoneKey] || [];
29303
+ return newData;
29304
+ };
29305
+
29306
+ // lib/get-item.ts
29307
+ var getItem = (selector, data, dynamicProps = {}) => {
29308
+ if (!selector.zone || selector.zone === rootDroppableId) {
29309
+ const item2 = data.content[selector.index];
29310
+ return __spreadProps(__spreadValues({}, item2), { props: dynamicProps[item2.props.id] || item2.props });
29311
+ }
29312
+ const item = setupZone(data, selector.zone).zones[selector.zone][selector.index];
29313
+ return __spreadProps(__spreadValues({}, item), { props: dynamicProps[item.props.id] || item.props });
29314
+ };
29315
+
29316
+ // components/ViewportControls/default-viewports.ts
29317
+ init_react_import();
29318
+ var defaultViewports = [
29319
+ { width: 360, height: "auto", icon: "Smartphone", label: "Small" },
29320
+ { width: 768, height: "auto", icon: "Tablet", label: "Medium" },
29321
+ { width: 1280, height: "auto", icon: "Monitor", label: "Large" }
29322
+ ];
29323
+
29324
+ // components/Puck/context.tsx
29276
29325
  var import_jsx_runtime2 = require("react/jsx-runtime");
29326
+ var defaultAppState = {
29327
+ data: { content: [], root: { props: { title: "" } } },
29328
+ ui: {
29329
+ leftSideBarVisible: true,
29330
+ rightSideBarVisible: true,
29331
+ arrayState: {},
29332
+ itemSelector: null,
29333
+ componentList: {},
29334
+ isDragging: false,
29335
+ viewports: {
29336
+ current: {
29337
+ width: defaultViewports[0].width,
29338
+ height: defaultViewports[0].height || "auto"
29339
+ },
29340
+ options: [],
29341
+ controlsVisible: true
29342
+ }
29343
+ }
29344
+ };
29345
+ var defaultContext = {
29346
+ state: defaultAppState,
29347
+ dispatch: () => null,
29348
+ config: { components: {} },
29349
+ componentState: {},
29350
+ resolveData: () => {
29351
+ },
29352
+ plugins: [],
29353
+ overrides: {},
29354
+ history: {},
29355
+ viewports: defaultViewports,
29356
+ zoomConfig: {
29357
+ autoZoom: 1,
29358
+ rootHeight: 0,
29359
+ zoom: 1
29360
+ },
29361
+ setZoomConfig: () => null,
29362
+ status: "LOADING",
29363
+ setStatus: () => null,
29364
+ iframe: {}
29365
+ };
29366
+ var appContext = (0, import_react3.createContext)(defaultContext);
29367
+ var AppProvider = ({
29368
+ children,
29369
+ value
29370
+ }) => {
29371
+ const [zoomConfig, setZoomConfig] = (0, import_react3.useState)(defaultContext.zoomConfig);
29372
+ const [status, setStatus] = (0, import_react3.useState)("LOADING");
29373
+ (0, import_react3.useEffect)(() => {
29374
+ setStatus("MOUNTED");
29375
+ }, []);
29376
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
29377
+ appContext.Provider,
29378
+ {
29379
+ value: __spreadProps(__spreadValues({}, value), { zoomConfig, setZoomConfig, status, setStatus }),
29380
+ children
29381
+ }
29382
+ );
29383
+ };
29384
+ function useAppContext() {
29385
+ const mainContext = (0, import_react3.useContext)(appContext);
29386
+ const selectedItem = mainContext.state.ui.itemSelector ? getItem(mainContext.state.ui.itemSelector, mainContext.state.data) : void 0;
29387
+ return __spreadProps(__spreadValues({}, mainContext), {
29388
+ // Helpers
29389
+ selectedItem,
29390
+ setUi: (ui, recordHistory) => {
29391
+ return mainContext.dispatch({
29392
+ type: "setUi",
29393
+ ui,
29394
+ recordHistory
29395
+ });
29396
+ }
29397
+ });
29398
+ }
29399
+
29400
+ // components/Droppable/index.tsx
29401
+ var import_jsx_runtime3 = require("react/jsx-runtime");
29402
+ var defaultProvided = {
29403
+ droppableProps: {
29404
+ "data-rfd-droppable-context-id": "",
29405
+ "data-rfd-droppable-id": ""
29406
+ },
29407
+ placeholder: null,
29408
+ innerRef: () => null
29409
+ };
29410
+ var defaultSnapshot = {
29411
+ isDraggingOver: false,
29412
+ draggingOverWith: null,
29413
+ draggingFromThisWith: null,
29414
+ isUsingPlaceholder: false
29415
+ };
29416
+ var DefaultDroppable = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: children(defaultProvided, defaultSnapshot) });
29417
+ var Droppable = (props) => {
29418
+ const { status } = useAppContext();
29419
+ const El = status !== "LOADING" ? import_dnd.Droppable : DefaultDroppable;
29420
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(El, __spreadValues({}, props));
29421
+ };
29422
+
29423
+ // components/Drawer/styles.module.css
29424
+ var styles_default = {
29425
+ Drawer: "styles_Drawer",
29426
+ "DrawerItem-default": "styles_DrawerItem-default",
29427
+ "DrawerItem-draggableWrapper": "styles_DrawerItem-draggableWrapper",
29428
+ DrawerItem: "styles_DrawerItem",
29429
+ "DrawerItem-draggable": "styles_DrawerItem-draggable",
29430
+ "Drawer--isDraggingFrom": "styles_Drawer--isDraggingFrom",
29431
+ "DrawerItem-name": "styles_DrawerItem-name"
29432
+ };
29433
+
29434
+ // components/Draggable/index.tsx
29435
+ init_react_import();
29436
+ var import_dnd2 = require("@measured/dnd");
29437
+ var import_jsx_runtime4 = require("react/jsx-runtime");
29438
+ var defaultProvided2 = {
29439
+ draggableProps: {
29440
+ "data-rfd-draggable-context-id": "",
29441
+ "data-rfd-draggable-id": ""
29442
+ },
29443
+ dragHandleProps: null,
29444
+ innerRef: () => null
29445
+ };
29446
+ var defaultSnapshot2 = {
29447
+ isDragging: false,
29448
+ isDropAnimating: false,
29449
+ isClone: false,
29450
+ dropAnimation: null,
29451
+ draggingOver: null,
29452
+ combineWith: null,
29453
+ combineTargetFor: null,
29454
+ mode: null
29455
+ };
29456
+ var defaultRubric = {
29457
+ draggableId: "",
29458
+ type: "",
29459
+ source: { droppableId: "", index: 0 }
29460
+ };
29461
+ var DefaultDraggable = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children: children(defaultProvided2, defaultSnapshot2, defaultRubric) });
29277
29462
  var Draggable = ({
29278
29463
  className,
29279
29464
  children,
@@ -29283,39 +29468,33 @@ var Draggable = ({
29283
29468
  disableAnimations = false,
29284
29469
  isDragDisabled = false
29285
29470
  }) => {
29286
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
29287
- import_dnd.Draggable,
29288
- {
29289
- draggableId: id,
29290
- index,
29291
- isDragDisabled,
29292
- children: (provided, snapshot) => {
29293
- var _a;
29294
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
29295
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
29296
- "div",
29297
- __spreadProps(__spreadValues(__spreadValues({
29298
- className: className && className(provided, snapshot),
29299
- ref: provided.innerRef
29300
- }, provided.draggableProps), provided.dragHandleProps), {
29301
- style: __spreadProps(__spreadValues({}, provided.draggableProps.style), {
29302
- transform: snapshot.isDragging || !disableAnimations ? (_a = provided.draggableProps.style) == null ? void 0 : _a.transform : "translate(0px, 0px)"
29303
- }),
29304
- children: children(provided, snapshot)
29305
- })
29306
- ),
29307
- showShadow && snapshot.isDragging && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
29308
- "div",
29309
- {
29310
- className: className && className(provided, snapshot),
29311
- style: { transform: "none !important" },
29312
- children: children(provided, snapshot)
29313
- }
29314
- )
29315
- ] });
29316
- }
29317
- }
29318
- );
29471
+ const { status } = useAppContext();
29472
+ const El = status !== "LOADING" ? import_dnd2.Draggable : DefaultDraggable;
29473
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(El, { draggableId: id, index, isDragDisabled, children: (provided, snapshot) => {
29474
+ var _a;
29475
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
29476
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
29477
+ "div",
29478
+ __spreadProps(__spreadValues(__spreadValues({
29479
+ className: className && className(provided, snapshot),
29480
+ ref: provided.innerRef
29481
+ }, provided.draggableProps), provided.dragHandleProps), {
29482
+ style: __spreadProps(__spreadValues({}, provided.draggableProps.style), {
29483
+ transform: snapshot.isDragging || !disableAnimations ? (_a = provided.draggableProps.style) == null ? void 0 : _a.transform : "translate(0px, 0px)"
29484
+ }),
29485
+ children: children(provided, snapshot)
29486
+ })
29487
+ ),
29488
+ showShadow && snapshot.isDragging && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
29489
+ "div",
29490
+ {
29491
+ className: className && className(provided, snapshot),
29492
+ style: { transform: "none !important" },
29493
+ children: children(provided, snapshot)
29494
+ }
29495
+ )
29496
+ ] });
29497
+ } });
29319
29498
  };
29320
29499
 
29321
29500
  // components/DragIcon/index.tsx
@@ -29345,28 +29524,29 @@ var replace = (list, index, newItem) => {
29345
29524
  return result;
29346
29525
  };
29347
29526
 
29348
- // css-module:/home/runner/work/puck/puck/packages/core/components/DragIcon/styles.module.css#css-module
29349
- init_react_import();
29350
- var styles_module_default2 = { "DragIcon": "_DragIcon_1p5wn_1" };
29527
+ // components/DragIcon/styles.module.css
29528
+ var styles_default2 = {
29529
+ DragIcon: "styles_DragIcon"
29530
+ };
29351
29531
 
29352
29532
  // components/DragIcon/index.tsx
29353
- var import_jsx_runtime3 = require("react/jsx-runtime");
29354
- var getClassName2 = get_class_name_factory_default("DragIcon", styles_module_default2);
29355
- var DragIcon = () => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: getClassName2(), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { viewBox: "0 0 20 20", width: "12", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z" }) }) });
29533
+ var import_jsx_runtime5 = require("react/jsx-runtime");
29534
+ var getClassName2 = get_class_name_factory_default("DragIcon", styles_default2);
29535
+ var DragIcon = () => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: getClassName2(), children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 20 20", width: "12", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z" }) }) });
29356
29536
 
29357
29537
  // components/Drawer/index.tsx
29358
- var import_react3 = require("react");
29359
- var import_jsx_runtime4 = require("react/jsx-runtime");
29360
- var getClassName3 = get_class_name_factory_default("Drawer", styles_module_default);
29361
- var getClassNameItem = get_class_name_factory_default("DrawerItem", styles_module_default);
29362
- var drawerContext = (0, import_react3.createContext)({
29538
+ var import_react4 = require("react");
29539
+ var import_jsx_runtime6 = require("react/jsx-runtime");
29540
+ var getClassName3 = get_class_name_factory_default("Drawer", styles_default);
29541
+ var getClassNameItem = get_class_name_factory_default("DrawerItem", styles_default);
29542
+ var drawerContext = (0, import_react4.createContext)({
29363
29543
  droppableId: ""
29364
29544
  });
29365
29545
  var DrawerDraggable = ({
29366
29546
  children,
29367
29547
  id,
29368
29548
  index
29369
- }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
29549
+ }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
29370
29550
  Draggable,
29371
29551
  {
29372
29552
  id,
@@ -29385,15 +29565,15 @@ var DrawerItem = ({
29385
29565
  label,
29386
29566
  index
29387
29567
  }) => {
29388
- const ctx = (0, import_react3.useContext)(drawerContext);
29568
+ const ctx = (0, import_react4.useContext)(drawerContext);
29389
29569
  const resolvedId = `${ctx.droppableId}::${id || name}`;
29390
- const CustomInner = (0, import_react3.useMemo)(
29391
- () => children || (({ children: children2, name: name2 }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: getClassNameItem("default"), children: children2 })),
29570
+ const CustomInner = (0, import_react4.useMemo)(
29571
+ () => children || (({ children: children2, name: name2 }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: getClassNameItem("default"), children: children2 })),
29392
29572
  [children]
29393
29573
  );
29394
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DrawerDraggable, { id: resolvedId, index, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CustomInner, { name, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: getClassNameItem("draggableWrapper"), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: getClassNameItem("draggable"), children: [
29395
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: getClassNameItem("name"), children: label != null ? label : name }),
29396
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: getClassNameItem("icon"), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DragIcon, {}) })
29574
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DrawerDraggable, { id: resolvedId, index, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CustomInner, { name, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: getClassNameItem("draggableWrapper"), children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: getClassNameItem("draggable"), children: [
29575
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: getClassNameItem("name"), children: label != null ? label : name }),
29576
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: getClassNameItem("icon"), children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DragIcon, {}) })
29397
29577
  ] }) }) }) });
29398
29578
  };
29399
29579
  var Drawer = ({
@@ -29401,7 +29581,7 @@ var Drawer = ({
29401
29581
  droppableId = "component-list",
29402
29582
  direction = "vertical"
29403
29583
  }) => {
29404
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(drawerContext.Provider, { value: { droppableId }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dnd2.Droppable, { droppableId, isDropDisabled: true, direction, children: (provided, snapshot) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
29584
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(drawerContext.Provider, { value: { droppableId }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Droppable, { droppableId, isDropDisabled: true, direction, children: (provided, snapshot) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
29405
29585
  "div",
29406
29586
  __spreadProps(__spreadValues({}, provided.droppableProps), {
29407
29587
  ref: provided.innerRef,
@@ -29410,7 +29590,7 @@ var Drawer = ({
29410
29590
  }),
29411
29591
  children: [
29412
29592
  children,
29413
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: { display: "none" }, children: provided.placeholder })
29593
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { style: { display: "none" }, children: provided.placeholder })
29414
29594
  ]
29415
29595
  })
29416
29596
  ) }) });
@@ -29423,19 +29603,32 @@ var import_react9 = require("react");
29423
29603
 
29424
29604
  // components/DraggableComponent/index.tsx
29425
29605
  init_react_import();
29426
- var import_react6 = require("react");
29427
- var import_dnd3 = require("@hello-pangea/dnd");
29606
+ var import_react7 = require("react");
29607
+ var import_dnd3 = require("@measured/dnd");
29428
29608
 
29429
- // css-module:/home/runner/work/puck/puck/packages/core/components/DraggableComponent/styles.module.css#css-module
29430
- init_react_import();
29431
- var styles_module_default3 = { "DraggableComponent": "_DraggableComponent_1vpvt_1", "DraggableComponent--isDragging": "_DraggableComponent--isDragging_1vpvt_10", "DraggableComponent-contents": "_DraggableComponent-contents_1vpvt_16", "DraggableComponent-overlay": "_DraggableComponent-overlay_1vpvt_29", "DraggableComponent-loadingOverlay": "_DraggableComponent-loadingOverlay_1vpvt_42", "DraggableComponent--isLocked": "_DraggableComponent--isLocked_1vpvt_58", "DraggableComponent--forceHover": "_DraggableComponent--forceHover_1vpvt_64", "DraggableComponent--isSelected": "_DraggableComponent--isSelected_1vpvt_69", "DraggableComponent--indicativeHover": "_DraggableComponent--indicativeHover_1vpvt_74", "DraggableComponent-actions": "_DraggableComponent-actions_1vpvt_100", "DraggableComponent-actionsLabel": "_DraggableComponent-actionsLabel_1vpvt_125", "DraggableComponent-action": "_DraggableComponent-action_1vpvt_100" };
29609
+ // components/DraggableComponent/styles.module.css
29610
+ var styles_default3 = {
29611
+ DraggableComponent: "styles_DraggableComponent",
29612
+ "DraggableComponent--isDragging": "styles_DraggableComponent--isDragging",
29613
+ "DraggableComponent-contents": "styles_DraggableComponent-contents",
29614
+ "DraggableComponent-overlay": "styles_DraggableComponent-overlay",
29615
+ "DraggableComponent-loadingOverlay": "styles_DraggableComponent-loadingOverlay",
29616
+ "DraggableComponent--isLocked": "styles_DraggableComponent--isLocked",
29617
+ "DraggableComponent--forceHover": "styles_DraggableComponent--forceHover",
29618
+ "DraggableComponent--isSelected": "styles_DraggableComponent--isSelected",
29619
+ "DraggableComponent--indicativeHover": "styles_DraggableComponent--indicativeHover",
29620
+ "DraggableComponent-actionsOverlay": "styles_DraggableComponent-actionsOverlay",
29621
+ "DraggableComponent-actions": "styles_DraggableComponent-actions",
29622
+ "DraggableComponent-actionsLabel": "styles_DraggableComponent-actionsLabel",
29623
+ "DraggableComponent-action": "styles_DraggableComponent-action"
29624
+ };
29432
29625
 
29433
29626
  // ../../node_modules/lucide-react/dist/esm/lucide-react.js
29434
29627
  init_react_import();
29435
29628
 
29436
29629
  // ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
29437
29630
  init_react_import();
29438
- var import_react4 = require("react");
29631
+ var import_react5 = require("react");
29439
29632
 
29440
29633
  // ../../node_modules/lucide-react/dist/esm/defaultAttributes.js
29441
29634
  init_react_import();
@@ -29454,10 +29647,10 @@ var defaultAttributes = {
29454
29647
  // ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
29455
29648
  var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().trim();
29456
29649
  var createLucideIcon = (iconName, iconNode) => {
29457
- const Component = (0, import_react4.forwardRef)(
29650
+ const Component = (0, import_react5.forwardRef)(
29458
29651
  (_a, ref) => {
29459
29652
  var _b = _a, { color = "currentColor", size = 24, strokeWidth = 2, absoluteStrokeWidth, className = "", children } = _b, rest = __objRest(_b, ["color", "size", "strokeWidth", "absoluteStrokeWidth", "className", "children"]);
29460
- return (0, import_react4.createElement)(
29653
+ return (0, import_react5.createElement)(
29461
29654
  "svg",
29462
29655
  __spreadValues(__spreadProps(__spreadValues({
29463
29656
  ref
@@ -29469,7 +29662,7 @@ var createLucideIcon = (iconName, iconNode) => {
29469
29662
  className: ["lucide", `lucide-${toKebabCase(iconName)}`, className].join(" ")
29470
29663
  }), rest),
29471
29664
  [
29472
- ...iconNode.map(([tag, attrs]) => (0, import_react4.createElement)(tag, attrs)),
29665
+ ...iconNode.map(([tag, attrs]) => (0, import_react5.createElement)(tag, attrs)),
29473
29666
  ...Array.isArray(children) ? children : [children]
29474
29667
  ]
29475
29668
  );
@@ -29580,6 +29773,14 @@ var Lock = createLucideIcon("Lock", [
29580
29773
  ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
29581
29774
  ]);
29582
29775
 
29776
+ // ../../node_modules/lucide-react/dist/esm/icons/monitor.js
29777
+ init_react_import();
29778
+ var Monitor = createLucideIcon("Monitor", [
29779
+ ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
29780
+ ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
29781
+ ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
29782
+ ]);
29783
+
29583
29784
  // ../../node_modules/lucide-react/dist/esm/icons/more-vertical.js
29584
29785
  init_react_import();
29585
29786
  var MoreVertical = createLucideIcon("MoreVertical", [
@@ -29630,6 +29831,20 @@ var SlidersHorizontal = createLucideIcon("SlidersHorizontal", [
29630
29831
  ["line", { x1: "16", x2: "16", y1: "18", y2: "22", key: "1lctlv" }]
29631
29832
  ]);
29632
29833
 
29834
+ // ../../node_modules/lucide-react/dist/esm/icons/smartphone.js
29835
+ init_react_import();
29836
+ var Smartphone = createLucideIcon("Smartphone", [
29837
+ ["rect", { width: "14", height: "20", x: "5", y: "2", rx: "2", ry: "2", key: "1yt0o3" }],
29838
+ ["path", { d: "M12 18h.01", key: "mhygvu" }]
29839
+ ]);
29840
+
29841
+ // ../../node_modules/lucide-react/dist/esm/icons/tablet.js
29842
+ init_react_import();
29843
+ var Tablet = createLucideIcon("Tablet", [
29844
+ ["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", ry: "2", key: "76otgf" }],
29845
+ ["line", { x1: "12", x2: "12.01", y1: "18", y2: "18", key: "1dp563" }]
29846
+ ]);
29847
+
29633
29848
  // ../../node_modules/lucide-react/dist/esm/icons/trash.js
29634
29849
  init_react_import();
29635
29850
  var Trash = createLucideIcon("Trash", [
@@ -29653,12 +29868,29 @@ var Unlock = createLucideIcon("Unlock", [
29653
29868
  ["path", { d: "M7 11V7a5 5 0 0 1 9.9-1", key: "1mm8w8" }]
29654
29869
  ]);
29655
29870
 
29871
+ // ../../node_modules/lucide-react/dist/esm/icons/zoom-in.js
29872
+ init_react_import();
29873
+ var ZoomIn = createLucideIcon("ZoomIn", [
29874
+ ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
29875
+ ["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
29876
+ ["line", { x1: "11", x2: "11", y1: "8", y2: "14", key: "1vmskp" }],
29877
+ ["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
29878
+ ]);
29879
+
29880
+ // ../../node_modules/lucide-react/dist/esm/icons/zoom-out.js
29881
+ init_react_import();
29882
+ var ZoomOut = createLucideIcon("ZoomOut", [
29883
+ ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
29884
+ ["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
29885
+ ["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
29886
+ ]);
29887
+
29656
29888
  // lib/use-modifier-held.ts
29657
29889
  init_react_import();
29658
- var import_react5 = require("react");
29890
+ var import_react6 = require("react");
29659
29891
  var useModifierHeld = (modifier) => {
29660
- const [modifierHeld, setModifierHeld] = (0, import_react5.useState)(false);
29661
- (0, import_react5.useEffect)(() => {
29892
+ const [modifierHeld, setModifierHeld] = (0, import_react6.useState)(false);
29893
+ (0, import_react6.useEffect)(() => {
29662
29894
  function downHandler({ key }) {
29663
29895
  if (key === modifier) {
29664
29896
  setModifierHeld(true);
@@ -29679,10 +29911,26 @@ var useModifierHeld = (modifier) => {
29679
29911
  return modifierHeld;
29680
29912
  };
29681
29913
 
29914
+ // lib/is-ios.ts
29915
+ init_react_import();
29916
+ var isIos = () => [
29917
+ "iPad Simulator",
29918
+ "iPhone Simulator",
29919
+ "iPod Simulator",
29920
+ "iPad",
29921
+ "iPhone",
29922
+ "iPod"
29923
+ ].includes(navigator.platform) || // iPad on iOS 13 detection
29924
+ navigator.userAgent.includes("Mac") && "ontouchend" in document;
29925
+
29682
29926
  // components/DraggableComponent/index.tsx
29683
29927
  var import_react_spinners2 = require("react-spinners");
29684
- var import_jsx_runtime5 = require("react/jsx-runtime");
29685
- var getClassName4 = get_class_name_factory_default("DraggableComponent", styles_module_default3);
29928
+ var import_jsx_runtime7 = require("react/jsx-runtime");
29929
+ var getClassName4 = get_class_name_factory_default("DraggableComponent", styles_default3);
29930
+ var space = 8;
29931
+ var actionsOverlayTop = space * 6.5;
29932
+ var actionsTop = -(actionsOverlayTop - 8);
29933
+ var actionsRight = space;
29686
29934
  var DraggableComponent = ({
29687
29935
  children,
29688
29936
  id,
@@ -29705,15 +29953,25 @@ var DraggableComponent = ({
29705
29953
  indicativeHover = false,
29706
29954
  style
29707
29955
  }) => {
29956
+ const { zoomConfig } = useAppContext();
29708
29957
  const isModifierHeld = useModifierHeld("Alt");
29709
- (0, import_react6.useEffect)(onMount, []);
29710
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
29711
- import_dnd3.Draggable,
29958
+ const { status } = useAppContext();
29959
+ const El = status !== "LOADING" ? import_dnd3.Draggable : DefaultDraggable;
29960
+ (0, import_react7.useEffect)(onMount, []);
29961
+ const [disableSecondaryAnimation, setDisableSecondaryAnimation] = (0, import_react7.useState)(false);
29962
+ (0, import_react7.useEffect)(() => {
29963
+ if (isIos()) {
29964
+ setDisableSecondaryAnimation(true);
29965
+ }
29966
+ }, []);
29967
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
29968
+ El,
29712
29969
  {
29713
29970
  draggableId: id,
29714
29971
  index,
29715
29972
  isDragDisabled,
29716
- children: (provided, snapshot) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
29973
+ disableSecondaryAnimation,
29974
+ children: (provided, snapshot) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
29717
29975
  "div",
29718
29976
  __spreadProps(__spreadValues(__spreadValues({
29719
29977
  ref: provided.innerRef
@@ -29736,13 +29994,34 @@ var DraggableComponent = ({
29736
29994
  onClick,
29737
29995
  children: [
29738
29996
  debug,
29739
- isLoading && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: getClassName4("loadingOverlay"), children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_spinners2.ClipLoader, { "aria-label": "loading", size: 16, color: "inherit" }) }),
29740
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: getClassName4("overlay"), children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: getClassName4("actions"), children: [
29741
- label && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: getClassName4("actionsLabel"), children: label }),
29742
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { className: getClassName4("action"), onClick: onDuplicate, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Copy, { size: 16 }) }),
29743
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { className: getClassName4("action"), onClick: onDelete, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Trash, { size: 16 }) })
29744
- ] }) }),
29745
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: getClassName4("contents"), children })
29997
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: getClassName4("loadingOverlay"), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_spinners2.ClipLoader, { "aria-label": "loading", size: 16, color: "inherit" }) }),
29998
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
29999
+ "div",
30000
+ {
30001
+ className: getClassName4("actionsOverlay"),
30002
+ style: {
30003
+ top: actionsOverlayTop / zoomConfig.zoom
30004
+ },
30005
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
30006
+ "div",
30007
+ {
30008
+ className: getClassName4("actions"),
30009
+ style: {
30010
+ transform: `scale(${1 / zoomConfig.zoom}`,
30011
+ top: actionsTop / zoomConfig.zoom,
30012
+ right: actionsRight / zoomConfig.zoom
30013
+ },
30014
+ children: [
30015
+ label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: getClassName4("actionsLabel"), children: label }),
30016
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { className: getClassName4("action"), onClick: onDuplicate, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Copy, { size: 16 }) }),
30017
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { className: getClassName4("action"), onClick: onDelete, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Trash, { size: 16 }) })
30018
+ ]
30019
+ }
30020
+ )
30021
+ }
30022
+ ),
30023
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: getClassName4("overlay") }),
30024
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: getClassName4("contents"), children })
29746
30025
  ]
29747
30026
  })
29748
30027
  )
@@ -29751,45 +30030,26 @@ var DraggableComponent = ({
29751
30030
  );
29752
30031
  };
29753
30032
 
29754
- // components/DropZone/index.tsx
29755
- var import_dnd4 = require("@hello-pangea/dnd");
29756
-
29757
- // lib/get-item.ts
29758
- init_react_import();
29759
-
29760
- // lib/root-droppable-id.ts
29761
- init_react_import();
29762
- var rootDroppableId = "default-zone";
29763
-
29764
- // lib/setup-zone.ts
29765
- init_react_import();
29766
- var setupZone = (data, zoneKey) => {
29767
- if (zoneKey === rootDroppableId) {
29768
- return data;
29769
- }
29770
- const newData = __spreadValues({}, data);
29771
- newData.zones = data.zones || {};
29772
- newData.zones[zoneKey] = newData.zones[zoneKey] || [];
29773
- return newData;
29774
- };
29775
-
29776
- // lib/get-item.ts
29777
- var getItem = (selector, data, dynamicProps = {}) => {
29778
- if (!selector.zone || selector.zone === rootDroppableId) {
29779
- const item2 = data.content[selector.index];
29780
- return __spreadProps(__spreadValues({}, item2), { props: dynamicProps[item2.props.id] || item2.props });
29781
- }
29782
- const item = setupZone(data, selector.zone).zones[selector.zone][selector.index];
29783
- return __spreadProps(__spreadValues({}, item), { props: dynamicProps[item.props.id] || item.props });
30033
+ // components/DropZone/styles.module.css
30034
+ var styles_default4 = {
30035
+ DropZone: "styles_DropZone",
30036
+ "DropZone-content": "styles_DropZone-content",
30037
+ "DropZone--userIsDragging": "styles_DropZone--userIsDragging",
30038
+ "DropZone--draggingOverArea": "styles_DropZone--draggingOverArea",
30039
+ "DropZone--draggingNewComponent": "styles_DropZone--draggingNewComponent",
30040
+ "DropZone--isAreaSelected": "styles_DropZone--isAreaSelected",
30041
+ "DropZone--hoveringOverArea": "styles_DropZone--hoveringOverArea",
30042
+ "DropZone--isDisabled": "styles_DropZone--isDisabled",
30043
+ "DropZone--isRootZone": "styles_DropZone--isRootZone",
30044
+ "DropZone--hasChildren": "styles_DropZone--hasChildren",
30045
+ "DropZone--isDestination": "styles_DropZone--isDestination",
30046
+ "DropZone-item": "styles_DropZone-item",
30047
+ "DropZone-hitbox": "styles_DropZone-hitbox"
29784
30048
  };
29785
30049
 
29786
- // css-module:/home/runner/work/puck/puck/packages/core/components/DropZone/styles.module.css#css-module
29787
- init_react_import();
29788
- var styles_module_default4 = { "DropZone": "_DropZone_utidm_1", "DropZone--zoomEnabled": "_DropZone--zoomEnabled_utidm_10", "DropZone-renderWrapper": "_DropZone-renderWrapper_utidm_14", "DropZone-content": "_DropZone-content_utidm_18", "DropZone--userIsDragging": "_DropZone--userIsDragging_utidm_23", "DropZone--draggingOverArea": "_DropZone--draggingOverArea_utidm_27", "DropZone--draggingNewComponent": "_DropZone--draggingNewComponent_utidm_28", "DropZone--isAreaSelected": "_DropZone--isAreaSelected_utidm_34", "DropZone--hoveringOverArea": "_DropZone--hoveringOverArea_utidm_35", "DropZone--isDisabled": "_DropZone--isDisabled_utidm_36", "DropZone--isRootZone": "_DropZone--isRootZone_utidm_37", "DropZone--hasChildren": "_DropZone--hasChildren_utidm_43", "DropZone--isDestination": "_DropZone--isDestination_utidm_48", "DropZone-item": "_DropZone-item_utidm_56", "DropZone-hitbox": "_DropZone-hitbox_utidm_60" };
29789
-
29790
30050
  // components/DropZone/context.tsx
29791
30051
  init_react_import();
29792
- var import_react7 = require("react");
30052
+ var import_react8 = require("react");
29793
30053
  var import_use_debounce = require("use-debounce");
29794
30054
 
29795
30055
  // lib/get-zone-id.ts
@@ -29805,30 +30065,30 @@ var getZoneId = (zoneCompound) => {
29805
30065
  };
29806
30066
 
29807
30067
  // components/DropZone/context.tsx
29808
- var import_jsx_runtime6 = require("react/jsx-runtime");
29809
- var dropZoneContext = (0, import_react7.createContext)(null);
30068
+ var import_jsx_runtime8 = require("react/jsx-runtime");
30069
+ var dropZoneContext = (0, import_react8.createContext)(null);
29810
30070
  var DropZoneProvider = ({
29811
30071
  children,
29812
30072
  value
29813
30073
  }) => {
29814
- const [hoveringArea, setHoveringArea] = (0, import_react7.useState)(null);
29815
- const [hoveringZone, setHoveringZone] = (0, import_react7.useState)(
30074
+ const [hoveringArea, setHoveringArea] = (0, import_react8.useState)(null);
30075
+ const [hoveringZone, setHoveringZone] = (0, import_react8.useState)(
29816
30076
  rootDroppableId
29817
30077
  );
29818
- const [hoveringComponent, setHoveringComponent] = (0, import_react7.useState)();
30078
+ const [hoveringComponent, setHoveringComponent] = (0, import_react8.useState)();
29819
30079
  const [hoveringAreaDb] = (0, import_use_debounce.useDebounce)(hoveringArea, 75, { leading: false });
29820
- const [areasWithZones, setAreasWithZones] = (0, import_react7.useState)(
30080
+ const [areasWithZones, setAreasWithZones] = (0, import_react8.useState)(
29821
30081
  {}
29822
30082
  );
29823
- const [activeZones, setActiveZones] = (0, import_react7.useState)({});
30083
+ const [activeZones, setActiveZones] = (0, import_react8.useState)({});
29824
30084
  const { dispatch = null } = value ? value : {};
29825
- const registerZoneArea = (0, import_react7.useCallback)(
30085
+ const registerZoneArea = (0, import_react8.useCallback)(
29826
30086
  (area) => {
29827
30087
  setAreasWithZones((latest) => __spreadProps(__spreadValues({}, latest), { [area]: true }));
29828
30088
  },
29829
30089
  [setAreasWithZones]
29830
30090
  );
29831
- const registerZone = (0, import_react7.useCallback)(
30091
+ const registerZone = (0, import_react8.useCallback)(
29832
30092
  (zoneCompound) => {
29833
30093
  if (!dispatch) {
29834
30094
  return;
@@ -29841,7 +30101,7 @@ var DropZoneProvider = ({
29841
30101
  },
29842
30102
  [setActiveZones, dispatch]
29843
30103
  );
29844
- const unregisterZone = (0, import_react7.useCallback)(
30104
+ const unregisterZone = (0, import_react8.useCallback)(
29845
30105
  (zoneCompound) => {
29846
30106
  if (!dispatch) {
29847
30107
  return;
@@ -29856,8 +30116,8 @@ var DropZoneProvider = ({
29856
30116
  },
29857
30117
  [setActiveZones, dispatch]
29858
30118
  );
29859
- const [pathData, setPathData] = (0, import_react7.useState)();
29860
- const registerPath = (0, import_react7.useCallback)(
30119
+ const [pathData, setPathData] = (0, import_react8.useState)();
30120
+ const registerPath = (0, import_react8.useCallback)(
29861
30121
  (selector) => {
29862
30122
  if (!(value == null ? void 0 : value.data)) {
29863
30123
  return;
@@ -29882,7 +30142,8 @@ var DropZoneProvider = ({
29882
30142
  },
29883
30143
  [value, setPathData]
29884
30144
  );
29885
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: value && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
30145
+ const [zoneWillDrag, setZoneWillDrag] = (0, import_react8.useState)("");
30146
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, { children: value && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
29886
30147
  dropZoneContext.Provider,
29887
30148
  {
29888
30149
  value: __spreadValues({
@@ -29898,58 +30159,18 @@ var DropZoneProvider = ({
29898
30159
  unregisterZone,
29899
30160
  activeZones,
29900
30161
  registerPath,
29901
- pathData
30162
+ pathData,
30163
+ zoneWillDrag,
30164
+ setZoneWillDrag
29902
30165
  }, value),
29903
30166
  children
29904
30167
  }
29905
30168
  ) });
29906
30169
  };
29907
30170
 
29908
- // components/Puck/context.tsx
29909
- init_react_import();
29910
- var import_react8 = require("react");
29911
- var defaultAppState = {
29912
- data: { content: [], root: { props: { title: "" } } },
29913
- ui: {
29914
- leftSideBarVisible: true,
29915
- rightSideBarVisible: true,
29916
- arrayState: {},
29917
- itemSelector: null,
29918
- componentList: {},
29919
- isDragging: false
29920
- }
29921
- };
29922
- var appContext = (0, import_react8.createContext)({
29923
- state: defaultAppState,
29924
- dispatch: () => null,
29925
- config: { components: {} },
29926
- componentState: {},
29927
- resolveData: () => {
29928
- },
29929
- plugins: [],
29930
- overrides: {},
29931
- history: {}
29932
- });
29933
- var AppProvider = appContext.Provider;
29934
- function useAppContext() {
29935
- const mainContext = (0, import_react8.useContext)(appContext);
29936
- const selectedItem = mainContext.state.ui.itemSelector ? getItem(mainContext.state.ui.itemSelector, mainContext.state.data) : void 0;
29937
- return __spreadProps(__spreadValues({}, mainContext), {
29938
- // Helpers
29939
- selectedItem,
29940
- setUi: (ui, recordHistory) => {
29941
- return mainContext.dispatch({
29942
- type: "setUi",
29943
- ui,
29944
- recordHistory
29945
- });
29946
- }
29947
- });
29948
- }
29949
-
29950
30171
  // components/DropZone/index.tsx
29951
- var import_jsx_runtime7 = require("react/jsx-runtime");
29952
- var getClassName5 = get_class_name_factory_default("DropZone", styles_module_default4);
30172
+ var import_jsx_runtime9 = require("react/jsx-runtime");
30173
+ var getClassName5 = get_class_name_factory_default("DropZone", styles_default4);
29953
30174
  function DropZoneEdit({ zone, allow, disallow, style }) {
29954
30175
  var _a;
29955
30176
  const appContext2 = useAppContext();
@@ -29967,7 +30188,8 @@ function DropZoneEdit({ zone, allow, disallow, style }) {
29967
30188
  registerZoneArea,
29968
30189
  areasWithZones,
29969
30190
  hoveringComponent,
29970
- disableZoom = false
30191
+ zoneWillDrag,
30192
+ setZoneWillDrag = () => null
29971
30193
  } = ctx || {};
29972
30194
  let content = data.content || [];
29973
30195
  let zoneCompound = rootDroppableId;
@@ -29997,12 +30219,12 @@ function DropZoneEdit({ zone, allow, disallow, style }) {
29997
30219
  const draggedDestinationId = draggedItem && ((_a = draggedItem.destination) == null ? void 0 : _a.droppableId);
29998
30220
  const [zoneArea] = getZoneId(zoneCompound);
29999
30221
  const [draggedSourceArea] = getZoneId(draggedSourceId);
30000
- const [userWillDrag, setUserWillDrag] = (0, import_react9.useState)(false);
30222
+ const userWillDrag = zoneWillDrag === zone;
30001
30223
  const userIsDragging = !!draggedItem;
30002
30224
  const draggingOverArea = userIsDragging && zoneArea === draggedSourceArea;
30003
30225
  const draggingNewComponent = draggedSourceId == null ? void 0 : draggedSourceId.startsWith("component-list");
30004
30226
  if (!(ctx == null ? void 0 : ctx.config) || !ctx.setHoveringArea || !ctx.setHoveringZone || !ctx.setHoveringComponent || !ctx.setItemSelector || !ctx.registerPath || !ctx.dispatch) {
30005
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children: "DropZone requires context to work." });
30227
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { children: "DropZone requires context to work." });
30006
30228
  }
30007
30229
  const {
30008
30230
  hoveringArea = "root",
@@ -30039,7 +30261,7 @@ function DropZoneEdit({ zone, allow, disallow, style }) {
30039
30261
  }
30040
30262
  const selectedItem = itemSelector ? getItem(itemSelector, data) : null;
30041
30263
  const isAreaSelected = selectedItem && zoneArea === selectedItem.props.id;
30042
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
30264
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
30043
30265
  "div",
30044
30266
  {
30045
30267
  className: getClassName5({
@@ -30051,17 +30273,19 @@ function DropZoneEdit({ zone, allow, disallow, style }) {
30051
30273
  isDestination: draggedDestinationId === zoneCompound,
30052
30274
  isDisabled: !isEnabled,
30053
30275
  isAreaSelected,
30054
- hasChildren: content.length > 0,
30055
- zoomEnabled: !disableZoom
30276
+ hasChildren: content.length > 0
30056
30277
  }),
30057
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
30058
- import_dnd4.Droppable,
30278
+ onMouseUp: () => {
30279
+ setZoneWillDrag("");
30280
+ },
30281
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
30282
+ Droppable,
30059
30283
  {
30060
30284
  droppableId: zoneCompound,
30061
30285
  direction: "vertical",
30062
30286
  isDropDisabled: !isEnabled,
30063
30287
  children: (provided, snapshot) => {
30064
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
30288
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
30065
30289
  "div",
30066
30290
  __spreadProps(__spreadValues({}, (provided || { droppableProps: {} }).droppableProps), {
30067
30291
  className: getClassName5("content"),
@@ -30086,23 +30310,23 @@ function DropZoneEdit({ zone, allow, disallow, style }) {
30086
30310
  "draggable-"
30087
30311
  )[1] === componentId;
30088
30312
  const containsZone = areasWithZones ? areasWithZones[componentId] : false;
30089
- const Render2 = config.components[item.type] ? config.components[item.type].render : () => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { padding: 48, textAlign: "center" }, children: [
30313
+ const Render2 = config.components[item.type] ? config.components[item.type].render : () => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: { padding: 48, textAlign: "center" }, children: [
30090
30314
  "No configuration for ",
30091
30315
  item.type
30092
30316
  ] });
30093
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
30317
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
30094
30318
  "div",
30095
30319
  {
30096
30320
  className: getClassName5("item"),
30097
30321
  style: { zIndex: isDragging ? 1 : void 0 },
30098
30322
  children: [
30099
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
30323
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
30100
30324
  DropZoneProvider,
30101
30325
  {
30102
30326
  value: __spreadProps(__spreadValues({}, ctx), {
30103
30327
  areaId: componentId
30104
30328
  }),
30105
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
30329
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
30106
30330
  DraggableComponent,
30107
30331
  {
30108
30332
  label: (_b = config.components[item.type]["label"]) != null ? _b : item.type.toString(),
@@ -30128,11 +30352,7 @@ function DropZoneEdit({ zone, allow, disallow, style }) {
30128
30352
  },
30129
30353
  onMouseDown: (e) => {
30130
30354
  e.stopPropagation();
30131
- setUserWillDrag(true);
30132
- },
30133
- onMouseUp: (e) => {
30134
- e.stopPropagation();
30135
- setUserWillDrag(false);
30355
+ setZoneWillDrag(zone);
30136
30356
  },
30137
30357
  onMouseOver: (e) => {
30138
30358
  e.stopPropagation();
@@ -30173,12 +30393,12 @@ function DropZoneEdit({ zone, allow, disallow, style }) {
30173
30393
  style: {
30174
30394
  pointerEvents: userIsDragging && draggingNewComponent ? "all" : void 0
30175
30395
  },
30176
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: getClassName5("renderWrapper"), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Render2, __spreadValues({}, defaultedProps)) })
30396
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: getClassName5("renderWrapper"), children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Render2, __spreadValues({}, defaultedProps)) })
30177
30397
  }
30178
30398
  )
30179
30399
  }
30180
30400
  ),
30181
- userIsDragging && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
30401
+ userIsDragging && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
30182
30402
  "div",
30183
30403
  {
30184
30404
  className: getClassName5("hitbox"),
@@ -30195,7 +30415,7 @@ function DropZoneEdit({ zone, allow, disallow, style }) {
30195
30415
  );
30196
30416
  }),
30197
30417
  provided == null ? void 0 : provided.placeholder,
30198
- (snapshot == null ? void 0 : snapshot.isDraggingOver) && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
30418
+ (snapshot == null ? void 0 : snapshot.isDraggingOver) && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
30199
30419
  "div",
30200
30420
  {
30201
30421
  "data-puck-placeholder": true,
@@ -30227,14 +30447,14 @@ function DropZoneRender({ zone }) {
30227
30447
  zoneCompound = `${areaId}:${zone}`;
30228
30448
  content = setupZone(data, zoneCompound).zones[zoneCompound];
30229
30449
  }
30230
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: content.map((item) => {
30450
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: content.map((item) => {
30231
30451
  const Component = config.components[item.type];
30232
30452
  if (Component) {
30233
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
30453
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
30234
30454
  DropZoneProvider,
30235
30455
  {
30236
30456
  value: { data, config, areaId: item.props.id },
30237
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
30457
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
30238
30458
  Component.render,
30239
30459
  __spreadProps(__spreadValues({}, item.props), {
30240
30460
  puck: { renderDropZone: DropZone }
@@ -30250,9 +30470,9 @@ function DropZoneRender({ zone }) {
30250
30470
  function DropZone(props) {
30251
30471
  const ctx = (0, import_react9.useContext)(dropZoneContext);
30252
30472
  if ((ctx == null ? void 0 : ctx.mode) === "edit") {
30253
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DropZoneEdit, __spreadValues({}, props));
30473
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DropZoneEdit, __spreadValues({}, props));
30254
30474
  }
30255
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DropZoneRender, __spreadValues({}, props));
30475
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DropZoneRender, __spreadValues({}, props));
30256
30476
  }
30257
30477
 
30258
30478
  // components/IconButton/index.ts
@@ -30262,14 +30482,17 @@ init_react_import();
30262
30482
  init_react_import();
30263
30483
  var import_react10 = require("react");
30264
30484
 
30265
- // css-module:/home/runner/work/puck/puck/packages/core/components/IconButton/IconButton.module.css#css-module
30266
- init_react_import();
30267
- var IconButton_module_default = { "IconButton": "_IconButton_1xqlg_1", "IconButton-title": "_IconButton-title_1xqlg_33" };
30485
+ // components/IconButton/IconButton.module.css
30486
+ var IconButton_default = {
30487
+ IconButton: "IconButton_IconButton",
30488
+ "IconButton--disabled": "IconButton_IconButton--disabled",
30489
+ "IconButton-title": "IconButton_IconButton-title"
30490
+ };
30268
30491
 
30269
30492
  // components/IconButton/IconButton.tsx
30270
30493
  var import_react_spinners3 = require("react-spinners");
30271
- var import_jsx_runtime8 = require("react/jsx-runtime");
30272
- var getClassName6 = get_class_name_factory_default("IconButton", IconButton_module_default);
30494
+ var import_jsx_runtime10 = require("react/jsx-runtime");
30495
+ var getClassName6 = get_class_name_factory_default("IconButton", IconButton_default);
30273
30496
  var IconButton = ({
30274
30497
  children,
30275
30498
  href,
@@ -30284,7 +30507,7 @@ var IconButton = ({
30284
30507
  }) => {
30285
30508
  const [loading, setLoading] = (0, import_react10.useState)(false);
30286
30509
  const ElementType = href ? "a" : "button";
30287
- const el = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
30510
+ const el = /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
30288
30511
  ElementType,
30289
30512
  {
30290
30513
  className: getClassName6({
@@ -30309,11 +30532,11 @@ var IconButton = ({
30309
30532
  href,
30310
30533
  title,
30311
30534
  children: [
30312
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: getClassName6("title"), children: title }),
30535
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: getClassName6("title"), children: title }),
30313
30536
  children,
30314
- loading && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
30537
+ loading && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
30315
30538
  "\xA0\xA0",
30316
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_spinners3.ClipLoader, { "aria-label": "Loading", color: "inherit", size: "14px" })
30539
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_spinners3.ClipLoader, { "aria-label": "Loading", color: "inherit", size: "14px" })
30317
30540
  ] })
30318
30541
  ]
30319
30542
  }
@@ -30323,12 +30546,23 @@ var IconButton = ({
30323
30546
 
30324
30547
  // components/Puck/index.tsx
30325
30548
  init_react_import();
30326
- var import_react26 = require("react");
30327
- var import_dnd7 = require("@hello-pangea/dnd");
30549
+ var import_react28 = require("react");
30328
30550
 
30329
30551
  // lib/use-placeholder-style.ts
30330
30552
  init_react_import();
30331
30553
  var import_react11 = require("react");
30554
+
30555
+ // lib/get-frame.ts
30556
+ init_react_import();
30557
+ var getFrame = () => {
30558
+ let frame = document.querySelector("#preview-frame");
30559
+ if ((frame == null ? void 0 : frame.tagName) === "IFRAME") {
30560
+ frame = frame.contentDocument;
30561
+ }
30562
+ return frame;
30563
+ };
30564
+
30565
+ // lib/use-placeholder-style.ts
30332
30566
  var usePlaceholderStyle = () => {
30333
30567
  const queryAttr = "data-rfd-drag-handle-draggable-id";
30334
30568
  const [placeholderStyle, setPlaceholderStyle] = (0, import_react11.useState)();
@@ -30338,11 +30572,12 @@ var usePlaceholderStyle = () => {
30338
30572
  const destinationIndex = (draggedItem.destination || draggedItem.source).index;
30339
30573
  const droppableId = (draggedItem.destination || draggedItem.source).droppableId;
30340
30574
  const domQuery = `[${queryAttr}='${draggableId}']`;
30341
- const draggedDOM = document.querySelector(domQuery);
30575
+ const frame = getFrame();
30576
+ const draggedDOM = document.querySelector(domQuery) || (frame == null ? void 0 : frame.querySelector(domQuery));
30342
30577
  if (!draggedDOM) {
30343
30578
  return;
30344
30579
  }
30345
- const targetListElement = document.querySelector(
30580
+ const targetListElement = frame == null ? void 0 : frame.querySelector(
30346
30581
  `[data-rfd-droppable-id='${droppableId}']`
30347
30582
  );
30348
30583
  const { clientHeight } = draggedDOM;
@@ -30377,23 +30612,42 @@ var usePlaceholderStyle = () => {
30377
30612
  // components/SidebarSection/index.tsx
30378
30613
  init_react_import();
30379
30614
 
30380
- // css-module:/home/runner/work/puck/puck/packages/core/components/SidebarSection/styles.module.css#css-module
30381
- init_react_import();
30382
- var styles_module_default5 = { "SidebarSection": "_SidebarSection_125qe_1", "SidebarSection-title": "_SidebarSection-title_125qe_12", "SidebarSection--noBorderTop": "_SidebarSection--noBorderTop_125qe_20", "SidebarSection-content": "_SidebarSection-content_125qe_24", "SidebarSection--noPadding": "_SidebarSection--noPadding_125qe_28", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_125qe_41", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_125qe_70", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_125qe_41", "SidebarSection-heading": "_SidebarSection-heading_125qe_82", "SidebarSection-loadingOverlay": "_SidebarSection-loadingOverlay_125qe_86" };
30615
+ // components/SidebarSection/styles.module.css
30616
+ var styles_default5 = {
30617
+ SidebarSection: "styles_SidebarSection",
30618
+ "SidebarSection-title": "styles_SidebarSection-title",
30619
+ "SidebarSection--noBorderTop": "styles_SidebarSection--noBorderTop",
30620
+ "SidebarSection-content": "styles_SidebarSection-content",
30621
+ "SidebarSection--noPadding": "styles_SidebarSection--noPadding",
30622
+ "SidebarSection-breadcrumbLabel": "styles_SidebarSection-breadcrumbLabel",
30623
+ "SidebarSection-breadcrumbs": "styles_SidebarSection-breadcrumbs",
30624
+ "SidebarSection-breadcrumb": "styles_SidebarSection-breadcrumb",
30625
+ "SidebarSection-heading": "styles_SidebarSection-heading",
30626
+ "SidebarSection-loadingOverlay": "styles_SidebarSection-loadingOverlay"
30627
+ };
30383
30628
 
30384
30629
  // components/Heading/index.tsx
30385
30630
  init_react_import();
30386
30631
 
30387
- // css-module:/home/runner/work/puck/puck/packages/core/components/Heading/styles.module.css#css-module
30388
- init_react_import();
30389
- var styles_module_default6 = { "Heading": "_Heading_qxrry_1", "Heading--xxxxl": "_Heading--xxxxl_qxrry_12", "Heading--xxxl": "_Heading--xxxl_qxrry_18", "Heading--xxl": "_Heading--xxl_qxrry_22", "Heading--xl": "_Heading--xl_qxrry_26", "Heading--l": "_Heading--l_qxrry_30", "Heading--m": "_Heading--m_qxrry_34", "Heading--s": "_Heading--s_qxrry_38", "Heading--xs": "_Heading--xs_qxrry_42" };
30632
+ // components/Heading/styles.module.css
30633
+ var styles_default6 = {
30634
+ Heading: "styles_Heading",
30635
+ "Heading--xxxxl": "styles_Heading--xxxxl",
30636
+ "Heading--xxxl": "styles_Heading--xxxl",
30637
+ "Heading--xxl": "styles_Heading--xxl",
30638
+ "Heading--xl": "styles_Heading--xl",
30639
+ "Heading--l": "styles_Heading--l",
30640
+ "Heading--m": "styles_Heading--m",
30641
+ "Heading--s": "styles_Heading--s",
30642
+ "Heading--xs": "styles_Heading--xs"
30643
+ };
30390
30644
 
30391
30645
  // components/Heading/index.tsx
30392
- var import_jsx_runtime9 = require("react/jsx-runtime");
30393
- var getClassName7 = get_class_name_factory_default("Heading", styles_module_default6);
30646
+ var import_jsx_runtime11 = require("react/jsx-runtime");
30647
+ var getClassName7 = get_class_name_factory_default("Heading", styles_default6);
30394
30648
  var Heading = ({ children, rank, size = "m" }) => {
30395
30649
  const Tag = rank ? `h${rank}` : "span";
30396
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
30650
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
30397
30651
  Tag,
30398
30652
  {
30399
30653
  className: getClassName7({
@@ -30472,8 +30726,8 @@ var useBreadcrumbs = (renderCount) => {
30472
30726
 
30473
30727
  // components/SidebarSection/index.tsx
30474
30728
  var import_react_spinners4 = require("react-spinners");
30475
- var import_jsx_runtime10 = require("react/jsx-runtime");
30476
- var getClassName8 = get_class_name_factory_default("SidebarSection", styles_module_default5);
30729
+ var import_jsx_runtime12 = require("react/jsx-runtime");
30730
+ var getClassName8 = get_class_name_factory_default("SidebarSection", styles_default5);
30477
30731
  var SidebarSection = ({
30478
30732
  children,
30479
30733
  title,
@@ -30485,15 +30739,15 @@ var SidebarSection = ({
30485
30739
  }) => {
30486
30740
  const { setUi } = useAppContext();
30487
30741
  const breadcrumbs = useBreadcrumbs(1);
30488
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
30742
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
30489
30743
  "div",
30490
30744
  {
30491
30745
  className: getClassName8({ noBorderTop, noPadding }),
30492
30746
  style: { background },
30493
30747
  children: [
30494
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: getClassName8("title"), children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: getClassName8("breadcrumbs"), children: [
30495
- showBreadcrumbs ? breadcrumbs.map((breadcrumb, i) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: getClassName8("breadcrumb"), children: [
30496
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
30748
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: getClassName8("title"), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: getClassName8("breadcrumbs"), children: [
30749
+ showBreadcrumbs ? breadcrumbs.map((breadcrumb, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: getClassName8("breadcrumb"), children: [
30750
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
30497
30751
  "button",
30498
30752
  {
30499
30753
  className: getClassName8("breadcrumbLabel"),
@@ -30501,12 +30755,12 @@ var SidebarSection = ({
30501
30755
  children: breadcrumb.label
30502
30756
  }
30503
30757
  ),
30504
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ChevronRight, { size: 16 })
30758
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ChevronRight, { size: 16 })
30505
30759
  ] }, i)) : null,
30506
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: getClassName8("heading"), children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Heading, { rank: 2, size: "xs", children: title }) })
30760
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: getClassName8("heading"), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Heading, { rank: 2, size: "xs", children: title }) })
30507
30761
  ] }) }),
30508
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: getClassName8("content"), children }),
30509
- isLoading && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: getClassName8("loadingOverlay"), children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_spinners4.ClipLoader, { "aria-label": "loading" }) })
30762
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: getClassName8("content"), children }),
30763
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: getClassName8("loadingOverlay"), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_spinners4.ClipLoader, { "aria-label": "loading" }) })
30510
30764
  ]
30511
30765
  }
30512
30766
  );
@@ -31083,13 +31337,17 @@ var useResolvedData = (appState, config, dispatch) => {
31083
31337
  // components/MenuBar/index.tsx
31084
31338
  init_react_import();
31085
31339
 
31086
- // css-module:/home/runner/work/puck/puck/packages/core/components/MenuBar/styles.module.css#css-module
31087
- init_react_import();
31088
- var styles_module_default7 = { "MenuBar": "_MenuBar_8pf8c_1", "MenuBar--menuOpen": "_MenuBar--menuOpen_8pf8c_14", "MenuBar-inner": "_MenuBar-inner_8pf8c_29", "MenuBar-history": "_MenuBar-history_8pf8c_45" };
31340
+ // components/MenuBar/styles.module.css
31341
+ var styles_default7 = {
31342
+ MenuBar: "styles_MenuBar",
31343
+ "MenuBar--menuOpen": "styles_MenuBar--menuOpen",
31344
+ "MenuBar-inner": "styles_MenuBar-inner",
31345
+ "MenuBar-history": "styles_MenuBar-history"
31346
+ };
31089
31347
 
31090
31348
  // components/MenuBar/index.tsx
31091
- var import_jsx_runtime11 = require("react/jsx-runtime");
31092
- var getClassName9 = get_class_name_factory_default("MenuBar", styles_module_default7);
31349
+ var import_jsx_runtime13 = require("react/jsx-runtime");
31350
+ var getClassName9 = get_class_name_factory_default("MenuBar", styles_default7);
31093
31351
  var MenuBar = ({
31094
31352
  appState,
31095
31353
  data = { content: [], root: { props: { title: "" } } },
@@ -31103,7 +31361,7 @@ var MenuBar = ({
31103
31361
  history: { back, forward, historyStore }
31104
31362
  } = useAppContext();
31105
31363
  const { hasFuture = false, hasPast = false } = historyStore || {};
31106
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
31364
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
31107
31365
  "div",
31108
31366
  {
31109
31367
  className: getClassName9({ menuOpen }),
@@ -31117,16 +31375,16 @@ var MenuBar = ({
31117
31375
  setMenuOpen(false);
31118
31376
  }
31119
31377
  },
31120
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: getClassName9("inner"), children: [
31121
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: getClassName9("history"), children: [
31122
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(IconButton, { title: "undo", disabled: !hasPast, onClick: back, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
31378
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: getClassName9("inner"), children: [
31379
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: getClassName9("history"), children: [
31380
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconButton, { title: "undo", disabled: !hasPast, onClick: back, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
31123
31381
  ChevronLeft,
31124
31382
  {
31125
31383
  size: 21,
31126
31384
  stroke: hasPast ? "var(--puck-color-black)" : "var(--puck-color-grey-08)"
31127
31385
  }
31128
31386
  ) }),
31129
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(IconButton, { title: "redo", disabled: !hasFuture, onClick: forward, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
31387
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconButton, { title: "redo", disabled: !hasFuture, onClick: forward, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
31130
31388
  ChevronRight,
31131
31389
  {
31132
31390
  size: 21,
@@ -31134,17 +31392,17 @@ var MenuBar = ({
31134
31392
  }
31135
31393
  ) })
31136
31394
  ] }),
31137
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_jsx_runtime11.Fragment, { children: renderHeaderActions && renderHeaderActions({
31395
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jsx_runtime13.Fragment, { children: renderHeaderActions && renderHeaderActions({
31138
31396
  state: appState,
31139
31397
  dispatch
31140
31398
  }) }),
31141
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
31399
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
31142
31400
  Button,
31143
31401
  {
31144
31402
  onClick: () => {
31145
31403
  onPublish && onPublish(data);
31146
31404
  },
31147
- icon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Globe, { size: "14px" }),
31405
+ icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Globe, { size: "14px" }),
31148
31406
  children: "Publish"
31149
31407
  }
31150
31408
  ) })
@@ -31153,9 +31411,24 @@ var MenuBar = ({
31153
31411
  );
31154
31412
  };
31155
31413
 
31156
- // css-module:/home/runner/work/puck/puck/packages/core/components/Puck/styles.module.css#css-module
31157
- init_react_import();
31158
- var styles_module_default8 = { "Puck": "_Puck_1mnww_19", "Puck--leftSideBarVisible": "_Puck--leftSideBarVisible_1mnww_36", "Puck--rightSideBarVisible": "_Puck--rightSideBarVisible_1mnww_42", "Puck-header": "_Puck-header_1mnww_96", "Puck-headerInner": "_Puck-headerInner_1mnww_105", "Puck-headerToggle": "_Puck-headerToggle_1mnww_115", "Puck-rightSideBarToggle": "_Puck-rightSideBarToggle_1mnww_122", "Puck-leftSideBarToggle": "_Puck-leftSideBarToggle_1mnww_123", "Puck-headerTitle": "_Puck-headerTitle_1mnww_127", "Puck-headerPath": "_Puck-headerPath_1mnww_131", "Puck-headerTools": "_Puck-headerTools_1mnww_138", "Puck-menuButton": "_Puck-menuButton_1mnww_144", "Puck--menuOpen": "_Puck--menuOpen_1mnww_149", "Puck-leftSideBar": "_Puck-leftSideBar_1mnww_123", "Puck-frame": "_Puck-frame_1mnww_168", "Puck-root": "_Puck-root_1mnww_176", "Puck-rightSideBar": "_Puck-rightSideBar_1mnww_122" };
31414
+ // components/Puck/styles.module.css
31415
+ var styles_default8 = {
31416
+ Puck: "styles_Puck",
31417
+ "Puck--leftSideBarVisible": "styles_Puck--leftSideBarVisible",
31418
+ "Puck--rightSideBarVisible": "styles_Puck--rightSideBarVisible",
31419
+ "Puck-header": "styles_Puck-header",
31420
+ "Puck-headerInner": "styles_Puck-headerInner",
31421
+ "Puck-headerToggle": "styles_Puck-headerToggle",
31422
+ "Puck-rightSideBarToggle": "styles_Puck-rightSideBarToggle",
31423
+ "Puck-leftSideBarToggle": "styles_Puck-leftSideBarToggle",
31424
+ "Puck-headerTitle": "styles_Puck-headerTitle",
31425
+ "Puck-headerPath": "styles_Puck-headerPath",
31426
+ "Puck-headerTools": "styles_Puck-headerTools",
31427
+ "Puck-menuButton": "styles_Puck-menuButton",
31428
+ "Puck--menuOpen": "styles_Puck--menuOpen",
31429
+ "Puck-leftSideBar": "styles_Puck-leftSideBar",
31430
+ "Puck-rightSideBar": "styles_Puck-rightSideBar"
31431
+ };
31159
31432
 
31160
31433
  // components/Puck/components/Fields/index.tsx
31161
31434
  init_react_import();
@@ -31164,9 +31437,19 @@ var import_react_spinners6 = require("react-spinners");
31164
31437
  // components/InputOrGroup/index.tsx
31165
31438
  init_react_import();
31166
31439
 
31167
- // css-module:/home/runner/work/puck/puck/packages/core/components/InputOrGroup/styles.module.css#css-module
31168
- init_react_import();
31169
- var styles_module_default9 = { "Input": "_Input_1qi5b_1", "Input-label": "_Input-label_1qi5b_26", "Input-labelIcon": "_Input-labelIcon_1qi5b_34", "Input-disabledIcon": "_Input-disabledIcon_1qi5b_41", "Input-input": "_Input-input_1qi5b_46", "Input--readOnly": "_Input--readOnly_1qi5b_90", "Input-radioGroupItems": "_Input-radioGroupItems_1qi5b_101", "Input-radio": "_Input-radio_1qi5b_101", "Input-radioInner": "_Input-radioInner_1qi5b_118", "Input-radioInput": "_Input-radioInput_1qi5b_163" };
31440
+ // components/InputOrGroup/styles.module.css
31441
+ var styles_default9 = {
31442
+ Input: "styles_Input",
31443
+ "Input-label": "styles_Input-label",
31444
+ "Input-labelIcon": "styles_Input-labelIcon",
31445
+ "Input-disabledIcon": "styles_Input-disabledIcon",
31446
+ "Input-input": "styles_Input-input",
31447
+ "Input--readOnly": "styles_Input--readOnly",
31448
+ "Input-radioGroupItems": "styles_Input-radioGroupItems",
31449
+ "Input-radio": "styles_Input-radio",
31450
+ "Input-radioInner": "styles_Input-radioInner",
31451
+ "Input-radioInput": "styles_Input-radioInput"
31452
+ };
31170
31453
 
31171
31454
  // components/InputOrGroup/index.tsx
31172
31455
  var import_react18 = require("react");
@@ -31177,17 +31460,41 @@ init_react_import();
31177
31460
  // components/InputOrGroup/fields/ArrayField/index.tsx
31178
31461
  init_react_import();
31179
31462
 
31180
- // css-module:/home/runner/work/puck/puck/packages/core/components/InputOrGroup/fields/ArrayField/styles.module.css#css-module
31181
- init_react_import();
31182
- var styles_module_default10 = { "ArrayField": "_ArrayField_1txra_5", "ArrayField--isDraggingFrom": "_ArrayField--isDraggingFrom_1txra_13", "ArrayField-addButton": "_ArrayField-addButton_1txra_17", "ArrayField--hasItems": "_ArrayField--hasItems_1txra_32", "ArrayFieldItem": "_ArrayFieldItem_1txra_61", "ArrayFieldItem--isDragging": "_ArrayFieldItem--isDragging_1txra_69", "ArrayFieldItem--isExpanded": "_ArrayFieldItem--isExpanded_1txra_74", "ArrayFieldItem-summary": "_ArrayFieldItem-summary_1txra_84", "ArrayFieldItem--readOnly": "_ArrayFieldItem--readOnly_1txra_108", "ArrayFieldItem-body": "_ArrayFieldItem-body_1txra_142", "ArrayFieldItem-fieldset": "_ArrayFieldItem-fieldset_1txra_150", "ArrayFieldItem-rhs": "_ArrayFieldItem-rhs_1txra_157", "ArrayFieldItem-actions": "_ArrayFieldItem-actions_1txra_163" };
31463
+ // components/InputOrGroup/fields/ArrayField/styles.module.css
31464
+ var styles_default10 = {
31465
+ ArrayField: "styles_ArrayField",
31466
+ "ArrayField--isDraggingFrom": "styles_ArrayField--isDraggingFrom",
31467
+ "ArrayField-addButton": "styles_ArrayField-addButton",
31468
+ "ArrayField--hasItems": "styles_ArrayField--hasItems",
31469
+ ArrayFieldItem: "styles_ArrayFieldItem",
31470
+ "ArrayFieldItem--isDragging": "styles_ArrayFieldItem--isDragging",
31471
+ "ArrayFieldItem--isExpanded": "styles_ArrayFieldItem--isExpanded",
31472
+ "ArrayFieldItem-summary": "styles_ArrayFieldItem-summary",
31473
+ "ArrayField--addDisabled": "styles_ArrayField--addDisabled",
31474
+ "ArrayFieldItem-body": "styles_ArrayFieldItem-body",
31475
+ "ArrayFieldItem-fieldset": "styles_ArrayFieldItem-fieldset",
31476
+ "ArrayFieldItem-rhs": "styles_ArrayFieldItem-rhs",
31477
+ "ArrayFieldItem-actions": "styles_ArrayFieldItem-actions"
31478
+ };
31183
31479
 
31184
31480
  // components/InputOrGroup/fields/ArrayField/index.tsx
31185
- var import_dnd5 = require("@hello-pangea/dnd");
31186
- var import_dnd6 = require("@hello-pangea/dnd");
31187
31481
  var import_react14 = require("react");
31188
- var import_jsx_runtime12 = require("react/jsx-runtime");
31189
- var getClassName10 = get_class_name_factory_default("ArrayField", styles_module_default10);
31190
- var getClassNameItem2 = get_class_name_factory_default("ArrayFieldItem", styles_module_default10);
31482
+
31483
+ // components/DragDropContext/index.tsx
31484
+ init_react_import();
31485
+ var import_dnd4 = require("@measured/dnd");
31486
+ var import_jsx_runtime14 = require("react/jsx-runtime");
31487
+ var DefaultDragDropContext = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jsx_runtime14.Fragment, { children });
31488
+ var DragDropContext = (props) => {
31489
+ const { status } = useAppContext();
31490
+ const El = status !== "LOADING" ? import_dnd4.DragDropContext : DefaultDragDropContext;
31491
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(El, __spreadValues({}, props));
31492
+ };
31493
+
31494
+ // components/InputOrGroup/fields/ArrayField/index.tsx
31495
+ var import_jsx_runtime15 = require("react/jsx-runtime");
31496
+ var getClassName10 = get_class_name_factory_default("ArrayField", styles_default10);
31497
+ var getClassNameItem2 = get_class_name_factory_default("ArrayFieldItem", styles_default10);
31191
31498
  var ArrayField = ({
31192
31499
  field,
31193
31500
  onChange,
@@ -31249,21 +31556,24 @@ var ArrayField = ({
31249
31556
  [arrayState]
31250
31557
  );
31251
31558
  (0, import_react14.useEffect)(() => {
31252
- setUi(mapArrayStateToUi(arrayState));
31559
+ if (arrayState.items.length > 0) {
31560
+ setUi(mapArrayStateToUi(arrayState));
31561
+ }
31253
31562
  }, []);
31254
31563
  const [hovering, setHovering] = (0, import_react14.useState)(false);
31255
31564
  if (field.type !== "array" || !field.arrayFields) {
31256
31565
  return null;
31257
31566
  }
31258
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
31567
+ const addDisabled = field.max !== void 0 && localState.arrayState.items.length >= field.max || readOnly;
31568
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
31259
31569
  FieldLabelInternal,
31260
31570
  {
31261
31571
  label: label || name,
31262
- icon: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(List, { size: 16 }),
31572
+ icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(List, { size: 16 }),
31263
31573
  el: "div",
31264
31574
  readOnly,
31265
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
31266
- import_dnd6.DragDropContext,
31575
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
31576
+ DragDropContext,
31267
31577
  {
31268
31578
  onDragEnd: (event) => {
31269
31579
  var _a, _b;
@@ -31289,14 +31599,15 @@ var ArrayField = ({
31289
31599
  });
31290
31600
  }
31291
31601
  },
31292
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_dnd5.Droppable, { droppableId: "array", isDropDisabled: readOnly, children: (provided, snapshot) => {
31293
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
31602
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Droppable, { droppableId: "array", isDropDisabled: readOnly, children: (provided, snapshot) => {
31603
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
31294
31604
  "div",
31295
31605
  __spreadProps(__spreadValues({}, provided.droppableProps), {
31296
31606
  ref: provided.innerRef,
31297
31607
  className: getClassName10({
31298
31608
  isDraggingFrom: !!snapshot.draggingFromThisWith,
31299
- hasItems: Array.isArray(value) && value.length > 0
31609
+ hasItems: Array.isArray(value) && value.length > 0,
31610
+ addDisabled
31300
31611
  }),
31301
31612
  onMouseOver: (e) => {
31302
31613
  e.stopPropagation();
@@ -31310,7 +31621,7 @@ var ArrayField = ({
31310
31621
  localState.arrayState.items.map((item, i) => {
31311
31622
  const { _arrayId = `${id}-${i}`, _originalIndex = i } = item;
31312
31623
  const data = Array.from(localState.value || [])[i] || {};
31313
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
31624
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
31314
31625
  Draggable,
31315
31626
  {
31316
31627
  id: _arrayId,
@@ -31321,8 +31632,8 @@ var ArrayField = ({
31321
31632
  readOnly
31322
31633
  }),
31323
31634
  isDragDisabled: readOnly || !hovering,
31324
- children: () => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
31325
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
31635
+ children: () => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
31636
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
31326
31637
  "div",
31327
31638
  {
31328
31639
  onClick: () => {
@@ -31343,10 +31654,11 @@ var ArrayField = ({
31343
31654
  className: getClassNameItem2("summary"),
31344
31655
  children: [
31345
31656
  field.getItemSummary ? field.getItemSummary(data, i) : `Item #${_originalIndex}`,
31346
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: getClassNameItem2("rhs"), children: [
31347
- !readOnly && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: getClassNameItem2("actions"), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: getClassNameItem2("action"), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
31657
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: getClassNameItem2("rhs"), children: [
31658
+ !readOnly && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: getClassNameItem2("actions"), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: getClassNameItem2("action"), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
31348
31659
  IconButton,
31349
31660
  {
31661
+ type: "button",
31350
31662
  disabled: field.min !== void 0 && field.min >= localState.arrayState.items.length,
31351
31663
  onClick: (e) => {
31352
31664
  e.stopPropagation();
@@ -31366,20 +31678,20 @@ var ArrayField = ({
31366
31678
  );
31367
31679
  },
31368
31680
  title: "Delete",
31369
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Trash, { size: 16 })
31681
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Trash, { size: 16 })
31370
31682
  }
31371
31683
  ) }) }),
31372
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DragIcon, {}) })
31684
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DragIcon, {}) })
31373
31685
  ] })
31374
31686
  ]
31375
31687
  }
31376
31688
  ),
31377
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: getClassNameItem2("body"), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("fieldset", { className: getClassNameItem2("fieldset"), children: Object.keys(field.arrayFields).map(
31689
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: getClassNameItem2("body"), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("fieldset", { className: getClassNameItem2("fieldset"), children: Object.keys(field.arrayFields).map(
31378
31690
  (fieldName) => {
31379
31691
  const subField = field.arrayFields[fieldName];
31380
31692
  const subFieldName = `${name}[${i}].${fieldName}`;
31381
31693
  const wildcardFieldName = `${name}[*].${fieldName}`;
31382
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
31694
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
31383
31695
  InputOrGroup,
31384
31696
  {
31385
31697
  name: subFieldName,
@@ -31408,11 +31720,11 @@ var ArrayField = ({
31408
31720
  );
31409
31721
  }),
31410
31722
  provided.placeholder,
31411
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
31723
+ !addDisabled && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
31412
31724
  "button",
31413
31725
  {
31726
+ type: "button",
31414
31727
  className: getClassName10("addButton"),
31415
- disabled: field.max !== void 0 && localState.arrayState.items.length >= field.max,
31416
31728
  onClick: () => {
31417
31729
  const existingValue = value || [];
31418
31730
  const newValue = [
@@ -31422,7 +31734,7 @@ var ArrayField = ({
31422
31734
  const newArrayState = regenerateArrayState(newValue);
31423
31735
  onChange(newValue, mapArrayStateToUi(newArrayState));
31424
31736
  },
31425
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Plus, { size: 21 })
31737
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Plus, { size: 21 })
31426
31738
  }
31427
31739
  )
31428
31740
  ]
@@ -31437,8 +31749,8 @@ var ArrayField = ({
31437
31749
 
31438
31750
  // components/InputOrGroup/fields/DefaultField/index.tsx
31439
31751
  init_react_import();
31440
- var import_jsx_runtime13 = require("react/jsx-runtime");
31441
- var getClassName11 = get_class_name_factory_default("Input", styles_module_default9);
31752
+ var import_jsx_runtime16 = require("react/jsx-runtime");
31753
+ var getClassName11 = get_class_name_factory_default("Input", styles_default9);
31442
31754
  var DefaultField = ({
31443
31755
  field,
31444
31756
  onChange,
@@ -31448,16 +31760,16 @@ var DefaultField = ({
31448
31760
  label,
31449
31761
  id
31450
31762
  }) => {
31451
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
31763
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
31452
31764
  FieldLabelInternal,
31453
31765
  {
31454
31766
  label: label || name,
31455
- icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
31456
- field.type === "text" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Type, { size: 16 }),
31457
- field.type === "number" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Hash, { size: 16 })
31767
+ icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
31768
+ field.type === "text" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Type, { size: 16 }),
31769
+ field.type === "number" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Hash, { size: 16 })
31458
31770
  ] }),
31459
31771
  readOnly,
31460
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
31772
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
31461
31773
  "input",
31462
31774
  {
31463
31775
  className: getClassName11("input"),
@@ -31491,22 +31803,52 @@ var import_react17 = require("react");
31491
31803
  init_react_import();
31492
31804
  var import_react16 = require("react");
31493
31805
 
31494
- // css-module:/home/runner/work/puck/puck/packages/core/components/ExternalInput/styles.module.css#css-module
31495
- init_react_import();
31496
- var styles_module_default11 = { "ExternalInput-actions": "_ExternalInput-actions_q3l5a_1", "ExternalInput-button": "_ExternalInput-button_q3l5a_5", "ExternalInput--dataSelected": "_ExternalInput--dataSelected_q3l5a_25", "ExternalInput-detachButton": "_ExternalInput-detachButton_q3l5a_32", "ExternalInputModal": "_ExternalInputModal_q3l5a_74", "ExternalInputModal-grid": "_ExternalInputModal-grid_q3l5a_84", "ExternalInputModal--filtersToggled": "_ExternalInputModal--filtersToggled_q3l5a_95", "ExternalInputModal-filters": "_ExternalInputModal-filters_q3l5a_100", "ExternalInputModal-masthead": "_ExternalInputModal-masthead_q3l5a_119", "ExternalInputModal-tableWrapper": "_ExternalInputModal-tableWrapper_q3l5a_128", "ExternalInputModal-table": "_ExternalInputModal-table_q3l5a_128", "ExternalInputModal-thead": "_ExternalInputModal-thead_q3l5a_144", "ExternalInputModal-th": "_ExternalInputModal-th_q3l5a_144", "ExternalInputModal-td": "_ExternalInputModal-td_q3l5a_159", "ExternalInputModal-tr": "_ExternalInputModal-tr_q3l5a_164", "ExternalInputModal-tbody": "_ExternalInputModal-tbody_q3l5a_171", "ExternalInputModal--hasData": "_ExternalInputModal--hasData_q3l5a_197", "ExternalInputModal-loadingBanner": "_ExternalInputModal-loadingBanner_q3l5a_201", "ExternalInputModal--isLoading": "_ExternalInputModal--isLoading_q3l5a_218", "ExternalInputModal-searchForm": "_ExternalInputModal-searchForm_q3l5a_222", "ExternalInputModal-search": "_ExternalInputModal-search_q3l5a_222", "ExternalInputModal-searchIcon": "_ExternalInputModal-searchIcon_q3l5a_259", "ExternalInputModal-searchIconText": "_ExternalInputModal-searchIconText_q3l5a_284", "ExternalInputModal-searchInput": "_ExternalInputModal-searchInput_q3l5a_294", "ExternalInputModal-searchActions": "_ExternalInputModal-searchActions_q3l5a_308", "ExternalInputModal-searchActionIcon": "_ExternalInputModal-searchActionIcon_q3l5a_321", "ExternalInputModal-footer": "_ExternalInputModal-footer_q3l5a_325" };
31806
+ // components/ExternalInput/styles.module.css
31807
+ var styles_default11 = {
31808
+ "ExternalInput-actions": "styles_ExternalInput-actions",
31809
+ "ExternalInput-button": "styles_ExternalInput-button",
31810
+ "ExternalInput--dataSelected": "styles_ExternalInput--dataSelected",
31811
+ "ExternalInput-detachButton": "styles_ExternalInput-detachButton",
31812
+ ExternalInputModal: "styles_ExternalInputModal",
31813
+ "ExternalInputModal-grid": "styles_ExternalInputModal-grid",
31814
+ "ExternalInputModal--filtersToggled": "styles_ExternalInputModal--filtersToggled",
31815
+ "ExternalInputModal-filters": "styles_ExternalInputModal-filters",
31816
+ "ExternalInputModal-masthead": "styles_ExternalInputModal-masthead",
31817
+ "ExternalInputModal-tableWrapper": "styles_ExternalInputModal-tableWrapper",
31818
+ "ExternalInputModal-table": "styles_ExternalInputModal-table",
31819
+ "ExternalInputModal-thead": "styles_ExternalInputModal-thead",
31820
+ "ExternalInputModal-th": "styles_ExternalInputModal-th",
31821
+ "ExternalInputModal-td": "styles_ExternalInputModal-td",
31822
+ "ExternalInputModal-tr": "styles_ExternalInputModal-tr",
31823
+ "ExternalInputModal-tbody": "styles_ExternalInputModal-tbody",
31824
+ "ExternalInputModal--hasData": "styles_ExternalInputModal--hasData",
31825
+ "ExternalInputModal-loadingBanner": "styles_ExternalInputModal-loadingBanner",
31826
+ "ExternalInputModal--isLoading": "styles_ExternalInputModal--isLoading",
31827
+ "ExternalInputModal-searchForm": "styles_ExternalInputModal-searchForm",
31828
+ "ExternalInputModal-search": "styles_ExternalInputModal-search",
31829
+ "ExternalInputModal-searchIcon": "styles_ExternalInputModal-searchIcon",
31830
+ "ExternalInputModal-searchIconText": "styles_ExternalInputModal-searchIconText",
31831
+ "ExternalInputModal-searchInput": "styles_ExternalInputModal-searchInput",
31832
+ "ExternalInputModal-searchActions": "styles_ExternalInputModal-searchActions",
31833
+ "ExternalInputModal-searchActionIcon": "styles_ExternalInputModal-searchActionIcon",
31834
+ "ExternalInputModal-footer": "styles_ExternalInputModal-footer"
31835
+ };
31497
31836
 
31498
31837
  // components/Modal/index.tsx
31499
31838
  init_react_import();
31500
31839
  var import_react15 = require("react");
31501
31840
 
31502
- // css-module:/home/runner/work/puck/puck/packages/core/components/Modal/styles.module.css#css-module
31503
- init_react_import();
31504
- var styles_module_default12 = { "Modal": "_Modal_zud0i_1", "Modal--isOpen": "_Modal--isOpen_zud0i_15", "Modal-inner": "_Modal-inner_zud0i_19" };
31841
+ // components/Modal/styles.module.css
31842
+ var styles_default12 = {
31843
+ Modal: "styles_Modal",
31844
+ "Modal--isOpen": "styles_Modal--isOpen",
31845
+ "Modal-inner": "styles_Modal-inner"
31846
+ };
31505
31847
 
31506
31848
  // components/Modal/index.tsx
31507
31849
  var import_react_dom = __toESM(require_react_dom());
31508
- var import_jsx_runtime14 = require("react/jsx-runtime");
31509
- var getClassName12 = get_class_name_factory_default("Modal", styles_module_default12);
31850
+ var import_jsx_runtime17 = require("react/jsx-runtime");
31851
+ var getClassName12 = get_class_name_factory_default("Modal", styles_default12);
31510
31852
  var Modal = ({
31511
31853
  children,
31512
31854
  onClose,
@@ -31517,10 +31859,10 @@ var Modal = ({
31517
31859
  setRootEl(document.getElementById("puck-portal-root"));
31518
31860
  }, []);
31519
31861
  if (!rootEl) {
31520
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", {});
31862
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", {});
31521
31863
  }
31522
31864
  return (0, import_react_dom.createPortal)(
31523
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: getClassName12({ isOpen }), onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
31865
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: getClassName12({ isOpen }), onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
31524
31866
  "div",
31525
31867
  {
31526
31868
  className: getClassName12("inner"),
@@ -31534,9 +31876,9 @@ var Modal = ({
31534
31876
 
31535
31877
  // components/ExternalInput/index.tsx
31536
31878
  var import_react_spinners5 = require("react-spinners");
31537
- var import_jsx_runtime15 = require("react/jsx-runtime");
31538
- var getClassName13 = get_class_name_factory_default("ExternalInput", styles_module_default11);
31539
- var getClassNameModal = get_class_name_factory_default("ExternalInputModal", styles_module_default11);
31879
+ var import_jsx_runtime18 = require("react/jsx-runtime");
31880
+ var getClassName13 = get_class_name_factory_default("ExternalInput", styles_default11);
31881
+ var getClassNameModal = get_class_name_factory_default("ExternalInputModal", styles_default11);
31540
31882
  var dataCache = {};
31541
31883
  var ExternalInput = ({
31542
31884
  field,
@@ -31574,7 +31916,7 @@ var ExternalInput = ({
31574
31916
  const search = (0, import_react16.useCallback)(
31575
31917
  (query, filters2) => __async(void 0, null, function* () {
31576
31918
  setIsLoading(true);
31577
- const cacheKey = `${id}-${name}-${query}-${JSON.stringify(filters2)}`;
31919
+ const cacheKey = `${id}-${query}-${JSON.stringify(filters2)}`;
31578
31920
  const listData = dataCache[cacheKey] || (yield field.fetchList({ query, filters: filters2 }));
31579
31921
  if (listData) {
31580
31922
  setData(listData);
@@ -31587,7 +31929,7 @@ var ExternalInput = ({
31587
31929
  (0, import_react16.useEffect)(() => {
31588
31930
  search(searchQuery, filters);
31589
31931
  }, []);
31590
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
31932
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
31591
31933
  "div",
31592
31934
  {
31593
31935
  className: getClassName13({
@@ -31596,30 +31938,31 @@ var ExternalInput = ({
31596
31938
  }),
31597
31939
  id,
31598
31940
  children: [
31599
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: getClassName13("actions"), children: [
31600
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
31941
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: getClassName13("actions"), children: [
31942
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
31601
31943
  "button",
31602
31944
  {
31945
+ type: "button",
31603
31946
  onClick: () => setOpen(true),
31604
31947
  className: getClassName13("button"),
31605
- children: value ? field.getItemSummary ? field.getItemSummary(value) : "External item" : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
31606
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Link, { size: "16" }),
31607
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: field.placeholder })
31948
+ children: value ? field.getItemSummary ? field.getItemSummary(value) : "External item" : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
31949
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Link, { size: "16" }),
31950
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: field.placeholder })
31608
31951
  ] })
31609
31952
  }
31610
31953
  ),
31611
- value && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
31954
+ value && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
31612
31955
  "button",
31613
31956
  {
31614
31957
  className: getClassName13("detachButton"),
31615
31958
  onClick: () => {
31616
31959
  onChange(null);
31617
31960
  },
31618
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Unlock, { size: 16 })
31961
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Unlock, { size: 16 })
31619
31962
  }
31620
31963
  )
31621
31964
  ] }),
31622
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Modal, { onClose: () => setOpen(false), isOpen, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
31965
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Modal, { onClose: () => setOpen(false), isOpen, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
31623
31966
  "form",
31624
31967
  {
31625
31968
  className: getClassNameModal({
@@ -31633,11 +31976,11 @@ var ExternalInput = ({
31633
31976
  search(searchQuery, filters);
31634
31977
  },
31635
31978
  children: [
31636
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: getClassNameModal("masthead"), children: field.showSearch ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: getClassNameModal("searchForm"), children: [
31637
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { className: getClassNameModal("search"), children: [
31638
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: getClassNameModal("searchIconText"), children: "Search" }),
31639
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: getClassNameModal("searchIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Search, { size: "18" }) }),
31640
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
31979
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: getClassNameModal("masthead"), children: field.showSearch ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: getClassNameModal("searchForm"), children: [
31980
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: getClassNameModal("search"), children: [
31981
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: getClassNameModal("searchIconText"), children: "Search" }),
31982
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: getClassNameModal("searchIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Search, { size: "18" }) }),
31983
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
31641
31984
  "input",
31642
31985
  {
31643
31986
  className: getClassNameModal("searchInput"),
@@ -31652,9 +31995,9 @@ var ExternalInput = ({
31652
31995
  }
31653
31996
  )
31654
31997
  ] }),
31655
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: getClassNameModal("searchActions"), children: [
31656
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Button, { type: "submit", loading: isLoading, fullWidth: true, children: "Search" }),
31657
- hasFilterFields && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: getClassNameModal("searchActionIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
31998
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: getClassNameModal("searchActions"), children: [
31999
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { type: "submit", loading: isLoading, fullWidth: true, children: "Search" }),
32000
+ hasFilterFields && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: getClassNameModal("searchActionIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
31658
32001
  IconButton,
31659
32002
  {
31660
32003
  title: "Toggle filters",
@@ -31663,15 +32006,15 @@ var ExternalInput = ({
31663
32006
  e.stopPropagation();
31664
32007
  setFiltersToggled(!filtersToggled);
31665
32008
  },
31666
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SlidersHorizontal, { size: 20 })
32009
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SlidersHorizontal, { size: 20 })
31667
32010
  }
31668
32011
  ) })
31669
32012
  ] })
31670
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Heading, { rank: 2, size: "xs", children: field.placeholder || "Select data" }) }),
31671
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: getClassNameModal("grid"), children: [
31672
- hasFilterFields && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: getClassNameModal("filters"), children: hasFilterFields && Object.keys(filterFields).map((fieldName) => {
32013
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Heading, { rank: 2, size: "xs", children: field.placeholder || "Select data" }) }),
32014
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: getClassNameModal("grid"), children: [
32015
+ hasFilterFields && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: getClassNameModal("filters"), children: hasFilterFields && Object.keys(filterFields).map((fieldName) => {
31673
32016
  const filterField = filterFields[fieldName];
31674
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
32017
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
31675
32018
  InputOrGroup,
31676
32019
  {
31677
32020
  field: filterField,
@@ -31688,9 +32031,9 @@ var ExternalInput = ({
31688
32031
  fieldName
31689
32032
  );
31690
32033
  }) }),
31691
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: getClassNameModal("tableWrapper"), children: [
31692
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("table", { className: getClassNameModal("table"), children: [
31693
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("thead", { className: getClassNameModal("thead"), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tr", { className: getClassNameModal("tr"), children: keys.map((key) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
32034
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: getClassNameModal("tableWrapper"), children: [
32035
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("table", { className: getClassNameModal("table"), children: [
32036
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("thead", { className: getClassNameModal("thead"), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tr", { className: getClassNameModal("tr"), children: keys.map((key) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
31694
32037
  "th",
31695
32038
  {
31696
32039
  className: getClassNameModal("th"),
@@ -31699,8 +32042,8 @@ var ExternalInput = ({
31699
32042
  },
31700
32043
  key
31701
32044
  )) }) }),
31702
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tbody", { className: getClassNameModal("tbody"), children: mappedData.map((item, i) => {
31703
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
32045
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tbody", { className: getClassNameModal("tbody"), children: mappedData.map((item, i) => {
32046
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
31704
32047
  "tr",
31705
32048
  {
31706
32049
  style: { whiteSpace: "nowrap" },
@@ -31709,16 +32052,16 @@ var ExternalInput = ({
31709
32052
  onChange(mapProp(data[i]));
31710
32053
  setOpen(false);
31711
32054
  },
31712
- children: keys.map((key) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { className: getClassNameModal("td"), children: item[key] }, key))
32055
+ children: keys.map((key) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("td", { className: getClassNameModal("td"), children: item[key] }, key))
31713
32056
  },
31714
32057
  i
31715
32058
  );
31716
32059
  }) })
31717
32060
  ] }),
31718
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: getClassNameModal("loadingBanner"), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_spinners5.ClipLoader, { size: 24, "aria-label": "Loading" }) })
32061
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: getClassNameModal("loadingBanner"), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_spinners5.ClipLoader, { size: 24, "aria-label": "Loading" }) })
31719
32062
  ] })
31720
32063
  ] }),
31721
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: getClassNameModal("footer"), children: [
32064
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: getClassNameModal("footer"), children: [
31722
32065
  mappedData.length,
31723
32066
  " result",
31724
32067
  mappedData.length === 1 ? "" : "s"
@@ -31732,7 +32075,7 @@ var ExternalInput = ({
31732
32075
  };
31733
32076
 
31734
32077
  // components/InputOrGroup/fields/ExternalField/index.tsx
31735
- var import_jsx_runtime16 = require("react/jsx-runtime");
32078
+ var import_jsx_runtime19 = require("react/jsx-runtime");
31736
32079
  var ExternalField = ({
31737
32080
  field,
31738
32081
  onChange,
@@ -31754,13 +32097,13 @@ var ExternalField = ({
31754
32097
  if (field.type !== "external") {
31755
32098
  return null;
31756
32099
  }
31757
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
32100
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
31758
32101
  FieldLabelInternal,
31759
32102
  {
31760
32103
  label: label || name,
31761
- icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Link, { size: 16 }),
32104
+ icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Link, { size: 16 }),
31762
32105
  el: "div",
31763
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
32106
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
31764
32107
  ExternalInput,
31765
32108
  {
31766
32109
  name,
@@ -31786,8 +32129,8 @@ var ExternalField = ({
31786
32129
 
31787
32130
  // components/InputOrGroup/fields/RadioField/index.tsx
31788
32131
  init_react_import();
31789
- var import_jsx_runtime17 = require("react/jsx-runtime");
31790
- var getClassName14 = get_class_name_factory_default("Input", styles_module_default9);
32132
+ var import_jsx_runtime20 = require("react/jsx-runtime");
32133
+ var getClassName14 = get_class_name_factory_default("Input", styles_default9);
31791
32134
  var RadioField = ({
31792
32135
  field,
31793
32136
  onChange,
@@ -31800,19 +32143,19 @@ var RadioField = ({
31800
32143
  if (field.type !== "radio" || !field.options) {
31801
32144
  return null;
31802
32145
  }
31803
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
32146
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
31804
32147
  FieldLabelInternal,
31805
32148
  {
31806
- icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CheckCircle, { size: 16 }),
32149
+ icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CheckCircle, { size: 16 }),
31807
32150
  label: label || name,
31808
32151
  readOnly,
31809
32152
  el: "div",
31810
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: getClassName14("radioGroupItems"), id, children: field.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
32153
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: getClassName14("radioGroupItems"), id, children: field.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
31811
32154
  "label",
31812
32155
  {
31813
32156
  className: getClassName14("radio"),
31814
32157
  children: [
31815
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
32158
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
31816
32159
  "input",
31817
32160
  {
31818
32161
  type: "radio",
@@ -31830,7 +32173,7 @@ var RadioField = ({
31830
32173
  defaultChecked: value === option.value
31831
32174
  }
31832
32175
  ),
31833
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: getClassName14("radioInner"), children: option.label || option.value })
32176
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: getClassName14("radioInner"), children: option.label || option.value })
31834
32177
  ]
31835
32178
  },
31836
32179
  option.label + option.value
@@ -31841,8 +32184,8 @@ var RadioField = ({
31841
32184
 
31842
32185
  // components/InputOrGroup/fields/SelectField/index.tsx
31843
32186
  init_react_import();
31844
- var import_jsx_runtime18 = require("react/jsx-runtime");
31845
- var getClassName15 = get_class_name_factory_default("Input", styles_module_default9);
32187
+ var import_jsx_runtime21 = require("react/jsx-runtime");
32188
+ var getClassName15 = get_class_name_factory_default("Input", styles_default9);
31846
32189
  var SelectField = ({
31847
32190
  field,
31848
32191
  onChange,
@@ -31855,13 +32198,13 @@ var SelectField = ({
31855
32198
  if (field.type !== "select" || !field.options) {
31856
32199
  return null;
31857
32200
  }
31858
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
32201
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
31859
32202
  FieldLabelInternal,
31860
32203
  {
31861
32204
  label: label || name,
31862
- icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChevronDown, { size: 16 }),
32205
+ icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ChevronDown, { size: 16 }),
31863
32206
  readOnly,
31864
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
32207
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
31865
32208
  "select",
31866
32209
  {
31867
32210
  id,
@@ -31875,7 +32218,7 @@ var SelectField = ({
31875
32218
  onChange(e.currentTarget.value);
31876
32219
  },
31877
32220
  value,
31878
- children: field.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
32221
+ children: field.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
31879
32222
  "option",
31880
32223
  {
31881
32224
  label: option.label,
@@ -31891,8 +32234,8 @@ var SelectField = ({
31891
32234
 
31892
32235
  // components/InputOrGroup/fields/TextareaField/index.tsx
31893
32236
  init_react_import();
31894
- var import_jsx_runtime19 = require("react/jsx-runtime");
31895
- var getClassName16 = get_class_name_factory_default("Input", styles_module_default9);
32237
+ var import_jsx_runtime22 = require("react/jsx-runtime");
32238
+ var getClassName16 = get_class_name_factory_default("Input", styles_default9);
31896
32239
  var TextareaField = ({
31897
32240
  onChange,
31898
32241
  readOnly,
@@ -31901,13 +32244,13 @@ var TextareaField = ({
31901
32244
  label,
31902
32245
  id
31903
32246
  }) => {
31904
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
32247
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
31905
32248
  FieldLabelInternal,
31906
32249
  {
31907
32250
  label: label || name,
31908
- icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Type, { size: 16 }),
32251
+ icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Type, { size: 16 }),
31909
32252
  readOnly,
31910
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
32253
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
31911
32254
  "textarea",
31912
32255
  {
31913
32256
  id,
@@ -31931,14 +32274,16 @@ var import_use_debounce2 = require("use-debounce");
31931
32274
  // components/InputOrGroup/fields/ObjectField/index.tsx
31932
32275
  init_react_import();
31933
32276
 
31934
- // css-module:/home/runner/work/puck/puck/packages/core/components/InputOrGroup/fields/ObjectField/styles.module.css#css-module
31935
- init_react_import();
31936
- var styles_module_default13 = { "ObjectField": "_ObjectField_15j63_5", "ObjectField-fieldset": "_ObjectField-fieldset_15j63_13" };
32277
+ // components/InputOrGroup/fields/ObjectField/styles.module.css
32278
+ var styles_default13 = {
32279
+ ObjectField: "styles_ObjectField",
32280
+ "ObjectField-fieldset": "styles_ObjectField-fieldset"
32281
+ };
31937
32282
 
31938
32283
  // components/InputOrGroup/fields/ObjectField/index.tsx
31939
- var import_jsx_runtime20 = require("react/jsx-runtime");
31940
- var getClassName17 = get_class_name_factory_default("ObjectField", styles_module_default13);
31941
- var getClassNameItem3 = get_class_name_factory_default("ObjectFieldItem", styles_module_default13);
32284
+ var import_jsx_runtime23 = require("react/jsx-runtime");
32285
+ var getClassName17 = get_class_name_factory_default("ObjectField", styles_default13);
32286
+ var getClassNameItem3 = get_class_name_factory_default("ObjectFieldItem", styles_default13);
31942
32287
  var ObjectField = ({
31943
32288
  field,
31944
32289
  onChange,
@@ -31953,18 +32298,18 @@ var ObjectField = ({
31953
32298
  return null;
31954
32299
  }
31955
32300
  const data = value || {};
31956
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
32301
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
31957
32302
  FieldLabelInternal,
31958
32303
  {
31959
32304
  label: label || name,
31960
- icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MoreVertical, { size: 16 }),
32305
+ icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(MoreVertical, { size: 16 }),
31961
32306
  el: "div",
31962
32307
  readOnly,
31963
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: getClassName17(), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("fieldset", { className: getClassName17("fieldset"), children: Object.keys(field.objectFields).map((fieldName) => {
32308
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: getClassName17(), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("fieldset", { className: getClassName17("fieldset"), children: Object.keys(field.objectFields).map((fieldName) => {
31964
32309
  const subField = field.objectFields[fieldName];
31965
32310
  const subFieldName = `${name}.${fieldName}`;
31966
32311
  const wildcardFieldName = `${name}.${fieldName}`;
31967
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
32312
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
31968
32313
  InputOrGroup,
31969
32314
  {
31970
32315
  name: subFieldName,
@@ -31991,8 +32336,8 @@ var ObjectField = ({
31991
32336
  };
31992
32337
 
31993
32338
  // components/InputOrGroup/index.tsx
31994
- var import_jsx_runtime21 = require("react/jsx-runtime");
31995
- var getClassName18 = get_class_name_factory_default("Input", styles_module_default9);
32339
+ var import_jsx_runtime24 = require("react/jsx-runtime");
32340
+ var getClassName18 = get_class_name_factory_default("Input", styles_default9);
31996
32341
  var FieldLabel = ({
31997
32342
  children,
31998
32343
  icon,
@@ -32002,11 +32347,11 @@ var FieldLabel = ({
32002
32347
  className
32003
32348
  }) => {
32004
32349
  const El = el;
32005
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(El, { className, children: [
32006
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: getClassName18("label"), children: [
32007
- icon ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: getClassName18("labelIcon"), children: icon }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_jsx_runtime21.Fragment, {}),
32350
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(El, { className, children: [
32351
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: getClassName18("label"), children: [
32352
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: getClassName18("labelIcon"), children: icon }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_jsx_runtime24.Fragment, {}),
32008
32353
  label,
32009
- readOnly && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: getClassName18("disabledIcon"), title: "Read-only", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Lock, { size: "12" }) })
32354
+ readOnly && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: getClassName18("disabledIcon"), title: "Read-only", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Lock, { size: "12" }) })
32010
32355
  ] }),
32011
32356
  children
32012
32357
  ] });
@@ -32023,7 +32368,7 @@ var FieldLabelInternal = ({
32023
32368
  () => overrides.fieldLabel || FieldLabel,
32024
32369
  [overrides]
32025
32370
  );
32026
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
32371
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
32027
32372
  Wrapper,
32028
32373
  {
32029
32374
  label,
@@ -32063,7 +32408,7 @@ var InputOrGroup = (_a) => {
32063
32408
  if (!field.render) {
32064
32409
  return null;
32065
32410
  }
32066
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: getClassName18(), children: field.render(__spreadValues({
32411
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: getClassName18(), children: field.render(__spreadValues({
32067
32412
  field,
32068
32413
  name,
32069
32414
  readOnly
@@ -32092,17 +32437,19 @@ var InputOrGroup = (_a) => {
32092
32437
  const mergedProps = __spreadProps(__spreadValues(__spreadValues({}, props), localProps), { field });
32093
32438
  const children = defaultFields[field.type](mergedProps);
32094
32439
  const Render2 = render[field.type];
32095
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Render2, __spreadProps(__spreadValues({}, mergedProps), { children }));
32440
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Render2, __spreadProps(__spreadValues({}, mergedProps), { children }));
32096
32441
  };
32097
32442
 
32098
- // css-module:/home/runner/work/puck/puck/packages/core/components/Puck/components/Fields/styles.module.css#css-module
32099
- init_react_import();
32100
- var styles_module_default14 = { "PuckFields": "_PuckFields_17k3p_1", "PuckFields-loadingOverlay": "_PuckFields-loadingOverlay_17k3p_6" };
32443
+ // components/Puck/components/Fields/styles.module.css
32444
+ var styles_default14 = {
32445
+ PuckFields: "styles_PuckFields",
32446
+ "PuckFields-loadingOverlay": "styles_PuckFields-loadingOverlay"
32447
+ };
32101
32448
 
32102
32449
  // components/Puck/components/Fields/index.tsx
32103
32450
  var import_react19 = require("react");
32104
- var import_jsx_runtime22 = require("react/jsx-runtime");
32105
- var getClassName19 = get_class_name_factory_default("PuckFields", styles_module_default14);
32451
+ var import_jsx_runtime25 = require("react/jsx-runtime");
32452
+ var getClassName19 = get_class_name_factory_default("PuckFields", styles_default14);
32106
32453
  var defaultPageFields = {
32107
32454
  title: { type: "text" }
32108
32455
  };
@@ -32110,9 +32457,9 @@ var DefaultFields = ({
32110
32457
  children,
32111
32458
  isLoading
32112
32459
  }) => {
32113
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: getClassName19(), children: [
32460
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: getClassName19(), children: [
32114
32461
  children,
32115
- isLoading && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: getClassName19("loadingOverlay"), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_spinners6.ClipLoader, { "aria-label": "loading" }) })
32462
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: getClassName19("loadingOverlay"), children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_spinners6.ClipLoader, { "aria-label": "loading" }) })
32116
32463
  ] });
32117
32464
  };
32118
32465
  var Fields = () => {
@@ -32133,14 +32480,14 @@ var Fields = () => {
32133
32480
  const isLoading = selectedItem ? (_c = componentState[selectedItem == null ? void 0 : selectedItem.props.id]) == null ? void 0 : _c.loading : (_d = componentState["puck-root"]) == null ? void 0 : _d.loading;
32134
32481
  const rootProps = data.root.props || data.root;
32135
32482
  const Wrapper = (0, import_react19.useMemo)(() => overrides.fields || DefaultFields, [overrides]);
32136
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
32483
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
32137
32484
  "form",
32138
32485
  {
32139
32486
  className: getClassName19(),
32140
32487
  onSubmit: (e) => {
32141
32488
  e.preventDefault();
32142
32489
  },
32143
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Wrapper, { isLoading, itemSelector, children: Object.keys(fields).map((fieldName) => {
32490
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Wrapper, { isLoading, itemSelector, children: Object.keys(fields).map((fieldName) => {
32144
32491
  const field = fields[fieldName];
32145
32492
  const onChange = (value, updatedUi) => {
32146
32493
  var _a2, _b2;
@@ -32206,7 +32553,7 @@ var Fields = () => {
32206
32553
  };
32207
32554
  if (selectedItem && itemSelector) {
32208
32555
  const { readOnly = {} } = selectedItem;
32209
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
32556
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
32210
32557
  InputOrGroup,
32211
32558
  {
32212
32559
  field,
@@ -32222,7 +32569,7 @@ var Fields = () => {
32222
32569
  );
32223
32570
  } else {
32224
32571
  const { readOnly = {} } = data.root;
32225
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
32572
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
32226
32573
  InputOrGroup,
32227
32574
  {
32228
32575
  field,
@@ -32252,20 +32599,25 @@ var import_react20 = require("react");
32252
32599
  // components/ComponentList/index.tsx
32253
32600
  init_react_import();
32254
32601
 
32255
- // css-module:/home/runner/work/puck/puck/packages/core/components/ComponentList/styles.module.css#css-module
32256
- init_react_import();
32257
- var styles_module_default15 = { "ComponentList": "_ComponentList_odh9d_1", "ComponentList--isExpanded": "_ComponentList--isExpanded_odh9d_5", "ComponentList-content": "_ComponentList-content_odh9d_9", "ComponentList-title": "_ComponentList-title_odh9d_17", "ComponentList-titleIcon": "_ComponentList-titleIcon_odh9d_53" };
32602
+ // components/ComponentList/styles.module.css
32603
+ var styles_default15 = {
32604
+ ComponentList: "styles_ComponentList",
32605
+ "ComponentList--isExpanded": "styles_ComponentList--isExpanded",
32606
+ "ComponentList-content": "styles_ComponentList-content",
32607
+ "ComponentList-title": "styles_ComponentList-title",
32608
+ "ComponentList-titleIcon": "styles_ComponentList-titleIcon"
32609
+ };
32258
32610
 
32259
32611
  // components/ComponentList/index.tsx
32260
- var import_jsx_runtime23 = require("react/jsx-runtime");
32261
- var getClassName20 = get_class_name_factory_default("ComponentList", styles_module_default15);
32612
+ var import_jsx_runtime26 = require("react/jsx-runtime");
32613
+ var getClassName20 = get_class_name_factory_default("ComponentList", styles_default15);
32262
32614
  var ComponentListItem = ({
32263
32615
  name,
32264
32616
  label,
32265
32617
  index
32266
32618
  }) => {
32267
32619
  const { overrides } = useAppContext();
32268
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Drawer.Item, { label, name, index, children: overrides.componentItem });
32620
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Drawer.Item, { label, name, index, children: overrides.componentItem });
32269
32621
  };
32270
32622
  var ComponentList = ({
32271
32623
  children,
@@ -32274,8 +32626,8 @@ var ComponentList = ({
32274
32626
  }) => {
32275
32627
  const { config, state, setUi } = useAppContext();
32276
32628
  const { expanded = true } = state.ui.componentList[id] || {};
32277
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: getClassName20({ isExpanded: expanded }), children: [
32278
- title && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
32629
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: getClassName20({ isExpanded: expanded }), children: [
32630
+ title && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
32279
32631
  "button",
32280
32632
  {
32281
32633
  className: getClassName20("title"),
@@ -32288,14 +32640,14 @@ var ComponentList = ({
32288
32640
  }),
32289
32641
  title: expanded ? `Collapse${title ? ` ${title}` : ""}` : `Expand${title ? ` ${title}` : ""}`,
32290
32642
  children: [
32291
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { children: title }),
32292
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: getClassName20("titleIcon"), children: expanded ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChevronUp, { size: 12 }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChevronDown, { size: 12 }) })
32643
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { children: title }),
32644
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: getClassName20("titleIcon"), children: expanded ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChevronUp, { size: 12 }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChevronDown, { size: 12 }) })
32293
32645
  ]
32294
32646
  }
32295
32647
  ),
32296
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: getClassName20("content"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Drawer, { droppableId: `component-list${title ? `:${title}` : ""}`, children: children || Object.keys(config.components).map((componentKey, i) => {
32648
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: getClassName20("content"), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Drawer, { droppableId: `component-list${title ? `:${title}` : ""}`, children: children || Object.keys(config.components).map((componentKey, i) => {
32297
32649
  var _a;
32298
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
32650
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
32299
32651
  ComponentListItem,
32300
32652
  {
32301
32653
  label: (_a = config.components[componentKey]["label"]) != null ? _a : componentKey,
@@ -32310,7 +32662,7 @@ var ComponentList = ({
32310
32662
  ComponentList.Item = ComponentListItem;
32311
32663
 
32312
32664
  // lib/use-component-list.tsx
32313
- var import_jsx_runtime24 = require("react/jsx-runtime");
32665
+ var import_jsx_runtime27 = require("react/jsx-runtime");
32314
32666
  var useComponentList = (config, ui) => {
32315
32667
  const [componentList, setComponentList] = (0, import_react20.useState)();
32316
32668
  (0, import_react20.useEffect)(() => {
@@ -32323,7 +32675,7 @@ var useComponentList = (config, ui) => {
32323
32675
  if (category.visible === false || !category.components) {
32324
32676
  return null;
32325
32677
  }
32326
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
32678
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
32327
32679
  ComponentList,
32328
32680
  {
32329
32681
  id: categoryKey,
@@ -32331,7 +32683,7 @@ var useComponentList = (config, ui) => {
32331
32683
  children: category.components.map((componentName, i) => {
32332
32684
  var _a2;
32333
32685
  matchedComponents.push(componentName);
32334
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
32686
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
32335
32687
  ComponentList.Item,
32336
32688
  {
32337
32689
  label: (_a2 = config.components[componentName]["label"]) != null ? _a2 : componentName,
@@ -32351,14 +32703,14 @@ var useComponentList = (config, ui) => {
32351
32703
  );
32352
32704
  if (remainingComponents.length > 0 && !((_a = ui.componentList.other) == null ? void 0 : _a.components) && ((_b = ui.componentList.other) == null ? void 0 : _b.visible) !== false) {
32353
32705
  _componentList.push(
32354
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
32706
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
32355
32707
  ComponentList,
32356
32708
  {
32357
32709
  id: "other",
32358
32710
  title: ((_c = ui.componentList.other) == null ? void 0 : _c.title) || "Other",
32359
32711
  children: remainingComponents.map((componentName, i) => {
32360
32712
  var _a2;
32361
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
32713
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
32362
32714
  ComponentList.Item,
32363
32715
  {
32364
32716
  name: componentName,
@@ -32381,38 +32733,65 @@ var useComponentList = (config, ui) => {
32381
32733
 
32382
32734
  // components/Puck/components/Components/index.tsx
32383
32735
  var import_react21 = require("react");
32384
- var import_jsx_runtime25 = require("react/jsx-runtime");
32736
+ var import_jsx_runtime28 = require("react/jsx-runtime");
32385
32737
  var Components = () => {
32386
32738
  const { config, state, overrides } = useAppContext();
32387
32739
  const componentList = useComponentList(config, state.ui);
32388
32740
  const Wrapper = (0, import_react21.useMemo)(() => overrides.components || "div", [overrides]);
32389
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Wrapper, { children: componentList ? componentList : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ComponentList, { id: "all" }) });
32741
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Wrapper, { children: componentList ? componentList : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ComponentList, { id: "all" }) });
32390
32742
  };
32391
32743
 
32392
32744
  // components/Puck/components/Preview/index.tsx
32393
32745
  init_react_import();
32394
32746
  var import_react22 = require("react");
32395
- var import_jsx_runtime26 = require("react/jsx-runtime");
32747
+ var import_auto_frame_component = __toESM(require("@measured/auto-frame-component"));
32748
+
32749
+ // components/Puck/components/Preview/styles.module.css
32750
+ var styles_default16 = {
32751
+ PuckPreview: "styles_PuckPreview",
32752
+ "PuckPreview-frame": "styles_PuckPreview-frame"
32753
+ };
32754
+
32755
+ // components/Puck/components/Preview/index.tsx
32756
+ var import_jsx_runtime29 = require("react/jsx-runtime");
32757
+ var getClassName21 = get_class_name_factory_default("PuckPreview", styles_default16);
32396
32758
  var Preview = ({ id = "puck-preview" }) => {
32397
- const { config, dispatch, state } = useAppContext();
32759
+ const { config, dispatch, state, setStatus, iframe } = useAppContext();
32398
32760
  const Page = (0, import_react22.useCallback)(
32399
32761
  (pageProps) => {
32400
32762
  var _a, _b;
32401
- return ((_a = config.root) == null ? void 0 : _a.render) ? (_b = config.root) == null ? void 0 : _b.render(__spreadProps(__spreadValues({}, pageProps), { editMode: true })) : pageProps.children;
32763
+ return ((_a = config.root) == null ? void 0 : _a.render) ? (_b = config.root) == null ? void 0 : _b.render(__spreadProps(__spreadValues({
32764
+ id: "puck-root"
32765
+ }, pageProps), {
32766
+ editMode: true,
32767
+ puck: { renderDropZone: DropZone }
32768
+ })) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, { children: pageProps.children });
32402
32769
  },
32403
32770
  [config.root]
32404
32771
  );
32405
32772
  const rootProps = state.data.root.props || state.data.root;
32406
- const { disableZoom = false } = (0, import_react22.useContext)(dropZoneContext) || {};
32407
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
32773
+ const ref = (0, import_react22.useRef)(null);
32774
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
32408
32775
  "div",
32409
32776
  {
32777
+ className: getClassName21(),
32410
32778
  id,
32411
32779
  onClick: () => {
32412
32780
  dispatch({ type: "setUi", ui: __spreadProps(__spreadValues({}, state.ui), { itemSelector: null }) });
32413
32781
  },
32414
- style: { zoom: disableZoom ? 1 : 0.75 },
32415
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Page, __spreadProps(__spreadValues({ dispatch, state }, rootProps), { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DropZone, { zone: rootDroppableId }) }))
32782
+ children: iframe.enabled ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
32783
+ import_auto_frame_component.default,
32784
+ {
32785
+ id: "preview-frame",
32786
+ className: getClassName21("frame"),
32787
+ "data-rfd-iframe": true,
32788
+ ref,
32789
+ onStylesLoaded: () => {
32790
+ setStatus("READY");
32791
+ },
32792
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Page, __spreadProps(__spreadValues({ dispatch, state }, rootProps), { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DropZone, { zone: rootDroppableId }) }))
32793
+ }
32794
+ ) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { id: "preview-frame", className: getClassName21("frame"), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Page, __spreadProps(__spreadValues({ dispatch, state }, rootProps), { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DropZone, { zone: rootDroppableId }) })) })
32416
32795
  }
32417
32796
  );
32418
32797
  };
@@ -32444,9 +32823,24 @@ var areaContainsZones = (data, area) => {
32444
32823
  // components/LayerTree/index.tsx
32445
32824
  init_react_import();
32446
32825
 
32447
- // css-module:/home/runner/work/puck/puck/packages/core/components/LayerTree/styles.module.css#css-module
32448
- init_react_import();
32449
- var styles_module_default16 = { "LayerTree": "_LayerTree_1pgw8_1", "LayerTree-zoneTitle": "_LayerTree-zoneTitle_1pgw8_11", "LayerTree-helper": "_LayerTree-helper_1pgw8_17", "Layer": "_Layer_1pgw8_1", "Layer-inner": "_Layer-inner_1pgw8_29", "Layer--containsZone": "_Layer--containsZone_1pgw8_35", "Layer-clickable": "_Layer-clickable_1pgw8_39", "Layer--isSelected": "_Layer--isSelected_1pgw8_61", "Layer-chevron": "_Layer-chevron_1pgw8_77", "Layer--childIsSelected": "_Layer--childIsSelected_1pgw8_78", "Layer-zones": "_Layer-zones_1pgw8_82", "Layer-title": "_Layer-title_1pgw8_96", "Layer-name": "_Layer-name_1pgw8_105", "Layer-icon": "_Layer-icon_1pgw8_111", "Layer-zoneIcon": "_Layer-zoneIcon_1pgw8_116" };
32826
+ // components/LayerTree/styles.module.css
32827
+ var styles_default17 = {
32828
+ LayerTree: "styles_LayerTree",
32829
+ "LayerTree-zoneTitle": "styles_LayerTree-zoneTitle",
32830
+ "LayerTree-helper": "styles_LayerTree-helper",
32831
+ Layer: "styles_Layer",
32832
+ "Layer-inner": "styles_Layer-inner",
32833
+ "Layer--containsZone": "styles_Layer--containsZone",
32834
+ "Layer-clickable": "styles_Layer-clickable",
32835
+ "Layer--isSelected": "styles_Layer--isSelected",
32836
+ "Layer-chevron": "styles_Layer-chevron",
32837
+ "Layer--childIsSelected": "styles_Layer--childIsSelected",
32838
+ "Layer-zones": "styles_Layer-zones",
32839
+ "Layer-title": "styles_Layer-title",
32840
+ "Layer-name": "styles_Layer-name",
32841
+ "Layer-icon": "styles_Layer-icon",
32842
+ "Layer-zoneIcon": "styles_Layer-zoneIcon"
32843
+ };
32450
32844
 
32451
32845
  // lib/scroll-into-view.ts
32452
32846
  init_react_import();
@@ -32474,9 +32868,9 @@ var isChildOfZone = (item, maybeChild, ctx) => {
32474
32868
  };
32475
32869
 
32476
32870
  // components/LayerTree/index.tsx
32477
- var import_jsx_runtime27 = require("react/jsx-runtime");
32478
- var getClassName21 = get_class_name_factory_default("LayerTree", styles_module_default16);
32479
- var getClassNameLayer = get_class_name_factory_default("Layer", styles_module_default16);
32871
+ var import_jsx_runtime30 = require("react/jsx-runtime");
32872
+ var getClassName22 = get_class_name_factory_default("LayerTree", styles_default17);
32873
+ var getClassNameLayer = get_class_name_factory_default("Layer", styles_default17);
32480
32874
  var LayerTree = ({
32481
32875
  data,
32482
32876
  config,
@@ -32488,14 +32882,14 @@ var LayerTree = ({
32488
32882
  }) => {
32489
32883
  const zones = data.zones || {};
32490
32884
  const ctx = (0, import_react23.useContext)(dropZoneContext);
32491
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
32492
- label && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: getClassName21("zoneTitle"), children: [
32493
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: getClassName21("zoneIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Layers, { size: "16" }) }),
32885
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
32886
+ label && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: getClassName22("zoneTitle"), children: [
32887
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: getClassName22("zoneIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Layers, { size: "16" }) }),
32494
32888
  " ",
32495
32889
  label
32496
32890
  ] }),
32497
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("ul", { className: getClassName21(), children: [
32498
- zoneContent.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: getClassName21("helper"), children: "No items" }),
32891
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("ul", { className: getClassName22(), children: [
32892
+ zoneContent.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: getClassName22("helper"), children: "No items" }),
32499
32893
  zoneContent.map((item, i) => {
32500
32894
  var _a;
32501
32895
  const isSelected = (itemSelector == null ? void 0 : itemSelector.index) === i && (itemSelector.zone === zone || itemSelector.zone === rootDroppableId && !zone);
@@ -32511,7 +32905,7 @@ var LayerTree = ({
32511
32905
  const selectedItem = itemSelector && data ? getItem(itemSelector, data) : null;
32512
32906
  const isHovering = hoveringComponent === item.props.id;
32513
32907
  const childIsSelected = isChildOfZone(item, selectedItem, ctx);
32514
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
32908
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
32515
32909
  "li",
32516
32910
  {
32517
32911
  className: getClassNameLayer({
@@ -32521,7 +32915,7 @@ var LayerTree = ({
32521
32915
  childIsSelected
32522
32916
  }),
32523
32917
  children: [
32524
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
32918
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
32525
32919
  "button",
32526
32920
  {
32527
32921
  className: getClassNameLayer("clickable"),
@@ -32535,8 +32929,9 @@ var LayerTree = ({
32535
32929
  zone
32536
32930
  });
32537
32931
  const id = zoneContent[i].props.id;
32932
+ const frame = getFrame();
32538
32933
  scrollIntoView(
32539
- document.querySelector(
32934
+ frame == null ? void 0 : frame.querySelector(
32540
32935
  `[data-rfd-drag-handle-draggable-id="draggable-${id}"]`
32541
32936
  )
32542
32937
  );
@@ -32552,22 +32947,22 @@ var LayerTree = ({
32552
32947
  setHoveringComponent(null);
32553
32948
  },
32554
32949
  children: [
32555
- containsZone && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
32950
+ containsZone && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
32556
32951
  "div",
32557
32952
  {
32558
32953
  className: getClassNameLayer("chevron"),
32559
32954
  title: isSelected ? "Collapse" : "Expand",
32560
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChevronDown, { size: "12" })
32955
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ChevronDown, { size: "12" })
32561
32956
  }
32562
32957
  ),
32563
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: getClassNameLayer("title"), children: [
32564
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: getClassNameLayer("icon"), children: item.type === "Text" || item.type === "Heading" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Type, { size: "16" }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(LayoutGrid, { size: "16" }) }),
32565
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: getClassNameLayer("name"), children: (_a = config.components[item.type]["label"]) != null ? _a : item.type })
32958
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: getClassNameLayer("title"), children: [
32959
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: getClassNameLayer("icon"), children: item.type === "Text" || item.type === "Heading" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Type, { size: "16" }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(LayoutGrid, { size: "16" }) }),
32960
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: getClassNameLayer("name"), children: (_a = config.components[item.type]["label"]) != null ? _a : item.type })
32566
32961
  ] })
32567
32962
  ]
32568
32963
  }
32569
32964
  ) }),
32570
- containsZone && Object.keys(zonesForItem).map((zoneKey, idx) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: getClassNameLayer("zones"), children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
32965
+ containsZone && Object.keys(zonesForItem).map((zoneKey, idx) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: getClassNameLayer("zones"), children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
32571
32966
  LayerTree,
32572
32967
  {
32573
32968
  config,
@@ -32590,7 +32985,7 @@ var LayerTree = ({
32590
32985
 
32591
32986
  // components/Puck/components/Outline/index.tsx
32592
32987
  var import_react24 = require("react");
32593
- var import_jsx_runtime28 = require("react/jsx-runtime");
32988
+ var import_jsx_runtime31 = require("react/jsx-runtime");
32594
32989
  var Outline = () => {
32595
32990
  const { dispatch, state, overrides, config } = useAppContext();
32596
32991
  const { data, ui } = state;
@@ -32605,8 +33000,8 @@ var Outline = () => {
32605
33000
  []
32606
33001
  );
32607
33002
  const Wrapper = (0, import_react24.useMemo)(() => overrides.outline || "div", [overrides]);
32608
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Wrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(dropZoneContext.Consumer, { children: (ctx) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
32609
- (ctx == null ? void 0 : ctx.activeZones) && (ctx == null ? void 0 : ctx.activeZones[rootDroppableId]) && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
33003
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Wrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(dropZoneContext.Consumer, { children: (ctx) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
33004
+ (ctx == null ? void 0 : ctx.activeZones) && (ctx == null ? void 0 : ctx.activeZones[rootDroppableId]) && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
32610
33005
  LayerTree,
32611
33006
  {
32612
33007
  config,
@@ -32619,7 +33014,7 @@ var Outline = () => {
32619
33014
  ),
32620
33015
  Object.entries(findZonesForArea(data, "root")).map(
32621
33016
  ([zoneKey, zone]) => {
32622
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
33017
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
32623
33018
  LayerTree,
32624
33019
  {
32625
33020
  config,
@@ -32746,14 +33141,441 @@ function useHistoryStore() {
32746
33141
  };
32747
33142
  }
32748
33143
 
33144
+ // components/Puck/components/Canvas/index.tsx
33145
+ init_react_import();
33146
+
33147
+ // ../../node_modules/css-box-model/dist/css-box-model.esm.js
33148
+ init_react_import();
33149
+
33150
+ // ../../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
33151
+ init_react_import();
33152
+ var isProduction = process.env.NODE_ENV === "production";
33153
+ var prefix = "Invariant failed";
33154
+ function invariant(condition, message) {
33155
+ if (condition) {
33156
+ return;
33157
+ }
33158
+ if (isProduction) {
33159
+ throw new Error(prefix);
33160
+ }
33161
+ var provided = typeof message === "function" ? message() : message;
33162
+ var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
33163
+ throw new Error(value);
33164
+ }
33165
+
33166
+ // ../../node_modules/css-box-model/dist/css-box-model.esm.js
33167
+ var getRect = function getRect2(_ref) {
33168
+ var top = _ref.top, right = _ref.right, bottom = _ref.bottom, left = _ref.left;
33169
+ var width = right - left;
33170
+ var height = bottom - top;
33171
+ var rect = {
33172
+ top,
33173
+ right,
33174
+ bottom,
33175
+ left,
33176
+ width,
33177
+ height,
33178
+ x: left,
33179
+ y: top,
33180
+ center: {
33181
+ x: (right + left) / 2,
33182
+ y: (bottom + top) / 2
33183
+ }
33184
+ };
33185
+ return rect;
33186
+ };
33187
+ var expand = function expand2(target, expandBy) {
33188
+ return {
33189
+ top: target.top - expandBy.top,
33190
+ left: target.left - expandBy.left,
33191
+ bottom: target.bottom + expandBy.bottom,
33192
+ right: target.right + expandBy.right
33193
+ };
33194
+ };
33195
+ var shrink = function shrink2(target, shrinkBy) {
33196
+ return {
33197
+ top: target.top + shrinkBy.top,
33198
+ left: target.left + shrinkBy.left,
33199
+ bottom: target.bottom - shrinkBy.bottom,
33200
+ right: target.right - shrinkBy.right
33201
+ };
33202
+ };
33203
+ var noSpacing = {
33204
+ top: 0,
33205
+ right: 0,
33206
+ bottom: 0,
33207
+ left: 0
33208
+ };
33209
+ var createBox = function createBox2(_ref2) {
33210
+ var borderBox = _ref2.borderBox, _ref2$margin = _ref2.margin, margin = _ref2$margin === void 0 ? noSpacing : _ref2$margin, _ref2$border = _ref2.border, border = _ref2$border === void 0 ? noSpacing : _ref2$border, _ref2$padding = _ref2.padding, padding = _ref2$padding === void 0 ? noSpacing : _ref2$padding;
33211
+ var marginBox = getRect(expand(borderBox, margin));
33212
+ var paddingBox = getRect(shrink(borderBox, border));
33213
+ var contentBox = getRect(shrink(paddingBox, padding));
33214
+ return {
33215
+ marginBox,
33216
+ borderBox: getRect(borderBox),
33217
+ paddingBox,
33218
+ contentBox,
33219
+ margin,
33220
+ border,
33221
+ padding
33222
+ };
33223
+ };
33224
+ var parse = function parse2(raw) {
33225
+ var value = raw.slice(0, -2);
33226
+ var suffix = raw.slice(-2);
33227
+ if (suffix !== "px") {
33228
+ return 0;
33229
+ }
33230
+ var result = Number(value);
33231
+ !!isNaN(result) ? process.env.NODE_ENV !== "production" ? invariant(false, "Could not parse value [raw: " + raw + ", without suffix: " + value + "]") : invariant(false) : void 0;
33232
+ return result;
33233
+ };
33234
+ var calculateBox = function calculateBox2(borderBox, styles) {
33235
+ var margin = {
33236
+ top: parse(styles.marginTop),
33237
+ right: parse(styles.marginRight),
33238
+ bottom: parse(styles.marginBottom),
33239
+ left: parse(styles.marginLeft)
33240
+ };
33241
+ var padding = {
33242
+ top: parse(styles.paddingTop),
33243
+ right: parse(styles.paddingRight),
33244
+ bottom: parse(styles.paddingBottom),
33245
+ left: parse(styles.paddingLeft)
33246
+ };
33247
+ var border = {
33248
+ top: parse(styles.borderTopWidth),
33249
+ right: parse(styles.borderRightWidth),
33250
+ bottom: parse(styles.borderBottomWidth),
33251
+ left: parse(styles.borderLeftWidth)
33252
+ };
33253
+ return createBox({
33254
+ borderBox,
33255
+ margin,
33256
+ padding,
33257
+ border
33258
+ });
33259
+ };
33260
+ var getBox = function getBox2(el) {
33261
+ var borderBox = el.getBoundingClientRect();
33262
+ var styles = window.getComputedStyle(el);
33263
+ return calculateBox(borderBox, styles);
33264
+ };
33265
+
33266
+ // components/Puck/components/Canvas/index.tsx
33267
+ var import_react27 = require("react");
33268
+
33269
+ // components/ViewportControls/index.tsx
33270
+ init_react_import();
33271
+ var import_react26 = require("react");
33272
+
33273
+ // components/ViewportControls/styles.module.css
33274
+ var styles_default18 = {
33275
+ ViewportControls: "styles_ViewportControls",
33276
+ "ViewportControls-divider": "styles_ViewportControls-divider",
33277
+ "ViewportControls-zoomSelect": "styles_ViewportControls-zoomSelect",
33278
+ "ViewportButton--isActive": "styles_ViewportButton--isActive",
33279
+ "ViewportButton-inner": "styles_ViewportButton-inner"
33280
+ };
33281
+
33282
+ // components/ViewportControls/index.tsx
33283
+ var import_jsx_runtime32 = require("react/jsx-runtime");
33284
+ var icons = {
33285
+ Smartphone: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Smartphone, { size: 16 }),
33286
+ Tablet: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Tablet, { size: 16 }),
33287
+ Monitor: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Monitor, { size: 16 })
33288
+ };
33289
+ var getClassName23 = get_class_name_factory_default("ViewportControls", styles_default18);
33290
+ var getClassNameButton = get_class_name_factory_default("ViewportButton", styles_default18);
33291
+ var ViewportButton = ({
33292
+ children,
33293
+ height = "auto",
33294
+ title,
33295
+ width,
33296
+ onClick
33297
+ }) => {
33298
+ const { state } = useAppContext();
33299
+ const [isActive, setIsActive] = (0, import_react26.useState)(false);
33300
+ (0, import_react26.useEffect)(() => {
33301
+ setIsActive(width === state.ui.viewports.current.width);
33302
+ }, [width, state.ui.viewports.current.width]);
33303
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: getClassNameButton({ isActive }), children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
33304
+ IconButton,
33305
+ {
33306
+ title,
33307
+ disabled: isActive,
33308
+ onClick: (e) => {
33309
+ e.stopPropagation();
33310
+ onClick({ width, height });
33311
+ },
33312
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: getClassNameButton("inner"), children })
33313
+ }
33314
+ ) });
33315
+ };
33316
+ var defaultZoomOptions = [
33317
+ { label: "25%", value: 0.25 },
33318
+ { label: "50%", value: 0.5 },
33319
+ { label: "75%", value: 0.75 },
33320
+ { label: "100%", value: 1 },
33321
+ { label: "125%", value: 1.25 },
33322
+ { label: "150%", value: 1.5 },
33323
+ { label: "200%", value: 2 }
33324
+ ];
33325
+ var ViewportControls = ({
33326
+ autoZoom,
33327
+ zoom,
33328
+ onViewportChange,
33329
+ onZoom
33330
+ }) => {
33331
+ const { viewports } = useAppContext();
33332
+ const defaultsContainAutoZoom = defaultZoomOptions.find(
33333
+ (option) => option.value === autoZoom
33334
+ );
33335
+ const zoomOptions = (0, import_react26.useMemo)(
33336
+ () => [
33337
+ ...defaultZoomOptions,
33338
+ ...defaultsContainAutoZoom ? [] : [
33339
+ {
33340
+ value: autoZoom,
33341
+ label: `${(autoZoom * 100).toFixed(0)}% (Auto)`
33342
+ }
33343
+ ]
33344
+ ].filter((a) => a.value <= autoZoom).sort((a, b) => a.value > b.value ? 1 : -1),
33345
+ [autoZoom]
33346
+ );
33347
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: getClassName23(), children: [
33348
+ viewports.map((viewport, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
33349
+ ViewportButton,
33350
+ {
33351
+ height: viewport.height,
33352
+ width: viewport.width,
33353
+ title: viewport.label ? `Switch to ${viewport.label} viewport` : "Switch viewport",
33354
+ onClick: onViewportChange,
33355
+ children: typeof viewport.icon === "string" ? icons[viewport.icon] || viewport.icon : viewport.icon || icons.Smartphone
33356
+ },
33357
+ i
33358
+ )),
33359
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: getClassName23("divider") }),
33360
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
33361
+ IconButton,
33362
+ {
33363
+ title: "Zoom viewport out",
33364
+ disabled: zoom <= zoomOptions[0].value,
33365
+ onClick: (e) => {
33366
+ e.stopPropagation();
33367
+ onZoom(
33368
+ zoomOptions[Math.max(
33369
+ zoomOptions.findIndex((option) => option.value === zoom) - 1,
33370
+ 0
33371
+ )].value
33372
+ );
33373
+ },
33374
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ZoomOut, { size: 16 })
33375
+ }
33376
+ ),
33377
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
33378
+ IconButton,
33379
+ {
33380
+ title: "Zoom viewport in",
33381
+ disabled: zoom >= zoomOptions[zoomOptions.length - 1].value,
33382
+ onClick: (e) => {
33383
+ e.stopPropagation();
33384
+ onZoom(
33385
+ zoomOptions[Math.min(
33386
+ zoomOptions.findIndex((option) => option.value === zoom) + 1,
33387
+ zoomOptions.length - 1
33388
+ )].value
33389
+ );
33390
+ },
33391
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ZoomIn, { size: 16 })
33392
+ }
33393
+ ),
33394
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: getClassName23("divider") }),
33395
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
33396
+ "select",
33397
+ {
33398
+ className: getClassName23("zoomSelect"),
33399
+ value: zoom.toString(),
33400
+ onChange: (e) => {
33401
+ onZoom(parseFloat(e.currentTarget.value));
33402
+ },
33403
+ children: zoomOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
33404
+ "option",
33405
+ {
33406
+ value: option.value,
33407
+ label: option.label
33408
+ },
33409
+ option.label
33410
+ ))
33411
+ }
33412
+ )
33413
+ ] });
33414
+ };
33415
+
33416
+ // components/Puck/components/Canvas/styles.module.css
33417
+ var styles_default19 = {
33418
+ PuckCanvas: "styles_PuckCanvas",
33419
+ "PuckCanvas-controls": "styles_PuckCanvas-controls",
33420
+ "PuckCanvas-inner": "styles_PuckCanvas-inner",
33421
+ "PuckCanvas-root": "styles_PuckCanvas-root",
33422
+ "PuckCanvas--ready": "styles_PuckCanvas--ready"
33423
+ };
33424
+
33425
+ // lib/get-zoom-config.ts
33426
+ init_react_import();
33427
+ var RESET_ZOOM_SMALLER_THAN_FRAME = true;
33428
+ var getZoomConfig = (uiViewport, frame, zoom) => {
33429
+ const box = getBox(frame);
33430
+ const { width: frameWidth, height: frameHeight } = box.contentBox;
33431
+ const viewportHeight = uiViewport.height === "auto" ? frameHeight : uiViewport.height;
33432
+ let rootHeight = 0;
33433
+ let autoZoom = 1;
33434
+ if (uiViewport.width > frameWidth || viewportHeight > frameHeight) {
33435
+ const widthZoom = Math.min(frameWidth / uiViewport.width, 1);
33436
+ const heightZoom = Math.min(frameHeight / viewportHeight, 1);
33437
+ zoom = widthZoom;
33438
+ if (widthZoom < heightZoom) {
33439
+ rootHeight = viewportHeight / zoom;
33440
+ } else {
33441
+ rootHeight = viewportHeight;
33442
+ zoom = heightZoom;
33443
+ }
33444
+ autoZoom = zoom;
33445
+ } else {
33446
+ if (RESET_ZOOM_SMALLER_THAN_FRAME) {
33447
+ autoZoom = 1;
33448
+ zoom = 1;
33449
+ rootHeight = viewportHeight;
33450
+ }
33451
+ }
33452
+ return { autoZoom, rootHeight, zoom };
33453
+ };
33454
+
33455
+ // components/Puck/components/Canvas/index.tsx
33456
+ var import_jsx_runtime33 = require("react/jsx-runtime");
33457
+ var getClassName24 = get_class_name_factory_default("PuckCanvas", styles_default19);
33458
+ var ZOOM_ON_CHANGE = true;
33459
+ var Canvas = () => {
33460
+ const { status, iframe } = useAppContext();
33461
+ const { dispatch, state, overrides, setUi, zoomConfig, setZoomConfig } = useAppContext();
33462
+ const { ui } = state;
33463
+ const frameRef = (0, import_react27.useRef)(null);
33464
+ const [showTransition, setShowTransition] = (0, import_react27.useState)(false);
33465
+ const defaultRender = (0, import_react27.useMemo)(() => {
33466
+ const PuckDefault = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, { children });
33467
+ return PuckDefault;
33468
+ }, []);
33469
+ const CustomPreview = (0, import_react27.useMemo)(
33470
+ () => overrides.preview || defaultRender,
33471
+ [overrides]
33472
+ );
33473
+ const getFrameDimensions = (0, import_react27.useCallback)(() => {
33474
+ if (frameRef.current) {
33475
+ const frame = frameRef.current;
33476
+ const box = getBox(frame);
33477
+ return { width: box.contentBox.width, height: box.contentBox.height };
33478
+ }
33479
+ return { width: 0, height: 0 };
33480
+ }, [frameRef]);
33481
+ const resetAutoZoom = (0, import_react27.useCallback)(
33482
+ (ui2 = state.ui) => {
33483
+ if (frameRef.current) {
33484
+ setZoomConfig(
33485
+ getZoomConfig(ui2.viewports.current, frameRef.current, zoomConfig.zoom)
33486
+ );
33487
+ }
33488
+ },
33489
+ [frameRef, zoomConfig, state.ui]
33490
+ );
33491
+ (0, import_react27.useEffect)(() => {
33492
+ setShowTransition(false);
33493
+ resetAutoZoom();
33494
+ }, [frameRef, ui.leftSideBarVisible, ui.rightSideBarVisible]);
33495
+ (0, import_react27.useEffect)(() => {
33496
+ const { height: frameHeight } = getFrameDimensions();
33497
+ if (ui.viewports.current.height === "auto") {
33498
+ setZoomConfig(__spreadProps(__spreadValues({}, zoomConfig), {
33499
+ rootHeight: frameHeight / zoomConfig.zoom
33500
+ }));
33501
+ }
33502
+ }, [zoomConfig.zoom]);
33503
+ (0, import_react27.useEffect)(() => {
33504
+ const observer = new ResizeObserver(() => {
33505
+ setShowTransition(false);
33506
+ resetAutoZoom();
33507
+ });
33508
+ if (document.body) {
33509
+ observer.observe(document.body);
33510
+ }
33511
+ return () => {
33512
+ observer.disconnect();
33513
+ };
33514
+ }, []);
33515
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
33516
+ "div",
33517
+ {
33518
+ className: getClassName24({
33519
+ ready: status === "READY" || !iframe.enabled
33520
+ }),
33521
+ onClick: () => dispatch({
33522
+ type: "setUi",
33523
+ ui: { itemSelector: null },
33524
+ recordHistory: true
33525
+ }),
33526
+ children: [
33527
+ ui.viewports.controlsVisible && iframe.enabled && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: getClassName24("controls"), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
33528
+ ViewportControls,
33529
+ {
33530
+ autoZoom: zoomConfig.autoZoom,
33531
+ zoom: zoomConfig.zoom,
33532
+ onViewportChange: (viewport) => {
33533
+ setShowTransition(true);
33534
+ const uiViewport = __spreadProps(__spreadValues({}, viewport), {
33535
+ height: viewport.height || "auto",
33536
+ zoom: zoomConfig.zoom
33537
+ });
33538
+ const newUi = __spreadProps(__spreadValues({}, ui), {
33539
+ viewports: __spreadProps(__spreadValues({}, ui.viewports), { current: uiViewport })
33540
+ });
33541
+ setUi(newUi);
33542
+ if (ZOOM_ON_CHANGE) {
33543
+ resetAutoZoom(newUi);
33544
+ }
33545
+ },
33546
+ onZoom: (zoom) => {
33547
+ setShowTransition(true);
33548
+ setZoomConfig(__spreadProps(__spreadValues({}, zoomConfig), { zoom }));
33549
+ }
33550
+ }
33551
+ ) }),
33552
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: getClassName24("inner"), ref: frameRef, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
33553
+ "div",
33554
+ {
33555
+ className: getClassName24("root"),
33556
+ style: {
33557
+ width: iframe.enabled ? ui.viewports.current.width : void 0,
33558
+ height: zoomConfig.rootHeight,
33559
+ transform: iframe.enabled ? `scale(${zoomConfig.zoom})` : void 0,
33560
+ transition: showTransition ? "width 150ms ease-out, height 150ms ease-out, transform 150ms ease-out" : "",
33561
+ overflow: iframe.enabled ? void 0 : "auto"
33562
+ },
33563
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CustomPreview, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Preview, {}) })
33564
+ }
33565
+ ) })
33566
+ ]
33567
+ }
33568
+ );
33569
+ };
33570
+
32749
33571
  // components/Puck/index.tsx
32750
- var import_jsx_runtime29 = require("react/jsx-runtime");
32751
- var getClassName22 = get_class_name_factory_default("Puck", styles_module_default8);
33572
+ var import_jsx_runtime34 = require("react/jsx-runtime");
33573
+ var getClassName25 = get_class_name_factory_default("Puck", styles_default8);
32752
33574
  function Puck({
32753
33575
  children,
32754
33576
  config,
32755
33577
  data: initialData = { content: [], root: { props: { title: "" } } },
32756
- ui: initialUi = defaultAppState.ui,
33578
+ ui: initialUi,
32757
33579
  onChange,
32758
33580
  onPublish,
32759
33581
  plugins = [],
@@ -32761,33 +33583,63 @@ function Puck({
32761
33583
  renderHeader,
32762
33584
  renderHeaderActions,
32763
33585
  headerTitle,
32764
- headerPath
33586
+ headerPath,
33587
+ viewports = defaultViewports,
33588
+ iframe = {
33589
+ enabled: true
33590
+ }
32765
33591
  }) {
32766
33592
  var _a;
32767
33593
  const historyStore = useHistoryStore();
32768
- const [reducer] = (0, import_react26.useState)(
33594
+ const [reducer] = (0, import_react28.useState)(
32769
33595
  () => createReducer({ config, record: historyStore.record })
32770
33596
  );
32771
- const [initialAppState] = (0, import_react26.useState)(() => __spreadProps(__spreadValues({}, defaultAppState), {
32772
- data: initialData,
32773
- ui: __spreadProps(__spreadValues(__spreadValues({}, defaultAppState.ui), initialUi), {
32774
- // Store categories under componentList on state to allow render functions and plugins to modify
32775
- componentList: config.categories ? Object.entries(config.categories).reduce(
32776
- (acc, [categoryName, category]) => {
32777
- return __spreadProps(__spreadValues({}, acc), {
32778
- [categoryName]: {
32779
- title: category.title,
32780
- components: category.components,
32781
- expanded: category.defaultExpanded,
32782
- visible: category.visible
32783
- }
32784
- });
32785
- },
32786
- {}
32787
- ) : {}
32788
- })
32789
- }));
32790
- const [appState, dispatch] = (0, import_react26.useReducer)(
33597
+ const [initialAppState] = (0, import_react28.useState)(() => {
33598
+ var _a2, _b, _c, _d;
33599
+ const initial = __spreadValues(__spreadValues({}, defaultAppState.ui), initialUi);
33600
+ let clientUiState = {};
33601
+ if (typeof window !== "undefined") {
33602
+ const viewportWidth = window.innerWidth;
33603
+ const viewportDifferences = Object.entries(viewports).map(([key, value]) => ({
33604
+ key,
33605
+ diff: Math.abs(viewportWidth - value.width)
33606
+ })).sort((a, b) => a.diff > b.diff ? 1 : -1);
33607
+ const closestViewport = viewportDifferences[0].key;
33608
+ if (iframe.enabled) {
33609
+ clientUiState = __spreadProps(__spreadValues({}, window.matchMedia("(min-width: 638px)").matches ? {} : {
33610
+ leftSideBarVisible: false,
33611
+ rightSideBarVisible: false
33612
+ }), {
33613
+ viewports: __spreadProps(__spreadValues({}, initial.viewports), {
33614
+ current: __spreadProps(__spreadValues({}, initial.viewports.current), {
33615
+ height: ((_b = (_a2 = initialUi == null ? void 0 : initialUi.viewports) == null ? void 0 : _a2.current) == null ? void 0 : _b.height) || viewports[closestViewport].height || "auto",
33616
+ width: ((_d = (_c = initialUi == null ? void 0 : initialUi.viewports) == null ? void 0 : _c.current) == null ? void 0 : _d.width) || viewports[closestViewport].width
33617
+ })
33618
+ })
33619
+ });
33620
+ }
33621
+ }
33622
+ return __spreadProps(__spreadValues({}, defaultAppState), {
33623
+ data: initialData,
33624
+ ui: __spreadProps(__spreadValues(__spreadValues({}, initial), clientUiState), {
33625
+ // Store categories under componentList on state to allow render functions and plugins to modify
33626
+ componentList: config.categories ? Object.entries(config.categories).reduce(
33627
+ (acc, [categoryName, category]) => {
33628
+ return __spreadProps(__spreadValues({}, acc), {
33629
+ [categoryName]: {
33630
+ title: category.title,
33631
+ components: category.components,
33632
+ expanded: category.defaultExpanded,
33633
+ visible: category.visible
33634
+ }
33635
+ });
33636
+ },
33637
+ {}
33638
+ ) : {}
33639
+ })
33640
+ });
33641
+ });
33642
+ const [appState, dispatch] = (0, import_react28.useReducer)(
32791
33643
  reducer,
32792
33644
  flushZones(initialAppState)
32793
33645
  );
@@ -32798,9 +33650,9 @@ function Puck({
32798
33650
  config,
32799
33651
  dispatch
32800
33652
  );
32801
- const [menuOpen, setMenuOpen] = (0, import_react26.useState)(false);
33653
+ const [menuOpen, setMenuOpen] = (0, import_react28.useState)(false);
32802
33654
  const { itemSelector, leftSideBarVisible, rightSideBarVisible } = ui;
32803
- const setItemSelector = (0, import_react26.useCallback)(
33655
+ const setItemSelector = (0, import_react28.useCallback)(
32804
33656
  (newItemSelector) => {
32805
33657
  if (newItemSelector === itemSelector)
32806
33658
  return;
@@ -32813,21 +33665,21 @@ function Puck({
32813
33665
  [itemSelector]
32814
33666
  );
32815
33667
  const selectedItem = itemSelector ? getItem(itemSelector, data) : null;
32816
- (0, import_react26.useEffect)(() => {
33668
+ (0, import_react28.useEffect)(() => {
32817
33669
  if (onChange)
32818
33670
  onChange(data);
32819
33671
  }, [data]);
32820
33672
  const { onDragStartOrUpdate, placeholderStyle } = usePlaceholderStyle();
32821
- const [draggedItem, setDraggedItem] = (0, import_react26.useState)();
33673
+ const [draggedItem, setDraggedItem] = (0, import_react28.useState)();
32822
33674
  const rootProps = data.root.props || data.root;
32823
- (0, import_react26.useEffect)(() => {
33675
+ (0, import_react28.useEffect)(() => {
32824
33676
  if (Object.keys(data.root).length > 0 && !data.root.props) {
32825
33677
  console.error(
32826
33678
  "Warning: Defining props on `root` is deprecated. Please use `root.props`. This will be a breaking change in a future release."
32827
33679
  );
32828
33680
  }
32829
33681
  }, []);
32830
- const toggleSidebars = (0, import_react26.useCallback)(
33682
+ const toggleSidebars = (0, import_react28.useCallback)(
32831
33683
  (sidebar) => {
32832
33684
  const widerViewport = window.matchMedia("(min-width: 638px)").matches;
32833
33685
  const sideBarVisible = sidebar === "left" ? leftSideBarVisible : rightSideBarVisible;
@@ -32841,7 +33693,7 @@ function Puck({
32841
33693
  },
32842
33694
  [dispatch, leftSideBarVisible, rightSideBarVisible]
32843
33695
  );
32844
- (0, import_react26.useEffect)(() => {
33696
+ (0, import_react28.useEffect)(() => {
32845
33697
  if (!window.matchMedia("(min-width: 638px)").matches) {
32846
33698
  dispatch({
32847
33699
  type: "setUi",
@@ -32864,11 +33716,11 @@ function Puck({
32864
33716
  window.removeEventListener("resize", handleResize);
32865
33717
  };
32866
33718
  }, []);
32867
- const defaultRender = (0, import_react26.useMemo)(() => {
32868
- const PuckDefault = ({ children: children2 }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, { children: children2 });
33719
+ const defaultRender = (0, import_react28.useMemo)(() => {
33720
+ const PuckDefault = ({ children: children2 }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, { children: children2 });
32869
33721
  return PuckDefault;
32870
33722
  }, []);
32871
- const defaultHeaderRender = (0, import_react26.useMemo)(() => {
33723
+ const defaultHeaderRender = (0, import_react28.useMemo)(() => {
32872
33724
  if (renderHeader) {
32873
33725
  console.warn(
32874
33726
  "`renderHeader` is deprecated. Please use `overrides.header` and the `usePuck` hook instead"
@@ -32876,47 +33728,42 @@ function Puck({
32876
33728
  const RenderHeader = (_a2) => {
32877
33729
  var _b = _a2, { actions } = _b, props = __objRest(_b, ["actions"]);
32878
33730
  const Comp = renderHeader;
32879
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Comp, __spreadProps(__spreadValues({}, props), { dispatch, state: appState, children: actions }));
33731
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Comp, __spreadProps(__spreadValues({}, props), { dispatch, state: appState, children: actions }));
32880
33732
  };
32881
33733
  return RenderHeader;
32882
33734
  }
32883
33735
  return defaultRender;
32884
33736
  }, [renderHeader]);
32885
- const defaultHeaderActionsRender = (0, import_react26.useMemo)(() => {
33737
+ const defaultHeaderActionsRender = (0, import_react28.useMemo)(() => {
32886
33738
  if (renderHeaderActions) {
32887
33739
  console.warn(
32888
33740
  "`renderHeaderActions` is deprecated. Please use `overrides.headerActions` and the `usePuck` hook instead."
32889
33741
  );
32890
33742
  const RenderHeader = (props) => {
32891
33743
  const Comp = renderHeaderActions;
32892
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Comp, __spreadProps(__spreadValues({}, props), { dispatch, state: appState }));
33744
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Comp, __spreadProps(__spreadValues({}, props), { dispatch, state: appState }));
32893
33745
  };
32894
33746
  return RenderHeader;
32895
33747
  }
32896
33748
  return defaultRender;
32897
33749
  }, [renderHeader]);
32898
- const loadedOverrides = (0, import_react26.useMemo)(() => {
33750
+ const loadedOverrides = (0, import_react28.useMemo)(() => {
32899
33751
  return loadOverrides({ overrides, plugins });
32900
33752
  }, [plugins]);
32901
- const CustomPuck = (0, import_react26.useMemo)(
33753
+ const CustomPuck = (0, import_react28.useMemo)(
32902
33754
  () => loadedOverrides.puck || defaultRender,
32903
33755
  [loadedOverrides]
32904
33756
  );
32905
- const CustomPreview = (0, import_react26.useMemo)(
32906
- () => loadedOverrides.preview || defaultRender,
32907
- [loadedOverrides]
32908
- );
32909
- const CustomHeader = (0, import_react26.useMemo)(
33757
+ const CustomHeader = (0, import_react28.useMemo)(
32910
33758
  () => loadedOverrides.header || defaultHeaderRender,
32911
33759
  [loadedOverrides]
32912
33760
  );
32913
- const CustomHeaderActions = (0, import_react26.useMemo)(
33761
+ const CustomHeaderActions = (0, import_react28.useMemo)(
32914
33762
  () => loadedOverrides.headerActions || defaultHeaderActionsRender,
32915
33763
  [loadedOverrides]
32916
33764
  );
32917
- const disableZoom = children || loadedOverrides.puck ? true : false;
32918
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "Puck", children: [
32919
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
33765
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "Puck", children: [
33766
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
32920
33767
  AppProvider,
32921
33768
  {
32922
33769
  value: {
@@ -32927,10 +33774,12 @@ function Puck({
32927
33774
  resolveData,
32928
33775
  plugins,
32929
33776
  overrides: loadedOverrides,
32930
- history
33777
+ history,
33778
+ viewports,
33779
+ iframe
32931
33780
  },
32932
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
32933
- import_dnd7.DragDropContext,
33781
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
33782
+ DragDropContext,
32934
33783
  {
32935
33784
  onDragUpdate: (update) => {
32936
33785
  setDraggedItem(__spreadValues(__spreadValues({}, draggedItem), update));
@@ -32984,7 +33833,7 @@ function Puck({
32984
33833
  });
32985
33834
  }
32986
33835
  },
32987
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
33836
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
32988
33837
  DropZoneProvider,
32989
33838
  {
32990
33839
  value: {
@@ -32996,77 +33845,75 @@ function Puck({
32996
33845
  draggedItem,
32997
33846
  placeholderStyle,
32998
33847
  mode: "edit",
32999
- areaId: "root",
33000
- disableZoom
33848
+ areaId: "root"
33001
33849
  },
33002
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CustomPuck, { children: children || /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
33850
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CustomPuck, { children: children || /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
33003
33851
  "div",
33004
33852
  {
33005
- className: getClassName22({
33853
+ className: getClassName25({
33006
33854
  leftSideBarVisible,
33007
33855
  menuOpen,
33008
- rightSideBarVisible,
33009
- disableZoom
33856
+ rightSideBarVisible
33010
33857
  }),
33011
33858
  children: [
33012
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
33859
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
33013
33860
  CustomHeader,
33014
33861
  {
33015
- actions: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
33016
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CustomHeaderActions, {}),
33017
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
33862
+ actions: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
33863
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CustomHeaderActions, {}),
33864
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
33018
33865
  Button,
33019
33866
  {
33020
33867
  onClick: () => {
33021
33868
  onPublish && onPublish(data);
33022
33869
  },
33023
- icon: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Globe, { size: "14px" }),
33870
+ icon: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Globe, { size: "14px" }),
33024
33871
  children: "Publish"
33025
33872
  }
33026
33873
  )
33027
33874
  ] }),
33028
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("header", { className: getClassName22("header"), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: getClassName22("headerInner"), children: [
33029
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: getClassName22("headerToggle"), children: [
33030
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: getClassName22("leftSideBarToggle"), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
33875
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("header", { className: getClassName25("header"), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: getClassName25("headerInner"), children: [
33876
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: getClassName25("headerToggle"), children: [
33877
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: getClassName25("leftSideBarToggle"), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
33031
33878
  IconButton,
33032
33879
  {
33033
33880
  onClick: () => {
33034
33881
  toggleSidebars("left");
33035
33882
  },
33036
33883
  title: "Toggle left sidebar",
33037
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PanelLeft, { focusable: "false" })
33884
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(PanelLeft, { focusable: "false" })
33038
33885
  }
33039
33886
  ) }),
33040
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: getClassName22("rightSideBarToggle"), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
33887
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: getClassName25("rightSideBarToggle"), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
33041
33888
  IconButton,
33042
33889
  {
33043
33890
  onClick: () => {
33044
33891
  toggleSidebars("right");
33045
33892
  },
33046
33893
  title: "Toggle right sidebar",
33047
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PanelRight, { focusable: "false" })
33894
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(PanelRight, { focusable: "false" })
33048
33895
  }
33049
33896
  ) })
33050
33897
  ] }),
33051
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: getClassName22("headerTitle"), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Heading, { rank: 2, size: "xs", children: [
33898
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: getClassName25("headerTitle"), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Heading, { rank: 2, size: "xs", children: [
33052
33899
  headerTitle || rootProps.title || "Page",
33053
- headerPath && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
33900
+ headerPath && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
33054
33901
  " ",
33055
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("code", { className: getClassName22("headerPath"), children: headerPath })
33902
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("code", { className: getClassName25("headerPath"), children: headerPath })
33056
33903
  ] })
33057
33904
  ] }) }),
33058
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: getClassName22("headerTools"), children: [
33059
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: getClassName22("menuButton"), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
33905
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: getClassName25("headerTools"), children: [
33906
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: getClassName25("menuButton"), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
33060
33907
  IconButton,
33061
33908
  {
33062
33909
  onClick: () => {
33063
33910
  return setMenuOpen(!menuOpen);
33064
33911
  },
33065
33912
  title: "Toggle menu bar",
33066
- children: menuOpen ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ChevronUp, { focusable: "false" }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ChevronDown, { focusable: "false" })
33913
+ children: menuOpen ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ChevronUp, { focusable: "false" }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ChevronDown, { focusable: "false" })
33067
33914
  }
33068
33915
  ) }),
33069
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
33916
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
33070
33917
  MenuBar,
33071
33918
  {
33072
33919
  appState,
@@ -33074,7 +33921,7 @@ function Puck({
33074
33921
  dispatch,
33075
33922
  onPublish,
33076
33923
  menuOpen,
33077
- renderHeaderActions: () => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CustomHeaderActions, {}),
33924
+ renderHeaderActions: () => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CustomHeaderActions, {}),
33078
33925
  setMenuOpen
33079
33926
  }
33080
33927
  )
@@ -33082,38 +33929,19 @@ function Puck({
33082
33929
  ] }) })
33083
33930
  }
33084
33931
  ),
33085
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: getClassName22("leftSideBar"), children: [
33086
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SidebarSection, { title: "Components", noBorderTop: true, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Components, {}) }),
33087
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SidebarSection, { title: "Outline", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Outline, {}) })
33932
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: getClassName25("leftSideBar"), children: [
33933
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SidebarSection, { title: "Components", noBorderTop: true, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Components, {}) }),
33934
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SidebarSection, { title: "Outline", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Outline, {}) })
33088
33935
  ] }),
33089
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
33090
- "div",
33091
- {
33092
- className: getClassName22("frame"),
33093
- onClick: () => setItemSelector(null),
33094
- children: [
33095
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: getClassName22("root"), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CustomPreview, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Preview, {}) }) }),
33096
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
33097
- "div",
33098
- {
33099
- style: {
33100
- background: "var(--puck-color-grey-11)",
33101
- height: "100%",
33102
- flexGrow: 1
33103
- }
33104
- }
33105
- )
33106
- ]
33107
- }
33108
- ),
33109
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: getClassName22("rightSideBar"), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
33936
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Canvas, {}),
33937
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: getClassName25("rightSideBar"), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
33110
33938
  SidebarSection,
33111
33939
  {
33112
33940
  noPadding: true,
33113
33941
  noBorderTop: true,
33114
33942
  showBreadcrumbs: true,
33115
33943
  title: selectedItem ? (_a = config.components[selectedItem.type]["label"]) != null ? _a : selectedItem.type : "Page",
33116
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Fields, {})
33944
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Fields, {})
33117
33945
  }
33118
33946
  ) })
33119
33947
  ]
@@ -33125,7 +33953,7 @@ function Puck({
33125
33953
  )
33126
33954
  }
33127
33955
  ),
33128
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { id: "puck-portal-root" })
33956
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { id: "puck-portal-root" })
33129
33957
  ] });
33130
33958
  }
33131
33959
  Puck.Components = Components;
@@ -33135,13 +33963,16 @@ Puck.Preview = Preview;
33135
33963
 
33136
33964
  // components/Render/index.tsx
33137
33965
  init_react_import();
33138
- var import_jsx_runtime30 = require("react/jsx-runtime");
33139
- function Render({ config, data }) {
33966
+ var import_jsx_runtime35 = require("react/jsx-runtime");
33967
+ function Render({
33968
+ config,
33969
+ data
33970
+ }) {
33140
33971
  var _a;
33141
33972
  const rootProps = data.root.props || data.root;
33142
33973
  const title = (rootProps == null ? void 0 : rootProps.title) || "";
33143
33974
  if ((_a = config.root) == null ? void 0 : _a.render) {
33144
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DropZoneProvider, { value: { data, config, mode: "render" }, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
33975
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropZoneProvider, { value: { data, config, mode: "render" }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
33145
33976
  config.root.render,
33146
33977
  __spreadProps(__spreadValues({}, rootProps), {
33147
33978
  puck: {
@@ -33150,11 +33981,11 @@ function Render({ config, data }) {
33150
33981
  title,
33151
33982
  editMode: false,
33152
33983
  id: "puck-root",
33153
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DropZone, { zone: rootDroppableId })
33984
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropZone, { zone: rootDroppableId })
33154
33985
  })
33155
33986
  ) });
33156
33987
  }
33157
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DropZoneProvider, { value: { data, config, mode: "render" }, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DropZone, { zone: rootDroppableId }) });
33988
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropZoneProvider, { value: { data, config, mode: "render" }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropZone, { zone: rootDroppableId }) });
33158
33989
  }
33159
33990
 
33160
33991
  // lib/migrate.ts
@@ -33215,37 +34046,51 @@ function transformProps(data, propTransforms) {
33215
34046
 
33216
34047
  // lib/resolve-all-data.ts
33217
34048
  init_react_import();
33218
- var resolveAllData = (data, config, onResolveStart, onResolveEnd) => __async(void 0, null, function* () {
33219
- const dynamicRoot = yield resolveRootData(data, config);
33220
- const { zones = {} } = data;
33221
- const zoneKeys = Object.keys(zones);
33222
- const resolvedZones = {};
33223
- for (let i = 0; i < zoneKeys.length; i++) {
33224
- const zoneKey = zoneKeys[i];
33225
- resolvedZones[zoneKey] = yield resolveAllComponentData(
33226
- zones[zoneKey],
33227
- config,
33228
- onResolveStart,
33229
- onResolveEnd
33230
- );
33231
- }
33232
- return __spreadProps(__spreadValues({}, data), {
33233
- root: dynamicRoot,
33234
- content: yield resolveAllComponentData(
33235
- data.content,
33236
- config,
33237
- onResolveStart,
33238
- onResolveEnd
33239
- ),
33240
- zones: resolvedZones
34049
+ function resolveAllData(data, config, onResolveStart, onResolveEnd) {
34050
+ return __async(this, null, function* () {
34051
+ const dynamicRoot = yield resolveRootData(data, config);
34052
+ const { zones = {} } = data;
34053
+ const zoneKeys = Object.keys(zones);
34054
+ const resolvedZones = {};
34055
+ for (let i = 0; i < zoneKeys.length; i++) {
34056
+ const zoneKey = zoneKeys[i];
34057
+ resolvedZones[zoneKey] = yield resolveAllComponentData(
34058
+ zones[zoneKey],
34059
+ config,
34060
+ onResolveStart,
34061
+ onResolveEnd
34062
+ );
34063
+ }
34064
+ return __spreadProps(__spreadValues({}, data), {
34065
+ root: dynamicRoot,
34066
+ content: yield resolveAllComponentData(
34067
+ data.content,
34068
+ config,
34069
+ onResolveStart,
34070
+ onResolveEnd
34071
+ ),
34072
+ zones: resolvedZones
34073
+ });
33241
34074
  });
33242
- });
34075
+ }
33243
34076
 
33244
34077
  // lib/use-puck.ts
33245
34078
  init_react_import();
33246
34079
  var usePuck = () => {
33247
- const { state: appState, config, history, dispatch } = useAppContext();
33248
- return { appState, config, dispatch, history };
34080
+ const {
34081
+ state: appState,
34082
+ config,
34083
+ history,
34084
+ dispatch,
34085
+ selectedItem
34086
+ } = useAppContext();
34087
+ return {
34088
+ appState,
34089
+ config,
34090
+ dispatch,
34091
+ history,
34092
+ selectedItem: selectedItem || null
34093
+ };
33249
34094
  };
33250
34095
  // Annotate the CommonJS export names for ESM import in node:
33251
34096
  0 && (module.exports = {
@@ -33449,6 +34294,14 @@ lucide-react/dist/esm/icons/lock.js:
33449
34294
  * See the LICENSE file in the root directory of this source tree.
33450
34295
  *)
33451
34296
 
34297
+ lucide-react/dist/esm/icons/monitor.js:
34298
+ (**
34299
+ * @license lucide-react v0.298.0 - ISC
34300
+ *
34301
+ * This source code is licensed under the ISC license.
34302
+ * See the LICENSE file in the root directory of this source tree.
34303
+ *)
34304
+
33452
34305
  lucide-react/dist/esm/icons/more-vertical.js:
33453
34306
  (**
33454
34307
  * @license lucide-react v0.298.0 - ISC
@@ -33497,6 +34350,22 @@ lucide-react/dist/esm/icons/sliders-horizontal.js:
33497
34350
  * See the LICENSE file in the root directory of this source tree.
33498
34351
  *)
33499
34352
 
34353
+ lucide-react/dist/esm/icons/smartphone.js:
34354
+ (**
34355
+ * @license lucide-react v0.298.0 - ISC
34356
+ *
34357
+ * This source code is licensed under the ISC license.
34358
+ * See the LICENSE file in the root directory of this source tree.
34359
+ *)
34360
+
34361
+ lucide-react/dist/esm/icons/tablet.js:
34362
+ (**
34363
+ * @license lucide-react v0.298.0 - ISC
34364
+ *
34365
+ * This source code is licensed under the ISC license.
34366
+ * See the LICENSE file in the root directory of this source tree.
34367
+ *)
34368
+
33500
34369
  lucide-react/dist/esm/icons/trash.js:
33501
34370
  (**
33502
34371
  * @license lucide-react v0.298.0 - ISC
@@ -33521,6 +34390,22 @@ lucide-react/dist/esm/icons/unlock.js:
33521
34390
  * See the LICENSE file in the root directory of this source tree.
33522
34391
  *)
33523
34392
 
34393
+ lucide-react/dist/esm/icons/zoom-in.js:
34394
+ (**
34395
+ * @license lucide-react v0.298.0 - ISC
34396
+ *
34397
+ * This source code is licensed under the ISC license.
34398
+ * See the LICENSE file in the root directory of this source tree.
34399
+ *)
34400
+
34401
+ lucide-react/dist/esm/icons/zoom-out.js:
34402
+ (**
34403
+ * @license lucide-react v0.298.0 - ISC
34404
+ *
34405
+ * This source code is licensed under the ISC license.
34406
+ * See the LICENSE file in the root directory of this source tree.
34407
+ *)
34408
+
33524
34409
  lucide-react/dist/esm/lucide-react.js:
33525
34410
  (**
33526
34411
  * @license lucide-react v0.298.0 - ISC