@the-portland-company/devnotes 0.1.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.
- package/README.md +91 -0
- package/bin/setup.js +100 -0
- package/dist/index.d.mts +261 -0
- package/dist/index.d.ts +261 -0
- package/dist/index.js +4514 -0
- package/dist/index.mjs +4521 -0
- package/dist/router-Bt8qbFfY.d.ts +49 -0
- package/dist/router-CPtxoMg5.d.mts +49 -0
- package/dist/server/express.d.mts +6 -0
- package/dist/server/express.d.ts +6 -0
- package/dist/server/express.js +130 -0
- package/dist/server/express.mjs +103 -0
- package/dist/server/next.d.mts +10 -0
- package/dist/server/next.d.ts +10 -0
- package/dist/server/next.js +138 -0
- package/dist/server/next.mjs +111 -0
- package/dist/styles.css +1 -0
- package/dist/types-xqGNcAbZ.d.mts +185 -0
- package/dist/types-xqGNcAbZ.d.ts +185 -0
- package/package.json +84 -0
- package/templates/DevNotesWrapper.tsx +47 -0
- package/templates/ExpressDevNotesProxy.ts +71 -0
- package/templates/NextDevNotesRoute.ts +76 -0
package/dist/styles.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.-right-2{right:-.5rem}.-top-1{top:-.25rem}.-top-2{top:-.5rem}.-top-\[9px\]{top:-9px}.bottom-3{bottom:.75rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-2\.5{left:.625rem}.left-3{left:.75rem}.left-\[10px\]{left:10px}.right-0{right:0}.right-2{right:.5rem}.top-1\/2{top:50%}.top-2\.5{top:.625rem}.top-\[calc\(100\%\+4px\)\]{top:calc(100% + 4px)}.top-\[calc\(100\%\+8px\)\]{top:calc(100% + 8px)}.top-full{top:100%}.z-20{z-index:20}.z-30{z-index:30}.z-\[2147483647\]{z-index:2147483647}.z-\[2\]{z-index:2}.z-\[9998\]{z-index:9998}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.ml-0\.5{margin-left:.125rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.h-px{height:1px}.max-h-\[200px\]{max-height:200px}.max-h-\[220px\]{max-height:220px}.max-h-\[350px\]{max-height:350px}.max-h-\[360px\]{max-height:360px}.max-h-\[calc\(100vh-32px\)\]{max-height:calc(100vh - 32px)}.min-h-\[120px\]{min-height:120px}.min-h-\[200px\]{min-height:200px}.min-h-\[220px\]{min-height:220px}.min-h-\[250px\]{min-height:250px}.min-h-\[40px\]{min-height:40px}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[280px\]{width:280px}.w-full{width:100%}.min-w-\[120px\]{min-width:120px}.min-w-\[16px\]{min-width:16px}.min-w-\[180px\]{min-width:180px}.min-w-\[18px\]{min-width:18px}.min-w-\[20px\]{min-width:20px}.min-w-\[220px\]{min-width:220px}.min-w-\[320px\]{min-width:320px}.max-w-2xl{max-width:42rem}.max-w-\[140px\]{max-width:140px}.max-w-\[280px\]{max-width:280px}.max-w-\[85\%\]{max-width:85%}.max-w-\[960px\]{max-width:960px}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x:-50%}.-translate-x-1\/2,.-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%}.translate-x-0\.5{--tw-translate-x:0.125rem}.translate-x-0\.5,.translate-x-4{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-4{--tw-translate-x:1rem}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.animate-\[slideIn_0\.2s_ease-out\]{animation:slideIn .2s ease-out}@keyframes devnotes-fade-up{0%{opacity:0;transform:translateY(6px)}20%{opacity:1;transform:translateY(0)}80%{opacity:1;transform:translateY(-6px)}to{opacity:0;transform:translateY(-12px)}}.animate-devnotes-fade-up{animation:devnotes-fade-up 1.2s ease-out}@keyframes devnotes-pulse{0%{box-shadow:0 0 0 0 rgba(229,62,62,.7)}70%{box-shadow:0 0 0 10px rgba(229,62,62,0)}to{box-shadow:0 0 0 0 rgba(229,62,62,0)}}.animate-devnotes-pulse{animation:devnotes-pulse 1s infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px*var(--tw-divide-y-reverse))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(243 244 246/var(--tw-divide-opacity,1))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-\[3px\]{border-width:3px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-gray-800{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity,1))}.border-green-300{--tw-border-opacity:1;border-color:rgb(134 239 172/var(--tw-border-opacity,1))}.border-purple-200{--tw-border-opacity:1;border-color:rgb(233 213 255/var(--tw-border-opacity,1))}.border-purple-300{--tw-border-opacity:1;border-color:rgb(216 180 254/var(--tw-border-opacity,1))}.border-purple-500{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity,1))}.border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.border-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity,1))}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1))}.border-white\/30{border-color:hsla(0,0%,100%,.3)}.border-yellow-300{--tw-border-opacity:1;border-color:rgb(253 224 71/var(--tw-border-opacity,1))}.border-t-blue-500{--tw-border-opacity:1;border-top-color:rgb(59 130 246/var(--tw-border-opacity,1))}.border-t-gray-600{--tw-border-opacity:1;border-top-color:rgb(75 85 99/var(--tw-border-opacity,1))}.border-t-gray-800{--tw-border-opacity:1;border-top-color:rgb(31 41 55/var(--tw-border-opacity,1))}.border-t-purple-500{--tw-border-opacity:1;border-top-color:rgb(168 85 247/var(--tw-border-opacity,1))}.border-t-white{--tw-border-opacity:1;border-top-color:rgb(255 255 255/var(--tw-border-opacity,1))}.bg-amber-100{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.bg-gray-600{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-green-600{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}.bg-orange-100{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.bg-purple-100{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity,1))}.bg-purple-50{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity,1))}.bg-purple-500{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}.bg-purple-600{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity,1))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.bg-yellow-400{--tw-bg-opacity:1;background-color:rgb(250 204 21/var(--tw-bg-opacity,1))}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-purple-50\/50{--tw-gradient-from:rgba(250,245,255,.5) var(--tw-gradient-from-position);--tw-gradient-to:rgba(250,245,255,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-white{--tw-gradient-to:#fff var(--tw-gradient-to-position)}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pl-8{padding-left:2rem}.pr-1{padding-right:.25rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\[0\.65rem\]{font-size:.65rem}.text-\[0\.6rem\]{font-size:.6rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-4{line-height:1rem}.leading-none{line-height:1}.tracking-wide{letter-spacing:.025em}.text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.text-orange-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.text-purple-300{--tw-text-opacity:1;color:rgb(216 180 254/var(--tw-text-opacity,1))}.text-purple-600{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity,1))}.text-purple-700{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity,1))}.text-purple-800{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.text-yellow-800{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity,1))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-2xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-\[0_0_0_3px_rgba\(167\2c 139\2c 250\2c 0\.1\)\]{--tw-shadow:0 0 0 3px rgba(167,139,250,.1);--tw-shadow-colored:0 0 0 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_0_3px_rgba\(167\2c 139\2c 250\2c 0\.15\)\]{--tw-shadow:0 0 0 3px rgba(167,139,250,.15);--tw-shadow-colored:0 0 0 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_0_3px_rgba\(167\2c 139\2c 250\2c 0\.3\)\]{--tw-shadow:0 0 0 3px rgba(167,139,250,.3);--tw-shadow-colored:0 0 0 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\[0_2px_8px_rgba\(0\2c 0\2c 0\2c 0\.3\)\]{--tw-shadow:0 2px 8px rgba(0,0,0,.3);--tw-shadow-colored:0 2px 8px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\[0_4px_16px_rgba\(0\2c 0\2c 0\2c 0\.4\)\]{--tw-shadow:0 4px 16px rgba(0,0,0,.4);--tw-shadow-colored:0 4px 16px var(--tw-shadow-color)}.shadow-\[0_4px_16px_rgba\(0\2c 0\2c 0\2c 0\.4\)\],.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[height\]{transition-property:height;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}@keyframes slideIn{0%{transform:translateX(100%);opacity:0}to{transform:translateX(0);opacity:1}}.focus-within\:border-blue-500:focus-within{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.focus-within\:ring-1:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-within\:ring-blue-500:focus-within{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.hover\:scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1}.hover\:scale-110:hover,.hover\:scale-\[1\.2\]:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-\[1\.2\]:hover{--tw-scale-x:1.2;--tw-scale-y:1.2}.hover\:border-gray-400:hover{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}.hover\:border-purple-400:hover{--tw-border-opacity:1;border-color:rgb(192 132 252/var(--tw-border-opacity,1))}.hover\:border-purple-600:hover{--tw-border-opacity:1;border-color:rgb(147 51 234/var(--tw-border-opacity,1))}.hover\:bg-blue-100:hover{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.hover\:bg-green-600:hover{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}.hover\:bg-green-700:hover{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity,1))}.hover\:bg-purple-50:hover{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity,1))}.hover\:bg-purple-700:hover{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity,1))}.hover\:bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.hover\:bg-red-50:hover{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.hover\:bg-red-600:hover{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.hover\:bg-yellow-500:hover{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.hover\:text-blue-600:hover{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.hover\:text-emerald-600:hover{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}.hover\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.hover\:text-purple-800:hover{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity,1))}.hover\:text-red-700:hover{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-\[0_4px_12px_rgba\(0\2c 0\2c 0\2c 0\.4\)\]:hover{--tw-shadow:0 4px 12px rgba(0,0,0,.4);--tw-shadow-colored:0 4px 12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\:border-blue-500:focus{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.focus\:ring-yellow-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(234 179 8/var(--tw-ring-opacity,1))}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width:640px){.sm\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media (min-width:768px){.md\:table-cell{display:table-cell}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:p-6{padding:1.5rem}}@media (min-width:1024px){.lg\:table-cell{display:table-cell}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
type BugReportCreator = {
|
|
2
|
+
id: string;
|
|
3
|
+
email: string | null;
|
|
4
|
+
full_name: string | null;
|
|
5
|
+
};
|
|
6
|
+
type BugReportType = {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
is_default: boolean;
|
|
10
|
+
created_by: string | null;
|
|
11
|
+
created_at: string;
|
|
12
|
+
};
|
|
13
|
+
type BugCaptureContext = {
|
|
14
|
+
captured_at: string;
|
|
15
|
+
route_label: string;
|
|
16
|
+
path: string;
|
|
17
|
+
browser: {
|
|
18
|
+
name: string;
|
|
19
|
+
user_agent: string;
|
|
20
|
+
platform: string | null;
|
|
21
|
+
language: string | null;
|
|
22
|
+
};
|
|
23
|
+
viewport: {
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
pixel_ratio: number;
|
|
27
|
+
};
|
|
28
|
+
timezone: string | null;
|
|
29
|
+
};
|
|
30
|
+
type BugReport = {
|
|
31
|
+
id: string;
|
|
32
|
+
task_list_id: string;
|
|
33
|
+
page_url: string;
|
|
34
|
+
x_position: number;
|
|
35
|
+
y_position: number;
|
|
36
|
+
target_selector?: string | null;
|
|
37
|
+
target_relative_x?: number | null;
|
|
38
|
+
target_relative_y?: number | null;
|
|
39
|
+
types: string[];
|
|
40
|
+
severity: 'Critical' | 'High' | 'Medium' | 'Low';
|
|
41
|
+
title: string;
|
|
42
|
+
description: string | null;
|
|
43
|
+
expected_behavior?: string | null;
|
|
44
|
+
actual_behavior?: string | null;
|
|
45
|
+
capture_context?: BugCaptureContext | null;
|
|
46
|
+
response: string | null;
|
|
47
|
+
status: 'Open' | 'In Progress' | 'Needs Review' | 'Resolved' | 'Closed';
|
|
48
|
+
created_by: string;
|
|
49
|
+
creator?: BugReportCreator;
|
|
50
|
+
assigned_to: string | null;
|
|
51
|
+
resolved_at: string | null;
|
|
52
|
+
resolved_by: string | null;
|
|
53
|
+
approved: boolean;
|
|
54
|
+
ai_ready: boolean;
|
|
55
|
+
ai_description: string | null;
|
|
56
|
+
created_at: string;
|
|
57
|
+
updated_at: string;
|
|
58
|
+
};
|
|
59
|
+
type BugReportMessage = {
|
|
60
|
+
id: string;
|
|
61
|
+
bug_report_id: string;
|
|
62
|
+
author_id: string;
|
|
63
|
+
body: string;
|
|
64
|
+
created_at: string;
|
|
65
|
+
updated_at: string;
|
|
66
|
+
author?: BugReportCreator;
|
|
67
|
+
};
|
|
68
|
+
type TaskList = {
|
|
69
|
+
id: string;
|
|
70
|
+
name: string;
|
|
71
|
+
share_slug: string;
|
|
72
|
+
is_default: boolean;
|
|
73
|
+
created_by: string | null;
|
|
74
|
+
created_at: string;
|
|
75
|
+
updated_at: string;
|
|
76
|
+
};
|
|
77
|
+
type DevNotesUser = {
|
|
78
|
+
id: string;
|
|
79
|
+
email: string;
|
|
80
|
+
fullName?: string;
|
|
81
|
+
};
|
|
82
|
+
type NotifyEvent = {
|
|
83
|
+
type: 'bug_closed' | 'new_comment';
|
|
84
|
+
recipientEmail: string;
|
|
85
|
+
subject: string;
|
|
86
|
+
textBody: string;
|
|
87
|
+
htmlBody: string;
|
|
88
|
+
};
|
|
89
|
+
type AiConversationMessage = {
|
|
90
|
+
role: 'user' | 'assistant';
|
|
91
|
+
content: string;
|
|
92
|
+
};
|
|
93
|
+
type AiAssistResult = {
|
|
94
|
+
type: 'question';
|
|
95
|
+
message: string;
|
|
96
|
+
} | {
|
|
97
|
+
type: 'finalized';
|
|
98
|
+
description: string;
|
|
99
|
+
} | {
|
|
100
|
+
type: 'error';
|
|
101
|
+
message: string;
|
|
102
|
+
};
|
|
103
|
+
type AiProvider = {
|
|
104
|
+
refineDescription(params: {
|
|
105
|
+
description: string;
|
|
106
|
+
conversationHistory: AiConversationMessage[];
|
|
107
|
+
context: {
|
|
108
|
+
title?: string;
|
|
109
|
+
page_url?: string;
|
|
110
|
+
route_label?: string;
|
|
111
|
+
severity?: string;
|
|
112
|
+
types?: string[];
|
|
113
|
+
target_selector?: string;
|
|
114
|
+
expected_behavior?: string;
|
|
115
|
+
actual_behavior?: string;
|
|
116
|
+
capture_context?: BugCaptureContext;
|
|
117
|
+
};
|
|
118
|
+
}): Promise<AiAssistResult>;
|
|
119
|
+
};
|
|
120
|
+
type DevNotesRole = 'admin' | 'contributor' | 'reporter' | 'none';
|
|
121
|
+
type DevNotesConfig = {
|
|
122
|
+
/** Storage key prefix for localStorage (default: 'devnotes') */
|
|
123
|
+
storagePrefix?: string;
|
|
124
|
+
/** Optional callback for notifications (email, slack, etc.) */
|
|
125
|
+
onNotify?: (event: NotifyEvent) => void;
|
|
126
|
+
/** Optional callback to get the current page path (default: window.location.pathname) */
|
|
127
|
+
getPagePath?: () => string;
|
|
128
|
+
/** Optional AI provider for description refinement */
|
|
129
|
+
aiProvider?: AiProvider;
|
|
130
|
+
/** Disable AI description refinement entirely */
|
|
131
|
+
disableAi?: boolean;
|
|
132
|
+
/** Require AI refinement before submitting a new report */
|
|
133
|
+
requireAi?: boolean;
|
|
134
|
+
/** Email addresses of super users who have admin-level access to DevNotes */
|
|
135
|
+
superUsers?: string[];
|
|
136
|
+
/** Role of the current user for access control */
|
|
137
|
+
role?: DevNotesRole;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
type DevNotesCapabilities = {
|
|
141
|
+
ai: boolean;
|
|
142
|
+
appLink: boolean;
|
|
143
|
+
};
|
|
144
|
+
type DevNotesAppLinkStatus = {
|
|
145
|
+
linked: boolean;
|
|
146
|
+
projectName: string | null;
|
|
147
|
+
tokenLast4: string | null;
|
|
148
|
+
linkedAt: string | null;
|
|
149
|
+
};
|
|
150
|
+
type DevNotesLinkAppInput = {
|
|
151
|
+
pat: string;
|
|
152
|
+
projectName?: string;
|
|
153
|
+
};
|
|
154
|
+
type DevNotesClientOptions = {
|
|
155
|
+
basePath?: string;
|
|
156
|
+
getAuthToken: () => Promise<string> | string;
|
|
157
|
+
fetch?: typeof globalThis.fetch;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
type BugReportCreateData = Omit<BugReport, 'id' | 'created_at' | 'updated_at' | 'created_by' | 'resolved_at' | 'resolved_by' | 'creator'>;
|
|
161
|
+
interface DevNotesClientAdapter {
|
|
162
|
+
fetchBugReports(): Promise<BugReport[]>;
|
|
163
|
+
createBugReport(data: BugReportCreateData): Promise<BugReport>;
|
|
164
|
+
updateBugReport(id: string, data: Partial<BugReport>): Promise<BugReport>;
|
|
165
|
+
deleteBugReport(id: string): Promise<void>;
|
|
166
|
+
fetchBugReportTypes(): Promise<BugReportType[]>;
|
|
167
|
+
createBugReportType(name: string): Promise<BugReportType>;
|
|
168
|
+
deleteBugReportType(id: string): Promise<void>;
|
|
169
|
+
fetchTaskLists(): Promise<TaskList[]>;
|
|
170
|
+
createTaskList(name: string): Promise<TaskList>;
|
|
171
|
+
fetchMessages(bugReportId: string): Promise<BugReportMessage[]>;
|
|
172
|
+
createMessage(bugReportId: string, body: string): Promise<BugReportMessage>;
|
|
173
|
+
updateMessage(id: string, body: string): Promise<BugReportMessage>;
|
|
174
|
+
deleteMessage(id: string): Promise<void>;
|
|
175
|
+
markMessagesAsRead(messageIds: string[]): Promise<void>;
|
|
176
|
+
fetchUnreadCounts(): Promise<Record<string, number>>;
|
|
177
|
+
fetchCollaborators(ids?: string[]): Promise<BugReportCreator[]>;
|
|
178
|
+
fetchProfiles(ids: string[]): Promise<BugReportCreator[]>;
|
|
179
|
+
fetchCapabilities(): Promise<DevNotesCapabilities>;
|
|
180
|
+
getAppLinkStatus(): Promise<DevNotesAppLinkStatus>;
|
|
181
|
+
linkApp(input: DevNotesLinkAppInput): Promise<DevNotesAppLinkStatus>;
|
|
182
|
+
unlinkApp(): Promise<void>;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export type { AiProvider as A, BugReport as B, DevNotesClientAdapter as D, NotifyEvent as N, TaskList as T, DevNotesUser as a, DevNotesConfig as b, BugReportType as c, BugReportCreator as d, DevNotesCapabilities as e, DevNotesAppLinkStatus as f, DevNotesRole as g, DevNotesClientOptions as h, BugCaptureContext as i, AiAssistResult as j, AiConversationMessage as k, BugReportCreateData as l, BugReportMessage as m, DevNotesLinkAppInput as n };
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
type BugReportCreator = {
|
|
2
|
+
id: string;
|
|
3
|
+
email: string | null;
|
|
4
|
+
full_name: string | null;
|
|
5
|
+
};
|
|
6
|
+
type BugReportType = {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
is_default: boolean;
|
|
10
|
+
created_by: string | null;
|
|
11
|
+
created_at: string;
|
|
12
|
+
};
|
|
13
|
+
type BugCaptureContext = {
|
|
14
|
+
captured_at: string;
|
|
15
|
+
route_label: string;
|
|
16
|
+
path: string;
|
|
17
|
+
browser: {
|
|
18
|
+
name: string;
|
|
19
|
+
user_agent: string;
|
|
20
|
+
platform: string | null;
|
|
21
|
+
language: string | null;
|
|
22
|
+
};
|
|
23
|
+
viewport: {
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
pixel_ratio: number;
|
|
27
|
+
};
|
|
28
|
+
timezone: string | null;
|
|
29
|
+
};
|
|
30
|
+
type BugReport = {
|
|
31
|
+
id: string;
|
|
32
|
+
task_list_id: string;
|
|
33
|
+
page_url: string;
|
|
34
|
+
x_position: number;
|
|
35
|
+
y_position: number;
|
|
36
|
+
target_selector?: string | null;
|
|
37
|
+
target_relative_x?: number | null;
|
|
38
|
+
target_relative_y?: number | null;
|
|
39
|
+
types: string[];
|
|
40
|
+
severity: 'Critical' | 'High' | 'Medium' | 'Low';
|
|
41
|
+
title: string;
|
|
42
|
+
description: string | null;
|
|
43
|
+
expected_behavior?: string | null;
|
|
44
|
+
actual_behavior?: string | null;
|
|
45
|
+
capture_context?: BugCaptureContext | null;
|
|
46
|
+
response: string | null;
|
|
47
|
+
status: 'Open' | 'In Progress' | 'Needs Review' | 'Resolved' | 'Closed';
|
|
48
|
+
created_by: string;
|
|
49
|
+
creator?: BugReportCreator;
|
|
50
|
+
assigned_to: string | null;
|
|
51
|
+
resolved_at: string | null;
|
|
52
|
+
resolved_by: string | null;
|
|
53
|
+
approved: boolean;
|
|
54
|
+
ai_ready: boolean;
|
|
55
|
+
ai_description: string | null;
|
|
56
|
+
created_at: string;
|
|
57
|
+
updated_at: string;
|
|
58
|
+
};
|
|
59
|
+
type BugReportMessage = {
|
|
60
|
+
id: string;
|
|
61
|
+
bug_report_id: string;
|
|
62
|
+
author_id: string;
|
|
63
|
+
body: string;
|
|
64
|
+
created_at: string;
|
|
65
|
+
updated_at: string;
|
|
66
|
+
author?: BugReportCreator;
|
|
67
|
+
};
|
|
68
|
+
type TaskList = {
|
|
69
|
+
id: string;
|
|
70
|
+
name: string;
|
|
71
|
+
share_slug: string;
|
|
72
|
+
is_default: boolean;
|
|
73
|
+
created_by: string | null;
|
|
74
|
+
created_at: string;
|
|
75
|
+
updated_at: string;
|
|
76
|
+
};
|
|
77
|
+
type DevNotesUser = {
|
|
78
|
+
id: string;
|
|
79
|
+
email: string;
|
|
80
|
+
fullName?: string;
|
|
81
|
+
};
|
|
82
|
+
type NotifyEvent = {
|
|
83
|
+
type: 'bug_closed' | 'new_comment';
|
|
84
|
+
recipientEmail: string;
|
|
85
|
+
subject: string;
|
|
86
|
+
textBody: string;
|
|
87
|
+
htmlBody: string;
|
|
88
|
+
};
|
|
89
|
+
type AiConversationMessage = {
|
|
90
|
+
role: 'user' | 'assistant';
|
|
91
|
+
content: string;
|
|
92
|
+
};
|
|
93
|
+
type AiAssistResult = {
|
|
94
|
+
type: 'question';
|
|
95
|
+
message: string;
|
|
96
|
+
} | {
|
|
97
|
+
type: 'finalized';
|
|
98
|
+
description: string;
|
|
99
|
+
} | {
|
|
100
|
+
type: 'error';
|
|
101
|
+
message: string;
|
|
102
|
+
};
|
|
103
|
+
type AiProvider = {
|
|
104
|
+
refineDescription(params: {
|
|
105
|
+
description: string;
|
|
106
|
+
conversationHistory: AiConversationMessage[];
|
|
107
|
+
context: {
|
|
108
|
+
title?: string;
|
|
109
|
+
page_url?: string;
|
|
110
|
+
route_label?: string;
|
|
111
|
+
severity?: string;
|
|
112
|
+
types?: string[];
|
|
113
|
+
target_selector?: string;
|
|
114
|
+
expected_behavior?: string;
|
|
115
|
+
actual_behavior?: string;
|
|
116
|
+
capture_context?: BugCaptureContext;
|
|
117
|
+
};
|
|
118
|
+
}): Promise<AiAssistResult>;
|
|
119
|
+
};
|
|
120
|
+
type DevNotesRole = 'admin' | 'contributor' | 'reporter' | 'none';
|
|
121
|
+
type DevNotesConfig = {
|
|
122
|
+
/** Storage key prefix for localStorage (default: 'devnotes') */
|
|
123
|
+
storagePrefix?: string;
|
|
124
|
+
/** Optional callback for notifications (email, slack, etc.) */
|
|
125
|
+
onNotify?: (event: NotifyEvent) => void;
|
|
126
|
+
/** Optional callback to get the current page path (default: window.location.pathname) */
|
|
127
|
+
getPagePath?: () => string;
|
|
128
|
+
/** Optional AI provider for description refinement */
|
|
129
|
+
aiProvider?: AiProvider;
|
|
130
|
+
/** Disable AI description refinement entirely */
|
|
131
|
+
disableAi?: boolean;
|
|
132
|
+
/** Require AI refinement before submitting a new report */
|
|
133
|
+
requireAi?: boolean;
|
|
134
|
+
/** Email addresses of super users who have admin-level access to DevNotes */
|
|
135
|
+
superUsers?: string[];
|
|
136
|
+
/** Role of the current user for access control */
|
|
137
|
+
role?: DevNotesRole;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
type DevNotesCapabilities = {
|
|
141
|
+
ai: boolean;
|
|
142
|
+
appLink: boolean;
|
|
143
|
+
};
|
|
144
|
+
type DevNotesAppLinkStatus = {
|
|
145
|
+
linked: boolean;
|
|
146
|
+
projectName: string | null;
|
|
147
|
+
tokenLast4: string | null;
|
|
148
|
+
linkedAt: string | null;
|
|
149
|
+
};
|
|
150
|
+
type DevNotesLinkAppInput = {
|
|
151
|
+
pat: string;
|
|
152
|
+
projectName?: string;
|
|
153
|
+
};
|
|
154
|
+
type DevNotesClientOptions = {
|
|
155
|
+
basePath?: string;
|
|
156
|
+
getAuthToken: () => Promise<string> | string;
|
|
157
|
+
fetch?: typeof globalThis.fetch;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
type BugReportCreateData = Omit<BugReport, 'id' | 'created_at' | 'updated_at' | 'created_by' | 'resolved_at' | 'resolved_by' | 'creator'>;
|
|
161
|
+
interface DevNotesClientAdapter {
|
|
162
|
+
fetchBugReports(): Promise<BugReport[]>;
|
|
163
|
+
createBugReport(data: BugReportCreateData): Promise<BugReport>;
|
|
164
|
+
updateBugReport(id: string, data: Partial<BugReport>): Promise<BugReport>;
|
|
165
|
+
deleteBugReport(id: string): Promise<void>;
|
|
166
|
+
fetchBugReportTypes(): Promise<BugReportType[]>;
|
|
167
|
+
createBugReportType(name: string): Promise<BugReportType>;
|
|
168
|
+
deleteBugReportType(id: string): Promise<void>;
|
|
169
|
+
fetchTaskLists(): Promise<TaskList[]>;
|
|
170
|
+
createTaskList(name: string): Promise<TaskList>;
|
|
171
|
+
fetchMessages(bugReportId: string): Promise<BugReportMessage[]>;
|
|
172
|
+
createMessage(bugReportId: string, body: string): Promise<BugReportMessage>;
|
|
173
|
+
updateMessage(id: string, body: string): Promise<BugReportMessage>;
|
|
174
|
+
deleteMessage(id: string): Promise<void>;
|
|
175
|
+
markMessagesAsRead(messageIds: string[]): Promise<void>;
|
|
176
|
+
fetchUnreadCounts(): Promise<Record<string, number>>;
|
|
177
|
+
fetchCollaborators(ids?: string[]): Promise<BugReportCreator[]>;
|
|
178
|
+
fetchProfiles(ids: string[]): Promise<BugReportCreator[]>;
|
|
179
|
+
fetchCapabilities(): Promise<DevNotesCapabilities>;
|
|
180
|
+
getAppLinkStatus(): Promise<DevNotesAppLinkStatus>;
|
|
181
|
+
linkApp(input: DevNotesLinkAppInput): Promise<DevNotesAppLinkStatus>;
|
|
182
|
+
unlinkApp(): Promise<void>;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export type { AiProvider as A, BugReport as B, DevNotesClientAdapter as D, NotifyEvent as N, TaskList as T, DevNotesUser as a, DevNotesConfig as b, BugReportType as c, BugReportCreator as d, DevNotesCapabilities as e, DevNotesAppLinkStatus as f, DevNotesRole as g, DevNotesClientOptions as h, BugCaptureContext as i, AiAssistResult as j, AiConversationMessage as k, BugReportCreateData as l, BugReportMessage as m, DevNotesLinkAppInput as n };
|
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@the-portland-company/devnotes",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Forge-backed DevNotes and bug reporting for React and Next.js apps",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/the-portland-company/devnotes.git"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/the-portland-company/devnotes",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/the-portland-company/devnotes/issues"
|
|
12
|
+
},
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=18"
|
|
18
|
+
},
|
|
19
|
+
"main": "dist/index.js",
|
|
20
|
+
"module": "dist/index.mjs",
|
|
21
|
+
"types": "dist/index.d.ts",
|
|
22
|
+
"sideEffects": [
|
|
23
|
+
"**/*.css"
|
|
24
|
+
],
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"import": "./dist/index.mjs",
|
|
29
|
+
"require": "./dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./next": {
|
|
32
|
+
"types": "./dist/server/next.d.ts",
|
|
33
|
+
"import": "./dist/server/next.mjs",
|
|
34
|
+
"require": "./dist/server/next.js"
|
|
35
|
+
},
|
|
36
|
+
"./express": {
|
|
37
|
+
"types": "./dist/server/express.d.ts",
|
|
38
|
+
"import": "./dist/server/express.mjs",
|
|
39
|
+
"require": "./dist/server/express.js"
|
|
40
|
+
},
|
|
41
|
+
"./styles.css": "./dist/styles.css"
|
|
42
|
+
},
|
|
43
|
+
"bin": {
|
|
44
|
+
"devnotes-setup": "./bin/setup.js"
|
|
45
|
+
},
|
|
46
|
+
"files": [
|
|
47
|
+
"bin",
|
|
48
|
+
"dist",
|
|
49
|
+
"templates"
|
|
50
|
+
],
|
|
51
|
+
"scripts": {
|
|
52
|
+
"build": "tsup && tailwindcss -i src/styles.css -o dist/styles.css --minify",
|
|
53
|
+
"dev": "tsup --watch",
|
|
54
|
+
"typecheck": "tsc --noEmit",
|
|
55
|
+
"release:check": "npm run typecheck && npm run build && npm pack --dry-run",
|
|
56
|
+
"prepublishOnly": "npm run release:check"
|
|
57
|
+
},
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
60
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"react-icons": "^4.12.0"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@types/node": "^25.3.0",
|
|
67
|
+
"@types/react": "^18.2.0",
|
|
68
|
+
"@types/react-dom": "^18.2.0",
|
|
69
|
+
"react": "^18.2.0",
|
|
70
|
+
"react-dom": "^18.2.0",
|
|
71
|
+
"tailwindcss": "^3.4.0",
|
|
72
|
+
"tsup": "^8.0.0",
|
|
73
|
+
"typescript": "^5.3.0"
|
|
74
|
+
},
|
|
75
|
+
"license": "MIT",
|
|
76
|
+
"keywords": [
|
|
77
|
+
"react",
|
|
78
|
+
"bug-reporting",
|
|
79
|
+
"devnotes",
|
|
80
|
+
"forge",
|
|
81
|
+
"nextjs",
|
|
82
|
+
"developer-tools"
|
|
83
|
+
]
|
|
84
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
DevNotesProvider,
|
|
4
|
+
DevNotesButton,
|
|
5
|
+
createDevNotesClient,
|
|
6
|
+
} from '@the-portland-company/devnotes';
|
|
7
|
+
import '@the-portland-company/devnotes/styles.css';
|
|
8
|
+
|
|
9
|
+
interface DevNotesWrapperProps {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default function DevNotesWrapper({ children }: DevNotesWrapperProps) {
|
|
14
|
+
// TODO: Replace with your auth/session source.
|
|
15
|
+
const session = null as any;
|
|
16
|
+
|
|
17
|
+
const adapter = useMemo(
|
|
18
|
+
() =>
|
|
19
|
+
createDevNotesClient({
|
|
20
|
+
getAuthToken: async () => session?.accessToken || '',
|
|
21
|
+
}),
|
|
22
|
+
[session?.accessToken]
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
const devNotesUser = useMemo(
|
|
26
|
+
() =>
|
|
27
|
+
session?.user?.id
|
|
28
|
+
? { id: session.user.id, email: session.user.email || '', fullName: session.user.fullName }
|
|
29
|
+
: null,
|
|
30
|
+
[session?.user?.id, session?.user?.email, session?.user?.fullName]
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
if (!session?.isAuthenticated || !devNotesUser) {
|
|
34
|
+
return <>{children}</>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<DevNotesProvider
|
|
39
|
+
adapter={adapter}
|
|
40
|
+
user={devNotesUser}
|
|
41
|
+
config={{ storagePrefix: 'devnotes' }}
|
|
42
|
+
>
|
|
43
|
+
{children}
|
|
44
|
+
<DevNotesButton position="%%POSITION%%" />
|
|
45
|
+
</DevNotesProvider>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { createExpressDevNotesProxy } from '@the-portland-company/devnotes/express';
|
|
2
|
+
|
|
3
|
+
const backend = {
|
|
4
|
+
async getCapabilities() {
|
|
5
|
+
return { ai: false, appLink: true };
|
|
6
|
+
},
|
|
7
|
+
async getAppLinkStatus() {
|
|
8
|
+
return {
|
|
9
|
+
linked: Boolean(process.env.FOCUS_FORGE_PAT),
|
|
10
|
+
projectName: process.env.FOCUS_FORGE_PROJECT_NAME || null,
|
|
11
|
+
tokenLast4: process.env.FOCUS_FORGE_PAT?.slice(-4) || null,
|
|
12
|
+
linkedAt: null,
|
|
13
|
+
};
|
|
14
|
+
},
|
|
15
|
+
async linkApp() {
|
|
16
|
+
throw new Error('Implement app-level Forge credential storage for your React server app.');
|
|
17
|
+
},
|
|
18
|
+
async unlinkApp() {
|
|
19
|
+
throw new Error('Implement app-level Forge credential removal for your React server app.');
|
|
20
|
+
},
|
|
21
|
+
async listReports() {
|
|
22
|
+
throw new Error('Implement Forge-backed report listing.');
|
|
23
|
+
},
|
|
24
|
+
async createReport() {
|
|
25
|
+
throw new Error('Implement Forge-backed report creation.');
|
|
26
|
+
},
|
|
27
|
+
async updateReport() {
|
|
28
|
+
throw new Error('Implement Forge-backed report updates.');
|
|
29
|
+
},
|
|
30
|
+
async deleteReport() {
|
|
31
|
+
throw new Error('Implement Forge-backed report deletion.');
|
|
32
|
+
},
|
|
33
|
+
async listReportTypes() {
|
|
34
|
+
throw new Error('Implement Forge-backed report type listing.');
|
|
35
|
+
},
|
|
36
|
+
async createReportType() {
|
|
37
|
+
throw new Error('Implement Forge-backed report type creation.');
|
|
38
|
+
},
|
|
39
|
+
async deleteReportType() {
|
|
40
|
+
throw new Error('Implement Forge-backed report type deletion.');
|
|
41
|
+
},
|
|
42
|
+
async listTaskLists() {
|
|
43
|
+
throw new Error('Implement Forge-backed task list listing.');
|
|
44
|
+
},
|
|
45
|
+
async createTaskList() {
|
|
46
|
+
throw new Error('Implement Forge-backed task list creation.');
|
|
47
|
+
},
|
|
48
|
+
async listMessages() {
|
|
49
|
+
throw new Error('Implement Forge-backed message listing.');
|
|
50
|
+
},
|
|
51
|
+
async createMessage() {
|
|
52
|
+
throw new Error('Implement Forge-backed message creation.');
|
|
53
|
+
},
|
|
54
|
+
async updateMessage() {
|
|
55
|
+
throw new Error('Implement Forge-backed message updates.');
|
|
56
|
+
},
|
|
57
|
+
async deleteMessage() {
|
|
58
|
+
throw new Error('Implement Forge-backed message deletion.');
|
|
59
|
+
},
|
|
60
|
+
async getUnreadCounts() {
|
|
61
|
+
throw new Error('Implement Forge-backed unread count lookup.');
|
|
62
|
+
},
|
|
63
|
+
async markMessagesRead() {
|
|
64
|
+
throw new Error('Implement Forge-backed message read tracking.');
|
|
65
|
+
},
|
|
66
|
+
async listCollaborators() {
|
|
67
|
+
throw new Error('Implement Forge-backed collaborator listing.');
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export const devNotesProxy = createExpressDevNotesProxy(backend);
|