@linkdesk/ui 0.2.50 → 0.2.52

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.
@@ -0,0 +1,29 @@
1
+ /**
2
+ * ObjectEditor——`type:"object"` / `type:"array"` 配置项的键值对编辑器。
3
+ *
4
+ * 2026-10-06《分段预览色块边缘串色》案 · 尾巴 T2:自官方设置插件整件上移
5
+ * (原 `SettingsView/ObjectEditor.tsx` + `SettingsView-objectEditor.css`)。
6
+ * 判据 A:`object` / `array` 是**宿主 type 词表**里的形态——任何渲染方都得画得出来;
7
+ * 住在**可替换**插件的私有件里 ⇒ 换一只设置插件,这两类键就变成裸 `<span>`(GUI 退化)。
8
+ *
9
+ * 🔴 文案一律 props 注入(`addLabel` / `deleteLabel` / `onLabel` / `offLabel`)——本件⛔ 不 `useTranslation`:
10
+ * 共享层只说结构,人话由调用方给(与 `StringListEditor` 同款口径,先例 `SourceBadge`)。
11
+ * 🔴 `newKeyBase` 是**写进用户配置的数据键名**,不是 UI 文案——**故意不走 i18n**:
12
+ * 一旦有人给它补了译文,新增行的键名就会被写成译文,损坏用户配置(B-i18n-1)。
13
+ * 默认 `newKey`;调用方按自己的数据约定传(官方设置插件传 `newPattern`,与迁移前逐字一致)。
14
+ */
15
+ declare function ObjectEditor({ value, onChange, addLabel, deleteLabel, onLabel, offLabel, newKeyBase, }: {
16
+ value: Record<string, unknown>;
17
+ onChange: (newValue: Record<string, unknown>) => void;
18
+ /** 加行按钮文案(调用方的人话) */
19
+ addLabel: string;
20
+ /** 删行按钮的 title/aria-label */
21
+ deleteLabel: string;
22
+ /** 布尔值开关的 title/aria-label——真值态 */
23
+ onLabel: string;
24
+ /** 布尔值开关的 title/aria-label——假值态 */
25
+ offLabel: string;
26
+ /** 新增行的键名基(数据键名,⛔ 不翻译)——与已有键冲突时依次追加 1、2… */
27
+ newKeyBase?: string;
28
+ }): import("react").JSX.Element;
29
+ export default ObjectEditor;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "shellVersion": "0.2.52",
3
- "commit": "cfb01e899",
3
+ "commit": "87f7ce46b",
4
4
  "cutAt": "2026-10-06"
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linkdesk/ui",
3
- "version": "0.2.50",
3
+ "version": "0.2.52",
4
4
  "description": "@linkdesk/ui——LinkDesk 共享 UI 组件的类型契约 + dev 解析体。L9 集中供给:组件代码与样式在运行时由壳池 vendor 单实例供给(壳改一处全生态跟随);npm i 装的是类型与本地解析体,插件源码不 import 本包 css(lint 腿 check-ui-css-import 判红)。版本号自走(E6#166 对货不对号:2026-10-01 起与壳脱钩,壳发版只查作者面货不落后)。",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",