@questpie/admin 0.0.1

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 (203) hide show
  1. package/.turbo/turbo-build.log +108 -0
  2. package/CHANGELOG.md +10 -0
  3. package/README.md +556 -0
  4. package/STATUS.md +917 -0
  5. package/VALIDATION.md +602 -0
  6. package/components.json +24 -0
  7. package/dist/__tests__/setup.mjs +38 -0
  8. package/dist/__tests__/test-utils.mjs +45 -0
  9. package/dist/__tests__/vitest.d.mjs +3 -0
  10. package/dist/components/admin-app.mjs +69 -0
  11. package/dist/components/fields/array-field.mjs +190 -0
  12. package/dist/components/fields/checkbox-field.mjs +34 -0
  13. package/dist/components/fields/custom-field.mjs +32 -0
  14. package/dist/components/fields/date-field.mjs +41 -0
  15. package/dist/components/fields/datetime-field.mjs +42 -0
  16. package/dist/components/fields/email-field.mjs +37 -0
  17. package/dist/components/fields/embedded-collection.mjs +253 -0
  18. package/dist/components/fields/field-types.mjs +1 -0
  19. package/dist/components/fields/field-utils.mjs +10 -0
  20. package/dist/components/fields/field-wrapper.mjs +34 -0
  21. package/dist/components/fields/index.mjs +23 -0
  22. package/dist/components/fields/json-field.mjs +243 -0
  23. package/dist/components/fields/locale-badge.mjs +16 -0
  24. package/dist/components/fields/number-field.mjs +39 -0
  25. package/dist/components/fields/password-field.mjs +37 -0
  26. package/dist/components/fields/relation-field.mjs +104 -0
  27. package/dist/components/fields/relation-picker.mjs +229 -0
  28. package/dist/components/fields/relation-select.mjs +188 -0
  29. package/dist/components/fields/rich-text-editor/index.mjs +897 -0
  30. package/dist/components/fields/select-field.mjs +41 -0
  31. package/dist/components/fields/switch-field.mjs +34 -0
  32. package/dist/components/fields/text-field.mjs +38 -0
  33. package/dist/components/fields/textarea-field.mjs +38 -0
  34. package/dist/components/index.mjs +59 -0
  35. package/dist/components/primitives/checkbox-input.mjs +127 -0
  36. package/dist/components/primitives/date-input.mjs +303 -0
  37. package/dist/components/primitives/index.mjs +12 -0
  38. package/dist/components/primitives/number-input.mjs +104 -0
  39. package/dist/components/primitives/select-input.mjs +177 -0
  40. package/dist/components/primitives/tag-input.mjs +135 -0
  41. package/dist/components/primitives/text-input.mjs +39 -0
  42. package/dist/components/primitives/textarea-input.mjs +37 -0
  43. package/dist/components/primitives/toggle-input.mjs +31 -0
  44. package/dist/components/primitives/types.mjs +12 -0
  45. package/dist/components/ui/accordion.mjs +55 -0
  46. package/dist/components/ui/avatar.mjs +54 -0
  47. package/dist/components/ui/badge.mjs +34 -0
  48. package/dist/components/ui/button.mjs +48 -0
  49. package/dist/components/ui/card.mjs +58 -0
  50. package/dist/components/ui/checkbox.mjs +21 -0
  51. package/dist/components/ui/combobox.mjs +163 -0
  52. package/dist/components/ui/dialog.mjs +95 -0
  53. package/dist/components/ui/dropdown-menu.mjs +138 -0
  54. package/dist/components/ui/field.mjs +113 -0
  55. package/dist/components/ui/input-group.mjs +82 -0
  56. package/dist/components/ui/input.mjs +17 -0
  57. package/dist/components/ui/label.mjs +15 -0
  58. package/dist/components/ui/popover.mjs +56 -0
  59. package/dist/components/ui/scroll-area.mjs +38 -0
  60. package/dist/components/ui/select.mjs +100 -0
  61. package/dist/components/ui/separator.mjs +16 -0
  62. package/dist/components/ui/sheet.mjs +90 -0
  63. package/dist/components/ui/sidebar.mjs +387 -0
  64. package/dist/components/ui/skeleton.mjs +14 -0
  65. package/dist/components/ui/spinner.mjs +16 -0
  66. package/dist/components/ui/switch.mjs +22 -0
  67. package/dist/components/ui/table.mjs +68 -0
  68. package/dist/components/ui/tabs.mjs +48 -0
  69. package/dist/components/ui/textarea.mjs +15 -0
  70. package/dist/components/ui/tooltip.mjs +44 -0
  71. package/dist/config/component-registry.mjs +38 -0
  72. package/dist/config/index.mjs +129 -0
  73. package/dist/hooks/admin-provider.mjs +70 -0
  74. package/dist/hooks/index.mjs +7 -0
  75. package/dist/hooks/store.mjs +178 -0
  76. package/dist/hooks/use-auth.mjs +76 -0
  77. package/dist/hooks/use-collection-db.mjs +146 -0
  78. package/dist/hooks/use-collection.mjs +112 -0
  79. package/dist/hooks/use-global.mjs +46 -0
  80. package/dist/hooks/use-mobile.mjs +20 -0
  81. package/dist/lib/utils.mjs +10 -0
  82. package/dist/styles/index.css +336 -0
  83. package/dist/styles/index.mjs +1 -0
  84. package/dist/utils/index.mjs +9 -0
  85. package/dist/views/auth/auth-layout.mjs +52 -0
  86. package/dist/views/auth/forgot-password-form.mjs +148 -0
  87. package/dist/views/auth/index.mjs +6 -0
  88. package/dist/views/auth/login-form.mjs +156 -0
  89. package/dist/views/auth/reset-password-form.mjs +184 -0
  90. package/dist/views/collection/auto-form-fields.mjs +525 -0
  91. package/dist/views/collection/collection-form.mjs +91 -0
  92. package/dist/views/collection/collection-list.mjs +76 -0
  93. package/dist/views/collection/form-field.mjs +42 -0
  94. package/dist/views/collection/index.mjs +6 -0
  95. package/dist/views/common/index.mjs +4 -0
  96. package/dist/views/common/locale-switcher.mjs +39 -0
  97. package/dist/views/common/version-history.mjs +272 -0
  98. package/dist/views/index.mjs +9 -0
  99. package/dist/views/layout/admin-layout.mjs +40 -0
  100. package/dist/views/layout/admin-router.mjs +95 -0
  101. package/dist/views/layout/admin-sidebar.mjs +63 -0
  102. package/dist/views/layout/index.mjs +5 -0
  103. package/package.json +276 -0
  104. package/src/__tests__/setup.ts +44 -0
  105. package/src/__tests__/test-utils.tsx +49 -0
  106. package/src/__tests__/vitest.d.ts +9 -0
  107. package/src/components/admin-app.tsx +221 -0
  108. package/src/components/fields/array-field.tsx +237 -0
  109. package/src/components/fields/checkbox-field.tsx +47 -0
  110. package/src/components/fields/custom-field.tsx +50 -0
  111. package/src/components/fields/date-field.tsx +65 -0
  112. package/src/components/fields/datetime-field.tsx +67 -0
  113. package/src/components/fields/email-field.tsx +51 -0
  114. package/src/components/fields/embedded-collection.tsx +315 -0
  115. package/src/components/fields/field-types.ts +162 -0
  116. package/src/components/fields/field-utils.ts +6 -0
  117. package/src/components/fields/field-wrapper.tsx +52 -0
  118. package/src/components/fields/index.ts +66 -0
  119. package/src/components/fields/json-field.tsx +440 -0
  120. package/src/components/fields/locale-badge.tsx +15 -0
  121. package/src/components/fields/number-field.tsx +57 -0
  122. package/src/components/fields/password-field.tsx +51 -0
  123. package/src/components/fields/relation-field.tsx +243 -0
  124. package/src/components/fields/relation-picker.tsx +402 -0
  125. package/src/components/fields/relation-select.tsx +327 -0
  126. package/src/components/fields/rich-text-editor/index.tsx +1337 -0
  127. package/src/components/fields/select-field.tsx +61 -0
  128. package/src/components/fields/switch-field.tsx +47 -0
  129. package/src/components/fields/text-field.tsx +55 -0
  130. package/src/components/fields/textarea-field.tsx +55 -0
  131. package/src/components/index.ts +40 -0
  132. package/src/components/primitives/checkbox-input.tsx +193 -0
  133. package/src/components/primitives/date-input.tsx +401 -0
  134. package/src/components/primitives/index.ts +24 -0
  135. package/src/components/primitives/number-input.tsx +132 -0
  136. package/src/components/primitives/select-input.tsx +296 -0
  137. package/src/components/primitives/tag-input.tsx +200 -0
  138. package/src/components/primitives/text-input.tsx +49 -0
  139. package/src/components/primitives/textarea-input.tsx +46 -0
  140. package/src/components/primitives/toggle-input.tsx +36 -0
  141. package/src/components/primitives/types.ts +235 -0
  142. package/src/components/ui/accordion.tsx +72 -0
  143. package/src/components/ui/avatar.tsx +106 -0
  144. package/src/components/ui/badge.tsx +48 -0
  145. package/src/components/ui/button.tsx +53 -0
  146. package/src/components/ui/card.tsx +94 -0
  147. package/src/components/ui/checkbox.tsx +27 -0
  148. package/src/components/ui/combobox.tsx +290 -0
  149. package/src/components/ui/dialog.tsx +151 -0
  150. package/src/components/ui/dropdown-menu.tsx +254 -0
  151. package/src/components/ui/field.tsx +227 -0
  152. package/src/components/ui/input-group.tsx +149 -0
  153. package/src/components/ui/input.tsx +20 -0
  154. package/src/components/ui/label.tsx +18 -0
  155. package/src/components/ui/popover.tsx +88 -0
  156. package/src/components/ui/scroll-area.tsx +53 -0
  157. package/src/components/ui/select.tsx +192 -0
  158. package/src/components/ui/separator.tsx +23 -0
  159. package/src/components/ui/sheet.tsx +127 -0
  160. package/src/components/ui/sidebar.tsx +723 -0
  161. package/src/components/ui/skeleton.tsx +13 -0
  162. package/src/components/ui/spinner.tsx +10 -0
  163. package/src/components/ui/switch.tsx +32 -0
  164. package/src/components/ui/table.tsx +99 -0
  165. package/src/components/ui/tabs.tsx +82 -0
  166. package/src/components/ui/textarea.tsx +18 -0
  167. package/src/components/ui/tooltip.tsx +70 -0
  168. package/src/config/component-registry.ts +190 -0
  169. package/src/config/index.ts +1099 -0
  170. package/src/hooks/README.md +269 -0
  171. package/src/hooks/admin-provider.tsx +110 -0
  172. package/src/hooks/index.ts +41 -0
  173. package/src/hooks/store.ts +248 -0
  174. package/src/hooks/use-auth.ts +168 -0
  175. package/src/hooks/use-collection-db.ts +209 -0
  176. package/src/hooks/use-collection.ts +156 -0
  177. package/src/hooks/use-global.ts +69 -0
  178. package/src/hooks/use-mobile.ts +21 -0
  179. package/src/lib/utils.ts +6 -0
  180. package/src/styles/index.css +340 -0
  181. package/src/utils/index.ts +6 -0
  182. package/src/views/auth/auth-layout.tsx +77 -0
  183. package/src/views/auth/forgot-password-form.tsx +192 -0
  184. package/src/views/auth/index.ts +21 -0
  185. package/src/views/auth/login-form.tsx +229 -0
  186. package/src/views/auth/reset-password-form.tsx +232 -0
  187. package/src/views/collection/auto-form-fields.tsx +982 -0
  188. package/src/views/collection/collection-form.tsx +186 -0
  189. package/src/views/collection/collection-list.tsx +223 -0
  190. package/src/views/collection/form-field.tsx +52 -0
  191. package/src/views/collection/index.ts +15 -0
  192. package/src/views/common/index.ts +8 -0
  193. package/src/views/common/locale-switcher.tsx +45 -0
  194. package/src/views/common/version-history.tsx +406 -0
  195. package/src/views/index.ts +25 -0
  196. package/src/views/layout/admin-layout.tsx +117 -0
  197. package/src/views/layout/admin-router.tsx +206 -0
  198. package/src/views/layout/admin-sidebar.tsx +185 -0
  199. package/src/views/layout/index.ts +12 -0
  200. package/tsconfig.json +13 -0
  201. package/tsconfig.tsbuildinfo +1 -0
  202. package/tsdown.config.ts +13 -0
  203. package/vitest.config.ts +29 -0
@@ -0,0 +1,108 @@
1
+
2
+ $ tsdown
3
+ ℹ tsdown v0.18.4 powered by rolldown v1.0.0-beta.57
4
+ ℹ config file: /Users/drepkovsky/questpie/repos/questpie-cms/packages/admin/tsdown.config.ts
5
+ (node:61237) ExperimentalWarning: Type Stripping is an experimental feature and might change at any time
6
+ (Use `node --trace-warnings ...` to show where the warning was created)
7
+ ℹ entry: src/__tests__/setup.ts, src/__tests__/test-utils.tsx, src/__tests__/vitest.d.ts, src/components/admin-app.tsx, src/components/index.ts, src/config/component-registry.ts, src/config/index.ts, src/hooks/admin-provider.tsx, src/hooks/index.ts, src/hooks/store.ts, src/hooks/use-auth.ts, src/hooks/use-collection-db.ts, src/hooks/use-collection.ts, src/hooks/use-global.ts, src/hooks/use-mobile.ts, src/lib/utils.ts, src/styles/index.css, src/utils/index.ts, src/views/index.ts, src/components/primitives/checkbox-input.tsx, src/components/primitives/date-input.tsx, src/components/primitives/index.ts, src/components/primitives/number-input.tsx, src/components/primitives/select-input.tsx, src/components/primitives/tag-input.tsx, src/components/primitives/text-input.tsx, src/components/primitives/textarea-input.tsx, src/components/primitives/toggle-input.tsx, src/components/primitives/types.ts, src/components/fields/array-field.tsx, src/components/fields/checkbox-field.tsx, src/components/fields/custom-field.tsx, src/components/fields/date-field.tsx, src/components/fields/datetime-field.tsx, src/components/fields/email-field.tsx, src/components/fields/embedded-collection.tsx, src/components/fields/field-types.ts, src/components/fields/field-utils.ts, src/components/fields/field-wrapper.tsx, src/components/fields/index.ts, src/components/fields/json-field.tsx, src/components/fields/locale-badge.tsx, src/components/fields/number-field.tsx, src/components/fields/password-field.tsx, src/components/fields/relation-field.tsx, src/components/fields/relation-picker.tsx, src/components/fields/relation-select.tsx, src/components/fields/select-field.tsx, src/components/fields/switch-field.tsx, src/components/fields/text-field.tsx, src/components/fields/textarea-field.tsx, src/views/collection/auto-form-fields.tsx, src/views/collection/collection-form.tsx, src/views/collection/collection-list.tsx, src/views/collection/form-field.tsx, src/views/collection/index.ts, src/views/auth/auth-layout.tsx, src/views/auth/forgot-password-form.tsx, src/views/auth/index.ts, src/views/auth/login-form.tsx, src/views/auth/reset-password-form.tsx, src/views/common/index.ts, src/views/common/locale-switcher.tsx, src/views/common/version-history.tsx, src/components/ui/accordion.tsx, src/components/ui/avatar.tsx, src/components/ui/badge.tsx, src/components/ui/button.tsx, src/components/ui/card.tsx, src/components/ui/checkbox.tsx, src/components/ui/combobox.tsx, src/components/ui/dialog.tsx, src/components/ui/dropdown-menu.tsx, src/components/ui/field.tsx, src/components/ui/input-group.tsx, src/components/ui/input.tsx, src/components/ui/label.tsx, src/components/ui/popover.tsx, src/components/ui/scroll-area.tsx, src/components/ui/select.tsx, src/components/ui/separator.tsx, src/components/ui/sheet.tsx, src/components/ui/sidebar.tsx, src/components/ui/skeleton.tsx, src/components/ui/spinner.tsx, src/components/ui/switch.tsx, src/components/ui/table.tsx, src/components/ui/tabs.tsx, src/components/ui/textarea.tsx, src/components/ui/tooltip.tsx, src/views/layout/admin-layout.tsx, src/views/layout/admin-router.tsx, src/views/layout/admin-sidebar.tsx, src/views/layout/index.ts, src/components/fields/rich-text-editor/index.tsx
8
+ ℹ tsconfig: tsconfig.json
9
+ ℹ Build start
10
+ ℹ Cleaning 112 files
11
+ ℹ dist/components/fields/rich-text-editor/index.mjs 32.38 kB │ gzip: 6.23 kB
12
+ ℹ dist/views/collection/auto-form-fields.mjs 18.78 kB │ gzip: 4.56 kB
13
+ ℹ dist/components/ui/sidebar.mjs 17.89 kB │ gzip: 4.09 kB
14
+ ℹ dist/components/primitives/date-input.mjs 11.73 kB │ gzip: 2.15 kB
15
+ ℹ dist/views/common/version-history.mjs 10.21 kB │ gzip: 2.58 kB
16
+ ℹ dist/components/fields/embedded-collection.mjs  9.04 kB │ gzip: 2.29 kB
17
+ ℹ dist/components/fields/relation-picker.mjs  8.36 kB │ gzip: 2.41 kB
18
+ ℹ dist/components/ui/combobox.mjs  7.92 kB │ gzip: 2.10 kB
19
+ ℹ dist/components/ui/dropdown-menu.mjs  7.41 kB │ gzip: 1.52 kB
20
+ ℹ dist/components/fields/json-field.mjs  7.19 kB │ gzip: 2.27 kB
21
+ ℹ dist/components/fields/relation-select.mjs  6.70 kB │ gzip: 1.98 kB
22
+ ℹ dist/components/fields/array-field.mjs  6.24 kB │ gzip: 1.86 kB
23
+ ℹ dist/components/primitives/select-input.mjs  6.22 kB │ gzip: 1.99 kB
24
+ ℹ dist/views/auth/reset-password-form.mjs  6.08 kB │ gzip: 1.85 kB
25
+ ℹ dist/components/ui/select.mjs  5.58 kB │ gzip: 1.61 kB
26
+ ℹ dist/views/auth/login-form.mjs  5.19 kB │ gzip: 1.65 kB
27
+ ℹ dist/components/ui/field.mjs  5.17 kB │ gzip: 1.49 kB
28
+ ℹ dist/views/auth/forgot-password-form.mjs  4.78 kB │ gzip: 1.66 kB
29
+ ℹ dist/components/primitives/tag-input.mjs  4.71 kB │ gzip: 1.76 kB
30
+ ℹ dist/components/ui/input-group.mjs  4.59 kB │ gzip: 1.40 kB
31
+ ℹ dist/hooks/store.mjs  4.45 kB │ gzip: 1.40 kB
32
+ ℹ dist/components/ui/sheet.mjs  3.98 kB │ gzip: 1.08 kB
33
+ ℹ dist/components/primitives/checkbox-input.mjs  3.80 kB │ gzip: 1.10 kB
34
+ ℹ dist/hooks/use-collection-db.mjs  3.80 kB │ gzip: 1.15 kB
35
+ ℹ dist/views/collection/collection-list.mjs  3.60 kB │ gzip: 1.33 kB
36
+ ℹ dist/components/ui/dialog.mjs  3.50 kB │ gzip: 1.02 kB
37
+ ℹ dist/views/layout/admin-router.mjs  3.42 kB │ gzip: 1.16 kB
38
+ ℹ dist/components/ui/tabs.mjs  3.22 kB │ gzip: 1.05 kB
39
+ ℹ dist/hooks/use-collection.mjs  2.98 kB │ gzip: 0.63 kB
40
+ ℹ dist/views/collection/collection-form.mjs  2.94 kB │ gzip: 1.19 kB
41
+ ℹ dist/components/ui/button.mjs  2.90 kB │ gzip: 0.98 kB
42
+ ℹ dist/components/fields/relation-field.mjs  2.75 kB │ gzip: 0.98 kB
43
+ ℹ dist/config/index.mjs  2.75 kB │ gzip: 0.89 kB
44
+ ℹ dist/views/layout/admin-sidebar.mjs  2.73 kB │ gzip: 1.00 kB
45
+ ℹ dist/components/ui/avatar.mjs  2.68 kB │ gzip: 0.79 kB
46
+ ℹ dist/components/primitives/number-input.mjs  2.64 kB │ gzip: 0.98 kB
47
+ ℹ dist/components/ui/accordion.mjs  2.44 kB │ gzip: 0.85 kB
48
+ ℹ dist/hooks/use-auth.mjs  2.34 kB │ gzip: 0.94 kB
49
+ ℹ dist/components/ui/card.mjs  2.26 kB │ gzip: 0.69 kB
50
+ ℹ dist/hooks/admin-provider.mjs  2.16 kB │ gzip: 0.84 kB
51
+ ℹ dist/components/ui/tooltip.mjs  2.16 kB │ gzip: 0.78 kB
52
+ ℹ dist/components/admin-app.mjs  2.15 kB │ gzip: 0.93 kB
53
+ ℹ dist/components/ui/popover.mjs  2.10 kB │ gzip: 0.71 kB
54
+ ℹ dist/components/ui/table.mjs  2.09 kB │ gzip: 0.63 kB
55
+ ℹ dist/views/collection/form-field.mjs  1.93 kB │ gzip: 0.52 kB
56
+ ℹ dist/components/ui/badge.mjs  1.77 kB │ gzip: 0.78 kB
57
+ ℹ dist/components/ui/switch.mjs  1.70 kB │ gzip: 0.69 kB
58
+ ℹ dist/views/auth/auth-layout.mjs  1.60 kB │ gzip: 0.69 kB
59
+ ℹ dist/components/ui/scroll-area.mjs  1.52 kB │ gzip: 0.60 kB
60
+ ℹ dist/views/layout/admin-layout.mjs  1.38 kB │ gzip: 0.54 kB
61
+ ℹ dist/views/common/locale-switcher.mjs  1.37 kB │ gzip: 0.62 kB
62
+ ℹ dist/components/ui/checkbox.mjs  1.36 kB │ gzip: 0.63 kB
63
+ ℹ dist/components/fields/index.mjs  1.33 kB │ gzip: 0.38 kB
64
+ ℹ dist/components/fields/field-wrapper.mjs  1.24 kB │ gzip: 0.53 kB
65
+ ℹ dist/components/fields/datetime-field.mjs  1.21 kB │ gzip: 0.55 kB
66
+ ℹ dist/hooks/use-global.mjs  1.18 kB │ gzip: 0.49 kB
67
+ ℹ dist/components/fields/date-field.mjs  1.16 kB │ gzip: 0.54 kB
68
+ ℹ dist/components/fields/select-field.mjs  1.16 kB │ gzip: 0.54 kB
69
+ ℹ dist/components/fields/textarea-field.mjs  1.05 kB │ gzip: 0.50 kB
70
+ ℹ dist/components/fields/number-field.mjs  1.04 kB │ gzip: 0.50 kB
71
+ ℹ dist/components/fields/text-field.mjs  1.04 kB │ gzip: 0.50 kB
72
+ ℹ dist/components/fields/password-field.mjs  1.03 kB │ gzip: 0.50 kB
73
+ ℹ dist/__tests__/test-utils.mjs  1.02 kB │ gzip: 0.50 kB
74
+ ℹ dist/components/ui/input.mjs  1.01 kB │ gzip: 0.52 kB
75
+ ℹ dist/components/fields/email-field.mjs  1.00 kB │ gzip: 0.49 kB
76
+ ℹ dist/components/fields/checkbox-field.mjs  0.95 kB │ gzip: 0.45 kB
77
+ ℹ dist/components/fields/switch-field.mjs  0.93 kB │ gzip: 0.46 kB
78
+ ℹ dist/__tests__/setup.mjs  0.90 kB │ gzip: 0.43 kB
79
+ ℹ dist/components/index.mjs  0.89 kB │ gzip: 0.24 kB
80
+ ℹ dist/components/primitives/text-input.mjs  0.89 kB │ gzip: 0.50 kB
81
+ ℹ dist/components/ui/textarea.mjs  0.84 kB │ gzip: 0.46 kB
82
+ ℹ dist/components/fields/custom-field.mjs  0.83 kB │ gzip: 0.40 kB
83
+ ℹ dist/hooks/index.mjs  0.83 kB │ gzip: 0.24 kB
84
+ ℹ dist/components/primitives/textarea-input.mjs  0.81 kB │ gzip: 0.45 kB
85
+ ℹ dist/config/component-registry.mjs  0.78 kB │ gzip: 0.34 kB
86
+ ℹ dist/components/primitives/toggle-input.mjs  0.64 kB │ gzip: 0.38 kB
87
+ ℹ dist/components/primitives/index.mjs  0.61 kB │ gzip: 0.21 kB
88
+ ℹ dist/components/ui/separator.mjs  0.60 kB │ gzip: 0.33 kB
89
+ ℹ dist/hooks/use-mobile.mjs  0.60 kB │ gzip: 0.34 kB
90
+ ℹ dist/components/ui/label.mjs  0.54 kB │ gzip: 0.34 kB
91
+ ℹ dist/components/ui/spinner.mjs  0.41 kB │ gzip: 0.28 kB
92
+ ℹ dist/components/fields/locale-badge.mjs  0.38 kB │ gzip: 0.27 kB
93
+ ℹ dist/components/ui/skeleton.mjs  0.35 kB │ gzip: 0.25 kB
94
+ ℹ dist/components/primitives/types.mjs  0.34 kB │ gzip: 0.21 kB
95
+ ℹ dist/views/auth/index.mjs  0.28 kB │ gzip: 0.14 kB
96
+ ℹ dist/views/collection/index.mjs  0.27 kB │ gzip: 0.13 kB
97
+ ℹ dist/components/fields/field-utils.mjs  0.25 kB │ gzip: 0.18 kB
98
+ ℹ dist/views/layout/index.mjs  0.19 kB │ gzip: 0.10 kB
99
+ ℹ dist/lib/utils.mjs  0.18 kB │ gzip: 0.15 kB
100
+ ℹ dist/views/common/index.mjs  0.15 kB │ gzip: 0.10 kB
101
+ ℹ dist/utils/index.mjs  0.14 kB │ gzip: 0.13 kB
102
+ ℹ dist/views/index.mjs  0.12 kB │ gzip: 0.08 kB
103
+ ℹ dist/__tests__/vitest.d.mjs  0.03 kB │ gzip: 0.05 kB
104
+ ℹ dist/components/fields/field-types.mjs  0.01 kB │ gzip: 0.03 kB
105
+ ℹ dist/styles/index.mjs  0.01 kB │ gzip: 0.03 kB
106
+ ℹ dist/styles/index.css  8.31 kB │ gzip: 1.92 kB
107
+ ℹ 96 files, total: 306.19 kB
108
+ ✔ Build complete in 128ms
package/CHANGELOG.md ADDED
@@ -0,0 +1,10 @@
1
+ # @questpie/admin
2
+
3
+ ## 0.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: initial release
8
+ - Updated dependencies
9
+ - @questpie/tanstack-query@0.0.1
10
+ - questpie@0.0.1
package/README.md ADDED
@@ -0,0 +1,556 @@
1
+ # @questpie/admin
2
+
3
+ **Config-driven, batteries-included admin UI for QUESTPIE CMS**
4
+
5
+ A fully-featured admin interface that auto-generates from your CMS schema with extensive customization options.
6
+
7
+ ## Features
8
+
9
+ - **Zero Config** - Works out of the box with just a CMS client
10
+ - **Config-Driven** - Customize everything via `defineAdminConfig`
11
+ - **Type-Safe** - Full TypeScript inference from your CMS schema
12
+ - **Tailwind v4** - Built with Tailwind CSS v4 + shadcn/ui components
13
+ - **Rich Text** - Tiptap editor with slash commands, tables, images
14
+ - **Relations** - Inline, picker, and create modes for related content
15
+ - **Layouts** - Sections, tabs, columns, grids, sidebars
16
+ - **Realtime** - SSE-powered live updates
17
+ - **Versioning** - Built-in version history and audit logging
18
+ - **i18n Ready** - Localization support for content
19
+
20
+ ## Installation
21
+
22
+ ```bash
23
+ bun add @questpie/admin @questpie/cms @questpie/tanstack-query
24
+ bun add @tanstack/react-query @tanstack/react-table
25
+ ```
26
+
27
+ ## Quick Start
28
+
29
+ ### Minimal Setup (One Component!)
30
+
31
+ ```tsx
32
+ import { AdminApp } from "@questpie/admin";
33
+ import { cmsClient } from "./lib/cms-client";
34
+ import {
35
+ Link,
36
+ useLocation,
37
+ useNavigate,
38
+ useParams,
39
+ } from "@tanstack/react-router";
40
+
41
+ function App() {
42
+ const location = useLocation();
43
+ const navigate = useNavigate();
44
+ const params = useParams();
45
+ const segments = params._.split("/").filter(Boolean);
46
+
47
+ return (
48
+ <AdminApp
49
+ client={cmsClient} // That's it! Everything else is auto-generated
50
+ router={{
51
+ LinkComponent: Link,
52
+ currentPath: location.pathname,
53
+ segments,
54
+ navigate,
55
+ }}
56
+ />
57
+ );
58
+ }
59
+ ```
60
+
61
+ ### With Custom Config
62
+
63
+ ```tsx
64
+ import { AdminApp } from '@questpie/admin'
65
+ import { cmsClient } from './lib/cms-client'
66
+ import { adminConfig } from './configs/admin'
67
+
68
+ function App() {
69
+ return (
70
+ <AdminApp
71
+ client={cmsClient}
72
+ config={adminConfig} // Optional customization
73
+ router={{ ... }}
74
+ />
75
+ )
76
+ }
77
+ ```
78
+
79
+ ## 🎨 Configuration
80
+
81
+ Most UI is auto-generated from CMS collections. Field types and relation targets must be explicit in admin config.
82
+
83
+ ```typescript
84
+ import { defineAdminConfig } from "@questpie/admin/config";
85
+ import type { AppCMS } from "./server/cms";
86
+
87
+ export const adminConfig = defineAdminConfig<AppCMS>()({
88
+ app: {
89
+ brand: { name: "My Admin" },
90
+ },
91
+ collections: {
92
+ posts: {
93
+ label: "Blog Posts", // Override label
94
+
95
+ // List view
96
+ list: {
97
+ defaultColumns: ["title", "author", "publishedAt"],
98
+ defaultSort: { field: "publishedAt", direction: "desc" },
99
+ with: ["author"], // Auto-load relations
100
+ },
101
+
102
+ // Edit form
103
+ edit: {
104
+ // Optional: explicit order (recommended)
105
+ fields: ["title", "content", "status", "publishedAt"],
106
+
107
+ // Organize into sections
108
+ sections: [
109
+ {
110
+ title: "Content",
111
+ fields: ["title", "content"],
112
+ },
113
+ {
114
+ title: "Publishing",
115
+ fields: ["status", "publishedAt"],
116
+ },
117
+ ],
118
+ },
119
+
120
+ // Field-level overrides
121
+ fields: {
122
+ title: {
123
+ label: "Post Title",
124
+ required: true,
125
+ },
126
+ content: {
127
+ type: "richText", // Custom field type
128
+ placeholder: "Write your post...",
129
+ },
130
+ status: {
131
+ type: "select",
132
+ options: [
133
+ { label: "Draft", value: "draft" },
134
+ { label: "Published", value: "published" },
135
+ ],
136
+ },
137
+ publishedAt: {
138
+ label: "Publish Date",
139
+ type: "datetime",
140
+ // Conditional: readonly unless draft
141
+ readOnly: (values) => values.status !== "draft",
142
+ },
143
+ },
144
+ },
145
+ },
146
+ });
147
+ ```
148
+
149
+ ## ✨ What's Automatic
150
+
151
+ ### From CMS Schema
152
+
153
+ - 🚫 Schema introspection (field types, required, defaults, relations) - not planned (explicit config)
154
+
155
+ ### From Admin Config
156
+
157
+ - ✅ **Sidebar navigation** - auto-generated from collections
158
+ - ✅ **Routing** - `/admin/:collection/:id` patterns
159
+ - ✅ **List views** - columns, sorting, filtering
160
+ - ✅ **Form views** - create/edit with validation
161
+ - ✅ **Realtime sync** - SSE enabled by default
162
+ - ✅ **Relations loading** - auto-load with `with` config
163
+
164
+ ## 🎯 Features
165
+
166
+ ### Conditional Fields
167
+
168
+ ```typescript
169
+ fields: {
170
+ status: {
171
+ type: "select",
172
+ options: [...]
173
+ },
174
+
175
+ // Show only when status is "cancelled"
176
+ cancellationReason: {
177
+ type: "textarea",
178
+ visible: (values) => values.status === "cancelled",
179
+ required: (values) => values.status === "cancelled"
180
+ },
181
+
182
+ // Readonly unless draft
183
+ publishedAt: {
184
+ readOnly: (values) => values.status !== "draft"
185
+ },
186
+
187
+ // Dynamic options based on other fields
188
+ category: {
189
+ type: "select",
190
+ options: (values) => {
191
+ if (values.type === "tech") {
192
+ return [{ label: "Frontend", value: "frontend" }, ...]
193
+ }
194
+ return [{ label: "Design", value: "design" }, ...]
195
+ }
196
+ }
197
+ }
198
+ ```
199
+
200
+ ### Sections & Organization
201
+
202
+ ```typescript
203
+ edit: {
204
+ sections: [
205
+ {
206
+ title: "Basic Info",
207
+ description: "Main appointment details",
208
+ fields: ["customer", "barber", "service", "scheduledAt"],
209
+ collapsible: true,
210
+ defaultOpen: true,
211
+ },
212
+ {
213
+ title: "Status",
214
+ fields: ["status", "notes"],
215
+ },
216
+ ];
217
+ }
218
+ ```
219
+
220
+ ### Advanced Layouts
221
+
222
+ Columns, grids, and inline layouts are supported:
223
+
224
+ ```typescript
225
+ edit: {
226
+ sections: [
227
+ {
228
+ title: "Basic",
229
+ layout: "columns",
230
+ columns: 2,
231
+ fields: ["title", "slug", "author", "category"],
232
+ },
233
+ {
234
+ title: "Pricing",
235
+ layout: "grid",
236
+ grid: { columns: 4, gap: 4 },
237
+ fields: [
238
+ { field: "price", span: 1 },
239
+ { field: "currency", span: 1 },
240
+ { field: "stock", span: 2 },
241
+ ],
242
+ },
243
+ {
244
+ title: "Dates",
245
+ layout: "inline",
246
+ fields: ["startDate", "endDate"],
247
+ },
248
+ ];
249
+ }
250
+ ```
251
+
252
+ Sidebar layouts:
253
+
254
+ ```typescript
255
+ edit: {
256
+ layout: "with-sidebar",
257
+ sections: [
258
+ { title: "Content", fields: ["title", "content"] }
259
+ ],
260
+ sidebar: {
261
+ position: "right",
262
+ width: "320px",
263
+ fields: ["status", "publishedAt"]
264
+ }
265
+ }
266
+ ```
267
+
268
+ ### Tabs
269
+
270
+ ```typescript
271
+ edit: {
272
+ tabs: [
273
+ {
274
+ id: "content",
275
+ label: "Content",
276
+ fields: ["title", "content"],
277
+ },
278
+ {
279
+ id: "meta",
280
+ label: "Metadata",
281
+ fields: ["seo", "tags", "category"],
282
+ },
283
+ ];
284
+ }
285
+ ```
286
+
287
+ ### Localization (i18n)
288
+
289
+ ```typescript
290
+ app: {
291
+ locales: {
292
+ default: "en",
293
+ available: ["en", "sk", "de"]
294
+ }
295
+ },
296
+ collections: {
297
+ posts: {
298
+ fields: {
299
+ title: { type: "text", localized: true },
300
+ content: { type: "richText", localized: true }
301
+ }
302
+ }
303
+ }
304
+ ```
305
+
306
+ ### Relation Fields
307
+
308
+ Automatic relation field support with create/edit capabilities:
309
+
310
+ Display label uses the target record’s `_title`.
311
+
312
+ ```typescript
313
+ fields: {
314
+ // Single relation (one-to-one) - explicit config
315
+ barberId: {
316
+ label: "Barber",
317
+ relation: {
318
+ targetCollection: "barbers", // Required target collection
319
+ mode: "inline" // or "picker" or "create"
320
+ }
321
+ },
322
+
323
+ // Multiple relations (one-to-many, many-to-many)
324
+ tags: {
325
+ relation: {
326
+ targetCollection: "tags",
327
+ mode: "picker", // Enables multi-select
328
+ orderable: true, // Enable drag-and-drop reordering
329
+
330
+ // Filter options based on current form values
331
+ filter: (values) => ({
332
+ where: { type: { eq: values.postType } }
333
+ })
334
+ }
335
+ }
336
+ }
337
+ ```
338
+
339
+ **Features:**
340
+
341
+ - ✅ **Plus button** - Create new related item (opens side sheet)
342
+ - ✅ **Edit button** - Modify selected item (opens side sheet)
343
+ - ✅ **Auto-complete** - Search and filter options
344
+ - ✅ **Drag-and-drop** - Reorder multiple relations (when `orderable: true`)
345
+ - ✅ **Conditional filtering** - Filter options based on form state
346
+
347
+ ### Rich Text Editor (Tiptap)
348
+
349
+ Built-in rich text editing with toolbar controls:
350
+
351
+ ```typescript
352
+ fields: {
353
+ content: {
354
+ type: "richText",
355
+ placeholder: "Start writing...",
356
+ richText: {
357
+ outputFormat: "html", // "json" (default) or "markdown"
358
+ enableImages: true,
359
+ showCharacterCount: true,
360
+ maxCharacters: 10000,
361
+ features: {
362
+ slashCommands: true,
363
+ tableControls: true,
364
+ bubbleMenu: true
365
+ },
366
+ onImageUpload: async (file) => {
367
+ // Return a public URL after upload
368
+ return await uploadImage(file)
369
+ }
370
+ }
371
+ }
372
+ }
373
+ ```
374
+
375
+ Note: Markdown output requires a Markdown extension in the `extensions` array.
376
+ Slash commands, table tools, and the bubble menu can be toggled via `features`.
377
+
378
+ ### Embedded Collections
379
+
380
+ ```typescript
381
+ fields: {
382
+ gallery: {
383
+ embedded: {
384
+ collection: "post_images",
385
+ orderable: true, // Drag-and-drop reordering
386
+ mode: "inline", // or "modal" or "drawer"
387
+ rowLabel: (item) => item.caption || item.id
388
+ }
389
+ }
390
+ }
391
+ ```
392
+
393
+ ### Array Fields
394
+
395
+ ```typescript
396
+ fields: {
397
+ tags: {
398
+ type: "array",
399
+ label: "Tags",
400
+ array: {
401
+ itemType: "text",
402
+ orderable: true,
403
+ maxItems: 10
404
+ }
405
+ },
406
+
407
+ ratings: {
408
+ type: "array",
409
+ label: "Ratings",
410
+ array: {
411
+ itemType: "number",
412
+ minItems: 1
413
+ }
414
+ }
415
+ }
416
+ ```
417
+
418
+ ### Version History & Audit Logging
419
+
420
+ Track all changes to collection items with built-in versioning:
421
+
422
+ ```typescript
423
+ collections: {
424
+ posts: {
425
+ // Enable versioning for this collection
426
+ versioned: true,
427
+
428
+ // Configure audit logging
429
+ auditLog: {
430
+ fields: ["title", "content", "status"], // Fields to track
431
+ trackUser: true, // Track who made changes
432
+ retentionDays: 365 // Keep logs for 1 year
433
+ },
434
+
435
+ edit: {
436
+ // Show version history in edit form
437
+ showVersionHistory: true
438
+ }
439
+ }
440
+ }
441
+ ```
442
+
443
+ **Features:**
444
+
445
+ - ✅ **Version tracking** - Every change creates a new version
446
+ - ✅ **Change history** - See what changed, when, and by whom
447
+ - ✅ **Diff view** - Compare old vs new values
448
+ - ✅ **Restore versions** - Roll back to previous versions
449
+ - ✅ **User tracking** - Know who made each change
450
+ - ✅ **Configurable retention** - Control how long to keep history
451
+
452
+ ### Tree Views (Coming Soon)
453
+
454
+ ```typescript
455
+ list: {
456
+ view: "tree", // Enable tree view
457
+ tree: {
458
+ parentField: "parentId",
459
+ labelField: "name",
460
+ collapsible: true
461
+ }
462
+ }
463
+ ```
464
+
465
+ ## 🧩 Component Registry
466
+
467
+ Override default field components:
468
+
469
+ ```typescript
470
+ import { RichTextEditor } from './components/RichTextEditor'
471
+ import { ImagePicker } from './components/ImagePicker'
472
+
473
+ <AdminApp
474
+ client={cmsClient}
475
+ config={adminConfig}
476
+ registry={{
477
+ fields: {
478
+ richText: RichTextEditor,
479
+ image: ImagePicker
480
+ }
481
+ }}
482
+ router={{ ... }}
483
+ />
484
+ ```
485
+
486
+ ## 📦 Package Exports
487
+
488
+ ```typescript
489
+ // Main component
490
+ import { AdminApp } from "@questpie/admin";
491
+
492
+ // Config helper
493
+ import { defineAdminConfig } from "@questpie/admin/config";
494
+
495
+ // Hooks
496
+ import { AdminProvider, useCollection } from "@questpie/admin/hooks";
497
+
498
+ // Components
499
+ import {
500
+ CollectionList,
501
+ CollectionForm,
502
+ RelationSelect,
503
+ RelationPicker,
504
+ VersionHistory,
505
+ } from "@questpie/admin/components";
506
+
507
+ // Utilities
508
+ import { cn } from "@questpie/admin/utils";
509
+
510
+ // Styles
511
+ import "@questpie/admin/styles";
512
+ ```
513
+
514
+ ## 🎨 Styling
515
+
516
+ Complete shadcn/ui setup with Tailwind CSS v4:
517
+
518
+ - 53+ pre-built components (base-lyra style)
519
+ - Light/dark theme support
520
+ - oklch color space
521
+ - Customizable via Tailwind tokens
522
+
523
+ ## 📚 Examples
524
+
525
+ See [tanstack-barbershop](../../examples/tanstack-barbershop) for complete example.
526
+
527
+ ## 🚀 Roadmap
528
+
529
+ - [ ] Schema introspection (auto field type inference) - not planned
530
+ - [x] Conditional visibility/readonly/disabled
531
+ - [x] Sections organization
532
+ - [x] Advanced layouts (columns, grid, inline, sidebar)
533
+ - [x] Component registry
534
+ - [x] Relation fields (RelationSelect, RelationPicker)
535
+ - [x] Version history & audit logging
536
+ - [x] Embedded collections (inline, modal, drawer)
537
+ - [x] Array fields
538
+ - [x] Tabs layout
539
+ - [ ] Tree views (hierarchical data)
540
+ - [ ] Bulk actions
541
+ - [ ] Saved views/filters
542
+ - [ ] Custom dashboard
543
+ - [ ] Permissions UI
544
+
545
+ ## Related Packages
546
+
547
+ - [`@questpie/cms`](../cms) - Core CMS engine
548
+ - [`@questpie/tanstack-query`](../tanstack-query) - TanStack Query integration
549
+ - [`@questpie/hono`](../hono) - Hono adapter
550
+ - [`@questpie/elysia`](../elysia) - Elysia adapter
551
+ - [`@questpie/next`](../next) - Next.js adapter
552
+ - [`@questpie/tanstack-start`](../tanstack-start) - TanStack Start adapter
553
+
554
+ ## License
555
+
556
+ MIT