@sero-ai/ui 0.3.2 → 0.4.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 (190) hide show
  1. package/.turbo/turbo-build.log +628 -0
  2. package/.turbo/turbo-typecheck.log +1 -1
  3. package/CHANGELOG.md +38 -0
  4. package/dist/components/context-editor/CapabilitySection.cjs +57 -0
  5. package/dist/components/context-editor/CapabilitySection.d.cts +20 -0
  6. package/dist/components/context-editor/CapabilitySection.d.ts +20 -0
  7. package/dist/components/context-editor/CapabilitySection.js +57 -0
  8. package/dist/components/context-editor/ContextEditor.cjs +108 -0
  9. package/dist/components/context-editor/ContextEditor.d.cts +26 -0
  10. package/dist/components/context-editor/ContextEditor.d.ts +26 -0
  11. package/dist/components/context-editor/ContextEditor.js +108 -0
  12. package/dist/components/context-editor/PresetBar.cjs +71 -0
  13. package/dist/components/context-editor/PresetBar.d.cts +19 -0
  14. package/dist/components/context-editor/PresetBar.d.ts +19 -0
  15. package/dist/components/context-editor/PresetBar.js +71 -0
  16. package/dist/components/context-editor/SkillsSection.cjs +31 -0
  17. package/dist/components/context-editor/SkillsSection.d.cts +14 -0
  18. package/dist/components/context-editor/SkillsSection.d.ts +14 -0
  19. package/dist/components/context-editor/SkillsSection.js +31 -0
  20. package/dist/components/context-editor/SystemPromptSection.cjs +58 -0
  21. package/dist/components/context-editor/SystemPromptSection.d.cts +25 -0
  22. package/dist/components/context-editor/SystemPromptSection.d.ts +25 -0
  23. package/dist/components/context-editor/SystemPromptSection.js +58 -0
  24. package/dist/components/context-editor/ToolsSection.cjs +31 -0
  25. package/dist/components/context-editor/ToolsSection.d.cts +14 -0
  26. package/dist/components/context-editor/ToolsSection.d.ts +14 -0
  27. package/dist/components/context-editor/ToolsSection.js +31 -0
  28. package/dist/components/context-editor/index.cjs +8 -0
  29. package/dist/components/context-editor/index.d.cts +5 -0
  30. package/dist/components/context-editor/index.d.ts +5 -0
  31. package/dist/components/context-editor/index.js +8 -0
  32. package/dist/components/context-editor/parts.cjs +184 -0
  33. package/dist/components/context-editor/parts.d.cts +32 -0
  34. package/dist/components/context-editor/parts.d.ts +32 -0
  35. package/dist/components/context-editor/parts.js +184 -0
  36. package/dist/components/context-editor/use-context-editor-model.cjs +194 -0
  37. package/dist/components/context-editor/use-context-editor-model.d.cts +57 -0
  38. package/dist/components/context-editor/use-context-editor-model.d.ts +57 -0
  39. package/dist/components/context-editor/use-context-editor-model.js +194 -0
  40. package/dist/components/dashboard/activity-list.cjs +59 -0
  41. package/dist/components/dashboard/activity-list.d.cts +27 -0
  42. package/dist/components/dashboard/activity-list.d.ts +27 -0
  43. package/dist/components/dashboard/activity-list.js +59 -0
  44. package/dist/components/dashboard/catalog.cjs +322 -0
  45. package/dist/components/dashboard/catalog.d.cts +14 -0
  46. package/dist/components/dashboard/catalog.d.ts +14 -0
  47. package/dist/components/dashboard/catalog.js +322 -0
  48. package/dist/components/dashboard/data-boundary.cjs +29 -0
  49. package/dist/components/dashboard/data-boundary.d.cts +21 -0
  50. package/dist/components/dashboard/data-boundary.d.ts +21 -0
  51. package/dist/components/dashboard/data-boundary.js +29 -0
  52. package/dist/components/dashboard/empty-state.cjs +49 -0
  53. package/dist/components/dashboard/empty-state.d.cts +20 -0
  54. package/dist/components/dashboard/empty-state.d.ts +20 -0
  55. package/dist/components/dashboard/empty-state.js +49 -0
  56. package/dist/components/dashboard/icon-button.cjs +40 -0
  57. package/dist/components/dashboard/icon-button.d.cts +24 -0
  58. package/dist/components/dashboard/icon-button.d.ts +24 -0
  59. package/dist/components/dashboard/icon-button.js +40 -0
  60. package/dist/components/dashboard/index.cjs +15 -0
  61. package/dist/components/dashboard/index.d.cts +24 -0
  62. package/dist/components/dashboard/index.d.ts +24 -0
  63. package/dist/components/dashboard/index.js +15 -0
  64. package/dist/components/dashboard/item-list.cjs +71 -0
  65. package/dist/components/dashboard/item-list.d.cts +28 -0
  66. package/dist/components/dashboard/item-list.d.ts +28 -0
  67. package/dist/components/dashboard/item-list.js +71 -0
  68. package/dist/components/dashboard/key-value.cjs +39 -0
  69. package/dist/components/dashboard/key-value.d.cts +17 -0
  70. package/dist/components/dashboard/key-value.d.ts +17 -0
  71. package/dist/components/dashboard/key-value.js +39 -0
  72. package/dist/components/dashboard/layout.cjs +193 -0
  73. package/dist/components/dashboard/layout.d.cts +91 -0
  74. package/dist/components/dashboard/layout.d.ts +91 -0
  75. package/dist/components/dashboard/layout.js +193 -0
  76. package/dist/components/dashboard/metric.cjs +98 -0
  77. package/dist/components/dashboard/metric.d.cts +44 -0
  78. package/dist/components/dashboard/metric.d.ts +44 -0
  79. package/dist/components/dashboard/metric.js +98 -0
  80. package/dist/components/dashboard/progress-ring.cjs +77 -0
  81. package/dist/components/dashboard/progress-ring.d.cts +25 -0
  82. package/dist/components/dashboard/progress-ring.d.ts +25 -0
  83. package/dist/components/dashboard/progress-ring.js +77 -0
  84. package/dist/components/dashboard/skeletons.cjs +54 -0
  85. package/dist/components/dashboard/skeletons.d.cts +15 -0
  86. package/dist/components/dashboard/skeletons.d.ts +15 -0
  87. package/dist/components/dashboard/skeletons.js +54 -0
  88. package/dist/components/dashboard/spacing.cjs +10 -0
  89. package/dist/components/dashboard/spacing.d.cts +4 -0
  90. package/dist/components/dashboard/spacing.d.ts +4 -0
  91. package/dist/components/dashboard/spacing.js +10 -0
  92. package/dist/components/dashboard/stale-indicator.cjs +42 -0
  93. package/dist/components/dashboard/stale-indicator.d.cts +15 -0
  94. package/dist/components/dashboard/stale-indicator.d.ts +15 -0
  95. package/dist/components/dashboard/stale-indicator.js +42 -0
  96. package/dist/components/dashboard/status.cjs +62 -0
  97. package/dist/components/dashboard/status.d.cts +15 -0
  98. package/dist/components/dashboard/status.d.ts +15 -0
  99. package/dist/components/dashboard/status.js +62 -0
  100. package/dist/components/dashboard/tone.cjs +26 -0
  101. package/dist/components/dashboard/tone.d.cts +9 -0
  102. package/dist/components/dashboard/tone.d.ts +9 -0
  103. package/dist/components/dashboard/tone.js +26 -0
  104. package/dist/components/dashboard/typography.cjs +99 -0
  105. package/dist/components/dashboard/typography.d.cts +57 -0
  106. package/dist/components/dashboard/typography.d.ts +57 -0
  107. package/dist/components/dashboard/typography.js +99 -0
  108. package/dist/components/reference/ActivityExample.cjs +47 -0
  109. package/dist/components/reference/ActivityExample.d.cts +5 -0
  110. package/dist/components/reference/ActivityExample.d.ts +5 -0
  111. package/dist/components/reference/ActivityExample.js +47 -0
  112. package/dist/components/reference/ResourceExample.cjs +54 -0
  113. package/dist/components/reference/ResourceExample.d.cts +5 -0
  114. package/dist/components/reference/ResourceExample.d.ts +5 -0
  115. package/dist/components/reference/ResourceExample.js +54 -0
  116. package/dist/components/reference/SchedulerExample.cjs +68 -0
  117. package/dist/components/reference/SchedulerExample.d.cts +5 -0
  118. package/dist/components/reference/SchedulerExample.d.ts +5 -0
  119. package/dist/components/reference/SchedulerExample.js +68 -0
  120. package/dist/components/reference/StarterExample.cjs +34 -0
  121. package/dist/components/reference/StarterExample.d.cts +5 -0
  122. package/dist/components/reference/StarterExample.d.ts +5 -0
  123. package/dist/components/reference/StarterExample.js +34 -0
  124. package/dist/components/reference/index.cjs +10 -0
  125. package/dist/components/reference/index.d.cts +5 -0
  126. package/dist/components/reference/index.d.ts +5 -0
  127. package/dist/components/reference/index.js +10 -0
  128. package/dist/components/ui/badge.cjs +5 -1
  129. package/dist/components/ui/badge.d.cts +1 -1
  130. package/dist/components/ui/badge.d.ts +1 -1
  131. package/dist/components/ui/badge.js +5 -1
  132. package/dist/dashboard-catalog.cjs +8 -0
  133. package/dist/dashboard-catalog.d.cts +1 -0
  134. package/dist/dashboard-catalog.d.ts +1 -0
  135. package/dist/dashboard-catalog.js +8 -0
  136. package/dist/index.cjs +1 -0
  137. package/dist/index.d.cts +15 -0
  138. package/dist/index.d.ts +15 -0
  139. package/dist/index.js +1 -0
  140. package/dist/reference.cjs +12 -0
  141. package/dist/reference.d.cts +5 -0
  142. package/dist/reference.d.ts +5 -0
  143. package/dist/reference.js +12 -0
  144. package/dist/styles/glass-board.css +43 -0
  145. package/dist/styles/globals.css +59 -0
  146. package/package.json +70 -41
  147. package/src/components/context-editor/CapabilitySection.tsx +85 -0
  148. package/src/components/context-editor/ContextEditor.tsx +138 -0
  149. package/src/components/context-editor/PresetBar.tsx +94 -0
  150. package/src/components/context-editor/SkillsSection.tsx +37 -0
  151. package/src/components/context-editor/SystemPromptSection.tsx +88 -0
  152. package/src/components/context-editor/ToolsSection.tsx +37 -0
  153. package/src/components/context-editor/index.ts +7 -0
  154. package/src/components/context-editor/parts.tsx +217 -0
  155. package/src/components/context-editor/use-context-editor-model.ts +296 -0
  156. package/src/components/dashboard/__tests__/catalog.test.ts +57 -0
  157. package/src/components/dashboard/__tests__/glass.test.tsx +42 -0
  158. package/src/components/dashboard/__tests__/state.test.tsx +110 -0
  159. package/src/components/dashboard/__tests__/variants.test.tsx +95 -0
  160. package/src/components/dashboard/activity-list.tsx +99 -0
  161. package/src/components/dashboard/catalog.ts +351 -0
  162. package/src/components/dashboard/data-boundary.tsx +54 -0
  163. package/src/components/dashboard/empty-state.tsx +70 -0
  164. package/src/components/dashboard/icon-button.tsx +58 -0
  165. package/src/components/dashboard/index.ts +21 -0
  166. package/src/components/dashboard/item-list.tsx +106 -0
  167. package/src/components/dashboard/key-value.tsx +54 -0
  168. package/src/components/dashboard/layout.tsx +286 -0
  169. package/src/components/dashboard/metric.tsx +139 -0
  170. package/src/components/dashboard/progress-ring.tsx +100 -0
  171. package/src/components/dashboard/skeletons.tsx +73 -0
  172. package/src/components/dashboard/spacing.ts +14 -0
  173. package/src/components/dashboard/stale-indicator.tsx +55 -0
  174. package/src/components/dashboard/status.tsx +75 -0
  175. package/src/components/dashboard/tone.ts +35 -0
  176. package/src/components/dashboard/typography.tsx +151 -0
  177. package/src/components/reference/ActivityExample.tsx +68 -0
  178. package/src/components/reference/ResourceExample.tsx +78 -0
  179. package/src/components/reference/SchedulerExample.tsx +88 -0
  180. package/src/components/reference/StarterExample.tsx +48 -0
  181. package/src/components/reference/index.ts +10 -0
  182. package/src/components/ui/badge.tsx +6 -0
  183. package/src/dashboard-catalog.ts +13 -0
  184. package/src/index.ts +5 -0
  185. package/src/reference.ts +15 -0
  186. package/src/styles/glass-board.css +43 -0
  187. package/src/styles/globals.css +59 -0
  188. package/tsup.config.ts +6 -2
  189. package/vitest.config.ts +8 -0
  190. package/LICENSE +0 -201
@@ -0,0 +1,31 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _jsxruntime = require('react/jsx-runtime');
2
+ var _lucidereact = require('lucide-react');
3
+ var _CapabilitySection = require('./CapabilitySection');
4
+ function SkillsSection({
5
+ items,
6
+ allDisabled,
7
+ enabledCount,
8
+ isEnabled,
9
+ onToggle,
10
+ onToggleAll
11
+ }) {
12
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
13
+ _CapabilitySection.CapabilitySection,
14
+ {
15
+ icon: _lucidereact.Sparkles,
16
+ title: "Skills",
17
+ tint: "violet",
18
+ includeAllLabel: "Include all skills",
19
+ emptyLabel: "No skills available",
20
+ items,
21
+ allDisabled,
22
+ enabledCount,
23
+ isEnabled,
24
+ onToggle,
25
+ onToggleAll
26
+ }
27
+ );
28
+ }
29
+
30
+
31
+ exports.SkillsSection = SkillsSection;
@@ -0,0 +1,14 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ContextSkillInfo } from '@sero-ai/common';
3
+
4
+ interface SkillsSectionProps {
5
+ items: ContextSkillInfo[];
6
+ allDisabled: boolean;
7
+ enabledCount: number;
8
+ isEnabled: (name: string) => boolean;
9
+ onToggle: (name: string) => void;
10
+ onToggleAll: (disabled: boolean) => void;
11
+ }
12
+ declare function SkillsSection({ items, allDisabled, enabledCount, isEnabled, onToggle, onToggleAll, }: SkillsSectionProps): react_jsx_runtime.JSX.Element;
13
+
14
+ export { SkillsSection };
@@ -0,0 +1,14 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ContextSkillInfo } from '@sero-ai/common';
3
+
4
+ interface SkillsSectionProps {
5
+ items: ContextSkillInfo[];
6
+ allDisabled: boolean;
7
+ enabledCount: number;
8
+ isEnabled: (name: string) => boolean;
9
+ onToggle: (name: string) => void;
10
+ onToggleAll: (disabled: boolean) => void;
11
+ }
12
+ declare function SkillsSection({ items, allDisabled, enabledCount, isEnabled, onToggle, onToggleAll, }: SkillsSectionProps): react_jsx_runtime.JSX.Element;
13
+
14
+ export { SkillsSection };
@@ -0,0 +1,31 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Sparkles } from "lucide-react";
3
+ import { CapabilitySection } from "./CapabilitySection";
4
+ function SkillsSection({
5
+ items,
6
+ allDisabled,
7
+ enabledCount,
8
+ isEnabled,
9
+ onToggle,
10
+ onToggleAll
11
+ }) {
12
+ return /* @__PURE__ */ jsx(
13
+ CapabilitySection,
14
+ {
15
+ icon: Sparkles,
16
+ title: "Skills",
17
+ tint: "violet",
18
+ includeAllLabel: "Include all skills",
19
+ emptyLabel: "No skills available",
20
+ items,
21
+ allDisabled,
22
+ enabledCount,
23
+ isEnabled,
24
+ onToggle,
25
+ onToggleAll
26
+ }
27
+ );
28
+ }
29
+ export {
30
+ SkillsSection
31
+ };
@@ -0,0 +1,58 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _jsxruntime = require('react/jsx-runtime');
2
+ var _lucidereact = require('lucide-react');
3
+ var _parts = require('./parts');
4
+ const DEFAULT_COPY = {
5
+ title: "System Prompt",
6
+ defaultHint: "Using the default system prompt",
7
+ emptyHint: "System prompt excluded",
8
+ customHint: "Using a custom system prompt",
9
+ placeholder: "Enter system prompt...",
10
+ footnote: "Leave the prompt blank to exclude it entirely, or reset to use the default."
11
+ };
12
+ function SystemPromptSection({
13
+ displayedPrompt,
14
+ systemPrompt,
15
+ onSystemPromptChange,
16
+ copy
17
+ }) {
18
+ const c = { ...DEFAULT_COPY, ...copy };
19
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
20
+ _parts.ContextSection,
21
+ {
22
+ icon: _lucidereact.FileText,
23
+ title: c.title,
24
+ tint: "blue",
25
+ badge: systemPrompt !== null ? systemPrompt === "" ? "excluded" : "custom" : void 0,
26
+ badgeVariant: systemPrompt !== null ? systemPrompt === "" ? "disabled" : "modified" : "default",
27
+ defaultOpen: false,
28
+ children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
29
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between", children: [
30
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-[10px] text-[var(--text-muted)]", children: systemPrompt === null ? c.defaultHint : systemPrompt === "" ? c.emptyHint : c.customHint }),
31
+ systemPrompt !== null && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
32
+ "button",
33
+ {
34
+ type: "button",
35
+ onClick: () => onSystemPromptChange(null),
36
+ className: "text-[10px] text-[var(--text-muted)] transition-colors hover:text-[var(--text-secondary)]",
37
+ children: "Reset to default"
38
+ }
39
+ )
40
+ ] }),
41
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
42
+ "textarea",
43
+ {
44
+ "aria-label": "System prompt",
45
+ value: displayedPrompt,
46
+ onChange: (event) => onSystemPromptChange(event.target.value),
47
+ className: "h-80 w-full resize-y rounded-md border border-border/30 bg-[var(--bg-base)] p-2 font-mono text-[11px] text-[var(--text-secondary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent-primary)]",
48
+ placeholder: c.placeholder
49
+ }
50
+ ),
51
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-[10px] text-[var(--text-muted)]", children: c.footnote })
52
+ ] })
53
+ }
54
+ );
55
+ }
56
+
57
+
58
+ exports.SystemPromptSection = SystemPromptSection;
@@ -0,0 +1,25 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface SystemPromptCopy {
4
+ /** Section title. Defaults to "System Prompt". */
5
+ title?: string;
6
+ /** Help text when no override is set. */
7
+ defaultHint?: string;
8
+ /** Help text when the prompt is set to empty string. */
9
+ emptyHint?: string;
10
+ /** Help text when a custom prompt is set. */
11
+ customHint?: string;
12
+ /** Textarea placeholder. */
13
+ placeholder?: string;
14
+ /** Footer note under the textarea. */
15
+ footnote?: string;
16
+ }
17
+ interface SystemPromptSectionProps {
18
+ displayedPrompt: string;
19
+ systemPrompt: string | null;
20
+ onSystemPromptChange: (value: string | null) => void;
21
+ copy?: SystemPromptCopy;
22
+ }
23
+ declare function SystemPromptSection({ displayedPrompt, systemPrompt, onSystemPromptChange, copy, }: SystemPromptSectionProps): react_jsx_runtime.JSX.Element;
24
+
25
+ export { type SystemPromptCopy, SystemPromptSection };
@@ -0,0 +1,25 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface SystemPromptCopy {
4
+ /** Section title. Defaults to "System Prompt". */
5
+ title?: string;
6
+ /** Help text when no override is set. */
7
+ defaultHint?: string;
8
+ /** Help text when the prompt is set to empty string. */
9
+ emptyHint?: string;
10
+ /** Help text when a custom prompt is set. */
11
+ customHint?: string;
12
+ /** Textarea placeholder. */
13
+ placeholder?: string;
14
+ /** Footer note under the textarea. */
15
+ footnote?: string;
16
+ }
17
+ interface SystemPromptSectionProps {
18
+ displayedPrompt: string;
19
+ systemPrompt: string | null;
20
+ onSystemPromptChange: (value: string | null) => void;
21
+ copy?: SystemPromptCopy;
22
+ }
23
+ declare function SystemPromptSection({ displayedPrompt, systemPrompt, onSystemPromptChange, copy, }: SystemPromptSectionProps): react_jsx_runtime.JSX.Element;
24
+
25
+ export { type SystemPromptCopy, SystemPromptSection };
@@ -0,0 +1,58 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { FileText } from "lucide-react";
3
+ import { ContextSection } from "./parts";
4
+ const DEFAULT_COPY = {
5
+ title: "System Prompt",
6
+ defaultHint: "Using the default system prompt",
7
+ emptyHint: "System prompt excluded",
8
+ customHint: "Using a custom system prompt",
9
+ placeholder: "Enter system prompt...",
10
+ footnote: "Leave the prompt blank to exclude it entirely, or reset to use the default."
11
+ };
12
+ function SystemPromptSection({
13
+ displayedPrompt,
14
+ systemPrompt,
15
+ onSystemPromptChange,
16
+ copy
17
+ }) {
18
+ const c = { ...DEFAULT_COPY, ...copy };
19
+ return /* @__PURE__ */ jsx(
20
+ ContextSection,
21
+ {
22
+ icon: FileText,
23
+ title: c.title,
24
+ tint: "blue",
25
+ badge: systemPrompt !== null ? systemPrompt === "" ? "excluded" : "custom" : void 0,
26
+ badgeVariant: systemPrompt !== null ? systemPrompt === "" ? "disabled" : "modified" : "default",
27
+ defaultOpen: false,
28
+ children: /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
29
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
30
+ /* @__PURE__ */ jsx("span", { className: "text-[10px] text-[var(--text-muted)]", children: systemPrompt === null ? c.defaultHint : systemPrompt === "" ? c.emptyHint : c.customHint }),
31
+ systemPrompt !== null && /* @__PURE__ */ jsx(
32
+ "button",
33
+ {
34
+ type: "button",
35
+ onClick: () => onSystemPromptChange(null),
36
+ className: "text-[10px] text-[var(--text-muted)] transition-colors hover:text-[var(--text-secondary)]",
37
+ children: "Reset to default"
38
+ }
39
+ )
40
+ ] }),
41
+ /* @__PURE__ */ jsx(
42
+ "textarea",
43
+ {
44
+ "aria-label": "System prompt",
45
+ value: displayedPrompt,
46
+ onChange: (event) => onSystemPromptChange(event.target.value),
47
+ className: "h-80 w-full resize-y rounded-md border border-border/30 bg-[var(--bg-base)] p-2 font-mono text-[11px] text-[var(--text-secondary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent-primary)]",
48
+ placeholder: c.placeholder
49
+ }
50
+ ),
51
+ /* @__PURE__ */ jsx("p", { className: "text-[10px] text-[var(--text-muted)]", children: c.footnote })
52
+ ] })
53
+ }
54
+ );
55
+ }
56
+ export {
57
+ SystemPromptSection
58
+ };
@@ -0,0 +1,31 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _jsxruntime = require('react/jsx-runtime');
2
+ var _lucidereact = require('lucide-react');
3
+ var _CapabilitySection = require('./CapabilitySection');
4
+ function ToolsSection({
5
+ items,
6
+ allDisabled,
7
+ enabledCount,
8
+ isEnabled,
9
+ onToggle,
10
+ onToggleAll
11
+ }) {
12
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
13
+ _CapabilitySection.CapabilitySection,
14
+ {
15
+ icon: _lucidereact.Wrench,
16
+ title: "Tools",
17
+ tint: "amber",
18
+ includeAllLabel: "Include all tools",
19
+ emptyLabel: "No tools available",
20
+ items,
21
+ allDisabled,
22
+ enabledCount,
23
+ isEnabled,
24
+ onToggle,
25
+ onToggleAll
26
+ }
27
+ );
28
+ }
29
+
30
+
31
+ exports.ToolsSection = ToolsSection;
@@ -0,0 +1,14 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ContextToolInfo } from '@sero-ai/common';
3
+
4
+ interface ToolsSectionProps {
5
+ items: ContextToolInfo[];
6
+ allDisabled: boolean;
7
+ enabledCount: number;
8
+ isEnabled: (name: string) => boolean;
9
+ onToggle: (name: string) => void;
10
+ onToggleAll: (disabled: boolean) => void;
11
+ }
12
+ declare function ToolsSection({ items, allDisabled, enabledCount, isEnabled, onToggle, onToggleAll, }: ToolsSectionProps): react_jsx_runtime.JSX.Element;
13
+
14
+ export { ToolsSection };
@@ -0,0 +1,14 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ContextToolInfo } from '@sero-ai/common';
3
+
4
+ interface ToolsSectionProps {
5
+ items: ContextToolInfo[];
6
+ allDisabled: boolean;
7
+ enabledCount: number;
8
+ isEnabled: (name: string) => boolean;
9
+ onToggle: (name: string) => void;
10
+ onToggleAll: (disabled: boolean) => void;
11
+ }
12
+ declare function ToolsSection({ items, allDisabled, enabledCount, isEnabled, onToggle, onToggleAll, }: ToolsSectionProps): react_jsx_runtime.JSX.Element;
13
+
14
+ export { ToolsSection };
@@ -0,0 +1,31 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Wrench } from "lucide-react";
3
+ import { CapabilitySection } from "./CapabilitySection";
4
+ function ToolsSection({
5
+ items,
6
+ allDisabled,
7
+ enabledCount,
8
+ isEnabled,
9
+ onToggle,
10
+ onToggleAll
11
+ }) {
12
+ return /* @__PURE__ */ jsx(
13
+ CapabilitySection,
14
+ {
15
+ icon: Wrench,
16
+ title: "Tools",
17
+ tint: "amber",
18
+ includeAllLabel: "Include all tools",
19
+ emptyLabel: "No tools available",
20
+ items,
21
+ allDisabled,
22
+ enabledCount,
23
+ isEnabled,
24
+ onToggle,
25
+ onToggleAll
26
+ }
27
+ );
28
+ }
29
+ export {
30
+ ToolsSection
31
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _ContextEditor = require('./ContextEditor');
2
+
3
+
4
+ var _usecontexteditormodel = require('./use-context-editor-model');
5
+
6
+
7
+
8
+ exports.ContextEditor = _ContextEditor.ContextEditor; exports.useContextEditorModel = _usecontexteditormodel.useContextEditorModel;
@@ -0,0 +1,5 @@
1
+ export { ContextEditor, ContextEditorProps } from './ContextEditor.cjs';
2
+ export { ContextEditorModel, UseContextEditorModelParams, useContextEditorModel } from './use-context-editor-model.cjs';
3
+ export { SystemPromptCopy } from './SystemPromptSection.cjs';
4
+ import 'react/jsx-runtime';
5
+ import '@sero-ai/common';
@@ -0,0 +1,5 @@
1
+ export { ContextEditor, ContextEditorProps } from './ContextEditor.js';
2
+ export { ContextEditorModel, UseContextEditorModelParams, useContextEditorModel } from './use-context-editor-model.js';
3
+ export { SystemPromptCopy } from './SystemPromptSection.js';
4
+ import 'react/jsx-runtime';
5
+ import '@sero-ai/common';
@@ -0,0 +1,8 @@
1
+ import { ContextEditor } from "./ContextEditor";
2
+ import {
3
+ useContextEditorModel
4
+ } from "./use-context-editor-model";
5
+ export {
6
+ ContextEditor,
7
+ useContextEditorModel
8
+ };
@@ -0,0 +1,184 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _jsxruntime = require('react/jsx-runtime');
2
+ var _react = require('react');
3
+ var _react3 = require('motion/react');
4
+ var _lucidereact = require('lucide-react');
5
+ var _utils = require('../../lib/utils');
6
+ var _switch = require('../ui/switch');
7
+ const iconTintClass = {
8
+ blue: "text-status-info",
9
+ amber: "text-status-warning",
10
+ violet: "text-[var(--collab-primary)]",
11
+ neutral: "text-[var(--text-muted)]"
12
+ };
13
+ const badgeClass = {
14
+ default: "bg-[var(--bg-base)] text-[var(--text-muted)]",
15
+ modified: "bg-status-warning-subtle text-status-warning",
16
+ disabled: "bg-status-error-subtle text-status-error",
17
+ partial: "bg-status-info-subtle text-status-info"
18
+ };
19
+ const sectionBorderClass = {
20
+ default: "border-border/50",
21
+ modified: "border-status-warning-border",
22
+ disabled: "border-status-error-border",
23
+ partial: "border-status-info-border"
24
+ };
25
+ const sectionBgClass = {
26
+ default: "bg-[var(--bg-elevated)]/50",
27
+ modified: "bg-status-warning-faint",
28
+ disabled: "bg-status-error-faint",
29
+ partial: "bg-status-info-faint"
30
+ };
31
+ function ContextSection({
32
+ icon: Icon,
33
+ title,
34
+ count,
35
+ badge,
36
+ badgeVariant = "default",
37
+ tint = "neutral",
38
+ defaultOpen = false,
39
+ children
40
+ }) {
41
+ const [expanded, setExpanded] = _react.useState.call(void 0, defaultOpen);
42
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
43
+ "div",
44
+ {
45
+ className: _utils.cn.call(void 0,
46
+ "overflow-hidden rounded-lg border transition-colors duration-200",
47
+ sectionBorderClass[badgeVariant],
48
+ sectionBgClass[badgeVariant]
49
+ ),
50
+ children: [
51
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
52
+ "button",
53
+ {
54
+ type: "button",
55
+ onClick: () => setExpanded((prev) => !prev),
56
+ className: _utils.cn.call(void 0,
57
+ "flex w-full items-center gap-2.5 px-3 py-2 text-left transition-colors duration-150",
58
+ "hover:bg-[var(--bg-elevated)]/80"
59
+ ),
60
+ children: [
61
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
62
+ _react3.motion.div,
63
+ {
64
+ animate: { rotate: expanded ? 90 : 0 },
65
+ transition: { type: "spring", stiffness: 300, damping: 25 },
66
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronRight, { className: "size-3.5 text-[var(--text-muted)]" })
67
+ }
68
+ ),
69
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Icon, { className: _utils.cn.call(void 0, "size-3.5", iconTintClass[tint]) }),
70
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs font-medium text-[var(--text-secondary)]", children: title }),
71
+ count !== void 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-[11px] text-[var(--text-muted)]", children: [
72
+ "(",
73
+ count,
74
+ ")"
75
+ ] }),
76
+ badge && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
77
+ "span",
78
+ {
79
+ className: _utils.cn.call(void 0,
80
+ "ml-auto rounded-full px-2 py-0.5 text-[10px] font-medium",
81
+ badgeClass[badgeVariant]
82
+ ),
83
+ children: badge
84
+ }
85
+ )
86
+ ]
87
+ }
88
+ ),
89
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react3.AnimatePresence, { children: expanded && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
90
+ _react3.motion.div,
91
+ {
92
+ initial: { height: 0, opacity: 0 },
93
+ animate: { height: "auto", opacity: 1 },
94
+ exit: { height: 0, opacity: 0 },
95
+ transition: { duration: 0.2, ease: [0.25, 0.46, 0.45, 0.94] },
96
+ className: "overflow-hidden",
97
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-w-0 border-t border-border/30 p-3", children })
98
+ }
99
+ ) })
100
+ ]
101
+ }
102
+ );
103
+ }
104
+ function ToggleRow({
105
+ name,
106
+ description,
107
+ enabled,
108
+ onToggle
109
+ }) {
110
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
111
+ "div",
112
+ {
113
+ className: _utils.cn.call(void 0,
114
+ "flex min-w-0 items-start justify-between gap-3 rounded-md px-2 py-1.5 transition-colors",
115
+ enabled ? "hover:bg-[var(--bg-elevated)]/60" : "opacity-60 hover:bg-[var(--bg-elevated)]/40"
116
+ ),
117
+ children: [
118
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "min-w-0 flex-1", children: [
119
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _utils.cn.call(void 0,
120
+ "text-[11px] font-medium",
121
+ enabled ? "text-[var(--text-secondary)]" : "text-[var(--text-muted)]"
122
+ ), children: name }),
123
+ description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-0.5 text-[10px] leading-snug text-[var(--text-muted)]/60", children: description })
124
+ ] }),
125
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
126
+ _switch.Switch,
127
+ {
128
+ size: "sm",
129
+ className: "mt-0.5 shrink-0",
130
+ checked: enabled,
131
+ onCheckedChange: onToggle
132
+ }
133
+ )
134
+ ]
135
+ }
136
+ );
137
+ }
138
+ function SavePresetInput({
139
+ onSave,
140
+ onCancel
141
+ }) {
142
+ const [name, setName] = _react.useState.call(void 0, "");
143
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
144
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
145
+ "input",
146
+ {
147
+ "aria-label": "Preset name",
148
+ type: "text",
149
+ value: name,
150
+ onChange: (e) => setName(e.target.value),
151
+ placeholder: "Preset name...",
152
+ className: "flex-1 rounded-md border border-border/50 bg-[var(--bg-base)] px-2 py-1 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent-primary)]",
153
+ onKeyDown: (e) => {
154
+ if (e.key === "Enter" && name.trim()) onSave(name.trim());
155
+ if (e.key === "Escape") onCancel();
156
+ }
157
+ }
158
+ ),
159
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
160
+ "button",
161
+ {
162
+ type: "button",
163
+ onClick: () => name.trim() && onSave(name.trim()),
164
+ disabled: !name.trim(),
165
+ className: "rounded-md bg-[var(--accent-primary)] px-2 py-1 text-[11px] font-medium text-white disabled:opacity-50",
166
+ children: "Save"
167
+ }
168
+ ),
169
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
170
+ "button",
171
+ {
172
+ type: "button",
173
+ onClick: onCancel,
174
+ className: "text-[11px] text-[var(--text-muted)] hover:text-[var(--text-secondary)]",
175
+ children: "Cancel"
176
+ }
177
+ )
178
+ ] });
179
+ }
180
+
181
+
182
+
183
+
184
+ exports.ContextSection = ContextSection; exports.SavePresetInput = SavePresetInput; exports.ToggleRow = ToggleRow;
@@ -0,0 +1,32 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ /**
4
+ * Presentational sub-components for the shared ContextEditor dialog.
5
+ * Controlled, host-agnostic — no window.sero / session coupling.
6
+ */
7
+ type SectionTint = 'blue' | 'amber' | 'violet' | 'neutral';
8
+ type BadgeVariant = 'default' | 'modified' | 'disabled' | 'partial';
9
+ declare function ContextSection({ icon: Icon, title, count, badge, badgeVariant, tint, defaultOpen, children, }: {
10
+ icon: React.ComponentType<{
11
+ className?: string;
12
+ }>;
13
+ title: string;
14
+ count?: number;
15
+ badge?: string;
16
+ badgeVariant?: BadgeVariant;
17
+ tint?: SectionTint;
18
+ defaultOpen?: boolean;
19
+ children: React.ReactNode;
20
+ }): react_jsx_runtime.JSX.Element;
21
+ declare function ToggleRow({ name, description, enabled, onToggle, }: {
22
+ name: string;
23
+ description?: string;
24
+ enabled: boolean;
25
+ onToggle: () => void;
26
+ }): react_jsx_runtime.JSX.Element;
27
+ declare function SavePresetInput({ onSave, onCancel, }: {
28
+ onSave: (name: string) => void;
29
+ onCancel: () => void;
30
+ }): react_jsx_runtime.JSX.Element;
31
+
32
+ export { ContextSection, SavePresetInput, ToggleRow };
@@ -0,0 +1,32 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ /**
4
+ * Presentational sub-components for the shared ContextEditor dialog.
5
+ * Controlled, host-agnostic — no window.sero / session coupling.
6
+ */
7
+ type SectionTint = 'blue' | 'amber' | 'violet' | 'neutral';
8
+ type BadgeVariant = 'default' | 'modified' | 'disabled' | 'partial';
9
+ declare function ContextSection({ icon: Icon, title, count, badge, badgeVariant, tint, defaultOpen, children, }: {
10
+ icon: React.ComponentType<{
11
+ className?: string;
12
+ }>;
13
+ title: string;
14
+ count?: number;
15
+ badge?: string;
16
+ badgeVariant?: BadgeVariant;
17
+ tint?: SectionTint;
18
+ defaultOpen?: boolean;
19
+ children: React.ReactNode;
20
+ }): react_jsx_runtime.JSX.Element;
21
+ declare function ToggleRow({ name, description, enabled, onToggle, }: {
22
+ name: string;
23
+ description?: string;
24
+ enabled: boolean;
25
+ onToggle: () => void;
26
+ }): react_jsx_runtime.JSX.Element;
27
+ declare function SavePresetInput({ onSave, onCancel, }: {
28
+ onSave: (name: string) => void;
29
+ onCancel: () => void;
30
+ }): react_jsx_runtime.JSX.Element;
31
+
32
+ export { ContextSection, SavePresetInput, ToggleRow };