@stoked-ui/github 0.0.0-a.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 (95) hide show
  1. package/CHANGELOG.md +15014 -0
  2. package/GithubCalendar/GithubCalendar.d.ts +7 -0
  3. package/GithubCalendar/GithubCalendar.js +330 -0
  4. package/GithubCalendar/index.d.ts +2 -0
  5. package/GithubCalendar/index.js +2 -0
  6. package/GithubCalendar/package.json +6 -0
  7. package/GithubEvents/EventTypes/CreateEvent.d.ts +7 -0
  8. package/GithubEvents/EventTypes/CreateEvent.js +72 -0
  9. package/GithubEvents/EventTypes/DeleteEvent.d.ts +7 -0
  10. package/GithubEvents/EventTypes/DeleteEvent.js +65 -0
  11. package/GithubEvents/EventTypes/ForkEvent.d.ts +7 -0
  12. package/GithubEvents/EventTypes/ForkEvent.js +77 -0
  13. package/GithubEvents/EventTypes/IssueCommentEvent.d.ts +7 -0
  14. package/GithubEvents/EventTypes/IssueCommentEvent.js +210 -0
  15. package/GithubEvents/EventTypes/IssuesEvent.d.ts +7 -0
  16. package/GithubEvents/EventTypes/IssuesEvent.js +97 -0
  17. package/GithubEvents/EventTypes/ProjectsV2ColumnEvent.d.ts +7 -0
  18. package/GithubEvents/EventTypes/ProjectsV2ColumnEvent.js +69 -0
  19. package/GithubEvents/EventTypes/ProjectsV2Event.d.ts +7 -0
  20. package/GithubEvents/EventTypes/ProjectsV2Event.js +74 -0
  21. package/GithubEvents/EventTypes/ProjectsV2FieldEvent.d.ts +7 -0
  22. package/GithubEvents/EventTypes/ProjectsV2FieldEvent.js +77 -0
  23. package/GithubEvents/EventTypes/ProjectsV2ItemEvent.d.ts +7 -0
  24. package/GithubEvents/EventTypes/ProjectsV2ItemEvent.js +79 -0
  25. package/GithubEvents/EventTypes/PullRequest/CommitsList.d.ts +17 -0
  26. package/GithubEvents/EventTypes/PullRequest/CommitsList.js +99 -0
  27. package/GithubEvents/EventTypes/PullRequest/FileChanges.d.ts +17 -0
  28. package/GithubEvents/EventTypes/PullRequest/FileChanges.js +182 -0
  29. package/GithubEvents/EventTypes/PullRequest/PullRequestEvent.d.ts +8 -0
  30. package/GithubEvents/EventTypes/PullRequest/PullRequestEvent.js +374 -0
  31. package/GithubEvents/EventTypes/PullRequest/PullRequestView.d.ts +29 -0
  32. package/GithubEvents/EventTypes/PullRequest/PullRequestView.js +132 -0
  33. package/GithubEvents/EventTypes/PushEvent.d.ts +7 -0
  34. package/GithubEvents/EventTypes/PushEvent.js +106 -0
  35. package/GithubEvents/GithubEvents.d.ts +49 -0
  36. package/GithubEvents/GithubEvents.js +1454 -0
  37. package/GithubEvents/index.d.ts +2 -0
  38. package/GithubEvents/index.js +2 -0
  39. package/GithubEvents/package.json +6 -0
  40. package/LICENSE +21 -0
  41. package/README.md +29 -0
  42. package/apiHandlers/getPullRequestDetails.d.ts +7 -0
  43. package/apiHandlers/getPullRequestDetails.js +120 -0
  44. package/apiHandlers/index.d.ts +1 -0
  45. package/apiHandlers/index.js +1 -0
  46. package/apiHandlers/package.json +6 -0
  47. package/index.d.ts +3 -0
  48. package/index.js +10 -0
  49. package/modern/GithubCalendar/GithubCalendar.js +330 -0
  50. package/modern/GithubCalendar/index.js +2 -0
  51. package/modern/GithubEvents/EventTypes/CreateEvent.js +72 -0
  52. package/modern/GithubEvents/EventTypes/DeleteEvent.js +65 -0
  53. package/modern/GithubEvents/EventTypes/ForkEvent.js +77 -0
  54. package/modern/GithubEvents/EventTypes/IssueCommentEvent.js +210 -0
  55. package/modern/GithubEvents/EventTypes/IssuesEvent.js +97 -0
  56. package/modern/GithubEvents/EventTypes/ProjectsV2ColumnEvent.js +69 -0
  57. package/modern/GithubEvents/EventTypes/ProjectsV2Event.js +74 -0
  58. package/modern/GithubEvents/EventTypes/ProjectsV2FieldEvent.js +77 -0
  59. package/modern/GithubEvents/EventTypes/ProjectsV2ItemEvent.js +79 -0
  60. package/modern/GithubEvents/EventTypes/PullRequest/CommitsList.js +99 -0
  61. package/modern/GithubEvents/EventTypes/PullRequest/FileChanges.js +182 -0
  62. package/modern/GithubEvents/EventTypes/PullRequest/PullRequestEvent.js +374 -0
  63. package/modern/GithubEvents/EventTypes/PullRequest/PullRequestView.js +132 -0
  64. package/modern/GithubEvents/EventTypes/PushEvent.js +106 -0
  65. package/modern/GithubEvents/GithubEvents.js +1454 -0
  66. package/modern/GithubEvents/index.js +2 -0
  67. package/modern/apiHandlers/getPullRequestDetails.js +120 -0
  68. package/modern/apiHandlers/index.js +1 -0
  69. package/modern/index.js +10 -0
  70. package/modern/types/github.js +1 -0
  71. package/node/GithubCalendar/GithubCalendar.js +337 -0
  72. package/node/GithubCalendar/index.js +9 -0
  73. package/node/GithubEvents/EventTypes/CreateEvent.js +80 -0
  74. package/node/GithubEvents/EventTypes/DeleteEvent.js +73 -0
  75. package/node/GithubEvents/EventTypes/ForkEvent.js +85 -0
  76. package/node/GithubEvents/EventTypes/IssueCommentEvent.js +218 -0
  77. package/node/GithubEvents/EventTypes/IssuesEvent.js +105 -0
  78. package/node/GithubEvents/EventTypes/ProjectsV2ColumnEvent.js +77 -0
  79. package/node/GithubEvents/EventTypes/ProjectsV2Event.js +82 -0
  80. package/node/GithubEvents/EventTypes/ProjectsV2FieldEvent.js +85 -0
  81. package/node/GithubEvents/EventTypes/ProjectsV2ItemEvent.js +87 -0
  82. package/node/GithubEvents/EventTypes/PullRequest/CommitsList.js +107 -0
  83. package/node/GithubEvents/EventTypes/PullRequest/FileChanges.js +188 -0
  84. package/node/GithubEvents/EventTypes/PullRequest/PullRequestEvent.js +381 -0
  85. package/node/GithubEvents/EventTypes/PullRequest/PullRequestView.js +138 -0
  86. package/node/GithubEvents/EventTypes/PushEvent.js +114 -0
  87. package/node/GithubEvents/GithubEvents.js +1463 -0
  88. package/node/GithubEvents/index.js +9 -0
  89. package/node/apiHandlers/getPullRequestDetails.js +127 -0
  90. package/node/apiHandlers/index.js +13 -0
  91. package/node/index.js +27 -0
  92. package/node/types/github.js +5 -0
  93. package/package.json +71 -0
  94. package/types/github.d.ts +107 -0
  95. package/types/github.js +1 -0
@@ -0,0 +1,210 @@
1
+ var _Typography, _Typography2;
2
+ import * as React from 'react';
3
+ import Box from '@mui/material/Box';
4
+ import Typography from '@mui/material/Typography';
5
+ import Link from '@mui/material/Link';
6
+ import Chip from '@mui/material/Chip';
7
+ import Avatar from '@mui/material/Avatar';
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ export default function IssueCommentEvent({
10
+ event
11
+ }) {
12
+ var _event$payload, _event$payload2, _issue$user, _issue$user2, _comment$user, _comment$user2, _event$payload3;
13
+ if (!(event != null && event.date)) {
14
+ return null;
15
+ }
16
+ const issue = (_event$payload = event.payload) == null ? void 0 : _event$payload.issue;
17
+ const comment = (_event$payload2 = event.payload) == null ? void 0 : _event$payload2.comment;
18
+ if (!issue || !comment) {
19
+ return null;
20
+ }
21
+
22
+ // Extract repository information
23
+ const repoFullName = event.repo;
24
+ const [repoOwner, repoName] = repoFullName.split('/');
25
+
26
+ // Extract issue information
27
+ const issueTitle = issue.title;
28
+ const issueUrl = issue.html_url;
29
+ const issueState = issue.state || 'unknown';
30
+ const issueNumber = issue.number;
31
+ const issueAuthor = (_issue$user = issue.user) == null ? void 0 : _issue$user.login;
32
+ const issueAuthorAvatar = (_issue$user2 = issue.user) == null ? void 0 : _issue$user2.avatar_url;
33
+
34
+ // Extract comment information
35
+ const commentUrl = comment.html_url;
36
+ const commentBody = comment.body;
37
+ const commentUser = ((_comment$user = comment.user) == null ? void 0 : _comment$user.login) || event.user;
38
+ const commentUserAvatar = ((_comment$user2 = comment.user) == null ? void 0 : _comment$user2.avatar_url) || event.avatarUrl;
39
+ const commentCreatedAt = comment.created_at || event.date;
40
+
41
+ // Get other comments if available
42
+ const otherComments = ((_event$payload3 = event.payload) == null ? void 0 : _event$payload3.comments) || [];
43
+ return /*#__PURE__*/_jsxs(Box, {
44
+ sx: {
45
+ p: '16px'
46
+ },
47
+ children: [/*#__PURE__*/_jsxs(Box, {
48
+ sx: {
49
+ display: 'flex',
50
+ alignItems: 'center',
51
+ gap: 1,
52
+ mb: 2
53
+ },
54
+ children: [/*#__PURE__*/_jsx(Typography, {
55
+ variant: "caption",
56
+ color: "text.secondary",
57
+ children: event.date
58
+ }), /*#__PURE__*/_jsx(Chip, {
59
+ label: `${repoOwner}/${repoName}`,
60
+ size: "small",
61
+ color: "primary",
62
+ variant: "outlined"
63
+ }), /*#__PURE__*/_jsx(Chip, {
64
+ label: `#${issueNumber}`,
65
+ size: "small",
66
+ color: "default"
67
+ }), /*#__PURE__*/_jsx(Chip, {
68
+ label: issueState,
69
+ size: "small",
70
+ color: issueState === 'open' ? 'success' : 'error'
71
+ })]
72
+ }), /*#__PURE__*/_jsx(Typography, {
73
+ variant: "h6",
74
+ component: "h3",
75
+ sx: {
76
+ mb: 1
77
+ },
78
+ children: /*#__PURE__*/_jsx(Link, {
79
+ href: issueUrl,
80
+ target: "_blank",
81
+ rel: "noopener noreferrer",
82
+ sx: {
83
+ textDecoration: 'none'
84
+ },
85
+ children: issueTitle
86
+ })
87
+ }), issueAuthor && /*#__PURE__*/_jsxs(Box, {
88
+ sx: {
89
+ display: 'flex',
90
+ alignItems: 'center',
91
+ gap: 1,
92
+ mb: 2
93
+ },
94
+ children: [_Typography || (_Typography = /*#__PURE__*/_jsx(Typography, {
95
+ variant: "body2",
96
+ color: "text.secondary",
97
+ children: "Issue by:"
98
+ })), /*#__PURE__*/_jsx(Avatar, {
99
+ src: issueAuthorAvatar,
100
+ alt: issueAuthor,
101
+ sx: {
102
+ width: 20,
103
+ height: 20
104
+ }
105
+ }), /*#__PURE__*/_jsx(Typography, {
106
+ variant: "body2",
107
+ children: issueAuthor
108
+ })]
109
+ }), /*#__PURE__*/_jsxs(Box, {
110
+ sx: {
111
+ display: 'flex',
112
+ alignItems: 'center',
113
+ gap: 1,
114
+ mb: 2
115
+ },
116
+ children: [/*#__PURE__*/_jsx(Avatar, {
117
+ src: commentUserAvatar,
118
+ alt: commentUser,
119
+ sx: {
120
+ width: 24,
121
+ height: 24
122
+ }
123
+ }), /*#__PURE__*/_jsx(Typography, {
124
+ variant: "body2",
125
+ children: commentUser
126
+ }), /*#__PURE__*/_jsxs(Typography, {
127
+ variant: "body2",
128
+ color: "text.secondary",
129
+ children: ["commented on ", new Date(commentCreatedAt).toLocaleString()]
130
+ })]
131
+ }), /*#__PURE__*/_jsxs(Box, {
132
+ sx: {
133
+ p: '16px',
134
+ backgroundColor: 'action.hover',
135
+ borderRadius: 1,
136
+ position: 'relative',
137
+ mb: 2
138
+ },
139
+ children: [/*#__PURE__*/_jsx(Typography, {
140
+ variant: "body2",
141
+ sx: {
142
+ whiteSpace: 'pre-wrap',
143
+ maxHeight: 200,
144
+ overflow: 'auto'
145
+ },
146
+ children: commentBody
147
+ }), /*#__PURE__*/_jsx(Box, {
148
+ sx: {
149
+ position: 'absolute',
150
+ top: 8,
151
+ right: 8
152
+ },
153
+ children: /*#__PURE__*/_jsx(Link, {
154
+ href: commentUrl,
155
+ target: "_blank",
156
+ rel: "noopener noreferrer",
157
+ sx: {
158
+ textDecoration: 'none',
159
+ fontSize: '0.75rem'
160
+ },
161
+ children: "View on GitHub"
162
+ })
163
+ })]
164
+ }), otherComments.length > 0 && /*#__PURE__*/_jsxs(Box, {
165
+ sx: {
166
+ mt: 2
167
+ },
168
+ children: [_Typography2 || (_Typography2 = /*#__PURE__*/_jsx(Typography, {
169
+ variant: "subtitle2",
170
+ gutterBottom: true,
171
+ children: "Other comments on this issue:"
172
+ })), otherComments.slice(0, 3).map(otherComment => {
173
+ var _otherComment$user, _otherComment$user2, _otherComment$user3, _otherComment$body, _otherComment$body2;
174
+ return /*#__PURE__*/_jsxs(Box, {
175
+ sx: {
176
+ display: 'flex',
177
+ alignItems: 'center',
178
+ gap: 1,
179
+ mb: 1
180
+ },
181
+ children: [/*#__PURE__*/_jsx(Avatar, {
182
+ src: (_otherComment$user = otherComment.user) == null ? void 0 : _otherComment$user.avatar_url,
183
+ alt: (_otherComment$user2 = otherComment.user) == null ? void 0 : _otherComment$user2.login,
184
+ sx: {
185
+ width: 20,
186
+ height: 20
187
+ }
188
+ }), /*#__PURE__*/_jsx(Typography, {
189
+ variant: "body2",
190
+ children: (_otherComment$user3 = otherComment.user) == null ? void 0 : _otherComment$user3.login
191
+ }), /*#__PURE__*/_jsxs(Typography, {
192
+ variant: "body2",
193
+ color: "text.secondary",
194
+ sx: {
195
+ flexGrow: 1,
196
+ overflow: 'hidden',
197
+ textOverflow: 'ellipsis',
198
+ whiteSpace: 'nowrap'
199
+ },
200
+ children: [(_otherComment$body = otherComment.body) == null ? void 0 : _otherComment$body.substring(0, 50), ((_otherComment$body2 = otherComment.body) == null ? void 0 : _otherComment$body2.length) > 50 ? '...' : '']
201
+ })]
202
+ }, otherComment.id);
203
+ }), otherComments.length > 3 && /*#__PURE__*/_jsxs(Typography, {
204
+ variant: "caption",
205
+ color: "text.secondary",
206
+ children: ["+", otherComments.length - 3, " more comments"]
207
+ })]
208
+ })]
209
+ });
210
+ }
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { EventDetails } from '../../types/github';
3
+ interface IssuesEventProps {
4
+ event: EventDetails;
5
+ }
6
+ export default function IssuesEvent({ event }: IssuesEventProps): React.JSX.Element | null;
7
+ export {};
@@ -0,0 +1,97 @@
1
+ import * as React from 'react';
2
+ import Box from '@mui/material/Box';
3
+ import Typography from '@mui/material/Typography';
4
+ import Link from '@mui/material/Link';
5
+ import Chip from '@mui/material/Chip';
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ export default function IssuesEvent({
8
+ event
9
+ }) {
10
+ var _event$payload, _event$payload2, _issue$user;
11
+ if (!(event != null && event.date)) {
12
+ return null;
13
+ }
14
+ const issue = (_event$payload = event.payload) == null ? void 0 : _event$payload.issue;
15
+ if (!issue) {
16
+ return null;
17
+ }
18
+ const issueTitle = issue.title || event.description;
19
+ const issueUrl = issue.html_url || event.url;
20
+ const issueState = issue.state || 'unknown';
21
+ const issueAction = ((_event$payload2 = event.payload) == null ? void 0 : _event$payload2.action) || 'unknown';
22
+ const issueNumber = issue.number || event.number;
23
+ const issueUser = ((_issue$user = issue.user) == null ? void 0 : _issue$user.login) || event.user;
24
+ const issueComments = issue.comments || event.comments;
25
+ const issueLabels = issue.labels || [];
26
+ return /*#__PURE__*/_jsxs(Box, {
27
+ sx: {
28
+ p: '16px'
29
+ },
30
+ children: [/*#__PURE__*/_jsxs(Box, {
31
+ sx: {
32
+ display: 'flex',
33
+ alignItems: 'center',
34
+ gap: 1,
35
+ mb: 2
36
+ },
37
+ children: [/*#__PURE__*/_jsx(Typography, {
38
+ variant: "caption",
39
+ color: "text.secondary",
40
+ children: event.date
41
+ }), /*#__PURE__*/_jsx(Chip, {
42
+ label: `#${issueNumber}`,
43
+ size: "small",
44
+ color: "default"
45
+ }), /*#__PURE__*/_jsx(Chip, {
46
+ label: issueState,
47
+ size: "small",
48
+ color: issueState === 'open' ? 'success' : 'error'
49
+ }), /*#__PURE__*/_jsx(Chip, {
50
+ label: `${issueComments} comment${issueComments !== 1 ? 's' : ''}`,
51
+ size: "small",
52
+ color: "default"
53
+ })]
54
+ }), /*#__PURE__*/_jsx(Typography, {
55
+ variant: "h6",
56
+ component: "h3",
57
+ sx: {
58
+ mb: 1
59
+ },
60
+ children: /*#__PURE__*/_jsx(Link, {
61
+ href: issueUrl,
62
+ target: "_blank",
63
+ rel: "noopener noreferrer",
64
+ sx: {
65
+ textDecoration: 'none'
66
+ },
67
+ children: issueTitle
68
+ })
69
+ }), /*#__PURE__*/_jsx(Box, {
70
+ sx: {
71
+ display: 'flex',
72
+ alignItems: 'center',
73
+ gap: 1,
74
+ mb: issueLabels.length > 0 ? 2 : 0
75
+ },
76
+ children: /*#__PURE__*/_jsxs(Typography, {
77
+ variant: "body2",
78
+ color: "text.secondary",
79
+ children: [issueAction, " by ", issueUser]
80
+ })
81
+ }), issueLabels.length > 0 && /*#__PURE__*/_jsx(Box, {
82
+ sx: {
83
+ display: 'flex',
84
+ flexWrap: 'wrap',
85
+ gap: 1
86
+ },
87
+ children: issueLabels.map(label => /*#__PURE__*/_jsx(Chip, {
88
+ label: label.name,
89
+ size: "small",
90
+ sx: {
91
+ backgroundColor: `#${label.color}`,
92
+ color: label.color === 'ffffff' ? 'text.primary' : '#fff'
93
+ }
94
+ }, label.name))
95
+ })]
96
+ });
97
+ }
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { EventDetails } from '../../types/github';
3
+ interface ProjectsV2ColumnEventProps {
4
+ event: EventDetails;
5
+ }
6
+ export default function ProjectsV2ColumnEvent({ event }: ProjectsV2ColumnEventProps): React.JSX.Element | null;
7
+ export {};
@@ -0,0 +1,69 @@
1
+ var _Chip;
2
+ import * as React from 'react';
3
+ import Box from '@mui/material/Box';
4
+ import Typography from '@mui/material/Typography';
5
+ import Chip from '@mui/material/Chip';
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ export default function ProjectsV2ColumnEvent({
8
+ event
9
+ }) {
10
+ var _event$payload, _event$payload2;
11
+ if (!(event != null && event.date)) {
12
+ return null;
13
+ }
14
+ const column = (_event$payload = event.payload) == null ? void 0 : _event$payload.projects_v2_column;
15
+ const action = (_event$payload2 = event.payload) == null ? void 0 : _event$payload2.action;
16
+ if (!column) {
17
+ return null;
18
+ }
19
+ const columnName = column.name || 'Untitled Column';
20
+ const projectNumber = column.project_number;
21
+ return /*#__PURE__*/_jsxs(Box, {
22
+ sx: {
23
+ p: '16px'
24
+ },
25
+ children: [/*#__PURE__*/_jsxs(Box, {
26
+ sx: {
27
+ display: 'flex',
28
+ alignItems: 'center',
29
+ gap: 1,
30
+ mb: 2
31
+ },
32
+ children: [/*#__PURE__*/_jsx(Typography, {
33
+ variant: "caption",
34
+ color: "text.secondary",
35
+ children: event.date
36
+ }), /*#__PURE__*/_jsx(Chip, {
37
+ label: `Project #${projectNumber}`,
38
+ size: "small",
39
+ color: "default"
40
+ }), _Chip || (_Chip = /*#__PURE__*/_jsx(Chip, {
41
+ label: "column",
42
+ size: "small",
43
+ color: "info"
44
+ })), /*#__PURE__*/_jsx(Chip, {
45
+ label: action,
46
+ size: "small",
47
+ color: action === 'created' ? 'success' : action === 'deleted' ? 'error' : 'primary'
48
+ })]
49
+ }), /*#__PURE__*/_jsx(Typography, {
50
+ variant: "h6",
51
+ component: "h3",
52
+ sx: {
53
+ mb: 1
54
+ },
55
+ children: columnName
56
+ }), /*#__PURE__*/_jsx(Box, {
57
+ sx: {
58
+ display: 'flex',
59
+ alignItems: 'center',
60
+ gap: 1
61
+ },
62
+ children: /*#__PURE__*/_jsxs(Typography, {
63
+ variant: "body2",
64
+ color: "text.secondary",
65
+ children: ["Column ", action, " in project #", projectNumber]
66
+ })
67
+ })]
68
+ });
69
+ }
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { EventDetails } from '../../types/github';
3
+ interface ProjectsV2EventProps {
4
+ event: EventDetails;
5
+ }
6
+ export default function ProjectsV2Event({ event }: ProjectsV2EventProps): React.JSX.Element | null;
7
+ export {};
@@ -0,0 +1,74 @@
1
+ import * as React from 'react';
2
+ import Box from '@mui/material/Box';
3
+ import Typography from '@mui/material/Typography';
4
+ import Link from '@mui/material/Link';
5
+ import Chip from '@mui/material/Chip';
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ export default function ProjectsV2Event({
8
+ event
9
+ }) {
10
+ var _event$payload, _event$payload2;
11
+ if (!(event != null && event.date)) {
12
+ return null;
13
+ }
14
+ const project = (_event$payload = event.payload) == null ? void 0 : _event$payload.projects_v2;
15
+ const action = (_event$payload2 = event.payload) == null ? void 0 : _event$payload2.action;
16
+ if (!project) {
17
+ return null;
18
+ }
19
+ const projectTitle = project.title || 'Untitled Project';
20
+ const projectUrl = project.html_url || `https://github.com/${event.repo}/projects`;
21
+ const projectNumber = project.number;
22
+ return /*#__PURE__*/_jsxs(Box, {
23
+ sx: {
24
+ p: '16px'
25
+ },
26
+ children: [/*#__PURE__*/_jsxs(Box, {
27
+ sx: {
28
+ display: 'flex',
29
+ alignItems: 'center',
30
+ gap: 1,
31
+ mb: 2
32
+ },
33
+ children: [/*#__PURE__*/_jsx(Typography, {
34
+ variant: "caption",
35
+ color: "text.secondary",
36
+ children: event.date
37
+ }), /*#__PURE__*/_jsx(Chip, {
38
+ label: `#${projectNumber}`,
39
+ size: "small",
40
+ color: "default"
41
+ }), /*#__PURE__*/_jsx(Chip, {
42
+ label: action,
43
+ size: "small",
44
+ color: action === 'created' ? 'success' : action === 'deleted' ? 'error' : 'primary'
45
+ })]
46
+ }), /*#__PURE__*/_jsx(Typography, {
47
+ variant: "h6",
48
+ component: "h3",
49
+ sx: {
50
+ mb: 1
51
+ },
52
+ children: /*#__PURE__*/_jsx(Link, {
53
+ href: projectUrl,
54
+ target: "_blank",
55
+ rel: "noopener noreferrer",
56
+ sx: {
57
+ textDecoration: 'none'
58
+ },
59
+ children: projectTitle
60
+ })
61
+ }), /*#__PURE__*/_jsx(Box, {
62
+ sx: {
63
+ display: 'flex',
64
+ alignItems: 'center',
65
+ gap: 1
66
+ },
67
+ children: /*#__PURE__*/_jsxs(Typography, {
68
+ variant: "body2",
69
+ color: "text.secondary",
70
+ children: ["Project ", action, " in ", event.repo]
71
+ })
72
+ })]
73
+ });
74
+ }
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { EventDetails } from '../../types/github';
3
+ interface ProjectsV2FieldEventProps {
4
+ event: EventDetails;
5
+ }
6
+ export default function ProjectsV2FieldEvent({ event }: ProjectsV2FieldEventProps): React.JSX.Element | null;
7
+ export {};
@@ -0,0 +1,77 @@
1
+ var _Chip;
2
+ import * as React from 'react';
3
+ import Box from '@mui/material/Box';
4
+ import Typography from '@mui/material/Typography';
5
+ import Chip from '@mui/material/Chip';
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ export default function ProjectsV2FieldEvent({
8
+ event
9
+ }) {
10
+ var _event$payload, _event$payload2;
11
+ if (!(event != null && event.date)) {
12
+ return null;
13
+ }
14
+ const field = (_event$payload = event.payload) == null ? void 0 : _event$payload.projects_v2_field;
15
+ const action = (_event$payload2 = event.payload) == null ? void 0 : _event$payload2.action;
16
+ if (!field) {
17
+ return null;
18
+ }
19
+ const fieldName = field.name || 'Untitled Field';
20
+ const projectNumber = field.project_number;
21
+ const fieldType = field.data_type || 'Unknown Type';
22
+ return /*#__PURE__*/_jsxs(Box, {
23
+ sx: {
24
+ p: '16px'
25
+ },
26
+ children: [/*#__PURE__*/_jsxs(Box, {
27
+ sx: {
28
+ display: 'flex',
29
+ alignItems: 'center',
30
+ gap: 1,
31
+ mb: 2
32
+ },
33
+ children: [/*#__PURE__*/_jsx(Typography, {
34
+ variant: "caption",
35
+ color: "text.secondary",
36
+ children: event.date
37
+ }), /*#__PURE__*/_jsx(Chip, {
38
+ label: `Project #${projectNumber}`,
39
+ size: "small",
40
+ color: "default"
41
+ }), _Chip || (_Chip = /*#__PURE__*/_jsx(Chip, {
42
+ label: "field",
43
+ size: "small",
44
+ color: "info"
45
+ })), /*#__PURE__*/_jsx(Chip, {
46
+ label: action,
47
+ size: "small",
48
+ color: action === 'created' ? 'success' : action === 'deleted' ? 'error' : 'primary'
49
+ })]
50
+ }), /*#__PURE__*/_jsx(Typography, {
51
+ variant: "h6",
52
+ component: "h3",
53
+ sx: {
54
+ mb: 1
55
+ },
56
+ children: fieldName
57
+ }), /*#__PURE__*/_jsx(Box, {
58
+ sx: {
59
+ display: 'flex',
60
+ alignItems: 'center',
61
+ gap: 1
62
+ },
63
+ children: /*#__PURE__*/_jsxs(Typography, {
64
+ variant: "body2",
65
+ color: "text.secondary",
66
+ children: ["Field type: ", fieldType]
67
+ })
68
+ }), /*#__PURE__*/_jsxs(Typography, {
69
+ variant: "body2",
70
+ color: "text.secondary",
71
+ sx: {
72
+ mt: 1
73
+ },
74
+ children: ["Field ", action, " in project #", projectNumber]
75
+ })]
76
+ });
77
+ }
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { EventDetails } from '../../types/github';
3
+ interface ProjectsV2ItemEventProps {
4
+ event: EventDetails;
5
+ }
6
+ export default function ProjectsV2ItemEvent({ event }: ProjectsV2ItemEventProps): React.JSX.Element | null;
7
+ export {};
@@ -0,0 +1,79 @@
1
+ import * as React from 'react';
2
+ import Box from '@mui/material/Box';
3
+ import Typography from '@mui/material/Typography';
4
+ import Link from '@mui/material/Link';
5
+ import Chip from '@mui/material/Chip';
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ export default function ProjectsV2ItemEvent({
8
+ event
9
+ }) {
10
+ var _event$payload, _event$payload2, _item$content_type;
11
+ if (!(event != null && event.date)) {
12
+ return null;
13
+ }
14
+ const item = (_event$payload = event.payload) == null ? void 0 : _event$payload.projects_v2_item;
15
+ const action = (_event$payload2 = event.payload) == null ? void 0 : _event$payload2.action;
16
+ if (!item) {
17
+ return null;
18
+ }
19
+ const itemTitle = item.title || 'Untitled Item';
20
+ const itemUrl = item.html_url;
21
+ const itemType = ((_item$content_type = item.content_type) == null ? void 0 : _item$content_type.toLowerCase()) || 'item';
22
+ const projectNumber = item.project_number;
23
+ return /*#__PURE__*/_jsxs(Box, {
24
+ sx: {
25
+ p: '16px'
26
+ },
27
+ children: [/*#__PURE__*/_jsxs(Box, {
28
+ sx: {
29
+ display: 'flex',
30
+ alignItems: 'center',
31
+ gap: 1,
32
+ mb: 2
33
+ },
34
+ children: [/*#__PURE__*/_jsx(Typography, {
35
+ variant: "caption",
36
+ color: "text.secondary",
37
+ children: event.date
38
+ }), /*#__PURE__*/_jsx(Chip, {
39
+ label: `Project #${projectNumber}`,
40
+ size: "small",
41
+ color: "default"
42
+ }), /*#__PURE__*/_jsx(Chip, {
43
+ label: itemType,
44
+ size: "small",
45
+ color: "info"
46
+ }), /*#__PURE__*/_jsx(Chip, {
47
+ label: action,
48
+ size: "small",
49
+ color: action === 'created' ? 'success' : action === 'deleted' ? 'error' : 'primary'
50
+ })]
51
+ }), /*#__PURE__*/_jsx(Typography, {
52
+ variant: "h6",
53
+ component: "h3",
54
+ sx: {
55
+ mb: 1
56
+ },
57
+ children: itemUrl ? /*#__PURE__*/_jsx(Link, {
58
+ href: itemUrl,
59
+ target: "_blank",
60
+ rel: "noopener noreferrer",
61
+ sx: {
62
+ textDecoration: 'none'
63
+ },
64
+ children: itemTitle
65
+ }) : itemTitle
66
+ }), /*#__PURE__*/_jsx(Box, {
67
+ sx: {
68
+ display: 'flex',
69
+ alignItems: 'center',
70
+ gap: 1
71
+ },
72
+ children: /*#__PURE__*/_jsxs(Typography, {
73
+ variant: "body2",
74
+ color: "text.secondary",
75
+ children: [itemType, " ", action, " in project #", projectNumber]
76
+ })
77
+ })]
78
+ });
79
+ }
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+ interface Commit {
3
+ id: string;
4
+ message: string;
5
+ author: {
6
+ name: string;
7
+ avatar: string;
8
+ };
9
+ date: string;
10
+ hash: string;
11
+ }
12
+ interface CommitsListProps {
13
+ commits: Commit[];
14
+ onCheckout?: (hash: string) => void;
15
+ }
16
+ export default function CommitsList({ commits, onCheckout }: CommitsListProps): React.JSX.Element;
17
+ export {};