mosaic-headless 1.26.1 → 1.27.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 +7 -6
- 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/component-wall-verification.csv +4 -2
- package/data/form-surface-verification.csv +9 -0
- package/data/mobile-audit.csv +2 -0
- package/data/navigation-verification.csv +17 -14
- package/data/node-types.csv +2 -0
- package/data/placement-rules.csv +129 -127
- package/package.json +1 -1
- package/references/failure-modes.md +27 -0
- package/references/placement.md +38 -0
- package/scripts/check-release.mjs +4 -3
- package/sites/_moksa.py +6 -0
- package/sites/moksa.json +1986 -104
- package/tools/build_page.py +18 -5
- package/tools/extract_node_types.py +7 -1
- package/tools/extract_placement.py +23 -3
- package/tools/verify_components.py +95 -52
package/references/placement.md
CHANGED
|
@@ -115,3 +115,41 @@ Reach for the measured table when you are deciding what to build with, and this
|
|
|
115
115
|
when you are deciding what may go inside what. `tools/check_placement_predicts.py`
|
|
116
116
|
re-scores the numbers above after any re-sweep, so the claim stays honest if the
|
|
117
117
|
plugin changes.
|
|
118
|
+
|
|
119
|
+
## `nested_under`: what a type is looking for above it
|
|
120
|
+
|
|
121
|
+
`rule` is the `canBeParentFor()` answer — "will the editor let me drop this here".
|
|
122
|
+
Many types also implement `canBeNestedChildFor()`, which walks the parent chain at
|
|
123
|
+
runtime looking for ONE ancestor class, and until now this table only recorded
|
|
124
|
+
that such a rule existed. The `nested_under` column now names it. 54 of 128 types
|
|
125
|
+
have one, and the names usually share no prefix with the type, so there is no way
|
|
126
|
+
to infer it:
|
|
127
|
+
|
|
128
|
+
| type | needs above it |
|
|
129
|
+
|---|---|
|
|
130
|
+
| `radio-input`, `checkbox-input`, `choice-label` | `choice` |
|
|
131
|
+
| `choice`, | `choice-field` |
|
|
132
|
+
| `label`, `fileupload-input` | `field` |
|
|
133
|
+
| `choice-field`, `fieldset`, `field`, `hidden-input` | `choice-field` \| `field` \| `form` |
|
|
134
|
+
| `loop-item` | `loop-items` |
|
|
135
|
+
| `loop-pagination` | `loop` |
|
|
136
|
+
| `list-item` | `list` \| `list-loop-items` \| `wp-menu` |
|
|
137
|
+
| `accordion-item` | `accordion` \| `accordion-loop-items` |
|
|
138
|
+
|
|
139
|
+
A node committed without its required ancestor is **accepted and discarded**. The
|
|
140
|
+
commit returns no exception, the page renders, and the element is simply not
|
|
141
|
+
there — which is how a form came back with two fieldsets and no fields.
|
|
142
|
+
`build_page.py` reads this column and now carries the ancestor chain down the walk,
|
|
143
|
+
so a correct placement is allowed and an incorrect one is refused before the write
|
|
144
|
+
rather than silently lost after it.
|
|
145
|
+
|
|
146
|
+
Two other things the table was short of, both fixed the same way — by reading the
|
|
147
|
+
source the column was derived from rather than the one it was convenient to read:
|
|
148
|
+
|
|
149
|
+
- **`takes_children`**, from the factory's `getDefaultData($data, $children)`
|
|
150
|
+
signature. `dropdown-wrapper` answers `none` to `canBeParentFor` and holds the
|
|
151
|
+
menu's links regardless.
|
|
152
|
+
- **two missing types.** `fieldset-legend` and `fieldset-content` are declared by
|
|
153
|
+
an `*ElementMResourceFactory.php`; every extractor walked
|
|
154
|
+
`*ElementTypeFactory.php` only, so they were absent from the catalog and a
|
|
155
|
+
fieldset appeared to have no inner structure.
|
|
@@ -101,9 +101,10 @@ const counts = {
|
|
|
101
101
|
"data/dialog-verification.csv": 19,
|
|
102
102
|
"data/slider-verification.csv": 30,
|
|
103
103
|
"data/token-verification.csv": 15,
|
|
104
|
-
"data/mobile-audit.csv":
|
|
105
|
-
"data/component-wall-verification.csv":
|
|
106
|
-
"data/
|
|
104
|
+
"data/mobile-audit.csv": 60,
|
|
105
|
+
"data/component-wall-verification.csv": 13,
|
|
106
|
+
"data/form-surface-verification.csv": 8,
|
|
107
|
+
"data/navigation-verification.csv": 36,
|
|
107
108
|
"data/page-modal-verification.csv": 19,
|
|
108
109
|
"data/interaction-rules-verification.csv": 17,
|
|
109
110
|
"data/dialog-form-verification.csv": 49,
|
package/sites/_moksa.py
CHANGED
|
@@ -304,6 +304,8 @@ CONVERTED_COUNT = _count("conversion-batch.csv",
|
|
|
304
304
|
|
|
305
305
|
# label, href, one line of what it demonstrates
|
|
306
306
|
CAPABILITIES = [
|
|
307
|
+
("表單", "/forms/",
|
|
308
|
+
"下拉、單選、複選、上傳、必填規則與錯誤訊息"),
|
|
307
309
|
("元件牆", "/components/",
|
|
308
310
|
"分頁、手風琴、表單、地圖——都能直接操作"),
|
|
309
311
|
("彈窗與觸發", "/dialogs/",
|
|
@@ -3228,6 +3230,10 @@ if __name__ == "__main__":
|
|
|
3228
3230
|
# helpers it reads are pure functions - two copies produce identical dicts.
|
|
3229
3231
|
import _dialogs
|
|
3230
3232
|
import _sliders
|
|
3233
|
+
import _forms
|
|
3234
|
+
SITE["pages"].append({"slug": "forms", "post_id": 282,
|
|
3235
|
+
"title": "表單",
|
|
3236
|
+
"tree": apply_type(_forms.TREE, DISPLAY, CJK, "600")})
|
|
3231
3237
|
import _components
|
|
3232
3238
|
SITE["pages"].append({"slug": "components", "post_id": 281,
|
|
3233
3239
|
"title": "元件",
|