@pyric/ui 0.1.0-alpha.10
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/LICENSE +216 -0
- 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 +62 -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 +63 -0
- package/dist/firestore/components/DocumentList.d.ts.map +1 -0
- package/dist/firestore/components/DocumentList.js +53 -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 +29 -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 +61 -0
- package/dist/firestore/hooks/useDocumentEditor.d.ts.map +1 -0
- package/dist/firestore/hooks/useDocumentEditor.js +71 -0
- package/dist/firestore/hooks/useDocumentEditor.js.map +1 -0
- package/dist/firestore/hooks/useDocumentList.d.ts +50 -0
- package/dist/firestore/hooks/useDocumentList.d.ts.map +1 -0
- package/dist/firestore/hooks/useDocumentList.js +162 -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 +36 -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 +35 -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 +21 -0
- package/dist/firestore/index.d.ts.map +1 -0
- package/dist/firestore/index.js +29 -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 +201 -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 +115 -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/firestore/valueEquality.d.ts +4 -0
- package/dist/firestore/valueEquality.d.ts.map +1 -0
- package/dist/firestore/valueEquality.js +44 -0
- package/dist/firestore/valueEquality.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/hooks/useUpdateHighlights.d.ts +18 -0
- package/dist/primitives/hooks/useUpdateHighlights.d.ts.map +1 -0
- package/dist/primitives/hooks/useUpdateHighlights.js +84 -0
- package/dist/primitives/hooks/useUpdateHighlights.js.map +1 -0
- package/dist/primitives/index.d.ts +11 -0
- package/dist/primitives/index.d.ts.map +1 -0
- package/dist/primitives/index.js +11 -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 +104 -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 +33 -0
- package/dist/rtdb/hooks/useRtdbTree.d.ts.map +1 -0
- package/dist/rtdb/hooks/useRtdbTree.js +67 -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 +50 -0
- package/dist/rtdb/values.d.ts.map +1 -0
- package/dist/rtdb/values.js +186 -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 +66 -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 +78 -0
- package/dist/storage/components/ObjectBrowser.d.ts.map +1 -0
- package/dist/storage/components/ObjectBrowser.js +60 -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 +20 -0
- package/dist/storage/folderPlaceholder.d.ts.map +1 -0
- package/dist/storage/folderPlaceholder.js +34 -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 +105 -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 +74 -0
- package/dist/storage/hooks/useStorageDelete.d.ts.map +1 -0
- package/dist/storage/hooks/useStorageDelete.js +120 -0
- package/dist/storage/hooks/useStorageDelete.js.map +1 -0
- package/dist/storage/hooks/useStorageList.d.ts +72 -0
- package/dist/storage/hooks/useStorageList.d.ts.map +1 -0
- package/dist/storage/hooks/useStorageList.js +164 -0
- package/dist/storage/hooks/useStorageList.js.map +1 -0
- package/dist/storage/hooks/useStorageObject.d.ts +33 -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 +116 -0
- package/dist/storage/hooks/useStorageRulesGate.d.ts.map +1 -0
- package/dist/storage/hooks/useStorageRulesGate.js +150 -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 +77 -0
- package/dist/storage/pendingPrefixes.d.ts.map +1 -0
- package/dist/storage/pendingPrefixes.js +104 -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 +20 -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 +25 -0
- package/dist/traffic/components/TrafficGroupRow.js.map +1 -0
- package/dist/traffic/components/TrafficLineChart.d.ts +37 -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 +88 -0
- package/dist/traffic/components/TrafficTimeline.d.ts.map +1 -0
- package/dist/traffic/components/TrafficTimeline.js +86 -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 +127 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* One field-level change in a staged proposal. A UI-level diff row: the host
|
|
4
|
+
* adapts its backend diff (e.g. the sandbox's `Divergence[]`) into these so the
|
|
5
|
+
* component stays decoupled from any backend type.
|
|
6
|
+
*/
|
|
7
|
+
export interface FieldChange {
|
|
8
|
+
/** Full document path, e.g. `notes/abc123`. */
|
|
9
|
+
docPath: string;
|
|
10
|
+
/** The field that changed. */
|
|
11
|
+
field: string;
|
|
12
|
+
before: unknown;
|
|
13
|
+
after: unknown;
|
|
14
|
+
/** `added` = new field, `removed` = cleared, `changed` = value differs. */
|
|
15
|
+
kind: 'added' | 'changed' | 'removed';
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* An auth user a staged proposal creates (a sign-in account, distinct from
|
|
19
|
+
* Firestore documents). The host adapts its backend request (e.g. a
|
|
20
|
+
* `CreateUserRequest`) into this UI-level shape.
|
|
21
|
+
*/
|
|
22
|
+
export interface CreatedAuthUser {
|
|
23
|
+
uid: string;
|
|
24
|
+
email?: string;
|
|
25
|
+
displayName?: string;
|
|
26
|
+
provider?: string;
|
|
27
|
+
emailVerified?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface ProposedChangeDiffProps {
|
|
30
|
+
changes: FieldChange[];
|
|
31
|
+
/** Auth users the proposal creates, shown as a leading "auth users" group. */
|
|
32
|
+
authUsers?: readonly CreatedAuthUser[];
|
|
33
|
+
className?: string;
|
|
34
|
+
/** Rendered when there are no changes. Defaults to nothing. */
|
|
35
|
+
emptyState?: ReactNode;
|
|
36
|
+
/** Format a value for display. Default: JSON-ish, empty for `undefined`. */
|
|
37
|
+
formatValue?: (value: unknown) => ReactNode;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Headless renderer for a staged change: the documents a proposal touches, with
|
|
41
|
+
* per-field before/after. Grouped by collection. Ships zero styling; the host
|
|
42
|
+
* styles the `data-pyric-*` contract (`proposed-change-diff` /
|
|
43
|
+
* `data-pyric-change-*`). The c-review diff grid is this, styled.
|
|
44
|
+
*/
|
|
45
|
+
export declare function ProposedChangeDiff({ changes, authUsers, className, emptyState, formatValue, }: ProposedChangeDiffProps): import("react").JSX.Element;
|
|
46
|
+
//# sourceMappingURL=ProposedChangeDiff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProposedChangeDiff.d.ts","sourceRoot":"","sources":["../../../src/events/components/ProposedChangeDiff.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGhD;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,2EAA2E;IAC3E,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;CACvC;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,SAAS,CAAC;CAC7C;AA0DD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,SAAc,EACd,SAAS,EACT,UAAiB,EACjB,WAAgC,GACjC,EAAE,uBAAuB,+BA+DzB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { truncateVectorsForDisplay } from '../../firestore/index.js';
|
|
4
|
+
function groupChanges(changes) {
|
|
5
|
+
const byCollection = new Map();
|
|
6
|
+
for (const change of changes) {
|
|
7
|
+
const slash = change.docPath.lastIndexOf('/');
|
|
8
|
+
const collection = slash > 0 ? change.docPath.slice(0, slash) : change.docPath;
|
|
9
|
+
let docs = byCollection.get(collection);
|
|
10
|
+
if (!docs) {
|
|
11
|
+
docs = new Map();
|
|
12
|
+
byCollection.set(collection, docs);
|
|
13
|
+
}
|
|
14
|
+
let fields = docs.get(change.docPath);
|
|
15
|
+
if (!fields) {
|
|
16
|
+
fields = [];
|
|
17
|
+
docs.set(change.docPath, fields);
|
|
18
|
+
}
|
|
19
|
+
fields.push(change);
|
|
20
|
+
}
|
|
21
|
+
return [...byCollection.entries()].map(([collection, docs]) => ({
|
|
22
|
+
collection,
|
|
23
|
+
docs: [...docs.entries()].map(([docPath, fields]) => ({
|
|
24
|
+
docPath,
|
|
25
|
+
docId: docPath.slice(docPath.lastIndexOf('/') + 1),
|
|
26
|
+
fields,
|
|
27
|
+
})),
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
/** A one-line account summary: "alice@x.dev · Alice · verified". */
|
|
31
|
+
function formatAuthUser(u) {
|
|
32
|
+
const parts = [u.email, u.displayName, u.provider, u.emailVerified ? 'verified' : null].filter(Boolean);
|
|
33
|
+
return parts.length ? parts.join(' · ') : 'new account';
|
|
34
|
+
}
|
|
35
|
+
function defaultFormatValue(value) {
|
|
36
|
+
if (value === undefined)
|
|
37
|
+
return '';
|
|
38
|
+
if (typeof value === 'string')
|
|
39
|
+
return JSON.stringify(value);
|
|
40
|
+
try {
|
|
41
|
+
// Truncate vectors so a real embedding never dumps its full array here.
|
|
42
|
+
return JSON.stringify(truncateVectorsForDisplay(value));
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return String(value);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Headless renderer for a staged change: the documents a proposal touches, with
|
|
50
|
+
* per-field before/after. Grouped by collection. Ships zero styling; the host
|
|
51
|
+
* styles the `data-pyric-*` contract (`proposed-change-diff` /
|
|
52
|
+
* `data-pyric-change-*`). The c-review diff grid is this, styled.
|
|
53
|
+
*/
|
|
54
|
+
export function ProposedChangeDiff({ changes, authUsers = [], className, emptyState = null, formatValue = defaultFormatValue, }) {
|
|
55
|
+
const groups = useMemo(() => groupChanges(changes), [changes]);
|
|
56
|
+
if (groups.length === 0 && authUsers.length === 0)
|
|
57
|
+
return _jsx(_Fragment, { children: emptyState });
|
|
58
|
+
return (_jsxs("div", { className: className, "data-pyric-ui": "proposed-change-diff", children: [authUsers.length > 0 ? (_jsxs("section", { "data-pyric-change-group": true, "data-pyric-change-authgroup": true, "data-pyric-change-collection": "auth users", children: [_jsxs("header", { "data-pyric-change-grouphead": true, children: [_jsx("span", { "data-pyric-change-collname": true, children: "auth users" }), _jsx("span", { "data-pyric-change-count": true, children: authUsers.length })] }), _jsx("ul", { "data-pyric-change-docs": true, children: authUsers.map((user) => (_jsxs("li", { "data-pyric-change-doc": true, "data-pyric-change-authuser": true, children: [_jsx("span", { "data-pyric-change-docid": true, children: user.uid }), _jsx("span", { "data-pyric-change-authmeta": true, children: formatAuthUser(user) })] }, user.uid))) })] })) : null, groups.map((group) => (_jsxs("section", { "data-pyric-change-group": true, "data-pyric-change-collection": group.collection, children: [_jsxs("header", { "data-pyric-change-grouphead": true, children: [_jsx("span", { "data-pyric-change-collname": true, children: group.collection }), _jsx("span", { "data-pyric-change-count": true, children: group.docs.length })] }), _jsx("ul", { "data-pyric-change-docs": true, children: group.docs.map((doc) => (_jsxs("li", { "data-pyric-change-doc": true, children: [_jsx("span", { "data-pyric-change-docid": true, children: doc.docId }), _jsx("ul", { "data-pyric-change-fields": true, children: doc.fields.map((field) => (_jsxs("li", { "data-pyric-change-field": true, "data-pyric-change-kind": field.kind, children: [_jsx("span", { "data-pyric-change-key": true, children: field.field }), field.kind !== 'added' ? (_jsx("span", { "data-pyric-change-before": true, children: formatValue(field.before) })) : null, _jsx("span", { "data-pyric-change-arrow": true, "aria-hidden": true, children: '→' }), field.kind !== 'removed' ? (_jsx("span", { "data-pyric-change-after": true, children: formatValue(field.after) })) : null] }, field.field))) })] }, doc.docPath))) })] }, group.collection)))] }));
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=ProposedChangeDiff.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProposedChangeDiff.js","sourceRoot":"","sources":["../../../src/events/components/ProposedChangeDiff.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAkB,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAoDrE,SAAS,YAAY,CAAC,OAAsB;IAC1C,MAAM,YAAY,GAAG,IAAI,GAAG,EAAsC,CAAC;IACnE,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAC9C,MAAM,UAAU,GAAG,K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|
3
|
+
* (`now` / `12s` / `3m` / `1h`), matching the mock's `c-when` strings.
|
|
4
|
+
* The grid is session-scoped (see design-ideation "FRAME CORRECTION")
|
|
5
|
+
* so anchors are relative, never absolute calendar dates.
|
|
6
|
+
*
|
|
7
|
+
* Override via `<ActivityGrid formatWhen={...} />` when the host has a
|
|
8
|
+
* better clock anchor (e.g. a ticking "session now").
|
|
9
|
+
*/
|
|
10
|
+
export declare function defaultFormatWhen(at: number, now?: number): string;
|
|
11
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/events/components/format.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,GAAE,MAAmB,GAAG,MAAM,CAW9E"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default `when`-column formatter: a session-relative duration
|
|
3
|
+
* (`now` / `12s` / `3m` / `1h`), matching the mock's `c-when` strings.
|
|
4
|
+
* The grid is session-scoped (see design-ideation "FRAME CORRECTION")
|
|
5
|
+
* so anchors are relative, never absolute calendar dates.
|
|
6
|
+
*
|
|
7
|
+
* Override via `<ActivityGrid formatWhen={...} />` when the host has a
|
|
8
|
+
* better clock anchor (e.g. a ticking "session now").
|
|
9
|
+
*/
|
|
10
|
+
export function defaultFormatWhen(at, now = Date.now()) {
|
|
11
|
+
const deltaMs = Math.max(0, now - at);
|
|
12
|
+
const s = Math.floor(deltaMs / 1000);
|
|
13
|
+
if (s < 1)
|
|
14
|
+
return 'now';
|
|
15
|
+
if (s < 60)
|
|
16
|
+
return `${s}s`;
|
|
17
|
+
const m = Math.floor(s / 60);
|
|
18
|
+
if (m < 60)
|
|
19
|
+
return `${m}m`;
|
|
20
|
+
const h = Math.floor(m / 60);
|
|
21
|
+
if (h < 24)
|
|
22
|
+
return `${h}h`;
|
|
23
|
+
const d = Math.floor(h / 24);
|
|
24
|
+
return `${d}d`;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.js","sourceRoot":"","sources":["../../../src/events/components/format.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAAU,EAAE,MAAc,IAAI,CAAC,GAAG,EAAE;IACpE,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,CAAC;IACtC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IACrC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IACxB,IAAI,CAAC,GAAG,EAAE;QAAE,OAAO,GAAG,CAAC,GAAG,CAAC;IAC3B,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC7B,IAAI,CAAC,GAAG,EAAE;QAAE,OAAO,GAAG,CAAC,GAAG,CAAC;IAC3B,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC7B,IAAI,CAAC,GAAG,EAAE;QAAE,OAAO,GAAG,CAAC,GAAG,CAAC;IAC3B,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC7B,OAAO,GAAG,CAAC,GAAG,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ActivityGrid, type ActivityGridProps } from './ActivityGrid.js';
|
|
2
|
+
export { ActivityGridRow, type ActivityGridRowProps, } from './ActivityGridRow.js';
|
|
3
|
+
export { ActivityActionItems, type ActivityActionItemsProps, type ActivityActionItem, } from './ActivityActionItems.js';
|
|
4
|
+
export { ProposedChangeDiff, type ProposedChangeDiffProps, type FieldChange, type CreatedAuthUser, } from './ProposedChangeDiff.js';
|
|
5
|
+
export { defaultFormatWhen } from './format.js';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/events/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACL,eAAe,EACf,KAAK,oBAAoB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,KAAK,WAAW,EAChB,KAAK,eAAe,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ActivityGrid } from './ActivityGrid.js';
|
|
2
|
+
export { ActivityGridRow, } from './ActivityGridRow.js';
|
|
3
|
+
export { ActivityActionItems, } from './ActivityActionItems.js';
|
|
4
|
+
export { ProposedChangeDiff, } from './ProposedChangeDiff.js';
|
|
5
|
+
export { defaultFormatWhen } from './format.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/events/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA0B,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACL,eAAe,GAEhB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,mBAAmB,GAGpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,kBAAkB,GAInB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pure activity-digest reducer — folds a `SandboxEvent[]` (the
|
|
3
|
+
* unified stream) into the banded digest the activity grid renders.
|
|
4
|
+
*
|
|
5
|
+
* Kept free of React so it's trivially testable and reusable by a
|
|
6
|
+
* non-React consumer (a CLI session summary, say). `useActivityDigest`
|
|
7
|
+
* is a thin `useMemo` wrapper over `computeActivityDigest`.
|
|
8
|
+
*
|
|
9
|
+
* The categorization is the product (see
|
|
10
|
+
* the design rationale): the can't-miss bands are
|
|
11
|
+
* **denied** (surfaced first, loudly), **added**, **updated**,
|
|
12
|
+
* **removed**, **signed-in / signed-out**, and the catch-alls. Every
|
|
13
|
+
* row + band carries provenance (actor / lens / on-behalf-of) so
|
|
14
|
+
* attribution rides every aggregate, and the band order LEADS with the
|
|
15
|
+
* highest-consequence category present.
|
|
16
|
+
*/
|
|
17
|
+
import type { ActivityActor, ActivityEvent, ActivityLens, AnyActivityEvent, ActivityService } from './types.js';
|
|
18
|
+
/**
|
|
19
|
+
* The band a row falls into. `denied` leads; the write bands
|
|
20
|
+
* (added/updated/removed) and the auth bands (signed-in/signed-out)
|
|
21
|
+
* follow; `read`, `errored`, and `other` are the long-tail catch-alls.
|
|
22
|
+
*
|
|
23
|
+
* - `denied` — a rules denial (firestore `request` with `result: 'deny'`).
|
|
24
|
+
* - `errored` — an operational failure (`request` with `result: 'unsupported'`).
|
|
25
|
+
* - `added` — a doc/object created, or a user created.
|
|
26
|
+
* - `updated` — a doc/object/user/rtdb path mutated in place.
|
|
27
|
+
* - `removed` — a doc/object/user deleted.
|
|
28
|
+
* - `signed-in` — an auth sign-in.
|
|
29
|
+
* - `signed-out` — an auth sign-out.
|
|
30
|
+
* - `read` — an allowed firestore read (`get`/`list`).
|
|
31
|
+
* - `other` — anything modelled but uncategorized (e.g. an unknown service op).
|
|
32
|
+
*/
|
|
33
|
+
export type ActivityBandKey = 'denied' | 'errored' | 'added' | 'updated' | 'removed' | 'signed-in' | 'signed-out' | 'read' | 'other';
|
|
34
|
+
/**
|
|
35
|
+
* A single grid row — the projection of one event onto the
|
|
36
|
+
* `target · change · for · lens · when` column contract from
|
|
37
|
+
* `c-result.html`. All display-ready strings plus the structured
|
|
38
|
+
* provenance the host may style on.
|
|
39
|
+
*/
|
|
40
|
+
export interface ActivityRow {
|
|
41
|
+
/** The originating event's id — stable React key. */
|
|
42
|
+
id: string;
|
|
43
|
+
/** `Date.now()` at the op. Drives the `when` column + recency sort. */
|
|
44
|
+
at: number;
|
|
45
|
+
/** Which band this row was sorted into. */
|
|
46
|
+
band: ActivityBandKey;
|
|
47
|
+
/** True for denials — first-class so hosts flag the row distinctly. */
|
|
48
|
+
denied: boolean;
|
|
49
|
+
/** Originating service. */
|
|
50
|
+
service: ActivityService;
|
|
51
|
+
/** `target` — what was mutated, in the service's addressing scheme
|
|
52
|
+
* (a doc path `notes/3agHoZHZ`, a `uid`, a storage `fullPath`, an
|
|
53
|
+
* rtdb path). Empty string when the event has no addressable target. */
|
|
54
|
+
target: string;
|
|
55
|
+
/** `change` — a short human description of the mutation
|
|
56
|
+
* (`update, owner rule`, `done → true`, `created`, `signed in`). */
|
|
57
|
+
change: string;
|
|
58
|
+
/** `for` — the subject the op acted on behalf of: `request.auth.uid`
|
|
59
|
+
* for firestore, the affected `uid` for auth, else the acting
|
|
60
|
+
* identity. Empty when anonymous / not applicable. */
|
|
61
|
+
for: string;
|
|
62
|
+
/** `lens` — the privilege the op ran under, display-ready
|
|
63
|
+
* (`app`, `as alice`, `admin`). */
|
|
64
|
+
lens: string;
|
|
65
|
+
/** `when` — left undterived here; the grid formats `at` itself, but a
|
|
66
|
+
* pre-rendered relative string is offered for headless consumers. */
|
|
67
|
+
when: string;
|
|
68
|
+
actor: ActivityActor;
|
|
69
|
+
authLens: ActivityLens;
|
|
70
|
+
/** The on-behalf-of subject uid, structured (mirrors `for`). */
|
|
71
|
+
subjectUid: string | null;
|
|
72
|
+
/** Agent plan id, when the op was part of a plan. */
|
|
73
|
+
planId?: string;
|
|
74
|
+
/** The pivot key this row fell under — set only when the digest was
|
|
75
|
+
* computed with `groupBy !== 'none'`. Mirrors the row's `subgroup`. */
|
|
76
|
+
groupKey?: string;
|
|
77
|
+
/** The original event, for drill-in. */
|
|
78
|
+
event: ActivityEvent;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* One category band: a header (`label · count · attribution`) plus its
|
|
82
|
+
* rows. Mirrors the mock's `.band` + `.r.data` structure.
|
|
83
|
+
*/
|
|
84
|
+
export interface ActivityBand {
|
|
85
|
+
key: ActivityBandKey;
|
|
86
|
+
/** Display label — `Denied`, `Added`, `Updated`, … */
|
|
87
|
+
label: string;
|
|
88
|
+
/** Total rows in the band (== `rows.length`; explicit for the header). */
|
|
89
|
+
count: number;
|
|
90
|
+
/** A short attribution phrase when the band has a dominant actor /
|
|
91
|
+
* subject (`all by alice`, `by the app`, `by agent atlas`). Absent
|
|
92
|
+
* when attribution is mixed — the header then shows just the count. */
|
|
93
|
+
attribution?: string;
|
|
94
|
+
rows: ActivityRow[];
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The banded digest — the activity grid's entire model. Bands are
|
|
98
|
+
* pre-sorted lead-with-consequence; `denials` is a flat projection of
|
|
99
|
+
* the consequential rows for the action-items tier.
|
|
100
|
+
*/
|
|
101
|
+
export interface ActivityDigest {
|
|
102
|
+
/** Bands in render order — highest-consequence first. Empty bands
|
|
103
|
+
* omitted. Each band may carry `subgroups` when `groupBy !== 'none'`. */
|
|
104
|
+
bands: ActivityBandWithGroups[];
|
|
105
|
+
/** Total rows across all bands (events the digest categorized). */
|
|
106
|
+
total: number;
|
|
107
|
+
/** Of those, how many were denials. */
|
|
108
|
+
deniedCount: number;
|
|
109
|
+
/**
|
|
110
|
+
* The denial rows, flat + recency-sorted — the source for the
|
|
111
|
+
* action-items tier ("4 writes to /notes were denied"). A projection,
|
|
112
|
+
* not a separate aggregation: these rows also live in the `denied` band.
|
|
113
|
+
*/
|
|
114
|
+
denials: ActivityRow[];
|
|
115
|
+
}
|
|
116
|
+
/** How rows within each band are pivoted/grouped. */
|
|
117
|
+
export type ActivityGroupBy = 'none' | 'actor' | 'lens' | 'subject' | 'service';
|
|
118
|
+
export interface ActivityDigestOptions {
|
|
119
|
+
/**
|
|
120
|
+
* Row order within a band. `recency` (default) is newest-first to
|
|
121
|
+
* match the mock's `when` column. `chronological` is oldest-first.
|
|
122
|
+
*/
|
|
123
|
+
order?: 'recency' | 'chronological';
|
|
124
|
+
/**
|
|
125
|
+
* Pivot rows within each band by an attribution axis. `'none'`
|
|
126
|
+
* (default) leaves the band flat. Any other value splits each band's
|
|
127
|
+
* rows into sub-groups keyed by that axis — surfaced on the row via
|
|
128
|
+
* `groupKey` and exposed as `band.subgroups`. The flat `rows` are
|
|
129
|
+
* always present regardless.
|
|
130
|
+
*/
|
|
131
|
+
groupBy?: ActivityGroupBy;
|
|
132
|
+
/**
|
|
133
|
+
* Cap rows kept per band (the mock shows ~3–4 then "N more"). The
|
|
134
|
+
* digest keeps ALL rows but records the overflow via `band.count` vs
|
|
135
|
+
* `rows.length`. Set to a number to actually trim `rows`; the header
|
|
136
|
+
* `count` still reflects the true total. Default: keep all.
|
|
137
|
+
*/
|
|
138
|
+
rowsPerBand?: number;
|
|
139
|
+
}
|
|
140
|
+
export interface ActivitySubgroup {
|
|
141
|
+
key: string;
|
|
142
|
+
count: number;
|
|
143
|
+
rows: ActivityRow[];
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* A band that may carry pivot sub-groups. `subgroups` is populated only
|
|
147
|
+
* when the digest was computed with `groupBy !== 'none'`; otherwise the
|
|
148
|
+
* band is flat (`rows` only). `computeActivityDigest` always returns
|
|
149
|
+
* bands of this shape so consumers can branch on `subgroups` presence.
|
|
150
|
+
*/
|
|
151
|
+
export interface ActivityBandWithGroups extends ActivityBand {
|
|
152
|
+
/** Present only when `groupBy !== 'none'`. */
|
|
153
|
+
subgroups?: ActivitySubgroup[];
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Fold a unified event stream into the banded activity digest. PURE —
|
|
157
|
+
* no React, no clock reads except the injected `now` (defaults to
|
|
158
|
+
* `Date.now()`, but pass a fixed value in tests for determinism).
|
|
159
|
+
*
|
|
160
|
+
* Events the digest doesn't model (listener lifecycle, snapshot
|
|
161
|
+
* delivery, session boundaries, unknown kinds) are skipped — a full
|
|
162
|
+
* `SandboxEvent[]` from `sandbox.history()` flows in unfiltered.
|
|
163
|
+
*/
|
|
164
|
+
export declare function computeActivityDigest(events: readonly AnyActivityEvent[], opts?: ActivityDigestOptions & {
|
|
165
|
+
now?: number;
|
|
166
|
+
}): ActivityDigest;
|
|
167
|
+
//# sourceMappingURL=digest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digest.d.ts","sourceRoot":"","sources":["../../src/events/digest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,YAAY,EAIZ,gBAAgB,EAChB,eAAe,EAChB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,eAAe,GACvB,QAAQ,GACR,SAAS,GACT,OAAO,GACP,SAAS,GACT,SAAS,GACT,WAAW,GACX,YAAY,GACZ,MAAM,GACN,OAAO,CAAC;AAEZ;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,qDAAqD;IACrD,EAAE,EAAE,MAAM,CAAC;IACX,uEAAuE;IACvE,EAAE,EAAE,MAAM,CAAC;IACX,2CAA2C;IAC3C,IAAI,EAAE,eAAe,CAAC;IACtB,uEAAuE;IACvE,MAAM,EAAE,OAAO,CAAC;IAChB,2BAA2B;IAC3B,OAAO,EAAE,eAAe,CAAC;IAGzB;;6EAEyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf;yEACq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