Fix imports

This commit is contained in:
James Brunton 2025-10-28 11:08:23 +00:00
parent 9f90a58e94
commit 5037ef088e
3 changed files with 11 additions and 11 deletions

View File

@ -236,6 +236,6 @@ export const SignatureAPIBridge = forwardRef<SignatureAPI>(function SignatureAPI
return null; // This is a bridge component with no UI
});
export type { SignatureAPI } from './viewerTypes';
export type { SignatureAPI } from '@app/components/viewer/viewerTypes';
SignatureAPIBridge.displayName = 'SignatureAPIBridge';

View File

@ -1,7 +1,7 @@
import { useMemo } from 'react';
import { useToolRegistry } from '../../../contexts/ToolRegistryContext';
import { AutomateToolRegistry, AutomateToolId, AUTOMATABLE_TOOL_IDS } from '../../../types/automation';
import { useToolRegistry } from '@app/contexts/ToolRegistryContext';
import { AutomateToolRegistry, AutomateToolId, AUTOMATABLE_TOOL_IDS } from '@app/types/automation';
export const useAutomateToolRegistry = (): AutomateToolRegistry => {
const { regularTools } = useToolRegistry();

View File

@ -2,7 +2,7 @@
* Service for managing automation configurations in IndexedDB
*/
import type { AutomationConfig as DomainAutomationConfig } from '../types/automation';
import type { AutomationConfig as DomainAutomationConfig } from '@app/types/automation';
export type AutomationConfig = DomainAutomationConfig;
@ -29,7 +29,7 @@ class AutomationStorage {
request.onupgradeneeded = (event) => {
const db = (event.target as IDBOpenDBRequest).result;
if (!db.objectStoreNames.contains(this.storeName)) {
const store = db.createObjectStore(this.storeName, { keyPath: 'id' });
store.createIndex('name', 'name', { unique: false });
@ -43,18 +43,18 @@ class AutomationStorage {
if (!this.db) {
await this.init();
}
if (!this.db) {
throw new Error('Database not initialized');
}
return this.db;
}
async saveAutomation(automation: AutomationPayload): Promise<AutomationConfig> {
const db = await this.ensureDB();
const timestamp = new Date().toISOString();
const automationWithMeta: AutomationConfig = {
id: `automation-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
...automation,
@ -79,7 +79,7 @@ class AutomationStorage {
async updateAutomation(automation: AutomationConfig): Promise<AutomationConfig> {
const db = await this.ensureDB();
const updatedAutomation: AutomationConfig = {
...automation,
updatedAt: new Date().toISOString()
@ -159,13 +159,13 @@ class AutomationStorage {
async searchAutomations(query: string): Promise<AutomationConfig[]> {
const automations = await this.getAllAutomations();
if (!query.trim()) {
return automations;
}
const lowerQuery = query.toLowerCase();
return automations.filter(automation =>
return automations.filter(automation =>
automation.name.toLowerCase().includes(lowerQuery) ||
(automation.description && automation.description.toLowerCase().includes(lowerQuery)) ||
automation.operations.some(op => op.operation.toLowerCase().includes(lowerQuery))