@muxiuesd/dsh-pixel-studio 0.0.0-stage → 0.1.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Muxiuesd
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,57 @@
1
- # Temporary Holding Version
1
+ # dsh-pixel-studio
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 在 DeepSeek Harness(DSH)里画像素画:会话页签里一个三栏编辑器,左工具、中画布、右调色板,滚轮缩放、图层、导出 PNG,作品存在本机。
4
+
5
+ ## 装法
6
+
7
+ 三种都可以,装完刷新页面,会话页签行里会出现“像素画”。
8
+
9
+ ```bash
10
+ # 1) 官方插件管理页 / 插件市场里搜索 @muxiuesd/dsh-pixel-studio
11
+ # 2) DSH CLI(npm)
12
+ dsh plugin --profile web add @muxiuesd/dsh-pixel-studio
13
+ # 3) 直接从 GitHub 仓库装(仓库根就是插件包)
14
+ dsh plugin --profile web add github:Muxiuesd/dsh-pixel
15
+ # 4) 本地开发
16
+ dsh plugin --profile web add /绝对路径/dsh-pixel
17
+ ```
18
+
19
+ ## 能做什么
20
+
21
+ - **画布**:整数倍缩放 `1×…64×`,滚轮以光标为锚点;空格/中键拖动平移,`F` 适应窗口;`4×` 以上显示格线(可关)。
22
+ - **工具**:铅笔、橡皮、油漆桶(按合成后的颜色判断连通,视觉同色一次填满)、吸管;方形笔刷 `1–8` 像素。
23
+ - **图层**:最多 8 层,新建/复制/合并/上移/下移/删除/改名/显隐,全部可撤销。
24
+ - **调色板**:最多 36 色,内置 PICO-8 等预设板;改某个槽位的颜色**不会改动已经画好的像素**(画布上的旧颜色会先由一个空闲槽位接手),也可以用系统取色器可视化取色。
25
+ - **作品**:新建时填名字和尺寸(1–256),另有 11 个常用尺寸预设;自动保存。
26
+ - **导出**:首次导出选择保存位置(默认从当前会话目录开始),之后导出直接覆盖那个文件;`另存为` 随时换位置。
27
+
28
+ ## 快捷键
29
+
30
+ | 键 | 作用 |
31
+ | --- | --- |
32
+ | `B` / `E` / `G` / `I` | 铅笔 / 橡皮 / 油漆桶 / 吸管 |
33
+ | `[` `]` | 笔刷变小 / 变大 |
34
+ | `H` | 格线开关 |
35
+ | `F` | 适应窗口 |
36
+ | `+` / `-` | 放大 / 缩小 |
37
+ | 空格 + 拖动、鼠标中键 | 平移画布 |
38
+ | `Ctrl/Cmd+Z` / `Ctrl/Cmd+Shift+Z`(或 `Ctrl+Y`) | 撤销 / 重做 |
39
+ | `Ctrl/Cmd+S` | 保存 |
40
+ | `Ctrl/Cmd+Shift+S` | 另存为 PNG |
41
+
42
+ ## 数据与能力
43
+
44
+ - 作品存在 `<profile 目录>/../pixel-studio/works.json`(默认 `~/.dsh/pixel-studio/works.json`),不上传、不联网。
45
+ - 插件只注册一个 Host 路由 `/dsh-pixel-studio`(同源 `fetch`),用于读写作品与写 PNG 文件;不执行命令、不访问网络。
46
+ - 导出的 PNG 由插件自己编码(IHDR + zlib + IEND),不依赖任何图像库。
47
+
48
+ ## 环境
49
+
50
+ - DSH 0.2.x(Web / Desktop 均可),Node.js ≥ 20。
51
+ - 客户端用 `window.__ModuleLoader__` 加载,`react` 走宿主模块表,不打包 React。
52
+
53
+ ## 许可
54
+
55
+ MIT © 2026 Muxiuesd
56
+
57
+ 源码与问题反馈:<https://gitee.com/muxiuesd12138/dsh-pixel>(GitHub 镜像:<https://github.com/Muxiuesd/dsh-pixel>)