@pie-element/shared-utils 0.1.7-next.20261026212738 → 0.1.7-next.20261110055344
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.d.ts +1 -0
- package/dist/index.js +90 -87
- package/dist/inline-direction.d.ts +13 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -7,4 +7,5 @@ export * from './utils.js';
|
|
|
7
7
|
export * from './sanitize-model-html.js';
|
|
8
8
|
export * from './prompt-audio.js';
|
|
9
9
|
export { isComposingKeyEvent } from './ime.js';
|
|
10
|
+
export { inlineSideOfArrow, isRightToLeft, type InlineSide } from './inline-direction.js';
|
|
10
11
|
export { AUTHORED_BORDER_ATTR, AUTHORED_FILL_ATTR, AUTHORED_INK_ATTR, markAuthoredColors, type AuthoredFill, } from './authored-colors.js';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import e from "dompurify";
|
|
2
|
-
|
|
2
|
+
// src/utils.ts
|
|
3
3
|
function t(e) {
|
|
4
4
|
let t = typeof process < "u" && process.env?.DEBUG?.includes(e);
|
|
5
5
|
return (...n) => {
|
|
@@ -57,8 +57,7 @@ function d(e, t) {
|
|
|
57
57
|
}
|
|
58
58
|
return JSON.stringify(e) === JSON.stringify(t);
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
//#region src/authored-colors.ts
|
|
60
|
+
// src/authored-colors.ts
|
|
62
61
|
var f = "data-pie-authored-ink", p = "data-pie-authored-fill", m = "data-pie-authored-border", ee = [
|
|
63
62
|
"border-top-color",
|
|
64
63
|
"border-right-color",
|
|
@@ -84,7 +83,7 @@ function ne(e) {
|
|
|
84
83
|
n(t.r),
|
|
85
84
|
n(t.g),
|
|
86
85
|
n(t.b)
|
|
87
|
-
], o = .2126 *
|
|
86
|
+
], o = .2126 * P(r) + .7152 * P(i) + .0722 * P(a), s = Math.max(r, i, a) - Math.min(r, i, a);
|
|
88
87
|
return o >= .85 && s <= .08 ? "light" : "shade";
|
|
89
88
|
}
|
|
90
89
|
function g(e) {
|
|
@@ -134,21 +133,21 @@ function v(e) {
|
|
|
134
133
|
u = ae(C(a), S(o, 100) / 100, S(s, 100) / 100);
|
|
135
134
|
break;
|
|
136
135
|
case "lab":
|
|
137
|
-
u =
|
|
136
|
+
u = A(S(a, 100), S(o, 125), S(s, 125));
|
|
138
137
|
break;
|
|
139
138
|
case "lch":
|
|
140
|
-
u =
|
|
139
|
+
u = A(S(a, 100), ...w(S(o, 150), C(s)));
|
|
141
140
|
break;
|
|
142
141
|
case "oklab":
|
|
143
|
-
u =
|
|
142
|
+
u = j(S(a, 1), S(o, .4), S(s, .4));
|
|
144
143
|
break;
|
|
145
144
|
case "oklch":
|
|
146
|
-
u =
|
|
145
|
+
u = j(S(a, 1), ...w(S(o, .4), C(s)));
|
|
147
146
|
break;
|
|
148
147
|
default: return null;
|
|
149
148
|
}
|
|
150
149
|
if (Number.isNaN(l) || u.some(Number.isNaN)) return null;
|
|
151
|
-
let [d, f, p] = u.map((e) =>
|
|
150
|
+
let [d, f, p] = u.map((e) => F(e, 0, 1) * 255);
|
|
152
151
|
return {
|
|
153
152
|
r: d,
|
|
154
153
|
g: f,
|
|
@@ -184,14 +183,14 @@ function C(e) {
|
|
|
184
183
|
return ((t[2] === "rad" ? n * 180 / Math.PI : t[2] === "grad" ? n * .9 : t[2] === "turn" ? n * 360 : n) % 360 + 360) % 360;
|
|
185
184
|
}
|
|
186
185
|
function ie(e) {
|
|
187
|
-
return e === void 0 ? 1 :
|
|
186
|
+
return e === void 0 ? 1 : F(S(e, 1), 0, 1);
|
|
188
187
|
}
|
|
189
188
|
function w(e, t) {
|
|
190
189
|
let n = Math.max(0, e), r = t * Math.PI / 180;
|
|
191
190
|
return [n * Math.cos(r), n * Math.sin(r)];
|
|
192
191
|
}
|
|
193
192
|
function T(e, t, n) {
|
|
194
|
-
let r =
|
|
193
|
+
let r = F(t, 0, 1), i = F(n, 0, 1), a = (t) => {
|
|
195
194
|
let n = (t + e / 30) % 12, a = r * Math.min(i, 1 - i);
|
|
196
195
|
return i - a * Math.max(-1, Math.min(n - 3, 9 - n, 1));
|
|
197
196
|
};
|
|
@@ -202,18 +201,18 @@ function T(e, t, n) {
|
|
|
202
201
|
];
|
|
203
202
|
}
|
|
204
203
|
function ae(e, t, n) {
|
|
205
|
-
let r =
|
|
204
|
+
let r = F(t, 0, 1), i = F(n, 0, 1);
|
|
206
205
|
return r + i >= 1 ? [
|
|
207
206
|
,
|
|
208
207
|
,
|
|
209
208
|
,
|
|
210
209
|
].fill(r / (r + i)) : T(e, 1, .5).map((e) => e * (1 - r - i) + r);
|
|
211
210
|
}
|
|
212
|
-
var E = 24389 / 27, D = 216 / 24389,
|
|
211
|
+
var E = 24389 / 27, D = 216 / 24389, oe = [
|
|
213
212
|
.3457 / .3585,
|
|
214
213
|
1,
|
|
215
214
|
.2958 / .3585
|
|
216
|
-
],
|
|
215
|
+
], O = [
|
|
217
216
|
[
|
|
218
217
|
.955473421488075,
|
|
219
218
|
-.02309845494876471,
|
|
@@ -229,7 +228,7 @@ var E = 24389 / 27, D = 216 / 24389, O = [
|
|
|
229
228
|
-.020507649298898964,
|
|
230
229
|
1.330365926242124
|
|
231
230
|
]
|
|
232
|
-
],
|
|
231
|
+
], k = [
|
|
233
232
|
[
|
|
234
233
|
12831 / 3959,
|
|
235
234
|
-329 / 214,
|
|
@@ -246,17 +245,17 @@ var E = 24389 / 27, D = 216 / 24389, O = [
|
|
|
246
245
|
705 / 667
|
|
247
246
|
]
|
|
248
247
|
];
|
|
249
|
-
function
|
|
250
|
-
let r =
|
|
251
|
-
return
|
|
248
|
+
function A(e, t, n) {
|
|
249
|
+
let r = F(e, 0, 100), i = (r + 16) / 116, a = t / 500 + i, o = i - n / 200;
|
|
250
|
+
return M(k, M(O, [
|
|
252
251
|
a ** 3 > D ? a ** 3 : (116 * a - 16) / E,
|
|
253
252
|
r > E * D ? i ** 3 : r / E,
|
|
254
253
|
o ** 3 > D ? o ** 3 : (116 * o - 16) / E
|
|
255
|
-
].map((e, t) => e *
|
|
254
|
+
].map((e, t) => e * oe[t]))).map(N);
|
|
256
255
|
}
|
|
257
|
-
function
|
|
258
|
-
let r =
|
|
259
|
-
return
|
|
256
|
+
function j(e, t, n) {
|
|
257
|
+
let r = F(e, 0, 1);
|
|
258
|
+
return M([
|
|
260
259
|
[
|
|
261
260
|
4.0767416621,
|
|
262
261
|
-3.3077115913,
|
|
@@ -276,25 +275,24 @@ function M(e, t, n) {
|
|
|
276
275
|
r + .3963377774 * t + .2158037573 * n,
|
|
277
276
|
r - .1055613458 * t - .0638541728 * n,
|
|
278
277
|
r - .0894841775 * t - 1.291485548 * n
|
|
279
|
-
].map((e) => e ** 3)).map(
|
|
278
|
+
].map((e) => e ** 3)).map(N);
|
|
280
279
|
}
|
|
281
|
-
function
|
|
280
|
+
function M(e, t) {
|
|
282
281
|
return e.map((e) => e[0] * t[0] + e[1] * t[1] + e[2] * t[2]);
|
|
283
282
|
}
|
|
284
|
-
function
|
|
285
|
-
let t =
|
|
283
|
+
function N(e) {
|
|
284
|
+
let t = F(e, 0, 1);
|
|
286
285
|
return t <= .0031308 ? 12.92 * t : 1.055 * t ** (1 / 2.4) - .055;
|
|
287
286
|
}
|
|
288
|
-
function
|
|
287
|
+
function P(e) {
|
|
289
288
|
return e <= .04045 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
|
|
290
289
|
}
|
|
291
|
-
function
|
|
290
|
+
function F(e, t, n) {
|
|
292
291
|
return Math.min(n, Math.max(t, e));
|
|
293
292
|
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
function z(e, t) {
|
|
293
|
+
// src/prompt-audio.ts
|
|
294
|
+
var I = (e) => !!e?.autoplayAudioEnabled && !e?.autoplayAudioHeld, L = ["autoplay"];
|
|
295
|
+
function R(e, t) {
|
|
298
296
|
let n = e.audioStartTime || t.audioStartTime, r = e.audioEndTime || t.audioEndTime, i = {
|
|
299
297
|
...e,
|
|
300
298
|
...n ? { audioStartTime: n } : {},
|
|
@@ -302,7 +300,7 @@ function z(e, t) {
|
|
|
302
300
|
};
|
|
303
301
|
return !i.waitTime && n && r && (i.waitTime = r - n), i;
|
|
304
302
|
}
|
|
305
|
-
var
|
|
303
|
+
var se = class {
|
|
306
304
|
#e;
|
|
307
305
|
#t;
|
|
308
306
|
#n = !1;
|
|
@@ -326,7 +324,7 @@ var oe = class {
|
|
|
326
324
|
this.#i({ audioStartTime: e });
|
|
327
325
|
}
|
|
328
326
|
recordEnd(e = Date.now()) {
|
|
329
|
-
this.#i({ audioEndTime: e }),
|
|
327
|
+
this.#i({ audioEndTime: e }), this.#n || (this.#n = !0, this.#e.announce());
|
|
330
328
|
}
|
|
331
329
|
recordFailure() {
|
|
332
330
|
this.#r || (this.#r = !0, this.#e.announce());
|
|
@@ -335,27 +333,27 @@ var oe = class {
|
|
|
335
333
|
this.#n = e;
|
|
336
334
|
}
|
|
337
335
|
#i(e) {
|
|
338
|
-
let t = this.#e.session() ?? {}, n =
|
|
336
|
+
let t = this.#e.session() ?? {}, n = R(t, e);
|
|
339
337
|
(n.audioStartTime !== t.audioStartTime || n.audioEndTime !== t.audioEndTime || n.waitTime !== t.waitTime) && this.#e.writeSession(n);
|
|
340
338
|
}
|
|
341
|
-
},
|
|
342
|
-
function
|
|
343
|
-
t.follow(
|
|
339
|
+
}, z = (e) => e.getAttribute("src") || e.querySelector("source[src]:not([src=\"\"])")?.getAttribute("src") || "";
|
|
340
|
+
function B(e, t) {
|
|
341
|
+
t.follow(z(e));
|
|
344
342
|
let n = () => t.recordStart(), r = () => t.recordEnd(), i = () => t.recordFailure();
|
|
345
343
|
return e.addEventListener("playing", n), e.addEventListener("ended", r), e.addEventListener("error", i, !0), () => {
|
|
346
344
|
e.removeEventListener("playing", n), e.removeEventListener("ended", r), e.removeEventListener("error", i, !0);
|
|
347
345
|
};
|
|
348
346
|
}
|
|
349
|
-
var
|
|
347
|
+
var V = (e) => {
|
|
350
348
|
let t = e?.querySelector("audio");
|
|
351
349
|
return t?.closest(".preview-prompt") ? t : null;
|
|
352
350
|
};
|
|
353
|
-
function
|
|
351
|
+
function H(e, t) {
|
|
354
352
|
if (!t.pending) return !1;
|
|
355
|
-
let n =
|
|
356
|
-
return !!n &&
|
|
353
|
+
let n = V(e);
|
|
354
|
+
return !!n && z(n) !== "" && n.error === null;
|
|
357
355
|
}
|
|
358
|
-
var
|
|
356
|
+
var U = "play-audio-info", W = 500, G = class {
|
|
359
357
|
#e;
|
|
360
358
|
#t = null;
|
|
361
359
|
#n = null;
|
|
@@ -374,18 +372,18 @@ var W = "play-audio-info", G = 500, K = class {
|
|
|
374
372
|
}
|
|
375
373
|
#i() {
|
|
376
374
|
let e = this.#e.settings();
|
|
377
|
-
if (!
|
|
378
|
-
let t =
|
|
379
|
-
t && t !== this.#n && (this.#o(), this.#a(t,
|
|
375
|
+
if (!I(e) && !e?.completeAudioEnabled) return;
|
|
376
|
+
let t = V(this.#e.root);
|
|
377
|
+
t && t !== this.#n && (this.#o(), this.#a(t, I(e)));
|
|
380
378
|
}
|
|
381
379
|
#a(e, t) {
|
|
382
|
-
let { root: n, tracker: r, enableAudioImage: i } = this.#e, a =
|
|
380
|
+
let { root: n, tracker: r, enableAudioImage: i } = this.#e, a = B(e, r), o = ce(i), s = () => {
|
|
383
381
|
o.isConnected && (e.play()?.catch(() => {}), o.remove()), document.removeEventListener("click", s);
|
|
384
382
|
}, c = () => o.remove();
|
|
385
383
|
e.addEventListener("playing", c);
|
|
386
384
|
let l = t ? setTimeout(() => {
|
|
387
|
-
e.paused && !n.querySelector(`.${
|
|
388
|
-
},
|
|
385
|
+
e.paused && !n.querySelector(`.${U}`) && ((n.querySelector(".main-container") ?? n).appendChild(o), document.addEventListener("click", s));
|
|
386
|
+
}, W) : void 0;
|
|
389
387
|
this.#n = e, this.#r = () => {
|
|
390
388
|
clearTimeout(l), a(), e.removeEventListener("playing", c), document.removeEventListener("click", s), o.remove();
|
|
391
389
|
};
|
|
@@ -394,9 +392,9 @@ var W = "play-audio-info", G = 500, K = class {
|
|
|
394
392
|
this.#r?.(), this.#r = null, this.#n = null;
|
|
395
393
|
}
|
|
396
394
|
};
|
|
397
|
-
function
|
|
395
|
+
function ce(e) {
|
|
398
396
|
let t = document.createElement("div");
|
|
399
|
-
t.id = `${
|
|
397
|
+
t.id = `${U}-${Math.random().toString(36).slice(2, 10)}`, t.className = U, Object.assign(t.style, {
|
|
400
398
|
position: "absolute",
|
|
401
399
|
top: "0",
|
|
402
400
|
width: "100%",
|
|
@@ -411,9 +409,8 @@ function se(e) {
|
|
|
411
409
|
let n = document.createElement("img");
|
|
412
410
|
return n.src = e, n.alt = "Click anywhere to enable audio autoplay", n.width = 500, n.height = 300, t.appendChild(n), t;
|
|
413
411
|
}
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
var q = [
|
|
412
|
+
// src/sanitize-model-html.ts
|
|
413
|
+
var K = [
|
|
417
414
|
"script",
|
|
418
415
|
"embed",
|
|
419
416
|
"base",
|
|
@@ -422,7 +419,7 @@ var q = [
|
|
|
422
419
|
"link",
|
|
423
420
|
"style",
|
|
424
421
|
"foreignobject"
|
|
425
|
-
],
|
|
422
|
+
], q = [
|
|
426
423
|
"onerror",
|
|
427
424
|
"onload",
|
|
428
425
|
"onclick",
|
|
@@ -440,7 +437,7 @@ var q = [
|
|
|
440
437
|
"onbeforeunload",
|
|
441
438
|
"formaction",
|
|
442
439
|
"xlink:href"
|
|
443
|
-
],
|
|
440
|
+
], le = /* @__PURE__ */ new Set([
|
|
444
441
|
"iframe",
|
|
445
442
|
"object",
|
|
446
443
|
"mstack",
|
|
@@ -453,7 +450,7 @@ var q = [
|
|
|
453
450
|
"semantics",
|
|
454
451
|
"annotation",
|
|
455
452
|
"none"
|
|
456
|
-
]),
|
|
453
|
+
]), ue = /^[a-z_][\w.-]*:[a-z][\w.-]*$/, de = [
|
|
457
454
|
"alignment",
|
|
458
455
|
"target",
|
|
459
456
|
"allow",
|
|
@@ -473,18 +470,18 @@ var q = [
|
|
|
473
470
|
"rightoverhang",
|
|
474
471
|
"mslinethickness",
|
|
475
472
|
"linebreak"
|
|
476
|
-
],
|
|
477
|
-
ADD_TAGS: (e) =>
|
|
478
|
-
ADD_ATTR:
|
|
479
|
-
FORBID_TAGS:
|
|
480
|
-
FORBID_ATTR: [...
|
|
473
|
+
], fe = /^\s*document\.getElementById\((['"])([^'"]+)\1\)\.play\(\)\s*;?\s*(?:return\s+false\s*;?\s*)?$/, J = "data-pie-play-audio", pe = {
|
|
474
|
+
ADD_TAGS: (e) => le.has(e) || ue.test(e),
|
|
475
|
+
ADD_ATTR: de,
|
|
476
|
+
FORBID_TAGS: K,
|
|
477
|
+
FORBID_ATTR: [...q, ...L],
|
|
481
478
|
ALLOW_UNKNOWN_PROTOCOLS: !1,
|
|
482
479
|
RETURN_TRUSTED_TYPE: !1
|
|
483
|
-
},
|
|
484
|
-
function
|
|
480
|
+
}, me = !1;
|
|
481
|
+
function he(e) {
|
|
485
482
|
for (let t of e.composedPath()) {
|
|
486
483
|
if (!(t instanceof Element)) continue;
|
|
487
|
-
let n = t.getAttribute(
|
|
484
|
+
let n = t.getAttribute(J);
|
|
488
485
|
if (n === null) continue;
|
|
489
486
|
e.preventDefault();
|
|
490
487
|
let r = t.getRootNode().getElementById?.(n) ?? document.getElementById(n);
|
|
@@ -492,32 +489,38 @@ function me(e) {
|
|
|
492
489
|
return;
|
|
493
490
|
}
|
|
494
491
|
}
|
|
495
|
-
var
|
|
496
|
-
function
|
|
497
|
-
return
|
|
492
|
+
var Y = null;
|
|
493
|
+
function ge() {
|
|
494
|
+
return Y || (Y = e(window), Y.addHook("beforeSanitizeAttributes", (e) => {
|
|
498
495
|
if (e.nodeName !== "A") return;
|
|
499
|
-
let t =
|
|
500
|
-
t !== void 0 && (e.removeAttribute("onclick"), e.setAttribute(
|
|
501
|
-
}),
|
|
496
|
+
let t = fe.exec(e.getAttribute("onclick") ?? "")?.[2];
|
|
497
|
+
t !== void 0 && (e.removeAttribute("onclick"), e.setAttribute(J, t), me ||= (document.addEventListener("click", he), !0));
|
|
498
|
+
}), Y.addHook("afterSanitizeAttributes", g), Y);
|
|
502
499
|
}
|
|
503
|
-
var
|
|
504
|
-
function
|
|
500
|
+
var X = 1e6, Z = /* @__PURE__ */ new Map(), Q = 0;
|
|
501
|
+
function _e(t) {
|
|
505
502
|
if (t == null || t === "" || !e.isSupported) return "";
|
|
506
|
-
let n = typeof t == "string" ? t : String(t), r =
|
|
503
|
+
let n = typeof t == "string" ? t : String(t), r = Z.get(n);
|
|
507
504
|
if (r !== void 0) return r;
|
|
508
|
-
let i = String(
|
|
509
|
-
if (a >
|
|
510
|
-
for (let [e, t] of
|
|
511
|
-
if (
|
|
512
|
-
|
|
505
|
+
let i = String(ge().sanitize(n, pe)), a = n.length + i.length;
|
|
506
|
+
if (a > X) return i;
|
|
507
|
+
for (let [e, t] of Z) {
|
|
508
|
+
if (Q + a <= X) break;
|
|
509
|
+
Z.delete(e), Q -= e.length + t.length;
|
|
513
510
|
}
|
|
514
|
-
return
|
|
511
|
+
return Z.set(n, i), Q += a, i;
|
|
512
|
+
}
|
|
513
|
+
// src/ime.ts
|
|
514
|
+
var ve = 229;
|
|
515
|
+
function ye(e) {
|
|
516
|
+
return e ? !!(e.isComposing || e.nativeEvent?.isComposing || e.keyCode === ve) : !1;
|
|
517
|
+
}
|
|
518
|
+
// src/inline-direction.ts
|
|
519
|
+
function $(e) {
|
|
520
|
+
let t = e?.ownerDocument?.defaultView;
|
|
521
|
+
return !!(e && t && t.getComputedStyle(e).direction === "rtl");
|
|
515
522
|
}
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
var _e = 229;
|
|
519
|
-
function ve(e) {
|
|
520
|
-
return e ? !!(e.isComposing || e.nativeEvent?.isComposing || e.keyCode === _e) : !1;
|
|
523
|
+
function be(e, t) {
|
|
524
|
+
if (e === "ArrowLeft" || e === "ArrowRight") return e === "ArrowLeft" === $(t) ? "inline-end" : "inline-start";
|
|
521
525
|
}
|
|
522
|
-
|
|
523
|
-
export { m as AUTHORED_BORDER_ATTR, p as AUTHORED_FILL_ATTR, f as AUTHORED_INK_ATTR, R as AUTOPLAY_AUDIO_MARKUP_ATTRS, J as MODEL_HTML_FORBIDDEN_ATTRS, q as MODEL_HTML_FORBIDDEN_TAGS, Y as PLAY_AUDIO_ATTR, oe as PromptAudioTracker, K as PromptAudioWatcher, u as assignProps, L as autoplayAudioOn, V as bindPromptAudio, a as clamp, s as debounce, t as debug, ve as isComposingKeyEvent, n as isEmpty, g as markAuthoredColors, U as promptAudioPending, ge as sanitizeModelHtml, d as sessionsEqual, r as showFeedback, i as showRationale, c as shuffle, o as uuid, z as withPromptAudioTiming };
|
|
526
|
+
export { m as AUTHORED_BORDER_ATTR, p as AUTHORED_FILL_ATTR, f as AUTHORED_INK_ATTR, L as AUTOPLAY_AUDIO_MARKUP_ATTRS, q as MODEL_HTML_FORBIDDEN_ATTRS, K as MODEL_HTML_FORBIDDEN_TAGS, J as PLAY_AUDIO_ATTR, se as PromptAudioTracker, G as PromptAudioWatcher, u as assignProps, I as autoplayAudioOn, B as bindPromptAudio, a as clamp, s as debounce, t as debug, be as inlineSideOfArrow, ye as isComposingKeyEvent, n as isEmpty, $ as isRightToLeft, g as markAuthoredColors, H as promptAudioPending, _e as sanitizeModelHtml, d as sessionsEqual, r as showFeedback, i as showRationale, c as shuffle, o as uuid, R as withPromptAudioTiming };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** The side of a line a sequential move goes toward: where text starts, or where it ends. */
|
|
2
|
+
export type InlineSide = 'inline-start' | 'inline-end';
|
|
3
|
+
/** Whether `element`'s text runs right to left, from its computed direction. */
|
|
4
|
+
export declare function isRightToLeft(element: Element | null | undefined): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* The inline side a horizontal arrow key moves toward in `element`'s text: ArrowLeft is the inline
|
|
7
|
+
* start in left-to-right text and the inline end in right-to-left text. The direction is read when
|
|
8
|
+
* the key is pressed, so a block with its own `dir` answers for itself. Every other key has none.
|
|
9
|
+
*
|
|
10
|
+
* Sequential navigation (previous and next) goes through this; spatial movement keeps the physical
|
|
11
|
+
* key.
|
|
12
|
+
*/
|
|
13
|
+
export declare function inlineSideOfArrow(key: string, element: Element | null | undefined): InlineSide | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/shared-utils",
|
|
3
|
-
"version": "0.1.7-next.
|
|
3
|
+
"version": "0.1.7-next.20261110055344",
|
|
4
4
|
"description": "Shared utilities for PIE elements",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"clean": "rm -rf dist"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@pie-element/shared-types": "0.2.4-next.
|
|
24
|
+
"@pie-element/shared-types": "0.2.4-next.20261109184540",
|
|
25
25
|
"dompurify": "^3.4.17"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|