@elurjs/universal 0.1.7 → 0.1.9

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.
@@ -40,7 +40,7 @@ Nota de encaje: el Apéndice I no se edita a mano — lo genera
40
40
  `check-doc-sync` desde los `doc` de `HOST_CALLS`, `HOST_CHANNELS` y las
41
41
  obligaciones de `src/backends/native/hostAbi.ts`. El barrido de
42
42
  palabras clave aterrizaría en esa fuente (y en las frases de §J.6 en
43
- `v5-src/`), no en el PDF.
43
+ `v6-src/`), no en el PDF.
44
44
 
45
45
  ## 2. Cómo se vería en Elur
46
46
 
@@ -318,5 +318,5 @@ Por razón riesgo/esfuerzo, no por severidad abstracta:
318
318
  los ficheros aterrizaran); regenerado con `bun run gen:doc-data` —
319
319
  Ap. C del documento cubre 0184–0187 en el próximo `build:spec`.
320
320
  - `check-doc-sync --write` reinyectó los bloques docgen stale de
321
- `v5-src/` (adr-range/adr-registry, parity-runs/lanes, test-counts,
321
+ `v6-src/` (adr-range/adr-registry, parity-runs/lanes, test-counts,
322
322
  cli) — el gate vuelve a verde.
@@ -34,7 +34,7 @@ relacionados.
34
34
 
35
35
  ---
36
36
 
37
- ## 1. Qué pide el estándar (v5.16)
37
+ ## 1. Qué pide el estándar (v6.0)
38
38
 
39
39
  - §5.6/§6.4: `renderPolicy:"custom"` por componente — el camino Skia es
40
40
  opt-in; `canvas` ya pinta por `libelur-skia.so` (ADR-0123, raster CPU,
@@ -80,7 +80,7 @@ Estado real de las piezas compartidas:
80
80
 
81
81
  ## 3. Arquitectura propuesta — dónde vive cada pieza
82
82
 
83
- ```
83
+ ```text
84
84
  JS (backends/native) ──ops DL──► ElurBridge.flush/flushBinary/flushOps
85
85
  │
86
86
  ┌───────────────────────┴───────────────────────┐
@@ -144,7 +144,7 @@ props ya serializadas, sin ops nuevas:
144
144
  | `list`/`native-list` | ventana virtual propia | §4.5 |
145
145
  | `scroll` | transform de subárbol + clip | §4.4 |
146
146
  | `canvas` | el path ADR-0123 existente se funde aquí | draw-list in-line en el frame |
147
- | `platform-view` | **no pinta Skia** → overlay real (§5) |
147
+ | `platform-view` | **no pinta Skia** → overlay real (§5) | — |
148
148
 
149
149
  Retained mode: la tanda de ops muta el árbol; `requestFrame`/`Choreographer`
150
150
  dispara un solo render por vsync — el walk dibuja solo la sub-región
@@ -273,7 +273,7 @@ El gate exige Graphite→Ganesh automático. La lib tiene ambos backends
273
273
  compilados; la selección es runtime y el orden depende de la
274
274
  plataforma:
275
275
 
276
- ```
276
+ ```text
277
277
  Android: Graphite/Vulkan (API 26+ cobertura) → Ganesh GL → raster CPU
278
278
  iOS: Graphite/Metal (CAMetalLayer) → raster CPU (Ganesh GL
279
279
  solo vía ANGLE/GL interop — no nativo en iOS moderno)
@@ -293,7 +293,7 @@ citén qué backend midieron — el PoC midió Ganesh 0.5 % jank vs
293
293
  ### 4.11 El mismo diseño por plataforma — la costura del vtable
294
294
 
295
295
  Todo lo de §4.x vive en `native/` y corre igual en cualquier target;
296
- lo que cambia por SO es **el glue de targets/<p>/** (la misma
296
+ lo que cambia por SO es **el glue de `targets/<p>/`** (la misma
297
297
  partición que ya gobierna `targets-nativos-nuevos.md` — por eso el
298
298
  diseño sirve igual para iOS el día que exista):
299
299
 
@@ -424,7 +424,7 @@ moverse con el scrollOffset del nativo — listener por frame barato).
424
424
  `password` en el painter (stepper UTF-8 en el árbol — sin glib).
425
425
  - [x] IME delegado al nodo (2026-10-18): `GtkIMMulticontext` propio
426
426
  del applicator — commit → muta `props["value"]` del nodo enfocado
427
- + remide + repinta + eventos `input`/composition (la interfaz
427
+ → remide, repinta y eventos `input`/composition (la interfaz
428
428
  `org.a11y.atspi.EditableText` queda restringida a
429
429
  `GTK_IS_EDITABLE` → gap declarado de plataforma para accs
430
430
  virtuales: la escritura por AT pasa por el IMContext real; la
@@ -70,6 +70,32 @@ así aparecen, dilo al usuario en vez de improvisar con el CLI.
70
70
  actualizan solos; la barra de estado de la app muestra `rev=N+1` y
71
71
  `Ed25519 OK`.
72
72
 
73
+ ## A2UI: versiones (v0.9 / v1.0)
74
+
75
+ El renderer soporta ambos dialectos y los detecta **por superficie**:
76
+ pon `version: "1.0"` en tus mensajes (o `catalogId` con `v1_0` en
77
+ `createSurface`); sin pistas se asume **0.9**. Si generas directivas
78
+ `@path`/`@call` sin declarar la versión, se interpretan como literales
79
+ y la UI sale vacía o sin binding — declara siempre la versión que
80
+ estás escribiendo.
81
+
82
+ En v1.0:
83
+
84
+ - Directivas dinámicas: `{"@path":"/x"}`, `{"@call":"fn","args":{}}`,
85
+ `{"@index":{}}` (solo en templates de colección).
86
+ - `{path}`/`{call}` **sin prefijo son literales**, no bindings — el
87
+ error silencioso más común. Para un `@` literal usa `@@`.
88
+ - Mixins del componente van prefijados: `@checks`, `@accessibility`,
89
+ `@catalogId`, `@metadata`.
90
+ - `updateDataModel` exige `value` siempre; `value:null` **borra** la
91
+ entrada (en 0.9 `null` se asigna literal).
92
+ - `createSurface` puede llevar `components` + `dataModel` inline
93
+ (superficie completa en un mensaje).
94
+ - Los bindings two-way (`value:{path:"/x"}`) aceptan ambas formas.
95
+
96
+ En 0.9 sigue la forma clásica `{path}`/`{call}`/`checks` sin prefijo.
97
+ No mezcles catálogos de versiones distintas en una misma superficie.
98
+
73
99
  ## A2UI: parche O(1) vs remount
74
100
 
75
101
  - `createSurface` → crea la superficie (una vez).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elurjs/universal",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
package/src/ir/catalog.ts CHANGED
@@ -60,7 +60,7 @@ export const ELEMENT_CATALOG: Readonly<Record<IRNodeType, {
60
60
  web: "`<input type=range>`",
61
61
  android: "`SeekBar`",
62
62
  linux: "`GtkScale`",
63
- windows: "— (caja genérica; slider sin wiring)",
63
+ windows: "`Slider` (min/max/value verificado UIA)",
64
64
  },
65
65
  "scroll-view": {
66
66
  web: "`<div>` overflow",
package/src/ir/schema.ts CHANGED
@@ -718,13 +718,13 @@ export const PROPS_CAPABILITY: Readonly<Record<string, CapabilityEntry>> = {
718
718
  min: {
719
719
  web: "approx", android: "exact", linux: "exact",
720
720
  windows: "approx",
721
- note: "web: propiedad DOM genérica (input range); windows: Slider.Minimum cableado; slider interactivo verificado en retail 26H2",
721
+ note: "web: propiedad DOM genérica (input range); windows: Slider.Minimum cableado; slider interactivo verificado en Win11 empaquetado (2026-11-19)",
722
722
  divergence: { class: "aproximacion", adr: "doc:v4.1 §6.2.2" },
723
723
  },
724
724
  max: {
725
725
  web: "approx", android: "exact", linux: "exact",
726
726
  windows: "approx",
727
- note: "web: propiedad DOM genérica (input range); windows: Slider.Maximum cableado; slider interactivo verificado en retail 26H2",
727
+ note: "web: propiedad DOM genérica (input range); windows: Slider.Maximum cableado; slider interactivo verificado en Win11 empaquetado (2026-11-19)",
728
728
  divergence: { class: "aproximacion", adr: "doc:v4.1 §6.2.2" },
729
729
  },
730
730
  src: { web: "exact", android: "exact", linux: "exact",
@@ -43,6 +43,8 @@ export const SEMANTIC_PROPS: Readonly<Record<SemanticKey, {
43
43
  android: string;
44
44
  /** Host GTK4 → GtkAccessible / AT-SPI (ADR-0171). */
45
45
  linux: string;
46
+ /** Host WinUI 3 → AutomationProperties / peer ElurA11y (ADR-0220). */
47
+ windows: string;
46
48
  }>> = {
47
49
  // Nombre accesible del nodo — TalkBack/VoiceOver/screen reader lo
48
50
  // leen en lugar del contenido.
@@ -50,12 +52,14 @@ export const SEMANTIC_PROPS: Readonly<Record<SemanticKey, {
50
52
  web: "img → alt; resto → aria-label",
51
53
  android: "View.contentDescription",
52
54
  linux: "GTK_ACCESSIBLE_PROPERTY_LABEL (en `text`, GtkLabel usa su propio texto — aprox)",
55
+ windows: "AutomationProperties.SetName (UIA Name — verificado UIA Win10 22H2 + Win11 empaquetado)",
53
56
  },
54
57
  // false saca al nodo del árbol de a11y (decorativo); default = true.
55
58
  accessible: {
56
59
  web: "false → aria-hidden=\"true\"",
57
60
  android: "IMPORTANT_FOR_ACCESSIBILITY_NO / YES",
58
61
  linux: "false → accessible-role NONE (fuera del árbol AT); true restaura el rol",
62
+ windows: "AutomationProperties.SetAccessibilityView (false → Raw, fuera del árbol UIA; true → Control)",
59
63
  },
60
64
  // Rol a11y declarado (button, header, img, link…) — distinto del
61
65
  // tipo visual del nodo: un <row> con role="button" se anuncia como
@@ -64,6 +68,7 @@ export const SEMANTIC_PROPS: Readonly<Record<SemanticKey, {
64
68
  web: "atributo role",
65
69
  android: "AccessibilityNodeInfoCompat.roleDescription",
66
70
  linux: "accessible-role por instancia + ROLE_DESCRIPTION con el nombre ARIA",
71
+ windows: "AutomationProperties.SetLocalizedControlType + HeadingLevel en text h1-h6",
67
72
  },
68
73
  // Región viva: los cambios de texto se anuncian solos.
69
74
  // "polite" (espera silencio) | "assertive" (interrumpe).
@@ -71,6 +76,7 @@ export const SEMANTIC_PROPS: Readonly<Record<SemanticKey, {
71
76
  web: "aria-live",
72
77
  android: "View.accessibilityLiveRegion (1=polite, 2=assertive)",
73
78
  linux: "gtk_accessible_announce al cambiar el texto (polite/assertive)",
79
+ windows: "AutomationProperties.SetLiveSetting (polite/assertive → evento UIA LiveRegionChanged)",
74
80
  },
75
81
  // Estado marcado — materializa widget Y a11y (ADR-0117): un
76
82
  // CompoundButton marcado se anuncia "checked" sin trabajo extra.
@@ -81,11 +87,13 @@ export const SEMANTIC_PROPS: Readonly<Record<SemanticKey, {
81
87
  web: "input → .checked (a11y nativa; \"mixed\" → indeterminate); resto → aria-checked",
82
88
  android: "CompoundButton.isChecked + nodeInfo.checkable/checked; \"mixed\" → stateDescription",
83
89
  linux: "GtkSwitch.active + GTK_ACCESSIBLE_STATE_CHECKED (\"mixed\" → tristate nativo)",
90
+ windows: "IsOn/IsChecked del control → patrón Toggle UIA (\"mixed\" → indeterminate)",
84
91
  },
85
92
  selected: {
86
93
  web: "aria-selected",
87
94
  android: "View.isSelected",
88
95
  linux: "GTK_ACCESSIBLE_STATE_SELECTED",
96
+ windows: "peer ElurA11y → patrón SelectionItem",
89
97
  },
90
98
  // disabled=true también bloquea interacción — es la semántica a11y
91
99
  // correcta (un nodo deshabilitado no recibe foco ni eventos).
@@ -93,12 +101,14 @@ export const SEMANTIC_PROPS: Readonly<Record<SemanticKey, {
93
101
  web: "aria-disabled + atributo disabled en form elements",
94
102
  android: "View.isEnabled = !v",
95
103
  linux: "gtk_widget_set_sensitive + GTK_ACCESSIBLE_STATE_DISABLED",
104
+ windows: "Control.IsEnabled = !v + IsHitTestVisible (UIA lo hereda del control)",
96
105
  },
97
106
  // Descripción auxiliar anunciada tras el label (placeholder-like).
98
107
  hint: {
99
108
  web: "input/textarea → aria-placeholder; resto → aria-description",
100
109
  android: "nodeInfo.hintText",
101
110
  linux: "GTK_ACCESSIBLE_PROPERTY_DESCRIPTION",
111
+ windows: "AutomationProperties.SetHelpText (UIA HelpText)",
102
112
  },
103
113
  // Foco programático: true toma foco (también a11y en android), false
104
114
  // lo libera; null no-op.
@@ -106,11 +116,13 @@ export const SEMANTIC_PROPS: Readonly<Record<SemanticKey, {
106
116
  web: "el.focus() / el.blur()",
107
117
  android: "requestFocus() / clearFocus()",
108
118
  linux: "gtk_widget_grab_focus / gtk_root_set_focus(NULL)",
119
+ windows: "Focus(Programmatic) del control interno (difere a Loaded si el nodo aún no está en el árbol)",
109
120
  },
110
121
  focusable: {
111
122
  web: "tabindex=0 | -1; null retira",
112
123
  android: "View.isFocusable",
113
124
  linux: "gtk_widget_set_focusable; null → default del widget",
125
+ windows: "IsTabStop del control interno",
114
126
  },
115
127
  // ADR-0152 — estado expandido/colapsado (acordeón, disclosure).
116
128
  // Android no tiene flag de expanded en nodeInfo <API36: el
@@ -121,6 +133,7 @@ export const SEMANTIC_PROPS: Readonly<Record<SemanticKey, {
121
133
  web: "aria-expanded",
122
134
  android: "nodeInfo.addAction(ACTION_EXPAND|ACTION_COLLAPSE) → evento `action`",
123
135
  linux: "GTK_ACCESSIBLE_STATE_EXPANDED",
136
+ windows: "peer ElurA11y → patrón ExpandCollapse",
124
137
  },
125
138
  // Estado de validación. Android materializa el flag nativo
126
139
  // (TalkBack anuncia "invalid"); el texto del error es contenido
@@ -129,6 +142,7 @@ export const SEMANTIC_PROPS: Readonly<Record<SemanticKey, {
129
142
  web: "aria-invalid",
130
143
  android: "nodeInfo.setContentInvalid(on)",
131
144
  linux: "GTK_ACCESSIBLE_STATE_INVALID (true/grammar/spelling)",
145
+ windows: "AutomationProperties.SetIsDataValidForForm(!v) (≡ aria-invalid)",
132
146
  },
133
147
  // Campo obligatorio. Android no tiene flag → aproximación por
134
148
  // stateDescription localizada (elur_a11y_required).
@@ -136,6 +150,7 @@ export const SEMANTIC_PROPS: Readonly<Record<SemanticKey, {
136
150
  web: "aria-required + atributo required en input/textarea/select",
137
151
  android: "nodeInfo.stateDescription (aprox — sin flag nativo)",
138
152
  linux: "GTK_ACCESSIBLE_PROPERTY_REQUIRED",
153
+ windows: "AutomationProperties.SetIsRequiredForForm",
139
154
  },
140
155
  // Rango accesible para widgets CUSTOM (slider de estrellas, etc.) —
141
156
  // los nativos (SeekBar/input range) ya lo exponen solos. Android
@@ -145,16 +160,19 @@ export const SEMANTIC_PROPS: Readonly<Record<SemanticKey, {
145
160
  web: "aria-valuemin",
146
161
  android: "nodeInfo.rangeInfo.min (RangeInfoCompat — requiere min+max+now)",
147
162
  linux: "GTK_ACCESSIBLE_PROPERTY_VALUE_MIN",
163
+ windows: "peer ElurA11y → patrón RangeValue (min)",
148
164
  },
149
165
  valueMax: {
150
166
  web: "aria-valuemax",
151
167
  android: "nodeInfo.rangeInfo.max (RangeInfoCompat — requiere min+max+now)",
152
168
  linux: "GTK_ACCESSIBLE_PROPERTY_VALUE_MAX",
169
+ windows: "peer ElurA11y → patrón RangeValue (max)",
153
170
  },
154
171
  valueNow: {
155
172
  web: "aria-valuenow",
156
173
  android: "nodeInfo.rangeInfo.current (RangeInfoCompat — requiere min+max+now)",
157
174
  linux: "GTK_ACCESSIBLE_PROPERTY_VALUE_NOW",
175
+ windows: "peer ElurA11y → patrón RangeValue (current)",
158
176
  },
159
177
  // Texto del valor ("3 de 5 estrellas") — para rangos cuyo número
160
178
  // crudo no se explica solo. Android lo compone en stateDescription.
@@ -162,6 +180,7 @@ export const SEMANTIC_PROPS: Readonly<Record<SemanticKey, {
162
180
  web: "aria-valuetext",
163
181
  android: "nodeInfo.stateDescription (aprox — TalkBack lo lee como estado)",
164
182
  linux: "GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT",
183
+ windows: "peer ElurA11y → patrón Value (texto del valor)",
165
184
  },
166
185
  // Acciones a11y personalizadas: CSV "id|Etiqueta" (label opcional —
167
186
  // sin `|` la etiqueta es el id). La app enlaza el handler con el
@@ -173,6 +192,7 @@ export const SEMANTIC_PROPS: Readonly<Record<SemanticKey, {
173
192
  web: "sin equivalente DOM (evento `elur:action` sí enlaza)",
174
193
  android: "nodeInfo.addAction(AccessibilityActionCompat) → performAccessibilityAction → `action`",
175
194
  linux: "GAction por instancia (muxer del widget, grupo 'elur') → AT-SPI Action.DoAction → `action` — AT anuncia 'elur.<id>', sin canal para la etiqueta (ADR-0190)",
195
+ windows: "sin canal UIA por instancia — gap declarado (acciones custom por peer pendiente)",
176
196
  },
177
197
  };
178
198