@allbluecn/web-app 0.3.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/package.json +189 -0
- package/public/avatar/part/accessories/accessories-0.svg +7 -0
- package/public/avatar/part/accessories/accessories-1.svg +11 -0
- package/public/avatar/part/accessories/accessories-10.svg +11 -0
- package/public/avatar/part/accessories/accessories-11.svg +6 -0
- package/public/avatar/part/accessories/accessories-12.svg +6 -0
- package/public/avatar/part/accessories/accessories-13.svg +4 -0
- package/public/avatar/part/accessories/accessories-14.svg +6 -0
- package/public/avatar/part/accessories/accessories-2.svg +11 -0
- package/public/avatar/part/accessories/accessories-3.svg +10 -0
- package/public/avatar/part/accessories/accessories-4.svg +15 -0
- package/public/avatar/part/accessories/accessories-5.svg +11 -0
- package/public/avatar/part/accessories/accessories-6.svg +8 -0
- package/public/avatar/part/accessories/accessories-7.svg +11 -0
- package/public/avatar/part/accessories/accessories-8.svg +14 -0
- package/public/avatar/part/accessories/accessories-9.svg +15 -0
- package/public/avatar/part/beard/beard-0.svg +7 -0
- package/public/avatar/part/beard/beard-1.svg +11 -0
- package/public/avatar/part/beard/beard-10.svg +8 -0
- package/public/avatar/part/beard/beard-11.svg +4 -0
- package/public/avatar/part/beard/beard-12.svg +11 -0
- package/public/avatar/part/beard/beard-13.svg +4 -0
- package/public/avatar/part/beard/beard-14.svg +5 -0
- package/public/avatar/part/beard/beard-15.svg +6 -0
- package/public/avatar/part/beard/beard-16.svg +4 -0
- package/public/avatar/part/beard/beard-2.svg +32 -0
- package/public/avatar/part/beard/beard-3.svg +8 -0
- package/public/avatar/part/beard/beard-4.svg +11 -0
- package/public/avatar/part/beard/beard-5.svg +18 -0
- package/public/avatar/part/beard/beard-6.svg +8 -0
- package/public/avatar/part/beard/beard-7.svg +8 -0
- package/public/avatar/part/beard/beard-8.svg +8 -0
- package/public/avatar/part/beard/beard-9.svg +8 -0
- package/public/avatar/part/details/details-0.svg +7 -0
- package/public/avatar/part/details/details-1.svg +8 -0
- package/public/avatar/part/details/details-10.svg +8 -0
- package/public/avatar/part/details/details-11.svg +4 -0
- package/public/avatar/part/details/details-12.svg +4 -0
- package/public/avatar/part/details/details-13.svg +3 -0
- package/public/avatar/part/details/details-2.svg +8 -0
- package/public/avatar/part/details/details-3.svg +8 -0
- package/public/avatar/part/details/details-4.svg +8 -0
- package/public/avatar/part/details/details-5.svg +11 -0
- package/public/avatar/part/details/details-6.svg +8 -0
- package/public/avatar/part/details/details-7.svg +11 -0
- package/public/avatar/part/details/details-8.svg +11 -0
- package/public/avatar/part/details/details-9.svg +8 -0
- package/public/avatar/part/eyebrows/eyebrows-0.svg +11 -0
- package/public/avatar/part/eyebrows/eyebrows-1.svg +11 -0
- package/public/avatar/part/eyebrows/eyebrows-10.svg +8 -0
- package/public/avatar/part/eyebrows/eyebrows-11.svg +4 -0
- package/public/avatar/part/eyebrows/eyebrows-12.svg +4 -0
- package/public/avatar/part/eyebrows/eyebrows-13.svg +4 -0
- package/public/avatar/part/eyebrows/eyebrows-14.svg +4 -0
- package/public/avatar/part/eyebrows/eyebrows-15.svg +4 -0
- package/public/avatar/part/eyebrows/eyebrows-2.svg +8 -0
- package/public/avatar/part/eyebrows/eyebrows-3.svg +11 -0
- package/public/avatar/part/eyebrows/eyebrows-4.svg +11 -0
- package/public/avatar/part/eyebrows/eyebrows-5.svg +11 -0
- package/public/avatar/part/eyebrows/eyebrows-6.svg +8 -0
- package/public/avatar/part/eyebrows/eyebrows-7.svg +11 -0
- package/public/avatar/part/eyebrows/eyebrows-8.svg +11 -0
- package/public/avatar/part/eyebrows/eyebrows-9.svg +11 -0
- package/public/avatar/part/eyes/eyes-0.svg +8 -0
- package/public/avatar/part/eyes/eyes-1.svg +14 -0
- package/public/avatar/part/eyes/eyes-10.svg +17 -0
- package/public/avatar/part/eyes/eyes-11.svg +4 -0
- package/public/avatar/part/eyes/eyes-12.svg +4 -0
- package/public/avatar/part/eyes/eyes-13.svg +16 -0
- package/public/avatar/part/eyes/eyes-2.svg +8 -0
- package/public/avatar/part/eyes/eyes-3.svg +11 -0
- package/public/avatar/part/eyes/eyes-4.svg +8 -0
- package/public/avatar/part/eyes/eyes-5.svg +19 -0
- package/public/avatar/part/eyes/eyes-6.svg +13 -0
- package/public/avatar/part/eyes/eyes-7.svg +8 -0
- package/public/avatar/part/eyes/eyes-8.svg +8 -0
- package/public/avatar/part/eyes/eyes-9.svg +8 -0
- package/public/avatar/part/face/face-0.svg +8 -0
- package/public/avatar/part/face/face-1.svg +8 -0
- package/public/avatar/part/face/face-10.svg +8 -0
- package/public/avatar/part/face/face-11.svg +6 -0
- package/public/avatar/part/face/face-12.svg +6 -0
- package/public/avatar/part/face/face-13.svg +6 -0
- package/public/avatar/part/face/face-14.svg +6 -0
- package/public/avatar/part/face/face-15.svg +6 -0
- package/public/avatar/part/face/face-2.svg +8 -0
- package/public/avatar/part/face/face-3.svg +8 -0
- package/public/avatar/part/face/face-4.svg +8 -0
- package/public/avatar/part/face/face-5.svg +8 -0
- package/public/avatar/part/face/face-6.svg +8 -0
- package/public/avatar/part/face/face-7.svg +8 -0
- package/public/avatar/part/face/face-8.svg +8 -0
- package/public/avatar/part/face/face-9.svg +8 -0
- package/public/avatar/part/glasses/glasses-0.svg +7 -0
- package/public/avatar/part/glasses/glasses-1.svg +13 -0
- package/public/avatar/part/glasses/glasses-10.svg +14 -0
- package/public/avatar/part/glasses/glasses-11.svg +5 -0
- package/public/avatar/part/glasses/glasses-12.svg +12 -0
- package/public/avatar/part/glasses/glasses-13.svg +21 -0
- package/public/avatar/part/glasses/glasses-14.svg +5 -0
- package/public/avatar/part/glasses/glasses-2.svg +8 -0
- package/public/avatar/part/glasses/glasses-3.svg +14 -0
- package/public/avatar/part/glasses/glasses-4.svg +11 -0
- package/public/avatar/part/glasses/glasses-5.svg +13 -0
- package/public/avatar/part/glasses/glasses-6.svg +11 -0
- package/public/avatar/part/glasses/glasses-7.svg +11 -0
- package/public/avatar/part/glasses/glasses-8.svg +14 -0
- package/public/avatar/part/glasses/glasses-9.svg +11 -0
- package/public/avatar/part/hair/hair-0.svg +7 -0
- package/public/avatar/part/hair/hair-1.svg +8 -0
- package/public/avatar/part/hair/hair-10.svg +8 -0
- package/public/avatar/part/hair/hair-11.svg +8 -0
- package/public/avatar/part/hair/hair-12.svg +8 -0
- package/public/avatar/part/hair/hair-13.svg +19 -0
- package/public/avatar/part/hair/hair-14.svg +8 -0
- package/public/avatar/part/hair/hair-15.svg +8 -0
- package/public/avatar/part/hair/hair-16.svg +8 -0
- package/public/avatar/part/hair/hair-17.svg +8 -0
- package/public/avatar/part/hair/hair-18.svg +8 -0
- package/public/avatar/part/hair/hair-19.svg +8 -0
- package/public/avatar/part/hair/hair-2.svg +8 -0
- package/public/avatar/part/hair/hair-20.svg +8 -0
- package/public/avatar/part/hair/hair-21.svg +8 -0
- package/public/avatar/part/hair/hair-22.svg +8 -0
- package/public/avatar/part/hair/hair-23.svg +8 -0
- package/public/avatar/part/hair/hair-24.svg +8 -0
- package/public/avatar/part/hair/hair-25.svg +8 -0
- package/public/avatar/part/hair/hair-26.svg +8 -0
- package/public/avatar/part/hair/hair-27.svg +8 -0
- package/public/avatar/part/hair/hair-28.svg +8 -0
- package/public/avatar/part/hair/hair-29.svg +8 -0
- package/public/avatar/part/hair/hair-3.svg +8 -0
- package/public/avatar/part/hair/hair-30.svg +8 -0
- package/public/avatar/part/hair/hair-31.svg +3 -0
- package/public/avatar/part/hair/hair-32.svg +3 -0
- package/public/avatar/part/hair/hair-33.svg +3 -0
- package/public/avatar/part/hair/hair-34.svg +4 -0
- package/public/avatar/part/hair/hair-35.svg +3 -0
- package/public/avatar/part/hair/hair-36.svg +3 -0
- package/public/avatar/part/hair/hair-37.svg +3 -0
- package/public/avatar/part/hair/hair-38.svg +3 -0
- package/public/avatar/part/hair/hair-39.svg +3 -0
- package/public/avatar/part/hair/hair-4.svg +8 -0
- package/public/avatar/part/hair/hair-40.svg +3 -0
- package/public/avatar/part/hair/hair-41.svg +4 -0
- package/public/avatar/part/hair/hair-42.svg +3 -0
- package/public/avatar/part/hair/hair-43.svg +3 -0
- package/public/avatar/part/hair/hair-44.svg +3 -0
- package/public/avatar/part/hair/hair-45.svg +3 -0
- package/public/avatar/part/hair/hair-46.svg +3 -0
- package/public/avatar/part/hair/hair-47.svg +3 -0
- package/public/avatar/part/hair/hair-48.svg +3 -0
- package/public/avatar/part/hair/hair-49.svg +3 -0
- package/public/avatar/part/hair/hair-5.svg +8 -0
- package/public/avatar/part/hair/hair-50.svg +3 -0
- package/public/avatar/part/hair/hair-51.svg +3 -0
- package/public/avatar/part/hair/hair-52.svg +3 -0
- package/public/avatar/part/hair/hair-53.svg +3 -0
- package/public/avatar/part/hair/hair-54.svg +3 -0
- package/public/avatar/part/hair/hair-55.svg +3 -0
- package/public/avatar/part/hair/hair-56.svg +3 -0
- package/public/avatar/part/hair/hair-57.svg +3 -0
- package/public/avatar/part/hair/hair-58.svg +3 -0
- package/public/avatar/part/hair/hair-6.svg +8 -0
- package/public/avatar/part/hair/hair-7.svg +8 -0
- package/public/avatar/part/hair/hair-8.svg +8 -0
- package/public/avatar/part/hair/hair-9.svg +8 -0
- package/public/avatar/part/mouth/mouth-0.svg +8 -0
- package/public/avatar/part/mouth/mouth-1.svg +8 -0
- package/public/avatar/part/mouth/mouth-10.svg +8 -0
- package/public/avatar/part/mouth/mouth-11.svg +3 -0
- package/public/avatar/part/mouth/mouth-12.svg +4 -0
- package/public/avatar/part/mouth/mouth-13.svg +6 -0
- package/public/avatar/part/mouth/mouth-14.svg +4 -0
- package/public/avatar/part/mouth/mouth-15.svg +5 -0
- package/public/avatar/part/mouth/mouth-16.svg +4 -0
- package/public/avatar/part/mouth/mouth-17.svg +6 -0
- package/public/avatar/part/mouth/mouth-18.svg +4 -0
- package/public/avatar/part/mouth/mouth-19.svg +4 -0
- package/public/avatar/part/mouth/mouth-2.svg +8 -0
- package/public/avatar/part/mouth/mouth-3.svg +12 -0
- package/public/avatar/part/mouth/mouth-4.svg +8 -0
- package/public/avatar/part/mouth/mouth-5.svg +8 -0
- package/public/avatar/part/mouth/mouth-6.svg +8 -0
- package/public/avatar/part/mouth/mouth-7.svg +8 -0
- package/public/avatar/part/mouth/mouth-8.svg +11 -0
- package/public/avatar/part/mouth/mouth-9.svg +8 -0
- package/public/avatar/part/nose/nose-0.svg +8 -0
- package/public/avatar/part/nose/nose-1.svg +8 -0
- package/public/avatar/part/nose/nose-10.svg +8 -0
- package/public/avatar/part/nose/nose-11.svg +3 -0
- package/public/avatar/part/nose/nose-12.svg +3 -0
- package/public/avatar/part/nose/nose-13.svg +3 -0
- package/public/avatar/part/nose/nose-2.svg +8 -0
- package/public/avatar/part/nose/nose-3.svg +8 -0
- package/public/avatar/part/nose/nose-4.svg +8 -0
- package/public/avatar/part/nose/nose-5.svg +8 -0
- package/public/avatar/part/nose/nose-6.svg +8 -0
- package/public/avatar/part/nose/nose-7.svg +8 -0
- package/public/avatar/part/nose/nose-8.svg +8 -0
- package/public/avatar/part/nose/nose-9.svg +8 -0
- package/public/avatar/preview/accessories/0.svg +4 -0
- package/public/avatar/preview/accessories/1.svg +9 -0
- package/public/avatar/preview/accessories/10.svg +9 -0
- package/public/avatar/preview/accessories/11.svg +10 -0
- package/public/avatar/preview/accessories/12.svg +10 -0
- package/public/avatar/preview/accessories/13.svg +8 -0
- package/public/avatar/preview/accessories/14.svg +10 -0
- package/public/avatar/preview/accessories/2.svg +9 -0
- package/public/avatar/preview/accessories/3.svg +8 -0
- package/public/avatar/preview/accessories/4.svg +11 -0
- package/public/avatar/preview/accessories/5.svg +7 -0
- package/public/avatar/preview/accessories/6.svg +6 -0
- package/public/avatar/preview/accessories/7.svg +9 -0
- package/public/avatar/preview/accessories/8.svg +10 -0
- package/public/avatar/preview/accessories/9.svg +13 -0
- package/public/avatar/preview/beard/0.svg +4 -0
- package/public/avatar/preview/beard/1.svg +9 -0
- package/public/avatar/preview/beard/10.svg +6 -0
- package/public/avatar/preview/beard/11.svg +8 -0
- package/public/avatar/preview/beard/12.svg +17 -0
- package/public/avatar/preview/beard/13.svg +8 -0
- package/public/avatar/preview/beard/14.svg +9 -0
- package/public/avatar/preview/beard/15.svg +12 -0
- package/public/avatar/preview/beard/16.svg +8 -0
- package/public/avatar/preview/beard/2.svg +30 -0
- package/public/avatar/preview/beard/3.svg +6 -0
- package/public/avatar/preview/beard/4.svg +9 -0
- package/public/avatar/preview/beard/5.svg +16 -0
- package/public/avatar/preview/beard/6.svg +6 -0
- package/public/avatar/preview/beard/7.svg +6 -0
- package/public/avatar/preview/beard/8.svg +6 -0
- package/public/avatar/preview/beard/9.svg +6 -0
- package/public/avatar/preview/details/0.svg +4 -0
- package/public/avatar/preview/details/1.svg +6 -0
- package/public/avatar/preview/details/10.svg +6 -0
- package/public/avatar/preview/details/11.svg +8 -0
- package/public/avatar/preview/details/12.svg +8 -0
- package/public/avatar/preview/details/13.svg +5 -0
- package/public/avatar/preview/details/2.svg +6 -0
- package/public/avatar/preview/details/3.svg +6 -0
- package/public/avatar/preview/details/4.svg +6 -0
- package/public/avatar/preview/details/5.svg +9 -0
- package/public/avatar/preview/details/6.svg +6 -0
- package/public/avatar/preview/details/7.svg +7 -0
- package/public/avatar/preview/details/8.svg +7 -0
- package/public/avatar/preview/details/9.svg +6 -0
- package/public/avatar/preview/eyebrows/0.svg +9 -0
- package/public/avatar/preview/eyebrows/1.svg +9 -0
- package/public/avatar/preview/eyebrows/10.svg +6 -0
- package/public/avatar/preview/eyebrows/11.svg +8 -0
- package/public/avatar/preview/eyebrows/12.svg +8 -0
- package/public/avatar/preview/eyebrows/13.svg +8 -0
- package/public/avatar/preview/eyebrows/14.svg +8 -0
- package/public/avatar/preview/eyebrows/15.svg +8 -0
- package/public/avatar/preview/eyebrows/2.svg +6 -0
- package/public/avatar/preview/eyebrows/3.svg +9 -0
- package/public/avatar/preview/eyebrows/4.svg +9 -0
- package/public/avatar/preview/eyebrows/5.svg +9 -0
- package/public/avatar/preview/eyebrows/6.svg +6 -0
- package/public/avatar/preview/eyebrows/7.svg +9 -0
- package/public/avatar/preview/eyebrows/8.svg +9 -0
- package/public/avatar/preview/eyebrows/9.svg +9 -0
- package/public/avatar/preview/eyes/0.svg +6 -0
- package/public/avatar/preview/eyes/1.svg +12 -0
- package/public/avatar/preview/eyes/10.svg +15 -0
- package/public/avatar/preview/eyes/11.svg +8 -0
- package/public/avatar/preview/eyes/12.svg +8 -0
- package/public/avatar/preview/eyes/13.svg +24 -0
- package/public/avatar/preview/eyes/2.svg +6 -0
- package/public/avatar/preview/eyes/3.svg +9 -0
- package/public/avatar/preview/eyes/4.svg +6 -0
- package/public/avatar/preview/eyes/5.svg +17 -0
- package/public/avatar/preview/eyes/6.svg +11 -0
- package/public/avatar/preview/eyes/7.svg +6 -0
- package/public/avatar/preview/eyes/8.svg +6 -0
- package/public/avatar/preview/eyes/9.svg +6 -0
- package/public/avatar/preview/face/0.svg +6 -0
- package/public/avatar/preview/face/1.svg +6 -0
- package/public/avatar/preview/face/10.svg +6 -0
- package/public/avatar/preview/face/11.svg +6 -0
- package/public/avatar/preview/face/12.svg +8 -0
- package/public/avatar/preview/face/13.svg +8 -0
- package/public/avatar/preview/face/14.svg +8 -0
- package/public/avatar/preview/face/15.svg +8 -0
- package/public/avatar/preview/face/2.svg +6 -0
- package/public/avatar/preview/face/3.svg +6 -0
- package/public/avatar/preview/face/4.svg +6 -0
- package/public/avatar/preview/face/5.svg +6 -0
- package/public/avatar/preview/face/6.svg +6 -0
- package/public/avatar/preview/face/7.svg +6 -0
- package/public/avatar/preview/face/8.svg +6 -0
- package/public/avatar/preview/face/9.svg +6 -0
- package/public/avatar/preview/glasses/0.svg +4 -0
- package/public/avatar/preview/glasses/1.svg +11 -0
- package/public/avatar/preview/glasses/10.svg +12 -0
- package/public/avatar/preview/glasses/11.svg +11 -0
- package/public/avatar/preview/glasses/12.svg +18 -0
- package/public/avatar/preview/glasses/13.svg +29 -0
- package/public/avatar/preview/glasses/14.svg +11 -0
- package/public/avatar/preview/glasses/2.svg +6 -0
- package/public/avatar/preview/glasses/3.svg +12 -0
- package/public/avatar/preview/glasses/4.svg +9 -0
- package/public/avatar/preview/glasses/5.svg +11 -0
- package/public/avatar/preview/glasses/6.svg +9 -0
- package/public/avatar/preview/glasses/7.svg +9 -0
- package/public/avatar/preview/glasses/8.svg +12 -0
- package/public/avatar/preview/glasses/9.svg +9 -0
- package/public/avatar/preview/hair/0.svg +4 -0
- package/public/avatar/preview/hair/1.svg +6 -0
- package/public/avatar/preview/hair/10.svg +6 -0
- package/public/avatar/preview/hair/11.svg +6 -0
- package/public/avatar/preview/hair/12.svg +6 -0
- package/public/avatar/preview/hair/13.svg +17 -0
- package/public/avatar/preview/hair/14.svg +6 -0
- package/public/avatar/preview/hair/15.svg +6 -0
- package/public/avatar/preview/hair/16.svg +6 -0
- package/public/avatar/preview/hair/17.svg +6 -0
- package/public/avatar/preview/hair/18.svg +6 -0
- package/public/avatar/preview/hair/19.svg +6 -0
- package/public/avatar/preview/hair/2.svg +6 -0
- package/public/avatar/preview/hair/20.svg +6 -0
- package/public/avatar/preview/hair/21.svg +6 -0
- package/public/avatar/preview/hair/22.svg +6 -0
- package/public/avatar/preview/hair/23.svg +6 -0
- package/public/avatar/preview/hair/24.svg +6 -0
- package/public/avatar/preview/hair/25.svg +6 -0
- package/public/avatar/preview/hair/26.svg +6 -0
- package/public/avatar/preview/hair/27.svg +6 -0
- package/public/avatar/preview/hair/28.svg +6 -0
- package/public/avatar/preview/hair/29.svg +6 -0
- package/public/avatar/preview/hair/3.svg +6 -0
- package/public/avatar/preview/hair/30.svg +6 -0
- package/public/avatar/preview/hair/31.svg +5 -0
- package/public/avatar/preview/hair/32.svg +5 -0
- package/public/avatar/preview/hair/33.svg +5 -0
- package/public/avatar/preview/hair/34.svg +8 -0
- package/public/avatar/preview/hair/35.svg +5 -0
- package/public/avatar/preview/hair/36.svg +5 -0
- package/public/avatar/preview/hair/37.svg +5 -0
- package/public/avatar/preview/hair/38.svg +5 -0
- package/public/avatar/preview/hair/39.svg +5 -0
- package/public/avatar/preview/hair/4.svg +6 -0
- package/public/avatar/preview/hair/40.svg +5 -0
- package/public/avatar/preview/hair/41.svg +8 -0
- package/public/avatar/preview/hair/42.svg +5 -0
- package/public/avatar/preview/hair/43.svg +5 -0
- package/public/avatar/preview/hair/44.svg +5 -0
- package/public/avatar/preview/hair/45.svg +5 -0
- package/public/avatar/preview/hair/46.svg +5 -0
- package/public/avatar/preview/hair/47.svg +5 -0
- package/public/avatar/preview/hair/48.svg +5 -0
- package/public/avatar/preview/hair/49.svg +5 -0
- package/public/avatar/preview/hair/5.svg +6 -0
- package/public/avatar/preview/hair/50.svg +5 -0
- package/public/avatar/preview/hair/51.svg +5 -0
- package/public/avatar/preview/hair/52.svg +5 -0
- package/public/avatar/preview/hair/53.svg +5 -0
- package/public/avatar/preview/hair/54.svg +5 -0
- package/public/avatar/preview/hair/55.svg +5 -0
- package/public/avatar/preview/hair/56.svg +5 -0
- package/public/avatar/preview/hair/57.svg +5 -0
- package/public/avatar/preview/hair/58.svg +5 -0
- package/public/avatar/preview/hair/6.svg +6 -0
- package/public/avatar/preview/hair/7.svg +6 -0
- package/public/avatar/preview/hair/8.svg +6 -0
- package/public/avatar/preview/hair/9.svg +6 -0
- package/public/avatar/preview/mouth/0.svg +6 -0
- package/public/avatar/preview/mouth/1.svg +6 -0
- package/public/avatar/preview/mouth/10.svg +6 -0
- package/public/avatar/preview/mouth/11.svg +5 -0
- package/public/avatar/preview/mouth/12.svg +8 -0
- package/public/avatar/preview/mouth/13.svg +10 -0
- package/public/avatar/preview/mouth/14.svg +8 -0
- package/public/avatar/preview/mouth/15.svg +9 -0
- package/public/avatar/preview/mouth/16.svg +8 -0
- package/public/avatar/preview/mouth/17.svg +10 -0
- package/public/avatar/preview/mouth/18.svg +8 -0
- package/public/avatar/preview/mouth/19.svg +8 -0
- package/public/avatar/preview/mouth/2.svg +6 -0
- package/public/avatar/preview/mouth/3.svg +10 -0
- package/public/avatar/preview/mouth/4.svg +6 -0
- package/public/avatar/preview/mouth/5.svg +6 -0
- package/public/avatar/preview/mouth/6.svg +6 -0
- package/public/avatar/preview/mouth/7.svg +6 -0
- package/public/avatar/preview/mouth/8.svg +9 -0
- package/public/avatar/preview/mouth/9.svg +6 -0
- package/public/avatar/preview/nose/0.svg +6 -0
- package/public/avatar/preview/nose/1.svg +6 -0
- package/public/avatar/preview/nose/10.svg +6 -0
- package/public/avatar/preview/nose/11.svg +5 -0
- package/public/avatar/preview/nose/12.svg +5 -0
- package/public/avatar/preview/nose/13.svg +5 -0
- package/public/avatar/preview/nose/2.svg +6 -0
- package/public/avatar/preview/nose/3.svg +6 -0
- package/public/avatar/preview/nose/4.svg +6 -0
- package/public/avatar/preview/nose/5.svg +6 -0
- package/public/avatar/preview/nose/6.svg +6 -0
- package/public/avatar/preview/nose/7.svg +6 -0
- package/public/avatar/preview/nose/8.svg +6 -0
- package/public/avatar/preview/nose/9.svg +6 -0
- package/public/downloads/allblue-sketch-meaxure-plugin.zip +0 -0
- package/public/file.svg +1 -0
- package/public/fonts/NGSwv5HMAFg6IuGlBNMjxLsD8ah8QA.woff2 +0 -0
- package/public/fonts/NGSwv5HMAFg6IuGlBNMjxLsE8ah8QA.woff2 +0 -0
- package/public/fonts/NGSwv5HMAFg6IuGlBNMjxLsH8ag.woff2 +0 -0
- package/public/fonts/NGSwv5HMAFg6IuGlBNMjxLsI8ah8QA.woff2 +0 -0
- package/public/fonts/NGSwv5HMAFg6IuGlBNMjxLsJ8ah8QA.woff2 +0 -0
- package/public/fonts/NGSwv5HMAFg6IuGlBNMjxLsK8ah8QA.woff2 +0 -0
- package/public/fonts/NGSwv5HMAFg6IuGlBNMjxLsL8ah8QA.woff2 +0 -0
- package/public/fonts/NGSyv5HMAFg6IuGlBNMjxLsCwa5kRFe9.woff2 +0 -0
- package/public/fonts/NGSyv5HMAFg6IuGlBNMjxLsCwaRkRFe9.woff2 +0 -0
- package/public/fonts/NGSyv5HMAFg6IuGlBNMjxLsCwaVkRFe9.woff2 +0 -0
- package/public/fonts/NGSyv5HMAFg6IuGlBNMjxLsCwaZkRFe9.woff2 +0 -0
- package/public/fonts/NGSyv5HMAFg6IuGlBNMjxLsCwadkRFe9.woff2 +0 -0
- package/public/fonts/NGSyv5HMAFg6IuGlBNMjxLsCwalkRFe9.woff2 +0 -0
- package/public/fonts/NGSyv5HMAFg6IuGlBNMjxLsCwapkRA.woff2 +0 -0
- package/public/fonts/fonts.css +145 -0
- package/public/fonts/jizBRFtNs2ka5fXjeivQ4LroWlx-6zUTjg.woff2 +0 -0
- package/public/fonts/jizBRFtNs2ka5fXjeivQ4LroWlx-6zsTjmbI.woff2 +0 -0
- package/public/fonts/jizHRFtNs2ka5fXjeivQ4LroWlx-6zAjgn7MsNo.woff2 +0 -0
- package/public/fonts/jizHRFtNs2ka5fXjeivQ4LroWlx-6zAjjH7M.woff2 +0 -0
- package/public/globe.svg +1 -0
- package/public/icons/github-dark.svg +3 -0
- package/public/icons/github-line-dark.svg +1 -0
- package/public/icons/github-line.svg +1 -0
- package/public/icons/github.svg +3 -0
- package/public/next.svg +1 -0
- package/public/vercel.svg +1 -0
- package/public/window.svg +1 -0
- package/src/__tests__/components/auth/auth-brand-panel.test.tsx +49 -0
- package/src/__tests__/components/auth/auth-header.test.tsx +45 -0
- package/src/__tests__/components/auth/auth-layout.test.tsx +42 -0
- package/src/__tests__/components/auth/icon-input.test.tsx +38 -0
- package/src/__tests__/components/auth/oauth-section.test.tsx +51 -0
- package/src/__tests__/components/auth/password-input.test.tsx +49 -0
- package/src/__tests__/components/pages/dashboard.test.ts +29 -0
- package/src/__tests__/components/reference-inline.test.tsx +42 -0
- package/src/__tests__/knowledge-public/canonical-id.test.ts +67 -0
- package/src/__tests__/knowledge-public/favicon.test.ts +59 -0
- package/src/__tests__/knowledge-public/github-sync.test.ts +67 -0
- package/src/__tests__/knowledge-public/share-merge.test.ts +92 -0
- package/src/__tests__/setup.ts +32 -0
- package/src/__tests__/story-view.test.ts +148 -0
- package/src/__tests__/tag-badge.test.tsx +41 -0
- package/src/assets/logo/logo.tsx +53 -0
- package/src/components/agents/agent-card.tsx +127 -0
- package/src/components/agents/agent-form-dialog.tsx +404 -0
- package/src/components/agents/agent-selector.tsx +64 -0
- package/src/components/agents/agents-page.tsx +266 -0
- package/src/components/agents/schemas/agent-form.ts +24 -0
- package/src/components/agents/skill-card.tsx +64 -0
- package/src/components/agents/skill-form-dialog.tsx +148 -0
- package/src/components/agents/slash-skill-menu.tsx +71 -0
- package/src/components/agents/use-agent-handlers.ts +24 -0
- package/src/components/ai/ai-chat-prompt.tsx +179 -0
- package/src/components/ai/global-chat-panel.tsx +138 -0
- package/src/components/ai/use-knowledge-bases.ts +41 -0
- package/src/components/ai/use-selected-model.ts +41 -0
- package/src/components/animated-icons/bell.tsx +110 -0
- package/src/components/animated-icons/book-open-text.tsx +132 -0
- package/src/components/animated-icons/brain.tsx +209 -0
- package/src/components/animated-icons/briefcase-business.tsx +124 -0
- package/src/components/animated-icons/cart.tsx +114 -0
- package/src/components/animated-icons/compass.tsx +115 -0
- package/src/components/animated-icons/contrast.tsx +117 -0
- package/src/components/animated-icons/cursor-click.tsx +163 -0
- package/src/components/animated-icons/earth.tsx +174 -0
- package/src/components/animated-icons/file-text.tsx +176 -0
- package/src/components/animated-icons/flask.tsx +137 -0
- package/src/components/animated-icons/folder-kanban.tsx +128 -0
- package/src/components/animated-icons/graduation-cap.tsx +142 -0
- package/src/components/animated-icons/heart-pulse.tsx +153 -0
- package/src/components/animated-icons/heart.tsx +107 -0
- package/src/components/animated-icons/layers.tsx +130 -0
- package/src/components/animated-icons/layout-grid.tsx +174 -0
- package/src/components/animated-icons/layout-panel-top.tsx +1 -0
- package/src/components/animated-icons/message-square.tsx +124 -0
- package/src/components/animated-icons/pen-tool.tsx +131 -0
- package/src/components/animated-icons/rocket.tsx +147 -0
- package/src/components/animated-icons/search.tsx +111 -0
- package/src/components/animated-icons/settings.tsx +109 -0
- package/src/components/animated-icons/shield-check.tsx +126 -0
- package/src/components/animated-icons/smile.tsx +180 -0
- package/src/components/animated-icons/sparkles.tsx +165 -0
- package/src/components/animated-icons/terminal.tsx +120 -0
- package/src/components/animated-icons/user.tsx +136 -0
- package/src/components/animated-icons/users.tsx +130 -0
- package/src/components/animated-icons/workflow.tsx +144 -0
- package/src/components/animated-icons/zap.tsx +122 -0
- package/src/components/anyhub/anyhub-app-card.tsx +154 -0
- package/src/components/anyhub/anyhub-app-runner.tsx +92 -0
- package/src/components/anyhub/anyhub-install-dialog.tsx +128 -0
- package/src/components/anyhub/anyhub-management-view.tsx +75 -0
- package/src/components/anyhub/anyhub-marketplace-view.tsx +151 -0
- package/src/components/anyhub/anyhub-permission-panel.tsx +125 -0
- package/src/components/anyhub/anyhub-provider.tsx +30 -0
- package/src/components/anyhub/anyhub-top-nav.tsx +117 -0
- package/src/components/auth/auth-brand-panel.tsx +60 -0
- package/src/components/auth/auth-header.tsx +38 -0
- package/src/components/auth/auth-layout.tsx +1 -0
- package/src/components/auth/auth-providers.tsx +34 -0
- package/src/components/auth/icon-input.tsx +46 -0
- package/src/components/auth/oauth-section.tsx +59 -0
- package/src/components/auth/password-input.tsx +68 -0
- package/src/components/auth/session-guard.tsx +47 -0
- package/src/components/auth/sso-section.tsx +55 -0
- package/src/components/billing/__tests__/feature-gate.test.tsx +65 -0
- package/src/components/billing/__tests__/seats-manager.test.tsx +130 -0
- package/src/components/billing/__tests__/use-feature.test.tsx +100 -0
- package/src/components/billing/__tests__/use-resource.test.tsx +63 -0
- package/src/components/billing/billing-panel.tsx +107 -0
- package/src/components/billing/checkout-redirect.ts +50 -0
- package/src/components/billing/currency-toggle.tsx +67 -0
- package/src/components/billing/feature-gate.tsx +70 -0
- package/src/components/billing/invoice-history.tsx +85 -0
- package/src/components/billing/login-prompt-dialog.tsx +89 -0
- package/src/components/billing/pricing-card.tsx +81 -0
- package/src/components/billing/pricing-page.tsx +54 -0
- package/src/components/billing/seats-manager.tsx +177 -0
- package/src/components/billing/subscription-card.tsx +100 -0
- package/src/components/billing/subscription-provider.tsx +111 -0
- package/src/components/billing/upgrade-prompt.tsx +49 -0
- package/src/components/billing/use-feature.ts +29 -0
- package/src/components/billing/use-resource.ts +47 -0
- package/src/components/chat/__tests__/ai-conversation.test.tsx +79 -0
- package/src/components/chat/ai-chat-history/components/conversation-group.tsx +97 -0
- package/src/components/chat/ai-chat-history/components/conversation-header.tsx +59 -0
- package/src/components/chat/ai-chat-history/components/conversation-item.tsx +282 -0
- package/src/components/chat/ai-chat-history/components/conversation-search.tsx +65 -0
- package/src/components/chat/ai-chat-history/components/empty-state.tsx +64 -0
- package/src/components/chat/ai-chat-history/index.tsx +209 -0
- package/src/components/chat/ai-chat-history/types.ts +40 -0
- package/src/components/chat/ai-chat-history/utils/group-conversations.ts +76 -0
- package/src/components/chat/ai-chat-history.tsx +19 -0
- package/src/components/chat/ai-citations/components/citation-item.tsx +182 -0
- package/src/components/chat/ai-citations/components/citations-list.tsx +151 -0
- package/src/components/chat/ai-citations/components/inline-citation.tsx +38 -0
- package/src/components/chat/ai-citations/components/source-components.tsx +256 -0
- package/src/components/chat/ai-citations/index.tsx +83 -0
- package/src/components/chat/ai-citations/types.ts +42 -0
- package/src/components/chat/ai-citations/utils.ts +59 -0
- package/src/components/chat/ai-citations.tsx +20 -0
- package/src/components/chat/ai-conversation.tsx +334 -0
- package/src/components/chat/ai-message/components/code-block.tsx +174 -0
- package/src/components/chat/ai-message/components/markdown-content.tsx +105 -0
- package/src/components/chat/ai-message/components/message-actions.tsx +129 -0
- package/src/components/chat/ai-message/components/streaming-indicator.tsx +37 -0
- package/src/components/chat/ai-message/hooks/use-streaming-text.ts +73 -0
- package/src/components/chat/ai-message/index.tsx +128 -0
- package/src/components/chat/ai-message/types.ts +25 -0
- package/src/components/chat/ai-message/utils/dom-utils.ts +73 -0
- package/src/components/chat/ai-message.tsx +19 -0
- package/src/components/chat/ai-prompt-input/components/action-buttons.tsx +206 -0
- package/src/components/chat/ai-prompt-input/components/agent-mode-select.tsx +51 -0
- package/src/components/chat/ai-prompt-input/components/context-badge.tsx +64 -0
- package/src/components/chat/ai-prompt-input/components/kb-context-selector.tsx +189 -0
- package/src/components/chat/ai-prompt-input/components/model-select.tsx +124 -0
- package/src/components/chat/ai-prompt-input/components/page-user-context-selector.tsx +190 -0
- package/src/components/chat/ai-prompt-input/constants.tsx +57 -0
- package/src/components/chat/ai-prompt-input/index.tsx +346 -0
- package/src/components/chat/ai-prompt-input/types.ts +38 -0
- package/src/components/chat/ai-prompt-input.tsx +20 -0
- package/src/components/chat/ai-thinking.tsx +227 -0
- package/src/components/chat/chat-thread-page.tsx +165 -0
- package/src/components/chat/interrupt-approval.tsx +122 -0
- package/src/components/command-palette.tsx +172 -0
- package/src/components/design/artboard-grid.tsx +64 -0
- package/src/components/design/project-card.tsx +64 -0
- package/src/components/design/sketch/canvas-preview.tsx +151 -0
- package/src/components/design/sketch/code-preview.tsx +81 -0
- package/src/components/design/sketch/export-panel.tsx +74 -0
- package/src/components/design/sketch/layer-tree.tsx +106 -0
- package/src/components/design/sketch/property-panel.tsx +120 -0
- package/src/components/design/sketch/spacing-calculator.ts +46 -0
- package/src/components/forms/app-array-field.tsx +92 -0
- package/src/components/forms/app-checkbox.tsx +60 -0
- package/src/components/forms/app-combobox.tsx +108 -0
- package/src/components/forms/app-date-picker.tsx +79 -0
- package/src/components/forms/app-field-error.tsx +27 -0
- package/src/components/forms/app-field.tsx +80 -0
- package/src/components/forms/app-form-dialog.tsx +115 -0
- package/src/components/forms/app-input.tsx +64 -0
- package/src/components/forms/app-section.tsx +39 -0
- package/src/components/forms/app-select.tsx +83 -0
- package/src/components/forms/app-submit.tsx +65 -0
- package/src/components/forms/app-switch.tsx +60 -0
- package/src/components/forms/app-textarea.tsx +64 -0
- package/src/components/forms/hooks/use-form-submit.ts +55 -0
- package/src/components/forms/index.ts +31 -0
- package/src/components/forms/schemas/common.ts +28 -0
- package/src/components/forms/types.ts +34 -0
- package/src/components/hotkeys/shortcut-badge.tsx +48 -0
- package/src/components/hotkeys/shortcuts-panel.tsx +91 -0
- package/src/components/kibo-ui/contribution-graph/index.tsx +534 -0
- package/src/components/knowledge/dialog/knowledge-form-dialog.tsx +184 -0
- package/src/components/knowledge/doc-properties.tsx +190 -0
- package/src/components/knowledge/editor/doc-header.tsx +243 -0
- package/src/components/knowledge/editor/editor-width-context.tsx +56 -0
- package/src/components/knowledge/editor/knowledge-doc-editor.tsx +308 -0
- package/src/components/knowledge/knowledge-homepage.tsx +99 -0
- package/src/components/knowledge/knowledge-icon.tsx +38 -0
- package/src/components/knowledge/knowledge-settings-panel.tsx +148 -0
- package/src/components/knowledge/knowledge-tag-input.tsx +87 -0
- package/src/components/knowledge/knowledge-toolbar.tsx +521 -0
- package/src/components/knowledge/knowledge-tree-item.tsx +342 -0
- package/src/components/knowledge/knowledge-tree.tsx +235 -0
- package/src/components/knowledge/schemas/knowledge-form.ts +26 -0
- package/src/components/knowledge-public/bookmark-card.tsx +254 -0
- package/src/components/knowledge-public/bookmark-form-dialog.tsx +259 -0
- package/src/components/knowledge-public/category-icon.tsx +66 -0
- package/src/components/knowledge-public/chip-utils.ts +24 -0
- package/src/components/knowledge-public/knowledge-card-grid.tsx +26 -0
- package/src/components/knowledge-public/knowledge-card.tsx +105 -0
- package/src/components/knowledge-public/knowledge-filters.tsx +77 -0
- package/src/components/knowledge-public/knowledge-form-dialog.tsx +524 -0
- package/src/components/knowledge-public/knowledge-search-bar.tsx +46 -0
- package/src/components/knowledge-public/legal-compliance-editor.tsx +290 -0
- package/src/components/knowledge-public/markdown-editor.tsx +59 -0
- package/src/components/knowledge-public/markdown-view.tsx +30 -0
- package/src/components/knowledge-public/sharers-avatar-group.tsx +81 -0
- package/src/components/knowledge-public/tag-filter.tsx +53 -0
- package/src/components/layout/sidebar-03/__tests__/nav-workspace.test.tsx +156 -0
- package/src/components/layout/sidebar-03/app-sidebar.tsx +109 -0
- package/src/components/layout/sidebar-03/index.tsx +64 -0
- package/src/components/layout/sidebar-03/logo.tsx +41 -0
- package/src/components/layout/sidebar-03/nav-anyhub.tsx +150 -0
- package/src/components/layout/sidebar-03/nav-knowledge.tsx +321 -0
- package/src/components/layout/sidebar-03/nav-main.tsx +256 -0
- package/src/components/layout/sidebar-03/nav-notifications.tsx +78 -0
- package/src/components/layout/sidebar-03/nav-workspace.tsx +160 -0
- package/src/components/layout/sidebar-03/sidebar-search-trigger.tsx +63 -0
- package/src/components/layout/sidebar-03/team-switcher.tsx +114 -0
- package/src/components/layout/sidebar-03/user-menu.tsx +188 -0
- package/src/components/magicui/animated-gradient-text.tsx +54 -0
- package/src/components/magicui/animated-grid-pattern.tsx +192 -0
- package/src/components/magicui/animated-theme-toggler.tsx +1 -0
- package/src/components/magicui/aurora-text.tsx +58 -0
- package/src/components/magicui/components/animate/avatar-group.tsx +85 -0
- package/src/components/magicui/dot-pattern.tsx +173 -0
- package/src/components/magicui/flickering-grid.tsx +213 -0
- package/src/components/magicui/glyph-matrix.tsx +176 -0
- package/src/components/magicui/grid-pattern.tsx +1 -0
- package/src/components/magicui/hexagon-pattern.tsx +328 -0
- package/src/components/magicui/interactive-grid-pattern.tsx +118 -0
- package/src/components/magicui/interactive-hover-button.tsx +47 -0
- package/src/components/magicui/light-rays.tsx +164 -0
- package/src/components/magicui/primitives/animate/avatar-group.tsx +160 -0
- package/src/components/magicui/primitives/animate/slot.tsx +112 -0
- package/src/components/magicui/primitives/animate/tooltip.tsx +590 -0
- package/src/components/magicui/rainbow-button.tsx +78 -0
- package/src/components/magicui/sparkles-text.tsx +166 -0
- package/src/components/magicui/striped-pattern.tsx +67 -0
- package/src/components/magicui/word-rotate.tsx +64 -0
- package/src/components/mindmap/mindmap-doc-editor.tsx +181 -0
- package/src/components/plugin-slots/__tests__/plugin-nav-items.test.tsx +16 -0
- package/src/components/plugin-slots/__tests__/plugin-settings-tabs.test.tsx +30 -0
- package/src/components/plugin-slots/plugin-nav-items.tsx +12 -0
- package/src/components/plugin-slots/plugin-settings-tabs.tsx +30 -0
- package/src/components/plugin-slots/plugin-widgets.tsx +13 -0
- package/src/components/project/create-project-dialog.tsx +258 -0
- package/src/components/project/invite-member-dialog.tsx +229 -0
- package/src/components/project/project-activity-list.tsx +114 -0
- package/src/components/project/project-animated-icon.tsx +73 -0
- package/src/components/project/project-icon.tsx +38 -0
- package/src/components/project/project-member-manager.tsx +251 -0
- package/src/components/project/project-module-card.tsx +67 -0
- package/src/components/project/schemas/create-project.ts +31 -0
- package/src/components/react-bits/light-rays.css +9 -0
- package/src/components/react-bits/light-rays.jsx +399 -0
- package/src/components/react-bits/liquid-ether.css +7 -0
- package/src/components/react-bits/liquid-ether.jsx +1168 -0
- package/src/components/settings/ai/api-key-field.tsx +141 -0
- package/src/components/settings/ai/create-custom-model-dialog.tsx +267 -0
- package/src/components/settings/ai/model-card.tsx +203 -0
- package/src/components/settings/ai/model-manager.tsx +353 -0
- package/src/components/settings/ai/provider-card.tsx +130 -0
- package/src/components/settings/ai/provider-detail-form.tsx +418 -0
- package/src/components/settings/ai/provider-grid.tsx +157 -0
- package/src/components/settings/ai/provider-icon.tsx +43 -0
- package/src/components/settings/ai/provider-logo.tsx +90 -0
- package/src/components/settings/ai/schemas/provider-detail.ts +25 -0
- package/src/components/settings/language-selector.tsx +49 -0
- package/src/components/settings/personal-team/account/account-client.tsx +135 -0
- package/src/components/settings/personal-team/account/avatar/avatar-config.ts +80 -0
- package/src/components/settings/personal-team/account/avatar/notion-avatar-editor.tsx +454 -0
- package/src/components/settings/personal-team/account/avatar/notion-avatar.tsx +20 -0
- package/src/components/settings/personal-team/account/settings-profile.tsx +530 -0
- package/src/components/settings/personal-team/team/team-client.tsx +431 -0
- package/src/components/settings/personal-team/team/team-invitations.tsx +552 -0
- package/src/components/settings/personal-team/team/team-member-list.tsx +468 -0
- package/src/components/shadcn-space/animations/marquee.tsx +139 -0
- package/src/components/shadcn-space/blocks/about-us-01/about-us.tsx +136 -0
- package/src/components/shadcn-space/blocks/about-us-01/index.tsx +62 -0
- package/src/components/shadcn-space/blocks/cta-01/cta.tsx +74 -0
- package/src/components/shadcn-space/blocks/faq-01/faq.tsx +100 -0
- package/src/components/shadcn-space/blocks/footer-01/footer.tsx +232 -0
- package/src/components/shadcn-space/blocks/hero-01/brand-slider.tsx +79 -0
- package/src/components/shadcn-space/blocks/hero-01/header.tsx +255 -0
- package/src/components/shadcn-space/blocks/hero-01/hero.tsx +111 -0
- package/src/components/shadcn-space/blocks/hero-01/index.tsx +127 -0
- package/src/components/shadcn-space/blocks/portfolio-01/portfolio.tsx +149 -0
- package/src/components/shadcn-space/blocks/pricing-01/pricing.tsx +189 -0
- package/src/components/shadcn-space/blocks/pricing-02/pricing.tsx +213 -0
- package/src/components/shadcn-space/blocks/services-01/services.tsx +178 -0
- package/src/components/shadcn-space/blocks/team-01/team.tsx +166 -0
- package/src/components/share/prd/prd-share-client.tsx +1 -0
- package/src/components/share/prd/share-annotation-overlay.tsx +1 -0
- package/src/components/share/prd/share-comment-panel.tsx +1 -0
- package/src/components/share/prd/share-comment-review-panel.tsx +1 -0
- package/src/components/share/prd/share-directory-tree.tsx +1 -0
- package/src/components/share/prd/share-doc-view.tsx +1 -0
- package/src/components/share/prd/share-layout.tsx +1 -0
- package/src/components/share/prd/share-nav-bar.tsx +1 -0
- package/src/components/share/prd/share-password-gate.tsx +1 -0
- package/src/components/share/prd/share-prototype-view.tsx +1 -0
- package/src/components/share/prd/share-review-panel.tsx +1 -0
- package/src/components/share/prd/share-sse-listener.tsx +1 -0
- package/src/components/share/prd/share-theme-toggle.tsx +1 -0
- package/src/components/share/prd/version-share-client.tsx +1 -0
- package/src/components/shared/component-preview.tsx +18 -0
- package/src/components/shared/contribution-graph-tooltip.tsx +104 -0
- package/src/components/shared/icon-packs/index.ts +1 -0
- package/src/components/shared/icon-packs/knowledge.ts +1 -0
- package/src/components/shared/icon-packs/prd.ts +1 -0
- package/src/components/shared/icon-packs/project.ts +1 -0
- package/src/components/shared/icon-picker.tsx +1 -0
- package/src/components/shared/language-switcher.tsx +67 -0
- package/src/components/shared/name-confirm-dialog.tsx +1 -0
- package/src/components/shared/nav-float-button.tsx +1 -0
- package/src/components/shared/placeholder-page.tsx +1 -0
- package/src/components/shared/theme-toggle.tsx +59 -0
- package/src/components/shared/timezone-bootstrap.tsx +52 -0
- package/src/components/shared/timezone-select.tsx +132 -0
- package/src/components/shared/translator-text.tsx +71 -0
- package/src/components/story/ai/__tests__/action-registry.test.ts +110 -0
- package/src/components/story/ai/__tests__/use-story-ai-model.test.ts +62 -0
- package/src/components/story/ai/__tests__/use-toolbar-overflow.test.ts +64 -0
- package/src/components/story/ai/action-registry.ts +110 -0
- package/src/components/story/ai/handlers/more-popover.tsx +137 -0
- package/src/components/story/ai/handlers/stream-text.ts +169 -0
- package/src/components/story/ai/prototype-dialog.tsx +156 -0
- package/src/components/story/ai/split-dialog.tsx +467 -0
- package/src/components/story/ai/story-ai-panel.tsx +413 -0
- package/src/components/story/ai/story-ai-preview-list.tsx +182 -0
- package/src/components/story/ai/story-ai-toolbar.tsx +290 -0
- package/src/components/story/ai/use-story-ai-model.ts +137 -0
- package/src/components/story/ai/use-toolbar-overflow.ts +187 -0
- package/src/components/story/columns.tsx +197 -0
- package/src/components/story/constants.ts +172 -0
- package/src/components/story/create-story-dialog.tsx +352 -0
- package/src/components/story/detail/__tests__/activity-timeline.test.tsx +151 -0
- package/src/components/story/detail/activity-tabs.tsx +92 -0
- package/src/components/story/detail/activity-timeline.tsx +540 -0
- package/src/components/story/detail/comment-input.tsx +108 -0
- package/src/components/story/detail/comment-item.tsx +198 -0
- package/src/components/story/detail/comment-thread.tsx +98 -0
- package/src/components/story/detail/emoji-picker.tsx +62 -0
- package/src/components/story/detail/reaction-bar.tsx +72 -0
- package/src/components/story/detail/story-detail-body.tsx +598 -0
- package/src/components/story/detail/story-detail-toolbar/attachments.tsx +73 -0
- package/src/components/story/detail/story-detail-toolbar/categories.tsx +74 -0
- package/src/components/story/detail/story-detail-toolbar/children.tsx +762 -0
- package/src/components/story/detail/story-detail-toolbar/dependencies.tsx +73 -0
- package/src/components/story/detail/story-detail-toolbar/knowledge.tsx +73 -0
- package/src/components/story/detail/story-detail-toolbar/links.tsx +73 -0
- package/src/components/story/detail/story-detail-toolbar.tsx +140 -0
- package/src/components/story/detail/story-properties.tsx +118 -0
- package/src/components/story/display/__tests__/display-dropdown-helpers.test.ts +103 -0
- package/src/components/story/display/__tests__/display-dropdown.test.tsx +246 -0
- package/src/components/story/display/__tests__/group-resolver.test.ts +97 -0
- package/src/components/story/display/__tests__/order-resolver.test.ts +102 -0
- package/src/components/story/display/__tests__/use-display-options-search.test.ts +41 -0
- package/src/components/story/display/__tests__/use-display-options.test.ts +148 -0
- package/src/components/story/display/__tests__/use-grouped-stories.test.ts +72 -0
- package/src/components/story/display/__tests__/use-paged-story-groups.test.ts +273 -0
- package/src/components/story/display/constants.ts +106 -0
- package/src/components/story/display/display-dropdown.tsx +500 -0
- package/src/components/story/display/group-fields.ts +52 -0
- package/src/components/story/display/group-resolver.tsx +149 -0
- package/src/components/story/display/order-resolver.ts +51 -0
- package/src/components/story/display/types.ts +85 -0
- package/src/components/story/display/use-display-options-search.ts +31 -0
- package/src/components/story/display/use-display-options.ts +82 -0
- package/src/components/story/display/use-grouped-stories.ts +43 -0
- package/src/components/story/display/use-paged-story-groups.ts +362 -0
- package/src/components/story/filters/add-filter-dropdown.tsx +71 -0
- package/src/components/story/filters/applied-filters.tsx +227 -0
- package/src/components/story/filters/filter-condition.tsx +159 -0
- package/src/components/story/filters/filter-row.tsx +117 -0
- package/src/components/story/filters/filter-toggle.tsx +61 -0
- package/src/components/story/filters/filter-types.ts +119 -0
- package/src/components/story/filters/filter-value-input.tsx +187 -0
- package/src/components/story/filters/index.tsx +22 -0
- package/src/components/story/infinite-scroll-sentinel.tsx +75 -0
- package/src/components/story/inline-editors/assignee-editor.tsx +179 -0
- package/src/components/story/inline-editors/date-editor.tsx +75 -0
- package/src/components/story/inline-editors/index.ts +24 -0
- package/src/components/story/inline-editors/inline-trigger.tsx +60 -0
- package/src/components/story/inline-editors/labels-editor.tsx +119 -0
- package/src/components/story/inline-editors/parent-story-editor.tsx +124 -0
- package/src/components/story/inline-editors/priority-editor.tsx +120 -0
- package/src/components/story/inline-editors/state-editor.tsx +122 -0
- package/src/components/story/inline-editors/story-select-dialog.tsx +662 -0
- package/src/components/story/inline-editors/title-editor.tsx +43 -0
- package/src/components/story/peek-panel.tsx +272 -0
- package/src/components/story/priority-icon.tsx +39 -0
- package/src/components/story/relation-badge.tsx +57 -0
- package/src/components/story/relations/attachments-panel.tsx +179 -0
- package/src/components/story/relations/dependency-panel.tsx +190 -0
- package/src/components/story/relations/hierarchy-panel.tsx +180 -0
- package/src/components/story/relations/knowledge-panel.tsx +284 -0
- package/src/components/story/relations/links-panel.tsx +240 -0
- package/src/components/story/relations/tab.tsx +212 -0
- package/src/components/story/schemas/story-create.ts +34 -0
- package/src/components/story/search-popover.tsx +130 -0
- package/src/components/story/story-list-table.tsx +172 -0
- package/src/components/story/story-list-view.tsx +572 -0
- package/src/components/story/story-panel-header.tsx +322 -0
- package/src/components/story/story-toolbar.tsx +283 -0
- package/src/components/story/transfer-story-popover.tsx +261 -0
- package/src/components/story/types.ts +195 -0
- package/src/components/story/views/__tests__/use-flat-rows.test.ts +76 -0
- package/src/components/story/views/__tests__/view-types.test.ts +87 -0
- package/src/components/story/views/calendar-view.tsx +280 -0
- package/src/components/story/views/create-view-dialog.tsx +323 -0
- package/src/components/story/views/kanban-board.tsx +466 -0
- package/src/components/story/views/kanban-card.tsx +102 -0
- package/src/components/story/views/story-list/__tests__/batch-toolbar.test.tsx +166 -0
- package/src/components/story/views/story-list/__tests__/group-select.test.ts +85 -0
- package/src/components/story/views/story-list/__tests__/move.test.ts +66 -0
- package/src/components/story/views/story-list/batch-preview-dialog.tsx +485 -0
- package/src/components/story/views/story-list/batch-toolbar.tsx +218 -0
- package/src/components/story/views/story-list/group-select.ts +50 -0
- package/src/components/story/views/story-list/group.tsx +239 -0
- package/src/components/story/views/story-list/index.tsx +475 -0
- package/src/components/story/views/story-list/inline-story-creator.tsx +114 -0
- package/src/components/story/views/story-list/move.ts +55 -0
- package/src/components/story/views/story-list/row.tsx +131 -0
- package/src/components/story/views/timeline-view.tsx +275 -0
- package/src/components/story/views/use-flat-rows.ts +163 -0
- package/src/components/story/views/view-list-section.tsx +175 -0
- package/src/components/story/views/view-selector-button.tsx +118 -0
- package/src/components/story/views/view-switcher.tsx +72 -0
- package/src/components/story/views/view-types.ts +133 -0
- package/src/components/ui/accordion.tsx +98 -0
- package/src/components/ui/alert-dialog.tsx +1 -0
- package/src/components/ui/alert.tsx +93 -0
- package/src/components/ui/avatar.tsx +129 -0
- package/src/components/ui/badge.tsx +1 -0
- package/src/components/ui/breadcrumb.tsx +139 -0
- package/src/components/ui/button-group.tsx +100 -0
- package/src/components/ui/button.tsx +1 -0
- package/src/components/ui/calendar.tsx +237 -0
- package/src/components/ui/card.tsx +1 -0
- package/src/components/ui/checkbox.tsx +1 -0
- package/src/components/ui/collapsible.tsx +50 -0
- package/src/components/ui/command.tsx +210 -0
- package/src/components/ui/context-menu.tsx +1 -0
- package/src/components/ui/dialog.tsx +1 -0
- package/src/components/ui/dropdown-menu.tsx +1 -0
- package/src/components/ui/empty.tsx +1 -0
- package/src/components/ui/field.tsx +255 -0
- package/src/components/ui/hover-card.tsx +61 -0
- package/src/components/ui/input-group.tsx +171 -0
- package/src/components/ui/input.tsx +1 -0
- package/src/components/ui/item.tsx +213 -0
- package/src/components/ui/kbd.tsx +33 -0
- package/src/components/ui/label.tsx +1 -0
- package/src/components/ui/navigation-menu.tsx +181 -0
- package/src/components/ui/popover.tsx +1 -0
- package/src/components/ui/progress.tsx +48 -0
- package/src/components/ui/radio-group.tsx +59 -0
- package/src/components/ui/resizable.tsx +1 -0
- package/src/components/ui/safari.tsx +255 -0
- package/src/components/ui/scroll-area.tsx +70 -0
- package/src/components/ui/select.tsx +1 -0
- package/src/components/ui/separator.tsx +45 -0
- package/src/components/ui/sheet.tsx +164 -0
- package/src/components/ui/sidebar.tsx +1 -0
- package/src/components/ui/skeleton.tsx +1 -0
- package/src/components/ui/sonner.tsx +1 -0
- package/src/components/ui/spinner.tsx +28 -0
- package/src/components/ui/switch.tsx +1 -0
- package/src/components/ui/table.tsx +133 -0
- package/src/components/ui/tabs.tsx +108 -0
- package/src/components/ui/textarea.tsx +1 -0
- package/src/components/ui/toggle.tsx +64 -0
- package/src/components/ui/tooltip.tsx +1 -0
- package/src/components/workspace/create-workspace-dialog.tsx +186 -0
- package/src/components/workspace/schemas/create-workspace.ts +27 -0
- package/src/config/sidebar-notifications.ts +50 -0
- package/src/config/sidebar-routes.tsx +104 -0
- package/src/config/sidebar-teams.ts +32 -0
- package/src/hooks/__tests__/use-commands.test.tsx +74 -0
- package/src/hooks/__tests__/use-entity-subscription.test.ts +89 -0
- package/src/hooks/use-commands.ts +78 -0
- package/src/hooks/use-entity-subscription.ts +39 -0
- package/src/hooks/use-mobile.ts +36 -0
- package/src/hooks/use-scrolling.ts +94 -0
- package/src/hooks/use-throttled-callback.ts +20 -0
- package/src/hooks/use-unmount.ts +38 -0
- package/src/hooks/usePolling.ts +129 -0
- package/src/hooks/useTranslator.ts +80 -0
- package/src/i18n/config.ts +20 -0
- package/src/lib/__tests__/ai-adapter.test.ts +92 -0
- package/src/lib/__tests__/cli-detector.test.ts +80 -0
- package/src/lib/__tests__/date-utils.test.ts +86 -0
- package/src/lib/__tests__/datetime.test.ts +74 -0
- package/src/lib/__tests__/desktop-detect.test.ts +19 -0
- package/src/lib/__tests__/desktop-guest.test.ts +28 -0
- package/src/lib/__tests__/embedding.test.ts +65 -0
- package/src/lib/__tests__/module-registry.test.ts +101 -0
- package/src/lib/__tests__/pacer.test.ts +118 -0
- package/src/lib/__tests__/pgvector.test.ts +94 -0
- package/src/lib/__tests__/project-display-id.test.ts +64 -0
- package/src/lib/__tests__/provider-router.test.ts +239 -0
- package/src/lib/__tests__/rag.test.ts +100 -0
- package/src/lib/__tests__/rate-limit.test.ts +80 -0
- package/src/lib/__tests__/sse-transport.test.ts +136 -0
- package/src/lib/ai/__tests__/story-ai-stream.test.ts +280 -0
- package/src/lib/ai/__tests__/story-jsonl.test.ts +186 -0
- package/src/lib/ai/__tests__/story-prompt.test.ts +78 -0
- package/src/lib/ai/story-ai-stream.ts +168 -0
- package/src/lib/ai/story-jsonl.ts +121 -0
- package/src/lib/analytics.ts +79 -0
- package/src/lib/annotation-template.ts +1 -0
- package/src/lib/anyhub/anyhub-message-bridge.ts +141 -0
- package/src/lib/anyhub/anyhub-store.ts +121 -0
- package/src/lib/anyhub/capabilities.ts +88 -0
- package/src/lib/anyhub/manager.ts +225 -0
- package/src/lib/anyhub/manifest.ts +122 -0
- package/src/lib/anyhub/permissions.ts +76 -0
- package/src/lib/anyhub/proxy.ts +134 -0
- package/src/lib/anyhub/types.ts +83 -0
- package/src/lib/auth/__tests__/sso-authorize.test.ts +53 -0
- package/src/lib/auth/auth-client.ts +1 -0
- package/src/lib/auth/auth.config.ts +383 -0
- package/src/lib/auth/sso-authorize.ts +47 -0
- package/src/lib/avatar.ts +41 -0
- package/src/lib/builtin-project.ts +20 -0
- package/src/lib/chat-handoff.ts +77 -0
- package/src/lib/collections/ai/ai-providers-collection.ts +31 -0
- package/src/lib/collections/ai/index.ts +18 -0
- package/src/lib/collections/index.ts +24 -0
- package/src/lib/collections/knowledge/index.ts +18 -0
- package/src/lib/collections/knowledge/knowledge-bases-collection.ts +31 -0
- package/src/lib/collections/reference/bookmark-categories-collection.ts +31 -0
- package/src/lib/collections/reference/labels-collection.ts +31 -0
- package/src/lib/collections/reference/projects-collection.ts +31 -0
- package/src/lib/collections/reference/users-brief-collection.ts +31 -0
- package/src/lib/collections/reference/workspaces-collection.ts +31 -0
- package/src/lib/commands/__tests__/command-palette-state.test.ts +68 -0
- package/src/lib/commands/__tests__/registry.test.ts +98 -0
- package/src/lib/commands/command-palette-state.ts +56 -0
- package/src/lib/commands/registry.ts +49 -0
- package/src/lib/commands/types.ts +32 -0
- package/src/lib/comment-utils.ts +1 -0
- package/src/lib/crypto/__tests__/api-key-cipher.test.ts +72 -0
- package/src/lib/crypto/api-key-cipher.ts +1 -0
- package/src/lib/date-utils.ts +107 -0
- package/src/lib/datetime.ts +6 -0
- package/src/lib/deploy-region.ts +21 -0
- package/src/lib/desktop-detect.ts +27 -0
- package/src/lib/get-strict-context.tsx +53 -0
- package/src/lib/github.ts +228 -0
- package/src/lib/hotkeys/__tests__/registry.test.ts +46 -0
- package/src/lib/hotkeys/registry.ts +109 -0
- package/src/lib/hotkeys/types.ts +29 -0
- package/src/lib/i18n/client.ts +1 -0
- package/src/lib/i18n/config.ts +1 -0
- package/src/lib/i18n/detect.ts +1 -0
- package/src/lib/i18n/server.ts +1 -0
- package/src/lib/i18n/types.ts +1 -0
- package/src/lib/openai-client.ts +62 -0
- package/src/lib/optimistic/use-optimistic-mutation.ts +63 -0
- package/src/lib/outline-utils.ts +1 -0
- package/src/lib/pacer.ts +11 -0
- package/src/lib/perf.ts +19 -0
- package/src/lib/pgvector.ts +22 -0
- package/src/lib/prd/__tests__/stack-layout.test.ts +63 -0
- package/src/lib/prd/stack-layout.ts +1 -0
- package/src/lib/prd-tree-utils.ts +1 -0
- package/src/lib/prisma.ts +18 -0
- package/src/lib/project-display-id.ts +39 -0
- package/src/lib/project-mock.ts +156 -0
- package/src/lib/prototype-registry.ts +1 -0
- package/src/lib/rag.ts +47 -0
- package/src/lib/rate-limit.ts +57 -0
- package/src/lib/redis.ts +51 -0
- package/src/lib/resource-errors.ts +20 -0
- package/src/lib/restore-version.ts +1 -0
- package/src/lib/router-context.ts +39 -0
- package/src/lib/session.ts +44 -0
- package/src/lib/share-events.ts +1 -0
- package/src/lib/share-utils.ts +1 -0
- package/src/lib/sidebar-utils.ts +1 -0
- package/src/lib/sse-transport.ts +78 -0
- package/src/lib/stores/index.ts +18 -0
- package/src/lib/stores/prd-canvas-store.ts +1 -0
- package/src/lib/story/__tests__/activity-grouper.test.ts +234 -0
- package/src/lib/story/__tests__/description-diff.test.ts +214 -0
- package/src/lib/story/activity-grouper.ts +173 -0
- package/src/lib/story/description-diff.ts +140 -0
- package/src/lib/tag-colors.ts +1 -0
- package/src/lib/time-format.ts +1 -0
- package/src/lib/utils.ts +18 -0
- package/src/lib/vector-store/__tests__/factory.test.ts +59 -0
- package/src/lib/vector-store/__tests__/sqlite-vec-store.test.ts +143 -0
- package/src/lib/vector-store/__tests__/vector-store.test.ts +50 -0
- package/src/lib/vector-store/index.ts +45 -0
- package/src/lib/vector-store/pg-vector-store.ts +85 -0
- package/src/lib/vector-store/sqlite-vec-store.ts +162 -0
- package/src/lib/vector-store/types.ts +42 -0
- package/src/plugins/.gen-manifest.json +13 -0
- package/src/plugins/.gitkeep +0 -0
- package/src/plugins/modules.gen.ts +20 -0
- package/src/plugins/plugins.gen.ts +20 -0
- package/src/plugins/ui.gen.ts +10 -0
- package/src/providers/index.tsx +86 -0
- package/src/providers/timezone-provider.tsx +1 -0
- package/src/routeTree.gen.ts +2583 -0
- package/src/router.tsx +73 -0
- package/src/routes/__desktop/onboarding/route.lazy.tsx +145 -0
- package/src/routes/__desktop/onboarding/route.tsx +11 -0
- package/src/routes/__root.tsx +153 -0
- package/src/routes/_login/forgot-password/route.lazy.tsx +102 -0
- package/src/routes/_login/forgot-password/route.tsx +20 -0
- package/src/routes/_login/login/route.lazy.tsx +241 -0
- package/src/routes/_login/login/route.tsx +30 -0
- package/src/routes/_login/register/route.lazy.tsx +173 -0
- package/src/routes/_login/register/route.tsx +23 -0
- package/src/routes/_login/reset-password/route.lazy.tsx +116 -0
- package/src/routes/_login/reset-password/route.tsx +23 -0
- package/src/routes/_login/route.tsx +22 -0
- package/src/routes/_login/schemas/-auth.ts +50 -0
- package/src/routes/_nav/acceptance-criteria/route.tsx +28 -0
- package/src/routes/_nav/agents/route.tsx +12 -0
- package/src/routes/_nav/apps/anyhub/$id/route.tsx +28 -0
- package/src/routes/_nav/apps/anyhub/route.tsx +33 -0
- package/src/routes/_nav/apps/route.tsx +22 -0
- package/src/routes/_nav/bugs/route.tsx +24 -0
- package/src/routes/_nav/chat/$threadId.tsx +31 -0
- package/src/routes/_nav/chat/route.lazy.tsx +428 -0
- package/src/routes/_nav/chat/route.tsx +23 -0
- package/src/routes/_nav/dashboard/-components/activity-feed.tsx +63 -0
- package/src/routes/_nav/dashboard/-components/avatar-group.tsx +54 -0
- package/src/routes/_nav/dashboard/-components/quick-actions.tsx +49 -0
- package/src/routes/_nav/dashboard/-components/stats-grid.tsx +54 -0
- package/src/routes/_nav/dashboard/route.lazy.tsx +106 -0
- package/src/routes/_nav/dashboard/route.tsx +39 -0
- package/src/routes/_nav/design/$projectId/$artboardId/route.lazy.tsx +89 -0
- package/src/routes/_nav/design/$projectId/$artboardId/route.tsx +26 -0
- package/src/routes/_nav/design/$projectId/route.lazy.tsx +50 -0
- package/src/routes/_nav/design/$projectId/route.tsx +26 -0
- package/src/routes/_nav/design/index.lazy.tsx +320 -0
- package/src/routes/_nav/design/index.tsx +26 -0
- package/src/routes/_nav/design/route.tsx +22 -0
- package/src/routes/_nav/inspiration/route.tsx +8 -0
- package/src/routes/_nav/knowledge/$kbId/doc/$docId/route.lazy.tsx +76 -0
- package/src/routes/_nav/knowledge/$kbId/doc/$docId/route.tsx +57 -0
- package/src/routes/_nav/knowledge/$kbId/index.lazy.tsx +30 -0
- package/src/routes/_nav/knowledge/$kbId/index.tsx +30 -0
- package/src/routes/_nav/knowledge/$kbId/route.lazy.tsx +190 -0
- package/src/routes/_nav/knowledge/$kbId/route.tsx +92 -0
- package/src/routes/_nav/knowledge/bookmarks/$id.lazy.tsx +286 -0
- package/src/routes/_nav/knowledge/bookmarks/index.lazy.tsx +179 -0
- package/src/routes/_nav/knowledge/bookmarks/route.tsx +20 -0
- package/src/routes/_nav/knowledge/compliance/$id.lazy.tsx +250 -0
- package/src/routes/_nav/knowledge/compliance/edit/$id.lazy.tsx +28 -0
- package/src/routes/_nav/knowledge/compliance/index.lazy.tsx +125 -0
- package/src/routes/_nav/knowledge/compliance/route.tsx +22 -0
- package/src/routes/_nav/knowledge/dictionaries/$id.lazy.tsx +106 -0
- package/src/routes/_nav/knowledge/dictionaries/index.lazy.tsx +108 -0
- package/src/routes/_nav/knowledge/dictionaries/route.tsx +22 -0
- package/src/routes/_nav/knowledge/index.lazy.tsx +115 -0
- package/src/routes/_nav/knowledge/index.tsx +24 -0
- package/src/routes/_nav/knowledge/laws/$id.lazy.tsx +264 -0
- package/src/routes/_nav/knowledge/laws/edit/$id.lazy.tsx +28 -0
- package/src/routes/_nav/knowledge/laws/index.lazy.tsx +115 -0
- package/src/routes/_nav/knowledge/laws/route.tsx +22 -0
- package/src/routes/_nav/knowledge/route.tsx +22 -0
- package/src/routes/_nav/knowledge/summary/index.lazy.tsx +251 -0
- package/src/routes/_nav/knowledge/summary/route.tsx +22 -0
- package/src/routes/_nav/notion-like/route.tsx +28 -0
- package/src/routes/_nav/prd/$id/route.tsx +9 -0
- package/src/routes/_nav/prd/index.tsx +9 -0
- package/src/routes/_nav/prd/route.tsx +8 -0
- package/src/routes/_nav/pricing-02/route.tsx +28 -0
- package/src/routes/_nav/projects/$projectId/$storyId/route.lazy.tsx +115 -0
- package/src/routes/_nav/projects/$projectId/$storyId/route.tsx +38 -0
- package/src/routes/_nav/projects/$projectId/index.lazy.tsx +171 -0
- package/src/routes/_nav/projects/$projectId/route.lazy.tsx +24 -0
- package/src/routes/_nav/projects/$projectId/route.tsx +36 -0
- package/src/routes/_nav/projects/$projectId/settings/route.lazy.tsx +305 -0
- package/src/routes/_nav/projects/$projectId/settings/route.tsx +32 -0
- package/src/routes/_nav/projects/route.tsx +27 -0
- package/src/routes/_nav/route.lazy.tsx +45 -0
- package/src/routes/_nav/route.tsx +165 -0
- package/src/routes/_nav/settings/-settings-tabs.tsx +135 -0
- package/src/routes/_nav/settings/account/route.lazy.tsx +51 -0
- package/src/routes/_nav/settings/account/route.tsx +37 -0
- package/src/routes/_nav/settings/agents/route.lazy.tsx +10 -0
- package/src/routes/_nav/settings/agents/route.tsx +20 -0
- package/src/routes/_nav/settings/ai/$providerId/route.lazy.tsx +35 -0
- package/src/routes/_nav/settings/ai/$providerId/route.tsx +37 -0
- package/src/routes/_nav/settings/ai/index/route.lazy.tsx +51 -0
- package/src/routes/_nav/settings/ai/route.lazy.tsx +26 -0
- package/src/routes/_nav/settings/ai/route.tsx +31 -0
- package/src/routes/_nav/settings/billing/route.lazy.tsx +42 -0
- package/src/routes/_nav/settings/billing/route.tsx +39 -0
- package/src/routes/_nav/settings/connection/route.lazy.tsx +60 -0
- package/src/routes/_nav/settings/connection/route.tsx +10 -0
- package/src/routes/_nav/settings/design/route.lazy.tsx +193 -0
- package/src/routes/_nav/settings/design/route.tsx +32 -0
- package/src/routes/_nav/settings/general/route.lazy.tsx +100 -0
- package/src/routes/_nav/settings/general/route.tsx +20 -0
- package/src/routes/_nav/settings/privacy/route.lazy.tsx +173 -0
- package/src/routes/_nav/settings/privacy/route.tsx +20 -0
- package/src/routes/_nav/settings/route.lazy.tsx +43 -0
- package/src/routes/_nav/settings/route.tsx +68 -0
- package/src/routes/_nav/settings/team/route.lazy.tsx +44 -0
- package/src/routes/_nav/settings/team/route.tsx +33 -0
- package/src/routes/_nav/stories/$storyId/route.lazy.tsx +136 -0
- package/src/routes/_nav/stories/$storyId/route.tsx +143 -0
- package/src/routes/_nav/stories/index.lazy.tsx +28 -0
- package/src/routes/_nav/stories/index.tsx +37 -0
- package/src/routes/_nav/stories/route.tsx +22 -0
- package/src/routes/_nav/tags/$id/route.tsx +8 -0
- package/src/routes/_nav/tags/index.tsx +8 -0
- package/src/routes/_nav/tags/route.tsx +8 -0
- package/src/routes/_nav/tags/settings/route.tsx +9 -0
- package/src/routes/_nav/test-cases/route.tsx +28 -0
- package/src/routes/_nav/workspaces/$workspaceId/route.lazy.tsx +142 -0
- package/src/routes/_nav/workspaces/$workspaceId/route.tsx +30 -0
- package/src/routes/_nav/workspaces/$workspaceId/settings/route.lazy.tsx +250 -0
- package/src/routes/_nav/workspaces/$workspaceId/settings/route.tsx +27 -0
- package/src/routes/_nav/workspaces/index.lazy.tsx +111 -0
- package/src/routes/_nav/workspaces/index.tsx +24 -0
- package/src/routes/_nav/workspaces/route.tsx +22 -0
- package/src/routes/_public/index/route.tsx +27 -0
- package/src/routes/_public/pricing/route.lazy.tsx +23 -0
- package/src/routes/_public/pricing/route.tsx +30 -0
- package/src/routes/_public/route.tsx +22 -0
- package/src/routes/api/auth/desktop-callback.ts +95 -0
- package/src/routes/api/billing-webhook.ts +49 -0
- package/src/routes/api/chat.ts +108 -0
- package/src/routes/api/design/upload.ts +160 -0
- package/src/routes/api/health.ts +34 -0
- package/src/routes/api/knowledge/sync-github.ts +48 -0
- package/src/routes/api/license/activate/route.ts +50 -0
- package/src/routes/api/license/heartbeat/route.ts +54 -0
- package/src/routes/api/share/prd/$prdId/events.ts +52 -0
- package/src/routes/api/story-ai.ts +40 -0
- package/src/routes/api.auth.$.ts +31 -0
- package/src/routes/design-files/$projectId/$artboardId/$filename.ts +60 -0
- package/src/routes/invite/$token/route.lazy.tsx +75 -0
- package/src/routes/invite/$token/route.tsx +29 -0
- package/src/routes/server/anyhub-proxy/$.ts +54 -0
- package/src/routes/server.ai-stream.ts +126 -0
- package/src/routes/server.ws.ts +61 -0
- package/src/routes/share/$versionId/route.lazy.tsx +68 -0
- package/src/routes/share/$versionId/route.tsx +31 -0
- package/src/routes/share/compliance/$id/route.lazy.tsx +104 -0
- package/src/routes/share/compliance/$id/route.tsx +30 -0
- package/src/routes/share/law/$id/route.lazy.tsx +107 -0
- package/src/routes/share/law/$id/route.tsx +30 -0
- package/src/routes/share/prd/$prdId/route.tsx +10 -0
- package/src/routes/share/route.tsx +22 -0
- package/src/routes/workspace.tsx +24 -0
- package/src/scss.d.ts +18 -0
- package/src/server/__tests__/agent-client-graph.test.ts +115 -0
- package/src/server/__tests__/agent-crud.test.ts +279 -0
- package/src/server/__tests__/assembly.test.ts +26 -0
- package/src/server/__tests__/audit-middleware.test.ts +70 -0
- package/src/server/__tests__/audit.test.ts +45 -0
- package/src/server/__tests__/builtin-project.test.ts +85 -0
- package/src/server/__tests__/chat-agent-resolve.test.ts +138 -0
- package/src/server/__tests__/chat-conversations.test.ts +223 -0
- package/src/server/__tests__/entitlements.license.test.ts +203 -0
- package/src/server/__tests__/entitlements.test.ts +187 -0
- package/src/server/__tests__/license-routes-oss.test.ts +35 -0
- package/src/server/__tests__/license-routes.test.ts +105 -0
- package/src/server/__tests__/permissions.test.ts +69 -0
- package/src/server/__tests__/pro-services.test.ts +63 -0
- package/src/server/__tests__/resource-registry.test.ts +51 -0
- package/src/server/__tests__/resources.agents.test.ts +132 -0
- package/src/server/__tests__/resources.license.test.ts +109 -0
- package/src/server/__tests__/resources.team-seats.test.ts +71 -0
- package/src/server/__tests__/resources.test.ts +179 -0
- package/src/server/__tests__/skill-crud.test.ts +263 -0
- package/src/server/__tests__/sso-domain.test.ts +86 -0
- package/src/server/__tests__/sso-tokens.test.ts +31 -0
- package/src/server/__tests__/start-client-graph.test.ts +83 -0
- package/src/server/ai-ports.ts +75 -0
- package/src/server/audit.ts +25 -0
- package/src/server/auth-helpers.ts +73 -0
- package/src/server/builtin-project.ts +56 -0
- package/src/server/design/sketch/annotation-parser.ts +160 -0
- package/src/server/design/sketch/code-generator.ts +180 -0
- package/src/server/design/sketch/file-storage.ts +71 -0
- package/src/server/desktop-guest.ts +29 -0
- package/src/server/email/sender.ts +21 -0
- package/src/server/entitlements-token-client.ts +32 -0
- package/src/server/entitlements-token.ts +137 -0
- package/src/server/entitlements.ts +211 -0
- package/src/server/keepalive/middleware.ts +44 -0
- package/src/server/knowledge-public/canonical-id.ts +60 -0
- package/src/server/knowledge-public/favicon.ts +74 -0
- package/src/server/knowledge-public/github-sync.ts +111 -0
- package/src/server/knowledge-public/share-merge.ts +92 -0
- package/src/server/middlewares/audit-recorder.ts +37 -0
- package/src/server/middlewares/audit.ts +20 -0
- package/src/server/middlewares/rate-limit-server-fn.ts +1 -0
- package/src/server/middlewares/request.ts +26 -0
- package/src/server/permissions.ts +44 -0
- package/src/server/pro-services.ts +24 -0
- package/src/server/references/engine.ts +104 -0
- package/src/server/remote-auth.ts +60 -0
- package/src/server/resources.ts +189 -0
- package/src/server/serverFns/__tests__/compliance.test.ts +138 -0
- package/src/server/serverFns/__tests__/project-team-assign.test.ts +90 -0
- package/src/server/serverFns/__tests__/team-accept.test.ts +103 -0
- package/src/server/serverFns/__tests__/team-invitation.test.ts +143 -0
- package/src/server/serverFns/__tests__/team-members.test.ts +201 -0
- package/src/server/serverFns/__tests__/update-seats.test.ts +171 -0
- package/src/server/serverFns/__tests__/workspace.test.ts +418 -0
- package/src/server/serverFns/activity.ts +114 -0
- package/src/server/serverFns/agents/agent-crud.ts +231 -0
- package/src/server/serverFns/agents/resolve-overrides.ts +66 -0
- package/src/server/serverFns/agents/skill-crud.ts +188 -0
- package/src/server/serverFns/ai/agent-conversations.ts +1 -0
- package/src/server/serverFns/ai/detect.ts +34 -0
- package/src/server/serverFns/ai/execute.ts +36 -0
- package/src/server/serverFns/ai/fill-annotation.ts +1 -0
- package/src/server/serverFns/ai/generate-prototype.ts +1 -0
- package/src/server/serverFns/ai/providers.ts +1 -0
- package/src/server/serverFns/analytics.ts +40 -0
- package/src/server/serverFns/anyhub/app.ts +68 -0
- package/src/server/serverFns/anyhub/index.ts +76 -0
- package/src/server/serverFns/anyhub/install.ts +57 -0
- package/src/server/serverFns/anyhub/permissions.ts +45 -0
- package/src/server/serverFns/anyhub/proxy.ts +44 -0
- package/src/server/serverFns/auth/forgot-password.ts +55 -0
- package/src/server/serverFns/auth/invitation.ts +48 -0
- package/src/server/serverFns/auth/providers.ts +27 -0
- package/src/server/serverFns/auth/register.ts +56 -0
- package/src/server/serverFns/auth/reset-password.ts +68 -0
- package/src/server/serverFns/auth/session.ts +126 -0
- package/src/server/serverFns/billing.ts +167 -0
- package/src/server/serverFns/chat/conversations.ts +134 -0
- package/src/server/serverFns/chat/list-messages.ts +36 -0
- package/src/server/serverFns/comments.ts +1 -0
- package/src/server/serverFns/compliance.ts +42 -0
- package/src/server/serverFns/components.ts +1 -0
- package/src/server/serverFns/design/settings.ts +72 -0
- package/src/server/serverFns/design.ts +109 -0
- package/src/server/serverFns/knowledge-index.ts +147 -0
- package/src/server/serverFns/knowledge-public/bookmarks/categories.ts +67 -0
- package/src/server/serverFns/knowledge-public/bookmarks/create.ts +86 -0
- package/src/server/serverFns/knowledge-public/bookmarks/delete.ts +36 -0
- package/src/server/serverFns/knowledge-public/bookmarks/detail.ts +63 -0
- package/src/server/serverFns/knowledge-public/bookmarks/favorite.ts +38 -0
- package/src/server/serverFns/knowledge-public/bookmarks/list.ts +128 -0
- package/src/server/serverFns/knowledge-public/bookmarks/refresh-favicon.ts +31 -0
- package/src/server/serverFns/knowledge-public/bookmarks/share.ts +74 -0
- package/src/server/serverFns/knowledge-public/bookmarks/sync-github.ts +31 -0
- package/src/server/serverFns/knowledge-public/bookmarks/unshare.ts +44 -0
- package/src/server/serverFns/knowledge-public/bookmarks/update.ts +90 -0
- package/src/server/serverFns/knowledge-public/compliance/create.ts +60 -0
- package/src/server/serverFns/knowledge-public/compliance/delete.ts +36 -0
- package/src/server/serverFns/knowledge-public/compliance/detail.ts +48 -0
- package/src/server/serverFns/knowledge-public/compliance/list.ts +95 -0
- package/src/server/serverFns/knowledge-public/compliance/public.ts +38 -0
- package/src/server/serverFns/knowledge-public/compliance/share.ts +62 -0
- package/src/server/serverFns/knowledge-public/compliance/unshare.ts +33 -0
- package/src/server/serverFns/knowledge-public/compliance/update.ts +59 -0
- package/src/server/serverFns/knowledge-public/dictionary/create.ts +55 -0
- package/src/server/serverFns/knowledge-public/dictionary/delete.ts +36 -0
- package/src/server/serverFns/knowledge-public/dictionary/detail.ts +43 -0
- package/src/server/serverFns/knowledge-public/dictionary/list.ts +83 -0
- package/src/server/serverFns/knowledge-public/dictionary/share.ts +60 -0
- package/src/server/serverFns/knowledge-public/dictionary/unshare.ts +33 -0
- package/src/server/serverFns/knowledge-public/dictionary/update.ts +56 -0
- package/src/server/serverFns/knowledge-public/entity-tags.ts +50 -0
- package/src/server/serverFns/knowledge-public/favorite.ts +54 -0
- package/src/server/serverFns/knowledge-public/legal/create.ts +64 -0
- package/src/server/serverFns/knowledge-public/legal/delete.ts +36 -0
- package/src/server/serverFns/knowledge-public/legal/detail.ts +48 -0
- package/src/server/serverFns/knowledge-public/legal/list.ts +97 -0
- package/src/server/serverFns/knowledge-public/legal/public.ts +38 -0
- package/src/server/serverFns/knowledge-public/legal/share.ts +64 -0
- package/src/server/serverFns/knowledge-public/legal/unshare.ts +33 -0
- package/src/server/serverFns/knowledge-public/legal/update.ts +61 -0
- package/src/server/serverFns/knowledge.ts +577 -0
- package/src/server/serverFns/locale.ts +8 -0
- package/src/server/serverFns/project.ts +575 -0
- package/src/server/serverFns/references/create.ts +40 -0
- package/src/server/serverFns/references/resolve.ts +36 -0
- package/src/server/serverFns/references/search.ts +37 -0
- package/src/server/serverFns/reviews.ts +1 -0
- package/src/server/serverFns/settings/account-team.ts +66 -0
- package/src/server/serverFns/share/prd/[prdId]/events.ts +33 -0
- package/src/server/serverFns/share/verify-password.ts +1 -0
- package/src/server/serverFns/share/version.ts +70 -0
- package/src/server/serverFns/share/versions.ts +1 -0
- package/src/server/serverFns/sso.ts +27 -0
- package/src/server/serverFns/story/__tests__/bulk.test.ts +156 -0
- package/src/server/serverFns/story/__tests__/story-groups.test.ts +329 -0
- package/src/server/serverFns/story/__tests__/story-list-query.test.ts +245 -0
- package/src/server/serverFns/story/index.ts +124 -0
- package/src/server/serverFns/story/story-assoc.ts +186 -0
- package/src/server/serverFns/story/story-attachments.ts +97 -0
- package/src/server/serverFns/story/story-children.ts +42 -0
- package/src/server/serverFns/story/story-comments.ts +174 -0
- package/src/server/serverFns/story/story-crud/activities.ts +76 -0
- package/src/server/serverFns/story/story-crud/archive.ts +79 -0
- package/src/server/serverFns/story/story-crud/bulk.ts +192 -0
- package/src/server/serverFns/story/story-crud/detail.ts +66 -0
- package/src/server/serverFns/story/story-crud/labels.ts +66 -0
- package/src/server/serverFns/story/story-crud.ts +384 -0
- package/src/server/serverFns/story/story-dependencies.ts +218 -0
- package/src/server/serverFns/story/story-groups.ts +279 -0
- package/src/server/serverFns/story/story-links.ts +90 -0
- package/src/server/serverFns/story/story-list-query.ts +222 -0
- package/src/server/serverFns/story/story-reactions.ts +135 -0
- package/src/server/serverFns/story/story-search.ts +74 -0
- package/src/server/serverFns/story/story-transfer.ts +409 -0
- package/src/server/serverFns/story/story-tree.ts +123 -0
- package/src/server/serverFns/story/types.ts +223 -0
- package/src/server/serverFns/story-display-options.ts +156 -0
- package/src/server/serverFns/story-view.ts +138 -0
- package/src/server/serverFns/team.ts +330 -0
- package/src/server/serverFns/translation.ts +50 -0
- package/src/server/serverFns/user/avatar.ts +40 -0
- package/src/server/serverFns/user/settings.ts +38 -0
- package/src/server/serverFns/user/update-locale.ts +18 -0
- package/src/server/serverFns/web-search.ts +69 -0
- package/src/server/serverFns/workspace.ts +231 -0
- package/src/server/serverFns/ws.ts +38 -0
- package/src/server/sso/tokens.ts +69 -0
- package/src/server/team-access.ts +16 -0
- package/src/start.ts +102 -0
- package/src/styles/_keyframe-animations.scss +91 -0
- package/src/styles/_variables.scss +294 -0
- package/src/styles/globals.css +477 -0
- package/src/types/jest-dom-vitest.d.ts +31 -0
- package/src/types/outline.ts +1 -0
- package/src/types/prd.ts +1 -0
- package/src/types/project.ts +103 -0
- package/src/types/prototype.ts +1 -0
- package/src/types/start-authjs.d.ts +33 -0
- package/src/types/workspace.ts +18 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
//
|
|
5
|
+
// This program is free software: you can redistribute it and/or modify
|
|
6
|
+
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
// (at your option) any later version.
|
|
9
|
+
//
|
|
10
|
+
// This program is distributed in the hope that it will be useful,
|
|
11
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
// GNU Affero General Public License for more details.
|
|
14
|
+
//
|
|
15
|
+
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
import * as React from "react"
|
|
19
|
+
|
|
20
|
+
const MOBILE_BREAKPOINT = 768
|
|
21
|
+
|
|
22
|
+
export function useIsMobile() {
|
|
23
|
+
const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)
|
|
24
|
+
|
|
25
|
+
React.useEffect(() => {
|
|
26
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)
|
|
27
|
+
const onChange = () => {
|
|
28
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
|
|
29
|
+
}
|
|
30
|
+
mql.addEventListener("change", onChange)
|
|
31
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
|
|
32
|
+
return () => mql.removeEventListener("change", onChange)
|
|
33
|
+
}, [])
|
|
34
|
+
|
|
35
|
+
return !!isMobile
|
|
36
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
//
|
|
5
|
+
// This program is free software: you can redistribute it and/or modify
|
|
6
|
+
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
// (at your option) any later version.
|
|
9
|
+
//
|
|
10
|
+
// This program is distributed in the hope that it will be useful,
|
|
11
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
// GNU Affero General Public License for more details.
|
|
14
|
+
//
|
|
15
|
+
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
import type { RefObject } from "react"
|
|
19
|
+
import { useCallback, useEffect, useState } from "react"
|
|
20
|
+
import { useDebouncedCallback } from "@tanstack/react-pacer"
|
|
21
|
+
|
|
22
|
+
type ScrollTarget = RefObject<HTMLElement> | Window | null | undefined
|
|
23
|
+
type EventTargetWithScroll = Window | HTMLElement | Document
|
|
24
|
+
|
|
25
|
+
interface UseScrollingOptions {
|
|
26
|
+
debounce?: number
|
|
27
|
+
fallbackToDocument?: boolean
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function useScrolling(
|
|
31
|
+
target?: ScrollTarget,
|
|
32
|
+
options: UseScrollingOptions = {}
|
|
33
|
+
): boolean {
|
|
34
|
+
const { debounce = 150, fallbackToDocument = true } = options
|
|
35
|
+
const [isScrolling, setIsScrolling] = useState(false)
|
|
36
|
+
|
|
37
|
+
const debouncedSetFalse = useDebouncedCallback(
|
|
38
|
+
(value: boolean) => setIsScrolling(value),
|
|
39
|
+
{ wait: debounce }
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
const element: EventTargetWithScroll =
|
|
44
|
+
target && typeof Window !== "undefined" && target instanceof Window
|
|
45
|
+
? target
|
|
46
|
+
: ((target as RefObject<HTMLElement>)?.current ?? window)
|
|
47
|
+
|
|
48
|
+
const eventTarget: EventTargetWithScroll =
|
|
49
|
+
fallbackToDocument &&
|
|
50
|
+
element === window &&
|
|
51
|
+
typeof document !== "undefined"
|
|
52
|
+
? document
|
|
53
|
+
: element
|
|
54
|
+
|
|
55
|
+
const on = (
|
|
56
|
+
el: EventTargetWithScroll,
|
|
57
|
+
event: string,
|
|
58
|
+
handler: EventListener
|
|
59
|
+
) => el.addEventListener(event, handler, true)
|
|
60
|
+
|
|
61
|
+
const off = (
|
|
62
|
+
el: EventTargetWithScroll,
|
|
63
|
+
event: string,
|
|
64
|
+
handler: EventListener
|
|
65
|
+
) => el.removeEventListener(event, handler)
|
|
66
|
+
|
|
67
|
+
const supportsScrollEnd = element === window && "onscrollend" in window
|
|
68
|
+
|
|
69
|
+
const handleScroll: EventListener = () => {
|
|
70
|
+
if (!isScrolling) {
|
|
71
|
+
setIsScrolling(true)
|
|
72
|
+
}
|
|
73
|
+
if (!supportsScrollEnd) {
|
|
74
|
+
debouncedSetFalse(false)
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const handleScrollEnd: EventListener = () => setIsScrolling(false)
|
|
79
|
+
|
|
80
|
+
on(eventTarget, "scroll", handleScroll)
|
|
81
|
+
if (supportsScrollEnd) {
|
|
82
|
+
on(eventTarget, "scrollend", handleScrollEnd)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return () => {
|
|
86
|
+
off(eventTarget, "scroll", handleScroll)
|
|
87
|
+
if (supportsScrollEnd) {
|
|
88
|
+
off(eventTarget, "scrollend", handleScrollEnd)
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}, [target, debounce, fallbackToDocument, isScrolling, debouncedSetFalse])
|
|
92
|
+
|
|
93
|
+
return isScrolling
|
|
94
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
//
|
|
5
|
+
// This program is free software: you can redistribute it and/or modify
|
|
6
|
+
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
// (at your option) any later version.
|
|
9
|
+
//
|
|
10
|
+
// This program is distributed in the hope that it will be useful,
|
|
11
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
// GNU Affero General Public License for more details.
|
|
14
|
+
//
|
|
15
|
+
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
import { useThrottledCallback } from '@tanstack/react-pacer'
|
|
19
|
+
export { useThrottledCallback }
|
|
20
|
+
export default useThrottledCallback
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
//
|
|
5
|
+
// This program is free software: you can redistribute it and/or modify
|
|
6
|
+
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
// (at your option) any later version.
|
|
9
|
+
//
|
|
10
|
+
// This program is distributed in the hope that it will be useful,
|
|
11
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
// GNU Affero General Public License for more details.
|
|
14
|
+
//
|
|
15
|
+
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
import { useRef, useEffect } from "react"
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Hook that executes a callback when the component unmounts.
|
|
22
|
+
*
|
|
23
|
+
* @param callback Function to be called on component unmount
|
|
24
|
+
*/
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26
|
+
export const useUnmount = (callback: (...args: Array<any>) => any) => {
|
|
27
|
+
const ref = useRef(callback)
|
|
28
|
+
ref.current = callback
|
|
29
|
+
|
|
30
|
+
useEffect(
|
|
31
|
+
() => () => {
|
|
32
|
+
ref.current()
|
|
33
|
+
},
|
|
34
|
+
[]
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export default useUnmount
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
//
|
|
5
|
+
// This program is free software: you can redistribute it and/or modify
|
|
6
|
+
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
// (at your option) any later version.
|
|
9
|
+
//
|
|
10
|
+
// This program is distributed in the hope that it will be useful,
|
|
11
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
// GNU Affero General Public License for more details.
|
|
14
|
+
//
|
|
15
|
+
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
import { useEffect, useRef, useCallback } from "react";
|
|
19
|
+
|
|
20
|
+
interface UsePollingOptions {
|
|
21
|
+
interval?: number;
|
|
22
|
+
enabled?: boolean;
|
|
23
|
+
cacheMs?: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface PollingCache {
|
|
27
|
+
[key: string]: {
|
|
28
|
+
data: unknown;
|
|
29
|
+
timestamp: number;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const cache: PollingCache = {};
|
|
34
|
+
|
|
35
|
+
export function usePolling<T>(
|
|
36
|
+
fetchFn: () => Promise<T>,
|
|
37
|
+
key: string,
|
|
38
|
+
options: UsePollingOptions = {}
|
|
39
|
+
) {
|
|
40
|
+
const { interval = 18000, enabled = true, cacheMs = 5000 } = options;
|
|
41
|
+
const isMountedRef = useRef(true);
|
|
42
|
+
const timeoutRef = useRef<NodeJS.Timeout | null>(null);
|
|
43
|
+
const isPollingRef = useRef(false);
|
|
44
|
+
|
|
45
|
+
const clearPolling = useCallback(() => {
|
|
46
|
+
if (timeoutRef.current) {
|
|
47
|
+
clearTimeout(timeoutRef.current);
|
|
48
|
+
timeoutRef.current = null;
|
|
49
|
+
}
|
|
50
|
+
}, []);
|
|
51
|
+
|
|
52
|
+
const executeFetch = useCallback(async (): Promise<T | null> => {
|
|
53
|
+
const now = Date.now();
|
|
54
|
+
const cached = cache[key];
|
|
55
|
+
|
|
56
|
+
if (cached && now - cached.timestamp < cacheMs) {
|
|
57
|
+
return cached.data as T;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (isPollingRef.current) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
isPollingRef.current = true;
|
|
65
|
+
|
|
66
|
+
try {
|
|
67
|
+
const result = await fetchFn();
|
|
68
|
+
if (isMountedRef.current) {
|
|
69
|
+
cache[key] = { data: result, timestamp: now };
|
|
70
|
+
}
|
|
71
|
+
return result;
|
|
72
|
+
} catch {
|
|
73
|
+
return null;
|
|
74
|
+
} finally {
|
|
75
|
+
isPollingRef.current = false;
|
|
76
|
+
}
|
|
77
|
+
}, [fetchFn, key, cacheMs]);
|
|
78
|
+
|
|
79
|
+
const startPolling = useCallback(() => {
|
|
80
|
+
if (!enabled || !isMountedRef.current) return;
|
|
81
|
+
|
|
82
|
+
executeFetch().then((result) => {
|
|
83
|
+
if (!isMountedRef.current || result === null) return;
|
|
84
|
+
|
|
85
|
+
timeoutRef.current = setTimeout(() => {
|
|
86
|
+
startPolling();
|
|
87
|
+
}, interval);
|
|
88
|
+
});
|
|
89
|
+
}, [enabled, interval, executeFetch]);
|
|
90
|
+
|
|
91
|
+
useEffect(() => {
|
|
92
|
+
const handleVisibilityChange = () => {
|
|
93
|
+
if (document.hidden) {
|
|
94
|
+
clearPolling();
|
|
95
|
+
} else {
|
|
96
|
+
startPolling();
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
if (enabled) {
|
|
101
|
+
startPolling();
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
105
|
+
|
|
106
|
+
return () => {
|
|
107
|
+
isMountedRef.current = false;
|
|
108
|
+
clearPolling();
|
|
109
|
+
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
110
|
+
};
|
|
111
|
+
}, [enabled, clearPolling, startPolling]);
|
|
112
|
+
|
|
113
|
+
const refetch = useCallback(async (ignoreCache = false) => {
|
|
114
|
+
if (ignoreCache) {
|
|
115
|
+
delete cache[key];
|
|
116
|
+
}
|
|
117
|
+
return executeFetch();
|
|
118
|
+
}, [executeFetch, key]);
|
|
119
|
+
|
|
120
|
+
return { refetch, clearPolling };
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function clearPollingCache(key?: string) {
|
|
124
|
+
if (key) {
|
|
125
|
+
delete cache[key];
|
|
126
|
+
} else {
|
|
127
|
+
Object.keys(cache).forEach(k => delete cache[k]);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
//
|
|
5
|
+
// This program is free software: you can redistribute it and/or modify
|
|
6
|
+
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
// (at your option) any later version.
|
|
9
|
+
//
|
|
10
|
+
// This program is distributed in the hope that it will be useful,
|
|
11
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
// GNU Affero General Public License for more details.
|
|
14
|
+
//
|
|
15
|
+
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
import { useState, useEffect, useRef } from "react";
|
|
20
|
+
import { translateFn } from '@/server/serverFns/translation'
|
|
21
|
+
|
|
22
|
+
interface TranslationCache {
|
|
23
|
+
[key: string]: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const translationCache: TranslationCache = {};
|
|
27
|
+
|
|
28
|
+
export function useTranslator(text: string) {
|
|
29
|
+
const [translatedText, setTranslatedText] = useState("");
|
|
30
|
+
const [isTranslating, setIsTranslating] = useState(false);
|
|
31
|
+
const [error, setError] = useState<string | null>(null);
|
|
32
|
+
const abortRef = useRef<AbortController | null>(null);
|
|
33
|
+
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (!text) {
|
|
36
|
+
setTranslatedText("");
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const cacheKey = text.trim();
|
|
41
|
+
if (translationCache[cacheKey]) {
|
|
42
|
+
setTranslatedText(translationCache[cacheKey]);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (abortRef.current) {
|
|
47
|
+
abortRef.current.abort();
|
|
48
|
+
}
|
|
49
|
+
abortRef.current = new AbortController();
|
|
50
|
+
|
|
51
|
+
async function translate() {
|
|
52
|
+
setIsTranslating(true);
|
|
53
|
+
setError(null);
|
|
54
|
+
|
|
55
|
+
try {
|
|
56
|
+
const data = await translateFn({ data: { text, from: 'auto', to: 'zh-CN' } })
|
|
57
|
+
if (data.translated) {
|
|
58
|
+
translationCache[cacheKey] = data.translated;
|
|
59
|
+
setTranslatedText(data.translated);
|
|
60
|
+
}
|
|
61
|
+
} catch (err) {
|
|
62
|
+
if ((err as Error).name !== "AbortError") {
|
|
63
|
+
setError(err instanceof Error ? err.message : "翻译失败");
|
|
64
|
+
}
|
|
65
|
+
} finally {
|
|
66
|
+
setIsTranslating(false);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
translate();
|
|
71
|
+
|
|
72
|
+
return () => {
|
|
73
|
+
if (abortRef.current) {
|
|
74
|
+
abortRef.current.abort();
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
}, [text]);
|
|
78
|
+
|
|
79
|
+
return { translatedText, isTranslating, error };
|
|
80
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
//
|
|
5
|
+
// This program is free software: you can redistribute it and/or modify
|
|
6
|
+
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
// (at your option) any later version.
|
|
9
|
+
//
|
|
10
|
+
// This program is distributed in the hope that it will be useful,
|
|
11
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
// GNU Affero General Public License for more details.
|
|
14
|
+
//
|
|
15
|
+
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
export const locales = ["zh-CN", "en"] as const;
|
|
19
|
+
export type Locale = (typeof locales)[number];
|
|
20
|
+
export const defaultLocale: Locale = "zh-CN";
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
//
|
|
5
|
+
// This program is free software: you can redistribute it and/or modify
|
|
6
|
+
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
// (at your option) any later version.
|
|
9
|
+
//
|
|
10
|
+
// This program is distributed in the hope that it will be useful,
|
|
11
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
// GNU Affero General Public License for more details.
|
|
14
|
+
//
|
|
15
|
+
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
import { describe, it, expect, vi, beforeEach } from 'vitest'
|
|
19
|
+
|
|
20
|
+
describe('getActiveAgent / switchAgent', () => {
|
|
21
|
+
beforeEach(() => {
|
|
22
|
+
vi.resetModules()
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
it('returns null when no agent is active', async () => {
|
|
26
|
+
const { getActiveAgent } = await import('@allbluecn/shared/infrastructure/ai/adapter')
|
|
27
|
+
expect(getActiveAgent()).toBeNull()
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
it('switchAgent sets active agent', async () => {
|
|
31
|
+
const { switchAgent, getActiveAgent } = await import('@allbluecn/shared/infrastructure/ai/adapter')
|
|
32
|
+
switchAgent('openai-api')
|
|
33
|
+
expect(getActiveAgent()).toBe('openai-api')
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
it('switchAgent overwrites previous agent', async () => {
|
|
37
|
+
const { switchAgent, getActiveAgent } = await import('@allbluecn/shared/infrastructure/ai/adapter')
|
|
38
|
+
switchAgent('claude-code')
|
|
39
|
+
switchAgent('ollama')
|
|
40
|
+
expect(getActiveAgent()).toBe('ollama')
|
|
41
|
+
})
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
describe('executeViaAgent', () => {
|
|
45
|
+
beforeEach(() => {
|
|
46
|
+
vi.resetModules()
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
it('calls OpenAI API for openai-api agent', async () => {
|
|
50
|
+
const mockFetch = vi.fn().mockResolvedValue({
|
|
51
|
+
json: () => Promise.resolve({ choices: [{ message: { content: 'Hello!' } }] }),
|
|
52
|
+
})
|
|
53
|
+
vi.stubGlobal('fetch', mockFetch)
|
|
54
|
+
process.env.OPENAI_API_KEY = 'sk-test'
|
|
55
|
+
process.env.AI_BASE_URL = 'https://test.api.com/v1'
|
|
56
|
+
|
|
57
|
+
const { executeViaAgent } = await import('@allbluecn/shared/infrastructure/ai/adapter')
|
|
58
|
+
const result = await executeViaAgent(
|
|
59
|
+
{ id: 'openai-api', name: 'OpenAI', binary: 'api', version: 'v1', available: true },
|
|
60
|
+
'Say hello',
|
|
61
|
+
{} as any
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
expect(mockFetch).toHaveBeenCalledWith(
|
|
65
|
+
'https://test.api.com/v1/chat/completions',
|
|
66
|
+
expect.objectContaining({
|
|
67
|
+
method: 'POST',
|
|
68
|
+
headers: expect.objectContaining({ Authorization: 'Bearer sk-test' }),
|
|
69
|
+
})
|
|
70
|
+
)
|
|
71
|
+
expect(result).toBe('Hello!')
|
|
72
|
+
vi.unstubAllGlobals()
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
it('returns empty string on empty response', async () => {
|
|
76
|
+
const mockFetch = vi.fn().mockResolvedValue({
|
|
77
|
+
json: () => Promise.resolve({ choices: [] }),
|
|
78
|
+
})
|
|
79
|
+
vi.stubGlobal('fetch', mockFetch)
|
|
80
|
+
process.env.OPENAI_API_KEY = 'sk-test'
|
|
81
|
+
|
|
82
|
+
const { executeViaAgent } = await import('@allbluecn/shared/infrastructure/ai/adapter')
|
|
83
|
+
const result = await executeViaAgent(
|
|
84
|
+
{ id: 'openai-api', name: 'OpenAI', binary: 'api', version: 'v1', available: true },
|
|
85
|
+
'Say hello',
|
|
86
|
+
{} as any
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
expect(result).toBe('')
|
|
90
|
+
vi.unstubAllGlobals()
|
|
91
|
+
})
|
|
92
|
+
})
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
//
|
|
5
|
+
// This program is free software: you can redistribute it and/or modify
|
|
6
|
+
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
// (at your option) any later version.
|
|
9
|
+
//
|
|
10
|
+
// This program is distributed in the hope that it will be useful,
|
|
11
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
// GNU Affero General Public License for more details.
|
|
14
|
+
//
|
|
15
|
+
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
import { describe, it, expect, vi, beforeEach } from 'vitest'
|
|
19
|
+
|
|
20
|
+
describe('getApiAgent', () => {
|
|
21
|
+
beforeEach(() => {
|
|
22
|
+
vi.resetModules()
|
|
23
|
+
delete process.env.OPENAI_API_KEY
|
|
24
|
+
delete process.env.AI_MODEL
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
it('returns undefined when no API key set', async () => {
|
|
28
|
+
const { getApiAgent } = await import('@allbluecn/shared/infrastructure/ai/cli-detector')
|
|
29
|
+
expect(getApiAgent()).toBeUndefined()
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
it('returns undefined when API key is placeholder', async () => {
|
|
33
|
+
process.env.OPENAI_API_KEY = 'sk-your-api-key-here'
|
|
34
|
+
const { getApiAgent } = await import('@allbluecn/shared/infrastructure/ai/cli-detector')
|
|
35
|
+
expect(getApiAgent()).toBeUndefined()
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
it('returns agent info when API key is valid', async () => {
|
|
39
|
+
process.env.OPENAI_API_KEY = 'sk-real-key'
|
|
40
|
+
const { getApiAgent } = await import('@allbluecn/shared/infrastructure/ai/cli-detector')
|
|
41
|
+
const agent = getApiAgent()
|
|
42
|
+
expect(agent).toBeDefined()
|
|
43
|
+
expect(agent?.id).toBe('openai-api')
|
|
44
|
+
expect(agent?.available).toBe(true)
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
it('uses AI_MODEL env in display name', async () => {
|
|
48
|
+
process.env.OPENAI_API_KEY = 'sk-real-key'
|
|
49
|
+
process.env.AI_MODEL = 'gpt-4'
|
|
50
|
+
const { getApiAgent } = await import('@allbluecn/shared/infrastructure/ai/cli-detector')
|
|
51
|
+
expect(getApiAgent()?.name).toContain('gpt-4')
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
describe('detectAgents', () => {
|
|
56
|
+
beforeEach(() => {
|
|
57
|
+
vi.resetModules()
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
it('returns 16 known agents with executable check', async () => {
|
|
61
|
+
const { detectAgents } = await import('@allbluecn/shared/infrastructure/ai/cli-detector')
|
|
62
|
+
const agents = await detectAgents()
|
|
63
|
+
expect(agents).toHaveLength(16)
|
|
64
|
+
agents.forEach(a => {
|
|
65
|
+
expect(a.id).toBeDefined()
|
|
66
|
+
expect(a.binary).toBeDefined()
|
|
67
|
+
})
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
it('handles all agents failing gracefully', async () => {
|
|
71
|
+
vi.doMock('child_process', () => ({
|
|
72
|
+
execSync: vi.fn(() => { throw new Error('not found') }),
|
|
73
|
+
}))
|
|
74
|
+
|
|
75
|
+
const { detectAgents } = await import('@allbluecn/shared/infrastructure/ai/cli-detector')
|
|
76
|
+
const agents = await detectAgents()
|
|
77
|
+
expect(agents).toHaveLength(16)
|
|
78
|
+
agents.forEach(a => expect(a.available).toBe(false))
|
|
79
|
+
})
|
|
80
|
+
})
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
//
|
|
5
|
+
// This program is free software: you can redistribute it and/or modify
|
|
6
|
+
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
// (at your option) any later version.
|
|
9
|
+
//
|
|
10
|
+
// This program is distributed in the hope that it will be useful,
|
|
11
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
// GNU Affero General Public License for more details.
|
|
14
|
+
//
|
|
15
|
+
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
import { describe, it, expect } from 'vitest'
|
|
19
|
+
import {
|
|
20
|
+
getMonthGrid,
|
|
21
|
+
isSameDay,
|
|
22
|
+
formatDate,
|
|
23
|
+
parseDate,
|
|
24
|
+
buildTimelineRange,
|
|
25
|
+
getRangeFromDates,
|
|
26
|
+
getWeekGrid,
|
|
27
|
+
} from '../date-utils'
|
|
28
|
+
|
|
29
|
+
describe('date-utils', () => {
|
|
30
|
+
it('getMonthGrid 返回 42 格且 2026-08 首日是周六', () => {
|
|
31
|
+
const grid = getMonthGrid(2026, 7) // 0-based month
|
|
32
|
+
expect(grid).toHaveLength(42)
|
|
33
|
+
expect(formatDate(grid.find((g) => g.inMonth && g.date.getDate() === 1)!.date)).toBe(
|
|
34
|
+
'2026-08-01',
|
|
35
|
+
)
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
it('isSameDay 比较日期', () => {
|
|
39
|
+
expect(isSameDay(new Date(2026, 7, 1), new Date(2026, 7, 1))).toBe(true)
|
|
40
|
+
expect(isSameDay(new Date(2026, 7, 1), new Date(2026, 7, 2))).toBe(false)
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
it('formatDate/parseDate 往返', () => {
|
|
44
|
+
const d = parseDate('2026-08-15')
|
|
45
|
+
expect(formatDate(d)).toBe('2026-08-15')
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
it('parseDate 兼容 ISO 字符串', () => {
|
|
49
|
+
const d = parseDate('2026-08-15T00:00:00.000Z')
|
|
50
|
+
expect(formatDate(d)).toBe('2026-08-15')
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
it('buildTimelineRange 月模式生成月度刻度', () => {
|
|
54
|
+
const range = buildTimelineRange(new Date(2026, 0, 1), new Date(2026, 2, 1), 'month')
|
|
55
|
+
expect(range).toHaveLength(3)
|
|
56
|
+
expect(range[0].label).toBe('2026-01')
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
it('buildTimelineRange 周模式 label 为纯日期且 7 天递增', () => {
|
|
60
|
+
const range = buildTimelineRange(new Date(2026, 0, 1), new Date(2026, 1, 1), 'week')
|
|
61
|
+
expect(range[0].label).toBe('2026-01-01')
|
|
62
|
+
expect(range[1].label).toBe('2026-01-08')
|
|
63
|
+
expect(range.every((t) => /^\d{4}-\d{2}-\d{2}$/.test(t.label))).toBe(true)
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
it('getRangeFromDates 覆盖最早最晚日期', () => {
|
|
67
|
+
const { start, end } = getRangeFromDates([
|
|
68
|
+
new Date(2026, 5, 1),
|
|
69
|
+
new Date(2026, 7, 15),
|
|
70
|
+
])
|
|
71
|
+
expect(start.getFullYear()).toBe(2026)
|
|
72
|
+
expect(end.getMonth()).toBe(7)
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
it('getWeekGrid 返回以周日开始的 7 天', () => {
|
|
76
|
+
const grid = getWeekGrid(2026, 7, 18) // 2026-08-18 周二
|
|
77
|
+
expect(grid).toHaveLength(7)
|
|
78
|
+
expect(formatDate(grid[0].date)).toBe('2026-08-16') // 周日
|
|
79
|
+
expect(formatDate(grid[6].date)).toBe('2026-08-22') // 周六
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
it('getWeekGrid 跨月时 inMonth 标记正确', () => {
|
|
83
|
+
const grid = getWeekGrid(2026, 6, 31) // 2026-07-31 周五,跨 8 月
|
|
84
|
+
expect(grid[6].inMonth).toBe(false)
|
|
85
|
+
})
|
|
86
|
+
})
|