@paroicms/internal-link-plugin 0.6.0 → 0.6.2

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.
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const data_formatters_lib_1 = require("@paroi/data-formatters-lib");
4
3
  const node_path_1 = require("node:path");
4
+ const data_formatters_lib_1 = require("@paroi/data-formatters-lib");
5
5
  const projectDir = (0, node_path_1.dirname)(__dirname);
6
6
  const packageDir = (0, node_path_1.dirname)(projectDir);
7
7
  const version = (0, data_formatters_lib_1.strVal)(require((0, node_path_1.join)(packageDir, "package.json")).version);
@@ -2,7 +2,7 @@ const dt = (t, e) => t === e, O = {
2
2
  equals: dt
3
3
  };
4
4
  let nt = st;
5
- const E = 1, R = 2, lt = {
5
+ const E = 1, R = 2, it = {
6
6
  owned: null,
7
7
  cleanups: null,
8
8
  context: null,
@@ -11,17 +11,17 @@ const E = 1, R = 2, lt = {
11
11
  var k = null;
12
12
  let H = null, ht = null, w = null, b = null, I = null, U = 0;
13
13
  function pt(t, e) {
14
- const n = w, l = k, i = t.length === 0, r = l, o = i ? lt : {
14
+ const n = w, i = k, l = t.length === 0, r = i, o = l ? it : {
15
15
  owned: null,
16
16
  cleanups: null,
17
17
  context: r ? r.context : null,
18
18
  owner: r
19
- }, s = i ? t : () => t(() => C(() => T(o)));
19
+ }, s = l ? t : () => t(() => C(() => T(o)));
20
20
  k = o, w = null;
21
21
  try {
22
22
  return N(s, !0);
23
23
  } finally {
24
- w = n, k = l;
24
+ w = n, k = i;
25
25
  }
26
26
  }
27
27
  function S(t, e) {
@@ -31,22 +31,22 @@ function S(t, e) {
31
31
  observers: null,
32
32
  observerSlots: null,
33
33
  comparator: e.equals || void 0
34
- }, l = (i) => (typeof i == "function" && (i = i(n.value)), rt(n, i));
35
- return [it.bind(n), l];
34
+ }, i = (l) => (typeof l == "function" && (l = l(n.value)), rt(n, l));
35
+ return [lt.bind(n), i];
36
36
  }
37
37
  function P(t, e, n) {
38
- const l = q(t, e, !1, E);
39
- x(l);
38
+ const i = q(t, e, !1, E);
39
+ x(i);
40
40
  }
41
41
  function G(t, e, n) {
42
42
  nt = mt;
43
- const l = q(t, e, !1, E);
44
- l.user = !0, I ? I.push(l) : x(l);
43
+ const i = q(t, e, !1, E);
44
+ i.user = !0, I ? I.push(i) : x(i);
45
45
  }
46
46
  function _(t, e, n) {
47
47
  n = n ? Object.assign({}, O, n) : O;
48
- const l = q(t, e, !0, 0);
49
- return l.observers = null, l.observerSlots = null, l.comparator = n.equals || void 0, x(l), it.bind(l);
48
+ const i = q(t, e, !0, 0);
49
+ return i.observers = null, i.observerSlots = null, i.comparator = n.equals || void 0, x(i), lt.bind(i);
50
50
  }
51
51
  function C(t) {
52
52
  if (w === null) return t();
@@ -58,7 +58,7 @@ function C(t) {
58
58
  w = e;
59
59
  }
60
60
  }
61
- function it() {
61
+ function lt() {
62
62
  if (this.sources && this.state)
63
63
  if (this.state === E) x(this);
64
64
  else {
@@ -72,10 +72,10 @@ function it() {
72
72
  return this.value;
73
73
  }
74
74
  function rt(t, e, n) {
75
- let l = t.value;
76
- return (!t.comparator || !t.comparator(l, e)) && (t.value = e, t.observers && t.observers.length && N(() => {
77
- for (let i = 0; i < t.observers.length; i += 1) {
78
- const r = t.observers[i], o = H && H.running;
75
+ let i = t.value;
76
+ return (!t.comparator || !t.comparator(i, e)) && (t.value = e, t.observers && t.observers.length && N(() => {
77
+ for (let l = 0; l < t.observers.length; l += 1) {
78
+ const r = t.observers[l], o = H && H.running;
79
79
  o && H.disposed.has(r), (o ? !r.tState : !r.state) && (r.pure ? b.push(r) : I.push(r), r.observers && ot(r)), o || (r.state = E);
80
80
  }
81
81
  if (b.length > 1e6)
@@ -93,22 +93,22 @@ function x(t) {
93
93
  );
94
94
  }
95
95
  function gt(t, e, n) {
96
- let l;
97
- const i = k, r = w;
96
+ let i;
97
+ const l = k, r = w;
98
98
  w = k = t;
99
99
  try {
100
- l = t.fn(e);
100
+ i = t.fn(e);
101
101
  } catch (o) {
102
102
  return t.pure && (t.state = E, t.owned && t.owned.forEach(T), t.owned = null), t.updatedAt = n + 1, ct(o);
103
103
  } finally {
104
- w = r, k = i;
104
+ w = r, k = l;
105
105
  }
106
- (!t.updatedAt || t.updatedAt <= n) && (t.updatedAt != null && "observers" in t ? rt(t, l) : t.value = l, t.updatedAt = n);
106
+ (!t.updatedAt || t.updatedAt <= n) && (t.updatedAt != null && "observers" in t ? rt(t, i) : t.value = i, t.updatedAt = n);
107
107
  }
108
- function q(t, e, n, l = E, i) {
108
+ function q(t, e, n, i = E, l) {
109
109
  const r = {
110
110
  fn: t,
111
- state: l,
111
+ state: i,
112
112
  updatedAt: null,
113
113
  owned: null,
114
114
  sources: null,
@@ -119,7 +119,7 @@ function q(t, e, n, l = E, i) {
119
119
  context: k ? k.context : null,
120
120
  pure: n
121
121
  };
122
- return k === null || k !== lt && (k.owned ? k.owned.push(r) : k.owned = [r]), r;
122
+ return k === null || k !== it && (k.owned ? k.owned.push(r) : k.owned = [r]), r;
123
123
  }
124
124
  function V(t) {
125
125
  if (t.state === 0) return;
@@ -132,8 +132,8 @@ function V(t) {
132
132
  if (t = e[n], t.state === E)
133
133
  x(t);
134
134
  else if (t.state === R) {
135
- const l = b;
136
- b = null, N(() => j(t, e[0]), !1), b = l;
135
+ const i = b;
136
+ b = null, N(() => j(t, e[0]), !1), b = i;
137
137
  }
138
138
  }
139
139
  function N(t, e) {
@@ -141,10 +141,10 @@ function N(t, e) {
141
141
  let n = !1;
142
142
  e || (b = []), I ? n = !0 : I = [], U++;
143
143
  try {
144
- const l = t();
145
- return $t(n), l;
146
- } catch (l) {
147
- n || (I = null), b = null, ct(l);
144
+ const i = t();
145
+ return $t(n), i;
146
+ } catch (i) {
147
+ n || (I = null), b = null, ct(i);
148
148
  }
149
149
  }
150
150
  function $t(t) {
@@ -158,18 +158,18 @@ function st(t) {
158
158
  function mt(t) {
159
159
  let e, n = 0;
160
160
  for (e = 0; e < t.length; e++) {
161
- const l = t[e];
162
- l.user ? t[n++] = l : V(l);
161
+ const i = t[e];
162
+ i.user ? t[n++] = i : V(i);
163
163
  }
164
164
  for (e = 0; e < n; e++) V(t[e]);
165
165
  }
166
166
  function j(t, e) {
167
167
  t.state = 0;
168
168
  for (let n = 0; n < t.sources.length; n += 1) {
169
- const l = t.sources[n];
170
- if (l.sources) {
171
- const i = l.state;
172
- i === E ? l !== e && (!l.updatedAt || l.updatedAt < U) && V(l) : i === R && j(l, e);
169
+ const i = t.sources[n];
170
+ if (i.sources) {
171
+ const l = i.state;
172
+ l === E ? i !== e && (!i.updatedAt || i.updatedAt < U) && V(i) : l === R && j(i, e);
173
173
  }
174
174
  }
175
175
  }
@@ -183,10 +183,10 @@ function T(t) {
183
183
  let e;
184
184
  if (t.sources)
185
185
  for (; t.sources.length; ) {
186
- const n = t.sources.pop(), l = t.sourceSlots.pop(), i = n.observers;
187
- if (i && i.length) {
188
- const r = i.pop(), o = n.observerSlots.pop();
189
- l < i.length && (r.sourceSlots[o] = l, i[l] = r, n.observerSlots[l] = o);
186
+ const n = t.sources.pop(), i = t.sourceSlots.pop(), l = n.observers;
187
+ if (l && l.length) {
188
+ const r = l.pop(), o = n.observerSlots.pop();
189
+ i < l.length && (r.sourceSlots[o] = i, l[i] = r, n.observerSlots[i] = o);
190
190
  }
191
191
  }
192
192
  if (t.tOwned) {
@@ -217,21 +217,21 @@ function A(t, e) {
217
217
  const wt = (t) => `Stale read from <${t}>.`;
218
218
  function Z(t) {
219
219
  const e = t.keyed, n = _(() => t.when, void 0, {
220
- equals: (l, i) => e ? l === i : !l == !i
220
+ equals: (i, l) => e ? i === l : !i == !l
221
221
  });
222
222
  return _(
223
223
  () => {
224
- const l = n();
225
- if (l) {
226
- const i = t.children;
227
- return typeof i == "function" && i.length > 0 ? C(
228
- () => i(
229
- e ? l : () => {
224
+ const i = n();
225
+ if (i) {
226
+ const l = t.children;
227
+ return typeof l == "function" && l.length > 0 ? C(
228
+ () => l(
229
+ e ? i : () => {
230
230
  if (!C(n)) throw wt("Show");
231
231
  return t.when;
232
232
  }
233
233
  )
234
- ) : i;
234
+ ) : l;
235
235
  }
236
236
  return t.fallback;
237
237
  },
@@ -240,23 +240,23 @@ function Z(t) {
240
240
  );
241
241
  }
242
242
  function bt(t, e, n) {
243
- let l = n.length, i = e.length, r = l, o = 0, s = 0, u = e[i - 1].nextSibling, $ = null;
244
- for (; o < i || s < r; ) {
243
+ let i = n.length, l = e.length, r = i, o = 0, s = 0, u = e[l - 1].nextSibling, $ = null;
244
+ for (; o < l || s < r; ) {
245
245
  if (e[o] === n[s]) {
246
246
  o++, s++;
247
247
  continue;
248
248
  }
249
- for (; e[i - 1] === n[r - 1]; )
250
- i--, r--;
251
- if (i === o) {
252
- const a = r < l ? s ? n[s - 1].nextSibling : n[r - s] : u;
249
+ for (; e[l - 1] === n[r - 1]; )
250
+ l--, r--;
251
+ if (l === o) {
252
+ const a = r < i ? s ? n[s - 1].nextSibling : n[r - s] : u;
253
253
  for (; s < r; ) t.insertBefore(n[s++], a);
254
254
  } else if (r === s)
255
- for (; o < i; )
255
+ for (; o < l; )
256
256
  (!$ || !$.has(e[o])) && e[o].remove(), o++;
257
- else if (e[o] === n[r - 1] && n[s] === e[i - 1]) {
258
- const a = e[--i].nextSibling;
259
- t.insertBefore(n[s++], e[o++].nextSibling), t.insertBefore(n[--r], a), e[i] = n[r];
257
+ else if (e[o] === n[r - 1] && n[s] === e[l - 1]) {
258
+ const a = e[--l].nextSibling;
259
+ t.insertBefore(n[s++], e[o++].nextSibling), t.insertBefore(n[--r], a), e[l] = n[r];
260
260
  } else {
261
261
  if (!$) {
262
262
  $ = /* @__PURE__ */ new Map();
@@ -267,7 +267,7 @@ function bt(t, e, n) {
267
267
  if (a != null)
268
268
  if (s < a && a < r) {
269
269
  let h = o, m = 1, c;
270
- for (; ++h < i && h < r && !((c = $.get(e[h])) == null || c !== a + m); )
270
+ for (; ++h < l && h < r && !((c = $.get(e[h])) == null || c !== a + m); )
271
271
  m++;
272
272
  if (m > a - s) {
273
273
  const f = e[o];
@@ -280,30 +280,30 @@ function bt(t, e, n) {
280
280
  }
281
281
  const W = "_$DX_DELEGATE";
282
282
  function y(t, e, n) {
283
- let l;
284
- const i = () => {
283
+ let i;
284
+ const l = () => {
285
285
  const o = document.createElement("template");
286
286
  return o.innerHTML = t, o.content.firstChild;
287
- }, r = () => (l || (l = i())).cloneNode(!0);
287
+ }, r = () => (i || (i = l())).cloneNode(!0);
288
288
  return r.cloneNode = r, r;
289
289
  }
290
290
  function K(t, e = window.document) {
291
291
  const n = e[W] || (e[W] = /* @__PURE__ */ new Set());
292
- for (let l = 0, i = t.length; l < i; l++) {
293
- const r = t[l];
292
+ for (let i = 0, l = t.length; i < l; i++) {
293
+ const r = t[i];
294
294
  n.has(r) || (n.add(r), e.addEventListener(r, _t));
295
295
  }
296
296
  }
297
297
  function kt(t, e) {
298
298
  e == null ? t.removeAttribute("class") : t.className = e;
299
299
  }
300
- function p(t, e, n, l) {
301
- if (n !== void 0 && !l && (l = []), typeof e != "function") return M(t, e, l, n);
302
- P((i) => M(t, e(), i, n), l);
300
+ function p(t, e, n, i) {
301
+ if (n !== void 0 && !i && (i = []), typeof e != "function") return M(t, e, i, n);
302
+ P((l) => M(t, e(), l, n), i);
303
303
  }
304
304
  function _t(t) {
305
305
  let e = t.target;
306
- const n = `$$${t.type}`, l = t.target, i = t.currentTarget, r = (u) => Object.defineProperty(t, "target", {
306
+ const n = `$$${t.type}`, i = t.target, l = t.currentTarget, r = (u) => Object.defineProperty(t, "target", {
307
307
  configurable: !0,
308
308
  value: u
309
309
  }), o = () => {
@@ -329,44 +329,44 @@ function _t(t) {
329
329
  e = e._$host, s();
330
330
  break;
331
331
  }
332
- if (e.parentNode === i)
332
+ if (e.parentNode === l)
333
333
  break;
334
334
  }
335
335
  } else s();
336
- r(l);
336
+ r(i);
337
337
  }
338
- function M(t, e, n, l, i) {
338
+ function M(t, e, n, i, l) {
339
339
  for (; typeof n == "function"; ) n = n();
340
340
  if (e === n) return n;
341
- const r = typeof e, o = l !== void 0;
341
+ const r = typeof e, o = i !== void 0;
342
342
  if (t = o && n[0] && n[0].parentNode || t, r === "string" || r === "number") {
343
343
  if (r === "number" && (e = e.toString(), e === n))
344
344
  return n;
345
345
  if (o) {
346
346
  let s = n[0];
347
- s && s.nodeType === 3 ? s.data !== e && (s.data = e) : s = document.createTextNode(e), n = D(t, n, l, s);
347
+ s && s.nodeType === 3 ? s.data !== e && (s.data = e) : s = document.createTextNode(e), n = D(t, n, i, s);
348
348
  } else
349
349
  n !== "" && typeof n == "string" ? n = t.firstChild.data = e : n = t.textContent = e;
350
350
  } else if (e == null || r === "boolean")
351
- n = D(t, n, l);
351
+ n = D(t, n, i);
352
352
  else {
353
353
  if (r === "function")
354
354
  return P(() => {
355
355
  let s = e();
356
356
  for (; typeof s == "function"; ) s = s();
357
- n = M(t, s, n, l);
357
+ n = M(t, s, n, i);
358
358
  }), () => n;
359
359
  if (Array.isArray(e)) {
360
360
  const s = [], u = n && Array.isArray(n);
361
- if (F(s, e, n, i))
362
- return P(() => n = M(t, s, n, l, !0)), () => n;
361
+ if (F(s, e, n, l))
362
+ return P(() => n = M(t, s, n, i, !0)), () => n;
363
363
  if (s.length === 0) {
364
- if (n = D(t, n, l), o) return n;
365
- } else u ? n.length === 0 ? X(t, s, l) : bt(t, n, s) : (n && D(t), X(t, s));
364
+ if (n = D(t, n, i), o) return n;
365
+ } else u ? n.length === 0 ? X(t, s, i) : bt(t, n, s) : (n && D(t), X(t, s));
366
366
  n = s;
367
367
  } else if (e.nodeType) {
368
368
  if (Array.isArray(n)) {
369
- if (o) return n = D(t, n, l, e);
369
+ if (o) return n = D(t, n, i, e);
370
370
  D(t, n, null, e);
371
371
  } else n == null || n === "" || !t.firstChild ? t.appendChild(e) : t.replaceChild(e, t.firstChild);
372
372
  n = e;
@@ -374,74 +374,74 @@ function M(t, e, n, l, i) {
374
374
  }
375
375
  return n;
376
376
  }
377
- function F(t, e, n, l) {
378
- let i = !1;
377
+ function F(t, e, n, i) {
378
+ let l = !1;
379
379
  for (let r = 0, o = e.length; r < o; r++) {
380
380
  let s = e[r], u = n && n[t.length], $;
381
381
  if (!(s == null || s === !0 || s === !1)) if (($ = typeof s) == "object" && s.nodeType)
382
382
  t.push(s);
383
383
  else if (Array.isArray(s))
384
- i = F(t, s, u) || i;
384
+ l = F(t, s, u) || l;
385
385
  else if ($ === "function")
386
- if (l) {
386
+ if (i) {
387
387
  for (; typeof s == "function"; ) s = s();
388
- i = F(
388
+ l = F(
389
389
  t,
390
390
  Array.isArray(s) ? s : [s],
391
391
  Array.isArray(u) ? u : [u]
392
- ) || i;
392
+ ) || l;
393
393
  } else
394
- t.push(s), i = !0;
394
+ t.push(s), l = !0;
395
395
  else {
396
396
  const a = String(s);
397
397
  u && u.nodeType === 3 && u.data === a ? t.push(u) : t.push(document.createTextNode(a));
398
398
  }
399
399
  }
400
- return i;
400
+ return l;
401
401
  }
402
402
  function X(t, e, n = null) {
403
- for (let l = 0, i = e.length; l < i; l++) t.insertBefore(e[l], n);
403
+ for (let i = 0, l = e.length; i < l; i++) t.insertBefore(e[i], n);
404
404
  }
405
- function D(t, e, n, l) {
405
+ function D(t, e, n, i) {
406
406
  if (n === void 0) return t.textContent = "";
407
- const i = l || document.createTextNode("");
407
+ const l = i || document.createTextNode("");
408
408
  if (e.length) {
409
409
  let r = !1;
410
410
  for (let o = e.length - 1; o >= 0; o--) {
411
411
  const s = e[o];
412
- if (i !== s) {
412
+ if (l !== s) {
413
413
  const u = s.parentNode === t;
414
- !r && !o ? u ? t.replaceChild(i, s) : t.insertBefore(i, n) : u && s.remove();
414
+ !r && !o ? u ? t.replaceChild(l, s) : t.insertBefore(l, n) : u && s.remove();
415
415
  } else r = !0;
416
416
  }
417
- } else t.insertBefore(i, n);
418
- return [i];
417
+ } else t.insertBefore(l, n);
418
+ return [l];
419
419
  }
420
420
  var ut = (t) => t != null && (t = Object.getPrototypeOf(t), t === Array.prototype || t === Object.prototype);
421
421
  function at(t, e, n) {
422
- for (const [l, i] of Object.entries(e)) {
423
- const r = `${n}.${l}`;
424
- t[r] = i, ut(i) && at(t, i, r);
422
+ for (const [i, l] of Object.entries(e)) {
423
+ const r = `${n}.${i}`;
424
+ t[r] = l, ut(l) && at(t, l, r);
425
425
  }
426
426
  }
427
427
  function vt(t) {
428
428
  const e = { ...t };
429
- for (const [n, l] of Object.entries(t))
430
- ut(l) && at(e, l, n);
429
+ for (const [n, i] of Object.entries(t))
430
+ ut(i) && at(e, i, n);
431
431
  return e;
432
432
  }
433
433
  var Lt = (t) => t;
434
434
  function It(t, e = Lt) {
435
- return (n, ...l) => {
435
+ return (n, ...i) => {
436
436
  n[0] === "." && (n = n.slice(1));
437
- const i = t()?.[n];
438
- switch (typeof i) {
437
+ const l = t()?.[n];
438
+ switch (typeof l) {
439
439
  case "function":
440
- return i(...l);
440
+ return l(...i);
441
441
  case "string":
442
- return e(i, l[0]);
442
+ return e(l, i[0]);
443
443
  default:
444
- return i;
444
+ return l;
445
445
  }
446
446
  };
447
447
  }
@@ -452,8 +452,8 @@ const St = { insertLink: "Insert link", change: "Change", editor: { noResult: "N
452
452
  }, J = { en: Et, fr: Pt };
453
453
  function Q(t) {
454
454
  const e = _(() => {
455
- const l = t(), i = l in J ? l : "en";
456
- return vt(J[i]);
455
+ const i = t(), l = i in J ? i : "en";
456
+ return vt(J[l]);
457
457
  });
458
458
  return { t: It(e) };
459
459
  }
@@ -478,20 +478,20 @@ function ft(t) {
478
478
  const {
479
479
  value: e,
480
480
  setValue: n,
481
- service: l
482
- } = t, [i, r] = S(""), [o, s] = S([]), {
481
+ service: i
482
+ } = t, [l, r] = S(""), [o, s] = S([]), {
483
483
  t: u
484
484
  } = Q(t.language);
485
485
  G(async () => {
486
486
  const a = e();
487
487
  if (!a) return;
488
- const h = await l.getDocument(a);
488
+ const h = await i.getDocument(a);
489
489
  r(h.title ?? ""), await $();
490
490
  });
491
491
  const $ = async (a) => {
492
- if (a?.preventDefault(), i().length < 3) return;
493
- const h = await l.searchDocuments({
494
- searchString: i()
492
+ if (a?.preventDefault(), l().length < 3) return;
493
+ const h = await i.searchDocuments({
494
+ searchString: l()
495
495
  });
496
496
  s(h);
497
497
  };
@@ -526,7 +526,7 @@ function ft(t) {
526
526
  var c = Tt(), f = c.firstChild;
527
527
  return p(f, () => u("InternalLink.editor.noResult")), c;
528
528
  }
529
- }), null), P(() => m.value = i()), a;
529
+ }), null), P(() => m.value = l()), a;
530
530
  })();
531
531
  }
532
532
  K(["input", "click"]);
@@ -535,11 +535,11 @@ function Ht({
535
535
  service: t,
536
536
  setValue: e,
537
537
  value: n,
538
- language: l
538
+ language: i
539
539
  }) {
540
540
  const {
541
- t: i
542
- } = Q(l), [r, o] = S(), [s, u] = S(!!n());
541
+ t: l
542
+ } = Q(i), [r, o] = S(), [s, u] = S(!!n());
543
543
  G(async () => {
544
544
  const c = n();
545
545
  if (!c) return;
@@ -562,7 +562,7 @@ function Ht({
562
562
  u(!0);
563
563
  }, g;
564
564
  })();
565
- })(), f), p(f, () => i("InternalLink.dialog.title")), c;
565
+ })(), f), p(f, () => l("InternalLink.dialog.title")), c;
566
566
  })(), a = (() => {
567
567
  var c = Ot();
568
568
  return p(c, (() => {
@@ -575,7 +575,7 @@ function Ht({
575
575
  }, d;
576
576
  })() : A(ft, {
577
577
  service: t,
578
- language: l,
578
+ language: i,
579
579
  value: n,
580
580
  setValue: (d) => {
581
581
  e(d), u(!0), m.hide();
@@ -594,19 +594,19 @@ function Ht({
594
594
  var v = jt();
595
595
  return v.$$click = () => {
596
596
  e(void 0), m.hide();
597
- }, p(v, () => i("InternalLink.dialog.removeLink")), v;
597
+ }, p(v, () => l("InternalLink.dialog.removeLink")), v;
598
598
  })(), (() => {
599
599
  var v = et();
600
- return v.$$click = () => u(!1), p(v, () => i("InternalLink.dialog.changeLink")), v;
600
+ return v.$$click = () => u(!1), p(v, () => l("InternalLink.dialog.changeLink")), v;
601
601
  })()];
602
602
  })(), g), g.$$click = () => {
603
603
  m.hide();
604
- }, p(g, () => i("InternalLink.dialog.ok")), d;
604
+ }, p(g, () => l("InternalLink.dialog.ok")), d;
605
605
  })() : (() => {
606
606
  var d = Mt();
607
607
  return d.$$click = () => {
608
608
  m.hide();
609
- }, p(d, () => i("InternalLink.dialog.ok")), d;
609
+ }, p(d, () => l("InternalLink.dialog.ok")), d;
610
610
  })();
611
611
  })()), c;
612
612
  })(), m = t.createModalDialog({
@@ -623,7 +623,7 @@ function Ht({
623
623
  return p(g, () => r()?.title), L.$$click = () => m.show(), d;
624
624
  })() : (() => {
625
625
  var d = et();
626
- return d.$$click = () => m.show(), p(d, () => i("InternalLink.insertLink")), d;
626
+ return d.$$click = () => m.show(), p(d, () => l("InternalLink.insertLink")), d;
627
627
  })();
628
628
  })()), c;
629
629
  })();
@@ -635,7 +635,7 @@ async function Yt({
635
635
  getLanguage: e,
636
636
  service: n
637
637
  }) {
638
- const [l, i] = S(), {
638
+ const [i, l] = S(), {
639
639
  t: r
640
640
  } = Q(e), [o, s] = S(!!t());
641
641
  G(async () => {
@@ -645,7 +645,7 @@ async function Yt({
645
645
  title: m,
646
646
  typeName: c
647
647
  } = await n.getDocument(h);
648
- i({
648
+ l({
649
649
  title: m,
650
650
  typeName: c
651
651
  });
@@ -689,8 +689,8 @@ async function Yt({
689
689
  var m = _(() => !!(o() && t()));
690
690
  return () => m() ? (() => {
691
691
  var c = Jt(), f = c.firstChild, d = f.nextSibling;
692
- return p(f, () => l()?.title), d.$$click = () => {
693
- const g = t(), L = l()?.typeName;
692
+ return p(f, () => i()?.title), d.$$click = () => {
693
+ const g = t(), L = i()?.typeName;
694
694
  !g || !L || (a.close(), n.openDocumentEdition(g, L));
695
695
  }, c;
696
696
  })() : A(ft, {
@@ -707,7 +707,7 @@ async function Yt({
707
707
  return await a.open();
708
708
  }
709
709
  K(["click"]);
710
- const le = {
710
+ const ie = {
711
711
  create: ne,
712
712
  init: ee
713
713
  };
@@ -722,19 +722,19 @@ function te(t) {
722
722
  return (await t.getDocument(e)).title;
723
723
  },
724
724
  async openDialog(e, n) {
725
- const l = await Yt({
725
+ const i = await Yt({
726
726
  value: () => e,
727
727
  getLanguage: n.getLanguage,
728
728
  service: t
729
729
  });
730
730
  if (e) {
731
- if (!l) return;
732
- if (l === "remove") return {
731
+ if (!i) return;
732
+ if (i === "remove") return {
733
733
  documentId: void 0
734
734
  };
735
735
  }
736
736
  return {
737
- documentId: l
737
+ documentId: i
738
738
  };
739
739
  }
740
740
  };
@@ -743,25 +743,25 @@ function ee({
743
743
  pluginBaseUrl: t,
744
744
  addAfterInitListener: e
745
745
  }) {
746
- const n = `${t}/style.css`, l = document.createElement("link");
747
- l.rel = "stylesheet", l.href = n, document.head.appendChild(l), e(zt);
746
+ const n = `${t}/bo-plugin.css`, i = document.createElement("link");
747
+ i.rel = "stylesheet", i.href = n, document.head.appendChild(i), e(zt);
748
748
  }
749
749
  function ne(t) {
750
750
  if (t.fieldType.dataType !== "string")
751
751
  throw new Error(`data type '${t.fieldType.dataType}' is incompatible, should be 'string'`);
752
752
  return pt((e) => {
753
- const [n, l] = S(t.initialValue ?? ""), [i, r] = S(t.language);
753
+ const [n, i] = S(t.initialValue ?? ""), [l, r] = S(t.language);
754
754
  return {
755
755
  element: A(Ht, {
756
- language: i,
756
+ language: l,
757
757
  value: n,
758
758
  setValue: (o) => {
759
- l(o ?? ""), t.setModifiedValue(o);
759
+ i(o ?? ""), t.setModifiedValue(o);
760
760
  },
761
761
  service: t
762
762
  }),
763
763
  setLanguage: r,
764
- setValue: l,
764
+ setValue: i,
765
765
  getValue() {
766
766
  return n();
767
767
  },
@@ -770,5 +770,5 @@ function ne(t) {
770
770
  });
771
771
  }
772
772
  export {
773
- le as default
773
+ ie as default
774
774
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paroicms/internal-link-plugin",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "Internal link plugin for ParoiCMS",
5
5
  "keywords": [
6
6
  "paroicms",
@@ -32,8 +32,8 @@
32
32
  "devDependencies": {
33
33
  "@paroicms/public-anywhere-lib": "0.14.0",
34
34
  "@paroicms/public-bo-lib": "0.19.0",
35
- "@paroicms/public-server-lib": "0.22.0",
36
- "@paroicms/quill-editor-plugin": "^1.23.0",
35
+ "@paroicms/public-server-lib": "0.22.1",
36
+ "@paroicms/quill-editor-plugin": "^1.23.2",
37
37
  "@solid-primitives/i18n": "~2.1.1",
38
38
  "@types/node": "~22.10.7",
39
39
  "primeicons": "^7.0.0",