mosaic-headless 1.33.4 → 1.34.0
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 +57 -25
- package/assets/templates/platforms/claude-ai.json +2 -2
- package/assets/templates/platforms/claude-code.json +2 -2
- package/assets/templates/platforms/codex-cli.json +2 -2
- package/assets/templates/platforms/continue.json +1 -1
- package/assets/templates/platforms/copilot.json +2 -2
- package/assets/templates/platforms/cursor.json +1 -1
- package/assets/templates/platforms/gemini-cli.json +2 -2
- package/data/node-property-verification.csv +1 -1
- package/data/node-type-notes.csv +2 -2
- package/data/style-properties.csv +3 -0
- package/data/style-states.csv +3 -0
- package/data/style-verification.csv +3 -0
- package/package.json +1 -1
- package/references/data-model.md +8 -1
- package/references/design-system.md +51 -9
- package/references/dialog-and-triggers.md +4 -3
- package/references/dynamic-content.md +17 -0
- package/references/interactions.md +34 -6
- package/references/placement.md +64 -3
- package/references/responsive.md +26 -10
- package/references/slider.md +17 -3
- package/references/styling.md +39 -5
- package/references/templates-and-conditions.md +51 -2
- package/references/upgrading.md +25 -1
- package/references/vs-elementor-gutenberg.md +7 -5
- package/references/write-protocol.md +11 -0
- package/scripts/check-release.mjs +1 -1
- package/tools/build_page.py +1 -1
- package/tools/extract_style_properties.py +18 -3
- package/tools/mo.py +2 -2
package/README.ja.md
CHANGED
|
@@ -144,8 +144,8 @@ commit の成功はページが動く証拠ではないし、正しいスタイ
|
|
|
144
144
|
| 項目 | 結果 |
|
|
145
145
|
|---|---|
|
|
146
146
|
| **ノード型** | 129 / 129 を 1 型 1 ドキュメントでスイープ、commit → 描画 → 断言 → 削除:77 RENDERED、25 COMMITTED、15 COMMIT_5xx、12 BROKE_PAGE。1.0.8 で再スイープ:以前は黙って commit されていた 5 型が、親なしではページを落とすようになった。描画されなかった行のうち 3 つは「必要な親なしで commit した」というスイープ手法の産物で、その旨が行の横にある |
|
|
147
|
-
| **スタイルプロパティ** |
|
|
148
|
-
| **ノードプロパティ** | 191 / 191 を各プロパティ自身のバリデータ連鎖から導いた値で再探査:
|
|
147
|
+
| **スタイルプロパティ** | 101 / 101 を実ページに書き、コンパイル済み CSS と照合:61 COMPILED、18 ABSENT、21 SKIPPED |
|
|
148
|
+
| **ノードプロパティ** | 191 / 191 を各プロパティ自身のバリデータ連鎖から導いた値で再探査:39 APPLIED、45 NO_EFFECT、55 NO_HOST、48 SKIPPED |
|
|
149
149
|
| **レスポンシブ** | 2 サイト計 733 件の `_t`/`_m` 宣言を、サイトが実際に配信したスタイルシートに対して 1 件ずつ断言 — 全件検証済み |
|
|
150
150
|
| **ブラウザ** | 配信された 2 ページを Chromium の 3 つのビューポートで計算スタイル 4,132 件読み取り:2,929 件が一致、912 件は比較不能として明示、**上書き 0 件** |
|
|
151
151
|
| **デザイン監査** | コントラスト、フォントフォールバック、CJK の字送り、横溢れ、テキストの切れ、1 行の文字数 — ブラウザ上で実行、**指摘 26 件、すべて理由付きで裁定済み** — 理由のない容認はリリースゲートが拒否する |
|
package/README.ko.md
CHANGED
|
@@ -140,8 +140,8 @@ commit 성공은 페이지가 동작한다는 증거가 아니고, 올바른 스
|
|
|
140
140
|
| 항목 | 결과 |
|
|
141
141
|
|---|---|
|
|
142
142
|
| **노드 타입** | 129 / 129를 문서당 하나씩 스윕, commit → 렌더 → 단언 → 삭제: 77 RENDERED, 25 COMMITTED, 15 COMMIT_5xx, 12 BROKE_PAGE. 1.0.8에서 재스윕: 전에는 조용히 commit되던 5개 타입이 부모 없이는 페이지를 죽인다. 렌더되지 않은 행 중 셋은 "필요한 부모 없이 commit"한 스윕 방식의 산물이며, 그 사실이 행 옆에 적혀 있다 |
|
|
143
|
-
| **스타일 프로퍼티** |
|
|
144
|
-
| **노드 프로퍼티** | 191 / 191을 각 프로퍼티 자신의 검증기 체인에서 도출한 값으로 재탐사:
|
|
143
|
+
| **스타일 프로퍼티** | 101 / 101을 실제 페이지에 쓰고 컴파일된 CSS와 대조: 61 COMPILED, 18 ABSENT, 21 SKIPPED |
|
|
144
|
+
| **노드 프로퍼티** | 191 / 191을 각 프로퍼티 자신의 검증기 체인에서 도출한 값으로 재탐사: 39 APPLIED, 45 NO_EFFECT, 55 NO_HOST, 48 SKIPPED |
|
|
145
145
|
| **반응형** | 두 사이트 합쳐 733개의 `_t`/`_m` 선언을, 사이트가 실제로 내보낸 스타일시트에 대해 하나씩 단언 — 전부 검증됨 |
|
|
146
146
|
| **브라우저** | 전달된 두 페이지를 Chromium의 세 가지 뷰포트에서 계산 스타일 4,132건 판독: 2,929건 일치, 912건은 비교 불가로 명시, **덮어쓰기 0건** |
|
|
147
147
|
| **디자인 감사** | 명암비, 폰트 폴백, CJK 자간, 가로 넘침, 텍스트 잘림, 한 줄 글자 수 — 브라우저에서 실행, **지적 26건, 모두 서면으로 판정** — 이유 없는 승인은 릴리스 게이트가 거부한다 |
|
package/README.md
CHANGED
|
@@ -200,8 +200,8 @@ factories, so Pro types register and render regardless.
|
|
|
200
200
|
| pass | result |
|
|
201
201
|
|---|---|
|
|
202
202
|
| **node types** | 129 / 129 swept one per document, committed → rendered → asserted → deleted: 77 RENDERED, 25 COMMITTED, 15 COMMIT_5xx, 12 BROKE_PAGE. Re-swept on 1.0.8: five types that used to commit silently now kill the page unparented. The non-rendering rows that are artefacts of committing without the required parent say so beside the row |
|
|
203
|
-
| **style properties** |
|
|
204
|
-
| **node properties** | 191 / 191 re-probed with a value shaped by each property's own validator chain:
|
|
203
|
+
| **style properties** | 101 / 101 written to a live page and checked against the compiled CSS: 61 COMPILED, 18 ABSENT, 21 SKIPPED |
|
|
204
|
+
| **node properties** | 191 / 191 re-probed with a value shaped by each property's own validator chain: 39 APPLIED, 45 NO_EFFECT, 55 NO_HOST, 48 SKIPPED |
|
|
205
205
|
| **responsive** | 733 `_t`/`_m` declarations across two sites asserted against the stylesheet the site actually served — all verified |
|
|
206
206
|
| **browser** | 4,132 computed-style readings on two delivered pages in Chromium at three viewports: 2,929 compared and agreed, 912 not-comparable and labelled, **0 overridden** |
|
|
207
207
|
| **design audit** | contrast, font fallback, CJK tracking, overflow, clipped text, line measure — run in the browser, **26 findings, every one ruled on in writing** — an acknowledgement without a reason is refused by the release gate |
|
package/README.zh-TW.md
CHANGED
|
@@ -165,8 +165,8 @@ commit 成功不代表頁面能用,樣式表正確也不代表。這裡每個
|
|
|
165
165
|
| 項目 | 結果 |
|
|
166
166
|
|---|---|
|
|
167
167
|
| **節點型別** | 129 / 129 逐一放進獨立文件,寫入 → 渲染 → 斷言 → 刪除:77 RENDERED、25 COMMITTED、15 COMMIT_5xx、12 BROKE_PAGE。在 1.0.8 上重掃:五個以前默默寫入的型別,沒放對父節點現在會直接弄死頁面。未渲染的當中有三個是「沒給父層」的掃描方法產物,註記就在列旁 |
|
|
168
|
-
| **樣式屬性** |
|
|
169
|
-
| **節點屬性** | 191 / 191 用各自驗證鏈推出的值重新探測:
|
|
168
|
+
| **樣式屬性** | 101 / 101 寫進真實頁面、對照編譯出的 CSS:61 COMPILED、18 ABSENT、21 SKIPPED |
|
|
169
|
+
| **節點屬性** | 191 / 191 用各自驗證鏈推出的值重新探測:39 APPLIED、45 NO_EFFECT、55 NO_HOST、48 SKIPPED |
|
|
170
170
|
| **響應式** | 兩個站共 733 條 `_t`/`_m` 宣告,對照網站實際送出的樣式表逐條斷言——全數通過 |
|
|
171
171
|
| **瀏覽器** | 在 Chromium 三個視窗寬度上對兩個交付頁面做 4,132 次計算樣式讀取:2,929 條比對相符、912 條標為無法比對、**0 條被覆蓋** |
|
|
172
172
|
| **設計稽核** | 對比度、字體回退、CJK 字距、水平溢出、文字裁切、每行字數——在瀏覽器裡跑,**26 項發現,每一項都有書面裁定**——沒寫理由的 acknowledge 會被發布閘門拒絕 |
|
package/SKILL.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "mosaic-headless"
|
|
3
3
|
description: |
|
|
4
|
-
Build and modify Mosaic Pro (Nextend) WordPress sites by writing the data model directly - no visual editor, no DOM. Query the real surface with `mo.py` (129 node types, 196 node properties,
|
|
4
|
+
Build and modify Mosaic Pro (Nextend) WordPress sites by writing the data model directly - no visual editor, no DOM. Query the real surface with `mo.py` (129 node types, 196 node properties, 101 style properties, 57 style states, 157 variants, 75 dynamic variables, 16 interaction triggers, 115 REST routes) where every lookup leads with the measured verdict, not the declaration: each node type placed on a live site one at a time, each style and node property swept against compiled CSS and markup, the delivered pages re-read in Chromium at three viewports. Measured on Mosaic Pro 1.0.10: the popover (anchored or screen-placed, the flip state, afterClose-chained tours), the modal on the Popover API, OpenStreetMap, exit-intent and scroll-depth triggers, run rules and memory. Drives theme export/import and the 1.0.7 -> 1.0.10 data upgrades from outside wp-admin; re-extracted and re-verified on 1.0.11.
|
|
5
5
|
license: "MIT"
|
|
6
6
|
metadata:
|
|
7
7
|
author: "moksa (https://moksaweb.com)"
|
|
8
|
-
version: "1.
|
|
8
|
+
version: "1.34.0"
|
|
9
9
|
homepage: "https://github.com/Moksa1123/mosaic-headless"
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -109,14 +109,13 @@ that looks like a server problem. Two things make it easy to hit:
|
|
|
109
109
|
after deleting it. `X-Mosaic-Paths` on any 406 names the paths Mosaic looked for,
|
|
110
110
|
and `index.php` is in every list.
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
`
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
406.
|
|
112
|
+
This `index.php` row is the editor's **Fallback → Empty** template: priority
|
|
113
|
+
`PHP_INT_MAX`, matching every request (`Plugins/Paths/PathIndex.php`). Since 1.0.10
|
|
114
|
+
an auto template is an ordinary writable one - it is listed by
|
|
115
|
+
`adminTemplateEditorInstance` and its document carries a `template-internal`
|
|
116
|
+
root, so content goes in like any page's (the commit shape is in
|
|
117
|
+
`references/templates-and-conditions.md`). Before 1.0.10 both were missing and a
|
|
118
|
+
direct commit answered HTTP 500.
|
|
120
119
|
|
|
121
120
|
For `/` specifically the WordPress-side fix is the sound one: point the front page
|
|
122
121
|
at a post that has a template (`show_on_front=page`, `page_on_front=<id>`).
|
|
@@ -256,6 +255,10 @@ STATES 52 of the 53 style states written to a live page and matched agains
|
|
|
256
255
|
now refuses to commit alone, so it is NO_HOST). All seven globally usable states verified - and the
|
|
257
256
|
pseudo-classes are emitted UPPERCASE (`._j:HOVER`), so grepping a
|
|
258
257
|
stylesheet for `:hover` finds nothing. data/style-state-verification.csv
|
|
258
|
+
The table now lists 57: v1.34's extractor also reads selector lists
|
|
259
|
+
spelt `implode(',', array(…))`, which adds
|
|
260
|
+
___accordion-item--opened/--opening and ___dropdown--opened - read
|
|
261
|
+
from source, not yet swept.
|
|
259
262
|
|
|
260
263
|
COMPONENTS used on the example page: the service row is committed ONCE to the
|
|
261
264
|
theme and the page places four instances of it, each carrying only the
|
|
@@ -407,7 +410,7 @@ UPGRADE 1.0.7 -> 1.0.8 driven over the plugin's own milestone route from
|
|
|
407
410
|
|
|
408
411
|
FROM SOURCE 129 node types, 196 properties (68 with enums), 285 pluggable IDs,
|
|
409
412
|
129 placement rules, 25 composite default structures (10 declared,
|
|
410
|
-
15 healed in),
|
|
413
|
+
15 healed in), 101 style properties, 57 style states, 16 interaction
|
|
411
414
|
triggers - re-extracted from the 1.0.11 tree.
|
|
412
415
|
```
|
|
413
416
|
|
|
@@ -418,14 +421,14 @@ the difference is worth being exact about:
|
|
|
418
421
|
```
|
|
419
422
|
node types 129 / 129 swept live, one per document
|
|
420
423
|
node properties 191 / 196 re-probed with a value shaped by each property's
|
|
421
|
-
own validator chain:
|
|
424
|
+
own validator chain: 39 APPLIED, 45 NO_EFFECT,
|
|
422
425
|
2 EDITOR_ONLY, 55 NO_HOST (no rendering type
|
|
423
|
-
declares them), 2 INSTRUMENT,
|
|
426
|
+
declares them), 2 INSTRUMENT, 48 SKIPPED
|
|
424
427
|
(the five missing are 1.0.10's popover -
|
|
425
428
|
role, ariaLive, accessibleLabel, closedby,
|
|
426
429
|
positioning - measured on the popover lab
|
|
427
430
|
instead: data/popover-verification.csv)
|
|
428
|
-
style properties
|
|
431
|
+
style properties 101 / 101 swept live; 61 COMPILED, 18 ABSENT, 1 NO_ELEMENT,
|
|
429
432
|
21 SKIPPED (no test value could be synthesised, and
|
|
430
433
|
SKIPPED is never counted as a pass)
|
|
431
434
|
```
|
|
@@ -499,6 +502,20 @@ so the pattern is in the data, not just in this paragraph.
|
|
|
499
502
|
matches and the element silently disappears. Driven end to end on a client build;
|
|
500
503
|
references/templates-and-conditions.md
|
|
501
504
|
|
|
505
|
+
**Cross-checked against the official docs.** All 72 pages of Mosaic's own
|
|
506
|
+
documentation (Oct 2026) were compared with this skill, and every disagreement was
|
|
507
|
+
settled in the 1.0.11 source or on the live site. Where the docs are wrong for
|
|
508
|
+
1.0.11, the skill follows the source and says so at the spot: the system
|
|
509
|
+
requirement is WordPress 6.9, not 6.5; evaluator functions are `find_image` /
|
|
510
|
+
`remove_html`, and `@FINDIMAGE` prints nothing; a slider's `duration` is the
|
|
511
|
+
transition, not the dwell; the Google Maps Language and Region settings do not
|
|
512
|
+
exist; the optimizer opt-out attributes are the four the source adds, not the
|
|
513
|
+
docs' longer list. Where the docs corrected the skill, re-measured on 1.0.11:
|
|
514
|
+
`gridChildPosition` compiles as a group, `scale` / `perspective` /
|
|
515
|
+
`collectionModesData` exist and compile, `youtube` `privacy` renders on
|
|
516
|
+
youtube-nocookie.com, "Wrap in link" is a `button` with the Link variant, and a
|
|
517
|
+
variable's `customProperty` is optional.
|
|
518
|
+
|
|
502
519
|
## Orient yourself in this order
|
|
503
520
|
|
|
504
521
|
1. `references/data-model.md` — where a page actually lives. Read this first even if
|
|
@@ -549,10 +566,10 @@ so the pattern is in the data, not just in this paragraph.
|
|
|
549
566
|
| `data/default-children.csv` | 25 | source — what a composite type needs **inside** it |
|
|
550
567
|
| `data/style-properties.csv` | 98 | source — every settable CSS property and its value shape |
|
|
551
568
|
| `data/style-value-shapes.csv` | 22 | **probed live** — the exact JSON shape for each structured value, and what it compiled to |
|
|
552
|
-
| `data/style-states.csv` |
|
|
569
|
+
| `data/style-states.csv` | 57 | source — state IDs with their exact CSS selector templates |
|
|
553
570
|
| `data/property-verification.csv` | 170 | **probed live** — per-property effect on markup vs CSS, with unprovable enums marked INCONCLUSIVE |
|
|
554
571
|
| `data/node-property-verification.csv` | 191 | **swept live** — each property probed with a value shaped by its own validator chain, on a type that declares it |
|
|
555
|
-
| `data/style-verification.csv` |
|
|
572
|
+
| `data/style-verification.csv` | 101 | **swept live** — every style property written to a page and checked against the compiled CSS, with its group beside the result |
|
|
556
573
|
| `data/rwd-verification.csv` | 733 | **checked live** - every `_t`/`_m` declaration vs the served stylesheet, with status per row |
|
|
557
574
|
| `data/browser-verification/` | 4132 | **computed in Chromium** - declared vs `getComputedStyle` at three viewports, `not-comparable` labelled per row. One CSV per page, named by its slug |
|
|
558
575
|
| `data/design-audit-acknowledged.csv` | 3 | reviewed findings that will not be fixed, each with a written reason. An acknowledgement without a reason is a suppression wearing a better name, and the release gate refuses one |
|
|
@@ -648,7 +665,10 @@ it is gated on admin capability only, not on a licence. It moves a whole theme,
|
|
|
648
665
|
a single page. `tools/theme_zip.py` drives both directions from outside the editor.
|
|
649
666
|
Two things about the import that the route list does not tell you: with no
|
|
650
667
|
`themeActivateMode` it defaults to `live` and switches every visitor to the imported
|
|
651
|
-
theme (the tool sends `test
|
|
668
|
+
theme (the tool sends `test` unless `--activate`). Test mode is per USER, not per
|
|
669
|
+
admin role: it is user meta `mosaic_<blogID>_test_mode_theme`, so the account whose
|
|
670
|
+
cookie made the import sees the imported theme on every later fetch while visitors
|
|
671
|
+
keep the live one - read a page logged out to see what visitors see; and a
|
|
652
672
|
milestone must be called until it answers `isCompleted:true` - stop one call early,
|
|
653
673
|
as the first version of the tool did after its last upload chunk, and that
|
|
654
674
|
milestone's batch bookkeeping is left in the lock for the NEXT milestone to read as
|
|
@@ -837,6 +857,11 @@ with `tools/prune_unbound.php` (dry run by default) after a batch of rebuilds.
|
|
|
837
857
|
`wysiwyg-linebreak` → `<br>`, `wysiwyg-link` with `url` →
|
|
838
858
|
`<a class="m-inline-link">`, each holding its own `wysiwyg-text` child. Entities
|
|
839
859
|
still print as their character (`<dialog>` → `<dialog>`, `&` → `&`).
|
|
860
|
+
Bold and italic are NOT nodes but a property of the run: `wysiwyg-text` (and
|
|
861
|
+
`wysiwyg-variable`) take `format: ["bold"]`, `["italic"]` or both, printed as
|
|
862
|
+
`<strong>` / `<em>`. Both at once comes out misnested on 1.0.11 -
|
|
863
|
+
`<strong><em> BI</strong></em>` (measured); browsers repair it, validators do not.
|
|
864
|
+
`inline_html.py` maps `<strong>`/`<em>` to styled `wysiwyg-span`s instead.
|
|
840
865
|
Through 1.0.10 the run was raw HTML instead, where a tag name in prose swallowed
|
|
841
866
|
the rest of the paragraph; `build_page.py` refuses any tag in a run either way.
|
|
842
867
|
- **`menu-link` is `width: fit-content` by default** (`.m-menu-link{display:flex;gap:4px;
|
|
@@ -852,12 +877,15 @@ with `tools/prune_unbound.php` (dry run by default) after a batch of rebuilds.
|
|
|
852
877
|
list - `dvh`, `svh`, `lvh`, `dvw`, container units: `height: 100dvh` takes every
|
|
853
878
|
other line in the block with it, silently. The structured `height` / `maxHeight`
|
|
854
879
|
fields do accept `dvh`.
|
|
855
|
-
- **`youtube` renders `<mosaic-youtube
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
`
|
|
860
|
-
|
|
880
|
+
- **`youtube` renders `<mosaic-youtube>` carrying `data-video-id`, `data-params`,
|
|
881
|
+
`data-host`**, with the server's iframe inside `<noscript>`; the custom element
|
|
882
|
+
builds the real iframe once it has a size. The iframe has no `title`, so an
|
|
883
|
+
accessible name has to be added some other way. `youtubeUrl` is
|
|
884
|
+
`{"v": "https://www.youtube.com/watch?v=…"}`; `lazyLoad` defers it and there is
|
|
885
|
+
no click-to-load facade (same for `vimeo`). Sized by `width`/`height: 100%` inside
|
|
886
|
+
an `aspect-ratio: 16/9` box. `privacy:"1"` switches the host to
|
|
887
|
+
`www.youtube-nocookie.com` - measured on 1.0.11; the old NO_OUTPUT row was a probe
|
|
888
|
+
artefact. `suggestedVideos` maps to `rel`. `vimeo`'s `privacy` is `dnt=1`.
|
|
861
889
|
- **Eight types emit custom elements**: `<mosaic-dropdown>`, `<mosaic-navbar>`,
|
|
862
890
|
`<mosaic-tabs>`, `<mosaic-accordion>`, `<mosaic-vimeo>`, `<mosaic-youtube>` and
|
|
863
891
|
friends. A selector written against `div`/`nav` misses all of them.
|
|
@@ -865,8 +893,12 @@ with `tools/prune_unbound.php` (dry run by default) after a batch of rebuilds.
|
|
|
865
893
|
- **Only four types take a `url`**: `button`, `menu-link`, `wysiwyg-link`,
|
|
866
894
|
`dropdown-toggle`. Put one on a `text` or an `image` and it is accepted, stored,
|
|
867
895
|
and emits no anchor whatsoever. To make anything else clickable, WRAP it in a
|
|
868
|
-
`
|
|
869
|
-
|
|
896
|
+
`button` whose `style.variant` is the Link variant (`f671bc01-…`, `m-link`) - that
|
|
897
|
+
is what the editor's "Wrap in link" writes, `button` takes children, and with a
|
|
898
|
+
`url` it renders `<a class="m-link" href>` around them (measured on 1.0.11). A
|
|
899
|
+
`menu-link` wrapper works the same way (`target="_blank"` included; probed) but
|
|
900
|
+
carries menu styling. A `button` with `inactive` on keeps its `url`/`target`/`rel`
|
|
901
|
+
stored and emits none of them.
|
|
870
902
|
- **An image's attachment-protocol path is relative to the UPLOADS directory.**
|
|
871
903
|
`wp-attachment://image/<id>/<size>/2026/09/pic.png` resolves, and carries the
|
|
872
904
|
attachment's `width`/`height` onto the tag. Give it the full
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
},
|
|
18
18
|
"frontmatter": {
|
|
19
19
|
"name": "mosaic-headless",
|
|
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,
|
|
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.
|
|
23
|
+
"version": "1.34.0"
|
|
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": [
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
},
|
|
18
18
|
"frontmatter": {
|
|
19
19
|
"name": "mosaic-headless",
|
|
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,
|
|
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.
|
|
23
|
+
"version": "1.34.0"
|
|
24
24
|
},
|
|
25
25
|
"loaderBehaviour": "Auto-loads on session start when SKILL.md frontmatter parses successfully.",
|
|
26
26
|
"verified": true,
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
},
|
|
18
18
|
"frontmatter": {
|
|
19
19
|
"name": "mosaic-headless",
|
|
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,
|
|
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.
|
|
23
|
+
"version": "1.34.0"
|
|
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,
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"frontmatter": {
|
|
19
19
|
"name": "mosaic-headless",
|
|
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,
|
|
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
|
"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,10 @@
|
|
|
17
17
|
},
|
|
18
18
|
"frontmatter": {
|
|
19
19
|
"name": "mosaic-headless",
|
|
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,
|
|
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.
|
|
23
|
+
"version": "1.34.0"
|
|
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": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"sites": false
|
|
17
17
|
},
|
|
18
18
|
"frontmatter": {
|
|
19
|
-
"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,
|
|
19
|
+
"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.",
|
|
20
20
|
"globs": [
|
|
21
21
|
"**/*.php",
|
|
22
22
|
"**/wp-content/**",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
},
|
|
18
18
|
"frontmatter": {
|
|
19
19
|
"name": "mosaic-headless",
|
|
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,
|
|
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.
|
|
23
|
+
"version": "1.34.0"
|
|
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,
|
|
@@ -122,7 +122,7 @@ positionY,,,SKIPPED,
|
|
|
122
122
|
poster,,,SKIPPED,
|
|
123
123
|
preload,video,"""none""",APPLIED,"<video class=""m-video"" id=""np-160"" controls=""1"" preload=""none"">"
|
|
124
124
|
privacy,vimeo,"""1""",NO_EFFECT,"<mosaic-vimeo class=""m-vimeo"" id=""np-168"" data-autoplay=""0"" data-mute=""0"" data-playsinline=""0"">"
|
|
125
|
-
privacy,youtube,"""1""",
|
|
125
|
+
privacy,youtube,"""1"" + youtubeUrl {""v"": ""https://www.youtube.com/watch?v=dQw4w9WgXcQ""}",APPLIED,"data-host=""www.youtube-nocookie.com"" (re-measured 1.0.11; the earlier NO_OUTPUT probe had no usable youtubeUrl)"
|
|
126
126
|
processShortcodes,code,"""1""",NO_EFFECT,"<div class=""m-code"" id=""np-070"">"
|
|
127
127
|
query,,,NO_HOST,
|
|
128
128
|
readonly,text-input,371337,NO_EFFECT,"<input class=""m-input"" id=""np-093"" type=""text"">"
|
package/data/node-type-notes.csv
CHANGED
|
@@ -7,5 +7,5 @@ component-instance,"Swept as COMMIT_500, which is what a BARE one does. The node
|
|
|
7
7
|
component-internal,"The component's content hangs under THIS node, in the `node/component/<id>` key of a componentDocumentInstance. `component-root` looks like the parent and accepts no children."
|
|
8
8
|
component-root,"Accepts no children. It frames the component's preview document, not its content."
|
|
9
9
|
loop,COMMIT_500 on a bare page: the loop needs a query context that a plain document does not provide.
|
|
10
|
-
menu-link,"Renders as <span> with no `url` and as a real <a href> with one - probed, `target=""_blank""` included. `children: rule=any`, so it
|
|
11
|
-
text,"Does NOT take `url`. Only button, menu-link, wysiwyg-link and dropdown-toggle declare it; setting one on a text or image node is accepted, stored, and emits no anchor at all. Measured after from_elementor.py lost 19 of 21 link targets on one page that way. Wrap in menu-link instead."
|
|
10
|
+
menu-link,"Renders as <span> with no `url` and as a real <a href> with one - probed, `target=""_blank""` included. `children: rule=any`, so it can make anything clickable by wrapping it - though the editor's own ""Wrap in link"" writes a `button` with the Link variant (m-link), which renders the same <a href> around its children (measured 1.0.11)."
|
|
11
|
+
text,"Does NOT take `url`. Only button, menu-link, wysiwyg-link and dropdown-toggle declare it; setting one on a text or image node is accepted, stored, and emits no anchor at all. Measured after from_elementor.py lost 19 of 21 link targets on one page that way. Wrap it in a `button` with the Link variant (what the editor does) or a menu-link instead."
|
|
@@ -83,12 +83,14 @@ filter,,CSSFilterStylePropertyFactory,,,
|
|
|
83
83
|
backdropFilter,,CSSBackdropFilterPropertyFactory,,,
|
|
84
84
|
transform,,CSSTransformPropertyFactory,,,
|
|
85
85
|
translate,,CSSTranslateStylePropertyFactory,,,
|
|
86
|
+
scale,,CSSScaleStylePropertyFactory,,,
|
|
86
87
|
rotate,,CSSRotateStylePropertyFactory,,,
|
|
87
88
|
transformOrigin,,CSSTransformOriginStylePropertyFactory,,,
|
|
88
89
|
transformStyle,,CSSPropertyFactory,,flat|preserve-3d,
|
|
89
90
|
transition,,CSSTransitionPropertyFactory,,,
|
|
90
91
|
mask,,CSSMaskStylePropertyFactory,,,
|
|
91
92
|
perspectiveOrigin,,CSSPerspectiveOriginStylePropertyFactory,,,
|
|
93
|
+
perspective,,CSSPropertyFactory,,,
|
|
92
94
|
objectFitStyle,,CSSObjectFitStylePropertyFactory,,,
|
|
93
95
|
mixBlendMode,,CSSPropertyFactory,,normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity,
|
|
94
96
|
boxSizing,,CSSPropertyFactory,,border-box|content-box,
|
|
@@ -97,3 +99,4 @@ backgroundColor,,CSSColorPropertyFactory,,,yes
|
|
|
97
99
|
backgroundStyle,,CSSBackgroundStylePropertyFactory,,,
|
|
98
100
|
cursor,,CSSPropertyFactory,,auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|grab|grabbing|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|inherit|initial|revert|revert-layer|unset,
|
|
99
101
|
customDeclarations,,CustomDeclarationsPropertyFactory,,,
|
|
102
|
+
collectionModesData,,CSSCollectionModePropertyFactory,,,
|
package/data/style-states.csv
CHANGED
|
@@ -9,6 +9,8 @@ hover-tab,&:where(.m-tab:not(.m-tab--active)):HOVER,100,global,Mosaic/NodeTypes/
|
|
|
9
9
|
hover-when-link,"&:where([tabindex]:not([tabindex=""-1""]),a[href]:not([disabled]),button:not([disabled])):HOVER",100,global,Mosaic/Builder/Style/StatesMeta.php
|
|
10
10
|
____loop_pagination_number--active,&.m-loop-pagination-number--active,500,node-type,Mosaic/NodeTypes/Loop/LoopPagination/Numbers/Number/LoopPaginationNumberElementTypeFactory.php
|
|
11
11
|
____loop_pagination_number_ellipsis,&.m-loop-pagination-number-ellipsis,0,node-type,Mosaic/NodeTypes/Loop/LoopPagination/Numbers/Number/LoopPaginationNumberElementTypeFactory.php
|
|
12
|
+
___accordion-item--opened,"&.m-accordion-item--opened,.m-accordion-item:where(.m-accordion-item--opened) > &,.m-accordion-item:where(.m-accordion-item--opened) > .m-accordion-title &",600,node-type,Mosaic/NodeTypes/Accordion/AccordionItem/AccordionItemElementTypeFactory.php
|
|
13
|
+
___accordion-item--opening,"&.m-accordion-item--opening,.m-accordion-item:where(.m-accordion-item--opening) > &,.m-accordion-item:where(.m-accordion-item--opening) > .m-accordion-title &",600,node-type,Mosaic/NodeTypes/Accordion/AccordionItem/AccordionItemElementTypeFactory.php
|
|
12
14
|
___arrow_hidden,&:where(.m-slider-arrow--hidden),800,node-type,Mosaic/NodeTypes/Slider/SliderArrow/SliderArrowElementTypeFactoryAbstract.php
|
|
13
15
|
___checkbox-input--checked,&:checked,500,node-type,Mosaic/NodeTypes/Form/Form/MElements/Checkbox/CheckboxInput/CheckboxInputElementTypeFactory.php
|
|
14
16
|
___checkbox-input--checkmark,&:checked::before,500,node-type,Mosaic/NodeTypes/Form/Form/MElements/Checkbox/CheckboxInput/CheckboxInputElementTypeFactory.php
|
|
@@ -17,6 +19,7 @@ ___choice--checked-within,.m-choice:where(:has(input:checked)) &,500,node-type,M
|
|
|
17
19
|
___choice--focus-visible,&:has(:where(input):focus-visible),760,node-type,Mosaic/NodeTypes/Form/Form/MElements/Choice/ChoiceElementTypeFactory.php
|
|
18
20
|
___choice-field--invalid,&:has(:user-invalid),700,node-type,Mosaic/NodeTypes/Form/Form/MElements/ChoiceField/ChoiceFieldElementTypeFactory.php
|
|
19
21
|
___choice-field--invalid-within,.m-choice-field:where(:has(:user-invalid)) &,700,node-type,Mosaic/NodeTypes/Form/Form/MElements/ChoiceField/ChoiceFieldElementTypeFactory.php
|
|
22
|
+
___dropdown--opened,"&.m-dropdown:where(.dropdown--opened),.m-dropdown:where(.dropdown--opened) > &,.m-dropdown:where(.dropdown--opened) > :where( .m-dropdown-toggle) &",600,node-type,Mosaic/NodeTypes/Menu/Dropdown/DropdownElementTypeFactoryAbstract.php
|
|
20
23
|
___dropdown--opening,.m-dropdown:where(.dropdown--opening) &,600,node-type,Mosaic/NodeTypes/Menu/Dropdown/DropdownElementTypeFactoryAbstract.php
|
|
21
24
|
___dropdown-toggle--current,&.m-dropdown-toggle--current,500,node-type,Mosaic/NodeTypes/Menu/Dropdown/DropdownToggle/DropdownToggleElementTypeFactory.php
|
|
22
25
|
___dropdown-toggle--current-within,".m-dropdown:where(:has(.m-menu-link--current,.m-dropdown-toggle--current)) > &",500,node-type,Mosaic/NodeTypes/Menu/Dropdown/DropdownToggle/DropdownToggleElementTypeFactory.php
|
|
@@ -22,6 +22,7 @@ borderTopWidth,borderStyle,border-top-width,"""37px""",,ABSENT
|
|
|
22
22
|
bottom,,bottom,"""37px""",37px,COMPILED
|
|
23
23
|
boxShadow,,box-shadow,,,SKIPPED
|
|
24
24
|
boxSizing,,box-sizing,"""content-box""",content-box,COMPILED
|
|
25
|
+
collectionModesData,,(custom properties),"{""<collectionID>"": ""<modeID>""}",every variable of that collection re-declared on the element (18 declarations),COMPILED
|
|
25
26
|
color,,color,"""rgb(9, 99, 199)""","rgb(9, 99, 199)",COMPILED
|
|
26
27
|
columnGap,,column-gap,"""37px""",37px,COMPILED
|
|
27
28
|
cursor,,cursor,"""unset""",unset,COMPILED
|
|
@@ -77,11 +78,13 @@ paddingBottom,,padding-bottom,"""37px""",37px,COMPILED
|
|
|
77
78
|
paddingLeft,,padding-left,"""37px""",37px,COMPILED
|
|
78
79
|
paddingRight,,padding-right,"""37px""",37px,COMPILED
|
|
79
80
|
paddingTop,,padding-top,"""37px""",37px,COMPILED
|
|
81
|
+
perspective,,perspective,"""731px""",731px,COMPILED
|
|
80
82
|
perspectiveOrigin,,perspective-origin,,,SKIPPED
|
|
81
83
|
position,,position,"""sticky""",sticky,COMPILED
|
|
82
84
|
right,,right,"""37px""",37px,COMPILED
|
|
83
85
|
rotate,,rotate,,,SKIPPED
|
|
84
86
|
rowGap,,row-gap,"""37px""",37px,COMPILED
|
|
87
|
+
scale,,scale,"{""type"": ""scale"", ""scaleOptions"": {""value"": ""1.37""}}",1.37,COMPILED
|
|
85
88
|
textAlign,,text-align,"""right""",right,COMPILED
|
|
86
89
|
textDecorationLine,,text-decoration-line,"""line-through""",line-through,COMPILED
|
|
87
90
|
textShadow,,text-shadow,,,SKIPPED
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mosaic-headless",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.0",
|
|
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/references/data-model.md
CHANGED
|
@@ -22,7 +22,7 @@ Measured on a real install (`data/db-columns.csv`, 23 tables / 210 columns, Mosa
|
|
|
22
22
|
| `mosaic_universal_classes`, `mosaic_universal_sub_classes` | user-defined classes that apply to any element. `mosaic_utility_classes` / `mosaic_utility_sub_classes` before 1.0.8 |
|
|
23
23
|
| `mosaic_collections`, `mosaic_collection_modes`, `mosaic_collection_skins`, `mosaic_collection_groups`, `mosaic_collection_variables` | the design-token system (a collection has modes and skins; variables resolve per mode) |
|
|
24
24
|
| `mosaic_breakpoints` | responsive breakpoints, per theme — not global |
|
|
25
|
-
| `mosaic_settings` |
|
|
25
|
+
| `mosaic_settings` | Mosaic → Settings, one row for the whole site (no `themeID` column) - including the Google Maps key, CAPTCHA and mailing-list API keys, so a theme ZIP never carries them |
|
|
26
26
|
| `mosaic_submissions`, `mosaic_submission_actions` | form submissions (Pro) |
|
|
27
27
|
| `mosaic_locks` | editing locks; the only table created at plugin activation |
|
|
28
28
|
|
|
@@ -138,3 +138,10 @@ component's own text present twice from a single definition. Edit the component
|
|
|
138
138
|
every instance changes - which is the whole point, and the reason a real site should
|
|
139
139
|
use these rather than repeating a tree.
|
|
140
140
|
|
|
141
|
+
From the official docs and the schema: a component's "Context" - which `@VAR`
|
|
142
|
+
namespaces its nodes may use - is the `path` column of `wp_mosaic_components`, the
|
|
143
|
+
same template-path ids templates use. A component in use is not deleted. Resetting an
|
|
144
|
+
override resets that one node, not its children. Pasting a component or class from
|
|
145
|
+
another theme adds a resource even when one of that name exists, so `name` can
|
|
146
|
+
repeat within a theme; only the emitted class name is made unique.
|
|
147
|
+
|
|
@@ -88,8 +88,12 @@ More from a client build on 1.0.10:
|
|
|
88
88
|
A universal class is the theme-global class a user names (the editor's "classes"),
|
|
89
89
|
committed on the master document under the key `universalClass` with
|
|
90
90
|
`data: {name, label, states}` - `states` is the same structure as a variant's. A node
|
|
91
|
-
takes it through `style.universalClasses`, a map `{<classID>: <classID>}
|
|
92
|
-
|
|
91
|
+
takes it through `style.universalClasses`, a map `{<classID>: <classID>}`. Mapping a
|
|
92
|
+
class to one of its SUB class IDs applies the root class AND the sub-class chain down
|
|
93
|
+
to it - the parent comes along, it is not replaced (`ElementMResourceStyle.php`
|
|
94
|
+
adds the root's names and data first, then each level). A sub class's emitted name
|
|
95
|
+
joins every level with `--` (`card--wide--dark`), so only a root class renders under
|
|
96
|
+
exactly the name you gave it.
|
|
93
97
|
The emitted class is the `name` (sanitized, any `m-` prefix dropped - the
|
|
94
98
|
class-name grammar is in SKILL.md), and its CSS is printed only
|
|
95
99
|
on a page where some node uses it. `status: "delete"` removes one - unlike a variant,
|
|
@@ -100,7 +104,12 @@ a universal class is not catalog-backed.
|
|
|
100
104
|
A collection variable compiles to a real CSS custom property on `:root`, and any
|
|
101
105
|
token-referencable style property can point at it.
|
|
102
106
|
|
|
103
|
-
|
|
107
|
+
A theme that `heal()` creates from nothing gets one collection, one mode and one skin
|
|
108
|
+
("Default collection / Default mode / Default skin"). A theme started from Mosaic's
|
|
109
|
+
shipped data instead has nine collections - Color (with Light and Dark modes), Font
|
|
110
|
+
family, Typography, Spacing, Size, Position, Border radius, Shadow, Image & gradient -
|
|
111
|
+
so read `collection` / `collectionMode` / `collectionSkin` off the document rather
|
|
112
|
+
than assuming either. The skin listed first is the one in use. A variable
|
|
104
113
|
hangs off the collection, and its value is stored per **skin → mode**:
|
|
105
114
|
|
|
106
115
|
```json
|
|
@@ -117,7 +126,7 @@ hangs off the collection, and its value is stored per **skin → mode**:
|
|
|
117
126
|
}
|
|
118
127
|
```
|
|
119
128
|
|
|
120
|
-
Reference it from any of the
|
|
129
|
+
Reference it from any of the 39 token-referencable properties in
|
|
121
130
|
`data/style-properties.csv` with a one-key object:
|
|
122
131
|
|
|
123
132
|
```json
|
|
@@ -136,9 +145,13 @@ Details that cost time to find:
|
|
|
136
145
|
- **`skinsData[skinID]` is keyed by mode ID directly.** There is no `modesData`
|
|
137
146
|
wrapper — `CollectionVariableSkinDataDataSub::getSubData($modeID)` goes straight to
|
|
138
147
|
the mode, whose only property is `value`.
|
|
139
|
-
- **`customProperty` is
|
|
140
|
-
|
|
141
|
-
|
|
148
|
+
- **`customProperty` is optional, and its dashes are too.** Omitted, the name is
|
|
149
|
+
derived from the path, `--<collection>--<group>--<name>` slugged
|
|
150
|
+
(`--default-collection--probe-derived`); pinned without dashes, `probe-bare-cp`
|
|
151
|
+
is emitted as `--probe-bare-cp` (both measured on 1.0.11;
|
|
152
|
+
`CollectionVariableNameHelper`). A clash with another variable is made unique per
|
|
153
|
+
theme. Before 1.0.11 a dash-less value was emitted verbatim as invalid CSS, so
|
|
154
|
+
writing the full `--name` is still the portable choice.
|
|
142
155
|
- **A wrong `skinsData` shape does not fail.** The variable is created, `:root` gets
|
|
143
156
|
the declaration, and the value is the sub-factory's default (`#FFF` for colours).
|
|
144
157
|
If your token renders white, the value never arrived.
|
|
@@ -149,6 +162,30 @@ Details that cost time to find:
|
|
|
149
162
|
`collectionVariable` manager — clearing nodes does not remove them, and orphans
|
|
150
163
|
accumulate as duplicate `:root` declarations.
|
|
151
164
|
|
|
165
|
+
### Modes on an element: dark sections, dark mode
|
|
166
|
+
|
|
167
|
+
A collection with more than one mode (Light / Dark) is switched per element with the
|
|
168
|
+
style property `collectionModesData`, `{<collectionID>: <modeID>}`, in any state and
|
|
169
|
+
breakpoint like every other style key. It compiles to a re-declaration of every
|
|
170
|
+
variable of that collection, at that mode's value, on the element's own rule - so the
|
|
171
|
+
element and everything under it see the other mode through ordinary custom-property
|
|
172
|
+
inheritance (measured on 1.0.11: 18 declarations on one div). A dark band is one
|
|
173
|
+
`collectionModesData` on the band; a site-wide switch is an interaction whose action
|
|
174
|
+
targets the `html` element with a `collectionMode` property, since interactions can
|
|
175
|
+
set it too. The mode listed first in a collection is the default.
|
|
176
|
+
|
|
177
|
+
### Which class wins
|
|
178
|
+
|
|
179
|
+
From lowest to highest: **Variant < Variant sub class < Universal class < Universal
|
|
180
|
+
sub class < Local styles**, and within each slot except local styles a later class
|
|
181
|
+
beats an earlier one - `ElementMResourceStyle.php` builds the class list in exactly
|
|
182
|
+
that order. Variant sub classes nest, and the whole chain applies.
|
|
183
|
+
|
|
184
|
+
`style.localStates` are not part of that layer: each entry is a per-node custom
|
|
185
|
+
state, `{label, selector, state: {<breakpoint>: {…props}}}`, where `selector` is SCSS
|
|
186
|
+
with `&` standing for the element (`&:hover a`, `&::after`; `LocalStatesMeta`). Use
|
|
187
|
+
one when the 57 built-in states do not name the selector you need.
|
|
188
|
+
|
|
152
189
|
## How to actually build a theme
|
|
153
190
|
|
|
154
191
|
1. Define collection variables for the palette, the type scale and the spacing scale.
|
|
@@ -175,9 +212,14 @@ dropdown horizontalAlign: left | center | right
|
|
|
175
212
|
```
|
|
176
213
|
|
|
177
214
|
Both children are inserted by `onHeal()` if you leave them out, so only the two
|
|
178
|
-
need authoring. **It opens on CLICK
|
|
215
|
+
need authoring. **It opens on CLICK by default** — `openOn` is `click` | `hover`,
|
|
216
|
+
emitted as `data-open-on` with `click` when unset
|
|
217
|
+
(`DropdownElementMResourceAbstract`). On open the host gains
|
|
179
218
|
`dropdown--opening dropdown--opened` and the wrapper goes from `display:none` to
|
|
180
|
-
`display:flex`. A hover test
|
|
219
|
+
`display:flex`. A hover test against a default dropdown reports one that does not
|
|
220
|
+
work; set `openOn:"hover"` if hover is what you want. Style the open look through
|
|
221
|
+
the `___dropdown--opened` state. Menus support one submenu level only - no
|
|
222
|
+
sub-submenus.
|
|
181
223
|
|
|
182
224
|
`dropdown-wrapper` used to read as a leaf in `placement-rules.csv`. Its
|
|
183
225
|
`canBeParentFor()` returns `true`, but on `DropdownWrapperElementTypeFactoryAbstract`,
|
|
@@ -512,9 +512,10 @@ blocks inside it. Any tool that read a breakpoint by block id reads nothing now
|
|
|
512
512
|
the twenty inert grouped properties are now visible in the markup as well as absent
|
|
513
513
|
from the CSS, and a checker must not read "no token" as "the node did not render".
|
|
514
514
|
|
|
515
|
-
**`youtube`'s `privacy` property
|
|
516
|
-
|
|
517
|
-
|
|
515
|
+
**`youtube`'s `privacy` property does not suppress the element.** An earlier sweep
|
|
516
|
+
recorded it as `NO_OUTPUT`; re-measured on 1.0.11 with a real `youtubeUrl`, the
|
|
517
|
+
element renders and `data-host` becomes `www.youtube-nocookie.com`
|
|
518
|
+
(`YouTubeElementMResource`). The old row was a probe without a usable URL.
|
|
518
519
|
|
|
519
520
|
## The worked example's own modal
|
|
520
521
|
|
|
@@ -103,6 +103,16 @@ rather than a message in a log.
|
|
|
103
103
|
The name separator is `/` (`TemplatingContextVariable::VARIABLE_SEPARATOR`), and the
|
|
104
104
|
namespace is everything before the first one.
|
|
105
105
|
|
|
106
|
+
**A container can bring its own post into scope.** `div` (and its Grid / Rows /
|
|
107
|
+
Columns / Container variants) carries `dynamicSources`, the editor's "Dynamic
|
|
108
|
+
sources": it resolves a post or term and gives that context to the children, so a
|
|
109
|
+
previous/next-post card is a div whose source is a Post variable filtered on the
|
|
110
|
+
current post's date. Those filters compare raw `wp_posts` values - "published date
|
|
111
|
+
GMT" against `@date('Y-m-d H:i:s', @VAR('post/publish_timestamp'))`, not a formatted
|
|
112
|
+
date. Read from source and the official docs, not measured here; read a row the
|
|
113
|
+
editor wrote before hand-building one. Custom metadata keys starting with `_` are not
|
|
114
|
+
offered as variables.
|
|
115
|
+
|
|
106
116
|
## The functions
|
|
107
117
|
|
|
108
118
|
`data/evaluator-functions.csv` — 19 of them with their arity:
|
|
@@ -118,6 +128,13 @@ attachment(2) find_image(2) find_link(2) find_video(2) media
|
|
|
118
128
|
|
|
119
129
|
`sum`, `avg`, `concat` and `fallback` are variadic.
|
|
120
130
|
|
|
131
|
+
**Write the ids with their underscores.** The official docs spell them `@FINDIMAGE(…)`
|
|
132
|
+
and `@REMOVEHTML(…)`; the evaluator only lowercases the name, so those look up
|
|
133
|
+
`findimage` / `removehtml`, which do not exist, and an unknown function evaluates to
|
|
134
|
+
`''` with no error (`EvaluatorFunctions.php`, `Evaluator.php`). `@find_image(…)`,
|
|
135
|
+
`@remove_html(…)`, `@find_link(…)` work. `VAR`, `VAR_RAW` and `LOOP` themselves are
|
|
136
|
+
matched case-sensitively.
|
|
137
|
+
|
|
121
138
|
**`@concat` drops any argument that evaluates to `'0'`** (and `''`). Each argument is
|
|
122
139
|
`strval()`-ed and appended only `if ($item)` (`EvaluatorFunctionConcat.php`), and
|
|
123
140
|
`'0'` is the one non-empty string PHP calls false. So a number that can be zero must
|
|
@@ -178,15 +178,37 @@ All eight shapes above were committed and read back from the delivered page;
|
|
|
178
178
|
|
|
179
179
|
## The surface, extracted
|
|
180
180
|
|
|
181
|
-
`data/interaction-types.csv` —
|
|
181
|
+
`data/interaction-types.csv` — 16 trigger types in two families:
|
|
182
182
|
|
|
183
183
|
| family | how it runs | types |
|
|
184
184
|
|---|---|---|
|
|
185
|
-
| `timed` | its own clock, fired by an event | `pageLoad`, `click`, `hover`, `formSubmit`, `tabChange`, `slideChange`, `dropdownChange`, `accordionItemChange`, `elementScrollIntoView`, `scrollDirectionChange` |
|
|
185
|
+
| `timed` | its own clock, fired by an event | `pageLoad`, `click`, `hover`, `formSubmit`, `tabChange`, `slideChange`, `dropdownChange`, `accordionItemChange`, `elementScrollIntoView`, `scrollDirectionChange`, `exitIntent`, `scrollDepth`, `modal`, `popover` |
|
|
186
186
|
| `progress` | driven by a scalar, scrubbable both ways | `scrollIntoView`, `pointerMove` |
|
|
187
187
|
|
|
188
|
+
**The editor's names are swapped against the ids.** The editor's "Scroll into view"
|
|
189
|
+
(fire once when the element enters) is `elementScrollIntoView`; its "While scrolling"
|
|
190
|
+
(scrub with scroll position) is `scrollIntoView`. In `elementScrollIntoView`,
|
|
191
|
+
`scrollIntoView` and `pointerMove`, the trigger must not be the target or inside it.
|
|
192
|
+
|
|
193
|
+
Trigger settings the official docs describe, with their keys
|
|
194
|
+
(`InteractionTypeData`, `TimedInteractionTypeOptionsDataSub`):
|
|
195
|
+
|
|
196
|
+
- `triggerOnce` `"0"|"1"` with `completedAfter` - only on types that support it;
|
|
197
|
+
`pageLoad` has none. `exitIntent` fires once and stops listening by itself.
|
|
198
|
+
- `outOfView` `"0"` keep running / `"1"` suspend / `"2"` reset, with
|
|
199
|
+
`outOfViewOffset` in vh.
|
|
200
|
+
- Timed types only: `isLoop` `"0"|"1"`, `startDelay` and `iterations` (integers ≥ 0).
|
|
201
|
+
- Slots: `click` has click / `odd` / `even`; `scrollDirectionChange` has `down` /
|
|
202
|
+
`up` (offsets in px); `elementScrollIntoView` has `in` / `out`; `modal` and
|
|
203
|
+
`popover` have show / `beforeClose` / `afterClose`, and a close waits for
|
|
204
|
+
`beforeClose` to finish. `scrollDepth`'s % is of the full scrollable height, and
|
|
205
|
+
`returned` only follows a `reached`.
|
|
206
|
+
- Targeting a component instance animates its children, not the instance itself.
|
|
207
|
+
- Tweens: the "initial value" applies only to the first tween; later ones are a
|
|
208
|
+
from → to pair, and one tween cannot hold the same property twice.
|
|
209
|
+
|
|
188
210
|
`data/animatable-properties.csv` — the 22 properties a keyframe can drive. **This is
|
|
189
|
-
not the same set as the
|
|
211
|
+
not the same set as the 101 style properties**, and ten of them animate through a CSS
|
|
190
212
|
custom property rather than the property itself:
|
|
191
213
|
|
|
192
214
|
```
|
|
@@ -199,6 +221,12 @@ Animating through `--mosaic-translate-y` rather than `translate` is why a Mosaic
|
|
|
199
221
|
interaction can move an element that already has a CSS `translate` set: the two
|
|
200
222
|
compose instead of one clobbering the other.
|
|
201
223
|
|
|
202
|
-
`data/pluggables.csv` lists the
|
|
203
|
-
`link`, `script`, `setCookie`, `player*`, `interaction*`
|
|
204
|
-
|
|
224
|
+
`data/pluggables.csv` lists the non-animation action types an interaction can run —
|
|
225
|
+
`link`, `script`, `setCookie`, `player*`, `interaction*` (suspend / resume / reset by
|
|
226
|
+
interaction ID), `remember` / `forget`, `modalOpen` / `modalClose`, `popoverOpen` /
|
|
227
|
+
`popoverClose` / `popoverToggle`, and `scrollTo` (Pro) - for triggering behaviour
|
|
228
|
+
rather than motion. A modal has no toggle. `modalClose` / `popoverClose` placed
|
|
229
|
+
inside the dialog they close need no target - the action resolves its own dialog.
|
|
230
|
+
`setCookie` writes a session cookie, gone when the browser closes. With a class as the
|
|
231
|
+
trigger and an empty target, the action hits the element that fired; a class used as
|
|
232
|
+
the TARGET hits every element carrying it on the page.
|
package/references/placement.md
CHANGED
|
@@ -174,11 +174,15 @@ navbar animation (none|fade|fadeDown|fadeUp|scaleDown|flipDown)
|
|
|
174
174
|
Measured: above `buttonBreakpoint` the links are shown and the toggle is hidden;
|
|
175
175
|
below it the host gains `dropdown-mode`, the links disappear, and clicking the
|
|
176
176
|
toggle adds `dropdown--opened` and reveals them. The breakpoint is named with the
|
|
177
|
-
same ids the style system uses (`_t`, `_m`).
|
|
177
|
+
same ids the style system uses (`_t`, `_m`). Unset, `buttonBreakpoint` is `_m` and
|
|
178
|
+
`animation` is `fade` (`NavbarElementMResource`). A navbar cannot sit inside a navbar.
|
|
178
179
|
|
|
179
180
|
**`icon` takes RAW SVG** in its `svg` property — not a URL, not an icon-library
|
|
180
|
-
name. `autoScale`
|
|
181
|
-
SVG
|
|
181
|
+
name. `autoScale` strips the SVG's own `width`/`height` attributes so it follows the
|
|
182
|
+
element's box - an SVG without them shows no difference. `currentColor` inside the
|
|
183
|
+
SVG picks up the node's `color`, but an SVG with no `fill`, `stroke` or colour
|
|
184
|
+
attribute anywhere gets `fill="black"` injected (`IconElementMResource`), so write
|
|
185
|
+
`fill="currentColor"` on a bare path yourself.
|
|
182
186
|
|
|
183
187
|
**`image.image` takes the attachment protocol**:
|
|
184
188
|
`wp-attachment://image/<id>/full/<uploads-relative path>`. The last segment is
|
|
@@ -191,3 +195,60 @@ WooCommerce's own markup, not a reimplementation — and **`wpContent.content`**
|
|
|
191
195
|
dropped and the block renders empty. Its default is `@VAR('post/content')`, which
|
|
192
196
|
is why the node usually sits inside a loop and needs nothing written at all, and
|
|
193
197
|
the property is gated on the `unfiltered_html` capability.
|
|
198
|
+
|
|
199
|
+
`code.content` is gated on `unfiltered_html` exactly like `wpContent`, and so is
|
|
200
|
+
`wpShortcode.shortcode` - a REST writer without the capability has the value dropped
|
|
201
|
+
without an error. An unset `code.content` renders "Hello World, Hello Mosaic".
|
|
202
|
+
|
|
203
|
+
## Per-element facts the official docs add (1.0.11)
|
|
204
|
+
|
|
205
|
+
Read from the Mosaic docs and confirmed in source unless marked; none of these is in
|
|
206
|
+
the sweep tables.
|
|
207
|
+
|
|
208
|
+
- **Default children the editor inserts** (headless builds get none of them unless
|
|
209
|
+
heal adds them): `accordion` - two `accordion-item`s, each a title (an H6 `text`
|
|
210
|
+
plus Plus and Minus `icon`s shown and hidden by `___accordion-item--opened`) and a
|
|
211
|
+
content paragraph; `menu` - two `menu-link`s; `tabs` - a `tabs-menu` with two tabs
|
|
212
|
+
("Tab 1", "Tab 2") and a `tabs-content` with two panes, and heal re-pairs a
|
|
213
|
+
missing tab or pane; `navbar` - `navbar-toggle` plus `navigation`; `slider` - one
|
|
214
|
+
slide. A `section` inserted in the editor arrives with a Container `div` inside;
|
|
215
|
+
`section` itself does not need one.
|
|
216
|
+
- **accordion**: `openMode` `single` (default) | `multiple` | `alwaysOpen` - the last
|
|
217
|
+
renders a bare `<dl>` with no `<mosaic-accordion>` and no script. `animation`
|
|
218
|
+
`none` (default when absent; the editor inserts `slide`) | `slide`, and Firefox
|
|
219
|
+
shows `slide` as none. `firstOpened:"1"` opens the first item, `requireOneOpen`
|
|
220
|
+
keeps one open.
|
|
221
|
+
- **form**: `submitType` is `action` (default) or `native`; the options sit in
|
|
222
|
+
`actionOptions {actions[], formName, entryName}` or `nativeOptions {url, target,
|
|
223
|
+
method get|post, encoding}`, and switching type deletes the other group. A native
|
|
224
|
+
submit skips server validation, the honeypot and CAPTCHA. The success screen
|
|
225
|
+
shows only for `action` with no redirect. With no error-message element, errors
|
|
226
|
+
appear in the browser's own bubble. Every label and legend is required; hide one
|
|
227
|
+
with the `screen-reader-only` class.
|
|
228
|
+
- **googlemaps**: prints NOTHING until Mosaic → Settings has a `googleMapsApiKey`, or
|
|
229
|
+
when `query` is empty. Properties are `query`, `zoom` (0-21, default 15),
|
|
230
|
+
`maptype`, `lazyLoad` (default on) - the docs' Language and Region settings are
|
|
231
|
+
not in 1.0.11. `query` and `zoom` take `{"v": …}`.
|
|
232
|
+
- **openstreetmap**: `lazyLoad` defaults on; one marker only; the
|
|
233
|
+
"© OpenStreetMap contributors" credit must stay visible.
|
|
234
|
+
- **list**: `<ol>` only with the Ordered variant, `<ul>` otherwise, and
|
|
235
|
+
`listType` / `listStart` are emitted only for Ordered. An empty list prints nothing.
|
|
236
|
+
- **loop**: records per page is `maxItems`, offset is `offset`; an empty
|
|
237
|
+
`paginationKey` defaults to the loop's own id. `loop-item` / `list-item` /
|
|
238
|
+
`accordion-item` `mode`: `item` (normal), `beforeMatch` / `afterMatch` (a static
|
|
239
|
+
item inserted before / after a matching one), `separator` (a fixed divider between
|
|
240
|
+
items). Pagination does not show when there is only one page.
|
|
241
|
+
- **modal**: `closedby` defaults to `everything`. There is no toggle action. Opening
|
|
242
|
+
a dialog nested in a closed modal or popover opens the outer one first. Focus is
|
|
243
|
+
trapped in the window, starts on its first field and returns to where it was on
|
|
244
|
+
close; the page behind becomes usable the moment closing starts. Several windows in
|
|
245
|
+
one modal overlap.
|
|
246
|
+
- **popover**: one that opens by itself (page load, exit intent, scroll depth) with
|
|
247
|
+
no anchor appears centred - give it an explicit anchor. Clicks on its opener, or
|
|
248
|
+
inside a popover opened from it, do not count as "outside".
|
|
249
|
+
- **video / vimeo / youtube**: `threshold` is the "into view offset" - the share
|
|
250
|
+
that must be visible; scrolled out, a playing video pauses and resumes on return.
|
|
251
|
+
Vimeo unlisted videos need the full link with its privacy hash; `startTime` is
|
|
252
|
+
mm:ss.
|
|
253
|
+
- **button**: Badge defaults to `inactive`; `attributes` with `on*`, `srcdoc` or
|
|
254
|
+
`formaction` names are refused for a writer without `unfiltered_html`.
|
package/references/responsive.md
CHANGED
|
@@ -4,13 +4,13 @@ Responsive in Mosaic is the **second axis of the style object**, not a separate
|
|
|
4
4
|
structure and not a naming convention:
|
|
5
5
|
|
|
6
6
|
```jsonc
|
|
7
|
-
"style": {
|
|
7
|
+
"style": {"states": {
|
|
8
8
|
"&": { // state
|
|
9
9
|
"_": {"paddingLeft": "48px"}, // base breakpoint
|
|
10
10
|
"_t": {"paddingLeft": "32px"}, // <=1079px
|
|
11
11
|
"_m": {"paddingLeft": "20px"} // <=767px
|
|
12
12
|
}
|
|
13
|
-
}
|
|
13
|
+
}}
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
`state → breakpoint → property`. Get the two middle levels the wrong way round and
|
|
@@ -32,6 +32,14 @@ Both are `direction: down`, so both match on a phone, and **`_m` is ordered afte
|
|
|
32
32
|
losing to it. Custom breakpoints get UUIDs instead of `_t`/`_m`; do not hardcode the
|
|
33
33
|
pair, read the table.
|
|
34
34
|
|
|
35
|
+
A row is not always `down`. `BreakpointMResourceData` declares `type` (`simple` |
|
|
36
|
+
`custom`, default simple), `width` (integer ≥ 1), `direction` (`up` | `down`,
|
|
37
|
+
default down), `query` (a custom row's media query, written without `@media`) and
|
|
38
|
+
`previewWidth` / `previewHeight`. An `up` row is a min-width breakpoint, so the
|
|
39
|
+
"later row overrides" reasoning above only holds among `down` rows - read
|
|
40
|
+
`direction` before assuming the cascade. Only the two healed `down` rows have been
|
|
41
|
+
measured here.
|
|
42
|
+
|
|
35
43
|
## What it compiles to
|
|
36
44
|
|
|
37
45
|
One inline stylesheet per breakpoint, in the head, each wrapped in its own query:
|
|
@@ -73,16 +81,24 @@ Measured twice on the same page: a 3×2 hairline list that kept a column rule an
|
|
|
73
81
|
cell opened a row while still carrying the four-up rule. `tools/verify_rwd.py`
|
|
74
82
|
reports every one of these as `RESET-RISK`.
|
|
75
83
|
|
|
76
|
-
##
|
|
84
|
+
## Place a grid child with `gridChildPosition`, never its legs
|
|
85
|
+
|
|
86
|
+
`gridColumnStart`, `gridColumnEnd`, `gridRowStart` and `gridRowEnd` are in
|
|
87
|
+
`data/style-properties.csv` as members of the `gridChildPosition` group. Written as
|
|
88
|
+
loose keys they compile to nothing - 16 `gridColumnStart` declarations in a committed
|
|
89
|
+
spec, **zero** `grid-column` in the delivered CSS, no exception anywhere.
|
|
90
|
+
|
|
91
|
+
Written as the group they work. Measured on 1.0.11:
|
|
77
92
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
93
|
+
```jsonc
|
|
94
|
+
"gridChildPosition": {"gridColumnStart": "2", "gridColumnEnd": "4",
|
|
95
|
+
"gridRowStart": "1", "gridRowEnd": "3"}
|
|
96
|
+
// -> grid-column-start:2; grid-column-end:4; grid-row-start:1; grid-row-end:3
|
|
97
|
+
```
|
|
81
98
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
template — do not try to place the child.
|
|
99
|
+
All four keys are required non-empty strings (`ValidatorStyleGridChildPosition`) -
|
|
100
|
+
`"auto"` and `"span 2"` are strings too. This is the editor's Grid child →
|
|
101
|
+
Position → Manual.
|
|
86
102
|
|
|
87
103
|
## A row with more children than columns fills the gutter, not the width
|
|
88
104
|
|
package/references/slider.md
CHANGED
|
@@ -27,6 +27,10 @@ the way its factories require, every piece commits and renders.
|
|
|
27
27
|
{"type": "slider-arrow-right"}]}
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
`duration` is the TRANSITION in ms (default 1000, emitted as `data-duration` and
|
|
31
|
+
handed to the slide animation); `autoplayDelay` is how long a slide stays (default
|
|
32
|
+
2000). The official docs describe `duration` as the dwell time - it is not.
|
|
33
|
+
|
|
30
34
|
`animation` is `slide` | `crossFade` | `fadeOut` | `fadeOver`. `autoplayLimit` is how
|
|
31
35
|
many rounds autoplay runs before it stops, `0` meaning no limit.
|
|
32
36
|
|
|
@@ -78,6 +82,14 @@ A slide's own `attrID` lands on the inner `.m-slide-content`, not on the
|
|
|
78
82
|
| track | `<mosaic-slider-slides>` with `aria-live` — `off` while autoplaying, `polite` when it is not |
|
|
79
83
|
| reduced motion | **it holds still on its own.** Mosaic stops the autoplay; the author does not have to |
|
|
80
84
|
|
|
85
|
+
**Deep links work.** Give a slide - or anything inside one - an id and link to
|
|
86
|
+
`#that-id`: `Slider.js` listens to `hashchange`, jumps there without a transition,
|
|
87
|
+
scrolls it into view and lets autoplay continue from it. Tabs do the same
|
|
88
|
+
(`Tabs.js`), nested tabs open every level, and a slider in a tab or a tab in a slide
|
|
89
|
+
both resolve. A slider holds one slide at a time - several cards side by side live
|
|
90
|
+
inside one slide and stack rather than spread on a phone - so a responsive
|
|
91
|
+
multi-card carousel or a centred "showcase" slider is not buildable with it.
|
|
92
|
+
|
|
81
93
|
The carousel (`crossFade`, `isCarousel: "1"`, autoplay off) stayed on slide 0 for
|
|
82
94
|
2.6s unaided, which is the other half of the same claim: autoplay is the only thing
|
|
83
95
|
that moves a slider by itself.
|
|
@@ -97,9 +109,11 @@ both agree on.
|
|
|
97
109
|
|
|
98
110
|
## Two things the component does not draw for you
|
|
99
111
|
|
|
100
|
-
**An arrow has no glyph.** `<mosaic-slider-arrow-left>`
|
|
101
|
-
|
|
102
|
-
|
|
112
|
+
**An arrow has no glyph unless you give it one.** `<mosaic-slider-arrow-left>`
|
|
113
|
+
written with no children renders with empty `innerHTML` - its default children are
|
|
114
|
+
`[]`. It does take children (`canBeParentFor` returns `true`; placement `any` since
|
|
115
|
+
v1.33), so an `icon` node with an arrow SVG inside it is what the editor itself
|
|
116
|
+
inserts. Without one, the appearance is the author's CSS on the element. The
|
|
103
117
|
two-border chevron works and needs nothing else: a ~9px box showing only
|
|
104
118
|
`border-top` and `border-right`, turned with a `rotateZ` transform entry (`45deg`
|
|
105
119
|
for next, `-135deg` for prev).
|
package/references/styling.md
CHANGED
|
@@ -16,8 +16,9 @@ The commit is accepted, the row is stored, and the stylesheet simply has no such
|
|
|
16
16
|
declaration. Meanwhile every one of the 58 testable ungrouped properties compiled.
|
|
17
17
|
|
|
18
18
|
Use the grouped shape — `border` takes `{"width": "3px", "style": "dashed", "color":
|
|
19
|
-
"rgb(...)"}` and does compile
|
|
20
|
-
|
|
19
|
+
"rgb(...)"}` and does compile, and so does `gridChildPosition` with all four of its
|
|
20
|
+
keys (measured on 1.0.11; see `references/responsive.md`) — or drop to
|
|
21
|
+
`customDeclarations`.
|
|
21
22
|
|
|
22
23
|
`data/style-verification.csv` is per-property, with the group beside the result.
|
|
23
24
|
|
|
@@ -52,7 +53,9 @@ A node's `data.style` is addressed by three axes — **state, breakpoint, proper
|
|
|
52
53
|
`type` is `variant` | `variantSubClass` | `universalClass` | `universalSubClass` |
|
|
53
54
|
`local`; before 1.0.8 these keys were `elementClass`, `utilityClasses`,
|
|
54
55
|
`defaultClass` with type `custom`, and the upgrade rewrites stored rows) and
|
|
55
|
-
`localStates` alongside `states
|
|
56
|
+
`localStates` alongside `states`. The first three are the class layer; `localStates`
|
|
57
|
+
is the node's own custom states (SCSS selector with `&` for the element) - see
|
|
58
|
+
`references/design-system.md` → "Which class wins".
|
|
56
59
|
|
|
57
60
|
## What comes out
|
|
58
61
|
|
|
@@ -118,6 +121,24 @@ performance 72 → 86, LCP 4.8 s → 3.2 s, CLS still 0, and a frame-by-frame ch
|
|
|
118
121
|
no unstyled frame. TBT rose (42 → 154 ms) only because the scripts now run inside the
|
|
119
122
|
measured window.
|
|
120
123
|
|
|
124
|
+
**Mosaic shields that reveal script from optimizers it can detect.** `Html::script`
|
|
125
|
+
marks the reveal script, and enqueued handles flagged `mosaicCritical`, with an
|
|
126
|
+
opt-out attribute chosen by which optimizer's constant is defined
|
|
127
|
+
(`Helpers/Html.php`):
|
|
128
|
+
|
|
129
|
+
| constant defined | attribute added |
|
|
130
|
+
|---|---|
|
|
131
|
+
| `LSCWP_V`, `WP_ROCKET_VERSION`, `FLYING_PRESS_VERSION`, `PERFMATTERS_VERSION` | `data-no-defer="1"` |
|
|
132
|
+
| `AUTOPTIMIZE_VERSION` | `data-no-optimize="1"` |
|
|
133
|
+
| `NITROPACK_VERSION` | `data-nitro-exclude="1"` |
|
|
134
|
+
| `MOSAIC_CLOUDFLARE_ROCKET_LOADER` (set it yourself in `wp-config.php`) | `data-cfasync="false"` |
|
|
135
|
+
|
|
136
|
+
Cloudflare Rocket Loader cannot be detected, so without that constant it delays the
|
|
137
|
+
reveal too. The official troubleshooting page also lists `data-no-delay`,
|
|
138
|
+
`data-no-async` and WP Rocket's `rocket_exclude_js` filter; none of them is in the
|
|
139
|
+
1.0.11 source. None of this helps a hand-added `defer` on other scripts, which still
|
|
140
|
+
holds `DOMContentLoaded` back - the override above is the fix for that.
|
|
141
|
+
|
|
121
142
|
## Setting values
|
|
122
143
|
|
|
123
144
|
The `factory` column in `data/style-properties.csv` tells you the value shape:
|
|
@@ -191,6 +212,17 @@ other type-switched groups too.
|
|
|
191
212
|
`ScaleTransformTypeFactory`, which takes separate axes. Use `scaleX`/`scaleY` instead,
|
|
192
213
|
which are `SingleTransformTypeFactory` and do take `{"value": …}`.
|
|
193
214
|
|
|
215
|
+
The standalone `scale` PROPERTY is a different thing and does compile:
|
|
216
|
+
`"scale": {"type": "scale", "scaleOptions": {"value": "1.37"}}` →
|
|
217
|
+
`--mosaic-scale:1.37; scale:1.37` (a `scale3D` type also exists, not measured). `perspective` takes a
|
|
218
|
+
plain length (`"731px"` → `perspective:731px`). Both measured on 1.0.11. The
|
|
219
|
+
`transform` list and the individual `translate` / `scale` / `rotate` properties
|
|
220
|
+
STACK - CSS applies both - in static styles as well as in interactions.
|
|
221
|
+
|
|
222
|
+
Two layout rules the official docs state: `position: sticky` does nothing without a
|
|
223
|
+
`top`, and a transform on the element or any ancestor breaks
|
|
224
|
+
`background-attachment: fixed`.
|
|
225
|
+
|
|
194
226
|
**The escape hatch.** `customDeclarations` (`customStyles` before 1.0.8; the upgrade
|
|
195
227
|
rewrites stored rows, and `build_page.py` still accepts the old spelling in a spec)
|
|
196
228
|
accepts raw CSS text and emits it verbatim into the rule:
|
|
@@ -205,8 +237,10 @@ down — at the cost of bypassing the collection-variable layer entirely.
|
|
|
205
237
|
|
|
206
238
|
## Properties that exist in CSS but not in Mosaic
|
|
207
239
|
|
|
208
|
-
`data/style-properties.csv` is the whole registry
|
|
209
|
-
|
|
240
|
+
`data/style-properties.csv` is the whole registry (101 rows since v1.34 - the
|
|
241
|
+
extractor used to miss single-quoted registrations, which hid `scale`, `perspective`
|
|
242
|
+
and `collectionModesData`), and the fastest way to lose an hour is to assume a
|
|
243
|
+
property is in it because CSS has it. Two that catch people,
|
|
210
244
|
both found by writing a page rather than by reading the table:
|
|
211
245
|
|
|
212
246
|
**`flexGrow` and `flexShrink` do not exist.** Mosaic models both as one
|
|
@@ -62,8 +62,26 @@ prune.
|
|
|
62
62
|
only resource type any template path registers is `post`
|
|
63
63
|
(`setResourceType('post')` in PathPostTypePage, PathPostTypePost and PathPostTypes).
|
|
64
64
|
`path/single-page.php` and `path/index.php` were both tried against the live
|
|
65
|
-
endpoint and both returned HTTP 500.
|
|
66
|
-
|
|
65
|
+
endpoint and both returned HTTP 500. So this endpoint has no catch-all; the catch-all
|
|
66
|
+
is the `assign:"auto"`, `path:"index.php"` row above (the editor's **Fallback → Empty**
|
|
67
|
+
template). Without one, a URL with no template of its own gets `status_header(406)`
|
|
68
|
+
and an empty body.
|
|
69
|
+
|
|
70
|
+
**Which auto template wins.** Candidates are ordered first by how specific the path
|
|
71
|
+
is, then by the row's `ordering` string (`ORDER BY FIELD(path, …) ASC, BINARY
|
|
72
|
+
ordering ASC`, `TemplatesRevisionModel`), and the first one whose conditions match is
|
|
73
|
+
used (`LocatedTemplateRenderMResourceManager`). Two auto templates on the same path -
|
|
74
|
+
say a conditioned single-post layout and the plain one - need the conditioned one to
|
|
75
|
+
carry the LOWER `ordering`, or the unconditioned one always wins. This is the
|
|
76
|
+
editor's drag-to-reorder. The editor's fallback types map to paths as Single →
|
|
77
|
+
`single.php`, Archive → `archive.php`, Homepage → `front-page.php`, Empty →
|
|
78
|
+
`index.php`. Masters order the same way: the first master by `ordering` is the one
|
|
79
|
+
a new template is offered by default.
|
|
80
|
+
|
|
81
|
+
**A template_assigns row with empty `parentID` and `parentType` binds nothing.** It is
|
|
82
|
+
what the editor writes for "Auto template" (`TemplateAssign` treats it as
|
|
83
|
+
auto-assigned and `Post::getAssignedTemplateID` skips it), so do not count it as a
|
|
84
|
+
manual binding.
|
|
67
85
|
|
|
68
86
|
**Manual assignment is a REST call, not a commit.** `POST /templateAssign/createManualTemplate`
|
|
69
87
|
with `resourceQuery=post/<postID>` and `masterID=<masterID>` creates the template row
|
|
@@ -167,6 +185,37 @@ necessarily work as an interaction gate.
|
|
|
167
185
|
Most subject settings fields carry `supportDynamic: true`, meaning the value itself
|
|
168
186
|
can be an `@` expression rather than a literal — see `references/dynamic-content.md`.
|
|
169
187
|
|
|
188
|
+
## Multilingual sites
|
|
189
|
+
|
|
190
|
+
Mosaic has no front-end translation of its own, and no condition subject for the
|
|
191
|
+
current language: the taxonomy subjects list only `public` taxonomies
|
|
192
|
+
(`ServerConditionSubjectTaxonomies`), Polylang's `language` taxonomy is not public,
|
|
193
|
+
and WPML does not use a taxonomy at all. There is no WPML or Polylang code anywhere in
|
|
194
|
+
the 1.0.11 plugin. What the official docs (Translation page) describe, and what the
|
|
195
|
+
data model supports:
|
|
196
|
+
|
|
197
|
+
- **Per-language copies of manual templates.** Each translation is its own post, so
|
|
198
|
+
bind it to its own template (`createManualTemplate`) holding the translated text.
|
|
199
|
+
Header and footer live on the master, so a translated header means a translated
|
|
200
|
+
master, used by that language's templates. Text inside templates does not reach
|
|
201
|
+
WPML String Translation.
|
|
202
|
+
- **Auto templates are shared by every language** - archive, search, 404, the
|
|
203
|
+
fallbacks. Keep their text in `@VAR` output or the post content, not literals.
|
|
204
|
+
- **Post content translates for free.** `wpContent` prints the editor content of the
|
|
205
|
+
current post, which the translation plugin already swapped, so a page whose words
|
|
206
|
+
live in the WordPress editor needs one template for all languages.
|
|
207
|
+
- **Loops follow the language.** WPML filters the query, so a `loop` lists only the
|
|
208
|
+
current language's posts; untranslated posts show only with WPML's "fallback to
|
|
209
|
+
default language" per post type.
|
|
210
|
+
- **Language switcher** goes in a `wpShortcode` (`[wpml_language_switcher]`); Polylang
|
|
211
|
+
ships no shortcode.
|
|
212
|
+
- TranslatePress (which translates the rendered page) is the plugin the Mosaic team
|
|
213
|
+
recommends; it needs none of the above.
|
|
214
|
+
|
|
215
|
+
`<html lang>` comes from `get_locale()` (`Common/SiteLanguage.php`), which the
|
|
216
|
+
translation plugins filter per request - not measured here. Bidi: RTL sites are
|
|
217
|
+
supported, but Tabs' arrow keys and Slider swiping are not mirrored on the front end.
|
|
218
|
+
|
|
170
219
|
## Verification status
|
|
171
220
|
|
|
172
221
|
The routing rules and the condition grammar above are read from source and from the
|
package/references/upgrading.md
CHANGED
|
@@ -11,6 +11,27 @@ Everything below was done to the test site this skill was built on - a real
|
|
|
11
11
|
the nineteen Elementor conversions and every probe master on it - and then
|
|
12
12
|
every sweep was re-run against the result.
|
|
13
13
|
|
|
14
|
+
## What the server must have, and moving a site
|
|
15
|
+
|
|
16
|
+
`SystemRequirements.php` refuses to run without PHP ≥ 8.2, WordPress ≥ 6.9 (the
|
|
17
|
+
official docs page still says 6.5; `defines.php` says 6.9), the `zip`, `dom` and
|
|
18
|
+
`curl` extensions, `gd` built WITH WebP, and a MySQL-family database - `DB_ENGINE`
|
|
19
|
+
sqlite is refused. The docs add fileinfo, MySQL 8 / MariaDB 10.6 and a 256M
|
|
20
|
+
`memory_limit`, which the plugin does not check itself. The folder must be
|
|
21
|
+
`wp-content/plugins/mosaic/`.
|
|
22
|
+
|
|
23
|
+
Mosaic writes to `uploads/mosaic/` - `tmp/` for imports and thumbnails, falling back
|
|
24
|
+
to `get_temp_dir()/mosaic/` (so `WP_TEMP_DIR`) only when uploads is not writable, and
|
|
25
|
+
`submissions/<id>/` for form uploads - each behind a deny `.htaccess`. Copy that
|
|
26
|
+
folder when moving a site. Uninstalling drops the tables and deletes it.
|
|
27
|
+
|
|
28
|
+
Moving to a new domain with a search-and-replace: node `data` is stored with
|
|
29
|
+
`json_encode` and no `JSON_UNESCAPED_SLASHES`, so an absolute URL sits in the table as
|
|
30
|
+
`https:\/\/old.example`, and a replace for `https://old.example` misses it (read from
|
|
31
|
+
source, not measured). `wp-attachment://` image paths carry no domain and need
|
|
32
|
+
nothing. The licence is bound to the domain, and Mosaic → Settings (API keys) lives
|
|
33
|
+
in `wp_mosaic_settings`, which a theme ZIP does not carry.
|
|
34
|
+
|
|
14
35
|
## Driving the upgrade from outside wp-admin
|
|
15
36
|
|
|
16
37
|
```
|
|
@@ -300,7 +321,10 @@ analysis (`rank_math_content`), with the Content element's slot replaced by a li
|
|
|
300
321
|
marker so the text being typed is analysed in place. Rank Math's link counter
|
|
301
322
|
(`rank_math/links/content`) gets the render instead of the empty `post_content`.
|
|
302
323
|
SEOPress and Slim SEO have their own adapters. A Mosaic page no longer scores as
|
|
303
|
-
empty.
|
|
324
|
+
empty. Limits the official docs state: SEOPress needs 10.1 or later; All in One SEO
|
|
325
|
+
is not supported, and neither is Yoast's link counting; the master (header and
|
|
326
|
+
footer) is left out of what is analysed; and XML sitemaps do not list images placed
|
|
327
|
+
in Mosaic content.
|
|
304
328
|
|
|
305
329
|
**Re-verified on the live site:** `popovers` 37/37, `component-wall` 26/26,
|
|
306
330
|
`form-surface`, `content-loop` 15/15, both sliders, `tokens`, `navigation` 27/27
|
|
@@ -49,10 +49,12 @@ as a number scrambles the page; renumbering siblings the way you would an array
|
|
|
49
49
|
both unnecessary and destructive of other clients' inserts.
|
|
50
50
|
|
|
51
51
|
**"The post is the unit."** In Elementor and Gutenberg, one post = one page's data.
|
|
52
|
-
In Mosaic a post is a *target*:
|
|
53
|
-
|
|
52
|
+
In Mosaic a post is a *target*: an auto template binds by template path (a post
|
|
53
|
+
type's singles, an archive, search) and serves every post that path covers, while a
|
|
54
|
+
manual template is bound to one post through `mosaic_template_assigns`. Editing "the
|
|
54
55
|
page" usually means editing a template, and the blast radius is every post that
|
|
55
|
-
template
|
|
56
|
+
template serves. Check the template's `assign` and `path`, and
|
|
57
|
+
`mosaic_template_assigns`, before you edit.
|
|
56
58
|
|
|
57
59
|
**"Style the element."** Elementor puts controls on the widget. Mosaic puts styling
|
|
58
60
|
in a **class system** (152 built-in variants - element classes) layered over a **token system**
|
|
@@ -71,8 +73,8 @@ revision is rejected, and the rejection arrives as HTTP 200. See
|
|
|
71
73
|
|
|
72
74
|
- Post content authored as blocks, on a normal WP theme → `gutenberg-headless`.
|
|
73
75
|
- An Elementor site, page-level construction → `elementor-headless`.
|
|
74
|
-
- A Mosaic site → here. The write path and all
|
|
75
|
-
|
|
76
|
+
- A Mosaic site → here. The write path and all 129 node types are measured (5 of
|
|
77
|
+
them Pro-only on 1.0.11 - see `references/data-model.md`).
|
|
76
78
|
|
|
77
79
|
## One thing the converter has to add, not copy
|
|
78
80
|
|
|
@@ -29,6 +29,17 @@ component scripts (accordion, dropdown, navbar, form, slider, dialog — each
|
|
|
29
29
|
`*ElementMResource` asks `MosaicSettings::isScriptsInlineAllowed()`); `Frontend.js`
|
|
30
30
|
still loads as a file.
|
|
31
31
|
|
|
32
|
+
The keys it holds (`MosaicSettingsMResource`): `smallNudge`, `bigNudge`,
|
|
33
|
+
`previewTargetBlank`, `keepAddPanelOpen`, `manualAssignEnabledForPostTypes` (which
|
|
34
|
+
post types get the "assign template" control), `historyLimit`, `fontDisplay`
|
|
35
|
+
(default `block`), `saveGoogleFontsLocally`, `googleFontsCacheExpirationTime`,
|
|
36
|
+
`allowTrackingUsageData`, `scriptsInline`, `criticalPreload` (sends HTTP
|
|
37
|
+
`Link: rel=preload` for the critical scripts), `wpEmoji`, `serverSideThumbnailRender`,
|
|
38
|
+
the `turnstile*` / `recaptcha*` CAPTCHA keys, `googleMapsApiKey`,
|
|
39
|
+
`mailerliteApiToken`, `mailchimpApiKey`, `kitApiKey`. They are site-wide, not per
|
|
40
|
+
theme, and the theme ZIP does not carry them: moving a site by ZIP needs these
|
|
41
|
+
re-entered, and a `googlemaps` element prints nothing until `googleMapsApiKey` is set.
|
|
42
|
+
|
|
32
43
|
## The envelopes
|
|
33
44
|
|
|
34
45
|
Both `checkout` and `check` take one required string parameter, `syncCheckEnvelopes`
|
|
@@ -123,7 +123,7 @@ const rows = (p) => tableFiles(p)
|
|
|
123
123
|
.reduce((n, f) => n + read(f).trim().split("\n").length - 1, 0); // minus each header
|
|
124
124
|
const counts = {
|
|
125
125
|
"data/node-verification.csv": 129,
|
|
126
|
-
"data/style-verification.csv":
|
|
126
|
+
"data/style-verification.csv": 101,
|
|
127
127
|
"data/node-property-verification.csv": 191,
|
|
128
128
|
"data/rwd-verification.csv": 733,
|
|
129
129
|
"data/browser-verification": 4132,
|
package/tools/build_page.py
CHANGED
|
@@ -85,7 +85,7 @@ class Surface:
|
|
|
85
85
|
self.outcome = {r["type"]: r["outcome"] for r in load_csv("node-verification.csv")}
|
|
86
86
|
style_rows = load_csv("style-properties.csv")
|
|
87
87
|
self.style_props = {r["property"] for r in style_rows}
|
|
88
|
-
# 24 of the
|
|
88
|
+
# 24 of the 101 style properties are restricted to an enum. A value outside it
|
|
89
89
|
# is accepted by the API, stored, and silently never compiled - white-space
|
|
90
90
|
# takes pre-wrap but not pre-line, and the difference is invisible until you
|
|
91
91
|
# look at the delivered CSS. Refuse it here instead.
|
|
@@ -42,9 +42,12 @@ RE_STYLE_PROP = re.compile(
|
|
|
42
42
|
re.S)
|
|
43
43
|
RE_ACCEPTED = re.compile(r"createValidatorAcceptedValues\(\s*\[(.*?)\]", re.S)
|
|
44
44
|
|
|
45
|
+
# Either quote style: `new CSSScaleStylePropertyFactory('scale')` is single-quoted,
|
|
46
|
+
# and a double-quote-only pattern silently dropped scale, perspective and
|
|
47
|
+
# collectionModesData - all three compile (measured on 1.0.11).
|
|
45
48
|
RE_ADD = re.compile(
|
|
46
|
-
r'addCSSProperty\(\s*new\s+(\w+)\s*\(\s*"([
|
|
47
|
-
r'(?:\s*,\s*"([
|
|
49
|
+
r'addCSSProperty\(\s*new\s+(\w+)\s*\(\s*[\'"]([^\'"]+)[\'"]' # factory, first arg
|
|
50
|
+
r'(?:\s*,\s*[\'"]([^\'"]+)[\'"])?' # optional member name
|
|
48
51
|
r'(?:\s*,\s*([\w\\]+)::class)?', # optional value class
|
|
49
52
|
re.S,
|
|
50
53
|
)
|
|
@@ -55,6 +58,14 @@ RE_ADD = re.compile(
|
|
|
55
58
|
RE_STATE = re.compile(
|
|
56
59
|
r"createMeta\(\s*'([^']*)'\s*,\s*'((?:[^'\\]|\\.)*)'\s*(?:,\s*(\d+))?\s*\)", re.S
|
|
57
60
|
)
|
|
61
|
+
# createMeta('<stateID>', implode(',', array('<sel>', '<sel>', ...)) [, order]) - the
|
|
62
|
+
# accordion item and the dropdown spell their selector lists this way, and the
|
|
63
|
+
# single-string pattern above never saw ___accordion-item--opened/--opening or
|
|
64
|
+
# ___dropdown--opened.
|
|
65
|
+
RE_STATE_IMPLODE = re.compile(
|
|
66
|
+
r"createMeta\(\s*'([^']*)'\s*,\s*implode\(\s*'([^']*)'\s*,\s*(?:array\(|\[)(.*?)(?:\)|\])\s*\)\s*(?:,\s*(\d+))?\s*\)",
|
|
67
|
+
re.S,
|
|
68
|
+
)
|
|
58
69
|
|
|
59
70
|
|
|
60
71
|
def extract_states(plugin_root, out_dir):
|
|
@@ -66,7 +77,11 @@ def extract_states(plugin_root, out_dir):
|
|
|
66
77
|
path = os.path.join(dirpath, fn)
|
|
67
78
|
with open(path, encoding="utf-8", errors="replace") as fh:
|
|
68
79
|
src = fh.read()
|
|
69
|
-
|
|
80
|
+
found = list(RE_STATE.findall(src))
|
|
81
|
+
for state_id, glue, items, order in RE_STATE_IMPLODE.findall(src):
|
|
82
|
+
parts = re.findall(r"'((?:[^'\\]|\\.)*)'", items)
|
|
83
|
+
found.append((state_id, glue.join(parts), order))
|
|
84
|
+
for state_id, selector, order in found:
|
|
70
85
|
if state_id in seen:
|
|
71
86
|
continue
|
|
72
87
|
seen.add(state_id)
|
package/tools/mo.py
CHANGED
|
@@ -281,7 +281,7 @@ def cmd_params(a):
|
|
|
281
281
|
the placement rule - because the answer is not in any one of them.
|
|
282
282
|
|
|
283
283
|
Mosaic differs from a widget-based builder here in a way worth stating: the
|
|
284
|
-
STYLE surface is universal. Every element takes the same
|
|
284
|
+
STYLE surface is universal. Every element takes the same 101 style properties;
|
|
285
285
|
what varies per type is the DATA properties and which node-type-scoped states
|
|
286
286
|
apply. So the style half of this output is the same for every type, and that
|
|
287
287
|
is a fact about the platform rather than a shortcut taken here."""
|
|
@@ -777,7 +777,7 @@ def main():
|
|
|
777
777
|
"EVERYTHING settable on one type: data, style, states, placement")
|
|
778
778
|
p.add_argument("name")
|
|
779
779
|
p.add_argument("--style", action="store_true",
|
|
780
|
-
help="list all
|
|
780
|
+
help="list all 101 style properties too, not just count them")
|
|
781
781
|
|
|
782
782
|
p = add("check", cmd_check, "exit 1 if any named type is unsafe or unknown")
|
|
783
783
|
p.add_argument("names", nargs="+")
|