@crediblemark/build 0.25.6 → 0.25.8

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.
Files changed (59) hide show
  1. package/dist/ArrayField-HYHS4HCO.mjs +17 -0
  2. package/dist/{ArrayField-PAJW74AC.css → ArrayField-MCFJLKAL.css} +15 -15
  3. package/dist/{Editor-Y342RWPN.css → Editor-CVT4RKSU.css} +7 -7
  4. package/dist/{Editor-OFA3KX3N.mjs → Editor-P3UUWNSZ.mjs} +9 -11
  5. package/dist/ObjectField-4N5XWAFL.mjs +17 -0
  6. package/dist/{ObjectField-WACQHQ4N.css → ObjectField-YPHZU7G2.css} +15 -15
  7. package/dist/{Render-HVM2KISU.css → Render-DOE2LXKX.css} +1 -1
  8. package/dist/{Render-5WYR4VZX.mjs → Render-I6PZ5MEA.mjs} +1 -1
  9. package/dist/{actions-LaZpJ1KE.d.mts → actions-CKSDxt4l.d.mts} +1 -1
  10. package/dist/{actions-LaZpJ1KE.d.ts → actions-CKSDxt4l.d.ts} +1 -1
  11. package/dist/{chunk-QHJGER7I.mjs → chunk-44PQTFGV.mjs} +7 -9
  12. package/dist/{chunk-STIUFJT2.mjs → chunk-AZFZRLP7.mjs} +12 -12
  13. package/dist/{chunk-JX7LICWE.mjs → chunk-E4F5M5JH.mjs} +2 -2
  14. package/dist/chunk-HHKM5MBJ.mjs +3163 -0
  15. package/dist/{chunk-H6RPI3T6.mjs → chunk-ISXFLTBM.mjs} +1 -1
  16. package/dist/{chunk-MZXW5F5R.mjs → chunk-KN26YZZJ.mjs} +286 -131
  17. package/dist/chunk-MWCFPGI6.mjs +4807 -0
  18. package/dist/{chunk-64A37UUC.mjs → chunk-O44M27KT.mjs} +442 -7
  19. package/dist/{chunk-XAD7XPP2.mjs → chunk-P2AZFZ7Q.mjs} +3 -3
  20. package/dist/{chunk-SLKHXT3Q.mjs → chunk-PFHKXXSV.mjs} +1 -1
  21. package/dist/{chunk-RUJOMPX6.mjs → chunk-S32JZ2HU.mjs} +1 -1
  22. package/dist/{chunk-KAOWYQIB.mjs → chunk-T2LBDQLG.mjs} +12 -12
  23. package/dist/{chunk-4NZUDTR6.mjs → chunk-XLRMLBFR.mjs} +1 -1
  24. package/dist/{chunk-WSTUSWZT.mjs → chunk-Z7DDX2XU.mjs} +2 -2
  25. package/dist/{full-ECZCK3RE.mjs → full-3VRJOFG5.mjs} +6 -8
  26. package/dist/{full-PLJRDIMB.css → full-C7RVGAUA.css} +6 -6
  27. package/dist/{index-CD3PszvP.d.mts → index-Ds4Dkkyr.d.mts} +1 -1
  28. package/dist/{index-Bj2x5pZ7.d.ts → index-DwajIHZf.d.ts} +1 -1
  29. package/dist/index.css +231 -43
  30. package/dist/index.d.mts +8 -40
  31. package/dist/index.d.ts +8 -40
  32. package/dist/index.js +1306 -649
  33. package/dist/index.mjs +26 -26
  34. package/dist/internal.d.mts +2 -2
  35. package/dist/internal.d.ts +2 -2
  36. package/dist/internal.mjs +1 -2
  37. package/dist/{loaded-FY2TCG5Y.css → loaded-4FAPBCAU.css} +1 -1
  38. package/dist/{loaded-NRHNHJPM.mjs → loaded-C2JGMUXV.mjs} +3 -5
  39. package/dist/{loaded-5D7VRSXM.mjs → loaded-FJHWTGH6.mjs} +3 -5
  40. package/dist/{loaded-3MKTRGL5.mjs → loaded-NTEK7RT3.mjs} +3 -5
  41. package/dist/no-external.css +225 -39
  42. package/dist/no-external.d.mts +4 -4
  43. package/dist/no-external.d.ts +4 -4
  44. package/dist/no-external.js +1306 -649
  45. package/dist/no-external.mjs +26 -26
  46. package/dist/rsc.css +1421 -1
  47. package/dist/rsc.d.mts +2 -2
  48. package/dist/rsc.d.ts +2 -2
  49. package/dist/rsc.js +10328 -1011
  50. package/dist/rsc.mjs +21 -4
  51. package/dist/{walk-tree-BO8uRNcW.d.mts → walk-tree-B_jHFa3L.d.mts} +39 -2
  52. package/dist/{walk-tree-BEw6kTXm.d.ts → walk-tree-DHMRjk5Z.d.ts} +39 -2
  53. package/package.json +1 -1
  54. package/dist/ArrayField-PGZLQW7G.mjs +0 -19
  55. package/dist/ObjectField-N7ES6H3B.mjs +0 -19
  56. package/dist/chunk-7LXZOPYT.mjs +0 -445
  57. package/dist/chunk-HIE6KXP6.mjs +0 -455
  58. package/dist/chunk-SMAWAXVX.mjs +0 -139
  59. package/dist/chunk-W7LED3JG.mjs +0 -6890
@@ -1,455 +0,0 @@
1
- import {
2
- styles_module_default
3
- } from "./chunk-H6RPI3T6.mjs";
4
- import {
5
- defaultAppState,
6
- resolveComponentData
7
- } from "./chunk-SMAWAXVX.mjs";
8
- import {
9
- get_class_name_factory_default
10
- } from "./chunk-BFHV72KK.mjs";
11
- import {
12
- generateId,
13
- getZoneId,
14
- mapFields,
15
- toComponent,
16
- walkAppState,
17
- walkTree
18
- } from "./chunk-7LXZOPYT.mjs";
19
-
20
- // lib/migrate.ts
21
- var migrations = [
22
- // Migrate root to root.props
23
- (data) => {
24
- const rootProps = data.root.props || data.root;
25
- if (Object.keys(data.root).length > 0 && !data.root.props) {
26
- console.warn(
27
- "Migration applied: Root props moved from `root` to `root.props`."
28
- );
29
- return {
30
- ...data,
31
- root: {
32
- props: {
33
- ...rootProps
34
- }
35
- }
36
- };
37
- }
38
- return data;
39
- },
40
- // Migrate zones to slots
41
- (data, config, migrationOptions) => {
42
- if (!config) return data;
43
- console.log("Migrating DropZones to slots...");
44
- const updatedItems = {};
45
- const appState = { ...defaultAppState, data };
46
- const { indexes } = walkAppState(appState, config);
47
- const deletedCompounds = [];
48
- walkAppState(appState, config, (content, zoneCompound, zoneType) => {
49
- if (zoneType === "dropzone") {
50
- const [id, slotName] = zoneCompound.split(":");
51
- const nodeData = indexes.nodes[id].data;
52
- const componentType = nodeData.type;
53
- const configForComponent = id === "root" ? config.root : config.components[componentType];
54
- if (configForComponent?.fields?.[slotName]?.type === "slot") {
55
- updatedItems[id] = {
56
- ...nodeData,
57
- props: {
58
- ...nodeData.props,
59
- ...updatedItems[id]?.props,
60
- [slotName]: content
61
- }
62
- };
63
- deletedCompounds.push(zoneCompound);
64
- }
65
- return content;
66
- }
67
- return content;
68
- });
69
- const updated = walkAppState(
70
- appState,
71
- config,
72
- (content) => content,
73
- (item) => {
74
- return updatedItems[item.props.id] ?? item;
75
- }
76
- );
77
- deletedCompounds.forEach((zoneCompound) => {
78
- const [_, propName] = zoneCompound.split(":");
79
- console.log(
80
- `\u2713 Success: Migrated "${zoneCompound}" from DropZone to slot field "${propName}"`
81
- );
82
- delete updated.data.zones?.[zoneCompound];
83
- });
84
- if (migrationOptions?.migrateDynamicZonesForComponent) {
85
- const unmigratedZonesGrouped = {};
86
- Object.keys(updated.data.zones ?? {}).forEach((zoneCompound) => {
87
- const [componentId, propName] = zoneCompound.split(":");
88
- const content = updated.data.zones?.[zoneCompound];
89
- if (!content) {
90
- return;
91
- }
92
- if (!unmigratedZonesGrouped[componentId]) {
93
- unmigratedZonesGrouped[componentId] = {};
94
- }
95
- if (!unmigratedZonesGrouped[componentId][propName]) {
96
- unmigratedZonesGrouped[componentId][propName] = content;
97
- }
98
- });
99
- Object.keys(unmigratedZonesGrouped).forEach((componentId) => {
100
- updated.data = walkTree(updated.data, config, (content) => {
101
- return content.map((child) => {
102
- if (child.props.id !== componentId) {
103
- return child;
104
- }
105
- const migrateFn = migrationOptions?.migrateDynamicZonesForComponent?.[child.type];
106
- if (!migrateFn) {
107
- return child;
108
- }
109
- const zones = unmigratedZonesGrouped[componentId];
110
- const migratedProps = migrateFn(child.props, zones);
111
- Object.keys(zones).forEach((propName) => {
112
- const zoneCompound = `${componentId}:${propName}`;
113
- console.log(`\u2713 Success: Migrated "${zoneCompound}" DropZone`);
114
- delete updated.data.zones?.[zoneCompound];
115
- });
116
- return {
117
- ...child,
118
- props: migratedProps
119
- };
120
- });
121
- });
122
- });
123
- }
124
- Object.keys(updated.data.zones ?? {}).forEach((zoneCompound) => {
125
- const [_, propName] = zoneCompound.split(":");
126
- throw new Error(
127
- `Could not migrate DropZone "${zoneCompound}" to slot field. No slot exists with the name "${propName}".`
128
- );
129
- });
130
- delete updated.data.zones;
131
- return updated.data;
132
- }
133
- ];
134
- function migrate(data, config, migrationOptions) {
135
- return migrations?.reduce(
136
- (acc, migration) => migration(acc, config, migrationOptions),
137
- data
138
- );
139
- }
140
-
141
- // lib/data/default-data.ts
142
- var defaultData = (data) => ({
143
- ...data,
144
- root: data.root || {},
145
- content: data.content || []
146
- });
147
-
148
- // lib/transform-props.ts
149
- function transformProps(data, propTransforms, config = { components: {} }) {
150
- const mapItem = (item) => {
151
- if (propTransforms[item.type]) {
152
- return {
153
- ...item,
154
- props: {
155
- id: item.props.id,
156
- ...propTransforms[item.type](item.props)
157
- }
158
- };
159
- }
160
- return item;
161
- };
162
- const defaultedData = defaultData(data);
163
- const rootProps = defaultedData.root.props || defaultedData.root;
164
- let newRoot = { ...defaultedData.root };
165
- if (propTransforms["root"]) {
166
- newRoot.props = propTransforms["root"](rootProps);
167
- }
168
- const dataWithUpdatedRoot = { ...defaultedData, root: newRoot };
169
- const updatedData = walkTree(
170
- dataWithUpdatedRoot,
171
- config,
172
- (content) => content.map(mapItem)
173
- );
174
- if (!defaultedData.root.props) {
175
- updatedData.root = updatedData.root.props;
176
- }
177
- return updatedData;
178
- }
179
-
180
- // lib/group-zones-by-component.ts
181
- var groupZonesByComponent = (data) => {
182
- const zoneEntries = Object.entries(data.zones ?? {});
183
- return zoneEntries.reduce((acc, [zoneCompound, zoneContent]) => {
184
- const [componentId, zoneName] = getZoneId(zoneCompound);
185
- if (!componentId.length || !zoneName.length) return acc;
186
- if (!acc[componentId]) {
187
- acc[componentId] = [];
188
- }
189
- acc[componentId].push({ zoneCompound, content: zoneContent });
190
- return acc;
191
- }, {});
192
- };
193
-
194
- // lib/resolve-all-data.ts
195
- async function resolveAllData(data, config, metadata = {}, onResolveStart, onResolveEnd) {
196
- const defaultedData = defaultData(data);
197
- const zonesByComponent = groupZonesByComponent(defaultedData);
198
- let resolvedZones = {};
199
- const resolveNode = async (_node, parent) => {
200
- const node = toComponent(_node);
201
- onResolveStart?.(node);
202
- const resolved = (await resolveComponentData(
203
- node,
204
- config,
205
- metadata,
206
- () => {
207
- },
208
- () => {
209
- },
210
- "force",
211
- parent
212
- )).node;
213
- const resolvedAsComponent = toComponent(resolved);
214
- const resolvedDeepPromise = mapFields(
215
- resolved,
216
- {
217
- slot: ({ value }) => processContent(value, resolvedAsComponent)
218
- },
219
- config
220
- );
221
- let resolveZonePromises = [];
222
- if (zonesByComponent[resolvedAsComponent.props.id]) {
223
- resolveZonePromises = zonesByComponent[resolvedAsComponent.props.id].map(
224
- async ({ zoneCompound, content }) => {
225
- resolvedZones[zoneCompound] = await processContent(
226
- content,
227
- resolvedAsComponent
228
- );
229
- }
230
- );
231
- }
232
- const resolvedDeep = await resolvedDeepPromise;
233
- await Promise.all(resolveZonePromises);
234
- onResolveEnd?.(toComponent(resolvedDeep));
235
- return resolvedDeep;
236
- };
237
- const processContent = async (content, parent) => {
238
- return Promise.all(content.map((item) => resolveNode(item, parent)));
239
- };
240
- const result = defaultData({});
241
- result.root = await resolveNode(defaultedData.root, null);
242
- result.content = await processContent(
243
- defaultedData.content,
244
- toComponent(result.root)
245
- );
246
- result.zones = resolvedZones;
247
- return result;
248
- }
249
-
250
- // lib/field-transforms/default-transforms/slot-transform.tsx
251
- var getSlotTransform = (renderSlotEdit, renderSlotRender = renderSlotEdit) => ({
252
- slot: ({ value: content, propName, field, isReadOnly }) => {
253
- const render = isReadOnly ? renderSlotRender : renderSlotEdit;
254
- const Slot = (dzProps) => render({
255
- allow: field?.type === "slot" ? field.allow : [],
256
- disallow: field?.type === "slot" ? field.disallow : [],
257
- ...dzProps,
258
- zone: propName,
259
- content
260
- });
261
- return Slot;
262
- }
263
- });
264
-
265
- // lib/field-transforms/use-field-transforms.tsx
266
- import { useMemo } from "react";
267
-
268
- // lib/field-transforms/build-mappers.ts
269
- function buildMappers(transforms, readOnly, forceReadOnly) {
270
- return Object.keys(transforms).reduce((acc, _fieldType) => {
271
- const fieldType = _fieldType;
272
- return {
273
- ...acc,
274
- [fieldType]: ({
275
- parentId,
276
- ...params
277
- }) => {
278
- const wildcardPath = params.propPath.replace(/\[\d+\]/g, "[*]");
279
- const isReadOnly = readOnly?.[params.propPath] || readOnly?.[wildcardPath] || forceReadOnly || false;
280
- const fn = transforms[fieldType];
281
- return fn?.({
282
- ...params,
283
- isReadOnly,
284
- componentId: parentId
285
- });
286
- }
287
- };
288
- }, {});
289
- }
290
-
291
- // lib/field-transforms/use-field-transforms.tsx
292
- function useFieldTransforms(config, item, transforms, readOnly, forceReadOnly) {
293
- const mappers = useMemo(
294
- () => buildMappers(transforms, readOnly, forceReadOnly),
295
- [transforms, readOnly, forceReadOnly]
296
- );
297
- const transformedProps = useMemo(() => {
298
- return mapFields(item, mappers, config).props;
299
- }, [config, item, mappers]);
300
- const mergedProps = useMemo(
301
- () => ({ ...item.props, ...transformedProps }),
302
- [item.props, transformedProps]
303
- );
304
- return mergedProps;
305
- }
306
-
307
- // lib/use-slots.tsx
308
- function useSlots(config, item, renderSlotEdit, renderSlotRender = renderSlotEdit, readOnly, forceReadOnly) {
309
- return useFieldTransforms(
310
- config,
311
- item,
312
- getSlotTransform(renderSlotEdit, renderSlotRender),
313
- readOnly,
314
- forceReadOnly
315
- );
316
- }
317
-
318
- // components/RichTextEditor/lib/use-richtext-props.tsx
319
- import { lazy, Suspense, useMemo as useMemo2 } from "react";
320
-
321
- // components/RichTextEditor/components/RenderFallback.tsx
322
- import DOMPurify from "isomorphic-dompurify";
323
- import { jsx } from "react/jsx-runtime";
324
- var getClassName = get_class_name_factory_default("RichTextEditor", styles_module_default);
325
- function RichTextRenderFallback({ content }) {
326
- return /* @__PURE__ */ jsx("div", { className: getClassName(), children: /* @__PURE__ */ jsx(
327
- "div",
328
- {
329
- className: "rich-text",
330
- dangerouslySetInnerHTML: { __html: DOMPurify.sanitize(content) }
331
- }
332
- ) });
333
- }
334
-
335
- // components/RichTextEditor/lib/mapDeep.ts
336
- var mapDeep = (source, path, render) => {
337
- if (!source) {
338
- return null;
339
- }
340
- if (path.length === 0) {
341
- return render(source);
342
- }
343
- const [key, ...rest] = path;
344
- if (Array.isArray(source)) {
345
- return source.map((item) => mapDeep(item, path, render));
346
- }
347
- return {
348
- ...source,
349
- [key]: mapDeep(source[key], rest, render)
350
- };
351
- };
352
-
353
- // components/RichTextEditor/lib/use-richtext-props.tsx
354
- import { jsx as jsx2 } from "react/jsx-runtime";
355
- var findAllRichtextKeys = (fields, path = []) => {
356
- if (!fields) return [];
357
- const result = [];
358
- for (const [key, field] of Object.entries(fields)) {
359
- const currentPath = [...path, key];
360
- if (field.type === "richtext") {
361
- result.push({
362
- path: currentPath,
363
- field
364
- });
365
- }
366
- if (field.type === "array" && "arrayFields" in field) {
367
- result.push(...findAllRichtextKeys(field.arrayFields, currentPath));
368
- }
369
- if (field.type === "object" && "objectFields" in field) {
370
- result.push(...findAllRichtextKeys(field.objectFields, currentPath));
371
- }
372
- }
373
- return result;
374
- };
375
- function useRichtextProps(fields, props) {
376
- const richtextKeys = useMemo2(() => findAllRichtextKeys(fields), [fields]);
377
- const richtextProps = useMemo2(() => {
378
- if (!richtextKeys?.length) return {};
379
- const RichTextRender = lazy(
380
- () => import("./Render-5WYR4VZX.mjs").then((m) => ({
381
- default: m.RichTextRender
382
- }))
383
- );
384
- let result = { ...props };
385
- for (const { path, field } of richtextKeys) {
386
- result = mapDeep(result, path, (content) => /* @__PURE__ */ jsx2(
387
- Suspense,
388
- {
389
- fallback: /* @__PURE__ */ jsx2(RichTextRenderFallback, { content }),
390
- children: /* @__PURE__ */ jsx2(RichTextRender, { content, field })
391
- },
392
- generateId()
393
- ));
394
- }
395
- return result;
396
- }, [richtextKeys, props]);
397
- return richtextProps;
398
- }
399
-
400
- // components/SlotRender/server.tsx
401
- import { forwardRef } from "react";
402
- import { jsx as jsx3 } from "react/jsx-runtime";
403
- var SlotRenderPure = (props) => /* @__PURE__ */ jsx3(SlotRender, { ...props });
404
- var Item = ({
405
- config,
406
- item,
407
- metadata
408
- }) => {
409
- const Component = config.components[item.type];
410
- const props = useSlots(config, item, (slotProps) => /* @__PURE__ */ jsx3(SlotRenderPure, { ...slotProps, config, metadata }));
411
- const richtextProps = useRichtextProps(Component.fields, props);
412
- return /* @__PURE__ */ jsx3(
413
- Component.render,
414
- {
415
- ...props,
416
- ...richtextProps,
417
- credbuild: {
418
- ...props.credbuild,
419
- metadata: metadata || {}
420
- }
421
- }
422
- );
423
- };
424
- var SlotRender = forwardRef(
425
- function SlotRenderInternal({ className, style, content, config, metadata, as }, ref) {
426
- const El = as ?? "div";
427
- return /* @__PURE__ */ jsx3(El, { className, style, ref, children: content.map((item) => {
428
- if (!config.components[item.type]) {
429
- return null;
430
- }
431
- return /* @__PURE__ */ jsx3(
432
- Item,
433
- {
434
- config,
435
- item,
436
- metadata
437
- },
438
- item.props.id
439
- );
440
- }) });
441
- }
442
- );
443
-
444
- export {
445
- buildMappers,
446
- getSlotTransform,
447
- useSlots,
448
- RichTextRenderFallback,
449
- useRichtextProps,
450
- SlotRenderPure,
451
- SlotRender,
452
- migrate,
453
- transformProps,
454
- resolveAllData
455
- };
@@ -1,139 +0,0 @@
1
- import {
2
- mapFields,
3
- toComponent
4
- } from "./chunk-7LXZOPYT.mjs";
5
-
6
- // components/ViewportControls/default-viewports.ts
7
- var defaultViewports = [
8
- { width: 360, height: "auto", icon: "Smartphone", label: "Small" },
9
- { width: 768, height: "auto", icon: "Tablet", label: "Medium" },
10
- { width: 1280, height: "auto", icon: "Monitor", label: "Large" },
11
- { width: "100%", height: "auto", icon: "FullWidth", label: "Full-width" }
12
- ];
13
-
14
- // lib/get-changed.ts
15
- import { deepEqual } from "fast-equals";
16
- var getChanged = (newItem, oldItem) => {
17
- return newItem ? Object.keys(newItem.props || {}).reduce((acc, item) => {
18
- const newItemProps = newItem?.props || {};
19
- const oldItemProps = oldItem?.props || {};
20
- return {
21
- ...acc,
22
- [item]: !deepEqual(oldItemProps[item], newItemProps[item])
23
- };
24
- }, {}) : {};
25
- };
26
-
27
- // lib/resolve-component-data.ts
28
- import { deepEqual as deepEqual2 } from "fast-equals";
29
- var cache = { lastChange: {} };
30
- var resolveComponentData = async (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace", parent = null) => {
31
- const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
32
- const resolvedItem = {
33
- ...item
34
- };
35
- const shouldRunResolver = configForItem?.resolveData && item.props;
36
- const id = "id" in item.props ? item.props.id : "root";
37
- if (shouldRunResolver) {
38
- const {
39
- item: oldItem = null,
40
- resolved = {},
41
- parentId: oldParentId = null
42
- } = cache.lastChange[id] || {};
43
- const isRootOrInserted = oldParentId === null;
44
- const parentChanged = !isRootOrInserted && parent?.props.id !== oldParentId;
45
- const dataChanged = item && !deepEqual2(item, oldItem);
46
- const shouldSkip = trigger === "move" && !parentChanged || trigger !== "move" && trigger !== "force" && !dataChanged;
47
- if (shouldSkip) {
48
- return { node: resolved, didChange: false };
49
- }
50
- const changed = getChanged(item, oldItem);
51
- if (onResolveStart) {
52
- onResolveStart(item);
53
- }
54
- const { props: resolvedProps, readOnly = {} } = await configForItem.resolveData(item, {
55
- changed,
56
- lastData: oldItem,
57
- metadata: { ...metadata, ...configForItem.metadata },
58
- trigger,
59
- parent
60
- });
61
- resolvedItem.props = {
62
- ...item.props,
63
- ...resolvedProps
64
- };
65
- if (Object.keys(readOnly).length) {
66
- resolvedItem.readOnly = readOnly;
67
- }
68
- }
69
- const itemAsComponentData = toComponent(resolvedItem);
70
- let itemWithResolvedChildren = await mapFields(
71
- resolvedItem,
72
- {
73
- slot: async ({ value }) => {
74
- const content = value;
75
- return await Promise.all(
76
- content.map(
77
- async (childItem) => (await resolveComponentData(
78
- childItem,
79
- config,
80
- metadata,
81
- onResolveStart,
82
- onResolveEnd,
83
- trigger,
84
- itemAsComponentData
85
- )).node
86
- )
87
- );
88
- }
89
- },
90
- config
91
- );
92
- if (shouldRunResolver && onResolveEnd) {
93
- onResolveEnd(resolvedItem);
94
- }
95
- cache.lastChange[id] = {
96
- item,
97
- resolved: itemWithResolvedChildren,
98
- parentId: parent?.props.id
99
- };
100
- return {
101
- node: itemWithResolvedChildren,
102
- didChange: !deepEqual2(item, itemWithResolvedChildren)
103
- };
104
- };
105
-
106
- // store/default-app-state.ts
107
- var defaultAppState = {
108
- data: { content: [], root: {}, zones: {} },
109
- ui: {
110
- leftSideBarVisible: true,
111
- rightSideBarVisible: true,
112
- arrayState: {},
113
- itemSelector: null,
114
- componentList: {},
115
- isDragging: false,
116
- previewMode: "edit",
117
- viewports: {
118
- current: {
119
- width: defaultViewports[0].width,
120
- height: defaultViewports[0].height || "auto"
121
- },
122
- options: [],
123
- controlsVisible: true
124
- },
125
- field: { focus: null },
126
- plugin: { current: null }
127
- },
128
- indexes: {
129
- nodes: {},
130
- zones: {}
131
- }
132
- };
133
-
134
- export {
135
- defaultViewports,
136
- getChanged,
137
- resolveComponentData,
138
- defaultAppState
139
- };