@vinena/knobs 0.6.6 → 0.7.1
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/CHANGELOG.md +26 -0
- package/README.md +13 -7
- package/THIRD_PARTY_NOTICES.md +3 -3
- package/dist/cli.d.ts +95 -0
- package/dist/cli.js +527 -0
- package/dist/{context-eawqn680.js → context-2r76ext7.js} +3 -3
- package/dist/{context-vd2xep5t.js → context-h1bdt8w3.js} +3 -3
- package/dist/early.global.js +7 -8
- package/dist/edit/html.d.ts +7 -3
- package/dist/edit/keep.d.ts +2 -2
- package/dist/{elementsview-n26sp8m7.js → elementsview-mcg6d5zp.js} +21 -19
- package/dist/{elementsview-dpm0xmb2.js → elementsview-mwr1s17z.js} +21 -19
- package/dist/engine/bezels.d.ts +2 -2
- package/dist/engine/check.d.ts +2 -2
- package/dist/engine/describe.d.ts +2 -2
- package/dist/engine/devices.d.ts +3 -3
- package/dist/engine/fit.d.ts +4 -4
- package/dist/engine/foldhand.d.ts +2 -2
- package/dist/engine/frame.d.ts +6 -6
- package/dist/engine/frames.d.ts +4 -4
- package/dist/engine/fresh.d.ts +12 -5
- package/dist/engine/header.d.ts +3 -1
- package/dist/engine/identity.d.ts +4 -4
- package/dist/engine/index.d.ts +7 -7
- package/dist/engine/locale.d.ts +2 -2
- package/dist/engine/morph.d.ts +2 -2
- package/dist/engine/native.d.ts +8 -8
- package/dist/engine/placeholder.d.ts +3 -3
- package/dist/engine/reload.d.ts +2 -2
- package/dist/engine/screen.d.ts +2 -2
- package/dist/engine/scrollkeep.d.ts +1 -1
- package/dist/engine/store.d.ts +11 -11
- package/dist/engine/storekeys.d.ts +34 -0
- package/dist/engine/style.d.ts +1 -1
- package/dist/engine/tabicon.d.ts +2 -2
- package/dist/engine/underneath.d.ts +1 -0
- package/dist/engine/width.d.ts +3 -3
- package/dist/{framekit-0as9t6a7.js → framekit-4v7nc3ea.js} +25 -20
- package/dist/{framekit-dknq662p.js → framekit-wyppj1se.js} +25 -20
- package/dist/grab/clipboard.d.ts +2 -0
- package/dist/{index-jfv7vavj.js → index-311fys81.js} +93 -29
- package/dist/index-3dcgysws.js +77 -0
- package/dist/{index-7vb2ct4s.js → index-3s4v7gw5.js} +11 -10
- package/dist/{index-ztnjefrh.js → index-585hs9tp.js} +5 -1
- package/dist/{index-za4ppxay.js → index-6t0w5s7p.js} +1 -1
- package/dist/{index-r1rdj05c.js → index-82y8x8vv.js} +14 -11
- package/dist/{index-dxga6h10.js → index-9targr2f.js} +26 -16
- package/dist/{index-x3sxssbs.js → index-a23nv5j4.js} +65 -45
- package/dist/{index-t4kssacm.js → index-abwqw8jh.js} +6 -1
- package/dist/{index-s6yzsvs4.js → index-bgzyc7rz.js} +22 -15
- package/dist/{index-t4wrs2a3.js → index-c1t6knbf.js} +20 -14
- package/dist/{index-7w0nm76e.js → index-cqymjce4.js} +20 -14
- package/dist/{index-69fvtkcm.js → index-dvtbh3c8.js} +24 -18
- package/dist/{index-ajs4na3f.js → index-k4w5v53q.js} +2 -2
- package/dist/{index-df35z48z.js → index-n31pn4ax.js} +20 -16
- package/dist/{index-ymqm185m.js → index-rps0bdq9.js} +1 -1
- package/dist/{index-a8ffw5ft.js → index-szd9bddn.js} +1 -1
- package/dist/{index-whehz74d.js → index-vhda420r.js} +32 -6
- package/dist/{index-xs29b55n.js → index-vmprrfwe.js} +5 -2
- package/dist/{index-20bc9yrj.js → index-vmz7htwn.js} +1 -1
- package/dist/index.d.ts +14 -8
- package/dist/index.global.js +176 -159
- package/dist/index.js +108 -43
- package/dist/instance.d.ts +7 -1
- package/dist/mark.d.ts +50 -0
- package/dist/{react-msn10fjb.js → react-4ezjf7mq.js} +24 -18
- package/dist/react-4qn9vsjw.js +78 -0
- package/dist/{react-73reavv4.js → react-4tcwpama.js} +1 -1
- package/dist/{react-k4pkm1p5.js → react-7eyps0cg.js} +2 -2
- package/dist/{react-10r2rczp.js → react-7tzwahsm.js} +14 -11
- package/dist/{react-yx3g9k55.js → react-amvrbng8.js} +5 -2
- package/dist/{react-5rq7bnsy.js → react-atw9y8ny.js} +5 -1
- package/dist/{react-4phtr2nd.js → react-dg4bjv3j.js} +1 -1
- package/dist/{react-vbk58f9m.js → react-hdneb4v3.js} +32 -6
- package/dist/{react-h9w04skh.js → react-j87bdhhe.js} +4 -1
- package/dist/{react-wtgvkf6g.js → react-mkafgzqf.js} +1 -1
- package/dist/{react-a1r0nr0g.js → react-ppyj3fg2.js} +65 -45
- package/dist/{react-0r5418av.js → react-rbmk30xk.js} +92 -29
- package/dist/{react-y9gr8yt2.js → react-rxw73n04.js} +1 -1
- package/dist/{react-5h7pxnax.js → react-tet7swk2.js} +22 -15
- package/dist/{react-5ekfj7g3.js → react-w94cfn87.js} +20 -16
- package/dist/{react-v08ywmtw.js → react-wzd3cfg8.js} +11 -10
- package/dist/{react-2b7725je.js → react-x209et38.js} +26 -16
- package/dist/react.d.ts +3 -1
- package/dist/react.js +111 -44
- package/dist/{replay-ehgxp9py.js → replay-3xqgt3xg.js} +8 -8
- package/dist/{replay-461gcdh1.js → replay-48gn27bj.js} +8 -8
- package/dist/storage/onload.d.ts +1 -1
- package/dist/{storageview-5p1y11b5.js → storageview-2rvwk0v7.js} +20 -17
- package/dist/{storageview-kxzpnfvr.js → storageview-6vq7nz02.js} +20 -17
- package/dist/styles/force.d.ts +3 -1
- package/dist/types.d.ts +4 -4
- package/dist/ui/actions.d.ts +3 -3
- package/dist/ui/bindings.d.ts +1 -1
- package/dist/ui/catalog.d.ts +14 -14
- package/dist/ui/changes.d.ts +1 -1
- package/dist/ui/colors.d.ts +1 -1
- package/dist/ui/deviceknobs.d.ts +2 -2
- package/dist/ui/editors.d.ts +3 -3
- package/dist/ui/foldslider.d.ts +2 -2
- package/dist/ui/icons.d.ts +5 -2
- package/dist/ui/keys.d.ts +1 -1
- package/dist/ui/list.d.ts +10 -10
- package/dist/ui/palette.d.ts +2 -2
- package/dist/ui/panel.d.ts +2 -0
- package/dist/ui/pin.d.ts +2 -2
- package/dist/ui/prefs.d.ts +1 -1
- package/dist/ui/rows.d.ts +3 -3
- package/dist/ui/settings.d.ts +11 -1
- package/dist/ui/storageview.d.ts +2 -2
- package/dist/ui/stylesview.d.ts +3 -3
- package/dist/ui/swatches.d.ts +2 -2
- package/package.json +5 -2
- package/skills/{devknobs → knobs}/SKILL.md +52 -51
- package/dist/index-5tv6sr74.js +0 -23
- package/dist/react-t2qnewz2.js +0 -24
|
@@ -9,13 +9,20 @@ import {
|
|
|
9
9
|
knobFrame,
|
|
10
10
|
newer,
|
|
11
11
|
parseHex,
|
|
12
|
+
readItem,
|
|
12
13
|
realNow,
|
|
14
|
+
removeItem,
|
|
13
15
|
removeStyle,
|
|
14
16
|
screenOf,
|
|
15
17
|
stamped,
|
|
16
18
|
turn,
|
|
17
|
-
webStorage
|
|
18
|
-
|
|
19
|
+
webStorage,
|
|
20
|
+
writeItem
|
|
21
|
+
} from "./index-311fys81.js";
|
|
22
|
+
import {
|
|
23
|
+
findOwn,
|
|
24
|
+
ownSelector
|
|
25
|
+
} from "./index-3dcgysws.js";
|
|
19
26
|
|
|
20
27
|
// src/engine/ua.ts
|
|
21
28
|
var CHROME = "154.0.8037.98";
|
|
@@ -293,7 +300,7 @@ function reset(scope = globalThis) {
|
|
|
293
300
|
}
|
|
294
301
|
|
|
295
302
|
// src/engine/scrollkeep.ts
|
|
296
|
-
var SCROLL_KEY = "
|
|
303
|
+
var SCROLL_KEY = "knobs:scroll";
|
|
297
304
|
var SCROLL_VERSION = 1;
|
|
298
305
|
var SCROLL_WINDOW = 1e4;
|
|
299
306
|
var HOLD = 2000;
|
|
@@ -422,11 +429,11 @@ function keep(view, role) {
|
|
|
422
429
|
const session = webStorage("session");
|
|
423
430
|
if (!session)
|
|
424
431
|
return;
|
|
425
|
-
const kept = keptWith(parseKept(session
|
|
432
|
+
const kept = keptWith(parseKept(readItem(session, SCROLL_KEY)), role, placeIn(view), realNow());
|
|
426
433
|
if (kept)
|
|
427
|
-
session
|
|
434
|
+
writeItem(session, SCROLL_KEY, JSON.stringify(stamped(kept, SCROLL_VERSION)));
|
|
428
435
|
else
|
|
429
|
-
|
|
436
|
+
removeItem(session, SCROLL_KEY);
|
|
430
437
|
} catch {}
|
|
431
438
|
}
|
|
432
439
|
function keepOwn() {
|
|
@@ -443,15 +450,15 @@ function resume() {
|
|
|
443
450
|
let target = null;
|
|
444
451
|
try {
|
|
445
452
|
const session = webStorage("session");
|
|
446
|
-
const text = session
|
|
453
|
+
const text = readItem(session, SCROLL_KEY);
|
|
447
454
|
if (!session || text === null)
|
|
448
455
|
return;
|
|
449
456
|
const role = isDevknobsFrame() ? "frame" : "page";
|
|
450
457
|
const { place, rest } = take(parseKept(text), role, window.location.pathname, realNow());
|
|
451
458
|
if (rest)
|
|
452
|
-
session
|
|
459
|
+
writeItem(session, SCROLL_KEY, JSON.stringify(stamped(rest, SCROLL_VERSION)));
|
|
453
460
|
else
|
|
454
|
-
|
|
461
|
+
removeItem(session, SCROLL_KEY);
|
|
455
462
|
target = place;
|
|
456
463
|
} catch {
|
|
457
464
|
return;
|
|
@@ -1682,7 +1689,7 @@ function putMat(node, mat) {
|
|
|
1682
1689
|
// src/engine/placeholder.ts
|
|
1683
1690
|
var Z_INDEX = 2147483645;
|
|
1684
1691
|
var EARLY = "early";
|
|
1685
|
-
var SNAPSHOT_KEY = "
|
|
1692
|
+
var SNAPSHOT_KEY = "knobs:snapshot";
|
|
1686
1693
|
var SNAPSHOT_VERSION = 1;
|
|
1687
1694
|
var EARLY_FRAMES = 60;
|
|
1688
1695
|
var earlyWait = 0;
|
|
@@ -1743,7 +1750,7 @@ function lookOf(value) {
|
|
|
1743
1750
|
}
|
|
1744
1751
|
function readSnapshot(knobs, view) {
|
|
1745
1752
|
try {
|
|
1746
|
-
const text = webStorage("session")
|
|
1753
|
+
const text = readItem(webStorage("session"), SNAPSHOT_KEY);
|
|
1747
1754
|
if (!text)
|
|
1748
1755
|
return null;
|
|
1749
1756
|
const data = JSON.parse(text);
|
|
@@ -1764,7 +1771,7 @@ function readSnapshot(knobs, view) {
|
|
|
1764
1771
|
}
|
|
1765
1772
|
function writeSnapshot(snapshot) {
|
|
1766
1773
|
try {
|
|
1767
|
-
webStorage("session")
|
|
1774
|
+
writeItem(webStorage("session"), SNAPSHOT_KEY, JSON.stringify(stamped(snapshot, SNAPSHOT_VERSION)));
|
|
1768
1775
|
} catch {
|
|
1769
1776
|
clearSnapshot();
|
|
1770
1777
|
}
|
|
@@ -1790,14 +1797,14 @@ function keepDrawing({ letterbox, zoom, key, css, look }) {
|
|
|
1790
1797
|
}
|
|
1791
1798
|
function clearSnapshot() {
|
|
1792
1799
|
try {
|
|
1793
|
-
webStorage("session")
|
|
1800
|
+
removeItem(webStorage("session"), SNAPSHOT_KEY);
|
|
1794
1801
|
} catch {}
|
|
1795
1802
|
}
|
|
1796
1803
|
function earlyHost() {
|
|
1797
|
-
return document
|
|
1804
|
+
return findOwn(document, EARLY, "div");
|
|
1798
1805
|
}
|
|
1799
1806
|
function dropEarly() {
|
|
1800
|
-
for (const node of Array.from(document.querySelectorAll(
|
|
1807
|
+
for (const node of Array.from(document.querySelectorAll(ownSelector(EARLY)))) {
|
|
1801
1808
|
node.remove();
|
|
1802
1809
|
}
|
|
1803
1810
|
removeStyle(EARLY);
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
grabColor,
|
|
7
7
|
isCLike,
|
|
8
8
|
isElement
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-3s4v7gw5.js";
|
|
10
10
|
import {
|
|
11
11
|
componentOf,
|
|
12
12
|
escapeText,
|
|
@@ -14,18 +14,18 @@ import {
|
|
|
14
14
|
grabEntry,
|
|
15
15
|
joinEntries,
|
|
16
16
|
quickEntry
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-vmprrfwe.js";
|
|
18
18
|
import"./index-aymfvd8s.js";
|
|
19
19
|
import {
|
|
20
20
|
shorthand,
|
|
21
21
|
sizeText,
|
|
22
22
|
tidy
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-rps0bdq9.js";
|
|
24
24
|
import {
|
|
25
25
|
middle
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
26
|
+
} from "./index-6t0w5s7p.js";
|
|
27
|
+
import"./index-szd9bddn.js";
|
|
28
|
+
import"./index-abwqw8jh.js";
|
|
29
29
|
import {
|
|
30
30
|
HOST_RESET,
|
|
31
31
|
LAYER,
|
|
@@ -33,15 +33,15 @@ import {
|
|
|
33
33
|
holdInTopLayer,
|
|
34
34
|
pause,
|
|
35
35
|
subscribe
|
|
36
|
-
} from "./index-
|
|
37
|
-
import"./index-
|
|
36
|
+
} from "./index-a23nv5j4.js";
|
|
37
|
+
import"./index-bgzyc7rz.js";
|
|
38
38
|
import {
|
|
39
39
|
composedParent,
|
|
40
40
|
grabTargetAt,
|
|
41
41
|
icon,
|
|
42
42
|
isDevknobs,
|
|
43
43
|
isGrabbable
|
|
44
|
-
} from "./index-
|
|
44
|
+
} from "./index-vhda420r.js";
|
|
45
45
|
import {
|
|
46
46
|
RINGS,
|
|
47
47
|
addStyle,
|
|
@@ -61,11 +61,15 @@ import {
|
|
|
61
61
|
ringQuads,
|
|
62
62
|
systemMedia,
|
|
63
63
|
watchSystemMedia
|
|
64
|
-
} from "./index-
|
|
64
|
+
} from "./index-311fys81.js";
|
|
65
65
|
import"./index-a974q3aa.js";
|
|
66
|
-
import
|
|
66
|
+
import {
|
|
67
|
+
markOwn,
|
|
68
|
+
ownSelector
|
|
69
|
+
} from "./index-3dcgysws.js";
|
|
67
70
|
|
|
68
71
|
// src/grab/clipboard.ts
|
|
72
|
+
var KNOBS_TYPE = "application/x-knobs-grab";
|
|
69
73
|
var DEVKNOBS_TYPE = "application/x-devknobs-grab";
|
|
70
74
|
var REACT_GRAB_TYPE = "application/x-react-grab";
|
|
71
75
|
function clipboardData(payload, now = Date.now()) {
|
|
@@ -77,10 +81,12 @@ function clipboardData(payload, now = Date.now()) {
|
|
|
77
81
|
stackContext: entry.stackContext,
|
|
78
82
|
frames: entry.frames
|
|
79
83
|
}));
|
|
84
|
+
const own = JSON.stringify({ ...payload, timestamp: now });
|
|
80
85
|
return {
|
|
81
86
|
"text/plain": payload.content,
|
|
82
87
|
"text/html": `<meta charset='utf-8'><pre><code>${escapeText(payload.content)}</code></pre>`,
|
|
83
|
-
[
|
|
88
|
+
[KNOBS_TYPE]: own,
|
|
89
|
+
[DEVKNOBS_TYPE]: own,
|
|
84
90
|
[REACT_GRAB_TYPE]: JSON.stringify({
|
|
85
91
|
version: "devknobs",
|
|
86
92
|
content: payload.content,
|
|
@@ -1092,7 +1098,7 @@ function place(node, shape, ratio) {
|
|
|
1092
1098
|
}
|
|
1093
1099
|
function createOverlay(quiet = false, model = false) {
|
|
1094
1100
|
const host = document.createElement("div");
|
|
1095
|
-
host
|
|
1101
|
+
markOwn(host, "grab");
|
|
1096
1102
|
host.style.cssText = `position:fixed;inset:0;width:auto;height:auto;pointer-events:none;z-index:${Z_INDEX}`;
|
|
1097
1103
|
const root = host.attachShadow({ mode: "open" });
|
|
1098
1104
|
addStyle(root, HOST_RESET + HOST_CSS + CSS2);
|
|
@@ -1600,7 +1606,7 @@ function startMode(options, page = PAGE) {
|
|
|
1600
1606
|
let hitTimer = 0;
|
|
1601
1607
|
let settleTimer = 0;
|
|
1602
1608
|
let stopped = false;
|
|
1603
|
-
ensureStyle("grab-cursor").textContent =
|
|
1609
|
+
ensureStyle("grab-cursor").textContent = `*:not(${ownSelector()}){cursor:crosshair!important}`;
|
|
1604
1610
|
pause(true);
|
|
1605
1611
|
function warm(element) {
|
|
1606
1612
|
if (purpose || ready.has(element) || warming.has(element))
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
grabColor,
|
|
8
8
|
isCLike,
|
|
9
9
|
isElement
|
|
10
|
-
} from "./react-
|
|
10
|
+
} from "./react-wzd3cfg8.js";
|
|
11
11
|
import {
|
|
12
12
|
componentOf,
|
|
13
13
|
escapeText,
|
|
@@ -15,18 +15,18 @@ import {
|
|
|
15
15
|
grabEntry,
|
|
16
16
|
joinEntries,
|
|
17
17
|
quickEntry
|
|
18
|
-
} from "./react-
|
|
18
|
+
} from "./react-amvrbng8.js";
|
|
19
19
|
import"./react-1gqwa2yw.js";
|
|
20
20
|
import {
|
|
21
21
|
shorthand,
|
|
22
22
|
sizeText,
|
|
23
23
|
tidy
|
|
24
|
-
} from "./react-
|
|
24
|
+
} from "./react-mkafgzqf.js";
|
|
25
25
|
import {
|
|
26
26
|
middle
|
|
27
|
-
} from "./react-
|
|
28
|
-
import"./react-
|
|
29
|
-
import"./react-
|
|
27
|
+
} from "./react-4tcwpama.js";
|
|
28
|
+
import"./react-dg4bjv3j.js";
|
|
29
|
+
import"./react-atw9y8ny.js";
|
|
30
30
|
import {
|
|
31
31
|
HOST_RESET,
|
|
32
32
|
LAYER,
|
|
@@ -34,15 +34,15 @@ import {
|
|
|
34
34
|
holdInTopLayer,
|
|
35
35
|
pause,
|
|
36
36
|
subscribe
|
|
37
|
-
} from "./react-
|
|
38
|
-
import"./react-
|
|
37
|
+
} from "./react-ppyj3fg2.js";
|
|
38
|
+
import"./react-tet7swk2.js";
|
|
39
39
|
import {
|
|
40
40
|
composedParent,
|
|
41
41
|
grabTargetAt,
|
|
42
42
|
icon,
|
|
43
43
|
isDevknobs,
|
|
44
44
|
isGrabbable
|
|
45
|
-
} from "./react-
|
|
45
|
+
} from "./react-hdneb4v3.js";
|
|
46
46
|
import {
|
|
47
47
|
RINGS,
|
|
48
48
|
addStyle,
|
|
@@ -62,11 +62,15 @@ import {
|
|
|
62
62
|
ringQuads,
|
|
63
63
|
systemMedia,
|
|
64
64
|
watchSystemMedia
|
|
65
|
-
} from "./react-
|
|
65
|
+
} from "./react-rbmk30xk.js";
|
|
66
66
|
import"./react-fp73vhyd.js";
|
|
67
|
-
import
|
|
67
|
+
import {
|
|
68
|
+
markOwn,
|
|
69
|
+
ownSelector
|
|
70
|
+
} from "./react-4qn9vsjw.js";
|
|
68
71
|
|
|
69
72
|
// src/grab/clipboard.ts
|
|
73
|
+
var KNOBS_TYPE = "application/x-knobs-grab";
|
|
70
74
|
var DEVKNOBS_TYPE = "application/x-devknobs-grab";
|
|
71
75
|
var REACT_GRAB_TYPE = "application/x-react-grab";
|
|
72
76
|
function clipboardData(payload, now = Date.now()) {
|
|
@@ -78,10 +82,12 @@ function clipboardData(payload, now = Date.now()) {
|
|
|
78
82
|
stackContext: entry.stackContext,
|
|
79
83
|
frames: entry.frames
|
|
80
84
|
}));
|
|
85
|
+
const own = JSON.stringify({ ...payload, timestamp: now });
|
|
81
86
|
return {
|
|
82
87
|
"text/plain": payload.content,
|
|
83
88
|
"text/html": `<meta charset='utf-8'><pre><code>${escapeText(payload.content)}</code></pre>`,
|
|
84
|
-
[
|
|
89
|
+
[KNOBS_TYPE]: own,
|
|
90
|
+
[DEVKNOBS_TYPE]: own,
|
|
85
91
|
[REACT_GRAB_TYPE]: JSON.stringify({
|
|
86
92
|
version: "devknobs",
|
|
87
93
|
content: payload.content,
|
|
@@ -1093,7 +1099,7 @@ function place(node, shape, ratio) {
|
|
|
1093
1099
|
}
|
|
1094
1100
|
function createOverlay(quiet = false, model = false) {
|
|
1095
1101
|
const host = document.createElement("div");
|
|
1096
|
-
host
|
|
1102
|
+
markOwn(host, "grab");
|
|
1097
1103
|
host.style.cssText = `position:fixed;inset:0;width:auto;height:auto;pointer-events:none;z-index:${Z_INDEX}`;
|
|
1098
1104
|
const root = host.attachShadow({ mode: "open" });
|
|
1099
1105
|
addStyle(root, HOST_RESET + HOST_CSS + CSS2);
|
|
@@ -1601,7 +1607,7 @@ function startMode(options, page = PAGE) {
|
|
|
1601
1607
|
let hitTimer = 0;
|
|
1602
1608
|
let settleTimer = 0;
|
|
1603
1609
|
let stopped = false;
|
|
1604
|
-
ensureStyle("grab-cursor").textContent =
|
|
1610
|
+
ensureStyle("grab-cursor").textContent = `*:not(${ownSelector()}){cursor:crosshair!important}`;
|
|
1605
1611
|
pause(true);
|
|
1606
1612
|
function warm(element) {
|
|
1607
1613
|
if (purpose || ready.has(element) || warming.has(element))
|
|
@@ -5,32 +5,41 @@ import {
|
|
|
5
5
|
riskyElement,
|
|
6
6
|
specificity,
|
|
7
7
|
splitList
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-n31pn4ax.js";
|
|
9
9
|
import {
|
|
10
10
|
middle
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-6t0w5s7p.js";
|
|
12
12
|
import {
|
|
13
13
|
NEW_RULE_SHEET,
|
|
14
14
|
isNewRuleSheet,
|
|
15
15
|
isShadowRoot,
|
|
16
16
|
label
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-szd9bddn.js";
|
|
18
18
|
import {
|
|
19
19
|
actButton,
|
|
20
20
|
el
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-vmz7htwn.js";
|
|
22
22
|
import {
|
|
23
23
|
icon,
|
|
24
24
|
isDevknobs,
|
|
25
25
|
typesInField
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-vhda420r.js";
|
|
27
27
|
import {
|
|
28
28
|
addStyle,
|
|
29
29
|
authoredQuery,
|
|
30
30
|
ensureStyle,
|
|
31
31
|
isDocument,
|
|
32
32
|
isOwnSheet
|
|
33
|
-
} from "./index-
|
|
33
|
+
} from "./index-311fys81.js";
|
|
34
|
+
import {
|
|
35
|
+
ATTRIBUTES,
|
|
36
|
+
isMarked,
|
|
37
|
+
isOwnName,
|
|
38
|
+
newName,
|
|
39
|
+
ownSelector,
|
|
40
|
+
removeMark,
|
|
41
|
+
setMark
|
|
42
|
+
} from "./index-3dcgysws.js";
|
|
34
43
|
|
|
35
44
|
// src/styles/collect.ts
|
|
36
45
|
function isKind(rule, kind) {
|
|
@@ -277,7 +286,7 @@ function layerRanks(marks, holds) {
|
|
|
277
286
|
}
|
|
278
287
|
|
|
279
288
|
// src/edit/html.ts
|
|
280
|
-
var HIDE_ATTRIBUTE =
|
|
289
|
+
var HIDE_ATTRIBUTE = ATTRIBUTES.hide;
|
|
281
290
|
var HIDE_CSS = `[${HIDE_ATTRIBUTE}], [${HIDE_ATTRIBUTE}] * { visibility: hidden !important; }`;
|
|
282
291
|
var HTML = "http://www.w3.org/1999/xhtml";
|
|
283
292
|
var successors = new WeakMap;
|
|
@@ -303,9 +312,6 @@ function isElement(node) {
|
|
|
303
312
|
function isShadowRoot2(node) {
|
|
304
313
|
return node.nodeType === 11 && "host" in node;
|
|
305
314
|
}
|
|
306
|
-
function isOwnName(name) {
|
|
307
|
-
return name.toLowerCase().startsWith("data-devknobs");
|
|
308
|
-
}
|
|
309
315
|
function ends(text) {
|
|
310
316
|
const lead = /^\s*/.exec(text)?.[0] ?? "";
|
|
311
317
|
const trail = lead.length === text.length ? "" : /\s*$/.exec(text)?.[0] ?? "";
|
|
@@ -428,9 +434,9 @@ function hideEdit(target, element, style = hideStyle) {
|
|
|
428
434
|
const hidden = element.hasAttribute(HIDE_ATTRIBUTE);
|
|
429
435
|
const set = (on) => {
|
|
430
436
|
if (on)
|
|
431
|
-
element
|
|
437
|
+
setMark(element, HIDE_ATTRIBUTE);
|
|
432
438
|
else
|
|
433
|
-
element
|
|
439
|
+
removeMark(element, HIDE_ATTRIBUTE);
|
|
434
440
|
};
|
|
435
441
|
return {
|
|
436
442
|
edit: { kind: "hide", target: { ...target }, property: "hidden", before: hidden ? "hidden" : null, after: hidden ? null : "hidden" },
|
|
@@ -481,7 +487,7 @@ function deleteEdit(target, node, before, property = "node") {
|
|
|
481
487
|
};
|
|
482
488
|
}
|
|
483
489
|
function isOwnElement(node) {
|
|
484
|
-
return isElement(node) && node
|
|
490
|
+
return isElement(node) && isMarked(node);
|
|
485
491
|
}
|
|
486
492
|
function nextElementOf(node) {
|
|
487
493
|
for (let at = node.nextSibling;at; at = at.nextSibling)
|
|
@@ -511,7 +517,7 @@ function movable(node) {
|
|
|
511
517
|
return false;
|
|
512
518
|
if (riskyElement(node) || Array.from(node.querySelectorAll("*")).some(riskyElement))
|
|
513
519
|
return false;
|
|
514
|
-
return node.querySelector(
|
|
520
|
+
return node.querySelector(ownSelector()) === null;
|
|
515
521
|
}
|
|
516
522
|
var EMPTY = new Set([
|
|
517
523
|
...["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "param", "source", "track", "wbr", "template"],
|
|
@@ -658,10 +664,10 @@ function isDocument2(node) {
|
|
|
658
664
|
return node.nodeType === DOCUMENT;
|
|
659
665
|
}
|
|
660
666
|
function isOwnNode(node) {
|
|
661
|
-
return isElement2(node) && node
|
|
667
|
+
return isElement2(node) && isMarked(node);
|
|
662
668
|
}
|
|
663
669
|
function isOwnAttribute(name) {
|
|
664
|
-
return name
|
|
670
|
+
return isOwnName(name);
|
|
665
671
|
}
|
|
666
672
|
function parentOf(node) {
|
|
667
673
|
if (isShadowRoot3(node))
|
|
@@ -980,7 +986,7 @@ function markupOf(node) {
|
|
|
980
986
|
const copy = node.cloneNode(true);
|
|
981
987
|
if (!isElement2(copy))
|
|
982
988
|
return "";
|
|
983
|
-
for (const own of Array.from(copy.querySelectorAll(
|
|
989
|
+
for (const own of Array.from(copy.querySelectorAll(ownSelector())))
|
|
984
990
|
own.remove();
|
|
985
991
|
for (const one of [copy, ...Array.from(copy.querySelectorAll("*"))]) {
|
|
986
992
|
for (const attr of Array.from(one.attributes))
|
|
@@ -1415,7 +1421,7 @@ function createDomTree(context, model = createTreeModel()) {
|
|
|
1415
1421
|
any = true;
|
|
1416
1422
|
} else if (record.type === "attributes") {
|
|
1417
1423
|
const name = record.attributeName ?? "";
|
|
1418
|
-
if (name === HIDE_ATTRIBUTE) {
|
|
1424
|
+
if (name === HIDE_ATTRIBUTE || name === newName(HIDE_ATTRIBUTE)) {
|
|
1419
1425
|
drop(target);
|
|
1420
1426
|
any = true;
|
|
1421
1427
|
continue;
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
deviceOf,
|
|
3
3
|
formOf,
|
|
4
4
|
needsFrame
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-311fys81.js";
|
|
6
6
|
|
|
7
7
|
// src/engine/morph.ts
|
|
8
8
|
var MORPH_TIME = {
|
|
@@ -287,7 +287,7 @@ function keepMounted(node, options = {}) {
|
|
|
287
287
|
}
|
|
288
288
|
if (!warned) {
|
|
289
289
|
warned = true;
|
|
290
|
-
console.warn("
|
|
290
|
+
console.warn("knobs: the page keeps removing knobs' elements; putting them back less often");
|
|
291
291
|
}
|
|
292
292
|
timer = window.setTimeout(restore, wait);
|
|
293
293
|
}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
+
itemKeys,
|
|
2
3
|
newer,
|
|
4
|
+
readItem,
|
|
3
5
|
realNow,
|
|
6
|
+
removeItem,
|
|
7
|
+
sameItem,
|
|
4
8
|
stamped,
|
|
5
|
-
webStorage
|
|
6
|
-
|
|
9
|
+
webStorage,
|
|
10
|
+
writeItem
|
|
11
|
+
} from "./index-311fys81.js";
|
|
7
12
|
import {
|
|
8
13
|
__require
|
|
9
|
-
} from "./index-
|
|
14
|
+
} from "./index-3dcgysws.js";
|
|
10
15
|
|
|
11
16
|
// src/edit/log.ts
|
|
12
17
|
function copy(edit) {
|
|
@@ -180,7 +185,7 @@ function riskyEdit(edit) {
|
|
|
180
185
|
}
|
|
181
186
|
|
|
182
187
|
// src/edit/keep.ts
|
|
183
|
-
var EDITS_KEY = "
|
|
188
|
+
var EDITS_KEY = "knobs:edits:";
|
|
184
189
|
var EDITS_VERSION = 1;
|
|
185
190
|
var MAX_EDITS = 200;
|
|
186
191
|
var MAX_BYTES = 256 * 1024;
|
|
@@ -188,7 +193,7 @@ var MAX_PAGES = 20;
|
|
|
188
193
|
var FIELD_MAX = 64 * 1024;
|
|
189
194
|
var KINDS = ["css-value", "css-toggle", "css-add", "css-rule", "text", "attr", "html", "hide", "delete", "move"];
|
|
190
195
|
var REASONS = {
|
|
191
|
-
invalid: "not an edit
|
|
196
|
+
invalid: "not an edit knobs reads",
|
|
192
197
|
missing: "not found on the page",
|
|
193
198
|
rule: "its rule is not on the page",
|
|
194
199
|
changed: "the page has another value now",
|
|
@@ -289,29 +294,28 @@ function writtenAt(text2) {
|
|
|
289
294
|
}
|
|
290
295
|
function otherPages(storage, kept) {
|
|
291
296
|
const pages = [];
|
|
292
|
-
for (
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
pages.push({ key, at: writtenAt(storage.getItem(key)) });
|
|
297
|
+
for (const key of itemKeys(storage, EDITS_KEY)) {
|
|
298
|
+
if (key !== kept)
|
|
299
|
+
pages.push({ key, at: writtenAt(readItem(storage, key)) });
|
|
296
300
|
}
|
|
297
301
|
return pages.sort((a, b) => b.at - a.at).map((page) => page.key);
|
|
298
302
|
}
|
|
299
303
|
function evict(storage, kept) {
|
|
300
304
|
for (const key of otherPages(storage, kept).slice(MAX_PAGES - 1))
|
|
301
|
-
|
|
305
|
+
removeItem(storage, key);
|
|
302
306
|
}
|
|
303
307
|
function write(storage, key, text2) {
|
|
304
308
|
let older = null;
|
|
305
309
|
for (;; ) {
|
|
306
310
|
try {
|
|
307
|
-
storage
|
|
311
|
+
writeItem(storage, key, text2);
|
|
308
312
|
return;
|
|
309
313
|
} catch (error) {
|
|
310
314
|
older ??= otherPages(storage, key);
|
|
311
315
|
const oldest = older.pop();
|
|
312
316
|
if (!oldest)
|
|
313
317
|
throw error;
|
|
314
|
-
|
|
318
|
+
removeItem(storage, oldest);
|
|
315
319
|
}
|
|
316
320
|
}
|
|
317
321
|
}
|
|
@@ -327,7 +331,7 @@ function localEditsStore(path = pathNow()) {
|
|
|
327
331
|
return {
|
|
328
332
|
load() {
|
|
329
333
|
try {
|
|
330
|
-
const kept = webStorage("local")
|
|
334
|
+
const kept = readItem(webStorage("local"), pageKey());
|
|
331
335
|
return kept ? JSON.parse(kept) : null;
|
|
332
336
|
} catch {
|
|
333
337
|
return null;
|
|
@@ -339,7 +343,7 @@ function localEditsStore(path = pathNow()) {
|
|
|
339
343
|
return;
|
|
340
344
|
try {
|
|
341
345
|
if (kept === null)
|
|
342
|
-
|
|
346
|
+
removeItem(storage, pageKey());
|
|
343
347
|
else {
|
|
344
348
|
write(storage, pageKey(), JSON.stringify({ ...kept, at: realNow() }));
|
|
345
349
|
evict(storage, pageKey());
|
|
@@ -348,7 +352,7 @@ function localEditsStore(path = pathNow()) {
|
|
|
348
352
|
},
|
|
349
353
|
subscribe(listener) {
|
|
350
354
|
const onStorage = (event) => {
|
|
351
|
-
if (event.key === null || event.key
|
|
355
|
+
if (event.key === null || sameItem(event.key, pageKey()))
|
|
352
356
|
listener();
|
|
353
357
|
};
|
|
354
358
|
window.addEventListener("storage", onStorage);
|
|
@@ -408,7 +412,7 @@ function settled(view, quiet = QUIET, longest = SETTLE_MAX) {
|
|
|
408
412
|
}
|
|
409
413
|
function createKeeper(options) {
|
|
410
414
|
const { log, store, view } = options;
|
|
411
|
-
const loadReplay = options.replay ?? (() => import("./replay-
|
|
415
|
+
const loadReplay = options.replay ?? (() => import("./replay-3xqgt3xg.js").then(({ replayEdits }) => replayEdits));
|
|
412
416
|
const wait = options.settled ?? (() => settled(view));
|
|
413
417
|
const frame = options.frame ?? (() => null);
|
|
414
418
|
const ours = new WeakMap;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
post
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-311fys81.js";
|
|
4
|
+
import {
|
|
5
|
+
ATTRIBUTES,
|
|
6
|
+
hasMark,
|
|
7
|
+
isMarked
|
|
8
|
+
} from "./index-3dcgysws.js";
|
|
4
9
|
|
|
5
10
|
// src/ui/icons.ts
|
|
6
11
|
var SVG = "http://www.w3.org/2000/svg";
|
|
@@ -231,8 +236,28 @@ var BRANDS = {
|
|
|
231
236
|
json: [
|
|
232
237
|
"currentColor",
|
|
233
238
|
"M12.043 23.968c.479-.004.953-.029 1.426-.094a11.805 11.805 0 003.146-.863 12.404 12.404 0 003.793-2.542 11.977 11.977 0 002.44-3.427 11.794 11.794 0 001.02-3.476c.149-1.16.135-2.346-.045-3.499a11.96 11.96 0 00-.793-2.788 11.197 11.197 0 00-.854-1.617c-1.168-1.837-2.861-3.314-4.81-4.3a12.835 12.835 0 00-2.172-.87h-.005c.119.063.24.132.345.201.12.074.239.146.351.225a8.93 8.93 0 011.559 1.33c1.063 1.145 1.797 2.548 2.218 4.041.284.982.434 1.998.495 3.017.044.743.044 1.491-.047 2.229-.149 1.27-.554 2.51-1.228 3.596a7.475 7.475 0 01-1.903 2.084c-1.244.928-2.877 1.482-4.436 1.114a3.916 3.916 0 01-.748-.258 4.692 4.692 0 01-.779-.45 6.08 6.08 0 01-1.244-1.105 6.507 6.507 0 01-1.049-1.747 7.366 7.366 0 01-.494-2.54c-.03-1.273.225-2.553.854-3.67a6.43 6.43 0 011.663-1.918c.225-.178.464-.333.704-.479l.016-.007a5.121 5.121 0 00-1.441-.12 4.963 4.963 0 00-1.228.24c-.359.12-.704.27-1.019.45a6.146 6.146 0 00-.733.494c-.211.18-.42.36-.615.555-1.123 1.153-1.768 2.682-2.022 4.256-.15.973-.15 1.96-.091 2.95.105 1.395.391 2.787.945 4.062a8.518 8.518 0 001.348 2.173 8.14 8.14 0 003.132 2.23 7.934 7.934 0 002.113.54c.074.015.149.015.209.015zm-2.934-.398a4.102 4.102 0 01-.45-.228 8.5 8.5 0 01-2.038-1.534c-1.094-1.137-1.827-2.566-2.247-4.08a15.184 15.184 0 01-.495-3.172 12.14 12.14 0 01.046-2.082c.135-1.257.495-2.501 1.124-3.58a6.889 6.889 0 011.783-2.053 6.23 6.23 0 011.633-.9 5.363 5.363 0 013.522-.045c.029 0 .029 0 .045.03.015.015.045.015.06.03.045.016.104.045.165.074.239.12.479.271.704.42a6.294 6.294 0 012.097 2.502c.42.914.615 1.934.631 2.938.014 1.079-.18 2.157-.645 3.146a6.42 6.42 0 01-2.638 2.832c.09.03.18.045.271.075.225.044.449.074.688.074 1.468.045 2.892-.66 3.94-1.647.195-.18.375-.375.54-.585.225-.27.435-.54.614-.823.239-.375.435-.75.614-1.154a8.112 8.112 0 00.509-1.664c.196-1.004.211-2.022.149-3.026-.135-2.022-.673-4.045-1.842-5.724a9.054 9.054 0 00-.555-.719 9.868 9.868 0 00-1.063-1.034 8.477 8.477 0 00-1.363-.915 9.927 9.927 0 00-1.692-.598l-.3-.06c-.209-.03-.42-.044-.634-.06a8.453 8.453 0 00-1.015.016c-.704.045-1.412.16-2.112.337C5.799 1.227 2.863 3.566 1.3 6.67A11.834 11.834 0 00.238 9.801a11.81 11.81 0 00-.104 3.775c.12 1.02.374 2.023.778 2.977.227.57.511 1.124.825 1.648 1.094 1.783 2.683 3.236 4.51 4.24.688.39 1.408.69 2.157.944.226.074.45.15.689.21z"
|
|
239
|
+
],
|
|
240
|
+
github: [
|
|
241
|
+
"currentColor",
|
|
242
|
+
"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"
|
|
234
243
|
]
|
|
235
244
|
};
|
|
245
|
+
var VINENA = {
|
|
246
|
+
viewBox: "-3.1 0 537.6 100",
|
|
247
|
+
d: "M147.7 0L205.7 39.97C212.299 35.383 217.85 29.448 221.987 22.559C226.124 15.669 228.753 7.98 229.7 0C240.978 32.123 243.056 66.759 235.7 100L177.7 60.03C171.101 64.617 165.55 70.552 161.413 77.441C157.276 84.331 154.647 92.02 153.7 100C142.422 67.877 140.344 33.241 147.7 0ZM332.2 0L390.2 39.97C396.799 35.383 402.35 29.448 406.487 22.559C410.624 15.669 413.253 7.98 414.2 0C425.478 32.123 427.556 66.759 420.2 100L362.2 60.03C355.601 64.617 350.05 70.552 345.913 77.441C341.776 84.331 339.147 92.02 338.2 100C326.922 67.877 324.844 33.241 332.2 0ZM256.7 0L320.788 0C321.757 -0.025 322.728 -0.025 323.7 0C308.09 8.286 293.044 17.594 278.662 27.864C277.746 28.519 276.999 29.382 276.484 30.383C275.969 31.384 275.7 32.494 275.7 33.619C275.7 35.495 276.445 37.294 277.771 38.62C279.054 39.903 280.78 40.642 282.589 40.689C282.662 40.69 282.735 40.69 282.808 40.691C288.331 40.737 292.836 39.957 297.815 39.096C299.95 38.726 302.172 38.341 304.599 38C301.662 41.307 300.039 45.577 300.039 50C300.039 54.423 301.662 58.693 304.599 62C302.172 61.659 299.95 61.274 297.815 60.904C292.836 60.043 288.331 59.263 282.808 59.309C282.735 59.31 282.662 59.31 282.589 59.311C280.78 59.358 279.054 60.097 277.771 61.38C276.445 62.706 275.7 64.505 275.7 66.381C275.7 67.506 275.969 68.616 276.484 69.617C276.999 70.618 277.746 71.481 278.662 72.136C293.044 82.406 308.09 91.714 323.7 100C322.728 100.025 321.757 100.025 320.788 100L256.7 100C247.367 67.32 247.367 32.68 256.7 0ZM0 0C1.758 11.149 7.438 21.304 16.018 28.637C19.433 31.557 23.219 33.952 27.25 35.779C26.953 37.155 26.8 38.57 26.8 40C26.8 45.304 28.907 50.391 32.658 54.142C36.409 57.893 41.496 60 46.8 60C52.104 60 57.191 57.893 60.942 54.142C64.693 50.391 66.8 45.304 66.8 40C66.8 38.57 66.647 37.155 66.35 35.779C70.381 33.952 74.167 31.557 77.582 28.637C86.162 21.304 91.842 11.149 93.6 0C96.647 19.434 93.821 39.335 85.483 57.152C77.144 74.969 63.674 89.889 46.8 100C29.926 89.889 16.456 74.969 8.117 57.152C-0.221 39.335 -3.047 19.434 0 0ZM531.4 100C529.642 88.851 523.962 78.696 515.382 71.363C511.967 68.443 508.181 66.048 504.15 64.221C504.447 62.845 504.6 61.43 504.6 60C504.6 54.696 502.493 49.609 498.742 45.858C494.991 42.107 489.904 40 484.6 40C479.296 40 474.209 42.107 470.458 45.858C466.707 49.609 464.6 54.696 464.6 60C464.6 61.43 464.753 62.845 465.051 64.221C461.019 66.048 457.233 68.443 453.818 71.363C445.238 78.696 439.558 88.851 437.8 100C434.753 80.566 437.579 60.665 445.917 42.848C454.256 25.031 467.726 10.111 484.6 0C501.474 10.111 514.944 25.031 523.283 42.848C531.621 60.665 534.447 80.566 531.4 100ZM120.7 0C129.225 15.286 133.7 32.498 133.7 50C133.7 67.502 129.225 84.714 120.7 100C112.175 84.714 107.7 67.502 107.7 50C107.7 32.498 112.175 15.286 120.7 0Z"
|
|
248
|
+
};
|
|
249
|
+
function vinenaMark() {
|
|
250
|
+
const svg = document.createElementNS(SVG, "svg");
|
|
251
|
+
svg.setAttribute("class", "wordmark");
|
|
252
|
+
svg.setAttribute("viewBox", VINENA.viewBox);
|
|
253
|
+
svg.setAttribute("fill", "currentColor");
|
|
254
|
+
svg.setAttribute("role", "img");
|
|
255
|
+
svg.setAttribute("aria-label", "Vinena");
|
|
256
|
+
const shape = document.createElementNS(SVG, "path");
|
|
257
|
+
shape.setAttribute("d", VINENA.d);
|
|
258
|
+
svg.append(shape);
|
|
259
|
+
return svg;
|
|
260
|
+
}
|
|
236
261
|
var ROW_ICONS = {
|
|
237
262
|
scheme: "half-sun-moon",
|
|
238
263
|
contrast: "contrast",
|
|
@@ -397,7 +422,7 @@ function defaultKeys(options = {}) {
|
|
|
397
422
|
settings: free(SETTINGS_KEYS)
|
|
398
423
|
};
|
|
399
424
|
}
|
|
400
|
-
var KEYS_FIELD =
|
|
425
|
+
var KEYS_FIELD = ATTRIBUTES.keys;
|
|
401
426
|
function isTyping(node) {
|
|
402
427
|
const element = node;
|
|
403
428
|
const tag = element?.tagName;
|
|
@@ -431,7 +456,8 @@ function typesInField(event) {
|
|
|
431
456
|
const target = event.composedPath?.()[0] ?? event.target;
|
|
432
457
|
if (!isEditable(target))
|
|
433
458
|
return false;
|
|
434
|
-
|
|
459
|
+
const element = target;
|
|
460
|
+
return typeof element?.hasAttribute !== "function" || !hasMark(element, KEYS_FIELD);
|
|
435
461
|
}
|
|
436
462
|
function lowerKey(key) {
|
|
437
463
|
return key === "İ" ? "i" : key.toLowerCase();
|
|
@@ -586,7 +612,7 @@ function composedParent(element) {
|
|
|
586
612
|
}
|
|
587
613
|
function isDevknobs(element) {
|
|
588
614
|
for (let current = element;current; current = composedParent(current)) {
|
|
589
|
-
if (current
|
|
615
|
+
if (isMarked(current))
|
|
590
616
|
return true;
|
|
591
617
|
}
|
|
592
618
|
return false;
|
|
@@ -654,7 +680,7 @@ function descend(start, x, y) {
|
|
|
654
680
|
continue;
|
|
655
681
|
for (let index = 0;index < children.length; index++) {
|
|
656
682
|
const child = children[index];
|
|
657
|
-
if (!child || child
|
|
683
|
+
if (!child || isMarked(child) || !holds(child, x, y))
|
|
658
684
|
continue;
|
|
659
685
|
if (isHidden(child) || isClearLayer(child))
|
|
660
686
|
continue;
|
|
@@ -688,4 +714,4 @@ function grabTargetAt(root, x, y) {
|
|
|
688
714
|
return isGrabbable(element) ? element : null;
|
|
689
715
|
}
|
|
690
716
|
|
|
691
|
-
export { composedParent, isDevknobs, isGrabbable, grabTargetAt, ROW_ICONS, rowIcon, BINDING_ICONS, icon, glyph, parseCombo, comboText, withShift, isFunctionKey, comboLabel, comboSpoken, defaultKeys, KEYS_FIELD, inField, typesInField, lowerKey, letterMatches, keyIs, keyAction, isSearchKey, typeAhead, zoomAction, escapeStep, highlightAt, paletteMove, radioMove, forwardKeys };
|
|
717
|
+
export { composedParent, isDevknobs, isGrabbable, grabTargetAt, vinenaMark, ROW_ICONS, rowIcon, BINDING_ICONS, icon, brand, glyph, parseCombo, comboText, withShift, isFunctionKey, comboLabel, comboSpoken, defaultKeys, KEYS_FIELD, inField, typesInField, lowerKey, letterMatches, keyIs, keyAction, isSearchKey, typeAhead, zoomAction, escapeStep, highlightAt, paletteMove, radioMove, forwardKeys };
|