diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index b2734a8..4d77efd 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -78,14 +78,14 @@ jobs: sudo spctl --master-disable - yarn --cwd packages/toolbox-electron make -p darwin --arch ${{ matrix.arch }} + yarn --cwd packages/siera-desktop make -p darwin --arch ${{ matrix.arch }} - name: Upload artifacts uses: actions/upload-artifact@v3 if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) || github.event_name == 'workflow_dispatch' with: - name: toolbox-electron-macos-${{ matrix.arch }} - path: ./packages/toolbox-electron/out/make/**/*.* + name: siera-desktop-macos-${{ matrix.arch }} + path: ./packages/siera-desktop/out/make/**/*.* retention-days: 7 release: diff --git a/README.md b/README.md index ea14ab7..802278c 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@

-

Animo Toolbox

+

Siera Desktop

Powered by   @@ -45,11 +45,11 @@ All packages are placed in the [`packages/`](./packages) directory. -| Package | Version | Description | -| ------------------------------------------------- | ------- | --------------------------------------- | -| [`toolbox-electron`](./packages/toolbox-electron) | 0.0.1 | Electron app for controlling the agent. | -| [`toolbox-ui`](./packages/toolbox-ui) | 0.0.1 | UI components. | -| [`toolbox-core`](./packages/toolbox-core) | 0.0.1 | The core behind the application. | +| Package | Version | Description | +|---------------------------------------------| ------- | --------------------------------------- | +| [`siera-desktop`](./packages/siera-desktop) | 0.0.1 | Electron app for controlling the agent. | +| [`siera-ui`](./packages/siera-ui) | 0.0.1 | UI components. | +| [`siera-core`](./packages/siera-core) | 0.0.1 | The core behind the application. | ## Getting Started diff --git a/package.json b/package.json index c4dedfb..5b6b105 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "toolbox", + "name": "siera-desktop", "repository": { "type": "git", - "url": "https://github.com/animo/toolbox" + "url": "https://github.com/animo/siera-desktop" }, "author": { "url": "https://animo.id", @@ -22,7 +22,7 @@ ] }, "scripts": { - "postinstall": "(cd packages/toolbox-electron && patch-package) && patch-package", + "postinstall": "(cd packages/siera-desktop && patch-package) && patch-package", "check-types": "yarn check-types:build && yarn check-types:tests", "check-types:tests": "tsc -p tsconfig.test.json --noEmit", "check-types:build": "yarn workspaces run tsc --noEmit -p tsconfig.build.json", diff --git a/packages/toolbox-core/jest.config.ts b/packages/siera-core/jest.config.ts similarity index 100% rename from packages/toolbox-core/jest.config.ts rename to packages/siera-core/jest.config.ts diff --git a/packages/toolbox-core/package.json b/packages/siera-core/package.json similarity index 84% rename from packages/toolbox-core/package.json rename to packages/siera-core/package.json index 563fae1..5d5ffaf 100644 --- a/packages/toolbox-core/package.json +++ b/packages/siera-core/package.json @@ -1,13 +1,13 @@ { - "name": "@animo/toolbox-core", + "name": "@animo/siera-core", "version": "0.0.1", "main": "src/index.ts", "license": "Apache-2.0", "private": true, "repository": { "type": "git", - "url": "https://github.com/animo/toolbox", - "directory": "packages/toolbox-core" + "url": "https://github.com/animo/siera-desktop", + "directory": "packages/siera-core" }, "author": { "url": "https://animo.id", diff --git a/packages/toolbox-core/src/agent/AgentDependenciesProvider.ts b/packages/siera-core/src/agent/AgentDependenciesProvider.ts similarity index 100% rename from packages/toolbox-core/src/agent/AgentDependenciesProvider.ts rename to packages/siera-core/src/agent/AgentDependenciesProvider.ts diff --git a/packages/toolbox-core/src/agent/AgentFactory.ts b/packages/siera-core/src/agent/AgentFactory.ts similarity index 100% rename from packages/toolbox-core/src/agent/AgentFactory.ts rename to packages/siera-core/src/agent/AgentFactory.ts diff --git a/packages/toolbox-core/src/agent/AgentInitializer.ts b/packages/siera-core/src/agent/AgentInitializer.ts similarity index 100% rename from packages/toolbox-core/src/agent/AgentInitializer.ts rename to packages/siera-core/src/agent/AgentInitializer.ts diff --git a/packages/toolbox-core/src/agent/SampleTransactions.ts b/packages/siera-core/src/agent/SampleTransactions.ts similarity index 100% rename from packages/toolbox-core/src/agent/SampleTransactions.ts rename to packages/siera-core/src/agent/SampleTransactions.ts diff --git a/packages/toolbox-core/src/agent/config/AgentConfigRecord.ts b/packages/siera-core/src/agent/config/AgentConfigRecord.ts similarity index 100% rename from packages/toolbox-core/src/agent/config/AgentConfigRecord.ts rename to packages/siera-core/src/agent/config/AgentConfigRecord.ts diff --git a/packages/siera-core/src/agent/config/ConfigFileRepository.ts b/packages/siera-core/src/agent/config/ConfigFileRepository.ts new file mode 100644 index 0000000..72f72b4 --- /dev/null +++ b/packages/siera-core/src/agent/config/ConfigFileRepository.ts @@ -0,0 +1,6 @@ +import type { SieraUiConfig } from './SieraUiConfig' + +export interface ConfigFileRepository { + readConfiguration(): Promise + writeConfiguration(config: SieraUiConfig): Promise +} diff --git a/packages/siera-core/src/agent/config/DefaultConfiguration.ts b/packages/siera-core/src/agent/config/DefaultConfiguration.ts new file mode 100644 index 0000000..853b516 --- /dev/null +++ b/packages/siera-core/src/agent/config/DefaultConfiguration.ts @@ -0,0 +1,6 @@ +import type { SieraUiConfig } from './SieraUiConfig' + +export const DefaultConfiguration: SieraUiConfig = { + colorScheme: 'light', + agents: [], +} diff --git a/packages/siera-core/src/agent/config/SieraUiConfig.ts b/packages/siera-core/src/agent/config/SieraUiConfig.ts new file mode 100644 index 0000000..cc324fb --- /dev/null +++ b/packages/siera-core/src/agent/config/SieraUiConfig.ts @@ -0,0 +1,11 @@ +import type { AgentConfigRecord } from './AgentConfigRecord' + +import { SieraUiConfigSchema } from './adapters/SieraUiConfigValidation' +export interface SieraUiConfig { + colorScheme: 'dark' | 'light' + agents: AgentConfigRecord[] +} + +export const validateAndParseSieraUiConfig = (config: unknown): SieraUiConfig => { + return SieraUiConfigSchema.parse(config) as SieraUiConfig +} diff --git a/packages/siera-core/src/agent/config/adapters/InMemoryConfigRepository.ts b/packages/siera-core/src/agent/config/adapters/InMemoryConfigRepository.ts new file mode 100644 index 0000000..70687e6 --- /dev/null +++ b/packages/siera-core/src/agent/config/adapters/InMemoryConfigRepository.ts @@ -0,0 +1,14 @@ +import type { ConfigFileRepository } from '../ConfigFileRepository' +import type { SieraUiConfig } from '../SieraUiConfig' + +export class InMemoryConfigRepository implements ConfigFileRepository { + public constructor(private config: SieraUiConfig) {} + + public async readConfiguration(): Promise { + return this.config + } + + public async writeConfiguration(config: SieraUiConfig): Promise { + this.config = config + } +} diff --git a/packages/toolbox-core/src/agent/config/adapters/ToolBoxConfigValidation.ts b/packages/siera-core/src/agent/config/adapters/SieraUiConfigValidation.ts similarity index 98% rename from packages/toolbox-core/src/agent/config/adapters/ToolBoxConfigValidation.ts rename to packages/siera-core/src/agent/config/adapters/SieraUiConfigValidation.ts index 3309707..74bcf35 100644 --- a/packages/toolbox-core/src/agent/config/adapters/ToolBoxConfigValidation.ts +++ b/packages/siera-core/src/agent/config/adapters/SieraUiConfigValidation.ts @@ -67,7 +67,7 @@ export const AgentConfigRecordSchema = z.object({ agentConfig: InitConfigSchema, }) -export const ToolboxConfigSchema = z.object({ +export const SieraUiConfigSchema = z.object({ colorScheme: z.enum(['light', 'dark']).default('light'), agents: z.array(AgentConfigRecordSchema).default([]), }) diff --git a/packages/toolbox-core/src/agent/config/index.ts b/packages/siera-core/src/agent/config/index.ts similarity index 83% rename from packages/toolbox-core/src/agent/config/index.ts rename to packages/siera-core/src/agent/config/index.ts index 2c9f7a7..c4fdccc 100644 --- a/packages/toolbox-core/src/agent/config/index.ts +++ b/packages/siera-core/src/agent/config/index.ts @@ -1,4 +1,4 @@ -export * from './ToolboxConfig' +export * from './SieraUiConfig' export * from './ConfigFileRepository' export * from './AgentConfigRecord' export * from './DefaultConfiguration' diff --git a/packages/toolbox-core/src/index.ts b/packages/siera-core/src/index.ts similarity index 100% rename from packages/toolbox-core/src/index.ts rename to packages/siera-core/src/index.ts diff --git a/packages/toolbox-core/src/utils/formatSchemaName.ts b/packages/siera-core/src/utils/formatSchemaName.ts similarity index 100% rename from packages/toolbox-core/src/utils/formatSchemaName.ts rename to packages/siera-core/src/utils/formatSchemaName.ts diff --git a/packages/toolbox-core/src/utils/index.ts b/packages/siera-core/src/utils/index.ts similarity index 100% rename from packages/toolbox-core/src/utils/index.ts rename to packages/siera-core/src/utils/index.ts diff --git a/packages/toolbox-core/src/utils/records/ConnectionsUtil.ts b/packages/siera-core/src/utils/records/ConnectionsUtil.ts similarity index 100% rename from packages/toolbox-core/src/utils/records/ConnectionsUtil.ts rename to packages/siera-core/src/utils/records/ConnectionsUtil.ts diff --git a/packages/toolbox-core/src/utils/records/CredentialsUtil.ts b/packages/siera-core/src/utils/records/CredentialsUtil.ts similarity index 100% rename from packages/toolbox-core/src/utils/records/CredentialsUtil.ts rename to packages/siera-core/src/utils/records/CredentialsUtil.ts diff --git a/packages/toolbox-core/src/utils/records/ProofsUtil.ts b/packages/siera-core/src/utils/records/ProofsUtil.ts similarity index 100% rename from packages/toolbox-core/src/utils/records/ProofsUtil.ts rename to packages/siera-core/src/utils/records/ProofsUtil.ts diff --git a/packages/toolbox-core/src/utils/uuid.ts b/packages/siera-core/src/utils/uuid.ts similarity index 100% rename from packages/toolbox-core/src/utils/uuid.ts rename to packages/siera-core/src/utils/uuid.ts diff --git a/packages/toolbox-core/tests/agent-factory.test.ts b/packages/siera-core/tests/agent-factory.test.ts similarity index 100% rename from packages/toolbox-core/tests/agent-factory.test.ts rename to packages/siera-core/tests/agent-factory.test.ts diff --git a/packages/toolbox-core/tsconfig.build.json b/packages/siera-core/tsconfig.build.json similarity index 100% rename from packages/toolbox-core/tsconfig.build.json rename to packages/siera-core/tsconfig.build.json diff --git a/packages/toolbox-core/tsconfig.json b/packages/siera-core/tsconfig.json similarity index 100% rename from packages/toolbox-core/tsconfig.json rename to packages/siera-core/tsconfig.json diff --git a/packages/toolbox-electron/.eslintrc.json b/packages/siera-desktop/.eslintrc.json similarity index 100% rename from packages/toolbox-electron/.eslintrc.json rename to packages/siera-desktop/.eslintrc.json diff --git a/packages/toolbox-electron/entitlements.mac.plist b/packages/siera-desktop/entitlements.mac.plist similarity index 100% rename from packages/toolbox-electron/entitlements.mac.plist rename to packages/siera-desktop/entitlements.mac.plist diff --git a/packages/toolbox-electron/forge.config.js b/packages/siera-desktop/forge.config.js similarity index 100% rename from packages/toolbox-electron/forge.config.js rename to packages/siera-desktop/forge.config.js diff --git a/packages/toolbox-electron/package.json b/packages/siera-desktop/package.json similarity index 92% rename from packages/toolbox-electron/package.json rename to packages/siera-desktop/package.json index aeafdf7..b6ef4b2 100644 --- a/packages/toolbox-electron/package.json +++ b/packages/siera-desktop/package.json @@ -1,6 +1,6 @@ { - "name": "@animo/toolbox-electron", - "productName": "toolbox-electron", + "name": "@animo/siera-desktop", + "productName": "siera-desktop", "version": "0.0.1", "description": "My Electron application description", "main": ".webpack/main", @@ -23,7 +23,7 @@ "repository": { "type": "git", "url": "https://github.com/animo/siera-desktop", - "directory": "packages/toolbox-electron" + "directory": "packages/siera-desktop" }, "config": { "forge": "./forge.config.js" @@ -58,8 +58,8 @@ "typescript": "~4.5.4" }, "dependencies": { - "@animo/toolbox-core": "*", - "@animo/toolbox-ui": "*", + "@animo/siera-core": "*", + "@animo/siera-ui": "*", "@aries-framework/core": "0.3.0-alpha.32", "@aries-framework/node": "^0.2.3", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.8", diff --git a/packages/toolbox-electron/patches/indy-sdk+1.16.0-dev-1655.patch b/packages/siera-desktop/patches/indy-sdk+1.16.0-dev-1655.patch similarity index 100% rename from packages/toolbox-electron/patches/indy-sdk+1.16.0-dev-1655.patch rename to packages/siera-desktop/patches/indy-sdk+1.16.0-dev-1655.patch diff --git a/packages/toolbox-electron/public/index.css b/packages/siera-desktop/public/index.css similarity index 100% rename from packages/toolbox-electron/public/index.css rename to packages/siera-desktop/public/index.css diff --git a/packages/toolbox-electron/public/index.html b/packages/siera-desktop/public/index.html similarity index 100% rename from packages/toolbox-electron/public/index.html rename to packages/siera-desktop/public/index.html diff --git a/packages/toolbox-electron/src/adapters/ElectronConfigFileRepository.ts b/packages/siera-desktop/src/adapters/ElectronConfigFileRepository.ts similarity index 58% rename from packages/toolbox-electron/src/adapters/ElectronConfigFileRepository.ts rename to packages/siera-desktop/src/adapters/ElectronConfigFileRepository.ts index d1079e2..fab647c 100644 --- a/packages/toolbox-electron/src/adapters/ElectronConfigFileRepository.ts +++ b/packages/siera-desktop/src/adapters/ElectronConfigFileRepository.ts @@ -1,11 +1,11 @@ -import type { ConfigFileRepository, ToolboxConfig } from '@animo/toolbox-core' +import type { ConfigFileRepository, SieraUiConfig } from '@animo/siera-core' -import { DefaultConfiguration, validateAndParseToolboxConfig } from '@animo/toolbox-core' +import { DefaultConfiguration, validateAndParseSieraUiConfig } from '@animo/siera-core' export class ElectronConfigFileRepository implements ConfigFileRepository { public constructor(public readonly configPath: string) {} - public async readConfiguration(): Promise { + public async readConfiguration(): Promise { const exists = await window.fs.exists(this.configPath) if (!exists) return DefaultConfiguration @@ -14,13 +14,13 @@ export class ElectronConfigFileRepository implements ConfigFileRepository { const config = JSON.parse(configString) - return validateAndParseToolboxConfig(config) + return validateAndParseSieraUiConfig(config) } - public async writeConfiguration(config: ToolboxConfig): Promise { + public async writeConfiguration(config: SieraUiConfig): Promise { const filePath = this.configPath - const validatedConfig = validateAndParseToolboxConfig(config) + const validatedConfig = validateAndParseSieraUiConfig(config) const configString = JSON.stringify(validatedConfig) diff --git a/packages/toolbox-electron/src/adapters/ElectronFileSystemAdapter.ts b/packages/siera-desktop/src/adapters/ElectronFileSystemAdapter.ts similarity index 100% rename from packages/toolbox-electron/src/adapters/ElectronFileSystemAdapter.ts rename to packages/siera-desktop/src/adapters/ElectronFileSystemAdapter.ts diff --git a/packages/toolbox-electron/src/index.ts b/packages/siera-desktop/src/index.ts similarity index 100% rename from packages/toolbox-electron/src/index.ts rename to packages/siera-desktop/src/index.ts diff --git a/packages/toolbox-electron/src/init.tsx b/packages/siera-desktop/src/init.tsx similarity index 100% rename from packages/toolbox-electron/src/init.tsx rename to packages/siera-desktop/src/init.tsx diff --git a/packages/toolbox-electron/src/preload.js b/packages/siera-desktop/src/preload.js similarity index 100% rename from packages/toolbox-electron/src/preload.js rename to packages/siera-desktop/src/preload.js diff --git a/packages/toolbox-electron/src/providers/ElectronAgentDependenciesProvider.ts b/packages/siera-desktop/src/providers/ElectronAgentDependenciesProvider.ts similarity index 97% rename from packages/toolbox-electron/src/providers/ElectronAgentDependenciesProvider.ts rename to packages/siera-desktop/src/providers/ElectronAgentDependenciesProvider.ts index 0b2aef1..e221217 100644 --- a/packages/toolbox-electron/src/providers/ElectronAgentDependenciesProvider.ts +++ b/packages/siera-desktop/src/providers/ElectronAgentDependenciesProvider.ts @@ -1,4 +1,4 @@ -import type { AgentDependenciesProvider } from '@animo/toolbox-core' +import type { AgentDependenciesProvider } from '@animo/siera-core' import type { AgentDependencies } from '@aries-framework/core' import type Indy from 'indy-sdk' import type { RequestInit } from 'node-fetch' diff --git a/packages/toolbox-electron/src/renderer.ts b/packages/siera-desktop/src/renderer.ts similarity index 100% rename from packages/toolbox-electron/src/renderer.ts rename to packages/siera-desktop/src/renderer.ts diff --git a/packages/toolbox-electron/src/ui/App.tsx b/packages/siera-desktop/src/ui/App.tsx similarity index 78% rename from packages/toolbox-electron/src/ui/App.tsx rename to packages/siera-desktop/src/ui/App.tsx index 9de83a4..3f2dfe4 100644 --- a/packages/toolbox-electron/src/ui/App.tsx +++ b/packages/siera-desktop/src/ui/App.tsx @@ -1,11 +1,11 @@ import type { ReactNode } from 'react' -import { DefaultConfiguration, InMemoryConfigRepository } from '@animo/toolbox-core' -import { ToolboxApp } from '@animo/toolbox-ui/src/ToolboxApp' -import { AgentContext } from '@animo/toolbox-ui/src/contexts/AgentContext' -import { AgentManagerProvider, useCurrentAgentRecord } from '@animo/toolbox-ui/src/contexts/AgentManagerContext' -import { ConfigProvider } from '@animo/toolbox-ui/src/contexts/ConfigProvider' -import { routes } from '@animo/toolbox-ui/src/routes' +import { DefaultConfiguration, InMemoryConfigRepository } from '@animo/siera-core' +import { SieraUiApp } from '@animo/siera-ui/src/SieraUiApp' +import { AgentContext } from '@animo/siera-ui/src/contexts/AgentContext' +import { AgentManagerProvider, useCurrentAgentRecord } from '@animo/siera-ui/src/contexts/AgentManagerContext' +import { ConfigProvider } from '@animo/siera-ui/src/contexts/ConfigProvider' +import { routes } from '@animo/siera-ui/src/routes' import React from 'react' import { createMemoryRouter } from 'react-router-dom' @@ -40,7 +40,7 @@ export const App = () => { - + diff --git a/packages/toolbox-electron/tests/.gitkeep b/packages/siera-desktop/tests/.gitkeep similarity index 100% rename from packages/toolbox-electron/tests/.gitkeep rename to packages/siera-desktop/tests/.gitkeep diff --git a/packages/toolbox-electron/tsconfig.build.json b/packages/siera-desktop/tsconfig.build.json similarity index 100% rename from packages/toolbox-electron/tsconfig.build.json rename to packages/siera-desktop/tsconfig.build.json diff --git a/packages/toolbox-electron/tsconfig.json b/packages/siera-desktop/tsconfig.json similarity index 100% rename from packages/toolbox-electron/tsconfig.json rename to packages/siera-desktop/tsconfig.json diff --git a/packages/toolbox-electron/webpack.main.config.js b/packages/siera-desktop/webpack.main.config.js similarity index 100% rename from packages/toolbox-electron/webpack.main.config.js rename to packages/siera-desktop/webpack.main.config.js diff --git a/packages/toolbox-electron/webpack.plugins.js b/packages/siera-desktop/webpack.plugins.js similarity index 100% rename from packages/toolbox-electron/webpack.plugins.js rename to packages/siera-desktop/webpack.plugins.js diff --git a/packages/toolbox-electron/webpack.renderer.config.js b/packages/siera-desktop/webpack.renderer.config.js similarity index 100% rename from packages/toolbox-electron/webpack.renderer.config.js rename to packages/siera-desktop/webpack.renderer.config.js diff --git a/packages/toolbox-electron/webpack.rules.js b/packages/siera-desktop/webpack.rules.js similarity index 100% rename from packages/toolbox-electron/webpack.rules.js rename to packages/siera-desktop/webpack.rules.js diff --git a/packages/toolbox-electron/yarn.lock b/packages/siera-desktop/yarn.lock similarity index 100% rename from packages/toolbox-electron/yarn.lock rename to packages/siera-desktop/yarn.lock diff --git a/packages/toolbox-ui/package.json b/packages/siera-ui/package.json similarity index 86% rename from packages/toolbox-ui/package.json rename to packages/siera-ui/package.json index db7819b..306f68b 100644 --- a/packages/toolbox-ui/package.json +++ b/packages/siera-ui/package.json @@ -1,5 +1,5 @@ { - "name": "@animo/toolbox-ui", + "name": "@animo/siera-ui", "version": "0.0.1", "main": "src/index.ts", "license": "Apache-2.0", @@ -11,8 +11,8 @@ }, "repository": { "type": "git", - "url": "https://github.com/animo/toolbox", - "directory": "packages/toolbox-ui" + "url": "https://github.com/animo/siera-desktop", + "directory": "packages/siera-ui" }, "scripts": { "build": "yarn run clean && yarn run compile", @@ -22,7 +22,7 @@ "test": "jest" }, "dependencies": { - "@animo/toolbox-core": "*", + "@animo/siera-core": "*", "@aries-framework/core": "0.3.0-alpha.32", "@aries-framework/react-hooks": "^0.3.1", "@emotion/react": "^11.10.5", diff --git a/packages/toolbox-ui/src/ToolboxApp.tsx b/packages/siera-ui/src/SieraUiApp.tsx similarity index 89% rename from packages/toolbox-ui/src/ToolboxApp.tsx rename to packages/siera-ui/src/SieraUiApp.tsx index 67921d2..0b3ecee 100644 --- a/packages/toolbox-ui/src/ToolboxApp.tsx +++ b/packages/siera-ui/src/SieraUiApp.tsx @@ -7,16 +7,16 @@ import { NotificationsProvider } from '@mantine/notifications' import React from 'react' import { RouterProvider } from 'react-router-dom' -import { toolboxTheme } from './ToolboxTheme' +import { sieraUiTheme } from './SieraUiTheme' import { GlobalErrorHandler } from './components/GlobalErrorHandler' import { useConfigUnsafe } from './contexts/ConfigProvider' import { PresentInviteModal } from './modals/PresentInviteModal' -interface ToolboxAppProps { +interface SieraUiAppProps { router: RouterProviderProps['router'] } -export const ToolboxApp = ({ router }: ToolboxAppProps) => { +export const SieraUiApp = ({ router }: SieraUiAppProps) => { const { config, setColorScheme } = useConfigUnsafe() const colorScheme = config?.colorScheme ?? 'light' @@ -24,7 +24,7 @@ export const ToolboxApp = ({ router }: ToolboxAppProps) => { return ( - + diff --git a/packages/toolbox-ui/src/ToolboxTheme.ts b/packages/siera-ui/src/SieraUiTheme.ts similarity index 93% rename from packages/toolbox-ui/src/ToolboxTheme.ts rename to packages/siera-ui/src/SieraUiTheme.ts index 9c5472e..a10d863 100644 --- a/packages/toolbox-ui/src/ToolboxTheme.ts +++ b/packages/siera-ui/src/SieraUiTheme.ts @@ -3,7 +3,7 @@ import type { ColorScheme, MantineThemeOverride, Tuple } from '@mantine/core' import { animoLightTheme, animoDarkTheme } from './layout/themes' -export const toolboxTheme = (colorScheme: ColorScheme): MantineThemeOverride => ({ +export const sieraUiTheme = (colorScheme: ColorScheme): MantineThemeOverride => ({ colorScheme: colorScheme, colors: colorScheme === 'dark' ? animoDarkTheme : animoLightTheme, diff --git a/packages/toolbox-ui/src/components/BackButton.tsx b/packages/siera-ui/src/components/BackButton.tsx similarity index 100% rename from packages/toolbox-ui/src/components/BackButton.tsx rename to packages/siera-ui/src/components/BackButton.tsx diff --git a/packages/toolbox-ui/src/components/GlobalErrorHandler.tsx b/packages/siera-ui/src/components/GlobalErrorHandler.tsx similarity index 100% rename from packages/toolbox-ui/src/components/GlobalErrorHandler.tsx rename to packages/siera-ui/src/components/GlobalErrorHandler.tsx diff --git a/packages/toolbox-ui/src/components/Loading.tsx b/packages/siera-ui/src/components/Loading.tsx similarity index 100% rename from packages/toolbox-ui/src/components/Loading.tsx rename to packages/siera-ui/src/components/Loading.tsx diff --git a/packages/toolbox-ui/src/components/RecordActions.tsx b/packages/siera-ui/src/components/RecordActions.tsx similarity index 100% rename from packages/toolbox-ui/src/components/RecordActions.tsx rename to packages/siera-ui/src/components/RecordActions.tsx diff --git a/packages/toolbox-ui/src/components/SmartAvatar.tsx b/packages/siera-ui/src/components/SmartAvatar.tsx similarity index 100% rename from packages/toolbox-ui/src/components/SmartAvatar.tsx rename to packages/siera-ui/src/components/SmartAvatar.tsx diff --git a/packages/toolbox-ui/src/components/connections/ConnectionsTable.tsx b/packages/siera-ui/src/components/connections/ConnectionsTable.tsx similarity index 97% rename from packages/toolbox-ui/src/components/connections/ConnectionsTable.tsx rename to packages/siera-ui/src/components/connections/ConnectionsTable.tsx index 5a5d725..c44b21c 100644 --- a/packages/toolbox-ui/src/components/connections/ConnectionsTable.tsx +++ b/packages/siera-ui/src/components/connections/ConnectionsTable.tsx @@ -1,6 +1,6 @@ import type { ConnectionRecord } from '@aries-framework/core' -import { ConnectionsUtil } from '@animo/toolbox-core/src/utils/records/ConnectionsUtil' +import { ConnectionsUtil } from '@animo/siera-core/src/utils/records/ConnectionsUtil' import { createStyles, Group, ScrollArea, Table, Text } from '@mantine/core' import React from 'react' diff --git a/packages/toolbox-ui/src/components/credentials/CredentialsTable.tsx b/packages/siera-ui/src/components/credentials/CredentialsTable.tsx similarity index 95% rename from packages/toolbox-ui/src/components/credentials/CredentialsTable.tsx rename to packages/siera-ui/src/components/credentials/CredentialsTable.tsx index 6c6aa80..be32ef5 100644 --- a/packages/toolbox-ui/src/components/credentials/CredentialsTable.tsx +++ b/packages/siera-ui/src/components/credentials/CredentialsTable.tsx @@ -1,7 +1,7 @@ import type { ConnectionRecord, CredentialExchangeRecord } from '@aries-framework/core' -import { formatSchemaName } from '@animo/toolbox-core/src/utils' -import { CredentialsUtil } from '@animo/toolbox-core/src/utils/records/CredentialsUtil' +import { formatSchemaName } from '@animo/siera-core/src/utils' +import { CredentialsUtil } from '@animo/siera-core/src/utils/records/CredentialsUtil' import { createStyles, Group, ScrollArea, Table, Text } from '@mantine/core' import React from 'react' diff --git a/packages/toolbox-ui/src/components/generic/buttons/Buttons.tsx b/packages/siera-ui/src/components/generic/buttons/Buttons.tsx similarity index 100% rename from packages/toolbox-ui/src/components/generic/buttons/Buttons.tsx rename to packages/siera-ui/src/components/generic/buttons/Buttons.tsx diff --git a/packages/toolbox-ui/src/components/generic/buttons/index.ts b/packages/siera-ui/src/components/generic/buttons/index.ts similarity index 100% rename from packages/toolbox-ui/src/components/generic/buttons/index.ts rename to packages/siera-ui/src/components/generic/buttons/index.ts diff --git a/packages/toolbox-ui/src/components/generic/index.ts b/packages/siera-ui/src/components/generic/index.ts similarity index 100% rename from packages/toolbox-ui/src/components/generic/index.ts rename to packages/siera-ui/src/components/generic/index.ts diff --git a/packages/toolbox-ui/src/components/generic/table/EmptyState.tsx b/packages/siera-ui/src/components/generic/table/EmptyState.tsx similarity index 100% rename from packages/toolbox-ui/src/components/generic/table/EmptyState.tsx rename to packages/siera-ui/src/components/generic/table/EmptyState.tsx diff --git a/packages/toolbox-ui/src/components/generic/table/StatusBadge.tsx b/packages/siera-ui/src/components/generic/table/StatusBadge.tsx similarity index 100% rename from packages/toolbox-ui/src/components/generic/table/StatusBadge.tsx rename to packages/siera-ui/src/components/generic/table/StatusBadge.tsx diff --git a/packages/toolbox-ui/src/components/proofs/ProofsTable.tsx b/packages/siera-ui/src/components/proofs/ProofsTable.tsx similarity index 97% rename from packages/toolbox-ui/src/components/proofs/ProofsTable.tsx rename to packages/siera-ui/src/components/proofs/ProofsTable.tsx index d7b7f99..0e68e9c 100644 --- a/packages/toolbox-ui/src/components/proofs/ProofsTable.tsx +++ b/packages/siera-ui/src/components/proofs/ProofsTable.tsx @@ -1,6 +1,6 @@ import type { ConnectionRecord, ProofExchangeRecord } from '@aries-framework/core' -import { ProofsUtil } from '@animo/toolbox-core/src/utils/records/ProofsUtil' +import { ProofsUtil } from '@animo/siera-core/src/utils/records/ProofsUtil' import { createStyles, Group, ScrollArea, Table, Text } from '@mantine/core' import React from 'react' diff --git a/packages/toolbox-ui/src/contexts/AgentContext.tsx b/packages/siera-ui/src/contexts/AgentContext.tsx similarity index 93% rename from packages/toolbox-ui/src/contexts/AgentContext.tsx rename to packages/siera-ui/src/contexts/AgentContext.tsx index 28f689b..d9995c8 100644 --- a/packages/toolbox-ui/src/contexts/AgentContext.tsx +++ b/packages/siera-ui/src/contexts/AgentContext.tsx @@ -1,8 +1,8 @@ -import type { AgentConfigRecord, AgentDependenciesProvider } from '@animo/toolbox-core' +import type { AgentConfigRecord, AgentDependenciesProvider } from '@animo/siera-core' import type { Agent } from '@aries-framework/core' import type { PropsWithChildren } from 'react' -import { agentInitializer } from '@animo/toolbox-core/src/agent/AgentInitializer' +import { agentInitializer } from '@animo/siera-core/src/agent/AgentInitializer' import AgentProvider from '@aries-framework/react-hooks' import React, { useEffect, useState } from 'react' diff --git a/packages/toolbox-ui/src/contexts/AgentManagerContext.tsx b/packages/siera-ui/src/contexts/AgentManagerContext.tsx similarity index 95% rename from packages/toolbox-ui/src/contexts/AgentManagerContext.tsx rename to packages/siera-ui/src/contexts/AgentManagerContext.tsx index 11a5eee..a4b1e20 100644 --- a/packages/toolbox-ui/src/contexts/AgentManagerContext.tsx +++ b/packages/siera-ui/src/contexts/AgentManagerContext.tsx @@ -1,4 +1,4 @@ -import type { AgentConfigRecord } from '@animo/toolbox-core' +import type { AgentConfigRecord } from '@animo/siera-core' import type { ReactNode } from 'react' import React, { createContext, useContext, useMemo, useState } from 'react' diff --git a/packages/toolbox-ui/src/contexts/ConfigProvider.tsx b/packages/siera-ui/src/contexts/ConfigProvider.tsx similarity index 88% rename from packages/toolbox-ui/src/contexts/ConfigProvider.tsx rename to packages/siera-ui/src/contexts/ConfigProvider.tsx index bb47ce6..6d8745b 100644 --- a/packages/toolbox-ui/src/contexts/ConfigProvider.tsx +++ b/packages/siera-ui/src/contexts/ConfigProvider.tsx @@ -1,10 +1,10 @@ -import type { AgentConfigRecord, ConfigFileRepository, ToolboxConfig } from '@animo/toolbox-core' +import type { AgentConfigRecord, ConfigFileRepository, SieraUiConfig } from '@animo/siera-core' import type { ReactNode } from 'react' import React, { createContext, useContext, useEffect, useState } from 'react' type ConfigContext = { - config?: ToolboxConfig + config?: SieraUiConfig loading: boolean addAgent: (agent: AgentConfigRecord) => Promise setColorScheme: (colorScheme: 'dark' | 'light') => Promise @@ -33,9 +33,9 @@ interface ConfigProviderProps { export const ConfigProvider = ({ children, configRepository }: ConfigProviderProps) => { const [loading, setLoading] = useState(true) - const [config, setConfig] = useState() + const [config, setConfig] = useState() - const saveConfig = async (config: ToolboxConfig) => { + const saveConfig = async (config: SieraUiConfig) => { await configRepository.writeConfiguration(config) } diff --git a/packages/toolbox-ui/src/contexts/CredentialFormatDataProvider.tsx b/packages/siera-ui/src/contexts/CredentialFormatDataProvider.tsx similarity index 100% rename from packages/toolbox-ui/src/contexts/CredentialFormatDataProvider.tsx rename to packages/siera-ui/src/contexts/CredentialFormatDataProvider.tsx diff --git a/packages/toolbox-ui/src/contexts/ProofsFormatDataProvider.tsx b/packages/siera-ui/src/contexts/ProofsFormatDataProvider.tsx similarity index 100% rename from packages/toolbox-ui/src/contexts/ProofsFormatDataProvider.tsx rename to packages/siera-ui/src/contexts/ProofsFormatDataProvider.tsx diff --git a/packages/toolbox-ui/src/hooks/useNavigation.ts b/packages/siera-ui/src/hooks/useNavigation.ts similarity index 100% rename from packages/toolbox-ui/src/hooks/useNavigation.ts rename to packages/siera-ui/src/hooks/useNavigation.ts diff --git a/packages/toolbox-ui/src/layout/Layout.tsx b/packages/siera-ui/src/layout/Layout.tsx similarity index 100% rename from packages/toolbox-ui/src/layout/Layout.tsx rename to packages/siera-ui/src/layout/Layout.tsx diff --git a/packages/toolbox-ui/src/layout/LayoutAvatar.tsx b/packages/siera-ui/src/layout/LayoutAvatar.tsx similarity index 100% rename from packages/toolbox-ui/src/layout/LayoutAvatar.tsx rename to packages/siera-ui/src/layout/LayoutAvatar.tsx diff --git a/packages/toolbox-ui/src/layout/LayoutNavBar.tsx b/packages/siera-ui/src/layout/LayoutNavBar.tsx similarity index 100% rename from packages/toolbox-ui/src/layout/LayoutNavBar.tsx rename to packages/siera-ui/src/layout/LayoutNavBar.tsx diff --git a/packages/toolbox-ui/src/layout/actions/ColorSchemeSwitch.tsx b/packages/siera-ui/src/layout/actions/ColorSchemeSwitch.tsx similarity index 100% rename from packages/toolbox-ui/src/layout/actions/ColorSchemeSwitch.tsx rename to packages/siera-ui/src/layout/actions/ColorSchemeSwitch.tsx diff --git a/packages/toolbox-ui/src/layout/actions/LogoutAction.tsx b/packages/siera-ui/src/layout/actions/LogoutAction.tsx similarity index 100% rename from packages/toolbox-ui/src/layout/actions/LogoutAction.tsx rename to packages/siera-ui/src/layout/actions/LogoutAction.tsx diff --git a/packages/toolbox-ui/src/layout/themes/AnimoColorShades.ts b/packages/siera-ui/src/layout/themes/AnimoColorShades.ts similarity index 100% rename from packages/toolbox-ui/src/layout/themes/AnimoColorShades.ts rename to packages/siera-ui/src/layout/themes/AnimoColorShades.ts diff --git a/packages/toolbox-ui/src/layout/themes/AnimoDarkTheme.ts b/packages/siera-ui/src/layout/themes/AnimoDarkTheme.ts similarity index 100% rename from packages/toolbox-ui/src/layout/themes/AnimoDarkTheme.ts rename to packages/siera-ui/src/layout/themes/AnimoDarkTheme.ts diff --git a/packages/toolbox-ui/src/layout/themes/AnimoLightTheme.ts b/packages/siera-ui/src/layout/themes/AnimoLightTheme.ts similarity index 100% rename from packages/toolbox-ui/src/layout/themes/AnimoLightTheme.ts rename to packages/siera-ui/src/layout/themes/AnimoLightTheme.ts diff --git a/packages/toolbox-ui/src/layout/themes/AnimoVariantTheme.ts b/packages/siera-ui/src/layout/themes/AnimoVariantTheme.ts similarity index 100% rename from packages/toolbox-ui/src/layout/themes/AnimoVariantTheme.ts rename to packages/siera-ui/src/layout/themes/AnimoVariantTheme.ts diff --git a/packages/toolbox-ui/src/layout/themes/index.ts b/packages/siera-ui/src/layout/themes/index.ts similarity index 100% rename from packages/toolbox-ui/src/layout/themes/index.ts rename to packages/siera-ui/src/layout/themes/index.ts diff --git a/packages/toolbox-ui/src/modals/PresentInviteModal.tsx b/packages/siera-ui/src/modals/PresentInviteModal.tsx similarity index 100% rename from packages/toolbox-ui/src/modals/PresentInviteModal.tsx rename to packages/siera-ui/src/modals/PresentInviteModal.tsx diff --git a/packages/toolbox-ui/src/pages/AgentSelectionScreen.tsx b/packages/siera-ui/src/pages/AgentSelectionScreen.tsx similarity index 100% rename from packages/toolbox-ui/src/pages/AgentSelectionScreen.tsx rename to packages/siera-ui/src/pages/AgentSelectionScreen.tsx diff --git a/packages/toolbox-ui/src/pages/SetupScreen.tsx b/packages/siera-ui/src/pages/SetupScreen.tsx similarity index 98% rename from packages/toolbox-ui/src/pages/SetupScreen.tsx rename to packages/siera-ui/src/pages/SetupScreen.tsx index 65a37bc..0480606 100644 --- a/packages/toolbox-ui/src/pages/SetupScreen.tsx +++ b/packages/siera-ui/src/pages/SetupScreen.tsx @@ -1,4 +1,4 @@ -import { uuid } from '@animo/toolbox-core/src/utils' +import { uuid } from '@animo/siera-core/src/utils' import { createStyles, TextInput, Paper, Title } from '@mantine/core' import { useForm } from '@mantine/form' import React from 'react' diff --git a/packages/toolbox-ui/src/pages/agent/AgentHomeScreen.tsx b/packages/siera-ui/src/pages/agent/AgentHomeScreen.tsx similarity index 100% rename from packages/toolbox-ui/src/pages/agent/AgentHomeScreen.tsx rename to packages/siera-ui/src/pages/agent/AgentHomeScreen.tsx diff --git a/packages/toolbox-ui/src/pages/agent/connections/ConnectionsScreen.tsx b/packages/siera-ui/src/pages/agent/connections/ConnectionsScreen.tsx similarity index 100% rename from packages/toolbox-ui/src/pages/agent/connections/ConnectionsScreen.tsx rename to packages/siera-ui/src/pages/agent/connections/ConnectionsScreen.tsx diff --git a/packages/toolbox-ui/src/pages/agent/credentials/CredentialsScreen.tsx b/packages/siera-ui/src/pages/agent/credentials/CredentialsScreen.tsx similarity index 100% rename from packages/toolbox-ui/src/pages/agent/credentials/CredentialsScreen.tsx rename to packages/siera-ui/src/pages/agent/credentials/CredentialsScreen.tsx diff --git a/packages/toolbox-ui/src/pages/agent/proofs/ProofsScreen.tsx b/packages/siera-ui/src/pages/agent/proofs/ProofsScreen.tsx similarity index 100% rename from packages/toolbox-ui/src/pages/agent/proofs/ProofsScreen.tsx rename to packages/siera-ui/src/pages/agent/proofs/ProofsScreen.tsx diff --git a/packages/toolbox-ui/src/routes.tsx b/packages/siera-ui/src/routes.tsx similarity index 100% rename from packages/toolbox-ui/src/routes.tsx rename to packages/siera-ui/src/routes.tsx diff --git a/packages/toolbox-ui/tsconfig.build.json b/packages/siera-ui/tsconfig.build.json similarity index 100% rename from packages/toolbox-ui/tsconfig.build.json rename to packages/siera-ui/tsconfig.build.json diff --git a/packages/toolbox-ui/tsconfig.json b/packages/siera-ui/tsconfig.json similarity index 100% rename from packages/toolbox-ui/tsconfig.json rename to packages/siera-ui/tsconfig.json diff --git a/packages/toolbox-core/src/agent/config/ConfigFileRepository.ts b/packages/toolbox-core/src/agent/config/ConfigFileRepository.ts deleted file mode 100644 index 5a444d1..0000000 --- a/packages/toolbox-core/src/agent/config/ConfigFileRepository.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { ToolboxConfig } from './ToolboxConfig' - -export interface ConfigFileRepository { - readConfiguration(): Promise - writeConfiguration(config: ToolboxConfig): Promise -} diff --git a/packages/toolbox-core/src/agent/config/DefaultConfiguration.ts b/packages/toolbox-core/src/agent/config/DefaultConfiguration.ts deleted file mode 100644 index c3ba32b..0000000 --- a/packages/toolbox-core/src/agent/config/DefaultConfiguration.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { ToolboxConfig } from './ToolboxConfig' - -export const DefaultConfiguration: ToolboxConfig = { - colorScheme: 'light', - agents: [], -} diff --git a/packages/toolbox-core/src/agent/config/ToolboxConfig.ts b/packages/toolbox-core/src/agent/config/ToolboxConfig.ts deleted file mode 100644 index 1e9730b..0000000 --- a/packages/toolbox-core/src/agent/config/ToolboxConfig.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { AgentConfigRecord } from './AgentConfigRecord' - -import { ToolboxConfigSchema } from './adapters/ToolBoxConfigValidation' -export interface ToolboxConfig { - colorScheme: 'dark' | 'light' - agents: AgentConfigRecord[] -} - -export const validateAndParseToolboxConfig = (config: unknown): ToolboxConfig => { - return ToolboxConfigSchema.parse(config) as ToolboxConfig -} diff --git a/packages/toolbox-core/src/agent/config/adapters/InMemoryConfigRepository.ts b/packages/toolbox-core/src/agent/config/adapters/InMemoryConfigRepository.ts deleted file mode 100644 index 6b383eb..0000000 --- a/packages/toolbox-core/src/agent/config/adapters/InMemoryConfigRepository.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { ConfigFileRepository } from '../ConfigFileRepository' -import type { ToolboxConfig } from '../ToolboxConfig' - -export class InMemoryConfigRepository implements ConfigFileRepository { - public constructor(private config: ToolboxConfig) {} - - public async readConfiguration(): Promise { - return this.config - } - - public async writeConfiguration(config: ToolboxConfig): Promise { - this.config = config - } -}