camox 0.52.3 → 0.53.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/editing/createEditableBlock.js +1 -1
- package/dist/features/canvas/CamoxCanvas.js +103 -83
- package/dist/features/canvas/CanvasPageFrame.js +1 -1
- package/dist/features/canvas/CanvasPreviewPageSlot.js +1 -1
- package/dist/features/canvas/canvasCamera.js +3 -3
- package/dist/features/canvas/sidebar/CanvasInspector.js +4 -159
- package/dist/features/canvas/sidebar/CanvasNavigator.js +41 -85
- package/dist/features/canvas/sidebar/CanvasSidebar.js +54 -32
- package/dist/features/canvas/sidebar/CanvasSidebarFrame.js +4 -3
- package/dist/features/canvas/sidebar/CanvasSidebarSkeleton.js +14 -6
- package/dist/features/canvas/sidebar/CanvasViewHeader.js +50 -0
- package/dist/features/canvas/sidebar/DerivedPageInspector.js +30 -18
- package/dist/features/canvas/sidebar/LayoutPageOverview.js +28 -11
- package/dist/features/canvas/sidebar/LayoutPageSeo.js +356 -0
- package/dist/features/canvas/sidebar/PageInspector.js +118 -80
- package/dist/features/canvas/sidebar/PageOverview.js +6 -1
- package/dist/features/canvas/sidebar/SingletonPageInspector.js +22 -14
- package/dist/features/canvas/useCanvasCamera.js +36 -39
- package/dist/features/preview/CamoxPreview.js +1 -1
- package/dist/features/preview/components/BlockActionsPopover.js +1 -1
- package/dist/features/preview/components/BlockThumbnail.js +1 -1
- package/dist/features/preview/components/CanvasPreview.js +1 -1
- package/dist/features/preview/components/CreatePageModal.js +1 -1
- package/dist/features/preview/components/ItemFieldsEditor.js +1 -1
- package/dist/features/preview/components/OverlayTracker.js +1 -1
- package/dist/features/preview/components/PageInfo.js +345 -228
- package/dist/features/preview/components/PageTree.js +1 -1
- package/dist/features/preview/components/PreviewPanel.js +1 -1
- package/dist/features/preview/components/PreviewToolbar.js +2 -2
- package/dist/features/preview/components/RepeatableItemsList.js +1 -1
- package/dist/features/preview/components/SelectionEditor.js +645 -655
- package/dist/features/preview/components/SidebarStack.js +553 -0
- package/dist/features/preview/components/StudioEditingFallback.js +2 -2
- package/dist/features/renderer/RendererFrames.js +34 -27
- package/dist/features/runtime/RuntimeChrome.js +1 -1
- package/dist/features/runtime/runtime.js +84 -26
- package/dist/features/studio/components/ChatSidebar.js +27 -19
- package/dist/features/studio/components/Navbar.js +1 -1
- package/dist/features/studio/components/UserButton.js +1 -1
- package/dist/lib/studio-reads.js +18 -0
- package/dist/package.js +1 -1
- package/dist/studio.css +1 -1
- package/package.json +4 -4
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { isFileMarker } from "../../../lib/normalized-data.js";
|
|
2
2
|
import { reads, useReadQueries, useReadQuery } from "../../../lib/studio-reads.js";
|
|
3
|
-
import { cn } from "../../../lib/utils.js";
|
|
4
3
|
import { blockMutations, repeatableItemMutations } from "../../../lib/queries.js";
|
|
5
4
|
import { SingleAssetFieldEditor } from "./AssetFieldEditor.js";
|
|
6
5
|
import { MultipleAssetFieldEditor } from "./MultipleAssetFieldEditor.js";
|
|
7
6
|
import { useBlockDefinition } from "../../../lib/studio-definitions.js";
|
|
8
7
|
import { editorAssetField } from "../../content/collection-form.js";
|
|
9
8
|
import { isBlockPlacement, previewStore, recordPlacement, selectionBlockId, selectionField, selectionForOwner, selectionItemId } from "../previewStore.js";
|
|
10
|
-
import { PreviewEditingOwnerContext } from "../previewSelection.js";
|
|
11
9
|
import { useEditingFrame } from "../editingFrame.js";
|
|
10
|
+
import { SelectionViewCount, SidebarStackHeader, SidebarStackView } from "./SidebarStack.js";
|
|
11
|
+
import { PreviewEditingOwnerContext } from "../previewSelection.js";
|
|
12
12
|
import { entityName } from "../entityName.js";
|
|
13
13
|
import { fieldTypesDictionary } from "../../../core/lib/fieldTypes.js";
|
|
14
|
-
import { selectionHoverMessage } from "../overlayMessages.js";
|
|
15
14
|
import { usePageRecordPlacer } from "../pageRecord.js";
|
|
16
15
|
import { contentFieldSchema } from "./contentFieldSchema.js";
|
|
17
16
|
import { useRepeatableItemActions } from "./useRepeatableItemActions.js";
|
|
@@ -101,21 +100,27 @@ const buildAncestorChain = (itemId, itemsMap) => {
|
|
|
101
100
|
}
|
|
102
101
|
return chain;
|
|
103
102
|
};
|
|
104
|
-
const SelectionEditor = () => {
|
|
105
|
-
const $ = c(
|
|
103
|
+
const SelectionEditor = (t0) => {
|
|
104
|
+
const $ = c(3);
|
|
105
|
+
const { pageCrumb: t1 } = t0;
|
|
106
|
+
const pageCrumb = t1 === void 0 ? true : t1;
|
|
106
107
|
const owner = React.useContext(PreviewEditingOwnerContext);
|
|
107
108
|
if (owner == null) return null;
|
|
108
|
-
let
|
|
109
|
-
if ($[0] !== owner) {
|
|
110
|
-
|
|
109
|
+
let t2;
|
|
110
|
+
if ($[0] !== owner || $[1] !== pageCrumb) {
|
|
111
|
+
t2 = /* @__PURE__ */ jsx(SelectionEditorContent, {
|
|
112
|
+
owner,
|
|
113
|
+
pageCrumb
|
|
114
|
+
});
|
|
111
115
|
$[0] = owner;
|
|
112
|
-
$[1] =
|
|
113
|
-
|
|
114
|
-
|
|
116
|
+
$[1] = pageCrumb;
|
|
117
|
+
$[2] = t2;
|
|
118
|
+
} else t2 = $[2];
|
|
119
|
+
return t2;
|
|
115
120
|
};
|
|
116
121
|
const SelectionEditorContent = (t0) => {
|
|
117
|
-
const $ = c(
|
|
118
|
-
const { owner } = t0;
|
|
122
|
+
const $ = c(145);
|
|
123
|
+
const { owner, pageCrumb } = t0;
|
|
119
124
|
let t1;
|
|
120
125
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
121
126
|
t1 = blockMutations.updateSettings();
|
|
@@ -136,308 +141,284 @@ const SelectionEditorContent = (t0) => {
|
|
|
136
141
|
} else t3 = $[3];
|
|
137
142
|
const selection = useSelector(previewStore, t3);
|
|
138
143
|
const { send } = useEditingFrame();
|
|
139
|
-
|
|
144
|
+
let blockId;
|
|
145
|
+
let currentItemId;
|
|
140
146
|
let t4;
|
|
141
147
|
let t5;
|
|
142
|
-
if ($[4] !==
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
send,
|
|
151
|
-
selection
|
|
152
|
-
];
|
|
153
|
-
$[4] = hoveredBreadcrumb;
|
|
154
|
-
$[5] = selection;
|
|
155
|
-
$[6] = send;
|
|
148
|
+
if ($[4] !== selection) {
|
|
149
|
+
blockId = selectionBlockId(selection);
|
|
150
|
+
currentItemId = selectionItemId(selection);
|
|
151
|
+
t4 = useReadQuery;
|
|
152
|
+
t5 = reads.blockBundle(blockId);
|
|
153
|
+
$[4] = selection;
|
|
154
|
+
$[5] = blockId;
|
|
155
|
+
$[6] = currentItemId;
|
|
156
156
|
$[7] = t4;
|
|
157
157
|
$[8] = t5;
|
|
158
158
|
} else {
|
|
159
|
+
blockId = $[5];
|
|
160
|
+
currentItemId = $[6];
|
|
159
161
|
t4 = $[7];
|
|
160
162
|
t5 = $[8];
|
|
161
163
|
}
|
|
162
|
-
|
|
163
|
-
let blockId;
|
|
164
|
-
let currentItemId;
|
|
165
|
-
let t6;
|
|
164
|
+
const t6 = blockId != null;
|
|
166
165
|
let t7;
|
|
167
|
-
if ($[9] !==
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
$[10] = blockId;
|
|
174
|
-
$[11] = currentItemId;
|
|
175
|
-
$[12] = t6;
|
|
176
|
-
$[13] = t7;
|
|
177
|
-
} else {
|
|
178
|
-
blockId = $[10];
|
|
179
|
-
currentItemId = $[11];
|
|
180
|
-
t6 = $[12];
|
|
181
|
-
t7 = $[13];
|
|
182
|
-
}
|
|
183
|
-
const t8 = blockId != null;
|
|
184
|
-
let t9;
|
|
185
|
-
if ($[14] !== t8) {
|
|
186
|
-
t9 = { enabled: t8 };
|
|
187
|
-
$[14] = t8;
|
|
188
|
-
$[15] = t9;
|
|
189
|
-
} else t9 = $[15];
|
|
190
|
-
const { data: blockBundle } = t6(t7, t9);
|
|
166
|
+
if ($[9] !== t6) {
|
|
167
|
+
t7 = { enabled: t6 };
|
|
168
|
+
$[9] = t6;
|
|
169
|
+
$[10] = t7;
|
|
170
|
+
} else t7 = $[10];
|
|
171
|
+
const { data: blockBundle } = t4(t5, t7);
|
|
191
172
|
const block = blockBundle?.block ?? null;
|
|
192
173
|
blockBundle?.repeatableItems;
|
|
174
|
+
let t8;
|
|
175
|
+
if ($[11] !== blockBundle?.repeatableItems) {
|
|
176
|
+
t8 = blockBundle?.repeatableItems ?? [];
|
|
177
|
+
$[11] = blockBundle?.repeatableItems;
|
|
178
|
+
$[12] = t8;
|
|
179
|
+
} else t8 = $[12];
|
|
180
|
+
let t9;
|
|
181
|
+
if ($[13] !== t8) {
|
|
182
|
+
t9 = new Map(t8.map(_temp));
|
|
183
|
+
$[13] = t8;
|
|
184
|
+
$[14] = t9;
|
|
185
|
+
} else t9 = $[14];
|
|
186
|
+
const itemsMap = t9;
|
|
193
187
|
let t10;
|
|
194
|
-
if ($[
|
|
195
|
-
t10 = blockBundle?.
|
|
196
|
-
$[
|
|
197
|
-
$[
|
|
198
|
-
} else t10 = $[
|
|
188
|
+
if ($[15] !== blockBundle?.files) {
|
|
189
|
+
t10 = () => (blockBundle?.files ?? []).map(_temp2);
|
|
190
|
+
$[15] = blockBundle?.files;
|
|
191
|
+
$[16] = t10;
|
|
192
|
+
} else t10 = $[16];
|
|
193
|
+
blockBundle?.files;
|
|
199
194
|
let t11;
|
|
200
|
-
if ($[
|
|
201
|
-
t11 =
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
204
|
-
} else t11 = $[
|
|
205
|
-
const
|
|
195
|
+
if ($[17] !== t10) {
|
|
196
|
+
t11 = t10();
|
|
197
|
+
$[17] = t10;
|
|
198
|
+
$[18] = t11;
|
|
199
|
+
} else t11 = $[18];
|
|
200
|
+
const fileIds = t11;
|
|
206
201
|
let t12;
|
|
207
|
-
if ($[
|
|
208
|
-
t12 =
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
211
|
-
} else t12 = $[
|
|
202
|
+
if ($[19] !== fileIds) {
|
|
203
|
+
t12 = fileIds.map(_temp3);
|
|
204
|
+
$[19] = fileIds;
|
|
205
|
+
$[20] = t12;
|
|
206
|
+
} else t12 = $[20];
|
|
207
|
+
const fileResults = useReadQueries(t12);
|
|
212
208
|
blockBundle?.files;
|
|
213
209
|
let t13;
|
|
214
|
-
if ($[
|
|
215
|
-
t13 =
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
} else t13 = $[
|
|
219
|
-
const fileIds = t13;
|
|
220
|
-
let t14;
|
|
221
|
-
if ($[24] !== fileIds) {
|
|
222
|
-
t14 = fileIds.map(_temp3);
|
|
223
|
-
$[24] = fileIds;
|
|
224
|
-
$[25] = t14;
|
|
225
|
-
} else t14 = $[25];
|
|
226
|
-
const fileResults = useReadQueries(t14);
|
|
227
|
-
blockBundle?.files;
|
|
228
|
-
let t15;
|
|
229
|
-
if ($[26] !== blockBundle?.files) {
|
|
230
|
-
t15 = blockBundle?.files ?? [];
|
|
231
|
-
$[26] = blockBundle?.files;
|
|
232
|
-
$[27] = t15;
|
|
233
|
-
} else t15 = $[27];
|
|
210
|
+
if ($[21] !== blockBundle?.files) {
|
|
211
|
+
t13 = blockBundle?.files ?? [];
|
|
212
|
+
$[21] = blockBundle?.files;
|
|
213
|
+
$[22] = t13;
|
|
214
|
+
} else t13 = $[22];
|
|
234
215
|
let map;
|
|
235
|
-
if ($[
|
|
236
|
-
map = new Map(
|
|
216
|
+
if ($[23] !== fileIds.length || $[24] !== fileResults || $[25] !== t13) {
|
|
217
|
+
map = new Map(t13.map(_temp4));
|
|
237
218
|
for (let i_0 = 0; i_0 < fileIds.length; i_0++) {
|
|
238
219
|
const data = fileResults[i_0]?.data;
|
|
239
220
|
if (data) map.set(data.id, data);
|
|
240
221
|
}
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
} else map = $[
|
|
222
|
+
$[23] = fileIds.length;
|
|
223
|
+
$[24] = fileResults;
|
|
224
|
+
$[25] = t13;
|
|
225
|
+
$[26] = map;
|
|
226
|
+
} else map = $[26];
|
|
246
227
|
const filesMap = map;
|
|
247
228
|
const blockDef = useBlockDefinition(block?.type) ?? null;
|
|
248
229
|
const pagePlacer = usePageRecordPlacer();
|
|
249
230
|
const layoutRecordSelected = (selection?.type === "record" || selection?.type === "record-field") && !isBlockPlacement(selection);
|
|
250
|
-
let
|
|
251
|
-
if ($[
|
|
252
|
-
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
256
|
-
} else
|
|
257
|
-
const placerItem =
|
|
258
|
-
let
|
|
231
|
+
let t14;
|
|
232
|
+
if ($[27] !== currentItemId || $[28] !== itemsMap) {
|
|
233
|
+
t14 = currentItemId != null ? itemsMap.get(currentItemId) : void 0;
|
|
234
|
+
$[27] = currentItemId;
|
|
235
|
+
$[28] = itemsMap;
|
|
236
|
+
$[29] = t14;
|
|
237
|
+
} else t14 = $[29];
|
|
238
|
+
const placerItem = t14;
|
|
239
|
+
let t15;
|
|
259
240
|
bb0: {
|
|
260
241
|
if (!block || !blockDef) {
|
|
261
|
-
|
|
242
|
+
t15 = null;
|
|
262
243
|
break bb0;
|
|
263
244
|
}
|
|
264
245
|
if (currentItemId == null) {
|
|
265
|
-
let
|
|
266
|
-
if ($[
|
|
267
|
-
|
|
246
|
+
let t16;
|
|
247
|
+
if ($[30] !== block || $[31] !== blockDef.contentSchema) {
|
|
248
|
+
t16 = {
|
|
268
249
|
...block,
|
|
269
250
|
contentSchema: blockDef.contentSchema
|
|
270
251
|
};
|
|
271
|
-
$[
|
|
272
|
-
$[
|
|
273
|
-
$[
|
|
274
|
-
} else
|
|
275
|
-
|
|
252
|
+
$[30] = block;
|
|
253
|
+
$[31] = blockDef.contentSchema;
|
|
254
|
+
$[32] = t16;
|
|
255
|
+
} else t16 = $[32];
|
|
256
|
+
t15 = t16;
|
|
276
257
|
break bb0;
|
|
277
258
|
}
|
|
278
259
|
if (!placerItem) {
|
|
279
|
-
|
|
260
|
+
t15 = null;
|
|
280
261
|
break bb0;
|
|
281
262
|
}
|
|
282
|
-
let
|
|
283
|
-
if ($[
|
|
284
|
-
|
|
285
|
-
$[
|
|
286
|
-
$[
|
|
287
|
-
$[
|
|
288
|
-
$[
|
|
289
|
-
} else
|
|
290
|
-
let
|
|
291
|
-
if ($[
|
|
292
|
-
|
|
263
|
+
let t16;
|
|
264
|
+
if ($[33] !== blockDef.contentSchema || $[34] !== currentItemId || $[35] !== itemsMap) {
|
|
265
|
+
t16 = getSchemaForItem(blockDef.contentSchema, currentItemId, itemsMap);
|
|
266
|
+
$[33] = blockDef.contentSchema;
|
|
267
|
+
$[34] = currentItemId;
|
|
268
|
+
$[35] = itemsMap;
|
|
269
|
+
$[36] = t16;
|
|
270
|
+
} else t16 = $[36];
|
|
271
|
+
let t17;
|
|
272
|
+
if ($[37] !== placerItem || $[38] !== t16) {
|
|
273
|
+
t17 = {
|
|
293
274
|
...placerItem,
|
|
294
|
-
contentSchema:
|
|
275
|
+
contentSchema: t16
|
|
295
276
|
};
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
} else
|
|
300
|
-
|
|
277
|
+
$[37] = placerItem;
|
|
278
|
+
$[38] = t16;
|
|
279
|
+
$[39] = t17;
|
|
280
|
+
} else t17 = $[39];
|
|
281
|
+
t15 = t17;
|
|
301
282
|
}
|
|
302
|
-
const
|
|
303
|
-
let
|
|
304
|
-
if ($[
|
|
305
|
-
|
|
283
|
+
const t16 = layoutRecordSelected ? pagePlacer : t15;
|
|
284
|
+
let t17;
|
|
285
|
+
if ($[40] !== owner || $[41] !== selection || $[42] !== t16) {
|
|
286
|
+
t17 = {
|
|
306
287
|
owner,
|
|
307
288
|
selection,
|
|
308
|
-
placer:
|
|
289
|
+
placer: t16
|
|
309
290
|
};
|
|
310
|
-
$[
|
|
311
|
-
$[
|
|
312
|
-
$[
|
|
313
|
-
$[
|
|
314
|
-
} else
|
|
315
|
-
const { recordView, viewSelection, recordCrumbs } = useRecordView(
|
|
291
|
+
$[40] = owner;
|
|
292
|
+
$[41] = selection;
|
|
293
|
+
$[42] = t16;
|
|
294
|
+
$[43] = t17;
|
|
295
|
+
} else t17 = $[43];
|
|
296
|
+
const { recordView, viewSelection, recordCrumbs } = useRecordView(t17);
|
|
316
297
|
const selectedField = recordView?.selection.type === "record-field" ? {
|
|
317
298
|
fieldName: recordView.selection.recordFieldName,
|
|
318
299
|
fieldType: recordView.selection.recordFieldType
|
|
319
300
|
} : selectionField(viewSelection);
|
|
320
|
-
let
|
|
321
|
-
if ($[
|
|
322
|
-
|
|
323
|
-
$[
|
|
324
|
-
$[
|
|
325
|
-
} else
|
|
326
|
-
const settingsFields =
|
|
327
|
-
let
|
|
301
|
+
let t18;
|
|
302
|
+
if ($[44] !== blockDef) {
|
|
303
|
+
t18 = blockDef ? getSettingsFields(blockDef.settingsSchema) : [];
|
|
304
|
+
$[44] = blockDef;
|
|
305
|
+
$[45] = t18;
|
|
306
|
+
} else t18 = $[45];
|
|
307
|
+
const settingsFields = t18;
|
|
308
|
+
let t19;
|
|
328
309
|
bb1: {
|
|
329
310
|
if (!blockDef || currentItemId == null) {
|
|
330
|
-
|
|
311
|
+
t19 = null;
|
|
331
312
|
break bb1;
|
|
332
313
|
}
|
|
333
|
-
let
|
|
334
|
-
if ($[
|
|
335
|
-
|
|
336
|
-
$[
|
|
337
|
-
$[
|
|
338
|
-
$[
|
|
339
|
-
$[
|
|
340
|
-
} else
|
|
341
|
-
|
|
314
|
+
let t20;
|
|
315
|
+
if ($[46] !== blockDef.contentSchema || $[47] !== currentItemId || $[48] !== itemsMap) {
|
|
316
|
+
t20 = getArraySchemaForItem(blockDef.contentSchema, currentItemId, itemsMap);
|
|
317
|
+
$[46] = blockDef.contentSchema;
|
|
318
|
+
$[47] = currentItemId;
|
|
319
|
+
$[48] = itemsMap;
|
|
320
|
+
$[49] = t20;
|
|
321
|
+
} else t20 = $[49];
|
|
322
|
+
t19 = t20;
|
|
342
323
|
}
|
|
343
|
-
const itemArraySchema =
|
|
344
|
-
const
|
|
345
|
-
let
|
|
346
|
-
if ($[
|
|
347
|
-
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
} else
|
|
351
|
-
const itemSettingsFields =
|
|
324
|
+
const itemArraySchema = t19;
|
|
325
|
+
const t20 = itemArraySchema?.itemSettingsSchema;
|
|
326
|
+
let t21;
|
|
327
|
+
if ($[50] !== t20) {
|
|
328
|
+
t21 = getSettingsFields(t20);
|
|
329
|
+
$[50] = t20;
|
|
330
|
+
$[51] = t21;
|
|
331
|
+
} else t21 = $[51];
|
|
332
|
+
const itemSettingsFields = t21;
|
|
352
333
|
const recordSchema = recordView?.collection.contentSchema;
|
|
353
334
|
const recordInList = recordView?.inList === true;
|
|
354
|
-
let
|
|
335
|
+
let t22;
|
|
355
336
|
bb2: {
|
|
356
337
|
if (recordSchema) {
|
|
357
|
-
|
|
338
|
+
t22 = recordSchema;
|
|
358
339
|
break bb2;
|
|
359
340
|
}
|
|
360
341
|
if (!blockDef) {
|
|
361
|
-
|
|
342
|
+
t22 = null;
|
|
362
343
|
break bb2;
|
|
363
344
|
}
|
|
364
345
|
if (currentItemId == null) {
|
|
365
|
-
|
|
346
|
+
t22 = blockDef.contentSchema;
|
|
366
347
|
break bb2;
|
|
367
348
|
}
|
|
368
|
-
let
|
|
369
|
-
if ($[
|
|
370
|
-
|
|
371
|
-
$[
|
|
372
|
-
$[
|
|
373
|
-
$[
|
|
374
|
-
$[
|
|
375
|
-
} else
|
|
376
|
-
|
|
349
|
+
let t23;
|
|
350
|
+
if ($[52] !== blockDef.contentSchema || $[53] !== currentItemId || $[54] !== itemsMap) {
|
|
351
|
+
t23 = getSchemaForItem(blockDef.contentSchema, currentItemId, itemsMap);
|
|
352
|
+
$[52] = blockDef.contentSchema;
|
|
353
|
+
$[53] = currentItemId;
|
|
354
|
+
$[54] = itemsMap;
|
|
355
|
+
$[55] = t23;
|
|
356
|
+
} else t23 = $[55];
|
|
357
|
+
t22 = t23;
|
|
377
358
|
}
|
|
378
|
-
const currentSchema =
|
|
379
|
-
let
|
|
380
|
-
if ($[
|
|
381
|
-
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
} else
|
|
386
|
-
const currentItem =
|
|
359
|
+
const currentSchema = t22;
|
|
360
|
+
let t23;
|
|
361
|
+
if ($[56] !== currentItemId || $[57] !== itemsMap) {
|
|
362
|
+
t23 = currentItemId != null ? itemsMap.get(currentItemId) : null;
|
|
363
|
+
$[56] = currentItemId;
|
|
364
|
+
$[57] = itemsMap;
|
|
365
|
+
$[58] = t23;
|
|
366
|
+
} else t23 = $[58];
|
|
367
|
+
const currentItem = t23;
|
|
387
368
|
const isItemLoading = currentItemId != null && !currentItem;
|
|
388
|
-
let
|
|
369
|
+
let t24;
|
|
389
370
|
bb3: {
|
|
390
371
|
if (!currentItem) {
|
|
391
|
-
|
|
372
|
+
t24 = 0;
|
|
392
373
|
break bb3;
|
|
393
374
|
}
|
|
394
375
|
let count = 0;
|
|
395
376
|
for (const it of itemsMap.values()) if (it.fieldName === currentItem.fieldName && it.parentItemId === currentItem.parentItemId) count++;
|
|
396
|
-
|
|
377
|
+
t24 = count;
|
|
397
378
|
}
|
|
398
|
-
const siblingCount =
|
|
399
|
-
const
|
|
400
|
-
const
|
|
401
|
-
const
|
|
402
|
-
const
|
|
403
|
-
let
|
|
404
|
-
if ($[
|
|
405
|
-
|
|
406
|
-
blockId:
|
|
407
|
-
fieldName:
|
|
408
|
-
parentItemId:
|
|
409
|
-
arraySchema:
|
|
379
|
+
const siblingCount = t24;
|
|
380
|
+
const t25 = block?.id ?? "";
|
|
381
|
+
const t26 = currentItem?.fieldName ?? "";
|
|
382
|
+
const t27 = currentItem?.parentItemId ?? null;
|
|
383
|
+
const t28 = itemArraySchema;
|
|
384
|
+
let t29;
|
|
385
|
+
if ($[59] !== siblingCount || $[60] !== t25 || $[61] !== t26 || $[62] !== t27 || $[63] !== t28) {
|
|
386
|
+
t29 = {
|
|
387
|
+
blockId: t25,
|
|
388
|
+
fieldName: t26,
|
|
389
|
+
parentItemId: t27,
|
|
390
|
+
arraySchema: t28,
|
|
410
391
|
siblingCount
|
|
411
392
|
};
|
|
412
|
-
$[
|
|
413
|
-
$[
|
|
414
|
-
$[
|
|
415
|
-
$[
|
|
416
|
-
$[
|
|
417
|
-
$[
|
|
418
|
-
} else
|
|
419
|
-
const { canAdd: canAddSibling, addItem: addSibling, canRemove: canRemoveCurrent, removeItem: removeCurrent } = useRepeatableItemActions(
|
|
393
|
+
$[59] = siblingCount;
|
|
394
|
+
$[60] = t25;
|
|
395
|
+
$[61] = t26;
|
|
396
|
+
$[62] = t27;
|
|
397
|
+
$[63] = t28;
|
|
398
|
+
$[64] = t29;
|
|
399
|
+
} else t29 = $[64];
|
|
400
|
+
const { canAdd: canAddSibling, addItem: addSibling, canRemove: canRemoveCurrent, removeItem: removeCurrent } = useRepeatableItemActions(t29);
|
|
420
401
|
const recordContent = recordView?.record.content;
|
|
421
402
|
const rawCurrentData = currentItem ? currentItem.content : block?.content ?? EMPTY_CONTENT;
|
|
422
|
-
let
|
|
403
|
+
let t30;
|
|
423
404
|
bb4: {
|
|
424
405
|
if (recordContent) {
|
|
425
|
-
let
|
|
426
|
-
if ($[
|
|
427
|
-
|
|
428
|
-
const [key, value] =
|
|
406
|
+
let t31;
|
|
407
|
+
if ($[65] !== recordContent || $[66] !== recordSchema) {
|
|
408
|
+
t31 = Object.fromEntries(Object.entries(recordContent).map((t32) => {
|
|
409
|
+
const [key, value] = t32;
|
|
429
410
|
return [key, editorAssetField(contentFieldSchema(recordSchema, key)?.fieldType, value)];
|
|
430
411
|
}));
|
|
431
|
-
$[
|
|
432
|
-
$[
|
|
433
|
-
$[
|
|
434
|
-
} else
|
|
435
|
-
|
|
412
|
+
$[65] = recordContent;
|
|
413
|
+
$[66] = recordSchema;
|
|
414
|
+
$[67] = t31;
|
|
415
|
+
} else t31 = $[67];
|
|
416
|
+
t30 = t31;
|
|
436
417
|
break bb4;
|
|
437
418
|
}
|
|
438
|
-
let
|
|
439
|
-
if ($[
|
|
440
|
-
|
|
419
|
+
let t31;
|
|
420
|
+
if ($[68] !== filesMap) {
|
|
421
|
+
t31 = (marker) => {
|
|
441
422
|
const file = filesMap.get(marker._fileId);
|
|
442
423
|
return file ? {
|
|
443
424
|
url: file.url,
|
|
@@ -452,12 +433,12 @@ const SelectionEditorContent = (t0) => {
|
|
|
452
433
|
mimeType: ""
|
|
453
434
|
};
|
|
454
435
|
};
|
|
455
|
-
$[
|
|
456
|
-
$[
|
|
457
|
-
} else
|
|
458
|
-
const resolveFile =
|
|
436
|
+
$[68] = filesMap;
|
|
437
|
+
$[69] = t31;
|
|
438
|
+
} else t31 = $[69];
|
|
439
|
+
const resolveFile = t31;
|
|
459
440
|
let resolved_0;
|
|
460
|
-
if ($[
|
|
441
|
+
if ($[70] !== rawCurrentData || $[71] !== resolveFile) {
|
|
461
442
|
const resolveValue = (value_0) => {
|
|
462
443
|
if (isFileMarker(value_0)) return resolveFile(value_0);
|
|
463
444
|
if (Array.isArray(value_0)) return value_0.map(resolveValue);
|
|
@@ -471,13 +452,13 @@ const SelectionEditorContent = (t0) => {
|
|
|
471
452
|
};
|
|
472
453
|
resolved_0 = {};
|
|
473
454
|
for (const [key_0, value_1] of Object.entries(rawCurrentData)) resolved_0[key_0] = resolveValue(value_1);
|
|
474
|
-
$[
|
|
475
|
-
$[
|
|
476
|
-
$[
|
|
477
|
-
} else resolved_0 = $[
|
|
478
|
-
|
|
455
|
+
$[70] = rawCurrentData;
|
|
456
|
+
$[71] = resolveFile;
|
|
457
|
+
$[72] = resolved_0;
|
|
458
|
+
} else resolved_0 = $[72];
|
|
459
|
+
t30 = resolved_0;
|
|
479
460
|
}
|
|
480
|
-
const currentData =
|
|
461
|
+
const currentData = t30;
|
|
481
462
|
const fieldInfo = selectedField ? {
|
|
482
463
|
...selectedField,
|
|
483
464
|
fieldType: contentFieldSchema(currentSchema, selectedField.fieldName)?.fieldType ?? selectedField.fieldType
|
|
@@ -498,129 +479,162 @@ const SelectionEditorContent = (t0) => {
|
|
|
498
479
|
const fieldIdPrefix = React.useId();
|
|
499
480
|
const blockIdForWrites = block?.id;
|
|
500
481
|
const recordForWrites = recordView?.record;
|
|
501
|
-
let
|
|
482
|
+
let t31;
|
|
502
483
|
bb5: {
|
|
503
484
|
if (recordForWrites) {
|
|
504
|
-
let
|
|
505
|
-
if ($[
|
|
506
|
-
|
|
485
|
+
let t32;
|
|
486
|
+
if ($[73] !== recordForWrites) {
|
|
487
|
+
t32 = {
|
|
507
488
|
kind: "record",
|
|
508
489
|
record: recordForWrites
|
|
509
490
|
};
|
|
510
|
-
$[
|
|
511
|
-
$[
|
|
512
|
-
} else
|
|
513
|
-
|
|
491
|
+
$[73] = recordForWrites;
|
|
492
|
+
$[74] = t32;
|
|
493
|
+
} else t32 = $[74];
|
|
494
|
+
t31 = t32;
|
|
514
495
|
break bb5;
|
|
515
496
|
}
|
|
516
497
|
if (blockIdForWrites == null) {
|
|
517
|
-
|
|
498
|
+
t31 = null;
|
|
518
499
|
break bb5;
|
|
519
500
|
}
|
|
520
501
|
if (currentItemId == null) {
|
|
521
|
-
let
|
|
522
|
-
if ($[
|
|
523
|
-
|
|
502
|
+
let t32;
|
|
503
|
+
if ($[75] !== blockIdForWrites) {
|
|
504
|
+
t32 = {
|
|
524
505
|
kind: "block",
|
|
525
506
|
blockId: blockIdForWrites
|
|
526
507
|
};
|
|
527
|
-
$[
|
|
528
|
-
$[
|
|
529
|
-
} else
|
|
530
|
-
|
|
508
|
+
$[75] = blockIdForWrites;
|
|
509
|
+
$[76] = t32;
|
|
510
|
+
} else t32 = $[76];
|
|
511
|
+
t31 = t32;
|
|
531
512
|
break bb5;
|
|
532
513
|
}
|
|
533
|
-
let
|
|
534
|
-
if ($[
|
|
535
|
-
|
|
514
|
+
let t32;
|
|
515
|
+
if ($[77] !== blockIdForWrites || $[78] !== currentItemId) {
|
|
516
|
+
t32 = {
|
|
536
517
|
kind: "item",
|
|
537
518
|
blockId: blockIdForWrites,
|
|
538
519
|
itemId: currentItemId
|
|
539
520
|
};
|
|
540
|
-
$[
|
|
541
|
-
$[
|
|
542
|
-
$[
|
|
543
|
-
} else
|
|
544
|
-
|
|
521
|
+
$[77] = blockIdForWrites;
|
|
522
|
+
$[78] = currentItemId;
|
|
523
|
+
$[79] = t32;
|
|
524
|
+
} else t32 = $[79];
|
|
525
|
+
t31 = t32;
|
|
545
526
|
}
|
|
546
|
-
const writeField = useFieldWriter(
|
|
547
|
-
|
|
527
|
+
const writeField = useFieldWriter(t31, currentSchema);
|
|
528
|
+
let t32;
|
|
529
|
+
if ($[80] !== currentItemId || $[81] !== itemsMap) {
|
|
530
|
+
t32 = currentItemId != null ? buildAncestorChain(currentItemId, itemsMap) : [];
|
|
531
|
+
$[80] = currentItemId;
|
|
532
|
+
$[81] = itemsMap;
|
|
533
|
+
$[82] = t32;
|
|
534
|
+
} else t32 = $[82];
|
|
535
|
+
const ancestorChain = t32;
|
|
548
536
|
if (!currentSchema || !recordView && (!block || !blockDef)) {
|
|
549
|
-
let
|
|
550
|
-
if ($[
|
|
551
|
-
|
|
537
|
+
let t33;
|
|
538
|
+
if ($[83] === Symbol.for("react.memo_cache_sentinel")) {
|
|
539
|
+
t33 = /* @__PURE__ */ jsxs("div", {
|
|
552
540
|
className: "text-muted-foreground flex flex-1 items-center justify-center px-2 text-sm",
|
|
553
541
|
children: [/* @__PURE__ */ jsx(Spinner, { className: "mr-2 size-3.5" }), " Loading block..."]
|
|
554
542
|
});
|
|
555
|
-
$[
|
|
556
|
-
} else
|
|
557
|
-
return
|
|
543
|
+
$[83] = t33;
|
|
544
|
+
} else t33 = $[83];
|
|
545
|
+
return t33;
|
|
558
546
|
}
|
|
559
547
|
const fieldHasOwnView = fieldInfo ? fieldTypesDictionary[fieldInfo.fieldType].hasOwnView : false;
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
fieldName: ancestor.fieldName,
|
|
581
|
-
fieldType: "Repeater"
|
|
582
|
-
},
|
|
583
|
-
onClick: () => previewStore.send({
|
|
584
|
-
type: "selectTarget",
|
|
585
|
-
...owner,
|
|
586
|
-
selection: ancestor.parentItemId == null ? {
|
|
548
|
+
let t33;
|
|
549
|
+
if ($[84] !== ancestorChain || $[85] !== currentItemId || $[86] !== fieldHasOwnView || $[87] !== itemsMap || $[88] !== owner || $[89] !== recordView) {
|
|
550
|
+
t33 = (block_0, blockDef_0) => [{
|
|
551
|
+
key: "block",
|
|
552
|
+
label: blockDef_0.title,
|
|
553
|
+
isCurrent: ancestorChain.length === 0 && !fieldHasOwnView && !recordView,
|
|
554
|
+
onClick: () => previewStore.send({
|
|
555
|
+
type: "setFocusedBlock",
|
|
556
|
+
...owner,
|
|
557
|
+
blockId: block_0.id
|
|
558
|
+
}),
|
|
559
|
+
hoverTarget: {
|
|
560
|
+
type: "block",
|
|
561
|
+
blockId: block_0.id
|
|
562
|
+
}
|
|
563
|
+
}, ...ancestorChain.flatMap((ancestor) => [{
|
|
564
|
+
key: `repeater-${ancestor.id}`,
|
|
565
|
+
label: getArraySchemaForItem(blockDef_0.contentSchema, ancestor.id, itemsMap)?.title ?? formatFieldName(ancestor.fieldName),
|
|
566
|
+
isCurrent: false,
|
|
567
|
+
hoverTarget: {
|
|
587
568
|
type: "block-field",
|
|
588
569
|
blockId: block_0.id,
|
|
589
570
|
fieldName: ancestor.fieldName,
|
|
590
571
|
fieldType: "Repeater"
|
|
591
|
-
}
|
|
592
|
-
|
|
572
|
+
},
|
|
573
|
+
onClick: () => previewStore.send({
|
|
574
|
+
type: "selectTarget",
|
|
575
|
+
...owner,
|
|
576
|
+
selection: ancestor.parentItemId == null ? {
|
|
577
|
+
type: "block-field",
|
|
578
|
+
blockId: block_0.id,
|
|
579
|
+
fieldName: ancestor.fieldName,
|
|
580
|
+
fieldType: "Repeater"
|
|
581
|
+
} : {
|
|
582
|
+
type: "item-field",
|
|
583
|
+
blockId: block_0.id,
|
|
584
|
+
itemId: ancestor.parentItemId,
|
|
585
|
+
fieldName: ancestor.fieldName,
|
|
586
|
+
fieldType: "Repeater"
|
|
587
|
+
}
|
|
588
|
+
})
|
|
589
|
+
}, {
|
|
590
|
+
key: `item-${ancestor.id}`,
|
|
591
|
+
label: entityName(ancestor, "Item"),
|
|
592
|
+
hoverTarget: {
|
|
593
|
+
type: "item",
|
|
593
594
|
blockId: block_0.id,
|
|
594
|
-
itemId: ancestor.
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
{
|
|
595
|
+
itemId: ancestor.id
|
|
596
|
+
},
|
|
597
|
+
isCurrent: ancestor.id === currentItemId && !fieldHasOwnView && !recordView && ancestor.id === ancestorChain[ancestorChain.length - 1]?.id,
|
|
598
|
+
onClick: () => previewStore.send({
|
|
599
|
+
type: "selectItem",
|
|
600
|
+
...owner,
|
|
601
|
+
blockId: block_0.id,
|
|
602
|
+
itemId: ancestor.id
|
|
603
|
+
})
|
|
604
|
+
}])];
|
|
605
|
+
$[84] = ancestorChain;
|
|
606
|
+
$[85] = currentItemId;
|
|
607
|
+
$[86] = fieldHasOwnView;
|
|
608
|
+
$[87] = itemsMap;
|
|
609
|
+
$[88] = owner;
|
|
610
|
+
$[89] = recordView;
|
|
611
|
+
$[90] = t33;
|
|
612
|
+
} else t33 = $[90];
|
|
613
|
+
const blockCrumbs = t33;
|
|
614
|
+
const t34 = owner.kind === "page" ? "Page" : "Layout";
|
|
615
|
+
let t35;
|
|
616
|
+
if ($[91] !== t34) {
|
|
617
|
+
t35 = {
|
|
617
618
|
key: "page",
|
|
618
619
|
hoverTarget: null,
|
|
619
|
-
label:
|
|
620
|
+
label: t34,
|
|
620
621
|
isCurrent: false,
|
|
621
622
|
onClick: _temp5
|
|
622
|
-
}
|
|
623
|
-
|
|
623
|
+
};
|
|
624
|
+
$[91] = t34;
|
|
625
|
+
$[92] = t35;
|
|
626
|
+
} else t35 = $[92];
|
|
627
|
+
let t36;
|
|
628
|
+
if ($[93] !== block || $[94] !== blockCrumbs || $[95] !== blockDef) {
|
|
629
|
+
t36 = block && blockDef ? blockCrumbs(block, blockDef) : [];
|
|
630
|
+
$[93] = block;
|
|
631
|
+
$[94] = blockCrumbs;
|
|
632
|
+
$[95] = blockDef;
|
|
633
|
+
$[96] = t36;
|
|
634
|
+
} else t36 = $[96];
|
|
635
|
+
const navigationItems = [
|
|
636
|
+
t35,
|
|
637
|
+
...t36,
|
|
624
638
|
...recordCrumbs(fieldHasOwnView),
|
|
625
639
|
...fieldHasOwnView && fieldInfo ? [{
|
|
626
640
|
key: `field-${fieldInfo.fieldName}`,
|
|
@@ -630,340 +644,316 @@ const SelectionEditorContent = (t0) => {
|
|
|
630
644
|
hoverTarget: selection ?? void 0
|
|
631
645
|
}] : []
|
|
632
646
|
];
|
|
633
|
-
const
|
|
634
|
-
const
|
|
635
|
-
const
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
} : null),
|
|
648
|
-
onMouseLeave: () => setHoveredBreadcrumb(null),
|
|
649
|
-
onClickCapture: () => setHoveredBreadcrumb(null),
|
|
650
|
-
children: [/* @__PURE__ */ jsxs("svg", {
|
|
651
|
-
"aria-hidden": "true",
|
|
652
|
-
className: "text-muted-foreground pointer-events-none absolute top-0 left-0 h-7 w-4",
|
|
653
|
-
fill: "none",
|
|
654
|
-
preserveAspectRatio: "none",
|
|
655
|
-
viewBox: "0 0 16 28",
|
|
656
|
-
children: [
|
|
657
|
-
!isFirstItem && /* @__PURE__ */ jsx("path", {
|
|
658
|
-
d: "M8 0 V10",
|
|
659
|
-
stroke: "currentColor",
|
|
660
|
-
strokeWidth: "1.5",
|
|
661
|
-
vectorEffect: "non-scaling-stroke"
|
|
662
|
-
}),
|
|
663
|
-
!isLastItem && /* @__PURE__ */ jsx("path", {
|
|
664
|
-
d: "M8 18 V28",
|
|
665
|
-
stroke: "currentColor",
|
|
666
|
-
strokeWidth: "1.5",
|
|
667
|
-
vectorEffect: "non-scaling-stroke"
|
|
668
|
-
}),
|
|
669
|
-
/* @__PURE__ */ jsx("circle", {
|
|
670
|
-
className: "fill-background",
|
|
671
|
-
cx: "8",
|
|
672
|
-
cy: "14",
|
|
673
|
-
r: "4",
|
|
674
|
-
stroke: "currentColor",
|
|
675
|
-
strokeWidth: "1.5",
|
|
676
|
-
vectorEffect: "non-scaling-stroke"
|
|
677
|
-
})
|
|
678
|
-
]
|
|
679
|
-
}), item.onClick ? /* @__PURE__ */ jsx("button", {
|
|
680
|
-
type: "button",
|
|
681
|
-
className: cn("hover:text-foreground block h-7 max-w-full cursor-pointer truncate text-left leading-7 transition-colors", item.isCurrent && "text-foreground font-medium"),
|
|
682
|
-
onClick: item.onClick,
|
|
683
|
-
children: item.label
|
|
684
|
-
}) : /* @__PURE__ */ jsx("span", {
|
|
685
|
-
className: "text-foreground block h-7 min-w-0 truncate leading-7 font-medium",
|
|
686
|
-
children: item.label
|
|
687
|
-
})]
|
|
688
|
-
}, item.key);
|
|
689
|
-
});
|
|
690
|
-
let t40;
|
|
691
|
-
if ($[86] !== t39) {
|
|
692
|
-
t40 = /* @__PURE__ */ jsx("nav", {
|
|
693
|
-
"aria-label": t36,
|
|
694
|
-
className: t37,
|
|
647
|
+
const stackedItems = pageCrumb ? navigationItems : navigationItems.slice(1);
|
|
648
|
+
const firstDepth = pageCrumb ? 1 : 2;
|
|
649
|
+
const front = stackedItems[stackedItems.length - 1];
|
|
650
|
+
let t37;
|
|
651
|
+
if ($[97] !== stackedItems.length) {
|
|
652
|
+
t37 = /* @__PURE__ */ jsx(SelectionViewCount, { count: stackedItems.length });
|
|
653
|
+
$[97] = stackedItems.length;
|
|
654
|
+
$[98] = t37;
|
|
655
|
+
} else t37 = $[98];
|
|
656
|
+
let t38;
|
|
657
|
+
if ($[99] !== firstDepth || $[100] !== pageCrumb || $[101] !== stackedItems) {
|
|
658
|
+
t38 = /* @__PURE__ */ jsx("nav", {
|
|
659
|
+
"aria-label": "Selection path",
|
|
660
|
+
className: "shrink-0",
|
|
695
661
|
children: /* @__PURE__ */ jsx("ol", {
|
|
696
|
-
className:
|
|
697
|
-
children:
|
|
662
|
+
className: "flex flex-col",
|
|
663
|
+
children: stackedItems.map((item, index) => {
|
|
664
|
+
const distance = stackedItems.length - 1 - index;
|
|
665
|
+
const covered = distance > 0;
|
|
666
|
+
return /* @__PURE__ */ jsx("li", {
|
|
667
|
+
className: "relative flex flex-col",
|
|
668
|
+
children: /* @__PURE__ */ jsx(SidebarStackHeader, {
|
|
669
|
+
depth: firstDepth + index,
|
|
670
|
+
distance,
|
|
671
|
+
first: pageCrumb && index === 0,
|
|
672
|
+
onSelect: item.onClick,
|
|
673
|
+
hoverTarget: item.hoverTarget,
|
|
674
|
+
children: covered ? item.label : /* @__PURE__ */ jsx("span", {
|
|
675
|
+
className: "truncate font-medium",
|
|
676
|
+
children: item.label
|
|
677
|
+
})
|
|
678
|
+
})
|
|
679
|
+
}, item.key);
|
|
680
|
+
})
|
|
698
681
|
})
|
|
699
682
|
});
|
|
700
|
-
$[
|
|
701
|
-
$[
|
|
702
|
-
|
|
683
|
+
$[99] = firstDepth;
|
|
684
|
+
$[100] = pageCrumb;
|
|
685
|
+
$[101] = stackedItems;
|
|
686
|
+
$[102] = t38;
|
|
687
|
+
} else t38 = $[102];
|
|
688
|
+
const t39 = `${block?.id ?? "layout"}:${front?.key}`;
|
|
689
|
+
const t40 = firstDepth + stackedItems.length - 1;
|
|
703
690
|
let t41;
|
|
704
|
-
if ($[
|
|
705
|
-
t41 = /* @__PURE__ */ jsx(
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
} else t41 = $[90];
|
|
714
|
-
let t42;
|
|
715
|
-
if ($[91] !== addSibling || $[92] !== assetAccept || $[93] !== assetFieldName || $[94] !== assetType || $[95] !== block || $[96] !== blockDef || $[97] !== canAddSibling || $[98] !== canRemoveCurrent || $[99] !== currentData || $[100] !== currentItem || $[101] !== currentItemId || $[102] !== currentSchema || $[103] !== fieldHasOwnView || $[104] !== fieldIdPrefix || $[105] !== fieldInfo?.fieldName || $[106] !== filesMap || $[107] !== isItemLoading || $[108] !== isMultipleAsset || $[109] !== isViewingAsset || $[110] !== isViewingLink || $[111] !== itemArraySchema || $[112] !== itemSettingsFields || $[113] !== itemsMap || $[114] !== linkFieldName || $[115] !== owner || $[116] !== recordInList || $[117] !== recordView || $[118] !== removeCurrent || $[119] !== send || $[120] !== settingsFields || $[121] !== updateRepeatableSettings || $[122] !== updateSettings || $[123] !== writeField) {
|
|
716
|
-
t42 = /* @__PURE__ */ jsx("div", {
|
|
717
|
-
className: "relative min-w-0 flex-1 overflow-x-hidden overflow-y-auto",
|
|
718
|
-
children: /* @__PURE__ */ jsx("div", { children: isItemLoading ? /* @__PURE__ */ jsx("div", {
|
|
719
|
-
className: "flex h-full items-center justify-center py-12",
|
|
720
|
-
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
721
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
722
|
-
!fieldHasOwnView && !recordView && currentItemId != null && currentItem && /* @__PURE__ */ jsxs(SidebarSection, {
|
|
723
|
-
divider: "bottom",
|
|
691
|
+
if ($[103] !== addSibling || $[104] !== assetAccept || $[105] !== assetFieldName || $[106] !== assetType || $[107] !== block || $[108] !== blockDef || $[109] !== canAddSibling || $[110] !== canRemoveCurrent || $[111] !== currentData || $[112] !== currentItem || $[113] !== currentItemId || $[114] !== currentSchema || $[115] !== fieldHasOwnView || $[116] !== fieldIdPrefix || $[117] !== fieldInfo?.fieldName || $[118] !== filesMap || $[119] !== isItemLoading || $[120] !== isMultipleAsset || $[121] !== isViewingAsset || $[122] !== isViewingLink || $[123] !== itemArraySchema || $[124] !== itemSettingsFields || $[125] !== itemsMap || $[126] !== linkFieldName || $[127] !== owner || $[128] !== recordInList || $[129] !== recordView || $[130] !== removeCurrent || $[131] !== send || $[132] !== settingsFields || $[133] !== updateRepeatableSettings || $[134] !== updateSettings || $[135] !== writeField) {
|
|
692
|
+
t41 = /* @__PURE__ */ jsx("div", { children: isItemLoading ? /* @__PURE__ */ jsx("div", {
|
|
693
|
+
className: "flex h-full items-center justify-center py-12",
|
|
694
|
+
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
695
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
696
|
+
!fieldHasOwnView && !recordView && currentItemId != null && currentItem && /* @__PURE__ */ jsxs(SidebarSection, {
|
|
697
|
+
divider: "bottom",
|
|
698
|
+
"aria-label": "List actions",
|
|
699
|
+
children: [/* @__PURE__ */ jsx(SidebarSectionHeader, { children: "List actions" }), /* @__PURE__ */ jsx(SidebarSectionContent, { children: /* @__PURE__ */ jsxs(ButtonGroup, {
|
|
724
700
|
"aria-label": "List actions",
|
|
725
|
-
children: [/* @__PURE__ */
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
"
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
className: "
|
|
760
|
-
children: [
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
const
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
children:
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
},
|
|
790
|
-
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
791
|
-
id: `setting-${field.name}`,
|
|
792
|
-
children: /* @__PURE__ */ jsx(SelectValue, {})
|
|
793
|
-
}), /* @__PURE__ */ jsx(SelectContent, { children: field.enumValues?.map((enumValue) => /* @__PURE__ */ jsx(SelectItem, {
|
|
794
|
-
value: enumValue,
|
|
795
|
-
children: field.enumLabels?.[enumValue] ?? enumValue
|
|
796
|
-
}, enumValue)) })]
|
|
797
|
-
})]
|
|
798
|
-
}, field.name);
|
|
799
|
-
}
|
|
800
|
-
if (field.fieldType === "Boolean") {
|
|
801
|
-
const checked = settingsValues[field.name] ?? (blockDef.settingsSchema?.properties?.[field.name])?.default ?? false;
|
|
802
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
803
|
-
className: "flex items-center justify-between",
|
|
804
|
-
children: [/* @__PURE__ */ jsx(Label, {
|
|
805
|
-
htmlFor: `setting-${field.name}`,
|
|
806
|
-
children: label
|
|
807
|
-
}), /* @__PURE__ */ jsx(Switch, {
|
|
701
|
+
children: [/* @__PURE__ */ jsxs(Button, {
|
|
702
|
+
type: "button",
|
|
703
|
+
variant: "outline",
|
|
704
|
+
size: "sm",
|
|
705
|
+
disabled: !canAddSibling,
|
|
706
|
+
onClick: () => {
|
|
707
|
+
if (!canAddSibling) return;
|
|
708
|
+
addSibling({ afterPosition: currentItem.position });
|
|
709
|
+
},
|
|
710
|
+
children: [/* @__PURE__ */ jsx(CirclePlus, { className: "text-muted-foreground h-4 w-4" }), "Add sibling"]
|
|
711
|
+
}), /* @__PURE__ */ jsxs(Button, {
|
|
712
|
+
type: "button",
|
|
713
|
+
variant: "outline",
|
|
714
|
+
size: "sm",
|
|
715
|
+
disabled: !canRemoveCurrent,
|
|
716
|
+
onClick: () => {
|
|
717
|
+
if (!canRemoveCurrent) return;
|
|
718
|
+
removeCurrent(currentItemId, { onSuccess: () => {
|
|
719
|
+
const selected = selectionForOwner(previewStore.getSnapshot().context, owner);
|
|
720
|
+
if (selectionItemId(selected) !== currentItemId) return;
|
|
721
|
+
previewStore.send({ type: "selectParent" });
|
|
722
|
+
} });
|
|
723
|
+
},
|
|
724
|
+
children: [/* @__PURE__ */ jsx(Trash2, { className: "text-muted-foreground h-4 w-4" }), "Delete"]
|
|
725
|
+
})]
|
|
726
|
+
}) })]
|
|
727
|
+
}),
|
|
728
|
+
recordView && !fieldHasOwnView && recordInList && /* @__PURE__ */ jsx(SidebarSection, {
|
|
729
|
+
divider: "bottom",
|
|
730
|
+
"aria-label": "Shared record",
|
|
731
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
732
|
+
"data-shared-record": true,
|
|
733
|
+
className: "space-y-1 px-2 py-3",
|
|
734
|
+
children: [/* @__PURE__ */ jsxs("p", {
|
|
735
|
+
className: "min-w-0 truncate text-sm font-medium",
|
|
736
|
+
children: ["Shared · ", recordView.collection.title]
|
|
737
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
738
|
+
className: "text-muted-foreground text-xs",
|
|
739
|
+
children: "Edits apply everywhere this record is used."
|
|
740
|
+
})]
|
|
741
|
+
})
|
|
742
|
+
}),
|
|
743
|
+
block && blockDef && currentItemId == null && !recordView && !fieldHasOwnView && settingsFields.length > 0 && /* @__PURE__ */ jsxs(SidebarSection, {
|
|
744
|
+
divider: "bottom",
|
|
745
|
+
"aria-label": "Block settings",
|
|
746
|
+
children: [/* @__PURE__ */ jsx(SidebarSectionHeader, { children: "Settings" }), /* @__PURE__ */ jsx(SidebarSectionContent, { children: settingsFields.map((field) => {
|
|
747
|
+
const label = field.label ?? formatFieldName(field.name);
|
|
748
|
+
const settingsValues = block.settings ?? {};
|
|
749
|
+
if (field.fieldType === "Enum") {
|
|
750
|
+
const value_2 = settingsValues[field.name] ?? (blockDef.settingsSchema?.properties?.[field.name])?.default ?? "";
|
|
751
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
752
|
+
className: "space-y-2",
|
|
753
|
+
children: [/* @__PURE__ */ jsx(Label, {
|
|
754
|
+
htmlFor: `setting-${field.name}`,
|
|
755
|
+
children: label
|
|
756
|
+
}), /* @__PURE__ */ jsxs(Select, {
|
|
757
|
+
value: value_2,
|
|
758
|
+
onValueChange: (newValue) => {
|
|
759
|
+
updateSettings.mutate({
|
|
760
|
+
id: block.id,
|
|
761
|
+
settings: { [field.name]: newValue }
|
|
762
|
+
});
|
|
763
|
+
},
|
|
764
|
+
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
808
765
|
id: `setting-${field.name}`,
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
return
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
766
|
+
children: /* @__PURE__ */ jsx(SelectValue, {})
|
|
767
|
+
}), /* @__PURE__ */ jsx(SelectContent, { children: field.enumValues?.map((enumValue) => /* @__PURE__ */ jsx(SelectItem, {
|
|
768
|
+
value: enumValue,
|
|
769
|
+
children: field.enumLabels?.[enumValue] ?? enumValue
|
|
770
|
+
}, enumValue)) })]
|
|
771
|
+
})]
|
|
772
|
+
}, field.name);
|
|
773
|
+
}
|
|
774
|
+
if (field.fieldType === "Boolean") {
|
|
775
|
+
const checked = settingsValues[field.name] ?? (blockDef.settingsSchema?.properties?.[field.name])?.default ?? false;
|
|
776
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
777
|
+
className: "flex items-center justify-between",
|
|
778
|
+
children: [/* @__PURE__ */ jsx(Label, {
|
|
779
|
+
htmlFor: `setting-${field.name}`,
|
|
780
|
+
children: label
|
|
781
|
+
}), /* @__PURE__ */ jsx(Switch, {
|
|
782
|
+
id: `setting-${field.name}`,
|
|
783
|
+
checked,
|
|
784
|
+
onCheckedChange: (newValue_0) => {
|
|
785
|
+
updateSettings.mutate({
|
|
786
|
+
id: block.id,
|
|
787
|
+
settings: { [field.name]: newValue_0 }
|
|
788
|
+
});
|
|
789
|
+
}
|
|
790
|
+
})]
|
|
791
|
+
}, field.name);
|
|
792
|
+
}
|
|
793
|
+
return null;
|
|
794
|
+
}) })]
|
|
795
|
+
}),
|
|
796
|
+
currentItemId != null && !recordView && !fieldHasOwnView && itemSettingsFields.length > 0 && /* @__PURE__ */ jsxs(SidebarSection, {
|
|
797
|
+
divider: "bottom",
|
|
798
|
+
"aria-label": "Item settings",
|
|
799
|
+
children: [/* @__PURE__ */ jsx(SidebarSectionHeader, { children: "Settings" }), /* @__PURE__ */ jsx(SidebarSectionContent, { children: itemSettingsFields.map((field_0) => {
|
|
800
|
+
const label_0 = field_0.label ?? formatFieldName(field_0.name);
|
|
801
|
+
const itemSettingsValues = currentItem?.settings ?? {};
|
|
802
|
+
const itemSettingsSchemaProps = itemArraySchema?.itemSettingsSchema?.properties;
|
|
803
|
+
if (field_0.fieldType === "Enum") {
|
|
804
|
+
const value_3 = itemSettingsValues[field_0.name] ?? itemSettingsSchemaProps?.[field_0.name]?.default ?? "";
|
|
805
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
806
|
+
className: "space-y-2",
|
|
807
|
+
children: [/* @__PURE__ */ jsx(Label, {
|
|
808
|
+
htmlFor: `item-setting-${field_0.name}`,
|
|
809
|
+
children: label_0
|
|
810
|
+
}), /* @__PURE__ */ jsxs(Select, {
|
|
811
|
+
value: value_3,
|
|
812
|
+
onValueChange: (newValue_1) => {
|
|
813
|
+
updateRepeatableSettings.mutate({
|
|
814
|
+
id: currentItemId,
|
|
815
|
+
settings: { [field_0.name]: newValue_1 }
|
|
816
|
+
});
|
|
817
|
+
},
|
|
818
|
+
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
862
819
|
id: `item-setting-${field_0.name}`,
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
return
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
$[
|
|
942
|
-
$[
|
|
943
|
-
$[
|
|
944
|
-
$[
|
|
945
|
-
$[
|
|
946
|
-
$[
|
|
947
|
-
$[
|
|
948
|
-
$[
|
|
949
|
-
$[
|
|
950
|
-
$[
|
|
951
|
-
$[
|
|
952
|
-
$[
|
|
953
|
-
$[
|
|
954
|
-
$[
|
|
955
|
-
$[
|
|
956
|
-
$[
|
|
957
|
-
$[
|
|
958
|
-
$[
|
|
959
|
-
|
|
820
|
+
children: /* @__PURE__ */ jsx(SelectValue, {})
|
|
821
|
+
}), /* @__PURE__ */ jsx(SelectContent, { children: field_0.enumValues?.map((enumValue_0) => /* @__PURE__ */ jsx(SelectItem, {
|
|
822
|
+
value: enumValue_0,
|
|
823
|
+
children: field_0.enumLabels?.[enumValue_0] ?? enumValue_0
|
|
824
|
+
}, enumValue_0)) })]
|
|
825
|
+
})]
|
|
826
|
+
}, field_0.name);
|
|
827
|
+
}
|
|
828
|
+
if (field_0.fieldType === "Boolean") {
|
|
829
|
+
const checked_0 = itemSettingsValues[field_0.name] ?? itemSettingsSchemaProps?.[field_0.name]?.default ?? false;
|
|
830
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
831
|
+
className: "flex items-center justify-between",
|
|
832
|
+
children: [/* @__PURE__ */ jsx(Label, {
|
|
833
|
+
htmlFor: `item-setting-${field_0.name}`,
|
|
834
|
+
children: label_0
|
|
835
|
+
}), /* @__PURE__ */ jsx(Switch, {
|
|
836
|
+
id: `item-setting-${field_0.name}`,
|
|
837
|
+
checked: checked_0,
|
|
838
|
+
onCheckedChange: (newValue_2) => {
|
|
839
|
+
updateRepeatableSettings.mutate({
|
|
840
|
+
id: currentItemId,
|
|
841
|
+
settings: { [field_0.name]: newValue_2 }
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
})]
|
|
845
|
+
}, field_0.name);
|
|
846
|
+
}
|
|
847
|
+
return null;
|
|
848
|
+
}) })]
|
|
849
|
+
}),
|
|
850
|
+
isViewingAsset && assetFieldName && isMultipleAsset && /* @__PURE__ */ jsx(MultipleAssetFieldEditor, {
|
|
851
|
+
fieldName: assetFieldName,
|
|
852
|
+
assetType,
|
|
853
|
+
currentData,
|
|
854
|
+
onFieldChange: writeField,
|
|
855
|
+
resolveLocally: recordView != null,
|
|
856
|
+
offerDelete: recordView == null,
|
|
857
|
+
accept: assetAccept
|
|
858
|
+
}),
|
|
859
|
+
isViewingAsset && assetFieldName && !isMultipleAsset && /* @__PURE__ */ jsx(SingleAssetFieldEditor, {
|
|
860
|
+
fieldName: assetFieldName,
|
|
861
|
+
assetType,
|
|
862
|
+
currentData,
|
|
863
|
+
onFieldChange: writeField,
|
|
864
|
+
resolveLocally: recordView != null,
|
|
865
|
+
offerDelete: recordView == null,
|
|
866
|
+
accept: assetAccept
|
|
867
|
+
}),
|
|
868
|
+
!isViewingAsset && isViewingLink && linkFieldName && /* @__PURE__ */ jsx("div", {
|
|
869
|
+
className: "px-2 py-4",
|
|
870
|
+
children: /* @__PURE__ */ jsx(LinkFieldEditor, {
|
|
871
|
+
fieldName: linkFieldName,
|
|
872
|
+
linkValue: currentData[linkFieldName] ?? {
|
|
873
|
+
type: "external",
|
|
874
|
+
text: "",
|
|
875
|
+
href: "",
|
|
876
|
+
newTab: false
|
|
877
|
+
},
|
|
878
|
+
onSave: (fieldName, value_4) => {
|
|
879
|
+
writeField(fieldName, value_4);
|
|
880
|
+
}
|
|
881
|
+
})
|
|
882
|
+
}),
|
|
883
|
+
!isViewingAsset && !isViewingLink && (currentItemId == null || currentItem) && /* @__PURE__ */ jsx(ItemFieldsEditor, {
|
|
884
|
+
selectedFieldName: fieldInfo?.fieldName,
|
|
885
|
+
schema: currentSchema,
|
|
886
|
+
data: currentData,
|
|
887
|
+
blockId: block?.id ?? "",
|
|
888
|
+
itemId: currentItemId ?? void 0,
|
|
889
|
+
onFieldChange: writeField,
|
|
890
|
+
postToIframe: send,
|
|
891
|
+
filesMap,
|
|
892
|
+
itemsMap,
|
|
893
|
+
references: recordView ? recordView.record.references : (currentItem ?? block)?.references,
|
|
894
|
+
placement: recordView ? recordPlacement(recordView.selection) : void 0,
|
|
895
|
+
fieldIdPrefix
|
|
896
|
+
}, `${block?.id ?? "layout"}-${recordView ? `record-${recordView.record.id}` : currentItemId ?? "block"}-${fieldInfo?.fieldName ?? "fields"}`)
|
|
897
|
+
] }) });
|
|
898
|
+
$[103] = addSibling;
|
|
899
|
+
$[104] = assetAccept;
|
|
900
|
+
$[105] = assetFieldName;
|
|
901
|
+
$[106] = assetType;
|
|
902
|
+
$[107] = block;
|
|
903
|
+
$[108] = blockDef;
|
|
904
|
+
$[109] = canAddSibling;
|
|
905
|
+
$[110] = canRemoveCurrent;
|
|
906
|
+
$[111] = currentData;
|
|
907
|
+
$[112] = currentItem;
|
|
908
|
+
$[113] = currentItemId;
|
|
909
|
+
$[114] = currentSchema;
|
|
910
|
+
$[115] = fieldHasOwnView;
|
|
911
|
+
$[116] = fieldIdPrefix;
|
|
912
|
+
$[117] = fieldInfo?.fieldName;
|
|
913
|
+
$[118] = filesMap;
|
|
914
|
+
$[119] = isItemLoading;
|
|
915
|
+
$[120] = isMultipleAsset;
|
|
916
|
+
$[121] = isViewingAsset;
|
|
917
|
+
$[122] = isViewingLink;
|
|
918
|
+
$[123] = itemArraySchema;
|
|
919
|
+
$[124] = itemSettingsFields;
|
|
920
|
+
$[125] = itemsMap;
|
|
921
|
+
$[126] = linkFieldName;
|
|
922
|
+
$[127] = owner;
|
|
923
|
+
$[128] = recordInList;
|
|
924
|
+
$[129] = recordView;
|
|
925
|
+
$[130] = removeCurrent;
|
|
926
|
+
$[131] = send;
|
|
927
|
+
$[132] = settingsFields;
|
|
928
|
+
$[133] = updateRepeatableSettings;
|
|
929
|
+
$[134] = updateSettings;
|
|
930
|
+
$[135] = writeField;
|
|
931
|
+
$[136] = t41;
|
|
932
|
+
} else t41 = $[136];
|
|
933
|
+
let t42;
|
|
934
|
+
if ($[137] !== t39 || $[138] !== t40 || $[139] !== t41) {
|
|
935
|
+
t42 = /* @__PURE__ */ jsx(SidebarStackView, {
|
|
936
|
+
depth: t40,
|
|
937
|
+
className: "relative min-w-0 overflow-x-hidden overflow-y-auto",
|
|
938
|
+
children: t41
|
|
939
|
+
}, t39);
|
|
940
|
+
$[137] = t39;
|
|
941
|
+
$[138] = t40;
|
|
942
|
+
$[139] = t41;
|
|
943
|
+
$[140] = t42;
|
|
944
|
+
} else t42 = $[140];
|
|
960
945
|
let t43;
|
|
961
|
-
if ($[
|
|
962
|
-
t43 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
946
|
+
if ($[141] !== t37 || $[142] !== t38 || $[143] !== t42) {
|
|
947
|
+
t43 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
948
|
+
t37,
|
|
949
|
+
t38,
|
|
950
|
+
t42
|
|
951
|
+
] });
|
|
952
|
+
$[141] = t37;
|
|
953
|
+
$[142] = t38;
|
|
954
|
+
$[143] = t42;
|
|
955
|
+
$[144] = t43;
|
|
956
|
+
} else t43 = $[144];
|
|
967
957
|
return t43;
|
|
968
958
|
};
|
|
969
959
|
function _temp(i) {
|