@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.
- package/README.md +79 -0
- package/dist/agents/ContextWindowUsage.d.ts +67 -0
- package/dist/agents/ContextWindowUsage.d.ts.map +1 -0
- package/dist/agents/ContextWindowUsage.js +115 -0
- package/dist/agents/ContextWindowUsage.js.map +1 -0
- package/dist/agents/EmptyState.d.ts +18 -0
- package/dist/agents/EmptyState.d.ts.map +1 -0
- package/dist/agents/EmptyState.js +11 -0
- package/dist/agents/EmptyState.js.map +1 -0
- package/dist/agents/Fold.d.ts +37 -0
- package/dist/agents/Fold.d.ts.map +1 -0
- package/dist/agents/Fold.js +18 -0
- package/dist/agents/Fold.js.map +1 -0
- package/dist/agents/Modal.d.ts +25 -0
- package/dist/agents/Modal.d.ts.map +1 -0
- package/dist/agents/Modal.js +28 -0
- package/dist/agents/Modal.js.map +1 -0
- package/dist/agents/PulsingDot.d.ts +21 -0
- package/dist/agents/PulsingDot.d.ts.map +1 -0
- package/dist/agents/PulsingDot.js +18 -0
- package/dist/agents/PulsingDot.js.map +1 -0
- package/dist/agents/index.d.ts +15 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +15 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/auth/authApi.d.ts +32 -0
- package/dist/auth/authApi.d.ts.map +1 -0
- package/dist/auth/authApi.js +27 -0
- package/dist/auth/authApi.js.map +1 -0
- package/dist/auth/claims.d.ts +27 -0
- package/dist/auth/claims.d.ts.map +1 -0
- package/dist/auth/claims.js +58 -0
- package/dist/auth/claims.js.map +1 -0
- package/dist/auth/components/AuthProviderToggles.d.ts +31 -0
- package/dist/auth/components/AuthProviderToggles.d.ts.map +1 -0
- package/dist/auth/components/AuthProviderToggles.js +48 -0
- package/dist/auth/components/AuthProviderToggles.js.map +1 -0
- package/dist/auth/components/AuthSignInHelper.d.ts +57 -0
- package/dist/auth/components/AuthSignInHelper.d.ts.map +1 -0
- package/dist/auth/components/AuthSignInHelper.js +69 -0
- package/dist/auth/components/AuthSignInHelper.js.map +1 -0
- package/dist/auth/components/AuthUserForm.d.ts +84 -0
- package/dist/auth/components/AuthUserForm.d.ts.map +1 -0
- package/dist/auth/components/AuthUserForm.js +89 -0
- package/dist/auth/components/AuthUserForm.js.map +1 -0
- package/dist/auth/components/AuthUserList.d.ts +51 -0
- package/dist/auth/components/AuthUserList.d.ts.map +1 -0
- package/dist/auth/components/AuthUserList.js +46 -0
- package/dist/auth/components/AuthUserList.js.map +1 -0
- package/dist/auth/components/ClaimsField.d.ts +22 -0
- package/dist/auth/components/ClaimsField.d.ts.map +1 -0
- package/dist/auth/components/ClaimsField.js +11 -0
- package/dist/auth/components/ClaimsField.js.map +1 -0
- package/dist/auth/components/confirmActions.d.ts +40 -0
- package/dist/auth/components/confirmActions.d.ts.map +1 -0
- package/dist/auth/components/confirmActions.js +49 -0
- package/dist/auth/components/confirmActions.js.map +1 -0
- package/dist/auth/controller.d.ts +73 -0
- package/dist/auth/controller.d.ts.map +1 -0
- package/dist/auth/controller.js +139 -0
- package/dist/auth/controller.js.map +1 -0
- package/dist/auth/hooks/index.d.ts +7 -0
- package/dist/auth/hooks/index.d.ts.map +1 -0
- package/dist/auth/hooks/index.js +7 -0
- package/dist/auth/hooks/index.js.map +1 -0
- package/dist/auth/hooks/useAuthFlowHelper.d.ts +30 -0
- package/dist/auth/hooks/useAuthFlowHelper.d.ts.map +1 -0
- package/dist/auth/hooks/useAuthFlowHelper.js +30 -0
- package/dist/auth/hooks/useAuthFlowHelper.js.map +1 -0
- package/dist/auth/hooks/useAuthProviderConfig.d.ts +37 -0
- package/dist/auth/hooks/useAuthProviderConfig.d.ts.map +1 -0
- package/dist/auth/hooks/useAuthProviderConfig.js +98 -0
- package/dist/auth/hooks/useAuthProviderConfig.js.map +1 -0
- package/dist/auth/hooks/useAuthUserEditor.d.ts +30 -0
- package/dist/auth/hooks/useAuthUserEditor.d.ts.map +1 -0
- package/dist/auth/hooks/useAuthUserEditor.js +27 -0
- package/dist/auth/hooks/useAuthUserEditor.js.map +1 -0
- package/dist/auth/hooks/useAuthUsers.d.ts +38 -0
- package/dist/auth/hooks/useAuthUsers.d.ts.map +1 -0
- package/dist/auth/hooks/useAuthUsers.js +111 -0
- package/dist/auth/hooks/useAuthUsers.js.map +1 -0
- package/dist/auth/index.d.ts +11 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +13 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/providers.d.ts +11 -0
- package/dist/auth/providers.d.ts.map +1 -0
- package/dist/auth/providers.js +28 -0
- package/dist/auth/providers.js.map +1 -0
- package/dist/auth/reducers/userEditor.d.ts +55 -0
- package/dist/auth/reducers/userEditor.d.ts.map +1 -0
- package/dist/auth/reducers/userEditor.js +136 -0
- package/dist/auth/reducers/userEditor.js.map +1 -0
- package/dist/events/components/ActivityActionItems.d.ts +45 -0
- package/dist/events/components/ActivityActionItems.d.ts.map +1 -0
- package/dist/events/components/ActivityActionItems.js +68 -0
- package/dist/events/components/ActivityActionItems.js.map +1 -0
- package/dist/events/components/ActivityGrid.d.ts +65 -0
- package/dist/events/components/ActivityGrid.d.ts.map +1 -0
- package/dist/events/components/ActivityGrid.js +61 -0
- package/dist/events/components/ActivityGrid.js.map +1 -0
- package/dist/events/components/ActivityGridRow.d.ts +31 -0
- package/dist/events/components/ActivityGridRow.d.ts.map +1 -0
- package/dist/events/components/ActivityGridRow.js +23 -0
- package/dist/events/components/ActivityGridRow.js.map +1 -0
- package/dist/events/components/ProposedChangeDiff.d.ts +46 -0
- package/dist/events/components/ProposedChangeDiff.d.ts.map +1 -0
- package/dist/events/components/ProposedChangeDiff.js +60 -0
- package/dist/events/components/ProposedChangeDiff.js.map +1 -0
- package/dist/events/components/format.d.ts +11 -0
- package/dist/events/components/format.d.ts.map +1 -0
- package/dist/events/components/format.js +26 -0
- package/dist/events/components/format.js.map +1 -0
- package/dist/events/components/index.d.ts +6 -0
- package/dist/events/components/index.d.ts.map +1 -0
- package/dist/events/components/index.js +6 -0
- package/dist/events/components/index.js.map +1 -0
- package/dist/events/digest.d.ts +167 -0
- package/dist/events/digest.d.ts.map +1 -0
- package/dist/events/digest.js +426 -0
- package/dist/events/digest.js.map +1 -0
- package/dist/events/hooks/index.d.ts +3 -0
- package/dist/events/hooks/index.d.ts.map +1 -0
- package/dist/events/hooks/index.js +3 -0
- package/dist/events/hooks/index.js.map +1 -0
- package/dist/events/hooks/useActivityDigest.d.ts +27 -0
- package/dist/events/hooks/useActivityDigest.d.ts.map +1 -0
- package/dist/events/hooks/useActivityDigest.js +18 -0
- package/dist/events/hooks/useActivityDigest.js.map +1 -0
- package/dist/events/hooks/useActivityStream.d.ts +44 -0
- package/dist/events/hooks/useActivityStream.d.ts.map +1 -0
- package/dist/events/hooks/useActivityStream.js +38 -0
- package/dist/events/hooks/useActivityStream.js.map +1 -0
- package/dist/events/index.d.ts +15 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +14 -0
- package/dist/events/index.js.map +1 -0
- package/dist/events/types.d.ts +160 -0
- package/dist/events/types.d.ts.map +1 -0
- package/dist/events/types.js +21 -0
- package/dist/events/types.js.map +1 -0
- package/dist/firestore/components/CollectionList.d.ts +22 -0
- package/dist/firestore/components/CollectionList.d.ts.map +1 -0
- package/dist/firestore/components/CollectionList.js +21 -0
- package/dist/firestore/components/CollectionList.js.map +1 -0
- package/dist/firestore/components/DeleteWithConfirm.d.ts +38 -0
- package/dist/firestore/components/DeleteWithConfirm.d.ts.map +1 -0
- package/dist/firestore/components/DeleteWithConfirm.js +33 -0
- package/dist/firestore/components/DeleteWithConfirm.js.map +1 -0
- package/dist/firestore/components/DocumentEditor.d.ts +47 -0
- package/dist/firestore/components/DocumentEditor.d.ts.map +1 -0
- package/dist/firestore/components/DocumentEditor.js +176 -0
- package/dist/firestore/components/DocumentEditor.js.map +1 -0
- package/dist/firestore/components/DocumentList.d.ts +60 -0
- package/dist/firestore/components/DocumentList.d.ts.map +1 -0
- package/dist/firestore/components/DocumentList.js +39 -0
- package/dist/firestore/components/DocumentList.js.map +1 -0
- package/dist/firestore/components/DocumentPreview.d.ts +68 -0
- package/dist/firestore/components/DocumentPreview.d.ts.map +1 -0
- package/dist/firestore/components/DocumentPreview.js +76 -0
- package/dist/firestore/components/DocumentPreview.js.map +1 -0
- package/dist/firestore/components/FieldRenderer.d.ts +17 -0
- package/dist/firestore/components/FieldRenderer.d.ts.map +1 -0
- package/dist/firestore/components/FieldRenderer.js +16 -0
- package/dist/firestore/components/FieldRenderer.js.map +1 -0
- package/dist/firestore/components/QueryBuilder.d.ts +25 -0
- package/dist/firestore/components/QueryBuilder.d.ts.map +1 -0
- package/dist/firestore/components/QueryBuilder.js +78 -0
- package/dist/firestore/components/QueryBuilder.js.map +1 -0
- package/dist/firestore/components/ReferencePicker.d.ts +33 -0
- package/dist/firestore/components/ReferencePicker.d.ts.map +1 -0
- package/dist/firestore/components/ReferencePicker.js +42 -0
- package/dist/firestore/components/ReferencePicker.js.map +1 -0
- package/dist/firestore/components/TreeEntry.d.ts +15 -0
- package/dist/firestore/components/TreeEntry.d.ts.map +1 -0
- package/dist/firestore/components/TreeEntry.js +23 -0
- package/dist/firestore/components/TreeEntry.js.map +1 -0
- package/dist/firestore/components/context.d.ts +18 -0
- package/dist/firestore/components/context.d.ts.map +1 -0
- package/dist/firestore/components/context.js +7 -0
- package/dist/firestore/components/context.js.map +1 -0
- package/dist/firestore/fieldEditors/array.d.ts +3 -0
- package/dist/firestore/fieldEditors/array.d.ts.map +1 -0
- package/dist/firestore/fieldEditors/array.js +16 -0
- package/dist/firestore/fieldEditors/array.js.map +1 -0
- package/dist/firestore/fieldEditors/boolean.d.ts +3 -0
- package/dist/firestore/fieldEditors/boolean.d.ts.map +1 -0
- package/dist/firestore/fieldEditors/boolean.js +13 -0
- package/dist/firestore/fieldEditors/boolean.js.map +1 -0
- package/dist/firestore/fieldEditors/bytes.d.ts +4 -0
- package/dist/firestore/fieldEditors/bytes.d.ts.map +1 -0
- package/dist/firestore/fieldEditors/bytes.js +31 -0
- package/dist/firestore/fieldEditors/bytes.js.map +1 -0
- package/dist/firestore/fieldEditors/geopoint.d.ts +4 -0
- package/dist/firestore/fieldEditors/geopoint.d.ts.map +1 -0
- package/dist/firestore/fieldEditors/geopoint.js +32 -0
- package/dist/firestore/fieldEditors/geopoint.js.map +1 -0
- package/dist/firestore/fieldEditors/map.d.ts +3 -0
- package/dist/firestore/fieldEditors/map.d.ts.map +1 -0
- package/dist/firestore/fieldEditors/map.js +19 -0
- package/dist/firestore/fieldEditors/map.js.map +1 -0
- package/dist/firestore/fieldEditors/null.d.ts +3 -0
- package/dist/firestore/fieldEditors/null.d.ts.map +1 -0
- package/dist/firestore/fieldEditors/null.js +17 -0
- package/dist/firestore/fieldEditors/null.js.map +1 -0
- package/dist/firestore/fieldEditors/number.d.ts +3 -0
- package/dist/firestore/fieldEditors/number.d.ts.map +1 -0
- package/dist/firestore/fieldEditors/number.js +24 -0
- package/dist/firestore/fieldEditors/number.js.map +1 -0
- package/dist/firestore/fieldEditors/reference.d.ts +4 -0
- package/dist/firestore/fieldEditors/reference.d.ts.map +1 -0
- package/dist/firestore/fieldEditors/reference.js +49 -0
- package/dist/firestore/fieldEditors/reference.js.map +1 -0
- package/dist/firestore/fieldEditors/registry.d.ts +16 -0
- package/dist/firestore/fieldEditors/registry.d.ts.map +1 -0
- package/dist/firestore/fieldEditors/registry.js +42 -0
- package/dist/firestore/fieldEditors/registry.js.map +1 -0
- package/dist/firestore/fieldEditors/string.d.ts +3 -0
- package/dist/firestore/fieldEditors/string.d.ts.map +1 -0
- package/dist/firestore/fieldEditors/string.js +13 -0
- package/dist/firestore/fieldEditors/string.js.map +1 -0
- package/dist/firestore/fieldEditors/timestamp.d.ts +4 -0
- package/dist/firestore/fieldEditors/timestamp.d.ts.map +1 -0
- package/dist/firestore/fieldEditors/timestamp.js +52 -0
- package/dist/firestore/fieldEditors/timestamp.js.map +1 -0
- package/dist/firestore/fieldEditors/types.d.ts +64 -0
- package/dist/firestore/fieldEditors/types.d.ts.map +1 -0
- package/dist/firestore/fieldEditors/types.js +2 -0
- package/dist/firestore/fieldEditors/types.js.map +1 -0
- package/dist/firestore/fieldEditors/vector.d.ts +29 -0
- package/dist/firestore/fieldEditors/vector.d.ts.map +1 -0
- package/dist/firestore/fieldEditors/vector.js +93 -0
- package/dist/firestore/fieldEditors/vector.js.map +1 -0
- package/dist/firestore/firestoreApi.d.ts +35 -0
- package/dist/firestore/firestoreApi.d.ts.map +1 -0
- package/dist/firestore/firestoreApi.js +28 -0
- package/dist/firestore/firestoreApi.js.map +1 -0
- package/dist/firestore/hooks/coerceError.d.ts +17 -0
- package/dist/firestore/hooks/coerceError.d.ts.map +1 -0
- package/dist/firestore/hooks/coerceError.js +41 -0
- package/dist/firestore/hooks/coerceError.js.map +1 -0
- package/dist/firestore/hooks/index.d.ts +10 -0
- package/dist/firestore/hooks/index.d.ts.map +1 -0
- package/dist/firestore/hooks/index.js +10 -0
- package/dist/firestore/hooks/index.js.map +1 -0
- package/dist/firestore/hooks/useCollectionList.d.ts +37 -0
- package/dist/firestore/hooks/useCollectionList.d.ts.map +1 -0
- package/dist/firestore/hooks/useCollectionList.js +51 -0
- package/dist/firestore/hooks/useCollectionList.js.map +1 -0
- package/dist/firestore/hooks/useDocumentEditor.d.ts +58 -0
- package/dist/firestore/hooks/useDocumentEditor.d.ts.map +1 -0
- package/dist/firestore/hooks/useDocumentEditor.js +68 -0
- package/dist/firestore/hooks/useDocumentEditor.js.map +1 -0
- package/dist/firestore/hooks/useDocumentList.d.ts +45 -0
- package/dist/firestore/hooks/useDocumentList.d.ts.map +1 -0
- package/dist/firestore/hooks/useDocumentList.js +112 -0
- package/dist/firestore/hooks/useDocumentList.js.map +1 -0
- package/dist/firestore/hooks/useDocumentSubcollections.d.ts +29 -0
- package/dist/firestore/hooks/useDocumentSubcollections.d.ts.map +1 -0
- package/dist/firestore/hooks/useDocumentSubcollections.js +48 -0
- package/dist/firestore/hooks/useDocumentSubcollections.js.map +1 -0
- package/dist/firestore/hooks/useFirestoreCollection.d.ts +14 -0
- package/dist/firestore/hooks/useFirestoreCollection.d.ts.map +1 -0
- package/dist/firestore/hooks/useFirestoreCollection.js +35 -0
- package/dist/firestore/hooks/useFirestoreCollection.js.map +1 -0
- package/dist/firestore/hooks/useFirestoreDoc.d.ts +17 -0
- package/dist/firestore/hooks/useFirestoreDoc.d.ts.map +1 -0
- package/dist/firestore/hooks/useFirestoreDoc.js +34 -0
- package/dist/firestore/hooks/useFirestoreDoc.js.map +1 -0
- package/dist/firestore/hooks/useQueryBuilder.d.ts +51 -0
- package/dist/firestore/hooks/useQueryBuilder.d.ts.map +1 -0
- package/dist/firestore/hooks/useQueryBuilder.js +110 -0
- package/dist/firestore/hooks/useQueryBuilder.js.map +1 -0
- package/dist/firestore/hooks/useRecursiveDelete.d.ts +40 -0
- package/dist/firestore/hooks/useRecursiveDelete.d.ts.map +1 -0
- package/dist/firestore/hooks/useRecursiveDelete.js +44 -0
- package/dist/firestore/hooks/useRecursiveDelete.js.map +1 -0
- package/dist/firestore/hooks/useReferencePicker.d.ts +70 -0
- package/dist/firestore/hooks/useReferencePicker.d.ts.map +1 -0
- package/dist/firestore/hooks/useReferencePicker.js +140 -0
- package/dist/firestore/hooks/useReferencePicker.js.map +1 -0
- package/dist/firestore/import/parseImport.d.ts +55 -0
- package/dist/firestore/import/parseImport.d.ts.map +1 -0
- package/dist/firestore/import/parseImport.js +101 -0
- package/dist/firestore/import/parseImport.js.map +1 -0
- package/dist/firestore/index.d.ts +20 -0
- package/dist/firestore/index.d.ts.map +1 -0
- package/dist/firestore/index.js +28 -0
- package/dist/firestore/index.js.map +1 -0
- package/dist/firestore/reducers/defaults.d.ts +10 -0
- package/dist/firestore/reducers/defaults.d.ts.map +1 -0
- package/dist/firestore/reducers/defaults.js +37 -0
- package/dist/firestore/reducers/defaults.js.map +1 -0
- package/dist/firestore/reducers/documentEditor.d.ts +23 -0
- package/dist/firestore/reducers/documentEditor.d.ts.map +1 -0
- package/dist/firestore/reducers/documentEditor.js +199 -0
- package/dist/firestore/reducers/documentEditor.js.map +1 -0
- package/dist/firestore/reducers/tree.d.ts +28 -0
- package/dist/firestore/reducers/tree.d.ts.map +1 -0
- package/dist/firestore/reducers/tree.js +129 -0
- package/dist/firestore/reducers/tree.js.map +1 -0
- package/dist/firestore/reducers/types.d.ts +112 -0
- package/dist/firestore/reducers/types.d.ts.map +1 -0
- package/dist/firestore/reducers/types.js +2 -0
- package/dist/firestore/reducers/types.js.map +1 -0
- package/dist/firestore/reducers/validation.d.ts +25 -0
- package/dist/firestore/reducers/validation.d.ts.map +1 -0
- package/dist/firestore/reducers/validation.js +121 -0
- package/dist/firestore/reducers/validation.js.map +1 -0
- package/dist/firestore/types.d.ts +77 -0
- package/dist/firestore/types.d.ts.map +1 -0
- package/dist/firestore/types.js +196 -0
- package/dist/firestore/types.js.map +1 -0
- package/dist/firestore/validation/ids.d.ts +23 -0
- package/dist/firestore/validation/ids.d.ts.map +1 -0
- package/dist/firestore/validation/ids.js +46 -0
- package/dist/firestore/validation/ids.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/primitives/Badge.d.ts +28 -0
- package/dist/primitives/Badge.d.ts.map +1 -0
- package/dist/primitives/Badge.js +11 -0
- package/dist/primitives/Badge.js.map +1 -0
- package/dist/primitives/ConfirmDialog.d.ts +42 -0
- package/dist/primitives/ConfirmDialog.d.ts.map +1 -0
- package/dist/primitives/ConfirmDialog.js +61 -0
- package/dist/primitives/ConfirmDialog.js.map +1 -0
- package/dist/primitives/CopyButton.d.ts +28 -0
- package/dist/primitives/CopyButton.d.ts.map +1 -0
- package/dist/primitives/CopyButton.js +27 -0
- package/dist/primitives/CopyButton.js.map +1 -0
- package/dist/primitives/JsonView.d.ts +29 -0
- package/dist/primitives/JsonView.d.ts.map +1 -0
- package/dist/primitives/JsonView.js +56 -0
- package/dist/primitives/JsonView.js.map +1 -0
- package/dist/primitives/SegmentedControl.d.ts +37 -0
- package/dist/primitives/SegmentedControl.d.ts.map +1 -0
- package/dist/primitives/SegmentedControl.js +18 -0
- package/dist/primitives/SegmentedControl.js.map +1 -0
- package/dist/primitives/Toast.d.ts +48 -0
- package/dist/primitives/Toast.d.ts.map +1 -0
- package/dist/primitives/Toast.js +60 -0
- package/dist/primitives/Toast.js.map +1 -0
- package/dist/primitives/VirtualList.d.ts +37 -0
- package/dist/primitives/VirtualList.d.ts.map +1 -0
- package/dist/primitives/VirtualList.js +47 -0
- package/dist/primitives/VirtualList.js.map +1 -0
- package/dist/primitives/hooks/useContainerSize.d.ts +29 -0
- package/dist/primitives/hooks/useContainerSize.d.ts.map +1 -0
- package/dist/primitives/hooks/useContainerSize.js +45 -0
- package/dist/primitives/hooks/useContainerSize.js.map +1 -0
- package/dist/primitives/index.d.ts +10 -0
- package/dist/primitives/index.d.ts.map +1 -0
- package/dist/primitives/index.js +10 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/primitives/useConfirm.d.ts +34 -0
- package/dist/primitives/useConfirm.d.ts.map +1 -0
- package/dist/primitives/useConfirm.js +63 -0
- package/dist/primitives/useConfirm.js.map +1 -0
- package/dist/rtdb/components/RtdbPathBar.d.ts +31 -0
- package/dist/rtdb/components/RtdbPathBar.d.ts.map +1 -0
- package/dist/rtdb/components/RtdbPathBar.js +47 -0
- package/dist/rtdb/components/RtdbPathBar.js.map +1 -0
- package/dist/rtdb/components/RtdbTree.d.ts +38 -0
- package/dist/rtdb/components/RtdbTree.d.ts.map +1 -0
- package/dist/rtdb/components/RtdbTree.js +103 -0
- package/dist/rtdb/components/RtdbTree.js.map +1 -0
- package/dist/rtdb/editor.d.ts +25 -0
- package/dist/rtdb/editor.d.ts.map +1 -0
- package/dist/rtdb/editor.js +79 -0
- package/dist/rtdb/editor.js.map +1 -0
- package/dist/rtdb/hooks/useRtdbTree.d.ts +31 -0
- package/dist/rtdb/hooks/useRtdbTree.d.ts.map +1 -0
- package/dist/rtdb/hooks/useRtdbTree.js +49 -0
- package/dist/rtdb/hooks/useRtdbTree.js.map +1 -0
- package/dist/rtdb/index.d.ts +17 -0
- package/dist/rtdb/index.d.ts.map +1 -0
- package/dist/rtdb/index.js +21 -0
- package/dist/rtdb/index.js.map +1 -0
- package/dist/rtdb/pathInput.d.ts +28 -0
- package/dist/rtdb/pathInput.d.ts.map +1 -0
- package/dist/rtdb/pathInput.js +40 -0
- package/dist/rtdb/pathInput.js.map +1 -0
- package/dist/rtdb/reducers/tree.d.ts +86 -0
- package/dist/rtdb/reducers/tree.d.ts.map +1 -0
- package/dist/rtdb/reducers/tree.js +131 -0
- package/dist/rtdb/reducers/tree.js.map +1 -0
- package/dist/rtdb/rtdbApi.d.ts +20 -0
- package/dist/rtdb/rtdbApi.d.ts.map +1 -0
- package/dist/rtdb/rtdbApi.js +2 -0
- package/dist/rtdb/rtdbApi.js.map +1 -0
- package/dist/rtdb/values.d.ts +44 -0
- package/dist/rtdb/values.d.ts.map +1 -0
- package/dist/rtdb/values.js +143 -0
- package/dist/rtdb/values.js.map +1 -0
- package/dist/rules/components/DenialInspector.d.ts +18 -0
- package/dist/rules/components/DenialInspector.d.ts.map +1 -0
- package/dist/rules/components/DenialInspector.js +58 -0
- package/dist/rules/components/DenialInspector.js.map +1 -0
- package/dist/rules/components/format.d.ts +56 -0
- package/dist/rules/components/format.d.ts.map +1 -0
- package/dist/rules/components/format.js +137 -0
- package/dist/rules/components/format.js.map +1 -0
- package/dist/rules/components/index.d.ts +4 -0
- package/dist/rules/components/index.d.ts.map +1 -0
- package/dist/rules/components/index.js +4 -0
- package/dist/rules/components/index.js.map +1 -0
- package/dist/rules/components/scope.d.ts +10 -0
- package/dist/rules/components/scope.d.ts.map +1 -0
- package/dist/rules/components/scope.js +72 -0
- package/dist/rules/components/scope.js.map +1 -0
- package/dist/rules/hooks/index.d.ts +2 -0
- package/dist/rules/hooks/index.d.ts.map +1 -0
- package/dist/rules/hooks/index.js +2 -0
- package/dist/rules/hooks/index.js.map +1 -0
- package/dist/rules/hooks/useDenialTrace.d.ts +51 -0
- package/dist/rules/hooks/useDenialTrace.d.ts.map +1 -0
- package/dist/rules/hooks/useDenialTrace.js +58 -0
- package/dist/rules/hooks/useDenialTrace.js.map +1 -0
- package/dist/rules/index.d.ts +14 -0
- package/dist/rules/index.d.ts.map +1 -0
- package/dist/rules/index.js +13 -0
- package/dist/rules/index.js.map +1 -0
- package/dist/rules/types.d.ts +75 -0
- package/dist/rules/types.d.ts.map +1 -0
- package/dist/rules/types.js +2 -0
- package/dist/rules/types.js.map +1 -0
- package/dist/storage/collisionRename.d.ts +73 -0
- package/dist/storage/collisionRename.d.ts.map +1 -0
- package/dist/storage/collisionRename.js +113 -0
- package/dist/storage/collisionRename.js.map +1 -0
- package/dist/storage/components/DeleteSelectionWithConfirm.d.ts +68 -0
- package/dist/storage/components/DeleteSelectionWithConfirm.d.ts.map +1 -0
- package/dist/storage/components/DeleteSelectionWithConfirm.js +82 -0
- package/dist/storage/components/DeleteSelectionWithConfirm.js.map +1 -0
- package/dist/storage/components/ObjectBrowser.d.ts +75 -0
- package/dist/storage/components/ObjectBrowser.d.ts.map +1 -0
- package/dist/storage/components/ObjectBrowser.js +59 -0
- package/dist/storage/components/ObjectBrowser.js.map +1 -0
- package/dist/storage/components/ObjectInspector.d.ts +43 -0
- package/dist/storage/components/ObjectInspector.d.ts.map +1 -0
- package/dist/storage/components/ObjectInspector.js +92 -0
- package/dist/storage/components/ObjectInspector.js.map +1 -0
- package/dist/storage/components/PathBreadcrumb.d.ts +30 -0
- package/dist/storage/components/PathBreadcrumb.d.ts.map +1 -0
- package/dist/storage/components/PathBreadcrumb.js +26 -0
- package/dist/storage/components/PathBreadcrumb.js.map +1 -0
- package/dist/storage/components/UploadDropzone.d.ts +50 -0
- package/dist/storage/components/UploadDropzone.d.ts.map +1 -0
- package/dist/storage/components/UploadDropzone.js +109 -0
- package/dist/storage/components/UploadDropzone.js.map +1 -0
- package/dist/storage/folderPlaceholder.d.ts +14 -0
- package/dist/storage/folderPlaceholder.d.ts.map +1 -0
- package/dist/storage/folderPlaceholder.js +27 -0
- package/dist/storage/folderPlaceholder.js.map +1 -0
- package/dist/storage/hooks/index.d.ts +9 -0
- package/dist/storage/hooks/index.d.ts.map +1 -0
- package/dist/storage/hooks/index.js +9 -0
- package/dist/storage/hooks/index.js.map +1 -0
- package/dist/storage/hooks/useMetadataEditor.d.ts +114 -0
- package/dist/storage/hooks/useMetadataEditor.d.ts.map +1 -0
- package/dist/storage/hooks/useMetadataEditor.js +193 -0
- package/dist/storage/hooks/useMetadataEditor.js.map +1 -0
- package/dist/storage/hooks/useObjectUpload.d.ts +109 -0
- package/dist/storage/hooks/useObjectUpload.d.ts.map +1 -0
- package/dist/storage/hooks/useObjectUpload.js +134 -0
- package/dist/storage/hooks/useObjectUpload.js.map +1 -0
- package/dist/storage/hooks/usePathState.d.ts +43 -0
- package/dist/storage/hooks/usePathState.d.ts.map +1 -0
- package/dist/storage/hooks/usePathState.js +42 -0
- package/dist/storage/hooks/usePathState.js.map +1 -0
- package/dist/storage/hooks/useStorageDelete.d.ts +73 -0
- package/dist/storage/hooks/useStorageDelete.d.ts.map +1 -0
- package/dist/storage/hooks/useStorageDelete.js +114 -0
- package/dist/storage/hooks/useStorageDelete.js.map +1 -0
- package/dist/storage/hooks/useStorageList.d.ts +74 -0
- package/dist/storage/hooks/useStorageList.d.ts.map +1 -0
- package/dist/storage/hooks/useStorageList.js +167 -0
- package/dist/storage/hooks/useStorageList.js.map +1 -0
- package/dist/storage/hooks/useStorageObject.d.ts +34 -0
- package/dist/storage/hooks/useStorageObject.d.ts.map +1 -0
- package/dist/storage/hooks/useStorageObject.js +114 -0
- package/dist/storage/hooks/useStorageObject.js.map +1 -0
- package/dist/storage/hooks/useStorageRulesGate.d.ts +128 -0
- package/dist/storage/hooks/useStorageRulesGate.d.ts.map +1 -0
- package/dist/storage/hooks/useStorageRulesGate.js +158 -0
- package/dist/storage/hooks/useStorageRulesGate.js.map +1 -0
- package/dist/storage/hooks/useStorageSelection.d.ts +32 -0
- package/dist/storage/hooks/useStorageSelection.d.ts.map +1 -0
- package/dist/storage/hooks/useStorageSelection.js +55 -0
- package/dist/storage/hooks/useStorageSelection.js.map +1 -0
- package/dist/storage/index.d.ts +11 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +17 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/pendingPrefixes.d.ts +73 -0
- package/dist/storage/pendingPrefixes.d.ts.map +1 -0
- package/dist/storage/pendingPrefixes.js +98 -0
- package/dist/storage/pendingPrefixes.js.map +1 -0
- package/dist/storage/previews.d.ts +51 -0
- package/dist/storage/previews.d.ts.map +1 -0
- package/dist/storage/previews.js +73 -0
- package/dist/storage/previews.js.map +1 -0
- package/dist/storage/storageApi.d.ts +30 -0
- package/dist/storage/storageApi.d.ts.map +1 -0
- package/dist/storage/storageApi.js +13 -0
- package/dist/storage/storageApi.js.map +1 -0
- package/dist/traffic/components/RuleHeatmap.d.ts +34 -0
- package/dist/traffic/components/RuleHeatmap.d.ts.map +1 -0
- package/dist/traffic/components/RuleHeatmap.js +40 -0
- package/dist/traffic/components/RuleHeatmap.js.map +1 -0
- package/dist/traffic/components/TrafficDetail.d.ts +33 -0
- package/dist/traffic/components/TrafficDetail.d.ts.map +1 -0
- package/dist/traffic/components/TrafficDetail.js +28 -0
- package/dist/traffic/components/TrafficDetail.js.map +1 -0
- package/dist/traffic/components/TrafficGroupRow.d.ts +28 -0
- package/dist/traffic/components/TrafficGroupRow.d.ts.map +1 -0
- package/dist/traffic/components/TrafficGroupRow.js +18 -0
- package/dist/traffic/components/TrafficGroupRow.js.map +1 -0
- package/dist/traffic/components/TrafficLineChart.d.ts +34 -0
- package/dist/traffic/components/TrafficLineChart.d.ts.map +1 -0
- package/dist/traffic/components/TrafficLineChart.js +49 -0
- package/dist/traffic/components/TrafficLineChart.js.map +1 -0
- package/dist/traffic/components/TrafficLog.d.ts +52 -0
- package/dist/traffic/components/TrafficLog.d.ts.map +1 -0
- package/dist/traffic/components/TrafficLog.js +34 -0
- package/dist/traffic/components/TrafficLog.js.map +1 -0
- package/dist/traffic/components/TrafficMetricCards.d.ts +26 -0
- package/dist/traffic/components/TrafficMetricCards.d.ts.map +1 -0
- package/dist/traffic/components/TrafficMetricCards.js +24 -0
- package/dist/traffic/components/TrafficMetricCards.js.map +1 -0
- package/dist/traffic/components/TrafficRow.d.ts +40 -0
- package/dist/traffic/components/TrafficRow.d.ts.map +1 -0
- package/dist/traffic/components/TrafficRow.js +27 -0
- package/dist/traffic/components/TrafficRow.js.map +1 -0
- package/dist/traffic/components/TrafficStats.d.ts +18 -0
- package/dist/traffic/components/TrafficStats.d.ts.map +1 -0
- package/dist/traffic/components/TrafficStats.js +19 -0
- package/dist/traffic/components/TrafficStats.js.map +1 -0
- package/dist/traffic/components/TrafficTimeline.d.ts +81 -0
- package/dist/traffic/components/TrafficTimeline.d.ts.map +1 -0
- package/dist/traffic/components/TrafficTimeline.js +72 -0
- package/dist/traffic/components/TrafficTimeline.js.map +1 -0
- package/dist/traffic/components/format.d.ts +13 -0
- package/dist/traffic/components/format.d.ts.map +1 -0
- package/dist/traffic/components/format.js +24 -0
- package/dist/traffic/components/format.js.map +1 -0
- package/dist/traffic/components/index.d.ts +11 -0
- package/dist/traffic/components/index.d.ts.map +1 -0
- package/dist/traffic/components/index.js +11 -0
- package/dist/traffic/components/index.js.map +1 -0
- package/dist/traffic/hooks/index.d.ts +8 -0
- package/dist/traffic/hooks/index.d.ts.map +1 -0
- package/dist/traffic/hooks/index.js +8 -0
- package/dist/traffic/hooks/index.js.map +1 -0
- package/dist/traffic/hooks/useRuleHeatmap.d.ts +33 -0
- package/dist/traffic/hooks/useRuleHeatmap.d.ts.map +1 -0
- package/dist/traffic/hooks/useRuleHeatmap.js +54 -0
- package/dist/traffic/hooks/useRuleHeatmap.js.map +1 -0
- package/dist/traffic/hooks/useTrafficBuckets.d.ts +71 -0
- package/dist/traffic/hooks/useTrafficBuckets.d.ts.map +1 -0
- package/dist/traffic/hooks/useTrafficBuckets.js +74 -0
- package/dist/traffic/hooks/useTrafficBuckets.js.map +1 -0
- package/dist/traffic/hooks/useTrafficFilter.d.ts +40 -0
- package/dist/traffic/hooks/useTrafficFilter.d.ts.map +1 -0
- package/dist/traffic/hooks/useTrafficFilter.js +33 -0
- package/dist/traffic/hooks/useTrafficFilter.js.map +1 -0
- package/dist/traffic/hooks/useTrafficGroups.d.ts +47 -0
- package/dist/traffic/hooks/useTrafficGroups.d.ts.map +1 -0
- package/dist/traffic/hooks/useTrafficGroups.js +73 -0
- package/dist/traffic/hooks/useTrafficGroups.js.map +1 -0
- package/dist/traffic/hooks/useTrafficMetrics.d.ts +66 -0
- package/dist/traffic/hooks/useTrafficMetrics.d.ts.map +1 -0
- package/dist/traffic/hooks/useTrafficMetrics.js +156 -0
- package/dist/traffic/hooks/useTrafficMetrics.js.map +1 -0
- package/dist/traffic/hooks/useTrafficMonitor.d.ts +56 -0
- package/dist/traffic/hooks/useTrafficMonitor.d.ts.map +1 -0
- package/dist/traffic/hooks/useTrafficMonitor.js +58 -0
- package/dist/traffic/hooks/useTrafficMonitor.js.map +1 -0
- package/dist/traffic/hooks/useTrafficStats.d.ts +32 -0
- package/dist/traffic/hooks/useTrafficStats.d.ts.map +1 -0
- package/dist/traffic/hooks/useTrafficStats.js +45 -0
- package/dist/traffic/hooks/useTrafficStats.js.map +1 -0
- package/dist/traffic/index.d.ts +4 -0
- package/dist/traffic/index.d.ts.map +1 -0
- package/dist/traffic/index.js +3 -0
- package/dist/traffic/index.js.map +1 -0
- package/dist/traffic/types.d.ts +72 -0
- package/dist/traffic/types.d.ts.map +1 -0
- package/dist/traffic/types.js +10 -0
- package/dist/traffic/types.js.map +1 -0
- package/package.json +116 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useActivityDigest.d.ts","sourceRoot":"","sources":["../../../src/events/hooks/useActivityDigest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC3B,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,wBAAyB,SAAQ,qBAAqB;IACrE;;;;;;;;OAQG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,SAAS,gBAAgB,EAAE,EACnC,OAAO,GAAE,wBAA6B,GACrC,cAAc,CAMhB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { computeActivityDigest, } from '../digest.js';
|
|
3
|
+
/**
|
|
4
|
+
* React wrapper over {@link computeActivityDigest} — memoizes the pure
|
|
5
|
+
* fold over the unified `SandboxEvent` stream into the banded activity
|
|
6
|
+
* digest. Feed it `sandbox.history()` (a snapshot) or the live buffer
|
|
7
|
+
* from {@link useActivityStream}; the reducer is identical either way.
|
|
8
|
+
*
|
|
9
|
+
* The fold re-runs when `events` identity, any grouping option, or
|
|
10
|
+
* `now` changes. Keep `events` referentially stable across renders that
|
|
11
|
+
* shouldn't recompute (the stream hook already returns a stable array
|
|
12
|
+
* per emission).
|
|
13
|
+
*/
|
|
14
|
+
export function useActivityDigest(events, options = {}) {
|
|
15
|
+
const { order, groupBy, rowsPerBand, now } = options;
|
|
16
|
+
return useMemo(() => computeActivityDigest(events, { order, groupBy, rowsPerBand, now }), [events, order, groupBy, rowsPerBand, now]);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=useActivityDigest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useActivityDigest.js","sourceRoot":"","sources":["../../../src/events/hooks/useActivityDigest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EACL,qBAAqB,GAGtB,MAAM,cAAc,CAAC;AAetB;;;;;;;;;;GAUG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAAmC,EACnC,UAAoC,EAAE;IAEtC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;IACrD,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,qBAAqB,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,EACzE,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,CAAC,CAC3C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ActivitySource, AnyActivityEvent } from '../types.js';
|
|
2
|
+
export interface UseActivityStreamOptions {
|
|
3
|
+
/**
|
|
4
|
+
* The subscription — `sandbox.onEvent` satisfies this directly. Pass
|
|
5
|
+
* a stable reference; the hook re-subscribes on identity change.
|
|
6
|
+
*/
|
|
7
|
+
source: ActivitySource;
|
|
8
|
+
/**
|
|
9
|
+
* Seed the buffer with a snapshot before the live subscription
|
|
10
|
+
* attaches — typically `sandbox.history()`, so a late-attaching
|
|
11
|
+
* consumer sees the whole session, not just events from `subscribe`
|
|
12
|
+
* onward. Read once on mount.
|
|
13
|
+
*/
|
|
14
|
+
initial?: readonly AnyActivityEvent[];
|
|
15
|
+
/**
|
|
16
|
+
* Ring-buffer cap. Once exceeded, the oldest events drop. Default
|
|
17
|
+
* 5000 (mirrors the traffic monitor's cap — a load-test session can
|
|
18
|
+
* emit 100k+ events).
|
|
19
|
+
*/
|
|
20
|
+
bufferSize?: number;
|
|
21
|
+
/** Start paused — incoming events drop (not queued) while paused. */
|
|
22
|
+
paused?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface UseActivityStreamResult {
|
|
25
|
+
/** The buffered events, oldest-first. Stable per emission — safe to
|
|
26
|
+
* hand straight to {@link useActivityDigest}. */
|
|
27
|
+
events: AnyActivityEvent[];
|
|
28
|
+
isPaused: boolean;
|
|
29
|
+
pause: () => void;
|
|
30
|
+
resume: () => void;
|
|
31
|
+
/** Empty the buffer (does NOT re-seed from `initial`). */
|
|
32
|
+
clear: () => void;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Buffers the unified sandbox event stream into a capped ring buffer
|
|
36
|
+
* with optional history seeding + pause/resume/clear. Decoupled from
|
|
37
|
+
* `pyric` — `source` is just a `(cb) => unsubscribe`.
|
|
38
|
+
*
|
|
39
|
+
* Sibling to the traffic monitor's `useTrafficMonitor`; the difference
|
|
40
|
+
* is the wider event type (`AnyActivityEvent`, the full union) and the
|
|
41
|
+
* `initial` seed so `history()` + live compose into one buffer.
|
|
42
|
+
*/
|
|
43
|
+
export declare function useActivityStream({ source, initial, bufferSize, paused, }: UseActivityStreamOptions): UseActivityStreamResult;
|
|
44
|
+
//# sourceMappingURL=useActivityStream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useActivityStream.d.ts","sourceRoot":"","sources":["../../../src/events/hooks/useActivityStream.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpE,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,MAAM,EAAE,cAAc,CAAC;IACvB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACtC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qEAAqE;IACrE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,uBAAuB;IACtC;sDACkD;IAClD,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,0DAA0D;IAC1D,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,OAAO,EACP,UAAiB,EACjB,MAAc,GACf,EAAE,wBAAwB,GAAG,uBAAuB,CAkCpD"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Buffers the unified sandbox event stream into a capped ring buffer
|
|
4
|
+
* with optional history seeding + pause/resume/clear. Decoupled from
|
|
5
|
+
* `pyric` — `source` is just a `(cb) => unsubscribe`.
|
|
6
|
+
*
|
|
7
|
+
* Sibling to the traffic monitor's `useTrafficMonitor`; the difference
|
|
8
|
+
* is the wider event type (`AnyActivityEvent`, the full union) and the
|
|
9
|
+
* `initial` seed so `history()` + live compose into one buffer.
|
|
10
|
+
*/
|
|
11
|
+
export function useActivityStream({ source, initial, bufferSize = 5000, paused = false, }) {
|
|
12
|
+
const [events, setEvents] = useState(() => initial ? initial.slice(-bufferSize) : []);
|
|
13
|
+
const [isPaused, setIsPaused] = useState(paused);
|
|
14
|
+
const pausedRef = useRef(isPaused);
|
|
15
|
+
pausedRef.current = isPaused;
|
|
16
|
+
const bufferSizeRef = useRef(bufferSize);
|
|
17
|
+
bufferSizeRef.current = bufferSize;
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
const unsubscribe = source((event) => {
|
|
20
|
+
if (pausedRef.current)
|
|
21
|
+
return;
|
|
22
|
+
setEvents((prev) => {
|
|
23
|
+
const next = prev.length >= bufferSizeRef.current ? prev.slice(1) : prev.slice();
|
|
24
|
+
next.push(event);
|
|
25
|
+
return next;
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
return unsubscribe;
|
|
29
|
+
}, [source]);
|
|
30
|
+
return useMemo(() => ({
|
|
31
|
+
events,
|
|
32
|
+
isPaused,
|
|
33
|
+
pause: () => setIsPaused(true),
|
|
34
|
+
resume: () => setIsPaused(false),
|
|
35
|
+
clear: () => setEvents([]),
|
|
36
|
+
}), [events, isPaused]);
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=useActivityStream.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useActivityStream.js","sourceRoot":"","sources":["../../../src/events/hooks/useActivityStream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAqC7D;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAChC,MAAM,EACN,OAAO,EACP,UAAU,GAAG,IAAI,EACjB,MAAM,GAAG,KAAK,GACW;IACzB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAqB,GAAG,EAAE,CAC5D,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAC1C,CAAC;IACF,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjD,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IACnC,SAAS,CAAC,OAAO,GAAG,QAAQ,CAAC;IAC7B,MAAM,aAAa,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IACzC,aAAa,CAAC,OAAO,GAAG,UAAU,CAAC;IAEnC,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;YACnC,IAAI,SAAS,CAAC,OAAO;gBAAE,OAAO;YAC9B,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE;gBACjB,MAAM,IAAI,GACR,IAAI,CAAC,MAAM,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;gBACtE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACjB,OAAO,IAAI,CAAC;YACd,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,OAAO,WAAW,CAAC;IACrB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC;QACL,MAAM;QACN,QAAQ;QACR,KAAK,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC;QAC9B,MAAM,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC;QAChC,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC;KAC3B,CAAC,EACF,CAAC,MAAM,EAAE,QAAQ,CAAC,CACnB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@pyric/ui/events` — headless activity view over the unified
|
|
3
|
+
* `SandboxEvent` stream (Pyric Studio's keystone). Aggregates the whole
|
|
4
|
+
* stream (Firestore request/write + the cross-service `service_mutation`
|
|
5
|
+
* envelope for auth/storage/rtdb) into category bands with per-row
|
|
6
|
+
* provenance — the activity grid. Sibling to `@pyric/ui/traffic` (which
|
|
7
|
+
* is per-request, not aggregated-by-category).
|
|
8
|
+
*
|
|
9
|
+
* Ships zero styling — Pyric Studio applies the `data-pyric-*` contract.
|
|
10
|
+
*/
|
|
11
|
+
export * from './hooks/index.js';
|
|
12
|
+
export * from './components/index.js';
|
|
13
|
+
export { computeActivityDigest, type ActivityDigest, type ActivityDigestOptions, type ActivityGroupBy, type ActivityBand, type ActivityBandWithGroups, type ActivitySubgroup, type ActivityBandKey, type ActivityRow, } from './digest.js';
|
|
14
|
+
export type { ActivityEvent, AnyActivityEvent, ActivitySource, ActivityRequestEvent, ActivityWriteEvent, ActivityServiceMutationEvent, ActivityProvenance, ActivityService, ActivityActor, ActivityLens, ActivityResult, ActivityAuthState, } from './types.js';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AAEtC,OAAO,EACL,qBAAqB,EACrB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,WAAW,GACjB,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,4BAA4B,EAC5B,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,cAAc,EACd,iBAAiB,GAClB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@pyric/ui/events` — headless activity view over the unified
|
|
3
|
+
* `SandboxEvent` stream (Pyric Studio's keystone). Aggregates the whole
|
|
4
|
+
* stream (Firestore request/write + the cross-service `service_mutation`
|
|
5
|
+
* envelope for auth/storage/rtdb) into category bands with per-row
|
|
6
|
+
* provenance — the activity grid. Sibling to `@pyric/ui/traffic` (which
|
|
7
|
+
* is per-request, not aggregated-by-category).
|
|
8
|
+
*
|
|
9
|
+
* Ships zero styling — Pyric Studio applies the `data-pyric-*` contract.
|
|
10
|
+
*/
|
|
11
|
+
export * from './hooks/index.js';
|
|
12
|
+
export * from './components/index.js';
|
|
13
|
+
export { computeActivityDigest, } from './digest.js';
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AAEtC,OAAO,EACL,qBAAqB,GAStB,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The events/activity domain types. These are a local, structurally-
|
|
3
|
+
* compatible mirror of `pyric`'s unified `SandboxEvent` union (and its
|
|
4
|
+
* `EventProvenance`) — the `@pyric/ui` packages never import `pyric` so
|
|
5
|
+
* the headless layer stays decoupled from the sandbox impl (the same
|
|
6
|
+
* stance the sibling `traffic/` area takes with `RequestEvent`).
|
|
7
|
+
*
|
|
8
|
+
* `sandbox.onEvent` / `sandbox.history()` are assignable as an
|
|
9
|
+
* `ActivitySource` / `ActivityEvent[]` with zero adapter code: every
|
|
10
|
+
* field here is a subset (by name + shape) of the matching field on the
|
|
11
|
+
* sandbox type. A production audit feed satisfying the same shape works
|
|
12
|
+
* too.
|
|
13
|
+
*
|
|
14
|
+
* Unlike `traffic/` (which models only Firestore `request` events, one
|
|
15
|
+
* row per evaluated op), the events area aggregates the FULL stream —
|
|
16
|
+
* Firestore `request`/`write` plus the cross-service `service_mutation`
|
|
17
|
+
* envelope (auth / storage / rtdb) — into category bands. So the local
|
|
18
|
+
* types cover the union members the digest reads, not just one kind.
|
|
19
|
+
*/
|
|
20
|
+
/** Which sandbox service emitted an event. Absent ⇒ `'firestore'`. */
|
|
21
|
+
export type ActivityService = 'firestore' | 'auth' | 'storage' | 'rtdb';
|
|
22
|
+
/** Who initiated the op behind an event. Absent ⇒ the served app. */
|
|
23
|
+
export type ActivityActor = {
|
|
24
|
+
kind: 'app';
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'studio';
|
|
27
|
+
} | {
|
|
28
|
+
kind: 'agent';
|
|
29
|
+
name: string;
|
|
30
|
+
} | {
|
|
31
|
+
kind: 'app-builder';
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* The auth lens an op ran under. `admin` bypasses rules, `as` evaluates
|
|
35
|
+
* rules as a specific uid (impersonation), `app-session` is the app's
|
|
36
|
+
* own signed-in user. Absent ⇒ `app-session`.
|
|
37
|
+
*/
|
|
38
|
+
export type ActivityLens = {
|
|
39
|
+
mode: 'admin';
|
|
40
|
+
} | {
|
|
41
|
+
mode: 'as';
|
|
42
|
+
uid: string;
|
|
43
|
+
} | {
|
|
44
|
+
mode: 'app-session';
|
|
45
|
+
};
|
|
46
|
+
/** Identity in effect for an op. `null` is anonymous / signed out. */
|
|
47
|
+
export interface ActivityAuthState {
|
|
48
|
+
uid: string;
|
|
49
|
+
token?: Record<string, unknown>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Provenance carried by every event. All optional + additive — pre-
|
|
53
|
+
* provenance emitters omit them (read as firestore / app / app-session).
|
|
54
|
+
*/
|
|
55
|
+
export interface ActivityProvenance {
|
|
56
|
+
service?: ActivityService;
|
|
57
|
+
actor?: ActivityActor;
|
|
58
|
+
authLens?: ActivityLens;
|
|
59
|
+
/** Set when the op is part of an agent plan (dry-run / accept). */
|
|
60
|
+
planId?: string;
|
|
61
|
+
}
|
|
62
|
+
/** Firestore op outcome — present on `request` events only. */
|
|
63
|
+
export type ActivityResult = 'allow' | 'deny' | 'unsupported';
|
|
64
|
+
/**
|
|
65
|
+
* A Firestore `request` event — one per evaluated op. The digest reads
|
|
66
|
+
* these for denials (`result === 'deny'`) and, when no `write` event is
|
|
67
|
+
* present, for the allow trail. Structurally a subset of `RequestEvent`.
|
|
68
|
+
*/
|
|
69
|
+
export interface ActivityRequestEvent extends ActivityProvenance {
|
|
70
|
+
kind: 'request';
|
|
71
|
+
id: string;
|
|
72
|
+
at: number;
|
|
73
|
+
method: 'get' | 'list' | 'create' | 'update' | 'set' | 'delete';
|
|
74
|
+
path: string;
|
|
75
|
+
auth: ActivityAuthState | null;
|
|
76
|
+
result: ActivityResult;
|
|
77
|
+
/** Simulator debug trail. Used to surface the deciding rule on denials. */
|
|
78
|
+
reasons: string[];
|
|
79
|
+
request?: {
|
|
80
|
+
resourceData?: Record<string, unknown>;
|
|
81
|
+
};
|
|
82
|
+
resourceBefore?: {
|
|
83
|
+
data: Record<string, unknown> | null;
|
|
84
|
+
exists: boolean;
|
|
85
|
+
};
|
|
86
|
+
resourceAfter?: {
|
|
87
|
+
data: Record<string, unknown> | null;
|
|
88
|
+
exists: boolean;
|
|
89
|
+
};
|
|
90
|
+
matchedRule?: {
|
|
91
|
+
ruleIndex: number;
|
|
92
|
+
operations: string[];
|
|
93
|
+
};
|
|
94
|
+
origin: 'user' | 'listener' | 'transaction' | 'batch';
|
|
95
|
+
groupId?: string;
|
|
96
|
+
triggeredBy?: {
|
|
97
|
+
method: string;
|
|
98
|
+
path: string;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* A committed Firestore write — `create`/`update`/`set`/`delete` that
|
|
103
|
+
* the rule engine allowed and the keyspace applied. The digest leads
|
|
104
|
+
* with these for the added/updated/removed bands (richer than `request`:
|
|
105
|
+
* carries prior/next state for the change summary). Subset of
|
|
106
|
+
* `WriteSandboxEvent`.
|
|
107
|
+
*/
|
|
108
|
+
export interface ActivityWriteEvent extends ActivityProvenance {
|
|
109
|
+
kind: 'write';
|
|
110
|
+
id: string;
|
|
111
|
+
at: number;
|
|
112
|
+
method: 'create' | 'update' | 'set' | 'delete';
|
|
113
|
+
path: string;
|
|
114
|
+
auth: ActivityAuthState | null;
|
|
115
|
+
data?: Record<string, unknown>;
|
|
116
|
+
priorState: Record<string, unknown> | null;
|
|
117
|
+
nextState: Record<string, unknown> | null;
|
|
118
|
+
groupId?: string;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Cross-service mutation — the unified envelope auth / storage / rtdb
|
|
122
|
+
* emit. The digest maps `service` + `op` to a band (signed-in, added,
|
|
123
|
+
* updated, removed, …). Subset of `ServiceMutationEvent`.
|
|
124
|
+
*/
|
|
125
|
+
export interface ActivityServiceMutationEvent extends ActivityProvenance {
|
|
126
|
+
kind: 'service_mutation';
|
|
127
|
+
id: string;
|
|
128
|
+
at: number;
|
|
129
|
+
service: 'auth' | 'storage' | 'rtdb';
|
|
130
|
+
op: string;
|
|
131
|
+
path?: string;
|
|
132
|
+
auth: ActivityAuthState | null;
|
|
133
|
+
before?: unknown;
|
|
134
|
+
after?: unknown;
|
|
135
|
+
detail?: Record<string, unknown>;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* The union members the activity digest aggregates. This is a SUBSET of
|
|
139
|
+
* `pyric`'s `SandboxEvent` — the listener-lifecycle / snapshot-delivery /
|
|
140
|
+
* session-boundary kinds carry no user-visible mutation, so the digest
|
|
141
|
+
* ignores them. The reducer accepts any object with a `kind` and skips
|
|
142
|
+
* the kinds it doesn't model, so a full `SandboxEvent[]` passes through
|
|
143
|
+
* cleanly (the extra kinds fall into the "unknown ⇒ skipped" branch).
|
|
144
|
+
*/
|
|
145
|
+
export type ActivityEvent = ActivityRequestEvent | ActivityWriteEvent | ActivityServiceMutationEvent;
|
|
146
|
+
/**
|
|
147
|
+
* The widened input the reducer accepts: any `ActivityEvent`, plus a
|
|
148
|
+
* permissive escape for unmodelled `SandboxEvent` kinds carrying a
|
|
149
|
+
* string `kind` (skipped). Lets `sandbox.history()` flow in unfiltered.
|
|
150
|
+
*/
|
|
151
|
+
export type AnyActivityEvent = ActivityEvent | {
|
|
152
|
+
kind: string;
|
|
153
|
+
[k: string]: unknown;
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* A subscription: register a callback, get an unsubscribe.
|
|
157
|
+
* `sandbox.onEvent` matches this signature.
|
|
158
|
+
*/
|
|
159
|
+
export type ActivitySource = (cb: (event: AnyActivityEvent) => void) => () => void;
|
|
160
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/events/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The events/activity domain types. These are a local, structurally-
|
|
3
|
+
* compatible mirror of `pyric`'s unified `SandboxEvent` union (and its
|
|
4
|
+
* `EventProvenance`) — the `@pyric/ui` packages never import `pyric` so
|
|
5
|
+
* the headless layer stays decoupled from the sandbox impl (the same
|
|
6
|
+
* stance the sibling `traffic/` area takes with `RequestEvent`).
|
|
7
|
+
*
|
|
8
|
+
* `sandbox.onEvent` / `sandbox.history()` are assignable as an
|
|
9
|
+
* `ActivitySource` / `ActivityEvent[]` with zero adapter code: every
|
|
10
|
+
* field here is a subset (by name + shape) of the matching field on the
|
|
11
|
+
* sandbox type. A production audit feed satisfying the same shape works
|
|
12
|
+
* too.
|
|
13
|
+
*
|
|
14
|
+
* Unlike `traffic/` (which models only Firestore `request` events, one
|
|
15
|
+
* row per evaluated op), the events area aggregates the FULL stream —
|
|
16
|
+
* Firestore `request`/`write` plus the cross-service `service_mutation`
|
|
17
|
+
* envelope (auth / storage / rtdb) — into category bands. So the local
|
|
18
|
+
* types cover the union members the digest reads, not just one kind.
|
|
19
|
+
*/
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/events/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { CollectionReference } from 'pyric/firestore';
|
|
3
|
+
export interface CollectionListProps {
|
|
4
|
+
collections: CollectionReference[];
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
error?: Error;
|
|
7
|
+
/** Fired when a list item is clicked. Consumer wires navigation. */
|
|
8
|
+
onSelect?: (collection: CollectionReference) => void;
|
|
9
|
+
/** Optional empty-state node. Rendered when `collections.length`
|
|
10
|
+
* is 0 and the list isn't loading. */
|
|
11
|
+
emptyState?: ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Headless collection list. Takes a pre-fetched array of references
|
|
16
|
+
* (from `useCollectionList`) plus a select callback. Renders one
|
|
17
|
+
* row per collection with `data-pyric-collection-id` for styling
|
|
18
|
+
* and testing. The library does not own the data fetch — the hook
|
|
19
|
+
* does — so this component is a thin presentational layer.
|
|
20
|
+
*/
|
|
21
|
+
export declare function CollectionList({ collections, isLoading, error, onSelect, emptyState, className, }: CollectionListProps): import("react").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=CollectionList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollectionList.d.ts","sourceRoot":"","sources":["../../../src/firestore/components/CollectionList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,mBAAmB,EAAE,CAAC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,oEAAoE;IACpE,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACrD;2CACuC;IACvC,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,SAAS,EACT,KAAK,EACL,QAAQ,EACR,UAAU,EACV,SAAS,GACV,EAAE,mBAAmB,+BAgDrB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Headless collection list. Takes a pre-fetched array of references
|
|
4
|
+
* (from `useCollectionList`) plus a select callback. Renders one
|
|
5
|
+
* row per collection with `data-pyric-collection-id` for styling
|
|
6
|
+
* and testing. The library does not own the data fetch — the hook
|
|
7
|
+
* does — so this component is a thin presentational layer.
|
|
8
|
+
*/
|
|
9
|
+
export function CollectionList({ collections, isLoading, error, onSelect, emptyState, className, }) {
|
|
10
|
+
if (error) {
|
|
11
|
+
return (_jsx("div", { className: className, "data-pyric-ui": "collection-list", "data-pyric-error": "", role: "alert", children: error.message }));
|
|
12
|
+
}
|
|
13
|
+
if (isLoading && collections.length === 0) {
|
|
14
|
+
return (_jsx("div", { className: className, "data-pyric-ui": "collection-list", "data-pyric-loading": "" }));
|
|
15
|
+
}
|
|
16
|
+
if (collections.length === 0) {
|
|
17
|
+
return (_jsx("div", { className: className, "data-pyric-ui": "collection-list", "data-pyric-empty": "", children: emptyState }));
|
|
18
|
+
}
|
|
19
|
+
return (_jsx("ul", { className: className, "data-pyric-ui": "collection-list", children: collections.map((coll) => (_jsx("li", { "data-pyric-collection-entry": true, "data-pyric-collection-id": coll.id, children: _jsx("button", { type: "button", onClick: () => onSelect?.(coll), "data-pyric-collection-select": true, children: coll.id }) }, coll.path))) }));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=CollectionList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollectionList.js","sourceRoot":"","sources":["../../../src/firestore/components/CollectionList.tsx"],"names":[],"mappings":";AAeA;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,WAAW,EACX,SAAS,EACT,KAAK,EACL,QAAQ,EACR,UAAU,EACV,SAAS,GACW;IACpB,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,CACL,cACE,SAAS,EAAE,SAAS,mBACN,iBAAiB,sBACd,EAAE,EACnB,IAAI,EAAC,OAAO,YAEX,KAAK,CAAC,OAAO,GACV,CACP,CAAC;IACJ,CAAC;IACD,IAAI,SAAS,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1C,OAAO,CACL,cACE,SAAS,EAAE,SAAS,mBACN,iBAAiB,wBACZ,EAAE,GACrB,CACH,CAAC;IACJ,CAAC;IACD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO,CACL,cAAK,SAAS,EAAE,SAAS,mBAAgB,iBAAiB,sBAAkB,EAAE,YAC3E,UAAU,GACP,CACP,CAAC;IACJ,CAAC;IACD,OAAO,CACL,aAAI,SAAS,EAAE,SAAS,mBAAgB,iBAAiB,YACtD,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACzB,8EAG4B,IAAI,CAAC,EAAE,YAEjC,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,kDAG9B,IAAI,CAAC,EAAE,GACD,IAVJ,IAAI,CAAC,IAAI,CAWX,CACN,CAAC,GACC,CACN,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { CollectionReference, DocumentReference } from 'pyric/firestore';
|
|
3
|
+
import { type RecursiveDeleteImpl } from '../hooks/useRecursiveDelete.js';
|
|
4
|
+
export interface DeleteWithConfirmProps {
|
|
5
|
+
/** The doc / collection to delete. */
|
|
6
|
+
target: DocumentReference | CollectionReference;
|
|
7
|
+
/** Implementation that walks the tree + deletes. Consumer-supplied.
|
|
8
|
+
* Sandbox-backed apps usually wire `pyric/sandbox` introspection;
|
|
9
|
+
* production apps usually call a Cloud Function. */
|
|
10
|
+
impl: RecursiveDeleteImpl;
|
|
11
|
+
/** Confirm-dialog title. Defaults to a sensible derivation from
|
|
12
|
+
* the target's path. */
|
|
13
|
+
title?: string;
|
|
14
|
+
/** Confirm-dialog body. */
|
|
15
|
+
body?: ReactNode;
|
|
16
|
+
/** Label on the destructive button. */
|
|
17
|
+
confirmLabel?: string;
|
|
18
|
+
/** Fired after the delete iterator finishes successfully. */
|
|
19
|
+
onDeleted?: () => void;
|
|
20
|
+
/** Optional render override for the trigger button. */
|
|
21
|
+
renderTrigger?: (props: {
|
|
22
|
+
onClick: () => void;
|
|
23
|
+
isRunning: boolean;
|
|
24
|
+
progress: number;
|
|
25
|
+
}) => ReactNode;
|
|
26
|
+
/** Class forwarded to the default trigger button. */
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Composition that wires `useConfirm` + `useRecursiveDelete`. Requires
|
|
31
|
+
* a `<ConfirmProvider>` ancestor.
|
|
32
|
+
*
|
|
33
|
+
* The default trigger renders a plain `<button>` carrying the
|
|
34
|
+
* destructive intent (the consumer styles via `[data-pyric-destructive]`).
|
|
35
|
+
* Consumers wanting different chrome pass `renderTrigger`.
|
|
36
|
+
*/
|
|
37
|
+
export declare function DeleteWithConfirm({ target, impl, title, body, confirmLabel, onDeleted, renderTrigger, className, }: DeleteWithConfirmProps): import("react").JSX.Element;
|
|
38
|
+
//# sourceMappingURL=DeleteWithConfirm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeleteWithConfirm.d.ts","sourceRoot":"","sources":["../../../src/firestore/components/DeleteWithConfirm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,gCAAgC,CAAC;AAExC,MAAM,WAAW,sBAAsB;IACrC,sCAAsC;IACtC,MAAM,EAAE,iBAAiB,GAAG,mBAAmB,CAAC;IAChD;;yDAEqD;IACrD,IAAI,EAAE,mBAAmB,CAAC;IAC1B;6BACyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,uCAAuC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,uDAAuD;IACvD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE;QACtB,OAAO,EAAE,MAAM,IAAI,CAAC;QACpB,SAAS,EAAE,OAAO,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;KAClB,KAAK,SAAS,CAAC;IAChB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,YAAuB,EACvB,SAAS,EACT,aAAa,EACb,SAAS,GACV,EAAE,sBAAsB,+BAiCxB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useConfirm } from '../../primitives/useConfirm.js';
|
|
3
|
+
import { useRecursiveDelete, } from '../hooks/useRecursiveDelete.js';
|
|
4
|
+
/**
|
|
5
|
+
* Composition that wires `useConfirm` + `useRecursiveDelete`. Requires
|
|
6
|
+
* a `<ConfirmProvider>` ancestor.
|
|
7
|
+
*
|
|
8
|
+
* The default trigger renders a plain `<button>` carrying the
|
|
9
|
+
* destructive intent (the consumer styles via `[data-pyric-destructive]`).
|
|
10
|
+
* Consumers wanting different chrome pass `renderTrigger`.
|
|
11
|
+
*/
|
|
12
|
+
export function DeleteWithConfirm({ target, impl, title, body, confirmLabel = 'Delete', onDeleted, renderTrigger, className, }) {
|
|
13
|
+
const confirm = useConfirm();
|
|
14
|
+
const { delete: runDelete, isRunning, progress, error } = useRecursiveDelete(impl);
|
|
15
|
+
const handleClick = async () => {
|
|
16
|
+
const ok = await confirm({
|
|
17
|
+
title: title ?? `Delete ${target.path}?`,
|
|
18
|
+
body,
|
|
19
|
+
destructive: true,
|
|
20
|
+
confirmLabel,
|
|
21
|
+
});
|
|
22
|
+
if (!ok)
|
|
23
|
+
return;
|
|
24
|
+
await runDelete(target);
|
|
25
|
+
if (!error)
|
|
26
|
+
onDeleted?.();
|
|
27
|
+
};
|
|
28
|
+
if (renderTrigger) {
|
|
29
|
+
return _jsx(_Fragment, { children: renderTrigger({ onClick: handleClick, isRunning, progress }) });
|
|
30
|
+
}
|
|
31
|
+
return (_jsx("button", { type: "button", onClick: handleClick, className: className, disabled: isRunning, "data-pyric-ui": "delete-with-confirm", "data-pyric-destructive": "", "data-pyric-running": isRunning ? '' : undefined, children: isRunning ? `Deleting… (${progress})` : confirmLabel }));
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=DeleteWithConfirm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeleteWithConfirm.js","sourceRoot":"","sources":["../../../src/firestore/components/DeleteWithConfirm.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EACL,kBAAkB,GAEnB,MAAM,gCAAgC,CAAC;AA4BxC;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAChC,MAAM,EACN,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,YAAY,GAAG,QAAQ,EACvB,SAAS,EACT,aAAa,EACb,SAAS,GACc;IACvB,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAEnF,MAAM,WAAW,GAAG,KAAK,IAAI,EAAE;QAC7B,MAAM,EAAE,GAAG,MAAM,OAAO,CAAC;YACvB,KAAK,EAAE,KAAK,IAAI,UAAU,MAAM,CAAC,IAAI,GAAG;YACxC,IAAI;YACJ,WAAW,EAAE,IAAI;YACjB,YAAY;SACb,CAAC,CAAC;QACH,IAAI,CAAC,EAAE;YAAE,OAAO;QAChB,MAAM,SAAS,CAAC,MAAM,CAAC,CAAC;QACxB,IAAI,CAAC,KAAK;YAAE,SAAS,EAAE,EAAE,CAAC;IAC5B,CAAC,CAAC;IAEF,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,4BAAG,aAAa,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,GAAI,CAAC;IAC7E,CAAC;IAED,OAAO,CACL,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,SAAS,mBACL,qBAAqB,4BACZ,EAAE,wBACL,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,YAE7C,SAAS,CAAC,CAAC,CAAC,cAAc,QAAQ,GAAG,CAAC,CAAC,CAAC,YAAY,GAC9C,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type UseDocumentEditorResult } from '../hooks/useDocumentEditor.js';
|
|
3
|
+
import type { FieldEditorRegistry } from '../fieldEditors/types.js';
|
|
4
|
+
export interface DocumentEditorRootProps {
|
|
5
|
+
/** Initial document data. Built into the editor's tree on first
|
|
6
|
+
* mount; later changes don't rebuild — call `editor.reset()` to
|
|
7
|
+
* re-initialize from a fresh `initial`. */
|
|
8
|
+
initial?: Record<string, unknown>;
|
|
9
|
+
/** Override or extend the built-in field editors. */
|
|
10
|
+
fieldEditors?: FieldEditorRegistry;
|
|
11
|
+
/** Called on every state change with the latest editor state. The
|
|
12
|
+
* parent typically watches `state.isValid` + `state.isDirty` to
|
|
13
|
+
* enable/disable a Save button. */
|
|
14
|
+
onChange?: (state: UseDocumentEditorResult) => void;
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Wires the `useDocumentEditor` hook + field-editor registry into a
|
|
20
|
+
* React context so `<DocumentEditor.Fields>` and `<DocumentEditor.AddField>`
|
|
21
|
+
* can render the tree without prop drilling.
|
|
22
|
+
*
|
|
23
|
+
* Pattern: hook + compound component. Consumers wanting full control
|
|
24
|
+
* over the layout call `useDocumentEditor` directly and render their
|
|
25
|
+
* own tree; consumers wanting the default rendering use this.
|
|
26
|
+
*/
|
|
27
|
+
export declare function DocumentEditorRoot({ initial, fieldEditors, onChange, children, className, }: DocumentEditorRootProps): import("react").JSX.Element;
|
|
28
|
+
/** Read access to the underlying editor state from inside a Root. */
|
|
29
|
+
export declare function useDocumentEditorContext(): UseDocumentEditorResult;
|
|
30
|
+
/**
|
|
31
|
+
* Renders the top-level fields of the document. For finer control,
|
|
32
|
+
* a consumer can call `useDocumentEditorContext()` and render the
|
|
33
|
+
* tree themselves.
|
|
34
|
+
*/
|
|
35
|
+
export declare function DocumentEditorFields(): import("react").JSX.Element;
|
|
36
|
+
/**
|
|
37
|
+
* Compound root export. Consumers pattern-match via dot access:
|
|
38
|
+
*
|
|
39
|
+
* <DocumentEditor.Root initial={data} onChange={…}>
|
|
40
|
+
* <DocumentEditor.Fields />
|
|
41
|
+
* </DocumentEditor.Root>
|
|
42
|
+
*/
|
|
43
|
+
export declare const DocumentEditor: {
|
|
44
|
+
Root: typeof DocumentEditorRoot;
|
|
45
|
+
Fields: typeof DocumentEditorFields;
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=DocumentEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentEditor.d.ts","sourceRoot":"","sources":["../../../src/firestore/components/DocumentEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACrF,OAAO,EAAqB,KAAK,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAEhG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAsBpE,MAAM,WAAW,uBAAuB;IACtC;;gDAE4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,qDAAqD;IACrD,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC;;wCAEoC;IACpC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACpD,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,SAAS,GACV,EAAE,uBAAuB,+BA6BzB;AAED,qEAAqE;AACrE,wBAAgB,wBAAwB,IAAI,uBAAuB,CAElE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,gCAiBnC;AAkOD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc;;;CAG1B,CAAC"}
|