@actuate-media/cms-admin 0.10.0 → 0.12.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 (315) hide show
  1. package/LICENSE +21 -21
  2. package/dist/AdminRoot.d.ts.map +1 -1
  3. package/dist/AdminRoot.js +8 -5
  4. package/dist/AdminRoot.js.map +1 -1
  5. package/dist/__tests__/fields/component-block-helpers.test.d.ts +7 -0
  6. package/dist/__tests__/fields/component-block-helpers.test.d.ts.map +1 -0
  7. package/dist/__tests__/fields/component-block-helpers.test.js +592 -0
  8. package/dist/__tests__/fields/component-block-helpers.test.js.map +1 -0
  9. package/dist/__tests__/layout/primitives.test.d.ts +2 -0
  10. package/dist/__tests__/layout/primitives.test.d.ts.map +1 -0
  11. package/dist/__tests__/layout/primitives.test.js +34 -0
  12. package/dist/__tests__/layout/primitives.test.js.map +1 -0
  13. package/dist/__tests__/lib/cv.test.d.ts +2 -0
  14. package/dist/__tests__/lib/cv.test.d.ts.map +1 -0
  15. package/dist/__tests__/lib/cv.test.js +66 -0
  16. package/dist/__tests__/lib/cv.test.js.map +1 -0
  17. package/dist/actuate-admin.css +1 -1
  18. package/dist/assets/actuate-logo.d.ts +36 -0
  19. package/dist/assets/actuate-logo.d.ts.map +1 -0
  20. package/dist/assets/actuate-logo.js +15 -0
  21. package/dist/assets/actuate-logo.js.map +1 -0
  22. package/dist/components/Breadcrumbs.js +2 -2
  23. package/dist/components/CommandPalette.js +10 -10
  24. package/dist/components/ContentOverviewChart.js +3 -3
  25. package/dist/components/ErrorBoundary.js +1 -1
  26. package/dist/components/FocalPointPicker.js +2 -2
  27. package/dist/components/FolderTree.js +20 -20
  28. package/dist/components/LivePreview.js +3 -3
  29. package/dist/components/LocaleSwitcher.js +1 -1
  30. package/dist/components/MediaPickerModal.js +4 -4
  31. package/dist/components/PresenceIndicator.js +1 -1
  32. package/dist/components/SEOConfigPanel.d.ts +2 -0
  33. package/dist/components/SEOConfigPanel.d.ts.map +1 -0
  34. package/dist/components/SEOConfigPanel.js +174 -0
  35. package/dist/components/SEOConfigPanel.js.map +1 -0
  36. package/dist/components/SEOPanel.js +9 -9
  37. package/dist/components/SEOPerformance.js +2 -2
  38. package/dist/components/SchedulePublishDialog.js +1 -1
  39. package/dist/components/SharePreviewLinkDialog.js +1 -1
  40. package/dist/components/TipTapEditor.js +5 -5
  41. package/dist/components/VersionHistory.js +2 -2
  42. package/dist/components/ui/Badge.d.ts +33 -3
  43. package/dist/components/ui/Badge.d.ts.map +1 -1
  44. package/dist/components/ui/Badge.js +42 -8
  45. package/dist/components/ui/Badge.js.map +1 -1
  46. package/dist/components/ui/Button.d.ts +19 -8
  47. package/dist/components/ui/Button.d.ts.map +1 -1
  48. package/dist/components/ui/Button.js +35 -14
  49. package/dist/components/ui/Button.js.map +1 -1
  50. package/dist/components/ui/Card.d.ts +26 -0
  51. package/dist/components/ui/Card.d.ts.map +1 -0
  52. package/dist/components/ui/Card.js +45 -0
  53. package/dist/components/ui/Card.js.map +1 -0
  54. package/dist/components/ui/DataTable.js +1 -1
  55. package/dist/components/ui/Input.d.ts +15 -0
  56. package/dist/components/ui/Input.d.ts.map +1 -0
  57. package/dist/components/ui/Input.js +23 -0
  58. package/dist/components/ui/Input.js.map +1 -0
  59. package/dist/components/ui/SearchInput.js +1 -1
  60. package/dist/components/ui/Select.d.ts +16 -0
  61. package/dist/components/ui/Select.d.ts.map +1 -0
  62. package/dist/components/ui/Select.js +25 -0
  63. package/dist/components/ui/Select.js.map +1 -0
  64. package/dist/components/ui/Toast.js +1 -1
  65. package/dist/components/ui/index.d.ts +10 -4
  66. package/dist/components/ui/index.d.ts.map +1 -1
  67. package/dist/components/ui/index.js +5 -2
  68. package/dist/components/ui/index.js.map +1 -1
  69. package/dist/fields/BlockBuilderField.js +3 -3
  70. package/dist/fields/ComponentBlockField.d.ts +25 -0
  71. package/dist/fields/ComponentBlockField.d.ts.map +1 -0
  72. package/dist/fields/ComponentBlockField.js +74 -0
  73. package/dist/fields/ComponentBlockField.js.map +1 -0
  74. package/dist/fields/DateField.js +1 -1
  75. package/dist/fields/FieldRenderer.d.ts +3 -0
  76. package/dist/fields/FieldRenderer.d.ts.map +1 -1
  77. package/dist/fields/FieldRenderer.js +3 -1
  78. package/dist/fields/FieldRenderer.js.map +1 -1
  79. package/dist/fields/PropInput.d.ts +14 -0
  80. package/dist/fields/PropInput.d.ts.map +1 -0
  81. package/dist/fields/PropInput.js +163 -0
  82. package/dist/fields/PropInput.js.map +1 -0
  83. package/dist/fields/RelationshipField.js +3 -3
  84. package/dist/fields/TextField.js +1 -1
  85. package/dist/fields/component-block-helpers.d.ts +96 -0
  86. package/dist/fields/component-block-helpers.d.ts.map +1 -0
  87. package/dist/fields/component-block-helpers.js +323 -0
  88. package/dist/fields/component-block-helpers.js.map +1 -0
  89. package/dist/fields/index.d.ts +4 -0
  90. package/dist/fields/index.d.ts.map +1 -1
  91. package/dist/fields/index.js +2 -0
  92. package/dist/fields/index.js.map +1 -1
  93. package/dist/index.d.ts +4 -0
  94. package/dist/index.d.ts.map +1 -1
  95. package/dist/index.js +4 -0
  96. package/dist/index.js.map +1 -1
  97. package/dist/layout/Header.js +1 -1
  98. package/dist/layout/Layout.d.ts +14 -0
  99. package/dist/layout/Layout.d.ts.map +1 -1
  100. package/dist/layout/Layout.js +17 -11
  101. package/dist/layout/Layout.js.map +1 -1
  102. package/dist/layout/Sidebar.d.ts.map +1 -1
  103. package/dist/layout/Sidebar.js +21 -11
  104. package/dist/layout/Sidebar.js.map +1 -1
  105. package/dist/layout/primitives/AdminShell.d.ts +43 -0
  106. package/dist/layout/primitives/AdminShell.d.ts.map +1 -0
  107. package/dist/layout/primitives/AdminShell.js +51 -0
  108. package/dist/layout/primitives/AdminShell.js.map +1 -0
  109. package/dist/layout/primitives/Box.d.ts +19 -0
  110. package/dist/layout/primitives/Box.d.ts.map +1 -0
  111. package/dist/layout/primitives/Box.js +12 -0
  112. package/dist/layout/primitives/Box.js.map +1 -0
  113. package/dist/layout/primitives/Cluster.d.ts +27 -0
  114. package/dist/layout/primitives/Cluster.d.ts.map +1 -0
  115. package/dist/layout/primitives/Cluster.js +37 -0
  116. package/dist/layout/primitives/Cluster.js.map +1 -0
  117. package/dist/layout/primitives/Grid.d.ts +45 -0
  118. package/dist/layout/primitives/Grid.d.ts.map +1 -0
  119. package/dist/layout/primitives/Grid.js +59 -0
  120. package/dist/layout/primitives/Grid.js.map +1 -0
  121. package/dist/layout/primitives/PageContainer.d.ts +36 -0
  122. package/dist/layout/primitives/PageContainer.d.ts.map +1 -0
  123. package/dist/layout/primitives/PageContainer.js +41 -0
  124. package/dist/layout/primitives/PageContainer.js.map +1 -0
  125. package/dist/layout/primitives/Split.d.ts +34 -0
  126. package/dist/layout/primitives/Split.d.ts.map +1 -0
  127. package/dist/layout/primitives/Split.js +27 -0
  128. package/dist/layout/primitives/Split.js.map +1 -0
  129. package/dist/layout/primitives/Stack.d.ts +23 -0
  130. package/dist/layout/primitives/Stack.d.ts.map +1 -0
  131. package/dist/layout/primitives/Stack.js +34 -0
  132. package/dist/layout/primitives/Stack.js.map +1 -0
  133. package/dist/layout/primitives/index.d.ts +30 -0
  134. package/dist/layout/primitives/index.d.ts.map +1 -0
  135. package/dist/layout/primitives/index.js +22 -0
  136. package/dist/layout/primitives/index.js.map +1 -0
  137. package/dist/layout/primitives/tokens.d.ts +48 -0
  138. package/dist/layout/primitives/tokens.d.ts.map +1 -0
  139. package/dist/layout/primitives/tokens.js +54 -0
  140. package/dist/layout/primitives/tokens.js.map +1 -0
  141. package/dist/lib/cv.d.ts +53 -0
  142. package/dist/lib/cv.d.ts.map +1 -0
  143. package/dist/lib/cv.js +39 -0
  144. package/dist/lib/cv.js.map +1 -0
  145. package/dist/views/ApiKeys.js +7 -7
  146. package/dist/views/CollectionList.js +8 -8
  147. package/dist/views/Dashboard.d.ts.map +1 -1
  148. package/dist/views/Dashboard.js +333 -78
  149. package/dist/views/Dashboard.js.map +1 -1
  150. package/dist/views/DocumentEdit.js +3 -3
  151. package/dist/views/ForgotPassword.js +2 -2
  152. package/dist/views/FormEditor.js +5 -5
  153. package/dist/views/FormSubmissions.js +6 -6
  154. package/dist/views/Forms.js +2 -2
  155. package/dist/views/Login.d.ts +16 -1
  156. package/dist/views/Login.d.ts.map +1 -1
  157. package/dist/views/Login.js +17 -7
  158. package/dist/views/Login.js.map +1 -1
  159. package/dist/views/MediaBrowser.js +16 -16
  160. package/dist/views/PageEditor.js +2 -2
  161. package/dist/views/Pages.js +10 -10
  162. package/dist/views/PostEditor.js +2 -2
  163. package/dist/views/Posts.js +4 -4
  164. package/dist/views/Redirects.js +4 -4
  165. package/dist/views/ResetPassword.js +2 -2
  166. package/dist/views/SEO.js +6 -6
  167. package/dist/views/ScriptTagEditor.js +4 -4
  168. package/dist/views/ScriptTags.js +2 -2
  169. package/dist/views/Settings.d.ts.map +1 -1
  170. package/dist/views/Settings.js +9 -8
  171. package/dist/views/Settings.js.map +1 -1
  172. package/dist/views/SetupWizard.js +2 -2
  173. package/dist/views/Users.js +4 -4
  174. package/dist/views/page-builder/AIBlockAssist.js +1 -1
  175. package/dist/views/page-builder/AIGenerateDialog.js +10 -10
  176. package/dist/views/page-builder/BlockEditor.js +10 -10
  177. package/dist/views/page-builder/BlockPicker.js +4 -4
  178. package/dist/views/page-builder/BottomBar.js +1 -1
  179. package/dist/views/page-builder/BuilderToolbar.js +2 -2
  180. package/dist/views/page-builder/ContextPanel.js +2 -2
  181. package/dist/views/page-builder/DesignScore.js +9 -9
  182. package/dist/views/page-builder/NodeSettings.js +8 -8
  183. package/dist/views/page-builder/PageBuilder.js +3 -3
  184. package/dist/views/page-builder/PageSettings.js +1 -1
  185. package/dist/views/page-builder/PageTemplates.js +2 -2
  186. package/dist/views/page-builder/SEOPanel.js +13 -13
  187. package/dist/views/page-builder/SavedSections.js +5 -5
  188. package/dist/views/page-builder/TemplatePicker.js +2 -2
  189. package/dist/views/page-builder/block-renderers/CTAPreview.js +5 -5
  190. package/dist/views/page-builder/block-renderers/CardsPreview.js +1 -1
  191. package/dist/views/page-builder/block-renderers/CodePreview.js +1 -1
  192. package/dist/views/page-builder/block-renderers/FAQPreview.js +3 -3
  193. package/dist/views/page-builder/block-renderers/FallbackPreview.js +1 -1
  194. package/dist/views/page-builder/block-renderers/FormPreview.js +3 -3
  195. package/dist/views/page-builder/block-renderers/GalleryPreview.js +5 -5
  196. package/dist/views/page-builder/block-renderers/HeroPreview.js +3 -3
  197. package/dist/views/page-builder/block-renderers/ImagePreview.js +3 -3
  198. package/dist/views/page-builder/block-renderers/TextPreview.js +3 -3
  199. package/dist/views/page-builder/block-renderers/VideoPreview.js +4 -4
  200. package/dist/views/page-builder/canvas/BlockRenderer.js +1 -1
  201. package/dist/views/page-builder/canvas/BuilderCanvas.js +3 -3
  202. package/dist/views/page-builder/canvas/ColumnRenderer.js +2 -2
  203. package/dist/views/page-builder/canvas/ContainerRenderer.js +2 -2
  204. package/dist/views/page-builder/canvas/RowRenderer.js +2 -2
  205. package/dist/views/page-builder/canvas/SectionRenderer.js +2 -2
  206. package/package.json +14 -3
  207. package/src/AdminRoot.tsx +21 -11
  208. package/src/__tests__/fields/component-block-helpers.test.ts +674 -0
  209. package/src/__tests__/layout/primitives.test.ts +37 -0
  210. package/src/__tests__/lib/cv.test.ts +74 -0
  211. package/src/assets/actuate-logo.tsx +72 -0
  212. package/src/components/Breadcrumbs.tsx +6 -6
  213. package/src/components/CommandPalette.tsx +34 -34
  214. package/src/components/ContentOverviewChart.tsx +3 -3
  215. package/src/components/ErrorBoundary.tsx +3 -3
  216. package/src/components/FocalPointPicker.tsx +4 -4
  217. package/src/components/FolderTree.tsx +38 -38
  218. package/src/components/LivePreview.tsx +16 -16
  219. package/src/components/LocaleSwitcher.tsx +7 -7
  220. package/src/components/MediaPickerModal.tsx +21 -21
  221. package/src/components/PresenceIndicator.tsx +2 -2
  222. package/src/components/SEOConfigPanel.tsx +582 -0
  223. package/src/components/SEOPanel.tsx +46 -46
  224. package/src/components/SEOPerformance.tsx +21 -21
  225. package/src/components/SchedulePublishDialog.tsx +4 -4
  226. package/src/components/SharePreviewLinkDialog.tsx +1 -1
  227. package/src/components/TipTapEditor.tsx +33 -33
  228. package/src/components/VersionHistory.tsx +16 -16
  229. package/src/components/ui/Badge.tsx +66 -14
  230. package/src/components/ui/Button.tsx +70 -33
  231. package/src/components/ui/Card.tsx +101 -0
  232. package/src/components/ui/DataTable.tsx +1 -1
  233. package/src/components/ui/Input.tsx +35 -0
  234. package/src/components/ui/SearchInput.tsx +4 -4
  235. package/src/components/ui/Select.tsx +56 -0
  236. package/src/components/ui/Toast.tsx +1 -1
  237. package/src/components/ui/index.ts +18 -4
  238. package/src/fields/BlockBuilderField.tsx +3 -3
  239. package/src/fields/ComponentBlockField.tsx +179 -0
  240. package/src/fields/DateField.tsx +1 -1
  241. package/src/fields/FieldRenderer.tsx +8 -0
  242. package/src/fields/PropInput.tsx +552 -0
  243. package/src/fields/RelationshipField.tsx +10 -10
  244. package/src/fields/TextField.tsx +1 -1
  245. package/src/fields/component-block-helpers.ts +341 -0
  246. package/src/fields/index.ts +4 -0
  247. package/src/index.ts +35 -0
  248. package/src/layout/Header.tsx +28 -28
  249. package/src/layout/Layout.tsx +39 -46
  250. package/src/layout/Sidebar.tsx +37 -64
  251. package/src/layout/primitives/AdminShell.tsx +118 -0
  252. package/src/layout/primitives/Box.tsx +30 -0
  253. package/src/layout/primitives/Cluster.tsx +74 -0
  254. package/src/layout/primitives/Grid.tsx +120 -0
  255. package/src/layout/primitives/PageContainer.tsx +96 -0
  256. package/src/layout/primitives/Split.tsx +73 -0
  257. package/src/layout/primitives/Stack.tsx +67 -0
  258. package/src/layout/primitives/index.ts +36 -0
  259. package/src/layout/primitives/tokens.ts +76 -0
  260. package/src/lib/cv.ts +96 -0
  261. package/src/styles/build-input.css +1 -1
  262. package/src/views/ApiKeys.tsx +57 -57
  263. package/src/views/CollectionList.tsx +30 -30
  264. package/src/views/Dashboard.tsx +737 -186
  265. package/src/views/DocumentEdit.tsx +9 -9
  266. package/src/views/ForgotPassword.tsx +18 -18
  267. package/src/views/FormEditor.tsx +75 -75
  268. package/src/views/FormSubmissions.tsx +76 -76
  269. package/src/views/Forms.tsx +27 -27
  270. package/src/views/Login.tsx +65 -25
  271. package/src/views/MediaBrowser.tsx +127 -127
  272. package/src/views/PageEditor.tsx +25 -25
  273. package/src/views/Pages.tsx +59 -59
  274. package/src/views/PostEditor.tsx +37 -37
  275. package/src/views/Posts.tsx +48 -48
  276. package/src/views/Redirects.tsx +21 -21
  277. package/src/views/ResetPassword.tsx +28 -28
  278. package/src/views/SEO.tsx +144 -144
  279. package/src/views/ScriptTagEditor.tsx +24 -24
  280. package/src/views/ScriptTags.tsx +10 -10
  281. package/src/views/Settings.tsx +88 -80
  282. package/src/views/SetupWizard.tsx +28 -28
  283. package/src/views/Users.tsx +20 -20
  284. package/src/views/page-builder/AIBlockAssist.tsx +1 -1
  285. package/src/views/page-builder/AIGenerateDialog.tsx +63 -63
  286. package/src/views/page-builder/BlockEditor.tsx +26 -26
  287. package/src/views/page-builder/BlockPicker.tsx +22 -22
  288. package/src/views/page-builder/BottomBar.tsx +8 -8
  289. package/src/views/page-builder/BuilderToolbar.tsx +17 -17
  290. package/src/views/page-builder/ContextPanel.tsx +3 -3
  291. package/src/views/page-builder/DesignScore.tsx +21 -21
  292. package/src/views/page-builder/NodeSettings.tsx +27 -27
  293. package/src/views/page-builder/PageBuilder.tsx +11 -11
  294. package/src/views/page-builder/PageSettings.tsx +4 -4
  295. package/src/views/page-builder/PageTemplates.tsx +18 -18
  296. package/src/views/page-builder/SEOPanel.tsx +53 -53
  297. package/src/views/page-builder/SavedSections.tsx +37 -37
  298. package/src/views/page-builder/TemplatePicker.tsx +17 -17
  299. package/src/views/page-builder/block-renderers/CTAPreview.tsx +13 -13
  300. package/src/views/page-builder/block-renderers/CardsPreview.tsx +5 -5
  301. package/src/views/page-builder/block-renderers/CodePreview.tsx +6 -6
  302. package/src/views/page-builder/block-renderers/FAQPreview.tsx +13 -13
  303. package/src/views/page-builder/block-renderers/FallbackPreview.tsx +3 -3
  304. package/src/views/page-builder/block-renderers/FormPreview.tsx +20 -20
  305. package/src/views/page-builder/block-renderers/GalleryPreview.tsx +8 -8
  306. package/src/views/page-builder/block-renderers/HeroPreview.tsx +16 -16
  307. package/src/views/page-builder/block-renderers/ImagePreview.tsx +4 -4
  308. package/src/views/page-builder/block-renderers/TextPreview.tsx +14 -14
  309. package/src/views/page-builder/block-renderers/VideoPreview.tsx +12 -12
  310. package/src/views/page-builder/canvas/BlockRenderer.tsx +4 -4
  311. package/src/views/page-builder/canvas/BuilderCanvas.tsx +6 -6
  312. package/src/views/page-builder/canvas/ColumnRenderer.tsx +3 -3
  313. package/src/views/page-builder/canvas/ContainerRenderer.tsx +2 -2
  314. package/src/views/page-builder/canvas/RowRenderer.tsx +2 -2
  315. package/src/views/page-builder/canvas/SectionRenderer.tsx +2 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Split.js","sourceRoot":"","sources":["../../../src/layout/primitives/Split.tsx"],"names":[],"mappings":";AA2BA,MAAM,iBAAiB,GAAG;IACxB,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;CACL,CAAA;AAEV;;;;;;GAMG;AACH,MAAM,UAAU,KAAK,CAAC,EACpB,QAAQ,GAAG,SAAS,EACpB,KAAK,GAAG,GAAG,EACX,UAAU,GAAG,IAAI,EACjB,OAAO,EACP,EAAE,EAAE,SAAS,GAAG,KAAK,EACrB,SAAS,GAAG,EAAE,EACd,KAAK,EACL,QAAQ,EACR,GAAG,IAAI,EACI;IACX,MAAM,UAAU,GACd,UAAU,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,iBAAiB,CAAC,UAAU,CAAC,EAAE,CAAA;IAClF,MAAM,OAAO,GAAG,CAAC,UAAU,EAAE,OAAO,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,EAAE,SAAS,CAAC;SACvF,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAA;IAEZ,OAAO,CACL,KAAC,SAAS,IACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE;YACL,GAAG,CAAC,UAAU,KAAK,KAAK;gBACtB,CAAC,CAAC,EAAE,mBAAmB,EAAE,QAAQ,EAAE;gBACnC,CAAC,CAAC,EAAE,mBAAmB,EAAE,QAAQ,EAAE,CAAC;YACtC,GAAG,KAAK;SACT,KACG,IAAI,YAEP,QAAQ,GACC,CACb,CAAA;AACH,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { HTMLAttributes, ReactNode, ElementType } from 'react';
2
+ import type { SpaceToken } from './tokens.js';
3
+ export type StackSpace = SpaceToken;
4
+ export interface StackProps extends HTMLAttributes<HTMLElement> {
5
+ /** Vertical gap between children. Maps to Tailwind `gap-{space}`. */
6
+ space?: StackSpace;
7
+ /** Render as a different element (e.g. `<section>`, `<article>`). Defaults to `div`. */
8
+ as?: ElementType;
9
+ /** Center children horizontally (sets `items-center`). */
10
+ align?: 'start' | 'center' | 'end' | 'stretch';
11
+ /** Distribute vertical space (sets `justify-{value}`). */
12
+ justify?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
13
+ /** Stretch the stack to fill its parent's height. */
14
+ fill?: boolean;
15
+ children?: ReactNode;
16
+ }
17
+ /**
18
+ * Vertical stack with a consistent gap between children. This is the
19
+ * single sanctioned way to space block-level elements in the admin —
20
+ * never reach for `space-y-*` directly.
21
+ */
22
+ export declare function Stack({ space, as: Component, align, justify, fill, className, children, ...rest }: StackProps): import("react/jsx-runtime").JSX.Element;
23
+ //# sourceMappingURL=Stack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../src/layout/primitives/Stack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C,MAAM,MAAM,UAAU,GAAG,UAAU,CAAA;AAEnC,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,WAAW,CAAC;IAC7D,qEAAqE;IACrE,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,wFAAwF;IACxF,EAAE,CAAC,EAAE,WAAW,CAAA;IAChB,0DAA0D;IAC1D,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAA;IAC9C,0DAA0D;IAC1D,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAA;IACtE,qDAAqD;IACrD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAkBD;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,EACpB,KAAW,EACX,EAAE,EAAE,SAAiB,EACrB,KAAK,EACL,OAAO,EACP,IAAI,EACJ,SAAc,EACd,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,UAAU,2CAiBZ"}
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ const ALIGN_CLASS = {
3
+ start: 'items-start',
4
+ center: 'items-center',
5
+ end: 'items-end',
6
+ stretch: 'items-stretch',
7
+ };
8
+ const JUSTIFY_CLASS = {
9
+ start: 'justify-start',
10
+ center: 'justify-center',
11
+ end: 'justify-end',
12
+ between: 'justify-between',
13
+ around: 'justify-around',
14
+ evenly: 'justify-evenly',
15
+ };
16
+ /**
17
+ * Vertical stack with a consistent gap between children. This is the
18
+ * single sanctioned way to space block-level elements in the admin —
19
+ * never reach for `space-y-*` directly.
20
+ */
21
+ export function Stack({ space = '4', as: Component = 'div', align, justify, fill, className = '', children, ...rest }) {
22
+ const classes = [
23
+ 'flex flex-col',
24
+ `gap-${space}`,
25
+ align ? ALIGN_CLASS[align] : '',
26
+ justify ? JUSTIFY_CLASS[justify] : '',
27
+ fill ? 'h-full' : '',
28
+ className,
29
+ ]
30
+ .filter(Boolean)
31
+ .join(' ');
32
+ return (_jsx(Component, { className: classes, ...rest, children: children }));
33
+ }
34
+ //# sourceMappingURL=Stack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stack.js","sourceRoot":"","sources":["../../../src/layout/primitives/Stack.tsx"],"names":[],"mappings":";AAmBA,MAAM,WAAW,GAAqD;IACpE,KAAK,EAAE,aAAa;IACpB,MAAM,EAAE,cAAc;IACtB,GAAG,EAAE,WAAW;IAChB,OAAO,EAAE,eAAe;CACzB,CAAA;AAED,MAAM,aAAa,GAAuD;IACxE,KAAK,EAAE,eAAe;IACtB,MAAM,EAAE,gBAAgB;IACxB,GAAG,EAAE,aAAa;IAClB,OAAO,EAAE,iBAAiB;IAC1B,MAAM,EAAE,gBAAgB;IACxB,MAAM,EAAE,gBAAgB;CACzB,CAAA;AAED;;;;GAIG;AACH,MAAM,UAAU,KAAK,CAAC,EACpB,KAAK,GAAG,GAAG,EACX,EAAE,EAAE,SAAS,GAAG,KAAK,EACrB,KAAK,EACL,OAAO,EACP,IAAI,EACJ,SAAS,GAAG,EAAE,EACd,QAAQ,EACR,GAAG,IAAI,EACI;IACX,MAAM,OAAO,GAAG;QACd,eAAe;QACf,OAAO,KAAK,EAAE;QACd,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;QAC/B,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE;QACrC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;QACpB,SAAS;KACV;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAA;IAEZ,OAAO,CACL,KAAC,SAAS,IAAC,SAAS,EAAE,OAAO,KAAM,IAAI,YACpC,QAAQ,GACC,CACb,CAAA;AACH,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Layout primitives for the Actuate admin.
3
+ *
4
+ * These exist so views never hand-roll their own flex/grid scaffolding.
5
+ * Every admin view should compose these primitives instead of writing raw
6
+ * Tailwind classes for spacing/alignment/structure. That contract is what
7
+ * keeps layout bugs (sidebar overlap, breakpoint mismatches, missing
8
+ * `min-w-0`) from recurring in new views.
9
+ *
10
+ * Naming follows the "Every Layout" canon
11
+ * (https://every-layout.dev/) plus our own `AdminShell` and
12
+ * `PageContainer` for the admin-specific outer chrome.
13
+ */
14
+ export { AdminShell } from './AdminShell.js';
15
+ export type { AdminShellProps } from './AdminShell.js';
16
+ export { PageContainer } from './PageContainer.js';
17
+ export type { PageContainerProps } from './PageContainer.js';
18
+ export { Stack } from './Stack.js';
19
+ export type { StackProps, StackSpace } from './Stack.js';
20
+ export { Cluster } from './Cluster.js';
21
+ export type { ClusterProps, ClusterAlign, ClusterJustify } from './Cluster.js';
22
+ export { Grid } from './Grid.js';
23
+ export type { GridProps, GridResponsive } from './Grid.js';
24
+ export { Split } from './Split.js';
25
+ export type { SplitProps } from './Split.js';
26
+ export { Box } from './Box.js';
27
+ export type { BoxProps } from './Box.js';
28
+ export { tokens } from './tokens.js';
29
+ export type { SpaceToken, RadiusToken } from './tokens.js';
30
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/primitives/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAE5D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAE9E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAE1D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,YAAY,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Layout primitives for the Actuate admin.
3
+ *
4
+ * These exist so views never hand-roll their own flex/grid scaffolding.
5
+ * Every admin view should compose these primitives instead of writing raw
6
+ * Tailwind classes for spacing/alignment/structure. That contract is what
7
+ * keeps layout bugs (sidebar overlap, breakpoint mismatches, missing
8
+ * `min-w-0`) from recurring in new views.
9
+ *
10
+ * Naming follows the "Every Layout" canon
11
+ * (https://every-layout.dev/) plus our own `AdminShell` and
12
+ * `PageContainer` for the admin-specific outer chrome.
13
+ */
14
+ export { AdminShell } from './AdminShell.js';
15
+ export { PageContainer } from './PageContainer.js';
16
+ export { Stack } from './Stack.js';
17
+ export { Cluster } from './Cluster.js';
18
+ export { Grid } from './Grid.js';
19
+ export { Split } from './Split.js';
20
+ export { Box } from './Box.js';
21
+ export { tokens } from './tokens.js';
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layout/primitives/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAG5C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAGlD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAGlC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAGtC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAGlC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAG9B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Design tokens — single source of truth for the admin design system.
3
+ *
4
+ * Tokens are surfaced both as TypeScript constants (for inline-style escape
5
+ * hatches) and via CSS custom properties in `styles/theme.css`. Always
6
+ * prefer the CSS variables in production code; the TS constants are for
7
+ * computed inline styles only (e.g. dynamic widths, computed grid sizes).
8
+ */
9
+ export type SpaceToken = '0' | 'px' | '0.5' | '1' | '1.5' | '2' | '2.5' | '3' | '4' | '5' | '6' | '8' | '10' | '12' | '16';
10
+ export type RadiusToken = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
11
+ /** Numeric pixel values for inline style escape hatches. */
12
+ export declare const tokens: {
13
+ space: {
14
+ readonly '0': 0;
15
+ readonly px: 1;
16
+ readonly '0.5': 2;
17
+ readonly '1': 4;
18
+ readonly '1.5': 6;
19
+ readonly '2': 8;
20
+ readonly '2.5': 10;
21
+ readonly '3': 12;
22
+ readonly '4': 16;
23
+ readonly '5': 20;
24
+ readonly '6': 24;
25
+ readonly '8': 32;
26
+ readonly '10': 40;
27
+ readonly '12': 48;
28
+ readonly '16': 64;
29
+ };
30
+ radius: {
31
+ readonly none: 0;
32
+ readonly sm: 2;
33
+ readonly md: 6;
34
+ readonly lg: 8;
35
+ readonly xl: 12;
36
+ readonly full: 9999;
37
+ };
38
+ breakpoint: {
39
+ readonly sm: 640;
40
+ readonly md: 768;
41
+ readonly lg: 1024;
42
+ readonly xl: 1280;
43
+ readonly '2xl': 1536;
44
+ };
45
+ };
46
+ /** Map a space token to the corresponding Tailwind `space-y-*` / `gap-*` value. */
47
+ export declare function spaceToTw(t: SpaceToken): string;
48
+ //# sourceMappingURL=tokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/layout/primitives/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,MAAM,UAAU,GAClB,GAAG,GACH,IAAI,GACJ,KAAK,GACL,GAAG,GACH,KAAK,GACL,GAAG,GACH,KAAK,GACL,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,IAAI,CAAA;AAER,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAA;AAErE,4DAA4D;AAC5D,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuClB,CAAA;AAED,mFAAmF;AACnF,wBAAgB,SAAS,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,CAI/C"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Design tokens — single source of truth for the admin design system.
3
+ *
4
+ * Tokens are surfaced both as TypeScript constants (for inline-style escape
5
+ * hatches) and via CSS custom properties in `styles/theme.css`. Always
6
+ * prefer the CSS variables in production code; the TS constants are for
7
+ * computed inline styles only (e.g. dynamic widths, computed grid sizes).
8
+ */
9
+ /** Numeric pixel values for inline style escape hatches. */
10
+ export const tokens = {
11
+ // Spacing scale matches Tailwind's default (--spacing = 0.25rem = 4px).
12
+ space: {
13
+ '0': 0,
14
+ px: 1,
15
+ '0.5': 2,
16
+ '1': 4,
17
+ '1.5': 6,
18
+ '2': 8,
19
+ '2.5': 10,
20
+ '3': 12,
21
+ '4': 16,
22
+ '5': 20,
23
+ '6': 24,
24
+ '8': 32,
25
+ '10': 40,
26
+ '12': 48,
27
+ '16': 64,
28
+ },
29
+ radius: {
30
+ none: 0,
31
+ sm: 2,
32
+ md: 6,
33
+ lg: 8,
34
+ xl: 12,
35
+ full: 9999,
36
+ },
37
+ // Breakpoints mirror Tailwind defaults so primitives can compose with
38
+ // utility classes without surprises. Use `matchMedia(`(min-width: …`)` to
39
+ // sync JS-driven layout decisions with these values.
40
+ breakpoint: {
41
+ sm: 640,
42
+ md: 768,
43
+ lg: 1024,
44
+ xl: 1280,
45
+ '2xl': 1536,
46
+ },
47
+ };
48
+ /** Map a space token to the corresponding Tailwind `space-y-*` / `gap-*` value. */
49
+ export function spaceToTw(t) {
50
+ // Tailwind's spacing utility already accepts the same scale, so we map
51
+ // 1:1. Centralizing here means callers don't repeat the string literal.
52
+ return t;
53
+ }
54
+ //# sourceMappingURL=tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/layout/primitives/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAqBH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,wEAAwE;IACxE,KAAK,EAAE;QACL,GAAG,EAAE,CAAC;QACN,EAAE,EAAE,CAAC;QACL,KAAK,EAAE,CAAC;QACR,GAAG,EAAE,CAAC;QACN,KAAK,EAAE,CAAC;QACR,GAAG,EAAE,CAAC;QACN,KAAK,EAAE,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,EAAE;KACqC;IAE/C,MAAM,EAAE;QACN,IAAI,EAAE,CAAC;QACP,EAAE,EAAE,CAAC;QACL,EAAE,EAAE,CAAC;QACL,EAAE,EAAE,CAAC;QACL,EAAE,EAAE,EAAE;QACN,IAAI,EAAE,IAAI;KACoC;IAEhD,sEAAsE;IACtE,0EAA0E;IAC1E,qDAAqD;IACrD,UAAU,EAAE;QACV,EAAE,EAAE,GAAG;QACP,EAAE,EAAE,GAAG;QACP,EAAE,EAAE,IAAI;QACR,EAAE,EAAE,IAAI;QACR,KAAK,EAAE,IAAI;KACH;CACX,CAAA;AAED,mFAAmF;AACnF,MAAM,UAAU,SAAS,CAAC,CAAa;IACrC,uEAAuE;IACvE,wEAAwE;IACxE,OAAO,CAAC,CAAA;AACV,CAAC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Tiny in-house implementation of the `class-variance-authority` pattern
3
+ * (a.k.a. `cva` / `tailwind-variants`). We roll our own to avoid a runtime
4
+ * dependency while keeping the API surface compatible with the shadcn /
5
+ * cva ecosystem — anyone familiar with cva can read these calls.
6
+ *
7
+ * @example
8
+ * const button = cv('inline-flex items-center', {
9
+ * variants: {
10
+ * intent: {
11
+ * primary: 'bg-primary text-white',
12
+ * secondary: 'bg-secondary text-foreground',
13
+ * },
14
+ * size: {
15
+ * sm: 'px-2 py-1 text-xs',
16
+ * md: 'px-4 py-2 text-sm',
17
+ * },
18
+ * },
19
+ * defaultVariants: { intent: 'primary', size: 'md' },
20
+ * })
21
+ *
22
+ * button({ intent: 'secondary' }) // -> "inline-flex … bg-secondary …"
23
+ * button({ intent: 'secondary', class: 'shadow' }) // append extras
24
+ */
25
+ type ClassValue = string | undefined | false | null;
26
+ export type VariantsConfig = Record<string, Record<string, ClassValue>>;
27
+ type VariantSelection<V extends VariantsConfig> = {
28
+ [K in keyof V]?: keyof V[K];
29
+ };
30
+ interface CompoundVariant<V extends VariantsConfig> {
31
+ [key: string]: keyof V[keyof V] | Array<keyof V[keyof V]> | ClassValue;
32
+ class?: ClassValue;
33
+ }
34
+ export interface CvConfig<V extends VariantsConfig> {
35
+ variants: V;
36
+ defaultVariants?: VariantSelection<V>;
37
+ compoundVariants?: Array<CompoundVariant<V>>;
38
+ }
39
+ export type VariantProps<F extends (...args: any) => any> = Omit<NonNullable<Parameters<F>[0]>, 'class' | 'className'>;
40
+ /**
41
+ * Build a variant-aware class generator.
42
+ *
43
+ * The returned function accepts the variant selection plus an optional
44
+ * `class` / `className` escape hatch and returns the combined Tailwind
45
+ * class string. Compound variants run after the base + per-variant
46
+ * classes, so they take precedence when the Tailwind ordering matters.
47
+ */
48
+ export declare function cv<V extends VariantsConfig>(base: ClassValue, config: CvConfig<V>): (props?: VariantSelection<V> & {
49
+ class?: ClassValue;
50
+ className?: ClassValue;
51
+ }) => string;
52
+ export {};
53
+ //# sourceMappingURL=cv.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cv.d.ts","sourceRoot":"","sources":["../../src/lib/cv.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,KAAK,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,KAAK,GAAG,IAAI,CAAA;AAEnD,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAA;AAEvE,KAAK,gBAAgB,CAAC,CAAC,SAAS,cAAc,IAAI;KAC/C,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CAC5B,CAAA;AAED,UAAU,eAAe,CAAC,CAAC,SAAS,cAAc;IAGhD,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,UAAU,CAAA;IACtE,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB;AAED,MAAM,WAAW,QAAQ,CAAC,CAAC,SAAS,cAAc;IAChD,QAAQ,EAAE,CAAC,CAAA;IACX,eAAe,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAA;IACrC,gBAAgB,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAA;CAC7C;AAED,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,IAAI,IAAI,CAC9D,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAC7B,OAAO,GAAG,WAAW,CACtB,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,EAAE,CAAC,CAAC,SAAS,cAAc,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,IAE9E,QAAQ,gBAAgB,CAAC,CAAC,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,UAAU,CAAC;IAAC,SAAS,CAAC,EAAE,UAAU,CAAA;CAAE,KAC3E,MAAM,CA+BV"}
package/dist/lib/cv.js ADDED
@@ -0,0 +1,39 @@
1
+ import clsx from 'clsx';
2
+ /**
3
+ * Build a variant-aware class generator.
4
+ *
5
+ * The returned function accepts the variant selection plus an optional
6
+ * `class` / `className` escape hatch and returns the combined Tailwind
7
+ * class string. Compound variants run after the base + per-variant
8
+ * classes, so they take precedence when the Tailwind ordering matters.
9
+ */
10
+ export function cv(base, config) {
11
+ return function variantClass(props) {
12
+ const selected = { ...config.defaultVariants, ...props };
13
+ const variantClasses = [];
14
+ for (const [key, valuesMap] of Object.entries(config.variants)) {
15
+ const value = selected[key];
16
+ if (value === undefined || value === null)
17
+ continue;
18
+ const cls = valuesMap[value];
19
+ if (cls)
20
+ variantClasses.push(cls);
21
+ }
22
+ const compoundClasses = [];
23
+ if (config.compoundVariants) {
24
+ for (const compound of config.compoundVariants) {
25
+ const { class: cClass, className: _cn, ...match } = compound;
26
+ const matches = Object.entries(match).every(([k, v]) => {
27
+ const current = selected[k];
28
+ if (Array.isArray(v))
29
+ return v.includes(current);
30
+ return current === v;
31
+ });
32
+ if (matches && cClass)
33
+ compoundClasses.push(cClass);
34
+ }
35
+ }
36
+ return clsx(base, ...variantClasses, ...compoundClasses, (props?.class ?? props?.className));
37
+ };
38
+ }
39
+ //# sourceMappingURL=cv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cv.js","sourceRoot":"","sources":["../../src/lib/cv.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AAqDvB;;;;;;;GAOG;AACH,MAAM,UAAU,EAAE,CAA2B,IAAgB,EAAE,MAAmB;IAChF,OAAO,SAAS,YAAY,CAC1B,KAA4E;QAE5E,MAAM,QAAQ,GAAG,EAAE,GAAG,MAAM,CAAC,eAAe,EAAE,GAAG,KAAK,EAA6B,CAAA;QAEnF,MAAM,cAAc,GAAiB,EAAE,CAAA;QACvC,KAAK,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC/D,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAA;YAC3B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;gBAAE,SAAQ;YACnD,MAAM,GAAG,GAAG,SAAS,CAAC,KAAe,CAAC,CAAA;YACtC,IAAI,GAAG;gBAAE,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACnC,CAAC;QAED,MAAM,eAAe,GAAiB,EAAE,CAAA;QACxC,IAAI,MAAM,CAAC,gBAAgB,EAAE,CAAC;YAC5B,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,gBAAgB,EAAE,CAAC;gBAC/C,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,GAAG,QAAe,CAAA;gBACnE,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE;oBACrD,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;oBAC3B,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;wBAAE,OAAQ,CAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;oBAC/D,OAAO,OAAO,KAAK,CAAC,CAAA;gBACtB,CAAC,CAAC,CAAA;gBACF,IAAI,OAAO,IAAI,MAAM;oBAAE,eAAe,CAAC,IAAI,CAAC,MAAoB,CAAC,CAAA;YACnE,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CACT,IAAI,EACJ,GAAG,cAAc,EACjB,GAAG,eAAe,EAClB,CAAC,KAAK,EAAE,KAAK,IAAI,KAAK,EAAE,SAAS,CAAe,CACjD,CAAA;IACH,CAAC,CAAA;AACH,CAAC"}
@@ -59,12 +59,12 @@ export function ApiKeys(_props) {
59
59
  }
60
60
  };
61
61
  if (loading) {
62
- return (_jsx("div", { className: "p-4 sm:p-6 flex items-center justify-center h-64", children: _jsx(Loader2, { className: "w-6 h-6 animate-spin text-blue-600" }) }));
62
+ return (_jsx("div", { className: "flex h-64 items-center justify-center p-4 sm:p-6", children: _jsx(Loader2, { className: "h-6 w-6 animate-spin text-blue-600" }) }));
63
63
  }
64
- return (_jsxs("div", { className: "p-4 sm:p-6", children: [_jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between gap-3 mb-6", children: [_jsxs("div", { children: [_jsxs("h1", { className: "text-xl sm:text-2xl font-semibold text-gray-900 flex items-center gap-2", children: [_jsx(KeyRound, { className: "w-5 h-5 text-gray-500" }), "API Keys"] }), _jsxs("p", { className: "text-sm text-gray-500 mt-1", children: ["Long-lived credentials for programmatic access. Use the", ' ', _jsx("code", { className: "px-1 py-0.5 rounded bg-gray-100 text-xs", children: "Authorization: Bearer" }), ' ', "header instead of session cookies. API key requests skip CSRF."] })] }), _jsxs("button", { type: "button", onClick: () => setShowCreate(true), className: "inline-flex items-center justify-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors text-sm", children: [_jsx(Plus, { className: "w-4 h-4" }), "New API Key"] })] }), error && (_jsxs("div", { className: "mb-4 flex items-center gap-3 rounded-lg border border-red-200 bg-red-50 p-3", children: [_jsx(AlertTriangle, { className: "w-5 h-5 text-red-600 shrink-0" }), _jsx("span", { className: "text-sm text-red-800 flex-1", children: error }), _jsx("button", { onClick: refetch, className: "px-3 py-1 text-sm text-red-700 border border-red-300 rounded-lg hover:bg-red-100 transition-colors", children: "Retry" })] })), keys.length === 0 ? (_jsxs("div", { className: "bg-white rounded-lg border border-gray-200 p-10 text-center", children: [_jsx(KeyRound, { className: "w-8 h-8 text-gray-300 mx-auto mb-3" }), _jsx("p", { className: "text-sm text-gray-500 mb-1", children: "No API keys yet" }), _jsx("p", { className: "text-xs text-gray-400 mb-4", children: "Create one to let AI agents, CI jobs, or external integrations call the CMS API." }), _jsxs("button", { type: "button", onClick: () => setShowCreate(true), className: "inline-flex items-center justify-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors text-sm", children: [_jsx(Plus, { className: "w-4 h-4" }), "Create your first API key"] })] })) : (_jsx("div", { className: "bg-white rounded-lg border border-gray-200 overflow-hidden", children: _jsx("div", { className: "overflow-x-auto", children: _jsxs("table", { className: "w-full", children: [_jsx("thead", { className: "bg-gray-50 border-b border-gray-200", children: _jsxs("tr", { children: [_jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Name" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Token" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Scopes" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Last used" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Expires" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Status" }), _jsx("th", { className: "px-4 py-2" })] }) }), _jsx("tbody", { className: "divide-y divide-gray-200", children: keys.map((k) => {
64
+ return (_jsxs("div", { className: "p-4 sm:p-6", children: [_jsxs("div", { className: "mb-6 flex flex-col justify-between gap-3 sm:flex-row sm:items-center", children: [_jsxs("div", { children: [_jsxs("h1", { className: "flex items-center gap-2 text-xl font-semibold text-gray-900 sm:text-2xl", children: [_jsx(KeyRound, { className: "h-5 w-5 text-gray-500" }), "API Keys"] }), _jsxs("p", { className: "mt-1 text-sm text-gray-500", children: ["Long-lived credentials for programmatic access. Use the", ' ', _jsx("code", { className: "rounded bg-gray-100 px-1 py-0.5 text-xs", children: "Authorization: Bearer" }), ' ', "header instead of session cookies. API key requests skip CSRF."] })] }), _jsxs("button", { type: "button", onClick: () => setShowCreate(true), className: "inline-flex items-center justify-center gap-2 rounded-lg bg-blue-600 px-4 py-2 text-sm text-white transition-colors hover:bg-blue-700", children: [_jsx(Plus, { className: "h-4 w-4" }), "New API Key"] })] }), error && (_jsxs("div", { className: "mb-4 flex items-center gap-3 rounded-lg border border-red-200 bg-red-50 p-3", children: [_jsx(AlertTriangle, { className: "h-5 w-5 shrink-0 text-red-600" }), _jsx("span", { className: "flex-1 text-sm text-red-800", children: error }), _jsx("button", { onClick: refetch, className: "rounded-lg border border-red-300 px-3 py-1 text-sm text-red-700 transition-colors hover:bg-red-100", children: "Retry" })] })), keys.length === 0 ? (_jsxs("div", { className: "rounded-lg border border-gray-200 bg-white p-10 text-center", children: [_jsx(KeyRound, { className: "mx-auto mb-3 h-8 w-8 text-gray-300" }), _jsx("p", { className: "mb-1 text-sm text-gray-500", children: "No API keys yet" }), _jsx("p", { className: "mb-4 text-xs text-gray-400", children: "Create one to let AI agents, CI jobs, or external integrations call the CMS API." }), _jsxs("button", { type: "button", onClick: () => setShowCreate(true), className: "inline-flex items-center justify-center gap-2 rounded-lg bg-blue-600 px-4 py-2 text-sm text-white transition-colors hover:bg-blue-700", children: [_jsx(Plus, { className: "h-4 w-4" }), "Create your first API key"] })] })) : (_jsx("div", { className: "overflow-hidden rounded-lg border border-gray-200 bg-white", children: _jsx("div", { className: "overflow-x-auto", children: _jsxs("table", { className: "w-full", children: [_jsx("thead", { className: "border-b border-gray-200 bg-gray-50", children: _jsxs("tr", { children: [_jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Name" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Token" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Scopes" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Last used" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Expires" }), _jsx("th", { className: "px-4 py-2 text-left text-xs font-medium text-gray-700", children: "Status" }), _jsx("th", { className: "px-4 py-2" })] }) }), _jsx("tbody", { className: "divide-y divide-gray-200", children: keys.map((k) => {
65
65
  const revoked = !!k.revokedAt;
66
66
  const expired = k.expiresAt && new Date(k.expiresAt).getTime() < Date.now();
67
- return (_jsxs("tr", { className: revoked || expired ? 'opacity-60' : undefined, children: [_jsxs("td", { className: "px-4 py-3 text-sm", children: [_jsx("div", { className: "font-medium text-gray-900", children: k.name }), k.user && (_jsxs("div", { className: "text-xs text-gray-500", children: ["created by ", k.user.name ?? k.user.email] }))] }), _jsxs("td", { className: "px-4 py-3 text-sm font-mono text-gray-700", children: [k.keyPrefix, "\u2026"] }), _jsx("td", { className: "px-4 py-3 text-sm text-gray-700 max-w-xs", children: formatScopes(k.scopes) }), _jsx("td", { className: "px-4 py-3 text-sm text-gray-600", children: formatDate(k.lastUsedAt) }), _jsx("td", { className: "px-4 py-3 text-sm text-gray-600", children: formatDate(k.expiresAt) }), _jsx("td", { className: "px-4 py-3", children: revoked ? (_jsx("span", { className: "inline-flex px-2 py-0.5 rounded-full text-xs font-medium bg-red-100 text-red-700", children: "Revoked" })) : expired ? (_jsx("span", { className: "inline-flex px-2 py-0.5 rounded-full text-xs font-medium bg-amber-100 text-amber-700", children: "Expired" })) : (_jsx("span", { className: "inline-flex px-2 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-700", children: "Active" })) }), _jsx("td", { className: "px-4 py-3 text-right", children: !revoked && (_jsx("button", { type: "button", onClick: () => handleRevoke(k.id, k.name), className: "p-1.5 hover:bg-red-50 rounded transition-colors", title: "Revoke", children: _jsx(Trash2, { className: "w-4 h-4 text-red-600" }) })) })] }, k.id));
67
+ return (_jsxs("tr", { className: revoked || expired ? 'opacity-60' : undefined, children: [_jsxs("td", { className: "px-4 py-3 text-sm", children: [_jsx("div", { className: "font-medium text-gray-900", children: k.name }), k.user && (_jsxs("div", { className: "text-xs text-gray-500", children: ["created by ", k.user.name ?? k.user.email] }))] }), _jsxs("td", { className: "px-4 py-3 font-mono text-sm text-gray-700", children: [k.keyPrefix, "\u2026"] }), _jsx("td", { className: "max-w-xs px-4 py-3 text-sm text-gray-700", children: formatScopes(k.scopes) }), _jsx("td", { className: "px-4 py-3 text-sm text-gray-600", children: formatDate(k.lastUsedAt) }), _jsx("td", { className: "px-4 py-3 text-sm text-gray-600", children: formatDate(k.expiresAt) }), _jsx("td", { className: "px-4 py-3", children: revoked ? (_jsx("span", { className: "inline-flex rounded-full bg-red-100 px-2 py-0.5 text-xs font-medium text-red-700", children: "Revoked" })) : expired ? (_jsx("span", { className: "inline-flex rounded-full bg-amber-100 px-2 py-0.5 text-xs font-medium text-amber-700", children: "Expired" })) : (_jsx("span", { className: "inline-flex rounded-full bg-green-100 px-2 py-0.5 text-xs font-medium text-green-700", children: "Active" })) }), _jsx("td", { className: "px-4 py-3 text-right", children: !revoked && (_jsx("button", { type: "button", onClick: () => handleRevoke(k.id, k.name), className: "rounded p-1.5 transition-colors hover:bg-red-50", title: "Revoke", children: _jsx(Trash2, { className: "h-4 w-4 text-red-600" }) })) })] }, k.id));
68
68
  }) })] }) }) })), _jsx(CreateApiKeyDialog, { open: showCreate, onClose: () => setShowCreate(false), onCreated: (created) => {
69
69
  setShowCreate(false);
70
70
  setCreatedKey(created);
@@ -140,15 +140,15 @@ function CreateApiKeyDialog({ open, onClose, onCreated }) {
140
140
  setSubmitting(false);
141
141
  }
142
142
  }
143
- return (_jsx(Dialog.Root, { open: open, onOpenChange: (o) => !o && onClose(), children: _jsxs(Dialog.Portal, { children: [_jsx(Dialog.Overlay, { className: "fixed inset-0 bg-black/40 z-40" }), _jsxs(Dialog.Content, { className: "fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-white rounded-lg shadow-xl w-full max-w-md p-6 z-50", children: [_jsxs(Dialog.Title, { className: "text-lg font-semibold text-gray-900 mb-4 flex items-center gap-2", children: [_jsx(Shield, { className: "w-5 h-5 text-blue-600" }), "New API Key"] }), _jsxs("form", { onSubmit: handleSubmit, className: "space-y-4", children: [_jsxs("div", { children: [_jsx("label", { className: "text-sm font-medium text-gray-700 block mb-1", children: "Name" }), _jsx("input", { type: "text", value: name, onChange: (e) => setName(e.target.value), placeholder: "e.g. AI agent \u2014 production", className: "w-full px-3 py-2 text-sm border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500", required: true, maxLength: 100 })] }), _jsxs("div", { children: [_jsx("label", { className: "text-sm font-medium text-gray-700 block mb-2", children: "Preset" }), _jsx("div", { className: "grid grid-cols-2 gap-2", children: ['content', 'readonly', 'admin', 'custom'].map((p) => (_jsxs("button", { type: "button", onClick: () => setPreset(p), className: `px-3 py-2 text-sm rounded-lg border transition-colors text-left ${preset === p
143
+ return (_jsx(Dialog.Root, { open: open, onOpenChange: (o) => !o && onClose(), children: _jsxs(Dialog.Portal, { children: [_jsx(Dialog.Overlay, { className: "fixed inset-0 z-40 bg-black/40" }), _jsxs(Dialog.Content, { className: "fixed top-1/2 left-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2 rounded-lg bg-white p-6 shadow-xl", children: [_jsxs(Dialog.Title, { className: "mb-4 flex items-center gap-2 text-lg font-semibold text-gray-900", children: [_jsx(Shield, { className: "h-5 w-5 text-blue-600" }), "New API Key"] }), _jsxs("form", { onSubmit: handleSubmit, className: "space-y-4", children: [_jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Name" }), _jsx("input", { type: "text", value: name, onChange: (e) => setName(e.target.value), placeholder: "e.g. AI agent \u2014 production", className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:outline-none", required: true, maxLength: 100 })] }), _jsxs("div", { children: [_jsx("label", { className: "mb-2 block text-sm font-medium text-gray-700", children: "Preset" }), _jsx("div", { className: "grid grid-cols-2 gap-2", children: ['content', 'readonly', 'admin', 'custom'].map((p) => (_jsxs("button", { type: "button", onClick: () => setPreset(p), className: `rounded-lg border px-3 py-2 text-left text-sm transition-colors ${preset === p
144
144
  ? 'border-blue-500 bg-blue-50 text-blue-900'
145
- : 'border-gray-300 bg-white text-gray-700 hover:bg-gray-50'}`, children: [_jsx("div", { className: "font-medium capitalize", children: p }), _jsxs("div", { className: "text-xs text-gray-500", children: [p === 'content' && 'Read/create/update content', p === 'readonly' && 'Read-only access', p === 'admin' && 'Full admin access', p === 'custom' && 'Pick capabilities'] })] }, p))) })] }), (preset === 'content' || preset === 'custom') && (_jsxs("div", { className: "space-y-2 rounded-lg border border-gray-200 p-3 bg-gray-50", children: [_jsxs("label", { className: "flex items-center gap-2 text-sm text-gray-700", children: [_jsx("input", { type: "checkbox", checked: media, onChange: (e) => setMedia(e.target.checked), className: "rounded border-gray-300" }), "Allow media uploads"] }), _jsxs("label", { className: "flex items-center gap-2 text-sm text-gray-700", children: [_jsx("input", { type: "checkbox", checked: pageBuilder, onChange: (e) => setPageBuilder(e.target.checked), className: "rounded border-gray-300" }), "Allow AI page generation"] })] })), _jsxs("div", { children: [_jsx("label", { className: "text-sm font-medium text-gray-700 block mb-1", children: "Expires in (days)" }), _jsx("input", { type: "number", min: 1, placeholder: "Never (leave blank)", value: expiresInDays, onChange: (e) => setExpiresInDays(e.target.value), className: "w-full px-3 py-2 text-sm border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" })] }), _jsxs("div", { children: [_jsx("label", { className: "text-sm font-medium text-gray-700 block mb-1", children: "Confirm password" }), _jsx("input", { type: "password", value: password, onChange: (e) => setPassword(e.target.value), className: "w-full px-3 py-2 text-sm border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500", required: true }), _jsx("p", { className: "text-xs text-gray-500 mt-1", children: "Creating an API key is a sensitive action and requires re-authentication." })] }), _jsxs("div", { className: "flex items-center justify-end gap-2 pt-2", children: [_jsx("button", { type: "button", onClick: onClose, className: "px-4 py-2 text-sm border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors", children: "Cancel" }), _jsx("button", { type: "submit", disabled: submitting, className: "px-4 py-2 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors disabled:opacity-50", children: submitting ? 'Creating…' : 'Create key' })] })] })] })] }) }));
145
+ : 'border-gray-300 bg-white text-gray-700 hover:bg-gray-50'}`, children: [_jsx("div", { className: "font-medium capitalize", children: p }), _jsxs("div", { className: "text-xs text-gray-500", children: [p === 'content' && 'Read/create/update content', p === 'readonly' && 'Read-only access', p === 'admin' && 'Full admin access', p === 'custom' && 'Pick capabilities'] })] }, p))) })] }), (preset === 'content' || preset === 'custom') && (_jsxs("div", { className: "space-y-2 rounded-lg border border-gray-200 bg-gray-50 p-3", children: [_jsxs("label", { className: "flex items-center gap-2 text-sm text-gray-700", children: [_jsx("input", { type: "checkbox", checked: media, onChange: (e) => setMedia(e.target.checked), className: "rounded border-gray-300" }), "Allow media uploads"] }), _jsxs("label", { className: "flex items-center gap-2 text-sm text-gray-700", children: [_jsx("input", { type: "checkbox", checked: pageBuilder, onChange: (e) => setPageBuilder(e.target.checked), className: "rounded border-gray-300" }), "Allow AI page generation"] })] })), _jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Expires in (days)" }), _jsx("input", { type: "number", min: 1, placeholder: "Never (leave blank)", value: expiresInDays, onChange: (e) => setExpiresInDays(e.target.value), className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:outline-none" })] }), _jsxs("div", { children: [_jsx("label", { className: "mb-1 block text-sm font-medium text-gray-700", children: "Confirm password" }), _jsx("input", { type: "password", value: password, onChange: (e) => setPassword(e.target.value), className: "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:outline-none", required: true }), _jsx("p", { className: "mt-1 text-xs text-gray-500", children: "Creating an API key is a sensitive action and requires re-authentication." })] }), _jsxs("div", { className: "flex items-center justify-end gap-2 pt-2", children: [_jsx("button", { type: "button", onClick: onClose, className: "rounded-lg border border-gray-300 px-4 py-2 text-sm transition-colors hover:bg-gray-50", children: "Cancel" }), _jsx("button", { type: "submit", disabled: submitting, className: "rounded-lg bg-blue-600 px-4 py-2 text-sm text-white transition-colors hover:bg-blue-700 disabled:opacity-50", children: submitting ? 'Creating…' : 'Create key' })] })] })] })] }) }));
146
146
  }
147
147
  function RevealKeyDialog({ created, onClose, }) {
148
148
  const [shown, setShown] = useState(false);
149
- return (_jsx(Dialog.Root, { open: true, onOpenChange: (o) => !o && onClose(), children: _jsxs(Dialog.Portal, { children: [_jsx(Dialog.Overlay, { className: "fixed inset-0 bg-black/40 z-40" }), _jsxs(Dialog.Content, { className: "fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-white rounded-lg shadow-xl w-full max-w-md p-6 z-50", children: [_jsxs(Dialog.Title, { className: "text-lg font-semibold text-gray-900 mb-2 flex items-center gap-2", children: [_jsx(Shield, { className: "w-5 h-5 text-green-600" }), "API key created"] }), _jsx(Dialog.Description, { className: "text-sm text-gray-600 mb-4", children: "Copy this key now \u2014 it will not be shown again. Treat it like a password." }), _jsxs("div", { className: "rounded-lg border border-amber-200 bg-amber-50 p-3 mb-4 flex items-start gap-2", children: [_jsx(AlertTriangle, { className: "w-4 h-4 text-amber-600 shrink-0 mt-0.5" }), _jsx("p", { className: "text-xs text-amber-900", children: "We only store a hash of this key. If you lose it, you'll need to revoke and create a new one." })] }), _jsxs("div", { className: "flex items-center gap-2 mb-4", children: [_jsx("code", { className: "flex-1 px-3 py-2 bg-gray-100 rounded text-sm font-mono break-all", children: shown ? created.key : '•'.repeat(Math.min(48, created.key.length)) }), _jsx("button", { type: "button", onClick: () => setShown((s) => !s), className: "p-2 border border-gray-300 rounded hover:bg-gray-50", title: shown ? 'Hide' : 'Show', children: shown ? _jsx(EyeOff, { className: "w-4 h-4" }) : _jsx(Eye, { className: "w-4 h-4" }) }), _jsx("button", { type: "button", onClick: () => {
149
+ return (_jsx(Dialog.Root, { open: true, onOpenChange: (o) => !o && onClose(), children: _jsxs(Dialog.Portal, { children: [_jsx(Dialog.Overlay, { className: "fixed inset-0 z-40 bg-black/40" }), _jsxs(Dialog.Content, { className: "fixed top-1/2 left-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2 rounded-lg bg-white p-6 shadow-xl", children: [_jsxs(Dialog.Title, { className: "mb-2 flex items-center gap-2 text-lg font-semibold text-gray-900", children: [_jsx(Shield, { className: "h-5 w-5 text-green-600" }), "API key created"] }), _jsx(Dialog.Description, { className: "mb-4 text-sm text-gray-600", children: "Copy this key now \u2014 it will not be shown again. Treat it like a password." }), _jsxs("div", { className: "mb-4 flex items-start gap-2 rounded-lg border border-amber-200 bg-amber-50 p-3", children: [_jsx(AlertTriangle, { className: "mt-0.5 h-4 w-4 shrink-0 text-amber-600" }), _jsx("p", { className: "text-xs text-amber-900", children: "We only store a hash of this key. If you lose it, you'll need to revoke and create a new one." })] }), _jsxs("div", { className: "mb-4 flex items-center gap-2", children: [_jsx("code", { className: "flex-1 rounded bg-gray-100 px-3 py-2 font-mono text-sm break-all", children: shown ? created.key : '•'.repeat(Math.min(48, created.key.length)) }), _jsx("button", { type: "button", onClick: () => setShown((s) => !s), className: "rounded border border-gray-300 p-2 hover:bg-gray-50", title: shown ? 'Hide' : 'Show', children: shown ? _jsx(EyeOff, { className: "h-4 w-4" }) : _jsx(Eye, { className: "h-4 w-4" }) }), _jsx("button", { type: "button", onClick: () => {
150
150
  navigator.clipboard.writeText(created.key);
151
151
  toast.success('Copied to clipboard');
152
- }, className: "p-2 border border-gray-300 rounded hover:bg-gray-50", title: "Copy", children: _jsx(Copy, { className: "w-4 h-4" }) })] }), _jsx("div", { className: "flex justify-end", children: _jsx("button", { type: "button", onClick: onClose, className: "px-4 py-2 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors", children: "I've saved it" }) })] })] }) }));
152
+ }, className: "rounded border border-gray-300 p-2 hover:bg-gray-50", title: "Copy", children: _jsx(Copy, { className: "h-4 w-4" }) })] }), _jsx("div", { className: "flex justify-end", children: _jsx("button", { type: "button", onClick: onClose, className: "rounded-lg bg-blue-600 px-4 py-2 text-sm text-white transition-colors hover:bg-blue-700", children: "I've saved it" }) })] })] }) }));
153
153
  }
154
154
  //# sourceMappingURL=ApiKeys.js.map
@@ -120,27 +120,27 @@ export function CollectionList({ collectionSlug, config, onNavigate }) {
120
120
  setSelected(new Set());
121
121
  refetch();
122
122
  };
123
- const SortCol = ({ field, children }) => (_jsxs("button", { type: "button", onClick: () => toggleSort(field), className: "flex items-center gap-1 text-xs font-medium hover:opacity-80 transition-opacity", style: { color: 'var(--actuate-text-secondary, #6b7280)' }, children: [children, sort === field && _jsx("span", { children: order === 'asc' ? '↑' : '↓' })] }));
123
+ const SortCol = ({ field, children }) => (_jsxs("button", { type: "button", onClick: () => toggleSort(field), className: "flex items-center gap-1 text-xs font-medium transition-opacity hover:opacity-80", style: { color: 'var(--actuate-text-secondary, #6b7280)' }, children: [children, sort === field && _jsx("span", { children: order === 'asc' ? '↑' : '↓' })] }));
124
124
  if (loading && docs.length === 0) {
125
- return (_jsx("div", { className: "p-4 flex items-center justify-center h-64", children: _jsx(Loader2, { className: "w-6 h-6 animate-spin", style: { color: 'var(--actuate-primary, #2563eb)' } }) }));
125
+ return (_jsx("div", { className: "flex h-64 items-center justify-center p-4", children: _jsx(Loader2, { className: "h-6 w-6 animate-spin", style: { color: 'var(--actuate-primary, #2563eb)' } }) }));
126
126
  }
127
- return (_jsxs("div", { className: "p-3 pr-6 sm:p-4 sm:pr-8 h-full flex flex-col", children: [_jsxs("div", { className: "flex items-center justify-between mb-4 gap-3 flex-wrap", children: [_jsxs("div", { children: [_jsx("h1", { className: "text-xl sm:text-2xl font-semibold", style: { color: 'var(--actuate-text, #111827)' }, children: labels.plural }), _jsxs("p", { className: "text-sm", style: { color: 'var(--actuate-text-secondary, #6b7280)' }, children: [total, " total"] })] }), _jsxs("button", { onClick: () => onNavigate(`/${collectionSlug}/new`), className: "flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium text-white transition-colors", style: { background: 'var(--actuate-primary, #2563eb)' }, children: [_jsx(Plus, { className: "w-4 h-4" }), " New ", labels.singular] })] }), _jsxs("div", { className: "relative mb-4", children: [_jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4", style: { color: 'var(--actuate-text-muted, #9ca3af)' } }), _jsx("input", { type: "text", placeholder: `Search ${labels.plural.toLowerCase()}...`, value: search, onChange: (e) => setSearch(e.target.value), className: "w-full pl-9 pr-3 py-2 text-sm rounded-lg border focus:outline-none focus:ring-2", style: {
127
+ return (_jsxs("div", { className: "flex h-full flex-col p-3 pr-6 sm:p-4 sm:pr-8", children: [_jsxs("div", { className: "mb-4 flex flex-wrap items-center justify-between gap-3", children: [_jsxs("div", { children: [_jsx("h1", { className: "text-xl font-semibold sm:text-2xl", style: { color: 'var(--actuate-text, #111827)' }, children: labels.plural }), _jsxs("p", { className: "text-sm", style: { color: 'var(--actuate-text-secondary, #6b7280)' }, children: [total, " total"] })] }), _jsxs("button", { onClick: () => onNavigate(`/${collectionSlug}/new`), className: "flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium text-white transition-colors", style: { background: 'var(--actuate-primary, #2563eb)' }, children: [_jsx(Plus, { className: "h-4 w-4" }), " New ", labels.singular] })] }), _jsxs("div", { className: "relative mb-4", children: [_jsx(Search, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2", style: { color: 'var(--actuate-text-muted, #9ca3af)' } }), _jsx("input", { type: "text", placeholder: `Search ${labels.plural.toLowerCase()}...`, value: search, onChange: (e) => setSearch(e.target.value), className: "w-full rounded-lg border py-2 pr-3 pl-9 text-sm focus:ring-2 focus:outline-none", style: {
128
128
  borderColor: 'var(--actuate-border, #d1d5db)',
129
129
  color: 'var(--actuate-text, #111827)',
130
- } })] }), selected.size > 0 && (_jsxs("div", { className: "rounded-lg p-3 mb-4 flex flex-wrap items-center justify-between gap-2", style: {
130
+ } })] }), selected.size > 0 && (_jsxs("div", { className: "mb-4 flex flex-wrap items-center justify-between gap-2 rounded-lg p-3", style: {
131
131
  background: 'var(--actuate-info-bg, #eff6ff)',
132
132
  borderColor: 'var(--actuate-info-border, #bfdbfe)',
133
133
  borderWidth: 1,
134
134
  borderStyle: 'solid',
135
- }, children: [_jsxs("span", { className: "text-sm", style: { color: 'var(--actuate-info-text, #1e40af)' }, children: [selected.size, " selected"] }), _jsxs("div", { className: "flex gap-2", children: [_jsx("button", { onClick: () => bulkAction('publish'), className: "px-3 py-1.5 text-sm text-white rounded-lg", style: { background: 'var(--actuate-success, #16a34a)' }, children: "Publish" }), _jsx("button", { onClick: () => bulkAction('unpublish'), className: "px-3 py-1.5 text-sm text-white rounded-lg", style: { background: 'var(--actuate-warning, #ca8a04)' }, children: "Unpublish" }), _jsxs("button", { onClick: () => bulkAction('delete'), className: "px-3 py-1.5 text-sm text-white rounded-lg", style: { background: 'var(--actuate-danger, #dc2626)' }, children: [_jsx(Trash2, { className: "w-3.5 h-3.5 inline -mt-0.5 mr-1" }), "Delete"] })] })] })), error && (_jsxs("div", { className: "rounded-lg p-3 mb-4 text-sm", style: {
135
+ }, children: [_jsxs("span", { className: "text-sm", style: { color: 'var(--actuate-info-text, #1e40af)' }, children: [selected.size, " selected"] }), _jsxs("div", { className: "flex gap-2", children: [_jsx("button", { onClick: () => bulkAction('publish'), className: "rounded-lg px-3 py-1.5 text-sm text-white", style: { background: 'var(--actuate-success, #16a34a)' }, children: "Publish" }), _jsx("button", { onClick: () => bulkAction('unpublish'), className: "rounded-lg px-3 py-1.5 text-sm text-white", style: { background: 'var(--actuate-warning, #ca8a04)' }, children: "Unpublish" }), _jsxs("button", { onClick: () => bulkAction('delete'), className: "rounded-lg px-3 py-1.5 text-sm text-white", style: { background: 'var(--actuate-danger, #dc2626)' }, children: [_jsx(Trash2, { className: "-mt-0.5 mr-1 inline h-3.5 w-3.5" }), "Delete"] })] })] })), error && (_jsxs("div", { className: "mb-4 rounded-lg p-3 text-sm", style: {
136
136
  background: 'var(--actuate-danger-bg, #fef2f2)',
137
137
  color: 'var(--actuate-danger-text, #991b1b)',
138
- }, children: [error, " \u2014", ' ', _jsx("button", { onClick: refetch, className: "underline", children: "retry" })] })), docs.length === 0 && !loading ? (_jsxs("div", { className: "flex-1 flex flex-col items-center justify-center rounded-lg border p-8", style: {
138
+ }, children: [error, " \u2014", ' ', _jsx("button", { onClick: refetch, className: "underline", children: "retry" })] })), docs.length === 0 && !loading ? (_jsxs("div", { className: "flex flex-1 flex-col items-center justify-center rounded-lg border p-8", style: {
139
139
  borderColor: 'var(--actuate-border, #d1d5db)',
140
140
  color: 'var(--actuate-text-secondary, #6b7280)',
141
- }, children: [_jsx(FileText, { className: "w-10 h-10 mb-3 opacity-40" }), _jsxs("p", { className: "text-sm mb-3", children: ["No ", labels.plural.toLowerCase(), " found"] }), _jsxs("button", { onClick: () => onNavigate(`/${collectionSlug}/new`), className: "px-4 py-2 text-sm text-white rounded-lg", style: { background: 'var(--actuate-primary, #2563eb)' }, children: ["Create ", labels.singular] })] })) : (_jsx("div", { className: "flex-1 rounded-lg border overflow-auto", style: { borderColor: 'var(--actuate-border, #d1d5db)' }, children: _jsxs("table", { className: "w-full text-sm", children: [_jsx("thead", { className: "sticky top-0", style: {
141
+ }, children: [_jsx(FileText, { className: "mb-3 h-10 w-10 opacity-40" }), _jsxs("p", { className: "mb-3 text-sm", children: ["No ", labels.plural.toLowerCase(), " found"] }), _jsxs("button", { onClick: () => onNavigate(`/${collectionSlug}/new`), className: "rounded-lg px-4 py-2 text-sm text-white", style: { background: 'var(--actuate-primary, #2563eb)' }, children: ["Create ", labels.singular] })] })) : (_jsx("div", { className: "flex-1 overflow-auto rounded-lg border", style: { borderColor: 'var(--actuate-border, #d1d5db)' }, children: _jsxs("table", { className: "w-full text-sm", children: [_jsx("thead", { className: "sticky top-0", style: {
142
142
  background: 'var(--actuate-surface-alt, #f9fafb)',
143
143
  borderBottom: '1px solid var(--actuate-border, #d1d5db)',
144
- }, children: _jsxs("tr", { children: [_jsx("th", { className: "w-10 px-3 py-2 text-left", children: _jsx("input", { type: "checkbox", checked: selected.size === docs.length && docs.length > 0, onChange: (e) => toggleAll(e.target.checked), className: "rounded" }) }), _jsx("th", { className: "px-3 py-2 text-left", children: _jsx(SortCol, { field: "title", children: "Title" }) }), _jsx("th", { className: "px-3 py-2 text-left", children: _jsx(SortCol, { field: "status", children: "Status" }) }), _jsx("th", { className: "px-3 py-2 text-left", children: _jsx(SortCol, { field: "updatedAt", children: "Updated" }) }), _jsx("th", { className: "px-3 py-2 text-left text-xs font-medium", style: { color: 'var(--actuate-text-secondary, #6b7280)' }, children: "Actions" })] }) }), _jsx("tbody", { children: docs.map((doc) => (_jsxs("tr", { className: "transition-colors hover:opacity-95", style: { borderBottom: '1px solid var(--actuate-border, #e5e7eb)' }, children: [_jsx("td", { className: "px-3 py-2", children: _jsx("input", { type: "checkbox", checked: selected.has(String(doc.id)), onChange: () => toggleSelect(String(doc.id)), className: "rounded" }) }), _jsx("td", { className: "px-3 py-2", children: _jsx("button", { type: "button", onClick: () => onNavigate(`/${collectionSlug}/${doc.id}`), className: "font-medium text-left hover:underline", style: { color: 'var(--actuate-text, #111827)' }, children: doc.title || doc.name || `#${doc.id}` }) }), _jsx("td", { className: "px-3 py-2", children: _jsx("span", { className: "inline-block px-2 py-0.5 rounded-full text-xs font-medium", style: { background: statusColor(doc.status), color: statusText(doc.status) }, children: doc.status ?? 'DRAFT' }) }), _jsx("td", { className: "px-3 py-2", style: { color: 'var(--actuate-text-secondary, #6b7280)' }, children: formatDate(doc.updatedAt) }), _jsx("td", { className: "px-3 py-2", children: _jsx("button", { type: "button", onClick: () => onNavigate(`/${collectionSlug}/${doc.id}`), className: "p-1.5 rounded hover:opacity-75 transition-opacity", title: "Edit", children: _jsx(MoreHorizontal, { className: "w-4 h-4", style: { color: 'var(--actuate-text-secondary, #6b7280)' } }) }) })] }, doc.id))) })] }) })), totalPages > 1 && (_jsxs("div", { className: "flex items-center justify-between mt-4 text-sm", style: { color: 'var(--actuate-text-secondary, #6b7280)' }, children: [_jsxs("span", { children: ["Page ", page, " of ", totalPages] }), _jsxs("div", { className: "flex gap-2", children: [_jsxs("button", { disabled: page <= 1, onClick: () => setPage((p) => p - 1), className: "flex items-center gap-1 px-3 py-1.5 rounded-lg border disabled:opacity-40 transition-opacity", style: { borderColor: 'var(--actuate-border, #d1d5db)' }, children: [_jsx(ChevronLeft, { className: "w-4 h-4" }), " Previous"] }), _jsxs("button", { disabled: page >= totalPages, onClick: () => setPage((p) => p + 1), className: "flex items-center gap-1 px-3 py-1.5 rounded-lg border disabled:opacity-40 transition-opacity", style: { borderColor: 'var(--actuate-border, #d1d5db)' }, children: ["Next ", _jsx(ChevronRight, { className: "w-4 h-4" })] })] })] }))] }));
144
+ }, children: _jsxs("tr", { children: [_jsx("th", { className: "w-10 px-3 py-2 text-left", children: _jsx("input", { type: "checkbox", checked: selected.size === docs.length && docs.length > 0, onChange: (e) => toggleAll(e.target.checked), className: "rounded" }) }), _jsx("th", { className: "px-3 py-2 text-left", children: _jsx(SortCol, { field: "title", children: "Title" }) }), _jsx("th", { className: "px-3 py-2 text-left", children: _jsx(SortCol, { field: "status", children: "Status" }) }), _jsx("th", { className: "px-3 py-2 text-left", children: _jsx(SortCol, { field: "updatedAt", children: "Updated" }) }), _jsx("th", { className: "px-3 py-2 text-left text-xs font-medium", style: { color: 'var(--actuate-text-secondary, #6b7280)' }, children: "Actions" })] }) }), _jsx("tbody", { children: docs.map((doc) => (_jsxs("tr", { className: "transition-colors hover:opacity-95", style: { borderBottom: '1px solid var(--actuate-border, #e5e7eb)' }, children: [_jsx("td", { className: "px-3 py-2", children: _jsx("input", { type: "checkbox", checked: selected.has(String(doc.id)), onChange: () => toggleSelect(String(doc.id)), className: "rounded" }) }), _jsx("td", { className: "px-3 py-2", children: _jsx("button", { type: "button", onClick: () => onNavigate(`/${collectionSlug}/${doc.id}`), className: "text-left font-medium hover:underline", style: { color: 'var(--actuate-text, #111827)' }, children: doc.title || doc.name || `#${doc.id}` }) }), _jsx("td", { className: "px-3 py-2", children: _jsx("span", { className: "inline-block rounded-full px-2 py-0.5 text-xs font-medium", style: { background: statusColor(doc.status), color: statusText(doc.status) }, children: doc.status ?? 'DRAFT' }) }), _jsx("td", { className: "px-3 py-2", style: { color: 'var(--actuate-text-secondary, #6b7280)' }, children: formatDate(doc.updatedAt) }), _jsx("td", { className: "px-3 py-2", children: _jsx("button", { type: "button", onClick: () => onNavigate(`/${collectionSlug}/${doc.id}`), className: "rounded p-1.5 transition-opacity hover:opacity-75", title: "Edit", children: _jsx(MoreHorizontal, { className: "h-4 w-4", style: { color: 'var(--actuate-text-secondary, #6b7280)' } }) }) })] }, doc.id))) })] }) })), totalPages > 1 && (_jsxs("div", { className: "mt-4 flex items-center justify-between text-sm", style: { color: 'var(--actuate-text-secondary, #6b7280)' }, children: [_jsxs("span", { children: ["Page ", page, " of ", totalPages] }), _jsxs("div", { className: "flex gap-2", children: [_jsxs("button", { disabled: page <= 1, onClick: () => setPage((p) => p - 1), className: "flex items-center gap-1 rounded-lg border px-3 py-1.5 transition-opacity disabled:opacity-40", style: { borderColor: 'var(--actuate-border, #d1d5db)' }, children: [_jsx(ChevronLeft, { className: "h-4 w-4" }), " Previous"] }), _jsxs("button", { disabled: page >= totalPages, onClick: () => setPage((p) => p + 1), className: "flex items-center gap-1 rounded-lg border px-3 py-1.5 transition-opacity disabled:opacity-40", style: { borderColor: 'var(--actuate-border, #d1d5db)' }, children: ["Next ", _jsx(ChevronRight, { className: "h-4 w-4" })] })] })] }))] }));
145
145
  }
146
146
  //# sourceMappingURL=CollectionList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dashboard.d.ts","sourceRoot":"","sources":["../../src/views/Dashboard.tsx"],"names":[],"mappings":"AAoDA,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,GAAG,CAAA;IACZ,OAAO,CAAC,EAAE,GAAG,CAAA;IACb,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CACpC;AAoED,wBAAgB,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,cAAc,2CA6MxE"}
1
+ {"version":3,"file":"Dashboard.d.ts","sourceRoot":"","sources":["../../src/views/Dashboard.tsx"],"names":[],"mappings":"AAwEA,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,GAAG,CAAA;IACZ,OAAO,CAAC,EAAE,GAAG,CAAA;IACb,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CACpC;AA0HD,wBAAgB,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,cAAc,2CAinBxE"}