@kubohiroya/turbowarp-plus-editor-git 0.0.0-stage → 0.8.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 (63) hide show
  1. package/LICENSE +373 -0
  2. package/README.ja.md +121 -0
  3. package/README.md +43 -2
  4. package/THIRD_PARTY_NOTICES.md +5 -0
  5. package/dist/THIRD_PARTY_NOTICES.md +1186 -0
  6. package/dist/block-diff-location.d.ts +22 -0
  7. package/dist/block-diff-preview.d.ts +33 -0
  8. package/dist/browser.d.ts +4 -0
  9. package/dist/connection-settings.d.ts +35 -0
  10. package/dist/file-diff-view.d.ts +18 -0
  11. package/dist/filesystem.d.ts +89 -0
  12. package/dist/github-pull-requests.d.ts +38 -0
  13. package/dist/index.d.ts +29 -0
  14. package/dist/index.js +3563 -0
  15. package/dist/messages.d.ts +112 -0
  16. package/dist/mutation-fs.d.ts +58 -0
  17. package/dist/objectSpread2-Dkd68nJH.js +101 -0
  18. package/dist/project-asset-paths-KV715791.js +761 -0
  19. package/dist/project-asset-paths.d.ts +12 -0
  20. package/dist/project-assets.d.ts +19 -0
  21. package/dist/project-source-diff.d.ts +26 -0
  22. package/dist/project-source-diff.js +172 -0
  23. package/dist/project-source-patch.d.ts +39 -0
  24. package/dist/project-source-review-model.d.ts +23 -0
  25. package/dist/project-source-review.d.ts +38 -0
  26. package/dist/pull-request-panel.d.ts +8 -0
  27. package/dist/remote-operations.d.ts +5 -0
  28. package/dist/repository-BQkADJmK.js +17280 -0
  29. package/dist/repository.d.ts +71 -0
  30. package/dist/repository.js +1 -0
  31. package/dist/scratch-block-diff-renderer-xS8OYsRl.js +1830 -0
  32. package/dist/scratch-block-diff-renderer.d.ts +128 -0
  33. package/dist/smart-http-BmHEkE7K.js +303 -0
  34. package/dist/smart-http.d.ts +60 -0
  35. package/dist/smart-http.js +1 -0
  36. package/dist/style.css +138 -0
  37. package/package.json +65 -4
  38. package/src/block-diff-location.ts +63 -0
  39. package/src/block-diff-preview.tsx +117 -0
  40. package/src/browser.ts +5 -0
  41. package/src/connection-settings.tsx +103 -0
  42. package/src/file-diff-view.tsx +44 -0
  43. package/src/filesystem.ts +125 -0
  44. package/src/github-pull-requests.ts +229 -0
  45. package/src/index.tsx +352 -0
  46. package/src/messages.ts +64 -0
  47. package/src/mutation-fs.ts +204 -0
  48. package/src/project-asset-paths.ts +33 -0
  49. package/src/project-assets.ts +66 -0
  50. package/src/project-source-diff.css +108 -0
  51. package/src/project-source-diff.tsx +139 -0
  52. package/src/project-source-patch.ts +126 -0
  53. package/src/project-source-review-model.ts +116 -0
  54. package/src/project-source-review.tsx +250 -0
  55. package/src/pull-request-panel.tsx +134 -0
  56. package/src/remote-operations.ts +90 -0
  57. package/src/repository.ts +364 -0
  58. package/src/scratch-block-diff-renderer.ts +331 -0
  59. package/src/smart-http.ts +190 -0
  60. package/src/style.css +29 -0
  61. package/src/styles.d.ts +1 -0
  62. package/tsconfig.json +18 -0
  63. package/vite.config.ts +26 -0
@@ -0,0 +1,71 @@
1
+ import type { GetRemoteSession, RemoteOperation } from './remote-operations.js';
2
+ import type { ProjectAssetLoader } from './project-assets.js';
3
+ export { createReadOnlyFs, GitPanelError } from './filesystem.js';
4
+ export type ChangeGroup = 'staged' | 'unstaged' | 'untracked' | 'commit';
5
+ export interface FileChange {
6
+ path: string;
7
+ group: ChangeGroup;
8
+ before: string | null;
9
+ after: string | null;
10
+ worktree: boolean;
11
+ oldMode: number | null;
12
+ newMode: number | null;
13
+ /** For `commit` changes, the commit compared with its first parent. */
14
+ commit?: string;
15
+ }
16
+ export interface Commit {
17
+ oid: string;
18
+ message: string;
19
+ author: string;
20
+ timestamp: number;
21
+ }
22
+ type Metadata = Map<string, Uint8Array | null>;
23
+ export interface Snapshot {
24
+ branch: string | undefined;
25
+ head: string | null;
26
+ branches: string[];
27
+ commits: Commit[];
28
+ changes: FileChange[];
29
+ scope: string;
30
+ metadata: Metadata;
31
+ /** Size and time fingerprint taken before the read. Compare it with `probe(scope)` to see later changes. */
32
+ probe: string;
33
+ }
34
+ export interface FileDiff {
35
+ binary: boolean;
36
+ patch: string;
37
+ /**
38
+ * Both versions as text, for views that read the content instead of the patch. A missing version is empty.
39
+ * Absent for binary content and above the text limit, except for project.source.json up to 16 MiB.
40
+ */
41
+ text?: {
42
+ before: string;
43
+ after: string;
44
+ };
45
+ beforeSize: number;
46
+ afterSize: number;
47
+ tooLarge: boolean;
48
+ }
49
+ export declare function openRepository(root: FileSystemDirectoryHandle): Promise<{
50
+ root: FileSystemDirectoryHandle;
51
+ openProject: (path: string) => Promise<FileSystemDirectoryHandle>;
52
+ browse: (path?: string) => Promise<{
53
+ path: string;
54
+ children: string[];
55
+ isProject: boolean;
56
+ }>;
57
+ probe: (scope?: string) => Promise<string>;
58
+ readOrigin: () => Promise<any>;
59
+ remoteOperation: (operation: RemoteOperation, getSession: GetRemoteSession, guard: () => void, signal?: AbortSignal) => Promise<void>;
60
+ read: (scope?: string) => Promise<Snapshot>;
61
+ readDiff: (snapshot: Snapshot, change: FileChange) => Promise<FileDiff>;
62
+ historyChanges: (snapshot: Snapshot, oid: string) => Promise<FileChange[]>;
63
+ /**
64
+ * Reads the assets of both versions of a selected project file, for thumbnails. Staged changes compare HEAD with
65
+ * the index, unstaged ones the index with the working tree, untracked ones nothing with the working tree, and
66
+ * commit changes the first parent with the commit. Each version's sb3-source.json names its assets directory.
67
+ * Reads never write, and resolve `null` for anything missing, invalid, larger than 10 MiB or changed since the snapshot.
68
+ */
69
+ assetLoader: (snapshot: Snapshot, change: FileChange) => ProjectAssetLoader;
70
+ }>;
71
+ export type Repository = Awaited<ReturnType<typeof openRepository>>;
@@ -0,0 +1 @@
1
+ export { n as GitPanelError, r as createReadOnlyFs, t as openRepository } from "./repository-BQkADJmK.js";