@elurjs/universal 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/NOTICE +24 -0
- package/README.md +102 -2
- package/THIRD_PARTY_NOTICES.md +153 -0
- package/cli/.gitkeep +0 -0
- package/cli/build-spec.mjs +46 -0
- package/cli/build-ssg.mjs +145 -0
- package/cli/build-ssr.mjs +276 -0
- package/cli/check-divergences.mjs +135 -0
- package/cli/check-doc-sync.mjs +282 -0
- package/cli/commands.d.mts +8 -0
- package/cli/commands.mjs +124 -0
- package/cli/commit-present.py +157 -0
- package/cli/create-app.mjs +768 -0
- package/cli/debug.mjs +45 -0
- package/cli/dev.mjs +488 -0
- package/cli/doctor.mjs +197 -0
- package/cli/elur.mjs +394 -0
- package/cli/font-license.mjs +24 -0
- package/cli/gen-bundle.mjs +195 -0
- package/cli/gen-doc-data.mjs +274 -0
- package/cli/gen-es5.mjs +60 -0
- package/cli/gen-hbc.mjs +87 -0
- package/cli/gen-host-integration.mjs +386 -0
- package/cli/gen-i18n-corpus.mjs +47 -0
- package/cli/gen-manifest.mjs +95 -0
- package/cli/gen-qjsc.mjs +77 -0
- package/cli/gen-route-types.mjs +65 -0
- package/cli/gen-routes.mjs +129 -0
- package/cli/gen-signals.mjs +151 -0
- package/cli/gen-ssr-client.mjs +119 -0
- package/cli/gen-wire-codec.mjs +214 -0
- package/cli/gen-wire-corpus.mjs +318 -0
- package/cli/gen-worklet-src.mjs +200 -0
- package/cli/gen-zones.mjs +197 -0
- package/cli/hermes-pair.mjs +61 -0
- package/cli/inspect.mjs +55 -0
- package/cli/layout-oracle-web.mjs +213 -0
- package/cli/layout-oracle.mjs +80 -0
- package/cli/lib-vlq.mjs +84 -0
- package/cli/measure-engines.mjs +206 -0
- package/cli/measure-shared.mjs +143 -0
- package/cli/package-linux.mjs +440 -0
- package/cli/parity-align.mjs +66 -0
- package/cli/platform-plugin.ts +97 -0
- package/cli/plugin-manifest.mjs +573 -0
- package/cli/run-bench.mjs +291 -0
- package/cli/run-commit-present.sh +91 -0
- package/cli/run-device-ab-surface.sh +94 -0
- package/cli/run-device-ab.sh +107 -0
- package/cli/run-energy.sh +44 -0
- package/cli/run-parity.mjs +164 -0
- package/cli/run-semantics.mjs +111 -0
- package/cli/run-tck.mjs +243 -0
- package/cli/sdui.mjs +1211 -0
- package/cli/symbolicate.mjs +90 -0
- package/cli/tck-android.sh +21 -0
- package/cli/tck-events-android.mjs +101 -0
- package/cli/tck-linux-atspi.py +389 -0
- package/cli/tck-platform-linux.mjs +638 -0
- package/cli/tck-platform.mjs +510 -0
- package/cli/visual-parity.mjs +691 -0
- package/docs/AUDITORIA-STATE-OF-THE-ART-2026-11.md +981 -0
- package/docs/ESTADO.md +679 -0
- package/docs/IMPLEMENTACION-NATIVA-v5.md +507 -0
- package/docs/PENDIENTES.md +1306 -0
- package/docs/adr/0013-transiciones-navegacion.md +169 -0
- package/docs/adr/0014-list-renderitem-factory.md +41 -0
- package/docs/adr/0015-dl-header-versionado.md +57 -0
- package/docs/adr/0016-hermes-v1-runtime.md +78 -0
- package/docs/adr/0017-encoder-nativo-dl.md +62 -0
- package/docs/adr/0018-yoga-tree-nativo.md +78 -0
- package/docs/adr/0019-ssr-universal-hidratacion.md +245 -0
- package/docs/adr/0020-canvas-draw-list.md +65 -0
- package/docs/adr/0021-text-input-props.md +55 -0
- package/docs/adr/0022-deep-links.md +49 -0
- package/docs/adr/0023-animacion-declarativa.md +130 -0
- package/docs/adr/0024-estilos-reactivos-vocabulario.md +100 -0
- package/docs/adr/0025-worklets-contrato-runner.md +181 -0
- package/docs/adr/0026-threading-js-dedicado.md +94 -0
- package/docs/adr/0027-ui-array-children-y-scope-por-fila.md +58 -0
- package/docs/adr/0028-commit-por-frame-en-host-embebido.md +93 -0
- package/docs/adr/0029-render-commit-latest-wins-screenhost.md +62 -0
- package/docs/adr/0030-destruccion-recursiva-ids-monotonicos.md +79 -0
- package/docs/adr/0031-scopes-formales-pool-filas.md +76 -0
- package/docs/adr/0032-nav-commit-autoritativo.md +64 -0
- package/docs/adr/0033-lista-virtual-ventana.md +80 -0
- package/docs/adr/0034-attach-event-class-strict-styles.md +89 -0
- package/docs/adr/0035-pipeline-imagenes-acotado.md +133 -0
- package/docs/adr/0036-data-por-entry-spa.md +91 -0
- package/docs/adr/0037-ir-serializable-factories-por-id.md +73 -0
- package/docs/adr/0038-transform-keys-compositor.md +79 -0
- package/docs/adr/0039-destroy-postorder-scope-ownership.md +86 -0
- package/docs/adr/0040-outbound-barriers-overflow-ack.md +60 -0
- package/docs/adr/0041-diff-treap-ir-version-strict.md +65 -0
- package/docs/adr/0042-data-endpoint-seguridad-hasloader.md +67 -0
- package/docs/adr/0043-aplicador-dom-unico.md +70 -0
- package/docs/adr/0044-descriptor-runtime-explicito.md +80 -0
- package/docs/adr/0045-navstate-versionado-scroll-settle.md +72 -0
- package/docs/adr/0046-harness-build-fail-closed.md +99 -0
- package/docs/adr/0047-envelope-evento-normalizado.md +110 -0
- package/docs/adr/0048-sesion-embebida-estados.md +91 -0
- package/docs/adr/0049-strict-styles-valores-portables.md +78 -0
- package/docs/adr/0050-update-style-tipado-abi-v5.md +66 -0
- package/docs/adr/0051-plugin-sdk-comandos.md +65 -0
- package/docs/adr/0052-benchmarks-reproducibles.md +50 -0
- package/docs/adr/0053-fling-target-pool-estructural.md +105 -0
- package/docs/adr/0054-lista-nativa-render-policy.md +130 -0
- package/docs/adr/0055-cesm-core.md +143 -0
- package/docs/adr/0056-dos-ejes-superficie-vs-propietario-de-ventana.md +112 -0
- package/docs/adr/0057-reset-node-y-firma-de-reciclaje.md +95 -0
- package/docs/adr/0058-rollback-de-montaje.md +83 -0
- package/docs/adr/0059-traza-on-device-u01-y-scroll-unico-productor.md +89 -0
- package/docs/adr/0060-list-update-patch-por-campo.md +73 -0
- package/docs/adr/0061-elegibilidad-de-plantilla-nativa.md +70 -0
- package/docs/adr/0062-invalidacion-adapter-lista-nativa.md +77 -0
- package/docs/adr/0063-autoridad-eventos-y-scroll.md +66 -0
- package/docs/adr/0064-admision-unica-de-commits.md +66 -0
- package/docs/adr/0065-runtime-de-sesion-u11.md +97 -0
- package/docs/adr/0066-perfil-layout-y-safe-area.md +78 -0
- package/docs/adr/0067-sesion-robusta-y-procedencia-de-build.md +121 -0
- package/docs/adr/0068-metodologia-de-benchmark-y-carril-verificable.md +94 -0
- package/docs/adr/0069-schema-de-wire-y-corpus-comun-de-codecs.md +126 -0
- package/docs/adr/0070-modelo-publico-de-aplicacion-y-mount.md +91 -0
- package/docs/adr/0071-image-service-y-tck-de-plataforma.md +133 -0
- package/docs/adr/0072-par-compilador-runtime-hermes.md +62 -0
- package/docs/adr/0073-corpus-de-semantica-y-lowering-por-motor.md +67 -0
- package/docs/adr/0074-perfil-i18n-formateo-dom-free.md +85 -0
- package/docs/adr/0075-back-predictivo-restore-y-layout-adaptativo.md +126 -0
- package/docs/adr/0076-contrato-de-modulos-capa-1.md +159 -0
- package/docs/adr/0077-manifest-de-plugin-y-plugin-sync.md +109 -0
- package/docs/adr/0078-extraccion-de-i18n-a-paquete-propio.md +114 -0
- package/docs/adr/0079-handles-de-host-objects-por-epoch.md +96 -0
- package/docs/adr/0080-platform-views-por-contrato.md +93 -0
- package/docs/adr/0081-codegen-del-dsl-de-modulos.md +118 -0
- package/docs/adr/0082-variante-web-de-modulos-nativos.md +126 -0
- package/docs/adr/0083-perfiles-dev-release.md +92 -0
- package/docs/adr/0084-instrumentacion-acotada-exportable.md +126 -0
- package/docs/adr/0085-medicion-agrupada-en-main.md +125 -0
- package/docs/adr/0086-matriz-capacidades-props-eventos.md +75 -0
- package/docs/adr/0087-uithread-runner-android.md +271 -0
- package/docs/adr/0088-worklet-src-estatico.md +82 -0
- package/docs/adr/0089-composicion-animaciones-settle-drag.md +122 -0
- package/docs/adr/0090-linter-capturas-build.md +94 -0
- package/docs/adr/0091-router-core-vs-universal.md +74 -0
- package/docs/adr/0092-sharedregion-type-strings.md +59 -0
- package/docs/adr/0093-permission-request-estandar.md +52 -0
- package/docs/adr/0094-dispatch-worker-timeoutms.md +51 -0
- package/docs/adr/0095-tck-modulos.md +65 -0
- package/docs/adr/0096-cesm-ring-deferral.md +47 -0
- package/docs/adr/0097-tooling-diferido.md +51 -0
- package/docs/adr/0098-handshake-moduleabi.md +46 -0
- package/docs/adr/0099-modulos-ambient.md +58 -0
- package/docs/adr/0100-auto-declaracion-modulos.md +43 -0
- package/docs/adr/0101-plataforma-build.md +49 -0
- package/docs/adr/0102-permisos-manifest-build.md +38 -0
- package/docs/adr/0103-registrant-ownership.md +45 -0
- package/docs/adr/0104-toolchain-release.md +125 -0
- package/docs/adr/0105-cesm-ring-mode.md +71 -0
- package/docs/adr/0106-module-observabilidad.md +100 -0
- package/docs/adr/0107-layout-l1-oraculo.md +67 -0
- package/docs/adr/0108-semantica-como-ops.md +69 -0
- package/docs/adr/0109-text-input-composition.md +64 -0
- package/docs/adr/0110-yoga-3-2.md +63 -0
- package/docs/adr/0111-hot-reload-con-estado.md +92 -0
- package/docs/adr/0112-metricas-nativas-reales.md +65 -0
- package/docs/adr/0113-cesm-proyeccion-ampliada.md +80 -0
- package/docs/adr/0114-androidx-deps.md +72 -0
- package/docs/adr/0115-coil-imagenes.md +57 -0
- package/docs/adr/0116-precomputed-text-off-ui.md +49 -0
- package/docs/adr/0117-a11y-state-hint-foco.md +54 -0
- package/docs/adr/0118-yoga-3-2-vocabulario.md +98 -0
- package/docs/adr/0119-codecs-wire-desde-esquema.md +86 -0
- package/docs/adr/0120-unidades-logicas-pointscalefactor.md +73 -0
- package/docs/adr/0121-yoga-filas-lista.md +100 -0
- package/docs/adr/0122-delegado-layout-subarbol.md +140 -0
- package/docs/adr/0123-canvas-sobre-skia-raster.md +101 -0
- package/docs/adr/0124-evaluacion-taffy-css-grid.md +52 -0
- package/docs/adr/0125-paridad-visual-android.md +89 -0
- package/docs/adr/0126-documento-web-metadata-enlaces.md +52 -0
- package/docs/adr/0127-perfil-l1-shorthand-flex-herencia-texto.md +70 -0
- package/docs/adr/0128-pantalla-llena-fragmentos-transparentes.md +56 -0
- package/docs/adr/0129-content-visibility-canvas-unidades-logicas.md +37 -0
- package/docs/adr/0130-expresiones-reactivas-ui.md +55 -0
- package/docs/adr/0131-state-style.md +59 -0
- package/docs/adr/0132-create-theme-system-color-scheme.md +58 -0
- package/docs/adr/0133-navegacion-rutas-href-chrome.md +59 -0
- package/docs/adr/0134-servicios-ambient-modulos-timers.md +63 -0
- package/docs/adr/0135-registro-fuentes.md +67 -0
- package/docs/adr/0136-i18n-zonas-dst-locale-reactivo.md +70 -0
- package/docs/adr/0137-ssg-universal.md +78 -0
- package/docs/adr/0138-plantillas-fila-ui-rowref.md +54 -0
- package/docs/adr/0139-paridad-geometrica-e-inspector.md +63 -0
- package/docs/adr/0140-medida-line-height-css.md +78 -0
- package/docs/adr/0141-build-ssr-autocontenido.md +37 -0
- package/docs/adr/0142-tema-ssr-cookie-client-hint.md +42 -0
- package/docs/adr/0143-paridad-visual-ci.md +51 -0
- package/docs/adr/0144-oraculo-layout-chromium.md +45 -0
- package/docs/adr/0145-admision-opcodes-wire.md +89 -0
- package/docs/adr/0146-presupuesto-divergencias.md +82 -0
- package/docs/adr/0147-spans-texto-enriquecido.md +113 -0
- package/docs/adr/0148-scroll-restore.md +92 -0
- package/docs/adr/0149-gestion-foco.md +94 -0
- package/docs/adr/0150-sticky.md +89 -0
- package/docs/adr/0151-politica-migracion-snapshots.md +83 -0
- package/docs/adr/0152-vocabulario-semantico-v3.md +112 -0
- package/docs/adr/0153-puerta-doc-codigo.md +59 -0
- package/docs/adr/0154-matriz-paridad.md +79 -0
- package/docs/adr/0155-rtl-ambiente.md +73 -0
- package/docs/adr/0156-quickjs-ng-0170.md +55 -0
- package/docs/adr/0157-qjsc-bytecode-android.md +73 -0
- package/docs/adr/0158-abi-host-explicita.md +62 -0
- package/docs/adr/0159-entrada-desktop.md +59 -0
- package/docs/adr/0160-port-linux-hallazgos-plataforma.md +91 -0
- package/docs/adr/0161-paridad-deeplink-alineacion-estructural.md +76 -0
- package/docs/adr/0162-fontscale-linux-fuentes.md +63 -0
- package/docs/adr/0163-overflow-hidden-linux-clip.md +67 -0
- package/docs/adr/0164-nav-transitions-linux.md +126 -0
- package/docs/adr/0165-transiciones-declarativas.md +147 -0
- package/docs/adr/0166-ime-composition-linux.md +68 -0
- package/docs/adr/0167-spans-pango-linux.md +80 -0
- package/docs/adr/0168-statestyle-linux.md +65 -0
- package/docs/adr/0169-animate-linux.md +114 -0
- package/docs/adr/0170-image-service-linux.md +54 -0
- package/docs/adr/0171-semantics-atspi-linux.md +80 -0
- package/docs/adr/0172-conformidad-de-host-por-terceros.md +159 -0
- package/docs/adr/0173-licencias-espec-y-codigo.md +95 -0
- package/docs/adr/0174-tabla-estilo-yoga-compartida.md +67 -0
- package/docs/adr/0175-easings-normativos-cubic-bezier.md +68 -0
- package/docs/adr/0176-harness-plataforma-linux-y-locale-decimal.md +80 -0
- package/docs/adr/0177-gaps-linux-dir-as-navstate.md +84 -0
- package/docs/adr/0178-matriz-linux-y-tablas-normativas-generadas.md +104 -0
- package/docs/adr/0179-eventos-gesto-y-teclado.md +132 -0
- package/docs/adr/0180-desktop-nativo-linux-windows-macos-chromeos.md +58 -0
- package/docs/adr/0181-linux-platform-views-uiworklet-y-gaps-certificados.md +101 -0
- package/docs/adr/0182-sdui-envelope-dialecto-rico-y-lowering.md +452 -0
- package/docs/adr/0183-hermes-es6-block-scoping-en-source-eval.md +99 -0
- package/docs/adr/0184-sdui-consumidor-de-referencia-y-modulo-http.md +72 -0
- package/docs/adr/0185-sdui-modelo-de-seguridad-del-envelope.md +160 -0
- package/docs/adr/0186-linux-packaging-deb-rpm-flatpak.md +61 -0
- package/docs/adr/0187-modelo-de-hilos-ejecutores-logicos.md +163 -0
- package/docs/adr/0188-sdui-seguridad-hardening.md +214 -0
- package/docs/adr/0189-worklets-web-worker-y-egreso-pinning.md +235 -0
- package/docs/adr/0190-semantics-actions-linux-via-gaction-muxer.md +102 -0
- package/docs/adr/0191-reporte-de-errores-en-produccion.md +126 -0
- package/docs/adr/0192-source-maps-y-simbolizacion-de-stacks.md +107 -0
- package/docs/adr/0193-renderer-skia-opt-in-en-linux.md +143 -0
- package/docs/adr/0194-superficie-declarada-y-carril-skia-tree.md +96 -0
- package/docs/adr/0195-bundles-embebidos-subpaths-core.md +66 -0
- package/docs/adr/0196-matriz-capacidades-verdad.md +84 -0
- package/docs/adr/0197-entorno-reactivo-cableado.md +67 -0
- package/docs/adr/0198-csprng-host-wintertc.md +57 -0
- package/docs/adr/0199-testing-harness-dom-free.md +59 -0
- package/docs/adr/0200-overlays-back-foco.md +84 -0
- package/docs/adr/0201-paridad-nativa-props-texto-fase1.md +79 -0
- package/docs/adr/0202-node-ref-measure-web.md +61 -0
- package/docs/adr/0203-primitivas-headless.md +54 -0
- package/docs/adr/0204-imagen-load-error-fallback.md +123 -0
- package/docs/adr/0205-primitivas-controls-fase2.md +79 -0
- package/docs/adr/0206-a2ui-catalogo-tabs-modal-choicepicker-icon.md +110 -0
- package/docs/adr/0207-a2ui-superficie-viva.md +104 -0
- package/docs/adr/0208-a2ui-checks-validacion.md +94 -0
- package/docs/adr/0209-loaddata-nativo-default.md +56 -0
- package/docs/adr/0210-primitivas-navegacion-fase3.md +69 -0
- package/docs/adr/0211-a2ui-formato-localizado.md +113 -0
- package/docs/adr/0212-red-fuera-del-core.md +67 -0
- package/docs/adr/0213-dev-fast-y-rutas-automaticas.md +68 -0
- package/docs/adr/0214-dev-web-server-reload.md +55 -0
- package/docs/adr/0215-ui-host-noderef-back-http-linux.md +77 -0
- package/docs/adr/0216-paridad-nativa-switch-scroll-lista.md +53 -0
- package/docs/adr/0217-overlays-drag-y-popover-anclado.md +64 -0
- package/docs/adr/0218-sdui-gateway-live-mcp-y-scaffold.md +31 -0
- package/docs/adr/README.md +228 -0
- package/docs/deuda/i18n-libreria-separada.md +50 -0
- package/docs/doc-data.json +2784 -0
- package/docs/propuestas/demo-google-devfest-a2ui-sdui.md +374 -0
- package/docs/propuestas/dx-y-paridad.md +684 -0
- package/docs/propuestas/investigacion-apps-completas/PENDIENTES-CORE-APPS-COMPLETAS.md +226 -0
- package/docs/propuestas/investigacion-apps-completas/arquitectura-motor-videojuegos-elur.md +254 -0
- package/docs/propuestas/investigacion-apps-completas/auditoria-paridad-frameworks-y-sdui.md +295 -0
- package/docs/propuestas/investigacion-apps-completas/ciclo-de-vida-dx-y-apps-completas.md +394 -0
- package/docs/propuestas/investigacion-apps-completas/crear-proyecto-desde-npm-y-agentes.md +477 -0
- package/docs/propuestas/investigacion-apps-completas/especificacion-arquitectura-capacidades-faltantes.md +407 -0
- package/docs/propuestas/investigacion-apps-completas/identidad-y-nombre-elur-universal.md +133 -0
- package/docs/propuestas/investigacion-apps-completas/migracion-elur-core-4.md +266 -0
- package/docs/propuestas/investigacion-apps-completas/sdui-a2ui-aplicaciones-completas.md +255 -0
- package/docs/propuestas/investigacion-apps-completas/verificacion-mejoras-y-brechas-nuevas.md +228 -0
- package/docs/propuestas/modelo-de-consumo.md +287 -0
- package/docs/propuestas/modulos-nativos.md +1062 -0
- package/docs/propuestas/palabras-clave-normativas.md +69 -0
- package/docs/propuestas/sdui-seguridad-hardening.md +322 -0
- package/docs/propuestas/skia-graphite.md +167 -0
- package/docs/propuestas/skia-renderer-arbol.md +603 -0
- package/docs/propuestas/targets-nativos-nuevos.md +359 -0
- package/docs/propuestas/toolchain-y-distribucion.md +311 -0
- package/docs/propuestas/ui-worklet-capacidades-exclusivas.md +114 -0
- package/examples/a11ylive/elur.app.json +8 -0
- package/examples/a11ylive/entry.ts +22 -0
- package/examples/a11ysem/elur.app.json +8 -0
- package/examples/a11ysem/entry.ts +24 -0
- package/examples/anim/elur.app.json +8 -0
- package/examples/anim/entry.ts +50 -0
- package/examples/app.ts +10 -0
- package/examples/cliprad/elur.app.json +8 -0
- package/examples/cliprad/entry.ts +16 -0
- package/examples/controls/app.ts +32 -0
- package/examples/controls/elur.app.json +8 -0
- package/examples/counter/app.ts +21 -0
- package/examples/counter/elur.app.json +8 -0
- package/examples/counter/entry.ts +7 -0
- package/examples/entry.ts +11 -0
- package/examples/feedstress/app.ts +334 -0
- package/examples/feedstress/elur.app.json +8 -0
- package/examples/feedstress/entry.ts +7 -0
- package/examples/i18n/app.ts +86 -0
- package/examples/i18n/elur.app.json +8 -0
- package/examples/i18n/entry.ts +22 -0
- package/examples/imecomp/elur.app.json +8 -0
- package/examples/imecomp/entry.ts +41 -0
- package/examples/imgtest/elur.app.json +8 -0
- package/examples/imgtest/entry.ts +18 -0
- package/examples/mareas/app/ajustes/page.ts +54 -0
- package/examples/mareas/app/page.ts +91 -0
- package/examples/mareas/app/puerto/[id]/page.ts +106 -0
- package/examples/mareas/app.ts +12 -0
- package/examples/mareas/elur.app.json +35 -0
- package/examples/mareas/entry.ts +11 -0
- package/examples/mareas/fonts/DejaVuSansMono-Bold.ttf +0 -0
- package/examples/mareas/fonts/DejaVuSansMono.ttf +0 -0
- package/examples/mareas/fonts/DejaVuSerif-Bold.ttf +0 -0
- package/examples/mareas/fonts/DejaVuSerif-Italic.ttf +0 -0
- package/examples/mareas/fonts/DejaVuSerif.ttf +0 -0
- package/examples/mareas/fonts/LICENSE-DejaVu.txt +187 -0
- package/examples/mareas/fonts.ts +6 -0
- package/examples/mareas/head.ts +12 -0
- package/examples/mareas/i18n.ts +163 -0
- package/examples/mareas/ports.ts +131 -0
- package/examples/mareas/routes.gen.ts +44 -0
- package/examples/mareas/serve.ts +70 -0
- package/examples/mareas/services.ts +5 -0
- package/examples/mareas/services.web.ts +6 -0
- package/examples/mareas/state.ts +64 -0
- package/examples/mareas/theme.ts +56 -0
- package/examples/mareas/ui/controls.ts +42 -0
- package/examples/mareas/ui/frame.ts +63 -0
- package/examples/mareas/ui/marigram.ts +52 -0
- package/examples/masonry/app.ts +32 -0
- package/examples/masonry/elur.app.json +8 -0
- package/examples/masonry/entry.ts +4 -0
- package/examples/natprobe/elur.app.json +8 -0
- package/examples/natprobe/entry.ts +196 -0
- package/examples/navdemo/app.ts +109 -0
- package/examples/navdemo/elur.app.json +8 -0
- package/examples/navdemo/entry.ts +7 -0
- package/examples/navtrans/elur.app.json +8 -0
- package/examples/navtrans/entry.ts +53 -0
- package/examples/platformview/app.ts +26 -0
- package/examples/platformview/elur.app.json +8 -0
- package/examples/sdui-demo/docs/home.envelope.json +588 -0
- package/examples/sdui-demo/docs/home.iife.json +582 -0
- package/examples/sdui-demo/elur.app.json +8 -0
- package/examples/sdui-demo/entry.ts +346 -0
- package/examples/select/elur.app.json +8 -0
- package/examples/select/entry.ts +20 -0
- package/examples/skiacanvas/app.ts +34 -0
- package/examples/skiacanvas/elur.app.json +8 -0
- package/examples/skiacanvas/entry.ts +4 -0
- package/examples/spans/elur.app.json +8 -0
- package/examples/spans/entry.ts +28 -0
- package/examples/ssr/app/about/page.ts +18 -0
- package/examples/ssr/app/items/[id]/page.ts +16 -0
- package/examples/ssr/app/layout.ts +21 -0
- package/examples/ssr/app/page.action.ts +10 -0
- package/examples/ssr/app/page.data.ts +5 -0
- package/examples/ssr/app/page.ts +95 -0
- package/examples/ssr/app/slow/loading.ts +10 -0
- package/examples/ssr/app/slow/page.data.ts +4 -0
- package/examples/ssr/app/slow/page.ts +16 -0
- package/examples/ssr/app/store.ts +3 -0
- package/examples/ssr/serve.ts +53 -0
- package/examples/statestyle/elur.app.json +8 -0
- package/examples/statestyle/entry.ts +25 -0
- package/examples/swipe/elur.app.json +8 -0
- package/examples/swipe/entry.ts +39 -0
- package/examples/tasks/app.ts +145 -0
- package/examples/tasks/elur.app.json +8 -0
- package/examples/uiwk/app.ts +288 -0
- package/examples/uiwk/elur.app.json +8 -0
- package/examples/uiwk/entry.ts +7 -0
- package/examples/vertical/app.ts +275 -0
- package/examples/vertical/elur.app.json +8 -0
- package/examples/vertical/entry.ts +31 -0
- package/examples/yogafeatures/app.ts +55 -0
- package/examples/yogafeatures/elur.app.json +8 -0
- package/examples/yogafeatures/entry.ts +4 -0
- package/native/cesm/README.md +94 -0
- package/native/cesm/adapters/hermes/HermesAdapter.h +432 -0
- package/native/cesm/adapters/quickjs/QuickJsAdapter.h +562 -0
- package/native/cesm/core/Bytes.h +236 -0
- package/native/cesm/core/Core.h +157 -0
- package/native/cesm/core/EngineAdapter.h +20 -0
- package/native/cesm/core/Region.h +77 -0
- package/native/cesm/core/Ring.h +99 -0
- package/native/cesm/core/Slots.h +132 -0
- package/native/cesm/core/Types.h +67 -0
- package/native/cesm/tests/CMakeLists.txt +50 -0
- package/native/cesm/tests/README.md +89 -0
- package/native/cesm/tests/compile_check_hermes.cpp +23 -0
- package/native/cesm/tests/test_core.cpp +101 -0
- package/native/cesm/tests/test_main.cpp +13 -0
- package/native/cesm/tests/test_quickjs_adapter.cpp +252 -0
- package/native/cesm/tests/test_ring.cpp +131 -0
- package/native/cesm/tests/test_slots.cpp +81 -0
- package/native/cesm/tests/test_sync.cpp +157 -0
- package/native/cesm/tests/test_util.h +24 -0
- package/native/layout/elur_layout_style.cpp +297 -0
- package/native/layout/elur_layout_style.h +36 -0
- package/native/layout-oracle/CMakeLists.txt +22 -0
- package/native/layout-oracle/oracle.cpp +140 -0
- package/native/rand/elur_random.h +43 -0
- package/native/skia-tree/elur_skia_tree.cpp +1293 -0
- package/native/skia-tree/elur_skia_tree.h +231 -0
- package/native/yoga/LICENSE +21 -0
- package/native/yoga/YGConfig.cpp +92 -0
- package/native/yoga/YGConfig.h +158 -0
- package/native/yoga/YGEnums.cpp +262 -0
- package/native/yoga/YGEnums.h +142 -0
- package/native/yoga/YGMacros.h +99 -0
- package/native/yoga/YGNode.cpp +366 -0
- package/native/yoga/YGNode.h +304 -0
- package/native/yoga/YGNodeLayout.cpp +92 -0
- package/native/yoga/YGNodeLayout.h +35 -0
- package/native/yoga/YGNodeStyle.cpp +405 -0
- package/native/yoga/YGNodeStyle.h +130 -0
- package/native/yoga/YGPixelGrid.cpp +22 -0
- package/native/yoga/YGPixelGrid.h +29 -0
- package/native/yoga/YGValue.cpp +20 -0
- package/native/yoga/YGValue.h +84 -0
- package/native/yoga/Yoga.h +21 -0
- package/native/yoga/algorithm/AbsoluteLayout.cpp +563 -0
- package/native/yoga/algorithm/AbsoluteLayout.h +41 -0
- package/native/yoga/algorithm/Align.h +72 -0
- package/native/yoga/algorithm/Baseline.cpp +78 -0
- package/native/yoga/algorithm/Baseline.h +21 -0
- package/native/yoga/algorithm/BoundAxis.h +79 -0
- package/native/yoga/algorithm/Cache.cpp +121 -0
- package/native/yoga/algorithm/Cache.h +30 -0
- package/native/yoga/algorithm/CalculateLayout.cpp +2428 -0
- package/native/yoga/algorithm/CalculateLayout.h +38 -0
- package/native/yoga/algorithm/FlexDirection.h +120 -0
- package/native/yoga/algorithm/FlexLine.cpp +124 -0
- package/native/yoga/algorithm/FlexLine.h +75 -0
- package/native/yoga/algorithm/PixelGrid.cpp +132 -0
- package/native/yoga/algorithm/PixelGrid.h +29 -0
- package/native/yoga/algorithm/SizingMode.h +73 -0
- package/native/yoga/algorithm/TrailingPosition.h +44 -0
- package/native/yoga/config/Config.cpp +135 -0
- package/native/yoga/config/Config.h +92 -0
- package/native/yoga/debug/AssertFatal.cpp +53 -0
- package/native/yoga/debug/AssertFatal.h +29 -0
- package/native/yoga/debug/Log.cpp +107 -0
- package/native/yoga/debug/Log.h +34 -0
- package/native/yoga/enums/Align.h +47 -0
- package/native/yoga/enums/BoxSizing.h +40 -0
- package/native/yoga/enums/Dimension.h +40 -0
- package/native/yoga/enums/Direction.h +41 -0
- package/native/yoga/enums/Display.h +41 -0
- package/native/yoga/enums/Edge.h +47 -0
- package/native/yoga/enums/Errata.h +41 -0
- package/native/yoga/enums/ExperimentalFeature.h +39 -0
- package/native/yoga/enums/FlexDirection.h +42 -0
- package/native/yoga/enums/Gutter.h +41 -0
- package/native/yoga/enums/Justify.h +44 -0
- package/native/yoga/enums/LogLevel.h +44 -0
- package/native/yoga/enums/MeasureMode.h +41 -0
- package/native/yoga/enums/NodeType.h +40 -0
- package/native/yoga/enums/Overflow.h +41 -0
- package/native/yoga/enums/PhysicalEdge.h +21 -0
- package/native/yoga/enums/PositionType.h +41 -0
- package/native/yoga/enums/Unit.h +42 -0
- package/native/yoga/enums/Wrap.h +41 -0
- package/native/yoga/enums/YogaEnums.h +85 -0
- package/native/yoga/event/event.cpp +87 -0
- package/native/yoga/event/event.h +130 -0
- package/native/yoga/node/CachedMeasurement.h +53 -0
- package/native/yoga/node/LayoutResults.cpp +48 -0
- package/native/yoga/node/LayoutResults.h +122 -0
- package/native/yoga/node/LayoutableChildren.h +148 -0
- package/native/yoga/node/Node.cpp +443 -0
- package/native/yoga/node/Node.h +337 -0
- package/native/yoga/numeric/Comparison.h +81 -0
- package/native/yoga/numeric/FloatOptional.h +93 -0
- package/native/yoga/style/SmallValueBuffer.h +133 -0
- package/native/yoga/style/Style.h +757 -0
- package/native/yoga/style/StyleLength.h +107 -0
- package/native/yoga/style/StyleValueHandle.h +98 -0
- package/native/yoga/style/StyleValuePool.h +127 -0
- package/package.json +111 -3
- package/src/adapters/kit-bridge.ts +72 -0
- package/src/adapters/kit-ssg.ts +219 -0
- package/src/adapters/kit-ssr.ts +577 -0
- package/src/adapters/kit-types.ts +28 -0
- package/src/adapters/request-adapter.ts +41 -0
- package/src/adapters/ssr-resolver.ts +177 -0
- package/src/adapters/web-history.ts +218 -0
- package/src/adapters/web-nav-executor.ts +72 -0
- package/src/animations/.gitkeep +0 -0
- package/src/animations/bindWorklets.ts +49 -0
- package/src/animations/captureCheck.ts +75 -0
- package/src/animations/compose.ts +127 -0
- package/src/animations/easing.ts +75 -0
- package/src/animations/gestureWorklets.ts +129 -0
- package/src/animations/index.ts +23 -0
- package/src/animations/runner.ts +404 -0
- package/src/animations/scrollWorklets.ts +48 -0
- package/src/animations/uiBindings.ts +83 -0
- package/src/animations/uiRunner.ts +449 -0
- package/src/animations/worklet.ts +157 -0
- package/src/animations/workletForm.ts +197 -0
- package/src/app/clock.ts +69 -0
- package/src/app/embedded.ts +232 -0
- package/src/app/index.ts +24 -0
- package/src/app/load-data.ts +36 -0
- package/src/app/mount.native.ts +18 -0
- package/src/app/mount.ts +26 -0
- package/src/app/mount.web.ts +21 -0
- package/src/app/state.ts +256 -0
- package/src/app/types.ts +146 -0
- package/src/app/web.ts +291 -0
- package/src/backends/native/hostAbi.ts +304 -0
- package/src/backends/native/index.ts +1132 -0
- package/src/backends/textInputProtocol.ts +111 -0
- package/src/backends/web/.gitkeep +0 -0
- package/src/backends/web/base-css.ts +148 -0
- package/src/backends/web/batcher.ts +162 -0
- package/src/backends/web/hydrate.ts +227 -0
- package/src/backends/web/index.ts +2231 -0
- package/src/backends/web/inspect.ts +80 -0
- package/src/backends/web/workerRunner.ts +513 -0
- package/src/context/index.ts +19 -0
- package/src/events.ts +139 -0
- package/src/forms/index.ts +264 -0
- package/src/hydration/.gitkeep +0 -0
- package/src/index.ts +169 -0
- package/src/ir/.gitkeep +0 -0
- package/src/ir/catalog.ts +166 -0
- package/src/ir/events.ts +54 -0
- package/src/ir/schema.ts +1103 -0
- package/src/ir/semantics.ts +189 -0
- package/src/ir/shortcut.ts +104 -0
- package/src/ir/signal-names.ts +27 -0
- package/src/ir/ui.ts +709 -0
- package/src/layout/.gitkeep +0 -0
- package/src/native/.gitkeep +0 -0
- package/src/native/binaryCodec.ts +230 -0
- package/src/native/codegen.ts +635 -0
- package/src/native/hostArtifacts.ts +386 -0
- package/src/native/http.ts +558 -0
- package/src/native/index.ts +54 -0
- package/src/native/manifest.ts +227 -0
- package/src/native/module.ts +1108 -0
- package/src/native/platformView.ts +107 -0
- package/src/native/pluginManifest.ts +269 -0
- package/src/native/sharedMemory.ts +168 -0
- package/src/native/specType.ts +164 -0
- package/src/native/tck.ts +436 -0
- package/src/native/trace.ts +97 -0
- package/src/native/webModule.ts +281 -0
- package/src/overlays/index.ts +579 -0
- package/src/platform.ts +89 -0
- package/src/primitives/controls.ts +725 -0
- package/src/primitives/index.ts +400 -0
- package/src/primitives/navigation.ts +407 -0
- package/src/reconciler/reconciler.ts +2857 -0
- package/src/router/guards.ts +129 -0
- package/src/router/index.ts +41 -0
- package/src/router/lifecycle.ts +133 -0
- package/src/router/match.ts +184 -0
- package/src/router/router.ts +508 -0
- package/src/router/screen-host.ts +918 -0
- package/src/router/state.ts +76 -0
- package/src/router/table.ts +55 -0
- package/src/router/transitions.ts +87 -0
- package/src/router/types.ts +161 -0
- package/src/runtime/environment.ts +332 -0
- package/src/runtime/wintertc-globals.ts +1067 -0
- package/src/sdui/a2ui.ts +1470 -0
- package/src/sdui/a2uiSurface.ts +214 -0
- package/src/sdui/client.ts +370 -0
- package/src/sdui/cryptoModule.ts +107 -0
- package/src/sdui/diagnostics.ts +39 -0
- package/src/sdui/downlevel.ts +375 -0
- package/src/sdui/envelope.ts +729 -0
- package/src/sdui/expr.ts +658 -0
- package/src/sdui/gateway.ts +223 -0
- package/src/sdui/httpModule.ts +29 -0
- package/src/sdui/index.ts +74 -0
- package/src/sdui/intents.ts +216 -0
- package/src/sdui/lower.ts +576 -0
- package/src/sdui/machines.ts +141 -0
- package/src/sdui/manifest.ts +167 -0
- package/src/sdui/oracle.ts +373 -0
- package/src/sdui/profile.ts +72 -0
- package/src/sdui/seqStore.ts +89 -0
- package/src/sdui/sign.ts +155 -0
- package/src/sdui/worklets.ts +164 -0
- package/src/ssr/html-applicator.ts +515 -0
- package/src/ssr/render-page.ts +264 -0
- package/src/store/index.ts +28 -0
- package/src/style/textInherit.ts +29 -0
- package/src/style/theme.ts +178 -0
- package/src/testing/index.ts +276 -0
- package/src/transport/.gitkeep +0 -0
- package/src/transport/format.ts +477 -0
- package/src/transport/wireSchema.ts +189 -0
- package/src/web.ts +31 -0
- package/targets/android/app/build.gradle.kts +192 -0
- package/targets/android/app/proguard-rules-elur.pro +12 -0
- package/targets/android/app/proguard-rules.pro +3 -0
- package/targets/android/app/src/main/AndroidManifest.xml +81 -0
- package/targets/android/app/src/main/cpp/CMakeLists.txt +117 -0
- package/targets/android/app/src/main/cpp/dlEncoder.h +117 -0
- package/targets/android/app/src/main/cpp/dlEncoderJsi.cpp +315 -0
- package/targets/android/app/src/main/cpp/dlEncoderQjs.cpp +394 -0
- package/targets/android/app/src/main/cpp/dlOps.inc +145 -0
- package/targets/android/app/src/main/cpp/elurBridge.cpp +1350 -0
- package/targets/android/app/src/main/cpp/elurBridgeHermes.cpp +1294 -0
- package/targets/android/app/src/main/cpp/elurSkia.cpp +287 -0
- package/targets/android/app/src/main/cpp/elurSkiaTree.cpp +448 -0
- package/targets/android/app/src/main/cpp/elurUiWorklet.cpp +1233 -0
- package/targets/android/app/src/main/cpp/elurYoga.cpp +1060 -0
- package/targets/android/app/src/main/cpp/elurYoga.h +82 -0
- package/targets/android/app/src/main/cpp/hermes-libs/LICENSE +21 -0
- package/targets/android/app/src/main/cpp/hermes-libs/arm64-v8a/libhermesvm.so +0 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/AsyncDebuggerAPI.h +276 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/CompileJS.h +97 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/DebuggerAPI.h +502 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/Public/CrashManager.h +107 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/Public/CtorConfig.h +145 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/Public/DebuggerTypes.h +193 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/Public/GCConfig.h +211 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/Public/GCTripwireContext.h +40 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/Public/HermesExport.h +14 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/Public/JSOutOfMemoryError.h +27 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/Public/RuntimeConfig.h +141 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/Public/SamplingProfiler.h +270 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/RuntimeTaskRunner.h +64 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/SynthTrace.h +1566 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/SynthTraceParser.h +37 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/ThreadSafetyAnalysis.h +75 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/TimerStats.h +23 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/TraceInterpreter.h +334 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/TracingRuntime.h +328 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/cdp/CDPAgent.h +131 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/cdp/CDPDebugAPI.h +73 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/cdp/CallbackOStream.h +89 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/cdp/ConsoleMessage.h +135 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/cdp/DebuggerDomainAgent.h +280 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/cdp/DebuggerDomainCoordinator.h +137 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/cdp/DomainAgent.h +107 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/cdp/DomainState.h +140 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/cdp/HeapProfilerDomainAgent.h +71 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/cdp/JSONValueInterfaces.h +40 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/cdp/MessageConverters.h +82 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/cdp/MessageInterfaces.h +72 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/cdp/MessageTypes.h +1279 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/cdp/MessageTypesInlines.h +313 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/cdp/ProfilerDomainAgent.h +38 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/cdp/RemoteObjectConverters.h +77 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/cdp/RemoteObjectsTable.h +127 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/cdp/RuntimeDomainAgent.h +138 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/extensions/Dummy.h +24 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/extensions/Extensions.h +20 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/extensions/ExtensionsBytecode.h +23 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/extensions/Intrinsics.h +44 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/extensions/JSIUtils.h +123 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/extensions/TextEncoder.h +29 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/extensions/contrib/ContribDummy.h +24 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/extensions/contrib/ContribExtensions.h +23 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/extensions/contrib/TextDecoder.h +30 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/extensions/contrib/TextDecoderUtils.h +113 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/hermes.h +242 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes/hermes_tracing.h +52 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes_abi/HermesABIHelpers.h +295 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes_abi/HermesABIRuntimeWrapper.h +25 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes_abi/hermes_abi.h +642 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes_abi/hermes_vtable.h +29 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes_sandbox/HermesSandboxRuntime.h +41 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes_sandbox/external/hermes_sandbox_impl_compiled.h +12 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes_sandbox/external/hermes_sandbox_impl_dbg_compiled-impl.h +8516 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes_sandbox/external/hermes_sandbox_impl_dbg_compiled.h +137 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes_sandbox/external/hermes_sandbox_impl_opt_compiled-impl.h +3945 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes_sandbox/external/hermes_sandbox_impl_opt_compiled.h +119 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes_sandbox/external/wasm-rt-fb.h +124 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes_sandbox/external/wasm-rt-impl.h +66 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/hermes_sandbox/external/wasm-rt.h +456 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/jsi/JSIDynamic.h +26 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/jsi/decorator.h +1157 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/jsi/hermes-interfaces.h +242 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/jsi/instrumentation.h +132 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/jsi/jsi-inl.h +434 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/jsi/jsi.h +2266 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/jsi/jsilib.h +59 -0
- package/targets/android/app/src/main/cpp/hermes-libs/include/jsi/threadsafe.h +79 -0
- package/targets/android/app/src/main/cpp/hermes-libs/jsi-impl/jsi.cpp +1111 -0
- package/targets/android/app/src/main/cpp/hermes-libs/x86_64/libhermesvm.so +0 -0
- package/targets/android/app/src/main/java/com/elur/universal/BinaryCodec.kt +121 -0
- package/targets/android/app/src/main/java/com/elur/universal/DlDecoder.kt +260 -0
- package/targets/android/app/src/main/java/com/elur/universal/DlOpsDecode.kt +158 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurBoxDrawable.kt +161 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurBridge.kt +238 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurBridgeHermes.kt +223 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurCanvasView.kt +202 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurCryptoModule.kt +206 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurCustomLayout.kt +185 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurEditText.kt +17 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurFontRegistry.kt +190 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurHttpModule.kt +306 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurImageService.kt +348 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurLicensesActivity.kt +84 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurListView.kt +954 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurManifest.kt +117 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurMetrics.kt +325 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurModuleRegistrar.kt +14 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurPermissionGate.kt +36 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurRenderer.kt +6112 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurRowYoga.kt +130 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurScrollView.kt +240 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurShellView.kt +117 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurSkiaCanvasView.kt +162 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurSkiaTreeRenderer.kt +968 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurStateModule.kt +69 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurSwipeDriver.kt +34 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurTckModule.kt +99 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurTextMeasure.kt +16 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurTrace.kt +24 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurUiModule.kt +48 -0
- package/targets/android/app/src/main/java/com/elur/universal/ElurUiWorklet.kt +305 -0
- package/targets/android/app/src/main/java/com/elur/universal/JsBridge.kt +67 -0
- package/targets/android/app/src/main/java/com/elur/universal/JsThread.kt +189 -0
- package/targets/android/app/src/main/java/com/elur/universal/MainActivity.kt +844 -0
- package/targets/android/app/src/main/java/com/elur/universal/ModuleRegistry.kt +701 -0
- package/targets/android/app/src/main/java/com/elur/universal/YogaRowScope.kt +97 -0
- package/targets/android/app/src/main/res/values/ids.xml +10 -0
- package/targets/android/app/src/main/res/values/strings.xml +8 -0
- package/targets/android/app/src/main/res/values-es/strings.xml +5 -0
- package/targets/android/app/src/main/res/xml/network_security_config.xml +10 -0
- package/targets/android/build.gradle.kts +5 -0
- package/targets/android/gradle/libs.versions.toml +12 -0
- package/targets/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/targets/android/gradle/wrapper/gradle-wrapper.properties +8 -0
- package/targets/android/gradle.properties +23 -0
- package/targets/android/gradlew +251 -0
- package/targets/android/gradlew.bat +94 -0
- package/targets/android/settings.gradle.kts +32 -0
- package/targets/web/.gitkeep +0 -0
- package/targets/web/index.html +13 -0
package/src/ir/schema.ts
ADDED
|
@@ -0,0 +1,1103 @@
|
|
|
1
|
+
// IR — Capa 0 · CONTRATO CONGELADO v1
|
|
2
|
+
// Spec: documento maestro A.4. Cambios requieren ADR + bump IR_VERSION.
|
|
3
|
+
|
|
4
|
+
import type { Signal } from "@elurjs/core/signals";
|
|
5
|
+
|
|
6
|
+
/** Versión del contrato IR. Bumpear con cada cambio de schema (ADR).
|
|
7
|
+
* 10 (ADR-0127/0129/0131/0133): herencia de estilos de texto, `flex`
|
|
8
|
+
* shorthand, `stateStyle`, `EventBinding.payload`, `ShellDef.chrome`.
|
|
9
|
+
* ADR-0147 (`spans`), ADR-0148 (`scrollTop`) y ADR-0150 (`sticky`) son
|
|
10
|
+
* props aditivas que viajan por update-props — sin cambio estructural
|
|
11
|
+
* del wire (precedente stateStyle/href): no bumpan la versión. */
|
|
12
|
+
export const IR_VERSION = 10;
|
|
13
|
+
|
|
14
|
+
export type IRDocument = {
|
|
15
|
+
irVersion: number; // siempre presente; == IR_VERSION
|
|
16
|
+
root: IRNode; // nodo raíz del árbol
|
|
17
|
+
handlers?: Record<string, HandlerDescriptor>; // funciones/commands NO serializables
|
|
18
|
+
// bindings eliminado: viven inline en los nodos (A.6.1)
|
|
19
|
+
// capabilities eliminado: vive en el envelope SDUI/transporte (A.6.5)
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type IRNode = {
|
|
23
|
+
id?: string; // identificador legible (dev, debugging, SDUI)
|
|
24
|
+
type: IRNodeType;
|
|
25
|
+
|
|
26
|
+
// Props universales (as, accessible, label, dir…). Pueden contener bindings inline.
|
|
27
|
+
// dir = "ltr"|"rtl" — dirección de layout/texto (web: atributo dir; Android:
|
|
28
|
+
// layoutDirection + textDirection). §1.4 / ADR-0071.
|
|
29
|
+
props?: Record<string, unknown | Binding>;
|
|
30
|
+
|
|
31
|
+
// Estilo portable strict-flexbox. Solo props escritas; el backend resuelve shorthands (A.6.2).
|
|
32
|
+
style?: StyleInput;
|
|
33
|
+
|
|
34
|
+
children?: IRNode[];
|
|
35
|
+
|
|
36
|
+
// Contenido textual. Si es reactivo, TextBinding con el binding inline.
|
|
37
|
+
text?: string | TextBinding;
|
|
38
|
+
|
|
39
|
+
// Eventos como intención universal. Valor = ref a IRDocument.handlers (§3.3).
|
|
40
|
+
events?: Record<string, EventBinding>;
|
|
41
|
+
|
|
42
|
+
// Solo platform-view (ecosistema de plugins, §6.2)
|
|
43
|
+
module?: string; // ej. "elur.camera"
|
|
44
|
+
view?: string; // ej. "preview"
|
|
45
|
+
|
|
46
|
+
// Solo shell (nodo estructural de navegación, ADR-0011)
|
|
47
|
+
shellKind?: ShellKind;
|
|
48
|
+
shellId?: string;
|
|
49
|
+
activeTab?: string; // para shellKind: "tabs"
|
|
50
|
+
|
|
51
|
+
// Política de render (A.6.4)
|
|
52
|
+
renderPolicy?: RenderPolicy;
|
|
53
|
+
|
|
54
|
+
// Listas keyed — repeat() del core (A.6.4)
|
|
55
|
+
list?: {
|
|
56
|
+
items: Binding; // signal/computed que retorna el array
|
|
57
|
+
keyFn: string; // ref a handler (key extractor)
|
|
58
|
+
/** Template estático (itemSignals merge) o id de factory
|
|
59
|
+
* (ADR-0014 + ADR-0037/F12: la función NO vive en el IR —
|
|
60
|
+
* `repeat()` emite un id `"f<N>"` y registra la closure en
|
|
61
|
+
* `UIResult.factories`; el reconciler la resuelve por
|
|
62
|
+
* `options.factories[id]`. Así `IRDocument` es serializable:
|
|
63
|
+
* JSON round-trip conserva la referencia; los closures son
|
|
64
|
+
* runtime, nunca wire). */
|
|
65
|
+
renderItem: IRNode | string;
|
|
66
|
+
/** ADR-0031 — pool LRU acotado de filas removidas. 0/ausente =
|
|
67
|
+
* destroy directo (contrato F01). N>0: al salir del modelo la
|
|
68
|
+
* fila se detiene (remove-child ya emitido) y se aparca; si la
|
|
69
|
+
* key reaparece se re-adjunta la instancia (conserva estado y
|
|
70
|
+
* handlers); al desbordar, la menos reciente se destruye. */
|
|
71
|
+
poolSize?: number;
|
|
72
|
+
/** ADR-0033 — ventana virtualizada (R5.4). Solo se materializan
|
|
73
|
+
* las filas del rango visible + overscan; el resto nunca existe
|
|
74
|
+
* como nodos. CONTRATO:
|
|
75
|
+
* - `rowHeight` es FIJO en unidades lógicas (filas de altura
|
|
76
|
+
* variable quedan fuera de esta fase del contrato).
|
|
77
|
+
* - El reconciler posee la geometría de fila: emite
|
|
78
|
+
* position:absolute + top=(index*rowHeight) + height=rowHeight
|
|
79
|
+
* por update-style sobre cada raíz de fila, y height=
|
|
80
|
+
* items*rowHeight sobre el nodo lista (rango de scroll real).
|
|
81
|
+
* - `scroll` (opcional) = binding a un signal {y, vh} en
|
|
82
|
+
* unidades lógicas — y=scrollTop, vh=alto del viewport. Si
|
|
83
|
+
* falta, el reconciler auto-cablea el evento "scroll" del
|
|
84
|
+
* scroll-view ancestro (attach-event con handler interno
|
|
85
|
+
* `__elur_vscroll:<listId>`); el payload del evento scroll es
|
|
86
|
+
* {y, vh} normalizado por el backend (web: scrollTop/
|
|
87
|
+
* clientHeight CSS px; android: px físicos / density).
|
|
88
|
+
* - Interacciona con poolSize: filas que salen de ventana se
|
|
89
|
+
* aparcan (recomendado poolSize >= 2*overscan). */
|
|
90
|
+
virtual?: {
|
|
91
|
+
rowHeight: number;
|
|
92
|
+
overscan?: number; // default 4
|
|
93
|
+
scroll?: Binding; // signal {y, vh}
|
|
94
|
+
};
|
|
95
|
+
/** ADR-0056 — propietario de la ventana (eje ORTOGONAL a
|
|
96
|
+
* `renderPolicy`, que solo elige superficie views/Skia).
|
|
97
|
+
* - `host`: widget de colección del host (RecyclerView,
|
|
98
|
+
* UICollectionView…) — el reconciler emite ops a nivel item
|
|
99
|
+
* (`set-list-template`, `set-list-items`, `list-splice`,
|
|
100
|
+
* `list-move`, `list-update`) y el host posee ventana,
|
|
101
|
+
* reciclaje y bind por campo. Exige cap `native-list` +
|
|
102
|
+
* filas template elegibles + superficie de views. Sobre
|
|
103
|
+
* `renderPolicy:"custom"` el equivalente es la lista pintada
|
|
104
|
+
* por la superficie Skia (cap `canvas-list`, aún inexistente)
|
|
105
|
+
* — nunca un widget nativo: bajo `custom` no hay nada nativo.
|
|
106
|
+
* - `js`: ventana virtual + pool estructural en el reconciler —
|
|
107
|
+
* las filas son ops de vista normales sobre cualquier
|
|
108
|
+
* superficie. Es el único camino en hosts sin cap (web).
|
|
109
|
+
* - `auto` (default): `host` si cap + template + views; si
|
|
110
|
+
* no, `js` silencioso.
|
|
111
|
+
* Pedir `host` sin reunir las condiciones degrada a `js` con
|
|
112
|
+
* warning + motivo — la portabilidad manda sobre la preferencia.
|
|
113
|
+
* El estilizado no cambia con el propietario: estáticos al
|
|
114
|
+
* inflar, `{kind:"signal",signal:"<campo>"}` con rebind por
|
|
115
|
+
* campo; bindings a signals ajenos al item hacen la fila
|
|
116
|
+
* inelegible para `host` (U06). */
|
|
117
|
+
materialization?: ListMaterialization;
|
|
118
|
+
/** ADR-0087 §scroll — scroll-worklet conducido por el offset del
|
|
119
|
+
* RecyclerView: el host alimenta la signal `__scroll_<id>` del
|
|
120
|
+
* contexto UI directo desde onScrolled — el worklet se re-evalúa
|
|
121
|
+
* en el tick del cambio SIN despertar el JsThread (parallax,
|
|
122
|
+
* fade-on-scroll, sticky headers). Solo aplica sobre
|
|
123
|
+
* `materialization:"host"`: el path js reporta scroll por el
|
|
124
|
+
* evento normal. Marcador estructural (evita el ciclo con
|
|
125
|
+
* animations/worklet). */
|
|
126
|
+
scrollFx?: { readonly __isWorklet: true };
|
|
127
|
+
/** ADR-0087 §bind — worklet evaluado dentro del onBindViewHolder
|
|
128
|
+
* nativo: la fn recibe (position, row) — `row` es un proxy que
|
|
129
|
+
* escribe props compositor sobre el itemView siendo bindeado
|
|
130
|
+
* (transform por posición, stagger, reveal). Solo aplica sobre
|
|
131
|
+
* `materialization:"host"`; nunca cruza el wire. Marcador
|
|
132
|
+
* estructural (evita el ciclo con animations/worklet). */
|
|
133
|
+
rowFx?: { readonly __isWorklet: true };
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
/** ADR-0087 §gestures — worklet conducido por el canal táctil del
|
|
137
|
+
* host sobre ESTE nodo (drag): el OnTouchListener nativo alimenta
|
|
138
|
+
* las signals externas `__drag_<id>_dx|_dy|_p` al contexto UI —
|
|
139
|
+
* la fn se re-evalúa por gesto sin despertar el JsThread.
|
|
140
|
+
* Marcador estructural (evita el ciclo con animations/worklet);
|
|
141
|
+
* nunca cruza el wire — el runtime lo consume al montar el nodo. */
|
|
142
|
+
dragFx?: { readonly __isWorklet: true };
|
|
143
|
+
/** ADR-0128 — raíz sintética de un `ui``` con varias raíces. Al
|
|
144
|
+
* interpolarse en otro `ui``` se disuelve (sus hijos pasan al padre:
|
|
145
|
+
* `gap`/`flexWrap` siguen aplicando); como raíz de documento actúa
|
|
146
|
+
* de columna. No cruza el wire. */
|
|
147
|
+
fragment?: true;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/** Factory por item de lista (ADR-0014). Estructuralmente idéntica al
|
|
151
|
+
* resultado de ui`` — no importamos UIResult para evitar ciclo con ui.ts.
|
|
152
|
+
* `keyFns`/`factories` opcionales: un ui`` anidado con repeat() dentro de
|
|
153
|
+
* la fila los aporta — el reconciler los mergea al scope de la fila. */
|
|
154
|
+
export type ListItemFactory = (item: unknown) => {
|
|
155
|
+
document: IRDocument;
|
|
156
|
+
signals: Record<string, Signal<unknown>>;
|
|
157
|
+
handlers: Record<string, (e?: unknown) => void>;
|
|
158
|
+
keyFns?: Record<string, (item: any) => string>;
|
|
159
|
+
factories?: Record<string, ListItemFactory>;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
// Vocabulario de nodos — las ~12 primitivas del MVP (§17 Fase 1).
|
|
163
|
+
// Añadir un tipo nuevo requiere ADR + bump IR_VERSION.
|
|
164
|
+
export type IRNodeType =
|
|
165
|
+
| "column" | "row" | "text" | "button" | "image"
|
|
166
|
+
| "text-input" | "switch" | "slider"
|
|
167
|
+
| "scroll-view" | "list"
|
|
168
|
+
| "platform-view" | "canvas" // canvas = Skia opt-in (ADR-0009)
|
|
169
|
+
| "shell"; // nodo estructural (ADR-0011)
|
|
170
|
+
|
|
171
|
+
export type ShellKind = "stack" | "tabs" | "drawer" | "split";
|
|
172
|
+
/** ADR-0009, doc maestro §7.2 — tecnología de render para un nodo/subárbol.
|
|
173
|
+
* `native` = vistas del SO; `custom` = renderer propio Skia (100 %);
|
|
174
|
+
* `auto` = lo decide el host según capacidades. El camino JS (ventana
|
|
175
|
+
* virtualizada en JS) NO es un valor de este dial: es la implementación
|
|
176
|
+
* de respaldo de `native`/`auto` cuando el host no declara la capacidad.
|
|
177
|
+
* `custom` sin renderer Skia disponible debe fallar con diagnóstico,
|
|
178
|
+
* nunca caer en silencio al path JS.
|
|
179
|
+
* ADR-0056: este dial es SOLO la superficie (quién pinta). El propietario
|
|
180
|
+
* de la ventana de una lista es `list.materialization`, eje separado —
|
|
181
|
+
* `native` aquí no implica RecyclerView ni `custom` la lista Skia. */
|
|
182
|
+
export type RenderPolicy = "auto" | "custom" | "native";
|
|
183
|
+
|
|
184
|
+
/** ADR-0056 — propietario de la ventana/reciclaje/bind de una `list`.
|
|
185
|
+
* Independiente de `RenderPolicy`: `native`+`js` es válido (vistas
|
|
186
|
+
* nativas materializadas por la ventana JS). Ver `list.materialization`. */
|
|
187
|
+
export type ListMaterialization = "auto" | "host" | "js";
|
|
188
|
+
|
|
189
|
+
// Binding reactivo (inline en el nodo que lo consume)
|
|
190
|
+
export type TextBinding = {
|
|
191
|
+
binding: Binding; // binding completo, inline (v3.5)
|
|
192
|
+
initial: string; // valor inicial calculado (SSR/hidratación)
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
export type Binding =
|
|
196
|
+
| { kind: "signal"; signal: string }
|
|
197
|
+
| { kind: "computed"; signal: string } // computed expuesto como signal por nombre
|
|
198
|
+
| {
|
|
199
|
+
kind: "template";
|
|
200
|
+
parts: string[]; // partes estáticas del template
|
|
201
|
+
expressions: Array<{ signal: string }>; // partes dinámicas intercaladas
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
// Eventos y handlers
|
|
205
|
+
export type EventBinding = {
|
|
206
|
+
handler: string; // ref a IRDocument.handlers[id]
|
|
207
|
+
class?: "discrete" | "continuous"; // discrete = entrega garantizada
|
|
208
|
+
// continuous = coalescido por frame (§6)
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
export type HandlerDescriptor = {
|
|
212
|
+
name?: string;
|
|
213
|
+
kind: "js" | "command" | "worklet"; // js: hilo principal
|
|
214
|
+
// command: llamada async a módulo nativo (§6.2)
|
|
215
|
+
// worklet: corre en UI thread (Capa 6, Phase 1.5)
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
// Style — keys tipadas (decisión M0.2: autocompletado + compile-time),
|
|
219
|
+
// serialización = solo props escritas (A.6.2). El set runtime valida
|
|
220
|
+
// en el lado embebido mientras no exista el linter (Capa 7).
|
|
221
|
+
// ADR-0024: el vocabulario crece con las claves ya implementadas en los
|
|
222
|
+
// backends (opacity, position+edges, display, overflow, fontFamily,
|
|
223
|
+
// fontStyle, textTransform, boxShadow, objectFit). Unidades: number =
|
|
224
|
+
// unidad lógica (px web / dp Android, density-aware en Yoga); string =
|
|
225
|
+
// valor CSS en web y, para claves de color, Color.parseColor en Android
|
|
226
|
+
// ("#rgb"/"#rrggbb"/"#aarrggbb"/nombres). boxShadow: web pasa el string
|
|
227
|
+
// tal cual; Android aproxima elevation con blur/max-offset del string.
|
|
228
|
+
// Keys no implementadas por un backend se ignoran (contrato best-effort
|
|
229
|
+
// visual — el layout nunca depende de una clave visual).
|
|
230
|
+
export type StyleKey =
|
|
231
|
+
// Dimensiones
|
|
232
|
+
| "width" | "height" | "minWidth" | "maxWidth" | "minHeight" | "maxHeight"
|
|
233
|
+
// ADR-0118: boxSizing — width/height border-box (default Yoga/W3C)
|
|
234
|
+
// o content-box (excluye padding+border). direction — dirección de
|
|
235
|
+
// escritura del nodo y descendientes: resuelve los bordes lógicos
|
|
236
|
+
// Start/End e invierte el orden del flex (CSS direction en web,
|
|
237
|
+
// YGNodeStyleSetDirection en Android).
|
|
238
|
+
| "boxSizing" | "direction"
|
|
239
|
+
// Flexbox
|
|
240
|
+
| "flexDirection" | "flexWrap" | "alignItems" | "alignSelf" | "justifyContent"
|
|
241
|
+
| "alignContent"
|
|
242
|
+
| "flexGrow" | "flexShrink" | "flexBasis" | "gap" | "rowGap" | "columnGap"
|
|
243
|
+
// ADR-0127: `flex` lo expande el reconciler a longhands antes del
|
|
244
|
+
// wire (ningún backend lo interpreta): n > 0 → grow n, shrink 1,
|
|
245
|
+
// basis 0; 0 → inflexible; n < 0 → shrink -n.
|
|
246
|
+
| "flex"
|
|
247
|
+
// ADR-0118: aspectRatio — ratio w/h (número) aplicado por Yoga/CSS
|
|
248
|
+
// cuando una dimensión queda indefinida; igualdad de comportamiento
|
|
249
|
+
// con `aspect-ratio` CSS requiere min/max respetuosos.
|
|
250
|
+
| "aspectRatio"
|
|
251
|
+
// Spacing (ADR-0118: variantes lógicas inline/block — Start/End se
|
|
252
|
+
// resuelven por `direction`; Block* = top/bottom en horizontal-tb)
|
|
253
|
+
| "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft"
|
|
254
|
+
| "paddingInline" | "paddingInlineStart" | "paddingInlineEnd"
|
|
255
|
+
| "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd"
|
|
256
|
+
| "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft"
|
|
257
|
+
| "marginInline" | "marginInlineStart" | "marginInlineEnd"
|
|
258
|
+
| "marginBlock" | "marginBlockStart" | "marginBlockEnd"
|
|
259
|
+
// Posición y apilado (inset*/Start/End: offsets por borde lógico;
|
|
260
|
+
// position:static = en flujo sin offsets — ADR-0118)
|
|
261
|
+
| "position" | "top" | "right" | "bottom" | "left" | "zIndex"
|
|
262
|
+
| "inset" | "insetInlineStart" | "insetInlineEnd"
|
|
263
|
+
| "insetBlockStart" | "insetBlockEnd"
|
|
264
|
+
| "display" | "overflow"
|
|
265
|
+
// ADR-0122: delegado de layout por subárbol — un delegado
|
|
266
|
+
// registrado (masonry built-in, módulos nativos) fija las dims auto
|
|
267
|
+
// del nodo y sustituye los rects flex de sus hijos directos. Sus
|
|
268
|
+
// parámetros viajan por la prop `layoutParams` (update-props).
|
|
269
|
+
| "layout"
|
|
270
|
+
// Texto y color
|
|
271
|
+
| "color" | "backgroundColor" | "fontSize" | "fontWeight" | "lineHeight"
|
|
272
|
+
| "fontFamily" | "fontStyle" | "textTransform" | "textAlign"
|
|
273
|
+
| "textDecoration" | "letterSpacing"
|
|
274
|
+
// Visual
|
|
275
|
+
| "opacity" | "boxShadow" | "objectFit" | "backgroundGradient" | "cursor"
|
|
276
|
+
// Bordes (widths por edge: Yoga reserva el espacio; Android dibuja
|
|
277
|
+
// el trazo por lado con ElurBoxDrawable — ADR-0131; web: CSS)
|
|
278
|
+
| "borderRadius"
|
|
279
|
+
| "borderTopLeftRadius" | "borderTopRightRadius"
|
|
280
|
+
| "borderBottomRightRadius" | "borderBottomLeftRadius"
|
|
281
|
+
| "borderWidth" | "borderColor" | "borderStyle"
|
|
282
|
+
| "borderTopWidth" | "borderRightWidth" | "borderBottomWidth" | "borderLeftWidth"
|
|
283
|
+
| "borderInlineStartWidth" | "borderInlineEndWidth"
|
|
284
|
+
| "borderBlockStartWidth" | "borderBlockEndWidth"
|
|
285
|
+
// Transforms (ADR-0038 — propiedades de compositor, post-layout:
|
|
286
|
+
// no pasan por Yoga — igual que CSS transform no afecta layout.
|
|
287
|
+
// translateX/Y en unidades lógicas; scaleX/Y factor; rotate grados.
|
|
288
|
+
// CONTRATO de propiedad única (R6.1): un valor animado por worklet
|
|
289
|
+
// (UI thread) NO debe escribirse también por update-style desde JS —
|
|
290
|
+
// último-escritor-gana y pisan la animación. El framework no lo
|
|
291
|
+
// detecta aún: es error de la app, como en React Native).
|
|
292
|
+
| "translateX" | "translateY" | "scaleX" | "scaleY" | "rotate";
|
|
293
|
+
|
|
294
|
+
export type Style = {
|
|
295
|
+
[K in StyleKey]?: number | string;
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
// Forma de autoría en IRNode.style: además de valores resueltos, cada
|
|
299
|
+
// clave admite un Binding {kind:"signal"} — el reconciler suscribe el
|
|
300
|
+
// signal y emite update-style parcial por clave (ADR-0024). Los ops en
|
|
301
|
+
// el wire siempre llevan Style resuelto (número/string), nunca bindings.
|
|
302
|
+
export type StyleInput = {
|
|
303
|
+
[K in StyleKey]?: number | string | Binding;
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
// Vocabulario de dibujo de `canvas` (ADR-0020): lista serializable
|
|
307
|
+
// (JSON en update-props — no requiere cambio de ABI). Replay 1:1 en
|
|
308
|
+
// CanvasRenderingContext2D (web), android.graphics.Canvas (Platform
|
|
309
|
+
// Views) y Skia (opt-in, renderer del árbol completo — gate propio).
|
|
310
|
+
//
|
|
311
|
+
// CONTRATO: cada comando lleva su pintura (fill/stroke/lineWidth) —
|
|
312
|
+
// sin estado ambiente entre comandos, replay determinista. save/
|
|
313
|
+
// restore y transforms sí mutan el estado del contexto (son la forma
|
|
314
|
+
// de componer transformaciones sin exponer matrices).
|
|
315
|
+
export type CanvasCmd =
|
|
316
|
+
| { op: "clear"; color?: string } // fondo entero
|
|
317
|
+
| { op: "rect"; x: number; y: number; w: number; h: number; radius?: number; fill?: string; stroke?: string; lineWidth?: number }
|
|
318
|
+
| { op: "circle"; x: number; y: number; r: number; fill?: string; stroke?: string; lineWidth?: number }
|
|
319
|
+
| { op: "arc"; x: number; y: number; r: number; startAngle: number; endAngle: number; counterclockwise?: boolean; fill?: string; stroke?: string; lineWidth?: number }
|
|
320
|
+
| { op: "line"; x1: number; y1: number; x2: number; y2: number; stroke?: string; lineWidth?: number }
|
|
321
|
+
| { op: "path"; d: string; fill?: string; stroke?: string; lineWidth?: number } // d = SVG path data
|
|
322
|
+
| { op: "svgPath"; d: string; fill?: string; stroke?: string; lineWidth?: number }
|
|
323
|
+
| { op: "text"; text: string; x: number; y: number; color?: string; size?: number; font?: string; align?: "left" | "center" | "right" }
|
|
324
|
+
| { op: "save" } | { op: "restore" }
|
|
325
|
+
| { op: "translate"; x: number; y: number }
|
|
326
|
+
| { op: "rotate"; deg: number } // grados (no rad)
|
|
327
|
+
| { op: "scale"; x: number; y?: number };
|
|
328
|
+
|
|
329
|
+
// Props de text-input (ADR-0021) — vocabulario neutral de intención:
|
|
330
|
+
// cada backend mapea al atributo/flag nativo (type+inputmode en web,
|
|
331
|
+
// InputType/imeOptions/autofillHints en Android).
|
|
332
|
+
export type KeyboardType =
|
|
333
|
+
| "default" | "email" | "number" | "decimal" | "phone" | "url" | "password"
|
|
334
|
+
| "date" | "time" | "datetime";
|
|
335
|
+
export type EnterKey = "done" | "go" | "next" | "search" | "send";
|
|
336
|
+
/** `selection` = write-only: fija caret/rango programáticamente. */
|
|
337
|
+
export type SelectionRange = { start: number; end: number };
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* ADR-0038/V09 — composición del vocabulario transform a CSS `transform`.
|
|
341
|
+
* Regla ÚNICA compartida por el backend web (applyTransformKey) y el
|
|
342
|
+
* aplicador SSR (html-applicator): ambos serializan idéntico para que la
|
|
343
|
+
* primera pintura hidratada coincida con la servida. Orden fijo
|
|
344
|
+
* translate→scale→rotate; translate en px, rotate en deg, scale factor.
|
|
345
|
+
* DOM-free (QuickJS/Hermes safe). `null`/`undefined` retira la parte.
|
|
346
|
+
*/
|
|
347
|
+
export function composeTransformCss(
|
|
348
|
+
parts: Record<string, unknown>,
|
|
349
|
+
): string {
|
|
350
|
+
const out: string[] = [];
|
|
351
|
+
if (parts.translateX != null) out.push(`translateX(${parts.translateX}px)`);
|
|
352
|
+
if (parts.translateY != null) out.push(`translateY(${parts.translateY}px)`);
|
|
353
|
+
if (parts.scaleX != null || parts.scaleY != null) {
|
|
354
|
+
out.push(`scale(${parts.scaleX ?? 1}, ${parts.scaleY ?? 1})`);
|
|
355
|
+
}
|
|
356
|
+
if (parts.rotate != null) out.push(`rotate(${parts.rotate}deg)`);
|
|
357
|
+
return out.join(" ");
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export const TRANSFORM_STYLE_KEYS: ReadonlySet<string> = new Set<string>([
|
|
361
|
+
"translateX", "translateY", "scaleX", "scaleY", "rotate",
|
|
362
|
+
]);
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* ADR-0131 — `stateStyle`: variantes visuales por estado de vista, prop
|
|
366
|
+
* serializable (precedente `animate`, ADR-0023 — JSON en update-props,
|
|
367
|
+
* sin ABI). Forma:
|
|
368
|
+
*
|
|
369
|
+
* stateStyle={{ pressed: {opacity: .7}, selected: {backgroundColor: c} }}
|
|
370
|
+
*
|
|
371
|
+
* Solo claves de STATE_STYLE_KEYS — un estado nunca re-layout; el resto
|
|
372
|
+
* se descarta en la serialización (y avisa con strictStyles). El cambio
|
|
373
|
+
* de estado NO cruza el puente JS: web lo materializa en una hoja
|
|
374
|
+
* gestionada (`[data-elur-id]:active`, `:hover` en `@media(hover:hover)`,
|
|
375
|
+
* `:focus-visible`, `[aria-selected]`, `[aria-disabled]` con !important,
|
|
376
|
+
* pues el estilo base viaja inline) y Android en StateListDrawable/
|
|
377
|
+
* ColorStateList/StateListAnimator sobre los estados de vista que ya fija
|
|
378
|
+
* la semántica (ADR-0117). Prioridad (gana el último en empate CSS, el
|
|
379
|
+
* primero en StateListDrawable): disabled > pressed > focused > hovered
|
|
380
|
+
* > selected. `hovered` es `no` en Android sin puntero (approx por
|
|
381
|
+
* state_hovered, solo visible con mouse/TV).
|
|
382
|
+
*/
|
|
383
|
+
export type StateStyleName =
|
|
384
|
+
"pressed" | "hovered" | "focused" | "selected" | "disabled";
|
|
385
|
+
|
|
386
|
+
export type StateStyleSpec = {
|
|
387
|
+
[S in StateStyleName]?: Style;
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
/** Claves permitidas dentro de stateStyle — visuales sin re-layout. */
|
|
391
|
+
export const STATE_STYLE_KEYS: ReadonlySet<string> = new Set<string>([
|
|
392
|
+
"color", "backgroundColor", "backgroundGradient", "opacity", "cursor",
|
|
393
|
+
"borderColor", "borderWidth", "borderRadius",
|
|
394
|
+
"borderTopLeftRadius", "borderTopRightRadius",
|
|
395
|
+
"borderBottomRightRadius", "borderBottomLeftRadius",
|
|
396
|
+
"borderTopWidth", "borderRightWidth", "borderBottomWidth", "borderLeftWidth",
|
|
397
|
+
"borderInlineStartWidth", "borderInlineEndWidth",
|
|
398
|
+
"borderBlockStartWidth", "borderBlockEndWidth",
|
|
399
|
+
"textDecoration", "fontWeight", "fontStyle", "letterSpacing",
|
|
400
|
+
"translateX", "translateY", "scaleX", "scaleY", "rotate",
|
|
401
|
+
]);
|
|
402
|
+
|
|
403
|
+
/** Prioridad de estados, de MENOR a MAYOR (CSS: último gana; Android
|
|
404
|
+
* StateListDrawable: primero gana → el host invierte el orden). */
|
|
405
|
+
export const STATE_STYLE_ORDER: readonly StateStyleName[] = [
|
|
406
|
+
"selected", "hovered", "focused", "pressed", "disabled",
|
|
407
|
+
];
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* ADR-0147 — `spans`: texto enriquecido inline sobre nodos `text`,
|
|
411
|
+
* prop serializable (precedente `stateStyle`, ADR-0131 — JSON en
|
|
412
|
+
* update-props, sin cambio de ABI). Un span es un RUN dentro del
|
|
413
|
+
* párrafo, no una caja: puede partirse entre líneas, por eso no se
|
|
414
|
+
* modela como hijo ni delegado de layout.
|
|
415
|
+
*
|
|
416
|
+
* spans=[{ start: 0, end: 12, style: { fontWeight: "bold" } },
|
|
417
|
+
* { start: 21, end: 26, style: { color: "#06c" }, href: "/x" }]
|
|
418
|
+
*
|
|
419
|
+
* CONTRATO:
|
|
420
|
+
* - `start`/`end` son offsets UTF-16 sobre el texto RENDERIZADO
|
|
421
|
+
* (post-textTransform); el backend clampea — el texto puede venir de
|
|
422
|
+
* un binding reactivo más corto que los rangos declarados.
|
|
423
|
+
* - Solapamiento SOLO por anidación (un span contiene entero a otro):
|
|
424
|
+
* el DOM/HTML no puede expresar rangos parcialmente solapados y el
|
|
425
|
+
* contrato debe poder materializarse en ambos backends.
|
|
426
|
+
* - `style` es un subset tipográfico (TEXT_SPAN_STYLE_KEYS); el resto
|
|
427
|
+
* es rechazado por validateTextSpans.
|
|
428
|
+
* - `href` reusa la navegación de ADR-0133: el reconciler registra el
|
|
429
|
+
* handler interno `__elur_span_href` (payload = url); web despacha
|
|
430
|
+
* same-origin por él y deja la externa al <a> nativo, Android la
|
|
431
|
+
* invoca via ClickableSpan → callHandlerWithString.
|
|
432
|
+
* - Aplica a nodos `text` (TextView). text-input/EditText la ignora —
|
|
433
|
+
* spans estáticos sobre contenido IME romperían la composición.
|
|
434
|
+
*/
|
|
435
|
+
export type TextSpanStyleKey =
|
|
436
|
+
| "color" | "backgroundColor" | "fontSize" | "fontWeight"
|
|
437
|
+
| "fontFamily" | "fontStyle" | "textDecoration" | "letterSpacing";
|
|
438
|
+
|
|
439
|
+
export interface TextSpan {
|
|
440
|
+
start: number;
|
|
441
|
+
end: number;
|
|
442
|
+
style?: { [K in TextSpanStyleKey]?: number | string };
|
|
443
|
+
href?: string;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
export const TEXT_SPAN_STYLE_KEYS: ReadonlySet<string> = new Set<string>([
|
|
447
|
+
"color", "backgroundColor", "fontSize", "fontWeight",
|
|
448
|
+
"fontFamily", "fontStyle", "textDecoration", "letterSpacing",
|
|
449
|
+
]);
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Valida y normaliza la prop `spans` (ADR-0147): ordena por
|
|
453
|
+
* (start asc, end desc), exige enteros 0 ≤ start < end, estilo dentro
|
|
454
|
+
* de TEXT_SPAN_STYLE_KEYS y solapamiento solo por anidación. Devuelve
|
|
455
|
+
* undefined si la forma es inválida o el array está vacío. DOM-free —
|
|
456
|
+
* corre en el reconciler (QuickJS/Hermes).
|
|
457
|
+
*/
|
|
458
|
+
export function validateTextSpans(v: unknown): readonly TextSpan[] | undefined {
|
|
459
|
+
if (!Array.isArray(v)) return undefined;
|
|
460
|
+
const norm: TextSpan[] = [];
|
|
461
|
+
for (const raw of v) {
|
|
462
|
+
if (!raw || typeof raw !== "object") return undefined;
|
|
463
|
+
const s = raw as Record<string, unknown>;
|
|
464
|
+
const start = s.start, end = s.end;
|
|
465
|
+
if (!Number.isInteger(start) || !Number.isInteger(end) ||
|
|
466
|
+
(start as number) < 0 || (end as number) <= (start as number)) {
|
|
467
|
+
return undefined;
|
|
468
|
+
}
|
|
469
|
+
if (s.style !== undefined) {
|
|
470
|
+
if (typeof s.style !== "object" || s.style === null) return undefined;
|
|
471
|
+
for (const k of Object.keys(s.style as object)) {
|
|
472
|
+
if (!TEXT_SPAN_STYLE_KEYS.has(k)) return undefined;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
if (s.href !== undefined && typeof s.href !== "string") return undefined;
|
|
476
|
+
const span: TextSpan = {
|
|
477
|
+
start: start as number, end: end as number,
|
|
478
|
+
};
|
|
479
|
+
if (s.style) span.style = s.style as TextSpan["style"];
|
|
480
|
+
if (s.href) span.href = s.href as string;
|
|
481
|
+
norm.push(span);
|
|
482
|
+
}
|
|
483
|
+
if (norm.length === 0) return undefined;
|
|
484
|
+
norm.sort((a, b) => a.start - b.start || b.end - a.end);
|
|
485
|
+
const stack: TextSpan[] = [];
|
|
486
|
+
for (const s of norm) {
|
|
487
|
+
while (stack.length > 0 && stack[stack.length - 1].end <= s.start) stack.pop();
|
|
488
|
+
const top = stack[stack.length - 1];
|
|
489
|
+
// top cubre s.start → s debe caber entero (anidación); si no,
|
|
490
|
+
// el solape es parcial y la forma es inválida.
|
|
491
|
+
if (top && s.end > top.end) return undefined;
|
|
492
|
+
stack.push(s);
|
|
493
|
+
}
|
|
494
|
+
return norm;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/** Árbol de spans anidados — raíz virtual [0, text.length]. */
|
|
498
|
+
export interface TextSpanNode extends TextSpan {
|
|
499
|
+
children: TextSpanNode[];
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Materialización del contrato `spans` compartida por el backend web
|
|
504
|
+
* (DOM) y el aplicador SSR (HTML): devuelve el árbol de rangos anidados
|
|
505
|
+
* clampeado a `text`. Ambos recorren `children` emitiendo el texto
|
|
506
|
+
* intercalado — la paridad web/SSR sale de la misma estructura.
|
|
507
|
+
* DOM-free.
|
|
508
|
+
*/
|
|
509
|
+
export function spanTree(text: string, spans: readonly TextSpan[]): TextSpanNode {
|
|
510
|
+
const root: TextSpanNode = { start: 0, end: text.length, children: [] };
|
|
511
|
+
const stack: TextSpanNode[] = [root];
|
|
512
|
+
for (const s of spans) {
|
|
513
|
+
if (s.start >= text.length) continue;
|
|
514
|
+
const node: TextSpanNode = {
|
|
515
|
+
start: s.start, end: Math.min(s.end, text.length),
|
|
516
|
+
style: s.style, href: s.href, children: [],
|
|
517
|
+
};
|
|
518
|
+
if (node.end <= node.start) continue;
|
|
519
|
+
while (stack.length > 1 && stack[stack.length - 1].end <= node.start) {
|
|
520
|
+
stack.pop();
|
|
521
|
+
}
|
|
522
|
+
stack[stack.length - 1].children.push(node);
|
|
523
|
+
stack.push(node);
|
|
524
|
+
}
|
|
525
|
+
return root;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
// V14 — validación de VALORES en modo estricto (no solo claves). La
|
|
529
|
+
// tabla acota al contrato portátil: lo que Yoga (elurYoga.cpp) y el
|
|
530
|
+
// applyStyle de Kotlin interpretan de verdad — un valor fuera de la
|
|
531
|
+
// tabla sería aceptado por CSS en web e ignorado silencioso en Android.
|
|
532
|
+
// DOM-free: corre en el reconciler (QuickJS/Hermes).
|
|
533
|
+
|
|
534
|
+
const PCT_RE = /^-?\d+(\.\d+)?%$/;
|
|
535
|
+
|
|
536
|
+
/** number | "<n>%" — y opcionalmente "auto". */
|
|
537
|
+
function dimValue(v: unknown, allowAuto: boolean): boolean {
|
|
538
|
+
if (typeof v === "number") return true;
|
|
539
|
+
if (typeof v !== "string") return false;
|
|
540
|
+
if (PCT_RE.test(v)) return true;
|
|
541
|
+
return allowAuto && v === "auto";
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
const DIM_AUTO = new Set([
|
|
545
|
+
"width", "height", "flexBasis",
|
|
546
|
+
"margin", "marginTop", "marginRight", "marginBottom", "marginLeft",
|
|
547
|
+
"marginInline", "marginInlineStart", "marginInlineEnd",
|
|
548
|
+
"marginBlock", "marginBlockStart", "marginBlockEnd",
|
|
549
|
+
]);
|
|
550
|
+
const DIM_NO_AUTO = new Set([
|
|
551
|
+
"minWidth", "maxWidth", "minHeight", "maxHeight",
|
|
552
|
+
"padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft",
|
|
553
|
+
"paddingInline", "paddingInlineStart", "paddingInlineEnd",
|
|
554
|
+
"paddingBlock", "paddingBlockStart", "paddingBlockEnd",
|
|
555
|
+
"top", "right", "bottom", "left",
|
|
556
|
+
"inset", "insetInlineStart", "insetInlineEnd",
|
|
557
|
+
"insetBlockStart", "insetBlockEnd",
|
|
558
|
+
]);
|
|
559
|
+
const NUM_ONLY = new Set([
|
|
560
|
+
"gap", "rowGap", "columnGap", "flex", "flexGrow", "flexShrink", "zIndex",
|
|
561
|
+
"aspectRatio",
|
|
562
|
+
"fontSize", "lineHeight", "letterSpacing",
|
|
563
|
+
"borderRadius",
|
|
564
|
+
"borderTopLeftRadius", "borderTopRightRadius",
|
|
565
|
+
"borderBottomRightRadius", "borderBottomLeftRadius",
|
|
566
|
+
"borderWidth", "borderTopWidth", "borderRightWidth",
|
|
567
|
+
"borderBottomWidth", "borderLeftWidth", "borderInlineStartWidth",
|
|
568
|
+
"borderInlineEndWidth", "borderBlockStartWidth", "borderBlockEndWidth",
|
|
569
|
+
"opacity",
|
|
570
|
+
"translateX", "translateY", "scaleX", "scaleY", "rotate",
|
|
571
|
+
]);
|
|
572
|
+
const STRING_FREE = new Set([
|
|
573
|
+
"fontFamily", "boxShadow", "color", "backgroundColor", "backgroundGradient",
|
|
574
|
+
"borderColor", "cursor", "layout",
|
|
575
|
+
]);
|
|
576
|
+
const ENUMS: Record<string, ReadonlySet<string>> = {
|
|
577
|
+
flexDirection: new Set(["row", "column", "row-reverse", "column-reverse"]),
|
|
578
|
+
flexWrap: new Set(["wrap", "nowrap"]),
|
|
579
|
+
justifyContent: new Set([
|
|
580
|
+
"flex-start", "center", "flex-end", "space-between", "space-around",
|
|
581
|
+
"space-evenly",
|
|
582
|
+
]),
|
|
583
|
+
alignItems: new Set([
|
|
584
|
+
"flex-start", "center", "flex-end", "stretch", "baseline",
|
|
585
|
+
]),
|
|
586
|
+
alignSelf: new Set([
|
|
587
|
+
"flex-start", "center", "flex-end", "stretch", "baseline",
|
|
588
|
+
]),
|
|
589
|
+
alignContent: new Set([
|
|
590
|
+
"flex-start", "center", "flex-end", "stretch", "space-between",
|
|
591
|
+
"space-around", "space-evenly", "baseline",
|
|
592
|
+
]),
|
|
593
|
+
position: new Set(["relative", "absolute", "static"]),
|
|
594
|
+
display: new Set(["flex", "none", "contents"]),
|
|
595
|
+
boxSizing: new Set(["border-box", "content-box"]),
|
|
596
|
+
direction: new Set(["ltr", "rtl"]),
|
|
597
|
+
overflow: new Set(["visible", "hidden", "scroll", "auto"]),
|
|
598
|
+
fontStyle: new Set(["normal", "italic"]),
|
|
599
|
+
textAlign: new Set(["auto", "left", "right", "center", "justify", "start", "end"]),
|
|
600
|
+
textTransform: new Set(["none", "uppercase", "lowercase", "capitalize"]),
|
|
601
|
+
textDecoration: new Set(["none", "underline", "line-through"]),
|
|
602
|
+
borderStyle: new Set(["solid", "dashed", "dotted", "none"]),
|
|
603
|
+
objectFit: new Set(["cover", "contain", "fill", "scale-down", "none"]),
|
|
604
|
+
};
|
|
605
|
+
|
|
606
|
+
/** Valida el VALOR de una clave de estilo contra el contrato portátil
|
|
607
|
+
* (V14). `null`/`undefined` siempre válidos — retirada de parte. */
|
|
608
|
+
export function validateStyleValue(key: string, value: unknown): boolean {
|
|
609
|
+
if (value == null) return true;
|
|
610
|
+
const en = ENUMS[key];
|
|
611
|
+
if (en) return typeof value === "string" && en.has(value);
|
|
612
|
+
if (key === "fontWeight") {
|
|
613
|
+
// Kotlin: "bold" o número ≥600; web: normal/bold/100..900.
|
|
614
|
+
return typeof value === "number" || value === "normal" || value === "bold";
|
|
615
|
+
}
|
|
616
|
+
if (DIM_AUTO.has(key)) return dimValue(value, true);
|
|
617
|
+
if (DIM_NO_AUTO.has(key)) return dimValue(value, false);
|
|
618
|
+
if (NUM_ONLY.has(key)) return typeof value === "number";
|
|
619
|
+
if (STRING_FREE.has(key)) return typeof value === "string";
|
|
620
|
+
// Clave fuera de las tablas pero dentro del vocabulario (ninguna
|
|
621
|
+
// hoy) → aceptar: la clave ya pasó el filtro STRICT_FLEXBOX_KEYS.
|
|
622
|
+
return true;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
/** Validación runtime en el lado embebido (stand-in del linter de Capa 7). */
|
|
626
|
+
export const STRICT_FLEXBOX_KEYS: ReadonlySet<string> = new Set<string>([
|
|
627
|
+
"width", "height", "minWidth", "maxWidth", "minHeight", "maxHeight",
|
|
628
|
+
"boxSizing", "direction",
|
|
629
|
+
"flexDirection", "flexWrap", "alignItems", "alignSelf", "justifyContent",
|
|
630
|
+
"alignContent",
|
|
631
|
+
"flex", "flexGrow", "flexShrink", "flexBasis", "gap", "rowGap", "columnGap",
|
|
632
|
+
"aspectRatio",
|
|
633
|
+
"padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft",
|
|
634
|
+
"paddingInline", "paddingInlineStart", "paddingInlineEnd",
|
|
635
|
+
"paddingBlock", "paddingBlockStart", "paddingBlockEnd",
|
|
636
|
+
"margin", "marginTop", "marginRight", "marginBottom", "marginLeft",
|
|
637
|
+
"marginInline", "marginInlineStart", "marginInlineEnd",
|
|
638
|
+
"marginBlock", "marginBlockStart", "marginBlockEnd",
|
|
639
|
+
"position", "top", "right", "bottom", "left", "zIndex",
|
|
640
|
+
"inset", "insetInlineStart", "insetInlineEnd",
|
|
641
|
+
"insetBlockStart", "insetBlockEnd",
|
|
642
|
+
"display", "overflow", "layout",
|
|
643
|
+
"color", "backgroundColor", "fontSize", "fontWeight", "lineHeight",
|
|
644
|
+
"fontFamily", "fontStyle", "textTransform", "textAlign",
|
|
645
|
+
"textDecoration", "letterSpacing",
|
|
646
|
+
"opacity", "boxShadow", "objectFit", "backgroundGradient", "cursor",
|
|
647
|
+
"borderRadius",
|
|
648
|
+
"borderTopLeftRadius", "borderTopRightRadius",
|
|
649
|
+
"borderBottomRightRadius", "borderBottomLeftRadius",
|
|
650
|
+
"borderWidth", "borderColor", "borderStyle",
|
|
651
|
+
"borderTopWidth", "borderRightWidth", "borderBottomWidth",
|
|
652
|
+
"borderLeftWidth", "borderInlineStartWidth", "borderInlineEndWidth",
|
|
653
|
+
"borderBlockStartWidth", "borderBlockEndWidth",
|
|
654
|
+
"translateX", "translateY", "scaleX", "scaleY", "rotate",
|
|
655
|
+
]);
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* F14/R4.6 (ADR-0086) — nivel de soporte de una capacidad por backend:
|
|
659
|
+
* `exact` = semántica completa; `approx` = aproximación documentada en
|
|
660
|
+
* `note`; `no` = no soportado (el backend la ignora silenciosamente).
|
|
661
|
+
*/
|
|
662
|
+
export type CapabilityLevel = "exact" | "approx" | "no";
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* ADR-0178 — backends con columna en la matriz normativa. Un host que
|
|
666
|
+
* entra al repo entra aquí: la matriz es la fuente de la portabilidad
|
|
667
|
+
* (`isPortable*`), del presupuesto de divergencias (ADR-0146) y de las
|
|
668
|
+
* tablas §4.2–§4.4 del documento (generadas, no copiadas).
|
|
669
|
+
*/
|
|
670
|
+
export const CAPABILITY_PLATFORMS = ["web", "android", "linux"] as const;
|
|
671
|
+
export type CapabilityPlatform = (typeof CAPABILITY_PLATFORMS)[number];
|
|
672
|
+
|
|
673
|
+
export interface CapabilityEntry {
|
|
674
|
+
web: CapabilityLevel;
|
|
675
|
+
android: CapabilityLevel;
|
|
676
|
+
/** Host GTK4 (targets/linux) — nivel del aplicador real, no la intención. */
|
|
677
|
+
linux: CapabilityLevel;
|
|
678
|
+
/** Por qué el nivel no es exact — la aproximación o el hueco real. */
|
|
679
|
+
note?: string;
|
|
680
|
+
/**
|
|
681
|
+
* ADR-0146: ficha de divergencia — OBLIGATORIA cuando los niveles
|
|
682
|
+
* difieren entre backends o alguno no es `exact` (excepto `no`/`no`,
|
|
683
|
+
* que es vocabulario declarado sin implementar, no divergencia).
|
|
684
|
+
* `adr` resuelve a docs/adr/NNNN-*.md (≤12 = índice) o
|
|
685
|
+
* `doc:<referencia>`; el conteo global lo vigila
|
|
686
|
+
* cli/check-divergences.mjs contra tests/divergences/manifest.json.
|
|
687
|
+
*/
|
|
688
|
+
divergence?: {
|
|
689
|
+
class: "normativa" | "aproximacion" | "bug-aceptado";
|
|
690
|
+
adr: string;
|
|
691
|
+
};
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* Matriz de capacidades de props de `update-props` (F14, ADR-0086).
|
|
696
|
+
* Solo vocabulario portátil — las props de platform-view las define el
|
|
697
|
+
* módulo (ADR-0080) y no entran aquí. El nivel refleja el backend REAL
|
|
698
|
+
* (web: src/backends/web; android: ElurRenderer.applyPropsOnView; linux:
|
|
699
|
+
* Applicator::applyProp/applySemantics), no la intención.
|
|
700
|
+
*/
|
|
701
|
+
export const PROPS_CAPABILITY: Readonly<Record<string, CapabilityEntry>> = {
|
|
702
|
+
placeholder: { web: "exact", android: "exact", linux: "exact" },
|
|
703
|
+
value: { web: "exact", android: "exact", linux: "exact" },
|
|
704
|
+
// ADR-0117: `checked` viaja por update-semantics — materializa
|
|
705
|
+
// widget (input.checked / CompoundButton.isChecked / GtkSwitch) y
|
|
706
|
+
// estado a11y.
|
|
707
|
+
checked: { web: "exact", android: "exact", linux: "exact", note: "op update-semantics (SEMANTICS_VERSION 3); \"mixed\" es aprox en android (stateDescription — nodeInfo sin tristate, ADR-0152); linux: tristate nativo AT-SPI" },
|
|
708
|
+
min: {
|
|
709
|
+
web: "approx", android: "exact", linux: "exact",
|
|
710
|
+
note: "web: propiedad DOM genérica (input range)",
|
|
711
|
+
divergence: { class: "aproximacion", adr: "doc:v4.1 §6.2.2" },
|
|
712
|
+
},
|
|
713
|
+
max: {
|
|
714
|
+
web: "approx", android: "exact", linux: "exact",
|
|
715
|
+
note: "web: propiedad DOM genérica (input range)",
|
|
716
|
+
divergence: { class: "aproximacion", adr: "doc:v4.1 §6.2.2" },
|
|
717
|
+
},
|
|
718
|
+
src: { web: "exact", android: "exact", linux: "exact" },
|
|
719
|
+
url: {
|
|
720
|
+
web: "no", android: "exact", linux: "no",
|
|
721
|
+
note: "web: `el.url = v` no navega un iframe — falta mapeo a src; linux: sin WebView en el host GTK4",
|
|
722
|
+
divergence: { class: "aproximacion", adr: "doc:v4.1 §6.2.2" },
|
|
723
|
+
},
|
|
724
|
+
draw: {
|
|
725
|
+
web: "exact", android: "exact", linux: "no",
|
|
726
|
+
note: "linux: sin superficie `canvas` en el host GTK4 (pendiente declarado, ADR-0177)",
|
|
727
|
+
divergence: { class: "aproximacion", adr: "ADR-0177" },
|
|
728
|
+
},
|
|
729
|
+
// ADR-0123: superficie del nodo `canvas` — "custom" elige el backend
|
|
730
|
+
// raster Skia (cap `skia`); "auto"/"native" = Platform Views. Web y
|
|
731
|
+
// Linux tienen una sola superficie: la ignoran.
|
|
732
|
+
renderPolicy: {
|
|
733
|
+
web: "approx", android: "exact", linux: "approx",
|
|
734
|
+
note: "solo `canvas`; web y linux: única superficie (la ignoran)",
|
|
735
|
+
divergence: { class: "normativa", adr: "ADR-0123" },
|
|
736
|
+
},
|
|
737
|
+
keyboard: { web: "exact", android: "exact", linux: "exact", note: "linux: input purpose GTK + visibility=false en password (ADR-0179)" },
|
|
738
|
+
autocomplete: {
|
|
739
|
+
web: "exact", android: "exact", linux: "approx",
|
|
740
|
+
note: "linux: GTK4 no tiene framework de autofill — el token se acepta sin efecto",
|
|
741
|
+
divergence: { class: "normativa", adr: "ADR-0178" },
|
|
742
|
+
},
|
|
743
|
+
enterkey: {
|
|
744
|
+
web: "exact", android: "exact", linux: "approx",
|
|
745
|
+
note: "linux: sin teclado virtual con tecla de acción — Enter dispara `submit` (ADR-0179)",
|
|
746
|
+
divergence: { class: "normativa", adr: "ADR-0178" },
|
|
747
|
+
},
|
|
748
|
+
maxlength: {
|
|
749
|
+
web: "exact", android: "exact", linux: "approx",
|
|
750
|
+
note: "linux: gtk_entry_set_max_length cuenta code points; web/android unidades UTF-16 — difieren fuera del BMP",
|
|
751
|
+
divergence: { class: "aproximacion", adr: "ADR-0179" },
|
|
752
|
+
},
|
|
753
|
+
selection: { web: "exact", android: "exact", linux: "exact" },
|
|
754
|
+
label: {
|
|
755
|
+
web: "exact", android: "exact", linux: "approx",
|
|
756
|
+
note: "linux: en `text` el accessible-name de GtkLabel es su propio texto (GTK4 no deja sobrescribirlo); resto de tipos exact",
|
|
757
|
+
divergence: { class: "aproximacion", adr: "ADR-0176" },
|
|
758
|
+
},
|
|
759
|
+
accessible: { web: "exact", android: "exact", linux: "exact" },
|
|
760
|
+
// ADR-0108: vocabulario semántico dedicado (op update-semantics).
|
|
761
|
+
role: { web: "exact", android: "exact", linux: "exact" },
|
|
762
|
+
live: { web: "exact", android: "exact", linux: "exact" },
|
|
763
|
+
// ADR-0117: estado estructurado + hint + foco (v2).
|
|
764
|
+
selected: { web: "exact", android: "exact", linux: "exact" },
|
|
765
|
+
disabled: { web: "exact", android: "exact", linux: "exact" },
|
|
766
|
+
hint: { web: "exact", android: "exact", linux: "exact" },
|
|
767
|
+
focused: { web: "exact", android: "exact", linux: "exact" },
|
|
768
|
+
focusable: { web: "exact", android: "exact", linux: "exact" },
|
|
769
|
+
// ADR-0152 (SEMANTICS_VERSION 3): estados de formulario real.
|
|
770
|
+
// Android sin flag de expanded <API36 → ACTION_EXPAND/COLLAPSE +
|
|
771
|
+
// invocación al evento `action`/`press` es el mecanismo nativo.
|
|
772
|
+
expanded: { web: "exact", android: "exact", linux: "exact" },
|
|
773
|
+
invalid: { web: "exact", android: "exact", linux: "exact" },
|
|
774
|
+
required: {
|
|
775
|
+
web: "exact", android: "approx", linux: "exact",
|
|
776
|
+
note: "android: sin flag nativo → stateDescription localizada; web: aria-required + attr required; linux: GTK_ACCESSIBLE_PROPERTY_REQUIRED",
|
|
777
|
+
divergence: { class: "aproximacion", adr: "ADR-0152" },
|
|
778
|
+
},
|
|
779
|
+
// Rango para widgets custom — los nativos (SeekBar/input range)
|
|
780
|
+
// ya lo exponen. Android materializa RangeInfo solo con las 3
|
|
781
|
+
// partes presentes.
|
|
782
|
+
valueMin: { web: "exact", android: "exact", linux: "exact" },
|
|
783
|
+
valueMax: { web: "exact", android: "exact", linux: "exact" },
|
|
784
|
+
valueNow: { web: "exact", android: "exact", linux: "exact" },
|
|
785
|
+
valueText: {
|
|
786
|
+
web: "exact", android: "approx", linux: "exact",
|
|
787
|
+
note: "android: stateDescription (sin campo de value-text nativo); linux: GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT",
|
|
788
|
+
divergence: { class: "aproximacion", adr: "ADR-0152" },
|
|
789
|
+
},
|
|
790
|
+
// Acciones a11y personalizadas — DOM no expone acciones invocables
|
|
791
|
+
// por lector de pantalla; web enlaza el evento `action` vía
|
|
792
|
+
// CustomEvent `elur:action` pero nada las anuncia ni las invoca.
|
|
793
|
+
// Linux: GtkActionMuxer del widget → org.a11y.atspi.Action; el AT
|
|
794
|
+
// anuncia/invoca el id — la etiqueta (id|Label) no tiene canal.
|
|
795
|
+
actions: {
|
|
796
|
+
web: "no", android: "exact", linux: "approx",
|
|
797
|
+
note: "web: sin API DOM de acciones SR — CustomEvent programático sí despacha; linux: GAction por instancia vía muxer del widget — AT ve el id, sin canal para la etiqueta (ADR-0190)",
|
|
798
|
+
divergence: { class: "aproximacion", adr: "ADR-0190" },
|
|
799
|
+
},
|
|
800
|
+
dir: { web: "exact", android: "exact", linux: "exact" },
|
|
801
|
+
href: {
|
|
802
|
+
web: "exact", android: "approx", linux: "approx",
|
|
803
|
+
note: "ADR-0133: interna → router.push (sin @press), externa → ElurBridge.openUrl (linux: GtkUriLauncher); web: enlace real con as=\"a\"",
|
|
804
|
+
divergence: { class: "aproximacion", adr: "ADR-0133" },
|
|
805
|
+
},
|
|
806
|
+
as: {
|
|
807
|
+
web: "exact", android: "approx", linux: "approx",
|
|
808
|
+
note: "android/linux: solo h1..h6 → heading de accesibilidad",
|
|
809
|
+
divergence: { class: "aproximacion", adr: "ADR-0049" },
|
|
810
|
+
},
|
|
811
|
+
shell: {
|
|
812
|
+
web: "exact", android: "exact", linux: "no",
|
|
813
|
+
note: "linux: la barra de tabs (BottomNavigationView) es cromo móvil sin equivalente desktop — la vía es chrome:\"none\" + barra propia (ADR-0177)",
|
|
814
|
+
divergence: { class: "normativa", adr: "ADR-0177" },
|
|
815
|
+
},
|
|
816
|
+
animate: {
|
|
817
|
+
web: "exact", android: "approx", linux: "approx",
|
|
818
|
+
note: "android: solo first→last keyframe; sin iterations ni fill; linux: subset de 6 props, easing por iteración (no por intervalo, ADR-0169)",
|
|
819
|
+
divergence: { class: "aproximacion", adr: "ADR-0023" },
|
|
820
|
+
},
|
|
821
|
+
"animate-exit": {
|
|
822
|
+
web: "approx", android: "approx", linux: "approx",
|
|
823
|
+
note: "spec guardada y corrida al delete-node — subset WAAPI en todos",
|
|
824
|
+
divergence: { class: "aproximacion", adr: "ADR-0023" },
|
|
825
|
+
},
|
|
826
|
+
// ADR-0131: variantes visuales por estado (ver StateStyleSpec).
|
|
827
|
+
stateStyle: {
|
|
828
|
+
web: "exact", android: "approx", linux: "approx",
|
|
829
|
+
note: "android: hovered solo con puntero; corners de borde por lado no mitrados; linux: `selected` solo en widgets con selección propia (ADR-0168)",
|
|
830
|
+
divergence: { class: "aproximacion", adr: "ADR-0131" },
|
|
831
|
+
},
|
|
832
|
+
// Prop de nodo shell (ADR-0075): screen-host la emite al cambiar el
|
|
833
|
+
// tab activo — restore/deeplink pueden aterrizar en un tab no-default
|
|
834
|
+
// y el widget nativo (BNV) debe reflejar el modelo, no su init.
|
|
835
|
+
"activeTab": {
|
|
836
|
+
web: "approx", android: "exact", linux: "no",
|
|
837
|
+
note: "shell tabs: android selecciona el item del BNV; web marca aria-current; linux: sin barra de tabs (ver `shell`)",
|
|
838
|
+
divergence: { class: "aproximacion", adr: "ADR-0133" },
|
|
839
|
+
},
|
|
840
|
+
// ADR-0122: parámetros del delegado de layout (`layout:` style) —
|
|
841
|
+
// passthrough opaco al backend; cada target decide el objeto.
|
|
842
|
+
"layoutParams": {
|
|
843
|
+
web: "approx", android: "exact", linux: "approx",
|
|
844
|
+
note: "web y linux: recibida e ignorada explícitamente (sin delegados aún); android: objeto al delegado (masonry: columns/gap)",
|
|
845
|
+
divergence: { class: "aproximacion", adr: "ADR-0122" },
|
|
846
|
+
},
|
|
847
|
+
// ADR-0147: tramos inline con estilo/enlace sobre nodos `text`
|
|
848
|
+
// (rangos UTF-16, solapamiento solo por anidación). Otras hojas la
|
|
849
|
+
// ignoran (text-input: conflicto con composición IME).
|
|
850
|
+
"spans": {
|
|
851
|
+
web: "exact", android: "exact", linux: "exact",
|
|
852
|
+
note: "ADR-0147: {start,end,style,href} — web <span>/<a> inline, android SpannableStringBuilder, linux PangoAttrList + hit-test de enlaces (ADR-0167)",
|
|
853
|
+
},
|
|
854
|
+
// ADR-0148: escritura puntual de la posición de scroll (unidades
|
|
855
|
+
// lógicas) en scroll-view/list — el reconciler la emite al remontar
|
|
856
|
+
// un scroller con `id` de autoría que tenía posición persistida.
|
|
857
|
+
// El backend aplica post-layout (web: rAF hasta que el scrollHeight
|
|
858
|
+
// lo admita; android: ScrollView.scrollTo / RecyclerView por
|
|
859
|
+
// posición+offset según rowHeight). El app también puede emitirla
|
|
860
|
+
// programáticamente; no es un binding reactivo.
|
|
861
|
+
"scrollTop": {
|
|
862
|
+
web: "exact", android: "exact", linux: "exact",
|
|
863
|
+
note: "ADR-0148: restore/set puntual del offset vertical (lógicas); android list → posición+offset por rowHeight; linux: vadjustment del GtkScrolledWindow",
|
|
864
|
+
},
|
|
865
|
+
// ADR-0150: pin al borde top del scroll-view ancestro (sticky
|
|
866
|
+
// header) — ajuste visual post-layout como `transform`: no entra al
|
|
867
|
+
// vocabulario de Yoga ni mueve siblings. `number` = umbral lógico
|
|
868
|
+
// desde el top; `true` = 0. Solo dentro de scroll-view (las listas
|
|
869
|
+
// rematerializan filas — sticky ahí queda diferido). No compone con
|
|
870
|
+
// `transform.translateY` ni con el style `top` del mismo nodo.
|
|
871
|
+
"sticky": {
|
|
872
|
+
web: "exact", android: "exact", linux: "no",
|
|
873
|
+
note: "ADR-0150: web position:sticky+top; android translationY por tick de scroll en ElurScrollView con clamp al padre (containing block); linux: pendiente",
|
|
874
|
+
divergence: { class: "aproximacion", adr: "ADR-0178" },
|
|
875
|
+
},
|
|
876
|
+
// ADR-0179: combo del evento `shortcut` ("Mod+S") — el reconciler lo
|
|
877
|
+
// normaliza al payload del attach; nunca viaja como update-props.
|
|
878
|
+
"shortcut": {
|
|
879
|
+
web: "exact", android: "exact", linux: "exact",
|
|
880
|
+
note: "ADR-0179: forma canónica ctrl+alt+shift+meta+tecla (src/ir/shortcut.ts); solo valor estático",
|
|
881
|
+
},
|
|
882
|
+
"maxLines": {
|
|
883
|
+
web: "exact", android: "approx", linux: "exact",
|
|
884
|
+
note: "ADR-0201: Linux verificado en host GTK (límite de líneas en medida y pintado); Android pendiente on-device",
|
|
885
|
+
divergence: { class: "aproximacion", adr: "ADR-0201" },
|
|
886
|
+
},
|
|
887
|
+
"textOverflow": {
|
|
888
|
+
web: "exact", android: "approx", linux: "approx",
|
|
889
|
+
note: "ADR-0201: implementado en Android/Linux; verificación on-device/GTK pendiente",
|
|
890
|
+
divergence: { class: "aproximacion", adr: "ADR-0201" },
|
|
891
|
+
},
|
|
892
|
+
"selectable": {
|
|
893
|
+
web: "exact", android: "approx", linux: "approx",
|
|
894
|
+
note: "ADR-0201: implementado en Android/Linux; verificación on-device/GTK pendiente",
|
|
895
|
+
divergence: { class: "aproximacion", adr: "ADR-0201" },
|
|
896
|
+
},
|
|
897
|
+
"multiline": {
|
|
898
|
+
web: "exact", android: "approx", linux: "no",
|
|
899
|
+
note: "ADR-0201: Android EditText materializa multiline/rows; Linux GtkEntry aún no",
|
|
900
|
+
divergence: { class: "aproximacion", adr: "ADR-0201" },
|
|
901
|
+
},
|
|
902
|
+
"rows": {
|
|
903
|
+
web: "exact", android: "approx", linux: "no",
|
|
904
|
+
note: "ADR-0201: Android EditText materializa multiline/rows; Linux GtkEntry aún no",
|
|
905
|
+
divergence: { class: "aproximacion", adr: "ADR-0201" },
|
|
906
|
+
},
|
|
907
|
+
"readOnly": {
|
|
908
|
+
web: "exact", android: "approx", linux: "approx",
|
|
909
|
+
note: "ADR-0201: implementado en Android/Linux; verificación on-device/GTK pendiente",
|
|
910
|
+
divergence: { class: "aproximacion", adr: "ADR-0201" },
|
|
911
|
+
},
|
|
912
|
+
"autoCapitalize": {
|
|
913
|
+
web: "exact", android: "approx", linux: "approx",
|
|
914
|
+
note: "ADR-0201: implementado en Android/Linux; verificación on-device/GTK pendiente",
|
|
915
|
+
divergence: { class: "aproximacion", adr: "ADR-0201" },
|
|
916
|
+
},
|
|
917
|
+
"spellcheck": {
|
|
918
|
+
web: "exact", android: "approx", linux: "approx",
|
|
919
|
+
note: "ADR-0201: implementado en Android/Linux; verificación on-device/GTK pendiente",
|
|
920
|
+
divergence: { class: "aproximacion", adr: "ADR-0201" },
|
|
921
|
+
},
|
|
922
|
+
"variant": {
|
|
923
|
+
web: "exact", android: "exact", linux: "exact",
|
|
924
|
+
note: "ADR-0216: <switch variant='switch|checkbox|radio'> en web (<input>), Android (Switch/CheckBox/RadioButton) y Linux (GtkSwitch/GtkCheckButton)",
|
|
925
|
+
},
|
|
926
|
+
"horizontal": {
|
|
927
|
+
web: "exact", android: "exact", linux: "exact",
|
|
928
|
+
note: "ADR-0216: eje horizontal en scroll-view/list (web flex/overflow-x, Android ElurListView HORIZONTAL + ElurHorizontalScrollView, Linux GtkScrolledWindow + Yoga row)",
|
|
929
|
+
},
|
|
930
|
+
"scrollLeft": {
|
|
931
|
+
web: "exact", android: "exact", linux: "exact",
|
|
932
|
+
note: "ADR-0216: posición horizontal lógica en scroll-view/list (espejo de scrollTop)",
|
|
933
|
+
},
|
|
934
|
+
"paging": {
|
|
935
|
+
web: "exact", android: "exact", linux: "approx",
|
|
936
|
+
note: "ADR-0216: web scroll-snap-type, Android PagerSnapHelper / page fling, Linux settle al múltiplo de página",
|
|
937
|
+
divergence: { class: "aproximacion", adr: "ADR-0216" },
|
|
938
|
+
},
|
|
939
|
+
"inverted": {
|
|
940
|
+
web: "exact", android: "exact", linux: "exact",
|
|
941
|
+
note: "ADR-0216: feeds anclados al final (web/Yoga column-reverse|row-reverse, Android reverseLayout+stackFromEnd, Linux ajuste final)",
|
|
942
|
+
},
|
|
943
|
+
"refreshing": {
|
|
944
|
+
web: "exact", android: "approx", linux: "approx",
|
|
945
|
+
note: "ADR-0216: indicador de pull-to-refresh activo en web/Android/Linux; calibración visual on-device pendiente",
|
|
946
|
+
divergence: { class: "aproximacion", adr: "ADR-0216" },
|
|
947
|
+
},
|
|
948
|
+
"endReachedThreshold": {
|
|
949
|
+
web: "exact", android: "exact", linux: "exact",
|
|
950
|
+
note: "ADR-0216: umbral [0..1] evaluado en el reconciliador sobre el payload completo de `scroll`",
|
|
951
|
+
},
|
|
952
|
+
"columns": {
|
|
953
|
+
web: "exact", android: "exact", linux: "exact",
|
|
954
|
+
note: "ADR-0216: multi-columna en list (web CSS Grid, Android GridLayoutManager, Linux Yoga row+wrap 100/N%)",
|
|
955
|
+
},
|
|
956
|
+
"fallbackSrc": {
|
|
957
|
+
web: "exact", android: "approx", linux: "exact",
|
|
958
|
+
note: "ADR-0204: fallback + load/error implementados en web/Linux (probado en host GTK); Android compilado, verificación on-device pendiente",
|
|
959
|
+
divergence: { class: "aproximacion", adr: "ADR-0204" },
|
|
960
|
+
},
|
|
961
|
+
"safeArea": {
|
|
962
|
+
web: "approx", android: "approx", linux: "approx",
|
|
963
|
+
note: "ADR-0196/0197: el reconciliador aplica padding reactivo desde windowInsets (emitidos en Android; 0 por defecto en desktop/web)",
|
|
964
|
+
divergence: { class: "aproximacion", adr: "ADR-0196" },
|
|
965
|
+
},
|
|
966
|
+
"keyboardAvoiding": {
|
|
967
|
+
web: "approx", android: "approx", linux: "approx",
|
|
968
|
+
note: "ADR-0196/0197: el reconciliador aplica paddingBottom reactivo desde windowInsets.imeBottom (emitido en Android)",
|
|
969
|
+
divergence: { class: "aproximacion", adr: "ADR-0196" },
|
|
970
|
+
},
|
|
971
|
+
"ref": { web: "exact", android: "exact", linux: "exact" },
|
|
972
|
+
};
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* Matriz de capacidades de eventos (F14, ADR-0086) — el vocabulario
|
|
976
|
+
* completo UniversalEvent §3.3 vs. lo que cada backend despacha de
|
|
977
|
+
* verdad (web: mapEvent + addEventListener; android y linux: attachEvent).
|
|
978
|
+
*/
|
|
979
|
+
export const EVENTS_CAPABILITY: Readonly<Record<string, CapabilityEntry>> = {
|
|
980
|
+
press: { web: "exact", android: "exact", linux: "exact" },
|
|
981
|
+
// ADR-0179: umbral del SO (Android ViewConfiguration, GTK long-press;
|
|
982
|
+
// web 500 ms / 8 px); un long-press consumido no produce press.
|
|
983
|
+
longPress: {
|
|
984
|
+
web: "exact", android: "exact", linux: "exact",
|
|
985
|
+
note: "ADR-0179: {x,y}; también en filas template de lista nativa (android)",
|
|
986
|
+
},
|
|
987
|
+
hover: {
|
|
988
|
+
web: "exact", android: "exact", linux: "exact",
|
|
989
|
+
note: "ADR-0179: solo la entrada; android: OnHoverListener (mouse/lápiz)",
|
|
990
|
+
},
|
|
991
|
+
focus: { web: "exact", android: "exact", linux: "exact" },
|
|
992
|
+
blur: { web: "exact", android: "exact", linux: "exact" },
|
|
993
|
+
contextMenu: {
|
|
994
|
+
web: "exact", android: "exact", linux: "exact",
|
|
995
|
+
note: "ADR-0159: payload {x,y}; android: context click (botón secundario/lápiz); linux: click secundario",
|
|
996
|
+
},
|
|
997
|
+
// ADR-0179: prop `shortcut` normalizada por el reconciler; ámbito
|
|
998
|
+
// ventana, gana el último adjuntado.
|
|
999
|
+
shortcut: {
|
|
1000
|
+
web: "exact", android: "exact", linux: "exact",
|
|
1001
|
+
note: "ADR-0179: {combo}; android: Activity.dispatchKeyEvent (teclado físico); linux: key controller en captura sobre la ventana",
|
|
1002
|
+
},
|
|
1003
|
+
pan: {
|
|
1004
|
+
web: "exact", android: "exact", linux: "exact",
|
|
1005
|
+
note: "ADR-0179: {phase,x,y,dx,dy}; un pan iniciado no produce press",
|
|
1006
|
+
},
|
|
1007
|
+
scroll: { web: "exact", android: "exact", linux: "exact" },
|
|
1008
|
+
input: { web: "exact", android: "exact", linux: "exact" },
|
|
1009
|
+
composition: {
|
|
1010
|
+
web: "exact", android: "exact", linux: "exact",
|
|
1011
|
+
note: "ADR-0109: compositionstart/update/end ↔ transiciones del span SPAN_COMPOSING; linux: GtkIMContext propio en paralelo",
|
|
1012
|
+
},
|
|
1013
|
+
change: { web: "exact", android: "exact", linux: "exact" },
|
|
1014
|
+
select: { web: "exact", android: "exact", linux: "exact" },
|
|
1015
|
+
// ADR-0179: acción principal de un text-input — Enter físico o la
|
|
1016
|
+
// acción del IME; nunca durante composición.
|
|
1017
|
+
submit: {
|
|
1018
|
+
web: "exact", android: "exact", linux: "exact",
|
|
1019
|
+
note: "ADR-0179: {text}; android: OnEditorActionListener; web: Enter en <input>; linux: GtkEntry::activate",
|
|
1020
|
+
},
|
|
1021
|
+
// ADR-0152: invocación de acción a11y — Android la dispara desde
|
|
1022
|
+
// performAccessibilityAction; web despacha el CustomEvent
|
|
1023
|
+
// `elur:action` (invocación programática, sin SR nativo); Linux la
|
|
1024
|
+
// dispara desde AT-SPI DoAction → GAction del muxer del widget.
|
|
1025
|
+
action: {
|
|
1026
|
+
web: "exact", android: "exact", linux: "approx",
|
|
1027
|
+
note: "linux: solo invocable por AT (DoAction) — sin disparo programático equivalente a elur:action (ADR-0190)",
|
|
1028
|
+
divergence: { class: "aproximacion", adr: "ADR-0190" },
|
|
1029
|
+
},
|
|
1030
|
+
// ADR-0159 — entrada desktop; ADR-0179 la despacha también Android
|
|
1031
|
+
// cuando el SO la entrega (mouse/lápiz/teclado físico).
|
|
1032
|
+
pointer: {
|
|
1033
|
+
web: "exact", android: "exact", linux: "exact",
|
|
1034
|
+
note: "web: pointerenter/leave/move; android: hover enter/move/exit; linux: GtkEventControllerMotion → {phase,x,y}",
|
|
1035
|
+
},
|
|
1036
|
+
key: {
|
|
1037
|
+
web: "exact", android: "exact", linux: "exact",
|
|
1038
|
+
note: "{key,ctrl,alt,shift,meta} en vocabulario KeyboardEvent.key; android/linux traducen keycode/keyval (ADR-0179)",
|
|
1039
|
+
},
|
|
1040
|
+
refresh: {
|
|
1041
|
+
web: "exact", android: "approx", linux: "approx",
|
|
1042
|
+
note: "ADR-0216: pull-to-refresh (web touch/elur:refresh, Android over-pull en borde superior, Linux GtkScrolledWindow::edge-overshot)",
|
|
1043
|
+
divergence: { class: "aproximacion", adr: "ADR-0216" },
|
|
1044
|
+
},
|
|
1045
|
+
endReached: {
|
|
1046
|
+
web: "exact", android: "exact", linux: "exact",
|
|
1047
|
+
note: "ADR-0216: disparo único por tamaño de contenido en el reconciliador sobre `scroll` {y,x,vh,vw,ch,cw}",
|
|
1048
|
+
},
|
|
1049
|
+
load: {
|
|
1050
|
+
web: "exact", android: "approx", linux: "exact",
|
|
1051
|
+
note: "ADR-0204: carga de imagen {width,height,fallback?}; web/Linux probados, Android compilado (on-device pendiente)",
|
|
1052
|
+
divergence: { class: "aproximacion", adr: "ADR-0204" },
|
|
1053
|
+
},
|
|
1054
|
+
error: {
|
|
1055
|
+
web: "exact", android: "approx", linux: "exact",
|
|
1056
|
+
note: "ADR-0204: fallo definitivo {message,fallback?}; el fallback recuperable no emite error; Android compilado (on-device pendiente)",
|
|
1057
|
+
divergence: { class: "aproximacion", adr: "ADR-0204" },
|
|
1058
|
+
},
|
|
1059
|
+
pinch: {
|
|
1060
|
+
web: "no", android: "no", linux: "no",
|
|
1061
|
+
note: "ADR-0196: vocabulario declarado; sin emisor todavía",
|
|
1062
|
+
},
|
|
1063
|
+
};
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* R4.6/ADR-0086 — portable = la clave está en la matriz y NINGÚN backend
|
|
1067
|
+
* la marca `no`. `approx` pasa: la aproximación está documentada en
|
|
1068
|
+
* `note` y el comportamiento degradado es explícito, no silencioso.
|
|
1069
|
+
*/
|
|
1070
|
+
export function isPortableProp(key: string): boolean {
|
|
1071
|
+
const c = PROPS_CAPABILITY[key];
|
|
1072
|
+
return c !== undefined && CAPABILITY_PLATFORMS.every((p) => c[p] !== "no");
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
export function isPortableEvent(name: string): boolean {
|
|
1076
|
+
const c = EVENTS_CAPABILITY[name];
|
|
1077
|
+
return c !== undefined && CAPABILITY_PLATFORMS.every((p) => c[p] !== "no");
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
/**
|
|
1081
|
+
* ADR-0146/0178 — una entrada diverge si algún backend no es `exact`,
|
|
1082
|
+
* salvo `no` en todos (vocabulario declarado sin implementar). Una sola
|
|
1083
|
+
* definición para el gate (check-divergences), doc-data y los tests.
|
|
1084
|
+
*/
|
|
1085
|
+
export function isDivergentCapability(e: CapabilityEntry): boolean {
|
|
1086
|
+
const levels = CAPABILITY_PLATFORMS.map((p) => e[p]);
|
|
1087
|
+
return levels.some((l) => l !== "exact") && !levels.every((l) => l === "no");
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
/**
|
|
1091
|
+
* Guard de Signal por API pública (U16, ADR-0070): `value` + `peek()` +
|
|
1092
|
+
* `update()` son la superficie de Core — `_value`/`_subs` son privados
|
|
1093
|
+
* de la implementación 3.x y romperían contra Core 4. Un objeto plano
|
|
1094
|
+
* `{value: n}` no cuela: le faltan los métodos.
|
|
1095
|
+
*/
|
|
1096
|
+
export function isSignal(v: unknown): v is Signal<unknown> {
|
|
1097
|
+
return (
|
|
1098
|
+
typeof v === "object" && v !== null &&
|
|
1099
|
+
"value" in v &&
|
|
1100
|
+
typeof (v as Signal<unknown>).peek === "function" &&
|
|
1101
|
+
typeof (v as Signal<unknown>).update === "function"
|
|
1102
|
+
);
|
|
1103
|
+
}
|