@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,1168 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
import './liquid-ether.css';
|
|
4
|
+
|
|
5
|
+
export default function LiquidEther({
|
|
6
|
+
mouseForce = 20,
|
|
7
|
+
cursorSize = 100,
|
|
8
|
+
isViscous = false,
|
|
9
|
+
viscous = 30,
|
|
10
|
+
iterationsViscous = 32,
|
|
11
|
+
iterationsPoisson = 32,
|
|
12
|
+
dt = 0.014,
|
|
13
|
+
BFECC = true,
|
|
14
|
+
resolution = 0.5,
|
|
15
|
+
isBounce = false,
|
|
16
|
+
colors = ['#5227FF', '#FF9FFC', '#B497CF'],
|
|
17
|
+
style = {},
|
|
18
|
+
className = '',
|
|
19
|
+
autoDemo = true,
|
|
20
|
+
autoSpeed = 0.5,
|
|
21
|
+
autoIntensity = 2.2,
|
|
22
|
+
takeoverDuration = 0.25,
|
|
23
|
+
autoResumeDelay = 1000,
|
|
24
|
+
autoRampDuration = 0.6
|
|
25
|
+
}) {
|
|
26
|
+
const mountRef = useRef(null);
|
|
27
|
+
const webglRef = useRef(null);
|
|
28
|
+
const resizeObserverRef = useRef(null);
|
|
29
|
+
const rafRef = useRef(null);
|
|
30
|
+
const intersectionObserverRef = useRef(null);
|
|
31
|
+
const isVisibleRef = useRef(true);
|
|
32
|
+
const resizeRafRef = useRef(null);
|
|
33
|
+
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (!mountRef.current) return;
|
|
36
|
+
|
|
37
|
+
function makePaletteTexture(stops) {
|
|
38
|
+
let arr;
|
|
39
|
+
if (Array.isArray(stops) && stops.length > 0) {
|
|
40
|
+
if (stops.length === 1) {
|
|
41
|
+
arr = [stops[0], stops[0]];
|
|
42
|
+
} else {
|
|
43
|
+
arr = stops;
|
|
44
|
+
}
|
|
45
|
+
} else {
|
|
46
|
+
arr = ['#ffffff', '#ffffff'];
|
|
47
|
+
}
|
|
48
|
+
const w = arr.length;
|
|
49
|
+
const data = new Uint8Array(w * 4);
|
|
50
|
+
for (let i = 0; i < w; i++) {
|
|
51
|
+
const c = new THREE.Color(arr[i]);
|
|
52
|
+
data[i * 4 + 0] = Math.round(c.r * 255);
|
|
53
|
+
data[i * 4 + 1] = Math.round(c.g * 255);
|
|
54
|
+
data[i * 4 + 2] = Math.round(c.b * 255);
|
|
55
|
+
data[i * 4 + 3] = 255;
|
|
56
|
+
}
|
|
57
|
+
const tex = new THREE.DataTexture(data, w, 1, THREE.RGBAFormat);
|
|
58
|
+
tex.magFilter = THREE.LinearFilter;
|
|
59
|
+
tex.minFilter = THREE.LinearFilter;
|
|
60
|
+
tex.wrapS = THREE.ClampToEdgeWrapping;
|
|
61
|
+
tex.wrapT = THREE.ClampToEdgeWrapping;
|
|
62
|
+
tex.generateMipmaps = false;
|
|
63
|
+
tex.needsUpdate = true;
|
|
64
|
+
return tex;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const paletteTex = makePaletteTexture(colors);
|
|
68
|
+
const bgVec4 = new THREE.Vector4(0, 0, 0, 0); // always transparent
|
|
69
|
+
|
|
70
|
+
class CommonClass {
|
|
71
|
+
constructor() {
|
|
72
|
+
this.width = 0;
|
|
73
|
+
this.height = 0;
|
|
74
|
+
this.aspect = 1;
|
|
75
|
+
this.pixelRatio = 1;
|
|
76
|
+
this.isMobile = false;
|
|
77
|
+
this.breakpoint = 768;
|
|
78
|
+
this.fboWidth = null;
|
|
79
|
+
this.fboHeight = null;
|
|
80
|
+
this.time = 0;
|
|
81
|
+
this.delta = 0;
|
|
82
|
+
this.container = null;
|
|
83
|
+
this.renderer = null;
|
|
84
|
+
this.clock = null;
|
|
85
|
+
}
|
|
86
|
+
init(container) {
|
|
87
|
+
this.container = container;
|
|
88
|
+
this.pixelRatio = Math.min(window.devicePixelRatio || 1, 2);
|
|
89
|
+
this.resize();
|
|
90
|
+
this.renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
|
|
91
|
+
this.renderer.autoClear = false;
|
|
92
|
+
this.renderer.setClearColor(new THREE.Color(0x000000), 0);
|
|
93
|
+
this.renderer.setPixelRatio(this.pixelRatio);
|
|
94
|
+
this.renderer.setSize(this.width, this.height);
|
|
95
|
+
this.renderer.domElement.style.width = '100%';
|
|
96
|
+
this.renderer.domElement.style.height = '100%';
|
|
97
|
+
this.renderer.domElement.style.display = 'block';
|
|
98
|
+
this.clock = new THREE.Clock();
|
|
99
|
+
this.clock.start();
|
|
100
|
+
}
|
|
101
|
+
resize() {
|
|
102
|
+
if (!this.container) return;
|
|
103
|
+
const rect = this.container.getBoundingClientRect();
|
|
104
|
+
this.width = Math.max(1, Math.floor(rect.width));
|
|
105
|
+
this.height = Math.max(1, Math.floor(rect.height));
|
|
106
|
+
this.aspect = this.width / this.height;
|
|
107
|
+
if (this.renderer) this.renderer.setSize(this.width, this.height, false);
|
|
108
|
+
}
|
|
109
|
+
update() {
|
|
110
|
+
this.delta = this.clock.getDelta();
|
|
111
|
+
this.time += this.delta;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
const Common = new CommonClass();
|
|
115
|
+
|
|
116
|
+
class MouseClass {
|
|
117
|
+
constructor() {
|
|
118
|
+
this.mouseMoved = false;
|
|
119
|
+
this.coords = new THREE.Vector2();
|
|
120
|
+
this.coords_old = new THREE.Vector2();
|
|
121
|
+
this.diff = new THREE.Vector2();
|
|
122
|
+
this.timer = null;
|
|
123
|
+
this.container = null;
|
|
124
|
+
this.docTarget = null;
|
|
125
|
+
this.listenerTarget = null;
|
|
126
|
+
this.isHoverInside = false;
|
|
127
|
+
this.hasUserControl = false;
|
|
128
|
+
this.isAutoActive = false;
|
|
129
|
+
this.autoIntensity = 2.0;
|
|
130
|
+
this.takeoverActive = false;
|
|
131
|
+
this.takeoverStartTime = 0;
|
|
132
|
+
this.takeoverDuration = 0.25;
|
|
133
|
+
this.takeoverFrom = new THREE.Vector2();
|
|
134
|
+
this.takeoverTo = new THREE.Vector2();
|
|
135
|
+
this.onInteract = null;
|
|
136
|
+
this._onMouseMove = this.onDocumentMouseMove.bind(this);
|
|
137
|
+
this._onTouchStart = this.onDocumentTouchStart.bind(this);
|
|
138
|
+
this._onTouchMove = this.onDocumentTouchMove.bind(this);
|
|
139
|
+
this._onTouchEnd = this.onTouchEnd.bind(this);
|
|
140
|
+
this._onDocumentLeave = this.onDocumentLeave.bind(this);
|
|
141
|
+
}
|
|
142
|
+
init(container) {
|
|
143
|
+
this.container = container;
|
|
144
|
+
this.docTarget = container.ownerDocument || null;
|
|
145
|
+
const defaultView =
|
|
146
|
+
(this.docTarget && this.docTarget.defaultView) || (typeof window !== 'undefined' ? window : null);
|
|
147
|
+
if (!defaultView) return;
|
|
148
|
+
this.listenerTarget = defaultView;
|
|
149
|
+
this.listenerTarget.addEventListener('mousemove', this._onMouseMove);
|
|
150
|
+
this.listenerTarget.addEventListener('touchstart', this._onTouchStart, { passive: true });
|
|
151
|
+
this.listenerTarget.addEventListener('touchmove', this._onTouchMove, { passive: true });
|
|
152
|
+
this.listenerTarget.addEventListener('touchend', this._onTouchEnd);
|
|
153
|
+
if (this.docTarget) {
|
|
154
|
+
this.docTarget.addEventListener('mouseleave', this._onDocumentLeave);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
dispose() {
|
|
158
|
+
if (this.listenerTarget) {
|
|
159
|
+
this.listenerTarget.removeEventListener('mousemove', this._onMouseMove);
|
|
160
|
+
this.listenerTarget.removeEventListener('touchstart', this._onTouchStart);
|
|
161
|
+
this.listenerTarget.removeEventListener('touchmove', this._onTouchMove);
|
|
162
|
+
this.listenerTarget.removeEventListener('touchend', this._onTouchEnd);
|
|
163
|
+
}
|
|
164
|
+
if (this.docTarget) {
|
|
165
|
+
this.docTarget.removeEventListener('mouseleave', this._onDocumentLeave);
|
|
166
|
+
}
|
|
167
|
+
this.listenerTarget = null;
|
|
168
|
+
this.docTarget = null;
|
|
169
|
+
this.container = null;
|
|
170
|
+
}
|
|
171
|
+
isPointInside(clientX, clientY) {
|
|
172
|
+
if (!this.container) return false;
|
|
173
|
+
const rect = this.container.getBoundingClientRect();
|
|
174
|
+
if (rect.width === 0 || rect.height === 0) return false;
|
|
175
|
+
return clientX >= rect.left && clientX <= rect.right && clientY >= rect.top && clientY <= rect.bottom;
|
|
176
|
+
}
|
|
177
|
+
updateHoverState(clientX, clientY) {
|
|
178
|
+
this.isHoverInside = this.isPointInside(clientX, clientY);
|
|
179
|
+
return this.isHoverInside;
|
|
180
|
+
}
|
|
181
|
+
setCoords(x, y) {
|
|
182
|
+
if (!this.container) return;
|
|
183
|
+
if (this.timer) window.clearTimeout(this.timer);
|
|
184
|
+
const rect = this.container.getBoundingClientRect();
|
|
185
|
+
if (rect.width === 0 || rect.height === 0) return;
|
|
186
|
+
const nx = (x - rect.left) / rect.width;
|
|
187
|
+
const ny = (y - rect.top) / rect.height;
|
|
188
|
+
this.coords.set(nx * 2 - 1, -(ny * 2 - 1));
|
|
189
|
+
this.mouseMoved = true;
|
|
190
|
+
this.timer = window.setTimeout(() => {
|
|
191
|
+
this.mouseMoved = false;
|
|
192
|
+
}, 100);
|
|
193
|
+
}
|
|
194
|
+
setNormalized(nx, ny) {
|
|
195
|
+
this.coords.set(nx, ny);
|
|
196
|
+
this.mouseMoved = true;
|
|
197
|
+
}
|
|
198
|
+
onDocumentMouseMove(event) {
|
|
199
|
+
if (!this.updateHoverState(event.clientX, event.clientY)) return;
|
|
200
|
+
if (this.onInteract) this.onInteract();
|
|
201
|
+
if (this.isAutoActive && !this.hasUserControl && !this.takeoverActive) {
|
|
202
|
+
if (!this.container) return;
|
|
203
|
+
const rect = this.container.getBoundingClientRect();
|
|
204
|
+
if (rect.width === 0 || rect.height === 0) return;
|
|
205
|
+
const nx = (event.clientX - rect.left) / rect.width;
|
|
206
|
+
const ny = (event.clientY - rect.top) / rect.height;
|
|
207
|
+
this.takeoverFrom.copy(this.coords);
|
|
208
|
+
this.takeoverTo.set(nx * 2 - 1, -(ny * 2 - 1));
|
|
209
|
+
this.takeoverStartTime = performance.now();
|
|
210
|
+
this.takeoverActive = true;
|
|
211
|
+
this.hasUserControl = true;
|
|
212
|
+
this.isAutoActive = false;
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
this.setCoords(event.clientX, event.clientY);
|
|
216
|
+
this.hasUserControl = true;
|
|
217
|
+
}
|
|
218
|
+
onDocumentTouchStart(event) {
|
|
219
|
+
if (event.touches.length !== 1) return;
|
|
220
|
+
const t = event.touches[0];
|
|
221
|
+
if (!this.updateHoverState(t.clientX, t.clientY)) return;
|
|
222
|
+
if (this.onInteract) this.onInteract();
|
|
223
|
+
this.setCoords(t.clientX, t.clientY);
|
|
224
|
+
this.hasUserControl = true;
|
|
225
|
+
}
|
|
226
|
+
onDocumentTouchMove(event) {
|
|
227
|
+
if (event.touches.length !== 1) return;
|
|
228
|
+
const t = event.touches[0];
|
|
229
|
+
if (!this.updateHoverState(t.clientX, t.clientY)) return;
|
|
230
|
+
if (this.onInteract) this.onInteract();
|
|
231
|
+
this.setCoords(t.clientX, t.clientY);
|
|
232
|
+
}
|
|
233
|
+
onTouchEnd() {
|
|
234
|
+
this.isHoverInside = false;
|
|
235
|
+
}
|
|
236
|
+
onDocumentLeave() {
|
|
237
|
+
this.isHoverInside = false;
|
|
238
|
+
}
|
|
239
|
+
update() {
|
|
240
|
+
if (this.takeoverActive) {
|
|
241
|
+
const t = (performance.now() - this.takeoverStartTime) / (this.takeoverDuration * 1000);
|
|
242
|
+
if (t >= 1) {
|
|
243
|
+
this.takeoverActive = false;
|
|
244
|
+
this.coords.copy(this.takeoverTo);
|
|
245
|
+
this.coords_old.copy(this.coords);
|
|
246
|
+
this.diff.set(0, 0);
|
|
247
|
+
} else {
|
|
248
|
+
const k = t * t * (3 - 2 * t);
|
|
249
|
+
this.coords.copy(this.takeoverFrom).lerp(this.takeoverTo, k);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
this.diff.subVectors(this.coords, this.coords_old);
|
|
253
|
+
this.coords_old.copy(this.coords);
|
|
254
|
+
if (this.coords_old.x === 0 && this.coords_old.y === 0) this.diff.set(0, 0);
|
|
255
|
+
if (this.isAutoActive && !this.takeoverActive) this.diff.multiplyScalar(this.autoIntensity);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
const Mouse = new MouseClass();
|
|
259
|
+
|
|
260
|
+
class AutoDriver {
|
|
261
|
+
constructor(mouse, manager, opts) {
|
|
262
|
+
this.mouse = mouse;
|
|
263
|
+
this.manager = manager;
|
|
264
|
+
this.enabled = opts.enabled;
|
|
265
|
+
this.speed = opts.speed; // normalized units/sec
|
|
266
|
+
this.resumeDelay = opts.resumeDelay || 3000; // ms
|
|
267
|
+
this.rampDurationMs = (opts.rampDuration || 0) * 1000;
|
|
268
|
+
this.active = false;
|
|
269
|
+
this.current = new THREE.Vector2(0, 0);
|
|
270
|
+
this.target = new THREE.Vector2();
|
|
271
|
+
this.lastTime = performance.now();
|
|
272
|
+
this.activationTime = 0;
|
|
273
|
+
this.margin = 0.2;
|
|
274
|
+
this._tmpDir = new THREE.Vector2(); // reuse temp vector to avoid per-frame alloc
|
|
275
|
+
this.pickNewTarget();
|
|
276
|
+
}
|
|
277
|
+
pickNewTarget() {
|
|
278
|
+
const r = Math.random;
|
|
279
|
+
this.target.set((r() * 2 - 1) * (1 - this.margin), (r() * 2 - 1) * (1 - this.margin));
|
|
280
|
+
}
|
|
281
|
+
forceStop() {
|
|
282
|
+
this.active = false;
|
|
283
|
+
this.mouse.isAutoActive = false;
|
|
284
|
+
}
|
|
285
|
+
update() {
|
|
286
|
+
if (!this.enabled) return;
|
|
287
|
+
const now = performance.now();
|
|
288
|
+
const idle = now - this.manager.lastUserInteraction;
|
|
289
|
+
if (idle < this.resumeDelay) {
|
|
290
|
+
if (this.active) this.forceStop();
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
if (this.mouse.isHoverInside) {
|
|
294
|
+
if (this.active) this.forceStop();
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
if (!this.active) {
|
|
298
|
+
this.active = true;
|
|
299
|
+
this.current.copy(this.mouse.coords);
|
|
300
|
+
this.lastTime = now;
|
|
301
|
+
this.activationTime = now;
|
|
302
|
+
}
|
|
303
|
+
if (!this.active) return;
|
|
304
|
+
this.mouse.isAutoActive = true;
|
|
305
|
+
let dtSec = (now - this.lastTime) / 1000;
|
|
306
|
+
this.lastTime = now;
|
|
307
|
+
if (dtSec > 0.2) dtSec = 0.016;
|
|
308
|
+
const dir = this._tmpDir.subVectors(this.target, this.current);
|
|
309
|
+
const dist = dir.length();
|
|
310
|
+
if (dist < 0.01) {
|
|
311
|
+
this.pickNewTarget();
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
dir.normalize();
|
|
315
|
+
let ramp = 1;
|
|
316
|
+
if (this.rampDurationMs > 0) {
|
|
317
|
+
const t = Math.min(1, (now - this.activationTime) / this.rampDurationMs);
|
|
318
|
+
ramp = t * t * (3 - 2 * t);
|
|
319
|
+
}
|
|
320
|
+
const step = this.speed * dtSec * ramp;
|
|
321
|
+
const move = Math.min(step, dist);
|
|
322
|
+
this.current.addScaledVector(dir, move);
|
|
323
|
+
this.mouse.setNormalized(this.current.x, this.current.y);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
const face_vert = `
|
|
328
|
+
attribute vec3 position;
|
|
329
|
+
uniform vec2 px;
|
|
330
|
+
uniform vec2 boundarySpace;
|
|
331
|
+
varying vec2 uv;
|
|
332
|
+
precision highp float;
|
|
333
|
+
void main(){
|
|
334
|
+
vec3 pos = position;
|
|
335
|
+
vec2 scale = 1.0 - boundarySpace * 2.0;
|
|
336
|
+
pos.xy = pos.xy * scale;
|
|
337
|
+
uv = vec2(0.5)+(pos.xy)*0.5;
|
|
338
|
+
gl_Position = vec4(pos, 1.0);
|
|
339
|
+
}
|
|
340
|
+
`;
|
|
341
|
+
const line_vert = `
|
|
342
|
+
attribute vec3 position;
|
|
343
|
+
uniform vec2 px;
|
|
344
|
+
precision highp float;
|
|
345
|
+
varying vec2 uv;
|
|
346
|
+
void main(){
|
|
347
|
+
vec3 pos = position;
|
|
348
|
+
uv = 0.5 + pos.xy * 0.5;
|
|
349
|
+
vec2 n = sign(pos.xy);
|
|
350
|
+
pos.xy = abs(pos.xy) - px * 1.0;
|
|
351
|
+
pos.xy *= n;
|
|
352
|
+
gl_Position = vec4(pos, 1.0);
|
|
353
|
+
}
|
|
354
|
+
`;
|
|
355
|
+
const mouse_vert = `
|
|
356
|
+
precision highp float;
|
|
357
|
+
attribute vec3 position;
|
|
358
|
+
attribute vec2 uv;
|
|
359
|
+
uniform vec2 center;
|
|
360
|
+
uniform vec2 scale;
|
|
361
|
+
uniform vec2 px;
|
|
362
|
+
varying vec2 vUv;
|
|
363
|
+
void main(){
|
|
364
|
+
vec2 pos = position.xy * scale * 2.0 * px + center;
|
|
365
|
+
vUv = uv;
|
|
366
|
+
gl_Position = vec4(pos, 0.0, 1.0);
|
|
367
|
+
}
|
|
368
|
+
`;
|
|
369
|
+
const advection_frag = `
|
|
370
|
+
precision highp float;
|
|
371
|
+
uniform sampler2D velocity;
|
|
372
|
+
uniform float dt;
|
|
373
|
+
uniform bool isBFECC;
|
|
374
|
+
uniform vec2 fboSize;
|
|
375
|
+
uniform vec2 px;
|
|
376
|
+
varying vec2 uv;
|
|
377
|
+
void main(){
|
|
378
|
+
vec2 ratio = max(fboSize.x, fboSize.y) / fboSize;
|
|
379
|
+
if(isBFECC == false){
|
|
380
|
+
vec2 vel = texture2D(velocity, uv).xy;
|
|
381
|
+
vec2 uv2 = uv - vel * dt * ratio;
|
|
382
|
+
vec2 newVel = texture2D(velocity, uv2).xy;
|
|
383
|
+
gl_FragColor = vec4(newVel, 0.0, 0.0);
|
|
384
|
+
} else {
|
|
385
|
+
vec2 spot_new = uv;
|
|
386
|
+
vec2 vel_old = texture2D(velocity, uv).xy;
|
|
387
|
+
vec2 spot_old = spot_new - vel_old * dt * ratio;
|
|
388
|
+
vec2 vel_new1 = texture2D(velocity, spot_old).xy;
|
|
389
|
+
vec2 spot_new2 = spot_old + vel_new1 * dt * ratio;
|
|
390
|
+
vec2 error = spot_new2 - spot_new;
|
|
391
|
+
vec2 spot_new3 = spot_new - error / 2.0;
|
|
392
|
+
vec2 vel_2 = texture2D(velocity, spot_new3).xy;
|
|
393
|
+
vec2 spot_old2 = spot_new3 - vel_2 * dt * ratio;
|
|
394
|
+
vec2 newVel2 = texture2D(velocity, spot_old2).xy;
|
|
395
|
+
gl_FragColor = vec4(newVel2, 0.0, 0.0);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
`;
|
|
399
|
+
const color_frag = `
|
|
400
|
+
precision highp float;
|
|
401
|
+
uniform sampler2D velocity;
|
|
402
|
+
uniform sampler2D palette;
|
|
403
|
+
uniform vec4 bgColor;
|
|
404
|
+
varying vec2 uv;
|
|
405
|
+
void main(){
|
|
406
|
+
vec2 vel = texture2D(velocity, uv).xy;
|
|
407
|
+
float lenv = clamp(length(vel), 0.0, 1.0);
|
|
408
|
+
vec3 c = texture2D(palette, vec2(lenv, 0.5)).rgb;
|
|
409
|
+
vec3 outRGB = mix(bgColor.rgb, c, lenv);
|
|
410
|
+
float outA = mix(bgColor.a, 1.0, lenv);
|
|
411
|
+
gl_FragColor = vec4(outRGB, outA);
|
|
412
|
+
}
|
|
413
|
+
`;
|
|
414
|
+
const divergence_frag = `
|
|
415
|
+
precision highp float;
|
|
416
|
+
uniform sampler2D velocity;
|
|
417
|
+
uniform float dt;
|
|
418
|
+
uniform vec2 px;
|
|
419
|
+
varying vec2 uv;
|
|
420
|
+
void main(){
|
|
421
|
+
float x0 = texture2D(velocity, uv-vec2(px.x, 0.0)).x;
|
|
422
|
+
float x1 = texture2D(velocity, uv+vec2(px.x, 0.0)).x;
|
|
423
|
+
float y0 = texture2D(velocity, uv-vec2(0.0, px.y)).y;
|
|
424
|
+
float y1 = texture2D(velocity, uv+vec2(0.0, px.y)).y;
|
|
425
|
+
float divergence = (x1 - x0 + y1 - y0) / 2.0;
|
|
426
|
+
gl_FragColor = vec4(divergence / dt);
|
|
427
|
+
}
|
|
428
|
+
`;
|
|
429
|
+
const externalForce_frag = `
|
|
430
|
+
precision highp float;
|
|
431
|
+
uniform vec2 force;
|
|
432
|
+
uniform vec2 center;
|
|
433
|
+
uniform vec2 scale;
|
|
434
|
+
uniform vec2 px;
|
|
435
|
+
varying vec2 vUv;
|
|
436
|
+
void main(){
|
|
437
|
+
vec2 circle = (vUv - 0.5) * 2.0;
|
|
438
|
+
float d = 1.0 - min(length(circle), 1.0);
|
|
439
|
+
d *= d;
|
|
440
|
+
gl_FragColor = vec4(force * d, 0.0, 1.0);
|
|
441
|
+
}
|
|
442
|
+
`;
|
|
443
|
+
const poisson_frag = `
|
|
444
|
+
precision highp float;
|
|
445
|
+
uniform sampler2D pressure;
|
|
446
|
+
uniform sampler2D divergence;
|
|
447
|
+
uniform vec2 px;
|
|
448
|
+
varying vec2 uv;
|
|
449
|
+
void main(){
|
|
450
|
+
float p0 = texture2D(pressure, uv + vec2(px.x * 2.0, 0.0)).r;
|
|
451
|
+
float p1 = texture2D(pressure, uv - vec2(px.x * 2.0, 0.0)).r;
|
|
452
|
+
float p2 = texture2D(pressure, uv + vec2(0.0, px.y * 2.0)).r;
|
|
453
|
+
float p3 = texture2D(pressure, uv - vec2(0.0, px.y * 2.0)).r;
|
|
454
|
+
float div = texture2D(divergence, uv).r;
|
|
455
|
+
float newP = (p0 + p1 + p2 + p3) / 4.0 - div;
|
|
456
|
+
gl_FragColor = vec4(newP);
|
|
457
|
+
}
|
|
458
|
+
`;
|
|
459
|
+
const pressure_frag = `
|
|
460
|
+
precision highp float;
|
|
461
|
+
uniform sampler2D pressure;
|
|
462
|
+
uniform sampler2D velocity;
|
|
463
|
+
uniform vec2 px;
|
|
464
|
+
uniform float dt;
|
|
465
|
+
varying vec2 uv;
|
|
466
|
+
void main(){
|
|
467
|
+
float step = 1.0;
|
|
468
|
+
float p0 = texture2D(pressure, uv + vec2(px.x * step, 0.0)).r;
|
|
469
|
+
float p1 = texture2D(pressure, uv - vec2(px.x * step, 0.0)).r;
|
|
470
|
+
float p2 = texture2D(pressure, uv + vec2(0.0, px.y * step)).r;
|
|
471
|
+
float p3 = texture2D(pressure, uv - vec2(0.0, px.y * step)).r;
|
|
472
|
+
vec2 v = texture2D(velocity, uv).xy;
|
|
473
|
+
vec2 gradP = vec2(p0 - p1, p2 - p3) * 0.5;
|
|
474
|
+
v = v - gradP * dt;
|
|
475
|
+
gl_FragColor = vec4(v, 0.0, 1.0);
|
|
476
|
+
}
|
|
477
|
+
`;
|
|
478
|
+
const viscous_frag = `
|
|
479
|
+
precision highp float;
|
|
480
|
+
uniform sampler2D velocity;
|
|
481
|
+
uniform sampler2D velocity_new;
|
|
482
|
+
uniform float v;
|
|
483
|
+
uniform vec2 px;
|
|
484
|
+
uniform float dt;
|
|
485
|
+
varying vec2 uv;
|
|
486
|
+
void main(){
|
|
487
|
+
vec2 old = texture2D(velocity, uv).xy;
|
|
488
|
+
vec2 new0 = texture2D(velocity_new, uv + vec2(px.x * 2.0, 0.0)).xy;
|
|
489
|
+
vec2 new1 = texture2D(velocity_new, uv - vec2(px.x * 2.0, 0.0)).xy;
|
|
490
|
+
vec2 new2 = texture2D(velocity_new, uv + vec2(0.0, px.y * 2.0)).xy;
|
|
491
|
+
vec2 new3 = texture2D(velocity_new, uv - vec2(0.0, px.y * 2.0)).xy;
|
|
492
|
+
vec2 newv = 4.0 * old + v * dt * (new0 + new1 + new2 + new3);
|
|
493
|
+
newv /= 4.0 * (1.0 + v * dt);
|
|
494
|
+
gl_FragColor = vec4(newv, 0.0, 0.0);
|
|
495
|
+
}
|
|
496
|
+
`;
|
|
497
|
+
|
|
498
|
+
class ShaderPass {
|
|
499
|
+
constructor(props) {
|
|
500
|
+
this.props = props || {};
|
|
501
|
+
this.uniforms = this.props.material?.uniforms;
|
|
502
|
+
this.scene = null;
|
|
503
|
+
this.camera = null;
|
|
504
|
+
this.material = null;
|
|
505
|
+
this.geometry = null;
|
|
506
|
+
this.plane = null;
|
|
507
|
+
}
|
|
508
|
+
init() {
|
|
509
|
+
this.scene = new THREE.Scene();
|
|
510
|
+
this.camera = new THREE.Camera();
|
|
511
|
+
if (this.uniforms) {
|
|
512
|
+
this.material = new THREE.RawShaderMaterial(this.props.material);
|
|
513
|
+
this.geometry = new THREE.PlaneGeometry(2.0, 2.0);
|
|
514
|
+
this.plane = new THREE.Mesh(this.geometry, this.material);
|
|
515
|
+
this.scene.add(this.plane);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
update() {
|
|
519
|
+
Common.renderer.setRenderTarget(this.props.output || null);
|
|
520
|
+
Common.renderer.render(this.scene, this.camera);
|
|
521
|
+
Common.renderer.setRenderTarget(null);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
class Advection extends ShaderPass {
|
|
526
|
+
constructor(simProps) {
|
|
527
|
+
super({
|
|
528
|
+
material: {
|
|
529
|
+
vertexShader: face_vert,
|
|
530
|
+
fragmentShader: advection_frag,
|
|
531
|
+
uniforms: {
|
|
532
|
+
boundarySpace: { value: simProps.cellScale },
|
|
533
|
+
px: { value: simProps.cellScale },
|
|
534
|
+
fboSize: { value: simProps.fboSize },
|
|
535
|
+
velocity: { value: simProps.src.texture },
|
|
536
|
+
dt: { value: simProps.dt },
|
|
537
|
+
isBFECC: { value: true }
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
output: simProps.dst
|
|
541
|
+
});
|
|
542
|
+
this.uniforms = this.props.material.uniforms;
|
|
543
|
+
this.init();
|
|
544
|
+
}
|
|
545
|
+
init() {
|
|
546
|
+
super.init();
|
|
547
|
+
this.createBoundary();
|
|
548
|
+
}
|
|
549
|
+
createBoundary() {
|
|
550
|
+
const boundaryG = new THREE.BufferGeometry();
|
|
551
|
+
const vertices_boundary = new Float32Array([
|
|
552
|
+
-1, -1, 0, -1, 1, 0, -1, 1, 0, 1, 1, 0, 1, 1, 0, 1, -1, 0, 1, -1, 0, -1, -1, 0
|
|
553
|
+
]);
|
|
554
|
+
boundaryG.setAttribute('position', new THREE.BufferAttribute(vertices_boundary, 3));
|
|
555
|
+
const boundaryM = new THREE.RawShaderMaterial({
|
|
556
|
+
vertexShader: line_vert,
|
|
557
|
+
fragmentShader: advection_frag,
|
|
558
|
+
uniforms: this.uniforms
|
|
559
|
+
});
|
|
560
|
+
this.line = new THREE.LineSegments(boundaryG, boundaryM);
|
|
561
|
+
this.scene.add(this.line);
|
|
562
|
+
}
|
|
563
|
+
update({ dt, isBounce, BFECC }) {
|
|
564
|
+
this.uniforms.dt.value = dt;
|
|
565
|
+
this.line.visible = isBounce;
|
|
566
|
+
this.uniforms.isBFECC.value = BFECC;
|
|
567
|
+
super.update();
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
class ExternalForce extends ShaderPass {
|
|
572
|
+
constructor(simProps) {
|
|
573
|
+
super({ output: simProps.dst });
|
|
574
|
+
this.init(simProps);
|
|
575
|
+
}
|
|
576
|
+
init(simProps) {
|
|
577
|
+
super.init();
|
|
578
|
+
const mouseG = new THREE.PlaneGeometry(1, 1);
|
|
579
|
+
const mouseM = new THREE.RawShaderMaterial({
|
|
580
|
+
vertexShader: mouse_vert,
|
|
581
|
+
fragmentShader: externalForce_frag,
|
|
582
|
+
blending: THREE.AdditiveBlending,
|
|
583
|
+
depthWrite: false,
|
|
584
|
+
uniforms: {
|
|
585
|
+
px: { value: simProps.cellScale },
|
|
586
|
+
force: { value: new THREE.Vector2(0.0, 0.0) },
|
|
587
|
+
center: { value: new THREE.Vector2(0.0, 0.0) },
|
|
588
|
+
scale: { value: new THREE.Vector2(simProps.cursor_size, simProps.cursor_size) }
|
|
589
|
+
}
|
|
590
|
+
});
|
|
591
|
+
this.mouse = new THREE.Mesh(mouseG, mouseM);
|
|
592
|
+
this.scene.add(this.mouse);
|
|
593
|
+
}
|
|
594
|
+
update(props) {
|
|
595
|
+
const forceX = (Mouse.diff.x / 2) * props.mouse_force;
|
|
596
|
+
const forceY = (Mouse.diff.y / 2) * props.mouse_force;
|
|
597
|
+
const cursorSizeX = props.cursor_size * props.cellScale.x;
|
|
598
|
+
const cursorSizeY = props.cursor_size * props.cellScale.y;
|
|
599
|
+
const centerX = Math.min(
|
|
600
|
+
Math.max(Mouse.coords.x, -1 + cursorSizeX + props.cellScale.x * 2),
|
|
601
|
+
1 - cursorSizeX - props.cellScale.x * 2
|
|
602
|
+
);
|
|
603
|
+
const centerY = Math.min(
|
|
604
|
+
Math.max(Mouse.coords.y, -1 + cursorSizeY + props.cellScale.y * 2),
|
|
605
|
+
1 - cursorSizeY - props.cellScale.y * 2
|
|
606
|
+
);
|
|
607
|
+
const uniforms = this.mouse.material.uniforms;
|
|
608
|
+
uniforms.force.value.set(forceX, forceY);
|
|
609
|
+
uniforms.center.value.set(centerX, centerY);
|
|
610
|
+
uniforms.scale.value.set(props.cursor_size, props.cursor_size);
|
|
611
|
+
super.update();
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
class Viscous extends ShaderPass {
|
|
616
|
+
constructor(simProps) {
|
|
617
|
+
super({
|
|
618
|
+
material: {
|
|
619
|
+
vertexShader: face_vert,
|
|
620
|
+
fragmentShader: viscous_frag,
|
|
621
|
+
uniforms: {
|
|
622
|
+
boundarySpace: { value: simProps.boundarySpace },
|
|
623
|
+
velocity: { value: simProps.src.texture },
|
|
624
|
+
velocity_new: { value: simProps.dst_.texture },
|
|
625
|
+
v: { value: simProps.viscous },
|
|
626
|
+
px: { value: simProps.cellScale },
|
|
627
|
+
dt: { value: simProps.dt }
|
|
628
|
+
}
|
|
629
|
+
},
|
|
630
|
+
output: simProps.dst,
|
|
631
|
+
output0: simProps.dst_,
|
|
632
|
+
output1: simProps.dst
|
|
633
|
+
});
|
|
634
|
+
this.init();
|
|
635
|
+
}
|
|
636
|
+
update({ viscous, iterations, dt }) {
|
|
637
|
+
let fbo_in, fbo_out;
|
|
638
|
+
this.uniforms.v.value = viscous;
|
|
639
|
+
for (let i = 0; i < iterations; i++) {
|
|
640
|
+
if (i % 2 === 0) {
|
|
641
|
+
fbo_in = this.props.output0;
|
|
642
|
+
fbo_out = this.props.output1;
|
|
643
|
+
} else {
|
|
644
|
+
fbo_in = this.props.output1;
|
|
645
|
+
fbo_out = this.props.output0;
|
|
646
|
+
}
|
|
647
|
+
this.uniforms.velocity_new.value = fbo_in.texture;
|
|
648
|
+
this.props.output = fbo_out;
|
|
649
|
+
this.uniforms.dt.value = dt;
|
|
650
|
+
super.update();
|
|
651
|
+
}
|
|
652
|
+
return fbo_out;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
class Divergence extends ShaderPass {
|
|
657
|
+
constructor(simProps) {
|
|
658
|
+
super({
|
|
659
|
+
material: {
|
|
660
|
+
vertexShader: face_vert,
|
|
661
|
+
fragmentShader: divergence_frag,
|
|
662
|
+
uniforms: {
|
|
663
|
+
boundarySpace: { value: simProps.boundarySpace },
|
|
664
|
+
velocity: { value: simProps.src.texture },
|
|
665
|
+
px: { value: simProps.cellScale },
|
|
666
|
+
dt: { value: simProps.dt }
|
|
667
|
+
}
|
|
668
|
+
},
|
|
669
|
+
output: simProps.dst
|
|
670
|
+
});
|
|
671
|
+
this.init();
|
|
672
|
+
}
|
|
673
|
+
update({ vel }) {
|
|
674
|
+
this.uniforms.velocity.value = vel.texture;
|
|
675
|
+
super.update();
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
class Poisson extends ShaderPass {
|
|
680
|
+
constructor(simProps) {
|
|
681
|
+
super({
|
|
682
|
+
material: {
|
|
683
|
+
vertexShader: face_vert,
|
|
684
|
+
fragmentShader: poisson_frag,
|
|
685
|
+
uniforms: {
|
|
686
|
+
boundarySpace: { value: simProps.boundarySpace },
|
|
687
|
+
pressure: { value: simProps.dst_.texture },
|
|
688
|
+
divergence: { value: simProps.src.texture },
|
|
689
|
+
px: { value: simProps.cellScale }
|
|
690
|
+
}
|
|
691
|
+
},
|
|
692
|
+
output: simProps.dst,
|
|
693
|
+
output0: simProps.dst_,
|
|
694
|
+
output1: simProps.dst
|
|
695
|
+
});
|
|
696
|
+
this.init();
|
|
697
|
+
}
|
|
698
|
+
update({ iterations }) {
|
|
699
|
+
let p_in, p_out;
|
|
700
|
+
for (let i = 0; i < iterations; i++) {
|
|
701
|
+
if (i % 2 === 0) {
|
|
702
|
+
p_in = this.props.output0;
|
|
703
|
+
p_out = this.props.output1;
|
|
704
|
+
} else {
|
|
705
|
+
p_in = this.props.output1;
|
|
706
|
+
p_out = this.props.output0;
|
|
707
|
+
}
|
|
708
|
+
this.uniforms.pressure.value = p_in.texture;
|
|
709
|
+
this.props.output = p_out;
|
|
710
|
+
super.update();
|
|
711
|
+
}
|
|
712
|
+
return p_out;
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
class Pressure extends ShaderPass {
|
|
717
|
+
constructor(simProps) {
|
|
718
|
+
super({
|
|
719
|
+
material: {
|
|
720
|
+
vertexShader: face_vert,
|
|
721
|
+
fragmentShader: pressure_frag,
|
|
722
|
+
uniforms: {
|
|
723
|
+
boundarySpace: { value: simProps.boundarySpace },
|
|
724
|
+
pressure: { value: simProps.src_p.texture },
|
|
725
|
+
velocity: { value: simProps.src_v.texture },
|
|
726
|
+
px: { value: simProps.cellScale },
|
|
727
|
+
dt: { value: simProps.dt }
|
|
728
|
+
}
|
|
729
|
+
},
|
|
730
|
+
output: simProps.dst
|
|
731
|
+
});
|
|
732
|
+
this.init();
|
|
733
|
+
}
|
|
734
|
+
update({ vel, pressure }) {
|
|
735
|
+
this.uniforms.velocity.value = vel.texture;
|
|
736
|
+
this.uniforms.pressure.value = pressure.texture;
|
|
737
|
+
super.update();
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
class Simulation {
|
|
742
|
+
constructor(options) {
|
|
743
|
+
this.options = {
|
|
744
|
+
iterations_poisson: 32,
|
|
745
|
+
iterations_viscous: 32,
|
|
746
|
+
mouse_force: 20,
|
|
747
|
+
resolution: 0.5,
|
|
748
|
+
cursor_size: 100,
|
|
749
|
+
viscous: 30,
|
|
750
|
+
isBounce: false,
|
|
751
|
+
dt: 0.014,
|
|
752
|
+
isViscous: false,
|
|
753
|
+
BFECC: true,
|
|
754
|
+
...options
|
|
755
|
+
};
|
|
756
|
+
this.fbos = {
|
|
757
|
+
vel_0: null,
|
|
758
|
+
vel_1: null,
|
|
759
|
+
vel_viscous0: null,
|
|
760
|
+
vel_viscous1: null,
|
|
761
|
+
div: null,
|
|
762
|
+
pressure_0: null,
|
|
763
|
+
pressure_1: null
|
|
764
|
+
};
|
|
765
|
+
this.fboSize = new THREE.Vector2();
|
|
766
|
+
this.cellScale = new THREE.Vector2();
|
|
767
|
+
this.boundarySpace = new THREE.Vector2();
|
|
768
|
+
this.init();
|
|
769
|
+
}
|
|
770
|
+
init() {
|
|
771
|
+
this.calcSize();
|
|
772
|
+
this.createAllFBO();
|
|
773
|
+
this.createShaderPass();
|
|
774
|
+
}
|
|
775
|
+
getFloatType() {
|
|
776
|
+
const isIOS = /(iPad|iPhone|iPod)/i.test(navigator.userAgent);
|
|
777
|
+
return isIOS ? THREE.HalfFloatType : THREE.FloatType;
|
|
778
|
+
}
|
|
779
|
+
createAllFBO() {
|
|
780
|
+
const type = this.getFloatType();
|
|
781
|
+
const opts = {
|
|
782
|
+
type,
|
|
783
|
+
depthBuffer: false,
|
|
784
|
+
stencilBuffer: false,
|
|
785
|
+
minFilter: THREE.LinearFilter,
|
|
786
|
+
magFilter: THREE.LinearFilter,
|
|
787
|
+
wrapS: THREE.ClampToEdgeWrapping,
|
|
788
|
+
wrapT: THREE.ClampToEdgeWrapping
|
|
789
|
+
};
|
|
790
|
+
for (let key in this.fbos) {
|
|
791
|
+
this.fbos[key] = new THREE.WebGLRenderTarget(this.fboSize.x, this.fboSize.y, opts);
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
createShaderPass() {
|
|
795
|
+
this.advection = new Advection({
|
|
796
|
+
cellScale: this.cellScale,
|
|
797
|
+
fboSize: this.fboSize,
|
|
798
|
+
dt: this.options.dt,
|
|
799
|
+
src: this.fbos.vel_0,
|
|
800
|
+
dst: this.fbos.vel_1
|
|
801
|
+
});
|
|
802
|
+
this.externalForce = new ExternalForce({
|
|
803
|
+
cellScale: this.cellScale,
|
|
804
|
+
cursor_size: this.options.cursor_size,
|
|
805
|
+
dst: this.fbos.vel_1
|
|
806
|
+
});
|
|
807
|
+
this.viscous = new Viscous({
|
|
808
|
+
cellScale: this.cellScale,
|
|
809
|
+
boundarySpace: this.boundarySpace,
|
|
810
|
+
viscous: this.options.viscous,
|
|
811
|
+
src: this.fbos.vel_1,
|
|
812
|
+
dst: this.fbos.vel_viscous1,
|
|
813
|
+
dst_: this.fbos.vel_viscous0,
|
|
814
|
+
dt: this.options.dt
|
|
815
|
+
});
|
|
816
|
+
this.divergence = new Divergence({
|
|
817
|
+
cellScale: this.cellScale,
|
|
818
|
+
boundarySpace: this.boundarySpace,
|
|
819
|
+
src: this.fbos.vel_viscous0,
|
|
820
|
+
dst: this.fbos.div,
|
|
821
|
+
dt: this.options.dt
|
|
822
|
+
});
|
|
823
|
+
this.poisson = new Poisson({
|
|
824
|
+
cellScale: this.cellScale,
|
|
825
|
+
boundarySpace: this.boundarySpace,
|
|
826
|
+
src: this.fbos.div,
|
|
827
|
+
dst: this.fbos.pressure_1,
|
|
828
|
+
dst_: this.fbos.pressure_0
|
|
829
|
+
});
|
|
830
|
+
this.pressure = new Pressure({
|
|
831
|
+
cellScale: this.cellScale,
|
|
832
|
+
boundarySpace: this.boundarySpace,
|
|
833
|
+
src_p: this.fbos.pressure_0,
|
|
834
|
+
src_v: this.fbos.vel_viscous0,
|
|
835
|
+
dst: this.fbos.vel_0,
|
|
836
|
+
dt: this.options.dt
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
calcSize() {
|
|
840
|
+
const width = Math.max(1, Math.round(this.options.resolution * Common.width));
|
|
841
|
+
const height = Math.max(1, Math.round(this.options.resolution * Common.height));
|
|
842
|
+
const px_x = 1.0 / width;
|
|
843
|
+
const px_y = 1.0 / height;
|
|
844
|
+
this.cellScale.set(px_x, px_y);
|
|
845
|
+
this.fboSize.set(width, height);
|
|
846
|
+
}
|
|
847
|
+
resize() {
|
|
848
|
+
this.calcSize();
|
|
849
|
+
for (let key in this.fbos) {
|
|
850
|
+
this.fbos[key].setSize(this.fboSize.x, this.fboSize.y);
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
update() {
|
|
854
|
+
if (this.options.isBounce) {
|
|
855
|
+
this.boundarySpace.set(0, 0);
|
|
856
|
+
} else {
|
|
857
|
+
this.boundarySpace.copy(this.cellScale);
|
|
858
|
+
}
|
|
859
|
+
this.advection.update({
|
|
860
|
+
dt: this.options.dt,
|
|
861
|
+
isBounce: this.options.isBounce,
|
|
862
|
+
BFECC: this.options.BFECC
|
|
863
|
+
});
|
|
864
|
+
this.externalForce.update({
|
|
865
|
+
cursor_size: this.options.cursor_size,
|
|
866
|
+
mouse_force: this.options.mouse_force,
|
|
867
|
+
cellScale: this.cellScale
|
|
868
|
+
});
|
|
869
|
+
let vel = this.fbos.vel_1;
|
|
870
|
+
if (this.options.isViscous) {
|
|
871
|
+
vel = this.viscous.update({
|
|
872
|
+
viscous: this.options.viscous,
|
|
873
|
+
iterations: this.options.iterations_viscous,
|
|
874
|
+
dt: this.options.dt
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
this.divergence.update({ vel });
|
|
878
|
+
const pressure = this.poisson.update({
|
|
879
|
+
iterations: this.options.iterations_poisson
|
|
880
|
+
});
|
|
881
|
+
this.pressure.update({ vel, pressure });
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
class Output {
|
|
886
|
+
constructor() {
|
|
887
|
+
this.init();
|
|
888
|
+
}
|
|
889
|
+
init() {
|
|
890
|
+
this.simulation = new Simulation();
|
|
891
|
+
this.scene = new THREE.Scene();
|
|
892
|
+
this.camera = new THREE.Camera();
|
|
893
|
+
this.output = new THREE.Mesh(
|
|
894
|
+
new THREE.PlaneGeometry(2, 2),
|
|
895
|
+
new THREE.RawShaderMaterial({
|
|
896
|
+
vertexShader: face_vert,
|
|
897
|
+
fragmentShader: color_frag,
|
|
898
|
+
transparent: true,
|
|
899
|
+
depthWrite: false,
|
|
900
|
+
uniforms: {
|
|
901
|
+
velocity: { value: this.simulation.fbos.vel_0.texture },
|
|
902
|
+
boundarySpace: { value: new THREE.Vector2() },
|
|
903
|
+
palette: { value: paletteTex },
|
|
904
|
+
bgColor: { value: bgVec4 }
|
|
905
|
+
}
|
|
906
|
+
})
|
|
907
|
+
);
|
|
908
|
+
this.scene.add(this.output);
|
|
909
|
+
}
|
|
910
|
+
addScene(mesh) {
|
|
911
|
+
this.scene.add(mesh);
|
|
912
|
+
}
|
|
913
|
+
resize() {
|
|
914
|
+
this.simulation.resize();
|
|
915
|
+
}
|
|
916
|
+
render() {
|
|
917
|
+
Common.renderer.setRenderTarget(null);
|
|
918
|
+
Common.renderer.render(this.scene, this.camera);
|
|
919
|
+
}
|
|
920
|
+
update() {
|
|
921
|
+
this.simulation.update();
|
|
922
|
+
this.render();
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
class WebGLManager {
|
|
927
|
+
constructor(props) {
|
|
928
|
+
this.props = props;
|
|
929
|
+
Common.init(props.$wrapper);
|
|
930
|
+
Mouse.init(props.$wrapper);
|
|
931
|
+
Mouse.autoIntensity = props.autoIntensity;
|
|
932
|
+
Mouse.takeoverDuration = props.takeoverDuration;
|
|
933
|
+
this.lastUserInteraction = performance.now();
|
|
934
|
+
Mouse.onInteract = () => {
|
|
935
|
+
this.lastUserInteraction = performance.now();
|
|
936
|
+
if (this.autoDriver) this.autoDriver.forceStop();
|
|
937
|
+
};
|
|
938
|
+
this.autoDriver = new AutoDriver(Mouse, this, {
|
|
939
|
+
enabled: props.autoDemo,
|
|
940
|
+
speed: props.autoSpeed,
|
|
941
|
+
resumeDelay: props.autoResumeDelay,
|
|
942
|
+
rampDuration: props.autoRampDuration
|
|
943
|
+
});
|
|
944
|
+
this.init();
|
|
945
|
+
this._loop = this.loop.bind(this);
|
|
946
|
+
this._resize = this.resize.bind(this);
|
|
947
|
+
window.addEventListener('resize', this._resize);
|
|
948
|
+
this._onVisibility = () => {
|
|
949
|
+
const hidden = document.hidden;
|
|
950
|
+
if (hidden) {
|
|
951
|
+
this.pause();
|
|
952
|
+
} else if (isVisibleRef.current) {
|
|
953
|
+
this.start();
|
|
954
|
+
}
|
|
955
|
+
};
|
|
956
|
+
document.addEventListener('visibilitychange', this._onVisibility);
|
|
957
|
+
this.running = false;
|
|
958
|
+
}
|
|
959
|
+
init() {
|
|
960
|
+
this.props.$wrapper.prepend(Common.renderer.domElement);
|
|
961
|
+
this.output = new Output();
|
|
962
|
+
}
|
|
963
|
+
resize() {
|
|
964
|
+
Common.resize();
|
|
965
|
+
this.output.resize();
|
|
966
|
+
}
|
|
967
|
+
render() {
|
|
968
|
+
if (this.autoDriver) this.autoDriver.update();
|
|
969
|
+
Mouse.update();
|
|
970
|
+
Common.update();
|
|
971
|
+
this.output.update();
|
|
972
|
+
}
|
|
973
|
+
loop() {
|
|
974
|
+
if (!this.running) return; // safety
|
|
975
|
+
this.render();
|
|
976
|
+
rafRef.current = requestAnimationFrame(this._loop);
|
|
977
|
+
}
|
|
978
|
+
start() {
|
|
979
|
+
if (this.running) return;
|
|
980
|
+
this.running = true;
|
|
981
|
+
this._loop();
|
|
982
|
+
}
|
|
983
|
+
pause() {
|
|
984
|
+
this.running = false;
|
|
985
|
+
if (rafRef.current) {
|
|
986
|
+
cancelAnimationFrame(rafRef.current);
|
|
987
|
+
rafRef.current = null;
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
dispose() {
|
|
991
|
+
try {
|
|
992
|
+
window.removeEventListener('resize', this._resize);
|
|
993
|
+
document.removeEventListener('visibilitychange', this._onVisibility);
|
|
994
|
+
Mouse.dispose();
|
|
995
|
+
if (Common.renderer) {
|
|
996
|
+
const canvas = Common.renderer.domElement;
|
|
997
|
+
if (canvas && canvas.parentNode) canvas.parentNode.removeChild(canvas);
|
|
998
|
+
Common.renderer.dispose();
|
|
999
|
+
Common.renderer.forceContextLoss();
|
|
1000
|
+
}
|
|
1001
|
+
} catch (e) {
|
|
1002
|
+
void 0;
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
const container = mountRef.current;
|
|
1008
|
+
container.style.position = container.style.position || 'relative';
|
|
1009
|
+
container.style.overflow = container.style.overflow || 'hidden';
|
|
1010
|
+
|
|
1011
|
+
const webgl = new WebGLManager({
|
|
1012
|
+
$wrapper: container,
|
|
1013
|
+
autoDemo,
|
|
1014
|
+
autoSpeed,
|
|
1015
|
+
autoIntensity,
|
|
1016
|
+
takeoverDuration,
|
|
1017
|
+
autoResumeDelay,
|
|
1018
|
+
autoRampDuration
|
|
1019
|
+
});
|
|
1020
|
+
webglRef.current = webgl;
|
|
1021
|
+
|
|
1022
|
+
const applyOptionsFromProps = () => {
|
|
1023
|
+
if (!webglRef.current) return;
|
|
1024
|
+
const sim = webglRef.current.output?.simulation;
|
|
1025
|
+
if (!sim) return;
|
|
1026
|
+
const prevRes = sim.options.resolution;
|
|
1027
|
+
Object.assign(sim.options, {
|
|
1028
|
+
mouse_force: mouseForce,
|
|
1029
|
+
cursor_size: cursorSize,
|
|
1030
|
+
isViscous,
|
|
1031
|
+
viscous,
|
|
1032
|
+
iterations_viscous: iterationsViscous,
|
|
1033
|
+
iterations_poisson: iterationsPoisson,
|
|
1034
|
+
dt,
|
|
1035
|
+
BFECC,
|
|
1036
|
+
resolution,
|
|
1037
|
+
isBounce
|
|
1038
|
+
});
|
|
1039
|
+
if (resolution !== prevRes) {
|
|
1040
|
+
sim.resize();
|
|
1041
|
+
}
|
|
1042
|
+
};
|
|
1043
|
+
applyOptionsFromProps();
|
|
1044
|
+
|
|
1045
|
+
webgl.start();
|
|
1046
|
+
|
|
1047
|
+
// IntersectionObserver to pause rendering when not visible
|
|
1048
|
+
const io = new IntersectionObserver(
|
|
1049
|
+
entries => {
|
|
1050
|
+
const entry = entries[0];
|
|
1051
|
+
const isVisible = entry.isIntersecting && entry.intersectionRatio > 0;
|
|
1052
|
+
isVisibleRef.current = isVisible;
|
|
1053
|
+
if (!webglRef.current) return;
|
|
1054
|
+
if (isVisible && !document.hidden) {
|
|
1055
|
+
webglRef.current.start();
|
|
1056
|
+
} else {
|
|
1057
|
+
webglRef.current.pause();
|
|
1058
|
+
}
|
|
1059
|
+
},
|
|
1060
|
+
{ threshold: [0, 0.01, 0.1] }
|
|
1061
|
+
);
|
|
1062
|
+
io.observe(container);
|
|
1063
|
+
intersectionObserverRef.current = io;
|
|
1064
|
+
|
|
1065
|
+
const ro = new ResizeObserver(() => {
|
|
1066
|
+
if (!webglRef.current) return;
|
|
1067
|
+
if (resizeRafRef.current) cancelAnimationFrame(resizeRafRef.current);
|
|
1068
|
+
resizeRafRef.current = requestAnimationFrame(() => {
|
|
1069
|
+
if (!webglRef.current) return;
|
|
1070
|
+
webglRef.current.resize();
|
|
1071
|
+
});
|
|
1072
|
+
});
|
|
1073
|
+
ro.observe(container);
|
|
1074
|
+
resizeObserverRef.current = ro;
|
|
1075
|
+
|
|
1076
|
+
return () => {
|
|
1077
|
+
if (rafRef.current) cancelAnimationFrame(rafRef.current);
|
|
1078
|
+
if (resizeObserverRef.current) {
|
|
1079
|
+
try {
|
|
1080
|
+
resizeObserverRef.current.disconnect();
|
|
1081
|
+
} catch (e) {
|
|
1082
|
+
void 0;
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
if (intersectionObserverRef.current) {
|
|
1086
|
+
try {
|
|
1087
|
+
intersectionObserverRef.current.disconnect();
|
|
1088
|
+
} catch (e) {
|
|
1089
|
+
void 0;
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
if (webglRef.current) {
|
|
1093
|
+
webglRef.current.dispose();
|
|
1094
|
+
}
|
|
1095
|
+
webglRef.current = null;
|
|
1096
|
+
};
|
|
1097
|
+
}, [
|
|
1098
|
+
BFECC,
|
|
1099
|
+
cursorSize,
|
|
1100
|
+
dt,
|
|
1101
|
+
isBounce,
|
|
1102
|
+
isViscous,
|
|
1103
|
+
iterationsPoisson,
|
|
1104
|
+
iterationsViscous,
|
|
1105
|
+
mouseForce,
|
|
1106
|
+
resolution,
|
|
1107
|
+
viscous,
|
|
1108
|
+
colors,
|
|
1109
|
+
autoDemo,
|
|
1110
|
+
autoSpeed,
|
|
1111
|
+
autoIntensity,
|
|
1112
|
+
takeoverDuration,
|
|
1113
|
+
autoResumeDelay,
|
|
1114
|
+
autoRampDuration
|
|
1115
|
+
]);
|
|
1116
|
+
|
|
1117
|
+
useEffect(() => {
|
|
1118
|
+
const webgl = webglRef.current;
|
|
1119
|
+
if (!webgl) return;
|
|
1120
|
+
const sim = webgl.output?.simulation;
|
|
1121
|
+
if (!sim) return;
|
|
1122
|
+
const prevRes = sim.options.resolution;
|
|
1123
|
+
Object.assign(sim.options, {
|
|
1124
|
+
mouse_force: mouseForce,
|
|
1125
|
+
cursor_size: cursorSize,
|
|
1126
|
+
isViscous,
|
|
1127
|
+
viscous,
|
|
1128
|
+
iterations_viscous: iterationsViscous,
|
|
1129
|
+
iterations_poisson: iterationsPoisson,
|
|
1130
|
+
dt,
|
|
1131
|
+
BFECC,
|
|
1132
|
+
resolution,
|
|
1133
|
+
isBounce
|
|
1134
|
+
});
|
|
1135
|
+
if (webgl.autoDriver) {
|
|
1136
|
+
webgl.autoDriver.enabled = autoDemo;
|
|
1137
|
+
webgl.autoDriver.speed = autoSpeed;
|
|
1138
|
+
webgl.autoDriver.resumeDelay = autoResumeDelay;
|
|
1139
|
+
webgl.autoDriver.rampDurationMs = autoRampDuration * 1000;
|
|
1140
|
+
if (webgl.autoDriver.mouse) {
|
|
1141
|
+
webgl.autoDriver.mouse.autoIntensity = autoIntensity;
|
|
1142
|
+
webgl.autoDriver.mouse.takeoverDuration = takeoverDuration;
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
if (resolution !== prevRes) {
|
|
1146
|
+
sim.resize();
|
|
1147
|
+
}
|
|
1148
|
+
}, [
|
|
1149
|
+
mouseForce,
|
|
1150
|
+
cursorSize,
|
|
1151
|
+
isViscous,
|
|
1152
|
+
viscous,
|
|
1153
|
+
iterationsViscous,
|
|
1154
|
+
iterationsPoisson,
|
|
1155
|
+
dt,
|
|
1156
|
+
BFECC,
|
|
1157
|
+
resolution,
|
|
1158
|
+
isBounce,
|
|
1159
|
+
autoDemo,
|
|
1160
|
+
autoSpeed,
|
|
1161
|
+
autoIntensity,
|
|
1162
|
+
takeoverDuration,
|
|
1163
|
+
autoResumeDelay,
|
|
1164
|
+
autoRampDuration
|
|
1165
|
+
]);
|
|
1166
|
+
|
|
1167
|
+
return <div ref={mountRef} className={`liquid-ether-container ${className || ''}`} style={style} />;
|
|
1168
|
+
}
|