mirador-annotation-editor-video 1.2.8 → 1.2.10

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.
@@ -51117,7 +51117,6 @@ function DM({
51117
51117
  options: u.map((f) => ({
51118
51118
  label: f.title,
51119
51119
  title: f.content,
51120
- // Add title attribute for tooltip
51121
51120
  value: f
51122
51121
  })),
51123
51122
  placeholder: a("useTemplate"),
@@ -51207,9 +51206,16 @@ function MM({
51207
51206
  t.getMediaTrueHeight(),
51208
51207
  1 / t.getScale()
51209
51208
  ), a(p);
51210
- }, D = (O) => {
51211
- const M = A.find((z) => z.value === O.title);
51212
- if (M && !p.maeData.tags.find((z) => z.value === M.value)) {
51209
+ }, D = d.map((O) => ({
51210
+ label: O,
51211
+ value: O
51212
+ })), A = (O) => {
51213
+ const M = D.find(
51214
+ (z) => z.value === O.title
51215
+ );
51216
+ if (M && !p.maeData.tags.find(
51217
+ (z) => z.value === M.value
51218
+ )) {
51213
51219
  v({
51214
51220
  ...p,
51215
51221
  maeData: {
@@ -51217,24 +51223,22 @@ function MM({
51217
51223
  tags: [...p.maeData.tags, M],
51218
51224
  textBody: {
51219
51225
  ...p.maeData.textBody,
51220
- value: O.value
51226
+ value: O.content
51227
+ // unified here
51221
51228
  }
51222
51229
  }
51223
51230
  });
51224
51231
  return;
51225
51232
  }
51226
51233
  C(O.content);
51227
- }, A = d.map((O) => ({
51228
- label: O,
51229
- value: O
51230
- }));
51234
+ };
51231
51235
  return /* @__PURE__ */ Oe(Be, { container: !0, direction: "column", spacing: 2, children: [
51232
51236
  /* @__PURE__ */ G(Be, { children: /* @__PURE__ */ G(
51233
51237
  DM,
51234
51238
  {
51235
51239
  comment: p.maeData.textBody.value,
51236
51240
  setComment: C,
51237
- onChangeTemplate: D,
51241
+ onChangeTemplate: A,
51238
51242
  t: r
51239
51243
  }
51240
51244
  ) }),
@@ -51244,7 +51248,7 @@ function MM({
51244
51248
  t: r,
51245
51249
  tags: p.maeData.tags,
51246
51250
  setTags: E,
51247
- tagsSuggestions: A
51251
+ tagsSuggestions: D
51248
51252
  }
51249
51253
  ) }),
51250
51254
  /* @__PURE__ */ G(Be, { children: /* @__PURE__ */ G(
@@ -51605,16 +51609,15 @@ function Lee(n) {
51605
51609
  "@context": "https://iiif.io/api/presentation/2/context.json",
51606
51610
  "@type": "oa:Annotation",
51607
51611
  maeData: n.maeData || {},
51608
- motivation: "oa:commenting",
51609
- on: {
51610
- "@type": "oa:SpecificResource",
51611
- full: (
51612
- // `target` has a `source` with `id` object pointing to the proper canvas
51613
- ((t = n.target.source) == null ? void 0 : t.id) || n.target.id || n.target.source
51614
- )
51615
- }
51612
+ motivation: "oa:commenting"
51616
51613
  };
51617
- if ((a = n.id) != null && a.startsWith("http") && (e["@id"] = n.id), Array.isArray(n.body) ? e.resource = n.body.map((s) => tO(s)) : e.resource = tO(n.body), n.target.selector) {
51614
+ if ((t = n.id) != null && t.startsWith("http") && (e["@id"] = n.id), Array.isArray(n.body) ? e.resource = n.body.map((s) => tO(s)) : e.resource = tO(n.body), typeof n.target == "object" && !Array.isArray(n.target) && n.target !== null ? e.on = {
51615
+ "@type": "oa:SpecificResource",
51616
+ full: (
51617
+ // `target` has a `source` with `id` object pointing to the proper canvas
51618
+ ((a = n.target.source) == null ? void 0 : a.id) || n.target.id || n.target.source
51619
+ )
51620
+ } : e.on = n.target, n.target.selector) {
51618
51621
  if (Array.isArray(n.target.selector)) {
51619
51622
  const s = n.target.selector.map((u) => nO(u));
51620
51623
  e.on.selector = {
@@ -52457,24 +52460,24 @@ class Ete {
52457
52460
  return this.iiifPresentationVersion === 2 ? jee(t.resources, this.annotationPageId) : t;
52458
52461
  }
52459
52462
  }
52460
- const yne = [
52463
+ const yne = {
52464
+ AiiinotateAdapter: Ete,
52465
+ LocalStorageAdapter: CO
52466
+ }, bne = [
52461
52467
  cB,
52462
52468
  hB,
52463
52469
  DB,
52464
52470
  Xee,
52465
52471
  Yee,
52466
- yte,
52467
- {
52468
- AiiinotateAdapter: Ete,
52469
- LocalStorageAdapter: CO
52470
- }
52472
+ yte
52471
52473
  ];
52472
52474
  export {
52475
+ yne as annotationAdapters,
52473
52476
  Xee as annotationCreationCompanionWindowPlugin,
52474
52477
  DB as canvasAnnotationsPlugin,
52475
- yne as default,
52478
+ bne as default,
52476
52479
  hB as externalStorageAnnotationPlugin,
52477
52480
  cB as miradorAnnotationPlugin,
52478
52481
  Yee as windowSideBarButtonsPlugin
52479
52482
  };
52480
- //# sourceMappingURL=index.js.map
52483
+ //# sourceMappingURL=mirador-annotation-editor-video.es.js.map