From 79a9bf78f83e0b0d474baf2ccf7f26afca50ec4f Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 30 May 2026 18:46:36 +0000 Subject: [PATCH] refactor(commons): name single-NIP feature packages after their quartz NIP Rename the two single-NIP feature packages to mirror their quartz counterparts for 1:1 traceability: - chess -> nip64Chess - call -> nipACWebRtcCalls marmot and nip53LiveActivities already match quartz and are unchanged. Document the rule in commons/ARCHITECTURE.md: layer is the primary axis, NIP is the secondary axis (nipNN matching quartz), and commons is deliberately NOT reorganized NIP-first at the top level. Also remove stray markup that leaked into the end of the doc. https://claude.ai/code/session_01KXLzsvx9Gyrm3Yz4Rims55 --- .../service/call/CallForegroundService.kt | 2 +- .../service/call/CallSessionBridge.kt | 2 +- .../service/call/WebRtcPeerSessionAdapter.kt | 10 ++--- .../EventNotificationConsumer.kt | 2 +- .../amethyst/ui/call/CallActivity.kt | 2 +- .../amethyst/ui/call/CallScreen.kt | 4 +- .../amethyst/ui/call/ConnectedCallUI.kt | 2 +- .../amethyst/ui/call/PipCallUI.kt | 2 +- .../amethyst/ui/call/session/CallSession.kt | 26 +++++------ .../amethyst/ui/navigation/AppNavigation.kt | 2 +- .../amethyst/ui/note/types/Chess.kt | 4 +- .../ui/screen/loggedIn/AccountViewModel.kt | 2 +- .../loggedIn/DecryptAndIndexProcessor.kt | 2 +- .../loggedIn/chess/AndroidChessAdapter.kt | 18 ++++---- .../screen/loggedIn/chess/ChessGameScreen.kt | 8 ++-- .../screen/loggedIn/chess/ChessLobbyScreen.kt | 20 ++++----- .../loggedIn/chess/ChessRelaySettingsSheet.kt | 2 +- .../loggedIn/chess/ChessViewModelNew.kt | 16 +++---- .../chess/datasource/FilterChessEvent.kt | 4 +- .../loggedIn/home/NewChessGameButton.kt | 2 +- commons/ARCHITECTURE.md | 44 ++++++++++++++----- .../ChessDismissedGamesStorage.kt | 2 +- .../AcceptedGamesRegistry.kt | 2 +- .../{chess => nip64Chess}/ChessBoard.kt | 2 +- .../ChessBroadcastBanner.kt | 2 +- .../{chess => nip64Chess}/ChessConfig.kt | 2 +- .../ChessDismissedGamesStorage.kt | 2 +- .../ChessEventCollector.kt | 2 +- .../ChessEventPolling.kt | 2 +- .../{chess => nip64Chess}/ChessGameLoader.kt | 2 +- .../{chess => nip64Chess}/ChessGameViewer.kt | 2 +- .../{chess => nip64Chess}/ChessLobbyCards.kt | 2 +- .../{chess => nip64Chess}/ChessLobbyLogic.kt | 2 +- .../{chess => nip64Chess}/ChessLobbyState.kt | 2 +- .../ChessPieceVectors.kt | 2 +- .../{chess => nip64Chess}/ChessPlayerChip.kt | 2 +- .../ChessRelayFetchHelper.kt | 2 +- .../{chess => nip64Chess}/ChessSyncBanner.kt | 2 +- .../IUserMetadataProvider.kt | 2 +- .../InteractiveChessBoard.kt | 2 +- .../{chess => nip64Chess}/LiveChessGame.kt | 2 +- .../{chess => nip64Chess}/MoveNavigator.kt | 2 +- .../{chess => nip64Chess}/PGNMetadata.kt | 2 +- .../subscription/ChessFilterBuilder.kt | 2 +- .../ChessSubscriptionController.kt | 2 +- .../subscription/ChessSubscriptionState.kt | 2 +- .../subscription/ChessTimeWindows.kt | 2 +- .../ARCHITECTURE.md | 6 +-- .../{call => nipACWebRtcCalls}/CallManager.kt | 6 +-- .../CallSessionEvent.kt | 2 +- .../{call => nipACWebRtcCalls}/CallState.kt | 2 +- .../{call => nipACWebRtcCalls}/PeerSession.kt | 2 +- .../PeerSessionManager.kt | 2 +- .../commons/search/AdvancedSearchBarState.kt | 4 +- .../amethyst/commons/call/CallManagerTest.kt | 2 +- .../amethyst/commons/call/FakePeerSession.kt | 2 +- .../commons/call/PeerSessionManagerTest.kt | 2 +- .../ChessDismissedGamesStorage.ios.kt | 2 +- .../ChessEventBroadcaster.kt | 2 +- .../ChessDismissedGamesStorage.kt | 2 +- .../amethyst/desktop/chess/ChessScreen.kt | 32 +++++++------- .../desktop/chess/DesktopChessAdapter.kt | 18 ++++---- .../desktop/chess/DesktopChessViewModelNew.kt | 16 +++---- .../subscriptions/ChessSubscription.kt | 6 +-- .../amethyst/desktop/ui/FeedScreen.kt | 2 +- .../amethyst/desktop/ui/SearchScreen.kt | 2 +- .../desktop/ui/search/SearchSyncBanner.kt | 4 +- 67 files changed, 183 insertions(+), 161 deletions(-) rename commons/src/androidMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/ChessDismissedGamesStorage.kt (97%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/AcceptedGamesRegistry.kt (97%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/ChessBoard.kt (99%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/ChessBroadcastBanner.kt (99%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/ChessConfig.kt (97%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/ChessDismissedGamesStorage.kt (96%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/ChessEventCollector.kt (99%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/ChessEventPolling.kt (99%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/ChessGameLoader.kt (99%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/ChessGameViewer.kt (99%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/ChessLobbyCards.kt (99%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/ChessLobbyLogic.kt (99%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/ChessLobbyState.kt (99%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/ChessPieceVectors.kt (99%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/ChessPlayerChip.kt (99%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/ChessRelayFetchHelper.kt (99%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/ChessSyncBanner.kt (99%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/IUserMetadataProvider.kt (96%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/InteractiveChessBoard.kt (99%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/LiveChessGame.kt (99%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/MoveNavigator.kt (98%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/PGNMetadata.kt (99%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/subscription/ChessFilterBuilder.kt (99%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/subscription/ChessSubscriptionController.kt (97%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/subscription/ChessSubscriptionState.kt (97%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/subscription/ChessTimeWindows.kt (96%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{call => nipACWebRtcCalls}/ARCHITECTURE.md (98%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{call => nipACWebRtcCalls}/CallManager.kt (99%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{call => nipACWebRtcCalls}/CallSessionEvent.kt (97%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{call => nipACWebRtcCalls}/CallState.kt (97%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{call => nipACWebRtcCalls}/PeerSession.kt (97%) rename commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/{call => nipACWebRtcCalls}/PeerSessionManager.kt (99%) rename commons/src/iosMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/ChessDismissedGamesStorage.ios.kt (97%) rename commons/src/jvmAndroid/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/ChessEventBroadcaster.kt (99%) rename commons/src/jvmMain/kotlin/com/vitorpamplona/amethyst/commons/{chess => nip64Chess}/ChessDismissedGamesStorage.kt (97%) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/CallForegroundService.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/CallForegroundService.kt index fc6e1546e8..17d22eea59 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/CallForegroundService.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/CallForegroundService.kt @@ -35,7 +35,7 @@ import androidx.core.app.NotificationCompat import androidx.core.app.ServiceCompat import androidx.core.content.ContextCompat import com.vitorpamplona.amethyst.R -import com.vitorpamplona.amethyst.commons.call.CallState +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.CallState import com.vitorpamplona.amethyst.ui.call.CallActivity import com.vitorpamplona.quartz.utils.Log import kotlinx.coroutines.runBlocking diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/CallSessionBridge.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/CallSessionBridge.kt index 01c56e5ad9..f2ba49c659 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/CallSessionBridge.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/CallSessionBridge.kt @@ -20,7 +20,7 @@ */ package com.vitorpamplona.amethyst.service.call -import com.vitorpamplona.amethyst.commons.call.CallManager +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.CallManager import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel /** diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/WebRtcPeerSessionAdapter.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/WebRtcPeerSessionAdapter.kt index 942db4ba1f..b4f66793aa 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/WebRtcPeerSessionAdapter.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/WebRtcPeerSessionAdapter.kt @@ -20,17 +20,17 @@ */ package com.vitorpamplona.amethyst.service.call -import com.vitorpamplona.amethyst.commons.call.IceCandidateData -import com.vitorpamplona.amethyst.commons.call.PeerSession -import com.vitorpamplona.amethyst.commons.call.SdpType -import com.vitorpamplona.amethyst.commons.call.SignalingState +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.IceCandidateData +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.PeerSession +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.SdpType +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.SignalingState import org.webrtc.IceCandidate import org.webrtc.PeerConnection import org.webrtc.SessionDescription /** * Adapts a [WebRtcCallSession] to the platform-independent [PeerSession] interface, - * allowing [com.vitorpamplona.amethyst.commons.call.PeerSessionManager] to manage + * allowing [com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.PeerSessionManager] to manage * ICE buffering, answer routing, and renegotiation glare without depending on org.webrtc. */ class WebRtcPeerSessionAdapter( diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/notifications/EventNotificationConsumer.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/notifications/EventNotificationConsumer.kt index 3a3b6bd37a..5860829872 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/notifications/EventNotificationConsumer.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/notifications/EventNotificationConsumer.kt @@ -32,7 +32,7 @@ import coil3.request.allowHardware import com.vitorpamplona.amethyst.Amethyst import com.vitorpamplona.amethyst.LocalPreferences import com.vitorpamplona.amethyst.R -import com.vitorpamplona.amethyst.commons.call.CallManager +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.CallManager import com.vitorpamplona.amethyst.model.Account import com.vitorpamplona.amethyst.model.LocalCache import com.vitorpamplona.amethyst.model.Note diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/CallActivity.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/CallActivity.kt index cd1c87828d..a465d606f6 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/CallActivity.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/CallActivity.kt @@ -40,7 +40,7 @@ import androidx.compose.runtime.mutableStateOf import androidx.core.content.ContextCompat import androidx.lifecycle.lifecycleScope import com.vitorpamplona.amethyst.R -import com.vitorpamplona.amethyst.commons.call.CallState +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.CallState import com.vitorpamplona.amethyst.service.call.CallSessionBridge import com.vitorpamplona.amethyst.service.call.notification.CallNotifier import com.vitorpamplona.amethyst.service.relayClient.authCommand.compose.RelayAuthSubscription diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/CallScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/CallScreen.kt index 36cd04ced3..d886f528dc 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/CallScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/CallScreen.kt @@ -53,10 +53,10 @@ import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.vitorpamplona.amethyst.R -import com.vitorpamplona.amethyst.commons.call.CallManager -import com.vitorpamplona.amethyst.commons.call.CallState import com.vitorpamplona.amethyst.commons.icons.symbols.Icon import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.CallManager +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.CallState import com.vitorpamplona.amethyst.ui.call.session.CallSession import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel import com.vitorpamplona.amethyst.ui.stringRes diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/ConnectedCallUI.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/ConnectedCallUI.kt index b282807307..221cc3152e 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/ConnectedCallUI.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/ConnectedCallUI.kt @@ -56,9 +56,9 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.vitorpamplona.amethyst.R -import com.vitorpamplona.amethyst.commons.call.CallState import com.vitorpamplona.amethyst.commons.icons.symbols.Icon import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.CallState import com.vitorpamplona.amethyst.service.call.AudioRoute import com.vitorpamplona.amethyst.ui.call.session.CallSession import com.vitorpamplona.amethyst.ui.note.creators.userSuggestions.ShowUserSuggestionList diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/PipCallUI.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/PipCallUI.kt index 46a2c00e04..f13e5535df 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/PipCallUI.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/PipCallUI.kt @@ -42,7 +42,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import com.vitorpamplona.amethyst.commons.call.CallState +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.CallState import com.vitorpamplona.amethyst.ui.call.session.CallSession import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel import com.vitorpamplona.quartz.utils.TimeUtils diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/session/CallSession.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/session/CallSession.kt index c5f7abaeb4..215230527e 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/session/CallSession.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/call/session/CallSession.kt @@ -27,14 +27,14 @@ import android.net.Network import android.net.NetworkCapabilities import android.net.NetworkRequest import androidx.compose.runtime.Stable -import com.vitorpamplona.amethyst.commons.call.AnswerRouteAction -import com.vitorpamplona.amethyst.commons.call.CallManager -import com.vitorpamplona.amethyst.commons.call.CallState -import com.vitorpamplona.amethyst.commons.call.IceCandidateData -import com.vitorpamplona.amethyst.commons.call.PeerSession -import com.vitorpamplona.amethyst.commons.call.PeerSessionManager -import com.vitorpamplona.amethyst.commons.call.SdpType -import com.vitorpamplona.amethyst.commons.call.SignalingState +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.AnswerRouteAction +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.CallManager +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.CallState +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.IceCandidateData +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.PeerSession +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.PeerSessionManager +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.SdpType +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.SignalingState import com.vitorpamplona.amethyst.service.call.AudioRoute import com.vitorpamplona.amethyst.service.call.CallAudioManager import com.vitorpamplona.amethyst.service.call.CallForegroundService @@ -148,23 +148,23 @@ class CallSession( callManager.sessionEvents.collect { event -> if (closed) return@collect when (event) { - is com.vitorpamplona.amethyst.commons.call.CallSessionEvent.AnswerReceived -> { + is com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.CallSessionEvent.AnswerReceived -> { onCallAnswerReceived(event.event.pubKey, event.event.sdpAnswer()) } - is com.vitorpamplona.amethyst.commons.call.CallSessionEvent.IceCandidateReceived -> { + is com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.CallSessionEvent.IceCandidateReceived -> { onIceCandidateReceived(event.event) } - is com.vitorpamplona.amethyst.commons.call.CallSessionEvent.NewPeerInGroupCall -> { + is com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.CallSessionEvent.NewPeerInGroupCall -> { onNewPeerInGroupCall(event.peerPubKey) } - is com.vitorpamplona.amethyst.commons.call.CallSessionEvent.MidCallOfferReceived -> { + is com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.CallSessionEvent.MidCallOfferReceived -> { onMidCallOfferReceived(event.peerPubKey, event.sdpOffer) } - is com.vitorpamplona.amethyst.commons.call.CallSessionEvent.PeerLeft -> { + is com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.CallSessionEvent.PeerLeft -> { disposePeerSession(event.peerPubKey) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt index 218312863a..8c03c0d26c 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt @@ -40,7 +40,7 @@ import androidx.core.util.Consumer import androidx.navigation.compose.NavHost import androidx.navigation.compose.composable import com.vitorpamplona.amethyst.R -import com.vitorpamplona.amethyst.commons.call.CallState +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.CallState import com.vitorpamplona.amethyst.service.crashreports.DisplayCrashMessages import com.vitorpamplona.amethyst.service.relayClient.notifyCommand.compose.DisplayNotifyMessages import com.vitorpamplona.amethyst.ui.actions.NewUserMetadataScreen diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/types/Chess.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/types/Chess.kt index 275ffad3ef..4ba62cf5bd 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/types/Chess.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/types/Chess.kt @@ -44,8 +44,8 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.lifecycle.viewmodel.compose.viewModel import com.vitorpamplona.amethyst.R -import com.vitorpamplona.amethyst.commons.chess.ChessChallenge -import com.vitorpamplona.amethyst.commons.chess.ChessGameViewer +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessChallenge +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessGameViewer import com.vitorpamplona.amethyst.model.Note import com.vitorpamplona.amethyst.model.User import com.vitorpamplona.amethyst.ui.components.SensitivityWarning diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountViewModel.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountViewModel.kt index fade534922..1f4d7ba6c7 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountViewModel.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountViewModel.kt @@ -37,12 +37,12 @@ import com.vitorpamplona.amethyst.AccountInfo import com.vitorpamplona.amethyst.Amethyst import com.vitorpamplona.amethyst.LocalPreferences import com.vitorpamplona.amethyst.R -import com.vitorpamplona.amethyst.commons.call.CallManager import com.vitorpamplona.amethyst.commons.model.LiveHiddenUsers import com.vitorpamplona.amethyst.commons.model.emphChat.EphemeralChatChannel import com.vitorpamplona.amethyst.commons.model.nip28PublicChats.PublicChatChannel import com.vitorpamplona.amethyst.commons.model.nip53LiveActivities.LiveActivitiesChannel import com.vitorpamplona.amethyst.commons.model.observables.CreatedAtComparator +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.CallManager import com.vitorpamplona.amethyst.commons.tor.TorType import com.vitorpamplona.amethyst.commons.ui.feeds.FeedState import com.vitorpamplona.amethyst.commons.ui.notifications.CardFeedState diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/DecryptAndIndexProcessor.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/DecryptAndIndexProcessor.kt index af88b3628c..a1e77258de 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/DecryptAndIndexProcessor.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/DecryptAndIndexProcessor.kt @@ -21,8 +21,8 @@ package com.vitorpamplona.amethyst.ui.screen.loggedIn import com.vitorpamplona.amethyst.Amethyst -import com.vitorpamplona.amethyst.commons.call.CallManager import com.vitorpamplona.amethyst.commons.model.privateChats.ChatroomList +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.CallManager import com.vitorpamplona.amethyst.model.Account import com.vitorpamplona.amethyst.model.LocalCache import com.vitorpamplona.amethyst.model.Note diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/AndroidChessAdapter.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/AndroidChessAdapter.kt index 3a49b5e1fb..963cfd79a3 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/AndroidChessAdapter.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/AndroidChessAdapter.kt @@ -20,15 +20,15 @@ */ package com.vitorpamplona.amethyst.ui.screen.loggedIn.chess -import com.vitorpamplona.amethyst.commons.chess.ChessConfig -import com.vitorpamplona.amethyst.commons.chess.ChessEventBroadcaster -import com.vitorpamplona.amethyst.commons.chess.ChessEventPublisher -import com.vitorpamplona.amethyst.commons.chess.ChessRelayFetchHelper -import com.vitorpamplona.amethyst.commons.chess.ChessRelayFetcher -import com.vitorpamplona.amethyst.commons.chess.IUserMetadataProvider -import com.vitorpamplona.amethyst.commons.chess.RelayFetchProgress -import com.vitorpamplona.amethyst.commons.chess.RelayGameSummary -import com.vitorpamplona.amethyst.commons.chess.subscription.ChessFilterBuilder +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessConfig +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessEventBroadcaster +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessEventPublisher +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessRelayFetchHelper +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessRelayFetcher +import com.vitorpamplona.amethyst.commons.nip64Chess.IUserMetadataProvider +import com.vitorpamplona.amethyst.commons.nip64Chess.RelayFetchProgress +import com.vitorpamplona.amethyst.commons.nip64Chess.RelayGameSummary +import com.vitorpamplona.amethyst.commons.nip64Chess.subscription.ChessFilterBuilder import com.vitorpamplona.amethyst.model.Account import com.vitorpamplona.amethyst.model.LocalCache import com.vitorpamplona.quartz.nip64Chess.ChessGameEnd diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/ChessGameScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/ChessGameScreen.kt index 835a774602..657b27a98d 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/ChessGameScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/ChessGameScreen.kt @@ -59,12 +59,12 @@ import androidx.compose.ui.unit.dp import androidx.fragment.app.FragmentActivity import androidx.lifecycle.viewmodel.compose.viewModel import com.vitorpamplona.amethyst.R -import com.vitorpamplona.amethyst.commons.chess.ChessBroadcastBanner -import com.vitorpamplona.amethyst.commons.chess.ChessBroadcastStatus -import com.vitorpamplona.amethyst.commons.chess.ChessSyncBanner -import com.vitorpamplona.amethyst.commons.chess.LiveChessGameScreen import com.vitorpamplona.amethyst.commons.icons.symbols.Icon import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessBroadcastBanner +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessBroadcastStatus +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessSyncBanner +import com.vitorpamplona.amethyst.commons.nip64Chess.LiveChessGameScreen import com.vitorpamplona.amethyst.ui.navigation.navs.INav import com.vitorpamplona.amethyst.ui.navigation.routes.Route import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/ChessLobbyScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/ChessLobbyScreen.kt index 6bb4c75d1d..60f6dc8187 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/ChessLobbyScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/ChessLobbyScreen.kt @@ -60,18 +60,18 @@ import androidx.compose.ui.unit.dp import androidx.fragment.app.FragmentActivity import androidx.lifecycle.viewmodel.compose.viewModel import com.vitorpamplona.amethyst.R -import com.vitorpamplona.amethyst.commons.chess.ActiveGameCard -import com.vitorpamplona.amethyst.commons.chess.ChallengeCard -import com.vitorpamplona.amethyst.commons.chess.ChessChallenge -import com.vitorpamplona.amethyst.commons.chess.ChessSyncBanner -import com.vitorpamplona.amethyst.commons.chess.CompletedGameCard -import com.vitorpamplona.amethyst.commons.chess.NewChessGameDialog -import com.vitorpamplona.amethyst.commons.chess.OutgoingChallengeCard -import com.vitorpamplona.amethyst.commons.chess.OverlappingAvatars -import com.vitorpamplona.amethyst.commons.chess.PublicGameCard -import com.vitorpamplona.amethyst.commons.chess.SpectatingGameCard import com.vitorpamplona.amethyst.commons.icons.symbols.Icon import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols +import com.vitorpamplona.amethyst.commons.nip64Chess.ActiveGameCard +import com.vitorpamplona.amethyst.commons.nip64Chess.ChallengeCard +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessChallenge +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessSyncBanner +import com.vitorpamplona.amethyst.commons.nip64Chess.CompletedGameCard +import com.vitorpamplona.amethyst.commons.nip64Chess.NewChessGameDialog +import com.vitorpamplona.amethyst.commons.nip64Chess.OutgoingChallengeCard +import com.vitorpamplona.amethyst.commons.nip64Chess.OverlappingAvatars +import com.vitorpamplona.amethyst.commons.nip64Chess.PublicGameCard +import com.vitorpamplona.amethyst.commons.nip64Chess.SpectatingGameCard import com.vitorpamplona.amethyst.ui.feeds.RefresheableBox import com.vitorpamplona.amethyst.ui.navigation.bottombars.FabBottomBarPadded import com.vitorpamplona.amethyst.ui.navigation.navs.INav diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/ChessRelaySettingsSheet.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/ChessRelaySettingsSheet.kt index 462574fb42..826e8215e7 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/ChessRelaySettingsSheet.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/ChessRelaySettingsSheet.kt @@ -44,9 +44,9 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.vitorpamplona.amethyst.R -import com.vitorpamplona.amethyst.commons.chess.ChessConfig import com.vitorpamplona.amethyst.commons.icons.symbols.Icon import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessConfig import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel import com.vitorpamplona.amethyst.ui.stringRes import com.vitorpamplona.quartz.nip01Core.relay.normalizer.NormalizedRelayUrl diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/ChessViewModelNew.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/ChessViewModelNew.kt index fce1c2a2c7..8966460217 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/ChessViewModelNew.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/ChessViewModelNew.kt @@ -23,14 +23,14 @@ package com.vitorpamplona.amethyst.ui.screen.loggedIn.chess import androidx.compose.runtime.Stable import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.vitorpamplona.amethyst.commons.chess.ChessBroadcastStatus -import com.vitorpamplona.amethyst.commons.chess.ChessChallenge -import com.vitorpamplona.amethyst.commons.chess.ChessDismissedGamesStorage -import com.vitorpamplona.amethyst.commons.chess.ChessLobbyLogic -import com.vitorpamplona.amethyst.commons.chess.ChessPollingDefaults -import com.vitorpamplona.amethyst.commons.chess.ChessSyncStatus -import com.vitorpamplona.amethyst.commons.chess.CompletedGame -import com.vitorpamplona.amethyst.commons.chess.PublicGame +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessBroadcastStatus +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessChallenge +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessDismissedGamesStorage +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessLobbyLogic +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessPollingDefaults +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessSyncStatus +import com.vitorpamplona.amethyst.commons.nip64Chess.CompletedGame +import com.vitorpamplona.amethyst.commons.nip64Chess.PublicGame import com.vitorpamplona.amethyst.model.Account import com.vitorpamplona.quartz.nip01Core.core.Event import com.vitorpamplona.quartz.nip64Chess.Color diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/datasource/FilterChessEvent.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/datasource/FilterChessEvent.kt index 1a6f7f8f30..58c7619718 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/datasource/FilterChessEvent.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chess/datasource/FilterChessEvent.kt @@ -20,8 +20,8 @@ */ package com.vitorpamplona.amethyst.ui.screen.loggedIn.chess.datasource -import com.vitorpamplona.amethyst.commons.chess.subscription.ChessFilterBuilder -import com.vitorpamplona.amethyst.commons.chess.subscription.ChessSubscriptionState +import com.vitorpamplona.amethyst.commons.nip64Chess.subscription.ChessFilterBuilder +import com.vitorpamplona.amethyst.commons.nip64Chess.subscription.ChessSubscriptionState import com.vitorpamplona.amethyst.commons.relays.SincePerRelayMap import com.vitorpamplona.quartz.nip01Core.relay.client.pool.RelayBasedFilter diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/home/NewChessGameButton.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/home/NewChessGameButton.kt index 0ce78f3771..e75af18370 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/home/NewChessGameButton.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/home/NewChessGameButton.kt @@ -29,9 +29,9 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.lifecycle.viewmodel.compose.viewModel import com.vitorpamplona.amethyst.R -import com.vitorpamplona.amethyst.commons.chess.NewChessGameDialog import com.vitorpamplona.amethyst.commons.icons.symbols.Icon import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols +import com.vitorpamplona.amethyst.commons.nip64Chess.NewChessGameDialog import com.vitorpamplona.amethyst.ui.navigation.navs.INav import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel import com.vitorpamplona.amethyst.ui.screen.loggedIn.chess.ChessViewModelFactory diff --git a/commons/ARCHITECTURE.md b/commons/ARCHITECTURE.md index 9d265ceae8..3e99f4410b 100644 --- a/commons/ARCHITECTURE.md +++ b/commons/ARCHITECTURE.md @@ -85,7 +85,7 @@ package contains Compose UI (and is therefore *not* CLI-safe). | `richtext` | no | URL/media/pattern parsing for rich text. | | `blurhash` | no | BlurHash encode/decode (pure math; platform image bridge in platform sets). | | `thumbhash` | no | ThumbHash encode/decode. | -| `call` | no | NIP-AC WebRTC **call state machine** + peer-session abstraction. See `call/ARCHITECTURE.md`. | +| `nipACWebRtcCalls` | no | NIP-AC WebRTC **call state machine** + peer-session abstraction. See `nipACWebRtcCalls/ARCHITECTURE.md`. (Mirrors `quartz/.../nipACWebRtcCalls`.) | ### State holders & ViewModels | Package | UI? | Purpose | @@ -124,7 +124,7 @@ they are shared across the GUI apps. Treat as GUI-shared, not strictly headless. ### Mixed (documented debt — see §4) | Package | UI? | Purpose | |----------------|-----|---------| -| `chess` | mixed | Live-chess feature: game/lobby/subscription logic **and** board/lobby composables in one flat package. Needs a `chess/ui` split. | +| `nip64Chess` | mixed | Live-chess feature: game/lobby/subscription logic **and** board/lobby composables in one flat package. Needs a `nip64Chess/ui` split. (Mirrors `quartz/.../nip64Chess`.) | | `domain` | no | Currently only `domain/nip46` (Nostr Connect signer flows). Sparse; candidate to fold into a clearer home. | --- @@ -146,10 +146,31 @@ share them. ### Naming - **Singular, no synonyms.** `util` (not `utils`), `service` (not `services`). One concept → one package name. -- Per-NIP model code goes in `model/nipNN` (e.g. `model/nip51Lists`). - Composables that belong to a feature go in `/ui`; cross-cutting composables go under `ui/`. +### NIP as the second axis (mirror `quartz`) +`quartz` is ~94% organized by NIP (`nipNN` per spec), and that is correct +*there* — the protocol layer is naturally NIP-partitioned. `commons` is **not** +organized by NIP at the top level, and should not be: most of it is +cross-cutting infrastructure (`ui`, `relayClient`, `viewmodels`, `feeds`, +`util`…) that serves many NIPs at once, and the load-bearing UI/non-UI boundary +(§1) cuts *across* NIPs, so a NIP-first top level would just nest the same +problem one level down. + +Instead, **layer is the primary axis, NIP is the secondary axis**: + +- The big shared layers stay layer-organized (`model`, `ui`, `relayClient`, …). +- **Inside a layer, NIP-specific code goes in a `nipNN` subpackage whose + name matches `quartz` exactly** — e.g. `model/nip57Zaps`, `ui/nip53LiveActivities`. + This gives a clean trace: `quartz/nip57Zaps` → `commons/model/nip57Zaps` → + `commons/ui/nip57Zaps`. +- **A top-level package that *is* a single self-contained NIP feature takes the + same name as its `quartz` counterpart**: `nip64Chess`, `nipACWebRtcCalls`, + `nip53LiveActivities`, `marmot`. (`marmot` is un-numbered in `quartz` too.) + Generic/multi-NIP packages keep their concern name (`search`, `preview`, + `actions`, `richtext`…). + ### Source sets | Source set | For | |---------------|-----| @@ -182,29 +203,30 @@ compiles: `commonMain` → `jvmAndroid` → platform-specific. See These are intentionally *documented*, not silently tolerated. Fix opportunistically. -- **`chess` is UI+logic in one flat package.** `LiveChessGame.kt` mixes a state - class with composables. Split into `chess/` (logic) + `chess/ui/` - (composables); this needs file-level surgery (extracting composables out of - logic files), not just moves, so it is deferred. +- **`nip64Chess` is UI+logic in one flat package.** `LiveChessGame.kt` mixes a + state class with composables. Split into `nip64Chess/` (logic) + + `nip64Chess/ui/` (composables); this needs file-level surgery (extracting + composables out of logic files), not just moves, so it is deferred. - **`ui/feeds` holds the feed data-access layer** (`FeedFilter`, `ChangesFlowFilter`, `FeedContentState`), which is logic, not UI, and overlaps conceptually with the top-level `feeds` (custom-feed definitions). Consider moving the DAL out of `ui/`. - **`domain` is sparse** (only `nip46`). Either grow it as the home for - use-case/flow types or fold `nip46` into a clearer location. + use-case/flow types or rename it to the matching `nip46RemoteSigner` per the + NIP-second-axis rule. - **`relays` vs `relayClient`** are coherent but close in name; `relays` is low-level EOSE bookkeeping, `relayClient` is the subscription client. Keep the distinction in mind when adding files. - Several **single-file feature packages** (`account`, `marmot`, `nip53LiveActivities`, `keystorage`, `threading`) are kept as feature/abstraction namespaces expected to grow; do not fold them into `util` just for size. +- **`onchain`** (on-chain zap splitting) is `quartz`-adjacent but un-numbered; + leave readable unless a clear NIP number lands. --- ## 5. See also -- `call/ARCHITECTURE.md` — WebRTC call state machine deep-dive. +- `nipACWebRtcCalls/ARCHITECTURE.md` — WebRTC call state machine deep-dive. - Root `.claude/CLAUDE.md` — module overview, sharing philosophy, build commands. - `/kotlin-multiplatform`, `/compose-expert`, `/feed-patterns`, `/relay-client`, `/account-state` skills for the patterns referenced above. - - diff --git a/commons/src/androidMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessDismissedGamesStorage.kt b/commons/src/androidMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessDismissedGamesStorage.kt similarity index 97% rename from commons/src/androidMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessDismissedGamesStorage.kt rename to commons/src/androidMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessDismissedGamesStorage.kt index b4e599a36e..cba028d6a1 100644 --- a/commons/src/androidMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessDismissedGamesStorage.kt +++ b/commons/src/androidMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessDismissedGamesStorage.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import android.content.Context import android.content.SharedPreferences diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/AcceptedGamesRegistry.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/AcceptedGamesRegistry.kt similarity index 97% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/AcceptedGamesRegistry.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/AcceptedGamesRegistry.kt index e1a6521121..192ec6ca32 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/AcceptedGamesRegistry.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/AcceptedGamesRegistry.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import com.vitorpamplona.amethyst.commons.util.KmpLock import com.vitorpamplona.amethyst.commons.util.withLock diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessBoard.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessBoard.kt similarity index 99% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessBoard.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessBoard.kt index 66191aff2e..4bfb10c8f0 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessBoard.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessBoard.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import androidx.compose.foundation.Image import androidx.compose.foundation.background diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessBroadcastBanner.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessBroadcastBanner.kt similarity index 99% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessBroadcastBanner.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessBroadcastBanner.kt index edd23ae6fc..ad56915255 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessBroadcastBanner.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessBroadcastBanner.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.animateContentSize diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessConfig.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessConfig.kt similarity index 97% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessConfig.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessConfig.kt index 0e39068cb3..fb8079b7af 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessConfig.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessConfig.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import com.vitorpamplona.quartz.nip01Core.relay.normalizer.normalizeRelayUrl diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessDismissedGamesStorage.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessDismissedGamesStorage.kt similarity index 96% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessDismissedGamesStorage.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessDismissedGamesStorage.kt index 1567a00dfd..3c950e3509 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessDismissedGamesStorage.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessDismissedGamesStorage.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess /** * Persists dismissed chess game IDs locally per user. diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessEventCollector.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessEventCollector.kt similarity index 99% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessEventCollector.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessEventCollector.kt index da643df359..7b0d2ad328 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessEventCollector.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessEventCollector.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import com.vitorpamplona.amethyst.commons.util.KmpLock import com.vitorpamplona.amethyst.commons.util.withLock diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessEventPolling.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessEventPolling.kt similarity index 99% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessEventPolling.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessEventPolling.kt index 4cc76c5eeb..24d0c21a4c 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessEventPolling.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessEventPolling.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import com.vitorpamplona.quartz.utils.Log import kotlinx.coroutines.CoroutineScope diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessGameLoader.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessGameLoader.kt similarity index 99% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessGameLoader.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessGameLoader.kt index 56671e660b..867a3a69a7 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessGameLoader.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessGameLoader.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import com.vitorpamplona.quartz.nip64Chess.ChessEngine import com.vitorpamplona.quartz.nip64Chess.ChessStateReconstructor diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessGameViewer.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessGameViewer.kt similarity index 99% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessGameViewer.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessGameViewer.kt index 41f8912506..3f90ad5812 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessGameViewer.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessGameViewer.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessLobbyCards.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessLobbyCards.kt similarity index 99% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessLobbyCards.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessLobbyCards.kt index 4b515c6d83..69c6871eb1 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessLobbyCards.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessLobbyCards.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import androidx.compose.foundation.BorderStroke import androidx.compose.foundation.clickable diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessLobbyLogic.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessLobbyLogic.kt similarity index 99% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessLobbyLogic.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessLobbyLogic.kt index 8d8b2791ac..ee6e5604bd 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessLobbyLogic.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessLobbyLogic.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import com.vitorpamplona.amethyst.commons.util.KmpLock import com.vitorpamplona.amethyst.commons.util.withLock diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessLobbyState.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessLobbyState.kt similarity index 99% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessLobbyState.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessLobbyState.kt index 6323e99b99..54f5376eaa 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessLobbyState.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessLobbyState.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import androidx.compose.runtime.Immutable import com.vitorpamplona.quartz.nip64Chess.Color diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessPieceVectors.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessPieceVectors.kt similarity index 99% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessPieceVectors.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessPieceVectors.kt index e5034553d1..82efbd32d1 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessPieceVectors.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessPieceVectors.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.SolidColor diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessPlayerChip.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessPlayerChip.kt similarity index 99% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessPlayerChip.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessPlayerChip.kt index a363f3e706..3507ab428e 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessPlayerChip.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessPlayerChip.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import androidx.compose.foundation.background import androidx.compose.foundation.border diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessRelayFetchHelper.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessRelayFetchHelper.kt similarity index 99% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessRelayFetchHelper.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessRelayFetchHelper.kt index 7a1a945712..f45c499791 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessRelayFetchHelper.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessRelayFetchHelper.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import com.vitorpamplona.amethyst.commons.util.KmpLock import com.vitorpamplona.amethyst.commons.util.withLock diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessSyncBanner.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessSyncBanner.kt similarity index 99% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessSyncBanner.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessSyncBanner.kt index b234924baf..2ab245b0d5 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessSyncBanner.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessSyncBanner.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.animateContentSize diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/IUserMetadataProvider.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/IUserMetadataProvider.kt similarity index 96% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/IUserMetadataProvider.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/IUserMetadataProvider.kt index c10c9a90cf..9447a39c8f 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/IUserMetadataProvider.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/IUserMetadataProvider.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess /** * Platform-specific metadata provider for enriching chess challenges with display info. diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/InteractiveChessBoard.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/InteractiveChessBoard.kt similarity index 99% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/InteractiveChessBoard.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/InteractiveChessBoard.kt index d103bb747f..d46dd43648 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/InteractiveChessBoard.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/InteractiveChessBoard.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import androidx.compose.foundation.Image import androidx.compose.foundation.background diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/LiveChessGame.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/LiveChessGame.kt similarity index 99% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/LiveChessGame.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/LiveChessGame.kt index 09282773eb..a6f2918b78 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/LiveChessGame.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/LiveChessGame.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.core.tween diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/MoveNavigator.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/MoveNavigator.kt similarity index 98% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/MoveNavigator.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/MoveNavigator.kt index cd5effacbc..4b46193fa5 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/MoveNavigator.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/MoveNavigator.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Row diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/PGNMetadata.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/PGNMetadata.kt similarity index 99% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/PGNMetadata.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/PGNMetadata.kt index e204bfe2bd..f68244cb95 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/PGNMetadata.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/PGNMetadata.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/subscription/ChessFilterBuilder.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/subscription/ChessFilterBuilder.kt similarity index 99% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/subscription/ChessFilterBuilder.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/subscription/ChessFilterBuilder.kt index 4057a696ee..2e52753a6c 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/subscription/ChessFilterBuilder.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/subscription/ChessFilterBuilder.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess.subscription +package com.vitorpamplona.amethyst.commons.nip64Chess.subscription import com.vitorpamplona.quartz.nip01Core.relay.client.pool.RelayBasedFilter import com.vitorpamplona.quartz.nip01Core.relay.filters.Filter diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/subscription/ChessSubscriptionController.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/subscription/ChessSubscriptionController.kt similarity index 97% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/subscription/ChessSubscriptionController.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/subscription/ChessSubscriptionController.kt index 4539e42a2c..5ce8ef2e2d 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/subscription/ChessSubscriptionController.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/subscription/ChessSubscriptionController.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess.subscription +package com.vitorpamplona.amethyst.commons.nip64Chess.subscription import kotlinx.coroutines.flow.StateFlow diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/subscription/ChessSubscriptionState.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/subscription/ChessSubscriptionState.kt similarity index 97% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/subscription/ChessSubscriptionState.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/subscription/ChessSubscriptionState.kt index 27c43f37c2..beee4d1b70 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/subscription/ChessSubscriptionState.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/subscription/ChessSubscriptionState.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess.subscription +package com.vitorpamplona.amethyst.commons.nip64Chess.subscription import androidx.compose.runtime.Immutable import com.vitorpamplona.quartz.nip01Core.relay.normalizer.NormalizedRelayUrl diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/subscription/ChessTimeWindows.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/subscription/ChessTimeWindows.kt similarity index 96% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/subscription/ChessTimeWindows.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/subscription/ChessTimeWindows.kt index 85267bfff1..8388fce267 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/chess/subscription/ChessTimeWindows.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/subscription/ChessTimeWindows.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess.subscription +package com.vitorpamplona.amethyst.commons.nip64Chess.subscription /** * Shared time window constants for chess subscriptions. diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/ARCHITECTURE.md b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nipACWebRtcCalls/ARCHITECTURE.md similarity index 98% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/ARCHITECTURE.md rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nipACWebRtcCalls/ARCHITECTURE.md index b65e8af4d9..d93e725a06 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/ARCHITECTURE.md +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nipACWebRtcCalls/ARCHITECTURE.md @@ -34,7 +34,7 @@ quartz/commonMain/.../nipACWebRtcCalls/ ├── tags/ # CallType, CallIdTag, etc. └── WebRtcCallFactory.kt # Sign + gift-wrap helpers (P2P + group variants) -commons/commonMain/.../call/ # ← this package +commons/commonMain/.../nipACWebRtcCalls/ # ← this package ├── CallState.kt # Sealed state + EndReason enum ├── CallManager.kt # State machine, signaling dispatch, timeouts ├── PeerSession.kt # Platform-neutral per-peer signaling interface @@ -54,7 +54,7 @@ amethyst/.../ui/call/ # Android call UI ``` `quartz` is pure Kotlin/Multiplatform protocol code with **zero** WebRTC or -Android dependencies. `commons/.../call/` is also platform-neutral — it holds +Android dependencies. `commons/.../nipACWebRtcCalls/` is also platform-neutral — it holds the state machine and a `PeerSession` abstraction. All `org.webrtc` code lives in `amethyst/service/call/`. @@ -255,7 +255,7 @@ coverage. ## 10. Testing -`commons/commonTest/.../call/CallManagerTest.kt` is the canonical reference +`commons/commonTest/.../nipACWebRtcCalls/CallManagerTest.kt` is the canonical reference for expected state transitions. It uses real `NostrSignerInternal` keys so the factory-sign-wrap pipeline is exercised end-to-end, with `publishEvent` captured into a list for assertions. Construct events directly with the diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/CallManager.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nipACWebRtcCalls/CallManager.kt similarity index 99% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/CallManager.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nipACWebRtcCalls/CallManager.kt index dcf4750cc5..68d9bd5aa9 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/CallManager.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nipACWebRtcCalls/CallManager.kt @@ -18,10 +18,10 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.call +package com.vitorpamplona.amethyst.commons.nipACWebRtcCalls -import com.vitorpamplona.amethyst.commons.call.CallManager.Companion.CALL_TIMEOUT_MS -import com.vitorpamplona.amethyst.commons.call.CallManager.Companion.CONNECTING_TIMEOUT_MS +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.CallManager.Companion.CALL_TIMEOUT_MS +import com.vitorpamplona.amethyst.commons.nipACWebRtcCalls.CallManager.Companion.CONNECTING_TIMEOUT_MS import com.vitorpamplona.quartz.nip01Core.core.Event import com.vitorpamplona.quartz.nip01Core.core.HexKey import com.vitorpamplona.quartz.nip01Core.signers.NostrSigner diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/CallSessionEvent.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nipACWebRtcCalls/CallSessionEvent.kt similarity index 97% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/CallSessionEvent.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nipACWebRtcCalls/CallSessionEvent.kt index 2abd927484..be324a463c 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/CallSessionEvent.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nipACWebRtcCalls/CallSessionEvent.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.call +package com.vitorpamplona.amethyst.commons.nipACWebRtcCalls import com.vitorpamplona.quartz.nip01Core.core.HexKey import com.vitorpamplona.quartz.nipACWebRtcCalls.events.CallAnswerEvent diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/CallState.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nipACWebRtcCalls/CallState.kt similarity index 97% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/CallState.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nipACWebRtcCalls/CallState.kt index 09746ceb6e..2f29b5bb75 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/CallState.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nipACWebRtcCalls/CallState.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.call +package com.vitorpamplona.amethyst.commons.nipACWebRtcCalls import androidx.compose.runtime.Immutable import androidx.compose.runtime.Stable diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/PeerSession.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nipACWebRtcCalls/PeerSession.kt similarity index 97% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/PeerSession.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nipACWebRtcCalls/PeerSession.kt index c709947d70..f917578097 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/PeerSession.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nipACWebRtcCalls/PeerSession.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.call +package com.vitorpamplona.amethyst.commons.nipACWebRtcCalls /** * Represents a single ICE candidate received from a peer. diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/PeerSessionManager.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nipACWebRtcCalls/PeerSessionManager.kt similarity index 99% rename from commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/PeerSessionManager.kt rename to commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nipACWebRtcCalls/PeerSessionManager.kt index 75b56ae8fb..5eb8703829 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/PeerSessionManager.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/nipACWebRtcCalls/PeerSessionManager.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.call +package com.vitorpamplona.amethyst.commons.nipACWebRtcCalls import com.vitorpamplona.amethyst.commons.util.KmpLock import com.vitorpamplona.amethyst.commons.util.withLock diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/search/AdvancedSearchBarState.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/search/AdvancedSearchBarState.kt index 44b16a6011..2f0c4a9613 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/search/AdvancedSearchBarState.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/search/AdvancedSearchBarState.kt @@ -20,9 +20,9 @@ */ package com.vitorpamplona.amethyst.commons.search -import com.vitorpamplona.amethyst.commons.chess.RelaySyncState -import com.vitorpamplona.amethyst.commons.chess.RelaySyncStatus import com.vitorpamplona.amethyst.commons.model.User +import com.vitorpamplona.amethyst.commons.nip64Chess.RelaySyncState +import com.vitorpamplona.amethyst.commons.nip64Chess.RelaySyncStatus import com.vitorpamplona.quartz.nip01Core.core.Event import com.vitorpamplona.quartz.nip01Core.relay.normalizer.NormalizedRelayUrl import com.vitorpamplona.quartz.nip01Core.relay.normalizer.displayUrl diff --git a/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/CallManagerTest.kt b/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/CallManagerTest.kt index fab6868d6e..b5f91a90b3 100644 --- a/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/CallManagerTest.kt +++ b/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/CallManagerTest.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.call +package com.vitorpamplona.amethyst.commons.nipACWebRtcCalls import com.vitorpamplona.quartz.nip01Core.core.HexKey import com.vitorpamplona.quartz.nip01Core.crypto.KeyPair diff --git a/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/FakePeerSession.kt b/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/FakePeerSession.kt index 6179a395d1..af659ac4d9 100644 --- a/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/FakePeerSession.kt +++ b/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/FakePeerSession.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.call +package com.vitorpamplona.amethyst.commons.nipACWebRtcCalls /** * Fake PeerSession that records all operations for test assertions. diff --git a/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/PeerSessionManagerTest.kt b/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/PeerSessionManagerTest.kt index 0a42593bc2..9d62395170 100644 --- a/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/PeerSessionManagerTest.kt +++ b/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/PeerSessionManagerTest.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.call +package com.vitorpamplona.amethyst.commons.nipACWebRtcCalls import kotlin.test.Test import kotlin.test.assertEquals diff --git a/commons/src/iosMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessDismissedGamesStorage.ios.kt b/commons/src/iosMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessDismissedGamesStorage.ios.kt similarity index 97% rename from commons/src/iosMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessDismissedGamesStorage.ios.kt rename to commons/src/iosMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessDismissedGamesStorage.ios.kt index 268b92d6a7..9148daed9e 100644 --- a/commons/src/iosMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessDismissedGamesStorage.ios.kt +++ b/commons/src/iosMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessDismissedGamesStorage.ios.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess // Phase 2 compile-only iOS actual. In-memory only; persistence via // NSUserDefaults arrives with the iosApp module in Phase 3. diff --git a/commons/src/jvmAndroid/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessEventBroadcaster.kt b/commons/src/jvmAndroid/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessEventBroadcaster.kt similarity index 99% rename from commons/src/jvmAndroid/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessEventBroadcaster.kt rename to commons/src/jvmAndroid/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessEventBroadcaster.kt index 1d68c03efb..e8630a810a 100644 --- a/commons/src/jvmAndroid/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessEventBroadcaster.kt +++ b/commons/src/jvmAndroid/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessEventBroadcaster.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import com.vitorpamplona.quartz.nip01Core.core.Event import com.vitorpamplona.quartz.nip01Core.relay.client.INostrClient diff --git a/commons/src/jvmMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessDismissedGamesStorage.kt b/commons/src/jvmMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessDismissedGamesStorage.kt similarity index 97% rename from commons/src/jvmMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessDismissedGamesStorage.kt rename to commons/src/jvmMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessDismissedGamesStorage.kt index 490420da76..7ea69cdd61 100644 --- a/commons/src/jvmMain/kotlin/com/vitorpamplona/amethyst/commons/chess/ChessDismissedGamesStorage.kt +++ b/commons/src/jvmMain/kotlin/com/vitorpamplona/amethyst/commons/nip64Chess/ChessDismissedGamesStorage.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.commons.chess +package com.vitorpamplona.amethyst.commons.nip64Chess import java.util.prefs.Preferences diff --git a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/chess/ChessScreen.kt b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/chess/ChessScreen.kt index efa6986081..2177994fd9 100644 --- a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/chess/ChessScreen.kt +++ b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/chess/ChessScreen.kt @@ -60,25 +60,25 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.min -import com.vitorpamplona.amethyst.commons.chess.ActiveGameCard -import com.vitorpamplona.amethyst.commons.chess.ChallengeCard -import com.vitorpamplona.amethyst.commons.chess.ChessBroadcastBanner -import com.vitorpamplona.amethyst.commons.chess.ChessChallenge -import com.vitorpamplona.amethyst.commons.chess.ChessConfig -import com.vitorpamplona.amethyst.commons.chess.ChessPlayerVsHeader -import com.vitorpamplona.amethyst.commons.chess.ChessSyncBanner -import com.vitorpamplona.amethyst.commons.chess.CompletedGame -import com.vitorpamplona.amethyst.commons.chess.CompletedGameCard -import com.vitorpamplona.amethyst.commons.chess.InteractiveChessBoard -import com.vitorpamplona.amethyst.commons.chess.NewChessGameDialog -import com.vitorpamplona.amethyst.commons.chess.OutgoingChallengeCard -import com.vitorpamplona.amethyst.commons.chess.OverlappingAvatars -import com.vitorpamplona.amethyst.commons.chess.PublicGame -import com.vitorpamplona.amethyst.commons.chess.PublicGameCard -import com.vitorpamplona.amethyst.commons.chess.SpectatingGameCard import com.vitorpamplona.amethyst.commons.icons.symbols.Icon import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols import com.vitorpamplona.amethyst.commons.model.cache.UserMetadataCache +import com.vitorpamplona.amethyst.commons.nip64Chess.ActiveGameCard +import com.vitorpamplona.amethyst.commons.nip64Chess.ChallengeCard +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessBroadcastBanner +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessChallenge +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessConfig +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessPlayerVsHeader +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessSyncBanner +import com.vitorpamplona.amethyst.commons.nip64Chess.CompletedGame +import com.vitorpamplona.amethyst.commons.nip64Chess.CompletedGameCard +import com.vitorpamplona.amethyst.commons.nip64Chess.InteractiveChessBoard +import com.vitorpamplona.amethyst.commons.nip64Chess.NewChessGameDialog +import com.vitorpamplona.amethyst.commons.nip64Chess.OutgoingChallengeCard +import com.vitorpamplona.amethyst.commons.nip64Chess.OverlappingAvatars +import com.vitorpamplona.amethyst.commons.nip64Chess.PublicGame +import com.vitorpamplona.amethyst.commons.nip64Chess.PublicGameCard +import com.vitorpamplona.amethyst.commons.nip64Chess.SpectatingGameCard import com.vitorpamplona.amethyst.commons.ui.components.UserAvatar import com.vitorpamplona.amethyst.desktop.account.AccountState import com.vitorpamplona.amethyst.desktop.network.DesktopRelayConnectionManager diff --git a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/chess/DesktopChessAdapter.kt b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/chess/DesktopChessAdapter.kt index afb7d3755f..0081938958 100644 --- a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/chess/DesktopChessAdapter.kt +++ b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/chess/DesktopChessAdapter.kt @@ -20,16 +20,16 @@ */ package com.vitorpamplona.amethyst.desktop.chess -import com.vitorpamplona.amethyst.commons.chess.ChessConfig -import com.vitorpamplona.amethyst.commons.chess.ChessEventBroadcaster -import com.vitorpamplona.amethyst.commons.chess.ChessEventPublisher -import com.vitorpamplona.amethyst.commons.chess.ChessRelayFetchHelper -import com.vitorpamplona.amethyst.commons.chess.ChessRelayFetcher -import com.vitorpamplona.amethyst.commons.chess.IUserMetadataProvider -import com.vitorpamplona.amethyst.commons.chess.RelayFetchProgress -import com.vitorpamplona.amethyst.commons.chess.RelayGameSummary -import com.vitorpamplona.amethyst.commons.chess.subscription.ChessFilterBuilder import com.vitorpamplona.amethyst.commons.model.cache.UserMetadataCache +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessConfig +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessEventBroadcaster +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessEventPublisher +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessRelayFetchHelper +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessRelayFetcher +import com.vitorpamplona.amethyst.commons.nip64Chess.IUserMetadataProvider +import com.vitorpamplona.amethyst.commons.nip64Chess.RelayFetchProgress +import com.vitorpamplona.amethyst.commons.nip64Chess.RelayGameSummary +import com.vitorpamplona.amethyst.commons.nip64Chess.subscription.ChessFilterBuilder import com.vitorpamplona.amethyst.desktop.account.AccountState import com.vitorpamplona.amethyst.desktop.network.DesktopRelayConnectionManager import com.vitorpamplona.quartz.nip01Core.relay.filters.Filter diff --git a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/chess/DesktopChessViewModelNew.kt b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/chess/DesktopChessViewModelNew.kt index 5b75da2fa0..d120a24714 100644 --- a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/chess/DesktopChessViewModelNew.kt +++ b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/chess/DesktopChessViewModelNew.kt @@ -20,15 +20,15 @@ */ package com.vitorpamplona.amethyst.desktop.chess -import com.vitorpamplona.amethyst.commons.chess.ChessBroadcastStatus -import com.vitorpamplona.amethyst.commons.chess.ChessChallenge -import com.vitorpamplona.amethyst.commons.chess.ChessDismissedGamesStorage -import com.vitorpamplona.amethyst.commons.chess.ChessLobbyLogic -import com.vitorpamplona.amethyst.commons.chess.ChessPollingDefaults -import com.vitorpamplona.amethyst.commons.chess.ChessSyncStatus -import com.vitorpamplona.amethyst.commons.chess.CompletedGame -import com.vitorpamplona.amethyst.commons.chess.PublicGame import com.vitorpamplona.amethyst.commons.model.cache.UserMetadataCache +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessBroadcastStatus +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessChallenge +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessDismissedGamesStorage +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessLobbyLogic +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessPollingDefaults +import com.vitorpamplona.amethyst.commons.nip64Chess.ChessSyncStatus +import com.vitorpamplona.amethyst.commons.nip64Chess.CompletedGame +import com.vitorpamplona.amethyst.commons.nip64Chess.PublicGame import com.vitorpamplona.amethyst.desktop.account.AccountState import com.vitorpamplona.amethyst.desktop.network.DesktopRelayConnectionManager import com.vitorpamplona.quartz.nip01Core.core.Event diff --git a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/subscriptions/ChessSubscription.kt b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/subscriptions/ChessSubscription.kt index 8027f1ecf3..0d0c645669 100644 --- a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/subscriptions/ChessSubscription.kt +++ b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/subscriptions/ChessSubscription.kt @@ -20,9 +20,9 @@ */ package com.vitorpamplona.amethyst.desktop.subscriptions -import com.vitorpamplona.amethyst.commons.chess.subscription.ChessFilterBuilder -import com.vitorpamplona.amethyst.commons.chess.subscription.ChessSubscriptionController -import com.vitorpamplona.amethyst.commons.chess.subscription.ChessSubscriptionState +import com.vitorpamplona.amethyst.commons.nip64Chess.subscription.ChessFilterBuilder +import com.vitorpamplona.amethyst.commons.nip64Chess.subscription.ChessSubscriptionController +import com.vitorpamplona.amethyst.commons.nip64Chess.subscription.ChessSubscriptionState import com.vitorpamplona.amethyst.desktop.chess.DesktopChessEventCache import com.vitorpamplona.amethyst.desktop.network.RelayConnectionManager import com.vitorpamplona.quartz.nip01Core.core.Event diff --git a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/ui/FeedScreen.kt b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/ui/FeedScreen.kt index c7c3eacba8..046cb72d75 100644 --- a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/ui/FeedScreen.kt +++ b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/ui/FeedScreen.kt @@ -82,10 +82,10 @@ import androidx.compose.ui.platform.LocalFocusManager import androidx.compose.ui.text.TextRange import androidx.compose.ui.text.input.TextFieldValue import androidx.compose.ui.unit.dp -import com.vitorpamplona.amethyst.commons.chess.RelaySyncStatus import com.vitorpamplona.amethyst.commons.icons.symbols.Icon import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols import com.vitorpamplona.amethyst.commons.model.Note +import com.vitorpamplona.amethyst.commons.nip64Chess.RelaySyncStatus import com.vitorpamplona.amethyst.commons.richtext.UrlParser import com.vitorpamplona.amethyst.commons.search.AdvancedSearchBarState import com.vitorpamplona.amethyst.commons.search.QuerySerializer diff --git a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/ui/SearchScreen.kt b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/ui/SearchScreen.kt index d60b534469..f457552eb8 100644 --- a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/ui/SearchScreen.kt +++ b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/ui/SearchScreen.kt @@ -73,12 +73,12 @@ import androidx.compose.ui.text.TextRange import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.input.TextFieldValue import androidx.compose.ui.unit.dp -import com.vitorpamplona.amethyst.commons.chess.RelaySyncStatus import com.vitorpamplona.amethyst.commons.feeds.custom.canBecomeFeed import com.vitorpamplona.amethyst.commons.feeds.custom.toFeedDefinition import com.vitorpamplona.amethyst.commons.icons.symbols.Icon import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols import com.vitorpamplona.amethyst.commons.model.nip05DnsIdentifiers.namecoin.NamecoinResolveState +import com.vitorpamplona.amethyst.commons.nip64Chess.RelaySyncStatus import com.vitorpamplona.amethyst.commons.search.AdvancedSearchBarState import com.vitorpamplona.amethyst.commons.search.QuerySerializer import com.vitorpamplona.amethyst.commons.search.SavedSearch diff --git a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/ui/search/SearchSyncBanner.kt b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/ui/search/SearchSyncBanner.kt index 41c074bf56..f58de412a3 100644 --- a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/ui/search/SearchSyncBanner.kt +++ b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/ui/search/SearchSyncBanner.kt @@ -45,11 +45,11 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp -import com.vitorpamplona.amethyst.commons.chess.RelaySyncState -import com.vitorpamplona.amethyst.commons.chess.RelaySyncStatus import com.vitorpamplona.amethyst.commons.icons.symbols.Icon import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbol import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols +import com.vitorpamplona.amethyst.commons.nip64Chess.RelaySyncState +import com.vitorpamplona.amethyst.commons.nip64Chess.RelaySyncStatus import kotlinx.collections.immutable.ImmutableList @Composable