@elevasis/ui 2.40.1 → 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 (92) hide show
  1. package/dist/api/index.js +4 -6
  2. package/dist/app/index.css +384 -0
  3. package/dist/app/index.d.ts +108 -0
  4. package/dist/app/index.js +17 -27
  5. package/dist/auth/index.css +659 -0
  6. package/dist/auth/index.js +19 -6
  7. package/dist/charts/index.css +533 -0
  8. package/dist/charts/index.js +18 -15
  9. package/dist/{chunk-RXH4D6TY.js → chunk-5M4HSHQ5.js} +631 -2
  10. package/dist/{chunk-TE4P6OSJ.js → chunk-7FJI76OH.js} +1 -1
  11. package/dist/chunk-GMXGDO3I.js +244 -0
  12. package/dist/{chunk-CXY7FMUM.js → chunk-GUKY77FJ.js} +50 -4
  13. package/dist/{chunk-5JYKCULK.js → chunk-NZ2F5RQ4.js} +44 -2
  14. package/dist/{chunk-WF7CONXF.js → chunk-OJJK27GC.js} +658 -6
  15. package/dist/{chunk-RX6RSKWC.js → chunk-QDXTIQT4.js} +29255 -18312
  16. package/dist/{chunk-73EWE2EW.js → chunk-V5HWC5EW.js} +1 -1
  17. package/dist/components/chat/index.js +1 -2
  18. package/dist/components/index.css +149 -149
  19. package/dist/components/index.js +13 -37
  20. package/dist/components/navigation/index.css +659 -0
  21. package/dist/components/navigation/index.js +25 -4
  22. package/dist/features/auth/index.js +14 -38
  23. package/dist/features/clients/index.css +149 -149
  24. package/dist/features/clients/index.js +13 -37
  25. package/dist/features/crm/index.js +13 -37
  26. package/dist/features/dashboard/index.js +13 -37
  27. package/dist/features/delivery/index.js +13 -37
  28. package/dist/features/knowledge/index.css +659 -0
  29. package/dist/features/knowledge/index.js +25 -248
  30. package/dist/features/lead-gen/index.d.ts +81 -0
  31. package/dist/features/lead-gen/index.js +13 -37
  32. package/dist/features/monitoring/index.js +13 -37
  33. package/dist/features/monitoring/requests/index.d.ts +69 -7
  34. package/dist/features/monitoring/requests/index.js +32 -41
  35. package/dist/features/operations/index.d.ts +79 -0
  36. package/dist/features/operations/index.js +13 -37
  37. package/dist/features/seo/index.js +1 -4
  38. package/dist/features/settings/index.js +13 -37
  39. package/dist/hooks/access/index.css +659 -0
  40. package/dist/hooks/access/index.js +19 -5
  41. package/dist/hooks/delivery/index.js +13 -37
  42. package/dist/hooks/index.d.ts +18 -6
  43. package/dist/hooks/index.js +13 -37
  44. package/dist/hooks/published.d.ts +18 -6
  45. package/dist/hooks/published.js +13 -37
  46. package/dist/index.d.ts +151 -7
  47. package/dist/index.js +14 -38
  48. package/dist/initialization/index.js +1 -1
  49. package/dist/knowledge/index.css +659 -0
  50. package/dist/knowledge/index.d.ts +81 -0
  51. package/dist/knowledge/index.js +25 -15
  52. package/dist/layout/index.css +659 -0
  53. package/dist/layout/index.d.ts +18 -2
  54. package/dist/layout/index.js +24 -7
  55. package/dist/organization/index.js +13 -37
  56. package/dist/provider/index.css +384 -0
  57. package/dist/provider/index.d.ts +120 -1
  58. package/dist/provider/index.js +18 -22
  59. package/dist/provider/published.css +533 -0
  60. package/dist/provider/published.d.ts +121 -2
  61. package/dist/provider/published.js +18 -17
  62. package/dist/test-utils/index.js +4 -6
  63. package/dist/theme/index.js +2 -5
  64. package/dist/theme/presets/index.js +1 -2
  65. package/dist/utils/index.js +1 -3
  66. package/package.json +3 -3
  67. package/dist/chunk-3KMDHCAR.js +0 -52
  68. package/dist/chunk-4DRI3G36.js +0 -1016
  69. package/dist/chunk-5EYJ2GIN.js +0 -122
  70. package/dist/chunk-66U7JOWV.js +0 -425
  71. package/dist/chunk-6D4LCJ52.js +0 -10
  72. package/dist/chunk-6EV47QQW.js +0 -340
  73. package/dist/chunk-6ROXVZ3L.js +0 -9
  74. package/dist/chunk-7MTWRSUZ.js +0 -357
  75. package/dist/chunk-7PHY5ONQ.js +0 -85
  76. package/dist/chunk-B2DZLPDL.js +0 -39
  77. package/dist/chunk-CLDCYJQT.js +0 -1
  78. package/dist/chunk-CTJBPF3Z.js +0 -734
  79. package/dist/chunk-DT3QYZVU.js +0 -23
  80. package/dist/chunk-IIMU5YAJ.js +0 -53
  81. package/dist/chunk-IUQAP4IO.js +0 -2131
  82. package/dist/chunk-J3FLIZY4.js +0 -423
  83. package/dist/chunk-K7GKKETO.js +0 -3157
  84. package/dist/chunk-L7GXUSCV.js +0 -215
  85. package/dist/chunk-LJDYY3XB.js +0 -133
  86. package/dist/chunk-NYBEU5TE.js +0 -118
  87. package/dist/chunk-RH5VWWSC.js +0 -624
  88. package/dist/chunk-SJNIOGVX.js +0 -112
  89. package/dist/chunk-TYRUKGGD.js +0 -46
  90. package/dist/chunk-WLOQ4IBG.js +0 -654
  91. package/dist/chunk-X4WBGKJQ.js +0 -138
  92. package/dist/chunk-X7D6SUKR.js +0 -1234
@@ -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 };