@vinena/knobs 0.5.3 → 0.6.0
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 +27 -0
- package/README.md +7 -6
- package/dist/context-amfyasb5.js +23 -0
- package/dist/context-svtr7vwt.js +22 -0
- package/dist/early.global.js +5 -5
- package/dist/edit/css.d.ts +59 -0
- package/dist/edit/html.d.ts +91 -0
- package/dist/edit/keep.d.ts +175 -0
- package/dist/edit/log.d.ts +107 -0
- package/dist/edit/replay.d.ts +28 -0
- package/dist/edit/risk.d.ts +33 -0
- package/dist/edit/rule.d.ts +31 -0
- package/dist/edit/source.d.ts +12 -0
- package/dist/edit/text.d.ts +66 -0
- package/dist/elementsview-fyc06wjt.js +3702 -0
- package/dist/elementsview-k6zvvcne.js +3701 -0
- package/dist/engine/dock.d.ts +3 -4
- package/dist/engine/frame.d.ts +1 -1
- package/dist/engine/style.d.ts +15 -0
- package/dist/{framekit-cjz0e4y8.js → framekit-622h6w1f.js} +54 -47
- package/dist/{framekit-yk1jxjv7.js → framekit-yx612r28.js} +54 -47
- package/dist/index-0zp9py56.js +859 -0
- package/dist/{index-prjpx67p.js → index-1mstjadm.js} +126 -2167
- package/dist/{index-begsqdm0.js → index-4a4x1bt2.js} +1 -1
- package/dist/index-58jdczmj.js +44 -0
- package/dist/index-5tv6sr74.js +23 -0
- package/dist/index-6bc2ztfd.js +688 -0
- package/dist/index-7cb4x1vj.js +1885 -0
- package/dist/index-a974q3aa.js +34 -0
- package/dist/{index-q73py563.js → index-aymfvd8s.js} +1 -1
- package/dist/{index-zt3rheck.js → index-aynkv7qk.js} +11 -8
- package/dist/{index-p57fdttx.js → index-dzm8ywq0.js} +492 -2365
- package/dist/{index-9jhatmky.js → index-f60yax1j.js} +13 -8
- package/dist/index-f67wctn3.js +1858 -0
- package/dist/{index-vgfn2n1h.js → index-ftjdt358.js} +8 -171
- package/dist/{index-j1h13ahg.js → index-gm51cthv.js} +2 -45
- package/dist/index-kfdzsyyw.js +1859 -0
- package/dist/index-t4kssacm.js +208 -0
- package/dist/index-v0ht9q0g.js +1518 -0
- package/dist/{index-6wbgqkdz.js → index-x59vz1xx.js} +247 -905
- package/dist/index-xh39jtkq.js +32 -0
- package/dist/index-yb7fc59g.js +718 -0
- package/dist/index-zd6adby9.js +496 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.global.js +410 -152
- package/dist/index.js +504 -482
- package/dist/react-0wepdf60.js +1519 -0
- package/dist/{react-gefkdkdz.js → react-1gqwa2yw.js} +1 -1
- package/dist/{index-sn2y6j09.js → react-3mfz1x2a.js} +126 -2167
- package/dist/react-4rbjw9af.js +33 -0
- package/dist/react-5rq7bnsy.js +210 -0
- package/dist/react-6bz05qk1.js +860 -0
- package/dist/{react-qgz9afa2.js → react-6fnxxs30.js} +8 -171
- package/dist/react-6q2cw2ya.js +689 -0
- package/dist/{react-7vjfsh40.js → react-6t4dbdzn.js} +11 -8
- package/dist/react-88es9b5q.js +719 -0
- package/dist/react-97b5b8j4.js +46 -0
- package/dist/{react-mmq2zya3.js → react-bxzn8vq5.js} +1 -1
- package/dist/{react-3rhdj2k1.js → react-cs62p9qh.js} +62 -720
- package/dist/react-ethftdxp.js +497 -0
- package/dist/react-fp73vhyd.js +36 -0
- package/dist/{react-qfpg79hs.js → react-me102s1a.js} +2 -45
- package/dist/react-t2qnewz2.js +24 -0
- package/dist/react-ttj8f9qp.js +1886 -0
- package/dist/{react-806qmkyz.js → react-v8497a41.js} +13 -8
- package/dist/{react-6tss0r9f.js → react-wqn4sx0n.js} +265 -2137
- package/dist/react.js +500 -482
- package/dist/replay-j18rw92k.js +258 -0
- package/dist/replay-vtg0vqj2.js +257 -0
- package/dist/{storageview-7cv0vpdm.js → storageview-6xj7zb63.js} +11 -7
- package/dist/{storageview-dyhpgt8f.js → storageview-pzn8yaad.js} +11 -7
- package/dist/styles/force.d.ts +66 -0
- package/dist/ui/bindings.d.ts +31 -5
- package/dist/ui/changes.d.ts +49 -0
- package/dist/ui/cssauto.d.ts +119 -0
- package/dist/ui/cssedit.d.ts +80 -0
- package/dist/ui/domedit.d.ts +99 -0
- package/dist/ui/domtree.d.ts +26 -1
- package/dist/ui/elementsview.d.ts +19 -2
- package/dist/ui/htmledit.d.ts +62 -0
- package/dist/ui/inspector.d.ts +6 -1
- package/dist/ui/keys.d.ts +12 -8
- package/dist/ui/pane.d.ts +0 -2
- package/dist/ui/panel.d.ts +3 -0
- package/dist/ui/prefs.d.ts +30 -10
- package/dist/ui/settings.d.ts +2 -0
- package/dist/ui/size.d.ts +14 -22
- package/dist/ui/stylesview.d.ts +30 -1
- package/package.json +1 -1
- package/skills/devknobs/SKILL.md +95 -0
- package/dist/elementsview-1wsxcdtj.js +0 -2874
- package/dist/elementsview-3kv34jfx.js +0 -2873
- package/dist/index-78r0f8pw.js +0 -27
- package/dist/react-adky72h9.js +0 -29
|
@@ -1,43 +1,52 @@
|
|
|
1
1
|
import {
|
|
2
|
-
DEFAULT_STATE,
|
|
3
2
|
DOT_LOOK,
|
|
4
|
-
EXITED,
|
|
5
3
|
MARK_EVENT,
|
|
4
|
+
apply as apply4,
|
|
5
|
+
apply1 as apply5,
|
|
6
|
+
apply2 as apply6,
|
|
7
|
+
apply3 as apply7,
|
|
8
|
+
drive,
|
|
9
|
+
driveUa,
|
|
10
|
+
dropEarly,
|
|
11
|
+
enableNative,
|
|
12
|
+
framing,
|
|
13
|
+
inPage,
|
|
14
|
+
keepOwn,
|
|
15
|
+
nativeEnabled,
|
|
16
|
+
nativeViewport,
|
|
17
|
+
release,
|
|
18
|
+
reset as reset3,
|
|
19
|
+
reset1 as reset4,
|
|
20
|
+
reset2 as reset5,
|
|
21
|
+
reset3 as reset6,
|
|
22
|
+
resume,
|
|
23
|
+
screenSizeOf,
|
|
24
|
+
uaPreset
|
|
25
|
+
} from "./index-7cb4x1vj.js";
|
|
26
|
+
import {
|
|
27
|
+
composedParent,
|
|
28
|
+
isDevknobs
|
|
29
|
+
} from "./index-6bc2ztfd.js";
|
|
30
|
+
import {
|
|
31
|
+
DEFAULT_STATE,
|
|
32
|
+
EXITED,
|
|
6
33
|
NOW_READERS,
|
|
7
34
|
NativeDate,
|
|
8
|
-
QUIET,
|
|
9
|
-
SHARED_VERSION,
|
|
10
|
-
__export,
|
|
11
|
-
__require,
|
|
12
35
|
addStyle,
|
|
13
36
|
apply,
|
|
14
37
|
apply1 as apply2,
|
|
15
38
|
apply2 as apply3,
|
|
16
|
-
apply3 as apply4,
|
|
17
|
-
apply4 as apply5,
|
|
18
|
-
apply5 as apply6,
|
|
19
|
-
apply6 as apply7,
|
|
20
39
|
clockOn,
|
|
21
40
|
destroy,
|
|
22
|
-
drive,
|
|
23
|
-
driveUa,
|
|
24
|
-
dropEarly,
|
|
25
|
-
enableNative,
|
|
26
41
|
ensureStyle,
|
|
27
|
-
evict,
|
|
28
42
|
framed,
|
|
29
|
-
framing,
|
|
30
43
|
hasTouch,
|
|
31
|
-
inPage,
|
|
32
44
|
isDevknobsFrame,
|
|
33
|
-
keepOwn,
|
|
34
45
|
keepPlace,
|
|
35
46
|
leaveFor,
|
|
36
47
|
load,
|
|
37
48
|
merge,
|
|
38
|
-
nativeEnabled,
|
|
39
49
|
nativeScheme,
|
|
40
|
-
nativeViewport,
|
|
41
50
|
needsFrame,
|
|
42
51
|
newer,
|
|
43
52
|
now,
|
|
@@ -46,30 +55,31 @@ import {
|
|
|
46
55
|
readMessage,
|
|
47
56
|
readNow,
|
|
48
57
|
realNow,
|
|
49
|
-
release,
|
|
50
58
|
removeStyle,
|
|
51
59
|
reset,
|
|
52
60
|
reset1 as reset2,
|
|
53
|
-
reset2 as reset3,
|
|
54
|
-
reset3 as reset4,
|
|
55
|
-
reset4 as reset5,
|
|
56
|
-
reset5 as reset6,
|
|
57
61
|
resetState,
|
|
58
62
|
resolveGeo,
|
|
59
|
-
resume,
|
|
60
63
|
save,
|
|
61
|
-
screenSizeOf,
|
|
62
64
|
setClock,
|
|
63
|
-
share,
|
|
64
|
-
shared,
|
|
65
65
|
stamped,
|
|
66
66
|
styleNode,
|
|
67
67
|
takeOver,
|
|
68
68
|
temporalNow,
|
|
69
|
-
uaPreset,
|
|
70
69
|
webStorage,
|
|
71
70
|
wrapDate
|
|
72
|
-
} from "./index-
|
|
71
|
+
} from "./index-dzm8ywq0.js";
|
|
72
|
+
import {
|
|
73
|
+
QUIET,
|
|
74
|
+
SHARED_VERSION,
|
|
75
|
+
evict,
|
|
76
|
+
share,
|
|
77
|
+
shared
|
|
78
|
+
} from "./index-a974q3aa.js";
|
|
79
|
+
import {
|
|
80
|
+
__export,
|
|
81
|
+
__require
|
|
82
|
+
} from "./index-5tv6sr74.js";
|
|
73
83
|
|
|
74
84
|
// src/engine/intl.ts
|
|
75
85
|
var SERVICES = [
|
|
@@ -1120,6 +1130,149 @@ function holdInTopLayer(host, rank) {
|
|
|
1120
1130
|
};
|
|
1121
1131
|
}
|
|
1122
1132
|
|
|
1133
|
+
// src/engine/frames.ts
|
|
1134
|
+
var kit = null;
|
|
1135
|
+
var load2 = () => import("./framekit-yx612r28.js");
|
|
1136
|
+
var loading = null;
|
|
1137
|
+
var down = false;
|
|
1138
|
+
var waiting = [];
|
|
1139
|
+
var before = null;
|
|
1140
|
+
var latest = null;
|
|
1141
|
+
var exit = null;
|
|
1142
|
+
var zoomTo = null;
|
|
1143
|
+
var askWhy = null;
|
|
1144
|
+
var framed2 = null;
|
|
1145
|
+
var loader = null;
|
|
1146
|
+
function arrived(loaded) {
|
|
1147
|
+
kit = loaded;
|
|
1148
|
+
loaded.width.onExit(exit);
|
|
1149
|
+
loaded.width.onZoom(zoomTo);
|
|
1150
|
+
loaded.width.onRefused(askWhy);
|
|
1151
|
+
loaded.width.onFramed(framed2);
|
|
1152
|
+
loaded.width.onLoader(loader);
|
|
1153
|
+
for (const run of waiting.splice(0))
|
|
1154
|
+
run(loaded);
|
|
1155
|
+
for (const state of [before, latest]) {
|
|
1156
|
+
if (!state)
|
|
1157
|
+
continue;
|
|
1158
|
+
loaded.width.apply(state);
|
|
1159
|
+
loaded.width.sync(state);
|
|
1160
|
+
}
|
|
1161
|
+
before = null;
|
|
1162
|
+
latest = null;
|
|
1163
|
+
}
|
|
1164
|
+
function loadFrames() {
|
|
1165
|
+
loading ??= load2().then(arrived);
|
|
1166
|
+
return loading;
|
|
1167
|
+
}
|
|
1168
|
+
function failed(error) {
|
|
1169
|
+
console.error("devknobs: the device frame could not load", error);
|
|
1170
|
+
down = true;
|
|
1171
|
+
before = null;
|
|
1172
|
+
latest = null;
|
|
1173
|
+
dropEarly();
|
|
1174
|
+
exit?.();
|
|
1175
|
+
}
|
|
1176
|
+
function whenIn(watch2) {
|
|
1177
|
+
if (kit)
|
|
1178
|
+
return watch2(kit);
|
|
1179
|
+
let stop = null;
|
|
1180
|
+
const run = (loaded) => {
|
|
1181
|
+
stop = watch2(loaded);
|
|
1182
|
+
};
|
|
1183
|
+
waiting.push(run);
|
|
1184
|
+
return () => {
|
|
1185
|
+
const at = waiting.indexOf(run);
|
|
1186
|
+
if (at >= 0)
|
|
1187
|
+
waiting.splice(at, 1);
|
|
1188
|
+
stop?.();
|
|
1189
|
+
};
|
|
1190
|
+
}
|
|
1191
|
+
function apply10(state) {
|
|
1192
|
+
if (kit) {
|
|
1193
|
+
kit.width.apply(state);
|
|
1194
|
+
return;
|
|
1195
|
+
}
|
|
1196
|
+
if (latest === null && !needsFrame(state)) {
|
|
1197
|
+
before = state;
|
|
1198
|
+
dropEarly();
|
|
1199
|
+
return;
|
|
1200
|
+
}
|
|
1201
|
+
if (down) {
|
|
1202
|
+
exit?.();
|
|
1203
|
+
return;
|
|
1204
|
+
}
|
|
1205
|
+
latest = state;
|
|
1206
|
+
if (!loading)
|
|
1207
|
+
loadFrames().catch(failed);
|
|
1208
|
+
}
|
|
1209
|
+
function sync(state) {
|
|
1210
|
+
kit?.width.sync(state);
|
|
1211
|
+
}
|
|
1212
|
+
function reset9() {
|
|
1213
|
+
kit?.width.reset();
|
|
1214
|
+
before = null;
|
|
1215
|
+
latest = null;
|
|
1216
|
+
}
|
|
1217
|
+
function onExit(handler) {
|
|
1218
|
+
exit = handler;
|
|
1219
|
+
kit?.width.onExit(handler);
|
|
1220
|
+
}
|
|
1221
|
+
function onZoom(handler) {
|
|
1222
|
+
zoomTo = handler;
|
|
1223
|
+
kit?.width.onZoom(handler);
|
|
1224
|
+
}
|
|
1225
|
+
function onRefused(handler) {
|
|
1226
|
+
askWhy = handler;
|
|
1227
|
+
kit?.width.onRefused(handler);
|
|
1228
|
+
}
|
|
1229
|
+
function onFramed(handler) {
|
|
1230
|
+
framed2 = handler;
|
|
1231
|
+
kit?.width.onFramed(handler);
|
|
1232
|
+
}
|
|
1233
|
+
function onLoader(handler) {
|
|
1234
|
+
loader = handler;
|
|
1235
|
+
kit?.width.onLoader(handler);
|
|
1236
|
+
}
|
|
1237
|
+
function frameWindow() {
|
|
1238
|
+
return kit?.width.frameWindow() ?? null;
|
|
1239
|
+
}
|
|
1240
|
+
function idle() {
|
|
1241
|
+
if (kit)
|
|
1242
|
+
return kit.width.idle();
|
|
1243
|
+
return latest === null;
|
|
1244
|
+
}
|
|
1245
|
+
function panelSized(glide) {
|
|
1246
|
+
kit?.width.panelSized(glide);
|
|
1247
|
+
}
|
|
1248
|
+
function zoomKey(action) {
|
|
1249
|
+
return kit?.width.zoomKey(action) ?? false;
|
|
1250
|
+
}
|
|
1251
|
+
function landSplash() {
|
|
1252
|
+
kit?.landSplash();
|
|
1253
|
+
}
|
|
1254
|
+
function takeHinge(state) {
|
|
1255
|
+
return kit?.takeHinge(state) ?? false;
|
|
1256
|
+
}
|
|
1257
|
+
function moveHinge(target) {
|
|
1258
|
+
return kit?.moveHinge(target) ?? false;
|
|
1259
|
+
}
|
|
1260
|
+
function letGo(stop) {
|
|
1261
|
+
return kit?.letGo(stop) ?? false;
|
|
1262
|
+
}
|
|
1263
|
+
function holdingHinge() {
|
|
1264
|
+
return kit?.holdingHinge() ?? false;
|
|
1265
|
+
}
|
|
1266
|
+
function foldRest() {
|
|
1267
|
+
return kit?.foldRest() ?? null;
|
|
1268
|
+
}
|
|
1269
|
+
function watchFold(watcher) {
|
|
1270
|
+
return whenIn((loaded) => loaded.watchFold(watcher));
|
|
1271
|
+
}
|
|
1272
|
+
function watchHinge(watcher) {
|
|
1273
|
+
return whenIn((loaded) => loaded.watchHinge(watcher));
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1123
1276
|
// src/engine/index.ts
|
|
1124
1277
|
var exports_engine = {};
|
|
1125
1278
|
__export(exports_engine, {
|
|
@@ -2115,13 +2268,13 @@ function start() {
|
|
|
2115
2268
|
if (shared())
|
|
2116
2269
|
return;
|
|
2117
2270
|
evict();
|
|
2118
|
-
const
|
|
2271
|
+
const framed3 = typeof window !== "undefined" && isDevknobsFrame();
|
|
2119
2272
|
const origin = typeof location === "undefined" ? "" : location.origin;
|
|
2120
2273
|
share(createRecorder({
|
|
2121
|
-
source:
|
|
2274
|
+
source: framed3 ? "frame" : "top",
|
|
2122
2275
|
clock: pageClock(),
|
|
2123
2276
|
origin,
|
|
2124
|
-
above:
|
|
2277
|
+
above: framed3 ? above : undefined
|
|
2125
2278
|
}));
|
|
2126
2279
|
}
|
|
2127
2280
|
function stop() {
|
|
@@ -2210,14 +2363,14 @@ function restore2() {
|
|
|
2210
2363
|
}
|
|
2211
2364
|
installed2 = [];
|
|
2212
2365
|
}
|
|
2213
|
-
function
|
|
2366
|
+
function apply11(value) {
|
|
2214
2367
|
on = sends(value);
|
|
2215
2368
|
if (on)
|
|
2216
2369
|
patch();
|
|
2217
2370
|
else
|
|
2218
2371
|
restore2();
|
|
2219
2372
|
}
|
|
2220
|
-
function
|
|
2373
|
+
function reset10() {
|
|
2221
2374
|
on = false;
|
|
2222
2375
|
restore2();
|
|
2223
2376
|
}
|
|
@@ -2249,7 +2402,7 @@ function connection() {
|
|
|
2249
2402
|
function readConnection(target) {
|
|
2250
2403
|
return CONNECTION_KEYS.map((key) => String(Reflect.get(target, key))).join();
|
|
2251
2404
|
}
|
|
2252
|
-
function
|
|
2405
|
+
function apply12(value) {
|
|
2253
2406
|
const wasOnline = navigator.onLine;
|
|
2254
2407
|
if (value.online === "offline")
|
|
2255
2408
|
shadow(navigator, "onLine", false);
|
|
@@ -2261,7 +2414,7 @@ function apply11(value) {
|
|
|
2261
2414
|
const target = connection();
|
|
2262
2415
|
if (!target)
|
|
2263
2416
|
return;
|
|
2264
|
-
const
|
|
2417
|
+
const before2 = readConnection(target);
|
|
2265
2418
|
if (value.type === "system") {
|
|
2266
2419
|
for (const key of ["effectiveType", "rtt", "downlink"])
|
|
2267
2420
|
unshadow(target, key);
|
|
@@ -2274,25 +2427,25 @@ function apply11(value) {
|
|
|
2274
2427
|
unshadow(target, "saveData");
|
|
2275
2428
|
else
|
|
2276
2429
|
shadow(target, "saveData", value.saveData === "on");
|
|
2277
|
-
if (readConnection(target) !==
|
|
2430
|
+
if (readConnection(target) !== before2)
|
|
2278
2431
|
target.dispatchEvent(new Event("change"));
|
|
2279
2432
|
}
|
|
2280
|
-
function
|
|
2433
|
+
function reset11() {
|
|
2281
2434
|
if (shadowed.size > 0)
|
|
2282
|
-
|
|
2435
|
+
apply12(SYSTEM);
|
|
2283
2436
|
shadowed.clear();
|
|
2284
2437
|
}
|
|
2285
2438
|
|
|
2286
2439
|
// src/engine/outlines.ts
|
|
2287
2440
|
var NAME = "outlines";
|
|
2288
|
-
function
|
|
2441
|
+
function apply13(value) {
|
|
2289
2442
|
if (!value) {
|
|
2290
|
-
|
|
2443
|
+
reset12();
|
|
2291
2444
|
return;
|
|
2292
2445
|
}
|
|
2293
2446
|
ensureStyle(NAME).textContent = "body *:not([data-devknobs],[data-devknobs] *){outline:1px solid rgba(127,127,127,.5)!important}";
|
|
2294
2447
|
}
|
|
2295
|
-
function
|
|
2448
|
+
function reset12() {
|
|
2296
2449
|
removeStyle(NAME);
|
|
2297
2450
|
}
|
|
2298
2451
|
|
|
@@ -2492,9 +2645,9 @@ function start2() {
|
|
|
2492
2645
|
});
|
|
2493
2646
|
update();
|
|
2494
2647
|
}
|
|
2495
|
-
function
|
|
2648
|
+
function apply14(value) {
|
|
2496
2649
|
if (!value) {
|
|
2497
|
-
|
|
2650
|
+
reset13();
|
|
2498
2651
|
return;
|
|
2499
2652
|
}
|
|
2500
2653
|
if (document.body)
|
|
@@ -2502,7 +2655,7 @@ function apply13(value) {
|
|
|
2502
2655
|
else
|
|
2503
2656
|
document.addEventListener("DOMContentLoaded", start2, { once: true });
|
|
2504
2657
|
}
|
|
2505
|
-
function
|
|
2658
|
+
function reset13() {
|
|
2506
2659
|
document.removeEventListener("DOMContentLoaded", start2);
|
|
2507
2660
|
if (!host)
|
|
2508
2661
|
return;
|
|
@@ -2684,11 +2837,11 @@ function start3() {
|
|
|
2684
2837
|
});
|
|
2685
2838
|
}
|
|
2686
2839
|
function whenIdle(run) {
|
|
2687
|
-
let
|
|
2840
|
+
let idle2 = 0;
|
|
2688
2841
|
let timer3 = 0;
|
|
2689
2842
|
const schedule2 = () => {
|
|
2690
2843
|
if (typeof requestIdleCallback === "function")
|
|
2691
|
-
|
|
2844
|
+
idle2 = requestIdleCallback(run, { timeout: 1000 });
|
|
2692
2845
|
else
|
|
2693
2846
|
timer3 = window.setTimeout(run, 200);
|
|
2694
2847
|
};
|
|
@@ -2698,14 +2851,14 @@ function whenIdle(run) {
|
|
|
2698
2851
|
window.addEventListener("load", schedule2, { once: true });
|
|
2699
2852
|
return () => {
|
|
2700
2853
|
window.removeEventListener("load", schedule2);
|
|
2701
|
-
if (
|
|
2702
|
-
cancelIdleCallback(
|
|
2854
|
+
if (idle2)
|
|
2855
|
+
cancelIdleCallback(idle2);
|
|
2703
2856
|
clearTimeout(timer3);
|
|
2704
2857
|
};
|
|
2705
2858
|
}
|
|
2706
|
-
function
|
|
2859
|
+
function apply15(value) {
|
|
2707
2860
|
if (!value) {
|
|
2708
|
-
|
|
2861
|
+
reset14();
|
|
2709
2862
|
return;
|
|
2710
2863
|
}
|
|
2711
2864
|
if (on2 || cancelStart)
|
|
@@ -2715,7 +2868,7 @@ function apply14(value) {
|
|
|
2715
2868
|
function pending() {
|
|
2716
2869
|
return cancelStart !== null;
|
|
2717
2870
|
}
|
|
2718
|
-
function
|
|
2871
|
+
function reset14() {
|
|
2719
2872
|
cancelStart?.();
|
|
2720
2873
|
cancelStart = null;
|
|
2721
2874
|
if (!on2)
|
|
@@ -2868,14 +3021,14 @@ function replay() {
|
|
|
2868
3021
|
var NAME2 = "spacing";
|
|
2869
3022
|
var NOT_OURS = ":not([data-devknobs],[data-devknobs] *)";
|
|
2870
3023
|
var CSS2 = `*${NOT_OURS}{line-height:1.5!important;letter-spacing:.12em!important;word-spacing:.16em!important}` + `p${NOT_OURS}{margin-bottom:2em!important}`;
|
|
2871
|
-
function
|
|
3024
|
+
function apply16(value) {
|
|
2872
3025
|
if (!value) {
|
|
2873
|
-
|
|
3026
|
+
reset15();
|
|
2874
3027
|
return;
|
|
2875
3028
|
}
|
|
2876
3029
|
ensureStyle(NAME2).textContent = CSS2;
|
|
2877
3030
|
}
|
|
2878
|
-
function
|
|
3031
|
+
function reset15() {
|
|
2879
3032
|
removeStyle(NAME2);
|
|
2880
3033
|
}
|
|
2881
3034
|
|
|
@@ -3012,7 +3165,7 @@ function createTabIcon(env) {
|
|
|
3012
3165
|
let on3 = false;
|
|
3013
3166
|
let observer3 = null;
|
|
3014
3167
|
const drawn = new Map;
|
|
3015
|
-
const
|
|
3168
|
+
const loading2 = new Map;
|
|
3016
3169
|
let added = null;
|
|
3017
3170
|
let told = false;
|
|
3018
3171
|
function iconLinks() {
|
|
@@ -3026,13 +3179,13 @@ function createTabIcon(env) {
|
|
|
3026
3179
|
return;
|
|
3027
3180
|
const mine = drawn.get(link);
|
|
3028
3181
|
const href = mine?.url === current ? mine.original : current;
|
|
3029
|
-
if (
|
|
3182
|
+
if (loading2.get(link) === href)
|
|
3030
3183
|
return;
|
|
3031
|
-
|
|
3184
|
+
loading2.set(link, href);
|
|
3032
3185
|
env.load(href).then((source) => {
|
|
3033
|
-
if (
|
|
3186
|
+
if (loading2.get(link) !== href)
|
|
3034
3187
|
return;
|
|
3035
|
-
|
|
3188
|
+
loading2.delete(link);
|
|
3036
3189
|
if (!on3 || link.getAttribute("href") !== current)
|
|
3037
3190
|
return;
|
|
3038
3191
|
const url = source ? env.render(source, iconSize(link)) : null;
|
|
@@ -3048,7 +3201,7 @@ function createTabIcon(env) {
|
|
|
3048
3201
|
});
|
|
3049
3202
|
}
|
|
3050
3203
|
function forget(link) {
|
|
3051
|
-
|
|
3204
|
+
loading2.delete(link);
|
|
3052
3205
|
const mine = drawn.get(link);
|
|
3053
3206
|
if (!mine)
|
|
3054
3207
|
return;
|
|
@@ -3132,7 +3285,7 @@ function createTabIcon(env) {
|
|
|
3132
3285
|
on3 = false;
|
|
3133
3286
|
observer3?.disconnect();
|
|
3134
3287
|
observer3 = null;
|
|
3135
|
-
|
|
3288
|
+
loading2.clear();
|
|
3136
3289
|
for (const [link, { url, original }] of drawn) {
|
|
3137
3290
|
if (link.getAttribute("href") === url)
|
|
3138
3291
|
link.setAttribute("href", original);
|
|
@@ -3168,9 +3321,9 @@ function renderPng(source, size) {
|
|
|
3168
3321
|
}
|
|
3169
3322
|
}
|
|
3170
3323
|
var live = null;
|
|
3171
|
-
function
|
|
3324
|
+
function apply17(on3) {
|
|
3172
3325
|
if (!on3) {
|
|
3173
|
-
|
|
3326
|
+
reset16();
|
|
3174
3327
|
return;
|
|
3175
3328
|
}
|
|
3176
3329
|
if (live || typeof document === "undefined")
|
|
@@ -3183,7 +3336,7 @@ function apply16(on3) {
|
|
|
3183
3336
|
});
|
|
3184
3337
|
live.start();
|
|
3185
3338
|
}
|
|
3186
|
-
function
|
|
3339
|
+
function reset16() {
|
|
3187
3340
|
live?.stop();
|
|
3188
3341
|
live = null;
|
|
3189
3342
|
}
|
|
@@ -3292,10 +3445,10 @@ function restoreAnimate() {
|
|
|
3292
3445
|
nativeAnimate = null;
|
|
3293
3446
|
patchedAnimate = null;
|
|
3294
3447
|
}
|
|
3295
|
-
function
|
|
3448
|
+
function apply18(value) {
|
|
3296
3449
|
const next = Number.isFinite(value) && value >= 0 ? value : 1;
|
|
3297
3450
|
if (next === 1) {
|
|
3298
|
-
|
|
3451
|
+
reset17();
|
|
3299
3452
|
return;
|
|
3300
3453
|
}
|
|
3301
3454
|
if (next === rate && frame2)
|
|
@@ -3314,7 +3467,7 @@ function apply17(value) {
|
|
|
3314
3467
|
if (!frame2)
|
|
3315
3468
|
frame2 = requestAnimationFrame(tick);
|
|
3316
3469
|
}
|
|
3317
|
-
function
|
|
3470
|
+
function reset17() {
|
|
3318
3471
|
rate = 1;
|
|
3319
3472
|
if (frame2) {
|
|
3320
3473
|
cancelAnimationFrame(frame2);
|
|
@@ -3333,137 +3486,6 @@ function reset16() {
|
|
|
3333
3486
|
restoreGsap();
|
|
3334
3487
|
}
|
|
3335
3488
|
|
|
3336
|
-
// src/grab/hit.ts
|
|
3337
|
-
var MAX_DEPTH = 32;
|
|
3338
|
-
var MAX_LAYERS = 8;
|
|
3339
|
-
var REPLACED = new Set([
|
|
3340
|
-
"audio",
|
|
3341
|
-
"br",
|
|
3342
|
-
"canvas",
|
|
3343
|
-
"embed",
|
|
3344
|
-
"hr",
|
|
3345
|
-
"iframe",
|
|
3346
|
-
"img",
|
|
3347
|
-
"input",
|
|
3348
|
-
"meter",
|
|
3349
|
-
"object",
|
|
3350
|
-
"progress",
|
|
3351
|
-
"select",
|
|
3352
|
-
"svg",
|
|
3353
|
-
"textarea",
|
|
3354
|
-
"video"
|
|
3355
|
-
]);
|
|
3356
|
-
var CLEAR_COLOR = /^transparent$|[,/]\s*0\)$/;
|
|
3357
|
-
function composedParent(element) {
|
|
3358
|
-
if (element.parentElement)
|
|
3359
|
-
return element.parentElement;
|
|
3360
|
-
const root = element.getRootNode?.();
|
|
3361
|
-
return root && "host" in root ? root.host : null;
|
|
3362
|
-
}
|
|
3363
|
-
function isDevknobs(element) {
|
|
3364
|
-
for (let current = element;current; current = composedParent(current)) {
|
|
3365
|
-
if (current.hasAttribute("data-devknobs"))
|
|
3366
|
-
return true;
|
|
3367
|
-
}
|
|
3368
|
-
return false;
|
|
3369
|
-
}
|
|
3370
|
-
function isRoot(element) {
|
|
3371
|
-
const tag2 = element.tagName.toLowerCase();
|
|
3372
|
-
return tag2 === "html" || tag2 === "body";
|
|
3373
|
-
}
|
|
3374
|
-
function isGrabbable(element) {
|
|
3375
|
-
return element !== null && !isRoot(element) && !isDevknobs(element);
|
|
3376
|
-
}
|
|
3377
|
-
function styleOf(element) {
|
|
3378
|
-
return element.ownerDocument.defaultView?.getComputedStyle(element) ?? null;
|
|
3379
|
-
}
|
|
3380
|
-
function inside(rect, x, y) {
|
|
3381
|
-
return x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom;
|
|
3382
|
-
}
|
|
3383
|
-
function holds(element, x, y) {
|
|
3384
|
-
if (!inside(element.getBoundingClientRect(), x, y))
|
|
3385
|
-
return false;
|
|
3386
|
-
const rects = element.getClientRects();
|
|
3387
|
-
for (let index = 0;index < rects.length; index++) {
|
|
3388
|
-
const rect = rects[index];
|
|
3389
|
-
if (rect && rect.width > 0 && rect.height > 0 && inside(rect, x, y))
|
|
3390
|
-
return true;
|
|
3391
|
-
}
|
|
3392
|
-
return false;
|
|
3393
|
-
}
|
|
3394
|
-
function area(element) {
|
|
3395
|
-
const rect = element.getBoundingClientRect();
|
|
3396
|
-
return rect.width * rect.height;
|
|
3397
|
-
}
|
|
3398
|
-
function isHidden(element) {
|
|
3399
|
-
const visibility = styleOf(element)?.visibility;
|
|
3400
|
-
return visibility !== undefined && visibility !== "visible";
|
|
3401
|
-
}
|
|
3402
|
-
function isClearLayer(element) {
|
|
3403
|
-
if (element.children.length > 0 || element.shadowRoot)
|
|
3404
|
-
return false;
|
|
3405
|
-
if (REPLACED.has(element.tagName.toLowerCase()) || element.textContent?.trim())
|
|
3406
|
-
return false;
|
|
3407
|
-
const style = styleOf(element);
|
|
3408
|
-
if (!style)
|
|
3409
|
-
return false;
|
|
3410
|
-
return style.backgroundImage === "none" && CLEAR_COLOR.test(style.backgroundColor);
|
|
3411
|
-
}
|
|
3412
|
-
function under(root, top, x, y) {
|
|
3413
|
-
if (!root.elementsFromPoint || holds(top, x, y) && !isClearLayer(top))
|
|
3414
|
-
return top;
|
|
3415
|
-
for (const element of root.elementsFromPoint(x, y).slice(0, MAX_LAYERS)) {
|
|
3416
|
-
if (element === top || !isGrabbable(element))
|
|
3417
|
-
continue;
|
|
3418
|
-
if (holds(element, x, y) && !isClearLayer(element))
|
|
3419
|
-
return element;
|
|
3420
|
-
}
|
|
3421
|
-
return top;
|
|
3422
|
-
}
|
|
3423
|
-
function descend(start4, x, y) {
|
|
3424
|
-
let current = start4;
|
|
3425
|
-
for (let depth = 0;depth < MAX_DEPTH; depth += 1) {
|
|
3426
|
-
let best = null;
|
|
3427
|
-
let smallest = Number.POSITIVE_INFINITY;
|
|
3428
|
-
for (const children of [current.children, current.shadowRoot?.children]) {
|
|
3429
|
-
if (!children)
|
|
3430
|
-
continue;
|
|
3431
|
-
for (let index = 0;index < children.length; index++) {
|
|
3432
|
-
const child = children[index];
|
|
3433
|
-
if (!child || child.hasAttribute("data-devknobs") || !holds(child, x, y))
|
|
3434
|
-
continue;
|
|
3435
|
-
if (isHidden(child) || isClearLayer(child))
|
|
3436
|
-
continue;
|
|
3437
|
-
const size = area(child);
|
|
3438
|
-
if (size > smallest)
|
|
3439
|
-
continue;
|
|
3440
|
-
best = child;
|
|
3441
|
-
smallest = size;
|
|
3442
|
-
}
|
|
3443
|
-
}
|
|
3444
|
-
if (!best)
|
|
3445
|
-
break;
|
|
3446
|
-
current = best;
|
|
3447
|
-
}
|
|
3448
|
-
return current;
|
|
3449
|
-
}
|
|
3450
|
-
function deepElementAt(root, x, y) {
|
|
3451
|
-
let element = root.elementFromPoint(x, y);
|
|
3452
|
-
while (element?.shadowRoot) {
|
|
3453
|
-
const inner = element.shadowRoot.elementFromPoint(x, y);
|
|
3454
|
-
if (!inner || inner === element)
|
|
3455
|
-
break;
|
|
3456
|
-
element = inner;
|
|
3457
|
-
}
|
|
3458
|
-
if (!isGrabbable(element))
|
|
3459
|
-
return element;
|
|
3460
|
-
return descend(under(root, element, x, y), x, y);
|
|
3461
|
-
}
|
|
3462
|
-
function grabTargetAt(root, x, y) {
|
|
3463
|
-
const element = deepElementAt(root, x, y);
|
|
3464
|
-
return isGrabbable(element) ? element : null;
|
|
3465
|
-
}
|
|
3466
|
-
|
|
3467
3489
|
// src/engine/touchpointer.ts
|
|
3468
3490
|
var SLOP = 10;
|
|
3469
3491
|
var VELOCITY_WINDOW = 100;
|
|
@@ -3837,9 +3859,9 @@ function flingStep(time) {
|
|
|
3837
3859
|
return;
|
|
3838
3860
|
const { scroller } = fling;
|
|
3839
3861
|
const step = inertiaStep(fling.velocity, Math.max(0, time - fling.at));
|
|
3840
|
-
const
|
|
3862
|
+
const before2 = [scroller.element.scrollLeft, scroller.element.scrollTop];
|
|
3841
3863
|
scrollBy(scroller, step.move.x, step.move.y);
|
|
3842
|
-
const moved = scroller.element.scrollLeft !==
|
|
3864
|
+
const moved = scroller.element.scrollLeft !== before2[0] || scroller.element.scrollTop !== before2[1];
|
|
3843
3865
|
fling.velocity = step.velocity;
|
|
3844
3866
|
fling.at = time;
|
|
3845
3867
|
if (step.done || !moved && (step.move.x !== 0 || step.move.y !== 0)) {
|
|
@@ -4073,7 +4095,7 @@ function hideCursor() {
|
|
|
4073
4095
|
handUp(mark);
|
|
4074
4096
|
unmountDot();
|
|
4075
4097
|
}
|
|
4076
|
-
function
|
|
4098
|
+
function apply19(on3) {
|
|
4077
4099
|
if (on3 === active)
|
|
4078
4100
|
return;
|
|
4079
4101
|
active = on3;
|
|
@@ -4090,8 +4112,8 @@ function apply18(on3) {
|
|
|
4090
4112
|
stopFling();
|
|
4091
4113
|
hideCursor();
|
|
4092
4114
|
}
|
|
4093
|
-
function
|
|
4094
|
-
|
|
4115
|
+
function reset18() {
|
|
4116
|
+
apply19(false);
|
|
4095
4117
|
}
|
|
4096
4118
|
function pause(on3) {
|
|
4097
4119
|
if (on3 === paused)
|
|
@@ -4107,149 +4129,6 @@ function pause(on3) {
|
|
|
4107
4129
|
showCursor();
|
|
4108
4130
|
}
|
|
4109
4131
|
|
|
4110
|
-
// src/engine/frames.ts
|
|
4111
|
-
var kit = null;
|
|
4112
|
-
var load2 = () => import("./framekit-yk1jxjv7.js");
|
|
4113
|
-
var loading = null;
|
|
4114
|
-
var down = false;
|
|
4115
|
-
var waiting = [];
|
|
4116
|
-
var before = null;
|
|
4117
|
-
var latest = null;
|
|
4118
|
-
var exit = null;
|
|
4119
|
-
var zoomTo = null;
|
|
4120
|
-
var askWhy = null;
|
|
4121
|
-
var framed2 = null;
|
|
4122
|
-
var loader = null;
|
|
4123
|
-
function arrived(loaded) {
|
|
4124
|
-
kit = loaded;
|
|
4125
|
-
loaded.width.onExit(exit);
|
|
4126
|
-
loaded.width.onZoom(zoomTo);
|
|
4127
|
-
loaded.width.onRefused(askWhy);
|
|
4128
|
-
loaded.width.onFramed(framed2);
|
|
4129
|
-
loaded.width.onLoader(loader);
|
|
4130
|
-
for (const run of waiting.splice(0))
|
|
4131
|
-
run(loaded);
|
|
4132
|
-
for (const state of [before, latest]) {
|
|
4133
|
-
if (!state)
|
|
4134
|
-
continue;
|
|
4135
|
-
loaded.width.apply(state);
|
|
4136
|
-
loaded.width.sync(state);
|
|
4137
|
-
}
|
|
4138
|
-
before = null;
|
|
4139
|
-
latest = null;
|
|
4140
|
-
}
|
|
4141
|
-
function loadFrames() {
|
|
4142
|
-
loading ??= load2().then(arrived);
|
|
4143
|
-
return loading;
|
|
4144
|
-
}
|
|
4145
|
-
function failed(error) {
|
|
4146
|
-
console.error("devknobs: the device frame could not load", error);
|
|
4147
|
-
down = true;
|
|
4148
|
-
before = null;
|
|
4149
|
-
latest = null;
|
|
4150
|
-
dropEarly();
|
|
4151
|
-
exit?.();
|
|
4152
|
-
}
|
|
4153
|
-
function whenIn(watch3) {
|
|
4154
|
-
if (kit)
|
|
4155
|
-
return watch3(kit);
|
|
4156
|
-
let stop2 = null;
|
|
4157
|
-
const run = (loaded) => {
|
|
4158
|
-
stop2 = watch3(loaded);
|
|
4159
|
-
};
|
|
4160
|
-
waiting.push(run);
|
|
4161
|
-
return () => {
|
|
4162
|
-
const at = waiting.indexOf(run);
|
|
4163
|
-
if (at >= 0)
|
|
4164
|
-
waiting.splice(at, 1);
|
|
4165
|
-
stop2?.();
|
|
4166
|
-
};
|
|
4167
|
-
}
|
|
4168
|
-
function apply19(state) {
|
|
4169
|
-
if (kit) {
|
|
4170
|
-
kit.width.apply(state);
|
|
4171
|
-
return;
|
|
4172
|
-
}
|
|
4173
|
-
if (latest === null && !needsFrame(state)) {
|
|
4174
|
-
before = state;
|
|
4175
|
-
dropEarly();
|
|
4176
|
-
return;
|
|
4177
|
-
}
|
|
4178
|
-
if (down) {
|
|
4179
|
-
exit?.();
|
|
4180
|
-
return;
|
|
4181
|
-
}
|
|
4182
|
-
latest = state;
|
|
4183
|
-
if (!loading)
|
|
4184
|
-
loadFrames().catch(failed);
|
|
4185
|
-
}
|
|
4186
|
-
function sync(state) {
|
|
4187
|
-
kit?.width.sync(state);
|
|
4188
|
-
}
|
|
4189
|
-
function reset18() {
|
|
4190
|
-
kit?.width.reset();
|
|
4191
|
-
before = null;
|
|
4192
|
-
latest = null;
|
|
4193
|
-
}
|
|
4194
|
-
function onExit(handler) {
|
|
4195
|
-
exit = handler;
|
|
4196
|
-
kit?.width.onExit(handler);
|
|
4197
|
-
}
|
|
4198
|
-
function onZoom(handler) {
|
|
4199
|
-
zoomTo = handler;
|
|
4200
|
-
kit?.width.onZoom(handler);
|
|
4201
|
-
}
|
|
4202
|
-
function onRefused(handler) {
|
|
4203
|
-
askWhy = handler;
|
|
4204
|
-
kit?.width.onRefused(handler);
|
|
4205
|
-
}
|
|
4206
|
-
function onFramed(handler) {
|
|
4207
|
-
framed2 = handler;
|
|
4208
|
-
kit?.width.onFramed(handler);
|
|
4209
|
-
}
|
|
4210
|
-
function onLoader(handler) {
|
|
4211
|
-
loader = handler;
|
|
4212
|
-
kit?.width.onLoader(handler);
|
|
4213
|
-
}
|
|
4214
|
-
function frameWindow() {
|
|
4215
|
-
return kit?.width.frameWindow() ?? null;
|
|
4216
|
-
}
|
|
4217
|
-
function idle() {
|
|
4218
|
-
if (kit)
|
|
4219
|
-
return kit.width.idle();
|
|
4220
|
-
return latest === null;
|
|
4221
|
-
}
|
|
4222
|
-
function panelSized(glide) {
|
|
4223
|
-
kit?.width.panelSized(glide);
|
|
4224
|
-
}
|
|
4225
|
-
function zoomKey(action) {
|
|
4226
|
-
return kit?.width.zoomKey(action) ?? false;
|
|
4227
|
-
}
|
|
4228
|
-
function landSplash() {
|
|
4229
|
-
kit?.landSplash();
|
|
4230
|
-
}
|
|
4231
|
-
function takeHinge(state) {
|
|
4232
|
-
return kit?.takeHinge(state) ?? false;
|
|
4233
|
-
}
|
|
4234
|
-
function moveHinge(target) {
|
|
4235
|
-
return kit?.moveHinge(target) ?? false;
|
|
4236
|
-
}
|
|
4237
|
-
function letGo(stop2) {
|
|
4238
|
-
return kit?.letGo(stop2) ?? false;
|
|
4239
|
-
}
|
|
4240
|
-
function holdingHinge() {
|
|
4241
|
-
return kit?.holdingHinge() ?? false;
|
|
4242
|
-
}
|
|
4243
|
-
function foldRest() {
|
|
4244
|
-
return kit?.foldRest() ?? null;
|
|
4245
|
-
}
|
|
4246
|
-
function watchFold(watcher) {
|
|
4247
|
-
return whenIn((loaded) => loaded.watchFold(watcher));
|
|
4248
|
-
}
|
|
4249
|
-
function watchHinge(watcher) {
|
|
4250
|
-
return whenIn((loaded) => loaded.watchHinge(watcher));
|
|
4251
|
-
}
|
|
4252
|
-
|
|
4253
4132
|
// src/engine/index.ts
|
|
4254
4133
|
var state = { ...DEFAULT_STATE };
|
|
4255
4134
|
var persist = true;
|
|
@@ -4295,28 +4174,28 @@ function applyState(next) {
|
|
|
4295
4174
|
on: touchScreen || nativeTouch,
|
|
4296
4175
|
points: !nativeTouch && uaPreset(state.ua.preset) === undefined
|
|
4297
4176
|
});
|
|
4298
|
-
|
|
4177
|
+
apply19(touchScreen && state.touchPointer);
|
|
4299
4178
|
apply5(inFrame ? screenSizeOf(state) : null);
|
|
4300
4179
|
apply6(touchScreen);
|
|
4301
|
-
|
|
4180
|
+
apply18(state.speed);
|
|
4302
4181
|
apply8(state.locale);
|
|
4303
|
-
|
|
4182
|
+
apply15(state.pseudo);
|
|
4304
4183
|
apply(state.geo);
|
|
4305
4184
|
apply9(resolveTimeZone(state.timeZone, state.geo), state.clock);
|
|
4306
|
-
|
|
4307
|
-
|
|
4185
|
+
apply11(state.clock);
|
|
4186
|
+
apply12(page.network);
|
|
4308
4187
|
apply2(page.text);
|
|
4309
4188
|
if (active2 && !inFrame)
|
|
4310
4189
|
drive(active2, state);
|
|
4311
4190
|
else if (native2 && !inFrame)
|
|
4312
4191
|
driveUa(native2, state);
|
|
4313
|
-
|
|
4192
|
+
apply16(state.spacing);
|
|
4314
4193
|
const sized2 = inFrame ? state : framing(state, active2);
|
|
4315
4194
|
apply4(!inFrame && needsFrame(sized2) ? DEFAULT_STATE.ua : state.ua);
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4195
|
+
apply10(sized2);
|
|
4196
|
+
apply14(state.overflow && !needsFrame(sized2));
|
|
4197
|
+
apply13(state.outlines);
|
|
4198
|
+
apply17(!inFrame && shownHere(state.panel.devIcon));
|
|
4320
4199
|
if (persist)
|
|
4321
4200
|
save(state);
|
|
4322
4201
|
sync(sized2);
|
|
@@ -4430,23 +4309,23 @@ function stop2() {
|
|
|
4430
4309
|
onLoader(null);
|
|
4431
4310
|
destroy();
|
|
4432
4311
|
reset6();
|
|
4433
|
-
|
|
4312
|
+
reset18();
|
|
4434
4313
|
reset4();
|
|
4435
4314
|
reset5();
|
|
4436
|
-
|
|
4315
|
+
reset17();
|
|
4437
4316
|
reset7();
|
|
4438
|
-
|
|
4317
|
+
reset14();
|
|
4439
4318
|
reset();
|
|
4440
4319
|
reset8();
|
|
4441
|
-
reset9();
|
|
4442
4320
|
reset10();
|
|
4321
|
+
reset11();
|
|
4443
4322
|
reset2();
|
|
4444
|
-
|
|
4323
|
+
reset15();
|
|
4445
4324
|
reset3();
|
|
4446
|
-
|
|
4325
|
+
reset9();
|
|
4326
|
+
reset13();
|
|
4447
4327
|
reset12();
|
|
4448
|
-
|
|
4449
|
-
reset15();
|
|
4328
|
+
reset16();
|
|
4450
4329
|
if (native2)
|
|
4451
4330
|
release(native2);
|
|
4452
4331
|
native2 = null;
|
|
@@ -4460,541 +4339,4 @@ function replay2() {
|
|
|
4460
4339
|
post(frameWindow(), { source: "devknobs", type: "replay" });
|
|
4461
4340
|
}
|
|
4462
4341
|
|
|
4463
|
-
|
|
4464
|
-
function hotkeyOf(hotkey) {
|
|
4465
|
-
return (hotkey ?? "k").toLowerCase();
|
|
4466
|
-
}
|
|
4467
|
-
var MODIFIER_NAMES = {
|
|
4468
|
-
meta: "meta",
|
|
4469
|
-
cmd: "meta",
|
|
4470
|
-
command: "meta",
|
|
4471
|
-
ctrl: "ctrl",
|
|
4472
|
-
control: "ctrl",
|
|
4473
|
-
shift: "shift",
|
|
4474
|
-
alt: "alt",
|
|
4475
|
-
option: "alt",
|
|
4476
|
-
opt: "alt"
|
|
4477
|
-
};
|
|
4478
|
-
function parseCombo(spec) {
|
|
4479
|
-
if (!spec?.trim())
|
|
4480
|
-
return null;
|
|
4481
|
-
const parsed = { meta: false, ctrl: false, shift: false, alt: false, key: "" };
|
|
4482
|
-
for (const raw of spec.split("+")) {
|
|
4483
|
-
const part = raw.trim().toLowerCase();
|
|
4484
|
-
const modifier = MODIFIER_NAMES[part];
|
|
4485
|
-
if (modifier)
|
|
4486
|
-
parsed[modifier] = true;
|
|
4487
|
-
else if (part && !parsed.key)
|
|
4488
|
-
parsed.key = part;
|
|
4489
|
-
else
|
|
4490
|
-
return null;
|
|
4491
|
-
}
|
|
4492
|
-
return parsed.key ? parsed : null;
|
|
4493
|
-
}
|
|
4494
|
-
function comboText(combo) {
|
|
4495
|
-
const names = [
|
|
4496
|
-
combo.meta && "meta",
|
|
4497
|
-
combo.ctrl && "ctrl",
|
|
4498
|
-
combo.alt && "alt",
|
|
4499
|
-
combo.shift && "shift"
|
|
4500
|
-
];
|
|
4501
|
-
return [...names.filter((name) => Boolean(name)), combo.key].join("+");
|
|
4502
|
-
}
|
|
4503
|
-
function withShift(key2) {
|
|
4504
|
-
return { meta: false, ctrl: false, shift: true, alt: false, key: key2 };
|
|
4505
|
-
}
|
|
4506
|
-
function isFunctionKey(key2) {
|
|
4507
|
-
return /^f([1-9]|1[0-2])$/.test(key2);
|
|
4508
|
-
}
|
|
4509
|
-
function deletes(key2) {
|
|
4510
|
-
return key2 === "backspace" || key2 === "delete";
|
|
4511
|
-
}
|
|
4512
|
-
var KEY_GLYPHS = { backspace: "⌫", delete: "⌦" };
|
|
4513
|
-
var KEY_NAMES = { backspace: "Backspace", delete: "Delete" };
|
|
4514
|
-
function comboLabel(combo, mac) {
|
|
4515
|
-
const key2 = combo.key;
|
|
4516
|
-
if (mac) {
|
|
4517
|
-
const marks = `${combo.ctrl ? "⌃" : ""}${combo.alt ? "⌥" : ""}${combo.shift ? "⇧" : ""}${combo.meta ? "⌘" : ""}`;
|
|
4518
|
-
return `${marks}${KEY_GLYPHS[key2] ?? key2.toUpperCase()}`;
|
|
4519
|
-
}
|
|
4520
|
-
const names = [
|
|
4521
|
-
combo.ctrl && "Ctrl",
|
|
4522
|
-
combo.alt && "Alt",
|
|
4523
|
-
combo.shift && "Shift",
|
|
4524
|
-
combo.meta && "Meta"
|
|
4525
|
-
];
|
|
4526
|
-
const name = KEY_NAMES[key2] ?? key2.toUpperCase();
|
|
4527
|
-
return [...names.filter((part) => Boolean(part)), name].join(" ");
|
|
4528
|
-
}
|
|
4529
|
-
function comboSpoken(combo) {
|
|
4530
|
-
return comboText(combo).replaceAll("+", " ");
|
|
4531
|
-
}
|
|
4532
|
-
var INSPECT_KEYS = ["c", "i", "y"];
|
|
4533
|
-
function defaultKeys(options = {}) {
|
|
4534
|
-
const panel = withShift(hotkeyOf(options.hotkey));
|
|
4535
|
-
const grab = parseCombo(options.grabKey) ?? withShift("g");
|
|
4536
|
-
const taken = [panel, grab].map(comboText);
|
|
4537
|
-
const free = INSPECT_KEYS.find((key2) => !taken.includes(comboText(withShift(key2))));
|
|
4538
|
-
return {
|
|
4539
|
-
panel,
|
|
4540
|
-
grab,
|
|
4541
|
-
inspect: withShift(free ?? "c"),
|
|
4542
|
-
replay: withShift(REPLAY_KEY),
|
|
4543
|
-
requests: withShift(REQUESTS_KEY),
|
|
4544
|
-
storage: withShift(STORAGE_KEY),
|
|
4545
|
-
reset: withShift("backspace")
|
|
4546
|
-
};
|
|
4547
|
-
}
|
|
4548
|
-
var KEYS_FIELD = "data-devknobs-keys";
|
|
4549
|
-
function isTyping(node) {
|
|
4550
|
-
const element = node;
|
|
4551
|
-
const tag2 = element?.tagName;
|
|
4552
|
-
if (tag2 === "INPUT" || tag2 === "TEXTAREA")
|
|
4553
|
-
return true;
|
|
4554
|
-
return element?.isContentEditable === true;
|
|
4555
|
-
}
|
|
4556
|
-
function focusInClosedRoot(node) {
|
|
4557
|
-
if (typeof HTMLElement === "undefined" || !(node instanceof HTMLElement))
|
|
4558
|
-
return false;
|
|
4559
|
-
if (!node.tagName.includes("-"))
|
|
4560
|
-
return false;
|
|
4561
|
-
if (node.shadowRoot !== null || node.hasAttribute("tabindex") || node.tabIndex >= 0)
|
|
4562
|
-
return false;
|
|
4563
|
-
const root = node.getRootNode();
|
|
4564
|
-
if (root instanceof Document) {
|
|
4565
|
-
if (node === root.body || node === root.documentElement)
|
|
4566
|
-
return false;
|
|
4567
|
-
} else if (!(root instanceof ShadowRoot)) {
|
|
4568
|
-
return false;
|
|
4569
|
-
}
|
|
4570
|
-
return root.activeElement === node;
|
|
4571
|
-
}
|
|
4572
|
-
function isEditable(node) {
|
|
4573
|
-
return isTyping(node) || node?.tagName === "SELECT" || focusInClosedRoot(node);
|
|
4574
|
-
}
|
|
4575
|
-
function typesInField(event) {
|
|
4576
|
-
const target = event.composedPath?.()[0] ?? event.target;
|
|
4577
|
-
if (!isEditable(target))
|
|
4578
|
-
return false;
|
|
4579
|
-
return target?.hasAttribute?.(KEYS_FIELD) !== true;
|
|
4580
|
-
}
|
|
4581
|
-
function lowerKey(key2) {
|
|
4582
|
-
return key2 === "İ" ? "i" : key2.toLowerCase();
|
|
4583
|
-
}
|
|
4584
|
-
function letterMatches(event, letter) {
|
|
4585
|
-
const key2 = lowerKey(event.key);
|
|
4586
|
-
if (key2 === letter)
|
|
4587
|
-
return true;
|
|
4588
|
-
return [...key2].length === 1 && !/\p{Script=Latin}/u.test(key2) && event.code === `Key${letter.toUpperCase()}`;
|
|
4589
|
-
}
|
|
4590
|
-
function keyIs(event, key2) {
|
|
4591
|
-
if (/^[a-z]$/.test(key2)) {
|
|
4592
|
-
return letterMatches(event, key2) || event.altKey && event.code === `Key${key2.toUpperCase()}`;
|
|
4593
|
-
}
|
|
4594
|
-
if (event.key.toLowerCase() === key2)
|
|
4595
|
-
return true;
|
|
4596
|
-
if (/^[0-9]$/.test(key2))
|
|
4597
|
-
return event.code === `Digit${key2}`;
|
|
4598
|
-
return key2 === "backspace" && event.key === "Delete";
|
|
4599
|
-
}
|
|
4600
|
-
function comboMatches(event, combo) {
|
|
4601
|
-
return event.isComposing !== true && event.metaKey === combo.meta && event.ctrlKey === combo.ctrl && event.shiftKey === combo.shift && event.altKey === combo.alt && keyIs(event, combo.key);
|
|
4602
|
-
}
|
|
4603
|
-
function actsHere(event, combo) {
|
|
4604
|
-
if (isFunctionKey(combo.key))
|
|
4605
|
-
return true;
|
|
4606
|
-
if (deletes(combo.key))
|
|
4607
|
-
return !isEditable(event.composedPath?.()[0] ?? event.target);
|
|
4608
|
-
return !typesInField(event);
|
|
4609
|
-
}
|
|
4610
|
-
var REPLAY_KEY = "r";
|
|
4611
|
-
var REQUESTS_KEY = "n";
|
|
4612
|
-
var STORAGE_KEY = "s";
|
|
4613
|
-
function keyAction(event, keys) {
|
|
4614
|
-
if (event.key === "Escape")
|
|
4615
|
-
return "close";
|
|
4616
|
-
const steps = [
|
|
4617
|
-
["toggle", keys.panel],
|
|
4618
|
-
["replay", keys.replay],
|
|
4619
|
-
["requests", keys.requests],
|
|
4620
|
-
["reset", keys.reset],
|
|
4621
|
-
["storage", keys.storage]
|
|
4622
|
-
];
|
|
4623
|
-
for (const [action, combo] of steps) {
|
|
4624
|
-
if (combo && comboMatches(event, combo))
|
|
4625
|
-
return actsHere(event, combo) ? action : null;
|
|
4626
|
-
}
|
|
4627
|
-
return null;
|
|
4628
|
-
}
|
|
4629
|
-
function isSearchKey(event) {
|
|
4630
|
-
if (event.key !== "/" || event.altKey || event.ctrlKey || event.metaKey)
|
|
4631
|
-
return false;
|
|
4632
|
-
const target = event.composedPath?.()[0] ?? event.target;
|
|
4633
|
-
return !isEditable(target);
|
|
4634
|
-
}
|
|
4635
|
-
function typeAhead(event) {
|
|
4636
|
-
if (event.altKey || event.ctrlKey || event.metaKey || event.isComposing === true)
|
|
4637
|
-
return null;
|
|
4638
|
-
if ([...event.key].length !== 1 || event.key === " " || event.key === "/")
|
|
4639
|
-
return null;
|
|
4640
|
-
return isEditable(event.composedPath?.()[0] ?? event.target) ? null : event.key;
|
|
4641
|
-
}
|
|
4642
|
-
function zoomAction(event) {
|
|
4643
|
-
if (!event.metaKey && !event.ctrlKey || event.altKey)
|
|
4644
|
-
return null;
|
|
4645
|
-
if (isTyping(event.composedPath?.()[0] ?? event.target))
|
|
4646
|
-
return null;
|
|
4647
|
-
if (event.key === "=" || event.key === "+")
|
|
4648
|
-
return "zoom-in";
|
|
4649
|
-
if (event.key === "-" || event.key === "_")
|
|
4650
|
-
return "zoom-out";
|
|
4651
|
-
return event.key === "0" ? "zoom-fit" : null;
|
|
4652
|
-
}
|
|
4653
|
-
function escapeStep(scene) {
|
|
4654
|
-
if (scene.search)
|
|
4655
|
-
return "search";
|
|
4656
|
-
if (scene.filter)
|
|
4657
|
-
return "filter";
|
|
4658
|
-
if (scene.keys)
|
|
4659
|
-
return "keys";
|
|
4660
|
-
if (scene.view)
|
|
4661
|
-
return "view";
|
|
4662
|
-
if (scene.editor)
|
|
4663
|
-
return "editor";
|
|
4664
|
-
return "panel";
|
|
4665
|
-
}
|
|
4666
|
-
function highlightAt(cursor, count2, newQuery = false) {
|
|
4667
|
-
return Math.min(Math.max(newQuery ? 0 : cursor, 0), count2 - 1);
|
|
4668
|
-
}
|
|
4669
|
-
function paletteMove(key2, cursor, count2) {
|
|
4670
|
-
if (key2 === "ArrowDown" || key2 === "ArrowUp") {
|
|
4671
|
-
return { cursor: highlightAt(cursor + (key2 === "ArrowDown" ? 1 : -1), count2), pick: false };
|
|
4672
|
-
}
|
|
4673
|
-
if (key2 === "Enter")
|
|
4674
|
-
return { cursor: highlightAt(cursor, count2), pick: count2 > 0 };
|
|
4675
|
-
return null;
|
|
4676
|
-
}
|
|
4677
|
-
function radioMove(key2, index, count2) {
|
|
4678
|
-
if (count2 === 0)
|
|
4679
|
-
return null;
|
|
4680
|
-
if (key2 === "ArrowRight" || key2 === "ArrowDown")
|
|
4681
|
-
return (index + 1) % count2;
|
|
4682
|
-
if (key2 === "ArrowLeft" || key2 === "ArrowUp")
|
|
4683
|
-
return (index - 1 + count2) % count2;
|
|
4684
|
-
if (key2 === "Home")
|
|
4685
|
-
return 0;
|
|
4686
|
-
return key2 === "End" ? count2 - 1 : null;
|
|
4687
|
-
}
|
|
4688
|
-
function forwardKeys(keys = () => defaultKeys(), open = () => true) {
|
|
4689
|
-
function onKeydown(event) {
|
|
4690
|
-
const zoom = zoomAction(event);
|
|
4691
|
-
const search = isSearchKey(event) && open();
|
|
4692
|
-
const panelAction = keyAction(event, keys());
|
|
4693
|
-
if (zoom || search || panelAction && panelAction !== "close")
|
|
4694
|
-
event.preventDefault();
|
|
4695
|
-
const action = panelAction ?? zoom ?? (search ? "search" : null);
|
|
4696
|
-
if (action)
|
|
4697
|
-
post(window.parent, { source: "devknobs", type: "key", action });
|
|
4698
|
-
}
|
|
4699
|
-
window.addEventListener("keydown", onKeydown, true);
|
|
4700
|
-
return () => window.removeEventListener("keydown", onKeydown, true);
|
|
4701
|
-
}
|
|
4702
|
-
|
|
4703
|
-
// src/ui/icons.ts
|
|
4704
|
-
var SVG = "http://www.w3.org/2000/svg";
|
|
4705
|
-
var p = (d) => ["path", { d }];
|
|
4706
|
-
var c = (cx, cy, r) => ["circle", { cx, cy, r }];
|
|
4707
|
-
var ICONS = {
|
|
4708
|
-
"half-sun-moon": [
|
|
4709
|
-
p("M12 7a5 5 0 0 0 0 10"),
|
|
4710
|
-
p("M12 3a9 9 0 0 1 0 18 12 12 0 0 0 0-18z"),
|
|
4711
|
-
p("M3 12h2"),
|
|
4712
|
-
p("m5.64 5.64 1.41 1.41"),
|
|
4713
|
-
p("m5.64 18.36 1.41-1.41")
|
|
4714
|
-
],
|
|
4715
|
-
contrast: [c("12", "12", "10"), p("M12 18a6 6 0 0 0 0-12v12z")],
|
|
4716
|
-
blend: [c("15", "9", "7"), c("9", "15", "7")],
|
|
4717
|
-
eye: [
|
|
4718
|
-
p("M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"),
|
|
4719
|
-
c("12", "12", "3")
|
|
4720
|
-
],
|
|
4721
|
-
type: [p("M12 4v16"), p("M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2"), p("M9 20h6")],
|
|
4722
|
-
wind: [
|
|
4723
|
-
p("M12.8 19.6A2 2 0 1 0 14 16H2"),
|
|
4724
|
-
p("M17.5 8a2.5 2.5 0 1 1 2 4H2"),
|
|
4725
|
-
p("M9.8 4.4A2 2 0 1 1 11 8H2")
|
|
4726
|
-
],
|
|
4727
|
-
languages: [
|
|
4728
|
-
p("m5 8 6 6"),
|
|
4729
|
-
p("m4 14 6-6 2-3"),
|
|
4730
|
-
p("M2 5h12"),
|
|
4731
|
-
p("M7 2h1"),
|
|
4732
|
-
p("m22 22-5-10-5 10"),
|
|
4733
|
-
p("M14 18h6")
|
|
4734
|
-
],
|
|
4735
|
-
"map-pin": [
|
|
4736
|
-
p("M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"),
|
|
4737
|
-
c("12", "10", "3")
|
|
4738
|
-
],
|
|
4739
|
-
clock: [c("12", "12", "10"), p("M12 6v6l4 2")],
|
|
4740
|
-
wifi: [
|
|
4741
|
-
p("M12 20h.01"),
|
|
4742
|
-
p("M2 8.82a15 15 0 0 1 20 0"),
|
|
4743
|
-
p("M5 12.859a10 10 0 0 1 14 0"),
|
|
4744
|
-
p("M8.5 16.429a5 5 0 0 1 7 0")
|
|
4745
|
-
],
|
|
4746
|
-
smartphone: [
|
|
4747
|
-
["rect", { width: "14", height: "20", x: "5", y: "2", rx: "2", ry: "2" }],
|
|
4748
|
-
p("M12 18h.01")
|
|
4749
|
-
],
|
|
4750
|
-
ruler: [
|
|
4751
|
-
p("M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z"),
|
|
4752
|
-
p("m14.5 12.5 2-2"),
|
|
4753
|
-
p("m11.5 9.5 2-2"),
|
|
4754
|
-
p("m8.5 6.5 2-2"),
|
|
4755
|
-
p("m17.5 15.5 2-2")
|
|
4756
|
-
],
|
|
4757
|
-
bug: [
|
|
4758
|
-
p("M12 20v-9"),
|
|
4759
|
-
p("M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z"),
|
|
4760
|
-
p("M14.12 3.88 16 2"),
|
|
4761
|
-
p("M21 21a4 4 0 0 0-3.81-4"),
|
|
4762
|
-
p("M21 5a4 4 0 0 1-3.55 3.97"),
|
|
4763
|
-
p("M22 13h-4"),
|
|
4764
|
-
p("M3 21a4 4 0 0 1 3.81-4"),
|
|
4765
|
-
p("M3 5a4 4 0 0 0 3.55 3.97"),
|
|
4766
|
-
p("M6 13H2"),
|
|
4767
|
-
p("m8 2 1.88 1.88"),
|
|
4768
|
-
p("M9 7.13V6a3 3 0 1 1 6 0v1.13")
|
|
4769
|
-
],
|
|
4770
|
-
"square-dashed-mouse-pointer": [
|
|
4771
|
-
p("M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z"),
|
|
4772
|
-
p("M5 3a2 2 0 0 0-2 2"),
|
|
4773
|
-
p("M19 3a2 2 0 0 1 2 2"),
|
|
4774
|
-
p("M5 21a2 2 0 0 1-2-2"),
|
|
4775
|
-
p("M9 3h1"),
|
|
4776
|
-
p("M9 21h2"),
|
|
4777
|
-
p("M14 3h1"),
|
|
4778
|
-
p("M3 9v1"),
|
|
4779
|
-
p("M21 9v2"),
|
|
4780
|
-
p("M3 14v1")
|
|
4781
|
-
],
|
|
4782
|
-
braces: [
|
|
4783
|
-
p("M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1"),
|
|
4784
|
-
p("M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1")
|
|
4785
|
-
],
|
|
4786
|
-
settings: [
|
|
4787
|
-
p("M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"),
|
|
4788
|
-
c("12", "12", "3")
|
|
4789
|
-
],
|
|
4790
|
-
"panel-right": [
|
|
4791
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
|
|
4792
|
-
p("M15 3v18")
|
|
4793
|
-
],
|
|
4794
|
-
"panel-left": [
|
|
4795
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
|
|
4796
|
-
p("M9 3v18")
|
|
4797
|
-
],
|
|
4798
|
-
"panel-right-close": [
|
|
4799
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
|
|
4800
|
-
p("M15 3v18"),
|
|
4801
|
-
p("m8 9 3 3-3 3")
|
|
4802
|
-
],
|
|
4803
|
-
"panel-right-open": [
|
|
4804
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
|
|
4805
|
-
p("M15 3v18"),
|
|
4806
|
-
p("m10 15-3-3 3-3")
|
|
4807
|
-
],
|
|
4808
|
-
pin: [
|
|
4809
|
-
p("M12 17v5"),
|
|
4810
|
-
p("M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z")
|
|
4811
|
-
],
|
|
4812
|
-
"pin-off": [
|
|
4813
|
-
p("M12 17v5"),
|
|
4814
|
-
p("M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89"),
|
|
4815
|
-
p("m2 2 20 20"),
|
|
4816
|
-
p("M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11")
|
|
4817
|
-
],
|
|
4818
|
-
eraser: [
|
|
4819
|
-
p("M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21"),
|
|
4820
|
-
p("m5.082 11.09 8.828 8.828")
|
|
4821
|
-
],
|
|
4822
|
-
"rotate-ccw": [p("M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"), p("M3 3v5h5")],
|
|
4823
|
-
"arrow-up-down": [p("m21 16-4 4-4-4"), p("M17 20V4"), p("m3 8 4-4 4 4"), p("M7 4v16")],
|
|
4824
|
-
ban: [c("12", "12", "10"), p("M4.929 4.929 19.07 19.071")],
|
|
4825
|
-
copy: [
|
|
4826
|
-
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }],
|
|
4827
|
-
p("M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2")
|
|
4828
|
-
],
|
|
4829
|
-
"refresh-cw": [
|
|
4830
|
-
p("M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"),
|
|
4831
|
-
p("M21 3v5h-5"),
|
|
4832
|
-
p("M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"),
|
|
4833
|
-
p("M8 16H3v5")
|
|
4834
|
-
],
|
|
4835
|
-
database: [
|
|
4836
|
-
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3" }],
|
|
4837
|
-
p("M3 5V19A9 3 0 0 0 21 19V5"),
|
|
4838
|
-
p("M3 12A9 3 0 0 0 21 12")
|
|
4839
|
-
],
|
|
4840
|
-
"trash-2": [
|
|
4841
|
-
p("M10 11v6"),
|
|
4842
|
-
p("M14 11v6"),
|
|
4843
|
-
p("M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"),
|
|
4844
|
-
p("M3 6h18"),
|
|
4845
|
-
p("M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2")
|
|
4846
|
-
],
|
|
4847
|
-
check: [p("M20 6 9 17l-5-5")],
|
|
4848
|
-
"chevron-left": [p("m15 18-6-6 6-6")],
|
|
4849
|
-
"chevrons-left-right": [p("m9 7-5 5 5 5"), p("m15 7 5 5-5 5")],
|
|
4850
|
-
plus: [p("M5 12h14"), p("M12 5v14")],
|
|
4851
|
-
x: [p("M18 6 6 18"), p("m6 6 12 12")],
|
|
4852
|
-
"grip-vertical": [
|
|
4853
|
-
c("9", "12", "1"),
|
|
4854
|
-
c("9", "5", "1"),
|
|
4855
|
-
c("9", "19", "1"),
|
|
4856
|
-
c("15", "12", "1"),
|
|
4857
|
-
c("15", "5", "1"),
|
|
4858
|
-
c("15", "19", "1")
|
|
4859
|
-
],
|
|
4860
|
-
image: [
|
|
4861
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }],
|
|
4862
|
-
c("9", "9", "2"),
|
|
4863
|
-
p("m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21")
|
|
4864
|
-
],
|
|
4865
|
-
film: [
|
|
4866
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
|
|
4867
|
-
p("M7 3v18"),
|
|
4868
|
-
p("M3 7.5h4"),
|
|
4869
|
-
p("M3 12h18"),
|
|
4870
|
-
p("M3 16.5h4"),
|
|
4871
|
-
p("M17 3v18"),
|
|
4872
|
-
p("M17 7.5h4"),
|
|
4873
|
-
p("M17 16.5h4")
|
|
4874
|
-
],
|
|
4875
|
-
file: [
|
|
4876
|
-
p("M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"),
|
|
4877
|
-
p("M14 2v5a1 1 0 0 0 1 1h5")
|
|
4878
|
-
],
|
|
4879
|
-
"table-2": [
|
|
4880
|
-
p("M3 9h18"),
|
|
4881
|
-
p("M9 3v18"),
|
|
4882
|
-
["rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }]
|
|
4883
|
-
],
|
|
4884
|
-
cookie: [
|
|
4885
|
-
p("M11 17h.01"),
|
|
4886
|
-
p("M11.496 2c.324-.016.558.292.529.615a4 4 0 004.235 4.368.713.713 0 01.758.757 4 4 0 004.366 4.237c.323-.03.63.204.614.527a10 10 0 01-2.915 6.566A1 1 0 114.93 4.918 10 10 0 0111.496 2"),
|
|
4887
|
-
p("M12 12h.01"),
|
|
4888
|
-
p("M16 16h.01"),
|
|
4889
|
-
p("M16 3h.01"),
|
|
4890
|
-
p("M21 4h.01"),
|
|
4891
|
-
p("M21 8h.01"),
|
|
4892
|
-
p("M7 14h.01"),
|
|
4893
|
-
p("M9 8h.01")
|
|
4894
|
-
],
|
|
4895
|
-
"hard-drive": [
|
|
4896
|
-
p("M10 16h.01"),
|
|
4897
|
-
p("M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"),
|
|
4898
|
-
p("M21.946 12.013H2.054"),
|
|
4899
|
-
p("M6 16h.01")
|
|
4900
|
-
],
|
|
4901
|
-
bookmark: [
|
|
4902
|
-
p("M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z")
|
|
4903
|
-
]
|
|
4904
|
-
};
|
|
4905
|
-
var BRANDS = {
|
|
4906
|
-
javascript: [
|
|
4907
|
-
"#F7DF1E",
|
|
4908
|
-
"M0 0h24v24H0V0zm22.034 18.276c-.175-1.095-.888-2.015-3.003-2.873-.736-.345-1.554-.585-1.797-1.14-.091-.33-.105-.51-.046-.705.15-.646.915-.84 1.515-.66.39.12.75.42.976.9 1.034-.676 1.034-.676 1.755-1.125-.27-.42-.404-.601-.586-.78-.63-.705-1.469-1.065-2.834-1.034l-.705.089c-.676.165-1.32.525-1.71 1.005-1.14 1.291-.811 3.541.569 4.471 1.365 1.02 3.361 1.244 3.616 2.205.24 1.17-.87 1.545-1.966 1.41-.811-.18-1.26-.586-1.755-1.336l-1.83 1.051c.21.48.45.689.81 1.109 1.74 1.756 6.09 1.666 6.871-1.004.029-.09.24-.705.074-1.65l.046.067zm-8.983-7.245h-2.248c0 1.938-.009 3.864-.009 5.805 0 1.232.063 2.363-.138 2.711-.33.689-1.18.601-1.566.48-.396-.196-.597-.466-.83-.855-.063-.105-.11-.196-.127-.196l-1.825 1.125c.305.63.75 1.172 1.324 1.517.855.51 2.004.675 3.207.405.783-.226 1.458-.691 1.811-1.411.51-.93.402-2.07.397-3.346.012-2.054 0-4.109 0-6.179l.004-.056z",
|
|
4909
|
-
["#000", "M1 1h22v22H1z"]
|
|
4910
|
-
],
|
|
4911
|
-
css: [
|
|
4912
|
-
"#663399",
|
|
4913
|
-
"M0 0v20.16A3.84 3.84 0 0 0 3.84 24h16.32A3.84 3.84 0 0 0 24 20.16V3.84A3.84 3.84 0 0 0 20.16 0Zm14.256 13.08c1.56 0 2.28 1.08 2.304 2.64h-1.608c.024-.288-.048-.6-.144-.84-.096-.192-.288-.264-.552-.264-.456 0-.696.264-.696.84-.024.576.288.888.768 1.08.72.288 1.608.744 1.92 1.296q.432.648.432 1.656c0 1.608-.912 2.592-2.496 2.592-1.656 0-2.4-1.032-2.424-2.688h1.68c0 .792.264 1.176.792 1.176.264 0 .456-.072.552-.24.192-.312.24-1.176-.048-1.512-.312-.408-.912-.6-1.32-.816q-.828-.396-1.224-.936c-.24-.36-.36-.888-.36-1.536 0-1.44.936-2.472 2.424-2.448m5.4 0c1.584 0 2.304 1.08 2.328 2.64h-1.608c0-.288-.048-.6-.168-.84-.096-.192-.264-.264-.528-.264-.48 0-.72.264-.72.84s.288.888.792 1.08c.696.288 1.608.744 1.92 1.296.264.432.408.984.408 1.656.024 1.608-.888 2.592-2.472 2.592-1.68 0-2.424-1.056-2.448-2.688h1.68c0 .744.264 1.176.792 1.176.264 0 .456-.072.552-.24.216-.312.264-1.176-.048-1.512-.288-.408-.888-.6-1.32-.816-.552-.264-.96-.576-1.2-.936s-.36-.888-.36-1.536c-.024-1.44.912-2.472 2.4-2.448m-11.031.018c.711-.006 1.419.198 1.839.63.432.432.672 1.128.648 1.992H9.336c.024-.456-.096-.792-.432-.96-.312-.144-.768-.048-.888.24-.12.264-.192.576-.168.864v3.504c0 .744.264 1.128.768 1.128a.65.65 0 0 0 .552-.264c.168-.24.192-.552.168-.84h1.776c.096 1.632-.984 2.712-2.568 2.688-1.536 0-2.496-.864-2.472-2.472v-4.032c0-.816.24-1.44.696-1.848.432-.408 1.146-.624 1.857-.63",
|
|
4914
|
-
["#fff", "M4 12h18v11.3H4z"]
|
|
4915
|
-
],
|
|
4916
|
-
html5: [
|
|
4917
|
-
"#E34F26",
|
|
4918
|
-
"M1.5 0h21l-1.91 21.563L11.977 24l-8.564-2.438L1.5 0zm7.031 9.75l-.232-2.718 10.059.003.23-2.622L5.412 4.41l.698 8.01h9.126l-.326 3.426-2.91.804-2.955-.81-.188-2.11H6.248l.33 4.171L12 19.351l5.379-1.443.744-8.157H8.531z",
|
|
4919
|
-
["#fff", "M5 4h14v16H5z"]
|
|
4920
|
-
],
|
|
4921
|
-
webassembly: [
|
|
4922
|
-
"#654FF0",
|
|
4923
|
-
"M14.745,0c0,0.042,0,0.085,0,0.129c0,1.52-1.232,2.752-2.752,2.752c-1.52,0-2.752-1.232-2.752-2.752 c0-0.045,0-0.087,0-0.129H0v24h24V0H14.745z M11.454,21.431l-1.169-5.783h-0.02l-1.264,5.783H7.39l-1.824-8.497h1.59l1.088,5.783 h0.02l1.311-5.783h1.487l1.177,5.854h0.02l1.242-5.854h1.561l-2.027,8.497H11.454z M20.209,21.431l-0.542-1.891h-2.861l-0.417,1.891 h-1.59l2.056-8.497h2.509l2.5,8.497H20.209z M17.812,15.028l-0.694,3.118h2.159l-0.796-3.118H17.812z",
|
|
4924
|
-
["#fff", "M4 12h19v10H4z"]
|
|
4925
|
-
],
|
|
4926
|
-
json: [
|
|
4927
|
-
"currentColor",
|
|
4928
|
-
"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"
|
|
4929
|
-
]
|
|
4930
|
-
};
|
|
4931
|
-
var ROW_ICONS = {
|
|
4932
|
-
scheme: "half-sun-moon",
|
|
4933
|
-
contrast: "contrast",
|
|
4934
|
-
transparency: "blend",
|
|
4935
|
-
vision: "eye",
|
|
4936
|
-
text: "type",
|
|
4937
|
-
motion: "wind",
|
|
4938
|
-
locale: "languages",
|
|
4939
|
-
location: "map-pin",
|
|
4940
|
-
clock: "clock",
|
|
4941
|
-
network: "wifi",
|
|
4942
|
-
device: "smartphone",
|
|
4943
|
-
viewport: "ruler",
|
|
4944
|
-
debug: "bug"
|
|
4945
|
-
};
|
|
4946
|
-
function rowIcon(row) {
|
|
4947
|
-
return row.action ? row.action.icon : ROW_ICONS[row.id];
|
|
4948
|
-
}
|
|
4949
|
-
var BINDING_ICONS = {
|
|
4950
|
-
panel: "panel-right-open",
|
|
4951
|
-
grab: "square-dashed-mouse-pointer",
|
|
4952
|
-
inspect: "braces",
|
|
4953
|
-
replay: "rotate-ccw",
|
|
4954
|
-
requests: "arrow-up-down",
|
|
4955
|
-
storage: "database",
|
|
4956
|
-
reset: "eraser"
|
|
4957
|
-
};
|
|
4958
|
-
function frame3(size) {
|
|
4959
|
-
const svg = document.createElementNS(SVG, "svg");
|
|
4960
|
-
svg.setAttribute("class", "glyph");
|
|
4961
|
-
svg.setAttribute("viewBox", "0 0 24 24");
|
|
4962
|
-
svg.setAttribute("width", String(size));
|
|
4963
|
-
svg.setAttribute("height", String(size));
|
|
4964
|
-
svg.setAttribute("aria-hidden", "true");
|
|
4965
|
-
return svg;
|
|
4966
|
-
}
|
|
4967
|
-
function icon(name, size = 14) {
|
|
4968
|
-
const svg = frame3(size);
|
|
4969
|
-
svg.setAttribute("fill", "none");
|
|
4970
|
-
svg.setAttribute("stroke", "currentColor");
|
|
4971
|
-
svg.setAttribute("stroke-width", "1.5");
|
|
4972
|
-
svg.setAttribute("stroke-linecap", "round");
|
|
4973
|
-
svg.setAttribute("stroke-linejoin", "round");
|
|
4974
|
-
for (const [tag2, attributes2] of ICONS[name]) {
|
|
4975
|
-
const shape = document.createElementNS(SVG, tag2);
|
|
4976
|
-
for (const [key2, value] of Object.entries(attributes2))
|
|
4977
|
-
shape.setAttribute(key2, value);
|
|
4978
|
-
svg.append(shape);
|
|
4979
|
-
}
|
|
4980
|
-
return svg;
|
|
4981
|
-
}
|
|
4982
|
-
function brand(name, size = 14) {
|
|
4983
|
-
const svg = frame3(size);
|
|
4984
|
-
const [fill, d, behind] = BRANDS[name];
|
|
4985
|
-
for (const [color, path] of behind ? [behind, [fill, d]] : [[fill, d]]) {
|
|
4986
|
-
const shape = document.createElementNS(SVG, "path");
|
|
4987
|
-
shape.setAttribute("fill", color);
|
|
4988
|
-
shape.setAttribute("d", path);
|
|
4989
|
-
svg.append(shape);
|
|
4990
|
-
}
|
|
4991
|
-
return svg;
|
|
4992
|
-
}
|
|
4993
|
-
function isBrand(name) {
|
|
4994
|
-
return name in BRANDS;
|
|
4995
|
-
}
|
|
4996
|
-
function glyph(name, size = 14) {
|
|
4997
|
-
return isBrand(name) ? brand(name, size) : icon(name, size);
|
|
4998
|
-
}
|
|
4999
|
-
|
|
5000
|
-
export { BODY_CAP, READ_MS, requestLog, sends, canonicalTag, LOCALE_PRESETS, overflowCount, onCount, devIconShown, devIconFor, SPEED_MIN, SPEED_MAX, TIME_ZONE_PRESETS, canonicalZone, resolveTimeZone, composedParent, isDevknobs, isGrabbable, grabTargetAt, LAYER, HOST_RESET, holdInTopLayer, pause, frameWindow, panelSized, zoomKey, landSplash, takeHinge, moveHinge, letGo, holdingHinge, foldRest, watchFold, watchHinge, getState, subscribe, setNative, hostSendsUa, nativeSwitch, setState, ready, watchPanel, keepPlace2 as keepPlace, reset19 as reset, start4 as start, stop2 as stop, replay2 as replay, exports_engine, parseCombo, comboText, withShift, isFunctionKey, comboLabel, comboSpoken, defaultKeys, KEYS_FIELD, typesInField, lowerKey, keyIs, keyAction, isSearchKey, typeAhead, zoomAction, escapeStep, highlightAt, paletteMove, radioMove, forwardKeys, ROW_ICONS, rowIcon, BINDING_ICONS, icon, glyph };
|
|
4342
|
+
export { BODY_CAP, READ_MS, requestLog, sends, canonicalTag, LOCALE_PRESETS, overflowCount, onCount, devIconShown, devIconFor, SPEED_MIN, SPEED_MAX, TIME_ZONE_PRESETS, canonicalZone, resolveTimeZone, LAYER, HOST_RESET, holdInTopLayer, pause, frameWindow, panelSized, zoomKey, landSplash, takeHinge, moveHinge, letGo, holdingHinge, foldRest, watchFold, watchHinge, getState, subscribe, setNative, hostSendsUa, nativeSwitch, setState, ready, watchPanel, keepPlace2 as keepPlace, reset19 as reset, start4 as start, stop2 as stop, replay2 as replay, exports_engine };
|