@annotorious/annotorious 3.3.3 → 3.3.4
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/annotation/tools/drawingToolsRegistry.d.ts +2 -2
- package/dist/annotorious.es.js +5 -3
- package/dist/annotorious.es.js.map +1 -1
- package/dist/annotorious.js +1 -1
- package/dist/annotorious.js.map +1 -1
- package/package.json +6 -6
- package/src/annotation/tools/drawingToolsRegistry.ts +2 -2
- package/src/model/w3c/W3CImageFormatAdapter.ts +6 -1
|
@@ -8,9 +8,9 @@ export type DrawingToolOpts = {
|
|
|
8
8
|
export declare const listDrawingTools: () => string[];
|
|
9
9
|
export declare const getTool: (name: string) => {
|
|
10
10
|
tool: typeof SvelteComponent;
|
|
11
|
-
opts
|
|
11
|
+
opts: DrawingToolOpts;
|
|
12
12
|
} | undefined;
|
|
13
13
|
export declare const registerTool: (name: string, tool: typeof SvelteComponent, opts?: DrawingToolOpts) => Map<string, {
|
|
14
14
|
tool: typeof SvelteComponent;
|
|
15
|
-
opts
|
|
15
|
+
opts: DrawingToolOpts;
|
|
16
16
|
}>;
|
package/dist/annotorious.es.js
CHANGED
|
@@ -2020,7 +2020,7 @@ const us = (e, t = { strict: !0, invertY: !1 }) => ({ parse: (o) => Io(o, t), se
|
|
|
2020
2020
|
modified: r,
|
|
2021
2021
|
body: s,
|
|
2022
2022
|
...a
|
|
2023
|
-
} = e, l = Ro(s || [], n), u = Array.isArray(e.target) ? e.target[0] : e.target, c = typeof u == "string" ? u : Array.isArray(u.selector) ? u.selector[0] : u.selector, f = typeof c == "string" || (c == null ? void 0 : c.type) === "FragmentSelector" ? _i(c, t.invertY) : (c == null ? void 0 : c.type) === "SvgSelector" ? zi(c) : void 0;
|
|
2023
|
+
} = e, l = Ro(s || [], n), u = Array.isArray(e.target) ? e.target[0] : e.target, c = typeof u == "string" ? u : Array.isArray(u.selector) ? u.selector[0] : u.selector, f = typeof c == "string" || (c == null ? void 0 : c.type) === "FragmentSelector" ? _i(c, t.invertY) : (c == null ? void 0 : c.type) === "SvgSelector" ? zi(c) : void 0, d = Array.isArray(a.target) ? a.target[0] : a.targret;
|
|
2024
2024
|
return f || !t.strict ? {
|
|
2025
2025
|
parsed: {
|
|
2026
2026
|
...a,
|
|
@@ -2030,7 +2030,8 @@ const us = (e, t = { strict: !0, invertY: !1 }) => ({ parse: (o) => Io(o, t), se
|
|
|
2030
2030
|
created: o ? new Date(o) : void 0,
|
|
2031
2031
|
creator: Fn(i),
|
|
2032
2032
|
updated: r ? new Date(r) : void 0,
|
|
2033
|
-
|
|
2033
|
+
// Note the target can be a string and we don't want to spread the characters...
|
|
2034
|
+
...typeof d == "string" ? {} : d,
|
|
2034
2035
|
annotation: n,
|
|
2035
2036
|
selector: f || c
|
|
2036
2037
|
}
|
|
@@ -2068,6 +2069,7 @@ const us = (e, t = { strict: !0, invertY: !1 }) => ({ parse: (o) => Io(o, t), se
|
|
|
2068
2069
|
target: {
|
|
2069
2070
|
...l,
|
|
2070
2071
|
source: t,
|
|
2072
|
+
type: "SpecificResource",
|
|
2071
2073
|
selector: u
|
|
2072
2074
|
}
|
|
2073
2075
|
};
|
|
@@ -4035,7 +4037,7 @@ class yr extends he {
|
|
|
4035
4037
|
const Pt = /* @__PURE__ */ new Map([
|
|
4036
4038
|
["rectangle", { tool: cr }],
|
|
4037
4039
|
["polygon", { tool: yr }]
|
|
4038
|
-
]), zn = () => [...Pt.keys()], jn = (e) => Pt.get(e), _r = (e, t, n) => Pt.set(e, { tool: t, opts: n });
|
|
4040
|
+
]), zn = () => [...Pt.keys()], jn = (e) => Pt.get(e), _r = (e, t, n = {}) => Pt.set(e, { tool: t, opts: n });
|
|
4039
4041
|
function mr(e) {
|
|
4040
4042
|
let t, n, i, o, r;
|
|
4041
4043
|
return {
|