mosaic-headless 1.40.1 → 1.40.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/README.ja.md +2 -2
- package/README.ko.md +2 -2
- package/README.md +2 -2
- package/README.zh-TW.md +2 -2
- package/SKILL.md +1 -1
- package/assets/templates/platforms/claude-ai.json +1 -1
- package/assets/templates/platforms/claude-code.json +1 -1
- package/assets/templates/platforms/codex-cli.json +1 -1
- package/assets/templates/platforms/copilot.json +1 -1
- package/assets/templates/platforms/gemini-cli.json +1 -1
- package/package.json +1 -1
- package/tools/sync_nodes.py +9 -3
- package/tools/test_mosaic.py +24 -0
package/README.ja.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<img src="https://img.shields.io/badge/node_properties-120-success?style=flat-square" alt="120 個の node プロパティ">
|
|
19
19
|
<img src="https://img.shields.io/badge/style_properties-101-success?style=flat-square" alt="101 個のスタイルプロパティ">
|
|
20
20
|
<img src="https://img.shields.io/badge/responsive_checks-733-blueviolet?style=flat-square" alt="733 件のレスポンシブ検査">
|
|
21
|
-
<img src="https://img.shields.io/badge/self--tests-
|
|
21
|
+
<img src="https://img.shields.io/badge/self--tests-55-blueviolet?style=flat-square" alt="55 項目のセルフテスト">
|
|
22
22
|
</p>
|
|
23
23
|
|
|
24
24
|
<p align="center">
|
|
@@ -183,7 +183,7 @@ node type、node プロパティ、スタイルプロパティ、スタイル状
|
|
|
183
183
|
| `data/theme-zip-verification.csv` | 22 | Mosaic 自身のテーマ ZIP を往復させて比較 |
|
|
184
184
|
| `data/conversion-batch.csv` | 19 | あるサイトのすべての Elementor ページを変換・構築・検査 |
|
|
185
185
|
|
|
186
|
-
- セルフテスト:`python tools/test_mosaic.py`、オフラインの
|
|
186
|
+
- セルフテスト:`python tools/test_mosaic.py`、オフラインの 55 項目(検索、中国語の用語、構築結果の形と拒否ルール、公開されている構築インターフェース、このリポジトリの数値とプライバシー)。
|
|
187
187
|
- evals:Mosaic 1.0.10〜1.0.12 の挙動に関する 16 問。skill ありで 16/16、なしで 0/16。結果:[evals/RESULTS.md](evals/RESULTS.md)。
|
|
188
188
|
- `SKILL.md`、これらの README、バッジの数値は、`tools/check_numbers.py` がデータと照合しています。詳細:[verification-record.md](references/verification-record.md)。
|
|
189
189
|
|
package/README.ko.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<img src="https://img.shields.io/badge/node_properties-120-success?style=flat-square" alt="120개 node 속성">
|
|
19
19
|
<img src="https://img.shields.io/badge/style_properties-101-success?style=flat-square" alt="101개 스타일 속성">
|
|
20
20
|
<img src="https://img.shields.io/badge/responsive_checks-733-blueviolet?style=flat-square" alt="733개 반응형 검사">
|
|
21
|
-
<img src="https://img.shields.io/badge/self--tests-
|
|
21
|
+
<img src="https://img.shields.io/badge/self--tests-55-blueviolet?style=flat-square" alt="55개 자체 테스트">
|
|
22
22
|
</p>
|
|
23
23
|
|
|
24
24
|
<p align="center">
|
|
@@ -183,7 +183,7 @@ node type, node 속성, 스타일 속성, 스타일 상태는 플러그인 소
|
|
|
183
183
|
| `data/theme-zip-verification.csv` | 22 | Mosaic 자체 테마 ZIP을 왕복시켜 비교 |
|
|
184
184
|
| `data/conversion-batch.csv` | 19 | 한 사이트의 모든 Elementor 페이지를 변환, 구축, 검사 |
|
|
185
185
|
|
|
186
|
-
- 자체 테스트: `python tools/test_mosaic.py`, 오프라인 테스트
|
|
186
|
+
- 자체 테스트: `python tools/test_mosaic.py`, 오프라인 테스트 55개(조회, 중국어 용어, 구축 결과의 형태와 거부 규칙, 공개된 구축 인터페이스, 이 저장소의 숫자와 개인정보).
|
|
187
187
|
- evals: Mosaic 1.0.10~1.0.12 동작에 관한 16문항. skill 사용 시 16/16, 미사용 시 0/16. 결과: [evals/RESULTS.md](evals/RESULTS.md).
|
|
188
188
|
- `SKILL.md`, 이 README들, 배지의 숫자는 `tools/check_numbers.py`가 데이터와 대조합니다. 자세한 내용: [verification-record.md](references/verification-record.md).
|
|
189
189
|
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<img src="https://img.shields.io/badge/node_properties-120-success?style=flat-square" alt="120 node properties">
|
|
19
19
|
<img src="https://img.shields.io/badge/style_properties-101-success?style=flat-square" alt="101 style properties">
|
|
20
20
|
<img src="https://img.shields.io/badge/responsive_checks-733-blueviolet?style=flat-square" alt="733 responsive checks">
|
|
21
|
-
<img src="https://img.shields.io/badge/self--tests-
|
|
21
|
+
<img src="https://img.shields.io/badge/self--tests-55-blueviolet?style=flat-square" alt="55 self-tests">
|
|
22
22
|
</p>
|
|
23
23
|
|
|
24
24
|
<p align="center">
|
|
@@ -183,7 +183,7 @@ Node types, node properties, style properties and style states are extracted fro
|
|
|
183
183
|
| `data/theme-zip-verification.csv` | 22 | Mosaic's own theme ZIP round-tripped and compared |
|
|
184
184
|
| `data/conversion-batch.csv` | 19 | every Elementor page of a site converted, built and checked |
|
|
185
185
|
|
|
186
|
-
- Self-test: `python tools/test_mosaic.py`,
|
|
186
|
+
- Self-test: `python tools/test_mosaic.py`, 55 offline tests (lookups, Chinese terms, the build output's shape and refusals, the public build interface, this repository's numbers and privacy).
|
|
187
187
|
- Evals: 16 questions about Mosaic 1.0.10 to 1.0.12 behaviour; with the skill 16/16, without it 0/16. Results: [evals/RESULTS.md](evals/RESULTS.md).
|
|
188
188
|
- Every number in `SKILL.md`, these READMEs and their badges is checked against the data by `tools/check_numbers.py`. Detail: [verification-record.md](references/verification-record.md).
|
|
189
189
|
|
package/README.zh-TW.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<img src="https://img.shields.io/badge/node_properties-120-success?style=flat-square" alt="120 個 node 屬性">
|
|
19
19
|
<img src="https://img.shields.io/badge/style_properties-101-success?style=flat-square" alt="101 個樣式屬性">
|
|
20
20
|
<img src="https://img.shields.io/badge/responsive_checks-733-blueviolet?style=flat-square" alt="733 條 RWD 檢查">
|
|
21
|
-
<img src="https://img.shields.io/badge/self--tests-
|
|
21
|
+
<img src="https://img.shields.io/badge/self--tests-55-blueviolet?style=flat-square" alt="55 項自我測試">
|
|
22
22
|
</p>
|
|
23
23
|
|
|
24
24
|
<p align="center">
|
|
@@ -183,7 +183,7 @@ node type、node 屬性、樣式屬性、樣式狀態從外掛原始碼抽出(
|
|
|
183
183
|
| `data/theme-zip-verification.csv` | 22 | Mosaic 自己的佈景 ZIP 匯出再匯入並比對 |
|
|
184
184
|
| `data/conversion-batch.csv` | 19 | 一個網站的每個 Elementor 頁面都轉換、建置並檢查 |
|
|
185
185
|
|
|
186
|
-
- 自我測試:`python tools/test_mosaic.py`,
|
|
186
|
+
- 自我測試:`python tools/test_mosaic.py`,55 項離線測試(查詢、中文用語、建頁產出的結構與拒收規則、對外的建頁介面、本 repo 的數字與隱私)。
|
|
187
187
|
- evals:16 題 Mosaic 1.0.10 到 1.0.12 的行為題;有 skill 16/16,沒有 skill 0/16。結果見 [evals/RESULTS.md](evals/RESULTS.md)。
|
|
188
188
|
- `SKILL.md`、這幾份 README 和徽章上的數字,都由 `tools/check_numbers.py` 對照資料核對。細節見 [verification-record.md](references/verification-record.md)。
|
|
189
189
|
|
package/SKILL.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mosaic-headless",
|
|
3
|
-
"version": "1.40.
|
|
3
|
+
"version": "1.40.2",
|
|
4
4
|
"description": "AI-agent skill: build Mosaic Pro (Nextend) WordPress sites by writing the underlying data model directly - 23 custom tables, no visual editor, no DOM. Every node type, style property and node property swept against a live install and asserted on the delivered HTML and compiled CSS. Installs into Claude Code, Cursor, Codex CLI, Gemini CLI, Copilot, Continue, Windsurf and Claude.ai.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wordpress",
|
package/tools/sync_nodes.py
CHANGED
|
@@ -261,9 +261,15 @@ def plan(spec_records: list[dict], spec_top: str, live_nodes: list[dict], live_t
|
|
|
261
261
|
if auto:
|
|
262
262
|
notes.append("%d node(s) Mosaic inserted itself (default children) - kept, not counted" % len(auto))
|
|
263
263
|
if only_attrs:
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
264
|
+
# An --attr id that neither side of THIS document has is simply not here: the
|
|
265
|
+
# document is skipped, not refused (a site-wide run touches every document and the
|
|
266
|
+
# id lives in one of them). One-sided cases are already in struct above, as
|
|
267
|
+
# "only in the spec" / "only on the site", from the alignment.
|
|
268
|
+
def attrs_of(nodes):
|
|
269
|
+
return {(n.get("data") or {}).get("attrID") for n in nodes} - {None}
|
|
270
|
+
here = set(only_attrs) & (attrs_of(spec_records) | attrs_of(live))
|
|
271
|
+
if not here:
|
|
272
|
+
return True, [], [], ["no --attr node in this document - skipped"]
|
|
267
273
|
updates = []
|
|
268
274
|
if struct:
|
|
269
275
|
return False, struct, updates, notes
|
package/tools/test_mosaic.py
CHANGED
|
@@ -536,6 +536,30 @@ class SyncNodesPlan(unittest.TestCase):
|
|
|
536
536
|
_, _, only, _ = self.sn.plan(spec, "S", live, "L", {"r-body"})
|
|
537
537
|
self.assertEqual((len(all_updates), len(only)), (2, 1))
|
|
538
538
|
|
|
539
|
+
def test_attr_absent_from_a_document_skips_it(self):
|
|
540
|
+
# a site-wide --attr run: the id lives in one page; every other document has
|
|
541
|
+
# it on neither side and must be skipped, not refused (live site, 2026-11-21)
|
|
542
|
+
other = {"type": "div", "data": {"attrID": "o-root"},
|
|
543
|
+
"children": [{"type": "text", "data": {"attrID": "o-title"}, "text": "Other page"}]}
|
|
544
|
+
same, struct, updates, notes = self.sn.plan(self.flat(other, "S"), "S",
|
|
545
|
+
self.as_stored(self.flat(other, "L")), "L", {"r-body"})
|
|
546
|
+
self.assertTrue(same, struct)
|
|
547
|
+
self.assertEqual((struct, updates), ([], []))
|
|
548
|
+
self.assertTrue(any("skipped" in n for n in notes), notes)
|
|
549
|
+
# the document that has it still finds its one edit
|
|
550
|
+
live = self.as_stored(self.flat(self.rich_tree(), "L"))
|
|
551
|
+
same, struct, updates, _ = self.sn.plan(self.flat(self.rich_tree(body="B2"), "S"), "S", live, "L", {"r-body"})
|
|
552
|
+
self.assertTrue(same, struct)
|
|
553
|
+
self.assertEqual(len(updates), 1)
|
|
554
|
+
|
|
555
|
+
def test_attr_on_one_side_only_is_structural(self):
|
|
556
|
+
live = self.as_stored(self.flat(self.rich_tree(), "L"))
|
|
557
|
+
spec = self.rich_tree()
|
|
558
|
+
spec["children"].append({"type": "text", "data": {"attrID": "r-new"}, "text": "New"})
|
|
559
|
+
same, struct, _, _ = self.sn.plan(self.flat(spec, "S"), "S", live, "L", {"r-new"})
|
|
560
|
+
self.assertFalse(same)
|
|
561
|
+
self.assertTrue(any("@r-new" in s for s in struct), struct)
|
|
562
|
+
|
|
539
563
|
def test_normalisers(self):
|
|
540
564
|
self.assertEqual(self.sn.css_norm("a: 1px , 2px;b:c ;"), self.sn.css_norm("a:1px,2px;b:c"))
|
|
541
565
|
# measured on a live site: aspect-ratio 1/1 stored as 1 / 1, one declaration per line
|