@nkzw/codiff-core 1.9.1 → 1.11.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 (31) hide show
  1. package/dist/SharedWalkthroughApp.d.ts +2 -1
  2. package/dist/app/components/DefinitionPopover.d.ts +12 -0
  3. package/dist/app/components/OpenReviewSourceDialog.d.ts +6 -0
  4. package/dist/app/components/OpenReviewSourceMenu.d.ts +5 -0
  5. package/dist/app/components/Panels.d.ts +8 -2
  6. package/dist/app/components/ReadOnlyMarkdownView.d.ts +1 -0
  7. package/dist/app/components/ResolvedThreadDisclosure.d.ts +9 -0
  8. package/dist/app/components/ReviewCodeView.d.ts +4 -2
  9. package/dist/app/components/ReviewModeControl.d.ts +14 -0
  10. package/dist/app/components/ReviewTopBar.d.ts +14 -13
  11. package/dist/app/components/merge-request/GeneralComments.d.ts +2 -1
  12. package/dist/app/components/walkthrough/NarrativeWalkthroughView.d.ts +6 -4
  13. package/dist/app/components/walkthrough/useNarrativeNavigation.d.ts +1 -1
  14. package/dist/app/hooks/useAppCommands.d.ts +3 -2
  15. package/dist/app/hooks/useAppReviewComments.d.ts +1 -0
  16. package/dist/app/hooks/useAppWalkthrough.d.ts +1 -1
  17. package/dist/app/hooks/useResizableSidebar.d.ts +2 -1
  18. package/dist/app/hooks/useReviewCommentDrafts.d.ts +1 -0
  19. package/dist/config/keyboard-layout.d.ts +13 -0
  20. package/dist/config/keymap.d.ts +3 -1
  21. package/dist/config/types.d.ts +3 -0
  22. package/dist/lib/app-types.d.ts +1 -0
  23. package/dist/lib/code-view-options.d.ts +1 -1
  24. package/dist/lib/files.d.ts +10 -1
  25. package/dist/lib/identifier-navigation.d.ts +10 -0
  26. package/dist/lib/keyboard.d.ts +1 -0
  27. package/dist/react.mjs +1163 -278
  28. package/dist/share.mjs +8 -7
  29. package/dist/style.css +392 -52
  30. package/dist/types.d.ts +37 -1
  31. package/package.json +6 -5
package/dist/types.d.ts CHANGED
@@ -25,7 +25,7 @@ export type DiffSection = {
25
25
  size?: number;
26
26
  };
27
27
  };
28
- export type GitFileStatus = 'added' | 'deleted' | 'modified' | 'renamed' | 'untracked';
28
+ export type GitFileStatus = 'added' | 'conflicted' | 'deleted' | 'modified' | 'renamed' | 'untracked';
29
29
  export type ChangedFile = {
30
30
  fingerprint: string;
31
31
  generated?: boolean;
@@ -147,6 +147,8 @@ export type ReviewSource = {
147
147
  type: 'pull-request';
148
148
  url: string;
149
149
  };
150
+ /** Sources that can be entered from the palette or native application menu. */
151
+ export type OpenReviewSourceKind = 'branch' | 'commit' | 'pull-request';
150
152
  export type HistoryEntry = {
151
153
  author: string;
152
154
  committedAt: number;
@@ -355,6 +357,7 @@ export type WalkthroughContext = {
355
357
  };
356
358
  export type CodiffLaunchOptions = {
357
359
  agentBackend?: 'codex' | 'claude' | 'opencode' | 'pi';
360
+ applyUpdate?: boolean;
358
361
  claudeSessionId?: string;
359
362
  codexSessionId?: string;
360
363
  opencodeSessionId?: string;
@@ -607,6 +610,30 @@ export type DiffSectionContentRequest = {
607
610
  showWhitespace?: boolean;
608
611
  source?: ReviewSource;
609
612
  };
613
+ export type DefinitionSearchRequest = {
614
+ identifier: string;
615
+ kind: DiffSection['kind'];
616
+ lineNumber: number;
617
+ path: string;
618
+ side: 'additions' | 'deletions';
619
+ source: ReviewSource;
620
+ };
621
+ export type DefinitionCandidate = {
622
+ canOpenInEditor: boolean;
623
+ kind: string;
624
+ line: string;
625
+ lineNumber: number;
626
+ path: string;
627
+ side: 'additions' | 'deletions';
628
+ };
629
+ export type DefinitionSearchResult = {
630
+ candidates: ReadonlyArray<DefinitionCandidate>;
631
+ identifier: string;
632
+ status: 'ready';
633
+ } | {
634
+ reason: string;
635
+ status: 'unavailable';
636
+ };
610
637
  export type DiffImageContentRequest = {
611
638
  kind: DiffSection['kind'];
612
639
  path: string;
@@ -642,11 +669,20 @@ export type CodiffPreferences = {
642
669
  reviewCommentsPrefix: string;
643
670
  showOutdated: boolean;
644
671
  showWhitespace: boolean;
672
+ sidebarPosition: 'left' | 'right';
645
673
  theme: CodiffTheme;
646
674
  walkthroughPrompt: string;
647
675
  wordWrap: boolean;
648
676
  };
649
677
  export type ReviewPreferences = Pick<CodiffPreferences, 'codeFontFamily' | 'codeFontSize' | 'diffStyle' | 'showWhitespace' | 'theme' | 'wordWrap'>;
678
+ export type CodiffUpdatePhase = 'available' | 'error' | 'idle' | 'installerReady' | 'updating';
679
+ export type CodiffUpdateStatus = {
680
+ currentVersion: string;
681
+ message?: string;
682
+ phase: CodiffUpdatePhase;
683
+ strategy?: 'download' | 'manual' | 'squirrel';
684
+ version?: string;
685
+ };
650
686
  export type PullRequestReviewComment = {
651
687
  anchor?: 'file' | 'line';
652
688
  body: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nkzw/codiff-core",
3
- "version": "1.9.1",
3
+ "version": "1.11.0",
4
4
  "description": "A fast diff viewer.",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -18,6 +18,7 @@
18
18
  "type": "module",
19
19
  "sideEffects": [
20
20
  "./App.css",
21
+ "./Desktop.css",
21
22
  "./dist/*.css"
22
23
  ],
23
24
  "main": "./dist/index.mjs",
@@ -53,12 +54,12 @@
53
54
  "@nkzw/mdx-editor": "^0.2.2",
54
55
  "@nkzw/use-relative-time": "^1.2.3",
55
56
  "@phosphor-icons/react": "^2.1.10",
56
- "@pierre/diffs": "1.3.0-beta.9",
57
- "@pierre/trees": "1.0.0-beta.5",
58
- "@radix-ui/react-slot": "^1.3.0",
57
+ "@pierre/diffs": "1.3.6",
58
+ "@pierre/trees": "1.0.0-beta.6",
59
+ "@radix-ui/react-slot": "^1.3.3",
59
60
  "class-variance-authority": "^0.7.1",
60
61
  "ghostty-web": "^0.4.0",
61
- "lucide-react": "^1.24.0",
62
+ "lucide-react": "^1.34.0",
62
63
  "valibot": "^1.4.2"
63
64
  },
64
65
  "peerDependencies": {