summaryrefslogtreecommitdiff
path: root/client/simple/src/js/main/infinite_scroll.ts
AgeCommit message (Collapse)Author
2025-12-02[mod] client/simple: client plugins (#5406)Ivan Gabaldon
* [mod] client/simple: client plugins Defines a new interface for client side *"plugins"* that coexist with server side plugin system. Each plugin (e.g., `InfiniteScroll`) extends the base `ts Plugin`. Client side plugins are independent and lazy‑loaded via `router.ts` when their `load()` conditions are met. On each navigation request, all applicable plugins are instanced. Since these are client side plugins, we can only invoke them once DOM is fully loaded. E.g. `Calculator` will not render a new `answer` block until fully loaded and executed. For some plugins, we might want to handle its availability in `settings.yml` and toggle in UI, like we do for server side plugins. In that case, we extend `py Plugin` instancing only the information and then checking client side if [`settings.plugins`](https://github.com/inetol/searxng/blob/1ad832b1dc33f3f388da361ff2459b05dc86a164/client/simple/src/js/toolkit.ts#L134) array has the plugin id. * [mod] client/simple: rebuild static
2025-11-07[upd] web-client (simple): Bump the minor group in /client/simple with 4 ↵dependabot[bot]
updates (#5423) * [upd] web-client (simple): Bump the minor group Bumps the minor group in /client/simple with 4 updates: [ol](https://github.com/openlayers/openlayers), [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [sharp](https://github.com/lovell/sharp). Updates `ol` from 10.6.1 to 10.7.0 - [Release notes](https://github.com/openlayers/openlayers/releases) - [Commits](https://github.com/openlayers/openlayers/compare/v10.6.1...v10.7.0) Updates `@biomejs/biome` from 2.3.2 to 2.3.4 - [Release notes](https://github.com/biomejs/biome/releases) - [Changelog](https://github.com/biomejs/biome/blob/main/packages/@biomejs/biome/CHANGELOG.md) - [Commits](https://github.com/biomejs/biome/commits/@biomejs/biome@2.3.4/packages/@biomejs/biome) Updates `@types/node` from 24.9.2 to 24.10.0 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `sharp` from 0.34.4 to 0.34.5 - [Release notes](https://github.com/lovell/sharp/releases) - [Commits](https://github.com/lovell/sharp/compare/v0.34.4...v0.34.5) --- updated-dependencies: - dependency-name: ol dependency-version: 10.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor - dependency-name: "@biomejs/biome" dependency-version: 2.3.4 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor - dependency-name: "@types/node" dependency-version: 24.10.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor - dependency-name: sharp dependency-version: 0.34.5 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor ... Signed-off-by: dependabot[bot] <support@github.com> * [upd] web-client (simple): rebuild static --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ivan Gabaldon <igabaldon@inetol.net>
2025-08-18[license] client/simple: SPDX-License-Identifier: AGPL-3.0-or-laterMarkus Heiser
SPDX short-form identifiers to communicate license information in a simple, efficient, portable and machine-readable manner [1] [1] https://spdx.dev/learn/handling-license-info/
2025-08-18[enh] theme/simple: custom routerIvan Gabaldon
Lay the foundation for loading scripts granularly depending on the endpoint it's on. Remove vendor specific prefixes as there are now managed by browserslist and LightningCSS. Enabled quite a few rules in Biome that don't come in recommended to better catch issues and improve consistency. Related: - https://github.com/searxng/searxng/pull/5073#discussion_r2256037965 - https://github.com/searxng/searxng/pull/5073#discussion_r2256057100
2025-08-18[mod] theme/simple: migrate codebase to TypeScriptIvan Gabaldon
TypeScript is a superset of JavaScript, converting the entire theme to TypeScript allows us to receive much more feedback on possible issues made in package updates or our own typos, furthermore, it allows to transpile properly to lower specs. This PR couldn't be done in smaller commits, a lot of work needed to make everything *work properly*: - A browser baseline has been set that requires minimum **Chromium 93, Firefox 92 and Safari 15** (proper visuals/operation on older browser versions is not guaranteed) - LightningCSS now handles minification and prefix creation for CSS. - All hardcoded polyfills and support for previous browser baseline versions have been removed. - Convert codebase to TypeScript. - Convert IIFE to ESM, handling globals with IIFE is cumbersome, ESM is the standard for virtually any use of JS nowadays. - Vite now builds the theme without the need for `vite-plugin-static-copy`. - `searxng.ready` now accepts an array of conditions for the callback to be executed. - Replace `leaflet` with `ol` as there were some issues with proper Vite bundling. - Merged `head` with `main` script, as head was too small now. - Add `assertElement` to properly check the existence of critical DOM elements. - `searxng.on` renamed to `searxng.listen` with some handling improvements.