@goodandready/dsh-time-machine 0.1.11 → 0.1.12
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/README.md +3 -0
- package/README.ru.md +3 -0
- package/README.zh.md +3 -0
- package/lib/client.js +22 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -119,6 +119,9 @@ dsh-time-machine:
|
|
|
119
119
|
|
|
120
120
|
## 📋 Release Notes
|
|
121
121
|
|
|
122
|
+
### v0.1.12 — Fix Oversized Clock Icon in Native Sidebar Guide
|
|
123
|
+
* **Fixed in v0.1.12**: Replaced function-based icon with dedicated `TimeMachineIcon` component supporting both props object `{ size, className }` and numeric argument, with explicit inline sizing (`width`, `height`, `display: inline-block`, `flex: none`) to prevent overflow in the Right Sidebar Guide card.
|
|
124
|
+
|
|
122
125
|
### v0.1.11 — Dual Sidebar Support: Native DSH Right Sidebar & BetterSidebar
|
|
123
126
|
* **Added in v0.1.11**: Support for native DSH Right Sidebar (`sidebarRightTabs` + `sidebar.right.pane.tab`) introduced in DSH 0.1.5-alpha.1, including guide page registration with custom icon.
|
|
124
127
|
* **Preserved in v0.1.11**: Legacy `betterSidebar` integration retained with deterministic surface-scoped registrations, preventing ID collisions or duplicate mounts when both surfaces exist.
|
package/README.ru.md
CHANGED
|
@@ -119,6 +119,9 @@ dsh-time-machine:
|
|
|
119
119
|
|
|
120
120
|
## 📋 История версий (Release Notes)
|
|
121
121
|
|
|
122
|
+
### v0.1.12 — Исправление размера иконки часов на странице Guide нативного сайдбара
|
|
123
|
+
* **Fixed in v0.1.12**: Заменена стрелочная функция иконки на полноценный React-компонент `TimeMachineIcon`, корректно обрабатывающий как объект props `{ size, className }`, так и числовой аргумент; добавлены явные inline-стили (`width`, `height`, `flex: none`), устраняющие растягивание иконки часов на карточке Guide.
|
|
124
|
+
|
|
122
125
|
### v0.1.11 — Поддержка нативного DSH Right Sidebar и legacy BetterSidebar
|
|
123
126
|
* **Added in v0.1.11**: Поддержка нативной правой панели DSH (`sidebarRightTabs` + слот `sidebar.right.pane.tab`), появившейся в DSH 0.1.5-alpha.1, включая регистрацию на странице Guide с иконкой.
|
|
124
127
|
* **Preserved in v0.1.11**: Полная обратная совместимость с `betterSidebar`; раздельные идентификаторы поверхностей исключают конфликты или двойное монтирование при совместном включении.
|
package/README.zh.md
CHANGED
|
@@ -94,6 +94,9 @@ dsh-time-machine:
|
|
|
94
94
|
|
|
95
95
|
## 📋 版本更新记录 (Release Notes)
|
|
96
96
|
|
|
97
|
+
### v0.1.12 — 修复原生侧边栏引导页中时钟图标过大的问题
|
|
98
|
+
* **Fixed in v0.1.12**: 将图标函数重构为标准 React 组件 `TimeMachineIcon`,兼容 `{ size, className }` 属性对象与数字传参,增加内联样式限制(`width`, `height`, `flex: none`),彻底解决右侧边栏 Guide 卡片中图标溢出的缺陷。
|
|
99
|
+
|
|
97
100
|
### v0.1.11 — 双侧边栏支持:原生 DSH 右侧边栏与 BetterSidebar
|
|
98
101
|
* **Added in v0.1.11**: 原生支持 DSH 0.1.5-alpha.1 引入的右侧边栏(`sidebarRightTabs` 注册与 `sidebar.right.pane.tab` 插槽),包含专属引导页卡片与图标。
|
|
99
102
|
* **Preserved in v0.1.11**: 保持对旧版 `betterSidebar` 的完全向后兼容;两种表面同时启用时互不干扰,杜绝重复挂载或 ID 冲突。
|
package/lib/client.js
CHANGED
|
@@ -130,6 +130,26 @@ window.__ModuleLoader__.load({
|
|
|
130
130
|
}
|
|
131
131
|
const Chevron = ChevronIcon || FallbackChevron;
|
|
132
132
|
|
|
133
|
+
|
|
134
|
+
function TimeMachineIcon(props) {
|
|
135
|
+
const s = typeof props === "number" ? props : (props && props.size) || 16;
|
|
136
|
+
const cls = (props && props.className) || "";
|
|
137
|
+
return React.createElement("svg", {
|
|
138
|
+
width: s,
|
|
139
|
+
height: s,
|
|
140
|
+
viewBox: "0 0 24 24",
|
|
141
|
+
fill: "none",
|
|
142
|
+
stroke: "currentColor",
|
|
143
|
+
strokeWidth: "2",
|
|
144
|
+
strokeLinecap: "round",
|
|
145
|
+
strokeLinejoin: "round",
|
|
146
|
+
className: cls,
|
|
147
|
+
style: { width: s, height: s, display: "inline-block", flex: "none" }
|
|
148
|
+
},
|
|
149
|
+
React.createElement("circle", { cx: 12, cy: 12, r: 10 }),
|
|
150
|
+
React.createElement("polyline", { points: "12 6 12 12 16 14" })
|
|
151
|
+
);
|
|
152
|
+
}
|
|
133
153
|
function useLocale(ctx) {
|
|
134
154
|
if (!ctx || !ctx.locale) return 'en';
|
|
135
155
|
const lang = React.useSyncExternalStore(
|
|
@@ -399,10 +419,7 @@ window.__ModuleLoader__.load({
|
|
|
399
419
|
},
|
|
400
420
|
order: 30,
|
|
401
421
|
single: true,
|
|
402
|
-
icon:
|
|
403
|
-
React.createElement('circle', { cx:12, cy:12, r:10 }),
|
|
404
|
-
React.createElement('polyline', { points:'12 6 12 12 16 14' })
|
|
405
|
-
),
|
|
422
|
+
icon: TimeMachineIcon,
|
|
406
423
|
component: (p) => React.createElement(TimeMachineTab, { ctx, ...p })
|
|
407
424
|
});
|
|
408
425
|
tabRegistered = true;
|
|
@@ -451,10 +468,7 @@ window.__ModuleLoader__.load({
|
|
|
451
468
|
const a = (ctx.locale && ctx.locale.getSnapshot && ctx.locale.getSnapshot().active) || 'en';
|
|
452
469
|
return a.startsWith('zh') ? zh.guideDesc : (a.startsWith('ru') ? ru.guideDesc : en.guideDesc);
|
|
453
470
|
},
|
|
454
|
-
icon:
|
|
455
|
-
React.createElement('circle', { cx:12, cy:12, r:10 }),
|
|
456
|
-
React.createElement('polyline', { points:'12 6 12 12 16 14' })
|
|
457
|
-
)
|
|
471
|
+
icon: TimeMachineIcon
|
|
458
472
|
}]
|
|
459
473
|
};
|
|
460
474
|
|