sbuilder-mcp 0.11.1 → 0.11.2

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/CHANGELOG.md CHANGED
@@ -6,6 +6,11 @@ All notable changes to this project are documented in this file.
6
6
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
7
7
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
8
 
9
+ ## [0.11.2] - 2026-09-09
10
+
11
+ ### Fixed
12
+ - sb_set's routing of a hover write to an element's legacy home (a `button`, for instance) now also clears any leftover values in the unread `states.hover` slot in the same call, instead of leaving them behind for `sb_review` to keep reporting as `hover_dead`; the finding's own message previously named `unset` as the way to remove them, which could not reach the legacy home either, so the documented fix was unreachable.
13
+
9
14
  ## [0.11.1] - 2026-09-09
10
15
 
11
16
  ### Added
package/CHANGELOG.vi.md CHANGED
@@ -6,6 +6,11 @@ Mọi thay đổi đáng chú ý của dự án được ghi lại trong file n
6
6
  Định dạng dựa trên [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
7
7
  và dự án tuân theo [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
8
 
9
+ ## [0.11.2] - 2026-09-09
10
+
11
+ ### Fixed
12
+ - Khi sb_set định tuyến một lần ghi hover tới nơi lưu cũ của element (ví dụ `button`), giờ nó cũng xoá luôn mọi giá trị còn sót trong slot `states.hover` không ai đọc, ngay trong cùng một lệnh — thay vì để lại chúng cho sb_review tiếp tục báo là `hover_dead`; thông báo của chính finding này trước đây nêu `unset` là cách xoá, nhưng `unset` cũng không thể chạm tới nơi lưu cũ đó, khiến cách sửa được ghi ra là không thể thực hiện được.
13
+
9
14
  ## [0.11.1] - 2026-09-09
10
15
 
11
16
  ### Added
@@ -264,6 +264,29 @@ export function setKeys(doc, id, keys, opts) {
264
264
  // compiler reads. Routed rather than refused: the caller asked for a hover
265
265
  // and there is a home that works; `hoverRoutingNote` says where it went.
266
266
  if (opts.state === HOVER_STATE && namespace === 'style' && hoverHome(doc.node(id).data.type) === 'legacy') {
267
+ // …AND CLEAR THE SLOT NOBODY READS, in the same call.
268
+ //
269
+ // On an element with this home, `states.hover` has no legitimate use: the
270
+ // universal compiler stands aside for it and its own renderer looks in the
271
+ // flat map. Leaving values there is the exact defect `sb_review` reports as
272
+ // `hover_dead`, so a rewrite that repaired the look and left the dead copy
273
+ // behind would fix the page and keep the finding — and the fix that
274
+ // finding names would still be unreachable, which is the shape this repo
275
+ // has now closed twice.
276
+ //
277
+ // Safe against the platform changing its mind: if a button ever keeps its
278
+ // hover in the node, its meta's `storage` becomes 'node', HOVER_HOMES says
279
+ // 'state', and this branch does not run at all.
280
+ const node = doc.node(id);
281
+ const dead = [];
282
+ if (node.states?.[HOVER_STATE] !== undefined) {
283
+ dead.push({ op: 'unset', path: ['nodes', id, 'states', HOVER_STATE] });
284
+ }
285
+ for (const [bp, slot] of Object.entries(node.responsive ?? {})) {
286
+ if (slot?.states?.[HOVER_STATE] !== undefined) {
287
+ dead.push({ op: 'unset', path: ['nodes', id, 'responsive', bp, 'states', HOVER_STATE] });
288
+ }
289
+ }
267
290
  return [
268
291
  ...Object.entries(keys).map(([k, v]) => ({
269
292
  op: 'set',
@@ -271,6 +294,7 @@ export function setKeys(doc, id, keys, opts) {
271
294
  value: v,
272
295
  })),
273
296
  ...(opts.unset ?? []).map((k) => ({ op: 'unset', path: legacyHoverPath(id, k) })),
297
+ ...dead,
274
298
  ];
275
299
  }
276
300
  // Base state and per-breakpoint state are DIFFERENT PLACES in the document,
@@ -60,10 +60,9 @@ export const FIX = {
60
60
  '{ "overflowX": "visible", "overflowY": "visible" } — or move the pinned node outside it. ' +
61
61
  'Sticky resolves against its nearest SCROLLING ancestor, so a clipping one becomes that ' +
62
62
  'ancestor and the node pins inside a box that never scrolls.',
63
- hover_dead: 'Rewrite it: sb_set id "<id>", namespace style, state "hover", keys { … } — sb_set now ' +
64
- 'routes a hover to the home its element declares, and reports where it went. The values ' +
65
- 'currently in states.hover are read by nobody; remove them with the same call\'s `unset` ' +
66
- 'once the working copy is in place.',
63
+ hover_dead: 'Rewrite it with the same values: sb_set id "<id>", namespace style, state "hover", ' +
64
+ 'keys { … } — read them off the node first, because that one call both writes them where ' +
65
+ 'the renderer looks AND clears the slot nobody reads. Nothing else to do afterwards.',
67
66
  stuck_no_host: 'Pin something: sb_set id "<id>" (or the section it lives in), namespace style, keys ' +
68
67
  '{ "position": "sticky" } — sb_set seeds the offset and the layer order with it. Until ' +
69
68
  'then the platform compiles no rule for this state at all, so the override is stored, ' +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbuilder-mcp",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "description": "MCP server that designs and operates a Store Builder site — pages, data, theme and publish — through the platform's own API and live-edit protocol.",
5
5
  "mcpName": "io.github.vuluu2k/sbuilder-mcp",
6
6
  "type": "module",