@elevasis/ui 2.25.4 → 2.25.6
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.
- package/dist/app/index.css +2 -6
- package/dist/app/index.d.ts +63 -56
- package/dist/app/index.js +3 -2
- package/dist/charts/index.js +1 -1
- package/dist/chunk-5RLYII6P.js +314 -0
- package/dist/chunk-6U7AIIHF.js +880 -0
- package/dist/{chunk-5O5VC4HB.js → chunk-7F3IQMLI.js} +1 -1
- package/dist/{chunk-ZBRRVDYJ.js → chunk-ARJPZ66V.js} +42 -760
- package/dist/{chunk-IS53MXE4.js → chunk-BDKM56TP.js} +1 -1
- package/dist/{chunk-FVXM2MN6.js → chunk-C7IBFI5B.js} +1 -1
- package/dist/{chunk-DUUH3CHC.js → chunk-CPAJXBTL.js} +10 -6
- package/dist/{chunk-3FBCFSDF.js → chunk-ECNNI3NT.js} +2 -1
- package/dist/chunk-HAEJ4M54.js +94 -0
- package/dist/{chunk-7RPH2VXV.js → chunk-JXSBOG2R.js} +1 -1
- package/dist/{chunk-E7WTCAVX.js → chunk-KNISO652.js} +2 -2
- package/dist/{chunk-5PLAJ6IS.js → chunk-L7D6KNHV.js} +457 -335
- package/dist/{chunk-JMI7L7Y7.js → chunk-LPM7O6XM.js} +2 -233
- package/dist/{chunk-2XWXFT2Z.js → chunk-QARSVM7Q.js} +1 -1
- package/dist/{chunk-FYT6LYJP.js → chunk-SBQ4MYQV.js} +3 -2
- package/dist/{chunk-MU4VPAMR.js → chunk-YRKQNPK2.js} +1 -1
- package/dist/components/index.css +2 -6
- package/dist/components/index.d.ts +11 -2
- package/dist/components/index.js +25 -23
- package/dist/components/navigation/index.css +2 -6
- package/dist/features/auth/index.css +2 -6
- package/dist/features/crm/index.css +2 -6
- package/dist/features/crm/index.js +9 -8
- package/dist/features/dashboard/index.css +2 -6
- package/dist/features/dashboard/index.js +9 -8
- package/dist/features/delivery/index.css +2 -6
- package/dist/features/delivery/index.js +10 -9
- package/dist/features/knowledge/index.d.ts +33 -0
- package/dist/features/knowledge/index.js +406 -0
- package/dist/features/lead-gen/index.css +2 -6
- package/dist/features/lead-gen/index.d.ts +158 -151
- package/dist/features/lead-gen/index.js +10 -9
- package/dist/features/monitoring/index.css +2 -6
- package/dist/features/monitoring/index.js +10 -9
- package/dist/features/monitoring/requests/index.css +2 -6
- package/dist/features/monitoring/requests/index.js +8 -7
- package/dist/features/operations/index.css +2 -6
- package/dist/features/operations/index.js +15 -13
- package/dist/features/settings/index.css +2 -6
- package/dist/features/settings/index.js +9 -8
- package/dist/hooks/delivery/index.css +2 -6
- package/dist/hooks/index.css +2 -6
- package/dist/hooks/index.d.ts +14 -3
- package/dist/hooks/index.js +8 -7
- package/dist/hooks/published.css +2 -6
- package/dist/hooks/published.d.ts +14 -3
- package/dist/hooks/published.js +8 -7
- package/dist/index.css +2 -6
- package/dist/index.d.ts +611 -593
- package/dist/index.js +8 -7
- package/dist/knowledge/index.d.ts +643 -0
- package/dist/knowledge/index.js +496 -0
- package/dist/organization/index.css +2 -6
- package/dist/provider/index.css +2 -6
- package/dist/provider/index.d.ts +346 -339
- package/dist/provider/index.js +6 -5
- package/dist/provider/published.css +2 -6
- package/dist/provider/published.d.ts +346 -339
- package/dist/provider/published.js +5 -4
- package/dist/vite-plugin-knowledge/index.d.ts +37 -0
- package/dist/vite-plugin-knowledge/index.js +67 -0
- package/package.json +45 -33
- package/src/knowledge/README.md +31 -0
- package/dist/{chunk-U2KJXTTV.js → chunk-TAIX4NO3.js} +1 -1
|
@@ -0,0 +1,496 @@
|
|
|
1
|
+
import { governs, governedBy } from '../chunk-HAEJ4M54.js';
|
|
2
|
+
export { KnowledgeTree } from '../chunk-HAEJ4M54.js';
|
|
3
|
+
import { SubshellNavItem } from '../chunk-X4WBGKJQ.js';
|
|
4
|
+
import { SubshellSidebarSection } from '../chunk-IIMU5YAJ.js';
|
|
5
|
+
import '../chunk-2IFYDILW.js';
|
|
6
|
+
import { useRouterContext } from '../chunk-Q7DJKLEN.js';
|
|
7
|
+
import '../chunk-DT3QYZVU.js';
|
|
8
|
+
import '../chunk-I2KLQ2HA.js';
|
|
9
|
+
import { createContext, Children, isValidElement, cloneElement, useMemo, useContext, useState, useRef, useEffect } from 'react';
|
|
10
|
+
import { Stack, Text, UnstyledButton, Group, Badge, Card, SimpleGrid, Alert, Tabs, Title, Divider, Box, TextInput } from '@mantine/core';
|
|
11
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
12
|
+
import { IconBook, IconX, IconSearch, IconCircleX, IconAlertTriangle, IconInfoCircle } from '@tabler/icons-react';
|
|
13
|
+
|
|
14
|
+
var KIND_COLORS = {
|
|
15
|
+
playbook: "blue",
|
|
16
|
+
strategy: "violet",
|
|
17
|
+
reference: "gray"
|
|
18
|
+
};
|
|
19
|
+
function KnowledgeNodeList({ nodes, onSelect, selectedNodeId, label }) {
|
|
20
|
+
if (nodes.length === 0) {
|
|
21
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "xs", style: { padding: "var(--mantine-spacing-md)" }, children: [
|
|
22
|
+
label && /* @__PURE__ */ jsx(Text, { size: "xs", fw: 600, tt: "uppercase", c: "dimmed", style: { letterSpacing: "0.05em" }, children: label }),
|
|
23
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "No knowledge nodes found." })
|
|
24
|
+
] });
|
|
25
|
+
}
|
|
26
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: 4, style: { padding: "var(--mantine-spacing-sm)" }, children: [
|
|
27
|
+
label && /* @__PURE__ */ jsx(
|
|
28
|
+
Text,
|
|
29
|
+
{
|
|
30
|
+
size: "xs",
|
|
31
|
+
fw: 600,
|
|
32
|
+
tt: "uppercase",
|
|
33
|
+
c: "dimmed",
|
|
34
|
+
style: { letterSpacing: "0.05em", paddingBottom: "var(--mantine-spacing-xs)" },
|
|
35
|
+
children: label
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
nodes.map((node) => {
|
|
39
|
+
const isActive = node.id === selectedNodeId;
|
|
40
|
+
return /* @__PURE__ */ jsx(
|
|
41
|
+
UnstyledButton,
|
|
42
|
+
{
|
|
43
|
+
onClick: () => onSelect(node),
|
|
44
|
+
style: {
|
|
45
|
+
padding: "var(--mantine-spacing-sm)",
|
|
46
|
+
borderRadius: "var(--mantine-radius-default)",
|
|
47
|
+
backgroundColor: isActive ? "color-mix(in srgb, var(--color-primary) 10%, transparent)" : "transparent",
|
|
48
|
+
border: isActive ? "1px solid color-mix(in srgb, var(--color-primary) 25%, transparent)" : "1px solid transparent",
|
|
49
|
+
transition: `all var(--duration-fast) var(--easing)`,
|
|
50
|
+
cursor: "pointer",
|
|
51
|
+
width: "100%",
|
|
52
|
+
textAlign: "left"
|
|
53
|
+
},
|
|
54
|
+
onMouseEnter: (e) => {
|
|
55
|
+
if (!isActive) {
|
|
56
|
+
e.currentTarget.style.backgroundColor = "var(--color-surface-hover)";
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
onMouseLeave: (e) => {
|
|
60
|
+
if (!isActive) {
|
|
61
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
children: /* @__PURE__ */ jsxs(Stack, { gap: 4, children: [
|
|
65
|
+
/* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
|
|
66
|
+
/* @__PURE__ */ jsx(
|
|
67
|
+
Text,
|
|
68
|
+
{
|
|
69
|
+
size: "sm",
|
|
70
|
+
fw: isActive ? 600 : 400,
|
|
71
|
+
style: {
|
|
72
|
+
flex: 1,
|
|
73
|
+
overflow: "hidden",
|
|
74
|
+
textOverflow: "ellipsis",
|
|
75
|
+
whiteSpace: "nowrap",
|
|
76
|
+
color: isActive ? "var(--color-primary)" : "var(--color-text)"
|
|
77
|
+
},
|
|
78
|
+
children: node.title
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: KIND_COLORS[node.kind], style: { flexShrink: 0 }, children: node.kind })
|
|
82
|
+
] }),
|
|
83
|
+
/* @__PURE__ */ jsx(
|
|
84
|
+
Text,
|
|
85
|
+
{
|
|
86
|
+
size: "xs",
|
|
87
|
+
c: "dimmed",
|
|
88
|
+
style: {
|
|
89
|
+
overflow: "hidden",
|
|
90
|
+
display: "-webkit-box",
|
|
91
|
+
WebkitLineClamp: 2,
|
|
92
|
+
WebkitBoxOrient: "vertical",
|
|
93
|
+
textOverflow: "ellipsis"
|
|
94
|
+
},
|
|
95
|
+
children: node.summary
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
] })
|
|
99
|
+
},
|
|
100
|
+
node.id
|
|
101
|
+
);
|
|
102
|
+
})
|
|
103
|
+
] });
|
|
104
|
+
}
|
|
105
|
+
function makeKnowledgeComponent(fnBody) {
|
|
106
|
+
const factory = new Function(fnBody);
|
|
107
|
+
return function KnowledgeBody(props) {
|
|
108
|
+
const runtime = { Fragment, jsx: jsx, jsxs: jsxs, ...props };
|
|
109
|
+
const mod = factory(runtime);
|
|
110
|
+
const Content = mod.default;
|
|
111
|
+
return Content ? jsx(Content, {}) : null;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
var KNOWLEDGE_BODIES = {
|
|
115
|
+
"knowledge.outreach-playbook": makeKnowledgeComponent('"use strict";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n h2: "h2",\n li: "li",\n ol: "ol",\n p: "p",\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.h2, {\n children: "Overview"\n }), "\\n", _jsx(_components.p, {\n children: "This playbook covers the end-to-end process for launching a cold outreach campaign using the Elevasis lead-gen pipeline."\n }), "\\n", _jsx(_components.h2, {\n children: "Steps"\n }), "\\n", _jsxs(_components.ol, {\n children: ["\\n", _jsx(_components.li, {\n children: "Source prospects via the Lead Gen feature."\n }), "\\n", _jsx(_components.li, {\n children: "Review and approve copy in the CRM campaign editor."\n }), "\\n", _jsx(_components.li, {\n children: "Schedule sends using the Task Scheduler."\n }), "\\n", _jsx(_components.li, {\n children: "Monitor replies in the CRM inbox and route to the appropriate deal stage."\n }), "\\n"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = props.components || ({});\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n'),
|
|
116
|
+
"knowledge.lead-gen-strategy": makeKnowledgeComponent('"use strict";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n h2: "h2",\n li: "li",\n p: "p",\n ul: "ul",\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.h2, {\n children: "Strategy"\n }), "\\n", _jsx(_components.p, {\n children: "The lead-gen pipeline targets SMBs with 10-200 employees in recession-resistant verticals (manufacturing, logistics, professional services). Firmographic filters: revenue >$1M, HQ in US/CA/AU, tech stack includes at least one SaaS CRM."\n }), "\\n", _jsx(_components.h2, {\n children: "Scoring Thresholds"\n }), "\\n", _jsxs(_components.ul, {\n children: ["\\n", _jsx(_components.li, {\n children: "High priority: ICP score >= 80"\n }), "\\n", _jsx(_components.li, {\n children: "Medium priority: ICP score 60-79"\n }), "\\n", _jsx(_components.li, {\n children: "Low priority: < 60 (excluded from active outreach)"\n }), "\\n"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = props.components || ({});\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n'),
|
|
117
|
+
"knowledge.org-model-reference": makeKnowledgeComponent('"use strict";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: "code",\n h2: "h2",\n li: "li",\n p: "p",\n ul: "ul",\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.h2, {\n children: "Schema"\n }), "\\n", _jsxs(_components.p, {\n children: ["The ", _jsx(_components.code, {\n children: "OrganizationModel"\n }), " schema is defined in ", _jsx(_components.code, {\n children: "packages/core/src/organization-model/schema.ts"\n }), ". It is versioned at ", _jsx(_components.code, {\n children: "version: 1"\n }), " and composed from domain sub-schemas."]\n }), "\\n", _jsx(_components.h2, {\n children: "Domains"\n }), "\\n", _jsxs(_components.ul, {\n children: ["\\n", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: "features"\n }), " \u2014 flat array of FeatureSchema nodes (nav tree)"]\n }), "\\n", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: "knowledge"\n }), " \u2014 flat array of KnowledgeNodeSchema nodes"]\n }), "\\n", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: "sales"\n }), ", ", _jsx(_components.code, {\n children: "prospecting"\n }), ", ", _jsx(_components.code, {\n children: "projects"\n }), " \u2014 sales and GTM domains"]\n }), "\\n", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: "operations"\n }), ", ", _jsx(_components.code, {\n children: "statuses"\n }), " \u2014 runtime entity domains"]\n }), "\\n", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: "customers"\n }), ", ", _jsx(_components.code, {\n children: "offerings"\n }), ", ", _jsx(_components.code, {\n children: "roles"\n }), ", ", _jsx(_components.code, {\n children: "goals"\n }), " \u2014 business context domains"]\n }), "\\n"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = props.components || ({});\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n'),
|
|
118
|
+
"knowledge.seo-lead-gen-playbook": makeKnowledgeComponent('"use strict";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n h2: "h2",\n li: "li",\n ol: "ol",\n p: "p",\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.h2, {\n children: "Overview"\n }), "\\n", _jsx(_components.p, {\n children: "This playbook governs the handoff from SEO-sourced traffic to the lead-gen pipeline."\n }), "\\n", _jsx(_components.h2, {\n children: "Steps"\n }), "\\n", _jsxs(_components.ol, {\n children: ["\\n", _jsx(_components.li, {\n children: "SEO feature captures visitor signal (form fill or intent data)."\n }), "\\n", _jsx(_components.li, {\n children: "Score the lead using the standard ICP scoring thresholds."\n }), "\\n", _jsx(_components.li, {\n children: "If score >= 60, inject into the lead-gen prospect list."\n }), "\\n", _jsx(_components.li, {\n children: "Assign to the appropriate outreach campaign in the CRM."\n }), "\\n"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = props.components || ({});\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n')
|
|
119
|
+
};
|
|
120
|
+
function KnowledgeCard({ title, children }) {
|
|
121
|
+
return /* @__PURE__ */ jsxs(
|
|
122
|
+
Card,
|
|
123
|
+
{
|
|
124
|
+
withBorder: true,
|
|
125
|
+
padding: "md",
|
|
126
|
+
radius: "md",
|
|
127
|
+
style: {
|
|
128
|
+
backgroundColor: "var(--color-surface)",
|
|
129
|
+
borderColor: "var(--color-border)",
|
|
130
|
+
marginBottom: "var(--mantine-spacing-sm)"
|
|
131
|
+
},
|
|
132
|
+
children: [
|
|
133
|
+
title && /* @__PURE__ */ jsx(Text, { fw: 600, size: "sm", mb: "xs", style: { color: "var(--color-text)" }, children: title }),
|
|
134
|
+
children
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
function KnowledgeCards({ cols = 2, children }) {
|
|
140
|
+
return /* @__PURE__ */ jsx(SimpleGrid, { cols, spacing: "sm", style: { marginBottom: "var(--mantine-spacing-sm)" }, children });
|
|
141
|
+
}
|
|
142
|
+
function KnowledgeStep({ step, title, children }) {
|
|
143
|
+
return /* @__PURE__ */ jsxs(Group, { align: "flex-start", gap: "sm", wrap: "nowrap", style: { marginBottom: "var(--mantine-spacing-sm)" }, children: [
|
|
144
|
+
step !== void 0 && /* @__PURE__ */ jsx(
|
|
145
|
+
Text,
|
|
146
|
+
{
|
|
147
|
+
fw: 700,
|
|
148
|
+
size: "sm",
|
|
149
|
+
style: {
|
|
150
|
+
minWidth: 24,
|
|
151
|
+
height: 24,
|
|
152
|
+
lineHeight: "24px",
|
|
153
|
+
textAlign: "center",
|
|
154
|
+
borderRadius: "50%",
|
|
155
|
+
backgroundColor: "var(--color-primary)",
|
|
156
|
+
color: "#fff",
|
|
157
|
+
flexShrink: 0
|
|
158
|
+
},
|
|
159
|
+
children: step
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
/* @__PURE__ */ jsxs(Stack, { gap: 4, style: { flex: 1 }, children: [
|
|
163
|
+
title && /* @__PURE__ */ jsx(Text, { fw: 600, size: "sm", style: { color: "var(--color-text)" }, children: title }),
|
|
164
|
+
children
|
|
165
|
+
] })
|
|
166
|
+
] });
|
|
167
|
+
}
|
|
168
|
+
function KnowledgeSteps({ children }) {
|
|
169
|
+
let counter = 0;
|
|
170
|
+
const numberedChildren = Children.map(children, (child) => {
|
|
171
|
+
if (!isValidElement(child)) return child;
|
|
172
|
+
counter += 1;
|
|
173
|
+
const props = child.props;
|
|
174
|
+
if (props.step === void 0) {
|
|
175
|
+
return cloneElement(child, { step: counter });
|
|
176
|
+
}
|
|
177
|
+
return child;
|
|
178
|
+
});
|
|
179
|
+
return /* @__PURE__ */ jsx(Stack, { gap: 0, style: { marginBottom: "var(--mantine-spacing-sm)" }, children: numberedChildren });
|
|
180
|
+
}
|
|
181
|
+
var VARIANT_COLOR = {
|
|
182
|
+
info: "blue",
|
|
183
|
+
warn: "yellow",
|
|
184
|
+
error: "red"
|
|
185
|
+
};
|
|
186
|
+
var VARIANT_ICON = {
|
|
187
|
+
info: /* @__PURE__ */ jsx(IconInfoCircle, { size: 16 }),
|
|
188
|
+
warn: /* @__PURE__ */ jsx(IconAlertTriangle, { size: 16 }),
|
|
189
|
+
error: /* @__PURE__ */ jsx(IconCircleX, { size: 16 })
|
|
190
|
+
};
|
|
191
|
+
function KnowledgeCallout({ variant = "info", title, children }) {
|
|
192
|
+
return /* @__PURE__ */ jsx(
|
|
193
|
+
Alert,
|
|
194
|
+
{
|
|
195
|
+
variant: "light",
|
|
196
|
+
color: VARIANT_COLOR[variant],
|
|
197
|
+
icon: VARIANT_ICON[variant],
|
|
198
|
+
title,
|
|
199
|
+
style: { marginBottom: "var(--mantine-spacing-sm)" },
|
|
200
|
+
children
|
|
201
|
+
}
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
function KnowledgeTab({ label, value, children }) {
|
|
205
|
+
const key = value ?? label;
|
|
206
|
+
return /* @__PURE__ */ jsx(Tabs.Panel, { value: key, children });
|
|
207
|
+
}
|
|
208
|
+
function KnowledgeTabs({ defaultValue, children }) {
|
|
209
|
+
const tabs = [];
|
|
210
|
+
Children.forEach(children, (child) => {
|
|
211
|
+
if (!isValidElement(child)) return;
|
|
212
|
+
const props = child.props;
|
|
213
|
+
if (props.label) {
|
|
214
|
+
tabs.push({ label: props.label, value: props.value ?? props.label });
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
const first = defaultValue ?? tabs[0]?.value;
|
|
218
|
+
return /* @__PURE__ */ jsxs(Tabs, { defaultValue: first, style: { marginBottom: "var(--mantine-spacing-sm)" }, children: [
|
|
219
|
+
/* @__PURE__ */ jsx(Tabs.List, { children: tabs.map(({ label, value }) => /* @__PURE__ */ jsx(Tabs.Tab, { value, children: label }, value)) }),
|
|
220
|
+
children
|
|
221
|
+
] });
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// src/knowledge/components/allowlist.ts
|
|
225
|
+
var KNOWLEDGE_ALLOWLIST = {
|
|
226
|
+
Card: KnowledgeCard,
|
|
227
|
+
Cards: KnowledgeCards,
|
|
228
|
+
Step: KnowledgeStep,
|
|
229
|
+
Steps: KnowledgeSteps,
|
|
230
|
+
Callout: KnowledgeCallout,
|
|
231
|
+
Tab: KnowledgeTab,
|
|
232
|
+
Tabs: KnowledgeTabs
|
|
233
|
+
};
|
|
234
|
+
var KnowledgeAllowlistContext = createContext(null);
|
|
235
|
+
function KnowledgeMDXProvider({ extraComponents, children }) {
|
|
236
|
+
const merged = useMemo(
|
|
237
|
+
() => ({ ...KNOWLEDGE_ALLOWLIST, ...extraComponents }),
|
|
238
|
+
[extraComponents]
|
|
239
|
+
);
|
|
240
|
+
return /* @__PURE__ */ jsx(KnowledgeAllowlistContext.Provider, { value: merged, children });
|
|
241
|
+
}
|
|
242
|
+
function useKnowledgeAllowlist() {
|
|
243
|
+
const ctx = useContext(KnowledgeAllowlistContext);
|
|
244
|
+
if (ctx === null) {
|
|
245
|
+
throw new Error(
|
|
246
|
+
"useKnowledgeAllowlist must be called inside a KnowledgeMDXProvider. Wrap the relevant subtree with <KnowledgeMDXProvider>."
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
return ctx;
|
|
250
|
+
}
|
|
251
|
+
var KIND_COLORS2 = {
|
|
252
|
+
playbook: "blue",
|
|
253
|
+
strategy: "violet",
|
|
254
|
+
reference: "gray"
|
|
255
|
+
};
|
|
256
|
+
function KnowledgeBodyRenderer({ nodeId }) {
|
|
257
|
+
const components = useKnowledgeAllowlist();
|
|
258
|
+
const Body = KNOWLEDGE_BODIES[nodeId];
|
|
259
|
+
if (!Body) {
|
|
260
|
+
return /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", fs: "italic", children: "No body content available for this node." });
|
|
261
|
+
}
|
|
262
|
+
return /* @__PURE__ */ jsx(Body, { components });
|
|
263
|
+
}
|
|
264
|
+
function EdgeSidecar({ graph, nodeId, onNavigateToNode }) {
|
|
265
|
+
const outgoing = governs(graph, nodeId);
|
|
266
|
+
const incoming = governedBy(graph, nodeId);
|
|
267
|
+
if (outgoing.length === 0 && incoming.length === 0) return null;
|
|
268
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
269
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
270
|
+
/* @__PURE__ */ jsx(Text, { size: "xs", fw: 600, tt: "uppercase", c: "dimmed", style: { letterSpacing: "0.05em" }, children: "Graph Edges" }),
|
|
271
|
+
outgoing.length > 0 && /* @__PURE__ */ jsxs(Stack, { gap: 4, children: [
|
|
272
|
+
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", fw: 500, children: [
|
|
273
|
+
"Governs (",
|
|
274
|
+
outgoing.length,
|
|
275
|
+
")"
|
|
276
|
+
] }),
|
|
277
|
+
outgoing.map((targetId) => /* @__PURE__ */ jsx(
|
|
278
|
+
EdgeChip,
|
|
279
|
+
{
|
|
280
|
+
id: targetId,
|
|
281
|
+
onClick: onNavigateToNode ? () => onNavigateToNode(targetId) : void 0
|
|
282
|
+
},
|
|
283
|
+
targetId
|
|
284
|
+
))
|
|
285
|
+
] }),
|
|
286
|
+
incoming.length > 0 && /* @__PURE__ */ jsxs(Stack, { gap: 4, children: [
|
|
287
|
+
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", fw: 500, children: [
|
|
288
|
+
"Governed by (",
|
|
289
|
+
incoming.length,
|
|
290
|
+
")"
|
|
291
|
+
] }),
|
|
292
|
+
incoming.map((sourceId) => /* @__PURE__ */ jsx(
|
|
293
|
+
EdgeChip,
|
|
294
|
+
{
|
|
295
|
+
id: sourceId,
|
|
296
|
+
onClick: onNavigateToNode ? () => onNavigateToNode(sourceId) : void 0
|
|
297
|
+
},
|
|
298
|
+
sourceId
|
|
299
|
+
))
|
|
300
|
+
] })
|
|
301
|
+
] });
|
|
302
|
+
}
|
|
303
|
+
function EdgeChip({ id, onClick }) {
|
|
304
|
+
return /* @__PURE__ */ jsx(
|
|
305
|
+
Box,
|
|
306
|
+
{
|
|
307
|
+
component: onClick ? "button" : "div",
|
|
308
|
+
onClick,
|
|
309
|
+
style: {
|
|
310
|
+
display: "inline-flex",
|
|
311
|
+
alignItems: "center",
|
|
312
|
+
padding: "2px 8px",
|
|
313
|
+
borderRadius: "var(--mantine-radius-sm)",
|
|
314
|
+
backgroundColor: "var(--color-surface)",
|
|
315
|
+
border: "1px solid var(--color-border)",
|
|
316
|
+
fontSize: "var(--mantine-font-size-xs)",
|
|
317
|
+
color: onClick ? "var(--color-primary)" : "var(--color-text-subtle)",
|
|
318
|
+
cursor: onClick ? "pointer" : "default",
|
|
319
|
+
fontFamily: "var(--mantine-font-family-monospace)",
|
|
320
|
+
width: "fit-content",
|
|
321
|
+
background: "none"
|
|
322
|
+
},
|
|
323
|
+
children: id
|
|
324
|
+
}
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
function KnowledgeNodeView({ node, graph, onNavigateToNode, extraComponents }) {
|
|
328
|
+
return /* @__PURE__ */ jsx(KnowledgeMDXProvider, { extraComponents, children: /* @__PURE__ */ jsxs(Stack, { gap: "md", style: { padding: "var(--mantine-spacing-md)", maxWidth: "760px" }, children: [
|
|
329
|
+
/* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
330
|
+
/* @__PURE__ */ jsxs(Group, { gap: "xs", align: "flex-start", children: [
|
|
331
|
+
/* @__PURE__ */ jsx(Title, { order: 3, style: { flex: 1, color: "var(--color-text)" }, children: node.title }),
|
|
332
|
+
/* @__PURE__ */ jsx(Badge, { size: "sm", variant: "light", color: KIND_COLORS2[node.kind], style: { flexShrink: 0, marginTop: 4 }, children: node.kind })
|
|
333
|
+
] }),
|
|
334
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", style: { lineHeight: 1.5 }, children: node.summary }),
|
|
335
|
+
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", style: { opacity: 0.7 }, children: [
|
|
336
|
+
"Updated ",
|
|
337
|
+
node.updatedAt
|
|
338
|
+
] })
|
|
339
|
+
] }),
|
|
340
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
341
|
+
/* @__PURE__ */ jsx(
|
|
342
|
+
Box,
|
|
343
|
+
{
|
|
344
|
+
style: {
|
|
345
|
+
fontSize: "var(--mantine-font-size-sm)",
|
|
346
|
+
lineHeight: 1.7,
|
|
347
|
+
color: "var(--color-text)"
|
|
348
|
+
},
|
|
349
|
+
children: /* @__PURE__ */ jsx(KnowledgeBodyRenderer, { nodeId: node.id })
|
|
350
|
+
}
|
|
351
|
+
),
|
|
352
|
+
/* @__PURE__ */ jsx(EdgeSidecar, { graph, nodeId: node.id, onNavigateToNode })
|
|
353
|
+
] }) });
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
// src/knowledge/_generated/knowledge-search-index.json
|
|
357
|
+
var knowledge_search_index_default = [
|
|
358
|
+
{
|
|
359
|
+
id: "knowledge.outreach-playbook",
|
|
360
|
+
title: "Outreach Sequence Playbook",
|
|
361
|
+
summary: "Step-by-step runbook for launching a cold outreach campaign: prospect sourcing, copy review, sending schedule, and reply handling.",
|
|
362
|
+
bodyText: "Overview\n\nThis playbook covers the end-to-end process for launching a cold outreach campaign using the Elevasis lead-gen pipeline.\n\nSteps\n\n1. Source prospects via the Lead Gen feature.\n2. Review and approve copy in the CRM campaign editor.\n3. Schedule sends using the Task Scheduler.\n4. Monitor replies in the CRM inbox and route to the appropriate deal stage."
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
id: "knowledge.lead-gen-strategy",
|
|
366
|
+
title: "Lead Gen Targeting Strategy",
|
|
367
|
+
summary: "Defines ICP signal prioritization, firmographic filters, and scoring thresholds used by the lead-gen pipeline.",
|
|
368
|
+
bodyText: "Strategy\n\nThe lead-gen pipeline targets SMBs with 10-200 employees in recession-resistant verticals (manufacturing, logistics, professional services). Firmographic filters: revenue \\>$1M, HQ in US/CA/AU, tech stack includes at least one SaaS CRM.\n\nScoring Thresholds\n\n- High priority: ICP score \\>= 80\n- Medium priority: ICP score 60-79\n- Low priority: \\< 60 (excluded from active outreach)"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
id: "knowledge.org-model-reference",
|
|
372
|
+
title: "Organization Model Schema Reference",
|
|
373
|
+
summary: "Technical reference for the OrganizationModel Zod schema: all domains, field contracts, and versioning rules.",
|
|
374
|
+
bodyText: "Schema\n\nThe OrganizationModel schema is defined in packages/core/src/organization-model/schema.ts. It is versioned at version: 1 and composed from domain sub-schemas.\n\nDomains\n\n- features \u2014 flat array of FeatureSchema nodes (nav tree)\n- knowledge \u2014 flat array of KnowledgeNodeSchema nodes\n- sales, prospecting, projects \u2014 sales and GTM domains\n- operations, statuses \u2014 runtime entity domains\n- customers, offerings, roles, goals \u2014 business context domains"
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
id: "knowledge.seo-lead-gen-playbook",
|
|
378
|
+
title: "SEO-to-Lead-Gen Handoff Playbook",
|
|
379
|
+
summary: "Runbook for promoting SEO-qualified prospects into the active lead-gen pipeline: signal capture, scoring override, and campaign assignment.",
|
|
380
|
+
bodyText: "Overview\n\nThis playbook governs the handoff from SEO-sourced traffic to the lead-gen pipeline.\n\nSteps\n\n1. SEO feature captures visitor signal (form fill or intent data).\n2. Score the lead using the standard ICP scoring thresholds.\n3. If score >= 60, inject into the lead-gen prospect list.\n4. Assign to the appropriate outreach campaign in the CRM."
|
|
381
|
+
}
|
|
382
|
+
];
|
|
383
|
+
function buildSearchIndex(entries) {
|
|
384
|
+
return {
|
|
385
|
+
search(query) {
|
|
386
|
+
if (!query.trim()) return [];
|
|
387
|
+
const q = query.trim().toLowerCase();
|
|
388
|
+
const scored = [];
|
|
389
|
+
for (const entry of entries) {
|
|
390
|
+
let score = 0;
|
|
391
|
+
if (entry.title.toLowerCase().includes(q)) score += 3;
|
|
392
|
+
if (entry.summary.toLowerCase().includes(q)) score += 2;
|
|
393
|
+
if (entry.bodyText.toLowerCase().includes(q)) score += 1;
|
|
394
|
+
if (score > 0) scored.push({ id: entry.id, score });
|
|
395
|
+
}
|
|
396
|
+
return scored.sort((a, b) => b.score - a.score).map((s) => s.id);
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
function KnowledgeSearchBar({
|
|
401
|
+
knowledgeNodes,
|
|
402
|
+
onResults,
|
|
403
|
+
placeholder = "Search knowledge\u2026"
|
|
404
|
+
}) {
|
|
405
|
+
const [query, setQuery] = useState("");
|
|
406
|
+
const indexRef = useRef(null);
|
|
407
|
+
useEffect(() => {
|
|
408
|
+
indexRef.current = buildSearchIndex(knowledge_search_index_default);
|
|
409
|
+
}, []);
|
|
410
|
+
const nodeMapRef = useRef(/* @__PURE__ */ new Map());
|
|
411
|
+
useEffect(() => {
|
|
412
|
+
const map = /* @__PURE__ */ new Map();
|
|
413
|
+
for (const node of knowledgeNodes) map.set(node.id, node);
|
|
414
|
+
nodeMapRef.current = map;
|
|
415
|
+
}, [knowledgeNodes]);
|
|
416
|
+
const handleChange = (value) => {
|
|
417
|
+
setQuery(value);
|
|
418
|
+
if (!value.trim()) {
|
|
419
|
+
onResults(null);
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
const ids = indexRef.current?.search(value) ?? [];
|
|
423
|
+
const hits = ids.flatMap((id) => {
|
|
424
|
+
const node = nodeMapRef.current.get(id);
|
|
425
|
+
return node ? [node] : [];
|
|
426
|
+
});
|
|
427
|
+
onResults(hits);
|
|
428
|
+
};
|
|
429
|
+
const handleClear = () => {
|
|
430
|
+
setQuery("");
|
|
431
|
+
onResults(null);
|
|
432
|
+
};
|
|
433
|
+
return /* @__PURE__ */ jsx(
|
|
434
|
+
TextInput,
|
|
435
|
+
{
|
|
436
|
+
value: query,
|
|
437
|
+
onChange: (e) => handleChange(e.currentTarget.value),
|
|
438
|
+
placeholder,
|
|
439
|
+
leftSection: /* @__PURE__ */ jsx(IconSearch, { size: 16 }),
|
|
440
|
+
rightSection: query ? /* @__PURE__ */ jsx(IconX, { size: 14, style: { cursor: "pointer", color: "var(--color-text-subtle)" }, onClick: handleClear }) : null,
|
|
441
|
+
styles: {
|
|
442
|
+
input: {
|
|
443
|
+
backgroundColor: "var(--color-surface)",
|
|
444
|
+
borderColor: "var(--color-border)",
|
|
445
|
+
color: "var(--color-text)"
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
);
|
|
450
|
+
}
|
|
451
|
+
function KnowledgeBrowser({ graph, knowledgeNodes, initialNodeId, onNavigateToNode }) {
|
|
452
|
+
const { navigate } = useRouterContext();
|
|
453
|
+
const selectedNode = useMemo(
|
|
454
|
+
() => initialNodeId ? knowledgeNodes.find((n) => n.id === initialNodeId) ?? null : null,
|
|
455
|
+
[initialNodeId, knowledgeNodes]
|
|
456
|
+
);
|
|
457
|
+
const [searchResults, setSearchResults] = useState(null);
|
|
458
|
+
const handleSelectNode = (node) => {
|
|
459
|
+
navigate(`/knowledge/${node.id}`);
|
|
460
|
+
};
|
|
461
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: "md", style: { flex: 1, minHeight: 0 }, children: [
|
|
462
|
+
/* @__PURE__ */ jsx(KnowledgeSearchBar, { knowledgeNodes, onResults: setSearchResults }),
|
|
463
|
+
/* @__PURE__ */ jsx(Box, { style: { flex: 1, minHeight: 0, overflowY: "auto" }, children: searchResults ? /* @__PURE__ */ jsx(
|
|
464
|
+
KnowledgeNodeList,
|
|
465
|
+
{
|
|
466
|
+
nodes: searchResults,
|
|
467
|
+
onSelect: handleSelectNode,
|
|
468
|
+
selectedNodeId: selectedNode?.id,
|
|
469
|
+
label: `${searchResults.length} result${searchResults.length === 1 ? "" : "s"}`
|
|
470
|
+
}
|
|
471
|
+
) : selectedNode ? /* @__PURE__ */ jsx(KnowledgeNodeView, { node: selectedNode, graph, onNavigateToNode }) : /* @__PURE__ */ jsx(Box, { style: { padding: "var(--mantine-spacing-xl)" }, children: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "Select a knowledge node from the tree to view its details." }) }) })
|
|
472
|
+
] });
|
|
473
|
+
}
|
|
474
|
+
var KNOWLEDGE_ITEMS = [{ label: "Knowledge", to: "/knowledge", icon: IconBook, exact: true }];
|
|
475
|
+
var KnowledgeSidebarMiddle = ({ items = KNOWLEDGE_ITEMS } = {}) => {
|
|
476
|
+
const { currentPath, navigate } = useRouterContext();
|
|
477
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: 0, style: { flex: 1, overflowY: "auto" }, children: [
|
|
478
|
+
/* @__PURE__ */ jsx(SubshellSidebarSection, { icon: IconBook, label: "Knowledge", withTopBorder: false }),
|
|
479
|
+
/* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: items.map((item) => {
|
|
480
|
+
const isActive = item.exact ? currentPath === item.to || currentPath === `${item.to}/` : currentPath.startsWith(item.to);
|
|
481
|
+
return /* @__PURE__ */ jsx(
|
|
482
|
+
SubshellNavItem,
|
|
483
|
+
{
|
|
484
|
+
icon: item.icon,
|
|
485
|
+
label: item.label,
|
|
486
|
+
isActive,
|
|
487
|
+
href: item.to,
|
|
488
|
+
onClick: () => navigate(item.to)
|
|
489
|
+
},
|
|
490
|
+
item.to
|
|
491
|
+
);
|
|
492
|
+
}) })
|
|
493
|
+
] });
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
export { KNOWLEDGE_ALLOWLIST, KNOWLEDGE_BODIES, KNOWLEDGE_ITEMS, KnowledgeBrowser, KnowledgeMDXProvider, KnowledgeNodeList, KnowledgeNodeView, KnowledgeSearchBar, KnowledgeSidebarMiddle, useKnowledgeAllowlist };
|
|
@@ -159,12 +159,8 @@
|
|
|
159
159
|
[data-mantine-color-scheme=dark] .mantine-Tabs-root {
|
|
160
160
|
--tab-border-color: var(--color-border);
|
|
161
161
|
}
|
|
162
|
-
|
|
163
|
-
background-color:
|
|
164
|
-
}
|
|
165
|
-
[data-mantine-color-scheme] .mantine-Tabs-tab[data-active],
|
|
166
|
-
[data-mantine-color-scheme] .mantine-Tabs-tab[data-active]:hover {
|
|
167
|
-
background-color: transparent;
|
|
162
|
+
.mantine-Tabs-tab:hover {
|
|
163
|
+
background-color: var(--color-surface-hover);
|
|
168
164
|
}
|
|
169
165
|
.mantine-Pagination-control:not([data-active]) {
|
|
170
166
|
background: var(--color-surface);
|
package/dist/provider/index.css
CHANGED
|
@@ -543,12 +543,8 @@
|
|
|
543
543
|
[data-mantine-color-scheme=dark] .mantine-Tabs-root {
|
|
544
544
|
--tab-border-color: var(--color-border);
|
|
545
545
|
}
|
|
546
|
-
|
|
547
|
-
background-color:
|
|
548
|
-
}
|
|
549
|
-
[data-mantine-color-scheme] .mantine-Tabs-tab[data-active],
|
|
550
|
-
[data-mantine-color-scheme] .mantine-Tabs-tab[data-active]:hover {
|
|
551
|
-
background-color: transparent;
|
|
546
|
+
.mantine-Tabs-tab:hover {
|
|
547
|
+
background-color: var(--color-surface-hover);
|
|
552
548
|
}
|
|
553
549
|
.mantine-Pagination-control:not([data-active]) {
|
|
554
550
|
background: var(--color-surface);
|