@floegence/floe-webapp-core 0.36.27 → 0.36.28

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,49 +1,49 @@
1
- import { spread as d, mergeProps as v, insert as a, createComponent as s, addEventListener as f, effect as b, className as _, template as c, delegateEvents as p } from "solid-js/web";
2
- import { For as h } from "solid-js";
3
- import { cn as x } from "../../utils/cn.js";
4
- import { WORKBENCH_CONTEXT_MENU_ATTR as k } from "./workbenchContextMenuDismiss.js";
5
- var w = /* @__PURE__ */ c("<div role=menu class=workbench-context-menu data-floe-workbench-boundary=true>"), C = /* @__PURE__ */ c("<div role=separator aria-orientation=horizontal class=workbench-context-menu__separator>"), $ = /* @__PURE__ */ c("<button type=button role=menuitem><span class=workbench-context-menu__label>");
6
- function E(r) {
7
- return r.kind === "action";
1
+ import { spread as _, mergeProps as b, insert as c, createComponent as u, addEventListener as v, effect as f, className as p, template as a, delegateEvents as h } from "solid-js/web";
2
+ import { For as x } from "solid-js";
3
+ import { cn as k } from "../../utils/cn.js";
4
+ import { WORKBENCH_CONTEXT_MENU_ATTR as w } from "./workbenchContextMenuDismiss.js";
5
+ var $ = /* @__PURE__ */ a("<div role=menu class=workbench-context-menu data-floe-workbench-boundary=true>"), g = /* @__PURE__ */ a("<div role=separator aria-orientation=horizontal class=workbench-context-menu__separator>"), C = /* @__PURE__ */ a("<button type=button role=menuitem><span class=workbench-context-menu__icon aria-hidden=true></span><span class=workbench-context-menu__label>");
6
+ function E(t) {
7
+ return t.kind === "action";
8
8
  }
9
- function M(r) {
9
+ function A(t) {
10
10
  return (() => {
11
- var o = w();
12
- return d(o, v({
13
- [k]: "true"
11
+ var o = $();
12
+ return _(o, b({
13
+ [w]: "true"
14
14
  }, {
15
15
  get style() {
16
16
  return {
17
- left: `${r.x}px`,
18
- top: `${r.y}px`
17
+ left: `${t.x}px`,
18
+ top: `${t.y}px`
19
19
  };
20
20
  },
21
21
  onContextMenu: (e) => e.preventDefault()
22
- }), !1, !0), a(o, s(h, {
22
+ }), !1, !0), c(o, u(x, {
23
23
  get each() {
24
- return r.items;
24
+ return t.items;
25
25
  },
26
26
  children: (e) => {
27
27
  if (!E(e))
28
- return C();
28
+ return g();
29
29
  const m = e.icon;
30
30
  return (() => {
31
- var t = $(), l = t.firstChild;
32
- return f(t, "click", e.onSelect, !0), a(t, s(m, {
33
- class: "h-3.5 w-3.5"
34
- }), l), a(l, () => e.label), b((n) => {
35
- var i = x("workbench-context-menu__item", e.destructive && "is-destructive"), u = e.disabled;
36
- return i !== n.e && _(t, n.e = i), u !== n.t && (t.disabled = n.t = u), n;
31
+ var n = C(), i = n.firstChild, d = i.nextSibling;
32
+ return v(n, "click", e.onSelect, !0), c(i, u(m, {
33
+ class: "workbench-context-menu__icon-svg"
34
+ })), c(d, () => e.label), f((r) => {
35
+ var l = k("workbench-context-menu__item", e.destructive && "is-destructive"), s = e.disabled;
36
+ return l !== r.e && p(n, r.e = l), s !== r.t && (n.disabled = r.t = s), r;
37
37
  }, {
38
38
  e: void 0,
39
39
  t: void 0
40
- }), t;
40
+ }), n;
41
41
  })();
42
42
  }
43
43
  })), o;
44
44
  })();
45
45
  }
46
- p(["click"]);
46
+ h(["click"]);
47
47
  export {
48
- M as WorkbenchContextMenu
48
+ A as WorkbenchContextMenu
49
49
  };
@@ -1,50 +1,74 @@
1
- import { createSignal as N, createMemo as r, onCleanup as Ct } from "solid-js";
2
- import { ArrowUp as pt, Copy as kt, Trash as Ft } from "../icons/index.js";
3
- import { getTopZIndex as bt, createContextMenuPosition as It, createWorkbenchId as Mt, createWorkbenchViewportCenteredOnWidget as L, findNearestWidget as Xt, clampScale as vt, WORKBENCH_CANVAS_ZOOM_STEP as $, WORKBENCH_MIN_SCALE as yt, createWorkbenchViewportFitForWidget as Yt, WORKBENCH_CONTEXT_MENU_WIDTH_PX as Ot, estimateContextMenuHeight as zt } from "./workbenchHelpers.js";
4
- import { resolveWorkbenchWidgetDefinitions as _t, getWidgetEntry as j, createWorkbenchFilterState as Vt } from "./widgets/widgetRegistry.js";
1
+ import { createSignal as A, createMemo as r, onCleanup as Ct } from "solid-js";
2
+ import { ArrowUp as bt, Copy as kt, Trash as Ft } from "../icons/index.js";
3
+ import { getTopZIndex as It, createContextMenuPosition as Mt, createWorkbenchId as vt, createWorkbenchViewportCenteredOnWidget as K, findNearestWidget as Xt, clampScale as Yt, WORKBENCH_CANVAS_ZOOM_STEP as L, WORKBENCH_MIN_SCALE as yt, createWorkbenchViewportFitForWidget as Ot, WORKBENCH_CONTEXT_MENU_WIDTH_PX as _t, estimateContextMenuHeight as zt } from "./workbenchHelpers.js";
4
+ import { resolveWorkbenchWidgetDefinitions as Tt, getWidgetEntry as j, createWorkbenchFilterState as Vt } from "./widgets/widgetRegistry.js";
5
5
  function Kt(c) {
6
- const [W, x] = N(null), [U, T] = N(null), [D, G] = N({ width: 0, height: 0 });
7
- let d = null, S = null;
8
- const l = c.state, m = r(() => l().widgets), u = r(() => l().viewport), J = r(() => l().locked), H = r(() => l().filters), F = r(() => l().selectedWidgetId), Q = r(() => l().theme), b = r(() => bt(m())), tt = r(() => `${Math.round(u().scale * 100)}%`), et = () => typeof c.widgetDefinitions == "function" ? c.widgetDefinitions() : c.widgetDefinitions, w = r(
9
- () => _t(et())
10
- ), I = (t, e) => {
6
+ const [x, S] = A(null), [U, N] = A(null), [D, G] = A({ width: 0, height: 0 });
7
+ let d = null, p = null;
8
+ const l = c.state, m = r(() => l().widgets), h = r(() => l().viewport), J = r(() => l().locked), H = r(() => l().filters), F = r(() => l().selectedWidgetId), Q = r(() => l().theme), I = r(() => It(m())), tt = r(() => `${Math.round(h().scale * 100)}%`), et = () => typeof c.widgetDefinitions == "function" ? c.widgetDefinitions() : c.widgetDefinitions, w = r(
9
+ () => Tt(et())
10
+ ), M = (t, e) => {
11
11
  const n = Number.isFinite(t) && t > 0 ? t : 0, i = Number.isFinite(e) && e > 0 ? e : 0, o = { width: n, height: i }, s = D();
12
12
  return s.width === n && s.height === i ? s : (G(o), o);
13
13
  }, R = () => {
14
- S?.disconnect(), S = null;
15
- }, a = () => d ? I(d.clientWidth, d.clientHeight) : I(0, 0), nt = (t) => {
14
+ p?.disconnect(), p = null;
15
+ }, a = () => d ? M(d.clientWidth, d.clientHeight) : M(0, 0), nt = (t) => {
16
16
  if (d === (t ?? null)) {
17
17
  a();
18
18
  return;
19
19
  }
20
- R(), d = t ?? null, a(), !(!d || typeof ResizeObserver > "u") && (S = new ResizeObserver((e) => {
20
+ R(), d = t ?? null, a(), !(!d || typeof ResizeObserver > "u") && (p = new ResizeObserver((e) => {
21
21
  const n = e[0];
22
- I(
22
+ M(
23
23
  n?.contentRect.width ?? d?.clientWidth ?? 0,
24
24
  n?.contentRect.height ?? d?.clientHeight ?? 0
25
25
  );
26
- }), S.observe(d));
26
+ }), p.observe(d));
27
27
  };
28
28
  Ct(() => {
29
29
  R(), d = null;
30
30
  });
31
31
  const it = (t) => {
32
- x({
32
+ S({
33
33
  clientX: t.clientX,
34
34
  clientY: t.clientY,
35
35
  worldX: t.worldX,
36
36
  worldY: t.worldY
37
37
  });
38
38
  }, ot = (t, e) => {
39
- f(e.id), x({
39
+ f(e.id), S({
40
40
  clientX: t.clientX,
41
41
  clientY: t.clientY,
42
42
  worldX: e.x,
43
43
  worldY: e.y,
44
44
  widgetId: e.id
45
45
  });
46
- }, h = () => x(null), ct = (t) => l().widgets.find((e) => e.id === t) ?? null, M = (t) => l().widgets.find((e) => e.type === t) ?? null, E = r(() => {
47
- const t = W();
46
+ }, g = () => S(null), ct = (t) => l().widgets.find((e) => e.id === t) ?? null, C = (t) => l().widgets.find((e) => e.type === t) ?? null, st = (t, e) => {
47
+ const n = t.singleton ? C(t.type) : null;
48
+ return n ? {
49
+ id: `goto-${t.type}`,
50
+ kind: "action",
51
+ verb: "go_to",
52
+ widgetType: t.type,
53
+ label: `Go to ${t.label}`,
54
+ icon: t.icon,
55
+ existingWidgetId: n.id,
56
+ onSelect: () => {
57
+ W(n, { centerViewport: !0 }), g();
58
+ }
59
+ } : {
60
+ id: `add-${t.type}`,
61
+ kind: "action",
62
+ verb: "add",
63
+ widgetType: t.type,
64
+ label: `Add ${t.label}`,
65
+ icon: t.icon,
66
+ onSelect: () => {
67
+ X(t.type, e.worldX, e.worldY), g();
68
+ }
69
+ };
70
+ }, E = r(() => {
71
+ const t = x();
48
72
  if (!t) return [];
49
73
  if (t.widgetId) {
50
74
  const e = m().find((i) => i.id === t.widgetId), n = [];
@@ -52,9 +76,9 @@ function Kt(c) {
52
76
  id: "bring-to-front",
53
77
  kind: "action",
54
78
  label: "Bring to Front",
55
- icon: pt,
79
+ icon: bt,
56
80
  onSelect: () => {
57
- f(e.id), h();
81
+ f(e.id), g();
58
82
  }
59
83
  }), n.push({
60
84
  id: "duplicate",
@@ -62,7 +86,7 @@ function Kt(c) {
62
86
  label: "Duplicate",
63
87
  icon: kt,
64
88
  onSelect: () => {
65
- B(e.type, e.x + 32, e.y + 32), h();
89
+ B(e.type, e.x + 32, e.y + 32), g();
66
90
  }
67
91
  })), n.push({ id: "separator-delete", kind: "separator" }), n.push({
68
92
  id: "delete",
@@ -71,185 +95,177 @@ function Kt(c) {
71
95
  icon: Ft,
72
96
  destructive: !0,
73
97
  onSelect: () => {
74
- t.widgetId && y(t.widgetId), h();
98
+ t.widgetId && Y(t.widgetId), g();
75
99
  }
76
100
  }), n;
77
101
  }
78
- return w().map((e) => ({
79
- id: `add-${e.type}`,
80
- kind: "action",
81
- label: `Add ${e.label}`,
82
- icon: e.icon,
83
- onSelect: () => {
84
- v(e.type, t.worldX, t.worldY), h();
85
- }
86
- }));
87
- }), st = r(() => {
88
- const t = W();
102
+ return w().map((e) => st(e, t));
103
+ }), rt = r(() => {
104
+ const t = x();
89
105
  if (!t) return;
90
106
  const e = E(), n = e.filter((o) => o.kind === "action").length, i = e.filter((o) => o.kind === "separator").length;
91
- return It({
107
+ return Mt({
92
108
  clientX: t.clientX,
93
109
  clientY: t.clientY,
94
- menuWidth: Ot,
110
+ menuWidth: _t,
95
111
  menuHeight: zt(n, i)
96
112
  });
97
- }), X = (t, e, n) => {
98
- const i = j(t, w()), o = i.singleton ? M(t) : null;
113
+ }), v = (t, e, n) => {
114
+ const i = j(t, w()), o = i.singleton ? C(t) : null;
99
115
  if (o)
100
- return p(o, { centerViewport: !0 });
101
- const s = i.defaultSize, g = {
102
- id: Mt(),
116
+ return W(o, { centerViewport: !0 });
117
+ const s = i.defaultSize, u = {
118
+ id: vt(),
103
119
  type: t,
104
120
  title: i.defaultTitle,
105
121
  x: e,
106
122
  y: n,
107
123
  width: s.width,
108
124
  height: s.height,
109
- z_index: b() + 1,
125
+ z_index: I() + 1,
110
126
  created_at_unix_ms: Date.now()
111
127
  };
112
128
  return c.setState((k) => ({
113
129
  ...k,
114
- widgets: [...k.widgets, g],
115
- selectedWidgetId: g.id
116
- })), g;
117
- }, v = (t, e, n) => {
130
+ widgets: [...k.widgets, u],
131
+ selectedWidgetId: u.id
132
+ })), u;
133
+ }, X = (t, e, n) => {
118
134
  const i = j(t, w()).defaultSize;
119
- return X(t, e - i.width / 2, n - i.height / 2);
120
- }, B = (t, e, n) => X(t, e, n), y = (t) => {
135
+ return v(t, e - i.width / 2, n - i.height / 2);
136
+ }, B = (t, e, n) => v(t, e, n), Y = (t) => {
121
137
  c.setState((e) => ({
122
138
  ...e,
123
139
  widgets: e.widgets.filter((n) => n.id !== t),
124
140
  selectedWidgetId: e.selectedWidgetId === t ? null : e.selectedWidgetId
125
141
  }));
126
- }, rt = (t) => {
127
- T(t);
142
+ }, dt = (t) => {
143
+ N(t);
128
144
  }, f = (t) => {
129
- T(t);
130
- const e = b(), n = m().find((i) => i.id === t);
145
+ N(t);
146
+ const e = I(), n = m().find((i) => i.id === t);
131
147
  n && n.z_index < e && c.setState((i) => ({
132
148
  ...i,
133
149
  widgets: i.widgets.map(
134
150
  (o) => o.id === t ? { ...o, z_index: e + 1 } : o
135
151
  )
136
152
  }));
137
- }, dt = (t, e) => {
153
+ }, lt = (t, e) => {
138
154
  c.setState((n) => ({
139
155
  ...n,
140
156
  widgets: n.widgets.map(
141
157
  (i) => i.id === t ? { ...i, x: e.x, y: e.y } : i
142
158
  )
143
159
  }));
144
- }, lt = (t, e) => {
160
+ }, at = (t, e) => {
145
161
  c.setState((n) => ({
146
162
  ...n,
147
163
  widgets: n.widgets.map(
148
164
  (i) => i.id === t ? { ...i, width: e.width, height: e.height } : i
149
165
  )
150
166
  }));
151
- }, Y = (t) => {
167
+ }, y = (t) => {
152
168
  c.setState((e) => ({ ...e, viewport: t }));
153
169
  }, q = (t) => {
154
- const e = u(), n = a(), i = (n.width / 2 - e.x) / e.scale, o = (n.height / 2 - e.y) / e.scale, s = vt(
155
- t === "in" ? e.scale * $ : e.scale / $
156
- ), g = {
170
+ const e = h(), n = a(), i = (n.width / 2 - e.x) / e.scale, o = (n.height / 2 - e.y) / e.scale, s = Yt(
171
+ t === "in" ? e.scale * L : e.scale / L
172
+ ), u = {
157
173
  x: n.width / 2 - i * s,
158
174
  y: n.height / 2 - o * s,
159
175
  scale: s
160
176
  };
161
- Y(g);
162
- }, at = () => {
177
+ y(u);
178
+ }, gt = () => {
163
179
  c.setState((t) => ({ ...t, locked: !t.locked }));
164
- }, gt = (t) => {
180
+ }, ut = (t) => {
165
181
  c.setState((e) => ({
166
182
  ...e,
167
183
  filters: { ...e.filters, [t]: !e.filters[t] }
168
184
  }));
169
- }, ut = (t) => {
185
+ }, ht = (t) => {
170
186
  c.setState((e) => {
171
187
  const n = { ...e.filters };
172
188
  for (const i of Object.keys(n))
173
189
  n[i] = i === t;
174
190
  return { ...e, filters: n };
175
191
  });
176
- }, ht = () => {
192
+ }, ft = () => {
177
193
  const t = Vt(w());
178
194
  c.setState((e) => ({
179
195
  ...e,
180
196
  filters: t
181
197
  }));
182
- }, C = (t) => {
198
+ }, b = (t) => {
183
199
  c.setState((e) => ({ ...e, selectedWidgetId: t }));
184
200
  }, P = () => {
185
201
  c.setState(
186
202
  (t) => t.selectedWidgetId === null ? t : { ...t, selectedWidgetId: null }
187
203
  );
188
- }, ft = () => {
189
- const t = a(), e = u();
204
+ }, mt = () => {
205
+ const t = a(), e = h();
190
206
  return {
191
207
  worldX: t.width > 0 ? (t.width / 2 - e.x) / e.scale : 240,
192
208
  worldY: t.height > 0 ? (t.height / 2 - e.y) / e.scale : 180
193
209
  };
194
210
  };
195
211
  let O = 0;
196
- const mt = () => {
212
+ const wt = () => {
197
213
  O += 1;
198
- }, z = (t) => {
199
- const e = u(), n = e.x, i = e.y, o = e.scale, s = performance.now(), g = 360, k = ++O, xt = (V) => 1 - Math.pow(1 - V, 3), Z = (V) => {
214
+ }, _ = (t) => {
215
+ const e = h(), n = e.x, i = e.y, o = e.scale, s = performance.now(), u = 360, k = ++O, St = (T) => 1 - Math.pow(1 - T, 3), $ = (T) => {
200
216
  if (k !== O) return;
201
- const St = V - s, K = Math.min(Math.max(St / g, 0), 1), A = xt(K);
202
- Y({
203
- x: n + (t.x - n) * A,
204
- y: i + (t.y - i) * A,
205
- scale: o + (t.scale - o) * A
206
- }), K < 1 && requestAnimationFrame(Z);
217
+ const pt = T - s, Z = Math.min(Math.max(pt / u, 0), 1), V = St(Z);
218
+ y({
219
+ x: n + (t.x - n) * V,
220
+ y: i + (t.y - i) * V,
221
+ scale: o + (t.scale - o) * V
222
+ }), Z < 1 && requestAnimationFrame($);
207
223
  };
208
- requestAnimationFrame(Z);
209
- }, _ = (t) => {
224
+ requestAnimationFrame($);
225
+ }, z = (t) => {
210
226
  const e = a();
211
- e.width === 0 || e.height === 0 || z(L({
227
+ e.width === 0 || e.height === 0 || _(K({
212
228
  widget: t,
213
- scale: u().scale,
229
+ scale: h().scale,
214
230
  frameWidth: e.width,
215
231
  frameHeight: e.height
216
232
  }));
217
- }, wt = (t) => {
233
+ }, Wt = (t) => {
218
234
  const e = a();
219
- e.width === 0 || e.height === 0 || z(Yt({
235
+ e.width === 0 || e.height === 0 || _(Ot({
220
236
  widget: t,
221
237
  frameWidth: e.width,
222
238
  frameHeight: e.height
223
239
  }));
224
- }, Wt = (t) => {
240
+ }, xt = (t) => {
225
241
  const e = a();
226
- e.width === 0 || e.height === 0 || z(L({
242
+ e.width === 0 || e.height === 0 || _(K({
227
243
  widget: t,
228
244
  scale: yt,
229
245
  frameWidth: e.width,
230
246
  frameHeight: e.height
231
247
  }));
232
- }, p = (t, e = {}) => (C(t.id), f(t.id), e.centerViewport !== !1 && _(t), t);
248
+ }, W = (t, e = {}) => (b(t.id), f(t.id), e.centerViewport !== !1 && z(t), t);
233
249
  return {
234
250
  widgets: m,
235
- viewport: u,
251
+ viewport: h,
236
252
  canvasFrameSize: D,
237
253
  locked: J,
238
254
  filters: H,
239
255
  selectedWidgetId: F,
240
256
  theme: Q,
241
- topZIndex: b,
257
+ topZIndex: I,
242
258
  scaleLabel: tt,
243
259
  optimisticFrontWidgetId: U,
244
260
  widgetDefinitions: w,
245
261
  setCanvasFrameRef: nt,
246
262
  contextMenu: {
247
- state: W,
263
+ state: x,
248
264
  items: E,
249
- position: st,
250
- close: h,
265
+ position: rt,
266
+ close: g,
251
267
  retarget: (t) => {
252
- t.preventDefault(), t.stopPropagation(), x({
268
+ t.preventDefault(), t.stopPropagation(), S({
253
269
  clientX: t.clientX,
254
270
  clientY: t.clientY,
255
271
  worldX: 0,
@@ -260,26 +276,26 @@ function Kt(c) {
260
276
  canvas: {
261
277
  openCanvasContextMenu: it,
262
278
  openWidgetContextMenu: ot,
263
- selectWidget: C,
279
+ selectWidget: b,
264
280
  clearSelection: P,
265
- startOptimisticFront: rt,
281
+ startOptimisticFront: dt,
266
282
  commitFront: f,
267
- commitMove: dt,
268
- commitResize: lt,
269
- commitViewport: Y,
270
- cancelViewportNavigation: mt
283
+ commitMove: lt,
284
+ commitResize: at,
285
+ commitViewport: y,
286
+ cancelViewportNavigation: wt
271
287
  },
272
288
  hud: {
273
289
  zoomIn: () => q("in"),
274
290
  zoomOut: () => q("out")
275
291
  },
276
292
  lock: {
277
- toggle: at
293
+ toggle: gt
278
294
  },
279
295
  filter: {
280
- toggle: gt,
281
- solo: ut,
282
- showAll: ht
296
+ toggle: ut,
297
+ solo: ht,
298
+ showAll: ft
283
299
  },
284
300
  navigation: {
285
301
  handleArrowNavigation: (t) => {
@@ -289,12 +305,12 @@ function Kt(c) {
289
305
  t,
290
306
  H()
291
307
  );
292
- e && p(e);
308
+ e && W(e);
293
309
  },
294
- centerOnWidget: _,
295
- focusWidget: p,
296
- fitWidget: (t) => (C(t.id), f(t.id), wt(t), t),
297
- overviewWidget: (t) => (C(t.id), f(t.id), Wt(t), t)
310
+ centerOnWidget: z,
311
+ focusWidget: W,
312
+ fitWidget: (t) => (b(t.id), f(t.id), Wt(t), t),
313
+ overviewWidget: (t) => (b(t.id), f(t.id), xt(t), t)
298
314
  },
299
315
  selection: {
300
316
  clear: P
@@ -302,26 +318,26 @@ function Kt(c) {
302
318
  widgetActions: {
303
319
  deleteSelected: () => {
304
320
  const t = F();
305
- t && y(t);
321
+ t && Y(t);
306
322
  },
307
- deleteWidget: y,
308
- addWidget: X,
309
- addWidgetAtCursor: v,
323
+ deleteWidget: Y,
324
+ addWidget: v,
325
+ addWidgetAtCursor: X,
310
326
  addWidgetCentered: B,
311
327
  ensureWidget: (t, e) => {
312
- const n = M(t);
328
+ const n = C(t);
313
329
  if (n)
314
- return p(n, { centerViewport: e?.centerViewport ?? !0 });
315
- const i = ft(), o = v(
330
+ return W(n, { centerViewport: e?.centerViewport ?? !0 });
331
+ const i = mt(), o = X(
316
332
  t,
317
333
  e?.worldX ?? i.worldX,
318
334
  e?.worldY ?? i.worldY
319
335
  );
320
- return (e?.centerViewport ?? !0) && o && _(o), o;
336
+ return (e?.centerViewport ?? !0) && o && z(o), o;
321
337
  }
322
338
  },
323
339
  queries: {
324
- findWidgetByType: M,
340
+ findWidgetByType: C,
325
341
  findWidgetById: ct
326
342
  },
327
343
  appearance: {
@@ -330,8 +346,8 @@ function Kt(c) {
330
346
  }
331
347
  },
332
348
  handleCloseRequest: () => {
333
- if (W()) {
334
- h();
349
+ if (x()) {
350
+ g();
335
351
  return;
336
352
  }
337
353
  c.onClose();