@pyric/ui 0.1.0-alpha.7

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 (594) hide show
  1. package/README.md +79 -0
  2. package/dist/agents/ContextWindowUsage.d.ts +67 -0
  3. package/dist/agents/ContextWindowUsage.d.ts.map +1 -0
  4. package/dist/agents/ContextWindowUsage.js +115 -0
  5. package/dist/agents/ContextWindowUsage.js.map +1 -0
  6. package/dist/agents/EmptyState.d.ts +18 -0
  7. package/dist/agents/EmptyState.d.ts.map +1 -0
  8. package/dist/agents/EmptyState.js +11 -0
  9. package/dist/agents/EmptyState.js.map +1 -0
  10. package/dist/agents/Fold.d.ts +37 -0
  11. package/dist/agents/Fold.d.ts.map +1 -0
  12. package/dist/agents/Fold.js +18 -0
  13. package/dist/agents/Fold.js.map +1 -0
  14. package/dist/agents/Modal.d.ts +25 -0
  15. package/dist/agents/Modal.d.ts.map +1 -0
  16. package/dist/agents/Modal.js +28 -0
  17. package/dist/agents/Modal.js.map +1 -0
  18. package/dist/agents/PulsingDot.d.ts +21 -0
  19. package/dist/agents/PulsingDot.d.ts.map +1 -0
  20. package/dist/agents/PulsingDot.js +18 -0
  21. package/dist/agents/PulsingDot.js.map +1 -0
  22. package/dist/agents/index.d.ts +15 -0
  23. package/dist/agents/index.d.ts.map +1 -0
  24. package/dist/agents/index.js +15 -0
  25. package/dist/agents/index.js.map +1 -0
  26. package/dist/auth/authApi.d.ts +32 -0
  27. package/dist/auth/authApi.d.ts.map +1 -0
  28. package/dist/auth/authApi.js +27 -0
  29. package/dist/auth/authApi.js.map +1 -0
  30. package/dist/auth/claims.d.ts +27 -0
  31. package/dist/auth/claims.d.ts.map +1 -0
  32. package/dist/auth/claims.js +58 -0
  33. package/dist/auth/claims.js.map +1 -0
  34. package/dist/auth/components/AuthProviderToggles.d.ts +31 -0
  35. package/dist/auth/components/AuthProviderToggles.d.ts.map +1 -0
  36. package/dist/auth/components/AuthProviderToggles.js +48 -0
  37. package/dist/auth/components/AuthProviderToggles.js.map +1 -0
  38. package/dist/auth/components/AuthSignInHelper.d.ts +57 -0
  39. package/dist/auth/components/AuthSignInHelper.d.ts.map +1 -0
  40. package/dist/auth/components/AuthSignInHelper.js +69 -0
  41. package/dist/auth/components/AuthSignInHelper.js.map +1 -0
  42. package/dist/auth/components/AuthUserForm.d.ts +84 -0
  43. package/dist/auth/components/AuthUserForm.d.ts.map +1 -0
  44. package/dist/auth/components/AuthUserForm.js +89 -0
  45. package/dist/auth/components/AuthUserForm.js.map +1 -0
  46. package/dist/auth/components/AuthUserList.d.ts +51 -0
  47. package/dist/auth/components/AuthUserList.d.ts.map +1 -0
  48. package/dist/auth/components/AuthUserList.js +46 -0
  49. package/dist/auth/components/AuthUserList.js.map +1 -0
  50. package/dist/auth/components/ClaimsField.d.ts +22 -0
  51. package/dist/auth/components/ClaimsField.d.ts.map +1 -0
  52. package/dist/auth/components/ClaimsField.js +11 -0
  53. package/dist/auth/components/ClaimsField.js.map +1 -0
  54. package/dist/auth/components/confirmActions.d.ts +40 -0
  55. package/dist/auth/components/confirmActions.d.ts.map +1 -0
  56. package/dist/auth/components/confirmActions.js +49 -0
  57. package/dist/auth/components/confirmActions.js.map +1 -0
  58. package/dist/auth/controller.d.ts +73 -0
  59. package/dist/auth/controller.d.ts.map +1 -0
  60. package/dist/auth/controller.js +139 -0
  61. package/dist/auth/controller.js.map +1 -0
  62. package/dist/auth/hooks/index.d.ts +7 -0
  63. package/dist/auth/hooks/index.d.ts.map +1 -0
  64. package/dist/auth/hooks/index.js +7 -0
  65. package/dist/auth/hooks/index.js.map +1 -0
  66. package/dist/auth/hooks/useAuthFlowHelper.d.ts +30 -0
  67. package/dist/auth/hooks/useAuthFlowHelper.d.ts.map +1 -0
  68. package/dist/auth/hooks/useAuthFlowHelper.js +30 -0
  69. package/dist/auth/hooks/useAuthFlowHelper.js.map +1 -0
  70. package/dist/auth/hooks/useAuthProviderConfig.d.ts +37 -0
  71. package/dist/auth/hooks/useAuthProviderConfig.d.ts.map +1 -0
  72. package/dist/auth/hooks/useAuthProviderConfig.js +98 -0
  73. package/dist/auth/hooks/useAuthProviderConfig.js.map +1 -0
  74. package/dist/auth/hooks/useAuthUserEditor.d.ts +30 -0
  75. package/dist/auth/hooks/useAuthUserEditor.d.ts.map +1 -0
  76. package/dist/auth/hooks/useAuthUserEditor.js +27 -0
  77. package/dist/auth/hooks/useAuthUserEditor.js.map +1 -0
  78. package/dist/auth/hooks/useAuthUsers.d.ts +38 -0
  79. package/dist/auth/hooks/useAuthUsers.d.ts.map +1 -0
  80. package/dist/auth/hooks/useAuthUsers.js +111 -0
  81. package/dist/auth/hooks/useAuthUsers.js.map +1 -0
  82. package/dist/auth/index.d.ts +11 -0
  83. package/dist/auth/index.d.ts.map +1 -0
  84. package/dist/auth/index.js +13 -0
  85. package/dist/auth/index.js.map +1 -0
  86. package/dist/auth/providers.d.ts +11 -0
  87. package/dist/auth/providers.d.ts.map +1 -0
  88. package/dist/auth/providers.js +28 -0
  89. package/dist/auth/providers.js.map +1 -0
  90. package/dist/auth/reducers/userEditor.d.ts +55 -0
  91. package/dist/auth/reducers/userEditor.d.ts.map +1 -0
  92. package/dist/auth/reducers/userEditor.js +136 -0
  93. package/dist/auth/reducers/userEditor.js.map +1 -0
  94. package/dist/events/components/ActivityActionItems.d.ts +45 -0
  95. package/dist/events/components/ActivityActionItems.d.ts.map +1 -0
  96. package/dist/events/components/ActivityActionItems.js +68 -0
  97. package/dist/events/components/ActivityActionItems.js.map +1 -0
  98. package/dist/events/components/ActivityGrid.d.ts +65 -0
  99. package/dist/events/components/ActivityGrid.d.ts.map +1 -0
  100. package/dist/events/components/ActivityGrid.js +61 -0
  101. package/dist/events/components/ActivityGrid.js.map +1 -0
  102. package/dist/events/components/ActivityGridRow.d.ts +31 -0
  103. package/dist/events/components/ActivityGridRow.d.ts.map +1 -0
  104. package/dist/events/components/ActivityGridRow.js +23 -0
  105. package/dist/events/components/ActivityGridRow.js.map +1 -0
  106. package/dist/events/components/ProposedChangeDiff.d.ts +46 -0
  107. package/dist/events/components/ProposedChangeDiff.d.ts.map +1 -0
  108. package/dist/events/components/ProposedChangeDiff.js +60 -0
  109. package/dist/events/components/ProposedChangeDiff.js.map +1 -0
  110. package/dist/events/components/format.d.ts +11 -0
  111. package/dist/events/components/format.d.ts.map +1 -0
  112. package/dist/events/components/format.js +26 -0
  113. package/dist/events/components/format.js.map +1 -0
  114. package/dist/events/components/index.d.ts +6 -0
  115. package/dist/events/components/index.d.ts.map +1 -0
  116. package/dist/events/components/index.js +6 -0
  117. package/dist/events/components/index.js.map +1 -0
  118. package/dist/events/digest.d.ts +167 -0
  119. package/dist/events/digest.d.ts.map +1 -0
  120. package/dist/events/digest.js +426 -0
  121. package/dist/events/digest.js.map +1 -0
  122. package/dist/events/hooks/index.d.ts +3 -0
  123. package/dist/events/hooks/index.d.ts.map +1 -0
  124. package/dist/events/hooks/index.js +3 -0
  125. package/dist/events/hooks/index.js.map +1 -0
  126. package/dist/events/hooks/useActivityDigest.d.ts +27 -0
  127. package/dist/events/hooks/useActivityDigest.d.ts.map +1 -0
  128. package/dist/events/hooks/useActivityDigest.js +18 -0
  129. package/dist/events/hooks/useActivityDigest.js.map +1 -0
  130. package/dist/events/hooks/useActivityStream.d.ts +44 -0
  131. package/dist/events/hooks/useActivityStream.d.ts.map +1 -0
  132. package/dist/events/hooks/useActivityStream.js +38 -0
  133. package/dist/events/hooks/useActivityStream.js.map +1 -0
  134. package/dist/events/index.d.ts +15 -0
  135. package/dist/events/index.d.ts.map +1 -0
  136. package/dist/events/index.js +14 -0
  137. package/dist/events/index.js.map +1 -0
  138. package/dist/events/types.d.ts +160 -0
  139. package/dist/events/types.d.ts.map +1 -0
  140. package/dist/events/types.js +21 -0
  141. package/dist/events/types.js.map +1 -0
  142. package/dist/firestore/components/CollectionList.d.ts +22 -0
  143. package/dist/firestore/components/CollectionList.d.ts.map +1 -0
  144. package/dist/firestore/components/CollectionList.js +21 -0
  145. package/dist/firestore/components/CollectionList.js.map +1 -0
  146. package/dist/firestore/components/DeleteWithConfirm.d.ts +38 -0
  147. package/dist/firestore/components/DeleteWithConfirm.d.ts.map +1 -0
  148. package/dist/firestore/components/DeleteWithConfirm.js +33 -0
  149. package/dist/firestore/components/DeleteWithConfirm.js.map +1 -0
  150. package/dist/firestore/components/DocumentEditor.d.ts +47 -0
  151. package/dist/firestore/components/DocumentEditor.d.ts.map +1 -0
  152. package/dist/firestore/components/DocumentEditor.js +176 -0
  153. package/dist/firestore/components/DocumentEditor.js.map +1 -0
  154. package/dist/firestore/components/DocumentList.d.ts +60 -0
  155. package/dist/firestore/components/DocumentList.d.ts.map +1 -0
  156. package/dist/firestore/components/DocumentList.js +39 -0
  157. package/dist/firestore/components/DocumentList.js.map +1 -0
  158. package/dist/firestore/components/DocumentPreview.d.ts +68 -0
  159. package/dist/firestore/components/DocumentPreview.d.ts.map +1 -0
  160. package/dist/firestore/components/DocumentPreview.js +76 -0
  161. package/dist/firestore/components/DocumentPreview.js.map +1 -0
  162. package/dist/firestore/components/FieldRenderer.d.ts +17 -0
  163. package/dist/firestore/components/FieldRenderer.d.ts.map +1 -0
  164. package/dist/firestore/components/FieldRenderer.js +16 -0
  165. package/dist/firestore/components/FieldRenderer.js.map +1 -0
  166. package/dist/firestore/components/QueryBuilder.d.ts +25 -0
  167. package/dist/firestore/components/QueryBuilder.d.ts.map +1 -0
  168. package/dist/firestore/components/QueryBuilder.js +78 -0
  169. package/dist/firestore/components/QueryBuilder.js.map +1 -0
  170. package/dist/firestore/components/ReferencePicker.d.ts +33 -0
  171. package/dist/firestore/components/ReferencePicker.d.ts.map +1 -0
  172. package/dist/firestore/components/ReferencePicker.js +42 -0
  173. package/dist/firestore/components/ReferencePicker.js.map +1 -0
  174. package/dist/firestore/components/TreeEntry.d.ts +15 -0
  175. package/dist/firestore/components/TreeEntry.d.ts.map +1 -0
  176. package/dist/firestore/components/TreeEntry.js +23 -0
  177. package/dist/firestore/components/TreeEntry.js.map +1 -0
  178. package/dist/firestore/components/context.d.ts +18 -0
  179. package/dist/firestore/components/context.d.ts.map +1 -0
  180. package/dist/firestore/components/context.js +7 -0
  181. package/dist/firestore/components/context.js.map +1 -0
  182. package/dist/firestore/fieldEditors/array.d.ts +3 -0
  183. package/dist/firestore/fieldEditors/array.d.ts.map +1 -0
  184. package/dist/firestore/fieldEditors/array.js +16 -0
  185. package/dist/firestore/fieldEditors/array.js.map +1 -0
  186. package/dist/firestore/fieldEditors/boolean.d.ts +3 -0
  187. package/dist/firestore/fieldEditors/boolean.d.ts.map +1 -0
  188. package/dist/firestore/fieldEditors/boolean.js +13 -0
  189. package/dist/firestore/fieldEditors/boolean.js.map +1 -0
  190. package/dist/firestore/fieldEditors/bytes.d.ts +4 -0
  191. package/dist/firestore/fieldEditors/bytes.d.ts.map +1 -0
  192. package/dist/firestore/fieldEditors/bytes.js +31 -0
  193. package/dist/firestore/fieldEditors/bytes.js.map +1 -0
  194. package/dist/firestore/fieldEditors/geopoint.d.ts +4 -0
  195. package/dist/firestore/fieldEditors/geopoint.d.ts.map +1 -0
  196. package/dist/firestore/fieldEditors/geopoint.js +32 -0
  197. package/dist/firestore/fieldEditors/geopoint.js.map +1 -0
  198. package/dist/firestore/fieldEditors/map.d.ts +3 -0
  199. package/dist/firestore/fieldEditors/map.d.ts.map +1 -0
  200. package/dist/firestore/fieldEditors/map.js +19 -0
  201. package/dist/firestore/fieldEditors/map.js.map +1 -0
  202. package/dist/firestore/fieldEditors/null.d.ts +3 -0
  203. package/dist/firestore/fieldEditors/null.d.ts.map +1 -0
  204. package/dist/firestore/fieldEditors/null.js +17 -0
  205. package/dist/firestore/fieldEditors/null.js.map +1 -0
  206. package/dist/firestore/fieldEditors/number.d.ts +3 -0
  207. package/dist/firestore/fieldEditors/number.d.ts.map +1 -0
  208. package/dist/firestore/fieldEditors/number.js +24 -0
  209. package/dist/firestore/fieldEditors/number.js.map +1 -0
  210. package/dist/firestore/fieldEditors/reference.d.ts +4 -0
  211. package/dist/firestore/fieldEditors/reference.d.ts.map +1 -0
  212. package/dist/firestore/fieldEditors/reference.js +49 -0
  213. package/dist/firestore/fieldEditors/reference.js.map +1 -0
  214. package/dist/firestore/fieldEditors/registry.d.ts +16 -0
  215. package/dist/firestore/fieldEditors/registry.d.ts.map +1 -0
  216. package/dist/firestore/fieldEditors/registry.js +42 -0
  217. package/dist/firestore/fieldEditors/registry.js.map +1 -0
  218. package/dist/firestore/fieldEditors/string.d.ts +3 -0
  219. package/dist/firestore/fieldEditors/string.d.ts.map +1 -0
  220. package/dist/firestore/fieldEditors/string.js +13 -0
  221. package/dist/firestore/fieldEditors/string.js.map +1 -0
  222. package/dist/firestore/fieldEditors/timestamp.d.ts +4 -0
  223. package/dist/firestore/fieldEditors/timestamp.d.ts.map +1 -0
  224. package/dist/firestore/fieldEditors/timestamp.js +52 -0
  225. package/dist/firestore/fieldEditors/timestamp.js.map +1 -0
  226. package/dist/firestore/fieldEditors/types.d.ts +64 -0
  227. package/dist/firestore/fieldEditors/types.d.ts.map +1 -0
  228. package/dist/firestore/fieldEditors/types.js +2 -0
  229. package/dist/firestore/fieldEditors/types.js.map +1 -0
  230. package/dist/firestore/fieldEditors/vector.d.ts +29 -0
  231. package/dist/firestore/fieldEditors/vector.d.ts.map +1 -0
  232. package/dist/firestore/fieldEditors/vector.js +93 -0
  233. package/dist/firestore/fieldEditors/vector.js.map +1 -0
  234. package/dist/firestore/firestoreApi.d.ts +35 -0
  235. package/dist/firestore/firestoreApi.d.ts.map +1 -0
  236. package/dist/firestore/firestoreApi.js +28 -0
  237. package/dist/firestore/firestoreApi.js.map +1 -0
  238. package/dist/firestore/hooks/coerceError.d.ts +17 -0
  239. package/dist/firestore/hooks/coerceError.d.ts.map +1 -0
  240. package/dist/firestore/hooks/coerceError.js +41 -0
  241. package/dist/firestore/hooks/coerceError.js.map +1 -0
  242. package/dist/firestore/hooks/index.d.ts +10 -0
  243. package/dist/firestore/hooks/index.d.ts.map +1 -0
  244. package/dist/firestore/hooks/index.js +10 -0
  245. package/dist/firestore/hooks/index.js.map +1 -0
  246. package/dist/firestore/hooks/useCollectionList.d.ts +37 -0
  247. package/dist/firestore/hooks/useCollectionList.d.ts.map +1 -0
  248. package/dist/firestore/hooks/useCollectionList.js +51 -0
  249. package/dist/firestore/hooks/useCollectionList.js.map +1 -0
  250. package/dist/firestore/hooks/useDocumentEditor.d.ts +58 -0
  251. package/dist/firestore/hooks/useDocumentEditor.d.ts.map +1 -0
  252. package/dist/firestore/hooks/useDocumentEditor.js +68 -0
  253. package/dist/firestore/hooks/useDocumentEditor.js.map +1 -0
  254. package/dist/firestore/hooks/useDocumentList.d.ts +45 -0
  255. package/dist/firestore/hooks/useDocumentList.d.ts.map +1 -0
  256. package/dist/firestore/hooks/useDocumentList.js +112 -0
  257. package/dist/firestore/hooks/useDocumentList.js.map +1 -0
  258. package/dist/firestore/hooks/useDocumentSubcollections.d.ts +29 -0
  259. package/dist/firestore/hooks/useDocumentSubcollections.d.ts.map +1 -0
  260. package/dist/firestore/hooks/useDocumentSubcollections.js +48 -0
  261. package/dist/firestore/hooks/useDocumentSubcollections.js.map +1 -0
  262. package/dist/firestore/hooks/useFirestoreCollection.d.ts +14 -0
  263. package/dist/firestore/hooks/useFirestoreCollection.d.ts.map +1 -0
  264. package/dist/firestore/hooks/useFirestoreCollection.js +35 -0
  265. package/dist/firestore/hooks/useFirestoreCollection.js.map +1 -0
  266. package/dist/firestore/hooks/useFirestoreDoc.d.ts +17 -0
  267. package/dist/firestore/hooks/useFirestoreDoc.d.ts.map +1 -0
  268. package/dist/firestore/hooks/useFirestoreDoc.js +34 -0
  269. package/dist/firestore/hooks/useFirestoreDoc.js.map +1 -0
  270. package/dist/firestore/hooks/useQueryBuilder.d.ts +51 -0
  271. package/dist/firestore/hooks/useQueryBuilder.d.ts.map +1 -0
  272. package/dist/firestore/hooks/useQueryBuilder.js +110 -0
  273. package/dist/firestore/hooks/useQueryBuilder.js.map +1 -0
  274. package/dist/firestore/hooks/useRecursiveDelete.d.ts +40 -0
  275. package/dist/firestore/hooks/useRecursiveDelete.d.ts.map +1 -0
  276. package/dist/firestore/hooks/useRecursiveDelete.js +44 -0
  277. package/dist/firestore/hooks/useRecursiveDelete.js.map +1 -0
  278. package/dist/firestore/hooks/useReferencePicker.d.ts +70 -0
  279. package/dist/firestore/hooks/useReferencePicker.d.ts.map +1 -0
  280. package/dist/firestore/hooks/useReferencePicker.js +140 -0
  281. package/dist/firestore/hooks/useReferencePicker.js.map +1 -0
  282. package/dist/firestore/import/parseImport.d.ts +55 -0
  283. package/dist/firestore/import/parseImport.d.ts.map +1 -0
  284. package/dist/firestore/import/parseImport.js +101 -0
  285. package/dist/firestore/import/parseImport.js.map +1 -0
  286. package/dist/firestore/index.d.ts +20 -0
  287. package/dist/firestore/index.d.ts.map +1 -0
  288. package/dist/firestore/index.js +28 -0
  289. package/dist/firestore/index.js.map +1 -0
  290. package/dist/firestore/reducers/defaults.d.ts +10 -0
  291. package/dist/firestore/reducers/defaults.d.ts.map +1 -0
  292. package/dist/firestore/reducers/defaults.js +37 -0
  293. package/dist/firestore/reducers/defaults.js.map +1 -0
  294. package/dist/firestore/reducers/documentEditor.d.ts +23 -0
  295. package/dist/firestore/reducers/documentEditor.d.ts.map +1 -0
  296. package/dist/firestore/reducers/documentEditor.js +199 -0
  297. package/dist/firestore/reducers/documentEditor.js.map +1 -0
  298. package/dist/firestore/reducers/tree.d.ts +28 -0
  299. package/dist/firestore/reducers/tree.d.ts.map +1 -0
  300. package/dist/firestore/reducers/tree.js +129 -0
  301. package/dist/firestore/reducers/tree.js.map +1 -0
  302. package/dist/firestore/reducers/types.d.ts +112 -0
  303. package/dist/firestore/reducers/types.d.ts.map +1 -0
  304. package/dist/firestore/reducers/types.js +2 -0
  305. package/dist/firestore/reducers/types.js.map +1 -0
  306. package/dist/firestore/reducers/validation.d.ts +25 -0
  307. package/dist/firestore/reducers/validation.d.ts.map +1 -0
  308. package/dist/firestore/reducers/validation.js +121 -0
  309. package/dist/firestore/reducers/validation.js.map +1 -0
  310. package/dist/firestore/types.d.ts +77 -0
  311. package/dist/firestore/types.d.ts.map +1 -0
  312. package/dist/firestore/types.js +196 -0
  313. package/dist/firestore/types.js.map +1 -0
  314. package/dist/firestore/validation/ids.d.ts +23 -0
  315. package/dist/firestore/validation/ids.d.ts.map +1 -0
  316. package/dist/firestore/validation/ids.js +46 -0
  317. package/dist/firestore/validation/ids.js.map +1 -0
  318. package/dist/index.d.ts +2 -0
  319. package/dist/index.d.ts.map +1 -0
  320. package/dist/index.js +2 -0
  321. package/dist/index.js.map +1 -0
  322. package/dist/primitives/Badge.d.ts +28 -0
  323. package/dist/primitives/Badge.d.ts.map +1 -0
  324. package/dist/primitives/Badge.js +11 -0
  325. package/dist/primitives/Badge.js.map +1 -0
  326. package/dist/primitives/ConfirmDialog.d.ts +42 -0
  327. package/dist/primitives/ConfirmDialog.d.ts.map +1 -0
  328. package/dist/primitives/ConfirmDialog.js +61 -0
  329. package/dist/primitives/ConfirmDialog.js.map +1 -0
  330. package/dist/primitives/CopyButton.d.ts +28 -0
  331. package/dist/primitives/CopyButton.d.ts.map +1 -0
  332. package/dist/primitives/CopyButton.js +27 -0
  333. package/dist/primitives/CopyButton.js.map +1 -0
  334. package/dist/primitives/JsonView.d.ts +29 -0
  335. package/dist/primitives/JsonView.d.ts.map +1 -0
  336. package/dist/primitives/JsonView.js +56 -0
  337. package/dist/primitives/JsonView.js.map +1 -0
  338. package/dist/primitives/SegmentedControl.d.ts +37 -0
  339. package/dist/primitives/SegmentedControl.d.ts.map +1 -0
  340. package/dist/primitives/SegmentedControl.js +18 -0
  341. package/dist/primitives/SegmentedControl.js.map +1 -0
  342. package/dist/primitives/Toast.d.ts +48 -0
  343. package/dist/primitives/Toast.d.ts.map +1 -0
  344. package/dist/primitives/Toast.js +60 -0
  345. package/dist/primitives/Toast.js.map +1 -0
  346. package/dist/primitives/VirtualList.d.ts +37 -0
  347. package/dist/primitives/VirtualList.d.ts.map +1 -0
  348. package/dist/primitives/VirtualList.js +47 -0
  349. package/dist/primitives/VirtualList.js.map +1 -0
  350. package/dist/primitives/hooks/useContainerSize.d.ts +29 -0
  351. package/dist/primitives/hooks/useContainerSize.d.ts.map +1 -0
  352. package/dist/primitives/hooks/useContainerSize.js +45 -0
  353. package/dist/primitives/hooks/useContainerSize.js.map +1 -0
  354. package/dist/primitives/index.d.ts +10 -0
  355. package/dist/primitives/index.d.ts.map +1 -0
  356. package/dist/primitives/index.js +10 -0
  357. package/dist/primitives/index.js.map +1 -0
  358. package/dist/primitives/useConfirm.d.ts +34 -0
  359. package/dist/primitives/useConfirm.d.ts.map +1 -0
  360. package/dist/primitives/useConfirm.js +63 -0
  361. package/dist/primitives/useConfirm.js.map +1 -0
  362. package/dist/rtdb/components/RtdbPathBar.d.ts +31 -0
  363. package/dist/rtdb/components/RtdbPathBar.d.ts.map +1 -0
  364. package/dist/rtdb/components/RtdbPathBar.js +47 -0
  365. package/dist/rtdb/components/RtdbPathBar.js.map +1 -0
  366. package/dist/rtdb/components/RtdbTree.d.ts +38 -0
  367. package/dist/rtdb/components/RtdbTree.d.ts.map +1 -0
  368. package/dist/rtdb/components/RtdbTree.js +103 -0
  369. package/dist/rtdb/components/RtdbTree.js.map +1 -0
  370. package/dist/rtdb/editor.d.ts +25 -0
  371. package/dist/rtdb/editor.d.ts.map +1 -0
  372. package/dist/rtdb/editor.js +79 -0
  373. package/dist/rtdb/editor.js.map +1 -0
  374. package/dist/rtdb/hooks/useRtdbTree.d.ts +31 -0
  375. package/dist/rtdb/hooks/useRtdbTree.d.ts.map +1 -0
  376. package/dist/rtdb/hooks/useRtdbTree.js +49 -0
  377. package/dist/rtdb/hooks/useRtdbTree.js.map +1 -0
  378. package/dist/rtdb/index.d.ts +17 -0
  379. package/dist/rtdb/index.d.ts.map +1 -0
  380. package/dist/rtdb/index.js +21 -0
  381. package/dist/rtdb/index.js.map +1 -0
  382. package/dist/rtdb/pathInput.d.ts +28 -0
  383. package/dist/rtdb/pathInput.d.ts.map +1 -0
  384. package/dist/rtdb/pathInput.js +40 -0
  385. package/dist/rtdb/pathInput.js.map +1 -0
  386. package/dist/rtdb/reducers/tree.d.ts +86 -0
  387. package/dist/rtdb/reducers/tree.d.ts.map +1 -0
  388. package/dist/rtdb/reducers/tree.js +131 -0
  389. package/dist/rtdb/reducers/tree.js.map +1 -0
  390. package/dist/rtdb/rtdbApi.d.ts +20 -0
  391. package/dist/rtdb/rtdbApi.d.ts.map +1 -0
  392. package/dist/rtdb/rtdbApi.js +2 -0
  393. package/dist/rtdb/rtdbApi.js.map +1 -0
  394. package/dist/rtdb/values.d.ts +44 -0
  395. package/dist/rtdb/values.d.ts.map +1 -0
  396. package/dist/rtdb/values.js +143 -0
  397. package/dist/rtdb/values.js.map +1 -0
  398. package/dist/rules/components/DenialInspector.d.ts +18 -0
  399. package/dist/rules/components/DenialInspector.d.ts.map +1 -0
  400. package/dist/rules/components/DenialInspector.js +58 -0
  401. package/dist/rules/components/DenialInspector.js.map +1 -0
  402. package/dist/rules/components/format.d.ts +56 -0
  403. package/dist/rules/components/format.d.ts.map +1 -0
  404. package/dist/rules/components/format.js +137 -0
  405. package/dist/rules/components/format.js.map +1 -0
  406. package/dist/rules/components/index.d.ts +4 -0
  407. package/dist/rules/components/index.d.ts.map +1 -0
  408. package/dist/rules/components/index.js +4 -0
  409. package/dist/rules/components/index.js.map +1 -0
  410. package/dist/rules/components/scope.d.ts +10 -0
  411. package/dist/rules/components/scope.d.ts.map +1 -0
  412. package/dist/rules/components/scope.js +72 -0
  413. package/dist/rules/components/scope.js.map +1 -0
  414. package/dist/rules/hooks/index.d.ts +2 -0
  415. package/dist/rules/hooks/index.d.ts.map +1 -0
  416. package/dist/rules/hooks/index.js +2 -0
  417. package/dist/rules/hooks/index.js.map +1 -0
  418. package/dist/rules/hooks/useDenialTrace.d.ts +51 -0
  419. package/dist/rules/hooks/useDenialTrace.d.ts.map +1 -0
  420. package/dist/rules/hooks/useDenialTrace.js +58 -0
  421. package/dist/rules/hooks/useDenialTrace.js.map +1 -0
  422. package/dist/rules/index.d.ts +14 -0
  423. package/dist/rules/index.d.ts.map +1 -0
  424. package/dist/rules/index.js +13 -0
  425. package/dist/rules/index.js.map +1 -0
  426. package/dist/rules/types.d.ts +75 -0
  427. package/dist/rules/types.d.ts.map +1 -0
  428. package/dist/rules/types.js +2 -0
  429. package/dist/rules/types.js.map +1 -0
  430. package/dist/storage/collisionRename.d.ts +73 -0
  431. package/dist/storage/collisionRename.d.ts.map +1 -0
  432. package/dist/storage/collisionRename.js +113 -0
  433. package/dist/storage/collisionRename.js.map +1 -0
  434. package/dist/storage/components/DeleteSelectionWithConfirm.d.ts +68 -0
  435. package/dist/storage/components/DeleteSelectionWithConfirm.d.ts.map +1 -0
  436. package/dist/storage/components/DeleteSelectionWithConfirm.js +82 -0
  437. package/dist/storage/components/DeleteSelectionWithConfirm.js.map +1 -0
  438. package/dist/storage/components/ObjectBrowser.d.ts +75 -0
  439. package/dist/storage/components/ObjectBrowser.d.ts.map +1 -0
  440. package/dist/storage/components/ObjectBrowser.js +59 -0
  441. package/dist/storage/components/ObjectBrowser.js.map +1 -0
  442. package/dist/storage/components/ObjectInspector.d.ts +43 -0
  443. package/dist/storage/components/ObjectInspector.d.ts.map +1 -0
  444. package/dist/storage/components/ObjectInspector.js +92 -0
  445. package/dist/storage/components/ObjectInspector.js.map +1 -0
  446. package/dist/storage/components/PathBreadcrumb.d.ts +30 -0
  447. package/dist/storage/components/PathBreadcrumb.d.ts.map +1 -0
  448. package/dist/storage/components/PathBreadcrumb.js +26 -0
  449. package/dist/storage/components/PathBreadcrumb.js.map +1 -0
  450. package/dist/storage/components/UploadDropzone.d.ts +50 -0
  451. package/dist/storage/components/UploadDropzone.d.ts.map +1 -0
  452. package/dist/storage/components/UploadDropzone.js +109 -0
  453. package/dist/storage/components/UploadDropzone.js.map +1 -0
  454. package/dist/storage/folderPlaceholder.d.ts +14 -0
  455. package/dist/storage/folderPlaceholder.d.ts.map +1 -0
  456. package/dist/storage/folderPlaceholder.js +27 -0
  457. package/dist/storage/folderPlaceholder.js.map +1 -0
  458. package/dist/storage/hooks/index.d.ts +9 -0
  459. package/dist/storage/hooks/index.d.ts.map +1 -0
  460. package/dist/storage/hooks/index.js +9 -0
  461. package/dist/storage/hooks/index.js.map +1 -0
  462. package/dist/storage/hooks/useMetadataEditor.d.ts +114 -0
  463. package/dist/storage/hooks/useMetadataEditor.d.ts.map +1 -0
  464. package/dist/storage/hooks/useMetadataEditor.js +193 -0
  465. package/dist/storage/hooks/useMetadataEditor.js.map +1 -0
  466. package/dist/storage/hooks/useObjectUpload.d.ts +109 -0
  467. package/dist/storage/hooks/useObjectUpload.d.ts.map +1 -0
  468. package/dist/storage/hooks/useObjectUpload.js +134 -0
  469. package/dist/storage/hooks/useObjectUpload.js.map +1 -0
  470. package/dist/storage/hooks/usePathState.d.ts +43 -0
  471. package/dist/storage/hooks/usePathState.d.ts.map +1 -0
  472. package/dist/storage/hooks/usePathState.js +42 -0
  473. package/dist/storage/hooks/usePathState.js.map +1 -0
  474. package/dist/storage/hooks/useStorageDelete.d.ts +73 -0
  475. package/dist/storage/hooks/useStorageDelete.d.ts.map +1 -0
  476. package/dist/storage/hooks/useStorageDelete.js +114 -0
  477. package/dist/storage/hooks/useStorageDelete.js.map +1 -0
  478. package/dist/storage/hooks/useStorageList.d.ts +74 -0
  479. package/dist/storage/hooks/useStorageList.d.ts.map +1 -0
  480. package/dist/storage/hooks/useStorageList.js +167 -0
  481. package/dist/storage/hooks/useStorageList.js.map +1 -0
  482. package/dist/storage/hooks/useStorageObject.d.ts +34 -0
  483. package/dist/storage/hooks/useStorageObject.d.ts.map +1 -0
  484. package/dist/storage/hooks/useStorageObject.js +114 -0
  485. package/dist/storage/hooks/useStorageObject.js.map +1 -0
  486. package/dist/storage/hooks/useStorageRulesGate.d.ts +128 -0
  487. package/dist/storage/hooks/useStorageRulesGate.d.ts.map +1 -0
  488. package/dist/storage/hooks/useStorageRulesGate.js +158 -0
  489. package/dist/storage/hooks/useStorageRulesGate.js.map +1 -0
  490. package/dist/storage/hooks/useStorageSelection.d.ts +32 -0
  491. package/dist/storage/hooks/useStorageSelection.d.ts.map +1 -0
  492. package/dist/storage/hooks/useStorageSelection.js +55 -0
  493. package/dist/storage/hooks/useStorageSelection.js.map +1 -0
  494. package/dist/storage/index.d.ts +11 -0
  495. package/dist/storage/index.d.ts.map +1 -0
  496. package/dist/storage/index.js +17 -0
  497. package/dist/storage/index.js.map +1 -0
  498. package/dist/storage/pendingPrefixes.d.ts +73 -0
  499. package/dist/storage/pendingPrefixes.d.ts.map +1 -0
  500. package/dist/storage/pendingPrefixes.js +98 -0
  501. package/dist/storage/pendingPrefixes.js.map +1 -0
  502. package/dist/storage/previews.d.ts +51 -0
  503. package/dist/storage/previews.d.ts.map +1 -0
  504. package/dist/storage/previews.js +73 -0
  505. package/dist/storage/previews.js.map +1 -0
  506. package/dist/storage/storageApi.d.ts +30 -0
  507. package/dist/storage/storageApi.d.ts.map +1 -0
  508. package/dist/storage/storageApi.js +13 -0
  509. package/dist/storage/storageApi.js.map +1 -0
  510. package/dist/traffic/components/RuleHeatmap.d.ts +34 -0
  511. package/dist/traffic/components/RuleHeatmap.d.ts.map +1 -0
  512. package/dist/traffic/components/RuleHeatmap.js +40 -0
  513. package/dist/traffic/components/RuleHeatmap.js.map +1 -0
  514. package/dist/traffic/components/TrafficDetail.d.ts +33 -0
  515. package/dist/traffic/components/TrafficDetail.d.ts.map +1 -0
  516. package/dist/traffic/components/TrafficDetail.js +28 -0
  517. package/dist/traffic/components/TrafficDetail.js.map +1 -0
  518. package/dist/traffic/components/TrafficGroupRow.d.ts +28 -0
  519. package/dist/traffic/components/TrafficGroupRow.d.ts.map +1 -0
  520. package/dist/traffic/components/TrafficGroupRow.js +18 -0
  521. package/dist/traffic/components/TrafficGroupRow.js.map +1 -0
  522. package/dist/traffic/components/TrafficLineChart.d.ts +34 -0
  523. package/dist/traffic/components/TrafficLineChart.d.ts.map +1 -0
  524. package/dist/traffic/components/TrafficLineChart.js +49 -0
  525. package/dist/traffic/components/TrafficLineChart.js.map +1 -0
  526. package/dist/traffic/components/TrafficLog.d.ts +52 -0
  527. package/dist/traffic/components/TrafficLog.d.ts.map +1 -0
  528. package/dist/traffic/components/TrafficLog.js +34 -0
  529. package/dist/traffic/components/TrafficLog.js.map +1 -0
  530. package/dist/traffic/components/TrafficMetricCards.d.ts +26 -0
  531. package/dist/traffic/components/TrafficMetricCards.d.ts.map +1 -0
  532. package/dist/traffic/components/TrafficMetricCards.js +24 -0
  533. package/dist/traffic/components/TrafficMetricCards.js.map +1 -0
  534. package/dist/traffic/components/TrafficRow.d.ts +40 -0
  535. package/dist/traffic/components/TrafficRow.d.ts.map +1 -0
  536. package/dist/traffic/components/TrafficRow.js +27 -0
  537. package/dist/traffic/components/TrafficRow.js.map +1 -0
  538. package/dist/traffic/components/TrafficStats.d.ts +18 -0
  539. package/dist/traffic/components/TrafficStats.d.ts.map +1 -0
  540. package/dist/traffic/components/TrafficStats.js +19 -0
  541. package/dist/traffic/components/TrafficStats.js.map +1 -0
  542. package/dist/traffic/components/TrafficTimeline.d.ts +81 -0
  543. package/dist/traffic/components/TrafficTimeline.d.ts.map +1 -0
  544. package/dist/traffic/components/TrafficTimeline.js +72 -0
  545. package/dist/traffic/components/TrafficTimeline.js.map +1 -0
  546. package/dist/traffic/components/format.d.ts +13 -0
  547. package/dist/traffic/components/format.d.ts.map +1 -0
  548. package/dist/traffic/components/format.js +24 -0
  549. package/dist/traffic/components/format.js.map +1 -0
  550. package/dist/traffic/components/index.d.ts +11 -0
  551. package/dist/traffic/components/index.d.ts.map +1 -0
  552. package/dist/traffic/components/index.js +11 -0
  553. package/dist/traffic/components/index.js.map +1 -0
  554. package/dist/traffic/hooks/index.d.ts +8 -0
  555. package/dist/traffic/hooks/index.d.ts.map +1 -0
  556. package/dist/traffic/hooks/index.js +8 -0
  557. package/dist/traffic/hooks/index.js.map +1 -0
  558. package/dist/traffic/hooks/useRuleHeatmap.d.ts +33 -0
  559. package/dist/traffic/hooks/useRuleHeatmap.d.ts.map +1 -0
  560. package/dist/traffic/hooks/useRuleHeatmap.js +54 -0
  561. package/dist/traffic/hooks/useRuleHeatmap.js.map +1 -0
  562. package/dist/traffic/hooks/useTrafficBuckets.d.ts +71 -0
  563. package/dist/traffic/hooks/useTrafficBuckets.d.ts.map +1 -0
  564. package/dist/traffic/hooks/useTrafficBuckets.js +74 -0
  565. package/dist/traffic/hooks/useTrafficBuckets.js.map +1 -0
  566. package/dist/traffic/hooks/useTrafficFilter.d.ts +40 -0
  567. package/dist/traffic/hooks/useTrafficFilter.d.ts.map +1 -0
  568. package/dist/traffic/hooks/useTrafficFilter.js +33 -0
  569. package/dist/traffic/hooks/useTrafficFilter.js.map +1 -0
  570. package/dist/traffic/hooks/useTrafficGroups.d.ts +47 -0
  571. package/dist/traffic/hooks/useTrafficGroups.d.ts.map +1 -0
  572. package/dist/traffic/hooks/useTrafficGroups.js +73 -0
  573. package/dist/traffic/hooks/useTrafficGroups.js.map +1 -0
  574. package/dist/traffic/hooks/useTrafficMetrics.d.ts +66 -0
  575. package/dist/traffic/hooks/useTrafficMetrics.d.ts.map +1 -0
  576. package/dist/traffic/hooks/useTrafficMetrics.js +156 -0
  577. package/dist/traffic/hooks/useTrafficMetrics.js.map +1 -0
  578. package/dist/traffic/hooks/useTrafficMonitor.d.ts +56 -0
  579. package/dist/traffic/hooks/useTrafficMonitor.d.ts.map +1 -0
  580. package/dist/traffic/hooks/useTrafficMonitor.js +58 -0
  581. package/dist/traffic/hooks/useTrafficMonitor.js.map +1 -0
  582. package/dist/traffic/hooks/useTrafficStats.d.ts +32 -0
  583. package/dist/traffic/hooks/useTrafficStats.d.ts.map +1 -0
  584. package/dist/traffic/hooks/useTrafficStats.js +45 -0
  585. package/dist/traffic/hooks/useTrafficStats.js.map +1 -0
  586. package/dist/traffic/index.d.ts +4 -0
  587. package/dist/traffic/index.d.ts.map +1 -0
  588. package/dist/traffic/index.js +3 -0
  589. package/dist/traffic/index.js.map +1 -0
  590. package/dist/traffic/types.d.ts +72 -0
  591. package/dist/traffic/types.d.ts.map +1 -0
  592. package/dist/traffic/types.js +10 -0
  593. package/dist/traffic/types.js.map +1 -0
  594. package/package.json +116 -0
@@ -0,0 +1,10 @@
1
+ export { CopyButton } from './CopyButton.js';
2
+ export { Badge } from './Badge.js';
3
+ export { JsonView, } from './JsonView.js';
4
+ export { SegmentedControl, } from './SegmentedControl.js';
5
+ export { ConfirmDialog } from './ConfirmDialog.js';
6
+ export { ConfirmProvider, useConfirm, } from './useConfirm.js';
7
+ export { ToastProvider, useToast, } from './Toast.js';
8
+ export { VirtualList } from './VirtualList.js';
9
+ export { useContainerSize, } from './hooks/useContainerSize.js';
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/primitives/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAwB,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,KAAK,EAAmB,MAAM,YAAY,CAAC;AACpD,OAAO,EACL,QAAQ,GAET,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,gBAAgB,GAGjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,aAAa,EAA2B,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,UAAU,GAIX,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,aAAa,EACb,QAAQ,GAKT,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAyB,MAAM,kBAAkB,CAAC;AACtE,OAAO,EACL,gBAAgB,GAGjB,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface ConfirmOptions {
3
+ title: string;
4
+ body?: ReactNode;
5
+ destructive?: boolean;
6
+ confirmLabel?: string;
7
+ cancelLabel?: string;
8
+ }
9
+ export type ConfirmFn = (options: ConfirmOptions) => Promise<boolean>;
10
+ /**
11
+ * Imperative confirmation hook. Returns a function that opens the
12
+ * provider-managed dialog and resolves to `true` on confirm, `false`
13
+ * on cancel/dismiss.
14
+ *
15
+ * const confirm = useConfirm();
16
+ * const ok = await confirm({ title: 'Delete?', destructive: true });
17
+ * if (ok) await deleteDoc(ref);
18
+ *
19
+ * Requires a `<ConfirmProvider>` ancestor.
20
+ */
21
+ export declare function useConfirm(): ConfirmFn;
22
+ export interface ConfirmProviderProps {
23
+ children: ReactNode;
24
+ /** Forwarded to the rendered `<ConfirmDialog>`. */
25
+ dialogClassName?: string;
26
+ }
27
+ /**
28
+ * Mounts a single managed `<ConfirmDialog>` and exposes the
29
+ * imperative `confirm()` API through context. Scoped — multiple
30
+ * providers can coexist in different subtrees, each managing its
31
+ * own dialog.
32
+ */
33
+ export declare function ConfirmProvider({ children, dialogClassName }: ConfirmProviderProps): import("react").JSX.Element;
34
+ //# sourceMappingURL=useConfirm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useConfirm.d.ts","sourceRoot":"","sources":["../../src/primitives/useConfirm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAItE;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,IAAI,SAAS,CAMtC;AAOD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,mDAAmD;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,EAAE,oBAAoB,+BAqDlF"}
@@ -0,0 +1,63 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { createContext, useCallback, useContext, useMemo, useRef, useState, } from 'react';
3
+ import { ConfirmDialog } from './ConfirmDialog.js';
4
+ const Ctx = createContext(null);
5
+ /**
6
+ * Imperative confirmation hook. Returns a function that opens the
7
+ * provider-managed dialog and resolves to `true` on confirm, `false`
8
+ * on cancel/dismiss.
9
+ *
10
+ * const confirm = useConfirm();
11
+ * const ok = await confirm({ title: 'Delete?', destructive: true });
12
+ * if (ok) await deleteDoc(ref);
13
+ *
14
+ * Requires a `<ConfirmProvider>` ancestor.
15
+ */
16
+ export function useConfirm() {
17
+ const fn = useContext(Ctx);
18
+ if (!fn) {
19
+ throw new Error('useConfirm: missing <ConfirmProvider> ancestor');
20
+ }
21
+ return fn;
22
+ }
23
+ /**
24
+ * Mounts a single managed `<ConfirmDialog>` and exposes the
25
+ * imperative `confirm()` API through context. Scoped — multiple
26
+ * providers can coexist in different subtrees, each managing its
27
+ * own dialog.
28
+ */
29
+ export function ConfirmProvider({ children, dialogClassName }) {
30
+ const [pending, setPending] = useState(null);
31
+ // Track which resolution path fired so the close handler doesn't
32
+ // double-resolve when both onConfirm + onOpenChange(false) trigger.
33
+ const resolvedRef = useRef(false);
34
+ const confirm = useCallback((options) => {
35
+ return new Promise((resolve) => {
36
+ resolvedRef.current = false;
37
+ setPending({ options, resolve });
38
+ });
39
+ }, []);
40
+ const handleConfirm = useCallback(() => {
41
+ if (!pending)
42
+ return;
43
+ if (resolvedRef.current)
44
+ return;
45
+ resolvedRef.current = true;
46
+ pending.resolve(true);
47
+ setPending(null);
48
+ }, [pending]);
49
+ const handleOpenChange = useCallback((open) => {
50
+ if (open)
51
+ return;
52
+ if (!pending)
53
+ return;
54
+ if (resolvedRef.current)
55
+ return;
56
+ resolvedRef.current = true;
57
+ pending.resolve(false);
58
+ setPending(null);
59
+ }, [pending]);
60
+ const ctxValue = useMemo(() => confirm, [confirm]);
61
+ return (_jsxs(Ctx.Provider, { value: ctxValue, children: [children, pending ? (_jsx(ConfirmDialog, { open: true, onOpenChange: handleOpenChange, title: pending.options.title, body: pending.options.body, destructive: pending.options.destructive, confirmLabel: pending.options.confirmLabel, cancelLabel: pending.options.cancelLabel, onConfirm: handleConfirm, className: dialogClassName })) : null] }));
62
+ }
63
+ //# sourceMappingURL=useConfirm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useConfirm.js","sourceRoot":"","sources":["../../src/primitives/useConfirm.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,WAAW,EACX,UAAU,EACV,OAAO,EACP,MAAM,EACN,QAAQ,GAET,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAYnD,MAAM,GAAG,GAAG,aAAa,CAAmB,IAAI,CAAC,CAAC;AAElD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,UAAU;IACxB,MAAM,EAAE,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;IAC3B,IAAI,CAAC,EAAE,EAAE,CAAC;QACR,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAaD;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAwB;IACjF,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAwB,IAAI,CAAC,CAAC;IACpE,iEAAiE;IACjE,oEAAoE;IACpE,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAElC,MAAM,OAAO,GAAG,WAAW,CAAY,CAAC,OAAO,EAAE,EAAE;QACjD,OAAO,IAAI,OAAO,CAAU,CAAC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C,WAAW,EACxC,YAAY,EAAE,OAAO,CAAC,OAAO,CAAC,YAAY,EAC1C,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,WAAW,EACxC,SAAS,EAAE,aAAa,EACxB,SAAS,EAAE,eAAe,GAC1B,CACH,CAAC,CAAC,CAAC,IAAI,IACK,CAChB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface RtdbPathBarProps {
3
+ /** Current absolute database path (`'/'` for root). */
4
+ path: string;
5
+ /** Fired with the parsed absolute path on crumb click or input submit. */
6
+ onNavigate: (path: string) => void;
7
+ /** Root crumb label — the database/instance identity (e.g. the sandbox
8
+ * slug). Default `'/'`. */
9
+ rootLabel?: ReactNode;
10
+ /** Text shown before the input while editing (the non-editable URL part). */
11
+ inputPrefix?: string;
12
+ className?: string;
13
+ }
14
+ /**
15
+ * The editable path bar of the RTDB viewer — the interaction form of the
16
+ * Firebase console / firebase-tools-ui database URL bar (clean-room
17
+ * adaptation): in DISPLAY mode the path renders as clickable crumbs
18
+ * (root → … → current) plus an edit affordance; EDIT mode swaps in a text
19
+ * input seeded with the current path — Enter navigates, Escape or blur
20
+ * cancels. Pasted full URLs and missing leading slashes are tolerated
21
+ * (`parseRtdbPathInput`).
22
+ *
23
+ * Headless. Consumers style via:
24
+ * - `[data-pyric-ui="rtdb-path-bar"]` — the root (`data-rtdb-editing` when editing)
25
+ * - `[data-rtdb-crumb]` / `[data-rtdb-crumb-root]` / `[data-pyric-current]`
26
+ * - `[data-rtdb-crumb-separator]`
27
+ * - `[data-rtdb-path-edit]` — the edit button
28
+ * - `[data-rtdb-path-form]`, `[data-rtdb-path-prefix]`, `[data-rtdb-path-input]`
29
+ */
30
+ export declare function RtdbPathBar({ path, onNavigate, rootLabel, inputPrefix, className, }: RtdbPathBarProps): import("react").JSX.Element;
31
+ //# sourceMappingURL=RtdbPathBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RtdbPathBar.d.ts","sourceRoot":"","sources":["../../../src/rtdb/components/RtdbPathBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIpF,MAAM,WAAW,gBAAgB;IAC/B,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;gCAC4B;IAC5B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,6EAA6E;IAC7E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,UAAU,EACV,SAAe,EACf,WAAW,EACX,SAAS,GACV,EAAE,gBAAgB,+BA+FlB"}
@@ -0,0 +1,47 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useEffect, useRef, useState } from 'react';
3
+ import { parseRtdbPathInput, rtdbCrumbs } from '../pathInput.js';
4
+ import { normalizeRtdbPath } from '../values.js';
5
+ /**
6
+ * The editable path bar of the RTDB viewer — the interaction form of the
7
+ * Firebase console / firebase-tools-ui database URL bar (clean-room
8
+ * adaptation): in DISPLAY mode the path renders as clickable crumbs
9
+ * (root → … → current) plus an edit affordance; EDIT mode swaps in a text
10
+ * input seeded with the current path — Enter navigates, Escape or blur
11
+ * cancels. Pasted full URLs and missing leading slashes are tolerated
12
+ * (`parseRtdbPathInput`).
13
+ *
14
+ * Headless. Consumers style via:
15
+ * - `[data-pyric-ui="rtdb-path-bar"]` — the root (`data-rtdb-editing` when editing)
16
+ * - `[data-rtdb-crumb]` / `[data-rtdb-crumb-root]` / `[data-pyric-current]`
17
+ * - `[data-rtdb-crumb-separator]`
18
+ * - `[data-rtdb-path-edit]` — the edit button
19
+ * - `[data-rtdb-path-form]`, `[data-rtdb-path-prefix]`, `[data-rtdb-path-input]`
20
+ */
21
+ export function RtdbPathBar({ path, onNavigate, rootLabel = '/', inputPrefix, className, }) {
22
+ const normalized = normalizeRtdbPath(path);
23
+ const [editing, setEditing] = useState(false);
24
+ // UNCONTROLLED input, read at submit: the input mounts fresh per edit
25
+ // session (display mode unmounts it) seeded with the current path, so a
26
+ // cancelled draft never leaks into the next session.
27
+ const inputRef = useRef(null);
28
+ useEffect(() => {
29
+ if (editing)
30
+ inputRef.current?.select();
31
+ }, [editing]);
32
+ const submit = (e) => {
33
+ e.preventDefault();
34
+ onNavigate(parseRtdbPathInput(inputRef.current?.value ?? ''));
35
+ setEditing(false);
36
+ };
37
+ const cancel = () => setEditing(false);
38
+ const crumbs = rtdbCrumbs(normalized);
39
+ return (_jsx("nav", { className: className, "data-pyric-ui": "rtdb-path-bar", "data-rtdb-editing": editing ? '' : undefined, "aria-label": "Database path", children: editing ? (_jsxs("form", { "data-rtdb-path-form": true, onSubmit: submit, children: [inputPrefix ? _jsx("span", { "data-rtdb-path-prefix": true, children: inputPrefix }) : null, _jsx("input", { ref: inputRef, "data-rtdb-path-input": true, "aria-label": "Database path", autoFocus: true, defaultValue: normalized, onBlur: cancel, onKeyDown: (e) => {
40
+ if (e.key === 'Escape')
41
+ cancel();
42
+ }, spellCheck: false })] })) : (_jsxs(_Fragment, { children: [_jsxs("ol", { "data-rtdb-crumb-list": true, children: [_jsx("li", { "data-rtdb-crumb-item": true, children: _jsx("button", { type: "button", "data-rtdb-crumb": true, "data-rtdb-crumb-root": true, "data-pyric-current": crumbs.length === 0 ? '' : undefined, "aria-current": crumbs.length === 0 ? 'page' : undefined, onClick: () => onNavigate('/'), children: rootLabel }) }), crumbs.map((crumb, i) => {
43
+ const isCurrent = i === crumbs.length - 1;
44
+ return (_jsxs("li", { "data-rtdb-crumb-item": true, children: [_jsx("span", { "aria-hidden": true, "data-rtdb-crumb-separator": true, children: "/" }), _jsx("button", { type: "button", "data-rtdb-crumb": true, "data-pyric-current": isCurrent ? '' : undefined, "aria-current": isCurrent ? 'page' : undefined, onClick: () => onNavigate(crumb.path), children: crumb.label })] }, crumb.path));
45
+ })] }), _jsx("button", { type: "button", "data-rtdb-path-edit": true, "aria-label": "Edit path", title: "Edit path", onClick: () => setEditing(true), children: _jsx("svg", { "aria-hidden": true, viewBox: "0 0 16 16", width: "12", height: "12", fill: "currentColor", children: _jsx("path", { d: "M11.7 1.3a1 1 0 0 1 1.4 0l1.6 1.6a1 1 0 0 1 0 1.4l-8.5 8.5-3.4 1.1a.5.5 0 0 1-.63-.63l1.1-3.4 8.43-8.57ZM10.9 3.5l1.6 1.6 1.2-1.2-1.6-1.6-1.2 1.2Z" }) }) })] })) }));
46
+ }
47
+ //# sourceMappingURL=RtdbPathBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RtdbPathBar.js","sourceRoot":"","sources":["../../../src/rtdb/components/RtdbPathBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAkC,MAAM,OAAO,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAejD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,IAAI,EACJ,UAAU,EACV,SAAS,GAAG,GAAG,EACf,WAAW,EACX,SAAS,GACQ;IACjB,MAAM,UAAU,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,sEAAsE;IACtE,wEAAwE;IACxE,qDAAqD;IACrD,MAAM,QAAQ,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IAEhD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO;YAAE,QAAQ,CAAC,OAAO,EA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,CAAC,UAAU,CAAC,GAAG,CAAC,YAE7B,SAAS,GACH,GACN,EACJ,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;4BACvB,MAAM,SAAS,GAAG,CAAC,KAAK,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;4BAC1C,OAAO,CACL,uDACE,uFAEO,EACP,iBACE,IAAI,EAAC,QAAQ,iDAEO,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,kBAChC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAC5C,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,YAEpC,KAAK,CAAC,KAAK,GACL,KAZF,KAAK,CAAC,IAAI,CAad,CACN,CAAC;wBACJ,CAAC,CAAC,IACC,EACL,iBACE,IAAI,EAAC,QAAQ,6CAEF,WAAW,EACtB,KAAK,EAAC,WAAW,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,YAE/B,mCAAiB,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,cAAc,YAC7E,eAAM,CAAC,EAAC,oJAAoJ,GAAG,GAC3J,GACC,IACR,CACJ,GACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { RtdbApi } from '../rtdbApi.js';
3
+ import type { RtdbTreeController } from '../hooks/useRtdbTree.js';
4
+ export interface RtdbTreeProps {
5
+ /** The live tree controller from `useRtdbTree`. */
6
+ tree: RtdbTreeController;
7
+ /** Mutation backend (admin lens in Studio). */
8
+ api: RtdbApi;
9
+ /** Key-click navigation: re-roots the viewer at the clicked node (wire to
10
+ * the same path state as the path bar). */
11
+ onNavigate?: (path: string) => void;
12
+ /** Label for the view-root row when the root is `'/'` — the database /
13
+ * instance identity. Default `'/'`. */
14
+ rootLabel?: ReactNode;
15
+ className?: string;
16
+ }
17
+ /**
18
+ * The RTDB data tree — the interaction form of the Firebase console /
19
+ * firebase-tools-ui database viewer (clean-room adaptation of the
20
+ * NodeContainer/NodeParent/NodeLeaf split):
21
+ *
22
+ * - parents render a caret (expand/collapse), leaves a `key: value` row;
23
+ * - keys navigate (re-root the view), carets only toggle;
24
+ * - hover/focus reveals per-node actions: `+` add child, `×` delete —
25
+ * delete flips to an INLINE two-step confirm (no modal, C3);
26
+ * - leaf values are click-to-edit inline (type select: string / number /
27
+ * boolean / JSON);
28
+ * - wide levels page at `tree.pageSize` with a "show more" row (the console's
29
+ * form — see `reducers/tree.ts` for why paging over virtualization).
30
+ *
31
+ * Headless: consumers style `[data-pyric-ui="rtdb-tree"]` and the
32
+ * `data-rtdb-*` attributes (`node`, `row`, `caret`, `key`, `sep`, `value`,
33
+ * `actions`, `action-add`, `action-delete`, `confirm`, `editor`, `children`,
34
+ * `show-more`, `error`, `loading`). An empty root renders the console's
35
+ * classic form — `<root>: null` — not an instructional empty state.
36
+ */
37
+ export declare function RtdbTree({ tree, api, onNavigate, rootLabel, className }: RtdbTreeProps): import("react").JSX.Element;
38
+ //# sourceMappingURL=RtdbTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RtdbTree.d.ts","sourceRoot":"","sources":["../../../src/rtdb/components/RtdbTree.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAiBlE,MAAM,WAAW,aAAa;IAC5B,mDAAmD;IACnD,IAAI,EAAE,kBAAkB,CAAC;IACzB,+CAA+C;IAC/C,GAAG,EAAE,OAAO,CAAC;IACb;gDAC4C;IAC5C,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC;4CACwC;IACxC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,SAAe,EAAE,SAAS,EAAE,EAAE,aAAa,+BA0B5F"}
@@ -0,0 +1,103 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useRef, useState } from 'react';
3
+ import { RTDB_EDITOR_TYPES, coerceRtdbEditorValue, formatRtdbEditorValue, inferRtdbEditorType, rtdbKeyInputError, } from '../editor.js';
4
+ import { formatRtdbValueLabel, hasRtdbChildren, joinRtdbPath, rtdbPathSegments, rtdbValueKind, } from '../values.js';
5
+ /**
6
+ * The RTDB data tree — the interaction form of the Firebase console /
7
+ * firebase-tools-ui database viewer (clean-room adaptation of the
8
+ * NodeContainer/NodeParent/NodeLeaf split):
9
+ *
10
+ * - parents render a caret (expand/collapse), leaves a `key: value` row;
11
+ * - keys navigate (re-root the view), carets only toggle;
12
+ * - hover/focus reveals per-node actions: `+` add child, `×` delete —
13
+ * delete flips to an INLINE two-step confirm (no modal, C3);
14
+ * - leaf values are click-to-edit inline (type select: string / number /
15
+ * boolean / JSON);
16
+ * - wide levels page at `tree.pageSize` with a "show more" row (the console's
17
+ * form — see `reducers/tree.ts` for why paging over virtualization).
18
+ *
19
+ * Headless: consumers style `[data-pyric-ui="rtdb-tree"]` and the
20
+ * `data-rtdb-*` attributes (`node`, `row`, `caret`, `key`, `sep`, `value`,
21
+ * `actions`, `action-add`, `action-delete`, `confirm`, `editor`, `children`,
22
+ * `show-more`, `error`, `loading`). An empty root renders the console's
23
+ * classic form — `<root>: null` — not an instructional empty state.
24
+ */
25
+ export function RtdbTree({ tree, api, onNavigate, rootLabel = '/', className }) {
26
+ const { state } = tree;
27
+ const rootSegments = rtdbPathSegments(state.path);
28
+ const rootKey = rootSegments.length === 0 ? rootLabel : rootSegments[rootSegments.length - 1];
29
+ return (_jsx("div", { className: className, "data-pyric-ui": "rtdb-tree", children: state.status === 'loading' ? (_jsx("p", { "data-rtdb-loading": true, children: "Loading\u2026" })) : state.status === 'error' ? (_jsx("p", { role: "alert", "data-rtdb-error": true, children: state.error })) : (_jsx(Node, { tree: tree, api: api, onNavigate: onNavigate, path: state.path, label: rootKey, isViewRoot: true })) }));
30
+ }
31
+ function Node({ tree, api, onNavigate, path, label, isViewRoot }) {
32
+ const value = tree.valueAt(path);
33
+ const isParent = hasRtdbChildren(value);
34
+ const expanded = tree.isExpanded(path);
35
+ const [adding, setAdding] = useState(false);
36
+ const [editing, setEditing] = useState(false);
37
+ const [confirming, setConfirming] = useState(false);
38
+ const [actionError, setActionError] = useState(null);
39
+ const run = async (op, done) => {
40
+ try {
41
+ await op();
42
+ setActionError(null);
43
+ done();
44
+ }
45
+ catch (e) {
46
+ setActionError(e instanceof Error ? e.message : String(e));
47
+ }
48
+ };
49
+ const openAdd = () => {
50
+ setAdding(true);
51
+ setConfirming(false);
52
+ if (isParent && !expanded)
53
+ tree.toggle(path);
54
+ };
55
+ const children = isParent && expanded ? tree.childrenAt(path) : null;
56
+ return (_jsxs("div", { "data-rtdb-node": true, "data-rtdb-kind": isParent ? 'parent' : 'leaf', "data-rtdb-view-root": isViewRoot ? '' : undefined, "data-rtdb-expanded": isParent && expanded ? '' : undefined, children: [_jsxs("div", { "data-rtdb-row": true, children: [isParent && !isViewRoot ? (_jsx("button", { type: "button", "data-rtdb-caret": true, "aria-expanded": expanded, "aria-label": expanded ? 'Collapse' : 'Expand', onClick: () => tree.toggle(path), children: _jsx("svg", { "aria-hidden": true, viewBox: "0 0 8 8", width: "8", height: "8", fill: "currentColor", children: _jsx("path", { d: "M1 0l6 4-6 4z" }) }) })) : (_jsx("span", { "aria-hidden": true, "data-rtdb-caret-spacer": true })), _jsx("button", { type: "button", "data-rtdb-key": true, "aria-label": "Key name", onClick: () => onNavigate?.(path), children: label }), !isParent ? (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": true, "data-rtdb-sep": true, children: ":" }), _jsx("button", { type: "button", "data-rtdb-value": true, "data-rtdb-type": rtdbValueKind(value), title: "Edit value", onClick: () => {
57
+ setEditing(true);
58
+ setConfirming(false);
59
+ }, children: formatRtdbValueLabel(value) })] })) : null, _jsx("span", { "data-rtdb-actions": true, children: confirming ? (_jsxs("span", { "data-rtdb-confirm": true, children: [_jsxs("span", { "data-rtdb-confirm-label": true, children: ["Delete", isParent ? ' subtree' : '', "?"] }), _jsx("button", { type: "button", "data-rtdb-confirm-yes": true, onClick: () => void run(() => api.remove(path), () => setConfirming(false)), children: "Delete" }), _jsx("button", { type: "button", "data-rtdb-confirm-no": true, onClick: () => setConfirming(false), children: "Cancel" })] })) : (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", "data-rtdb-action-add": true, "aria-label": `Add child to ${pathLabel(path)}`, title: "Add child", onClick: openAdd, children: "+" }), _jsx("button", { type: "button", "data-rtdb-action-delete": true, "aria-label": `Delete ${pathLabel(path)}`, title: "Delete", onClick: () => setConfirming(true), children: "\u00D7" })] })) })] }), actionError ? (_jsx("p", { role: "alert", "data-rtdb-error": true, children: actionError })) : null, editing ? (_jsx(ValueEditor, { initialType: inferRtdbEditorType(value), initialText: formatRtdbEditorValue(value, inferRtdbEditorType(value)), submitLabel: "Save", onCancel: () => setEditing(false), onSubmit: (next) => run(() => api.set(path, next), () => setEditing(false)) })) : null, adding ? (_jsx(ValueEditor, { withKey: true, initialType: "string", initialText: "", submitLabel: "Add", onCancel: () => setAdding(false), onSubmit: (next, key) => run(() => api.set(joinRtdbPath(path, key), next), () => setAdding(false)) })) : null, children ? (_jsxs("ul", { "data-rtdb-children": true, children: [children.entries.map(([key]) => (_jsx("li", { children: _jsx(Node, { tree: tree, api: api, onNavigate: onNavigate, path: joinRtdbPath(path, key), label: key }) }, key))), children.hiddenCount > 0 ? (_jsx("li", { "data-rtdb-show-more-item": true, children: _jsxs("button", { type: "button", "data-rtdb-show-more": true, onClick: () => tree.showMore(path), children: ["Show more (", children.hiddenCount, " hidden)"] }) })) : null] })) : null] }));
60
+ }
61
+ /** Last segment for aria labels; `'/'` reads as "root". */
62
+ function pathLabel(path) {
63
+ const segments = rtdbPathSegments(path);
64
+ return segments.length === 0 ? 'root' : segments[segments.length - 1];
65
+ }
66
+ /**
67
+ * Inline key/value editor row (add + edit flows). Escape cancels.
68
+ *
69
+ * The key + value fields are UNCONTROLLED and read at submit — validation
70
+ * happens on submit (errors render inline), so per-keystroke state buys
71
+ * nothing. Only the type select is controlled (it decides whether the value
72
+ * control is a text input or a true/false select).
73
+ */
74
+ function ValueEditor({ withKey, initialType, initialText, submitLabel, onSubmit, onCancel, }) {
75
+ const keyRef = useRef(null);
76
+ const valueRef = useRef(null);
77
+ const [type, setType] = useState(initialType);
78
+ const [error, setError] = useState(null);
79
+ const submit = (e) => {
80
+ e.preventDefault();
81
+ const key = keyRef.current?.value ?? '';
82
+ if (withKey) {
83
+ const keyError = rtdbKeyInputError(key);
84
+ if (keyError) {
85
+ setError(keyError);
86
+ return;
87
+ }
88
+ }
89
+ const coerced = coerceRtdbEditorValue(type, valueRef.current?.value ?? '');
90
+ if (!coerced.ok) {
91
+ setError(coerced.error);
92
+ return;
93
+ }
94
+ setError(null);
95
+ void onSubmit(coerced.value, withKey ? key.trim() : undefined);
96
+ };
97
+ const onEscape = (e) => {
98
+ if (e.key === 'Escape')
99
+ onCancel();
100
+ };
101
+ return (_jsxs("form", { "data-rtdb-editor": true, onSubmit: submit, children: [withKey ? (_jsx("input", { ref: keyRef, "data-rtdb-editor-key": true, "aria-label": "Child key", placeholder: "key", autoFocus: true, onKeyDown: onEscape, spellCheck: false })) : null, _jsx("select", { "data-rtdb-editor-type": true, "aria-label": "Value type", value: type, onChange: (e) => setType(e.currentTarget.value), onKeyDown: onEscape, children: RTDB_EDITOR_TYPES.map((t) => (_jsx("option", { value: t, children: t }, t))) }), type === 'boolean' ? (_jsxs("select", { ref: valueRef, "data-rtdb-editor-value": true, "aria-label": "Value", defaultValue: initialText.trim().toLowerCase() === 'true' ? 'true' : 'false', onKeyDown: onEscape, children: [_jsx("option", { value: "true", children: "true" }), _jsx("option", { value: "false", children: "false" })] })) : (_jsx("input", { ref: valueRef, "data-rtdb-editor-value": true, "aria-label": "Value", placeholder: type === 'json' ? '{ "key": "value" }' : 'value', autoFocus: !withKey, defaultValue: initialText, onKeyDown: onEscape, spellCheck: false })), _jsx("button", { type: "submit", "data-rtdb-editor-save": true, children: submitLabel }), _jsx("button", { type: "button", "data-rtdb-editor-cancel": true, onClick: onCancel, children: "Cancel" }), error ? (_jsx("span", { role: "alert", "data-rtdb-editor-error": true, children: error })) : null] }));
102
+ }
103
+ //# sourceMappingURL=RtdbTree.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RtdbTree.js","sourceRoot":"","sources":["../../../src/rtdb/components/RtdbTree.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAkC,MAAM,OAAO,CAAC;AAGzE,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,GAElB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,aAAa,GACd,MAAM,cAAc,CAAC;AAgBtB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,GAAG,GAAG,EAAE,SAAS,EAAiB;IAC3F,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IACvB,MAAM,YAAY,GAAG,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClD,MAAM,OAAO,GACX,YAAY,CAAC,MAAM,KAAK,CAA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,YAElB,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAC5B,iBAAgB,KAAK,EAAE,CAAC,YACrB,CAAC,IADS,CAAC,CAEL,CACV,CAAC,GACK,EACR,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,CACpB,kBACE,GAAG,EAAE,QAAiD,gDAE3C,OAAO,EAClB,YAAY,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAC5E,SAAS,EAAE,QAAQ,aAEnB,iBAAQ,KAAK,EAAC,MAAM,qBAAc,EAClC,iBAAQ,KAAK,EAAC,OAAO,sBAAe,IAC7B,CACV,CAAC,CAAC,CAAC,CACF,gBACE,GAAG,EAAE,QAAgD,gDAE1C,OAAO,EAClB,WAAW,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,OAAO,EAC7D,SAAS,EAAE,CAAC,OAAO,EACnB,YAAY,EAAE,WAAW,EACzB,SAAS,EAAE,QAAQ,EACnB,UAAU,EAAE,KAAK,GACjB,CACH,EACD,iBAAQ,IAAI,EAAC,QAAQ,2CAClB,WAAW,GACL,EACT,iBAAQ,IAAI,EAAC,QAAQ,mCAAyB,OAAO,EAAE,QAAQ,uBAEtD,EACR,KAAK,CAAC,CAAC,CAAC,CACP,eAAM,IAAI,EAAC,OAAO,4CACf,KAAK,GACD,CACR,CAAC,CAAC,CAAC,IAAI,IACH,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Inline value-editor logic (pure): the type select + text input pair used by
3
+ * the tree's click-to-edit and add-child rows. Four author-facing types cover
4
+ * every RTDB value: string / number / boolean scalars, and `json` for
5
+ * objects/arrays/null (or any hand-written literal).
6
+ */
7
+ export type RtdbEditorType = 'string' | 'number' | 'boolean' | 'json';
8
+ export declare const RTDB_EDITOR_TYPES: readonly RtdbEditorType[];
9
+ /** The editor type a value opens under when clicked. */
10
+ export declare function inferRtdbEditorType(value: unknown): RtdbEditorType;
11
+ /** Seed the editor's text field from the current value under a type. */
12
+ export declare function formatRtdbEditorValue(value: unknown, type: RtdbEditorType): string;
13
+ /** Why a typed child key is unusable, or `null` when it's fine. RTDB forbids
14
+ * `. $ # [ ] /` in keys (a `/` would silently create a nested path). */
15
+ export declare function rtdbKeyInputError(key: string): string | null;
16
+ export type RtdbEditorResult = {
17
+ ok: true;
18
+ value: unknown;
19
+ } | {
20
+ ok: false;
21
+ error: string;
22
+ };
23
+ /** Coerce the editor's text under the selected type, or explain why not. */
24
+ export declare function coerceRtdbEditorValue(type: RtdbEditorType, text: string): RtdbEditorResult;
25
+ //# sourceMappingURL=editor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../src/rtdb/editor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;AAEtE,eAAO,MAAM,iBAAiB,EAAE,SAAS,cAAc,EAKtD,CAAC;AAEF,wDAAwD;AACxD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,CAWlE;AAED,wEAAwE;AACxE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,GAAG,MAAM,CAIlF;AAED;yEACyE;AACzE,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK5D;AAED,MAAM,MAAM,gBAAgB,GACxB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAC5B;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjC,4EAA4E;AAC5E,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,gBAAgB,CA2B1F"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Inline value-editor logic (pure): the type select + text input pair used by
3
+ * the tree's click-to-edit and add-child rows. Four author-facing types cover
4
+ * every RTDB value: string / number / boolean scalars, and `json` for
5
+ * objects/arrays/null (or any hand-written literal).
6
+ */
7
+ export const RTDB_EDITOR_TYPES = [
8
+ 'string',
9
+ 'number',
10
+ 'boolean',
11
+ 'json',
12
+ ];
13
+ /** The editor type a value opens under when clicked. */
14
+ export function inferRtdbEditorType(value) {
15
+ switch (typeof value) {
16
+ case 'string':
17
+ return 'string';
18
+ case 'number':
19
+ return 'number';
20
+ case 'boolean':
21
+ return 'boolean';
22
+ default:
23
+ return 'json';
24
+ }
25
+ }
26
+ /** Seed the editor's text field from the current value under a type. */
27
+ export function formatRtdbEditorValue(value, type) {
28
+ if (type === 'json')
29
+ return JSON.stringify(value ?? null);
30
+ if (value === null || value === undefined)
31
+ return '';
32
+ return String(value);
33
+ }
34
+ /** Why a typed child key is unusable, or `null` when it's fine. RTDB forbids
35
+ * `. $ # [ ] /` in keys (a `/` would silently create a nested path). */
36
+ export function rtdbKeyInputError(key) {
37
+ if (key.trim().length === 0)
38
+ return 'Enter a key.';
39
+ const bad = key.match(/[.$#[\]/]/);
40
+ if (bad)
41
+ return `Keys can't contain "${bad[0]}".`;
42
+ return null;
43
+ }
44
+ /** Coerce the editor's text under the selected type, or explain why not. */
45
+ export function coerceRtdbEditorValue(type, text) {
46
+ switch (type) {
47
+ case 'string':
48
+ return { ok: true, value: text };
49
+ case 'number': {
50
+ const trimmed = text.trim();
51
+ if (trimmed.length === 0)
52
+ return { ok: false, error: 'Enter a number.' };
53
+ const n = Number(trimmed);
54
+ if (Number.isNaN(n))
55
+ return { ok: false, error: `"${text}" is not a number.` };
56
+ return { ok: true, value: n };
57
+ }
58
+ case 'boolean': {
59
+ const t = text.trim().toLowerCase();
60
+ if (t === 'true')
61
+ return { ok: true, value: true };
62
+ if (t === 'false')
63
+ return { ok: true, value: false };
64
+ return { ok: false, error: 'Enter true or false.' };
65
+ }
66
+ case 'json': {
67
+ const t = text.trim();
68
+ if (t.length === 0)
69
+ return { ok: true, value: null };
70
+ try {
71
+ return { ok: true, value: JSON.parse(t) };
72
+ }
73
+ catch (e) {
74
+ return { ok: false, error: e instanceof Error ? e.message : 'Invalid JSON.' };
75
+ }
76
+ }
77
+ }
78
+ }
79
+ //# sourceMappingURL=editor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor.js","sourceRoot":"","sources":["../../src/rtdb/editor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,MAAM,iBAAiB,GAA8B;IAC1D,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,MAAM;CACP,CAAC;AAEF,wDAAwD;AACxD,MAAM,UAAU,mBAAmB,CAAC,KAAc;IAChD,QAAQ,OAAO,KAAK,EAAE,CAAC;QACrB,KAAK,QAAQ;YACX,OAAO,QAAQ,CAAC;QAClB,KAAK,QAAQ;YACX,OAAO,QAAQ,CAAC;QAClB,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB;YACE,OAAO,MAAM,CAAC;IAClB,CAAC;AACH,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,qBAAqB,CAAC,KAAc,EAAE,IAAoB;IACxE,IAAI,IAAI,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC;IAC1D,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACrD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AAED;yEACyE;AACzE,MAAM,UAAU,iBAAiB,CAAC,GAAW;IAC3C,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,cAAc,CAAC;IACnD,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ACtD,CAAC;QACD,KAAK,MAAM,CAAC,CAAC,CAAC;YACZ,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;YACtB,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;YACrD,IAAI,CAAC;gBACH,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;YAC5C,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC;YAChF,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { RtdbApi } from '../rtdbApi.js';
2
+ import { type RtdbTreeState, type RtdbVisibleChildren } from '../reducers/tree.js';
3
+ /** Console-style child paging (Firebase console shows 50, then "show more"). */
4
+ export declare const RTDB_DEFAULT_PAGE_SIZE = 50;
5
+ export interface UseRtdbTreeOptions {
6
+ /** Children rendered per level before "show more". Default 50. */
7
+ pageSize?: number;
8
+ }
9
+ /**
10
+ * Everything a tree view needs: the reducer state plus path-addressed
11
+ * selectors and the expansion/paging commands. All paths are ABSOLUTE
12
+ * database paths.
13
+ */
14
+ export interface RtdbTreeController {
15
+ state: RtdbTreeState;
16
+ pageSize: number;
17
+ valueAt(path: string): unknown;
18
+ isExpanded(path: string): boolean;
19
+ childrenAt(path: string): RtdbVisibleChildren;
20
+ toggle(path: string): void;
21
+ showMore(path: string): void;
22
+ }
23
+ /**
24
+ * Live tree state for the RTDB viewer: subscribes to the value at the view
25
+ * root `path` (realtime — every write re-delivers the subtree) and runs the
26
+ * expansion/paging reducer over it. See `reducers/tree.ts` for the
27
+ * one-subscription-per-view-root loading strategy and why expansion is a
28
+ * pure render toggle rather than a fetch.
29
+ */
30
+ export declare function useRtdbTree(api: RtdbApi, path: string, options?: UseRtdbTreeOptions): RtdbTreeController;
31
+ //# sourceMappingURL=useRtdbTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRtdbTree.d.ts","sourceRoot":"","sources":["../../../src/rtdb/hooks/useRtdbTree.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAML,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACzB,MAAM,qBAAqB,CAAC;AAE7B,gFAAgF;AAChF,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,MAAM,WAAW,kBAAkB;IACjC,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAC/B,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAClC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,CAAC;IAC9C,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,kBAAuB,GAC/B,kBAAkB,CAyDpB"}
@@ -0,0 +1,49 @@
1
+ import { useCallback, useEffect, useMemo, useReducer } from 'react';
2
+ import { normalizeRtdbPath } from '../values.js';
3
+ import { initialRtdbTree, isRtdbPathExpanded, rtdbTreeReducer, rtdbTreeValueAt, rtdbVisibleChildren, } from '../reducers/tree.js';
4
+ /** Console-style child paging (Firebase console shows 50, then "show more"). */
5
+ export const RTDB_DEFAULT_PAGE_SIZE = 50;
6
+ /**
7
+ * Live tree state for the RTDB viewer: subscribes to the value at the view
8
+ * root `path` (realtime — every write re-delivers the subtree) and runs the
9
+ * expansion/paging reducer over it. See `reducers/tree.ts` for the
10
+ * one-subscription-per-view-root loading strategy and why expansion is a
11
+ * pure render toggle rather than a fetch.
12
+ */
13
+ export function useRtdbTree(api, path, options = {}) {
14
+ const pageSize = options.pageSize ?? RTDB_DEFAULT_PAGE_SIZE;
15
+ const normalized = normalizeRtdbPath(path);
16
+ const [state, dispatch] = useReducer(rtdbTreeReducer, normalized, initialRtdbTree);
17
+ // Keep the reducer's view root in lockstep with the prop BEFORE the
18
+ // subscription effect below re-runs, so a snapshot for the new root never
19
+ // lands on the old root's state.
20
+ if (state.path !== normalized) {
21
+ dispatch({ type: 'navigate', path: normalized });
22
+ }
23
+ useEffect(() => {
24
+ let cancelled = false;
25
+ const unsubscribe = api.subscribeValue(normalized, (value) => {
26
+ if (!cancelled)
27
+ dispatch({ type: 'value', path: normalized, value });
28
+ }, (err) => {
29
+ if (!cancelled) {
30
+ dispatch({
31
+ type: 'error',
32
+ path: normalized,
33
+ message: err instanceof Error ? err.message : String(err),
34
+ });
35
+ }
36
+ });
37
+ return () => {
38
+ cancelled = true;
39
+ unsubscribe();
40
+ };
41
+ }, [api, normalized]);
42
+ const valueAt = useCallback((p) => rtdbTreeValueAt(state, p), [state]);
43
+ const isExpanded = useCallback((p) => isRtdbPathExpanded(state, p), [state]);
44
+ const childrenAt = useCallback((p) => rtdbVisibleChildren(state, p, pageSize), [state, pageSize]);
45
+ const toggle = useCallback((p) => dispatch({ type: 'toggle', path: p }), []);
46
+ const showMore = useCallback((p) => dispatch({ type: 'show-more', path: p, pageSize }), [pageSize]);
47
+ return useMemo(() => ({ state, pageSize, valueAt, isExpanded, childrenAt, toggle, showMore }), [state, pageSize, valueAt, isExpanded, childrenAt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AE,CAAC,EACjE,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,EAC9E,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CACrE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * `@pyric/ui/rtdb` — the headless RTDB data viewer, in the Firebase console /
3
+ * firebase-tools-ui form: an editable path bar (crumbs + direct path entry)
4
+ * over an expandable tree with inline add/edit/delete affordances. Follows
5
+ * this package's firestore/auth/storage split: pure logic + hooks +
6
+ * unstyled components on `data-*` styling contracts; the consumer (Studio)
7
+ * brings the CSS and the backend bundle ({@link RtdbApi}).
8
+ */
9
+ export { normalizeRtdbPath, rtdbPathSegments, joinRtdbPath, parentRtdbPath, relativeRtdbPath, isRtdbObjectValue, hasRtdbChildren, rtdbChildEntries, rtdbValueAt, formatRtdbJson, parseRtdbJson, rtdbValueKind, previewRtdbValue, normalizeRtdbSnapshotValue, formatRtdbValueLabel, } from './values.js';
10
+ export { parseRtdbPathInput, rtdbCrumbs, type RtdbCrumb } from './pathInput.js';
11
+ export { RTDB_EDITOR_TYPES, inferRtdbEditorType, formatRtdbEditorValue, coerceRtdbEditorValue, rtdbKeyInputError, type RtdbEditorType, type RtdbEditorResult, } from './editor.js';
12
+ export type { RtdbApi } from './rtdbApi.js';
13
+ export { initialRtdbTree, rtdbTreeReducer, rtdbTreeValueAt, isRtdbPathExpanded, rtdbVisibleChildren, type RtdbTreeState, type RtdbTreeAction, type RtdbVisibleChildren, } from './reducers/tree.js';
14
+ export { useRtdbTree, RTDB_DEFAULT_PAGE_SIZE, type UseRtdbTreeOptions, type RtdbTreeController, } from './hooks/useRtdbTree.js';
15
+ export { RtdbPathBar, type RtdbPathBarProps } from './components/RtdbPathBar.js';
16
+ export { RtdbTree, type RtdbTreeProps } from './components/RtdbTree.js';
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rtdb/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhF,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACtB,MAAM,aAAa,CAAC;AAGrB,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,OAAO,EACL,eAAe,EACf,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC"}