sbuilder-mcp 0.41.0 → 0.42.0
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 +10 -0
- package/CHANGELOG.vi.md +10 -0
- package/README.md +1 -1
- package/README.vi.md +1 -1
- package/dist/catalog/api.generated.js +5 -1
- package/dist/catalog/checkout.generated.js +15 -1
- package/dist/catalog/deadkeys.generated.js +29 -0
- package/dist/catalog/element-search.js +21 -3
- package/dist/catalog/elements.generated.js +630 -15
- package/dist/catalog/shapes.generated.js +11 -1
- package/dist/catalog/storepages.generated.js +156 -7
- package/dist/catalog/translations.generated.js +8 -3
- package/dist/domains/site/vocabulary.js +142 -1
- package/dist/tools/page.js +33 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,16 @@ 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.42.0] - 2026-09-14
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- sb_traits_for now returns specials_values alongside config_values, growing the legal-value vocabulary from 3 globally-unique keys to 26 keys scoped per element (cart-total's part, breadcrumb's source, divider's contentType/contentPosition/orientation, dropdown/popover's panelAlign/placement, media-dataset's layout, popup's triggerType, tab's tabPosition, product-image-feature's mainImageSource, list-dataset's loadingMode, locale-switcher's labelMode, member-field's field, and the shared backgroundSceneSource among them), so a control whose name does not match its write key still resolves to the right vocabulary; sb_set now warns when a written value falls outside the element's vocabulary, naming the values that actually do something.
|
|
13
|
+
- sb_set now warns when a config or specials write targets a key that no renderer, editor, or runtime reads anywhere in the platform, instead of storing it silently with no effect at all; the first catalog scan of every seeded key against the platform's own source found exactly one, config.splitDirection on image-comparison.
|
|
14
|
+
- npm run codegen and npm run codegen:check now warn when an element's own AI hints describe it in "renders only through/inside" language while the element is missing from the inert-element table or its rejection ledger, catching drift like the quickview element that had already shipped unnoticed.
|
|
15
|
+
- The catalog now covers the platform's background 3D scene feature on flex-section, flex-block and dataset-block (backgroundSceneSource, effect, gallery, model, veil and color config keys), reachable through sb_traits_for and sb_add.
|
|
16
|
+
- A product's shape (sb_api_find / sb_api_call) now includes modelUrl, the product's optional 3D model URL, and the binding-source count grew from 78 to 79 to cover it.
|
|
17
|
+
- chat-widget's launcher text is now translatable through sb_traits_for's translatable field, alongside its existing title.
|
|
18
|
+
|
|
9
19
|
## [0.41.0] - 2026-09-13
|
|
10
20
|
|
|
11
21
|
### Added
|
package/CHANGELOG.vi.md
CHANGED
|
@@ -6,6 +6,16 @@ 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.42.0] - 2026-09-14
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- sb_traits_for giờ trả thêm specials_values bên cạnh config_values, mở rộng bảng giá trị hợp lệ từ 3 khóa dùng chung toàn cục lên 26 khóa gắn theo từng phần tử (part của cart-total, source của breadcrumb, contentType/contentPosition/orientation của divider, panelAlign/placement của dropdown/popover, layout của media-dataset, triggerType của popup, tabPosition của tab, mainImageSource của product-image-feature, loadingMode của list-dataset, labelMode của locale-switcher, field của member-field, cùng backgroundSceneSource dùng chung), nhờ đó một control có tên khác với key nó ghi vẫn tra đúng bảng giá trị. sb_set giờ cảnh báo khi giá trị được ghi nằm ngoài bảng giá trị của phần tử đó, nêu rõ những giá trị thật sự có tác dụng.
|
|
13
|
+
- sb_set giờ cảnh báo khi một lệnh ghi config hoặc specials nhắm vào một key mà không renderer, không editor, không runtime nào trong nền tảng đọc tới, thay vì âm thầm lưu lại mà không có tác dụng gì; lượt quét đầu tiên đối chiếu mọi key được seed với chính mã nguồn nền tảng tìm ra đúng một trường hợp, config.splitDirection trên image-comparison.
|
|
14
|
+
- npm run codegen và npm run codegen:check giờ cảnh báo khi mô tả AI hint của một phần tử dùng ngôn ngữ kiểu "chỉ render qua/bên trong" nhưng phần tử đó lại vắng mặt trong bảng phần tử "inert" lẫn sổ loại trừ của nó, bắt được các trường hợp trôi dạt như phần tử quickview từng lên hàng mà không ai để ý.
|
|
15
|
+
- Catalog giờ bao phủ tính năng nền cảnh 3D của nền tảng trên flex-section, flex-block và dataset-block (các config key backgroundSceneSource, effect, gallery, model, veil và màu sắc), có thể tra qua sb_traits_for và dùng qua sb_add.
|
|
16
|
+
- Shape của sản phẩm (sb_api_find / sb_api_call) giờ có thêm modelUrl, URL mô hình 3D tùy chọn của sản phẩm, và số nguồn binding tăng từ 78 lên 79 để bao phủ nó.
|
|
17
|
+
- Chữ trên nút mở chat của chat-widget giờ dịch được qua field translatable của sb_traits_for, cùng với title vốn đã có.
|
|
18
|
+
|
|
9
19
|
## [0.41.0] - 2026-09-13
|
|
10
20
|
|
|
11
21
|
### Added
|
package/README.md
CHANGED
|
@@ -113,7 +113,7 @@ in this client: one would put the very key the platform exists to hold back into
|
|
|
113
113
|
| `sb_undo` | Put back what a PUT replaced. The SECOND answer for a page, not the only one: the platform has versions, history and restore (`sb_api_find` "page versions"), which outlive this process — reach for those first and use this for every other shaped PUT |
|
|
114
114
|
|
|
115
115
|
Twenty-eight tools, **524 API operations** (175 of the 234 writes carrying a body shape read
|
|
116
|
-
off the handler), 113 elements,
|
|
116
|
+
off the handler), 113 elements, 79 binding sources. `sb_api_find`
|
|
117
117
|
is an index rather than a tool per endpoint, so the tool list stays short while everything
|
|
118
118
|
the platform can do stays reachable — and operations added to the platform arrive with the
|
|
119
119
|
next `npm run codegen`.
|
package/README.vi.md
CHANGED
|
@@ -110,7 +110,7 @@ nhét ngược lại vào mọi bản cài.
|
|
|
110
110
|
| `sb_undo` | Trả lại thứ mà một lệnh PUT đã ghi đè. Với TRANG thì đây là đường về thứ hai chứ không phải duy nhất: nền tảng có version, history và restore (`sb_api_find` "page versions"), và chúng sống lâu hơn tiến trình này — hãy dùng chúng trước, còn tool này cho mọi PUT có hình dạng khác |
|
|
111
111
|
|
|
112
112
|
Hai mươi tám tool, **524 operation API** (175 trong 234 lệnh ghi có hình dạng body đọc thẳng
|
|
113
|
-
từ handler), 113 element,
|
|
113
|
+
từ handler), 113 element, 79 nguồn binding. `sb_api_find` là
|
|
114
114
|
một chỉ mục chứ không phải mỗi endpoint một tool, nên danh sách tool vẫn ngắn trong khi mọi
|
|
115
115
|
thứ nền tảng làm được vẫn với tới — và operation mới thêm bên nền tảng sẽ tự có sau lần
|
|
116
116
|
`npm run codegen` kế tiếp.
|
|
@@ -8717,7 +8717,7 @@ export const API_OPERATIONS = [
|
|
|
8717
8717
|
"in": "query",
|
|
8718
8718
|
"required": false,
|
|
8719
8719
|
"type": "string",
|
|
8720
|
-
"description": "image | video | font | other"
|
|
8720
|
+
"description": "image | video | font | model | other"
|
|
8721
8721
|
},
|
|
8722
8722
|
{
|
|
8723
8723
|
"name": "search",
|
|
@@ -17503,6 +17503,10 @@ export const API_DEFINITIONS = {
|
|
|
17503
17503
|
}
|
|
17504
17504
|
]
|
|
17505
17505
|
},
|
|
17506
|
+
"modelUrl": {
|
|
17507
|
+
"description": "ModelURL is the product's 3D model (.glb / .gltf), so a page can show the\nthing itself instead of photographs of it.\n\nONE model, not a gallery — which is why this is a scalar beside the two\nslices above rather than a third one. A product has one shape; a second\nmodel of the same product would be a different colourway or a different\nproduct, and both of those already have somewhere to live. Making it a\nlist \"for later\" would cost a migration to take back and would force\nevery reader to answer \"which one\" with no rule to answer it by.\n\nEmpty is the normal value and means \"no model\": every product that\nexisted before this field, and every product in every store that sells\nthings nobody has modelled.\n\nIt is a URL into this site's own media library in the ordinary case, but\nnothing here requires that — an externally hosted .glb is a legitimate\nvalue, and the usage adapter simply finds no match for one, which is the\ntrue answer.",
|
|
17508
|
+
"type": "string"
|
|
17509
|
+
},
|
|
17506
17510
|
"moneyOverride": {
|
|
17507
17511
|
"description": "MoneyOverride is an opaque per-product money-display override (compact-convert\nrules + exchange-rate overrides), stored as a JSONB blob. The domain keeps it\nopaque — it is decoded at the render boundary (bindings.ProductSource →\nrender.ProductData) — so products stays decoupled from render/money, the same\nway the site settings document is an opaque blob. Empty ({}/null) → no override.",
|
|
17508
17512
|
"type": "array",
|
|
@@ -556,7 +556,21 @@ export const CHECKOUT_PAGE_DOCUMENT = {
|
|
|
556
556
|
"paddingTop": "48px",
|
|
557
557
|
"paddingBottom": "48px"
|
|
558
558
|
},
|
|
559
|
-
"config": {
|
|
559
|
+
"config": {
|
|
560
|
+
"backgroundSceneSource": "",
|
|
561
|
+
"backgroundSceneEffect": "gradient-mesh",
|
|
562
|
+
"backgroundSceneGallery": "podium",
|
|
563
|
+
"backgroundSceneSpeed": "normal",
|
|
564
|
+
"backgroundSceneIntensity": "normal",
|
|
565
|
+
"backgroundSceneColors": "theme",
|
|
566
|
+
"backgroundSceneColor1": "#171717",
|
|
567
|
+
"backgroundSceneColor2": "#ffffff",
|
|
568
|
+
"backgroundSceneColor3": "#6b7280",
|
|
569
|
+
"backgroundSceneUrl": "",
|
|
570
|
+
"backgroundSceneModelUrl": "",
|
|
571
|
+
"backgroundSceneVeil": 0,
|
|
572
|
+
"backgroundSceneVeilColor": "#000000"
|
|
573
|
+
},
|
|
560
574
|
"specials": {
|
|
561
575
|
"stylePreset": "container-section"
|
|
562
576
|
},
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const DEAD_KEY_SOURCE = {
|
|
2
|
+
"files": 3966,
|
|
3
|
+
"identifiers": 76235,
|
|
4
|
+
"seededKeys": 384,
|
|
5
|
+
"dead": 1
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Keys an element SEEDS and no renderer anywhere reads.
|
|
9
|
+
*
|
|
10
|
+
* Keyed by the key NAME, not by `namespace.key`: the index is a flat set of
|
|
11
|
+
* identifiers, so it cannot tell one namespace from the other and a key read
|
|
12
|
+
* anywhere is read in both.
|
|
13
|
+
*
|
|
14
|
+
* A write to one of these stores, saves, publishes and renders exactly as
|
|
15
|
+
* before. `sb_set` says so at the moment of the write; nothing refuses it,
|
|
16
|
+
* because the platform accepts the value and a refusal here would invent a rule
|
|
17
|
+
* it does not have.
|
|
18
|
+
*/
|
|
19
|
+
export const DEAD_KEYS = {
|
|
20
|
+
"splitDirection": {
|
|
21
|
+
"key": "splitDirection",
|
|
22
|
+
"namespaces": [
|
|
23
|
+
"config"
|
|
24
|
+
],
|
|
25
|
+
"seededBy": [
|
|
26
|
+
"image-comparison"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ELEMENTS, TRAIT_WRITES } from './elements.generated.js';
|
|
2
|
-
import { animationValues, animationVocabulary, vocabulariesForWrites } from '../domains/site/vocabulary.js';
|
|
2
|
+
import { animationValues, animationVocabulary, elementVocabularies, sharedVocabularies, vocabulariesForWrites, } from '../domains/site/vocabulary.js';
|
|
3
3
|
import { neverTranslatedOn, translatableSpecials } from '../domains/site/translate.js';
|
|
4
4
|
/** Eight to choose from; the hints for the chosen one come with sb_traits_for. */
|
|
5
5
|
export const DEFAULT_CATALOG_LIMIT = 8;
|
|
@@ -120,10 +120,28 @@ export function traitsFor(type, control) {
|
|
|
120
120
|
// this element's defaults and in its control list, and no TRAIT_WRITES entry
|
|
121
121
|
// names it — so a per-control attachment reaches none of them, which is how
|
|
122
122
|
// the first version of this was wrong.
|
|
123
|
+
//
|
|
124
|
+
// TWO FIELDS RATHER THAN ONE, because the caller writes two namespaces and
|
|
125
|
+
// `sb_set` takes them separately. Every entry names its `writeKey`, which is
|
|
126
|
+
// the half a control name does not give you: `divider_orientation` writes
|
|
127
|
+
// `orientation`, and eleven of the thirteen joined controls are like it.
|
|
123
128
|
...(() => {
|
|
124
129
|
const keys = new Set([...Object.keys(el.defaults?.config ?? {}), ...el.controls]);
|
|
125
|
-
|
|
126
|
-
|
|
130
|
+
// The globally-unique three keep their own key AS the write key; saying so
|
|
131
|
+
// is what lets a reader take every entry in this object the same way.
|
|
132
|
+
const config = Object.fromEntries(Object.entries(vocabulariesForWrites([...keys])).map(([k, v]) => [k, { writeKey: k, ...v }]));
|
|
133
|
+
const specials = {};
|
|
134
|
+
const own = { ...sharedVocabularies(el.defaults ?? {}), ...elementVocabularies(el.type) };
|
|
135
|
+
for (const [k, { target, ...v }] of Object.entries(own)) {
|
|
136
|
+
// `target` is dropped rather than repeated: the field it lands in is the
|
|
137
|
+
// namespace, and a key restated on every entry is the dilution the token
|
|
138
|
+
// budget has already caught twice on this one result.
|
|
139
|
+
(target === 'specials' ? specials : config)[k] = v;
|
|
140
|
+
}
|
|
141
|
+
return {
|
|
142
|
+
...(Object.keys(config).length ? { config_values: config } : {}),
|
|
143
|
+
...(Object.keys(specials).length ? { specials_values: specials } : {}),
|
|
144
|
+
};
|
|
127
145
|
})(),
|
|
128
146
|
// THE ENTRANCE ANIMATION, for the 73 element types that offer it. It does
|
|
129
147
|
// not ride in `config_values` because it is not a word — it is an OBJECT
|