@burdenoff/microfe-eventfullymanaged 2026.1102.4 → 2026.1102.5

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 (37) hide show
  1. package/dist/eventfullymanaged/components/ImageUploadField.d.ts +7 -5
  2. package/dist/eventfullymanaged/components/ImageUploadField.d.ts.map +1 -1
  3. package/dist/eventfullymanaged/components/ImageUploadField.js +39 -48
  4. package/dist/eventfullymanaged/components/ImageUploadField.js.map +1 -1
  5. package/dist/eventfullymanaged/components/ResolvedImage.d.ts +16 -0
  6. package/dist/eventfullymanaged/components/ResolvedImage.d.ts.map +1 -0
  7. package/dist/eventfullymanaged/components/ResolvedImage.js +18 -0
  8. package/dist/eventfullymanaged/components/ResolvedImage.js.map +1 -0
  9. package/dist/eventfullymanaged/hooks/useResolvedImageUrl.d.ts +44 -0
  10. package/dist/eventfullymanaged/hooks/useResolvedImageUrl.d.ts.map +1 -0
  11. package/dist/eventfullymanaged/hooks/useResolvedImageUrl.js +106 -0
  12. package/dist/eventfullymanaged/hooks/useResolvedImageUrl.js.map +1 -0
  13. package/dist/eventfullymanaged/lib/fileRef.d.ts +25 -0
  14. package/dist/eventfullymanaged/lib/fileRef.d.ts.map +1 -0
  15. package/dist/eventfullymanaged/lib/fileRef.js +15 -0
  16. package/dist/eventfullymanaged/lib/fileRef.js.map +1 -0
  17. package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.d.ts.map +1 -1
  18. package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.js +81 -80
  19. package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.js.map +1 -1
  20. package/dist/eventfullymanaged/pages/modules/VenueResourcesPage.js +1 -1
  21. package/dist/eventfullymanaged/pages/modules/VenueResourcesPage.js.map +1 -1
  22. package/dist/eventfullymanaged/pages/speakers/SpeakersPage.d.ts.map +1 -1
  23. package/dist/eventfullymanaged/pages/speakers/SpeakersPage.js +73 -73
  24. package/dist/eventfullymanaged/pages/speakers/SpeakersPage.js.map +1 -1
  25. package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.d.ts.map +1 -1
  26. package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.js +97 -96
  27. package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.js.map +1 -1
  28. package/dist/eventfullymanaged/pages/venues/FloorPlansPage.d.ts.map +1 -1
  29. package/dist/eventfullymanaged/pages/venues/FloorPlansPage.js +173 -134
  30. package/dist/eventfullymanaged/pages/venues/FloorPlansPage.js.map +1 -1
  31. package/dist/eventfullymanaged/pages/venues/VenueDetailPage.d.ts.map +1 -1
  32. package/dist/eventfullymanaged/pages/venues/VenueDetailPage.js +96 -94
  33. package/dist/eventfullymanaged/pages/venues/VenueDetailPage.js.map +1 -1
  34. package/dist/node_modules/@apollo/client/react/hooks/useQuery.js.map +1 -1
  35. package/dist/node_modules/@apollo/client/react/hooks/useSyncExternalStore.js.map +1 -1
  36. package/dist/utils/pageContext.js +1 -1
  37. package/package.json +1 -1
@@ -3,19 +3,21 @@ import { ActionMenu as i } from "../../components/ActionMenu.js";
3
3
  import { FloorPlanZoneEditor as a } from "../../components/FloorPlanZoneEditor.js";
4
4
  import { useZoneEditorState as o } from "../../components/floorPlanEditor/useZoneEditorState.js";
5
5
  import { ImageUploadField as s } from "../../components/ImageUploadField.js";
6
- import { useEventfullyManaged as c } from "../../context/EventfullyManagedContext.js";
7
- import { asNumber as l, asString as u, extractZones as d, serializeZones as ee, summarizeZones as f, zoneTypeLabel as p } from "../../lib/floorPlanZones.js";
8
- import { describeError as m, mutationSucceeded as h } from "../../lib/mutationResult.js";
9
- import { notify as g } from "../../lib/toast.js";
10
- import { useCallback as te, useEffect as ne, useMemo as _, useState as v } from "react";
11
- import { useParams as re } from "react-router";
12
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
13
- import { ArrowLeft as ie, LayoutGrid as x, Map as S, PencilRuler as C, Plus as w, SquareStack as ae } from "lucide-react";
14
- import { AlertDialog as oe, AlertDialogAction as se, AlertDialogCancel as ce, AlertDialogContent as T, AlertDialogDescription as le, AlertDialogFooter as ue, AlertDialogHeader as de, AlertDialogTitle as fe, Badge as E, Button as D, GlassCard as O, GradientText as pe, IllustratedEmptyState as me, Input as he, Skeleton as k } from "@burdenoff/fe-libs/ui";
6
+ import { ResolvedImage as c } from "../../components/ResolvedImage.js";
7
+ import { useEventfullyManaged as l } from "../../context/EventfullyManagedContext.js";
8
+ import { useResolvedImageUrl as u } from "../../hooks/useResolvedImageUrl.js";
9
+ import { asNumber as d, asString as f, extractZones as ee, serializeZones as te, summarizeZones as p, zoneTypeLabel as m } from "../../lib/floorPlanZones.js";
10
+ import { describeError as h, mutationSucceeded as g } from "../../lib/mutationResult.js";
11
+ import { notify as _ } from "../../lib/toast.js";
12
+ import { useCallback as ne, useEffect as re, useMemo as v, useState as y } from "react";
13
+ import { useParams as ie } from "react-router";
14
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
15
+ import { ArrowLeft as ae, LayoutGrid as S, Map as C, PencilRuler as w, Plus as T, SquareStack as E } from "lucide-react";
16
+ import { AlertDialog as D, AlertDialogAction as oe, AlertDialogCancel as se, AlertDialogContent as ce, AlertDialogDescription as le, AlertDialogFooter as ue, AlertDialogHeader as de, AlertDialogTitle as fe, Badge as O, Button as k, GlassCard as A, GradientText as pe, IllustratedEmptyState as me, Input as he, Skeleton as j } from "@burdenoff/fe-libs/ui";
15
17
  // src/eventfullymanaged/pages/venues/FloorPlansPage.tsx
16
- var A = "/EventfullyManaged/FloorPlans";
18
+ var M = "/EventfullyManaged/FloorPlans";
17
19
  function ge(e, t) {
18
- let n = [], r = f(t);
20
+ let n = [], r = p(t);
19
21
  r.zones > 0 && n.push({
20
22
  label: "Zones",
21
23
  value: r.zones.toLocaleString()
@@ -23,69 +25,106 @@ function ge(e, t) {
23
25
  label: "Booths",
24
26
  value: r.booths.toLocaleString()
25
27
  });
26
- let i = r.capacity, a = e.dimensions ?? {}, o = l(a.capacity) ?? l(a.totalCapacity), s = i > 0 ? i : o;
28
+ let i = r.capacity, a = e.dimensions ?? {}, o = d(a.capacity) ?? d(a.totalCapacity), s = i > 0 ? i : o;
27
29
  s !== void 0 && s > 0 && n.push({
28
30
  label: "Total capacity",
29
31
  value: s.toLocaleString()
30
32
  });
31
- let c = l(a.width), d = l(a.height);
32
- if (c !== void 0 && d !== void 0) {
33
- let e = u(a.unit) ?? "m";
33
+ let c = d(a.width), l = d(a.height);
34
+ if (c !== void 0 && l !== void 0) {
35
+ let e = f(a.unit) ?? "m";
34
36
  n.push({
35
37
  label: "Dimensions",
36
- value: `${c} × ${d} ${e}`
38
+ value: `${c} × ${l} ${e}`
37
39
  });
38
40
  }
39
41
  return n;
40
42
  }
41
- function _e({ plan: e, zones: t, editing: n, saving: r, onAttachImage: i, onStartEditing: o, onSaveZones: c, onStopEditing: l, editor: u }) {
43
+ function N({ imageValue: e, editor: t, planName: n, saving: r, onSave: i, onCancel: o }) {
44
+ let { url: s, failed: c, retry: l } = u(e);
45
+ return s ? /* @__PURE__ */ b(a, {
46
+ editor: t,
47
+ planName: n,
48
+ imageUrl: s,
49
+ saving: r,
50
+ onSave: i,
51
+ onCancel: o
52
+ }) : c ? /* @__PURE__ */ x("div", {
53
+ className: "flex flex-col items-center gap-3 bg-bg-sunken p-6 text-center",
54
+ role: "alert",
55
+ children: [/* @__PURE__ */ b("p", {
56
+ className: "text-sm text-text-secondary",
57
+ children: "The floor plan image could not be loaded for editing."
58
+ }), /* @__PURE__ */ x("div", {
59
+ className: "flex items-center gap-2",
60
+ children: [/* @__PURE__ */ b(k, {
61
+ type: "button",
62
+ size: "sm",
63
+ variant: "outline",
64
+ onClick: o,
65
+ children: "Cancel"
66
+ }), /* @__PURE__ */ b(k, {
67
+ type: "button",
68
+ size: "sm",
69
+ onClick: l,
70
+ children: "Retry"
71
+ })]
72
+ })]
73
+ }) : /* @__PURE__ */ b("div", {
74
+ className: "flex justify-center bg-bg-sunken p-3",
75
+ "aria-busy": "true",
76
+ children: /* @__PURE__ */ b(j, { className: "h-64 w-[min(40rem,80vw)] max-w-full" })
77
+ });
78
+ }
79
+ function _e({ plan: e, zones: t, editing: n, saving: r, onAttachImage: i, onStartEditing: a, onSaveZones: o, onStopEditing: l, editor: u }) {
42
80
  let d = t.filter((e) => e.rect);
43
- return /* @__PURE__ */ b(O, {
81
+ return /* @__PURE__ */ x(A, {
44
82
  treatment: "plain",
45
83
  className: "overflow-hidden border-border-seam p-0",
46
84
  children: [
47
- /* @__PURE__ */ b("div", {
85
+ /* @__PURE__ */ x("div", {
48
86
  className: "flex items-center justify-between gap-2 border-b border-border-seam px-5 py-3",
49
- children: [/* @__PURE__ */ b("div", {
87
+ children: [/* @__PURE__ */ x("div", {
50
88
  className: "flex min-w-0 items-center gap-2 text-text-primary",
51
- children: [/* @__PURE__ */ y(S, { className: "h-4 w-4 shrink-0 text-action-primary-bg" }), /* @__PURE__ */ y("h2", {
89
+ children: [/* @__PURE__ */ b(C, { className: "h-4 w-4 shrink-0 text-action-primary-bg" }), /* @__PURE__ */ b("h2", {
52
90
  className: "truncate text-base font-semibold",
53
91
  children: e.name
54
92
  })]
55
- }), /* @__PURE__ */ b("div", {
93
+ }), /* @__PURE__ */ x("div", {
56
94
  className: "flex shrink-0 items-center gap-2",
57
- children: [t.length > 0 ? /* @__PURE__ */ b(E, {
95
+ children: [t.length > 0 ? /* @__PURE__ */ x(O, {
58
96
  variant: "secondary",
59
97
  children: [
60
98
  t.length,
61
99
  " ",
62
100
  t.length === 1 ? "zone" : "zones"
63
101
  ]
64
- }) : null, e.imageUrl && !n ? /* @__PURE__ */ b(D, {
102
+ }) : null, e.imageUrl && !n ? /* @__PURE__ */ x(k, {
65
103
  type: "button",
66
104
  size: "sm",
67
105
  variant: "outline",
68
- onClick: o,
69
- children: [/* @__PURE__ */ y(C, { className: "h-4 w-4" }), t.length > 0 ? "Edit zones" : "Add zones"]
106
+ onClick: a,
107
+ children: [/* @__PURE__ */ b(w, { className: "h-4 w-4" }), t.length > 0 ? "Edit zones" : "Add zones"]
70
108
  }) : null]
71
109
  })]
72
110
  }),
73
- e.imageUrl && n ? /* @__PURE__ */ y(a, {
111
+ e.imageUrl && n ? /* @__PURE__ */ b(N, {
112
+ imageValue: e.imageUrl,
74
113
  editor: u,
75
114
  planName: e.name,
76
- imageUrl: e.imageUrl,
77
115
  saving: r,
78
- onSave: (t) => c(e, t),
116
+ onSave: (t) => o(e, t),
79
117
  onCancel: l
80
- }) : e.imageUrl ? /* @__PURE__ */ y("div", {
118
+ }) : e.imageUrl ? /* @__PURE__ */ b("div", {
81
119
  className: "flex justify-center bg-bg-sunken p-3",
82
- children: /* @__PURE__ */ b("div", {
120
+ children: /* @__PURE__ */ x("div", {
83
121
  className: "relative inline-block max-w-full",
84
- children: [/* @__PURE__ */ y("img", {
85
- src: e.imageUrl,
122
+ children: [/* @__PURE__ */ b(c, {
123
+ value: e.imageUrl,
86
124
  alt: `${e.name} floor plan`,
87
- className: "block h-auto max-h-[32rem] w-auto max-w-full"
88
- }), d.map((e) => /* @__PURE__ */ b("div", {
125
+ className: "block h-auto max-h-[32rem] w-auto max-w-full",
126
+ fallback: /* @__PURE__ */ b(j, { className: "h-64 w-[min(40rem,80vw)] max-w-full" })
127
+ }), d.map((e) => /* @__PURE__ */ x("div", {
89
128
  "data-testid": "floor-plan-zone",
90
129
  className: "absolute flex flex-col items-center justify-center overflow-hidden rounded-md border border-accent-primary/70 bg-action-primary-bg/15 text-[10px] font-medium leading-tight text-accent-primary",
91
130
  style: {
@@ -96,53 +135,53 @@ function _e({ plan: e, zones: t, editing: n, saving: r, onAttachImage: i, onStar
96
135
  },
97
136
  title: [
98
137
  e.label,
99
- p(e.type),
138
+ m(e.type),
100
139
  e.capacity === void 0 ? "" : `capacity ${e.capacity}`
101
140
  ].filter(Boolean).join(" · "),
102
- children: [/* @__PURE__ */ y("span", {
141
+ children: [/* @__PURE__ */ b("span", {
103
142
  className: "max-w-full truncate px-1",
104
143
  children: e.label
105
- }), e.capacity === void 0 ? null : /* @__PURE__ */ y("span", {
144
+ }), e.capacity === void 0 ? null : /* @__PURE__ */ b("span", {
106
145
  className: "max-w-full truncate px-1 text-text-muted",
107
146
  children: e.capacity
108
147
  })]
109
148
  }, e.id))]
110
149
  })
111
- }) : /* @__PURE__ */ y("div", {
150
+ }) : /* @__PURE__ */ b("div", {
112
151
  className: "p-6",
113
- children: /* @__PURE__ */ b("div", {
152
+ children: /* @__PURE__ */ x("div", {
114
153
  className: "rounded-card border border-dashed border-border-default bg-bg-sunken p-6",
115
- children: [/* @__PURE__ */ y("p", {
154
+ children: [/* @__PURE__ */ b("p", {
116
155
  className: "mb-3 text-center text-sm text-text-secondary",
117
156
  children: "No image attached yet. Upload the hall map for this plan, then draw its zones and booths."
118
- }), /* @__PURE__ */ y(s, {
157
+ }), /* @__PURE__ */ b(s, {
119
158
  label: "Upload floor plan image",
120
- folderPath: A,
159
+ folderPath: M,
121
160
  value: null,
122
161
  onUploaded: (t) => i(e, t),
123
162
  hint: "Stored securely in Files and shown here once attached."
124
163
  })]
125
164
  })
126
165
  }),
127
- t.length > 0 && !n ? /* @__PURE__ */ b("div", {
166
+ t.length > 0 && !n ? /* @__PURE__ */ x("div", {
128
167
  className: "border-t border-border-seam px-5 py-4",
129
- children: [/* @__PURE__ */ b("div", {
168
+ children: [/* @__PURE__ */ x("div", {
130
169
  className: "mb-2 flex items-center gap-2 text-sm font-medium text-text-primary",
131
- children: [/* @__PURE__ */ y(x, { className: "h-4 w-4 text-text-muted" }), "Labeled zones"]
132
- }), /* @__PURE__ */ y("div", {
170
+ children: [/* @__PURE__ */ b(S, { className: "h-4 w-4 text-text-muted" }), "Labeled zones"]
171
+ }), /* @__PURE__ */ b("div", {
133
172
  className: "flex flex-wrap gap-2",
134
173
  children: t.map((e) => {
135
- let t = p(e.type);
136
- return /* @__PURE__ */ b(E, {
174
+ let t = m(e.type);
175
+ return /* @__PURE__ */ x(O, {
137
176
  variant: "outline",
138
177
  className: "gap-1.5",
139
178
  children: [
140
179
  e.label,
141
- t ? /* @__PURE__ */ b("span", {
180
+ t ? /* @__PURE__ */ x("span", {
142
181
  className: "text-text-muted",
143
182
  children: ["· ", t]
144
183
  }) : null,
145
- e.capacity === void 0 ? null : /* @__PURE__ */ b("span", {
184
+ e.capacity === void 0 ? null : /* @__PURE__ */ x("span", {
146
185
  className: "text-text-muted",
147
186
  children: ["· ", e.capacity]
148
187
  })
@@ -154,26 +193,26 @@ function _e({ plan: e, zones: t, editing: n, saving: r, onAttachImage: i, onStar
154
193
  ]
155
194
  });
156
195
  }
157
- function j() {
158
- let { id: a = "" } = re(), { navigate: l } = c(), { data: u, loading: f, refetch: p } = r(a), [x, { loading: S }] = e(), [C] = n(), [E] = t(), [j, M] = v(""), [N, P] = v(""), [F, I] = v(null), [L, R] = v(!1), [z, B] = v(null), [ve, V] = v(!1), H = o(), [U, W] = v(null), G = u?.venue, K = _(() => u?.floorPlans?.items ?? [], [u]), q = _(() => K.find((e) => e.id === F) ?? K[0] ?? null, [K, F]), J = _(() => d(q?.interactiveAreas), [q]), Y = _(() => q ? ge(q, J) : [], [q, J]), X = (e) => e.venueId || a, ye = async () => {
159
- if (j.trim() && a) try {
160
- let e = await x({ variables: { input: {
196
+ function P() {
197
+ let { id: a = "" } = ie(), { navigate: c } = l(), { data: u, loading: d, refetch: f } = r(a), [p, { loading: m }] = e(), [S] = n(), [C] = t(), [w, O] = y(""), [N, P] = y(""), [F, I] = y(null), [L, R] = y(!1), [z, B] = y(null), [ve, V] = y(!1), H = o(), [U, W] = y(null), G = u?.venue, K = v(() => u?.floorPlans?.items ?? [], [u]), q = v(() => K.find((e) => e.id === F) ?? K[0] ?? null, [K, F]), J = v(() => ee(q?.interactiveAreas), [q]), Y = v(() => q ? ge(q, J) : [], [q, J]), X = (e) => e.venueId || a, ye = async () => {
198
+ if (w.trim() && a) try {
199
+ let e = await p({ variables: { input: {
161
200
  venueId: a,
162
- name: j.trim(),
201
+ name: w.trim(),
163
202
  imageUrl: N,
164
203
  dimensions: {},
165
204
  interactiveAreas: {}
166
205
  } } });
167
- if (!h(e, e.data?.createFloorPlan?.id, "Could not create floor plan")) return;
168
- M(""), P(""), R(!1);
206
+ if (!g(e, e.data?.createFloorPlan?.id, "Could not create floor plan")) return;
207
+ O(""), P(""), R(!1);
169
208
  let t = e.data?.createFloorPlan?.id;
170
- t && I(t), g.success("Floor plan created"), await p();
209
+ t && I(t), _.success("Floor plan created"), await f();
171
210
  } catch (e) {
172
- g.error("Could not create floor plan", m(e));
211
+ _.error("Could not create floor plan", h(e));
173
212
  }
174
213
  }, be = async (e, t) => {
175
214
  try {
176
- let n = await C({ variables: {
215
+ let n = await S({ variables: {
177
216
  id: e.id,
178
217
  input: {
179
218
  venueId: X(e),
@@ -183,17 +222,17 @@ function j() {
183
222
  interactiveAreas: e.interactiveAreas ?? {}
184
223
  }
185
224
  } });
186
- if (!h(n, n.data?.updateFloorPlan?.id, "Could not attach image")) return;
187
- await p();
225
+ if (!g(n, n.data?.updateFloorPlan?.id, "Could not attach image")) return;
226
+ await f();
188
227
  } catch (e) {
189
- g.error("Could not attach image", m(e));
228
+ _.error("Could not attach image", h(e));
190
229
  }
191
- }, Z = te(() => {
230
+ }, Z = ne(() => {
192
231
  B(null);
193
232
  }, []), xe = (e, t) => {
194
233
  H.reset(t), B(e.id);
195
234
  }, Q = z !== null && H.dirty;
196
- ne(() => {
235
+ re(() => {
197
236
  if (!Q) return;
198
237
  let e = (e) => {
199
238
  e.preventDefault();
@@ -201,7 +240,7 @@ function j() {
201
240
  return window.addEventListener("beforeunload", e), () => window.removeEventListener("beforeunload", e);
202
241
  }, [Q]);
203
242
  let Se = () => {
204
- Q ? W({ kind: "venue" }) : l(`/venues/${a}`);
243
+ Q ? W({ kind: "venue" }) : c(`/venues/${a}`);
205
244
  }, Ce = (e) => {
206
245
  Q && z !== e ? W({
207
246
  kind: "plan",
@@ -209,89 +248,89 @@ function j() {
209
248
  }) : (z !== e && Z(), I(e));
210
249
  }, $ = () => {
211
250
  let e = U;
212
- W(null), Z(), e?.kind === "plan" ? I(e.planId) : e?.kind === "venue" && l(`/venues/${a}`);
251
+ W(null), Z(), e?.kind === "plan" ? I(e.planId) : e?.kind === "venue" && c(`/venues/${a}`);
213
252
  }, we = async (e, t) => {
214
253
  V(!0);
215
254
  try {
216
- let n = await C({ variables: {
255
+ let n = await S({ variables: {
217
256
  id: e.id,
218
257
  input: {
219
258
  venueId: X(e),
220
259
  name: e.name,
221
260
  imageUrl: e.imageUrl ?? null,
222
261
  dimensions: e.dimensions ?? {},
223
- interactiveAreas: ee(t, e.interactiveAreas)
262
+ interactiveAreas: te(t, e.interactiveAreas)
224
263
  }
225
264
  } });
226
- return h(n, n.data?.updateFloorPlan?.id, "Could not save zones") ? (await p(), Z(), g.success("Zones saved", `${t.length} ${t.length === 1 ? "zone" : "zones"} on ${e.name}`), !0) : !1;
265
+ return g(n, n.data?.updateFloorPlan?.id, "Could not save zones") ? (await f(), Z(), _.success("Zones saved", `${t.length} ${t.length === 1 ? "zone" : "zones"} on ${e.name}`), !0) : !1;
227
266
  } catch (e) {
228
- return g.error("Could not save zones", m(e)), !1;
267
+ return _.error("Could not save zones", h(e)), !1;
229
268
  } finally {
230
269
  V(!1);
231
270
  }
232
271
  }, Te = async (e) => {
233
272
  let t;
234
273
  try {
235
- t = await E({ variables: { id: e.id } });
274
+ t = await C({ variables: { id: e.id } });
236
275
  } catch (e) {
237
- throw g.error("Could not delete floor plan", m(e)), e;
276
+ throw _.error("Could not delete floor plan", h(e)), e;
238
277
  }
239
- if (t.error) throw g.error("Could not delete floor plan", t.error.message), t.error;
240
- if (!t.data?.deleteFloorPlan) throw g.error("Could not delete floor plan", "The server did not confirm the change."), Error("delete-unconfirmed");
241
- F === e.id && I(null), z === e.id && Z(), g.success("Floor plan deleted", e.name), await p();
278
+ if (t.error) throw _.error("Could not delete floor plan", t.error.message), t.error;
279
+ if (!t.data?.deleteFloorPlan) throw _.error("Could not delete floor plan", "The server did not confirm the change."), Error("delete-unconfirmed");
280
+ F === e.id && I(null), z === e.id && Z(), _.success("Floor plan deleted", e.name), await f();
242
281
  };
243
- return /* @__PURE__ */ b("div", {
282
+ return /* @__PURE__ */ x("div", {
244
283
  className: "space-y-6 p-6",
245
284
  children: [
246
- /* @__PURE__ */ b("div", {
285
+ /* @__PURE__ */ x("div", {
247
286
  className: "flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between",
248
- children: [/* @__PURE__ */ b("div", {
287
+ children: [/* @__PURE__ */ x("div", {
249
288
  className: "space-y-3",
250
289
  children: [
251
- /* @__PURE__ */ b(D, {
290
+ /* @__PURE__ */ x(k, {
252
291
  type: "button",
253
292
  variant: "ghost",
254
293
  size: "sm",
255
294
  onClick: Se,
256
- children: [/* @__PURE__ */ y(ie, { className: "h-4 w-4" }), "Back to Venue"]
295
+ children: [/* @__PURE__ */ b(ae, { className: "h-4 w-4" }), "Back to Venue"]
257
296
  }),
258
- /* @__PURE__ */ y(pe, {
297
+ /* @__PURE__ */ b(pe, {
259
298
  as: "h1",
260
299
  className: "text-2xl font-bold",
261
300
  children: G?.name ? `${G.name} — Floor Plans` : "Floor Plans"
262
301
  }),
263
- /* @__PURE__ */ y("p", {
302
+ /* @__PURE__ */ b("p", {
264
303
  className: "text-sm text-text-secondary",
265
304
  children: "Map the hall layout, booth positions, stage and entrances so exhibitors and attendees can navigate on the day."
266
305
  })
267
306
  ]
268
- }), /* @__PURE__ */ b(D, {
307
+ }), /* @__PURE__ */ x(k, {
269
308
  type: "button",
270
309
  onClick: () => R((e) => !e),
271
- children: [/* @__PURE__ */ y(w, { className: "h-4 w-4" }), "Add floor plan"]
310
+ children: [/* @__PURE__ */ b(T, { className: "h-4 w-4" }), "Add floor plan"]
272
311
  })]
273
312
  }),
274
- f ? /* @__PURE__ */ b("div", {
313
+ d ? /* @__PURE__ */ x("div", {
275
314
  className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
276
- children: [/* @__PURE__ */ y(k, { className: "h-96 rounded-card lg:col-span-2" }), /* @__PURE__ */ y(k, { className: "h-96 rounded-card" })]
277
- }) : K.length === 0 && !L ? /* @__PURE__ */ y(O, {
315
+ children: [/* @__PURE__ */ b(j, { className: "h-96 rounded-card lg:col-span-2" }), /* @__PURE__ */ b(j, { className: "h-96 rounded-card" })]
316
+ }) : K.length === 0 && !L ? /* @__PURE__ */ b(A, {
278
317
  treatment: "plain",
279
318
  className: "border-border-seam",
280
- children: /* @__PURE__ */ y(me, {
319
+ children: /* @__PURE__ */ b(me, {
281
320
  illustration: "empty-files",
282
321
  title: "No floor plans yet.",
283
322
  description: "Add one to start mapping this venue — upload the hall map and label its zones.",
284
- action: /* @__PURE__ */ b(D, {
323
+ action: /* @__PURE__ */ x(k, {
285
324
  type: "button",
286
325
  onClick: () => R(!0),
287
- children: [/* @__PURE__ */ y(w, { className: "h-4 w-4" }), "Add floor plan"]
326
+ children: [/* @__PURE__ */ b(T, { className: "h-4 w-4" }), "Add floor plan"]
288
327
  })
289
328
  })
290
- }) : /* @__PURE__ */ b("div", {
329
+ }) : /* @__PURE__ */ x("div", {
291
330
  className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
292
- children: [/* @__PURE__ */ y("div", {
331
+ children: [/* @__PURE__ */ b("div", {
293
332
  className: "lg:col-span-2",
294
- children: q ? /* @__PURE__ */ y(_e, {
333
+ children: q ? /* @__PURE__ */ b(_e, {
295
334
  plan: q,
296
335
  zones: J,
297
336
  editing: z === q.id,
@@ -301,52 +340,52 @@ function j() {
301
340
  onSaveZones: we,
302
341
  onStopEditing: Z,
303
342
  editor: H
304
- }) : /* @__PURE__ */ y(O, {
343
+ }) : /* @__PURE__ */ b(A, {
305
344
  treatment: "plain",
306
345
  className: "flex h-full items-center justify-center border-border-seam p-10",
307
- children: /* @__PURE__ */ y("p", {
346
+ children: /* @__PURE__ */ b("p", {
308
347
  className: "text-sm text-text-secondary",
309
348
  children: "Add a floor plan to preview it here."
310
349
  })
311
350
  })
312
- }), /* @__PURE__ */ b("div", {
351
+ }), /* @__PURE__ */ x("div", {
313
352
  className: "space-y-6",
314
353
  children: [
315
- /* @__PURE__ */ b(O, {
354
+ /* @__PURE__ */ x(A, {
316
355
  treatment: "plain",
317
356
  className: "border-border-seam p-5",
318
- children: [/* @__PURE__ */ y("h2", {
357
+ children: [/* @__PURE__ */ b("h2", {
319
358
  className: "text-sm font-semibold text-text-primary",
320
359
  children: "Available Floor Plans"
321
- }), /* @__PURE__ */ y("ul", {
360
+ }), /* @__PURE__ */ b("ul", {
322
361
  className: "mt-3 space-y-2",
323
362
  role: "list",
324
- children: K.length === 0 ? /* @__PURE__ */ y("li", {
363
+ children: K.length === 0 ? /* @__PURE__ */ b("li", {
325
364
  className: "text-sm text-text-secondary",
326
365
  children: "None yet — create one below."
327
366
  }) : K.map((e) => {
328
367
  let t = q?.id === e.id;
329
- return /* @__PURE__ */ y("li", { children: /* @__PURE__ */ b("div", {
368
+ return /* @__PURE__ */ b("li", { children: /* @__PURE__ */ x("div", {
330
369
  className: `flex items-center gap-3 rounded-card border p-3 transition-colors ${t ? "border-accent-primary bg-action-primary-bg/10" : "border-border-seam hover:border-border-strong"}`,
331
- children: [/* @__PURE__ */ b("button", {
370
+ children: [/* @__PURE__ */ x("button", {
332
371
  type: "button",
333
372
  onClick: () => Ce(e.id),
334
373
  className: "flex min-w-0 flex-1 items-center gap-3 text-left focus-visible:outline-none",
335
374
  "aria-pressed": t,
336
- children: [/* @__PURE__ */ y("span", {
375
+ children: [/* @__PURE__ */ b("span", {
337
376
  className: `flex h-9 w-9 shrink-0 items-center justify-center rounded-md ${t ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary"}`,
338
- children: /* @__PURE__ */ y(ae, { className: "h-4 w-4" })
339
- }), /* @__PURE__ */ b("span", {
377
+ children: /* @__PURE__ */ b(E, { className: "h-4 w-4" })
378
+ }), /* @__PURE__ */ x("span", {
340
379
  className: "min-w-0",
341
- children: [/* @__PURE__ */ y("span", {
380
+ children: [/* @__PURE__ */ b("span", {
342
381
  className: "block truncate text-sm font-medium text-text-primary",
343
382
  children: e.name
344
- }), /* @__PURE__ */ y("span", {
383
+ }), /* @__PURE__ */ b("span", {
345
384
  className: "block text-xs text-text-muted",
346
385
  children: e.imageUrl ? "Map attached" : "No image yet"
347
386
  })]
348
387
  })]
349
- }), /* @__PURE__ */ y(i, {
388
+ }), /* @__PURE__ */ b(i, {
350
389
  ariaLabel: `Floor plan actions for ${e.name}`,
351
390
  entityName: e.name,
352
391
  deleteLabel: "Delete floor plan",
@@ -356,64 +395,64 @@ function j() {
356
395
  })
357
396
  })]
358
397
  }),
359
- q ? /* @__PURE__ */ b(O, {
398
+ q ? /* @__PURE__ */ x(A, {
360
399
  treatment: "metric",
361
400
  className: "p-5",
362
- children: [/* @__PURE__ */ y("h2", {
401
+ children: [/* @__PURE__ */ b("h2", {
363
402
  className: "text-sm font-semibold text-text-primary",
364
403
  children: "Plan Details"
365
- }), Y.length > 0 ? /* @__PURE__ */ y("dl", {
404
+ }), Y.length > 0 ? /* @__PURE__ */ b("dl", {
366
405
  className: "mt-3 space-y-2",
367
- children: Y.map((e) => /* @__PURE__ */ b("div", {
406
+ children: Y.map((e) => /* @__PURE__ */ x("div", {
368
407
  className: "flex items-center justify-between text-sm",
369
- children: [/* @__PURE__ */ y("dt", {
408
+ children: [/* @__PURE__ */ b("dt", {
370
409
  className: "text-text-secondary",
371
410
  children: e.label
372
- }), /* @__PURE__ */ y("dd", {
411
+ }), /* @__PURE__ */ b("dd", {
373
412
  className: "font-semibold tabular-nums text-text-primary",
374
413
  children: e.value
375
414
  })]
376
415
  }, e.label))
377
- }) : /* @__PURE__ */ y("p", {
416
+ }) : /* @__PURE__ */ b("p", {
378
417
  className: "mt-3 text-sm text-text-secondary",
379
418
  children: "No zones or dimensions captured for this plan yet."
380
419
  })]
381
420
  }) : null,
382
- L || K.length === 0 ? /* @__PURE__ */ b(O, {
421
+ L || K.length === 0 ? /* @__PURE__ */ x(A, {
383
422
  treatment: "plain",
384
423
  className: "border-border-seam p-5",
385
- children: [/* @__PURE__ */ y("h2", {
424
+ children: [/* @__PURE__ */ b("h2", {
386
425
  className: "mb-3 text-sm font-semibold text-text-primary",
387
426
  children: "Add a floor plan"
388
- }), /* @__PURE__ */ b("div", {
427
+ }), /* @__PURE__ */ x("div", {
389
428
  className: "space-y-4",
390
429
  children: [
391
- /* @__PURE__ */ y(he, {
430
+ /* @__PURE__ */ b(he, {
392
431
  type: "text",
393
- value: j,
394
- onChange: (e) => M(e.target.value),
432
+ value: w,
433
+ onChange: (e) => O(e.target.value),
395
434
  placeholder: "Main Hall Layout",
396
435
  "aria-label": "Floor plan name"
397
436
  }),
398
- /* @__PURE__ */ y(s, {
437
+ /* @__PURE__ */ b(s, {
399
438
  label: "Upload floor plan image",
400
- folderPath: A,
439
+ folderPath: M,
401
440
  value: N || null,
402
441
  onUploaded: P,
403
442
  hint: "Optional now — you can attach it later from the viewer."
404
443
  }),
405
- /* @__PURE__ */ b("div", {
444
+ /* @__PURE__ */ x("div", {
406
445
  className: "flex justify-end gap-2",
407
- children: [K.length > 0 ? /* @__PURE__ */ y(D, {
446
+ children: [K.length > 0 ? /* @__PURE__ */ b(k, {
408
447
  type: "button",
409
448
  variant: "ghost",
410
449
  onClick: () => R(!1),
411
450
  children: "Cancel"
412
- }) : null, /* @__PURE__ */ b(D, {
451
+ }) : null, /* @__PURE__ */ x(k, {
413
452
  type: "button",
414
453
  onClick: ye,
415
- disabled: S || !j.trim(),
416
- children: [/* @__PURE__ */ y(w, { className: "h-4 w-4" }), S ? "Creating…" : "Create"]
454
+ disabled: m || !w.trim(),
455
+ children: [/* @__PURE__ */ b(T, { className: "h-4 w-4" }), m ? "Creating…" : "Create"]
417
456
  })]
418
457
  })
419
458
  ]
@@ -422,15 +461,15 @@ function j() {
422
461
  ]
423
462
  })]
424
463
  }),
425
- /* @__PURE__ */ y(oe, {
464
+ /* @__PURE__ */ b(D, {
426
465
  open: U !== null,
427
466
  onOpenChange: (e) => e ? void 0 : W(null),
428
- children: /* @__PURE__ */ b(T, { children: [/* @__PURE__ */ b(de, { children: [/* @__PURE__ */ y(fe, { children: "Discard unsaved zone changes?" }), /* @__PURE__ */ b(le, { children: [
467
+ children: /* @__PURE__ */ x(ce, { children: [/* @__PURE__ */ x(de, { children: [/* @__PURE__ */ b(fe, { children: "Discard unsaved zone changes?" }), /* @__PURE__ */ x(le, { children: [
429
468
  "The zones you edited on this floor plan have not been saved.",
430
469
  " ",
431
470
  U?.kind === "venue" ? "Leaving this page" : "Switching plans",
432
471
  " will discard them."
433
- ] })] }), /* @__PURE__ */ b(ue, { children: [/* @__PURE__ */ y(ce, { children: "Keep editing" }), /* @__PURE__ */ y(se, {
472
+ ] })] }), /* @__PURE__ */ x(ue, { children: [/* @__PURE__ */ b(se, { children: "Keep editing" }), /* @__PURE__ */ b(oe, {
434
473
  onClick: $,
435
474
  children: "Discard changes"
436
475
  })] })] })
@@ -438,6 +477,6 @@ function j() {
438
477
  ]
439
478
  });
440
479
  }
441
- export { j as default };
480
+ export { P as default };
442
481
 
443
482
  //# sourceMappingURL=FloorPlansPage.js.map