@contractspec/lib.example-shared-ui
v7.0.10
Published
**Shared React components and hooks for ContractSpec example apps. Provides the common layout, editors, and overlays used across all examples.**
Downloads
3,002
Readme
@contractspec/lib.example-shared-ui
Shared React components and hooks for ContractSpec example apps. Provides the common layout, editors, and overlays used across all examples.
What It Provides
- Layer: lib.
- Consumers: example apps.
- Related ContractSpec packages include
@contractspec/lib.contracts-spec,@contractspec/lib.design-system,@contractspec/lib.surface-runtime,@contractspec/lib.ui-kit-web,@contractspec/tool.bun,@contractspec/tool.typescript. - Related ContractSpec packages include
@contractspec/lib.contracts-spec,@contractspec/lib.design-system,@contractspec/lib.surface-runtime,@contractspec/lib.ui-kit-web,@contractspec/tool.bun,@contractspec/tool.typescript.
Installation
npm install @contractspec/lib.example-shared-ui
or
bun add @contractspec/lib.example-shared-ui
Usage
Import the root entrypoint from @contractspec/lib.example-shared-ui, or choose a documented subpath when you only need one part of the package surface.
Architecture
src/bundles/contains bundle definitions and composition entrypoints.src/EvolutionDashboard.tsxis part of the package's public or composition surface.src/EvolutionSidebar.tsxis part of the package's public or composition surface.src/hooks/contains custom hooks for host applications.src/index.tsis the root public barrel and package entrypoint.src/lib/contains package-local helper utilities and adapters.src/LocalDataIndicator.tsxis part of the package's public or composition surface.
Public Entry Points
- Export
.resolves through./src/index.ts. - Export
./bundlesresolves through./src/bundles/index.ts. - Export
./bundles/ExampleTemplateBundleresolves through./src/bundles/ExampleTemplateBundle.ts. - Export
./EvolutionDashboardresolves through./src/EvolutionDashboard.tsx. - Export
./EvolutionSidebarresolves through./src/EvolutionSidebar.tsx. - Export
./hooksresolves through./src/hooks/index.ts. - Export
./hooks/useBehaviorTrackingresolves through./src/hooks/useBehaviorTracking.ts. - Export
./hooks/useEvolutionresolves through./src/hooks/useEvolution.ts. - Export
./hooks/useRegistryTemplatesresolves through./src/hooks/useRegistryTemplates.ts. - Export
./hooks/useSpecContentresolves through./src/hooks/useSpecContent.ts. - The package publishes 26 total export subpaths; keep docs aligned with
package.json.
Local Commands
bun run dev— contractspec-bun-build devbun run build— bun run prebuild && bun run build:bundle && bun run build:typesbun run test— bun test --pass-with-no-testsbun run lint— bun lint:fixbun run lint:check— biome check .bun run lint:fix— biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .bun run typecheck— tsc --noEmitbun run publish:pkg— bun publish --tolerate-republish --ignore-scripts --verbosebun run publish:pkg:canary— bun publish:pkg --tag canarybun run clean— rimraf dist .turbobun run build:bundle— contractspec-bun-build transpilebun run build:types— contractspec-bun-build typesbun run prebuild— contractspec-bun-build prebuild
Recent Updates
- Replace eslint+prettier by biomejs to optimize speed.
- Add changesets and apply pending fixes.
- Contracts context, bundle exports, surface-runtime docs.
Notes
- Low blast radius — only example apps depend on this package.
TemplateShellis the shared layout for all examples; structural changes affect every example app.
