dsh-sidebar-browser-agent 0.2.8 → 0.2.9

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.9
4
+
5
+ - Polished the official-style plugin page rhythm: field/row spacing, tertiary
6
+ 12px hints, the same input surface and radius the built-in settings pages
7
+ use, and the shared form footer as the only save action.
8
+
3
9
  ## 0.2.8
4
10
 
5
11
  - The plugin page now follows the official plugin-page style: the configuration
package/lib/client.js CHANGED
@@ -47,7 +47,7 @@ window.__ModuleLoader__.load({
47
47
  const BASE_BACKOFF_MS = 400
48
48
  const MAX_EVAL_CHARS = 100_000
49
49
  /** Plugin version reported by diagnostics; keep in sync with package.json. */
50
- const PLUGIN_VERSION = '0.2.8'
50
+ const PLUGIN_VERSION = '0.2.9'
51
51
  const MAX_SCREENSHOT_WIDTH = 1_400
52
52
  const MAX_SCREENSHOT_BASE64 = 12_000_000
53
53
  /**
@@ -1227,12 +1227,22 @@ window.__ModuleLoader__.load({
1227
1227
  font: 'inherit',
1228
1228
  },
1229
1229
  // --- official-style settings page (shared SettingsForm + Switch) ---
1230
- switchList: { display: 'flex', flexDirection: 'column' },
1230
+ // Mirrors the built-in settings page rhythm: the shared form only stacks
1231
+ // children, so each block below brings its own 12px vertical padding, the
1232
+ // same scale the official fields and rows use.
1233
+ formBody: { display: 'flex', flexDirection: 'column' },
1234
+ noticeOfficial: {
1235
+ margin: '0 0 4px',
1236
+ color: 'var(--dsw-alias-label-secondary)',
1237
+ fontSize: '13px',
1238
+ lineHeight: 1.5,
1239
+ },
1240
+ switchList: { display: 'flex', flexDirection: 'column', padding: '12px 0' },
1231
1241
  switchRow: {
1232
1242
  display: 'flex',
1233
1243
  alignItems: 'center',
1234
1244
  gap: '16px',
1235
- minHeight: '44px',
1245
+ minHeight: '40px',
1236
1246
  padding: '8px 0',
1237
1247
  borderBottom: '0.5px solid var(--dsw-alias-border-l2)',
1238
1248
  },
@@ -1240,28 +1250,29 @@ window.__ModuleLoader__.load({
1240
1250
  display: 'flex',
1241
1251
  alignItems: 'center',
1242
1252
  gap: '16px',
1243
- minHeight: '44px',
1253
+ minHeight: '40px',
1244
1254
  padding: '8px 0',
1245
1255
  },
1246
1256
  switchText: { display: 'flex', flexDirection: 'column', gap: '2px', flex: '1 1 auto', minWidth: 0 },
1247
- switchLabel: { color: 'var(--dsw-alias-label-primary)', fontSize: '13px', lineHeight: '20px', fontWeight: 500 },
1248
- switchHint: { color: 'var(--dsw-alias-label-secondary)', fontSize: '13px', lineHeight: '18px' },
1249
- fieldLabel: { color: 'var(--dsw-alias-label-primary)', fontSize: '13px', lineHeight: '20px' },
1257
+ switchLabel: { color: 'var(--dsw-alias-label-primary)', fontSize: '13px', lineHeight: 1.5, fontWeight: 500 },
1258
+ switchHint: { color: 'var(--dsw-alias-label-tertiary)', fontSize: '12px', lineHeight: 1.5 },
1259
+ field: { display: 'flex', flexDirection: 'column', gap: '6px', padding: '12px 0' },
1260
+ fieldLabel: { color: 'var(--dsw-alias-label-primary)', fontSize: '13px', lineHeight: 1.5, fontWeight: 500 },
1261
+ fieldHint: { color: 'var(--dsw-alias-label-tertiary)', fontSize: '12px', lineHeight: 1.5 },
1250
1262
  textareaOfficial: {
1251
1263
  boxSizing: 'border-box',
1252
1264
  width: '100%',
1253
1265
  minHeight: '96px',
1254
1266
  color: 'var(--dsw-alias-label-primary)',
1255
- background: 'var(--dsw-alias-bg-base)',
1267
+ background: 'var(--dsw-alias-bg-layer-3)',
1256
1268
  border: '0.5px solid var(--dsw-alias-border-l4)',
1257
1269
  borderRadius: 'var(--dsw-radius-md, 8px)',
1258
1270
  font: 'inherit',
1259
1271
  fontSize: '13px',
1260
- lineHeight: '20px',
1261
- padding: '8px 10px',
1272
+ lineHeight: 1.5,
1273
+ padding: '8px 12px',
1262
1274
  resize: 'vertical',
1263
1275
  },
1264
- noticeOfficial: { color: 'var(--dsw-alias-label-secondary)', margin: 0, fontSize: '13px', lineHeight: '20px' },
1265
1276
  }
1266
1277
 
1267
1278
  /**
@@ -1378,7 +1389,7 @@ window.__ModuleLoader__.load({
1378
1389
  switchRow(t, { label: 'config.enabled', hint: 'config.enabledHint', checked: draft.enabled, disabled: readOnly, onChange: (next) => setDraft({ ...draft, enabled: next }) }),
1379
1390
  React.createElement('div', { style: configStyles.field },
1380
1391
  React.createElement('span', { style: configStyles.checkLabel }, t('config.hosts')),
1381
- React.createElement('span', { style: configStyles.hint }, t('config.hostsHint')),
1392
+ React.createElement('span', { style: configStyles.fieldHint }, t('config.hostsHint')),
1382
1393
  React.createElement('textarea', {
1383
1394
  style: configStyles.textarea,
1384
1395
  rows: 4,
@@ -1492,13 +1503,14 @@ window.__ModuleLoader__.load({
1492
1503
  }),
1493
1504
  )
1494
1505
  return React.createElement(SettingsForm, { labels, state: model, onSave: save, onDiscard: discard },
1495
- React.createElement('p', { style: configStyles.noticeOfficial }, t('config.intro')),
1496
- React.createElement('div', { style: configStyles.switchList },
1506
+ React.createElement('div', { style: configStyles.formBody },
1507
+ React.createElement('p', { style: configStyles.noticeOfficial }, t('config.intro')),
1508
+ React.createElement('div', { style: configStyles.switchList },
1497
1509
  toggleRow('enabled', 'config.enabled', 'config.enabledHint', false),
1498
1510
  toggleRow('allowEval', 'config.allowEval', 'config.allowEvalHint', false),
1499
- toggleRow('allowNativeInput', 'config.allowNativeInput', 'config.allowNativeInputHint', true),
1500
- ),
1501
- React.createElement('div', { style: configStyles.field },
1511
+ toggleRow('allowNativeInput', 'config.allowNativeInput', 'config.allowNativeInputHint', true),
1512
+ ),
1513
+ React.createElement('div', { style: configStyles.field },
1502
1514
  React.createElement('span', { style: configStyles.fieldLabel }, t('config.hosts')),
1503
1515
  React.createElement('textarea', {
1504
1516
  style: configStyles.textareaOfficial,
@@ -1509,7 +1521,8 @@ window.__ModuleLoader__.load({
1509
1521
  value: draft.hostsText,
1510
1522
  onChange: (event) => setDraft({ ...draft, hostsText: event.target.value }),
1511
1523
  }),
1512
- React.createElement('span', { style: configStyles.hint }, t('config.hostsHint')),
1524
+ React.createElement('span', { style: configStyles.fieldHint }, t('config.hostsHint')),
1525
+ ),
1513
1526
  ),
1514
1527
  )
1515
1528
  }
@@ -20,7 +20,7 @@ import z from '../vendor/schemastery/index.mjs'
20
20
  export const name = 'dsh-sidebar-browser-agent'
21
21
 
22
22
  /** Plugin version reported by diagnostics; keep in sync with package.json. */
23
- export const PLUGIN_VERSION = '0.2.8'
23
+ export const PLUGIN_VERSION = '0.2.9'
24
24
 
25
25
  /** Services that must exist before this plugin mounts. */
26
26
  export const inject = ['webServer', 'connection', 'tools']
package/lib/index.js CHANGED
@@ -20,7 +20,7 @@ import z from '../vendor/schemastery/index.mjs'
20
20
  export const name = 'dsh-sidebar-browser-agent'
21
21
 
22
22
  /** Plugin version reported by diagnostics; keep in sync with package.json. */
23
- export const PLUGIN_VERSION = '0.2.8'
23
+ export const PLUGIN_VERSION = '0.2.9'
24
24
 
25
25
  /** Services that must exist before this plugin mounts. */
26
26
  export const inject = ['webServer', 'connection', 'tools']
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-sidebar-browser-agent",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "type": "module",
5
5
  "icon": "./icon.svg",
6
6
  "description": "Native agent control for the DSH right-sidebar browser: manage tabs, and read, click, type, scroll, run JavaScript in and screenshot the real page through its Electron guest.",
@@ -20,7 +20,7 @@
20
20
  "electron-webview"
21
21
  ],
22
22
  "exports": {
23
- ".": "./lib/entry-0.2.8.js",
23
+ ".": "./lib/entry-0.2.9.js",
24
24
  "./client": "./lib/client.js",
25
25
  "./locale/*.json": "./locale/*.json",
26
26
  "./icon": "./icon.svg"