@industry-theme/file-editing-panels 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/{index-TBMiP6Sa.js → index-B8t5ZXru.js} +2 -2
  2. package/dist/{index-TBMiP6Sa.js.map → index-B8t5ZXru.js.map} +1 -1
  3. package/dist/{index-CDkarLuR.js → index-BCmAXJzV.js} +2 -2
  4. package/dist/{index-CDkarLuR.js.map → index-BCmAXJzV.js.map} +1 -1
  5. package/dist/{index-D1BS_vz8.js → index-BlPaGZBk.js} +2 -2
  6. package/dist/{index-D1BS_vz8.js.map → index-BlPaGZBk.js.map} +1 -1
  7. package/dist/{index-CjyvtorY.js → index-C-79HWPu.js} +2 -2
  8. package/dist/{index-CjyvtorY.js.map → index-C-79HWPu.js.map} +1 -1
  9. package/dist/{index-ZhCVoili.js → index-C3nS7Yiu.js} +2 -2
  10. package/dist/{index-ZhCVoili.js.map → index-C3nS7Yiu.js.map} +1 -1
  11. package/dist/{index-BxXSPvaU.js → index-C6qWcx_6.js} +2 -2
  12. package/dist/{index-BxXSPvaU.js.map → index-C6qWcx_6.js.map} +1 -1
  13. package/dist/{index-BUkJBACP.js → index-CGg_iuSE.js} +2 -2
  14. package/dist/{index-BUkJBACP.js.map → index-CGg_iuSE.js.map} +1 -1
  15. package/dist/{index-BjkLI8D3.js → index-CR6Xoofu.js} +2 -2
  16. package/dist/{index-BjkLI8D3.js.map → index-CR6Xoofu.js.map} +1 -1
  17. package/dist/{index-CQtBr0UY.js → index-DAj-6bKc.js} +2 -2
  18. package/dist/{index-CQtBr0UY.js.map → index-DAj-6bKc.js.map} +1 -1
  19. package/dist/{index-Bet4c99j.js → index-DDHzET8H.js} +2 -2
  20. package/dist/{index-Bet4c99j.js.map → index-DDHzET8H.js.map} +1 -1
  21. package/dist/{index-Bg6SAM4G.js → index-DD_kem6H.js} +2 -2
  22. package/dist/{index-Bg6SAM4G.js.map → index-DD_kem6H.js.map} +1 -1
  23. package/dist/{index-BRiZ41Yj.js → index-DbJYCA_w.js} +777 -568
  24. package/dist/index-DbJYCA_w.js.map +1 -0
  25. package/dist/{index-ZGazVsqS.js → index-DiH_VlCK.js} +2 -2
  26. package/dist/{index-ZGazVsqS.js.map → index-DiH_VlCK.js.map} +1 -1
  27. package/dist/{index-u6DfL9YL.js → index-DuVYHq19.js} +2 -2
  28. package/dist/{index-u6DfL9YL.js.map → index-DuVYHq19.js.map} +1 -1
  29. package/dist/{index-CkLdyOmv.js → index-RAIU1e6Y.js} +2 -2
  30. package/dist/{index-CkLdyOmv.js.map → index-RAIU1e6Y.js.map} +1 -1
  31. package/dist/{index-DVQA1GI6.js → index-UJ416dxI.js} +2 -2
  32. package/dist/{index-DVQA1GI6.js.map → index-UJ416dxI.js.map} +1 -1
  33. package/dist/{index-Ds9lMu-c.js → index-uuzekAfi.js} +2 -2
  34. package/dist/{index-Ds9lMu-c.js.map → index-uuzekAfi.js.map} +1 -1
  35. package/dist/{index-DR6-tbJq.js → index-x8WsxVsf.js} +2 -2
  36. package/dist/{index-DR6-tbJq.js.map → index-x8WsxVsf.js.map} +1 -1
  37. package/dist/index.d.ts +24 -7
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/mocks/panelContext.d.ts +29 -2
  40. package/dist/mocks/panelContext.d.ts.map +1 -1
  41. package/dist/panels/FileEditorPanel/FileEditorPanel.d.ts +11 -16
  42. package/dist/panels/FileEditorPanel/FileEditorPanel.d.ts.map +1 -1
  43. package/dist/panels/FileEditorPanel/FileEditorPanel.stories.d.ts +9 -8
  44. package/dist/panels/FileEditorPanel/FileEditorPanel.stories.d.ts.map +1 -1
  45. package/dist/panels/FileEditorPanel/index.d.ts +0 -1
  46. package/dist/panels/FileEditorPanel/index.d.ts.map +1 -1
  47. package/dist/panels/GitDiffPanel/GitDiffPanel.d.ts +10 -12
  48. package/dist/panels/GitDiffPanel/GitDiffPanel.d.ts.map +1 -1
  49. package/dist/panels/GitDiffPanel/GitDiffPanel.stories.d.ts +9 -5
  50. package/dist/panels/GitDiffPanel/GitDiffPanel.stories.d.ts.map +1 -1
  51. package/dist/panels/GitDiffPanel/index.d.ts +0 -1
  52. package/dist/panels/GitDiffPanel/index.d.ts.map +1 -1
  53. package/dist/panels/MDXEditorPanel/MDXEditorPanel.d.ts +11 -16
  54. package/dist/panels/MDXEditorPanel/MDXEditorPanel.d.ts.map +1 -1
  55. package/dist/panels/MDXEditorPanel/MDXEditorPanel.stories.d.ts +7 -8
  56. package/dist/panels/MDXEditorPanel/MDXEditorPanel.stories.d.ts.map +1 -1
  57. package/dist/panels/MDXEditorPanel/index.d.ts +0 -1
  58. package/dist/panels/MDXEditorPanel/index.d.ts.map +1 -1
  59. package/dist/panels.bundle.js +14 -6
  60. package/package.json +2 -2
  61. package/dist/index-BRiZ41Yj.js.map +0 -1
  62. package/dist/panels.bundle.css +0 -2280
@@ -3,8 +3,8 @@ var __defNormalProp = (obj, key, value2) => key in obj ? __defProp(obj, key, { e
3
3
  var __publicField = (obj, key, value2) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value2);
4
4
  import { jsx as jsx$1, jsxs, Fragment } from "react/jsx-runtime";
5
5
  import * as React__default from "react";
6
- import React__default__default, { createContext, useContext, forwardRef, createElement, useState, useMemo, useEffect, useRef, useCallback, useLayoutEffect, Suspense, useReducer, useImperativeHandle } from "react";
7
- import { ThemedMonacoDiffEditor, ThemedMonacoWithProvider } from "@principal-ade/industry-themed-monaco-editor";
6
+ import React__default__default, { createContext, useContext, forwardRef, createElement, useState, useRef, useEffect, useCallback, useMemo, useLayoutEffect, Suspense, useReducer, useImperativeHandle } from "react";
7
+ import { ThemedMonacoWithProvider, ThemedMonacoDiffEditor } from "@principal-ade/industry-themed-monaco-editor";
8
8
  import * as ReactDOM from "react-dom";
9
9
  import ReactDOM__default, { flushSync, createPortal } from "react-dom";
10
10
  var ThemeContext;
@@ -172,411 +172,6 @@ const __iconNode = [
172
172
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
173
173
  ];
174
174
  const X$4 = createLucideIcon("x", __iconNode);
175
- const statusMeta = {
176
- staged: {
177
- label: "Staged change",
178
- description: "Comparing staged changes against the last commit"
179
- },
180
- unstaged: {
181
- label: "Unstaged change",
182
- description: "Comparing working tree changes against the last commit"
183
- },
184
- untracked: {
185
- label: "Untracked file",
186
- description: "New file compared against an empty baseline"
187
- },
188
- deleted: {
189
- label: "Deleted file",
190
- description: "Showing the last committed contents of the deleted file"
191
- }
192
- };
193
- const languageFromPath = (filePath) => {
194
- var _a2;
195
- if (!filePath) {
196
- return "plaintext";
197
- }
198
- const ext = ((_a2 = filePath.split(".").pop()) == null ? void 0 : _a2.toLowerCase()) ?? "";
199
- const languageMap = {
200
- js: "javascript",
201
- jsx: "javascript",
202
- ts: "typescript",
203
- tsx: "typescript",
204
- py: "python",
205
- java: "java",
206
- c: "c",
207
- cpp: "cpp",
208
- h: "c",
209
- hpp: "cpp",
210
- cs: "csharp",
211
- go: "go",
212
- rs: "rust",
213
- php: "php",
214
- rb: "ruby",
215
- swift: "swift",
216
- kt: "kotlin",
217
- json: "json",
218
- yaml: "yaml",
219
- yml: "yaml",
220
- toml: "toml",
221
- ini: "ini",
222
- cfg: "ini",
223
- conf: "ini",
224
- xml: "xml",
225
- html: "html",
226
- css: "css",
227
- scss: "scss",
228
- sass: "sass",
229
- less: "less",
230
- sh: "bash",
231
- bash: "bash",
232
- zsh: "bash",
233
- md: "markdown",
234
- mdx: "markdown",
235
- sql: "sql"
236
- };
237
- return languageMap[ext] ?? "plaintext";
238
- };
239
- const GitDiffPanel = ({
240
- filePath,
241
- status = "unstaged",
242
- diffProvider,
243
- onClose
244
- }) => {
245
- const { theme: theme2 } = useTheme();
246
- const [originalContent, setOriginalContent] = useState("");
247
- const [modifiedContent, setModifiedContent] = useState("");
248
- const [isLoading, setIsLoading] = useState(false);
249
- const [error, setError] = useState(null);
250
- const language2 = useMemo(() => languageFromPath(filePath), [filePath]);
251
- useEffect(() => {
252
- let isActive = true;
253
- const loadDiff = async () => {
254
- if (!filePath) {
255
- setOriginalContent("");
256
- setModifiedContent("");
257
- setIsLoading(false);
258
- setError(null);
259
- return;
260
- }
261
- setIsLoading(true);
262
- setError(null);
263
- try {
264
- const [original, modified] = await Promise.all([
265
- diffProvider.getOriginal(filePath, status),
266
- diffProvider.getModified(filePath, status)
267
- ]);
268
- if (!isActive) return;
269
- setOriginalContent(original ?? "");
270
- setModifiedContent(modified ?? "");
271
- } catch (err) {
272
- if (!isActive) return;
273
- console.error("Failed to load git diff:", err);
274
- setError(
275
- err instanceof Error ? `Failed to load diff: ${err.message}` : "Failed to load diff"
276
- );
277
- setOriginalContent("");
278
- setModifiedContent("");
279
- } finally {
280
- if (isActive) {
281
- setIsLoading(false);
282
- }
283
- }
284
- };
285
- void loadDiff();
286
- return () => {
287
- isActive = false;
288
- };
289
- }, [filePath, status, diffProvider]);
290
- const statusInfo = status ? statusMeta[status] : null;
291
- const statusColor = useMemo(() => {
292
- if (!status) return theme2.colors.textSecondary;
293
- switch (status) {
294
- case "staged":
295
- return theme2.colors.success || "#10b981";
296
- case "unstaged":
297
- return theme2.colors.warning || "#f59e0b";
298
- case "untracked":
299
- return theme2.colors.info || theme2.colors.primary || "#3b82f6";
300
- case "deleted":
301
- return theme2.colors.error || "#ef4444";
302
- default:
303
- return theme2.colors.textSecondary;
304
- }
305
- }, [status, theme2.colors]);
306
- if (!filePath) {
307
- return /* @__PURE__ */ jsx$1(
308
- "div",
309
- {
310
- style: {
311
- height: "100%",
312
- display: "flex",
313
- alignItems: "center",
314
- justifyContent: "center",
315
- color: theme2.colors.textSecondary,
316
- backgroundColor: theme2.colors.backgroundSecondary
317
- },
318
- children: "Select a file from Git Changes to view its diff."
319
- }
320
- );
321
- }
322
- return /* @__PURE__ */ jsxs(
323
- "div",
324
- {
325
- style: {
326
- height: "100%",
327
- display: "flex",
328
- flexDirection: "column",
329
- backgroundColor: theme2.colors.background
330
- },
331
- children: [
332
- /* @__PURE__ */ jsxs(
333
- "div",
334
- {
335
- style: {
336
- padding: "12px 16px",
337
- borderBottom: `1px solid ${theme2.colors.border}`,
338
- display: "flex",
339
- justifyContent: "space-between",
340
- alignItems: "center",
341
- backgroundColor: theme2.colors.backgroundSecondary
342
- },
343
- children: [
344
- /* @__PURE__ */ jsx$1(
345
- "div",
346
- {
347
- style: {
348
- display: "flex",
349
- alignItems: "center",
350
- gap: "12px",
351
- minWidth: 0
352
- },
353
- children: /* @__PURE__ */ jsxs(
354
- "div",
355
- {
356
- style: {
357
- display: "flex",
358
- alignItems: "center",
359
- gap: "8px",
360
- minWidth: 0
361
- },
362
- children: [
363
- /* @__PURE__ */ jsx$1(
364
- "div",
365
- {
366
- style: {
367
- width: "32px",
368
- height: "32px",
369
- borderRadius: "6px",
370
- backgroundColor: theme2.colors.backgroundTertiary,
371
- display: "flex",
372
- alignItems: "center",
373
- justifyContent: "center",
374
- color: theme2.colors.text
375
- },
376
- children: /* @__PURE__ */ jsx$1(GitCommitHorizontal, { size: 18 })
377
- }
378
- ),
379
- /* @__PURE__ */ jsxs(
380
- "div",
381
- {
382
- style: {
383
- display: "flex",
384
- flexDirection: "column",
385
- gap: "4px",
386
- minWidth: 0
387
- },
388
- children: [
389
- /* @__PURE__ */ jsx$1(
390
- "div",
391
- {
392
- style: {
393
- fontSize: theme2.fontSizes[2],
394
- fontWeight: 600,
395
- color: theme2.colors.text,
396
- overflow: "hidden",
397
- textOverflow: "ellipsis"
398
- },
399
- title: filePath,
400
- children: filePath
401
- }
402
- ),
403
- statusInfo && /* @__PURE__ */ jsxs(
404
- "div",
405
- {
406
- style: {
407
- display: "flex",
408
- alignItems: "center",
409
- gap: "8px"
410
- },
411
- children: [
412
- /* @__PURE__ */ jsx$1(
413
- "span",
414
- {
415
- style: {
416
- display: "inline-flex",
417
- alignItems: "center",
418
- gap: "6px",
419
- fontSize: theme2.fontSizes[0],
420
- padding: "2px 8px",
421
- borderRadius: "999px",
422
- backgroundColor: `${statusColor}20`,
423
- color: statusColor,
424
- border: `1px solid ${statusColor}60`,
425
- whiteSpace: "nowrap"
426
- },
427
- children: statusInfo.label
428
- }
429
- ),
430
- /* @__PURE__ */ jsx$1(
431
- "span",
432
- {
433
- style: {
434
- fontSize: theme2.fontSizes[0],
435
- color: theme2.colors.textSecondary,
436
- whiteSpace: "nowrap"
437
- },
438
- children: statusInfo.description
439
- }
440
- )
441
- ]
442
- }
443
- )
444
- ]
445
- }
446
- )
447
- ]
448
- }
449
- )
450
- }
451
- ),
452
- onClose && /* @__PURE__ */ jsx$1(
453
- "button",
454
- {
455
- onClick: onClose,
456
- style: {
457
- background: "none",
458
- border: "none",
459
- padding: "4px",
460
- cursor: "pointer",
461
- color: theme2.colors.textSecondary,
462
- display: "flex",
463
- alignItems: "center",
464
- justifyContent: "center",
465
- borderRadius: "4px",
466
- transition: "background-color 0.2s"
467
- },
468
- onMouseEnter: (e2) => {
469
- e2.currentTarget.style.backgroundColor = theme2.colors.backgroundTertiary;
470
- },
471
- onMouseLeave: (e2) => {
472
- e2.currentTarget.style.backgroundColor = "transparent";
473
- },
474
- children: /* @__PURE__ */ jsx$1(X$4, { size: 16 })
475
- }
476
- )
477
- ]
478
- }
479
- ),
480
- /* @__PURE__ */ jsx$1("div", { style: { flex: 1, minHeight: 0 }, children: isLoading ? /* @__PURE__ */ jsx$1(
481
- "div",
482
- {
483
- style: {
484
- height: "100%",
485
- display: "flex",
486
- alignItems: "center",
487
- justifyContent: "center",
488
- color: theme2.colors.textSecondary
489
- },
490
- children: "Loading diff..."
491
- }
492
- ) : error ? /* @__PURE__ */ jsx$1(
493
- "div",
494
- {
495
- style: {
496
- height: "100%",
497
- display: "flex",
498
- alignItems: "center",
499
- justifyContent: "center",
500
- color: theme2.colors.error,
501
- padding: "20px",
502
- textAlign: "center"
503
- },
504
- children: error
505
- }
506
- ) : /* @__PURE__ */ jsx$1(
507
- ThemedMonacoDiffEditor,
508
- {
509
- theme: theme2,
510
- original: originalContent,
511
- modified: modifiedContent,
512
- language: language2,
513
- height: "100%",
514
- options: {
515
- renderSideBySide: true,
516
- readOnly: true,
517
- minimap: { enabled: false },
518
- automaticLayout: true,
519
- renderIndicators: true,
520
- renderMarginRevertIcon: true,
521
- ignoreTrimWhitespace: false,
522
- diffAlgorithm: "advanced",
523
- scrollbar: {
524
- useShadows: false,
525
- vertical: "auto",
526
- horizontal: "auto"
527
- }
528
- },
529
- loadingComponent: /* @__PURE__ */ jsx$1(
530
- "div",
531
- {
532
- style: {
533
- height: "100%",
534
- display: "flex",
535
- alignItems: "center",
536
- justifyContent: "center",
537
- color: theme2.colors.textSecondary
538
- },
539
- children: "Preparing diff editor..."
540
- }
541
- )
542
- }
543
- ) })
544
- ]
545
- }
546
- );
547
- };
548
- const GitDiffPanelPreview = () => {
549
- const { theme: theme2 } = useTheme();
550
- return /* @__PURE__ */ jsxs(
551
- "div",
552
- {
553
- style: {
554
- padding: "12px",
555
- fontSize: theme2.fontSizes[0],
556
- color: theme2.colors.text,
557
- display: "flex",
558
- flexDirection: "column",
559
- gap: "4px",
560
- fontFamily: theme2.fonts.monospace
561
- },
562
- children: [
563
- /* @__PURE__ */ jsx$1(
564
- "div",
565
- {
566
- style: {
567
- display: "flex",
568
- gap: "8px"
569
- },
570
- children: /* @__PURE__ */ jsx$1("span", { style: { color: theme2.colors.textSecondary }, children: "@@ 12,5 @@" })
571
- }
572
- ),
573
- /* @__PURE__ */ jsx$1("div", { style: { color: "#ef4444" }, children: "- const count = oldValue;" }),
574
- /* @__PURE__ */ jsx$1("div", { style: { color: "#22c55e" }, children: "+ const count = newValue;" }),
575
- /* @__PURE__ */ jsx$1("div", { style: { color: theme2.colors.textSecondary }, children: " return count;" })
576
- ]
577
- }
578
- );
579
- };
580
175
  const getLanguage = (path) => {
581
176
  var _a2;
582
177
  const ext = ((_a2 = path.split(".").pop()) == null ? void 0 : _a2.toLowerCase()) || "";
@@ -618,15 +213,14 @@ const getLanguage = (path) => {
618
213
  };
619
214
  return languageMap[ext] || "plaintext";
620
215
  };
621
- const FileEditorPanel = ({
622
- filePath,
623
- source,
624
- contentProvider,
625
- onClose,
626
- readOnly: forceReadOnly = false,
627
- vimMode = false
216
+ const FileEditorPanelContent = ({
217
+ context,
218
+ actions: _actions,
219
+ events
628
220
  }) => {
221
+ var _a2, _b, _c;
629
222
  const { theme: theme2 } = useTheme();
223
+ const [filePath, setFilePath] = useState(null);
630
224
  const [fileContent, setFileContent] = useState("");
631
225
  const [editorContent, setEditorContent] = useState("");
632
226
  const [isLoading, setIsLoading] = useState(false);
@@ -637,6 +231,11 @@ const FileEditorPanel = ({
637
231
  const latestFilePathRef = useRef(null);
638
232
  const isSavingRef = useRef(false);
639
233
  const isDirtyRef = useRef(false);
234
+ const fileSystem = (_a2 = context.adapters) == null ? void 0 : _a2.fileSystem;
235
+ const isEditable = Boolean(fileSystem == null ? void 0 : fileSystem.writeFile);
236
+ const activeFileSlice = context.getSlice("active-file");
237
+ const preferencesSlice = context.getSlice("preferences");
238
+ const vimMode = ((_b = preferencesSlice == null ? void 0 : preferencesSlice.data) == null ? void 0 : _b.vimMode) ?? false;
640
239
  useEffect(() => {
641
240
  isDirtyRef.current = isDirty;
642
241
  }, [isDirty]);
@@ -647,10 +246,23 @@ const FileEditorPanel = ({
647
246
  isSavingRef.current = false;
648
247
  setSaveError(null);
649
248
  }, [filePath]);
650
- const isLocalFile = (source == null ? void 0 : source.type) === "local";
651
- const isEditable = isLocalFile && !forceReadOnly && !!contentProvider.writeFile;
249
+ useEffect(() => {
250
+ var _a3;
251
+ if ((_a3 = activeFileSlice == null ? void 0 : activeFileSlice.data) == null ? void 0 : _a3.path) {
252
+ setFilePath(activeFileSlice.data.path);
253
+ }
254
+ }, [(_c = activeFileSlice == null ? void 0 : activeFileSlice.data) == null ? void 0 : _c.path]);
255
+ useEffect(() => {
256
+ const unsubscribe = events.on("file:open", (event) => {
257
+ const payload = event.payload;
258
+ if (payload == null ? void 0 : payload.path) {
259
+ setFilePath(payload.path);
260
+ }
261
+ });
262
+ return unsubscribe;
263
+ }, [events]);
652
264
  const loadFile = useCallback(async () => {
653
- if (!filePath) {
265
+ if (!filePath || !(fileSystem == null ? void 0 : fileSystem.readFile)) {
654
266
  latestFilePathRef.current = null;
655
267
  setFileContent("");
656
268
  setEditorContent("");
@@ -663,7 +275,7 @@ const FileEditorPanel = ({
663
275
  setIsLoading(true);
664
276
  setError(null);
665
277
  try {
666
- const content2 = await contentProvider.readFile(filePath);
278
+ const content2 = await fileSystem.readFile(filePath);
667
279
  if (latestFilePathRef.current !== filePath) {
668
280
  return;
669
281
  }
@@ -688,21 +300,10 @@ const FileEditorPanel = ({
688
300
  setIsLoading(false);
689
301
  }
690
302
  }
691
- }, [filePath, contentProvider]);
303
+ }, [filePath, fileSystem]);
692
304
  useEffect(() => {
693
305
  loadFile();
694
306
  }, [loadFile]);
695
- useEffect(() => {
696
- if (!filePath || !isLocalFile || !contentProvider.watchFile) {
697
- return;
698
- }
699
- const unwatch = contentProvider.watchFile(filePath, () => {
700
- if (!isSavingRef.current) {
701
- loadFile();
702
- }
703
- });
704
- return unwatch;
705
- }, [filePath, isLocalFile, contentProvider, loadFile]);
706
307
  const handleEditorChange = useCallback(
707
308
  (value2) => {
708
309
  const nextValue = value2 ?? "";
@@ -716,7 +317,7 @@ const FileEditorPanel = ({
716
317
  );
717
318
  const handleEditorSave = useCallback(
718
319
  async (value2) => {
719
- if (!filePath || !contentProvider.writeFile) {
320
+ if (!filePath || !(fileSystem == null ? void 0 : fileSystem.writeFile)) {
720
321
  return;
721
322
  }
722
323
  const contentToSave = value2 ?? editorContent;
@@ -727,11 +328,17 @@ const FileEditorPanel = ({
727
328
  setIsSaving(true);
728
329
  setSaveError(null);
729
330
  try {
730
- await contentProvider.writeFile(filePath, contentToSave);
331
+ await fileSystem.writeFile(filePath, contentToSave);
731
332
  if (latestFilePathRef.current === filePath) {
732
333
  setFileContent(contentToSave);
733
334
  setEditorContent(contentToSave);
734
335
  setIsDirty(false);
336
+ events.emit({
337
+ type: "file:save",
338
+ source: "industry-theme.file-editor",
339
+ timestamp: Date.now(),
340
+ payload: { path: filePath }
341
+ });
735
342
  }
736
343
  } catch (err) {
737
344
  if (latestFilePathRef.current === filePath) {
@@ -746,8 +353,17 @@ const FileEditorPanel = ({
746
353
  isSavingRef.current = false;
747
354
  }
748
355
  },
749
- [editorContent, fileContent, filePath, isDirty, contentProvider]
356
+ [editorContent, fileContent, filePath, isDirty, fileSystem, events]
750
357
  );
358
+ const handleClose2 = useCallback(() => {
359
+ events.emit({
360
+ type: "file:close",
361
+ source: "industry-theme.file-editor",
362
+ timestamp: Date.now(),
363
+ payload: { path: filePath }
364
+ });
365
+ setFilePath(null);
366
+ }, [events, filePath]);
751
367
  const fileName = (filePath == null ? void 0 : filePath.split("/").pop()) || filePath || "";
752
368
  const language2 = filePath ? getLanguage(filePath) : "plaintext";
753
369
  if (!filePath) {
@@ -762,7 +378,8 @@ const FileEditorPanel = ({
762
378
  flexDirection: "column",
763
379
  color: theme2.colors.textSecondary,
764
380
  padding: "20px",
765
- textAlign: "center"
381
+ textAlign: "center",
382
+ fontFamily: theme2.fonts.body
766
383
  },
767
384
  children: [
768
385
  /* @__PURE__ */ jsx$1(FileText, { size: 48, style: { marginBottom: "16px", opacity: 0.5 } }),
@@ -797,12 +414,16 @@ const FileEditorPanel = ({
797
414
  "div",
798
415
  {
799
416
  style: {
800
- padding: "12px 16px",
417
+ height: "40px",
418
+ padding: "0 12px",
801
419
  borderBottom: `1px solid ${theme2.colors.border}`,
802
420
  display: "flex",
803
421
  alignItems: "center",
804
422
  justifyContent: "space-between",
805
- backgroundColor: theme2.colors.backgroundSecondary
423
+ backgroundColor: theme2.colors.backgroundSecondary,
424
+ fontFamily: theme2.fonts.body,
425
+ flexShrink: 0,
426
+ boxSizing: "border-box"
806
427
  },
807
428
  children: [
808
429
  /* @__PURE__ */ jsxs(
@@ -823,36 +444,21 @@ const FileEditorPanel = ({
823
444
  style: { color: theme2.colors.primary, flexShrink: 0 }
824
445
  }
825
446
  ),
826
- /* @__PURE__ */ jsxs("div", { style: { minWidth: 0, flex: 1 }, children: [
827
- /* @__PURE__ */ jsx$1(
828
- "div",
829
- {
830
- style: {
831
- fontSize: theme2.fontSizes[2],
832
- fontWeight: 600,
833
- color: theme2.colors.text,
834
- whiteSpace: "nowrap",
835
- overflow: "hidden",
836
- textOverflow: "ellipsis"
837
- },
838
- children: fileName
839
- }
840
- ),
841
- /* @__PURE__ */ jsx$1(
842
- "div",
843
- {
844
- style: {
845
- fontSize: theme2.fontSizes[0],
846
- color: theme2.colors.textSecondary,
847
- whiteSpace: "nowrap",
848
- overflow: "hidden",
849
- textOverflow: "ellipsis"
850
- },
851
- title: filePath,
852
- children: filePath
853
- }
854
- )
855
- ] })
447
+ /* @__PURE__ */ jsx$1(
448
+ "div",
449
+ {
450
+ style: {
451
+ fontSize: theme2.fontSizes[2],
452
+ fontWeight: 600,
453
+ color: theme2.colors.text,
454
+ whiteSpace: "nowrap",
455
+ overflow: "hidden",
456
+ textOverflow: "ellipsis"
457
+ },
458
+ title: filePath,
459
+ children: fileName
460
+ }
461
+ )
856
462
  ]
857
463
  }
858
464
  ),
@@ -926,10 +532,10 @@ const FileEditorPanel = ({
926
532
  }
927
533
  )
928
534
  ] }),
929
- onClose && filePath && /* @__PURE__ */ jsx$1(
535
+ filePath && /* @__PURE__ */ jsx$1(
930
536
  "button",
931
537
  {
932
- onClick: onClose,
538
+ onClick: handleClose2,
933
539
  style: {
934
540
  background: "none",
935
541
  border: "none",
@@ -965,7 +571,8 @@ const FileEditorPanel = ({
965
571
  display: "flex",
966
572
  alignItems: "center",
967
573
  justifyContent: "center",
968
- color: theme2.colors.textSecondary
574
+ color: theme2.colors.textSecondary,
575
+ fontFamily: theme2.fonts.body
969
576
  },
970
577
  children: "Loading file..."
971
578
  }
@@ -979,7 +586,8 @@ const FileEditorPanel = ({
979
586
  justifyContent: "center",
980
587
  color: theme2.colors.error,
981
588
  padding: "20px",
982
- textAlign: "center"
589
+ textAlign: "center",
590
+ fontFamily: theme2.fonts.body
983
591
  },
984
592
  children: [
985
593
  "Error: ",
@@ -1019,6 +627,9 @@ const FileEditorPanel = ({
1019
627
  }
1020
628
  );
1021
629
  };
630
+ const FileEditorPanel = (props) => {
631
+ return /* @__PURE__ */ jsx$1(FileEditorPanelContent, { ...props });
632
+ };
1022
633
  const FileEditorPanelPreview = () => {
1023
634
  const { theme: theme2 } = useTheme();
1024
635
  return /* @__PURE__ */ jsxs(
@@ -1055,6 +666,398 @@ const FileEditorPanelPreview = () => {
1055
666
  }
1056
667
  );
1057
668
  };
669
+ const statusMeta = {
670
+ staged: {
671
+ label: "Staged change",
672
+ description: "Comparing staged changes against the last commit"
673
+ },
674
+ unstaged: {
675
+ label: "Unstaged change",
676
+ description: "Comparing working tree changes against the last commit"
677
+ },
678
+ untracked: {
679
+ label: "Untracked file",
680
+ description: "New file compared against an empty baseline"
681
+ },
682
+ deleted: {
683
+ label: "Deleted file",
684
+ description: "Showing the last committed contents of the deleted file"
685
+ }
686
+ };
687
+ const languageFromPath = (filePath) => {
688
+ var _a2;
689
+ if (!filePath) {
690
+ return "plaintext";
691
+ }
692
+ const ext = ((_a2 = filePath.split(".").pop()) == null ? void 0 : _a2.toLowerCase()) ?? "";
693
+ const languageMap = {
694
+ js: "javascript",
695
+ jsx: "javascript",
696
+ ts: "typescript",
697
+ tsx: "typescript",
698
+ py: "python",
699
+ java: "java",
700
+ c: "c",
701
+ cpp: "cpp",
702
+ h: "c",
703
+ hpp: "cpp",
704
+ cs: "csharp",
705
+ go: "go",
706
+ rs: "rust",
707
+ php: "php",
708
+ rb: "ruby",
709
+ swift: "swift",
710
+ kt: "kotlin",
711
+ json: "json",
712
+ yaml: "yaml",
713
+ yml: "yaml",
714
+ toml: "toml",
715
+ ini: "ini",
716
+ cfg: "ini",
717
+ conf: "ini",
718
+ xml: "xml",
719
+ html: "html",
720
+ css: "css",
721
+ scss: "scss",
722
+ sass: "sass",
723
+ less: "less",
724
+ sh: "bash",
725
+ bash: "bash",
726
+ zsh: "bash",
727
+ md: "markdown",
728
+ mdx: "markdown",
729
+ sql: "sql"
730
+ };
731
+ return languageMap[ext] ?? "plaintext";
732
+ };
733
+ const GitDiffPanelContent = ({
734
+ context,
735
+ actions: _actions,
736
+ events
737
+ }) => {
738
+ var _a2;
739
+ const { theme: theme2 } = useTheme();
740
+ const [filePath, setFilePath] = useState(null);
741
+ const [status, setStatus2] = useState("unstaged");
742
+ const [originalContent, setOriginalContent] = useState("");
743
+ const [modifiedContent, setModifiedContent] = useState("");
744
+ const [isLoading, setIsLoading] = useState(false);
745
+ const [error, setError] = useState(null);
746
+ const language2 = useMemo(() => languageFromPath(filePath), [filePath]);
747
+ const fileSystem = (_a2 = context.adapters) == null ? void 0 : _a2.fileSystem;
748
+ useEffect(() => {
749
+ const unsubscribe = events.on("git:diff", (event) => {
750
+ const payload = event.payload;
751
+ if (payload == null ? void 0 : payload.path) {
752
+ setFilePath(payload.path);
753
+ setStatus2(payload.status || "unstaged");
754
+ if (payload.original !== void 0 || payload.modified !== void 0) {
755
+ setOriginalContent(payload.original ?? "");
756
+ setModifiedContent(payload.modified ?? "");
757
+ setIsLoading(false);
758
+ setError(null);
759
+ }
760
+ }
761
+ });
762
+ return unsubscribe;
763
+ }, [events]);
764
+ useEffect(() => {
765
+ let isActive = true;
766
+ const loadDiff = async () => {
767
+ if (!filePath) {
768
+ setOriginalContent("");
769
+ setModifiedContent("");
770
+ setIsLoading(false);
771
+ setError(null);
772
+ return;
773
+ }
774
+ if (!(fileSystem == null ? void 0 : fileSystem.readFile)) {
775
+ return;
776
+ }
777
+ setIsLoading(true);
778
+ setError(null);
779
+ try {
780
+ const modified = await fileSystem.readFile(filePath);
781
+ if (!isActive) return;
782
+ setModifiedContent(modified ?? "");
783
+ if (status === "untracked") {
784
+ setOriginalContent("");
785
+ }
786
+ } catch (err) {
787
+ if (!isActive) return;
788
+ console.error("Failed to load git diff:", err);
789
+ setError(
790
+ err instanceof Error ? `Failed to load diff: ${err.message}` : "Failed to load diff"
791
+ );
792
+ setOriginalContent("");
793
+ setModifiedContent("");
794
+ } finally {
795
+ if (isActive) {
796
+ setIsLoading(false);
797
+ }
798
+ }
799
+ };
800
+ void loadDiff();
801
+ return () => {
802
+ isActive = false;
803
+ };
804
+ }, [filePath, status, fileSystem]);
805
+ const handleClose2 = () => {
806
+ events.emit({
807
+ type: "git:diff:close",
808
+ source: "industry-theme.git-diff",
809
+ timestamp: Date.now(),
810
+ payload: { path: filePath }
811
+ });
812
+ setFilePath(null);
813
+ };
814
+ const statusInfo = status ? statusMeta[status] : null;
815
+ const statusColor = useMemo(() => {
816
+ if (!status) return theme2.colors.textSecondary;
817
+ switch (status) {
818
+ case "staged":
819
+ return theme2.colors.success || "#10b981";
820
+ case "unstaged":
821
+ return theme2.colors.warning || "#f59e0b";
822
+ case "untracked":
823
+ return theme2.colors.info || theme2.colors.primary || "#3b82f6";
824
+ case "deleted":
825
+ return theme2.colors.error || "#ef4444";
826
+ default:
827
+ return theme2.colors.textSecondary;
828
+ }
829
+ }, [status, theme2.colors]);
830
+ if (!filePath) {
831
+ return /* @__PURE__ */ jsx$1(
832
+ "div",
833
+ {
834
+ style: {
835
+ height: "100%",
836
+ display: "flex",
837
+ alignItems: "center",
838
+ justifyContent: "center",
839
+ color: theme2.colors.textSecondary,
840
+ backgroundColor: theme2.colors.backgroundSecondary,
841
+ fontFamily: theme2.fonts.body
842
+ },
843
+ children: "Select a file from Git Changes to view its diff."
844
+ }
845
+ );
846
+ }
847
+ return /* @__PURE__ */ jsxs(
848
+ "div",
849
+ {
850
+ style: {
851
+ height: "100%",
852
+ display: "flex",
853
+ flexDirection: "column",
854
+ backgroundColor: theme2.colors.background
855
+ },
856
+ children: [
857
+ /* @__PURE__ */ jsxs(
858
+ "div",
859
+ {
860
+ style: {
861
+ height: "40px",
862
+ padding: "0 12px",
863
+ borderBottom: `1px solid ${theme2.colors.border}`,
864
+ display: "flex",
865
+ justifyContent: "space-between",
866
+ alignItems: "center",
867
+ backgroundColor: theme2.colors.backgroundSecondary,
868
+ fontFamily: theme2.fonts.body,
869
+ flexShrink: 0,
870
+ boxSizing: "border-box"
871
+ },
872
+ children: [
873
+ /* @__PURE__ */ jsxs(
874
+ "div",
875
+ {
876
+ style: {
877
+ display: "flex",
878
+ alignItems: "center",
879
+ gap: "8px",
880
+ flex: 1,
881
+ minWidth: 0
882
+ },
883
+ children: [
884
+ /* @__PURE__ */ jsx$1(
885
+ GitCommitHorizontal,
886
+ {
887
+ size: 16,
888
+ style: { color: theme2.colors.primary, flexShrink: 0 }
889
+ }
890
+ ),
891
+ /* @__PURE__ */ jsx$1(
892
+ "div",
893
+ {
894
+ style: {
895
+ fontSize: theme2.fontSizes[2],
896
+ fontWeight: 600,
897
+ color: theme2.colors.text,
898
+ whiteSpace: "nowrap",
899
+ overflow: "hidden",
900
+ textOverflow: "ellipsis"
901
+ },
902
+ title: filePath,
903
+ children: (filePath == null ? void 0 : filePath.split("/").pop()) || filePath
904
+ }
905
+ ),
906
+ statusInfo && /* @__PURE__ */ jsx$1(
907
+ "span",
908
+ {
909
+ style: {
910
+ display: "inline-flex",
911
+ alignItems: "center",
912
+ fontSize: theme2.fontSizes[0],
913
+ padding: "2px 8px",
914
+ borderRadius: "999px",
915
+ backgroundColor: `${statusColor}20`,
916
+ color: statusColor,
917
+ border: `1px solid ${statusColor}60`,
918
+ whiteSpace: "nowrap",
919
+ flexShrink: 0
920
+ },
921
+ children: statusInfo.label
922
+ }
923
+ )
924
+ ]
925
+ }
926
+ ),
927
+ /* @__PURE__ */ jsx$1(
928
+ "button",
929
+ {
930
+ onClick: handleClose2,
931
+ style: {
932
+ background: "none",
933
+ border: "none",
934
+ padding: "4px",
935
+ cursor: "pointer",
936
+ color: theme2.colors.textSecondary,
937
+ display: "flex",
938
+ alignItems: "center",
939
+ justifyContent: "center",
940
+ borderRadius: "4px",
941
+ transition: "background-color 0.2s",
942
+ flexShrink: 0
943
+ },
944
+ onMouseEnter: (e2) => {
945
+ e2.currentTarget.style.backgroundColor = theme2.colors.backgroundTertiary;
946
+ },
947
+ onMouseLeave: (e2) => {
948
+ e2.currentTarget.style.backgroundColor = "transparent";
949
+ },
950
+ children: /* @__PURE__ */ jsx$1(X$4, { size: 16 })
951
+ }
952
+ )
953
+ ]
954
+ }
955
+ ),
956
+ /* @__PURE__ */ jsx$1("div", { style: { flex: 1, minHeight: 0 }, children: isLoading ? /* @__PURE__ */ jsx$1(
957
+ "div",
958
+ {
959
+ style: {
960
+ height: "100%",
961
+ display: "flex",
962
+ alignItems: "center",
963
+ justifyContent: "center",
964
+ color: theme2.colors.textSecondary,
965
+ fontFamily: theme2.fonts.body
966
+ },
967
+ children: "Loading diff..."
968
+ }
969
+ ) : error ? /* @__PURE__ */ jsx$1(
970
+ "div",
971
+ {
972
+ style: {
973
+ height: "100%",
974
+ display: "flex",
975
+ alignItems: "center",
976
+ justifyContent: "center",
977
+ color: theme2.colors.error,
978
+ padding: "20px",
979
+ textAlign: "center",
980
+ fontFamily: theme2.fonts.body
981
+ },
982
+ children: error
983
+ }
984
+ ) : /* @__PURE__ */ jsx$1(
985
+ ThemedMonacoDiffEditor,
986
+ {
987
+ theme: theme2,
988
+ original: originalContent,
989
+ modified: modifiedContent,
990
+ language: language2,
991
+ height: "100%",
992
+ options: {
993
+ renderSideBySide: true,
994
+ readOnly: true,
995
+ minimap: { enabled: false },
996
+ automaticLayout: true,
997
+ renderIndicators: true,
998
+ renderMarginRevertIcon: true,
999
+ ignoreTrimWhitespace: false,
1000
+ diffAlgorithm: "advanced",
1001
+ scrollbar: {
1002
+ useShadows: false,
1003
+ vertical: "auto",
1004
+ horizontal: "auto"
1005
+ }
1006
+ },
1007
+ loadingComponent: /* @__PURE__ */ jsx$1(
1008
+ "div",
1009
+ {
1010
+ style: {
1011
+ height: "100%",
1012
+ display: "flex",
1013
+ alignItems: "center",
1014
+ justifyContent: "center",
1015
+ color: theme2.colors.textSecondary
1016
+ },
1017
+ children: "Preparing diff editor..."
1018
+ }
1019
+ )
1020
+ }
1021
+ ) })
1022
+ ]
1023
+ }
1024
+ );
1025
+ };
1026
+ const GitDiffPanel = (props) => {
1027
+ return /* @__PURE__ */ jsx$1(GitDiffPanelContent, { ...props });
1028
+ };
1029
+ const GitDiffPanelPreview = () => {
1030
+ const { theme: theme2 } = useTheme();
1031
+ return /* @__PURE__ */ jsxs(
1032
+ "div",
1033
+ {
1034
+ style: {
1035
+ padding: "12px",
1036
+ fontSize: theme2.fontSizes[0],
1037
+ color: theme2.colors.text,
1038
+ display: "flex",
1039
+ flexDirection: "column",
1040
+ gap: "4px",
1041
+ fontFamily: theme2.fonts.monospace
1042
+ },
1043
+ children: [
1044
+ /* @__PURE__ */ jsx$1(
1045
+ "div",
1046
+ {
1047
+ style: {
1048
+ display: "flex",
1049
+ gap: "8px"
1050
+ },
1051
+ children: /* @__PURE__ */ jsx$1("span", { style: { color: theme2.colors.textSecondary }, children: "@@ 12,5 @@" })
1052
+ }
1053
+ ),
1054
+ /* @__PURE__ */ jsx$1("div", { style: { color: "#ef4444" }, children: "- const count = oldValue;" }),
1055
+ /* @__PURE__ */ jsx$1("div", { style: { color: "#22c55e" }, children: "+ const count = newValue;" }),
1056
+ /* @__PURE__ */ jsx$1("div", { style: { color: theme2.colors.textSecondary }, children: " return count;" })
1057
+ ]
1058
+ }
1059
+ );
1060
+ };
1058
1061
  var N$6 = Object.defineProperty;
1059
1062
  var P$3 = (s2, t2, e2) => t2 in s2 ? N$6(s2, t2, { enumerable: true, configurable: true, writable: true, value: e2 }) : s2[t2] = e2;
1060
1063
  var p$4 = (s2, t2, e2) => P$3(s2, typeof t2 != "symbol" ? t2 + "" : t2, e2);
@@ -49416,7 +49419,7 @@ const panelPlugin = /* @__PURE__ */ ViewPlugin.fromClass(class {
49416
49419
  let input = update.state.facet(showPanel);
49417
49420
  if (input != this.input) {
49418
49421
  let specs = input.filter((x2) => x2);
49419
- let panels = [], top2 = [], bottom = [], mount = [];
49422
+ let panels2 = [], top2 = [], bottom = [], mount = [];
49420
49423
  for (let spec of specs) {
49421
49424
  let known = this.specs.indexOf(spec), panel;
49422
49425
  if (known < 0) {
@@ -49427,11 +49430,11 @@ const panelPlugin = /* @__PURE__ */ ViewPlugin.fromClass(class {
49427
49430
  if (panel.update)
49428
49431
  panel.update(update);
49429
49432
  }
49430
- panels.push(panel);
49433
+ panels2.push(panel);
49431
49434
  (panel.top ? top2 : bottom).push(panel);
49432
49435
  }
49433
49436
  this.specs = specs;
49434
- this.panels = panels;
49437
+ this.panels = panels2;
49435
49438
  this.top.sync(top2);
49436
49439
  this.bottom.sync(bottom);
49437
49440
  for (let p2 of mount) {
@@ -49465,11 +49468,11 @@ class PanelGroup {
49465
49468
  this.panels = [];
49466
49469
  this.syncClasses();
49467
49470
  }
49468
- sync(panels) {
49471
+ sync(panels2) {
49469
49472
  for (let p2 of this.panels)
49470
- if (p2.destroy && panels.indexOf(p2) < 0)
49473
+ if (p2.destroy && panels2.indexOf(p2) < 0)
49471
49474
  p2.destroy();
49472
- this.panels = panels;
49475
+ this.panels = panels2;
49473
49476
  this.syncDOM();
49474
49477
  }
49475
49478
  syncDOM() {
@@ -62253,7 +62256,7 @@ function legacy(parser2) {
62253
62256
  return new LanguageSupport(StreamLanguage.define(parser2));
62254
62257
  }
62255
62258
  function sql(dialectName) {
62256
- return import("./index-DR6-tbJq.js").then((m3) => m3.sql({ dialect: m3[dialectName] }));
62259
+ return import("./index-x8WsxVsf.js").then((m3) => m3.sql({ dialect: m3[dialectName] }));
62257
62260
  }
62258
62261
  const languages = [
62259
62262
  // New-style language modes
@@ -62261,7 +62264,7 @@ const languages = [
62261
62264
  name: "C",
62262
62265
  extensions: ["c", "h", "ino"],
62263
62266
  load() {
62264
- return import("./index-ZhCVoili.js").then((m3) => m3.cpp());
62267
+ return import("./index-C3nS7Yiu.js").then((m3) => m3.cpp());
62265
62268
  }
62266
62269
  }),
62267
62270
  /* @__PURE__ */ LanguageDescription.of({
@@ -62269,7 +62272,7 @@ const languages = [
62269
62272
  alias: ["cpp"],
62270
62273
  extensions: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"],
62271
62274
  load() {
62272
- return import("./index-ZhCVoili.js").then((m3) => m3.cpp());
62275
+ return import("./index-C3nS7Yiu.js").then((m3) => m3.cpp());
62273
62276
  }
62274
62277
  }),
62275
62278
  /* @__PURE__ */ LanguageDescription.of({
@@ -62291,7 +62294,7 @@ const languages = [
62291
62294
  name: "Go",
62292
62295
  extensions: ["go"],
62293
62296
  load() {
62294
- return import("./index-Ds9lMu-c.js").then((m3) => m3.go());
62297
+ return import("./index-uuzekAfi.js").then((m3) => m3.go());
62295
62298
  }
62296
62299
  }),
62297
62300
  /* @__PURE__ */ LanguageDescription.of({
@@ -62306,7 +62309,7 @@ const languages = [
62306
62309
  name: "Java",
62307
62310
  extensions: ["java"],
62308
62311
  load() {
62309
- return import("./index-CQtBr0UY.js").then((m3) => m3.java());
62312
+ return import("./index-DAj-6bKc.js").then((m3) => m3.java());
62310
62313
  }
62311
62314
  }),
62312
62315
  /* @__PURE__ */ LanguageDescription.of({
@@ -62321,7 +62324,7 @@ const languages = [
62321
62324
  name: "Jinja",
62322
62325
  extensions: ["j2", "jinja", "jinja2"],
62323
62326
  load() {
62324
- return import("./index-CjyvtorY.js").then((m3) => m3.jinja());
62327
+ return import("./index-C-79HWPu.js").then((m3) => m3.jinja());
62325
62328
  }
62326
62329
  }),
62327
62330
  /* @__PURE__ */ LanguageDescription.of({
@@ -62329,7 +62332,7 @@ const languages = [
62329
62332
  alias: ["json5"],
62330
62333
  extensions: ["json", "map"],
62331
62334
  load() {
62332
- return import("./index-BxXSPvaU.js").then((m3) => m3.json());
62335
+ return import("./index-C6qWcx_6.js").then((m3) => m3.json());
62333
62336
  }
62334
62337
  }),
62335
62338
  /* @__PURE__ */ LanguageDescription.of({
@@ -62343,14 +62346,14 @@ const languages = [
62343
62346
  name: "LESS",
62344
62347
  extensions: ["less"],
62345
62348
  load() {
62346
- return import("./index-TBMiP6Sa.js").then((m3) => m3.less());
62349
+ return import("./index-B8t5ZXru.js").then((m3) => m3.less());
62347
62350
  }
62348
62351
  }),
62349
62352
  /* @__PURE__ */ LanguageDescription.of({
62350
62353
  name: "Liquid",
62351
62354
  extensions: ["liquid"],
62352
62355
  load() {
62353
- return import("./index-DVQA1GI6.js").then((m3) => m3.liquid());
62356
+ return import("./index-UJ416dxI.js").then((m3) => m3.liquid());
62354
62357
  }
62355
62358
  }),
62356
62359
  /* @__PURE__ */ LanguageDescription.of({
@@ -62382,7 +62385,7 @@ const languages = [
62382
62385
  name: "PHP",
62383
62386
  extensions: ["php", "php3", "php4", "php5", "php7", "phtml"],
62384
62387
  load() {
62385
- return import("./index-Bet4c99j.js").then((m3) => m3.php());
62388
+ return import("./index-DDHzET8H.js").then((m3) => m3.php());
62386
62389
  }
62387
62390
  }),
62388
62391
  /* @__PURE__ */ LanguageDescription.of({
@@ -62403,28 +62406,28 @@ const languages = [
62403
62406
  extensions: ["BUILD", "bzl", "py", "pyw"],
62404
62407
  filename: /^(BUCK|BUILD)$/,
62405
62408
  load() {
62406
- return import("./index-ZGazVsqS.js").then((m3) => m3.python());
62409
+ return import("./index-DiH_VlCK.js").then((m3) => m3.python());
62407
62410
  }
62408
62411
  }),
62409
62412
  /* @__PURE__ */ LanguageDescription.of({
62410
62413
  name: "Rust",
62411
62414
  extensions: ["rs"],
62412
62415
  load() {
62413
- return import("./index-CkLdyOmv.js").then((m3) => m3.rust());
62416
+ return import("./index-RAIU1e6Y.js").then((m3) => m3.rust());
62414
62417
  }
62415
62418
  }),
62416
62419
  /* @__PURE__ */ LanguageDescription.of({
62417
62420
  name: "Sass",
62418
62421
  extensions: ["sass"],
62419
62422
  load() {
62420
- return import("./index-D1BS_vz8.js").then((m3) => m3.sass({ indented: true }));
62423
+ return import("./index-BlPaGZBk.js").then((m3) => m3.sass({ indented: true }));
62421
62424
  }
62422
62425
  }),
62423
62426
  /* @__PURE__ */ LanguageDescription.of({
62424
62427
  name: "SCSS",
62425
62428
  extensions: ["scss"],
62426
62429
  load() {
62427
- return import("./index-D1BS_vz8.js").then((m3) => m3.sass());
62430
+ return import("./index-BlPaGZBk.js").then((m3) => m3.sass());
62428
62431
  }
62429
62432
  }),
62430
62433
  /* @__PURE__ */ LanguageDescription.of({
@@ -62459,7 +62462,7 @@ const languages = [
62459
62462
  name: "WebAssembly",
62460
62463
  extensions: ["wat", "wast"],
62461
62464
  load() {
62462
- return import("./index-BjkLI8D3.js").then((m3) => m3.wast());
62465
+ return import("./index-CR6Xoofu.js").then((m3) => m3.wast());
62463
62466
  }
62464
62467
  }),
62465
62468
  /* @__PURE__ */ LanguageDescription.of({
@@ -62467,7 +62470,7 @@ const languages = [
62467
62470
  alias: ["rss", "wsdl", "xsd"],
62468
62471
  extensions: ["xml", "xsl", "xsd", "svg"],
62469
62472
  load() {
62470
- return import("./index-BUkJBACP.js").then((m3) => m3.xml());
62473
+ return import("./index-CGg_iuSE.js").then((m3) => m3.xml());
62471
62474
  }
62472
62475
  }),
62473
62476
  /* @__PURE__ */ LanguageDescription.of({
@@ -62475,7 +62478,7 @@ const languages = [
62475
62478
  alias: ["yml"],
62476
62479
  extensions: ["yaml", "yml"],
62477
62480
  load() {
62478
- return import("./index-CDkarLuR.js").then((m3) => m3.yaml());
62481
+ return import("./index-BCmAXJzV.js").then((m3) => m3.yaml());
62479
62482
  }
62480
62483
  }),
62481
62484
  // Legacy modes ported from CodeMirror 5
@@ -63264,13 +63267,13 @@ const languages = [
63264
63267
  name: "Vue",
63265
63268
  extensions: ["vue"],
63266
63269
  load() {
63267
- return import("./index-u6DfL9YL.js").then((m3) => m3.vue());
63270
+ return import("./index-DuVYHq19.js").then((m3) => m3.vue());
63268
63271
  }
63269
63272
  }),
63270
63273
  /* @__PURE__ */ LanguageDescription.of({
63271
63274
  name: "Angular Template",
63272
63275
  load() {
63273
- return import("./index-Bg6SAM4G.js").then((m3) => m3.angular());
63276
+ return import("./index-DD_kem6H.js").then((m3) => m3.angular());
63274
63277
  }
63275
63278
  })
63276
63279
  ];
@@ -75304,6 +75307,24 @@ const UndoRedo = () => {
75304
75307
  }
75305
75308
  );
75306
75309
  };
75310
+ (function() {
75311
+ if (typeof document === "undefined") return;
75312
+ var id2 = "mdxeditor-base-styles-L1VzZXJz";
75313
+ if (document.getElementById(id2)) return;
75314
+ var style = document.createElement("style");
75315
+ style.id = id2;
75316
+ style.textContent = ":root, .light, .light-theme {\n --blue-1: #fbfdff;\n --blue-2: #f4faff;\n --blue-3: #e6f4fe;\n --blue-4: #d5efff;\n --blue-5: #c2e5ff;\n --blue-6: #acd8fc;\n --blue-7: #8ec8f6;\n --blue-8: #5eb1ef;\n --blue-9: #0090ff;\n --blue-10: #0588f0;\n --blue-11: #0d74ce;\n --blue-12: #113264;\n}\n\n@supports (color: color(display-p3 1 1 1)) {\n @media (color-gamut: p3) {\n :root, .light, .light-theme {\n --blue-1: color(display-p3 0.986 0.992 0.999);\n --blue-2: color(display-p3 0.96 0.979 0.998);\n --blue-3: color(display-p3 0.912 0.956 0.991);\n --blue-4: color(display-p3 0.853 0.932 1);\n --blue-5: color(display-p3 0.788 0.894 0.998);\n --blue-6: color(display-p3 0.709 0.843 0.976);\n --blue-7: color(display-p3 0.606 0.777 0.947);\n --blue-8: color(display-p3 0.451 0.688 0.917);\n --blue-9: color(display-p3 0.247 0.556 0.969);\n --blue-10: color(display-p3 0.234 0.523 0.912);\n --blue-11: color(display-p3 0.15 0.44 0.84);\n --blue-12: color(display-p3 0.102 0.193 0.379);\n }\n }\n}\n\n.dark, .dark-theme {\n --blue-1: #0d1520;\n --blue-2: #111927;\n --blue-3: #0d2847;\n --blue-4: #003362;\n --blue-5: #004074;\n --blue-6: #104d87;\n --blue-7: #205d9e;\n --blue-8: #2870bd;\n --blue-9: #0090ff;\n --blue-10: #3b9eff;\n --blue-11: #70b8ff;\n --blue-12: #c2e6ff;\n}\n\n@supports (color: color(display-p3 1 1 1)) {\n @media (color-gamut: p3) {\n .dark, .dark-theme {\n --blue-1: color(display-p3 0.057 0.081 0.122);\n --blue-2: color(display-p3 0.072 0.098 0.147);\n --blue-3: color(display-p3 0.078 0.154 0.27);\n --blue-4: color(display-p3 0.033 0.197 0.37);\n --blue-5: color(display-p3 0.08 0.245 0.441);\n --blue-6: color(display-p3 0.14 0.298 0.511);\n --blue-7: color(display-p3 0.195 0.361 0.6);\n --blue-8: color(display-p3 0.239 0.434 0.72);\n --blue-9: color(display-p3 0.247 0.556 0.969);\n --blue-10: color(display-p3 0.344 0.612 0.973);\n --blue-11: color(display-p3 0.49 0.72 1);\n --blue-12: color(display-p3 0.788 0.898 0.99);\n }\n }\n}\n\n:root, .light, .light-theme {\n --slate-1: #fcfcfd;\n --slate-2: #f9f9fb;\n --slate-3: #f0f0f3;\n --slate-4: #e8e8ec;\n --slate-5: #e0e1e6;\n --slate-6: #d9d9e0;\n --slate-7: #cdced6;\n --slate-8: #b9bbc6;\n --slate-9: #8b8d98;\n --slate-10: #80838d;\n --slate-11: #60646c;\n --slate-12: #1c2024;\n}\n\n@supports (color: color(display-p3 1 1 1)) {\n @media (color-gamut: p3) {\n :root, .light, .light-theme {\n --slate-1: color(display-p3 0.988 0.988 0.992);\n --slate-2: color(display-p3 0.976 0.976 0.984);\n --slate-3: color(display-p3 0.94 0.941 0.953);\n --slate-4: color(display-p3 0.908 0.909 0.925);\n --slate-5: color(display-p3 0.88 0.881 0.901);\n --slate-6: color(display-p3 0.85 0.852 0.876);\n --slate-7: color(display-p3 0.805 0.808 0.838);\n --slate-8: color(display-p3 0.727 0.733 0.773);\n --slate-9: color(display-p3 0.547 0.553 0.592);\n --slate-10: color(display-p3 0.503 0.512 0.549);\n --slate-11: color(display-p3 0.379 0.392 0.421);\n --slate-12: color(display-p3 0.113 0.125 0.14);\n }\n }\n}\n\n.dark, .dark-theme {\n --slate-1: #111113;\n --slate-2: #18191b;\n --slate-3: #212225;\n --slate-4: #272a2d;\n --slate-5: #2e3135;\n --slate-6: #363a3f;\n --slate-7: #43484e;\n --slate-8: #5a6169;\n --slate-9: #696e77;\n --slate-10: #777b84;\n --slate-11: #b0b4ba;\n --slate-12: #edeef0;\n}\n\n@supports (color: color(display-p3 1 1 1)) {\n @media (color-gamut: p3) {\n .dark, .dark-theme {\n --slate-1: color(display-p3 0.067 0.067 0.074);\n --slate-2: color(display-p3 0.095 0.098 0.105);\n --slate-3: color(display-p3 0.13 0.135 0.145);\n --slate-4: color(display-p3 0.156 0.163 0.176);\n --slate-5: color(display-p3 0.183 0.191 0.206);\n --slate-6: color(display-p3 0.215 0.226 0.244);\n --slate-7: color(display-p3 0.265 0.28 0.302);\n --slate-8: color(display-p3 0.357 0.381 0.409);\n --slate-9: color(display-p3 0.415 0.431 0.463);\n --slate-10: color(display-p3 0.469 0.483 0.514);\n --slate-11: color(display-p3 0.692 0.704 0.728);\n --slate-12: color(display-p3 0.93 0.933 0.94);\n }\n }\n}\n\n:root, .light, .light-theme {\n --grass-1: #fbfefb;\n --grass-2: #f5fbf5;\n --grass-3: #e9f6e9;\n --grass-4: #daf1db;\n --grass-5: #c9e8ca;\n --grass-6: #b2ddb5;\n --grass-7: #94ce9a;\n --grass-8: #65ba74;\n --grass-9: #46a758;\n --grass-10: #3e9b4f;\n --grass-11: #2a7e3b;\n --grass-12: #203c25;\n}\n\n@supports (color: color(display-p3 1 1 1)) {\n @media (color-gamut: p3) {\n :root, .light, .light-theme {\n --grass-1: color(display-p3 0.986 0.996 0.985);\n --grass-2: color(display-p3 0.966 0.983 0.964);\n --grass-3: color(display-p3 0.923 0.965 0.917);\n --grass-4: color(display-p3 0.872 0.94 0.865);\n --grass-5: color(display-p3 0.811 0.908 0.802);\n --grass-6: color(display-p3 0.733 0.864 0.724);\n --grass-7: color(display-p3 0.628 0.803 0.622);\n --grass-8: color(display-p3 0.477 0.72 0.482);\n --grass-9: color(display-p3 0.38 0.647 0.378);\n --grass-10: color(display-p3 0.344 0.598 0.342);\n --grass-11: color(display-p3 0.263 0.488 0.261);\n --grass-12: color(display-p3 0.151 0.233 0.153);\n }\n }\n}\n\n:root, .light, .light-theme {\n --cyan-1: #fafdfe;\n --cyan-2: #f2fafb;\n --cyan-3: #def7f9;\n --cyan-4: #caf1f6;\n --cyan-5: #b5e9f0;\n --cyan-6: #9ddde7;\n --cyan-7: #7dcedc;\n --cyan-8: #3db9cf;\n --cyan-9: #00a2c7;\n --cyan-10: #0797b9;\n --cyan-11: #107d98;\n --cyan-12: #0d3c48;\n}\n\n@supports (color: color(display-p3 1 1 1)) {\n @media (color-gamut: p3) {\n :root, .light, .light-theme {\n --cyan-1: color(display-p3 0.982 0.992 0.996);\n --cyan-2: color(display-p3 0.955 0.981 0.984);\n --cyan-3: color(display-p3 0.888 0.965 0.975);\n --cyan-4: color(display-p3 0.821 0.941 0.959);\n --cyan-5: color(display-p3 0.751 0.907 0.935);\n --cyan-6: color(display-p3 0.671 0.862 0.9);\n --cyan-7: color(display-p3 0.564 0.8 0.854);\n --cyan-8: color(display-p3 0.388 0.715 0.798);\n --cyan-9: color(display-p3 0.282 0.627 0.765);\n --cyan-10: color(display-p3 0.264 0.583 0.71);\n --cyan-11: color(display-p3 0.08 0.48 0.63);\n --cyan-12: color(display-p3 0.108 0.232 0.277);\n }\n }\n}\n\n:root, .light, .light-theme {\n --amber-1: #fefdfb;\n --amber-2: #fefbe9;\n --amber-3: #fff7c2;\n --amber-4: #ffee9c;\n --amber-5: #fbe577;\n --amber-6: #f3d673;\n --amber-7: #e9c162;\n --amber-8: #e2a336;\n --amber-9: #ffc53d;\n --amber-10: #ffba18;\n --amber-11: #ab6400;\n --amber-12: #4f3422;\n}\n\n@supports (color: color(display-p3 1 1 1)) {\n @media (color-gamut: p3) {\n :root, .light, .light-theme {\n --amber-1: color(display-p3 0.995 0.992 0.985);\n --amber-2: color(display-p3 0.994 0.986 0.921);\n --amber-3: color(display-p3 0.994 0.969 0.782);\n --amber-4: color(display-p3 0.989 0.937 0.65);\n --amber-5: color(display-p3 0.97 0.902 0.527);\n --amber-6: color(display-p3 0.936 0.844 0.506);\n --amber-7: color(display-p3 0.89 0.762 0.443);\n --amber-8: color(display-p3 0.85 0.65 0.3);\n --amber-9: color(display-p3 1 0.77 0.26);\n --amber-10: color(display-p3 0.959 0.741 0.274);\n --amber-11: color(display-p3 0.64 0.4 0);\n --amber-12: color(display-p3 0.294 0.208 0.145);\n }\n }\n}\n\n:root, .light, .light-theme {\n --red-1: #fffcfc;\n --red-2: #fff7f7;\n --red-3: #feebec;\n --red-4: #ffdbdc;\n --red-5: #ffcdce;\n --red-6: #fdbdbe;\n --red-7: #f4a9aa;\n --red-8: #eb8e90;\n --red-9: #e5484d;\n --red-10: #dc3e42;\n --red-11: #ce2c31;\n --red-12: #641723;\n}\n\n@supports (color: color(display-p3 1 1 1)) {\n @media (color-gamut: p3) {\n :root, .light, .light-theme {\n --red-1: color(display-p3 0.998 0.989 0.988);\n --red-2: color(display-p3 0.995 0.971 0.971);\n --red-3: color(display-p3 0.985 0.925 0.925);\n --red-4: color(display-p3 0.999 0.866 0.866);\n --red-5: color(display-p3 0.984 0.812 0.811);\n --red-6: color(display-p3 0.955 0.751 0.749);\n --red-7: color(display-p3 0.915 0.675 0.672);\n --red-8: color(display-p3 0.872 0.575 0.572);\n --red-9: color(display-p3 0.83 0.329 0.324);\n --red-10: color(display-p3 0.798 0.294 0.285);\n --red-11: color(display-p3 0.744 0.234 0.222);\n --red-12: color(display-p3 0.36 0.115 0.143);\n }\n }\n}\n\n/** Code mirror */\n\n.mdxeditor .cm-editor {\n --sp-font-mono: var(--font-mono);\n --sp-font-body: var(--font-body);\n padding: var(--sp-space-4) 0;\n }\n\n.mdxeditor .sp-editor .cm-editor {\n padding-bottom: 0;\n }\n\n.mdxeditor .cm-scroller {\n padding: 0 !important;\n }\n\n.mdxeditor .cm-focused {\n outline: none;\n }\n\n.mdxeditor .sp-wrapper {\n overflow: hidden;\n }\n\n.mdxeditor .sp-layout {\n border: none;\n }\n\n.mdxeditor .sp-cm pre {\n white-space: break-spaces;\n word-break: break-word;\n overflow-wrap: anywhere;\n flex-shrink: 1;\n }\n\n/** Diff viewer */\n\n.mdxeditor .cm-mergeView .cm-scroller {\n font-family: var(--font-mono);\n line-height: 1.3rem;\n font-size: var(--text-xs);\n }\n\n/** Diff viewer */\n\n.mdxeditor .cm-sourceView .cm-scroller {\n font-family: var(--font-mono);\n line-height: 1.3rem;\n font-size: var(--text-xs);\n }\n\n.mdxeditor .cm-gutters {\n background: transparent;\n font-size: var(--text-xxs);\n }\n\n.mdxeditor .cm-activeLine {\n background: transparent;\n }\n\n.mdxeditor .cm-tooltip-autocomplete {\n background: var(--baseBgSubtle);\n }\n\n.mdxeditor hr.selected[data-lexical-decorator=true] {\n outline: 2px solid highlight;\n }\n._editorRoot_1e2ox_53 {\n --accentBase: var(--blue-1);\n --accentBgSubtle: var(--blue-2);\n --accentBg: var(--blue-3);\n --accentBgHover: var(--blue-4);\n --accentBgActive: var(--blue-5);\n --accentLine: var(--blue-6);\n --accentBorder: var(--blue-7);\n --accentBorderHover: var(--blue-8);\n --accentSolid: var(--blue-9);\n --accentSolidHover: var(--blue-10);\n --accentText: var(--blue-11);\n --accentTextContrast: var(--blue-12);\n\n --basePageBg: white;\n --baseBase: var(--slate-1);\n --baseBgSubtle: var(--slate-2);\n --baseBg: var(--slate-3);\n --baseBgHover: var(--slate-4);\n --baseBgActive: var(--slate-5);\n --baseLine: var(--slate-6);\n --baseBorder: var(--slate-7);\n --baseBorderHover: var(--slate-8);\n --baseSolid: var(--slate-9);\n --baseSolidHover: var(--slate-10);\n --baseText: var(--slate-11);\n --baseTextContrast: var(--slate-12);\n\n --admonitionTipBg: var(--cyan-4);\n --admonitionTipBorder: var(--cyan-8);\n\n --admonitionInfoBg: var(--grass-4);\n --admonitionInfoBorder: var(--grass-8);\n\n --admonitionCautionBg: var(--amber-4);\n --admonitionCautionBorder: var(--amber-8);\n\n --admonitionDangerBg: var(--red-4);\n --admonitionDangerBorder: var(--red-8);\n\n --admonitionNoteBg: var(--slate-4);\n --admonitionNoteBorder: var(--slate-8);\n\n --error-color: var(--red-10);\n\n --spacing-0: 0px;\n --spacing-px: 1px;\n --spacing-0_5: 0.125rem;\n --spacing-1: 0.25rem;\n --spacing-1_5: 0.375rem;\n --spacing-2: 0.5rem;\n --spacing-2_5: 0.625rem;\n --spacing-3: 0.75rem;\n --spacing-3_5: 0.875rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-7: 1.75rem;\n --spacing-8: 2rem;\n --spacing-9: 2.25rem;\n --spacing-10: 2.5rem;\n --spacing-11: 2.75rem;\n --spacing-12: 3rem;\n --spacing-14: 3.5rem;\n --spacing-16: 4rem;\n --spacing-20: 5rem;\n --spacing-24: 6rem;\n --spacing-28: 7rem;\n --spacing-32: 8rem;\n --spacing-36: 9rem;\n --spacing-40: 10rem;\n --spacing-44: 11rem;\n --spacing-48: 12rem;\n --spacing-52: 13rem;\n --spacing-56: 14rem;\n --spacing-60: 15rem;\n --spacing-64: 16rem;\n --spacing-72: 18rem;\n --spacing-80: 20rem;\n --spacing-96: 24rem;\n\n --radius-none: 0px;\n --radius-small: var(--spacing-0_5);\n --radius-base: var(--spacing-1);\n --radius-medium: var(--spacing-1_5);\n --radius-large: var(--spacing-2);\n --radius-extra-large: var(--spacing-3);\n --radius-full: 9999px;\n\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;\n --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue',\n sans-serif;\n\n --text-base: 1rem;\n --text-sm: 0.875rem;\n --text-xs: 0.75rem;\n --text-xxs: 0.6rem;\n\n font-family: var(--font-body);\n color: var(--baseText);\n}\n\n._editorWrapper_1e2ox_155 {\n}\n\n._nestedListItem_1e2ox_158 {\n list-style: none;\n}\n\n._toolbarRoot_1e2ox_162 {\n z-index: 2;\n display: flex;\n flex-direction: row;\n gap: var(--spacing-1);\n border-radius: var(--radius-medium);\n padding: var(--spacing-1_5);\n align-items: center;\n overflow-x: auto;\n position: sticky;\n top: 0;\n background-color: var(--baseBg);\n width: inherit;\n}\n\n._toolbarRoot_1e2ox_162 div[role='separator'] {\n margin: var(--spacing-2) var(--spacing-1);\n border-left: 1px solid var(--baseBorder);\n border-right: 1px solid var(--baseBase);\n height: var(--spacing-4);\n }\n\n._toolbarRoot_1e2ox_162 svg {\n color: var(--baseTextContrast);\n display: block;\n }\n\n._readOnlyToolbarRoot_1e2ox_189 {\n pointer-events: none;\n background: var(--baseBase);\n}\n\n._readOnlyToolbarRoot_1e2ox_189 > div {\n opacity: 0.5;\n }\n\n._toolbarModeSwitch_1e2ox_198 {\n opacity: 1 !important;\n margin-left: auto;\n align-self: stretch;\n align-items: stretch;\n display: flex;\n border: 1px solid var(--baseBg);\n border-radius: var(--radius-medium);\n font-size: var(--text-xs);\n}\n\n._toolbarModeSwitch_1e2ox_198 ._toolbarToggleItem_1e2ox_208 {\n padding-inline-end: var(--spacing-4);\n padding-inline-start: var(--spacing-4);\n }\n\n._toolbarModeSwitch_1e2ox_198 ._toolbarToggleItem_1e2ox_208:active,\n ._toolbarModeSwitch_1e2ox_198 ._toolbarToggleItem_1e2ox_208[data-state='on'] {\n background-color: var(--baseBorder);\n }\n\n._toolbarGroupOfGroups_1e2ox_219 {\n display: flex;\n margin: 0 var(--spacing-1);\n}\n\n._toolbarToggleSingleGroup_1e2ox_224:first-of-type ._toolbarToggleItem_1e2ox_208:only-child,\n._toolbarToggleSingleGroup_1e2ox_224:only-child ._toolbarToggleItem_1e2ox_208:first-child,\n._toolbarModeSwitch_1e2ox_198 ._toolbarToggleItem_1e2ox_208:first-child {\n border-top-left-radius: var(--radius-base);\n border-bottom-left-radius: var(--radius-base);\n}\n\n._toolbarToggleSingleGroup_1e2ox_224:last-of-type ._toolbarToggleItem_1e2ox_208:only-child,\n._toolbarToggleSingleGroup_1e2ox_224:only-child ._toolbarToggleItem_1e2ox_208:last-child,\n._toolbarModeSwitch_1e2ox_198 ._toolbarToggleItem_1e2ox_208:last-child {\n border-top-right-radius: var(--radius-base);\n border-bottom-right-radius: var(--radius-base);\n}\n\n._toolbarToggleItem_1e2ox_208,\n._toolbarButton_1e2ox_239 {\n border: 0;\n background-color: transparent;\n font-size: inherit;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n all: unset;\n box-sizing: border-box;\n cursor: default;\n padding: var(--spacing-0_5);\n}\n\n@media (hover: hover) {\n ._toolbarToggleItem_1e2ox_208:hover, ._toolbarButton_1e2ox_239:hover {\n background-color: var(--baseBgActive);\n }\n }\n\n._toolbarToggleItem_1e2ox_208:active svg, ._toolbarButton_1e2ox_239:active svg {\n transform: translate(1px, 1px);\n }\n\n._toolbarToggleItem_1e2ox_208[data-state='on'],\n ._toolbarButton_1e2ox_239[data-state='on'],\n ._toolbarToggleItem_1e2ox_208:active,\n ._toolbarButton_1e2ox_239:active {\n color: var(--baseTextContrast);\n background-color: var(--baseBgActive);\n }\n\n._toolbarToggleItem_1e2ox_208[data-disabled], ._toolbarButton_1e2ox_239[data-disabled] {\n pointer-events: none;\n }\n\n._toolbarToggleItem_1e2ox_208[data-disabled] svg, ._toolbarButton_1e2ox_239[data-disabled] svg {\n color: var(--baseBorderHover);\n }\n\n._toolbarButton_1e2ox_239 {\n border-radius: var(--radius-base);\n}\n\n._toolbarButton_1e2ox_239 + ._toolbarButton_1e2ox_239 {\n margin-left: var(--spacing-1);\n}\n\n._activeToolbarButton_1e2ox_275 {\n color: var(--accentText);\n}\n\n._toolbarToggleSingleGroup_1e2ox_224 {\n display: flex;\n align-items: center;\n white-space: nowrap;\n}\n\n._toolbarNodeKindSelectContainer_1e2ox_285,\n._toolbarButtonDropdownContainer_1e2ox_286,\n._toolbarCodeBlockLanguageSelectContent_1e2ox_287,\n._selectContainer_1e2ox_288 {\n filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.2));\n z-index: 3;\n width: var(--spacing-36);\n border-bottom-left-radius: var(--radius-base);\n border-bottom-right-radius: var(--radius-base);\n background-color: var(--basePageBg);\n font-size: var(--text-sm);\n}\n\n._toolbarButtonDropdownContainer_1e2ox_286 {\n border-top-right-radius: var(--radius-base);\n}\n\n._toolbarButtonDropdownContainer_1e2ox_286 ._selectItem_1e2ox_301:first-child {\n border-top-right-radius: var(--radius-base);\n }\n\n._toolbarNodeKindSelectTrigger_1e2ox_306,\n._toolbarButtonSelectTrigger_1e2ox_307,\n._selectTrigger_1e2ox_308 {\n border: 0;\n background-color: transparent;\n display: flex;\n color: inherit;\n align-items: center;\n width: var(--spacing-36);\n padding: var(--spacing-0_5) var(--spacing-1);\n padding-inline-start: var(--spacing-2);\n border-radius: var(--radius-medium);\n white-space: nowrap;\n flex-wrap: nowrap;\n font-size: var(--text-sm);\n background-color: var(--basePageBg);\n margin: 0 var(--spacing-1);\n}\n\n._toolbarNodeKindSelectTrigger_1e2ox_306[data-state='open'], ._toolbarButtonSelectTrigger_1e2ox_307[data-state='open'], ._selectTrigger_1e2ox_308[data-state='open'] {\n filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.2));\n border-bottom-right-radius: var(--radius-none);\n border-bottom-left-radius: var(--radius-none);\n }\n\n._selectTrigger_1e2ox_308[data-placeholder] > span:first-child {\n color: var(--baseBorderHover);\n}\n\n/** used in the sandpack */\n._toolbarButtonSelectTrigger_1e2ox_307 {\n width: auto;\n padding-inline-start: var(--spacing-2);\n padding-inline-end: var(--spacing-1);\n padding-block: var(--spacing-0_5);\n}\n\n._toolbarCodeBlockLanguageSelectTrigger_1e2ox_343,\n._toolbarCodeBlockLanguageSelectContent_1e2ox_287 {\n width: var(--spacing-48);\n}\n\n._toolbarNodeKindSelectItem_1e2ox_348,\n._selectItem_1e2ox_301 {\n cursor: default;\n display: flex;\n padding: var(--spacing-2);\n}\n\n._toolbarNodeKindSelectItem_1e2ox_348[data-highlighted], ._selectItem_1e2ox_301[data-highlighted] {\n background-color: var(--baseBg);\n }\n\n._toolbarNodeKindSelectItem_1e2ox_348[data-state='checked'], ._selectItem_1e2ox_301[data-state='checked'] {\n color: var(--baseTextContrast);\n background-color: var(--baseBg);\n }\n\n._toolbarNodeKindSelectItem_1e2ox_348[data-highlighted], ._selectItem_1e2ox_301[data-highlighted] {\n outline: none;\n }\n\n._toolbarNodeKindSelectItem_1e2ox_348:last-child, ._selectItem_1e2ox_301:last-child {\n border-bottom-left-radius: var(--radius-base);\n border-bottom-right-radius: var(--radius-base);\n }\n\n._toolbarNodeKindSelectDropdownArrow_1e2ox_373,\n._selectDropdownArrow_1e2ox_374 {\n margin-left: auto;\n display: flex;\n align-items: center;\n}\n\n._contentEditable_1e2ox_380 {\n box-sizing: border-box;\n width: 100%;\n color: var(--baseTextContrast);\n\n padding: var(--spacing-3);\n}\n\n._contentEditable_1e2ox_380:focus {\n outline: none;\n }\n\n._codeMirrorWrapper_1e2ox_392 {\n margin-bottom: var(--spacing-5);\n border: 1px solid var(--baseLine);\n border-radius: var(--radius-medium);\n overflow: hidden;\n padding: 0.8rem;\n position: relative;\n}\n\n._sandPackWrapper_1e2ox_401 {\n margin-bottom: var(--spacing-5);\n border: 1px solid var(--baseLine);\n border-radius: var(--radius-medium);\n overflow: hidden;\n position: relative;\n}\n\n._codeMirrorToolbar_1e2ox_409 {\n position: absolute;\n right: 0;\n top: 0;\n display: flex;\n gap: var(--spacing-1);\n padding: var(--spacing-1);\n z-index: 1;\n background-color: var(--baseBase);\n border-bottom-left-radius: var(--radius-base);\n}\n\n._frontmatterWrapper_1e2ox_413 {\n border-radius: var(--radius-medium);\n padding: var(--spacing-3);\n background-color: var(--baseBgSubtle);\n}\n\n._frontmatterWrapper_1e2ox_413[data-expanded='true'] {\n margin-bottom: var(--spacing-10);\n }\n\n._frontmatterToggleButton_1e2ox_423 {\n border: 0;\n background-color: transparent;\n font-size: inherit;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n all: unset;\n box-sizing: border-box;\n cursor: default;\n display: flex;\n align-items: center;\n gap: var(--spacing-1);\n font-size: var(--text-sm);\n}\n\n._propertyPanelTitle_1e2ox_431 {\n font-size: var(--text-xs);\n font-weight: 400;\n margin: 0;\n padding-top: var(--spacing-2);\n padding-left: var(--spacing-2);\n}\n\n._propertyEditorTable_1e2ox_439 {\n table-layout: fixed;\n border-spacing: var(--spacing-2);\n}\n\n._propertyEditorTable_1e2ox_439 th {\n text-align: left;\n font-size: var(--text-sm);\n padding: var(--spacing-2) var(--spacing-3);\n }\n\n._propertyEditorTable_1e2ox_439 col:nth-child(1) {\n width: 30%;\n }\n\n._propertyEditorTable_1e2ox_439 col:nth-child(2) {\n width: 70%;\n }\n\n._propertyEditorTable_1e2ox_439 td:last-child ._iconButton_1e2ox_457 {\n margin-left: var(--spacing-4);\n margin-right: var(--spacing-4);\n }\n\n._propertyEditorTable_1e2ox_439 ._readOnlyColumnCell_1e2ox_462 {\n padding-left: 0;\n }\n\n._propertyEditorLabelCell_1e2ox_467 {\n font-weight: 400;\n}\n\n._readOnlyColumnCell_1e2ox_462 {\n padding-left: 0;\n}\n\n._buttonsFooter_1e2ox_475 {\n display: flex;\n justify-content: flex-end;\n gap: var(--spacing-2);\n}\n\n._propertyEditorInput_1e2ox_481 {\n border: 0;\n background-color: transparent;\n font-size: inherit;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n all: unset;\n box-sizing: border-box;\n cursor: default;\n width: 100%;\n padding: var(--spacing-2) var(--spacing-3);\n border-radius: var(--radius-base);\n border: 1px solid var(--baseBorder);\n background-color: var(--baseBase);\n font-size: var(--text-sm);\n}\n\n._iconButton_1e2ox_457 {\n border: 0;\n background-color: transparent;\n font-size: inherit;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n all: unset;\n box-sizing: border-box;\n cursor: default;\n color: var(--baseText);\n}\n\n@media (hover: hover) {\n ._iconButton_1e2ox_457:hover {\n color: var(--baseTextContrast);\n }\n }\n\n._iconButton_1e2ox_457:disabled,\n ._iconButton_1e2ox_457:disabled:hover {\n color: var(--baseLine);\n }\n\n._primaryButton_1e2ox_507,\n._secondaryButton_1e2ox_508 {\n border: 0;\n background-color: transparent;\n font-size: inherit;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n all: unset;\n box-sizing: border-box;\n cursor: default;\n padding: var(--spacing-2) var(--spacing-3);\n border: 1px solid var(--accentBorder);\n background-color: var(--accentSolidHover);\n color: var(--baseBase);\n font-size: var(--text-xs);\n border-radius: var(--radius-medium);\n}\n\n._primaryButton_1e2ox_507:disabled, ._secondaryButton_1e2ox_508:disabled {\n background: var(--accentLine);\n border-color: var(--accentBg);\n }\n\n._smallButton_1e2ox_523 {\n font-size: var(--text-xs);\n padding: var(--spacing-1) var(--spacing-2);\n border-radius: var(--radius-base);\n}\n\n._secondaryButton_1e2ox_508 {\n border: 1px solid var(--baseBorder);\n background-color: var(--baseSolidHover);\n color: var(--baseBase);\n}\n\n._dialogForm_1e2ox_535 {\n display: flex;\n flex-direction: row;\n gap: var(--spacing-2);\n}\n\n._linkDialogEditForm_1e2ox_541 {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: var(--spacing-2);\n padding: 0;\n}\n\n._linkDialogInputContainer_1e2ox_549 {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n\n._linkDialogInputWrapper_1e2ox_555 {\n display: flex;\n align-items: center;\n background-color: var(--baseBase);\n\n border-radius: var(--radius-base);\n border: 1px solid var(--baseBorder);\n}\n\n._linkDialogInputWrapper_1e2ox_555[data-visible-dropdown='true'] {\n border-bottom-left-radius: var(--radius-none);\n border-bottom-right-radius: var(--radius-none);\n border-bottom-width: 0;\n }\n\n._linkDialogInputWrapper_1e2ox_555 > button {\n border: 0;\n background-color: transparent;\n font-size: inherit;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n all: unset;\n box-sizing: border-box;\n cursor: default;\n padding-right: var(--spacing-2);\n }\n\n._linkDialogInput_1e2ox_549,\n._dialogInput_1e2ox_576 {\n border: 0;\n background-color: transparent;\n font-size: inherit;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n all: unset;\n box-sizing: border-box;\n cursor: default;\n width: 20rem;\n padding: var(--spacing-2) var(--spacing-3);\n font-size: var(--text-sm);\n}\n\n._linkDialogInput_1e2ox_549::-moz-placeholder, ._dialogInput_1e2ox_576::-moz-placeholder {\n color: var(--baseBorder);\n }\n\n._linkDialogInput_1e2ox_549::placeholder, ._dialogInput_1e2ox_576::placeholder {\n color: var(--baseBorder);\n }\n\n._linkDialogAnchor_1e2ox_587 {\n position: fixed;\n background-color: highlight;\n z-index: -1;\n}\n\n._linkDialogAnchor_1e2ox_587[data-visible='true'] {\n visibility: visible;\n }\n\n._linkDialogAnchor_1e2ox_587[data-visible='false'] {\n visibility: hidden;\n }\n\n._linkDialogPopoverContent_1e2ox_601,\n._tableColumnEditorPopoverContent_1e2ox_602,\n._dialogContent_1e2ox_603 {\n filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.2));\n display: flex;\n align-items: center;\n gap: var(--spacing-0_5);\n border-radius: var(--radius-medium);\n border: 1px solid var(--baseBg);\n background-color: var(--basePageBg);\n padding: var(--spacing-1) var(--spacing-1);\n font-size: var(--text-sm);\n}\n\n._largeDialogContent_1e2ox_615 {\n filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.2));\n gap: var(--spacing-0_5);\n border-radius: var(--radius-medium);\n border: 1px solid var(--baseBorder);\n background-color: var(--baseBgSubtle);\n padding: var(--spacing-4);\n font-size: var(--text-sm);\n}\n\n._dialogTitle_1e2ox_625 {\n font-size: var(--text-base);\n font-weight: 600;\n padding-left: var(--spacing-2);\n}\n\n._dialogCloseButton_1e2ox_631 {\n border: 0;\n background-color: transparent;\n font-size: inherit;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n all: unset;\n box-sizing: border-box;\n cursor: default;\n position: absolute;\n top: 10px;\n right: 10px;\n}\n\n._popoverContent_1e2ox_638 {\n filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.2));\n display: flex;\n align-items: center;\n gap: var(--spacing-0_5);\n border-radius: var(--radius-medium);\n background-color: var(--baseBgSubtle);\n padding: var(--spacing-2) var(--spacing-2);\n font-size: var(--text-sm);\n z-index: 1;\n}\n\n._popoverArrow_1e2ox_650 {\n fill: var(--basePageBg);\n}\n\n._linkDialogPreviewAnchor_1e2ox_654 {\n margin-right: var(--spacing-1);\n display: flex;\n align-items: center;\n color: var(--accentText);\n text-decoration: none;\n\n border: 1px solid transparent;\n}\n\n@media (hover: hover) {\n ._linkDialogPreviewAnchor_1e2ox_654:hover {\n color: var(--accentSolidHover);\n }\n }\n\n._linkDialogPreviewAnchor_1e2ox_654 span {\n max-width: 14rem;\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n._tooltipTrigger_1e2ox_677 {\n align-self: center;\n}\n\n._tooltipContent_1e2ox_681 {\n z-index: 2;\n position: relative;\n border-radius: var(--radius-medium);\n padding: var(--spacing-1) var(--spacing-2);\n font-size: var(--text-xs);\n background-color: var(--baseText);\n color: var(--baseBase);\n}\n\n._tooltipContent_1e2ox_681 svg {\n fill: var(--baseText);\n }\n\n._actionButton_1e2ox_695 {\n border: 0;\n background-color: transparent;\n font-size: inherit;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n all: unset;\n box-sizing: border-box;\n cursor: default;\n padding: var(--spacing-1);\n color: var(--baseTextContrast);\n padding: var(--spacing-1) var(--spacing-1);\n border-radius: var(--radius-medium);\n color: var(--baseTextContrast);\n}\n\n._actionButton_1e2ox_695 svg {\n display: block;\n }\n\n@media (hover: hover) {\n ._actionButton_1e2ox_695:hover {\n background-color: var(--baseBg);\n }\n }\n\n._actionButton_1e2ox_695:active svg {\n transform: translate(1px, 1px);\n }\n\n._actionButton_1e2ox_695[data-state='on'],\n ._actionButton_1e2ox_695:active {\n background-color: var(--baseBg);\n color: var(--baseTextContrast);\n }\n\n._primaryActionButton_1e2ox_702 {\n background-color: var(--accentSolid);\n color: var(--baseBase);\n}\n\n@media (hover: hover) {\n ._primaryActionButton_1e2ox_702:hover {\n background-color: var(--accentSolidHover);\n color: var(--baseBase);\n }\n }\n\n._tableEditor_1e2ox_714 {\n table-layout: fixed;\n width: 100%;\n height: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n}\n\n._tableEditor_1e2ox_714 thead > tr > th {\n text-align: right;\n }\n\n._tableEditor_1e2ox_714 > tbody > tr > td:not(._toolCell_1e2ox_725),\n ._tableEditor_1e2ox_714 > tbody > tr > th:not(._toolCell_1e2ox_725):not([data-tool-cell='true']) {\n border: 1px solid var(--baseBgActive);\n padding: var(--spacing-1) var(--spacing-2);\n white-space: normal;\n }\n\n:is(._tableEditor_1e2ox_714 > tbody > tr > td:not(._toolCell_1e2ox_725),._tableEditor_1e2ox_714 > tbody > tr > th:not(._toolCell_1e2ox_725):not([data-tool-cell='true'])) > div {\n outline: none;\n }\n\n:is(._tableEditor_1e2ox_714 > tbody > tr > td:not(._toolCell_1e2ox_725),._tableEditor_1e2ox_714 > tbody > tr > th:not(._toolCell_1e2ox_725):not([data-tool-cell='true'])) > div > p {\n margin: 0;\n }\n\n[data-active='true']:is(._tableEditor_1e2ox_714 > tbody > tr > td:not(._toolCell_1e2ox_725),._tableEditor_1e2ox_714 > tbody > tr > th:not(._toolCell_1e2ox_725):not([data-tool-cell='true'])) {\n outline: solid 1px var(--baseSolid);\n }\n\n._tableEditor_1e2ox_714 ._tableColumnEditorTrigger_1e2ox_744,\n ._tableEditor_1e2ox_714 ._tableRowEditorTrigger_1e2ox_745,\n ._tableEditor_1e2ox_714 ._addRowButton_1e2ox_746,\n ._tableEditor_1e2ox_714 ._addColumnButton_1e2ox_747,\n ._tableEditor_1e2ox_714 ._iconButton_1e2ox_457 {\n opacity: 0.15;\n }\n\n@media (hover: hover) {\n ._tableEditor_1e2ox_714:hover ._tableColumnEditorTrigger_1e2ox_744,\n ._tableEditor_1e2ox_714:hover ._tableRowEditorTrigger_1e2ox_745,\n ._tableEditor_1e2ox_714:hover ._addRowButton_1e2ox_746,\n ._tableEditor_1e2ox_714:hover ._addColumnButton_1e2ox_747,\n ._tableEditor_1e2ox_714:hover ._iconButton_1e2ox_457 {\n opacity: 0.3;\n }\n\n ._tableEditor_1e2ox_714:hover ._tableColumnEditorTrigger_1e2ox_744:hover, ._tableEditor_1e2ox_714:hover ._tableRowEditorTrigger_1e2ox_745:hover, ._tableEditor_1e2ox_714:hover ._addRowButton_1e2ox_746:hover, ._tableEditor_1e2ox_714:hover ._addColumnButton_1e2ox_747:hover, ._tableEditor_1e2ox_714:hover ._iconButton_1e2ox_457:hover {\n opacity: 1;\n }\n }\n\n._toolCell_1e2ox_725 {\n text-align: right;\n}\n\n._toolCell_1e2ox_725 button {\n margin: auto;\n display: block;\n }\n\n._tableColumnEditorTrigger_1e2ox_744 {\n border: 0;\n background-color: transparent;\n font-size: inherit;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n all: unset;\n box-sizing: border-box;\n cursor: default;\n padding: var(--spacing-1);\n color: var(--baseTextContrast);\n padding: var(--spacing-1);\n border-radius: var(--radius-full);\n opacity: 0.2;\n}\n\n._tableColumnEditorTrigger_1e2ox_744 svg {\n display: block;\n }\n\n@media (hover: hover) {\n ._tableColumnEditorTrigger_1e2ox_744:hover {\n background-color: var(--baseBg);\n }\n }\n\n._tableColumnEditorTrigger_1e2ox_744:active svg {\n transform: translate(1px, 1px);\n }\n\n._tableColumnEditorTrigger_1e2ox_744[data-state='on'],\n ._tableColumnEditorTrigger_1e2ox_744:active {\n background-color: var(--baseBg);\n color: var(--baseTextContrast);\n }\n\n._tableColumnEditorTrigger_1e2ox_744[data-active='true'] {\n opacity: 1 !important;\n }\n\n._tableColumnEditorToolbar_1e2ox_789 {\n display: flex;\n}\n\n._tableColumnEditorToolbar_1e2ox_789 > button {\n border: 0;\n background-color: transparent;\n font-size: inherit;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n all: unset;\n box-sizing: border-box;\n cursor: default;\n padding: var(--spacing-1);\n color: var(--baseTextContrast);\n }\n\n._tableColumnEditorToolbar_1e2ox_789 > button svg {\n display: block;\n }\n\n@media (hover: hover) {\n ._tableColumnEditorToolbar_1e2ox_789 > button:hover {\n background-color: var(--baseBg);\n }\n }\n\n._tableColumnEditorToolbar_1e2ox_789 > button:active svg {\n transform: translate(1px, 1px);\n }\n\n._tableColumnEditorToolbar_1e2ox_789 > button[data-state='on'],\n ._tableColumnEditorToolbar_1e2ox_789 > button:active {\n background-color: var(--baseBg);\n color: var(--baseTextContrast);\n }\n\n._tableColumnEditorToolbar_1e2ox_789 [role='separator'] {\n margin-left: var(--spacing-1);\n margin-right: var(--spacing-1);\n }\n\n._toggleGroupRoot_1e2ox_802 {\n display: inline-flex;\n}\n\n._toggleGroupRoot_1e2ox_802 button {\n border: 0;\n background-color: transparent;\n font-size: inherit;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n all: unset;\n box-sizing: border-box;\n cursor: default;\n padding: var(--spacing-1);\n color: var(--baseTextContrast);\n }\n\n._toggleGroupRoot_1e2ox_802 button svg {\n display: block;\n }\n\n@media (hover: hover) {\n ._toggleGroupRoot_1e2ox_802 button:hover {\n background-color: var(--baseBg);\n }\n }\n\n._toggleGroupRoot_1e2ox_802 button:active svg {\n transform: translate(1px, 1px);\n }\n\n._toggleGroupRoot_1e2ox_802 button[data-state='on'],\n ._toggleGroupRoot_1e2ox_802 button:active {\n background-color: var(--baseBg);\n color: var(--baseTextContrast);\n }\n\n._toggleGroupRoot_1e2ox_802 button:first-child {\n border-top-left-radius: var(--radius-base);\n border-bottom-left-radius: var(--radius-base);\n }\n\n._toggleGroupRoot_1e2ox_802 button:last-child {\n border-top-right-radius: var(--radius-base);\n border-bottom-right-radius: var(--radius-base);\n }\n\n._tableToolsColumn_1e2ox_820 {\n width: 2rem;\n}\n\n._tableToolsColumn_1e2ox_820 button {\n margin: auto;\n display: block;\n }\n\n._leftAlignedCell_1e2ox_829 {\n text-align: left;\n}\n\n._rightAlignedCell_1e2ox_833 {\n text-align: right;\n}\n\n._centeredCell_1e2ox_837 {\n text-align: center;\n}\n\n._addColumnButton_1e2ox_747,\n._addRowButton_1e2ox_746 {\n border: 0;\n background-color: transparent;\n font-size: inherit;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n all: unset;\n box-sizing: border-box;\n cursor: default;\n padding: var(--spacing-1);\n color: var(--baseTextContrast);\n background-color: var(--baseBase);\n\n display: flex;\n align-items: center;\n}\n\n._addColumnButton_1e2ox_747 svg, ._addRowButton_1e2ox_746 svg {\n display: block;\n }\n\n@media (hover: hover) {\n ._addColumnButton_1e2ox_747:hover, ._addRowButton_1e2ox_746:hover {\n background-color: var(--baseBg);\n }\n }\n\n._addColumnButton_1e2ox_747:active svg, ._addRowButton_1e2ox_746:active svg {\n transform: translate(1px, 1px);\n }\n\n._addColumnButton_1e2ox_747[data-state='on'],\n ._addRowButton_1e2ox_746[data-state='on'],\n ._addColumnButton_1e2ox_747:active,\n ._addRowButton_1e2ox_746:active {\n background-color: var(--baseBg);\n color: var(--baseTextContrast);\n }\n\n._addColumnButton_1e2ox_747 svg, ._addRowButton_1e2ox_746 svg {\n margin: auto;\n }\n\n._addRowButton_1e2ox_746 {\n width: 100%;\n margin-top: var(--spacing-px);\n box-sizing: border-box;\n border-bottom-right-radius: var(--radius-medium);\n border-bottom-left-radius: var(--radius-medium);\n}\n\n._addColumnButton_1e2ox_747 {\n margin-left: var(--spacing-px);\n height: 100%;\n border-top-right-radius: var(--radius-medium);\n border-bottom-right-radius: var(--radius-medium);\n}\n\n/** Dialog */\n._dialogOverlay_1e2ox_870 {\n position: fixed;\n inset: 0;\n animation: _overlayShow_1e2ox_1 150ms cubic-bezier(0.16, 1, 0.3, 1);\n background-color: var(--baseBase);\n z-index: 51;\n opacity: 0.5;\n}\n\n._dialogContent_1e2ox_603,\n._largeDialogContent_1e2ox_615 {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n animation: _contentShow_1e2ox_1 150ms cubic-bezier(0.16, 1, 0.3, 1);\n z-index: 52;\n}\n\n._dialogContent_1e2ox_603:focus,\n._largeDialogContent_1e2ox_615:focus {\n outline: none;\n}\n\n@keyframes _overlayShow_1e2ox_1 {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 0.5;\n }\n}\n\n@keyframes _contentShow_1e2ox_1 {\n from {\n opacity: 0;\n transform: translate(-50%, -48%) scale(0.96);\n }\n\n to {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n }\n}\n\n._focusedImage_1e2ox_916 {\n outline: highlight solid 2px;\n}\n\n._imageWrapper_1e2ox_920 {\n display: inline-block;\n position: relative;\n}\n\n._imageWrapper_1e2ox_920[draggable='true'] {\n cursor: move;\n /* fallback if grab cursor is unsupported */\n cursor: grab;\n cursor: -webkit-grab;\n}\n\n._editImageToolbar_1e2ox_933 {\n position: absolute;\n right: 0;\n top: 0;\n display: flex;\n gap: var(--spacing-1);\n padding: var(--spacing-1);\n z-index: 1;\n background-color: var(--baseBase);\n border-bottom-left-radius: var(--radius-base);\n}\n\n._editImageButton_1e2ox_937 svg {\n display: block;\n }\n\n._inlineEditor_1e2ox_943 {\n display: inline-flex;\n border-radius: var(--radius-medium);\n padding: var(--spacing-1);\n gap: var(--spacing-2);\n align-items: center;\n background: var(--baseBg);\n}\n\n._blockEditor_1e2ox_952 {\n display: flex;\n justify-content: stretch;\n border-radius: var(--radius-medium);\n padding: var(--spacing-2);\n gap: var(--spacing-2);\n align-items: center;\n background: var(--baseBg);\n}\n\n._blockEditor_1e2ox_952 ._nestedEditor_1e2ox_961 {\n flex-grow: 1;\n }\n\n._nestedEditor_1e2ox_961 {\n background: var(--basePageBg);\n padding: var(--spacing-1) var(--spacing-2);\n border-radius: var(--radius-medium);\n}\n\n._nestedEditor_1e2ox_961 > p {\n margin: 0;\n }\n\n._nestedEditor_1e2ox_961:focus {\n outline: none;\n }\n\n._genericComponentName_1e2ox_980 {\n font-size: var(--text-sm);\n color: var(--baseText);\n padding-right: var(--spacing-2);\n}\n\n._diffSourceToggleWrapper_1e2ox_986 {\n margin-left: auto;\n pointer-events: auto;\n opacity: 1;\n position: sticky;\n right: 0;\n}\n\n._ggDiffSourceToggle_1e2ox_994 {\n}\n\n._diffSourceToggle_1e2ox_986 {\n border-radius: var(--radius-medium);\n background-color: var(--baseBase);\n display: flex;\n}\n\n._diffSourceToggle_1e2ox_986 ._toolbarToggleItem_1e2ox_208 {\n padding: 0;\n }\n\n._diffSourceToggle_1e2ox_986 ._toolbarToggleItem_1e2ox_208 > span {\n display: block;\n padding: var(--spacing-1) var(--spacing-1);\n }\n\n._selectWithLabel_1e2ox_1012 {\n display: flex;\n align-items: center;\n gap: var(--spacing-2);\n margin-left: var(--spacing-2);\n}\n\n._selectWithLabel_1e2ox_1012 > label {\n font-size: var(--text-sm);\n }\n\n._selectWithLabel_1e2ox_1012 ._selectTrigger_1e2ox_308 {\n border: 1px solid var(--baseBorder);\n }\n\n._toolbarTitleMode_1e2ox_1027 {\n font-size: var(--text-sm);\n margin-left: var(--spacing-2);\n}\n\n._imageControlWrapperResizing_1e2ox_1032 {\n touch-action: none;\n}\n\n._imageResizer_1e2ox_1036 {\n display: block;\n width: 7px;\n height: 7px;\n position: absolute;\n background-color: var(--accentText);\n border: 1px solid var(--baseBg);\n}\n\n._imageResizer_1e2ox_1036._imageResizerN_1e2ox_1045 {\n top: -6px;\n left: 48%;\n cursor: n-resize;\n}\n\n._imageResizer_1e2ox_1036._imageResizerNe_1e2ox_1051 {\n top: -6px;\n right: -6px;\n cursor: ne-resize;\n}\n\n._imageResizer_1e2ox_1036._imageResizerE_1e2ox_1057 {\n bottom: 48%;\n right: -6px;\n cursor: e-resize;\n}\n\n._imageResizer_1e2ox_1036._imageResizerSe_1e2ox_1063 {\n bottom: -2px;\n right: -6px;\n cursor: nwse-resize;\n}\n\n._imageResizer_1e2ox_1036._imageResizerS_1e2ox_1063 {\n bottom: -2px;\n left: 48%;\n cursor: s-resize;\n}\n\n._imageResizer_1e2ox_1036._imageResizerSw_1e2ox_1075 {\n bottom: -2px;\n left: -6px;\n cursor: sw-resize;\n}\n\n._imageResizer_1e2ox_1036._imageResizerW_1e2ox_1081 {\n bottom: 48%;\n left: -6px;\n cursor: w-resize;\n}\n\n._imageResizer_1e2ox_1036._imageResizerNw_1e2ox_1087 {\n top: -6px;\n left: -6px;\n cursor: nw-resize;\n}\n\n._imagePlaceholder_1e2ox_1093 {\n border: 2px dashed;\n padding: 48px;\n margin: 12px;\n width: -moz-fit-content;\n width: fit-content;\n height: -moz-fit-content;\n height: fit-content;\n}\n\n._imageDimensionsContainer_1e2ox_1101 {\n display: flex;\n gap: var(--spacing-4);\n}\n\n._placeholder_1e2ox_1106 {\n color: var(--baseSolid);\n overflow: hidden;\n position: absolute;\n top: 0;\n padding: var(--spacing-3);\n text-overflow: ellipsis;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n white-space: nowrap;\n display: inline-block;\n pointer-events: none;\n}\n\n._rootContentEditableWrapper_1e2ox_1119 {\n position: relative;\n}\n\n._downshiftContainer_1e2ox_1123 {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n\n._downshiftInputWrapper_1e2ox_1129 {\n display: flex;\n align-items: center;\n background-color: var(--baseBase);\n\n border-radius: var(--radius-base);\n border: 1px solid var(--baseBorder);\n}\n\n._downshiftInputWrapper_1e2ox_1129[data-visible-dropdown='true'] {\n border-bottom-left-radius: var(--radius-none);\n border-bottom-right-radius: var(--radius-none);\n border-bottom-width: 0;\n }\n\n._downshiftInputWrapper_1e2ox_1129 > button {\n border: 0;\n background-color: transparent;\n font-size: inherit;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n all: unset;\n box-sizing: border-box;\n cursor: default;\n padding-right: var(--spacing-2);\n }\n\n._downshiftInput_1e2ox_1129 {\n border: 0;\n background-color: transparent;\n font-size: inherit;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n all: unset;\n box-sizing: border-box;\n cursor: default;\n width: 20rem;\n padding: var(--spacing-2) var(--spacing-3);\n font-size: var(--text-sm);\n}\n\n._downshiftInput_1e2ox_1129::-moz-placeholder {\n color: var(--baseBorder);\n }\n\n._downshiftInput_1e2ox_1129::placeholder {\n color: var(--baseBorder);\n }\n\n._downshiftAutocompleteContainer_1e2ox_1160 {\n position: relative;\n}\n\n._downshiftAutocompleteContainer_1e2ox_1160 ul {\n all: unset;\n box-sizing: border-box;\n position: absolute;\n font-size: var(--text-sm);\n width: 100%;\n display: none;\n border-bottom-left-radius: var(--radius-medium);\n border-bottom-right-radius: var(--radius-medium);\n max-height: var(--spacing-48);\n overflow-x: hidden;\n overflow-y: auto;\n border: 1px solid var(--baseBorder);\n border-top-width: 0;\n background-color: var(--baseBase);\n }\n\n._downshiftAutocompleteContainer_1e2ox_1160 ul[data-visible='true'] {\n display: block;\n }\n\n._downshiftAutocompleteContainer_1e2ox_1160 ul li {\n padding: var(--spacing-2) var(--spacing-3);\n white-space: nowrap;\n margin-bottom: var(--spacing-1);\n overflow-x: hidden;\n text-overflow: ellipsis;\n }\n\n._downshiftAutocompleteContainer_1e2ox_1160 ul li[data-selected='true'] {\n background-color: var(--baseBgSubtle);\n }\n\n._downshiftAutocompleteContainer_1e2ox_1160 ul li[data-highlighted='true'] {\n background-color: var(--baseBgHover);\n }\n\n._downshiftAutocompleteContainer_1e2ox_1160 ul li:last-of-type {\n border-bottom-left-radius: var(--radius-medium);\n border-bottom-right-radius: var(--radius-medium);\n }\n\n._textInput_1e2ox_1206 {\n all: unset;\n border-radius: var(--radius-base);\n border: 1px solid var(--baseBorder);\n background-color: var(--baseBase);\n padding: var(--spacing-2) var(--spacing-3);\n}\n\nform._multiFieldForm_1e2ox_1214 {\n display: flex;\n flex-direction: column;\n padding: var(--spacing-2);\n gap: var(--spacing-2);\n}\n\nform._multiFieldForm_1e2ox_1214 ._formField_1e2ox_1220 {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-2);\n }\n\nform._multiFieldForm_1e2ox_1214 ._formField_1e2ox_1220 label {\n font-size: var(--text-xs);\n }\n\n._markdownParseError_1e2ox_1231 {\n border-radius: var(--radius-base);\n border: 1px solid var(--error-color);\n padding: var(--spacing-2);\n margin-block: var(--spacing-2);\n color: var(--error-color);\n font-size: var(--text-xs);\n}\n\n._popupContainer_1e2ox_1240 {\n position: relative;\n z-index: 2;\n}\n\n._inputSizer_1e2ox_1245 {\n display: inline-grid;\n vertical-align: baseline;\n align-items: center;\n position: relative;\n}\n\n._inputSizer_1e2ox_1245::after,\n ._inputSizer_1e2ox_1245 input {\n width: auto;\n min-width: 1rem;\n grid-area: 1 / 2;\n font: inherit;\n margin: 0;\n padding: 0 2px;\n resize: none;\n background: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n color: inherit;\n }\n\n._inputSizer_1e2ox_1245 span {\n padding: 0.25em;\n }\n\n._inputSizer_1e2ox_1245::after {\n content: attr(data-value);\n white-space: pre-wrap;\n }\n:root, ._light_1tncs_1, ._light-theme_1tncs_1 {\n --blue-1: #fbfdff;\n --blue-2: #f4faff;\n --blue-3: #e6f4fe;\n --blue-4: #d5efff;\n --blue-5: #c2e5ff;\n --blue-6: #acd8fc;\n --blue-7: #8ec8f6;\n --blue-8: #5eb1ef;\n --blue-9: #0090ff;\n --blue-10: #0588f0;\n --blue-11: #0d74ce;\n --blue-12: #113264;\n}\n\n@supports (color: color(display-p3 1 1 1)) {\n @media (color-gamut: p3) {\n :root, ._light_1tncs_1, ._light-theme_1tncs_1 {\n --blue-1: color(display-p3 0.986 0.992 0.999);\n --blue-2: color(display-p3 0.96 0.979 0.998);\n --blue-3: color(display-p3 0.912 0.956 0.991);\n --blue-4: color(display-p3 0.853 0.932 1);\n --blue-5: color(display-p3 0.788 0.894 0.998);\n --blue-6: color(display-p3 0.709 0.843 0.976);\n --blue-7: color(display-p3 0.606 0.777 0.947);\n --blue-8: color(display-p3 0.451 0.688 0.917);\n --blue-9: color(display-p3 0.247 0.556 0.969);\n --blue-10: color(display-p3 0.234 0.523 0.912);\n --blue-11: color(display-p3 0.15 0.44 0.84);\n --blue-12: color(display-p3 0.102 0.193 0.379);\n }\n }\n}\n\n._dark_1tncs_1, ._dark-theme_1tncs_1 {\n --blue-1: #0d1520;\n --blue-2: #111927;\n --blue-3: #0d2847;\n --blue-4: #003362;\n --blue-5: #004074;\n --blue-6: #104d87;\n --blue-7: #205d9e;\n --blue-8: #2870bd;\n --blue-9: #0090ff;\n --blue-10: #3b9eff;\n --blue-11: #70b8ff;\n --blue-12: #c2e6ff;\n}\n\n@supports (color: color(display-p3 1 1 1)) {\n @media (color-gamut: p3) {\n ._dark_1tncs_1, ._dark-theme_1tncs_1 {\n --blue-1: color(display-p3 0.057 0.081 0.122);\n --blue-2: color(display-p3 0.072 0.098 0.147);\n --blue-3: color(display-p3 0.078 0.154 0.27);\n --blue-4: color(display-p3 0.033 0.197 0.37);\n --blue-5: color(display-p3 0.08 0.245 0.441);\n --blue-6: color(display-p3 0.14 0.298 0.511);\n --blue-7: color(display-p3 0.195 0.361 0.6);\n --blue-8: color(display-p3 0.239 0.434 0.72);\n --blue-9: color(display-p3 0.247 0.556 0.969);\n --blue-10: color(display-p3 0.344 0.612 0.973);\n --blue-11: color(display-p3 0.49 0.72 1);\n --blue-12: color(display-p3 0.788 0.898 0.99);\n }\n }\n}\n\n:root, ._light_1tncs_1, ._light-theme_1tncs_1 {\n --slate-1: #fcfcfd;\n --slate-2: #f9f9fb;\n --slate-3: #f0f0f3;\n --slate-4: #e8e8ec;\n --slate-5: #e0e1e6;\n --slate-6: #d9d9e0;\n --slate-7: #cdced6;\n --slate-8: #b9bbc6;\n --slate-9: #8b8d98;\n --slate-10: #80838d;\n --slate-11: #60646c;\n --slate-12: #1c2024;\n}\n\n@supports (color: color(display-p3 1 1 1)) {\n @media (color-gamut: p3) {\n :root, ._light_1tncs_1, ._light-theme_1tncs_1 {\n --slate-1: color(display-p3 0.988 0.988 0.992);\n --slate-2: color(display-p3 0.976 0.976 0.984);\n --slate-3: color(display-p3 0.94 0.941 0.953);\n --slate-4: color(display-p3 0.908 0.909 0.925);\n --slate-5: color(display-p3 0.88 0.881 0.901);\n --slate-6: color(display-p3 0.85 0.852 0.876);\n --slate-7: color(display-p3 0.805 0.808 0.838);\n --slate-8: color(display-p3 0.727 0.733 0.773);\n --slate-9: color(display-p3 0.547 0.553 0.592);\n --slate-10: color(display-p3 0.503 0.512 0.549);\n --slate-11: color(display-p3 0.379 0.392 0.421);\n --slate-12: color(display-p3 0.113 0.125 0.14);\n }\n }\n}\n\n._dark_1tncs_1, ._dark-theme_1tncs_1 {\n --slate-1: #111113;\n --slate-2: #18191b;\n --slate-3: #212225;\n --slate-4: #272a2d;\n --slate-5: #2e3135;\n --slate-6: #363a3f;\n --slate-7: #43484e;\n --slate-8: #5a6169;\n --slate-9: #696e77;\n --slate-10: #777b84;\n --slate-11: #b0b4ba;\n --slate-12: #edeef0;\n}\n\n@supports (color: color(display-p3 1 1 1)) {\n @media (color-gamut: p3) {\n ._dark_1tncs_1, ._dark-theme_1tncs_1 {\n --slate-1: color(display-p3 0.067 0.067 0.074);\n --slate-2: color(display-p3 0.095 0.098 0.105);\n --slate-3: color(display-p3 0.13 0.135 0.145);\n --slate-4: color(display-p3 0.156 0.163 0.176);\n --slate-5: color(display-p3 0.183 0.191 0.206);\n --slate-6: color(display-p3 0.215 0.226 0.244);\n --slate-7: color(display-p3 0.265 0.28 0.302);\n --slate-8: color(display-p3 0.357 0.381 0.409);\n --slate-9: color(display-p3 0.415 0.431 0.463);\n --slate-10: color(display-p3 0.469 0.483 0.514);\n --slate-11: color(display-p3 0.692 0.704 0.728);\n --slate-12: color(display-p3 0.93 0.933 0.94);\n }\n }\n}\n\n:root, ._light_1tncs_1, ._light-theme_1tncs_1 {\n --grass-1: #fbfefb;\n --grass-2: #f5fbf5;\n --grass-3: #e9f6e9;\n --grass-4: #daf1db;\n --grass-5: #c9e8ca;\n --grass-6: #b2ddb5;\n --grass-7: #94ce9a;\n --grass-8: #65ba74;\n --grass-9: #46a758;\n --grass-10: #3e9b4f;\n --grass-11: #2a7e3b;\n --grass-12: #203c25;\n}\n\n@supports (color: color(display-p3 1 1 1)) {\n @media (color-gamut: p3) {\n :root, ._light_1tncs_1, ._light-theme_1tncs_1 {\n --grass-1: color(display-p3 0.986 0.996 0.985);\n --grass-2: color(display-p3 0.966 0.983 0.964);\n --grass-3: color(display-p3 0.923 0.965 0.917);\n --grass-4: color(display-p3 0.872 0.94 0.865);\n --grass-5: color(display-p3 0.811 0.908 0.802);\n --grass-6: color(display-p3 0.733 0.864 0.724);\n --grass-7: color(display-p3 0.628 0.803 0.622);\n --grass-8: color(display-p3 0.477 0.72 0.482);\n --grass-9: color(display-p3 0.38 0.647 0.378);\n --grass-10: color(display-p3 0.344 0.598 0.342);\n --grass-11: color(display-p3 0.263 0.488 0.261);\n --grass-12: color(display-p3 0.151 0.233 0.153);\n }\n }\n}\n\n:root, ._light_1tncs_1, ._light-theme_1tncs_1 {\n --cyan-1: #fafdfe;\n --cyan-2: #f2fafb;\n --cyan-3: #def7f9;\n --cyan-4: #caf1f6;\n --cyan-5: #b5e9f0;\n --cyan-6: #9ddde7;\n --cyan-7: #7dcedc;\n --cyan-8: #3db9cf;\n --cyan-9: #00a2c7;\n --cyan-10: #0797b9;\n --cyan-11: #107d98;\n --cyan-12: #0d3c48;\n}\n\n@supports (color: color(display-p3 1 1 1)) {\n @media (color-gamut: p3) {\n :root, ._light_1tncs_1, ._light-theme_1tncs_1 {\n --cyan-1: color(display-p3 0.982 0.992 0.996);\n --cyan-2: color(display-p3 0.955 0.981 0.984);\n --cyan-3: color(display-p3 0.888 0.965 0.975);\n --cyan-4: color(display-p3 0.821 0.941 0.959);\n --cyan-5: color(display-p3 0.751 0.907 0.935);\n --cyan-6: color(display-p3 0.671 0.862 0.9);\n --cyan-7: color(display-p3 0.564 0.8 0.854);\n --cyan-8: color(display-p3 0.388 0.715 0.798);\n --cyan-9: color(display-p3 0.282 0.627 0.765);\n --cyan-10: color(display-p3 0.264 0.583 0.71);\n --cyan-11: color(display-p3 0.08 0.48 0.63);\n --cyan-12: color(display-p3 0.108 0.232 0.277);\n }\n }\n}\n\n:root, ._light_1tncs_1, ._light-theme_1tncs_1 {\n --amber-1: #fefdfb;\n --amber-2: #fefbe9;\n --amber-3: #fff7c2;\n --amber-4: #ffee9c;\n --amber-5: #fbe577;\n --amber-6: #f3d673;\n --amber-7: #e9c162;\n --amber-8: #e2a336;\n --amber-9: #ffc53d;\n --amber-10: #ffba18;\n --amber-11: #ab6400;\n --amber-12: #4f3422;\n}\n\n@supports (color: color(display-p3 1 1 1)) {\n @media (color-gamut: p3) {\n :root, ._light_1tncs_1, ._light-theme_1tncs_1 {\n --amber-1: color(display-p3 0.995 0.992 0.985);\n --amber-2: color(display-p3 0.994 0.986 0.921);\n --amber-3: color(display-p3 0.994 0.969 0.782);\n --amber-4: color(display-p3 0.989 0.937 0.65);\n --amber-5: color(display-p3 0.97 0.902 0.527);\n --amber-6: color(display-p3 0.936 0.844 0.506);\n --amber-7: color(display-p3 0.89 0.762 0.443);\n --amber-8: color(display-p3 0.85 0.65 0.3);\n --amber-9: color(display-p3 1 0.77 0.26);\n --amber-10: color(display-p3 0.959 0.741 0.274);\n --amber-11: color(display-p3 0.64 0.4 0);\n --amber-12: color(display-p3 0.294 0.208 0.145);\n }\n }\n}\n\n:root, ._light_1tncs_1, ._light-theme_1tncs_1 {\n --red-1: #fffcfc;\n --red-2: #fff7f7;\n --red-3: #feebec;\n --red-4: #ffdbdc;\n --red-5: #ffcdce;\n --red-6: #fdbdbe;\n --red-7: #f4a9aa;\n --red-8: #eb8e90;\n --red-9: #e5484d;\n --red-10: #dc3e42;\n --red-11: #ce2c31;\n --red-12: #641723;\n}\n\n@supports (color: color(display-p3 1 1 1)) {\n @media (color-gamut: p3) {\n :root, ._light_1tncs_1, ._light-theme_1tncs_1 {\n --red-1: color(display-p3 0.998 0.989 0.988);\n --red-2: color(display-p3 0.995 0.971 0.971);\n --red-3: color(display-p3 0.985 0.925 0.925);\n --red-4: color(display-p3 0.999 0.866 0.866);\n --red-5: color(display-p3 0.984 0.812 0.811);\n --red-6: color(display-p3 0.955 0.751 0.749);\n --red-7: color(display-p3 0.915 0.675 0.672);\n --red-8: color(display-p3 0.872 0.575 0.572);\n --red-9: color(display-p3 0.83 0.329 0.324);\n --red-10: color(display-p3 0.798 0.294 0.285);\n --red-11: color(display-p3 0.744 0.234 0.222);\n --red-12: color(display-p3 0.36 0.115 0.143);\n }\n }\n}\n\n._bold_1tncs_10 {\n font-weight: bold;\n}\n\n._italic_1tncs_14 {\n font-style: italic;\n}\n\n._underline_1tncs_18 {\n text-decoration: underline;\n}\n\n._bold_1tncs_10 {\n font-weight: 700;\n}\n\n._italic_1tncs_14 {\n font-style: italic;\n}\n\n._underline_1tncs_18 {\n text-decoration: underline\n}\n\n._strikethrough_1tncs_34 {\n text-decoration: line-through\n}\n\n._underlineStrikethrough_1tncs_38 {\n text-decoration: underline line-through\n}\n\n._subscript_1tncs_42 {\n font-size: .8em;\n vertical-align: sub !important\n}\n\n._superscript_1tncs_47 {\n font-size: .8em;\n vertical-align: super\n}\n\n._code_1tncs_52 {\n background-color: var(--baseBg);\n padding: 1px .25rem;\n font-family: var(--font-mono);\n font-size: 94%\n}\n\n._nestedListItem_1tncs_59 {\n list-style: none;\n list-style-type: none;\n}\n\n._nestedListItem_1tncs_59:before,\n._nestedListItem_1tncs_59:after {\n display: none;\n}\n\n._listitem_1tncs_69 {\n margin: var(--spacing-2) 0;\n}\n\n._listItemChecked_1tncs_73,\n._listItemUnchecked_1tncs_74 {\n position: relative;\n margin-left: 0;\n margin-right: 0;\n margin-inline-start: -1rem;\n padding-left: var(--spacing-6);\n padding-right: var(--spacing-6);\n list-style-type: none;\n outline: none;\n}\n\n._listItemChecked_1tncs_73 {\n text-decoration: line-through;\n}\n\n._listItemUnchecked_1tncs_74:before,\n._listItemChecked_1tncs_73:before {\n content: '';\n width: var(--spacing-4);\n height: var(--spacing-4);\n top: 0;\n left: 0;\n cursor: pointer;\n display: block;\n background-size: cover;\n position: absolute;\n}\n\n._listItemUnchecked_1tncs_74[dir='rtl']:before,\n._listItemChecked_1tncs_73[dir='rtl']:before {\n left: auto;\n right: 0;\n}\n\n._listItemUnchecked_1tncs_74:focus:before,\n._listItemChecked_1tncs_73:focus:before {\n box-shadow: 0 0 0 2px var(--accentBgActive);\n border-radius: var(--radius-small);\n}\n\n._listItemUnchecked_1tncs_74:before {\n border: 1px solid var(--baseBorder);\n border-radius: var(--radius-small);\n}\n\n._listItemChecked_1tncs_73:before {\n border: 1px solid var(--accentBorder);\n border-radius: var(--radius-small);\n background-color: var(--accentSolid);\n background-repeat: no-repeat;\n}\n\n._listItemChecked_1tncs_73:after {\n content: '';\n cursor: pointer;\n border-color: var(--baseBase);\n border-style: solid;\n position: absolute;\n display: block;\n top: var(--spacing-0_5);\n width: var(--spacing-1);\n left: var(--spacing-1_5);\n right: var(--spacing-1_5);\n height: var(--spacing-2);\n transform: rotate(45deg);\n border-width: 0 var(--spacing-0_5) var(--spacing-0_5) 0;\n}\n\n._nestedListItem_1tncs_59 {\n list-style-type: none;\n}\n\n._nestedListItem_1tncs_59:before,\n._nestedListItem_1tncs_59:after {\n display: none;\n}\n\n._admonitionDanger_1tncs_151,\n._admonitionInfo_1tncs_152,\n._admonitionNote_1tncs_153,\n._admonitionTip_1tncs_154,\n._admonitionCaution_1tncs_155 {\n padding: var(--spacing-2);\n margin-top: var(--spacing-2);\n margin-bottom: var(--spacing-2);\n border-left: 3px solid var(--admonitionBorder);\n background-color: var(--admonitionBg);\n}\n\n._admonitionInfo_1tncs_152 {\n --admonitionBorder: var(--admonitionInfoBorder);\n --admonitionBg: var(--admonitionInfoBg);\n}\n\n._admonitionTip_1tncs_154 {\n --admonitionBorder: var(--admonitionTipBorder);\n --admonitionBg: var(--admonitionTipBg);\n}\n\n._admonitionCaution_1tncs_155 {\n --admonitionBorder: var(--admonitionCautionBorder);\n --admonitionBg: var(--admonitionCautionBg);\n}\n\n._admonitionDanger_1tncs_151 {\n --admonitionBorder: var(--admonitionDangerBorder);\n --admonitionBg: var(--admonitionDangerBg);\n}\n\n._admonitionNote_1tncs_153 {\n --admonitionBorder: var(--admonitionNoteBorder);\n --admonitionBg: var(--admonitionNoteBg);\n}\n\n._mdxExpression_1tncs_188 {\n font-family: var(--font-mono);\n font-size: 84%;\n color: var(--accentText);\n}\n\n._mdxExpression_1tncs_188 input:focus-visible {\n outline: none;\n }\n";
75317
+ document.head.appendChild(style);
75318
+ })();
75319
+ (function() {
75320
+ if (typeof document === "undefined") return;
75321
+ var id2 = "industry-mdx-editor-styles-L1VzZXJz";
75322
+ if (document.getElementById(id2)) return;
75323
+ var style = document.createElement("style");
75324
+ style.id = id2;
75325
+ style.textContent = "/**\n * Industry-themed MDX Editor styles\n * These CSS custom properties integrate MDXEditor with the industry-theme system\n * Based on Radix UI theming system used by MDXEditor\n *\n * Note: All Radix color variables are set directly by the component\n * This file provides additional content styling and customizations\n */\n\n/* Override MDXEditor's default CSS variables with our theme */\n.themed-mdx-editor [class*='editorRoot'] {\n --accentBase: var(--accentBase) !important;\n --accentBgSubtle: var(--accentBgSubtle) !important;\n --accentBg: var(--accentBg) !important;\n --accentBgHover: var(--accentBgHover) !important;\n --accentBgActive: var(--accentBgActive) !important;\n --accentLine: var(--accentLine) !important;\n --accentBorder: var(--accentBorder) !important;\n --accentBorderHover: var(--accentBorderHover) !important;\n --accentSolid: var(--accentSolid) !important;\n --accentSolidHover: var(--accentSolidHover) !important;\n --accentText: var(--accentText) !important;\n --accentTextContrast: var(--accentTextContrast) !important;\n\n --basePageBg: var(--mdx-editor-bg) !important;\n --baseBase: var(--baseBase) !important;\n --baseBgSubtle: var(--baseBgSubtle) !important;\n --baseBg: var(--baseBg) !important;\n --baseBgHover: var(--baseBgHover) !important;\n --baseBgActive: var(--baseBgActive) !important;\n --baseLine: var(--baseLine) !important;\n --baseBorder: var(--baseBorder) !important;\n --baseBorderHover: var(--baseBorderHover) !important;\n --baseSolid: var(--baseSolid) !important;\n --baseSolidHover: var(--baseSolidHover) !important;\n --baseText: var(--baseText) !important;\n --baseTextContrast: var(--baseTextContrast) !important;\n}\n\n/* MDXEditor content styling */\n.themed-mdx-editor .mdx-editor-content {\n font-family: var(--mdx-editor-font-family);\n font-size: var(--mdx-editor-font-size);\n color: var(--mdx-editor-fg);\n line-height: 1.6;\n\n /* Document padding - similar to Google Docs margins */\n padding-top: var(--mdx-editor-padding-top, 0);\n padding-right: var(--mdx-editor-padding-right, 0);\n padding-bottom: var(--mdx-editor-padding-bottom, 0);\n padding-left: var(--mdx-editor-padding-left, 0);\n\n /* Ensure content is properly contained */\n box-sizing: border-box;\n}\n\n/* Headings */\n.themed-mdx-editor .mdx-editor-content h1,\n.themed-mdx-editor .mdx-editor-content h2,\n.themed-mdx-editor .mdx-editor-content h3,\n.themed-mdx-editor .mdx-editor-content h4,\n.themed-mdx-editor .mdx-editor-content h5,\n.themed-mdx-editor .mdx-editor-content h6 {\n color: var(--mdx-editor-heading-color);\n}\n\n/* Links */\n.themed-mdx-editor .mdx-editor-content a {\n color: var(--mdx-editor-link-color);\n}\n\n/* Inline code */\n.themed-mdx-editor .mdx-editor-content code {\n background-color: var(--mdx-editor-code-bg);\n font-family: var(--mdx-editor-font-family);\n padding: 2px 6px;\n border-radius: 3px;\n}\n\n/* Code blocks - target the CodeMirror editor wrapper */\n.themed-mdx-editor .cm-editor {\n background-color: var(--mdx-editor-code-bg) !important;\n}\n\n.themed-mdx-editor .cm-editor .cm-scroller {\n font-family: var(--mdx-editor-font-family);\n background-color: var(--mdx-editor-code-bg);\n}\n\n.themed-mdx-editor .cm-editor .cm-gutters {\n background-color: var(--mdx-editor-code-bg);\n border-right: 1px solid var(--mdx-editor-border);\n color: var(--mdx-editor-fg);\n}\n\n.themed-mdx-editor .cm-editor .cm-content {\n background-color: var(--mdx-editor-code-bg);\n color: var(--mdx-editor-fg);\n}\n\n.themed-mdx-editor .cm-editor .cm-line {\n background-color: var(--mdx-editor-code-bg);\n}\n\n.themed-mdx-editor .cm-editor .cm-activeLineGutter {\n background-color: var(--baseBgHover);\n}\n\n.themed-mdx-editor .cm-editor .cm-activeLine {\n background-color: var(--baseBgHover);\n}\n\n/* Selection */\n.themed-mdx-editor .mdx-editor-content ::selection {\n background-color: var(--mdx-editor-selection-bg);\n}\n\n/* Toolbar container */\n.themed-mdx-editor [class*='toolbarRoot'] {\n background-color: var(--mdx-editor-toolbar-bg);\n border-bottom: 1px solid var(--mdx-editor-border);\n}\n\n/* Toolbar buttons */\n.themed-mdx-editor [class*='toolbarRoot'] button:not([class*='selectTrigger']) {\n color: var(--mdx-editor-fg);\n}\n\n.themed-mdx-editor [class*='toolbarRoot'] button:not([class*='selectTrigger']):hover {\n background-color: var(--mdx-editor-selection-bg);\n}\n\n/* Fix toolbar SVG icon colors - override MDXEditor's baseTextContrast usage */\n.themed-mdx-editor [class*='toolbarRoot'] svg {\n color: var(--baseText) !important;\n}\n\n/* Toolbar select dropdowns (BlockTypeSelect, etc.) */\n.themed-mdx-editor button[role='combobox'][class*='selectTrigger'],\n.themed-mdx-editor [data-toolbar-item='true'][class*='selectTrigger'],\nbutton[role='combobox'][class*='selectTrigger'][data-toolbar-item='true'] {\n background-color: var(--baseBg) !important;\n color: var(--baseText) !important;\n border: 1px solid var(--baseBorder) !important;\n padding: 4px 8px !important;\n border-radius: 4px !important;\n}\n\n.themed-mdx-editor button[role='combobox'][class*='selectTrigger']:hover,\n.themed-mdx-editor [data-toolbar-item='true'][class*='selectTrigger']:hover,\nbutton[role='combobox'][class*='selectTrigger'][data-toolbar-item='true']:hover {\n background-color: var(--baseBgHover) !important;\n border-color: var(--baseBorderHover) !important;\n}\n\n.themed-mdx-editor button[class*='selectTrigger'] span,\nbutton[class*='selectTrigger'][data-toolbar-item='true'] span {\n color: var(--baseText) !important;\n}\n\n.themed-mdx-editor button[class*='selectTrigger'] [class*='selectDropdownArrow'] svg,\nbutton[class*='selectTrigger'][data-toolbar-item='true'] [class*='selectDropdownArrow'] svg {\n color: var(--baseText) !important;\n}\n\n/* Select dropdown content - Note: These are often portaled outside the editor */\n[class*='selectContent'] {\n background-color: var(--baseBg) !important;\n border: 1px solid var(--baseBorder) !important;\n color: var(--baseText) !important;\n z-index: 9999 !important;\n}\n\n[class*='selectItem'] {\n color: var(--baseText) !important;\n}\n\n[class*='selectItem']:hover {\n background-color: var(--baseBgHover) !important;\n}\n\n[class*='selectItem'][data-state='checked'] {\n background-color: var(--accentBg) !important;\n color: var(--accentText) !important;\n}\n\n/* Table borders - use accent color for visibility */\n.themed-mdx-editor [class*='tableEditor'] > tbody > tr > td:not([class*='toolCell']),\n.themed-mdx-editor [class*='tableEditor'] > tbody > tr > th:not([class*='toolCell']):not([data-tool-cell='true']) {\n border: 1px solid var(--mdx-editor-table-border) !important;\n padding: var(--spacing-1) var(--spacing-2);\n white-space: normal;\n}\n\n.themed-mdx-editor [class*='tableEditor'] > thead > tr > th {\n border: 1px solid var(--mdx-editor-table-border) !important;\n}\n\n/* Source mode editor */\n.themed-mdx-editor [class*='sourceEditor'] {\n font-family: var(--mdx-editor-font-family);\n font-size: var(--mdx-editor-font-size);\n background-color: var(--mdx-editor-bg);\n color: var(--mdx-editor-fg);\n}\n\n/* Scrollbars */\n.themed-mdx-editor ::-webkit-scrollbar {\n width: 12px;\n height: 12px;\n}\n\n.themed-mdx-editor ::-webkit-scrollbar-track {\n background: var(--mdx-editor-bg);\n}\n\n.themed-mdx-editor ::-webkit-scrollbar-thumb {\n background: var(--mdx-editor-border);\n border-radius: 6px;\n}\n\n.themed-mdx-editor ::-webkit-scrollbar-thumb:hover {\n background: var(--mdx-editor-fg);\n opacity: 0.5;\n}\n\n/*\n * Tailwind CSS Compatibility Styles\n * Tailwind's Preflight resets all default HTML styles, but MDXEditor expects them.\n * These styles restore necessary defaults for proper content rendering.\n */\n\n/* Restore default heading styles */\n.themed-mdx-editor h1 {\n font-size: 2em;\n font-weight: 700;\n margin-top: 0.67em;\n margin-bottom: 0.67em;\n line-height: 1.2;\n}\n\n.themed-mdx-editor h2 {\n font-size: 1.5em;\n font-weight: 600;\n margin-top: 0.83em;\n margin-bottom: 0.83em;\n line-height: 1.3;\n}\n\n.themed-mdx-editor h3 {\n font-size: 1.17em;\n font-weight: 600;\n margin-top: 1em;\n margin-bottom: 1em;\n line-height: 1.4;\n}\n\n.themed-mdx-editor h4 {\n font-size: 1em;\n font-weight: 600;\n margin-top: 1.33em;\n margin-bottom: 1.33em;\n line-height: 1.5;\n}\n\n.themed-mdx-editor h5 {\n font-size: 0.83em;\n font-weight: 600;\n margin-top: 1.67em;\n margin-bottom: 1.67em;\n line-height: 1.5;\n}\n\n.themed-mdx-editor h6 {\n font-size: 0.67em;\n font-weight: 600;\n margin-top: 2.33em;\n margin-bottom: 2.33em;\n line-height: 1.5;\n}\n\n/* Restore default paragraph spacing */\n.themed-mdx-editor p {\n margin-top: 1em;\n margin-bottom: 1em;\n}\n\n/* Restore default list styles */\n.themed-mdx-editor ul {\n list-style-type: disc;\n margin-top: 1em;\n margin-bottom: 1em;\n padding-left: 2.5em;\n}\n\n.themed-mdx-editor ul ul {\n list-style-type: circle;\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n}\n\n.themed-mdx-editor ul ul ul {\n list-style-type: square;\n}\n\n.themed-mdx-editor ol {\n list-style-type: decimal;\n margin-top: 1em;\n margin-bottom: 1em;\n padding-left: 2.5em;\n}\n\n.themed-mdx-editor ol ol {\n list-style-type: lower-alpha;\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n}\n\n.themed-mdx-editor ol ol ol {\n list-style-type: lower-roman;\n}\n\n.themed-mdx-editor li {\n margin-top: 0.25em;\n margin-bottom: 0.25em;\n}\n\n/* Restore default blockquote styles */\n.themed-mdx-editor blockquote {\n margin-top: 1em;\n margin-bottom: 1em;\n margin-left: 2.5em;\n margin-right: 2.5em;\n padding-left: 1em;\n border-left: 4px solid currentColor;\n opacity: 0.8;\n}\n\n/* Restore default code styles */\n.themed-mdx-editor code {\n font-family: monospace;\n font-size: 0.9em;\n}\n\n.themed-mdx-editor pre {\n margin-top: 1em;\n margin-bottom: 1em;\n padding: 1em;\n overflow: auto;\n}\n\n.themed-mdx-editor pre code {\n font-size: inherit;\n}\n\n/* Restore default table styles */\n.themed-mdx-editor table {\n border-collapse: collapse;\n margin-top: 1em;\n margin-bottom: 1em;\n width: 100%;\n}\n\n.themed-mdx-editor th,\n.themed-mdx-editor td {\n padding: 0.5em;\n text-align: left;\n}\n\n.themed-mdx-editor th {\n font-weight: 600;\n}\n\n/* Restore default emphasis styles */\n.themed-mdx-editor strong,\n.themed-mdx-editor b {\n font-weight: 700;\n}\n\n.themed-mdx-editor em,\n.themed-mdx-editor i {\n font-style: italic;\n}\n\n/* Restore default link styles */\n.themed-mdx-editor a {\n text-decoration: underline;\n cursor: pointer;\n}\n\n/* Restore default hr styles */\n.themed-mdx-editor hr {\n margin-top: 1.5em;\n margin-bottom: 1.5em;\n border: 0;\n border-top: 1px solid currentColor;\n opacity: 0.3;\n}\n";
75326
+ document.head.appendChild(style);
75327
+ })();
75307
75328
  var defaultPreprocessRules = [
75308
75329
  {
75309
75330
  name: "normalize-code-block-language",
@@ -75609,7 +75630,7 @@ var ThemedMDXEditor = forwardRef((props, ref) => {
75609
75630
  containerClassName = "",
75610
75631
  containerStyle = {},
75611
75632
  showLoadingState = false,
75612
- documentPadding,
75633
+ documentPadding = { top: "0.25in", right: "0.5in", bottom: "0.5in", left: "0.5in" },
75613
75634
  autoFixMDX = true,
75614
75635
  markdown: controlledMarkdown,
75615
75636
  onChange: externalOnChange,
@@ -75921,22 +75942,23 @@ var ThemedMDXEditorWithProvider = React__default__default.forwardRef((props, ref
75921
75942
  return /* @__PURE__ */ jsx$1(ThemedMDXEditor, { ref, theme: theme2, ...props });
75922
75943
  });
75923
75944
  ThemedMDXEditorWithProvider.displayName = "ThemedMDXEditorWithProvider";
75924
- const MDXEditorPanel = ({
75925
- filePath,
75926
- initialContent = "# Welcome to MDXEditor\n\nStart editing your markdown content here...",
75927
- contentProvider,
75928
- onSave,
75929
- readOnly: readOnly2 = false,
75930
- onImageUpload
75945
+ const MDXEditorPanelContent = ({
75946
+ context,
75947
+ actions: _actions,
75948
+ events
75931
75949
  }) => {
75950
+ var _a2, _b;
75932
75951
  const { theme: theme2 } = useTheme();
75933
- const [markdown2, setMarkdown] = useState(initialContent);
75952
+ const [filePath, setFilePath] = useState(null);
75953
+ const [markdown2, setMarkdown] = useState("");
75934
75954
  const [isMounted, setIsMounted] = useState(false);
75935
75955
  const [isLoading, setIsLoading] = useState(false);
75936
75956
  const [loadError, setLoadError] = useState(null);
75937
- const [currentFilePath, setCurrentFilePath] = useState(null);
75938
75957
  const [parseError, setParseError] = useState(null);
75939
- const [isDirty, setIsDirty] = useState(false);
75958
+ const [_isDirty, setIsDirty] = useState(false);
75959
+ const fileSystem = (_a2 = context.adapters) == null ? void 0 : _a2.fileSystem;
75960
+ const isEditable = Boolean(fileSystem == null ? void 0 : fileSystem.writeFile);
75961
+ const activeFileSlice = context.getSlice("active-file");
75940
75962
  const plugins = useMemo(
75941
75963
  () => [
75942
75964
  headingsPlugin(),
@@ -75947,10 +75969,10 @@ const MDXEditorPanel = ({
75947
75969
  linkPlugin(),
75948
75970
  linkDialogPlugin(),
75949
75971
  imagePlugin({
75950
- imageUploadHandler: onImageUpload ?? (async (file) => {
75951
- console.log("Image upload not configured:", file.name);
75972
+ imageUploadHandler: async (file) => {
75973
+ console.warn("Image upload not configured:", file.name);
75952
75974
  return "/placeholder-image.png";
75953
- })
75975
+ }
75954
75976
  }),
75955
75977
  tablePlugin(),
75956
75978
  codeBlockPlugin({ defaultCodeBlockLanguage: "javascript" }),
@@ -75994,36 +76016,42 @@ const MDXEditorPanel = ({
75994
76016
  ] }) })
75995
76017
  })
75996
76018
  ],
75997
- [parseError, onImageUpload]
76019
+ [parseError]
75998
76020
  );
75999
76021
  useEffect(() => {
76000
76022
  setIsMounted(true);
76001
76023
  }, []);
76002
76024
  useEffect(() => {
76003
- const loadFileContent = async () => {
76004
- if (!filePath || !contentProvider) {
76005
- setMarkdown(initialContent);
76006
- setCurrentFilePath(null);
76007
- return;
76025
+ var _a3;
76026
+ const path = (_a3 = activeFileSlice == null ? void 0 : activeFileSlice.data) == null ? void 0 : _a3.path;
76027
+ if (path && (path.endsWith(".md") || path.endsWith(".mdx"))) {
76028
+ setFilePath(path);
76029
+ }
76030
+ }, [(_b = activeFileSlice == null ? void 0 : activeFileSlice.data) == null ? void 0 : _b.path]);
76031
+ useEffect(() => {
76032
+ const unsubscribe = events.on("file:open", (event) => {
76033
+ const payload = event.payload;
76034
+ if (payload == null ? void 0 : payload.path) {
76035
+ const path = payload.path;
76036
+ if (path.endsWith(".md") || path.endsWith(".mdx")) {
76037
+ setFilePath(path);
76038
+ }
76008
76039
  }
76009
- if (filePath === currentFilePath) {
76040
+ });
76041
+ return unsubscribe;
76042
+ }, [events]);
76043
+ useEffect(() => {
76044
+ const loadFileContent = async () => {
76045
+ if (!filePath || !(fileSystem == null ? void 0 : fileSystem.readFile)) {
76046
+ setMarkdown("");
76010
76047
  return;
76011
76048
  }
76012
- if (currentFilePath && isDirty && contentProvider.writeFile) {
76013
- try {
76014
- await contentProvider.writeFile(currentFilePath, markdown2);
76015
- console.log("Auto-saved before loading new file:", currentFilePath);
76016
- } catch (error) {
76017
- console.error("Failed to auto-save before loading new file:", error);
76018
- }
76019
- }
76020
76049
  setIsLoading(true);
76021
76050
  setLoadError(null);
76022
76051
  try {
76023
- const content2 = await contentProvider.readFile(filePath);
76052
+ const content2 = await fileSystem.readFile(filePath);
76024
76053
  if (content2 !== null) {
76025
76054
  setMarkdown(content2);
76026
- setCurrentFilePath(filePath);
76027
76055
  setParseError(null);
76028
76056
  setIsDirty(false);
76029
76057
  } else {
@@ -76032,32 +76060,14 @@ const MDXEditorPanel = ({
76032
76060
  } catch (error) {
76033
76061
  console.error("Error loading file:", error);
76034
76062
  setLoadError(`Failed to load file: ${filePath}`);
76035
- setMarkdown(initialContent);
76063
+ setMarkdown("");
76036
76064
  setParseError(null);
76037
76065
  } finally {
76038
76066
  setIsLoading(false);
76039
76067
  }
76040
76068
  };
76041
76069
  loadFileContent();
76042
- }, [
76043
- filePath,
76044
- contentProvider,
76045
- initialContent,
76046
- currentFilePath,
76047
- isDirty,
76048
- markdown2
76049
- ]);
76050
- useEffect(() => {
76051
- return () => {
76052
- if (currentFilePath && isDirty && (contentProvider == null ? void 0 : contentProvider.writeFile)) {
76053
- contentProvider.writeFile(currentFilePath, markdown2).then(() => {
76054
- console.log("Auto-saved on unmount:", currentFilePath);
76055
- }).catch((error) => {
76056
- console.error("Failed to auto-save on unmount:", error);
76057
- });
76058
- }
76059
- };
76060
- }, [currentFilePath, isDirty, markdown2, contentProvider]);
76070
+ }, [filePath, fileSystem]);
76061
76071
  const handleChange = useCallback((value2) => {
76062
76072
  setMarkdown(value2);
76063
76073
  setParseError(null);
@@ -76065,20 +76075,22 @@ const MDXEditorPanel = ({
76065
76075
  const handleSave = useCallback(
76066
76076
  async (content2) => {
76067
76077
  const contentToSave = content2 || markdown2;
76068
- if (onSave) {
76069
- onSave(contentToSave);
76070
- }
76071
- if (currentFilePath && (contentProvider == null ? void 0 : contentProvider.writeFile)) {
76078
+ if (filePath && (fileSystem == null ? void 0 : fileSystem.writeFile)) {
76072
76079
  try {
76073
- await contentProvider.writeFile(currentFilePath, contentToSave);
76074
- console.log("File saved successfully:", currentFilePath);
76080
+ await fileSystem.writeFile(filePath, contentToSave);
76075
76081
  setIsDirty(false);
76082
+ events.emit({
76083
+ type: "file:save",
76084
+ source: "industry-theme.mdx-editor",
76085
+ timestamp: Date.now(),
76086
+ payload: { path: filePath }
76087
+ });
76076
76088
  } catch (error) {
76077
76089
  console.error("Error saving file:", error);
76078
76090
  }
76079
76091
  }
76080
76092
  },
76081
- [markdown2, onSave, currentFilePath, contentProvider]
76093
+ [markdown2, filePath, fileSystem, events]
76082
76094
  );
76083
76095
  if (!isMounted) {
76084
76096
  return /* @__PURE__ */ jsx$1(
@@ -76089,7 +76101,8 @@ const MDXEditorPanel = ({
76089
76101
  alignItems: "center",
76090
76102
  justifyContent: "center",
76091
76103
  height: "100%",
76092
- color: theme2.colors.text
76104
+ color: theme2.colors.text,
76105
+ fontFamily: theme2.fonts.body
76093
76106
  },
76094
76107
  children: "Loading editor..."
76095
76108
  }
@@ -76104,7 +76117,8 @@ const MDXEditorPanel = ({
76104
76117
  alignItems: "center",
76105
76118
  justifyContent: "center",
76106
76119
  height: "100%",
76107
- color: theme2.colors.text
76120
+ color: theme2.colors.text,
76121
+ fontFamily: theme2.fonts.body
76108
76122
  },
76109
76123
  children: "Loading file..."
76110
76124
  }
@@ -76122,7 +76136,8 @@ const MDXEditorPanel = ({
76122
76136
  height: "100%",
76123
76137
  color: theme2.colors.error,
76124
76138
  padding: "20px",
76125
- textAlign: "center"
76139
+ textAlign: "center",
76140
+ fontFamily: theme2.fonts.body
76126
76141
  },
76127
76142
  children: [
76128
76143
  /* @__PURE__ */ jsx$1("div", { style: { marginBottom: "10px" }, children: "Warning" }),
@@ -76131,7 +76146,7 @@ const MDXEditorPanel = ({
76131
76146
  }
76132
76147
  );
76133
76148
  }
76134
- if (!filePath && !initialContent) {
76149
+ if (!filePath) {
76135
76150
  return /* @__PURE__ */ jsxs(
76136
76151
  "div",
76137
76152
  {
@@ -76143,7 +76158,8 @@ const MDXEditorPanel = ({
76143
76158
  height: "100%",
76144
76159
  color: theme2.colors.textSecondary,
76145
76160
  padding: "40px",
76146
- textAlign: "center"
76161
+ textAlign: "center",
76162
+ fontFamily: theme2.fonts.body
76147
76163
  },
76148
76164
  children: [
76149
76165
  /* @__PURE__ */ jsx$1(FileText, { size: 48, style: { marginBottom: "16px", opacity: 0.5 } }),
@@ -76191,9 +76207,9 @@ const MDXEditorPanel = ({
76191
76207
  },
76192
76208
  onChange: handleChange,
76193
76209
  onDirtyChange: setIsDirty,
76194
- readOnly: readOnly2,
76195
- filePath: currentFilePath || void 0,
76196
- enableSaveShortcut: !readOnly2,
76210
+ readOnly: !isEditable,
76211
+ filePath: filePath || void 0,
76212
+ enableSaveShortcut: isEditable,
76197
76213
  hideStatusBar: false,
76198
76214
  documentPadding: { left: 32, right: 32, top: 0, bottom: 32 },
76199
76215
  onError: (error) => {
@@ -76208,7 +76224,7 @@ const MDXEditorPanel = ({
76208
76224
  },
76209
76225
  plugins
76210
76226
  },
76211
- currentFilePath || "default"
76227
+ filePath || "default"
76212
76228
  )
76213
76229
  }
76214
76230
  );
@@ -76250,6 +76266,9 @@ const MDXEditorPanel = ({
76250
76266
  }
76251
76267
  return editorContent;
76252
76268
  };
76269
+ const MDXEditorPanel = (props) => {
76270
+ return /* @__PURE__ */ jsx$1(MDXEditorPanelContent, { ...props });
76271
+ };
76253
76272
  const MDXEditorPanelPreview = () => {
76254
76273
  const { theme: theme2 } = useTheme();
76255
76274
  return /* @__PURE__ */ jsxs(
@@ -76295,15 +76314,204 @@ const MDXEditorPanelPreview = () => {
76295
76314
  }
76296
76315
  );
76297
76316
  };
76317
+ const openFileTool = {
76318
+ name: "open_file",
76319
+ description: "Opens a file in the file editor panel",
76320
+ inputs: {
76321
+ type: "object",
76322
+ properties: {
76323
+ filePath: {
76324
+ type: "string",
76325
+ description: "Path to the file to open"
76326
+ },
76327
+ readOnly: {
76328
+ type: "boolean",
76329
+ description: "Whether to open the file in read-only mode"
76330
+ }
76331
+ },
76332
+ required: ["filePath"]
76333
+ },
76334
+ outputs: {
76335
+ type: "object",
76336
+ properties: {
76337
+ success: { type: "boolean" },
76338
+ filePath: { type: "string" }
76339
+ }
76340
+ },
76341
+ tags: ["file", "editor", "open"],
76342
+ tool_call_template: {
76343
+ call_template_type: "panel_event",
76344
+ event_type: "file-editing-panels:open-file"
76345
+ }
76346
+ };
76347
+ const viewDiffTool = {
76348
+ name: "view_diff",
76349
+ description: "Opens a file in the git diff panel to view changes",
76350
+ inputs: {
76351
+ type: "object",
76352
+ properties: {
76353
+ filePath: {
76354
+ type: "string",
76355
+ description: "Path to the file to diff"
76356
+ },
76357
+ status: {
76358
+ type: "string",
76359
+ enum: ["staged", "unstaged", "untracked", "deleted"],
76360
+ description: "The git status of the file"
76361
+ }
76362
+ },
76363
+ required: ["filePath"]
76364
+ },
76365
+ outputs: {
76366
+ type: "object",
76367
+ properties: {
76368
+ success: { type: "boolean" },
76369
+ filePath: { type: "string" }
76370
+ }
76371
+ },
76372
+ tags: ["git", "diff", "view"],
76373
+ tool_call_template: {
76374
+ call_template_type: "panel_event",
76375
+ event_type: "file-editing-panels:view-diff"
76376
+ }
76377
+ };
76378
+ const openMarkdownTool = {
76379
+ name: "open_markdown",
76380
+ description: "Opens a markdown file in the MDX editor panel",
76381
+ inputs: {
76382
+ type: "object",
76383
+ properties: {
76384
+ filePath: {
76385
+ type: "string",
76386
+ description: "Path to the markdown file to open"
76387
+ },
76388
+ readOnly: {
76389
+ type: "boolean",
76390
+ description: "Whether to open the file in read-only mode"
76391
+ }
76392
+ },
76393
+ required: ["filePath"]
76394
+ },
76395
+ outputs: {
76396
+ type: "object",
76397
+ properties: {
76398
+ success: { type: "boolean" },
76399
+ filePath: { type: "string" }
76400
+ }
76401
+ },
76402
+ tags: ["markdown", "mdx", "editor"],
76403
+ tool_call_template: {
76404
+ call_template_type: "panel_event",
76405
+ event_type: "file-editing-panels:open-markdown"
76406
+ }
76407
+ };
76408
+ const fileEditingPanelTools = [
76409
+ openFileTool,
76410
+ viewDiffTool,
76411
+ openMarkdownTool
76412
+ ];
76413
+ const fileEditingPanelToolsMetadata = {
76414
+ id: "industry-theme.file-editing-panels",
76415
+ name: "File Editing Panels",
76416
+ description: "Tools for file editing, git diff viewing, and markdown editing",
76417
+ tools: fileEditingPanelTools
76418
+ };
76419
+ const panels = [
76420
+ {
76421
+ metadata: {
76422
+ id: "industry-theme.file-editor",
76423
+ name: "File Editor",
76424
+ icon: "📝",
76425
+ version: "0.1.0",
76426
+ author: "Industry Theme",
76427
+ description: "Monaco-based code editor with syntax highlighting",
76428
+ slices: ["active-file", "fileTree"],
76429
+ tools: [fileEditingPanelTools[0]]
76430
+ // openFileTool
76431
+ },
76432
+ component: FileEditorPanel,
76433
+ onMount: async (context) => {
76434
+ var _a2;
76435
+ console.log(
76436
+ "File Editor Panel mounted",
76437
+ (_a2 = context.currentScope.repository) == null ? void 0 : _a2.path
76438
+ );
76439
+ },
76440
+ onUnmount: async (_context) => {
76441
+ console.log("File Editor Panel unmounting");
76442
+ }
76443
+ },
76444
+ {
76445
+ metadata: {
76446
+ id: "industry-theme.git-diff",
76447
+ name: "Git Diff",
76448
+ icon: "🔀",
76449
+ version: "0.1.0",
76450
+ author: "Industry Theme",
76451
+ description: "Side-by-side git diff viewer",
76452
+ slices: ["git", "fileTree"],
76453
+ tools: [fileEditingPanelTools[1]]
76454
+ // viewDiffTool
76455
+ },
76456
+ component: GitDiffPanel,
76457
+ onMount: async (context) => {
76458
+ var _a2;
76459
+ console.log(
76460
+ "Git Diff Panel mounted",
76461
+ (_a2 = context.currentScope.repository) == null ? void 0 : _a2.path
76462
+ );
76463
+ },
76464
+ onUnmount: async (_context) => {
76465
+ console.log("Git Diff Panel unmounting");
76466
+ }
76467
+ },
76468
+ {
76469
+ metadata: {
76470
+ id: "industry-theme.mdx-editor",
76471
+ name: "MDX Editor",
76472
+ icon: "📄",
76473
+ version: "0.1.0",
76474
+ author: "Industry Theme",
76475
+ description: "Rich markdown/MDX editor with live preview",
76476
+ slices: ["active-file", "fileTree"],
76477
+ tools: [fileEditingPanelTools[2]]
76478
+ // openMarkdownTool
76479
+ },
76480
+ component: MDXEditorPanel,
76481
+ onMount: async (context) => {
76482
+ var _a2;
76483
+ console.log(
76484
+ "MDX Editor Panel mounted",
76485
+ (_a2 = context.currentScope.repository) == null ? void 0 : _a2.path
76486
+ );
76487
+ },
76488
+ onUnmount: async (_context) => {
76489
+ console.log("MDX Editor Panel unmounting");
76490
+ }
76491
+ }
76492
+ ];
76493
+ const onPackageLoad = async () => {
76494
+ console.log("Panel package loaded - File Editing Panels");
76495
+ };
76496
+ const onPackageUnload = async () => {
76497
+ console.log("Panel package unloading - File Editing Panels");
76498
+ };
76298
76499
  export {
76500
+ fileEditingPanelToolsMetadata as A,
76501
+ openFileTool as B,
76299
76502
  ContextTracker as C,
76503
+ viewDiffTool as D,
76300
76504
  ExternalTokenizer as E,
76301
- FileEditorPanel as F,
76302
- GitDiffPanel as G,
76505
+ openMarkdownTool as F,
76506
+ FileEditorPanel as G,
76507
+ FileEditorPanelPreview as H,
76303
76508
  IterMode as I,
76509
+ GitDiffPanel as J,
76510
+ GitDiffPanelPreview as K,
76304
76511
  LanguageSupport as L,
76305
76512
  MDXEditorPanel as M,
76306
76513
  NodeWeakMap as N,
76514
+ MDXEditorPanelPreview as O,
76307
76515
  LRLanguage as a,
76308
76516
  LRParser as b,
76309
76517
  continuedIndent as c,
@@ -76326,8 +76534,9 @@ export {
76326
76534
  tags$1 as t,
76327
76535
  bracketMatchingHandle as u,
76328
76536
  javascriptLanguage as v,
76329
- GitDiffPanelPreview as w,
76330
- FileEditorPanelPreview as x,
76331
- MDXEditorPanelPreview as y
76537
+ panels as w,
76538
+ onPackageLoad as x,
76539
+ onPackageUnload as y,
76540
+ fileEditingPanelTools as z
76332
76541
  };
76333
- //# sourceMappingURL=index-BRiZ41Yj.js.map
76542
+ //# sourceMappingURL=index-DbJYCA_w.js.map