{#if $page.data?.header}
diff --git a/src/routes/(console)/+layout.svelte b/src/routes/(console)/+layout.svelte index d3a77a8c4e..109bdabb3a 100644 --- a/src/routes/(console)/+layout.svelte +++ b/src/routes/(console)/+layout.svelte @@ -334,7 +334,6 @@ Date: Thu, 11 Dec 2025 18:03:42 +0530 Subject: [PATCH 02/14] add: nice looking thing :D --- package.json | 4 + pnpm-lock.yaml | 232 ++++++++++++++++++ src/lib/components/bottomModalAlert.svelte | 46 +++- src/lib/components/promos/imagine.svelte | 39 +++ src/lib/components/promos/imagine.svg | 61 +++++ src/lib/components/promos/shader.svelte | 109 ++++++++ .../promos/threlte/shaders/noise.glsl | 166 +++++++++++++ src/lib/stores/bottom-alerts.ts | 13 +- src/routes/(console)/bottomAlerts.ts | 38 +-- 9 files changed, 684 insertions(+), 24 deletions(-) create mode 100644 src/lib/components/promos/imagine.svelte create mode 100644 src/lib/components/promos/imagine.svg create mode 100644 src/lib/components/promos/shader.svelte create mode 100644 src/lib/components/promos/threlte/shaders/noise.glsl diff --git a/package.json b/package.json index 5579ef2721..59dc1e8857 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,8 @@ "@popperjs/core": "^2.11.8", "@sentry/sveltekit": "^8.38.0", "@stripe/stripe-js": "^3.5.0", + "@threlte/core": "^8.3.1", + "@threlte/extras": "^9.7.1", "ai": "^2.2.37", "analytics": "^0.8.16", "cron-parser": "^4.9.0", @@ -45,6 +47,7 @@ "prismjs": "^1.30.0", "remarkable": "^2.0.1", "svelte-confetti": "^1.4.0", + "three": "^0.181.2", "tippy.js": "^6.3.7" }, "devDependencies": { @@ -63,6 +66,7 @@ "@types/deep-equal": "^1.0.4", "@types/prismjs": "^1.26.5", "@types/remarkable": "^2.0.8", + "@types/three": "^0.182.0", "@typescript-eslint/eslint-plugin": "^8.28.0", "@typescript-eslint/parser": "^8.28.0", "@vitest/ui": "^3.2.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 479be4ae9f..f7492f49f0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38,6 +38,12 @@ importers: '@stripe/stripe-js': specifier: ^3.5.0 version: 3.5.0 + '@threlte/core': + specifier: ^8.3.1 + version: 8.3.1(svelte@5.25.3)(three@0.181.2) + '@threlte/extras': + specifier: ^9.7.1 + version: 9.7.1(@types/three@0.182.0)(svelte@5.25.3)(three@0.181.2) ai: specifier: ^2.2.37 version: 2.2.37(react@18.3.1)(solid-js@1.9.5)(svelte@5.25.3)(vue@3.5.13(typescript@5.8.2)) @@ -80,6 +86,9 @@ importers: svelte-confetti: specifier: ^1.4.0 version: 1.4.0(svelte@5.25.3) + three: + specifier: ^0.181.2 + version: 0.181.2 tippy.js: specifier: ^6.3.7 version: 6.3.7 @@ -129,6 +138,9 @@ importers: '@types/remarkable': specifier: ^2.0.8 version: 2.0.8 + '@types/three': + specifier: ^0.182.0 + version: 0.182.0 '@typescript-eslint/eslint-plugin': specifier: ^8.28.0 version: 8.28.0(@typescript-eslint/parser@8.28.0(eslint@9.31.0)(typescript@5.8.2))(eslint@9.31.0)(typescript@5.8.2) @@ -405,6 +417,9 @@ packages: resolution: {integrity: sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==} engines: {node: '>=18'} + '@dimforge/rapier3d-compat@0.12.0': + resolution: {integrity: sha512-uekIGetywIgopfD97oDL5PfeezkFpNhwlzlaEYNOA0N6ghdsOvh/HYjSMek5Q2O1PYvRSDFcqFVJl4r4ZBwOow==} + '@esbuild/aix-ppc64@0.25.1': resolution: {integrity: sha512-kfYGy8IdzTGy+z0vFGvExZtxkFlA4zAxgKEahG9KE1ScBjpQnFsNOX8KTU5ojNru5ed5CVoJYXFtoxaq5nFbjQ==} engines: {node: '>=18'} @@ -1330,6 +1345,26 @@ packages: peerDependencies: '@testing-library/dom': '>=7.21.4' + '@threejs-kit/instanced-sprite-mesh@2.5.1': + resolution: {integrity: sha512-pmt1ALRhbHhCJQTj2FuthH6PeLIeaM4hOuS2JO3kWSwlnvx/9xuUkjFR3JOi/myMqsH7pSsLIROSaBxDfttjeA==} + peerDependencies: + three: '>=0.170.0' + + '@threlte/core@8.3.1': + resolution: {integrity: sha512-qKjjNCQ+40hyeBcfOMh/8ef5x/j5PG5Wmo/L9Ye0aDCcdD6fCewWxfp7tV/J3CxPzX1dEp1JGK7sjyc7ntZSrg==} + peerDependencies: + svelte: '>=5' + three: '>=0.160' + + '@threlte/extras@9.7.1': + resolution: {integrity: sha512-SGm59HDCdHxADFHuweHfFDknwubkCPodyK0pbfsVtOWWOX26gE2xfK7aKolh6YFDiPAjWjGxN0jIgkNbbr1ohg==} + peerDependencies: + svelte: '>=5' + three: '>=0.160' + + '@tweenjs/tween.js@23.1.3': + resolution: {integrity: sha512-vJmvvwFxYuGnF2axRtPYocag6Clbb5YS7kLL+SO/TeVFzHqDIWrNKYtcsPMibjDx9O+bu+psAy9NKfWklassUA==} + '@types/aria-query@5.0.4': resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==} @@ -1393,12 +1428,21 @@ packages: '@types/shimmer@1.2.0': resolution: {integrity: sha512-UE7oxhQLLd9gub6JKIAhDq06T0F6FnztwMNRvYgjeQSBeMc1ZG/tA47EwfduvkuQS8apbkM/lpLpWsaCeYsXVg==} + '@types/stats.js@0.17.4': + resolution: {integrity: sha512-jIBvWWShCvlBqBNIZt0KAshWpvSjhkwkEu4ZUcASoAvhmrgAUI2t1dXrjSL4xXVLB4FznPrIsX3nKXFl/Dt4vA==} + '@types/tedious@4.0.14': resolution: {integrity: sha512-KHPsfX/FoVbUGbyYvk1q9MMQHLPeRZhRJZdO45Q4YjvFkv4hMNghCWTvy7rdKessBsmtz4euWCWAB6/tVpI1Iw==} + '@types/three@0.182.0': + resolution: {integrity: sha512-WByN9V3Sbwbe2OkWuSGyoqQO8Du6yhYaXtXLoA5FkKTUJorZ+yOHBZ35zUUPQXlAKABZmbYp5oAqpA4RBjtJ/Q==} + '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + '@types/webxr@0.5.24': + resolution: {integrity: sha512-h8fgEd/DpoS9CBrjEQXR+dIDraopAEfu4wYVNY2tEPwk60stPWhvZMf4Foo5FakuQ7HFZoa8WceaWFervK2Ovg==} + '@typescript-eslint/eslint-plugin@8.28.0': resolution: {integrity: sha512-lvFK3TCGAHsItNdWZ/1FkvpzCxTHUVuFrdnOGLMa0GGCFIbCgQWVk3CzCGdA7kM3qGVc+dfW9tr0Z/sHnGDFyg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1559,6 +1603,9 @@ packages: '@vue/shared@3.5.13': resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==} + '@webgpu/types@0.1.67': + resolution: {integrity: sha512-uk53+2ECGUkWoDFez/hymwpRfdgdIn6y1ref70fEecGMe5607f4sozNFgBk0oxlr7j2CRGWBEc3IBYMmFdGGTQ==} + acorn-import-attributes@1.9.5: resolution: {integrity: sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==} peerDependencies: @@ -1674,6 +1721,9 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + bidi-js@1.0.3: + resolution: {integrity: sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==} + binary-extensions@2.3.0: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} @@ -1713,6 +1763,12 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} + camera-controls@3.1.2: + resolution: {integrity: sha512-xkxfpG2ECZ6Ww5/9+kf4mfg1VEYAoe9aDSY+IwF0UEs7qEzwy0aVRfs2grImIECs/PoBtWFrh7RXsQkwG922JA==} + engines: {node: '>=22.0.0', npm: '>=10.5.1'} + peerDependencies: + three: '>=0.126.1' + caniuse-lite@1.0.30001707: resolution: {integrity: sha512-3qtRjw/HQSMlDWf+X79N206fepf4SOOU6SQLMaq/0KkZLmSjPxAkBOQQ+FxbHKfHmYLZFfdWsO3KA90ceHPSnw==} @@ -2022,6 +2078,9 @@ packages: devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} + diet-sprite@0.0.1: + resolution: {integrity: sha512-zSHI2WDAn1wJqJYxcmjWfJv3Iw8oL9reQIbEyx2x2/EZ4/qmUTIo8/5qOCurnAcq61EwtJJaZ0XTy2NRYqpB5A==} + dlv@1.1.3: resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} @@ -2039,6 +2098,9 @@ packages: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} engines: {node: '>= 0.4'} + earcut@2.2.4: + resolution: {integrity: sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==} + echarts@5.6.0: resolution: {integrity: sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==} @@ -2601,6 +2663,12 @@ packages: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true + maath@0.10.8: + resolution: {integrity: sha512-tRvbDF0Pgqz+9XUa4jjfgAQ8/aPKmQdWXilFu2tMy4GWj4NOsx99HlULO4IeREfbO3a0sA145DZYyvXPkybm0g==} + peerDependencies: + '@types/three': '>=0.134.0' + three: '>=0.134.0' + magic-string@0.30.17: resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} @@ -2635,6 +2703,9 @@ packages: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} + meshoptimizer@0.22.0: + resolution: {integrity: sha512-IebiK79sqIy+E4EgOr+CAw+Ke8hAspXKzBd0JdgEmPHiAwmvEj2S4h1rfvo+o/BnfEYd/jAOg5IeeIjzlzSnDg==} + micromark-util-character@2.1.1: resolution: {integrity: sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==} @@ -2680,6 +2751,9 @@ packages: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} + mitt@3.0.1: + resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} + module-details-from-path@1.0.3: resolution: {integrity: sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A==} @@ -2987,6 +3061,10 @@ packages: engines: {node: '>= 6.0.0'} hasBin: true + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + require-in-the-middle@7.5.2: resolution: {integrity: sha512-gAZ+kLqBdHarXB64XpAe2VCjB7rIRv+mU8tfRWziHRJ5umKsIHN2tLLv6EtMw7WCdP19S0ERVMldNvxYCHnhSQ==} engines: {node: '>=8.6.0'} @@ -3286,6 +3364,29 @@ packages: the-new-css-reset@1.11.3: resolution: {integrity: sha512-61SB81vu9foUyEIqoU1CeqxrdlsVjJojj/CBXoG8BdvlKFsllB0Rza63DblnRqH+3uttPj3FGWo7+c9nu7MT+A==} + three-instanced-uniforms-mesh@0.52.4: + resolution: {integrity: sha512-YwDBy05hfKZQtU+Rp0KyDf9yH4GxfhxMbVt9OYruxdgLfPwmDG5oAbGoW0DrKtKZSM3BfFcCiejiOHCjFBTeng==} + peerDependencies: + three: '>=0.125.0' + + three-mesh-bvh@0.9.3: + resolution: {integrity: sha512-LaxfvQpF+At96fS90GnQxHpff9bu78UL5eooJNxYyBbyiWrOBpjRx+5yn/+Dj2lQVhz5A/jHqwpVchYYnz/hWQ==} + peerDependencies: + three: '>= 0.159.0' + + three-perf@1.0.11: + resolution: {integrity: sha512-OgBpZjwL+csQKGKZjpkH/QHdbGFMxqngMbSEJeSnVNfXDYd6On7WHNv/GhUZH4YxIpNMwMahBWrNnsJvnbSJHQ==} + peerDependencies: + three: '>=0.170' + + three-viewport-gizmo@2.2.0: + resolution: {integrity: sha512-Jo9Liur1rUmdKk75FZumLU/+hbF+RtJHi1qsKZpntjKlCYScK6tjbYoqvJ9M+IJphrlQJF5oReFW7Sambh0N4Q==} + peerDependencies: + three: '>=0.162.0 <1.0.0' + + three@0.181.2: + resolution: {integrity: sha512-k/CjiZ80bYss6Qs7/ex1TBlPD11whT9oKfT8oTGiHa34W4JRd1NiH/Tr1DbHWQ2/vMUypxksLnF2CfmlmM5XFQ==} + tiny-glob@0.2.9: resolution: {integrity: sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==} @@ -3353,6 +3454,19 @@ packages: trim-lines@3.0.1: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} + troika-three-text@0.52.4: + resolution: {integrity: sha512-V50EwcYGruV5rUZ9F4aNsrytGdKcXKALjEtQXIOBfhVoZU9VAqZNIoGQ3TMiooVqFAbR1w15T+f+8gkzoFzawg==} + peerDependencies: + three: '>=0.125.0' + + troika-three-utils@0.52.4: + resolution: {integrity: sha512-NORAStSVa/BDiG52Mfudk4j1FG4jC4ILutB3foPnfGbOeIs9+G5vZLa0pnmnaftZUGm4UwSoqEpWdqvC7zms3A==} + peerDependencies: + three: '>=0.125.0' + + troika-worker-utils@0.52.0: + resolution: {integrity: sha512-W1CpvTHykaPH5brv5VHLfQo9D1OYuo0cSBEUQFFT/nBUzM8iD6Lq2/tgG/f1OelbAS1WtaTPQzE5uM49egnngw==} + ts-api-utils@2.1.0: resolution: {integrity: sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==} engines: {node: '>=18.12'} @@ -3371,6 +3485,9 @@ packages: tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tweakpane@3.1.10: + resolution: {integrity: sha512-rqwnl/pUa7+inhI2E9ayGTqqP0EPOOn/wVvSWjZsRbZUItzNShny7pzwL3hVlaN4m9t/aZhsP0aFQ9U5VVR2VQ==} + type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -3524,6 +3641,9 @@ packages: resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} engines: {node: '>=18'} + webgl-sdf-generator@1.1.1: + resolution: {integrity: sha512-9Z0JcMTFxeE+b2x1LJTdnaT8rT8aEp7MVxkNwoycNmJWwPdzoXzMh0BjJSh/AEFP+KPYZUli814h8bJZFIZ2jA==} + webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} @@ -3881,6 +4001,8 @@ snapshots: '@csstools/css-tokenizer@3.0.3': {} + '@dimforge/rapier3d-compat@0.12.0': {} + '@esbuild/aix-ppc64@0.25.1': optional: true @@ -4844,6 +4966,38 @@ snapshots: dependencies: '@testing-library/dom': 10.4.0 + '@threejs-kit/instanced-sprite-mesh@2.5.1(@types/three@0.182.0)(three@0.181.2)': + dependencies: + diet-sprite: 0.0.1 + earcut: 2.2.4 + maath: 0.10.8(@types/three@0.182.0)(three@0.181.2) + three: 0.181.2 + three-instanced-uniforms-mesh: 0.52.4(three@0.181.2) + troika-three-utils: 0.52.4(three@0.181.2) + transitivePeerDependencies: + - '@types/three' + + '@threlte/core@8.3.1(svelte@5.25.3)(three@0.181.2)': + dependencies: + mitt: 3.0.1 + svelte: 5.25.3 + three: 0.181.2 + + '@threlte/extras@9.7.1(@types/three@0.182.0)(svelte@5.25.3)(three@0.181.2)': + dependencies: + '@threejs-kit/instanced-sprite-mesh': 2.5.1(@types/three@0.182.0)(three@0.181.2) + camera-controls: 3.1.2(three@0.181.2) + svelte: 5.25.3 + three: 0.181.2 + three-mesh-bvh: 0.9.3(three@0.181.2) + three-perf: 1.0.11(three@0.181.2) + three-viewport-gizmo: 2.2.0(three@0.181.2) + troika-three-text: 0.52.4(three@0.181.2) + transitivePeerDependencies: + - '@types/three' + + '@tweenjs/tween.js@23.1.3': {} + '@types/aria-query@5.0.4': {} '@types/chai@5.2.2': @@ -4907,12 +5061,26 @@ snapshots: '@types/shimmer@1.2.0': {} + '@types/stats.js@0.17.4': {} + '@types/tedious@4.0.14': dependencies: '@types/node': 22.13.14 + '@types/three@0.182.0': + dependencies: + '@dimforge/rapier3d-compat': 0.12.0 + '@tweenjs/tween.js': 23.1.3 + '@types/stats.js': 0.17.4 + '@types/webxr': 0.5.24 + '@webgpu/types': 0.1.67 + fflate: 0.8.2 + meshoptimizer: 0.22.0 + '@types/unist@3.0.3': {} + '@types/webxr@0.5.24': {} + '@typescript-eslint/eslint-plugin@8.28.0(@typescript-eslint/parser@8.28.0(eslint@9.31.0)(typescript@5.8.2))(eslint@9.31.0)(typescript@5.8.2)': dependencies: '@eslint-community/regexpp': 4.12.1 @@ -5176,6 +5344,8 @@ snapshots: '@vue/shared@3.5.13': {} + '@webgpu/types@0.1.67': {} + acorn-import-attributes@1.9.5(acorn@8.14.1): dependencies: acorn: 8.14.1 @@ -5285,6 +5455,10 @@ snapshots: balanced-match@1.0.2: {} + bidi-js@1.0.3: + dependencies: + require-from-string: 2.0.2 + binary-extensions@2.3.0: {} brace-expansion@1.1.11: @@ -5328,6 +5502,10 @@ snapshots: callsites@3.1.0: {} + camera-controls@3.1.2(three@0.181.2): + dependencies: + three: 0.181.2 + caniuse-lite@1.0.30001707: {} ccount@2.0.1: {} @@ -5664,6 +5842,8 @@ snapshots: dependencies: dequal: 2.0.3 + diet-sprite@0.0.1: {} + dlv@1.1.3: {} dom-accessibility-api@0.5.16: {} @@ -5678,6 +5858,8 @@ snapshots: es-errors: 1.3.0 gopd: 1.2.0 + earcut@2.2.4: {} + echarts@5.6.0: dependencies: tslib: 2.3.0 @@ -6277,6 +6459,11 @@ snapshots: lz-string@1.5.0: {} + maath@0.10.8(@types/three@0.182.0)(three@0.181.2): + dependencies: + '@types/three': 0.182.0 + three: 0.181.2 + magic-string@0.30.17: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -6321,6 +6508,8 @@ snapshots: merge2@1.4.1: {} + meshoptimizer@0.22.0: {} + micromark-util-character@2.1.1: dependencies: micromark-util-symbol: 2.0.1 @@ -6363,6 +6552,8 @@ snapshots: minipass@7.1.2: {} + mitt@3.0.1: {} + module-details-from-path@1.0.3: {} mri@1.2.0: {} @@ -6626,6 +6817,8 @@ snapshots: argparse: 1.0.10 autolinker: 3.16.2 + require-from-string@2.0.2: {} + require-in-the-middle@7.5.2: dependencies: debug: 4.4.0 @@ -6964,6 +7157,27 @@ snapshots: the-new-css-reset@1.11.3: {} + three-instanced-uniforms-mesh@0.52.4(three@0.181.2): + dependencies: + three: 0.181.2 + troika-three-utils: 0.52.4(three@0.181.2) + + three-mesh-bvh@0.9.3(three@0.181.2): + dependencies: + three: 0.181.2 + + three-perf@1.0.11(three@0.181.2): + dependencies: + three: 0.181.2 + troika-three-text: 0.52.4(three@0.181.2) + tweakpane: 3.1.10 + + three-viewport-gizmo@2.2.0(three@0.181.2): + dependencies: + three: 0.181.2 + + three@0.181.2: {} + tiny-glob@0.2.9: dependencies: globalyzer: 0.1.0 @@ -7020,6 +7234,20 @@ snapshots: trim-lines@3.0.1: {} + troika-three-text@0.52.4(three@0.181.2): + dependencies: + bidi-js: 1.0.3 + three: 0.181.2 + troika-three-utils: 0.52.4(three@0.181.2) + troika-worker-utils: 0.52.0 + webgl-sdf-generator: 1.1.1 + + troika-three-utils@0.52.4(three@0.181.2): + dependencies: + three: 0.181.2 + + troika-worker-utils@0.52.0: {} + ts-api-utils@2.1.0(typescript@5.8.2): dependencies: typescript: 5.8.2 @@ -7032,6 +7260,8 @@ snapshots: tslib@2.8.1: {} + tweakpane@3.1.10: {} + type-check@0.4.0: dependencies: prelude-ls: 1.2.1 @@ -7201,6 +7431,8 @@ snapshots: dependencies: xml-name-validator: 5.0.0 + webgl-sdf-generator@1.1.1: {} + webidl-conversions@3.0.1: {} webidl-conversions@7.0.0: {} diff --git a/src/lib/components/bottomModalAlert.svelte b/src/lib/components/bottomModalAlert.svelte index 1c0f24a9f6..c8ce42282c 100644 --- a/src/lib/components/bottomModalAlert.svelte +++ b/src/lib/components/bottomModalAlert.svelte @@ -19,6 +19,14 @@ import { goto } from '$app/navigation'; import { Typography } from '@appwrite.io/pink-svelte'; + function resolveThemeColor( + color: Record<'light' | 'dark', string> | string | undefined + ): string | undefined { + if (!color) return undefined; + if (typeof color === 'string') return color; + return color[$app.themeInUse]; + } + let currentIndex = $state(0); let openModalOnMobile = $state(false); @@ -199,7 +207,10 @@
- {#if $app.themeInUse === 'dark'} + {#if currentModalAlert.backgroundComponent} + {@const BackgroundComponent = currentModalAlert.backgroundComponent} + + {:else if $app.themeInUse === 'dark'} {currentModalAlert.title} triggerWindowLink(currentModalAlert)}> - {currentModalAlert.cta.text} + + {currentModalAlert.cta.text} + {#if currentModalAlert.learnMore} @@ -310,7 +329,10 @@
- {#if $app.themeInUse === 'dark'} + {#if currentModalAlert.backgroundComponent} + {@const BackgroundComponent = currentModalAlert.backgroundComponent} + + {:else if $app.themeInUse === 'dark'} {currentModalAlert.title} { openModalOnMobile = false; triggerWindowLink(currentModalAlert); }}> - {shouldShowUpgrade - ? 'Upgrade plan' - : currentModalAlert.cta.text} + + {shouldShowUpgrade + ? 'Upgrade plan' + : currentModalAlert.cta.text} + {#if currentModalAlert.learnMore} @@ -466,6 +499,7 @@ .icon-inline-tag { top: 1rem; + z-index: 1; right: 1rem; cursor: pointer; diff --git a/src/lib/components/promos/imagine.svelte b/src/lib/components/promos/imagine.svelte new file mode 100644 index 0000000000..0f275b3daf --- /dev/null +++ b/src/lib/components/promos/imagine.svelte @@ -0,0 +1,39 @@ + + +
+
+ + + +
+ + +
+ + diff --git a/src/lib/components/promos/imagine.svg b/src/lib/components/promos/imagine.svg new file mode 100644 index 0000000000..58e33f62c3 --- /dev/null +++ b/src/lib/components/promos/imagine.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/lib/components/promos/shader.svelte b/src/lib/components/promos/shader.svelte new file mode 100644 index 0000000000..15ce230403 --- /dev/null +++ b/src/lib/components/promos/shader.svelte @@ -0,0 +1,109 @@ + + + + + + diff --git a/src/lib/components/promos/threlte/shaders/noise.glsl b/src/lib/components/promos/threlte/shaders/noise.glsl new file mode 100644 index 0000000000..dea577c656 --- /dev/null +++ b/src/lib/components/promos/threlte/shaders/noise.glsl @@ -0,0 +1,166 @@ +// +// psrddnoise3.glsl +// +// Authors: Stefan Gustavson (stefan.gustavson@gmail.com) +// and Ian McEwan (ijm567@gmail.com) +// Version 2021-12-02, published under the MIT license (see below) +// +// Copyright (c) 2021 Stefan Gustavson and Ian McEwan. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. +// + +vec4 permute(vec4 i) { + vec4 im = mod(i, 289.0); + return mod(((im*34.0)+10.0)*im, 289.0); +} + +float psrddnoise(vec3 x, vec3 period, float alpha, out vec3 gradient, + out vec3 dg, out vec3 dg2) +{ + const mat3 M = mat3(0.0, 1.0, 1.0, + 1.0, 0.0, 1.0, + 1.0, 1.0, 0.0); + + const mat3 Mi = mat3(-0.5, 0.5, 0.5, + 0.5,-0.5, 0.5, + 0.5, 0.5,-0.5); + + vec3 uvw; + uvw = M * x; + + vec3 i0 = floor(uvw); + vec3 f0 = fract(uvw); + + vec3 g_ = step(f0.xyx, f0.yzz); + vec3 l_ = 1.0 - g_; + vec3 g = vec3(l_.z, g_.xy); + vec3 l = vec3(l_.xy, g_.z); + vec3 o1 = min( g, l ); + vec3 o2 = max( g, l ); + + vec3 i1 = i0 + o1; + vec3 i2 = i0 + o2; + vec3 i3 = i0 + vec3(1.0); + + vec3 v0, v1, v2, v3; + + v0 = Mi * i0; + v1 = Mi * i1; + v2 = Mi * i2; + v3 = Mi * i3; + + vec3 x0 = x - v0; + vec3 x1 = x - v1; + vec3 x2 = x - v2; + vec3 x3 = x - v3; + + if(any(greaterThan(period, vec3(0.0)))) { + vec4 vx = vec4(v0.x, v1.x, v2.x, v3.x); + vec4 vy = vec4(v0.y, v1.y, v2.y, v3.y); + vec4 vz = vec4(v0.z, v1.z, v2.z, v3.z); + if(period.x > 0.0) vx = mod(vx, period.x); + if(period.y > 0.0) vy = mod(vy, period.y); + if(period.z > 0.0) vz = mod(vz, period.z); + i0 = M * vec3(vx.x, vy.x, vz.x); + i1 = M * vec3(vx.y, vy.y, vz.y); + i2 = M * vec3(vx.z, vy.z, vz.z); + i3 = M * vec3(vx.w, vy.w, vz.w); + i0 = floor(i0 + 0.5); + i1 = floor(i1 + 0.5); + i2 = floor(i2 + 0.5); + i3 = floor(i3 + 0.5); + } + + vec4 hash = permute( permute( permute( + vec4(i0.z, i1.z, i2.z, i3.z )) + + vec4(i0.y, i1.y, i2.y, i3.y )) + + vec4(i0.x, i1.x, i2.x, i3.x )); + + vec4 theta = hash * 3.883222077; + vec4 sz = hash * -0.006920415 + 0.996539792; + vec4 psi = hash * 0.108705628 ; + + vec4 Ct = cos(theta); + vec4 St = sin(theta); + vec4 sz_prime = sqrt( 1.0 - sz*sz ); + + vec4 gx, gy, gz; + + if(alpha != 0.0) { + vec4 Sp = sin(psi); + vec4 Cp = cos(psi); + + vec4 px = Ct * sz_prime; + vec4 py = St * sz_prime; + vec4 pz = sz; + + vec4 Ctp = St*Sp - Ct*Cp; + vec4 qx = mix( Ctp*St, Sp, sz); + vec4 qy = mix(-Ctp*Ct, Cp, sz); + vec4 qz = -(py*Cp + px*Sp); + + vec4 Sa = vec4(sin(alpha)); + vec4 Ca = vec4(cos(alpha)); + + gx = Ca * px + Sa * qx; + gy = Ca * py + Sa * qy; + gz = Ca * pz + Sa * qz; + } + else { + gx = Ct * sz_prime; + gy = St * sz_prime; + gz = sz; + } + + vec3 g0 = vec3(gx.x, gy.x, gz.x); + vec3 g1 = vec3(gx.y, gy.y, gz.y); + vec3 g2 = vec3(gx.z, gy.z, gz.z); + vec3 g3 = vec3(gx.w, gy.w, gz.w); + + vec4 w = 0.5 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)); + w = max(w, 0.0); + vec4 w2 = w * w; + vec4 w3 = w2 * w; + + vec4 gdotx = vec4(dot(g0,x0), dot(g1,x1), dot(g2,x2), dot(g3,x3)); + + float n = dot(w3, gdotx); + + vec4 dw = -6.0 * w2 * gdotx; + vec3 dn0 = w3.x * g0 + dw.x * x0; + vec3 dn1 = w3.y * g1 + dw.y * x1; + vec3 dn2 = w3.z * g2 + dw.z * x2; + vec3 dn3 = w3.w * g3 + dw.w * x3; + gradient = 39.5 * (dn0 + dn1 + dn2 + dn3); + + vec4 dw2 = 24.0 * w * gdotx; + vec3 dga0 = dw2.x * x0 * x0 - 6.0 * w2.x * (gdotx.x + 2.0 * g0 * x0); + vec3 dga1 = dw2.y * x1 * x1 - 6.0 * w2.y * (gdotx.y + 2.0 * g1 * x1); + vec3 dga2 = dw2.z * x2 * x2 - 6.0 * w2.z * (gdotx.z + 2.0 * g2 * x2); + vec3 dga3 = dw2.w * x3 * x3 - 6.0 * w2.w * (gdotx.w + 2.0 * g3 * x3); + dg = 35.0 * (dga0 + dga1 + dga2 + dga3); + vec3 dgb0 = dw2.x * x0 * x0.yzx - 6.0 * w2.x * (g0 * x0.yzx + g0.yzx * x0); + vec3 dgb1 = dw2.y * x1 * x1.yzx - 6.0 * w2.y * (g1 * x1.yzx + g1.yzx * x1); + vec3 dgb2 = dw2.z * x2 * x2.yzx - 6.0 * w2.z * (g2 * x2.yzx + g2.yzx * x2); + vec3 dgb3 = dw2.w * x3 * x3.yzx - 6.0 * w2.w * (g3 * x3.yzx + g3.yzx * x3); + dg2 = 39.5 * (dgb0 + dgb1 + dgb2 + dgb3); + + return 39.5 * n; +} diff --git a/src/lib/stores/bottom-alerts.ts b/src/lib/stores/bottom-alerts.ts index 634dee01fe..e3ebc968f5 100644 --- a/src/lib/stores/bottom-alerts.ts +++ b/src/lib/stores/bottom-alerts.ts @@ -1,10 +1,14 @@ import { writable } from 'svelte/store'; -import type { NotificationCoolOffOptions } from '$lib/helpers/notifications'; -import type { Organization } from '$lib/stores/organization'; +import type { Component } from 'svelte'; import type { Models } from '@appwrite.io/console'; +import type { Organization } from '$lib/stores/organization'; +import type { NotificationCoolOffOptions } from '$lib/helpers/notifications'; export type BottomModalAlertAction = { text: string; + color?: Record<'light' | 'dark', string> | string; + background?: Record<'light' | 'dark', string> | string; + backgroundHover?: Record<'light' | 'dark', string> | string; hideOnClick?: boolean; link: (ctx: { organization: Organization; project: Models.Project }) => string; external?: boolean; @@ -32,7 +36,10 @@ export type BottomModalAlertItem = { title: string; message: string; - src: Record<'dark' | 'light', string>; + // use either of these! + src?: Record<'dark' | 'light', string>; + backgroundComponent?: Component; + cta: BottomModalAlertAction; learnMore?: BottomModalAlertAction; plan: 'free' | 'pro' | 'scale' /*| 'enterprise'*/; diff --git a/src/routes/(console)/bottomAlerts.ts b/src/routes/(console)/bottomAlerts.ts index 6986aec0b7..367bf2d0f9 100644 --- a/src/routes/(console)/bottomAlerts.ts +++ b/src/routes/(console)/bottomAlerts.ts @@ -1,32 +1,40 @@ import { isCloud } from '$lib/system'; import { isSameDay } from '$lib/helpers/date'; +import Imagine from '$lib/components/promos/imagine.svelte'; import { type BottomModalAlertItem, showBottomModalAlert } from '$lib/stores/bottom-alerts'; -import AiSuggestionsDark from '$lib/images/promos/ai-suggestions-dark.png'; -import AiSuggestionsLight from '$lib/images/promos/ai-suggestions-light.png'; const listOfPromotions: BottomModalAlertItem[] = []; if (isCloud) { - const aiSuggestionsPromo: BottomModalAlertItem = { - id: 'modal:database_ai_suggestions_announcement', - src: { - dark: AiSuggestionsDark, - light: AiSuggestionsLight - }, - title: 'Announcing Database AI suggestions', - message: 'From table name to schema in one click.', - plan: 'free', + const imaginePromo: BottomModalAlertItem = { + id: 'modal:imagine.dev', + backgroundComponent: Imagine, + title: 'Introducing Imagine', + message: 'the most complete AI builder to date', importance: 8, - scope: 'project', + scope: 'everywhere', + plan: 'free', cta: { - text: 'Read announcement', - link: () => 'https://appwrite.io/blog/post/announcing-database-ai-suggestions', + text: 'Try it now', + color: { + light: '#FFFFFF', + dark: '#000000' + }, + background: { + light: '#000000', + dark: '#FFFFFF' + }, + backgroundHover: { + light: '#333333', + dark: '#CCCCCC' + }, + link: () => 'https://studio.imagine.dev', external: true, hideOnClick: true }, show: true }; - listOfPromotions.push(aiSuggestionsPromo); + listOfPromotions.push(imaginePromo); } export function addBottomModalAlerts() { From 558f921b63b50781f5cf95370e374841edc2c35f Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 11 Dec 2025 18:06:05 +0530 Subject: [PATCH 03/14] bump: engine. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 59dc1e8857..15cb88fa7f 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@appwrite/console", "type": "module", "engines": { - "node": ">=20" + "node": ">=22.0.0" }, "scripts": { "dev": "vite dev", From cd7ee26be0d3063450aca2c2d3a82e5a281dca0e Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 11 Dec 2025 18:07:30 +0530 Subject: [PATCH 04/14] bump: engine. --- .github/workflows/copilot-setup-steps.yml | 3 ++- .github/workflows/e2e.yml | 2 +- .github/workflows/tests.yml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 6926b0c50d..ac3434c11d 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -21,7 +21,8 @@ jobs: - name: Use Node.js uses: actions/setup-node@v6 with: - node-version: 20 + node-version: 22 + - name: Install pnpm uses: pnpm/action-setup@v4 - name: Install dependencies diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 73a4883e68..ac1d7e7828 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -16,7 +16,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: 20 + node-version: 22 - name: Install pnpm uses: pnpm/action-setup@v4 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1674ff728d..968f8763e1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,7 +19,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: 20 + node-version: 22 - name: Install pnpm uses: pnpm/action-setup@v4 From 9de0afb12e9c647c20cf1aff5d0364b8935a4c29 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 11 Dec 2025 18:44:25 +0530 Subject: [PATCH 05/14] update: design changes. --- src/lib/components/bottomModalAlert.svelte | 14 ++++++++++++-- src/lib/stores/bottom-alerts.ts | 6 ++++++ src/routes/(console)/bottomAlerts.ts | 4 +++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/lib/components/bottomModalAlert.svelte b/src/lib/components/bottomModalAlert.svelte index c8ce42282c..0f6dfad327 100644 --- a/src/lib/components/bottomModalAlert.svelte +++ b/src/lib/components/bottomModalAlert.svelte @@ -108,6 +108,12 @@ message: 'Explore new features to enhance your projects and improve security.' }; + // override + if (currentModalAlert?.sameContentOnMobileLayout) { + fallback.title = currentModalAlert?.title; + fallback.message = currentModalAlert?.message; + } + const shouldApplyConfig = config?.enabled === true && visibleAlerts.length === 1; return { @@ -269,6 +275,7 @@