diff --git a/package.json b/package.json index b051c8489..a6890614e 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,8 @@ "dependencies": { "@kobalte/core": "^0.12.6", "@lunariajs/core": "^0.0.31", - "@orama/searchbox": "1.0.0-rc28", - "@oramacloud/client": "^1.1.5", + "@orama/searchbox": "1.0.0-rc40", + "@oramacloud/client": "^1.2.2", "@solidjs/meta": "^0.29.4", "@solidjs/router": "^0.13.3", "@solidjs/start": "^1.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 453d611cc..b39a1f016 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,11 +12,11 @@ dependencies: specifier: ^0.0.31 version: 0.0.31 '@orama/searchbox': - specifier: 1.0.0-rc28 - version: 1.0.0-rc28(@orama/highlight@0.1.6)(@orama/orama@2.0.14)(@oramacloud/client@1.1.5)(@preact/signals-core@1.6.0)(@preact/signals-react@2.0.1)(@r2wc/react-to-web-component@2.0.3)(react-dom@18.3.1)(react-markdown@9.0.1)(react@18.3.1)(typescript@5.4.5) + specifier: 1.0.0-rc40 + version: 1.0.0-rc40(@orama/highlight@0.1.6)(@orama/orama@2.0.19)(@oramacloud/client@1.2.2)(@preact/signals-core@1.6.0)(@preact/signals-react@2.0.1)(@r2wc/react-to-web-component@2.0.3)(react-dom@18.3.1)(react-markdown@9.0.1)(react-syntax-highlighter@15.5.0)(react@18.3.1)(typescript@5.4.5) '@oramacloud/client': - specifier: ^1.1.5 - version: 1.1.5(typescript@5.4.5) + specifier: ^1.2.2 + version: 1.2.2(typescript@5.4.5) '@solidjs/meta': specifier: ^0.29.4 version: 0.29.4(solid-js@1.8.17) @@ -1743,56 +1743,53 @@ packages: /@orama/highlight@0.1.6: resolution: {integrity: sha512-6Va8paStIoVy5algYDQu1hU0NUCkcrBx7FSt+0Lllp4d2VA1aVi6ACQ7xoINYls8sDZqg6vXf2lj4YDlVamBtw==} dependencies: - '@orama/orama': 2.0.14 + '@orama/orama': 2.0.20 dev: false - /@orama/orama@2.0.14: - resolution: {integrity: sha512-ibTX8/F5weax+BS1UzuHS8zmhB10i5TKZrEFrRiDDN8xeTww3rSIxb/nxW4YQFLRaTa7hIKlw7jb5ZBHtHBlCw==} + /@orama/orama@2.0.19: + resolution: {integrity: sha512-9nlF5iYUghewRt2TDmAJO5TN4hYFPhql4d2ZAdJYJtGSIi2BZjMNQIqQ874w0q/rur67wp0AWLb020EakEN0aA==} engines: {node: '>= 16.0.0'} dev: false - /@orama/orama@2.0.16: - resolution: {integrity: sha512-sGjqMkRbxBeGsiUDKOazLy1BeI12XbP1oe8iszWH6Xg4Y+EWR1QjyvAhZTFwMQWEtq+9up/GxJoDJagVckk3eQ==} + /@orama/orama@2.0.20: + resolution: {integrity: sha512-7TNNhl5cRbBbGTH2pvw3D4LtA3C2cbM3nas+HMFtl0qvMkuECPtzJElJs7xq8aGCB3rI2KOSb8GwCT9cW9M7ow==} engines: {node: '>= 16.0.0'} dev: false - /@orama/orama@2.0.18: - resolution: {integrity: sha512-KSty7+r8JxXv3iCuhLqQfwMvUiSWnXPaTPQPPoVPpwdvynEKcp1JNWKzTMB2tISDggf8jKhQXHEP3QXlGkvvtA==} - engines: {node: '>= 16.0.0'} - dev: false - - /@orama/plugin-analytics@2.0.18: - resolution: {integrity: sha512-E6C1kLjf7Db3QTeww3L5Iooa2lFL/jp+uNgaGSNBfHR+kUi/pnifmtFAItIQ12ZIa6bv07UvbhWhDMELQcz//A==} + /@orama/plugin-analytics@2.0.20: + resolution: {integrity: sha512-pkvN8vf/rEgLwBQhp410toL504aWsvjlECRU0SsAqi3rWX+cf8rq/WnOQhxUR5MEsokK9PISOy1qDmyrcxLu5w==} dependencies: - '@orama/orama': 2.0.18 + '@orama/orama': 2.0.20 dev: false - /@orama/plugin-secure-proxy@2.0.18(typescript@5.4.5): - resolution: {integrity: sha512-jGmRuybg03SESMExhdbhuRMUJUrZGpcssOGR0/LpsOqjhmLvB3VheODztodjJzsPSj98LO36pmGB9NtkSelsmg==} + /@orama/plugin-secure-proxy@2.0.20(typescript@5.4.5): + resolution: {integrity: sha512-i90sBn2PPASx0S8aEbDasaFuj9uc0U/Ui1fQX2iTg/9VUAmYPt0DZCfhszQXOr84nCSCEKMd8BkeQmzuj/RmIg==} dependencies: - '@oramacloud/client': 1.1.5(typescript@5.4.5) + '@oramacloud/client': 1.2.2(typescript@5.4.5) transitivePeerDependencies: + - encoding - typescript dev: false - /@orama/searchbox@1.0.0-rc28(@orama/highlight@0.1.6)(@orama/orama@2.0.14)(@oramacloud/client@1.1.5)(@preact/signals-core@1.6.0)(@preact/signals-react@2.0.1)(@r2wc/react-to-web-component@2.0.3)(react-dom@18.3.1)(react-markdown@9.0.1)(react@18.3.1)(typescript@5.4.5): - resolution: {integrity: sha512-vkE7KMKkyzpBIwQkoYvY8KShQCTYTwSqkSKsmLcKrKNtyli15Fg6/6nSueduyqhy1YZQW8nie1sK3qsKJe4q1Q==} + /@orama/searchbox@1.0.0-rc40(@orama/highlight@0.1.6)(@orama/orama@2.0.19)(@oramacloud/client@1.2.2)(@preact/signals-core@1.6.0)(@preact/signals-react@2.0.1)(@r2wc/react-to-web-component@2.0.3)(react-dom@18.3.1)(react-markdown@9.0.1)(react-syntax-highlighter@15.5.0)(react@18.3.1)(typescript@5.4.5): + resolution: {integrity: sha512-0anmkNXOPrddofguKEzDBLiH1td2w1Hp7cmXlRlh7DtQcZmSmJbCz75V2SD3eVw+XO65jk+UiM13+rr425OCbw==} peerDependencies: '@orama/highlight': ^0.1.6 - '@orama/orama': 2.0.14 - '@oramacloud/client': 1.0.14 + '@orama/orama': 2.0.19 + '@oramacloud/client': 1.1.6 '@preact/signals-core': ^1.6.0 '@preact/signals-react': ^2.0.1 '@r2wc/react-to-web-component': ^2.0.3 - react: ^18.2.0 - react-dom: ^18.2.0 + react: ^18.3.1 + react-dom: ^18.3.1 react-markdown: ^9.0.1 + react-syntax-highlighter: ^15.5.0 dependencies: '@orama/highlight': 0.1.6 - '@orama/orama': 2.0.14 - '@orama/plugin-analytics': 2.0.18 - '@orama/plugin-secure-proxy': 2.0.18(typescript@5.4.5) - '@oramacloud/client': 1.1.5(typescript@5.4.5) + '@orama/orama': 2.0.19 + '@orama/plugin-analytics': 2.0.20 + '@orama/plugin-secure-proxy': 2.0.20(typescript@5.4.5) + '@oramacloud/client': 1.2.2(typescript@5.4.5) '@phosphor-icons/react': 2.1.5(react-dom@18.3.1)(react@18.3.1) '@preact/signals-core': 1.6.0 '@preact/signals-react': 2.0.1(react@18.3.1) @@ -1800,24 +1797,28 @@ packages: classnames: 2.5.1 lodash.debounce: 4.0.8 lodash.omit: 4.5.0 + markdown-to-jsx: 7.4.7(react@18.3.1) object-to-css-variables: 0.2.1 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) react-markdown: 9.0.1(@types/react@18.3.2)(react@18.3.1) react-syntax-highlighter: 15.5.0(react@18.3.1) transitivePeerDependencies: + - encoding - typescript dev: false - /@oramacloud/client@1.1.5(typescript@5.4.5): - resolution: {integrity: sha512-cOFy6Fp4ZPDY4zCfCf/MD14b+sEispvxxCjknw1MLH2qejyTAv2rX3l85l/5VM+wOUK/Xa83/1+MkyLTqzCSGw==} + /@oramacloud/client@1.2.2(typescript@5.4.5): + resolution: {integrity: sha512-f3LJpaNiYIFVt/jcN8Zujv8b3Oy+l2NZ3sSUahx+H/m586eU66VODf/at3/8Z+sjKN1JeTcaRik1pcLF9OvCqQ==} dependencies: - '@orama/orama': 2.0.16 + '@orama/orama': 2.0.20 '@paralleldrive/cuid2': 2.2.2 lodash: 4.17.21 - react: 18.2.0 + openai: 4.51.0 + react: 18.3.1 vue: 3.4.26(typescript@5.4.5) transitivePeerDependencies: + - encoding - typescript dev: false @@ -2668,10 +2669,23 @@ packages: /@types/ms@0.7.34: resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} + /@types/node-fetch@2.6.11: + resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} + dependencies: + '@types/node': 20.11.28 + form-data: 4.0.0 + dev: false + /@types/node@17.0.45: resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} dev: false + /@types/node@18.19.34: + resolution: {integrity: sha512-eXF4pfBNV5DAMKGbI02NnDtWrQ40hAN558/2vvS4gMpMIxaf6JmD7YjnZbq0Q9TDSSkKBamime8ewRoomHdt4g==} + dependencies: + undici-types: 5.26.5 + dev: false + /@types/node@20.11.28: resolution: {integrity: sha512-M/GPWVS2wLkSkNHVeLkrF2fD5Lx5UC4PxA0uZcKc6QqbIQUJyW1jVjueJYi1z8n0I5PxYrtpnPnWglE+y9A0KA==} dependencies: @@ -3148,6 +3162,13 @@ packages: - supports-color dev: false + /agentkeepalive@4.5.0: + resolution: {integrity: sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==} + engines: {node: '>= 8.0.0'} + dependencies: + humanize-ms: 1.2.1 + dev: false + /ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} dependencies: @@ -3278,6 +3299,10 @@ packages: resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==} dev: false + /asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + dev: false + /autoprefixer@10.4.18(postcss@8.4.36): resolution: {integrity: sha512-1DKbDfsr6KUElM6wg+0zRNkB/Q7WcKYAaK+pzXn+Xqmszm/5Xa9coeNdtP88Vi+dPzZnMjhge8GIV49ZQkDa+g==} engines: {node: ^10 || ^12 || >=14} @@ -3676,6 +3701,13 @@ packages: resolution: {integrity: sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==} dev: false + /combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + dependencies: + delayed-stream: 1.0.0 + dev: false + /comma-separated-tokens@1.0.8: resolution: {integrity: sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==} dev: false @@ -3894,6 +3926,11 @@ packages: resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} dev: false + /delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + dev: false + /delegates@1.0.0: resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} dev: false @@ -4539,10 +4576,31 @@ packages: cross-spawn: 7.0.3 signal-exit: 4.1.0 + /form-data-encoder@1.7.2: + resolution: {integrity: sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==} + dev: false + + /form-data@4.0.0: + resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} + engines: {node: '>= 6'} + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + mime-types: 2.1.35 + dev: false + /format@0.2.2: resolution: {integrity: sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==} engines: {node: '>=0.4.x'} + /formdata-node@4.4.1: + resolution: {integrity: sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==} + engines: {node: '>= 12.20'} + dependencies: + node-domexception: 1.0.0 + web-streams-polyfill: 4.0.0-beta.3 + dev: false + /fraction.js@4.3.7: resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} dev: true @@ -5113,6 +5171,12 @@ packages: engines: {node: '>=16.17.0'} dev: false + /humanize-ms@1.2.1: + resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} + dependencies: + ms: 2.1.3 + dev: false + /ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} dev: false @@ -5634,6 +5698,15 @@ packages: resolution: {integrity: sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==} dev: true + /markdown-to-jsx@7.4.7(react@18.3.1): + resolution: {integrity: sha512-0+ls1IQZdU6cwM1yu0ZjjiVWYtkbExSyUIFU2ZeDIFuZM1W42Mh4OlJ4nb4apX4H8smxDHRdFaoIVJGwfv5hkg==} + engines: {node: '>= 10'} + peerDependencies: + react: '>= 0.14.0' + dependencies: + react: 18.3.1 + dev: false + /mdast-util-definitions@5.1.2: resolution: {integrity: sha512-8SVPMuHqlPME/z3gqVwWY4zVXn8lqKv/pAhC57FuJ40ImXyBpmO5ukh98zB2v7Blql2FiHjHv9LVztSIqjY+MA==} dependencies: @@ -6414,6 +6487,18 @@ packages: braces: 3.0.2 picomatch: 2.3.1 + /mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + dev: false + + /mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + dependencies: + mime-db: 1.52.0 + dev: false + /mime@1.6.0: resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} engines: {node: '>=4'} @@ -6650,6 +6735,11 @@ packages: engines: {node: ^16 || ^18 || >= 20} dev: false + /node-domexception@1.0.0: + resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} + engines: {node: '>=10.5.0'} + dev: false + /node-fetch-native@1.6.2: resolution: {integrity: sha512-69mtXOFZ6hSkYiXAVB5SqaRvrbITC/NPyqv7yuu/qw0nmgPyYbIMYYNIDhNtwPrzk0ptrimrLz/hhjvm4w5Z+w==} dev: false @@ -6810,6 +6900,22 @@ packages: is-wsl: 2.2.0 dev: false + /openai@4.51.0: + resolution: {integrity: sha512-UKuWc3/qQyklqhHM8CbdXCv0Z0obap6T0ECdcO5oATQxAbKE5Ky3YCXFQY207z+eGG6ez4U9wvAcuMygxhmStg==} + hasBin: true + dependencies: + '@types/node': 18.19.34 + '@types/node-fetch': 2.6.11 + abort-controller: 3.0.0 + agentkeepalive: 4.5.0 + form-data-encoder: 1.7.2 + formdata-node: 4.4.1 + node-fetch: 2.7.0 + web-streams-polyfill: 3.3.3 + transitivePeerDependencies: + - encoding + dev: false + /openapi-typescript@6.7.5: resolution: {integrity: sha512-ZD6dgSZi0u1QCP55g8/2yS5hNJfIpgqsSGHLxxdOjvY7eIrXzj271FJEQw33VwsZ6RCtO/NOuhxa7GBWmEudyA==} hasBin: true @@ -7088,7 +7194,7 @@ packages: engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.7 - picocolors: 1.0.0 + picocolors: 1.0.1 source-map-js: 1.2.0 dev: false @@ -7224,13 +7330,6 @@ packages: refractor: 3.6.0 dev: false - /react@18.2.0: - resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} - engines: {node: '>=0.10.0'} - dependencies: - loose-envify: 1.4.0 - dev: false - /react@18.3.1: resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} engines: {node: '>=0.10.0'} @@ -8833,6 +8932,16 @@ packages: /web-namespaces@2.0.1: resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} + /web-streams-polyfill@3.3.3: + resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} + engines: {node: '>= 8'} + dev: false + + /web-streams-polyfill@4.0.0-beta.3: + resolution: {integrity: sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==} + engines: {node: '>= 14'} + dev: false + /webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} dev: false diff --git a/src/ui/searchbox.tsx b/src/ui/searchbox.tsx index e481be168..648be6877 100644 --- a/src/ui/searchbox.tsx +++ b/src/ui/searchbox.tsx @@ -40,6 +40,7 @@ export function SearchBox() { "--backdrop-bg-color": "rgb(19 20 24 / 75%)", }, }, + searchMode: 'hybrid' }); RegisterSearchButton({ colorScheme: selectedTheme()?.value || "system",