@elevasis/ui 2.36.0 → 2.37.0

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 (92) hide show
  1. package/dist/api/index.js +4 -3
  2. package/dist/app/index.css +0 -384
  3. package/dist/app/index.d.ts +20 -0
  4. package/dist/app/index.js +21 -21
  5. package/dist/auth/index.d.ts +91 -28
  6. package/dist/auth/index.js +5 -1
  7. package/dist/charts/index.js +9 -3
  8. package/dist/chunk-5CTJ7TW2.js +111 -0
  9. package/dist/chunk-5EYJ2GIN.js +122 -0
  10. package/dist/{chunk-K4UZU3TU.js → chunk-6NREL3KL.js} +1 -1
  11. package/dist/chunk-6ROXVZ3L.js +9 -0
  12. package/dist/{chunk-YYX7OPZQ.js → chunk-73EWE2EW.js} +1 -1
  13. package/dist/{chunk-SIQ3P4OR.js → chunk-7GQFIWP4.js} +8 -756
  14. package/dist/chunk-A7IG36LB.js +215 -0
  15. package/dist/chunk-CLDCYJQT.js +1 -0
  16. package/dist/{chunk-AKW7KISS.js → chunk-CWYQRM5T.js} +2 -38
  17. package/dist/{chunk-LUYVRATI.js → chunk-DA6I5VEY.js} +5 -213
  18. package/dist/chunk-I53EX4VU.js +734 -0
  19. package/dist/chunk-IIMU5YAJ.js +53 -0
  20. package/dist/{chunk-VKIZUUPM.js → chunk-JPVZRZ3X.js} +31 -14
  21. package/dist/chunk-JXVNHVK7.js +79 -0
  22. package/dist/chunk-JZ2WID2G.js +337 -0
  23. package/dist/chunk-LCJQ6OWC.js +348 -0
  24. package/dist/chunk-LNC6PZAE.js +85 -0
  25. package/dist/{chunk-O2Q4VMRN.js → chunk-NWMPBG4U.js} +1 -1
  26. package/dist/chunk-NYNOMAAS.js +422 -0
  27. package/dist/chunk-S3KBYQTI.js +39 -0
  28. package/dist/chunk-S3XR4II4.js +30 -0
  29. package/dist/chunk-SHZT7ULK.js +425 -0
  30. package/dist/{chunk-F6EFC2MJ.js → chunk-T3NI7DOA.js} +291 -2044
  31. package/dist/{chunk-GX6XBRRF.js → chunk-TYRUKGGD.js} +2 -1
  32. package/dist/{chunk-R3VCBZDC.js → chunk-X4WBGKJQ.js} +3 -50
  33. package/dist/{chunk-GEFWMU26.js → chunk-X66MVMZT.js} +1 -9
  34. package/dist/{chunk-57OZ3AEG.js → chunk-Y3JQBSKQ.js} +1 -1
  35. package/dist/components/index.d.ts +29 -42
  36. package/dist/components/index.js +33 -19
  37. package/dist/components/navigation/index.js +3 -31
  38. package/dist/features/auth/index.d.ts +52 -99
  39. package/dist/features/auth/index.js +36 -99
  40. package/dist/features/clients/index.js +33 -19
  41. package/dist/features/crm/index.d.ts +20 -0
  42. package/dist/features/crm/index.js +33 -19
  43. package/dist/features/dashboard/index.js +33 -19
  44. package/dist/features/delivery/index.d.ts +20 -0
  45. package/dist/features/delivery/index.js +33 -19
  46. package/dist/features/knowledge/index.js +6 -30
  47. package/dist/features/lead-gen/index.d.ts +1088 -1
  48. package/dist/features/lead-gen/index.js +33 -19
  49. package/dist/features/monitoring/index.js +33 -19
  50. package/dist/features/monitoring/requests/index.js +33 -19
  51. package/dist/features/notes/index.d.ts +72 -0
  52. package/dist/features/notes/index.js +621 -0
  53. package/dist/features/operations/index.js +33 -19
  54. package/dist/features/right-panel-host/index.d.ts +214 -0
  55. package/dist/features/right-panel-host/index.js +640 -0
  56. package/dist/features/seo/index.js +3 -2
  57. package/dist/features/settings/index.d.ts +23 -35
  58. package/dist/features/settings/index.js +33 -19
  59. package/dist/hooks/access/index.d.ts +90 -0
  60. package/dist/hooks/access/index.js +10 -0
  61. package/dist/hooks/delivery/index.d.ts +20 -0
  62. package/dist/hooks/delivery/index.js +33 -19
  63. package/dist/hooks/index.d.ts +1599 -1651
  64. package/dist/hooks/index.js +33 -19
  65. package/dist/hooks/published.d.ts +1599 -1651
  66. package/dist/hooks/published.js +33 -19
  67. package/dist/hooks/user-notes/index.d.ts +57 -0
  68. package/dist/hooks/user-notes/index.js +3 -0
  69. package/dist/index.d.ts +239 -275
  70. package/dist/index.js +34 -20
  71. package/dist/initialization/index.d.ts +20 -19
  72. package/dist/knowledge/index.js +10 -7
  73. package/dist/layout/index.js +5 -3
  74. package/dist/organization/index.d.ts +0 -19
  75. package/dist/organization/index.js +33 -19
  76. package/dist/profile/index.d.ts +20 -0
  77. package/dist/provider/index.css +0 -384
  78. package/dist/provider/index.d.ts +20 -0
  79. package/dist/provider/index.js +15 -21
  80. package/dist/provider/published.css +0 -523
  81. package/dist/provider/published.d.ts +20 -0
  82. package/dist/provider/published.js +11 -21
  83. package/dist/supabase/index.d.ts +40 -0
  84. package/dist/test-utils/index.d.ts +2 -21
  85. package/dist/test-utils/index.js +5 -18
  86. package/dist/theme/index.js +2 -1
  87. package/dist/types/index.d.ts +70 -59
  88. package/dist/utils/index.js +2 -1
  89. package/package.json +19 -3
  90. package/src/auth/README.md +6 -6
  91. package/dist/components/navigation/index.css +0 -649
  92. package/dist/features/knowledge/index.css +0 -649
@@ -0,0 +1,640 @@
1
+ import '../../chunk-I2KLQ2HA.js';
2
+ import { createContext, useContext, useRef, useCallback, useState, useMemo, useEffect } from 'react';
3
+ import { useStore, create } from 'zustand';
4
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
+ import { useMediaQuery } from '@mantine/hooks';
6
+ import { useComputedColorScheme, Tooltip } from '@mantine/core';
7
+
8
+ // src/features/right-panel-host/constants.ts
9
+ var RIGHT_PANEL_Z_INDEX = { PANEL: 300, TRIGGER: 400 };
10
+ var RIGHT_PANEL_DEFAULTS = {
11
+ WIDTH: 600,
12
+ MIN_WIDTH: 600,
13
+ MAX_WIDTH: 1200,
14
+ WIDTH_STEP: 5
15
+ };
16
+ var ASSISTANT_PANEL_WIDTH_KEY = "elevasis-assistant-panel-width";
17
+ var RIGHT_PANEL_TRIGGER = {
18
+ WIDTH: 20,
19
+ HEIGHT: 80,
20
+ LIGHT_BAR_WIDTH: 2,
21
+ LIGHT_BAR_HEIGHT: 52,
22
+ ARM_WIDTH: 50
23
+ };
24
+ var RIGHT_PANEL_HISTORY_WIDTH = 260;
25
+ var RIGHT_PANEL_HISTORY_COLLAPSED_WIDTH = 48;
26
+ var RIGHT_PANEL_MOBILE_BREAKPOINT = 768;
27
+ var RIGHT_PANEL_DEFAULT_VIEW_ID = "overview";
28
+
29
+ // src/features/right-panel-host/store.ts
30
+ function loadSavedWidth() {
31
+ try {
32
+ const saved = localStorage.getItem(ASSISTANT_PANEL_WIDTH_KEY);
33
+ if (saved) {
34
+ const n = Number(saved);
35
+ if (n >= RIGHT_PANEL_DEFAULTS.MIN_WIDTH && n <= RIGHT_PANEL_DEFAULTS.MAX_WIDTH) return n;
36
+ }
37
+ } catch {
38
+ }
39
+ return RIGHT_PANEL_DEFAULTS.WIDTH;
40
+ }
41
+ function buildInitialState(overrides) {
42
+ return {
43
+ isOpen: false,
44
+ isMinimized: false,
45
+ hasBeenOpened: false,
46
+ width: loadSavedWidth(),
47
+ activeViewId: RIGHT_PANEL_DEFAULT_VIEW_ID,
48
+ ...overrides
49
+ };
50
+ }
51
+ function createRightPanelStore(initialState) {
52
+ return create((set, get) => ({
53
+ ...buildInitialState(initialState),
54
+ open: (viewId) => set((state) => ({
55
+ isOpen: true,
56
+ isMinimized: false,
57
+ hasBeenOpened: true,
58
+ activeViewId: viewId ?? state.activeViewId
59
+ })),
60
+ close: () => set({ isOpen: false, isMinimized: false }),
61
+ minimize: () => set({ isMinimized: true }),
62
+ restore: () => set({ isMinimized: false }),
63
+ setActiveView: (viewId) => set({ activeViewId: viewId }),
64
+ setWidth: (width) => set({ width }),
65
+ toggle: () => {
66
+ const { isOpen, isMinimized, open, close, restore } = get();
67
+ if (isOpen && isMinimized) {
68
+ restore();
69
+ } else if (isOpen) {
70
+ close();
71
+ } else {
72
+ open();
73
+ }
74
+ }
75
+ }));
76
+ }
77
+ var RightPanelStoreContext = createContext(null);
78
+ function useRightPanelStore() {
79
+ const store = useContext(RightPanelStoreContext);
80
+ if (!store) {
81
+ throw new Error("useRightPanel must be used within a <RightPanelProvider>");
82
+ }
83
+ return store;
84
+ }
85
+ function useRightPanel() {
86
+ const store = useRightPanelStore();
87
+ return useStore(store);
88
+ }
89
+ var RightPanelContextValue = createContext({});
90
+ function useRightPanelContext() {
91
+ return useContext(RightPanelContextValue);
92
+ }
93
+ function RightPanelProvider({ children, initialState, contextValue = {} }) {
94
+ const storeRef = useRef(null);
95
+ if (!storeRef.current) {
96
+ storeRef.current = createRightPanelStore(initialState);
97
+ }
98
+ return /* @__PURE__ */ jsx(RightPanelStoreContext.Provider, { value: storeRef.current, children: /* @__PURE__ */ jsx(RightPanelContextValue.Provider, { value: contextValue, children }) });
99
+ }
100
+ function useMobileRightPanel() {
101
+ const matches = useMediaQuery(`(max-width: ${RIGHT_PANEL_MOBILE_BREAKPOINT}px)`);
102
+ return { isMobile: !!matches };
103
+ }
104
+ var isMac = typeof navigator !== "undefined" && /Mac|iPod|iPhone|iPad/.test(navigator.userAgent);
105
+ var shortcutLabel = isMac ? "\u2318Space" : "Ctrl+Space";
106
+ var DRAG_THRESHOLD = 4;
107
+ function TriggerSVG({
108
+ width,
109
+ height,
110
+ isOpen,
111
+ isProcessing,
112
+ isLight
113
+ }) {
114
+ const cx = width / 2;
115
+ const barTop = 8;
116
+ const barBottom = height - 8;
117
+ const barH = barBottom - barTop;
118
+ let lightOpacity = 0.5;
119
+ let glowStd = 1.5;
120
+ if (isOpen && isProcessing) {
121
+ lightOpacity = 1;
122
+ glowStd = 4;
123
+ } else if (isOpen) {
124
+ lightOpacity = 1;
125
+ glowStd = 3.5;
126
+ }
127
+ const metal = isLight ? "color-mix(in srgb, var(--color-primary) 20%, #aaa)" : "color-mix(in srgb, var(--color-primary) 15%, var(--color-border))";
128
+ const metalBright = isLight ? "color-mix(in srgb, var(--color-primary) 30%, #aaa)" : "color-mix(in srgb, var(--color-primary) 25%, var(--color-border))";
129
+ const primary = "var(--color-text-subtle)";
130
+ return /* @__PURE__ */ jsxs(
131
+ "svg",
132
+ {
133
+ width,
134
+ height,
135
+ viewBox: `0 0 ${width} ${height}`,
136
+ fill: "none",
137
+ xmlns: "http://www.w3.org/2000/svg",
138
+ style: { display: "block" },
139
+ children: [
140
+ /* @__PURE__ */ jsxs("defs", { children: [
141
+ /* @__PURE__ */ jsxs("linearGradient", { id: "rp-triggerMetal", x1: "0", y1: "0", x2: "1", y2: "0", children: [
142
+ /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: metal, stopOpacity: "0.6" }),
143
+ /* @__PURE__ */ jsx("stop", { offset: "50%", stopColor: metalBright, stopOpacity: "0.8" }),
144
+ /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: metal, stopOpacity: "0.6" })
145
+ ] }),
146
+ /* @__PURE__ */ jsxs("linearGradient", { id: "rp-triggerLight", x1: "0", y1: "0", x2: "0", y2: "1", children: [
147
+ /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: primary, stopOpacity: "0.15" }),
148
+ /* @__PURE__ */ jsx("stop", { offset: "15%", stopColor: primary, stopOpacity: "0.9" }),
149
+ /* @__PURE__ */ jsx("stop", { offset: "85%", stopColor: primary, stopOpacity: "0.9" }),
150
+ /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: primary, stopOpacity: "0.15" })
151
+ ] }),
152
+ /* @__PURE__ */ jsxs("filter", { id: "rp-triggerGlow", children: [
153
+ /* @__PURE__ */ jsx("feGaussianBlur", { stdDeviation: glowStd, result: "blur" }),
154
+ /* @__PURE__ */ jsxs("feMerge", { children: [
155
+ /* @__PURE__ */ jsx("feMergeNode", { in: "blur" }),
156
+ /* @__PURE__ */ jsx("feMergeNode", { in: "SourceGraphic" })
157
+ ] })
158
+ ] })
159
+ ] }),
160
+ /* @__PURE__ */ jsx("rect", { x: cx - 2.5, y: barTop, width: "5", height: barH, rx: "2.5", fill: "url(#rp-triggerMetal)", opacity: "0.7" }),
161
+ /* @__PURE__ */ jsx("rect", { x: cx - 1.5, y: barTop + 1.5, width: "3", height: barH - 3, rx: "1.5", fill: "rgba(0,0,0,0.3)" }),
162
+ /* @__PURE__ */ jsx(
163
+ "rect",
164
+ {
165
+ x: cx - 1,
166
+ y: barTop + 3,
167
+ width: "2",
168
+ height: barH - 6,
169
+ rx: "1",
170
+ fill: "url(#rp-triggerLight)",
171
+ opacity: lightOpacity,
172
+ filter: "url(#rp-triggerGlow)",
173
+ style: isOpen && isProcessing ? {
174
+ animation: "rp-streakPulse 1.5s ease-in-out infinite"
175
+ } : void 0
176
+ }
177
+ ),
178
+ /* @__PURE__ */ jsx("circle", { cx, cy: barTop - 2, r: "1.2", fill: metalBright, opacity: "0.4" }),
179
+ /* @__PURE__ */ jsx("circle", { cx, cy: barBottom + 2, r: "1.2", fill: metalBright, opacity: "0.4" })
180
+ ]
181
+ }
182
+ );
183
+ }
184
+ function RightPanelTrigger({ onResizeDrag, onResizeEnd, isProcessing = false }) {
185
+ const { isOpen, isMinimized, width, open, close, restore } = useRightPanel();
186
+ const computedColorScheme = useComputedColorScheme("dark");
187
+ const isLight = computedColorScheme === "light";
188
+ const isDraggingRef = useRef(false);
189
+ const handleClick = useCallback(() => {
190
+ if (isOpen && isMinimized) {
191
+ restore();
192
+ } else if (isOpen) {
193
+ close();
194
+ } else {
195
+ open();
196
+ }
197
+ }, [isOpen, isMinimized, restore, close, open]);
198
+ const handlePointerDown = useCallback(
199
+ (e) => {
200
+ if (e.button !== 0) return;
201
+ const canResize = isOpen && !isMinimized && !!onResizeDrag;
202
+ const startX = e.clientX;
203
+ const startW = width;
204
+ isDraggingRef.current = false;
205
+ const target = e.currentTarget;
206
+ target.setPointerCapture(e.pointerId);
207
+ const onMove = (ev) => {
208
+ if (!canResize) return;
209
+ const dx = ev.clientX - startX;
210
+ if (!isDraggingRef.current && Math.abs(dx) >= DRAG_THRESHOLD) {
211
+ isDraggingRef.current = true;
212
+ document.body.style.cursor = "col-resize";
213
+ document.body.style.userSelect = "none";
214
+ }
215
+ if (isDraggingRef.current) {
216
+ onResizeDrag(dx, startW);
217
+ }
218
+ };
219
+ const onUp = () => {
220
+ target.removeEventListener("pointermove", onMove);
221
+ target.removeEventListener("pointerup", onUp);
222
+ target.removeEventListener("pointercancel", onUp);
223
+ document.body.style.cursor = "";
224
+ document.body.style.userSelect = "";
225
+ if (isDraggingRef.current) {
226
+ onResizeEnd?.();
227
+ } else {
228
+ handleClick();
229
+ }
230
+ isDraggingRef.current = false;
231
+ };
232
+ target.addEventListener("pointermove", onMove);
233
+ target.addEventListener("pointerup", onUp);
234
+ target.addEventListener("pointercancel", onUp);
235
+ },
236
+ [isOpen, isMinimized, width, onResizeDrag, onResizeEnd, handleClick]
237
+ );
238
+ return /* @__PURE__ */ jsx(Tooltip, { label: `Right panel (${shortcutLabel})`, position: "left", withArrow: true, children: /* @__PURE__ */ jsx(
239
+ "div",
240
+ {
241
+ role: "button",
242
+ tabIndex: 0,
243
+ onPointerDown: handlePointerDown,
244
+ onKeyDown: (e) => {
245
+ if (e.key === "Enter" || e.key === " ") {
246
+ e.preventDefault();
247
+ handleClick();
248
+ }
249
+ },
250
+ "aria-label": isOpen ? "Close right panel" : "Open right panel",
251
+ style: {
252
+ width: RIGHT_PANEL_TRIGGER.WIDTH,
253
+ height: RIGHT_PANEL_TRIGGER.HEIGHT,
254
+ borderRadius: "var(--mantine-radius-default)",
255
+ background: "var(--glass-background)",
256
+ backdropFilter: "var(--glass-blur)",
257
+ WebkitBackdropFilter: "var(--glass-blur)",
258
+ border: "1px solid var(--color-border)",
259
+ boxShadow: "light-dark(0 0 20px rgba(0,0,0,0.1), 0 0 24px rgba(0,0,0,0.75)), light-dark(0 0 60px rgba(0,0,0,0.05), 0 0 80px rgba(0,0,0,0.65))",
260
+ display: "flex",
261
+ alignItems: "center",
262
+ justifyContent: "center",
263
+ cursor: "pointer",
264
+ padding: 0
265
+ },
266
+ children: /* @__PURE__ */ jsx(
267
+ TriggerSVG,
268
+ {
269
+ width: RIGHT_PANEL_TRIGGER.WIDTH,
270
+ height: RIGHT_PANEL_TRIGGER.HEIGHT,
271
+ isOpen,
272
+ isProcessing,
273
+ isLight
274
+ }
275
+ )
276
+ }
277
+ ) });
278
+ }
279
+ var { MIN_WIDTH, MAX_WIDTH, WIDTH_STEP } = RIGHT_PANEL_DEFAULTS;
280
+ function snapToStep(value) {
281
+ return Math.round(value / WIDTH_STEP) * WIDTH_STEP;
282
+ }
283
+ function clampWidth(raw) {
284
+ const clamped = Math.max(MIN_WIDTH, Math.min(MAX_WIDTH, raw));
285
+ return snapToStep(clamped);
286
+ }
287
+ var SLIDE_TRANSITION = "transform 0.3s cubic-bezier(0.16, 1, 0.3, 1)";
288
+ var PANEL_SHADOW_STYLE = {
289
+ boxShadow: [
290
+ "light-dark(0 0 20px rgba(0,0,0,0.1), 0 0 24px rgba(0,0,0,0.75))",
291
+ "light-dark(0 0 60px rgba(0,0,0,0.05), 0 0 80px rgba(0,0,0,0.65))",
292
+ "light-dark(0 0 120px rgba(0,0,0,0.04), 0 0 160px rgba(0,0,0,0.46))",
293
+ "light-dark(-4px 0 16px rgba(0,0,0,0.01), -8px 0 40px rgba(0,0,0,0.5))"
294
+ ].join(", ")
295
+ };
296
+ function RightPanelLayer({ views, isProcessing = false, sidebar, sidebarWidth = 0 }) {
297
+ const { isOpen, isMinimized, hasBeenOpened, width, activeViewId, setActiveView, setWidth } = useRightPanel();
298
+ const ctx = useRightPanelContext();
299
+ const { isMobile } = useMobileRightPanel();
300
+ const [isResizing, setIsResizing] = useState(false);
301
+ const availableViews = useMemo(
302
+ () => views.filter((v) => !v.isAvailable || v.isAvailable(ctx)),
303
+ // ctx changes identity often; stringify to detect real changes
304
+ // eslint-disable-next-line react-hooks/exhaustive-deps
305
+ [views, JSON.stringify(ctx)]
306
+ );
307
+ const activeView = useMemo(
308
+ () => availableViews.find((v) => v.id === activeViewId) ?? availableViews[0],
309
+ [activeViewId, availableViews]
310
+ );
311
+ useEffect(() => {
312
+ if (activeView && activeView.id !== activeViewId) {
313
+ setActiveView(activeView.id);
314
+ }
315
+ }, [activeView, activeViewId, setActiveView]);
316
+ const saveTimerRef = useRef(null);
317
+ const persistWidth = useCallback((w) => {
318
+ if (saveTimerRef.current) clearTimeout(saveTimerRef.current);
319
+ saveTimerRef.current = setTimeout(() => {
320
+ try {
321
+ localStorage.setItem(ASSISTANT_PANEL_WIDTH_KEY, String(w));
322
+ } catch {
323
+ }
324
+ }, 300);
325
+ }, []);
326
+ const handleResizeDrag = useCallback(
327
+ (deltaX, startWidth) => {
328
+ setIsResizing(true);
329
+ const newWidth = clampWidth(startWidth - deltaX);
330
+ setWidth(newWidth);
331
+ persistWidth(newWidth);
332
+ },
333
+ [setWidth, persistWidth]
334
+ );
335
+ const handleResizeEnd = useCallback(() => {
336
+ setIsResizing(false);
337
+ }, []);
338
+ if (isMobile) {
339
+ const ActiveComponent = activeView?.component;
340
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
341
+ /* @__PURE__ */ jsx(RightPanelTrigger, { isProcessing }),
342
+ isOpen && !isMinimized && ActiveComponent && /* @__PURE__ */ jsx(ActiveComponent, {})
343
+ ] });
344
+ }
345
+ const panelVisible = isOpen && !isMinimized;
346
+ const armWidth = RIGHT_PANEL_TRIGGER.ARM_WIDTH;
347
+ const totalPanelWidth = width + (sidebar ? sidebarWidth : 0);
348
+ const transition = isResizing ? "none" : SLIDE_TRANSITION;
349
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
350
+ /* @__PURE__ */ jsx(
351
+ "div",
352
+ {
353
+ style: {
354
+ position: "fixed",
355
+ top: "10vh",
356
+ right: 10,
357
+ height: "80vh",
358
+ zIndex: RIGHT_PANEL_Z_INDEX.TRIGGER,
359
+ display: "flex",
360
+ alignItems: "center",
361
+ transform: panelVisible ? `translateX(-${totalPanelWidth + armWidth}px)` : "translateX(0)",
362
+ transition
363
+ },
364
+ children: /* @__PURE__ */ jsx(RightPanelTrigger, { onResizeDrag: handleResizeDrag, onResizeEnd: handleResizeEnd, isProcessing })
365
+ }
366
+ ),
367
+ /* @__PURE__ */ jsxs(
368
+ "div",
369
+ {
370
+ style: {
371
+ position: "fixed",
372
+ top: "10vh",
373
+ right: 0,
374
+ height: "80vh",
375
+ zIndex: RIGHT_PANEL_Z_INDEX.PANEL,
376
+ display: "flex",
377
+ flexDirection: "row",
378
+ alignItems: "stretch",
379
+ transform: panelVisible ? "translateX(0)" : `translateX(${totalPanelWidth + armWidth}px)`,
380
+ transition,
381
+ pointerEvents: panelVisible ? "auto" : "none"
382
+ },
383
+ children: [
384
+ /* @__PURE__ */ jsxs(
385
+ "div",
386
+ {
387
+ style: {
388
+ ...PANEL_SHADOW_STYLE,
389
+ display: "flex",
390
+ height: "100%",
391
+ borderRadius: "var(--mantine-radius-default)"
392
+ },
393
+ children: [
394
+ sidebar && /* @__PURE__ */ jsx(
395
+ "div",
396
+ {
397
+ style: {
398
+ width: sidebarWidth,
399
+ height: "100%",
400
+ flexShrink: 0,
401
+ overflow: "hidden",
402
+ transition: "width 0.25s cubic-bezier(0.16, 1, 0.3, 1)"
403
+ },
404
+ children: sidebar({
405
+ views: availableViews,
406
+ activeViewId: activeView?.id ?? activeViewId,
407
+ onSelectView: setActiveView
408
+ })
409
+ }
410
+ ),
411
+ /* @__PURE__ */ jsx("div", { style: { width, height: "100%", flexShrink: 0 }, children: hasBeenOpened && availableViews.map((view) => {
412
+ const Component = view.component;
413
+ const isActive = view.id === activeView?.id;
414
+ if (!view.alwaysMount && !isActive) return null;
415
+ return /* @__PURE__ */ jsx("div", { style: { width: "100%", height: "100%", display: isActive ? "block" : "none" }, children: /* @__PURE__ */ jsx(Component, {}) }, view.id);
416
+ }) })
417
+ ]
418
+ }
419
+ ),
420
+ /* @__PURE__ */ jsx(MountingArm, { width: armWidth, isProcessing: panelVisible && isProcessing })
421
+ ]
422
+ }
423
+ )
424
+ ] });
425
+ }
426
+ function MountingArm({ width, isProcessing }) {
427
+ return /* @__PURE__ */ jsxs(
428
+ "div",
429
+ {
430
+ style: {
431
+ display: "flex",
432
+ flexDirection: "column",
433
+ justifyContent: "center",
434
+ width,
435
+ flexShrink: 0,
436
+ pointerEvents: "none",
437
+ gap: 12
438
+ },
439
+ children: [
440
+ /* @__PURE__ */ jsx(MountingRail, { width, isProcessing, railId: "top" }),
441
+ /* @__PURE__ */ jsx(MountingRail, { width, isProcessing, railId: "bottom" })
442
+ ]
443
+ }
444
+ );
445
+ }
446
+ function MountingRail({ width, isProcessing, railId }) {
447
+ const h = 16;
448
+ return /* @__PURE__ */ jsxs(
449
+ "svg",
450
+ {
451
+ width,
452
+ height: h,
453
+ viewBox: `0 0 ${width} ${h}`,
454
+ fill: "none",
455
+ xmlns: "http://www.w3.org/2000/svg",
456
+ style: { display: "block", overflow: "visible" },
457
+ children: [
458
+ /* @__PURE__ */ jsxs("defs", { children: [
459
+ /* @__PURE__ */ jsxs("linearGradient", { id: "rp-metalPipe", x1: "0", y1: "0", x2: "0", y2: "1", children: [
460
+ /* @__PURE__ */ jsx(
461
+ "stop",
462
+ {
463
+ offset: "0%",
464
+ stopColor: "light-dark(color-mix(in srgb, var(--color-primary) 25%, #aaa), color-mix(in srgb, var(--color-primary) 20%, var(--color-border)))"
465
+ }
466
+ ),
467
+ /* @__PURE__ */ jsx(
468
+ "stop",
469
+ {
470
+ offset: "40%",
471
+ stopColor: "light-dark(color-mix(in srgb, var(--color-primary) 15%, #aaa), color-mix(in srgb, var(--color-primary) 10%, var(--color-border)))"
472
+ }
473
+ ),
474
+ /* @__PURE__ */ jsx(
475
+ "stop",
476
+ {
477
+ offset: "60%",
478
+ stopColor: "light-dark(color-mix(in srgb, var(--color-primary) 12%, #aaa), color-mix(in srgb, var(--color-primary) 6%, var(--color-border)))"
479
+ }
480
+ ),
481
+ /* @__PURE__ */ jsx(
482
+ "stop",
483
+ {
484
+ offset: "100%",
485
+ stopColor: "light-dark(color-mix(in srgb, var(--color-primary) 20%, #aaa), color-mix(in srgb, var(--color-primary) 14%, var(--color-border)))"
486
+ }
487
+ )
488
+ ] }),
489
+ /* @__PURE__ */ jsxs("linearGradient", { id: "rp-lightBar", x1: "0", y1: "0", x2: "1", y2: "0", children: [
490
+ /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "var(--color-primary)", stopOpacity: "0.3" }),
491
+ /* @__PURE__ */ jsx("stop", { offset: "30%", stopColor: "var(--color-primary)", stopOpacity: "0.7" }),
492
+ /* @__PURE__ */ jsx("stop", { offset: "70%", stopColor: "var(--color-primary)", stopOpacity: "0.7" }),
493
+ /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "var(--color-primary)", stopOpacity: "0.2" })
494
+ ] }),
495
+ /* @__PURE__ */ jsxs("filter", { id: "rp-lightGlow", children: [
496
+ /* @__PURE__ */ jsx("feGaussianBlur", { stdDeviation: "1.2", result: "blur" }),
497
+ /* @__PURE__ */ jsxs("feMerge", { children: [
498
+ /* @__PURE__ */ jsx("feMergeNode", { in: "blur" }),
499
+ /* @__PURE__ */ jsx("feMergeNode", { in: "SourceGraphic" })
500
+ ] })
501
+ ] })
502
+ ] }),
503
+ /* @__PURE__ */ jsx("rect", { x: "0", y: "2", width: "3", height: "12", rx: "0.5", fill: "url(#rp-metalPipe)", opacity: "0.8" }),
504
+ /* @__PURE__ */ jsx("rect", { x: "2", y: "4", width: "2", height: "8", rx: "0.5", fill: "url(#rp-metalPipe)", opacity: "0.65" }),
505
+ /* @__PURE__ */ jsx(
506
+ "circle",
507
+ {
508
+ cx: "1.5",
509
+ cy: "5",
510
+ r: "0.7",
511
+ fill: "color-mix(in srgb, var(--color-primary) 25%, var(--color-border))",
512
+ opacity: "0.6"
513
+ }
514
+ ),
515
+ /* @__PURE__ */ jsx(
516
+ "circle",
517
+ {
518
+ cx: "1.5",
519
+ cy: "11",
520
+ r: "0.7",
521
+ fill: "color-mix(in srgb, var(--color-primary) 25%, var(--color-border))",
522
+ opacity: "0.6"
523
+ }
524
+ ),
525
+ /* @__PURE__ */ jsx("rect", { x: "4", y: "4", width: width - 9, height: "8", rx: "3", fill: "url(#rp-metalPipe)", opacity: "0.7" }),
526
+ /* @__PURE__ */ jsx("rect", { x: "5", y: "5.5", width: width - 11, height: "5", rx: "2", fill: "rgba(0,0,0,0.3)" }),
527
+ /* @__PURE__ */ jsx("rect", { x: "6", y: "6.5", width: width - 13, height: "3", rx: "1.5", fill: "url(#rp-lightBar)", filter: "url(#rp-lightGlow)" }),
528
+ isProcessing && /* @__PURE__ */ jsxs("g", { children: [
529
+ /* @__PURE__ */ jsxs("radialGradient", { id: `rp-energyGlow-${railId}`, cx: "50%", cy: "50%", rx: "50%", ry: "50%", children: [
530
+ /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "var(--color-primary)", stopOpacity: "1" }),
531
+ /* @__PURE__ */ jsx("stop", { offset: "40%", stopColor: "var(--color-primary)", stopOpacity: "0.7" }),
532
+ /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "var(--color-primary)", stopOpacity: "0" })
533
+ ] }),
534
+ /* @__PURE__ */ jsxs("filter", { id: `rp-energyBlur-${railId}`, children: [
535
+ /* @__PURE__ */ jsx("feGaussianBlur", { stdDeviation: "1", result: "blur" }),
536
+ /* @__PURE__ */ jsxs("feMerge", { children: [
537
+ /* @__PURE__ */ jsx("feMergeNode", { in: "blur" }),
538
+ /* @__PURE__ */ jsx("feMergeNode", { in: "SourceGraphic" })
539
+ ] })
540
+ ] }),
541
+ /* @__PURE__ */ jsx("clipPath", { id: `rp-pipeClip-${railId}`, children: /* @__PURE__ */ jsx("rect", { x: "5", y: "4", width: width - 11, height: "8", rx: "3" }) }),
542
+ /* @__PURE__ */ jsx("g", { clipPath: `url(#rp-pipeClip-${railId})`, children: /* @__PURE__ */ jsx(
543
+ "ellipse",
544
+ {
545
+ cx: width + 10,
546
+ cy: h / 2,
547
+ rx: "10",
548
+ ry: "2",
549
+ fill: `url(#rp-energyGlow-${railId})`,
550
+ filter: `url(#rp-energyBlur-${railId})`,
551
+ style: {
552
+ animation: "rp-energySweep 1.5s ease-in-out infinite",
553
+ "--sweep-distance": `${-(width + 20)}px`
554
+ }
555
+ }
556
+ ) })
557
+ ] }),
558
+ /* @__PURE__ */ jsxs("g", { opacity: "0.75", children: [
559
+ /* @__PURE__ */ jsx(
560
+ "circle",
561
+ {
562
+ cx: width / 2,
563
+ cy: h / 2,
564
+ r: "3.5",
565
+ fill: "color-mix(in srgb, var(--color-primary) 12%, var(--color-border))"
566
+ }
567
+ ),
568
+ /* @__PURE__ */ jsx("circle", { cx: width / 2, cy: h / 2, r: "2.5", fill: "rgba(0,0,0,0.25)" }),
569
+ /* @__PURE__ */ jsx(
570
+ "circle",
571
+ {
572
+ cx: width / 2,
573
+ cy: h / 2,
574
+ r: "1.2",
575
+ fill: "color-mix(in srgb, var(--color-primary) 30%, var(--color-border))"
576
+ }
577
+ ),
578
+ /* @__PURE__ */ jsx(
579
+ "circle",
580
+ {
581
+ cx: width / 2 - 0.3,
582
+ cy: h / 2 - 0.3,
583
+ r: "0.5",
584
+ fill: "color-mix(in srgb, var(--color-primary) 50%, white)",
585
+ opacity: "0.4"
586
+ }
587
+ )
588
+ ] }),
589
+ /* @__PURE__ */ jsx("rect", { x: width - 5, y: "1", width: "5", height: "14", rx: "1", fill: "url(#rp-metalPipe)", opacity: "0.8" }),
590
+ /* @__PURE__ */ jsx("line", { x1: width - 4, y1: "3", x2: width - 4, y2: "13", stroke: "rgba(0,0,0,0.15)", strokeWidth: "0.5" }),
591
+ /* @__PURE__ */ jsx("line", { x1: width - 2, y1: "3", x2: width - 2, y2: "13", stroke: "rgba(0,0,0,0.15)", strokeWidth: "0.5" }),
592
+ /* @__PURE__ */ jsx(
593
+ "circle",
594
+ {
595
+ cx: width - 2.5,
596
+ cy: "4",
597
+ r: "0.8",
598
+ fill: "color-mix(in srgb, var(--color-primary) 20%, var(--color-border))",
599
+ opacity: "0.5"
600
+ }
601
+ ),
602
+ /* @__PURE__ */ jsx(
603
+ "circle",
604
+ {
605
+ cx: width - 2.5,
606
+ cy: "12",
607
+ r: "0.8",
608
+ fill: "color-mix(in srgb, var(--color-primary) 20%, var(--color-border))",
609
+ opacity: "0.5"
610
+ }
611
+ )
612
+ ]
613
+ }
614
+ );
615
+ }
616
+ function useRightPanelKeyboardShortcut(enabled = true) {
617
+ const { isOpen, isMinimized, open, close, restore } = useRightPanel();
618
+ useEffect(() => {
619
+ if (!enabled) return;
620
+ const handler = (e) => {
621
+ if (!((e.metaKey || e.ctrlKey) && e.key === " ")) return;
622
+ const target = e.target;
623
+ if (target && (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.isContentEditable)) {
624
+ return;
625
+ }
626
+ e.preventDefault();
627
+ if (isOpen && isMinimized) {
628
+ restore();
629
+ } else if (isOpen) {
630
+ close();
631
+ } else {
632
+ open();
633
+ }
634
+ };
635
+ window.addEventListener("keydown", handler);
636
+ return () => window.removeEventListener("keydown", handler);
637
+ }, [enabled, isOpen, isMinimized, open, close, restore]);
638
+ }
639
+
640
+ export { ASSISTANT_PANEL_WIDTH_KEY, RIGHT_PANEL_DEFAULTS, RIGHT_PANEL_DEFAULT_VIEW_ID, RIGHT_PANEL_HISTORY_COLLAPSED_WIDTH, RIGHT_PANEL_HISTORY_WIDTH, RIGHT_PANEL_MOBILE_BREAKPOINT, RIGHT_PANEL_TRIGGER, RIGHT_PANEL_Z_INDEX, RightPanelLayer, RightPanelProvider, RightPanelTrigger, useMobileRightPanel, useRightPanel, useRightPanelContext, useRightPanelKeyboardShortcut };
@@ -1,5 +1,6 @@
1
- export { SEOSidebar, SEOSidebarMiddle, SEOSidebarTop, seoManifest } from '../../chunk-GX6XBRRF.js';
2
- import '../../chunk-R3VCBZDC.js';
1
+ export { SEOSidebar, SEOSidebarMiddle, SEOSidebarTop, seoManifest } from '../../chunk-TYRUKGGD.js';
2
+ import '../../chunk-X4WBGKJQ.js';
3
+ import '../../chunk-IIMU5YAJ.js';
3
4
  import '../../chunk-DT3QYZVU.js';
4
5
  import '../../chunk-2IFYDILW.js';
5
6
  import '../../chunk-Q7DJKLEN.js';