
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@apache-annotator/selector
Advanced tools
Apache Annotator (incubating) provides libraries to enable annotation related software, with an initial focus on identification of textual fragments in browser environments.
The Apache Annotator project is written in TypeScript, but the project is compiled and distributed in CommonJS and ECMAScript Module formats.
The project is made up of multiple packages. Install the apache-annotator
package, which includes all sub-packages, or install individual packages from
the @apache-annotator
scope.
Import packages from either apache-annotator/package
or
@apache-annotator/package
.
Currently, the following sub-packages are part of the project:
@apache-annotator/dom
This package contains functions for creating and resolving Web Annotation Selectors in DOM environments.
@apache-annotator/selector
This package contains generic utilities for composing functions that create and resolve Web Annotation Selectors.
We use Lerna to juggle the various Apache Annotator libraries. If you'd like to contribute, you'll need the following:
$ yarn install
$ yarn test
$ yarn start
Many Annotations refer to part of a resource, rather than all of it, as the Target. We call that part of the resource a Segment (of Interest). A Selector is used to describe how to determine the Segment from within the Source resource.
The W3C Web Annotation Data Model outlines a number of different selectors. See table below for full list and status.
Selector | Description | Implementation Status |
---|---|---|
Text Quote | This Selector describes a range of text, including some of the text immediately before (a prefix) and after (a suffix) it to distinguish between multiple copies of the same sequence of characters. | Yes |
CSS | CSS Selectors allow for a wide variety of well supported ways to describe the path to an element in a web page. | Yes |
Text Position | This Selector describes a range of text by recording the start and end positions of the selection in the stream. | No |
Fragment | Uses the fragment part of an IRI defined by the representation's media type. | No |
XPath | Implements an XPath based selection. | No |
Data Postion | Similar to the Text Position Selector, the Data Position Selector uses the same properties but works at the byte in bitstream level rather than the character in text level. | No |
SVG | An SvgSelector defines an area through the use of the Scalable Vector Graphics standard. | No |
Range | A Range Selector can be used to identify the beginning and the end of the selection by using other Selectors. | Yes |
Refinement | Select a part of a selection, rather than as a selection of the complete resource. |
If you have any Web Annotation Data Model JSON documents, you can validate them
using the validate
script:
$ yarn validate --url https://raw.githubusercontent.com/w3c/web-annotation-tests/master/tools/samples/correct/anno1.json
With the --url
option you can pass in a URL or a local path to a JSON file.
Valid:
https://raw.githubusercontent.com/w3c/web-annotation-tests/master/tools/samples/correct/anno1.json
Invalid:
https://raw.githubusercontent.com/w3c/web-annotation-tests/master/tools/samples/incorrect/anno1.json
Apache License 2.0
Apache Annotator is currently undergoing incubation at The Apache Software Foundation.
See the accompanying DISCLAIMER file for details.
FAQs
Web Annotation selector for engine.
The npm package @apache-annotator/selector receives a total of 0 weekly downloads. As such, @apache-annotator/selector popularity was classified as not popular.
We found that @apache-annotator/selector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.