index.ts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. // Schema
  2. export { schema, type ReactEmailSchema, type ReactEmailSpec } from "./schema";
  3. // Core types (re-exported for convenience)
  4. export type { Spec } from "@json-render/core";
  5. // Catalog-aware types
  6. export type {
  7. SetState,
  8. StateModel,
  9. ComponentContext,
  10. ComponentFn,
  11. Components,
  12. } from "./catalog-types";
  13. // Contexts
  14. export {
  15. StateProvider,
  16. useStateStore,
  17. useStateValue,
  18. useStateBinding,
  19. type StateContextValue,
  20. type StateProviderProps,
  21. } from "./contexts/state";
  22. export {
  23. VisibilityProvider,
  24. useVisibility,
  25. useIsVisible,
  26. type VisibilityContextValue,
  27. type VisibilityProviderProps,
  28. } from "./contexts/visibility";
  29. export {
  30. ActionProvider,
  31. useActions,
  32. useAction,
  33. ConfirmDialog,
  34. type ActionContextValue,
  35. type ActionProviderProps,
  36. type PendingConfirmation,
  37. type ConfirmDialogProps,
  38. } from "./contexts/actions";
  39. export {
  40. ValidationProvider,
  41. useValidation,
  42. useFieldValidation,
  43. type ValidationContextValue,
  44. type ValidationProviderProps,
  45. type FieldValidationState,
  46. } from "./contexts/validation";
  47. export {
  48. RepeatScopeProvider,
  49. useRepeatScope,
  50. type RepeatScopeValue,
  51. } from "./contexts/repeat-scope";
  52. // Renderer
  53. export {
  54. defineRegistry,
  55. type DefineRegistryResult,
  56. createRenderer,
  57. type CreateRendererProps,
  58. type ComponentMap,
  59. Renderer,
  60. JSONUIProvider,
  61. type ComponentRenderProps,
  62. type ComponentRenderer,
  63. type ComponentRegistry,
  64. type RendererProps,
  65. type JSONUIProviderProps,
  66. } from "./renderer";
  67. // Standard components
  68. export { standardComponents } from "./components";
  69. // Server-side render functions
  70. export { renderToHtml, renderToPlainText, type RenderOptions } from "./render";
  71. // Catalog definitions
  72. export {
  73. standardComponentDefinitions,
  74. type StandardComponentDefinitions,
  75. type StandardComponentProps,
  76. } from "./catalog";