Replies: 1 comment
-
|
Here is a PR just to get an idea on how this change might look: #532 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The problem
External developers who want to integrate A2UI with their existing component libraries (React, Vue, or custom design systems) currently have to rebuild core functionality from scratch. The data processing, path resolution, and message handling logic lives inside
@a2ui/lit, which means:A2uiMessageProcessorand all the JSON Pointer utilitiesI've been analyzing what it takes for a React-based component library to integrate with A2UI. The work includes:
This is roughly 800+ lines of framework-agnostic logic that every integration team rewrites.
What already exists
The good news: most of this code already exists in
renderers/lit/src/0.8/and it's already framework-agnostic:A2uiMessageProcessordata/model-processor.tstypes/types.tsdata/guards.tstypes/primitives.tsThe problem is packaging. These files live in
@a2ui/lit, so importing them pulls in Lit dependencies and feels wrong for React/Vue projects.Proposed solution
Extract framework-agnostic code into a new
@a2ui/corepackage:Component adapter pattern
For external developers wrapping their existing components, I'm proposing a decorator-based adapter pattern that works across frameworks:
This adapter is pure metadata. Framework-specific bindings use it:
The adapter handles:
Migration path
This change is backward compatible:
@a2ui/litto@a2ui/core@a2ui/litand@a2ui/angularto import from@a2ui/coreOpen questions
@a2ui/reactbe part of this repo or a separate community package? (I've create a PR already if interested: feat: add React renderer and sample clients #367 )I'd like to hear from anyone who's integrated A2UI with non-Lit/Angular frameworks. What pain points did you hit? What would have helped?
Beta Was this translation helpful? Give feedback.
All reactions