dsh-sticky 0.3.2 → 0.3.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.
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/dsh-sticky?style=flat-square&logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/dsh-sticky)
6
6
  [![license](https://img.shields.io/npm/l/dsh-sticky?style=flat-square&logo=opensourceinitiative&logoColor=white&color=44CC11)](https://github.com/zerolzg/dsh-sticky/blob/main/LICENSE)
7
- [![dsh 0.2.2-rc.5](https://img.shields.io/badge/dsh-0.2.2--rc.5-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)](https://github.com/zerolzg/dsh-sticky/blob/main/docs/compatibility.md)
7
+ [![dsh 0.2.3-alpha.2](https://img.shields.io/badge/dsh-0.2.3--alpha.2-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)](https://github.com/zerolzg/dsh-sticky/blob/main/docs/compatibility.md)
8
8
 
9
9
  DeepSeek Harness 的便签插件:右侧栏里的一个便签 tab,装着一面 Markdown 便签卡片墙。便签以 Markdown 文本存成本机的独立 JSON 文件,支持颜色标记、固定、归档与全文搜索。
10
10
 
@@ -4,9 +4,9 @@ This plugin rides a supported DeepSeek Harness release. `docs/compatibility.md`
4
4
 
5
5
  ## Baseline
6
6
 
7
- - Floor baseline `dsh-v0.2.2-rc.3`, publishing `@deepseek-ai/dsh` `0.2.2-rc.3`; newest baseline `dsh-v0.2.2-rc.5`, publishing `0.2.2-rc.5`.
7
+ - Floor baseline `dsh-v0.2.2-rc.3`, publishing `@deepseek-ai/dsh` `0.2.2-rc.3`; newest baseline `dsh-v0.2.3-alpha.2`, publishing `0.2.3-alpha.2`.
8
8
  - `tests/seams.ts` pins both tags in `BASELINES` and states `DSH_RANGE`, the single source of truth for `package.json` `engines.dsh`; `tests/compat/manifest.spec.ts` asserts the manifest carries `DSH_RANGE` verbatim.
9
- - `engines.dsh` is `>=0.2.2-rc.3 <0.2.3-0`: it accepts every version from the floor baseline up through the 0.2.2 patch range, including the 0.2.2 final release, and rejects everything below the floor, from `0.2.3-0` up, and the 0.2.3 releases. The cap is the newest baseline's next patch, the first release the seams make no promise about.
9
+ - `engines.dsh` is `>=0.2.2-rc.3 <0.2.4-0`: it accepts every version from the floor baseline up through the whole 0.2.3 line, prereleases included, and rejects everything below the floor and everything from `0.2.4-0` up. The cap is the newest baseline's next patch, the first release the seams make no promise about.
10
10
  - Upgrading to a newer Harness release: verify the 9 needles on the new checkout, update the newest entry in `BASELINES` and the cap in `DSH_RANGE`, and update the README badge, all in the same commit.
11
11
  - `package.json` `dsh.client.inject` names three provider packages and nothing is required from them: the rows express load order only.
12
12
  - `@deepseek-ai/dsh-client-ui-sidebar-right` provides `sidebarRightTabs`.
package/docs/editor.md CHANGED
@@ -61,6 +61,12 @@
61
61
 
62
62
  围栏里的标识符如果不在列表里(手写的 ```` ```rust ````),会作为一个「未收录」项保留在下拉里,不会被重置成空:语言是正文的一部分,静默改写等于丢数据。
63
63
 
64
+ ## 行内代码
65
+
66
+ 行内代码用便签自己的标记色浅铺一层底,与卡片左侧的边缘线、选区浮条的底色同源:胶囊跟着纸色走,换一张便签就换一套颜色,不引入第二套配色。编辑器底色是对话框的,没有纸色可依,所以对话框携带便签的颜色,用同一个标记色。
67
+
68
+ 代码块里的代码不着这层底:围栏已经把它和正文分开了。
69
+
64
70
  ## 链接
65
71
 
66
72
  点链接按钮打开一个对话框,两个字段:链接文字与地址。
@@ -138,7 +144,7 @@
138
144
 
139
145
  ## 底部按钮
140
146
 
141
- 「取消」在左、「保存」在右,同在对话框右下角。
147
+ 「取消」在左、「保存」在右,同在对话框右下角。两个按钮等高、同字重,描边按钮的边框计入高度。
142
148
 
143
149
  ## 查看
144
150
 
package/lib/client.js CHANGED
@@ -1043,12 +1043,6 @@ body[data-ds-dark-theme] .dsh-sticky-root {
1043
1043
  color: var(--dsw-alias-label-secondary);
1044
1044
  }
1045
1045
 
1046
- /* Inline code inside a preview keeps the card's size, not the body scale. */
1047
- .dsh-sticky-card .dsh-sticky-prose-code {
1048
- font-size: inherit;
1049
- line-height: inherit;
1050
- }
1051
-
1052
1046
  /* A preview is a glance, not a document: headings shrink to the card's scale
1053
1047
  instead of borrowing the body's h1/h2/h3 sizes. */
1054
1048
  .dsh-sticky-card .dsh-sticky-prose-h {
@@ -1244,11 +1238,19 @@ body[data-ds-dark-theme] .dsh-sticky-root {
1244
1238
  color: var(--dsw-alias-label-secondary);
1245
1239
  }
1246
1240
 
1241
+ /* The inline-code capsule takes the paper's own ink, mixed into it rather than
1242
+ laid on top: a neutral fill read as a grey slab pasted onto colored paper,
1243
+ while the sheet's own tone reads as part of the sheet. Written here rather
1244
+ than behind a root-level token because a custom property substitutes its
1245
+ var() where it is DECLARED, which is why the mix has to sit inside the rule
1246
+ that resolves the paper. Only a card preview renders this rule, and a card
1247
+ always declares the accent. */
1247
1248
  .dsh-sticky-prose-code {
1248
1249
  padding: 1px 5px;
1249
1250
  border-radius: var(--dsw-radius-xs);
1250
- background: var(--dsw-alias-bg-layer-2);
1251
+ background: color-mix(in srgb, var(--dsh-sticky-accent) 18%, transparent);
1251
1252
  font: var(--dsw-font-markdown-code);
1253
+ font-size: 0.875em;
1252
1254
  }
1253
1255
 
1254
1256
  .dsh-sticky-prose-pre {
@@ -1479,11 +1481,15 @@ body[data-ds-dark-theme] .dsh-sticky-root {
1479
1481
  border-left: 3px solid var(--dsw-alias-border-l2);
1480
1482
  color: var(--dsw-alias-label-secondary);
1481
1483
  }
1484
+ /* The editor has no paper to tint with, but it always opens on a note that has
1485
+ one, so the dialog declares the same accent the card does and the capsule
1486
+ speaks the note's colour language instead of inventing a second one. */
1482
1487
  .dsh-sticky-editor .ProseMirror code {
1483
1488
  padding: 1px 5px;
1484
1489
  border-radius: var(--dsw-radius-xs);
1485
- background: var(--dsw-alias-bg-layer-2);
1490
+ background: color-mix(in srgb, var(--dsh-sticky-accent) 14%, transparent);
1486
1491
  font: var(--dsw-font-markdown-code);
1492
+ font-size: 0.875em;
1487
1493
  }
1488
1494
  .dsh-sticky-editor .ProseMirror pre {
1489
1495
  margin: 0 0 10px;
@@ -1735,6 +1741,9 @@ body[data-ds-dark-theme] .dsh-sticky-root {
1735
1741
  .dsh-sticky-dialog {
1736
1742
  position: relative;
1737
1743
  z-index: 0;
1744
+ /* The note's own ink, shared with the card's marker, so the inline-code
1745
+ capsule in the body can speak the same colour the paper does. */
1746
+ --dsh-sticky-accent: var(--dsh-sticky-tone-gray);
1738
1747
  display: flex;
1739
1748
  flex-direction: column;
1740
1749
  box-sizing: border-box;
@@ -2182,6 +2191,13 @@ body[data-ds-dark-theme] .dsh-sticky-root {
2182
2191
  .dsh-sticky-selectionBar[data-color='red'] { background: var(--dsh-sticky-paper-red); color: var(--dsh-sticky-tone-red); }
2183
2192
  .dsh-sticky-selectionBar[data-color='gray'] { background: var(--dsh-sticky-paper-gray); color: var(--dsh-sticky-tone-gray); }
2184
2193
 
2194
+ .dsh-sticky-dialog[data-color='yellow'] { --dsh-sticky-accent: var(--dsh-sticky-tone-yellow); }
2195
+ .dsh-sticky-dialog[data-color='green'] { --dsh-sticky-accent: var(--dsh-sticky-tone-green); }
2196
+ .dsh-sticky-dialog[data-color='blue'] { --dsh-sticky-accent: var(--dsh-sticky-tone-blue); }
2197
+ .dsh-sticky-dialog[data-color='violet'] { --dsh-sticky-accent: var(--dsh-sticky-tone-violet); }
2198
+ .dsh-sticky-dialog[data-color='red'] { --dsh-sticky-accent: var(--dsh-sticky-tone-red); }
2199
+ .dsh-sticky-dialog[data-color='gray'] { --dsh-sticky-accent: var(--dsh-sticky-tone-gray); }
2200
+
2185
2201
  .dsh-sticky-selectionAction {
2186
2202
  display: inline-flex;
2187
2203
  align-items: center;
@@ -2251,6 +2267,15 @@ body[data-ds-dark-theme] .dsh-sticky-root {
2251
2267
  cursor: pointer;
2252
2268
  }
2253
2269
 
2270
+ /* The footer's outlined actions sit beside the 36px filled primary, so they
2271
+ take the same height and weight. Border-box keeps the hairline inside that
2272
+ height: without it a 0.5px stroke on each edge still reads as uneven. */
2273
+ .dsh-sticky-dialogFoot .dsh-sticky-secondary {
2274
+ box-sizing: border-box;
2275
+ height: 36px;
2276
+ font: var(--dsw-font-s-strong-14);
2277
+ }
2278
+
2254
2279
  @media (hover: hover) {
2255
2280
  .dsh-sticky-secondary:hover { background: var(--dsw-alias-interactive-bg-hover); }
2256
2281
  }
@@ -2577,7 +2602,7 @@ guard; it protects the window between the click and the re-render. */
2577
2602
  if(!(M===null||h)){g(!0),v(``);try{await c({...e?.id===void 0?{}:{id:e.id},title:u,markdown:M.getMarkdown(),color:p,imageWidths:kT(M.getJSON())})||(v(r(`saveFailed`)),g(!1))}catch(e){v(e instanceof Error?e.message:String(e)),g(!1)}}};return(0,f.createElement)(`div`,{className:F.scrim,onMouseDown:e=>{
2578
2603
  /* v8 ignore next -- the dialog stops mousedown propagation, so only a
2579
2604
  direct scrim press ever arrives here. */
2580
- e.target===e.currentTarget&&re()}},(0,f.createElement)(`div`,{className:F.dialog,ref:x,role:`dialog`,"aria-modal":`true`,"aria-labelledby":CE,onMouseDown:e=>{e.stopPropagation()},onKeyDown:e=>{e.key!==`Tab`||e.isComposing||BE(e,e.currentTarget)}},(0,f.createElement)(`h2`,{id:CE,className:F.visuallyHidden},r(t===`create`?`headingCreate`:t===`view`?`headingView`:`headingEdit`)),(0,f.createElement)(`div`,l?{className:F.dialogHead,"data-readonly":``}:{className:F.dialogHead},l?(0,f.createElement)(`h2`,null,u.trim()===``?r(`untitled`):u):(0,f.createElement)(`input`,{ref:E,className:F.titleInput,value:u,placeholder:r(`titlePlaceholder`),"aria-label":r(`titlePlaceholder`),onChange:e=>{d(e.target.value),b(!0)},onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),M?.commands.focus(`end`))}}),l?(0,f.createElement)(`span`,{className:F.badge},r(`archivedBadge`)):null,l?null:(0,f.createElement)(`div`,{className:F.swatches,role:`radiogroup`,"aria-label":r(`colorLabel`)},$g.map(e=>(0,f.createElement)(`button`,{key:e,type:`button`,className:F.swatch,"data-color":e,role:`radio`,"aria-checked":p===e,"aria-label":r(TE(e)),title:r(TE(e)),onClick:()=>{m(e),b(!0)}}))),l?null:(0,f.createElement)(`button`,{type:`button`,className:F.iconButton,"aria-label":r(`close`),title:r(`close`),onClick:re},(0,f.createElement)(je,{size:16}))),l||M===null?null:(0,f.createElement)(QT,{editor:M,t:r,noteTitle:u,readMarkdown:()=>M.getMarkdown()}),(0,f.createElement)(`div`,{className:F.editorScroll,ref:S,onMouseDown:e=>{e.target===e.currentTarget&&M!==null&&M.isEditable&&(e.preventDefault(),M.commands.focus(`end`))}},(0,f.createElement)(`div`,l?{className:F.editor,"data-readonly":``}:{className:F.editor},(0,f.createElement)(Uv,{editor:M}))),M===null?null:(0,f.createElement)(SE,{editor:M,t:r,color:p,dialog:x,scroll:S,dismissRef:C,composer:a}),l?(0,f.createElement)(`div`,{className:F.dialogFoot},(0,f.createElement)(`button`,{ref:ee,type:`button`,className:F.secondary,onClick:re},r(`close`))):(0,f.createElement)(`div`,{className:F.dialogFoot},_===``?null:(0,f.createElement)(`span`,{className:F.error,role:`alert`},_),(0,f.createElement)(`button`,{type:`button`,className:F.secondary,onClick:re,disabled:h},r(`cancel`)),(0,f.createElement)(`button`,{type:`button`,className:F.primary,onClick:()=>{ie()},disabled:h||A||M===null},r(h?`saving`:`save`)))),w?(0,f.createElement)(zE,{t:r,onKeep:()=>{T(!1)},onDiscard:s,keepRef:D}):null)}function zE({t:e,onKeep:t,onDiscard:n,keepRef:r}){return(0,f.createElement)(`div`,{className:F.confirmScrim,onMouseDown:e=>{
2605
+ e.target===e.currentTarget&&re()}},(0,f.createElement)(`div`,{className:F.dialog,ref:x,role:`dialog`,"aria-modal":`true`,"aria-labelledby":CE,"data-color":p,onMouseDown:e=>{e.stopPropagation()},onKeyDown:e=>{e.key!==`Tab`||e.isComposing||BE(e,e.currentTarget)}},(0,f.createElement)(`h2`,{id:CE,className:F.visuallyHidden},r(t===`create`?`headingCreate`:t===`view`?`headingView`:`headingEdit`)),(0,f.createElement)(`div`,l?{className:F.dialogHead,"data-readonly":``}:{className:F.dialogHead},l?(0,f.createElement)(`h2`,null,u.trim()===``?r(`untitled`):u):(0,f.createElement)(`input`,{ref:E,className:F.titleInput,value:u,placeholder:r(`titlePlaceholder`),"aria-label":r(`titlePlaceholder`),onChange:e=>{d(e.target.value),b(!0)},onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),M?.commands.focus(`end`))}}),l?(0,f.createElement)(`span`,{className:F.badge},r(`archivedBadge`)):null,l?null:(0,f.createElement)(`div`,{className:F.swatches,role:`radiogroup`,"aria-label":r(`colorLabel`)},$g.map(e=>(0,f.createElement)(`button`,{key:e,type:`button`,className:F.swatch,"data-color":e,role:`radio`,"aria-checked":p===e,"aria-label":r(TE(e)),title:r(TE(e)),onClick:()=>{m(e),b(!0)}}))),l?null:(0,f.createElement)(`button`,{type:`button`,className:F.iconButton,"aria-label":r(`close`),title:r(`close`),onClick:re},(0,f.createElement)(je,{size:16}))),l||M===null?null:(0,f.createElement)(QT,{editor:M,t:r,noteTitle:u,readMarkdown:()=>M.getMarkdown()}),(0,f.createElement)(`div`,{className:F.editorScroll,ref:S,onMouseDown:e=>{e.target===e.currentTarget&&M!==null&&M.isEditable&&(e.preventDefault(),M.commands.focus(`end`))}},(0,f.createElement)(`div`,l?{className:F.editor,"data-readonly":``}:{className:F.editor},(0,f.createElement)(Uv,{editor:M}))),M===null?null:(0,f.createElement)(SE,{editor:M,t:r,color:p,dialog:x,scroll:S,dismissRef:C,composer:a}),l?(0,f.createElement)(`div`,{className:F.dialogFoot},(0,f.createElement)(`button`,{ref:ee,type:`button`,className:F.secondary,onClick:re},r(`close`))):(0,f.createElement)(`div`,{className:F.dialogFoot},_===``?null:(0,f.createElement)(`span`,{className:F.error,role:`alert`},_),(0,f.createElement)(`button`,{type:`button`,className:F.secondary,onClick:re,disabled:h},r(`cancel`)),(0,f.createElement)(`button`,{type:`button`,className:F.primary,onClick:()=>{ie()},disabled:h||A||M===null},r(h?`saving`:`save`)))),w?(0,f.createElement)(zE,{t:r,onKeep:()=>{T(!1)},onDiscard:s,keepRef:D}):null)}function zE({t:e,onKeep:t,onDiscard:n,keepRef:r}){return(0,f.createElement)(`div`,{className:F.confirmScrim,onMouseDown:e=>{
2581
2606
  /* v8 ignore next -- the card stops mousedown propagation, so only a
2582
2607
  press on the scrim itself arrives here. */
2583
2608
  e.target===e.currentTarget&&t()}},(0,f.createElement)(`div`,{className:F.confirmDialog,role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":wE,onMouseDown:e=>{e.stopPropagation()},onKeyDown:e=>{e.key!==`Tab`||e.isComposing||BE(e,e.currentTarget)}},(0,f.createElement)(`h2`,{id:wE,className:F.confirmTitle},e(`dirtyTitle`)),(0,f.createElement)(`p`,{className:F.confirmBody},e(`dirtyBody`)),(0,f.createElement)(`div`,{className:F.confirmActions},(0,f.createElement)(`button`,{ref:r,type:`button`,className:F.secondary,onClick:t},e(`dirtyKeep`)),(0,f.createElement)(`button`,{type:`button`,className:F.danger,onClick:n},e(`dirtyConfirm`)))))}function BE(e,t){let n=t.querySelectorAll(`button:not([disabled]), [href], input, textarea, [tabindex]:not([tabindex="-1"]), .ProseMirror`),r=n[0],i=n[n.length-1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-sticky",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "侧栏便签:卡片墙 + 文档式 Markdown 编辑器,便签存在 $DSH_HOME/storages/dsh-sticky/notes 下的独立 JSON 文件里。",
5
5
  "repository": {
6
6
  "type": "git",
@@ -105,8 +105,8 @@
105
105
  "react-dom": "18.3.1"
106
106
  },
107
107
  "engines": {
108
- "node": ">=24.0.0",
109
- "dsh": ">=0.2.2-rc.3 <0.2.3-0"
108
+ "node": "^24.22.3 || >=26.13.1",
109
+ "dsh": ">=0.2.2-rc.3 <0.2.4-0"
110
110
  },
111
111
  "publishConfig": {
112
112
  "access": "public"