@bendyline/docblocks 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 (149) hide show
  1. package/README.md +76 -11
  2. package/dist/chunk-6IYMTYMQ.js +1692 -0
  3. package/dist/chunk-6IYMTYMQ.js.map +1 -0
  4. package/dist/chunk-AEHCVWU5.js +25 -0
  5. package/dist/chunk-AEHCVWU5.js.map +1 -0
  6. package/dist/chunk-B56KWCSE.js +802 -0
  7. package/dist/chunk-B56KWCSE.js.map +1 -0
  8. package/dist/{chunk-ME76RUMR.js → chunk-BNKV7MTO.js} +15 -1
  9. package/dist/chunk-BNKV7MTO.js.map +1 -0
  10. package/dist/chunk-BXMF5YQJ.js +149 -0
  11. package/dist/chunk-BXMF5YQJ.js.map +1 -0
  12. package/dist/chunk-COYQXQK3.js +1071 -0
  13. package/dist/chunk-COYQXQK3.js.map +1 -0
  14. package/dist/chunk-DN7A33LL.js +780 -0
  15. package/dist/chunk-DN7A33LL.js.map +1 -0
  16. package/dist/chunk-EZKJZUNJ.js +13 -0
  17. package/dist/chunk-EZKJZUNJ.js.map +1 -0
  18. package/dist/chunk-FA7UNOXK.js +20 -0
  19. package/dist/chunk-FA7UNOXK.js.map +1 -0
  20. package/dist/chunk-FNW556FN.js +75 -0
  21. package/dist/chunk-FNW556FN.js.map +1 -0
  22. package/dist/chunk-GM5YXU4L.js +29 -0
  23. package/dist/chunk-GM5YXU4L.js.map +1 -0
  24. package/dist/chunk-JS6XFWQK.js +225 -0
  25. package/dist/chunk-JS6XFWQK.js.map +1 -0
  26. package/dist/chunk-MNSZ7EZN.js +111 -0
  27. package/dist/chunk-MNSZ7EZN.js.map +1 -0
  28. package/dist/chunk-P3DVZQ6S.js +228 -0
  29. package/dist/chunk-P3DVZQ6S.js.map +1 -0
  30. package/dist/chunk-P4WATND4.js +52 -0
  31. package/dist/chunk-P4WATND4.js.map +1 -0
  32. package/dist/chunk-RVPGQBWR.js +169 -0
  33. package/dist/chunk-RVPGQBWR.js.map +1 -0
  34. package/dist/chunk-U722UUFN.js +9 -0
  35. package/dist/chunk-U722UUFN.js.map +1 -0
  36. package/dist/chunk-VTCSF7VS.js +553 -0
  37. package/dist/chunk-VTCSF7VS.js.map +1 -0
  38. package/dist/chunk-WJKYY5QR.js +1350 -0
  39. package/dist/chunk-WJKYY5QR.js.map +1 -0
  40. package/dist/chunk-XUML3MKV.js +945 -0
  41. package/dist/chunk-XUML3MKV.js.map +1 -0
  42. package/dist/document/index.d.ts +358 -0
  43. package/dist/document/index.js +25 -0
  44. package/dist/document/index.js.map +1 -0
  45. package/dist/filesystem/electron.d.ts +73 -0
  46. package/dist/filesystem/electron.js +17 -0
  47. package/dist/filesystem/electron.js.map +1 -0
  48. package/dist/filesystem/index.d.ts +228 -8
  49. package/dist/filesystem/index.js +133 -6
  50. package/dist/filesystem/index.js.map +1 -1
  51. package/dist/filesystem/indexeddb.d.ts +284 -0
  52. package/dist/filesystem/indexeddb.js +23 -0
  53. package/dist/filesystem/indexeddb.js.map +1 -0
  54. package/dist/filesystem/memory.d.ts +152 -0
  55. package/dist/filesystem/memory.js +13 -0
  56. package/dist/filesystem/memory.js.map +1 -0
  57. package/dist/filesystem/native.d.ts +136 -0
  58. package/dist/filesystem/native.js +28 -0
  59. package/dist/filesystem/native.js.map +1 -0
  60. package/dist/host/index.d.ts +32 -6
  61. package/dist/host/index.js +26 -27
  62. package/dist/host/index.js.map +1 -1
  63. package/dist/index.d.ts +14 -9
  64. package/dist/index.js +204 -8
  65. package/dist/index.js.map +1 -1
  66. package/dist/mcp/index.d.ts +33 -0
  67. package/dist/mcp/index.js +32 -0
  68. package/dist/mcp/index.js.map +1 -0
  69. package/dist/mcp/zod.d.ts +5765 -0
  70. package/dist/mcp/zod.js +724 -0
  71. package/dist/mcp/zod.js.map +1 -0
  72. package/dist/share/index.d.ts +43 -0
  73. package/dist/share/index.js +13 -0
  74. package/dist/share/index.js.map +1 -0
  75. package/dist/types-BEg5SQ1_.d.ts +301 -0
  76. package/dist/types-CX893hgH.d.ts +468 -0
  77. package/dist/types-CueK0tvU.d.ts +501 -0
  78. package/dist/vscode/index.d.ts +220 -0
  79. package/dist/vscode/index.js +383 -0
  80. package/dist/vscode/index.js.map +1 -0
  81. package/dist/workspace/index.d.ts +141 -3
  82. package/dist/workspace/index.js +28 -1
  83. package/dist/workspace/index.js.map +1 -1
  84. package/dist/workspace-path-CWVrcuPL.d.ts +21 -0
  85. package/package.json +50 -5
  86. package/dist/chunk-GUNM43XZ.js +0 -63
  87. package/dist/chunk-GUNM43XZ.js.map +0 -1
  88. package/dist/chunk-IM7LCQJ6.js +0 -850
  89. package/dist/chunk-IM7LCQJ6.js.map +0 -1
  90. package/dist/chunk-ME76RUMR.js.map +0 -1
  91. package/dist/filesystem/electron-provider.d.ts +0 -32
  92. package/dist/filesystem/electron-provider.d.ts.map +0 -1
  93. package/dist/filesystem/electron-provider.js +0 -64
  94. package/dist/filesystem/electron-provider.js.map +0 -1
  95. package/dist/filesystem/file-media-provider.d.ts +0 -23
  96. package/dist/filesystem/file-media-provider.d.ts.map +0 -1
  97. package/dist/filesystem/file-media-provider.js +0 -85
  98. package/dist/filesystem/file-media-provider.js.map +0 -1
  99. package/dist/filesystem/filesystem-content-container.d.ts +0 -24
  100. package/dist/filesystem/filesystem-content-container.d.ts.map +0 -1
  101. package/dist/filesystem/filesystem-content-container.js +0 -116
  102. package/dist/filesystem/filesystem-content-container.js.map +0 -1
  103. package/dist/filesystem/index.d.ts.map +0 -1
  104. package/dist/filesystem/indexeddb-content-container.d.ts +0 -20
  105. package/dist/filesystem/indexeddb-content-container.d.ts.map +0 -1
  106. package/dist/filesystem/indexeddb-content-container.js +0 -93
  107. package/dist/filesystem/indexeddb-content-container.js.map +0 -1
  108. package/dist/filesystem/indexeddb-provider.d.ts +0 -32
  109. package/dist/filesystem/indexeddb-provider.d.ts.map +0 -1
  110. package/dist/filesystem/indexeddb-provider.js +0 -295
  111. package/dist/filesystem/indexeddb-provider.js.map +0 -1
  112. package/dist/filesystem/native-provider.d.ts +0 -45
  113. package/dist/filesystem/native-provider.d.ts.map +0 -1
  114. package/dist/filesystem/native-provider.js +0 -336
  115. package/dist/filesystem/native-provider.js.map +0 -1
  116. package/dist/filesystem/types.d.ts +0 -50
  117. package/dist/filesystem/types.d.ts.map +0 -1
  118. package/dist/filesystem/types.js +0 -8
  119. package/dist/filesystem/types.js.map +0 -1
  120. package/dist/host/index.d.ts.map +0 -1
  121. package/dist/host/types.d.ts +0 -149
  122. package/dist/host/types.d.ts.map +0 -1
  123. package/dist/host/types.js +0 -10
  124. package/dist/host/types.js.map +0 -1
  125. package/dist/index-pgBHBQ9G.d.ts +0 -213
  126. package/dist/index.d.ts.map +0 -1
  127. package/dist/workspace/index.d.ts.map +0 -1
  128. package/dist/workspace/types.d.ts +0 -29
  129. package/dist/workspace/types.d.ts.map +0 -1
  130. package/dist/workspace/types.js +0 -6
  131. package/dist/workspace/types.js.map +0 -1
  132. package/dist/workspace/workspace-manager.d.ts +0 -35
  133. package/dist/workspace/workspace-manager.d.ts.map +0 -1
  134. package/dist/workspace/workspace-manager.js +0 -82
  135. package/dist/workspace/workspace-manager.js.map +0 -1
  136. package/src/filesystem/electron-provider.ts +0 -88
  137. package/src/filesystem/file-media-provider.ts +0 -103
  138. package/src/filesystem/filesystem-content-container.ts +0 -126
  139. package/src/filesystem/index.ts +0 -24
  140. package/src/filesystem/indexeddb-content-container.ts +0 -104
  141. package/src/filesystem/indexeddb-provider.ts +0 -345
  142. package/src/filesystem/native-provider.ts +0 -384
  143. package/src/filesystem/types.ts +0 -69
  144. package/src/host/index.ts +0 -47
  145. package/src/host/types.ts +0 -153
  146. package/src/index.ts +0 -9
  147. package/src/workspace/index.ts +0 -10
  148. package/src/workspace/types.ts +0 -29
  149. package/src/workspace/workspace-manager.ts +0 -90
@@ -1,29 +0,0 @@
1
- /**
2
- * Workspace — a named binding to a FileSystemProvider, representing
3
- * the user's current working context (a folder of markdown files).
4
- */
5
-
6
- export interface WorkspaceDescriptor {
7
- /** Unique stable identifier (persisted in IndexedDB). */
8
- id: string;
9
- /** User-visible label. */
10
- name: string;
11
- /**
12
- * Provider kind:
13
- * - 'indexeddb' — browser-local storage (web only)
14
- * - 'native' — File System Access API (web Chrome/Edge only)
15
- * - 'electron-native' — Electron main-process native filesystem
16
- */
17
- type: 'indexeddb' | 'native' | 'electron-native';
18
- /** ISO timestamp of last access. */
19
- lastOpened: string;
20
- /** Absolute filesystem path for 'electron-native' workspaces. */
21
- rootPath?: string;
22
- /**
23
- * Per-workspace override for the global versioning preference. When
24
- * `'inherit'` (or absent), the global preference applies. `'on'` /
25
- * `'off'` force the corresponding behavior regardless of the global
26
- * setting. See `resolveVersioningEnabled` in the preferences module.
27
- */
28
- versioningOverride?: 'inherit' | 'on' | 'off';
29
- }
@@ -1,90 +0,0 @@
1
- /**
2
- * WorkspaceManager — manages the list of known workspaces in IndexedDB
3
- * and provides helpers for creating / switching / removing them.
4
- *
5
- * The actual FileSystemProvider instances are created by the caller
6
- * (since native providers need a DirectoryHandle from user interaction).
7
- */
8
-
9
- import { LocalForageAdapter } from '@bendyline/squisq/storage';
10
- import type { WorkspaceDescriptor } from './types.js';
11
-
12
- const DB_NAME = 'docblocks-workspaces';
13
- const STORE_NAME = 'workspaces';
14
- const LIST_KEY = 'workspace-list';
15
- const DEFAULT_WORKSPACE_ID = 'default';
16
-
17
- const store = new LocalForageAdapter({
18
- name: DB_NAME,
19
- storeName: STORE_NAME,
20
- });
21
-
22
- /**
23
- * Get the list of all known workspace descriptors.
24
- */
25
- export async function listWorkspaces(): Promise<WorkspaceDescriptor[]> {
26
- const list = await store.get<WorkspaceDescriptor[]>(LIST_KEY);
27
- return list ?? [];
28
- }
29
-
30
- /**
31
- * Get a specific workspace descriptor by id.
32
- */
33
- export async function getWorkspace(id: string): Promise<WorkspaceDescriptor | null> {
34
- const list = await listWorkspaces();
35
- return list.find((w) => w.id === id) ?? null;
36
- }
37
-
38
- /**
39
- * Add or update a workspace descriptor. If a workspace with the same id
40
- * already exists, it is replaced.
41
- */
42
- export async function saveWorkspace(workspace: WorkspaceDescriptor): Promise<void> {
43
- const list = await listWorkspaces();
44
- const idx = list.findIndex((w) => w.id === workspace.id);
45
- if (idx >= 0) {
46
- list[idx] = workspace;
47
- } else {
48
- list.push(workspace);
49
- }
50
- await store.set(LIST_KEY, list);
51
- }
52
-
53
- /**
54
- * Remove a workspace descriptor by id.
55
- */
56
- export async function removeWorkspace(id: string): Promise<void> {
57
- const list = await listWorkspaces();
58
- const filtered = list.filter((w) => w.id !== id);
59
- await store.set(LIST_KEY, filtered);
60
- }
61
-
62
- /**
63
- * Touch the lastOpened timestamp on a workspace.
64
- */
65
- export async function touchWorkspace(id: string): Promise<void> {
66
- const list = await listWorkspaces();
67
- const workspace = list.find((w) => w.id === id);
68
- if (workspace) {
69
- workspace.lastOpened = new Date().toISOString();
70
- await store.set(LIST_KEY, list);
71
- }
72
- }
73
-
74
- /**
75
- * Ensure a default IndexedDB workspace exists. Called on app startup.
76
- * Returns the descriptor.
77
- */
78
- export async function ensureDefaultWorkspace(): Promise<WorkspaceDescriptor> {
79
- const existing = await getWorkspace(DEFAULT_WORKSPACE_ID);
80
- if (existing) return existing;
81
-
82
- const descriptor: WorkspaceDescriptor = {
83
- id: DEFAULT_WORKSPACE_ID,
84
- name: 'My Documents',
85
- type: 'indexeddb',
86
- lastOpened: new Date().toISOString(),
87
- };
88
- await saveWorkspace(descriptor);
89
- return descriptor;
90
- }