@revealui/core 0.5.5 → 0.6.0

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.
Files changed (142) hide show
  1. package/README.md +30 -24
  2. package/dist/api/compression.d.ts +3 -4
  3. package/dist/api/compression.d.ts.map +1 -1
  4. package/dist/api/compression.js +1 -2
  5. package/dist/api/rate-limit.d.ts +11 -12
  6. package/dist/api/rate-limit.d.ts.map +1 -1
  7. package/dist/api/rate-limit.js +5 -6
  8. package/dist/api/response-cache.d.ts +8 -9
  9. package/dist/api/response-cache.d.ts.map +1 -1
  10. package/dist/api/response-cache.js +5 -4
  11. package/dist/api/rest.d.ts +1 -1
  12. package/dist/api/rest.js +2 -2
  13. package/dist/cache/query-cache.d.ts +1 -1
  14. package/dist/cache/query-cache.js +1 -1
  15. package/dist/caching/index.d.ts +1 -1
  16. package/dist/caching/index.js +1 -1
  17. package/dist/client/admin/components/AdminDashboard.d.ts.map +1 -1
  18. package/dist/client/admin/components/AdminDashboard.js +46 -3
  19. package/dist/client/admin/components/CollectionList.d.ts +3 -1
  20. package/dist/client/admin/components/CollectionList.d.ts.map +1 -1
  21. package/dist/client/admin/components/CollectionList.js +51 -2
  22. package/dist/client/admin/components/DocumentForm.js +2 -2
  23. package/dist/client/admin/layout.d.ts.map +1 -1
  24. package/dist/client/admin/layout.js +1 -3
  25. package/dist/client/admin/page.js +1 -1
  26. package/dist/client/admin/utils/apiClient.d.ts +17 -1
  27. package/dist/client/admin/utils/apiClient.d.ts.map +1 -1
  28. package/dist/client/admin/utils/apiClient.js +25 -1
  29. package/dist/client/hooks.d.ts +1 -1
  30. package/dist/client/hooks.js +1 -1
  31. package/dist/client/richtext/plugins/PastePlugin.d.ts.map +1 -1
  32. package/dist/client/richtext/plugins/PastePlugin.js +30 -0
  33. package/dist/client/ui/index.d.ts +2 -2
  34. package/dist/client/ui/index.js +2 -2
  35. package/dist/collections/operations/fieldHooks.d.ts +2 -2
  36. package/dist/collections/operations/fieldHooks.js +2 -2
  37. package/dist/collections/operations/update.js +1 -1
  38. package/dist/config/index.js +1 -1
  39. package/dist/config/runtime.d.ts +3 -3
  40. package/dist/config/runtime.d.ts.map +1 -1
  41. package/dist/config/runtime.js +2 -2
  42. package/dist/config/utils.d.ts.map +1 -1
  43. package/dist/config/utils.js +5 -0
  44. package/dist/database/safe-parse.d.ts +1 -1
  45. package/dist/database/safe-parse.js +3 -3
  46. package/dist/database/universal-postgres.d.ts +1 -1
  47. package/dist/database/universal-postgres.js +1 -1
  48. package/dist/error-handling/error-reporter.js +4 -4
  49. package/dist/features.d.ts +9 -9
  50. package/dist/features.d.ts.map +1 -1
  51. package/dist/features.js +3 -3
  52. package/dist/generated/index.d.ts +1 -1
  53. package/dist/generated/index.js +1 -1
  54. package/dist/generated/types/{cms.d.ts → admin.d.ts} +3 -3
  55. package/dist/generated/types/admin.d.ts.map +1 -0
  56. package/dist/generated/types/index.d.ts +2 -2
  57. package/dist/generated/types/index.d.ts.map +1 -1
  58. package/dist/generated/types/index.js +2 -2
  59. package/dist/index.d.ts +6 -6
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/index.js +14 -10
  62. package/dist/instance/RevealUIInstance.js +2 -2
  63. package/dist/jobs/queue.d.ts +1 -1
  64. package/dist/jobs/queue.d.ts.map +1 -1
  65. package/dist/license-encryption.d.ts +11 -2
  66. package/dist/license-encryption.d.ts.map +1 -1
  67. package/dist/license-encryption.js +79 -24
  68. package/dist/license.d.ts +68 -5
  69. package/dist/license.d.ts.map +1 -1
  70. package/dist/license.js +171 -20
  71. package/dist/monitoring/zombie-detector.js +1 -1
  72. package/dist/nextjs/index.d.ts +0 -1
  73. package/dist/nextjs/index.d.ts.map +1 -1
  74. package/dist/nextjs/index.js +7 -2
  75. package/dist/nextjs/withRevealUI.d.ts +29 -1
  76. package/dist/nextjs/withRevealUI.d.ts.map +1 -1
  77. package/dist/observability/health-check.js +1 -1
  78. package/dist/observability/logger.d.ts +0 -4
  79. package/dist/observability/logger.d.ts.map +1 -1
  80. package/dist/observability/logger.js +2 -29
  81. package/dist/plugins/nested-docs.d.ts +1 -1
  82. package/dist/plugins/nested-docs.d.ts.map +1 -1
  83. package/dist/plugins/nested-docs.js +1 -1
  84. package/dist/relationships/analyzer.d.ts +1 -1
  85. package/dist/relationships/analyzer.js +2 -2
  86. package/dist/relationships/populate-core.d.ts +1 -1
  87. package/dist/relationships/populate-core.d.ts.map +1 -1
  88. package/dist/relationships/populate-core.js +5 -1
  89. package/dist/relationships/population.js +1 -1
  90. package/dist/revealui.d.ts +0 -5
  91. package/dist/revealui.d.ts.map +1 -1
  92. package/dist/revealui.js +0 -10
  93. package/dist/richtext/exports/client/rcc.js +1 -1
  94. package/dist/richtext/exports/server/rsc.d.ts +2 -17
  95. package/dist/richtext/exports/server/rsc.d.ts.map +1 -1
  96. package/dist/richtext/exports/server/rsc.js +9 -54
  97. package/dist/richtext/index.d.ts +1 -1
  98. package/dist/richtext/index.js +1 -1
  99. package/dist/security/index.d.ts +1 -1
  100. package/dist/security/index.js +1 -1
  101. package/dist/server/renderPage.js +1 -1
  102. package/dist/types/admin.d.ts +8 -0
  103. package/dist/types/admin.d.ts.map +1 -0
  104. package/dist/types/admin.js +6 -0
  105. package/dist/types/config.d.ts +2 -2
  106. package/dist/types/config.d.ts.map +1 -1
  107. package/dist/types/config.js +1 -1
  108. package/dist/types/extensions.d.ts +1 -1
  109. package/dist/types/extensions.d.ts.map +1 -1
  110. package/dist/types/generated.d.ts +4 -4
  111. package/dist/types/generated.d.ts.map +1 -1
  112. package/dist/types/generated.js +2 -2
  113. package/dist/types/hooks.d.ts +1 -1
  114. package/dist/types/hooks.d.ts.map +1 -1
  115. package/dist/types/index.d.ts +4 -4
  116. package/dist/types/index.d.ts.map +1 -1
  117. package/dist/types/index.js +6 -6
  118. package/dist/types/jobs.d.ts +1 -1
  119. package/dist/types/jobs.js +1 -1
  120. package/dist/types/legacy.d.ts +1 -1
  121. package/dist/types/legacy.d.ts.map +1 -1
  122. package/dist/types/plugins.d.ts +1 -1
  123. package/dist/types/plugins.d.ts.map +1 -1
  124. package/dist/types/query.d.ts +2 -2
  125. package/dist/types/query.d.ts.map +1 -1
  126. package/dist/types/runtime.d.ts +2 -2
  127. package/dist/types/runtime.d.ts.map +1 -1
  128. package/dist/types/schema.d.ts +1 -1
  129. package/dist/types/schema.d.ts.map +1 -1
  130. package/dist/utils/api-wrapper.d.ts +4 -6
  131. package/dist/utils/api-wrapper.d.ts.map +1 -1
  132. package/dist/utils/api-wrapper.js +6 -9
  133. package/dist/utils/error-responses.js +1 -1
  134. package/dist/utils/field-conversion.js +1 -1
  135. package/dist/utils/type-guards.d.ts +1 -1
  136. package/dist/utils/type-guards.d.ts.map +1 -1
  137. package/package.json +87 -34
  138. package/dist/generated/types/cms.d.ts.map +0 -1
  139. package/dist/types/cms.d.ts +0 -8
  140. package/dist/types/cms.d.ts.map +0 -1
  141. package/dist/types/cms.js +0 -6
  142. /package/dist/generated/types/{cms.js → admin.js} +0 -0
@@ -1,5 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useState } from 'react';
3
4
  function getFieldLabel(field) {
4
5
  const { label } = field;
5
6
  if (typeof label === 'function') {
@@ -33,14 +34,62 @@ function formatDateValue(value) {
33
34
  }
34
35
  return '';
35
36
  }
36
- export function CollectionList({ collection, documents, totalDocs, page, totalPages, onCreate, onEdit, onDelete, onPageChange, deleting, }) {
37
+ export function CollectionList({ collection, documents, totalDocs, page, totalPages, onCreate, onEdit, onDelete, onPageChange, deleting, onBulkDelete, onBulkPublish, }) {
38
+ const [selectedIds, setSelectedIds] = useState(new Set());
39
+ const [bulkLoading, setBulkLoading] = useState(false);
40
+ const hasBulk = Boolean(onBulkDelete || onBulkPublish);
41
+ const allSelected = documents.length > 0 && selectedIds.size === documents.length;
42
+ const someSelected = selectedIds.size > 0 && !allSelected;
43
+ const toggleAll = () => {
44
+ if (allSelected) {
45
+ setSelectedIds(new Set());
46
+ }
47
+ else {
48
+ setSelectedIds(new Set(documents.map((d) => String(d.id))));
49
+ }
50
+ };
51
+ const toggleOne = (id) => {
52
+ setSelectedIds((prev) => {
53
+ const next = new Set(prev);
54
+ if (next.has(id)) {
55
+ next.delete(id);
56
+ }
57
+ else {
58
+ next.add(id);
59
+ }
60
+ return next;
61
+ });
62
+ };
63
+ const handleBulkAction = async (action) => {
64
+ const ids = [...selectedIds];
65
+ if (ids.length === 0)
66
+ return;
67
+ setBulkLoading(true);
68
+ try {
69
+ if (action === 'delete' && onBulkDelete)
70
+ await onBulkDelete(ids);
71
+ if (action === 'publish' && onBulkPublish)
72
+ await onBulkPublish(ids);
73
+ setSelectedIds(new Set());
74
+ }
75
+ finally {
76
+ setBulkLoading(false);
77
+ }
78
+ };
37
79
  // Filter to only include fields with names (exclude layout fields) that are visible
38
80
  const displayFields = collection.fields
39
81
  .filter((field) => {
40
82
  return field.name && field.admin?.position !== 'sidebar' && !field.admin?.hidden;
41
83
  })
42
84
  .slice(0, 5); // Show first 5 visible fields
43
- return (_jsxs("div", { className: "bg-white shadow overflow-hidden sm:rounded-md", children: [_jsxs("div", { className: "px-4 py-5 sm:px-6 flex justify-between items-center", children: [_jsxs("div", { children: [_jsx("h3", { className: "text-lg leading-6 font-medium text-gray-900 capitalize", children: collection.slug }), _jsxs("p", { className: "mt-1 max-w-2xl text-sm text-gray-500", children: [totalDocs, " ", totalDocs === 1 ? 'document' : 'documents'] })] }), _jsxs("button", { type: "button", onClick: onCreate, className: "inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500", children: [_jsxs("svg", { className: "-ml-1 mr-2 h-5 w-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", role: "img", focusable: "false", children: [_jsx("title", { children: "Create New" }), _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 4v16m8-8H4" })] }), "Create New"] })] }), _jsx("div", { className: "overflow-x-auto", children: _jsxs("table", { className: "min-w-full divide-y divide-gray-200", children: [_jsx("thead", { className: "bg-gray-50", children: _jsxs("tr", { children: [displayFields.map((field) => (_jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: getFieldLabel(field) }, field.name))), _jsx("th", { scope: "col", className: "relative px-6 py-3", children: _jsx("span", { className: "sr-only", children: "Actions" }) })] }) }), _jsx("tbody", { className: "bg-white divide-y divide-gray-200", children: documents.length === 0 ? (_jsx("tr", { children: _jsxs("td", { colSpan: displayFields.length + 1, className: "px-6 py-4 text-center text-sm text-gray-500", children: ["No documents found.", ' ', _jsx("button", { type: "button", onClick: onCreate, className: "text-indigo-600 hover:text-indigo-500", children: "Create the first one" }), "."] }) })) : (documents.map((doc) => (_jsxs("tr", { className: "hover:bg-gray-50", children: [displayFields.map((field) => (_jsx("td", { className: "px-6 py-4 whitespace-nowrap text-sm text-gray-900", children: renderFieldValue(field.name ? doc[field.name] : undefined, field) }, field.name))), _jsxs("td", { className: "px-6 py-4 whitespace-nowrap text-right text-sm font-medium space-x-2", children: [_jsx("button", { type: "button", onClick: () => onEdit(doc), className: "text-indigo-600 hover:text-indigo-900 disabled:opacity-50 disabled:cursor-not-allowed", disabled: deleting !== null, children: "Edit" }), _jsx("button", { type: "button", onClick: () => onDelete(doc), className: "text-red-600 hover:text-red-900 disabled:opacity-50 disabled:cursor-not-allowed", disabled: deleting !== null, children: deleting === doc.id ? 'Deleting...' : 'Delete' })] })] }, doc.id)))) })] }) }), totalPages > 1 && (_jsxs("div", { className: "bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6", children: [_jsxs("div", { className: "flex-1 flex justify-between sm:hidden", children: [_jsx("button", { type: "button", onClick: () => onPageChange(page - 1), disabled: page <= 1, className: "relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed", children: "Previous" }), _jsx("button", { type: "button", onClick: () => onPageChange(page + 1), disabled: page >= totalPages, className: "ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed", children: "Next" })] }), _jsxs("div", { className: "hidden sm:flex-1 sm:flex sm:items-center sm:justify-between", children: [_jsx("div", { children: _jsxs("p", { className: "text-sm text-gray-700", children: ["Showing page ", _jsx("span", { className: "font-medium", children: page }), " of", ' ', _jsx("span", { className: "font-medium", children: totalPages })] }) }), _jsx("div", { children: _jsxs("nav", { className: "relative z-0 inline-flex rounded-md shadow-sm -space-x-px", children: [_jsx("button", { type: "button", onClick: () => onPageChange(page - 1), disabled: page <= 1, className: "relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed", children: "Previous" }), _jsx("button", { type: "button", onClick: () => onPageChange(page + 1), disabled: page >= totalPages, className: "relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed", children: "Next" })] }) })] })] }))] }));
85
+ const colCount = displayFields.length + 1 + (hasBulk ? 1 : 0);
86
+ return (_jsxs("div", { className: "bg-white shadow overflow-hidden sm:rounded-md", children: [_jsxs("div", { className: "px-4 py-5 sm:px-6 flex justify-between items-center", children: [_jsxs("div", { children: [_jsx("h3", { className: "text-lg leading-6 font-medium text-gray-900 capitalize", children: collection.slug }), _jsxs("p", { className: "mt-1 max-w-2xl text-sm text-gray-500", children: [totalDocs, " ", totalDocs === 1 ? 'document' : 'documents'] })] }), _jsxs("button", { type: "button", onClick: onCreate, className: "inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500", children: [_jsxs("svg", { className: "-ml-1 mr-2 h-5 w-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", role: "img", focusable: "false", children: [_jsx("title", { children: "Create New" }), _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 4v16m8-8H4" })] }), "Create New"] })] }), hasBulk && selectedIds.size > 0 && (_jsxs("div", { className: "bg-indigo-50 border-y border-indigo-100 px-4 py-2 flex items-center gap-3", children: [_jsxs("span", { className: "text-sm font-medium text-indigo-700", children: [selectedIds.size, " selected"] }), onBulkDelete && (_jsx("button", { type: "button", onClick: () => void handleBulkAction('delete'), disabled: bulkLoading, className: "inline-flex items-center px-3 py-1 text-xs font-medium rounded-md text-red-700 bg-red-100 hover:bg-red-200 disabled:opacity-50", children: "Delete" })), onBulkPublish && (_jsx("button", { type: "button", onClick: () => void handleBulkAction('publish'), disabled: bulkLoading, className: "inline-flex items-center px-3 py-1 text-xs font-medium rounded-md text-green-700 bg-green-100 hover:bg-green-200 disabled:opacity-50", children: "Publish" })), _jsx("button", { type: "button", onClick: () => setSelectedIds(new Set()), className: "ml-auto text-xs text-gray-500 hover:text-gray-700", children: "Clear selection" })] })), _jsx("div", { className: "overflow-x-auto", children: _jsxs("table", { className: "min-w-full divide-y divide-gray-200", children: [_jsx("thead", { className: "bg-gray-50", children: _jsxs("tr", { children: [hasBulk && (_jsx("th", { scope: "col", className: "w-10 px-3 py-3", children: _jsx("input", { type: "checkbox", checked: allSelected, ref: (el) => {
87
+ if (el)
88
+ el.indeterminate = someSelected;
89
+ }, onChange: toggleAll, className: "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500", "aria-label": "Select all" }) })), displayFields.map((field) => (_jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: getFieldLabel(field) }, field.name))), _jsx("th", { scope: "col", className: "relative px-6 py-3", children: _jsx("span", { className: "sr-only", children: "Actions" }) })] }) }), _jsx("tbody", { className: "bg-white divide-y divide-gray-200", children: documents.length === 0 ? (_jsx("tr", { children: _jsxs("td", { colSpan: colCount, className: "px-6 py-4 text-center text-sm text-gray-500", children: ["No documents found.", ' ', _jsx("button", { type: "button", onClick: onCreate, className: "text-indigo-600 hover:text-indigo-500", children: "Create the first one" }), "."] }) })) : (documents.map((doc) => {
90
+ const docId = String(doc.id);
91
+ return (_jsxs("tr", { className: `hover:bg-gray-50 ${selectedIds.has(docId) ? 'bg-indigo-50' : ''}`, children: [hasBulk && (_jsx("td", { className: "w-10 px-3 py-4", children: _jsx("input", { type: "checkbox", checked: selectedIds.has(docId), onChange: () => toggleOne(docId), className: "h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500", "aria-label": `Select ${docId}` }) })), displayFields.map((field) => (_jsx("td", { className: "px-6 py-4 whitespace-nowrap text-sm text-gray-900", children: renderFieldValue(field.name ? doc[field.name] : undefined, field) }, field.name))), _jsxs("td", { className: "px-6 py-4 whitespace-nowrap text-right text-sm font-medium space-x-2", children: [_jsx("button", { type: "button", onClick: () => onEdit(doc), className: "text-indigo-600 hover:text-indigo-900 disabled:opacity-50 disabled:cursor-not-allowed", disabled: deleting !== null, children: "Edit" }), _jsx("button", { type: "button", onClick: () => onDelete(doc), className: "text-red-600 hover:text-red-900 disabled:opacity-50 disabled:cursor-not-allowed", disabled: deleting !== null, children: deleting === docId ? 'Deleting...' : 'Delete' })] })] }, docId));
92
+ })) })] }) }), totalPages > 1 && (_jsxs("div", { className: "bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6", children: [_jsxs("div", { className: "flex-1 flex justify-between sm:hidden", children: [_jsx("button", { type: "button", onClick: () => onPageChange(page - 1), disabled: page <= 1, className: "relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed", children: "Previous" }), _jsx("button", { type: "button", onClick: () => onPageChange(page + 1), disabled: page >= totalPages, className: "ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed", children: "Next" })] }), _jsxs("div", { className: "hidden sm:flex-1 sm:flex sm:items-center sm:justify-between", children: [_jsx("div", { children: _jsxs("p", { className: "text-sm text-gray-700", children: ["Showing page ", _jsx("span", { className: "font-medium", children: page }), " of", ' ', _jsx("span", { className: "font-medium", children: totalPages })] }) }), _jsx("div", { children: _jsxs("nav", { className: "relative z-0 inline-flex rounded-md shadow-sm -space-x-px", children: [_jsx("button", { type: "button", onClick: () => onPageChange(page - 1), disabled: page <= 1, className: "relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed", children: "Previous" }), _jsx("button", { type: "button", onClick: () => onPageChange(page + 1), disabled: page >= totalPages, className: "relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed", children: "Next" })] }) })] })] }))] }));
44
93
  }
45
94
  function renderFieldValue(value, field) {
46
95
  if (value === null || value === undefined) {
@@ -2,7 +2,7 @@
2
2
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
3
3
  import { lazy, Suspense, useCallback, useState } from 'react';
4
4
  // Lazy-loaded so Lexical (~1.2MB) is only bundled for edit pages with richText
5
- // fieldslist/dashboard pages skip the entire Lexical chunk.
5
+ // fields - list/dashboard pages skip the entire Lexical chunk.
6
6
  const RichTextEditor = lazy(() => import('../../richtext/RichTextEditor.js').then((m) => ({ default: m.RichTextEditor })));
7
7
  function getFieldLabel(field) {
8
8
  const { label } = field;
@@ -158,7 +158,7 @@ function PointFieldRenderer({ field, value, onChange, }) {
158
158
  return (_jsxs("div", { className: "grid grid-cols-2 gap-3", children: [_jsxs("div", { children: [_jsx("label", { htmlFor: `${field.name}-lat`, className: "block text-xs font-medium text-gray-600", children: "Latitude" }), _jsx("input", { type: "number", id: `${field.name}-lat`, value: point.lat, onChange: (e) => onChange({ ...point, lat: Number(e.target.value) }), className: baseClasses, step: "any", min: -90, max: 90 })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: `${field.name}-lng`, className: "block text-xs font-medium text-gray-600", children: "Longitude" }), _jsx("input", { type: "number", id: `${field.name}-lng`, value: point.lng, onChange: (e) => onChange({ ...point, lng: Number(e.target.value) }), className: baseClasses, step: "any", min: -180, max: 180 })] })] }));
159
159
  }
160
160
  // ---------------------------------------------------------------------------
161
- // Main FieldInputrenders the appropriate control for each field type
161
+ // Main FieldInput - renders the appropriate control for each field type
162
162
  // ---------------------------------------------------------------------------
163
163
  function FieldInput({ field, value, onChange }) {
164
164
  const baseClasses = 'mt-1 block w-full border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm';
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/client/admin/layout.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGnD,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACpE;AAED,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,eAAe,2CAiBvE"}
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/client/admin/layout.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGnD,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACpE;AAED,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,eAAe,2CAiBvE"}
@@ -1,7 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- // RevealUI Admin Layout - Local implementation
3
- import Head from 'next/head';
4
2
  import { ServerFunctionProvider } from './context/ServerFunctionContext.js';
5
3
  export function RootLayout({ children, serverFunction }) {
6
- return (_jsxs("html", { lang: "en", children: [_jsxs(Head, { children: [_jsx("meta", { charSet: "utf-8" }), _jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }), _jsx("title", { children: "RevealUI Admin" })] }), _jsx("body", { className: "antialiased", children: _jsx(ServerFunctionProvider, { serverFunction: serverFunction, children: _jsx("main", { id: "revealui-admin", className: "min-h-screen", children: children }) }) })] }));
4
+ return (_jsxs("html", { lang: "en", children: [_jsxs("head", { children: [_jsx("meta", { charSet: "utf-8" }), _jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }), _jsx("title", { children: "RevealUI Admin" })] }), _jsx("body", { className: "antialiased", children: _jsx(ServerFunctionProvider, { serverFunction: serverFunction, children: _jsx("main", { id: "revealui-admin", className: "min-h-screen", children: children }) }) })] }));
7
5
  }
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  export function RootPage({ config }) {
3
3
  const collections = (config.collections || []);
4
4
  const globals = (config.globals || []);
5
- return (_jsxs("div", { className: "min-h-screen bg-gray-50", children: [_jsx("header", { className: "bg-white shadow-sm border-b", children: _jsx("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: _jsxs("div", { className: "flex justify-between items-center py-4", children: [_jsx("div", { className: "flex items-center", children: _jsx("h1", { className: "text-2xl font-bold text-gray-900", children: "RevealUI Admin" }) }), _jsx("div", { className: "flex items-center space-x-4", children: _jsx("span", { className: "text-sm text-gray-500", children: "v0.1.0" }) })] }) }) }), _jsx("main", { className: "max-w-7xl mx-auto py-6 sm:px-6 lg:px-8", children: _jsx("div", { className: "px-4 py-6 sm:px-0", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3", children: [_jsxs("div", { className: "bg-white overflow-hidden shadow rounded-lg", children: [_jsx("div", { className: "p-5", children: _jsxs("div", { className: "flex items-center", children: [_jsx("div", { className: "flex-shrink-0", children: _jsxs("svg", { className: "h-8 w-8 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: [_jsx("title", { children: "Collections icon" }), _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" })] }) }), _jsx("div", { className: "ml-5 w-0 flex-1", children: _jsxs("dl", { children: [_jsx("dt", { className: "text-sm font-medium text-gray-500 truncate", children: "Collections" }), _jsx("dd", { className: "text-lg font-medium text-gray-900", children: collections.length })] }) })] }) }), _jsx("div", { className: "bg-gray-50 px-5 py-3", children: _jsx("div", { className: "text-sm", children: collections.length > 0 ? (_jsx("ul", { className: "space-y-1", children: collections.map((collection) => (_jsxs("li", { className: "text-gray-600", children: [_jsx("span", { className: "font-medium", children: collection.slug }), _jsxs("span", { className: "ml-2 text-xs text-gray-400", children: ["(", collection.fields?.length || 0, " fields)"] })] }, collection.slug))) })) : (_jsx("p", { className: "text-gray-500", children: "No collections configured" })) }) })] }), _jsxs("div", { className: "bg-white overflow-hidden shadow rounded-lg", children: [_jsx("div", { className: "p-5", children: _jsxs("div", { className: "flex items-center", children: [_jsx("div", { className: "flex-shrink-0", children: _jsxs("svg", { className: "h-8 w-8 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: [_jsx("title", { children: "Globals icon" }), _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 100 4m0-4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 100 4m0-4v2m0-6V4" })] }) }), _jsx("div", { className: "ml-5 w-0 flex-1", children: _jsxs("dl", { children: [_jsx("dt", { className: "text-sm font-medium text-gray-500 truncate", children: "Globals" }), _jsx("dd", { className: "text-lg font-medium text-gray-900", children: globals.length })] }) })] }) }), _jsx("div", { className: "bg-gray-50 px-5 py-3", children: _jsx("div", { className: "text-sm", children: globals.length > 0 ? (_jsx("ul", { className: "space-y-1", children: globals.map((global) => (_jsxs("li", { className: "text-gray-600", children: [_jsx("span", { className: "font-medium", children: global.slug }), _jsxs("span", { className: "ml-2 text-xs text-gray-400", children: ["(", global.fields?.length || 0, " fields)"] })] }, global.slug))) })) : (_jsx("p", { className: "text-gray-500", children: "No globals configured" })) }) })] }), _jsxs("div", { className: "bg-white overflow-hidden shadow rounded-lg", children: [_jsx("div", { className: "p-5", children: _jsxs("div", { className: "flex items-center", children: [_jsx("div", { className: "flex-shrink-0", children: _jsx("div", { className: "h-8 w-8 bg-green-100 rounded-full flex items-center justify-center", children: _jsxs("svg", { className: "h-5 w-5 text-green-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: [_jsx("title", { children: "System operational" }), _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" })] }) }) }), _jsx("div", { className: "ml-5 w-0 flex-1", children: _jsxs("dl", { children: [_jsx("dt", { className: "text-sm font-medium text-gray-500 truncate", children: "System Status" }), _jsx("dd", { className: "text-lg font-medium text-gray-900", children: "Operational" })] }) })] }) }), _jsx("div", { className: "bg-gray-50 px-5 py-3", children: _jsxs("div", { className: "text-sm text-gray-600", children: ["RevealUI CMS is running successfully with ", collections.length, " collections and", ' ', globals.length, " globals configured."] }) })] })] }) }) })] }));
5
+ return (_jsxs("div", { className: "min-h-screen bg-gray-50", children: [_jsx("header", { className: "bg-white shadow-sm border-b", children: _jsx("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: _jsxs("div", { className: "flex justify-between items-center py-4", children: [_jsx("div", { className: "flex items-center", children: _jsx("h1", { className: "text-2xl font-bold text-gray-900", children: "RevealUI Admin" }) }), _jsx("div", { className: "flex items-center space-x-4", children: _jsx("span", { className: "text-sm text-gray-500", children: "v0.1.0" }) })] }) }) }), _jsx("main", { className: "max-w-7xl mx-auto py-6 sm:px-6 lg:px-8", children: _jsx("div", { className: "px-4 py-6 sm:px-0", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3", children: [_jsxs("div", { className: "bg-white overflow-hidden shadow rounded-lg", children: [_jsx("div", { className: "p-5", children: _jsxs("div", { className: "flex items-center", children: [_jsx("div", { className: "flex-shrink-0", children: _jsxs("svg", { className: "h-8 w-8 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: [_jsx("title", { children: "Collections icon" }), _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" })] }) }), _jsx("div", { className: "ml-5 w-0 flex-1", children: _jsxs("dl", { children: [_jsx("dt", { className: "text-sm font-medium text-gray-500 truncate", children: "Collections" }), _jsx("dd", { className: "text-lg font-medium text-gray-900", children: collections.length })] }) })] }) }), _jsx("div", { className: "bg-gray-50 px-5 py-3", children: _jsx("div", { className: "text-sm", children: collections.length > 0 ? (_jsx("ul", { className: "space-y-1", children: collections.map((collection) => (_jsxs("li", { className: "text-gray-600", children: [_jsx("span", { className: "font-medium", children: collection.slug }), _jsxs("span", { className: "ml-2 text-xs text-gray-400", children: ["(", collection.fields?.length || 0, " fields)"] })] }, collection.slug))) })) : (_jsx("p", { className: "text-gray-500", children: "No collections configured" })) }) })] }), _jsxs("div", { className: "bg-white overflow-hidden shadow rounded-lg", children: [_jsx("div", { className: "p-5", children: _jsxs("div", { className: "flex items-center", children: [_jsx("div", { className: "flex-shrink-0", children: _jsxs("svg", { className: "h-8 w-8 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: [_jsx("title", { children: "Globals icon" }), _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 100 4m0-4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 100 4m0-4v2m0-6V4" })] }) }), _jsx("div", { className: "ml-5 w-0 flex-1", children: _jsxs("dl", { children: [_jsx("dt", { className: "text-sm font-medium text-gray-500 truncate", children: "Globals" }), _jsx("dd", { className: "text-lg font-medium text-gray-900", children: globals.length })] }) })] }) }), _jsx("div", { className: "bg-gray-50 px-5 py-3", children: _jsx("div", { className: "text-sm", children: globals.length > 0 ? (_jsx("ul", { className: "space-y-1", children: globals.map((global) => (_jsxs("li", { className: "text-gray-600", children: [_jsx("span", { className: "font-medium", children: global.slug }), _jsxs("span", { className: "ml-2 text-xs text-gray-400", children: ["(", global.fields?.length || 0, " fields)"] })] }, global.slug))) })) : (_jsx("p", { className: "text-gray-500", children: "No globals configured" })) }) })] }), _jsxs("div", { className: "bg-white overflow-hidden shadow rounded-lg", children: [_jsx("div", { className: "p-5", children: _jsxs("div", { className: "flex items-center", children: [_jsx("div", { className: "flex-shrink-0", children: _jsx("div", { className: "h-8 w-8 bg-green-100 rounded-full flex items-center justify-center", children: _jsxs("svg", { className: "h-5 w-5 text-green-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: [_jsx("title", { children: "System operational" }), _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" })] }) }) }), _jsx("div", { className: "ml-5 w-0 flex-1", children: _jsxs("dl", { children: [_jsx("dt", { className: "text-sm font-medium text-gray-500 truncate", children: "System Status" }), _jsx("dd", { className: "text-lg font-medium text-gray-900", children: "Operational" })] }) })] }) }), _jsx("div", { className: "bg-gray-50 px-5 py-3", children: _jsxs("div", { className: "text-sm text-gray-600", children: ["RevealUI admin is running successfully with ", collections.length, " collections and", ' ', globals.length, " globals configured."] }) })] })] }) }) })] }));
6
6
  }
7
7
  export function NotFoundPage() {
8
8
  return (_jsxs("div", { children: [_jsx("h1", { children: "404 - Page Not Found" }), _jsx("p", { children: "The requested admin page could not be found." })] }));
@@ -68,7 +68,7 @@ export interface APIClientOptions {
68
68
  baseURL?: string;
69
69
  }
70
70
  /**
71
- * API Client class for making authenticated requests to RevealUI CMS API
71
+ * API Client class for making authenticated requests to RevealUI admin API
72
72
  */
73
73
  export declare class APIClient {
74
74
  private baseURL;
@@ -97,6 +97,22 @@ export declare class APIClient {
97
97
  * Delete a document
98
98
  */
99
99
  delete(options: DeleteOptions): Promise<void>;
100
+ /**
101
+ * Batch delete documents
102
+ */
103
+ batchDelete(options: {
104
+ collection: string;
105
+ ids: string[];
106
+ }): Promise<void>;
107
+ /**
108
+ * Batch update documents (e.g., bulk publish)
109
+ */
110
+ batchUpdate(options: {
111
+ collection: string;
112
+ items: Array<{
113
+ id: string;
114
+ } & Record<string, unknown>>;
115
+ }): Promise<void>;
100
116
  /**
101
117
  * Find a global by slug
102
118
  */
@@ -1 +1 @@
1
- {"version":3,"file":"apiClient.d.ts","sourceRoot":"","sources":["../../../../src/client/admin/utils/apiClient.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,cAAc;IAC7C,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;IACX,GAAG,CAAC,EAAE,CAAC,CAAC;IACR,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrD;AAED,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,cAAc,mBAAmB;IACjC,aAAa,kBAAkB;IAC/B,UAAU,eAAe;IACzB,QAAQ,cAAc;IACtB,MAAM,WAAW;CAClB;AAED,qBAAa,QAAS,SAAQ,KAAK;IAExB,IAAI,EA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,CAAC,cAAc,CAAC;IAerE;;OAEG;IACG,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,cAAc,CAAC;CAe1E;AAGD,eAAO,MAAM,SAAS,WAAkB,CAAC"}
@@ -45,7 +45,7 @@ const getErrorField = (payload) => {
45
45
  return typeof firstError?.field === 'string' ? firstError.field : undefined;
46
46
  };
47
47
  /**
48
- * API Client class for making authenticated requests to RevealUI CMS API
48
+ * API Client class for making authenticated requests to RevealUI admin API
49
49
  */
50
50
  export class APIClient {
51
51
  baseURL;
@@ -182,6 +182,30 @@ export class APIClient {
182
182
  method: 'DELETE',
183
183
  });
184
184
  }
185
+ /**
186
+ * Batch delete documents
187
+ */
188
+ async batchDelete(options) {
189
+ await this.request('/api/batch/delete', {
190
+ method: 'POST',
191
+ body: JSON.stringify({
192
+ collection: options.collection,
193
+ items: options.ids.map((id) => ({ id })),
194
+ }),
195
+ });
196
+ }
197
+ /**
198
+ * Batch update documents (e.g., bulk publish)
199
+ */
200
+ async batchUpdate(options) {
201
+ await this.request('/api/batch/update', {
202
+ method: 'POST',
203
+ body: JSON.stringify({
204
+ collection: options.collection,
205
+ items: options.items,
206
+ }),
207
+ });
208
+ }
185
209
  /**
186
210
  * Find a global by slug
187
211
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * RevealUI Client-Side React Hooks
3
3
  *
4
- * Client-side React hooks and HOCs for RevealUI CMS
4
+ * Client-side React hooks and HOCs for RevealUI admin
5
5
  */
6
6
  import type React from 'react';
7
7
  import type { RevealUIContext } from '../types/index.js';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * RevealUI Client-Side React Hooks
3
3
  *
4
- * Client-side React hooks and HOCs for RevealUI CMS
4
+ * Client-side React hooks and HOCs for RevealUI admin
5
5
  */
6
6
  'use client';
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -1 +1 @@
1
- {"version":3,"file":"PastePlugin.d.ts","sourceRoot":"","sources":["../../../../src/client/richtext/plugins/PastePlugin.tsx"],"names":[],"mappings":"AAcA,wBAAgB,WAAW,IAAI,IAAI,CAiClC"}
1
+ {"version":3,"file":"PastePlugin.d.ts","sourceRoot":"","sources":["../../../../src/client/richtext/plugins/PastePlugin.tsx"],"names":[],"mappings":"AAgDA,wBAAgB,WAAW,IAAI,IAAI,CAkClC"}
@@ -9,6 +9,35 @@ import { $generateNodesFromDOM } from '@lexical/html';
9
9
  import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
10
10
  import { $getSelection, $isRangeSelection, COMMAND_PRIORITY_LOW, PASTE_COMMAND } from 'lexical';
11
11
  import { useEffect } from 'react';
12
+ /**
13
+ * Sanitize a parsed DOM document by removing dangerous elements and attributes.
14
+ * This prevents XSS from pasted HTML content.
15
+ */
16
+ const DANGEROUS_URL_SCHEMES = /^\s*(javascript|vbscript|data|blob):/i;
17
+ function sanitizeDom(doc) {
18
+ // Remove dangerous elements
19
+ const dangerous = doc.querySelectorAll('script, style, iframe, object, embed, form, noscript, link[rel="import"], base');
20
+ for (const el of dangerous) {
21
+ el.remove();
22
+ }
23
+ // Remove dangerous attributes from all remaining elements
24
+ for (const el of doc.querySelectorAll('*')) {
25
+ for (const attr of [...el.attributes]) {
26
+ const name = attr.name.toLowerCase();
27
+ // Remove event handlers (onclick, onerror, etc.)
28
+ if (name.startsWith('on')) {
29
+ el.removeAttribute(attr.name);
30
+ continue;
31
+ }
32
+ // Remove dangerous URL schemes from href, src, action, formaction, xlink:href
33
+ if (['href', 'src', 'action', 'formaction', 'xlink:href'].includes(name)) {
34
+ if (DANGEROUS_URL_SCHEMES.test(attr.value)) {
35
+ el.removeAttribute(attr.name);
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
12
41
  export function PastePlugin() {
13
42
  const [editor] = useLexicalComposerContext();
14
43
  useEffect(() => {
@@ -26,6 +55,7 @@ export function PastePlugin() {
26
55
  return;
27
56
  const parser = new DOMParser();
28
57
  const dom = parser.parseFromString(htmlData, 'text/html');
58
+ sanitizeDom(dom);
29
59
  const nodes = $generateNodesFromDOM(editor, dom);
30
60
  selection.insertNodes(nodes);
31
61
  });
@@ -1,7 +1,7 @@
1
1
  /**
2
- * RevealUI CMS UI Components
2
+ * RevealUI admin UI Components
3
3
  *
4
- * Provides form field components and utilities for the CMS admin interface.
4
+ * Provides form field components and utilities for the admin dashboard interface.
5
5
  */
6
6
  import React from 'react';
7
7
  export interface TextInputProps {
@@ -1,7 +1,7 @@
1
1
  /**
2
- * RevealUI CMS UI Components
2
+ * RevealUI admin UI Components
3
3
  *
4
- * Provides form field components and utilities for the CMS admin interface.
4
+ * Provides form field components and utilities for the admin dashboard interface.
5
5
  */
6
6
  'use client';
7
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -13,9 +13,9 @@ import type { RevealCollectionConfig, RevealDocument, RevealRequest } from '../.
13
13
  * previous hook, so hooks compose (later hooks see the output of earlier ones).
14
14
  *
15
15
  * Called twice per write operation:
16
- * 1. `beforeValidate`before required-field checks, so hooks can generate values
16
+ * 1. `beforeValidate` - before required-field checks, so hooks can generate values
17
17
  * (e.g. slug auto-generation from title) that satisfy required constraints.
18
- * 2. `beforeChange`after validation, before the DB write.
18
+ * 2. `beforeChange` - after validation, before the DB write.
19
19
  */
20
20
  export declare function runBeforeFieldHooks(config: RevealCollectionConfig, data: Record<string, unknown>, operation: 'create' | 'update', hookType: 'beforeValidate' | 'beforeChange', originalDoc?: RevealDocument, req?: RevealRequest): Promise<void>;
21
21
  //# sourceMappingURL=fieldHooks.d.ts.map
@@ -13,9 +13,9 @@ import { flattenFields } from '../../utils/type-guards.js';
13
13
  * previous hook, so hooks compose (later hooks see the output of earlier ones).
14
14
  *
15
15
  * Called twice per write operation:
16
- * 1. `beforeValidate`before required-field checks, so hooks can generate values
16
+ * 1. `beforeValidate` - before required-field checks, so hooks can generate values
17
17
  * (e.g. slug auto-generation from title) that satisfy required constraints.
18
- * 2. `beforeChange`after validation, before the DB write.
18
+ * 2. `beforeChange` - after validation, before the DB write.
19
19
  */
20
20
  export async function runBeforeFieldHooks(config, data, operation, hookType, originalDoc, req) {
21
21
  const fields = flattenFields(config.fields || []);
@@ -205,7 +205,7 @@ export async function update(config, db, options) {
205
205
  const query = updateByIdWithVersionQuery(tableName, updateKeys);
206
206
  const result = await db.query(query, [...updateValues, clientVersion, idString]);
207
207
  if (result.rowCount === 0) {
208
- // Document exists but version mismatchconcurrent edit detected
208
+ // Document exists but version mismatch - concurrent edit detected
209
209
  const err = new Error('Document was modified by another user. Refresh and try again.');
210
210
  err.statusCode = 409;
211
211
  throw err;
@@ -1,4 +1,4 @@
1
- import { ConfigValidationError, validateConfigStructure } from '@revealui/contracts/cms';
1
+ import { ConfigValidationError, validateConfigStructure } from '@revealui/contracts/admin';
2
2
  import { deepMerge } from './utils.js';
3
3
  /**
4
4
  * Build and validate a RevealUI configuration
@@ -1,4 +1,4 @@
1
- import type { Config as ContractsConfig } from '@revealui/contracts/cms';
1
+ import type { Config as ContractsConfig } from '@revealui/contracts/admin';
2
2
  import type { RevealConfig, RevealUIInstance } from '../types/index.js';
3
3
  /** Accepted config types for getRevealUI */
4
4
  type AcceptedConfig = RevealConfig | ContractsConfig | Record<string, unknown>;
@@ -7,13 +7,13 @@ type AcceptedConfig = RevealConfig | ContractsConfig | Record<string, unknown>;
7
7
  *
8
8
  * @param options.config - RevealUI configuration object. Accepts:
9
9
  * - `RevealConfig`: Framework configuration type (preferred for type safety)
10
- * - `Config` from @revealui/contracts/cms: CMS configuration from buildConfig()
10
+ * - `Config` from @revealui/contracts/admin: admin configuration from buildConfig()
11
11
  * - `Record<string, unknown>`: Loose typing for flexibility
12
12
  *
13
13
  * Note: Generated Config types have a different structure (collections as record vs array)
14
14
  * but are runtime-compatible. The function accepts both for convenience.
15
15
  *
16
- * @returns A RevealUI instance that provides CMS functionality
16
+ * @returns A RevealUI instance that provides admin functionality
17
17
  */
18
18
  export declare function getRevealUI(options: {
19
19
  config: AcceptedConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/config/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAExE,4CAA4C;AAC5C,KAAK,cAAc,GAAG,YAAY,GAAG,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAK/E;;;;;;;;;;;;GAYG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE;IAAE,MAAM,EAAE,cAAc,CAAA;CAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAoBhG"}
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/config/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAExE,4CAA4C;AAC5C,KAAK,cAAc,GAAG,YAAY,GAAG,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAK/E;;;;;;;;;;;;GAYG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE;IAAE,MAAM,EAAE,cAAc,CAAA;CAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAoBhG"}
@@ -5,13 +5,13 @@ let configInstance = null;
5
5
  *
6
6
  * @param options.config - RevealUI configuration object. Accepts:
7
7
  * - `RevealConfig`: Framework configuration type (preferred for type safety)
8
- * - `Config` from @revealui/contracts/cms: CMS configuration from buildConfig()
8
+ * - `Config` from @revealui/contracts/admin: admin configuration from buildConfig()
9
9
  * - `Record<string, unknown>`: Loose typing for flexibility
10
10
  *
11
11
  * Note: Generated Config types have a different structure (collections as record vs array)
12
12
  * but are runtime-compatible. The function accepts both for convenience.
13
13
  *
14
- * @returns A RevealUI instance that provides CMS functionality
14
+ * @returns A RevealUI instance that provides admin functionality
15
15
  */
16
16
  export async function getRevealUI(options) {
17
17
  // In development, always create a new instance to support HMR
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/config/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAuB5E"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/config/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CA0B5E"}
@@ -1,6 +1,11 @@
1
1
  export function deepMerge(target, source) {
2
2
  const result = { ...target };
3
3
  for (const key of Object.keys(source)) {
4
+ // Guard against prototype pollution via __proto__, constructor, or prototype keys
5
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype')
6
+ continue;
7
+ if (!Object.hasOwn(source, key))
8
+ continue;
4
9
  const s = source[key];
5
10
  const t = target[key];
6
11
  if (Array.isArray(s)) {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Safe row parsing for database results.
3
3
  *
4
- * Database drivers return untyped rowsthis module provides a type guard
4
+ * Database drivers return untyped rows - this module provides a type guard
5
5
  * that filters out malformed rows (missing `id`) before they reach the application.
6
6
  * All RevealUI tables have `id` as a non-nullable primary key, so filtering these
7
7
  * out prevents crashes from unexpected driver behavior or schema migrations.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Safe row parsing for database results.
3
3
  *
4
- * Database drivers return untyped rowsthis module provides a type guard
4
+ * Database drivers return untyped rows - this module provides a type guard
5
5
  * that filters out malformed rows (missing `id`) before they reach the application.
6
6
  * All RevealUI tables have `id` as a non-nullable primary key, so filtering these
7
7
  * out prevents crashes from unexpected driver behavior or schema migrations.
@@ -19,12 +19,12 @@ import { defaultLogger } from '../instance/logger.js';
19
19
  */
20
20
  export function safeParseRevealDocument(row) {
21
21
  if (row === null || typeof row !== 'object') {
22
- defaultLogger.warn('Database row is not an objectskipping', { row });
22
+ defaultLogger.warn('Database row is not an object - skipping', { row });
23
23
  return null;
24
24
  }
25
25
  const r = row;
26
26
  if (typeof r.id !== 'string' && typeof r.id !== 'number') {
27
- defaultLogger.warn('Database row missing required id fieldskipping', {
27
+ defaultLogger.warn('Database row missing required id field - skipping', {
28
28
  keys: Object.keys(r),
29
29
  });
30
30
  return null;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Universal PostgreSQL Adapter for RevealUI CMS
2
+ * Universal PostgreSQL Adapter for RevealUI admin
3
3
  *
4
4
  * Supports multiple PostgreSQL providers:
5
5
  * - Neon Database (https://neon.tech)
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Universal PostgreSQL Adapter for RevealUI CMS
2
+ * Universal PostgreSQL Adapter for RevealUI admin
3
3
  *
4
4
  * Supports multiple PostgreSQL providers:
5
5
  * - Neon Database (https://neon.tech)
@@ -280,16 +280,16 @@ export class LoggingErrorReporter {
280
280
  });
281
281
  }
282
282
  setUser(_user) {
283
- // No-oplogging reporter only captures errors and messages
283
+ // No-op - logging reporter only captures errors and messages
284
284
  }
285
285
  setContext(_context) {
286
- // No-oplogging reporter only captures errors and messages
286
+ // No-op - logging reporter only captures errors and messages
287
287
  }
288
288
  setTag(_key, _value) {
289
- // No-oplogging reporter only captures errors and messages
289
+ // No-op - logging reporter only captures errors and messages
290
290
  }
291
291
  addBreadcrumb(_breadcrumb) {
292
- // No-oplogging reporter only captures errors and messages
292
+ // No-op - logging reporter only captures errors and messages
293
293
  }
294
294
  }
295
295
  /**
@@ -11,11 +11,11 @@
11
11
  import { type LicenseTier } from './license.js';
12
12
  /** All gated features in RevealUI */
13
13
  export interface FeatureFlags {
14
- /** Local AI inference via Inference Snaps or BitNet — available at all tiers (no API key needed) */
14
+ /** Local AI inference via Inference Snaps or Ollama - available at all tiers (no API key needed) */
15
15
  aiLocal: boolean;
16
- /** AI agent systemlocal + cloud via RevealUI harness (Pro+) */
16
+ /** AI agent system - local + cloud via RevealUI harness (Pro+) */
17
17
  ai: boolean;
18
- /** AI memory systemworking + episodic + vector (Max: basic, Enterprise: full) */
18
+ /** AI memory system - working + episodic + vector (Max: basic, Enterprise: full) */
19
19
  aiMemory: boolean;
20
20
  /** MCP server integration */
21
21
  mcp: boolean;
@@ -23,11 +23,11 @@ export interface FeatureFlags {
23
23
  payments: boolean;
24
24
  /** Multi-tenant site management */
25
25
  multiTenant: boolean;
26
- /** White-label admin dashboard (plannednot yet implemented) */
26
+ /** White-label admin dashboard (planned - not yet implemented) */
27
27
  whiteLabel: boolean;
28
- /** SSO/SAML authentication (plannednot yet implemented) */
28
+ /** SSO/SAML authentication (planned - not yet implemented) */
29
29
  sso: boolean;
30
- /** Open-model inference configurationsnaps, BitNet, harness (Max+) */
30
+ /** Open-model inference configuration - snaps, Ollama, harness (Max+) */
31
31
  aiInference: boolean;
32
32
  /** Audit logging and compliance trail */
33
33
  auditLog: boolean;
@@ -39,11 +39,11 @@ export interface FeatureFlags {
39
39
  customDomain: boolean;
40
40
  /** Analytics and conversion tracking */
41
41
  analytics: boolean;
42
- /** RevVault desktop appTauri native AI experience for encrypted secret management (Pro+) */
42
+ /** RevVault desktop app - Tauri native AI experience for encrypted secret management (Pro+) */
43
43
  vaultDesktop: boolean;
44
- /** RevVault rotation engineautomated credential lifecycle (Pro+) */
44
+ /** RevVault rotation engine - automated credential lifecycle (Pro+) */
45
45
  vaultRotation: boolean;
46
- /** RevKit environment provisioningtiered dev profiles (Max+) */
46
+ /** RevKit environment provisioning - tiered dev profiles (Max+) */
47
47
  devkitProfiles: boolean;
48
48
  }
49
49
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../src/features.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E;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,YAAY,GAAG,WAAW,CAExE;AAED;;GAEG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
package/dist/features.js CHANGED
@@ -50,7 +50,7 @@ export function getFeatures() {
50
50
  for (const [feature, requiredTier] of Object.entries(featureTierMap)) {
51
51
  flags[feature] = isLicensed(requiredTier);
52
52
  }
53
- // Planned but not yet implementedforce false to avoid false advertising
53
+ // Planned but not yet implemented - force false to avoid false advertising
54
54
  flags.whiteLabel = false;
55
55
  flags.sso = false;
56
56
  return flags;
@@ -68,7 +68,7 @@ export function getFeatures() {
68
68
  * ```
69
69
  */
70
70
  export function isFeatureEnabled(feature) {
71
- // Planned but not yet implementedalways return false
71
+ // Planned but not yet implemented - always return false
72
72
  if (feature === 'whiteLabel' || feature === 'sso')
73
73
  return false;
74
74
  const requiredTier = featureTierMap[feature];
@@ -88,7 +88,7 @@ export function getFeaturesForTier(tier) {
88
88
  for (const [feature, requiredTier] of Object.entries(featureTierMap)) {
89
89
  flags[feature] = tierRank[tier] >= tierRank[requiredTier];
90
90
  }
91
- // Planned but not yet implementedforce false to avoid false advertising
91
+ // Planned but not yet implemented - force false to avoid false advertising
92
92
  flags.whiteLabel = false;
93
93
  flags.sso = false;
94
94
  return flags;