Skip to content

Refactor content adapters, enhance test infrastructure, and prepare data for rendering - #107

Merged
atldays merged 10 commits into
mainfrom
develop
Sep 15, 2026
Merged

atldays merged 10 commits into
mainfrom
develop

Conversation

@atldays

@atldays atldays commented Sep 15, 2026

Copy link
Copy Markdown
Member

No description provided.

github-actions Bot and others added 10 commits September 13, 2026 17:02
Move shared content lifecycle and resolvers to their owners.
Expose watch strategies through adnbn/content and keep framework
normalization in the selected adapter.

Move Relay normalization and content construction into runtime.
Replace the old builder contract and update virtual modules,
declarations, tests, and documentation.
Prepare data per anchor before creating UI and pass the prepared data, container,
and render target to Content and Relay renderers. Keep mount and unmount
synchronous, invalidate stale preparation, and retain watching after anchor errors.

Cover lifecycle behavior, React portals, headless Relay, and published declarations.

BREAKING CHANGE: Render handlers are synchronous; asynchronous work and render
decisions belong in prepare. React render functions are components invoked by React.
ContentScriptProps now includes data, container, and target; container factories
receive ContentScriptContainerProps before those DOM elements exist.
ContentScriptWatchStrategy update callbacks may be asynchronous. Literal render:
true tracks anchors without UI, while prepare returning false skips UI creation.
Consumers checking published declarations require TypeScript 5.6.3 or newer.
Read entrypoint assets and isolated styles through the generated
#adnbn/runtime facade. Keep Rspack runtime access in build code and preserve
per-entrypoint asset-map selection and isolated CSS delivery.

Separate asset collection, filename handling, compilation state and layer
classification. Keep isolated-style helpers inside their owning plugin.
Expose typed boundaries in content and Relay render props. Accept a tag,
DOM properties or a synchronous factory for isolated render targets, and
run boundary setup with an optional cleanup function for subscriptions.

Share setup policy through IsolationSetup while the nodes retain DOM,
style and cleanup ownership. Preserve synchronous mounting and protect
cleanup, remounts and iframe document recovery from reentrant callbacks.

Cover the contract with unit, declaration and browser integration tests,
and document the current API and lifecycle.

BREAKING CHANGE: Remove ContentScriptFrameOptions and isolation.width /
isolation.height. Set iframe dimensions and styles through boundary;
iframes receive no framework width, height, border or display defaults.
ContentScriptProps now includes a required boundary property, and content
and Relay definitions carry an isolation type parameter. When specifying
data generics explicitly for an isolated entrypoint, specify its mode too.
@atldays
atldays merged commit d456cbf into main Sep 15, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant