heartbeads 0.4.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 (205) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/app-build-manifest.json +49 -0
  3. package/.next/app-path-routes-manifest.json +1 -0
  4. package/.next/build-manifest.json +32 -0
  5. package/.next/export-marker.json +1 -0
  6. package/.next/images-manifest.json +1 -0
  7. package/.next/next-minimal-server.js.nft.json +1 -0
  8. package/.next/next-server.js.nft.json +1 -0
  9. package/.next/package.json +1 -0
  10. package/.next/prerender-manifest.json +1 -0
  11. package/.next/react-loadable-manifest.json +8 -0
  12. package/.next/required-server-files.json +1 -0
  13. package/.next/routes-manifest.json +1 -0
  14. package/.next/server/app/_not-found/page.js +1 -0
  15. package/.next/server/app/_not-found/page.js.nft.json +1 -0
  16. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
  17. package/.next/server/app/_not-found.html +1 -0
  18. package/.next/server/app/_not-found.meta +6 -0
  19. package/.next/server/app/_not-found.rsc +9 -0
  20. package/.next/server/app/api/auth/route.js +1 -0
  21. package/.next/server/app/api/auth/route.js.nft.json +1 -0
  22. package/.next/server/app/api/beads/route.js +8 -0
  23. package/.next/server/app/api/beads/route.js.nft.json +1 -0
  24. package/.next/server/app/api/beads/stream/route.js +10 -0
  25. package/.next/server/app/api/beads/stream/route.js.nft.json +1 -0
  26. package/.next/server/app/api/beads.body +1 -0
  27. package/.next/server/app/api/beads.meta +1 -0
  28. package/.next/server/app/api/config/route.js +8 -0
  29. package/.next/server/app/api/config/route.js.nft.json +1 -0
  30. package/.next/server/app/api/docs/page.js +120 -0
  31. package/.next/server/app/api/docs/page.js.nft.json +1 -0
  32. package/.next/server/app/api/docs/page_client-reference-manifest.js +1 -0
  33. package/.next/server/app/api/docs.html +120 -0
  34. package/.next/server/app/api/docs.meta +5 -0
  35. package/.next/server/app/api/docs.rsc +70 -0
  36. package/.next/server/app/api/login/route.js +1 -0
  37. package/.next/server/app/api/login/route.js.nft.json +1 -0
  38. package/.next/server/app/api/logout/route.js +1 -0
  39. package/.next/server/app/api/logout/route.js.nft.json +1 -0
  40. package/.next/server/app/api/oauth/callback/route.js +1 -0
  41. package/.next/server/app/api/oauth/callback/route.js.nft.json +1 -0
  42. package/.next/server/app/api/oauth/client-metadata.json/route.js +1 -0
  43. package/.next/server/app/api/oauth/client-metadata.json/route.js.nft.json +1 -0
  44. package/.next/server/app/api/oauth/jwks.json/route.js +1 -0
  45. package/.next/server/app/api/oauth/jwks.json/route.js.nft.json +1 -0
  46. package/.next/server/app/api/records/route.js +1 -0
  47. package/.next/server/app/api/records/route.js.nft.json +1 -0
  48. package/.next/server/app/api/status/route.js +1 -0
  49. package/.next/server/app/api/status/route.js.nft.json +1 -0
  50. package/.next/server/app/api/v1/graph/route.js +1 -0
  51. package/.next/server/app/api/v1/graph/route.js.nft.json +1 -0
  52. package/.next/server/app/api/v1/issues/[id]/route.js +1 -0
  53. package/.next/server/app/api/v1/issues/[id]/route.js.nft.json +1 -0
  54. package/.next/server/app/api/v1/ready/route.js +1 -0
  55. package/.next/server/app/api/v1/ready/route.js.nft.json +1 -0
  56. package/.next/server/app/index.html +1 -0
  57. package/.next/server/app/index.meta +5 -0
  58. package/.next/server/app/index.rsc +9 -0
  59. package/.next/server/app/login/page.js +1 -0
  60. package/.next/server/app/login/page.js.nft.json +1 -0
  61. package/.next/server/app/login/page_client-reference-manifest.js +1 -0
  62. package/.next/server/app/login.html +1 -0
  63. package/.next/server/app/login.meta +5 -0
  64. package/.next/server/app/login.rsc +9 -0
  65. package/.next/server/app/opengraph-image.png/route.js +1 -0
  66. package/.next/server/app/opengraph-image.png/route.js.nft.json +1 -0
  67. package/.next/server/app/opengraph-image.png.body +0 -0
  68. package/.next/server/app/opengraph-image.png.meta +1 -0
  69. package/.next/server/app/page.js +24 -0
  70. package/.next/server/app/page.js.nft.json +1 -0
  71. package/.next/server/app/page_client-reference-manifest.js +1 -0
  72. package/.next/server/app/twitter-image.png/route.js +1 -0
  73. package/.next/server/app/twitter-image.png/route.js.nft.json +1 -0
  74. package/.next/server/app/twitter-image.png.body +0 -0
  75. package/.next/server/app/twitter-image.png.meta +1 -0
  76. package/.next/server/app-paths-manifest.json +22 -0
  77. package/.next/server/chunks/247.js +12 -0
  78. package/.next/server/chunks/29.js +1 -0
  79. package/.next/server/chunks/343.js +1 -0
  80. package/.next/server/chunks/460.js +12 -0
  81. package/.next/server/chunks/533.js +38 -0
  82. package/.next/server/chunks/542.js +27 -0
  83. package/.next/server/chunks/590.js +6 -0
  84. package/.next/server/chunks/615.js +15 -0
  85. package/.next/server/chunks/696.js +25 -0
  86. package/.next/server/chunks/719.js +2 -0
  87. package/.next/server/chunks/739.js +1 -0
  88. package/.next/server/chunks/950.js +2 -0
  89. package/.next/server/chunks/font-manifest.json +1 -0
  90. package/.next/server/edge-runtime-webpack.js +2 -0
  91. package/.next/server/edge-runtime-webpack.js.map +1 -0
  92. package/.next/server/font-manifest.json +1 -0
  93. package/.next/server/functions-config-manifest.json +1 -0
  94. package/.next/server/interception-route-rewrite-manifest.js +1 -0
  95. package/.next/server/middleware-build-manifest.js +1 -0
  96. package/.next/server/middleware-manifest.json +32 -0
  97. package/.next/server/middleware-react-loadable-manifest.js +1 -0
  98. package/.next/server/middleware.js +14 -0
  99. package/.next/server/middleware.js.map +1 -0
  100. package/.next/server/next-font-manifest.js +1 -0
  101. package/.next/server/next-font-manifest.json +1 -0
  102. package/.next/server/pages/404.html +1 -0
  103. package/.next/server/pages/500.html +1 -0
  104. package/.next/server/pages/_app.js +1 -0
  105. package/.next/server/pages/_app.js.nft.json +1 -0
  106. package/.next/server/pages/_document.js +1 -0
  107. package/.next/server/pages/_document.js.nft.json +1 -0
  108. package/.next/server/pages/_error.js +1 -0
  109. package/.next/server/pages/_error.js.nft.json +1 -0
  110. package/.next/server/pages-manifest.json +1 -0
  111. package/.next/server/server-reference-manifest.js +1 -0
  112. package/.next/server/server-reference-manifest.json +1 -0
  113. package/.next/server/webpack-runtime.js +1 -0
  114. package/.next/static/chunks/149.a3e3a5dc03e21086.js +1 -0
  115. package/.next/static/chunks/2200cc46-7c93a0e00b0bb825.js +1 -0
  116. package/.next/static/chunks/788-aa413085174e935a.js +1 -0
  117. package/.next/static/chunks/945-3ff1d381a0af1ecd.js +2 -0
  118. package/.next/static/chunks/971-bb44d52bcd9ee2a9.js +1 -0
  119. package/.next/static/chunks/app/_not-found/page-200b7a7a6cfc29df.js +1 -0
  120. package/.next/static/chunks/app/api/docs/page-1dc18f40154cdce6.js +1 -0
  121. package/.next/static/chunks/app/layout-13e3cdaaa416edb6.js +1 -0
  122. package/.next/static/chunks/app/login/page-60d930d64f021753.js +1 -0
  123. package/.next/static/chunks/app/not-found-ae1139bed2018dd8.js +1 -0
  124. package/.next/static/chunks/app/page-583300dd8af66e5a.js +1 -0
  125. package/.next/static/chunks/framework-6e06c675866dc992.js +1 -0
  126. package/.next/static/chunks/main-app-8b0c4a1007dbb7f4.js +1 -0
  127. package/.next/static/chunks/main-e680fb049d7426e1.js +1 -0
  128. package/.next/static/chunks/pages/_app-0c3037849002a4aa.js +1 -0
  129. package/.next/static/chunks/pages/_error-a647cd2c75dc4dc7.js +1 -0
  130. package/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  131. package/.next/static/chunks/webpack-117444a4bfe51057.js +1 -0
  132. package/.next/static/css/8c1b520a38ba4ccd.css +3 -0
  133. package/.next/static/vFM69sDrBUf_9ULwPmVAE/_buildManifest.js +1 -0
  134. package/.next/static/vFM69sDrBUf_9ULwPmVAE/_ssgManifest.js +1 -0
  135. package/README.md +389 -0
  136. package/app/api/auth/route.ts +103 -0
  137. package/app/api/beads/route.ts +27 -0
  138. package/app/api/beads/stream/route.ts +83 -0
  139. package/app/api/config/route.ts +48 -0
  140. package/app/api/docs/page.tsx +497 -0
  141. package/app/api/login/route.ts +42 -0
  142. package/app/api/logout/route.ts +14 -0
  143. package/app/api/oauth/callback/route.ts +97 -0
  144. package/app/api/oauth/client-metadata.json/route.ts +33 -0
  145. package/app/api/oauth/jwks.json/route.ts +32 -0
  146. package/app/api/records/route.ts +168 -0
  147. package/app/api/status/route.ts +25 -0
  148. package/app/api/v1/graph/route.ts +251 -0
  149. package/app/api/v1/issues/[id]/route.ts +158 -0
  150. package/app/api/v1/ready/route.ts +229 -0
  151. package/app/globals.css +230 -0
  152. package/app/layout.tsx +51 -0
  153. package/app/login/page.tsx +164 -0
  154. package/app/not-found.tsx +91 -0
  155. package/app/opengraph-image.png +0 -0
  156. package/app/page.tsx +2041 -0
  157. package/app/twitter-image.png +0 -0
  158. package/bin/heartbeads.mjs +225 -0
  159. package/components/ActivityItem.tsx +326 -0
  160. package/components/ActivityOverlay.tsx +125 -0
  161. package/components/ActivityPanel.tsx +345 -0
  162. package/components/AllCommentsPanel.tsx +270 -0
  163. package/components/AuthButton.tsx +202 -0
  164. package/components/BeadTooltip.tsx +246 -0
  165. package/components/BeadsGraph.tsx +2493 -0
  166. package/components/BeadsLogo.tsx +94 -0
  167. package/components/CommentTooltip.tsx +338 -0
  168. package/components/ContextMenu.tsx +272 -0
  169. package/components/DescriptionModal.tsx +595 -0
  170. package/components/GraphStats.tsx +121 -0
  171. package/components/HeartIcon.tsx +33 -0
  172. package/components/HelpPanel.tsx +339 -0
  173. package/components/MobileActionSheet.tsx +255 -0
  174. package/components/NodeDetail.tsx +793 -0
  175. package/components/SettingsModal.tsx +315 -0
  176. package/components/StatusLegend.tsx +99 -0
  177. package/components/TimelineBar.tsx +116 -0
  178. package/components/TutorialOverlay.tsx +235 -0
  179. package/hooks/useBeadsComments.ts +81 -0
  180. package/hooks/useIsMobile.ts +19 -0
  181. package/lib/activity.ts +377 -0
  182. package/lib/agent.ts +29 -0
  183. package/lib/api-helpers.ts +46 -0
  184. package/lib/auth/client.ts +221 -0
  185. package/lib/auth.tsx +159 -0
  186. package/lib/comments.ts +413 -0
  187. package/lib/diff-beads.ts +128 -0
  188. package/lib/discover.ts +228 -0
  189. package/lib/env.ts +33 -0
  190. package/lib/gate.ts +55 -0
  191. package/lib/parse-beads.ts +234 -0
  192. package/lib/session.ts +52 -0
  193. package/lib/settings.ts +42 -0
  194. package/lib/timeline.ts +138 -0
  195. package/lib/tts.ts +397 -0
  196. package/lib/types.ts +271 -0
  197. package/lib/utils.ts +48 -0
  198. package/lib/watch-beads.ts +97 -0
  199. package/next.config.mjs +4 -0
  200. package/package.json +81 -0
  201. package/postcss.config.mjs +9 -0
  202. package/public/image.png +0 -0
  203. package/scripts/generate-jwk.js +38 -0
  204. package/tailwind.config.ts +41 -0
  205. package/tsconfig.json +24 -0
@@ -0,0 +1,255 @@
1
+ "use client";
2
+
3
+ import { useEffect } from "react";
4
+ import type { GraphNode } from "@/lib/types";
5
+
6
+ interface MobileActionSheetProps {
7
+ node: GraphNode;
8
+ onShowDescription?: () => void;
9
+ onAddComment: () => void;
10
+ onClaimTask?: () => void;
11
+ onUnclaimTask?: () => void;
12
+ onCollapseEpic?: () => void;
13
+ onUncollapseEpic?: () => void;
14
+ onFocusEpic?: () => void;
15
+ onExitFocusEpic?: () => void;
16
+ onClose: () => void;
17
+ }
18
+
19
+ export function MobileActionSheet({
20
+ node,
21
+ onShowDescription,
22
+ onAddComment,
23
+ onClaimTask,
24
+ onUnclaimTask,
25
+ onCollapseEpic,
26
+ onUncollapseEpic,
27
+ onFocusEpic,
28
+ onExitFocusEpic,
29
+ onClose,
30
+ }: MobileActionSheetProps) {
31
+ // Escape key dismissal
32
+ useEffect(() => {
33
+ const handler = (e: KeyboardEvent) => {
34
+ if (e.key === "Escape") onClose();
35
+ };
36
+ window.addEventListener("keydown", handler);
37
+ return () => window.removeEventListener("keydown", handler);
38
+ }, [onClose]);
39
+
40
+ return (
41
+ <>
42
+ {/* Backdrop */}
43
+ <div
44
+ className="fixed inset-0 z-[99] bg-black/30"
45
+ onClick={onClose}
46
+ />
47
+
48
+ {/* Action sheet */}
49
+ <div className="fixed inset-x-0 bottom-0 z-[100] bg-white rounded-t-2xl shadow-2xl max-h-[70vh] overflow-y-auto animate-slide-up-sheet">
50
+ {/* Drag handle */}
51
+ <div className="w-10 h-1 bg-zinc-300 rounded-full mx-auto mt-3 mb-2" />
52
+
53
+ {/* Node info header */}
54
+ <div className="px-5 py-3 border-b border-zinc-100">
55
+ <div className="flex items-center gap-2">
56
+ <span className="text-[11px] font-mono text-zinc-400">{node.id}</span>
57
+ </div>
58
+ <div className="text-sm font-medium text-zinc-700 truncate mt-0.5">
59
+ {node.title}
60
+ </div>
61
+ </div>
62
+
63
+ {/* Actions */}
64
+ <div className="py-1">
65
+ {onShowDescription && (
66
+ <button
67
+ onClick={onShowDescription}
68
+ className="w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-zinc-700 active:bg-zinc-50 transition-colors"
69
+ >
70
+ <svg
71
+ className="w-4 h-4 text-zinc-400"
72
+ fill="none"
73
+ viewBox="0 0 24 24"
74
+ strokeWidth={1.5}
75
+ stroke="currentColor"
76
+ >
77
+ <path
78
+ strokeLinecap="round"
79
+ strokeLinejoin="round"
80
+ d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"
81
+ />
82
+ </svg>
83
+ Show description
84
+ </button>
85
+ )}
86
+
87
+ <button
88
+ onClick={onAddComment}
89
+ className="w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-zinc-700 active:bg-zinc-50 transition-colors"
90
+ >
91
+ <svg
92
+ className="w-4 h-4 text-zinc-400"
93
+ fill="none"
94
+ viewBox="0 0 24 24"
95
+ strokeWidth={1.5}
96
+ stroke="currentColor"
97
+ >
98
+ <path
99
+ strokeLinecap="round"
100
+ strokeLinejoin="round"
101
+ d="M12 20.25c4.97 0 9-3.694 9-8.25s-4.03-8.25-9-8.25S3 7.444 3 12c0 2.104.859 4.023 2.273 5.48.432.447.74 1.04.586 1.641a4.483 4.483 0 01-.923 1.785A5.969 5.969 0 006 21c1.282 0 2.47-.402 3.445-1.087.81.22 1.668.337 2.555.337z"
102
+ />
103
+ </svg>
104
+ Add comment
105
+ </button>
106
+
107
+ {onClaimTask && (
108
+ <button
109
+ onClick={onClaimTask}
110
+ className="w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-zinc-700 active:bg-zinc-50 transition-colors"
111
+ >
112
+ <svg
113
+ className="w-4 h-4 text-zinc-400"
114
+ fill="none"
115
+ viewBox="0 0 24 24"
116
+ strokeWidth={1.5}
117
+ stroke="currentColor"
118
+ >
119
+ <path
120
+ strokeLinecap="round"
121
+ strokeLinejoin="round"
122
+ d="M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"
123
+ />
124
+ </svg>
125
+ Claim task
126
+ </button>
127
+ )}
128
+
129
+ {onUnclaimTask && (
130
+ <button
131
+ onClick={onUnclaimTask}
132
+ className="w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-red-500 active:bg-red-50 transition-colors"
133
+ >
134
+ <svg
135
+ className="w-4 h-4 text-red-400"
136
+ fill="none"
137
+ viewBox="0 0 24 24"
138
+ strokeWidth={1.5}
139
+ stroke="currentColor"
140
+ >
141
+ <path
142
+ strokeLinecap="round"
143
+ strokeLinejoin="round"
144
+ d="M22 10.5h-6m-2.25-4.125a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zM4 19.235v-.11a6.375 6.375 0 0112.75 0v.109A12.318 12.318 0 0110.374 21c-2.331 0-4.512-.645-6.374-1.766z"
145
+ />
146
+ </svg>
147
+ Unclaim task
148
+ </button>
149
+ )}
150
+
151
+ {onCollapseEpic && (
152
+ <button
153
+ onClick={onCollapseEpic}
154
+ className="w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-zinc-700 active:bg-zinc-50 transition-colors"
155
+ >
156
+ <svg
157
+ className="w-4 h-4 text-zinc-400"
158
+ fill="none"
159
+ viewBox="0 0 24 24"
160
+ strokeWidth={1.5}
161
+ stroke="currentColor"
162
+ >
163
+ <path
164
+ strokeLinecap="round"
165
+ strokeLinejoin="round"
166
+ d="M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"
167
+ />
168
+ </svg>
169
+ Collapse epic
170
+ </button>
171
+ )}
172
+
173
+ {onUncollapseEpic && (
174
+ <button
175
+ onClick={onUncollapseEpic}
176
+ className="w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-zinc-700 active:bg-zinc-50 transition-colors"
177
+ >
178
+ <svg
179
+ className="w-4 h-4 text-zinc-400"
180
+ fill="none"
181
+ viewBox="0 0 24 24"
182
+ strokeWidth={1.5}
183
+ stroke="currentColor"
184
+ >
185
+ <path
186
+ strokeLinecap="round"
187
+ strokeLinejoin="round"
188
+ d="M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"
189
+ />
190
+ </svg>
191
+ Uncollapse epic
192
+ </button>
193
+ )}
194
+
195
+ {onFocusEpic && (
196
+ <button
197
+ onClick={onFocusEpic}
198
+ className="w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-zinc-700 active:bg-zinc-50 transition-colors"
199
+ >
200
+ <svg
201
+ className="w-4 h-4 text-zinc-400"
202
+ fill="none"
203
+ viewBox="0 0 24 24"
204
+ strokeWidth={1.5}
205
+ stroke="currentColor"
206
+ >
207
+ <path
208
+ strokeLinecap="round"
209
+ strokeLinejoin="round"
210
+ d="M7.5 3.75H6A2.25 2.25 0 003.75 6v1.5M16.5 3.75H18A2.25 2.25 0 0120.25 6v1.5M16.5 20.25H18A2.25 2.25 0 0020.25 18v-1.5M7.5 20.25H6A2.25 2.25 0 013.75 18v-1.5"
211
+ />
212
+ </svg>
213
+ Focus on epic
214
+ </button>
215
+ )}
216
+
217
+ {onExitFocusEpic && (
218
+ <button
219
+ onClick={onExitFocusEpic}
220
+ className="w-full flex items-center gap-3 px-5 py-4 text-sm font-medium text-emerald-600 active:bg-emerald-50 transition-colors"
221
+ >
222
+ <svg
223
+ className="w-4 h-4 text-emerald-500"
224
+ fill="none"
225
+ viewBox="0 0 24 24"
226
+ strokeWidth={1.5}
227
+ stroke="currentColor"
228
+ >
229
+ <path
230
+ strokeLinecap="round"
231
+ strokeLinejoin="round"
232
+ d="M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"
233
+ />
234
+ </svg>
235
+ Show full graph
236
+ </button>
237
+ )}
238
+ </div>
239
+
240
+ {/* Cancel button */}
241
+ <div className="border-t border-zinc-100">
242
+ <button
243
+ onClick={onClose}
244
+ className="w-full py-4 text-sm font-medium text-zinc-400 active:bg-zinc-50 transition-colors"
245
+ >
246
+ Cancel
247
+ </button>
248
+ </div>
249
+
250
+ {/* Safe area padding for phones with home indicator */}
251
+ <div className="h-[env(safe-area-inset-bottom)]" />
252
+ </div>
253
+ </>
254
+ );
255
+ }