@auraone/aura-ide-kit 0.2.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.
- package/README.md +148 -0
- package/dist/index.cjs +955 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +276 -0
- package/dist/index.d.ts +276 -0
- package/dist/index.js +912 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +980 -0
- package/examples/ide-shell.tsx +94 -0
- package/package.json +80 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,912 @@
|
|
|
1
|
+
// src/command-registry.ts
|
|
2
|
+
function createCommandRegistry(initialCommands = []) {
|
|
3
|
+
const commands = /* @__PURE__ */ new Map();
|
|
4
|
+
for (const command of initialCommands) {
|
|
5
|
+
commands.set(command.id, command);
|
|
6
|
+
}
|
|
7
|
+
const list = () => Array.from(commands.values()).sort((a, b) => a.title.localeCompare(b.title));
|
|
8
|
+
return {
|
|
9
|
+
register(command) {
|
|
10
|
+
if (commands.has(command.id)) {
|
|
11
|
+
throw new Error(`Command already registered: ${command.id}`);
|
|
12
|
+
}
|
|
13
|
+
commands.set(command.id, command);
|
|
14
|
+
return () => {
|
|
15
|
+
commands.delete(command.id);
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
list,
|
|
19
|
+
find(query) {
|
|
20
|
+
const available = list();
|
|
21
|
+
const normalizedQuery = normalize(query);
|
|
22
|
+
if (!normalizedQuery) {
|
|
23
|
+
return available;
|
|
24
|
+
}
|
|
25
|
+
return available.filter((command) => {
|
|
26
|
+
const haystack = normalize([command.title, command.group, command.id, ...command.keywords ?? []].join(" "));
|
|
27
|
+
return haystack.includes(normalizedQuery) || isSubsequence(normalizedQuery, haystack);
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
async run(id) {
|
|
31
|
+
const command = commands.get(id);
|
|
32
|
+
if (!command) {
|
|
33
|
+
throw new Error(`Unknown command: ${id}`);
|
|
34
|
+
}
|
|
35
|
+
if (command.disabled) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
await command.handler();
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function normalize(value) {
|
|
43
|
+
return value.trim().toLowerCase().replace(/\s+/g, " ");
|
|
44
|
+
}
|
|
45
|
+
function isSubsequence(needle, haystack) {
|
|
46
|
+
let index = 0;
|
|
47
|
+
for (const character of haystack) {
|
|
48
|
+
if (character === needle[index]) {
|
|
49
|
+
index += 1;
|
|
50
|
+
}
|
|
51
|
+
if (index === needle.length) {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// src/components.tsx
|
|
59
|
+
import Editor from "@monaco-editor/react";
|
|
60
|
+
import {
|
|
61
|
+
AlertTriangle,
|
|
62
|
+
Bell,
|
|
63
|
+
CheckCircle2,
|
|
64
|
+
ChevronDown,
|
|
65
|
+
ChevronRight,
|
|
66
|
+
Circle,
|
|
67
|
+
CircleDot,
|
|
68
|
+
Code2,
|
|
69
|
+
Command,
|
|
70
|
+
File,
|
|
71
|
+
Folder,
|
|
72
|
+
FolderOpen,
|
|
73
|
+
Info,
|
|
74
|
+
Loader2,
|
|
75
|
+
Search,
|
|
76
|
+
Settings,
|
|
77
|
+
ShieldAlert,
|
|
78
|
+
X
|
|
79
|
+
} from "lucide-react";
|
|
80
|
+
import {
|
|
81
|
+
createContext as createContext2,
|
|
82
|
+
Fragment,
|
|
83
|
+
useContext as useContext2,
|
|
84
|
+
useEffect,
|
|
85
|
+
useMemo,
|
|
86
|
+
useRef,
|
|
87
|
+
useState
|
|
88
|
+
} from "react";
|
|
89
|
+
|
|
90
|
+
// src/theme.ts
|
|
91
|
+
import { createContext, useContext } from "react";
|
|
92
|
+
var AuraThemeContext = createContext({
|
|
93
|
+
mode: "system",
|
|
94
|
+
setMode: () => void 0
|
|
95
|
+
});
|
|
96
|
+
function useAuraTheme() {
|
|
97
|
+
return useContext(AuraThemeContext);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// src/components.tsx
|
|
101
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
102
|
+
function cx(...classes) {
|
|
103
|
+
return classes.filter(Boolean).join(" ");
|
|
104
|
+
}
|
|
105
|
+
function AuraIdeAppFrame({
|
|
106
|
+
productName,
|
|
107
|
+
projectName = "No project open",
|
|
108
|
+
commands,
|
|
109
|
+
sidebar,
|
|
110
|
+
main,
|
|
111
|
+
inspector,
|
|
112
|
+
bottomPanel,
|
|
113
|
+
statusBar,
|
|
114
|
+
themeMode = "system",
|
|
115
|
+
onThemeModeChange
|
|
116
|
+
}) {
|
|
117
|
+
const [paletteOpen, setPaletteOpen] = useState(false);
|
|
118
|
+
const [mode, setMode] = useState(themeMode);
|
|
119
|
+
useEffect(() => {
|
|
120
|
+
setMode(themeMode);
|
|
121
|
+
}, [themeMode]);
|
|
122
|
+
useEffect(() => {
|
|
123
|
+
const listener = (event) => {
|
|
124
|
+
if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "k") {
|
|
125
|
+
event.preventDefault();
|
|
126
|
+
setPaletteOpen(true);
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
window.addEventListener("keydown", listener);
|
|
130
|
+
return () => window.removeEventListener("keydown", listener);
|
|
131
|
+
}, []);
|
|
132
|
+
const themeValue = useMemo(
|
|
133
|
+
() => ({
|
|
134
|
+
mode,
|
|
135
|
+
setMode: (nextMode) => {
|
|
136
|
+
setMode(nextMode);
|
|
137
|
+
onThemeModeChange?.(nextMode);
|
|
138
|
+
}
|
|
139
|
+
}),
|
|
140
|
+
[mode, onThemeModeChange]
|
|
141
|
+
);
|
|
142
|
+
return /* @__PURE__ */ jsx(AuraThemeContext.Provider, { value: themeValue, children: /* @__PURE__ */ jsxs("div", { className: "aura-ide-root", "data-theme": mode, children: [
|
|
143
|
+
/* @__PURE__ */ jsxs("div", { className: "aura-ide-titlebar", children: [
|
|
144
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
145
|
+
/* @__PURE__ */ jsx("span", { className: "aura-ide-titlebar__product", children: productName }),
|
|
146
|
+
/* @__PURE__ */ jsx("span", { className: "aura-ide-titlebar__project", children: projectName })
|
|
147
|
+
] }),
|
|
148
|
+
/* @__PURE__ */ jsxs("button", { className: "aura-ide-icon-button", type: "button", "aria-label": "Open command palette", onClick: () => setPaletteOpen(true), children: [
|
|
149
|
+
/* @__PURE__ */ jsx(Command, { size: 16 }),
|
|
150
|
+
/* @__PURE__ */ jsx("span", { children: "Cmd/Ctrl K" })
|
|
151
|
+
] })
|
|
152
|
+
] }),
|
|
153
|
+
/* @__PURE__ */ jsx(
|
|
154
|
+
AuraSplitPane,
|
|
155
|
+
{
|
|
156
|
+
start: /* @__PURE__ */ jsx("aside", { className: "aura-ide-sidebar", children: sidebar }),
|
|
157
|
+
end: /* @__PURE__ */ jsxs("div", { className: "aura-ide-workbench", children: [
|
|
158
|
+
/* @__PURE__ */ jsxs("div", { className: "aura-ide-main-row", children: [
|
|
159
|
+
/* @__PURE__ */ jsx("main", { className: "aura-ide-main", children: main }),
|
|
160
|
+
inspector ? /* @__PURE__ */ jsx("aside", { className: "aura-ide-inspector", children: inspector }) : null
|
|
161
|
+
] }),
|
|
162
|
+
bottomPanel ? /* @__PURE__ */ jsx("section", { className: "aura-ide-bottom-panel", children: bottomPanel }) : null
|
|
163
|
+
] }),
|
|
164
|
+
defaultStartSize: 280,
|
|
165
|
+
minStartSize: 220,
|
|
166
|
+
maxStartSize: 420
|
|
167
|
+
}
|
|
168
|
+
),
|
|
169
|
+
/* @__PURE__ */ jsx("footer", { className: "aura-ide-statusbar", children: statusBar }),
|
|
170
|
+
/* @__PURE__ */ jsx(AuraCommandPalette, { registry: commands, open: paletteOpen, onOpenChange: setPaletteOpen })
|
|
171
|
+
] }) });
|
|
172
|
+
}
|
|
173
|
+
function AuraSplitPane({
|
|
174
|
+
start,
|
|
175
|
+
end,
|
|
176
|
+
defaultStartSize = 320,
|
|
177
|
+
minStartSize = 180,
|
|
178
|
+
maxStartSize = 600
|
|
179
|
+
}) {
|
|
180
|
+
const [startSize, setStartSize] = useState(defaultStartSize);
|
|
181
|
+
const dragging = useRef(false);
|
|
182
|
+
useEffect(() => {
|
|
183
|
+
const move = (event) => {
|
|
184
|
+
if (!dragging.current) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
const next = Math.min(maxStartSize, Math.max(minStartSize, event.clientX));
|
|
188
|
+
setStartSize(next);
|
|
189
|
+
};
|
|
190
|
+
const up = () => {
|
|
191
|
+
dragging.current = false;
|
|
192
|
+
};
|
|
193
|
+
window.addEventListener("mousemove", move);
|
|
194
|
+
window.addEventListener("mouseup", up);
|
|
195
|
+
return () => {
|
|
196
|
+
window.removeEventListener("mousemove", move);
|
|
197
|
+
window.removeEventListener("mouseup", up);
|
|
198
|
+
};
|
|
199
|
+
}, [maxStartSize, minStartSize]);
|
|
200
|
+
return /* @__PURE__ */ jsxs("div", { className: "aura-split-pane", style: { "--aura-pane-start": `${startSize}px` }, children: [
|
|
201
|
+
/* @__PURE__ */ jsx("div", { className: "aura-split-pane__start", children: start }),
|
|
202
|
+
/* @__PURE__ */ jsx(
|
|
203
|
+
"div",
|
|
204
|
+
{
|
|
205
|
+
className: "aura-split-pane__handle",
|
|
206
|
+
role: "separator",
|
|
207
|
+
"aria-orientation": "vertical",
|
|
208
|
+
"aria-valuemin": minStartSize,
|
|
209
|
+
"aria-valuemax": maxStartSize,
|
|
210
|
+
"aria-valuenow": startSize,
|
|
211
|
+
tabIndex: 0,
|
|
212
|
+
onMouseDown: () => {
|
|
213
|
+
dragging.current = true;
|
|
214
|
+
},
|
|
215
|
+
onKeyDown: (event) => {
|
|
216
|
+
if (event.key === "ArrowLeft") {
|
|
217
|
+
setStartSize((value) => Math.max(minStartSize, value - 16));
|
|
218
|
+
}
|
|
219
|
+
if (event.key === "ArrowRight") {
|
|
220
|
+
setStartSize((value) => Math.min(maxStartSize, value + 16));
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
),
|
|
225
|
+
/* @__PURE__ */ jsx("div", { className: "aura-split-pane__end", children: end })
|
|
226
|
+
] });
|
|
227
|
+
}
|
|
228
|
+
function AuraProjectTree({ nodes, selectedId, onSelect }) {
|
|
229
|
+
return /* @__PURE__ */ jsx("div", { className: "aura-tree", role: "tree", "aria-label": "Project files", children: nodes.map((node) => /* @__PURE__ */ jsx(TreeNode, { node, selectedId, depth: 0, onSelect }, node.id)) });
|
|
230
|
+
}
|
|
231
|
+
function TreeNode({
|
|
232
|
+
node,
|
|
233
|
+
selectedId,
|
|
234
|
+
depth,
|
|
235
|
+
onSelect
|
|
236
|
+
}) {
|
|
237
|
+
const [expanded, setExpanded] = useState(node.expanded ?? true);
|
|
238
|
+
const hasChildren = Boolean(node.children?.length);
|
|
239
|
+
const Icon = node.kind === "folder" ? expanded ? FolderOpen : Folder : File;
|
|
240
|
+
const activate = () => {
|
|
241
|
+
if (node.kind === "folder" && hasChildren) {
|
|
242
|
+
setExpanded((value) => !value);
|
|
243
|
+
}
|
|
244
|
+
onSelect?.(node);
|
|
245
|
+
};
|
|
246
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
247
|
+
/* @__PURE__ */ jsxs(
|
|
248
|
+
"button",
|
|
249
|
+
{
|
|
250
|
+
type: "button",
|
|
251
|
+
role: "treeitem",
|
|
252
|
+
"aria-expanded": node.kind === "folder" ? expanded : void 0,
|
|
253
|
+
"aria-selected": selectedId === node.id,
|
|
254
|
+
className: "aura-tree-row",
|
|
255
|
+
style: { "--aura-tree-depth": depth },
|
|
256
|
+
onClick: activate,
|
|
257
|
+
children: [
|
|
258
|
+
hasChildren ? expanded ? /* @__PURE__ */ jsx(ChevronDown, { size: 14 }) : /* @__PURE__ */ jsx(ChevronRight, { size: 14 }) : /* @__PURE__ */ jsx("span", { className: "aura-tree-row__spacer" }),
|
|
259
|
+
/* @__PURE__ */ jsx(Icon, { size: 15 }),
|
|
260
|
+
/* @__PURE__ */ jsx("span", { className: "aura-tree-row__name", children: node.name }),
|
|
261
|
+
node.dirty ? /* @__PURE__ */ jsx(CircleDot, { className: "aura-tree-row__dirty", size: 10, "aria-label": "Dirty" }) : null,
|
|
262
|
+
node.conflict ? /* @__PURE__ */ jsx(ShieldAlert, { className: "aura-tree-row__conflict", size: 13, "aria-label": "Conflict" }) : null,
|
|
263
|
+
node.badge ? /* @__PURE__ */ jsx("span", { className: "aura-tree-row__badge", children: node.badge }) : null
|
|
264
|
+
]
|
|
265
|
+
}
|
|
266
|
+
),
|
|
267
|
+
expanded && node.children?.map((child) => /* @__PURE__ */ jsx(TreeNode, { node: child, selectedId, depth: depth + 1, onSelect }, child.id))
|
|
268
|
+
] });
|
|
269
|
+
}
|
|
270
|
+
function AuraTabbedShell({ tabs, activeTabId, onActiveTabChange, onCloseTab }) {
|
|
271
|
+
const activeTab = tabs.find((tab) => tab.id === activeTabId) ?? tabs[0];
|
|
272
|
+
return /* @__PURE__ */ jsxs("div", { className: "aura-tabs", children: [
|
|
273
|
+
/* @__PURE__ */ jsx("div", { className: "aura-tabs__bar", role: "tablist", "aria-label": "Open editors", children: tabs.map((tab) => /* @__PURE__ */ jsxs(
|
|
274
|
+
"button",
|
|
275
|
+
{
|
|
276
|
+
type: "button",
|
|
277
|
+
role: "tab",
|
|
278
|
+
"aria-selected": tab.id === activeTab?.id,
|
|
279
|
+
className: "aura-tabs__tab",
|
|
280
|
+
onClick: () => onActiveTabChange(tab.id),
|
|
281
|
+
onMouseDown: (event) => {
|
|
282
|
+
if (event.button === 1) {
|
|
283
|
+
onCloseTab?.(tab.id);
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
children: [
|
|
287
|
+
tab.icon,
|
|
288
|
+
/* @__PURE__ */ jsx("span", { children: tab.title }),
|
|
289
|
+
tab.dirty ? /* @__PURE__ */ jsx(Circle, { size: 8, fill: "currentColor", "aria-label": "Unsaved changes" }) : null,
|
|
290
|
+
onCloseTab ? /* @__PURE__ */ jsx(
|
|
291
|
+
"span",
|
|
292
|
+
{
|
|
293
|
+
role: "button",
|
|
294
|
+
tabIndex: 0,
|
|
295
|
+
className: "aura-tabs__close",
|
|
296
|
+
"aria-label": `Close ${tab.title}`,
|
|
297
|
+
onClick: (event) => {
|
|
298
|
+
event.stopPropagation();
|
|
299
|
+
onCloseTab(tab.id);
|
|
300
|
+
},
|
|
301
|
+
onKeyDown: (event) => {
|
|
302
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
303
|
+
event.preventDefault();
|
|
304
|
+
onCloseTab(tab.id);
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
children: /* @__PURE__ */ jsx(X, { size: 13 })
|
|
308
|
+
}
|
|
309
|
+
) : null
|
|
310
|
+
]
|
|
311
|
+
},
|
|
312
|
+
tab.id
|
|
313
|
+
)) }),
|
|
314
|
+
/* @__PURE__ */ jsx("div", { className: "aura-tabs__panel", role: "tabpanel", children: activeTab?.content })
|
|
315
|
+
] });
|
|
316
|
+
}
|
|
317
|
+
function AuraMonaco({ value, language = "typescript", path, readOnly = false, theme = "dark", onChange }) {
|
|
318
|
+
const editorProps = path ? { path } : {};
|
|
319
|
+
return /* @__PURE__ */ jsx("div", { className: "aura-monaco", children: /* @__PURE__ */ jsx(
|
|
320
|
+
Editor,
|
|
321
|
+
{
|
|
322
|
+
value,
|
|
323
|
+
language,
|
|
324
|
+
...editorProps,
|
|
325
|
+
theme: theme === "light" ? "vs" : theme === "high-contrast" ? "hc-black" : "vs-dark",
|
|
326
|
+
options: {
|
|
327
|
+
readOnly,
|
|
328
|
+
automaticLayout: true,
|
|
329
|
+
minimap: { enabled: false },
|
|
330
|
+
fontFamily: "var(--ag-font-mono)",
|
|
331
|
+
fontSize: 13,
|
|
332
|
+
renderLineHighlight: "line",
|
|
333
|
+
scrollBeyondLastLine: false,
|
|
334
|
+
tabSize: 2
|
|
335
|
+
},
|
|
336
|
+
onChange: (nextValue) => onChange?.(nextValue ?? "")
|
|
337
|
+
}
|
|
338
|
+
) });
|
|
339
|
+
}
|
|
340
|
+
function AuraTimeline({ items }) {
|
|
341
|
+
return /* @__PURE__ */ jsx("ol", { className: "aura-timeline", "aria-label": "Timeline", children: items.map((item) => /* @__PURE__ */ jsxs("li", { className: cx("aura-timeline__item", `aura-timeline__item--${item.severity ?? "neutral"}`), children: [
|
|
342
|
+
/* @__PURE__ */ jsx("span", { className: "aura-timeline__dot" }),
|
|
343
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
344
|
+
/* @__PURE__ */ jsx("div", { className: "aura-timeline__title", children: item.title }),
|
|
345
|
+
/* @__PURE__ */ jsx("time", { className: "aura-timeline__time", dateTime: item.timestamp, children: item.timestamp }),
|
|
346
|
+
item.description ? /* @__PURE__ */ jsx("p", { children: item.description }) : null
|
|
347
|
+
] })
|
|
348
|
+
] }, item.id)) });
|
|
349
|
+
}
|
|
350
|
+
function AuraInspector({ title, children }) {
|
|
351
|
+
return /* @__PURE__ */ jsxs("section", { className: "aura-panel", "aria-label": title, children: [
|
|
352
|
+
/* @__PURE__ */ jsxs("header", { className: "aura-panel__header", children: [
|
|
353
|
+
/* @__PURE__ */ jsx(Info, { size: 15 }),
|
|
354
|
+
/* @__PURE__ */ jsx("h2", { children: title })
|
|
355
|
+
] }),
|
|
356
|
+
/* @__PURE__ */ jsx("div", { className: "aura-panel__body", children })
|
|
357
|
+
] });
|
|
358
|
+
}
|
|
359
|
+
function AuraCommandPalette({ registry, open, onOpenChange }) {
|
|
360
|
+
const [query, setQuery] = useState("");
|
|
361
|
+
const commands = registry.find(query);
|
|
362
|
+
if (!open) {
|
|
363
|
+
return null;
|
|
364
|
+
}
|
|
365
|
+
const grouped = commands.reduce((groups, command) => {
|
|
366
|
+
const groupCommands = groups.get(command.group) ?? [];
|
|
367
|
+
groupCommands.push(command);
|
|
368
|
+
groups.set(command.group, groupCommands);
|
|
369
|
+
return groups;
|
|
370
|
+
}, /* @__PURE__ */ new Map());
|
|
371
|
+
const runCommand = async (command) => {
|
|
372
|
+
await registry.run(command.id);
|
|
373
|
+
onOpenChange(false);
|
|
374
|
+
setQuery("");
|
|
375
|
+
};
|
|
376
|
+
return /* @__PURE__ */ jsx("div", { className: "aura-modal-backdrop", role: "presentation", onMouseDown: () => onOpenChange(false), children: /* @__PURE__ */ jsxs("div", { className: "aura-command-palette", role: "dialog", "aria-modal": "true", "aria-label": "Command palette", onMouseDown: (event) => event.stopPropagation(), children: [
|
|
377
|
+
/* @__PURE__ */ jsxs("label", { className: "aura-command-palette__search", children: [
|
|
378
|
+
/* @__PURE__ */ jsx(Search, { size: 16 }),
|
|
379
|
+
/* @__PURE__ */ jsx("input", { autoFocus: true, value: query, placeholder: "Search commands", onChange: (event) => setQuery(event.currentTarget.value) })
|
|
380
|
+
] }),
|
|
381
|
+
/* @__PURE__ */ jsxs("div", { className: "aura-command-palette__results", children: [
|
|
382
|
+
Array.from(grouped.entries()).map(([group, groupCommands]) => /* @__PURE__ */ jsxs("div", { className: "aura-command-palette__group", children: [
|
|
383
|
+
/* @__PURE__ */ jsx("div", { className: "aura-command-palette__group-title", children: group }),
|
|
384
|
+
groupCommands.map((command) => /* @__PURE__ */ jsxs("button", { type: "button", disabled: command.disabled, className: "aura-command-palette__item", onClick: () => void runCommand(command), children: [
|
|
385
|
+
/* @__PURE__ */ jsx("span", { children: command.title }),
|
|
386
|
+
command.keybinding ? /* @__PURE__ */ jsx("kbd", { children: command.keybinding }) : null
|
|
387
|
+
] }, command.id))
|
|
388
|
+
] }, group)),
|
|
389
|
+
!commands.length ? /* @__PURE__ */ jsx(AuraEmptyState, { title: "No commands", description: "Refine the query or register commands through the platform registry." }) : null
|
|
390
|
+
] })
|
|
391
|
+
] }) });
|
|
392
|
+
}
|
|
393
|
+
function AuraStatusBar({ items }) {
|
|
394
|
+
return /* @__PURE__ */ jsx("div", { className: "aura-status-items", role: "status", children: items.map((item) => /* @__PURE__ */ jsxs("span", { className: cx("aura-status-item", `aura-status-item--${item.tone ?? "neutral"}`), children: [
|
|
395
|
+
item.label,
|
|
396
|
+
item.value ? /* @__PURE__ */ jsx("strong", { children: item.value }) : null
|
|
397
|
+
] }, item.id)) });
|
|
398
|
+
}
|
|
399
|
+
function AuraProblemsPanel({ problems }) {
|
|
400
|
+
const icon = {
|
|
401
|
+
info: /* @__PURE__ */ jsx(Info, { size: 14 }),
|
|
402
|
+
warning: /* @__PURE__ */ jsx(AlertTriangle, { size: 14 }),
|
|
403
|
+
error: /* @__PURE__ */ jsx(ShieldAlert, { size: 14 })
|
|
404
|
+
};
|
|
405
|
+
return /* @__PURE__ */ jsxs("section", { className: "aura-panel", "aria-label": "Problems", children: [
|
|
406
|
+
/* @__PURE__ */ jsxs("header", { className: "aura-panel__header", children: [
|
|
407
|
+
/* @__PURE__ */ jsx(AlertTriangle, { size: 15 }),
|
|
408
|
+
/* @__PURE__ */ jsx("h2", { children: "Problems" }),
|
|
409
|
+
/* @__PURE__ */ jsx("span", { className: "aura-panel__count", children: problems.length })
|
|
410
|
+
] }),
|
|
411
|
+
/* @__PURE__ */ jsxs("div", { className: "aura-problems", children: [
|
|
412
|
+
problems.map((problem) => /* @__PURE__ */ jsxs("div", { className: cx("aura-problem", `aura-problem--${problem.severity}`), children: [
|
|
413
|
+
icon[problem.severity],
|
|
414
|
+
/* @__PURE__ */ jsx("span", { children: problem.message }),
|
|
415
|
+
/* @__PURE__ */ jsx("code", { children: [problem.path, problem.line, problem.column].filter(Boolean).join(":") })
|
|
416
|
+
] }, problem.id)),
|
|
417
|
+
!problems.length ? /* @__PURE__ */ jsx(AuraEmptyState, { title: "No problems", description: "Project checks are clean.", compact: true }) : null
|
|
418
|
+
] })
|
|
419
|
+
] });
|
|
420
|
+
}
|
|
421
|
+
function AuraSettingsPanel({
|
|
422
|
+
productName,
|
|
423
|
+
telemetryEnabled,
|
|
424
|
+
crashReportsEnabled,
|
|
425
|
+
onTelemetryChange,
|
|
426
|
+
onCrashReportsChange
|
|
427
|
+
}) {
|
|
428
|
+
const { mode, setMode } = useContext2(AuraThemeContext);
|
|
429
|
+
return /* @__PURE__ */ jsxs("section", { className: "aura-panel", "aria-label": `${productName} settings`, children: [
|
|
430
|
+
/* @__PURE__ */ jsxs("header", { className: "aura-panel__header", children: [
|
|
431
|
+
/* @__PURE__ */ jsx(Settings, { size: 15 }),
|
|
432
|
+
/* @__PURE__ */ jsx("h2", { children: "Settings" })
|
|
433
|
+
] }),
|
|
434
|
+
/* @__PURE__ */ jsxs("div", { className: "aura-settings", children: [
|
|
435
|
+
/* @__PURE__ */ jsxs("label", { children: [
|
|
436
|
+
/* @__PURE__ */ jsx("span", { children: "Theme" }),
|
|
437
|
+
/* @__PURE__ */ jsxs("select", { value: mode, onChange: (event) => setMode(event.currentTarget.value), children: [
|
|
438
|
+
/* @__PURE__ */ jsx("option", { value: "system", children: "Follow OS" }),
|
|
439
|
+
/* @__PURE__ */ jsx("option", { value: "dark", children: "Dark" }),
|
|
440
|
+
/* @__PURE__ */ jsx("option", { value: "light", children: "Light" }),
|
|
441
|
+
/* @__PURE__ */ jsx("option", { value: "high-contrast", children: "High contrast" })
|
|
442
|
+
] })
|
|
443
|
+
] }),
|
|
444
|
+
/* @__PURE__ */ jsxs("label", { children: [
|
|
445
|
+
/* @__PURE__ */ jsx("span", { children: "Telemetry" }),
|
|
446
|
+
/* @__PURE__ */ jsx("input", { type: "checkbox", checked: telemetryEnabled, onChange: (event) => onTelemetryChange(event.currentTarget.checked) })
|
|
447
|
+
] }),
|
|
448
|
+
/* @__PURE__ */ jsxs("label", { children: [
|
|
449
|
+
/* @__PURE__ */ jsx("span", { children: "Crash reports" }),
|
|
450
|
+
/* @__PURE__ */ jsx("input", { type: "checkbox", checked: crashReportsEnabled, onChange: (event) => onCrashReportsChange(event.currentTarget.checked) })
|
|
451
|
+
] })
|
|
452
|
+
] })
|
|
453
|
+
] });
|
|
454
|
+
}
|
|
455
|
+
function AuraWelcomePrivacyWizard({
|
|
456
|
+
productWorkNoun = "rubrics, datasets, or agent traces",
|
|
457
|
+
telemetryEnabled,
|
|
458
|
+
crashReportsEnabled,
|
|
459
|
+
onTelemetryChange,
|
|
460
|
+
onCrashReportsChange,
|
|
461
|
+
onComplete
|
|
462
|
+
}) {
|
|
463
|
+
return /* @__PURE__ */ jsxs("section", { className: "aura-privacy-wizard", "aria-label": "Welcome privacy choices", children: [
|
|
464
|
+
/* @__PURE__ */ jsxs("article", { children: [
|
|
465
|
+
/* @__PURE__ */ jsx("h2", { children: "Help improve AuraOne Open Studio" }),
|
|
466
|
+
/* @__PURE__ */ jsx("p", { children: "If you opt in, the app will send us anonymous usage signals so we can prioritize what to build next. We will never send the contents of your work." }),
|
|
467
|
+
/* @__PURE__ */ jsx("strong", { children: "What we send" }),
|
|
468
|
+
/* @__PURE__ */ jsxs("ul", { children: [
|
|
469
|
+
/* @__PURE__ */ jsx("li", { children: "Anonymous install ID" }),
|
|
470
|
+
/* @__PURE__ */ jsx("li", { children: "App version and OS" }),
|
|
471
|
+
/* @__PURE__ */ jsx("li", { children: "High-level feature usage" }),
|
|
472
|
+
/* @__PURE__ */ jsx("li", { children: "Error counts" }),
|
|
473
|
+
/* @__PURE__ */ jsx("li", { children: "Session length" })
|
|
474
|
+
] }),
|
|
475
|
+
/* @__PURE__ */ jsx("strong", { children: "What we never send" }),
|
|
476
|
+
/* @__PURE__ */ jsxs("ul", { children: [
|
|
477
|
+
/* @__PURE__ */ jsxs("li", { children: [
|
|
478
|
+
"Your ",
|
|
479
|
+
productWorkNoun
|
|
480
|
+
] }),
|
|
481
|
+
/* @__PURE__ */ jsx("li", { children: "API keys" }),
|
|
482
|
+
/* @__PURE__ */ jsx("li", { children: "File paths or hostnames" }),
|
|
483
|
+
/* @__PURE__ */ jsx("li", { children: "Anything you typed into the editor" })
|
|
484
|
+
] }),
|
|
485
|
+
/* @__PURE__ */ jsxs("label", { children: [
|
|
486
|
+
/* @__PURE__ */ jsx("input", { type: "checkbox", checked: telemetryEnabled, onChange: (event) => onTelemetryChange(event.currentTarget.checked) }),
|
|
487
|
+
/* @__PURE__ */ jsx("span", { children: "Help improve AuraOne Open Studio (opt in)" })
|
|
488
|
+
] }),
|
|
489
|
+
/* @__PURE__ */ jsx("p", { children: "Don't send anything (default)" })
|
|
490
|
+
] }),
|
|
491
|
+
/* @__PURE__ */ jsxs("article", { children: [
|
|
492
|
+
/* @__PURE__ */ jsx("h2", { children: "Help us fix what breaks" }),
|
|
493
|
+
/* @__PURE__ */ jsx("p", { children: "If something crashes, we'd love to know so we can fix it. We can send an anonymous crash report to AuraOne if you opt in." }),
|
|
494
|
+
/* @__PURE__ */ jsx("strong", { children: "What we send" }),
|
|
495
|
+
/* @__PURE__ */ jsxs("ul", { children: [
|
|
496
|
+
/* @__PURE__ */ jsx("li", { children: "The stack trace and minidump from the crash" }),
|
|
497
|
+
/* @__PURE__ */ jsx("li", { children: "Your OS and app version" }),
|
|
498
|
+
/* @__PURE__ */ jsx("li", { children: "An install-scoped random ID" })
|
|
499
|
+
] }),
|
|
500
|
+
/* @__PURE__ */ jsx("strong", { children: "What we never send" }),
|
|
501
|
+
/* @__PURE__ */ jsxs("ul", { children: [
|
|
502
|
+
/* @__PURE__ */ jsxs("li", { children: [
|
|
503
|
+
"The contents of your ",
|
|
504
|
+
productWorkNoun
|
|
505
|
+
] }),
|
|
506
|
+
/* @__PURE__ */ jsx("li", { children: "API keys" }),
|
|
507
|
+
/* @__PURE__ */ jsx("li", { children: "File paths or hostnames" })
|
|
508
|
+
] }),
|
|
509
|
+
/* @__PURE__ */ jsxs("label", { children: [
|
|
510
|
+
/* @__PURE__ */ jsx("input", { type: "checkbox", checked: crashReportsEnabled, onChange: (event) => onCrashReportsChange(event.currentTarget.checked) }),
|
|
511
|
+
/* @__PURE__ */ jsx("span", { children: "Send crash reports" })
|
|
512
|
+
] }),
|
|
513
|
+
/* @__PURE__ */ jsx("p", { children: "Don't send anything" })
|
|
514
|
+
] }),
|
|
515
|
+
/* @__PURE__ */ jsx("button", { type: "button", onClick: onComplete, children: "Continue" })
|
|
516
|
+
] });
|
|
517
|
+
}
|
|
518
|
+
function AuraUpdatePrompt({
|
|
519
|
+
version,
|
|
520
|
+
releaseNotes,
|
|
521
|
+
signedBy,
|
|
522
|
+
mandatory = false,
|
|
523
|
+
onInstallNow,
|
|
524
|
+
onInstallOnRestart,
|
|
525
|
+
onRemindLater
|
|
526
|
+
}) {
|
|
527
|
+
return /* @__PURE__ */ jsxs("section", { className: "aura-update-prompt", "aria-label": "Software update", children: [
|
|
528
|
+
/* @__PURE__ */ jsxs("header", { children: [
|
|
529
|
+
/* @__PURE__ */ jsx(CheckCircle2, { size: 18 }),
|
|
530
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
531
|
+
/* @__PURE__ */ jsx("h2", { children: "Update available" }),
|
|
532
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
533
|
+
"Version ",
|
|
534
|
+
version
|
|
535
|
+
] })
|
|
536
|
+
] })
|
|
537
|
+
] }),
|
|
538
|
+
/* @__PURE__ */ jsx("pre", { children: releaseNotes }),
|
|
539
|
+
/* @__PURE__ */ jsxs("p", { title: `Signed by ${signedBy}`, children: [
|
|
540
|
+
"Signed by ",
|
|
541
|
+
signedBy
|
|
542
|
+
] }),
|
|
543
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
544
|
+
/* @__PURE__ */ jsx("button", { type: "button", onClick: onInstallOnRestart, children: "Install next launch" }),
|
|
545
|
+
/* @__PURE__ */ jsx("button", { type: "button", onClick: onInstallNow, children: "Install now" }),
|
|
546
|
+
/* @__PURE__ */ jsx("button", { type: "button", onClick: onRemindLater, disabled: mandatory, children: "Remind later" })
|
|
547
|
+
] })
|
|
548
|
+
] });
|
|
549
|
+
}
|
|
550
|
+
function AuraIntakeIdentityFields({
|
|
551
|
+
displayName,
|
|
552
|
+
email = "",
|
|
553
|
+
intent,
|
|
554
|
+
onDisplayNameChange,
|
|
555
|
+
onEmailChange,
|
|
556
|
+
onIntentChange
|
|
557
|
+
}) {
|
|
558
|
+
return /* @__PURE__ */ jsxs("section", { className: "aura-intake-identity", "aria-label": "Intake identity", children: [
|
|
559
|
+
/* @__PURE__ */ jsxs("label", { children: [
|
|
560
|
+
/* @__PURE__ */ jsx("span", { children: "Display name" }),
|
|
561
|
+
/* @__PURE__ */ jsx("input", { type: "text", value: displayName, required: true, autoComplete: "name", onChange: (event) => onDisplayNameChange(event.currentTarget.value) })
|
|
562
|
+
] }),
|
|
563
|
+
/* @__PURE__ */ jsxs("label", { children: [
|
|
564
|
+
/* @__PURE__ */ jsx("span", { children: "Email (optional)" }),
|
|
565
|
+
/* @__PURE__ */ jsx("input", { type: "email", value: email, autoComplete: "email", onChange: (event) => onEmailChange(event.currentTarget.value) })
|
|
566
|
+
] }),
|
|
567
|
+
/* @__PURE__ */ jsxs("label", { children: [
|
|
568
|
+
/* @__PURE__ */ jsx("span", { children: "Intent note" }),
|
|
569
|
+
/* @__PURE__ */ jsx("textarea", { value: intent, required: true, rows: 4, onChange: (event) => onIntentChange(event.currentTarget.value) })
|
|
570
|
+
] })
|
|
571
|
+
] });
|
|
572
|
+
}
|
|
573
|
+
function AuraKeychainFallbackWarning({
|
|
574
|
+
backendKind,
|
|
575
|
+
firstSecretSet = false,
|
|
576
|
+
onDismiss
|
|
577
|
+
}) {
|
|
578
|
+
if (backendKind !== "linux-encrypted-file-fallback" || !firstSecretSet) {
|
|
579
|
+
return null;
|
|
580
|
+
}
|
|
581
|
+
return /* @__PURE__ */ jsxs("section", { className: "aura-keychain-warning", role: "status", "aria-label": "Linux keychain fallback warning", children: [
|
|
582
|
+
/* @__PURE__ */ jsx(ShieldAlert, { size: 18 }),
|
|
583
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
584
|
+
/* @__PURE__ */ jsx("strong", { children: "Linux Secret Service is unavailable" }),
|
|
585
|
+
/* @__PURE__ */ jsx("p", { children: "AuraOne stored this secret in the encrypted local fallback store. Install or unlock a Secret Service provider to use the native Linux keychain." })
|
|
586
|
+
] }),
|
|
587
|
+
onDismiss ? /* @__PURE__ */ jsx("button", { type: "button", onClick: onDismiss, children: "Dismiss" }) : null
|
|
588
|
+
] });
|
|
589
|
+
}
|
|
590
|
+
var ToastContext = createContext2({ push: () => void 0, dismiss: () => void 0 });
|
|
591
|
+
function AuraToastProvider({ children }) {
|
|
592
|
+
const [toasts, setToasts] = useState([]);
|
|
593
|
+
const value = useMemo(
|
|
594
|
+
() => ({
|
|
595
|
+
push(toast) {
|
|
596
|
+
setToasts((current) => [...current, { ...toast, id: crypto.randomUUID() }]);
|
|
597
|
+
},
|
|
598
|
+
dismiss(id) {
|
|
599
|
+
setToasts((current) => current.filter((toast) => toast.id !== id));
|
|
600
|
+
}
|
|
601
|
+
}),
|
|
602
|
+
[]
|
|
603
|
+
);
|
|
604
|
+
return /* @__PURE__ */ jsxs(ToastContext.Provider, { value, children: [
|
|
605
|
+
children,
|
|
606
|
+
/* @__PURE__ */ jsx("div", { className: "aura-toast-region", "aria-live": "polite", "aria-label": "Notifications", children: toasts.map((toast) => /* @__PURE__ */ jsxs("div", { className: cx("aura-toast", `aura-toast--${toast.tone ?? "info"}`), children: [
|
|
607
|
+
/* @__PURE__ */ jsx(Bell, { size: 15 }),
|
|
608
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
609
|
+
/* @__PURE__ */ jsx("strong", { children: toast.title }),
|
|
610
|
+
toast.description ? /* @__PURE__ */ jsx("p", { children: toast.description }) : null
|
|
611
|
+
] }),
|
|
612
|
+
/* @__PURE__ */ jsx("button", { type: "button", "aria-label": "Dismiss notification", onClick: () => value.dismiss(toast.id), children: /* @__PURE__ */ jsx(X, { size: 14 }) })
|
|
613
|
+
] }, toast.id)) })
|
|
614
|
+
] });
|
|
615
|
+
}
|
|
616
|
+
function useAuraToast() {
|
|
617
|
+
return useContext2(ToastContext);
|
|
618
|
+
}
|
|
619
|
+
function AuraModal({ open, title, children, onClose }) {
|
|
620
|
+
if (!open) {
|
|
621
|
+
return null;
|
|
622
|
+
}
|
|
623
|
+
return /* @__PURE__ */ jsx("div", { className: "aura-modal-backdrop", role: "presentation", onMouseDown: onClose, children: /* @__PURE__ */ jsxs("section", { className: "aura-modal", role: "dialog", "aria-modal": "true", "aria-label": title, onMouseDown: (event) => event.stopPropagation(), children: [
|
|
624
|
+
/* @__PURE__ */ jsxs("header", { className: "aura-modal__header", children: [
|
|
625
|
+
/* @__PURE__ */ jsx("h2", { children: title }),
|
|
626
|
+
/* @__PURE__ */ jsx("button", { type: "button", "aria-label": "Close modal", onClick: onClose, children: /* @__PURE__ */ jsx(X, { size: 16 }) })
|
|
627
|
+
] }),
|
|
628
|
+
/* @__PURE__ */ jsx("div", { className: "aura-modal__body", children })
|
|
629
|
+
] }) });
|
|
630
|
+
}
|
|
631
|
+
function AuraEmptyState({ title, description, compact = false }) {
|
|
632
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("aura-state", compact && "aura-state--compact"), children: [
|
|
633
|
+
/* @__PURE__ */ jsx(Code2, { size: compact ? 18 : 28 }),
|
|
634
|
+
/* @__PURE__ */ jsx("strong", { children: title }),
|
|
635
|
+
description ? /* @__PURE__ */ jsx("p", { children: description }) : null
|
|
636
|
+
] });
|
|
637
|
+
}
|
|
638
|
+
function AuraLoadingState({ label = "Loading" }) {
|
|
639
|
+
return /* @__PURE__ */ jsxs("div", { className: "aura-state", role: "status", children: [
|
|
640
|
+
/* @__PURE__ */ jsx(Loader2, { className: "aura-spin", size: 28 }),
|
|
641
|
+
/* @__PURE__ */ jsx("strong", { children: label })
|
|
642
|
+
] });
|
|
643
|
+
}
|
|
644
|
+
function AuraErrorState({ title, description, onRetry }) {
|
|
645
|
+
return /* @__PURE__ */ jsxs("div", { className: "aura-state aura-state--error", role: "alert", children: [
|
|
646
|
+
/* @__PURE__ */ jsx(ShieldAlert, { size: 28 }),
|
|
647
|
+
/* @__PURE__ */ jsx("strong", { children: title }),
|
|
648
|
+
description ? /* @__PURE__ */ jsx("p", { children: description }) : null,
|
|
649
|
+
onRetry ? /* @__PURE__ */ jsx("button", { type: "button", onClick: onRetry, children: "Retry" }) : null
|
|
650
|
+
] });
|
|
651
|
+
}
|
|
652
|
+
function AuraTelemetryEventLog({ events }) {
|
|
653
|
+
return /* @__PURE__ */ jsxs("section", { className: "aura-panel", "aria-label": "Telemetry event log", children: [
|
|
654
|
+
/* @__PURE__ */ jsxs("header", { className: "aura-panel__header", children: [
|
|
655
|
+
/* @__PURE__ */ jsx(CheckCircle2, { size: 15 }),
|
|
656
|
+
/* @__PURE__ */ jsx("h2", { children: "Telemetry Event Log" })
|
|
657
|
+
] }),
|
|
658
|
+
/* @__PURE__ */ jsx("div", { className: "aura-event-log", children: events.length ? events.map((event) => /* @__PURE__ */ jsxs("article", { className: "aura-event-log__row", children: [
|
|
659
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
660
|
+
/* @__PURE__ */ jsx("strong", { children: event.name }),
|
|
661
|
+
/* @__PURE__ */ jsx("time", { dateTime: event.timestamp, children: event.timestamp })
|
|
662
|
+
] }),
|
|
663
|
+
/* @__PURE__ */ jsx("span", { children: event.deliveryStatus === "local_preview" ? "local preview" : event.deliveryStatus === "would_send" ? "not sent" : event.destination === "local" ? "local only" : "delivery unverified" }),
|
|
664
|
+
/* @__PURE__ */ jsx(
|
|
665
|
+
"pre",
|
|
666
|
+
{
|
|
667
|
+
tabIndex: 0,
|
|
668
|
+
role: "region",
|
|
669
|
+
"aria-label": `${event.name} payload preview`,
|
|
670
|
+
children: JSON.stringify(event.payloadPreview, null, 2)
|
|
671
|
+
}
|
|
672
|
+
)
|
|
673
|
+
] }, event.id)) : /* @__PURE__ */ jsx(
|
|
674
|
+
AuraEmptyState,
|
|
675
|
+
{
|
|
676
|
+
compact: true,
|
|
677
|
+
title: "No local events",
|
|
678
|
+
description: "Eligible diagnostics appear here after they are recorded. This log does not confirm network delivery."
|
|
679
|
+
}
|
|
680
|
+
) })
|
|
681
|
+
] });
|
|
682
|
+
}
|
|
683
|
+
var AURA_INTAKE_PRIVACY_URL = "https://auraone.ai/open/privacy/intake";
|
|
684
|
+
var AURA_INTAKE_PRIVACY_COPY = {
|
|
685
|
+
sent: [
|
|
686
|
+
"A manifest describing the project metadata you entered.",
|
|
687
|
+
"The payload files you reviewed in the preview screen above.",
|
|
688
|
+
"A signature from your local install (used only for deduplication)."
|
|
689
|
+
],
|
|
690
|
+
neverSent: [
|
|
691
|
+
"Your API keys.",
|
|
692
|
+
"File paths from your machine (replaced with <PROJECT>/... references).",
|
|
693
|
+
"Hostnames or environment variables.",
|
|
694
|
+
"Anything you did not see in the preview screen above."
|
|
695
|
+
],
|
|
696
|
+
consent: "If you cancel before clicking Send, nothing leaves your machine. If you click Send, the only thing that leaves your machine is the contents of the packet you just reviewed."
|
|
697
|
+
};
|
|
698
|
+
function AuraIntakePacketPreview({
|
|
699
|
+
packet,
|
|
700
|
+
manifestTree,
|
|
701
|
+
consentChecked = false,
|
|
702
|
+
onConsentChange,
|
|
703
|
+
privacyUrl = AURA_INTAKE_PRIVACY_URL
|
|
704
|
+
}) {
|
|
705
|
+
const totalBytes = packet.includedFiles.reduce((sum, file) => sum + file.bytes, 0);
|
|
706
|
+
return /* @__PURE__ */ jsxs("section", { className: "aura-panel", "aria-label": "Intake packet preview", children: [
|
|
707
|
+
/* @__PURE__ */ jsxs("header", { className: "aura-panel__header", children: [
|
|
708
|
+
/* @__PURE__ */ jsx(FolderOpen, { size: 15 }),
|
|
709
|
+
/* @__PURE__ */ jsx("h2", { children: "Intake Packet" })
|
|
710
|
+
] }),
|
|
711
|
+
/* @__PURE__ */ jsxs("dl", { className: "aura-packet-summary", children: [
|
|
712
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
713
|
+
/* @__PURE__ */ jsx("dt", { children: "Packet" }),
|
|
714
|
+
/* @__PURE__ */ jsx("dd", { children: packet.packetId })
|
|
715
|
+
] }),
|
|
716
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
717
|
+
/* @__PURE__ */ jsx("dt", { children: "Flagship" }),
|
|
718
|
+
/* @__PURE__ */ jsx("dd", { children: packet.flagship })
|
|
719
|
+
] }),
|
|
720
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
721
|
+
/* @__PURE__ */ jsx("dt", { children: "Schema" }),
|
|
722
|
+
/* @__PURE__ */ jsx("dd", { children: packet.schemaVersion })
|
|
723
|
+
] }),
|
|
724
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
725
|
+
/* @__PURE__ */ jsx("dt", { children: "Files" }),
|
|
726
|
+
/* @__PURE__ */ jsxs("dd", { children: [
|
|
727
|
+
packet.includedFiles.length,
|
|
728
|
+
" / ",
|
|
729
|
+
new Intl.NumberFormat("en", { notation: "compact" }).format(totalBytes),
|
|
730
|
+
"B"
|
|
731
|
+
] })
|
|
732
|
+
] })
|
|
733
|
+
] }),
|
|
734
|
+
/* @__PURE__ */ jsx("div", { className: "aura-packet-files", children: packet.includedFiles.map((file) => /* @__PURE__ */ jsxs("div", { children: [
|
|
735
|
+
/* @__PURE__ */ jsx("code", { children: file.path }),
|
|
736
|
+
/* @__PURE__ */ jsx("span", { children: file.role })
|
|
737
|
+
] }, file.path)) }),
|
|
738
|
+
/* @__PURE__ */ jsxs("div", { className: "aura-packet-exclusions", children: [
|
|
739
|
+
/* @__PURE__ */ jsx("strong", { children: "Excluded" }),
|
|
740
|
+
packet.excludedPatterns.map((pattern) => /* @__PURE__ */ jsx("code", { children: pattern }, pattern))
|
|
741
|
+
] }),
|
|
742
|
+
packet.warnings.length ? /* @__PURE__ */ jsx("div", { className: "aura-packet-warnings", children: packet.warnings.map((warning) => /* @__PURE__ */ jsx("p", { children: warning }, warning)) }) : null,
|
|
743
|
+
manifestTree ? /* @__PURE__ */ jsxs("section", { className: "aura-packet-manifest", "aria-label": "Manifest tree", children: [
|
|
744
|
+
/* @__PURE__ */ jsx("h3", { children: "Manifest Tree" }),
|
|
745
|
+
/* @__PURE__ */ jsx("pre", { children: JSON.stringify(manifestTree, null, 2) })
|
|
746
|
+
] }) : null,
|
|
747
|
+
onConsentChange ? /* @__PURE__ */ jsxs("section", { className: "aura-packet-privacy", "aria-label": "Intake privacy review", children: [
|
|
748
|
+
/* @__PURE__ */ jsx("h3", { children: "What is sent in an intake packet?" }),
|
|
749
|
+
/* @__PURE__ */ jsx("p", { children: "A single zip file containing:" }),
|
|
750
|
+
/* @__PURE__ */ jsx("ul", { children: AURA_INTAKE_PRIVACY_COPY.sent.map((item) => /* @__PURE__ */ jsx("li", { children: item }, item)) }),
|
|
751
|
+
/* @__PURE__ */ jsx("h3", { children: "What is never sent in an intake packet?" }),
|
|
752
|
+
/* @__PURE__ */ jsx("ul", { children: AURA_INTAKE_PRIVACY_COPY.neverSent.map((item) => /* @__PURE__ */ jsx("li", { children: item }, item)) }),
|
|
753
|
+
/* @__PURE__ */ jsx("p", { children: AURA_INTAKE_PRIVACY_COPY.consent }),
|
|
754
|
+
/* @__PURE__ */ jsx("a", { href: privacyUrl, children: "Read the intake privacy policy" }),
|
|
755
|
+
/* @__PURE__ */ jsxs("label", { className: "aura-packet-consent", children: [
|
|
756
|
+
/* @__PURE__ */ jsx("input", { type: "checkbox", required: true, checked: consentChecked, onChange: (event) => onConsentChange(event.currentTarget.checked) }),
|
|
757
|
+
/* @__PURE__ */ jsx("span", { children: "I reviewed this packet and consent to send only the contents shown above." })
|
|
758
|
+
] })
|
|
759
|
+
] }) : null
|
|
760
|
+
] });
|
|
761
|
+
}
|
|
762
|
+
function AuraFileWatcherStatus({ state, watchedPath, eventsQueued = 0 }) {
|
|
763
|
+
const tone = state === "connected" ? "success" : state === "polling" ? "warning" : "neutral";
|
|
764
|
+
return /* @__PURE__ */ jsxs("section", { className: cx("aura-file-watcher", `aura-file-watcher--${tone}`), "aria-live": "polite", "aria-label": "File watcher status", children: [
|
|
765
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
766
|
+
/* @__PURE__ */ jsx(Bell, { size: 15 }),
|
|
767
|
+
/* @__PURE__ */ jsx("strong", { children: state === "connected" ? "Watching" : state === "polling" ? "Polling" : "Watcher disabled" })
|
|
768
|
+
] }),
|
|
769
|
+
watchedPath ? /* @__PURE__ */ jsx("code", { children: watchedPath }) : null,
|
|
770
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
771
|
+
eventsQueued,
|
|
772
|
+
" queued"
|
|
773
|
+
] })
|
|
774
|
+
] });
|
|
775
|
+
}
|
|
776
|
+
function AuraWelcomeWindow({ productName, recentProjects, onOpenFolder, onOpenRecent }) {
|
|
777
|
+
return /* @__PURE__ */ jsxs("section", { className: "aura-welcome", "aria-label": `${productName} welcome`, children: [
|
|
778
|
+
/* @__PURE__ */ jsxs("header", { children: [
|
|
779
|
+
/* @__PURE__ */ jsx(Code2, { size: 22 }),
|
|
780
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
781
|
+
/* @__PURE__ */ jsx("h1", { children: productName }),
|
|
782
|
+
/* @__PURE__ */ jsx("p", { children: "Local-first project workspace" })
|
|
783
|
+
] })
|
|
784
|
+
] }),
|
|
785
|
+
/* @__PURE__ */ jsxs("button", { type: "button", className: "aura-welcome__primary", onClick: onOpenFolder, children: [
|
|
786
|
+
/* @__PURE__ */ jsx(FolderOpen, { size: 16 }),
|
|
787
|
+
/* @__PURE__ */ jsx("span", { children: "Open Folder" })
|
|
788
|
+
] }),
|
|
789
|
+
recentProjects.length ? /* @__PURE__ */ jsx("nav", { "aria-label": "Recent projects", children: recentProjects.map((project) => /* @__PURE__ */ jsxs("button", { type: "button", onClick: () => onOpenRecent(project.path), children: [
|
|
790
|
+
/* @__PURE__ */ jsx(Folder, { size: 15 }),
|
|
791
|
+
/* @__PURE__ */ jsx("span", { children: project.name }),
|
|
792
|
+
/* @__PURE__ */ jsx("code", { children: project.path })
|
|
793
|
+
] }, project.path)) }) : null
|
|
794
|
+
] });
|
|
795
|
+
}
|
|
796
|
+
function AuraPanel({ className, children, ...props }) {
|
|
797
|
+
return /* @__PURE__ */ jsx("section", { className: cx("aura-panel", className), ...props, children });
|
|
798
|
+
}
|
|
799
|
+
function createDefaultIdeCommands(openFolder, openSettings) {
|
|
800
|
+
return createCommandRegistry([
|
|
801
|
+
{
|
|
802
|
+
id: "project.open-folder",
|
|
803
|
+
title: "Open Folder",
|
|
804
|
+
group: "Project",
|
|
805
|
+
keybinding: "Mod+O",
|
|
806
|
+
handler: openFolder
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
id: "app.settings",
|
|
810
|
+
title: "Open Settings",
|
|
811
|
+
group: "Application",
|
|
812
|
+
keybinding: "Mod+,",
|
|
813
|
+
handler: openSettings
|
|
814
|
+
}
|
|
815
|
+
]);
|
|
816
|
+
}
|
|
817
|
+
function isCommandPaletteKey(event) {
|
|
818
|
+
return (event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "k";
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
// src/ssr-posture.ts
|
|
822
|
+
var AURA_IDE_COMPONENT_POSTURE = [
|
|
823
|
+
{ component: "AuraIdeAppFrame", posture: "client-only", rationale: "Registers keyboard listeners for the command palette." },
|
|
824
|
+
{ component: "AuraSplitPane", posture: "client-only", rationale: "Uses pointer and keyboard resizing state." },
|
|
825
|
+
{ component: "AuraProjectTree", posture: "client-only", rationale: "Owns expandable tree state." },
|
|
826
|
+
{ component: "AuraMonaco", posture: "client-only-with-suspense", rationale: "Wraps Monaco editor, which is browser-only." },
|
|
827
|
+
{ component: "AuraTimeline", posture: "ssr-safe", rationale: "Static list rendering when handlers are not attached." },
|
|
828
|
+
{ component: "AuraInspector", posture: "ssr-safe", rationale: "Static panel rendering." },
|
|
829
|
+
{ component: "AuraCommandPalette", posture: "client-only", rationale: "Interactive modal search and command execution." },
|
|
830
|
+
{ component: "AuraStatusBar", posture: "ssr-safe", rationale: "Static status item rendering." },
|
|
831
|
+
{ component: "AuraProblemsPanel", posture: "ssr-safe", rationale: "Static diagnostic list rendering." },
|
|
832
|
+
{ component: "AuraSettingsPanel", posture: "client-only", rationale: "Interactive privacy toggles." },
|
|
833
|
+
{ component: "AuraWelcomePrivacyWizard", posture: "client-only", rationale: "Interactive telemetry and crash opt-in choices." },
|
|
834
|
+
{ component: "AuraUpdatePrompt", posture: "client-only", rationale: "Interactive install/remind update actions." },
|
|
835
|
+
{ component: "AuraIntakeIdentityFields", posture: "client-only", rationale: "Controlled intake contact and intent form inputs." },
|
|
836
|
+
{ component: "AuraKeychainFallbackWarning", posture: "client-only", rationale: "Dismissible first-use Linux keychain fallback warning." },
|
|
837
|
+
{ component: "AuraToastProvider", posture: "client-only", rationale: "Owns transient notification state." },
|
|
838
|
+
{ component: "AuraModal", posture: "client-only", rationale: "Interactive dialog state and dismissal." },
|
|
839
|
+
{ component: "AuraEmptyState", posture: "ssr-safe", rationale: "Static empty-state rendering." },
|
|
840
|
+
{ component: "AuraLoadingState", posture: "ssr-safe", rationale: "Static loading-state rendering." },
|
|
841
|
+
{ component: "AuraErrorState", posture: "ssr-safe", rationale: "Static error-state rendering." },
|
|
842
|
+
{ component: "AuraTelemetryEventLog", posture: "ssr-safe", rationale: "Static event-list rendering when data is supplied." },
|
|
843
|
+
{ component: "AuraIntakePacketPreview", posture: "ssr-safe", rationale: "Static packet preview rendering." },
|
|
844
|
+
{ component: "AuraFileWatcherStatus", posture: "ssr-safe", rationale: "Static watcher status rendering when data is supplied." },
|
|
845
|
+
{ component: "AuraWelcomeWindow", posture: "client-only", rationale: "Interactive open-folder and recent-project actions." },
|
|
846
|
+
{ component: "AuraTabbedShell", posture: "client-only", rationale: "Interactive tab selection." }
|
|
847
|
+
];
|
|
848
|
+
function postureFor(component) {
|
|
849
|
+
return AURA_IDE_COMPONENT_POSTURE.find((entry) => entry.component === component);
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
// src/index.ts
|
|
853
|
+
import {
|
|
854
|
+
ProoflineButton,
|
|
855
|
+
ProoflineProductGlyph,
|
|
856
|
+
ProoflinePanel,
|
|
857
|
+
ProoflineState,
|
|
858
|
+
ProoflineStatus,
|
|
859
|
+
AuraOneMark,
|
|
860
|
+
installOfficialStyleSheet,
|
|
861
|
+
prooflineProductIcons,
|
|
862
|
+
prooflineStatusLabels,
|
|
863
|
+
prooflineStatusTones
|
|
864
|
+
} from "@auraone/proofline-oss";
|
|
865
|
+
export {
|
|
866
|
+
AURA_IDE_COMPONENT_POSTURE,
|
|
867
|
+
AURA_INTAKE_PRIVACY_COPY,
|
|
868
|
+
AURA_INTAKE_PRIVACY_URL,
|
|
869
|
+
AuraCommandPalette,
|
|
870
|
+
AuraEmptyState,
|
|
871
|
+
AuraErrorState,
|
|
872
|
+
AuraFileWatcherStatus,
|
|
873
|
+
AuraIdeAppFrame,
|
|
874
|
+
AuraInspector,
|
|
875
|
+
AuraIntakeIdentityFields,
|
|
876
|
+
AuraIntakePacketPreview,
|
|
877
|
+
AuraKeychainFallbackWarning,
|
|
878
|
+
AuraLoadingState,
|
|
879
|
+
AuraModal,
|
|
880
|
+
AuraMonaco,
|
|
881
|
+
AuraOneMark,
|
|
882
|
+
AuraPanel,
|
|
883
|
+
AuraProblemsPanel,
|
|
884
|
+
AuraProjectTree,
|
|
885
|
+
AuraSettingsPanel,
|
|
886
|
+
AuraSplitPane,
|
|
887
|
+
AuraStatusBar,
|
|
888
|
+
AuraTabbedShell,
|
|
889
|
+
AuraTelemetryEventLog,
|
|
890
|
+
AuraThemeContext,
|
|
891
|
+
AuraTimeline,
|
|
892
|
+
AuraToastProvider,
|
|
893
|
+
AuraUpdatePrompt,
|
|
894
|
+
AuraWelcomePrivacyWizard,
|
|
895
|
+
AuraWelcomeWindow,
|
|
896
|
+
ProoflineButton,
|
|
897
|
+
ProoflinePanel,
|
|
898
|
+
ProoflineProductGlyph,
|
|
899
|
+
ProoflineState,
|
|
900
|
+
ProoflineStatus,
|
|
901
|
+
createCommandRegistry,
|
|
902
|
+
createDefaultIdeCommands,
|
|
903
|
+
installOfficialStyleSheet,
|
|
904
|
+
isCommandPaletteKey,
|
|
905
|
+
postureFor,
|
|
906
|
+
prooflineProductIcons,
|
|
907
|
+
prooflineStatusLabels,
|
|
908
|
+
prooflineStatusTones,
|
|
909
|
+
useAuraTheme,
|
|
910
|
+
useAuraToast
|
|
911
|
+
};
|
|
912
|
+
//# sourceMappingURL=index.js.map
|