@canonical/react-ds-app-launchpad 0.9.0-experimental.2 → 0.9.0-experimental.4

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 (105) hide show
  1. package/dist/esm/ui/GitDiffViewer/Context.js +4 -0
  2. package/dist/esm/ui/GitDiffViewer/Context.js.map +1 -0
  3. package/dist/esm/ui/GitDiffViewer/Provider.js +31 -0
  4. package/dist/esm/ui/GitDiffViewer/Provider.js.map +1 -0
  5. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/CodeDiffViewer.js +119 -0
  6. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/CodeDiffViewer.js.map +1 -0
  7. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/DiffLine.js +33 -0
  8. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/DiffLine.js.map +1 -0
  9. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/index.js +4 -0
  10. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/index.js.map +1 -0
  11. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/types.js.map +1 -0
  12. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/index.js +2 -0
  13. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/index.js.map +1 -0
  14. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/index.js +4 -0
  15. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/index.js.map +1 -0
  16. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/types.js.map +1 -0
  17. package/dist/esm/ui/GitDiffViewer/common/FileHeader/FileHeader.js +35 -0
  18. package/dist/esm/ui/GitDiffViewer/common/FileHeader/FileHeader.js.map +1 -0
  19. package/dist/esm/ui/GitDiffViewer/common/FileHeader/index.js +4 -0
  20. package/dist/esm/ui/GitDiffViewer/common/FileHeader/index.js.map +1 -0
  21. package/dist/esm/ui/GitDiffViewer/common/FileHeader/types.js +2 -0
  22. package/dist/esm/ui/GitDiffViewer/common/FileHeader/types.js.map +1 -0
  23. package/dist/esm/ui/GitDiffViewer/common/index.js +3 -0
  24. package/dist/esm/ui/GitDiffViewer/common/index.js.map +1 -0
  25. package/dist/esm/ui/GitDiffViewer/hooks/index.js +2 -0
  26. package/dist/esm/ui/GitDiffViewer/hooks/index.js.map +1 -0
  27. package/dist/esm/ui/GitDiffViewer/hooks/useGitDiffViewer.js +11 -0
  28. package/dist/esm/ui/GitDiffViewer/hooks/useGitDiffViewer.js.map +1 -0
  29. package/dist/esm/ui/GitDiffViewer/index.js +9 -0
  30. package/dist/esm/ui/GitDiffViewer/index.js.map +1 -0
  31. package/dist/esm/ui/GitDiffViewer/styles.css +38 -0
  32. package/dist/esm/ui/GitDiffViewer/types.js +2 -0
  33. package/dist/esm/ui/{Button → GitDiffViewer}/types.js.map +1 -1
  34. package/dist/esm/ui/GitDiffViewer/utils/index.js +2 -0
  35. package/dist/esm/ui/GitDiffViewer/utils/index.js.map +1 -0
  36. package/dist/esm/ui/GitDiffViewer/utils/parseGitDiff.js +73 -0
  37. package/dist/esm/ui/GitDiffViewer/utils/parseGitDiff.js.map +1 -0
  38. package/dist/esm/ui/index.js +1 -1
  39. package/dist/esm/ui/index.js.map +1 -1
  40. package/dist/types/ui/GitDiffViewer/Context.d.ts +4 -0
  41. package/dist/types/ui/GitDiffViewer/Context.d.ts.map +1 -0
  42. package/dist/types/ui/GitDiffViewer/Provider.d.ts +5 -0
  43. package/dist/types/ui/GitDiffViewer/Provider.d.ts.map +1 -0
  44. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/CodeDiffViewer.d.ts +16 -0
  45. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/CodeDiffViewer.d.ts.map +1 -0
  46. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/DiffLine.d.ts +11 -0
  47. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/DiffLine.d.ts.map +1 -0
  48. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/index.d.ts +3 -0
  49. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/index.d.ts.map +1 -0
  50. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/types.d.ts +20 -0
  51. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/types.d.ts.map +1 -0
  52. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/index.d.ts +2 -0
  53. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/index.d.ts.map +1 -0
  54. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/index.d.ts +3 -0
  55. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/index.d.ts.map +1 -0
  56. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/types.d.ts +18 -0
  57. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/types.d.ts.map +1 -0
  58. package/dist/types/ui/GitDiffViewer/common/FileHeader/FileHeader.d.ts +15 -0
  59. package/dist/types/ui/GitDiffViewer/common/FileHeader/FileHeader.d.ts.map +1 -0
  60. package/dist/types/ui/GitDiffViewer/common/FileHeader/index.d.ts +3 -0
  61. package/dist/types/ui/GitDiffViewer/common/FileHeader/index.d.ts.map +1 -0
  62. package/dist/types/ui/GitDiffViewer/common/FileHeader/types.d.ts +17 -0
  63. package/dist/types/ui/GitDiffViewer/common/FileHeader/types.d.ts.map +1 -0
  64. package/dist/types/ui/GitDiffViewer/common/index.d.ts +3 -0
  65. package/dist/types/ui/GitDiffViewer/common/index.d.ts.map +1 -0
  66. package/dist/types/ui/GitDiffViewer/hooks/index.d.ts +2 -0
  67. package/dist/types/ui/GitDiffViewer/hooks/index.d.ts.map +1 -0
  68. package/dist/types/ui/GitDiffViewer/hooks/useGitDiffViewer.d.ts +3 -0
  69. package/dist/types/ui/GitDiffViewer/hooks/useGitDiffViewer.d.ts.map +1 -0
  70. package/dist/types/ui/GitDiffViewer/index.d.ts +6 -0
  71. package/dist/types/ui/GitDiffViewer/index.d.ts.map +1 -0
  72. package/dist/types/ui/GitDiffViewer/types.d.ts +77 -0
  73. package/dist/types/ui/GitDiffViewer/types.d.ts.map +1 -0
  74. package/dist/types/ui/GitDiffViewer/utils/index.d.ts +2 -0
  75. package/dist/types/ui/GitDiffViewer/utils/index.d.ts.map +1 -0
  76. package/dist/types/ui/GitDiffViewer/utils/parseGitDiff.d.ts +4 -0
  77. package/dist/types/ui/GitDiffViewer/utils/parseGitDiff.d.ts.map +1 -0
  78. package/dist/types/ui/index.d.ts +1 -1
  79. package/dist/types/ui/index.d.ts.map +1 -1
  80. package/package.json +4 -2
  81. package/dist/esm/ui/Button/Button.js +0 -10
  82. package/dist/esm/ui/Button/Button.js.map +0 -1
  83. package/dist/esm/ui/Button/index.js +0 -2
  84. package/dist/esm/ui/Button/index.js.map +0 -1
  85. package/dist/esm/ui/Button/styles.css +0 -63
  86. package/dist/esm/ui/Chip/Chip.css +0 -79
  87. package/dist/esm/ui/Chip/Chip.js +0 -15
  88. package/dist/esm/ui/Chip/Chip.js.map +0 -1
  89. package/dist/esm/ui/Chip/index.js +0 -4
  90. package/dist/esm/ui/Chip/index.js.map +0 -1
  91. package/dist/esm/ui/Chip/types.js.map +0 -1
  92. package/dist/types/ui/Button/Button.d.ts +0 -6
  93. package/dist/types/ui/Button/Button.d.ts.map +0 -1
  94. package/dist/types/ui/Button/index.d.ts +0 -3
  95. package/dist/types/ui/Button/index.d.ts.map +0 -1
  96. package/dist/types/ui/Button/types.d.ts +0 -15
  97. package/dist/types/ui/Button/types.d.ts.map +0 -1
  98. package/dist/types/ui/Chip/Chip.d.ts +0 -10
  99. package/dist/types/ui/Chip/Chip.d.ts.map +0 -1
  100. package/dist/types/ui/Chip/index.d.ts +0 -3
  101. package/dist/types/ui/Chip/index.d.ts.map +0 -1
  102. package/dist/types/ui/Chip/types.d.ts +0 -27
  103. package/dist/types/ui/Chip/types.d.ts.map +0 -1
  104. /package/dist/esm/ui/{Button → GitDiffViewer/common/CodeDiffViewer/common/DiffLine}/types.js +0 -0
  105. /package/dist/esm/ui/{Chip → GitDiffViewer/common/CodeDiffViewer}/types.js +0 -0
@@ -0,0 +1,4 @@
1
+ import { createContext } from "react";
2
+ const GitDiffViewerContext = createContext(null);
3
+ export default GitDiffViewerContext;
4
+ //# sourceMappingURL=Context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Context.js","sourceRoot":"","sources":["../../../../src/ui/GitDiffViewer/Context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,MAAM,oBAAoB,GAAG,aAAa,CAAwB,IAAI,CAAC,CAAC;AAExE,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useCallback, useState } from "react";
3
+ import Context from "./Context.js";
4
+ import "./styles.css";
5
+ const componentCssClassName = "ds git-diff-viewer";
6
+ const Provider = ({ id, className, style, children, ...contextOptions }) => {
7
+ const [addCommentEnabled, setAddCommentEnabled] = useState(false);
8
+ const [addCommentOpenLocations, setAddCommentOpenLocations] = useState(new Set());
9
+ const toggleAddCommentLocation = useCallback((lineNumber) => {
10
+ if (!addCommentEnabled) {
11
+ return;
12
+ }
13
+ const newSet = new Set(addCommentOpenLocations);
14
+ if (newSet.has(lineNumber)) {
15
+ newSet.delete(lineNumber);
16
+ }
17
+ else {
18
+ newSet.add(lineNumber);
19
+ }
20
+ setAddCommentOpenLocations(newSet);
21
+ }, [addCommentOpenLocations, addCommentEnabled]);
22
+ return (_jsx(Context.Provider, { value: {
23
+ ...contextOptions,
24
+ addCommentEnabled,
25
+ setAddCommentEnabled,
26
+ addCommentOpenLocations,
27
+ toggleAddCommentLocation,
28
+ }, children: _jsx("div", { id: id, style: style, className: [componentCssClassName, className].filter(Boolean).join(" "), children: children }) }));
29
+ };
30
+ export default Provider;
31
+ //# sourceMappingURL=Provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../../src/ui/GitDiffViewer/Provider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,cAAc,CAAC;AAGtB,MAAM,qBAAqB,GAAG,oBAAoB,CAAC;AAEnD,MAAM,QAAQ,GAAG,CAAC,EAChB,EAAE,EACF,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,cAAc,EACD,EAAsB,EAAE;IACxC,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClE,MAAM,CAAC,uBAAuB,EAAE,0BAA0B,CAAC,GAAG,QAAQ,CAEpE,IAAI,GAAG,EAAE,CAAC,CAAC;IAEb,MAAM,wBAAwB,GAAG,WAAW,CAC1C,CAAC,UAAkB,EAAE,EAAE;QACrB,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,OAAO;QACT,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,uBAAuB,CAAC,CAAC;QAChD,IAAI,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;YAC3B,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC5B,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACzB,CAAC;QACD,0BAA0B,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC,EACD,CAAC,uBAAuB,EAAE,iBAAiB,CAAC,CAC7C,CAAC;IAEF,OAAO,CACL,KAAC,OAAO,CAAC,QAAQ,IACf,KAAK,EAAE;YACL,GAAG,cAAc;YACjB,iBAAiB;YACjB,oBAAoB;YACpB,uBAAuB;YACvB,wBAAwB;SACzB,YAED,cACE,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,YAEtE,QAAQ,GACL,GACW,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,119 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Fragment, useCallback, useEffect, useMemo, useRef } from "react";
3
+ import { useGitDiffViewer } from "../../hooks/index.js";
4
+ import { DiffLine } from "./common/index.js";
5
+ import "./styles.css";
6
+ // TODO: decide where to put this once we provide an external syntax highlighter option
7
+ import hljs from "highlight.js";
8
+ import "./HighlighTheme.css";
9
+ const componentCssClassName = "ds code-diff-viewer";
10
+ const tableWidthCSSVar = "--table-width";
11
+ /**
12
+ * Displays a diff in a table format with line numbers and syntax highlighting.
13
+ * With option to add comments to specific lines and interactive gutter for adding comments.
14
+ *
15
+ * @returns {React.ReactElement} - Rendered CodeDiffViewer
16
+ */
17
+ const CodeDiffViewer = ({ id, AddComment, className, style, }) => {
18
+ const { isCollapsed, diff, addCommentEnabled, setAddCommentEnabled, addCommentOpenLocations, toggleAddCommentLocation, lineDecorations, } = useGitDiffViewer();
19
+ const tableRef = useRef(null);
20
+ // TODO: temporary syntax highlighting
21
+ // replace with a proper syntax highlighter
22
+ // add support for option to have external syntax highlighter
23
+ const diffCodeLanguage = useMemo(() => {
24
+ const extension = diff?.newPath.split(".").pop();
25
+ const mapping = {
26
+ js: "javascript",
27
+ jsx: "javascript",
28
+ ts: "typescript",
29
+ tsx: "typescript",
30
+ css: "css",
31
+ scss: "scss",
32
+ html: "xml",
33
+ py: "python",
34
+ java: "java",
35
+ // Add more mappings as needed
36
+ };
37
+ return mapping[extension || ""] || "plaintext";
38
+ }, [diff?.newPath]);
39
+ const highlight = useCallback((code) => {
40
+ if (hljs.getLanguage(diffCodeLanguage)) {
41
+ return hljs.highlight(code, { language: diffCodeLanguage }).value;
42
+ }
43
+ return hljs.highlight(code, { language: "plaintext" }).value;
44
+ }, [diffCodeLanguage]);
45
+ const highlightedLines = useMemo(() => {
46
+ if (!diff)
47
+ return [];
48
+ return diff.hunks.map((hunk) => {
49
+ return hunk.lines.map((line) => {
50
+ return highlight(line.content);
51
+ });
52
+ });
53
+ }, [diff, highlight]);
54
+ /**
55
+ * Observe the table for size changes and update the CSS variable
56
+ */
57
+ useEffect(() => {
58
+ // SSR check
59
+ if (typeof ResizeObserver === "undefined")
60
+ return;
61
+ if (!tableRef.current)
62
+ return;
63
+ const resizeObserver = new ResizeObserver(() => {
64
+ if (!tableRef.current)
65
+ return;
66
+ const tableWidth = tableRef.current?.clientWidth ?? 0;
67
+ tableRef.current.style.cssText = `${tableWidthCSSVar}: ${tableWidth}px`;
68
+ });
69
+ // Observe the table for size changes
70
+ resizeObserver.observe(tableRef.current);
71
+ // Cleanup on unmount
72
+ return () => {
73
+ resizeObserver.disconnect();
74
+ };
75
+ }, []);
76
+ useEffect(() => {
77
+ if (AddComment && !addCommentEnabled) {
78
+ setAddCommentEnabled(true);
79
+ }
80
+ else if (!AddComment && addCommentEnabled) {
81
+ setAddCommentEnabled(false);
82
+ }
83
+ }, [AddComment, addCommentEnabled, setAddCommentEnabled]);
84
+ if (isCollapsed) {
85
+ return null;
86
+ }
87
+ return (_jsx("div", { id: id, style: style, className: [componentCssClassName, className].filter(Boolean).join(" "), children: diff.hunks.map((hunk, hunkIndex) => {
88
+ // We'll track the counters for old and new lines
89
+ // as we iterate through each hunk.
90
+ let oldLineCounter = hunk.oldStart;
91
+ let newLineCounter = hunk.newStart;
92
+ return (_jsx("div", { className: "diff-hunk", children: _jsx("table", { className: "diff-table", ref: tableRef, tabIndex: -1, children: _jsxs("tbody", { children: [_jsx(DiffLine, { type: "hunk", hunkHeader: hunk.header }), hunk.lines.map((line, lineIndex) => {
93
+ let lineNum1 = null;
94
+ let lineNum2 = null;
95
+ if (line.type === "remove") {
96
+ // Only the old line number advances
97
+ lineNum1 = oldLineCounter++;
98
+ }
99
+ else if (line.type === "add") {
100
+ // Only the new line number advances
101
+ lineNum2 = newLineCounter++;
102
+ }
103
+ else {
104
+ // context line => both lines advance
105
+ lineNum1 = oldLineCounter++;
106
+ lineNum2 = newLineCounter++;
107
+ }
108
+ const lineNumber = lineNum2 || lineNum1 || 0;
109
+ // For rendering, if lineNum1 or lineNum2 is null,
110
+ // you can display e.g. '+' or '-' or an empty cell.
111
+ return (_jsxs(Fragment, { children: [_jsx(DiffLine, { lineNum1: lineNum1, lineNum2: lineNum2, content: highlightedLines[hunkIndex][lineIndex], type: line.type }), lineNum2 && lineDecorations?.[lineNum2] && (_jsx("tr", { className: "line-decoration", children: _jsx("td", { className: "container", children: lineDecorations[lineNum2] }) })), lineNum2 &&
112
+ AddComment &&
113
+ addCommentOpenLocations.has(lineNum2) && (_jsx("tr", { className: "line-decoration", children: _jsx("td", { className: "container", children: _jsx(AddComment, { lineNumber: lineNumber, onClose: () => toggleAddCommentLocation(lineNumber) }) }) }))] }, `${diff.oldPath}-${hunkIndex}-${lineIndex}`));
114
+ })] }) }) }, `${diff.oldPath}-${hunkIndex}`));
115
+ }) }));
116
+ };
117
+ CodeDiffViewer.displayName = "GitDiffViewer.CodeDiff";
118
+ export default CodeDiffViewer;
119
+ //# sourceMappingURL=CodeDiffViewer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeDiffViewer.js","sourceRoot":"","sources":["../../../../../../src/ui/GitDiffViewer/common/CodeDiffViewer/CodeDiffViewer.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO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,GACF,IA/DA,GAAG,IAAI,CAAC,OAAO,IAAI,SAAS,EAAE,CAgElC,CACP,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,wBAAwB,CAAC;AAEtD,eAAe,cAAc,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useGitDiffViewer } from "../../../../hooks/index.js";
3
+ import "./styles.css";
4
+ const componentCssClassName = "ds diff-line";
5
+ /**
6
+ * Displays a single line of a diff as a table row with line numbers.
7
+ *
8
+ * @returns {React.ReactElement} - Rendered DiffLine
9
+ */
10
+ const DiffLine = ({ id, className, style, ...props }) => {
11
+ const { wrapLines, addCommentEnabled, toggleAddCommentLocation } = useGitDiffViewer();
12
+ const gutterIsInteractive = addCommentEnabled;
13
+ const typeClass = `diff-line-${props.type}`;
14
+ const lineNumber = props.type !== "hunk" ? Number(props.lineNum2 || props.lineNum1) : 0;
15
+ return (_jsxs("tr", { id: id, style: style, className: [
16
+ componentCssClassName,
17
+ typeClass,
18
+ gutterIsInteractive ? "interactive" : "",
19
+ className,
20
+ ]
21
+ .filter(Boolean)
22
+ .join(" "), children: [_jsx("td", { className: `diff-gutter ${wrapLines ? "wrap" : ""} ${props.type}`, tabIndex: gutterIsInteractive && props.type !== "hunk" ? 0 : undefined, onClick: () => toggleAddCommentLocation(lineNumber), onKeyUp: (e) => {
23
+ if (e.key === "Enter") {
24
+ toggleAddCommentLocation(lineNumber);
25
+ }
26
+ }, onKeyDown: undefined, children: props.type === "hunk" ? ("\u00A0") : (_jsxs("div", { className: "diff-line-numbers", children: [_jsx("span", { className: "line-num", children: props.lineNum1 ?? "+" }), _jsx("span", { className: "line-num", children: props.lineNum2 ?? "-" })] })) }), _jsx("td", { className: `diff-content ${wrapLines ? "wrap" : ""}`, children: props.type === "hunk" ? (_jsx("pre", { children: props.hunkHeader })) : (_jsx("pre", {
27
+ // biome-ignore lint/security/noDangerouslySetInnerHtml: syntax highlighting requires adding generated HTML
28
+ dangerouslySetInnerHTML: {
29
+ __html: props.content ? props.content : "\u00A0",
30
+ } })) })] }));
31
+ };
32
+ export default DiffLine;
33
+ //# sourceMappingURL=DiffLine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiffLine.js","sourceRoot":"","sources":["../../../../../../../../src/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/DiffLine.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,cAAc,CAAC;AAGtB,MAAM,qBAAqB,GAAG,cAAc,CAAC;AAE7C;;;;GAIG;AACH,MAAM,QAAQ,GAAG,CAAC,EAChB,EAAE,EACF,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACM,EAAsB,EAAE;IACtC,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,GAC9D,gBAAgB,EAAE,CAAC;IACrB,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;IAC9C,MAAM,SAAS,GAAG,aAAa,KAAK,CAAC,IAAI,EAAE,CAAC;IAE5C,MAAM,UAAU,GACd,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEvE,OAAO,CACL,cACE,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE;YACT,qBAAqB;YACrB,SAAS;YACT,mBAAmB,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE;YACxC,SAAS;SACV;aACE,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,aAEZ,aACE,SAAS,EAAE,eAAe,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,KAAK,CAAC,IAAI,EAAE,EACjE,QAAQ,EAAE,mBAAmB,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EACtE,OAAO,EAAE,GAAG,EAAE,CAAC,wBAAwB,CAAC,UAAU,CAAC,EACnD,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oBACb,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE,CAAC;wBACtB,wBAAwB,CAAC,UAAU,CAAC,CAAC;oBACvC,CAAC;gBACH,CAAC,EACD,SAAS,EAAE,SAAS,YAEnB,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CACvB,QAAQ,CACT,CAAC,CAAC,CAAC,CACF,eAAK,SAAS,EAAC,mBAAmB,aAChC,eAAM,SAAS,EAAC,UAAU,YAAE,KAAK,CAAC,QAAQ,IAAI,GAAG,GAAQ,EACzD,eAAM,SAAS,EAAC,UAAU,YAAE,KAAK,CAAC,QAAQ,IAAI,GAAG,GAAQ,IACrD,CACP,GACE,EACL,aAAI,SAAS,EAAE,gBAAgB,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,YACrD,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CACvB,wBAAM,KAAK,CAAC,UAAU,GAAO,CAC9B,CAAC,CAAC,CAAC,CACF;oBACE,2GAA2G;oBAC3G,uBAAuB,EAAE;wBACvB,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ;qBACjD,GACD,CACH,GACE,IACF,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,4 @@
1
+ /* @canonical/generator-canonical-ds 0.0.1 */
2
+ export { default as DiffLine } from "./DiffLine.js";
3
+ export * from "./types.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/index.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,cAAc,YAAY,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../../src/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from "./DiffLine/index.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/ui/GitDiffViewer/common/CodeDiffViewer/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,4 @@
1
+ /* @canonical/generator-canonical-ds 0.0.1 */
2
+ export { default as CodeDiffViewer } from "./CodeDiffViewer.js";
3
+ export * from "./types.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ui/GitDiffViewer/common/CodeDiffViewer/index.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,cAAc,YAAY,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/ui/GitDiffViewer/common/CodeDiffViewer/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useCallback } from "react";
3
+ import { useGitDiffViewer } from "../../hooks/index.js";
4
+ import "./styles.css";
5
+ const componentCssClassName = "ds file-header";
6
+ /**
7
+ * Displays the file name and change count for a diff.
8
+ * With option to add custom elements to the left and right of the file header.
9
+ *
10
+ * @returns {React.ReactElement} - Rendered FileHeader
11
+ */
12
+ const FileHeader = ({ id, children, className, style, hideCollapse = false, showChangeCount, leftContent, rightContent, ...props }) => {
13
+ const { isCollapsed, onCollapseToggle, diff } = useGitDiffViewer();
14
+ const shouldRenderCollapse = !hideCollapse && isCollapsed !== undefined;
15
+ const calculateChangeCount = useCallback(() => {
16
+ let additions = 0;
17
+ let deletions = 0;
18
+ for (const hunk of diff.hunks) {
19
+ for (const line of hunk.lines) {
20
+ if (line.type === "add") {
21
+ additions++;
22
+ }
23
+ else if (line.type === "remove") {
24
+ deletions++;
25
+ }
26
+ }
27
+ }
28
+ return { additions, deletions };
29
+ }, [diff]);
30
+ const changesCount = calculateChangeCount();
31
+ return (_jsxs("div", { id: id, style: style, className: [componentCssClassName, className].filter(Boolean).join(" "), ...props, children: [_jsxs("div", { className: "left-content", children: [leftContent, shouldRenderCollapse && (_jsx("button", { className: `collapse-button ${isCollapsed ? "collapsed" : ""}`, onClick: () => onCollapseToggle(!isCollapsed), "aria-label": "Collapse file", type: "button", children: _jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "Collapse" }), _jsx("path", { d: "M11.811 8.124L5.62399 1.937L4.56299 2.997L9.68999 8.124L4.56299 13.25L5.62399 14.311L11.811 8.124Z", fill: "currentColor" })] }) })), _jsx("h5", { className: "file-name", children: diff.newPath })] }), _jsxs("div", { className: "right-content", children: [showChangeCount && (_jsx("div", { className: "change-count", children: diff.fileChangeState === "modified" ? (_jsxs(_Fragment, { children: [_jsxs("span", { className: "deletions", children: ["-", changesCount.deletions] }), _jsxs("span", { className: "insertions", children: ["+", changesCount.additions] })] })) : diff.fileChangeState === "added" ? (_jsx("span", { className: "insertions", children: "Added" })) : diff.fileChangeState === "deleted" ? (_jsx("span", { className: "deletions", children: "Removed" })) : (_jsx(_Fragment, {})) })), rightContent] }), children] }));
32
+ };
33
+ FileHeader.displayName = "GitDiffViewer.FileHeader";
34
+ export default FileHeader;
35
+ //# sourceMappingURL=FileHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileHeader.js","sourceRoot":"","sources":["../../../../../../src/ui/GitDiffViewer/common/FileHeader/FileHeader.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,cAAc,CAAC;AAGtB,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAE/C;;;;;GAKG;AACH,MAAM,UAAU,GAAG,CAAC,EAClB,EAAE,EACF,QAAQ,EACR,SAAS,EACT,KAAK,EACL,YAAY,GAAG,KAAK,EACpB,eAAe,EACf,WAAW,EACX,YAAY,EACZ,GAAG,KAAK,EACQ,EAAsB,EAAE;IACxC,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,IAAI,EAAE,GAAG,gBAAgB,EAAE,CAAC;IACnE,MAAM,oBAAoB,GAAG,CAAC,YAAY,IAAI,WAAW,KAAK,SAAS,CAAC;IAExE,MAAM,oBAAoB,GAAG,WAAW,CAAC,GAAG,EAAE;QAC5C,IAAI,SAAS,GAAG,CAAC,CAAC;QAClB,IAAI,SAAS,GAAG,CAAC,CAAC;QAClB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAC9B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;gBAC9B,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;oBACxB,SAAS,EAAE,CAAC;gBACd,CAAC;qBAAM,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;oBAClC,SAAS,EAAE,CAAC;gBACd,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,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CAAC,IAAI,CAAC,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,CACvC,eAAM,SAAS,EAAC,WAAW,wBAAe,CAC3C,CAAC,CAAC,CAAC,CACF,mBAAK,CACN,GACG,CACP,EACA,YAAY,IACT,EACL,QAAQ,IACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,UAAU,CAAC,WAAW,GAAG,0BAA0B,CAAC;AAEpD,eAAe,UAAU,CAAC"}
@@ -0,0 +1,4 @@
1
+ /* @canonical/generator-canonical-ds 0.0.1 */
2
+ export { default as FileHeader } from "./FileHeader.js";
3
+ export * from "./types.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ui/GitDiffViewer/common/FileHeader/index.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACxD,cAAc,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/ui/GitDiffViewer/common/FileHeader/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export * from "./CodeDiffViewer/index.js";
2
+ export * from "./FileHeader/index.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ui/GitDiffViewer/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as useGitDiffViewer } from "./useGitDiffViewer.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ui/GitDiffViewer/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { useContext } from "react";
2
+ import Context from "../Context.js";
3
+ const useGitDiffViewer = () => {
4
+ const context = useContext(Context);
5
+ if (!context) {
6
+ throw new Error("useGitDiffViewer must be used within a DiffViewerProvider or GitDiffViewer component");
7
+ }
8
+ return context;
9
+ };
10
+ export default useGitDiffViewer;
11
+ //# sourceMappingURL=useGitDiffViewer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGitDiffViewer.js","sourceRoot":"","sources":["../../../../../src/ui/GitDiffViewer/hooks/useGitDiffViewer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IAC5B,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IACpC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,sFAAsF,CACvF,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /* @canonical/generator-canonical-ds 0.0.1 */
2
+ export * from "./hooks/index.js";
3
+ export * from "./utils/index.js";
4
+ import Provider from "./Provider.js";
5
+ import { CodeDiffViewer, FileHeader } from "./common/index.js";
6
+ export const GitDiffViewer = Provider;
7
+ GitDiffViewer.FileHeader = FileHeader;
8
+ GitDiffViewer.CodeDiffViewer = CodeDiffViewer;
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/GitDiffViewer/index.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,cAAc,kBAAkB,CAAC;AAEjC,cAAc,kBAAkB,CAAC;AAEjC,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/D,MAAM,CAAC,MAAM,aAAa,GAAG,QAAkC,CAAC;AAChE,aAAa,CAAC,UAAU,GAAG,UAAU,CAAC;AACtC,aAAa,CAAC,cAAc,GAAG,cAAc,CAAC"}
@@ -0,0 +1,38 @@
1
+ /* GitDiffViewer.css */
2
+ .ds.git-diff-viewer {
3
+ --git-diff-viewer-code-default-background: #f7f7f7;
4
+ --git-diff-viewer-code-default-color: #636363;
5
+ --git-diff-viewer-code-insertion-background: #dff1e2;
6
+ --git-diff-viewer-code-insertion-color: #8cd297;
7
+ --git-diff-viewer-code-deletion-background: #f8e8ea;
8
+ --git-diff-viewer-code-deletion-color: #fba1aa;
9
+
10
+ --git-diff-viewer-border-color: rgba(0, 0, 0, 0.2);
11
+ --git-diff-viewer-border-color-tinted: rgba(0, 0, 0, 0.1);
12
+
13
+ --git-diff-viewer-gutter-width: 7.5em;
14
+ --git-diff-viewer-hunk-header-background: #ffffff;
15
+ --git-diff-viewer-hunk-header-color: rgba(0, 0, 0, 0.6);
16
+
17
+ --git-diff-file-header-horizontal-padding: 1em;
18
+ --git-diff-file-header-vertical-padding: 0.4em;
19
+ --git-diff-file-header-background-color: #ebebeb;
20
+ --git-diff-file-header-items-gap: 0.5em;
21
+
22
+ --git-diff-file-header-button-background: transparent;
23
+ --git-diff-file-header-button-hover-background: rgba(0, 0, 0, 0.1);
24
+ --git-diff-file-header-button-focus-background: rgba(0, 0, 0, 0.1);
25
+
26
+ --git-diff-file-header-insertion-background: rgba(10, 189, 37, 0.1);
27
+ --git-diff-file-header-insertion-color: var(
28
+ --git-diff-viewer-code-insertion-color,
29
+ #8cd297
30
+ );
31
+ --git-diff-file-header-deletion-background: rgba(255, 102, 120, 0.1);
32
+ --git-diff-file-header-deletion-color: var(
33
+ --git-diff-viewer-code-deletion-color,
34
+ #fba1aa
35
+ );
36
+
37
+ border: 1px solid var(--git-diff-viewer-border-color);
38
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/ui/Button/types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/ui/GitDiffViewer/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { default as parseGitDiff } from "./parseGitDiff.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ui/GitDiffViewer/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,73 @@
1
+ function parseGitDiff(diffText) {
2
+ const lines = diffText.split("\n");
3
+ const files = [];
4
+ let currentFile = null;
5
+ let currentHunk = null;
6
+ // Regular expressions to match file and hunk headers
7
+ const fileRegex = /^diff --git a\/(.+) b\/(.+)$/;
8
+ const hunkRegex = /^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@/;
9
+ const oldFileRegex = /^--- (.+)$/;
10
+ const newFileRegex = /^\+\+\+ (.+)$/;
11
+ for (const line of lines) {
12
+ const fileMatch = line.match(fileRegex);
13
+ if (fileMatch) {
14
+ // New file diff start
15
+ if (currentFile)
16
+ files.push(currentFile);
17
+ currentFile = {
18
+ oldPath: fileMatch[1],
19
+ newPath: fileMatch[2],
20
+ fileChangeState: "none",
21
+ hunks: [],
22
+ };
23
+ currentHunk = null;
24
+ continue;
25
+ }
26
+ if (!currentFile)
27
+ continue; // Skip lines until first file header
28
+ const oldFileMatch = line.match(oldFileRegex);
29
+ const newFileMatch = line.match(newFileRegex);
30
+ if (oldFileMatch || newFileMatch) {
31
+ // Determine file change state based on the old/new file indicators
32
+ if (oldFileMatch?.[0].includes("/dev/null")) {
33
+ currentFile.fileChangeState = "added"; // File is new
34
+ }
35
+ else if (newFileMatch?.[0].includes("/dev/null")) {
36
+ currentFile.fileChangeState = "deleted"; // File is deleted
37
+ }
38
+ else if (currentFile.fileChangeState === "none") {
39
+ currentFile.fileChangeState = "modified"; // Assume file is modified
40
+ }
41
+ continue;
42
+ }
43
+ const hunkMatch = line.match(hunkRegex);
44
+ if (hunkMatch && currentFile) {
45
+ // New hunk start
46
+ currentHunk = {
47
+ header: line,
48
+ oldStart: Number.parseInt(hunkMatch[1], 10),
49
+ oldLines: hunkMatch[2] ? Number.parseInt(hunkMatch[2], 10) : 1,
50
+ newStart: Number.parseInt(hunkMatch[3], 10),
51
+ newLines: hunkMatch[4] ? Number.parseInt(hunkMatch[4], 10) : 1,
52
+ lines: [],
53
+ };
54
+ currentFile.hunks.push(currentHunk);
55
+ continue;
56
+ }
57
+ if (currentHunk && currentFile) {
58
+ // Determine line type and content
59
+ const type = line.startsWith("+")
60
+ ? "add"
61
+ : line.startsWith("-")
62
+ ? "remove"
63
+ : "context";
64
+ const content = line.slice(1); // Remove the leading +, - or space
65
+ currentHunk.lines.push({ type, content });
66
+ }
67
+ }
68
+ if (currentFile)
69
+ files.push(currentFile);
70
+ return files;
71
+ }
72
+ export default parseGitDiff;
73
+ //# sourceMappingURL=parseGitDiff.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseGitDiff.js","sourceRoot":"","sources":["../../../../../src/ui/GitDiffViewer/utils/parseGitDiff.ts"],"names":[],"mappings":"AAEA,SAAS,YAAY,CAAC,QAAgB;IACpC,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,KAAK,GAAe,EAAE,CAAC;IAC7B,IAAI,WAAW,GAAoB,IAAI,CAAC;IACxC,IAAI,WAAW,GAAgB,IAAI,CAAC;IAEpC,qDAAqD;IACrD,MAAM,SAAS,GAAG,8BAA8B,CAAC;IACjD,MAAM,SAAS,GAAG,qCAAqC,CAAC;IACxD,MAA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AC,WAAW,CAAC,CAAC;IACzC,OAAO,KAAK,CAAC;AACf,CAAC;AAED,eAAe,YAAY,CAAC"}
@@ -1,2 +1,2 @@
1
- export { Button } from "./Button/index.js";
1
+ export * from "./GitDiffViewer/index.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAoB,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ContextOptions } from "./types.js";
2
+ declare const GitDiffViewerContext: import("react").Context<ContextOptions | null>;
3
+ export default GitDiffViewerContext;
4
+ //# sourceMappingURL=Context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/ui/GitDiffViewer/Context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,QAAA,MAAM,oBAAoB,gDAA6C,CAAC;AAExE,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import "./styles.css";
2
+ import type { ProviderOptions } from "./types.js";
3
+ declare const Provider: ({ id, className, style, children, ...contextOptions }: ProviderOptions) => React.ReactElement;
4
+ export default Provider;
5
+ //# sourceMappingURL=Provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../../src/ui/GitDiffViewer/Provider.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAIlD,QAAA,MAAM,QAAQ,0DAMX,eAAe,KAAG,KAAK,CAAC,YAyC1B,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type React from "react";
2
+ import "./styles.css";
3
+ import type { CodeDiffViewerProps } from "./types.js";
4
+ import "./HighlighTheme.css";
5
+ /**
6
+ * Displays a diff in a table format with line numbers and syntax highlighting.
7
+ * With option to add comments to specific lines and interactive gutter for adding comments.
8
+ *
9
+ * @returns {React.ReactElement} - Rendered CodeDiffViewer
10
+ */
11
+ declare const CodeDiffViewer: {
12
+ ({ id, AddComment, className, style, }: CodeDiffViewerProps): React.ReactElement | null;
13
+ displayName: string;
14
+ };
15
+ export default CodeDiffViewer;
16
+ //# sourceMappingURL=CodeDiffViewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeDiffViewer.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/GitDiffViewer/common/CodeDiffViewer/CodeDiffViewer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,qBAAqB,CAAC;AAM7B;;;;;GAKG;AACH,QAAA,MAAM,cAAc;4CAKjB,mBAAmB,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI;;CAyKjD,CAAC;AAIF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type React from "react";
2
+ import "./styles.css";
3
+ import type { DiffLineProps } from "./types.js";
4
+ /**
5
+ * Displays a single line of a diff as a table row with line numbers.
6
+ *
7
+ * @returns {React.ReactElement} - Rendered DiffLine
8
+ */
9
+ declare const DiffLine: ({ id, className, style, ...props }: DiffLineProps) => React.ReactElement;
10
+ export default DiffLine;
11
+ //# sourceMappingURL=DiffLine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiffLine.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/DiffLine.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAIhD;;;;GAIG;AACH,QAAA,MAAM,QAAQ,uCAKX,aAAa,KAAG,KAAK,CAAC,YAwDxB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as DiffLine } from "./DiffLine.js";
2
+ export * from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,cAAc,YAAY,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type React from "react";
2
+ export type DiffContentLine = {
3
+ type: "add" | "remove" | "context";
4
+ lineNum1: number | string | null;
5
+ lineNum2: number | string | null;
6
+ content: string;
7
+ };
8
+ export type DiffHunkLine = {
9
+ type: "hunk";
10
+ hunkHeader: string;
11
+ };
12
+ export type DiffLineProps = {
13
+ /** A unique identifier for the DiffLine */
14
+ id?: string;
15
+ /** Additional CSS classes */
16
+ className?: string;
17
+ /** Inline styles */
18
+ style?: React.CSSProperties;
19
+ } & (DiffContentLine | DiffHunkLine);
20
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;IACnC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,2CAA2C;IAC3C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,GAAG,CAAC,eAAe,GAAG,YAAY,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./DiffLine/index.js";
2
+ //# sourceMappingURL=index.d.ts.map