mosaic-headless 1.34.0 → 1.34.1
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/SKILL.md +11 -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/build_page.py +36 -1
package/SKILL.md
CHANGED
|
@@ -5,7 +5,7 @@ description: |
|
|
|
5
5
|
license: "MIT"
|
|
6
6
|
metadata:
|
|
7
7
|
author: "moksa (https://moksaweb.com)"
|
|
8
|
-
version: "1.34.
|
|
8
|
+
version: "1.34.1"
|
|
9
9
|
homepage: "https://github.com/Moksa1123/mosaic-headless"
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -849,6 +849,16 @@ with `tools/prune_unbound.php` (dry run by default) after a batch of rebuilds.
|
|
|
849
849
|
with `inactive:"1"` - the new integer-as-string property, the Badge variant's
|
|
850
850
|
default - it is a `<span>`, a label rather than a control. Measured all three.
|
|
851
851
|
`menu-link` and `wysiwyg-link` still render `<span>` without a `url`.
|
|
852
|
+
- **A button's words go in a `text` node, not straight under it.** The editor builds
|
|
853
|
+
`button > text (Inherited text variant, 6381b2f3…) > wysiwyg-text`, and the same
|
|
854
|
+
for menu-link, dropdown-toggle, tabs and submit labels. A `wysiwyg-text` placed
|
|
855
|
+
directly under a button renders identically but cannot be edited in the editor:
|
|
856
|
+
the navigator shows no child, and a double-click opens only the link settings.
|
|
857
|
+
Only `text`, `label`, `choice-label`, `choice-legend`, `fieldset-legend` and the
|
|
858
|
+
inline `wysiwyg-span` / `wysiwyg-link` hold runs directly. `build_page.py` wraps
|
|
859
|
+
runs under any other type itself (`wrap_text_runs`), so the `"text"` shorthand is
|
|
860
|
+
safe on a button. Output: `<a class="m-button"><div class="m-inherited-text
|
|
861
|
+
m-wysiwyg">…</div></a>` - the editor's own button carries the same `<div>`.
|
|
852
862
|
- **`text` renders as `<div>` by default** — set `tagName` for `<h1>`, `<p>` and so on.
|
|
853
863
|
- **A `wysiwyg-text` run prints no markup since 1.0.11.** Its `<` and `>` are escaped
|
|
854
864
|
on output, so `A<strong>B</strong>C<br>D` reaches the page as those literal
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "Build and modify Mosaic Pro (Nextend) sites by writing the underlying data model directly - no visual editor, no DOM. Query the real surface (122 node types, 181 node properties, 101 style properties, 53 style states, 151 element classes, 74 dynamic variables, 114 REST routes, 23 tables) instead of guessing, with every node type placed on a live site one at a time and asserted against the delivered HTML, every style and node property swept against the compiled CSS and markup, and 569 responsive declarations checked against the stylesheet the site actually served.",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"author": "moksa (https://moksaweb.com)",
|
|
23
|
-
"version": "1.34.
|
|
23
|
+
"version": "1.34.1"
|
|
24
24
|
},
|
|
25
25
|
"loaderBehaviour": "Upload via Settings -> Skills -> Upload. Claude.ai parses SKILL.md frontmatter and surfaces the skill in your library. The extraction tool (extract-block-schema.php) needs a live WP-CLI connection and won't run in the sandbox; use it from a local terminal against your own site instead.",
|
|
26
26
|
"uploadSteps": [
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "Build and modify Mosaic Pro (Nextend) sites by writing the underlying data model directly - no visual editor, no DOM. Query the real surface (122 node types, 181 node properties, 101 style properties, 53 style states, 151 element classes, 74 dynamic variables, 114 REST routes, 23 tables) instead of guessing, with every node type placed on a live site one at a time and asserted against the delivered HTML, every style and node property swept against the compiled CSS and markup, and 569 responsive declarations checked against the stylesheet the site actually served.",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"author": "moksa (https://moksaweb.com)",
|
|
23
|
-
"version": "1.34.
|
|
23
|
+
"version": "1.34.1"
|
|
24
24
|
},
|
|
25
25
|
"loaderBehaviour": "Auto-loads on session start when SKILL.md frontmatter parses successfully.",
|
|
26
26
|
"verified": true,
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "Build and modify Mosaic Pro (Nextend) sites by writing the underlying data model directly - no visual editor, no DOM. Query the real surface (122 node types, 181 node properties, 101 style properties, 53 style states, 151 element classes, 74 dynamic variables, 114 REST routes, 23 tables) instead of guessing, with every node type placed on a live site one at a time and asserted against the delivered HTML, every style and node property swept against the compiled CSS and markup, and 569 responsive declarations checked against the stylesheet the site actually served.",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"author": "moksa (https://moksaweb.com)",
|
|
23
|
-
"version": "1.34.
|
|
23
|
+
"version": "1.34.1"
|
|
24
24
|
},
|
|
25
25
|
"loaderBehaviour": "Confirmed (2026-07-11): Codex CLI natively supports the SKILL.md spec. Place SKILL.md under .codex/skills/<name>/ (project) or ~/.codex/skills/<name>/ (personal) and Codex loads the name+description at session start, then the full body on demand. A parallel, broader convention .agents/skills/ (searched from cwd up to repo root, then ~/.agents/skills/) also exists across multiple tools - if your Codex CLI version prioritizes that path instead, mirror the same SKILL.md there.",
|
|
26
26
|
"verified": true,
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "Build and modify Mosaic Pro (Nextend) sites by writing the underlying data model directly - no visual editor, no DOM. Query the real surface (122 node types, 181 node properties, 101 style properties, 53 style states, 151 element classes, 74 dynamic variables, 114 REST routes, 23 tables) instead of guessing, with every node type placed on a live site one at a time and asserted against the delivered HTML, every style and node property swept against the compiled CSS and markup, and 569 responsive declarations checked against the stylesheet the site actually served.",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"author": "moksa (https://moksaweb.com)",
|
|
23
|
-
"version": "1.34.
|
|
23
|
+
"version": "1.34.1"
|
|
24
24
|
},
|
|
25
25
|
"loaderBehaviour": "CHANGED as of 2026-07-11: GitHub Copilot added a proper '.github/skills/' Agent Skills directory (December 2025), alongside the older single-file .github/copilot-instructions.md convention. This config targets the new skills-directory form. If your Copilot version predates this (pre Dec 2025), use the instructions-append fallback instead (see fallback below).",
|
|
26
26
|
"fallback": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "Build and modify Mosaic Pro (Nextend) sites by writing the underlying data model directly - no visual editor, no DOM. Query the real surface (122 node types, 181 node properties, 101 style properties, 53 style states, 151 element classes, 74 dynamic variables, 114 REST routes, 23 tables) instead of guessing, with every node type placed on a live site one at a time and asserted against the delivered HTML, every style and node property swept against the compiled CSS and markup, and 569 responsive declarations checked against the stylesheet the site actually served.",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"author": "moksa (https://moksaweb.com)",
|
|
23
|
-
"version": "1.34.
|
|
23
|
+
"version": "1.34.1"
|
|
24
24
|
},
|
|
25
25
|
"loaderBehaviour": "CHANGED as of 2026-07-11: Gemini CLI now natively supports the same SKILL.md standard as Claude Code and Codex CLI - the same directory-based skill works unmodified. Gemini CLI discovers skills in this precedence order: built-in, extension skills, ~/.gemini/skills/ (personal), .gemini/skills/ (project, shared via version control). At session start Gemini injects each discovered skill's name+description into the system prompt and calls activate_skill when a task matches.",
|
|
26
26
|
"verified": true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mosaic-headless",
|
|
3
|
-
"version": "1.34.
|
|
3
|
+
"version": "1.34.1",
|
|
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/build_page.py
CHANGED
|
@@ -21,7 +21,9 @@ style-states.csv, and the commit sequence is the one in references/write-protoco
|
|
|
21
21
|
A node is:
|
|
22
22
|
|
|
23
23
|
{"type": "div",
|
|
24
|
-
"text": "hello", shorthand: adds a wysiwyg-text child
|
|
24
|
+
"text": "hello", shorthand: adds a wysiwyg-text child (inside an
|
|
25
|
+
Inherited text `text` node unless the type
|
|
26
|
+
holds runs itself - see wrap_text_runs)
|
|
25
27
|
"data": {"tagName": "h1"}, merged into the node's data
|
|
26
28
|
"style": {"_": {...}, "_m": {...}}, base state, per breakpoint
|
|
27
29
|
"hover": {"_": {...}}, any state name works as a key
|
|
@@ -430,12 +432,45 @@ def flatten(node, parent_id, master_id, surface, force, ordering="a0",
|
|
|
430
432
|
children = list(node.get("children") or [])
|
|
431
433
|
if node.get("text") is not None:
|
|
432
434
|
children.insert(0, {"type": "wysiwyg-text", "data": {"text": node["text"]}})
|
|
435
|
+
children = wrap_text_runs(node["type"], children)
|
|
433
436
|
for i, child in enumerate(children):
|
|
434
437
|
flatten(child, nid, master_id, surface, force, ordering_for(i),
|
|
435
438
|
node["type"], out, ancestors + (node["type"],))
|
|
436
439
|
return out
|
|
437
440
|
|
|
438
441
|
|
|
442
|
+
# Types the editor lets hold text runs directly (its own defaults put
|
|
443
|
+
# wysiwyg-text straight under these). Everything else - button, menu-link,
|
|
444
|
+
# dropdown-toggle, tab, submit-label... - gets its runs inside a `text` node on
|
|
445
|
+
# the Inherited text variant, and a run placed directly under one renders fine
|
|
446
|
+
# but cannot be edited in the editor: the navigator shows no child and a
|
|
447
|
+
# double-click opens only the link settings.
|
|
448
|
+
DIRECT_TEXT_HOSTS = {"text", "label", "choice-label", "choice-legend", "fieldset-legend",
|
|
449
|
+
"wysiwyg-span", "wysiwyg-link"}
|
|
450
|
+
INHERITED_TEXT_VARIANT = "6381b2f3-7a23-05db-87b9-c808a98a292b"
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
def wrap_text_runs(node_type, children):
|
|
454
|
+
"""Group consecutive wysiwyg-* children of a non-text host into one
|
|
455
|
+
`text` node on the Inherited text variant, the shape the editor builds."""
|
|
456
|
+
if node_type in DIRECT_TEXT_HOSTS:
|
|
457
|
+
return children
|
|
458
|
+
out, run = [], []
|
|
459
|
+
for child in children:
|
|
460
|
+
if str(child.get("type", "")).startswith("wysiwyg-"):
|
|
461
|
+
run.append(child)
|
|
462
|
+
continue
|
|
463
|
+
if run:
|
|
464
|
+
out.append({"type": "text", "data": {"style": {"variant": INHERITED_TEXT_VARIANT}},
|
|
465
|
+
"children": run})
|
|
466
|
+
run = []
|
|
467
|
+
out.append(child)
|
|
468
|
+
if run:
|
|
469
|
+
out.append({"type": "text", "data": {"style": {"variant": INHERITED_TEXT_VARIANT}},
|
|
470
|
+
"children": run})
|
|
471
|
+
return out
|
|
472
|
+
|
|
473
|
+
|
|
439
474
|
def ordering_for(index):
|
|
440
475
|
"""Siblings order by a fractional-index STRING, never by number."""
|
|
441
476
|
alphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
|