/** * Main RevealUI exports - re-exports core (server) and client functionality. * * WARNING: Importing from '@revealui/core' pulls in BOTH server-only deps (pg, * bcryptjs, PGlite) and client-side React code. For tree-shaking safety, prefer * specific subpath imports: * - '@revealui/core/client' for client-only code * - '@revealui/core/server' for server-only code * - '@revealui/core/database' for the DB adapter * - '@revealui/core/richtext/client' for the rich text editor */ export { createRESTHandlers, handleRESTRequest } from './api/rest.js'; export { anyone, authenticated } from './auth/access.js'; export type { FloatingToolbarPluginProps, ImageNodeData, RichTextEditorProps, SerializedImageNode, ToolbarPluginProps, } from './client/index.js'; export { $createImageNode, $isImageNode, AdminDashboard, APIError, APIErrorType, apiClient, CollectionList, DocumentForm, FloatingToolbarPlugin, generatePageMetadata, ImageNode, ImageNodeComponent, ImagePlugin, ImageUploadButton, INSERT_IMAGE_COMMAND, NotFoundPage, OPEN_IMAGE_UPLOAD_COMMAND, RootLayout, RootPage, richTextEditorStyles, serializeConfig, ToolbarPlugin, useRevealUI, withRevealUIAccess, } from './client/index.js'; export { buildConfig } from './config/index.js'; export { getRevealUI } from './config/runtime.js'; export { deepMerge } from './config/utils.js'; export type { UniversalPostgresAdapterConfig } from './database/universal-postgres.js'; export { universalPostgresAdapter } from './database/universal-postgres.js'; export { createRevealUI, createRevealUIAccessRule, createRevealUIBlock, createRevealUICollection, createRevealUIField, } from './factories/index.js'; export { type FeatureFlags, getFeatures, getFeaturesForTier, getRequiredTier, isFeatureEnabled, } from './features.js'; export { computeKeyId, configureGracePeriods, configureLicenseCache, type GracePeriodConfig, generateLicenseKey, getCurrentTier, getGraceConfig, getLicensePayload, getLicenseStatus, getMaxSites, getMaxUsers, initializeLicense, isLicensed, type LicenseCacheConfig, type LicenseCheckResult, type LicenseMode, type LicensePayload, type LicenseTier, resetLicenseState, validateLicenseKey, } from './license.js'; export { getRevealUI as getRevealUINext } from './nextjs/index.js'; export { formBuilderPlugin } from './plugins/form-builder.js'; export { nestedDocsPlugin } from './plugins/nested-docs.js'; export { redirectsPlugin } from './plugins/redirects.js'; export { afterChangeTraverseFields, afterReadTraverseFields, beforeChangeTraverseFields, beforeValidateTraverseFields, buildWhereClause, checkDependencies, createRevealUIInstance, defaultLogger, extractWhereValues, flattenResult, getRelationshipFields, Logger, RevealUICollection, RevealUIGlobal, type RevealUILogger, type RichTextAdapter, relationshipPopulationPromise, validateRelationshipMetadata, withNullableJSONSchemaType, } from './revealui.js'; export { BoldFeature, FixedToolbarFeature, HeadingFeature, ItalicFeature, LinkFeature, lexicalEditor, TreeViewFeature, UnderlineFeature, } from './richtext/index.js'; export { objectStorage } from './storage/object-storage.js'; export { LRUCache, type LRUCacheOptions } from './utils/cache.js'; export { deepClone } from './utils/deep-clone.js'; export { createApplicationErrorResponseData, createErrorResponseData, createSuccessResponseData, createValidationErrorResponseData, type ErrorResponseData, } from './utils/error-responses.js'; export { ApplicationError, AuthenticationError, AuthorizationError, ConflictError, DatabaseError, handleApiError, handleDatabaseError, NotFoundError, PostgresErrorCode, RateLimitError, ValidationError, } from './utils/errors.js'; export { createLogger, type LogContext, type LogLevel, logger, } from './utils/logger.js'; export { flattenFields, isJsonFieldType, isObject } from './utils/type-guards.js'; export { type AccessArgs, type AccessFunction, type AccessResult, type AfterChangeHookArgs, type AfterReadHookArgs, applyPluginExtensions, assertValidSlug, type BeforeChangeHookArgs, type CollectionAccessConfig, type CollectionAfterChangeHook, type CollectionAfterReadHook, type CollectionBeforeChangeHook, type CollectionBeforeValidateHook, type CollectionConfig, type CollectionHooksConfig, type Config, ConfigValidationError, defineCollection, defineField, defineGlobal, type Field, type FieldAccessConfig, type FieldValidateArgs, fromAdminCollectionConfig, fromAdminGlobalConfig, type GlobalAccessConfig, type GlobalConfig, type GlobalHooksConfig, getCustomFieldType, getRevealUIExtensions, hasRevealUIExtensions, isValidFieldType, isValidSlug, mergeCollectionConfigs, mergeFields, registerCustomFieldType, registerPluginExtension, type SanitizedCollectionConfig, type SanitizedConfig, type SanitizedGlobalConfig, safeValidate, toAdminCollectionConfig, toAdminGlobalConfig, toSlug, validateWithErrors, type Where, } from '@revealui/contracts/admin'; export type { BatchCreateOptions, BatchDeleteOptions, BatchResult, BatchUpdateOptions, Block, BlocksField, CheckboxField, DatabaseAdapter, DatabaseResult, FindArgs, JsonObject, OperationOptions, PaginatedDocs, Permission, Plugin, PluginOptions, PopulateType, RequestContext, RevealAfterChangeHook, RevealAfterReadHook, RevealBeforeChangeHook, RevealCollection, RevealCollectionConfig, RevealCollectionHooks, RevealConfig, RevealCreateOptions, RevealDataObject, RevealDeleteOptions, RevealDocument, RevealDocumentWithMeta, RevealFindOptions, RevealGlobal, RevealGlobalConfig, RevealHookContext, RevealOperator, RevealPaginatedResult, RevealRequest, RevealSelect, RevealSort, RevealUI, RevealUIAccessContext, RevealUIAccessResult, RevealUIAccessRule, RevealUICollectionConfig, RevealUIContext, RevealUIEnhancedField, RevealUIField, RevealUIFieldHook, RevealUIFieldType, RevealUIFieldValidator, RevealUIFilterResult, RevealUIFrameworkContext, RevealUIHookContext, RevealUIInstance, RevealUIPermission, RevealUITenant, RevealUIUser, RevealUIValidationRule, RevealUpdateOptions, RevealUser, RevealValue, RevealWhere, RichTextEditor, RichTextFeature, SelectType, StorageAdapter, TypeWithID, WhereClause, } from './types/index.js'; export { serializeLexicalState } from './richtext/index.js'; export type { Access, ArrayField, AuthConfig, ClientCollectionConfig, ClientConfig, CollectionAccess, CollectionAdminConfig, CollectionLabels, CustomComponent, CustomFieldTypeConfig, Document, EndpointHandler, EndpointHandlerArgs, FieldAccess, FieldAccessArgs, FieldAccessConfig as SchemaFieldAccessConfig, FieldAdminConfig, FieldHooksConfig, FieldOption, FieldType, GlobalAccess, GlobalAdminConfig, GlobalLabels, GlobalVersionsConfig, GroupField, PluginFieldExtension, RevealHandler, RevealUIAccessArgs, RevealUIBlock, RevealUIComponent, RevealUIDependencyCheckArgs, RevealUIExtensions, RevealUIRichTextAdapter, RevealUISchemaArgs, RevealUITraverseFieldsArgs, RevealUITraverseFieldsResult, SelectMode, TabDefinition, TextField, TypedFallbackLocale, UploadConfig, ValidationResult, VersionConfig, } from './types/index.js'; /** * ## Import Guide * * ### Base Types (from schema - single source of truth) * For standard RevealUI admin types that work everywhere: * ```typescript * import { CollectionConfig, GlobalConfig, Field } from '@revealui/core' * // OR directly from schema: * import { CollectionConfig, GlobalConfig, Field } from '@revealui/contracts/admin' * ``` * * ### Extended Types (RevealUI-specific) * For RevealUI framework features (tenants, permissions, etc.): * ```typescript * import { RevealCollectionConfig, RevealGlobalConfig } from '@revealui/core' * ``` * * ### Helper Functions * For typed config creation: * ```typescript * import { defineCollection, defineGlobal, defineField } from '@revealui/core' * * const Posts = defineCollection({ * slug: 'posts', * fields: [...] * }) * ``` * * ### Validation * For runtime config validation: * ```typescript * import { validateWithErrors, ConfigValidationError } from '@revealui/core' * ``` */ //# sourceMappingURL=index.d.ts.map