mosaic-headless 1.32.1 → 1.33.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.
@@ -4,32 +4,32 @@ focus,&:FOCUS,750,global,Mosaic/Builder/Style/StatesMeta.php
4
4
  focus-visible,&:FOCUS-VISIBLE,760,global,Mosaic/Builder/Style/StatesMeta.php
5
5
  hover,&:HOVER,100,global,Mosaic/Builder/Style/StatesMeta.php
6
6
  hover-on-link,":where(a[href]:not([disabled]),button:not([disabled])):HOVER &",200,global,Mosaic/Builder/Style/StatesMeta.php
7
- hover-on-tab,:where(.m-tab:not(.m-tab--active)):HOVER &,200,global,Mosaic/NodeTypes/Pro/Tabs/TabsMenu/Tab/TabElementTypeFactory.php
8
- hover-tab,&:where(.m-tab:not(.m-tab--active)):HOVER,100,global,Mosaic/NodeTypes/Pro/Tabs/TabsMenu/Tab/TabElementTypeFactory.php
7
+ hover-on-tab,:where(.m-tab:not(.m-tab--active)):HOVER &,200,global,Mosaic/NodeTypes/Tabs/TabsMenu/Tab/TabElementTypeFactory.php
8
+ hover-tab,&:where(.m-tab:not(.m-tab--active)):HOVER,100,global,Mosaic/NodeTypes/Tabs/TabsMenu/Tab/TabElementTypeFactory.php
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
- ___arrow_hidden,&:where(.m-slider-arrow--hidden),800,node-type,Mosaic/NodeTypes/Pro/Slider/SliderArrow/SliderArrowElementTypeFactoryAbstract.php
13
- ___checkbox-input--checked,&:checked,500,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/Checkbox/CheckboxInput/CheckboxInputElementTypeFactory.php
14
- ___checkbox-input--checkmark,&:checked::before,500,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/Checkbox/CheckboxInput/CheckboxInputElementTypeFactory.php
15
- ___choice--checked,&:has(:where(input):checked),500,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/Choice/ChoiceElementTypeFactory.php
16
- ___choice--checked-within,.m-choice:where(:has(input:checked)) &,500,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/Choice/ChoiceElementTypeFactory.php
17
- ___choice--focus-visible,&:has(:where(input):focus-visible),760,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/Choice/ChoiceElementTypeFactory.php
18
- ___choice-field--invalid,&:has(:user-invalid),700,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/ChoiceField/ChoiceFieldElementTypeFactory.php
19
- ___choice-field--invalid-within,.m-choice-field:where(:has(:user-invalid)) &,700,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/ChoiceField/ChoiceFieldElementTypeFactory.php
12
+ ___arrow_hidden,&:where(.m-slider-arrow--hidden),800,node-type,Mosaic/NodeTypes/Slider/SliderArrow/SliderArrowElementTypeFactoryAbstract.php
13
+ ___checkbox-input--checked,&:checked,500,node-type,Mosaic/NodeTypes/Form/Form/MElements/Checkbox/CheckboxInput/CheckboxInputElementTypeFactory.php
14
+ ___checkbox-input--checkmark,&:checked::before,500,node-type,Mosaic/NodeTypes/Form/Form/MElements/Checkbox/CheckboxInput/CheckboxInputElementTypeFactory.php
15
+ ___choice--checked,&:has(:where(input):checked),500,node-type,Mosaic/NodeTypes/Form/Form/MElements/Choice/ChoiceElementTypeFactory.php
16
+ ___choice--checked-within,.m-choice:where(:has(input:checked)) &,500,node-type,Mosaic/NodeTypes/Form/Form/MElements/Choice/ChoiceElementTypeFactory.php
17
+ ___choice--focus-visible,&:has(:where(input):focus-visible),760,node-type,Mosaic/NodeTypes/Form/Form/MElements/Choice/ChoiceElementTypeFactory.php
18
+ ___choice-field--invalid,&:has(:user-invalid),700,node-type,Mosaic/NodeTypes/Form/Form/MElements/ChoiceField/ChoiceFieldElementTypeFactory.php
19
+ ___choice-field--invalid-within,.m-choice-field:where(:has(:user-invalid)) &,700,node-type,Mosaic/NodeTypes/Form/Form/MElements/ChoiceField/ChoiceFieldElementTypeFactory.php
20
20
  ___dropdown--opening,.m-dropdown:where(.dropdown--opening) &,600,node-type,Mosaic/NodeTypes/Menu/Dropdown/DropdownElementTypeFactoryAbstract.php
21
21
  ___dropdown-toggle--current,&.m-dropdown-toggle--current,500,node-type,Mosaic/NodeTypes/Menu/Dropdown/DropdownToggle/DropdownToggleElementTypeFactory.php
22
22
  ___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
23
- ___field--focus-visible,"&:has(:where(input, textarea, select):focus-visible)",760,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/Field/FieldElementTypeFactory.php
24
- ___field--invalid,&:has(:user-invalid),700,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/Field/FieldElementTypeFactory.php
25
- ___field--invalid-focus-visible,&:has(:user-invalid:focus-visible),770,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/Field/FieldElementTypeFactory.php
26
- ___field--invalid-within,.m-field:where(:has(:user-invalid)) &,700,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/Field/FieldElementTypeFactory.php
27
- ___field-set--invalid,&:has(:user-invalid),700,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/FieldSet/FieldSetElementTypeFactory.php
28
- ___fileupload-input--selector-button,&::file-selector-button,0,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/FileUpload/FileUploadElementTypeFactory.php
29
- ___fileupload-input--selector-button-hover,&::file-selector-button:hover,100,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/FileUpload/FileUploadElementTypeFactory.php
30
- ___form--error,"&[data-form-state=""error""]",700,node-type,Mosaic/NodeTypes/Pro/Form/FormWrapperElementTypeFactory.php
31
- ___form--invalid-within,.m-form-wrapper:where(:has(:user-invalid)) &,700,node-type,Mosaic/NodeTypes/Pro/Form/FormWrapperElementTypeFactory.php
32
- ___input--placeholder,&.m-input::placeholder,0,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/InputText/InputTextElementTypeFactory.php
23
+ ___field--focus-visible,"&:has(:where(input, textarea, select):focus-visible)",760,node-type,Mosaic/NodeTypes/Form/Form/MElements/Field/FieldElementTypeFactory.php
24
+ ___field--invalid,&:has(:user-invalid),700,node-type,Mosaic/NodeTypes/Form/Form/MElements/Field/FieldElementTypeFactory.php
25
+ ___field--invalid-focus-visible,&:has(:user-invalid:focus-visible),770,node-type,Mosaic/NodeTypes/Form/Form/MElements/Field/FieldElementTypeFactory.php
26
+ ___field--invalid-within,.m-field:where(:has(:user-invalid)) &,700,node-type,Mosaic/NodeTypes/Form/Form/MElements/Field/FieldElementTypeFactory.php
27
+ ___field-set--invalid,&:has(:user-invalid),700,node-type,Mosaic/NodeTypes/Form/Form/MElements/FieldSet/FieldSetElementTypeFactory.php
28
+ ___fileupload-input--selector-button,&::file-selector-button,0,node-type,Mosaic/NodeTypes/Form/Form/MElements/FileUpload/FileUploadElementTypeFactory.php
29
+ ___fileupload-input--selector-button-hover,&::file-selector-button:hover,100,node-type,Mosaic/NodeTypes/Form/Form/MElements/FileUpload/FileUploadElementTypeFactory.php
30
+ ___form--error,"&[data-form-state=""error""]",700,node-type,Mosaic/NodeTypes/Form/FormWrapperElementTypeFactory.php
31
+ ___form--invalid-within,.m-form-wrapper:where(:has(:user-invalid)) &,700,node-type,Mosaic/NodeTypes/Form/FormWrapperElementTypeFactory.php
32
+ ___input--placeholder,&.m-input::placeholder,0,node-type,Mosaic/NodeTypes/Form/Form/MElements/InputText/InputTextElementTypeFactory.php
33
33
  ___loop_element_no_result,&.m-loop--no-result,600,node-type,Mosaic/NodeTypes/Loop/LoopElementTypeFactory.php
34
34
  ___loop_pagination_button--disabled,&.m-loop-pagination-button--disabled,800,node-type,Mosaic/NodeTypes/Loop/LoopPagination/Button/ButtonNext/LoopPaginationButtonNextElementTypeFactory.php
35
35
  ___menu-link--current,&.m-menu-link--current,500,node-type,Mosaic/NodeTypes/Menu/MenuLink/MenuLinkElementTypeFactory.php
@@ -37,19 +37,19 @@ ___navbar--dropdown-mode,"&:where(.m-navbar.dropdown-mode,.m-navbar.dropdown-mod
37
37
  ___navbar--opened,.dropdown-mode:where(.m-navbar.dropdown--opened) &,600,node-type,Mosaic/NodeTypes/Navbar/NavbarElementTypeFactory.php
38
38
  ___navbar--opening,.dropdown-mode:where(.m-navbar.dropdown--opening) &,600,node-type,Mosaic/NodeTypes/Navbar/NavbarElementTypeFactory.php
39
39
  ___nested_dropdown_mode,"&:where(.dropdown-mode .m-navbar-navigation .m-dropdown &, .m-dropdown .m-dropdown &):not(x)",600,node-type,Mosaic/NodeTypes/Menu/Dropdown/DropdownElementTypeFactoryAbstract.php
40
- ___popover--flipped,"&:where(.m-popover[data-mosaic-popover-flipped],.m-popover[data-mosaic-popover-flipped] &)",600,node-type,Mosaic/NodeTypes/Popover/PopoverElementTypeFactory.php
41
- ___radio-input--checked,&:checked,500,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/Radio/RadioInput/RadioInputElementTypeFactory.php
42
- ___radio-input--checkmark,&:checked::before,500,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/Radio/RadioInput/RadioInputElementTypeFactory.php
43
- ___select-input-option,"&.m-select:where(:has(option:not(:disabled):checked)), &.m-select :where(option)",500,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/Select/SelectElementTypeFactory.php
44
- ___select-input-option--disabled,"&.m-select:where(:has(option:disabled:checked)), &.m-select :where(option:disabled)",800,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/Select/SelectElementTypeFactory.php
45
- ___slide--active,.m-slide--active > &,500,node-type,Mosaic/NodeTypes/Pro/Slider/SliderSlides/SliderSlide/SliderSlideElementTypeFactory.php
46
- ___slider_navigation_bullet--active,&.m-slider-bullet--active,500,node-type,Mosaic/NodeTypes/Pro/Slider/SliderNavigation/SliderNavigationBullet/SliderNavigationBulletElementTypeFactory.php
47
- ___slider_navigation_bullet--hover,&:not(.m-slider-bullet--active):HOVER,100,node-type,Mosaic/NodeTypes/Pro/Slider/SliderNavigation/SliderNavigationBullet/SliderNavigationBulletElementTypeFactory.php
48
- ___step--active,&.m-multi-steps-step-tab--active,500,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/MultiSteps/Steps/Step/StepElementTypeFactory.php
49
- ___step--active___descendants,.m-multi-steps-step-tab--active &,500,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/MultiSteps/Steps/Step/StepElementTypeFactory.php
50
- ___step--completed,&.m-multi-steps-step-tab--completed,500,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/MultiSteps/Steps/Step/StepElementTypeFactory.php
51
- ___step--completed___descendants,.m-multi-steps-step-tab--completed &,500,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/MultiSteps/Steps/Step/StepElementTypeFactory.php
52
- ___submit-button--busy,"&[aria-busy=""true""]",800,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/SubmitButton/SubmitButtonElementTypeFactory.php
53
- ___tab--active,&.m-tab--active,500,node-type,Mosaic/NodeTypes/Pro/Tabs/TabsMenu/Tab/TabElementTypeFactory.php
54
- ___tab--active___descendants,.m-tab--active &,500,node-type,Mosaic/NodeTypes/Pro/Tabs/TabsMenu/Tab/TabElementTypeFactory.php
55
- ___textarea-input--placeholder,&.m-textarea::placeholder,0,node-type,Mosaic/NodeTypes/Pro/Form/Form/MElements/TextArea/TextAreaElementTypeFactory.php
40
+ ___popover--flipped,"&:where(.m-popover[data-mosaic-popover-flipped],.m-popover[data-mosaic-popover-flipped] &)",600,node-type,Mosaic/NodeTypes/Pro/Popover/PopoverElementTypeFactory.php
41
+ ___radio-input--checked,&:checked,500,node-type,Mosaic/NodeTypes/Form/Form/MElements/Radio/RadioInput/RadioInputElementTypeFactory.php
42
+ ___radio-input--checkmark,&:checked::before,500,node-type,Mosaic/NodeTypes/Form/Form/MElements/Radio/RadioInput/RadioInputElementTypeFactory.php
43
+ ___select-input-option,"&.m-select:where(:has(option:not(:disabled):checked)), &.m-select :where(option)",500,node-type,Mosaic/NodeTypes/Form/Form/MElements/Select/SelectElementTypeFactory.php
44
+ ___select-input-option--disabled,"&.m-select:where(:has(option:disabled:checked)), &.m-select :where(option:disabled)",800,node-type,Mosaic/NodeTypes/Form/Form/MElements/Select/SelectElementTypeFactory.php
45
+ ___slide--active,.m-slide--active > &,500,node-type,Mosaic/NodeTypes/Slider/SliderSlides/SliderSlide/SliderSlideElementTypeFactory.php
46
+ ___slider_navigation_bullet--active,&.m-slider-bullet--active,500,node-type,Mosaic/NodeTypes/Slider/SliderNavigation/SliderNavigationBullet/SliderNavigationBulletElementTypeFactory.php
47
+ ___slider_navigation_bullet--hover,&:not(.m-slider-bullet--active):HOVER,100,node-type,Mosaic/NodeTypes/Slider/SliderNavigation/SliderNavigationBullet/SliderNavigationBulletElementTypeFactory.php
48
+ ___step--active,&.m-multi-steps-step-tab--active,500,node-type,Mosaic/NodeTypes/Form/Form/MElements/MultiSteps/Steps/Step/StepElementTypeFactory.php
49
+ ___step--active___descendants,.m-multi-steps-step-tab--active &,500,node-type,Mosaic/NodeTypes/Form/Form/MElements/MultiSteps/Steps/Step/StepElementTypeFactory.php
50
+ ___step--completed,&.m-multi-steps-step-tab--completed,500,node-type,Mosaic/NodeTypes/Form/Form/MElements/MultiSteps/Steps/Step/StepElementTypeFactory.php
51
+ ___step--completed___descendants,.m-multi-steps-step-tab--completed &,500,node-type,Mosaic/NodeTypes/Form/Form/MElements/MultiSteps/Steps/Step/StepElementTypeFactory.php
52
+ ___submit-button--busy,"&[aria-busy=""true""]",800,node-type,Mosaic/NodeTypes/Form/Form/MElements/SubmitButton/SubmitButtonElementTypeFactory.php
53
+ ___tab--active,&.m-tab--active,500,node-type,Mosaic/NodeTypes/Tabs/TabsMenu/Tab/TabElementTypeFactory.php
54
+ ___tab--active___descendants,.m-tab--active &,500,node-type,Mosaic/NodeTypes/Tabs/TabsMenu/Tab/TabElementTypeFactory.php
55
+ ___textarea-input--placeholder,&.m-textarea::placeholder,0,node-type,Mosaic/NodeTypes/Form/Form/MElements/TextArea/TextAreaElementTypeFactory.php
package/data/variants.csv CHANGED
@@ -155,3 +155,4 @@ fb0c2625-dd5a-43c5-82e2-22e8c09ca06c,Loop items,m-list-loop-items,True,,.m-list-
155
155
  d1a109c7-3b52-04ef-9a6c-11e0dc0d1a70,Modal,m-modal,True,,.m-modal,,False,True,False,b1T
156
156
  d1a1090d-6e4f-04ef-9a6c-11e0dc0d1a71,Window,m-modal-window,True,,.m-modal-window,d1a109c7-3b52-04ef-9a6c-11e0dc0d1a70,False,True,False,b1U
157
157
  d1a10004-e51a-04ef-9a6c-11e0dc0d1a72,Overlay,m-modal-overlay,True,,.m-modal-overlay,d1a109c7-3b52-04ef-9a6c-11e0dc0d1a70,False,True,False,b1V
158
+ d1a1000b-70b0-04ef-9a6c-11e0dc0d1a73,Popover,m-popover,True,,.m-popover,,False,True,False,b1W
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mosaic-headless",
3
- "version": "1.32.1",
3
+ "version": "1.33.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",
@@ -62,11 +62,17 @@ does not touch the subtree's rows.
62
62
 
63
63
  ## Node types and properties
64
64
 
65
- 122 node types are registered (`data/node-types.csv`), **48 of them Pro-only** —
66
- the split is structural, not a flag: Pro types live under `Mosaic/NodeTypes/Pro/`
67
- and cover the whole form system, slider, tabs and code element. If a type's
68
- `edition` column says `pro`, a Free install has no factory for it and the node
69
- falls back to the `__unknown` type rather than erroring.
65
+ 129 node types are registered (`data/node-types.csv`), **5 of them Pro-only** as
66
+ of 1.0.11: `modal`, `modal-overlay`, `modal-window`, `popover` and `code`. The
67
+ split is structural, not a flag: Pro types live under `Mosaic/NodeTypes/Pro/`.
68
+ 1.0.11 turned it round. Through 1.0.10 the form system, slider and tabs (48
69
+ types) were the Pro ones and modal / popover were Free; 1.0.11 moved the forms,
70
+ slider and tabs out of `Pro/` and moved modal, popover and code in. A Pro-only
71
+ type now keeps its slug and placement rules on a shared
72
+ `*TypeFactoryAbstract` outside `Pro/`, so a Free install registers a locked
73
+ stand-in under the same slug (`LockedNodeTypes`) instead of having no factory
74
+ at all. Read the `edition` column for the version you target and never carry a
75
+ Free/Pro claim across an upgrade.
70
76
 
71
77
  Each type declares its own data properties (`data/node-properties.csv`, 181
72
78
  properties across 49 classes). Properties are declared by `createDataSimple` (175),
@@ -60,7 +60,40 @@ Three things learned the hard way:
60
60
  goes away.
61
61
  - Look up the ID in `data/variants.csv` by `name`. Several rows share a
62
62
  name (`Button` appears four times) because sub-components have their own metas — the
63
- `selectors` and `parent` columns tell them apart.
63
+ `selectors` and `parent` columns tell them apart. `Item` is the trap: the accordion,
64
+ loop and list items are all `Item` and all have a parent, so "the parent-less one"
65
+ finds none. `build_page.py` takes a theme variant key as the catalog id, the
66
+ `class_name` (`m-loop-item`) or a name, and refuses a name that matches more than
67
+ one row.
68
+
69
+ More from a client build on 1.0.10:
70
+
71
+ - **`HTML` and `Body` emit `html{…}` and `body{…}`**, and `customDeclarations` works
72
+ on them - the place for page-wide settings that have no node.
73
+ - **The loop pagination states work on the variants**:
74
+ `____loop_pagination_number--active` on `Number`,
75
+ `___loop_pagination_button--disabled` on `Pagination button`.
76
+ - **Variant CSS is printed early in `<head>`.** At equal specificity, a plugin's
77
+ `<link>` stylesheet and a page's own `<style>` both come later and win. Moving a
78
+ rule from a plugin stylesheet into a variant can therefore bring back a page rule
79
+ the plugin had been overriding.
80
+ - **The Gutenberg variants are scoped to block markup.** They match
81
+ `:is(.entry-content, .wp-block-post-content) X`, and `List` matches only
82
+ `ul.wp-block-list` - a list written by Rank Math's FAQ block or in raw HTML has no
83
+ such class and is not styled. A `wpContent` node renders
84
+ `.m-post-content > .wp-site-blocks > .entry-content`.
85
+
86
+ ## Universal classes
87
+
88
+ A universal class is the theme-global class a user names (the editor's "classes"),
89
+ committed on the master document under the key `universalClass` with
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>}` (a map to a
92
+ universal SUB class ID applies that sub class instead; `ElementMResourceStyle.php`).
93
+ The emitted class is the `name` (sanitized, any `m-` prefix dropped - the
94
+ class-name grammar is in SKILL.md), and its CSS is printed only
95
+ on a page where some node uses it. `status: "delete"` removes one - unlike a variant,
96
+ a universal class is not catalog-backed.
64
97
 
65
98
  ## Collection variables: the design tokens
66
99
 
@@ -146,13 +179,15 @@ need authoring. **It opens on CLICK, not hover** — the host gains
146
179
  `dropdown--opening dropdown--opened` and the wrapper goes from `display:none` to
147
180
  `display:flex`. A hover test reports a dropdown that does not work.
148
181
 
149
- `dropdown-wrapper` reads as a leaf in `placement-rules.csv`, because `rule` is the
150
- `canBeParentFor()` answer and that method is never overridden on it. But its
151
- factory is `getDropdownWrapperElementDefaultData($data, $children)` and the editor
152
- fills it. "Will the editor let me drop this here" is not the same question as "can
153
- this hold children", and a build guard that reads only the first refuses correct
154
- structures — it refused this menu. `extract_placement.py` now also records
155
- `takes_children` from the factory signature, and `build_page.py` reads it.
182
+ `dropdown-wrapper` used to read as a leaf in `placement-rules.csv`. Its
183
+ `canBeParentFor()` returns `true`, but on `DropdownWrapperElementTypeFactoryAbstract`,
184
+ and the extractor never read the abstract files, so it saw no override and wrote
185
+ `none`. The two slider arrows had the same problem. Since v1.33 the abstracts are read
186
+ and all four say `any`. The guard had already been fixed another way, and that fix
187
+ still holds. Its factory is `getDropdownWrapperElementDefaultData($data, $children)`,
188
+ and a build guard that reads only `rule` refuses correct structures; it refused this
189
+ menu. So `extract_placement.py` also records `takes_children` from the factory
190
+ signature, and `build_page.py` reads it.
156
191
 
157
192
  That is the second table to be caught short the same way this week. The first was
158
193
  `default-children.csv`, which held only the declared `getDefaultData()` statics and
@@ -604,6 +604,11 @@ document. Lay the forms out by positioning the WINDOW instead, which leaves
604
604
  | corner notice | no padding | `top:90px; right:24px`, a small `max-width` |
605
605
  | full takeover | no padding | `top:0; right:0; bottom:0; left:0`, `max-width:none` |
606
606
 
607
+ "No padding" has to be written: the host starts with the browser's own
608
+ `dialog { padding: 1em }`, because Mosaic's `.m-modal` rule resets inset, margin and
609
+ border but not padding. A client build measured a drawer's host at `padding:
610
+ 14.408px` - 1em of its fluid body size - with no modal variant on the page.
611
+
607
612
  `transform` is a structured value, so the centring pull-back is two entries
608
613
  (`translateX`, `translateY`), not a string — `references/styling.md` has the shape.
609
614
 
@@ -76,7 +76,7 @@ as a URL (measured on a client build on 1.0.10). As `{"v": "@concat(…)"}` it d
76
76
 
77
77
  ## The variable namespace
78
78
 
79
- `data/dynamic-variables.csv` — 74 variables across 11 namespaces, each row carrying
79
+ `data/dynamic-variables.csv` — 75 variables across 11 namespaces, each row carrying
80
80
  the exact `@VAR('…')` expression to paste:
81
81
 
82
82
  | namespace | n | what it needs to resolve |
@@ -191,7 +191,21 @@ value `{"v": "@LOOP('post/work_category', 1, 'term_id')"}`. A Meta Box checkbox
191
191
  `settings: {"key": "work_featured"}` and a `text` comparator
192
192
  `{"operator": "equals", "settings": {"value": "1"}}` - six posts back, in order.
193
193
 
194
- `orderByClauses` accepts `random`: `{"type": "random", "uuid": "<uuid>",
194
+ `orderByClauses` is a flat list of clauses, each `{uuid, type, <type>Options:
195
+ {settings}}` (`ValidatorOrderBy.php`), under `wpPostType<Type>Options`. Sorting by a
196
+ post column:
197
+
198
+ ```json
199
+ [{"type": "postVariable", "uuid": "<uuid>", "postVariableOptions": {"settings": {
200
+ "key": "post_date", "cast": "auto", "direction": "ASC"}}}]
201
+ ```
202
+
203
+ **Every settings field is required, `cast` included.** The validator runs each of the
204
+ type's fields and rejects the clause on the first missing one, and a rejected clause
205
+ is stored as `[]` - no error, and the loop falls back to the default newest-first
206
+ order. Reported from a client build on 1.0.10; the validator read from source.
207
+
208
+ `orderByClauses` also accepts `random`: `{"type": "random", "uuid": "<uuid>",
195
209
  "randomOptions": {"settings": {}}}`, a different order on every uncached render. Under
196
210
  a page cache that is one order per cache lifetime, not per visitor.
197
211
 
@@ -147,8 +147,15 @@ Two other things the table was short of, both fixed the same way — by reading
147
147
  source the column was derived from rather than the one it was convenient to read:
148
148
 
149
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.
150
+ signature. A type can hold children even when `rule` does not say so.
151
+ - **inherited rules.** `canBeParentFor` and `canBeNestedChildFor` can be declared on
152
+ a `*TypeFactoryAbstract`, and the abstracts were not read. So `dropdown-wrapper`
153
+ and the slider arrows read `none` when the source says `true`, and from 1.0.11
154
+ `modal`, `popover` and `code` dropped out of the catalog entirely. In 1.0.11 their
155
+ slug is `self::TYPE` on the abstract, shared with the Free build's locked
156
+ stand-in. The extractors now resolve both, and `modal-overlay`'s
157
+ `getType() === ModalElementTypeFactoryAbstract::TYPE` check is read as
158
+ "nested under modal".
152
159
  - **two missing types.** `fieldset-legend` and `fieldset-content` are declared by
153
160
  an `*ElementMResourceFactory.php`; every extractor walked
154
161
  `*ElementTypeFactory.php` only, so they were absent from the catalog and a
@@ -179,7 +179,9 @@ which are `SingleTransformTypeFactory` and do take `{"value": …}`.
179
179
  rewrites stored rows, and `build_page.py` still accepts the old spelling in a spec)
180
180
  accepts raw CSS text and emits it verbatim into the rule:
181
181
  `"customDeclarations": "outline: 2px dashed rgb(7,8,9);"` compiled through
182
- unchanged. It is the fallback for anything whose structured shape you have not pinned
182
+ unchanged. Every value is still validated, and one bad value - `!important`, a `dvh`
183
+ or other unit outside the validator's list - drops the whole block silently. It is the
184
+ fallback for anything whose structured shape you have not pinned
183
185
  down — at the cost of bypassing the collection-variable layer entirely.
184
186
 
185
187
  `tools/build_page.py` wraps the five shapes above as `radius`, `shadow`,
@@ -88,11 +88,12 @@ interaction gating and form actions — four contexts, one grammar.
88
88
  "uuid": "<uuid>",
89
89
  "type": "serverCondition",
90
90
  "serverConditionOptions": {
91
- "subject": {"type": "httpGet",
92
- "httpGetOptions": {"settings": {"name": "show"}}},
93
- "comparator": {"type": "text",
94
- "textOptions": {"operator": "equals",
95
- "settings": {"value": "yes"}}}
91
+ "subject": {"type": "httpGet",
92
+ "httpGetOptions": {
93
+ "settings": {"name": "show"},
94
+ "comparator": {"type": "text", // INSIDE <type>Options
95
+ "textOptions": {"operator": "equals",
96
+ "settings": {"value": "yes"}}}}}
96
97
  }
97
98
  }
98
99
  ]
@@ -103,6 +104,41 @@ interaction gating and form actions — four contexts, one grammar.
103
104
  The `<id>Options` suffix is the same convention as everywhere else in Mosaic
104
105
  (`RuleTypeAbstract::getOptionsDataName()` returns `getID() . 'Options'`).
105
106
 
107
+ **The comparator lives inside the subject's options**, beside `settings`, not beside
108
+ `subject`. The validator reads it as `subject.<type>Options.comparator`
109
+ (`ValidatorEvaluator.php`) and so does the evaluator (`RuleTypeAbstract.php`:
110
+ `$subjectData->{$subjectType . 'Options'}->comparator`). Put it one level up and the
111
+ evaluator finds no comparator and calls
112
+ `SubjectMeta::getLocalOrGlobalComparatorMetaByID(null)`, which is a PHP fatal
113
+ (`Undefined property $comparator`) that takes the WHOLE page down, not just the
114
+ element. Reported from a client build on 1.0.10 and confirmed in the source; the post
115
+ loop filters in `references/dynamic-content.md` use the same nesting.
116
+
117
+ "Show only when a field has a value", as it ran on a client site on 1.0.10:
118
+
119
+ ```json
120
+ {"uuid": "<uuid>", "type": "serverCondition", "serverConditionOptions": {"subject": {
121
+ "type": "variable", "variableOptions": {
122
+ "settings": {"dynamicCode": "@VAR('post/meta_x')"},
123
+ "comparator": {"type": "text", "textOptions": {
124
+ "operator": "regexp", "settings": {"value": "/./"}}}}}}}
125
+ ```
126
+
127
+ - **`dynamicCode` is a plain string.** The `variable` subject hands its setting
128
+ straight to the evaluator; `{"v": "@VAR(…)"}` there reaches
129
+ `LocalContext::evaluateDynamicCodeToStringOrArray()` as a `stdClass` and is a
130
+ page-wide fatal. (A post loop FILTER value is the opposite: it is `{"v": …}`.)
131
+ - **`regexp` needs its delimiters here.** `ServerConditionComparatorText` passes the
132
+ value to `preg_match()` as the whole pattern, so it is `/./`, not `.`. A pattern
133
+ without delimiters makes `preg_match` return false, which is read as "no match":
134
+ the element disappears on every page and nothing is reported. A post loop filter's
135
+ `regexp` is the opposite again - it becomes SQL `REGEXP` and takes NO delimiters
136
+ (`FilterSubjectPostTypes.php`).
137
+ - Units in one group AND: `regexp /./` plus `not-contains` on the same variable is
138
+ "has a value and is not X".
139
+ - Inside a `wpPostType` loop, `@VAR('<loopNamespace>/meta_x')` evaluates per item, so
140
+ each row shows or hides on its own field.
141
+
106
142
  **An empty or absent `conditions` matches.** `matchConditions()` returns `true` when
107
143
  the evaluation yields null, so a template with no conditions always applies and an
108
144
  element with none always renders. Conditions subtract, they never add.
@@ -134,9 +170,9 @@ can be an `@` expression rather than a literal — see `references/dynamic-conte
134
170
  ## Verification status
135
171
 
136
172
  The routing rules and the condition grammar above are read from source and from the
137
- live metas endpoints. **Committing a condition has not been driven end to end** — the
138
- property sweep's naive string probe on `conditions` returns HTTP 500, which is
139
- consistent with the nested shape being required but is not proof the shape above is
140
- accepted. Build one, then read the row back and diff it against what you sent; on this
141
- data model that diff is the only error message you get
142
- (`references/interactions.md` explains why).
173
+ live metas endpoints. Element conditions (`node.data.conditions`) have been driven end
174
+ to end on a client build on 1.0.10 with the shape above - the `variable` subject, the
175
+ `text` comparator's `regexp` and `not-contains`, inside and outside a post loop. Other
176
+ subjects are read from source only; build one, then read the row back and diff it
177
+ against what you sent. A wrong shape is either silently dropped or a fatal on render,
178
+ so load the page after every condition you commit.
@@ -1,4 +1,4 @@
1
- # Upgrading the plugin: what 1.0.7 → 1.0.8 → 1.0.10 did to the data, measured
1
+ # Upgrading the plugin: what 1.0.7 → 1.0.8 → 1.0.10 → 1.0.11 did to the data, measured
2
2
 
3
3
  A Mosaic plugin update is two events, not one. The files change when WordPress
4
4
  installs the package; the DATA changes only when Mosaic's own upgrade flow has
@@ -225,3 +225,76 @@ are the 1.0.9 sweep.
225
225
  which stopped being the post archive when the site got a static front page; every
226
226
  type, a plain `div` included, came back COMMITTED. It now reads `sweepPath`
227
227
  (default `?post_type=post`) and refuses to run unless a plain div renders there.
228
+
229
+ ## 1.0.10 → 1.0.11
230
+
231
+ **Getting the package.** This time `wp plugin update mosaic` fetched
232
+ `private-mosaic-pro://…/Mosaic-pro-plugin-stable-1.0.11.zip` and installed it:
233
+ "Mosaic 資料版本與目前安裝的版本相同。正在取代外掛..." / "Updated 1 of 1". The
234
+ folder came out with the right permissions, so no chmod was needed. Back up first
235
+ anyway: `wp db export ~/private_html/pre-1011.sql` and a copy of the old plugin
236
+ folder.
237
+
238
+ **No data migration.** The header reads `Version: 1.0.11` but `Data Version: 1.0.10`,
239
+ `MOSAIC_SITE.dataVersion` stays `1.0.10`, and the editor namespace answered as
240
+ `/wp-json/mosaic/v1.0.11` straight after the swap. No table changed shape (the same
241
+ 23 tables / 210 columns), and the 115 editor routes are the same 115.
242
+
243
+ **The Free/Pro split was turned round.** Read off the directory layout, as the
244
+ `edition` column always has been:
245
+
246
+ - the form system (forms, fields, steps, captchas), the slider and tabs, 49 types
247
+ in all, moved OUT of `Mosaic/NodeTypes/Pro/`;
248
+ - `modal`, `modal-overlay`, `modal-window` and `popover` moved IN; `code` stays.
249
+
250
+ So 1.0.11 has 5 Pro-only types instead of 48. A Pro-only type now keeps its slug,
251
+ `canBeParentFor` and `canBeNestedChildFor` on a shared `*TypeFactoryAbstract`
252
+ outside `Pro/`, the Pro factory adds the behaviour, and the Free build registers a
253
+ locked stand-in from the same abstract (`LockedNodeTypes`, stripped from the Pro
254
+ package).
255
+
256
+ **That split hid four types from every extractor.** The slug is now `self::TYPE`
257
+ on the abstract, not a string literal in the concrete factory's constructor, so
258
+ `modal`, `modal-overlay`, `modal-window` and `popover` vanished from
259
+ `node-types.csv`, and `code` with them (124 rows instead of 129). Nothing errored.
260
+ `extract_node_types.py` now resolves `self::TYPE` and inherits a slug from the
261
+ abstract, and `extract_placement.py` / `extract_default_children.py` share that
262
+ lookup (`factory_slugs()`). Reading the abstracts also corrected four rows that
263
+ had been wrong since they were first extracted: `dropdown-wrapper`,
264
+ `dropdown-wrapper-wide` and the two slider arrows say `return true` in
265
+ `canBeParentFor` on their abstract, so they are `any`, not `none`. The arrows'
266
+ `canBeNestedChildFor` (inside a slider or its navigation) is now recorded too.
267
+ Every extractor run against the 1.0.10 tree reproduces the committed 1.0.10
268
+ tables, apart from those four corrected rows.
269
+
270
+ **Re-extracted and diffed against 1.0.10:** `@VAR('slider/count')` (75 variables);
271
+ `textAlign` accepts `inherit`; the `exitIntent` trigger moved from the "Page &
272
+ scroll" group to "Mouse"; a `Popover` variant (`m-popover`, 157 variants, live);
273
+ pluggables 261 → 285: the `scrollTo` interaction action (with its `px` / `%` / `vh`
274
+ offset units), the `kit` form action and its `kit_fields` endpoint, a
275
+ `configurableMetaBoxModel` dynamic source, a `term_variable` endpoint, and the
276
+ Mailchimp / MailerLite endpoints moved under `Endpoints\Pro`. Node properties
277
+ are the same 196 (the rows moved edition with their types).
278
+
279
+ **SEO plugins read the render.** `Compatibility/WordPress/Integrations/Seo/`. On
280
+ the post edit screen, the template body's HTML is handed to Yoast's and Rank Math's
281
+ analysis (`rank_math_content`), with the Content element's slot replaced by a live
282
+ marker so the text being typed is analysed in place. Rank Math's link counter
283
+ (`rank_math/links/content`) gets the render instead of the empty `post_content`.
284
+ SEOPress and Slim SEO have their own adapters. A Mosaic page no longer scores as
285
+ empty.
286
+
287
+ **Re-verified on the live site:** `popovers` 37/37, `component-wall` 26/26,
288
+ `form-surface`, `content-loop` 15/15, both sliders, `tokens`, `navigation` 27/27
289
+ and `mobile-audit` 68 findings. Every one came out byte-identical to the 1.0.10
290
+ CSV, except the navigation page sizes, which moved by a few bytes.
291
+
292
+ **The node sweep can wreck its own master.** The `document` probe (COMMIT_502 on
293
+ 1.0.10 as well) left a nested `document` in the sweep master, and from then on
294
+ every `masterDocumentInstance` GET reset the PHP worker (nginx: "recv() failed
295
+ (104: Connection reset by peer)"), so the run stopped after twelve types. Earlier
296
+ runs had left `master-root`, `styleguide-root`, `component-root` and
297
+ `template-internal` probes under the parent div as well. Delete everything under
298
+ `parentNodeID` (the master is back to its 7 baseline nodes), and sweep `document`
299
+ on its own, or not at all. Also, the parent is the FIRST div by `ordering` (what
300
+ `--setup` picks); a config rebuilt by hand with another div sends the probes there.
@@ -23,10 +23,12 @@ rule is the same: never write a property name, enum value, or Free/Pro claim fro
23
23
  memory — look it up in `data/`.
24
24
 
25
25
  **The Free/Pro split is a real axis in both Elementor and Mosaic.** In Mosaic it is
26
- cleaner: 48 of 122 node types live under `NodeTypes/Pro/` and simply have no factory
27
- on a Free install (`edition` column in `data/node-types.csv`). There is no
28
- "partially available" state to reason about the way there is with Elementor Pro
29
- controls on Free widgets.
26
+ cleaner: whole node types are Pro or not (`edition` column in
27
+ `data/node-types.csv`). In 1.0.11 only 5 of 129 are Pro (modal, its overlay and
28
+ window, popover, code) and a Free install shows a locked stand-in for them; forms,
29
+ slider and tabs, Pro through 1.0.10, are Free now. There is no "partially
30
+ available" state to reason about the way there is with Elementor Pro controls on
31
+ Free widgets.
30
32
 
31
33
  **Dynamic values exist in all three**, under three names. Elementor calls them
32
34
  dynamic tags; Gutenberg has bindings; Mosaic has **evaluator functions** — 19 of
@@ -492,17 +492,25 @@ def theme_records(spec, doc, surface):
492
492
 
493
493
  classes = theme.get("variants") or theme.get("elementClasses") or {}
494
494
  if classes:
495
- by_name = {}
496
- for row in load_csv("variants.csv"):
497
- by_name.setdefault(row["name"], []).append(row)
495
+ catalog = load_csv("variants.csv")
498
496
  recs = []
499
497
  for name, states in classes.items():
500
- matches = by_name.get(name) or []
498
+ # a catalog id, a class_name (m-loop-item) or a name. Names repeat -
499
+ # `Item` is the accordion, loop AND list item, all three with a parent -
500
+ # so a name only resolves when it is the sole row, or the sole
501
+ # parent-less one, carrying it
502
+ matches = ([m for m in catalog if m["id"] == name]
503
+ or [m for m in catalog if m["class_name"] == name]
504
+ or [m for m in catalog if m["name"] == name])
501
505
  if not matches:
502
- sys.exit("no variant named %r; see data/variants.csv" % name)
506
+ sys.exit("no variant %r; see data/variants.csv" % name)
507
+ roots = [m for m in matches if not m["parent"]]
508
+ if len(matches) > 1 and len(roots) != 1:
509
+ sys.exit("variant name %r is ambiguous; use one of: %s" % (
510
+ name, ", ".join(m["class_name"] for m in matches)))
503
511
  # a fresh UUID here is accepted and then silently dropped, so the meta ID
504
- # is the only thing that works - take the top-level (parent-less) one
505
- top = next((m for m in matches if not m["parent"]), matches[0])
512
+ # is the only thing that works
513
+ top = roots[0] if len(matches) > 1 else matches[0]
506
514
  recs.append({"newRevisionRecord": {
507
515
  "ID": top["id"], "parentType": "", "parentID": "", "ordering": "a0",
508
516
  "status": "publish", "revision": "", "version": "",
@@ -40,6 +40,8 @@ import os
40
40
  import re
41
41
  import sys
42
42
 
43
+ from extract_node_types import factory_slugs
44
+
43
45
  RE_DEFAULT = re.compile(
44
46
  r"function\s+get\w*DefaultData\s*\([^)]*\)\s*:\s*object\s*\{(.*?)\n \}", re.S
45
47
  )
@@ -73,10 +75,9 @@ def extract(plugin_root, out_dir):
73
75
  path = os.path.join(dirpath, fn)
74
76
  src = read(path)
75
77
  files.append((path, src))
76
- ctor = re.search(r"parent::__construct\s*\(\s*\$\w+\s*,\s*'([^']+)'", src)
77
- stem = fn.replace("ElementTypeFactory.php", "").replace("NodeTypeFactory.php", "")
78
- if ctor:
79
- stem_to_slug[stem] = ctor.group(1)
78
+
79
+ for cls_name, slug in factory_slugs(node_root, ("TypeFactory.php",)).items():
80
+ stem_to_slug[re.sub(r"(Element|Node)TypeFactory$", "", cls_name)] = slug
80
81
 
81
82
  rows = []
82
83
  for path, src in files: