@vinena/knobs 0.7.0 → 0.7.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.
- package/CHANGELOG.md +23 -0
- package/README.md +2 -2
- package/dist/cli.js +2 -2
- 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 +1 -1
- package/dist/{elementsview-m33ejs4r.js → elementsview-1bar694x.js} +21 -19
- package/dist/{elementsview-jg4edt86.js → elementsview-p2wc9b0s.js} +21 -19
- package/dist/engine/bandmedia.d.ts +119 -0
- package/dist/engine/bezels.d.ts +2 -2
- package/dist/engine/browserui.d.ts +3 -1
- 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/pageshot.d.ts +24 -4
- package/dist/engine/placeholder.d.ts +3 -3
- package/dist/engine/reload.d.ts +2 -2
- package/dist/engine/safaridraw.d.ts +24 -3
- 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/underbar.d.ts +26 -7
- package/dist/engine/underneath.d.ts +1 -0
- package/dist/engine/width.d.ts +3 -3
- package/dist/{framekit-r16k97n7.js → framekit-n57ts9zt.js} +959 -87
- package/dist/{framekit-40pzennw.js → framekit-wqp811a2.js} +959 -87
- 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-ztnjefrh.js → index-585hs9tp.js} +5 -1
- package/dist/{index-za4ppxay.js → index-6t0w5s7p.js} +1 -1
- package/dist/{index-tqq2ygpj.js → index-9targr2f.js} +26 -16
- package/dist/{index-t4kssacm.js → index-abwqw8jh.js} +6 -1
- package/dist/{index-s6yzsvs4.js → index-b8cnnbpr.js} +25 -18
- package/dist/{index-xxbb8y41.js → index-cfrnrg24.js} +20 -14
- package/dist/{index-v2v4rmpe.js → index-dvtbh3c8.js} +24 -18
- package/dist/{index-0qkj2mgb.js → index-j8hrzag1.js} +14 -11
- package/dist/{index-cb91vcka.js → index-k4w5v53q.js} +1 -1
- package/dist/{index-q53j8wg5.js → index-n31pn4ax.js} +19 -15
- package/dist/{index-s6fya8pm.js → index-pvknvvkw.js} +11 -10
- package/dist/{index-3nwycv3p.js → index-qz04adp5.js} +20 -14
- package/dist/{index-ymqm185m.js → index-rps0bdq9.js} +1 -1
- package/dist/{index-a8ffw5ft.js → index-szd9bddn.js} +1 -1
- package/dist/{index-8d1yk9d2.js → index-t7a07nm9.js} +59 -39
- package/dist/{index-2jc9dnta.js → index-vhda420r.js} +11 -5
- package/dist/{index-xs29b55n.js → index-vmprrfwe.js} +5 -2
- package/dist/{index-fjrrgd9h.js → index-vmz7htwn.js} +1 -1
- package/dist/index.d.ts +14 -8
- package/dist/index.global.js +182 -165
- package/dist/index.js +57 -32
- package/dist/instance.d.ts +7 -1
- package/dist/mark.d.ts +50 -0
- package/dist/{react-vvc4x9kq.js → react-0tbd51s3.js} +14 -11
- package/dist/{react-0gxs9aef.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-6ngtb6p9.js → react-7eyps0cg.js} +1 -1
- package/dist/{react-zp7fdw8e.js → react-881wvm1z.js} +59 -39
- 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-meve34wp.js → react-hdneb4v3.js} +11 -5
- package/dist/{react-h9w04skh.js → react-j87bdhhe.js} +4 -1
- package/dist/{react-wtgvkf6g.js → react-mkafgzqf.js} +1 -1
- package/dist/{react-fq4551ks.js → react-pf7fc2f3.js} +11 -10
- package/dist/{react-0r5418av.js → react-rbmk30xk.js} +92 -29
- package/dist/{react-actmnkwp.js → react-rxw73n04.js} +1 -1
- package/dist/{react-8nmtt0ge.js → react-w94cfn87.js} +19 -15
- package/dist/{react-3ev6rwqz.js → react-x209et38.js} +26 -16
- package/dist/{react-5h7pxnax.js → react-zj0dbpdg.js} +25 -18
- package/dist/react.d.ts +3 -1
- package/dist/react.js +60 -33
- package/dist/{replay-pmesjfa3.js → replay-3xqgt3xg.js} +8 -8
- package/dist/{replay-m5g8km9y.js → replay-48gn27bj.js} +8 -8
- package/dist/storage/onload.d.ts +1 -1
- package/dist/{storageview-9a6zm47z.js → storageview-5tvmca8y.js} +16 -13
- package/dist/{storageview-x62v1c3j.js → storageview-ec52x60p.js} +16 -13
- 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/keys.d.ts +1 -1
- package/dist/ui/list.d.ts +10 -10
- package/dist/ui/palette.d.ts +2 -2
- 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/storageview.d.ts +2 -2
- package/dist/ui/stylesview.d.ts +3 -3
- package/dist/ui/swatches.d.ts +2 -2
- package/package.json +2 -1
- package/skills/knobs/SKILL.md +36 -35
- package/dist/index-5tv6sr74.js +0 -23
- package/dist/react-t2qnewz2.js +0 -24
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
resume,
|
|
24
24
|
screenSizeOf,
|
|
25
25
|
uaPreset
|
|
26
|
-
} from "./react-
|
|
26
|
+
} from "./react-zj0dbpdg.js";
|
|
27
27
|
import {
|
|
28
28
|
composedParent,
|
|
29
29
|
isDevknobs
|
|
30
|
-
} from "./react-
|
|
30
|
+
} from "./react-hdneb4v3.js";
|
|
31
31
|
import {
|
|
32
32
|
DEFAULT_STATE,
|
|
33
33
|
EXITED,
|
|
@@ -53,9 +53,11 @@ import {
|
|
|
53
53
|
now,
|
|
54
54
|
ownReload,
|
|
55
55
|
post,
|
|
56
|
+
readItem,
|
|
56
57
|
readMessage,
|
|
57
58
|
readNow,
|
|
58
59
|
realNow,
|
|
60
|
+
removeItem,
|
|
59
61
|
removeStyle,
|
|
60
62
|
reset,
|
|
61
63
|
reset1 as reset2,
|
|
@@ -68,8 +70,9 @@ import {
|
|
|
68
70
|
takeOver,
|
|
69
71
|
temporalNow,
|
|
70
72
|
webStorage,
|
|
71
|
-
wrapDate
|
|
72
|
-
|
|
73
|
+
wrapDate,
|
|
74
|
+
writeItem
|
|
75
|
+
} from "./react-rbmk30xk.js";
|
|
73
76
|
import {
|
|
74
77
|
QUIET,
|
|
75
78
|
SHARED_VERSION,
|
|
@@ -78,9 +81,18 @@ import {
|
|
|
78
81
|
shared
|
|
79
82
|
} from "./react-fp73vhyd.js";
|
|
80
83
|
import {
|
|
84
|
+
ATTRIBUTES,
|
|
85
|
+
OLD_MARK,
|
|
86
|
+
OWN_AND_IN,
|
|
81
87
|
__export,
|
|
82
|
-
__require
|
|
83
|
-
|
|
88
|
+
__require,
|
|
89
|
+
either,
|
|
90
|
+
isMarked,
|
|
91
|
+
markOwn,
|
|
92
|
+
ownSelector,
|
|
93
|
+
removeMark,
|
|
94
|
+
setMark
|
|
95
|
+
} from "./react-4qn9vsjw.js";
|
|
84
96
|
|
|
85
97
|
// src/engine/intl.ts
|
|
86
98
|
var SERVICES = [
|
|
@@ -212,9 +224,9 @@ var LOCALE_PRESETS = [
|
|
|
212
224
|
"zh-CN"
|
|
213
225
|
];
|
|
214
226
|
var PARAGLIDE_COOKIE = "PARAGLIDE_LOCALE";
|
|
215
|
-
var OWNER_KEY = "
|
|
227
|
+
var OWNER_KEY = "knobs:locale-stores";
|
|
216
228
|
var OWNER_VERSION = 1;
|
|
217
|
-
var RELOAD_KEY = "
|
|
229
|
+
var RELOAD_KEY = "knobs:locale-reload";
|
|
218
230
|
var RELOAD_VERSION = 1;
|
|
219
231
|
var RELOAD_THROTTLE = 5000;
|
|
220
232
|
var HOLD_BUDGET = 20;
|
|
@@ -317,7 +329,7 @@ function parseOwned(json) {
|
|
|
317
329
|
}
|
|
318
330
|
function readOwned() {
|
|
319
331
|
try {
|
|
320
|
-
return parseOwned(webStorage("session")
|
|
332
|
+
return parseOwned(readItem(webStorage("session"), OWNER_KEY));
|
|
321
333
|
} catch {
|
|
322
334
|
return null;
|
|
323
335
|
}
|
|
@@ -325,7 +337,7 @@ function readOwned() {
|
|
|
325
337
|
function writeOwned(owned) {
|
|
326
338
|
try {
|
|
327
339
|
const session = webStorage("session");
|
|
328
|
-
session
|
|
340
|
+
writeItem(session, OWNER_KEY, JSON.stringify(stamped(owned, OWNER_VERSION)));
|
|
329
341
|
return session !== null;
|
|
330
342
|
} catch {
|
|
331
343
|
return false;
|
|
@@ -333,7 +345,7 @@ function writeOwned(owned) {
|
|
|
333
345
|
}
|
|
334
346
|
function clearOwned() {
|
|
335
347
|
try {
|
|
336
|
-
webStorage("session")
|
|
348
|
+
removeItem(webStorage("session"), OWNER_KEY);
|
|
337
349
|
} catch {}
|
|
338
350
|
}
|
|
339
351
|
function parseReload(text) {
|
|
@@ -357,7 +369,7 @@ function reloadWait() {
|
|
|
357
369
|
const session = webStorage("session");
|
|
358
370
|
if (!session)
|
|
359
371
|
return Infinity;
|
|
360
|
-
const previous = parseReload(session
|
|
372
|
+
const previous = parseReload(readItem(session, RELOAD_KEY));
|
|
361
373
|
if (!(previous > 0))
|
|
362
374
|
return 0;
|
|
363
375
|
return Math.min(RELOAD_THROTTLE, Math.max(0, previous + RELOAD_THROTTLE - realNow()));
|
|
@@ -378,7 +390,7 @@ function reloadOnce() {
|
|
|
378
390
|
const session = webStorage("session");
|
|
379
391
|
if (!session)
|
|
380
392
|
return false;
|
|
381
|
-
session
|
|
393
|
+
writeItem(session, RELOAD_KEY, JSON.stringify(record));
|
|
382
394
|
} catch {
|
|
383
395
|
return false;
|
|
384
396
|
}
|
|
@@ -984,7 +996,7 @@ var HOST_RESET = `
|
|
|
984
996
|
transition: none !important;
|
|
985
997
|
animation: none !important;
|
|
986
998
|
}`;
|
|
987
|
-
var BACKDROP_CSS = "
|
|
999
|
+
var BACKDROP_CSS = `${either(OLD_MARK, "][popover]::backdrop")}{display:none!important}`;
|
|
988
1000
|
var TOP_LAYER = [":popover-open", ":modal", ":fullscreen"];
|
|
989
1001
|
var POINTER = ["pointerover", "pointermove", "pointerdown"];
|
|
990
1002
|
var held2 = [];
|
|
@@ -1172,7 +1184,7 @@ var EVENTS = [
|
|
|
1172
1184
|
"dragstart",
|
|
1173
1185
|
"selectstart"
|
|
1174
1186
|
];
|
|
1175
|
-
var CURSOR_CSS =
|
|
1187
|
+
var CURSOR_CSS = `*:not(${ownSelector()}){cursor:none!important}:where(${ownSelector()}){cursor:auto}`;
|
|
1176
1188
|
var DRAG_CSS = "*{-webkit-user-select:none!important;user-select:none!important}";
|
|
1177
1189
|
var DOT_CSS = `
|
|
1178
1190
|
:host {
|
|
@@ -1325,7 +1337,7 @@ function mountDot() {
|
|
|
1325
1337
|
if (host)
|
|
1326
1338
|
return;
|
|
1327
1339
|
host = document.createElement("div");
|
|
1328
|
-
host
|
|
1340
|
+
markOwn(host, "touch-pointer");
|
|
1329
1341
|
const root = host.attachShadow({ mode: "open" });
|
|
1330
1342
|
addStyle(root, DOT_CSS);
|
|
1331
1343
|
dot = document.createElement("div");
|
|
@@ -1776,7 +1788,7 @@ function pause(on) {
|
|
|
1776
1788
|
|
|
1777
1789
|
// src/engine/frames.ts
|
|
1778
1790
|
var kit = null;
|
|
1779
|
-
var load2 = () => import("./framekit-
|
|
1791
|
+
var load2 = () => import("./framekit-n57ts9zt.js");
|
|
1780
1792
|
var loading = null;
|
|
1781
1793
|
var down = false;
|
|
1782
1794
|
var waiting = [];
|
|
@@ -2929,7 +2941,9 @@ function requestLog() {
|
|
|
2929
2941
|
}
|
|
2930
2942
|
|
|
2931
2943
|
// src/engine/header.ts
|
|
2932
|
-
var NOW_HEADER = "x-
|
|
2944
|
+
var NOW_HEADER = "x-knobs-now";
|
|
2945
|
+
var OLD_NOW_HEADER = "x-devknobs-now";
|
|
2946
|
+
var NOW_HEADERS = [NOW_HEADER, OLD_NOW_HEADER];
|
|
2933
2947
|
var on = false;
|
|
2934
2948
|
var installed2 = [];
|
|
2935
2949
|
var ownOrigin = new WeakSet;
|
|
@@ -2953,11 +2967,15 @@ function isRequest2(input) {
|
|
|
2953
2967
|
function withHeader(input, init) {
|
|
2954
2968
|
if (isRequest2(input) && init?.headers === undefined) {
|
|
2955
2969
|
const copy = new Request(input);
|
|
2956
|
-
|
|
2970
|
+
const value2 = stamp();
|
|
2971
|
+
for (const name of NOW_HEADERS)
|
|
2972
|
+
copy.headers.set(name, value2);
|
|
2957
2973
|
return [copy, init];
|
|
2958
2974
|
}
|
|
2959
2975
|
const headers = new Headers(init?.headers);
|
|
2960
|
-
|
|
2976
|
+
const value = stamp();
|
|
2977
|
+
for (const name of NOW_HEADERS)
|
|
2978
|
+
headers.set(name, value);
|
|
2961
2979
|
return [input, { ...init, headers }];
|
|
2962
2980
|
}
|
|
2963
2981
|
function install5(target, key, make) {
|
|
@@ -2994,7 +3012,9 @@ function patch() {
|
|
|
2994
3012
|
install5(xhr, "send", (original) => function(...args) {
|
|
2995
3013
|
if (on && ownOrigin.has(this)) {
|
|
2996
3014
|
try {
|
|
2997
|
-
|
|
3015
|
+
const value = stamp();
|
|
3016
|
+
for (const name of NOW_HEADERS)
|
|
3017
|
+
this.setRequestHeader(name, value);
|
|
2998
3018
|
} catch {}
|
|
2999
3019
|
}
|
|
3000
3020
|
return original.apply(this, args);
|
|
@@ -3087,7 +3107,7 @@ function apply14(value) {
|
|
|
3087
3107
|
reset13();
|
|
3088
3108
|
return;
|
|
3089
3109
|
}
|
|
3090
|
-
ensureStyle(NAME).textContent =
|
|
3110
|
+
ensureStyle(NAME).textContent = `body *:not(${OWN_AND_IN}){outline:1px solid rgba(127,127,127,.5)!important}`;
|
|
3091
3111
|
}
|
|
3092
3112
|
function reset13() {
|
|
3093
3113
|
removeStyle(NAME);
|
|
@@ -3097,7 +3117,7 @@ function reset13() {
|
|
|
3097
3117
|
function isOwn2(node) {
|
|
3098
3118
|
let current = node;
|
|
3099
3119
|
while (current) {
|
|
3100
|
-
if (current instanceof Element && current.closest(
|
|
3120
|
+
if (current instanceof Element && current.closest(ownSelector()))
|
|
3101
3121
|
return true;
|
|
3102
3122
|
const root = current.getRootNode();
|
|
3103
3123
|
current = root instanceof ShadowRoot ? root.host : null;
|
|
@@ -3108,7 +3128,7 @@ function walk(visit) {
|
|
|
3108
3128
|
const pending = [document];
|
|
3109
3129
|
for (let root = pending.pop();root; root = pending.pop()) {
|
|
3110
3130
|
for (const element of Array.from(root.querySelectorAll("*"))) {
|
|
3111
|
-
if (element
|
|
3131
|
+
if (isMarked(element))
|
|
3112
3132
|
continue;
|
|
3113
3133
|
visit(element);
|
|
3114
3134
|
if (element.shadowRoot)
|
|
@@ -3273,7 +3293,7 @@ function start2() {
|
|
|
3273
3293
|
if (host2 || !document.body)
|
|
3274
3294
|
return;
|
|
3275
3295
|
host2 = document.createElement("div");
|
|
3276
|
-
host2
|
|
3296
|
+
markOwn(host2, "overflow");
|
|
3277
3297
|
host2.style.cssText = `position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:${Z_INDEX}`;
|
|
3278
3298
|
layer = host2.attachShadow({ mode: "open" });
|
|
3279
3299
|
sheet = addStyle(layer, CSS);
|
|
@@ -3328,8 +3348,8 @@ var ACCENTED = "áƀçðéƒĝĥîĵķļɱñöþǫŕšţûṽŵẋýžÅƁÇÐÉ
|
|
|
3328
3348
|
var accented = Array.from(ACCENTED);
|
|
3329
3349
|
var ACCENTS = new Map(Array.from(PLAIN, (char, i) => [char, accented[i] ?? char]));
|
|
3330
3350
|
var GROWTH = 0.35;
|
|
3331
|
-
var
|
|
3332
|
-
var SKIPPED =
|
|
3351
|
+
var ATTRIBUTES2 = ["placeholder", "title", "aria-label", "alt"];
|
|
3352
|
+
var SKIPPED = `script,style,noscript,textarea,option:not([value]),${ownSelector()}`;
|
|
3333
3353
|
var LETTER = /\p{L}/u;
|
|
3334
3354
|
function pseudoText(text2) {
|
|
3335
3355
|
const core = text2.trim();
|
|
@@ -3415,7 +3435,7 @@ function swapNode(node) {
|
|
|
3415
3435
|
if (node.nodeType === Node.TEXT_NODE)
|
|
3416
3436
|
swapText(node);
|
|
3417
3437
|
else
|
|
3418
|
-
for (const name of
|
|
3438
|
+
for (const name of ATTRIBUTES2)
|
|
3419
3439
|
swapAttribute(node, name);
|
|
3420
3440
|
}
|
|
3421
3441
|
function swapTree(root) {
|
|
@@ -3477,7 +3497,7 @@ function start3() {
|
|
|
3477
3497
|
subtree: true,
|
|
3478
3498
|
characterData: true,
|
|
3479
3499
|
attributes: true,
|
|
3480
|
-
attributeFilter:
|
|
3500
|
+
attributeFilter: ATTRIBUTES2
|
|
3481
3501
|
});
|
|
3482
3502
|
}
|
|
3483
3503
|
function whenIdle(run) {
|
|
@@ -3594,7 +3614,7 @@ function collect(roots = shadowRoots()) {
|
|
|
3594
3614
|
}
|
|
3595
3615
|
|
|
3596
3616
|
// src/engine/replay.ts
|
|
3597
|
-
var MARK =
|
|
3617
|
+
var MARK = ATTRIBUTES.replay;
|
|
3598
3618
|
var BOXES = [
|
|
3599
3619
|
["", "self"],
|
|
3600
3620
|
["::before", "before"],
|
|
@@ -3636,7 +3656,7 @@ function restartFinished(live) {
|
|
|
3636
3656
|
const tokens = BOXES.filter(([pseudo]) => finished(element, pseudo, names)).map(([, token]) => token);
|
|
3637
3657
|
if (tokens.length === 0)
|
|
3638
3658
|
return;
|
|
3639
|
-
element
|
|
3659
|
+
setMark(element, MARK, tokens.join(" "));
|
|
3640
3660
|
marked.push(element);
|
|
3641
3661
|
roots.add(element.getRootNode());
|
|
3642
3662
|
});
|
|
@@ -3647,7 +3667,7 @@ function restartFinished(live) {
|
|
|
3647
3667
|
for (const style of styles)
|
|
3648
3668
|
style.remove();
|
|
3649
3669
|
for (const element of marked)
|
|
3650
|
-
element
|
|
3670
|
+
removeMark(element, MARK);
|
|
3651
3671
|
}
|
|
3652
3672
|
function replay() {
|
|
3653
3673
|
const animations = collect();
|
|
@@ -3663,7 +3683,7 @@ function replay() {
|
|
|
3663
3683
|
|
|
3664
3684
|
// src/engine/spacing.ts
|
|
3665
3685
|
var NAME2 = "spacing";
|
|
3666
|
-
var NOT_OURS =
|
|
3686
|
+
var NOT_OURS = `:not(${OWN_AND_IN})`;
|
|
3667
3687
|
var CSS2 = `*${NOT_OURS}{line-height:1.5!important;letter-spacing:.12em!important;word-spacing:.16em!important}` + `p${NOT_OURS}{margin-bottom:2em!important}`;
|
|
3668
3688
|
function apply17(value) {
|
|
3669
3689
|
if (!value) {
|
|
@@ -3751,8 +3771,8 @@ function drawDevIcon(context, size, source) {
|
|
|
3751
3771
|
}
|
|
3752
3772
|
|
|
3753
3773
|
// src/engine/tabicon.ts
|
|
3754
|
-
var ORIGINAL_HREF =
|
|
3755
|
-
var ADDED_ICON =
|
|
3774
|
+
var ORIGINAL_HREF = ATTRIBUTES.href;
|
|
3775
|
+
var ADDED_ICON = ATTRIBUTES.icon;
|
|
3756
3776
|
var FALLBACK = "/favicon.ico";
|
|
3757
3777
|
var TOUCH_RELS = ["apple-touch-icon", "apple-touch-icon-precomposed"];
|
|
3758
3778
|
function localHost(hostname) {
|
|
@@ -3840,7 +3860,7 @@ function createTabIcon(env) {
|
|
|
3840
3860
|
return;
|
|
3841
3861
|
}
|
|
3842
3862
|
drawn.set(link, { url, original: href });
|
|
3843
|
-
link
|
|
3863
|
+
setMark(link, ORIGINAL_HREF, href);
|
|
3844
3864
|
link.setAttribute("href", url);
|
|
3845
3865
|
});
|
|
3846
3866
|
}
|
|
@@ -3852,7 +3872,7 @@ function createTabIcon(env) {
|
|
|
3852
3872
|
drawn.delete(link);
|
|
3853
3873
|
if (link.getAttribute("href") === mine.url)
|
|
3854
3874
|
link.setAttribute("href", mine.original);
|
|
3855
|
-
link
|
|
3875
|
+
removeMark(link, ORIGINAL_HREF);
|
|
3856
3876
|
}
|
|
3857
3877
|
function linksIn(node) {
|
|
3858
3878
|
if (isIconLink(node))
|
|
@@ -3868,7 +3888,7 @@ function createTabIcon(env) {
|
|
|
3868
3888
|
const link = doc.createElement("link");
|
|
3869
3889
|
link.setAttribute("rel", "icon");
|
|
3870
3890
|
link.setAttribute("href", FALLBACK);
|
|
3871
|
-
link
|
|
3891
|
+
setMark(link, ADDED_ICON);
|
|
3872
3892
|
added = link;
|
|
3873
3893
|
(doc.head ?? doc.documentElement).append(link);
|
|
3874
3894
|
swap(link);
|
|
@@ -3933,7 +3953,7 @@ function createTabIcon(env) {
|
|
|
3933
3953
|
for (const [link, { url, original }] of drawn) {
|
|
3934
3954
|
if (link.getAttribute("href") === url)
|
|
3935
3955
|
link.setAttribute("href", original);
|
|
3936
|
-
link
|
|
3956
|
+
removeMark(link, ORIGINAL_HREF);
|
|
3937
3957
|
}
|
|
3938
3958
|
drawn.clear();
|
|
3939
3959
|
added?.remove();
|
|
@@ -6,7 +6,10 @@ import {
|
|
|
6
6
|
elementSelector,
|
|
7
7
|
nearestSemanticSelector,
|
|
8
8
|
selectorTarget
|
|
9
|
-
} from "./react-
|
|
9
|
+
} from "./react-atw9y8ny.js";
|
|
10
|
+
import {
|
|
11
|
+
isOwnName
|
|
12
|
+
} from "./react-4qn9vsjw.js";
|
|
10
13
|
|
|
11
14
|
// src/grab/fiber.ts
|
|
12
15
|
var FORWARD_REF = Symbol.for("react.forward_ref");
|
|
@@ -163,7 +166,7 @@ function truncateEscaped(html, max) {
|
|
|
163
166
|
return `${whole}${SUFFIX}`.slice(0, max);
|
|
164
167
|
}
|
|
165
168
|
function isInternal(name) {
|
|
166
|
-
return name
|
|
169
|
+
return isOwnName(name) || name.startsWith("data-react-grab-");
|
|
167
170
|
}
|
|
168
171
|
var GENERATED_CLASS = [
|
|
169
172
|
/^[\w-]+__[\w-]+\.[\w-]+$/,
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
ATTRIBUTES,
|
|
4
|
+
hasMark
|
|
5
|
+
} from "./react-4qn9vsjw.js";
|
|
2
6
|
|
|
3
7
|
// src/grab/selector.ts
|
|
4
8
|
var VALUE_MAX = 120;
|
|
@@ -122,7 +126,7 @@ function nthChildSelector(element) {
|
|
|
122
126
|
function frameOf(element) {
|
|
123
127
|
try {
|
|
124
128
|
const frame = element.ownerDocument.defaultView?.frameElement ?? null;
|
|
125
|
-
return frame
|
|
129
|
+
return frame && hasMark(frame, ATTRIBUTES.frame) ? null : frame;
|
|
126
130
|
} catch {
|
|
127
131
|
return null;
|
|
128
132
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
post
|
|
4
|
-
} from "./react-
|
|
4
|
+
} from "./react-rbmk30xk.js";
|
|
5
|
+
import {
|
|
6
|
+
ATTRIBUTES,
|
|
7
|
+
hasMark,
|
|
8
|
+
isMarked
|
|
9
|
+
} from "./react-4qn9vsjw.js";
|
|
5
10
|
|
|
6
11
|
// src/ui/icons.ts
|
|
7
12
|
var SVG = "http://www.w3.org/2000/svg";
|
|
@@ -418,7 +423,7 @@ function defaultKeys(options = {}) {
|
|
|
418
423
|
settings: free(SETTINGS_KEYS)
|
|
419
424
|
};
|
|
420
425
|
}
|
|
421
|
-
var KEYS_FIELD =
|
|
426
|
+
var KEYS_FIELD = ATTRIBUTES.keys;
|
|
422
427
|
function isTyping(node) {
|
|
423
428
|
const element = node;
|
|
424
429
|
const tag = element?.tagName;
|
|
@@ -452,7 +457,8 @@ function typesInField(event) {
|
|
|
452
457
|
const target = event.composedPath?.()[0] ?? event.target;
|
|
453
458
|
if (!isEditable(target))
|
|
454
459
|
return false;
|
|
455
|
-
|
|
460
|
+
const element = target;
|
|
461
|
+
return typeof element?.hasAttribute !== "function" || !hasMark(element, KEYS_FIELD);
|
|
456
462
|
}
|
|
457
463
|
function lowerKey(key) {
|
|
458
464
|
return key === "İ" ? "i" : key.toLowerCase();
|
|
@@ -607,7 +613,7 @@ function composedParent(element) {
|
|
|
607
613
|
}
|
|
608
614
|
function isDevknobs(element) {
|
|
609
615
|
for (let current = element;current; current = composedParent(current)) {
|
|
610
|
-
if (current
|
|
616
|
+
if (isMarked(current))
|
|
611
617
|
return true;
|
|
612
618
|
}
|
|
613
619
|
return false;
|
|
@@ -675,7 +681,7 @@ function descend(start, x, y) {
|
|
|
675
681
|
continue;
|
|
676
682
|
for (let index = 0;index < children.length; index++) {
|
|
677
683
|
const child = children[index];
|
|
678
|
-
if (!child || child
|
|
684
|
+
if (!child || isMarked(child) || !holds(child, x, y))
|
|
679
685
|
continue;
|
|
680
686
|
if (isHidden(child) || isClearLayer(child))
|
|
681
687
|
continue;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
markOwn
|
|
4
|
+
} from "./react-4qn9vsjw.js";
|
|
2
5
|
|
|
3
6
|
// src/ui/copytext.ts
|
|
4
7
|
async function copyText(text) {
|
|
@@ -8,7 +11,7 @@ async function copyText(text) {
|
|
|
8
11
|
} catch {}
|
|
9
12
|
const holder = document.createElement("textarea");
|
|
10
13
|
holder.value = text;
|
|
11
|
-
holder
|
|
14
|
+
markOwn(holder, "copy");
|
|
12
15
|
holder.setAttribute("aria-hidden", "true");
|
|
13
16
|
holder.style.cssText = "position:fixed;left:-9999px;top:0;opacity:0";
|
|
14
17
|
try {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
label
|
|
4
|
-
} from "./react-
|
|
4
|
+
} from "./react-dg4bjv3j.js";
|
|
5
5
|
import {
|
|
6
6
|
frameWindow,
|
|
7
7
|
subscribe
|
|
8
|
-
} from "./react-
|
|
8
|
+
} from "./react-881wvm1z.js";
|
|
9
9
|
import {
|
|
10
10
|
inField,
|
|
11
11
|
isFunctionKey,
|
|
12
12
|
keyIs,
|
|
13
13
|
typesInField,
|
|
14
14
|
withShift
|
|
15
|
-
} from "./react-
|
|
15
|
+
} from "./react-hdneb4v3.js";
|
|
16
16
|
import {
|
|
17
17
|
addStyle,
|
|
18
18
|
isDevknobsFrame,
|
|
@@ -20,10 +20,11 @@ import {
|
|
|
20
20
|
post,
|
|
21
21
|
readMessage,
|
|
22
22
|
systemMedia
|
|
23
|
-
} from "./react-
|
|
23
|
+
} from "./react-rbmk30xk.js";
|
|
24
24
|
import {
|
|
25
|
-
__require
|
|
26
|
-
|
|
25
|
+
__require,
|
|
26
|
+
markOwn
|
|
27
|
+
} from "./react-4qn9vsjw.js";
|
|
27
28
|
|
|
28
29
|
// src/grab/keys.ts
|
|
29
30
|
var HOLD = 100;
|
|
@@ -154,7 +155,7 @@ function systemScheme() {
|
|
|
154
155
|
if (own)
|
|
155
156
|
return own.scheme;
|
|
156
157
|
const host = document.createElement("div");
|
|
157
|
-
host
|
|
158
|
+
markOwn(host, "probe");
|
|
158
159
|
host.style.cssText = "position:fixed;width:0;height:0;overflow:hidden;pointer-events:none";
|
|
159
160
|
const root = host.attachShadow({ mode: "open" });
|
|
160
161
|
addStyle(root, "i{display:block;width:0}@media (prefers-color-scheme: dark){i{width:1px}}");
|
|
@@ -165,7 +166,7 @@ function systemScheme() {
|
|
|
165
166
|
host.remove();
|
|
166
167
|
return dark ? "dark" : "light";
|
|
167
168
|
}
|
|
168
|
-
function createGrab(options = {}, loadMode = () => import("./index-
|
|
169
|
+
function createGrab(options = {}, loadMode = () => import("./index-qz04adp5.js")) {
|
|
169
170
|
const keyNow = options.key ?? defaultGrabKey;
|
|
170
171
|
const { purpose } = options;
|
|
171
172
|
const channel = purpose?.channel ?? "grab";
|
|
@@ -374,7 +375,7 @@ function held(view) {
|
|
|
374
375
|
return null;
|
|
375
376
|
}
|
|
376
377
|
}
|
|
377
|
-
function createInspect(options = {}, load = () => import("./index-
|
|
378
|
+
function createInspect(options = {}, load = () => import("./index-qz04adp5.js"), frameOf = frameWindow) {
|
|
378
379
|
const inFrame = isDevknobsFrame();
|
|
379
380
|
const listeners = new Set;
|
|
380
381
|
let outliner = null;
|
|
@@ -482,7 +483,7 @@ async function copyText(text, data = { "text/plain": text }) {
|
|
|
482
483
|
};
|
|
483
484
|
const textarea = document.createElement("textarea");
|
|
484
485
|
textarea.value = text;
|
|
485
|
-
textarea
|
|
486
|
+
markOwn(textarea, "grab");
|
|
486
487
|
textarea.setAttribute("aria-hidden", "true");
|
|
487
488
|
textarea.style.cssText = "position:fixed;left:-9999px;top:0;opacity:0";
|
|
488
489
|
document.addEventListener("copy", onCopy);
|