@revealui/core 0.0.0-canary-20260409021642
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +171 -0
- package/dist/api/compression.d.ts +83 -0
- package/dist/api/compression.d.ts.map +1 -0
- package/dist/api/compression.js +233 -0
- package/dist/api/payload-optimization.d.ts +138 -0
- package/dist/api/payload-optimization.d.ts.map +1 -0
- package/dist/api/payload-optimization.js +320 -0
- package/dist/api/rate-limit.d.ts +114 -0
- package/dist/api/rate-limit.d.ts.map +1 -0
- package/dist/api/rate-limit.js +376 -0
- package/dist/api/response-cache.d.ts +125 -0
- package/dist/api/response-cache.d.ts.map +1 -0
- package/dist/api/response-cache.js +335 -0
- package/dist/api/rest.d.ts +54 -0
- package/dist/api/rest.d.ts.map +1 -0
- package/dist/api/rest.js +465 -0
- package/dist/auth/access.d.ts +25 -0
- package/dist/auth/access.d.ts.map +1 -0
- package/dist/auth/access.js +20 -0
- package/dist/auth/index.d.ts +2 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +2 -0
- package/dist/cache/query-cache.d.ts +100 -0
- package/dist/cache/query-cache.d.ts.map +1 -0
- package/dist/cache/query-cache.js +266 -0
- package/dist/caching/index.d.ts +6 -0
- package/dist/caching/index.d.ts.map +1 -0
- package/dist/caching/index.js +5 -0
- package/dist/client/admin/RichText.d.ts +12 -0
- package/dist/client/admin/RichText.d.ts.map +1 -0
- package/dist/client/admin/RichText.js +5 -0
- package/dist/client/admin/components/AdminDashboard.d.ts +7 -0
- package/dist/client/admin/components/AdminDashboard.d.ts.map +1 -0
- package/dist/client/admin/components/AdminDashboard.js +308 -0
- package/dist/client/admin/components/CollectionList.d.ts +16 -0
- package/dist/client/admin/components/CollectionList.d.ts.map +1 -0
- package/dist/client/admin/components/CollectionList.js +67 -0
- package/dist/client/admin/components/DocumentForm.d.ts +11 -0
- package/dist/client/admin/components/DocumentForm.d.ts.map +1 -0
- package/dist/client/admin/components/DocumentForm.js +223 -0
- package/dist/client/admin/components/GlobalForm.d.ts +11 -0
- package/dist/client/admin/components/GlobalForm.d.ts.map +1 -0
- package/dist/client/admin/components/GlobalForm.js +74 -0
- package/dist/client/admin/context/ServerFunctionContext.d.ts +8 -0
- package/dist/client/admin/context/ServerFunctionContext.d.ts.map +1 -0
- package/dist/client/admin/context/ServerFunctionContext.js +15 -0
- package/dist/client/admin/i18n/en.d.ts +25 -0
- package/dist/client/admin/i18n/en.d.ts.map +1 -0
- package/dist/client/admin/i18n/en.js +25 -0
- package/dist/client/admin/index.d.ts +11 -0
- package/dist/client/admin/index.d.ts.map +1 -0
- package/dist/client/admin/index.js +11 -0
- package/dist/client/admin/layout.d.ts +10 -0
- package/dist/client/admin/layout.d.ts.map +1 -0
- package/dist/client/admin/layout.js +7 -0
- package/dist/client/admin/page.d.ts +38 -0
- package/dist/client/admin/page.d.ts.map +1 -0
- package/dist/client/admin/page.js +15 -0
- package/dist/client/admin/utils/apiClient.d.ts +110 -0
- package/dist/client/admin/utils/apiClient.d.ts.map +1 -0
- package/dist/client/admin/utils/apiClient.js +216 -0
- package/dist/client/admin/utils/index.d.ts +5 -0
- package/dist/client/admin/utils/index.d.ts.map +1 -0
- package/dist/client/admin/utils/index.js +4 -0
- package/dist/client/admin/utils/serializeConfig.d.ts +7 -0
- package/dist/client/admin/utils/serializeConfig.d.ts.map +1 -0
- package/dist/client/admin/utils/serializeConfig.js +35 -0
- package/dist/client/hooks.d.ts +18 -0
- package/dist/client/hooks.d.ts.map +1 -0
- package/dist/client/hooks.js +29 -0
- package/dist/client/index.d.ts +11 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +13 -0
- package/dist/client/richtext/RichTextEditor.d.ts +48 -0
- package/dist/client/richtext/RichTextEditor.d.ts.map +1 -0
- package/dist/client/richtext/RichTextEditor.js +360 -0
- package/dist/client/richtext/components/ImageNodeComponent.d.ts +9 -0
- package/dist/client/richtext/components/ImageNodeComponent.d.ts.map +1 -0
- package/dist/client/richtext/components/ImageNodeComponent.js +98 -0
- package/dist/client/richtext/components/ImageUploadButton.d.ts +13 -0
- package/dist/client/richtext/components/ImageUploadButton.d.ts.map +1 -0
- package/dist/client/richtext/components/ImageUploadButton.js +118 -0
- package/dist/client/richtext/index.d.ts +92 -0
- package/dist/client/richtext/index.d.ts.map +1 -0
- package/dist/client/richtext/index.js +74 -0
- package/dist/client/richtext/nodes/DecoratorBlockNode.d.ts +20 -0
- package/dist/client/richtext/nodes/DecoratorBlockNode.d.ts.map +1 -0
- package/dist/client/richtext/nodes/DecoratorBlockNode.js +29 -0
- package/dist/client/richtext/nodes/ImageNode.d.ts +51 -0
- package/dist/client/richtext/nodes/ImageNode.d.ts.map +1 -0
- package/dist/client/richtext/nodes/ImageNode.js +95 -0
- package/dist/client/richtext/plugins/CollaborationPlugin.d.ts +13 -0
- package/dist/client/richtext/plugins/CollaborationPlugin.d.ts.map +1 -0
- package/dist/client/richtext/plugins/CollaborationPlugin.js +8 -0
- package/dist/client/richtext/plugins/CursorsOverlayPlugin.d.ts +4 -0
- package/dist/client/richtext/plugins/CursorsOverlayPlugin.d.ts.map +1 -0
- package/dist/client/richtext/plugins/CursorsOverlayPlugin.js +50 -0
- package/dist/client/richtext/plugins/FloatingToolbarPlugin.d.ts +7 -0
- package/dist/client/richtext/plugins/FloatingToolbarPlugin.d.ts.map +1 -0
- package/dist/client/richtext/plugins/FloatingToolbarPlugin.js +246 -0
- package/dist/client/richtext/plugins/ImagePlugin.d.ts +3 -0
- package/dist/client/richtext/plugins/ImagePlugin.d.ts.map +1 -0
- package/dist/client/richtext/plugins/ImagePlugin.js +73 -0
- package/dist/client/richtext/plugins/PastePlugin.d.ts +2 -0
- package/dist/client/richtext/plugins/PastePlugin.d.ts.map +1 -0
- package/dist/client/richtext/plugins/PastePlugin.js +36 -0
- package/dist/client/richtext/plugins/ToolbarPlugin.d.ts +8 -0
- package/dist/client/richtext/plugins/ToolbarPlugin.d.ts.map +1 -0
- package/dist/client/richtext/plugins/ToolbarPlugin.js +204 -0
- package/dist/client/ui/index.d.ts +111 -0
- package/dist/client/ui/index.d.ts.map +1 -0
- package/dist/client/ui/index.js +130 -0
- package/dist/collections/CollectionOperations.d.ts +27 -0
- package/dist/collections/CollectionOperations.d.ts.map +1 -0
- package/dist/collections/CollectionOperations.js +48 -0
- package/dist/collections/hooks.d.ts +11 -0
- package/dist/collections/hooks.d.ts.map +1 -0
- package/dist/collections/hooks.js +35 -0
- package/dist/collections/index.d.ts +2 -0
- package/dist/collections/index.d.ts.map +1 -0
- package/dist/collections/index.js +1 -0
- package/dist/collections/operations/create.d.ts +9 -0
- package/dist/collections/operations/create.d.ts.map +1 -0
- package/dist/collections/operations/create.js +130 -0
- package/dist/collections/operations/createMany.d.ts +12 -0
- package/dist/collections/operations/createMany.d.ts.map +1 -0
- package/dist/collections/operations/createMany.js +43 -0
- package/dist/collections/operations/delete.d.ts +10 -0
- package/dist/collections/operations/delete.d.ts.map +1 -0
- package/dist/collections/operations/delete.js +45 -0
- package/dist/collections/operations/deleteMany.d.ts +11 -0
- package/dist/collections/operations/deleteMany.d.ts.map +1 -0
- package/dist/collections/operations/deleteMany.js +50 -0
- package/dist/collections/operations/fieldHooks.d.ts +21 -0
- package/dist/collections/operations/fieldHooks.d.ts.map +1 -0
- package/dist/collections/operations/fieldHooks.js +51 -0
- package/dist/collections/operations/find.d.ts +8 -0
- package/dist/collections/operations/find.d.ts.map +1 -0
- package/dist/collections/operations/find.js +231 -0
- package/dist/collections/operations/findById.d.ts +14 -0
- package/dist/collections/operations/findById.d.ts.map +1 -0
- package/dist/collections/operations/findById.js +111 -0
- package/dist/collections/operations/sqlAdapter.d.ts +23 -0
- package/dist/collections/operations/sqlAdapter.d.ts.map +1 -0
- package/dist/collections/operations/sqlAdapter.js +108 -0
- package/dist/collections/operations/update.d.ts +8 -0
- package/dist/collections/operations/update.d.ts.map +1 -0
- package/dist/collections/operations/update.js +226 -0
- package/dist/collections/operations/updateMany.d.ts +11 -0
- package/dist/collections/operations/updateMany.d.ts.map +1 -0
- package/dist/collections/operations/updateMany.js +52 -0
- package/dist/collections/registry.d.ts +12 -0
- package/dist/collections/registry.d.ts.map +1 -0
- package/dist/collections/registry.js +38 -0
- package/dist/config/index.d.ts +9 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +61 -0
- package/dist/config/runtime.d.ts +22 -0
- package/dist/config/runtime.d.ts.map +1 -0
- package/dist/config/runtime.js +32 -0
- package/dist/config/utils.d.ts +2 -0
- package/dist/config/utils.d.ts.map +1 -0
- package/dist/config/utils.js +21 -0
- package/dist/database/index.d.ts +4 -0
- package/dist/database/index.d.ts.map +1 -0
- package/dist/database/index.js +2 -0
- package/dist/database/safe-parse.d.ts +26 -0
- package/dist/database/safe-parse.d.ts.map +1 -0
- package/dist/database/safe-parse.js +42 -0
- package/dist/database/ssl-config.d.ts +9 -0
- package/dist/database/ssl-config.d.ts.map +1 -0
- package/dist/database/ssl-config.js +7 -0
- package/dist/database/type-adapter.d.ts +113 -0
- package/dist/database/type-adapter.d.ts.map +1 -0
- package/dist/database/type-adapter.js +97 -0
- package/dist/database/universal-postgres.d.ts +45 -0
- package/dist/database/universal-postgres.d.ts.map +1 -0
- package/dist/database/universal-postgres.js +531 -0
- package/dist/dataloader.d.ts +26 -0
- package/dist/dataloader.d.ts.map +1 -0
- package/dist/dataloader.js +176 -0
- package/dist/error-handling/error-boundary.d.ts +94 -0
- package/dist/error-handling/error-boundary.d.ts.map +1 -0
- package/dist/error-handling/error-boundary.js +285 -0
- package/dist/error-handling/error-reporter.d.ts +214 -0
- package/dist/error-handling/error-reporter.d.ts.map +1 -0
- package/dist/error-handling/error-reporter.js +491 -0
- package/dist/error-handling/fallback-components.d.ts +131 -0
- package/dist/error-handling/fallback-components.d.ts.map +1 -0
- package/dist/error-handling/fallback-components.js +371 -0
- package/dist/error-handling/index.d.ts +14 -0
- package/dist/error-handling/index.d.ts.map +1 -0
- package/dist/error-handling/index.js +12 -0
- package/dist/factories/builders.d.ts +50 -0
- package/dist/factories/builders.d.ts.map +1 -0
- package/dist/factories/builders.js +77 -0
- package/dist/factories/index.d.ts +2 -0
- package/dist/factories/index.d.ts.map +1 -0
- package/dist/factories/index.js +1 -0
- package/dist/features.d.ts +88 -0
- package/dist/features.d.ts.map +1 -0
- package/dist/features.js +105 -0
- package/dist/fieldTraversal.d.ts +26 -0
- package/dist/fieldTraversal.d.ts.map +1 -0
- package/dist/fieldTraversal.js +132 -0
- package/dist/fields/config/types.d.ts +48 -0
- package/dist/fields/config/types.d.ts.map +1 -0
- package/dist/fields/config/types.js +20 -0
- package/dist/fields/getDefaultValue.d.ts +16 -0
- package/dist/fields/getDefaultValue.d.ts.map +1 -0
- package/dist/fields/getDefaultValue.js +20 -0
- package/dist/fields/getFieldPaths.d.ts +25 -0
- package/dist/fields/getFieldPaths.d.ts.map +1 -0
- package/dist/fields/getFieldPaths.js +23 -0
- package/dist/fields/hooks/afterRead/index.d.ts +36 -0
- package/dist/fields/hooks/afterRead/index.d.ts.map +1 -0
- package/dist/fields/hooks/afterRead/index.js +70 -0
- package/dist/fields/hooks/afterRead/promise.d.ts +46 -0
- package/dist/fields/hooks/afterRead/promise.d.ts.map +1 -0
- package/dist/fields/hooks/afterRead/promise.js +178 -0
- package/dist/fields/hooks/afterRead/traverseFields.d.ts +44 -0
- package/dist/fields/hooks/afterRead/traverseFields.d.ts.map +1 -0
- package/dist/fields/hooks/afterRead/traverseFields.js +37 -0
- package/dist/generated/index.d.ts +10 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/index.js +9 -0
- package/dist/generated/types/cms.d.ts +1766 -0
- package/dist/generated/types/cms.d.ts.map +1 -0
- package/dist/generated/types/cms.js +11 -0
- package/dist/generated/types/index.d.ts +16 -0
- package/dist/generated/types/index.d.ts.map +1 -0
- package/dist/generated/types/index.js +21 -0
- package/dist/generated/types/neon.d.ts +11 -0
- package/dist/generated/types/neon.d.ts.map +1 -0
- package/dist/generated/types/neon.js +13 -0
- package/dist/globals/GlobalOperations.d.ts +24 -0
- package/dist/globals/GlobalOperations.d.ts.map +1 -0
- package/dist/globals/GlobalOperations.js +165 -0
- package/dist/globals/index.d.ts +2 -0
- package/dist/globals/index.d.ts.map +1 -0
- package/dist/globals/index.js +1 -0
- package/dist/index.d.ts +75 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +136 -0
- package/dist/instance/RevealUIInstance.d.ts +6 -0
- package/dist/instance/RevealUIInstance.d.ts.map +1 -0
- package/dist/instance/RevealUIInstance.js +293 -0
- package/dist/instance/index.d.ts +3 -0
- package/dist/instance/index.d.ts.map +1 -0
- package/dist/instance/index.js +2 -0
- package/dist/instance/logger.d.ts +31 -0
- package/dist/instance/logger.d.ts.map +1 -0
- package/dist/instance/logger.js +42 -0
- package/dist/instance/methods/create.d.ts +10 -0
- package/dist/instance/methods/create.d.ts.map +1 -0
- package/dist/instance/methods/create.js +38 -0
- package/dist/instance/methods/delete.d.ts +10 -0
- package/dist/instance/methods/delete.d.ts.map +1 -0
- package/dist/instance/methods/delete.js +24 -0
- package/dist/instance/methods/find.d.ts +10 -0
- package/dist/instance/methods/find.d.ts.map +1 -0
- package/dist/instance/methods/find.js +20 -0
- package/dist/instance/methods/findById.d.ts +13 -0
- package/dist/instance/methods/findById.d.ts.map +1 -0
- package/dist/instance/methods/findById.js +20 -0
- package/dist/instance/methods/hooks.d.ts +14 -0
- package/dist/instance/methods/hooks.d.ts.map +1 -0
- package/dist/instance/methods/hooks.js +34 -0
- package/dist/instance/methods/update.d.ts +10 -0
- package/dist/instance/methods/update.d.ts.map +1 -0
- package/dist/instance/methods/update.js +42 -0
- package/dist/jobs/index.d.ts +16 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js +14 -0
- package/dist/jobs/queue.d.ts +57 -0
- package/dist/jobs/queue.d.ts.map +1 -0
- package/dist/jobs/queue.js +134 -0
- package/dist/license-encryption.d.ts +21 -0
- package/dist/license-encryption.d.ts.map +1 -0
- package/dist/license-encryption.js +74 -0
- package/dist/license.d.ts +99 -0
- package/dist/license.d.ts.map +1 -0
- package/dist/license.js +262 -0
- package/dist/monitoring/alerts.d.ts +118 -0
- package/dist/monitoring/alerts.d.ts.map +1 -0
- package/dist/monitoring/alerts.js +324 -0
- package/dist/monitoring/cleanup-manager.d.ts +71 -0
- package/dist/monitoring/cleanup-manager.d.ts.map +1 -0
- package/dist/monitoring/cleanup-manager.js +226 -0
- package/dist/monitoring/health-monitor.d.ts +22 -0
- package/dist/monitoring/health-monitor.d.ts.map +1 -0
- package/dist/monitoring/health-monitor.js +142 -0
- package/dist/monitoring/index.d.ts +14 -0
- package/dist/monitoring/index.d.ts.map +1 -0
- package/dist/monitoring/index.js +17 -0
- package/dist/monitoring/process-registry.d.ts +97 -0
- package/dist/monitoring/process-registry.d.ts.map +1 -0
- package/dist/monitoring/process-registry.js +222 -0
- package/dist/monitoring/query-monitor.d.ts +153 -0
- package/dist/monitoring/query-monitor.d.ts.map +1 -0
- package/dist/monitoring/query-monitor.js +209 -0
- package/dist/monitoring/types.d.ts +231 -0
- package/dist/monitoring/types.d.ts.map +1 -0
- package/dist/monitoring/types.js +42 -0
- package/dist/monitoring/zombie-detector.d.ts +81 -0
- package/dist/monitoring/zombie-detector.d.ts.map +1 -0
- package/dist/monitoring/zombie-detector.js +236 -0
- package/dist/nextjs/index.d.ts +4 -0
- package/dist/nextjs/index.d.ts.map +1 -0
- package/dist/nextjs/index.js +3 -0
- package/dist/nextjs/utilities.d.ts +5 -0
- package/dist/nextjs/utilities.d.ts.map +1 -0
- package/dist/nextjs/utilities.js +16 -0
- package/dist/nextjs/withRevealUI.d.ts +20 -0
- package/dist/nextjs/withRevealUI.d.ts.map +1 -0
- package/dist/nextjs/withRevealUI.js +181 -0
- package/dist/observability/alerts.d.ts +138 -0
- package/dist/observability/alerts.d.ts.map +1 -0
- package/dist/observability/alerts.js +389 -0
- package/dist/observability/health-check.d.ts +91 -0
- package/dist/observability/health-check.d.ts.map +1 -0
- package/dist/observability/health-check.js +345 -0
- package/dist/observability/index.d.ts +12 -0
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +11 -0
- package/dist/observability/logger.d.ts +47 -0
- package/dist/observability/logger.d.ts.map +1 -0
- package/dist/observability/logger.js +140 -0
- package/dist/observability/metrics.d.ts +205 -0
- package/dist/observability/metrics.d.ts.map +1 -0
- package/dist/observability/metrics.js +429 -0
- package/dist/observability/tracing.d.ts +149 -0
- package/dist/observability/tracing.d.ts.map +1 -0
- package/dist/observability/tracing.js +380 -0
- package/dist/plugins/form-builder.d.ts +115 -0
- package/dist/plugins/form-builder.d.ts.map +1 -0
- package/dist/plugins/form-builder.js +239 -0
- package/dist/plugins/index.d.ts +5 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +4 -0
- package/dist/plugins/nested-docs.d.ts +12 -0
- package/dist/plugins/nested-docs.d.ts.map +1 -0
- package/dist/plugins/nested-docs.js +111 -0
- package/dist/plugins/redirects.d.ts +17 -0
- package/dist/plugins/redirects.d.ts.map +1 -0
- package/dist/plugins/redirects.js +62 -0
- package/dist/queries/index.d.ts +2 -0
- package/dist/queries/index.d.ts.map +1 -0
- package/dist/queries/index.js +1 -0
- package/dist/queries/queryBuilder.d.ts +47 -0
- package/dist/queries/queryBuilder.d.ts.map +1 -0
- package/dist/queries/queryBuilder.js +276 -0
- package/dist/relationships/analyzer.d.ts +39 -0
- package/dist/relationships/analyzer.d.ts.map +1 -0
- package/dist/relationships/analyzer.js +135 -0
- package/dist/relationships/index.d.ts +3 -0
- package/dist/relationships/index.d.ts.map +1 -0
- package/dist/relationships/index.js +2 -0
- package/dist/relationships/populate-core.d.ts +57 -0
- package/dist/relationships/populate-core.d.ts.map +1 -0
- package/dist/relationships/populate-core.js +116 -0
- package/dist/relationships/populate-helpers.d.ts +58 -0
- package/dist/relationships/populate-helpers.d.ts.map +1 -0
- package/dist/relationships/populate-helpers.js +82 -0
- package/dist/relationships/population.d.ts +34 -0
- package/dist/relationships/population.d.ts.map +1 -0
- package/dist/relationships/population.js +193 -0
- package/dist/revealui.d.ts +46 -0
- package/dist/revealui.d.ts.map +1 -0
- package/dist/revealui.js +92 -0
- package/dist/richtext/exports/client/rcc.d.ts +37 -0
- package/dist/richtext/exports/client/rcc.d.ts.map +1 -0
- package/dist/richtext/exports/client/rcc.js +182 -0
- package/dist/richtext/exports/server/rsc.d.ts +134 -0
- package/dist/richtext/exports/server/rsc.d.ts.map +1 -0
- package/dist/richtext/exports/server/rsc.js +344 -0
- package/dist/richtext/index.d.ts +161 -0
- package/dist/richtext/index.d.ts.map +1 -0
- package/dist/richtext/index.js +243 -0
- package/dist/richtext/lexical.d.ts +23 -0
- package/dist/richtext/lexical.d.ts.map +1 -0
- package/dist/richtext/lexical.js +35 -0
- package/dist/security/index.d.ts +6 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +5 -0
- package/dist/server/index.d.ts +21 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +28 -0
- package/dist/server/renderPage.d.ts +69 -0
- package/dist/server/renderPage.d.ts.map +1 -0
- package/dist/server/renderPage.js +109 -0
- package/dist/storage/index.d.ts +2 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +2 -0
- package/dist/storage/vercel-blob.d.ts +17 -0
- package/dist/storage/vercel-blob.d.ts.map +1 -0
- package/dist/storage/vercel-blob.js +86 -0
- package/dist/translations/index.d.ts +17 -0
- package/dist/translations/index.d.ts.map +1 -0
- package/dist/translations/index.js +1 -0
- package/dist/types/access.d.ts +67 -0
- package/dist/types/access.d.ts.map +1 -0
- package/dist/types/access.js +8 -0
- package/dist/types/api.d.ts +57 -0
- package/dist/types/api.d.ts.map +1 -0
- package/dist/types/api.js +8 -0
- package/dist/types/cms.d.ts +8 -0
- package/dist/types/cms.d.ts.map +1 -0
- package/dist/types/cms.js +6 -0
- package/dist/types/config.d.ts +152 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +9 -0
- package/dist/types/core.d.ts +11 -0
- package/dist/types/core.d.ts.map +1 -0
- package/dist/types/core.js +9 -0
- package/dist/types/extensions.d.ts +116 -0
- package/dist/types/extensions.d.ts.map +1 -0
- package/dist/types/extensions.js +8 -0
- package/dist/types/frontend.d.ts +53 -0
- package/dist/types/frontend.d.ts.map +1 -0
- package/dist/types/frontend.js +7 -0
- package/dist/types/generated.d.ts +12 -0
- package/dist/types/generated.d.ts.map +1 -0
- package/dist/types/generated.js +10 -0
- package/dist/types/hooks.d.ts +53 -0
- package/dist/types/hooks.d.ts.map +1 -0
- package/dist/types/hooks.js +8 -0
- package/dist/types/index.d.ts +49 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +61 -0
- package/dist/types/interfaces/app.d.ts +50 -0
- package/dist/types/interfaces/app.d.ts.map +1 -0
- package/dist/types/interfaces/app.js +5 -0
- package/dist/types/jobs.d.ts +112 -0
- package/dist/types/jobs.d.ts.map +1 -0
- package/dist/types/jobs.js +7 -0
- package/dist/types/legacy.d.ts +147 -0
- package/dist/types/legacy.d.ts.map +1 -0
- package/dist/types/legacy.js +8 -0
- package/dist/types/plugins.d.ts +17 -0
- package/dist/types/plugins.d.ts.map +1 -0
- package/dist/types/plugins.js +8 -0
- package/dist/types/query.d.ts +99 -0
- package/dist/types/query.d.ts.map +1 -0
- package/dist/types/query.js +24 -0
- package/dist/types/request.d.ts +40 -0
- package/dist/types/request.d.ts.map +1 -0
- package/dist/types/request.js +8 -0
- package/dist/types/richtext.d.ts +23 -0
- package/dist/types/richtext.d.ts.map +1 -0
- package/dist/types/richtext.js +8 -0
- package/dist/types/runtime.d.ts +275 -0
- package/dist/types/runtime.d.ts.map +1 -0
- package/dist/types/runtime.js +9 -0
- package/dist/types/schema.d.ts +9 -0
- package/dist/types/schema.d.ts.map +1 -0
- package/dist/types/schema.js +7 -0
- package/dist/types/user.d.ts +48 -0
- package/dist/types/user.d.ts.map +1 -0
- package/dist/types/user.js +8 -0
- package/dist/utils/access-conversion.d.ts +17 -0
- package/dist/utils/access-conversion.d.ts.map +1 -0
- package/dist/utils/access-conversion.js +96 -0
- package/dist/utils/api-wrapper.d.ts +63 -0
- package/dist/utils/api-wrapper.d.ts.map +1 -0
- package/dist/utils/api-wrapper.js +151 -0
- package/dist/utils/block-conversion.d.ts +21 -0
- package/dist/utils/block-conversion.d.ts.map +1 -0
- package/dist/utils/block-conversion.js +109 -0
- package/dist/utils/cache.d.ts +86 -0
- package/dist/utils/cache.d.ts.map +1 -0
- package/dist/utils/cache.js +154 -0
- package/dist/utils/deep-clone.d.ts +25 -0
- package/dist/utils/deep-clone.d.ts.map +1 -0
- package/dist/utils/deep-clone.js +114 -0
- package/dist/utils/error-responses.d.ts +57 -0
- package/dist/utils/error-responses.d.ts.map +1 -0
- package/dist/utils/error-responses.js +95 -0
- package/dist/utils/errors.d.ts +133 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +500 -0
- package/dist/utils/field-conversion.d.ts +40 -0
- package/dist/utils/field-conversion.d.ts.map +1 -0
- package/dist/utils/field-conversion.js +275 -0
- package/dist/utils/flattenResult.d.ts +7 -0
- package/dist/utils/flattenResult.d.ts.map +1 -0
- package/dist/utils/flattenResult.js +22 -0
- package/dist/utils/getBlockSelect.d.ts +12 -0
- package/dist/utils/getBlockSelect.d.ts.map +1 -0
- package/dist/utils/getBlockSelect.js +12 -0
- package/dist/utils/getSelectMode.d.ts +8 -0
- package/dist/utils/getSelectMode.d.ts.map +1 -0
- package/dist/utils/getSelectMode.js +21 -0
- package/dist/utils/isValidID.d.ts +5 -0
- package/dist/utils/isValidID.d.ts.map +1 -0
- package/dist/utils/isValidID.js +13 -0
- package/dist/utils/json-parsing.d.ts +48 -0
- package/dist/utils/json-parsing.d.ts.map +1 -0
- package/dist/utils/json-parsing.js +130 -0
- package/dist/utils/logger-client.d.ts +32 -0
- package/dist/utils/logger-client.d.ts.map +1 -0
- package/dist/utils/logger-client.js +55 -0
- package/dist/utils/logger-server.d.ts +32 -0
- package/dist/utils/logger-server.d.ts.map +1 -0
- package/dist/utils/logger-server.js +68 -0
- package/dist/utils/logger.d.ts +14 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +12 -0
- package/dist/utils/request-context.d.ts +143 -0
- package/dist/utils/request-context.d.ts.map +1 -0
- package/dist/utils/request-context.js +168 -0
- package/dist/utils/stripUnselectedFields.d.ts +10 -0
- package/dist/utils/stripUnselectedFields.d.ts.map +1 -0
- package/dist/utils/stripUnselectedFields.js +20 -0
- package/dist/utils/type-guards.d.ts +33 -0
- package/dist/utils/type-guards.d.ts.map +1 -0
- package/dist/utils/type-guards.js +63 -0
- package/dist/utils/user.d.ts +14 -0
- package/dist/utils/user.d.ts.map +1 -0
- package/dist/utils/user.js +15 -0
- package/package.json +302 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RevealUI Rich Text Editor - Lexical Integration
|
|
3
|
+
*
|
|
4
|
+
* Uses vanilla Lexical npm packages for rich text editing.
|
|
5
|
+
* Provides a CMS-compatible API for configuring the editor.
|
|
6
|
+
*/
|
|
7
|
+
export type { EditorState, LexicalEditor, LexicalNode, SerializedEditorState, SerializedLexicalNode, } from 'lexical';
|
|
8
|
+
export { $createParagraphNode, $createTextNode, $getRoot, $getSelection, $isRangeSelection, CLEAR_EDITOR_COMMAND, CLEAR_HISTORY_COMMAND, COMMAND_PRIORITY_CRITICAL, COMMAND_PRIORITY_HIGH, COMMAND_PRIORITY_LOW, COMMAND_PRIORITY_NORMAL, createEditor, FORMAT_TEXT_COMMAND, } from 'lexical';
|
|
9
|
+
export type { RichTextContent, RscEntryLexicalCell, RscEntryLexicalField, } from './exports/server/rsc.js';
|
|
10
|
+
export { serializeLexicalState } from './exports/server/rsc.js';
|
|
11
|
+
export interface RichTextFeature {
|
|
12
|
+
name: string;
|
|
13
|
+
key: string;
|
|
14
|
+
type: 'mark' | 'block' | 'inline' | 'toolbar' | 'utility';
|
|
15
|
+
tag?: string;
|
|
16
|
+
position?: string;
|
|
17
|
+
options?: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
export interface RichTextEditor {
|
|
20
|
+
editorType: 'lexical';
|
|
21
|
+
features: RichTextFeature[];
|
|
22
|
+
outputFormat?: 'html' | 'json';
|
|
23
|
+
sanitize?: boolean;
|
|
24
|
+
validate?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare const BoldFeature: () => RichTextFeature;
|
|
27
|
+
export declare const ItalicFeature: () => RichTextFeature;
|
|
28
|
+
export declare const UnderlineFeature: () => RichTextFeature;
|
|
29
|
+
export declare const StrikethroughFeature: () => RichTextFeature;
|
|
30
|
+
export declare const CodeFeature: () => RichTextFeature;
|
|
31
|
+
export declare const SubscriptFeature: () => RichTextFeature;
|
|
32
|
+
export declare const SuperscriptFeature: () => RichTextFeature;
|
|
33
|
+
export declare const FixedToolbarFeature: () => RichTextFeature;
|
|
34
|
+
export declare const InlineToolbarFeature: () => RichTextFeature;
|
|
35
|
+
export declare const FloatingToolbarFeature: () => RichTextFeature;
|
|
36
|
+
export declare const HeadingFeature: (options?: {
|
|
37
|
+
enabledHeadingSizes?: string[];
|
|
38
|
+
}) => RichTextFeature;
|
|
39
|
+
export declare const ParagraphFeature: () => RichTextFeature;
|
|
40
|
+
export declare const ListFeature: (options?: {
|
|
41
|
+
ordered?: boolean;
|
|
42
|
+
unordered?: boolean;
|
|
43
|
+
}) => RichTextFeature;
|
|
44
|
+
export declare const QuoteFeature: () => RichTextFeature;
|
|
45
|
+
export declare const BlockquoteFeature: () => RichTextFeature;
|
|
46
|
+
export declare const CodeBlockFeature: () => RichTextFeature;
|
|
47
|
+
export declare const LinkFeature: (options?: {
|
|
48
|
+
enabledCollections?: string[];
|
|
49
|
+
fields?: unknown[];
|
|
50
|
+
allowExternalLinks?: boolean;
|
|
51
|
+
}) => RichTextFeature;
|
|
52
|
+
export declare const UploadFeature: (options?: {
|
|
53
|
+
collections?: Record<string, boolean>;
|
|
54
|
+
}) => RichTextFeature;
|
|
55
|
+
export declare const TreeViewFeature: () => RichTextFeature;
|
|
56
|
+
export declare const HistoryFeature: () => RichTextFeature;
|
|
57
|
+
export declare const RelationshipFeature: (options?: {
|
|
58
|
+
enabledCollections?: string[];
|
|
59
|
+
allowMultiple?: boolean;
|
|
60
|
+
}) => RichTextFeature;
|
|
61
|
+
export declare const BlocksFeature: (options?: {
|
|
62
|
+
blocks?: unknown[];
|
|
63
|
+
}) => RichTextFeature;
|
|
64
|
+
export declare const HorizontalRuleFeature: () => RichTextFeature;
|
|
65
|
+
export declare const ChecklistFeature: () => RichTextFeature;
|
|
66
|
+
export declare const OrderedListFeature: () => RichTextFeature;
|
|
67
|
+
export declare const UnorderedListFeature: () => RichTextFeature;
|
|
68
|
+
export declare const IndentFeature: () => RichTextFeature;
|
|
69
|
+
export declare const AlignFeature: () => RichTextFeature;
|
|
70
|
+
export declare const InlineCodeFeature: () => RichTextFeature;
|
|
71
|
+
/**
|
|
72
|
+
* Creates a Lexical editor configuration
|
|
73
|
+
*/
|
|
74
|
+
export declare const lexicalEditor: (config?: {
|
|
75
|
+
features?: ((args: {
|
|
76
|
+
defaultFeatures: RichTextFeature[];
|
|
77
|
+
rootFeatures: RichTextFeature[];
|
|
78
|
+
}) => RichTextFeature[]) | RichTextFeature[];
|
|
79
|
+
}) => RichTextEditor;
|
|
80
|
+
export interface SerializedBlockNode<T = Record<string, unknown>> {
|
|
81
|
+
type: string;
|
|
82
|
+
blockType?: string;
|
|
83
|
+
version: number;
|
|
84
|
+
fields?: T;
|
|
85
|
+
}
|
|
86
|
+
export interface SerializedTextNode {
|
|
87
|
+
type: 'text';
|
|
88
|
+
text: string;
|
|
89
|
+
format: number;
|
|
90
|
+
version: number;
|
|
91
|
+
}
|
|
92
|
+
export interface SerializedParagraphNode {
|
|
93
|
+
type: 'paragraph';
|
|
94
|
+
children: SerializedTextNode[];
|
|
95
|
+
version: number;
|
|
96
|
+
}
|
|
97
|
+
export interface SerializedHeadingNode {
|
|
98
|
+
type: 'heading';
|
|
99
|
+
tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
100
|
+
children: SerializedTextNode[];
|
|
101
|
+
version: number;
|
|
102
|
+
}
|
|
103
|
+
export interface SerializedListNode {
|
|
104
|
+
type: 'list';
|
|
105
|
+
listType: 'bullet' | 'number' | 'check';
|
|
106
|
+
children: SerializedListItemNode[];
|
|
107
|
+
version: number;
|
|
108
|
+
}
|
|
109
|
+
export interface SerializedListItemNode {
|
|
110
|
+
type: 'listitem';
|
|
111
|
+
children: SerializedTextNode[];
|
|
112
|
+
version: number;
|
|
113
|
+
}
|
|
114
|
+
export interface SerializedQuoteNode {
|
|
115
|
+
type: 'quote';
|
|
116
|
+
children: SerializedTextNode[];
|
|
117
|
+
version: number;
|
|
118
|
+
}
|
|
119
|
+
export interface SerializedCodeNode {
|
|
120
|
+
type: 'code';
|
|
121
|
+
children: SerializedTextNode[];
|
|
122
|
+
version: number;
|
|
123
|
+
}
|
|
124
|
+
export interface SerializedLinkNode {
|
|
125
|
+
type: 'link';
|
|
126
|
+
url: string;
|
|
127
|
+
children: SerializedTextNode[];
|
|
128
|
+
version: number;
|
|
129
|
+
fields?: {
|
|
130
|
+
url?: string;
|
|
131
|
+
newTab?: boolean;
|
|
132
|
+
linkType?: 'internal' | 'external';
|
|
133
|
+
doc?: {
|
|
134
|
+
value: string;
|
|
135
|
+
relationTo: string;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
export interface SerializedLinebreakNode {
|
|
140
|
+
type: 'linebreak';
|
|
141
|
+
version: number;
|
|
142
|
+
}
|
|
143
|
+
export interface SerializedUploadNode {
|
|
144
|
+
type: 'upload';
|
|
145
|
+
relationTo: string;
|
|
146
|
+
value: unknown;
|
|
147
|
+
version: number;
|
|
148
|
+
}
|
|
149
|
+
export type DefaultNodeTypes = SerializedTextNode | SerializedParagraphNode | SerializedHeadingNode | SerializedListNode | SerializedListItemNode | SerializedQuoteNode | SerializedCodeNode | SerializedLinkNode | SerializedLinebreakNode | SerializedUploadNode;
|
|
150
|
+
export interface ServerFeatureConfig {
|
|
151
|
+
feature: {
|
|
152
|
+
ClientFeature?: string | React.ComponentType<unknown>;
|
|
153
|
+
nodes?: Array<{
|
|
154
|
+
node: unknown;
|
|
155
|
+
}>;
|
|
156
|
+
generateSchemaMap?: () => Map<string, unknown>;
|
|
157
|
+
};
|
|
158
|
+
key: string;
|
|
159
|
+
}
|
|
160
|
+
export declare const createServerFeature: (config: ServerFeatureConfig) => ServerFeatureConfig;
|
|
161
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/richtext/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EACV,WAAW,EACX,aAAa,EACb,WAAW,EACX,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,QAAQ,EACR,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,YAAY,EACZ,mBAAmB,GACpB,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;IAC1D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,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1,243 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RevealUI Rich Text Editor - Lexical Integration
|
|
3
|
+
*
|
|
4
|
+
* Uses vanilla Lexical npm packages for rich text editing.
|
|
5
|
+
* Provides a CMS-compatible API for configuring the editor.
|
|
6
|
+
*/
|
|
7
|
+
// Re-export from vanilla Lexical packages
|
|
8
|
+
export { $createParagraphNode, $createTextNode, $getRoot, $getSelection, $isRangeSelection, CLEAR_EDITOR_COMMAND, CLEAR_HISTORY_COMMAND, COMMAND_PRIORITY_CRITICAL, COMMAND_PRIORITY_HIGH, COMMAND_PRIORITY_LOW, COMMAND_PRIORITY_NORMAL, createEditor, FORMAT_TEXT_COMMAND, } from 'lexical';
|
|
9
|
+
export { serializeLexicalState } from './exports/server/rsc.js';
|
|
10
|
+
// Feature factories
|
|
11
|
+
export const BoldFeature = () => ({
|
|
12
|
+
name: 'bold',
|
|
13
|
+
key: 'bold',
|
|
14
|
+
type: 'mark',
|
|
15
|
+
tag: 'strong',
|
|
16
|
+
});
|
|
17
|
+
export const ItalicFeature = () => ({
|
|
18
|
+
name: 'italic',
|
|
19
|
+
key: 'italic',
|
|
20
|
+
type: 'mark',
|
|
21
|
+
tag: 'em',
|
|
22
|
+
});
|
|
23
|
+
export const UnderlineFeature = () => ({
|
|
24
|
+
name: 'underline',
|
|
25
|
+
key: 'underline',
|
|
26
|
+
type: 'mark',
|
|
27
|
+
tag: 'u',
|
|
28
|
+
});
|
|
29
|
+
export const StrikethroughFeature = () => ({
|
|
30
|
+
name: 'strikethrough',
|
|
31
|
+
key: 'strikethrough',
|
|
32
|
+
type: 'mark',
|
|
33
|
+
tag: 's',
|
|
34
|
+
});
|
|
35
|
+
export const CodeFeature = () => ({
|
|
36
|
+
name: 'code',
|
|
37
|
+
key: 'code',
|
|
38
|
+
type: 'mark',
|
|
39
|
+
tag: 'code',
|
|
40
|
+
});
|
|
41
|
+
export const SubscriptFeature = () => ({
|
|
42
|
+
name: 'subscript',
|
|
43
|
+
key: 'subscript',
|
|
44
|
+
type: 'mark',
|
|
45
|
+
tag: 'sub',
|
|
46
|
+
});
|
|
47
|
+
export const SuperscriptFeature = () => ({
|
|
48
|
+
name: 'superscript',
|
|
49
|
+
key: 'superscript',
|
|
50
|
+
type: 'mark',
|
|
51
|
+
tag: 'sup',
|
|
52
|
+
});
|
|
53
|
+
// Toolbar features
|
|
54
|
+
export const FixedToolbarFeature = () => ({
|
|
55
|
+
name: 'fixed-toolbar',
|
|
56
|
+
key: 'fixed-toolbar',
|
|
57
|
+
type: 'toolbar',
|
|
58
|
+
position: 'fixed',
|
|
59
|
+
});
|
|
60
|
+
export const InlineToolbarFeature = () => ({
|
|
61
|
+
name: 'inline-toolbar',
|
|
62
|
+
key: 'inline-toolbar',
|
|
63
|
+
type: 'toolbar',
|
|
64
|
+
position: 'inline',
|
|
65
|
+
});
|
|
66
|
+
export const FloatingToolbarFeature = () => ({
|
|
67
|
+
name: 'floating-toolbar',
|
|
68
|
+
key: 'floating-toolbar',
|
|
69
|
+
type: 'toolbar',
|
|
70
|
+
position: 'floating',
|
|
71
|
+
});
|
|
72
|
+
// Structural features
|
|
73
|
+
export const HeadingFeature = (options) => ({
|
|
74
|
+
name: 'heading',
|
|
75
|
+
key: 'heading',
|
|
76
|
+
type: 'block',
|
|
77
|
+
options: {
|
|
78
|
+
enabledHeadingSizes: options?.enabledHeadingSizes || ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
export const ParagraphFeature = () => ({
|
|
82
|
+
name: 'paragraph',
|
|
83
|
+
key: 'paragraph',
|
|
84
|
+
type: 'block',
|
|
85
|
+
tag: 'p',
|
|
86
|
+
});
|
|
87
|
+
export const ListFeature = (options) => ({
|
|
88
|
+
name: 'list',
|
|
89
|
+
key: 'list',
|
|
90
|
+
type: 'block',
|
|
91
|
+
options: {
|
|
92
|
+
ordered: options?.ordered ?? true,
|
|
93
|
+
unordered: options?.unordered ?? true,
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
export const QuoteFeature = () => ({
|
|
97
|
+
name: 'quote',
|
|
98
|
+
key: 'quote',
|
|
99
|
+
type: 'block',
|
|
100
|
+
tag: 'blockquote',
|
|
101
|
+
});
|
|
102
|
+
export const BlockquoteFeature = QuoteFeature;
|
|
103
|
+
export const CodeBlockFeature = () => ({
|
|
104
|
+
name: 'code-block',
|
|
105
|
+
key: 'code-block',
|
|
106
|
+
type: 'block',
|
|
107
|
+
tag: 'pre',
|
|
108
|
+
});
|
|
109
|
+
// Link feature
|
|
110
|
+
export const LinkFeature = (options) => ({
|
|
111
|
+
name: 'link',
|
|
112
|
+
key: 'link',
|
|
113
|
+
type: 'inline',
|
|
114
|
+
options: {
|
|
115
|
+
enabledCollections: options?.enabledCollections || [],
|
|
116
|
+
fields: options?.fields || [],
|
|
117
|
+
allowExternalLinks: options?.allowExternalLinks ?? true,
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
// Upload feature
|
|
121
|
+
export const UploadFeature = (options) => ({
|
|
122
|
+
name: 'upload',
|
|
123
|
+
key: 'upload',
|
|
124
|
+
type: 'inline',
|
|
125
|
+
options: {
|
|
126
|
+
collections: options?.collections || {},
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
// Utility features
|
|
130
|
+
export const TreeViewFeature = () => ({
|
|
131
|
+
name: 'tree-view',
|
|
132
|
+
key: 'tree-view',
|
|
133
|
+
type: 'utility',
|
|
134
|
+
});
|
|
135
|
+
export const HistoryFeature = () => ({
|
|
136
|
+
name: 'history',
|
|
137
|
+
key: 'history',
|
|
138
|
+
type: 'utility',
|
|
139
|
+
});
|
|
140
|
+
// Relationship feature
|
|
141
|
+
export const RelationshipFeature = (options) => ({
|
|
142
|
+
name: 'relationship',
|
|
143
|
+
key: 'relationship',
|
|
144
|
+
type: 'inline',
|
|
145
|
+
options: {
|
|
146
|
+
enabledCollections: options?.enabledCollections || [],
|
|
147
|
+
allowMultiple: options?.allowMultiple ?? true,
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
// Blocks feature
|
|
151
|
+
export const BlocksFeature = (options) => ({
|
|
152
|
+
name: 'blocks',
|
|
153
|
+
key: 'blocks',
|
|
154
|
+
type: 'block',
|
|
155
|
+
options: {
|
|
156
|
+
blocks: options?.blocks || [],
|
|
157
|
+
},
|
|
158
|
+
});
|
|
159
|
+
// Horizontal rule
|
|
160
|
+
export const HorizontalRuleFeature = () => ({
|
|
161
|
+
name: 'horizontal-rule',
|
|
162
|
+
key: 'horizontal-rule',
|
|
163
|
+
type: 'block',
|
|
164
|
+
tag: 'hr',
|
|
165
|
+
});
|
|
166
|
+
// Checklist feature
|
|
167
|
+
export const ChecklistFeature = () => ({
|
|
168
|
+
name: 'checklist',
|
|
169
|
+
key: 'checklist',
|
|
170
|
+
type: 'block',
|
|
171
|
+
});
|
|
172
|
+
export const OrderedListFeature = () => ({
|
|
173
|
+
name: 'ordered-list',
|
|
174
|
+
key: 'ordered-list',
|
|
175
|
+
type: 'block',
|
|
176
|
+
tag: 'ol',
|
|
177
|
+
});
|
|
178
|
+
export const UnorderedListFeature = () => ({
|
|
179
|
+
name: 'unordered-list',
|
|
180
|
+
key: 'unordered-list',
|
|
181
|
+
type: 'block',
|
|
182
|
+
tag: 'ul',
|
|
183
|
+
});
|
|
184
|
+
export const IndentFeature = () => ({
|
|
185
|
+
name: 'indent',
|
|
186
|
+
key: 'indent',
|
|
187
|
+
type: 'utility',
|
|
188
|
+
});
|
|
189
|
+
export const AlignFeature = () => ({
|
|
190
|
+
name: 'align',
|
|
191
|
+
key: 'align',
|
|
192
|
+
type: 'utility',
|
|
193
|
+
});
|
|
194
|
+
export const InlineCodeFeature = () => ({
|
|
195
|
+
name: 'inline-code',
|
|
196
|
+
key: 'inline-code',
|
|
197
|
+
type: 'mark',
|
|
198
|
+
tag: 'code',
|
|
199
|
+
});
|
|
200
|
+
// Default features
|
|
201
|
+
const defaultFeatures = [
|
|
202
|
+
BoldFeature(),
|
|
203
|
+
ItalicFeature(),
|
|
204
|
+
UnderlineFeature(),
|
|
205
|
+
ParagraphFeature(),
|
|
206
|
+
HeadingFeature(),
|
|
207
|
+
ListFeature(),
|
|
208
|
+
LinkFeature(),
|
|
209
|
+
HistoryFeature(),
|
|
210
|
+
];
|
|
211
|
+
const rootFeatures = [
|
|
212
|
+
ParagraphFeature(),
|
|
213
|
+
HeadingFeature(),
|
|
214
|
+
ListFeature(),
|
|
215
|
+
QuoteFeature(),
|
|
216
|
+
CodeBlockFeature(),
|
|
217
|
+
UploadFeature(),
|
|
218
|
+
];
|
|
219
|
+
/**
|
|
220
|
+
* Creates a Lexical editor configuration
|
|
221
|
+
*/
|
|
222
|
+
export const lexicalEditor = (config) => {
|
|
223
|
+
let features;
|
|
224
|
+
if (typeof config?.features === 'function') {
|
|
225
|
+
features = config.features({ defaultFeatures, rootFeatures });
|
|
226
|
+
}
|
|
227
|
+
else if (Array.isArray(config?.features)) {
|
|
228
|
+
features = config.features;
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
features = defaultFeatures;
|
|
232
|
+
}
|
|
233
|
+
return {
|
|
234
|
+
editorType: 'lexical',
|
|
235
|
+
features,
|
|
236
|
+
outputFormat: 'html',
|
|
237
|
+
sanitize: true,
|
|
238
|
+
validate: true,
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
export const createServerFeature = (config) => {
|
|
242
|
+
return config;
|
|
243
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RevealUI Rich Text Editor - Lexical Module
|
|
3
|
+
*
|
|
4
|
+
* Barrel export for the Lexical editor integration.
|
|
5
|
+
* Consumers import from '@revealui/core/richtext/lexical'.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import {
|
|
10
|
+
* lexicalEditor,
|
|
11
|
+
* BoldFeature,
|
|
12
|
+
* ItalicFeature,
|
|
13
|
+
* HeadingFeature,
|
|
14
|
+
* FixedToolbarFeature,
|
|
15
|
+
* } from '@revealui/core/richtext/lexical'
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export type { EditorState, LexicalEditor, LexicalNode, SerializedEditorState, SerializedLexicalNode, } from 'lexical';
|
|
19
|
+
export type { RichTextContent, RscEntryLexicalCell, RscEntryLexicalField, } from './exports/server/rsc.js';
|
|
20
|
+
export { serializeLexicalState } from './exports/server/rsc.js';
|
|
21
|
+
export type { DefaultNodeTypes, RichTextEditor, RichTextFeature, SerializedBlockNode, SerializedCodeNode, SerializedHeadingNode, SerializedLinebreakNode, SerializedLinkNode, SerializedListItemNode, SerializedListNode, SerializedParagraphNode, SerializedQuoteNode, SerializedTextNode, SerializedUploadNode, ServerFeatureConfig, } from './index.js';
|
|
22
|
+
export { AlignFeature, BlockquoteFeature, BlocksFeature, BoldFeature, ChecklistFeature, CodeBlockFeature, CodeFeature, createServerFeature, FixedToolbarFeature, FloatingToolbarFeature, HeadingFeature, HistoryFeature, HorizontalRuleFeature, IndentFeature, InlineCodeFeature, InlineToolbarFeature, ItalicFeature, LinkFeature, ListFeature, lexicalEditor, OrderedListFeature, ParagraphFeature, QuoteFeature, RelationshipFeature, StrikethroughFeature, SubscriptFeature, SuperscriptFeature, TreeViewFeature, UnderlineFeature, UnorderedListFeature, UploadFeature, } from './index.js';
|
|
23
|
+
//# sourceMappingURL=lexical.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lexical.d.ts","sourceRoot":"","sources":["../../src/richtext/lexical.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,YAAY,EACV,WAAW,EACX,aAAa,EACb,WAAW,EACX,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,aAAa,EAEb,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EAEX,mBAAmB,EAEnB,mBAAmB,EACnB,sBAAsB,EAEtB,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EAEb,WAAW,EACX,WAAW,EAEX,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAElB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,GACd,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RevealUI Rich Text Editor - Lexical Module
|
|
3
|
+
*
|
|
4
|
+
* Barrel export for the Lexical editor integration.
|
|
5
|
+
* Consumers import from '@revealui/core/richtext/lexical'.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import {
|
|
10
|
+
* lexicalEditor,
|
|
11
|
+
* BoldFeature,
|
|
12
|
+
* ItalicFeature,
|
|
13
|
+
* HeadingFeature,
|
|
14
|
+
* FixedToolbarFeature,
|
|
15
|
+
* } from '@revealui/core/richtext/lexical'
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
// Re-export serialization
|
|
19
|
+
export { serializeLexicalState } from './exports/server/rsc.js';
|
|
20
|
+
// Editor factory and all features
|
|
21
|
+
export { AlignFeature, BlockquoteFeature, BlocksFeature,
|
|
22
|
+
// Mark features
|
|
23
|
+
BoldFeature, ChecklistFeature, CodeBlockFeature, CodeFeature,
|
|
24
|
+
// Server feature creation
|
|
25
|
+
createServerFeature,
|
|
26
|
+
// Toolbar features
|
|
27
|
+
FixedToolbarFeature, FloatingToolbarFeature,
|
|
28
|
+
// Block features
|
|
29
|
+
HeadingFeature, HistoryFeature, HorizontalRuleFeature, IndentFeature, InlineCodeFeature, InlineToolbarFeature, ItalicFeature,
|
|
30
|
+
// Inline features
|
|
31
|
+
LinkFeature, ListFeature,
|
|
32
|
+
// Factory
|
|
33
|
+
lexicalEditor, OrderedListFeature, ParagraphFeature, QuoteFeature, RelationshipFeature, StrikethroughFeature, SubscriptFeature, SuperscriptFeature,
|
|
34
|
+
// Utility features
|
|
35
|
+
TreeViewFeature, UnderlineFeature, UnorderedListFeature, UploadFeature, } from './index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/security/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RevealUI Core - Server Entry Point
|
|
3
|
+
*
|
|
4
|
+
* Server-only exports for RevealUI framework.
|
|
5
|
+
* This module includes Node.js-specific utilities and should only be imported
|
|
6
|
+
* in server-side code (API routes, server components, middleware with nodejs runtime).
|
|
7
|
+
*
|
|
8
|
+
* WARNING: Do NOT import from this module in client components or edge runtime.
|
|
9
|
+
* Use '@revealui/core' or '@revealui/core/client' for client-safe exports.
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This file does NOT use 'use server' directive as that's for Server Actions in Next.js,
|
|
12
|
+
* not for server-only modules. The separation is enforced through package.json exports.
|
|
13
|
+
*/
|
|
14
|
+
export { createRESTHandlers, handleRESTRequest } from '../api/rest.js';
|
|
15
|
+
export { universalPostgresAdapter } from '../database/universal-postgres.js';
|
|
16
|
+
export { vercelBlobStorage } from '../storage/vercel-blob.js';
|
|
17
|
+
export type { LogContext, Logger, LogLevel } from '../utils/logger-server.js';
|
|
18
|
+
export { createLogger, logger } from '../utils/logger-server.js';
|
|
19
|
+
export * from '../utils/request-context.js';
|
|
20
|
+
export { renderPage } from './renderPage.js';
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE9E,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEjE,cAAc,6BAA6B,CAAC;AAQ5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RevealUI Core - Server Entry Point
|
|
3
|
+
*
|
|
4
|
+
* Server-only exports for RevealUI framework.
|
|
5
|
+
* This module includes Node.js-specific utilities and should only be imported
|
|
6
|
+
* in server-side code (API routes, server components, middleware with nodejs runtime).
|
|
7
|
+
*
|
|
8
|
+
* WARNING: Do NOT import from this module in client components or edge runtime.
|
|
9
|
+
* Use '@revealui/core' or '@revealui/core/client' for client-safe exports.
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This file does NOT use 'use server' directive as that's for Server Actions in Next.js,
|
|
12
|
+
* not for server-only modules. The separation is enforced through package.json exports.
|
|
13
|
+
*/
|
|
14
|
+
// Server-only API handlers
|
|
15
|
+
export { createRESTHandlers, handleRESTRequest } from '../api/rest.js';
|
|
16
|
+
// Server-only database/storage
|
|
17
|
+
export { universalPostgresAdapter } from '../database/universal-postgres.js';
|
|
18
|
+
export { vercelBlobStorage } from '../storage/vercel-blob.js';
|
|
19
|
+
// Server-only logger with request context
|
|
20
|
+
export { createLogger, logger } from '../utils/logger-server.js';
|
|
21
|
+
// Request context utilities (server-only - uses async_hooks)
|
|
22
|
+
export * from '../utils/request-context.js';
|
|
23
|
+
// Monitoring (server-only due to request-context dependency)
|
|
24
|
+
// NOTE: Monitoring exports are commented out due to Sentry build-time import issues
|
|
25
|
+
// Import directly from '@revealui/core/monitoring' if needed
|
|
26
|
+
// export * from '../monitoring/index.js'
|
|
27
|
+
// Existing server functionality
|
|
28
|
+
export { renderPage } from './renderPage.js';
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { PageContext } from '../types/frontend.js';
|
|
2
|
+
export type { PageContext, PageContextInit } from '../types/frontend.js';
|
|
3
|
+
/**
|
|
4
|
+
* Escape HTML entities to prevent XSS attacks.
|
|
5
|
+
*
|
|
6
|
+
* @param str - String to escape
|
|
7
|
+
* @returns Escaped string safe for HTML content
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* escapeHtml('<script>alert("xss")</script>')
|
|
12
|
+
* // Returns: '<script>alert("xss")</script>'
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare function escapeHtml(str: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Options for rendering an HTML shell
|
|
18
|
+
*/
|
|
19
|
+
export interface HTMLShellOptions {
|
|
20
|
+
title?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
lang?: string;
|
|
23
|
+
charset?: string;
|
|
24
|
+
viewport?: string;
|
|
25
|
+
styles?: string[];
|
|
26
|
+
scripts?: string[];
|
|
27
|
+
headContent?: string;
|
|
28
|
+
bodyContent?: string;
|
|
29
|
+
bodyAttributes?: Record<string, string>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Render a basic HTML shell for SSR.
|
|
33
|
+
*
|
|
34
|
+
* @param options - Options for the HTML shell
|
|
35
|
+
* @returns Complete HTML document string
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* const html = renderHTMLShell({
|
|
40
|
+
* title: 'My Page',
|
|
41
|
+
* description: 'A sample page',
|
|
42
|
+
* bodyContent: '<div id="root">Loading...</div>',
|
|
43
|
+
* styles: ['/styles/main.css'],
|
|
44
|
+
* scripts: ['/js/app.js'],
|
|
45
|
+
* })
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export declare function renderHTMLShell(options?: HTMLShellOptions): string;
|
|
49
|
+
/**
|
|
50
|
+
* Render a page to HTML string for server-side rendering.
|
|
51
|
+
*
|
|
52
|
+
* This is a framework-agnostic utility for basic SSR. For React Server Components
|
|
53
|
+
* and advanced features like Lexical rich text serialization, use the full
|
|
54
|
+
* SSR handler at apps/mainframe/src/server/revealui-handler.tsx.
|
|
55
|
+
*
|
|
56
|
+
* @param pageData - The page data to render
|
|
57
|
+
* @param context - Page context information
|
|
58
|
+
* @returns HTML string
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* const html = renderPage(
|
|
63
|
+
* { title: 'Welcome', content: '<p>Hello world</p>' },
|
|
64
|
+
* { url: '/welcome', locale: 'en' }
|
|
65
|
+
* )
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export declare function renderPage(pageData: unknown, context: PageContext): string;
|
|
69
|
+
//# sourceMappingURL=renderPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderPage.d.ts","sourceRoot":"","sources":["../../src/server/renderPage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGxD,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAczE;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAE,gBAAqB,GAAG,MAAM,CA6CtE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,GAAG,MAAM,CAqB1E"}
|