webcake-landing-mcp 1.0.71 → 1.0.72
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/dist/changelog.json
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "1.0.72",
|
|
4
|
+
"d": "13/06/2026",
|
|
5
|
+
"type": "Fixed",
|
|
6
|
+
"en": "When cloning a LadiPage or Webcake-published page via ingest_html / ingest_url, html-box elements' passthrough HTML content now has its…",
|
|
7
|
+
"vi": "Khi clone trang LadiPage hoặc Webcake-published qua ingest_html / ingest_url, nội dung HTML passthrough của các phần tử html-box nay được đổi tên…"
|
|
8
|
+
},
|
|
2
9
|
{
|
|
3
10
|
"v": "1.0.71",
|
|
4
11
|
"d": "13/06/2026",
|
|
@@ -33,12 +40,5 @@
|
|
|
33
40
|
"type": "Added",
|
|
34
41
|
"en": "upload_images now accepts local file paths in the urls parameter — absolute POSIX paths (/…), home-directory paths (~/…), file:// URIs, and Windows…",
|
|
35
42
|
"vi": "upload_images nay chấp nhận đường dẫn file cục bộ trong tham số urls — đường dẫn POSIX tuyệt đối (/…), đường dẫn thư mục home (~/…), URI file://, và…"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"v": "1.0.66",
|
|
39
|
-
"d": "12/06/2026",
|
|
40
|
-
"type": "Changed",
|
|
41
|
-
"en": "Generation guide (get_generation_guide) and server instructions now prescribe a four-step image sourcing priority: (1) re-host user-supplied or…",
|
|
42
|
-
"vi": "Hướng dẫn sinh trang (get_generation_guide) và instruction server nay quy định thứ tự ưu tiên bốn bước để lấy ảnh: (1) re-host ảnh do người dùng…"
|
|
43
43
|
}
|
|
44
44
|
]
|
|
@@ -33,6 +33,17 @@ function num(v) {
|
|
|
33
33
|
function escapeHtml(s) {
|
|
34
34
|
return s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* De-fingerprint raw html-box passthrough: rename the source builder's class
|
|
38
|
+
* tokens to a Webcake-neutral prefix so a clone doesn't ship LadiPage class names.
|
|
39
|
+
* Covers both `class="ladi-…"` attributes and inline `.ladi-…` CSS selectors.
|
|
40
|
+
* The known html-embed wrapper maps to Webcake's element name; any other `ladi-*`
|
|
41
|
+
* gets the `webcake-` prefix. The lookbehind avoids touching `ladicdn`/URL paths
|
|
42
|
+
* (no `ladi-` token there), so image links are left intact.
|
|
43
|
+
*/
|
|
44
|
+
function sanitizeBuilderClasses(html) {
|
|
45
|
+
return html.replace(/ladi-html-code/g, "webcake-html-box").replace(/(?<![\w/])ladi-/g, "webcake-");
|
|
46
|
+
}
|
|
36
47
|
const BG_URL_RE = /url\(\s*["']?(https?:\/\/[^"')]+)["']?\s*\)/;
|
|
37
48
|
/** The editor-canonical url() background shorthand its picker can re-parse. */
|
|
38
49
|
function canonicalBg(src) {
|
|
@@ -557,7 +568,7 @@ function convertElementInner(ctx, e, sectionH) {
|
|
|
557
568
|
id: uniqueId(ctx, e.id),
|
|
558
569
|
type: "html-box",
|
|
559
570
|
responsive: responsiveOf(ctx, e.box, {}, sectionH),
|
|
560
|
-
specials: { html: escapeHtml(e.html) },
|
|
571
|
+
specials: { html: escapeHtml(sanitizeBuilderClasses(e.html)) },
|
|
561
572
|
};
|
|
562
573
|
}
|
|
563
574
|
// Unknown/unsupported type — degrade gracefully, keep geometry.
|
package/dist/smoke.js
CHANGED
|
@@ -401,6 +401,7 @@ const ladiHtml = `<!DOCTYPE html><html><head><title>Ladi Test</title>
|
|
|
401
401
|
#SPINLUCKY100 { width: 276px; height: 276px; top: 122px; left: 72px; }
|
|
402
402
|
#SPINLUCKY100 .ladi-spin-lucky-screen:before { background-image: url("https://w.ladicdn.com/s500x500/abc/wheel-face.svg"); }
|
|
403
403
|
#SPINLUCKY100 .ladi-spin-lucky-start { background-image: url("https://w.ladicdn.com/source/spin-btn.svg"); }
|
|
404
|
+
#HTML_CODE110 { width: 200px; height: 100px; top: 300px; left: 10px; }
|
|
404
405
|
#BUTTON30 { width: 240px; height: 40px; top: auto; left: 10px; bottom: 10px; position: fixed; z-index: 90000050; }
|
|
405
406
|
#BUTTON30 > .ladi-button > .ladi-button-background { background-color: rgb(232, 58, 48); }
|
|
406
407
|
#BUTTON_TEXT30 { width: 241px; top: 9px; left: 0px; }
|
|
@@ -432,6 +433,7 @@ const ladiHtml = `<!DOCTYPE html><html><head><title>Ladi Test</title>
|
|
|
432
433
|
</form></div>
|
|
433
434
|
<div id="LIST_PARAGRAPH80" class="ladi-element"><div class="ladi-list-paragraph"><ul><li>Thành phần thiên nhiên</li><li>Không đau rát</li></ul></div></div>
|
|
434
435
|
<div id="COUNTDOWN90" class="ladi-element"><div class="ladi-countdown"><span>00</span></div></div>
|
|
436
|
+
<div id="HTML_CODE110" class="ladi-element"><div class="ladi-html-code"><style>.ladi-foo{color:red}</style><div class="ladi-foo">embed</div></div></div>
|
|
435
437
|
</div></div>
|
|
436
438
|
<div id="SECTION_POPUP" class="ladi-section"><div class="ladi-container">
|
|
437
439
|
<div id="POPUP70" class="ladi-element"><div class="ladi-popup"><div class="ladi-popup-background"></div>
|
|
@@ -538,6 +540,11 @@ const cSpin = cPop?.children?.find((c) => c.id === "spinlucky100");
|
|
|
538
540
|
check("clone: spin-wheel prizes encoded, percents kept (sum 100)", cSpin?.type === "spin-wheel" && cSpin.specials.code === "PRIZE1|Mất lượt|0\nPRIZE2|FreeShip|100", cSpin?.specials?.code);
|
|
539
541
|
check("clone: spin-wheel uses the ORIGINAL wheel + button art (not the editor default)", cSpin?.specials?.background === "https://w.ladicdn.com/abc/wheel-face.svg" &&
|
|
540
542
|
cSpin?.specials?.backgroundBtn === "https://w.ladicdn.com/source/spin-btn.svg", { background: cSpin?.specials?.background, backgroundBtn: cSpin?.specials?.backgroundBtn });
|
|
543
|
+
const cHtmlBox = cSec2.children.find((c) => c.id === "html_code110");
|
|
544
|
+
check("clone: html-box passthrough renames builder classes (ladi-html-code → webcake-html-box, inline .ladi-* CSS too)", cHtmlBox?.type === "html-box" &&
|
|
545
|
+
/webcake-html-box/.test(cHtmlBox.specials.html) &&
|
|
546
|
+
/webcake-foo/.test(cHtmlBox.specials.html) &&
|
|
547
|
+
!/ladi-/.test(cHtmlBox.specials.html), cHtmlBox?.specials?.html);
|
|
541
548
|
console.log("== expand: image-block published background derives from specials.src (placeholder seed must not win) ==");
|
|
542
549
|
{
|
|
543
550
|
const mk = (src) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webcake-landing-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.72",
|
|
4
4
|
"description": "MCP server exposing Webcake landing-page element schemas + AI usage hints, and persisting LLM-generated page sources to a Webcake backend.",
|
|
5
5
|
"mcpName": "io.github.vuluu2k/webcake-landing-mcp",
|
|
6
6
|
"type": "module",
|