mosaic-headless 1.34.8 → 1.34.9

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 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"
8
+ version: "1.34.9"
9
9
  homepage: "https://github.com/Moksa1123/mosaic-headless"
10
10
  ---
11
11
 
@@ -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.8"
23
+ "version": "1.34.9"
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.8"
23
+ "version": "1.34.9"
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.8"
23
+ "version": "1.34.9"
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.8"
23
+ "version": "1.34.9"
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.8"
23
+ "version": "1.34.9"
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.8",
3
+ "version": "1.34.9",
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",
@@ -322,6 +322,15 @@ Four more things a build that leans on components runs into:
322
322
  `uuid5(COMPONENT_NAMESPACE, name)` so rebuilds update the same row; renaming the
323
323
  key in `site["components"]` therefore creates a new component and leaves the old
324
324
  one behind.
325
+ - **A component needs a `path`, or its preview and thumbnail are blank.** The
326
+ component row's `path` is the template it is previewed in; the editor gives a new
327
+ one `front-page.php`. With `path: ""`, 1.0.11 recurses until PHP runs out of stack
328
+ (`ComponentRenderEditorInstance::createComponentContext` tests a misspelt
329
+ `$paths`, so the empty path is never replaced), and the editor's preview and
330
+ thumbnail screenshot come back as 200 with 0 bytes (reported from a client build).
331
+ `build_site.py` wrote `""` until 1.34.9; it now writes `front-page.php` and repairs
332
+ an existing component with an empty path. A headless build does not regenerate the
333
+ thumbnail; a stored one (a captured error page, say) stays until something replaces it.
325
334
  - **Refilling a definition re-keys its inner nodes, so update only what uses it.**
326
335
  `ensure_components` deletes the old inner nodes and flattens the tree again, which
327
336
  gives every inner node a new id; an instance's override nodes still point
@@ -227,6 +227,10 @@ interaction ID), `remember` / `forget`, `modalOpen` / `modalClose`, `popoverOpen
227
227
  `popoverClose` / `popoverToggle`, and `scrollTo` (Pro) - for triggering behaviour
228
228
  rather than motion. A modal has no toggle. `modalClose` / `popoverClose` placed
229
229
  inside the dialog they close need no target - the action resolves its own dialog.
230
+ That holds when the modal is a component's root and the buttons sit inside the
231
+ definition: `"settings": {}` on each close button's `modalClose` closed every
232
+ instance on a client site (1.0.11, measured on a phone width), Esc closed it too, and
233
+ a `pageLoad` cooldown kept it shut on reload.
230
234
  `setCookie` writes a session cookie, gone when the browser closes. With a class as the
231
235
  trigger and an empty target, the action hits the element that fired; a class used as
232
236
  the TARGET hits every element carrying it on the page.
@@ -158,6 +158,15 @@ def fill_shell(client, cfg, site, surface, master_id, header_id, footer_id, comp
158
158
  # uuid accumulates. See references/failure-modes.md.
159
159
  COMPONENT_NAMESPACE = uuid.UUID("6d6f7361-6963-4865-6164-6c657373ff02")
160
160
 
161
+ # The template a component is previewed in - the editor's own default for a new
162
+ # component. An empty path is not "no preference": 1.0.11's
163
+ # ComponentRenderEditorInstance::createComponentContext tests `empty($paths)` (a
164
+ # misspelt variable, always empty), so the component's own path always wins, and ""
165
+ # recurses through getTemplatePathContext until PHP runs out of stack. The preview
166
+ # and the thumbnail screenshot then return 200 with 0 bytes (reported from a client
167
+ # build; the typo read from source).
168
+ COMPONENT_PATH = "front-page.php"
169
+
161
170
 
162
171
  def ensure_components(client, cfg, site, surface):
163
172
  """Create or refill every component the spec declares, and map its inner nodes.
@@ -187,7 +196,11 @@ def ensure_components(client, cfg, site, surface):
187
196
  records.append({"newRevisionRecord": {
188
197
  "ID": cid, "parentType": "componentCategory", "parentID": cat,
189
198
  "ordering": "a0", "status": "publish", "revision": "", "version": "",
190
- "name": name, "path": ""}, "originalRevisionRecord": None})
199
+ "name": name, "path": COMPONENT_PATH}, "originalRevisionRecord": None})
200
+ elif not existing[cid].get("path"):
201
+ # built by an earlier version with path "" - repair it, see COMPONENT_PATH
202
+ records.append({"newRevisionRecord": dict(existing[cid], path=COMPONENT_PATH),
203
+ "originalRevisionRecord": existing[cid]})
191
204
  if records:
192
205
  commit(client, "adminComponentsEditorInstance", inst,
193
206
  {"component": records}, "components")
@@ -125,7 +125,7 @@ def main():
125
125
  "ID": cid, "parentType": "componentCategory",
126
126
  "parentID": cats[0]["ID"], "ordering": "a0",
127
127
  "status": "publish", "revision": "", "version": "",
128
- "name": "Probe Card", "path": ""},
128
+ "name": "Probe Card", "path": "front-page.php"},
129
129
  "originalRevisionRecord": None}]})
130
130
  err = exceptions_of(resp)
131
131
  inst2 = unwrap(client.get("adminComponentsEditorInstance"),