index.ts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. // Contexts
  2. export {
  3. DataProvider,
  4. useData,
  5. useDataValue,
  6. useDataBinding,
  7. type DataContextValue,
  8. type DataProviderProps,
  9. } from "./contexts/data";
  10. export {
  11. VisibilityProvider,
  12. useVisibility,
  13. useIsVisible,
  14. type VisibilityContextValue,
  15. type VisibilityProviderProps,
  16. } from "./contexts/visibility";
  17. export {
  18. ActionProvider,
  19. useActions,
  20. useAction,
  21. ConfirmDialog,
  22. type ActionContextValue,
  23. type ActionProviderProps,
  24. type PendingConfirmation,
  25. type ConfirmDialogProps,
  26. } from "./contexts/actions";
  27. export {
  28. ValidationProvider,
  29. useValidation,
  30. useFieldValidation,
  31. type ValidationContextValue,
  32. type ValidationProviderProps,
  33. type FieldValidationState,
  34. } from "./contexts/validation";
  35. // Schema (React's spec format)
  36. export {
  37. schema,
  38. type ReactSchema,
  39. type ReactSpec,
  40. // Backward compatibility
  41. elementTreeSchema,
  42. type ElementTreeSchema,
  43. type ElementTreeSpec,
  44. } from "./schema";
  45. // Core types (re-exported for convenience)
  46. export type { Spec } from "@json-render/core";
  47. // Catalog-aware types for React
  48. export type {
  49. SetData,
  50. DataModel,
  51. ActionTrigger,
  52. ComponentContext,
  53. ComponentFn,
  54. Components,
  55. ActionFn,
  56. Actions,
  57. } from "./catalog-types";
  58. // Renderer
  59. export {
  60. // Registry
  61. defineRegistry,
  62. type DefineRegistryResult,
  63. // createRenderer (higher-level, includes providers)
  64. createRenderer,
  65. type CreateRendererProps,
  66. type ComponentMap,
  67. // Low-level
  68. Renderer,
  69. JSONUIProvider,
  70. createRendererFromCatalog,
  71. type ComponentRenderProps,
  72. type ComponentRenderer,
  73. type ComponentRegistry,
  74. type RendererProps,
  75. type JSONUIProviderProps,
  76. } from "./renderer";
  77. // Hooks
  78. export {
  79. useUIStream,
  80. flatToTree,
  81. type UseUIStreamOptions,
  82. type UseUIStreamReturn,
  83. } from "./hooks";