mosaic-headless 1.32.2 → 1.33.1

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.2",
3
+ "version": "1.33.1",
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),
@@ -179,13 +179,15 @@ need authoring. **It opens on CLICK, not hover** — the host gains
179
179
  `dropdown--opening dropdown--opened` and the wrapper goes from `display:none` to
180
180
  `display:flex`. A hover test reports a dropdown that does not work.
181
181
 
182
- `dropdown-wrapper` reads as a leaf in `placement-rules.csv`, because `rule` is the
183
- `canBeParentFor()` answer and that method is never overridden on it. But its
184
- factory is `getDropdownWrapperElementDefaultData($data, $children)` and the editor
185
- fills it. "Will the editor let me drop this here" is not the same question as "can
186
- this hold children", and a build guard that reads only the first refuses correct
187
- structures — it refused this menu. `extract_placement.py` now also records
188
- `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.
189
191
 
190
192
  That is the second table to be caught short the same way this week. The first was
191
193
  `default-children.csv`, which held only the declared `getDefaultData()` statics and
@@ -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 |
@@ -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
@@ -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,94 @@ 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
+ **Text runs stopped printing HTML.** `WysiwygTextNodeMResource` now escapes `<` and
280
+ `>` in a `wysiwyg-text` run on output (`getEscapedText()`, NEXT-5875; `&` is left
281
+ alone so entities still work). A run carrying `<strong>` or `<br>` - a natural thing
282
+ for a conversion script to emit - prints the tags as text. Measured on the demo site:
283
+ `A<strong>B</strong>C<br>D` delivered as `A&lt;strong&gt;B&lt;/strong&gt;C&lt;br&gt;D`,
284
+ while sibling `wysiwyg-span`, `wysiwyg-linebreak` and `wysiwyg-link` nodes delivered
285
+ `<span class="m-span">`, `<br>` and `<a class="m-inline-link" href>`. None of the
286
+ demo pages used inline tags, so every verifier above still matched; it was a client
287
+ migration from Elementor that hit it, and fixed it by emitting the inline nodes.
288
+ `build_page.py` used to let `b|i|em|strong|br|span|a|code|sup|sub` through; it now
289
+ refuses every tag in a run. `from_elementor.py` was the worst case: it put a text-editor
290
+ widget's whole HTML into one run, so every converted paragraph came out as
291
+ `&lt;p&gt;…&lt;/p&gt;` on 1.0.11 - the demo site's old conversions show 57 to 88 literal
292
+ tags per page. It now parses the HTML with `tools/inline_html.py` into `text` / `list`
293
+ nodes with span, link and line-break nodes inside; pages converted before the fix
294
+ have to be converted again. `wysiwyg-link`'s `url` also gained `ValidatorURLAllowed`
295
+ and is printed through `Filter::escURL`.
296
+
297
+ **SEO plugins read the render.** `Compatibility/WordPress/Integrations/Seo/`. On
298
+ the post edit screen, the template body's HTML is handed to Yoast's and Rank Math's
299
+ analysis (`rank_math_content`), with the Content element's slot replaced by a live
300
+ marker so the text being typed is analysed in place. Rank Math's link counter
301
+ (`rank_math/links/content`) gets the render instead of the empty `post_content`.
302
+ SEOPress and Slim SEO have their own adapters. A Mosaic page no longer scores as
303
+ empty.
304
+
305
+ **Re-verified on the live site:** `popovers` 37/37, `component-wall` 26/26,
306
+ `form-surface`, `content-loop` 15/15, both sliders, `tokens`, `navigation` 27/27
307
+ and `mobile-audit` 68 findings. Every one came out byte-identical to the 1.0.10
308
+ CSV, except the navigation page sizes, which moved by a few bytes.
309
+
310
+ **The node sweep can wreck its own master.** The `document` probe (COMMIT_502 on
311
+ 1.0.10 as well) left a nested `document` in the sweep master, and from then on
312
+ every `masterDocumentInstance` GET reset the PHP worker (nginx: "recv() failed
313
+ (104: Connection reset by peer)"), so the run stopped after twelve types. Earlier
314
+ runs had left `master-root`, `styleguide-root`, `component-root` and
315
+ `template-internal` probes under the parent div as well. Delete everything under
316
+ `parentNodeID` (the master is back to its 7 baseline nodes), and sweep `document`
317
+ on its own, or not at all. Also, the parent is the FIRST div by `ordering` (what
318
+ `--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
@@ -66,11 +66,11 @@ def load_csv(name):
66
66
  return list(csv.DictReader(fh))
67
67
 
68
68
 
69
- # Tags that may legitimately appear inside wysiwyg-text, which is raw HTML and is
70
- # where this skill's own pages put their inline emphasis. Everything else in prose
71
- # is almost certainly a tag NAME being discussed rather than markup intended to run.
72
- PROSE_TAG = re.compile(r"</?(?!(?:b|i|em|strong|br|span|a|code|sup|sub)\b)"
73
- r"[a-zA-Z][a-zA-Z0-9-]*\s*[^>]*>")
69
+ # Any tag inside wysiwyg-text. Since 1.0.11 the run's `<` and `>` are escaped on
70
+ # output (WysiwygTextNodeMResource::getEscapedText, NEXT-5875), so `<strong>` or
71
+ # `<br>` prints as those characters on the page. Inline formatting is written as
72
+ # nodes instead: wysiwyg-span, wysiwyg-linebreak, wysiwyg-link.
73
+ PROSE_TAG = re.compile(r"</?[a-zA-Z][a-zA-Z0-9-]*\s*[^>]*>")
74
74
  AT_RULE_GLUED = re.compile(
75
75
  r"@(media|supports|container|layer|scope|import|page|starting-style|"
76
76
  r"font-feature-values|counter-style|property|document)\(")
@@ -109,20 +109,21 @@ class Surface:
109
109
  # Measured both ways on the demo site (`@media (` renders, `@media(`
110
110
  # does not). Refused here for the same reason an unsafe type is: the
111
111
  # failure is silent at the only point this tool can still stop it.
112
- # `wysiwyg-text` is RAW HTML, not escaped text, so a tag NAME written in
113
- # prose opens an element and swallows the rest of the paragraph. "Mosaic's
114
- # modal is a real <dialog>" delivered the words up to "real" and nothing
115
- # after it. The commit succeeds and the page renders - it is just missing
116
- # most of its sentence, which is why this is worth refusing rather than
117
- # leaving to proofreading. Inline formatting tags are let through; anything
118
- # else has to be written as an entity.
112
+ # A tag in `wysiwyg-text` is wrong on every version, in opposite ways.
113
+ # Through 1.0.10 the run was raw HTML: "a real <dialog>" opened an element
114
+ # and the rest of the paragraph vanished. Since 1.0.11 `<` and `>` are
115
+ # escaped on output, so `<strong>` and `<br>` print literally (measured on
116
+ # the demo site). Either way the commit succeeds and only the page is wrong.
117
+ # An entity (`&lt;dialog&gt;`, `&amp;`) prints as its character on both;
118
+ # emphasis, breaks and links are their own nodes.
119
119
  if t == "wysiwyg-text" and not force:
120
120
  text = (node.get("data") or {}).get("text") or ""
121
121
  hit = PROSE_TAG.search(text)
122
122
  if hit:
123
- problems.append("wysiwyg-text contains `%s` - the text is raw HTML, so "
124
- "this opens an element and the rest of the paragraph "
125
- "disappears; write it as &lt;%s&gt;"
123
+ problems.append("wysiwyg-text contains `%s` - since 1.0.11 a tag in a text "
124
+ "run prints as literal characters. Use a wysiwyg-span / "
125
+ "wysiwyg-linebreak / wysiwyg-link node for formatting, or "
126
+ "write a literal tag name as &lt;%s&gt;"
126
127
  % (hit.group(0), hit.group(0).strip("<>/")))
127
128
  if t == "code" and not force:
128
129
  content = (node.get("data") or {}).get("content") or ""
@@ -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:
@@ -22,9 +22,10 @@ import sys
22
22
 
23
23
  # parent::__construct($nodeFactoryManager, 'slug', <label expr>) -- may span lines
24
24
  RE_CTOR = re.compile(
25
- r"parent::__construct\s*\(\s*\$\w+\s*,\s*'([^']+)'\s*,\s*(.*?)\)\s*;",
25
+ r"parent::__construct\s*\(\s*\$\w+\s*,\s*('[^']+'|self::\w+|static::\w+)\s*,\s*(.*?)\)\s*;",
26
26
  re.S,
27
27
  )
28
+ RE_CONST = re.compile(r"const\s+(\w+)\s*=\s*'([^']+)'\s*;")
28
29
  RE_CLASS = re.compile(r"^\s*(?:final\s+)?(abstract\s+)?class\s+(\w+)\s+extends\s+(\w+)", re.M)
29
30
  RE_METHOD_BOOL = re.compile(r"function\s+(\w+)\s*\([^)]*\)\s*:\s*bool\s*\{\s*return\s+(true|false)\s*;", re.S)
30
31
  RE_ALIAS = re.compile(r"function\s+getAliasTypes\s*\([^)]*\)\s*:\s*array\s*\{\s*return\s*\[(.*?)\]", re.S)
@@ -51,6 +52,47 @@ def rel(path, root):
51
52
  return os.path.relpath(path, root).replace(os.sep, "/")
52
53
 
53
54
 
55
+ def ctor_of(src):
56
+ """(slug, label expr) of a factory's own constructor, or None.
57
+
58
+ Since 1.0.11 the slug of a Pro-only element (modal, popover, code) is a class
59
+ constant on a shared `*TypeFactoryAbstract` - the Free build registers a locked
60
+ stand-in from the same abstract - so `self::TYPE` is resolved here."""
61
+ m = RE_CTOR.search(src)
62
+ if not m:
63
+ return None
64
+ slug = m.group(1)
65
+ if slug.startswith("'"):
66
+ return slug.strip("'"), m.group(2)
67
+ consts = dict(RE_CONST.findall(src))
68
+ name = slug.split("::", 1)[1]
69
+ return (consts[name], m.group(2)) if name in consts else None
70
+
71
+
72
+ def factory_slugs(node_root, suffixes=("TypeFactory.php", "MResourceFactory.php")):
73
+ """Concrete factory class name -> type slug, a slug inherited from the abstract
74
+ when the factory has no constructor of its own. The other extractors share this
75
+ so the three tables cannot disagree about which types exist."""
76
+ inherited = {}
77
+ for path in walk(node_root, ("TypeFactoryAbstract.php",)):
78
+ src = read(path)
79
+ cls = RE_CLASS.search(src)
80
+ c = ctor_of(src)
81
+ if cls and c:
82
+ inherited[cls.group(2)] = c[0]
83
+ out = {}
84
+ for path in walk(node_root, suffixes):
85
+ src = read(path)
86
+ cls = RE_CLASS.search(src)
87
+ if not cls:
88
+ continue
89
+ c = ctor_of(src)
90
+ slug = c[0] if c else inherited.get(cls.group(3))
91
+ if slug:
92
+ out[cls.group(2)] = slug
93
+ return out
94
+
95
+
54
96
  def walk(root, suffixes):
55
97
  for dirpath, _dirs, files in os.walk(root):
56
98
  for fn in files:
@@ -68,6 +110,18 @@ def extract(plugin_root, out_dir):
68
110
  if not os.path.isdir(node_root):
69
111
  sys.exit("no Mosaic/NodeTypes under %s" % plugin_root)
70
112
 
113
+ # A concrete factory with no constructor of its own takes its slug from the
114
+ # abstract it extends (1.0.11 split modal / popover / code this way).
115
+ inherited_ctor = {}
116
+ abstract_src = {}
117
+ for path in walk(node_root, ("TypeFactoryAbstract.php",)):
118
+ src = read(path)
119
+ cls = RE_CLASS.search(src)
120
+ c = ctor_of(src)
121
+ if cls and c:
122
+ inherited_ctor[cls.group(2)] = c
123
+ abstract_src[cls.group(2)] = src
124
+
71
125
  types = []
72
126
  # `*MResourceFactory.php` as well as `*TypeFactory.php`: two node types -
73
127
  # `fieldset-legend` and `fieldset-content` - are declared only by the former,
@@ -78,7 +132,7 @@ def extract(plugin_root, out_dir):
78
132
  for path in sorted(walk(node_root, ("TypeFactory.php", "MResourceFactory.php"))):
79
133
  src = read(path)
80
134
  cls = RE_CLASS.search(src)
81
- ctor = RE_CTOR.search(src)
135
+ ctor = ctor_of(src) or (inherited_ctor.get(cls.group(3)) if cls else None)
82
136
  if not ctor:
83
137
  continue # abstract factory with no own slug
84
138
  relpath = rel(path, plugin_root)
@@ -100,14 +154,17 @@ def extract(plugin_root, out_dir):
100
154
  sibling)))
101
155
  data_extends = dcls.group(3) if dcls else ""
102
156
  break
103
- bools = dict(RE_METHOD_BOOL.findall(src))
104
- alias = RE_ALIAS.search(src)
157
+ # isLink / canBeParentFor / aliases / default variant may sit on that abstract too
158
+ base = abstract_src.get(cls.group(3), "") if cls else ""
159
+ bools = dict(RE_METHOD_BOOL.findall(base))
160
+ bools.update(RE_METHOD_BOOL.findall(src))
161
+ alias = RE_ALIAS.search(src) or RE_ALIAS.search(base)
105
162
  aliases = re.findall(r"'([^']+)'", alias.group(1)) if alias else []
106
- dflt = RE_DEFAULT_CLASS.search(src)
163
+ dflt = RE_DEFAULT_CLASS.search(src) or RE_DEFAULT_CLASS.search(base)
107
164
  types.append(
108
165
  {
109
- "type": ctor.group(1),
110
- "label": php_label(ctor.group(2)),
166
+ "type": ctor[0],
167
+ "label": php_label(ctor[1]),
111
168
  "class": cls.group(2) if cls else "",
112
169
  "extends": cls.group(3) if cls else "",
113
170
  "abstract": "yes" if (cls and cls.group(1)) else "no",
@@ -32,6 +32,8 @@ import os
32
32
  import re
33
33
  import sys
34
34
 
35
+ from extract_node_types import factory_slugs
36
+
35
37
  RE_CLASS = re.compile(r"^\s*(?:final\s+)?(?:abstract\s+)?class\s+(\w+)\s+extends\s+(\w+)", re.M)
36
38
  RE_CAN_BE_PARENT = re.compile(
37
39
  r"function\s+canBeParentFor\s*\([^)]*\)\s*:\s*bool\s*\{(.*?)\n \}", re.S
@@ -68,16 +70,16 @@ def extract(plugin_root, out_dir):
68
70
  sys.exit("no Mosaic/NodeTypes under %s" % plugin_root)
69
71
 
70
72
  # factory class name -> type slug, so instanceof targets can be named as types
71
- class_to_type, sources = {}, {}
72
- for path in walk(node_root, ("TypeFactory.php", "MResourceFactory.php")):
73
+ # Abstracts are read as sources too: since 1.0.11 a Pro-only type (modal,
74
+ # popover, code) keeps its canBeParentFor on a shared `*TypeFactoryAbstract`.
75
+ class_to_type, sources = factory_slugs(node_root), {}
76
+ for path in walk(node_root, ("TypeFactory.php", "MResourceFactory.php",
77
+ "TypeFactoryAbstract.php")):
73
78
  src = read(path)
74
79
  cls = RE_CLASS.search(src)
75
80
  if not cls:
76
81
  continue
77
82
  sources[cls.group(1)] = (path, src, cls.group(2))
78
- ctor = RE_CTOR.search(src)
79
- if ctor:
80
- class_to_type[cls.group(1)] = ctor.group(1)
81
83
 
82
84
  def resolve(cls_name):
83
85
  """A factory may inherit canBeParentFor from an abstract ancestor."""
@@ -95,7 +97,12 @@ def extract(plugin_root, out_dir):
95
97
  for cls_name, slug in sorted(class_to_type.items(), key=lambda kv: kv[1]):
96
98
  body, defined_in = resolve(cls_name)
97
99
  path, src, _parent = sources[cls_name]
98
- nested = "yes" if "function canBeNestedChildFor" in src else ""
100
+ # canBeNestedChildFor may sit on the abstract as well (modal-overlay, 1.0.11)
101
+ nsrc, c = src, cls_name
102
+ while "function canBeNestedChildFor" not in nsrc and sources.get(c, (0, 0, ""))[2] in sources:
103
+ c = sources[c][2]
104
+ nsrc = sources[c][1]
105
+ nested = "yes" if "function canBeNestedChildFor" in nsrc else ""
99
106
  # `yes` alone says a runtime ancestry rule exists and not what it wants.
100
107
  # These methods walk the parent chain looking for one MResource class -
101
108
  # `radio-input` wants a `ChoiceElementMResource` above it - and that is
@@ -104,10 +111,14 @@ def extract(plugin_root, out_dir):
104
111
  if nested:
105
112
  mbody = re.search(
106
113
  r"function\s+canBeNestedChildFor\s*\([^)]*\)\s*:\s*bool\s*\{(.*?)\n \}",
107
- src, re.S)
114
+ nsrc, re.S)
108
115
  if mbody:
109
116
  for cls in re.findall(r"instanceof\s+(\w+)ElementMResource\b", mbody.group(1)):
110
117
  nested_under.append(cls)
118
+ # 1.0.11 also compares type slugs: `getType() === ModalElementTypeFactoryAbstract::TYPE`
119
+ for cls in re.findall(r"getType\(\)\s*===\s*(\w+)ElementTypeFactory(?:Abstract)?::TYPE", mbody.group(1)):
120
+ if cls not in nested_under:
121
+ nested_under.append(cls)
111
122
 
112
123
  if body is None:
113
124
  rule, allowed = "none", [] # inherited default on the abstract base