Skip to content

A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.

feat: leaflet map

dextmorgn7ec56ee6dc14
diff --git a/flowsint-api/alembic/versions/0160b0f70a02_add_context_to_chat_message.py b/flowsint-api/alembic/versions/0160b0f70a02_add_context_to_chat_message.py
new file mode 100644
index 00000000..f5dd826f
--- /dev/null
+++ b/flowsint-api/alembic/versions/0160b0f70a02_add_context_to_chat_message.py
@@ -0,0 +1,32 @@
+"""add context to chat message
+
+Revision ID: 0160b0f70a02
+Revises: 8ac522441108
+Create Date: 2025-07-11 17:34:54.233560
+
+"""
+from typing import Sequence, Union
+
+from alembic import op
+import sqlalchemy as sa
+
+
+# revision identifiers, used by Alembic.
+revision: str = '0160b0f70a02'
+down_revision: Union[str, None] = '8ac522441108'
+branch_labels: Union[str, Sequence[str], None] = None
+depends_on: Union[str, Sequence[str], None] = None
+
+
+def upgrade() -> None:
+ """Upgrade schema."""
+ # ### commands auto generated by Alembic - please adjust! ###
+ op.add_column('messages', sa.Column('context', sa.JSON(), nullable=True))
+ # ### end Alembic commands ###
+
+
+def downgrade() -> None:
+ """Downgrade schema."""
+ # ### commands auto generated by Alembic - please adjust! ###
+ op.drop_column('messages', 'context')
+ # ### end Alembic commands ###
diff --git a/flowsint-api/alembic/versions/0ab8ee0a782c_add_cascade_delete_to_messages.py b/flowsint-api/alembic/versions/0ab8ee0a782c_add_cascade_delete_to_messages.py
new file mode 100644
index 00000000..74f5308a
--- /dev/null
+++ b/flowsint-api/alembic/versions/0ab8ee0a782c_add_cascade_delete_to_messages.py
@@ -0,0 +1,32 @@
+"""add cascade delete to messages
+
+Revision ID: 0ab8ee0a782c
+Revises: 0160b0f70a02
+Create Date: 2025-07-12 11:25:03.863631
+
+"""
+from typing import Sequence, Union
+
+from alembic import op
+import sqlalchemy as sa
+
+
+# revision identifiers, used by Alembic.
+revision: str = '0ab8ee0a782c'
+down_revision: Union[str, None] = '0160b0f70a02'
+branch_labels: Union[str, Sequence[str], None] = None
+depends_on: Union[str, Sequence[str], None] = None
+
+
+def upgrade() -> None:
+ """Upgrade schema."""
+ # ### commands auto generated by Alembic - please adjust! ###
+ pass
+ # ### end Alembic commands ###
+
+
+def downgrade() -> None:
+ """Downgrade schema."""
+ # ### commands auto generated by Alembic - please adjust! ###
+ pass
+ # ### end Alembic commands ###
diff --git a/flowsint-api/alembic/versions/8ac522441108_add_chat_and_chat_message.py b/flowsint-api/alembic/versions/8ac522441108_add_chat_and_chat_message.py
new file mode 100644
index 00000000..77ecd861
--- /dev/null
+++ b/flowsint-api/alembic/versions/8ac522441108_add_chat_and_chat_message.py
@@ -0,0 +1,59 @@
+"""add chat and chat message
+
+Revision ID: 8ac522441108
+Revises: e403a4152f6b
+Create Date: 2025-07-11 16:27:23.975758
+
+"""
+from typing import Sequence, Union
+
+from alembic import op
+import sqlalchemy as sa
+
+
+# revision identifiers, used by Alembic.
+revision: str = '8ac522441108'
+down_revision: Union[str, None] = 'e403a4152f6b'
+branch_labels: Union[str, Sequence[str], None] = None
+depends_on: Union[str, Sequence[str], None] = None
+
+
+def upgrade() -> None:
+ """Upgrade schema."""
+ # ### commands auto generated by Alembic - please adjust! ###
+ op.create_table('chats',
+ sa.Column('id', sa.UUID(), nullable=False),
+ sa.Column('title', sa.Text(), nullable=False),
+ sa.Column('description', sa.Text(), nullable=True),
+ sa.Column('created_at', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=True),
+ sa.Column('last_updated_at', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=True),
+ sa.Column('owner_id', sa.UUID(), nullable=True),
+ sa.Column('investigation_id', sa.UUID(), nullable=True),
+ sa.ForeignKeyConstraint(['investigation_id'], ['investigations.id'], onupdate='CASCADE', ondelete='CASCADE'),
+ sa.ForeignKeyConstraint(['owner_id'], ['profiles.id'], onupdate='CASCADE', ondelete='CASCADE'),
+ sa.PrimaryKeyConstraint('id')
+ )
+ op.create_index('idx_chats_investigation_id', 'chats', ['investigation_id'], unique=False)
+ op.create_index('idx_chats_owner_id', 'chats', ['owner_id'], unique=False)
+ op.create_table('messages',
+ sa.Column('id', sa.UUID(), nullable=False),
+ sa.Column('content', sa.JSON(), nullable=True),
+ sa.Column('is_bot', sa.Boolean(), nullable=False),
+ sa.Column('created_at', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=True),
+ sa.Column('chat_id', sa.UUID(), nullable=False),
+ sa.ForeignKeyConstraint(['chat_id'], ['chats.id'], onupdate='CASCADE', ondelete='CASCADE'),
+ sa.PrimaryKeyConstraint('id')
+ )
+ op.create_index('idx_messages_chat_id', 'messages', ['chat_id'], unique=False)
+ # ### end Alembic commands ###
+
+
+def downgrade() -> None:
+ """Downgrade schema."""
+ # ### commands auto generated by Alembic - please adjust! ###
+ op.drop_index('idx_messages_chat_id', table_name='messages')
+ op.drop_table('messages')
+ op.drop_index('idx_chats_owner_id', table_name='chats')
+ op.drop_index('idx_chats_investigation_id', table_name='chats')
+ op.drop_table('chats')
+ # ### end Alembic commands ###
diff --git a/flowsint-api/alembic/versions/a566d0f57af1_add_third_party_keys_table.py b/flowsint-api/alembic/versions/a566d0f57af1_add_third_party_keys_table.py
deleted file mode 100644
index 503a7108..00000000
--- a/flowsint-api/alembic/versions/a566d0f57af1_add_third_party_keys_table.py
+++ /dev/null
@@ -1,47 +0,0 @@
-"""add_third_party_keys_table
-
-Revision ID: a566d0f57af1
-Revises: e403a4152f6b
-Create Date: 2025-06-22 22:43:53.031994
-
-"""
-from typing import Sequence, Union
-
-from alembic import op
-import sqlalchemy as sa
-from sqlalchemy.dialects import postgresql
-
-
-# revision identifiers, used by Alembic.
-revision: str = 'a566d0f57af1'
-down_revision: Union[str, None] = 'e403a4152f6b'
-branch_labels: Union[str, Sequence[str], None] = None
-depends_on: Union[str, Sequence[str], None] = None
-
-
-def upgrade() -> None:
- """Upgrade schema."""
- # Create third_party_keys table
- op.create_table('third_party_keys',
- sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False),
- sa.Column('service', sa.String(), nullable=False),
- sa.Column('owner_id', postgresql.UUID(as_uuid=True), nullable=True),
- sa.Column('encrypted_key', sa.String(), nullable=False),
- sa.Column('created_at', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=True),
- sa.ForeignKeyConstraint(['owner_id'], ['profiles.id'], onupdate='CASCADE', ondelete='CASCADE'),
- sa.PrimaryKeyConstraint('id')
- )
-
- # Create indexes
- op.create_index('idx_keys_owner_id', 'third_party_keys', ['owner_id'], unique=False)
- op.create_index('idx_keys_service', 'third_party_keys', ['service'], unique=False)
-
-
-def downgrade() -> None:
- """Downgrade schema."""
- # Drop indexes
- op.drop_index('idx_keys_service', table_name='third_party_keys')
- op.drop_index('idx_keys_owner_id', table_name='third_party_keys')
-
- # Drop table
- op.drop_table('third_party_keys')
diff --git a/flowsint-api/alembic/versions/e403a4152f6b_add_third_party_keys_table.py b/flowsint-api/alembic/versions/e403a4152f6b_add_third_party_keys_table.py
index 6ddeee3c..2aaa7f98 100644
--- a/flowsint-api/alembic/versions/e403a4152f6b_add_third_party_keys_table.py
+++ b/flowsint-api/alembic/versions/e403a4152f6b_add_third_party_keys_table.py
@@ -28,7 +28,8 @@ def upgrade() -> None:
sa.Column('encrypted_key', sa.String(), nullable=False),
sa.Column('created_at', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=True),
sa.ForeignKeyConstraint(['owner_id'], ['profiles.id'], onupdate='CASCADE', ondelete='CASCADE'),
- sa.PrimaryKeyConstraint('id')
+ sa.PrimaryKeyConstraint('id'),
+ if_not_exists=True
)
op.create_index('idx_keys_owner_id', 'third_party_keys', ['owner_id'], unique=False)
op.create_index('idx_keys_service', 'third_party_keys', ['service'], unique=False)
diff --git a/flowsint-api/app/api/routes/chat.py b/flowsint-api/app/api/routes/chat.py
index 9977d253..fc11d87e 100644
--- a/flowsint-api/app/api/routes/chat.py
+++ b/flowsint-api/app/api/routes/chat.py
@@ -3,16 +3,116 @@ from fastapi.responses import StreamingResponse
from pydantic import BaseModel
import os
from mistralai import Mistral
-from mistralai.models import UserMessage
+from mistralai.models import UserMessage, AssistantMessage, SystemMessage
import json
-
+from uuid import UUID, uuid4
+from fastapi import APIRouter, HTTPException, Depends, status
+from typing import Dict, List, Optional
+from datetime import datetime
+from sqlalchemy.orm import Session
+from app.core.postgre_db import get_db
+from app.models.models import Chat, ChatMessage, Profile
+from app.api.deps import get_current_user
+from app.api.schemas.chat import ChatCreate, ChatRead
router = APIRouter()
+
+def clean_context(context: List[Dict]) -> List[Dict]:
+ print(context)
+ """Remove unnecessary keys from context data."""
+ cleaned = []
+ for item in context:
+ if isinstance(item, dict):
+ # Create a copy and remove unwanted keys
+ cleaned_item = item["data"].copy()
+
+ # Remove top-level keys
+ cleaned_item.pop('id', None)
+ cleaned_item.pop('sketch_id', None)
+
+ # Remove from data if it exists
+ if 'data' in cleaned_item and isinstance(cleaned_item['data'], dict):
+ cleaned_item['data'].pop('sketch_id', None)
+
+ # Remove measured/dimensions
+ cleaned_item.pop('measured', None)
+
+ cleaned.append(cleaned_item)
+ print(cleaned)
+ return cleaned
+
class ChatRequest(BaseModel):
prompt: str
+ context: Optional[List[Dict]] = None
+
+
+# Get all chats
[email protected]("/", response_model=List[ChatRead])
+def get_chats(
+ db: Session = Depends(get_db),
+ current_user: Profile = Depends(get_current_user)
+):
+ chats = db.query(Chat).filter(
+ Chat.owner_id == current_user.id
+ ).all()
+
+ # Sort messages for each chat by created_at in ascending order
+ for chat in chats:
+ chat.messages.sort(key=lambda x: x.created_at)
+
+ return chats
+
+
+# @router.get("/delete-all", status_code=status.HTTP_204_NO_CONTENT)
+# def delete_all_chat(db: Session = Depends(get_db)):
+# chats = db.query(Chat).all()
+# for chat in chats:
+# db.delete(chat)
+# db.commit()
+# return {"result": "done"}
-async def stream_chat(request: ChatRequest):
+
+# Get analyses by investigation ID
[email protected]("/investigation/{investigation_id}", response_model=List[ChatRead])
+def get_chats_by_investigation(
+ investigation_id: UUID,
+ db: Session = Depends(get_db),
+ current_user: Profile = Depends(get_current_user)
+):
+ chats = db.query(Chat).filter(
+ Chat.investigation_id == investigation_id,
+ Chat.owner_id == current_user.id
+ ).all()
+
+ # Sort messages for each chat by created_at in ascending order
+ for chat in chats:
+ chat.messages.sort(key=lambda x: x.created_at)
+
+ return chats
+
[email protected]("/stream/{chat_id}")
+async def stream_chat(chat_id: UUID, payload: ChatRequest, db: Session = Depends(get_db), current_user: Profile = Depends(get_current_user)):
+ # Check if Chat exists
+ chat = db.query(Chat).filter(Chat.id == chat_id, Chat.owner_id == current_user.id).first()
+ if not chat:
+ raise HTTPException(status_code=404, detail="Chat not found")
+
+ # Update chat's last_updated_at
+ chat.last_updated_at = datetime.utcnow()
+ db.commit()
+ # A new message is created
+ user_message = ChatMessage(
+ id=uuid4(),
+ content=payload.prompt,
+ context=payload.context,
+ chat_id=chat_id,
+ is_bot=False,
+ created_at=datetime.utcnow(),
+ )
+ db.add(user_message)
+ db.commit()
+ db.refresh(user_message)
+
try:
api_key = os.environ.get("MISTRAL_API_KEY")
if not api_key:
@@ -20,18 +120,65 @@ async def stream_chat(request: ChatRequest):
client = Mistral(api_key=api_key)
model = "mistral-small-latest"
+ accumulated_content = []
+ context_message = None
+ # Convert database messages to Mistral format
+ messages = [SystemMessage(content="You are a CTI/OSINT investigator and you are trying to investigate on a variety of real life cases. Use your knowledge and analytics capabilities to analyse the context and answer the question the best you can. If you need to reference some items (an IP, a domain or something particular) please use the code brackets, like : `12.23.34.54` to reference it.")]
+
+ # Add context as a single system message if provided
+ if payload.context:
+ try:
+ # Clean context by removing unnecessary keys
+ cleaned_context = clean_context(payload.context)
+ if cleaned_context:
+ context_str = json.dumps(cleaned_context, indent=2, default=str)
+ context_message = f"Context: {context_str}"
+ # Limit context message length to avoid token limits
+ if len(context_message) > 2000:
+ context_message = context_message[:2000] + "..."
+ except Exception as e:
+ # If context processing fails, skip it
+ print(f"Context processing error: {e}")
+
+ # Sort messages by created_at in ascending order and get recent messages
+ sorted_messages = sorted(chat.messages, key=lambda x: x.created_at)
+ recent_messages = sorted_messages[-5:] if len(sorted_messages) > 5 else sorted_messages
+ for message in recent_messages:
+ if message.is_bot:
+ messages.append(AssistantMessage(content=json.dumps(message.content, default=str)))
+ else:
+ messages.append(UserMessage(content=json.dumps(message.content, default=str)))
+
+ # Add the current context
+ if context_message:
+ messages.append(SystemMessage(content=context_message))
+ # Add the current user message
+ messages.append(UserMessage(content=payload.prompt))
async def generate():
response = await client.chat.stream_async(
model=model,
- messages=[
- UserMessage(content=request.prompt)
- ]
+ messages=messages
)
async for chunk in response:
if chunk.data.choices[0].delta.content is not None:
- yield f"data: {json.dumps({'content': chunk.data.choices[0].delta.content})}\n\n"
+ content_chunk = chunk.data.choices[0].delta.content
+ accumulated_content.append(content_chunk)
+ yield f"data: {json.dumps({'content': content_chunk})}\n\n"
+
+ # Create the bot message after all chunks have been processed
+ chat_message = ChatMessage(
+ id=uuid4(),
+ content="".join(accumulated_content),
+ chat_id=chat_id,
+ is_bot=True,
+ created_at=datetime.utcnow(),
+ )
+
+ db.add(chat_message)
+ db.commit()
+ db.refresh(chat_message)
yield "data: [DONE]\n\n"
@@ -40,4 +187,49 @@ async def stream_chat(request: ChatRequest):
media_type="text/event-stream"
)
except Exception as e:
- raise HTTPException(status_code=500, detail=str(e))
\ No newline at end of file
+ raise HTTPException(status_code=500, detail=str(e))
+
+
+# Create a new chat
[email protected]("/create", response_model=ChatRead, status_code=status.HTTP_201_CREATED)
+def create_chat(payload: ChatCreate, db: Session = Depends(get_db), current_user: Profile = Depends(get_current_user)):
+ new_chat = Chat(
+ id=uuid4(),
+ title=payload.title,
+ description=payload.description,
+ owner_id=current_user.id,
+ investigation_id=payload.investigation_id,
+ created_at=datetime.utcnow(),
+ last_updated_at=datetime.utcnow(),
+ )
+ db.add(new_chat)
+ db.commit()
+ db.refresh(new_chat)
+ return new_chat
+
+# Get a chat by ID
[email protected]("/{chat_id}", response_model=ChatRead)
+def get_chat_by_id(chat_id: UUID, db: Session = Depends(get_db),
+ current_user: Profile = Depends(get_current_user)
+ ):
+ chat = db.query(Chat).filter(Chat.id == chat_id,
+ Chat.owner_id == current_user.id
+ ).first()
+ if not chat:
+ raise HTTPException(status_code=404, detail="Chat not found")
+
+ # Sort messages by created_at in ascending order
+ chat.messages.sort(key=lambda x: x.created_at)
+
+ return chat
+
+
+# Delete an chat by ID
[email protected]("/{chat_id}", status_code=status.HTTP_204_NO_CONTENT)
+def delete_chat(chat_id: UUID, db: Session = Depends(get_db), current_user: Profile = Depends(get_current_user)):
+ chat = db.query(Chat).filter(Chat.id == chat_id, Chat.owner_id == current_user.id).first()
+ if not chat:
+ raise HTTPException(status_code=404, detail="Chat not found")
+ db.delete(chat)
+ db.commit()
+ return None
diff --git a/flowsint-api/app/api/routes/sketches.py b/flowsint-api/app/api/routes/sketches.py
index 1bac30d0..cbd04a64 100644
--- a/flowsint-api/app/api/routes/sketches.py
+++ b/flowsint-api/app/api/routes/sketches.py
@@ -329,4 +329,140 @@ def delete_nodes(
raise HTTPException(status_code=500, detail="Failed to delete nodes")
return {"status": "nodes deleted", "count": len(nodes.nodeIds)}
+
[email protected]("/{sketch_id}/nodes/{node_id}")
+def get_related_nodes(
+ sketch_id: str,
+ node_id: str,
+ db: Session = Depends(get_db),
+ # current_user: Profile = Depends(get_current_user)
+):
+ # First verify the sketch exists and belongs to the user
+ # sketch = db.query(Sketch).filter(Sketch.id == sketch_id, Sketch.owner_id == current_user.id).first()
+ # if not sketch:
+ # raise HTTPException(status_code=404, detail="Sketch not found")
+
+ # Query to get all direct relationships and connected nodes
+ # First, let's get the center node
+ center_query = """
+ MATCH (n)
+ WHERE elementId(n) = $node_id AND n.sketch_id = $sketch_id
+ RETURN elementId(n) as id, labels(n) as labels, properties(n) as data
+ """
+
+ try:
+ center_result = neo4j_connection.query(center_query, {
+ "sketch_id": sketch_id,
+ "node_id": node_id
+ })
+ except Exception as e:
+ print(f"Center node query error: {e}")
+ raise HTTPException(status_code=500, detail="Failed to retrieve center node")
+
+ if not center_result:
+ raise HTTPException(status_code=404, detail="Node not found")
+
+ # Now get all relationships and connected nodes
+ relationships_query = """
+ MATCH (n)
+ WHERE elementId(n) = $node_id AND n.sketch_id = $sketch_id
+ OPTIONAL MATCH (n)-[r]->(other)
+ WHERE other.sketch_id = $sketch_id
+ OPTIONAL MATCH (other)-[r2]->(n)
+ WHERE other.sketch_id = $sketch_id
+ RETURN
+ elementId(r) as rel_id,
+ type(r) as rel_type,
+ properties(r) as rel_data,
+ elementId(other) as other_node_id,
+ labels(other) as other_node_labels,
+ properties(other) as other_node_data,
+ 'outgoing' as direction
+ UNION
+ MATCH (n)
+ WHERE elementId(n) = $node_id AND n.sketch_id = $sketch_id
+ OPTIONAL MATCH (other)-[r]->(n)
+ WHERE other.sketch_id = $sketch_id
+ RETURN
+ elementId(r) as rel_id,
+ type(r) as rel_type,
+ properties(r) as rel_data,
+ elementId(other) as other_node_id,
+ labels(other) as other_node_labels,
+ properties(other) as other_node_data,
+ 'incoming' as direction
+ """
+
+ try:
+ result = neo4j_connection.query(relationships_query, {
+ "sketch_id": sketch_id,
+ "node_id": node_id
+ })
+ except Exception as e:
+ print(f"Related nodes query error: {e}")
+ raise HTTPException(status_code=500, detail="Failed to retrieve related nodes")
+
+ # Extract center node info
+ center_record = center_result[0]
+ center_node = {
+ "id": center_record["id"],
+ "labels": center_record["labels"],
+ "data": center_record["data"],
+ "label": center_record["data"].get("label", "Node"),
+ "type": "custom",
+ "caption": center_record["data"].get("label", "Node")
+ }
+
+ # Collect all related nodes and relationships
+ related_nodes = []
+ relationships = []
+ seen_nodes = set()
+ seen_relationships = set()
+
+ for record in result:
+ # Skip if no relationship found
+ if not record["rel_id"]:
+ continue
+
+ # Add relationship if not seen
+ if record["rel_id"] not in seen_relationships:
+ if record["direction"] == "outgoing":
+ relationships.append({
+ "id": record["rel_id"],
+ "type": "straight",
+ "source": center_node["id"],
+ "target": record["other_node_id"],
+ "data": record["rel_data"],
+ "caption": record["rel_type"]
+ })
+ else: # incoming
+ relationships.append({
+ "id": record["rel_id"],
+ "type": "straight",
+ "source": record["other_node_id"],
+ "target": center_node["id"],
+ "data": record["rel_data"],
+ "caption": record["rel_type"]
+ })
+ seen_relationships.add(record["rel_id"])
+
+ # Add related node if not seen
+ if record["other_node_id"] and record["other_node_id"] not in seen_nodes:
+ related_nodes.append({
+ "id": record["other_node_id"],
+ "labels": record["other_node_labels"],
+ "data": record["other_node_data"],
+ "label": record["other_node_data"].get("label", "Node"),
+ "type": "custom",
+ "caption": record["other_node_data"].get("label", "Node")
+ })
+ seen_nodes.add(record["other_node_id"])
+
+ # Combine center node with related nodes
+ all_nodes = [center_node] + related_nodes
+
+ return {
+ "nds": all_nodes,
+ "rls": relationships
+ }
diff --git a/flowsint-api/app/api/routes/types.py b/flowsint-api/app/api/routes/types.py
index 1db9825a..402db7fd 100644
--- a/flowsint-api/app/api/routes/types.py
+++ b/flowsint-api/app/api/routes/types.py
@@ -14,6 +14,7 @@ from app.types.wallet import CryptoWallet, CryptoWalletTransaction, CryptoNFT
from app.types.website import Website
from app.types.individual import Individual
from app.types.phone import Phone
+from app.types.leak import Leak
router = APIRouter()
@@ -26,11 +27,12 @@ async def get_types_list():
"type": "person",
"key": "person_category",
"icon": "individual",
- "label": "Person",
+ "label": "Identities & Entities",
"fields": [],
"children": [
extract_input_schema(Individual, label_key="full_name"),
extract_input_schema(SocialProfile, label_key="username", icon="username"),
+ extract_input_schema(Organization, label_key="name"),
],
},
{
@@ -49,19 +51,20 @@ async def get_types_list():
"type": "contact_category",
"key": "contact",
"icon": "phone",
- "label": "Contact",
+ "label": "Communication & Contact",
"fields": [],
"children": [
extract_input_schema(Phone, label_key="number"),
extract_input_schema(Email, label_key="email"),
+ extract_input_schema(SocialProfile, label_key="username", icon="username"),
],
},
{
"id": uuid4(),
- "type": "digital_category",
- "key": "digital",
+ "type": "network_category",
+ "key": "network",
"icon": "domain",
- "label": "Digital",
+ "label": "Network",
"fields": [],
"children": [
extract_input_schema(ASN, label_key="number"),
@@ -70,6 +73,30 @@ async def get_types_list():
extract_input_schema(Website, label_key="url"),
extract_input_schema(Ip, label_key="address"),
],
+ },
+ {
+ "id": uuid4(),
+ "type": "leak_category",
+ "key": "leaks",
+ "icon": "breach",
+ "label": "Leaks",
+ "fields": [],
+ "children": [
+ extract_input_schema(Leak, label_key="name", icon = "breach"),
+ ],
+ },
+ {
+ "id": uuid4(),
+ "type": "crypto_category",
+ "key": "crypto",
+ "icon": "cryptowallet",
+ "label": "Crypto",
+ "fields": [],
+ "children": [
+ extract_input_schema(CryptoWallet, label_key="address", icon = "cryptowallet"),
+ extract_input_schema(CryptoWalletTransaction, label_key="hash", icon = "cryptowallet"),
+ extract_input_schema(CryptoNFT, label_key="name", icon = "cryptowallet"),
+ ],
}
]
diff --git a/flowsint-api/app/api/schemas/chat.py b/flowsint-api/app/api/schemas/chat.py
new file mode 100644
index 00000000..00628ff9
--- /dev/null
+++ b/flowsint-api/app/api/schemas/chat.py
@@ -0,0 +1,33 @@
+from .base import ORMBase
+from pydantic import UUID4, BaseModel
+from typing import List, Optional, Any
+from datetime import datetime
+from app.models.models import ChatMessage
+
+class ChatMessageRead(BaseModel):
+ id: UUID4
+ content: Optional[Any] = None
+ is_bot: bool
+ created_at: datetime
+ chat_id: UUID4
+ context: Optional[Any] = None
+
+ class Config:
+ from_attributes = True
+
+class ChatCreate(BaseModel):
+ title: str
+ description: Optional[str] = None
+ owner_id: Optional[UUID4] = None
+ investigation_id: Optional[UUID4] = None
+
+class ChatRead(ORMBase):
+ id: UUID4
+ title: str
+ description: Optional[str]
+ created_at: datetime
+ last_updated_at: datetime
+ owner_id: Optional[UUID4]
+ investigation_id: Optional[UUID4]
+ messages: List[ChatMessageRead]
+
\ No newline at end of file
diff --git a/flowsint-api/app/api/schemas/sketch.py b/flowsint-api/app/api/schemas/sketch.py
index 9cbdb609..4fda7bb4 100644
--- a/flowsint-api/app/api/schemas/sketch.py
+++ b/flowsint-api/app/api/schemas/sketch.py
@@ -48,15 +48,3 @@ class SketchIn(BaseModel):
status: Optional[str] = "active"
investigation_id: UUID # requis
-class SketchRead(BaseModel):
- id: UUID
- title: Optional[str]
- description: Optional[str]
- created_at: Optional[datetime]
- owner_id: Optional[UUID]
- status: Optional[str]
- investigation_id: UUID
- last_updated_at: Optional[datetime]
-
- class Config:
- from_attributes = True
\ No newline at end of file
diff --git a/flowsint-api/app/main.py b/flowsint-api/app/main.py
index da138202..b341aac4 100644
--- a/flowsint-api/app/main.py
+++ b/flowsint-api/app/main.py
@@ -57,7 +57,7 @@ app.include_router(investigations.router, prefix="/api/investigations", tags=["i
app.include_router(transforms.router, prefix="/api/transforms", tags=["transforms"])
app.include_router(events.router, prefix="/api/events", tags=["events"])
app.include_router(analysis.router, prefix="/api/analyses", tags=["analyses"])
-app.include_router(chat.router, prefix="/api/chat", tags=["chat"])
+app.include_router(chat.router, prefix="/api/chats", tags=["chats"])
app.include_router(scan.router, prefix="/api/scans", tags=["scans"])
app.include_router(keys.router, prefix="/api/third_party_keys", tags=["third_party_keys"])
app.include_router(types.router, prefix="/api/types", tags=["types"])
\ No newline at end of file
diff --git a/flowsint-api/app/models/models.py b/flowsint-api/app/models/models.py
index 4dca2420..07d872f8 100644
--- a/flowsint-api/app/models/models.py
+++ b/flowsint-api/app/models/models.py
@@ -33,6 +33,7 @@ class Investigation(Base):
status = mapped_column(String, server_default='active')
sketches = relationship("Sketch", back_populates="investigation")
analyses = relationship("Analysis", back_populates="investigation")
+ chats = relationship("Chat", back_populates="investigation")
__table_args__ = (
Index("idx_investigations_id", "id"),
Index("idx_investigations_owner_id", "owner_id"),
@@ -162,6 +163,36 @@ class Analysis(Base):
Index("idx_analyses_investigation_id", "investigation_id"),
)
+class Chat(Base):
+ __tablename__ = "chats"
+
+ id: Mapped[uuid.UUID] = mapped_column(PGUUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
+ title = mapped_column(Text, nullable=False)
+ description = mapped_column(Text, nullable=True)
+ created_at = mapped_column(DateTime(timezone=True), server_default=func.now())
+ last_updated_at = mapped_column(DateTime(timezone=True), server_default=func.now())
+ owner_id = mapped_column(PGUUID(as_uuid=True), ForeignKey("profiles.id", onupdate="CASCADE", ondelete="CASCADE"), nullable=True)
+ investigation_id = mapped_column(PGUUID(as_uuid=True), ForeignKey("investigations.id", onupdate="CASCADE", ondelete="CASCADE"), nullable=True)
+ investigation = relationship("Investigation", back_populates="chats")
+ messages = relationship("ChatMessage", back_populates="chat", cascade="all, delete")
+ __table_args__ = (
+ Index("idx_chats_owner_id", "owner_id"),
+ Index("idx_chats_investigation_id", "investigation_id"),
+ )
+
+class ChatMessage(Base):
+ __tablename__ = "messages"
+
+ id: Mapped[uuid.UUID] = mapped_column(PGUUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
+ content = mapped_column(JSON, nullable=True)
+ context = mapped_column(JSON, nullable=True)
+ is_bot: Mapped[bool] = mapped_column(default=False)
+ created_at = mapped_column(DateTime(timezone=True), server_default=func.now())
+ chat_id = mapped_column(PGUUID(as_uuid=True), ForeignKey("chats.id", onupdate="CASCADE", ondelete="CASCADE"), nullable=False)
+ chat = relationship("Chat", back_populates="messages")
+ __table_args__ = (
+ Index("idx_messages_chat_id", "chat_id"),
+ )
class ThirdPartyKey(Base):
__tablename__ = "third_party_keys"
diff --git a/flowsint-api/app/scanners/individuals/to_org.py b/flowsint-api/app/scanners/individuals/to_org.py
index c65259f1..d0824690 100644
--- a/flowsint-api/app/scanners/individuals/to_org.py
+++ b/flowsint-api/app/scanners/individuals/to_org.py
@@ -325,52 +325,10 @@ class IndividualToOrgScanner(Scanner):
# Add SIREN as identifier if available
if org.siren:
- self.neo4j_conn.query("""
- MERGE (i:Identifier {type: 'siren', value: $value})
- SET i.country = $country,
- i.issued_by = $issued_by,
- i.sketch_id = $sketch_id,
- i.label = $label,
- i.caption = $label
- WITH i
- MATCH (o:Organization {name: $org_name, country: $org_country})
- MERGE (o)-[:HAS_IDENTIFIER {sketch_id: $sketch_id}]->(i)
- """, {
- "type": "siren",
- "label": f"SIREN: {org.siren}",
- "caption": f"SIREN: {org.siren}",
- "value": org.siren,
- "country": "FR",
- "issued_by": "INSEE",
- "sketch_id": self.sketch_id,
- "org_name": org.name,
- "org_country": "FR",
- })
Logger.graph_append(self.sketch_id, {"message": f"{org.name}: SIREN {org.siren} -> {org.name}"})
# Add SIRET as identifier if available
if org.siege_siret:
- self.neo4j_conn.query("""
- MERGE (i:Identifier {type: 'siret', value: $value})
- SET i.country = $country,
- i.issued_by = $issued_by,
- i.sketch_id = $sketch_id,
- i.label = $label,
- i.caption = $label
- WITH i
- MATCH (o:Organization {name: $org_name, country: $org_country})
- MERGE (o)-[:HAS_IDENTIFIER {sketch_id: $sketch_id}]->(i)
- """, {
- "type": "siret",
- "label": f"SIRET: {org.siege_siret}",
- "caption": f"SIRET: {org.siege_siret}",
- "value": org.siege_siret,
- "country": "FR",
- "issued_by": "INSEE",
- "sketch_id": self.sketch_id,
- "org_name": org.name,
- "org_country": "FR",
- })
Logger.graph_append(self.sketch_id, {"message": f"{org.name}: SIRET {org.siege_siret} -> {org.name}"})
# Add dirigeants (leaders) as Individual nodes with relationships
@@ -463,46 +421,10 @@ class IndividualToOrgScanner(Scanner):
# Add activity codes as Activity nodes
if org.activite_principale:
- self.neo4j_conn.query("""
- MERGE (a:Activity {code: $code})
- SET a.section = $section,
- a.sketch_id = $sketch_id,
- a.label = $label,
- a.caption = $caption,
- a.type = 'activity'
- WITH a
- MATCH (o:Organization {name: $org_name, country: $org_country})
- MERGE (o)-[:HAS_ACTIVITY {sketch_id: $sketch_id}]->(a)
- """, {
- "code": org.activite_principale,
- "section": org.section_activite_principale,
- "sketch_id": self.sketch_id,
- "label": f"Activity: {org.activite_principale}",
- "caption": f"Activity: {org.activite_principale}",
- "org_name": org.name,
- "org_country": "FR",
- })
Logger.graph_append(self.sketch_id, {"message": f"{org.name}: HAS_ACTIVITY -> {org.activite_principale}"})
# Add legal nature as LegalNature node
if org.nature_juridique:
- self.neo4j_conn.query("""
- MERGE (l:LegalNature {code: $code})
- SET l.sketch_id = $sketch_id,
- l.label = $label,
- l.caption = $caption,
- l.type = 'legal_nature'
- WITH l
- MATCH (o:Organization {name: $org_name, country: $org_country})
- MERGE (o)-[:HAS_LEGAL_NATURE {sketch_id: $sketch_id}]->(l)
- """, {
- "code": org.nature_juridique,
- "sketch_id": self.sketch_id,
- "label": f"Legal Nature: {org.nature_juridique}",
- "caption": f"Legal Nature: {org.nature_juridique}",
- "org_name": org.name,
- "org_country": "FR",
- })
Logger.graph_append(self.sketch_id, {"message": f"{org.name}: HAS_LEGAL_NATURE -> {org.nature_juridique}"})
return results
diff --git a/flowsint-api/app/scanners/organizations/to_infos.py b/flowsint-api/app/scanners/organizations/to_infos.py
index b45271eb..1b3a58ce 100644
--- a/flowsint-api/app/scanners/organizations/to_infos.py
+++ b/flowsint-api/app/scanners/organizations/to_infos.py
@@ -264,6 +264,7 @@ class OrgToInfosScanner(Scanner):
self.neo4j_conn.query("""
MERGE (o:Organization {name: $name, country: $country})
SET o.siren = $siren,
+ o.siege_siret = $siret,
o.nom_complet = $nom_complet,
o.nom_raison_sociale = $nom_raison_sociale,
o.sigle = $sigle,
@@ -292,6 +293,7 @@ class OrgToInfosScanner(Scanner):
"name": org.name,
"country": "FR",
"siren": org.siren,
+ "siret": org.siege_siret,
"nom_complet": org.nom_complet,
"nom_raison_sociale": org.nom_raison_sociale,
"sigle": org.sigle,
@@ -315,54 +317,11 @@ class OrgToInfosScanner(Scanner):
"sketch_id": self.sketch_id,
})
- # Add SIREN as identifier if available
if org.siren:
- self.neo4j_conn.query("""
- MERGE (i:Identifier {type: 'siren', value: $value})
- SET i.country = $country,
- i.issued_by = $issued_by,
- i.sketch_id = $sketch_id,
- i.label = $label,
- i.caption = $label
- WITH i
- MATCH (o:Organization {name: $org_name, country: $org_country})
- MERGE (o)-[:HAS_IDENTIFIER {sketch_id: $sketch_id}]->(i)
- """, {
- "type": "siren",
- "label": f"SIREN: {org.siren}",
- "caption": f"SIREN: {org.siren}",
- "value": org.siren,
- "country": "FR",
- "issued_by": "INSEE",
- "sketch_id": self.sketch_id,
- "org_name": org.name,
- "org_country": "FR",
- })
Logger.graph_append(self.sketch_id, {"message": f"{org.name}: SIREN {org.siren} -> {org.name}"})
# Add SIRET as identifier if available
if org.siege_siret:
- self.neo4j_conn.query("""
- MERGE (i:Identifier {type: 'siret', value: $value})
- SET i.country = $country,
- i.issued_by = $issued_by,
- i.sketch_id = $sketch_id,
- i.label = $label,
- i.caption = $label
- WITH i
- MATCH (o:Organization {name: $org_name, country: $org_country})
- MERGE (o)-[:HAS_IDENTIFIER {sketch_id: $sketch_id}]->(i)
- """, {
- "type": "siret",
- "label": f"SIRET: {org.siege_siret}",
- "caption": f"SIRET: {org.siege_siret}",
- "value": org.siege_siret,
- "country": "FR",
- "issued_by": "INSEE",
- "sketch_id": self.sketch_id,
- "org_name": org.name,
- "org_country": "FR",
- })
Logger.graph_append(self.sketch_id, {"message": f"{org.name}: SIRET {org.siege_siret} -> {org.name}"})
# Add dirigeants (leaders) as Individual nodes with relationships
@@ -455,46 +414,10 @@ class OrgToInfosScanner(Scanner):
# Add activity codes as Activity nodes
if org.activite_principale:
- self.neo4j_conn.query("""
- MERGE (a:Activity {code: $code})
- SET a.section = $section,
- a.sketch_id = $sketch_id,
- a.label = $label,
- a.caption = $caption,
- a.type = 'activity'
- WITH a
- MATCH (o:Organization {name: $org_name, country: $org_country})
- MERGE (o)-[:HAS_ACTIVITY {sketch_id: $sketch_id}]->(a)
- """, {
- "code": org.activite_principale,
- "section": org.section_activite_principale,
- "sketch_id": self.sketch_id,
- "label": f"Activity: {org.activite_principale}",
- "caption": f"Activity: {org.activite_principale}",
- "org_name": org.name,
- "org_country": "FR",
- })
Logger.graph_append(self.sketch_id, {"message": f"{org.name}: HAS_ACTIVITY -> {org.activite_principale}"})
# Add legal nature as LegalNature node
if org.nature_juridique:
- self.neo4j_conn.query("""
- MERGE (l:LegalNature {code: $code})
- SET l.sketch_id = $sketch_id,
- l.label = $label,
- l.caption = $caption,
- l.type = 'legal_nature'
- WITH l
- MATCH (o:Organization {name: $org_name, country: $org_country})
- MERGE (o)-[:HAS_LEGAL_NATURE {sketch_id: $sketch_id}]->(l)
- """, {
- "code": org.nature_juridique,
- "sketch_id": self.sketch_id,
- "label": f"Legal Nature: {org.nature_juridique}",
- "caption": f"Legal Nature: {org.nature_juridique}",
- "org_name": org.name,
- "org_country": "FR",
- })
Logger.graph_append(self.sketch_id, {"message": f"{org.name}: HAS_LEGAL_NATURE -> {org.nature_juridique}"})
return results
diff --git a/flowsint-app/package.json b/flowsint-app/package.json
index eee96a4f..48c64017 100644
--- a/flowsint-app/package.json
+++ b/flowsint-app/package.json
@@ -107,9 +107,12 @@
"react-force-graph-2d": "^1.27.1",
"react-force-graph-3d": "^1.26.1",
"react-hook-form": "^7.56.4",
+ "react-markdown": "^10.1.0",
"react-medium-image-zoom": "^5.2.14",
"react-resizable-panels": "^3.0.2",
+ "react-syntax-highlighter": "^15.6.1",
"recharts": "^2.15.3",
+ "remark-gfm": "^4.0.1",
"sigma": "^3.0.2",
"sonner": "^2.0.4",
"tailwindcss": "^4.1.8",
diff --git a/flowsint-app/src/renderer/src/api/chat-service.ts b/flowsint-app/src/renderer/src/api/chat-service.ts
new file mode 100644
index 00000000..0fc473e9
--- /dev/null
+++ b/flowsint-app/src/renderer/src/api/chat-service.ts
@@ -0,0 +1,121 @@
+import { fetchWithAuth } from "./api";
+import { useAuthStore } from '@/stores/auth-store';
+
+export interface ChatResponse {
+ content: string
+}
+
+export class ChatService {
+ private static instance: ChatService
+
+ public static getInstance(): ChatService {
+ if (!ChatService.instance) {
+ ChatService.instance = new ChatService()
+ }
+ return ChatService.instance
+ }
+
+ async streamChat(chatId: string, prompt: string, onChunk: (content: string) => void, context?: any): Promise<string> {
+ const token = useAuthStore.getState().token;
+ const API_URL = import.meta.env.VITE_API_URL;
+
+ const headers: HeadersInit = {
+ 'Content-Type': 'application/json',
+ };
+
+ if (token) {
+ headers['Authorization'] = `Bearer ${token}`;
+ }
+
+ const response = await fetch(`${API_URL}/api/chats/stream/${chatId}`, {
+ method: 'POST',
+ headers,
+ body: JSON.stringify({
+ prompt,
+ context
+ }),
+ });
+
+ if (response.status === 401) {
+ useAuthStore.getState().logout();
+ window.location.href = '/login';
+ throw new Error('Session expired, login again.');
+ }
+
+ if (!response.ok) {
+ const errorData = await response.json().catch(() => ({}));
+ throw new Error(errorData.detail || `Error ${response.status}`);
+ }
+
+ const reader = response.body?.getReader()
+ if (!reader) {
+ console.error("No reader available")
+ throw new Error('No reader available')
+ }
+
+ let accumulatedContent = ''
+
+ while (true) {
+ const { done, value } = await reader.read()
+ if (done) {
+ break
+ }
+
+ const text = new TextDecoder().decode(value)
+ const lines = text.split('\n')
+
+ for (const line of lines) {
+ if (line.startsWith('data: ')) {
+ const data = line.slice(6)
+ if (data === '[DONE]') {
+ return accumulatedContent
+ }
+ try {
+ const parsed = JSON.parse(data)
+ if (parsed.content) {
+ accumulatedContent += parsed.content
+ onChunk(accumulatedContent)
+ }
+ } catch (e) {
+ console.error("Error parsing SSE data:", data, e)
+ }
+ }
+ }
+ }
+
+ return accumulatedContent
+ }
+}
+
+export const chatService = ChatService.getInstance()
+
+
+
+export const chatCRUDService = {
+ get: async (): Promise<any> => {
+ return fetchWithAuth('/api/chats', {
+ method: 'GET',
+ });
+ },
+ getByInvestigationId: async (investigationId: string): Promise<any> => {
+ return fetchWithAuth(`/api/chats/investigation/${investigationId}`, {
+ method: 'GET',
+ });
+ },
+ getById: async (chatId: string): Promise<any> => {
+ return fetchWithAuth(`/api/chats/${chatId}`, {
+ method: 'GET',
+ });
+ },
+ create: async (body: BodyInit): Promise<any> => {
+ return fetchWithAuth(`/api/chats/create`, {
+ method: 'POST',
+ body: body
+ });
+ },
+ delete: async (chatId: string): Promise<any> => {
+ return fetchWithAuth(`/api/chats/${chatId}`, {
+ method: 'DELETE',
+ });
+ },
+};
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/src/api/chat.service.ts b/flowsint-app/src/renderer/src/api/chat.service.ts
deleted file mode 100644
index 312beebd..00000000
--- a/flowsint-app/src/renderer/src/api/chat.service.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-import { toast } from "sonner";
-
-const API_URL = import.meta.env.VITE_API_URL;
-
-export interface ChatResponse {
- content: string
-}
-
-export class ChatService {
- private static instance: ChatService
- private baseUrl: string
-
- private constructor() {
- this.baseUrl = `${API_URL}/api/chat`
- }
-
- public static getInstance(): ChatService {
- if (!ChatService.instance) {
- ChatService.instance = new ChatService()
- }
- return ChatService.instance
- }
-
- async streamChat(prompt: string, onChunk: (content: string) => void, context?: any): Promise<string> {
- const response = await fetch(`${this.baseUrl}/stream`, {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify({
- prompt,
- context
- }),
- })
-
- if (!response.ok) {
- console.error("Response not OK:", response.status, response.statusText)
- throw new Error('Failed to get AI completion')
- }
-
- const reader = response.body?.getReader()
- if (!reader) {
- console.error("No reader available")
- throw new Error('No reader available')
- }
-
- let accumulatedContent = ''
-
- while (true) {
- const { done, value } = await reader.read()
- if (done) {
- console.log("Stream complete")
- break
- }
-
- const text = new TextDecoder().decode(value)
- const lines = text.split('\n')
-
- for (const line of lines) {
- if (line.startsWith('data: ')) {
- const data = line.slice(6)
- if (data === '[DONE]') {
- return accumulatedContent
- }
- try {
- const parsed = JSON.parse(data)
- if (parsed.content) {
- accumulatedContent += parsed.content
- onChunk(accumulatedContent)
- }
- } catch (e) {
- toast.error("Error parsing SSE data.")
- }
- }
- }
- }
-
- return accumulatedContent
- }
-}
-
-export const chatService = ChatService.getInstance()
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/src/api/sketch-service.ts b/flowsint-app/src/renderer/src/api/sketch-service.ts
index 6cee3dc6..f37c584e 100644
--- a/flowsint-app/src/renderer/src/api/sketch-service.ts
+++ b/flowsint-app/src/renderer/src/api/sketch-service.ts
@@ -52,6 +52,11 @@ export const sketchService = {
body: body
});
},
+ getNodeNeighbors: async (sketchId: string, nodeId: string): Promise<any> => {
+ return fetchWithAuth(`/api/sketches/${sketchId}/nodes/${nodeId}`, {
+ method: 'GET'
+ });
+ },
types: async (): Promise<any> => {
return fetchWithAuth(`/api/types`, {
method: 'GET'
diff --git a/flowsint-app/src/renderer/src/components/analyses/analysis-editor.tsx b/flowsint-app/src/renderer/src/components/analyses/analysis-editor.tsx
index 2d161341..a7acc0c7 100644
--- a/flowsint-app/src/renderer/src/components/analyses/analysis-editor.tsx
+++ b/flowsint-app/src/renderer/src/components/analyses/analysis-editor.tsx
@@ -5,12 +5,10 @@ import { analysisService } from "@/api/analysis-service"
import type { Analysis } from "@/types"
import { Button } from "@/components/ui/button"
import { Skeleton } from "@/components/ui/skeleton"
-import { PlusIcon, Trash2, Save, Sparkles, XIcon, ChevronDown, ChevronsRight, ExternalLink, X, ArrowUp } from "lucide-react"
+import { PlusIcon, Trash2, Save, ChevronDown, ChevronsRight, ExternalLink } from "lucide-react"
import { toast } from "sonner"
import { useKeyboardShortcut } from "@/hooks/use-keyboard-shortcut"
import { useConfirm } from "../use-confirm-dialog"
-import { useChat } from "@/hooks/use-chat"
-import { Textarea } from "@/components/ui/textarea"
import { Editor } from "@tiptap/core"
import { Link, useParams } from "@tanstack/react-router"
import { useLayoutStore } from "@/stores/layout-store"
@@ -19,9 +17,6 @@ import {
PopoverContent,
PopoverTrigger,
} from "@/components/ui/popover"
-import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable"
-import { Badge } from "../ui/badge"
-import { useGraphStore } from "@/stores/graph-store"
interface AnalysisEditorProps {
// Core data
@@ -67,7 +62,7 @@ export const AnalysisEditor = ({
currentAnalysisId
}: AnalysisEditorProps) => {
const { confirm } = useConfirm()
- const toggleChat = useLayoutStore(s => s.toggleChat)
+ const toggleAnalysis = useLayoutStore(s => s.toggleAnalysis)
const { investigationId: routeInvestigationId, type } = useParams({ strict: false }) as { investigationId: string, type: string }
const queryClient = useQueryClient()
@@ -76,21 +71,6 @@ export const AnalysisEditor = ({
const [titleValue, setTitleValue] = useState("")
const [editor, setEditor] = useState<Editor | undefined>(undefined)
const [isEditingTitle, setIsEditingTitle] = useState(false)
- const selectedNodes = useGraphStore(s => s.selectedNodes)
- const clearSelectedNodes = useGraphStore(s => s.clearSelectedNodes)
- // Chat hook
- const {
- isAiLoading,
- promptOpen,
- setPromptOpen,
- customPrompt,
- setCustomPrompt,
- handleCustomPrompt
- } = useChat({
- onContentUpdate: setEditorValue,
- onSuccess: () => saveMutation.mutate({}),
- editor: editor
- })
// Mutations
const createMutation = useMutation({
@@ -228,12 +208,6 @@ export const AnalysisEditor = ({
},
})
- useKeyboardShortcut({
- key: "e",
- ctrlOrCmd: true,
- callback: () => setPromptOpen(!promptOpen),
- })
-
if (isLoading) {
return <Skeleton className="h-full w-full" />
}
@@ -247,7 +221,7 @@ export const AnalysisEditor = ({
{/* Left section with navigation and title */}
<div className="flex items-center gap-3 flex-1 min-w-0">
{showNavigation && type !== "analysis" && (
- <Button className="h-8 w-8" variant="ghost" onClick={toggleChat}>
+ <Button className="h-8 w-8" variant="ghost" onClick={toggleAnalysis}>
<ChevronsRight />
</Button>
)}
@@ -336,16 +310,6 @@ export const AnalysisEditor = ({
</Button>
</Link>
)}
- <Button
- size="icon"
- variant="ghost"
- disabled={!analysis || isAiLoading}
- title="AI Prompt"
- className="h-8 w-8"
- onClick={() => setPromptOpen(!promptOpen)}
- >
- <Sparkles className="w-4 h-4" strokeWidth={1.5} />
- </Button>
{type !== "analysis" &&
<Button
size="icon"
@@ -386,88 +350,22 @@ export const AnalysisEditor = ({
{/* Editor */}
<div className="flex-1 min-h-0 flex flex-col">
{analysis ? (
- <ResizablePanelGroup autoSaveId="conditional" direction="vertical" className="h-full">
- <ResizablePanel
- id="editor"
- defaultSize={promptOpen ? 70 : 100}
- minSize={30}
- className="transition-all duration-200"
- >
- <div className="h-full w-full">
- <MinimalTiptapEditor
- key={analysis.id}
- immediatelyRender={true}
- value={editorValue}
- onChange={setEditorValue}
- className="w-full h-full"
- editorContentClassName="p-5 min-h-[300px]"
- output="json"
- placeholder="Enter your analysis..."
- autofocus={true}
- editable={true}
- editorClassName="focus:outline-hidden"
- onEditorReady={setEditor}
- />
- </div>
- </ResizablePanel>
-
- {promptOpen && (
- <>
- <ResizableHandle withHandle />
- <ResizablePanel id="chat" defaultSize={30} minSize={20} maxSize={50} className="transition-all duration-200">
- <div className="h-full bg-card flex flex-col">
- <div className="flex flex-col h-full">
- {/* File Tabs Header */}
- <div className="flex items-center bg-background border-b p-1">
- {selectedNodes?.length > 0 && <Badge variant={"outline"} className="flex items-center gap-1 pr-1">
- {selectedNodes?.length} entities(s) in context
- <Button size={"icon"} variant={"ghost"} className="h-5 w-5 rounded-full" onClick={clearSelectedNodes}>
- <XIcon className="h-3 w-3" />
- </Button>
- </Badge>}
- <div className="ml-auto pr-2">
- <Button
- variant="ghost"
- size="icon"
- onClick={() => setPromptOpen(false)}
- className="h-6 w-6 text-[#888] hover:text-white hover:bg-[#333]"
- >
- <X className="w-3 h-3" />
- </Button>
- </div>
- </div>
- {/* Bottom Input Bar */}
- <div className="border-t bg-card grow">
- <div className="p-3 h-full">
- <div className="relative h-full">
- <Textarea
- placeholder="Enter your prompt..."
- value={customPrompt}
- autoFocus
- onChange={(e) => setCustomPrompt(e.target.value)}
- className="h-full resize-none bg-background focus:ring-1 pr-12"
- />
- <Button
- onClick={() => handleCustomPrompt(editorValue)}
- disabled={!customPrompt.trim() || isAiLoading}
- size="icon"
- className="absolute bottom-2 right-2 h-8 w-8 bg-[#444] hover:bg-[#555] text-white disabled:opacity-50"
- >
- {isAiLoading ? (
- <div className="w-4 h-4 border-2 border-[#888] border-t-white rounded-full animate-spin" />
- ) : (
- <ArrowUp className="w-4 h-4" />
- )}
- </Button>
- </div>
- </div>
- </div>
- </div>
- </div>
- </ResizablePanel>
- </>
- )}
- </ResizablePanelGroup>
+ <div className="h-full w-full">
+ <MinimalTiptapEditor
+ key={analysis.id}
+ immediatelyRender={true}
+ value={editorValue}
+ onChange={setEditorValue}
+ className="w-full h-full"
+ editorContentClassName="p-5 min-h-[300px]"
+ output="json"
+ placeholder="Enter your analysis..."
+ autofocus={true}
+ editable={true}
+ editorClassName="focus:outline-hidden"
+ onEditorReady={setEditor}
+ />
+ </div>
) : (
<div className="flex flex-col items-center justify-center h-full text-muted-foreground space-y-3">
<div>No analysis selected.</div>
diff --git a/flowsint-app/src/renderer/src/components/analyses/editor/minimal-tiptap.tsx b/flowsint-app/src/renderer/src/components/analyses/editor/minimal-tiptap.tsx
index a201653a..81285898 100644
--- a/flowsint-app/src/renderer/src/components/analyses/editor/minimal-tiptap.tsx
+++ b/flowsint-app/src/renderer/src/components/analyses/editor/minimal-tiptap.tsx
@@ -92,7 +92,7 @@ export const MinimalTiptapEditor = React.forwardRef<
name="editor"
ref={ref}
className={cn(
- "flex h-full grow overflow-y-auto hide-scrollbar w-full flex-col",
+ "flex hide-scrollbar w-full flex-col",
className
)}
>
diff --git a/flowsint-app/src/renderer/src/components/chat/chat-history.tsx b/flowsint-app/src/renderer/src/components/chat/chat-history.tsx
new file mode 100644
index 00000000..29b75ce1
--- /dev/null
+++ b/flowsint-app/src/renderer/src/components/chat/chat-history.tsx
@@ -0,0 +1,105 @@
+import { chatCRUDService } from '@/api/chat-service';
+import { useQuery } from '@tanstack/react-query';
+import { SkeletonList } from '../shared/skeleton-list';
+import { Button } from '../ui/button';
+import { ArrowLeft, Trash, MessageSquare } from 'lucide-react';
+import { Chat } from '@/types';
+import { useCallback } from 'react';
+import { formatDistanceToNow } from 'date-fns';
+import { useConfirm } from '../use-confirm-dialog';
+import { useChatState } from '@/stores/use-chat-store';
+
+const ChatHistory = ({ setView, deleteChatMutation, handleCreateNewChat }: { setView: any, deleteChatMutation: any, handleCreateNewChat: any }) => {
+ const { confirm } = useConfirm()
+ const setCurrentChatId = useChatState(s => s.setCurrentChatId)
+ const { data: chats, isLoading } = useQuery({
+ queryKey: ["chats"],
+ queryFn: () => chatCRUDService.get(),
+ });
+
+ const switchToChat = (chatId: string) => {
+ setView("chat")
+ setCurrentChatId(chatId)
+ }
+
+ return (
+ <div className='h-full flex flex-col'>
+ <div className="flex items-center justify-between p-3 border-b w-full">
+ <div className="flex w-full items-center justify-between gap-1">
+ <div className='flex items-center gap-2'>
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-6 w-6"
+ //@ts-ignore
+ onClick={() => setView("chat")}
+ >
+ <ArrowLeft className="h-3 w-3" />
+ </Button>
+ <span className='opacity-60'>Chat history</span>
+ </div>
+
+ </div>
+ </div>
+ {isLoading ? <div className='p-4'><SkeletonList rowCount={4} /></div> :
+ chats && chats.length > 0 ? (
+ <div className='grow overflow-auto p-4 flex flex-col gap-2'>
+ {chats.map((chat: Chat) => (<ChatItem switchToChat={switchToChat} deleteChatMutation={deleteChatMutation} confirm={confirm} key={chat.id} chat={chat} />))}
+ </div>
+ ) : (
+ <div className="flex-1 flex flex-col items-center justify-center p-8 text-center text-muted-foreground">
+ <div className="relative mb-6">
+ <div className="absolute inset-0 bg-gradient-to-r from-primary/20 to-primary/10 rounded-full blur-xl animate-pulse"></div>
+ <div className="relative bg-gradient-to-br from-primary/10 to-primary/5 rounded-full p-6 border border-primary/20">
+ <MessageSquare className="h-8 w-8 text-primary/60" />
+ </div>
+ </div>
+ <div className="space-y-2 max-w-sm">
+ <h3 className="text-lg font-semibold text-foreground">
+ No conversations yet
+ </h3>
+ <p className="text-sm opacity-70">
+ Start chatting with AI to analyze your investigation data and get insights. Your conversation history will appear here.
+ </p>
+ </div>
+ <div className="mt-6">
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={handleCreateNewChat}
+ className="bg-gradient-to-r from-primary/10 to-primary/5 border-primary/20 hover:from-primary/20 hover:to-primary/10"
+ >
+ Start your first chat
+ </Button>
+ </div>
+ </div>
+ )
+ }
+ </div>
+ )
+}
+
+export default ChatHistory
+
+
+const ChatItem = ({ chat, confirm, deleteChatMutation, switchToChat }: { chat: Chat, confirm: any, deleteChatMutation: any, switchToChat: any }) => {
+ const handleDeleteChat = useCallback(async (e: { stopPropagation: () => void; }) => {
+ e.stopPropagation()
+ if (await confirm({ title: "Are you sure you want to delete this chat?", message: "This action is irreversible." })) {
+ await deleteChatMutation.mutateAsync(chat.id)
+ }
+ }, [])
+ return (
+ <button onClick={() => switchToChat(chat.id)} className='flex w-full cursor-pointer justify-between items-center bg-muted-foreground/5 backdrop-blur-sm rounded-xl p-2 px-4 hover:bg-muted-foreground/10 transition-all duration-300'>
+ <div className='flex items-start flex-col justify-between'>
+ <span className='font-semibold text-md'>{chat.title}</span>
+ <span className='font-normal text-xs'>{formatDistanceToNow(chat.last_updated_at, { addSuffix: true })}</span>
+ </div>
+ <div className='flex items-center justify-between'>
+ <Button variant="ghost" size="icon" className='h-6 w-6' onClick={handleDeleteChat}>
+ <Trash className='h-3 w-3' />
+ </Button>
+ </div>
+ </button>
+ )
+}
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/src/components/chat/chat-prompt.tsx b/flowsint-app/src/renderer/src/components/chat/chat-prompt.tsx
new file mode 100644
index 00000000..19e9cb6e
--- /dev/null
+++ b/flowsint-app/src/renderer/src/components/chat/chat-prompt.tsx
@@ -0,0 +1,149 @@
+import { Button } from "@/components/ui/button"
+import { Badge } from "@/components/ui/badge"
+import { Textarea } from "@/components/ui/textarea"
+import { XIcon, ArrowUp } from "lucide-react"
+import { useGraphStore } from "@/stores/graph-store"
+import { useRef, useEffect, memo } from "react"
+import { useNodesDisplaySettings } from "@/stores/node-display-settings"
+
+interface ChatPanelProps {
+ customPrompt: string
+ setCustomPrompt: (prompt: string) => void
+ handleCustomPrompt: (editorValue: any) => void
+ isAiLoading: boolean
+ editorValue: any
+}
+
+export const ChatPanel = ({
+ customPrompt,
+ setCustomPrompt,
+ handleCustomPrompt,
+ isAiLoading,
+ editorValue
+}: ChatPanelProps) => {
+ const selectedNodes = useGraphStore(s => s.selectedNodes)
+ const clearSelectedNodes = useGraphStore(s => s.clearSelectedNodes)
+ const textareaRef = useRef<HTMLTextAreaElement>(null)
+
+ // Handle Enter key submission
+ const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
+ if (e.key === 'Enter' && !e.shiftKey) {
+ e.preventDefault()
+ e.stopPropagation()
+ handleSubmit()
+ }
+ }
+
+ // Auto-resize textarea
+ useEffect(() => {
+ if (textareaRef.current) {
+ textareaRef.current.style.height = 'auto'
+ textareaRef.current.style.height = `${Math.min(textareaRef.current.scrollHeight, 120)}px`
+ }
+ }, [customPrompt])
+
+ const handleSubmit = () => {
+ if (customPrompt.trim() && !isAiLoading) {
+ handleCustomPrompt(editorValue)
+ }
+ }
+
+ // Limit to 10 items and show remaining count if more
+ const displayItems = selectedNodes?.slice(0, 10) || []
+ const remainingCount = selectedNodes?.length ? Math.max(0, selectedNodes.length - 10) : 0
+
+ return (
+ <div className="h-full flex flex-col">
+ <div className="flex-1 p-2 flex flex-col gap-2">
+ {selectedNodes?.length > 0 && (
+ <div className="flex flex-nowrap overflow-x-auto hide-scrollbar gap-1.5 items-center">
+ <ContextList context={displayItems} />
+ {remainingCount > 0 && (
+ <Badge
+ variant="outline"
+ className="text-xs"
+ >
+ +{remainingCount} more
+ </Badge>
+ )}
+ <Button
+ size="icon"
+ variant="ghost"
+ className="h-4 w-4 hover:bg-background/80"
+ onClick={clearSelectedNodes}
+ >
+ <XIcon className="h-3 w-3" />
+ </Button>
+ </div>
+ )}
+ <div className="flex-1 flex flex-col justify-end">
+ <div className="relative">
+ <Textarea
+ ref={textareaRef}
+ autoFocus
+ placeholder="Ask me anything about your investigation..."
+ value={customPrompt}
+ onChange={(e) => setCustomPrompt(e.target.value)}
+ onKeyDown={handleKeyDown}
+ className={`
+ min-h-[44px] max-h-[120px] resize-none
+ border border-border bg-background
+ focus:ring-2 focus:ring-primary/20 focus:border-primary
+ transition-all duration-200
+ pr-12 py-3 px-4 rounded-xl
+ `}
+ disabled={isAiLoading}
+ />
+ <Button
+ onClick={handleSubmit}
+ disabled={!customPrompt.trim() || isAiLoading}
+ size="icon"
+ variant={"ghost"}
+ className={`
+ absolute bg-muted right-2 bottom-2
+ h-8 w-8 rounded-full
+ transition-all duration-200
+ ${customPrompt.trim() && !isAiLoading
+ ? 'text-primary-foreground'
+ : 'bg-muted text-muted-foreground'
+ }
+ `}
+ >
+ {isAiLoading ? (
+ <div className="w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin" />
+ ) : (
+ <ArrowUp className="w-4 h-4" />
+ )}
+ </Button>
+ </div>
+
+ {/* <div className="text-xs text-muted-foreground flex items-center gap-2">
+ {isAiLoading && (
+ <div className="flex items-center gap-1">
+ <div className="w-2 h-2 bg-primary rounded-full animate-pulse" />
+ <span>Processing...</span>
+ </div>
+ )}
+ </div> */}
+ </div>
+ </div>
+ </div >
+ )
+}
+
+export const ContextList = memo(({ context }: { context: any }) => {
+ const colors = useNodesDisplaySettings(s => s.colors)
+ return (
+ <div className="flex flex-nowrap overflow-x-auto hide-scrollbar gap-1.5 items-center">
+ {context.map((item: any, index: number) => {
+ const color = colors[item?.data?.type || item?.type]
+ return (
+ <Badge key={index} variant="secondary" className="flex items-center border border-border gap-1.5 text-xs">
+ <span style={{ background: color }} className="w-1.5 h-1.5 rounded-full" />
+ {item.data?.label || 'Unknown'}
+ </Badge>
+ )
+ })}
+ </div>
+ )
+})
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/src/components/chat/chat-selector.tsx b/flowsint-app/src/renderer/src/components/chat/chat-selector.tsx
new file mode 100644
index 00000000..6f19cd5d
--- /dev/null
+++ b/flowsint-app/src/renderer/src/components/chat/chat-selector.tsx
@@ -0,0 +1,144 @@
+import { Button } from "@/components/ui/button"
+import { Badge } from "@/components/ui/badge"
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuSeparator,
+ DropdownMenuTrigger
+} from "@/components/ui/dropdown-menu"
+import {
+ ChevronDown,
+ Plus,
+ Trash2,
+ MessageSquare,
+} from "lucide-react"
+import { useChat } from "@/hooks/use-chat"
+import { useChatState } from "@/stores/use-chat-store"
+import { formatDistanceToNow } from "date-fns"
+
+interface ChatSelectorProps {
+ className?: string
+}
+
+export const ChatSelector = ({ className }: ChatSelectorProps) => {
+ const {
+ chats,
+ isLoadingChats,
+ createNewChat,
+ switchToChat,
+ } = useChat({
+ onContentUpdate: () => { },
+ onSuccess: () => { },
+ })
+
+ const currentChatId = useChatState(s => s.currentChatId)
+ const handleCreateNewChat = () => {
+ createNewChat()
+ }
+
+ const handleSwitchChat = (chatId: string) => {
+ switchToChat(chatId)
+ }
+
+ const formatDate = (dateString?: string) => {
+ if (!dateString) return "Unknown"
+ try {
+ return formatDistanceToNow(new Date(dateString), { addSuffix: true })
+ } catch {
+ return "Unknown"
+ }
+ }
+
+ if (isLoadingChats) {
+ return (
+ <div className={`flex items-center gap-2 ${className}`}>
+ <div className="w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin" />
+ <span className="text-sm text-muted-foreground">Loading chats...</span>
+ </div>
+ )
+ }
+
+ return (
+ <div className={`flex items-center gap-2 ${className}`}>
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <div>
+ <Button
+ variant="ghost"
+ size="sm"
+ className="h-8 px-2 gap-1 text-xs"
+ >
+ <MessageSquare className="h-3 w-3" />
+ <span className="max-w-[120px] truncate">
+ {currentChat?.title || "Select Chat"}
+ </span>
+ <ChevronDown className="h-3 w-3" />
+ </Button>
+ </div>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end" className="w-64">
+ <div className="px-2 py-1.5">
+ <div className="text-xs font-medium text-muted-foreground mb-2">
+ Chats ({chats.length})
+ </div>
+ </div>
+ <DropdownMenuSeparator />
+
+ {chats.length === 0 ? (
+ <div className="px-2 py-3 text-center text-xs text-muted-foreground">
+ No chats yet
+ </div>
+ ) : (
+ chats.map((chat) => (
+ <DropdownMenuItem
+ key={chat.id}
+ onClick={() => handleSwitchChat(chat.id)}
+ className={`flex items-center justify-between px-2 py-1.5 cursor-pointer ${chat.id === currentChatId ? 'bg-accent' : ''
+ }`}
+ >
+ <div className="flex-1 min-w-0">
+ <div className="text-sm font-medium truncate">
+ {chat.title}
+ </div>
+ <div className="text-xs text-muted-foreground truncate">
+ {formatDate(chat.updated_at || chat.created_at)}
+ </div>
+ </div>
+ {chat.id === currentChatId && (
+ <Badge variant="secondary" className="text-xs">
+ Current
+ </Badge>
+ )}
+ </DropdownMenuItem>
+ ))
+ )}
+
+ <DropdownMenuSeparator />
+
+ <div className="flex gap-1 p-1">
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={handleCreateNewChat}
+ className="flex-1 h-8 text-xs"
+ >
+ <Plus className="h-3 w-3 mr-1" />
+ New Chat
+ </Button>
+ {currentChat && (
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={handleDeleteCurrentChat}
+ className="h-8 w-8 p-0 text-destructive hover:text-destructive"
+ >
+ <Trash2 className="h-3 w-3" />
+ </Button>
+ )}
+ </div>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ </div>
+ )
+}
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/src/components/chat/chat-skeleton.tsx b/flowsint-app/src/renderer/src/components/chat/chat-skeleton.tsx
new file mode 100644
index 00000000..8af650e3
--- /dev/null
+++ b/flowsint-app/src/renderer/src/components/chat/chat-skeleton.tsx
@@ -0,0 +1,51 @@
+import { Skeleton } from "../ui/skeleton"
+
+export function ChatSkeleton() {
+ return (
+ <div className="grow p-4 flex flex-col gap-4">
+ {/* User message skeleton */}
+ <div className="flex w-full justify-end">
+ <div className="bg-muted-foreground/5 max-w-[80%] p-3 rounded-md">
+ <div className="flex flex-col gap-2">
+ <Skeleton className="h-4 w-48" />
+ <Skeleton className="h-4 w-32" />
+ <Skeleton className="h-4 w-40" />
+ </div>
+ </div>
+ </div>
+
+ {/* Bot message skeleton */}
+ <div className="flex w-full">
+ <div className="w-full p-3 rounded-md">
+ <div className="flex flex-col gap-2">
+ <Skeleton className="h-4 w-full" />
+ <Skeleton className="h-4 w-3/4" />
+ <Skeleton className="h-4 w-5/6" />
+ <Skeleton className="h-4 w-2/3" />
+ </div>
+ </div>
+ </div>
+
+ {/* Another user message skeleton */}
+ <div className="flex w-full justify-end">
+ <div className="bg-muted-foreground/5 max-w-[80%] p-3 rounded-md">
+ <div className="flex flex-col gap-2">
+ <Skeleton className="h-4 w-36" />
+ <Skeleton className="h-4 w-28" />
+ </div>
+ </div>
+ </div>
+
+ {/* Another bot message skeleton */}
+ <div className="flex w-full">
+ <div className="w-full p-3 rounded-md">
+ <div className="flex flex-col gap-2">
+ <Skeleton className="h-4 w-full" />
+ <Skeleton className="h-4 w-4/5" />
+ <Skeleton className="h-4 w-1/2" />
+ </div>
+ </div>
+ </div>
+ </div>
+ )
+}
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/src/components/chat/floating-chat.tsx b/flowsint-app/src/renderer/src/components/chat/floating-chat.tsx
new file mode 100644
index 00000000..9bfde82b
--- /dev/null
+++ b/flowsint-app/src/renderer/src/components/chat/floating-chat.tsx
@@ -0,0 +1,303 @@
+import { useChat } from '@/hooks/use-chat'
+import { memo, useEffect, useState, useRef } from 'react'
+import { ChatPanel, ContextList } from './chat-prompt'
+import { Button } from '../ui/button'
+import { Sparkles, X, Plus, History } from 'lucide-react'
+import { useKeyboardShortcut } from '@/hooks/use-keyboard-shortcut'
+import { Card } from '../ui/card'
+import { useLayoutStore } from '@/stores/layout-store'
+import { useChatState } from '@/stores/use-chat-store'
+import { useQuery } from '@tanstack/react-query'
+import { chatCRUDService } from '@/api/chat-service'
+import { ChatMessage } from '@/types'
+import { cn } from '@/lib/utils'
+import { MemoizedMarkdown } from './memoized-markdown'
+import { ChatSkeleton } from './chat-skeleton'
+import { ResizableChat } from './resizable-chat'
+import ChatHistory from './chat-history'
+
+function FloatingChat() {
+ const [editorValue, setEditorValue] = useState<any>("")
+ const bottomRef = useRef<HTMLDivElement>(null)
+ const currentChatId = useChatState(s => s.currentChatId)
+ const isOpenChat = useLayoutStore(s => s.isOpenChat)
+ const toggleChat = useLayoutStore(s => s.toggleChat)
+ const closeChat = useLayoutStore(s => s.closeChat)
+ const messages = useChatState(s => s.messages)
+ const setMessages = useChatState(s => s.setMessages)
+ const [view, setView] = useState<"chat" | "history">("chat")
+
+ const { data: chat, isLoading } = useQuery({
+ queryKey: ["chat", currentChatId],
+ enabled: Boolean(currentChatId) && isOpenChat,
+ queryFn: () => chatCRUDService.getById(currentChatId as string),
+ });
+
+ useEffect(() => {
+ setEditorValue("")
+ setMessages([])
+ }, [currentChatId, setMessages])
+
+ useEffect(() => {
+ if (chat?.messages) {
+ setMessages(chat.messages)
+ }
+ }, [chat, setMessages])
+
+ // Chat hook
+ const {
+ isAiLoading,
+ customPrompt,
+ setCustomPrompt,
+ handleCustomPrompt,
+ createNewChat,
+ deleteChatMutation
+ } = useChat({
+ onContentUpdate: setEditorValue,
+ onSuccess: () => { },
+ })
+
+ useKeyboardShortcut({
+ key: "e",
+ ctrlOrCmd: true,
+ callback: toggleChat,
+ })
+
+ useKeyboardShortcut({
+ key: "Escape",
+ ctrlOrCmd: false,
+ callback: closeChat,
+ })
+
+ const handlecreateNewChat = () => { createNewChat(); setView("chat") }
+
+ // Check if there's content in the editor
+ const hasContent = editorValue && (
+ typeof editorValue === 'string' ? editorValue.trim() !== '' :
+ editorValue.content && editorValue.content.length > 0
+ )
+ const hasMessages = messages.length > 0
+
+ useEffect(() => {
+ if (bottomRef.current) {
+ bottomRef.current.scrollIntoView({ behavior: "smooth" })
+ }
+ }, [messages, editorValue])
+
+ return (
+ <>
+ {!isOpenChat &&
+ <div className="fixed bottom-12 right-4 z-10">
+ <Button
+ className='h-12 w-12 rounded-full'
+ onClick={toggleChat}
+ >
+ <Sparkles className='!h-5 !w-5' />
+ </Button>
+ </div>}
+
+ {/* Chat Panel */}
+ {isOpenChat &&
+
+
+ <div className="fixed bottom-12 overflow-hidden rounded-2xl right-4 shadow z-21">
+ <ResizableChat minWidth={400} minHeight={400} maxWidth={800} maxHeight={800}>
+ <Card className="overflow-hidden backdrop-blur-sm bg-card/90 rounded-2xl gap-0 py-0 h-full">
+ {view === "history" ? (
+ <ChatHistory setView={setView} deleteChatMutation={deleteChatMutation} handleCreateNewChat={handlecreateNewChat} />
+ ) : (
+ <>
+ <div className="flex items-center justify-between p-3 border-b">
+ <div className="flex w-full items-center justify-between gap-1">
+ <div className='flex items-center gap-2'>
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-6 w-6"
+ //@ts-ignore
+ onClick={handlecreateNewChat}
+ title="Create new chat"
+ >
+ <Plus className="h-3 w-3" />
+ </Button>
+ <span className='text-sm opacity-60'>{chat?.title}</span>
+ </div>
+ <div className='flex items-center gap-2'>
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-6 w-6"
+ //@ts-ignore
+ onClick={() => setView("history")}
+ title="Create new chat"
+ >
+ <History className="h-3 w-3 opacity-60" />
+ </Button>
+ <Button
+ variant="ghost"
+ size="icon"
+ className="h-6 w-6"
+ onClick={closeChat}
+ >
+ <X className="h-4 w-4" />
+ </Button>
+ </div>
+ </div>
+ </div>
+
+ {/* Content */}
+ <div className="flex flex-col prose flex-1 overflow-auto">
+ {isLoading ? (
+ <ChatSkeleton />
+ ) : hasMessages ? (
+ <div className='grow p-4 flex flex-col gap-2'>
+ {messages.map((message: ChatMessage) => (
+ <ChatMessageComponent key={message.id} message={message} />
+ ))}
+ {hasContent && (
+ <ChatMessageComponent
+ key="draft"
+ message={{
+ content: editorValue,
+ is_bot: true,
+ id: new Date().getTime().toString(),
+ created_at: new Date().toISOString(),
+ chatId: currentChatId || undefined
+ }}
+ />
+ )}
+ <div ref={bottomRef} />
+ </div>
+ ) : null}
+ {!hasMessages && !hasContent && !isLoading && (
+ <div className="flex-1 flex flex-col items-center justify-center p-8 text-center text-muted-foreground">
+ {!currentChatId ? (
+ // No currentChatId - Empty state with sparkles
+ <>
+ <div className="relative mb-6">
+ <div className="absolute inset-0 bg-gradient-to-r from-primary/20 to-primary/10 rounded-full blur-xl animate-pulse"></div>
+ <div className="relative bg-gradient-to-br from-primary/10 to-primary/5 rounded-full p-6 border border-primary/20">
+ <Sparkles className="h-8 w-8 text-primary/60" />
+ </div>
+ </div>
+ <div className="space-y-2 max-w-sm">
+ <h3 className="text-lg font-semibold text-foreground">
+ No conversations yet
+ </h3>
+ <p className="text-sm opacity-70">
+ Start chatting with AI to analyze your investigation data and get insights. Your conversation history will appear here.
+ </p>
+ </div>
+ <div className="mt-6">
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={handlecreateNewChat}
+ className="bg-gradient-to-r from-primary/10 to-primary/5 border-primary/20 hover:from-primary/20 hover:to-primary/10"
+ >
+ Start your first chat
+ </Button>
+ </div>
+ </>
+ ) : (
+ // Has currentChatId but no messages - Examples of things to ask
+ <>
+ {/* <div className="relative mb-6">
+ <div className="absolute inset-0 bg-gradient-to-r from-primary/20 to-primary/10 rounded-full blur-xl animate-pulse"></div>
+ <div className="relative bg-gradient-to-br from-primary/10 to-primary/5 rounded-full p-6 border border-primary/20">
+ <Sparkles className="h-8 w-8 text-primary/60" />
+ </div>
+ </div> */}
+ <div className="space-y-2 max-w-sm">
+ <h3 className="text-lg font-semibold text-foreground">
+ Start your conversation
+ </h3>
+ <p className="text-sm opacity-70">
+ Ask me anything about your investigation. Here are some examples:
+ </p>
+ </div>
+ <div className="mt-6 space-y-3 max-w-md">
+ <div className="text-xs opacity-60 space-y-1">
+ <p className="font-medium">Analysis & Insights:</p>
+ <ul className="space-y-1 text-left">
+ <li>• "Analyze the connections between these entities"</li>
+ <li>• "What patterns do you see in this data?"</li>
+ <li>• "Summarize the key findings from this investigation"</li>
+ </ul>
+ </div>
+ <div className="text-xs opacity-60 space-y-1">
+ <p className="font-medium">Data Exploration:</p>
+ <ul className="space-y-1 text-left">
+ <li>• "Find all IP addresses related to this domain"</li>
+ <li>• "Show me all crypto wallets connected to this address"</li>
+ <li>• "What social media accounts are linked to this email?"</li>
+ </ul>
+ </div>
+ <div className="text-xs opacity-60 space-y-1">
+ <p className="font-medium">Investigation Help:</p>
+ <ul className="space-y-1 text-left">
+ <li>• "Suggest next steps for this investigation"</li>
+ <li>• "What should I look for next?"</li>
+ <li>• "Help me organize this investigation"</li>
+ </ul>
+ </div>
+ </div>
+ </>
+ )}
+ </div>
+ )}
+ </div>
+ <div className='border-t'>
+ <ChatPanel
+ customPrompt={customPrompt}
+ setCustomPrompt={setCustomPrompt}
+ handleCustomPrompt={handleCustomPrompt}
+ isAiLoading={isAiLoading}
+ editorValue={editorValue}
+ />
+ </div>
+ </>
+ )}
+ </Card>
+ </ResizableChat>
+ </div>}
+ </>
+ )
+}
+
+const ChatMessageComponent = ({ message }: { message: ChatMessage }) => {
+
+ if (message.is_bot)
+ return (
+ <div className={cn("justify-start",
+ "flex w-full",
+ )}>
+ <div className={cn("w-full",
+ "p-3 rounded-xl max-w-full",
+ "flex flex-col gap-2"
+ )}>
+ <MemoizedMarkdown id={message.id} content={message.content} />
+ </div>
+ </div >
+ )
+
+ return (
+ <div className={cn("items-end",
+ "flex w-full flex-col gap-2",
+ )}>
+ <div className={cn("bg-muted-foreground/5 max-w-[80%] border border-border",
+ "p-1 rounded-lg",
+ "flex flex-col items-end"
+ )}>
+ {message?.context && message.context.length > 0 && <div className='flex items-center justify-end mb-2'><ContextList context={message.context} /></div>}
+ <span className='px-3'><MemoizedMarkdown id={message.id} content={message.content} /></span>
+ </div>
+ </div >)
+}
+
+
+const MemoizedFloatingChat = memo(FloatingChat)
+
+MemoizedFloatingChat.displayName = 'MemoizedFloatingChat';
+
+export default MemoizedFloatingChat
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/src/components/chat/memoized-markdown.tsx b/flowsint-app/src/renderer/src/components/chat/memoized-markdown.tsx
new file mode 100644
index 00000000..ee64032e
--- /dev/null
+++ b/flowsint-app/src/renderer/src/components/chat/memoized-markdown.tsx
@@ -0,0 +1,55 @@
+import { marked } from 'marked';
+import { memo, useMemo } from 'react';
+import ReactMarkdown from 'react-markdown';
+import remarkGfm from 'remark-gfm'
+import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'
+import { dark } from 'react-syntax-highlighter/dist/esm/styles/prism';
+
+function parseMarkdownIntoBlocks(markdown: string): string[] {
+ const tokens = marked.lexer(markdown);
+ return tokens.map(token => token.raw);
+}
+
+const MemoizedMarkdownBlock = memo(
+ ({ content }: { content: string }) => {
+ return <ReactMarkdown
+ components={{
+ code({ node, className, children, ...props }) {
+ const match = /language-(\w+)/.exec(className || '')
+ return match ? (
+ <SyntaxHighlighter
+ children={String(children).replace(/\n$/, '')}
+ style={dark}
+ language={match[1]}
+ PreTag="div"
+ className="rounded-md p-2 text-sm"
+ {...props}
+ />
+ ) : (
+ <code className={className} {...props}>
+ {children}
+ </code>
+ )
+ }
+ }}
+ remarkPlugins={[remarkGfm]}>{content}</ReactMarkdown>;
+ },
+ (prevProps, nextProps) => {
+ if (prevProps.content !== nextProps.content) return false;
+ return true;
+ },
+);
+
+MemoizedMarkdownBlock.displayName = 'MemoizedMarkdownBlock';
+
+export const MemoizedMarkdown = memo(
+ ({ content, id }: { content: string; id: string }) => {
+ const blocks = useMemo(() => parseMarkdownIntoBlocks(content), [content]);
+
+ return blocks.map((block, index) => (
+ <MemoizedMarkdownBlock content={block} key={`${id}-block_${index}`} />
+ ));
+ },
+);
+
+MemoizedMarkdown.displayName = 'MemoizedMarkdown';
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/src/components/chat/resizable-chat.tsx b/flowsint-app/src/renderer/src/components/chat/resizable-chat.tsx
new file mode 100644
index 00000000..fa67588a
--- /dev/null
+++ b/flowsint-app/src/renderer/src/components/chat/resizable-chat.tsx
@@ -0,0 +1,150 @@
+import React, { useState, useCallback, useRef, useEffect } from 'react'
+import { cn } from '@/lib/utils'
+import { useLayoutStore } from '@/stores/layout-store'
+
+interface ResizableChatProps {
+ children: React.ReactNode
+ minWidth?: number
+ minHeight?: number
+ maxWidth?: number
+ maxHeight?: number
+}
+
+export const ResizableChat: React.FC<ResizableChatProps> = ({
+ children,
+ minWidth = 400,
+ minHeight = 400,
+ maxWidth = 800,
+ maxHeight = 800,
+}) => {
+ const { chatWidth, chatHeight, setChatDimensions } = useLayoutStore()
+ const [isResizing, setIsResizing] = useState(false)
+ const [resizeDirection, setResizeDirection] = useState<'se' | 'sw' | 'ne' | 'nw' | null>(null)
+ const [startPos, setStartPos] = useState({ x: 0, y: 0 })
+ const [startDimensions, setStartDimensions] = useState({ width: 0, height: 0 })
+ const containerRef = useRef<HTMLDivElement>(null)
+
+ const handleMouseDown = useCallback((direction: 'se' | 'sw' | 'ne' | 'nw') => (e: React.MouseEvent) => {
+ e.preventDefault()
+ e.stopPropagation()
+
+ setIsResizing(true)
+ setResizeDirection(direction)
+ setStartPos({ x: e.clientX, y: e.clientY })
+ setStartDimensions({ width: chatWidth, height: chatHeight })
+
+ document.body.style.cursor = direction.includes('e') ? 'e-resize' : 'w-resize'
+ document.body.style.userSelect = 'none'
+ }, [chatWidth, chatHeight])
+
+ const handleMouseMove = useCallback((e: MouseEvent): void => {
+ if (!isResizing || !resizeDirection) return
+
+ const deltaX = e.clientX - startPos.x
+ const deltaY = e.clientY - startPos.y
+
+ let newWidth = startDimensions.width
+ let newHeight = startDimensions.height
+
+ // Calculate new dimensions based on resize direction
+ if (resizeDirection.includes('e')) {
+ newWidth = Math.max(minWidth, Math.min(maxWidth, startDimensions.width + deltaX))
+ } else if (resizeDirection.includes('w')) {
+ newWidth = Math.max(minWidth, Math.min(maxWidth, startDimensions.width - deltaX))
+ }
+
+ if (resizeDirection.includes('s')) {
+ newHeight = Math.max(minHeight, Math.min(maxHeight, startDimensions.height + deltaY))
+ } else if (resizeDirection.includes('n')) {
+ newHeight = Math.max(minHeight, Math.min(maxHeight, startDimensions.height - deltaY))
+ }
+
+ setChatDimensions(newWidth, newHeight)
+ }, [isResizing, resizeDirection, startPos, startDimensions, minWidth, minHeight, maxWidth, maxHeight, setChatDimensions])
+
+ const handleMouseUp = useCallback(() => {
+ setIsResizing(false)
+ setResizeDirection(null)
+ document.body.style.cursor = ''
+ document.body.style.userSelect = ''
+ }, [])
+
+ useEffect(() => {
+ if (isResizing) {
+ document.addEventListener('mousemove', handleMouseMove)
+ document.addEventListener('mouseup', handleMouseUp)
+
+ return () => {
+ document.removeEventListener('mousemove', handleMouseMove)
+ document.removeEventListener('mouseup', handleMouseUp)
+ }
+ }
+ return undefined
+ }, [isResizing, handleMouseMove, handleMouseUp])
+
+ return (
+ <div
+ ref={containerRef}
+ className={cn(
+ "relative group overflow-hidden",
+ isResizing && "pointer-events-none"
+ )}
+ style={{
+ width: chatWidth,
+ height: chatHeight,
+ }}
+ >
+ {children}
+
+ {/* Resize overlay when active */}
+ {isResizing && (
+ <div className="absolute inset-0 bg-primary/5 border-2 border-primary/30 rounded-2xl pointer-events-none" />
+ )}
+
+ {/* Resize handles */}
+ <div
+ className={cn(
+ "absolute bottom-0 right-0 w-4 h-4 cursor-se-resize",
+ "bg-transparent hover:bg-primary/20 transition-colors",
+ "rounded-tl-md border-r border-b border-primary/20",
+ "group-hover:border-primary/40",
+ isResizing && "bg-primary/30 border-primary/50"
+ )}
+ onMouseDown={handleMouseDown('se')}
+ />
+
+ <div
+ className={cn(
+ "absolute bottom-0 left-0 w-4 h-4 cursor-sw-resize",
+ "bg-transparent hover:bg-primary/20 transition-colors",
+ "rounded-tr-md border-l border-b border-primary/20",
+ "group-hover:border-primary/40",
+ isResizing && "bg-primary/30 border-primary/50"
+ )}
+ onMouseDown={handleMouseDown('sw')}
+ />
+
+ <div
+ className={cn(
+ "absolute top-0 right-0 w-4 h-4 cursor-ne-resize",
+ "bg-transparent hover:bg-primary/20 transition-colors",
+ "rounded-bl-md border-r border-t border-primary/20",
+ "group-hover:border-primary/40",
+ isResizing && "bg-primary/30 border-primary/50"
+ )}
+ onMouseDown={handleMouseDown('ne')}
+ />
+
+ <div
+ className={cn(
+ "absolute top-0 left-0 w-4 h-4 cursor-nw-resize",
+ "bg-transparent hover:bg-primary/20 transition-colors",
+ "rounded-br-md border-l border-t border-primary/20",
+ "group-hover:border-primary/40",
+ isResizing && "bg-primary/30 border-primary/50"
+ )}
+ onMouseDown={handleMouseDown('nw')}
+ />
+ </div>
+ )
+}
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/src/components/graphs/draggable-card.tsx b/flowsint-app/src/renderer/src/components/graphs/draggable-card.tsx
new file mode 100644
index 00000000..02768dd8
--- /dev/null
+++ b/flowsint-app/src/renderer/src/components/graphs/draggable-card.tsx
@@ -0,0 +1,79 @@
+import React from "react"
+import { Reorder, useDragControls } from "framer-motion"
+import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
+import { Button } from "@/components/ui/button"
+import { Edit3, Eye, GripVertical } from "lucide-react"
+import { cn } from "@/lib/utils"
+
+interface DraggableCardProps {
+ id: string
+ title: string
+ children: React.ReactNode
+ isEditing: boolean
+ onToggleEdit: () => void
+ className?: string
+ showEditButton?: boolean
+ description?: string
+}
+
+export const DraggableCard: React.FC<DraggableCardProps> = ({
+ id,
+ title,
+ children,
+ isEditing,
+ onToggleEdit,
+ className,
+ showEditButton = true,
+ description
+}) => {
+
+ const controls = useDragControls()
+
+ return (
+ <Reorder.Item
+ value={id}
+ dragListener={false}
+ dragControls={controls}
+ whileDrag={{ scale: 1.02, zIndex: 10 }}
+ transition={{ duration: 0.2 }}
+ >
+ <Card className={cn("border bg-card/50 transition-all", className)}>
+ <CardHeader className="pb-4">
+ <div className="flex items-center justify-between">
+ <div className="flex items-center gap-2 cursor-grab active:cursor-grabbing reorder-handle ">
+ <div className="p-4" onPointerDown={(e) => controls.start(e)} >
+ <GripVertical
+ className="h-4 w-4 text-muted-foreground/50 cursor-grab" />
+ </div>
+ <CardTitle className="text-base font-medium">
+ {title}
+ </CardTitle>
+ </div>
+ {showEditButton && (
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={onToggleEdit}
+ className="h-8 w-8 p-0"
+ >
+ {isEditing ? (
+ <Eye className="h-4 w-4" />
+ ) : (
+ <Edit3 className="h-4 w-4" />
+ )}
+ </Button>
+ )}
+ </div>
+ {description && (
+ <p className="text-sm text-muted-foreground mt-1">
+ {description}
+ </p>
+ )}
+ </CardHeader>
+ <CardContent>
+ {children}
+ </CardContent>
+ </Card>
+ </Reorder.Item>
+ )
+}
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/src/components/graphs/dynamic-form.tsx b/flowsint-app/src/renderer/src/components/graphs/dynamic-form.tsx
index dee21883..3b100620 100644
--- a/flowsint-app/src/renderer/src/components/graphs/dynamic-form.tsx
+++ b/flowsint-app/src/renderer/src/components/graphs/dynamic-form.tsx
@@ -415,7 +415,7 @@ export function DynamicForm({ currentNodeType, initialData = {}, onSubmit, isFor
return (
<form onSubmit={handleSubmit(handleFormSubmit)} className="space-y-4 p-1">
<div className="space-y-4">{currentNodeType.fields.map(renderField)}</div>
- <div className="flex sticky translate-y-1 p-1 bottom-0 bg-card items-center justify-end space-x-2">
+ <div className="flex sticky translate-y-1 p-1 bottom-0 bg-background items-center justify-end space-x-2">
<Button type="submit" disabled={isSubmitting || loading}>
{isSubmitting || loading ? (
<>
diff --git a/flowsint-app/src/renderer/src/components/graphs/force-graph-viewer.tsx b/flowsint-app/src/renderer/src/components/graphs/force-graph-viewer.tsx
new file mode 100644
index 00000000..778f7072
--- /dev/null
+++ b/flowsint-app/src/renderer/src/components/graphs/force-graph-viewer.tsx
@@ -0,0 +1,289 @@
+import { ItemType, useNodesDisplaySettings } from '@/stores/node-display-settings';
+import React, { useCallback, useMemo, useEffect, useState, useRef } from 'react';
+import ForceGraph2D from 'react-force-graph-2d';
+
+export interface GraphNode {
+ id: string;
+ data?: {
+ type?: string;
+ label?: string;
+ };
+ label?: string;
+ position?: { x: number; y: number };
+}
+
+export interface GraphEdge {
+ id: string;
+ source: string;
+ target: string;
+ label?: string;
+}
+
+interface ForceGraphViewerProps {
+ nodes: GraphNode[];
+ edges: GraphEdge[];
+ width?: number;
+ height?: number;
+ nodeColors?: Record<string, string>;
+ nodeSizes?: Record<string, number>;
+ onNodeClick?: (node: GraphNode) => void;
+ onNodeRightClick?: (node: GraphNode, event: MouseEvent) => void;
+ onBackgroundClick?: () => void;
+ showLabels?: boolean;
+ showIcons?: boolean;
+ backgroundColor?: string;
+ className?: string;
+ style?: React.CSSProperties;
+ onGraphRef?: (ref: any) => void;
+}
+
+const NODE_COUNT_THRESHOLD = 500;
+
+const ForceGraphViewer: React.FC<ForceGraphViewerProps> = ({
+ nodes,
+ edges,
+ width,
+ height,
+ onNodeClick,
+ onNodeRightClick,
+ onBackgroundClick,
+ showLabels = true,
+ showIcons = true,
+ backgroundColor = 'transparent',
+ className = '',
+ style,
+ onGraphRef
+}) => {
+ const [currentZoom, setCurrentZoom] = useState(1);
+ const [dimensions, setDimensions] = useState({ width: 0, height: 0 });
+ const nodeColors = useNodesDisplaySettings(s => s.colors)
+ const getSize = useNodesDisplaySettings(s => s.getSize);
+ // Call onGraphRef when graphRef changes
+ useEffect(() => {
+ if (onGraphRef && graphRef.current) {
+ onGraphRef(graphRef.current);
+ }
+ }, [onGraphRef]);
+ const containerRef = useRef<HTMLDivElement>(null);
+ const graphRef = useRef<any>();
+
+ const shouldUseSimpleRendering = useMemo(() => {
+ return nodes.length > NODE_COUNT_THRESHOLD || currentZoom < 2.5;
+ }, [nodes.length, currentZoom]);
+
+ // Transform data for Force Graph
+ const graphData = useMemo(() => {
+ const transformedNodes = nodes.map(node => {
+ const type = node.data?.type as ItemType;
+ const color = nodeColors[type] || '#0074D9';
+ const size = getSize(type);
+ let nodeLabel = node.data?.label || node.label || node.id;
+
+ return {
+ ...node,
+ nodeLabel: nodeLabel,
+ nodeColor: color,
+ nodeSize: size,
+ nodeType: type,
+ val: size,
+ };
+ });
+
+ const edgeGroups = new Map();
+ edges.forEach(edge => {
+ const key = `${edge.source}-${edge.target}`;
+ if (!edgeGroups.has(key)) {
+ edgeGroups.set(key, []);
+ }
+ edgeGroups.get(key).push(edge);
+ });
+
+ const transformedEdges = edges.map((edge) => {
+ const key = `${edge.source}-${edge.target}`;
+ const group = edgeGroups.get(key);
+ const groupIndex = group.indexOf(edge);
+ const groupSize = group.length;
+ const curve = groupSize > 1 ? (groupIndex - (groupSize - 1) / 2) * 0.2 : 0;
+
+ return {
+ ...edge,
+ edgeLabel: edge.label,
+ curve: curve,
+ groupIndex: groupIndex,
+ groupSize: groupSize
+ };
+ });
+
+ return {
+ nodes: transformedNodes,
+ links: transformedEdges,
+ };
+ }, [nodes, edges, nodeColors, getSize]);
+
+ const handleNodeClick = useCallback((node: any) => {
+ if (onNodeClick) {
+ onNodeClick(node);
+ }
+ }, [onNodeClick]);
+
+ const handleNodeRightClick = useCallback((node: any, event: MouseEvent) => {
+ if (onNodeRightClick) {
+ onNodeRightClick(node, event);
+ }
+ }, [onNodeRightClick]);
+
+ const handleBackgroundClick = useCallback(() => {
+ if (onBackgroundClick) {
+ onBackgroundClick();
+ }
+ }, [onBackgroundClick]);
+
+ const renderNode = useCallback((node: any, ctx: CanvasRenderingContext2D, globalScale: number) => {
+ const size = node.nodeSize;
+ const type = node.nodeType;
+
+ if (shouldUseSimpleRendering) {
+ // Simple circle rendering for large node counts
+ ctx.beginPath();
+ ctx.arc(node.x, node.y, size * 0.65, 0, 2 * Math.PI);
+ ctx.fillStyle = node.nodeColor;
+ ctx.fill();
+ } else {
+ // Full rendering with icon and label
+ ctx.beginPath();
+ ctx.fillStyle = node.nodeColor;
+ ctx.fill();
+
+ if (showIcons) {
+ const img = new Image();
+ img.src = `/icons/${type}.svg`;
+ ctx.drawImage(img, node.x - size / 2, node.y - size / 2, size, size);
+ }
+
+ if (showLabels && globalScale > 3) {
+ const label = node.nodeLabel || node.label || node.id;
+ if (label) {
+ const fontSize = Math.max(2, size * 0.4);
+ ctx.font = `${fontSize}px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`;
+ const textWidth = ctx.measureText(label).width;
+ const padding = 2;
+
+ ctx.fillStyle = 'rgba(255, 255, 255, 0.45)';
+ ctx.strokeStyle = 'rgba(0, 0, 0, 0.05)';
+ ctx.lineWidth = 0.2;
+ const bgWidth = textWidth + padding * 2;
+ const bgHeight = fontSize + padding;
+ const bgX = node.x - bgWidth / 2;
+ const bgY = node.y + size / 2 + 1;
+
+ ctx.beginPath();
+ ctx.roundRect(bgX, bgY, bgWidth, bgHeight, 0.75);
+ ctx.fill();
+ ctx.stroke();
+
+ ctx.fillStyle = 'rgb(0, 0, 0)';
+ ctx.textAlign = 'center';
+ ctx.textBaseline = 'middle';
+ ctx.fillText(label, node.x, bgY + bgHeight / 2);
+ }
+ }
+ }
+ }, [shouldUseSimpleRendering, showLabels, showIcons]);
+
+ // Handle container resize
+ useEffect(() => {
+ if (!containerRef.current) return;
+
+ const resizeObserver = new ResizeObserver(entries => {
+ const { width: w, height: h } = entries[0].contentRect;
+ setDimensions({ width: w, height: h });
+ if (graphRef.current) {
+ graphRef.current.d3ReheatSimulation();
+ }
+ });
+
+ resizeObserver.observe(containerRef.current);
+
+ return () => {
+ resizeObserver.disconnect();
+ };
+ }, []);
+
+ if (!nodes.length) {
+ return (
+ <div className={`flex items-center justify-center ${className}`} style={style}>
+ <div className="text-center text-muted-foreground">
+ <p>No nodes to display</p>
+ </div>
+ </div>
+ );
+ }
+
+ return (
+ <div
+ ref={containerRef}
+ className={className}
+ data-graph-container
+ style={{
+ width: width || '100%',
+ height: height || '100%',
+ minHeight: 300,
+ minWidth: 300,
+ ...style
+ }}
+ >
+ <ForceGraph2D
+ ref={graphRef}
+ width={dimensions.width || width}
+ height={dimensions.height || height}
+ graphData={graphData}
+ nodeLabel="label"
+ nodeColor={node => shouldUseSimpleRendering ? node.nodeColor : "#00000000"}
+ nodeRelSize={6}
+ linkDirectionalArrowLength={3.5}
+ linkDirectionalArrowRelPos={1}
+ cooldownTicks={100}
+ onNodeRightClick={handleNodeRightClick}
+ onNodeClick={handleNodeClick}
+ onBackgroundClick={handleBackgroundClick}
+ linkCurvature={link => link.curve}
+ linkDirectionalParticles={link => link.__highlighted ? 2 : 0}
+ linkDirectionalParticleSpeed={0.005}
+ linkWidth={link => link.__highlighted ? 2 : link.__dimmed ? 0.5 : 1}
+ linkColor={link => {
+ if (link.__highlighted) return 'rgba(171, 171, 171, 0.23)';
+ if (link.__dimmed) return 'rgba(146, 146, 146, 0.33)';
+ return 'rgba(166, 166, 166, 0.32)';
+ }}
+ d3AlphaDecay={0.02}
+ d3VelocityDecay={0.3}
+ nodeCanvasObject={renderNode}
+ onNodeHover={(node: any) => {
+ if (node) {
+ graphData.nodes.forEach((n: any) => {
+ n.__highlighted = n === node;
+ n.__dimmed = n !== node;
+ });
+ graphData.links.forEach((l: any) => {
+ l.__highlighted = l.source === node || l.target === node;
+ l.__dimmed = l.source !== node && l.target !== node;
+ });
+ } else {
+ graphData.nodes.forEach((n: any) => {
+ n.__highlighted = false;
+ n.__dimmed = false;
+ });
+ graphData.links.forEach((l: any) => {
+ l.__highlighted = false;
+ l.__dimmed = false;
+ });
+ }
+ }}
+ backgroundColor={backgroundColor}
+ onZoom={(zoom) => setCurrentZoom(zoom.k)}
+ />
+ </div>
+ );
+};
+
+export default ForceGraphViewer;
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/src/components/graphs/graph-panel.tsx b/flowsint-app/src/renderer/src/components/graphs/graph-panel.tsx
index fe2dba2e..1a2658ec 100644
--- a/flowsint-app/src/renderer/src/components/graphs/graph-panel.tsx
+++ b/flowsint-app/src/renderer/src/components/graphs/graph-panel.tsx
@@ -14,6 +14,7 @@ import NodesTable from '../table'
import { findActionItemByKey } from '@/lib/action-items'
import { useActionItems } from '@/hooks/use-action-items'
import { toast } from 'sonner'
+import MapPanel from '../map/map-panel'
const GraphReactForce = lazy(() => import('./graph-react-force'))
const Graph = lazy(() => import('./graph'))
@@ -127,17 +128,21 @@ const GraphPanel = ({ graphData, isLoading, isRefetching }: GraphPanelProps) =>
}>
{/* <Graph /> */}
{nodes?.length > 500 ? (
- <>{view === "table" ? <NodesTable /> : <Graph />}</>
+ <>{view === "table" && <NodesTable />}
+ {["force", "hierarchy"].includes(view) && <Graph />}
+ {view === "map" && <MapPanel />}
+ </>
) : (<>
{view === "force" && <GraphReactForce />}
{view === "hierarchy" && <WallEditor isRefetching={isRefetching} isLoading={loading} />}
{view === "table" && <NodesTable />}
+ {view === "map" && <MapPanel />}
</>)}
</Suspense>
{/* <Graph /> */}
{/* <GraphSigma /> */}
<DragOverlay isDragging={isDraggingOver} />
- <div className='absolute left-3 top-3'>
+ <div className='absolute z-21 left-3 top-3'>
<Toolbar isLoading={isLoading} />
</div>
<CreateRelationDialog />
diff --git a/flowsint-app/src/renderer/src/components/graphs/map.tsx b/flowsint-app/src/renderer/src/components/graphs/map.tsx
deleted file mode 100644
index addd58a5..00000000
--- a/flowsint-app/src/renderer/src/components/graphs/map.tsx
+++ /dev/null
@@ -1,89 +0,0 @@
-import React from "react";
-import { useQuery } from "@tanstack/react-query";
-import L from "leaflet";
-import "leaflet/dist/leaflet.css";
-
-type MapFromAddressProps = {
- address?: string;
- lat?: number;
- lon?: number;
- height?: string;
- zoom?: number;
-};
-
-export const MapFromAddress: React.FC<MapFromAddressProps> = ({
- address,
- lat,
- lon,
- height = "400px",
- zoom = 15,
-}) => {
- const { data, isLoading, isError } = useQuery({
- queryKey: ["geocode", address],
- queryFn: async () => {
- // If lat and lon are provided, use them directly
- if (lat !== undefined && lon !== undefined) {
- return { lat, lon };
- }
-
- // Otherwise, geocode the address
- if (!address) {
- throw new Error("Either address or lat/lon coordinates must be provided");
- }
-
- const res = await fetch(
- `https://nominatim.openstreetmap.org/search?format=json&q=${encodeURIComponent(address)}`
- );
- const json = await res.json();
- if (!json || json.length === 0) throw new Error("Address not found");
- return {
- lat: parseFloat(json[0].lat),
- lon: parseFloat(json[0].lon),
- };
- },
- enabled: !(lat !== undefined && lon !== undefined), // Skip query if lat/lon are provided
- });
-
- // Use provided coordinates or geocoded data
- const coordinates = lat !== undefined && lon !== undefined
- ? { lat, lon }
- : data;
-
- const mapId = `leaflet-map-${btoa(address || `${lat},${lon}`).replace(/[^a-zA-Z0-9]/g, "")}`;
-
- React.useEffect(() => {
- if (!coordinates) return;
-
- const map = L.map(mapId).setView([coordinates.lat, coordinates.lon], zoom);
-
- L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
- attribution: "© OpenStreetMap",
- }).addTo(map);
-
- const marker = L.marker([coordinates.lat, coordinates.lon]).addTo(map);
-
- // Bind popup with address if available, otherwise show coordinates
- const popupText = address || `${coordinates.lat.toFixed(6)}, ${coordinates.lon.toFixed(6)}`;
- marker.bindPopup(popupText).openPopup();
-
- return () => {
- map.remove(); // cleanup
- };
- }, [coordinates, mapId, address, zoom]);
-
- // Show loading only when geocoding is needed
- if (isLoading && !(lat !== undefined && lon !== undefined)) {
- return <div className="p-3"><p>Loading map…</p></div>;
- }
-
- if (isError && !(lat !== undefined && lon !== undefined)) {
- return <div className="p-3"><p>Could not find the address.</p></div>;
- }
-
- // Don't render if we don't have coordinates
- if (!coordinates) {
- return <div className="p-3"><p>No coordinates provided.</p></div>;
- }
-
- return <div id={mapId} style={{ height }} />;
-};
diff --git a/flowsint-app/src/renderer/src/components/graphs/neighbors.tsx b/flowsint-app/src/renderer/src/components/graphs/neighbors.tsx
new file mode 100644
index 00000000..57aa10a6
--- /dev/null
+++ b/flowsint-app/src/renderer/src/components/graphs/neighbors.tsx
@@ -0,0 +1,42 @@
+import { sketchService } from "@/api/sketch-service";
+import { useQuery } from "@tanstack/react-query";
+import { Card, CardContent, CardHeader, CardTitle } from "../ui/card";
+import ForceGraphViewer from "./force-graph-viewer";
+
+const NeighborsGraph = ({ sketchId, nodeId }: { sketchId: string, nodeId: string }) => {
+
+ const { data: neighborsData, isLoading } = useQuery({
+ queryKey: ['neighbors', sketchId, nodeId],
+ queryFn: () => sketchService.getNodeNeighbors(sketchId, nodeId),
+ });
+ return (
+ <Card className="border bg-muted/30">
+ <CardHeader className="pb-3">
+ <CardTitle className="text-base font-medium">
+ Related
+ </CardTitle>
+ </CardHeader>
+ <CardContent>
+ <div className="overflow-hidden rounded-lg bg-background border relative">
+ {isLoading ? <div>Loading...</div> : <div className="flex-1 h-[600px] relative">
+ <div className="top-2 left-2 absolute">{neighborsData.nds.length - 1} neighbor(s)</div>
+ <ForceGraphViewer
+ nodes={neighborsData.nds}
+ edges={neighborsData.rls}
+ onNodeClick={() => { }}
+ onNodeRightClick={() => { }}
+ onBackgroundClick={() => { }}
+ showLabels={true}
+ showIcons={true}
+ backgroundColor="transparent"
+ onGraphRef={() => { }}
+ />
+ </div>}
+ </div>
+ </CardContent>
+ </Card>
+
+ )
+}
+
+export default NeighborsGraph
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/src/components/graphs/new-actions.tsx b/flowsint-app/src/renderer/src/components/graphs/new-actions.tsx
index d652234d..82ae785d 100644
--- a/flowsint-app/src/renderer/src/components/graphs/new-actions.tsx
+++ b/flowsint-app/src/renderer/src/components/graphs/new-actions.tsx
@@ -127,7 +127,7 @@ export default function ActionDialog({ children, setCurrentNode }: ActionDialogP
<>
<Dialog open={openMainDialog} onOpenChange={setOpenMainDialog}>
<DialogTrigger disabled={isLoading} asChild>{children}</DialogTrigger>
- <DialogContent className="sm:max-w-[700px] h-[80vh] overflow-hidden flex flex-col">
+ <DialogContent className="sm:max-w-[800px] h-[80vh] overflow-hidden flex flex-col">
<DialogTitle className="flex items-center">
{currentParent && (
<Button variant="ghost" size="icon" className="mr-2" onClick={navigateBack}>
@@ -195,7 +195,7 @@ function ActionCard({ item, onSelect }: ActionCardProps) {
return (
<Card
className={cn(
- "cursor-pointer transition-all bg-card hover:border-primary border border-transparent hover:shadow-md",
+ "cursor-pointer transition-all hover:border-primary border border-transparent hover:shadow-md bg-muted",
item.disabled && "opacity-50 cursor-not-allowed",
"h-full",
)}
diff --git a/flowsint-app/src/renderer/src/components/graphs/node-editor-modal.tsx b/flowsint-app/src/renderer/src/components/graphs/node-editor-modal.tsx
index 49dbf63a..7e7d800b 100644
--- a/flowsint-app/src/renderer/src/components/graphs/node-editor-modal.tsx
+++ b/flowsint-app/src/renderer/src/components/graphs/node-editor-modal.tsx
@@ -4,15 +4,20 @@ import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import { Textarea } from "@/components/ui/textarea"
-import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
import { Badge } from "@/components/ui/badge"
-import { Edit3, Save, X, Hash, Type, FileText, Tag, Check, Loader2 } from "lucide-react"
+import { Edit3, Save, X, Hash, Type, FileText, Check, Loader2, User } from "lucide-react"
import type { NodeData } from "@/types"
import { useGraphStore } from "@/stores/graph-store"
-import { MapFromAddress } from "./map"
+import { MapFromAddress } from "../map/map"
import { sketchService } from "@/api/sketch-service"
import { useParams } from "@tanstack/react-router"
import { toast } from "sonner"
+import NeighborsGraph from "./neighbors"
+import { DraggableCard } from "./draggable-card"
+import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
+import { useNodeEditorLayoutStore, type CardType } from "@/stores/node-editor-layout-store"
+import { Reorder } from "framer-motion"
+import { useIcon } from "@/hooks/use-icon"
export const NodeEditorModal: React.FC = () => {
const currentNode = useGraphStore(state => state.currentNode)
@@ -21,6 +26,12 @@ export const NodeEditorModal: React.FC = () => {
const updateNode = useGraphStore(state => state.updateNode)
const setCurrentNode = useGraphStore(state => state.setCurrentNode)
const { id: sketchId } = useParams({ strict: false })
+ const cardLayout = useNodeEditorLayoutStore(s => s.cardLayout)
+ const setCardLayout = useNodeEditorLayoutStore(s => s.setCardLayout)
+ const toggleCardEdit = useNodeEditorLayoutStore(s => s.toggleCardEdit)
+ const setCardEditState = useNodeEditorLayoutStore(s => s.setCardEditState)
+ const resetLayout = useNodeEditorLayoutStore(s => s.resetLayout)
+ const IconComponent = useIcon(currentNode?.data.type as string, currentNode?.data?.src as string | null);
const [formData, setFormData] = useState<Partial<NodeData>>({
label: "",
@@ -39,6 +50,12 @@ export const NodeEditorModal: React.FC = () => {
caption: currentNode.data.caption || "",
type: currentNode.data.type || ""
});
+ // Reset edit states when node changes
+ cardLayout.forEach(card => {
+ if (card.isEditing) {
+ setCardEditState(card.id, false)
+ }
+ })
}
}, [currentNode]);
@@ -46,7 +63,7 @@ export const NodeEditorModal: React.FC = () => {
if (!currentNode || !sketchId) return;
setIsSaving(true);
-
+
try {
// Prepare the data for the API
const updateData = {
@@ -67,7 +84,7 @@ export const NodeEditorModal: React.FC = () => {
...formData
}
});
-
+
toast.success("Node updated successfully");
setOpenNodeEditorModal(false);
} else {
@@ -91,7 +108,16 @@ export const NodeEditorModal: React.FC = () => {
[field]: value
}));
};
- const isLocation = formData.type === "location" || (formData.latitude && formData.longitude)
+
+ const handleLayoutReorder = (newOrder: string[]) => {
+ const updatedLayout = newOrder.map((id, index) => {
+ const existingCard = cardLayout.find(card => card.id === id)
+ return existingCard ? { ...existingCard, order: index } : cardLayout[index]
+ })
+ setCardLayout(updatedLayout)
+ }
+
+ const isLocation = currentNode?.data.type === "location" || (currentNode?.data.latitude && currentNode?.data.longitude)
if (!currentNode) return null;
@@ -101,6 +127,219 @@ export const NodeEditorModal: React.FC = () => {
([key]) => !coreFields.includes(key) && key !== 'ID'
);
+ // Sort cards by their order
+ const sortedCards = [...cardLayout].sort((a, b) => a.order - b.order)
+
+ const renderCardContent = (cardId: CardType) => {
+ const isEditing = cardLayout.find(card => card.id === cardId)?.isEditing || false
+
+ switch (cardId) {
+ case 'description':
+ if (!currentNode.data.description) return null
+ return (
+ <div
+ className="text-sm text-muted-foreground prose prose-sm max-w-none"
+ dangerouslySetInnerHTML={{ __html: currentNode.data.description }}
+ />
+ )
+
+ case 'core-properties':
+ return (
+ <div className="space-y-4">
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
+ <div className="space-y-2">
+ <Label htmlFor="label" className="text-sm font-medium flex items-center gap-2">
+ <FileText className="h-3 w-3" />
+ Label
+ </Label>
+ {isEditing ? (
+ <Input
+ id="label"
+ value={formData.label || ""}
+ onChange={(e) => handleInputChange("label", e.target.value)}
+ placeholder="Enter node label"
+ className="h-9"
+ />
+ ) : (
+ <div className="h-9 px-3 py-2 text-sm bg-muted/30 border rounded-md flex items-center">
+ <span className="text-foreground">{formData.label || "No label"}</span>
+ </div>
+ )}
+ </div>
+ <div className="space-y-2">
+ <Label htmlFor="type" className="text-sm font-medium flex items-center gap-2">
+ <Type className="h-3 w-3" />
+ Type
+ </Label>
+ {isEditing ? (
+ <Input
+ id="type"
+ value={formData.type || ""}
+ onChange={(e) => handleInputChange("type", e.target.value)}
+ placeholder="Enter node type"
+ className="h-9"
+ />
+ ) : (
+ <div className="h-9 px-3 py-2 text-sm bg-muted/30 border rounded-md flex items-center">
+ <span className="text-foreground">{formData.type || "No type"}</span>
+ </div>
+ )}
+ </div>
+ </div>
+ <div className="space-y-2">
+ <Label htmlFor="caption" className="text-sm font-medium flex items-center gap-2">
+ <FileText className="h-3 w-3" />
+ Caption
+ </Label>
+ {isEditing ? (
+ <Input
+ id="caption"
+ value={formData.caption || ""}
+ onChange={(e) => handleInputChange("caption", e.target.value)}
+ placeholder="Enter node caption"
+ className="h-9"
+ />
+ ) : (
+ <div className="h-9 px-3 py-2 text-sm bg-muted/30 border rounded-md flex items-center">
+ <span className="text-foreground">{formData.caption || "No caption"}</span>
+ </div>
+ )}
+ </div>
+ <div className="space-y-2">
+ <Label htmlFor="id" className="text-sm font-medium flex items-center gap-2">
+ <Hash className="h-3 w-3" />
+ ID
+ </Label>
+ <Input
+ id="id"
+ value={formData.id || ""}
+ onChange={(e) => handleInputChange("id", e.target.value)}
+ className="h-9 bg-muted/50"
+ disabled
+ />
+ </div>
+ </div>
+ )
+
+ case 'additional-properties':
+ if (additionalFields.length === 0) return null
+ return (
+ <div className="space-y-4">
+ {additionalFields.map(([key, value]) => (
+ <div key={key} className="space-y-2">
+ <Label
+ htmlFor={key}
+ className="text-sm font-medium capitalize"
+ >
+ {key.replace(/_/g, ' ')}
+ </Label>
+ {isEditing ? (
+ typeof value === "boolean" ? (
+ <div className="flex items-center gap-2">
+ <Button
+ type="button"
+ variant={formData[key as keyof NodeData] ? "default" : "outline"}
+ size="sm"
+ onClick={() => handleInputChange(key as keyof NodeData, (!formData[key as keyof NodeData]).toString())}
+ className="gap-2"
+ >
+ {formData[key as keyof NodeData] ? (
+ <>
+ <Check className="h-3 w-3" />
+ True
+ </>
+ ) : (
+ "False"
+ )}
+ </Button>
+ </div>
+ ) : typeof value === "string" && value.length > 100 ? (
+ <Textarea
+ id={key}
+ value={formData[key as keyof NodeData] as string || ""}
+ onChange={(e) => handleInputChange(key as keyof NodeData, e.target.value)}
+ placeholder={`Enter ${key.replace(/_/g, ' ').toLowerCase()}`}
+ className="min-h-[80px] resize-none"
+ rows={3}
+ />
+ ) : (
+ <Input
+ id={key}
+ value={formData[key as keyof NodeData] as string || ""}
+ onChange={(e) => handleInputChange(key as keyof NodeData, e.target.value)}
+ placeholder={`Enter ${key.replace(/_/g, ' ').toLowerCase()}`}
+ className="h-9"
+ />
+ )
+ ) : (
+ <div className="h-9 px-3 py-2 text-sm bg-muted/30 border rounded-md flex items-center">
+ <span className="text-foreground">
+ {typeof value === "boolean"
+ ? (value ? "True" : "False")
+ : String(value || "No value")
+ }
+ </span>
+ </div>
+ )}
+ </div>
+ ))}
+ </div>
+ )
+
+ case 'preview':
+ return (
+ <div className="p-4 rounded-lg bg-background border">
+ <div className="flex items-center gap-3">
+ {currentNode.data.src ? (
+ <Avatar className="rounded-md h-14 w-14">
+ <AvatarImage className="rounded-none object-contain" src={currentNode.data.src} />
+ <AvatarFallback>{currentNode.data.label[0]}</AvatarFallback>
+ </Avatar>
+ ) : (
+ <IconComponent />
+ )}
+ <div className="flex-1">
+ <div className="font-medium text-sm">
+ {formData.label || "No label"}
+ </div>
+ <div className="text-xs text-muted-foreground">
+ {formData.type || "No type"} • {formData.caption || "No caption"}
+ </div>
+ </div>
+ </div>
+ </div>
+ )
+
+ case 'neighbors':
+ return <NeighborsGraph sketchId={sketchId as string} nodeId={currentNode.id as string} />
+
+ case 'location':
+ return (
+ <div className="overflow-hidden rounded-lg bg-background border">
+ {isLocation ? (
+ <MapFromAddress
+ locations={[
+ {
+ lat: formData.latitude,
+ lon: formData.longitude,
+ address: formData.label as string,
+ label: formData.label as string
+ }
+ ]}
+ />
+ ) : (
+ <div className="p-4 text-center text-muted-foreground">
+ <p>No location data available for this node.</p>
+ </div>
+ )}
+ </div>
+ )
+
+ default:
+ return null
+ }
+ }
+
return (
<Sheet open={openNodeEditorModal} onOpenChange={setOpenNodeEditorModal}>
<SheetContent className="!w-full !max-w-4xl h-full !duration-100 p-0 flex flex-col h-full">
@@ -122,198 +361,45 @@ export const NodeEditorModal: React.FC = () => {
{currentNode.data.type || "Unknown Type"}
</Badge>
</div>
-
</div>
</SheetHeader>
{/* Content */}
<div className="flex-1 px-6 py-6 grow overflow-y-auto">
- <div className="space-y-6 pb-6">
- {/* Description */}
- {currentNode.data.description && (
- <Card className="border bg-card/50">
- <CardHeader className="pb-4">
- <CardTitle className="text-base font-medium">
- Description
- </CardTitle>
- </CardHeader>
- <CardContent>
- <div
- className="text-sm text-muted-foreground prose prose-sm max-w-none"
- dangerouslySetInnerHTML={{ __html: currentNode.data.description }}
- />
- </CardContent>
- </Card>
- )}
+ <Reorder.Group
+ axis="y"
+ values={sortedCards.map(card => card.id)}
+ onReorder={handleLayoutReorder}
+ on
+ layoutScroll
+ className="space-y-6 pb-6"
+ >
+ {sortedCards.map((card) => {
+ const cardContent = renderCardContent(card.id)
+ if (!cardContent) return null
- {/* Core Properties Card */}
- <Card className="border bg-card/50">
- <CardHeader className="pb-4">
- <CardTitle className="flex items-center gap-2 text-base font-medium">
- <Tag className="h-4 w-4 text-muted-foreground" />
- Core Properties
- </CardTitle>
- </CardHeader>
- <CardContent className="space-y-4">
- <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
- <div className="space-y-2">
- <Label htmlFor="label" className="text-sm font-medium flex items-center gap-2">
- <FileText className="h-3 w-3" />
- Label
- </Label>
- <Input
- id="label"
- value={formData.label || ""}
- onChange={(e) => handleInputChange("label", e.target.value)}
- placeholder="Enter node label"
- className="h-9"
- />
- </div>
- <div className="space-y-2">
- <Label htmlFor="type" className="text-sm font-medium flex items-center gap-2">
- <Type className="h-3 w-3" />
- Type
- </Label>
- <Input
- id="type"
- value={formData.type || ""}
- onChange={(e) => handleInputChange("type", e.target.value)}
- placeholder="Enter node type"
- className="h-9"
- />
- </div>
- </div>
- <div className="space-y-2">
- <Label htmlFor="caption" className="text-sm font-medium flex items-center gap-2">
- <FileText className="h-3 w-3" />
- Caption
- </Label>
- <Input
- id="caption"
- value={formData.caption || ""}
- onChange={(e) => handleInputChange("caption", e.target.value)}
- placeholder="Enter node caption"
- className="h-9"
- />
- </div>
- <div className="space-y-2">
- <Label htmlFor="id" className="text-sm font-medium flex items-center gap-2">
- <Hash className="h-3 w-3" />
- ID
- </Label>
- <Input
- id="id"
- value={formData.id || ""}
- onChange={(e) => handleInputChange("id", e.target.value)}
- className="h-9 bg-muted/50"
- disabled
- />
- </div>
- </CardContent>
- </Card>
-
- {/* Additional Properties */}
- {additionalFields.length > 0 && (
- <Card className="border bg-card/50">
- <CardHeader className="pb-4">
- <CardTitle className="text-base font-medium">
- Additional Properties
- </CardTitle>
- <p className="text-sm text-muted-foreground">
- Custom properties for this node
- </p>
- </CardHeader>
- <CardContent>
- <div className="space-y-4">
- {additionalFields.map(([key, value]) => (
- <div key={key} className="space-y-2">
- <Label
- htmlFor={key}
- className="text-sm font-medium capitalize"
- >
- {key.replace(/_/g, ' ')}
- </Label>
- {typeof value === "boolean" ? (
- <div className="flex items-center gap-2">
- <Button
- type="button"
- variant={formData[key as keyof NodeData] ? "default" : "outline"}
- size="sm"
- onClick={() => handleInputChange(key as keyof NodeData, (!formData[key as keyof NodeData]).toString())}
- className="gap-2"
- >
- {formData[key as keyof NodeData] ? (
- <>
- <Check className="h-3 w-3" />
- True
- </>
- ) : (
- "False"
- )}
- </Button>
- </div>
- ) : typeof value === "string" && value.length > 100 ? (
- <Textarea
- id={key}
- value={formData[key as keyof NodeData] as string || ""}
- onChange={(e) => handleInputChange(key as keyof NodeData, e.target.value)}
- placeholder={`Enter ${key.replace(/_/g, ' ').toLowerCase()}`}
- className="min-h-[80px] resize-none"
- rows={3}
- />
- ) : (
- <Input
- id={key}
- value={formData[key as keyof NodeData] as string || ""}
- onChange={(e) => handleInputChange(key as keyof NodeData, e.target.value)}
- placeholder={`Enter ${key.replace(/_/g, ' ').toLowerCase()}`}
- className="h-9"
- />
- )}
- </div>
- ))}
- </div>
- </CardContent>
- </Card>
- )}
-
- {/* Node Preview */}
- <Card className="border bg-muted/30">
- <CardHeader className="pb-3">
- <CardTitle className="text-base font-medium">
- Preview
- </CardTitle>
- </CardHeader>
- <CardContent>
- <div className="p-4 rounded-lg bg-background border">
- <div className="flex items-center gap-3">
- <div className="w-3 h-3 rounded-full bg-primary/60"></div>
- <div className="flex-1">
- <div className="font-medium text-sm">
- {formData.label || "No label"}
- </div>
- <div className="text-xs text-muted-foreground">
- {formData.type || "No type"} • {formData.caption || "No caption"}
- </div>
- </div>
- </div>
- </div>
- </CardContent>
- </Card>
-
- {isLocation && <Card className="border bg-muted/30">
- <CardHeader className="pb-3">
- <CardTitle className="text-base font-medium">
- Location {formData.type === "location" ? <>({formData.label})</> : <>(lat:{formData.latitude} - lon:{formData.longitude})</>}
- </CardTitle>
- </CardHeader>
- <CardContent>
- <div className="overflow-hidden rounded-lg bg-background border">
- <MapFromAddress lat={formData.latitude} lon={formData.longitude} address={formData.label as string} />
- </div>
- </CardContent>
- </Card>}
- </div>
+ return (
+ <DraggableCard
+ key={card.id}
+ id={card.id}
+ title={card.id.replace(/-/g, ' ').replace(/\b\w/g, l => l.toUpperCase())}
+ isEditing={card.isEditing}
+ onToggleEdit={() => toggleCardEdit(card.id)}
+ showEditButton={card.id !== 'neighbors' && card.id !== 'location'}
+ description={
+ card.id === 'core-properties' ? 'Basic node information' :
+ card.id === 'additional-properties' ? 'Custom properties for this node' :
+ card.id === 'preview' ? 'How this node appears in the graph' :
+ card.id === 'neighbors' ? 'Connected nodes and relationships' :
+ card.id === 'location' ? 'Geographic location data' :
+ undefined
+ }
+ >
+ {cardContent}
+ </DraggableCard>
+ )
+ })}
+ </Reorder.Group>
</div>
{/* Footer */}
@@ -323,6 +409,13 @@ export const NodeEditorModal: React.FC = () => {
{additionalFields.length} additional properties
</div>
<div className="flex gap-2">
+ <Button
+ variant="outline"
+ onClick={resetLayout}
+ className="gap-2"
+ >
+ Reset Layout
+ </Button>
<Button
variant="outline"
onClick={handleCancel}
diff --git a/flowsint-app/src/renderer/src/components/graphs/toolbar.tsx b/flowsint-app/src/renderer/src/components/graphs/toolbar.tsx
index b7a7c318..5b7cb4d1 100644
--- a/flowsint-app/src/renderer/src/components/graphs/toolbar.tsx
+++ b/flowsint-app/src/renderer/src/components/graphs/toolbar.tsx
@@ -14,7 +14,8 @@ import {
GitPullRequestCreate,
GitFork,
Waypoints,
- Table
+ Table,
+ MapPin
} from "lucide-react"
import { memo, useCallback } from "react"
import { sketchService } from "@/api/sketch-service"
@@ -116,6 +117,10 @@ export const Toolbar = memo(function Toolbar({ isLoading }: { isLoading: boolean
setView("table")
}, [setView])
+ const handleMapLayout = useCallback(() => {
+ setView("map")
+ }, [setView])
+
const handleDagreLayoutTB = useCallback(() => {
setView("hierarchy")
onLayout && onLayout("dagre-tb")
@@ -190,6 +195,11 @@ export const Toolbar = memo(function Toolbar({ isLoading }: { isLoading: boolean
tooltip={"Table view"}
onClick={handleTableLayout}
/>
+ <ToolbarButton
+ icon={<MapPin className="h-4 w-4 opacity-70" />}
+ tooltip={"Map view"}
+ onClick={handleMapLayout}
+ />
{/* <ToolbarButton
icon={<Rotate3D className="h-4 w-4 opacity-70" />}
diff --git a/flowsint-app/src/renderer/src/components/graphs/use-force-graph-controls.ts b/flowsint-app/src/renderer/src/components/graphs/use-force-graph-controls.ts
new file mode 100644
index 00000000..18beb3e0
--- /dev/null
+++ b/flowsint-app/src/renderer/src/components/graphs/use-force-graph-controls.ts
@@ -0,0 +1,55 @@
+import { useCallback, useRef } from 'react';
+
+export interface ForceGraphControls {
+ zoomIn: () => void;
+ zoomOut: () => void;
+ zoomToFit: () => void;
+ resetZoom: () => void;
+}
+
+export const useForceGraphControls = () => {
+ const graphRef = useRef<any>();
+
+ const setGraphRef = useCallback((ref: any) => {
+ graphRef.current = ref;
+ }, []);
+
+ const zoomIn = useCallback(() => {
+ if (graphRef.current) {
+ const zoom = graphRef.current.zoom();
+ graphRef.current.zoom(zoom * 1.5);
+ }
+ }, []);
+
+ const zoomOut = useCallback(() => {
+ if (graphRef.current) {
+ const zoom = graphRef.current.zoom();
+ graphRef.current.zoom(zoom * 0.75);
+ }
+ }, []);
+
+ const zoomToFit = useCallback(() => {
+ if (graphRef.current) {
+ graphRef.current.zoomToFit(400);
+ }
+ }, []);
+
+ const resetZoom = useCallback(() => {
+ if (graphRef.current) {
+ graphRef.current.zoom(1);
+ graphRef.current.centerAt(0, 0);
+ }
+ }, []);
+
+ const controls: ForceGraphControls = {
+ zoomIn,
+ zoomOut,
+ zoomToFit,
+ resetZoom,
+ };
+
+ return {
+ controls,
+ setGraphRef,
+ };
+};
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/src/components/graphs/wall/custom/context-menu.tsx b/flowsint-app/src/renderer/src/components/graphs/wall/custom/context-menu.tsx
index 567058ae..7258aea8 100644
--- a/flowsint-app/src/renderer/src/components/graphs/wall/custom/context-menu.tsx
+++ b/flowsint-app/src/renderer/src/components/graphs/wall/custom/context-menu.tsx
@@ -152,7 +152,7 @@ export default function ContextMenu({
return (
<div
style={dynamicStyles}
- className="bg-background border border-border flex flex-col rounded-lg shadow-lg absolute z-50"
+ className="bg-background/90 backdrop-blur-sm border border-border flex flex-col rounded-lg shadow-lg absolute z-50"
onClick={handleMenuClick}
{...props}
>
diff --git a/flowsint-app/src/renderer/src/components/graphs/wall/custom/custom-node.tsx b/flowsint-app/src/renderer/src/components/graphs/wall/custom/custom-node.tsx
index 16ae8210..d971e24c 100644
--- a/flowsint-app/src/renderer/src/components/graphs/wall/custom/custom-node.tsx
+++ b/flowsint-app/src/renderer/src/components/graphs/wall/custom/custom-node.tsx
@@ -14,7 +14,7 @@ export const CustomNode = memo(({ data, selected, id }: NodeProps) => {
return (
- <div className="xy-node -z-[5000] relative p-1 group flex flex-col justify-center items-center !rounded-full h-20">
+ <div className="xy-node -z-[5000] relative p-1 flex flex-col justify-center items-center !rounded-full h-20">
<Handle type="target" position={Position.Top} id="a" className="opacity-0 group-hover:opacity-100" />
<Handle type="target" position={Position.Right} id="b" className="opacity-0 group-hover:opacity-100" />
<Handle type="source" position={Position.Bottom} id="c" className="opacity-0 group-hover:opacity-100" />
@@ -31,7 +31,7 @@ export const CustomNode = memo(({ data, selected, id }: NodeProps) => {
/>
</div>
<div
- className="text-nowrap text-center max-w-[60px] text-ellipsis truncate"
+ className="text-nowrap text-center max-w-[160px] text-ellipsis truncate"
style={{
fontSize: 11,
color: (selected || isCurrent(id)) ? "#f97316" : "#94a3b8",
diff --git a/flowsint-app/src/renderer/src/components/investigations/investigation-list.tsx b/flowsint-app/src/renderer/src/components/investigations/investigation-list.tsx
index 1284f245..e616e8e7 100644
--- a/flowsint-app/src/renderer/src/components/investigations/investigation-list.tsx
+++ b/flowsint-app/src/renderer/src/components/investigations/investigation-list.tsx
@@ -53,7 +53,7 @@ export const SketchListItem = ({ sketch, investigationId, refetch }: { sketch: S
>
{({ isActive }) => (
<div className={cn(
- "flex items-center gap-2 px-3 py-2",
+ "flex items-center group gap-2 px-3 py-2",
isActive ? "bg-muted" : "hover:bg-muted/50"
)}>
<Waypoints className="h-4 w-4 text-primary opacity-70" strokeWidth={1.5} />
@@ -61,7 +61,7 @@ export const SketchListItem = ({ sketch, investigationId, refetch }: { sketch: S
<DropdownMenu>
<DropdownMenuTrigger asChild>
<div>
- <Button variant="ghost" size="icon" className="h-6 w-6">
+ <Button variant="ghost" size="icon" className="h-6 w-6 group-hover:opacity-100 opacity-0 transition-all duration-100">
<MoreVertical className="h-4 w-4" />
</Button>
</div>
@@ -95,7 +95,7 @@ const InvestigationList = () => {
const query = searchQuery.toLowerCase().trim()
return data.filter((investigation) => {
const matchesInvestigation = investigation.name.toLowerCase().includes(query)
- const matchesSketches = investigation.sketches?.some(sketch =>
+ const matchesSketches = investigation.sketches?.some(sketch =>
sketch.title.toLowerCase().includes(query)
)
return matchesInvestigation || matchesSketches
@@ -147,7 +147,7 @@ const InvestigationList = () => {
<div className="overflow-auto">
{filteredInvestigations.map((investigation: Investigation) => (
<div key={investigation.id}>
- <div className="flex items-center gap-2 px-3 py-2 border-b">
+ <div className="flex items-center group gap-2 px-3 py-2 border-b">
<Link
to="/dashboard/investigations/$investigationId"
params={{
@@ -163,7 +163,7 @@ const InvestigationList = () => {
<DropdownMenu>
<DropdownMenuTrigger asChild>
<div>
- <Button variant="ghost" size="icon" className="h-6 w-6">
+ <Button variant="ghost" size="icon" className="h-6 w-6 group-hover:opacity-100 opacity-0 transition-all duration-100">
<MoreVertical className="h-4 w-4" />
</Button>
</div>
diff --git a/flowsint-app/src/renderer/src/components/layout/root.layout.tsx b/flowsint-app/src/renderer/src/components/layout/root.layout.tsx
index 81aa591b..d4f0c438 100644
--- a/flowsint-app/src/renderer/src/components/layout/root.layout.tsx
+++ b/flowsint-app/src/renderer/src/components/layout/root.layout.tsx
@@ -19,13 +19,13 @@ export default function RootLayout({ children }: LayoutProps) {
const isOpenConsole = useLayoutStore(s => s.isOpenConsole)
const toggleConsole = useLayoutStore(s => s.toggleConsole)
const isOpenPanel = useLayoutStore(s => s.isOpenPanel)
- const isOpenChat = useLayoutStore(s => s.isOpenChat)
+ const isOpenAnalysis = useLayoutStore(s => s.isOpenAnalysis)
const togglePanel = useLayoutStore(s => s.togglePanel)
const closePanel = useLayoutStore(s => s.closePanel)
const openPanel = useLayoutStore(s => s.openPanel)
- const toggleChat = useLayoutStore(s => s.toggleChat)
- const closeChat = useLayoutStore(s => s.closeChat)
- const openChat = useLayoutStore(s => s.openChat)
+ const toggleAnalysis = useLayoutStore(s => s.toggleAnalysis)
+ const closeAnalysis = useLayoutStore(s => s.closeAnalysis)
+ const openAnalysis = useLayoutStore(s => s.openAnalysis)
const { investigationId, type, id } = useParams({ strict: false })
@@ -33,7 +33,7 @@ export default function RootLayout({ children }: LayoutProps) {
useKeyboardShortcut({
key: "l",
ctrlOrCmd: true,
- callback: toggleChat
+ callback: toggleAnalysis
})
useKeyboardShortcut({
key: "b",
@@ -89,13 +89,13 @@ export default function RootLayout({ children }: LayoutProps) {
<SecondaryNavigation />
</div>
</ResizablePanel>
- <ResizableHandle withHandle />
+ <ResizableHandle />
</>
)}
<ResizablePanel className="h-full w-full" id="children" order={3}>
{children}
</ResizablePanel>
- {isOpenChat && type !== "analysis" && investigationId && (
+ {isOpenAnalysis && type !== "analysis" && investigationId && (
<>
<ResizableHandle withHandle />
<ResizablePanel
@@ -104,8 +104,8 @@ export default function RootLayout({ children }: LayoutProps) {
defaultSize={20}
minSize={16}
maxSize={40}
- onCollapse={closeChat}
- onExpand={openChat}
+ onCollapse={closeAnalysis}
+ onExpand={openAnalysis}
collapsible={true}
collapsedSize={2}
>
diff --git a/flowsint-app/src/renderer/src/components/layout/sidebar.tsx b/flowsint-app/src/renderer/src/components/layout/sidebar.tsx
index b944a48b..e92971de 100644
--- a/flowsint-app/src/renderer/src/components/layout/sidebar.tsx
+++ b/flowsint-app/src/renderer/src/components/layout/sidebar.tsx
@@ -26,17 +26,17 @@ export function Sidebar() {
const isOpenPanel = useLayoutStore(s => s.isOpenPanel)
const navItems: NavItem[] = [
- { icon: Home, label: "Dashboard", href: "/dashboard" },
+ { icon: Home, label: "Dashboard", href: "/dashboard/" },
{ icon: Fingerprint, label: "Cases", href: "/dashboard/investigations" },
// { icon: BrickWall, label: "Walls", href: "/dashboard/investigations/wall" },
{ icon: Workflow, label: "Transforms", href: "/dashboard/transforms" },
]
const commonClasses =
- "flex items-center justify-center h-14 w-full rounded-sm hover:bg-muted"
+ "flex items-center justify-center h-12 w-full rounded-sm hover:bg-muted"
return (
- <div className="w-16 border-r h-full flex flex-col shrink-0 bg-card">
+ <div className="w-14 border-r h-full flex flex-col shrink-0 bg-card">
<div className="flex flex-col items-center gap-1 p-2">
{navItems.map((item, index) => {
const IconComponent = item.icon
@@ -50,7 +50,7 @@ export function Sidebar() {
<Link
to={item.href}
className={commonClasses}
- activeProps={{ className: `${commonClasses} bg-muted` }}
+ activeProps={{ className: `${commonClasses}` }}
>
{content}
</Link>
diff --git a/flowsint-app/src/renderer/src/components/map/map-panel.tsx b/flowsint-app/src/renderer/src/components/map/map-panel.tsx
new file mode 100644
index 00000000..c24fc987
--- /dev/null
+++ b/flowsint-app/src/renderer/src/components/map/map-panel.tsx
@@ -0,0 +1,17 @@
+import { useGraphStore } from '@/stores/graph-store'
+import { MapFromAddress } from './map'
+import { LocationPoint } from './map'
+const MapPanel = () => {
+ const nodes = useGraphStore(state => state.nodes)
+ const locationNodes = nodes.filter(node => node.data.type === 'location' || node.data.latitude && node.data.longitude).map(node => ({
+ lat: node.data.latitude || 0,
+ lon: node.data.longitude || 0,
+ address: node.data.address || '',
+ label: node.data.label || ''
+ }))
+ return (
+ <div className='w-full grow h-full z-10'><MapFromAddress locations={locationNodes as LocationPoint[]} /></div>
+ )
+}
+
+export default MapPanel
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/src/components/map/map.tsx b/flowsint-app/src/renderer/src/components/map/map.tsx
new file mode 100644
index 00000000..499e4644
--- /dev/null
+++ b/flowsint-app/src/renderer/src/components/map/map.tsx
@@ -0,0 +1,158 @@
+import React from "react";
+import { useQuery } from "@tanstack/react-query";
+import L from "leaflet";
+import "leaflet/dist/leaflet.css";
+import { useTheme } from "../theme-provider";
+
+export type LocationPoint = {
+ lat?: number;
+ lon?: number;
+ address?: string;
+ label?: string;
+};
+
+type MapFromAddressProps = {
+ locations: LocationPoint[];
+ height?: string;
+ zoom?: number;
+ centerOnFirst?: boolean;
+};
+
+export const MapFromAddress: React.FC<MapFromAddressProps> = ({
+ locations,
+ height = "400px",
+ zoom = 15,
+ centerOnFirst = true,
+}) => {
+ // Get locations that need geocoding
+ const locationsToGeocode = locations.filter(loc => loc.lat === undefined && loc.lon === undefined && loc.address);
+ const { theme } = useTheme()
+ // Single query for all geocoding
+ const geocodeQuery = useQuery({
+ queryKey: ["geocode", locationsToGeocode.map(loc => loc.address)],
+ queryFn: async () => {
+ const results: ({ lat: number; lon: number } | null)[] = [];
+ for (const location of locationsToGeocode) {
+ if (!location.address) continue;
+
+ const res = await fetch(
+ `https://nominatim.openstreetmap.org/search?format=json&q=${encodeURIComponent(location.address)}`
+ );
+ const json = await res.json();
+ if (!json || json.length === 0) {
+ results.push(null);
+ } else {
+ results.push({
+ lat: parseFloat(json[0].lat),
+ lon: parseFloat(json[0].lon),
+ });
+ }
+ }
+ return results;
+ },
+ enabled: locationsToGeocode.length > 0,
+ });
+
+ // Combine all locations with their coordinates
+ const processedLocations = locations.map((location) => {
+ // If location already has coordinates
+ if (location.lat !== undefined && location.lon !== undefined) {
+ return {
+ ...location,
+ coordinates: { lat: location.lat, lon: location.lon },
+ isLoading: false,
+ isError: false,
+ };
+ }
+
+ // If location needs geocoding
+ const geocodeIndex = locationsToGeocode.findIndex(loc => loc.address === location.address);
+ if (geocodeIndex !== -1 && geocodeQuery.data) {
+ const geocoded = geocodeQuery.data[geocodeIndex];
+ return {
+ ...location,
+ coordinates: geocoded,
+ isLoading: geocodeQuery.isLoading,
+ isError: geocodeQuery.isError,
+ };
+ }
+
+ // Fallback for locations without address
+ return {
+ ...location,
+ coordinates: null,
+ isLoading: geocodeQuery.isLoading,
+ isError: geocodeQuery.isError,
+ };
+ });
+
+ // Get valid coordinates for map bounds
+ const validCoordinates = processedLocations
+ .filter(location => location.coordinates)
+ .map(location => location.coordinates!);
+
+ const mapId = `leaflet-map-${btoa(JSON.stringify(locations)).replace(/[^a-zA-Z0-9]/g, "")}`;
+
+ React.useEffect(() => {
+ if (validCoordinates.length === 0) return;
+
+ const map = L.map(mapId);
+
+ const source = theme === 'dark' ? 'alidade_smooth_dark' : 'alidade_smooth'
+ L.tileLayer("https://tiles.stadiamaps.com/tiles/{source}/{z}/{x}/{y}.{ext}", {
+ // attribution: '&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> &copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
+ ext: 'png',
+ source: source
+ }).addTo(map);
+
+ // Add markers for each location
+ const markers: L.Marker[] = [];
+ processedLocations.forEach((location) => {
+ if (!location.coordinates) return;
+
+ const marker = L.marker([location.coordinates.lat, location.coordinates.lon]).addTo(map);
+
+ // Create popup text
+ const popupText = location.label ||
+ location.address ||
+ `${location.coordinates.lat.toFixed(6)}, ${location.coordinates.lon.toFixed(6)}`;
+
+ marker.bindPopup(popupText);
+ markers.push(marker);
+ });
+
+ // Set map view
+ if (centerOnFirst && validCoordinates.length > 0) {
+ // Center on first coordinate
+ map.setView([validCoordinates[0].lat, validCoordinates[0].lon], zoom);
+ } else if (validCoordinates.length > 1) {
+ // Fit bounds to include all markers
+ const group = new L.featureGroup(markers);
+ map.fitBounds(group.getBounds().pad(0.1));
+ } else if (validCoordinates.length === 1) {
+ // Single point
+ map.setView([validCoordinates[0].lat, validCoordinates[0].lon], zoom);
+ }
+
+ return () => {
+ map.remove(); // cleanup
+ };
+ }, [validCoordinates, mapId, zoom, centerOnFirst, theme]);
+
+ // Show loading if geocoding is in progress
+ if (geocodeQuery.isLoading) {
+ return <div className="p-3"><p>Loading map…</p></div>;
+ }
+
+ // Show error if geocoding failed
+ if (geocodeQuery.isError) {
+ return <div className="p-3"><p>Could not find some addresses.</p></div>;
+ }
+
+ // Don't render if we don't have any valid coordinates
+ if (validCoordinates.length === 0) {
+ return <div className="p-3"><p>No valid coordinates provided.</p></div>;
+ }
+
+ return <div id={mapId} style={{ minHeight: height, height: '100%', width: '100%' }} />;
+};
diff --git a/flowsint-app/src/renderer/src/components/table/columns.tsx b/flowsint-app/src/renderer/src/components/table/columns.tsx
index 3679b901..d79a94aa 100644
--- a/flowsint-app/src/renderer/src/components/table/columns.tsx
+++ b/flowsint-app/src/renderer/src/components/table/columns.tsx
@@ -301,7 +301,7 @@ export const columns: ColumnDef<GraphNode>[] = [
},
accessorKey: "data.confidence",
cell: ({ row }) => {
- const confidence = 85 // row.original.data.confidence || 85
+ const confidence = row.original.data.confidence || 85
const color = getConfidenceColor(confidence)
return (
@@ -462,8 +462,8 @@ export const columns: ColumnDef<GraphNode>[] = [
return (
<div className={`text-left font-medium text-xs ${isProduction
- ? 'text-red-600 dark:text-red-400'
- : 'text-emerald-600 dark:text-emerald-400'
+ ? 'text-red-600 dark:text-red-400'
+ : 'text-emerald-600 dark:text-emerald-400'
}`}>
{env}
</div>
@@ -476,12 +476,12 @@ export const columns: ColumnDef<GraphNode>[] = [
minSize: 50,
maxSize: 50,
enableResizing: false,
- header: ({ column }) => {
+ header: () => {
return (
<div className="w-[50]"></div>
)
},
- cell: ({ row }) => {
+ cell: () => {
return (
<div className="flex items-center justify-center w-full h-full">
<DropdownMenu>
diff --git a/flowsint-app/src/renderer/src/components/table/data-table.tsx b/flowsint-app/src/renderer/src/components/table/data-table.tsx
index 8a088a43..1ccce291 100644
--- a/flowsint-app/src/renderer/src/components/table/data-table.tsx
+++ b/flowsint-app/src/renderer/src/components/table/data-table.tsx
@@ -316,7 +316,7 @@ export function DataTable<TData, TValue>({
</tr>
))}
</thead>
- <MemoizedTableBody
+ <TableBody
table={table}
tableContainerRef={tableContainerRef}
columnSizeVars={columnSizeVars}
diff --git a/flowsint-app/src/renderer/src/components/transforms/new-transform.tsx b/flowsint-app/src/renderer/src/components/transforms/new-transform.tsx
index 92a1028a..bd54cc46 100644
--- a/flowsint-app/src/renderer/src/components/transforms/new-transform.tsx
+++ b/flowsint-app/src/renderer/src/components/transforms/new-transform.tsx
@@ -1,6 +1,5 @@
import { transformService } from '@/api/transfrom-service'
import { useCallback, ReactNode, cloneElement, isValidElement } from 'react'
-import { Button } from '../ui/button'
import { toast } from 'sonner'
import { useNavigate } from '@tanstack/react-router'
import { useTransformStore } from '@/stores/transform-store'
diff --git a/flowsint-app/src/renderer/src/components/ui/avatar.tsx b/flowsint-app/src/renderer/src/components/ui/avatar.tsx
index 3c678119..52dadb5b 100644
--- a/flowsint-app/src/renderer/src/components/ui/avatar.tsx
+++ b/flowsint-app/src/renderer/src/components/ui/avatar.tsx
@@ -49,5 +49,5 @@ function AvatarFallback({
/>
)
}
-
export { Avatar, AvatarImage, AvatarFallback }
+
diff --git a/flowsint-app/src/renderer/src/components/ui/sheet.tsx b/flowsint-app/src/renderer/src/components/ui/sheet.tsx
index 6906f5b2..d1e4ed10 100644
--- a/flowsint-app/src/renderer/src/components/ui/sheet.tsx
+++ b/flowsint-app/src/renderer/src/components/ui/sheet.tsx
@@ -34,7 +34,7 @@ function SheetOverlay({
<SheetPrimitive.Overlay
data-slot="sheet-overlay"
className={cn(
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/10",
className
)}
{...props}
diff --git a/flowsint-app/src/renderer/src/hooks/use-action-items.ts b/flowsint-app/src/renderer/src/hooks/use-action-items.ts
index 7d9e7d92..6daff845 100644
--- a/flowsint-app/src/renderer/src/hooks/use-action-items.ts
+++ b/flowsint-app/src/renderer/src/hooks/use-action-items.ts
@@ -6,8 +6,6 @@ export const useActionItems = () => {
const { data: actionItems, isLoading } = useQuery<ActionItem[]>({
queryKey: ["actionItems"],
queryFn: () => sketchService.types(),
- staleTime: 5 * 60 * 1000, // 5 minutes - data is considered fresh for 5 minutes
- gcTime: 10 * 60 * 1000, // 10 minutes - keep in cache for 10 minutes
refetchOnWindowFocus: false, // Prevent refetch on window focus
refetchOnMount: false, // Prevent refetch on component mount if data exists
})
diff --git a/flowsint-app/src/renderer/src/hooks/use-chat.ts b/flowsint-app/src/renderer/src/hooks/use-chat.ts
index 18a1cd8a..fb4b496c 100644
--- a/flowsint-app/src/renderer/src/hooks/use-chat.ts
+++ b/flowsint-app/src/renderer/src/hooks/use-chat.ts
@@ -1,7 +1,7 @@
import { useState } from 'react'
-import { useMutation } from '@tanstack/react-query'
+import { useMutation, useQueryClient, useQuery } from '@tanstack/react-query'
import { toast } from 'sonner'
-import { chatService } from '@/api/chat.service'
+import { chatService, chatCRUDService } from '@/api/chat-service'
import { marked } from 'marked';
import { generateJSON } from '@tiptap/core'
import { StarterKit } from '@tiptap/starter-kit'
@@ -16,6 +16,8 @@ import { CodeBlockLowlight } from '@tiptap/extension-code-block-lowlight'
import { Color } from '@tiptap/extension-color'
import type { Editor } from '@tiptap/react'
import { useGraphStore } from '@/stores/graph-store';
+import { useChatState } from '@/stores/use-chat-store';
+import { useParams } from '@tanstack/react-router'
const markdownToHtml = (markdown: string) => {
return marked(markdown, {
@@ -33,15 +35,69 @@ interface UseChatOptions {
export const useChat = ({ onContentUpdate, onSuccess, editor }: UseChatOptions) => {
const [isAiLoading, setIsAiLoading] = useState(false)
- const [promptOpen, setPromptOpen] = useState(true)
const [customPrompt, setCustomPrompt] = useState("")
const selectedNodes = useGraphStore(s => s.selectedNodes)
+ const currentChatId = useChatState(s => s.currentChatId)
+ const setCurrentChatId = useChatState(s => s.setCurrentChatId)
+ const deleteChat = useChatState(s => s.deleteChat)
+ const addMessage = useChatState(s => s.addMessage)
+ const { investigationId } = useParams({ strict: false })
+ const queryClient = useQueryClient()
+
+ // Fetch current chat data with messages
+ const { data: currentChat, isLoading: isLoadingChat } = useQuery({
+ queryKey: ['chat', currentChatId],
+ queryFn: () => chatCRUDService.getById(currentChatId!),
+ enabled: !!currentChatId,
+ refetchOnWindowFocus: false,
+ })
+
+ // Mutation to create a new chat
+ const createChatMutation = useMutation({
+ mutationFn: async ({ title, description }: { title: string, description?: string }) => {
+ const chatData = {
+ title,
+ description: description || '',
+ investigation_id: investigationId
+ }
+ return await chatCRUDService.create(JSON.stringify(chatData))
+ },
+ onSuccess: (data) => {
+ // Add the new chat to the store
+ // Invalidate chats query to refresh the list
+ queryClient.invalidateQueries({ queryKey: ['chat', currentChatId] })
+ setCurrentChatId(data.id)
+ toast.success("New chat created successfully!")
+ },
+ onError: (error) => {
+ console.error("Error creating chat:", error)
+ toast.error("Failed to create chat: " + (error instanceof Error ? error.message : "Unknown error"))
+ }
+ })
+
+ // Mutation to delete a chat
+ const deleteChatMutation = useMutation({
+ mutationFn: async (chatId: string) => {
+ deleteChat(chatId)
+ return await chatCRUDService.delete(chatId)
+ },
+ onSuccess: () => {
+ // Remove the chat from the store
+ // Invalidate chats query to refresh the list
+ queryClient.invalidateQueries({ queryKey: ['chats'] })
+ toast.success("Chat deleted successfully!")
+ },
+ onError: (error) => {
+ console.error("Error deleting chat:", error)
+ toast.error("Failed to delete chat: " + (error instanceof Error ? error.message : "Unknown error"))
+ }
+ })
const aiCompletionMutation = useMutation({
- mutationFn: async (prompt: string) => {
+ mutationFn: async ({ chatId, prompt }: { chatId: string, prompt: string }) => {
setIsAiLoading(true)
try {
- return await chatService.streamChat(prompt, (content) => {
+ return await chatService.streamChat(chatId, prompt, (content) => {
const htmlContent = markdownToHtml(content);
const extensions = [
StarterKit.configure({
@@ -73,9 +129,9 @@ export const useChat = ({ onContentUpdate, onSuccess, editor }: UseChatOptions)
onContentUpdate(jsonContent)
} else {
// Otherwise, use the callback
- onContentUpdate(jsonContent)
+ onContentUpdate(content)
}
- })
+ }, selectedNodes)
} catch (error) {
console.error("Error in chat stream:", error)
throw error
@@ -85,7 +141,11 @@ export const useChat = ({ onContentUpdate, onSuccess, editor }: UseChatOptions)
},
onSuccess: () => {
onSuccess?.()
- // toast.success("AI completion added!")
+ // Invalidate the current chat query to refresh messages
+ if (currentChatId) {
+ onContentUpdate("")
+ queryClient.invalidateQueries({ queryKey: ['chat', currentChatId] })
+ }
},
onError: (error) => {
console.error("Chat error:", error)
@@ -93,26 +153,85 @@ export const useChat = ({ onContentUpdate, onSuccess, editor }: UseChatOptions)
}
})
- const handleCustomPrompt = async (currentContent: any) => {
+ const handleCustomPrompt = async () => {
+ // Case where no chat is created - create a new chat first
+ if (!currentChatId) {
+ const chatTitle = selectedNodes.length > 0
+ ? `${selectedNodes.map(node => node.data.label).join(", ").slice(0, 100)}`
+ : "New Chat"
+
+ try {
+ const newChat = await createChatMutation.mutateAsync({
+ title: chatTitle,
+ description: "Chat created from analysis"
+ })
+ // After creating the chat, proceed with the prompt
+ if (newChat?.id) {
+ await handlePromptWithChat(newChat.id)
+ }
+ } catch (error) {
+ console.error("Failed to create chat:", error)
+ return
+ }
+ } else {
+ addMessage({ content: customPrompt.trim(), context: selectedNodes.map(node => node.data.label), is_bot: false, id: new Date().getTime().toString(), created_at: new Date().toISOString(), chatId: currentChatId })
+ await handlePromptWithChat(currentChatId)
+ }
+ }
+
+ const handlePromptWithChat = async (chatId: string) => {
if (!customPrompt.trim()) {
toast.error("Please enter a prompt")
return
}
- const content = typeof currentContent === 'string' ? currentContent : JSON.stringify(currentContent)
- const nodeLabel = selectedNodes.map(node => node.data.label).join(", ")
- const context = selectedNodes ? `Tu te mets dans la peau d'un analyste CTI/OSINT. Dans tes éléments de réponse, n'indique pas que tu es un analyste CTI/OSINT, juste la réponse. Aujourd'hui, voici ton cas: ${nodeLabel}\n\nContext:\n${content}` : content
- const fullPrompt = `${customPrompt}\n\nContext:\n${context}`
- setPromptOpen(false)
+ const fullPrompt = `${customPrompt}`
setCustomPrompt("")
- aiCompletionMutation.mutate(fullPrompt)
+ aiCompletionMutation.mutate({ chatId, prompt: fullPrompt })
+ }
+
+ const createNewChat = async (title?: string) => {
+ const chatTitle = title || (selectedNodes.length > 0
+ ? `${selectedNodes[0].data.label}`
+ : "New Chat #" + Math.floor(Math.random() * 900) + 1000)
+
+ try {
+ await createChatMutation.mutateAsync({
+ title: chatTitle,
+ description: "Chat created from analysis"
+ })
+ } catch (error) {
+ console.error("Failed to create new chat:", error)
+ }
+ }
+
+ const deleteCurrentChat = async () => {
+ if (!currentChatId) {
+ toast.error("No chat to delete")
+ return
+ }
+ try {
+ await deleteChatMutation.mutateAsync(currentChatId)
+ } catch (error) {
+ console.error("Failed to delete chat:", error)
+ }
+ }
+
+ const switchToChat = (chatId: string) => {
+ setCurrentChatId(chatId)
}
return {
isAiLoading,
- promptOpen,
- setPromptOpen,
customPrompt,
setCustomPrompt,
- handleCustomPrompt
+ handleCustomPrompt,
+ createChatMutation,
+ deleteChatMutation,
+ currentChat,
+ isLoadingChat,
+ createNewChat,
+ deleteCurrentChat,
+ switchToChat,
+ currentChatId
}
}
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/src/lib/action-items.ts b/flowsint-app/src/renderer/src/lib/action-items.ts
index 9206c1f6..712fef29 100644
--- a/flowsint-app/src/renderer/src/lib/action-items.ts
+++ b/flowsint-app/src/renderer/src/lib/action-items.ts
@@ -29,526 +29,6 @@ export interface ActionItem {
children?: ActionItem[]
}
-const countries = [
- { label: "France", value: "france" },
- { label: "United States", value: "usa" },
- { label: "United Kingdom", value: "uk" },
- { label: "Germany", value: "germany" },
- { label: "Japan", value: "japan" },
- { label: "Canada", value: "canada" },
- { label: "Australia", value: "australia" },
-]
-export const actionItems: ActionItem[] = [
- {
- id: 100,
- type: "person",
- key: "person",
- icon: "individual",
- label: "Person",
- label_key: "name",
- fields: [],
- children: [
- {
- id: 1,
- type: "Individual",
- key: "individual",
- label_key: "full_name",
- icon: "individual",
- label: "Individual",
- fields: [{ name: "first_name", label: "Firstname", type: "text", required: true },
- { name: "last_name", label: "Lastname", type: "text", required: true },
- { name: "birth_date", label: "Birth date", type: "date", required: false },
- {
- name: "gender",
- label: "Gender",
- type: "select",
- required: false,
- options: [
- { label: "Male", value: "male" },
- { label: "Female", value: "female" },
- { label: "Non-binary", value: "non-binary" },
- { label: "Prefer not to say", value: "not_specified" },
- ],
- },
- ],
- size: "h-7 w-7",
- },
- {
- id: 512932,
- type: "Username",
- key: "username",
- icon: "username",
- label: "Username",
- label_key: "username",
- fields: [{ name: "username", label: "Username", type: "text", required: true }],
- size: "h-5 w-5",
- },
- ],
- },
- {
- id: 101,
- type: "organization",
- key: "organization_category",
- icon: "organization",
- label: "Organization",
- label_key: "name",
- fields: [],
- children: [
- {
- id: 24,
- type: "Organization",
- key: "organization",
- icon: "organization",
- label: "Organization",
- label_key: "name",
- fields: [
- { name: "name", label: "Name", type: "text", required: true },
- { name: "founding_date", label: "Founding date", type: "date", required: false },
- {
- name: "country",
- label: "Country",
- type: "select",
- required: false,
- options: countries,
- },
- {
- name: "metadata",
- label: "Metadata",
- type: "metadata",
- required: false,
- description: "Add additional information under the format key:value"
- }
- ],
- size: "h-8 w-8",
- },
- ],
- },
- {
- id: 102,
- type: "contact",
- key: "contact",
- icon: "phone",
- label: "Contact",
- label_key: "value",
- fields: [],
- children: [
- {
- id: 2,
- type: "Phone",
- key: "phone",
- label_key: "number",
- icon: "phone",
- label: "Phone number",
- fields: [{ name: "number", label: "Phone number", type: "tel", required: true },
- {
- name: "country",
- label: "Country",
- type: "select",
- required: false,
- options: countries,
- },
- { name: "carrier", label: "Carrier", type: "text", required: false }
- ],
- size: "h-5 w-5",
- },
- {
- id: 4,
- type: "Email",
- key: "email",
- icon: "email",
- label_key: "email",
- label: "Email address",
- fields: [{ name: "email", label: "Email", type: "email", required: true }],
- size: "h-5 w-5",
- },
- ],
- },
- {
- id: 103,
- type: "digital",
- key: "digital",
- icon: "website",
- label: "Digital",
- label_key: "value",
- fields: [],
- children: [
- {
- id: 25,
- type: "Website",
- key: "website",
- label_key: "url",
- icon: "website",
- label: "Website",
- fields: [
- { name: "url", label: "URL", type: "url", required: true },
- { name: "registration_date", label: "Registration date", type: "date", required: false },
- { name: "registrar", label: "Registrar", type: "text", required: false },
- { name: "address", label: "IP address", type: "text", required: false },
- ],
- size: "h-5 w-5",
- },
- {
- id: 259,
- type: "Domain",
- key: "domain",
- icon: "domain",
- label_key: "domain",
- label: "Domain",
- fields: [{ name: "domain", label: "Domain", type: "text", required: true }],
- size: "h-5 w-5",
- },
- {
- id: 2588,
- type: "Subdomain",
- key: "subdomain",
- label_key: "subomain",
- icon: "subdomain",
- label: "Subdomain",
- fields: [{ name: "subomain", label: "subdomain", type: "text", required: true }, { name: "root", label: "root domain", type: "text", required: true }],
- size: "h-5 w-5",
- },
- {
- id: 5,
- type: "Ip",
- key: "ip",
- icon: "ip",
- label: "IP address",
- label_key: "address",
- fields: [{ name: "address", label: "IP address", type: "text", required: true }],
- size: "h-5 w-5",
- },
- ],
- },
- {
- id: 104,
- type: "finance",
- key: "finance",
- icon: "cryptowallet",
- label: "Finance",
- label_key: "value",
- fields: [],
- children: [
- {
- id: 215,
- type: "CryptoWallet",
- key: "wallet",
- label_key: "wallet",
- icon: "cryptowallet",
- label: "Crypto wallet",
- fields: [
- { name: "wallet", label: "Wallet", type: "text", required: true },
- {
- name: "type",
- label: "Wallet type",
- type: "select",
- required: true,
- options: [
- { label: "ETH", value: "eth" },
- { label: "BTC", value: "btc" },
- { label: "TRC", value: "trc" },],
- },
- ],
- size: "h-5 w-5",
- },
- ],
- },
- {
- id: 105,
- type: "location",
- key: "location",
- icon: "location",
- label: "Location",
- label_key: "address",
- fields: [],
- children: [
- {
- id: 3,
- type: "Location",
- label_key: "address",
- key: "address",
- icon: "location",
- label: "Physical address",
- fields: [
- { name: "address", label: "Address", type: "text", required: true },
- { name: "city", label: "City", type: "text", required: true },
- { name: "country", label: "Country", type: "text", required: true },
- { name: "zip", label: "ZIP/Postal code", type: "text", required: false },
- { name: "latitude", label: "Latitude", type: "text", required: false },
- { name: "longitude", label: "Longitude", type: "text", required: false },
- ],
- size: "h-5 w-5",
- },
- ],
- },
- {
- id: 6,
- type: "Socials",
- size: "h-5 w-5",
- key: "social_profile",
- icon: "social_profile",
- label: "Social account",
- label_key: "username",
- fields: [],
- children: [
- {
- id: 7,
- type: "SocialProfile",
- key: "social_profiles_facebook",
- label_key: "username",
- icon: "facebook",
- color: "#0765FF",
- label: "Facebook",
- fields: [
- { name: "profile_url", label: "Profile URL", type: "url", required: true },
- { name: "username", label: "Username", type: "text", required: false },
- { name: "platform", label: "Platform", type: "hidden", required: true },
- ],
- size: "h-5 w-5",
- },
- {
- id: 8,
- type: "SocialProfile",
- key: "social_profiles_instagram",
- label_key: "username",
- icon: "instagram",
- color: "#FE0979",
- label: "Instagram",
- fields: [
- { name: "profile_url", label: "Profile URL", type: "url", required: true },
- { name: "username", label: "Username", type: "text", required: false },
- { name: "platform", label: "Platform", type: "hidden", required: true },
- ],
- size: "h-5 w-5",
- },
- {
- id: 9,
- type: "SocialProfile",
- key: "social_profiles_telegram",
- label_key: "username",
- icon: "telegram",
- color: "#32A9DF",
- label: "Telegram",
- fields: [
- { name: "profile_url", label: "Profile URL", type: "url", required: true },
- { name: "username", label: "Username", type: "text", required: false },
- { name: "platform", label: "Platform", type: "hidden", required: true },
- ],
- size: "h-5 w-5",
- },
- {
- id: 10,
- type: "SocialProfile",
- key: "social_profiles_signal",
- label_key: "username",
- icon: "signal",
- color: "#3976F0",
- label: "Signal",
- fields: [
- { name: "profile_url", label: "Profile URL", type: "url", required: true },
- { name: "username", label: "Username", type: "text", required: false },
- { name: "platform", label: "Platform", type: "hidden", required: true },
- ],
- size: "h-5 w-5",
- },
- {
- id: 11,
- type: "SocialProfile",
- key: "social_profiles_snapchat",
- label_key: "username",
- color: "#FEFC00",
- icon: "snapchat",
- label: "Snapchat",
- fields: [
- { name: "profile_url", label: "Profile URL", type: "url", required: true },
- { name: "username", label: "Username", type: "text", required: false },
- { name: "platform", label: "Platform", type: "hidden", required: true },
- ],
- size: "h-5 w-5",
- },
- {
- id: 12,
- type: "SocialProfile",
- key: "social_profiles_github",
- label_key: "username",
- color: "#B8B8BD",
- icon: "github",
- label: "Github",
- fields: [
- { name: "profile_url", label: "Profile URL", type: "url", required: false },
- { name: "username", label: "Username", type: "text", required: true },
- { name: "platform", label: "Platform", type: "hidden", required: true },
- ],
- size: "h-5 w-5",
- },
- {
- id: 18,
- type: "SocialProfile",
- key: "social_profiles_linkedin",
- label_key: "username",
- color: "#007EBB",
- icon: "linkedin",
- label: "LinkedIn",
- fields: [
- { name: "profile_url", label: "Profile URL", type: "url", required: true },
- { name: "username", label: "Username", type: "text", required: false },
- { name: "platform", label: "Platform", type: "hidden", required: true },
- ],
- size: "h-5 w-5",
- },
- {
- id: 19,
- type: "SocialProfile",
- key: "social_profiles_twitter",
- label_key: "username",
- icon: "x",
- color: "#1C9BEF",
- label: "X (Twitter)",
- fields: [
- { name: "profile_url", label: "Profile URL", type: "url", required: true },
- { name: "username", label: "Username", type: "text", required: false },
- { name: "platform", label: "Platform", type: "hidden", required: true },
- ],
- size: "h-5 w-5",
- },
- {
- id: 20,
- type: "SocialProfile",
- key: "social_profiles_tiktok",
- label_key: "username",
- color: "#6C2B53",
- icon: "tiktok",
- label: "TikTok",
- fields: [
- { name: "profile_url", label: "Profile URL", type: "url", required: true },
- { name: "username", label: "Username", type: "text", required: false },
- { name: "platform", label: "Platform", type: "hidden", required: true },
- ],
- size: "h-5 w-5",
- },
- {
- id: 21,
- type: "SocialProfile",
- key: "social_profiles_reddit",
- label_key: "username",
- icon: "reddit",
- color: "#FF5701",
- label: "Reddit",
- fields: [
- { name: "profile_url", label: "Profile URL", type: "url", required: true },
- { name: "username", label: "Username", type: "text", required: false },
- { name: "platform", label: "Platform", type: "hidden", required: true },
- ],
- size: "h-5 w-5",
- },
- {
- id: 22,
- type: "SocialProfile",
- key: "social_profiles_discord",
- label_key: "username",
- icon: "discord",
- color: "#5765F2",
- label: "Discord",
- fields: [
- { name: "profile_url", label: "Profile URL", type: "url", required: true },
- { name: "username", label: "Username", type: "text", required: false },
- { name: "platform", label: "Platform", type: "hidden", required: true },
- ],
- size: "h-5 w-5",
- },
- {
- id: 2343,
- type: "SocialProfile",
- key: "social_profiles_twitch",
- label_key: "username",
- icon: "twitch",
- color: "#9046FF",
- label: "Twitch",
- fields: [
- { name: "profile_url", label: "Profile URL", type: "url", required: true },
- { name: "username", label: "Username", type: "text", required: false },
- { name: "platform", label: "Platform", type: "hidden", required: true },
- ],
- size: "h-5 w-5",
- },
- ],
- },
- {
- id: 14,
- type: "Vehicle",
- icon: "car",
- label: "Vehicle",
- label_key: "plate",
- key: "vehicle",
- fields: [],
- children: [
- {
- id: 15,
- type: "Car",
- key: "vehicles_car",
- icon: "car",
- label: "Car",
- label_key: "plate",
- fields: [
- { name: "plate", label: "License plate", type: "text", required: true },
- { name: "model", label: "Model", type: "text", required: false },
- { name: "brand", label: "Brand", type: "text", required: false },
- { name: "year", label: "Year", type: "number", required: false },
- { name: "type", label: "Type", type: "hidden", required: true },
- ],
- size: "h-5 w-5",
- },
- {
- id: 16,
- type: "motorcycle",
- key: "vehicles_motorcycle",
- label_key: "plate",
- icon: "motorcycle",
- label: "Motorcycle",
- fields: [
- { name: "plate", label: "License plate", type: "text", required: true },
- { name: "model", label: "Model", type: "text", required: false },
- { name: "brand", label: "Brand", type: "text", required: false },
- { name: "year", label: "Year", type: "number", required: false },
- { name: "type", label: "Type", type: "hidden", required: true },
- ],
- size: "h-5 w-5",
- },
- {
- id: 17,
- type: "boat",
- key: "vehicles_boat",
- label_key: "plate",
- icon: "boat",
- label: "Boat",
- fields: [
- { name: "plate", label: "Registration number", type: "text", required: true },
- { name: "model", label: "Model", type: "text", required: false },
- { name: "brand", label: "Brand", type: "text", required: false },
- { name: "year", label: "Year", type: "number", required: false },
- { name: "type", label: "Type", type: "hidden", required: true },
- ],
- size: "h-5 w-5",
- },
- {
- id: 23,
- type: "plane",
- key: "vehicles_aircraft",
- icon: "plane",
- label_key: "plate",
- label: "Aircraft",
- fields: [
- { name: "registration", label: "Registration", type: "text", required: true },
- { name: "model", label: "Model", type: "text", required: false },
- { name: "manufacturer", label: "Manufacturer", type: "text", required: false },
- { name: "year", label: "Year", type: "number", required: false },
- { name: "type", label: "Type", type: "hidden", required: true },
- ],
- size: "h-5 w-5",
- },
- ],
- },
-]
-
export function findActionItemByKey(key: string, actionItems: ActionItem[] | undefined): ActionItem | undefined {
if (!actionItems) return
for (const item of actionItems) {
diff --git a/flowsint-app/src/renderer/src/lib/utils.ts b/flowsint-app/src/renderer/src/lib/utils.ts
index 71f89255..6cd40364 100644
--- a/flowsint-app/src/renderer/src/lib/utils.ts
+++ b/flowsint-app/src/renderer/src/lib/utils.ts
@@ -1,8 +1,7 @@
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"
import Dagre from '@dagrejs/dagre';
-import { actionItems } from "./action-items"
-import type { ActionItem, FormField } from "./action-items"
+
import { type Edge, Position, type Node } from '@xyflow/react';
import * as d3 from "d3-force"
@@ -254,40 +253,6 @@ export const formatFileSize = (bytes: number) => {
}
-function convertFieldToSimpleFormat(field: FormField): string {
- if ((field.type === "hidden" && field.name === "platform") || field.name === "type") {
- const defaultValue = field.options?.[0]?.value || ""
- if (defaultValue) {
- return `${field.name}:${defaultValue}`
- }
- }
- return field.name
-}
-
-export function generateNodeTypes() {
- const nodeTypes: Record<string, { type: string; fields: string[] }> = {}
-
- function processItems(items: ActionItem[]) {
- items.forEach((item) => {
- if (!item.disabled) {
- nodeTypes[item.key] = {
- type: item.type,
- fields: item.fields.map(convertFieldToSimpleFormat),
- }
- }
-
- // Traiter les enfants récursivement
- if (item.children && item.children.length > 0) {
- processItems(item.children)
- }
- })
- }
-
- processItems(actionItems)
- return nodeTypes
-}
-
-export const nodesTypes = generateNodeTypes()
export const getInitials = (name: string) => {
return name
diff --git a/flowsint-app/src/renderer/src/main.tsx b/flowsint-app/src/renderer/src/main.tsx
index e183739d..5982f86a 100644
--- a/flowsint-app/src/renderer/src/main.tsx
+++ b/flowsint-app/src/renderer/src/main.tsx
@@ -1,15 +1,17 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import { RouterProvider, createRouter } from '@tanstack/react-router'
+import { createHashHistory } from '@tanstack/react-router'
import { Provider as TanStackQueryProvider, getContext as getQueryContext } from '@/integrations/tanstack-query/root-provider'
import { routeTree } from './routeTree.gen'
import './styles.css'
import { ThemeProvider } from '@/components/theme-provider'
-// const hashHistory = createHashHistory()
+
+const hashHistory = createHashHistory()
const router = createRouter({
routeTree,
- // history: hashHistory,
+ history: hashHistory,
context: {
...getQueryContext(),
},
diff --git a/flowsint-app/src/renderer/src/routes/_auth.dashboard.tsx b/flowsint-app/src/renderer/src/routes/_auth.dashboard.tsx
index 066e107f..bce29382 100644
--- a/flowsint-app/src/renderer/src/routes/_auth.dashboard.tsx
+++ b/flowsint-app/src/renderer/src/routes/_auth.dashboard.tsx
@@ -1,3 +1,4 @@
+import FloatingChat from '@/components/chat/floating-chat'
import RootLayout from '@/components/layout/root.layout'
import { createFileRoute, Outlet } from '@tanstack/react-router'
@@ -9,6 +10,7 @@ function DashboardPage() {
return (
<RootLayout>
<Outlet />
+ <FloatingChat />
</RootLayout>
)
}
diff --git a/flowsint-app/src/renderer/src/routes/_auth.dashboard.vault.tsx b/flowsint-app/src/renderer/src/routes/_auth.dashboard.vault.tsx
index f587c5c6..d6401f44 100644
--- a/flowsint-app/src/renderer/src/routes/_auth.dashboard.vault.tsx
+++ b/flowsint-app/src/renderer/src/routes/_auth.dashboard.vault.tsx
@@ -228,7 +228,7 @@ function VaultPage() {
{getStatusIcon(service)}
</TableCell>
<TableCell>
- <div className="flex flex-col gap-1">
+ <div className="flex gap-1">
<div className="font-medium">{service.service}</div>
{!service.active && (
<Badge variant="outline" className="w-fit text-orange-600 border-orange-200 dark:text-orange-400 dark:border-orange-800 text-xs">
diff --git a/flowsint-app/src/renderer/src/stores/graph-controls-store.ts b/flowsint-app/src/renderer/src/stores/graph-controls-store.ts
index d1bed1ec..013c2dbf 100644
--- a/flowsint-app/src/renderer/src/stores/graph-controls-store.ts
+++ b/flowsint-app/src/renderer/src/stores/graph-controls-store.ts
@@ -2,14 +2,14 @@ import { create } from 'zustand';
import { persist } from 'zustand/middleware';
type GraphControlsStore = {
- view: 'force' | 'hierarchy' | 'table';
+ view: 'force' | 'hierarchy' | 'table' | 'map';
zoomToFit: () => void;
zoomIn: () => void;
zoomOut: () => void;
onLayout: (layout: any) => void;
setActions: (actions: Partial<GraphControlsStore>) => void;
refetchGraph: () => void;
- setView: (view: 'force' | 'hierarchy' | 'table') => void;
+ setView: (view: 'force' | 'hierarchy' | 'table' | 'map') => void;
};
export const useGraphControls = create<GraphControlsStore>()(
diff --git a/flowsint-app/src/renderer/src/stores/layout-store.ts b/flowsint-app/src/renderer/src/stores/layout-store.ts
index 47354488..65f9a726 100644
--- a/flowsint-app/src/renderer/src/stores/layout-store.ts
+++ b/flowsint-app/src/renderer/src/stores/layout-store.ts
@@ -1,35 +1,65 @@
import { create } from 'zustand'
+import { persist } from 'zustand/middleware'
interface LayoutStore {
isOpenConsole: boolean
isOpenPanel: boolean
isOpenChat: boolean
+ isOpenAnalysis: boolean
+ chatWidth: number
+ chatHeight: number
toggleConsole: () => void
togglePanel: () => void
toggleChat: () => void
+ toggleAnalysis: () => void
closePanel: () => void
openPanel: () => void
closeChat: () => void
openChat: () => void
+ openAnalysis: () => void
+ closeAnalysis: () => void
+ setChatDimensions: (width: number, height: number) => void
activeTab: string
activeTransformTab: string
setActiveTab: (tab: "entities" | "items" | string) => void
setActiveTransformTab: (tab: "transforms" | "items" | string) => void
}
-export const useLayoutStore = create<LayoutStore>((set) => ({
- isOpenConsole: false,
- isOpenPanel: true,
- isOpenChat: false,
- activeTab: "entities",
- activeTransformTab: "transforms",
- toggleConsole: () => set((state) => ({ isOpenConsole: !state.isOpenConsole })),
- togglePanel: () => set((state) => ({ isOpenPanel: !state.isOpenPanel })),
- toggleChat: () => set((state) => ({ isOpenChat: !state.isOpenChat })),
- closePanel: () => set({ isOpenPanel: false }),
- openPanel: () => set({ isOpenPanel: true }),
- closeChat: () => set({ isOpenChat: false }),
- openChat: () => set({ isOpenChat: true }),
- setActiveTab: (tab: string) => set({ activeTab: tab }),
- setActiveTransformTab: (tab: string) => set({ activeTransformTab: tab }),
-}))
+export const useLayoutStore = create<LayoutStore>()(
+ persist(
+ (set) => ({
+ isOpenConsole: false,
+ isOpenPanel: true,
+ isOpenChat: false,
+ isOpenAnalysis: false,
+ chatWidth: 500,
+ chatHeight: 600,
+ activeTab: "entities",
+ activeTransformTab: "transforms",
+ toggleConsole: () => set((state) => ({ isOpenConsole: !state.isOpenConsole })),
+ togglePanel: () => set((state) => ({ isOpenPanel: !state.isOpenPanel })),
+ toggleChat: () => set((state) => ({ isOpenChat: !state.isOpenChat })),
+ toggleAnalysis: () => set((state) => ({ isOpenAnalysis: !state.isOpenAnalysis })),
+ closePanel: () => set({ isOpenPanel: false }),
+ openPanel: () => set({ isOpenPanel: true }),
+ closeChat: () => set({ isOpenChat: false }),
+ openChat: () => set({ isOpenChat: true }),
+ closeAnalysis: () => set({ isOpenAnalysis: false }),
+ openAnalysis: () => set({ isOpenAnalysis: true }),
+ setChatDimensions: (width: number, height: number) => set({ chatWidth: width, chatHeight: height }),
+ setActiveTab: (tab: string) => set({ activeTab: tab }),
+ setActiveTransformTab: (tab: string) => set({ activeTransformTab: tab }),
+ }),
+ {
+ name: 'layout-storage',
+ partialize: (state) => ({
+ isOpenPanel: state.isOpenPanel,
+ isOpenAnalysis: state.isOpenAnalysis,
+ chatWidth: state.chatWidth,
+ chatHeight: state.chatHeight,
+ activeTab: state.activeTab,
+ activeTransformTab: state.activeTransformTab,
+ }),
+ }
+ )
+)
diff --git a/flowsint-app/src/renderer/src/stores/node-editor-layout-store.ts b/flowsint-app/src/renderer/src/stores/node-editor-layout-store.ts
new file mode 100644
index 00000000..0598be4c
--- /dev/null
+++ b/flowsint-app/src/renderer/src/stores/node-editor-layout-store.ts
@@ -0,0 +1,55 @@
+import { create } from 'zustand'
+import { persist } from 'zustand/middleware'
+
+export type CardType = 'description' | 'core-properties' | 'additional-properties' | 'preview' | 'neighbors' | 'location'
+
+interface CardState {
+ id: CardType
+ isEditing: boolean
+ order: number
+}
+
+interface NodeEditorLayoutState {
+ cardLayout: CardState[]
+ setCardLayout: (layout: CardState[]) => void
+ toggleCardEdit: (cardId: CardType) => void
+ setCardEditState: (cardId: CardType, isEditing: boolean) => void
+ resetLayout: () => void
+}
+
+const defaultCardLayout: CardState[] = [
+ { id: 'description', isEditing: false, order: 0 },
+ { id: 'core-properties', isEditing: false, order: 1 },
+ { id: 'additional-properties', isEditing: false, order: 2 },
+ { id: 'preview', isEditing: false, order: 3 },
+ { id: 'neighbors', isEditing: false, order: 4 },
+ { id: 'location', isEditing: false, order: 5 },
+]
+
+export const useNodeEditorLayoutStore = create<NodeEditorLayoutState>()(
+ persist(
+ (set, get) => ({
+ cardLayout: defaultCardLayout,
+ setCardLayout: (layout) => set({ cardLayout: layout }),
+ toggleCardEdit: (cardId) => {
+ const { cardLayout } = get()
+ const updatedLayout = cardLayout.map(card =>
+ card.id === cardId ? { ...card, isEditing: !card.isEditing } : card
+ )
+ set({ cardLayout: updatedLayout })
+ },
+ setCardEditState: (cardId, isEditing) => {
+ const { cardLayout } = get()
+ const updatedLayout = cardLayout.map(card =>
+ card.id === cardId ? { ...card, isEditing } : card
+ )
+ set({ cardLayout: updatedLayout })
+ },
+ resetLayout: () => set({ cardLayout: defaultCardLayout }),
+ }),
+ {
+ name: 'node-editor-layout-storage',
+ partialize: (state) => ({ cardLayout: state.cardLayout }),
+ }
+ )
+)
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/src/stores/use-chat-store.tsx b/flowsint-app/src/renderer/src/stores/use-chat-store.tsx
new file mode 100644
index 00000000..12d84b3d
--- /dev/null
+++ b/flowsint-app/src/renderer/src/stores/use-chat-store.tsx
@@ -0,0 +1,36 @@
+import { ChatMessage } from '@/types'
+import { create } from 'zustand'
+import { persist } from 'zustand/middleware'
+
+
+interface ChatState {
+ currentChatId: string | null
+ setCurrentChatId: (chatId: string | null) => void
+ messages: ChatMessage[]
+ setMessages: (messages: ChatMessage[]) => void
+ addMessage: (message: ChatMessage) => void
+ deleteChat: (chatId: string) => void
+}
+
+export const useChatState = create<ChatState>()(
+ persist(
+ (set, _) => ({
+ currentChatId: null,
+ messages: [],
+ setCurrentChatId: (chatId) => set({ currentChatId: chatId }),
+ setMessages: (messages) => set({ messages: messages }),
+ addMessage: (message) => set((state) => ({
+ messages: [...state.messages, { ...message, chatId: message.chatId || state.currentChatId || undefined }]
+ })),
+ deleteChat: (chatId) => set((state) => ({
+ currentChatId: state.currentChatId === chatId ? null : state.currentChatId
+ }))
+ }),
+ {
+ name: 'chat-state-storage',
+ partialize: (state) => ({
+ currentChatId: state.currentChatId,
+ }),
+ }
+ )
+)
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/src/styles.css b/flowsint-app/src/renderer/src/styles.css
index e286b087..08281465 100644
--- a/flowsint-app/src/renderer/src/styles.css
+++ b/flowsint-app/src/renderer/src/styles.css
@@ -4,14 +4,12 @@
@custom-variant dark (&:is(.dark *));
-@theme {
- --font-family-oxanium: 'Oxanium', sans-serif;
-}
+
body {
@apply m-0;
font-family:
- 'Oxanium', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
+ -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
@@ -44,7 +42,6 @@ html {
@layer base {
:root {
- --font-oxanium: 'Oxanium', sans-serif;
--sidebar-background: hsl(0, 0%, 98%);
--sidebar-foreground: hsl(240, 5.3%, 26.1%);
--sidebar-primary: hsl(240, 5.9%, 10%);
@@ -812,7 +809,7 @@ html {
body {
@apply m-0;
font-family:
- 'Oxanium', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
+ -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
@@ -861,24 +858,216 @@ th,
flex-grow: 1;
height: 100%;
}
-
+
.simple-floatingedges .react-flow__handle {
width: 8px;
height: 8px;
}
-
+
.simple-floatingedges .react-flow__handle-top {
top: -15px;
}
-
+
.simple-floatingedges .react-flow__handle-bottom {
bottom: -15px;
}
-
+
.simple-floatingedges .react-flow__handle-left {
left: -15px;
}
-
+
.simple-floatingedges .react-flow__handle-right {
right: -15px;
+}
+
+.hide-scrollbar {
+
+ /* Webkit browsers (Chrome, Safari, Edge) */
+ -webkit-scrollbar {
+ display: none;
+ }
+
+ /* Firefox */
+ scrollbar-width: none;
+
+ /* IE and Edge */
+ -ms-overflow-style: none;
+}
+
+/* Floating Chat Animation */
+@keyframes slideInFromBottomRight {
+ 0% {
+ opacity: 0;
+ transform: translate(100%, 100%) scale(0.8);
+ }
+
+ 100% {
+ opacity: 1;
+ transform: translate(0, 0) scale(1);
+ }
+}
+
+.floating-chat-animation {
+ animation: slideInFromBottomRight 0.3s ease-out forwards;
+ transform-origin: bottom right;
+}
+
+:root {
+ --background: oklch(0.9940 0 0);
+ --foreground: oklch(0 0 0);
+ --card: oklch(0.9940 0 0);
+ --card-foreground: oklch(0 0 0);
+ --popover: oklch(0.9911 0 0);
+ --popover-foreground: oklch(0 0 0);
+ --primary: oklch(0.7686 0.1647 70.0804);
+ --primary-foreground: oklch(1.0000 0 0);
+ --secondary: oklch(0.9540 0.0063 255.4755);
+ --secondary-foreground: oklch(0.1344 0 0);
+ --muted: oklch(0.9702 0 0);
+ --muted-foreground: oklch(0.4386 0 0);
+ --accent: oklch(0.9393 0.0288 266.3680);
+ --accent-foreground: oklch(0.5445 0.1903 259.4848);
+ --destructive: oklch(0.6290 0.1902 23.0704);
+ --destructive-foreground: oklch(1.0000 0 0);
+ --border: oklch(0.9300 0.0094 286.2156);
+ --input: oklch(0.9401 0 0);
+ --ring: oklch(0 0 0);
+ --chart-1: oklch(0.7459 0.1483 156.4499);
+ --chart-2: oklch(0.5393 0.2713 286.7462);
+ --chart-3: oklch(0.7336 0.1758 50.5517);
+ --chart-4: oklch(0.5828 0.1809 259.7276);
+ --chart-5: oklch(0.5590 0 0);
+ --sidebar: oklch(0.9777 0.0051 247.8763);
+ --sidebar-foreground: oklch(0 0 0);
+ --sidebar-primary: oklch(0 0 0);
+ --sidebar-primary-foreground: oklch(1.0000 0 0);
+ --sidebar-accent: oklch(0.9401 0 0);
+ --sidebar-accent-foreground: oklch(0 0 0);
+ --sidebar-border: oklch(0.9401 0 0);
+ --sidebar-ring: oklch(0 0 0);
+ --font-sans: Plus Jakarta Sans, sans-serif;
+ --font-serif: Lora, serif;
+ --font-mono: IBM Plex Mono, monospace;
+ --radius: 1rem;
+ --shadow-2xs: 0px 2px 3px 0px hsl(0 0% 0% / 0.08);
+ --shadow-xs: 0px 2px 3px 0px hsl(0 0% 0% / 0.08);
+ --shadow-sm: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 1px 2px -1px hsl(0 0% 0% / 0.16);
+ --shadow: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 1px 2px -1px hsl(0 0% 0% / 0.16);
+ --shadow-md: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 2px 4px -1px hsl(0 0% 0% / 0.16);
+ --shadow-lg: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 4px 6px -1px hsl(0 0% 0% / 0.16);
+ --shadow-xl: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 8px 10px -1px hsl(0 0% 0% / 0.16);
+ --shadow-2xl: 0px 2px 3px 0px hsl(0 0% 0% / 0.40);
+ --tracking-normal: -0.025em;
+ --spacing: 0.27rem;
+}
+
+.dark {
+ --background: oklch(0.2223 0.0060 271.1393);
+ --foreground: oklch(0.9551 0 0);
+ --card: oklch(0.22 0.0060 271.1393);
+ --card-foreground: oklch(0.9551 0 0);
+ --popover: oklch(0.2568 0.0076 274.6528);
+ --popover-foreground: oklch(0.9551 0 0);
+ --primary: oklch(0.7686 0.1647 70.0804);
+ --primary-foreground: oklch(1.0000 0 0);
+ --secondary: oklch(0.2940 0.0130 272.9312);
+ --secondary-foreground: oklch(0.9551 0 0);
+ --muted: oklch(0.2940 0.0130 272.9312);
+ --muted-foreground: oklch(0.7058 0 0);
+ --accent: oklch(0.2795 0.0368 260.0310);
+ --accent-foreground: oklch(0.7857 0.1153 246.6596);
+ --destructive: oklch(0.7106 0.1661 22.2162);
+ --destructive-foreground: oklch(1.0000 0 0);
+ --border: oklch(0.3289 0.0092 268.3843);
+ --input: oklch(0.3289 0.0092 268.3843);
+ --ring: oklch(0.6132 0.2294 291.7437);
+ --chart-1: oklch(0.8003 0.1821 151.7110);
+ --chart-2: oklch(0.6132 0.2294 291.7437);
+ --chart-3: oklch(0.8077 0.1035 19.5706);
+ --chart-4: oklch(0.6691 0.1569 260.1063);
+ --chart-5: oklch(0.7058 0 0);
+ --sidebar: oklch(0.2011 0.0039 286.0396);
+ --sidebar-foreground: oklch(0.9551 0 0);
+ --sidebar-primary: oklch(0.6132 0.2294 291.7437);
+ --sidebar-primary-foreground: oklch(1.0000 0 0);
+ --sidebar-accent: oklch(0.2940 0.0130 272.9312);
+ --sidebar-accent-foreground: oklch(0.6132 0.2294 291.7437);
+ --sidebar-border: oklch(0.3289 0.0092 268.3843);
+ --sidebar-ring: oklch(0.6132 0.2294 291.7437);
+ --font-sans: Plus Jakarta Sans, sans-serif;
+ --font-serif: Lora, serif;
+ --font-mono: IBM Plex Mono, monospace;
+ --radius: 1em;
+ --shadow-2xs: 0px 2px 3px 0px hsl(0 0% 0% / 0.08);
+ --shadow-xs: 0px 2px 3px 0px hsl(0 0% 0% / 0.08);
+ --shadow-sm: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 1px 2px -1px hsl(0 0% 0% / 0.16);
+ --shadow: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 1px 2px -1px hsl(0 0% 0% / 0.16);
+ --shadow-md: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 2px 4px -1px hsl(0 0% 0% / 0.16);
+ --shadow-lg: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 4px 6px -1px hsl(0 0% 0% / 0.16);
+ --shadow-xl: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 8px 10px -1px hsl(0 0% 0% / 0.16);
+ --shadow-2xl: 0px 2px 3px 0px hsl(0 0% 0% / 0.40);
+}
+
+@theme inline {
+ --color-background: var(--background);
+ --color-foreground: var(--foreground);
+ --color-card: var(--card);
+ --color-card-foreground: var(--card-foreground);
+ --color-popover: var(--popover);
+ --color-popover-foreground: var(--popover-foreground);
+ --color-primary: var(--primary);
+ --color-primary-foreground: var(--primary-foreground);
+ --color-secondary: var(--secondary);
+ --color-secondary-foreground: var(--secondary-foreground);
+ --color-muted: var(--muted);
+ --color-muted-foreground: var(--muted-foreground);
+ --color-accent: var(--accent);
+ --color-accent-foreground: var(--accent-foreground);
+ --color-destructive: var(--destructive);
+ --color-destructive-foreground: var(--destructive-foreground);
+ --color-border: var(--border);
+ --color-input: var(--input);
+ --color-ring: var(--ring);
+ --color-chart-1: var(--chart-1);
+ --color-chart-2: var(--chart-2);
+ --color-chart-3: var(--chart-3);
+ --color-chart-4: var(--chart-4);
+ --color-chart-5: var(--chart-5);
+ --color-sidebar: var(--sidebar);
+ --color-sidebar-foreground: var(--sidebar-foreground);
+ --color-sidebar-primary: var(--sidebar-primary);
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
+ --color-sidebar-accent: var(--sidebar-accent);
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
+ --color-sidebar-border: var(--sidebar-border);
+ --color-sidebar-ring: var(--sidebar-ring);
+
+ --font-sans: var(--font-sans);
+ --font-mono: var(--font-mono);
+ --font-serif: var(--font-serif);
+
+ --radius-sm: calc(var(--radius) - 4px);
+ --radius-md: calc(var(--radius) - 2px);
+ --radius-lg: var(--radius);
+ --radius-xl: calc(var(--radius) + 4px);
+
+ --shadow-2xs: var(--shadow-2xs);
+ --shadow-xs: var(--shadow-xs);
+ --shadow-sm: var(--shadow-sm);
+ --shadow: var(--shadow);
+ --shadow-md: var(--shadow-md);
+ --shadow-lg: var(--shadow-lg);
+ --shadow-xl: var(--shadow-xl);
+ --shadow-2xl: var(--shadow-2xl);
+
+ --tracking-tighter: calc(var(--tracking-normal) - 0.05em);
+ --tracking-tight: calc(var(--tracking-normal) - 0.025em);
+ --tracking-normal: var(--tracking-normal);
+ --tracking-wide: calc(var(--tracking-normal) + 0.025em);
+ --tracking-wider: calc(var(--tracking-normal) + 0.05em);
+ --tracking-widest: calc(var(--tracking-normal) + 0.1em);
+}
+
+body {
+ letter-spacing: var(--tracking-normal);
}
\ No newline at end of file
diff --git a/flowsint-app/src/renderer/src/types/index.ts b/flowsint-app/src/renderer/src/types/index.ts
index 41ec66e5..e6b98cec 100644
--- a/flowsint-app/src/renderer/src/types/index.ts
+++ b/flowsint-app/src/renderer/src/types/index.ts
@@ -125,4 +125,21 @@ export type Event = {
type: EventLevel
payload: Payload
created_at: string
-}
\ No newline at end of file
+}
+
+export interface ChatMessage {
+ id: string,
+ content: string,
+ is_bot: boolean,
+ created_at: string,
+ context?: any,
+ chatId?: string
+}
+
+export interface Chat {
+ id: string,
+ title: string,
+ description: string,
+ created_at: string,
+ last_updated_at: string,
+}
diff --git a/flowsint-app/yarn.lock b/flowsint-app/yarn.lock
index 1920ef36..12c2d34f 100644
--- a/flowsint-app/yarn.lock
+++ b/flowsint-app/yarn.lock
@@ -257,7 +257,7 @@
"@babel/plugin-transform-modules-commonjs" "^7.27.1"
"@babel/plugin-transform-typescript" "^7.27.1"
-"@babel/runtime@^7.17.8", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.7":
+"@babel/runtime@^7.17.8", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.7":
version "7.27.6"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.27.6.tgz#ec4070a04d76bae8ddbb10770ba55714a417b7c6"
integrity sha512-vbavdySgbTTrmFE+EsiqUTzlOr5bzlnJtUv9PynGCAKvfQqjIXbvFdumPM/GxMDfyuGMJaJAU6TO4zc1Jf1i8Q==
@@ -2453,14 +2453,21 @@
"@types/d3-interpolate" "*"
"@types/d3-selection" "*"
-"@types/debug@^4.1.6":
+"@types/debug@^4.0.0", "@types/debug@^4.1.6":
version "4.1.12"
resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.12.tgz#a155f21690871953410df4b6b6f53187f0500917"
integrity sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==
dependencies:
"@types/ms" "*"
+"@types/estree-jsx@^1.0.0":
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/@types/estree-jsx/-/estree-jsx-1.0.5.tgz#858a88ea20f34fe65111f005a689fa1ebf70dc18"
+ integrity sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==
+ dependencies:
+ "@types/estree" "*"
+
+"@types/estree@*", "@types/[email protected]", "@types/estree@^1.0.0":
version "1.0.8"
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.8.tgz#958b91c991b1867ced318bedea0e215ee050726e"
integrity sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==
@@ -2472,6 +2479,13 @@
dependencies:
"@types/node" "*"
+"@types/hast@^2.0.0":
+ version "2.3.10"
+ resolved "https://registry.yarnpkg.com/@types/hast/-/hast-2.3.10.tgz#5c9d9e0b304bbb8879b857225c5ebab2d81d7643"
+ integrity sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==
+ dependencies:
+ "@types/unist" "^2"
+
"@types/hast@^3.0.0":
version "3.0.4"
resolved "https://registry.yarnpkg.com/@types/hast/-/hast-3.0.4.tgz#1d6b39993b82cea6ad783945b0508c25903e15aa"
@@ -2504,6 +2518,13 @@
"@types/linkify-it" "^5"
"@types/mdurl" "^2"
+"@types/mdast@^4.0.0":
+ version "4.0.4"
+ resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-4.0.4.tgz#7ccf72edd2f1aa7dd3437e180c64373585804dd6"
+ integrity sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==
+ dependencies:
+ "@types/unist" "*"
+
"@types/mdurl@^2":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@types/mdurl/-/mdurl-2.0.0.tgz#d43878b5b20222682163ae6f897b20447233bdfd"
@@ -2573,11 +2594,16 @@
dependencies:
"@types/node" "*"
-"@types/unist@*":
+"@types/unist@*", "@types/unist@^3.0.0":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-3.0.3.tgz#acaab0f919ce69cce629c2d4ed2eb4adc1b6c20c"
integrity sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==
+"@types/unist@^2", "@types/unist@^2.0.0":
+ version "2.0.11"
+ resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.11.tgz#11af57b127e32487774841f7a4e54eab166d03c4"
+ integrity sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==
+
"@types/use-sync-external-store@^0.0.6":
version "0.0.6"
resolved "https://registry.yarnpkg.com/@types/use-sync-external-store/-/use-sync-external-store-0.0.6.tgz#60be8d21baab8c305132eb9cb912ed497852aadc"
@@ -2683,7 +2709,7 @@
"@typescript-eslint/types" "7.18.0"
eslint-visitor-keys "^3.4.3"
-"@ungap/structured-clone@^1.2.0":
+"@ungap/structured-clone@^1.0.0", "@ungap/structured-clone@^1.2.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.3.0.tgz#d06bbb384ebcf6c505fde1c3d0ed4ddffe0aaff8"
integrity sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==
@@ -3061,6 +3087,11 @@ babel-dead-code-elimination@^1.0.10:
"@babel/traverse" "^7.23.7"
"@babel/types" "^7.23.6"
+bail@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/bail/-/bail-2.0.2.tgz#d26f5cd8fe5d6f832a31517b9f7c356040ba6d5d"
+ integrity sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==
+
balanced-match@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
@@ -3266,6 +3297,11 @@ canvas-color-tracker@^1.3:
dependencies:
tinycolor2 "^1.6.0"
+ccount@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/ccount/-/ccount-2.0.1.tgz#17a3bf82302e0870d6da43a01311a8bc02a3ecf5"
+ integrity sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==
+
chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
@@ -3274,6 +3310,41 @@ chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2:
ansi-styles "^4.1.0"
supports-color "^7.1.0"
+character-entities-html4@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/character-entities-html4/-/character-entities-html4-2.1.0.tgz#1f1adb940c971a4b22ba39ddca6b618dc6e56b2b"
+ integrity sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==
+
+character-entities-legacy@^1.0.0:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz#94bc1845dce70a5bb9d2ecc748725661293d8fc1"
+ integrity sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==
+
+character-entities-legacy@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz#76bc83a90738901d7bc223a9e93759fdd560125b"
+ integrity sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==
+
+character-entities@^1.0.0:
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-1.2.4.tgz#e12c3939b7eaf4e5b15e7ad4c5e28e1d48c5b16b"
+ integrity sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==
+
+character-entities@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-2.0.2.tgz#2d09c2e72cd9523076ccb21157dff66ad43fcc22"
+ integrity sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==
+
+character-reference-invalid@^1.0.0:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz#083329cda0eae272ab3dbbf37e9a382c13af1560"
+ integrity sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==
+
+character-reference-invalid@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz#85c66b041e43b47210faf401278abf808ac45cb9"
+ integrity sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==
+
chokidar@^3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b"
@@ -3401,6 +3472,16 @@ combined-stream@^1.0.8:
dependencies:
delayed-stream "~1.0.0"
+comma-separated-tokens@^1.0.0:
+ version "1.0.8"
+ resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz#632b80b6117867a158f1080ad498b2fbe7e3f5ea"
+ integrity sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==
+
+comma-separated-tokens@^2.0.0:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz#4e89c9458acb61bc8fef19f4529973b2392839ee"
+ integrity sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==
+
commander@^5.0.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae"
@@ -3713,7 +3794,7 @@ debounce-fn@^6.0.0:
dependencies:
mimic-function "^5.0.0"
-debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4:
+debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4:
version "4.4.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.1.tgz#e5a8bc6cbc4c6cd3e64308b0693a3d4fa550189b"
integrity sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==
@@ -3725,6 +3806,13 @@ decimal.js-light@^2.4.1:
resolved "https://registry.yarnpkg.com/decimal.js-light/-/decimal.js-light-2.5.1.tgz#134fd32508f19e208f4fb2f8dac0d2626a867934"
integrity sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==
+decode-named-character-reference@^1.0.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/decode-named-character-reference/-/decode-named-character-reference-1.2.0.tgz#25c32ae6dd5e21889549d40f676030e9514cc0ed"
+ integrity sha512-c6fcElNV6ShtZXmsgNgFFV5tVX2PaV4g+MOAkb8eXHvn6sryJBrZa9r0zV6+dtTyoCKxtDy5tyQ5ZwQuidtd+Q==
+ dependencies:
+ character-entities "^2.0.0"
+
decompress-response@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc"
@@ -3792,7 +3880,7 @@ detect-node@^2.0.4:
resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1"
integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==
-devlop@^1.0.0:
+devlop@^1.0.0, devlop@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/devlop/-/devlop-1.1.0.tgz#4db7c2ca4dc6e0e834c30be70c94bbc976dc7018"
integrity sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==
@@ -4394,6 +4482,11 @@ estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0:
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123"
integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==
+estree-util-is-identifier-name@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/estree-util-is-identifier-name/-/estree-util-is-identifier-name-3.0.0.tgz#0b5ef4c4ff13508b34dcd01ecfa945f61fce5dbd"
+ integrity sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==
+
estree-walker@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac"
@@ -4419,6 +4512,11 @@ exponential-backoff@^3.1.1:
resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.2.tgz#a8f26adb96bf78e8cd8ad1037928d5e5c0679d91"
integrity sha512-8QxYTVXUkuy7fIIoitQkPwGonB8F3Zj8eEO8Sqg9Zv/bkI7RJAzowee4gr81Hak/dUTpA2Z7VfQgoijjPNlUZA==
+extend@^3.0.0:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
+ integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==
+
extract-zip@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a"
@@ -4483,6 +4581,13 @@ fastq@^1.6.0:
dependencies:
reusify "^1.0.4"
+fault@^1.0.0:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/fault/-/fault-1.0.4.tgz#eafcfc0a6d214fc94601e170df29954a4f842f13"
+ integrity sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==
+ dependencies:
+ format "^0.2.0"
+
fd-slicer@~1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e"
@@ -4589,6 +4694,11 @@ form-data@^4.0.0:
hasown "^2.0.2"
mime-types "^2.1.12"
+format@^0.2.0:
+ version "0.2.2"
+ resolved "https://registry.yarnpkg.com/format/-/format-0.2.2.tgz#d6170107e9efdc4ed30c9dc39016df942b5cb58b"
+ integrity sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==
+
fraction.js@^4.3.7:
version "4.3.7"
resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.3.7.tgz#06ca0085157e42fda7f9e726e79fefc4068840f7"
@@ -4945,11 +5055,65 @@ hasown@^2.0.2:
dependencies:
function-bind "^1.1.2"
+hast-util-parse-selector@^2.0.0:
+ version "2.2.5"
+ resolved "https://registry.yarnpkg.com/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz#d57c23f4da16ae3c63b3b6ca4616683313499c3a"
+ integrity sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==
+
+hast-util-to-jsx-runtime@^2.0.0:
+ version "2.3.6"
+ resolved "https://registry.yarnpkg.com/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.6.tgz#ff31897aae59f62232e21594eac7ef6b63333e98"
+ integrity sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg==
+ dependencies:
+ "@types/estree" "^1.0.0"
+ "@types/hast" "^3.0.0"
+ "@types/unist" "^3.0.0"
+ comma-separated-tokens "^2.0.0"
+ devlop "^1.0.0"
+ estree-util-is-identifier-name "^3.0.0"
+ hast-util-whitespace "^3.0.0"
+ mdast-util-mdx-expression "^2.0.0"
+ mdast-util-mdx-jsx "^3.0.0"
+ mdast-util-mdxjs-esm "^2.0.0"
+ property-information "^7.0.0"
+ space-separated-tokens "^2.0.0"
+ style-to-js "^1.0.0"
+ unist-util-position "^5.0.0"
+ vfile-message "^4.0.0"
+
+hast-util-whitespace@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz#7778ed9d3c92dd9e8c5c8f648a49c21fc51cb621"
+ integrity sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==
+ dependencies:
+ "@types/hast" "^3.0.0"
+
+hastscript@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-6.0.0.tgz#e8768d7eac56c3fdeac8a92830d58e811e5bf640"
+ integrity sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w==
+ dependencies:
+ "@types/hast" "^2.0.0"
+ comma-separated-tokens "^1.0.0"
+ hast-util-parse-selector "^2.0.0"
+ property-information "^5.0.0"
+ space-separated-tokens "^1.0.0"
+
+highlight.js@^10.4.1, highlight.js@~10.7.0:
+ version "10.7.3"
+ resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531"
+ integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==
+
highlight.js@~11.11.0:
version "11.11.1"
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-11.11.1.tgz#fca06fa0e5aeecf6c4d437239135fabc15213585"
integrity sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==
+highlightjs-vue@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/highlightjs-vue/-/highlightjs-vue-1.0.0.tgz#fdfe97fbea6354e70ee44e3a955875e114db086d"
+ integrity sha512-PDEfEF102G23vHmPhLyPboFCD+BkMGu+GuJe2d9/eH4FsCwvgBpnc9n0pGE+ffKdph38s6foEZiEjdgHdzp+IA==
+
hosted-git-info@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.1.0.tgz#827b82867e9ff1c8d0c4d9d53880397d2c86d224"
@@ -4957,6 +5121,11 @@ hosted-git-info@^4.1.0:
dependencies:
lru-cache "^6.0.0"
+html-url-attributes@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/html-url-attributes/-/html-url-attributes-3.0.1.tgz#83b052cd5e437071b756cd74ae70f708870c2d87"
+ integrity sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==
+
http-cache-semantics@^4.0.0, http-cache-semantics@^4.1.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz#205f4db64f8562b76a4ff9235aa5279839a09dd5"
@@ -5081,6 +5250,11 @@ inherits@2, inherits@^2.0.3, inherits@^2.0.4:
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
+ version "0.2.4"
+ resolved "https://registry.yarnpkg.com/inline-style-parser/-/inline-style-parser-0.2.4.tgz#f4af5fe72e612839fcd453d989a586566d695f22"
+ integrity sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==
+
input-otp@^1.4.2:
version "1.4.2"
resolved "https://registry.yarnpkg.com/input-otp/-/input-otp-1.4.2.tgz#f4d3d587d0f641729e55029b3b8c4870847f4f07"
@@ -5108,6 +5282,32 @@ ip-address@^9.0.5:
jsbn "1.1.0"
sprintf-js "^1.1.3"
+is-alphabetical@^1.0.0:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-1.0.4.tgz#9e7d6b94916be22153745d184c298cbf986a686d"
+ integrity sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==
+
+is-alphabetical@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-2.0.1.tgz#01072053ea7c1036df3c7d19a6daaec7f19e789b"
+ integrity sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==
+
+is-alphanumerical@^1.0.0:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz#7eb9a2431f855f6b1ef1a78e326df515696c4dbf"
+ integrity sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==
+ dependencies:
+ is-alphabetical "^1.0.0"
+ is-decimal "^1.0.0"
+
+is-alphanumerical@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz#7c03fbe96e3e931113e57f964b0a368cc2dfd875"
+ integrity sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==
+ dependencies:
+ is-alphabetical "^2.0.0"
+ is-decimal "^2.0.0"
+
is-array-buffer@^3.0.4, is-array-buffer@^3.0.5:
version "3.0.5"
resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.5.tgz#65742e1e687bd2cc666253068fd8707fe4d44280"
@@ -5186,6 +5386,16 @@ is-date-object@^1.0.5, is-date-object@^1.1.0:
call-bound "^1.0.2"
has-tostringtag "^1.0.2"
+is-decimal@^1.0.0:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.4.tgz#65a3a5958a1c5b63a706e1b333d7cd9f630d3fa5"
+ integrity sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==
+
+is-decimal@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-2.0.1.tgz#9469d2dc190d0214fd87d78b78caecc0cc14eef7"
+ integrity sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==
+
is-extglob@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
@@ -5220,6 +5430,16 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1:
dependencies:
is-extglob "^2.1.1"
+is-hexadecimal@^1.0.0:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7"
+ integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==
+
+is-hexadecimal@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz#86b5bf668fca307498d319dfc03289d781a90027"
+ integrity sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==
+
is-interactive@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e"
@@ -5258,6 +5478,11 @@ is-path-inside@^3.0.3:
resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283"
integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==
+is-plain-obj@^4.0.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-4.1.0.tgz#d65025edec3657ce032fd7db63c97883eaed71f0"
+ integrity sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==
+
is-regex@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.2.1.tgz#76d70a3ed10ef9be48eb577887d74205bf0cad22"
@@ -5640,6 +5865,11 @@ log-symbols@^4.1.0:
chalk "^4.1.0"
is-unicode-supported "^0.1.0"
+longest-streak@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-3.1.0.tgz#62fa67cd958742a1574af9f39866364102d90cd4"
+ integrity sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==
+
loose-envify@^1.1.0, loose-envify@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
@@ -5652,6 +5882,14 @@ lowercase-keys@^2.0.0:
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479"
integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==
+lowlight@^1.17.0:
+ version "1.20.0"
+ resolved "https://registry.yarnpkg.com/lowlight/-/lowlight-1.20.0.tgz#ddb197d33462ad0d93bf19d17b6c301aa3941888"
+ integrity sha512-8Ktj+prEb1RoCPkEOrPMYUN/nCggB7qAWe3a7OpMjWQkh3l2RD5wKRQ+o8Q8YuI9RG/xs95waaI/E6ym/7NsTw==
+ dependencies:
+ fault "^1.0.0"
+ highlight.js "~10.7.0"
+
lowlight@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/lowlight/-/lowlight-3.3.0.tgz#007b8a5bfcfd27cc65b96246d2de3e9dd4e23c6c"
@@ -5738,6 +5976,11 @@ markdown-it@^14.0.0:
punycode.js "^2.3.1"
uc.micro "^2.1.0"
+markdown-table@^3.0.0:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-3.0.4.tgz#fe44d6d410ff9d6f2ea1797a3f60aa4d2b631c2a"
+ integrity sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==
+
marked@^15.0.12:
version "15.0.12"
resolved "https://registry.yarnpkg.com/marked/-/marked-15.0.12.tgz#30722c7346e12d0a2d0207ab9b0c4f0102d86c4e"
@@ -5755,6 +5998,186 @@ math-intrinsics@^1.1.0:
resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9"
integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==
+mdast-util-find-and-replace@^3.0.0:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.2.tgz#70a3174c894e14df722abf43bc250cbae44b11df"
+ integrity sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg==
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ escape-string-regexp "^5.0.0"
+ unist-util-is "^6.0.0"
+ unist-util-visit-parents "^6.0.0"
+
+mdast-util-from-markdown@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.2.tgz#4850390ca7cf17413a9b9a0fbefcd1bc0eb4160a"
+ integrity sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ "@types/unist" "^3.0.0"
+ decode-named-character-reference "^1.0.0"
+ devlop "^1.0.0"
+ mdast-util-to-string "^4.0.0"
+ micromark "^4.0.0"
+ micromark-util-decode-numeric-character-reference "^2.0.0"
+ micromark-util-decode-string "^2.0.0"
+ micromark-util-normalize-identifier "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+ unist-util-stringify-position "^4.0.0"
+
+mdast-util-gfm-autolink-literal@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-2.0.1.tgz#abd557630337bd30a6d5a4bd8252e1c2dc0875d5"
+ integrity sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ==
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ ccount "^2.0.0"
+ devlop "^1.0.0"
+ mdast-util-find-and-replace "^3.0.0"
+ micromark-util-character "^2.0.0"
+
+mdast-util-gfm-footnote@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-2.1.0.tgz#7778e9d9ca3df7238cc2bd3fa2b1bf6a65b19403"
+ integrity sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ==
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ devlop "^1.1.0"
+ mdast-util-from-markdown "^2.0.0"
+ mdast-util-to-markdown "^2.0.0"
+ micromark-util-normalize-identifier "^2.0.0"
+
+mdast-util-gfm-strikethrough@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-2.0.0.tgz#d44ef9e8ed283ac8c1165ab0d0dfd058c2764c16"
+ integrity sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ mdast-util-from-markdown "^2.0.0"
+ mdast-util-to-markdown "^2.0.0"
+
+mdast-util-gfm-table@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/mdast-util-gfm-table/-/mdast-util-gfm-table-2.0.0.tgz#7a435fb6223a72b0862b33afbd712b6dae878d38"
+ integrity sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ devlop "^1.0.0"
+ markdown-table "^3.0.0"
+ mdast-util-from-markdown "^2.0.0"
+ mdast-util-to-markdown "^2.0.0"
+
+mdast-util-gfm-task-list-item@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-2.0.0.tgz#e68095d2f8a4303ef24094ab642e1047b991a936"
+ integrity sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ devlop "^1.0.0"
+ mdast-util-from-markdown "^2.0.0"
+ mdast-util-to-markdown "^2.0.0"
+
+mdast-util-gfm@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/mdast-util-gfm/-/mdast-util-gfm-3.1.0.tgz#2cdf63b92c2a331406b0fb0db4c077c1b0331751"
+ integrity sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ==
+ dependencies:
+ mdast-util-from-markdown "^2.0.0"
+ mdast-util-gfm-autolink-literal "^2.0.0"
+ mdast-util-gfm-footnote "^2.0.0"
+ mdast-util-gfm-strikethrough "^2.0.0"
+ mdast-util-gfm-table "^2.0.0"
+ mdast-util-gfm-task-list-item "^2.0.0"
+ mdast-util-to-markdown "^2.0.0"
+
+mdast-util-mdx-expression@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.1.tgz#43f0abac9adc756e2086f63822a38c8d3c3a5096"
+ integrity sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==
+ dependencies:
+ "@types/estree-jsx" "^1.0.0"
+ "@types/hast" "^3.0.0"
+ "@types/mdast" "^4.0.0"
+ devlop "^1.0.0"
+ mdast-util-from-markdown "^2.0.0"
+ mdast-util-to-markdown "^2.0.0"
+
+mdast-util-mdx-jsx@^3.0.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.2.0.tgz#fd04c67a2a7499efb905a8a5c578dddc9fdada0d"
+ integrity sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q==
+ dependencies:
+ "@types/estree-jsx" "^1.0.0"
+ "@types/hast" "^3.0.0"
+ "@types/mdast" "^4.0.0"
+ "@types/unist" "^3.0.0"
+ ccount "^2.0.0"
+ devlop "^1.1.0"
+ mdast-util-from-markdown "^2.0.0"
+ mdast-util-to-markdown "^2.0.0"
+ parse-entities "^4.0.0"
+ stringify-entities "^4.0.0"
+ unist-util-stringify-position "^4.0.0"
+ vfile-message "^4.0.0"
+
+mdast-util-mdxjs-esm@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-2.0.1.tgz#019cfbe757ad62dd557db35a695e7314bcc9fa97"
+ integrity sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==
+ dependencies:
+ "@types/estree-jsx" "^1.0.0"
+ "@types/hast" "^3.0.0"
+ "@types/mdast" "^4.0.0"
+ devlop "^1.0.0"
+ mdast-util-from-markdown "^2.0.0"
+ mdast-util-to-markdown "^2.0.0"
+
+mdast-util-phrasing@^4.0.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/mdast-util-phrasing/-/mdast-util-phrasing-4.1.0.tgz#7cc0a8dec30eaf04b7b1a9661a92adb3382aa6e3"
+ integrity sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ unist-util-is "^6.0.0"
+
+mdast-util-to-hast@^13.0.0:
+ version "13.2.0"
+ resolved "https://registry.yarnpkg.com/mdast-util-to-hast/-/mdast-util-to-hast-13.2.0.tgz#5ca58e5b921cc0a3ded1bc02eed79a4fe4fe41f4"
+ integrity sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==
+ dependencies:
+ "@types/hast" "^3.0.0"
+ "@types/mdast" "^4.0.0"
+ "@ungap/structured-clone" "^1.0.0"
+ devlop "^1.0.0"
+ micromark-util-sanitize-uri "^2.0.0"
+ trim-lines "^3.0.0"
+ unist-util-position "^5.0.0"
+ unist-util-visit "^5.0.0"
+ vfile "^6.0.0"
+
+mdast-util-to-markdown@^2.0.0:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/mdast-util-to-markdown/-/mdast-util-to-markdown-2.1.2.tgz#f910ffe60897f04bb4b7e7ee434486f76288361b"
+ integrity sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ "@types/unist" "^3.0.0"
+ longest-streak "^3.0.0"
+ mdast-util-phrasing "^4.0.0"
+ mdast-util-to-string "^4.0.0"
+ micromark-util-classify-character "^2.0.0"
+ micromark-util-decode-string "^2.0.0"
+ unist-util-visit "^5.0.0"
+ zwitch "^2.0.0"
+
+mdast-util-to-string@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz#7a5121475556a04e7eddeb67b264aae79d312814"
+ integrity sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==
+ dependencies:
+ "@types/mdast" "^4.0.0"
+
mdurl@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-2.0.0.tgz#80676ec0433025dd3e17ee983d0fe8de5a2237e0"
@@ -5765,6 +6188,279 @@ merge2@^1.3.0, merge2@^1.4.1:
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
+micromark-core-commonmark@^2.0.0:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/micromark-core-commonmark/-/micromark-core-commonmark-2.0.3.tgz#c691630e485021a68cf28dbc2b2ca27ebf678cd4"
+ integrity sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==
+ dependencies:
+ decode-named-character-reference "^1.0.0"
+ devlop "^1.0.0"
+ micromark-factory-destination "^2.0.0"
+ micromark-factory-label "^2.0.0"
+ micromark-factory-space "^2.0.0"
+ micromark-factory-title "^2.0.0"
+ micromark-factory-whitespace "^2.0.0"
+ micromark-util-character "^2.0.0"
+ micromark-util-chunked "^2.0.0"
+ micromark-util-classify-character "^2.0.0"
+ micromark-util-html-tag-name "^2.0.0"
+ micromark-util-normalize-identifier "^2.0.0"
+ micromark-util-resolve-all "^2.0.0"
+ micromark-util-subtokenize "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-extension-gfm-autolink-literal@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-2.1.0.tgz#6286aee9686c4462c1e3552a9d505feddceeb935"
+ integrity sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==
+ dependencies:
+ micromark-util-character "^2.0.0"
+ micromark-util-sanitize-uri "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-extension-gfm-footnote@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-2.1.0.tgz#4dab56d4e398b9853f6fe4efac4fc9361f3e0750"
+ integrity sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==
+ dependencies:
+ devlop "^1.0.0"
+ micromark-core-commonmark "^2.0.0"
+ micromark-factory-space "^2.0.0"
+ micromark-util-character "^2.0.0"
+ micromark-util-normalize-identifier "^2.0.0"
+ micromark-util-sanitize-uri "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-extension-gfm-strikethrough@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-2.1.0.tgz#86106df8b3a692b5f6a92280d3879be6be46d923"
+ integrity sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==
+ dependencies:
+ devlop "^1.0.0"
+ micromark-util-chunked "^2.0.0"
+ micromark-util-classify-character "^2.0.0"
+ micromark-util-resolve-all "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-extension-gfm-table@^2.0.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.1.tgz#fac70bcbf51fe65f5f44033118d39be8a9b5940b"
+ integrity sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg==
+ dependencies:
+ devlop "^1.0.0"
+ micromark-factory-space "^2.0.0"
+ micromark-util-character "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-extension-gfm-tagfilter@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-2.0.0.tgz#f26d8a7807b5985fba13cf61465b58ca5ff7dc57"
+ integrity sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==
+ dependencies:
+ micromark-util-types "^2.0.0"
+
+micromark-extension-gfm-task-list-item@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-2.1.0.tgz#bcc34d805639829990ec175c3eea12bb5b781f2c"
+ integrity sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==
+ dependencies:
+ devlop "^1.0.0"
+ micromark-factory-space "^2.0.0"
+ micromark-util-character "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-extension-gfm@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/micromark-extension-gfm/-/micromark-extension-gfm-3.0.0.tgz#3e13376ab95dd7a5cfd0e29560dfe999657b3c5b"
+ integrity sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==
+ dependencies:
+ micromark-extension-gfm-autolink-literal "^2.0.0"
+ micromark-extension-gfm-footnote "^2.0.0"
+ micromark-extension-gfm-strikethrough "^2.0.0"
+ micromark-extension-gfm-table "^2.0.0"
+ micromark-extension-gfm-tagfilter "^2.0.0"
+ micromark-extension-gfm-task-list-item "^2.0.0"
+ micromark-util-combine-extensions "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-factory-destination@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz#8fef8e0f7081f0474fbdd92deb50c990a0264639"
+ integrity sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==
+ dependencies:
+ micromark-util-character "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-factory-label@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz#5267efa97f1e5254efc7f20b459a38cb21058ba1"
+ integrity sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==
+ dependencies:
+ devlop "^1.0.0"
+ micromark-util-character "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-factory-space@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz#36d0212e962b2b3121f8525fc7a3c7c029f334fc"
+ integrity sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==
+ dependencies:
+ micromark-util-character "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-factory-title@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz#237e4aa5d58a95863f01032d9ee9b090f1de6e94"
+ integrity sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==
+ dependencies:
+ micromark-factory-space "^2.0.0"
+ micromark-util-character "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-factory-whitespace@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz#06b26b2983c4d27bfcc657b33e25134d4868b0b1"
+ integrity sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==
+ dependencies:
+ micromark-factory-space "^2.0.0"
+ micromark-util-character "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-util-character@^2.0.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/micromark-util-character/-/micromark-util-character-2.1.1.tgz#2f987831a40d4c510ac261e89852c4e9703ccda6"
+ integrity sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==
+ dependencies:
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-util-chunked@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz#47fbcd93471a3fccab86cff03847fc3552db1051"
+ integrity sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==
+ dependencies:
+ micromark-util-symbol "^2.0.0"
+
+micromark-util-classify-character@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz#d399faf9c45ca14c8b4be98b1ea481bced87b629"
+ integrity sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==
+ dependencies:
+ micromark-util-character "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-util-combine-extensions@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz#2a0f490ab08bff5cc2fd5eec6dd0ca04f89b30a9"
+ integrity sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==
+ dependencies:
+ micromark-util-chunked "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-util-decode-numeric-character-reference@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz#fcf15b660979388e6f118cdb6bf7d79d73d26fe5"
+ integrity sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==
+ dependencies:
+ micromark-util-symbol "^2.0.0"
+
+micromark-util-decode-string@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/micromark-util-decode-string/-/micromark-util-decode-string-2.0.1.tgz#6cb99582e5d271e84efca8e61a807994d7161eb2"
+ integrity sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==
+ dependencies:
+ decode-named-character-reference "^1.0.0"
+ micromark-util-character "^2.0.0"
+ micromark-util-decode-numeric-character-reference "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+
+micromark-util-encode@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz#0d51d1c095551cfaac368326963cf55f15f540b8"
+ integrity sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==
+
+micromark-util-html-tag-name@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz#e40403096481986b41c106627f98f72d4d10b825"
+ integrity sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==
+
+micromark-util-normalize-identifier@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz#c30d77b2e832acf6526f8bf1aa47bc9c9438c16d"
+ integrity sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==
+ dependencies:
+ micromark-util-symbol "^2.0.0"
+
+micromark-util-resolve-all@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz#e1a2d62cdd237230a2ae11839027b19381e31e8b"
+ integrity sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==
+ dependencies:
+ micromark-util-types "^2.0.0"
+
+micromark-util-sanitize-uri@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz#ab89789b818a58752b73d6b55238621b7faa8fd7"
+ integrity sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==
+ dependencies:
+ micromark-util-character "^2.0.0"
+ micromark-util-encode "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+
+micromark-util-subtokenize@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/micromark-util-subtokenize/-/micromark-util-subtokenize-2.1.0.tgz#d8ade5ba0f3197a1cf6a2999fbbfe6357a1a19ee"
+ integrity sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==
+ dependencies:
+ devlop "^1.0.0"
+ micromark-util-chunked "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
+micromark-util-symbol@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz#e5da494e8eb2b071a0d08fb34f6cefec6c0a19b8"
+ integrity sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==
+
+micromark-util-types@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/micromark-util-types/-/micromark-util-types-2.0.2.tgz#f00225f5f5a0ebc3254f96c36b6605c4b393908e"
+ integrity sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==
+
+micromark@^4.0.0:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/micromark/-/micromark-4.0.2.tgz#91395a3e1884a198e62116e33c9c568e39936fdb"
+ integrity sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==
+ dependencies:
+ "@types/debug" "^4.0.0"
+ debug "^4.0.0"
+ decode-named-character-reference "^1.0.0"
+ devlop "^1.0.0"
+ micromark-core-commonmark "^2.0.0"
+ micromark-factory-space "^2.0.0"
+ micromark-util-character "^2.0.0"
+ micromark-util-chunked "^2.0.0"
+ micromark-util-combine-extensions "^2.0.0"
+ micromark-util-decode-numeric-character-reference "^2.0.0"
+ micromark-util-encode "^2.0.0"
+ micromark-util-normalize-identifier "^2.0.0"
+ micromark-util-resolve-all "^2.0.0"
+ micromark-util-sanitize-uri "^2.0.0"
+ micromark-util-subtokenize "^2.0.0"
+ micromark-util-symbol "^2.0.0"
+ micromark-util-types "^2.0.0"
+
micromatch@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202"
@@ -6188,6 +6884,31 @@ parent-module@^1.0.0:
dependencies:
callsites "^3.0.0"
+parse-entities@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-2.0.0.tgz#53c6eb5b9314a1f4ec99fa0fdf7ce01ecda0cbe8"
+ integrity sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==
+ dependencies:
+ character-entities "^1.0.0"
+ character-entities-legacy "^1.0.0"
+ character-reference-invalid "^1.0.0"
+ is-alphanumerical "^1.0.0"
+ is-decimal "^1.0.0"
+ is-hexadecimal "^1.0.0"
+
+parse-entities@^4.0.0:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-4.0.2.tgz#61d46f5ed28e4ee62e9ddc43d6b010188443f159"
+ integrity sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==
+ dependencies:
+ "@types/unist" "^2.0.0"
+ character-entities-legacy "^3.0.0"
+ character-reference-invalid "^2.0.0"
+ decode-named-character-reference "^1.0.0"
+ is-alphanumerical "^2.0.0"
+ is-decimal "^2.0.0"
+ is-hexadecimal "^2.0.0"
+
path-exists@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
@@ -6303,6 +7024,16 @@ prettier@^3.3.2, prettier@^3.5.0:
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.6.2.tgz#ccda02a1003ebbb2bfda6f83a074978f608b9393"
integrity sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==
+prismjs@^1.27.0:
+ version "1.30.0"
+ resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.30.0.tgz#d9709969d9d4e16403f6f348c63553b19f0975a9"
+ integrity sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==
+
+prismjs@~1.27.0:
+ version "1.27.0"
+ resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.27.0.tgz#bb6ee3138a0b438a3653dd4d6ce0cc6510a45057"
+ integrity sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==
+
proc-log@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-2.0.1.tgz#8f3f69a1f608de27878f91f5c688b225391cb685"
@@ -6335,6 +7066,18 @@ prop-types@15, prop-types@^15.6.2, prop-types@^15.8.1:
object-assign "^4.1.1"
react-is "^16.13.1"
+property-information@^5.0.0:
+ version "5.6.0"
+ resolved "https://registry.yarnpkg.com/property-information/-/property-information-5.6.0.tgz#61675545fb23002f245c6540ec46077d4da3ed69"
+ integrity sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==
+ dependencies:
+ xtend "^4.0.0"
+
+property-information@^7.0.0:
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/property-information/-/property-information-7.1.0.tgz#b622e8646e02b580205415586b40804d3e8bfd5d"
+ integrity sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==
+
prosemirror-changeset@^2.3.0:
version "2.3.1"
resolved "https://registry.yarnpkg.com/prosemirror-changeset/-/prosemirror-changeset-2.3.1.tgz#eee3299cfabc7a027694e9abdc4e85505e9dd5e7"
@@ -6582,6 +7325,23 @@ react-kapsule@^2.5:
dependencies:
jerrypick "^1.1.1"
+react-markdown@^10.1.0:
+ version "10.1.0"
+ resolved "https://registry.yarnpkg.com/react-markdown/-/react-markdown-10.1.0.tgz#e22bc20faddbc07605c15284255653c0f3bad5ca"
+ integrity sha512-qKxVopLT/TyA6BX3Ue5NwabOsAzm0Q7kAPwq6L+wWDwisYs7R8vZ0nRXqq6rkueboxpkjvLGU9fWifiX/ZZFxQ==
+ dependencies:
+ "@types/hast" "^3.0.0"
+ "@types/mdast" "^4.0.0"
+ devlop "^1.0.0"
+ hast-util-to-jsx-runtime "^2.0.0"
+ html-url-attributes "^3.0.0"
+ mdast-util-to-hast "^13.0.0"
+ remark-parse "^11.0.0"
+ remark-rehype "^11.0.0"
+ unified "^11.0.0"
+ unist-util-visit "^5.0.0"
+ vfile "^6.0.0"
+
react-medium-image-zoom@^5.2.14:
version "5.2.14"
resolved "https://registry.yarnpkg.com/react-medium-image-zoom/-/react-medium-image-zoom-5.2.14.tgz#87032d079fce4a21a17770d6709f739872580906"
@@ -6633,6 +7393,18 @@ react-style-singleton@^2.2.2, react-style-singleton@^2.2.3:
get-nonce "^1.0.0"
tslib "^2.0.0"
+react-syntax-highlighter@^15.6.1:
+ version "15.6.1"
+ resolved "https://registry.yarnpkg.com/react-syntax-highlighter/-/react-syntax-highlighter-15.6.1.tgz#fa567cb0a9f96be7bbccf2c13a3c4b5657d9543e"
+ integrity sha512-OqJ2/vL7lEeV5zTJyG7kmARppUjiB9h9udl4qHQjjgEos66z00Ia0OckwYfRxCSFrW8RJIBnsBwQsHZbVPspqg==
+ dependencies:
+ "@babel/runtime" "^7.3.1"
+ highlight.js "^10.4.1"
+ highlightjs-vue "^1.0.0"
+ lowlight "^1.17.0"
+ prismjs "^1.27.0"
+ refractor "^3.6.0"
+
react-transition-group@^4.4.5:
version "4.4.5"
resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.5.tgz#e53d4e3f3344da8521489fbef8f2581d42becdd1"
@@ -6719,6 +7491,15 @@ reflect.getprototypeof@^1.0.6, reflect.getprototypeof@^1.0.9:
get-proto "^1.0.1"
which-builtin-type "^1.2.1"
+refractor@^3.6.0:
+ version "3.6.0"
+ resolved "https://registry.yarnpkg.com/refractor/-/refractor-3.6.0.tgz#ac318f5a0715ead790fcfb0c71f4dd83d977935a"
+ integrity sha512-MY9W41IOWxxk31o+YvFCNyNzdkc9M20NoZK5vq6jkv4I/uh2zkWcfudj0Q1fovjUQJrNewS9NMzeTtqPf+n5EA==
+ dependencies:
+ hastscript "^6.0.0"
+ parse-entities "^2.0.0"
+ prismjs "~1.27.0"
+
regexp.prototype.flags@^1.5.3, regexp.prototype.flags@^1.5.4:
version "1.5.4"
resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz#1ad6c62d44a259007e55b3970e00f746efbcaa19"
@@ -6736,6 +7517,48 @@ regexp.prototype.flags@^1.5.3, regexp.prototype.flags@^1.5.4:
resolved "https://registry.yarnpkg.com/@plotly/regl/-/regl-2.1.2.tgz#fd31e3e820ed8824d59a67ab5e766bb101b810b6"
integrity sha512-Mdk+vUACbQvjd0m/1JJjOOafmkp/EpmHjISsopEz5Av44CBq7rPC05HHNbYGKVyNUF2zmEoBS/TT0pd0SPFFyw==
+remark-gfm@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/remark-gfm/-/remark-gfm-4.0.1.tgz#33227b2a74397670d357bf05c098eaf8513f0d6b"
+ integrity sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg==
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ mdast-util-gfm "^3.0.0"
+ micromark-extension-gfm "^3.0.0"
+ remark-parse "^11.0.0"
+ remark-stringify "^11.0.0"
+ unified "^11.0.0"
+
+remark-parse@^11.0.0:
+ version "11.0.0"
+ resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-11.0.0.tgz#aa60743fcb37ebf6b069204eb4da304e40db45a1"
+ integrity sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ mdast-util-from-markdown "^2.0.0"
+ micromark-util-types "^2.0.0"
+ unified "^11.0.0"
+
+remark-rehype@^11.0.0:
+ version "11.1.2"
+ resolved "https://registry.yarnpkg.com/remark-rehype/-/remark-rehype-11.1.2.tgz#2addaadda80ca9bd9aa0da763e74d16327683b37"
+ integrity sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==
+ dependencies:
+ "@types/hast" "^3.0.0"
+ "@types/mdast" "^4.0.0"
+ mdast-util-to-hast "^13.0.0"
+ unified "^11.0.0"
+ vfile "^6.0.0"
+
+remark-stringify@^11.0.0:
+ version "11.0.0"
+ resolved "https://registry.yarnpkg.com/remark-stringify/-/remark-stringify-11.0.0.tgz#4c5b01dd711c269df1aaae11743eb7e2e7636fd3"
+ integrity sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==
+ dependencies:
+ "@types/mdast" "^4.0.0"
+ mdast-util-to-markdown "^2.0.0"
+ unified "^11.0.0"
+
require-directory@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
@@ -7155,6 +7978,16 @@ sourcemap-codec@^1.4.8:
resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4"
integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==
+space-separated-tokens@^1.0.0:
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz#85f32c3d10d9682007e917414ddc5c26d1aa6899"
+ integrity sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==
+
+space-separated-tokens@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz#1ecd9d2350a3844572c3f4a312bceb018348859f"
+ integrity sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==
+
sprintf-js@^1.1.2, sprintf-js@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a"
@@ -7273,6 +8106,14 @@ string_decoder@^1.1.1:
dependencies:
safe-buffer "~5.2.0"
+stringify-entities@^4.0.0:
+ version "4.0.4"
+ resolved "https://registry.yarnpkg.com/stringify-entities/-/stringify-entities-4.0.4.tgz#b3b79ef5f277cc4ac73caeb0236c5ba939b3a4f3"
+ integrity sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==
+ dependencies:
+ character-entities-html4 "^2.0.0"
+ character-entities-legacy "^3.0.0"
+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
@@ -7304,6 +8145,20 @@ stubborn-fs@^1.2.5:
resolved "https://registry.yarnpkg.com/stubborn-fs/-/stubborn-fs-1.2.5.tgz#e5e244223166921ddf66ed5e062b6b3bf285bfd2"
integrity sha512-H2N9c26eXjzL/S/K+i/RHHcFanE74dptvvjM8iwzwbVcWY/zjBbgRqF3K0DY4+OD+uTTASTBvDoxPDaPN02D7g==
+style-to-js@^1.0.0:
+ version "1.1.17"
+ resolved "https://registry.yarnpkg.com/style-to-js/-/style-to-js-1.1.17.tgz#488b1558a8c1fd05352943f088cc3ce376813d83"
+ integrity sha512-xQcBGDxJb6jjFCTzvQtfiPn6YvvP2O8U1MDIPNfJQlWMYfktPy+iGsHE7cssjs7y84d9fQaK4UF3RIJaAHSoYA==
+ dependencies:
+ style-to-object "1.0.9"
+
+ version "1.0.9"
+ resolved "https://registry.yarnpkg.com/style-to-object/-/style-to-object-1.0.9.tgz#35c65b713f4a6dba22d3d0c61435f965423653f0"
+ integrity sha512-G4qppLgKu/k6FwRpHiGiKPaPTFcG3g4wNVX/Qsfu+RqQM30E7Tyu/TEgxcL9PNLF5pdRLwQdE3YKKf+KF2Dzlw==
+ dependencies:
+ inline-style-parser "0.2.4"
+
sumchecker@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/sumchecker/-/sumchecker-3.0.1.tgz#6377e996795abb0b6d348e9b3e1dfb24345a8e42"
@@ -7482,6 +8337,16 @@ tr46@~0.0.3:
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==
+trim-lines@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/trim-lines/-/trim-lines-3.0.1.tgz#d802e332a07df861c48802c04321017b1bd87338"
+ integrity sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==
+
+trough@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/trough/-/trough-2.2.0.tgz#94a60bd6bd375c152c1df911a4b11d5b0256f50f"
+ integrity sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==
+
truncate-utf8-bytes@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz#405923909592d56f78a5818434b0b78489ca5f2b"
@@ -7616,6 +8481,19 @@ undici-types@~7.8.0:
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.8.0.tgz#de00b85b710c54122e44fbfd911f8d70174cd294"
integrity sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==
+unified@^11.0.0:
+ version "11.0.5"
+ resolved "https://registry.yarnpkg.com/unified/-/unified-11.0.5.tgz#f66677610a5c0a9ee90cab2b8d4d66037026d9e1"
+ integrity sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==
+ dependencies:
+ "@types/unist" "^3.0.0"
+ bail "^2.0.0"
+ devlop "^1.0.0"
+ extend "^3.0.0"
+ is-plain-obj "^4.0.0"
+ trough "^2.0.0"
+ vfile "^6.0.0"
+
unique-filename@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-2.0.1.tgz#e785f8675a9a7589e0ac77e0b5c34d2eaeac6da2"
@@ -7630,6 +8508,44 @@ unique-slug@^3.0.0:
dependencies:
imurmurhash "^0.1.4"
+unist-util-is@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-6.0.0.tgz#b775956486aff107a9ded971d996c173374be424"
+ integrity sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==
+ dependencies:
+ "@types/unist" "^3.0.0"
+
+unist-util-position@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/unist-util-position/-/unist-util-position-5.0.0.tgz#678f20ab5ca1207a97d7ea8a388373c9cf896be4"
+ integrity sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==
+ dependencies:
+ "@types/unist" "^3.0.0"
+
+unist-util-stringify-position@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz#449c6e21a880e0855bf5aabadeb3a740314abac2"
+ integrity sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==
+ dependencies:
+ "@types/unist" "^3.0.0"
+
+unist-util-visit-parents@^6.0.0:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz#4d5f85755c3b8f0dc69e21eca5d6d82d22162815"
+ integrity sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==
+ dependencies:
+ "@types/unist" "^3.0.0"
+ unist-util-is "^6.0.0"
+
+unist-util-visit@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-5.0.0.tgz#a7de1f31f72ffd3519ea71814cccf5fd6a9217d6"
+ integrity sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==
+ dependencies:
+ "@types/unist" "^3.0.0"
+ unist-util-is "^6.0.0"
+ unist-util-visit-parents "^6.0.0"
+
universalify@^0.1.0:
version "0.1.2"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
@@ -7717,6 +8633,22 @@ verror@^1.10.0:
core-util-is "1.0.2"
extsprintf "^1.2.0"
+vfile-message@^4.0.0:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/vfile-message/-/vfile-message-4.0.2.tgz#c883c9f677c72c166362fd635f21fc165a7d1181"
+ integrity sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==
+ dependencies:
+ "@types/unist" "^3.0.0"
+ unist-util-stringify-position "^4.0.0"
+
+vfile@^6.0.0:
+ version "6.0.3"
+ resolved "https://registry.yarnpkg.com/vfile/-/vfile-6.0.3.tgz#3652ab1c496531852bf55a6bac57af981ebc38ab"
+ integrity sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==
+ dependencies:
+ "@types/unist" "^3.0.0"
+ vfile-message "^4.0.0"
+
victory-vendor@^36.6.8:
version "36.9.2"
resolved "https://registry.yarnpkg.com/victory-vendor/-/victory-vendor-36.9.2.tgz#668b02a448fa4ea0f788dbf4228b7e64669ff801"
@@ -7890,6 +8822,11 @@ xmlbuilder@>=11.0.1, xmlbuilder@^15.1.1:
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-15.1.1.tgz#9dcdce49eea66d8d10b42cae94a79c3c8d0c2ec5"
integrity sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==
+xtend@^4.0.0:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"
+ integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==
+
y18n@^5.0.5:
version "5.0.8"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
@@ -7965,3 +8902,8 @@ zustand@^5.0.3:
version "5.0.6"
resolved "https://registry.yarnpkg.com/zustand/-/zustand-5.0.6.tgz#a2da43d8dc3d31e314279e5baec06297bea70a5c"
integrity sha512-ihAqNeUVhe0MAD+X8M5UzqyZ9k3FFZLBTtqo6JLPwV53cbRB/mJwBI0PxcIgqhBBHlEs8G45OTDTMq3gNcLq3A==
+
+zwitch@^2.0.0:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-2.0.4.tgz#c827d4b0acb76fc3e685a4c6ec2902d51070e9d7"
+ integrity sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==