@objectivex666/dsh-settings-search 1.1.0 → 1.1.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/dsh-settings-search.js +9 -10
- package/lib/client.js +13 -12
- package/package.json +1 -1
package/dsh-settings-search.js
CHANGED
|
@@ -46,14 +46,13 @@ return {
|
|
|
46
46
|
|
|
47
47
|
styles.insert(`
|
|
48
48
|
.sss-wrap { position: relative; display: flex; flex-direction: column; gap: 8px; }
|
|
49
|
-
.sss-title { font-size: 16px; font-weight:
|
|
50
|
-
.sss-box {
|
|
51
|
-
.sss-icon {
|
|
52
|
-
.sss-input {
|
|
53
|
-
.sss-input
|
|
54
|
-
.sss-
|
|
55
|
-
.sss-clear {
|
|
56
|
-
.sss-clear:hover { color: var(--dsw-alias-label-primary); }
|
|
49
|
+
.sss-title { font-size: 16px; font-weight: 600; line-height: 24px; color: var(--dsw-alias-label-primary); }
|
|
50
|
+
.sss-box { display: flex; align-items: center; gap: 6px; width: 100%; box-sizing: border-box; height: 32px; padding: 0 8px; border: 1px solid var(--dsw-alias-border-l2); border-radius: 8px; background: var(--dsw-alias-bg-layer-1); }
|
|
51
|
+
.sss-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; color: var(--dsw-alias-label-tertiary); }
|
|
52
|
+
.sss-input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 14px; line-height: 22px; color: var(--dsw-alias-label-primary); }
|
|
53
|
+
.sss-input::placeholder { color: var(--dsw-alias-label-dimmed); }
|
|
54
|
+
.sss-clear { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; padding: 0; border: none; border-radius: 4px; background: transparent; color: var(--dsw-alias-label-secondary); font-size: 12px; line-height: 1; cursor: pointer; }
|
|
55
|
+
.sss-clear:hover { color: var(--dsw-alias-label-primary); background: var(--dsw-alias-interactive-bg-hover); }
|
|
57
56
|
.sss-pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20; background: var(--dsw-alias-bg-overlay); border: 1px solid var(--dsw-alias-border-l1); border-radius: 10px; box-shadow: var(--dsw-shadow-lv3); padding: 6px; max-height: 300px; overflow: auto; }
|
|
58
57
|
.sss-groups { display: flex; flex-direction: column; gap: 8px; }
|
|
59
58
|
.sss-group-title { font-size: 11px; color: var(--dsw-alias-label-secondary); letter-spacing: .05em; padding: 2px 6px; }
|
|
@@ -82,8 +81,8 @@ return {
|
|
|
82
81
|
const SearchIcon = React.createElement('svg', {
|
|
83
82
|
className: 'sss-icon',
|
|
84
83
|
viewBox: '0 0 16.5 16.5',
|
|
85
|
-
width:
|
|
86
|
-
height:
|
|
84
|
+
width: 16,
|
|
85
|
+
height: 16,
|
|
87
86
|
xmlns: 'http://www.w3.org/2000/svg',
|
|
88
87
|
'aria-hidden': 'true',
|
|
89
88
|
}, [
|
package/lib/client.js
CHANGED
|
@@ -45,14 +45,13 @@ window.__ModuleLoader__.load({
|
|
|
45
45
|
|
|
46
46
|
const CSS = `
|
|
47
47
|
.sss-wrap { position: relative; display: flex; flex-direction: column; gap: 8px; }
|
|
48
|
-
.sss-title { font-size: 16px; font-weight:
|
|
49
|
-
.sss-box {
|
|
50
|
-
.sss-icon {
|
|
51
|
-
.sss-input {
|
|
52
|
-
.sss-input
|
|
53
|
-
.sss-
|
|
54
|
-
.sss-clear {
|
|
55
|
-
.sss-clear:hover { color: var(--dsw-alias-label-primary); }
|
|
48
|
+
.sss-title { font-size: 16px; font-weight: 600; line-height: 24px; color: var(--dsw-alias-label-primary); }
|
|
49
|
+
.sss-box { display: flex; align-items: center; gap: 6px; width: 100%; box-sizing: border-box; height: 32px; padding: 0 8px; border: 1px solid var(--dsw-alias-border-l2); border-radius: 8px; background: var(--dsw-alias-bg-layer-1); }
|
|
50
|
+
.sss-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; color: var(--dsw-alias-label-tertiary); }
|
|
51
|
+
.sss-input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 14px; line-height: 22px; color: var(--dsw-alias-label-primary); }
|
|
52
|
+
.sss-input::placeholder { color: var(--dsw-alias-label-dimmed); }
|
|
53
|
+
.sss-clear { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; padding: 0; border: none; border-radius: 4px; background: transparent; color: var(--dsw-alias-label-secondary); font-size: 12px; line-height: 1; cursor: pointer; }
|
|
54
|
+
.sss-clear:hover { color: var(--dsw-alias-label-primary); background: var(--dsw-alias-interactive-bg-hover); }
|
|
56
55
|
.sss-pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20; background: var(--dsw-alias-bg-overlay); border: 1px solid var(--dsw-alias-border-l1); border-radius: 10px; box-shadow: var(--dsw-shadow-lv3); padding: 6px; max-height: 300px; overflow: auto; }
|
|
57
56
|
.sss-groups { display: flex; flex-direction: column; gap: 8px; }
|
|
58
57
|
.sss-group-title { font-size: 11px; color: var(--dsw-alias-label-secondary); letter-spacing: .05em; padding: 2px 6px; }
|
|
@@ -88,8 +87,10 @@ window.__ModuleLoader__.load({
|
|
|
88
87
|
function apply(ctx) {
|
|
89
88
|
ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'settings-search: dictionaries')
|
|
90
89
|
const t = ctx.locale.bind(NS)
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
ctx.effect(() => {
|
|
91
|
+
const remove = installStyles()
|
|
92
|
+
return () => { if (typeof remove === 'function') remove() }
|
|
93
|
+
}, 'settings-search: styles')
|
|
93
94
|
|
|
94
95
|
const readSections = () => ctx.slots.entries('settings.section')
|
|
95
96
|
.filter((e) => e.options.id !== 'settings-search')
|
|
@@ -102,8 +103,8 @@ window.__ModuleLoader__.load({
|
|
|
102
103
|
const SearchIcon = React.createElement('svg', {
|
|
103
104
|
className: 'sss-icon',
|
|
104
105
|
viewBox: '0 0 16.5 16.5',
|
|
105
|
-
width:
|
|
106
|
-
height:
|
|
106
|
+
width: 16,
|
|
107
|
+
height: 16,
|
|
107
108
|
xmlns: 'http://www.w3.org/2000/svg',
|
|
108
109
|
'aria-hidden': 'true',
|
|
109
110
|
}, [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@objectivex666/dsh-settings-search",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "DSH settings panel search plugin – instantly filter setting sections and general items with navigation guidance. Installable via `dsh plugin add`.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|