Scan your whole stack
From OX Research Newsroom
Are you using @mango-iiif/lychee?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.2.0
@mango-iiif/lychee was last scanned on 23 Nov 2026 at version 0.2.0. Risk score 1 of 100 (low). No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.2.0 LATEST | 23 Nov 2026 | 1 rule fired |
| 0.0.0-stage | 23 Nov 2026 | Not shown |
Findings for v0.2.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
A file matches the output style of a JavaScript obfuscator, such as many identifiers named _0x followed by hex digits or an indexed string-array lookup. Some commercial packages obfuscate their code legitimately; obfuscation also hides what code does. On its own this is not evidence of malicious behavior.
LOWThe score describes 0.2.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
A IIIF annotation editor for Mango.
@mango-iiif/av
plays the recording through RAMP, with
its transcript, chapters and existing annotations alongside.
Annotations target a moment or a range.AnnotationPage.<script
type="module"
src="https://unpkg.com/@mango-iiif/lychee/src/dist/mango-annotation-editor.js"
></script>
<mango-annotation-editor
manifest-id="https://iiif.io/api/cookbook/recipe/0005-image-service/manifest.json"
config='{"theme":"light","annotations":{"languages":["en","cy"]}}'
></mango-annotation-editor>
The standalone bundle includes the viewer and its styles. @mango-iiif/av
(with React and RAMP) is fetched only when an audio or video manifest is opened, and the Auto Select model
only when that tool is first used.
npm install @mango-iiif/lychee @mango-iiif/iiif-viewer svelte
Custom element:
import "@mango-iiif/lychee/element";
Svelte component:
<script>
import { AnnotationEditor } from "@mango-iiif/lychee";
import "@mango-iiif/iiif-viewer/style.css";
import "@mango-iiif/lychee/style.css";
</script>
<AnnotationEditor manifestId="https://example.org/iiif/manifest.json" />
The package ships its smart-tool workers in src/dist/annotorious/assets/ and
loads them relative to the bundle, so a bundler copies them like any other asset.
| Entry | Contents |
|---|---|
@mango-iiif/lychee |
AnnotationEditor, AnnotationBrowserTable (for a host's own list), export and repository helpers, W3C types |
@mango-iiif/lychee/element |
<mango-annotation-editor> |
@mango-iiif/lychee/style.css |
Editor styles (the viewer's live in @mango-iiif/iiif-viewer/style.css) |
config is the viewer's config plus an annotations block:
editor.config = {
language: "en", // interface language
theme: "light", // dark, light, sepia, midnight or ringo; users can change it under Settings
showSettings: true, // the header's Settings menu (viewer colour)
annotations: {
languages: ["en", "cy"], // what annotations are written in; one hides the tabs
mediaType: "audio", // image | audio | video; detected from the first canvas when absent
wikidata: true, // offer Wikidata for "Identify"
authorities: [
// further sources for "Identify", each a host endpoint
{
id: "geonames",
label: "GeoNames",
endpoint: "/api/geonames",
placeholder: "Find a place",
},
],
ai: { endpoint: "/api/describe" }, // "Suggest with AI" for images, shown only when set
gallery: "open", // page thumbnails under the image: open, closed (toolbar toggle) or off
autoSelect: true, // offer Auto Select (WebGPU, ~40 MB model on first use)
userId: undefined, // the signed-in user (a URI): the creator of new annotations; splits the list into Your / All annotations
showJson: false, // show the W3C JSON being written
pageId: undefined, // HTTP(S) id for exported AnnotationPages
export: ["annotations", "structures"], // what the download and exportToHost() may hand over
contents: true, // the Contents tab, for the item's table of contents; off where the host can't save one
contentsLevels: 2, // maximum chapter nesting levels that can be authored; existing deeper contents are preserved
},
};
Credentials stay on the host; the editor only calls URLs it is given.
Authority — GET {endpoint}?q=cardiff
{
"results": [
{
"id": "2653822",
"uri": "https://sws.geonames.org/2653822/",
"label": "Cardiff",
"description": "Wales"
}
]
}
or { "error": "message" } with a non-2xx status.
AI — POST {endpoint} with { imageUrl, region?, context: { title?, canvasLabel?, metadata? } }.
imageUrl is a IIIF Image API crop of the selected area when the image has a
service. The response is { model, label_<lang>?, description_<lang>?, transcription?, transcription_language?, tags?: string[], entities?: [{ name, kind, authority, search_term, evidence? }] }; label and description may
instead be language maps. Suggestions only fill the form, and anything used keeps
the model as the body's generator.
apps/demo/server/api.ts implements both for the demo (Claude for AI,
GeoNames for places).
| Intent | Motivation | Bodies |
|---|---|---|
| Note | commenting |
optional label (language map) + one TextualBody per language |
| Transcribe | supplementing |
one TextualBody per language |
| Tag | tagging |
one TextualBody per keyword, purpose: "tagging" |
| Identify | identifying |
one SpecificResource per linked entity, purpose: "identifying" |
| Highlight | highlighting |
optional TextualBody per language |
| Link | linking |
SpecificResource to the linked item, with a t= range for recordings |
Targets: an area of an image (SpecificResource on the canvas, with an
xywh=pixel: fragment or SVG selector in canvas coordinates), a whole canvas,
or a moment or range of a recording (t=start[,end]). Several annotations can
share one area; moving the shape moves them all. Annotations about the whole
manifest (from the host or the item) are read, shown and editable, but not
offered for new ones.
<mango-annotation-editor> takes manifest-id, config and plugins (viewer
plugins for the image stage).
Annotations, as W3C JSON: getAnnotations() (the current canvas, the
manifest's and the user's), getUserAnnotations(), addAnnotation(a),
setAnnotations(list) (replaces the user's) and removeAnnotation(id).
The table of contents, as IIIF Ranges: getStructures() (what is being
written) and setStructures(ranges) (opens one as saved). It opens from the
manifest's structures; see Tables of contents.
Image navigation is on the element as on <mango-viewer>: getViewBox,
setViewBox, getZoom, setZoom, zoomIn, zoomOut, goHome, panTo,
getCanvasIndex, setCanvasByIndex, getCanvasId, getManifestId,
setManifest, getState, getViewer() and on/off for viewer events.
| Event | Detail |
|---|---|
annotationCreate |
{ annotation } |
annotationUpdate |
{ annotation } |
annotationDelete |
{ id } |
annotationsChange |
{ annotations } — all the user's annotations |
exportAnnotationPage |
{ page, publicationValid, unresolvedIdentities, unresolvedPageIdentity } |
exportStructures |
{ structures, publicationValid, unresolvedIdentities } |
structuresChange |
{ structures } — the table of contents being written |
structuresSave |
{ structures, manifestId } — the whole table of contents, saved |
themeChange |
{ theme } — the user picked a viewer colour under Settings |
The download offers annotations, the table of contents, or both, and fires one
event per kind. editor.exportToHost(["structures"]) does the same without a
file; with no argument it sends every kind config.annotations.export allows.
editor.addEventListener("exportAnnotationPage", async (event) => {
await fetch("/api/annotations", {
method: "PUT",
headers: { "Content-Type": "application/ld+json" },
body: JSON.stringify(event.detail.page),
});
});
New annotations have urn:uuid: identifiers; publicationValid stays false
until the host assigns HTTP(S) ones (see createHostRepository and
adoptAssignedId). The viewer's navigation events (pageChange, zoomChange, …)
are dispatched on the element too.
AnnotationEditor config, annotations, events, export
├─ ImageStage Mango ViewerCore (no annotation overlay)
│ ├─ annotorious.ts Auto Select, colours and regions on AnnotoriousEditor
│ └─ AnnotationToolbar the drawing tools (@mango-iiif/annotation)
├─ AVStage <mango-av-media> (@mango-iiif/av), lazily loaded
├─ AnnotationSidebar the intent-first form, shared by both (@mango-iiif/annotation)
└─ AnnotationList every annotation on the page or recording, under the form
The sidebar, toolbar and Annotorious facade come from @mango-iiif/annotation,
and the player from @mango-iiif/av. Authority search providers are this
package's own: Wikidata (src/lib/authorities/wikidata.ts) and host endpoints
(endpoint.ts) are passed to the sidebar as providers.
The editor owns the annotations; Mango only shows the image. Shapes and the
annotations about them are stored apart (src/lib/annotations/store.svelte.ts),
and W3C is produced from them on demand (w3c.ts). The manifest's own
annotation pages are fetched and shown read-only.
Two things to review when upgrading Annotorious, its plugins or Mango:
build/smartTools.ts, carried over from
cyw-annotate, patches the smart-tool plugins: their workers move next
to the bundle instead of /assets/ on the site root, the SAM worker loads the
ONNX runtime (~27 MB) from jsDelivr rather than shipping it, and SAM 0.5.0's
worker is stopped on destroy. The build fails if upstream no longer matches.instanceof $.Point, so points from a second copy are misread
and no shape can be drawn. Mango leaves openseadragon external for this, and
the element build dedupes it; keep it that way when changing either build.npm run dev serves apps/demo at http://localhost:5173: a catalogue of test
manifests (the NLW Cardiganshire Constabulary register, and two Women's Archive
Wales / Veteran Films recordings with transcripts and chapters), any manifest
URL, and the Wellcome page. annotation-editor.html takes ?manifest=,
?type=image|audio|video, ?json=1, ?gallery=off|closed|open and ?lang=.
The recording fixtures in apps/demo/fixtures keep their original
http://localhost:5173/iiif-pcw-* identifiers; the dev server rebases them onto
itself, and build:demo writes apps/demo/manifests for DEMO_BASE_URL (or the
Vercel URL). Media, IIIF images and Wikidata are external.
To try AI suggestions and GeoNames, copy apps/demo/.env.example to .env at the
repository root and fill it in; the demo enables them when its API server
reports keys.
The viewer is linked from a sibling checkout ("@mango-iiif/iiif-viewer": "file:../Mango"), so build it first:
(cd ../Mango && npm ci && npm run build:dist)
npm ci
npm run dev
npm run build:dist # library, custom element and type declarations in src/dist
npm run build:demo # build:dist, then copy into apps/demo
npm test # unit tests
npm run test:e2e # Playwright, against the built demo (needs network)
npm run check # svelte-check
npm run lint
npm run i18n:check
Auto Select needs WebGPU (desktop Chrome or Edge), and synthetic clicks don't start Smart Scissors' edge detection in headless browsers, so check those two by hand.
The editor was rebuilt on Annotorious and RAMP:
AnnotationWorkspace, AnnotationEditorLayer and w3cToResolved exports;@mango-iiif/annotation and @mango-iiif/w3c-parser are no longer used;ResolvedAnnotation;annotationCreate/Update/Delete/annotationsChange now come from the
editor; exportAnnotations and annotationSave are gone;exportAnnotationPage reports publicationValid, unresolvedIdentities and
unresolvedPageIdentity.Lychee is available under the MIT License.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.