@elevasis/ui 2.41.0 → 2.41.1

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 (80) hide show
  1. package/dist/api/index.js +4 -6
  2. package/dist/app/index.css +384 -0
  3. package/dist/app/index.js +17 -26
  4. package/dist/auth/index.css +659 -0
  5. package/dist/auth/index.js +19 -5
  6. package/dist/charts/index.css +533 -0
  7. package/dist/charts/index.js +18 -14
  8. package/dist/{chunk-RXH4D6TY.js → chunk-5M4HSHQ5.js} +631 -2
  9. package/dist/{chunk-TE4P6OSJ.js → chunk-7FJI76OH.js} +1 -1
  10. package/dist/chunk-GMXGDO3I.js +244 -0
  11. package/dist/{chunk-CXY7FMUM.js → chunk-GUKY77FJ.js} +50 -4
  12. package/dist/{chunk-5JYKCULK.js → chunk-NZ2F5RQ4.js} +44 -2
  13. package/dist/{chunk-WF7CONXF.js → chunk-OJJK27GC.js} +658 -6
  14. package/dist/{chunk-JAN2ZXN5.js → chunk-QDXTIQT4.js} +29307 -18446
  15. package/dist/{chunk-73EWE2EW.js → chunk-V5HWC5EW.js} +1 -1
  16. package/dist/components/chat/index.js +1 -2
  17. package/dist/components/index.css +149 -149
  18. package/dist/components/index.js +13 -36
  19. package/dist/components/navigation/index.css +659 -0
  20. package/dist/components/navigation/index.js +25 -3
  21. package/dist/features/auth/index.js +14 -37
  22. package/dist/features/clients/index.css +149 -149
  23. package/dist/features/clients/index.js +13 -36
  24. package/dist/features/crm/index.js +13 -36
  25. package/dist/features/dashboard/index.js +13 -36
  26. package/dist/features/delivery/index.js +13 -36
  27. package/dist/features/knowledge/index.css +659 -0
  28. package/dist/features/knowledge/index.js +25 -247
  29. package/dist/features/lead-gen/index.js +13 -36
  30. package/dist/features/monitoring/index.js +13 -36
  31. package/dist/features/monitoring/requests/index.js +19 -149
  32. package/dist/features/operations/index.js +13 -36
  33. package/dist/features/seo/index.js +1 -4
  34. package/dist/features/settings/index.js +13 -36
  35. package/dist/hooks/access/index.css +659 -0
  36. package/dist/hooks/access/index.js +19 -4
  37. package/dist/hooks/delivery/index.js +13 -36
  38. package/dist/hooks/index.js +13 -36
  39. package/dist/hooks/published.js +13 -36
  40. package/dist/index.js +14 -37
  41. package/dist/initialization/index.js +1 -1
  42. package/dist/knowledge/index.css +659 -0
  43. package/dist/knowledge/index.js +25 -15
  44. package/dist/layout/index.css +659 -0
  45. package/dist/layout/index.js +24 -9
  46. package/dist/organization/index.js +13 -36
  47. package/dist/provider/index.css +384 -0
  48. package/dist/provider/index.js +18 -21
  49. package/dist/provider/published.css +533 -0
  50. package/dist/provider/published.js +18 -16
  51. package/dist/test-utils/index.js +4 -6
  52. package/dist/theme/index.js +2 -5
  53. package/dist/theme/presets/index.js +1 -2
  54. package/dist/utils/index.js +1 -3
  55. package/package.json +4 -4
  56. package/dist/chunk-3KMDHCAR.js +0 -52
  57. package/dist/chunk-4DRI3G36.js +0 -1016
  58. package/dist/chunk-56O7QQE7.js +0 -356
  59. package/dist/chunk-5EYJ2GIN.js +0 -122
  60. package/dist/chunk-66U7JOWV.js +0 -425
  61. package/dist/chunk-6D4LCJ52.js +0 -10
  62. package/dist/chunk-6ROXVZ3L.js +0 -9
  63. package/dist/chunk-A2XN6PR2.js +0 -111
  64. package/dist/chunk-B2DZLPDL.js +0 -39
  65. package/dist/chunk-CLDCYJQT.js +0 -1
  66. package/dist/chunk-CTJBPF3Z.js +0 -734
  67. package/dist/chunk-DT3QYZVU.js +0 -23
  68. package/dist/chunk-FIMGOWOT.js +0 -3644
  69. package/dist/chunk-IIMU5YAJ.js +0 -53
  70. package/dist/chunk-JHVEA5NE.js +0 -133
  71. package/dist/chunk-L7GXUSCV.js +0 -215
  72. package/dist/chunk-NYBEU5TE.js +0 -118
  73. package/dist/chunk-QVQMOQXB.js +0 -1240
  74. package/dist/chunk-RH5VWWSC.js +0 -624
  75. package/dist/chunk-S4R2ZQS7.js +0 -2131
  76. package/dist/chunk-TYRUKGGD.js +0 -46
  77. package/dist/chunk-VAAU2Z3S.js +0 -85
  78. package/dist/chunk-WLOQ4IBG.js +0 -654
  79. package/dist/chunk-X4WBGKJQ.js +0 -138
  80. package/dist/chunk-YPWN2WQ3.js +0 -340
@@ -0,0 +1,244 @@
1
+ import { useRouterContext } from './chunk-Q7DJKLEN.js';
2
+ import { UnstyledButton, Box, Group, ThemeIcon, Stack, Text } from '@mantine/core';
3
+ import { IconSearch, IconChartBar, IconTrendingUp } from '@tabler/icons-react';
4
+ import { jsx, jsxs } from 'react/jsx-runtime';
5
+
6
+ // src/components/layout/constants.ts
7
+ var sidebarWidth = 240;
8
+ var sidebarCollapsedWidth = 72;
9
+ var sidebarTransitionDuration = 200;
10
+ var sidebarHoverDelay = 100;
11
+ var topbarHeight = 54;
12
+ var sidebarBottomSectionHeight = 71;
13
+ var sidebarBottomSectionCollapsedHeight = 59;
14
+ var sidebarItemHeight = 42;
15
+ var sidebarItemPadding = 10;
16
+ var sidebarItemGap = 4;
17
+ var sidebarSectionPadding = "var(--mantine-spacing-sm)";
18
+ var sidebarSubLinkIndent = 44;
19
+ var sidebarIconSize = 24;
20
+ var sidebarIconStroke = 1.6;
21
+ var sidebarIconInnerSize = 20;
22
+ var sidebarToggleIconSize = 20;
23
+ var sidebarSubLinkPaddingY = 6;
24
+ var sidebarSubLinkPaddingX = 10;
25
+ var sidebarGroupChevronSize = 14;
26
+ var subshellNavItemIconSize = 14;
27
+ var activeColor = "var(--color-primary)";
28
+ var defaultColor = "var(--color-text-subtle)";
29
+ var hoverColor = "var(--color-text)";
30
+ var activeBg = `color-mix(in srgb, ${activeColor} 10%, transparent)`;
31
+ var SubshellNavItem = ({
32
+ icon: Icon,
33
+ label,
34
+ isActive = false,
35
+ onClick,
36
+ description,
37
+ badge,
38
+ disabled = false,
39
+ href
40
+ }) => {
41
+ const handleAnchorClick = disabled ? void 0 : (event) => {
42
+ if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || event.button !== 0) {
43
+ return;
44
+ }
45
+ event.preventDefault();
46
+ onClick();
47
+ };
48
+ const sharedStyle = {
49
+ width: "100%",
50
+ padding: "var(--mantine-spacing-xs)",
51
+ backgroundColor: isActive ? activeBg : "transparent",
52
+ borderRadius: "var(--mantine-radius-default)",
53
+ transition: `all var(--duration-fast) var(--easing)`,
54
+ cursor: disabled ? "not-allowed" : "pointer",
55
+ opacity: disabled ? 0.5 : 1,
56
+ color: "inherit",
57
+ textDecoration: "none",
58
+ display: "block"
59
+ };
60
+ const handleMouseEnter = (e) => {
61
+ if (!isActive && !disabled) {
62
+ e.currentTarget.style.backgroundColor = "var(--color-surface-hover)";
63
+ const textElements = e.currentTarget.querySelectorAll("[data-text-element]");
64
+ textElements.forEach((el) => {
65
+ el.style.color = hoverColor;
66
+ });
67
+ }
68
+ };
69
+ const handleMouseLeave = (e) => {
70
+ if (!isActive && !disabled) {
71
+ e.currentTarget.style.backgroundColor = "transparent";
72
+ const textElements = e.currentTarget.querySelectorAll("[data-text-element]");
73
+ textElements.forEach((el) => {
74
+ el.style.color = defaultColor;
75
+ });
76
+ }
77
+ };
78
+ const inner = /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
79
+ /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
80
+ /* @__PURE__ */ jsx(
81
+ Icon,
82
+ {
83
+ size: subshellNavItemIconSize,
84
+ style: {
85
+ flexShrink: 0,
86
+ opacity: isActive ? 1 : 0.6,
87
+ color: isActive ? activeColor : defaultColor
88
+ }
89
+ }
90
+ ),
91
+ /* @__PURE__ */ jsx(
92
+ Text,
93
+ {
94
+ size: "sm",
95
+ fw: isActive ? 600 : 400,
96
+ style: {
97
+ overflow: "hidden",
98
+ textOverflow: "ellipsis",
99
+ whiteSpace: "nowrap",
100
+ flex: 1,
101
+ fontFamily: "var(--elevasis-font-family-subtitle)",
102
+ color: isActive ? activeColor : defaultColor,
103
+ transition: `color var(--duration-fast) var(--easing)`
104
+ },
105
+ "data-text-element": true,
106
+ children: label
107
+ }
108
+ ),
109
+ badge && /* @__PURE__ */ jsx("div", { style: { flexShrink: 0 }, children: badge })
110
+ ] }),
111
+ description && /* @__PURE__ */ jsx(
112
+ Text,
113
+ {
114
+ size: "xs",
115
+ c: "dimmed",
116
+ style: {
117
+ paddingLeft: "22px",
118
+ lineHeight: 1.2,
119
+ color: isActive ? activeColor : defaultColor,
120
+ opacity: isActive ? 0.8 : 0.6,
121
+ transition: `all var(--duration-fast) var(--easing)`,
122
+ display: "-webkit-box",
123
+ WebkitLineClamp: 2,
124
+ WebkitBoxOrient: "vertical",
125
+ overflow: "hidden",
126
+ textOverflow: "ellipsis"
127
+ },
128
+ "data-text-element": true,
129
+ children: description
130
+ }
131
+ )
132
+ ] });
133
+ if (href) {
134
+ return /* @__PURE__ */ jsx(
135
+ UnstyledButton,
136
+ {
137
+ component: "a",
138
+ href,
139
+ onClick: handleAnchorClick,
140
+ style: sharedStyle,
141
+ onMouseEnter: handleMouseEnter,
142
+ onMouseLeave: handleMouseLeave,
143
+ children: inner
144
+ }
145
+ );
146
+ }
147
+ return /* @__PURE__ */ jsx(
148
+ UnstyledButton,
149
+ {
150
+ onClick: disabled ? void 0 : onClick,
151
+ disabled,
152
+ style: sharedStyle,
153
+ onMouseEnter: handleMouseEnter,
154
+ onMouseLeave: handleMouseLeave,
155
+ children: inner
156
+ }
157
+ );
158
+ };
159
+ var SubshellSidebarSection = ({
160
+ icon: Icon,
161
+ label,
162
+ rightSection,
163
+ withTopBorder = false
164
+ }) => {
165
+ return /* @__PURE__ */ jsx(
166
+ Box,
167
+ {
168
+ p: "sm",
169
+ style: {
170
+ borderTop: withTopBorder ? "1px solid var(--color-border)" : void 0,
171
+ borderBottom: "1px solid var(--color-border)"
172
+ },
173
+ children: /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
174
+ /* @__PURE__ */ jsx(
175
+ ThemeIcon,
176
+ {
177
+ variant: "light",
178
+ size: sidebarIconSize,
179
+ style: {
180
+ backgroundColor: "var(--color-surface)",
181
+ color: "var(--color-primary)",
182
+ flexShrink: 0
183
+ },
184
+ children: /* @__PURE__ */ jsx(Icon, { size: sidebarIconInnerSize, stroke: sidebarIconStroke })
185
+ }
186
+ ),
187
+ /* @__PURE__ */ jsx(
188
+ Box,
189
+ {
190
+ c: "var(--color-text)",
191
+ style: {
192
+ fontFamily: "var(--elevasis-font-family-subtitle)",
193
+ flex: 1,
194
+ fontSize: "var(--mantine-font-size-md)",
195
+ fontWeight: 500,
196
+ lineHeight: 1.2
197
+ },
198
+ children: label
199
+ }
200
+ ),
201
+ rightSection
202
+ ] })
203
+ }
204
+ );
205
+ };
206
+ var SEOSidebarTop = () => {
207
+ return /* @__PURE__ */ jsx(SubshellSidebarSection, { icon: IconSearch, label: "SEO" });
208
+ };
209
+ var NAV_ITEMS = [
210
+ { label: "SEO Pages", to: "/seo", icon: IconChartBar, exact: true },
211
+ { label: "Metrics", to: "/seo/metrics", icon: IconTrendingUp, exact: false }
212
+ ];
213
+ var SEOSidebarMiddle = () => {
214
+ const { currentPath, navigate } = useRouterContext();
215
+ return /* @__PURE__ */ jsx(Stack, { gap: "xs", p: "sm", style: { flex: 1, overflowY: "auto" }, children: NAV_ITEMS.map((item) => {
216
+ const isActive = item.exact ? currentPath === item.to || currentPath === `${item.to}/` : currentPath.startsWith(item.to);
217
+ return /* @__PURE__ */ jsx(
218
+ SubshellNavItem,
219
+ {
220
+ icon: item.icon,
221
+ label: item.label,
222
+ isActive,
223
+ href: item.to,
224
+ onClick: () => navigate(item.to)
225
+ },
226
+ item.to
227
+ );
228
+ }) });
229
+ };
230
+ var SEOSidebar = () => {
231
+ return /* @__PURE__ */ jsxs(Stack, { gap: 0, style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
232
+ /* @__PURE__ */ jsx(SEOSidebarTop, {}),
233
+ /* @__PURE__ */ jsx(SEOSidebarMiddle, {})
234
+ ] });
235
+ };
236
+
237
+ // src/features/seo/manifest.ts
238
+ var seoManifest = {
239
+ key: "seo",
240
+ systemId: "seo",
241
+ sidebar: SEOSidebar
242
+ };
243
+
244
+ export { SEOSidebar, SEOSidebarMiddle, SEOSidebarTop, SubshellNavItem, SubshellSidebarSection, seoManifest, sidebarBottomSectionCollapsedHeight, sidebarBottomSectionHeight, sidebarCollapsedWidth, sidebarGroupChevronSize, sidebarHoverDelay, sidebarIconInnerSize, sidebarIconSize, sidebarIconStroke, sidebarItemGap, sidebarItemHeight, sidebarItemPadding, sidebarSectionPadding, sidebarSubLinkIndent, sidebarSubLinkPaddingX, sidebarSubLinkPaddingY, sidebarToggleIconSize, sidebarTransitionDuration, sidebarWidth, subshellNavItemIconSize, topbarHeight };
@@ -1,11 +1,14 @@
1
- import { StyledMarkdown } from './chunk-3KMDHCAR.js';
2
- import { Stack, Textarea, Group, Text, Tooltip, ActionIcon, Paper, Card, Box, Collapse, Title, Badge, Progress, Alert, Center, Loader } from '@mantine/core';
3
- import { jsx, jsxs } from 'react/jsx-runtime';
1
+ import { Stack, Textarea, Group, Text, Tooltip, ActionIcon, Paper, Card, Box, Collapse, Code, Title, Badge, Progress, Alert, Center, Loader } from '@mantine/core';
2
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
3
  import { memo, useState, useCallback, useMemo, useRef, useEffect } from 'react';
5
4
  import { IconSend, IconCheck, IconCopy, IconChevronDown, IconAlertCircle, IconAlertTriangle } from '@tabler/icons-react';
6
5
  import { useClipboard } from '@mantine/hooks';
7
6
  import JSONPrettyRaw from 'react-json-pretty';
7
+ import Markdown from 'react-markdown';
8
+ import { Prism } from 'react-syntax-highlighter';
9
+ import { oneDark } from 'react-syntax-highlighter/dist/esm/styles/prism';
8
10
 
11
+ // src/components/chat/ChatSidebar.tsx
9
12
  function ChatSidebar({ isOpen, title = "Details", children, width = 320, zIndex = 10 }) {
10
13
  return /* @__PURE__ */ jsxs(
11
14
  Paper,
@@ -182,6 +185,49 @@ var ChatInputArea = memo(function ChatInputArea2({
182
185
  }
183
186
  ) });
184
187
  });
188
+ var customCodeTheme = Object.fromEntries(
189
+ Object.entries(oneDark).map(([key, value]) => [
190
+ key,
191
+ typeof value === "object" && value !== null ? { ...value, background: "none", backgroundColor: "none" } : value
192
+ ])
193
+ );
194
+ var defaultComponents = {
195
+ h1: ({ children }) => /* @__PURE__ */ jsx(Title, { order: 3, c: "var(--color-primary)", mb: "xs", mt: "md", children }),
196
+ h2: ({ children }) => /* @__PURE__ */ jsx(Title, { order: 4, c: "var(--color-primary)", mb: "xs", mt: "sm", children }),
197
+ ul: ({ children }) => /* @__PURE__ */ jsx("ul", { style: { margin: "0.5rem 0", paddingLeft: "1.5rem" }, children }),
198
+ ol: ({ children }) => /* @__PURE__ */ jsx("ol", { style: { margin: "0.5rem 0", paddingLeft: "1.5rem" }, children }),
199
+ li: ({ children }) => /* @__PURE__ */ jsx("li", { style: { marginBottom: "0.25rem", fontSize: "var(--mantine-font-size-sm)" }, children }),
200
+ code: ({ className, children, ...props }) => {
201
+ const match = /language-(\w+)/.exec(className || "");
202
+ const codeString = String(children).replace(/\n$/, "");
203
+ if (match) {
204
+ return /* @__PURE__ */ jsx(
205
+ Prism,
206
+ {
207
+ style: customCodeTheme,
208
+ language: match[1],
209
+ PreTag: "div",
210
+ customStyle: {
211
+ margin: "0.5rem 0",
212
+ borderRadius: "var(--mantine-radius-default)",
213
+ fontSize: "0.8rem"
214
+ },
215
+ children: codeString
216
+ }
217
+ );
218
+ }
219
+ return /* @__PURE__ */ jsx(Code, { ...props, children });
220
+ },
221
+ pre: ({ children }) => /* @__PURE__ */ jsx(Fragment, { children }),
222
+ blockquote: ({ children }) => /* @__PURE__ */ jsx(Box, { pl: "sm", my: "xs", style: { borderLeft: "2px solid var(--color-border)" }, children }),
223
+ p: ({ children }) => /* @__PURE__ */ jsx(Text, { size: "sm", m: 0, children }),
224
+ strong: ({ children }) => /* @__PURE__ */ jsx(Text, { component: "span", fw: 700, children }),
225
+ em: ({ children }) => /* @__PURE__ */ jsx(Text, { component: "span", fs: "italic", children })
226
+ };
227
+ function StyledMarkdown({ children, components, className, style }) {
228
+ const mergedComponents = components ? { ...defaultComponents, ...components } : defaultComponents;
229
+ return /* @__PURE__ */ jsx("div", { className, style, children: /* @__PURE__ */ jsx(Markdown, { components: mergedComponents, children }) });
230
+ }
185
231
  var JSONPretty = JSONPrettyRaw;
186
232
  var jsonTheme = {
187
233
  main: "line-height:1.3;color:var(--color-text);background:transparent;overflow:auto;",
@@ -680,4 +726,4 @@ function ScrollableContainer({
680
726
  );
681
727
  }
682
728
 
683
- export { ChatHeader, ChatInputArea, ChatInterface, ChatSidebar, MessageBubble, ProcessingIndicator };
729
+ export { ChatHeader, ChatInputArea, ChatInterface, ChatSidebar, MessageBubble, ProcessingIndicator, StyledMarkdown };
@@ -1,5 +1,6 @@
1
- import { getPreset, generateShades } from './chunk-WF7CONXF.js';
1
+ import { PRESETS, getPreset, generateShades } from './chunk-OJJK27GC.js';
2
2
  import { Tooltip, Tree, Text, TagsInput, Tabs, Table, Stack, SimpleGrid, Select, Combobox, SegmentedControl, ScrollArea, Paper, Popover, Notification, MultiSelect, Modal, Menu, Input, HoverCard, Group, Grid, Flex, Drawer, Code, Divider, Card, Button, Accordion, createTheme } from '@mantine/core';
3
+ import { createContext, useContext, useMemo } from 'react';
3
4
 
4
5
  // src/theme/cssVariables.ts
5
6
  var TOKEN_VAR_MAP = {
@@ -417,6 +418,8 @@ var componentThemes = {
417
418
  })
418
419
  // Pagination styles are in custom.css to support :not([data-active]) selector
419
420
  };
421
+
422
+ // src/theme/MantineThemeOverride.ts
420
423
  var mantineThemeOverride = createTheme({
421
424
  defaultRadius: "xs",
422
425
  fontFamily: 'Roboto, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
@@ -444,5 +447,44 @@ var mantineThemeOverride = createTheme({
444
447
  },
445
448
  components: componentThemes
446
449
  });
450
+ var PresetsContext = createContext(PRESETS);
451
+ var PresetsProvider = PresetsContext.Provider;
452
+ function usePresetsContext() {
453
+ return useContext(PresetsContext);
454
+ }
455
+ var BUILT_IN_NAMES = /* @__PURE__ */ new Set([
456
+ "default",
457
+ "tactical",
458
+ "regal",
459
+ "cyber-volt",
460
+ "aurora",
461
+ "rose-gold",
462
+ "midnight",
463
+ "titanium",
464
+ "obsidian",
465
+ "honey",
466
+ "abyss",
467
+ "canopy",
468
+ "slate",
469
+ "cyber-strike",
470
+ "cyber-chrome",
471
+ "cyber-void",
472
+ "quarry"
473
+ ]);
474
+ function titleCase(str) {
475
+ return str.replace(/(^|-)(\w)/g, (_, sep, char) => (sep ? " " : "") + char.toUpperCase());
476
+ }
477
+ function useAvailablePresets() {
478
+ const presetsMap = usePresetsContext();
479
+ return useMemo(() => {
480
+ return Object.entries(presetsMap).map(([key, preset]) => ({
481
+ value: key,
482
+ label: preset.label ?? titleCase(key),
483
+ description: preset.description ?? "",
484
+ colors: preset.colors ?? [preset.dark.primary, preset.dark.background, preset.light.background],
485
+ isCustom: !BUILT_IN_NAMES.has(key)
486
+ }));
487
+ }, [presetsMap]);
488
+ }
447
489
 
448
- export { TOKEN_VAR_MAP, componentThemes, createCssVariablesResolver, glassBase, mantineThemeOverride };
490
+ export { PresetsProvider, TOKEN_VAR_MAP, componentThemes, createCssVariablesResolver, glassBase, mantineThemeOverride, useAvailablePresets, usePresetsContext };