You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@annotator.apache.org by ge...@apache.org on 2021/06/25 10:21:22 UTC

[incubator-annotator-website] branch asf-site updated: rebuild content

This is an automated email from the ASF dual-hosted git repository.

gerben pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-annotator-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 227b7b3  rebuild content
227b7b3 is described below

commit 227b7b3b2cb2b3983c229826e81d1a923ec4bd7a
Author: Gerben <ge...@treora.com>
AuthorDate: Fri Jun 25 12:21:04 2021 +0200

    rebuild content
---
 annotator                               |  2 +-
 content/demo/main.js                    | 18 +++++++++---------
 content/docs/api/assets/js/search.js    |  2 +-
 content/docs/api/modules/dom.html       | 27 ++++++++++++++-------------
 content/docs/getting-started/index.html |  4 ++--
 5 files changed, 27 insertions(+), 26 deletions(-)

diff --git a/annotator b/annotator
index d95ab66..087776e 160000
--- a/annotator
+++ b/annotator
@@ -1 +1 @@
-Subproject commit d95ab66750138a4623f20370871bb3cc70c3f347
+Subproject commit 087776e80657092d6c9c7e31ff2bd2844ce53e3a
diff --git a/content/demo/main.js b/content/demo/main.js
index 9cdba5d..a834bdd 100644
--- a/content/demo/main.js
+++ b/content/demo/main.js
@@ -3554,15 +3554,15 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
 
 /***/ }),
 
-/***/ "../packages/dom/src/highlight-range.ts":
-/*!**********************************************!*\
-  !*** ../packages/dom/src/highlight-range.ts ***!
-  \**********************************************/
-/*! exports provided: highlightRange */
+/***/ "../packages/dom/src/highlight-text.ts":
+/*!*********************************************!*\
+  !*** ../packages/dom/src/highlight-text.ts ***!
+  \*********************************************/
+/*! exports provided: highlightText */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 "use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"highlightRange\", function() { return highlightRange; });\n/* harmony import */ var _babel_runtime_corejs3_core_js_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js/object/keys */ \"../node_modules/@babel/runtime-corejs3/core-js/object/keys.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_object_keys_ [...]
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"highlightText\", function() { return highlightText; });\n/* harmony import */ var _babel_runtime_corejs3_core_js_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js/object/keys */ \"../node_modules/@babel/runtime-corejs3/core-js/object/keys.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_object_keys__W [...]
 
 /***/ }),
 
@@ -3570,11 +3570,11 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
 /*!************************************!*\
   !*** ../packages/dom/src/index.ts ***!
   \************************************/
-/*! exports provided: createCssSelectorMatcher, describeCss, makeCreateRangeSelectorMatcher, describeTextQuote, createTextQuoteSelectorMatcher, describeTextPosition, createTextPositionSelectorMatcher, highlightRange */
+/*! exports provided: createCssSelectorMatcher, describeCss, makeCreateRangeSelectorMatcher, describeTextQuote, createTextQuoteSelectorMatcher, describeTextPosition, createTextPositionSelectorMatcher, highlightText */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 "use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _css_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./css.ts */ \"../packages/dom/src/css.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createCssSelectorMatcher\", function() { return _css_ts__WEBPACK_IMPORTED_MODULE_0__[\"createCssSelectorMatcher\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"describeCss\", function() { return [...]
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _css_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./css.ts */ \"../packages/dom/src/css.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createCssSelectorMatcher\", function() { return _css_ts__WEBPACK_IMPORTED_MODULE_0__[\"createCssSelectorMatcher\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"describeCss\", function() { return [...]
 
 /***/ }),
 
@@ -3862,7 +3862,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 "use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncToGenerator */ \"../node_modules/@babel/runtime-corejs3/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncIterato [...]
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncToGenerator */ \"../node_modules/@babel/runtime-corejs3/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncIterato [...]
 
 /***/ }),
 
diff --git a/content/docs/api/assets/js/search.js b/content/docs/api/assets/js/search.js
index 2fcb40e..24f1daa 100644
--- a/content/docs/api/assets/js/search.js
+++ b/content/docs/api/assets/js/search.js
@@ -1 +1 @@
-window.searchData = {"kinds":{"1":"Module","64":"Function","256":"Interface","1024":"Property","2048":"Method"},"rows":[{"id":0,"kind":1,"name":"dom","url":"modules/dom.html","classes":"tsd-kind-module"},{"id":1,"kind":1,"name":"selector","url":"modules/selector.html","classes":"tsd-kind-module"},{"id":2,"kind":64,"name":"createCssSelectorMatcher","url":"modules/dom.html#createcssselectormatcher","classes":"tsd-kind-function tsd-parent-kind-module","parent":"dom"},{"id":3,"kind":64,"name [...]
\ No newline at end of file
+window.searchData = {"kinds":{"1":"Module","64":"Function","256":"Interface","1024":"Property","2048":"Method"},"rows":[{"id":0,"kind":1,"name":"dom","url":"modules/dom.html","classes":"tsd-kind-module"},{"id":1,"kind":1,"name":"selector","url":"modules/selector.html","classes":"tsd-kind-module"},{"id":2,"kind":64,"name":"createCssSelectorMatcher","url":"modules/dom.html#createcssselectormatcher","classes":"tsd-kind-function tsd-parent-kind-module","parent":"dom"},{"id":3,"kind":64,"name [...]
\ No newline at end of file
diff --git a/content/docs/api/modules/dom.html b/content/docs/api/modules/dom.html
index f2618ba..756bc1d 100644
--- a/content/docs/api/modules/dom.html
+++ b/content/docs/api/modules/dom.html
@@ -147,7 +147,7 @@
 									<li class="tsd-kind-function tsd-parent-kind-module"><a href="dom.html#describecss" class="tsd-kind-icon">describe<wbr>Css</a></li>
 									<li class="tsd-kind-function tsd-parent-kind-module"><a href="dom.html#describetextposition" class="tsd-kind-icon">describe<wbr>Text<wbr>Position</a></li>
 									<li class="tsd-kind-function tsd-parent-kind-module"><a href="dom.html#describetextquote" class="tsd-kind-icon">describe<wbr>Text<wbr>Quote</a></li>
-									<li class="tsd-kind-function tsd-parent-kind-module"><a href="dom.html#highlightrange" class="tsd-kind-icon">highlight<wbr>Range</a></li>
+									<li class="tsd-kind-function tsd-parent-kind-module"><a href="dom.html#highlighttext" class="tsd-kind-icon">highlight<wbr>Text</a></li>
 									<li class="tsd-kind-function tsd-parent-kind-module"><a href="dom.html#makecreaterangeselectormatcher" class="tsd-kind-icon">make<wbr>Create<wbr>Range<wbr>Selector<wbr>Matcher</a></li>
 								</ul>
 							</section>
@@ -473,10 +473,10 @@
 						</ul>
 					</section>
 					<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module">
-						<a name="highlightrange" class="tsd-anchor"></a>
-						<h3>highlight<wbr>Range</h3>
+						<a name="highlighttext" class="tsd-anchor"></a>
+						<h3>highlight<wbr>Text</h3>
 						<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module">
-							<li class="tsd-signature tsd-kind-icon">highlight<wbr>Range<span class="tsd-signature-symbol">(</span>range<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Range</span>, tagName<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, attributes<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string< [...]
+							<li class="tsd-signature tsd-kind-icon">highlight<wbr>Text<span class="tsd-signature-symbol">(</span>target<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Node</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Range</span>, tagName<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, attributes<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Record</sp [...]
 						</ul>
 						<ul class="tsd-descriptions">
 							<li class="tsd-description">
@@ -484,10 +484,11 @@
 								</aside>
 								<div class="tsd-comment tsd-typography">
 									<div class="lead">
-										<p>Wrap each text node in a given DOM Range with a <code>&lt;mark&gt;</code> or other element.</p>
+										<p>Wrap each text node in a given Node or Range with a <code>&lt;mark&gt;</code> or other
+										element.</p>
 									</div>
-									<p>If the Range start and/or ends within a Text node, that node will be split
-									in order to only wrap the contained part in the mark element.</p>
+									<p>If a Range is given that starts and/or ends within a Text node, that node
+									will be split in order to only wrap the contained part in the mark element.</p>
 									<p>The highlight can be removed again by calling the function that cleans up the
 										wrapper elements. Note that this might not perfectly restore the DOM to its
 										previous state: text nodes that were split are not merged again. One could
@@ -497,23 +498,23 @@
 								<h4 class="tsd-parameters-title">Parameters</h4>
 								<ul class="tsd-parameters">
 									<li>
-										<h5>range: <span class="tsd-signature-type">Range</span></h5>
+										<h5>target: <span class="tsd-signature-type">Node</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Range</span></h5>
 										<div class="tsd-comment tsd-typography">
-											<p>A DOM Range object. Note that as highlighting modifies the
-											DOM, the range may be unusable afterwards.</p>
+											<p>The Node/Range containing the text. If it is a Range, note
+											that as highlighting modifies the DOM, the Range may be unusable afterwards.</p>
 										</div>
 									</li>
 									<li>
 										<h5><span class="tsd-flag ts-flagOptional">Optional</span> tagName: <span class="tsd-signature-type">string</span></h5>
 										<div class="tsd-comment tsd-typography">
-											<p>The element used to wrap text nodes. Defaults to &#39;mark&#39;.</p>
+											<p>The element used to wrap text nodes. Defaults to <code>&#39;mark&#39;</code>.</p>
 										</div>
 									</li>
 									<li>
 										<h5><span class="tsd-flag ts-flagOptional">Optional</span> attributes: <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></h5>
 										<div class="tsd-comment tsd-typography">
 											<p>An object defining any attributes to be set on the
-											wrapper elements</p>
+											wrapper elements, e.g. its <code>class</code>.</p>
 										</div>
 									</li>
 								</ul>
@@ -698,7 +699,7 @@
 							<a href="dom.html#describetextquote" class="tsd-kind-icon">describe<wbr>Text<wbr>Quote</a>
 						</li>
 						<li class=" tsd-kind-function tsd-parent-kind-module">
-							<a href="dom.html#highlightrange" class="tsd-kind-icon">highlight<wbr>Range</a>
+							<a href="dom.html#highlighttext" class="tsd-kind-icon">highlight<wbr>Text</a>
 						</li>
 						<li class=" tsd-kind-function tsd-parent-kind-module">
 							<a href="dom.html#makecreaterangeselectormatcher" class="tsd-kind-icon">make<wbr>Create<wbr>Range<wbr>Selector<wbr>Matcher</a>
diff --git a/content/docs/getting-started/index.html b/content/docs/getting-started/index.html
index 82258ef..17dd36b 100644
--- a/content/docs/getting-started/index.html
+++ b/content/docs/getting-started/index.html
@@ -75,7 +75,7 @@
 <p>For the latest development version, get the <code>dev</code> tag. For example:</p>
 <pre class="language-shell"><code class="language-shell">$ <span class="token function">yarn</span> <span class="token function">add</span> @apache-annotator/dom@dev</code></pre>
 <p>And in your code import what you need:</p>
-<pre class="language-js"><code class="language-js"><span class="token keyword">import</span> <span class="token punctuation">{</span> highlightRange <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@apache-annotator/dom'</span><span class="token punctuation">;</span></code></pre>
+<pre class="language-js"><code class="language-js"><span class="token keyword">import</span> <span class="token punctuation">{</span> highlightText <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@apache-annotator/dom'</span><span class="token punctuation">;</span></code></pre>
 <h2 id="install-from-source">Install from source</h2>
 <p>See <a href="/docs/develop/">Develop</a>.</p>
 <h2 id="usage-example%3A-a-text-quote-highlighter">Usage example: a text quote highlighter</h2>
@@ -86,7 +86,7 @@
 <pre class="language-json"><code class="language-json"><span class="token punctuation">{</span><br>  type<span class="token operator">:</span> 'TextQuoteSelector'<span class="token punctuation">,</span><br>  exact<span class="token operator">:</span> 'ipsum'<span class="token punctuation">,</span><br>  prefix<span class="token operator">:</span> 'Lorem '<span class="token punctuation">,</span><br>  suffix<span class="token operator">:</span> ' dolor'<br><span class="token punctuation">}< [...]
 <p>The <em>prefix</em> and <em>suffix</em> attributes are there to know which of multiple occurrences of <em>“ipsum”</em> the Selector points to. They will include just enough surrounding words to make the selector unambiguous.</p>
 <p>Next, we define roughly the inverse function: given a TextQuoteSelector, we highlight the text it points to.</p>
-<pre class="language-js"><code class="language-js"><span class="token keyword">import</span> <span class="token punctuation">{</span> createTextQuoteSelectorMatcher<span class="token punctuation">,</span> highlightRange <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@apache-annotator/dom'</span><span class="token punctuation">;</span><br><br><span class="token keyword">async</span> <span class="token keyword">function</span> < [...]
+<pre class="language-js"><code class="language-js"><span class="token keyword">import</span> <span class="token punctuation">{</span> createTextQuoteSelectorMatcher<span class="token punctuation">,</span> highlightText <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@apache-annotator/dom'</span><span class="token punctuation">;</span><br><br><span class="token keyword">async</span> <span class="token keyword">function</span> <s [...]
 <p>As the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of"><code>for await … of</code></a> statement suggests, the matcher does not return just one match, but a stream (an async iterable) of matches. This is because it cannot be certain that a selector only has a single match (even when it includes a prefix &amp; suffix, perhaps the document changed!).</p>
 <p>We could use the functions defined above in many ways; keeping highlighted quotes in local storage, or in one’s bookmarks, or sharing them with others, and so on. For this example, we keep it simple and highlight each selection upon release of the mouse button; and store the selector to make it appear again after a page reload.</p>
 <pre class="language-js"><code class="language-js">document<span class="token punctuation">.</span><span class="token function">addEventListener</span><span class="token punctuation">(</span><span class="token string">'mouseup'</span><span class="token punctuation">,</span> <span class="token keyword">async</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span><br>  <span clas [...]