@michengai/dsh-automation 1.0.1 → 1.0.3

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.
@@ -12,7 +12,7 @@ export declare function ScheduleRail({ t, runtime, openSession, openTaskSettings
12
12
  readonly view?: ScheduleView;
13
13
  readonly showViewSwitch?: boolean;
14
14
  }): JSX.Element;
15
- export declare function NativeScheduleShell({ t, runtime, officialTree, hostProps, openSession, openTaskSettings, useSessions, useWorkspaces, renderSlot, hasChannels, subscribeChannels, tabRegistry, wide, }: {
15
+ export declare function NativeScheduleShell({ t, runtime, officialTree, hostProps, openSession, openTaskSettings, useSessions, useWorkspaces, renderSlot, tabRegistry, wide, }: {
16
16
  readonly t: Translate;
17
17
  readonly runtime: AutomationRuntime;
18
18
  readonly officialTree?: ComponentType<any>;
@@ -22,8 +22,6 @@ export declare function NativeScheduleShell({ t, runtime, officialTree, hostProp
22
22
  readonly useSessions?: SessionSelector;
23
23
  readonly useWorkspaces?: WorkspaceSelector;
24
24
  readonly renderSlot?: (name: string, props?: Record<string, unknown>) => ReactNode;
25
- readonly hasChannels?: () => boolean;
26
- readonly subscribeChannels?: (listener: () => void) => () => void;
27
25
  readonly tabRegistry?: NativeTabRegistry;
28
26
  readonly wide?: boolean;
29
27
  }): JSX.Element | null;
@@ -108,7 +108,7 @@ export declare const en: {
108
108
  readonly "action.chatCreate": "Create in chat";
109
109
  readonly "action.create": "New scheduled task";
110
110
  readonly "banner.wake": "Scheduled tasks run only while this computer stays awake.";
111
- readonly "tabs.mine": "My tasks";
111
+ readonly "tabs.mine": "Tasks";
112
112
  readonly "tabs.runs": "Run history";
113
113
  readonly "sort.by": "Sort";
114
114
  readonly "sort.created.asc": "Created time ascending";
@@ -0,0 +1,29 @@
1
+ /**
2
+ * 设置页导航图标的非侵入式替换。
3
+ *
4
+ * 宿主会用自己的 svg 渲染设置导航图标;插件若直接改写宿主 svg 的 outerHTML,
5
+ * 会与宿主/皮肤的内容级图标规则互相覆盖。这里改为插入独立的 mask 图标,
6
+ * 只通过 marker 属性隐藏宿主 svg,卸载时可以完整还原。
7
+ */
8
+ export declare const SETTINGS_NAV_ICON_CLASS = "dsh-st-nav-icon-schedule";
9
+ export declare const SETTINGS_NAV_ICON_MARKER = "data-dsh-schedule-nav";
10
+ /**
11
+ * 为目标导航按钮注入 mask 图标。
12
+ *
13
+ * @param button 设置弹窗导航按钮
14
+ * @param labels 返回当前语言下目标分区名称的函数
15
+ * @returns 是否发生了实际变更;重复调用保持幂等
16
+ */
17
+ export declare function applySettingsNavIcon(button: HTMLButtonElement, labels: () => readonly string[]): boolean;
18
+ /**
19
+ * 还原导航按钮:移除 marker 与插件插入的图标,宿主 svg 从未被修改。
20
+ *
21
+ * @returns 是否清理了插件留下的内容
22
+ */
23
+ export declare function restoreSettingsNavIcon(button: HTMLButtonElement): boolean;
24
+ /**
25
+ * 安装设置导航图标补丁;返回卸载函数。
26
+ *
27
+ * 通过 MutationObserver 覆盖设置弹窗异步挂载、语言切换和宿主重渲染的场景。
28
+ */
29
+ export declare function installSettingsNavIcon(labels: () => readonly string[]): () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@michengai/dsh-automation",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "DSH Automation — 在独立 DSH Session 中按计划执行和管理编码任务 · Schedule and manage coding tasks in isolated DSH sessions",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@11.22.0",