mosaic-headless 1.42.0 → 1.44.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/SKILL.md +3 -3
- package/assets/templates/platforms/claude-ai.json +1 -1
- package/assets/templates/platforms/claude-code.json +1 -1
- package/assets/templates/platforms/codex-cli.json +1 -1
- package/assets/templates/platforms/copilot.json +1 -1
- package/assets/templates/platforms/gemini-cli.json +1 -1
- package/data/pending.csv +1 -0
- package/data/variants.csv +80 -75
- package/package.json +1 -1
- package/references/data-files.md +1 -1
- package/references/design-system.md +22 -1
- package/references/facts.md +137 -3
- package/references/templates-and-conditions.md +32 -0
- package/references/tools.md +1 -0
- package/references/tutorials.md +3 -3
- package/tools/email_template_check.php +67 -0
package/SKILL.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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` (134 node types, 120 node properties, 101 style properties, 60 style states,
|
|
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` (134 node types, 120 node properties, 101 style properties, 60 style states, 162 variants, 76 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 and 1.0.12 (the buildable Select). 中文觸發:Mosaic、Nextend、不開編輯器做頁面、做一頁、整站、母版、範本、元件、變體、內距、外距、圓角、懸停、斷點、RWD、手機版、彈出視窗、浮動框、彈窗、摺疊面板、頁籤、輪播、表單、互動、動畫、深色模式、搬佈景、匯出匯入佈景、Mosaic 升級、Elementor 轉 Mosaic、自訂欄位。
|
|
5
5
|
license: "MIT"
|
|
6
6
|
user-invocable: true
|
|
7
7
|
metadata:
|
|
8
8
|
author: "moksa (https://moksaweb.com)"
|
|
9
|
-
version: "1.
|
|
9
|
+
version: "1.44.0"
|
|
10
10
|
homepage: "https://github.com/Moksa1123/mosaic-headless"
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -24,7 +24,7 @@ health, not plugin audits.
|
|
|
24
24
|
|---|---|
|
|
25
25
|
| Surface | Extracted from the Mosaic Pro plugin source, last re-extracted on **Mosaic Pro 1.0.14** (no table changed from 1.0.13) (unlicensed: the licence gates the theme library, not the node factories). `tools/check_tables.py` re-extracts every source table and diffs it against `data/`. The editor-side features of 1.0.13 and 1.0.14 are not measured yet: [upgrading.md](references/upgrading.md) |
|
|
26
26
|
| Measured on | A live WordPress 7.1 + WooCommerce 11.1 install, upgraded in place from 1.0.7 to 1.0.12. Node sweep: 133 of 134 types on 1.0.11 / 1.0.12 (`document` excluded: its probe wrecks the master). Older rows say which version they ran on. Detail: [verification-record.md](references/verification-record.md) |
|
|
27
|
-
| Size | 134 node types, 120 node property names declared in 201 rows (one row per owning data class), 191 node-property probe rows covering 118 of those names (`ariaLive` and `positioning` not yet probed), 101 style properties, 60 style states,
|
|
27
|
+
| Size | 134 node types, 120 node property names declared in 201 rows (one row per owning data class), 191 node-property probe rows covering 118 of those names (`ariaLive` and `positioning` not yet probed), 101 style properties, 60 style states, 162 variants, 76 dynamic variables, 16 interaction triggers, 115 REST routes, 23 tables. Current counts: `python tools/mo.py stats` - do not quote numbers from memory |
|
|
28
28
|
| Provenance | Each table says where it came from: **source** (read out of the plugin code), **live** (captured from the running site), **swept / probed / driven** (written to a page and asserted on the delivered HTML, CSS or browser). Per-file list: [data-files.md](references/data-files.md) |
|
|
29
29
|
| Chinese terms | `data/terms-zh.csv`: every row has `source` + `trust` |
|
|
30
30
|
| Trust levels | `measured` (swept, probed, driven) > `documented` (plugin source, Mosaic's shipped zh_TW strings, Mosaic's docs) > `inferred` / `house-style` (colloquial words, site conventions). Never present the last two as Mosaic's own |
|
package/data/pending.csv
CHANGED
|
@@ -19,3 +19,4 @@ date,question,why_not_found,asked_by,status
|
|
|
19
19
|
2026-11-24,Add a references/facts.md entry: WooCommerce coming-soon mode (store pages only) + Mosaic -> store pages answer 406. Woo renders its coming-soon page and returns '' from template_include; Mosaic's themes/mosaic/functions.php forces its index.php anyway; with no archive-product/single-product Mosaic template FrontendRenderer sets status_header(406). Also: does a store page that HAS a Mosaic template print two documents (Woo's page + Mosaic's) while coming-soon is on?,"the 406 is traced from source and read on the demo site (1.0.14, /shop/ and a product page, read-only); the two-document case is predicted from the code only - measuring it needs a store template written on the demo site, which waits for moksa 總機. Do the facts entry with the next release, together with RELEASING.md",skill 總機 (demo /shop/ 406 trace 2026-11-24),closed 2026-11-25: references/facts.md section added with v1.42.0; the two-document case is still open (row below)
|
|
20
20
|
2026-11-25,Does a WooCommerce store page that HAS a Mosaic template print two documents while coming-soon is on?,"predicted from the code only (references/facts.md, WooCommerce coming soon section); measuring it needs a store template written on the shared demo site, which waits for moksa 總機",skill 總機 (demo /shop/ 406 trace 2026-11-24),open
|
|
21
21
|
2026-11-25,"Variable-mode switch vs Chrome's visited-link colour, and @property <color> vs var() fallbacks on links","reported by a fourth site (references/facts.md, fourth site); not reproduced here - needs a theme with a mode collection, a visited link and screenshots (getComputedStyle cannot show visited colours)",skill 總機 (sync_nodes interaction target brief 2026-11-25),open
|
|
22
|
+
2026-11-28,"With WooCommerce coming-soon on, why does a store URL with any query string answer 200 (WooCommerce's max-age=60) while the plain URL answers Mosaic's 406?","observed on the demo only (references/facts.md, No Mosaic template section); the code path that skips Mosaic's status for a query string was not traced. It matters because verify_navigation.py adds ?_v= and so misses the 406",skill 總機 (template brief 2026-11-28),open
|
package/data/variants.csv
CHANGED
|
@@ -81,78 +81,83 @@ ed5a3838-6b8c-0018-a497-57bb81a05511,Label,m-label,True,,.m-label,ba5adb79-0b53-
|
|
|
81
81
|
9adf1aa8-afb6-0afb-87c2-0e1fe047a741,Form step,m-form-step,True,,.m-form-step,3ed458ca-ce0f-01f7-b7fe-427895279f54,False,True,False,b0H
|
|
82
82
|
4e48111e-cd4b-0552-9001-20952f140103,Button,m-form-step-button,True,,.m-form-step-button-back|.m-form-step-button-next,3ed458ca-ce0f-01f7-b7fe-427895279f54,False,True,False,b0I
|
|
83
83
|
8234ef14-32e1-0dbc-b603-c1c81bc61496,Radio input,m-radio,True,,.m-radio,0aba491f-bf49-0ce1-ae11-a5b8b78ec4cd,False,True,False,b0J
|
|
84
|
-
05fbeaf8-2ba9-0d9d-9c3b-36cd70256005,
|
|
85
|
-
df2d64e1-e3ee-0c6d-8660-bb7cc614cad7,Option,m-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
84
|
+
05fbeaf8-2ba9-0d9d-9c3b-36cd70256005,List box,m-listbox,True,,.m-listbox,ba5adb79-0b53-04d7-9acb-5a3219841114,True,True,False,b0K
|
|
85
|
+
df2d64e1-e3ee-0c6d-8660-bb7cc614cad7,Option,m-listbox-option,True,,.m-listbox-option,05fbeaf8-2ba9-0d9d-9c3b-36cd70256005,False,True,False,b0L
|
|
86
|
+
f93d34d2-7b0b-0ca5-9403-cd67123097f9,Select,m-select,True,,.m-select,ba5adb79-0b53-04d7-9acb-5a3219841114,True,True,False,b0M
|
|
87
|
+
a1838d6d-9dbe-0465-8959-5c5eec97b54e,Toggle,m-select-toggle,True,,.m-select-toggle,f93d34d2-7b0b-0ca5-9403-cd67123097f9,False,True,False,b0N
|
|
88
|
+
3462b510-6e51-00dc-b51c-dc0d05d78be5,Placeholder,m-select-placeholder,True,,.m-select-placeholder-inner:where(.m-select-placeholder > .m-select-placeholder-inner),f93d34d2-7b0b-0ca5-9403-cd67123097f9,False,True,False,b0O
|
|
89
|
+
f320d35f-fe96-0d6d-9115-87094e35dac9,Options,m-select-options,True,,.m-select-options,f93d34d2-7b0b-0ca5-9403-cd67123097f9,False,True,False,b0P
|
|
90
|
+
31567887-60d7-058c-81b3-d9d261b2de3d,Option,m-select-option,True,,.m-select-option,f93d34d2-7b0b-0ca5-9403-cd67123097f9,False,True,False,b0Q
|
|
91
|
+
9b8bc2c1-08f4-0644-a198-c9b4dfb77168,Submit button,m-submit-button,True,,.m-submit-button,ba5adb79-0b53-04d7-9acb-5a3219841114,True,True,False,b0R
|
|
92
|
+
9c9cd6b9-a966-0f5a-9dda-bb579a6c0dbc,Submit label,m-submit-label,True,,.m-submit-label,9b8bc2c1-08f4-0644-a198-c9b4dfb77168,True,True,False,b0S
|
|
93
|
+
52919ea1-dc2a-087c-b3ed-9cdfc0dfa3e5,Submit loading,m-submit-loading,True,,.m-submit-loading,9b8bc2c1-08f4-0644-a198-c9b4dfb77168,True,True,False,b0T
|
|
94
|
+
2abe4d7d-6b0d-0ef6-98cd-435b52598cf9,Text area,m-textarea,True,,.m-textarea,ba5adb79-0b53-04d7-9acb-5a3219841114,False,True,False,b0U
|
|
95
|
+
9199c944-4081-0d5b-9997-683614c79902,Icon,m-icon,True,,.m-icon,,False,True,False,b0V
|
|
96
|
+
ed14cb45-d01b-0fd5-bdb1-173089b7eca0,Icon box,m-icon-box,True,,.m-icon-box,,False,True,False,b0W
|
|
97
|
+
c7f25ef0-944c-0970-aa19-f06f487a2717,Loop,m-loop,True,,.m-loop,,True,True,False,b0X
|
|
98
|
+
cdcc719a-b0c5-0749-bcd9-4afe63cb1ef9,Pagination,m-loop-pagination,True,,.m-loop-pagination,c7f25ef0-944c-0970-aa19-f06f487a2717,False,True,False,b0Y
|
|
99
|
+
364c2cfa-bcc1-0d2e-956f-579b07c5ee4b,Numbers,m-loop-pagination-numbers,True,,.m-loop-pagination-numbers,c7f25ef0-944c-0970-aa19-f06f487a2717,False,True,False,b0Z
|
|
100
|
+
57b78edf-a0c6-0d28-90b7-df46cee06d10,No result,m-loop-no-result,True,,.m-loop-no-result,c7f25ef0-944c-0970-aa19-f06f487a2717,False,True,False,b0a
|
|
101
|
+
0c33aca6-67a0-029f-8be6-4e8d5aa28c3c,Items,m-loop-items,True,,.m-loop-items,c7f25ef0-944c-0970-aa19-f06f487a2717,False,True,False,b0b
|
|
102
|
+
5e8a088d-bee4-0835-8493-a3152f9c641f,Item,m-loop-item,True,,.m-loop-item,c7f25ef0-944c-0970-aa19-f06f487a2717,False,True,False,b0c
|
|
103
|
+
8b4f19bb-55a1-0a61-a4b9-af8e0dee197f,Pagination button,m-loop-pagination-button,True,,.m-loop-pagination-button-previous|.m-loop-pagination-button-next,c7f25ef0-944c-0970-aa19-f06f487a2717,False,True,False,b0d
|
|
104
|
+
86785945-a2de-0d7b-aeec-fb3dd4ba38da,Number,m-loop-pagination-number,True,,.m-loop-pagination-number,c7f25ef0-944c-0970-aa19-f06f487a2717,False,True,False,b0e
|
|
105
|
+
ee488e25-50e4-0be6-8bde-080c69a88959,Slider,m-slider,True,,.m-slider,,True,True,False,b0f
|
|
106
|
+
655d4861-c507-07a9-bea4-82687cf750c3,Slides,m-slides,True,,.m-slides,ee488e25-50e4-0be6-8bde-080c69a88959,False,True,False,b0g
|
|
107
|
+
74bd7093-f924-033d-a67c-fdb8c320adfe,Loop slides,m-loop-slides,True,,.m-loop-slides,ee488e25-50e4-0be6-8bde-080c69a88959,False,True,False,b0h
|
|
108
|
+
5e0d0554-d43a-01e4-ac4e-84a3cd493660,Slide,m-slide-content,False,,.m-slide-content:where(.m-slide > .m-slide-content),ee488e25-50e4-0be6-8bde-080c69a88959,False,True,False,b0i
|
|
109
|
+
49772031-10a1-0a84-b2dd-df0666fcf907,Navigation,m-slider-navigation,True,,.m-slider-navigation,ee488e25-50e4-0be6-8bde-080c69a88959,False,True,False,b0j
|
|
110
|
+
21db5141-ef34-0e46-a1bd-66ecbcc945c8,Bullet,m-slider-bullet,True,,.m-slider-bullet,ee488e25-50e4-0be6-8bde-080c69a88959,False,True,False,b0k
|
|
111
|
+
829de3ab-c95a-0f0d-a522-7e13e156635b,Button,m-slider-arrow,True,,.m-slider-arrow-left|.m-slider-arrow-right,ee488e25-50e4-0be6-8bde-080c69a88959,False,True,False,b0l
|
|
112
|
+
246ad9ac-c8db-07ae-8bb3-11c428511643,Post content,m-post-content,True,,.m-post-content|.wp-block-post-content,,False,True,True,b0m
|
|
113
|
+
07923762-4124-4514-9410-84ba6a3d25c9,Shortcode,m-shortcode,True,,.m-shortcode,,False,True,False,b0n
|
|
114
|
+
e5fb8634-963c-0dd3-9a71-4c6efdba06ad,Inline link,m-inline-link,True,,.m-inline-link,,False,True,False,b0o
|
|
115
|
+
29311743-3270-043f-b298-ea31d4c7f70a,Span,m-span,True,,.m-span,,False,True,False,b0p
|
|
116
|
+
fcf8c83b-547b-018b-b646-6d7b34101792,Template,m-template-external,False,,.m-template-external,,False,False,False,b0q
|
|
117
|
+
6a9dad32-018a-04da-9bb7-2a6c6996e165,Template,m-template-internal,False,,.m-template-internal,,False,False,False,b0r
|
|
118
|
+
43b7ad91-51a2-0483-8c14-9b3e56dca5b6,Component,m-component-external,True,,.unknown,,False,False,False,b0s
|
|
119
|
+
e2096bb4-3ac7-0839-9125-0703ccf66d72,Component,m-component-internal,True,,.unknown,,False,False,False,b0t
|
|
120
|
+
03f7dc2d-5a63-0582-8b70-81f69956473f,Instance,m-component-instance,True,,.m-component-instance,,False,False,False,b0u
|
|
121
|
+
0d4bea5d-0712-0019-b509-f36b453c8457,Unknown,m-unknown,False,,.unknown,,False,False,False,b0v
|
|
122
|
+
3ab5005c-d401-00e6-ac68-20be50a4da3f,H1,m-gutenberg-h1,False,tag,":is(.entry-content, .wp-block-post-content) h1",,False,True,True,b0w
|
|
123
|
+
b6c9bcd9-402a-0227-828c-3df96d5e843d,H2,m-gutenberg-h2,False,tag,":is(.entry-content, .wp-block-post-content) h2",,False,True,True,b0x
|
|
124
|
+
60e8d822-bd39-0652-b1fd-b397b80e4e33,H3,m-gutenberg-h3,False,tag,":is(.entry-content, .wp-block-post-content) h3",,False,True,True,b0y
|
|
125
|
+
1b641570-c214-0fe8-b21a-eeb7e12835da,H4,m-gutenberg-h4,False,tag,":is(.entry-content, .wp-block-post-content) h4",,False,True,True,b0z
|
|
126
|
+
5717294e-7610-01bf-be2c-86fc4a4538ff,H5,m-gutenberg-h5,False,tag,":is(.entry-content, .wp-block-post-content) h5",,False,True,True,b10
|
|
127
|
+
bd88afbc-f1e6-0de9-8565-a12e36ccecfd,H6,m-gutenberg-h6,False,tag,":is(.entry-content, .wp-block-post-content) h6",,False,True,True,b11
|
|
128
|
+
9f74c74c-1f2b-002d-aa06-796eebaed2e1,Paragraph,m-gutenberg-paragraph,False,tag,":is(.entry-content, .wp-block-post-content) p",,False,True,True,b12
|
|
129
|
+
15f329b4-55bc-080b-86cf-399cb95bd0e4,Quote,m-gutenberg-quote,False,tag,":is(.entry-content, .wp-block-post-content) blockquote.wp-block-quote",,False,True,True,b13
|
|
130
|
+
84065d85-b043-0487-8be8-2bb95caee182,Cite,m-gutenberg-cite,False,tag,":is(.entry-content, .wp-block-post-content) blockquote.wp-block-quote cite",,False,True,True,b14
|
|
131
|
+
ae7da051-2971-0395-af33-9615547c8cf8,Image,m-gutenberg-image,False,tag,.wp-block-image,,False,True,True,b15
|
|
132
|
+
01a0c2e8-679f-06ce-a2ab-86abb0ef8995,Img,m-gutenberg-img,False,tag,.wp-block-image img,,False,True,True,b16
|
|
133
|
+
8d2c161c-d3f7-01ab-844a-d266eef4b7a6,Caption,m-gutenberg-caption,False,tag,.wp-block-image .wp-element-caption,,False,True,True,b17
|
|
134
|
+
98c4e76d-2723-0467-be0d-69c57ebbd02a,List,m-gutenberg-list,False,tag,":is(.entry-content, .wp-block-post-content) ul.wp-block-list",,False,True,True,b18
|
|
135
|
+
1f9fe5d4-900a-05d0-a7d6-601c9eae178e,Ordered list,m-gutenberg-ordered-list,False,tag,":is(.entry-content, .wp-block-post-content) ol.wp-block-list",,False,True,True,b19
|
|
136
|
+
f68b7526-9fbb-0986-a696-bbc65e7133fc,Footnotes,m-gutenberg-footnotes,False,tag,":is(.entry-content, .wp-block-post-content) ol.wp-block-footnotes",,False,True,True,b1A
|
|
137
|
+
d2664160-1b51-03f8-aaa7-4f3d007e75f8,List item,m-gutenberg-list-item,False,tag,":is(.entry-content, .wp-block-post-content) ul.wp-block-list li|:is(.entry-content, .wp-block-post-content) ol.wp-block-list li|:is(.entry-content, .wp-block-post-content) ol.wp-block-footnotes li",,False,True,True,b1B
|
|
138
|
+
9d4fa324-3bad-0a22-8457-d025a3e3ce57,Code,m-gutenberg-code,False,tag,":is(.entry-content, .wp-block-post-content) pre.wp-block-code",,False,True,True,b1C
|
|
139
|
+
8676e9bf-8f29-07b6-8029-cad1a7c3711f,Preformatted,m-gutenberg-preformatted,False,tag,":is(.entry-content, .wp-block-post-content) pre.wp-block-preformatted",,False,True,True,b1D
|
|
140
|
+
23a935c5-fdcc-02f3-a6c6-37391dd6c5a6,Verse,m-gutenberg-verse,False,tag,":is(.entry-content, .wp-block-post-content) pre.wp-block-verse",,False,True,True,b1E
|
|
141
|
+
af0741e0-9b1e-06c5-8dd3-7b44bfce9a53,Pullquote,m-gutenberg-pullquote,False,tag,":is(.entry-content, .wp-block-post-content) figure.wp-block-pullquote",,False,True,True,b1F
|
|
142
|
+
066d36f6-6f2f-01b7-b2ac-0c8c43544c12,Paragraph,m-gutenberg-pullquote-paragraph,False,tag,":is(.entry-content, .wp-block-post-content) figure.wp-block-pullquote p",,False,True,True,b1G
|
|
143
|
+
eb830eeb-7a4e-05b7-9363-13f3d57d77a8,Cite,m-gutenberg-pullquote-cite,False,tag,":is(.entry-content, .wp-block-post-content) figure.wp-block-pullquote cite",,False,True,True,b1H
|
|
144
|
+
16f872be-f86d-0d71-8528-196401a8dbdb,Separator,m-gutenberg-separator,False,tag,":is(.entry-content, .wp-block-post-content) hr.wp-block-separator.is-style-default",,False,True,True,b1I
|
|
145
|
+
86ab7467-0875-01c2-8ff5-13e91ce121fe,Wide separator,m-gutenberg-wide-separator,False,tag,":is(.entry-content, .wp-block-post-content) hr.wp-block-separator.is-style-wide",,False,True,True,b1J
|
|
146
|
+
5a718f74-12da-42a8-8607-3a26ce696190,Dots separator,m-gutenberg-dots-separator,False,tag,":is(.entry-content, .wp-block-post-content) hr.wp-block-separator.is-style-dots",,False,True,True,b1K
|
|
147
|
+
7e70a40a-205f-4bed-89f4-6f6e3a074b4c,Button,m-gutenberg-button,False,tag,":is(.entry-content, .wp-block-post-content) .wp-block-button__link:where(div.wp-block-button:not(.is-style-outline) > a.wp-element-button.wp-block-button__link)",,False,True,True,b1L
|
|
148
|
+
760f938d-5475-48de-a776-6a956df43d53,Outline button,m-gutenberg-outline-button,False,tag,":is(.entry-content, .wp-block-post-content) .wp-block-button__link:where(div.wp-block-button.is-style-outline > a.wp-element-button.wp-block-button__link)",,False,True,True,b1M
|
|
149
|
+
8de49a77-f767-0054-b1ac-e913ac6562ba,Video,m-video,True,,.m-video,,False,True,False,b1N
|
|
150
|
+
c637b22c-61b9-0964-bcdb-d5ae0d16986a,Google Maps,m-google-maps,True,,.m-google-maps,,False,True,False,b1O
|
|
151
|
+
1a360ae2-3d10-017a-9db6-cece7b44ce17,OpenStreetMap,m-osm,True,,.m-osm,,False,True,False,b1P
|
|
152
|
+
0dce60de-c4a6-0a2d-9990-b93070aeb7da,YouTube,m-youtube,True,,.m-youtube,,False,True,False,b1Q
|
|
153
|
+
be107226-ba10-0fc6-b22e-f984fb21d63b,Vimeo,m-vimeo,True,,.m-vimeo,,False,True,False,b1R
|
|
154
|
+
ea692231-151b-02df-bea7-d567347d1422,List,m-list,True,,.m-list,,True,True,False,b1S
|
|
155
|
+
69a8ab3f-dbdf-09bd-8449-6420570155b8,Horizontal list,m-list-horizontal,True,,.m-list-horizontal,ea692231-151b-02df-bea7-d567347d1422,False,True,False,b1T
|
|
156
|
+
3a8cfda3-1ded-0a3c-9e55-b56510827850,Unordered list,m-list-unordered,True,,.m-list-unordered,ea692231-151b-02df-bea7-d567347d1422,False,True,False,b1U
|
|
157
|
+
7dbba514-fd83-0e8f-ac46-68e6f651f2ff,Ordered list,m-list-ordered,True,,.m-list-ordered,ea692231-151b-02df-bea7-d567347d1422,False,True,False,b1V
|
|
158
|
+
1864859b-2942-44db-b09d-c7073d1df01e,Item,m-list-item,True,,.m-list-item,ea692231-151b-02df-bea7-d567347d1422,False,True,False,b1W
|
|
159
|
+
fb0c2625-dd5a-43c5-82e2-22e8c09ca06c,Loop items,m-list-loop-items,True,,.m-list-loop-items,ea692231-151b-02df-bea7-d567347d1422,False,True,False,b1X
|
|
160
|
+
d1a109c7-3b52-04ef-9a6c-11e0dc0d1a70,Modal,m-modal,True,,.m-modal,,False,True,False,b1Y
|
|
161
|
+
d1a1090d-6e4f-04ef-9a6c-11e0dc0d1a71,Window,m-modal-window,True,,.m-modal-window,d1a109c7-3b52-04ef-9a6c-11e0dc0d1a70,False,True,False,b1Z
|
|
162
|
+
d1a10004-e51a-04ef-9a6c-11e0dc0d1a72,Overlay,m-modal-overlay,True,,.m-modal-overlay,d1a109c7-3b52-04ef-9a6c-11e0dc0d1a70,False,True,False,b1a
|
|
163
|
+
d1a1000b-70b0-04ef-9a6c-11e0dc0d1a73,Popover,m-popover,True,,.m-popover,,False,True,False,b1b
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mosaic-headless",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.44.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-files.md
CHANGED
|
@@ -95,7 +95,7 @@ Moved out of SKILL.md on 2026-11-16 (skill SOP pass). `scripts/check-release.mjs
|
|
|
95
95
|
| `data/tutorial-recipes-verification.csv` | 16 | **driven live** - Mosaic's four docs tutorials (dark/light switcher, loading overlay, class-driven reveal, loop with hover pause) plus the off-canvas toggle and the reading progress bar, built from `tools/interactions.py` and checked in Chromium |
|
|
96
96
|
| `data/menu-verification.csv` | 34 | **driven live** - every way to build a site menu on one page: hover dropdown and mega panel (mouse, keyboard, touch tablet), and three phone menus (modal drawer, navbar, the tutorial's click panel) on a 390px touch phone - Esc, focus trap and return, aria, scroll lock, a sticky header over the close button |
|
|
97
97
|
| `data/intro-verification.csv` | 8 + 15 | **sampled live** - the entrance sequence over fifteen timestamps on a monotonic clock, plus the eight assertions about it |
|
|
98
|
-
| `data/variants.csv` |
|
|
98
|
+
| `data/variants.csv` | 162 | **live** — the variant catalog (Mosaic's built-in element classes); their IDs are what a `variant` record must use, and `class_name` is what the element emits |
|
|
99
99
|
| `data/dynamic-variables.csv` | 76 | source — every `@VAR('ns/name')` expression, by namespace |
|
|
100
100
|
| `data/evaluator-functions.csv` | 19 | source — the `@` functions with their arity |
|
|
101
101
|
| `data/interaction-types.csv` | 16 | source — trigger types, `timed` vs `progress`; 1.0.9 added exitIntent, scrollDepth and modal, 1.0.10 adds popover (Popover visibility change: show / beforeClose / afterClose) |
|
|
@@ -6,7 +6,7 @@ were measured on a live install.
|
|
|
6
6
|
|
|
7
7
|
## Variants: style every element of a kind, once
|
|
8
8
|
|
|
9
|
-
The
|
|
9
|
+
The 162 rows in `data/variants.csv` (re-captured on 1.0.14) are the **variant catalog** — Mosaic's built-in
|
|
10
10
|
taxonomy of what an element *is* (Heading 2, Button, Section, Div, Body …), each
|
|
11
11
|
carrying the CSS selectors that identify it and, since 1.0.8, the class name the
|
|
12
12
|
element emits (`class_name`: `m-heading-2`, `m-button`) and whether that name is
|
|
@@ -66,6 +66,27 @@ Three things learned the hard way:
|
|
|
66
66
|
`class_name` (`m-loop-item`) or a name, and refuses a name that matches more than
|
|
67
67
|
one row.
|
|
68
68
|
|
|
69
|
+
What the rows in `wp_mosaic_variants` are (1.0.14, demo, 2026-11-28):
|
|
70
|
+
|
|
71
|
+
- **One row per catalog entry the theme has saved, and `data: {}` is normal.** The
|
|
72
|
+
table holds this theme's style for a built-in variant; `{}` means "not styled".
|
|
73
|
+
`VariantsRevisionModel::getRevisionRecordsRaw()` reads only rows whose ID is in
|
|
74
|
+
the catalog, and a variant applies by element type, not because a node names it -
|
|
75
|
+
so "no node references this variant" is not an orphan. The demo's main theme had
|
|
76
|
+
157 rows, 154 of them `{}` and named by no node.
|
|
77
|
+
- **The editor adds the rows a theme is missing when it saves.** After 1.0.12 split
|
|
78
|
+
the Select, creating one template in the editor added five `{}` rows - exactly the
|
|
79
|
+
five catalog entries 1.0.12 introduced (`Select` f93d34d2, `Toggle`, `Placeholder`,
|
|
80
|
+
`Options`, `Option`). They belong to the theme, not to the template, so deleting
|
|
81
|
+
the template leaves them; deleting them is harmless too (the editor writes them
|
|
82
|
+
again). The same template created and deleted by a REST commit added none - the
|
|
83
|
+
rows come from the editor's client, not from the server.
|
|
84
|
+
- **1.0.12 renamed the old Select variant.** `05fbeaf8…` was `Select` / `m-select`
|
|
85
|
+
and is now `List box` / `m-listbox` (its child `df2d64e1…` became
|
|
86
|
+
`m-listbox-option`); the new `select` node's variant is `f93d34d2…`. A style keyed
|
|
87
|
+
to the old ID now lands on the native list box. `data/variants.csv` was captured on
|
|
88
|
+
1.0.11 until 2026-11-28 and still showed the old names.
|
|
89
|
+
|
|
69
90
|
More from a client build on 1.0.10:
|
|
70
91
|
|
|
71
92
|
- **`HTML` and `Body` emit `html{…}` and `body{…}`**, and `customDeclarations` works
|
package/references/facts.md
CHANGED
|
@@ -558,11 +558,35 @@ skill; each line says what was reproduced here on the demo site (Mosaic 1.0.14).
|
|
|
558
558
|
every converted `rel` was lost; they write a list now, and a sync treats an old
|
|
559
559
|
string `rel` against an empty one as no difference (with a note).
|
|
560
560
|
|
|
561
|
-
##
|
|
561
|
+
## No Mosaic template for the request -> HTTP 406 (demo, 2026-11-24 and 11-28)
|
|
562
|
+
|
|
563
|
+
The general rule (Mosaic 1.0.14): the Mosaic theme always loads its own `index.php`,
|
|
564
|
+
which looks up a template for the request's paths (the `X-Mosaic-Paths` header lists
|
|
565
|
+
them). When none matches - no template on that path, or one whose conditions fail -
|
|
566
|
+
`FrontendRenderer.php` (line 62) sends `status_header(406)` with an empty body for a
|
|
567
|
+
visitor, and a "Missing Mosaic template" page for a logged-in administrator. It is
|
|
568
|
+
not tied to any plugin; every case below is this rule.
|
|
569
|
+
|
|
570
|
+
- **Single post** (measured 2026-11-28, reported by another session filming on the
|
|
571
|
+
demo): the main theme had no `single-post.php` template, and a post answered 406
|
|
572
|
+
with or without a browser user agent. An Auto Single post template made it 200;
|
|
573
|
+
deleting the template made it 406 again. A template whose conditions do not match
|
|
574
|
+
the request (a query parameter the URL lacks) is the same as none: 406 without the
|
|
575
|
+
parameter, 200 with it.
|
|
576
|
+
- **WooCommerce store pages in coming-soon mode** - below. This one is a bug and not
|
|
577
|
+
only a missing template: WooCommerce has already printed its page, and Mosaic's
|
|
578
|
+
406 is sent on top of it.
|
|
579
|
+
|
|
580
|
+
What to do: give every path a visitor can reach a template, or keep a Fallback
|
|
581
|
+
(`index.php`, the editor's Empty) template as the catch-all
|
|
582
|
+
(`references/templates-and-conditions.md`). `verify_navigation.py` reports a 406 for
|
|
583
|
+
each page with no template; only a logged-out request shows it.
|
|
584
|
+
|
|
585
|
+
### WooCommerce "coming soon" + Mosaic: store pages answer 406 (demo, 2026-11-24)
|
|
562
586
|
|
|
563
587
|
Traced in source and read on the demo (Mosaic 1.0.14, WooCommerce 11.2, read only):
|
|
564
588
|
with WooCommerce's coming-soon mode on for **store pages only**, `/shop/` and every
|
|
565
|
-
product page answer **HTTP 406
|
|
589
|
+
product page answer **HTTP 406** on their plain URL.
|
|
566
590
|
|
|
567
591
|
- WooCommerce renders its coming-soon page itself and then returns `''` from the
|
|
568
592
|
`template_include` filter (`ComingSoonRequestHandler.php`, line 117) so WordPress
|
|
@@ -572,9 +596,119 @@ product page answer **HTTP 406**.
|
|
|
572
596
|
- With no Mosaic template for the store (`archive-product` / `single-product`, nor a
|
|
573
597
|
generic archive / index one), the renderer throws `TemplateNotFoundException` and
|
|
574
598
|
`FrontendRenderer.php` (line 62) sends `status_header(406)`.
|
|
575
|
-
- A
|
|
599
|
+
- **A query string hides it.** Re-read 2026-11-28, both uncached (`X-Cache: MISS`):
|
|
600
|
+
`/shop/` answered 406 with `Cache-Control: no-store, no-cache…`, and `/shop/?x=1`
|
|
601
|
+
answered 200 with WooCommerce's own `max-age=60` - the same coming-soon page both
|
|
602
|
+
times. So a health check that adds a cache-busting query string reports 200 for a
|
|
603
|
+
page every visitor gets as 406; check the plain URL. `verify_navigation.py` adds
|
|
604
|
+
`?_v=`, so it misses this case (a post with no template stays 406 with a query
|
|
605
|
+
string - only coming-soon flips). (The 11-24 note here called the query-string 200
|
|
606
|
+
a cached copy; the 11-28 re-read shows it was not cached.)
|
|
576
607
|
|
|
577
608
|
What to do: take the store out of coming-soon mode (go live), and give the store its
|
|
578
609
|
Mosaic templates. Not measured: a store page that DOES have a Mosaic template while
|
|
579
610
|
coming-soon is on may print two documents (WooCommerce's page and Mosaic's) - the
|
|
580
611
|
code predicts it; testing it needs a store template written on the demo.
|
|
612
|
+
|
|
613
|
+
## WooCommerce block emails become "Mosaic is running!" (demo, 2026-11-29)
|
|
614
|
+
|
|
615
|
+
Mosaic 1.0.14, WooCommerce 11.3.1, read in source and reproduced on the demo inside
|
|
616
|
+
one WP-CLI process (block email editor switched on for that process only, every mail
|
|
617
|
+
blocked by `pre_wp_mail`, nothing written, nothing sent).
|
|
618
|
+
|
|
619
|
+
**Cause.** `MosaicCurrentTheme.php` (lines 114-155) hooks `get_block_file_template`
|
|
620
|
+
at priority 10. For any `wp_template` id whose theme part is a Mosaic theme
|
|
621
|
+
(`mosaic-1-1-<uuid>//…`, `WPThemeManager::templateIDIsMosaicTheme`) and whose slug
|
|
622
|
+
Mosaic has no template for, it builds a template whose content is
|
|
623
|
+
`themes/mosaic/templates/running.html` - a single `<h1>Mosaic is running!</h1>`
|
|
624
|
+
(line 138). WooCommerce's block email renderer asks for its frame templates exactly
|
|
625
|
+
that way: `get_block_template( get_stylesheet() . '//' . $slug )`
|
|
626
|
+
(`packages/email-editor/src/Engine/Templates/class-templates.php`, line 74), slug
|
|
627
|
+
`wooemailtemplate` or `email-general` (`Renderer/class-renderer.php`, line 118).
|
|
628
|
+
WordPress only reaches the registered (plugin) template after that filter, so the
|
|
629
|
+
placeholder wins.
|
|
630
|
+
|
|
631
|
+
**What breaks.** Measured: `email-general` and `wooemailtemplate` both resolved to
|
|
632
|
+
the 105-byte placeholder (`source=theme`), and rendering a throwaway email body
|
|
633
|
+
through WooCommerce's own renderer gave a 3,420-byte message that contained
|
|
634
|
+
"Mosaic is running!" and **not** the body text. No error, no log line - the email is
|
|
635
|
+
sent like that. Only sites with the block email editor ON
|
|
636
|
+
(`woocommerce_feature_block_email_editor_enabled = yes`) send these; classic emails
|
|
637
|
+
use WooCommerce's PHP templates and do not go through this lookup
|
|
638
|
+
(`WC_Email::get_content()`, `class-wc-email.php` line 907, takes the block path only
|
|
639
|
+
when block content exists).
|
|
640
|
+
|
|
641
|
+
**Scope.** Every slug Mosaic has no template for gets the placeholder, not only
|
|
642
|
+
emails: `single-product`, `checkout`, `coming-soon` and a made-up slug all did. On
|
|
643
|
+
the front end that is invisible (Mosaic renders pages through its own `index.php`);
|
|
644
|
+
it shows wherever something reads the block template's content - WooCommerce's block
|
|
645
|
+
emails are the case met in the field.
|
|
646
|
+
|
|
647
|
+
**Fix - a mu-plugin or site plugin, recommended form:**
|
|
648
|
+
|
|
649
|
+
```php
|
|
650
|
+
add_filter('get_block_file_template', function ($template, $id, $type) {
|
|
651
|
+
if ($type !== 'wp_template' || !is_string($id) || strpos($id, 'mosaic-') !== 0) {
|
|
652
|
+
return $template; // not a Mosaic theme id
|
|
653
|
+
}
|
|
654
|
+
$slug = explode('//', $id, 2)[1] ?? '';
|
|
655
|
+
$registered = WP_Block_Templates_Registry::get_instance()->get_by_slug($slug);
|
|
656
|
+
if (!$registered instanceof WP_Block_Template
|
|
657
|
+
|| !in_array('woo_email', (array) $registered->post_types, true)) {
|
|
658
|
+
return $template; // site templates stay Mosaic's
|
|
659
|
+
}
|
|
660
|
+
$copy = clone $registered; // never edit the registry's object
|
|
661
|
+
$copy->id = $id;
|
|
662
|
+
return $copy;
|
|
663
|
+
}, 20, 3); // after Mosaic's priority 10
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
Two fixes already run in the field; both were tried on the demo and both work
|
|
667
|
+
(the templates came back as `source=plugin`, the rendered email was 9,911 bytes with
|
|
668
|
+
the body in it and no placeholder):
|
|
669
|
+
|
|
670
|
+
- slug test: give back the registered template when the slug contains `email` and
|
|
671
|
+
the theme starts with `mosaic-`.
|
|
672
|
+
- post-type test (above): give it back when WooCommerce registered the template for
|
|
673
|
+
`woo_email`.
|
|
674
|
+
|
|
675
|
+
Why the post-type test: it uses WooCommerce's own declaration of what is an email
|
|
676
|
+
template, so a future email template with another slug is covered, and a site or
|
|
677
|
+
plugin template that merely has "email" in its slug (an "email preferences" page) is
|
|
678
|
+
left to Mosaic. The clone keeps the registry's shared object untouched; giving the
|
|
679
|
+
copy the requested id is consistency only - the rendered email was identical either
|
|
680
|
+
way. Keep the `mosaic-` prefix test so the filter does nothing on other themes.
|
|
681
|
+
|
|
682
|
+
**Check without sending mail:** `wp eval-file tools/email_template_check.php` asks
|
|
683
|
+
`get_block_template()` for every `woo_email` template the way WooCommerce does and
|
|
684
|
+
prints OK / REPLACED; it exits 1 only when block emails are on and a template is
|
|
685
|
+
replaced, and warns when they are off (what turning them on would do). To see a whole
|
|
686
|
+
email, render it in a process where `pre_wp_mail` returns `true` - a test site may
|
|
687
|
+
have no mail isolation of its own (the demo has none), so never trigger a real send.
|
|
688
|
+
|
|
689
|
+
## Form submissions, page-builder notes (demo, 2026-11-29)
|
|
690
|
+
|
|
691
|
+
Reported by the session filming the demo, checked against the 1.0.14 source where
|
|
692
|
+
the source says it:
|
|
693
|
+
|
|
694
|
+
- **A front-end form submit always writes a row to `wp_mosaic_submissions`**
|
|
695
|
+
(`clientIP`, `userAgent`, `valuesJSON`, `spamProtectionJSON`), whatever actions the
|
|
696
|
+
form has, and the first submit creates the option `mosaic_form_upload_hmac_key`
|
|
697
|
+
(`Submissions/Upload/SecureUploadStore.php`, line 300). List both as expected
|
|
698
|
+
changes when comparing a site before and after a form test, and delete the test rows
|
|
699
|
+
afterwards. A form with a send-email action really sends: the recipient defaults to
|
|
700
|
+
the site's `admin_email`.
|
|
701
|
+
- **A page URL with `?s=`** (WordPress's search parameter) makes the form's POST
|
|
702
|
+
answer 404 with `success: true`, and the front end shows its "could not confirm"
|
|
703
|
+
message. Test forms on the plain URL.
|
|
704
|
+
- **`mosaic-accordion` is `display: contents`**, so its `getBoundingClientRect()` is
|
|
705
|
+
all zeros; measure `.m-accordion-item` instead.
|
|
706
|
+
- **A text node's default line height is 24px.** Set `lineHeight` whenever the
|
|
707
|
+
font size goes up - at 64px two lines overlap.
|
|
708
|
+
- **A fixed header with z-index 100** (a master header) covers a sticky element with a
|
|
709
|
+
lower one; a sticky reading-progress bar needs `zIndex` 200 or more to stay visible.
|
|
710
|
+
- **`ordering` compares case-insensitively in SQL.** The column has the table's
|
|
711
|
+
default collation, so `GROUP BY ordering` on the demo showed 27 "duplicates"
|
|
712
|
+
(`bFz` / `bFZ`) where all 113 values were distinct. Mosaic itself sorts with
|
|
713
|
+
`ORDER BY BINARY ordering` (`MosaicCurrentTheme.php`, line 187). Look for clashes
|
|
714
|
+
with `GROUP BY BINARY ordering`.
|
|
@@ -78,6 +78,16 @@ editor's drag-to-reorder. The editor's fallback types map to paths as Single →
|
|
|
78
78
|
`index.php`. Masters order the same way: the first master by `ordering` is the one
|
|
79
79
|
a new template is offered by default.
|
|
80
80
|
|
|
81
|
+
**A new template with an `ordering` already taken renumbers the whole list.**
|
|
82
|
+
Committed with `ordering: "a0"` on a theme of 123 templates (1.0.14, demo,
|
|
83
|
+
2026-11-28), the new row went first and 90 other templates got a new `ordering`
|
|
84
|
+
string, a new `revision` and a new `modified_gmt`. Their relative order stayed the
|
|
85
|
+
same, so routing did not change, and deleting the new template did not put the old
|
|
86
|
+
strings back. A table checksum taken before such a commit will not match after it.
|
|
87
|
+
To leave the other rows alone, use an `ordering` after the last one. Compare `ordering` values
|
|
88
|
+
with `BINARY`: the column sorts case-insensitively in SQL but Mosaic orders by
|
|
89
|
+
`BINARY ordering`, so `bFz` and `bFZ` are different places (references/facts.md).
|
|
90
|
+
|
|
81
91
|
**A template_assigns row with empty `parentID` and `parentType` binds nothing.** It is
|
|
82
92
|
what the editor writes for "Auto template" (`TemplateAssign` treats it as
|
|
83
93
|
auto-assigned and `Post::getAssignedTemplateID` skips it), so do not count it as a
|
|
@@ -92,6 +102,28 @@ One consequence worth knowing: **that endpoint creates a new template every time
|
|
|
92
102
|
Calling it twice for the same post leaves two template rows and one assign row —
|
|
93
103
|
`tools/build_all.py` resets the theme before rebuilding for exactly this reason.
|
|
94
104
|
|
|
105
|
+
**The editor offers Manual only for the post types in a site setting.** The Assign
|
|
106
|
+
choice, the post list's "Edit in Mosaic" link and the block editor's template panel
|
|
107
|
+
all ask `PostEdit::isManualAssignEnabledForPostType()`, which reads
|
|
108
|
+
`manualAssignEnabledForPostTypes` (Mosaic → Settings, `references/write-protocol.md`).
|
|
109
|
+
With nothing saved there the default is **`page` only**
|
|
110
|
+
(`PostEdit::getDefaultManualAssignedPostTypes()`), so on a stock 1.0.14 site a Single
|
|
111
|
+
post template can only be Auto - the dialog has no Manual (seen on the demo,
|
|
112
|
+
2026-11-28, where the setting was never saved). To limit an Auto post template, use
|
|
113
|
+
its conditions: query parameter, Cookie, current user, category, tag, post format,
|
|
114
|
+
product (`mo.py conditions --context template`). Or add `post` to the setting.
|
|
115
|
+
|
|
116
|
+
**The editor reads a template's variables from the front end, through the
|
|
117
|
+
template's conditions.** The variable list (Post data and so on) comes from the post's
|
|
118
|
+
own URL with `?mosaic_frontend_action=TemplatingContext`
|
|
119
|
+
(`ActionTemplatingContext`), and that request picks the template the same way a visit
|
|
120
|
+
does. If the template's conditions do not match that request - a query-parameter
|
|
121
|
+
condition the editor's request does not carry, say - Mosaic finds no template and
|
|
122
|
+
answers `templateNotExists`, and the editor shows **no variables at all**. Measured on
|
|
123
|
+
the demo (2026-11-28): with the condition `m17demo = 1` the editor had no variables;
|
|
124
|
+
with the condition removed they appeared. Build the layout without the condition and
|
|
125
|
+
add it last, or set the variables by hand (`references/dynamic-content.md`).
|
|
126
|
+
|
|
95
127
|
## The condition structure
|
|
96
128
|
|
|
97
129
|
The same shape drives template routing, element visibility (`node.data.conditions`),
|
package/references/tools.md
CHANGED
|
@@ -54,6 +54,7 @@ Every tool in `tools/`, and where the REST session comes from. Moved out of SKIL
|
|
|
54
54
|
| `mint_session.php` | a matching cookie + `wp_rest` nonce from WP-CLI; `wp eval-file tools/mint_session.php - 20` sets the lifetime in hours (12 by default; the nonce itself lapses within a day). A run that hits an expired session now says SESSION EXPIRED |
|
|
55
55
|
| `mosaic_config.py` | the one place a tool resolves the site URL and session - environment (`MOSAIC_SITE_URL` / `MOSAIC_REST_COOKIE` / `MOSAIC_REST_NONCE`) over `--config` file, so a credential never has to be written to disk |
|
|
56
56
|
| `override_health.sql` | read only, `wp db query < tools/override_health.sql`: component instances whose override nodes heal emptied into `{"override":{"originalID":…}}` shells, and duplicate override nodes. Run it before and after deleting a root or changing a component (references/facts.md) |
|
|
57
|
+
| `email_template_check.php` | read only, `wp eval-file tools/email_template_check.php`: on a Mosaic site with WooCommerce, whether each block-email template (`email-general`, `wooemailtemplate`, every `woo_email` one) resolves to Mosaic's "Mosaic is running!" placeholder. Sends no mail; exits 1 only when block emails are on and one is replaced (references/facts.md) |
|
|
57
58
|
| `check_tables.py` | re-extract all eleven source-derived tables and diff them against the shipped ones - the check for a table that is not wrong but STALE, which nothing else can see |
|
|
58
59
|
|
|
59
60
|
## The session, and where it comes from
|
package/references/tutorials.md
CHANGED
|
@@ -21,15 +21,15 @@ Status, per tutorial:
|
|
|
21
21
|
| docs: dark-light-mode-switcher | site-wide mode toggle, remembered | MEASURED | second `collectionMode`, `mode_switch` on `document` + `set_cookie`, `pageLoad` gated by `cookie_is` |
|
|
22
22
|
| docs: loading-animation | full-page loader that fades out | MEASURED | fixed div, `data.hidden: true`, `pageLoad` opacity + `hide_at_end` |
|
|
23
23
|
| docs: reusable-animations | one scroll reveal reused by class | MEASURED | `elementScrollIntoView`, `trigger=class_target`, no target, `children` modifier; per-child delay with `tween(delay=)` |
|
|
24
|
-
| docs: animation-loop | endless vertical ticker, pause on hover | MEASURED (loop + hover pause) | `on(..., loop=True, ix_id=, out_of_view="1")`, hover `suspend`/`resume` by ID; the reposition tweens are `duration: 0` with a `delay` |
|
|
25
|
-
| interactions: reading-progress-bar | bar that fills while reading | MEASURED | sticky outer, `scrollIntoView` on the article targeting the bar, translateX `-100%` to `0%`, `progress=True, easing="linear"` |
|
|
24
|
+
| docs: animation-loop | endless vertical ticker, pause on hover | MEASURED (loop + hover pause) | `on(..., loop=True, ix_id=, out_of_view="1")`, hover `suspend`/`resume` by ID; the reposition tweens are `duration: 0` with a `delay`. A horizontal marquee needs no reposition tween: put the content in twice and tween translateX `0%`>`-50%` with `linear` + `loop=True`; hover `suspend`/`resume` by ID pause and continue it (measured 2026-11-29) |
|
|
25
|
+
| interactions: reading-progress-bar | bar that fills while reading | MEASURED | sticky outer, `scrollIntoView` on the article targeting the bar, translateX `-100%` to `0%`, `progress=True, easing="linear"`; set the trigger's `startWhen: topOfThePage`, `endWhen: bottomOfThePage` so the bar tracks the whole page - the default `middleOfTheScreen` to `middleOfTheScreen` spans only the article's own height and a short page fills it in ~300px (measured 2026-11-29) |
|
|
26
26
|
| menus: off-canvas-menu | full-screen menu, hamburger/close | MEASURED (the toggle) | click `odd` slot: `display(start="flex")` + translateX `100%`>`0%`; `even`: back + `display(end="none")`; `data.hidden: true` on the panel; arrow-on-hover is a CSS state + `transition` |
|
|
27
27
|
| interactions: animated-shape-dividers | SVG divider that scales in and loops | PARTS | icon node with SVG, `transformOrigin`, `pageLoad` scaleY `70%`>`100%`, a second tween back, `loop=True` |
|
|
28
28
|
| interactions: background-clip | image through the letters | PARTS | `backgroundStyle` (clip text, fixed) + transparent `color`; references/styling.md |
|
|
29
29
|
| interactions: background-parallax | fixed section background | PARTS | `backgroundStyle` fixed |
|
|
30
30
|
| interactions: blurred-sticky-cta | frosted sticky button | PARTS | `position: sticky`, `bottom`, `backdropFilter`, background with alpha |
|
|
31
31
|
| interactions: flip-box-3d | card flips on hover | PARTS | `perspective`, `transformStyle`, back-face via `customDeclarations` (the tutorial does the same), hover `in`/`out` rotateY `180deg`/`0deg` on the wrapper |
|
|
32
|
-
| interactions: parallax-effect | rows drifting at two speeds | PARTS | `scrollIntoView` on the section targeting each grid, translateX `10%`>`-10%` and back; start/end via `settings` |
|
|
32
|
+
| interactions: parallax-effect | rows drifting at two speeds | PARTS | `scrollIntoView` on the section targeting each grid, translateX `10%`>`-10%` and back; start/end via `settings` - `startEntering` to `isFullyHidden` moves smoothest (measured 2026-11-29) |
|
|
33
33
|
| interactions: scroll-timeline | sticky icons, fading rows, nested components | PARTS | `elementScrollIntoView` `in`/`out` slots, opacity and colour tweens with variables, sticky `top: 50vh`, nested Part components |
|
|
34
34
|
| interactions: video-controls | custom play / pause / overlay | OPEN (player actions) | click `odd`/`even`, opacity tweens, `player_play` / `player_pause` - their shape is read from the source, not driven yet |
|
|
35
35
|
| interactions: vimeo-hover-play | Vimeo plays on hover, pauses on leave | OPEN (player actions) | hover `in`/`out`, translateY overlay, `player_play`/`player_pause` |
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/**
|
|
3
|
+
* Are WooCommerce's block-email templates being replaced by Mosaic's placeholder?
|
|
4
|
+
* Read only: no mail is sent, nothing is written.
|
|
5
|
+
*
|
|
6
|
+
* wp eval-file tools/email_template_check.php
|
|
7
|
+
*
|
|
8
|
+
* Mosaic's MosaicCurrentTheme hooks get_block_file_template and answers EVERY
|
|
9
|
+
* "<mosaic theme>//<slug>" it has no template for with themes/mosaic/templates/running.html
|
|
10
|
+
* ("Mosaic is running!"). WooCommerce's block email editor looks its frame templates up
|
|
11
|
+
* the same way (get_stylesheet() . '//email-general', '//wooemailtemplate'), so on a
|
|
12
|
+
* Mosaic site every block email goes out as that one heading, and nothing reports an
|
|
13
|
+
* error (references/facts.md, "WooCommerce block emails become 'Mosaic is running!'").
|
|
14
|
+
*
|
|
15
|
+
* The check asks get_block_template() for each email template exactly as WooCommerce
|
|
16
|
+
* does, so a site that already carries a fix, or has the template saved in the editor,
|
|
17
|
+
* reads OK. Templates checked: every registered template whose post_types include
|
|
18
|
+
* woo_email, plus email-general and wooemailtemplate by name.
|
|
19
|
+
*
|
|
20
|
+
* Lines: OK / REPLACED per template, then a verdict. Exit code 1 only when block emails
|
|
21
|
+
* are ON and at least one template is replaced; with the editor off the replaced lines
|
|
22
|
+
* are a warning of what turning it on would do.
|
|
23
|
+
*/
|
|
24
|
+
if (!function_exists('get_block_template')) {
|
|
25
|
+
WP_CLI::error('WordPress 5.9+ is required');
|
|
26
|
+
}
|
|
27
|
+
$stylesheet = get_stylesheet();
|
|
28
|
+
$isMosaic = strpos($stylesheet, 'mosaic-') === 0;
|
|
29
|
+
$wooActive = class_exists('WooCommerce');
|
|
30
|
+
$blockEmail = get_option('woocommerce_feature_block_email_editor_enabled', 'no') === 'yes';
|
|
31
|
+
WP_CLI::log("theme: $stylesheet" . ($isMosaic ? ' (Mosaic)' : ' (not a Mosaic theme)'));
|
|
32
|
+
WP_CLI::log('WooCommerce: ' . ($wooActive ? 'active' : 'not active') . '; block email editor: ' . ($blockEmail ? 'ON' : 'off'));
|
|
33
|
+
|
|
34
|
+
$placeholder = defined('MOSAIC_PATH') && is_readable(MOSAIC_PATH . 'themes/mosaic/templates/running.html')
|
|
35
|
+
? trim((string) file_get_contents(MOSAIC_PATH . 'themes/mosaic/templates/running.html')) : '';
|
|
36
|
+
|
|
37
|
+
$slugs = ['email-general' => true, 'wooemailtemplate' => true];
|
|
38
|
+
if (class_exists('WP_Block_Templates_Registry')) {
|
|
39
|
+
foreach (WP_Block_Templates_Registry::get_instance()->get_all_registered() as $t) {
|
|
40
|
+
if (in_array('woo_email', (array) $t->post_types, true)) {
|
|
41
|
+
$slugs[$t->slug] = true;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
$replaced = 0;
|
|
47
|
+
foreach (array_keys($slugs) as $slug) {
|
|
48
|
+
$t = get_block_template($stylesheet . '//' . $slug, 'wp_template');
|
|
49
|
+
$content = $t ? trim((string) $t->content) : '';
|
|
50
|
+
$isPlaceholder = $content !== '' && (strpos($content, 'Mosaic is running') !== false
|
|
51
|
+
|| ($placeholder !== '' && $content === $placeholder));
|
|
52
|
+
if ($isPlaceholder) {
|
|
53
|
+
$replaced++;
|
|
54
|
+
}
|
|
55
|
+
WP_CLI::log(sprintf(' %-9s %-22s source=%s', $isPlaceholder ? 'REPLACED' : ($t ? 'OK' : 'MISSING'), $slug,
|
|
56
|
+
$t ? $t->source : '-'));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if ($replaced === 0) {
|
|
60
|
+
WP_CLI::success('no email template is replaced by the Mosaic placeholder');
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
$msg = "$replaced email template(s) resolve to Mosaic's running.html - block emails would be sent as 'Mosaic is running!'";
|
|
64
|
+
if ($blockEmail && $wooActive) {
|
|
65
|
+
WP_CLI::error($msg . '. Fix: references/facts.md');
|
|
66
|
+
}
|
|
67
|
+
WP_CLI::warning($msg . ' once the block email editor is turned on. Fix before turning it on: references/facts.md');
|