triiiceratops 0.9.1 → 0.9.3
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/index-bundle.d.ts +2 -0
- package/dist/index-bundle.js +2 -0
- package/dist/plugins/image-manipulation/ImageManipulationPlugin.svelte.js +37 -72
- package/dist/plugins/image-manipulation/filters.js +6 -8
- package/dist/plugins/image-manipulation/types.js +1 -1
- package/dist/state/i18n.svelte.d.ts +3 -2
- package/dist/state/i18n.svelte.js +5 -5
- package/dist/state/manifests.svelte.js +77 -149
- package/dist/state/manifests.test.js +128 -223
- package/dist/state/viewer.svelte.d.ts +2 -2
- package/dist/state/viewer.svelte.js +374 -513
- package/dist/theme/colorUtils.js +35 -35
- package/dist/theme/colorUtils.test.js +30 -30
- package/dist/theme/themeManager.js +10 -12
- package/dist/theme/types.js +1 -1
- package/dist/triiiceratops.css +1 -0
- package/dist/types/plugin.js +18 -31
- package/dist/utils/annotationAdapter.js +80 -93
- package/dist/utils/annotationAdapter.test.js +24 -24
- package/package.json +3 -3
|
@@ -1,103 +1,70 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var __assign = (this && this.__assign) || function () {
|
|
17
|
-
__assign = Object.assign || function(t) {
|
|
18
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
-
s = arguments[i];
|
|
20
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
-
t[p] = s[p];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
return __assign.apply(this, arguments);
|
|
26
|
-
};
|
|
27
1
|
import Sliders from 'phosphor-svelte/lib/Sliders';
|
|
28
2
|
import { BasePlugin } from '../../types/plugin';
|
|
29
3
|
import { applyFilters, clearFilters, hasActiveFilters } from './filters';
|
|
30
4
|
import { DEFAULT_FILTERS } from './types';
|
|
31
5
|
import ImageManipulationPanel from './ImageManipulationPanel.svelte';
|
|
32
6
|
import { m } from '../../state/i18n.svelte';
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
_this.osd = null;
|
|
44
|
-
return _this;
|
|
45
|
-
}
|
|
46
|
-
ImageManipulationPlugin.prototype.onRegister = function (context) {
|
|
47
|
-
var _this = this;
|
|
48
|
-
_super.prototype.onRegister.call(this, context);
|
|
7
|
+
export class ImageManipulationPlugin extends BasePlugin {
|
|
8
|
+
id = 'image-manipulation';
|
|
9
|
+
name = 'Image Manipulation';
|
|
10
|
+
version = '1.0.0';
|
|
11
|
+
// Reactive state using Svelte 5 runes
|
|
12
|
+
_panelOpen = $state(false);
|
|
13
|
+
_filters = $state({ ...DEFAULT_FILTERS });
|
|
14
|
+
osd = null;
|
|
15
|
+
onRegister(context) {
|
|
16
|
+
super.onRegister(context);
|
|
49
17
|
// Register menu button
|
|
50
18
|
context.registerMenuButton({
|
|
51
|
-
id:
|
|
19
|
+
id: `${this.id}:toggle`,
|
|
52
20
|
icon: Sliders,
|
|
53
21
|
get tooltip() {
|
|
54
22
|
return m.image_adjustments();
|
|
55
23
|
},
|
|
56
|
-
onClick:
|
|
57
|
-
isActive:
|
|
24
|
+
onClick: () => this.togglePanel(),
|
|
25
|
+
isActive: () => this._panelOpen,
|
|
58
26
|
activeClass: 'btn-secondary',
|
|
59
27
|
order: 50,
|
|
60
28
|
});
|
|
61
29
|
// Register panel
|
|
62
30
|
context.registerPanel({
|
|
63
|
-
id:
|
|
31
|
+
id: `${this.id}:panel`,
|
|
64
32
|
component: ImageManipulationPanel,
|
|
65
33
|
position: 'left',
|
|
66
|
-
isVisible:
|
|
34
|
+
isVisible: () => this._panelOpen,
|
|
67
35
|
props: {
|
|
68
36
|
filters: this._filters,
|
|
69
|
-
onFilterChange:
|
|
70
|
-
onReset:
|
|
71
|
-
onClose:
|
|
37
|
+
onFilterChange: (f) => this.setFilters(f),
|
|
38
|
+
onReset: () => this.resetFilters(),
|
|
39
|
+
onClose: () => this.togglePanel(),
|
|
72
40
|
},
|
|
73
41
|
});
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
var _this = this;
|
|
42
|
+
}
|
|
43
|
+
onViewerReady(viewer) {
|
|
77
44
|
this.osd = viewer;
|
|
78
45
|
// Apply existing filters if any
|
|
79
46
|
if (hasActiveFilters(this._filters)) {
|
|
80
47
|
applyFilters(viewer, this._filters);
|
|
81
48
|
}
|
|
82
49
|
// Re-apply filters when new images unlock (canvas change)
|
|
83
|
-
this.osd.addHandler('open',
|
|
84
|
-
if (
|
|
85
|
-
applyFilters(
|
|
50
|
+
this.osd.addHandler('open', () => {
|
|
51
|
+
if (this.osd && hasActiveFilters(this._filters)) {
|
|
52
|
+
applyFilters(this.osd, this._filters);
|
|
86
53
|
}
|
|
87
54
|
});
|
|
88
|
-
}
|
|
89
|
-
|
|
55
|
+
}
|
|
56
|
+
onDestroy() {
|
|
90
57
|
if (this.osd) {
|
|
91
58
|
clearFilters(this.osd);
|
|
92
59
|
}
|
|
93
60
|
this.osd = null;
|
|
94
|
-
|
|
95
|
-
}
|
|
61
|
+
super.onDestroy();
|
|
62
|
+
}
|
|
96
63
|
// Public API
|
|
97
|
-
|
|
64
|
+
togglePanel() {
|
|
98
65
|
this._panelOpen = !this._panelOpen;
|
|
99
|
-
}
|
|
100
|
-
|
|
66
|
+
}
|
|
67
|
+
setFilters(filters) {
|
|
101
68
|
// Mutate properties to maintain reference for bound props
|
|
102
69
|
this._filters.brightness = filters.brightness;
|
|
103
70
|
this._filters.contrast = filters.contrast;
|
|
@@ -107,16 +74,14 @@ var ImageManipulationPlugin = /** @class */ (function (_super) {
|
|
|
107
74
|
if (this.osd) {
|
|
108
75
|
applyFilters(this.osd, filters);
|
|
109
76
|
}
|
|
110
|
-
}
|
|
111
|
-
|
|
77
|
+
}
|
|
78
|
+
resetFilters() {
|
|
112
79
|
Object.assign(this._filters, DEFAULT_FILTERS);
|
|
113
80
|
if (this.osd) {
|
|
114
81
|
clearFilters(this.osd);
|
|
115
82
|
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
return
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
}(BasePlugin));
|
|
122
|
-
export { ImageManipulationPlugin };
|
|
83
|
+
}
|
|
84
|
+
getFilters() {
|
|
85
|
+
return { ...this._filters };
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -3,20 +3,19 @@
|
|
|
3
3
|
* CSS filters are GPU-accelerated and work without modifying OSD internals.
|
|
4
4
|
*/
|
|
5
5
|
export function applyFilters(viewer, filters) {
|
|
6
|
-
var _a;
|
|
7
6
|
// OSD uses either canvas or webgl drawer
|
|
8
|
-
|
|
7
|
+
const canvas = viewer.drawer?.canvas;
|
|
9
8
|
if (!canvas)
|
|
10
9
|
return;
|
|
11
|
-
|
|
10
|
+
const parts = [];
|
|
12
11
|
if (filters.brightness !== 100) {
|
|
13
|
-
parts.push(
|
|
12
|
+
parts.push(`brightness(${filters.brightness / 100})`);
|
|
14
13
|
}
|
|
15
14
|
if (filters.contrast !== 100) {
|
|
16
|
-
parts.push(
|
|
15
|
+
parts.push(`contrast(${filters.contrast / 100})`);
|
|
17
16
|
}
|
|
18
17
|
if (filters.saturation !== 100) {
|
|
19
|
-
parts.push(
|
|
18
|
+
parts.push(`saturate(${filters.saturation / 100})`);
|
|
20
19
|
}
|
|
21
20
|
if (filters.invert) {
|
|
22
21
|
parts.push('invert(1)');
|
|
@@ -30,8 +29,7 @@ export function applyFilters(viewer, filters) {
|
|
|
30
29
|
* Remove all filters from the canvas.
|
|
31
30
|
*/
|
|
32
31
|
export function clearFilters(viewer) {
|
|
33
|
-
|
|
34
|
-
var canvas = (_a = viewer.drawer) === null || _a === void 0 ? void 0 : _a.canvas;
|
|
32
|
+
const canvas = viewer.drawer?.canvas;
|
|
35
33
|
if (canvas) {
|
|
36
34
|
canvas.style.filter = 'none';
|
|
37
35
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as messages from "../paraglide/messages.js";
|
|
2
2
|
import { languageTag, onSetLanguageTag } from "../paraglide/runtime.js";
|
|
3
|
-
|
|
4
|
-
onSetLanguageTag(
|
|
3
|
+
let tag = $state(languageTag());
|
|
4
|
+
onSetLanguageTag((newTag) => {
|
|
5
5
|
tag = newTag;
|
|
6
6
|
});
|
|
7
|
-
export
|
|
7
|
+
export const language = {
|
|
8
8
|
get current() {
|
|
9
9
|
return tag;
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
|
-
export
|
|
13
|
-
get
|
|
12
|
+
export const m = new Proxy(messages, {
|
|
13
|
+
get(target, prop, receiver) {
|
|
14
14
|
// Register dependency by accessing the signal
|
|
15
15
|
tag;
|
|
16
16
|
return Reflect.get(target, prop, receiver);
|
|
@@ -1,173 +1,103 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
1
|
+
import * as manifesto from "manifesto.js";
|
|
2
|
+
export class ManifestsState {
|
|
3
|
+
manifests = $state({});
|
|
4
|
+
constructor() { }
|
|
5
|
+
async fetchManifest(manifestId) {
|
|
6
|
+
if (this.manifests[manifestId]) {
|
|
7
|
+
return; // Already fetched or fetching
|
|
8
|
+
}
|
|
9
|
+
this.manifests[manifestId] = { isFetching: true };
|
|
10
|
+
try {
|
|
11
|
+
const response = await fetch(manifestId);
|
|
12
|
+
if (!response.ok) {
|
|
13
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
31
14
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
15
|
+
const json = await response.json();
|
|
16
|
+
const manifestoObject = manifesto.parseManifest(json);
|
|
17
|
+
this.manifests[manifestId] = {
|
|
18
|
+
json,
|
|
19
|
+
manifesto: manifestoObject,
|
|
20
|
+
isFetching: false,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
this.manifests[manifestId] = { error: error.message, isFetching: false };
|
|
25
|
+
}
|
|
35
26
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
function ManifestsState() {
|
|
40
|
-
this.manifests = $state({});
|
|
27
|
+
getManifest(manifestId) {
|
|
28
|
+
const entry = this.manifests[manifestId];
|
|
29
|
+
return entry?.manifesto;
|
|
41
30
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return [4 /*yield*/, response.json()];
|
|
62
|
-
case 3:
|
|
63
|
-
json = _a.sent();
|
|
64
|
-
manifestoObject = manifesto.parseManifest(json);
|
|
65
|
-
this.manifests[manifestId] = {
|
|
66
|
-
json: json,
|
|
67
|
-
manifesto: manifestoObject,
|
|
68
|
-
isFetching: false,
|
|
69
|
-
};
|
|
70
|
-
return [3 /*break*/, 5];
|
|
71
|
-
case 4:
|
|
72
|
-
error_1 = _a.sent();
|
|
73
|
-
this.manifests[manifestId] = { error: error_1.message, isFetching: false };
|
|
74
|
-
return [3 /*break*/, 5];
|
|
75
|
-
case 5: return [2 /*return*/];
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
|
-
ManifestsState.prototype.getManifest = function (manifestId) {
|
|
81
|
-
var entry = this.manifests[manifestId];
|
|
82
|
-
return entry === null || entry === void 0 ? void 0 : entry.manifesto;
|
|
83
|
-
};
|
|
84
|
-
ManifestsState.prototype.fetchAnnotationList = function (url) {
|
|
85
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
86
|
-
var response, data, e_1;
|
|
87
|
-
return __generator(this, function (_a) {
|
|
88
|
-
switch (_a.label) {
|
|
89
|
-
case 0:
|
|
90
|
-
if (this.manifests[url])
|
|
91
|
-
return [2 /*return*/]; // Already fetched or fetching
|
|
92
|
-
_a.label = 1;
|
|
93
|
-
case 1:
|
|
94
|
-
_a.trys.push([1, 6, , 7]);
|
|
95
|
-
return [4 /*yield*/, fetch(url)];
|
|
96
|
-
case 2:
|
|
97
|
-
response = _a.sent();
|
|
98
|
-
if (!response.ok) return [3 /*break*/, 4];
|
|
99
|
-
return [4 /*yield*/, response.json()];
|
|
100
|
-
case 3:
|
|
101
|
-
data = _a.sent();
|
|
102
|
-
this.manifests[url] = { json: data };
|
|
103
|
-
return [3 /*break*/, 5];
|
|
104
|
-
case 4:
|
|
105
|
-
console.error("Failed to fetch annotation list: ".concat(url));
|
|
106
|
-
_a.label = 5;
|
|
107
|
-
case 5: return [3 /*break*/, 7];
|
|
108
|
-
case 6:
|
|
109
|
-
e_1 = _a.sent();
|
|
110
|
-
console.error("Error fetching annotation list: ".concat(url), e_1);
|
|
111
|
-
return [3 /*break*/, 7];
|
|
112
|
-
case 7: return [2 /*return*/];
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
};
|
|
117
|
-
ManifestsState.prototype.getCanvases = function (manifestId) {
|
|
118
|
-
var m = this.getManifest(manifestId);
|
|
31
|
+
async fetchAnnotationList(url) {
|
|
32
|
+
if (this.manifests[url])
|
|
33
|
+
return; // Already fetched or fetching
|
|
34
|
+
try {
|
|
35
|
+
const response = await fetch(url);
|
|
36
|
+
if (response.ok) {
|
|
37
|
+
const data = await response.json();
|
|
38
|
+
this.manifests[url] = { json: data };
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
console.error(`Failed to fetch annotation list: ${url}`);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
catch (e) {
|
|
45
|
+
console.error(`Error fetching annotation list: ${url}`, e);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
getCanvases(manifestId) {
|
|
49
|
+
const m = this.getManifest(manifestId);
|
|
119
50
|
if (!m) {
|
|
120
51
|
return [];
|
|
121
52
|
}
|
|
122
|
-
|
|
53
|
+
const sequences = m.getSequences();
|
|
123
54
|
if (!sequences || !sequences.length)
|
|
124
55
|
return [];
|
|
125
|
-
|
|
56
|
+
const canvases = sequences[0].getCanvases();
|
|
126
57
|
return canvases;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
58
|
+
}
|
|
59
|
+
getAnnotations(manifestId, canvasId) {
|
|
60
|
+
const m = this.getManifest(manifestId);
|
|
130
61
|
if (!m)
|
|
131
62
|
return [];
|
|
132
|
-
|
|
63
|
+
const canvas = m.getSequences()[0].getCanvasById(canvasId);
|
|
133
64
|
if (!canvas)
|
|
134
65
|
return [];
|
|
135
|
-
|
|
66
|
+
const annos = this.manualGetAnnotations(manifestId, canvasId);
|
|
136
67
|
return annos;
|
|
137
|
-
}
|
|
68
|
+
}
|
|
138
69
|
// We can refactor this to use Manifesto's resource handling later if needed.
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
var manifestoObject = this.getManifest(manifestId);
|
|
70
|
+
manualGetAnnotations(manifestId, canvasId) {
|
|
71
|
+
const manifestoObject = this.getManifest(manifestId);
|
|
142
72
|
if (!manifestoObject)
|
|
143
73
|
return [];
|
|
144
|
-
|
|
74
|
+
const canvas = manifestoObject.getSequences()[0].getCanvasById(canvasId);
|
|
145
75
|
if (!canvas)
|
|
146
76
|
return [];
|
|
147
77
|
// Manifesto wraps the JSON. We can access the underlying JSON via canvas.__jsonld
|
|
148
78
|
// Or better, use canvas.getContent() if it works, but for external lists manual fetch is robust.
|
|
149
|
-
|
|
150
|
-
|
|
79
|
+
const canvasJson = canvas.__jsonld;
|
|
80
|
+
let annotations = [];
|
|
151
81
|
// Helper to parse list using Manifesto
|
|
152
|
-
|
|
82
|
+
const parseList = (listJson) => {
|
|
153
83
|
// manifesto.create is not available in 4.3.0 or not exported nicely?
|
|
154
84
|
// Just return raw resources.
|
|
155
85
|
return listJson.resources || listJson.items || [];
|
|
156
86
|
};
|
|
157
87
|
// IIIF v2 otherContent
|
|
158
88
|
if (canvasJson.otherContent) {
|
|
159
|
-
canvasJson.otherContent.forEach(
|
|
160
|
-
|
|
89
|
+
canvasJson.otherContent.forEach((content) => {
|
|
90
|
+
const id = content["@id"] || content.id;
|
|
161
91
|
if (id && !content.resources) {
|
|
162
|
-
|
|
92
|
+
const externalList = this.manifests[id];
|
|
163
93
|
if (externalList) {
|
|
164
94
|
if (externalList.json) {
|
|
165
|
-
|
|
166
|
-
annotations.push
|
|
95
|
+
const parsed = parseList(externalList.json);
|
|
96
|
+
annotations.push(...parsed);
|
|
167
97
|
}
|
|
168
98
|
}
|
|
169
99
|
else {
|
|
170
|
-
|
|
100
|
+
this.fetchAnnotationList(id);
|
|
171
101
|
}
|
|
172
102
|
}
|
|
173
103
|
else if (content.resources) {
|
|
@@ -177,34 +107,32 @@ var ManifestsState = /** @class */ (function () {
|
|
|
177
107
|
// Let's rely on the robust parsing I added to Overlay for raw/mixed.
|
|
178
108
|
// But the user wants library usage.
|
|
179
109
|
// const r = manifesto.create(content); // might work?
|
|
180
|
-
annotations.push
|
|
110
|
+
annotations.push(...content.resources);
|
|
181
111
|
}
|
|
182
112
|
});
|
|
183
113
|
}
|
|
184
114
|
// IIIF v3 annotations
|
|
185
115
|
if (canvasJson.annotations) {
|
|
186
|
-
canvasJson.annotations.forEach(
|
|
187
|
-
|
|
116
|
+
canvasJson.annotations.forEach((content) => {
|
|
117
|
+
const id = content.id || content["@id"];
|
|
188
118
|
if (id && !content.items) {
|
|
189
|
-
|
|
119
|
+
const externalList = this.manifests[id];
|
|
190
120
|
if (externalList) {
|
|
191
121
|
if (externalList.json) {
|
|
192
|
-
|
|
193
|
-
annotations.push
|
|
122
|
+
const parsed = parseList(externalList.json);
|
|
123
|
+
annotations.push(...parsed);
|
|
194
124
|
}
|
|
195
125
|
}
|
|
196
126
|
else {
|
|
197
|
-
|
|
127
|
+
this.fetchAnnotationList(id);
|
|
198
128
|
}
|
|
199
129
|
}
|
|
200
130
|
else if (content.items) {
|
|
201
|
-
annotations.push
|
|
131
|
+
annotations.push(...content.items);
|
|
202
132
|
}
|
|
203
133
|
});
|
|
204
134
|
}
|
|
205
135
|
return annotations;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
export { ManifestsState };
|
|
210
|
-
export var manifestsState = new ManifestsState();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
export const manifestsState = new ManifestsState();
|