@measured/puck 0.14.0-canary.924c85a → 0.14.0-canary.9fa2428
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{Config-29dc2731.d.ts → Config-Bgx_Bij_.d.ts} +1 -1
- package/dist/index.css +353 -353
- package/dist/index.d.ts +9 -4
- package/dist/index.js +429 -229
- package/dist/rsc.d.ts +1 -1
- package/package.json +3 -3
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"(
|
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"(
|
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
|
-
|
192
|
+
exports2.unstable_now = function() {
|
192
193
|
return l.now();
|
193
194
|
};
|
194
195
|
} else {
|
195
196
|
p = Date, q = p.now();
|
196
|
-
|
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 =
|
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
|
276
|
+
return exports2.unstable_now() - Q < P ? false : true;
|
276
277
|
}
|
277
278
|
function R() {
|
278
279
|
if (null !== O) {
|
279
|
-
var a =
|
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(
|
314
|
+
a(exports2.unstable_now());
|
314
315
|
}, b);
|
315
316
|
}
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
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
|
-
|
326
|
+
exports2.unstable_continueExecution = function() {
|
326
327
|
A || z || (A = true, I(J));
|
327
328
|
};
|
328
|
-
|
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
|
-
|
332
|
+
exports2.unstable_getCurrentPriorityLevel = function() {
|
332
333
|
return y;
|
333
334
|
};
|
334
|
-
|
335
|
+
exports2.unstable_getFirstCallbackNode = function() {
|
335
336
|
return h(r);
|
336
337
|
};
|
337
|
-
|
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
|
-
|
356
|
+
exports2.unstable_pauseExecution = function() {
|
356
357
|
};
|
357
|
-
|
358
|
+
exports2.unstable_requestPaint = function() {
|
358
359
|
};
|
359
|
-
|
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
|
-
|
379
|
-
var d =
|
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
|
-
|
403
|
-
|
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"(
|
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
|
-
|
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
|
-
|
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 =
|
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 =
|
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 =
|
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 =
|
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 =
|
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(
|
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
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
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"(
|
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"(
|
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
|
-
|
7942
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
7975
|
+
exports2.flushSync = function(a) {
|
7975
7976
|
return Sk(a);
|
7976
7977
|
};
|
7977
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
8014
|
-
|
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
|
-
|
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"(
|
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") {
|
@@ -29094,18 +29095,18 @@ var require_react_dom_development = __commonJS({
|
|
29094
29095
|
}
|
29095
29096
|
}
|
29096
29097
|
}
|
29097
|
-
|
29098
|
-
|
29099
|
-
|
29100
|
-
|
29101
|
-
|
29102
|
-
|
29103
|
-
|
29104
|
-
|
29105
|
-
|
29106
|
-
|
29107
|
-
|
29108
|
-
|
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"(
|
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
|
-
//
|
29175
|
-
|
29176
|
-
|
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",
|
29224
|
+
var getClassName = get_class_name_factory_default("Button", Button_default);
|
29214
29225
|
var Button = ({
|
29215
29226
|
children,
|
29216
29227
|
href,
|
@@ -29343,12 +29354,14 @@ var defaultContext = {
|
|
29343
29354
|
history: {},
|
29344
29355
|
viewports: defaultViewports,
|
29345
29356
|
zoomConfig: {
|
29346
|
-
autoZoom:
|
29357
|
+
autoZoom: 1,
|
29347
29358
|
rootHeight: 0,
|
29348
29359
|
zoom: 1
|
29349
29360
|
},
|
29350
29361
|
setZoomConfig: () => null,
|
29351
|
-
status: "LOADING"
|
29362
|
+
status: "LOADING",
|
29363
|
+
setStatus: () => null,
|
29364
|
+
iframe: {}
|
29352
29365
|
};
|
29353
29366
|
var appContext = (0, import_react3.createContext)(defaultContext);
|
29354
29367
|
var AppProvider = ({
|
@@ -29358,12 +29371,12 @@ var AppProvider = ({
|
|
29358
29371
|
const [zoomConfig, setZoomConfig] = (0, import_react3.useState)(defaultContext.zoomConfig);
|
29359
29372
|
const [status, setStatus] = (0, import_react3.useState)("LOADING");
|
29360
29373
|
(0, import_react3.useEffect)(() => {
|
29361
|
-
setStatus("
|
29374
|
+
setStatus("MOUNTED");
|
29362
29375
|
}, []);
|
29363
29376
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
29364
29377
|
appContext.Provider,
|
29365
29378
|
{
|
29366
|
-
value: __spreadProps(__spreadValues({}, value), { zoomConfig, setZoomConfig, status }),
|
29379
|
+
value: __spreadProps(__spreadValues({}, value), { zoomConfig, setZoomConfig, status, setStatus }),
|
29367
29380
|
children
|
29368
29381
|
}
|
29369
29382
|
);
|
@@ -29403,13 +29416,20 @@ var defaultSnapshot = {
|
|
29403
29416
|
var DefaultDroppable = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: children(defaultProvided, defaultSnapshot) });
|
29404
29417
|
var Droppable = (props) => {
|
29405
29418
|
const { status } = useAppContext();
|
29406
|
-
const El = status
|
29419
|
+
const El = status !== "LOADING" ? import_dnd.Droppable : DefaultDroppable;
|
29407
29420
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(El, __spreadValues({}, props));
|
29408
29421
|
};
|
29409
29422
|
|
29410
|
-
//
|
29411
|
-
|
29412
|
-
|
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
|
+
};
|
29413
29433
|
|
29414
29434
|
// components/Draggable/index.tsx
|
29415
29435
|
init_react_import();
|
@@ -29449,7 +29469,7 @@ var Draggable = ({
|
|
29449
29469
|
isDragDisabled = false
|
29450
29470
|
}) => {
|
29451
29471
|
const { status } = useAppContext();
|
29452
|
-
const El = status
|
29472
|
+
const El = status !== "LOADING" ? import_dnd2.Draggable : DefaultDraggable;
|
29453
29473
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(El, { draggableId: id, index, isDragDisabled, children: (provided, snapshot) => {
|
29454
29474
|
var _a;
|
29455
29475
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
@@ -29504,20 +29524,21 @@ var replace = (list, index, newItem) => {
|
|
29504
29524
|
return result;
|
29505
29525
|
};
|
29506
29526
|
|
29507
|
-
//
|
29508
|
-
|
29509
|
-
|
29527
|
+
// components/DragIcon/styles.module.css
|
29528
|
+
var styles_default2 = {
|
29529
|
+
DragIcon: "styles_DragIcon"
|
29530
|
+
};
|
29510
29531
|
|
29511
29532
|
// components/DragIcon/index.tsx
|
29512
29533
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
29513
|
-
var getClassName2 = get_class_name_factory_default("DragIcon",
|
29534
|
+
var getClassName2 = get_class_name_factory_default("DragIcon", styles_default2);
|
29514
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" }) }) });
|
29515
29536
|
|
29516
29537
|
// components/Drawer/index.tsx
|
29517
29538
|
var import_react4 = require("react");
|
29518
29539
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
29519
|
-
var getClassName3 = get_class_name_factory_default("Drawer",
|
29520
|
-
var getClassNameItem = get_class_name_factory_default("DrawerItem",
|
29540
|
+
var getClassName3 = get_class_name_factory_default("Drawer", styles_default);
|
29541
|
+
var getClassNameItem = get_class_name_factory_default("DrawerItem", styles_default);
|
29521
29542
|
var drawerContext = (0, import_react4.createContext)({
|
29522
29543
|
droppableId: ""
|
29523
29544
|
});
|
@@ -29585,9 +29606,22 @@ init_react_import();
|
|
29585
29606
|
var import_react7 = require("react");
|
29586
29607
|
var import_dnd3 = require("@measured/dnd");
|
29587
29608
|
|
29588
|
-
//
|
29589
|
-
|
29590
|
-
|
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
|
+
};
|
29591
29625
|
|
29592
29626
|
// ../../node_modules/lucide-react/dist/esm/lucide-react.js
|
29593
29627
|
init_react_import();
|
@@ -29880,7 +29914,7 @@ var useModifierHeld = (modifier) => {
|
|
29880
29914
|
// components/DraggableComponent/index.tsx
|
29881
29915
|
var import_react_spinners2 = require("react-spinners");
|
29882
29916
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
29883
|
-
var getClassName4 = get_class_name_factory_default("DraggableComponent",
|
29917
|
+
var getClassName4 = get_class_name_factory_default("DraggableComponent", styles_default3);
|
29884
29918
|
var space = 8;
|
29885
29919
|
var actionsOverlayTop = space * 6.5;
|
29886
29920
|
var actionsTop = -(actionsOverlayTop - 8);
|
@@ -29910,7 +29944,7 @@ var DraggableComponent = ({
|
|
29910
29944
|
const { zoomConfig } = useAppContext();
|
29911
29945
|
const isModifierHeld = useModifierHeld("Alt");
|
29912
29946
|
const { status } = useAppContext();
|
29913
|
-
const El = status
|
29947
|
+
const El = status !== "LOADING" ? import_dnd3.Draggable : DefaultDraggable;
|
29914
29948
|
(0, import_react7.useEffect)(onMount, []);
|
29915
29949
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(El, { draggableId: id, index, isDragDisabled, children: (provided, snapshot) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
29916
29950
|
"div",
|
@@ -29968,9 +30002,22 @@ var DraggableComponent = ({
|
|
29968
30002
|
) }, id);
|
29969
30003
|
};
|
29970
30004
|
|
29971
|
-
//
|
29972
|
-
|
29973
|
-
|
30005
|
+
// components/DropZone/styles.module.css
|
30006
|
+
var styles_default4 = {
|
30007
|
+
DropZone: "styles_DropZone",
|
30008
|
+
"DropZone-content": "styles_DropZone-content",
|
30009
|
+
"DropZone--userIsDragging": "styles_DropZone--userIsDragging",
|
30010
|
+
"DropZone--draggingOverArea": "styles_DropZone--draggingOverArea",
|
30011
|
+
"DropZone--draggingNewComponent": "styles_DropZone--draggingNewComponent",
|
30012
|
+
"DropZone--isAreaSelected": "styles_DropZone--isAreaSelected",
|
30013
|
+
"DropZone--hoveringOverArea": "styles_DropZone--hoveringOverArea",
|
30014
|
+
"DropZone--isDisabled": "styles_DropZone--isDisabled",
|
30015
|
+
"DropZone--isRootZone": "styles_DropZone--isRootZone",
|
30016
|
+
"DropZone--hasChildren": "styles_DropZone--hasChildren",
|
30017
|
+
"DropZone--isDestination": "styles_DropZone--isDestination",
|
30018
|
+
"DropZone-item": "styles_DropZone-item",
|
30019
|
+
"DropZone-hitbox": "styles_DropZone-hitbox"
|
30020
|
+
};
|
29974
30021
|
|
29975
30022
|
// components/DropZone/context.tsx
|
29976
30023
|
init_react_import();
|
@@ -30095,7 +30142,7 @@ var DropZoneProvider = ({
|
|
30095
30142
|
|
30096
30143
|
// components/DropZone/index.tsx
|
30097
30144
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
30098
|
-
var getClassName5 = get_class_name_factory_default("DropZone",
|
30145
|
+
var getClassName5 = get_class_name_factory_default("DropZone", styles_default4);
|
30099
30146
|
function DropZoneEdit({ zone, allow, disallow, style }) {
|
30100
30147
|
var _a;
|
30101
30148
|
const appContext2 = useAppContext();
|
@@ -30407,14 +30454,17 @@ init_react_import();
|
|
30407
30454
|
init_react_import();
|
30408
30455
|
var import_react10 = require("react");
|
30409
30456
|
|
30410
|
-
//
|
30411
|
-
|
30412
|
-
|
30457
|
+
// components/IconButton/IconButton.module.css
|
30458
|
+
var IconButton_default = {
|
30459
|
+
IconButton: "IconButton_IconButton",
|
30460
|
+
"IconButton--disabled": "IconButton_IconButton--disabled",
|
30461
|
+
"IconButton-title": "IconButton_IconButton-title"
|
30462
|
+
};
|
30413
30463
|
|
30414
30464
|
// components/IconButton/IconButton.tsx
|
30415
30465
|
var import_react_spinners3 = require("react-spinners");
|
30416
30466
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
30417
|
-
var getClassName6 = get_class_name_factory_default("IconButton",
|
30467
|
+
var getClassName6 = get_class_name_factory_default("IconButton", IconButton_default);
|
30418
30468
|
var IconButton = ({
|
30419
30469
|
children,
|
30420
30470
|
href,
|
@@ -30473,21 +30523,33 @@ var import_react28 = require("react");
|
|
30473
30523
|
// lib/use-placeholder-style.ts
|
30474
30524
|
init_react_import();
|
30475
30525
|
var import_react11 = require("react");
|
30526
|
+
|
30527
|
+
// lib/get-frame.ts
|
30528
|
+
init_react_import();
|
30529
|
+
var getFrame = () => {
|
30530
|
+
let frame = document.querySelector("#preview-frame");
|
30531
|
+
if ((frame == null ? void 0 : frame.tagName) === "IFRAME") {
|
30532
|
+
frame = frame.contentDocument;
|
30533
|
+
}
|
30534
|
+
return frame;
|
30535
|
+
};
|
30536
|
+
|
30537
|
+
// lib/use-placeholder-style.ts
|
30476
30538
|
var usePlaceholderStyle = () => {
|
30477
30539
|
const queryAttr = "data-rfd-drag-handle-draggable-id";
|
30478
30540
|
const [placeholderStyle, setPlaceholderStyle] = (0, import_react11.useState)();
|
30479
30541
|
const onDragStartOrUpdate = (draggedItem) => {
|
30480
|
-
var _a
|
30542
|
+
var _a;
|
30481
30543
|
const draggableId = draggedItem.draggableId;
|
30482
30544
|
const destinationIndex = (draggedItem.destination || draggedItem.source).index;
|
30483
30545
|
const droppableId = (draggedItem.destination || draggedItem.source).droppableId;
|
30484
30546
|
const domQuery = `[${queryAttr}='${draggableId}']`;
|
30485
|
-
const
|
30486
|
-
const draggedDOM =
|
30547
|
+
const frame = getFrame();
|
30548
|
+
const draggedDOM = frame == null ? void 0 : frame.querySelector(domQuery);
|
30487
30549
|
if (!draggedDOM) {
|
30488
30550
|
return;
|
30489
30551
|
}
|
30490
|
-
const targetListElement =
|
30552
|
+
const targetListElement = frame == null ? void 0 : frame.querySelector(
|
30491
30553
|
`[data-rfd-droppable-id='${droppableId}']`
|
30492
30554
|
);
|
30493
30555
|
const { clientHeight } = draggedDOM;
|
@@ -30495,7 +30557,7 @@ var usePlaceholderStyle = () => {
|
|
30495
30557
|
return;
|
30496
30558
|
}
|
30497
30559
|
let clientY = 0;
|
30498
|
-
const isSameDroppable = draggedItem.source.droppableId === ((
|
30560
|
+
const isSameDroppable = draggedItem.source.droppableId === ((_a = draggedItem.destination) == null ? void 0 : _a.droppableId);
|
30499
30561
|
if (destinationIndex > 0) {
|
30500
30562
|
const end = destinationIndex > draggedItem.source.index && isSameDroppable ? destinationIndex + 1 : destinationIndex;
|
30501
30563
|
const children = Array.from(targetListElement.children).filter(
|
@@ -30522,20 +30584,39 @@ var usePlaceholderStyle = () => {
|
|
30522
30584
|
// components/SidebarSection/index.tsx
|
30523
30585
|
init_react_import();
|
30524
30586
|
|
30525
|
-
//
|
30526
|
-
|
30527
|
-
|
30587
|
+
// components/SidebarSection/styles.module.css
|
30588
|
+
var styles_default5 = {
|
30589
|
+
SidebarSection: "styles_SidebarSection",
|
30590
|
+
"SidebarSection-title": "styles_SidebarSection-title",
|
30591
|
+
"SidebarSection--noBorderTop": "styles_SidebarSection--noBorderTop",
|
30592
|
+
"SidebarSection-content": "styles_SidebarSection-content",
|
30593
|
+
"SidebarSection--noPadding": "styles_SidebarSection--noPadding",
|
30594
|
+
"SidebarSection-breadcrumbLabel": "styles_SidebarSection-breadcrumbLabel",
|
30595
|
+
"SidebarSection-breadcrumbs": "styles_SidebarSection-breadcrumbs",
|
30596
|
+
"SidebarSection-breadcrumb": "styles_SidebarSection-breadcrumb",
|
30597
|
+
"SidebarSection-heading": "styles_SidebarSection-heading",
|
30598
|
+
"SidebarSection-loadingOverlay": "styles_SidebarSection-loadingOverlay"
|
30599
|
+
};
|
30528
30600
|
|
30529
30601
|
// components/Heading/index.tsx
|
30530
30602
|
init_react_import();
|
30531
30603
|
|
30532
|
-
//
|
30533
|
-
|
30534
|
-
|
30604
|
+
// components/Heading/styles.module.css
|
30605
|
+
var styles_default6 = {
|
30606
|
+
Heading: "styles_Heading",
|
30607
|
+
"Heading--xxxxl": "styles_Heading--xxxxl",
|
30608
|
+
"Heading--xxxl": "styles_Heading--xxxl",
|
30609
|
+
"Heading--xxl": "styles_Heading--xxl",
|
30610
|
+
"Heading--xl": "styles_Heading--xl",
|
30611
|
+
"Heading--l": "styles_Heading--l",
|
30612
|
+
"Heading--m": "styles_Heading--m",
|
30613
|
+
"Heading--s": "styles_Heading--s",
|
30614
|
+
"Heading--xs": "styles_Heading--xs"
|
30615
|
+
};
|
30535
30616
|
|
30536
30617
|
// components/Heading/index.tsx
|
30537
30618
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
30538
|
-
var getClassName7 = get_class_name_factory_default("Heading",
|
30619
|
+
var getClassName7 = get_class_name_factory_default("Heading", styles_default6);
|
30539
30620
|
var Heading = ({ children, rank, size = "m" }) => {
|
30540
30621
|
const Tag = rank ? `h${rank}` : "span";
|
30541
30622
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
@@ -30618,7 +30699,7 @@ var useBreadcrumbs = (renderCount) => {
|
|
30618
30699
|
// components/SidebarSection/index.tsx
|
30619
30700
|
var import_react_spinners4 = require("react-spinners");
|
30620
30701
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
30621
|
-
var getClassName8 = get_class_name_factory_default("SidebarSection",
|
30702
|
+
var getClassName8 = get_class_name_factory_default("SidebarSection", styles_default5);
|
30622
30703
|
var SidebarSection = ({
|
30623
30704
|
children,
|
30624
30705
|
title,
|
@@ -31228,13 +31309,17 @@ var useResolvedData = (appState, config, dispatch) => {
|
|
31228
31309
|
// components/MenuBar/index.tsx
|
31229
31310
|
init_react_import();
|
31230
31311
|
|
31231
|
-
//
|
31232
|
-
|
31233
|
-
|
31312
|
+
// components/MenuBar/styles.module.css
|
31313
|
+
var styles_default7 = {
|
31314
|
+
MenuBar: "styles_MenuBar",
|
31315
|
+
"MenuBar--menuOpen": "styles_MenuBar--menuOpen",
|
31316
|
+
"MenuBar-inner": "styles_MenuBar-inner",
|
31317
|
+
"MenuBar-history": "styles_MenuBar-history"
|
31318
|
+
};
|
31234
31319
|
|
31235
31320
|
// components/MenuBar/index.tsx
|
31236
31321
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
31237
|
-
var getClassName9 = get_class_name_factory_default("MenuBar",
|
31322
|
+
var getClassName9 = get_class_name_factory_default("MenuBar", styles_default7);
|
31238
31323
|
var MenuBar = ({
|
31239
31324
|
appState,
|
31240
31325
|
data = { content: [], root: { props: { title: "" } } },
|
@@ -31298,9 +31383,24 @@ var MenuBar = ({
|
|
31298
31383
|
);
|
31299
31384
|
};
|
31300
31385
|
|
31301
|
-
//
|
31302
|
-
|
31303
|
-
|
31386
|
+
// components/Puck/styles.module.css
|
31387
|
+
var styles_default8 = {
|
31388
|
+
Puck: "styles_Puck",
|
31389
|
+
"Puck--leftSideBarVisible": "styles_Puck--leftSideBarVisible",
|
31390
|
+
"Puck--rightSideBarVisible": "styles_Puck--rightSideBarVisible",
|
31391
|
+
"Puck-header": "styles_Puck-header",
|
31392
|
+
"Puck-headerInner": "styles_Puck-headerInner",
|
31393
|
+
"Puck-headerToggle": "styles_Puck-headerToggle",
|
31394
|
+
"Puck-rightSideBarToggle": "styles_Puck-rightSideBarToggle",
|
31395
|
+
"Puck-leftSideBarToggle": "styles_Puck-leftSideBarToggle",
|
31396
|
+
"Puck-headerTitle": "styles_Puck-headerTitle",
|
31397
|
+
"Puck-headerPath": "styles_Puck-headerPath",
|
31398
|
+
"Puck-headerTools": "styles_Puck-headerTools",
|
31399
|
+
"Puck-menuButton": "styles_Puck-menuButton",
|
31400
|
+
"Puck--menuOpen": "styles_Puck--menuOpen",
|
31401
|
+
"Puck-leftSideBar": "styles_Puck-leftSideBar",
|
31402
|
+
"Puck-rightSideBar": "styles_Puck-rightSideBar"
|
31403
|
+
};
|
31304
31404
|
|
31305
31405
|
// components/Puck/components/Fields/index.tsx
|
31306
31406
|
init_react_import();
|
@@ -31309,9 +31409,19 @@ var import_react_spinners6 = require("react-spinners");
|
|
31309
31409
|
// components/InputOrGroup/index.tsx
|
31310
31410
|
init_react_import();
|
31311
31411
|
|
31312
|
-
//
|
31313
|
-
|
31314
|
-
|
31412
|
+
// components/InputOrGroup/styles.module.css
|
31413
|
+
var styles_default9 = {
|
31414
|
+
Input: "styles_Input",
|
31415
|
+
"Input-label": "styles_Input-label",
|
31416
|
+
"Input-labelIcon": "styles_Input-labelIcon",
|
31417
|
+
"Input-disabledIcon": "styles_Input-disabledIcon",
|
31418
|
+
"Input-input": "styles_Input-input",
|
31419
|
+
"Input--readOnly": "styles_Input--readOnly",
|
31420
|
+
"Input-radioGroupItems": "styles_Input-radioGroupItems",
|
31421
|
+
"Input-radio": "styles_Input-radio",
|
31422
|
+
"Input-radioInner": "styles_Input-radioInner",
|
31423
|
+
"Input-radioInput": "styles_Input-radioInput"
|
31424
|
+
};
|
31315
31425
|
|
31316
31426
|
// components/InputOrGroup/index.tsx
|
31317
31427
|
var import_react18 = require("react");
|
@@ -31322,9 +31432,22 @@ init_react_import();
|
|
31322
31432
|
// components/InputOrGroup/fields/ArrayField/index.tsx
|
31323
31433
|
init_react_import();
|
31324
31434
|
|
31325
|
-
//
|
31326
|
-
|
31327
|
-
|
31435
|
+
// components/InputOrGroup/fields/ArrayField/styles.module.css
|
31436
|
+
var styles_default10 = {
|
31437
|
+
ArrayField: "styles_ArrayField",
|
31438
|
+
"ArrayField--isDraggingFrom": "styles_ArrayField--isDraggingFrom",
|
31439
|
+
"ArrayField-addButton": "styles_ArrayField-addButton",
|
31440
|
+
"ArrayField--hasItems": "styles_ArrayField--hasItems",
|
31441
|
+
ArrayFieldItem: "styles_ArrayFieldItem",
|
31442
|
+
"ArrayFieldItem--isDragging": "styles_ArrayFieldItem--isDragging",
|
31443
|
+
"ArrayFieldItem--isExpanded": "styles_ArrayFieldItem--isExpanded",
|
31444
|
+
"ArrayFieldItem-summary": "styles_ArrayFieldItem-summary",
|
31445
|
+
"ArrayFieldItem--readOnly": "styles_ArrayFieldItem--readOnly",
|
31446
|
+
"ArrayFieldItem-body": "styles_ArrayFieldItem-body",
|
31447
|
+
"ArrayFieldItem-fieldset": "styles_ArrayFieldItem-fieldset",
|
31448
|
+
"ArrayFieldItem-rhs": "styles_ArrayFieldItem-rhs",
|
31449
|
+
"ArrayFieldItem-actions": "styles_ArrayFieldItem-actions"
|
31450
|
+
};
|
31328
31451
|
|
31329
31452
|
// components/InputOrGroup/fields/ArrayField/index.tsx
|
31330
31453
|
var import_react14 = require("react");
|
@@ -31336,14 +31459,14 @@ var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
31336
31459
|
var DefaultDragDropContext = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jsx_runtime14.Fragment, { children });
|
31337
31460
|
var DragDropContext = (props) => {
|
31338
31461
|
const { status } = useAppContext();
|
31339
|
-
const El = status
|
31462
|
+
const El = status !== "LOADING" ? import_dnd4.DragDropContext : DefaultDragDropContext;
|
31340
31463
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(El, __spreadValues({}, props));
|
31341
31464
|
};
|
31342
31465
|
|
31343
31466
|
// components/InputOrGroup/fields/ArrayField/index.tsx
|
31344
31467
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
31345
|
-
var getClassName10 = get_class_name_factory_default("ArrayField",
|
31346
|
-
var getClassNameItem2 = get_class_name_factory_default("ArrayFieldItem",
|
31468
|
+
var getClassName10 = get_class_name_factory_default("ArrayField", styles_default10);
|
31469
|
+
var getClassNameItem2 = get_class_name_factory_default("ArrayFieldItem", styles_default10);
|
31347
31470
|
var ArrayField = ({
|
31348
31471
|
field,
|
31349
31472
|
onChange,
|
@@ -31503,6 +31626,7 @@ var ArrayField = ({
|
|
31503
31626
|
!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)(
|
31504
31627
|
IconButton,
|
31505
31628
|
{
|
31629
|
+
type: "button",
|
31506
31630
|
disabled: field.min !== void 0 && field.min >= localState.arrayState.items.length,
|
31507
31631
|
onClick: (e) => {
|
31508
31632
|
e.stopPropagation();
|
@@ -31567,6 +31691,7 @@ var ArrayField = ({
|
|
31567
31691
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
31568
31692
|
"button",
|
31569
31693
|
{
|
31694
|
+
type: "button",
|
31570
31695
|
className: getClassName10("addButton"),
|
31571
31696
|
disabled: field.max !== void 0 && localState.arrayState.items.length >= field.max,
|
31572
31697
|
onClick: () => {
|
@@ -31594,7 +31719,7 @@ var ArrayField = ({
|
|
31594
31719
|
// components/InputOrGroup/fields/DefaultField/index.tsx
|
31595
31720
|
init_react_import();
|
31596
31721
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
31597
|
-
var getClassName11 = get_class_name_factory_default("Input",
|
31722
|
+
var getClassName11 = get_class_name_factory_default("Input", styles_default9);
|
31598
31723
|
var DefaultField = ({
|
31599
31724
|
field,
|
31600
31725
|
onChange,
|
@@ -31647,22 +31772,52 @@ var import_react17 = require("react");
|
|
31647
31772
|
init_react_import();
|
31648
31773
|
var import_react16 = require("react");
|
31649
31774
|
|
31650
|
-
//
|
31651
|
-
|
31652
|
-
|
31775
|
+
// components/ExternalInput/styles.module.css
|
31776
|
+
var styles_default11 = {
|
31777
|
+
"ExternalInput-actions": "styles_ExternalInput-actions",
|
31778
|
+
"ExternalInput-button": "styles_ExternalInput-button",
|
31779
|
+
"ExternalInput--dataSelected": "styles_ExternalInput--dataSelected",
|
31780
|
+
"ExternalInput-detachButton": "styles_ExternalInput-detachButton",
|
31781
|
+
ExternalInputModal: "styles_ExternalInputModal",
|
31782
|
+
"ExternalInputModal-grid": "styles_ExternalInputModal-grid",
|
31783
|
+
"ExternalInputModal--filtersToggled": "styles_ExternalInputModal--filtersToggled",
|
31784
|
+
"ExternalInputModal-filters": "styles_ExternalInputModal-filters",
|
31785
|
+
"ExternalInputModal-masthead": "styles_ExternalInputModal-masthead",
|
31786
|
+
"ExternalInputModal-tableWrapper": "styles_ExternalInputModal-tableWrapper",
|
31787
|
+
"ExternalInputModal-table": "styles_ExternalInputModal-table",
|
31788
|
+
"ExternalInputModal-thead": "styles_ExternalInputModal-thead",
|
31789
|
+
"ExternalInputModal-th": "styles_ExternalInputModal-th",
|
31790
|
+
"ExternalInputModal-td": "styles_ExternalInputModal-td",
|
31791
|
+
"ExternalInputModal-tr": "styles_ExternalInputModal-tr",
|
31792
|
+
"ExternalInputModal-tbody": "styles_ExternalInputModal-tbody",
|
31793
|
+
"ExternalInputModal--hasData": "styles_ExternalInputModal--hasData",
|
31794
|
+
"ExternalInputModal-loadingBanner": "styles_ExternalInputModal-loadingBanner",
|
31795
|
+
"ExternalInputModal--isLoading": "styles_ExternalInputModal--isLoading",
|
31796
|
+
"ExternalInputModal-searchForm": "styles_ExternalInputModal-searchForm",
|
31797
|
+
"ExternalInputModal-search": "styles_ExternalInputModal-search",
|
31798
|
+
"ExternalInputModal-searchIcon": "styles_ExternalInputModal-searchIcon",
|
31799
|
+
"ExternalInputModal-searchIconText": "styles_ExternalInputModal-searchIconText",
|
31800
|
+
"ExternalInputModal-searchInput": "styles_ExternalInputModal-searchInput",
|
31801
|
+
"ExternalInputModal-searchActions": "styles_ExternalInputModal-searchActions",
|
31802
|
+
"ExternalInputModal-searchActionIcon": "styles_ExternalInputModal-searchActionIcon",
|
31803
|
+
"ExternalInputModal-footer": "styles_ExternalInputModal-footer"
|
31804
|
+
};
|
31653
31805
|
|
31654
31806
|
// components/Modal/index.tsx
|
31655
31807
|
init_react_import();
|
31656
31808
|
var import_react15 = require("react");
|
31657
31809
|
|
31658
|
-
//
|
31659
|
-
|
31660
|
-
|
31810
|
+
// components/Modal/styles.module.css
|
31811
|
+
var styles_default12 = {
|
31812
|
+
Modal: "styles_Modal",
|
31813
|
+
"Modal--isOpen": "styles_Modal--isOpen",
|
31814
|
+
"Modal-inner": "styles_Modal-inner"
|
31815
|
+
};
|
31661
31816
|
|
31662
31817
|
// components/Modal/index.tsx
|
31663
31818
|
var import_react_dom = __toESM(require_react_dom());
|
31664
31819
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
31665
|
-
var getClassName12 = get_class_name_factory_default("Modal",
|
31820
|
+
var getClassName12 = get_class_name_factory_default("Modal", styles_default12);
|
31666
31821
|
var Modal = ({
|
31667
31822
|
children,
|
31668
31823
|
onClose,
|
@@ -31691,8 +31846,8 @@ var Modal = ({
|
|
31691
31846
|
// components/ExternalInput/index.tsx
|
31692
31847
|
var import_react_spinners5 = require("react-spinners");
|
31693
31848
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
31694
|
-
var getClassName13 = get_class_name_factory_default("ExternalInput",
|
31695
|
-
var getClassNameModal = get_class_name_factory_default("ExternalInputModal",
|
31849
|
+
var getClassName13 = get_class_name_factory_default("ExternalInput", styles_default11);
|
31850
|
+
var getClassNameModal = get_class_name_factory_default("ExternalInputModal", styles_default11);
|
31696
31851
|
var dataCache = {};
|
31697
31852
|
var ExternalInput = ({
|
31698
31853
|
field,
|
@@ -31756,6 +31911,7 @@ var ExternalInput = ({
|
|
31756
31911
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
31757
31912
|
"button",
|
31758
31913
|
{
|
31914
|
+
type: "button",
|
31759
31915
|
onClick: () => setOpen(true),
|
31760
31916
|
className: getClassName13("button"),
|
31761
31917
|
children: value ? field.getItemSummary ? field.getItemSummary(value) : "External item" : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
@@ -31943,7 +32099,7 @@ var ExternalField = ({
|
|
31943
32099
|
// components/InputOrGroup/fields/RadioField/index.tsx
|
31944
32100
|
init_react_import();
|
31945
32101
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
31946
|
-
var getClassName14 = get_class_name_factory_default("Input",
|
32102
|
+
var getClassName14 = get_class_name_factory_default("Input", styles_default9);
|
31947
32103
|
var RadioField = ({
|
31948
32104
|
field,
|
31949
32105
|
onChange,
|
@@ -31998,7 +32154,7 @@ var RadioField = ({
|
|
31998
32154
|
// components/InputOrGroup/fields/SelectField/index.tsx
|
31999
32155
|
init_react_import();
|
32000
32156
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
32001
|
-
var getClassName15 = get_class_name_factory_default("Input",
|
32157
|
+
var getClassName15 = get_class_name_factory_default("Input", styles_default9);
|
32002
32158
|
var SelectField = ({
|
32003
32159
|
field,
|
32004
32160
|
onChange,
|
@@ -32048,7 +32204,7 @@ var SelectField = ({
|
|
32048
32204
|
// components/InputOrGroup/fields/TextareaField/index.tsx
|
32049
32205
|
init_react_import();
|
32050
32206
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
32051
|
-
var getClassName16 = get_class_name_factory_default("Input",
|
32207
|
+
var getClassName16 = get_class_name_factory_default("Input", styles_default9);
|
32052
32208
|
var TextareaField = ({
|
32053
32209
|
onChange,
|
32054
32210
|
readOnly,
|
@@ -32087,14 +32243,16 @@ var import_use_debounce2 = require("use-debounce");
|
|
32087
32243
|
// components/InputOrGroup/fields/ObjectField/index.tsx
|
32088
32244
|
init_react_import();
|
32089
32245
|
|
32090
|
-
//
|
32091
|
-
|
32092
|
-
|
32246
|
+
// components/InputOrGroup/fields/ObjectField/styles.module.css
|
32247
|
+
var styles_default13 = {
|
32248
|
+
ObjectField: "styles_ObjectField",
|
32249
|
+
"ObjectField-fieldset": "styles_ObjectField-fieldset"
|
32250
|
+
};
|
32093
32251
|
|
32094
32252
|
// components/InputOrGroup/fields/ObjectField/index.tsx
|
32095
32253
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
32096
|
-
var getClassName17 = get_class_name_factory_default("ObjectField",
|
32097
|
-
var getClassNameItem3 = get_class_name_factory_default("ObjectFieldItem",
|
32254
|
+
var getClassName17 = get_class_name_factory_default("ObjectField", styles_default13);
|
32255
|
+
var getClassNameItem3 = get_class_name_factory_default("ObjectFieldItem", styles_default13);
|
32098
32256
|
var ObjectField = ({
|
32099
32257
|
field,
|
32100
32258
|
onChange,
|
@@ -32148,7 +32306,7 @@ var ObjectField = ({
|
|
32148
32306
|
|
32149
32307
|
// components/InputOrGroup/index.tsx
|
32150
32308
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
32151
|
-
var getClassName18 = get_class_name_factory_default("Input",
|
32309
|
+
var getClassName18 = get_class_name_factory_default("Input", styles_default9);
|
32152
32310
|
var FieldLabel = ({
|
32153
32311
|
children,
|
32154
32312
|
icon,
|
@@ -32251,14 +32409,16 @@ var InputOrGroup = (_a) => {
|
|
32251
32409
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Render2, __spreadProps(__spreadValues({}, mergedProps), { children }));
|
32252
32410
|
};
|
32253
32411
|
|
32254
|
-
//
|
32255
|
-
|
32256
|
-
|
32412
|
+
// components/Puck/components/Fields/styles.module.css
|
32413
|
+
var styles_default14 = {
|
32414
|
+
PuckFields: "styles_PuckFields",
|
32415
|
+
"PuckFields-loadingOverlay": "styles_PuckFields-loadingOverlay"
|
32416
|
+
};
|
32257
32417
|
|
32258
32418
|
// components/Puck/components/Fields/index.tsx
|
32259
32419
|
var import_react19 = require("react");
|
32260
32420
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
32261
|
-
var getClassName19 = get_class_name_factory_default("PuckFields",
|
32421
|
+
var getClassName19 = get_class_name_factory_default("PuckFields", styles_default14);
|
32262
32422
|
var defaultPageFields = {
|
32263
32423
|
title: { type: "text" }
|
32264
32424
|
};
|
@@ -32408,13 +32568,18 @@ var import_react20 = require("react");
|
|
32408
32568
|
// components/ComponentList/index.tsx
|
32409
32569
|
init_react_import();
|
32410
32570
|
|
32411
|
-
//
|
32412
|
-
|
32413
|
-
|
32571
|
+
// components/ComponentList/styles.module.css
|
32572
|
+
var styles_default15 = {
|
32573
|
+
ComponentList: "styles_ComponentList",
|
32574
|
+
"ComponentList--isExpanded": "styles_ComponentList--isExpanded",
|
32575
|
+
"ComponentList-content": "styles_ComponentList-content",
|
32576
|
+
"ComponentList-title": "styles_ComponentList-title",
|
32577
|
+
"ComponentList-titleIcon": "styles_ComponentList-titleIcon"
|
32578
|
+
};
|
32414
32579
|
|
32415
32580
|
// components/ComponentList/index.tsx
|
32416
32581
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
32417
|
-
var getClassName20 = get_class_name_factory_default("ComponentList",
|
32582
|
+
var getClassName20 = get_class_name_factory_default("ComponentList", styles_default15);
|
32418
32583
|
var ComponentListItem = ({
|
32419
32584
|
name,
|
32420
32585
|
label,
|
@@ -32550,15 +32715,17 @@ init_react_import();
|
|
32550
32715
|
var import_react22 = require("react");
|
32551
32716
|
var import_auto_frame_component = __toESM(require("@measured/auto-frame-component"));
|
32552
32717
|
|
32553
|
-
//
|
32554
|
-
|
32555
|
-
|
32718
|
+
// components/Puck/components/Preview/styles.module.css
|
32719
|
+
var styles_default16 = {
|
32720
|
+
PuckPreview: "styles_PuckPreview",
|
32721
|
+
"PuckPreview-frame": "styles_PuckPreview-frame"
|
32722
|
+
};
|
32556
32723
|
|
32557
32724
|
// components/Puck/components/Preview/index.tsx
|
32558
32725
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
32559
|
-
var getClassName21 = get_class_name_factory_default("PuckPreview",
|
32726
|
+
var getClassName21 = get_class_name_factory_default("PuckPreview", styles_default16);
|
32560
32727
|
var Preview = ({ id = "puck-preview" }) => {
|
32561
|
-
const { config, dispatch, state } = useAppContext();
|
32728
|
+
const { config, dispatch, state, setStatus, iframe } = useAppContext();
|
32562
32729
|
const Page = (0, import_react22.useCallback)(
|
32563
32730
|
(pageProps) => {
|
32564
32731
|
var _a, _b;
|
@@ -32568,30 +32735,27 @@ var Preview = ({ id = "puck-preview" }) => {
|
|
32568
32735
|
);
|
32569
32736
|
const rootProps = state.data.root.props || state.data.root;
|
32570
32737
|
const ref = (0, import_react22.useRef)(null);
|
32571
|
-
const [stylesLoaded, setStylesLoaded] = (0, import_react22.useState)(false);
|
32572
32738
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
32573
32739
|
"div",
|
32574
32740
|
{
|
32575
|
-
className: getClassName21(
|
32741
|
+
className: getClassName21(),
|
32576
32742
|
id,
|
32577
32743
|
onClick: () => {
|
32578
32744
|
dispatch({ type: "setUi", ui: __spreadProps(__spreadValues({}, state.ui), { itemSelector: null }) });
|
32579
32745
|
},
|
32580
|
-
children:
|
32746
|
+
children: iframe.enabled ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
32581
32747
|
import_auto_frame_component.default,
|
32582
32748
|
{
|
32583
|
-
id: "preview-
|
32584
|
-
className: getClassName21("
|
32749
|
+
id: "preview-frame",
|
32750
|
+
className: getClassName21("frame"),
|
32585
32751
|
"data-rfd-iframe": true,
|
32586
32752
|
ref,
|
32587
|
-
debug: true,
|
32588
32753
|
onStylesLoaded: () => {
|
32589
|
-
|
32590
|
-
setStylesLoaded(true);
|
32754
|
+
setStatus("READY");
|
32591
32755
|
},
|
32592
32756
|
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Page, __spreadProps(__spreadValues({ dispatch, state }, rootProps), { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DropZone, { zone: rootDroppableId }) }))
|
32593
32757
|
}
|
32594
|
-
) })
|
32758
|
+
) : /* @__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 }) })) })
|
32595
32759
|
}
|
32596
32760
|
);
|
32597
32761
|
};
|
@@ -32623,9 +32787,24 @@ var areaContainsZones = (data, area) => {
|
|
32623
32787
|
// components/LayerTree/index.tsx
|
32624
32788
|
init_react_import();
|
32625
32789
|
|
32626
|
-
//
|
32627
|
-
|
32628
|
-
|
32790
|
+
// components/LayerTree/styles.module.css
|
32791
|
+
var styles_default17 = {
|
32792
|
+
LayerTree: "styles_LayerTree",
|
32793
|
+
"LayerTree-zoneTitle": "styles_LayerTree-zoneTitle",
|
32794
|
+
"LayerTree-helper": "styles_LayerTree-helper",
|
32795
|
+
Layer: "styles_Layer",
|
32796
|
+
"Layer-inner": "styles_Layer-inner",
|
32797
|
+
"Layer--containsZone": "styles_Layer--containsZone",
|
32798
|
+
"Layer-clickable": "styles_Layer-clickable",
|
32799
|
+
"Layer--isSelected": "styles_Layer--isSelected",
|
32800
|
+
"Layer-chevron": "styles_Layer-chevron",
|
32801
|
+
"Layer--childIsSelected": "styles_Layer--childIsSelected",
|
32802
|
+
"Layer-zones": "styles_Layer-zones",
|
32803
|
+
"Layer-title": "styles_Layer-title",
|
32804
|
+
"Layer-name": "styles_Layer-name",
|
32805
|
+
"Layer-icon": "styles_Layer-icon",
|
32806
|
+
"Layer-zoneIcon": "styles_Layer-zoneIcon"
|
32807
|
+
};
|
32629
32808
|
|
32630
32809
|
// lib/scroll-into-view.ts
|
32631
32810
|
init_react_import();
|
@@ -32654,8 +32833,8 @@ var isChildOfZone = (item, maybeChild, ctx) => {
|
|
32654
32833
|
|
32655
32834
|
// components/LayerTree/index.tsx
|
32656
32835
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
32657
|
-
var getClassName22 = get_class_name_factory_default("LayerTree",
|
32658
|
-
var getClassNameLayer = get_class_name_factory_default("Layer",
|
32836
|
+
var getClassName22 = get_class_name_factory_default("LayerTree", styles_default17);
|
32837
|
+
var getClassNameLayer = get_class_name_factory_default("Layer", styles_default17);
|
32659
32838
|
var LayerTree = ({
|
32660
32839
|
data,
|
32661
32840
|
config,
|
@@ -32714,14 +32893,9 @@ var LayerTree = ({
|
|
32714
32893
|
zone
|
32715
32894
|
});
|
32716
32895
|
const id = zoneContent[i].props.id;
|
32717
|
-
const
|
32718
|
-
if (!(iframe == null ? void 0 : iframe.contentDocument)) {
|
32719
|
-
throw new Error(
|
32720
|
-
`Preview iframe could not be found when trying to scroll to item ${id}`
|
32721
|
-
);
|
32722
|
-
}
|
32896
|
+
const frame = getFrame();
|
32723
32897
|
scrollIntoView(
|
32724
|
-
|
32898
|
+
frame == null ? void 0 : frame.querySelector(
|
32725
32899
|
`[data-rfd-drag-handle-draggable-id="draggable-${id}"]`
|
32726
32900
|
)
|
32727
32901
|
);
|
@@ -33060,9 +33234,14 @@ var import_react27 = require("react");
|
|
33060
33234
|
init_react_import();
|
33061
33235
|
var import_react26 = require("react");
|
33062
33236
|
|
33063
|
-
//
|
33064
|
-
|
33065
|
-
|
33237
|
+
// components/ViewportControls/styles.module.css
|
33238
|
+
var styles_default18 = {
|
33239
|
+
ViewportControls: "styles_ViewportControls",
|
33240
|
+
"ViewportControls-divider": "styles_ViewportControls-divider",
|
33241
|
+
"ViewportControls-zoomSelect": "styles_ViewportControls-zoomSelect",
|
33242
|
+
"ViewportButton--isActive": "styles_ViewportButton--isActive",
|
33243
|
+
"ViewportButton-inner": "styles_ViewportButton-inner"
|
33244
|
+
};
|
33066
33245
|
|
33067
33246
|
// components/ViewportControls/index.tsx
|
33068
33247
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
@@ -33071,8 +33250,8 @@ var icons = {
|
|
33071
33250
|
Tablet: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Tablet, { size: 16 }),
|
33072
33251
|
Monitor: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Monitor, { size: 16 })
|
33073
33252
|
};
|
33074
|
-
var getClassName23 = get_class_name_factory_default("ViewportControls",
|
33075
|
-
var getClassNameButton = get_class_name_factory_default("ViewportButton",
|
33253
|
+
var getClassName23 = get_class_name_factory_default("ViewportControls", styles_default18);
|
33254
|
+
var getClassNameButton = get_class_name_factory_default("ViewportButton", styles_default18);
|
33076
33255
|
var ViewportButton = ({
|
33077
33256
|
children,
|
33078
33257
|
height = "auto",
|
@@ -33081,7 +33260,10 @@ var ViewportButton = ({
|
|
33081
33260
|
onClick
|
33082
33261
|
}) => {
|
33083
33262
|
const { state } = useAppContext();
|
33084
|
-
const isActive =
|
33263
|
+
const [isActive, setIsActive] = (0, import_react26.useState)(false);
|
33264
|
+
(0, import_react26.useEffect)(() => {
|
33265
|
+
setIsActive(width === state.ui.viewports.current.width);
|
33266
|
+
}, [width, state.ui.viewports.current.width]);
|
33085
33267
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: getClassNameButton({ isActive }), children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
33086
33268
|
IconButton,
|
33087
33269
|
{
|
@@ -33110,8 +33292,7 @@ var ViewportControls = ({
|
|
33110
33292
|
onViewportChange,
|
33111
33293
|
onZoom
|
33112
33294
|
}) => {
|
33113
|
-
const {
|
33114
|
-
const viewport = state.ui.viewports.current;
|
33295
|
+
const { viewports } = useAppContext();
|
33115
33296
|
const defaultsContainAutoZoom = defaultZoomOptions.find(
|
33116
33297
|
(option) => option.value === autoZoom
|
33117
33298
|
);
|
@@ -33128,14 +33309,14 @@ var ViewportControls = ({
|
|
33128
33309
|
[autoZoom]
|
33129
33310
|
);
|
33130
33311
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: getClassName23(), children: [
|
33131
|
-
viewports.map((
|
33312
|
+
viewports.map((viewport, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
33132
33313
|
ViewportButton,
|
33133
33314
|
{
|
33134
|
-
height:
|
33135
|
-
width:
|
33136
|
-
title:
|
33315
|
+
height: viewport.height,
|
33316
|
+
width: viewport.width,
|
33317
|
+
title: viewport.label ? `Switch to ${viewport.label} viewport` : "Switch viewport",
|
33137
33318
|
onClick: onViewportChange,
|
33138
|
-
children: typeof
|
33319
|
+
children: typeof viewport.icon === "string" ? icons[viewport.icon] || viewport.icon : viewport.icon || icons.Smartphone
|
33139
33320
|
},
|
33140
33321
|
i
|
33141
33322
|
)),
|
@@ -33196,6 +33377,15 @@ var ViewportControls = ({
|
|
33196
33377
|
] });
|
33197
33378
|
};
|
33198
33379
|
|
33380
|
+
// components/Puck/components/Canvas/styles.module.css
|
33381
|
+
var styles_default19 = {
|
33382
|
+
PuckCanvas: "styles_PuckCanvas",
|
33383
|
+
"PuckCanvas-controls": "styles_PuckCanvas-controls",
|
33384
|
+
"PuckCanvas-inner": "styles_PuckCanvas-inner",
|
33385
|
+
"PuckCanvas-root": "styles_PuckCanvas-root",
|
33386
|
+
"PuckCanvas--ready": "styles_PuckCanvas--ready"
|
33387
|
+
};
|
33388
|
+
|
33199
33389
|
// lib/get-zoom-config.ts
|
33200
33390
|
init_react_import();
|
33201
33391
|
var RESET_ZOOM_SMALLER_THAN_FRAME = true;
|
@@ -33228,9 +33418,10 @@ var getZoomConfig = (uiViewport, frame, zoom) => {
|
|
33228
33418
|
|
33229
33419
|
// components/Puck/components/Canvas/index.tsx
|
33230
33420
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
33231
|
-
var getClassName24 = get_class_name_factory_default("
|
33421
|
+
var getClassName24 = get_class_name_factory_default("PuckCanvas", styles_default19);
|
33232
33422
|
var ZOOM_ON_CHANGE = true;
|
33233
33423
|
var Canvas = () => {
|
33424
|
+
const { status, iframe } = useAppContext();
|
33234
33425
|
const { dispatch, state, overrides, setUi, zoomConfig, setZoomConfig } = useAppContext();
|
33235
33426
|
const { ui } = state;
|
33236
33427
|
const frameRef = (0, import_react27.useRef)(null);
|
@@ -33288,14 +33479,16 @@ var Canvas = () => {
|
|
33288
33479
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
33289
33480
|
"div",
|
33290
33481
|
{
|
33291
|
-
className: getClassName24(
|
33482
|
+
className: getClassName24({
|
33483
|
+
ready: status === "READY" || !iframe.enabled
|
33484
|
+
}),
|
33292
33485
|
onClick: () => dispatch({
|
33293
33486
|
type: "setUi",
|
33294
33487
|
ui: { itemSelector: null },
|
33295
33488
|
recordHistory: true
|
33296
33489
|
}),
|
33297
33490
|
children: [
|
33298
|
-
ui.viewports.controlsVisible && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: getClassName24("
|
33491
|
+
ui.viewports.controlsVisible && iframe.enabled && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: getClassName24("controls"), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
33299
33492
|
ViewportControls,
|
33300
33493
|
{
|
33301
33494
|
autoZoom: zoomConfig.autoZoom,
|
@@ -33320,15 +33513,16 @@ var Canvas = () => {
|
|
33320
33513
|
}
|
33321
33514
|
}
|
33322
33515
|
) }),
|
33323
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: getClassName24("
|
33516
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: getClassName24("inner"), ref: frameRef, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
33324
33517
|
"div",
|
33325
33518
|
{
|
33326
33519
|
className: getClassName24("root"),
|
33327
33520
|
style: {
|
33328
|
-
width: ui.viewports.current.width,
|
33521
|
+
width: iframe.enabled ? ui.viewports.current.width : void 0,
|
33329
33522
|
height: zoomConfig.rootHeight,
|
33330
|
-
transform: `scale(${zoomConfig.zoom})
|
33331
|
-
transition: showTransition ? "width 150ms ease-out, height 150ms ease-out, transform 150ms ease-out" : ""
|
33523
|
+
transform: iframe.enabled ? `scale(${zoomConfig.zoom})` : void 0,
|
33524
|
+
transition: showTransition ? "width 150ms ease-out, height 150ms ease-out, transform 150ms ease-out" : "",
|
33525
|
+
overflow: iframe.enabled ? void 0 : "auto"
|
33332
33526
|
},
|
33333
33527
|
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CustomPreview, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Preview, {}) })
|
33334
33528
|
}
|
@@ -33340,7 +33534,7 @@ var Canvas = () => {
|
|
33340
33534
|
|
33341
33535
|
// components/Puck/index.tsx
|
33342
33536
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
33343
|
-
var getClassName25 = get_class_name_factory_default("Puck",
|
33537
|
+
var getClassName25 = get_class_name_factory_default("Puck", styles_default8);
|
33344
33538
|
function Puck({
|
33345
33539
|
children,
|
33346
33540
|
config,
|
@@ -33354,7 +33548,10 @@ function Puck({
|
|
33354
33548
|
renderHeaderActions,
|
33355
33549
|
headerTitle,
|
33356
33550
|
headerPath,
|
33357
|
-
viewports = defaultViewports
|
33551
|
+
viewports = defaultViewports,
|
33552
|
+
iframe = {
|
33553
|
+
enabled: true
|
33554
|
+
}
|
33358
33555
|
}) {
|
33359
33556
|
var _a;
|
33360
33557
|
const historyStore = useHistoryStore();
|
@@ -33372,17 +33569,19 @@ function Puck({
|
|
33372
33569
|
diff: Math.abs(viewportWidth - value.width)
|
33373
33570
|
})).sort((a, b) => a.diff > b.diff ? 1 : -1);
|
33374
33571
|
const closestViewport = viewportDifferences[0].key;
|
33375
|
-
|
33376
|
-
|
33377
|
-
|
33378
|
-
|
33379
|
-
|
33380
|
-
|
33381
|
-
|
33382
|
-
|
33572
|
+
if (iframe.enabled) {
|
33573
|
+
clientUiState = __spreadProps(__spreadValues({}, window.matchMedia("(min-width: 638px)").matches ? {} : {
|
33574
|
+
leftSideBarVisible: false,
|
33575
|
+
rightSideBarVisible: false
|
33576
|
+
}), {
|
33577
|
+
viewports: __spreadProps(__spreadValues({}, initial.viewports), {
|
33578
|
+
current: __spreadProps(__spreadValues({}, initial.viewports.current), {
|
33579
|
+
height: ((_b = (_a2 = initialUi == null ? void 0 : initialUi.viewports) == null ? void 0 : _a2.current) == null ? void 0 : _b.height) || viewports[closestViewport].height || "auto",
|
33580
|
+
width: ((_d = (_c = initialUi == null ? void 0 : initialUi.viewports) == null ? void 0 : _c.current) == null ? void 0 : _d.width) || viewports[closestViewport].width
|
33581
|
+
})
|
33383
33582
|
})
|
33384
|
-
})
|
33385
|
-
}
|
33583
|
+
});
|
33584
|
+
}
|
33386
33585
|
}
|
33387
33586
|
return __spreadProps(__spreadValues({}, defaultAppState), {
|
33388
33587
|
data: initialData,
|
@@ -33540,7 +33739,8 @@ function Puck({
|
|
33540
33739
|
plugins,
|
33541
33740
|
overrides: loadedOverrides,
|
33542
33741
|
history,
|
33543
|
-
viewports
|
33742
|
+
viewports,
|
33743
|
+
iframe
|
33544
33744
|
},
|
33545
33745
|
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
33546
33746
|
DragDropContext,
|