@measured/puck 0.14.0-canary.924c85a → 0.14.0-canary.95280e6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{Config-29dc2731.d.ts → Config-DXxsEDkF.d.ts} +1 -1
- package/dist/index.css +382 -365
- package/dist/index.d.ts +12 -4
- package/dist/index.js +451 -236
- 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 = document.querySelector(domQuery) || (
|
30547
|
+
const frame = getFrame();
|
30548
|
+
const draggedDOM = document.querySelector(domQuery) || (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
|
+
"ArrayField--addDisabled": "styles_ArrayField--addDisabled",
|
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,
|
@@ -31405,12 +31528,15 @@ var ArrayField = ({
|
|
31405
31528
|
[arrayState]
|
31406
31529
|
);
|
31407
31530
|
(0, import_react14.useEffect)(() => {
|
31408
|
-
|
31531
|
+
if (arrayState.items.length > 0) {
|
31532
|
+
setUi(mapArrayStateToUi(arrayState));
|
31533
|
+
}
|
31409
31534
|
}, []);
|
31410
31535
|
const [hovering, setHovering] = (0, import_react14.useState)(false);
|
31411
31536
|
if (field.type !== "array" || !field.arrayFields) {
|
31412
31537
|
return null;
|
31413
31538
|
}
|
31539
|
+
const addDisabled = field.max !== void 0 && localState.arrayState.items.length >= field.max || readOnly;
|
31414
31540
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
31415
31541
|
FieldLabelInternal,
|
31416
31542
|
{
|
@@ -31452,7 +31578,8 @@ var ArrayField = ({
|
|
31452
31578
|
ref: provided.innerRef,
|
31453
31579
|
className: getClassName10({
|
31454
31580
|
isDraggingFrom: !!snapshot.draggingFromThisWith,
|
31455
|
-
hasItems: Array.isArray(value) && value.length > 0
|
31581
|
+
hasItems: Array.isArray(value) && value.length > 0,
|
31582
|
+
addDisabled
|
31456
31583
|
}),
|
31457
31584
|
onMouseOver: (e) => {
|
31458
31585
|
e.stopPropagation();
|
@@ -31503,6 +31630,7 @@ var ArrayField = ({
|
|
31503
31630
|
!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
31631
|
IconButton,
|
31505
31632
|
{
|
31633
|
+
type: "button",
|
31506
31634
|
disabled: field.min !== void 0 && field.min >= localState.arrayState.items.length,
|
31507
31635
|
onClick: (e) => {
|
31508
31636
|
e.stopPropagation();
|
@@ -31564,11 +31692,11 @@ var ArrayField = ({
|
|
31564
31692
|
);
|
31565
31693
|
}),
|
31566
31694
|
provided.placeholder,
|
31567
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
31695
|
+
!addDisabled && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
31568
31696
|
"button",
|
31569
31697
|
{
|
31698
|
+
type: "button",
|
31570
31699
|
className: getClassName10("addButton"),
|
31571
|
-
disabled: field.max !== void 0 && localState.arrayState.items.length >= field.max,
|
31572
31700
|
onClick: () => {
|
31573
31701
|
const existingValue = value || [];
|
31574
31702
|
const newValue = [
|
@@ -31594,7 +31722,7 @@ var ArrayField = ({
|
|
31594
31722
|
// components/InputOrGroup/fields/DefaultField/index.tsx
|
31595
31723
|
init_react_import();
|
31596
31724
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
31597
|
-
var getClassName11 = get_class_name_factory_default("Input",
|
31725
|
+
var getClassName11 = get_class_name_factory_default("Input", styles_default9);
|
31598
31726
|
var DefaultField = ({
|
31599
31727
|
field,
|
31600
31728
|
onChange,
|
@@ -31647,22 +31775,52 @@ var import_react17 = require("react");
|
|
31647
31775
|
init_react_import();
|
31648
31776
|
var import_react16 = require("react");
|
31649
31777
|
|
31650
|
-
//
|
31651
|
-
|
31652
|
-
|
31778
|
+
// components/ExternalInput/styles.module.css
|
31779
|
+
var styles_default11 = {
|
31780
|
+
"ExternalInput-actions": "styles_ExternalInput-actions",
|
31781
|
+
"ExternalInput-button": "styles_ExternalInput-button",
|
31782
|
+
"ExternalInput--dataSelected": "styles_ExternalInput--dataSelected",
|
31783
|
+
"ExternalInput-detachButton": "styles_ExternalInput-detachButton",
|
31784
|
+
ExternalInputModal: "styles_ExternalInputModal",
|
31785
|
+
"ExternalInputModal-grid": "styles_ExternalInputModal-grid",
|
31786
|
+
"ExternalInputModal--filtersToggled": "styles_ExternalInputModal--filtersToggled",
|
31787
|
+
"ExternalInputModal-filters": "styles_ExternalInputModal-filters",
|
31788
|
+
"ExternalInputModal-masthead": "styles_ExternalInputModal-masthead",
|
31789
|
+
"ExternalInputModal-tableWrapper": "styles_ExternalInputModal-tableWrapper",
|
31790
|
+
"ExternalInputModal-table": "styles_ExternalInputModal-table",
|
31791
|
+
"ExternalInputModal-thead": "styles_ExternalInputModal-thead",
|
31792
|
+
"ExternalInputModal-th": "styles_ExternalInputModal-th",
|
31793
|
+
"ExternalInputModal-td": "styles_ExternalInputModal-td",
|
31794
|
+
"ExternalInputModal-tr": "styles_ExternalInputModal-tr",
|
31795
|
+
"ExternalInputModal-tbody": "styles_ExternalInputModal-tbody",
|
31796
|
+
"ExternalInputModal--hasData": "styles_ExternalInputModal--hasData",
|
31797
|
+
"ExternalInputModal-loadingBanner": "styles_ExternalInputModal-loadingBanner",
|
31798
|
+
"ExternalInputModal--isLoading": "styles_ExternalInputModal--isLoading",
|
31799
|
+
"ExternalInputModal-searchForm": "styles_ExternalInputModal-searchForm",
|
31800
|
+
"ExternalInputModal-search": "styles_ExternalInputModal-search",
|
31801
|
+
"ExternalInputModal-searchIcon": "styles_ExternalInputModal-searchIcon",
|
31802
|
+
"ExternalInputModal-searchIconText": "styles_ExternalInputModal-searchIconText",
|
31803
|
+
"ExternalInputModal-searchInput": "styles_ExternalInputModal-searchInput",
|
31804
|
+
"ExternalInputModal-searchActions": "styles_ExternalInputModal-searchActions",
|
31805
|
+
"ExternalInputModal-searchActionIcon": "styles_ExternalInputModal-searchActionIcon",
|
31806
|
+
"ExternalInputModal-footer": "styles_ExternalInputModal-footer"
|
31807
|
+
};
|
31653
31808
|
|
31654
31809
|
// components/Modal/index.tsx
|
31655
31810
|
init_react_import();
|
31656
31811
|
var import_react15 = require("react");
|
31657
31812
|
|
31658
|
-
//
|
31659
|
-
|
31660
|
-
|
31813
|
+
// components/Modal/styles.module.css
|
31814
|
+
var styles_default12 = {
|
31815
|
+
Modal: "styles_Modal",
|
31816
|
+
"Modal--isOpen": "styles_Modal--isOpen",
|
31817
|
+
"Modal-inner": "styles_Modal-inner"
|
31818
|
+
};
|
31661
31819
|
|
31662
31820
|
// components/Modal/index.tsx
|
31663
31821
|
var import_react_dom = __toESM(require_react_dom());
|
31664
31822
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
31665
|
-
var getClassName12 = get_class_name_factory_default("Modal",
|
31823
|
+
var getClassName12 = get_class_name_factory_default("Modal", styles_default12);
|
31666
31824
|
var Modal = ({
|
31667
31825
|
children,
|
31668
31826
|
onClose,
|
@@ -31691,8 +31849,8 @@ var Modal = ({
|
|
31691
31849
|
// components/ExternalInput/index.tsx
|
31692
31850
|
var import_react_spinners5 = require("react-spinners");
|
31693
31851
|
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",
|
31852
|
+
var getClassName13 = get_class_name_factory_default("ExternalInput", styles_default11);
|
31853
|
+
var getClassNameModal = get_class_name_factory_default("ExternalInputModal", styles_default11);
|
31696
31854
|
var dataCache = {};
|
31697
31855
|
var ExternalInput = ({
|
31698
31856
|
field,
|
@@ -31730,7 +31888,7 @@ var ExternalInput = ({
|
|
31730
31888
|
const search = (0, import_react16.useCallback)(
|
31731
31889
|
(query, filters2) => __async(void 0, null, function* () {
|
31732
31890
|
setIsLoading(true);
|
31733
|
-
const cacheKey = `${id}-${
|
31891
|
+
const cacheKey = `${id}-${query}-${JSON.stringify(filters2)}`;
|
31734
31892
|
const listData = dataCache[cacheKey] || (yield field.fetchList({ query, filters: filters2 }));
|
31735
31893
|
if (listData) {
|
31736
31894
|
setData(listData);
|
@@ -31756,6 +31914,7 @@ var ExternalInput = ({
|
|
31756
31914
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
31757
31915
|
"button",
|
31758
31916
|
{
|
31917
|
+
type: "button",
|
31759
31918
|
onClick: () => setOpen(true),
|
31760
31919
|
className: getClassName13("button"),
|
31761
31920
|
children: value ? field.getItemSummary ? field.getItemSummary(value) : "External item" : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
@@ -31943,7 +32102,7 @@ var ExternalField = ({
|
|
31943
32102
|
// components/InputOrGroup/fields/RadioField/index.tsx
|
31944
32103
|
init_react_import();
|
31945
32104
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
31946
|
-
var getClassName14 = get_class_name_factory_default("Input",
|
32105
|
+
var getClassName14 = get_class_name_factory_default("Input", styles_default9);
|
31947
32106
|
var RadioField = ({
|
31948
32107
|
field,
|
31949
32108
|
onChange,
|
@@ -31998,7 +32157,7 @@ var RadioField = ({
|
|
31998
32157
|
// components/InputOrGroup/fields/SelectField/index.tsx
|
31999
32158
|
init_react_import();
|
32000
32159
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
32001
|
-
var getClassName15 = get_class_name_factory_default("Input",
|
32160
|
+
var getClassName15 = get_class_name_factory_default("Input", styles_default9);
|
32002
32161
|
var SelectField = ({
|
32003
32162
|
field,
|
32004
32163
|
onChange,
|
@@ -32048,7 +32207,7 @@ var SelectField = ({
|
|
32048
32207
|
// components/InputOrGroup/fields/TextareaField/index.tsx
|
32049
32208
|
init_react_import();
|
32050
32209
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
32051
|
-
var getClassName16 = get_class_name_factory_default("Input",
|
32210
|
+
var getClassName16 = get_class_name_factory_default("Input", styles_default9);
|
32052
32211
|
var TextareaField = ({
|
32053
32212
|
onChange,
|
32054
32213
|
readOnly,
|
@@ -32087,14 +32246,16 @@ var import_use_debounce2 = require("use-debounce");
|
|
32087
32246
|
// components/InputOrGroup/fields/ObjectField/index.tsx
|
32088
32247
|
init_react_import();
|
32089
32248
|
|
32090
|
-
//
|
32091
|
-
|
32092
|
-
|
32249
|
+
// components/InputOrGroup/fields/ObjectField/styles.module.css
|
32250
|
+
var styles_default13 = {
|
32251
|
+
ObjectField: "styles_ObjectField",
|
32252
|
+
"ObjectField-fieldset": "styles_ObjectField-fieldset"
|
32253
|
+
};
|
32093
32254
|
|
32094
32255
|
// components/InputOrGroup/fields/ObjectField/index.tsx
|
32095
32256
|
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",
|
32257
|
+
var getClassName17 = get_class_name_factory_default("ObjectField", styles_default13);
|
32258
|
+
var getClassNameItem3 = get_class_name_factory_default("ObjectFieldItem", styles_default13);
|
32098
32259
|
var ObjectField = ({
|
32099
32260
|
field,
|
32100
32261
|
onChange,
|
@@ -32148,7 +32309,7 @@ var ObjectField = ({
|
|
32148
32309
|
|
32149
32310
|
// components/InputOrGroup/index.tsx
|
32150
32311
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
32151
|
-
var getClassName18 = get_class_name_factory_default("Input",
|
32312
|
+
var getClassName18 = get_class_name_factory_default("Input", styles_default9);
|
32152
32313
|
var FieldLabel = ({
|
32153
32314
|
children,
|
32154
32315
|
icon,
|
@@ -32251,14 +32412,16 @@ var InputOrGroup = (_a) => {
|
|
32251
32412
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Render2, __spreadProps(__spreadValues({}, mergedProps), { children }));
|
32252
32413
|
};
|
32253
32414
|
|
32254
|
-
//
|
32255
|
-
|
32256
|
-
|
32415
|
+
// components/Puck/components/Fields/styles.module.css
|
32416
|
+
var styles_default14 = {
|
32417
|
+
PuckFields: "styles_PuckFields",
|
32418
|
+
"PuckFields-loadingOverlay": "styles_PuckFields-loadingOverlay"
|
32419
|
+
};
|
32257
32420
|
|
32258
32421
|
// components/Puck/components/Fields/index.tsx
|
32259
32422
|
var import_react19 = require("react");
|
32260
32423
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
32261
|
-
var getClassName19 = get_class_name_factory_default("PuckFields",
|
32424
|
+
var getClassName19 = get_class_name_factory_default("PuckFields", styles_default14);
|
32262
32425
|
var defaultPageFields = {
|
32263
32426
|
title: { type: "text" }
|
32264
32427
|
};
|
@@ -32408,13 +32571,18 @@ var import_react20 = require("react");
|
|
32408
32571
|
// components/ComponentList/index.tsx
|
32409
32572
|
init_react_import();
|
32410
32573
|
|
32411
|
-
//
|
32412
|
-
|
32413
|
-
|
32574
|
+
// components/ComponentList/styles.module.css
|
32575
|
+
var styles_default15 = {
|
32576
|
+
ComponentList: "styles_ComponentList",
|
32577
|
+
"ComponentList--isExpanded": "styles_ComponentList--isExpanded",
|
32578
|
+
"ComponentList-content": "styles_ComponentList-content",
|
32579
|
+
"ComponentList-title": "styles_ComponentList-title",
|
32580
|
+
"ComponentList-titleIcon": "styles_ComponentList-titleIcon"
|
32581
|
+
};
|
32414
32582
|
|
32415
32583
|
// components/ComponentList/index.tsx
|
32416
32584
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
32417
|
-
var getClassName20 = get_class_name_factory_default("ComponentList",
|
32585
|
+
var getClassName20 = get_class_name_factory_default("ComponentList", styles_default15);
|
32418
32586
|
var ComponentListItem = ({
|
32419
32587
|
name,
|
32420
32588
|
label,
|
@@ -32550,15 +32718,17 @@ init_react_import();
|
|
32550
32718
|
var import_react22 = require("react");
|
32551
32719
|
var import_auto_frame_component = __toESM(require("@measured/auto-frame-component"));
|
32552
32720
|
|
32553
|
-
//
|
32554
|
-
|
32555
|
-
|
32721
|
+
// components/Puck/components/Preview/styles.module.css
|
32722
|
+
var styles_default16 = {
|
32723
|
+
PuckPreview: "styles_PuckPreview",
|
32724
|
+
"PuckPreview-frame": "styles_PuckPreview-frame"
|
32725
|
+
};
|
32556
32726
|
|
32557
32727
|
// components/Puck/components/Preview/index.tsx
|
32558
32728
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
32559
|
-
var getClassName21 = get_class_name_factory_default("PuckPreview",
|
32729
|
+
var getClassName21 = get_class_name_factory_default("PuckPreview", styles_default16);
|
32560
32730
|
var Preview = ({ id = "puck-preview" }) => {
|
32561
|
-
const { config, dispatch, state } = useAppContext();
|
32731
|
+
const { config, dispatch, state, setStatus, iframe } = useAppContext();
|
32562
32732
|
const Page = (0, import_react22.useCallback)(
|
32563
32733
|
(pageProps) => {
|
32564
32734
|
var _a, _b;
|
@@ -32568,30 +32738,27 @@ var Preview = ({ id = "puck-preview" }) => {
|
|
32568
32738
|
);
|
32569
32739
|
const rootProps = state.data.root.props || state.data.root;
|
32570
32740
|
const ref = (0, import_react22.useRef)(null);
|
32571
|
-
const [stylesLoaded, setStylesLoaded] = (0, import_react22.useState)(false);
|
32572
32741
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
32573
32742
|
"div",
|
32574
32743
|
{
|
32575
|
-
className: getClassName21(
|
32744
|
+
className: getClassName21(),
|
32576
32745
|
id,
|
32577
32746
|
onClick: () => {
|
32578
32747
|
dispatch({ type: "setUi", ui: __spreadProps(__spreadValues({}, state.ui), { itemSelector: null }) });
|
32579
32748
|
},
|
32580
|
-
children:
|
32749
|
+
children: iframe.enabled ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
32581
32750
|
import_auto_frame_component.default,
|
32582
32751
|
{
|
32583
|
-
id: "preview-
|
32584
|
-
className: getClassName21("
|
32752
|
+
id: "preview-frame",
|
32753
|
+
className: getClassName21("frame"),
|
32585
32754
|
"data-rfd-iframe": true,
|
32586
32755
|
ref,
|
32587
|
-
debug: true,
|
32588
32756
|
onStylesLoaded: () => {
|
32589
|
-
|
32590
|
-
setStylesLoaded(true);
|
32757
|
+
setStatus("READY");
|
32591
32758
|
},
|
32592
32759
|
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Page, __spreadProps(__spreadValues({ dispatch, state }, rootProps), { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DropZone, { zone: rootDroppableId }) }))
|
32593
32760
|
}
|
32594
|
-
) })
|
32761
|
+
) : /* @__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
32762
|
}
|
32596
32763
|
);
|
32597
32764
|
};
|
@@ -32623,9 +32790,24 @@ var areaContainsZones = (data, area) => {
|
|
32623
32790
|
// components/LayerTree/index.tsx
|
32624
32791
|
init_react_import();
|
32625
32792
|
|
32626
|
-
//
|
32627
|
-
|
32628
|
-
|
32793
|
+
// components/LayerTree/styles.module.css
|
32794
|
+
var styles_default17 = {
|
32795
|
+
LayerTree: "styles_LayerTree",
|
32796
|
+
"LayerTree-zoneTitle": "styles_LayerTree-zoneTitle",
|
32797
|
+
"LayerTree-helper": "styles_LayerTree-helper",
|
32798
|
+
Layer: "styles_Layer",
|
32799
|
+
"Layer-inner": "styles_Layer-inner",
|
32800
|
+
"Layer--containsZone": "styles_Layer--containsZone",
|
32801
|
+
"Layer-clickable": "styles_Layer-clickable",
|
32802
|
+
"Layer--isSelected": "styles_Layer--isSelected",
|
32803
|
+
"Layer-chevron": "styles_Layer-chevron",
|
32804
|
+
"Layer--childIsSelected": "styles_Layer--childIsSelected",
|
32805
|
+
"Layer-zones": "styles_Layer-zones",
|
32806
|
+
"Layer-title": "styles_Layer-title",
|
32807
|
+
"Layer-name": "styles_Layer-name",
|
32808
|
+
"Layer-icon": "styles_Layer-icon",
|
32809
|
+
"Layer-zoneIcon": "styles_Layer-zoneIcon"
|
32810
|
+
};
|
32629
32811
|
|
32630
32812
|
// lib/scroll-into-view.ts
|
32631
32813
|
init_react_import();
|
@@ -32654,8 +32836,8 @@ var isChildOfZone = (item, maybeChild, ctx) => {
|
|
32654
32836
|
|
32655
32837
|
// components/LayerTree/index.tsx
|
32656
32838
|
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",
|
32839
|
+
var getClassName22 = get_class_name_factory_default("LayerTree", styles_default17);
|
32840
|
+
var getClassNameLayer = get_class_name_factory_default("Layer", styles_default17);
|
32659
32841
|
var LayerTree = ({
|
32660
32842
|
data,
|
32661
32843
|
config,
|
@@ -32714,14 +32896,9 @@ var LayerTree = ({
|
|
32714
32896
|
zone
|
32715
32897
|
});
|
32716
32898
|
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
|
-
}
|
32899
|
+
const frame = getFrame();
|
32723
32900
|
scrollIntoView(
|
32724
|
-
|
32901
|
+
frame == null ? void 0 : frame.querySelector(
|
32725
32902
|
`[data-rfd-drag-handle-draggable-id="draggable-${id}"]`
|
32726
32903
|
)
|
32727
32904
|
);
|
@@ -33060,9 +33237,14 @@ var import_react27 = require("react");
|
|
33060
33237
|
init_react_import();
|
33061
33238
|
var import_react26 = require("react");
|
33062
33239
|
|
33063
|
-
//
|
33064
|
-
|
33065
|
-
|
33240
|
+
// components/ViewportControls/styles.module.css
|
33241
|
+
var styles_default18 = {
|
33242
|
+
ViewportControls: "styles_ViewportControls",
|
33243
|
+
"ViewportControls-divider": "styles_ViewportControls-divider",
|
33244
|
+
"ViewportControls-zoomSelect": "styles_ViewportControls-zoomSelect",
|
33245
|
+
"ViewportButton--isActive": "styles_ViewportButton--isActive",
|
33246
|
+
"ViewportButton-inner": "styles_ViewportButton-inner"
|
33247
|
+
};
|
33066
33248
|
|
33067
33249
|
// components/ViewportControls/index.tsx
|
33068
33250
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
@@ -33071,8 +33253,8 @@ var icons = {
|
|
33071
33253
|
Tablet: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Tablet, { size: 16 }),
|
33072
33254
|
Monitor: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Monitor, { size: 16 })
|
33073
33255
|
};
|
33074
|
-
var getClassName23 = get_class_name_factory_default("ViewportControls",
|
33075
|
-
var getClassNameButton = get_class_name_factory_default("ViewportButton",
|
33256
|
+
var getClassName23 = get_class_name_factory_default("ViewportControls", styles_default18);
|
33257
|
+
var getClassNameButton = get_class_name_factory_default("ViewportButton", styles_default18);
|
33076
33258
|
var ViewportButton = ({
|
33077
33259
|
children,
|
33078
33260
|
height = "auto",
|
@@ -33081,7 +33263,10 @@ var ViewportButton = ({
|
|
33081
33263
|
onClick
|
33082
33264
|
}) => {
|
33083
33265
|
const { state } = useAppContext();
|
33084
|
-
const isActive =
|
33266
|
+
const [isActive, setIsActive] = (0, import_react26.useState)(false);
|
33267
|
+
(0, import_react26.useEffect)(() => {
|
33268
|
+
setIsActive(width === state.ui.viewports.current.width);
|
33269
|
+
}, [width, state.ui.viewports.current.width]);
|
33085
33270
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: getClassNameButton({ isActive }), children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
33086
33271
|
IconButton,
|
33087
33272
|
{
|
@@ -33110,8 +33295,7 @@ var ViewportControls = ({
|
|
33110
33295
|
onViewportChange,
|
33111
33296
|
onZoom
|
33112
33297
|
}) => {
|
33113
|
-
const {
|
33114
|
-
const viewport = state.ui.viewports.current;
|
33298
|
+
const { viewports } = useAppContext();
|
33115
33299
|
const defaultsContainAutoZoom = defaultZoomOptions.find(
|
33116
33300
|
(option) => option.value === autoZoom
|
33117
33301
|
);
|
@@ -33128,14 +33312,14 @@ var ViewportControls = ({
|
|
33128
33312
|
[autoZoom]
|
33129
33313
|
);
|
33130
33314
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: getClassName23(), children: [
|
33131
|
-
viewports.map((
|
33315
|
+
viewports.map((viewport, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
33132
33316
|
ViewportButton,
|
33133
33317
|
{
|
33134
|
-
height:
|
33135
|
-
width:
|
33136
|
-
title:
|
33318
|
+
height: viewport.height,
|
33319
|
+
width: viewport.width,
|
33320
|
+
title: viewport.label ? `Switch to ${viewport.label} viewport` : "Switch viewport",
|
33137
33321
|
onClick: onViewportChange,
|
33138
|
-
children: typeof
|
33322
|
+
children: typeof viewport.icon === "string" ? icons[viewport.icon] || viewport.icon : viewport.icon || icons.Smartphone
|
33139
33323
|
},
|
33140
33324
|
i
|
33141
33325
|
)),
|
@@ -33196,6 +33380,15 @@ var ViewportControls = ({
|
|
33196
33380
|
] });
|
33197
33381
|
};
|
33198
33382
|
|
33383
|
+
// components/Puck/components/Canvas/styles.module.css
|
33384
|
+
var styles_default19 = {
|
33385
|
+
PuckCanvas: "styles_PuckCanvas",
|
33386
|
+
"PuckCanvas-controls": "styles_PuckCanvas-controls",
|
33387
|
+
"PuckCanvas-inner": "styles_PuckCanvas-inner",
|
33388
|
+
"PuckCanvas-root": "styles_PuckCanvas-root",
|
33389
|
+
"PuckCanvas--ready": "styles_PuckCanvas--ready"
|
33390
|
+
};
|
33391
|
+
|
33199
33392
|
// lib/get-zoom-config.ts
|
33200
33393
|
init_react_import();
|
33201
33394
|
var RESET_ZOOM_SMALLER_THAN_FRAME = true;
|
@@ -33228,9 +33421,10 @@ var getZoomConfig = (uiViewport, frame, zoom) => {
|
|
33228
33421
|
|
33229
33422
|
// components/Puck/components/Canvas/index.tsx
|
33230
33423
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
33231
|
-
var getClassName24 = get_class_name_factory_default("
|
33424
|
+
var getClassName24 = get_class_name_factory_default("PuckCanvas", styles_default19);
|
33232
33425
|
var ZOOM_ON_CHANGE = true;
|
33233
33426
|
var Canvas = () => {
|
33427
|
+
const { status, iframe } = useAppContext();
|
33234
33428
|
const { dispatch, state, overrides, setUi, zoomConfig, setZoomConfig } = useAppContext();
|
33235
33429
|
const { ui } = state;
|
33236
33430
|
const frameRef = (0, import_react27.useRef)(null);
|
@@ -33288,14 +33482,16 @@ var Canvas = () => {
|
|
33288
33482
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
33289
33483
|
"div",
|
33290
33484
|
{
|
33291
|
-
className: getClassName24(
|
33485
|
+
className: getClassName24({
|
33486
|
+
ready: status === "READY" || !iframe.enabled
|
33487
|
+
}),
|
33292
33488
|
onClick: () => dispatch({
|
33293
33489
|
type: "setUi",
|
33294
33490
|
ui: { itemSelector: null },
|
33295
33491
|
recordHistory: true
|
33296
33492
|
}),
|
33297
33493
|
children: [
|
33298
|
-
ui.viewports.controlsVisible && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: getClassName24("
|
33494
|
+
ui.viewports.controlsVisible && iframe.enabled && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: getClassName24("controls"), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
33299
33495
|
ViewportControls,
|
33300
33496
|
{
|
33301
33497
|
autoZoom: zoomConfig.autoZoom,
|
@@ -33320,15 +33516,16 @@ var Canvas = () => {
|
|
33320
33516
|
}
|
33321
33517
|
}
|
33322
33518
|
) }),
|
33323
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: getClassName24("
|
33519
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: getClassName24("inner"), ref: frameRef, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
33324
33520
|
"div",
|
33325
33521
|
{
|
33326
33522
|
className: getClassName24("root"),
|
33327
33523
|
style: {
|
33328
|
-
width: ui.viewports.current.width,
|
33524
|
+
width: iframe.enabled ? ui.viewports.current.width : void 0,
|
33329
33525
|
height: zoomConfig.rootHeight,
|
33330
|
-
transform: `scale(${zoomConfig.zoom})
|
33331
|
-
transition: showTransition ? "width 150ms ease-out, height 150ms ease-out, transform 150ms ease-out" : ""
|
33526
|
+
transform: iframe.enabled ? `scale(${zoomConfig.zoom})` : void 0,
|
33527
|
+
transition: showTransition ? "width 150ms ease-out, height 150ms ease-out, transform 150ms ease-out" : "",
|
33528
|
+
overflow: iframe.enabled ? void 0 : "auto"
|
33332
33529
|
},
|
33333
33530
|
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CustomPreview, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Preview, {}) })
|
33334
33531
|
}
|
@@ -33340,7 +33537,7 @@ var Canvas = () => {
|
|
33340
33537
|
|
33341
33538
|
// components/Puck/index.tsx
|
33342
33539
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
33343
|
-
var getClassName25 = get_class_name_factory_default("Puck",
|
33540
|
+
var getClassName25 = get_class_name_factory_default("Puck", styles_default8);
|
33344
33541
|
function Puck({
|
33345
33542
|
children,
|
33346
33543
|
config,
|
@@ -33354,7 +33551,10 @@ function Puck({
|
|
33354
33551
|
renderHeaderActions,
|
33355
33552
|
headerTitle,
|
33356
33553
|
headerPath,
|
33357
|
-
viewports = defaultViewports
|
33554
|
+
viewports = defaultViewports,
|
33555
|
+
iframe = {
|
33556
|
+
enabled: true
|
33557
|
+
}
|
33358
33558
|
}) {
|
33359
33559
|
var _a;
|
33360
33560
|
const historyStore = useHistoryStore();
|
@@ -33372,17 +33572,19 @@ function Puck({
|
|
33372
33572
|
diff: Math.abs(viewportWidth - value.width)
|
33373
33573
|
})).sort((a, b) => a.diff > b.diff ? 1 : -1);
|
33374
33574
|
const closestViewport = viewportDifferences[0].key;
|
33375
|
-
|
33376
|
-
|
33377
|
-
|
33378
|
-
|
33379
|
-
|
33380
|
-
|
33381
|
-
|
33382
|
-
|
33575
|
+
if (iframe.enabled) {
|
33576
|
+
clientUiState = __spreadProps(__spreadValues({}, window.matchMedia("(min-width: 638px)").matches ? {} : {
|
33577
|
+
leftSideBarVisible: false,
|
33578
|
+
rightSideBarVisible: false
|
33579
|
+
}), {
|
33580
|
+
viewports: __spreadProps(__spreadValues({}, initial.viewports), {
|
33581
|
+
current: __spreadProps(__spreadValues({}, initial.viewports.current), {
|
33582
|
+
height: ((_b = (_a2 = initialUi == null ? void 0 : initialUi.viewports) == null ? void 0 : _a2.current) == null ? void 0 : _b.height) || viewports[closestViewport].height || "auto",
|
33583
|
+
width: ((_d = (_c = initialUi == null ? void 0 : initialUi.viewports) == null ? void 0 : _c.current) == null ? void 0 : _d.width) || viewports[closestViewport].width
|
33584
|
+
})
|
33383
33585
|
})
|
33384
|
-
})
|
33385
|
-
}
|
33586
|
+
});
|
33587
|
+
}
|
33386
33588
|
}
|
33387
33589
|
return __spreadProps(__spreadValues({}, defaultAppState), {
|
33388
33590
|
data: initialData,
|
@@ -33540,7 +33742,8 @@ function Puck({
|
|
33540
33742
|
plugins,
|
33541
33743
|
overrides: loadedOverrides,
|
33542
33744
|
history,
|
33543
|
-
viewports
|
33745
|
+
viewports,
|
33746
|
+
iframe
|
33544
33747
|
},
|
33545
33748
|
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
33546
33749
|
DragDropContext,
|
@@ -33836,8 +34039,20 @@ var resolveAllData = (data, config, onResolveStart, onResolveEnd) => __async(voi
|
|
33836
34039
|
// lib/use-puck.ts
|
33837
34040
|
init_react_import();
|
33838
34041
|
var usePuck = () => {
|
33839
|
-
const {
|
33840
|
-
|
34042
|
+
const {
|
34043
|
+
state: appState,
|
34044
|
+
config,
|
34045
|
+
history,
|
34046
|
+
dispatch,
|
34047
|
+
selectedItem
|
34048
|
+
} = useAppContext();
|
34049
|
+
return {
|
34050
|
+
appState,
|
34051
|
+
config,
|
34052
|
+
dispatch,
|
34053
|
+
history,
|
34054
|
+
selectedItem: selectedItem || null
|
34055
|
+
};
|
33841
34056
|
};
|
33842
34057
|
// Annotate the CommonJS export names for ESM import in node:
|
33843
34058
|
0 && (module.exports = {
|