skema-core 0.2.0 → 2.1.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/dist/index.js CHANGED
@@ -185,11 +185,21 @@ function useDaemon(options = {}) {
185
185
  autoReconnect = true,
186
186
  reconnectDelay = 2e3
187
187
  } = options;
188
+ const defaultProviderStatus = {
189
+ gemini: { installed: false, authorized: false, message: "Checking..." },
190
+ claude: { installed: false, authorized: false, message: "Checking..." }
191
+ };
188
192
  const [state, setState] = react.useState({
189
193
  connected: false,
190
194
  provider: "gemini",
195
+ mode: "direct-cli",
191
196
  availableProviders: [],
192
- cwd: ""
197
+ availableModes: ["direct-cli", "mcp"],
198
+ providerStatus: defaultProviderStatus,
199
+ cwd: "",
200
+ mcpServerConnected: false,
201
+ mcpClientName: null,
202
+ annotationCounts: { pending: 0, acknowledged: 0, resolved: 0, dismissed: 0 }
193
203
  });
194
204
  const [isGenerating, setIsGenerating] = react.useState(false);
195
205
  const [error, setError] = react.useState(null);
@@ -227,12 +237,24 @@ function useDaemon(options = {}) {
227
237
  ...prev,
228
238
  connected: true,
229
239
  provider: msg.provider || prev.provider,
240
+ mode: msg.mode || prev.mode,
230
241
  availableProviders: msg.availableProviders || prev.availableProviders,
231
- cwd: msg.cwd || prev.cwd
242
+ availableModes: msg.availableModes || prev.availableModes,
243
+ providerStatus: msg.providerStatus || prev.providerStatus,
244
+ cwd: msg.cwd || prev.cwd,
245
+ mcpServerConnected: msg.mcpServerConnected ?? prev.mcpServerConnected,
246
+ mcpClientName: msg.mcpClientName !== void 0 ? msg.mcpClientName : prev.mcpClientName
232
247
  }));
233
248
  setError(null);
234
249
  return;
235
250
  }
251
+ if (msg.type === "provider-statuses") {
252
+ setState((prev) => ({
253
+ ...prev,
254
+ providerStatus: msg.providerStatus || prev.providerStatus
255
+ }));
256
+ return;
257
+ }
236
258
  if (msg.type === "ai-event" && msg.id) {
237
259
  const callback = eventCallbacks.current.get(msg.id);
238
260
  if (callback) {
@@ -250,9 +272,40 @@ function useDaemon(options = {}) {
250
272
  setIsGenerating(false);
251
273
  return;
252
274
  }
275
+ if (msg.type === "annotation-queued" && msg.id) {
276
+ const pending = pendingRequests.current.get(msg.id);
277
+ if (pending) {
278
+ pendingRequests.current.delete(msg.id);
279
+ eventCallbacks.current.delete(msg.id);
280
+ pending.resolve({ success: true, annotationId: msg.annotationId, queued: true });
281
+ }
282
+ setIsGenerating(false);
283
+ return;
284
+ }
285
+ if (msg.type === "annotation-status-changed") {
286
+ return;
287
+ }
288
+ if (msg.type === "mcp-server-status") {
289
+ setState((prev) => ({
290
+ ...prev,
291
+ mcpServerConnected: msg.connected,
292
+ mcpClientName: msg.clientName !== void 0 ? msg.clientName : prev.mcpClientName
293
+ }));
294
+ return;
295
+ }
296
+ if (msg.type === "mcp-annotation-counts") {
297
+ setState((prev) => ({
298
+ ...prev,
299
+ annotationCounts: msg.counts
300
+ }));
301
+ return;
302
+ }
253
303
  if (msg.type === "provider-changed") {
254
304
  setState((prev) => ({ ...prev, provider: msg.provider }));
255
305
  }
306
+ if (msg.type === "mode-changed") {
307
+ setState((prev) => ({ ...prev, mode: msg.mode }));
308
+ }
256
309
  if (msg.type === "error" && msg.id) {
257
310
  const pending = pendingRequests.current.get(msg.id);
258
311
  if (pending) {
@@ -327,7 +380,23 @@ function useDaemon(options = {}) {
327
380
  return false;
328
381
  }
329
382
  }, [sendRequest]);
330
- const generate = react.useCallback(async (annotation, onEvent) => {
383
+ const setMode = react.useCallback(async (mode) => {
384
+ try {
385
+ const response = await sendRequest("set-mode", { mode });
386
+ return response.type === "mode-changed";
387
+ } catch (e) {
388
+ console.error("[useDaemon] Failed to set mode:", e);
389
+ return false;
390
+ }
391
+ }, [sendRequest]);
392
+ const refreshProviderStatus = react.useCallback(async () => {
393
+ try {
394
+ await sendRequest("check-providers", {});
395
+ } catch (e) {
396
+ console.error("[useDaemon] Failed to refresh provider status:", e);
397
+ }
398
+ }, [sendRequest]);
399
+ const generate = react.useCallback(async (annotation, onEvent, options2) => {
331
400
  const id = nextId();
332
401
  if (onEvent) {
333
402
  eventCallbacks.current.set(id, onEvent);
@@ -343,7 +412,10 @@ function useDaemon(options = {}) {
343
412
  wsRef.current.send(JSON.stringify({
344
413
  id,
345
414
  type: "generate",
346
- annotation
415
+ annotation,
416
+ // Include optional overrides
417
+ ...options2?.mode && { mode: options2.mode },
418
+ ...options2?.provider && { provider: options2.provider }
347
419
  }));
348
420
  });
349
421
  }, [nextId]);
@@ -382,6 +454,8 @@ function useDaemon(options = {}) {
382
454
  connect,
383
455
  disconnect,
384
456
  setProvider,
457
+ setMode,
458
+ refreshProviderStatus,
385
459
  generate,
386
460
  revert,
387
461
  readFile,
@@ -1428,11 +1502,12 @@ var CollapseButton = ({ onClick }) => {
1428
1502
  }
1429
1503
  );
1430
1504
  };
1431
- var SkemaToolbar = ({ onExpandedChange, onStylePanelChange }) => {
1505
+ var SkemaToolbar = ({ isExpanded: controlledExpanded, onExpandedChange, onStylePanelChange, isDark = false }) => {
1432
1506
  const editor = tldraw.useEditor();
1433
1507
  const tools = tldraw.useTools();
1434
1508
  const shapesButtonRef = react.useRef(null);
1435
- const [isExpanded, setIsExpanded] = react.useState(false);
1509
+ const [internalExpanded, setInternalExpanded] = react.useState(false);
1510
+ const isExpanded = controlledExpanded !== void 0 ? controlledExpanded : internalExpanded;
1436
1511
  const [isLogoHovered, setIsLogoHovered] = react.useState(false);
1437
1512
  const [isShapePickerOpen, setIsShapePickerOpen] = react.useState(false);
1438
1513
  const [isStylePanelOpen, setIsStylePanelOpen] = react.useState(false);
@@ -1442,7 +1517,7 @@ var SkemaToolbar = ({ onExpandedChange, onStylePanelChange }) => {
1442
1517
  const isEraseSelected = tldraw.useIsToolSelected(tools["eraser"]);
1443
1518
  const isGeoSelected = tldraw.useIsToolSelected(tools["geo"]);
1444
1519
  const handleExpand = (expanded) => {
1445
- setIsExpanded(expanded);
1520
+ setInternalExpanded(expanded);
1446
1521
  onExpandedChange?.(expanded);
1447
1522
  if (!expanded) {
1448
1523
  setIsStylePanelOpen(false);
@@ -1487,9 +1562,9 @@ var SkemaToolbar = ({ onExpandedChange, onStylePanelChange }) => {
1487
1562
  alignItems: "center",
1488
1563
  gap: 6,
1489
1564
  padding: "6px 12px",
1490
- backgroundColor: "white",
1565
+ backgroundColor: isDark ? "#1a1a1a" : "white",
1491
1566
  borderRadius: 28,
1492
- boxShadow: "0 2px 10px rgba(0,0,0,0.15)",
1567
+ boxShadow: isDark ? "0 2px 10px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.08)" : "0 2px 10px rgba(0,0,0,0.15)",
1493
1568
  pointerEvents: "auto"
1494
1569
  },
1495
1570
  children: [
@@ -1805,7 +1880,7 @@ var AnnotationsSidebar = ({
1805
1880
  ]
1806
1881
  }
1807
1882
  ),
1808
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflowY: "auto", maxHeight: "calc(100vh - 200px)" }, children: annotations.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "16px", color: "#6b7280", fontSize: "13px" }, children: "No annotations yet. Use the DOM picker or drawing tools to annotate." }) : annotations.map((annotation) => /* @__PURE__ */ jsxRuntime.jsxs(
1883
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflowY: "auto", maxHeight: "calc(100vh - 200px)" }, children: annotations.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "16px", color: "#6b7280", fontSize: "13px" }, children: "No annotations yet. Double-click to select an element, or use draw/lasso to annotate." }) : annotations.map((annotation) => /* @__PURE__ */ jsxRuntime.jsxs(
1809
1884
  "div",
1810
1885
  {
1811
1886
  style: {
@@ -2101,15 +2176,31 @@ var ProcessingOverlay = ({ boundingBox, scrollOffset }) => {
2101
2176
  )
2102
2177
  ] });
2103
2178
  };
2179
+ var AccentShape = ({ color, isMultiSelect }) => {
2180
+ const isDrawing = color === "#8B5CF6";
2181
+ if (isMultiSelect && !isDrawing) {
2182
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "10", height: "10", viewBox: "0 0 10 10", style: { flexShrink: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "1", y: "1", width: "8", height: "8", rx: "1.5", fill: color }) });
2183
+ }
2184
+ if (isDrawing) {
2185
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", style: { flexShrink: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(
2186
+ "path",
2187
+ {
2188
+ d: "M6 1L7.4 4.2L10.8 4.6L8.2 7L8.9 10.4L6 8.7L3.1 10.4L3.8 7L1.2 4.6L4.6 4.2L6 1Z",
2189
+ fill: color
2190
+ }
2191
+ ) });
2192
+ }
2193
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "10", height: "10", viewBox: "0 0 10 10", style: { flexShrink: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "5", cy: "5", r: "4", fill: color }) });
2194
+ };
2104
2195
  var styles = {
2105
2196
  popup: {
2106
2197
  position: "fixed",
2107
2198
  transform: "translateX(-50%)",
2108
2199
  width: 280,
2109
- padding: "12px 16px 14px",
2110
- background: "#1a1a1a",
2200
+ padding: "14px 16px 14px",
2201
+ background: "#FFFFFF",
2111
2202
  borderRadius: 16,
2112
- boxShadow: "0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.08)",
2203
+ boxShadow: "0 4px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06)",
2113
2204
  cursor: "default",
2114
2205
  zIndex: 100001,
2115
2206
  fontFamily: '"Clash Display", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
@@ -2122,53 +2213,67 @@ var styles = {
2122
2213
  },
2123
2214
  popupExit: {
2124
2215
  opacity: 0,
2125
- transform: "translateX(-50%) scale(0.95) translateY(4px)"
2216
+ transform: "translateX(-50%) scale(0.96) translateY(4px)"
2126
2217
  },
2127
2218
  header: {
2128
2219
  display: "flex",
2129
2220
  alignItems: "center",
2130
- justifyContent: "space-between",
2131
- marginBottom: 9
2221
+ gap: 7,
2222
+ marginBottom: 10
2132
2223
  },
2133
2224
  element: {
2134
2225
  fontSize: 12,
2135
- fontWeight: 400,
2136
- color: "rgba(255, 255, 255, 0.5)",
2226
+ fontWeight: 500,
2227
+ color: "#9CA3AF",
2137
2228
  maxWidth: "100%",
2138
2229
  overflow: "hidden",
2139
2230
  textOverflow: "ellipsis",
2140
2231
  whiteSpace: "nowrap",
2141
- flex: 1
2232
+ flex: 1,
2233
+ letterSpacing: "0.01em"
2142
2234
  },
2143
2235
  quote: {
2144
2236
  fontSize: 12,
2145
2237
  fontStyle: "italic",
2146
- color: "rgba(255, 255, 255, 0.6)",
2238
+ color: "#6B7280",
2147
2239
  marginBottom: 8,
2148
- padding: "6px 8px",
2149
- background: "rgba(255, 255, 255, 0.05)",
2150
- borderRadius: 4,
2151
- lineHeight: 1.45
2240
+ padding: "6px 9px",
2241
+ background: "#F9FAFB",
2242
+ borderRadius: 6,
2243
+ lineHeight: 1.45,
2244
+ borderLeft: "2px solid"
2152
2245
  },
2153
2246
  textarea: {
2154
2247
  width: "100%",
2155
- padding: "8px 10px",
2248
+ padding: "9px 11px",
2156
2249
  fontSize: 13,
2157
2250
  fontFamily: "inherit",
2158
- background: "rgba(255, 255, 255, 0.05)",
2159
- color: "#fff",
2160
- border: "1px solid rgba(255, 255, 255, 0.15)",
2161
- borderRadius: 8,
2251
+ background: "#F9FAFB",
2252
+ color: "#1a1a1a",
2253
+ border: "1px solid #E5E7EB",
2254
+ borderRadius: 10,
2162
2255
  resize: "none",
2163
2256
  outline: "none",
2164
- transition: "border-color 0.15s ease",
2165
- boxSizing: "border-box"
2257
+ transition: "border-color 0.15s ease, box-shadow 0.15s ease",
2258
+ boxSizing: "border-box",
2259
+ lineHeight: 1.5
2166
2260
  },
2167
2261
  actions: {
2168
2262
  display: "flex",
2169
- justifyContent: "flex-end",
2170
- gap: 6,
2171
- marginTop: 8
2263
+ alignItems: "center",
2264
+ justifyContent: "space-between",
2265
+ marginTop: 10
2266
+ },
2267
+ hint: {
2268
+ fontSize: 11,
2269
+ color: "#C0C5CE",
2270
+ fontWeight: 400,
2271
+ letterSpacing: "0.01em",
2272
+ userSelect: "none"
2273
+ },
2274
+ buttonGroup: {
2275
+ display: "flex",
2276
+ gap: 6
2172
2277
  },
2173
2278
  button: {
2174
2279
  padding: "6px 14px",
@@ -2177,11 +2282,11 @@ var styles = {
2177
2282
  borderRadius: 16,
2178
2283
  border: "none",
2179
2284
  cursor: "pointer",
2180
- transition: "background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease"
2285
+ transition: "background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease, transform 0.1s ease"
2181
2286
  },
2182
2287
  cancelButton: {
2183
2288
  background: "transparent",
2184
- color: "rgba(255, 255, 255, 0.5)"
2289
+ color: "#9CA3AF"
2185
2290
  },
2186
2291
  submitButton: {
2187
2292
  color: "white"
@@ -2191,7 +2296,7 @@ var AnnotationPopup = react.forwardRef(
2191
2296
  function AnnotationPopup2({
2192
2297
  element,
2193
2298
  selectedText,
2194
- placeholder = "What should change?",
2299
+ placeholder = "Write your changes?",
2195
2300
  initialValue = "",
2196
2301
  submitLabel = "Add",
2197
2302
  onSubmit,
@@ -2199,7 +2304,8 @@ var AnnotationPopup = react.forwardRef(
2199
2304
  style,
2200
2305
  accentColor = "#3c82f7",
2201
2306
  isExiting = false,
2202
- isMultiSelect = false
2307
+ isMultiSelect = false,
2308
+ isDark = false
2203
2309
  }, ref) {
2204
2310
  const [text, setText] = react.useState(initialValue);
2205
2311
  const [isShaking, setIsShaking] = react.useState(false);
@@ -2265,8 +2371,24 @@ var AnnotationPopup = react.forwardRef(
2265
2371
  },
2266
2372
  [handleSubmit, handleCancel]
2267
2373
  );
2374
+ const popupBg = isDark ? "#1a1a1a" : "#FFFFFF";
2375
+ const popupBorder = isDark ? "rgba(255,255,255,0.08)" : "rgba(0, 0, 0, 0.06)";
2376
+ const elementColor = isDark ? "#9CA3AF" : "#9CA3AF";
2377
+ const quoteBg = isDark ? "#2a2a2a" : "#F9FAFB";
2378
+ const quoteColor = isDark ? "#a1a1aa" : "#6B7280";
2379
+ const textareaBg = isDark ? "#2a2a2a" : "#F9FAFB";
2380
+ const textareaColor = isDark ? "#f0f0f0" : "#1a1a1a";
2381
+ const textareaBorder = isDark ? "#444444" : "#E5E7EB";
2382
+ const hintColor = isDark ? "#666666" : "#C0C5CE";
2383
+ const kbdBg = isDark ? "#333333" : "#F3F4F6";
2384
+ const kbdBorder = isDark ? "#555555" : "#E5E7EB";
2385
+ const cancelColor = isDark ? "#888888" : "#9CA3AF";
2386
+ const cancelHoverBg = isDark ? "#333333" : "#F3F4F6";
2387
+ const cancelHoverColor = isDark ? "#cccccc" : "#6B7280";
2268
2388
  const popupStyle = {
2269
2389
  ...styles.popup,
2390
+ background: popupBg,
2391
+ boxShadow: isDark ? `0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px ${popupBorder}` : `0 4px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px ${popupBorder}`,
2270
2392
  ...animState === "enter" || animState === "entered" ? styles.popupEnter : {},
2271
2393
  ...animState === "exit" ? styles.popupExit : {},
2272
2394
  ...isShaking ? {
@@ -2274,11 +2396,17 @@ var AnnotationPopup = react.forwardRef(
2274
2396
  } : {},
2275
2397
  ...style
2276
2398
  };
2399
+ const effectiveAccentColor = isMultiSelect ? "#34C759" : accentColor;
2277
2400
  const textareaStyle = {
2278
2401
  ...styles.textarea,
2279
- ...isFocused ? { borderColor: accentColor } : {}
2402
+ background: textareaBg,
2403
+ color: textareaColor,
2404
+ border: `1px solid ${textareaBorder}`,
2405
+ ...isFocused ? {
2406
+ borderColor: effectiveAccentColor,
2407
+ boxShadow: `0 0 0 2px ${effectiveAccentColor}18`
2408
+ } : {}
2280
2409
  };
2281
- const effectiveAccentColor = isMultiSelect ? "#34C759" : accentColor;
2282
2410
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2283
2411
  /* @__PURE__ */ jsxRuntime.jsx("style", { children: `
2284
2412
  @keyframes skema-shake {
@@ -2298,8 +2426,11 @@ var AnnotationPopup = react.forwardRef(
2298
2426
  onClick: (e) => e.stopPropagation(),
2299
2427
  onPointerDown: (e) => e.stopPropagation(),
2300
2428
  children: [
2301
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: styles.header, children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: styles.element, children: element }) }),
2302
- selectedText && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles.quote, children: [
2429
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles.header, children: [
2430
+ /* @__PURE__ */ jsxRuntime.jsx(AccentShape, { color: effectiveAccentColor, isMultiSelect }),
2431
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { ...styles.element, color: elementColor }, children: element })
2432
+ ] }),
2433
+ selectedText && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { ...styles.quote, borderLeftColor: effectiveAccentColor, background: quoteBg, color: quoteColor }, children: [
2303
2434
  "\u201C",
2304
2435
  selectedText.slice(0, 80),
2305
2436
  selectedText.length > 80 ? "..." : "",
@@ -2320,51 +2451,504 @@ var AnnotationPopup = react.forwardRef(
2320
2451
  }
2321
2452
  ),
2322
2453
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles.actions, children: [
2454
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { ...styles.hint, color: hintColor }, children: [
2455
+ /* @__PURE__ */ jsxRuntime.jsx("kbd", { style: {
2456
+ fontFamily: "inherit",
2457
+ fontSize: 10,
2458
+ padding: "1px 4px",
2459
+ background: kbdBg,
2460
+ borderRadius: 3,
2461
+ border: `1px solid ${kbdBorder}`
2462
+ }, children: "\u21B5" }),
2463
+ " to send"
2464
+ ] }),
2465
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles.buttonGroup, children: [
2466
+ /* @__PURE__ */ jsxRuntime.jsx(
2467
+ "button",
2468
+ {
2469
+ style: { ...styles.button, ...styles.cancelButton, color: cancelColor },
2470
+ onClick: handleCancel,
2471
+ onMouseEnter: (e) => {
2472
+ e.currentTarget.style.background = cancelHoverBg;
2473
+ e.currentTarget.style.color = cancelHoverColor;
2474
+ },
2475
+ onMouseLeave: (e) => {
2476
+ e.currentTarget.style.background = "transparent";
2477
+ e.currentTarget.style.color = cancelColor;
2478
+ },
2479
+ children: "Cancel"
2480
+ }
2481
+ ),
2482
+ /* @__PURE__ */ jsxRuntime.jsx(
2483
+ "button",
2484
+ {
2485
+ style: {
2486
+ ...styles.button,
2487
+ ...styles.submitButton,
2488
+ backgroundColor: effectiveAccentColor,
2489
+ opacity: text.trim() ? 1 : 0.4
2490
+ },
2491
+ onClick: handleSubmit,
2492
+ disabled: !text.trim(),
2493
+ onMouseEnter: (e) => {
2494
+ if (text.trim()) {
2495
+ e.currentTarget.style.filter = "brightness(0.92)";
2496
+ e.currentTarget.style.transform = "scale(1.02)";
2497
+ }
2498
+ },
2499
+ onMouseLeave: (e) => {
2500
+ e.currentTarget.style.filter = "none";
2501
+ e.currentTarget.style.transform = "scale(1)";
2502
+ },
2503
+ children: submitLabel
2504
+ }
2505
+ )
2506
+ ] })
2507
+ ] })
2508
+ ]
2509
+ }
2510
+ )
2511
+ ] });
2512
+ }
2513
+ );
2514
+
2515
+ // src/assets/logo-dark.ts
2516
+ var svg = `<svg width="560" height="132" viewBox="430 210 560 132" fill="none" xmlns="http://www.w3.org/2000/svg">
2517
+ <path d="M932.899 341.531C914.746 341.531 903.291 329.319 903.291 308.457C903.291 288.867 914.218 278.691 931.489 275.892L971.319 269.787V262.409C971.319 241.547 964.974 234.169 948.232 234.169C932.018 234.169 924.087 241.801 924.087 260.373V261.391H905.23V260.373C905.23 231.625 921.796 210 949.642 210C977.487 210 990 231.879 990 262.154V338.986H972.552V307.439H971.319C966.737 328.81 952.814 341.531 932.899 341.531ZM922.325 306.676C922.325 316.853 927.083 321.687 938.01 321.687C957.925 321.687 971.319 311.001 971.319 286.069L936.952 291.666C927.083 293.447 922.325 296.754 922.325 306.676Z" fill="#1a1a1a"/>
2518
+ <path d="M754.267 338.986H735.233V212.544H752.68V250.706H753.738C756.029 229.59 765.546 210 787.399 210C807.314 210 818.065 227.554 820.532 251.723H821.589C823.881 230.098 833.75 210 855.956 210C878.691 210 890.146 232.388 890.146 262.918V338.986H871.289V270.295C871.289 245.363 864.415 234.678 847.496 234.678C828.815 234.678 822.118 248.416 822.118 276.401V338.986H803.261V270.295C803.261 245.363 796.564 234.678 779.645 234.678C760.787 234.678 754.267 248.416 754.267 276.401V338.986Z" fill="#1a1a1a"/>
2519
+ <path d="M675.684 341.531C646.957 341.531 628.1 318.125 628.1 275.892C628.1 236.459 646.781 210 675.331 210C702.472 210 720.977 231.625 720.977 270.041C720.977 274.62 720.801 278.182 720.272 281.998H645.9C646.605 306.422 654.888 319.397 675.155 319.397C693.484 319.397 701.062 310.747 701.062 295.737V293.701H720.096V295.991C720.096 322.959 701.767 341.531 675.684 341.531ZM674.979 231.625C655.593 231.625 647.133 244.091 646.076 266.734H703.001V266.225C703.001 242.819 693.66 231.625 674.979 231.625Z" fill="#1a1a1a"/>
2520
+ <path d="M548.771 338.986H529.737L529.737 212.544H548.771L548.771 262.663H573.796L600.056 212.544H622.262L589.305 273.348L622.085 338.986H599.703L573.796 287.341H548.771V338.986Z" fill="#1a1a1a"/>
2521
+ <path d="M475.117 341.531C446.919 341.531 430.881 325.503 430.881 296.245V295.482H449.915V297.517C449.915 314.054 456.788 319.397 475.117 319.397C492.212 319.397 497.323 314.309 497.323 303.114C497.323 292.684 493.093 289.376 480.58 286.832L456.612 282.253C440.046 279.2 430 269.023 430 247.907C430 225.773 443.923 210 470.887 210C497.675 210 513.889 225.519 513.889 255.54V256.303H495.032V254.776C495.032 239.766 489.745 231.879 470.358 231.879C454.321 231.879 448.681 236.968 448.681 248.925C448.681 258.847 452.206 262.409 465.424 264.953L485.691 269.023C506.487 272.84 516.004 283.016 516.004 303.878C516.004 327.538 499.79 341.531 475.117 341.531Z" fill="#1a1a1a"/>
2522
+ </svg>`;
2523
+ var logo_dark_default = "data:image/svg+xml," + encodeURIComponent(svg);
2524
+
2525
+ // src/assets/logo-light.ts
2526
+ var svg2 = `<svg width="560" height="132" viewBox="378 168 560 132" fill="none" xmlns="http://www.w3.org/2000/svg">
2527
+ <path d="M880.899 299.531C862.746 299.531 851.291 287.319 851.291 266.457C851.291 246.867 862.218 236.691 879.489 233.892L919.319 227.787V220.409C919.319 199.547 912.974 192.169 896.232 192.169C880.018 192.169 872.087 199.801 872.087 218.373V219.391H853.23V218.373C853.23 189.625 869.796 168 897.642 168C925.487 168 938 189.879 938 220.154V296.986H920.552V265.439H919.319C914.737 286.81 900.814 299.531 880.899 299.531ZM870.325 264.676C870.325 274.853 875.083 279.687 886.01 279.687C905.925 279.687 919.319 269.001 919.319 244.069L884.952 249.666C875.083 251.447 870.325 254.754 870.325 264.676Z" fill="#FFFCFC"/>
2528
+ <path d="M702.267 296.986H683.233V170.544H700.68V208.706H701.738C704.029 187.59 713.546 168 735.399 168C755.314 168 766.065 185.554 768.532 209.723H769.589C771.881 188.098 781.75 168 803.956 168C826.691 168 838.146 190.388 838.146 220.918V296.986H819.289V228.295C819.289 203.363 812.415 192.678 795.496 192.678C776.815 192.678 770.118 206.416 770.118 234.401V296.986H751.261V228.295C751.261 203.363 744.564 192.678 727.645 192.678C708.787 192.678 702.267 206.416 702.267 234.401V296.986Z" fill="#FFFCFC"/>
2529
+ <path d="M623.684 299.531C594.957 299.531 576.1 276.125 576.1 233.892C576.1 194.459 594.781 168 623.331 168C650.472 168 668.977 189.625 668.977 228.041C668.977 232.62 668.801 236.182 668.272 239.998H593.9C594.605 264.422 602.888 277.397 623.155 277.397C641.484 277.397 649.062 268.747 649.062 253.737V251.701H668.096V253.991C668.096 280.959 649.767 299.531 623.684 299.531ZM622.979 189.625C603.593 189.625 595.133 202.091 594.076 224.734H651.001V224.225C651.001 200.819 641.66 189.625 622.979 189.625Z" fill="#FFFCFC"/>
2530
+ <path d="M496.771 296.986H477.737L477.737 170.544H496.771L496.771 220.663H521.796L548.056 170.544H570.262L537.305 231.348L570.085 296.986H547.703L521.796 245.341H496.771V296.986Z" fill="#FFFCFC"/>
2531
+ <path d="M423.117 299.531C394.919 299.531 378.881 283.503 378.881 254.245V253.482H397.915V255.517C397.915 272.054 404.788 277.397 423.117 277.397C440.212 277.397 445.323 272.309 445.323 261.114C445.323 250.684 441.093 247.376 428.58 244.832L404.612 240.253C388.046 237.2 378 227.023 378 205.907C378 183.773 391.923 168 418.887 168C445.675 168 461.889 183.519 461.889 213.54V214.303H443.032V212.776C443.032 197.766 437.745 189.879 418.358 189.879C402.321 189.879 396.681 194.968 396.681 206.925C396.681 216.847 400.206 220.409 413.424 222.953L433.691 227.023C454.487 230.84 464.004 241.016 464.004 261.878C464.004 285.538 447.79 299.531 423.117 299.531Z" fill="#FFFCFC"/>
2532
+ </svg>`;
2533
+ var logo_light_default = "data:image/svg+xml," + encodeURIComponent(svg2);
2534
+ var SKEMA_VERSION = "0.2.0";
2535
+ var SettingsPanel = ({
2536
+ isOpen,
2537
+ onClose,
2538
+ zIndex,
2539
+ connected,
2540
+ mode,
2541
+ provider,
2542
+ availableProviders,
2543
+ providerStatus,
2544
+ mcpServerConnected,
2545
+ mcpClientName,
2546
+ annotationCounts,
2547
+ onModeChange,
2548
+ onProviderChange,
2549
+ theme,
2550
+ onThemeChange
2551
+ }) => {
2552
+ if (!isOpen) return null;
2553
+ const isDark = theme === "dark";
2554
+ const bgColor = isDark ? "#1a1a1a" : "#ffffff";
2555
+ const textColor = isDark ? "#ffffff" : "#1a1a1a";
2556
+ const borderColor = isDark ? "#333333" : "#e5e5e5";
2557
+ const mutedColor = isDark ? "#888888" : "#666666";
2558
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2559
+ "div",
2560
+ {
2561
+ style: {
2562
+ position: "fixed",
2563
+ bottom: 70,
2564
+ right: 16,
2565
+ width: 320,
2566
+ backgroundColor: bgColor,
2567
+ borderRadius: 16,
2568
+ boxShadow: "0 8px 32px rgba(0,0,0,0.2)",
2569
+ zIndex: zIndex + 10,
2570
+ pointerEvents: "auto",
2571
+ overflow: "hidden",
2572
+ border: `1px solid ${borderColor}`
2573
+ },
2574
+ children: [
2575
+ /* @__PURE__ */ jsxRuntime.jsxs(
2576
+ "div",
2577
+ {
2578
+ style: {
2579
+ padding: "16px 20px",
2580
+ borderBottom: `1px solid ${borderColor}`,
2581
+ display: "flex",
2582
+ alignItems: "center",
2583
+ justifyContent: "space-between"
2584
+ },
2585
+ children: [
2586
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10 }, children: [
2587
+ /* @__PURE__ */ jsxRuntime.jsx(SkemaWordmark, { isDark, height: 24 }),
2588
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 12, color: mutedColor }, children: [
2589
+ "v",
2590
+ SKEMA_VERSION
2591
+ ] })
2592
+ ] }),
2323
2593
  /* @__PURE__ */ jsxRuntime.jsx(
2324
- "button",
2594
+ "div",
2325
2595
  {
2326
- style: { ...styles.button, ...styles.cancelButton },
2327
- onClick: handleCancel,
2328
- onMouseEnter: (e) => {
2329
- e.currentTarget.style.background = "rgba(255, 255, 255, 0.1)";
2330
- e.currentTarget.style.color = "rgba(255, 255, 255, 0.8)";
2331
- },
2332
- onMouseLeave: (e) => {
2333
- e.currentTarget.style.background = "transparent";
2334
- e.currentTarget.style.color = "rgba(255, 255, 255, 0.5)";
2596
+ style: {
2597
+ fontSize: 11,
2598
+ padding: "4px 8px",
2599
+ borderRadius: 6,
2600
+ backgroundColor: connected ? "#10b98120" : "#ef444420",
2601
+ color: connected ? "#10b981" : "#ef4444"
2335
2602
  },
2336
- children: "Cancel"
2603
+ children: connected ? "Connected" : "Disconnected"
2604
+ }
2605
+ )
2606
+ ]
2607
+ }
2608
+ ),
2609
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "16px 20px" }, children: [
2610
+ /* @__PURE__ */ jsxRuntime.jsx(SettingRow, { label: "Theme", isDark, textColor, mutedColor, children: /* @__PURE__ */ jsxRuntime.jsx(ThemeIconToggle, { isDark, onToggle: () => onThemeChange(isDark ? "light" : "dark") }) }),
2611
+ !connected && /* @__PURE__ */ jsxRuntime.jsxs(
2612
+ "div",
2613
+ {
2614
+ style: {
2615
+ display: "flex",
2616
+ alignItems: "center",
2617
+ gap: 8,
2618
+ padding: "10px 12px",
2619
+ borderRadius: 10,
2620
+ backgroundColor: isDark ? "#2a1a1a" : "#fef2f2",
2621
+ border: `1px solid ${isDark ? "#3d2020" : "#fecaca"}`,
2622
+ marginBottom: 12
2623
+ },
2624
+ children: [
2625
+ /* @__PURE__ */ jsxRuntime.jsx(
2626
+ "span",
2627
+ {
2628
+ style: {
2629
+ width: 7,
2630
+ height: 7,
2631
+ borderRadius: "50%",
2632
+ backgroundColor: "#ef4444",
2633
+ flexShrink: 0,
2634
+ boxShadow: "0 0 6px #ef444460"
2635
+ }
2636
+ }
2637
+ ),
2638
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
2639
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, fontWeight: 500, color: isDark ? "#fca5a5" : "#dc2626" }, children: "Daemon not running" }),
2640
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 10, color: isDark ? "#888" : "#999", marginTop: 2, lineHeight: 1.3 }, children: [
2641
+ "Run ",
2642
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: "monospace", fontSize: 10, color: isDark ? "#aaa" : "#666" }, children: "npx skema-core" }),
2643
+ " to start"
2644
+ ] })
2645
+ ] })
2646
+ ]
2647
+ }
2648
+ ),
2649
+ /* @__PURE__ */ jsxRuntime.jsx(SettingRow, { label: "Mode", isDark, textColor, mutedColor, disabled: !connected, children: /* @__PURE__ */ jsxRuntime.jsx(
2650
+ ToggleSwitch,
2651
+ {
2652
+ options: ["CLI", "MCP"],
2653
+ value: mode === "mcp" ? 1 : 0,
2654
+ onChange: (idx) => onModeChange(idx === 1 ? "mcp" : "direct-cli"),
2655
+ isDark,
2656
+ disabled: !connected
2657
+ }
2658
+ ) }),
2659
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 11, color: mutedColor, marginTop: -6, marginBottom: 12, lineHeight: 1.4, opacity: connected ? 1 : 0.4 }, children: mode === "mcp" ? "Annotations are queued for your AI agent to process" : "Annotations processed instantly via CLI agents" }),
2660
+ mode === "mcp" && connected && /* @__PURE__ */ jsxRuntime.jsx(
2661
+ McpStatusPanel,
2662
+ {
2663
+ mcpServerConnected,
2664
+ mcpClientName,
2665
+ annotationCounts,
2666
+ isDark,
2667
+ mutedColor
2668
+ }
2669
+ ),
2670
+ mode === "direct-cli" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2671
+ /* @__PURE__ */ jsxRuntime.jsx(SettingRow, { label: "Provider", isDark, textColor, mutedColor, disabled: !connected, children: /* @__PURE__ */ jsxRuntime.jsx(
2672
+ ToggleSwitch,
2673
+ {
2674
+ options: ["Gemini", "Claude"],
2675
+ value: provider === "claude" ? 1 : 0,
2676
+ onChange: (idx) => onProviderChange(idx === 1 ? "claude" : "gemini"),
2677
+ isDark,
2678
+ disabled: !connected
2679
+ }
2680
+ ) }),
2681
+ connected && /* @__PURE__ */ jsxRuntime.jsx(
2682
+ ProviderStatusIndicator,
2683
+ {
2684
+ provider,
2685
+ status: providerStatus[provider],
2686
+ isDark,
2687
+ mutedColor
2688
+ }
2689
+ )
2690
+ ] })
2691
+ ] })
2692
+ ]
2693
+ }
2694
+ );
2695
+ };
2696
+ var SettingRow = ({ label, textColor, disabled, children }) => /* @__PURE__ */ jsxRuntime.jsxs(
2697
+ "div",
2698
+ {
2699
+ style: {
2700
+ display: "flex",
2701
+ alignItems: "center",
2702
+ justifyContent: "space-between",
2703
+ marginBottom: 12
2704
+ },
2705
+ children: [
2706
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 14, color: textColor, opacity: disabled ? 0.4 : 1, transition: "opacity 0.2s ease" }, children: label }),
2707
+ children
2708
+ ]
2709
+ }
2710
+ );
2711
+ var ToggleSwitch = ({ options, value, onChange, isDark, disabled }) => {
2712
+ const bgColor = isDark ? "#2a2a2a" : "#f0f0f0";
2713
+ const activeColor = disabled ? isDark ? "#555" : "#aaa" : "#FF6800";
2714
+ return /* @__PURE__ */ jsxRuntime.jsx(
2715
+ "div",
2716
+ {
2717
+ style: {
2718
+ display: "flex",
2719
+ backgroundColor: bgColor,
2720
+ borderRadius: 8,
2721
+ padding: 2,
2722
+ opacity: disabled ? 0.5 : 1,
2723
+ transition: "opacity 0.2s ease"
2724
+ },
2725
+ children: options.map((option, idx) => /* @__PURE__ */ jsxRuntime.jsx(
2726
+ "button",
2727
+ {
2728
+ onClick: () => !disabled && onChange(idx),
2729
+ disabled,
2730
+ style: {
2731
+ padding: "6px 12px",
2732
+ fontSize: 12,
2733
+ fontWeight: 500,
2734
+ border: "none",
2735
+ borderRadius: 6,
2736
+ cursor: disabled ? "not-allowed" : "pointer",
2737
+ backgroundColor: value === idx ? activeColor : "transparent",
2738
+ color: value === idx ? "white" : isDark ? "#888" : "#666",
2739
+ transition: "all 0.2s ease"
2740
+ },
2741
+ children: option
2742
+ },
2743
+ option
2744
+ ))
2745
+ }
2746
+ );
2747
+ };
2748
+ var CLIENT_NAME_MAP = {
2749
+ "cursor": "Cursor",
2750
+ "claude-desktop": "Claude Desktop",
2751
+ "claude-code": "Claude Code",
2752
+ "windsurf": "Windsurf",
2753
+ "cline": "Cline",
2754
+ "continue": "Continue",
2755
+ "zed": "Zed",
2756
+ "anti-gravity": "Anti-Gravity"
2757
+ };
2758
+ function formatClientName(name) {
2759
+ const lower = name.toLowerCase();
2760
+ return CLIENT_NAME_MAP[lower] || name.charAt(0).toUpperCase() + name.slice(1);
2761
+ }
2762
+ var McpStatusPanel = ({
2763
+ mcpServerConnected,
2764
+ mcpClientName,
2765
+ annotationCounts,
2766
+ isDark,
2767
+ mutedColor
2768
+ }) => {
2769
+ const serverDotColor = mcpServerConnected ? "#10b981" : "#ef4444";
2770
+ const serverStatusText = mcpServerConnected ? mcpClientName ? formatClientName(mcpClientName) : "Connected" : "Not detected";
2771
+ const totalActive = annotationCounts.pending + annotationCounts.acknowledged;
2772
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2773
+ "div",
2774
+ {
2775
+ style: {
2776
+ borderRadius: 10,
2777
+ backgroundColor: isDark ? "#1a2332" : "#f0f7ff",
2778
+ border: `1px solid ${isDark ? "#2a3a4a" : "#d0e4ff"}`,
2779
+ marginBottom: 12,
2780
+ overflow: "hidden"
2781
+ },
2782
+ children: [
2783
+ /* @__PURE__ */ jsxRuntime.jsxs(
2784
+ "div",
2785
+ {
2786
+ style: {
2787
+ display: "flex",
2788
+ alignItems: "center",
2789
+ gap: 8,
2790
+ padding: "10px 14px",
2791
+ borderBottom: totalActive > 0 ? `1px solid ${isDark ? "#2a3a4a" : "#d0e4ff"}` : "none"
2792
+ },
2793
+ children: [
2794
+ /* @__PURE__ */ jsxRuntime.jsx(
2795
+ "span",
2796
+ {
2797
+ style: {
2798
+ width: 7,
2799
+ height: 7,
2800
+ borderRadius: "50%",
2801
+ backgroundColor: serverDotColor,
2802
+ flexShrink: 0,
2803
+ boxShadow: `0 0 6px ${serverDotColor}60`
2804
+ }
2337
2805
  }
2338
2806
  ),
2807
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 12, color: isDark ? "#c8d6e5" : "#333", fontWeight: 500 }, children: "MCP Server" }),
2339
2808
  /* @__PURE__ */ jsxRuntime.jsx(
2340
- "button",
2809
+ "span",
2341
2810
  {
2342
2811
  style: {
2343
- ...styles.button,
2344
- ...styles.submitButton,
2345
- backgroundColor: effectiveAccentColor,
2346
- opacity: text.trim() ? 1 : 0.4
2347
- },
2348
- onClick: handleSubmit,
2349
- disabled: !text.trim(),
2350
- onMouseEnter: (e) => {
2351
- if (text.trim()) {
2352
- e.currentTarget.style.filter = "brightness(0.9)";
2353
- }
2354
- },
2355
- onMouseLeave: (e) => {
2356
- e.currentTarget.style.filter = "none";
2812
+ marginLeft: "auto",
2813
+ fontSize: 11,
2814
+ color: serverDotColor,
2815
+ fontWeight: 500
2357
2816
  },
2358
- children: submitLabel
2817
+ children: serverStatusText
2359
2818
  }
2360
2819
  )
2361
- ] })
2362
- ]
2820
+ ]
2821
+ }
2822
+ ),
2823
+ totalActive > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "8px 14px 10px" }, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: 12 }, children: [
2824
+ /* @__PURE__ */ jsxRuntime.jsx(CountBadge, { label: "Queued", count: annotationCounts.pending, color: "#f59e0b", isDark }),
2825
+ /* @__PURE__ */ jsxRuntime.jsx(CountBadge, { label: "In Progress", count: annotationCounts.acknowledged, color: "#3b82f6", isDark }),
2826
+ /* @__PURE__ */ jsxRuntime.jsx(CountBadge, { label: "Done", count: annotationCounts.resolved, color: "#10b981", isDark })
2827
+ ] }) }),
2828
+ !mcpServerConnected && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "0 14px 10px", fontSize: 10, color: mutedColor, lineHeight: 1.4 }, children: "Configure the Skema MCP server in your AI agent (Cursor, Claude Desktop, etc.) to connect." })
2829
+ ]
2830
+ }
2831
+ );
2832
+ };
2833
+ var CountBadge = ({ label, count, color, isDark }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", flex: 1 }, children: [
2834
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 16, fontWeight: 600, color, lineHeight: 1 }, children: count }),
2835
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 9, color: isDark ? "#778899" : "#888", marginTop: 2 }, children: label })
2836
+ ] });
2837
+ var ProviderStatusIndicator = ({ provider, status, isDark, mutedColor }) => {
2838
+ let dotColor;
2839
+ let statusText;
2840
+ let bgTint;
2841
+ if (!status || status.message === "Checking...") {
2842
+ dotColor = mutedColor;
2843
+ statusText = "Checking...";
2844
+ bgTint = isDark ? "#2a2a2a" : "#f5f5f5";
2845
+ } else if (status.installed && status.authorized) {
2846
+ dotColor = "#10b981";
2847
+ statusText = "Ready";
2848
+ bgTint = isDark ? "#10b98110" : "#10b98110";
2849
+ } else if (status.installed && !status.authorized) {
2850
+ dotColor = "#f59e0b";
2851
+ statusText = "Not authorized";
2852
+ bgTint = isDark ? "#f59e0b10" : "#f59e0b10";
2853
+ } else {
2854
+ dotColor = "#ef4444";
2855
+ statusText = "Not installed";
2856
+ bgTint = isDark ? "#ef444410" : "#ef444410";
2857
+ }
2858
+ const label = provider === "gemini" ? "Gemini CLI" : "Claude Code";
2859
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2860
+ "div",
2861
+ {
2862
+ style: {
2863
+ display: "flex",
2864
+ alignItems: "center",
2865
+ gap: 6,
2866
+ fontSize: 11,
2867
+ color: mutedColor,
2868
+ marginTop: -6,
2869
+ marginBottom: 12,
2870
+ padding: "6px 10px",
2871
+ borderRadius: 8,
2872
+ backgroundColor: bgTint
2873
+ },
2874
+ children: [
2875
+ /* @__PURE__ */ jsxRuntime.jsx(
2876
+ "span",
2877
+ {
2878
+ style: {
2879
+ width: 6,
2880
+ height: 6,
2881
+ borderRadius: "50%",
2882
+ backgroundColor: dotColor,
2883
+ flexShrink: 0,
2884
+ boxShadow: `0 0 4px ${dotColor}60`
2885
+ }
2886
+ }
2887
+ ),
2888
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: label }),
2889
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { marginLeft: "auto", fontSize: 10, color: dotColor, fontWeight: 500 }, children: statusText })
2890
+ ]
2891
+ }
2892
+ );
2893
+ };
2894
+ var ThemeIconToggle = ({ isDark, onToggle }) => /* @__PURE__ */ jsxRuntime.jsx(
2895
+ "button",
2896
+ {
2897
+ onClick: onToggle,
2898
+ title: isDark ? "Switch to light mode" : "Switch to dark mode",
2899
+ style: {
2900
+ display: "flex",
2901
+ alignItems: "center",
2902
+ justifyContent: "center",
2903
+ width: 36,
2904
+ height: 36,
2905
+ border: "none",
2906
+ borderRadius: 10,
2907
+ backgroundColor: isDark ? "#333333" : "#f0f0f0",
2908
+ cursor: "pointer",
2909
+ transition: "all 0.2s ease"
2910
+ },
2911
+ children: isDark ? (
2912
+ // Moon icon
2913
+ /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx(
2914
+ "path",
2915
+ {
2916
+ d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z",
2917
+ fill: "#fbbf24",
2918
+ stroke: "#fbbf24",
2919
+ strokeWidth: "2",
2920
+ strokeLinecap: "round",
2921
+ strokeLinejoin: "round"
2363
2922
  }
2364
- )
2365
- ] });
2923
+ ) })
2924
+ ) : (
2925
+ // Sun icon
2926
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
2927
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "5", fill: "#FF6800", stroke: "#FF6800", strokeWidth: "2" }),
2928
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "12", y1: "1", x2: "12", y2: "3", stroke: "#FF6800", strokeWidth: "2", strokeLinecap: "round" }),
2929
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "12", y1: "21", x2: "12", y2: "23", stroke: "#FF6800", strokeWidth: "2", strokeLinecap: "round" }),
2930
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64", stroke: "#FF6800", strokeWidth: "2", strokeLinecap: "round" }),
2931
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78", stroke: "#FF6800", strokeWidth: "2", strokeLinecap: "round" }),
2932
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "1", y1: "12", x2: "3", y2: "12", stroke: "#FF6800", strokeWidth: "2", strokeLinecap: "round" }),
2933
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "21", y1: "12", x2: "23", y2: "12", stroke: "#FF6800", strokeWidth: "2", strokeLinecap: "round" }),
2934
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36", stroke: "#FF6800", strokeWidth: "2", strokeLinecap: "round" }),
2935
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22", stroke: "#FF6800", strokeWidth: "2", strokeLinecap: "round" })
2936
+ ] })
2937
+ )
2366
2938
  }
2367
2939
  );
2940
+ var SkemaWordmark = ({ isDark, height = 24 }) => {
2941
+ const src = isDark ? logo_light_default : logo_dark_default;
2942
+ return /* @__PURE__ */ jsxRuntime.jsx(
2943
+ "img",
2944
+ {
2945
+ src,
2946
+ alt: "Skema",
2947
+ height,
2948
+ style: { height, width: "auto", display: "block" }
2949
+ }
2950
+ );
2951
+ };
2368
2952
  function useKeyboardShortcuts({ onToggle, shortcut = "mod+shift+e" }) {
2369
2953
  react.useEffect(() => {
2370
2954
  const handleKeyDown = (e) => {
@@ -2737,6 +3321,7 @@ var SkemaOverlays = () => {
2737
3321
  };
2738
3322
 
2739
3323
  // src/lib/tldrawConfig.ts
3324
+ tldraw.DefaultColorThemePalette.darkMode.black = tldraw.DefaultColorThemePalette.lightMode.black;
2740
3325
  var skemaComponents = {
2741
3326
  Toolbar: null,
2742
3327
  Overlays: SkemaOverlays,
@@ -2817,7 +3402,6 @@ var Skema = ({
2817
3402
  zIndex = 99999,
2818
3403
  isProcessing: externalIsProcessing
2819
3404
  }) => {
2820
- const [isActive, setIsActive] = react.useState(enabled);
2821
3405
  const [annotations, setAnnotations] = react.useState(initialAnnotations);
2822
3406
  const [domSelections, setDomSelections] = react.useState([]);
2823
3407
  const [pendingAnnotation, setPendingAnnotation] = react.useState(null);
@@ -2828,12 +3412,30 @@ var Skema = ({
2828
3412
  const [internalIsProcessing, setInternalIsProcessing] = react.useState(false);
2829
3413
  const [isToolbarExpanded, setIsToolbarExpanded] = react.useState(false);
2830
3414
  const [isStylePanelOpen, setIsStylePanelOpen] = react.useState(false);
3415
+ const [currentToolId, setCurrentToolId] = react.useState("select");
3416
+ const [theme, setTheme] = react.useState(() => {
3417
+ if (typeof window !== "undefined") {
3418
+ return localStorage.getItem("skema-theme") || "light";
3419
+ }
3420
+ return "light";
3421
+ });
3422
+ const isDark = theme === "dark";
3423
+ react.useEffect(() => {
3424
+ if (typeof window !== "undefined") {
3425
+ localStorage.setItem("skema-theme", theme);
3426
+ }
3427
+ if (editorRef.current) {
3428
+ editorRef.current.user.updateUserPreferences({ colorScheme: theme });
3429
+ }
3430
+ }, [theme]);
2831
3431
  const annotationChangesRef = react.useRef(/* @__PURE__ */ new Map());
2832
3432
  const {
2833
3433
  state: daemonState,
2834
3434
  isGenerating,
2835
3435
  generate,
2836
- revert
3436
+ revert,
3437
+ setMode,
3438
+ setProvider
2837
3439
  } = useDaemon({
2838
3440
  url: daemonUrl || "ws://localhost:9999",
2839
3441
  autoConnect: daemonUrl !== null,
@@ -2889,14 +3491,17 @@ var Skema = ({
2889
3491
  const lastDoubleClickRef = react.useRef(0);
2890
3492
  const cleanupRef = react.useRef(null);
2891
3493
  useKeyboardShortcuts({
2892
- onToggle: react.useCallback(() => setIsActive((prev) => !prev), []),
3494
+ onToggle: react.useCallback(() => {
3495
+ setIsToolbarExpanded((prev) => !prev);
3496
+ setIsStylePanelOpen(false);
3497
+ }, []),
2893
3498
  shortcut: toggleShortcut
2894
3499
  });
2895
- const scrollOffset = useScrollSync(isActive, editorRef);
2896
- useWheelIntercept(isActive);
2897
- useShapePersistence(isActive, editorRef);
3500
+ const scrollOffset = useScrollSync(isToolbarExpanded, editorRef);
3501
+ useWheelIntercept(isToolbarExpanded);
3502
+ useShapePersistence(isToolbarExpanded, editorRef);
2898
3503
  useScribbleDelete({
2899
- isActive,
3504
+ isActive: isToolbarExpanded,
2900
3505
  editorRef,
2901
3506
  setAnnotations,
2902
3507
  setScribbleToast
@@ -2917,7 +3522,7 @@ var Skema = ({
2917
3522
  };
2918
3523
  }, []);
2919
3524
  react.useEffect(() => {
2920
- if (!isActive) return;
3525
+ if (!isToolbarExpanded) return;
2921
3526
  const handleResize = () => {
2922
3527
  setDomSelections((prevSelections) => {
2923
3528
  if (prevSelections.length === 0) return prevSelections;
@@ -3003,7 +3608,7 @@ var Skema = ({
3003
3608
  };
3004
3609
  window.addEventListener("resize", handleResize);
3005
3610
  return () => window.removeEventListener("resize", handleResize);
3006
- }, [isActive]);
3611
+ }, [isToolbarExpanded]);
3007
3612
  const getSelectedDrawings = react.useCallback(() => {
3008
3613
  if (!editorRef.current) return [];
3009
3614
  const editor = editorRef.current;
@@ -3266,6 +3871,9 @@ var Skema = ({
3266
3871
  onProcessingCancel?.();
3267
3872
  }
3268
3873
  setProcessingBoundingBox(null);
3874
+ if (editorRef.current) {
3875
+ editorRef.current.setSelectedShapes([]);
3876
+ }
3269
3877
  setTimeout(() => {
3270
3878
  setPendingAnnotation(null);
3271
3879
  setPendingExiting(false);
@@ -3387,6 +3995,7 @@ var Skema = ({
3387
3995
  }, [domSelections, handleDOMSelect, handleMultiDOMSelect, handleDrawingAnnotation]);
3388
3996
  const handleMount = react.useCallback((editor) => {
3389
3997
  editorRef.current = editor;
3998
+ editor.user.updateUserPreferences({ colorScheme: theme });
3390
3999
  editor.setStyleForNextShapes(tldraw.ArrowShapeKindStyle, "arc");
3391
4000
  try {
3392
4001
  const selectIdleState = editor.getStateDescendant("select.idle");
@@ -3457,9 +4066,14 @@ var Skema = ({
3457
4066
  lastBrush = next.brush;
3458
4067
  }
3459
4068
  });
3460
- }, [handleDOMSelect, handleBrushSelection, handleLassoSelection, handleMultiDOMSelect, handleDrawingAnnotation]);
4069
+ const handleToolChange = () => {
4070
+ const toolId = editor.getCurrentToolId();
4071
+ setCurrentToolId((prev) => prev !== toolId ? toolId : prev);
4072
+ };
4073
+ editor.sideEffects.registerAfterChangeHandler("instance", handleToolChange);
4074
+ }, [handleDOMSelect, handleBrushSelection, handleLassoSelection, handleMultiDOMSelect, handleDrawingAnnotation, theme]);
3461
4075
  react.useEffect(() => {
3462
- if (!isActive) return;
4076
+ if (!isToolbarExpanded) return;
3463
4077
  const handlePointerDown = (e) => {
3464
4078
  if (e.button !== 0) return;
3465
4079
  const target = e.target;
@@ -3475,8 +4089,8 @@ var Skema = ({
3475
4089
  };
3476
4090
  document.addEventListener("pointerdown", handlePointerDown, { capture: true });
3477
4091
  return () => document.removeEventListener("pointerdown", handlePointerDown, { capture: true });
3478
- }, [isActive, pendingAnnotation, handleAnnotationCancel]);
3479
- if (!isActive) {
4092
+ }, [isToolbarExpanded, pendingAnnotation, handleAnnotationCancel]);
4093
+ if (!enabled) {
3480
4094
  return null;
3481
4095
  }
3482
4096
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -3491,21 +4105,16 @@ var Skema = ({
3491
4105
  },
3492
4106
  children: [
3493
4107
  /* @__PURE__ */ jsxRuntime.jsx("style", { children: skemaHiddenUiStyles }),
3494
- !isStylePanelOpen && /* @__PURE__ */ jsxRuntime.jsx("style", { children: `
3495
- .tlui-style-panel__wrapper,
3496
- .tlui-style-panel {
3497
- display: none !important;
3498
- }
3499
- ` }),
3500
- isStylePanelOpen && /* @__PURE__ */ jsxRuntime.jsx("style", { children: `
3501
- .tlui-style-panel__wrapper {
3502
- position: fixed !important;
3503
- bottom: 68px !important;
3504
- right: 16px !important;
3505
- top: auto !important;
3506
- left: auto !important;
3507
- }
3508
- ` }),
4108
+ /* @__PURE__ */ jsxRuntime.jsx("style", { children: `
4109
+ .tlui-style-panel__wrapper {
4110
+ position: fixed !important;
4111
+ top: 16px !important;
4112
+ right: 16px !important;
4113
+ bottom: auto !important;
4114
+ left: auto !important;
4115
+ ${isToolbarExpanded && (currentToolId === "draw" || currentToolId === "geo") ? "" : "display: none !important;"}
4116
+ }
4117
+ ` }),
3509
4118
  isToolbarExpanded && /* @__PURE__ */ jsxRuntime.jsx(
3510
4119
  "button",
3511
4120
  {
@@ -3520,7 +4129,7 @@ var Skema = ({
3520
4129
  display: "flex",
3521
4130
  alignItems: "center",
3522
4131
  justifyContent: "center",
3523
- backgroundColor: isStylePanelOpen ? "#FF6800" : "white",
4132
+ backgroundColor: isStylePanelOpen ? "#FF6800" : isDark ? "#2a2a2a" : "white",
3524
4133
  border: "none",
3525
4134
  borderRadius: 12,
3526
4135
  boxShadow: "0 2px 10px rgba(0,0,0,0.15)",
@@ -3534,7 +4143,7 @@ var Skema = ({
3534
4143
  "path",
3535
4144
  {
3536
4145
  d: "M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z",
3537
- stroke: isStylePanelOpen ? "white" : "#6B7280",
4146
+ stroke: isStylePanelOpen ? "white" : isDark ? "#9CA3AF" : "#6B7280",
3538
4147
  strokeWidth: "2",
3539
4148
  strokeLinecap: "round",
3540
4149
  strokeLinejoin: "round"
@@ -3544,7 +4153,7 @@ var Skema = ({
3544
4153
  "path",
3545
4154
  {
3546
4155
  d: "M19.4 15C19.2669 15.3016 19.2272 15.6362 19.286 15.9606C19.3448 16.285 19.4995 16.5843 19.73 16.82L19.79 16.88C19.976 17.0657 20.1235 17.2863 20.2241 17.5291C20.3248 17.7719 20.3766 18.0322 20.3766 18.295C20.3766 18.5578 20.3248 18.8181 20.2241 19.0609C20.1235 19.3037 19.976 19.5243 19.79 19.71C19.6043 19.896 19.3837 20.0435 19.1409 20.1441C18.8981 20.2448 18.6378 20.2966 18.375 20.2966C18.1122 20.2966 17.8519 20.2448 17.6091 20.1441C17.3663 20.0435 17.1457 19.896 16.96 19.71L16.9 19.65C16.6643 19.4195 16.365 19.2648 16.0406 19.206C15.7162 19.1472 15.3816 19.1869 15.08 19.32C14.7842 19.4468 14.532 19.6572 14.3543 19.9255C14.1766 20.1938 14.0813 20.5082 14.08 20.83V21C14.08 21.5304 13.8693 22.0391 13.4942 22.4142C13.1191 22.7893 12.6104 23 12.08 23C11.5496 23 11.0409 22.7893 10.6658 22.4142C10.2907 22.0391 10.08 21.5304 10.08 21V20.91C10.0723 20.579 9.96512 20.258 9.77251 19.9887C9.5799 19.7194 9.31074 19.5143 9 19.4C8.69838 19.2669 8.36381 19.2272 8.03941 19.286C7.71502 19.3448 7.41568 19.4995 7.18 19.73L7.12 19.79C6.93425 19.976 6.71368 20.1235 6.47088 20.2241C6.22808 20.3248 5.96783 20.3766 5.705 20.3766C5.44217 20.3766 5.18192 20.3248 4.93912 20.2241C4.69632 20.1235 4.47575 19.976 4.29 19.79C4.10405 19.6043 3.95653 19.3837 3.85588 19.1409C3.75523 18.8981 3.70343 18.6378 3.70343 18.375C3.70343 18.1122 3.75523 17.8519 3.85588 17.6091C3.95653 17.3663 4.10405 17.1457 4.29 16.96L4.35 16.9C4.58054 16.6643 4.73519 16.365 4.794 16.0406C4.85282 15.7162 4.81312 15.3816 4.68 15.08C4.55324 14.7842 4.34276 14.532 4.07447 14.3543C3.80618 14.1766 3.49179 14.0813 3.17 14.08H3C2.46957 14.08 1.96086 13.8693 1.58579 13.4942C1.21071 13.1191 1 12.6104 1 12.08C1 11.5496 1.21071 11.0409 1.58579 10.6658C1.96086 10.2907 2.46957 10.08 3 10.08H3.09C3.42099 10.0723 3.742 9.96512 4.0113 9.77251C4.28059 9.5799 4.48572 9.31074 4.6 9C4.73312 8.69838 4.77282 8.36381 4.714 8.03941C4.65519 7.71502 4.50054 7.41568 4.27 7.18L4.21 7.12C4.02405 6.93425 3.87653 6.71368 3.77588 6.47088C3.67523 6.22808 3.62343 5.96783 3.62343 5.705C3.62343 5.44217 3.67523 5.18192 3.77588 4.93912C3.87653 4.69632 4.02405 4.47575 4.21 4.29C4.39575 4.10405 4.61632 3.95653 4.85912 3.85588C5.10192 3.75523 5.36217 3.70343 5.625 3.70343C5.88783 3.70343 6.14808 3.75523 6.39088 3.85588C6.63368 3.95653 6.85425 4.10405 7.04 4.29L7.1 4.35C7.33568 4.58054 7.63502 4.73519 7.95941 4.794C8.28381 4.85282 8.61838 4.81312 8.92 4.68H9C9.29577 4.55324 9.54802 4.34276 9.72569 4.07447C9.90337 3.80618 9.99872 3.49179 10 3.17V3C10 2.46957 10.2107 1.96086 10.5858 1.58579C10.9609 1.21071 11.4696 1 12 1C12.5304 1 13.0391 1.21071 13.4142 1.58579C13.7893 1.96086 14 2.46957 14 3V3.09C14.0013 3.41179 14.0966 3.72618 14.2743 3.99447C14.452 4.26276 14.7042 4.47324 15 4.6C15.3016 4.73312 15.6362 4.77282 15.9606 4.714C16.285 4.65519 16.5843 4.50054 16.82 4.27L16.88 4.21C17.0657 4.02405 17.2863 3.87653 17.5291 3.77588C17.7719 3.67523 18.0322 3.62343 18.295 3.62343C18.5578 3.62343 18.8181 3.67523 19.0609 3.77588C19.3037 3.87653 19.5243 4.02405 19.71 4.21C19.896 4.39575 20.0435 4.61632 20.1441 4.85912C20.2448 5.10192 20.2966 5.36217 20.2966 5.625C20.2966 5.88783 20.2448 6.14808 20.1441 6.39088C20.0435 6.63368 19.896 6.85425 19.71 7.04L19.65 7.1C19.4195 7.33568 19.2648 7.63502 19.206 7.95941C19.1472 8.28381 19.1869 8.61838 19.32 8.92V9C19.4468 9.29577 19.6572 9.54802 19.9255 9.72569C20.1938 9.90337 20.5082 9.99872 20.83 10H21C21.5304 10 22.0391 10.2107 22.4142 10.5858C22.7893 10.9609 23 11.4696 23 12C23 12.5304 22.7893 13.0391 22.4142 13.4142C22.0391 13.7893 21.5304 14 21 14H20.91C20.5882 14.0013 20.2738 14.0966 20.0055 14.2743C19.7372 14.452 19.5268 14.7042 19.4 15Z",
3547
- stroke: isStylePanelOpen ? "white" : "#6B7280",
4156
+ stroke: isStylePanelOpen ? "white" : isDark ? "#9CA3AF" : "#6B7280",
3548
4157
  strokeWidth: "2",
3549
4158
  strokeLinecap: "round",
3550
4159
  strokeLinejoin: "round"
@@ -3553,13 +4162,33 @@ var Skema = ({
3553
4162
  ] })
3554
4163
  }
3555
4164
  ),
4165
+ /* @__PURE__ */ jsxRuntime.jsx(
4166
+ SettingsPanel,
4167
+ {
4168
+ isOpen: isStylePanelOpen,
4169
+ onClose: () => setIsStylePanelOpen(false),
4170
+ zIndex,
4171
+ connected: daemonState.connected,
4172
+ mode: daemonState.mode,
4173
+ provider: daemonState.provider,
4174
+ availableProviders: daemonState.availableProviders,
4175
+ providerStatus: daemonState.providerStatus,
4176
+ mcpServerConnected: daemonState.mcpServerConnected,
4177
+ mcpClientName: daemonState.mcpClientName,
4178
+ annotationCounts: daemonState.annotationCounts,
4179
+ onModeChange: setMode,
4180
+ onProviderChange: setProvider,
4181
+ theme,
4182
+ onThemeChange: setTheme
4183
+ }
4184
+ ),
3556
4185
  /* @__PURE__ */ jsxRuntime.jsx(
3557
4186
  "div",
3558
4187
  {
3559
4188
  style: {
3560
4189
  position: "absolute",
3561
4190
  inset: 0,
3562
- pointerEvents: "auto"
4191
+ pointerEvents: isToolbarExpanded ? "auto" : "none"
3563
4192
  },
3564
4193
  children: /* @__PURE__ */ jsxRuntime.jsx(
3565
4194
  tldraw.Tldraw,
@@ -3574,8 +4203,10 @@ var Skema = ({
3574
4203
  children: /* @__PURE__ */ jsxRuntime.jsx(
3575
4204
  SkemaToolbar,
3576
4205
  {
4206
+ isExpanded: isToolbarExpanded,
3577
4207
  onExpandedChange: setIsToolbarExpanded,
3578
- onStylePanelChange: setIsStylePanelOpen
4208
+ onStylePanelChange: setIsStylePanelOpen,
4209
+ isDark
3579
4210
  }
3580
4211
  )
3581
4212
  }
@@ -3627,12 +4258,13 @@ var Skema = ({
3627
4258
  ref: popupRef,
3628
4259
  element: pendingAnnotation.element,
3629
4260
  selectedText: pendingAnnotation.selectedText,
3630
- placeholder: pendingAnnotation.annotationType === "drawing" ? "What does this drawing mean?" : pendingAnnotation.isMultiSelect ? "What should change about these elements?" : "What should change?",
4261
+ placeholder: pendingAnnotation.annotationType === "drawing" ? "What does this drawing mean?" : pendingAnnotation.isMultiSelect ? "What should change about these elements?" : "Write your changes",
3631
4262
  onSubmit: handleAnnotationSubmit,
3632
4263
  onCancel: handleAnnotationCancel,
3633
4264
  isExiting: pendingExiting,
3634
4265
  isMultiSelect: pendingAnnotation.isMultiSelect,
3635
4266
  accentColor: pendingAnnotation.isMultiSelect ? "#34C759" : "#3b82f6",
4267
+ isDark,
3636
4268
  style: {
3637
4269
  left: Math.max(160, Math.min(window.innerWidth - 160, pendingAnnotation.x / 100 * window.innerWidth)),
3638
4270
  ...pendingAnnotation.clientY > window.innerHeight - 250 ? { bottom: window.innerHeight - pendingAnnotation.clientY + 30 } : { top: pendingAnnotation.clientY + 30 },
@@ -3650,35 +4282,6 @@ var Skema = ({
3650
4282
  onExport: handleExport
3651
4283
  }
3652
4284
  ),
3653
- /* @__PURE__ */ jsxRuntime.jsxs(
3654
- "div",
3655
- {
3656
- "data-skema": "toggle-hint",
3657
- style: {
3658
- position: "fixed",
3659
- bottom: 16,
3660
- left: 16,
3661
- padding: "8px 12px",
3662
- backgroundColor: "rgba(0, 0, 0, 0.7)",
3663
- color: "white",
3664
- borderRadius: "6px",
3665
- fontSize: "12px",
3666
- pointerEvents: "none",
3667
- zIndex: zIndex + 1
3668
- },
3669
- children: [
3670
- "Press ",
3671
- /* @__PURE__ */ jsxRuntime.jsx("kbd", { style: {
3672
- backgroundColor: "rgba(255,255,255,0.2)",
3673
- padding: "2px 6px",
3674
- borderRadius: "3px",
3675
- marginLeft: "4px",
3676
- marginRight: "4px"
3677
- }, children: "\u2318\u21E7E" }),
3678
- " to toggle Skema"
3679
- ]
3680
- }
3681
- ),
3682
4285
  scribbleToast && /* @__PURE__ */ jsxRuntime.jsx(
3683
4286
  "div",
3684
4287
  {