@acornly/core 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter.d.ts +27 -2
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +5 -0
- package/dist/adapter.js.map +1 -1
- package/dist/anchoring/canvas.d.ts +33 -0
- package/dist/anchoring/canvas.d.ts.map +1 -0
- package/dist/anchoring/canvas.js +112 -0
- package/dist/anchoring/canvas.js.map +1 -0
- package/dist/anchoring/context-provider.d.ts +63 -0
- package/dist/anchoring/context-provider.d.ts.map +1 -0
- package/dist/anchoring/context-provider.js +78 -0
- package/dist/anchoring/context-provider.js.map +1 -0
- package/dist/anchoring/describe.d.ts +36 -2
- package/dist/anchoring/describe.d.ts.map +1 -1
- package/dist/anchoring/describe.js +102 -20
- package/dist/anchoring/describe.js.map +1 -1
- package/dist/anchoring/fingerprint.d.ts +47 -13
- package/dist/anchoring/fingerprint.d.ts.map +1 -1
- package/dist/anchoring/fingerprint.js +58 -68
- package/dist/anchoring/fingerprint.js.map +1 -1
- package/dist/anchoring/index.d.ts +5 -0
- package/dist/anchoring/index.d.ts.map +1 -1
- package/dist/anchoring/index.js +5 -0
- package/dist/anchoring/index.js.map +1 -1
- package/dist/anchoring/media.d.ts +2 -1
- package/dist/anchoring/media.d.ts.map +1 -1
- package/dist/anchoring/media.js +7 -2
- package/dist/anchoring/media.js.map +1 -1
- package/dist/anchoring/pdf.d.ts +204 -0
- package/dist/anchoring/pdf.d.ts.map +1 -0
- package/dist/anchoring/pdf.js +608 -0
- package/dist/anchoring/pdf.js.map +1 -0
- package/dist/anchoring/profiles.d.ts +140 -0
- package/dist/anchoring/profiles.d.ts.map +1 -0
- package/dist/anchoring/profiles.js +682 -0
- package/dist/anchoring/profiles.js.map +1 -0
- package/dist/anchoring/providers.d.ts +16 -1
- package/dist/anchoring/providers.d.ts.map +1 -1
- package/dist/anchoring/providers.js +15 -0
- package/dist/anchoring/providers.js.map +1 -1
- package/dist/anchoring/resolver.d.ts +23 -5
- package/dist/anchoring/resolver.d.ts.map +1 -1
- package/dist/anchoring/resolver.js +32 -13
- package/dist/anchoring/resolver.js.map +1 -1
- package/dist/anchoring/site-profiles.d.ts +31 -0
- package/dist/anchoring/site-profiles.d.ts.map +1 -0
- package/dist/anchoring/site-profiles.js +27 -0
- package/dist/anchoring/site-profiles.js.map +1 -0
- package/dist/body-prepare.d.ts +33 -0
- package/dist/body-prepare.d.ts.map +1 -0
- package/dist/body-prepare.js +88 -0
- package/dist/body-prepare.js.map +1 -0
- package/dist/body-size.d.ts +20 -0
- package/dist/body-size.d.ts.map +1 -0
- package/dist/body-size.js +137 -0
- package/dist/body-size.js.map +1 -0
- package/dist/body.d.ts +9 -42
- package/dist/body.d.ts.map +1 -1
- package/dist/body.js +6 -207
- package/dist/body.js.map +1 -1
- package/dist/composite.d.ts +17 -1
- package/dist/composite.d.ts.map +1 -1
- package/dist/composite.js +27 -2
- package/dist/composite.js.map +1 -1
- package/dist/document-key.d.ts +36 -0
- package/dist/document-key.d.ts.map +1 -0
- package/dist/document-key.js +40 -0
- package/dist/document-key.js.map +1 -0
- package/dist/document-url.d.ts +9 -0
- package/dist/document-url.d.ts.map +1 -1
- package/dist/document-url.js +9 -0
- package/dist/document-url.js.map +1 -1
- package/dist/ids.d.ts +4 -4
- package/dist/ids.d.ts.map +1 -1
- package/dist/ids.js +4 -4
- package/dist/ids.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/kinds.d.ts +7 -2
- package/dist/kinds.d.ts.map +1 -1
- package/dist/kinds.js +12 -3
- package/dist/kinds.js.map +1 -1
- package/dist/model.d.ts +36 -5
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +7 -1
- package/dist/model.js.map +1 -1
- package/dist/page-placement.d.ts +2 -2
- package/dist/page-placement.js +3 -2
- package/dist/page-placement.js.map +1 -1
- package/dist/pdf-key.d.ts +10 -0
- package/dist/pdf-key.d.ts.map +1 -0
- package/dist/pdf-key.js +22 -0
- package/dist/pdf-key.js.map +1 -0
- package/dist/placement.d.ts +20 -4
- package/dist/placement.d.ts.map +1 -1
- package/dist/placement.js +41 -5
- package/dist/placement.js.map +1 -1
- package/dist/region-image.d.ts +45 -0
- package/dist/region-image.d.ts.map +1 -0
- package/dist/region-image.js +76 -0
- package/dist/region-image.js.map +1 -0
- package/dist/scope.d.ts +17 -2
- package/dist/scope.d.ts.map +1 -1
- package/dist/scope.js +28 -4
- package/dist/scope.js.map +1 -1
- package/dist/store/store.d.ts +1 -1
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +11 -8
- package/dist/store/store.js.map +1 -1
- package/dist/testing/anchor-provider-contract.d.ts +3 -2
- package/dist/testing/anchor-provider-contract.d.ts.map +1 -1
- package/dist/testing/anchor-provider-contract.js +75 -22
- package/dist/testing/anchor-provider-contract.js.map +1 -1
- package/dist/testing/contract.d.ts +6 -0
- package/dist/testing/contract.d.ts.map +1 -1
- package/dist/testing/contract.js +22 -0
- package/dist/testing/contract.js.map +1 -1
- package/dist/testing/thread-contract.d.ts.map +1 -1
- package/dist/testing/thread-contract.js +2 -1
- package/dist/testing/thread-contract.js.map +1 -1
- package/dist/thread-write.d.ts +35 -0
- package/dist/thread-write.d.ts.map +1 -0
- package/dist/thread-write.js +69 -0
- package/dist/thread-write.js.map +1 -0
- package/dist/thread.d.ts +0 -21
- package/dist/thread.d.ts.map +1 -1
- package/dist/thread.js +2 -53
- package/dist/thread.js.map +1 -1
- package/dist/w3c.d.ts.map +1 -1
- package/dist/w3c.js +35 -6
- package/dist/w3c.js.map +1 -1
- package/package.json +6 -2
package/dist/adapter.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { Annotation } from "./model.js";
|
|
2
2
|
/**
|
|
3
|
-
* A query for one document's annotations. `documentId` is the
|
|
4
|
-
* `target.source
|
|
3
|
+
* A query for one document's annotations. `documentId` is the document's key, `documentKeyOf`
|
|
4
|
+
* the note: the canonical URL held in `target.source`, or for a PDF its `ext.documentKey`, which
|
|
5
|
+
* every adapter lists PDF notes by. `since` (ISO time) limits results to annotations modified
|
|
6
|
+
* after it.
|
|
5
7
|
*/
|
|
6
8
|
export interface ListQuery {
|
|
7
9
|
documentId: string;
|
|
@@ -110,6 +112,23 @@ export declare class NotFoundError extends Error {
|
|
|
110
112
|
readonly id: string;
|
|
111
113
|
constructor(id: string);
|
|
112
114
|
}
|
|
115
|
+
/** A circle the signed-in user may share a note with, by the id the adapter names it by. */
|
|
116
|
+
export interface CircleChoice {
|
|
117
|
+
/** What goes in a `circles` audience. On Acornly Cloud with an app token, the app's pseudonym. */
|
|
118
|
+
id: string;
|
|
119
|
+
name: string;
|
|
120
|
+
/** People in it, the owner included, when the adapter says. */
|
|
121
|
+
memberCount?: number;
|
|
122
|
+
/** Whether the signed-in user owns it. */
|
|
123
|
+
mine?: boolean;
|
|
124
|
+
}
|
|
125
|
+
/** The audiences besides private that the signed-in user may give a new note in a scope. */
|
|
126
|
+
export interface AudienceChoices {
|
|
127
|
+
public: boolean;
|
|
128
|
+
circles: readonly CircleChoice[];
|
|
129
|
+
}
|
|
130
|
+
/** No audience but private. */
|
|
131
|
+
export declare const PRIVATE_ONLY: AudienceChoices;
|
|
113
132
|
/**
|
|
114
133
|
* Every backend implements this interface, so the core never talks to a database directly.
|
|
115
134
|
* Adapters own `ext.rev`: `create` stores rev 1 and each successful `update` adds one.
|
|
@@ -155,5 +174,11 @@ export interface StorageAdapter {
|
|
|
155
174
|
* (`noteReportUrl`); without it, no note offers a report.
|
|
156
175
|
*/
|
|
157
176
|
reportUrl?(a: Annotation): string | null;
|
|
177
|
+
/**
|
|
178
|
+
* The audiences besides private that the signed-in user may give a new note in `scope`, for a
|
|
179
|
+
* composer to offer: Acornly Cloud asks the app's policy and the user's circles. Without it, a
|
|
180
|
+
* UI offers private only.
|
|
181
|
+
*/
|
|
182
|
+
audiences?(scope: string): Promise<AudienceChoices>;
|
|
158
183
|
}
|
|
159
184
|
//# sourceMappingURL=adapter.d.ts.map
|
package/dist/adapter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,2FAA2F;AAC3F,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,uEAAuE;IACvE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,iGAAiG;AACjG,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,4FAA4F;IAC5F,WAAW,CAAC,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,0DAA0D;IAC1D,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IAChD,qDAAqD;IACrD,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC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AAC;IAC3C,MAAM,CAAC,CAAC,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAChE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,WAAW,KAAK,IAAI,GAAG,WAAW,CAAC;IACzF;;;;OAIG;IACH,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IACpC;;;;OAIG;IACH,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC;IACzC;;;;OAIG;IACH,SAAS,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CACrD"}
|
package/dist/adapter.js
CHANGED
|
@@ -20,4 +20,9 @@ export class NotFoundError extends Error {
|
|
|
20
20
|
this.name = "NotFoundError";
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
+
/** No audience but private. */
|
|
24
|
+
export const PRIVATE_ONLY = /* @__PURE__ */ Object.freeze({
|
|
25
|
+
public: false,
|
|
26
|
+
circles: /* @__PURE__ */ Object.freeze([]),
|
|
27
|
+
});
|
|
23
28
|
//# sourceMappingURL=adapter.js.map
|
package/dist/adapter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAsGA,8FAA8F;AAC9F,MAAM,OAAO,aAAc,SAAQ,KAAK;IAE3B;IACA;IACA;IAHX,YACW,EAAU,EACV,WAAmB,EACnB,SAAiB;QAE1B,KAAK,CAAC,cAAc,EAAE,cAAc,SAAS,cAAc,WAAW,EAAE,CAAC,CAAC;QAJjE,OAAE,GAAF,EAAE,CAAQ;QACV,gBAAW,GAAX,WAAW,CAAQ;QACnB,cAAS,GAAT,SAAS,CAAQ;QAG1B,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAED,0EAA0E;AAC1E,MAAM,OAAO,aAAc,SAAQ,KAAK;IACjB;IAArB,YAAqB,EAAU;QAC7B,KAAK,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;QADjB,OAAE,GAAF,EAAE,CAAQ;QAE7B,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAmBD,+BAA+B;AAC/B,MAAM,CAAC,MAAM,YAAY,GAAoB,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC;IACzE,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;CAC3C,CAAC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Anchors on canvas apps (#311), kept apart from `describe.ts` so the SDK's lazy capture chunk,
|
|
3
|
+
* which loads that module whole, does not carry them: only the extension notes areas of pages.
|
|
4
|
+
*/
|
|
5
|
+
import { type ViewportRect } from "./fingerprint.js";
|
|
6
|
+
import { type AnchorDescription, type DescribeOptions } from "./describe.js";
|
|
7
|
+
/**
|
|
8
|
+
* Describes a rectangle of a canvas app's document (#311): a page that paints its text on
|
|
9
|
+
* `<canvas>` (Google Docs, Figma), which leaves no words or elements to anchor to. `rect` is in the
|
|
10
|
+
* viewport's CSS pixels; `canvas` is the canvas under it (see `canvasAt`).
|
|
11
|
+
*
|
|
12
|
+
* The anchor is the document area: the nearest element around the canvas that scrolls, else the
|
|
13
|
+
* canvas itself, moving up while `resolve` could not follow it (a path with a place among
|
|
14
|
+
* siblings). Its CssSelector is refined by a FragmentSelector of the area's region box (see
|
|
15
|
+
* `regionBox`): its scrolled content, so the region stays on the same part of the document as it
|
|
16
|
+
* scrolls. On a document area the region is `xywh=pixel:` CSS pixels from the content's top left,
|
|
17
|
+
* so text added below it does not move it (#440); on a canvas itself, whose box is all there is,
|
|
18
|
+
* it is `xywh=percent:`. No ElementFingerprintSelector: an app's container holds no text worth
|
|
19
|
+
* hashing, or text (a cursor, a status line) that changes as the person types, and either way says
|
|
20
|
+
* nothing about what is painted; `resolve` keeps a region on such an element whenever its stable
|
|
21
|
+
* path finds it. The pixels are what tell a reader what was meant, so the extension stores a
|
|
22
|
+
* screenshot of the region with the note. Level `region`. A provider that handles the page puts
|
|
23
|
+
* its selector first, as for any region. Null when `canvas` is not a canvas or is Acornly's own UI,
|
|
24
|
+
* the rectangle is empty once clamped to the area, or no area around it can be followed.
|
|
25
|
+
*/
|
|
26
|
+
export declare function describeCanvasRegion(canvas: Element, rect: ViewportRect, root?: Document | Element, options?: DescribeOptions): AnchorDescription | null;
|
|
27
|
+
/**
|
|
28
|
+
* The canvas a canvas app paints at a viewport point, or null: the topmost shown `<canvas>` under
|
|
29
|
+
* the point, looking through what the app draws over it (a cursor, a selection layer). Acornly's
|
|
30
|
+
* own UI is passed over.
|
|
31
|
+
*/
|
|
32
|
+
export declare function canvasAt(doc: Document, x: number, y: number): Element | null;
|
|
33
|
+
//# sourceMappingURL=canvas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas.d.ts","sourceRoot":"","sources":["../../src/anchoring/canvas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAOL,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACrB,MAAM,eAAe,CAAC;AAIvB;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,YAAY,EAClB,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,EACzB,OAAO,CAAC,EAAE,eAAe,GACxB,iBAAiB,GAAG,IAAI,CA6B1B;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAG5E"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Anchors on canvas apps (#311), kept apart from `describe.ts` so the SDK's lazy capture chunk,
|
|
3
|
+
* which loads that module whole, does not carry them: only the extension notes areas of pages.
|
|
4
|
+
*/
|
|
5
|
+
import { isShown } from "./normalize.js";
|
|
6
|
+
import { MEDIA_FRAGMENTS, PICTURE_TAGS, regionBox, } from "./fingerprint.js";
|
|
7
|
+
import { canFollow, containerOf, describeGeneric, isIgnored, regionValue, withProvider, } from "./describe.js";
|
|
8
|
+
const DOCUMENT_NODE = 9;
|
|
9
|
+
/**
|
|
10
|
+
* Describes a rectangle of a canvas app's document (#311): a page that paints its text on
|
|
11
|
+
* `<canvas>` (Google Docs, Figma), which leaves no words or elements to anchor to. `rect` is in the
|
|
12
|
+
* viewport's CSS pixels; `canvas` is the canvas under it (see `canvasAt`).
|
|
13
|
+
*
|
|
14
|
+
* The anchor is the document area: the nearest element around the canvas that scrolls, else the
|
|
15
|
+
* canvas itself, moving up while `resolve` could not follow it (a path with a place among
|
|
16
|
+
* siblings). Its CssSelector is refined by a FragmentSelector of the area's region box (see
|
|
17
|
+
* `regionBox`): its scrolled content, so the region stays on the same part of the document as it
|
|
18
|
+
* scrolls. On a document area the region is `xywh=pixel:` CSS pixels from the content's top left,
|
|
19
|
+
* so text added below it does not move it (#440); on a canvas itself, whose box is all there is,
|
|
20
|
+
* it is `xywh=percent:`. No ElementFingerprintSelector: an app's container holds no text worth
|
|
21
|
+
* hashing, or text (a cursor, a status line) that changes as the person types, and either way says
|
|
22
|
+
* nothing about what is painted; `resolve` keeps a region on such an element whenever its stable
|
|
23
|
+
* path finds it. The pixels are what tell a reader what was meant, so the extension stores a
|
|
24
|
+
* screenshot of the region with the note. Level `region`. A provider that handles the page puts
|
|
25
|
+
* its selector first, as for any region. Null when `canvas` is not a canvas or is Acornly's own UI,
|
|
26
|
+
* the rectangle is empty once clamped to the area, or no area around it can be followed.
|
|
27
|
+
*/
|
|
28
|
+
export function describeCanvasRegion(canvas, rect, root, options) {
|
|
29
|
+
if (canvas.localName !== "canvas" || isIgnored(canvas))
|
|
30
|
+
return null;
|
|
31
|
+
if (![rect.left, rect.top, rect.width, rect.height].every(Number.isFinite))
|
|
32
|
+
return null;
|
|
33
|
+
const top = root ?? canvas.ownerDocument;
|
|
34
|
+
const scope = top.nodeType === DOCUMENT_NODE
|
|
35
|
+
? (top.body ?? top.documentElement)
|
|
36
|
+
: top;
|
|
37
|
+
if (!scope)
|
|
38
|
+
return null;
|
|
39
|
+
const start = containerOf(canvas, scope);
|
|
40
|
+
if (!start || start === scope)
|
|
41
|
+
return null;
|
|
42
|
+
for (let area = documentArea(start, scope); area && area !== scope;) {
|
|
43
|
+
const d = describeGeneric(area, root, options);
|
|
44
|
+
const css = d?.selector.find((s) => s.type === "CssSelector");
|
|
45
|
+
if (d && css) {
|
|
46
|
+
d.selector = [css];
|
|
47
|
+
d.level = "region";
|
|
48
|
+
if (canFollow(d)) {
|
|
49
|
+
const region = regionIn(area, rect);
|
|
50
|
+
const value = region && regionValue(region.stored);
|
|
51
|
+
if (!region || !value)
|
|
52
|
+
return null;
|
|
53
|
+
css.refinedBy = { type: "FragmentSelector", conformsTo: MEDIA_FRAGMENTS, value };
|
|
54
|
+
// Providers are given regions in percent, as for any element.
|
|
55
|
+
return withProvider(d, { element: area, region: region.percent }, root, options);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
area = area.parentElement;
|
|
59
|
+
}
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The canvas a canvas app paints at a viewport point, or null: the topmost shown `<canvas>` under
|
|
64
|
+
* the point, looking through what the app draws over it (a cursor, a selection layer). Acornly's
|
|
65
|
+
* own UI is passed over.
|
|
66
|
+
*/
|
|
67
|
+
export function canvasAt(doc, x, y) {
|
|
68
|
+
const hits = typeof doc.elementsFromPoint === "function" ? doc.elementsFromPoint(x, y) : [];
|
|
69
|
+
return hits.find((el) => el.localName === "canvas" && isShown(el) && !isIgnored(el)) ?? null;
|
|
70
|
+
}
|
|
71
|
+
/** The element around `start` (itself excluded, `scope` too) that scrolls, else `start`. */
|
|
72
|
+
function documentArea(start, scope) {
|
|
73
|
+
const win = start.ownerDocument.defaultView;
|
|
74
|
+
for (let el = start.parentElement; el && el !== scope; el = el.parentElement) {
|
|
75
|
+
const style = win?.getComputedStyle(el);
|
|
76
|
+
const scrolls = (overflow) => overflow === "auto" || overflow === "scroll";
|
|
77
|
+
if ((scrolls(style?.overflowY) && el.scrollHeight > el.clientHeight) ||
|
|
78
|
+
(scrolls(style?.overflowX) && el.scrollWidth > el.clientWidth)) {
|
|
79
|
+
return el;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return start;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* `rect` as a region of `el`'s region box, or null when the box is empty: in percent, and as it is
|
|
86
|
+
* stored, which is in pixels clamped to the box unless `el` is a picture, such as a canvas (see
|
|
87
|
+
* `describeCanvasRegion`).
|
|
88
|
+
*/
|
|
89
|
+
function regionIn(el, rect) {
|
|
90
|
+
const box = regionBox(el);
|
|
91
|
+
if (!(box.width > 0 && box.height > 0))
|
|
92
|
+
return null;
|
|
93
|
+
const percent = {
|
|
94
|
+
x: ((rect.left - box.left) / box.width) * 100,
|
|
95
|
+
y: ((rect.top - box.top) / box.height) * 100,
|
|
96
|
+
width: (rect.width / box.width) * 100,
|
|
97
|
+
height: (rect.height / box.height) * 100,
|
|
98
|
+
};
|
|
99
|
+
if (PICTURE_TAGS.has(el.localName))
|
|
100
|
+
return { percent, stored: percent };
|
|
101
|
+
const x = Math.max(0, rect.left - box.left);
|
|
102
|
+
const y = Math.max(0, rect.top - box.top);
|
|
103
|
+
const stored = {
|
|
104
|
+
x,
|
|
105
|
+
y,
|
|
106
|
+
width: Math.min(box.width, rect.left - box.left + rect.width) - x,
|
|
107
|
+
height: Math.min(box.height, rect.top - box.top + rect.height) - y,
|
|
108
|
+
unit: "px",
|
|
109
|
+
};
|
|
110
|
+
return { percent, stored };
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=canvas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas.js","sourceRoot":"","sources":["../../src/anchoring/canvas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EACL,eAAe,EACf,YAAY,EACZ,SAAS,GAGV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,SAAS,EACT,WAAW,EACX,eAAe,EACf,SAAS,EACT,WAAW,EACX,YAAY,GAGb,MAAM,eAAe,CAAC;AAEvB,MAAM,aAAa,GAAG,CAAC,CAAC;AAExB;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAAe,EACf,IAAkB,EAClB,IAAyB,EACzB,OAAyB;IAEzB,IAAI,MAAM,CAAC,SAAS,KAAK,QAAQ,IAAI,SAAS,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IACpE,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IACxF,MAAM,GAAG,GAAG,IAAI,IAAI,MAAM,CAAC,aAAa,CAAC;IACzC,MAAM,KAAK,GACT,GAAG,CAAC,QAAQ,KAAK,aAAa;QAC5B,CAAC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EAAE,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;QACjE,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;QAClE,IAAI,EAAE,IAAI;KACX,CAAC;IACF,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `acornly-context` anchor provider: finds a note on an app's context item (the app context
|
|
3
|
+
* protocol, `docs/design/app-context-protocol.md`, section 8) by the item's id, stored as
|
|
4
|
+
* `{ id }` in a `ProviderSelector`. An item with an element is found by its mark
|
|
5
|
+
* (`data-acornly-context`, or `data-ctx-anchor` holding the id); an item that is not an element (a
|
|
6
|
+
* place on a map, a region of a canvas) is found through the app's `rect`, and the built-in UI
|
|
7
|
+
* draws its pin there. Experimental, with the chat (0.x).
|
|
8
|
+
*/
|
|
9
|
+
import type { Annotation, ProviderSelector } from "../model.js";
|
|
10
|
+
import type { AnchorProvider } from "./providers.js";
|
|
11
|
+
/** The provider's registered name, stored in every selector it writes. */
|
|
12
|
+
export declare const CONTEXT_PROVIDER = "acornly-context";
|
|
13
|
+
/** An item's rectangle in viewport pixels, as the chat's `rect` gives it. */
|
|
14
|
+
export interface ContextRect {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ContextAnchorOptions {
|
|
21
|
+
/**
|
|
22
|
+
* Where an item that is not an element is on screen now, in viewport pixels; `null` when it is
|
|
23
|
+
* off screen. The same callback as the chat's `rect`.
|
|
24
|
+
*/
|
|
25
|
+
rect?: (id: string) => ContextRect | null;
|
|
26
|
+
/**
|
|
27
|
+
* The element a rect item lives in (the map, the canvas, the iframe), or `null` for an id that is
|
|
28
|
+
* not one of the app's rect items, whose note then falls back to its quote or the page. Without
|
|
29
|
+
* it, an item is placed in the notes' root only while `rect` answers for it. Ids come from
|
|
30
|
+
* stored notes, which may be other people's: look them up, never build a selector or HTML from
|
|
31
|
+
* them.
|
|
32
|
+
*/
|
|
33
|
+
host?: (id: string) => Element | null;
|
|
34
|
+
}
|
|
35
|
+
export interface ContextAnchorProvider extends AnchorProvider {
|
|
36
|
+
readonly rect?: ContextAnchorOptions["rect"];
|
|
37
|
+
/** Tell the pins that rect items moved (a pan or zoom that changed no element). */
|
|
38
|
+
moved(): void;
|
|
39
|
+
/** Called on each `moved()`; returns a function that stops it. */
|
|
40
|
+
onMove(fn: () => void): () => void;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Whether item `id` fits in a ProviderSelector, whose value providers read only up to
|
|
44
|
+
* `PROVIDER_VALUE_MAX` (2048) characters of JSON. The limit is written out, not imported, so a page
|
|
45
|
+
* that only reads notes does not load the provider registry.
|
|
46
|
+
*/
|
|
47
|
+
export declare function contextIdFits(id: string): boolean;
|
|
48
|
+
/** The marks that name item `id`: either attribute, as the chat's picker reads them. */
|
|
49
|
+
export declare function contextMarkSelector(id: string): string;
|
|
50
|
+
/** The context item a note is anchored to, from its `acornly-context` selector, or null. */
|
|
51
|
+
export declare function contextIdOf(annotation: Pick<Annotation, "target">): string | null;
|
|
52
|
+
/** The selectors stored for a note on item `id`: the item by id, then its quote when it has one. */
|
|
53
|
+
export declare function contextSelectors(id: string, quote?: string): [ProviderSelector] | [ProviderSelector, {
|
|
54
|
+
type: "TextQuoteSelector";
|
|
55
|
+
exact: string;
|
|
56
|
+
}];
|
|
57
|
+
/**
|
|
58
|
+
* The provider, for `anchorProviders`. It never describes a target itself: only a note added on an
|
|
59
|
+
* item (`{ context: id }` in the SDK, or the chat's Keep and Comment) carries its selector, so
|
|
60
|
+
* notes on text keep anchoring to their text.
|
|
61
|
+
*/
|
|
62
|
+
export declare function contextAnchorProvider(options?: ContextAnchorOptions): ContextAnchorProvider;
|
|
63
|
+
//# sourceMappingURL=context-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-provider.d.ts","sourceRoot":"","sources":["../../src/anchoring/context-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAkC,MAAM,gBAAgB,CAAC;AAErF,0EAA0E;AAC1E,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AAElD,6EAA6E;AAC7E,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,WAAW,GAAG,IAAI,CAAC;IAC1C;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,GAAG,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,qBAAsB,SAAQ,cAAc;IAC3D,QAAQ,CAAC,IAAI,CAAC,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAC7C,mFAAmF;IACnF,KAAK,IAAI,IAAI,CAAC;IACd,kEAAkE;IAClE,MAAM,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;CACpC;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED,wFAAwF;AACxF,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAMtD;AAED,4FAA4F;AAC5F,wBAAgB,WAAW,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,GAAG,MAAM,GAAG,IAAI,CAOjF;AAED,oGAAoG;AACpG,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,MAAM,GACb,CAAC,gBAAgB,CAAC,GAAG,CAAC,gBAAgB,EAAE;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAQvF;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,oBAAyB,GAAG,qBAAqB,CAiC/F"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/** The provider's registered name, stored in every selector it writes. */
|
|
2
|
+
export const CONTEXT_PROVIDER = "acornly-context";
|
|
3
|
+
/**
|
|
4
|
+
* Whether item `id` fits in a ProviderSelector, whose value providers read only up to
|
|
5
|
+
* `PROVIDER_VALUE_MAX` (2048) characters of JSON. The limit is written out, not imported, so a page
|
|
6
|
+
* that only reads notes does not load the provider registry.
|
|
7
|
+
*/
|
|
8
|
+
export function contextIdFits(id) {
|
|
9
|
+
return JSON.stringify({ id }).length <= 2048;
|
|
10
|
+
}
|
|
11
|
+
/** The marks that name item `id`: either attribute, as the chat's picker reads them. */
|
|
12
|
+
export function contextMarkSelector(id) {
|
|
13
|
+
// A double-quoted CSS string (jsdom has no CSS.escape).
|
|
14
|
+
const value = id
|
|
15
|
+
.replace(/[\\"]/g, "\\$&")
|
|
16
|
+
.replace(/[\n\r\f\0]/g, (c) => (c === "\0" ? "\ufffd" : `\\${c.charCodeAt(0).toString(16)} `));
|
|
17
|
+
return `[data-acornly-context="${value}"],[data-ctx-anchor="${value}"]`;
|
|
18
|
+
}
|
|
19
|
+
/** The context item a note is anchored to, from its `acornly-context` selector, or null. */
|
|
20
|
+
export function contextIdOf(annotation) {
|
|
21
|
+
const s = annotation.target.selector?.find((s) => s.type === "ProviderSelector" && s.provider === CONTEXT_PROVIDER);
|
|
22
|
+
const id = s?.value?.id;
|
|
23
|
+
return typeof id === "string" && id !== "" ? id : null;
|
|
24
|
+
}
|
|
25
|
+
/** The selectors stored for a note on item `id`: the item by id, then its quote when it has one. */
|
|
26
|
+
export function contextSelectors(id, quote) {
|
|
27
|
+
const by = {
|
|
28
|
+
type: "ProviderSelector",
|
|
29
|
+
provider: CONTEXT_PROVIDER,
|
|
30
|
+
version: 1,
|
|
31
|
+
value: { id },
|
|
32
|
+
};
|
|
33
|
+
return quote ? [by, { type: "TextQuoteSelector", exact: quote }] : [by];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The provider, for `anchorProviders`. It never describes a target itself: only a note added on an
|
|
37
|
+
* item (`{ context: id }` in the SDK, or the chat's Keep and Comment) carries its selector, so
|
|
38
|
+
* notes on text keep anchoring to their text.
|
|
39
|
+
*/
|
|
40
|
+
export function contextAnchorProvider(options = {}) {
|
|
41
|
+
const listeners = new Set();
|
|
42
|
+
return {
|
|
43
|
+
name: CONTEXT_PROVIDER,
|
|
44
|
+
version: 1,
|
|
45
|
+
...(options.rect && { rect: options.rect }),
|
|
46
|
+
matches: () => true,
|
|
47
|
+
describe: () => null,
|
|
48
|
+
resolve(value, _version, context) {
|
|
49
|
+
const id = value?.id;
|
|
50
|
+
if (typeof id !== "string" || id === "")
|
|
51
|
+
return null;
|
|
52
|
+
const root = context.root;
|
|
53
|
+
const marked = root.querySelector(contextMarkSelector(id));
|
|
54
|
+
if (marked)
|
|
55
|
+
return { element: marked };
|
|
56
|
+
if (!options.rect)
|
|
57
|
+
return null;
|
|
58
|
+
// Without `host`, only an item `rect` places now: an unmarked verse is left to its quote.
|
|
59
|
+
const host = options.host
|
|
60
|
+
? options.host(id)
|
|
61
|
+
: options.rect(id) === null
|
|
62
|
+
? null
|
|
63
|
+
: "body" in root
|
|
64
|
+
? root.body
|
|
65
|
+
: root;
|
|
66
|
+
return host ? { element: host } : null;
|
|
67
|
+
},
|
|
68
|
+
moved() {
|
|
69
|
+
for (const fn of [...listeners])
|
|
70
|
+
fn();
|
|
71
|
+
},
|
|
72
|
+
onMove(fn) {
|
|
73
|
+
listeners.add(fn);
|
|
74
|
+
return () => listeners.delete(fn);
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=context-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-provider.js","sourceRoot":"","sources":["../../src/anchoring/context-provider.ts"],"names":[],"mappings":"AAWA,0EAA0E;AAC1E,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAkClD;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,EAAU;IACtC,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC;AAC/C,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,mBAAmB,CAAC,EAAU;IAC5C,wDAAwD;IACxD,MAAM,KAAK,GAAG,EAAE;SACb,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC;SACzB,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjG,OAAO,0BAA0B,KAAK,wBAAwB,KAAK,IAAI,CAAC;AAC1E,CAAC;AAED,4FAA4F;AAC5F,MAAM,UAAU,WAAW,CAAC,UAAsC;IAChE,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CACxC,CAAC,CAAC,EAAyB,EAAE,CAC3B,CAAC,CAAC,IAAI,KAAK,kBAAkB,IAAK,CAAsB,CAAC,QAAQ,KAAK,gBAAgB,CACzF,CAAC;IACF,MAAM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YAC3D,IAAI,MAAM;gBAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;YACvC,IAAI,CAAC,OAAO,CAAC,IAAI;gBAAE,OAAO,IAAI,CAAC;YAC/B,0FAA0F;YAC1F,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI;gBACvB,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;gBAClB,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,IAAI;oBACzB,CAAC,CAAC,IAAI;oBACN,CAAC,CAAC,MAAM,IAAI,IAAI;wBACd,CAAC,CAAC,IAAI,CAAC,IAAI;wBACX,CAAC,CAAC,IAAI,CAAC;YACb,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QACzC,CAAC;QACD,KAAK;YACH,KAAK,MAAM,EAAE,IAAI,CAAC,GAAG,SAAS,CAAC;gBAAE,EAAE,EAAE,CAAC;QACxC,CAAC;QACD,MAAM,CAAC,EAAE;YACP,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAClB,OAAO,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACpC,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
import { type ForeignSelector, type ProviderSelector, type Selector } from "../model.js";
|
|
34
34
|
import { type TextSource } from "./normalize.js";
|
|
35
35
|
import { type AnchorLevel, type Region } from "./fingerprint.js";
|
|
36
|
-
import { type ProviderStage } from "./provider-stage.js";
|
|
36
|
+
import { type ProviderStage, type ProviderTarget } from "./provider-stage.js";
|
|
37
37
|
import { type MediaFragment, type TimeRange } from "./media.js";
|
|
38
38
|
import type { AnchorMatch } from "./resolver.js";
|
|
39
39
|
export { MEDIA_FRAGMENTS, elementFingerprint, elementText, elementsWithFingerprint, pageFingerprint, parseRegion, textFingerprint, type AnchorLevel, type Region, } from "./fingerprint.js";
|
|
@@ -82,12 +82,26 @@ export interface DescribeOptions {
|
|
|
82
82
|
* (`anchorProviders`); null asks none. */
|
|
83
83
|
providers?: ProviderStage | null | undefined;
|
|
84
84
|
}
|
|
85
|
+
/** `d` with the provider selector for `target` (see `providers.ts`) put first, when a provider
|
|
86
|
+
* describes it.
|
|
87
|
+
*
|
|
88
|
+
* @internal Shared with `canvas.ts`.
|
|
89
|
+
*/
|
|
90
|
+
export declare function withProvider(d: AnchorDescription, target: ProviderTarget, root: Document | Element | undefined, options: DescribeOptions | undefined): AnchorDescription;
|
|
91
|
+
/** `describe` without the providers: the generic selectors alone.
|
|
92
|
+
*
|
|
93
|
+
* @internal Shared with `canvas.ts`.
|
|
94
|
+
*/
|
|
95
|
+
export declare function describeGeneric(target: Range | Element, root?: Document | Element, options?: {
|
|
96
|
+
text?: TextSource;
|
|
97
|
+
}): AnchorDescription | null;
|
|
85
98
|
/**
|
|
86
99
|
* Describes a rectangle of an image (`img` or `svg`) as its whole-element selectors with the
|
|
87
100
|
* CssSelector refined by a FragmentSelector, `xywh=percent:x,y,w,h` (Media Fragments, rounded to
|
|
88
101
|
* two decimals and clamped to the image). Media Fragments 1.0 writes whole numbers only; decimals
|
|
89
102
|
* follow what other annotation tools write, since a whole percent of a large image is coarse. Null
|
|
90
|
-
* when the element is not an image, the region is
|
|
103
|
+
* when the element is not an image, the region is in pixels (`unit: "px"`, only for a document
|
|
104
|
+
* area), the region is empty once clamped, or the element cannot be
|
|
91
105
|
* described with a CssSelector. As with `describe`, check `canFollow` (or use `describeBest`).
|
|
92
106
|
*/
|
|
93
107
|
export declare function describeRegion(element: Element, region: Region, root?: Document | Element, options?: DescribeOptions): AnchorDescription | null;
|
|
@@ -172,6 +186,26 @@ export declare function refreshMatch(match: AnchorMatch, root: Document | Elemen
|
|
|
172
186
|
/** The note's stored selectors: their provider selectors are kept in front. */
|
|
173
187
|
stored?: readonly (Selector | ForeignSelector)[] | undefined;
|
|
174
188
|
}): AnchorDescription | null;
|
|
189
|
+
/**
|
|
190
|
+
* The Media Fragments value of a region, rounded to two decimals, or null when it is empty or not
|
|
191
|
+
* made of numbers. A percent region is clamped to the element (`xywh=percent:`); a pixel one
|
|
192
|
+
* (`xywh=pixel:`, see `Region`) only to its top left, since its size is not known here.
|
|
193
|
+
*
|
|
194
|
+
* @internal Shared with `canvas.ts`.
|
|
195
|
+
*/
|
|
196
|
+
export declare function regionValue(r: Region): string | null;
|
|
197
|
+
/** An element in the scope's tree for `el`: itself or its shadow host inside the scope, else the
|
|
198
|
+
* scope when `el` holds the scope (a span clamped to it).
|
|
199
|
+
*
|
|
200
|
+
* @internal Shared with `canvas.ts`.
|
|
201
|
+
*/
|
|
202
|
+
export declare function containerOf(el: Element, scope: Element): Element | null;
|
|
203
|
+
/** Whether an element is Acornly's own UI or marked `data-ctx-ignore`, which normalization
|
|
204
|
+
* skips.
|
|
205
|
+
*
|
|
206
|
+
* @internal Shared with `canvas.ts`.
|
|
207
|
+
*/
|
|
208
|
+
export declare function isIgnored(el: Element): boolean;
|
|
175
209
|
/**
|
|
176
210
|
* Whether a class or id looks machine-generated: some `-`/`_` separated part mixes letters and
|
|
177
211
|
* digits other than a word followed by a number (`h2`, `item42`) or a number with a short unit
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe.d.ts","sourceRoot":"","sources":["../../src/anchoring/describe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAIL,KAAK,eAAe,EAEpB,KAAK,gBAAgB,EAErB,KAAK,QAAQ,EAGd,MAAM,aAAa,CAAC;AACrB,OAAO,EAML,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"describe.d.ts","sourceRoot":"","sources":["../../src/anchoring/describe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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