mateu-ui 3.0.0__tar.gz

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.
Files changed (190) hide show
  1. mateu_ui-3.0.0/.gitignore +6 -0
  2. mateu_ui-3.0.0/DESIGN.md +117 -0
  3. mateu_ui-3.0.0/LICENSE.txt +202 -0
  4. mateu_ui-3.0.0/NOTICE +65 -0
  5. mateu_ui-3.0.0/PKG-INFO +326 -0
  6. mateu_ui-3.0.0/README.md +280 -0
  7. mateu_ui-3.0.0/mateu_ui/__init__.py +15 -0
  8. mateu_ui-3.0.0/mateu_ui/_version.py +8 -0
  9. mateu_ui-3.0.0/mateu_ui/bundle/__init__.py +607 -0
  10. mateu_ui-3.0.0/mateu_ui/bundle/__main__.py +158 -0
  11. mateu_ui-3.0.0/mateu_ui/bundle/inliner.py +153 -0
  12. mateu_ui-3.0.0/mateu_ui/bundle/static_safety.py +316 -0
  13. mateu_ui-3.0.0/mateu_ui/bundle/writer.py +178 -0
  14. mateu_ui-3.0.0/mateu_ui/core/__init__.py +29 -0
  15. mateu_ui-3.0.0/mateu_ui/core/action_guard.py +318 -0
  16. mateu_ui-3.0.0/mateu_ui/core/action_registry.py +319 -0
  17. mateu_ui-3.0.0/mateu_ui/core/agent_push.py +1066 -0
  18. mateu_ui-3.0.0/mateu_ui/core/authoring/__init__.py +24 -0
  19. mateu_ui-3.0.0/mateu_ui/core/authoring/resources/authoring-guide.md +88 -0
  20. mateu_ui-3.0.0/mateu_ui/core/authoring/resources/specs-schema.json +9994 -0
  21. mateu_ui-3.0.0/mateu_ui/core/authoring/resources/uidl-catalog.json +2794 -0
  22. mateu_ui-3.0.0/mateu_ui/core/authoring/resources/uidl-schema.json +9517 -0
  23. mateu_ui-3.0.0/mateu_ui/core/authoring/resources.py +102 -0
  24. mateu_ui-3.0.0/mateu_ui/core/authoring/schemas.py +79 -0
  25. mateu_ui-3.0.0/mateu_ui/core/authoring/service.py +57 -0
  26. mateu_ui-3.0.0/mateu_ui/core/authoring/spec_writer.py +164 -0
  27. mateu_ui-3.0.0/mateu_ui/core/authoring/validator.py +628 -0
  28. mateu_ui-3.0.0/mateu_ui/core/authoring_gate.py +44 -0
  29. mateu_ui-3.0.0/mateu_ui/core/capabilities.py +49 -0
  30. mateu_ui-3.0.0/mateu_ui/core/component_registry.py +369 -0
  31. mateu_ui-3.0.0/mateu_ui/core/dev_specs.py +223 -0
  32. mateu_ui-3.0.0/mateu_ui/core/documents.py +209 -0
  33. mateu_ui-3.0.0/mateu_ui/core/environments.py +176 -0
  34. mateu_ui-3.0.0/mateu_ui/core/error_boundary.py +111 -0
  35. mateu_ui-3.0.0/mateu_ui/core/errors.py +40 -0
  36. mateu_ui-3.0.0/mateu_ui/core/eta_estimator.py +76 -0
  37. mateu_ui-3.0.0/mateu_ui/core/export.py +68 -0
  38. mateu_ui-3.0.0/mateu_ui/core/field_type_registry.py +255 -0
  39. mateu_ui-3.0.0/mateu_ui/core/filter_criteria.py +98 -0
  40. mateu_ui-3.0.0/mateu_ui/core/form_columns_inference.py +100 -0
  41. mateu_ui-3.0.0/mateu_ui/core/hidden_members.py +26 -0
  42. mateu_ui-3.0.0/mateu_ui/core/idempotency_keys.py +435 -0
  43. mateu_ui-3.0.0/mateu_ui/core/identity.py +104 -0
  44. mateu_ui-3.0.0/mateu_ui/core/importwizard.py +390 -0
  45. mateu_ui-3.0.0/mateu_ui/core/inbox.py +69 -0
  46. mateu_ui-3.0.0/mateu_ui/core/inference_switches.py +36 -0
  47. mateu_ui-3.0.0/mateu_ui/core/input_purpose.py +11 -0
  48. mateu_ui-3.0.0/mateu_ui/core/islands.py +93 -0
  49. mateu_ui-3.0.0/mateu_ui/core/labels_aside_inference.py +80 -0
  50. mateu_ui-3.0.0/mateu_ui/core/layout_delta.py +225 -0
  51. mateu_ui-3.0.0/mateu_ui/core/layout_inference.py +77 -0
  52. mateu_ui-3.0.0/mateu_ui/core/mapper/__init__.py +441 -0
  53. mateu_ui-3.0.0/mateu_ui/core/mapper/_base.py +16 -0
  54. mateu_ui-3.0.0/mateu_ui/core/mapper/_common.py +488 -0
  55. mateu_ui-3.0.0/mateu_ui/core/mapper/app.py +706 -0
  56. mateu_ui-3.0.0/mateu_ui/core/mapper/archetypes.py +237 -0
  57. mateu_ui-3.0.0/mateu_ui/core/mapper/components.py +1695 -0
  58. mateu_ui-3.0.0/mateu_ui/core/mapper/composed_page_header.py +82 -0
  59. mateu_ui-3.0.0/mateu_ui/core/mapper/crud.py +1041 -0
  60. mateu_ui-3.0.0/mateu_ui/core/mapper/crud_modes.py +106 -0
  61. mateu_ui-3.0.0/mateu_ui/core/mapper/decorations.py +304 -0
  62. mateu_ui-3.0.0/mateu_ui/core/mapper/fields.py +1156 -0
  63. mateu_ui-3.0.0/mateu_ui/core/mapper/layout.py +863 -0
  64. mateu_ui-3.0.0/mateu_ui/core/mapper/more_components.py +295 -0
  65. mateu_ui-3.0.0/mateu_ui/core/mapper/view.py +448 -0
  66. mateu_ui-3.0.0/mateu_ui/core/mapper/wizard.py +416 -0
  67. mateu_ui-3.0.0/mateu_ui/core/mcp.py +768 -0
  68. mateu_ui-3.0.0/mateu_ui/core/menu_route_conformance.py +55 -0
  69. mateu_ui-3.0.0/mateu_ui/core/microfrontends.py +1226 -0
  70. mateu_ui-3.0.0/mateu_ui/core/mobile_manifest.py +119 -0
  71. mateu_ui-3.0.0/mateu_ui/core/naming.py +76 -0
  72. mateu_ui-3.0.0/mateu_ui/core/nested_forms.py +200 -0
  73. mateu_ui-3.0.0/mateu_ui/core/observability.py +430 -0
  74. mateu_ui-3.0.0/mateu_ui/core/page_breadcrumbs.py +100 -0
  75. mateu_ui-3.0.0/mateu_ui/core/page_inference.py +63 -0
  76. mateu_ui-3.0.0/mateu_ui/core/page_templates.py +456 -0
  77. mateu_ui-3.0.0/mateu_ui/core/page_type_inference.py +73 -0
  78. mateu_ui-3.0.0/mateu_ui/core/partial_registry.py +239 -0
  79. mateu_ui-3.0.0/mateu_ui/core/presence.py +131 -0
  80. mateu_ui-3.0.0/mateu_ui/core/progress.py +566 -0
  81. mateu_ui-3.0.0/mateu_ui/core/project_renderer.py +113 -0
  82. mateu_ui-3.0.0/mateu_ui/core/proxy_expression.py +662 -0
  83. mateu_ui-3.0.0/mateu_ui/core/public_base.py +60 -0
  84. mateu_ui-3.0.0/mateu_ui/core/push.py +168 -0
  85. mateu_ui-3.0.0/mateu_ui/core/pwa.py +443 -0
  86. mateu_ui-3.0.0/mateu_ui/core/pwa_files/icon-192.png +0 -0
  87. mateu_ui-3.0.0/mateu_ui/core/pwa_files/icon-512.png +0 -0
  88. mateu_ui-3.0.0/mateu_ui/core/pwa_files/icon-maskable-512.png +0 -0
  89. mateu_ui-3.0.0/mateu_ui/core/pwa_files/register.js +46 -0
  90. mateu_ui-3.0.0/mateu_ui/core/pwa_files/sw-off.js +18 -0
  91. mateu_ui-3.0.0/mateu_ui/core/pwa_files/sw.js +213 -0
  92. mateu_ui-3.0.0/mateu_ui/core/reflection.py +132 -0
  93. mateu_ui-3.0.0/mateu_ui/core/registry.py +387 -0
  94. mateu_ui-3.0.0/mateu_ui/core/request_context.py +91 -0
  95. mateu_ui-3.0.0/mateu_ui/core/rest_source_registry.py +314 -0
  96. mateu_ui-3.0.0/mateu_ui/core/route_registry.py +668 -0
  97. mateu_ui-3.0.0/mateu_ui/core/routed_tabs.py +329 -0
  98. mateu_ui-3.0.0/mateu_ui/core/sample_sources.py +27 -0
  99. mateu_ui-3.0.0/mateu_ui/core/sign_in_providers.py +446 -0
  100. mateu_ui-3.0.0/mateu_ui/core/subresources.py +229 -0
  101. mateu_ui-3.0.0/mateu_ui/core/sync_handler/__init__.py +829 -0
  102. mateu_ui-3.0.0/mateu_ui/core/sync_handler/_base.py +16 -0
  103. mateu_ui-3.0.0/mateu_ui/core/sync_handler/_common.py +168 -0
  104. mateu_ui-3.0.0/mateu_ui/core/sync_handler/actions.py +309 -0
  105. mateu_ui-3.0.0/mateu_ui/core/sync_handler/app.py +535 -0
  106. mateu_ui-3.0.0/mateu_ui/core/sync_handler/contract.py +76 -0
  107. mateu_ui-3.0.0/mateu_ui/core/sync_handler/crud.py +932 -0
  108. mateu_ui-3.0.0/mateu_ui/core/sync_handler/dispatch.py +771 -0
  109. mateu_ui-3.0.0/mateu_ui/core/sync_handler/editable_view.py +293 -0
  110. mateu_ui-3.0.0/mateu_ui/core/sync_handler/grid_field.py +307 -0
  111. mateu_ui-3.0.0/mateu_ui/core/sync_handler/helpers.py +419 -0
  112. mateu_ui-3.0.0/mateu_ui/core/sync_handler/listing.py +372 -0
  113. mateu_ui-3.0.0/mateu_ui/core/sync_handler/proxy.py +387 -0
  114. mateu_ui-3.0.0/mateu_ui/core/sync_handler/render.py +92 -0
  115. mateu_ui-3.0.0/mateu_ui/core/sync_handler/search.py +718 -0
  116. mateu_ui-3.0.0/mateu_ui/core/sync_handler/undo_delete.py +33 -0
  117. mateu_ui-3.0.0/mateu_ui/core/sync_handler/wizard.py +206 -0
  118. mateu_ui-3.0.0/mateu_ui/core/titles.py +100 -0
  119. mateu_ui-3.0.0/mateu_ui/core/translations.py +264 -0
  120. mateu_ui-3.0.0/mateu_ui/core/ui_page.py +562 -0
  121. mateu_ui-3.0.0/mateu_ui/core/untrusted.py +268 -0
  122. mateu_ui-3.0.0/mateu_ui/core/uploads.py +275 -0
  123. mateu_ui-3.0.0/mateu_ui/core/url_template.py +229 -0
  124. mateu_ui-3.0.0/mateu_ui/core/user_profiles.py +76 -0
  125. mateu_ui-3.0.0/mateu_ui/core/validation.py +289 -0
  126. mateu_ui-3.0.0/mateu_ui/core/version_skew.py +207 -0
  127. mateu_ui-3.0.0/mateu_ui/core/yaml_access.py +236 -0
  128. mateu_ui-3.0.0/mateu_ui/core/yaml_app_shell.py +552 -0
  129. mateu_ui-3.0.0/mateu_ui/core/yaml_preview.py +797 -0
  130. mateu_ui-3.0.0/mateu_ui/core/yaml_spec_loader.py +708 -0
  131. mateu_ui-3.0.0/mateu_ui/dtos/__init__.py +271 -0
  132. mateu_ui-3.0.0/mateu_ui/dtos/app.py +254 -0
  133. mateu_ui-3.0.0/mateu_ui/dtos/base.py +20 -0
  134. mateu_ui-3.0.0/mateu_ui/dtos/basic.py +308 -0
  135. mateu_ui-3.0.0/mateu_ui/dtos/components.py +354 -0
  136. mateu_ui-3.0.0/mateu_ui/dtos/dashboard.py +217 -0
  137. mateu_ui-3.0.0/mateu_ui/dtos/envelope.py +300 -0
  138. mateu_ui-3.0.0/mateu_ui/dtos/fields.py +276 -0
  139. mateu_ui-3.0.0/mateu_ui/dtos/front_office.py +403 -0
  140. mateu_ui-3.0.0/mateu_ui/dtos/layout.py +200 -0
  141. mateu_ui-3.0.0/mateu_ui/dtos/more_components.py +285 -0
  142. mateu_ui-3.0.0/mateu_ui/dtos/overlays.py +117 -0
  143. mateu_ui-3.0.0/mateu_ui/dtos/records.py +392 -0
  144. mateu_ui-3.0.0/mateu_ui/dtos/ux.py +344 -0
  145. mateu_ui-3.0.0/mateu_ui/fastapi/__init__.py +1363 -0
  146. mateu_ui-3.0.0/mateu_ui/fastapi/_uploads.py +209 -0
  147. mateu_ui-3.0.0/mateu_ui/py.typed +0 -0
  148. mateu_ui-3.0.0/mateu_ui/testing/__init__.py +874 -0
  149. mateu_ui-3.0.0/mateu_ui/uidl/__init__.py +542 -0
  150. mateu_ui-3.0.0/mateu_ui/uidl/_enums.py +31 -0
  151. mateu_ui-3.0.0/mateu_ui/uidl/action_catalog.py +51 -0
  152. mateu_ui-3.0.0/mateu_ui/uidl/adapters.py +64 -0
  153. mateu_ui-3.0.0/mateu_ui/uidl/archetype_pages.py +608 -0
  154. mateu_ui-3.0.0/mateu_ui/uidl/archetypes.py +295 -0
  155. mateu_ui-3.0.0/mateu_ui/uidl/audit.py +71 -0
  156. mateu_ui-3.0.0/mateu_ui/uidl/business_components.py +46 -0
  157. mateu_ui-3.0.0/mateu_ui/uidl/class_decorators.py +917 -0
  158. mateu_ui-3.0.0/mateu_ui/uidl/components.py +2509 -0
  159. mateu_ui-3.0.0/mateu_ui/uidl/constraints.py +84 -0
  160. mateu_ui-3.0.0/mateu_ui/uidl/documents.py +81 -0
  161. mateu_ui-3.0.0/mateu_ui/uidl/editable_views.py +123 -0
  162. mateu_ui-3.0.0/mateu_ui/uidl/environments.py +35 -0
  163. mateu_ui-3.0.0/mateu_ui/uidl/export.py +130 -0
  164. mateu_ui-3.0.0/mateu_ui/uidl/feature_flags.py +19 -0
  165. mateu_ui-3.0.0/mateu_ui/uidl/field_types.py +116 -0
  166. mateu_ui-3.0.0/mateu_ui/uidl/flow.py +107 -0
  167. mateu_ui-3.0.0/mateu_ui/uidl/i18n.py +29 -0
  168. mateu_ui-3.0.0/mateu_ui/uidl/inbox_store.py +95 -0
  169. mateu_ui-3.0.0/mateu_ui/uidl/listing.py +433 -0
  170. mateu_ui-3.0.0/mateu_ui/uidl/live_header_values.py +62 -0
  171. mateu_ui-3.0.0/mateu_ui/uidl/live_notifications.py +98 -0
  172. mateu_ui-3.0.0/mateu_ui/uidl/markers.py +634 -0
  173. mateu_ui-3.0.0/mateu_ui/uidl/messages.py +220 -0
  174. mateu_ui-3.0.0/mateu_ui/uidl/method_decorators.py +397 -0
  175. mateu_ui-3.0.0/mateu_ui/uidl/more_components.py +466 -0
  176. mateu_ui-3.0.0/mateu_ui/uidl/page_templates.py +219 -0
  177. mateu_ui-3.0.0/mateu_ui/uidl/patterns.py +217 -0
  178. mateu_ui-3.0.0/mateu_ui/uidl/placement.py +124 -0
  179. mateu_ui-3.0.0/mateu_ui/uidl/presence_store.py +160 -0
  180. mateu_ui-3.0.0/mateu_ui/uidl/progress.py +238 -0
  181. mateu_ui-3.0.0/mateu_ui/uidl/push.py +177 -0
  182. mateu_ui-3.0.0/mateu_ui/uidl/remote.py +241 -0
  183. mateu_ui-3.0.0/mateu_ui/uidl/request.py +30 -0
  184. mateu_ui-3.0.0/mateu_ui/uidl/rest_sources.py +207 -0
  185. mateu_ui-3.0.0/mateu_ui/uidl/security.py +225 -0
  186. mateu_ui-3.0.0/mateu_ui/uidl/suppliers.py +398 -0
  187. mateu_ui-3.0.0/mateu_ui/uidl/uploads.py +171 -0
  188. mateu_ui-3.0.0/mateu_ui/uidl/user_profile.py +56 -0
  189. mateu_ui-3.0.0/mateu_ui/uidl/views.py +181 -0
  190. mateu_ui-3.0.0/pyproject.toml +105 -0
@@ -0,0 +1,6 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.pyc
4
+ .pytest_cache/
5
+ .coverage
6
+ .coverage.*
@@ -0,0 +1,117 @@
1
+ # Mateu server-side for Python — design
2
+
3
+ > Status: **implemented & verified**. Forms + sections + field types + validation, `Crud[T]`
4
+ > (list / detail / edit / new / save / delete), the `@app` shell + menu navigation, wizards,
5
+ > page decorations, i18n, events, security scaffolding, the tail features (tabs, stereotypes,
6
+ > KPIs, FABs, shortcuts, compact, unsaved-changes guard), and the UX-pattern components
7
+ > (MetricCard/Scoreboard/DashboardPanel/DashboardLayout, FoldoutLayout, HeroSection, EmptyState,
8
+ > Skeleton, Gantt) with the Dashboard/Foldout/ItemOverview/Welcome declarative archetypes, and
9
+ > `@auto_layout` deterministic layout inference (fold-optionals, sections-as-tabs, small-enum
10
+ > radios — the port of the Java `LayoutInference` decision table; `TabLayout` metadata carries
11
+ > `groupRelationship`/`adaptable` on the wire like `TabLayoutDto`).
12
+ > The golden-JSON tests pass; the live `showcase` view is byte-identical to the C# reference.
13
+ > Since 2026-10-10 the port is a fully supported producer (PyPI `mateu-ui`): the shared wire-
14
+ > conformance corpus is a hard gate, and every server row of the parity matrix is ✅ (see
15
+ > `doc/src/content/docs/reference/parity.md`). The engine is split by concern: `mateu_ui/core/mapper/`
16
+ > and `mateu_ui/core/sync_handler/` are packages of mixins composed into `ReflectionMapper` /
17
+ > `SyncHandler`; `mateu_ui.uidl` and `mateu_ui.dtos` are modules re-exported from their package roots.
18
+
19
+ ## 1. Guiding principle: the renderers are backend-agnostic
20
+
21
+ Every Mateu renderer speaks one protocol:
22
+
23
+ ```
24
+ POST /{baseUrl}/mateu/v3/sync/{route}
25
+ request (RunActionRq): { route, consumedRoute, actionId, serverSideType,
26
+ initiatorComponentId, componentState, appState, parameters }
27
+ response (UIIncrement): { commands[], messages[], fragments[], banners[], appendBanners,
28
+ appData, appState }
29
+ ```
30
+
31
+ So the Python task is **not** "rewrite the framework" — it is **"emit the same JSON"**. We validate
32
+ by pointing a real renderer (or the C# reference server) at the Python server and diffing the JSON for
33
+ the same view.
34
+
35
+ ## 2. Stack (decided)
36
+
37
+ - **FastAPI** (ASP.NET-minimal-API analogue) for the single `sync` route family.
38
+ - **Pydantic v2** for the wire model, using **discriminated unions** (`Field(discriminator="type")`
39
+ + a `Literal["…"]` `type` field per model) for the `type` discriminators — the Python analogue of
40
+ Java's `@JsonTypeInfo` and C#'s `[JsonPolymorphic]`/`[JsonDerivedType]`. camelCase via
41
+ `alias_generator=to_camel`; nulls kept; dump with `by_alias=True`.
42
+ - **Reflection** over user classes: type hints for fields, `Annotated[...]` metadata for field
43
+ modifiers, decorators for class/method features. Read via `inspect.get_annotations` (PEP 649-safe).
44
+
45
+ ## 3. The Python idiom: `Annotated` + decorators
46
+
47
+ C# attributes don't exist on Python attributes, so:
48
+
49
+ - **Field modifiers** ride in `Annotated[T, Marker(...)]`: `Required()`, `Section("…")`, `Tab("…")`,
50
+ `Stereotype("…")`, `Multiline()`, `Password()`, `Money()`, `PlainText()`, `HeaderBadge(...)`,
51
+ `Step(n)`, `Label("…")`.
52
+ - **Class features** are decorators: `@ui`, `@title`, `@subtitle`, `@app`, `@compact`,
53
+ `@confirm_on_navigation_if_dirty`, `@plain_text`, `@emits`, `@subscribe_to`, `@eyes_only`,
54
+ `@menu_group` (a menu folder's look: `display="cards"` opens it as a card panel — the analogue of
55
+ Java's `@Menu(display = cards)` on a group field).
56
+ - **Method features** are decorators: `@button`, `@menu_item`, `@kpi`, `@fab`, `@banner`,
57
+ `@shortcut`. Each stamps a `__mateu_*__` attribute the mapper reads. `@menu_item(group=,
58
+ description=, icon=, image=)` — a `/` in `group` nests folders, and description/icon/image are
59
+ the entry's card look (wire `MenuItem.description/icon/display/image`, mirroring
60
+ `MenuOptionDto`).
61
+
62
+ Validation reuses "a field has `Required()`" (the analogue of `@NotEmpty` / `[Required]`), enforced
63
+ server-side on CRUD save.
64
+
65
+ ## 4. Solution layout
66
+
67
+ ```
68
+ backend/python/
69
+ mateu_ui/uidl/ ← public API: decorators + field markers + Message/Crud/Wizard/Translator
70
+ mateu_ui/dtos/ ← the wire model (Pydantic): UIIncrement, Component + metadata subtypes
71
+ mateu_ui/core/ ← the engine: naming, reflection, MateuRegistry, ReflectionMapper, SyncHandler
72
+ mateu_ui/fastapi/ ← add_mateu(app, *sources): the POST /mateu/v3/sync/{route} endpoint
73
+ samples/demo/ ← a runnable FastAPI app (Person, Reservations, SignupWizard, Showcase, …)
74
+ tests/ ← golden-JSON tests (pytest) — same suite as the C# port
75
+ ```
76
+
77
+ ## 5. Mapping pipeline (mateu_ui.core)
78
+
79
+ ```
80
+ HTTP sync ─▶ MateuRegistry.resolve(serverSideType|route) ─▶ instantiate the view type
81
+ ─▶ (action?) bind componentState → set attributes → invoke the action method
82
+ ─▶ ReflectionMapper.map_view(instance) ─▶ Component tree
83
+ ─▶ wrap in UIFragment(targetComponentId=the initiator, echoed — "" for a page load) ─▶ UIIncrement
84
+ ```
85
+
86
+ - **MateuRegistry** scans the given modules/classes once for `@app`/`@ui` and resolves a request by
87
+ `serverSideType` (a stable `module.qualname`), by route, or — for CRUD sub-routes — by the longest
88
+ route prefix.
89
+ - **ReflectionMapper** is the heart: class → App/Page shell; fields → FormField metadata (type
90
+ inferred from the hint, label from `Label`/humanized name, stereotypes, options from `Enum`);
91
+ methods → buttons / KPIs / FABs / banners; `Section`/`Tab` → cards / tab strips.
92
+ - **SyncHandler** dispatches: app shell, CRUD (list/detail/edit/new + search/create/save/delete),
93
+ wizards (back/next/finish), and plain views (render or run an action → `Message` → toast).
94
+
95
+ ## 6. Validation strategy
96
+
97
+ - **Golden-JSON tests** (`tests/`) — for each sample view, assert the serialized `UIIncrement` has
98
+ the expected wire shape (ignoring volatile bits like the random SSC id). Same assertions as the C#
99
+ suite.
100
+ - **Live diff** — run the demo on `:8594` and diff its JSON against the C# reference on `:8593` for
101
+ the same view. The `showcase` view (tabs + stereotypes + KPIs + FABs + shortcut + compact + dirty
102
+ guard) is byte-identical apart from the (demo-level) `serverSideType` name.
103
+
104
+ ## 7. Beyond the core
105
+
106
+ **Static bundles (`mateu_ui.bundle`).** The exporter is a client of the sync handler, never a
107
+ second renderer: it sends each route the two loads a browser would (fresh, consumed `_empty` →
108
+ the shell aimed at the route; then the shell's content load) and stores the answers, so a bundle
109
+ cannot drift from what the server serves. Two server rules exist for it: `${i18n.…}` stays raw
110
+ inside `translations.raw_expressions()` (the browser resolves it per visitor from the shipped
111
+ catalogue), and the empty (echoed) target is cleared (the browser re-targets an untargeted
112
+ fragment at whoever asked). `static_safety.py` ports Java's `StaticSafetyCheck` rule for rule;
113
+ `inliner.py` its `DefinitionInliner`; `writer.py` the Maven plugin's `BundleWriter` (reusing
114
+ `ui_page`, `pwa`, `mobile_manifest`). Held to Java's manifest by `conformance/bundle`.
115
+
116
+ The remaining Java features (component adapters, federated microfrontends, framework adapters,
117
+ SSE/AI chat) follow the same pattern: add a metadata DTO, extend the mapper, add a golden test.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2016-2026 Miguel Pérez Colom
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
mateu_ui-3.0.0/NOTICE ADDED
@@ -0,0 +1,65 @@
1
+ Mateu
2
+ Copyright 2016-2026 Miguel Pérez Colom
3
+
4
+ This product is licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this project except in compliance with the License. A copy of
6
+ the License is provided in LICENSE.txt and at:
7
+
8
+ https://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ ------------------------------------------------------------------------------
11
+ Third-party components
12
+ ------------------------------------------------------------------------------
13
+
14
+ The Redwood / Visual Builder renderer (frontend/web/monorepo/apps/redwood)
15
+ integrates with Oracle JET (Universal Permissive License 1.0) and loads Oracle
16
+ Spectra / Visual Builder Runtime from Oracle's CDN. Those components are NOT
17
+ part of this project and are NOT relicensed here; see
18
+ frontend/web/monorepo/apps/redwood/NOTICE.md for details. The renderer jar
19
+ (io.mateu:mateu-redwood) contains only Mateu code: it vendors nothing from
20
+ Oracle's CDN and no file of the Visual Builder starter template or of its
21
+ build tooling's output markup (its page is written by Mateu's own build
22
+ script, which reads only CDN urls and configuration values off the VB build).
23
+
24
+ All other renderers and the Mateu runtime, annotations, wire DTOs, generated
25
+ schemas and tooling are licensed under Apache License 2.0.
26
+
27
+ The web renderer bundles (the io.mateu:mateu-vaadin jar) include third-party
28
+ open-source packages under permissive licences (MIT, BSD, Apache-2.0, ISC and
29
+ similar); scripts/check-frontend-licenses.mjs lists the approved licences and
30
+ fails the build on any other, so no commercially licensed component is shipped.
31
+ Their copyright and licence notices travel next to the bundle, in
32
+ THIRD-PARTY-LICENSES.txt (static/assets/ in the jar, dist/assets/ in the
33
+ mateu-vaadin npm package, assets/ of the visual editor embedded in the IDE
34
+ plugins), generated from the dependency tree by scripts/third-party-notices.mjs.
35
+ One of them carries a condition:
36
+
37
+ bpmn-js (Camunda Services GmbH, bpmn.io License): MIT terms plus the
38
+ requirement that the bpmn.io watermark shown on rendered diagrams stays fully
39
+ visible and is not removed, changed or overlapped. Mateu's BPMN component
40
+ keeps it as bpmn-js renders it.
41
+
42
+ The Mateu desktop app installers (built on CI from
43
+ frontend/app/intellij-plugin, `buildInstaller`) redistribute IntelliJ IDEA
44
+ Open Source (the open-source IntelliJ IDEA built from
45
+ https://github.com/JetBrains/intellij-community, which replaced IntelliJ IDEA
46
+ Community Edition from 2025.3 on), Copyright (C) JetBrains s.r.o., licensed
47
+ under the Apache License, Version 2.0, as JetBrains publishes it on that
48
+ repository's GitHub Releases. The installers repackage that distribution with the
49
+ Mateu plugin preinstalled and their own name, icon, launcher and settings
50
+ (IntelliJ's own update checks are switched off); its code is not modified. It
51
+ ships with the JetBrains Runtime (a build of OpenJDK, GPLv2 with the
52
+ Classpath Exception) and the third-party libraries it bundles, each under its
53
+ own licence; their notices travel inside the distribution (LICENSE.txt,
54
+ NOTICE.txt and the license/ directory). IntelliJ, IntelliJ IDEA and JetBrains
55
+ are trademarks of JetBrains s.r.o.; the Mateu desktop app is not a JetBrains
56
+ product and is not endorsed by JetBrains. The Mateu plugin itself (the
57
+ io.mateu.ijp code) is Mateu code under Apache License 2.0.
58
+
59
+ The IntelliJ plugin (and so the desktop app) bundles two pure-Java libraries,
60
+ each under its own permissive licence: ZXing core (QR codes; Apache License
61
+ 2.0) and JSVG by Jannis Weis (SVG images; MIT License).
62
+
63
+ The Map component draws OpenStreetMap tiles by default (map data
64
+ © OpenStreetMap contributors, ODbL). The public OSM tile servers are not meant
65
+ for heavy production traffic: deployments should configure their own provider.