@bendyline/docblocks-react 1.1.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/README.md +37 -5
  2. package/dist/ExportDialog-7LDIXJZ3.js +10 -0
  3. package/dist/ExportDialog-7LDIXJZ3.js.map +1 -0
  4. package/dist/ExportToolbarControls-GHAOJMH6.js +508 -0
  5. package/dist/ExportToolbarControls-GHAOJMH6.js.map +1 -0
  6. package/dist/GitToolbarControl-GNMRVKWQ.js +136 -0
  7. package/dist/GitToolbarControl-GNMRVKWQ.js.map +1 -0
  8. package/dist/GitUI-VHOBQY43.js +1133 -0
  9. package/dist/GitUI-VHOBQY43.js.map +1 -0
  10. package/dist/LazyEditorShell-EF2BWRXU.js +6 -0
  11. package/dist/LazyEditorShell-EF2BWRXU.js.map +1 -0
  12. package/dist/ShareDialog-63ENBEDZ.js +213 -0
  13. package/dist/ShareDialog-63ENBEDZ.js.map +1 -0
  14. package/dist/chunk-4XXSWN3T.js +13 -0
  15. package/dist/chunk-4XXSWN3T.js.map +1 -0
  16. package/dist/chunk-57ZJJOC5.js +89 -0
  17. package/dist/chunk-57ZJJOC5.js.map +1 -0
  18. package/dist/chunk-5A4KEWKT.js +97 -0
  19. package/dist/chunk-5A4KEWKT.js.map +1 -0
  20. package/dist/chunk-DD4VFJQI.js +51 -0
  21. package/dist/chunk-DD4VFJQI.js.map +1 -0
  22. package/dist/chunk-FEWQUQML.js +256 -0
  23. package/dist/chunk-FEWQUQML.js.map +1 -0
  24. package/dist/chunk-FMGTHSTX.js +110 -0
  25. package/dist/chunk-FMGTHSTX.js.map +1 -0
  26. package/dist/chunk-UNYZQXWR.js +324 -0
  27. package/dist/chunk-UNYZQXWR.js.map +1 -0
  28. package/dist/chunk-VHDP4IPL.js +70 -0
  29. package/dist/chunk-VHDP4IPL.js.map +1 -0
  30. package/dist/chunk-ZI56BNB7.js +270 -0
  31. package/dist/chunk-ZI56BNB7.js.map +1 -0
  32. package/dist/editor.d.ts +11 -0
  33. package/dist/editor.js +9 -0
  34. package/dist/editor.js.map +1 -0
  35. package/dist/export/index.d.ts +93 -0
  36. package/dist/export/index.js +27 -0
  37. package/dist/export/index.js.map +1 -0
  38. package/dist/index.d.ts +346 -18
  39. package/dist/index.js +6169 -18
  40. package/dist/index.js.map +1 -1
  41. package/dist/run-export-ICTZITXC.js +10 -0
  42. package/dist/run-export-ICTZITXC.js.map +1 -0
  43. package/dist/settings/index.d.ts +36 -0
  44. package/dist/settings/index.js +14 -0
  45. package/dist/settings/index.js.map +1 -0
  46. package/package.json +33 -13
  47. package/src/styles/docblocks.css +2738 -132
  48. package/dist/AppMenu/AppMenu.d.ts +0 -26
  49. package/dist/AppMenu/AppMenu.d.ts.map +0 -1
  50. package/dist/AppMenu/AppMenu.js +0 -28
  51. package/dist/AppMenu/AppMenu.js.map +0 -1
  52. package/dist/AppMenu/index.d.ts +0 -3
  53. package/dist/AppMenu/index.d.ts.map +0 -1
  54. package/dist/AppMenu/index.js +0 -2
  55. package/dist/AppMenu/index.js.map +0 -1
  56. package/dist/DocBlocksShell/DocBlocksShell.d.ts +0 -36
  57. package/dist/DocBlocksShell/DocBlocksShell.d.ts.map +0 -1
  58. package/dist/DocBlocksShell/DocBlocksShell.js +0 -1351
  59. package/dist/DocBlocksShell/DocBlocksShell.js.map +0 -1
  60. package/dist/DocBlocksShell/index.d.ts +0 -3
  61. package/dist/DocBlocksShell/index.d.ts.map +0 -1
  62. package/dist/DocBlocksShell/index.js +0 -2
  63. package/dist/DocBlocksShell/index.js.map +0 -1
  64. package/dist/Export/ExportDialog.d.ts +0 -16
  65. package/dist/Export/ExportDialog.d.ts.map +0 -1
  66. package/dist/Export/ExportDialog.js +0 -158
  67. package/dist/Export/ExportDialog.js.map +0 -1
  68. package/dist/Export/ExportToolbarControls.d.ts +0 -17
  69. package/dist/Export/ExportToolbarControls.d.ts.map +0 -1
  70. package/dist/Export/ExportToolbarControls.js +0 -200
  71. package/dist/Export/ExportToolbarControls.js.map +0 -1
  72. package/dist/Export/export-options.d.ts +0 -53
  73. package/dist/Export/export-options.d.ts.map +0 -1
  74. package/dist/Export/export-options.js +0 -49
  75. package/dist/Export/export-options.js.map +0 -1
  76. package/dist/Export/index.d.ts +0 -6
  77. package/dist/Export/index.d.ts.map +0 -1
  78. package/dist/Export/index.js +0 -3
  79. package/dist/Export/index.js.map +0 -1
  80. package/dist/Export/run-export.d.ts +0 -8
  81. package/dist/Export/run-export.d.ts.map +0 -1
  82. package/dist/Export/run-export.js +0 -296
  83. package/dist/Export/run-export.js.map +0 -1
  84. package/dist/Export/transform-summaries.d.ts +0 -7
  85. package/dist/Export/transform-summaries.d.ts.map +0 -1
  86. package/dist/Export/transform-summaries.js +0 -6
  87. package/dist/Export/transform-summaries.js.map +0 -1
  88. package/dist/FileExplorer/FileExplorer.d.ts +0 -21
  89. package/dist/FileExplorer/FileExplorer.d.ts.map +0 -1
  90. package/dist/FileExplorer/FileExplorer.js +0 -140
  91. package/dist/FileExplorer/FileExplorer.js.map +0 -1
  92. package/dist/FileExplorer/FileTreeNode.d.ts +0 -18
  93. package/dist/FileExplorer/FileTreeNode.d.ts.map +0 -1
  94. package/dist/FileExplorer/FileTreeNode.js +0 -112
  95. package/dist/FileExplorer/FileTreeNode.js.map +0 -1
  96. package/dist/FileExplorer/index.d.ts +0 -6
  97. package/dist/FileExplorer/index.d.ts.map +0 -1
  98. package/dist/FileExplorer/index.js +0 -4
  99. package/dist/FileExplorer/index.js.map +0 -1
  100. package/dist/FileExplorer/useFileTree.d.ts +0 -35
  101. package/dist/FileExplorer/useFileTree.d.ts.map +0 -1
  102. package/dist/FileExplorer/useFileTree.js +0 -124
  103. package/dist/FileExplorer/useFileTree.js.map +0 -1
  104. package/dist/WorkspacePicker/WorkspacePicker.d.ts +0 -17
  105. package/dist/WorkspacePicker/WorkspacePicker.d.ts.map +0 -1
  106. package/dist/WorkspacePicker/WorkspacePicker.js +0 -63
  107. package/dist/WorkspacePicker/WorkspacePicker.js.map +0 -1
  108. package/dist/WorkspacePicker/WorkspaceSettingsButton.d.ts +0 -11
  109. package/dist/WorkspacePicker/WorkspaceSettingsButton.d.ts.map +0 -1
  110. package/dist/WorkspacePicker/WorkspaceSettingsButton.js +0 -27
  111. package/dist/WorkspacePicker/WorkspaceSettingsButton.js.map +0 -1
  112. package/dist/WorkspacePicker/WorkspaceSettingsDialog.d.ts +0 -20
  113. package/dist/WorkspacePicker/WorkspaceSettingsDialog.d.ts.map +0 -1
  114. package/dist/WorkspacePicker/WorkspaceSettingsDialog.js +0 -36
  115. package/dist/WorkspacePicker/WorkspaceSettingsDialog.js.map +0 -1
  116. package/dist/WorkspacePicker/index.d.ts +0 -3
  117. package/dist/WorkspacePicker/index.d.ts.map +0 -1
  118. package/dist/WorkspacePicker/index.js +0 -2
  119. package/dist/WorkspacePicker/index.js.map +0 -1
  120. package/dist/hooks/index.d.ts +0 -2
  121. package/dist/hooks/index.d.ts.map +0 -1
  122. package/dist/hooks/index.js +0 -2
  123. package/dist/hooks/index.js.map +0 -1
  124. package/dist/hooks/useAutoSave.d.ts +0 -15
  125. package/dist/hooks/useAutoSave.d.ts.map +0 -1
  126. package/dist/hooks/useAutoSave.js +0 -83
  127. package/dist/hooks/useAutoSave.js.map +0 -1
  128. package/dist/icons.d.ts +0 -7
  129. package/dist/icons.d.ts.map +0 -1
  130. package/dist/icons.js +0 -27
  131. package/dist/icons.js.map +0 -1
  132. package/dist/index.d.ts.map +0 -1
  133. package/dist/monaco-slim.d.ts +0 -19
  134. package/dist/monaco-slim.d.ts.map +0 -1
  135. package/dist/monaco-slim.js +0 -19
  136. package/dist/monaco-slim.js.map +0 -1
  137. package/dist/preferences/versioning.d.ts +0 -27
  138. package/dist/preferences/versioning.d.ts.map +0 -1
  139. package/dist/preferences/versioning.js +0 -62
  140. package/dist/preferences/versioning.js.map +0 -1
  141. package/src/AppMenu/AppMenu.tsx +0 -264
  142. package/src/AppMenu/index.ts +0 -2
  143. package/src/DocBlocksShell/DocBlocksShell.tsx +0 -1778
  144. package/src/DocBlocksShell/index.ts +0 -2
  145. package/src/Export/ExportDialog.tsx +0 -383
  146. package/src/Export/ExportToolbarControls.tsx +0 -313
  147. package/src/Export/export-options.ts +0 -99
  148. package/src/Export/index.ts +0 -5
  149. package/src/Export/run-export.ts +0 -349
  150. package/src/Export/transform-summaries.ts +0 -14
  151. package/src/FileExplorer/FileExplorer.tsx +0 -282
  152. package/src/FileExplorer/FileTreeNode.tsx +0 -214
  153. package/src/FileExplorer/index.ts +0 -5
  154. package/src/FileExplorer/useFileTree.ts +0 -178
  155. package/src/WorkspacePicker/WorkspacePicker.tsx +0 -137
  156. package/src/WorkspacePicker/WorkspaceSettingsButton.tsx +0 -88
  157. package/src/WorkspacePicker/WorkspaceSettingsDialog.tsx +0 -121
  158. package/src/WorkspacePicker/index.ts +0 -2
  159. package/src/fonts/fonts.css +0 -362
  160. package/src/fonts/licenses/LICENSE-cormorant-garamond.txt +0 -93
  161. package/src/fonts/licenses/LICENSE-crimson-text.txt +0 -93
  162. package/src/fonts/licenses/LICENSE-dm-sans.txt +0 -93
  163. package/src/fonts/licenses/LICENSE-dm-serif-display.txt +0 -93
  164. package/src/fonts/licenses/LICENSE-hanken-grotesk.txt +0 -94
  165. package/src/fonts/licenses/LICENSE-ibm-plex-sans.txt +0 -93
  166. package/src/fonts/licenses/LICENSE-inter.txt +0 -93
  167. package/src/fonts/licenses/LICENSE-jetbrains-mono.txt +0 -93
  168. package/src/fonts/licenses/LICENSE-lora.txt +0 -93
  169. package/src/fonts/licenses/LICENSE-merriweather.txt +0 -93
  170. package/src/fonts/licenses/LICENSE-oswald.txt +0 -93
  171. package/src/fonts/licenses/LICENSE-playfair-display.txt +0 -93
  172. package/src/fonts/licenses/LICENSE-pt-serif.txt +0 -93
  173. package/src/fonts/licenses/LICENSE-roboto.txt +0 -93
  174. package/src/fonts/licenses/LICENSE-source-serif-4.txt +0 -93
  175. package/src/fonts/woff2/cormorant-garamond-400.woff2 +0 -0
  176. package/src/fonts/woff2/cormorant-garamond-700.woff2 +0 -0
  177. package/src/fonts/woff2/crimson-text-400.woff2 +0 -0
  178. package/src/fonts/woff2/crimson-text-400i.woff2 +0 -0
  179. package/src/fonts/woff2/crimson-text-700.woff2 +0 -0
  180. package/src/fonts/woff2/dm-sans-400.woff2 +0 -0
  181. package/src/fonts/woff2/dm-sans-400i.woff2 +0 -0
  182. package/src/fonts/woff2/dm-sans-500.woff2 +0 -0
  183. package/src/fonts/woff2/dm-sans-700.woff2 +0 -0
  184. package/src/fonts/woff2/dm-serif-display-400.woff2 +0 -0
  185. package/src/fonts/woff2/hanken-grotesk-400.woff2 +0 -0
  186. package/src/fonts/woff2/hanken-grotesk-400i.woff2 +0 -0
  187. package/src/fonts/woff2/hanken-grotesk-500.woff2 +0 -0
  188. package/src/fonts/woff2/hanken-grotesk-600.woff2 +0 -0
  189. package/src/fonts/woff2/hanken-grotesk-700.woff2 +0 -0
  190. package/src/fonts/woff2/ibm-plex-sans-400.woff2 +0 -0
  191. package/src/fonts/woff2/ibm-plex-sans-400i.woff2 +0 -0
  192. package/src/fonts/woff2/ibm-plex-sans-500.woff2 +0 -0
  193. package/src/fonts/woff2/ibm-plex-sans-600.woff2 +0 -0
  194. package/src/fonts/woff2/ibm-plex-sans-700.woff2 +0 -0
  195. package/src/fonts/woff2/inter-400.woff2 +0 -0
  196. package/src/fonts/woff2/inter-400i.woff2 +0 -0
  197. package/src/fonts/woff2/inter-500.woff2 +0 -0
  198. package/src/fonts/woff2/inter-600.woff2 +0 -0
  199. package/src/fonts/woff2/inter-700.woff2 +0 -0
  200. package/src/fonts/woff2/jetbrains-mono-400.woff2 +0 -0
  201. package/src/fonts/woff2/jetbrains-mono-400i.woff2 +0 -0
  202. package/src/fonts/woff2/jetbrains-mono-700.woff2 +0 -0
  203. package/src/fonts/woff2/lora-400.woff2 +0 -0
  204. package/src/fonts/woff2/lora-400i.woff2 +0 -0
  205. package/src/fonts/woff2/lora-700.woff2 +0 -0
  206. package/src/fonts/woff2/merriweather-400.woff2 +0 -0
  207. package/src/fonts/woff2/merriweather-700.woff2 +0 -0
  208. package/src/fonts/woff2/oswald-400.woff2 +0 -0
  209. package/src/fonts/woff2/oswald-700.woff2 +0 -0
  210. package/src/fonts/woff2/playfair-display-400.woff2 +0 -0
  211. package/src/fonts/woff2/playfair-display-700.woff2 +0 -0
  212. package/src/fonts/woff2/pt-serif-400.woff2 +0 -0
  213. package/src/fonts/woff2/pt-serif-700.woff2 +0 -0
  214. package/src/fonts/woff2/roboto-400.woff2 +0 -0
  215. package/src/fonts/woff2/roboto-400i.woff2 +0 -0
  216. package/src/fonts/woff2/roboto-700.woff2 +0 -0
  217. package/src/fonts/woff2/source-serif-4-400.woff2 +0 -0
  218. package/src/fonts/woff2/source-serif-4-400i.woff2 +0 -0
  219. package/src/fonts/woff2/source-serif-4-700.woff2 +0 -0
  220. package/src/hooks/index.ts +0 -1
  221. package/src/hooks/useAutoSave.ts +0 -116
  222. package/src/icons.tsx +0 -70
  223. package/src/index.ts +0 -31
  224. package/src/monaco-slim.ts +0 -20
  225. package/src/preferences/versioning.ts +0 -69
@@ -1,27 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
3
- * WorkspaceSettingsButton — gear icon dropdown for workspace actions.
4
- */
5
- import { useState, useCallback, useRef, useEffect } from 'react';
6
- import { WorkspaceIcon } from '../icons.js';
7
- export function WorkspaceSettingsButton({ onSettings, onRename, onDownload, onRemove, }) {
8
- const [isOpen, setIsOpen] = useState(false);
9
- const ref = useRef(null);
10
- useEffect(() => {
11
- if (!isOpen)
12
- return;
13
- function handleOutsideClick(e) {
14
- if (ref.current && !ref.current.contains(e.target)) {
15
- setIsOpen(false);
16
- }
17
- }
18
- document.addEventListener('mousedown', handleOutsideClick);
19
- return () => document.removeEventListener('mousedown', handleOutsideClick);
20
- }, [isOpen]);
21
- const handleAction = useCallback((action) => {
22
- setIsOpen(false);
23
- action();
24
- }, []);
25
- return (_jsxs("div", { ref: ref, className: "db-ws-settings", children: [_jsx("button", { className: "db-ws-settings-btn", onClick: () => setIsOpen(!isOpen), "aria-expanded": isOpen, "aria-haspopup": "true", "aria-label": "Workspace settings", title: "Workspace settings", children: _jsx(WorkspaceIcon, {}) }), isOpen && (_jsxs("div", { className: "db-ws-settings-dropdown", role: "menu", children: [_jsx("button", { className: "db-ws-settings-item", role: "menuitem", onClick: () => handleAction(onSettings), children: "Workspace settings\u2026" }), _jsx("button", { className: "db-ws-settings-item", role: "menuitem", onClick: () => handleAction(onRename), children: "Rename workspace" }), _jsx("button", { className: "db-ws-settings-item", role: "menuitem", onClick: () => handleAction(onDownload), children: "Download workspace" }), _jsx("div", { className: "db-ws-settings-divider" }), _jsx("button", { className: "db-ws-settings-item db-ws-settings-item--danger", role: "menuitem", onClick: () => handleAction(onRemove), children: "Remove workspace" })] }))] }));
26
- }
27
- //# sourceMappingURL=WorkspaceSettingsButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WorkspaceSettingsButton.js","sourceRoot":"","sources":["../../src/WorkspacePicker/WorkspaceSettingsButton.tsx"],"names":[],"mappings":";AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAS5C,MAAM,UAAU,uBAAuB,CAAC,EACtC,UAAU,EACV,QAAQ,EACR,UAAU,EACV,QAAQ,GACqB;IAC7B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,GAAG,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAEzC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,SAAS,kBAAkB,CAAC,CAAa;YACvC,IAAI,GAAG,CAAC,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AAK,SAAS,EAAC,wBAAwB,GAAG,EAC1C,iBACE,SAAS,EAAC,iDAAiD,EAC3D,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,iCAG9B,IACL,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -1,20 +0,0 @@
1
- /**
2
- * WorkspaceSettingsDialog — per-workspace settings modal.
3
- *
4
- * Lets the user override the global versioning preference for a single
5
- * workspace (or fall back to inheriting it). The override is stored on
6
- * the WorkspaceDescriptor and persisted via `saveWorkspace`.
7
- */
8
- import type { WorkspaceDescriptor } from '@bendyline/docblocks/workspace';
9
- import { type VersioningPreference } from '../preferences/versioning.js';
10
- export type WorkspaceVersioningOverride = NonNullable<WorkspaceDescriptor['versioningOverride']>;
11
- export interface WorkspaceSettingsDialogProps {
12
- workspace: WorkspaceDescriptor;
13
- /** Current global versioning preference — used to label "Inherit". */
14
- globalVersioningPreference: VersioningPreference;
15
- /** Apply a new override and close the dialog. */
16
- onChange: (override: WorkspaceVersioningOverride) => void;
17
- onClose: () => void;
18
- }
19
- export declare function WorkspaceSettingsDialog({ workspace, globalVersioningPreference, onChange, onClose, }: WorkspaceSettingsDialogProps): import("react/jsx-runtime").JSX.Element;
20
- //# sourceMappingURL=WorkspaceSettingsDialog.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WorkspaceSettingsDialog.d.ts","sourceRoot":"","sources":["../../src/WorkspacePicker/WorkspaceSettingsDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,2BAA2B,GAAG,WAAW,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,CAAC,CAAC;AAEjG,MAAM,WAAW,4BAA4B;IAC3C,SAAS,EAAE,mBAAmB,CAAC;IAC/B,sEAAsE;IACtE,0BAA0B,EAAE,oBAAoB,CAAC;IACjD,iDAAiD;IACjD,QAAQ,EAAE,CAAC,QAAQ,EAAE,2BAA2B,KAAK,IAAI,CAAC;IAC1D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAQD,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,0BAA0B,EAC1B,QAAQ,EACR,OAAO,GACR,EAAE,4BAA4B,2CAkF9B"}
@@ -1,36 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
3
- * WorkspaceSettingsDialog — per-workspace settings modal.
4
- *
5
- * Lets the user override the global versioning preference for a single
6
- * workspace (or fall back to inheriting it). The override is stored on
7
- * the WorkspaceDescriptor and persisted via `saveWorkspace`.
8
- */
9
- import { useCallback, useEffect } from 'react';
10
- import { isLocalWorkspaceType, resolveVersioningEnabled, } from '../preferences/versioning.js';
11
- const VERSIONING_LABELS = {
12
- on: 'on',
13
- 'browser-only': 'on for browser workspaces, off for local folders',
14
- off: 'off',
15
- };
16
- export function WorkspaceSettingsDialog({ workspace, globalVersioningPreference, onChange, onClose, }) {
17
- // Treat absent/undefined as 'inherit' for the radio state.
18
- const current = workspace.versioningOverride ?? 'inherit';
19
- useEffect(() => {
20
- const onKey = (e) => {
21
- if (e.key === 'Escape')
22
- onClose();
23
- };
24
- window.addEventListener('keydown', onKey);
25
- return () => window.removeEventListener('keydown', onKey);
26
- }, [onClose]);
27
- const handleBackdropClick = useCallback((e) => {
28
- if (e.target === e.currentTarget)
29
- onClose();
30
- }, [onClose]);
31
- const isLocal = isLocalWorkspaceType(workspace.type);
32
- const inheritedEnabled = resolveVersioningEnabled({ ...workspace, versioningOverride: 'inherit' }, globalVersioningPreference);
33
- const inheritLabel = `Inherit default — currently ${VERSIONING_LABELS[globalVersioningPreference]} (${inheritedEnabled ? 'on' : 'off'} for this workspace)`;
34
- return (_jsx("div", { className: "db-dialog-overlay", onClick: handleBackdropClick, children: _jsxs("div", { className: "db-dialog", role: "dialog", "aria-label": "Workspace settings", children: [_jsxs("div", { className: "db-dialog-header", children: [_jsx("h2", { className: "db-dialog-title", children: "Workspace settings" }), _jsx("button", { type: "button", className: "db-dialog-close", onClick: onClose, "aria-label": "Close", children: "\u00D7" })] }), _jsxs("div", { className: "db-dialog-body", children: [_jsxs("p", { className: "db-settings-hint", children: [_jsx("strong", { children: workspace.name }), " \u00B7", ' ', isLocal ? 'Local folder workspace' : 'Browser workspace'] }), _jsxs("fieldset", { className: "db-settings-fieldset", children: [_jsx("legend", { className: "db-settings-legend", children: "Version history" }), _jsxs("p", { className: "db-settings-hint", children: ["Controls whether DocBlocks keeps prior revisions in", ' ', _jsx("code", { children: "<name>_files/.versions/" }), " for documents in this workspace."] }), _jsxs("label", { className: "db-settings-radio", children: [_jsx("input", { type: "radio", name: "ws-versioning", value: "inherit", checked: current === 'inherit', onChange: () => onChange('inherit') }), inheritLabel] }), _jsxs("label", { className: "db-settings-radio", children: [_jsx("input", { type: "radio", name: "ws-versioning", value: "on", checked: current === 'on', onChange: () => onChange('on') }), "On for this workspace"] }), _jsxs("label", { className: "db-settings-radio", children: [_jsx("input", { type: "radio", name: "ws-versioning", value: "off", checked: current === 'off', onChange: () => onChange('off') }), "Off for this workspace"] })] })] })] }) }));
35
- }
36
- //# sourceMappingURL=WorkspaceSettingsDialog.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WorkspaceSettingsDialog.js","sourceRoot":"","sources":["../../src/WorkspacePicker/WorkspaceSettingsDialog.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,EACL,oBAAoB,EACpB,wBAAwB,GAEzB,MAAM,8BAA8B,CAAC;AAatC,MAAM,iBAAiB,GAAyC;IAC9D,EAAE,EAAE,IAAI;IACR,cAAc,EAAE,kDAAkD;IAClE,GAAG,EAAE,KAAK;CACX,CA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{ WorkspacePicker } from './WorkspacePicker.js';
2
- export type { WorkspacePickerProps } from './WorkspacePicker.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/WorkspacePicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { WorkspacePicker } from './WorkspacePicker.js';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/WorkspacePicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { useAutoSave } from './useAutoSave.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { useAutoSave } from './useAutoSave.js';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,15 +0,0 @@
1
- /**
2
- * useAutoSave — debounced auto-save hook.
3
- *
4
- * Writes content to the FileSystemProvider after a delay
5
- * whenever the content changes. Returns a `flush` function so callers
6
- * (e.g. an explicit Ctrl/Cmd+S handler) can force an immediate write
7
- * and await its completion.
8
- */
9
- import type { FileSystemProvider } from '@bendyline/docblocks/filesystem';
10
- export interface UseAutoSaveResult {
11
- /** Cancel any pending debounce and write the current content immediately. */
12
- flush: () => Promise<void>;
13
- }
14
- export declare function useAutoSave(provider: FileSystemProvider | null, filePath: string | null, content: string, delayMs?: number, onSaved?: (filePath: string, content: string) => void): UseAutoSaveResult;
15
- //# sourceMappingURL=useAutoSave.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAutoSave.d.ts","sourceRoot":"","sources":["../../src/hooks/useAutoSave.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAE1E,MAAM,WAAW,iBAAiB;IAChC,6EAA6E;IAC7E,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AAED,wBAAgB,WAAW,CACzB,QAAQ,EAAE,kBAAkB,GAAG,IAAI,EACnC,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,OAAO,EAAE,MAAM,EACf,OAAO,SAAM,EACb,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,GACpD,iBAAiB,CA4FnB"}
@@ -1,83 +0,0 @@
1
- /**
2
- * useAutoSave — debounced auto-save hook.
3
- *
4
- * Writes content to the FileSystemProvider after a delay
5
- * whenever the content changes. Returns a `flush` function so callers
6
- * (e.g. an explicit Ctrl/Cmd+S handler) can force an immediate write
7
- * and await its completion.
8
- */
9
- import { useEffect, useRef, useCallback } from 'react';
10
- export function useAutoSave(provider, filePath, content, delayMs = 500, onSaved) {
11
- const timerRef = useRef(null);
12
- const contentRef = useRef(content);
13
- const onSavedRef = useRef(onSaved);
14
- const targetRef = useRef(null);
15
- const clearTimer = useCallback(() => {
16
- if (timerRef.current) {
17
- clearTimeout(timerRef.current);
18
- timerRef.current = null;
19
- }
20
- }, []);
21
- const flushTarget = useCallback(async (target, nextContent) => {
22
- if (nextContent === target.lastSaved)
23
- return;
24
- const previous = target.lastSaved;
25
- target.lastSaved = nextContent;
26
- try {
27
- await target.provider.writeFile(target.filePath, nextContent);
28
- onSavedRef.current?.(target.filePath, nextContent);
29
- }
30
- catch (err) {
31
- target.lastSaved = previous;
32
- throw err;
33
- }
34
- }, []);
35
- useEffect(() => {
36
- onSavedRef.current = onSaved;
37
- }, [onSaved]);
38
- useEffect(() => {
39
- contentRef.current = content;
40
- }, [content]);
41
- useEffect(() => {
42
- clearTimer();
43
- targetRef.current = provider && filePath ? { provider, filePath, lastSaved: content } : null;
44
- contentRef.current = content;
45
- return () => {
46
- clearTimer();
47
- const target = targetRef.current;
48
- if (target) {
49
- void flushTarget(target, contentRef.current).catch(() => undefined);
50
- }
51
- targetRef.current = null;
52
- };
53
- // `content` is intentionally captured only when the save target changes.
54
- // Content edits are handled by the debounced effect below.
55
- // eslint-disable-next-line react-hooks/exhaustive-deps
56
- }, [provider, filePath, clearTimer, flushTarget]);
57
- useEffect(() => {
58
- const target = targetRef.current;
59
- if (!target)
60
- return;
61
- clearTimer();
62
- if (content !== target.lastSaved) {
63
- timerRef.current = setTimeout(() => {
64
- const currentTarget = targetRef.current;
65
- if (!currentTarget)
66
- return;
67
- void flushTarget(currentTarget, contentRef.current).catch(() => undefined);
68
- }, delayMs);
69
- }
70
- return () => {
71
- clearTimer();
72
- };
73
- }, [content, delayMs, clearTimer, flushTarget]);
74
- const flush = useCallback(async () => {
75
- clearTimer();
76
- const target = targetRef.current;
77
- if (!target)
78
- return;
79
- await flushTarget(target, contentRef.current);
80
- }, [clearTimer, flushTarget]);
81
- return { flush };
82
- }
83
- //# sourceMappingURL=useAutoSave.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAutoSave.js","sourceRoot":"","sources":["../../src/hooks/useAutoSave.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAQvD,MAAM,UAAU,WAAW,CACzB,QAAmC,EACnC,QAAuB,EACvB,OAAe,EACf,OAAO,GAAG,GAAG,EACb,OAAqD;IAErD,MAAM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;YACV,UAAU,EAAE,CAAC;QACf,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;IAEhD,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QACnC,UAAU,EAAE,CAAC;QACb,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC;QACjC,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,MAAM,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;IAE9B,OAAO,EAAE,KAAK,EAAE,CAAC;AACnB,CAAC"}
package/dist/icons.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import type { SVGProps } from 'react';
2
- export declare function NewFileIcon(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
3
- export declare function NewFolderIcon(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
4
- export declare function RefreshIcon(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
5
- export declare function MoreIcon(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
6
- export declare function WorkspaceIcon(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
7
- //# sourceMappingURL=icons.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../src/icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAatC,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,2CAYzD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,2CAU3D;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,2CAOzD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,2CAQtD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,2CAW3D"}
package/dist/icons.js DELETED
@@ -1,27 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- const defaults = {
3
- width: 16,
4
- height: 16,
5
- viewBox: '0 0 16 16',
6
- fill: 'none',
7
- stroke: 'currentColor',
8
- strokeWidth: 1.5,
9
- strokeLinecap: 'round',
10
- strokeLinejoin: 'round',
11
- };
12
- export function NewFileIcon(props) {
13
- return (_jsxs("svg", { ...defaults, ...props, children: [_jsx("path", { d: "M9.5 1.5H4a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V5l-3.5-3.5Z" }), _jsx("path", { d: "M9.5 1.5V5H13" }), _jsx("line", { x1: "6.5", y1: "10", x2: "9.5", y2: "10" }), _jsx("line", { x1: "8", y1: "8.5", x2: "8", y2: "11.5" })] }));
14
- }
15
- export function NewFolderIcon(props) {
16
- return (_jsxs("svg", { ...defaults, ...props, children: [_jsx("path", { d: "M2 3.5a1 1 0 0 1 1-1h3l1.5 1.5H13a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5Z" }), _jsx("line", { x1: "6", y1: "8.5", x2: "10", y2: "8.5" }), _jsx("line", { x1: "8", y1: "6.5", x2: "8", y2: "10.5" })] }));
17
- }
18
- export function RefreshIcon(props) {
19
- return (_jsxs("svg", { ...defaults, ...props, children: [_jsx("path", { d: "M13.5 8A5.5 5.5 0 1 1 8 2.5" }), _jsx("polyline", { points: "13.5 3 13.5 6.5 10 6.5" })] }));
20
- }
21
- export function MoreIcon(props) {
22
- return (_jsxs("svg", { ...defaults, ...props, children: [_jsx("circle", { cx: "3.5", cy: "8", r: "1", fill: "currentColor", stroke: "none" }), _jsx("circle", { cx: "8", cy: "8", r: "1", fill: "currentColor", stroke: "none" }), _jsx("circle", { cx: "12.5", cy: "8", r: "1", fill: "currentColor", stroke: "none" })] }));
23
- }
24
- export function WorkspaceIcon(props) {
25
- return (_jsxs("svg", { ...defaults, ...props, children: [_jsx("rect", { x: "1.5", y: "2.5", width: "13", height: "11", rx: "1" }), _jsx("rect", { x: "4", y: "4.5", width: "8", height: "7", rx: "0.5" }), _jsx("line", { x1: "6.5", y1: "5.5", x2: "6.5", y2: "10.5", strokeWidth: "1" }), _jsx("line", { x1: "9.5", y1: "5.5", x2: "9.5", y2: "10.5", strokeWidth: "1" })] }));
26
- }
27
- //# sourceMappingURL=icons.js.map
package/dist/icons.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"icons.js","sourceRoot":"","sources":["../src/icons.tsx"],"names":[],"mappings":";AAEA,MAAM,QAAQ,GAA4B;IACxC,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,WAAW;IACpB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,cAAc;IACtB,WAAW,EAAE,GAAG;IAChB,aAAa,EAAE,OAAgB;IAC/B,cAAc,EAAE,OAAgB;CACjC,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,KAA8B;IACxD,OAAO,CACL,kBAAS,QAAQ,KAAM,KAAK,aAE1B,eAAM,CAAC,EAAC,uEAAuE,GAAG,EAElF,eAAM,CAAC,EAAC,eAAe,GAAG,EAE1B,eAAM,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,IAAI,GAAG,EAC1C,eAAM,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,MAAM,GAAG,IACrC,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAA8B;IAC1D,OAAO,CACL,kBAAS,QAAQ,KAAM,KAAK,aAE1B,eAAM,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AAM,mBAAmB,CAAC;AACjD,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,19 +0,0 @@
1
- /**
2
- * Slim Monaco editor bundle for DocBlocks browser surfaces.
3
- *
4
- * Squisq's raw editor lazy-loads `monaco-editor/esm/vs/editor/editor.main.js`
5
- * so syntax highlighting works in raw mode. Alias both that subpath and the
6
- * bare `monaco-editor` specifier to this file to keep the lazy chunk focused
7
- * on markdown plus the languages users most often place in fenced blocks.
8
- */
9
- export * from 'monaco-editor/esm/vs/editor/editor.api';
10
- import 'monaco-editor/esm/vs/basic-languages/markdown/markdown.contribution';
11
- import 'monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution';
12
- import 'monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution';
13
- import 'monaco-editor/esm/vs/basic-languages/html/html.contribution';
14
- import 'monaco-editor/esm/vs/basic-languages/css/css.contribution';
15
- import 'monaco-editor/esm/vs/basic-languages/yaml/yaml.contribution';
16
- import 'monaco-editor/esm/vs/basic-languages/python/python.contribution';
17
- import 'monaco-editor/esm/vs/basic-languages/shell/shell.contribution';
18
- import 'monaco-editor/esm/vs/basic-languages/xml/xml.contribution';
19
- //# sourceMappingURL=monaco-slim.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"monaco-slim.d.ts","sourceRoot":"","sources":["../src/monaco-slim.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,wCAAwC,CAAC;AAEvD,OAAO,qEAAqE,CAAC;AAC7E,OAAO,yEAAyE,CAAC;AACjF,OAAO,yEAAyE,CAAC;AACjF,OAAO,6DAA6D,CAAC;AACrE,OAAO,2DAA2D,CAAC;AACnE,OAAO,6DAA6D,CAAC;AACrE,OAAO,iEAAiE,CAAC;AACzE,OAAO,+DAA+D,CAAC;AACvE,OAAO,2DAA2D,CAAC"}
@@ -1,19 +0,0 @@
1
- /**
2
- * Slim Monaco editor bundle for DocBlocks browser surfaces.
3
- *
4
- * Squisq's raw editor lazy-loads `monaco-editor/esm/vs/editor/editor.main.js`
5
- * so syntax highlighting works in raw mode. Alias both that subpath and the
6
- * bare `monaco-editor` specifier to this file to keep the lazy chunk focused
7
- * on markdown plus the languages users most often place in fenced blocks.
8
- */
9
- export * from 'monaco-editor/esm/vs/editor/editor.api';
10
- import 'monaco-editor/esm/vs/basic-languages/markdown/markdown.contribution';
11
- import 'monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution';
12
- import 'monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution';
13
- import 'monaco-editor/esm/vs/basic-languages/html/html.contribution';
14
- import 'monaco-editor/esm/vs/basic-languages/css/css.contribution';
15
- import 'monaco-editor/esm/vs/basic-languages/yaml/yaml.contribution';
16
- import 'monaco-editor/esm/vs/basic-languages/python/python.contribution';
17
- import 'monaco-editor/esm/vs/basic-languages/shell/shell.contribution';
18
- import 'monaco-editor/esm/vs/basic-languages/xml/xml.contribution';
19
- //# sourceMappingURL=monaco-slim.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"monaco-slim.js","sourceRoot":"","sources":["../src/monaco-slim.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,wCAAwC,CAAC;AAEvD,OAAO,qEAAqE,CAAC;AAC7E,OAAO,yEAAyE,CAAC;AACjF,OAAO,yEAAyE,CAAC;AACjF,OAAO,6DAA6D,CAAC;AACrE,OAAO,2DAA2D,CAAC;AACnE,OAAO,6DAA6D,CAAC;AACrE,OAAO,iEAAiE,CAAC;AACzE,OAAO,+DAA+D,CAAC;AACvE,OAAO,2DAA2D,CAAC"}
@@ -1,27 +0,0 @@
1
- /**
2
- * Versioning preferences — global default + per-workspace resolution.
3
- *
4
- * The global preference controls whether DocBlocks writes version
5
- * snapshots (under `<basename>_files/.versions/`) when editing. The
6
- * default is `'browser-only'` so local-folder workspaces stay clean by
7
- * default and only IndexedDB workspaces accumulate version history.
8
- *
9
- * Each workspace can override the global default with its own setting
10
- * stored on the WorkspaceDescriptor. `'inherit'` (or absent) defers to
11
- * the global preference; `'on'` / `'off'` force the behavior regardless.
12
- */
13
- import type { WorkspaceDescriptor } from '@bendyline/docblocks/workspace';
14
- export type VersioningPreference = 'on' | 'browser-only' | 'off';
15
- export declare function loadVersioningPreference(): VersioningPreference;
16
- export declare function saveVersioningPreference(value: VersioningPreference): void;
17
- /** Whether a workspace type is "local" (writes to a real folder on disk). */
18
- export declare function isLocalWorkspaceType(type: WorkspaceDescriptor['type']): boolean;
19
- /**
20
- * Compute the effective versioning state for a workspace, honoring the
21
- * per-workspace override first and falling back to the global preference.
22
- *
23
- * Returns `false` whenever no workspace is provided so callers can use
24
- * this directly during initial render before a workspace loads.
25
- */
26
- export declare function resolveVersioningEnabled(workspace: WorkspaceDescriptor | null, globalPref: VersioningPreference): boolean;
27
- //# sourceMappingURL=versioning.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"versioning.d.ts","sourceRoot":"","sources":["../../src/preferences/versioning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAE1E,MAAM,MAAM,oBAAoB,GAAG,IAAI,GAAG,cAAc,GAAG,KAAK,CAAC;AAKjE,wBAAgB,wBAAwB,IAAI,oBAAoB,CAQ/D;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI,CAM1E;AAED,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,GAAG,OAAO,CAE/E;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,mBAAmB,GAAG,IAAI,EACrC,UAAU,EAAE,oBAAoB,GAC/B,OAAO,CAeT"}
@@ -1,62 +0,0 @@
1
- /**
2
- * Versioning preferences — global default + per-workspace resolution.
3
- *
4
- * The global preference controls whether DocBlocks writes version
5
- * snapshots (under `<basename>_files/.versions/`) when editing. The
6
- * default is `'browser-only'` so local-folder workspaces stay clean by
7
- * default and only IndexedDB workspaces accumulate version history.
8
- *
9
- * Each workspace can override the global default with its own setting
10
- * stored on the WorkspaceDescriptor. `'inherit'` (or absent) defers to
11
- * the global preference; `'on'` / `'off'` force the behavior regardless.
12
- */
13
- const STORAGE_KEY = 'docblocks:versioningPreference';
14
- const DEFAULT_PREFERENCE = 'browser-only';
15
- export function loadVersioningPreference() {
16
- try {
17
- const raw = localStorage.getItem(STORAGE_KEY);
18
- if (raw === 'on' || raw === 'browser-only' || raw === 'off')
19
- return raw;
20
- }
21
- catch {
22
- // ignore
23
- }
24
- return DEFAULT_PREFERENCE;
25
- }
26
- export function saveVersioningPreference(value) {
27
- try {
28
- localStorage.setItem(STORAGE_KEY, value);
29
- }
30
- catch {
31
- // ignore quota errors
32
- }
33
- }
34
- /** Whether a workspace type is "local" (writes to a real folder on disk). */
35
- export function isLocalWorkspaceType(type) {
36
- return type === 'native' || type === 'electron-native';
37
- }
38
- /**
39
- * Compute the effective versioning state for a workspace, honoring the
40
- * per-workspace override first and falling back to the global preference.
41
- *
42
- * Returns `false` whenever no workspace is provided so callers can use
43
- * this directly during initial render before a workspace loads.
44
- */
45
- export function resolveVersioningEnabled(workspace, globalPref) {
46
- if (!workspace)
47
- return false;
48
- const override = workspace.versioningOverride;
49
- if (override === 'on')
50
- return true;
51
- if (override === 'off')
52
- return false;
53
- switch (globalPref) {
54
- case 'on':
55
- return true;
56
- case 'off':
57
- return false;
58
- case 'browser-only':
59
- return !isLocalWorkspaceType(workspace.type);
60
- }
61
- }
62
- //# sourceMappingURL=versioning.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"versioning.js","sourceRoot":"","sources":["../../src/preferences/versioning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,MAAM,WAAW,GAAG,gCAAgC,CAAC;AACrD,MAAM,kBAAkB,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