@bendyline/docblocks-react 2.7.6 → 2.7.8

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 (43) hide show
  1. package/THIRD_PARTY_NOTICES.txt +205 -35
  2. package/dist/{AiDiagrams-VOCEZS6U.js → AiDiagrams-2IKKSBAU.js} +6 -4
  3. package/dist/{AiEditorAssistant-2MW6UYNI.js → AiEditorAssistant-ANYGVG7P.js} +128 -12
  4. package/dist/AiImagePanel-OXWEFOBC.js +314 -0
  5. package/dist/{AiStudyDialog-DQZVTBI7.js → AiStudyDialog-T3FY74HY.js} +3 -3
  6. package/dist/{AudioExportDialog-EICCBSSE.js → AudioExportDialog-CBMSLQBS.js} +1 -1
  7. package/dist/DocumentConflictDialog-4R4QMKBT.js +217 -0
  8. package/dist/{ExportDialog-LGWBXIWN.js → ExportDialog-FNFD53SY.js} +2 -2
  9. package/dist/{ExportToolbarControls-4LYTXGT3.js → ExportToolbarControls-ZOYH4I36.js} +146 -68
  10. package/dist/{GitUI-F3CNBURE.js → GitUI-3FANM7I3.js} +88 -155
  11. package/dist/{KeyboardShortcutsDialog-HVKDFP5Z.js → KeyboardShortcutsDialog-7XJTDIX2.js} +1 -1
  12. package/dist/{PresentationMaker-T526TBRJ.js → PresentationMaker-COLTVMTS.js} +3 -3
  13. package/dist/{QuickOpenDialog-3QEX7RZG.js → QuickOpenDialog-U2FWCEPA.js} +1 -1
  14. package/dist/{Settings-CfhY489G.d.ts → Settings-ButIB78y.d.ts} +20 -4
  15. package/dist/{ShareDialog-PF7D7ORP.js → ShareDialog-WOWHI6YI.js} +1 -1
  16. package/dist/{SpeechToolbarControl-E6OSJGHL.js → SpeechToolbarControl-BZW6IVZM.js} +1 -1
  17. package/dist/{TextFromNarration-ME6FAYWO.js → TextFromNarration-6BYTUKVZ.js} +2 -2
  18. package/dist/chunk-27E2OON2.js +90 -0
  19. package/dist/{chunk-5O5YTOXG.js → chunk-5YMULR6A.js} +13 -1
  20. package/dist/{chunk-NOYDVL6M.js → chunk-6QHZNL6C.js} +45 -17
  21. package/dist/{chunk-45YTIVYS.js → chunk-A7BK6QFL.js} +363 -26
  22. package/dist/{chunk-PRUEYW3G.js → chunk-BGA5UVKL.js} +58 -17
  23. package/dist/{chunk-T42BH6YX.js → chunk-CXLXGFG2.js} +37 -15
  24. package/dist/{chunk-7CSBRAMT.js → chunk-F7TR5EKX.js} +8 -6
  25. package/dist/chunk-HIKMOKBQ.js +37 -0
  26. package/dist/chunk-OW6JWRAA.js +66 -0
  27. package/dist/{chunk-BNKIPCXO.js → chunk-QXBV3G6T.js} +5 -3
  28. package/dist/{chunk-7HBKKXRV.js → chunk-TN7BY5N3.js} +722 -281
  29. package/dist/{chunk-VJPGZCFS.js → chunk-UYJCL6OW.js} +4 -2
  30. package/dist/{chunk-GFK4TCKN.js → chunk-WDNE5TI3.js} +21 -7
  31. package/dist/{chunk-KBUHWZCF.js → chunk-YX275NPE.js} +1 -1
  32. package/dist/editor.js +3 -3
  33. package/dist/export/index.d.ts +16 -162
  34. package/dist/export/index.js +6 -4
  35. package/dist/image-save-D18dJrUr.d.ts +182 -0
  36. package/dist/index.d.ts +15 -11
  37. package/dist/index.js +1365 -1078
  38. package/dist/{run-export-SPNNH32M.js → run-export-C3PLLWLS.js} +2 -2
  39. package/dist/settings/index.d.ts +1 -1
  40. package/dist/settings/index.js +3 -2
  41. package/package.json +8 -8
  42. package/src/styles/docblocks.css +349 -11
  43. package/dist/DocumentConflictDialog-DZ2BV2IH.js +0 -111
@@ -1,4 +1,7 @@
1
1
  import "./chunk-APC4KI4B.js";
2
+ import {
3
+ GitDiffView
4
+ } from "./chunk-27E2OON2.js";
2
5
  import {
3
6
  BADGE_GLYPHS,
4
7
  BADGE_LABELS,
@@ -14,7 +17,7 @@ import {
14
17
  } from "./chunk-GMA4KGGO.js";
15
18
  import {
16
19
  Dialog
17
- } from "./chunk-VJPGZCFS.js";
20
+ } from "./chunk-UYJCL6OW.js";
18
21
 
19
22
  // src/Git/GitStatusBar.tsx
20
23
  import { useCallback, useEffect, useRef, useState } from "react";
@@ -636,79 +639,9 @@ function GitHistoryDialog({ path, onClose }) {
636
639
  }
637
640
 
638
641
  // src/Git/GitDiffDialog.tsx
639
- import { useEffect as useEffect5, useState as useState5 } from "react";
642
+ import { useEffect as useEffect4, useState as useState5 } from "react";
640
643
  import { getFileSystemProviderV2, parseWorkspacePath } from "@bendyline/docblocks/filesystem";
641
-
642
- // src/Git/GitDiffView.tsx
643
- import { useEffect as useEffect4, useRef as useRef5 } from "react";
644
- import {
645
- detectLanguageFromFileName,
646
- useMonacoLoader
647
- } from "@bendyline/squisq-editor-react";
648
- import { Fragment as Fragment3, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
649
- function languageFor(fileName) {
650
- const detected = detectLanguageFromFileName(fileName);
651
- if (detected) return detected;
652
- return fileName.toLowerCase().endsWith(".md") ? "markdown" : "plaintext";
653
- }
654
- function GitDiffView({ original, modified, fileName, theme, labels }) {
655
- const { monaco, ready } = useMonacoLoader();
656
- const hostRef = useRef5(null);
657
- const editorRef = useRef5(null);
658
- const modelsRef = useRef5(null);
659
- const language = languageFor(fileName);
660
- useEffect4(() => {
661
- const host = hostRef.current;
662
- if (!monaco || !host) return;
663
- const originalModel = monaco.editor.createModel("", "plaintext");
664
- const modifiedModel = monaco.editor.createModel("", "plaintext");
665
- const editor = monaco.editor.createDiffEditor(host, {
666
- readOnly: true,
667
- renderSideBySide: true,
668
- automaticLayout: true,
669
- minimap: { enabled: false },
670
- wordWrap: "on",
671
- scrollBeyondLastLine: false,
672
- renderOverviewRuler: false
673
- });
674
- editor.setModel({ original: originalModel, modified: modifiedModel });
675
- editorRef.current = editor;
676
- modelsRef.current = { original: originalModel, modified: modifiedModel };
677
- return () => {
678
- editorRef.current = null;
679
- modelsRef.current = null;
680
- editor.dispose();
681
- originalModel.dispose();
682
- modifiedModel.dispose();
683
- };
684
- }, [monaco]);
685
- useEffect4(() => {
686
- if (!monaco) return;
687
- const models = modelsRef.current;
688
- if (!models) return;
689
- if (models.original.getValue() !== original) models.original.setValue(original);
690
- if (models.modified.getValue() !== modified) models.modified.setValue(modified);
691
- monaco.editor.setModelLanguage(models.original, language);
692
- monaco.editor.setModelLanguage(models.modified, language);
693
- }, [monaco, original, modified, language]);
694
- useEffect4(() => {
695
- if (!monaco) return;
696
- monaco.editor.setTheme(theme === "dark" ? "vs-dark" : "vs");
697
- }, [monaco, theme]);
698
- if (!ready) {
699
- return /* @__PURE__ */ jsx5("div", { className: "db-git-diff-loading", children: "Loading diff\u2026" });
700
- }
701
- return /* @__PURE__ */ jsxs5(Fragment3, { children: [
702
- labels && /* @__PURE__ */ jsxs5("div", { className: "db-git-diff-labels", children: [
703
- /* @__PURE__ */ jsx5("span", { children: labels.original }),
704
- /* @__PURE__ */ jsx5("span", { children: labels.modified })
705
- ] }),
706
- /* @__PURE__ */ jsx5("div", { ref: hostRef, className: "db-git-diff-host" })
707
- ] });
708
- }
709
-
710
- // src/Git/GitDiffDialog.tsx
711
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
644
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
712
645
  function GitDiffDialog({ path, revision, onClose }) {
713
646
  const git = useGitContext();
714
647
  const gitApi = git?.gitApi ?? null;
@@ -716,7 +649,7 @@ function GitDiffDialog({ path, revision, onClose }) {
716
649
  const repositoryId = git?.repositoryId ?? null;
717
650
  const sha = revision?.sha ?? null;
718
651
  const [state, setState] = useState5({ phase: "loading" });
719
- useEffect5(() => {
652
+ useEffect4(() => {
720
653
  if (!gitApi || !repositoryId) {
721
654
  setState({ phase: "error", message: "Git is not available for this workspace." });
722
655
  return;
@@ -780,12 +713,12 @@ function GitDiffDialog({ path, revision, onClose }) {
780
713
  if (!git) return null;
781
714
  const fullPath = path.replace(/^\/+/, "");
782
715
  const baseName = fullPath.split("/").pop() || fullPath;
783
- return /* @__PURE__ */ jsxs6(Dialog, { title: baseName, size: "full", onClose, children: [
784
- /* @__PURE__ */ jsx6("p", { className: "db-settings-hint", children: fullPath }),
785
- state.phase === "loading" && /* @__PURE__ */ jsx6("p", { className: "db-git-hint", children: "Loading changes\u2026" }),
786
- state.phase === "error" && /* @__PURE__ */ jsx6("p", { className: "db-git-form-error", role: "alert", children: state.message }),
787
- state.phase === "binary" && /* @__PURE__ */ jsx6("p", { className: "db-git-hint", children: "Binary file \u2014 no text diff available." }),
788
- state.phase === "ready" && /* @__PURE__ */ jsx6(
716
+ return /* @__PURE__ */ jsxs5(Dialog, { title: baseName, size: "full", onClose, children: [
717
+ /* @__PURE__ */ jsx5("p", { className: "db-settings-hint", children: fullPath }),
718
+ state.phase === "loading" && /* @__PURE__ */ jsx5("p", { className: "db-git-hint", children: "Loading changes\u2026" }),
719
+ state.phase === "error" && /* @__PURE__ */ jsx5("p", { className: "db-git-form-error", role: "alert", children: state.message }),
720
+ state.phase === "binary" && /* @__PURE__ */ jsx5("p", { className: "db-git-hint", children: "Binary file \u2014 no text diff available." }),
721
+ state.phase === "ready" && /* @__PURE__ */ jsx5(
789
722
  GitDiffView,
790
723
  {
791
724
  original: state.original,
@@ -799,7 +732,7 @@ function GitDiffDialog({ path, revision, onClose }) {
799
732
  }
800
733
 
801
734
  // src/Git/GitCloneDialog.tsx
802
- import { useEffect as useEffect6, useRef as useRef6, useState as useState6 } from "react";
735
+ import { useEffect as useEffect5, useRef as useRef5, useState as useState6 } from "react";
803
736
 
804
737
  // src/Git/git-clone-utils.ts
805
738
  function deriveCloneFolderName(url) {
@@ -820,7 +753,7 @@ function isLikelyGitUrl(url) {
820
753
 
821
754
  // src/Git/GitAuthGuidanceDialog.tsx
822
755
  import { maybeGetDocBlocksHost } from "@bendyline/docblocks/host";
823
- import { Fragment as Fragment4, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
756
+ import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
824
757
  var LEARN_MORE_URL = "https://docs.github.com/en/get-started/getting-started-with-git/caching-your-github-credentials-in-git";
825
758
  var OPERATION_LABELS2 = {
826
759
  push: "push",
@@ -830,24 +763,24 @@ var OPERATION_LABELS2 = {
830
763
  pr: "create the pull request"
831
764
  };
832
765
  function GitCredentialGuidance({ detail }) {
833
- return /* @__PURE__ */ jsxs7(Fragment4, { children: [
834
- /* @__PURE__ */ jsx7("p", { className: "db-settings-hint", children: "DocBlocks never stores Git credentials. Sign in with one of these, then try again:" }),
835
- /* @__PURE__ */ jsxs7("ul", { className: "db-git-hint", children: [
836
- /* @__PURE__ */ jsxs7("li", { children: [
766
+ return /* @__PURE__ */ jsxs6(Fragment3, { children: [
767
+ /* @__PURE__ */ jsx6("p", { className: "db-settings-hint", children: "DocBlocks never stores Git credentials. Sign in with one of these, then try again:" }),
768
+ /* @__PURE__ */ jsxs6("ul", { className: "db-git-hint", children: [
769
+ /* @__PURE__ */ jsxs6("li", { children: [
837
770
  "A git credential helper (",
838
- /* @__PURE__ */ jsx7("code", { children: "git config credential.helper" }),
771
+ /* @__PURE__ */ jsx6("code", { children: "git config credential.helper" }),
839
772
  ")"
840
773
  ] }),
841
- /* @__PURE__ */ jsxs7("li", { children: [
774
+ /* @__PURE__ */ jsxs6("li", { children: [
842
775
  "The GitHub CLI (",
843
- /* @__PURE__ */ jsx7("code", { children: "gh auth login" }),
776
+ /* @__PURE__ */ jsx6("code", { children: "gh auth login" }),
844
777
  ")"
845
778
  ] }),
846
- /* @__PURE__ */ jsx7("li", { children: "An SSH key registered with your remote" })
779
+ /* @__PURE__ */ jsx6("li", { children: "An SSH key registered with your remote" })
847
780
  ] }),
848
- detail && /* @__PURE__ */ jsxs7("details", { children: [
849
- /* @__PURE__ */ jsx7("summary", { children: "Details" }),
850
- /* @__PURE__ */ jsx7("p", { className: "db-git-hint", children: detail })
781
+ detail && /* @__PURE__ */ jsxs6("details", { children: [
782
+ /* @__PURE__ */ jsx6("summary", { children: "Details" }),
783
+ /* @__PURE__ */ jsx6("p", { className: "db-git-hint", children: detail })
851
784
  ] })
852
785
  ] });
853
786
  }
@@ -856,13 +789,13 @@ function GitAuthGuidanceDialog({
856
789
  detail,
857
790
  onClose
858
791
  }) {
859
- return /* @__PURE__ */ jsxs7(
792
+ return /* @__PURE__ */ jsxs6(
860
793
  Dialog,
861
794
  {
862
795
  title: "Git needs credentials",
863
796
  onClose,
864
- footer: /* @__PURE__ */ jsxs7(Fragment4, { children: [
865
- /* @__PURE__ */ jsx7(
797
+ footer: /* @__PURE__ */ jsxs6(Fragment3, { children: [
798
+ /* @__PURE__ */ jsx6(
866
799
  "button",
867
800
  {
868
801
  type: "button",
@@ -871,22 +804,22 @@ function GitAuthGuidanceDialog({
871
804
  children: "Learn more"
872
805
  }
873
806
  ),
874
- /* @__PURE__ */ jsx7("button", { type: "button", className: "db-git-primary-btn", onClick: onClose, children: "Close" })
807
+ /* @__PURE__ */ jsx6("button", { type: "button", className: "db-git-primary-btn", onClick: onClose, children: "Close" })
875
808
  ] }),
876
809
  children: [
877
- /* @__PURE__ */ jsxs7("p", { className: "db-settings-hint", children: [
810
+ /* @__PURE__ */ jsxs6("p", { className: "db-settings-hint", children: [
878
811
  "Git could not authenticate with the remote while trying to ",
879
812
  OPERATION_LABELS2[operation],
880
813
  "."
881
814
  ] }),
882
- /* @__PURE__ */ jsx7(GitCredentialGuidance, { detail })
815
+ /* @__PURE__ */ jsx6(GitCredentialGuidance, { detail })
883
816
  ]
884
817
  }
885
818
  );
886
819
  }
887
820
 
888
821
  // src/Git/GitCloneDialog.tsx
889
- import { Fragment as Fragment5, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
822
+ import { Fragment as Fragment4, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
890
823
  function GitCloneDialog({
891
824
  onClose,
892
825
  onCloned
@@ -898,9 +831,9 @@ function GitCloneDialog({
898
831
  const [progress, setProgress] = useState6(null);
899
832
  const [error, setError] = useState6(null);
900
833
  const [authDetail, setAuthDetail] = useState6(null);
901
- const handleRef = useRef6(null);
902
- const urlInputRef = useRef6(null);
903
- useEffect6(
834
+ const handleRef = useRef5(null);
835
+ const urlInputRef = useRef5(null);
836
+ useEffect5(
904
837
  () => () => {
905
838
  handleRef.current?.cancel();
906
839
  },
@@ -944,13 +877,13 @@ function GitCloneDialog({
944
877
  const progressPercent = progress?.percent ?? null;
945
878
  const progressText = progress !== null ? `${progress.phase}\u2026${progressPercent !== null ? ` ${Math.round(progressPercent)}%` : ""}` : "Starting clone\u2026";
946
879
  if (authDetail !== null) {
947
- return /* @__PURE__ */ jsxs8(
880
+ return /* @__PURE__ */ jsxs7(
948
881
  Dialog,
949
882
  {
950
883
  title: "Clone repository",
951
884
  onClose,
952
- footer: /* @__PURE__ */ jsxs8(Fragment5, { children: [
953
- /* @__PURE__ */ jsx8(
885
+ footer: /* @__PURE__ */ jsxs7(Fragment4, { children: [
886
+ /* @__PURE__ */ jsx7(
954
887
  "button",
955
888
  {
956
889
  type: "button",
@@ -959,24 +892,24 @@ function GitCloneDialog({
959
892
  children: "Back"
960
893
  }
961
894
  ),
962
- /* @__PURE__ */ jsx8("button", { type: "button", className: "db-git-primary-btn", onClick: onClose, children: "Close" })
895
+ /* @__PURE__ */ jsx7("button", { type: "button", className: "db-git-primary-btn", onClick: onClose, children: "Close" })
963
896
  ] }),
964
897
  children: [
965
- /* @__PURE__ */ jsx8("p", { className: "db-settings-hint", children: "Git could not authenticate with that remote." }),
966
- /* @__PURE__ */ jsx8(GitCredentialGuidance, { detail: authDetail.detail })
898
+ /* @__PURE__ */ jsx7("p", { className: "db-settings-hint", children: "Git could not authenticate with that remote." }),
899
+ /* @__PURE__ */ jsx7(GitCredentialGuidance, { detail: authDetail.detail })
967
900
  ]
968
901
  }
969
902
  );
970
903
  }
971
- return /* @__PURE__ */ jsxs8(
904
+ return /* @__PURE__ */ jsxs7(
972
905
  Dialog,
973
906
  {
974
907
  title: "Clone repository",
975
908
  onClose,
976
909
  closeOnBackdrop: !cloning,
977
910
  initialFocusRef: urlInputRef,
978
- footer: /* @__PURE__ */ jsxs8(Fragment5, { children: [
979
- /* @__PURE__ */ jsx8(
911
+ footer: /* @__PURE__ */ jsxs7(Fragment4, { children: [
912
+ /* @__PURE__ */ jsx7(
980
913
  "button",
981
914
  {
982
915
  type: "button",
@@ -986,7 +919,7 @@ function GitCloneDialog({
986
919
  children: "Cancel"
987
920
  }
988
921
  ),
989
- /* @__PURE__ */ jsx8(
922
+ /* @__PURE__ */ jsx7(
990
923
  "button",
991
924
  {
992
925
  type: "button",
@@ -998,9 +931,9 @@ function GitCloneDialog({
998
931
  )
999
932
  ] }),
1000
933
  children: [
1001
- /* @__PURE__ */ jsxs8("div", { className: "db-git-form-row", children: [
1002
- /* @__PURE__ */ jsx8("label", { className: "db-git-form-label", htmlFor: "db-git-clone-url", children: "Repository URL" }),
1003
- /* @__PURE__ */ jsx8(
934
+ /* @__PURE__ */ jsxs7("div", { className: "db-git-form-row", children: [
935
+ /* @__PURE__ */ jsx7("label", { className: "db-git-form-label", htmlFor: "db-git-clone-url", children: "Repository URL" }),
936
+ /* @__PURE__ */ jsx7(
1004
937
  "input",
1005
938
  {
1006
939
  id: "db-git-clone-url",
@@ -1018,15 +951,15 @@ function GitCloneDialog({
1018
951
  }
1019
952
  )
1020
953
  ] }),
1021
- isLikelyGitUrl(url) && /* @__PURE__ */ jsxs8("p", { className: "db-git-hint", children: [
954
+ isLikelyGitUrl(url) && /* @__PURE__ */ jsxs7("p", { className: "db-git-hint", children: [
1022
955
  "Will clone into: ",
1023
- /* @__PURE__ */ jsx8("b", { children: deriveCloneFolderName(url) }),
956
+ /* @__PURE__ */ jsx7("b", { children: deriveCloneFolderName(url) }),
1024
957
  " \u2014 you\u2019ll pick where next"
1025
958
  ] }),
1026
- /* @__PURE__ */ jsx8("p", { className: "db-git-hint", children: "HTTPS and SSH URLs both work. You\u2019ll choose the destination folder in the next step." }),
1027
- error !== null && /* @__PURE__ */ jsx8("p", { className: "db-git-form-error", role: "alert", children: error }),
1028
- cloning && /* @__PURE__ */ jsxs8("div", { className: "db-git-progress", children: [
1029
- progressPercent !== null && /* @__PURE__ */ jsx8(
959
+ /* @__PURE__ */ jsx7("p", { className: "db-git-hint", children: "HTTPS and SSH URLs both work. You\u2019ll choose the destination folder in the next step." }),
960
+ error !== null && /* @__PURE__ */ jsx7("p", { className: "db-git-form-error", role: "alert", children: error }),
961
+ cloning && /* @__PURE__ */ jsxs7("div", { className: "db-git-progress", children: [
962
+ progressPercent !== null && /* @__PURE__ */ jsx7(
1030
963
  "div",
1031
964
  {
1032
965
  className: "db-git-progress-bar",
@@ -1037,8 +970,8 @@ function GitCloneDialog({
1037
970
  style: { width: `${progressPercent}%` }
1038
971
  }
1039
972
  ),
1040
- /* @__PURE__ */ jsx8("p", { className: "db-git-progress-text", children: progressText }),
1041
- /* @__PURE__ */ jsx8(
973
+ /* @__PURE__ */ jsx7("p", { className: "db-git-progress-text", children: progressText }),
974
+ /* @__PURE__ */ jsx7(
1042
975
  "button",
1043
976
  {
1044
977
  type: "button",
@@ -1054,21 +987,21 @@ function GitCloneDialog({
1054
987
  }
1055
988
 
1056
989
  // src/Git/GitConflictsDialog.tsx
1057
- import { Fragment as Fragment6, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
990
+ import { Fragment as Fragment5, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
1058
991
  function GitConflictsDialog({
1059
992
  paths,
1060
993
  onOpenFile,
1061
994
  onClose
1062
995
  }) {
1063
996
  const git = useGitContext();
1064
- return /* @__PURE__ */ jsxs9(
997
+ return /* @__PURE__ */ jsxs8(
1065
998
  Dialog,
1066
999
  {
1067
1000
  title: "Merge conflicts",
1068
1001
  onClose,
1069
- footer: /* @__PURE__ */ jsxs9(Fragment6, { children: [
1070
- /* @__PURE__ */ jsx9("button", { type: "button", className: "db-git-secondary-btn", onClick: onClose, children: "Close" }),
1071
- /* @__PURE__ */ jsx9(
1002
+ footer: /* @__PURE__ */ jsxs8(Fragment5, { children: [
1003
+ /* @__PURE__ */ jsx8("button", { type: "button", className: "db-git-secondary-btn", onClick: onClose, children: "Close" }),
1004
+ /* @__PURE__ */ jsx8(
1072
1005
  "button",
1073
1006
  {
1074
1007
  type: "button",
@@ -1079,8 +1012,8 @@ function GitConflictsDialog({
1079
1012
  )
1080
1013
  ] }),
1081
1014
  children: [
1082
- /* @__PURE__ */ jsx9("p", { className: "db-settings-hint", children: "These files contain conflict markers. Edit each one to resolve the conflicts, then commit to complete the merge." }),
1083
- /* @__PURE__ */ jsx9("ul", { className: "db-git-file-list", children: paths.map((path) => /* @__PURE__ */ jsx9("li", { className: "db-git-file-row", children: /* @__PURE__ */ jsx9(
1015
+ /* @__PURE__ */ jsx8("p", { className: "db-settings-hint", children: "These files contain conflict markers. Edit each one to resolve the conflicts, then commit to complete the merge." }),
1016
+ /* @__PURE__ */ jsx8("ul", { className: "db-git-file-list", children: paths.map((path) => /* @__PURE__ */ jsx8("li", { className: "db-git-file-row", children: /* @__PURE__ */ jsx8(
1084
1017
  "button",
1085
1018
  {
1086
1019
  type: "button",
@@ -1098,20 +1031,20 @@ function GitConflictsDialog({
1098
1031
 
1099
1032
  // src/Git/GitExpandedGrantDialog.tsx
1100
1033
  import { useState as useState7 } from "react";
1101
- import { Fragment as Fragment7, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
1034
+ import { Fragment as Fragment6, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
1102
1035
  function GitExpandedGrantDialog({ onClose }) {
1103
1036
  const git = useGitContext();
1104
1037
  const [always, setAlways] = useState7(false);
1105
1038
  if (!git) return null;
1106
1039
  const repositoryRoot = git.pendingGrant?.repositoryRoot ?? null;
1107
- return /* @__PURE__ */ jsxs10(
1040
+ return /* @__PURE__ */ jsxs9(
1108
1041
  Dialog,
1109
1042
  {
1110
1043
  title: "Enable Git for this folder?",
1111
1044
  onClose,
1112
- footer: /* @__PURE__ */ jsxs10(Fragment7, { children: [
1113
- /* @__PURE__ */ jsx10("button", { type: "button", className: "db-git-secondary-btn", onClick: onClose, children: "Not now" }),
1114
- /* @__PURE__ */ jsx10(
1045
+ footer: /* @__PURE__ */ jsxs9(Fragment6, { children: [
1046
+ /* @__PURE__ */ jsx9("button", { type: "button", className: "db-git-secondary-btn", onClick: onClose, children: "Not now" }),
1047
+ /* @__PURE__ */ jsx9(
1115
1048
  "button",
1116
1049
  {
1117
1050
  type: "button",
@@ -1125,13 +1058,13 @@ function GitExpandedGrantDialog({ onClose }) {
1125
1058
  )
1126
1059
  ] }),
1127
1060
  children: [
1128
- /* @__PURE__ */ jsx10("p", { className: "db-settings-hint", children: "This folder is part of a larger Git repository. Git operations such as pull, branch switching, and commit can change files outside the folder you opened." }),
1129
- repositoryRoot && /* @__PURE__ */ jsxs10("p", { className: "db-git-hint", children: [
1061
+ /* @__PURE__ */ jsx9("p", { className: "db-settings-hint", children: "This folder is part of a larger Git repository. Git operations such as pull, branch switching, and commit can change files outside the folder you opened." }),
1062
+ repositoryRoot && /* @__PURE__ */ jsxs9("p", { className: "db-git-hint", children: [
1130
1063
  "Repository: ",
1131
- /* @__PURE__ */ jsx10("code", { children: repositoryRoot })
1064
+ /* @__PURE__ */ jsx9("code", { children: repositoryRoot })
1132
1065
  ] }),
1133
- /* @__PURE__ */ jsxs10("label", { className: "db-git-grant-remember", children: [
1134
- /* @__PURE__ */ jsx10(
1066
+ /* @__PURE__ */ jsxs9("label", { className: "db-git-grant-remember", children: [
1067
+ /* @__PURE__ */ jsx9(
1135
1068
  "input",
1136
1069
  {
1137
1070
  type: "checkbox",
@@ -1139,28 +1072,28 @@ function GitExpandedGrantDialog({ onClose }) {
1139
1072
  onChange: (event) => setAlways(event.target.checked)
1140
1073
  }
1141
1074
  ),
1142
- /* @__PURE__ */ jsx10("span", { children: "Enable Git for every folder inside a repository, without asking" })
1075
+ /* @__PURE__ */ jsx9("span", { children: "Enable Git for every folder inside a repository, without asking" })
1143
1076
  ] }),
1144
- /* @__PURE__ */ jsx10("p", { className: "db-settings-hint", children: "DocBlocks remembers this repository either way. You can turn the choice back off by removing it from the desktop settings file." })
1077
+ /* @__PURE__ */ jsx9("p", { className: "db-settings-hint", children: "DocBlocks remembers this repository either way. You can turn the choice back off by removing it from the desktop settings file." })
1145
1078
  ]
1146
1079
  }
1147
1080
  );
1148
1081
  }
1149
1082
 
1150
1083
  // src/Git/GitUI.tsx
1151
- import { Fragment as Fragment8, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
1084
+ import { Fragment as Fragment7, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
1152
1085
  function GitUI({ onOpenFile, onWorkspaceCloned }) {
1153
1086
  const git = useGitContext();
1154
1087
  if (!git || !git.available) return null;
1155
1088
  const { dialog, closeDialog } = git;
1156
- return /* @__PURE__ */ jsxs11(Fragment8, { children: [
1157
- /* @__PURE__ */ jsx11(GitStatusBar, {}),
1158
- git.repo && /* @__PURE__ */ jsx11("span", { className: "db-git-inline-status", role: "status", "aria-live": "polite", children: git.lastResult?.message ?? "" }),
1159
- dialog.kind === "commit" && /* @__PURE__ */ jsx11(GitCommitDialog, { onClose: closeDialog }),
1160
- dialog.kind === "branches" && /* @__PURE__ */ jsx11(GitBranchesDialog, { createFocus: dialog.createFocus, onClose: closeDialog }),
1161
- dialog.kind === "history" && /* @__PURE__ */ jsx11(GitHistoryDialog, { path: dialog.path, onClose: closeDialog }),
1162
- dialog.kind === "diff" && /* @__PURE__ */ jsx11(GitDiffDialog, { path: dialog.path, revision: dialog.revision, onClose: closeDialog }),
1163
- dialog.kind === "clone" && /* @__PURE__ */ jsx11(
1089
+ return /* @__PURE__ */ jsxs10(Fragment7, { children: [
1090
+ /* @__PURE__ */ jsx10(GitStatusBar, {}),
1091
+ git.repo && /* @__PURE__ */ jsx10("span", { className: "db-git-inline-status", role: "status", "aria-live": "polite", children: git.lastResult?.message ?? "" }),
1092
+ dialog.kind === "commit" && /* @__PURE__ */ jsx10(GitCommitDialog, { onClose: closeDialog }),
1093
+ dialog.kind === "branches" && /* @__PURE__ */ jsx10(GitBranchesDialog, { createFocus: dialog.createFocus, onClose: closeDialog }),
1094
+ dialog.kind === "history" && /* @__PURE__ */ jsx10(GitHistoryDialog, { path: dialog.path, onClose: closeDialog }),
1095
+ dialog.kind === "diff" && /* @__PURE__ */ jsx10(GitDiffDialog, { path: dialog.path, revision: dialog.revision, onClose: closeDialog }),
1096
+ dialog.kind === "clone" && /* @__PURE__ */ jsx10(
1164
1097
  GitCloneDialog,
1165
1098
  {
1166
1099
  onClose: closeDialog,
@@ -1170,7 +1103,7 @@ function GitUI({ onOpenFile, onWorkspaceCloned }) {
1170
1103
  }
1171
1104
  }
1172
1105
  ),
1173
- dialog.kind === "auth-guidance" && /* @__PURE__ */ jsx11(
1106
+ dialog.kind === "auth-guidance" && /* @__PURE__ */ jsx10(
1174
1107
  GitAuthGuidanceDialog,
1175
1108
  {
1176
1109
  operation: dialog.operation,
@@ -1178,8 +1111,8 @@ function GitUI({ onOpenFile, onWorkspaceCloned }) {
1178
1111
  onClose: closeDialog
1179
1112
  }
1180
1113
  ),
1181
- dialog.kind === "expanded-grant" && /* @__PURE__ */ jsx11(GitExpandedGrantDialog, { onClose: closeDialog }),
1182
- dialog.kind === "conflicts" && /* @__PURE__ */ jsx11(GitConflictsDialog, { paths: dialog.paths, onOpenFile, onClose: closeDialog })
1114
+ dialog.kind === "expanded-grant" && /* @__PURE__ */ jsx10(GitExpandedGrantDialog, { onClose: closeDialog }),
1115
+ dialog.kind === "conflicts" && /* @__PURE__ */ jsx10(GitConflictsDialog, { paths: dialog.paths, onOpenFile, onClose: closeDialog })
1183
1116
  ] });
1184
1117
  }
1185
1118
  export {
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-ACQF63SB.js";
5
5
  import {
6
6
  Dialog
7
- } from "./chunk-VJPGZCFS.js";
7
+ } from "./chunk-UYJCL6OW.js";
8
8
 
9
9
  // src/DocBlocksShell/KeyboardShortcutsDialog.tsx
10
10
  import { Fragment, useId, useMemo } from "react";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  PresentationMaker
3
- } from "./chunk-PRUEYW3G.js";
4
- import "./chunk-T42BH6YX.js";
3
+ } from "./chunk-BGA5UVKL.js";
4
+ import "./chunk-CXLXGFG2.js";
5
5
  import "./chunk-K4I3NJFL.js";
6
- import "./chunk-VJPGZCFS.js";
6
+ import "./chunk-UYJCL6OW.js";
7
7
  export {
8
8
  PresentationMaker
9
9
  };
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-TBLZBNQF.js";
7
7
  import {
8
8
  Dialog
9
- } from "./chunk-VJPGZCFS.js";
9
+ } from "./chunk-UYJCL6OW.js";
10
10
 
11
11
  // src/QuickOpen/QuickOpenDialog.tsx
12
12
  import { useEffect, useId, useMemo, useRef, useState } from "react";
@@ -92,12 +92,28 @@ interface AiSettingsControlsProps {
92
92
  }
93
93
  declare function AiSettingsControls({ ai }: AiSettingsControlsProps): react_jsx_runtime.JSX.Element | null;
94
94
 
95
- interface SettingsDialogProps {
95
+ interface SettingsSection<Id extends string = string> {
96
+ /** Stable key for the section's tab and panel. */
97
+ id: Id;
98
+ label: string;
99
+ content: ReactNode;
100
+ }
101
+ interface SettingsDialogProps<Id extends string = string> {
96
102
  title?: string;
97
103
  onClose: () => void;
98
- children: ReactNode;
104
+ /** A single scrolling body, for a dialog without sections. */
105
+ children?: ReactNode;
106
+ /**
107
+ * Split the body into sections shown one at a time: a tab rail beside the
108
+ * panel, or a dropdown above it on phones and portrait tablets. Every
109
+ * section stays mounted, so leaving one never cancels work it started.
110
+ */
111
+ sections?: readonly SettingsSection<Id>[];
112
+ /** The open section. When omitted the dialog opens on the first and tracks the choice itself. */
113
+ section?: Id;
114
+ onSectionChange?: (section: Id) => void;
99
115
  }
100
- declare function SettingsDialog({ title, onClose, children }: SettingsDialogProps): react_jsx_runtime.JSX.Element;
116
+ declare function SettingsDialog<Id extends string = string>({ title, onClose, children, sections, section, onSectionChange, }: SettingsDialogProps<Id>): react_jsx_runtime.JSX.Element;
101
117
  interface ThemeSettingsProps {
102
118
  value: ThemePreference;
103
119
  onChange: (theme: ThemePreference) => void;
@@ -141,4 +157,4 @@ interface WriteCanvasSettingsControlsProps {
141
157
  }
142
158
  declare function WriteCanvasSettingsControls({ value, onChange }: WriteCanvasSettingsControlsProps): react_jsx_runtime.JSX.Element;
143
159
 
144
- export { type AccentColor as A, DEFAULT_INTERFACE_FONT as D, type InterfaceFontPreference as I, type ProofingPreferences as P, SettingsDialog as S, type ThemePreference as T, WRITE_CANVAS_FONT_SCHEMES as W, AccentColorSettings as a, type AccentColorSettingsProps as b, AiSettingsControls as c, type AiSettingsControlsProps as d, DEFAULT_PROOFING_PREFERENCES as e, DEFAULT_WRITE_CANVAS_FONT_SCHEME as f, InterfaceFontSettings as g, type InterfaceFontSettingsProps as h, ProofingSettingsControls as i, type ProofingSettingsControlsProps as j, type SettingsDialogProps as k, ThemeSettings as l, type ThemeSettingsProps as m, type WriteCanvasFontScheme as n, type WriteCanvasFontSchemeGroup as o, type WriteCanvasFontSchemeOption as p, type WriteCanvasPreferences as q, WriteCanvasSettingsControls as r, type WriteCanvasSettingsControlsProps as s, loadInterfaceFont as t, loadProofingPreferences as u, resolveWriteCanvasFonts as v, saveInterfaceFont as w, saveProofingPreferences as x };
160
+ export { type AccentColor as A, DEFAULT_INTERFACE_FONT as D, type InterfaceFontPreference as I, type ProofingPreferences as P, SettingsDialog as S, type ThemePreference as T, type WriteCanvasPreferences as W, AccentColorSettings as a, type AccentColorSettingsProps as b, AiSettingsControls as c, type AiSettingsControlsProps as d, DEFAULT_PROOFING_PREFERENCES as e, DEFAULT_WRITE_CANVAS_FONT_SCHEME as f, InterfaceFontSettings as g, type InterfaceFontSettingsProps as h, ProofingSettingsControls as i, type ProofingSettingsControlsProps as j, type SettingsDialogProps as k, type SettingsSection as l, ThemeSettings as m, type ThemeSettingsProps as n, WRITE_CANVAS_FONT_SCHEMES as o, type WriteCanvasFontScheme as p, type WriteCanvasFontSchemeGroup as q, type WriteCanvasFontSchemeOption as r, WriteCanvasSettingsControls as s, type WriteCanvasSettingsControlsProps as t, loadInterfaceFont as u, loadProofingPreferences as v, resolveWriteCanvasFonts as w, saveInterfaceFont as x, saveProofingPreferences as y };
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-SPUPWCSI.js";
7
7
  import {
8
8
  Dialog
9
- } from "./chunk-VJPGZCFS.js";
9
+ } from "./chunk-UYJCL6OW.js";
10
10
 
11
11
  // src/Export/ShareDialog.tsx
12
12
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-GMA4KGGO.js";
16
16
  import {
17
17
  Dialog
18
- } from "./chunk-VJPGZCFS.js";
18
+ } from "./chunk-UYJCL6OW.js";
19
19
 
20
20
  // src/Speech/SpeechToolbarControl.tsx
21
21
  import { useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "react";
@@ -3,14 +3,14 @@ import {
3
3
  } from "./chunk-6JJOGV6M.js";
4
4
  import {
5
5
  createSpeechInputProvider
6
- } from "./chunk-BNKIPCXO.js";
6
+ } from "./chunk-QXBV3G6T.js";
7
7
  import {
8
8
  unavailableSentence,
9
9
  useAiStatus
10
10
  } from "./chunk-K4I3NJFL.js";
11
11
  import {
12
12
  Dialog
13
- } from "./chunk-VJPGZCFS.js";
13
+ } from "./chunk-UYJCL6OW.js";
14
14
 
15
15
  // src/Speech/TextFromNarration.tsx
16
16
  import { useEffect as useEffect3, useMemo, useRef as useRef3, useState as useState3 } from "react";