@nsnanocat/preference-panes 0.2.0 → 0.3.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/README.md +58 -103
- package/dist/preference-panes.mjs +762 -1100
- package/dist/preference-panes.request.js +168 -571
- package/package.json +64 -64
- package/src/SettingsHandler.mjs +127 -123
- package/src/browser/client.mjs +218 -102
- package/src/browser/index.d.ts +141 -20
- package/src/browser/index.mjs +5 -0
- package/src/browser/panel.css +98 -84
- package/src/browser/panel.mjs +423 -272
- package/src/index.d.ts +143 -54
- package/src/index.mjs +5 -0
- package/src/lib/boxjs.mjs +117 -104
- package/src/lib/settings-path.mjs +31 -11
- package/src/proxy/request.mjs +23 -14
package/src/browser/panel.css
CHANGED
|
@@ -1,126 +1,140 @@
|
|
|
1
1
|
.pp-panel {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
font:
|
|
3
|
+
15px / 1.5 system-ui,
|
|
4
|
+
sans-serif;
|
|
5
|
+
color: var(--pp-text, #18191c);
|
|
6
|
+
background: var(--pp-background, #f6f7f8);
|
|
7
|
+
max-width: 760px;
|
|
8
|
+
margin: auto;
|
|
9
|
+
position: relative;
|
|
10
10
|
}
|
|
11
11
|
.pp-panel * {
|
|
12
|
-
|
|
12
|
+
box-sizing: border-box;
|
|
13
13
|
}
|
|
14
14
|
.pp-header {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: 12px;
|
|
18
|
+
padding: 12px 16px;
|
|
19
|
+
background: var(--pp-surface, #fff);
|
|
20
20
|
}
|
|
21
21
|
.pp-title {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
font-size: 18px;
|
|
23
|
+
margin: 0;
|
|
24
|
+
overflow-wrap: anywhere;
|
|
25
|
+
min-width: 0;
|
|
26
26
|
}
|
|
27
27
|
.pp-module-info {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
display: flex;
|
|
29
|
+
gap: 12px;
|
|
30
|
+
margin-bottom: 16px;
|
|
31
31
|
}
|
|
32
32
|
.pp-module-icon {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
width: 48px;
|
|
34
|
+
height: 48px;
|
|
35
|
+
flex: none;
|
|
36
|
+
object-fit: contain;
|
|
37
37
|
}
|
|
38
38
|
.pp-module-details {
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
min-width: 0;
|
|
40
|
+
overflow-wrap: anywhere;
|
|
41
41
|
}
|
|
42
42
|
.pp-module-source {
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
color: inherit;
|
|
44
|
+
text-decoration: underline;
|
|
45
45
|
}
|
|
46
46
|
.pp-viewport {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
max-height: 80vh;
|
|
48
|
+
overflow: auto;
|
|
49
|
+
padding: 16px;
|
|
50
50
|
}
|
|
51
51
|
.pp-panel button {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
font: inherit;
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
border: 1px solid var(--pp-border, #d8dce0);
|
|
55
|
+
border-radius: 8px;
|
|
56
|
+
padding: 8px 12px;
|
|
57
|
+
color: inherit;
|
|
58
|
+
background: var(--pp-surface, #fff);
|
|
59
59
|
}
|
|
60
60
|
.pp-panel button:disabled {
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
opacity: 0.45;
|
|
62
|
+
cursor: default;
|
|
63
63
|
}
|
|
64
64
|
.pp-field {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
margin: 0 0 16px;
|
|
66
|
+
padding: 16px;
|
|
67
|
+
border: 1px solid var(--pp-border, #d8dce0);
|
|
68
|
+
border-radius: 10px;
|
|
69
|
+
background: var(--pp-surface, #fff);
|
|
70
|
+
min-width: 0;
|
|
71
71
|
}
|
|
72
72
|
.pp-description {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
font-size: 13px;
|
|
74
|
+
opacity: 0.7;
|
|
75
|
+
margin: 0 0 8px;
|
|
76
|
+
white-space: pre-wrap;
|
|
77
|
+
overflow-wrap: anywhere;
|
|
78
78
|
}
|
|
79
79
|
.pp-input:not([type="checkbox"]) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
80
|
+
width: 100%;
|
|
81
|
+
font: inherit;
|
|
82
|
+
padding: 8px;
|
|
83
|
+
border: 1px solid var(--pp-border, #d8dce0);
|
|
84
|
+
border-radius: 6px;
|
|
85
|
+
background: var(--pp-surface, #fff);
|
|
86
|
+
color: inherit;
|
|
87
87
|
}
|
|
88
88
|
.pp-choice {
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
display: block;
|
|
90
|
+
margin: 6px 0;
|
|
91
91
|
}
|
|
92
92
|
.pp-choice input {
|
|
93
|
-
|
|
93
|
+
margin-right: 8px;
|
|
94
94
|
}
|
|
95
95
|
.pp-actions {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
display: flex;
|
|
97
|
+
flex-wrap: wrap;
|
|
98
|
+
gap: 8px;
|
|
99
|
+
margin-top: 12px;
|
|
100
|
+
}
|
|
101
|
+
.pp-maintenance {
|
|
102
|
+
border-top: 1px solid var(--pp-border, #d8dce0);
|
|
103
|
+
padding-top: 16px;
|
|
104
|
+
}
|
|
105
|
+
.pp-cache {
|
|
106
|
+
max-height: 320px;
|
|
107
|
+
overflow: auto;
|
|
108
|
+
white-space: pre-wrap;
|
|
109
|
+
overflow-wrap: anywhere;
|
|
110
|
+
}
|
|
111
|
+
.pp-panel .pp-danger {
|
|
112
|
+
color: #d34242;
|
|
99
113
|
}
|
|
100
114
|
.pp-toast {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
115
|
+
position: fixed;
|
|
116
|
+
bottom: 32px;
|
|
117
|
+
left: 50%;
|
|
118
|
+
transform: translateX(-50%);
|
|
119
|
+
padding: 10px 18px;
|
|
120
|
+
border-radius: 10px;
|
|
121
|
+
background: #252525;
|
|
122
|
+
color: #fff;
|
|
123
|
+
max-width: 90vw;
|
|
124
|
+
z-index: 1000;
|
|
111
125
|
}
|
|
112
126
|
.pp-toast[data-kind="error"] {
|
|
113
|
-
|
|
127
|
+
background: #8d2424;
|
|
114
128
|
}
|
|
115
129
|
.pp-panel :focus-visible {
|
|
116
|
-
|
|
117
|
-
|
|
130
|
+
outline: 2px solid #008ac5;
|
|
131
|
+
outline-offset: 2px;
|
|
118
132
|
}
|
|
119
133
|
@media (prefers-color-scheme: dark) {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
134
|
+
.pp-panel {
|
|
135
|
+
--pp-text: #eee;
|
|
136
|
+
--pp-background: #18191c;
|
|
137
|
+
--pp-surface: #25262a;
|
|
138
|
+
--pp-border: #47494e;
|
|
139
|
+
}
|
|
126
140
|
}
|