@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,65 @@
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 DeleteEvent({
8
+ event
9
+ }) {
10
+ var _event$payload, _event$payload2;
11
+ if (!(event != null && event.date)) {
12
+ return null;
13
+ }
14
+ const refType = ((_event$payload = event.payload) == null ? void 0 : _event$payload.ref_type) || 'unknown';
15
+ const refName = ((_event$payload2 = event.payload) == null ? void 0 : _event$payload2.ref) || 'unknown';
16
+ const repoUrl = `https://github.com/${event.repo}`;
17
+ return /*#__PURE__*/_jsxs(Box, {
18
+ sx: {
19
+ p: '16px'
20
+ },
21
+ children: [/*#__PURE__*/_jsxs(Box, {
22
+ sx: {
23
+ display: 'flex',
24
+ alignItems: 'center',
25
+ gap: 1,
26
+ mb: 2
27
+ },
28
+ children: [/*#__PURE__*/_jsx(Typography, {
29
+ variant: "caption",
30
+ color: "text.secondary",
31
+ children: event.date
32
+ }), /*#__PURE__*/_jsx(Chip, {
33
+ label: refType,
34
+ size: "small",
35
+ color: "error"
36
+ })]
37
+ }), /*#__PURE__*/_jsx(Typography, {
38
+ variant: "h6",
39
+ component: "h3",
40
+ sx: {
41
+ mb: 1
42
+ },
43
+ children: /*#__PURE__*/_jsxs(Link, {
44
+ href: repoUrl,
45
+ target: "_blank",
46
+ rel: "noopener noreferrer",
47
+ sx: {
48
+ textDecoration: 'none'
49
+ },
50
+ children: ["Deleted ", refType, " ", refName]
51
+ })
52
+ }), /*#__PURE__*/_jsx(Box, {
53
+ sx: {
54
+ display: 'flex',
55
+ alignItems: 'center',
56
+ gap: 1
57
+ },
58
+ children: /*#__PURE__*/_jsxs(Typography, {
59
+ variant: "body2",
60
+ color: "text.secondary",
61
+ children: ["from ", event.repo]
62
+ })
63
+ })]
64
+ });
65
+ }
@@ -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 Link from '@mui/material/Link';
6
+ import Chip from '@mui/material/Chip';
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ export default function ForkEvent({
9
+ event
10
+ }) {
11
+ var _event$payload;
12
+ if (!(event != null && event.date)) {
13
+ return null;
14
+ }
15
+ const forkee = (_event$payload = event.payload) == null ? void 0 : _event$payload.forkee;
16
+ if (!forkee) {
17
+ return null;
18
+ }
19
+ const forkUrl = forkee.html_url;
20
+ const forkName = forkee.full_name;
21
+ const originalRepo = event.repo;
22
+ const description = forkee.description;
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
+ }), _Chip || (_Chip = /*#__PURE__*/_jsx(Chip, {
39
+ label: "fork",
40
+ size: "small",
41
+ color: "info"
42
+ }))]
43
+ }), /*#__PURE__*/_jsx(Typography, {
44
+ variant: "h6",
45
+ component: "h3",
46
+ sx: {
47
+ mb: 1
48
+ },
49
+ children: /*#__PURE__*/_jsx(Link, {
50
+ href: forkUrl,
51
+ target: "_blank",
52
+ rel: "noopener noreferrer",
53
+ sx: {
54
+ textDecoration: 'none'
55
+ },
56
+ children: forkName
57
+ })
58
+ }), description && /*#__PURE__*/_jsx(Typography, {
59
+ variant: "body2",
60
+ sx: {
61
+ mb: 2
62
+ },
63
+ children: description
64
+ }), /*#__PURE__*/_jsx(Box, {
65
+ sx: {
66
+ display: 'flex',
67
+ alignItems: 'center',
68
+ gap: 1
69
+ },
70
+ children: /*#__PURE__*/_jsxs(Typography, {
71
+ variant: "body2",
72
+ color: "text.secondary",
73
+ children: ["Forked from ", originalRepo]
74
+ })
75
+ })]
76
+ });
77
+ }
@@ -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,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,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,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,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
+ }