diff --git a/package.json b/package.json index 801ad8a0cd..3ca0f40283 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "download-contributors": "node ./scripts/download-contributor-data.js", "format": "prettier --write .", "format:check": "prettier --check .", - "generate:icons": "node ./src/icons/optimize.js", + "generate:icons": "node ./src/icons/optimize.js && pnpm prettier --write ./src/lib/components/ui/icon/**", "icons:build": "node ./src/icons/build.js", "icons:generate": "node ./src/icons/optimize.js && node ./src/icons/build.js", "icons:optimize": "node ./src/icons/optimize.js", @@ -40,6 +40,7 @@ "@fingerprintjs/fingerprintjs": "^4.5.1", "@internationalized/date": "3.5.0", "@lucide/svelte": "^0.539.0", + "@markdoc/markdoc": "^0.5.4", "@melt-ui/pp": "^0.3.2", "@melt-ui/svelte": "^0.86.5", "@number-flow/svelte": "^0.3.7", @@ -73,10 +74,11 @@ "eslint-plugin-svelte": "^2.46.1", "fuse.js": "^7.0.0", "globals": "^15.14.0", + "gray-matter": "^4.0.3", "highlight.js": "^11.11.1", "linkedom": "^0.18.9", "markdown-it": "^14.1.0", - "meilisearch": "^0.37.0", + "meilisearch": "^0.52.0", "melt": "^0.29.2", "motion": "^12.7.4", "node-appwrite": "^16.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eb2a32dbdb..54df44db93 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,6 +45,9 @@ importers: '@lucide/svelte': specifier: ^0.539.0 version: 0.539.0(svelte@5.38.3) + '@markdoc/markdoc': + specifier: ^0.5.4 + version: 0.5.4 '@melt-ui/pp': specifier: ^0.3.2 version: 0.3.2(@melt-ui/svelte@0.86.6(svelte@5.38.3))(svelte@5.38.3) @@ -144,6 +147,9 @@ importers: globals: specifier: ^15.14.0 version: 15.15.0 + gray-matter: + specifier: ^4.0.3 + version: 4.0.3 highlight.js: specifier: ^11.11.1 version: 11.11.1 @@ -154,8 +160,8 @@ importers: specifier: ^14.1.0 version: 14.1.0 meilisearch: - specifier: ^0.37.0 - version: 0.37.0(encoding@0.1.13) + specifier: ^0.52.0 + version: 0.52.0 melt: specifier: ^0.29.2 version: 0.29.3(@floating-ui/dom@1.7.4)(svelte@5.38.3) @@ -1893,6 +1899,9 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} deprecated: This package is no longer supported. + argparse@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} @@ -2106,9 +2115,6 @@ packages: core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} - cross-fetch@3.2.0: - resolution: {integrity: sha512-Q+xVJLoGOeIMXZmbUK4HYk+69cQH6LudR0Vu/pRm2YlU/hDV9CiS0gKUMaWY5f2NeUH9C1nV3bsTlCo0FsTV1Q==} - cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} @@ -2400,6 +2406,11 @@ packages: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + esquery@1.6.0: resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} engines: {node: '>=0.10'} @@ -2443,6 +2454,10 @@ packages: exponential-backoff@3.1.2: resolution: {integrity: sha512-8QxYTVXUkuy7fIIoitQkPwGonB8F3Zj8eEO8Sqg9Zv/bkI7RJAzowee4gr81Hak/dUTpA2Z7VfQgoijjPNlUZA==} + extend-shallow@2.0.1: + resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} + engines: {node: '>=0.10.0'} + fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -2636,6 +2651,10 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + gray-matter@4.0.3: + resolution: {integrity: sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==} + engines: {node: '>=6.0'} + h3@1.15.4: resolution: {integrity: sha512-z5cFQWDffyOe4vQ9xIqNfCZdV4p//vy6fBnr8Q1AWnVZ0teurKMG66rLj++TKwKPUP3u7iMUvrvKaEUiQw2QWQ==} @@ -2757,6 +2776,10 @@ packages: resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} engines: {node: '>= 0.4'} + is-extendable@0.1.1: + resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} + engines: {node: '>=0.10.0'} + is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -2843,6 +2866,10 @@ packages: js-tokens@9.0.1: resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} + js-yaml@3.14.1: + resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} + hasBin: true + js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true @@ -2866,6 +2893,10 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + kind-of@6.0.3: + resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} + engines: {node: '>=0.10.0'} + kleur@4.1.5: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} @@ -3024,8 +3055,8 @@ packages: mdurl@2.0.0: resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} - meilisearch@0.37.0: - resolution: {integrity: sha512-LdbK6JmRghCawrmWKJSEQF0OiE82md+YqJGE/U2JcCD8ROwlhTx0KM6NX4rQt0u0VpV0QZVG9umYiu3CSSIJAQ==} + meilisearch@0.52.0: + resolution: {integrity: sha512-RqPsB4a78sXf/ATB7PIVvKCG7yf0y1M+uCj8Z9Wku44WmCy3iz0C1PHjVV5xphQolo09CdhdyFoRxHQSJkOdpg==} melt@0.29.3: resolution: {integrity: sha512-cgorPvV3hSTugEnMpjLarugz8YRhUckM48i2gAgNzmqYx2w4hwvEsxA6GRy9DWst5rj+DKSmiDCcFRrHRpg/lA==} @@ -3203,15 +3234,6 @@ packages: node-fetch-native-with-agent@1.7.2: resolution: {integrity: sha512-5MaOOCuJEvcckoz7/tjdx1M6OusOY6Xc5f459IaruGStWnKzlI1qpNgaAwmn4LmFYcsSlj+jBMk84wmmRxfk5g==} - node-fetch@2.7.0: - resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} - engines: {node: 4.x || >=6.0.0} - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - node-fetch@3.3.2: resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -3682,6 +3704,10 @@ packages: sax@1.4.1: resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} + section-matter@1.0.0: + resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==} + engines: {node: '>=4'} + semver@7.7.2: resolution: {integrity: sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==} engines: {node: '>=10'} @@ -3749,6 +3775,9 @@ packages: split2@1.1.1: resolution: {integrity: sha512-cfurE2q8LamExY+lJ9Ex3ZfBwqAPduzOKVscPDXNCLLMvyaeD3DTz1yk7fVIs6Chco+12XeD0BB6HEoYzPYbXA==} + sprintf-js@1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + ssri@9.0.1: resolution: {integrity: sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} @@ -3781,6 +3810,10 @@ packages: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} engines: {node: '>=12'} + strip-bom-string@1.0.0: + resolution: {integrity: sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==} + engines: {node: '>=0.10.0'} + strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -3963,9 +3996,6 @@ packages: resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} engines: {node: '>=6'} - tr46@0.0.3: - resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - ts-api-utils@2.1.0: resolution: {integrity: sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==} engines: {node: '>=18.12'} @@ -4165,9 +4195,6 @@ packages: web-vitals@4.2.4: resolution: {integrity: sha512-r4DIlprAGwJ7YM11VZp4R884m0Vmgr6EAKe3P+kO0PPj3Unqyvv59rczf6UiGcb9Z8QxZVcqKNwv/g0WNdWwsw==} - webidl-conversions@3.0.1: - resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - whatwg-encoding@3.1.1: resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==} engines: {node: '>=18'} @@ -4176,9 +4203,6 @@ packages: resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==} engines: {node: '>=18'} - whatwg-url@5.0.0: - resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} - wheel-gestures@2.2.48: resolution: {integrity: sha512-f+Gy33Oa5Z14XY9679Zze+7VFhbsQfBFXodnU2x589l4kxGM9L5Y8zETTmcMR5pWOPQyRv4Z0lNax6xCO0NSlA==} engines: {node: '>=18'} @@ -5815,6 +5839,10 @@ snapshots: delegates: 1.0.0 readable-stream: 3.6.2 + argparse@1.0.10: + dependencies: + sprintf-js: 1.0.3 + argparse@2.0.1: {} aria-query@5.3.2: {} @@ -6054,12 +6082,6 @@ snapshots: core-util-is@1.0.3: {} - cross-fetch@3.2.0(encoding@0.1.13): - dependencies: - node-fetch: 2.7.0(encoding@0.1.13) - transitivePeerDependencies: - - encoding - cross-spawn@7.0.6: dependencies: path-key: 3.1.1 @@ -6386,6 +6408,8 @@ snapshots: acorn-jsx: 5.3.2(acorn@8.15.0) eslint-visitor-keys: 3.4.3 + esprima@4.0.1: {} + esquery@1.6.0: dependencies: estraverse: 5.3.0 @@ -6418,6 +6442,10 @@ snapshots: exponential-backoff@3.1.2: {} + extend-shallow@2.0.1: + dependencies: + is-extendable: 0.1.1 + fast-deep-equal@3.1.3: {} fast-glob@3.3.3: @@ -6624,6 +6652,13 @@ snapshots: graphemer@1.4.0: {} + gray-matter@4.0.3: + dependencies: + js-yaml: 3.14.1 + kind-of: 6.0.3 + section-matter: 1.0.0 + strip-bom-string: 1.0.0 + h3@1.15.4: dependencies: cookie-es: 1.2.2 @@ -6736,6 +6771,8 @@ snapshots: dependencies: hasown: 2.0.2 + is-extendable@0.1.1: {} + is-extglob@2.1.1: {} is-fullwidth-code-point@3.0.0: {} @@ -6821,6 +6858,11 @@ snapshots: js-tokens@9.0.1: {} + js-yaml@3.14.1: + dependencies: + argparse: 1.0.10 + esprima: 4.0.1 + js-yaml@4.1.0: dependencies: argparse: 2.0.1 @@ -6848,6 +6890,8 @@ snapshots: dependencies: json-buffer: 3.0.1 + kind-of@6.0.3: {} + kleur@4.1.5: {} known-css-properties@0.35.0: {} @@ -7003,11 +7047,7 @@ snapshots: mdurl@2.0.0: {} - meilisearch@0.37.0(encoding@0.1.13): - dependencies: - cross-fetch: 3.2.0(encoding@0.1.13) - transitivePeerDependencies: - - encoding + meilisearch@0.52.0: {} melt@0.29.3(@floating-ui/dom@1.7.4)(svelte@5.38.3): dependencies: @@ -7152,12 +7192,6 @@ snapshots: node-fetch-native-with-agent@1.7.2: {} - node-fetch@2.7.0(encoding@0.1.13): - dependencies: - whatwg-url: 5.0.0 - optionalDependencies: - encoding: 0.1.13 - node-fetch@3.3.2: dependencies: data-uri-to-buffer: 4.0.1 @@ -7582,6 +7616,11 @@ snapshots: sax@1.4.1: {} + section-matter@1.0.0: + dependencies: + extend-shallow: 2.0.1 + kind-of: 6.0.3 + semver@7.7.2: {} set-blocking@2.0.0: {} @@ -7688,6 +7727,8 @@ snapshots: dependencies: through2: 2.0.5 + sprintf-js@1.0.3: {} + ssri@9.0.1: dependencies: minipass: 3.3.6 @@ -7724,6 +7765,8 @@ snapshots: dependencies: ansi-regex: 6.2.0 + strip-bom-string@1.0.0: {} + strip-json-comments@3.1.1: {} strip-literal@3.0.0: @@ -7953,8 +7996,6 @@ snapshots: totalist@3.0.1: {} - tr46@0.0.3: {} - ts-api-utils@2.1.0(typescript@5.9.2): dependencies: typescript: 5.9.2 @@ -8150,19 +8191,12 @@ snapshots: web-vitals@4.2.4: {} - webidl-conversions@3.0.1: {} - whatwg-encoding@3.1.1: dependencies: iconv-lite: 0.6.3 whatwg-mimetype@4.0.0: {} - whatwg-url@5.0.0: - dependencies: - tr46: 0.0.3 - webidl-conversions: 3.0.1 - wheel-gestures@2.2.48: {} which@2.0.2: diff --git a/src/app.css b/src/app.css index 9e56d32f02..24390732c4 100644 --- a/src/app.css +++ b/src/app.css @@ -475,7 +475,7 @@ --color-card: color-mix(in srgb, var(--color-white) 90%, transparent); --color-tertiary: var(--color-greyscale-600); --color-offset: hsl(0 0% 0% / 0.08); - --color-subtle: var(--color-greyscale-850); + --color-subtle: var(--color-greyscale-50); } .dark { @@ -487,4 +487,5 @@ --color-tertiary: var(--color-greyscale-600); --color-offset: hsl(0 0% 100% / 0.1); --color-card: var(--color-greyscale-850); + --color-subtle: var(--color-greyscale-850); } diff --git a/src/hooks.server.ts b/src/hooks.server.ts index d4a2554807..4f6ddf7e7c 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -56,7 +56,8 @@ const securityheaders: Handle = async ({ event, resolve }) => { 'https://js.zi-scripts.com', 'https://ws.zoominfo.com', 'https://*.cookieyes.com', - 'https://cdn-cookieyes.com' + 'https://cdn-cookieyes.com', + 'https://ms-6b6b7d6df3ec-29090.fra.meilisearch.io' ]), 'style-src': "'self' 'unsafe-inline'", 'img-src': "'self' data: https:", @@ -81,7 +82,8 @@ const securityheaders: Handle = async ({ event, resolve }) => { 'https://hemsync.clickagy.com', 'https://ws.zoominfo.com ', 'https://*.cookieyes.com', - 'https://cdn-cookieyes.com' + 'https://cdn-cookieyes.com', + 'https://ms-6b6b7d6df3ec-29090.fra.meilisearch.io' ]), 'frame-src': join([ "'self'", diff --git a/src/icons/optimized/arrows-up-down.svg b/src/icons/optimized/arrows-up-down.svg new file mode 100644 index 0000000000..55d903cf86 --- /dev/null +++ b/src/icons/optimized/arrows-up-down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/optimized/blog.svg b/src/icons/optimized/blog.svg new file mode 100644 index 0000000000..c00f9a5de1 --- /dev/null +++ b/src/icons/optimized/blog.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/optimized/book.svg b/src/icons/optimized/book.svg new file mode 100644 index 0000000000..6529e6a822 --- /dev/null +++ b/src/icons/optimized/book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/optimized/database.svg b/src/icons/optimized/database.svg new file mode 100644 index 0000000000..da1d0cee61 --- /dev/null +++ b/src/icons/optimized/database.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/optimized/docs.svg b/src/icons/optimized/docs.svg new file mode 100644 index 0000000000..153c58080b --- /dev/null +++ b/src/icons/optimized/docs.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/optimized/hash.svg b/src/icons/optimized/hash.svg new file mode 100644 index 0000000000..380967cd41 --- /dev/null +++ b/src/icons/optimized/hash.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/optimized/integrations.svg b/src/icons/optimized/integrations.svg new file mode 100644 index 0000000000..176b23d39c --- /dev/null +++ b/src/icons/optimized/integrations.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/optimized/lightning.svg b/src/icons/optimized/lightning.svg new file mode 100644 index 0000000000..176b23d39c --- /dev/null +++ b/src/icons/optimized/lightning.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/optimized/quickstarts.svg b/src/icons/optimized/quickstarts.svg new file mode 100644 index 0000000000..3570c091be --- /dev/null +++ b/src/icons/optimized/quickstarts.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/optimized/text.svg b/src/icons/optimized/text.svg new file mode 100644 index 0000000000..489b541022 --- /dev/null +++ b/src/icons/optimized/text.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/optimized/user.svg b/src/icons/optimized/user.svg new file mode 100644 index 0000000000..785a276b18 --- /dev/null +++ b/src/icons/optimized/user.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/optimized/users.svg b/src/icons/optimized/users.svg new file mode 100644 index 0000000000..a1cdc78fc6 --- /dev/null +++ b/src/icons/optimized/users.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/arrows-up-down.svg b/src/icons/svg/arrows-up-down.svg new file mode 100644 index 0000000000..0538467edb --- /dev/null +++ b/src/icons/svg/arrows-up-down.svg @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/src/icons/svg/blog.svg b/src/icons/svg/blog.svg new file mode 100644 index 0000000000..b845af4443 --- /dev/null +++ b/src/icons/svg/blog.svg @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/src/icons/svg/database.svg b/src/icons/svg/database.svg new file mode 100644 index 0000000000..1f0f8f820a --- /dev/null +++ b/src/icons/svg/database.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/src/icons/svg/docs.svg b/src/icons/svg/docs.svg new file mode 100644 index 0000000000..7c891111d7 --- /dev/null +++ b/src/icons/svg/docs.svg @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/src/icons/svg/lightning.svg b/src/icons/svg/lightning.svg new file mode 100644 index 0000000000..02f5a8c76b --- /dev/null +++ b/src/icons/svg/lightning.svg @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/src/icons/svg/quickstarts.svg b/src/icons/svg/quickstarts.svg new file mode 100644 index 0000000000..2e208a46c2 --- /dev/null +++ b/src/icons/svg/quickstarts.svg @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/src/icons/svg/text.svg b/src/icons/svg/text.svg new file mode 100644 index 0000000000..22ea7416c2 --- /dev/null +++ b/src/icons/svg/text.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/icons/svg/user.svg b/src/icons/svg/user.svg new file mode 100644 index 0000000000..c209ae4364 --- /dev/null +++ b/src/icons/svg/user.svg @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/src/icons/svg/users.svg b/src/icons/svg/users.svg new file mode 100644 index 0000000000..5d03337de0 --- /dev/null +++ b/src/icons/svg/users.svg @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/src/lib/components/Newsletter.svelte b/src/lib/components/Newsletter.svelte index 659fec0f63..8668ffc8ba 100644 --- a/src/lib/components/Newsletter.svelte +++ b/src/lib/components/Newsletter.svelte @@ -141,16 +141,3 @@ - - diff --git a/src/lib/components/Search.svelte b/src/lib/components/Search.svelte deleted file mode 100644 index 892ab0085b..0000000000 --- a/src/lib/components/Search.svelte +++ /dev/null @@ -1,300 +0,0 @@ - - - - - - -
-
- - - - { - if (e.key === 'Tab') { - e.preventDefault(); - } - }} - /> -
- {#if value} -
- {#if results.length > 0} -
- {results.length} results found -
- - {:else} -

- No results found for {value} -

- {/if} -
- {/if} -
-
Recommended
- -
-
-
-
- - diff --git a/src/lib/components/index.ts b/src/lib/components/index.ts index 1028053c25..3e8a408189 100644 --- a/src/lib/components/index.ts +++ b/src/lib/components/index.ts @@ -14,4 +14,4 @@ export { default as Feedback } from './Feedback.svelte'; export { default as Select } from './Select.svelte'; export { default as MetricCard } from './MetricCard.svelte'; export { default as IsLoggedIn } from './IsLoggedIn.svelte'; -export { default as Search } from './Search.svelte'; +export { default as Search } from './search-v2.svelte'; diff --git a/src/lib/components/search-v2.svelte b/src/lib/components/search-v2.svelte new file mode 100644 index 0000000000..7f71531420 --- /dev/null +++ b/src/lib/components/search-v2.svelte @@ -0,0 +1,342 @@ + + + + + + +
+
+
+ + { + if (e.key === 'Tab') { + e.preventDefault(); + } + }} + /> + {#if value} + + {/if} +
+
+ {#if value && value.length >= 3} + {#if results.length > 0} + {@const totalResults = results.length} + {@const groupOrder: readonly GroupKey[] = ['docs', 'blog', 'integrations'] as const} + + {@const groupConfig = { + docs: { label: 'Docs', icon: 'docs' }, + blog: { label: 'Blog', icon: 'blog' }, + integrations: { label: 'Integrations', icon: 'integrations' } + } as const} + +
+ {#each groupOrder as groupKey} + {@const groupResults = groupedResults[groupKey]} + {#if groupResults && groupResults.length > 0} + {@const config = groupConfig[groupKey]} +
+
+ {config.label} +
+ +
+ {/if} + {/each} +
+
+
+ {totalResults} result{totalResults === 1 ? '' : 's'} found +
+
+ {:else} +

+ No results found for "{value}" +

+ {/if} + {:else} +
+
Suggestions
+
    + {#each recommended as hit, i (hit.uid)} + {@const index = i + (results.length ? results.length : 0)} +
  • + + + +
    + {hit.h1} +
    +
    +
  • + {/each} +
+
+ {/if} +
+
+
diff --git a/src/lib/components/ui/icon/sprite/sprite.svelte b/src/lib/components/ui/icon/sprite/sprite.svelte index 59df8605f7..7502b57099 100644 --- a/src/lib/components/ui/icon/sprite/sprite.svelte +++ b/src/lib/components/ui/icon/sprite/sprite.svelte @@ -59,6 +59,21 @@ fill="currentColor" > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +