mosaic-headless 1.36.1 → 1.36.3
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 +2 -1
- package/assets/templates/platforms/claude-ai.json +6 -3
- package/assets/templates/platforms/claude-code.json +6 -3
- package/assets/templates/platforms/codex-cli.json +6 -3
- package/assets/templates/platforms/continue.json +1 -1
- package/assets/templates/platforms/copilot.json +6 -3
- package/assets/templates/platforms/cursor.json +1 -1
- package/assets/templates/platforms/gemini-cli.json +6 -3
- package/package.json +1 -1
- package/references/design-system.md +4 -2
- package/references/failure-modes.md +30 -0
- package/references/styling.md +46 -0
- package/scripts/check-release.mjs +5 -2
- package/scripts/install.mjs +28 -9
- package/scripts/sync-version.mjs +5 -3
- package/tools/build_site.py +6 -1
- package/tools/verify_menus.py +9 -0
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.36.
|
|
8
|
+
version: "1.36.3"
|
|
9
9
|
homepage: "https://github.com/Moksa1123/mosaic-headless"
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -149,6 +149,7 @@ them headlessly, measured.
|
|
|
149
149
|
| a block repeated on several pages | a component, one definition, overrides per instance | references/design-system.md (components) |
|
|
150
150
|
| a popup, a drawer, a tour | the `modal` / `popover` nodes and their actions | references/dialog-and-triggers.md |
|
|
151
151
|
| a site menu: desktop hover dropdown + phone drawer | `dropdown` / `dropdown-wide` with `openOn: hover`; a `modal` drawer opened by `modalOpen` (there is no off-canvas node) | references/design-system.md (site menus), `tools/verify_menus.py` |
|
|
152
|
+
| a typeface, site-wide | a `fontFamily` collection variable, `{"var": id}` in styles; Settings: `saveGoogleFontsLocally` on and `fontDisplay: swap` (unset is `block`) | references/styling.md (fonts) - saving Google fonts locally took a CJK page from 68 to 96 on mobile |
|
|
152
153
|
| remembering a visitor's choice | `setCookie`, `remember` / `forget`, cookie conditions | references/interactions.md |
|
|
153
154
|
| text that comes from the post, the user, a field | a dynamic `{"v": "@VAR(...)"}` value | references/dynamic-content.md |
|
|
154
155
|
| a colour, a size used twice | a collection variable | references/design-system.md |
|
|
@@ -17,10 +17,13 @@
|
|
|
17
17
|
},
|
|
18
18
|
"frontmatter": {
|
|
19
19
|
"name": "mosaic-headless",
|
|
20
|
-
"description": "
|
|
20
|
+
"description": "(filled in from SKILL.md by install.mjs)",
|
|
21
21
|
"license": "MIT",
|
|
22
|
-
"
|
|
23
|
-
|
|
22
|
+
"metadata": {
|
|
23
|
+
"author": "moksa (https://moksaweb.com)",
|
|
24
|
+
"version": "1.36.3",
|
|
25
|
+
"homepage": "https://github.com/Moksa1123/mosaic-headless"
|
|
26
|
+
}
|
|
24
27
|
},
|
|
25
28
|
"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
29
|
"uploadSteps": [
|
|
@@ -17,10 +17,13 @@
|
|
|
17
17
|
},
|
|
18
18
|
"frontmatter": {
|
|
19
19
|
"name": "mosaic-headless",
|
|
20
|
-
"description": "
|
|
20
|
+
"description": "(filled in from SKILL.md by install.mjs)",
|
|
21
21
|
"license": "MIT",
|
|
22
|
-
"
|
|
23
|
-
|
|
22
|
+
"metadata": {
|
|
23
|
+
"author": "moksa (https://moksaweb.com)",
|
|
24
|
+
"version": "1.36.3",
|
|
25
|
+
"homepage": "https://github.com/Moksa1123/mosaic-headless"
|
|
26
|
+
}
|
|
24
27
|
},
|
|
25
28
|
"loaderBehaviour": "Auto-loads on session start when SKILL.md frontmatter parses successfully.",
|
|
26
29
|
"verified": true,
|
|
@@ -17,10 +17,13 @@
|
|
|
17
17
|
},
|
|
18
18
|
"frontmatter": {
|
|
19
19
|
"name": "mosaic-headless",
|
|
20
|
-
"description": "
|
|
20
|
+
"description": "(filled in from SKILL.md by install.mjs)",
|
|
21
21
|
"license": "MIT",
|
|
22
|
-
"
|
|
23
|
-
|
|
22
|
+
"metadata": {
|
|
23
|
+
"author": "moksa (https://moksaweb.com)",
|
|
24
|
+
"version": "1.36.3",
|
|
25
|
+
"homepage": "https://github.com/Moksa1123/mosaic-headless"
|
|
26
|
+
}
|
|
24
27
|
},
|
|
25
28
|
"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
29
|
"verified": true,
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"frontmatter": {
|
|
19
19
|
"name": "mosaic-headless",
|
|
20
|
-
"description": "
|
|
20
|
+
"description": "(filled in from SKILL.md by install.mjs)",
|
|
21
21
|
"alwaysApply": false
|
|
22
22
|
},
|
|
23
23
|
"loaderBehaviour": "Continue reads .continue/rules/*.md as Rules. Set alwaysApply: true to attach to every chat, or leave false and rely on the description for relevance matching. Rule files load in lexicographic order if you split this into several numbered files. References must be embedded inline; the installer concatenates key reference files into the rule body.",
|
|
@@ -17,10 +17,13 @@
|
|
|
17
17
|
},
|
|
18
18
|
"frontmatter": {
|
|
19
19
|
"name": "mosaic-headless",
|
|
20
|
-
"description": "
|
|
20
|
+
"description": "(filled in from SKILL.md by install.mjs)",
|
|
21
21
|
"license": "MIT",
|
|
22
|
-
"
|
|
23
|
-
|
|
22
|
+
"metadata": {
|
|
23
|
+
"author": "moksa (https://moksaweb.com)",
|
|
24
|
+
"version": "1.36.3",
|
|
25
|
+
"homepage": "https://github.com/Moksa1123/mosaic-headless"
|
|
26
|
+
}
|
|
24
27
|
},
|
|
25
28
|
"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
29
|
"fallback": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"sites": false
|
|
17
17
|
},
|
|
18
18
|
"frontmatter": {
|
|
19
|
-
"description": "
|
|
19
|
+
"description": "(filled in from SKILL.md by install.mjs)",
|
|
20
20
|
"globs": [
|
|
21
21
|
"**/*.php",
|
|
22
22
|
"**/wp-content/**",
|
|
@@ -17,10 +17,13 @@
|
|
|
17
17
|
},
|
|
18
18
|
"frontmatter": {
|
|
19
19
|
"name": "mosaic-headless",
|
|
20
|
-
"description": "
|
|
20
|
+
"description": "(filled in from SKILL.md by install.mjs)",
|
|
21
21
|
"license": "MIT",
|
|
22
|
-
"
|
|
23
|
-
|
|
22
|
+
"metadata": {
|
|
23
|
+
"author": "moksa (https://moksaweb.com)",
|
|
24
|
+
"version": "1.36.3",
|
|
25
|
+
"homepage": "https://github.com/Moksa1123/mosaic-headless"
|
|
26
|
+
}
|
|
24
27
|
},
|
|
25
28
|
"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
29
|
"verified": true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mosaic-headless",
|
|
3
|
-
"version": "1.36.
|
|
3
|
+
"version": "1.36.3",
|
|
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",
|
|
@@ -266,8 +266,10 @@ modal closedby: everything, accessibleLabel, padding 0 (the browser's
|
|
|
266
266
|
modal-overlay backgroundColor with alpha
|
|
267
267
|
modal-window position absolute, top 0, right 0, height 100dvh (the NATIVE field), width 86%,
|
|
268
268
|
maxWidth 360px, overflow auto; first child: a button with modalClose
|
|
269
|
-
opener a button with click -> modalOpen, target = the modal's nodeID
|
|
270
|
-
|
|
269
|
+
opener a button with click -> modalOpen, target = the modal's pinned nodeID. The pin
|
|
270
|
+
only makes the two agree within one build: build_page and fill_shell re-key
|
|
271
|
+
it every run (refresh_node_ids), since (ID, themeID) is the primary key and
|
|
272
|
+
the previous master keeps its rows until pruned. Any uuid will do.
|
|
271
273
|
```
|
|
272
274
|
|
|
273
275
|
A notch inset: `paddingTop: "max(16px, env(safe-area-inset-top))"` and the `calc()`
|
|
@@ -495,3 +495,33 @@ end reads the loop name out of any function call; the editor only out of `@VAR`.
|
|
|
495
495
|
Write `@VAR('post/<loop>')`. No server-side check can see this - the page is 200 and
|
|
496
496
|
complete - so it is only caught by opening the editor. Details in
|
|
497
497
|
`references/custom-fields.md`.
|
|
498
|
+
|
|
499
|
+
## The editor canvas does not load a plugin's front-end CSS
|
|
500
|
+
|
|
501
|
+
The canvas is a srcdoc iframe whose `<head>` comes from
|
|
502
|
+
`ThemeMResource::getHead()`: a fresh `WP_Styles`, `do_action('enqueue_block_assets')`,
|
|
503
|
+
Mosaic's own `style.css` and `AppWebPageEditorPreview.css`. `wp_enqueue_scripts`
|
|
504
|
+
never runs there. Measured with a probe mu-plugin on 1.0.12: a style enqueued on
|
|
505
|
+
`wp_enqueue_scripts` reached the front end and not the canvas; the same style on
|
|
506
|
+
`enqueue_block_assets` reached both. A code node whose decoration is styled by a
|
|
507
|
+
companion plugin therefore shows unstyled in the editor - on sharho a full-width
|
|
508
|
+
black disc over the whole canvas. Enqueue that CSS on `enqueue_block_assets` (it
|
|
509
|
+
also fires in the block editor, so scope the selectors), or ship an editor-only
|
|
510
|
+
sheet there that gives the element a static look; front-end scripts do not run in
|
|
511
|
+
the canvas either.
|
|
512
|
+
|
|
513
|
+
## Inline editing re-serialises a text's runs (client report, 1.0.11)
|
|
514
|
+
|
|
515
|
+
On sharho, a heading built as `text > wysiwyg-span > wysiwyg-span` (a visually-hidden
|
|
516
|
+
and a no-wrap span nested inside another) came back from double-click -> Done -
|
|
517
|
+
with no character typed - as two flat spans, and the undo button lit. The front end
|
|
518
|
+
renders the nested structure fine (measured: `<span><span>` delivered), so the loss
|
|
519
|
+
is the editor's serialiser. The editor's own bold and italic are not spans: they are
|
|
520
|
+
`wysiwyg-text` `format: ["bold"]` / `["italic"]`, delivered as `<strong>` / `<em>`
|
|
521
|
+
(`<strong><em>` for both, measured). Keep runs in shapes the editor itself writes,
|
|
522
|
+
and tell a client not to edit a heading that needs nesting.
|
|
523
|
+
|
|
524
|
+
Mosaic also keeps unsaved edits in the browser: reopening that template offered
|
|
525
|
+
"a backup of this post stored in the browser differs from the version below" with
|
|
526
|
+
Restore / Cancel. Restore brings the flattened version back, and the next save
|
|
527
|
+
writes it. When reproducing an editor problem, press Cancel.
|
package/references/styling.md
CHANGED
|
@@ -280,6 +280,52 @@ dropped, which is the only reason they cost minutes instead of a debugging sessi
|
|
|
280
280
|
— a property that is not in the registry cannot be set at all, and Mosaic's own
|
|
281
281
|
API accepts the write and discards it.
|
|
282
282
|
|
|
283
|
+
## Fonts: what Mosaic loads, and what makes a CJK site slow (measured, 1.0.12)
|
|
284
|
+
|
|
285
|
+
A font is a collection variable of type `fontFamily` (not `font` - an unknown type
|
|
286
|
+
is a PHP fatal on commit), referenced from a style as `fontFamily: {"var": id}`. Its
|
|
287
|
+
value per mode is one of two providers:
|
|
288
|
+
|
|
289
|
+
```
|
|
290
|
+
{"provider": "google", "fallbacks": "sans-serif",
|
|
291
|
+
"googleOptions": {"fontFamily": "Noto Sans TC", "fontVariants": ["400", "700"]}}
|
|
292
|
+
{"provider": "custom", "fallbacks": "sans-serif",
|
|
293
|
+
"customOptions": {"fontFamily": "\"PingFang TC\", \"Microsoft JhengHei\", sans-serif",
|
|
294
|
+
"fontFaces": "@font-face { ... }"}} # fontFaces may be ""
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
- `google` loads only the ticked weights, one css2 URL for every Google font.
|
|
298
|
+
- `custom` inlines its `@font-face` rules in the page (no extra request). The
|
|
299
|
+
validator keeps `font-family`, `src` (url / local + format), `font-weight`,
|
|
300
|
+
`font-style`, `font-stretch`, `unicode-range` and `font-display`, and drops the
|
|
301
|
+
rest (`size-adjust`, the overrides). There is no upload UI: the woff2 is yours to
|
|
302
|
+
host. An empty `fontFaces` makes a system-font variable the client can still swap.
|
|
303
|
+
- **Every published font variable is loaded on every page**, used or not
|
|
304
|
+
(`FontRenderingManager::enqueueFontFamilies`). Delete the ones nothing uses.
|
|
305
|
+
- Site settings (Mosaic -> Settings, `settingsEditorInstance`): `fontDisplay`
|
|
306
|
+
(auto | block | swap | fallback | optional; **unset means `block`**, so text is
|
|
307
|
+
invisible until the font arrives), `saveGoogleFontsLocally` (CSS and woff2
|
|
308
|
+
copied to `wp-content/cache/mosaic/web/googlefonts/`), `criticalPreload` (an HTTP
|
|
309
|
+
preload of the font CSS, not of font files). There is no font-file preload.
|
|
310
|
+
|
|
311
|
+
Lighthouse mobile, median of three, a Chinese page (h1 700, body 400 + 500, a
|
|
312
|
+
Poppins 600 label) on the demo site:
|
|
313
|
+
|
|
314
|
+
| set-up | score | FCP | LCP | font bytes |
|
|
315
|
+
|---|---|---|---|---|
|
|
316
|
+
| Google Noto Sans TC 400/500/700 + Poppins, `fontDisplay` unset | 68-69 | 3.7-4.0 s | 6.2 s | 649 KB |
|
|
317
|
+
| the same, `fontDisplay: swap` only | 63-72 | 4.6-6.0 s | 4.7-6.1 s | 649 KB |
|
|
318
|
+
| the same + `saveGoogleFontsLocally` | 96 | 2.1 s | 2.1 s | 666 KB |
|
|
319
|
+
| 400/700 only + swap + local | 97 | 1.9 s | 1.9 s | 627 KB |
|
|
320
|
+
| CJK on a system stack (custom, no @font-face), Poppins from Google | 93 | 2.5 s | 2.5 s | 17 KB |
|
|
321
|
+
| the same, Poppins saved locally | 99 | 1.4 s | 1.5 s | 17 KB |
|
|
322
|
+
|
|
323
|
+
What costs the time is the render-blocking stylesheet on fonts.googleapis.com, not
|
|
324
|
+
the size of the CJK files - Google already slices them by `unicode-range` and the
|
|
325
|
+
browser fetches only the slices the page uses. `swap` alone does not help; saving
|
|
326
|
+
locally does. Hand-subsetting a CJK font is not worth it: the slices already do
|
|
327
|
+
that, and text a client adds later falls outside a hand-made subset.
|
|
328
|
+
|
|
283
329
|
## `fontFamily` takes a plain family list, nothing else
|
|
284
330
|
|
|
285
331
|
`ValidatorStyleFontFamily` (NEXT-5841) accepts quoted names and unquoted identifier
|
|
@@ -75,8 +75,11 @@ else if (fmVersion[1].trim() !== want)
|
|
|
75
75
|
const platDir = path.join(ROOT, "assets", "templates", "platforms");
|
|
76
76
|
for (const f of fs.readdirSync(platDir).filter((x) => x.endsWith(".json"))) {
|
|
77
77
|
const cfg = JSON.parse(fs.readFileSync(path.join(platDir, f), "utf8"));
|
|
78
|
-
const
|
|
79
|
-
|
|
78
|
+
const fm = cfg.frontmatter || {};
|
|
79
|
+
for (const k of ["version", "author"])
|
|
80
|
+
if (k in fm) fail(`${f} frontmatter has a top-level ${k} - it belongs under metadata`);
|
|
81
|
+
const v = fm.metadata?.version;
|
|
82
|
+
if (v !== undefined && v !== want) fail(`${f} frontmatter metadata.version ${v} != ${want}`);
|
|
80
83
|
if (JSON.stringify(cfg).includes("gutenberg-headless"))
|
|
81
84
|
fail(`${f} still names another skill`);
|
|
82
85
|
}
|
package/scripts/install.mjs
CHANGED
|
@@ -172,18 +172,37 @@ function detectPlatforms() {
|
|
|
172
172
|
|
|
173
173
|
// ---------- content assembly ------------------------------------------------
|
|
174
174
|
|
|
175
|
+
// SKILL.md's own `description: |` block is the one source of truth. The platform
|
|
176
|
+
// templates only say *whether* a description goes in their frontmatter; their copy
|
|
177
|
+
// of the text used to be pasted in by hand and went stale (installs kept announcing
|
|
178
|
+
// the 1.0.10-era counts while the repo said 1.0.12).
|
|
179
|
+
function readSkillDescription() {
|
|
180
|
+
const raw = fs.readFileSync(path.join(ROOT, "SKILL.md"), "utf8");
|
|
181
|
+
const end = raw.indexOf("\n---", 3);
|
|
182
|
+
const head = raw.startsWith("---") && end !== -1 ? raw.slice(0, end) : "";
|
|
183
|
+
const m = /^description:\s*\|\s*\n((?:[ \t]+.*(?:\n|$))+)/m.exec(head);
|
|
184
|
+
if (!m) die("SKILL.md frontmatter has no `description: |` block");
|
|
185
|
+
return m[1].split("\n").map((l) => l.replace(/^ {2}/, "")).join("\n").trim();
|
|
186
|
+
}
|
|
187
|
+
|
|
175
188
|
function buildFrontmatter(fm) {
|
|
176
189
|
if (!fm) return "";
|
|
190
|
+
if ("description" in fm) fm = { ...fm, description: readSkillDescription() };
|
|
177
191
|
const lines = ["---"];
|
|
178
|
-
|
|
179
|
-
if (v === null || v === undefined)
|
|
180
|
-
if (Array.isArray(v)) lines.push(`${k}: [${v.map((x) => JSON.stringify(x)).join(", ")}]`);
|
|
181
|
-
else if (typeof v === "boolean") lines.push(`${k}: ${v}`);
|
|
182
|
-
else if (typeof v === "
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
192
|
+
const emit = (k, v, ind) => {
|
|
193
|
+
if (v === null || v === undefined) return;
|
|
194
|
+
if (Array.isArray(v)) lines.push(`${ind}${k}: [${v.map((x) => JSON.stringify(x)).join(", ")}]`);
|
|
195
|
+
else if (typeof v === "boolean") lines.push(`${ind}${k}: ${v}`);
|
|
196
|
+
else if (typeof v === "object") {
|
|
197
|
+
// `metadata:` - the Agent Skills spec rejects a top-level author/version
|
|
198
|
+
lines.push(`${ind}${k}:`);
|
|
199
|
+
for (const [k2, v2] of Object.entries(v)) emit(k2, v2, ind + " ");
|
|
200
|
+
} else if (typeof v === "string" && (v.includes("\n") || v.length > 100)) {
|
|
201
|
+
lines.push(`${ind}${k}: |`);
|
|
202
|
+
for (const sub of v.split("\n")) lines.push(`${ind} ${sub}`);
|
|
203
|
+
} else lines.push(`${ind}${k}: ${JSON.stringify(v)}`);
|
|
204
|
+
};
|
|
205
|
+
for (const [k, v] of Object.entries(fm)) emit(k, v, "");
|
|
187
206
|
lines.push("---");
|
|
188
207
|
return lines.join("\n") + "\n\n";
|
|
189
208
|
}
|
package/scripts/sync-version.mjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* Targets:
|
|
13
13
|
* SKILL.md frontmatter `version:`
|
|
14
|
-
* assets/templates/platforms/*.json frontmatter.version, where present
|
|
14
|
+
* assets/templates/platforms/*.json frontmatter.metadata.version, where present
|
|
15
15
|
* .claude-plugin/plugin.json version (the Claude plugin directory reads it)
|
|
16
16
|
*
|
|
17
17
|
* check-release.mjs asserts afterwards that this worked, so a silent miss here
|
|
@@ -55,8 +55,10 @@ const platDir = path.join(ROOT, "assets", "templates", "platforms");
|
|
|
55
55
|
for (const f of fs.readdirSync(platDir).filter((x) => x.endsWith(".json"))) {
|
|
56
56
|
const p = path.join(platDir, f);
|
|
57
57
|
const cfg = JSON.parse(fs.readFileSync(p, "utf8"));
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
// under metadata:, like SKILL.md - a top-level version fails the Agent Skills upload
|
|
59
|
+
const meta = cfg.frontmatter?.metadata;
|
|
60
|
+
if (meta && "version" in meta && meta.version !== v) {
|
|
61
|
+
meta.version = v;
|
|
60
62
|
fs.writeFileSync(p, JSON.stringify(cfg, null, 2) + "\n");
|
|
61
63
|
touched.push(`assets/templates/platforms/${f}`);
|
|
62
64
|
}
|
package/tools/build_site.py
CHANGED
|
@@ -130,7 +130,12 @@ def fill_shell(client, cfg, site, surface, master_id, header_id, footer_id, comp
|
|
|
130
130
|
leaves an extra master behind on every build."""
|
|
131
131
|
instance = "masterDocumentInstance/%s" % master_id
|
|
132
132
|
key = "node/master/%s" % master_id
|
|
133
|
-
|
|
133
|
+
# Re-key pinned nodeIDs here too, as build_page_document does: an old master
|
|
134
|
+
# keeps its rows until it is pruned and the key is (ID, themeID), so a pinned
|
|
135
|
+
# id is single-use. Both regions in one pass, so a header button whose
|
|
136
|
+
# modalOpen names a modal in the footer keeps pointing at it.
|
|
137
|
+
shell = refresh_node_ids({k: v for k, v in (site.get("shell") or {}).items()
|
|
138
|
+
if k in ("header", "footer")})
|
|
134
139
|
COMPONENT_USES.clear()
|
|
135
140
|
records = []
|
|
136
141
|
for region, parent in (("header", header_id), ("footer", footer_id)):
|
package/tools/verify_menus.py
CHANGED
|
@@ -186,6 +186,15 @@ def tree():
|
|
|
186
186
|
"paddingLeft": "20px", "paddingRight": "20px"}}},
|
|
187
187
|
"children": [{"type": "text", "data": {"attrID": "ml-copy", "tagName": "p"},
|
|
188
188
|
"text": "選單實驗頁:桌機 hover 下拉、mega 下拉、modal 抽屜、navbar 收合、互動面板。"},
|
|
189
|
+
# probe: native run formats vs nested spans (sharho report)
|
|
190
|
+
{"type": "text", "data": {"attrID": "ml-fmt", "tagName": "p"}, "children": [
|
|
191
|
+
{"type": "wysiwyg-text", "data": {"text": "B", "format": ["bold"]}},
|
|
192
|
+
{"type": "wysiwyg-text", "data": {"text": "I", "format": ["italic"]}},
|
|
193
|
+
{"type": "wysiwyg-text", "data": {"text": "BI", "format": ["italic", "bold"]}},
|
|
194
|
+
{"type": "wysiwyg-span", "data": {"attrID": "ml-sp-out"}, "children": [
|
|
195
|
+
{"type": "wysiwyg-text", "data": {"text": "outer "}},
|
|
196
|
+
{"type": "wysiwyg-span", "data": {"attrID": "ml-sp-in"}, "children": [
|
|
197
|
+
{"type": "wysiwyg-text", "data": {"text": "inner"}}]}]}]},
|
|
189
198
|
# which spelling of a notch inset survives the style validator
|
|
190
199
|
{"type": "div", "data": {"attrID": "ml-safe-native"},
|
|
191
200
|
"style": {"&": {"_": {"paddingTop": "max(16px, env(safe-area-inset-top))"}}}},
|