port ujsx from Deno-only to cross-platform (Node/Bun/Deno)
Add npm project configuration (package.json, tsconfig.json, tsup, vitest) matching the taskgraph_ts conventions. All source imports changed from .ts to .js extensions for Node16 module resolution. Tests migrated from Deno.test to vitest. Fixed strict type errors (noUncheckedIndexedAccess). Preserved deno.json with sloppy-imports for dual Deno/Node compatibility. Subpath exports: schema, h, reactive, context, events, pointer, host, transform, jsx-runtime — plus barrel export at root. Build: ESM + CJS dual output via tsup. 22 tests passing.
This commit is contained in:
23
src/mod.ts
Normal file
23
src/mod.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
export { UJSX as schema } from "./core/schema.js";
|
||||
export type { UPrimitive, PropValue, UniversalProps, UElement, URoot, UNode, ComponentFn, UType, UComponent } from "./core/schema.js";
|
||||
export { isUElement, isURoot, isUPrimitive } from "./core/schema.js";
|
||||
|
||||
export { h, createRoot, createComponent, Fragment, jsx, jsxs, jsxDEV } from "./core/h.js";
|
||||
|
||||
export { reactiveComponent, reactiveElement, ReactiveRoot } from "./core/reactive.js";
|
||||
export { signal, computed, effect, batch } from "./core/reactive.js";
|
||||
export type { Signal, ReadonlySignal, ReactiveNode } from "./core/reactive.js";
|
||||
|
||||
export { Context } from "./core/context.js";
|
||||
export type { Density, Direction, RenderContext } from "./core/context.js";
|
||||
|
||||
export { createPubSubEmitter, proxyEventEmitter } from "./core/events.js";
|
||||
export type { EventEnvelope, PubSubLike, UjsxEventMap, UjsxEnvelope } from "./core/events.js";
|
||||
|
||||
export { ValuePointer, selectNode, setNode } from "./core/pointer.js";
|
||||
|
||||
export { createRoot as createHostRoot } from "./host/config.js";
|
||||
export type { HostConfig, Root } from "./host/config.js";
|
||||
|
||||
export { TransformRegistry, childCtx, matchesSchema, ctx as transformCtx } from "./transform/registry.js";
|
||||
export type { TransformContext, TransformFn, TransformRule } from "./transform/registry.js";
|
||||
Reference in New Issue
Block a user