@floegence/floe-webapp-core 0.36.57 → 0.36.58

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.
@@ -1,34 +1,35 @@
1
- import { insert as _, createComponent as g, effect as P, setAttribute as T, memo as de, template as p, Portal as ue, setStyleProperty as ge, use as ve, delegateEvents as fe } from "solid-js/web";
2
- import { createSignal as B, onCleanup as q, createEffect as z, createMemo as F, Show as K, For as j } from "solid-js";
1
+ import { insert as _, createComponent as g, effect as P, setAttribute as T, memo as se, template as p, Portal as de, setStyleProperty as ue, use as ge, delegateEvents as ve } from "solid-js/web";
2
+ import { createSignal as B, onCleanup as z, createEffect as j, createMemo as F, Show as K, For as J } from "solid-js";
3
3
  import { Motion as R } from "../../node_modules/.pnpm/solid-motionone@1.0.4_solid-js@1.9.11/node_modules/solid-motionone/dist/index.js";
4
4
  import { easing as A, duration as X } from "../../utils/animations.js";
5
- import { LayoutDashboard as me, Layers as Z, Region as he, TextTool as ke, MessageSquare as be, Plus as _e } from "../icons/index.js";
6
- import { startHotInteraction as we } from "../../utils/hotInteraction.js";
7
- import { startPointerSession as Ee } from "../ui/pointerSession.js";
8
- import { WORKBENCH_EDGE_AUTO_PAN_FRAME_SELECTOR as ee, createWorkbenchEdgeAutoPanController as Ce, frameFromElement as Se } from "./workbenchEdgeAutoPan.js";
9
- var Oe = /* @__PURE__ */ p("<button type=button class=workbench-dock__item>"), De = /* @__PURE__ */ p('<div class=workbench-dock__mode-popover role=menu aria-label="Canvas mode">'), Le = /* @__PURE__ */ p('<div class=workbench-dock data-floe-canvas-interactive=true><div class=workbench-dock__mode-switcher><button type=button class="workbench-dock__item workbench-dock__mode-trigger"aria-label="Switch canvas mode"aria-haspopup=menu></button></div><span class=workbench-dock__divider aria-hidden=true>'), Me = /* @__PURE__ */ p("<button type=button class=workbench-dock__mode-option role=menuitemradio><span class=workbench-dock__mode-option-icon></span><span class=workbench-dock__mode-option-copy><span class=workbench-dock__mode-option-label></span><span class=workbench-dock__mode-option-description>"), pe = /* @__PURE__ */ p("<div class=workbench-dock-ghost aria-hidden=true><div class=workbench-dock-ghost__halo></div><div class=workbench-dock-ghost__card><div class=workbench-dock-ghost__icon></div><div class=workbench-dock-ghost__copy><div class=workbench-dock-ghost__title></div><div class=workbench-dock-ghost__hint><span>Drag onto canvas");
10
- const J = 5, ye = ".workbench-dock", W = [{
5
+ import { Plus as fe } from "../icons/index.js";
6
+ import { startHotInteraction as me } from "../../utils/hotInteraction.js";
7
+ import { startPointerSession as ke } from "../ui/pointerSession.js";
8
+ import { WORKBENCH_EDGE_AUTO_PAN_FRAME_SELECTOR as ee, createWorkbenchEdgeAutoPanController as he, frameFromElement as be } from "./workbenchEdgeAutoPan.js";
9
+ import { DockLayoutDashboard as _e, DockLayers as we, DockRegion as Ee, DockText as Ce, DockMessageSquare as Se } from "../icons/DockIcons.js";
10
+ var De = /* @__PURE__ */ p("<button type=button class=workbench-dock__item>"), Oe = /* @__PURE__ */ p('<div class=workbench-dock__mode-popover role=menu aria-label="Canvas mode">'), Le = /* @__PURE__ */ p('<div class=workbench-dock data-floe-canvas-interactive=true><div class=workbench-dock__mode-switcher><button type=button class="workbench-dock__item workbench-dock__mode-trigger"aria-label="Switch canvas mode"aria-haspopup=menu></button></div><span class=workbench-dock__divider aria-hidden=true>'), Me = /* @__PURE__ */ p("<button type=button class=workbench-dock__mode-option role=menuitemradio><span class=workbench-dock__mode-option-icon></span><span class=workbench-dock__mode-option-copy><span class=workbench-dock__mode-option-label></span><span class=workbench-dock__mode-option-description>"), pe = /* @__PURE__ */ p("<div class=workbench-dock-ghost aria-hidden=true><div class=workbench-dock-ghost__halo></div><div class=workbench-dock-ghost__card><div class=workbench-dock-ghost__icon></div><div class=workbench-dock-ghost__copy><div class=workbench-dock-ghost__title></div><div class=workbench-dock-ghost__hint><span>Drag onto canvas");
11
+ const Q = 5, ye = ".workbench-dock", W = [{
11
12
  mode: "work",
12
13
  label: "Work Mode",
13
14
  description: "Operate windows and sticky notes",
14
- icon: me
15
+ icon: _e
15
16
  }, {
16
17
  mode: "background",
17
18
  label: "Composition Mode",
18
19
  description: "Arrange regions and canvas text",
19
- icon: Z
20
+ icon: we
20
21
  }], $e = [{
21
22
  tool: "sticky-note",
22
23
  label: "Sticky",
23
- icon: be
24
+ icon: Se
24
25
  }], Ie = [{
25
26
  tool: "background-region",
26
27
  label: "Region",
27
- icon: he
28
+ icon: Ee
28
29
  }, {
29
30
  tool: "text",
30
31
  label: "Text",
31
- icon: ke
32
+ icon: Ce
32
33
  }];
33
34
  function te() {
34
35
  const e = document.querySelector(ee);
@@ -48,14 +49,14 @@ function Te(e, s, l, d) {
48
49
  return !0;
49
50
  const o = l - e, w = d - s;
50
51
  let f = 0, m = 1;
51
- const u = (h, C) => {
52
- if (h === 0) return C >= 0;
53
- const E = C / h;
54
- return h < 0 ? E > m ? !1 : (E > f && (f = E), !0) : E < f ? !1 : (E < m && (m = E), !0);
52
+ const u = (k, C) => {
53
+ if (k === 0) return C >= 0;
54
+ const E = C / k;
55
+ return k < 0 ? E > m ? !1 : (E > f && (f = E), !0) : E < f ? !1 : (E < m && (m = E), !0);
55
56
  };
56
57
  return u(-o, e - n.left) && u(o, n.right - e) && u(-w, s - n.top) && u(w, n.bottom - s);
57
58
  }
58
- function Q(e, s) {
59
+ function Z(e, s) {
59
60
  if (typeof document.elementFromPoint != "function") return !1;
60
61
  const l = document.elementFromPoint(e, s);
61
62
  return l instanceof Element && l.closest(ye) !== null;
@@ -81,7 +82,7 @@ function Re(e) {
81
82
  n.button === 0 && e.onDragBegin(n, e.kind, e.id, e.label, e.icon);
82
83
  };
83
84
  return (() => {
84
- var n = Oe();
85
+ var n = De();
85
86
  return n.$$pointerdown = d, n.addEventListener("pointerleave", () => e.onLeave()), n.addEventListener("pointerenter", () => e.onEnter()), _(n, g(R.span, {
86
87
  class: "workbench-dock__tile",
87
88
  get animate() {
@@ -119,8 +120,8 @@ function Re(e) {
119
120
  return e.label;
120
121
  }
121
122
  }), null), P((o) => {
122
- var w = !!e.active, f = !!(e.filterable && !e.visible), m = !!l(), u = !!e.isDragging, h = e.filterable ? `${e.label} — click to solo, drag to canvas to create` : `${e.label} — drag to canvas to create`, C = e.active;
123
- return w !== o.e && n.classList.toggle("is-active", o.e = w), f !== o.t && n.classList.toggle("is-filter-muted", o.t = f), m !== o.a && n.classList.toggle("is-hovered", o.a = m), u !== o.o && n.classList.toggle("is-source-dragging", o.o = u), h !== o.i && T(n, "aria-label", o.i = h), C !== o.n && T(n, "aria-pressed", o.n = C), o;
123
+ var w = !!e.active, f = !!(e.filterable && !e.visible), m = !!l(), u = !!e.isDragging, k = e.filterable ? `${e.label} — click to solo, drag to canvas to create` : `${e.label} — drag to canvas to create`, C = e.active;
124
+ return w !== o.e && n.classList.toggle("is-active", o.e = w), f !== o.t && n.classList.toggle("is-filter-muted", o.t = f), m !== o.a && n.classList.toggle("is-hovered", o.a = m), u !== o.o && n.classList.toggle("is-source-dragging", o.o = u), k !== o.i && T(n, "aria-label", o.i = k), C !== o.n && T(n, "aria-pressed", o.n = C), o;
124
125
  }, {
125
126
  e: void 0,
126
127
  t: void 0,
@@ -131,24 +132,24 @@ function Re(e) {
131
132
  }), n;
132
133
  })();
133
134
  }
134
- function Ne(e) {
135
+ function Ve(e) {
135
136
  const [s, l] = B(null), [d, n] = B(null), [o, w] = B(!1);
136
- let f, m, u, h = null;
137
- q(() => {
137
+ let f, m, u, k = null;
138
+ z(() => {
138
139
  u?.stop(), m?.stop({
139
140
  reason: "manual_stop",
140
141
  commit: !1
141
142
  }), m = void 0, d()?.stopInteraction(), e.onDragPreviewChange?.(null);
142
- }), z(() => {
143
+ }), j(() => {
143
144
  e.onDragPreviewChange?.(d()?.preview ?? null);
144
- }), z(() => {
145
+ }), j(() => {
145
146
  if (!o() || typeof window > "u") return;
146
147
  const t = (c) => {
147
148
  f && c.target instanceof Node && f.contains(c.target) || w(!1);
148
149
  }, i = (c) => {
149
150
  c.key === "Escape" && w(!1);
150
151
  };
151
- window.addEventListener("pointerdown", t, !0), window.addEventListener("keydown", i, !0), q(() => {
152
+ window.addEventListener("pointerdown", t, !0), window.addEventListener("keydown", i, !0), z(() => {
152
153
  window.removeEventListener("pointerdown", t, !0), window.removeEventListener("keydown", i, !0);
153
154
  });
154
155
  });
@@ -156,21 +157,21 @@ function Ne(e) {
156
157
  const i = s();
157
158
  return i === null ? 0 : i === t ? -1 : i === t + 1 ? -2 : i === t - 1 ? 1 : 0;
158
159
  }, E = () => {
159
- u?.stop(), u = void 0, h = null;
160
+ u?.stop(), u = void 0, k = null;
160
161
  }, Y = () => {
161
- !e.viewport || !e.onViewportCommit || (h = e.viewport, u?.stop(), u = Ce({
162
+ !e.viewport || !e.onViewportCommit || (k = e.viewport, u?.stop(), u = he({
162
163
  readFrame: () => {
163
164
  const t = document.querySelector(ee);
164
- return t instanceof HTMLElement ? Se(t) : null;
165
+ return t instanceof HTMLElement ? be(t) : null;
165
166
  },
166
- readViewport: () => h ?? e.viewport ?? null,
167
+ readViewport: () => k ?? e.viewport ?? null,
167
168
  commitViewport: (t) => {
168
- h = t, e.onViewportCommit?.(t);
169
+ k = t, e.onViewportCommit?.(t);
169
170
  },
170
171
  onPanStart: () => e.onViewportInteractionStart?.("pan"),
171
172
  shouldPan: () => {
172
173
  const t = d();
173
- return !!(t?.moved && t.hasEnteredCanvas && !Q(t.clientX, t.clientY));
174
+ return !!(t?.moved && t.hasEnteredCanvas && !Z(t.clientX, t.clientY));
174
175
  }
175
176
  }));
176
177
  }, ne = (t) => {
@@ -178,7 +179,7 @@ function Ne(e) {
178
179
  if (!i) return;
179
180
  const c = !i.moved;
180
181
  if (i.stopInteraction(), E(), n(null), m = void 0, c) {
181
- O() !== "background" && e.onSoloFilter(String(i.id), G());
182
+ D() !== "background" && e.onSoloFilter(String(i.id), U());
182
183
  return;
183
184
  }
184
185
  t && i.overCanvas && (i.kind === "widget" ? e.onCreateAt?.(i.id, i.clientX, i.clientY) : e.onCreateToolAt?.(i.id, i.clientX, i.clientY));
@@ -200,23 +201,23 @@ function Ne(e) {
200
201
  overCanvas: !1,
201
202
  hasEnteredCanvas: !1,
202
203
  preview: null,
203
- stopInteraction: we({
204
+ stopInteraction: me({
204
205
  kind: "drag",
205
206
  cursor: "grabbing"
206
207
  })
207
208
  });
208
209
  const b = (a) => {
209
- let k = !1;
210
+ let h = !1;
210
211
  n((v) => {
211
212
  if (!v || v.pointerId !== a.pointerId) return v;
212
- const H = a.clientX - v.startClientX, $ = a.clientY - v.startClientY, D = v.moved || Math.abs(H) > J || Math.abs($) > J, S = Q(a.clientX, a.clientY), L = D && Pe(a.clientX, a.clientY) && !S, I = D && !S && Te(v.clientX, v.clientY, a.clientX, a.clientY), U = v.hasEnteredCanvas || L || I;
213
- return k = D && U && !S, {
213
+ const H = a.clientX - v.startClientX, $ = a.clientY - v.startClientY, O = v.moved || Math.abs(H) > Q || Math.abs($) > Q, S = Z(a.clientX, a.clientY), L = O && Pe(a.clientX, a.clientY) && !S, I = O && !S && Te(v.clientX, v.clientY, a.clientX, a.clientY), q = v.hasEnteredCanvas || L || I;
214
+ return h = O && q && !S, {
214
215
  ...v,
215
216
  clientX: a.clientX,
216
217
  clientY: a.clientY,
217
- moved: D,
218
+ moved: O,
218
219
  overCanvas: L,
219
- hasEnteredCanvas: U,
220
+ hasEnteredCanvas: q,
220
221
  preview: L ? {
221
222
  kind: v.kind,
222
223
  id: v.id,
@@ -225,9 +226,9 @@ function Ne(e) {
225
226
  clientY: a.clientY
226
227
  } : null
227
228
  };
228
- }), k && u?.updatePointer(a.clientX, a.clientY);
229
+ }), h && u?.updatePointer(a.clientX, a.clientY);
229
230
  };
230
- m = Ee({
231
+ m = ke({
231
232
  pointerEvent: t,
232
233
  captureEl: t.currentTarget,
233
234
  onMove: b,
@@ -235,7 +236,7 @@ function Ne(e) {
235
236
  commit: a
236
237
  }) => ne(a)
237
238
  });
238
- }, ie = () => d()?.kind === "widget" ? d().id : null, re = () => d()?.kind === "tool" ? d().id : null, O = () => e.mode === "background" || e.mode === "annotation" ? "background" : "work", ae = F(() => W.find((t) => t.mode === O()) ?? W[0]), V = F(() => O() === "background" ? Ie.map((t) => ({
239
+ }, ie = () => d()?.kind === "widget" ? d().id : null, re = () => d()?.kind === "tool" ? d().id : null, D = () => e.mode === "background" || e.mode === "annotation" ? "background" : "work", V = F(() => W.find((t) => t.mode === D()) ?? W[0]), G = F(() => D() === "background" ? Ie.map((t) => ({
239
240
  id: t.tool,
240
241
  kind: "tool",
241
242
  label: t.label,
@@ -250,12 +251,12 @@ function Ne(e) {
250
251
  kind: "widget",
251
252
  label: t.label,
252
253
  icon: t.icon
253
- }))]), G = F(() => V().map((t) => String(t.id))), x = () => O() !== "background", le = (t) => !x() || e.filters[t] !== !1, ce = (t) => {
254
+ }))]), U = F(() => G().map((t) => String(t.id))), x = () => D() !== "background", ae = (t) => !x() || e.filters[t] !== !1, le = (t) => {
254
255
  if (!x())
255
256
  return !1;
256
- const i = G();
257
+ const i = U();
257
258
  return i.length > 1 && i.every((c) => e.filters[c] !== !1 == (c === t));
258
- }, M = () => s() === 0, se = () => ({
259
+ }, M = () => s() === 0, ce = () => ({
259
260
  scale: M() || o() ? 1.26 : 1,
260
261
  y: M() || o() ? -6 : 0,
261
262
  x: s() === 1 ? -5 : 0
@@ -264,10 +265,10 @@ function Ne(e) {
264
265
  var t = Le(), i = t.firstChild, c = i.firstChild;
265
266
  i.nextSibling, t.addEventListener("pointerleave", () => l(null));
266
267
  var y = f;
267
- return typeof y == "function" ? ve(y, t) : f = t, c.$$click = () => w((r) => !r), c.addEventListener("pointerleave", () => l((r) => r === 0 ? null : r)), c.addEventListener("pointerenter", () => l(0)), _(c, g(R.span, {
268
+ return typeof y == "function" ? ge(y, t) : f = t, c.$$click = () => w((r) => !r), c.addEventListener("pointerleave", () => l((r) => r === 0 ? null : r)), c.addEventListener("pointerenter", () => l(0)), _(c, g(R.span, {
268
269
  class: "workbench-dock__tile",
269
270
  get animate() {
270
- return se();
271
+ return ce();
271
272
  },
272
273
  get transition() {
273
274
  return {
@@ -276,9 +277,12 @@ function Ne(e) {
276
277
  };
277
278
  },
278
279
  get children() {
279
- return g(Z, {
280
- class: "workbench-dock__icon"
281
- });
280
+ return (() => {
281
+ const r = V().icon;
282
+ return g(r, {
283
+ class: "workbench-dock__icon"
284
+ });
285
+ })();
282
286
  }
283
287
  }), null), _(c, g(R.span, {
284
288
  class: "workbench-dock__tooltip",
@@ -295,38 +299,38 @@ function Ne(e) {
295
299
  };
296
300
  },
297
301
  get children() {
298
- return ae().label;
302
+ return V().label;
299
303
  }
300
304
  }), null), _(i, g(K, {
301
305
  get when() {
302
306
  return o();
303
307
  },
304
308
  get children() {
305
- var r = De();
306
- return _(r, g(j, {
309
+ var r = Oe();
310
+ return _(r, g(J, {
307
311
  each: W,
308
312
  children: (b) => {
309
313
  const a = b.icon;
310
314
  return (() => {
311
- var k = Me(), v = k.firstChild, H = v.nextSibling, $ = H.firstChild, D = $.nextSibling;
312
- return k.$$click = () => {
315
+ var h = Me(), v = h.firstChild, H = v.nextSibling, $ = H.firstChild, O = $.nextSibling;
316
+ return h.$$click = () => {
313
317
  e.onSelectMode?.(b.mode), w(!1);
314
318
  }, _(v, g(a, {
315
319
  class: "workbench-dock__mode-icon"
316
- })), _($, () => b.label), _(D, () => b.description), P((S) => {
317
- var L = O() === b.mode, I = O() === b.mode;
318
- return L !== S.e && k.classList.toggle("is-active", S.e = L), I !== S.t && T(k, "aria-checked", S.t = I), S;
320
+ })), _($, () => b.label), _(O, () => b.description), P((S) => {
321
+ var L = D() === b.mode, I = D() === b.mode;
322
+ return L !== S.e && h.classList.toggle("is-active", S.e = L), I !== S.t && T(h, "aria-checked", S.t = I), S;
319
323
  }, {
320
324
  e: void 0,
321
325
  t: void 0
322
- }), k;
326
+ }), h;
323
327
  })();
324
328
  }
325
329
  })), r;
326
330
  }
327
- }), null), _(t, g(j, {
331
+ }), null), _(t, g(J, {
328
332
  get each() {
329
- return V();
333
+ return G();
330
334
  },
331
335
  children: (r, b) => {
332
336
  const a = () => b() + 1;
@@ -344,10 +348,10 @@ function Ne(e) {
344
348
  return r.icon;
345
349
  },
346
350
  get active() {
347
- return ce(String(r.id));
351
+ return le(String(r.id));
348
352
  },
349
353
  get visible() {
350
- return le(String(r.id));
354
+ return ae(String(r.id));
351
355
  },
352
356
  get filterable() {
353
357
  return x();
@@ -356,16 +360,16 @@ function Ne(e) {
356
360
  return C(a());
357
361
  },
358
362
  get isDragging() {
359
- return de(() => r.kind === "widget")() ? ie() === r.id : re() === r.id;
363
+ return se(() => r.kind === "widget")() ? ie() === r.id : re() === r.id;
360
364
  },
361
365
  onEnter: () => l(a()),
362
- onLeave: () => l((k) => k === a() ? null : k),
366
+ onLeave: () => l((h) => h === a() ? null : h),
363
367
  onDragBegin: oe
364
368
  });
365
369
  }
366
370
  }), null), P((r) => {
367
- var b = O() === "background", a = !!(M() || o()), k = o();
368
- return b !== r.e && c.classList.toggle("is-active", r.e = b), a !== r.t && c.classList.toggle("is-hovered", r.t = a), k !== r.a && T(c, "aria-expanded", r.a = k), r;
371
+ var b = D() === "background", a = !!(M() || o()), h = o();
372
+ return b !== r.e && c.classList.toggle("is-active", r.e = b), a !== r.t && c.classList.toggle("is-hovered", r.t = a), h !== r.a && T(c, "aria-expanded", r.a = h), r;
369
373
  }, {
370
374
  e: void 0,
371
375
  t: void 0,
@@ -387,9 +391,9 @@ function Ae(e) {
387
391
  const n = e.state();
388
392
  return n ? `translate3d(${n.clientX + 14}px, ${n.clientY - 56}px, 0)` : "translate3d(0px, 0px, 0)";
389
393
  }, l = () => e.state()?.label ?? "", d = () => e.state()?.icon;
390
- return g(ue, {
394
+ return g(de, {
391
395
  get children() {
392
- var n = pe(), o = n.firstChild, w = o.nextSibling, f = w.firstChild, m = f.nextSibling, u = m.firstChild, h = u.nextSibling, C = h.firstChild;
396
+ var n = pe(), o = n.firstChild, w = o.nextSibling, f = w.firstChild, m = f.nextSibling, u = m.firstChild, k = u.nextSibling, C = k.firstChild;
393
397
  return _(f, g(K, {
394
398
  get when() {
395
399
  return d();
@@ -400,13 +404,13 @@ function Ae(e) {
400
404
  class: "w-4 h-4"
401
405
  });
402
406
  }
403
- })), _(u, l), _(h, g(_e, {
407
+ })), _(u, l), _(k, g(fe, {
404
408
  class: "w-3 h-3"
405
- }), C), P((E) => ge(n, "transform", s())), n;
409
+ }), C), P((E) => ue(n, "transform", s())), n;
406
410
  }
407
411
  });
408
412
  }
409
- fe(["pointerdown", "click"]);
413
+ ve(["pointerdown", "click"]);
410
414
  export {
411
- Ne as WorkbenchDock
415
+ Ve as WorkbenchDock
412
416
  };
@@ -1,47 +1,47 @@
1
- import { Terminal as d, Folder as n, Cpu as a, Activity as f, FileCode as y } from "../../icons/index.js";
2
- import { TerminalWidget as m } from "./TerminalWidget.js";
3
- import { FileBrowserWidget as c } from "./FileBrowserWidget.js";
4
- import { SystemMonitorWidget as p } from "./SystemMonitorWidget.js";
5
- import { LogViewerWidget as u } from "./LogViewerWidget.js";
6
- import { CodeEditorWidget as h } from "./CodeEditorWidget.js";
1
+ import { TerminalWidget as d } from "./TerminalWidget.js";
2
+ import { FileBrowserWidget as n } from "./FileBrowserWidget.js";
3
+ import { SystemMonitorWidget as a } from "./SystemMonitorWidget.js";
4
+ import { LogViewerWidget as c } from "./LogViewerWidget.js";
5
+ import { CodeEditorWidget as f } from "./CodeEditorWidget.js";
6
+ import { DockTerminal as y, DockFolder as m, DockCpu as p, DockActivity as u, DockFileCode as h } from "../../icons/DockIcons.js";
7
7
  const g = [
8
8
  {
9
9
  type: "terminal",
10
10
  label: "Terminal",
11
- icon: d,
12
- body: m,
11
+ icon: y,
12
+ body: d,
13
13
  defaultTitle: "Terminal",
14
14
  defaultSize: { width: 480, height: 320 }
15
15
  },
16
16
  {
17
17
  type: "file-browser",
18
18
  label: "File Browser",
19
- icon: n,
20
- body: c,
19
+ icon: m,
20
+ body: n,
21
21
  defaultTitle: "File Browser",
22
22
  defaultSize: { width: 360, height: 400 }
23
23
  },
24
24
  {
25
25
  type: "system-monitor",
26
26
  label: "System Monitor",
27
- icon: a,
28
- body: p,
27
+ icon: p,
28
+ body: a,
29
29
  defaultTitle: "System Monitor",
30
30
  defaultSize: { width: 340, height: 280 }
31
31
  },
32
32
  {
33
33
  type: "log-viewer",
34
34
  label: "Log Viewer",
35
- icon: f,
36
- body: u,
35
+ icon: u,
36
+ body: c,
37
37
  defaultTitle: "Log Viewer",
38
38
  defaultSize: { width: 500, height: 300 }
39
39
  },
40
40
  {
41
41
  type: "code-editor",
42
42
  label: "Code Editor",
43
- icon: y,
44
- body: h,
43
+ icon: h,
44
+ body: f,
45
45
  defaultTitle: "Code Editor",
46
46
  defaultSize: { width: 520, height: 380 }
47
47
  }
@@ -49,23 +49,23 @@ const g = [
49
49
  function l(e) {
50
50
  return e && e.length > 0 ? e : g;
51
51
  }
52
- function E(e, t) {
52
+ function k(e, t) {
53
53
  const o = l(e), i = {};
54
54
  for (const r of o)
55
55
  i[r.type] = typeof t?.[r.type] == "boolean" ? !!t[r.type] : !0;
56
56
  return i;
57
57
  }
58
- function F(e, t) {
58
+ function E(e, t) {
59
59
  return typeof e == "string" && l(t).some((o) => o.type === e);
60
60
  }
61
- function v(e, t) {
61
+ function F(e, t) {
62
62
  const o = l(t);
63
63
  return o.find((i) => i.type === e) ?? o[0];
64
64
  }
65
65
  export {
66
66
  g as WIDGET_REGISTRY,
67
- E as createWorkbenchFilterState,
68
- v as getWidgetEntry,
69
- F as isValidWorkbenchWidgetType,
67
+ k as createWorkbenchFilterState,
68
+ F as getWidgetEntry,
69
+ E as isValidWorkbenchWidgetType,
70
70
  l as resolveWorkbenchWidgetDefinitions
71
71
  };