@linxin666/dsh-pet 0.4.9 → 0.4.11

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.
Files changed (53) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +1 -1
  3. package/README.zh.md +4 -4
  4. package/lib/client.js +1092 -348
  5. package/lib/client.js.map +1 -1
  6. package/lib/types/client/PetPreview.d.ts +12 -0
  7. package/lib/types/client/PetPreview.d.ts.map +1 -0
  8. package/lib/types/client/PetPreview.js +32 -0
  9. package/lib/types/client/PetSettingsCard.d.ts +30 -2
  10. package/lib/types/client/PetSettingsCard.d.ts.map +1 -1
  11. package/lib/types/client/PetSettingsCard.js +48 -8
  12. package/lib/types/client/PluginSettingsCard.d.ts +131 -17
  13. package/lib/types/client/PluginSettingsCard.d.ts.map +1 -1
  14. package/lib/types/client/PluginSettingsCard.js +158 -37
  15. package/lib/types/client/RangeBubble.d.ts +47 -0
  16. package/lib/types/client/RangeBubble.d.ts.map +1 -0
  17. package/lib/types/client/RangeBubble.js +107 -0
  18. package/lib/types/client/SegmentGroup.d.ts +29 -0
  19. package/lib/types/client/SegmentGroup.d.ts.map +1 -0
  20. package/lib/types/client/SegmentGroup.js +81 -0
  21. package/lib/types/client/index.d.ts.map +1 -1
  22. package/lib/types/client/index.js +9 -28
  23. package/lib/types/client/locales.d.ts +36 -44
  24. package/lib/types/client/locales.d.ts.map +1 -1
  25. package/lib/types/client/locales.js +36 -44
  26. package/lib/types/client/settings-form.d.ts +79 -41
  27. package/lib/types/client/settings-form.d.ts.map +1 -1
  28. package/lib/types/client/settings-form.js +96 -36
  29. package/lib/types/client/settings-registration.d.ts +15 -0
  30. package/lib/types/client/settings-registration.d.ts.map +1 -0
  31. package/lib/types/client/settings-registration.js +24 -0
  32. package/lib/types/client/web-extension-contract.d.ts +32 -0
  33. package/lib/types/client/web-extension-contract.d.ts.map +1 -0
  34. package/lib/types/client/web-extension-contract.js +6 -0
  35. package/lib/types/client/web-extension-page.d.ts +51 -0
  36. package/lib/types/client/web-extension-page.d.ts.map +1 -0
  37. package/lib/types/client/web-extension-page.js +122 -0
  38. package/package.json +1 -1
  39. package/src/client/PetPreview.tsx +51 -0
  40. package/src/client/PetSettingsCard.test.tsx +28 -22
  41. package/src/client/PetSettingsCard.tsx +201 -110
  42. package/src/client/PluginSettingsCard.tsx +369 -108
  43. package/src/client/RangeBubble.tsx +163 -0
  44. package/src/client/SegmentGroup.tsx +92 -0
  45. package/src/client/index.ts +9 -27
  46. package/src/client/locales.ts +36 -44
  47. package/src/client/settings-card.module.css +493 -91
  48. package/src/client/settings-form.ts +116 -49
  49. package/src/client/settings-registration.test.ts +79 -0
  50. package/src/client/settings-registration.ts +34 -0
  51. package/src/client/settings-section.module.css +182 -0
  52. package/src/client/web-extension-contract.ts +35 -0
  53. package/src/client/web-extension-page.ts +150 -0
@@ -0,0 +1,163 @@
1
+ /**
2
+ * Coarse adjustment for a bounded number: resting the pointer on the control
3
+ * (or moving focus into it) raises a small bubble holding a slider across the
4
+ * field's whole range, so a large change is one drag instead of many presses
5
+ * or a retyped value. The control itself stays the precise entry.
6
+ *
7
+ * The bubble belongs to the anchor's subtree, so moving from the control onto
8
+ * the bubble never counts as leaving. It opens after a short rest and closes a
9
+ * moment after the pointer and focus have both gone, so crossing the control
10
+ * on the way elsewhere does not flash it. While a drag is in progress the
11
+ * bubble stays put even if the pointer strays off it.
12
+ *
13
+ * Dragging reports each value through `onInput`, so the field shows it live;
14
+ * releasing the thumb, or a key press on it, reports `onCommit` once. The
15
+ * bubble opens on the side of the control that has room inside the nearest
16
+ * scrolling ancestor, so a row near the top of a settings page does not hang
17
+ * its bubble under the page edge.
18
+ */
19
+
20
+ import { useEffect, useRef, useState, type ChangeEvent, type CSSProperties, type KeyboardEvent, type ReactNode } from 'react'
21
+ import css from './settings-card.module.css'
22
+
23
+ /** Rest on the control before the bubble opens. */
24
+ const OPEN_DELAY_MS = 220
25
+ /** Grace after pointer and focus have left before the bubble closes. */
26
+ const CLOSE_DELAY_MS = 200
27
+ /** Room the bubble needs between the control and the scroller's edge. */
28
+ const BUBBLE_ROOM_PX = 64
29
+
30
+ /** Props of {@link RangeBubble}. */
31
+ export interface RangeBubbleProps {
32
+ /** Lowest value the slider reaches. */
33
+ min: number
34
+ /** Highest value the slider reaches. */
35
+ max: number
36
+ /** Slider granularity. */
37
+ step: number
38
+ /** Current value; a value outside the range parks the thumb at the nearer end. */
39
+ value: number
40
+ /** Accessible name of the slider. */
41
+ label: string
42
+ /** Disables the bubble along with the control. */
43
+ disabled?: boolean
44
+ /** Each value while the thumb moves. */
45
+ onInput: (value: number) => void
46
+ /** The value the thumb was released on, once per drag or key press. */
47
+ onCommit: (value: number) => void
48
+ /** The precise control the bubble hangs off. */
49
+ children: ReactNode
50
+ }
51
+
52
+ /** The nearest ancestor that scrolls vertically, or the viewport's root. */
53
+ function scroller(node: HTMLElement): HTMLElement {
54
+ for (let parent = node.parentElement; parent !== null; parent = parent.parentElement) {
55
+ const overflow = getComputedStyle(parent).overflowY
56
+ if (overflow === 'auto' || overflow === 'scroll') return parent
57
+ }
58
+ return node.ownerDocument.documentElement
59
+ }
60
+
61
+ /**
62
+ * Render the control with its coarse-adjustment bubble.
63
+ * @param props - the range, the value and the two report callbacks.
64
+ * @returns the anchor holding the control and the bubble.
65
+ */
66
+ export function RangeBubble(props: RangeBubbleProps): ReactNode {
67
+ const { min, max, step, disabled = false } = props
68
+ const [open, setOpen] = useState(false)
69
+ const [side, setSide] = useState<'above' | 'below'>('above')
70
+ const [live, setLive] = useState<number | null>(null)
71
+ const anchorRef = useRef<HTMLDivElement | null>(null)
72
+ const timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined)
73
+ const hovered = useRef(false)
74
+ const focused = useRef(false)
75
+ const dragging = useRef(false)
76
+
77
+ useEffect(() => () => { clearTimeout(timer.current) }, [])
78
+ useEffect(() => {
79
+ if (disabled) {
80
+ clearTimeout(timer.current)
81
+ setOpen(false)
82
+ }
83
+ }, [disabled])
84
+
85
+ const show = (): void => {
86
+ const anchor = anchorRef.current
87
+ if (anchor !== null) {
88
+ const room = anchor.getBoundingClientRect().top - scroller(anchor).getBoundingClientRect().top
89
+ setSide(room >= BUBBLE_ROOM_PX ? 'above' : 'below')
90
+ }
91
+ setOpen(true)
92
+ }
93
+ const schedule = (): void => {
94
+ clearTimeout(timer.current)
95
+ if (disabled) return
96
+ if (hovered.current || focused.current || dragging.current) {
97
+ if (!open) timer.current = setTimeout(show, focused.current ? 0 : OPEN_DELAY_MS)
98
+ return
99
+ }
100
+ timer.current = setTimeout(() => { setOpen(false) }, CLOSE_DELAY_MS)
101
+ }
102
+
103
+ const commit = (value: number): void => {
104
+ dragging.current = false
105
+ setLive(null)
106
+ props.onCommit(value)
107
+ schedule()
108
+ }
109
+ const onChange = (event: ChangeEvent<HTMLInputElement>): void => {
110
+ const value = Number(event.target.value)
111
+ setLive(value)
112
+ props.onInput(value)
113
+ }
114
+ const onKeyUp = (event: KeyboardEvent<HTMLInputElement>): void => {
115
+ if (live !== null) commit(live)
116
+ if (event.key === 'Escape') {
117
+ clearTimeout(timer.current)
118
+ setOpen(false)
119
+ }
120
+ }
121
+ const shown = live ?? Math.min(max, Math.max(min, props.value))
122
+
123
+ return (
124
+ <div
125
+ ref={anchorRef}
126
+ className={css.rangeAnchor}
127
+ onPointerEnter={() => { hovered.current = true; schedule() }}
128
+ onPointerLeave={() => { hovered.current = false; schedule() }}
129
+ onFocus={() => { focused.current = true; schedule() }}
130
+ onBlur={(event) => {
131
+ if (event.currentTarget.contains(event.relatedTarget as Node | null)) return
132
+ focused.current = false
133
+ if (live !== null) commit(live)
134
+ else schedule()
135
+ }}
136
+ >
137
+ {props.children}
138
+ <div className={css.rangeBubble} data-open={open ? '' : undefined} data-side={side}>
139
+ <input
140
+ type="range"
141
+ className={css.rangeSlider}
142
+ min={min}
143
+ max={max}
144
+ step={step}
145
+ value={shown}
146
+ aria-label={props.label}
147
+ tabIndex={open ? 0 : -1}
148
+ disabled={disabled}
149
+ style={{ '--range-fill': `${((shown - min) / (max - min)) * 100}%` } as CSSProperties}
150
+ onPointerDown={() => { dragging.current = true }}
151
+ onPointerUp={(event) => { commit(Number(event.currentTarget.value)) }}
152
+ onPointerCancel={(event) => { commit(Number(event.currentTarget.value)) }}
153
+ onChange={onChange}
154
+ onKeyUp={onKeyUp}
155
+ />
156
+ <span className={css.rangeEnds} aria-hidden="true">
157
+ <span>{min}</span>
158
+ <span>{max}</span>
159
+ </span>
160
+ </div>
161
+ </div>
162
+ )
163
+ }
@@ -0,0 +1,92 @@
1
+ /**
2
+ * The family's segmented control: a quiet track whose options share one
3
+ * highlight that slides to the pressed option, instead of each option fading
4
+ * its own background out and the next one in. The settings fields' small
5
+ * choices and the Web Extensions TAB strip both render through it, so the two
6
+ * read as one control.
7
+ *
8
+ * The caller builds the option buttons and marks the pressed one with
9
+ * `data-active`; the group measures that button after every render and writes
10
+ * its box as four custom properties, and the stylesheet draws the highlight
11
+ * there (`.segmentGroup[data-pill]::before`). Attribute and first placement
12
+ * land in the same task, so the highlight appears in place and only later
13
+ * changes slide. A ResizeObserver re-measures when the group or an option
14
+ * changes size: a longer locale, a font arriving, a container growing, a
15
+ * strip wrapping onto a second line.
16
+ */
17
+
18
+ import { Children, useLayoutEffect, useRef, type HTMLAttributes, type ReactNode } from 'react'
19
+ import css from './settings-card.module.css'
20
+
21
+ /** The attribute marking a group whose highlight has been placed. */
22
+ const PILL_ATTR = 'data-pill'
23
+ /** The pressed option, relative to the group. */
24
+ const ACTIVE_SELECTOR = ':scope > [data-active]'
25
+ const PILL_PROPERTIES = ['--segment-pill-x', '--segment-pill-y', '--segment-pill-w', '--segment-pill-h'] as const
26
+
27
+ /** Props of {@link SegmentGroup}: the track's own attributes and the option buttons. */
28
+ export interface SegmentGroupProps extends HTMLAttributes<HTMLDivElement> {
29
+ /** The option buttons; the pressed one carries `data-active`. */
30
+ children: ReactNode
31
+ }
32
+
33
+ /**
34
+ * Write the highlight's box from the pressed option's box, or take the
35
+ * highlight off when nothing is pressed or the group has no layout yet.
36
+ * The two boxes are read in viewport pixels and turned back into the group's
37
+ * own CSS pixels, so a dialog that opens through a scale transform still
38
+ * lands the highlight on its option.
39
+ */
40
+ function placePill(group: HTMLElement): void {
41
+ const item = group.querySelector<HTMLElement>(ACTIVE_SELECTOR)
42
+ const box = group.getBoundingClientRect()
43
+ if (item === null || group.offsetWidth === 0 || box.width === 0) {
44
+ group.removeAttribute(PILL_ATTR)
45
+ for (const property of PILL_PROPERTIES) group.style.removeProperty(property)
46
+ return
47
+ }
48
+ const scale = box.width / group.offsetWidth
49
+ const itemBox = item.getBoundingClientRect()
50
+ const values = [
51
+ (itemBox.left - box.left) / scale - group.clientLeft,
52
+ (itemBox.top - box.top) / scale - group.clientTop,
53
+ itemBox.width / scale,
54
+ itemBox.height / scale,
55
+ ]
56
+ values.forEach((value, index) => {
57
+ group.style.setProperty(PILL_PROPERTIES[index], `${Math.round(value * 100) / 100}px`)
58
+ })
59
+ if (!group.hasAttribute(PILL_ATTR)) group.setAttribute(PILL_ATTR, '')
60
+ }
61
+
62
+ /**
63
+ * Render a segmented track around the caller's option buttons.
64
+ * @param props - the track's attributes (role, accessible name, key handler) and its options.
65
+ * @returns the track.
66
+ */
67
+ export function SegmentGroup(props: SegmentGroupProps): ReactNode {
68
+ const { children, className, ...rest } = props
69
+ const group = useRef<HTMLDivElement | null>(null)
70
+ const count = Children.count(children)
71
+
72
+ // Placed before the frame is painted, after every render: a press moves the
73
+ // pressed mark and the highlight follows it in the same frame.
74
+ useLayoutEffect(() => {
75
+ if (group.current !== null) placePill(group.current)
76
+ })
77
+
78
+ useLayoutEffect(() => {
79
+ const element = group.current
80
+ if (element === null || typeof ResizeObserver === 'undefined') return undefined
81
+ const observer = new ResizeObserver(() => { placePill(element) })
82
+ observer.observe(element)
83
+ for (const item of Array.from(element.children)) observer.observe(item)
84
+ return () => { observer.disconnect() }
85
+ }, [count])
86
+
87
+ return (
88
+ <div {...rest} ref={group} className={className === undefined ? css.segmentGroup : `${css.segmentGroup} ${className}`}>
89
+ {children}
90
+ </div>
91
+ )
92
+ }
@@ -41,7 +41,8 @@ import { defaultPetRendererRegistry } from './renderers/registry.ts'
41
41
  import { live2dRenderer } from './renderers/live2d.ts'
42
42
  import { frames2dRenderer } from './renderers/frames2d.ts'
43
43
  import { registerPetUiTeardown, takeoverPetUiTeardown } from './ui-teardown.ts'
44
- import { PetSettingsSection, PetSettingsCardController, type PetSettings } from './PetSettingsCard.tsx'
44
+ import { PetSettingsCardController, type PetSettings } from './PetSettingsCard.tsx'
45
+ import { installPetSettingsRegistration } from './settings-registration.ts'
45
46
  import { NS, en, zh } from './locales.ts'
46
47
  import { mainViewSessionId } from './main-session.ts'
47
48
  import { reportDailyHeartbeat } from './telemetry.ts'
@@ -381,33 +382,14 @@ export function apply(ctx: ClientContext): void {
381
382
  : snapshot.status === 'unavailable'
382
383
  }
383
384
 
384
- // First-level settings section: one staged form over the 'pet' profile
385
- // entry's configuration, registered as a top-level settings page. The
386
- // controller loads the petId choices from the registry endpoint itself — the
387
- // registry lists the available pets (built-in assets plus user dirs), so the
388
- // section only ever shows installed pets. Installing new pets happens in the
389
- // Workshop store.
385
+ // One staged form follows the pet page between Web Extensions and the
386
+ // standalone first-level section. Seat migration does not reset drafts.
390
387
  const petSettings = new PetSettingsCardController(settingsForm)
391
- // The section entry owns the controller: unregistering it (fiber disposal,
392
- // hot reload) releases the form subscription through petSettings.dispose.
393
- ctx.slots.inject('settings.section', () => {
394
- try {
395
- const unregister = ctx.slots.register({
396
- name: 'settings.section',
397
- id: 'pet',
398
- order: 130,
399
- label: () => ctx.locale.bind('pet')('settings.title'),
400
- locale: 'pet',
401
- inject: () => petSettings.inject(),
402
- }, PetSettingsSection)
403
- return () => {
404
- unregister()
405
- petSettings.dispose()
406
- }
407
- } catch {
408
- return () => {}
409
- }
410
- })
388
+ const disposeSettingsRegistration = installPetSettingsRegistration(ctx, petSettings)
389
+ ctx.effect(() => () => {
390
+ disposeSettingsRegistration()
391
+ petSettings.dispose()
392
+ }, 'pet: settings page')
411
393
 
412
394
  // The global pet entry, its store, and the poll loop live while the plugin
413
395
  // is enabled; toggling the setting off hides the pet and stops polling.
@@ -57,40 +57,36 @@ export const zh = {
57
57
  'pet.collapseSessions': '收起会话气泡',
58
58
  // 一级设置页(settings.section 席位)。
59
59
  'settings.title': '宠物',
60
- 'settings.description': '选择宠物并调整它的显示布局。',
60
+ 'settings.description': '选一只宠物,摆在页面的角落里。',
61
61
  'settings.pet': '宠物',
62
- 'settings.petHint': '选择显示哪只宠物;每只宠物独立命名,可在宠物悬浮面板改名。',
63
- 'settings.enabled': '启用宠物',
64
- 'settings.enabledHint': '关闭后隐藏宠物并停止轮询,可在设置里重新启用。',
62
+ 'settings.petHint': '名字跟着宠物走,在宠物面板里改。',
63
+ 'settings.displayGroup': '显示',
64
+ 'settings.bubbleGroup': '气泡',
65
65
  'settings.decoration': '状态装饰',
66
- 'settings.decorationHint': '在宠物状态气泡里显示喷水鲸鱼等状态装饰;关闭后气泡只剩文字。',
66
+ 'settings.decorationHint': '气泡里带上喷水鲸鱼这类装饰。',
67
67
  'settings.statusBubbles': '状态气泡',
68
- 'settings.statusBubblesHint': '宠物自带的会话/状态气泡(正在思考、正在使用 xxx)。关掉后只剩第三方插件通过公告契约推送的气泡与互动反馈气泡;默认开启。',
68
+ 'settings.statusBubblesHint': '宠物报告正在思考、正在用哪个工具。',
69
69
  'settings.visible': '显示宠物',
70
- 'settings.visibleHint': '关闭后宠物隐藏,可从聊天输入区重新召唤。',
70
+ 'settings.visibleHint': '藏起来后可在输入区召唤回来。',
71
71
  'settings.size': '大小(px)',
72
- 'settings.sizeHint': '精灵单元高度,范围 32–1024。',
73
- 'settings.bubbleScale': '气泡字号倍率',
74
- 'settings.bubbleScaleHint': '状态、碎碎念与用量气泡的字号会随宠物大小自动缩放;这一项是在此基础上再乘一个倍率(0.5–2,默认 1)。字号本身不小于 10px、不大于 24px。',
72
+ 'settings.sizeHint': '宠物的高度。',
73
+ 'settings.bubbleScale': '气泡字号',
74
+ 'settings.bubbleScaleHint': '字号随宠物缩放,再乘上这个倍数。',
75
75
  'settings.right': '距右侧(px)',
76
- 'settings.rightHint': '距视口右边缘的水平内缩距离。',
76
+ 'settings.rightHint': '离窗口右边的距离。',
77
77
  'settings.bottom': '距底部(px)',
78
- 'settings.bottomHint': '距视口底边的垂直内缩距离。',
79
- 'settings.inherit': '继承',
78
+ 'settings.bottomHint': '离窗口底边的距离。',
79
+ 'settings.inherit': '默认',
80
80
  'settings.on': '开',
81
81
  'settings.off': '关',
82
- 'settings.overridden': '已覆盖',
82
+ 'settings.overridden': '已修改',
83
83
  'settings.reset': '恢复默认',
84
- 'settings.notExposed': '当前 DSH 版本未向设置页暴露本插件的配置命名空间,表单不可用。可编辑 $DSH_HOME/settings.yaml 直接配置,或确认提供该命名空间的插件已挂载其设置域并重启。',
85
- 'settings.readOnly': '当前部署的设置只读。',
84
+ 'settings.notExposed': '这个版本的 DSH 没有开放宠物的设置,可直接编辑 $DSH_HOME/settings.yaml。',
85
+ 'settings.readOnly': '设置只读。',
86
86
  'settings.expand': '展开设置',
87
87
  'settings.collapse': '收起设置',
88
- 'settings.save': '保存',
89
- 'settings.saving': '保存中…',
90
- 'settings.discard': '放弃',
91
- 'settings.unsaved': '未保存',
92
- 'settings.saveFailed': '部署未接受这些值,已保留供你修改。',
93
- 'settings.invalidNumber': '请输入数字,留空则使用默认值。',
88
+ 'settings.saveFailed': '没有保存成功,输入的值还留着。',
89
+ 'settings.invalidNumber': '填一个数字,留空用默认值。',
94
90
  } as const
95
91
 
96
92
  /** English copy. */
@@ -144,40 +140,36 @@ export const en = {
144
140
  'pet.collapseSessions': 'Collapse session bubbles',
145
141
  // First-level settings section (the `settings.section` seat).
146
142
  'settings.title': 'Pet',
147
- 'settings.description': 'Pick a pet and tune its display layout.',
143
+ 'settings.description': 'Pick a pet to sit in a corner of the page.',
148
144
  'settings.pet': 'Pet',
149
- 'settings.petHint': 'Choose which pet shows. Names are stored per pet; rename from the pet hover panel.',
150
- 'settings.enabled': 'Enable the pet',
151
- 'settings.enabledHint': 'When off, the pet hides and polling stops; re-enable it here.',
145
+ 'settings.petHint': 'Each pet keeps its own name; rename it from the pet panel.',
146
+ 'settings.displayGroup': 'Display',
147
+ 'settings.bubbleGroup': 'Bubbles',
152
148
  'settings.decoration': 'Status decoration',
153
- 'settings.decorationHint': 'Show ornaments like the spouting whale inside the pet status bubbles; when off, bubbles stay text-only.',
149
+ 'settings.decorationHint': 'Bubbles carry ornaments like the spouting whale.',
154
150
  'settings.statusBubbles': 'Status bubbles',
155
- 'settings.statusBubblesHint': 'The pet\'s own session/status bubbles (thinking, using ...). Turning them off leaves only bubbles a third-party plugin pushes through the announcement contract, plus the interaction feedback bubble; on by default.',
151
+ 'settings.statusBubblesHint': 'The pet reports when it is thinking and which tool it is using.',
156
152
  'settings.visible': 'Show the pet',
157
- 'settings.visibleHint': 'When off, the pet hides; summon it again from the input row.',
153
+ 'settings.visibleHint': 'A hidden pet comes back from the input row.',
158
154
  'settings.size': 'Size (px)',
159
- 'settings.sizeHint': 'Sprite cell height, 32\u20131024.',
160
- 'settings.bubbleScale': 'Bubble text multiplier',
161
- 'settings.bubbleScaleHint': 'Status, whisper, and usage bubbles scale with the pet automatically; this multiplies that result (0.5\u20132, default 1). The rendered text stays between 10px and 24px.',
155
+ 'settings.sizeHint': 'How tall the pet stands.',
156
+ 'settings.bubbleScale': 'Bubble text',
157
+ 'settings.bubbleScaleHint': 'Text follows the pet size, times this factor.',
162
158
  'settings.right': 'Right inset (px)',
163
- 'settings.rightHint': 'Horizontal inset from the viewport right edge.',
159
+ 'settings.rightHint': 'Distance from the right edge of the window.',
164
160
  'settings.bottom': 'Bottom inset (px)',
165
- 'settings.bottomHint': 'Vertical inset from the viewport bottom edge.',
166
- 'settings.inherit': 'Inherit',
161
+ 'settings.bottomHint': 'Distance from the bottom edge of the window.',
162
+ 'settings.inherit': 'Default',
167
163
  'settings.on': 'On',
168
164
  'settings.off': 'Off',
169
- 'settings.overridden': 'Overridden',
165
+ 'settings.overridden': 'Changed',
170
166
  'settings.reset': 'Reset to default',
171
- 'settings.notExposed': 'This DSH version does not expose this plugin\'s settings namespace to the configuration page, so the form is unavailable. Edit $DSH_HOME/settings.yaml directly, or confirm that the plugin owning the namespace is mounted with its settings domain and restart.',
172
- 'settings.readOnly': 'This deployment stores settings read-only.',
167
+ 'settings.notExposed': 'This DSH version does not open the pet settings here; edit $DSH_HOME/settings.yaml instead.',
168
+ 'settings.readOnly': 'Settings are read-only.',
173
169
  'settings.expand': 'Show settings',
174
170
  'settings.collapse': 'Hide settings',
175
- 'settings.save': 'Save',
176
- 'settings.saving': 'Saving\u2026',
177
- 'settings.discard': 'Discard',
178
- 'settings.unsaved': 'Unsaved',
179
- 'settings.saveFailed': 'The deployment did not accept these values; they were left for you to correct.',
180
- 'settings.invalidNumber': 'Enter a number, or leave blank to use the default.',
171
+ 'settings.saveFailed': 'Not saved; what you typed is still there.',
172
+ 'settings.invalidNumber': 'Enter a number, or leave it empty for the default.',
181
173
  } as const
182
174
 
183
175
  /** Key union for this namespace. */