@tyndall/react 0.0.1

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/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # @tyndall/react
2
+
3
+ ## Overview
4
+ React adapter package that implements UIAdapter contracts, routing integration, and hydration helpers.
5
+
6
+ ## Responsibilities
7
+ - Provide React-based rendering adapter, factory, and registry
8
+ - Provide client router and navigation components
9
+ - Integrate route payload transitions and head updates
10
+ - Coordinate hydration lifecycle markers and mounted-state guards for payload-driven navigation
11
+ - Guard dev runtime generation changes with controlled dispose/re-initialize flow to avoid mixed React hook dispatcher states during HMR
12
+ - Compose nested layout trees when route metadata supplies `layoutFiles`
13
+ - Emit server entry exports that support streaming SSR when React streaming APIs are available
14
+
15
+ ## Public API Highlights
16
+ - createReactAdapter
17
+ - createReactAdapterRegistry
18
+ - createRouter and RouterProvider
19
+
20
+ ## Development
21
+ - Build: bun run --filter @tyndall/react build
22
+ - Test (from workspace root): bun test
23
+
24
+ ## Documentation
25
+ - Package specification: [spec.md](./spec.md)
26
+ - Package architecture: [architecture.md](./architecture.md)
27
+ - Package changes: [CHANGELOG.md](./CHANGELOG.md)
28
+
29
+ ## Maintenance Rules
30
+ - Keep this document aligned with implemented package behavior.
31
+ - Update spec.md and architecture.md whenever package contracts or design boundaries change.
32
+ - Record user-visible package changes in CHANGELOG.md.
@@ -0,0 +1,16 @@
1
+ import type { HmrIntegration, RouteGraph, UIAdapter, UIAdapterEntryContext, UIAdapterRenderContext, UIAdapterRenderResult } from "@tyndall/core";
2
+ export interface ReactAdapterOptions {
3
+ name?: string;
4
+ createClientEntry?: (ctx: UIAdapterEntryContext) => string;
5
+ createServerEntry?: (ctx: UIAdapterEntryContext) => string;
6
+ renderToHtml?: (ctx: UIAdapterRenderContext) => Promise<UIAdapterRenderResult> | UIAdapterRenderResult;
7
+ render?: (ctx: UIAdapterRenderContext) => Promise<unknown> | unknown;
8
+ getHead?: UIAdapter["getHead"];
9
+ hmrIntegration?: HmrIntegration;
10
+ routeGraph?: RouteGraph;
11
+ nestedLayouts?: boolean;
12
+ rootDir?: string;
13
+ routeRoot?: string;
14
+ }
15
+ export declare const createReactAdapter: (options?: ReactAdapterOptions) => UIAdapter;
16
+ //# sourceMappingURL=adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,cAAc,EACd,UAAU,EACV,SAAS,EACT,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,eAAe,CAAC;AAIvB,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,qBAAqB,KAAK,MAAM,CAAC;IAC3D,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,qBAAqB,KAAK,MAAM,CAAC;IAC3D,YAAY,CAAC,EAAE,CACb,GAAG,EAAE,sBAAsB,KACxB,OAAO,CAAC,qBAAqB,CAAC,GAAG,qBAAqB,CAAC;IAC5D,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,sBAAsB,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IACrE,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC/B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAizBD,eAAO,MAAM,kBAAkB,GAAI,UAAS,mBAAwB,KAAG,SAQrE,CAAC"}