fix:constant reload
This commit is contained in:
parent
9f433743a6
commit
f78547e51b
693 changed files with 112047 additions and 10 deletions
3
app.py
3
app.py
|
|
@ -448,3 +448,6 @@ app.include_router(optionsRouter)
|
|||
from modules.routes.routeMessaging import router as messagingRouter
|
||||
app.include_router(messagingRouter)
|
||||
|
||||
from modules.routes.routeChatbot import router as chatbotRouter
|
||||
app.include_router(chatbotRouter)
|
||||
|
||||
|
|
|
|||
169
modules/connectors/connectorPreprocessor.py
Normal file
169
modules/connectors/connectorPreprocessor.py
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
# Copyright (c) 2025 Patrick Motsch
|
||||
# All rights reserved.
|
||||
"""
|
||||
Preprocessor connector for executing SQL queries via HTTP API.
|
||||
Connects to remote preprocessing service that hosts the SQLite database.
|
||||
"""
|
||||
|
||||
import logging
|
||||
import httpx
|
||||
from typing import Optional
|
||||
from modules.shared.configuration import APP_CONFIG
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class PreprocessorConnector:
|
||||
"""
|
||||
Connector for executing SQL queries via preprocessing API.
|
||||
Makes HTTP POST requests to remote preprocessing service.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
"""Initialize the preprocessor connector."""
|
||||
self.api_key = APP_CONFIG.get("PP_QUERY_API_KEY")
|
||||
self.base_url = APP_CONFIG.get("PP_QUERY_BASE_URL")
|
||||
|
||||
if not self.api_key:
|
||||
logger.warning("PP_QUERY_API_KEY not found in configuration")
|
||||
if not self.base_url:
|
||||
logger.warning("PP_QUERY_BASE_URL not found in configuration")
|
||||
|
||||
# HTTP client with timeout
|
||||
self.http_client = httpx.AsyncClient(
|
||||
timeout=30.0,
|
||||
headers={
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
)
|
||||
|
||||
logger.info("PreprocessorConnector initialized")
|
||||
|
||||
async def executeQuery(self, sql_query: str) -> str:
|
||||
"""
|
||||
Execute a SQL query via the preprocessing API.
|
||||
|
||||
Args:
|
||||
sql_query: SQL SELECT query to execute
|
||||
|
||||
Returns:
|
||||
Formatted result string with query results
|
||||
|
||||
Raises:
|
||||
ValueError: If query is invalid or contains forbidden keywords
|
||||
Exception: If API request fails
|
||||
"""
|
||||
try:
|
||||
# Validate query
|
||||
validation_error = self._validateQuery(sql_query)
|
||||
if validation_error:
|
||||
return validation_error
|
||||
|
||||
# Check configuration
|
||||
if not self.api_key:
|
||||
error_msg = "Error: PP_QUERY_API_KEY not configured"
|
||||
logger.error(error_msg)
|
||||
return error_msg
|
||||
if not self.base_url:
|
||||
error_msg = "Error: PP_QUERY_BASE_URL not configured"
|
||||
logger.error(error_msg)
|
||||
return error_msg
|
||||
|
||||
# Make HTTP POST request to preprocessing API
|
||||
logger.info(f"Executing SQL query via preprocessing API: {self.base_url} (query: {sql_query[:100]}...)")
|
||||
|
||||
response = await self.http_client.post(
|
||||
self.base_url,
|
||||
json={"query": sql_query},
|
||||
headers={
|
||||
"X-DB-API-Key": self.api_key
|
||||
}
|
||||
)
|
||||
|
||||
response.raise_for_status()
|
||||
result = response.json()
|
||||
|
||||
# Parse response
|
||||
if not result.get("success"):
|
||||
error_message = result.get("message", "Unknown error")
|
||||
return f"Query failed: {error_message}"
|
||||
|
||||
# Format results
|
||||
data = result.get("data", [])
|
||||
row_count = result.get("row_count", 0)
|
||||
|
||||
# Limit to 50 rows for display
|
||||
display_data = data[:50]
|
||||
|
||||
# Format results as string
|
||||
if not display_data:
|
||||
return f"Query executed successfully. Returned {row_count} rows (no data)."
|
||||
|
||||
# Format each row
|
||||
results = []
|
||||
for row in display_data:
|
||||
results.append(str(row))
|
||||
|
||||
result_text = (
|
||||
f"Query executed successfully. Returned {row_count} rows "
|
||||
f"(showing first {min(row_count, 50)}):\n"
|
||||
+ "\n".join(results)
|
||||
)
|
||||
|
||||
return result_text
|
||||
|
||||
except httpx.HTTPStatusError as e:
|
||||
error_msg = f"API error: HTTP {e.response.status_code}"
|
||||
try:
|
||||
error_text = e.response.text
|
||||
error_msg += f" - {error_text}"
|
||||
except:
|
||||
pass
|
||||
logger.error(f"Preprocessing API HTTP error: {error_msg}")
|
||||
return error_msg
|
||||
|
||||
except httpx.RequestError as e:
|
||||
error_msg = f"Network error: {str(e)}"
|
||||
logger.error(f"Preprocessing API network error: {error_msg}")
|
||||
return error_msg
|
||||
|
||||
except Exception as e:
|
||||
error_msg = f"Error executing query: {str(e)}"
|
||||
logger.error(f"Preprocessing API error: {error_msg}")
|
||||
return error_msg
|
||||
|
||||
def _validateQuery(self, sql_query: str) -> Optional[str]:
|
||||
"""
|
||||
Validate SQL query to ensure only SELECT queries are allowed.
|
||||
|
||||
Args:
|
||||
sql_query: SQL query to validate
|
||||
|
||||
Returns:
|
||||
Error message if validation fails, None if valid
|
||||
"""
|
||||
if not sql_query or not isinstance(sql_query, str):
|
||||
return "Error: SQL query must be a non-empty string"
|
||||
|
||||
query_upper = sql_query.strip().upper()
|
||||
|
||||
# Check if query starts with SELECT
|
||||
if not query_upper.startswith("SELECT"):
|
||||
return "Error: Only SELECT queries are allowed. Query must start with SELECT."
|
||||
|
||||
# Check for forbidden keywords
|
||||
forbidden_keywords = [
|
||||
"DROP", "CREATE", "ALTER", "INSERT", "UPDATE",
|
||||
"DELETE", "PRAGMA", "ATTACH", "DETACH", "TRUNCATE"
|
||||
]
|
||||
|
||||
for keyword in forbidden_keywords:
|
||||
if keyword in query_upper:
|
||||
return f"Error: Query contains forbidden keyword '{keyword}'. Only SELECT queries are allowed."
|
||||
|
||||
return None
|
||||
|
||||
async def close(self):
|
||||
"""Close the HTTP client."""
|
||||
await self.http_client.aclose()
|
||||
|
||||
|
|
@ -274,6 +274,7 @@ registerModelLabels(
|
|||
class WorkflowModeEnum(str, Enum):
|
||||
WORKFLOW_DYNAMIC = "Dynamic"
|
||||
WORKFLOW_AUTOMATION = "Automation"
|
||||
WORKFLOW_CHATBOT = "Chatbot"
|
||||
|
||||
|
||||
registerModelLabels(
|
||||
|
|
@ -282,6 +283,7 @@ registerModelLabels(
|
|||
{
|
||||
"WORKFLOW_DYNAMIC": {"en": "Dynamic", "fr": "Dynamique"},
|
||||
"WORKFLOW_AUTOMATION": {"en": "Automation", "fr": "Automatisation"},
|
||||
"WORKFLOW_CHATBOT": {"en": "Chatbot", "fr": "Chatbot"},
|
||||
},
|
||||
)
|
||||
|
||||
|
|
@ -316,6 +318,10 @@ class ChatWorkflow(BaseModel):
|
|||
"value": WorkflowModeEnum.WORKFLOW_AUTOMATION.value,
|
||||
"label": {"en": "Automation", "fr": "Automatisation"},
|
||||
},
|
||||
{
|
||||
"value": WorkflowModeEnum.WORKFLOW_CHATBOT.value,
|
||||
"label": {"en": "Chatbot", "fr": "Chatbot"},
|
||||
},
|
||||
]})
|
||||
maxSteps: int = Field(default=10, description="Maximum number of iterations in dynamic mode", json_schema_extra={"frontend_type": "integer", "frontend_readonly": False, "frontend_required": False})
|
||||
expectedFormats: Optional[List[str]] = Field(None, description="List of expected file format extensions from user request (e.g., ['xlsx', 'pdf']). Extracted during intent analysis.", json_schema_extra={"frontend_type": "text", "frontend_readonly": True, "frontend_required": False})
|
||||
|
|
@ -379,6 +385,7 @@ class UserInputRequest(BaseModel):
|
|||
prompt: str = Field(description="Prompt for the user")
|
||||
listFileId: List[str] = Field(default_factory=list, description="List of file IDs")
|
||||
userLanguage: str = Field(default="en", description="User's preferred language")
|
||||
workflowId: Optional[str] = Field(None, description="Optional ID of the workflow to continue")
|
||||
|
||||
|
||||
registerModelLabels(
|
||||
|
|
|
|||
7
modules/features/chatbot/__init__.py
Normal file
7
modules/features/chatbot/__init__.py
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Copyright (c) 2025 Patrick Motsch
|
||||
# All rights reserved.
|
||||
|
||||
from .mainChatbot import chatProcess
|
||||
|
||||
__all__ = ['chatProcess']
|
||||
|
||||
152
modules/features/chatbot/eventManager.py
Normal file
152
modules/features/chatbot/eventManager.py
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
# Copyright (c) 2025 Patrick Motsch
|
||||
# All rights reserved.
|
||||
"""
|
||||
Event manager for chatbot streaming.
|
||||
Manages event queues for SSE streaming of chatbot progress updates.
|
||||
"""
|
||||
|
||||
import logging
|
||||
import asyncio
|
||||
from typing import Dict, Optional, Any
|
||||
from datetime import datetime
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ChatbotEventManager:
|
||||
"""
|
||||
Manages event queues for chatbot streaming.
|
||||
Thread-safe event emission and queue management.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
"""Initialize the event manager."""
|
||||
self._queues: Dict[str, asyncio.Queue] = {}
|
||||
self._locks: Dict[str, asyncio.Lock] = {}
|
||||
self._cleanup_tasks: Dict[str, asyncio.Task] = {}
|
||||
|
||||
def create_queue(self, workflow_id: str) -> asyncio.Queue:
|
||||
"""
|
||||
Create a new event queue for a workflow.
|
||||
|
||||
Args:
|
||||
workflow_id: Workflow ID
|
||||
|
||||
Returns:
|
||||
Event queue for the workflow
|
||||
"""
|
||||
if workflow_id not in self._queues:
|
||||
self._queues[workflow_id] = asyncio.Queue()
|
||||
self._locks[workflow_id] = asyncio.Lock()
|
||||
logger.debug(f"Created event queue for workflow {workflow_id}")
|
||||
return self._queues[workflow_id]
|
||||
|
||||
def get_queue(self, workflow_id: str) -> Optional[asyncio.Queue]:
|
||||
"""
|
||||
Get existing event queue for a workflow.
|
||||
|
||||
Args:
|
||||
workflow_id: Workflow ID
|
||||
|
||||
Returns:
|
||||
Event queue if exists, None otherwise
|
||||
"""
|
||||
return self._queues.get(workflow_id)
|
||||
|
||||
async def emit_event(
|
||||
self,
|
||||
workflow_id: str,
|
||||
event_type: str,
|
||||
message: str,
|
||||
step: Optional[str] = None,
|
||||
data: Optional[Dict[str, Any]] = None
|
||||
):
|
||||
"""
|
||||
Emit an event to the workflow's event queue.
|
||||
|
||||
Args:
|
||||
workflow_id: Workflow ID
|
||||
event_type: Type of event ("status", "progress", "complete", "error")
|
||||
message: Event message
|
||||
step: Current processing step (optional)
|
||||
data: Additional event data (optional)
|
||||
"""
|
||||
queue = self.get_queue(workflow_id)
|
||||
if not queue:
|
||||
logger.debug(f"No event queue found for workflow {workflow_id}, skipping event")
|
||||
return
|
||||
|
||||
event = {
|
||||
"type": event_type,
|
||||
"message": message,
|
||||
"timestamp": datetime.now().timestamp(),
|
||||
"step": step,
|
||||
"data": data or {}
|
||||
}
|
||||
|
||||
try:
|
||||
await queue.put(event)
|
||||
logger.debug(f"Emitted {event_type} event for workflow {workflow_id}: {message[:50]}")
|
||||
except Exception as e:
|
||||
logger.error(f"Error emitting event for workflow {workflow_id}: {e}")
|
||||
|
||||
async def cleanup(self, workflow_id: str, delay: float = 60.0):
|
||||
"""
|
||||
Schedule cleanup of event queue after delay.
|
||||
This allows time for any remaining events to be consumed.
|
||||
|
||||
Args:
|
||||
workflow_id: Workflow ID
|
||||
delay: Delay in seconds before cleanup (default: 60 seconds)
|
||||
"""
|
||||
if workflow_id in self._cleanup_tasks:
|
||||
# Cancel existing cleanup task
|
||||
self._cleanup_tasks[workflow_id].cancel()
|
||||
|
||||
async def _cleanup():
|
||||
try:
|
||||
await asyncio.sleep(delay)
|
||||
if workflow_id in self._queues:
|
||||
# Drain remaining events
|
||||
queue = self._queues[workflow_id]
|
||||
while not queue.empty():
|
||||
try:
|
||||
queue.get_nowait()
|
||||
except asyncio.QueueEmpty:
|
||||
break
|
||||
|
||||
del self._queues[workflow_id]
|
||||
del self._locks[workflow_id]
|
||||
logger.info(f"Cleaned up event queue for workflow {workflow_id}")
|
||||
except asyncio.CancelledError:
|
||||
pass
|
||||
except Exception as e:
|
||||
logger.error(f"Error during cleanup for workflow {workflow_id}: {e}")
|
||||
finally:
|
||||
if workflow_id in self._cleanup_tasks:
|
||||
del self._cleanup_tasks[workflow_id]
|
||||
|
||||
self._cleanup_tasks[workflow_id] = asyncio.create_task(_cleanup())
|
||||
|
||||
def has_queue(self, workflow_id: str) -> bool:
|
||||
"""
|
||||
Check if a queue exists for a workflow.
|
||||
|
||||
Args:
|
||||
workflow_id: Workflow ID
|
||||
|
||||
Returns:
|
||||
True if queue exists, False otherwise
|
||||
"""
|
||||
return workflow_id in self._queues
|
||||
|
||||
|
||||
# Global singleton instance
|
||||
_event_manager = ChatbotEventManager()
|
||||
|
||||
|
||||
def get_event_manager() -> ChatbotEventManager:
|
||||
"""Get the global event manager instance."""
|
||||
return _event_manager
|
||||
|
||||
|
||||
1352
modules/features/chatbot/mainChatbot.py
Normal file
1352
modules/features/chatbot/mainChatbot.py
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -643,11 +643,11 @@ class ChatObjects:
|
|||
id=workflow["id"],
|
||||
status=workflow.get("status", "running"),
|
||||
name=workflow.get("name"),
|
||||
currentRound=workflow.get("currentRound", 0),
|
||||
currentTask=workflow.get("currentTask", 0),
|
||||
currentAction=workflow.get("currentAction", 0),
|
||||
totalTasks=workflow.get("totalTasks", 0),
|
||||
totalActions=workflow.get("totalActions", 0),
|
||||
currentRound=workflow.get("currentRound", 0) or 0,
|
||||
currentTask=workflow.get("currentTask", 0) or 0,
|
||||
currentAction=workflow.get("currentAction", 0) or 0,
|
||||
totalTasks=workflow.get("totalTasks", 0) or 0,
|
||||
totalActions=workflow.get("totalActions", 0) or 0,
|
||||
lastActivity=workflow.get("lastActivity", getUtcTimestamp()),
|
||||
startedAt=workflow.get("startedAt", getUtcTimestamp()),
|
||||
logs=logs,
|
||||
|
|
@ -684,11 +684,11 @@ class ChatObjects:
|
|||
id=created["id"],
|
||||
status=created.get("status", "running"),
|
||||
name=created.get("name"),
|
||||
currentRound=created.get("currentRound", 0),
|
||||
currentTask=created.get("currentTask", 0),
|
||||
currentAction=created.get("currentAction", 0),
|
||||
totalTasks=created.get("totalTasks", 0),
|
||||
totalActions=created.get("totalActions", 0),
|
||||
currentRound=created.get("currentRound", 0) or 0,
|
||||
currentTask=created.get("currentTask", 0) or 0,
|
||||
currentAction=created.get("currentAction", 0) or 0,
|
||||
totalTasks=created.get("totalTasks", 0) or 0,
|
||||
totalActions=created.get("totalActions", 0) or 0,
|
||||
lastActivity=created.get("lastActivity", currentTime),
|
||||
startedAt=created.get("startedAt", currentTime),
|
||||
logs=[],
|
||||
|
|
@ -1394,6 +1394,27 @@ class ChatObjects:
|
|||
# Create log in normalized table
|
||||
createdLog = self.db.recordCreate(ChatLog, log_model)
|
||||
|
||||
# Emit log event for streaming (if event manager is available)
|
||||
try:
|
||||
from modules.features.chatbot.eventManager import get_event_manager
|
||||
event_manager = get_event_manager()
|
||||
log_timestamp = parseTimestamp(createdLog.get("timestamp"), default=getUtcTimestamp())
|
||||
# Emit log event in exact chatData format: {type, createdAt, item}
|
||||
asyncio.create_task(event_manager.emit_event(
|
||||
workflowId,
|
||||
"chatdata",
|
||||
"New log",
|
||||
"log",
|
||||
{
|
||||
"type": "log",
|
||||
"createdAt": log_timestamp,
|
||||
"item": ChatLog(**createdLog).dict()
|
||||
}
|
||||
))
|
||||
except Exception as e:
|
||||
# Event manager not available or error - continue without emitting
|
||||
logger.debug(f"Could not emit log event: {e}")
|
||||
|
||||
# Return validated ChatLog instance
|
||||
return ChatLog(**createdLog)
|
||||
|
||||
|
|
|
|||
444
modules/routes/routeChatbot.py
Normal file
444
modules/routes/routeChatbot.py
Normal file
|
|
@ -0,0 +1,444 @@
|
|||
# Copyright (c) 2025 Patrick Motsch
|
||||
# All rights reserved.
|
||||
"""
|
||||
Chatbot routes for the backend API.
|
||||
Implements simple chatbot endpoints using direct AI center calls via chatbot feature.
|
||||
"""
|
||||
|
||||
import logging
|
||||
import json
|
||||
import asyncio
|
||||
import math
|
||||
from typing import Optional, Any, Dict, Union
|
||||
from fastapi import APIRouter, HTTPException, Depends, Body, Path, Query, Request, status
|
||||
from fastapi.responses import StreamingResponse
|
||||
from modules.shared.timeUtils import parseTimestamp
|
||||
|
||||
# Import auth modules
|
||||
from modules.auth import limiter, getCurrentUser
|
||||
|
||||
# Import interfaces
|
||||
import modules.interfaces.interfaceDbChatObjects as interfaceDbChatObjects
|
||||
from modules.interfaces.interfaceRbac import getRecordsetWithRBAC
|
||||
|
||||
# Import models
|
||||
from modules.datamodels.datamodelChat import ChatWorkflow, UserInputRequest, WorkflowModeEnum
|
||||
from modules.datamodels.datamodelUam import User
|
||||
from modules.datamodels.datamodelPagination import PaginationParams, PaginatedResponse
|
||||
|
||||
# Import chatbot feature
|
||||
from modules.features.chatbot import chatProcess
|
||||
from modules.features.chatbot.eventManager import get_event_manager
|
||||
|
||||
# Import workflow control functions
|
||||
from modules.features.workflow import chatStop
|
||||
|
||||
# Configure logger
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Create router for chatbot endpoints
|
||||
router = APIRouter(
|
||||
prefix="/api/chatbot",
|
||||
tags=["Chatbot"],
|
||||
responses={404: {"description": "Not found"}}
|
||||
)
|
||||
|
||||
def getServiceChat(currentUser: User):
|
||||
return interfaceDbChatObjects.getInterface(currentUser)
|
||||
|
||||
# Chatbot streaming endpoint (SSE)
|
||||
@router.post("/start/stream")
|
||||
@limiter.limit("120/minute")
|
||||
async def stream_chatbot_start(
|
||||
request: Request,
|
||||
workflowId: Optional[str] = Query(None, description="Optional ID of the workflow to continue (can also be in request body)"),
|
||||
userInput: UserInputRequest = Body(...),
|
||||
currentUser: User = Depends(getCurrentUser)
|
||||
) -> StreamingResponse:
|
||||
"""
|
||||
Starts a new chatbot workflow or continues an existing one with SSE streaming.
|
||||
Streams progress updates in real-time via Server-Sent Events.
|
||||
|
||||
workflowId can be provided either:
|
||||
- As a query parameter: /api/chatbot/start/stream?workflowId=xxx
|
||||
- In the request body as part of UserInputRequest
|
||||
- Query parameter takes precedence if both are provided
|
||||
"""
|
||||
event_manager = get_event_manager()
|
||||
|
||||
try:
|
||||
# Use workflowId from query parameter if provided, otherwise from request body
|
||||
final_workflow_id = workflowId or userInput.workflowId
|
||||
|
||||
# Start background processing (this will create the workflow and event queue)
|
||||
workflow = await chatProcess(currentUser, userInput, final_workflow_id)
|
||||
|
||||
# Get event queue for the workflow
|
||||
queue = event_manager.get_queue(workflow.id)
|
||||
if not queue:
|
||||
# Create queue if it doesn't exist
|
||||
queue = event_manager.create_queue(workflow.id)
|
||||
|
||||
async def event_stream():
|
||||
"""Async generator for SSE events."""
|
||||
try:
|
||||
# Get interface for status checks and chat data
|
||||
interfaceDbChat = getServiceChat(currentUser)
|
||||
|
||||
# Send initial chat data (exact format as chatData endpoint)
|
||||
try:
|
||||
chatData = interfaceDbChat.getUnifiedChatData(workflow.id, None)
|
||||
if chatData.get("items"):
|
||||
for item in chatData["items"]:
|
||||
# Emit item directly in exact chatData format: {type, createdAt, item}
|
||||
yield f"data: {json.dumps(item)}\n\n"
|
||||
# Set initial timestamp for incremental fetching
|
||||
if chatData["items"]:
|
||||
timestamps = [parseTimestamp(item.get("createdAt"), default=0) for item in chatData["items"]]
|
||||
last_chatdata_timestamp = max(timestamps) if timestamps else None
|
||||
else:
|
||||
last_chatdata_timestamp = None
|
||||
else:
|
||||
last_chatdata_timestamp = None
|
||||
except Exception as e:
|
||||
logger.warning(f"Error fetching initial chat data: {e}")
|
||||
last_chatdata_timestamp = None
|
||||
|
||||
# Keepalive interval (30 seconds)
|
||||
keepalive_interval = 30.0
|
||||
last_keepalive = asyncio.get_event_loop().time()
|
||||
|
||||
# Status check interval (check workflow status every 3 seconds)
|
||||
status_check_interval = 3.0
|
||||
last_status_check = asyncio.get_event_loop().time()
|
||||
|
||||
# Chat data fetch interval (fetch chat data every 0.5 seconds for real-time updates)
|
||||
chatdata_fetch_interval = 0.5
|
||||
last_chatdata_fetch = asyncio.get_event_loop().time()
|
||||
|
||||
# Stream events until completion or timeout
|
||||
timeout = 300.0 # 5 minutes max
|
||||
start_time = asyncio.get_event_loop().time()
|
||||
|
||||
while True:
|
||||
# Check timeout
|
||||
elapsed = asyncio.get_event_loop().time() - start_time
|
||||
if elapsed > timeout:
|
||||
# Timeout - just close stream, don't emit non-chatData format events
|
||||
logger.info(f"Stream timeout for workflow {workflow.id}")
|
||||
break
|
||||
|
||||
# Check for client disconnection
|
||||
if await request.is_disconnected():
|
||||
logger.info(f"Client disconnected for workflow {workflow.id}")
|
||||
break
|
||||
|
||||
current_time = asyncio.get_event_loop().time()
|
||||
|
||||
# Periodically check workflow status and fetch chat data
|
||||
if current_time - last_status_check >= status_check_interval:
|
||||
try:
|
||||
current_workflow = interfaceDbChat.getWorkflow(workflow.id)
|
||||
if current_workflow and current_workflow.status == "stopped":
|
||||
logger.info(f"Workflow {workflow.id} was stopped, closing stream")
|
||||
# Don't emit stopped event - just close stream
|
||||
break
|
||||
except Exception as e:
|
||||
logger.warning(f"Error checking workflow status: {e}")
|
||||
last_status_check = current_time
|
||||
|
||||
# Periodically fetch and emit chat data
|
||||
if current_time - last_chatdata_fetch >= chatdata_fetch_interval:
|
||||
try:
|
||||
chatData = interfaceDbChat.getUnifiedChatData(workflow.id, last_chatdata_timestamp)
|
||||
if chatData.get("items"):
|
||||
# Emit items directly in exact chatData format: {type, createdAt, item}
|
||||
for item in chatData["items"]:
|
||||
yield f"data: {json.dumps(item)}\n\n"
|
||||
# Update timestamp to only get new items next time
|
||||
if chatData["items"]:
|
||||
# Parse timestamps and get the maximum
|
||||
timestamps = []
|
||||
for item in chatData["items"]:
|
||||
ts = parseTimestamp(item.get("createdAt"), default=0)
|
||||
timestamps.append(ts)
|
||||
if timestamps:
|
||||
last_chatdata_timestamp = max(timestamps)
|
||||
except Exception as e:
|
||||
logger.warning(f"Error fetching chat data: {e}")
|
||||
last_chatdata_fetch = current_time
|
||||
|
||||
# Try to get event with timeout
|
||||
try:
|
||||
event = await asyncio.wait_for(queue.get(), timeout=1.0)
|
||||
|
||||
# Only emit chatdata events (messages, logs, stats) in exact chatData format
|
||||
# Ignore status/progress/complete/stopped/error events that don't match the format
|
||||
if event.get("type") == "chatdata" and event.get("data"):
|
||||
# Emit item directly in exact chatData format: {type, createdAt, item}
|
||||
chatdata_item = event.get("data")
|
||||
yield f"data: {json.dumps(chatdata_item)}\n\n"
|
||||
# Update timestamp for incremental fetching
|
||||
if chatdata_item.get("createdAt"):
|
||||
last_chatdata_timestamp = parseTimestamp(chatdata_item["createdAt"], default=None)
|
||||
|
||||
# Check if this is a completion/stopped event to close stream
|
||||
if event.get("type") == "complete":
|
||||
logger.info(f"Workflow {workflow.id} completed, closing stream")
|
||||
break
|
||||
elif event.get("type") == "stopped":
|
||||
# Workflow was stopped, close stream
|
||||
logger.info(f"Workflow {workflow.id} stopped, closing stream")
|
||||
break
|
||||
elif event.get("type") == "error" and event.get("step") == "error":
|
||||
# Final error, close stream
|
||||
logger.warning(f"Workflow {workflow.id} error, closing stream")
|
||||
break
|
||||
|
||||
last_keepalive = asyncio.get_event_loop().time()
|
||||
except asyncio.TimeoutError:
|
||||
# Send keepalive if needed
|
||||
current_time = asyncio.get_event_loop().time()
|
||||
if current_time - last_keepalive >= keepalive_interval:
|
||||
yield f": keepalive\n\n"
|
||||
last_keepalive = current_time
|
||||
continue
|
||||
except Exception as e:
|
||||
logger.error(f"Error in event stream: {e}")
|
||||
yield f"data: {json.dumps({'type': 'error', 'message': f'Stream error: {str(e)}'})}\n\n"
|
||||
break
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"Error in event stream generator: {e}", exc_info=True)
|
||||
# Don't emit error events that don't match chatData format
|
||||
finally:
|
||||
# Stream ends - no final event needed as it doesn't match chatData format
|
||||
pass
|
||||
|
||||
return StreamingResponse(
|
||||
event_stream(),
|
||||
media_type="text/event-stream",
|
||||
headers={
|
||||
"Cache-Control": "no-cache",
|
||||
"Connection": "keep-alive",
|
||||
"X-Accel-Buffering": "no" # Disable buffering for nginx
|
||||
}
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"Error in stream_chatbot_start: {str(e)}", exc_info=True)
|
||||
raise HTTPException(
|
||||
status_code=500,
|
||||
detail=str(e)
|
||||
)
|
||||
|
||||
|
||||
# Workflow stop endpoint
|
||||
@router.post("/{workflowId}/stop", response_model=ChatWorkflow)
|
||||
@limiter.limit("120/minute")
|
||||
async def stop_chatbot(
|
||||
request: Request,
|
||||
workflowId: str = Path(..., description="ID of the workflow to stop"),
|
||||
currentUser: User = Depends(getCurrentUser)
|
||||
) -> ChatWorkflow:
|
||||
"""Stops a running chatbot workflow."""
|
||||
try:
|
||||
workflow = await chatStop(currentUser, workflowId)
|
||||
|
||||
# Emit stopped event to active streams
|
||||
event_manager = get_event_manager()
|
||||
await event_manager.emit_event(
|
||||
workflowId,
|
||||
"stopped",
|
||||
"Workflow stopped by user",
|
||||
"stopped"
|
||||
)
|
||||
logger.info(f"Emitted stopped event for workflow {workflowId}")
|
||||
|
||||
return workflow
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"Error in stop_chatbot: {str(e)}")
|
||||
raise HTTPException(
|
||||
status_code=500,
|
||||
detail=str(e)
|
||||
)
|
||||
|
||||
# Delete chatbot workflow endpoint
|
||||
@router.delete("/{workflowId}", response_model=Dict[str, Any])
|
||||
@limiter.limit("120/minute")
|
||||
async def delete_chatbot(
|
||||
request: Request,
|
||||
workflowId: str = Path(..., description="ID of the workflow to delete"),
|
||||
currentUser: User = Depends(getCurrentUser)
|
||||
) -> Dict[str, Any]:
|
||||
"""Deletes a chatbot workflow and its associated data."""
|
||||
try:
|
||||
# Get service center
|
||||
interfaceDbChat = getServiceChat(currentUser)
|
||||
|
||||
# Check workflow access and permission using RBAC
|
||||
workflows = getRecordsetWithRBAC(
|
||||
interfaceDbChat.db,
|
||||
ChatWorkflow,
|
||||
currentUser,
|
||||
recordFilter={"id": workflowId}
|
||||
)
|
||||
if not workflows:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND,
|
||||
detail=f"Workflow with ID {workflowId} not found"
|
||||
)
|
||||
|
||||
workflow_data = workflows[0]
|
||||
|
||||
# Check if workflow is a chatbot workflow
|
||||
if workflow_data.get("workflowMode") != WorkflowModeEnum.WORKFLOW_CHATBOT.value:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_400_BAD_REQUEST,
|
||||
detail=f"Workflow {workflowId} is not a chatbot workflow"
|
||||
)
|
||||
|
||||
# Check if user has permission to delete using RBAC
|
||||
if not interfaceDbChat.checkRbacPermission(ChatWorkflow, "delete", workflowId):
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_403_FORBIDDEN,
|
||||
detail="You don't have permission to delete this workflow"
|
||||
)
|
||||
|
||||
# Delete workflow
|
||||
success = interfaceDbChat.deleteWorkflow(workflowId)
|
||||
|
||||
if not success:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
||||
detail="Failed to delete workflow"
|
||||
)
|
||||
|
||||
return {
|
||||
"id": workflowId,
|
||||
"message": "Chatbot workflow and associated data deleted successfully"
|
||||
}
|
||||
except HTTPException:
|
||||
raise
|
||||
except Exception as e:
|
||||
logger.error(f"Error in delete_chatbot: {str(e)}", exc_info=True)
|
||||
raise HTTPException(
|
||||
status_code=500,
|
||||
detail=f"Error deleting chatbot workflow: {str(e)}"
|
||||
)
|
||||
|
||||
# List chatbot threads/workflows or get specific thread details
|
||||
@router.get("/threads")
|
||||
@limiter.limit("120/minute")
|
||||
async def get_chatbot_threads(
|
||||
request: Request,
|
||||
workflowId: Optional[str] = Query(None, description="Optional workflow ID to get details and chat data for a specific thread"),
|
||||
pagination: Optional[str] = Query(None, description="JSON-encoded PaginationParams object (only used when workflowId is not provided)"),
|
||||
currentUser: User = Depends(getCurrentUser)
|
||||
) -> Union[PaginatedResponse[ChatWorkflow], Dict[str, Any]]:
|
||||
"""
|
||||
List all chatbot workflows (threads) for the current user, or get details and chat data for a specific thread.
|
||||
|
||||
- If workflowId is provided: Returns the workflow details and all chat data (messages, logs, stats)
|
||||
- If workflowId is not provided: Returns a paginated list of all workflows
|
||||
"""
|
||||
try:
|
||||
interfaceDbChat = getServiceChat(currentUser)
|
||||
|
||||
# If workflowId is provided, return single workflow with chat data
|
||||
if workflowId:
|
||||
workflow = interfaceDbChat.getWorkflow(workflowId)
|
||||
if not workflow:
|
||||
raise HTTPException(
|
||||
status_code=404,
|
||||
detail=f"Workflow with ID {workflowId} not found"
|
||||
)
|
||||
|
||||
# Get unified chat data for this workflow
|
||||
chatData = interfaceDbChat.getUnifiedChatData(workflowId, None)
|
||||
|
||||
return {
|
||||
"workflow": workflow,
|
||||
"chatData": chatData
|
||||
}
|
||||
|
||||
# Otherwise, return paginated list of workflows
|
||||
# Parse pagination parameter
|
||||
paginationParams = None
|
||||
if pagination:
|
||||
try:
|
||||
paginationDict = json.loads(pagination)
|
||||
paginationParams = PaginationParams(**paginationDict) if paginationDict else None
|
||||
except (json.JSONDecodeError, ValueError) as e:
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
detail=f"Invalid pagination parameter: {str(e)}"
|
||||
)
|
||||
|
||||
# Get all workflows filtered by mandateId (RBAC handles this automatically)
|
||||
# We get all workflows first to filter by workflowMode before pagination
|
||||
all_workflows = interfaceDbChat.getWorkflows(pagination=None)
|
||||
|
||||
# Filter to only include chatbot workflows
|
||||
chatbot_workflows_data = [
|
||||
wf for wf in all_workflows
|
||||
if wf.get("workflowMode") == WorkflowModeEnum.WORKFLOW_CHATBOT.value
|
||||
]
|
||||
|
||||
# Apply pagination if requested
|
||||
if paginationParams:
|
||||
# Apply sorting if provided
|
||||
if paginationParams.sort:
|
||||
chatbot_workflows_data = interfaceDbChat._applySorting(chatbot_workflows_data, paginationParams.sort)
|
||||
|
||||
# Count total items after filtering
|
||||
totalItems = len(chatbot_workflows_data)
|
||||
totalPages = math.ceil(totalItems / paginationParams.pageSize) if totalItems > 0 else 0
|
||||
|
||||
# Apply pagination (skip/limit)
|
||||
startIdx = (paginationParams.page - 1) * paginationParams.pageSize
|
||||
endIdx = startIdx + paginationParams.pageSize
|
||||
workflows_data = chatbot_workflows_data[startIdx:endIdx]
|
||||
else:
|
||||
workflows_data = chatbot_workflows_data
|
||||
totalItems = len(chatbot_workflows_data)
|
||||
totalPages = 1
|
||||
|
||||
# Convert raw dictionaries to ChatWorkflow objects
|
||||
workflows = []
|
||||
for workflow_data in workflows_data:
|
||||
try:
|
||||
# Load the workflow properly
|
||||
workflow = interfaceDbChat.getWorkflow(workflow_data["id"])
|
||||
if workflow:
|
||||
workflows.append(workflow)
|
||||
except Exception as e:
|
||||
logger.warning(f"Error loading workflow {workflow_data.get('id')}: {e}")
|
||||
continue
|
||||
|
||||
# Create paginated response
|
||||
from modules.datamodels.datamodelPagination import PaginationMetadata
|
||||
metadata = PaginationMetadata(
|
||||
currentPage=paginationParams.page if paginationParams else 1,
|
||||
pageSize=paginationParams.pageSize if paginationParams else len(workflows),
|
||||
totalItems=totalItems,
|
||||
totalPages=totalPages,
|
||||
sort=paginationParams.sort if paginationParams else [],
|
||||
filters=paginationParams.filters if paginationParams else None
|
||||
)
|
||||
|
||||
return PaginatedResponse(
|
||||
items=workflows,
|
||||
pagination=metadata
|
||||
)
|
||||
|
||||
except HTTPException:
|
||||
raise
|
||||
except Exception as e:
|
||||
logger.error(f"Error getting chatbot threads: {str(e)}", exc_info=True)
|
||||
raise HTTPException(
|
||||
status_code=500,
|
||||
detail=f"Error getting chatbot threads: {str(e)}"
|
||||
)
|
||||
|
||||
6
modules/workflows/methods/methodChatbot/__init__.py
Normal file
6
modules/workflows/methods/methodChatbot/__init__.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# Copyright (c) 2025 Patrick Motsch
|
||||
# All rights reserved.
|
||||
|
||||
from .methodChatbot import MethodChatbot
|
||||
|
||||
__all__ = ['MethodChatbot']
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Copyright (c) 2025 Patrick Motsch
|
||||
# All rights reserved.
|
||||
|
||||
146
modules/workflows/methods/methodChatbot/actions/queryDatabase.py
Normal file
146
modules/workflows/methods/methodChatbot/actions/queryDatabase.py
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
# Copyright (c) 2025 Patrick Motsch
|
||||
# All rights reserved.
|
||||
|
||||
"""
|
||||
Query Database action for Chatbot operations.
|
||||
Executes SQL queries via the preprocessor connector.
|
||||
"""
|
||||
|
||||
import logging
|
||||
import json
|
||||
import time
|
||||
from typing import Dict, Any
|
||||
from modules.workflows.methods.methodBase import action
|
||||
from modules.datamodels.datamodelChat import ActionResult, ActionDocument
|
||||
from modules.connectors.connectorPreprocessor import PreprocessorConnector
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@action
|
||||
async def queryDatabase(self, parameters: Dict[str, Any]) -> ActionResult:
|
||||
"""
|
||||
Execute a SQL query via the preprocessor connector.
|
||||
|
||||
Parameters:
|
||||
- sqlQuery (str, required): SQL SELECT query to execute. Can also be extracted from analysis_result document if provided in documentList.
|
||||
"""
|
||||
try:
|
||||
# Init progress logger
|
||||
workflowId = self.services.workflow.id if self.services.workflow else f"no-workflow-{int(time.time())}"
|
||||
operationId = f"chatbot_query_db_{workflowId}_{int(time.time())}"
|
||||
|
||||
# Start progress tracking
|
||||
parentOperationId = parameters.get('parentOperationId')
|
||||
self.services.chat.progressLogStart(
|
||||
operationId,
|
||||
"Database Query",
|
||||
"Executing SQL Query",
|
||||
"Preprocessing API",
|
||||
parentOperationId=parentOperationId
|
||||
)
|
||||
|
||||
# Get SQL query from parameters or extract from documentList
|
||||
sqlQuery = parameters.get("sqlQuery")
|
||||
|
||||
# If sqlQuery not provided, try to extract from documentList (analysis_result)
|
||||
if not sqlQuery:
|
||||
documentListParam = parameters.get("documentList")
|
||||
if documentListParam:
|
||||
# Get documents from previous task
|
||||
from modules.datamodels.datamodelDocref import DocumentReferenceList
|
||||
if isinstance(documentListParam, str):
|
||||
docList = DocumentReferenceList.from_string_list([documentListParam])
|
||||
elif isinstance(documentListParam, list):
|
||||
docList = DocumentReferenceList.from_string_list(documentListParam)
|
||||
else:
|
||||
docList = documentListParam
|
||||
|
||||
# Get documents from workflow
|
||||
documents = self.services.chat.getChatDocumentsFromDocumentList(docList)
|
||||
|
||||
# Try to extract SQL query from JSON document
|
||||
for doc in documents:
|
||||
try:
|
||||
# ChatDocument objects have fileId - get file data from database
|
||||
if hasattr(doc, 'fileId') and doc.fileId:
|
||||
# Get file data from database
|
||||
fileData = self.services.interfaceDbComponent.getFileData(doc.fileId)
|
||||
if fileData:
|
||||
# Decode bytes if needed
|
||||
if isinstance(fileData, bytes):
|
||||
docData = fileData.decode('utf-8')
|
||||
else:
|
||||
docData = str(fileData)
|
||||
|
||||
# Try to parse as JSON
|
||||
analysisData = json.loads(docData)
|
||||
sqlQuery = analysisData.get("sqlQuery")
|
||||
|
||||
if sqlQuery:
|
||||
logger.info(f"Extracted SQL query from analysis_result document: {sqlQuery[:100]}...")
|
||||
break
|
||||
except (json.JSONDecodeError, AttributeError, KeyError, TypeError) as e:
|
||||
logger.debug(f"Could not parse document as JSON: {e}")
|
||||
continue
|
||||
|
||||
if not sqlQuery:
|
||||
return ActionResult.isFailure(error="SQL query is required. Provide sqlQuery parameter or analysis_result document with sqlQuery field.")
|
||||
|
||||
# Update progress
|
||||
self.services.chat.progressLogUpdate(operationId, 0.3, "Validating query")
|
||||
|
||||
# Initialize connector
|
||||
connector = PreprocessorConnector()
|
||||
|
||||
# Update progress
|
||||
self.services.chat.progressLogUpdate(operationId, 0.5, "Executing query")
|
||||
|
||||
# Execute query
|
||||
result = await connector.executeQuery(sqlQuery)
|
||||
|
||||
# Update progress
|
||||
self.services.chat.progressLogUpdate(operationId, 0.8, "Formatting results")
|
||||
|
||||
# Generate meaningful filename
|
||||
meaningful_name = self._generateMeaningfulFileName(
|
||||
base_name="database_query",
|
||||
extension="txt",
|
||||
action_name="queryDatabase"
|
||||
)
|
||||
|
||||
# Create validation metadata
|
||||
validationMetadata = self._createValidationMetadata(
|
||||
"queryDatabase",
|
||||
sqlQuery=sqlQuery[:200] if len(sqlQuery) > 200 else sqlQuery, # Truncate for metadata
|
||||
resultLength=len(result)
|
||||
)
|
||||
|
||||
# Create action document
|
||||
document = ActionDocument(
|
||||
documentName=meaningful_name,
|
||||
documentData=result,
|
||||
mimeType="text/plain",
|
||||
validationMetadata=validationMetadata
|
||||
)
|
||||
|
||||
# Complete progress tracking
|
||||
self.services.chat.progressLogFinish(operationId, True)
|
||||
|
||||
# Close connector
|
||||
await connector.close()
|
||||
|
||||
return ActionResult.isSuccess(documents=[document])
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"Error executing database query: {str(e)}")
|
||||
|
||||
# Complete progress tracking with failure
|
||||
try:
|
||||
self.services.chat.progressLogFinish(operationId, False)
|
||||
except:
|
||||
pass
|
||||
|
||||
return ActionResult.isFailure(
|
||||
error=str(e)
|
||||
)
|
||||
|
||||
52
modules/workflows/methods/methodChatbot/methodChatbot.py
Normal file
52
modules/workflows/methods/methodChatbot/methodChatbot.py
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
# Copyright (c) 2025 Patrick Motsch
|
||||
# All rights reserved.
|
||||
|
||||
import logging
|
||||
from modules.workflows.methods.methodBase import MethodBase
|
||||
from modules.datamodels.datamodelWorkflowActions import WorkflowActionDefinition, WorkflowActionParameter
|
||||
from modules.shared.frontendTypes import FrontendType
|
||||
|
||||
# Import actions
|
||||
from .actions.queryDatabase import queryDatabase
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
class MethodChatbot(MethodBase):
|
||||
"""Chatbot operations methods."""
|
||||
|
||||
def __init__(self, services):
|
||||
super().__init__(services)
|
||||
self.name = "chatbot"
|
||||
self.description = "Chatbot operations"
|
||||
|
||||
# RBAC-Integration: Action-Definitionen mit actionId
|
||||
self._actions = {
|
||||
"queryDatabase": WorkflowActionDefinition(
|
||||
actionId="chatbot.queryDatabase",
|
||||
description="Execute a SQL SELECT query via the preprocessor connector. Returns formatted query results.",
|
||||
parameters={
|
||||
"sqlQuery": WorkflowActionParameter(
|
||||
name="sqlQuery",
|
||||
type="str",
|
||||
frontendType=FrontendType.TEXTAREA,
|
||||
required=False,
|
||||
description="SQL SELECT query to execute. If not provided, will attempt to extract from analysis_result document in documentList."
|
||||
),
|
||||
"documentList": WorkflowActionParameter(
|
||||
name="documentList",
|
||||
type="List[str]",
|
||||
frontendType=FrontendType.DOCUMENT_REFERENCE,
|
||||
required=False,
|
||||
description="Document reference(s) containing analysis_result with sqlQuery field. Used if sqlQuery parameter is not provided."
|
||||
)
|
||||
},
|
||||
execute=queryDatabase.__get__(self, self.__class__)
|
||||
)
|
||||
}
|
||||
|
||||
# Validate actions after definition
|
||||
self._validateActions()
|
||||
|
||||
# Register actions as methods (optional, für direkten Zugriff)
|
||||
self.queryDatabase = queryDatabase.__get__(self, self.__class__)
|
||||
|
||||
1530
node_modules/.package-lock.json
generated
vendored
Normal file
1530
node_modules/.package-lock.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
21
node_modules/@types/debug/LICENSE
generated
vendored
Normal file
21
node_modules/@types/debug/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
69
node_modules/@types/debug/README.md
generated
vendored
Normal file
69
node_modules/@types/debug/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
# Installation
|
||||
> `npm install --save @types/debug`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for debug (https://github.com/debug-js/debug).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/debug.
|
||||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/debug/index.d.ts)
|
||||
````ts
|
||||
declare var debug: debug.Debug & { debug: debug.Debug; default: debug.Debug };
|
||||
|
||||
export = debug;
|
||||
export as namespace debug;
|
||||
|
||||
declare namespace debug {
|
||||
interface Debug {
|
||||
(namespace: string): Debugger;
|
||||
coerce: (val: any) => any;
|
||||
disable: () => string;
|
||||
enable: (namespaces: string) => void;
|
||||
enabled: (namespaces: string) => boolean;
|
||||
formatArgs: (this: Debugger, args: any[]) => void;
|
||||
log: (...args: any[]) => any;
|
||||
selectColor: (namespace: string) => string | number;
|
||||
humanize: typeof import("ms");
|
||||
|
||||
names: RegExp[];
|
||||
skips: RegExp[];
|
||||
|
||||
formatters: Formatters;
|
||||
|
||||
inspectOpts?: {
|
||||
hideDate?: boolean | number | null;
|
||||
colors?: boolean | number | null;
|
||||
depth?: boolean | number | null;
|
||||
showHidden?: boolean | number | null;
|
||||
};
|
||||
}
|
||||
|
||||
type IDebug = Debug;
|
||||
|
||||
interface Formatters {
|
||||
[formatter: string]: (v: any) => string;
|
||||
}
|
||||
|
||||
type IDebugger = Debugger;
|
||||
|
||||
interface Debugger {
|
||||
(formatter: any, ...args: any[]): void;
|
||||
|
||||
color: string;
|
||||
diff: number;
|
||||
enabled: boolean;
|
||||
log: (...args: any[]) => any;
|
||||
namespace: string;
|
||||
destroy: () => boolean;
|
||||
extend: (namespace: string, delimiter?: string) => Debugger;
|
||||
}
|
||||
}
|
||||
|
||||
````
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Thu, 09 Nov 2023 03:06:57 GMT
|
||||
* Dependencies: [@types/ms](https://npmjs.com/package/@types/ms)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Seon-Wook Park](https://github.com/swook), [Gal Talmor](https://github.com/galtalmor), [John McLaughlin](https://github.com/zamb3zi), [Brasten Sager](https://github.com/brasten), [Nicolas Penin](https://github.com/npenin), [Kristian Brünn](https://github.com/kristianmitk), and [Caleb Gregory](https://github.com/calebgregory).
|
||||
50
node_modules/@types/debug/index.d.ts
generated
vendored
Normal file
50
node_modules/@types/debug/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
declare var debug: debug.Debug & { debug: debug.Debug; default: debug.Debug };
|
||||
|
||||
export = debug;
|
||||
export as namespace debug;
|
||||
|
||||
declare namespace debug {
|
||||
interface Debug {
|
||||
(namespace: string): Debugger;
|
||||
coerce: (val: any) => any;
|
||||
disable: () => string;
|
||||
enable: (namespaces: string) => void;
|
||||
enabled: (namespaces: string) => boolean;
|
||||
formatArgs: (this: Debugger, args: any[]) => void;
|
||||
log: (...args: any[]) => any;
|
||||
selectColor: (namespace: string) => string | number;
|
||||
humanize: typeof import("ms");
|
||||
|
||||
names: RegExp[];
|
||||
skips: RegExp[];
|
||||
|
||||
formatters: Formatters;
|
||||
|
||||
inspectOpts?: {
|
||||
hideDate?: boolean | number | null;
|
||||
colors?: boolean | number | null;
|
||||
depth?: boolean | number | null;
|
||||
showHidden?: boolean | number | null;
|
||||
};
|
||||
}
|
||||
|
||||
type IDebug = Debug;
|
||||
|
||||
interface Formatters {
|
||||
[formatter: string]: (v: any) => string;
|
||||
}
|
||||
|
||||
type IDebugger = Debugger;
|
||||
|
||||
interface Debugger {
|
||||
(formatter: any, ...args: any[]): void;
|
||||
|
||||
color: string;
|
||||
diff: number;
|
||||
enabled: boolean;
|
||||
log: (...args: any[]) => any;
|
||||
namespace: string;
|
||||
destroy: () => boolean;
|
||||
extend: (namespace: string, delimiter?: string) => Debugger;
|
||||
}
|
||||
}
|
||||
57
node_modules/@types/debug/package.json
generated
vendored
Normal file
57
node_modules/@types/debug/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"name": "@types/debug",
|
||||
"version": "4.1.12",
|
||||
"description": "TypeScript definitions for debug",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/debug",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Seon-Wook Park",
|
||||
"githubUsername": "swook",
|
||||
"url": "https://github.com/swook"
|
||||
},
|
||||
{
|
||||
"name": "Gal Talmor",
|
||||
"githubUsername": "galtalmor",
|
||||
"url": "https://github.com/galtalmor"
|
||||
},
|
||||
{
|
||||
"name": "John McLaughlin",
|
||||
"githubUsername": "zamb3zi",
|
||||
"url": "https://github.com/zamb3zi"
|
||||
},
|
||||
{
|
||||
"name": "Brasten Sager",
|
||||
"githubUsername": "brasten",
|
||||
"url": "https://github.com/brasten"
|
||||
},
|
||||
{
|
||||
"name": "Nicolas Penin",
|
||||
"githubUsername": "npenin",
|
||||
"url": "https://github.com/npenin"
|
||||
},
|
||||
{
|
||||
"name": "Kristian Brünn",
|
||||
"githubUsername": "kristianmitk",
|
||||
"url": "https://github.com/kristianmitk"
|
||||
},
|
||||
{
|
||||
"name": "Caleb Gregory",
|
||||
"githubUsername": "calebgregory",
|
||||
"url": "https://github.com/calebgregory"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/debug"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@types/ms": "*"
|
||||
},
|
||||
"typesPublisherContentHash": "1053110a8e5e302f35fb57f45389304fa5a4f53bb8982b76b8065bcfd7083731",
|
||||
"typeScriptVersion": "4.5"
|
||||
}
|
||||
21
node_modules/@types/estree-jsx/LICENSE
generated
vendored
Normal file
21
node_modules/@types/estree-jsx/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
15
node_modules/@types/estree-jsx/README.md
generated
vendored
Normal file
15
node_modules/@types/estree-jsx/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Installation
|
||||
> `npm install --save @types/estree-jsx`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for estree-jsx (https://github.com/facebook/jsx).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree-jsx.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Fri, 23 Feb 2024 02:11:41 GMT
|
||||
* Dependencies: [@types/estree](https://npmjs.com/package/@types/estree)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Tony Ross](https://github.com/antross).
|
||||
114
node_modules/@types/estree-jsx/index.d.ts
generated
vendored
Normal file
114
node_modules/@types/estree-jsx/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
// Based on https://github.com/facebook/jsx/blob/master/AST.md.
|
||||
// Extends existing types for ESTree AST from `@types/estree`.
|
||||
|
||||
import { BaseExpression, BaseNode, Expression, Literal } from "estree";
|
||||
|
||||
export * from "estree";
|
||||
|
||||
declare module "estree" {
|
||||
interface ExpressionMap {
|
||||
JSXElement: JSXElement;
|
||||
JSXFragment: JSXFragment;
|
||||
}
|
||||
|
||||
interface NodeMap {
|
||||
JSXIdentifier: JSXIdentifier;
|
||||
JSXNamespacedName: JSXNamespacedName;
|
||||
JSXMemberExpression: JSXMemberExpression;
|
||||
JSXEmptyExpression: JSXEmptyExpression;
|
||||
JSXExpressionContainer: JSXExpressionContainer;
|
||||
JSXSpreadAttribute: JSXSpreadAttribute;
|
||||
JSXAttribute: JSXAttribute;
|
||||
JSXOpeningElement: JSXOpeningElement;
|
||||
JSXOpeningFragment: JSXOpeningFragment;
|
||||
JSXClosingElement: JSXClosingElement;
|
||||
JSXClosingFragment: JSXClosingFragment;
|
||||
JSXElement: JSXElement;
|
||||
JSXFragment: JSXFragment;
|
||||
JSXText: JSXText;
|
||||
}
|
||||
}
|
||||
|
||||
export interface JSXIdentifier extends BaseNode {
|
||||
type: "JSXIdentifier";
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface JSXMemberExpression extends BaseExpression {
|
||||
type: "JSXMemberExpression";
|
||||
object: JSXMemberExpression | JSXIdentifier;
|
||||
property: JSXIdentifier;
|
||||
}
|
||||
|
||||
export interface JSXNamespacedName extends BaseExpression {
|
||||
type: "JSXNamespacedName";
|
||||
namespace: JSXIdentifier;
|
||||
name: JSXIdentifier;
|
||||
}
|
||||
|
||||
export interface JSXEmptyExpression extends BaseNode {
|
||||
type: "JSXEmptyExpression";
|
||||
}
|
||||
|
||||
export interface JSXExpressionContainer extends BaseNode {
|
||||
type: "JSXExpressionContainer";
|
||||
expression: Expression | JSXEmptyExpression;
|
||||
}
|
||||
|
||||
export interface JSXSpreadChild extends BaseNode {
|
||||
type: "JSXSpreadChild";
|
||||
expression: Expression;
|
||||
}
|
||||
|
||||
interface JSXBoundaryElement extends BaseNode {
|
||||
name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName;
|
||||
}
|
||||
|
||||
export interface JSXOpeningElement extends JSXBoundaryElement {
|
||||
type: "JSXOpeningElement";
|
||||
attributes: Array<JSXAttribute | JSXSpreadAttribute>;
|
||||
selfClosing: boolean;
|
||||
}
|
||||
|
||||
export interface JSXClosingElement extends JSXBoundaryElement {
|
||||
type: "JSXClosingElement";
|
||||
}
|
||||
|
||||
export interface JSXAttribute extends BaseNode {
|
||||
type: "JSXAttribute";
|
||||
name: JSXIdentifier | JSXNamespacedName;
|
||||
value: Literal | JSXExpressionContainer | JSXElement | JSXFragment | null;
|
||||
}
|
||||
|
||||
export interface JSXSpreadAttribute extends BaseNode {
|
||||
type: "JSXSpreadAttribute";
|
||||
argument: Expression;
|
||||
}
|
||||
|
||||
export interface JSXText extends BaseNode {
|
||||
type: "JSXText";
|
||||
value: string;
|
||||
raw: string;
|
||||
}
|
||||
|
||||
export interface JSXElement extends BaseExpression {
|
||||
type: "JSXElement";
|
||||
openingElement: JSXOpeningElement;
|
||||
children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>;
|
||||
closingElement: JSXClosingElement | null;
|
||||
}
|
||||
|
||||
export interface JSXFragment extends BaseExpression {
|
||||
type: "JSXFragment";
|
||||
openingFragment: JSXOpeningFragment;
|
||||
children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>;
|
||||
closingFragment: JSXClosingFragment;
|
||||
}
|
||||
|
||||
export interface JSXOpeningFragment extends BaseNode {
|
||||
type: "JSXOpeningFragment";
|
||||
}
|
||||
|
||||
export interface JSXClosingFragment extends BaseNode {
|
||||
type: "JSXClosingFragment";
|
||||
}
|
||||
27
node_modules/@types/estree-jsx/package.json
generated
vendored
Normal file
27
node_modules/@types/estree-jsx/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"name": "@types/estree-jsx",
|
||||
"version": "1.0.5",
|
||||
"description": "TypeScript definitions for estree-jsx",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree-jsx",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Tony Ross",
|
||||
"githubUsername": "antross",
|
||||
"url": "https://github.com/antross"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/estree-jsx"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@types/estree": "*"
|
||||
},
|
||||
"typesPublisherContentHash": "42fda803cc34f935c5a60a45e66b78e18fac56ef350d2d47c00759e16d4fef7f",
|
||||
"typeScriptVersion": "4.6"
|
||||
}
|
||||
21
node_modules/@types/estree/LICENSE
generated
vendored
Normal file
21
node_modules/@types/estree/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
15
node_modules/@types/estree/README.md
generated
vendored
Normal file
15
node_modules/@types/estree/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Installation
|
||||
> `npm install --save @types/estree`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for estree (https://github.com/estree/estree).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Fri, 06 Jun 2025 00:04:33 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [RReverser](https://github.com/RReverser).
|
||||
167
node_modules/@types/estree/flow.d.ts
generated
vendored
Normal file
167
node_modules/@types/estree/flow.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
declare namespace ESTree {
|
||||
interface FlowTypeAnnotation extends Node {}
|
||||
|
||||
interface FlowBaseTypeAnnotation extends FlowTypeAnnotation {}
|
||||
|
||||
interface FlowLiteralTypeAnnotation extends FlowTypeAnnotation, Literal {}
|
||||
|
||||
interface FlowDeclaration extends Declaration {}
|
||||
|
||||
interface AnyTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
|
||||
interface ArrayTypeAnnotation extends FlowTypeAnnotation {
|
||||
elementType: FlowTypeAnnotation;
|
||||
}
|
||||
|
||||
interface BooleanLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
|
||||
|
||||
interface BooleanTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
|
||||
interface ClassImplements extends Node {
|
||||
id: Identifier;
|
||||
typeParameters?: TypeParameterInstantiation | null;
|
||||
}
|
||||
|
||||
interface ClassProperty {
|
||||
key: Expression;
|
||||
value?: Expression | null;
|
||||
typeAnnotation?: TypeAnnotation | null;
|
||||
computed: boolean;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
interface DeclareClass extends FlowDeclaration {
|
||||
id: Identifier;
|
||||
typeParameters?: TypeParameterDeclaration | null;
|
||||
body: ObjectTypeAnnotation;
|
||||
extends: InterfaceExtends[];
|
||||
}
|
||||
|
||||
interface DeclareFunction extends FlowDeclaration {
|
||||
id: Identifier;
|
||||
}
|
||||
|
||||
interface DeclareModule extends FlowDeclaration {
|
||||
id: Literal | Identifier;
|
||||
body: BlockStatement;
|
||||
}
|
||||
|
||||
interface DeclareVariable extends FlowDeclaration {
|
||||
id: Identifier;
|
||||
}
|
||||
|
||||
interface FunctionTypeAnnotation extends FlowTypeAnnotation {
|
||||
params: FunctionTypeParam[];
|
||||
returnType: FlowTypeAnnotation;
|
||||
rest?: FunctionTypeParam | null;
|
||||
typeParameters?: TypeParameterDeclaration | null;
|
||||
}
|
||||
|
||||
interface FunctionTypeParam {
|
||||
name: Identifier;
|
||||
typeAnnotation: FlowTypeAnnotation;
|
||||
optional: boolean;
|
||||
}
|
||||
|
||||
interface GenericTypeAnnotation extends FlowTypeAnnotation {
|
||||
id: Identifier | QualifiedTypeIdentifier;
|
||||
typeParameters?: TypeParameterInstantiation | null;
|
||||
}
|
||||
|
||||
interface InterfaceExtends extends Node {
|
||||
id: Identifier | QualifiedTypeIdentifier;
|
||||
typeParameters?: TypeParameterInstantiation | null;
|
||||
}
|
||||
|
||||
interface InterfaceDeclaration extends FlowDeclaration {
|
||||
id: Identifier;
|
||||
typeParameters?: TypeParameterDeclaration | null;
|
||||
extends: InterfaceExtends[];
|
||||
body: ObjectTypeAnnotation;
|
||||
}
|
||||
|
||||
interface IntersectionTypeAnnotation extends FlowTypeAnnotation {
|
||||
types: FlowTypeAnnotation[];
|
||||
}
|
||||
|
||||
interface MixedTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
|
||||
interface NullableTypeAnnotation extends FlowTypeAnnotation {
|
||||
typeAnnotation: TypeAnnotation;
|
||||
}
|
||||
|
||||
interface NumberLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
|
||||
|
||||
interface NumberTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
|
||||
interface StringLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
|
||||
|
||||
interface StringTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
|
||||
interface TupleTypeAnnotation extends FlowTypeAnnotation {
|
||||
types: FlowTypeAnnotation[];
|
||||
}
|
||||
|
||||
interface TypeofTypeAnnotation extends FlowTypeAnnotation {
|
||||
argument: FlowTypeAnnotation;
|
||||
}
|
||||
|
||||
interface TypeAlias extends FlowDeclaration {
|
||||
id: Identifier;
|
||||
typeParameters?: TypeParameterDeclaration | null;
|
||||
right: FlowTypeAnnotation;
|
||||
}
|
||||
|
||||
interface TypeAnnotation extends Node {
|
||||
typeAnnotation: FlowTypeAnnotation;
|
||||
}
|
||||
|
||||
interface TypeCastExpression extends Expression {
|
||||
expression: Expression;
|
||||
typeAnnotation: TypeAnnotation;
|
||||
}
|
||||
|
||||
interface TypeParameterDeclaration extends Node {
|
||||
params: Identifier[];
|
||||
}
|
||||
|
||||
interface TypeParameterInstantiation extends Node {
|
||||
params: FlowTypeAnnotation[];
|
||||
}
|
||||
|
||||
interface ObjectTypeAnnotation extends FlowTypeAnnotation {
|
||||
properties: ObjectTypeProperty[];
|
||||
indexers: ObjectTypeIndexer[];
|
||||
callProperties: ObjectTypeCallProperty[];
|
||||
}
|
||||
|
||||
interface ObjectTypeCallProperty extends Node {
|
||||
value: FunctionTypeAnnotation;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
interface ObjectTypeIndexer extends Node {
|
||||
id: Identifier;
|
||||
key: FlowTypeAnnotation;
|
||||
value: FlowTypeAnnotation;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
interface ObjectTypeProperty extends Node {
|
||||
key: Expression;
|
||||
value: FlowTypeAnnotation;
|
||||
optional: boolean;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
interface QualifiedTypeIdentifier extends Node {
|
||||
qualification: Identifier | QualifiedTypeIdentifier;
|
||||
id: Identifier;
|
||||
}
|
||||
|
||||
interface UnionTypeAnnotation extends FlowTypeAnnotation {
|
||||
types: FlowTypeAnnotation[];
|
||||
}
|
||||
|
||||
interface VoidTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
}
|
||||
694
node_modules/@types/estree/index.d.ts
generated
vendored
Normal file
694
node_modules/@types/estree/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,694 @@
|
|||
// This definition file follows a somewhat unusual format. ESTree allows
|
||||
// runtime type checks based on the `type` parameter. In order to explain this
|
||||
// to typescript we want to use discriminated union types:
|
||||
// https://github.com/Microsoft/TypeScript/pull/9163
|
||||
//
|
||||
// For ESTree this is a bit tricky because the high level interfaces like
|
||||
// Node or Function are pulling double duty. We want to pass common fields down
|
||||
// to the interfaces that extend them (like Identifier or
|
||||
// ArrowFunctionExpression), but you can't extend a type union or enforce
|
||||
// common fields on them. So we've split the high level interfaces into two
|
||||
// types, a base type which passes down inherited fields, and a type union of
|
||||
// all types which extend the base type. Only the type union is exported, and
|
||||
// the union is how other types refer to the collection of inheriting types.
|
||||
//
|
||||
// This makes the definitions file here somewhat more difficult to maintain,
|
||||
// but it has the notable advantage of making ESTree much easier to use as
|
||||
// an end user.
|
||||
|
||||
export interface BaseNodeWithoutComments {
|
||||
// Every leaf interface that extends BaseNode must specify a type property.
|
||||
// The type property should be a string literal. For example, Identifier
|
||||
// has: `type: "Identifier"`
|
||||
type: string;
|
||||
loc?: SourceLocation | null | undefined;
|
||||
range?: [number, number] | undefined;
|
||||
}
|
||||
|
||||
export interface BaseNode extends BaseNodeWithoutComments {
|
||||
leadingComments?: Comment[] | undefined;
|
||||
trailingComments?: Comment[] | undefined;
|
||||
}
|
||||
|
||||
export interface NodeMap {
|
||||
AssignmentProperty: AssignmentProperty;
|
||||
CatchClause: CatchClause;
|
||||
Class: Class;
|
||||
ClassBody: ClassBody;
|
||||
Expression: Expression;
|
||||
Function: Function;
|
||||
Identifier: Identifier;
|
||||
Literal: Literal;
|
||||
MethodDefinition: MethodDefinition;
|
||||
ModuleDeclaration: ModuleDeclaration;
|
||||
ModuleSpecifier: ModuleSpecifier;
|
||||
Pattern: Pattern;
|
||||
PrivateIdentifier: PrivateIdentifier;
|
||||
Program: Program;
|
||||
Property: Property;
|
||||
PropertyDefinition: PropertyDefinition;
|
||||
SpreadElement: SpreadElement;
|
||||
Statement: Statement;
|
||||
Super: Super;
|
||||
SwitchCase: SwitchCase;
|
||||
TemplateElement: TemplateElement;
|
||||
VariableDeclarator: VariableDeclarator;
|
||||
}
|
||||
|
||||
export type Node = NodeMap[keyof NodeMap];
|
||||
|
||||
export interface Comment extends BaseNodeWithoutComments {
|
||||
type: "Line" | "Block";
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface SourceLocation {
|
||||
source?: string | null | undefined;
|
||||
start: Position;
|
||||
end: Position;
|
||||
}
|
||||
|
||||
export interface Position {
|
||||
/** >= 1 */
|
||||
line: number;
|
||||
/** >= 0 */
|
||||
column: number;
|
||||
}
|
||||
|
||||
export interface Program extends BaseNode {
|
||||
type: "Program";
|
||||
sourceType: "script" | "module";
|
||||
body: Array<Directive | Statement | ModuleDeclaration>;
|
||||
comments?: Comment[] | undefined;
|
||||
}
|
||||
|
||||
export interface Directive extends BaseNode {
|
||||
type: "ExpressionStatement";
|
||||
expression: Literal;
|
||||
directive: string;
|
||||
}
|
||||
|
||||
export interface BaseFunction extends BaseNode {
|
||||
params: Pattern[];
|
||||
generator?: boolean | undefined;
|
||||
async?: boolean | undefined;
|
||||
// The body is either BlockStatement or Expression because arrow functions
|
||||
// can have a body that's either. FunctionDeclarations and
|
||||
// FunctionExpressions have only BlockStatement bodies.
|
||||
body: BlockStatement | Expression;
|
||||
}
|
||||
|
||||
export type Function = FunctionDeclaration | FunctionExpression | ArrowFunctionExpression;
|
||||
|
||||
export type Statement =
|
||||
| ExpressionStatement
|
||||
| BlockStatement
|
||||
| StaticBlock
|
||||
| EmptyStatement
|
||||
| DebuggerStatement
|
||||
| WithStatement
|
||||
| ReturnStatement
|
||||
| LabeledStatement
|
||||
| BreakStatement
|
||||
| ContinueStatement
|
||||
| IfStatement
|
||||
| SwitchStatement
|
||||
| ThrowStatement
|
||||
| TryStatement
|
||||
| WhileStatement
|
||||
| DoWhileStatement
|
||||
| ForStatement
|
||||
| ForInStatement
|
||||
| ForOfStatement
|
||||
| Declaration;
|
||||
|
||||
export interface BaseStatement extends BaseNode {}
|
||||
|
||||
export interface EmptyStatement extends BaseStatement {
|
||||
type: "EmptyStatement";
|
||||
}
|
||||
|
||||
export interface BlockStatement extends BaseStatement {
|
||||
type: "BlockStatement";
|
||||
body: Statement[];
|
||||
innerComments?: Comment[] | undefined;
|
||||
}
|
||||
|
||||
export interface StaticBlock extends Omit<BlockStatement, "type"> {
|
||||
type: "StaticBlock";
|
||||
}
|
||||
|
||||
export interface ExpressionStatement extends BaseStatement {
|
||||
type: "ExpressionStatement";
|
||||
expression: Expression;
|
||||
}
|
||||
|
||||
export interface IfStatement extends BaseStatement {
|
||||
type: "IfStatement";
|
||||
test: Expression;
|
||||
consequent: Statement;
|
||||
alternate?: Statement | null | undefined;
|
||||
}
|
||||
|
||||
export interface LabeledStatement extends BaseStatement {
|
||||
type: "LabeledStatement";
|
||||
label: Identifier;
|
||||
body: Statement;
|
||||
}
|
||||
|
||||
export interface BreakStatement extends BaseStatement {
|
||||
type: "BreakStatement";
|
||||
label?: Identifier | null | undefined;
|
||||
}
|
||||
|
||||
export interface ContinueStatement extends BaseStatement {
|
||||
type: "ContinueStatement";
|
||||
label?: Identifier | null | undefined;
|
||||
}
|
||||
|
||||
export interface WithStatement extends BaseStatement {
|
||||
type: "WithStatement";
|
||||
object: Expression;
|
||||
body: Statement;
|
||||
}
|
||||
|
||||
export interface SwitchStatement extends BaseStatement {
|
||||
type: "SwitchStatement";
|
||||
discriminant: Expression;
|
||||
cases: SwitchCase[];
|
||||
}
|
||||
|
||||
export interface ReturnStatement extends BaseStatement {
|
||||
type: "ReturnStatement";
|
||||
argument?: Expression | null | undefined;
|
||||
}
|
||||
|
||||
export interface ThrowStatement extends BaseStatement {
|
||||
type: "ThrowStatement";
|
||||
argument: Expression;
|
||||
}
|
||||
|
||||
export interface TryStatement extends BaseStatement {
|
||||
type: "TryStatement";
|
||||
block: BlockStatement;
|
||||
handler?: CatchClause | null | undefined;
|
||||
finalizer?: BlockStatement | null | undefined;
|
||||
}
|
||||
|
||||
export interface WhileStatement extends BaseStatement {
|
||||
type: "WhileStatement";
|
||||
test: Expression;
|
||||
body: Statement;
|
||||
}
|
||||
|
||||
export interface DoWhileStatement extends BaseStatement {
|
||||
type: "DoWhileStatement";
|
||||
body: Statement;
|
||||
test: Expression;
|
||||
}
|
||||
|
||||
export interface ForStatement extends BaseStatement {
|
||||
type: "ForStatement";
|
||||
init?: VariableDeclaration | Expression | null | undefined;
|
||||
test?: Expression | null | undefined;
|
||||
update?: Expression | null | undefined;
|
||||
body: Statement;
|
||||
}
|
||||
|
||||
export interface BaseForXStatement extends BaseStatement {
|
||||
left: VariableDeclaration | Pattern;
|
||||
right: Expression;
|
||||
body: Statement;
|
||||
}
|
||||
|
||||
export interface ForInStatement extends BaseForXStatement {
|
||||
type: "ForInStatement";
|
||||
}
|
||||
|
||||
export interface DebuggerStatement extends BaseStatement {
|
||||
type: "DebuggerStatement";
|
||||
}
|
||||
|
||||
export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
|
||||
|
||||
export interface BaseDeclaration extends BaseStatement {}
|
||||
|
||||
export interface MaybeNamedFunctionDeclaration extends BaseFunction, BaseDeclaration {
|
||||
type: "FunctionDeclaration";
|
||||
/** It is null when a function declaration is a part of the `export default function` statement */
|
||||
id: Identifier | null;
|
||||
body: BlockStatement;
|
||||
}
|
||||
|
||||
export interface FunctionDeclaration extends MaybeNamedFunctionDeclaration {
|
||||
id: Identifier;
|
||||
}
|
||||
|
||||
export interface VariableDeclaration extends BaseDeclaration {
|
||||
type: "VariableDeclaration";
|
||||
declarations: VariableDeclarator[];
|
||||
kind: "var" | "let" | "const" | "using" | "await using";
|
||||
}
|
||||
|
||||
export interface VariableDeclarator extends BaseNode {
|
||||
type: "VariableDeclarator";
|
||||
id: Pattern;
|
||||
init?: Expression | null | undefined;
|
||||
}
|
||||
|
||||
export interface ExpressionMap {
|
||||
ArrayExpression: ArrayExpression;
|
||||
ArrowFunctionExpression: ArrowFunctionExpression;
|
||||
AssignmentExpression: AssignmentExpression;
|
||||
AwaitExpression: AwaitExpression;
|
||||
BinaryExpression: BinaryExpression;
|
||||
CallExpression: CallExpression;
|
||||
ChainExpression: ChainExpression;
|
||||
ClassExpression: ClassExpression;
|
||||
ConditionalExpression: ConditionalExpression;
|
||||
FunctionExpression: FunctionExpression;
|
||||
Identifier: Identifier;
|
||||
ImportExpression: ImportExpression;
|
||||
Literal: Literal;
|
||||
LogicalExpression: LogicalExpression;
|
||||
MemberExpression: MemberExpression;
|
||||
MetaProperty: MetaProperty;
|
||||
NewExpression: NewExpression;
|
||||
ObjectExpression: ObjectExpression;
|
||||
SequenceExpression: SequenceExpression;
|
||||
TaggedTemplateExpression: TaggedTemplateExpression;
|
||||
TemplateLiteral: TemplateLiteral;
|
||||
ThisExpression: ThisExpression;
|
||||
UnaryExpression: UnaryExpression;
|
||||
UpdateExpression: UpdateExpression;
|
||||
YieldExpression: YieldExpression;
|
||||
}
|
||||
|
||||
export type Expression = ExpressionMap[keyof ExpressionMap];
|
||||
|
||||
export interface BaseExpression extends BaseNode {}
|
||||
|
||||
export type ChainElement = SimpleCallExpression | MemberExpression;
|
||||
|
||||
export interface ChainExpression extends BaseExpression {
|
||||
type: "ChainExpression";
|
||||
expression: ChainElement;
|
||||
}
|
||||
|
||||
export interface ThisExpression extends BaseExpression {
|
||||
type: "ThisExpression";
|
||||
}
|
||||
|
||||
export interface ArrayExpression extends BaseExpression {
|
||||
type: "ArrayExpression";
|
||||
elements: Array<Expression | SpreadElement | null>;
|
||||
}
|
||||
|
||||
export interface ObjectExpression extends BaseExpression {
|
||||
type: "ObjectExpression";
|
||||
properties: Array<Property | SpreadElement>;
|
||||
}
|
||||
|
||||
export interface PrivateIdentifier extends BaseNode {
|
||||
type: "PrivateIdentifier";
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface Property extends BaseNode {
|
||||
type: "Property";
|
||||
key: Expression | PrivateIdentifier;
|
||||
value: Expression | Pattern; // Could be an AssignmentProperty
|
||||
kind: "init" | "get" | "set";
|
||||
method: boolean;
|
||||
shorthand: boolean;
|
||||
computed: boolean;
|
||||
}
|
||||
|
||||
export interface PropertyDefinition extends BaseNode {
|
||||
type: "PropertyDefinition";
|
||||
key: Expression | PrivateIdentifier;
|
||||
value?: Expression | null | undefined;
|
||||
computed: boolean;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
export interface FunctionExpression extends BaseFunction, BaseExpression {
|
||||
id?: Identifier | null | undefined;
|
||||
type: "FunctionExpression";
|
||||
body: BlockStatement;
|
||||
}
|
||||
|
||||
export interface SequenceExpression extends BaseExpression {
|
||||
type: "SequenceExpression";
|
||||
expressions: Expression[];
|
||||
}
|
||||
|
||||
export interface UnaryExpression extends BaseExpression {
|
||||
type: "UnaryExpression";
|
||||
operator: UnaryOperator;
|
||||
prefix: true;
|
||||
argument: Expression;
|
||||
}
|
||||
|
||||
export interface BinaryExpression extends BaseExpression {
|
||||
type: "BinaryExpression";
|
||||
operator: BinaryOperator;
|
||||
left: Expression | PrivateIdentifier;
|
||||
right: Expression;
|
||||
}
|
||||
|
||||
export interface AssignmentExpression extends BaseExpression {
|
||||
type: "AssignmentExpression";
|
||||
operator: AssignmentOperator;
|
||||
left: Pattern | MemberExpression;
|
||||
right: Expression;
|
||||
}
|
||||
|
||||
export interface UpdateExpression extends BaseExpression {
|
||||
type: "UpdateExpression";
|
||||
operator: UpdateOperator;
|
||||
argument: Expression;
|
||||
prefix: boolean;
|
||||
}
|
||||
|
||||
export interface LogicalExpression extends BaseExpression {
|
||||
type: "LogicalExpression";
|
||||
operator: LogicalOperator;
|
||||
left: Expression;
|
||||
right: Expression;
|
||||
}
|
||||
|
||||
export interface ConditionalExpression extends BaseExpression {
|
||||
type: "ConditionalExpression";
|
||||
test: Expression;
|
||||
alternate: Expression;
|
||||
consequent: Expression;
|
||||
}
|
||||
|
||||
export interface BaseCallExpression extends BaseExpression {
|
||||
callee: Expression | Super;
|
||||
arguments: Array<Expression | SpreadElement>;
|
||||
}
|
||||
export type CallExpression = SimpleCallExpression | NewExpression;
|
||||
|
||||
export interface SimpleCallExpression extends BaseCallExpression {
|
||||
type: "CallExpression";
|
||||
optional: boolean;
|
||||
}
|
||||
|
||||
export interface NewExpression extends BaseCallExpression {
|
||||
type: "NewExpression";
|
||||
}
|
||||
|
||||
export interface MemberExpression extends BaseExpression, BasePattern {
|
||||
type: "MemberExpression";
|
||||
object: Expression | Super;
|
||||
property: Expression | PrivateIdentifier;
|
||||
computed: boolean;
|
||||
optional: boolean;
|
||||
}
|
||||
|
||||
export type Pattern = Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression;
|
||||
|
||||
export interface BasePattern extends BaseNode {}
|
||||
|
||||
export interface SwitchCase extends BaseNode {
|
||||
type: "SwitchCase";
|
||||
test?: Expression | null | undefined;
|
||||
consequent: Statement[];
|
||||
}
|
||||
|
||||
export interface CatchClause extends BaseNode {
|
||||
type: "CatchClause";
|
||||
param: Pattern | null;
|
||||
body: BlockStatement;
|
||||
}
|
||||
|
||||
export interface Identifier extends BaseNode, BaseExpression, BasePattern {
|
||||
type: "Identifier";
|
||||
name: string;
|
||||
}
|
||||
|
||||
export type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral;
|
||||
|
||||
export interface SimpleLiteral extends BaseNode, BaseExpression {
|
||||
type: "Literal";
|
||||
value: string | boolean | number | null;
|
||||
raw?: string | undefined;
|
||||
}
|
||||
|
||||
export interface RegExpLiteral extends BaseNode, BaseExpression {
|
||||
type: "Literal";
|
||||
value?: RegExp | null | undefined;
|
||||
regex: {
|
||||
pattern: string;
|
||||
flags: string;
|
||||
};
|
||||
raw?: string | undefined;
|
||||
}
|
||||
|
||||
export interface BigIntLiteral extends BaseNode, BaseExpression {
|
||||
type: "Literal";
|
||||
value?: bigint | null | undefined;
|
||||
bigint: string;
|
||||
raw?: string | undefined;
|
||||
}
|
||||
|
||||
export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
|
||||
|
||||
export type BinaryOperator =
|
||||
| "=="
|
||||
| "!="
|
||||
| "==="
|
||||
| "!=="
|
||||
| "<"
|
||||
| "<="
|
||||
| ">"
|
||||
| ">="
|
||||
| "<<"
|
||||
| ">>"
|
||||
| ">>>"
|
||||
| "+"
|
||||
| "-"
|
||||
| "*"
|
||||
| "/"
|
||||
| "%"
|
||||
| "**"
|
||||
| "|"
|
||||
| "^"
|
||||
| "&"
|
||||
| "in"
|
||||
| "instanceof";
|
||||
|
||||
export type LogicalOperator = "||" | "&&" | "??";
|
||||
|
||||
export type AssignmentOperator =
|
||||
| "="
|
||||
| "+="
|
||||
| "-="
|
||||
| "*="
|
||||
| "/="
|
||||
| "%="
|
||||
| "**="
|
||||
| "<<="
|
||||
| ">>="
|
||||
| ">>>="
|
||||
| "|="
|
||||
| "^="
|
||||
| "&="
|
||||
| "||="
|
||||
| "&&="
|
||||
| "??=";
|
||||
|
||||
export type UpdateOperator = "++" | "--";
|
||||
|
||||
export interface ForOfStatement extends BaseForXStatement {
|
||||
type: "ForOfStatement";
|
||||
await: boolean;
|
||||
}
|
||||
|
||||
export interface Super extends BaseNode {
|
||||
type: "Super";
|
||||
}
|
||||
|
||||
export interface SpreadElement extends BaseNode {
|
||||
type: "SpreadElement";
|
||||
argument: Expression;
|
||||
}
|
||||
|
||||
export interface ArrowFunctionExpression extends BaseExpression, BaseFunction {
|
||||
type: "ArrowFunctionExpression";
|
||||
expression: boolean;
|
||||
body: BlockStatement | Expression;
|
||||
}
|
||||
|
||||
export interface YieldExpression extends BaseExpression {
|
||||
type: "YieldExpression";
|
||||
argument?: Expression | null | undefined;
|
||||
delegate: boolean;
|
||||
}
|
||||
|
||||
export interface TemplateLiteral extends BaseExpression {
|
||||
type: "TemplateLiteral";
|
||||
quasis: TemplateElement[];
|
||||
expressions: Expression[];
|
||||
}
|
||||
|
||||
export interface TaggedTemplateExpression extends BaseExpression {
|
||||
type: "TaggedTemplateExpression";
|
||||
tag: Expression;
|
||||
quasi: TemplateLiteral;
|
||||
}
|
||||
|
||||
export interface TemplateElement extends BaseNode {
|
||||
type: "TemplateElement";
|
||||
tail: boolean;
|
||||
value: {
|
||||
/** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */
|
||||
cooked?: string | null | undefined;
|
||||
raw: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface AssignmentProperty extends Property {
|
||||
value: Pattern;
|
||||
kind: "init";
|
||||
method: boolean; // false
|
||||
}
|
||||
|
||||
export interface ObjectPattern extends BasePattern {
|
||||
type: "ObjectPattern";
|
||||
properties: Array<AssignmentProperty | RestElement>;
|
||||
}
|
||||
|
||||
export interface ArrayPattern extends BasePattern {
|
||||
type: "ArrayPattern";
|
||||
elements: Array<Pattern | null>;
|
||||
}
|
||||
|
||||
export interface RestElement extends BasePattern {
|
||||
type: "RestElement";
|
||||
argument: Pattern;
|
||||
}
|
||||
|
||||
export interface AssignmentPattern extends BasePattern {
|
||||
type: "AssignmentPattern";
|
||||
left: Pattern;
|
||||
right: Expression;
|
||||
}
|
||||
|
||||
export type Class = ClassDeclaration | ClassExpression;
|
||||
export interface BaseClass extends BaseNode {
|
||||
superClass?: Expression | null | undefined;
|
||||
body: ClassBody;
|
||||
}
|
||||
|
||||
export interface ClassBody extends BaseNode {
|
||||
type: "ClassBody";
|
||||
body: Array<MethodDefinition | PropertyDefinition | StaticBlock>;
|
||||
}
|
||||
|
||||
export interface MethodDefinition extends BaseNode {
|
||||
type: "MethodDefinition";
|
||||
key: Expression | PrivateIdentifier;
|
||||
value: FunctionExpression;
|
||||
kind: "constructor" | "method" | "get" | "set";
|
||||
computed: boolean;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
export interface MaybeNamedClassDeclaration extends BaseClass, BaseDeclaration {
|
||||
type: "ClassDeclaration";
|
||||
/** It is null when a class declaration is a part of the `export default class` statement */
|
||||
id: Identifier | null;
|
||||
}
|
||||
|
||||
export interface ClassDeclaration extends MaybeNamedClassDeclaration {
|
||||
id: Identifier;
|
||||
}
|
||||
|
||||
export interface ClassExpression extends BaseClass, BaseExpression {
|
||||
type: "ClassExpression";
|
||||
id?: Identifier | null | undefined;
|
||||
}
|
||||
|
||||
export interface MetaProperty extends BaseExpression {
|
||||
type: "MetaProperty";
|
||||
meta: Identifier;
|
||||
property: Identifier;
|
||||
}
|
||||
|
||||
export type ModuleDeclaration =
|
||||
| ImportDeclaration
|
||||
| ExportNamedDeclaration
|
||||
| ExportDefaultDeclaration
|
||||
| ExportAllDeclaration;
|
||||
export interface BaseModuleDeclaration extends BaseNode {}
|
||||
|
||||
export type ModuleSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier;
|
||||
export interface BaseModuleSpecifier extends BaseNode {
|
||||
local: Identifier;
|
||||
}
|
||||
|
||||
export interface ImportDeclaration extends BaseModuleDeclaration {
|
||||
type: "ImportDeclaration";
|
||||
specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
|
||||
attributes: ImportAttribute[];
|
||||
source: Literal;
|
||||
}
|
||||
|
||||
export interface ImportSpecifier extends BaseModuleSpecifier {
|
||||
type: "ImportSpecifier";
|
||||
imported: Identifier | Literal;
|
||||
}
|
||||
|
||||
export interface ImportAttribute extends BaseNode {
|
||||
type: "ImportAttribute";
|
||||
key: Identifier | Literal;
|
||||
value: Literal;
|
||||
}
|
||||
|
||||
export interface ImportExpression extends BaseExpression {
|
||||
type: "ImportExpression";
|
||||
source: Expression;
|
||||
options?: Expression | null | undefined;
|
||||
}
|
||||
|
||||
export interface ImportDefaultSpecifier extends BaseModuleSpecifier {
|
||||
type: "ImportDefaultSpecifier";
|
||||
}
|
||||
|
||||
export interface ImportNamespaceSpecifier extends BaseModuleSpecifier {
|
||||
type: "ImportNamespaceSpecifier";
|
||||
}
|
||||
|
||||
export interface ExportNamedDeclaration extends BaseModuleDeclaration {
|
||||
type: "ExportNamedDeclaration";
|
||||
declaration?: Declaration | null | undefined;
|
||||
specifiers: ExportSpecifier[];
|
||||
attributes: ImportAttribute[];
|
||||
source?: Literal | null | undefined;
|
||||
}
|
||||
|
||||
export interface ExportSpecifier extends Omit<BaseModuleSpecifier, "local"> {
|
||||
type: "ExportSpecifier";
|
||||
local: Identifier | Literal;
|
||||
exported: Identifier | Literal;
|
||||
}
|
||||
|
||||
export interface ExportDefaultDeclaration extends BaseModuleDeclaration {
|
||||
type: "ExportDefaultDeclaration";
|
||||
declaration: MaybeNamedFunctionDeclaration | MaybeNamedClassDeclaration | Expression;
|
||||
}
|
||||
|
||||
export interface ExportAllDeclaration extends BaseModuleDeclaration {
|
||||
type: "ExportAllDeclaration";
|
||||
exported: Identifier | Literal | null;
|
||||
attributes: ImportAttribute[];
|
||||
source: Literal;
|
||||
}
|
||||
|
||||
export interface AwaitExpression extends BaseExpression {
|
||||
type: "AwaitExpression";
|
||||
argument: Expression;
|
||||
}
|
||||
27
node_modules/@types/estree/package.json
generated
vendored
Normal file
27
node_modules/@types/estree/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"name": "@types/estree",
|
||||
"version": "1.0.8",
|
||||
"description": "TypeScript definitions for estree",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "RReverser",
|
||||
"githubUsername": "RReverser",
|
||||
"url": "https://github.com/RReverser"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/estree"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "7a167b6e4a4d9f6e9a2cb9fd3fc45c885f89cbdeb44b3e5961bb057a45c082fd",
|
||||
"typeScriptVersion": "5.1",
|
||||
"nonNpm": true
|
||||
}
|
||||
21
node_modules/@types/hast/LICENSE
generated
vendored
Normal file
21
node_modules/@types/hast/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
15
node_modules/@types/hast/README.md
generated
vendored
Normal file
15
node_modules/@types/hast/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Installation
|
||||
> `npm install --save @types/hast`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for hast (https://github.com/syntax-tree/hast).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hast.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 30 Jan 2024 21:35:45 GMT
|
||||
* Dependencies: [@types/unist](https://npmjs.com/package/@types/unist)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [lukeggchapman](https://github.com/lukeggchapman), [Junyoung Choi](https://github.com/rokt33r), [Christian Murphy](https://github.com/ChristianMurphy), and [Remco Haszing](https://github.com/remcohaszing).
|
||||
282
node_modules/@types/hast/index.d.ts
generated
vendored
Normal file
282
node_modules/@types/hast/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,282 @@
|
|||
import type { Data as UnistData, Literal as UnistLiteral, Node as UnistNode, Parent as UnistParent } from "unist";
|
||||
|
||||
// ## Interfaces
|
||||
|
||||
/**
|
||||
* Info associated with hast nodes by the ecosystem.
|
||||
*
|
||||
* This space is guaranteed to never be specified by unist or hast.
|
||||
* But you can use it in utilities and plugins to store data.
|
||||
*
|
||||
* This type can be augmented to register custom data.
|
||||
* For example:
|
||||
*
|
||||
* ```ts
|
||||
* declare module 'hast' {
|
||||
* interface Data {
|
||||
* // `someNode.data.myId` is typed as `number | undefined`
|
||||
* myId?: number | undefined
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
export interface Data extends UnistData {}
|
||||
|
||||
/**
|
||||
* Info associated with an element.
|
||||
*/
|
||||
export interface Properties {
|
||||
[PropertyName: string]: boolean | number | string | null | undefined | Array<string | number>;
|
||||
}
|
||||
|
||||
// ## Content maps
|
||||
|
||||
/**
|
||||
* Union of registered hast nodes that can occur in {@link Element}.
|
||||
*
|
||||
* To register mote custom hast nodes, add them to {@link ElementContentMap}.
|
||||
* They will be automatically added here.
|
||||
*/
|
||||
export type ElementContent = ElementContentMap[keyof ElementContentMap];
|
||||
|
||||
/**
|
||||
* Registry of all hast nodes that can occur as children of {@link Element}.
|
||||
*
|
||||
* For a union of all {@link Element} children, see {@link ElementContent}.
|
||||
*/
|
||||
export interface ElementContentMap {
|
||||
comment: Comment;
|
||||
element: Element;
|
||||
text: Text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Union of registered hast nodes that can occur in {@link Root}.
|
||||
*
|
||||
* To register custom hast nodes, add them to {@link RootContentMap}.
|
||||
* They will be automatically added here.
|
||||
*/
|
||||
export type RootContent = RootContentMap[keyof RootContentMap];
|
||||
|
||||
/**
|
||||
* Registry of all hast nodes that can occur as children of {@link Root}.
|
||||
*
|
||||
* > 👉 **Note**: {@link Root} does not need to be an entire document.
|
||||
* > it can also be a fragment.
|
||||
*
|
||||
* For a union of all {@link Root} children, see {@link RootContent}.
|
||||
*/
|
||||
export interface RootContentMap {
|
||||
comment: Comment;
|
||||
doctype: Doctype;
|
||||
element: Element;
|
||||
text: Text;
|
||||
}
|
||||
|
||||
// ### Special content types
|
||||
|
||||
/**
|
||||
* Union of registered hast nodes that can occur in {@link Root}.
|
||||
*
|
||||
* @deprecated Use {@link RootContent} instead.
|
||||
*/
|
||||
export type Content = RootContent;
|
||||
|
||||
/**
|
||||
* Union of registered hast literals.
|
||||
*
|
||||
* To register custom hast nodes, add them to {@link RootContentMap} and other
|
||||
* places where relevant.
|
||||
* They will be automatically added here.
|
||||
*/
|
||||
export type Literals = Extract<Nodes, UnistLiteral>;
|
||||
|
||||
/**
|
||||
* Union of registered hast nodes.
|
||||
*
|
||||
* To register custom hast nodes, add them to {@link RootContentMap} and other
|
||||
* places where relevant.
|
||||
* They will be automatically added here.
|
||||
*/
|
||||
export type Nodes = Root | RootContent;
|
||||
|
||||
/**
|
||||
* Union of registered hast parents.
|
||||
*
|
||||
* To register custom hast nodes, add them to {@link RootContentMap} and other
|
||||
* places where relevant.
|
||||
* They will be automatically added here.
|
||||
*/
|
||||
export type Parents = Extract<Nodes, UnistParent>;
|
||||
|
||||
// ## Abstract nodes
|
||||
|
||||
/**
|
||||
* Abstract hast node.
|
||||
*
|
||||
* This interface is supposed to be extended.
|
||||
* If you can use {@link Literal} or {@link Parent}, you should.
|
||||
* But for example in HTML, a `Doctype` is neither literal nor parent, but
|
||||
* still a node.
|
||||
*
|
||||
* To register custom hast nodes, add them to {@link RootContentMap} and other
|
||||
* places where relevant (such as {@link ElementContentMap}).
|
||||
*
|
||||
* For a union of all registered hast nodes, see {@link Nodes}.
|
||||
*/
|
||||
export interface Node extends UnistNode {
|
||||
/**
|
||||
* Info from the ecosystem.
|
||||
*/
|
||||
data?: Data | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract hast node that contains the smallest possible value.
|
||||
*
|
||||
* This interface is supposed to be extended if you make custom hast nodes.
|
||||
*
|
||||
* For a union of all registered hast literals, see {@link Literals}.
|
||||
*/
|
||||
export interface Literal extends Node {
|
||||
/**
|
||||
* Plain-text value.
|
||||
*/
|
||||
value: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract hast node that contains other hast nodes (*children*).
|
||||
*
|
||||
* This interface is supposed to be extended if you make custom hast nodes.
|
||||
*
|
||||
* For a union of all registered hast parents, see {@link Parents}.
|
||||
*/
|
||||
export interface Parent extends Node {
|
||||
/**
|
||||
* List of children.
|
||||
*/
|
||||
children: RootContent[];
|
||||
}
|
||||
|
||||
// ## Concrete nodes
|
||||
|
||||
/**
|
||||
* HTML comment.
|
||||
*/
|
||||
export interface Comment extends Literal {
|
||||
/**
|
||||
* Node type of HTML comments in hast.
|
||||
*/
|
||||
type: "comment";
|
||||
/**
|
||||
* Data associated with the comment.
|
||||
*/
|
||||
data?: CommentData | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Info associated with hast comments by the ecosystem.
|
||||
*/
|
||||
export interface CommentData extends Data {}
|
||||
|
||||
/**
|
||||
* HTML document type.
|
||||
*/
|
||||
export interface Doctype extends UnistNode {
|
||||
/**
|
||||
* Node type of HTML document types in hast.
|
||||
*/
|
||||
type: "doctype";
|
||||
/**
|
||||
* Data associated with the doctype.
|
||||
*/
|
||||
data?: DoctypeData | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Info associated with hast doctypes by the ecosystem.
|
||||
*/
|
||||
export interface DoctypeData extends Data {}
|
||||
|
||||
/**
|
||||
* HTML element.
|
||||
*/
|
||||
export interface Element extends Parent {
|
||||
/**
|
||||
* Node type of elements.
|
||||
*/
|
||||
type: "element";
|
||||
/**
|
||||
* Tag name (such as `'body'`) of the element.
|
||||
*/
|
||||
tagName: string;
|
||||
/**
|
||||
* Info associated with the element.
|
||||
*/
|
||||
properties: Properties;
|
||||
/**
|
||||
* Children of element.
|
||||
*/
|
||||
children: ElementContent[];
|
||||
/**
|
||||
* When the `tagName` field is `'template'`, a `content` field can be
|
||||
* present.
|
||||
*/
|
||||
content?: Root | undefined;
|
||||
/**
|
||||
* Data associated with the element.
|
||||
*/
|
||||
data?: ElementData | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Info associated with hast elements by the ecosystem.
|
||||
*/
|
||||
export interface ElementData extends Data {}
|
||||
|
||||
/**
|
||||
* Document fragment or a whole document.
|
||||
*
|
||||
* Should be used as the root of a tree and must not be used as a child.
|
||||
*
|
||||
* Can also be used as the value for the content field on a `'template'` element.
|
||||
*/
|
||||
export interface Root extends Parent {
|
||||
/**
|
||||
* Node type of hast root.
|
||||
*/
|
||||
type: "root";
|
||||
/**
|
||||
* Children of root.
|
||||
*/
|
||||
children: RootContent[];
|
||||
/**
|
||||
* Data associated with the hast root.
|
||||
*/
|
||||
data?: RootData | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Info associated with hast root nodes by the ecosystem.
|
||||
*/
|
||||
export interface RootData extends Data {}
|
||||
|
||||
/**
|
||||
* HTML character data (plain text).
|
||||
*/
|
||||
export interface Text extends Literal {
|
||||
/**
|
||||
* Node type of HTML character data (plain text) in hast.
|
||||
*/
|
||||
type: "text";
|
||||
/**
|
||||
* Data associated with the text.
|
||||
*/
|
||||
data?: TextData | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Info associated with hast texts by the ecosystem.
|
||||
*/
|
||||
export interface TextData extends Data {}
|
||||
42
node_modules/@types/hast/package.json
generated
vendored
Normal file
42
node_modules/@types/hast/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"name": "@types/hast",
|
||||
"version": "3.0.4",
|
||||
"description": "TypeScript definitions for hast",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hast",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "lukeggchapman",
|
||||
"githubUsername": "lukeggchapman",
|
||||
"url": "https://github.com/lukeggchapman"
|
||||
},
|
||||
{
|
||||
"name": "Junyoung Choi",
|
||||
"githubUsername": "rokt33r",
|
||||
"url": "https://github.com/rokt33r"
|
||||
},
|
||||
{
|
||||
"name": "Christian Murphy",
|
||||
"githubUsername": "ChristianMurphy",
|
||||
"url": "https://github.com/ChristianMurphy"
|
||||
},
|
||||
{
|
||||
"name": "Remco Haszing",
|
||||
"githubUsername": "remcohaszing",
|
||||
"url": "https://github.com/remcohaszing"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/hast"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@types/unist": "*"
|
||||
},
|
||||
"typesPublisherContentHash": "3f3f73826d79157c12087f5bb36195319c6f435b9e218fa7a8de88d1cc64d097",
|
||||
"typeScriptVersion": "4.6"
|
||||
}
|
||||
21
node_modules/@types/mdast/LICENSE
generated
vendored
Normal file
21
node_modules/@types/mdast/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
15
node_modules/@types/mdast/README.md
generated
vendored
Normal file
15
node_modules/@types/mdast/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Installation
|
||||
> `npm install --save @types/mdast`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for mdast (https://github.com/syntax-tree/mdast).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mdast.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 14 May 2024 07:35:36 GMT
|
||||
* Dependencies: [@types/unist](https://npmjs.com/package/@types/unist)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Christian Murphy](https://github.com/ChristianMurphy), [Jun Lu](https://github.com/lujun2), [Remco Haszing](https://github.com/remcohaszing), [Titus Wormer](https://github.com/wooorm), and [Remco Haszing](https://github.com/remcohaszing).
|
||||
1123
node_modules/@types/mdast/index.d.ts
generated
vendored
Normal file
1123
node_modules/@types/mdast/index.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
47
node_modules/@types/mdast/package.json
generated
vendored
Normal file
47
node_modules/@types/mdast/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "@types/mdast",
|
||||
"version": "4.0.4",
|
||||
"description": "TypeScript definitions for mdast",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mdast",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Christian Murphy",
|
||||
"githubUsername": "ChristianMurphy",
|
||||
"url": "https://github.com/ChristianMurphy"
|
||||
},
|
||||
{
|
||||
"name": "Jun Lu",
|
||||
"githubUsername": "lujun2",
|
||||
"url": "https://github.com/lujun2"
|
||||
},
|
||||
{
|
||||
"name": "Remco Haszing",
|
||||
"githubUsername": "remcohaszing",
|
||||
"url": "https://github.com/remcohaszing"
|
||||
},
|
||||
{
|
||||
"name": "Titus Wormer",
|
||||
"githubUsername": "wooorm",
|
||||
"url": "https://github.com/wooorm"
|
||||
},
|
||||
{
|
||||
"name": "Remco Haszing",
|
||||
"githubUsername": "remcohaszing",
|
||||
"url": "https://github.com/remcohaszing"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/mdast"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@types/unist": "*"
|
||||
},
|
||||
"typesPublisherContentHash": "1599d3ca45533e9d9248231c90843306b49c07fe13ad94ebf7345da44d8fd4bd",
|
||||
"typeScriptVersion": "4.7"
|
||||
}
|
||||
21
node_modules/@types/ms/LICENSE
generated
vendored
Normal file
21
node_modules/@types/ms/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
82
node_modules/@types/ms/README.md
generated
vendored
Normal file
82
node_modules/@types/ms/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
# Installation
|
||||
> `npm install --save @types/ms`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for ms (https://github.com/vercel/ms).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ms.
|
||||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ms/index.d.ts)
|
||||
````ts
|
||||
/**
|
||||
* Short/Long format for `value`.
|
||||
*
|
||||
* @param {Number} value
|
||||
* @param {{long: boolean}} options
|
||||
* @return {String}
|
||||
*/
|
||||
declare function ms(value: number, options?: { long: boolean }): string;
|
||||
|
||||
/**
|
||||
* Parse the given `value` and return milliseconds.
|
||||
*
|
||||
* @param {ms.StringValue} value
|
||||
* @return {Number}
|
||||
*/
|
||||
declare function ms(value: ms.StringValue): number;
|
||||
|
||||
declare namespace ms {
|
||||
// Unit, UnitAnyCase, and StringValue are backported from ms@3
|
||||
// https://github.com/vercel/ms/blob/8b5923d1d86c84a9f6aba8022d416dcf2361aa8d/src/index.ts
|
||||
|
||||
type Unit =
|
||||
| "Years"
|
||||
| "Year"
|
||||
| "Yrs"
|
||||
| "Yr"
|
||||
| "Y"
|
||||
| "Weeks"
|
||||
| "Week"
|
||||
| "W"
|
||||
| "Days"
|
||||
| "Day"
|
||||
| "D"
|
||||
| "Hours"
|
||||
| "Hour"
|
||||
| "Hrs"
|
||||
| "Hr"
|
||||
| "H"
|
||||
| "Minutes"
|
||||
| "Minute"
|
||||
| "Mins"
|
||||
| "Min"
|
||||
| "M"
|
||||
| "Seconds"
|
||||
| "Second"
|
||||
| "Secs"
|
||||
| "Sec"
|
||||
| "s"
|
||||
| "Milliseconds"
|
||||
| "Millisecond"
|
||||
| "Msecs"
|
||||
| "Msec"
|
||||
| "Ms";
|
||||
|
||||
type UnitAnyCase = Unit | Uppercase<Unit> | Lowercase<Unit>;
|
||||
|
||||
type StringValue =
|
||||
| `${number}`
|
||||
| `${number}${UnitAnyCase}`
|
||||
| `${number} ${UnitAnyCase}`;
|
||||
}
|
||||
|
||||
export = ms;
|
||||
|
||||
````
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Thu, 16 Jan 2025 21:02:45 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Zhiyuan Wang](https://github.com/danny8002).
|
||||
63
node_modules/@types/ms/index.d.ts
generated
vendored
Normal file
63
node_modules/@types/ms/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/**
|
||||
* Short/Long format for `value`.
|
||||
*
|
||||
* @param {Number} value
|
||||
* @param {{long: boolean}} options
|
||||
* @return {String}
|
||||
*/
|
||||
declare function ms(value: number, options?: { long: boolean }): string;
|
||||
|
||||
/**
|
||||
* Parse the given `value` and return milliseconds.
|
||||
*
|
||||
* @param {ms.StringValue} value
|
||||
* @return {Number}
|
||||
*/
|
||||
declare function ms(value: ms.StringValue): number;
|
||||
|
||||
declare namespace ms {
|
||||
// Unit, UnitAnyCase, and StringValue are backported from ms@3
|
||||
// https://github.com/vercel/ms/blob/8b5923d1d86c84a9f6aba8022d416dcf2361aa8d/src/index.ts
|
||||
|
||||
type Unit =
|
||||
| "Years"
|
||||
| "Year"
|
||||
| "Yrs"
|
||||
| "Yr"
|
||||
| "Y"
|
||||
| "Weeks"
|
||||
| "Week"
|
||||
| "W"
|
||||
| "Days"
|
||||
| "Day"
|
||||
| "D"
|
||||
| "Hours"
|
||||
| "Hour"
|
||||
| "Hrs"
|
||||
| "Hr"
|
||||
| "H"
|
||||
| "Minutes"
|
||||
| "Minute"
|
||||
| "Mins"
|
||||
| "Min"
|
||||
| "M"
|
||||
| "Seconds"
|
||||
| "Second"
|
||||
| "Secs"
|
||||
| "Sec"
|
||||
| "s"
|
||||
| "Milliseconds"
|
||||
| "Millisecond"
|
||||
| "Msecs"
|
||||
| "Msec"
|
||||
| "Ms";
|
||||
|
||||
type UnitAnyCase = Unit | Uppercase<Unit> | Lowercase<Unit>;
|
||||
|
||||
type StringValue =
|
||||
| `${number}`
|
||||
| `${number}${UnitAnyCase}`
|
||||
| `${number} ${UnitAnyCase}`;
|
||||
}
|
||||
|
||||
export = ms;
|
||||
26
node_modules/@types/ms/package.json
generated
vendored
Normal file
26
node_modules/@types/ms/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"name": "@types/ms",
|
||||
"version": "2.1.0",
|
||||
"description": "TypeScript definitions for ms",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ms",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Zhiyuan Wang",
|
||||
"githubUsername": "danny8002",
|
||||
"url": "https://github.com/danny8002"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/ms"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "2c8651ce1714fdc6bcbc0f262c93a790f1d127fb1c2dc8edbb583decef56fd39",
|
||||
"typeScriptVersion": "5.0"
|
||||
}
|
||||
21
node_modules/@types/react/LICENSE
generated
vendored
Normal file
21
node_modules/@types/react/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
15
node_modules/@types/react/README.md
generated
vendored
Normal file
15
node_modules/@types/react/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Installation
|
||||
> `npm install --save @types/react`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for react (https://react.dev/).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Mon, 24 Nov 2025 09:38:12 GMT
|
||||
* Dependencies: [csstype](https://npmjs.com/package/csstype)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [John Reilly](https://github.com/johnnyreilly), [Benoit Benezech](https://github.com/bbenezech), [Patricio Zavolinsky](https://github.com/pzavolinsky), [Eric Anderson](https://github.com/ericanderson), [Dovydas Navickas](https://github.com/DovydasNavickas), [Josh Rutherford](https://github.com/theruther4d), [Guilherme Hübner](https://github.com/guilhermehubner), [Ferdy Budhidharma](https://github.com/ferdaber), [Johann Rakotoharisoa](https://github.com/jrakotoharisoa), [Olivier Pascal](https://github.com/pascaloliv), [Martin Hochel](https://github.com/hotell), [Frank Li](https://github.com/franklixuefei), [Jessica Franco](https://github.com/Jessidhia), [Saransh Kataria](https://github.com/saranshkataria), [Kanitkorn Sujautra](https://github.com/lukyth), [Sebastian Silbermann](https://github.com/eps1lon), [Kyle Scully](https://github.com/zieka), [Cong Zhang](https://github.com/dancerphil), [Dimitri Mitropoulos](https://github.com/dimitropoulos), [JongChan Choi](https://github.com/disjukr), [Victor Magalhães](https://github.com/vhfmag), [Priyanshu Rav](https://github.com/priyanshurav), [Dmitry Semigradsky](https://github.com/Semigradsky), and [Matt Pocock](https://github.com/mattpocock).
|
||||
120
node_modules/@types/react/canary.d.ts
generated
vendored
Normal file
120
node_modules/@types/react/canary.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
/**
|
||||
* These are types for things that are present in the React `canary` release channel.
|
||||
*
|
||||
* To load the types declared here in an actual project, there are three ways. The easiest one,
|
||||
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
|
||||
* is to add `"react/canary"` to the `"types"` array.
|
||||
*
|
||||
* Alternatively, a specific import syntax can to be used from a typescript file.
|
||||
* This module does not exist in reality, which is why the {} is important:
|
||||
*
|
||||
* ```ts
|
||||
* import {} from 'react/canary'
|
||||
* ```
|
||||
*
|
||||
* It is also possible to include it through a triple-slash reference:
|
||||
*
|
||||
* ```ts
|
||||
* /// <reference types="react/canary" />
|
||||
* ```
|
||||
*
|
||||
* Either the import or the reference only needs to appear once, anywhere in the project.
|
||||
*/
|
||||
|
||||
// See https://github.com/facebook/react/blob/main/packages/react/src/React.js to see how the exports are declared,
|
||||
|
||||
import React = require(".");
|
||||
|
||||
export {};
|
||||
|
||||
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
||||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
||||
|
||||
declare module "." {
|
||||
export function unstable_useCacheRefresh(): () => void;
|
||||
|
||||
// @enableViewTransition
|
||||
export interface ViewTransitionInstance {
|
||||
/**
|
||||
* The {@link ViewTransitionProps name} that was used in the corresponding {@link ViewTransition} component or `"auto"` if the `name` prop was omitted.
|
||||
*/
|
||||
name: string;
|
||||
}
|
||||
|
||||
export type ViewTransitionClassPerType = Record<"default" | (string & {}), "none" | "auto" | (string & {})>;
|
||||
export type ViewTransitionClass = ViewTransitionClassPerType | ViewTransitionClassPerType[string];
|
||||
|
||||
export interface ViewTransitionProps {
|
||||
children?: ReactNode | undefined;
|
||||
/**
|
||||
* Assigns the {@link https://developer.chrome.com/blog/view-transitions-update-io24#view-transition-class `view-transition-class`} class to the underlying DOM node.
|
||||
*/
|
||||
default?: ViewTransitionClass | undefined;
|
||||
/**
|
||||
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is mounted and there's no other with the same name being deleted.
|
||||
* `"none"` is a special value that deactivates the view transition name under that condition.
|
||||
*/
|
||||
enter?: ViewTransitionClass | undefined;
|
||||
/**
|
||||
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is unmounted and there's no other with the same name being deleted.
|
||||
* `"none"` is a special value that deactivates the view transition name under that condition.
|
||||
*/
|
||||
exit?: ViewTransitionClass | undefined;
|
||||
/**
|
||||
* "auto" will automatically assign a view-transition-name to the inner DOM node.
|
||||
* That way you can add a View Transition to a Component without controlling its DOM nodes styling otherwise.
|
||||
*
|
||||
* A difference between this and the browser's built-in view-transition-name: auto is that switching the DOM nodes within the `<ViewTransition>` component preserves the same name so this example cross-fades between the DOM nodes instead of causing an exit and enter.
|
||||
* @default "auto"
|
||||
*/
|
||||
name?: "auto" | (string & {}) | undefined;
|
||||
/**
|
||||
* The `<ViewTransition>` or its parent Component is mounted and there's no other `<ViewTransition>` with the same name being deleted.
|
||||
*/
|
||||
onEnter?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
||||
/**
|
||||
* The `<ViewTransition>` or its parent Component is unmounted and there's no other `<ViewTransition>` with the same name being deleted.
|
||||
*/
|
||||
onExit?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
||||
/**
|
||||
* This `<ViewTransition>` is being mounted and another `<ViewTransition>` instance with the same name is being unmounted elsewhere.
|
||||
*/
|
||||
onShare?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
||||
/**
|
||||
* The content of `<ViewTransition>` has changed either due to DOM mutations or because an inner child `<ViewTransition>` has resized.
|
||||
*/
|
||||
onUpdate?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
||||
ref?: Ref<ViewTransitionInstance> | undefined;
|
||||
/**
|
||||
* Combined with {@link className} if this `<ViewTransition>` is being mounted and another instance with the same name is being unmounted elsewhere.
|
||||
* `"none"` is a special value that deactivates the view transition name under that condition.
|
||||
*/
|
||||
share?: ViewTransitionClass | undefined;
|
||||
/**
|
||||
* Combined with {@link className} if the content of this `<ViewTransition>` has changed either due to DOM mutations or because an inner child has resized.
|
||||
* `"none"` is a special value that deactivates the view transition name under that condition.
|
||||
*/
|
||||
update?: ViewTransitionClass | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opt-in for using {@link https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API View Transitions} in React.
|
||||
* View Transitions only trigger for async updates like {@link startTransition}, {@link useDeferredValue}, Actions or <{@link Suspense}> revealing from fallback to content.
|
||||
* Synchronous updates provide an opt-out but also guarantee that they commit immediately which View Transitions can't.
|
||||
*
|
||||
* @see {@link https://react.dev/reference/react/ViewTransition `<ViewTransition>` reference documentation}
|
||||
*/
|
||||
export const ViewTransition: ExoticComponent<ViewTransitionProps>;
|
||||
|
||||
/**
|
||||
* @see {@link https://react.dev/reference/react/addTransitionType `addTransitionType` reference documentation}
|
||||
*/
|
||||
export function addTransitionType(type: string): void;
|
||||
|
||||
// @enableFragmentRefs
|
||||
export interface FragmentInstance {}
|
||||
|
||||
export interface FragmentProps {
|
||||
ref?: Ref<FragmentInstance> | undefined;
|
||||
}
|
||||
}
|
||||
4
node_modules/@types/react/compiler-runtime.d.ts
generated
vendored
Normal file
4
node_modules/@types/react/compiler-runtime.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
// Not meant to be used directly
|
||||
// Omitting all exports so that they don't appear in IDE autocomplete.
|
||||
|
||||
export {};
|
||||
147
node_modules/@types/react/experimental.d.ts
generated
vendored
Normal file
147
node_modules/@types/react/experimental.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
/**
|
||||
* These are types for things that are present in the `experimental` builds of React but not yet
|
||||
* on a stable build.
|
||||
*
|
||||
* Once they are promoted to stable they can just be moved to the main index file.
|
||||
*
|
||||
* To load the types declared here in an actual project, there are three ways. The easiest one,
|
||||
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
|
||||
* is to add `"react/experimental"` to the `"types"` array.
|
||||
*
|
||||
* Alternatively, a specific import syntax can to be used from a typescript file.
|
||||
* This module does not exist in reality, which is why the {} is important:
|
||||
*
|
||||
* ```ts
|
||||
* import {} from 'react/experimental'
|
||||
* ```
|
||||
*
|
||||
* It is also possible to include it through a triple-slash reference:
|
||||
*
|
||||
* ```ts
|
||||
* /// <reference types="react/experimental" />
|
||||
* ```
|
||||
*
|
||||
* Either the import or the reference only needs to appear once, anywhere in the project.
|
||||
*/
|
||||
|
||||
// See https://github.com/facebook/react/blob/master/packages/react/src/React.js to see how the exports are declared,
|
||||
// and https://github.com/facebook/react/blob/master/packages/shared/ReactFeatureFlags.js to verify which APIs are
|
||||
// flagged experimental or not. Experimental APIs will be tagged with `__EXPERIMENTAL__`.
|
||||
//
|
||||
// For the inputs of types exported as simply a fiber tag, the `beginWork` function of ReactFiberBeginWork.js
|
||||
// is a good place to start looking for details; it generally calls prop validation functions or delegates
|
||||
// all tasks done as part of the render phase (the concurrent part of the React update cycle).
|
||||
//
|
||||
// Suspense-related handling can be found in ReactFiberThrow.js.
|
||||
|
||||
import React = require("./canary");
|
||||
|
||||
export {};
|
||||
|
||||
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
||||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
||||
|
||||
declare module "." {
|
||||
export interface SuspenseProps {
|
||||
// @enableCPUSuspense
|
||||
/**
|
||||
* The presence of this prop indicates that the content is computationally expensive to render.
|
||||
* In other words, the tree is CPU bound and not I/O bound (e.g. due to fetching data).
|
||||
* @see {@link https://github.com/facebook/react/pull/19936}
|
||||
*/
|
||||
defer?: boolean | undefined;
|
||||
}
|
||||
|
||||
export type SuspenseListRevealOrder = "forwards" | "backwards" | "together" | "independent";
|
||||
export type SuspenseListTailMode = "collapsed" | "hidden" | "visible";
|
||||
|
||||
export interface SuspenseListCommonProps {
|
||||
}
|
||||
|
||||
interface DirectionalSuspenseListProps extends SuspenseListCommonProps {
|
||||
/**
|
||||
* Note that SuspenseList require more than one child;
|
||||
* it is a runtime warning to provide only a single child.
|
||||
*
|
||||
* It does, however, allow those children to be wrapped inside a single
|
||||
* level of `<React.Fragment>`.
|
||||
*/
|
||||
children: Iterable<ReactElement> | AsyncIterable<ReactElement>;
|
||||
/**
|
||||
* Defines the order in which the `SuspenseList` children should be revealed.
|
||||
* @default "forwards"
|
||||
*/
|
||||
revealOrder?: "forwards" | "backwards" | "unstable_legacy-backwards" | undefined;
|
||||
/**
|
||||
* Dictates how unloaded items in a SuspenseList is shown.
|
||||
*
|
||||
* - `collapsed` shows only the next fallback in the list.
|
||||
* - `hidden` doesn't show any unloaded items.
|
||||
* - `visible` shows all fallbacks in the list.
|
||||
*
|
||||
* @default "hidden"
|
||||
*/
|
||||
tail?: SuspenseListTailMode | undefined;
|
||||
}
|
||||
|
||||
interface NonDirectionalSuspenseListProps extends SuspenseListCommonProps {
|
||||
children: ReactNode;
|
||||
/**
|
||||
* Defines the order in which the `SuspenseList` children should be revealed.
|
||||
*/
|
||||
revealOrder: Exclude<SuspenseListRevealOrder, DirectionalSuspenseListProps["revealOrder"]>;
|
||||
/**
|
||||
* The tail property is invalid when not using the `forwards` or `backwards` reveal orders.
|
||||
*/
|
||||
tail?: never;
|
||||
}
|
||||
|
||||
export type SuspenseListProps = DirectionalSuspenseListProps | NonDirectionalSuspenseListProps;
|
||||
|
||||
/**
|
||||
* `SuspenseList` helps coordinate many components that can suspend by orchestrating the order
|
||||
* in which these components are revealed to the user.
|
||||
*
|
||||
* When multiple components need to fetch data, this data may arrive in an unpredictable order.
|
||||
* However, if you wrap these items in a `SuspenseList`, React will not show an item in the list
|
||||
* until previous items have been displayed (this behavior is adjustable).
|
||||
*
|
||||
* @see https://reactjs.org/docs/concurrent-mode-reference.html#suspenselist
|
||||
* @see https://reactjs.org/docs/concurrent-mode-patterns.html#suspenselist
|
||||
*/
|
||||
export const unstable_SuspenseList: ExoticComponent<SuspenseListProps>;
|
||||
|
||||
type Reference = object;
|
||||
type TaintableUniqueValue = string | bigint | ArrayBufferView;
|
||||
function experimental_taintUniqueValue(
|
||||
message: string | undefined,
|
||||
lifetime: Reference,
|
||||
value: TaintableUniqueValue,
|
||||
): void;
|
||||
function experimental_taintObjectReference(message: string | undefined, object: Reference): void;
|
||||
|
||||
// @enableGestureTransition
|
||||
// Implemented by the specific renderer e.g. `react-dom`.
|
||||
// Keep in mind that augmented interfaces merge their JSDoc so if you put
|
||||
// JSDoc here and in the renderer, the IDE will display both.
|
||||
export interface GestureProvider {}
|
||||
export interface GestureOptions {
|
||||
rangeStart?: number | undefined;
|
||||
rangeEnd?: number | undefined;
|
||||
}
|
||||
/** */
|
||||
export function unstable_startGestureTransition(
|
||||
provider: GestureProvider,
|
||||
scope: () => void,
|
||||
options?: GestureOptions,
|
||||
): () => void;
|
||||
|
||||
// @enableSrcObject
|
||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES {
|
||||
srcObject: Blob;
|
||||
}
|
||||
|
||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES {
|
||||
srcObject: Blob | MediaSource | MediaStream;
|
||||
}
|
||||
}
|
||||
165
node_modules/@types/react/global.d.ts
generated
vendored
Normal file
165
node_modules/@types/react/global.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,165 @@
|
|||
/*
|
||||
React projects that don't include the DOM library need these interfaces to compile.
|
||||
React Native applications use React, but there is no DOM available. The JavaScript runtime
|
||||
is ES6/ES2015 only. These definitions allow such projects to compile with only `--lib ES6`.
|
||||
|
||||
Warning: all of these interfaces are empty. If you want type definitions for various properties
|
||||
(such as HTMLInputElement.prototype.value), you need to add `--lib DOM` (via command line or tsconfig.json).
|
||||
*/
|
||||
|
||||
interface Event {}
|
||||
interface AnimationEvent extends Event {}
|
||||
interface ClipboardEvent extends Event {}
|
||||
interface CompositionEvent extends Event {}
|
||||
interface DragEvent extends Event {}
|
||||
interface FocusEvent extends Event {}
|
||||
interface InputEvent extends Event {}
|
||||
interface KeyboardEvent extends Event {}
|
||||
interface MouseEvent extends Event {}
|
||||
interface TouchEvent extends Event {}
|
||||
interface PointerEvent extends Event {}
|
||||
interface ToggleEvent extends Event {}
|
||||
interface TransitionEvent extends Event {}
|
||||
interface UIEvent extends Event {}
|
||||
interface WheelEvent extends Event {}
|
||||
|
||||
interface EventTarget {}
|
||||
interface Document {}
|
||||
interface DataTransfer {}
|
||||
interface StyleMedia {}
|
||||
|
||||
interface Element {}
|
||||
interface DocumentFragment {}
|
||||
|
||||
interface HTMLElement extends Element {}
|
||||
interface HTMLAnchorElement extends HTMLElement {}
|
||||
interface HTMLAreaElement extends HTMLElement {}
|
||||
interface HTMLAudioElement extends HTMLElement {}
|
||||
interface HTMLBaseElement extends HTMLElement {}
|
||||
interface HTMLBodyElement extends HTMLElement {}
|
||||
interface HTMLBRElement extends HTMLElement {}
|
||||
interface HTMLButtonElement extends HTMLElement {}
|
||||
interface HTMLCanvasElement extends HTMLElement {}
|
||||
interface HTMLDataElement extends HTMLElement {}
|
||||
interface HTMLDataListElement extends HTMLElement {}
|
||||
interface HTMLDetailsElement extends HTMLElement {}
|
||||
interface HTMLDialogElement extends HTMLElement {}
|
||||
interface HTMLDivElement extends HTMLElement {}
|
||||
interface HTMLDListElement extends HTMLElement {}
|
||||
interface HTMLEmbedElement extends HTMLElement {}
|
||||
interface HTMLFieldSetElement extends HTMLElement {}
|
||||
interface HTMLFormElement extends HTMLElement {}
|
||||
interface HTMLHeadingElement extends HTMLElement {}
|
||||
interface HTMLHeadElement extends HTMLElement {}
|
||||
interface HTMLHRElement extends HTMLElement {}
|
||||
interface HTMLHtmlElement extends HTMLElement {}
|
||||
interface HTMLIFrameElement extends HTMLElement {}
|
||||
interface HTMLImageElement extends HTMLElement {}
|
||||
interface HTMLInputElement extends HTMLElement {}
|
||||
interface HTMLModElement extends HTMLElement {}
|
||||
interface HTMLLabelElement extends HTMLElement {}
|
||||
interface HTMLLegendElement extends HTMLElement {}
|
||||
interface HTMLLIElement extends HTMLElement {}
|
||||
interface HTMLLinkElement extends HTMLElement {}
|
||||
interface HTMLMapElement extends HTMLElement {}
|
||||
interface HTMLMetaElement extends HTMLElement {}
|
||||
interface HTMLMeterElement extends HTMLElement {}
|
||||
interface HTMLObjectElement extends HTMLElement {}
|
||||
interface HTMLOListElement extends HTMLElement {}
|
||||
interface HTMLOptGroupElement extends HTMLElement {}
|
||||
interface HTMLOptionElement extends HTMLElement {}
|
||||
interface HTMLOutputElement extends HTMLElement {}
|
||||
interface HTMLParagraphElement extends HTMLElement {}
|
||||
interface HTMLParamElement extends HTMLElement {}
|
||||
interface HTMLPreElement extends HTMLElement {}
|
||||
interface HTMLProgressElement extends HTMLElement {}
|
||||
interface HTMLQuoteElement extends HTMLElement {}
|
||||
interface HTMLSlotElement extends HTMLElement {}
|
||||
interface HTMLScriptElement extends HTMLElement {}
|
||||
interface HTMLSelectElement extends HTMLElement {}
|
||||
interface HTMLSourceElement extends HTMLElement {}
|
||||
interface HTMLSpanElement extends HTMLElement {}
|
||||
interface HTMLStyleElement extends HTMLElement {}
|
||||
interface HTMLTableElement extends HTMLElement {}
|
||||
interface HTMLTableColElement extends HTMLElement {}
|
||||
interface HTMLTableDataCellElement extends HTMLElement {}
|
||||
interface HTMLTableHeaderCellElement extends HTMLElement {}
|
||||
interface HTMLTableRowElement extends HTMLElement {}
|
||||
interface HTMLTableSectionElement extends HTMLElement {}
|
||||
interface HTMLTemplateElement extends HTMLElement {}
|
||||
interface HTMLTextAreaElement extends HTMLElement {}
|
||||
interface HTMLTimeElement extends HTMLElement {}
|
||||
interface HTMLTitleElement extends HTMLElement {}
|
||||
interface HTMLTrackElement extends HTMLElement {}
|
||||
interface HTMLUListElement extends HTMLElement {}
|
||||
interface HTMLVideoElement extends HTMLElement {}
|
||||
interface HTMLWebViewElement extends HTMLElement {}
|
||||
|
||||
interface SVGElement extends Element {}
|
||||
interface SVGSVGElement extends SVGElement {}
|
||||
interface SVGCircleElement extends SVGElement {}
|
||||
interface SVGClipPathElement extends SVGElement {}
|
||||
interface SVGDefsElement extends SVGElement {}
|
||||
interface SVGDescElement extends SVGElement {}
|
||||
interface SVGEllipseElement extends SVGElement {}
|
||||
interface SVGFEBlendElement extends SVGElement {}
|
||||
interface SVGFEColorMatrixElement extends SVGElement {}
|
||||
interface SVGFEComponentTransferElement extends SVGElement {}
|
||||
interface SVGFECompositeElement extends SVGElement {}
|
||||
interface SVGFEConvolveMatrixElement extends SVGElement {}
|
||||
interface SVGFEDiffuseLightingElement extends SVGElement {}
|
||||
interface SVGFEDisplacementMapElement extends SVGElement {}
|
||||
interface SVGFEDistantLightElement extends SVGElement {}
|
||||
interface SVGFEDropShadowElement extends SVGElement {}
|
||||
interface SVGFEFloodElement extends SVGElement {}
|
||||
interface SVGFEFuncAElement extends SVGElement {}
|
||||
interface SVGFEFuncBElement extends SVGElement {}
|
||||
interface SVGFEFuncGElement extends SVGElement {}
|
||||
interface SVGFEFuncRElement extends SVGElement {}
|
||||
interface SVGFEGaussianBlurElement extends SVGElement {}
|
||||
interface SVGFEImageElement extends SVGElement {}
|
||||
interface SVGFEMergeElement extends SVGElement {}
|
||||
interface SVGFEMergeNodeElement extends SVGElement {}
|
||||
interface SVGFEMorphologyElement extends SVGElement {}
|
||||
interface SVGFEOffsetElement extends SVGElement {}
|
||||
interface SVGFEPointLightElement extends SVGElement {}
|
||||
interface SVGFESpecularLightingElement extends SVGElement {}
|
||||
interface SVGFESpotLightElement extends SVGElement {}
|
||||
interface SVGFETileElement extends SVGElement {}
|
||||
interface SVGFETurbulenceElement extends SVGElement {}
|
||||
interface SVGFilterElement extends SVGElement {}
|
||||
interface SVGForeignObjectElement extends SVGElement {}
|
||||
interface SVGGElement extends SVGElement {}
|
||||
interface SVGImageElement extends SVGElement {}
|
||||
interface SVGLineElement extends SVGElement {}
|
||||
interface SVGLinearGradientElement extends SVGElement {}
|
||||
interface SVGMarkerElement extends SVGElement {}
|
||||
interface SVGMaskElement extends SVGElement {}
|
||||
interface SVGMetadataElement extends SVGElement {}
|
||||
interface SVGPathElement extends SVGElement {}
|
||||
interface SVGPatternElement extends SVGElement {}
|
||||
interface SVGPolygonElement extends SVGElement {}
|
||||
interface SVGPolylineElement extends SVGElement {}
|
||||
interface SVGRadialGradientElement extends SVGElement {}
|
||||
interface SVGRectElement extends SVGElement {}
|
||||
interface SVGSetElement extends SVGElement {}
|
||||
interface SVGStopElement extends SVGElement {}
|
||||
interface SVGSwitchElement extends SVGElement {}
|
||||
interface SVGSymbolElement extends SVGElement {}
|
||||
interface SVGTextElement extends SVGElement {}
|
||||
interface SVGTextPathElement extends SVGElement {}
|
||||
interface SVGTSpanElement extends SVGElement {}
|
||||
interface SVGUseElement extends SVGElement {}
|
||||
interface SVGViewElement extends SVGElement {}
|
||||
|
||||
interface FormData {}
|
||||
interface Text {}
|
||||
interface TouchList {}
|
||||
interface WebGLRenderingContext {}
|
||||
interface WebGL2RenderingContext {}
|
||||
|
||||
interface TrustedHTML {}
|
||||
|
||||
interface Blob {}
|
||||
interface MediaStream {}
|
||||
interface MediaSource {}
|
||||
4324
node_modules/@types/react/index.d.ts
generated
vendored
Normal file
4324
node_modules/@types/react/index.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
45
node_modules/@types/react/jsx-dev-runtime.d.ts
generated
vendored
Normal file
45
node_modules/@types/react/jsx-dev-runtime.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
import * as React from "./";
|
||||
export { Fragment } from "./";
|
||||
|
||||
export namespace JSX {
|
||||
type ElementType = React.JSX.ElementType;
|
||||
interface Element extends React.JSX.Element {}
|
||||
interface ElementClass extends React.JSX.ElementClass {}
|
||||
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
|
||||
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
|
||||
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
|
||||
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
|
||||
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
|
||||
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
|
||||
}
|
||||
|
||||
export interface JSXSource {
|
||||
/**
|
||||
* The source file where the element originates from.
|
||||
*/
|
||||
fileName?: string | undefined;
|
||||
|
||||
/**
|
||||
* The line number where the element was created.
|
||||
*/
|
||||
lineNumber?: number | undefined;
|
||||
|
||||
/**
|
||||
* The column number where the element was created.
|
||||
*/
|
||||
columnNumber?: number | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a React element.
|
||||
*
|
||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
||||
*/
|
||||
export function jsxDEV(
|
||||
type: React.ElementType,
|
||||
props: unknown,
|
||||
key: React.Key | undefined,
|
||||
isStatic: boolean,
|
||||
source?: JSXSource,
|
||||
self?: unknown,
|
||||
): React.ReactElement;
|
||||
36
node_modules/@types/react/jsx-runtime.d.ts
generated
vendored
Normal file
36
node_modules/@types/react/jsx-runtime.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import * as React from "./";
|
||||
export { Fragment } from "./";
|
||||
|
||||
export namespace JSX {
|
||||
type ElementType = React.JSX.ElementType;
|
||||
interface Element extends React.JSX.Element {}
|
||||
interface ElementClass extends React.JSX.ElementClass {}
|
||||
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
|
||||
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
|
||||
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
|
||||
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
|
||||
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
|
||||
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a React element.
|
||||
*
|
||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
||||
*/
|
||||
export function jsx(
|
||||
type: React.ElementType,
|
||||
props: unknown,
|
||||
key?: React.Key,
|
||||
): React.ReactElement;
|
||||
|
||||
/**
|
||||
* Create a React element.
|
||||
*
|
||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
||||
*/
|
||||
export function jsxs(
|
||||
type: React.ElementType,
|
||||
props: unknown,
|
||||
key?: React.Key,
|
||||
): React.ReactElement;
|
||||
210
node_modules/@types/react/package.json
generated
vendored
Normal file
210
node_modules/@types/react/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,210 @@
|
|||
{
|
||||
"name": "@types/react",
|
||||
"version": "19.2.7",
|
||||
"description": "TypeScript definitions for react",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Asana",
|
||||
"url": "https://asana.com"
|
||||
},
|
||||
{
|
||||
"name": "AssureSign",
|
||||
"url": "http://www.assuresign.com"
|
||||
},
|
||||
{
|
||||
"name": "Microsoft",
|
||||
"url": "https://microsoft.com"
|
||||
},
|
||||
{
|
||||
"name": "John Reilly",
|
||||
"githubUsername": "johnnyreilly",
|
||||
"url": "https://github.com/johnnyreilly"
|
||||
},
|
||||
{
|
||||
"name": "Benoit Benezech",
|
||||
"githubUsername": "bbenezech",
|
||||
"url": "https://github.com/bbenezech"
|
||||
},
|
||||
{
|
||||
"name": "Patricio Zavolinsky",
|
||||
"githubUsername": "pzavolinsky",
|
||||
"url": "https://github.com/pzavolinsky"
|
||||
},
|
||||
{
|
||||
"name": "Eric Anderson",
|
||||
"githubUsername": "ericanderson",
|
||||
"url": "https://github.com/ericanderson"
|
||||
},
|
||||
{
|
||||
"name": "Dovydas Navickas",
|
||||
"githubUsername": "DovydasNavickas",
|
||||
"url": "https://github.com/DovydasNavickas"
|
||||
},
|
||||
{
|
||||
"name": "Josh Rutherford",
|
||||
"githubUsername": "theruther4d",
|
||||
"url": "https://github.com/theruther4d"
|
||||
},
|
||||
{
|
||||
"name": "Guilherme Hübner",
|
||||
"githubUsername": "guilhermehubner",
|
||||
"url": "https://github.com/guilhermehubner"
|
||||
},
|
||||
{
|
||||
"name": "Ferdy Budhidharma",
|
||||
"githubUsername": "ferdaber",
|
||||
"url": "https://github.com/ferdaber"
|
||||
},
|
||||
{
|
||||
"name": "Johann Rakotoharisoa",
|
||||
"githubUsername": "jrakotoharisoa",
|
||||
"url": "https://github.com/jrakotoharisoa"
|
||||
},
|
||||
{
|
||||
"name": "Olivier Pascal",
|
||||
"githubUsername": "pascaloliv",
|
||||
"url": "https://github.com/pascaloliv"
|
||||
},
|
||||
{
|
||||
"name": "Martin Hochel",
|
||||
"githubUsername": "hotell",
|
||||
"url": "https://github.com/hotell"
|
||||
},
|
||||
{
|
||||
"name": "Frank Li",
|
||||
"githubUsername": "franklixuefei",
|
||||
"url": "https://github.com/franklixuefei"
|
||||
},
|
||||
{
|
||||
"name": "Jessica Franco",
|
||||
"githubUsername": "Jessidhia",
|
||||
"url": "https://github.com/Jessidhia"
|
||||
},
|
||||
{
|
||||
"name": "Saransh Kataria",
|
||||
"githubUsername": "saranshkataria",
|
||||
"url": "https://github.com/saranshkataria"
|
||||
},
|
||||
{
|
||||
"name": "Kanitkorn Sujautra",
|
||||
"githubUsername": "lukyth",
|
||||
"url": "https://github.com/lukyth"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Silbermann",
|
||||
"githubUsername": "eps1lon",
|
||||
"url": "https://github.com/eps1lon"
|
||||
},
|
||||
{
|
||||
"name": "Kyle Scully",
|
||||
"githubUsername": "zieka",
|
||||
"url": "https://github.com/zieka"
|
||||
},
|
||||
{
|
||||
"name": "Cong Zhang",
|
||||
"githubUsername": "dancerphil",
|
||||
"url": "https://github.com/dancerphil"
|
||||
},
|
||||
{
|
||||
"name": "Dimitri Mitropoulos",
|
||||
"githubUsername": "dimitropoulos",
|
||||
"url": "https://github.com/dimitropoulos"
|
||||
},
|
||||
{
|
||||
"name": "JongChan Choi",
|
||||
"githubUsername": "disjukr",
|
||||
"url": "https://github.com/disjukr"
|
||||
},
|
||||
{
|
||||
"name": "Victor Magalhães",
|
||||
"githubUsername": "vhfmag",
|
||||
"url": "https://github.com/vhfmag"
|
||||
},
|
||||
{
|
||||
"name": "Priyanshu Rav",
|
||||
"githubUsername": "priyanshurav",
|
||||
"url": "https://github.com/priyanshurav"
|
||||
},
|
||||
{
|
||||
"name": "Dmitry Semigradsky",
|
||||
"githubUsername": "Semigradsky",
|
||||
"url": "https://github.com/Semigradsky"
|
||||
},
|
||||
{
|
||||
"name": "Matt Pocock",
|
||||
"githubUsername": "mattpocock",
|
||||
"url": "https://github.com/mattpocock"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"typesVersions": {
|
||||
"<=5.0": {
|
||||
"*": [
|
||||
"ts5.0/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types@<=5.0": {
|
||||
"default": "./ts5.0/index.d.ts"
|
||||
},
|
||||
"types": {
|
||||
"default": "./index.d.ts"
|
||||
}
|
||||
},
|
||||
"./canary": {
|
||||
"types@<=5.0": {
|
||||
"default": "./ts5.0/canary.d.ts"
|
||||
},
|
||||
"types": {
|
||||
"default": "./canary.d.ts"
|
||||
}
|
||||
},
|
||||
"./compiler-runtime": {
|
||||
"types": {
|
||||
"default": "./compiler-runtime.d.ts"
|
||||
}
|
||||
},
|
||||
"./experimental": {
|
||||
"types@<=5.0": {
|
||||
"default": "./ts5.0/experimental.d.ts"
|
||||
},
|
||||
"types": {
|
||||
"default": "./experimental.d.ts"
|
||||
}
|
||||
},
|
||||
"./jsx-runtime": {
|
||||
"types@<=5.0": {
|
||||
"default": "./ts5.0/jsx-runtime.d.ts"
|
||||
},
|
||||
"types": {
|
||||
"default": "./jsx-runtime.d.ts"
|
||||
}
|
||||
},
|
||||
"./jsx-dev-runtime": {
|
||||
"types@<=5.0": {
|
||||
"default": "./ts5.0/jsx-dev-runtime.d.ts"
|
||||
},
|
||||
"types": {
|
||||
"default": "./jsx-dev-runtime.d.ts"
|
||||
}
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/react"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"csstype": "^3.2.2"
|
||||
},
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "fd69ea47f2fc8e9d139677eb6bcca67ee4b3ac279ce5ceb2e6e23ce8403c356d",
|
||||
"typeScriptVersion": "5.2"
|
||||
}
|
||||
120
node_modules/@types/react/ts5.0/canary.d.ts
generated
vendored
Normal file
120
node_modules/@types/react/ts5.0/canary.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
/**
|
||||
* These are types for things that are present in the React `canary` release channel.
|
||||
*
|
||||
* To load the types declared here in an actual project, there are three ways. The easiest one,
|
||||
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
|
||||
* is to add `"react/canary"` to the `"types"` array.
|
||||
*
|
||||
* Alternatively, a specific import syntax can to be used from a typescript file.
|
||||
* This module does not exist in reality, which is why the {} is important:
|
||||
*
|
||||
* ```ts
|
||||
* import {} from 'react/canary'
|
||||
* ```
|
||||
*
|
||||
* It is also possible to include it through a triple-slash reference:
|
||||
*
|
||||
* ```ts
|
||||
* /// <reference types="react/canary" />
|
||||
* ```
|
||||
*
|
||||
* Either the import or the reference only needs to appear once, anywhere in the project.
|
||||
*/
|
||||
|
||||
// See https://github.com/facebook/react/blob/main/packages/react/src/React.js to see how the exports are declared,
|
||||
|
||||
import React = require(".");
|
||||
|
||||
export {};
|
||||
|
||||
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
||||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
||||
|
||||
declare module "." {
|
||||
export function unstable_useCacheRefresh(): () => void;
|
||||
|
||||
// @enableViewTransition
|
||||
export interface ViewTransitionInstance {
|
||||
/**
|
||||
* The {@link ViewTransitionProps name} that was used in the corresponding {@link ViewTransition} component or `"auto"` if the `name` prop was omitted.
|
||||
*/
|
||||
name: string;
|
||||
}
|
||||
|
||||
export type ViewTransitionClassPerType = Record<"default" | (string & {}), "none" | "auto" | (string & {})>;
|
||||
export type ViewTransitionClass = ViewTransitionClassPerType | ViewTransitionClassPerType[string];
|
||||
|
||||
export interface ViewTransitionProps {
|
||||
children?: ReactNode | undefined;
|
||||
/**
|
||||
* Assigns the {@link https://developer.chrome.com/blog/view-transitions-update-io24#view-transition-class `view-transition-class`} class to the underlying DOM node.
|
||||
*/
|
||||
default?: ViewTransitionClass | undefined;
|
||||
/**
|
||||
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is mounted and there's no other with the same name being deleted.
|
||||
* `"none"` is a special value that deactivates the view transition name under that condition.
|
||||
*/
|
||||
enter?: ViewTransitionClass | undefined;
|
||||
/**
|
||||
* Combined with {@link className} if this `<ViewTransition>` or its parent Component is unmounted and there's no other with the same name being deleted.
|
||||
* `"none"` is a special value that deactivates the view transition name under that condition.
|
||||
*/
|
||||
exit?: ViewTransitionClass | undefined;
|
||||
/**
|
||||
* "auto" will automatically assign a view-transition-name to the inner DOM node.
|
||||
* That way you can add a View Transition to a Component without controlling its DOM nodes styling otherwise.
|
||||
*
|
||||
* A difference between this and the browser's built-in view-transition-name: auto is that switching the DOM nodes within the `<ViewTransition>` component preserves the same name so this example cross-fades between the DOM nodes instead of causing an exit and enter.
|
||||
* @default "auto"
|
||||
*/
|
||||
name?: "auto" | (string & {}) | undefined;
|
||||
/**
|
||||
* The `<ViewTransition>` or its parent Component is mounted and there's no other `<ViewTransition>` with the same name being deleted.
|
||||
*/
|
||||
onEnter?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
||||
/**
|
||||
* The `<ViewTransition>` or its parent Component is unmounted and there's no other `<ViewTransition>` with the same name being deleted.
|
||||
*/
|
||||
onExit?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
||||
/**
|
||||
* This `<ViewTransition>` is being mounted and another `<ViewTransition>` instance with the same name is being unmounted elsewhere.
|
||||
*/
|
||||
onShare?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
||||
/**
|
||||
* The content of `<ViewTransition>` has changed either due to DOM mutations or because an inner child `<ViewTransition>` has resized.
|
||||
*/
|
||||
onUpdate?: (instance: ViewTransitionInstance, types: Array<string>) => void;
|
||||
ref?: Ref<ViewTransitionInstance> | undefined;
|
||||
/**
|
||||
* Combined with {@link className} if this `<ViewTransition>` is being mounted and another instance with the same name is being unmounted elsewhere.
|
||||
* `"none"` is a special value that deactivates the view transition name under that condition.
|
||||
*/
|
||||
share?: ViewTransitionClass | undefined;
|
||||
/**
|
||||
* Combined with {@link className} if the content of this `<ViewTransition>` has changed either due to DOM mutations or because an inner child has resized.
|
||||
* `"none"` is a special value that deactivates the view transition name under that condition.
|
||||
*/
|
||||
update?: ViewTransitionClass | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opt-in for using {@link https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API View Transitions} in React.
|
||||
* View Transitions only trigger for async updates like {@link startTransition}, {@link useDeferredValue}, Actions or <{@link Suspense}> revealing from fallback to content.
|
||||
* Synchronous updates provide an opt-out but also guarantee that they commit immediately which View Transitions can't.
|
||||
*
|
||||
* @see {@link https://react.dev/reference/react/ViewTransition `<ViewTransition>` reference documentation}
|
||||
*/
|
||||
export const ViewTransition: ExoticComponent<ViewTransitionProps>;
|
||||
|
||||
/**
|
||||
* @see {@link https://react.dev/reference/react/addTransitionType `addTransitionType` reference documentation}
|
||||
*/
|
||||
export function addTransitionType(type: string): void;
|
||||
|
||||
// @enableFragmentRefs
|
||||
export interface FragmentInstance {}
|
||||
|
||||
export interface FragmentProps {
|
||||
ref?: Ref<FragmentInstance> | undefined;
|
||||
}
|
||||
}
|
||||
147
node_modules/@types/react/ts5.0/experimental.d.ts
generated
vendored
Normal file
147
node_modules/@types/react/ts5.0/experimental.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
/**
|
||||
* These are types for things that are present in the `experimental` builds of React but not yet
|
||||
* on a stable build.
|
||||
*
|
||||
* Once they are promoted to stable they can just be moved to the main index file.
|
||||
*
|
||||
* To load the types declared here in an actual project, there are three ways. The easiest one,
|
||||
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
|
||||
* is to add `"react/experimental"` to the `"types"` array.
|
||||
*
|
||||
* Alternatively, a specific import syntax can to be used from a typescript file.
|
||||
* This module does not exist in reality, which is why the {} is important:
|
||||
*
|
||||
* ```ts
|
||||
* import {} from 'react/experimental'
|
||||
* ```
|
||||
*
|
||||
* It is also possible to include it through a triple-slash reference:
|
||||
*
|
||||
* ```ts
|
||||
* /// <reference types="react/experimental" />
|
||||
* ```
|
||||
*
|
||||
* Either the import or the reference only needs to appear once, anywhere in the project.
|
||||
*/
|
||||
|
||||
// See https://github.com/facebook/react/blob/master/packages/react/src/React.js to see how the exports are declared,
|
||||
// and https://github.com/facebook/react/blob/master/packages/shared/ReactFeatureFlags.js to verify which APIs are
|
||||
// flagged experimental or not. Experimental APIs will be tagged with `__EXPERIMENTAL__`.
|
||||
//
|
||||
// For the inputs of types exported as simply a fiber tag, the `beginWork` function of ReactFiberBeginWork.js
|
||||
// is a good place to start looking for details; it generally calls prop validation functions or delegates
|
||||
// all tasks done as part of the render phase (the concurrent part of the React update cycle).
|
||||
//
|
||||
// Suspense-related handling can be found in ReactFiberThrow.js.
|
||||
|
||||
import React = require("./canary");
|
||||
|
||||
export {};
|
||||
|
||||
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
||||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
||||
|
||||
declare module "." {
|
||||
export interface SuspenseProps {
|
||||
// @enableCPUSuspense
|
||||
/**
|
||||
* The presence of this prop indicates that the content is computationally expensive to render.
|
||||
* In other words, the tree is CPU bound and not I/O bound (e.g. due to fetching data).
|
||||
* @see {@link https://github.com/facebook/react/pull/19936}
|
||||
*/
|
||||
defer?: boolean | undefined;
|
||||
}
|
||||
|
||||
export type SuspenseListRevealOrder = "forwards" | "backwards" | "together" | "independent";
|
||||
export type SuspenseListTailMode = "collapsed" | "hidden" | "visible";
|
||||
|
||||
export interface SuspenseListCommonProps {
|
||||
}
|
||||
|
||||
interface DirectionalSuspenseListProps extends SuspenseListCommonProps {
|
||||
/**
|
||||
* Note that SuspenseList require more than one child;
|
||||
* it is a runtime warning to provide only a single child.
|
||||
*
|
||||
* It does, however, allow those children to be wrapped inside a single
|
||||
* level of `<React.Fragment>`.
|
||||
*/
|
||||
children: Iterable<ReactElement> | AsyncIterable<ReactElement>;
|
||||
/**
|
||||
* Defines the order in which the `SuspenseList` children should be revealed.
|
||||
* @default "forwards"
|
||||
*/
|
||||
revealOrder?: "forwards" | "backwards" | "unstable_legacy-backwards" | undefined;
|
||||
/**
|
||||
* Dictates how unloaded items in a SuspenseList is shown.
|
||||
*
|
||||
* - `collapsed` shows only the next fallback in the list.
|
||||
* - `hidden` doesn't show any unloaded items.
|
||||
* - `visible` shows all fallbacks in the list.
|
||||
*
|
||||
* @default "hidden"
|
||||
*/
|
||||
tail?: SuspenseListTailMode | undefined;
|
||||
}
|
||||
|
||||
interface NonDirectionalSuspenseListProps extends SuspenseListCommonProps {
|
||||
children: ReactNode;
|
||||
/**
|
||||
* Defines the order in which the `SuspenseList` children should be revealed.
|
||||
*/
|
||||
revealOrder: Exclude<SuspenseListRevealOrder, DirectionalSuspenseListProps["revealOrder"]>;
|
||||
/**
|
||||
* The tail property is invalid when not using the `forwards` or `backwards` reveal orders.
|
||||
*/
|
||||
tail?: never;
|
||||
}
|
||||
|
||||
export type SuspenseListProps = DirectionalSuspenseListProps | NonDirectionalSuspenseListProps;
|
||||
|
||||
/**
|
||||
* `SuspenseList` helps coordinate many components that can suspend by orchestrating the order
|
||||
* in which these components are revealed to the user.
|
||||
*
|
||||
* When multiple components need to fetch data, this data may arrive in an unpredictable order.
|
||||
* However, if you wrap these items in a `SuspenseList`, React will not show an item in the list
|
||||
* until previous items have been displayed (this behavior is adjustable).
|
||||
*
|
||||
* @see https://reactjs.org/docs/concurrent-mode-reference.html#suspenselist
|
||||
* @see https://reactjs.org/docs/concurrent-mode-patterns.html#suspenselist
|
||||
*/
|
||||
export const unstable_SuspenseList: ExoticComponent<SuspenseListProps>;
|
||||
|
||||
type Reference = object;
|
||||
type TaintableUniqueValue = string | bigint | ArrayBufferView;
|
||||
function experimental_taintUniqueValue(
|
||||
message: string | undefined,
|
||||
lifetime: Reference,
|
||||
value: TaintableUniqueValue,
|
||||
): void;
|
||||
function experimental_taintObjectReference(message: string | undefined, object: Reference): void;
|
||||
|
||||
// @enableGestureTransition
|
||||
// Implemented by the specific renderer e.g. `react-dom`.
|
||||
// Keep in mind that augmented interfaces merge their JSDoc so if you put
|
||||
// JSDoc here and in the renderer, the IDE will display both.
|
||||
export interface GestureProvider {}
|
||||
export interface GestureOptions {
|
||||
rangeStart?: number | undefined;
|
||||
rangeEnd?: number | undefined;
|
||||
}
|
||||
/** */
|
||||
export function unstable_startGestureTransition(
|
||||
provider: GestureProvider,
|
||||
scope: () => void,
|
||||
options?: GestureOptions,
|
||||
): () => void;
|
||||
|
||||
// @enableSrcObject
|
||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES {
|
||||
srcObject: Blob;
|
||||
}
|
||||
|
||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES {
|
||||
srcObject: Blob | MediaSource | MediaStream;
|
||||
}
|
||||
}
|
||||
165
node_modules/@types/react/ts5.0/global.d.ts
generated
vendored
Normal file
165
node_modules/@types/react/ts5.0/global.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,165 @@
|
|||
/*
|
||||
React projects that don't include the DOM library need these interfaces to compile.
|
||||
React Native applications use React, but there is no DOM available. The JavaScript runtime
|
||||
is ES6/ES2015 only. These definitions allow such projects to compile with only `--lib ES6`.
|
||||
|
||||
Warning: all of these interfaces are empty. If you want type definitions for various properties
|
||||
(such as HTMLInputElement.prototype.value), you need to add `--lib DOM` (via command line or tsconfig.json).
|
||||
*/
|
||||
|
||||
interface Event {}
|
||||
interface AnimationEvent extends Event {}
|
||||
interface ClipboardEvent extends Event {}
|
||||
interface CompositionEvent extends Event {}
|
||||
interface DragEvent extends Event {}
|
||||
interface FocusEvent extends Event {}
|
||||
interface InputEvent extends Event {}
|
||||
interface KeyboardEvent extends Event {}
|
||||
interface MouseEvent extends Event {}
|
||||
interface TouchEvent extends Event {}
|
||||
interface PointerEvent extends Event {}
|
||||
interface ToggleEvent extends Event {}
|
||||
interface TransitionEvent extends Event {}
|
||||
interface UIEvent extends Event {}
|
||||
interface WheelEvent extends Event {}
|
||||
|
||||
interface EventTarget {}
|
||||
interface Document {}
|
||||
interface DataTransfer {}
|
||||
interface StyleMedia {}
|
||||
|
||||
interface Element {}
|
||||
interface DocumentFragment {}
|
||||
|
||||
interface HTMLElement extends Element {}
|
||||
interface HTMLAnchorElement extends HTMLElement {}
|
||||
interface HTMLAreaElement extends HTMLElement {}
|
||||
interface HTMLAudioElement extends HTMLElement {}
|
||||
interface HTMLBaseElement extends HTMLElement {}
|
||||
interface HTMLBodyElement extends HTMLElement {}
|
||||
interface HTMLBRElement extends HTMLElement {}
|
||||
interface HTMLButtonElement extends HTMLElement {}
|
||||
interface HTMLCanvasElement extends HTMLElement {}
|
||||
interface HTMLDataElement extends HTMLElement {}
|
||||
interface HTMLDataListElement extends HTMLElement {}
|
||||
interface HTMLDetailsElement extends HTMLElement {}
|
||||
interface HTMLDialogElement extends HTMLElement {}
|
||||
interface HTMLDivElement extends HTMLElement {}
|
||||
interface HTMLDListElement extends HTMLElement {}
|
||||
interface HTMLEmbedElement extends HTMLElement {}
|
||||
interface HTMLFieldSetElement extends HTMLElement {}
|
||||
interface HTMLFormElement extends HTMLElement {}
|
||||
interface HTMLHeadingElement extends HTMLElement {}
|
||||
interface HTMLHeadElement extends HTMLElement {}
|
||||
interface HTMLHRElement extends HTMLElement {}
|
||||
interface HTMLHtmlElement extends HTMLElement {}
|
||||
interface HTMLIFrameElement extends HTMLElement {}
|
||||
interface HTMLImageElement extends HTMLElement {}
|
||||
interface HTMLInputElement extends HTMLElement {}
|
||||
interface HTMLModElement extends HTMLElement {}
|
||||
interface HTMLLabelElement extends HTMLElement {}
|
||||
interface HTMLLegendElement extends HTMLElement {}
|
||||
interface HTMLLIElement extends HTMLElement {}
|
||||
interface HTMLLinkElement extends HTMLElement {}
|
||||
interface HTMLMapElement extends HTMLElement {}
|
||||
interface HTMLMetaElement extends HTMLElement {}
|
||||
interface HTMLMeterElement extends HTMLElement {}
|
||||
interface HTMLObjectElement extends HTMLElement {}
|
||||
interface HTMLOListElement extends HTMLElement {}
|
||||
interface HTMLOptGroupElement extends HTMLElement {}
|
||||
interface HTMLOptionElement extends HTMLElement {}
|
||||
interface HTMLOutputElement extends HTMLElement {}
|
||||
interface HTMLParagraphElement extends HTMLElement {}
|
||||
interface HTMLParamElement extends HTMLElement {}
|
||||
interface HTMLPreElement extends HTMLElement {}
|
||||
interface HTMLProgressElement extends HTMLElement {}
|
||||
interface HTMLQuoteElement extends HTMLElement {}
|
||||
interface HTMLSlotElement extends HTMLElement {}
|
||||
interface HTMLScriptElement extends HTMLElement {}
|
||||
interface HTMLSelectElement extends HTMLElement {}
|
||||
interface HTMLSourceElement extends HTMLElement {}
|
||||
interface HTMLSpanElement extends HTMLElement {}
|
||||
interface HTMLStyleElement extends HTMLElement {}
|
||||
interface HTMLTableElement extends HTMLElement {}
|
||||
interface HTMLTableColElement extends HTMLElement {}
|
||||
interface HTMLTableDataCellElement extends HTMLElement {}
|
||||
interface HTMLTableHeaderCellElement extends HTMLElement {}
|
||||
interface HTMLTableRowElement extends HTMLElement {}
|
||||
interface HTMLTableSectionElement extends HTMLElement {}
|
||||
interface HTMLTemplateElement extends HTMLElement {}
|
||||
interface HTMLTextAreaElement extends HTMLElement {}
|
||||
interface HTMLTimeElement extends HTMLElement {}
|
||||
interface HTMLTitleElement extends HTMLElement {}
|
||||
interface HTMLTrackElement extends HTMLElement {}
|
||||
interface HTMLUListElement extends HTMLElement {}
|
||||
interface HTMLVideoElement extends HTMLElement {}
|
||||
interface HTMLWebViewElement extends HTMLElement {}
|
||||
|
||||
interface SVGElement extends Element {}
|
||||
interface SVGSVGElement extends SVGElement {}
|
||||
interface SVGCircleElement extends SVGElement {}
|
||||
interface SVGClipPathElement extends SVGElement {}
|
||||
interface SVGDefsElement extends SVGElement {}
|
||||
interface SVGDescElement extends SVGElement {}
|
||||
interface SVGEllipseElement extends SVGElement {}
|
||||
interface SVGFEBlendElement extends SVGElement {}
|
||||
interface SVGFEColorMatrixElement extends SVGElement {}
|
||||
interface SVGFEComponentTransferElement extends SVGElement {}
|
||||
interface SVGFECompositeElement extends SVGElement {}
|
||||
interface SVGFEConvolveMatrixElement extends SVGElement {}
|
||||
interface SVGFEDiffuseLightingElement extends SVGElement {}
|
||||
interface SVGFEDisplacementMapElement extends SVGElement {}
|
||||
interface SVGFEDistantLightElement extends SVGElement {}
|
||||
interface SVGFEDropShadowElement extends SVGElement {}
|
||||
interface SVGFEFloodElement extends SVGElement {}
|
||||
interface SVGFEFuncAElement extends SVGElement {}
|
||||
interface SVGFEFuncBElement extends SVGElement {}
|
||||
interface SVGFEFuncGElement extends SVGElement {}
|
||||
interface SVGFEFuncRElement extends SVGElement {}
|
||||
interface SVGFEGaussianBlurElement extends SVGElement {}
|
||||
interface SVGFEImageElement extends SVGElement {}
|
||||
interface SVGFEMergeElement extends SVGElement {}
|
||||
interface SVGFEMergeNodeElement extends SVGElement {}
|
||||
interface SVGFEMorphologyElement extends SVGElement {}
|
||||
interface SVGFEOffsetElement extends SVGElement {}
|
||||
interface SVGFEPointLightElement extends SVGElement {}
|
||||
interface SVGFESpecularLightingElement extends SVGElement {}
|
||||
interface SVGFESpotLightElement extends SVGElement {}
|
||||
interface SVGFETileElement extends SVGElement {}
|
||||
interface SVGFETurbulenceElement extends SVGElement {}
|
||||
interface SVGFilterElement extends SVGElement {}
|
||||
interface SVGForeignObjectElement extends SVGElement {}
|
||||
interface SVGGElement extends SVGElement {}
|
||||
interface SVGImageElement extends SVGElement {}
|
||||
interface SVGLineElement extends SVGElement {}
|
||||
interface SVGLinearGradientElement extends SVGElement {}
|
||||
interface SVGMarkerElement extends SVGElement {}
|
||||
interface SVGMaskElement extends SVGElement {}
|
||||
interface SVGMetadataElement extends SVGElement {}
|
||||
interface SVGPathElement extends SVGElement {}
|
||||
interface SVGPatternElement extends SVGElement {}
|
||||
interface SVGPolygonElement extends SVGElement {}
|
||||
interface SVGPolylineElement extends SVGElement {}
|
||||
interface SVGRadialGradientElement extends SVGElement {}
|
||||
interface SVGRectElement extends SVGElement {}
|
||||
interface SVGSetElement extends SVGElement {}
|
||||
interface SVGStopElement extends SVGElement {}
|
||||
interface SVGSwitchElement extends SVGElement {}
|
||||
interface SVGSymbolElement extends SVGElement {}
|
||||
interface SVGTextElement extends SVGElement {}
|
||||
interface SVGTextPathElement extends SVGElement {}
|
||||
interface SVGTSpanElement extends SVGElement {}
|
||||
interface SVGUseElement extends SVGElement {}
|
||||
interface SVGViewElement extends SVGElement {}
|
||||
|
||||
interface FormData {}
|
||||
interface Text {}
|
||||
interface TouchList {}
|
||||
interface WebGLRenderingContext {}
|
||||
interface WebGL2RenderingContext {}
|
||||
|
||||
interface TrustedHTML {}
|
||||
|
||||
interface Blob {}
|
||||
interface MediaStream {}
|
||||
interface MediaSource {}
|
||||
4311
node_modules/@types/react/ts5.0/index.d.ts
generated
vendored
Normal file
4311
node_modules/@types/react/ts5.0/index.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
44
node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts
generated
vendored
Normal file
44
node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
import * as React from "./";
|
||||
export { Fragment } from "./";
|
||||
|
||||
export namespace JSX {
|
||||
interface Element extends React.JSX.Element {}
|
||||
interface ElementClass extends React.JSX.ElementClass {}
|
||||
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
|
||||
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
|
||||
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
|
||||
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
|
||||
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
|
||||
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
|
||||
}
|
||||
|
||||
export interface JSXSource {
|
||||
/**
|
||||
* The source file where the element originates from.
|
||||
*/
|
||||
fileName?: string | undefined;
|
||||
|
||||
/**
|
||||
* The line number where the element was created.
|
||||
*/
|
||||
lineNumber?: number | undefined;
|
||||
|
||||
/**
|
||||
* The column number where the element was created.
|
||||
*/
|
||||
columnNumber?: number | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a React element.
|
||||
*
|
||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
||||
*/
|
||||
export function jsxDEV(
|
||||
type: React.ElementType,
|
||||
props: unknown,
|
||||
key: React.Key | undefined,
|
||||
isStatic: boolean,
|
||||
source?: JSXSource,
|
||||
self?: unknown,
|
||||
): React.ReactElement;
|
||||
35
node_modules/@types/react/ts5.0/jsx-runtime.d.ts
generated
vendored
Normal file
35
node_modules/@types/react/ts5.0/jsx-runtime.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
import * as React from "./";
|
||||
export { Fragment } from "./";
|
||||
|
||||
export namespace JSX {
|
||||
interface Element extends React.JSX.Element {}
|
||||
interface ElementClass extends React.JSX.ElementClass {}
|
||||
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
|
||||
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
|
||||
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
|
||||
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
|
||||
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
|
||||
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a React element.
|
||||
*
|
||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
||||
*/
|
||||
export function jsx(
|
||||
type: React.ElementType,
|
||||
props: unknown,
|
||||
key?: React.Key,
|
||||
): React.ReactElement;
|
||||
|
||||
/**
|
||||
* Create a React element.
|
||||
*
|
||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
||||
*/
|
||||
export function jsxs(
|
||||
type: React.ElementType,
|
||||
props: unknown,
|
||||
key?: React.Key,
|
||||
): React.ReactElement;
|
||||
21
node_modules/@types/unist/LICENSE
generated
vendored
Normal file
21
node_modules/@types/unist/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
15
node_modules/@types/unist/README.md
generated
vendored
Normal file
15
node_modules/@types/unist/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Installation
|
||||
> `npm install --save @types/unist`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for unist (https://github.com/syntax-tree/unist).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unist.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Thu, 15 Aug 2024 02:18:53 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [bizen241](https://github.com/bizen241), [Jun Lu](https://github.com/lujun2), [Hernan Rajchert](https://github.com/hrajchert), [Titus Wormer](https://github.com/wooorm), [Junyoung Choi](https://github.com/rokt33r), [Ben Moon](https://github.com/GuiltyDolphin), [JounQin](https://github.com/JounQin), and [Remco Haszing](https://github.com/remcohaszing).
|
||||
119
node_modules/@types/unist/index.d.ts
generated
vendored
Normal file
119
node_modules/@types/unist/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
// ## Interfaces
|
||||
|
||||
/**
|
||||
* Info associated with nodes by the ecosystem.
|
||||
*
|
||||
* This space is guaranteed to never be specified by unist or specifications
|
||||
* implementing unist.
|
||||
* But you can use it in utilities and plugins to store data.
|
||||
*
|
||||
* This type can be augmented to register custom data.
|
||||
* For example:
|
||||
*
|
||||
* ```ts
|
||||
* declare module 'unist' {
|
||||
* interface Data {
|
||||
* // `someNode.data.myId` is typed as `number | undefined`
|
||||
* myId?: number | undefined
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
export interface Data {}
|
||||
|
||||
/**
|
||||
* One place in a source file.
|
||||
*/
|
||||
export interface Point {
|
||||
/**
|
||||
* Line in a source file (1-indexed integer).
|
||||
*/
|
||||
line: number;
|
||||
|
||||
/**
|
||||
* Column in a source file (1-indexed integer).
|
||||
*/
|
||||
column: number;
|
||||
/**
|
||||
* Character in a source file (0-indexed integer).
|
||||
*/
|
||||
offset?: number | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Position of a node in a source document.
|
||||
*
|
||||
* A position is a range between two points.
|
||||
*/
|
||||
export interface Position {
|
||||
/**
|
||||
* Place of the first character of the parsed source region.
|
||||
*/
|
||||
start: Point;
|
||||
|
||||
/**
|
||||
* Place of the first character after the parsed source region.
|
||||
*/
|
||||
end: Point;
|
||||
}
|
||||
|
||||
// ## Abstract nodes
|
||||
|
||||
/**
|
||||
* Abstract unist node that contains the smallest possible value.
|
||||
*
|
||||
* This interface is supposed to be extended.
|
||||
*
|
||||
* For example, in HTML, a `text` node is a leaf that contains text.
|
||||
*/
|
||||
export interface Literal extends Node {
|
||||
/**
|
||||
* Plain value.
|
||||
*/
|
||||
value: unknown;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract unist node.
|
||||
*
|
||||
* The syntactic unit in unist syntax trees are called nodes.
|
||||
*
|
||||
* This interface is supposed to be extended.
|
||||
* If you can use {@link Literal} or {@link Parent}, you should.
|
||||
* But for example in markdown, a `thematicBreak` (`***`), is neither literal
|
||||
* nor parent, but still a node.
|
||||
*/
|
||||
export interface Node {
|
||||
/**
|
||||
* Node type.
|
||||
*/
|
||||
type: string;
|
||||
|
||||
/**
|
||||
* Info from the ecosystem.
|
||||
*/
|
||||
data?: Data | undefined;
|
||||
|
||||
/**
|
||||
* Position of a node in a source document.
|
||||
*
|
||||
* Nodes that are generated (not in the original source document) must not
|
||||
* have a position.
|
||||
*/
|
||||
position?: Position | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract unist node that contains other nodes (*children*).
|
||||
*
|
||||
* This interface is supposed to be extended.
|
||||
*
|
||||
* For example, in XML, an element is a parent of different things, such as
|
||||
* comments, text, and further elements.
|
||||
*/
|
||||
export interface Parent extends Node {
|
||||
/**
|
||||
* List of children.
|
||||
*/
|
||||
children: Node[];
|
||||
}
|
||||
60
node_modules/@types/unist/package.json
generated
vendored
Normal file
60
node_modules/@types/unist/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
"name": "@types/unist",
|
||||
"version": "3.0.3",
|
||||
"description": "TypeScript definitions for unist",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unist",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "bizen241",
|
||||
"githubUsername": "bizen241",
|
||||
"url": "https://github.com/bizen241"
|
||||
},
|
||||
{
|
||||
"name": "Jun Lu",
|
||||
"githubUsername": "lujun2",
|
||||
"url": "https://github.com/lujun2"
|
||||
},
|
||||
{
|
||||
"name": "Hernan Rajchert",
|
||||
"githubUsername": "hrajchert",
|
||||
"url": "https://github.com/hrajchert"
|
||||
},
|
||||
{
|
||||
"name": "Titus Wormer",
|
||||
"githubUsername": "wooorm",
|
||||
"url": "https://github.com/wooorm"
|
||||
},
|
||||
{
|
||||
"name": "Junyoung Choi",
|
||||
"githubUsername": "rokt33r",
|
||||
"url": "https://github.com/rokt33r"
|
||||
},
|
||||
{
|
||||
"name": "Ben Moon",
|
||||
"githubUsername": "GuiltyDolphin",
|
||||
"url": "https://github.com/GuiltyDolphin"
|
||||
},
|
||||
{
|
||||
"name": "JounQin",
|
||||
"githubUsername": "JounQin",
|
||||
"url": "https://github.com/JounQin"
|
||||
},
|
||||
{
|
||||
"name": "Remco Haszing",
|
||||
"githubUsername": "remcohaszing",
|
||||
"url": "https://github.com/remcohaszing"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/unist"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"typesPublisherContentHash": "7f3d5ce8d56003f3583a5317f98d444bdc99910c7b486c6b10af4f38694e61fe",
|
||||
"typeScriptVersion": "4.8"
|
||||
}
|
||||
31
node_modules/@ungap/structured-clone/.github/workflows/node.js.yml
generated
vendored
Normal file
31
node_modules/@ungap/structured-clone/.github/workflows/node.js.yml
generated
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: build
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- run: npm run build --if-present
|
||||
- run: npm test
|
||||
- run: npm run coverage --if-present
|
||||
- name: Coveralls
|
||||
uses: coverallsapp/github-action@master
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
15
node_modules/@ungap/structured-clone/LICENSE
generated
vendored
Normal file
15
node_modules/@ungap/structured-clone/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
ISC License
|
||||
|
||||
Copyright (c) 2021, Andrea Giammarchi, @WebReflection
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
95
node_modules/@ungap/structured-clone/README.md
generated
vendored
Normal file
95
node_modules/@ungap/structured-clone/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
# structuredClone polyfill
|
||||
|
||||
[](https://www.npmjs.com/package/@ungap/structured-clone) [](https://github.com/ungap/structured-clone/actions) [](https://coveralls.io/github/ungap/structured-clone?branch=main)
|
||||
|
||||
An env agnostic serializer and deserializer with recursion ability and types beyond *JSON* from the *HTML* standard itself.
|
||||
|
||||
* [Supported Types](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm#supported_types)
|
||||
* *not supported yet*: Blob, File, FileList, ImageBitmap, ImageData or others non *JS* types but typed arrays are supported without major issues, but u/int8, u/int16, and u/int32 are the only safely suppored (right now).
|
||||
* *not possible to implement*: the `{transfer: []}` option can be passed but it's completely ignored.
|
||||
* [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/structuredClone)
|
||||
* [Serializer](https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal)
|
||||
* [Deserializer](https://html.spec.whatwg.org/multipage/structured-data.html#structureddeserialize)
|
||||
|
||||
Serialized values can be safely stringified as *JSON* too, and deserialization resurrect all values, even recursive, or more complex than what *JSON* allows.
|
||||
|
||||
|
||||
### Examples
|
||||
|
||||
Check the [100% test coverage](./test/index.js) to know even more.
|
||||
|
||||
```js
|
||||
// as default export
|
||||
import structuredClone from '@ungap/structured-clone';
|
||||
const cloned = structuredClone({any: 'serializable'});
|
||||
|
||||
// as independent serializer/deserializer
|
||||
import {serialize, deserialize} from '@ungap/structured-clone';
|
||||
|
||||
// the result can be stringified as JSON without issues
|
||||
// even if there is recursive data, bigint values,
|
||||
// typed arrays, and so on
|
||||
const serialized = serialize({any: 'serializable'});
|
||||
|
||||
// the result will be a replica of the original object
|
||||
const deserialized = deserialize(serialized);
|
||||
```
|
||||
|
||||
#### Global Polyfill
|
||||
Note: Only monkey patch the global if needed. This polyfill works just fine as an explicit import: `import structuredClone from "@ungap/structured-clone"`
|
||||
```js
|
||||
// Attach the polyfill as a Global function
|
||||
import structuredClone from "@ungap/structured-clone";
|
||||
if (!("structuredClone" in globalThis)) {
|
||||
globalThis.structuredClone = structuredClone;
|
||||
}
|
||||
|
||||
// Or don't monkey patch
|
||||
import structuredClone from "@ungap/structured-clone"
|
||||
// Just use it in the file
|
||||
structuredClone()
|
||||
```
|
||||
|
||||
**Note**: Do not attach this module's default export directly to the global scope, whithout a conditional guard to detect a native implementation. In environments where there is a native global implementation of `structuredClone()` already, assignment to the global object will result in an infinite loop when `globalThis.structuredClone()` is called. See the example above for a safe way to provide the polyfill globally in your project.
|
||||
|
||||
### Extra Features
|
||||
|
||||
There is no middle-ground between the structured clone algorithm and JSON:
|
||||
|
||||
* JSON is more relaxed about incompatible values: it just ignores these
|
||||
* Structured clone is inflexible regarding incompatible values, yet it makes specialized instances impossible to reconstruct, plus it doesn't offer any helper, such as `toJSON()`, to make serialization possible, or better, with specific cases
|
||||
|
||||
This module specialized `serialize` export offers, within the optional extra argument, a **lossy** property to avoid throwing when incompatible types are found down the road (function, symbol, ...), so that it is possible to send with less worrying about thrown errors.
|
||||
|
||||
```js
|
||||
// as default export
|
||||
import structuredClone from '@ungap/structured-clone';
|
||||
const cloned = structuredClone(
|
||||
{
|
||||
method() {
|
||||
// ignored, won't be cloned
|
||||
},
|
||||
special: Symbol('also ignored')
|
||||
},
|
||||
{
|
||||
// avoid throwing
|
||||
lossy: true,
|
||||
// avoid throwing *and* looks for toJSON
|
||||
json: true
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
The behavior is the same found in *JSON* when it comes to *Array*, so that unsupported values will result as `null` placeholders instead.
|
||||
|
||||
#### toJSON
|
||||
|
||||
If `lossy` option is not enough, `json` will actually enforce `lossy` and also check for `toJSON` method when objects are parsed.
|
||||
|
||||
Alternative, the `json` exports combines all features:
|
||||
|
||||
```js
|
||||
import {stringify, parse} from '@ungap/structured-clone/json';
|
||||
|
||||
parse(stringify({any: 'serializable'}));
|
||||
```
|
||||
84
node_modules/@ungap/structured-clone/cjs/deserialize.js
generated
vendored
Normal file
84
node_modules/@ungap/structured-clone/cjs/deserialize.js
generated
vendored
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
'use strict';
|
||||
const {
|
||||
VOID, PRIMITIVE, ARRAY, OBJECT, DATE, REGEXP, MAP, SET, ERROR, BIGINT
|
||||
} = require('./types.js');
|
||||
|
||||
const env = typeof self === 'object' ? self : globalThis;
|
||||
|
||||
const deserializer = ($, _) => {
|
||||
const as = (out, index) => {
|
||||
$.set(index, out);
|
||||
return out;
|
||||
};
|
||||
|
||||
const unpair = index => {
|
||||
if ($.has(index))
|
||||
return $.get(index);
|
||||
|
||||
const [type, value] = _[index];
|
||||
switch (type) {
|
||||
case PRIMITIVE:
|
||||
case VOID:
|
||||
return as(value, index);
|
||||
case ARRAY: {
|
||||
const arr = as([], index);
|
||||
for (const index of value)
|
||||
arr.push(unpair(index));
|
||||
return arr;
|
||||
}
|
||||
case OBJECT: {
|
||||
const object = as({}, index);
|
||||
for (const [key, index] of value)
|
||||
object[unpair(key)] = unpair(index);
|
||||
return object;
|
||||
}
|
||||
case DATE:
|
||||
return as(new Date(value), index);
|
||||
case REGEXP: {
|
||||
const {source, flags} = value;
|
||||
return as(new RegExp(source, flags), index);
|
||||
}
|
||||
case MAP: {
|
||||
const map = as(new Map, index);
|
||||
for (const [key, index] of value)
|
||||
map.set(unpair(key), unpair(index));
|
||||
return map;
|
||||
}
|
||||
case SET: {
|
||||
const set = as(new Set, index);
|
||||
for (const index of value)
|
||||
set.add(unpair(index));
|
||||
return set;
|
||||
}
|
||||
case ERROR: {
|
||||
const {name, message} = value;
|
||||
return as(new env[name](message), index);
|
||||
}
|
||||
case BIGINT:
|
||||
return as(BigInt(value), index);
|
||||
case 'BigInt':
|
||||
return as(Object(BigInt(value)), index);
|
||||
case 'ArrayBuffer':
|
||||
return as(new Uint8Array(value).buffer, value);
|
||||
case 'DataView': {
|
||||
const { buffer } = new Uint8Array(value);
|
||||
return as(new DataView(buffer), value);
|
||||
}
|
||||
}
|
||||
return as(new env[type](value), index);
|
||||
};
|
||||
|
||||
return unpair;
|
||||
};
|
||||
|
||||
/**
|
||||
* @typedef {Array<string,any>} Record a type representation
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns a deserialized value from a serialized array of Records.
|
||||
* @param {Record[]} serialized a previously serialized value.
|
||||
* @returns {any}
|
||||
*/
|
||||
const deserialize = serialized => deserializer(new Map, serialized)(0);
|
||||
exports.deserialize = deserialize;
|
||||
27
node_modules/@ungap/structured-clone/cjs/index.js
generated
vendored
Normal file
27
node_modules/@ungap/structured-clone/cjs/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
'use strict';
|
||||
const {deserialize} = require('./deserialize.js');
|
||||
const {serialize} = require('./serialize.js');
|
||||
|
||||
/**
|
||||
* @typedef {Array<string,any>} Record a type representation
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns an array of serialized Records.
|
||||
* @param {any} any a serializable value.
|
||||
* @param {{transfer?: any[], json?: boolean, lossy?: boolean}?} options an object with
|
||||
* a transfer option (ignored when polyfilled) and/or non standard fields that
|
||||
* fallback to the polyfill if present.
|
||||
* @returns {Record[]}
|
||||
*/
|
||||
Object.defineProperty(exports, '__esModule', {value: true}).default = typeof structuredClone === "function" ?
|
||||
/* c8 ignore start */
|
||||
(any, options) => (
|
||||
options && ('json' in options || 'lossy' in options) ?
|
||||
deserialize(serialize(any, options)) : structuredClone(any)
|
||||
) :
|
||||
(any, options) => deserialize(serialize(any, options));
|
||||
/* c8 ignore stop */
|
||||
|
||||
exports.deserialize = deserialize;
|
||||
exports.serialize = serialize;
|
||||
24
node_modules/@ungap/structured-clone/cjs/json.js
generated
vendored
Normal file
24
node_modules/@ungap/structured-clone/cjs/json.js
generated
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
'use strict';
|
||||
/*! (c) Andrea Giammarchi - ISC */
|
||||
|
||||
const {deserialize} = require('./deserialize.js');
|
||||
const {serialize} = require('./serialize.js');
|
||||
|
||||
const {parse: $parse, stringify: $stringify} = JSON;
|
||||
const options = {json: true, lossy: true};
|
||||
|
||||
/**
|
||||
* Revive a previously stringified structured clone.
|
||||
* @param {string} str previously stringified data as string.
|
||||
* @returns {any} whatever was previously stringified as clone.
|
||||
*/
|
||||
const parse = str => deserialize($parse(str));
|
||||
exports.parse = parse;
|
||||
|
||||
/**
|
||||
* Represent a structured clone value as string.
|
||||
* @param {any} any some clone-able value to stringify.
|
||||
* @returns {string} the value stringified.
|
||||
*/
|
||||
const stringify = any => $stringify(serialize(any, options));
|
||||
exports.stringify = stringify;
|
||||
1
node_modules/@ungap/structured-clone/cjs/package.json
generated
vendored
Normal file
1
node_modules/@ungap/structured-clone/cjs/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"type":"commonjs"}
|
||||
170
node_modules/@ungap/structured-clone/cjs/serialize.js
generated
vendored
Normal file
170
node_modules/@ungap/structured-clone/cjs/serialize.js
generated
vendored
Normal file
|
|
@ -0,0 +1,170 @@
|
|||
'use strict';
|
||||
const {
|
||||
VOID, PRIMITIVE, ARRAY, OBJECT, DATE, REGEXP, MAP, SET, ERROR, BIGINT
|
||||
} = require('./types.js');
|
||||
|
||||
const EMPTY = '';
|
||||
|
||||
const {toString} = {};
|
||||
const {keys} = Object;
|
||||
|
||||
const typeOf = value => {
|
||||
const type = typeof value;
|
||||
if (type !== 'object' || !value)
|
||||
return [PRIMITIVE, type];
|
||||
|
||||
const asString = toString.call(value).slice(8, -1);
|
||||
switch (asString) {
|
||||
case 'Array':
|
||||
return [ARRAY, EMPTY];
|
||||
case 'Object':
|
||||
return [OBJECT, EMPTY];
|
||||
case 'Date':
|
||||
return [DATE, EMPTY];
|
||||
case 'RegExp':
|
||||
return [REGEXP, EMPTY];
|
||||
case 'Map':
|
||||
return [MAP, EMPTY];
|
||||
case 'Set':
|
||||
return [SET, EMPTY];
|
||||
case 'DataView':
|
||||
return [ARRAY, asString];
|
||||
}
|
||||
|
||||
if (asString.includes('Array'))
|
||||
return [ARRAY, asString];
|
||||
|
||||
if (asString.includes('Error'))
|
||||
return [ERROR, asString];
|
||||
|
||||
return [OBJECT, asString];
|
||||
};
|
||||
|
||||
const shouldSkip = ([TYPE, type]) => (
|
||||
TYPE === PRIMITIVE &&
|
||||
(type === 'function' || type === 'symbol')
|
||||
);
|
||||
|
||||
const serializer = (strict, json, $, _) => {
|
||||
|
||||
const as = (out, value) => {
|
||||
const index = _.push(out) - 1;
|
||||
$.set(value, index);
|
||||
return index;
|
||||
};
|
||||
|
||||
const pair = value => {
|
||||
if ($.has(value))
|
||||
return $.get(value);
|
||||
|
||||
let [TYPE, type] = typeOf(value);
|
||||
switch (TYPE) {
|
||||
case PRIMITIVE: {
|
||||
let entry = value;
|
||||
switch (type) {
|
||||
case 'bigint':
|
||||
TYPE = BIGINT;
|
||||
entry = value.toString();
|
||||
break;
|
||||
case 'function':
|
||||
case 'symbol':
|
||||
if (strict)
|
||||
throw new TypeError('unable to serialize ' + type);
|
||||
entry = null;
|
||||
break;
|
||||
case 'undefined':
|
||||
return as([VOID], value);
|
||||
}
|
||||
return as([TYPE, entry], value);
|
||||
}
|
||||
case ARRAY: {
|
||||
if (type) {
|
||||
let spread = value;
|
||||
if (type === 'DataView') {
|
||||
spread = new Uint8Array(value.buffer);
|
||||
}
|
||||
else if (type === 'ArrayBuffer') {
|
||||
spread = new Uint8Array(value);
|
||||
}
|
||||
return as([type, [...spread]], value);
|
||||
}
|
||||
|
||||
const arr = [];
|
||||
const index = as([TYPE, arr], value);
|
||||
for (const entry of value)
|
||||
arr.push(pair(entry));
|
||||
return index;
|
||||
}
|
||||
case OBJECT: {
|
||||
if (type) {
|
||||
switch (type) {
|
||||
case 'BigInt':
|
||||
return as([type, value.toString()], value);
|
||||
case 'Boolean':
|
||||
case 'Number':
|
||||
case 'String':
|
||||
return as([type, value.valueOf()], value);
|
||||
}
|
||||
}
|
||||
|
||||
if (json && ('toJSON' in value))
|
||||
return pair(value.toJSON());
|
||||
|
||||
const entries = [];
|
||||
const index = as([TYPE, entries], value);
|
||||
for (const key of keys(value)) {
|
||||
if (strict || !shouldSkip(typeOf(value[key])))
|
||||
entries.push([pair(key), pair(value[key])]);
|
||||
}
|
||||
return index;
|
||||
}
|
||||
case DATE:
|
||||
return as([TYPE, value.toISOString()], value);
|
||||
case REGEXP: {
|
||||
const {source, flags} = value;
|
||||
return as([TYPE, {source, flags}], value);
|
||||
}
|
||||
case MAP: {
|
||||
const entries = [];
|
||||
const index = as([TYPE, entries], value);
|
||||
for (const [key, entry] of value) {
|
||||
if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
|
||||
entries.push([pair(key), pair(entry)]);
|
||||
}
|
||||
return index;
|
||||
}
|
||||
case SET: {
|
||||
const entries = [];
|
||||
const index = as([TYPE, entries], value);
|
||||
for (const entry of value) {
|
||||
if (strict || !shouldSkip(typeOf(entry)))
|
||||
entries.push(pair(entry));
|
||||
}
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
||||
const {message} = value;
|
||||
return as([TYPE, {name: type, message}], value);
|
||||
};
|
||||
|
||||
return pair;
|
||||
};
|
||||
|
||||
/**
|
||||
* @typedef {Array<string,any>} Record a type representation
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns an array of serialized Records.
|
||||
* @param {any} value a serializable value.
|
||||
* @param {{json?: boolean, lossy?: boolean}?} options an object with a `lossy` or `json` property that,
|
||||
* if `true`, will not throw errors on incompatible types, and behave more
|
||||
* like JSON stringify would behave. Symbol and Function will be discarded.
|
||||
* @returns {Record[]}
|
||||
*/
|
||||
const serialize = (value, {json, lossy} = {}) => {
|
||||
const _ = [];
|
||||
return serializer(!(json || lossy), !!json, new Map, _)(value), _;
|
||||
};
|
||||
exports.serialize = serialize;
|
||||
22
node_modules/@ungap/structured-clone/cjs/types.js
generated
vendored
Normal file
22
node_modules/@ungap/structured-clone/cjs/types.js
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
'use strict';
|
||||
const VOID = -1;
|
||||
exports.VOID = VOID;
|
||||
const PRIMITIVE = 0;
|
||||
exports.PRIMITIVE = PRIMITIVE;
|
||||
const ARRAY = 1;
|
||||
exports.ARRAY = ARRAY;
|
||||
const OBJECT = 2;
|
||||
exports.OBJECT = OBJECT;
|
||||
const DATE = 3;
|
||||
exports.DATE = DATE;
|
||||
const REGEXP = 4;
|
||||
exports.REGEXP = REGEXP;
|
||||
const MAP = 5;
|
||||
exports.MAP = MAP;
|
||||
const SET = 6;
|
||||
exports.SET = SET;
|
||||
const ERROR = 7;
|
||||
exports.ERROR = ERROR;
|
||||
const BIGINT = 8;
|
||||
exports.BIGINT = BIGINT;
|
||||
// export const SYMBOL = 9;
|
||||
85
node_modules/@ungap/structured-clone/esm/deserialize.js
generated
vendored
Normal file
85
node_modules/@ungap/structured-clone/esm/deserialize.js
generated
vendored
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
import {
|
||||
VOID, PRIMITIVE,
|
||||
ARRAY, OBJECT,
|
||||
DATE, REGEXP, MAP, SET,
|
||||
ERROR, BIGINT
|
||||
} from './types.js';
|
||||
|
||||
const env = typeof self === 'object' ? self : globalThis;
|
||||
|
||||
const deserializer = ($, _) => {
|
||||
const as = (out, index) => {
|
||||
$.set(index, out);
|
||||
return out;
|
||||
};
|
||||
|
||||
const unpair = index => {
|
||||
if ($.has(index))
|
||||
return $.get(index);
|
||||
|
||||
const [type, value] = _[index];
|
||||
switch (type) {
|
||||
case PRIMITIVE:
|
||||
case VOID:
|
||||
return as(value, index);
|
||||
case ARRAY: {
|
||||
const arr = as([], index);
|
||||
for (const index of value)
|
||||
arr.push(unpair(index));
|
||||
return arr;
|
||||
}
|
||||
case OBJECT: {
|
||||
const object = as({}, index);
|
||||
for (const [key, index] of value)
|
||||
object[unpair(key)] = unpair(index);
|
||||
return object;
|
||||
}
|
||||
case DATE:
|
||||
return as(new Date(value), index);
|
||||
case REGEXP: {
|
||||
const {source, flags} = value;
|
||||
return as(new RegExp(source, flags), index);
|
||||
}
|
||||
case MAP: {
|
||||
const map = as(new Map, index);
|
||||
for (const [key, index] of value)
|
||||
map.set(unpair(key), unpair(index));
|
||||
return map;
|
||||
}
|
||||
case SET: {
|
||||
const set = as(new Set, index);
|
||||
for (const index of value)
|
||||
set.add(unpair(index));
|
||||
return set;
|
||||
}
|
||||
case ERROR: {
|
||||
const {name, message} = value;
|
||||
return as(new env[name](message), index);
|
||||
}
|
||||
case BIGINT:
|
||||
return as(BigInt(value), index);
|
||||
case 'BigInt':
|
||||
return as(Object(BigInt(value)), index);
|
||||
case 'ArrayBuffer':
|
||||
return as(new Uint8Array(value).buffer, value);
|
||||
case 'DataView': {
|
||||
const { buffer } = new Uint8Array(value);
|
||||
return as(new DataView(buffer), value);
|
||||
}
|
||||
}
|
||||
return as(new env[type](value), index);
|
||||
};
|
||||
|
||||
return unpair;
|
||||
};
|
||||
|
||||
/**
|
||||
* @typedef {Array<string,any>} Record a type representation
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns a deserialized value from a serialized array of Records.
|
||||
* @param {Record[]} serialized a previously serialized value.
|
||||
* @returns {any}
|
||||
*/
|
||||
export const deserialize = serialized => deserializer(new Map, serialized)(0);
|
||||
25
node_modules/@ungap/structured-clone/esm/index.js
generated
vendored
Normal file
25
node_modules/@ungap/structured-clone/esm/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import {deserialize} from './deserialize.js';
|
||||
import {serialize} from './serialize.js';
|
||||
|
||||
/**
|
||||
* @typedef {Array<string,any>} Record a type representation
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns an array of serialized Records.
|
||||
* @param {any} any a serializable value.
|
||||
* @param {{transfer?: any[], json?: boolean, lossy?: boolean}?} options an object with
|
||||
* a transfer option (ignored when polyfilled) and/or non standard fields that
|
||||
* fallback to the polyfill if present.
|
||||
* @returns {Record[]}
|
||||
*/
|
||||
export default typeof structuredClone === "function" ?
|
||||
/* c8 ignore start */
|
||||
(any, options) => (
|
||||
options && ('json' in options || 'lossy' in options) ?
|
||||
deserialize(serialize(any, options)) : structuredClone(any)
|
||||
) :
|
||||
(any, options) => deserialize(serialize(any, options));
|
||||
/* c8 ignore stop */
|
||||
|
||||
export {deserialize, serialize};
|
||||
21
node_modules/@ungap/structured-clone/esm/json.js
generated
vendored
Normal file
21
node_modules/@ungap/structured-clone/esm/json.js
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/*! (c) Andrea Giammarchi - ISC */
|
||||
|
||||
import {deserialize} from './deserialize.js';
|
||||
import {serialize} from './serialize.js';
|
||||
|
||||
const {parse: $parse, stringify: $stringify} = JSON;
|
||||
const options = {json: true, lossy: true};
|
||||
|
||||
/**
|
||||
* Revive a previously stringified structured clone.
|
||||
* @param {string} str previously stringified data as string.
|
||||
* @returns {any} whatever was previously stringified as clone.
|
||||
*/
|
||||
export const parse = str => deserialize($parse(str));
|
||||
|
||||
/**
|
||||
* Represent a structured clone value as string.
|
||||
* @param {any} any some clone-able value to stringify.
|
||||
* @returns {string} the value stringified.
|
||||
*/
|
||||
export const stringify = any => $stringify(serialize(any, options));
|
||||
171
node_modules/@ungap/structured-clone/esm/serialize.js
generated
vendored
Normal file
171
node_modules/@ungap/structured-clone/esm/serialize.js
generated
vendored
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
import {
|
||||
VOID, PRIMITIVE,
|
||||
ARRAY, OBJECT,
|
||||
DATE, REGEXP, MAP, SET,
|
||||
ERROR, BIGINT
|
||||
} from './types.js';
|
||||
|
||||
const EMPTY = '';
|
||||
|
||||
const {toString} = {};
|
||||
const {keys} = Object;
|
||||
|
||||
const typeOf = value => {
|
||||
const type = typeof value;
|
||||
if (type !== 'object' || !value)
|
||||
return [PRIMITIVE, type];
|
||||
|
||||
const asString = toString.call(value).slice(8, -1);
|
||||
switch (asString) {
|
||||
case 'Array':
|
||||
return [ARRAY, EMPTY];
|
||||
case 'Object':
|
||||
return [OBJECT, EMPTY];
|
||||
case 'Date':
|
||||
return [DATE, EMPTY];
|
||||
case 'RegExp':
|
||||
return [REGEXP, EMPTY];
|
||||
case 'Map':
|
||||
return [MAP, EMPTY];
|
||||
case 'Set':
|
||||
return [SET, EMPTY];
|
||||
case 'DataView':
|
||||
return [ARRAY, asString];
|
||||
}
|
||||
|
||||
if (asString.includes('Array'))
|
||||
return [ARRAY, asString];
|
||||
|
||||
if (asString.includes('Error'))
|
||||
return [ERROR, asString];
|
||||
|
||||
return [OBJECT, asString];
|
||||
};
|
||||
|
||||
const shouldSkip = ([TYPE, type]) => (
|
||||
TYPE === PRIMITIVE &&
|
||||
(type === 'function' || type === 'symbol')
|
||||
);
|
||||
|
||||
const serializer = (strict, json, $, _) => {
|
||||
|
||||
const as = (out, value) => {
|
||||
const index = _.push(out) - 1;
|
||||
$.set(value, index);
|
||||
return index;
|
||||
};
|
||||
|
||||
const pair = value => {
|
||||
if ($.has(value))
|
||||
return $.get(value);
|
||||
|
||||
let [TYPE, type] = typeOf(value);
|
||||
switch (TYPE) {
|
||||
case PRIMITIVE: {
|
||||
let entry = value;
|
||||
switch (type) {
|
||||
case 'bigint':
|
||||
TYPE = BIGINT;
|
||||
entry = value.toString();
|
||||
break;
|
||||
case 'function':
|
||||
case 'symbol':
|
||||
if (strict)
|
||||
throw new TypeError('unable to serialize ' + type);
|
||||
entry = null;
|
||||
break;
|
||||
case 'undefined':
|
||||
return as([VOID], value);
|
||||
}
|
||||
return as([TYPE, entry], value);
|
||||
}
|
||||
case ARRAY: {
|
||||
if (type) {
|
||||
let spread = value;
|
||||
if (type === 'DataView') {
|
||||
spread = new Uint8Array(value.buffer);
|
||||
}
|
||||
else if (type === 'ArrayBuffer') {
|
||||
spread = new Uint8Array(value);
|
||||
}
|
||||
return as([type, [...spread]], value);
|
||||
}
|
||||
|
||||
const arr = [];
|
||||
const index = as([TYPE, arr], value);
|
||||
for (const entry of value)
|
||||
arr.push(pair(entry));
|
||||
return index;
|
||||
}
|
||||
case OBJECT: {
|
||||
if (type) {
|
||||
switch (type) {
|
||||
case 'BigInt':
|
||||
return as([type, value.toString()], value);
|
||||
case 'Boolean':
|
||||
case 'Number':
|
||||
case 'String':
|
||||
return as([type, value.valueOf()], value);
|
||||
}
|
||||
}
|
||||
|
||||
if (json && ('toJSON' in value))
|
||||
return pair(value.toJSON());
|
||||
|
||||
const entries = [];
|
||||
const index = as([TYPE, entries], value);
|
||||
for (const key of keys(value)) {
|
||||
if (strict || !shouldSkip(typeOf(value[key])))
|
||||
entries.push([pair(key), pair(value[key])]);
|
||||
}
|
||||
return index;
|
||||
}
|
||||
case DATE:
|
||||
return as([TYPE, value.toISOString()], value);
|
||||
case REGEXP: {
|
||||
const {source, flags} = value;
|
||||
return as([TYPE, {source, flags}], value);
|
||||
}
|
||||
case MAP: {
|
||||
const entries = [];
|
||||
const index = as([TYPE, entries], value);
|
||||
for (const [key, entry] of value) {
|
||||
if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
|
||||
entries.push([pair(key), pair(entry)]);
|
||||
}
|
||||
return index;
|
||||
}
|
||||
case SET: {
|
||||
const entries = [];
|
||||
const index = as([TYPE, entries], value);
|
||||
for (const entry of value) {
|
||||
if (strict || !shouldSkip(typeOf(entry)))
|
||||
entries.push(pair(entry));
|
||||
}
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
||||
const {message} = value;
|
||||
return as([TYPE, {name: type, message}], value);
|
||||
};
|
||||
|
||||
return pair;
|
||||
};
|
||||
|
||||
/**
|
||||
* @typedef {Array<string,any>} Record a type representation
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns an array of serialized Records.
|
||||
* @param {any} value a serializable value.
|
||||
* @param {{json?: boolean, lossy?: boolean}?} options an object with a `lossy` or `json` property that,
|
||||
* if `true`, will not throw errors on incompatible types, and behave more
|
||||
* like JSON stringify would behave. Symbol and Function will be discarded.
|
||||
* @returns {Record[]}
|
||||
*/
|
||||
export const serialize = (value, {json, lossy} = {}) => {
|
||||
const _ = [];
|
||||
return serializer(!(json || lossy), !!json, new Map, _)(value), _;
|
||||
};
|
||||
11
node_modules/@ungap/structured-clone/esm/types.js
generated
vendored
Normal file
11
node_modules/@ungap/structured-clone/esm/types.js
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
export const VOID = -1;
|
||||
export const PRIMITIVE = 0;
|
||||
export const ARRAY = 1;
|
||||
export const OBJECT = 2;
|
||||
export const DATE = 3;
|
||||
export const REGEXP = 4;
|
||||
export const MAP = 5;
|
||||
export const SET = 6;
|
||||
export const ERROR = 7;
|
||||
export const BIGINT = 8;
|
||||
// export const SYMBOL = 9;
|
||||
54
node_modules/@ungap/structured-clone/package.json
generated
vendored
Normal file
54
node_modules/@ungap/structured-clone/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
"name": "@ungap/structured-clone",
|
||||
"version": "1.3.0",
|
||||
"description": "A structuredClone polyfill",
|
||||
"main": "./cjs/index.js",
|
||||
"scripts": {
|
||||
"build": "npm run cjs && npm run rollup:json && npm run test",
|
||||
"cjs": "ascjs esm cjs",
|
||||
"coverage": "c8 report --reporter=text-lcov > ./coverage/lcov.info",
|
||||
"rollup:json": "rollup --config rollup/json.config.js",
|
||||
"test": "c8 node test/index.js"
|
||||
},
|
||||
"keywords": [
|
||||
"recursion",
|
||||
"structured",
|
||||
"clone",
|
||||
"algorithm"
|
||||
],
|
||||
"author": "Andrea Giammarchi",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-node-resolve": "^16.0.0",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"ascjs": "^6.0.3",
|
||||
"c8": "^10.1.3",
|
||||
"coveralls": "^3.1.1",
|
||||
"rollup": "^4.31.0"
|
||||
},
|
||||
"module": "./esm/index.js",
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./esm/index.js",
|
||||
"default": "./cjs/index.js"
|
||||
},
|
||||
"./json": {
|
||||
"import": "./esm/json.js",
|
||||
"default": "./cjs/json.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ungap/structured-clone.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/ungap/structured-clone/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ungap/structured-clone#readme"
|
||||
}
|
||||
1
node_modules/@ungap/structured-clone/structured-json.js
generated
vendored
Normal file
1
node_modules/@ungap/structured-clone/structured-json.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
var StructuredJSON=function(e){"use strict";const r="object"==typeof self?self:globalThis,t=e=>((e,t)=>{const n=(r,t)=>(e.set(t,r),r),s=c=>{if(e.has(c))return e.get(c);const[a,o]=t[c];switch(a){case 0:case-1:return n(o,c);case 1:{const e=n([],c);for(const r of o)e.push(s(r));return e}case 2:{const e=n({},c);for(const[r,t]of o)e[s(r)]=s(t);return e}case 3:return n(new Date(o),c);case 4:{const{source:e,flags:r}=o;return n(new RegExp(e,r),c)}case 5:{const e=n(new Map,c);for(const[r,t]of o)e.set(s(r),s(t));return e}case 6:{const e=n(new Set,c);for(const r of o)e.add(s(r));return e}case 7:{const{name:e,message:t}=o;return n(new r[e](t),c)}case 8:return n(BigInt(o),c);case"BigInt":return n(Object(BigInt(o)),c);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new r[a](o),c)};return s})(new Map,e)(0),n="",{toString:s}={},{keys:c}=Object,a=e=>{const r=typeof e;if("object"!==r||!e)return[0,r];const t=s.call(e).slice(8,-1);switch(t){case"Array":return[1,n];case"Object":return[2,n];case"Date":return[3,n];case"RegExp":return[4,n];case"Map":return[5,n];case"Set":return[6,n];case"DataView":return[1,t]}return t.includes("Array")?[1,t]:t.includes("Error")?[7,t]:[2,t]},o=([e,r])=>0===e&&("function"===r||"symbol"===r),u=(e,{json:r,lossy:t}={})=>{const n=[];return((e,r,t,n)=>{const s=(e,r)=>{const s=n.push(e)-1;return t.set(r,s),s},u=n=>{if(t.has(n))return t.get(n);let[f,i]=a(n);switch(f){case 0:{let r=n;switch(i){case"bigint":f=8,r=n.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+i);r=null;break;case"undefined":return s([-1],n)}return s([f,r],n)}case 1:{if(i){let e=n;return"DataView"===i?e=new Uint8Array(n.buffer):"ArrayBuffer"===i&&(e=new Uint8Array(n)),s([i,[...e]],n)}const e=[],r=s([f,e],n);for(const r of n)e.push(u(r));return r}case 2:{if(i)switch(i){case"BigInt":return s([i,n.toString()],n);case"Boolean":case"Number":case"String":return s([i,n.valueOf()],n)}if(r&&"toJSON"in n)return u(n.toJSON());const t=[],l=s([f,t],n);for(const r of c(n))!e&&o(a(n[r]))||t.push([u(r),u(n[r])]);return l}case 3:return s([f,n.toISOString()],n);case 4:{const{source:e,flags:r}=n;return s([f,{source:e,flags:r}],n)}case 5:{const r=[],t=s([f,r],n);for(const[t,s]of n)(e||!o(a(t))&&!o(a(s)))&&r.push([u(t),u(s)]);return t}case 6:{const r=[],t=s([f,r],n);for(const t of n)!e&&o(a(t))||r.push(u(t));return t}}const{message:l}=n;return s([f,{name:i,message:l}],n)};return u})(!(r||t),!!r,new Map,n)(e),n},{parse:f,stringify:i}=JSON,l={json:!0,lossy:!0};return e.parse=e=>t(f(e)),e.stringify=e=>i(u(e,l)),e}({});
|
||||
10
node_modules/bail/index.d.ts
generated
vendored
Normal file
10
node_modules/bail/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* Throw a given error.
|
||||
*
|
||||
* @param {Error|null|undefined} [error]
|
||||
* Maybe error.
|
||||
* @returns {asserts error is null|undefined}
|
||||
*/
|
||||
export function bail(
|
||||
error?: Error | null | undefined
|
||||
): asserts error is null | undefined
|
||||
12
node_modules/bail/index.js
generated
vendored
Normal file
12
node_modules/bail/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
* Throw a given error.
|
||||
*
|
||||
* @param {Error|null|undefined} [error]
|
||||
* Maybe error.
|
||||
* @returns {asserts error is null|undefined}
|
||||
*/
|
||||
export function bail(error) {
|
||||
if (error) {
|
||||
throw error
|
||||
}
|
||||
}
|
||||
22
node_modules/bail/license
generated
vendored
Normal file
22
node_modules/bail/license
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
(The MIT License)
|
||||
|
||||
Copyright (c) 2015 Titus Wormer <tituswormer@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
73
node_modules/bail/package.json
generated
vendored
Normal file
73
node_modules/bail/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
{
|
||||
"name": "bail",
|
||||
"version": "2.0.2",
|
||||
"description": "Throw a given error",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"fail",
|
||||
"bail",
|
||||
"throw",
|
||||
"callback",
|
||||
"error"
|
||||
],
|
||||
"repository": "wooorm/bail",
|
||||
"bugs": "https://github.com/wooorm/bail/issues",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
},
|
||||
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
|
||||
"contributors": [
|
||||
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"index.js"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@types/tape": "^4.0.0",
|
||||
"c8": "^7.0.0",
|
||||
"prettier": "^2.0.0",
|
||||
"remark-cli": "^10.0.0",
|
||||
"remark-preset-wooorm": "^9.0.0",
|
||||
"rimraf": "^3.0.0",
|
||||
"tape": "^5.0.0",
|
||||
"tsd": "^0.18.0",
|
||||
"type-coverage": "^2.0.0",
|
||||
"typescript": "^4.0.0",
|
||||
"xo": "^0.46.0"
|
||||
},
|
||||
"scripts": {
|
||||
"prepublishOnly": "npm run build && npm run format",
|
||||
"build": "rimraf \"*.d.ts\" && tsc && tsd && type-coverage",
|
||||
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
|
||||
"test-api": "node --conditions development test.js",
|
||||
"test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api",
|
||||
"test": "npm run build && npm run format && npm run test-coverage"
|
||||
},
|
||||
"prettier": {
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"singleQuote": true,
|
||||
"bracketSpacing": false,
|
||||
"semi": false,
|
||||
"trailingComma": "none"
|
||||
},
|
||||
"xo": {
|
||||
"prettier": true
|
||||
},
|
||||
"remarkConfig": {
|
||||
"plugins": [
|
||||
"preset-wooorm"
|
||||
]
|
||||
},
|
||||
"typeCoverage": {
|
||||
"atLeast": 100,
|
||||
"detail": true,
|
||||
"strict": true
|
||||
}
|
||||
}
|
||||
147
node_modules/bail/readme.md
generated
vendored
Normal file
147
node_modules/bail/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
# bail
|
||||
|
||||
[![Build][build-badge]][build]
|
||||
[![Coverage][coverage-badge]][coverage]
|
||||
[![Downloads][downloads-badge]][downloads]
|
||||
[![Size][size-badge]][size]
|
||||
|
||||
Throw if given an error.
|
||||
|
||||
## Contents
|
||||
|
||||
* [What is this?](#what-is-this)
|
||||
* [When should I use this?](#when-should-i-use-this)
|
||||
* [Install](#install)
|
||||
* [Use](#use)
|
||||
* [API](#api)
|
||||
* [`bail(err?)`](#bailerr)
|
||||
* [Types](#types)
|
||||
* [Compatibility](#compatibility)
|
||||
* [Security](#security)
|
||||
* [Related](#related)
|
||||
* [Contribute](#contribute)
|
||||
* [License](#license)
|
||||
|
||||
## What is this?
|
||||
|
||||
This package throws a given error.
|
||||
|
||||
## When should I use this?
|
||||
|
||||
Use this package if you’re building some scripts that might theoretically get
|
||||
errors but frequently don’t and you keep writing `if (error) throw error` over
|
||||
and over again and you’re just really done with that.
|
||||
|
||||
## Install
|
||||
|
||||
This package is [ESM only][esm].
|
||||
In Node.js (version 12.20+, 14.14+, or 16.0+), install with [npm][]:
|
||||
|
||||
```sh
|
||||
npm install bail
|
||||
```
|
||||
|
||||
In Deno with [Skypack][]:
|
||||
|
||||
```js
|
||||
import {bail} from 'https://cdn.skypack.dev/bail@2?dts'
|
||||
```
|
||||
|
||||
In browsers with [Skypack][]:
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import {bail} from 'https://cdn.skypack.dev/bail@2?min'
|
||||
</script>
|
||||
```
|
||||
|
||||
## Use
|
||||
|
||||
```js
|
||||
import {bail} from 'bail'
|
||||
|
||||
bail()
|
||||
|
||||
bail(new Error('failure'))
|
||||
// Error: failure
|
||||
// at repl:1:6
|
||||
// at REPLServer.defaultEval (repl.js:154:27)
|
||||
// …
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
This package exports the following identifier: `bail`.
|
||||
There is no default export.
|
||||
|
||||
### `bail(err?)`
|
||||
|
||||
Throw a given error (`Error?`).
|
||||
|
||||
## Types
|
||||
|
||||
This package is fully typed with [TypeScript][].
|
||||
There are no extra exported types.
|
||||
|
||||
## Compatibility
|
||||
|
||||
This package is at least compatible with all maintained versions of Node.js.
|
||||
As of now, that is Node.js 12.20+, 14.14+, and 16.0+.
|
||||
It also works in Deno and modern browsers.
|
||||
|
||||
## Security
|
||||
|
||||
This package is safe.
|
||||
|
||||
## Related
|
||||
|
||||
* [`noop`][noop]
|
||||
* [`noop2`][noop2]
|
||||
* [`noop3`][noop3]
|
||||
|
||||
## Contribute
|
||||
|
||||
Yes please!
|
||||
See [How to Contribute to Open Source][contribute].
|
||||
|
||||
## License
|
||||
|
||||
[MIT][license] © [Titus Wormer][author]
|
||||
|
||||
<!-- Definitions -->
|
||||
|
||||
[build-badge]: https://github.com/wooorm/bail/workflows/main/badge.svg
|
||||
|
||||
[build]: https://github.com/wooorm/bail/actions
|
||||
|
||||
[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/bail.svg
|
||||
|
||||
[coverage]: https://codecov.io/github/wooorm/bail
|
||||
|
||||
[downloads-badge]: https://img.shields.io/npm/dm/bail.svg
|
||||
|
||||
[downloads]: https://www.npmjs.com/package/bail
|
||||
|
||||
[size-badge]: https://img.shields.io/bundlephobia/minzip/bail.svg
|
||||
|
||||
[size]: https://bundlephobia.com/result?p=bail
|
||||
|
||||
[npm]: https://docs.npmjs.com/cli/install
|
||||
|
||||
[skypack]: https://www.skypack.dev
|
||||
|
||||
[license]: license
|
||||
|
||||
[author]: https://wooorm.com
|
||||
|
||||
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
|
||||
|
||||
[typescript]: https://www.typescriptlang.org
|
||||
|
||||
[contribute]: https://opensource.guide/how-to-contribute/
|
||||
|
||||
[noop]: https://www.npmjs.com/package/noop
|
||||
|
||||
[noop2]: https://www.npmjs.com/package/noop2
|
||||
|
||||
[noop3]: https://www.npmjs.com/package/noop3
|
||||
11
node_modules/ccount/index.d.ts
generated
vendored
Normal file
11
node_modules/ccount/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Count how often a character (or substring) is used in a string.
|
||||
*
|
||||
* @param {string} value
|
||||
* Value to search in.
|
||||
* @param {string} character
|
||||
* Character (or substring) to look for.
|
||||
* @return {number}
|
||||
* Number of times `character` occurred in `value`.
|
||||
*/
|
||||
export function ccount(value: string, character: string): number
|
||||
27
node_modules/ccount/index.js
generated
vendored
Normal file
27
node_modules/ccount/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/**
|
||||
* Count how often a character (or substring) is used in a string.
|
||||
*
|
||||
* @param {string} value
|
||||
* Value to search in.
|
||||
* @param {string} character
|
||||
* Character (or substring) to look for.
|
||||
* @return {number}
|
||||
* Number of times `character` occurred in `value`.
|
||||
*/
|
||||
export function ccount(value, character) {
|
||||
const source = String(value)
|
||||
|
||||
if (typeof character !== 'string') {
|
||||
throw new TypeError('Expected character')
|
||||
}
|
||||
|
||||
let count = 0
|
||||
let index = source.indexOf(character)
|
||||
|
||||
while (index !== -1) {
|
||||
count++
|
||||
index = source.indexOf(character, index + character.length)
|
||||
}
|
||||
|
||||
return count
|
||||
}
|
||||
22
node_modules/ccount/license
generated
vendored
Normal file
22
node_modules/ccount/license
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
(The MIT License)
|
||||
|
||||
Copyright (c) 2015 Titus Wormer <tituswormer@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
71
node_modules/ccount/package.json
generated
vendored
Normal file
71
node_modules/ccount/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
"name": "ccount",
|
||||
"version": "2.0.1",
|
||||
"description": "Count how often a character (or substring) is used in a string",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"character",
|
||||
"count",
|
||||
"char"
|
||||
],
|
||||
"repository": "wooorm/ccount",
|
||||
"bugs": "https://github.com/wooorm/ccount/issues",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
},
|
||||
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
|
||||
"contributors": [
|
||||
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"index.js"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@types/tape": "^4.0.0",
|
||||
"c8": "^7.0.0",
|
||||
"prettier": "^2.0.0",
|
||||
"remark-cli": "^10.0.0",
|
||||
"remark-preset-wooorm": "^9.0.0",
|
||||
"rimraf": "^3.0.0",
|
||||
"tape": "^5.0.0",
|
||||
"type-coverage": "^2.0.0",
|
||||
"typescript": "^4.0.0",
|
||||
"xo": "^0.46.0"
|
||||
},
|
||||
"scripts": {
|
||||
"prepublishOnly": "npm run build && npm run format",
|
||||
"build": "rimraf \"*.d.ts\" && tsc && type-coverage",
|
||||
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
|
||||
"test-api": "node --conditions development test.js",
|
||||
"test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api",
|
||||
"test": "npm run build && npm run format && npm run test-coverage"
|
||||
},
|
||||
"prettier": {
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"singleQuote": true,
|
||||
"bracketSpacing": false,
|
||||
"semi": false,
|
||||
"trailingComma": "none"
|
||||
},
|
||||
"xo": {
|
||||
"prettier": true
|
||||
},
|
||||
"remarkConfig": {
|
||||
"plugins": [
|
||||
"preset-wooorm"
|
||||
]
|
||||
},
|
||||
"typeCoverage": {
|
||||
"atLeast": 100,
|
||||
"detail": true,
|
||||
"strict": true,
|
||||
"ignoreCatch": true
|
||||
}
|
||||
}
|
||||
149
node_modules/ccount/readme.md
generated
vendored
Normal file
149
node_modules/ccount/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
# ccount
|
||||
|
||||
[![Build][build-badge]][build]
|
||||
[![Coverage][coverage-badge]][coverage]
|
||||
[![Downloads][downloads-badge]][downloads]
|
||||
[![Size][size-badge]][size]
|
||||
|
||||
Count how often a character (or substring) is used in a string.
|
||||
|
||||
## Contents
|
||||
|
||||
* [What is this?](#what-is-this)
|
||||
* [When should I use this?](#when-should-i-use-this)
|
||||
* [Install](#install)
|
||||
* [Use](#use)
|
||||
* [API](#api)
|
||||
* [`ccount(value, character)`](#ccountvalue-character)
|
||||
* [Types](#types)
|
||||
* [Compatibility](#compatibility)
|
||||
* [Security](#security)
|
||||
* [Related](#related)
|
||||
* [Contribute](#contribute)
|
||||
* [License](#license)
|
||||
|
||||
## What is this?
|
||||
|
||||
This package is a small utility that helps you find how frequently a substring
|
||||
occurs in another string.
|
||||
|
||||
## When should I use this?
|
||||
|
||||
I find this particularly useful when generating code, for example, when building
|
||||
a string that can either be double or single quoted.
|
||||
I use this utility to choose single quotes when double quotes are used more
|
||||
frequently, and double quotes otherwise.
|
||||
|
||||
## Install
|
||||
|
||||
This package is [ESM only][esm].
|
||||
In Node.js (version 12.20+, 14.14+, or 16.0+), install with [npm][]:
|
||||
|
||||
```sh
|
||||
npm install ccount
|
||||
```
|
||||
|
||||
In Deno with [Skypack][]:
|
||||
|
||||
```js
|
||||
import {ccount} from 'https://cdn.skypack.dev/ccount@2?dts'
|
||||
```
|
||||
|
||||
In browsers with [Skypack][]:
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import {ccount} from 'https://cdn.skypack.dev/ccount@2?min'
|
||||
</script>
|
||||
```
|
||||
|
||||
## Use
|
||||
|
||||
```js
|
||||
import {ccount} from 'ccount'
|
||||
|
||||
ccount('foo(bar(baz)', '(') // => 2
|
||||
ccount('foo(bar(baz)', ')') // => 1
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
This package exports the following identifier: `ccount`.
|
||||
There is no default export.
|
||||
|
||||
### `ccount(value, character)`
|
||||
|
||||
Count how often a character (or substring) is used in a string.
|
||||
|
||||
###### Parameters
|
||||
|
||||
* `value` (`string`)
|
||||
— value to search in
|
||||
* `character` (`string`)
|
||||
— character (or substring) to look for
|
||||
|
||||
###### Returns
|
||||
|
||||
`number` — number of times `character` occurred in `value`.
|
||||
|
||||
## Types
|
||||
|
||||
This package is fully typed with [TypeScript][].
|
||||
|
||||
## Compatibility
|
||||
|
||||
This package is at least compatible with all maintained versions of Node.js.
|
||||
As of now, that is Node.js 12.20+, 14.14+, and 16.0+.
|
||||
It also works in Deno and modern browsers.
|
||||
|
||||
## Security
|
||||
|
||||
This package is safe.
|
||||
|
||||
## Related
|
||||
|
||||
* [`wooorm/longest-streak`](https://github.com/wooorm/longest-streak)
|
||||
— count of longest repeating streak of `character` in `value`
|
||||
* [`wooorm/direction`](https://github.com/wooorm/direction)
|
||||
— detect directionality: left-to-right, right-to-left, or neutral
|
||||
|
||||
## Contribute
|
||||
|
||||
Yes please!
|
||||
See [How to Contribute to Open Source][contribute].
|
||||
|
||||
## License
|
||||
|
||||
[MIT][license] © [Titus Wormer][author]
|
||||
|
||||
<!-- Definitions -->
|
||||
|
||||
[build-badge]: https://github.com/wooorm/ccount/workflows/main/badge.svg
|
||||
|
||||
[build]: https://github.com/wooorm/ccount/actions
|
||||
|
||||
[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/ccount.svg
|
||||
|
||||
[coverage]: https://codecov.io/github/wooorm/ccount
|
||||
|
||||
[downloads-badge]: https://img.shields.io/npm/dm/ccount.svg
|
||||
|
||||
[downloads]: https://www.npmjs.com/package/ccount
|
||||
|
||||
[size-badge]: https://img.shields.io/bundlephobia/minzip/ccount.svg
|
||||
|
||||
[size]: https://bundlephobia.com/result?p=ccount
|
||||
|
||||
[npm]: https://docs.npmjs.com/cli/install
|
||||
|
||||
[skypack]: https://www.skypack.dev
|
||||
|
||||
[license]: license
|
||||
|
||||
[author]: https://wooorm.com
|
||||
|
||||
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
|
||||
|
||||
[typescript]: https://www.typescriptlang.org
|
||||
|
||||
[contribute]: https://opensource.guide/how-to-contribute/
|
||||
6
node_modules/character-entities-html4/index.d.ts
generated
vendored
Normal file
6
node_modules/character-entities-html4/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
/**
|
||||
* Map of named character references from HTML 4.
|
||||
*
|
||||
* @type {Record<string, string>}
|
||||
*/
|
||||
export const characterEntitiesHtml4: Record<string, string>
|
||||
259
node_modules/character-entities-html4/index.js
generated
vendored
Normal file
259
node_modules/character-entities-html4/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,259 @@
|
|||
/**
|
||||
* Map of named character references from HTML 4.
|
||||
*
|
||||
* @type {Record<string, string>}
|
||||
*/
|
||||
export const characterEntitiesHtml4 = {
|
||||
nbsp: ' ',
|
||||
iexcl: '¡',
|
||||
cent: '¢',
|
||||
pound: '£',
|
||||
curren: '¤',
|
||||
yen: '¥',
|
||||
brvbar: '¦',
|
||||
sect: '§',
|
||||
uml: '¨',
|
||||
copy: '©',
|
||||
ordf: 'ª',
|
||||
laquo: '«',
|
||||
not: '¬',
|
||||
shy: '',
|
||||
reg: '®',
|
||||
macr: '¯',
|
||||
deg: '°',
|
||||
plusmn: '±',
|
||||
sup2: '²',
|
||||
sup3: '³',
|
||||
acute: '´',
|
||||
micro: 'µ',
|
||||
para: '¶',
|
||||
middot: '·',
|
||||
cedil: '¸',
|
||||
sup1: '¹',
|
||||
ordm: 'º',
|
||||
raquo: '»',
|
||||
frac14: '¼',
|
||||
frac12: '½',
|
||||
frac34: '¾',
|
||||
iquest: '¿',
|
||||
Agrave: 'À',
|
||||
Aacute: 'Á',
|
||||
Acirc: 'Â',
|
||||
Atilde: 'Ã',
|
||||
Auml: 'Ä',
|
||||
Aring: 'Å',
|
||||
AElig: 'Æ',
|
||||
Ccedil: 'Ç',
|
||||
Egrave: 'È',
|
||||
Eacute: 'É',
|
||||
Ecirc: 'Ê',
|
||||
Euml: 'Ë',
|
||||
Igrave: 'Ì',
|
||||
Iacute: 'Í',
|
||||
Icirc: 'Î',
|
||||
Iuml: 'Ï',
|
||||
ETH: 'Ð',
|
||||
Ntilde: 'Ñ',
|
||||
Ograve: 'Ò',
|
||||
Oacute: 'Ó',
|
||||
Ocirc: 'Ô',
|
||||
Otilde: 'Õ',
|
||||
Ouml: 'Ö',
|
||||
times: '×',
|
||||
Oslash: 'Ø',
|
||||
Ugrave: 'Ù',
|
||||
Uacute: 'Ú',
|
||||
Ucirc: 'Û',
|
||||
Uuml: 'Ü',
|
||||
Yacute: 'Ý',
|
||||
THORN: 'Þ',
|
||||
szlig: 'ß',
|
||||
agrave: 'à',
|
||||
aacute: 'á',
|
||||
acirc: 'â',
|
||||
atilde: 'ã',
|
||||
auml: 'ä',
|
||||
aring: 'å',
|
||||
aelig: 'æ',
|
||||
ccedil: 'ç',
|
||||
egrave: 'è',
|
||||
eacute: 'é',
|
||||
ecirc: 'ê',
|
||||
euml: 'ë',
|
||||
igrave: 'ì',
|
||||
iacute: 'í',
|
||||
icirc: 'î',
|
||||
iuml: 'ï',
|
||||
eth: 'ð',
|
||||
ntilde: 'ñ',
|
||||
ograve: 'ò',
|
||||
oacute: 'ó',
|
||||
ocirc: 'ô',
|
||||
otilde: 'õ',
|
||||
ouml: 'ö',
|
||||
divide: '÷',
|
||||
oslash: 'ø',
|
||||
ugrave: 'ù',
|
||||
uacute: 'ú',
|
||||
ucirc: 'û',
|
||||
uuml: 'ü',
|
||||
yacute: 'ý',
|
||||
thorn: 'þ',
|
||||
yuml: 'ÿ',
|
||||
fnof: 'ƒ',
|
||||
Alpha: 'Α',
|
||||
Beta: 'Β',
|
||||
Gamma: 'Γ',
|
||||
Delta: 'Δ',
|
||||
Epsilon: 'Ε',
|
||||
Zeta: 'Ζ',
|
||||
Eta: 'Η',
|
||||
Theta: 'Θ',
|
||||
Iota: 'Ι',
|
||||
Kappa: 'Κ',
|
||||
Lambda: 'Λ',
|
||||
Mu: 'Μ',
|
||||
Nu: 'Ν',
|
||||
Xi: 'Ξ',
|
||||
Omicron: 'Ο',
|
||||
Pi: 'Π',
|
||||
Rho: 'Ρ',
|
||||
Sigma: 'Σ',
|
||||
Tau: 'Τ',
|
||||
Upsilon: 'Υ',
|
||||
Phi: 'Φ',
|
||||
Chi: 'Χ',
|
||||
Psi: 'Ψ',
|
||||
Omega: 'Ω',
|
||||
alpha: 'α',
|
||||
beta: 'β',
|
||||
gamma: 'γ',
|
||||
delta: 'δ',
|
||||
epsilon: 'ε',
|
||||
zeta: 'ζ',
|
||||
eta: 'η',
|
||||
theta: 'θ',
|
||||
iota: 'ι',
|
||||
kappa: 'κ',
|
||||
lambda: 'λ',
|
||||
mu: 'μ',
|
||||
nu: 'ν',
|
||||
xi: 'ξ',
|
||||
omicron: 'ο',
|
||||
pi: 'π',
|
||||
rho: 'ρ',
|
||||
sigmaf: 'ς',
|
||||
sigma: 'σ',
|
||||
tau: 'τ',
|
||||
upsilon: 'υ',
|
||||
phi: 'φ',
|
||||
chi: 'χ',
|
||||
psi: 'ψ',
|
||||
omega: 'ω',
|
||||
thetasym: 'ϑ',
|
||||
upsih: 'ϒ',
|
||||
piv: 'ϖ',
|
||||
bull: '•',
|
||||
hellip: '…',
|
||||
prime: '′',
|
||||
Prime: '″',
|
||||
oline: '‾',
|
||||
frasl: '⁄',
|
||||
weierp: '℘',
|
||||
image: 'ℑ',
|
||||
real: 'ℜ',
|
||||
trade: '™',
|
||||
alefsym: 'ℵ',
|
||||
larr: '←',
|
||||
uarr: '↑',
|
||||
rarr: '→',
|
||||
darr: '↓',
|
||||
harr: '↔',
|
||||
crarr: '↵',
|
||||
lArr: '⇐',
|
||||
uArr: '⇑',
|
||||
rArr: '⇒',
|
||||
dArr: '⇓',
|
||||
hArr: '⇔',
|
||||
forall: '∀',
|
||||
part: '∂',
|
||||
exist: '∃',
|
||||
empty: '∅',
|
||||
nabla: '∇',
|
||||
isin: '∈',
|
||||
notin: '∉',
|
||||
ni: '∋',
|
||||
prod: '∏',
|
||||
sum: '∑',
|
||||
minus: '−',
|
||||
lowast: '∗',
|
||||
radic: '√',
|
||||
prop: '∝',
|
||||
infin: '∞',
|
||||
ang: '∠',
|
||||
and: '∧',
|
||||
or: '∨',
|
||||
cap: '∩',
|
||||
cup: '∪',
|
||||
int: '∫',
|
||||
there4: '∴',
|
||||
sim: '∼',
|
||||
cong: '≅',
|
||||
asymp: '≈',
|
||||
ne: '≠',
|
||||
equiv: '≡',
|
||||
le: '≤',
|
||||
ge: '≥',
|
||||
sub: '⊂',
|
||||
sup: '⊃',
|
||||
nsub: '⊄',
|
||||
sube: '⊆',
|
||||
supe: '⊇',
|
||||
oplus: '⊕',
|
||||
otimes: '⊗',
|
||||
perp: '⊥',
|
||||
sdot: '⋅',
|
||||
lceil: '⌈',
|
||||
rceil: '⌉',
|
||||
lfloor: '⌊',
|
||||
rfloor: '⌋',
|
||||
lang: '〈',
|
||||
rang: '〉',
|
||||
loz: '◊',
|
||||
spades: '♠',
|
||||
clubs: '♣',
|
||||
hearts: '♥',
|
||||
diams: '♦',
|
||||
quot: '"',
|
||||
amp: '&',
|
||||
lt: '<',
|
||||
gt: '>',
|
||||
OElig: 'Œ',
|
||||
oelig: 'œ',
|
||||
Scaron: 'Š',
|
||||
scaron: 'š',
|
||||
Yuml: 'Ÿ',
|
||||
circ: 'ˆ',
|
||||
tilde: '˜',
|
||||
ensp: ' ',
|
||||
emsp: ' ',
|
||||
thinsp: ' ',
|
||||
zwnj: '',
|
||||
zwj: '',
|
||||
lrm: '',
|
||||
rlm: '',
|
||||
ndash: '–',
|
||||
mdash: '—',
|
||||
lsquo: '‘',
|
||||
rsquo: '’',
|
||||
sbquo: '‚',
|
||||
ldquo: '“',
|
||||
rdquo: '”',
|
||||
bdquo: '„',
|
||||
dagger: '†',
|
||||
Dagger: '‡',
|
||||
permil: '‰',
|
||||
lsaquo: '‹',
|
||||
rsaquo: '›',
|
||||
euro: '€'
|
||||
}
|
||||
22
node_modules/character-entities-html4/license
generated
vendored
Normal file
22
node_modules/character-entities-html4/license
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
(The MIT License)
|
||||
|
||||
Copyright (c) 2015 Titus Wormer <tituswormer@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
79
node_modules/character-entities-html4/package.json
generated
vendored
Normal file
79
node_modules/character-entities-html4/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
"name": "character-entities-html4",
|
||||
"version": "2.1.0",
|
||||
"description": "Map of named character references from HTML 4",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"html",
|
||||
"html4",
|
||||
"entity",
|
||||
"entities",
|
||||
"character",
|
||||
"reference",
|
||||
"name",
|
||||
"replacement"
|
||||
],
|
||||
"repository": "wooorm/character-entities-html4",
|
||||
"bugs": "https://github.com/wooorm/character-entities-html4/issues",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
},
|
||||
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
|
||||
"contributors": [
|
||||
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"index.js"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@types/tape": "^4.0.0",
|
||||
"bail": "^2.0.0",
|
||||
"c8": "^7.0.0",
|
||||
"concat-stream": "^2.0.0",
|
||||
"prettier": "^2.0.0",
|
||||
"remark-cli": "^10.0.0",
|
||||
"remark-preset-wooorm": "^9.0.0",
|
||||
"rimraf": "^3.0.0",
|
||||
"tape": "^5.0.0",
|
||||
"type-coverage": "^2.0.0",
|
||||
"typescript": "^4.0.0",
|
||||
"xo": "^0.46.0"
|
||||
},
|
||||
"scripts": {
|
||||
"prepublishOnly": "npm run build && npm run format",
|
||||
"generate": "node build",
|
||||
"build": "rimraf \"*.d.ts\" && tsc && type-coverage",
|
||||
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
|
||||
"test-api": "node --conditions development test.js",
|
||||
"test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api",
|
||||
"test": "npm run generate && npm run build && npm run format && npm run test-coverage"
|
||||
},
|
||||
"prettier": {
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"singleQuote": true,
|
||||
"bracketSpacing": false,
|
||||
"semi": false,
|
||||
"trailingComma": "none"
|
||||
},
|
||||
"xo": {
|
||||
"prettier": true
|
||||
},
|
||||
"remarkConfig": {
|
||||
"plugins": [
|
||||
"preset-wooorm"
|
||||
]
|
||||
},
|
||||
"typeCoverage": {
|
||||
"atLeast": 100,
|
||||
"detail": true,
|
||||
"strict": true,
|
||||
"ignoreCatch": true
|
||||
}
|
||||
}
|
||||
153
node_modules/character-entities-html4/readme.md
generated
vendored
Normal file
153
node_modules/character-entities-html4/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
# character-entities-html4
|
||||
|
||||
[![Build][build-badge]][build]
|
||||
[![Coverage][coverage-badge]][coverage]
|
||||
[![Downloads][downloads-badge]][downloads]
|
||||
[![Size][size-badge]][size]
|
||||
|
||||
Map of named character references from HTML 4.
|
||||
|
||||
## Contents
|
||||
|
||||
* [What is this?](#what-is-this)
|
||||
* [When should I use this?](#when-should-i-use-this)
|
||||
* [Install](#install)
|
||||
* [Use](#use)
|
||||
* [API](#api)
|
||||
* [`characterEntitiesHtml4`](#characterentitieshtml4)
|
||||
* [Types](#types)
|
||||
* [Compatibility](#compatibility)
|
||||
* [Security](#security)
|
||||
* [Related](#related)
|
||||
* [Contribute](#contribute)
|
||||
* [License](#license)
|
||||
|
||||
## What is this?
|
||||
|
||||
This is a map of named character references in HTML 4 to the characters they
|
||||
represent.
|
||||
|
||||
## When should I use this?
|
||||
|
||||
Maybe when you’re writing an HTML parser or minifier, but otherwise probably
|
||||
never!
|
||||
Even then, it might be better to use [`parse-entities`][parse-entities] or
|
||||
[`stringify-entities`][stringify-entities].
|
||||
|
||||
## Install
|
||||
|
||||
This package is [ESM only][esm].
|
||||
In Node.js (version 12.20+, 14.14+, or 16.0+), install with [npm][]:
|
||||
|
||||
```sh
|
||||
npm install character-entities-html4
|
||||
```
|
||||
|
||||
In Deno with [Skypack][]:
|
||||
|
||||
```js
|
||||
import {characterEntitiesHtml4} from 'https://cdn.skypack.dev/character-entities-html4@2?dts'
|
||||
```
|
||||
|
||||
In browsers with [Skypack][]:
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import {characterEntitiesHtml4} from 'https://cdn.skypack.dev/character-entities-html4@2?min'
|
||||
</script>
|
||||
```
|
||||
|
||||
## Use
|
||||
|
||||
```js
|
||||
import {characterEntitiesHtml4} from 'character-entities-html4'
|
||||
|
||||
console.log(characterEntitiesHtml4.AElig) // => 'Æ'
|
||||
console.log(characterEntitiesHtml4.aelig) // => 'æ'
|
||||
console.log(characterEntitiesHtml4.amp) // => '&'
|
||||
console.log(characterEntitiesHtml4.apos) // => undefined
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
This package exports the following identifiers: `characterEntitiesHtml4`.
|
||||
There is no default export.
|
||||
|
||||
### `characterEntitiesHtml4`
|
||||
|
||||
Map of case sensitive named character references from HTML 4.
|
||||
See [`w3.org`][html] for more info.
|
||||
|
||||
## Types
|
||||
|
||||
This package is fully typed with [TypeScript][].
|
||||
|
||||
## Compatibility
|
||||
|
||||
This package is at least compatible with all maintained versions of Node.js.
|
||||
As of now, that is Node.js 12.20+, 14.14+, and 16.0+.
|
||||
It also works in Deno and modern browsers.
|
||||
|
||||
## Security
|
||||
|
||||
This package is safe.
|
||||
|
||||
## Related
|
||||
|
||||
* [`parse-entities`](https://github.com/wooorm/parse-entities)
|
||||
— parse (decode) character references
|
||||
* [`stringify-entities`](https://github.com/wooorm/stringify-entities)
|
||||
— serialize (encode) character references
|
||||
* [`character-entities`](https://github.com/wooorm/character-entities)
|
||||
— info on character entities
|
||||
* [`character-entities-invalid`](https://github.com/wooorm/character-entities-invalid)
|
||||
— info on invalid numeric character references
|
||||
* [`character-entities-legacy`](https://github.com/wooorm/character-entities-legacy)
|
||||
— info on legacy named character references
|
||||
|
||||
## Contribute
|
||||
|
||||
Yes please!
|
||||
See [How to Contribute to Open Source][contribute].
|
||||
|
||||
## License
|
||||
|
||||
[MIT][license] © [Titus Wormer][author]
|
||||
|
||||
<!-- Definitions -->
|
||||
|
||||
[build-badge]: https://github.com/wooorm/character-entities-html4/workflows/main/badge.svg
|
||||
|
||||
[build]: https://github.com/wooorm/character-entities-html4/actions
|
||||
|
||||
[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/character-entities-html4.svg
|
||||
|
||||
[coverage]: https://codecov.io/github/wooorm/character-entities-html4
|
||||
|
||||
[downloads-badge]: https://img.shields.io/npm/dm/character-entities-html4.svg
|
||||
|
||||
[downloads]: https://www.npmjs.com/package/character-entities-html4
|
||||
|
||||
[size-badge]: https://img.shields.io/bundlephobia/minzip/character-entities-html4.svg
|
||||
|
||||
[size]: https://bundlephobia.com/result?p=character-entities-html4
|
||||
|
||||
[npm]: https://docs.npmjs.com/cli/install
|
||||
|
||||
[skypack]: https://www.skypack.dev
|
||||
|
||||
[license]: license
|
||||
|
||||
[author]: https://wooorm.com
|
||||
|
||||
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
|
||||
|
||||
[typescript]: https://www.typescriptlang.org
|
||||
|
||||
[contribute]: https://opensource.guide/how-to-contribute/
|
||||
|
||||
[parse-entities]: https://github.com/wooorm/parse-entities
|
||||
|
||||
[stringify-entities]: https://github.com/wooorm/stringify-entities
|
||||
|
||||
[html]: https://www.w3.org/TR/html4/sgml/entities.html
|
||||
6
node_modules/character-entities-legacy/index.d.ts
generated
vendored
Normal file
6
node_modules/character-entities-legacy/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
/**
|
||||
* List of legacy HTML named character references that don’t need a trailing semicolon.
|
||||
*
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
export const characterEntitiesLegacy: Array<string>
|
||||
113
node_modules/character-entities-legacy/index.js
generated
vendored
Normal file
113
node_modules/character-entities-legacy/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
/**
|
||||
* List of legacy HTML named character references that don’t need a trailing semicolon.
|
||||
*
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
export const characterEntitiesLegacy = [
|
||||
'AElig',
|
||||
'AMP',
|
||||
'Aacute',
|
||||
'Acirc',
|
||||
'Agrave',
|
||||
'Aring',
|
||||
'Atilde',
|
||||
'Auml',
|
||||
'COPY',
|
||||
'Ccedil',
|
||||
'ETH',
|
||||
'Eacute',
|
||||
'Ecirc',
|
||||
'Egrave',
|
||||
'Euml',
|
||||
'GT',
|
||||
'Iacute',
|
||||
'Icirc',
|
||||
'Igrave',
|
||||
'Iuml',
|
||||
'LT',
|
||||
'Ntilde',
|
||||
'Oacute',
|
||||
'Ocirc',
|
||||
'Ograve',
|
||||
'Oslash',
|
||||
'Otilde',
|
||||
'Ouml',
|
||||
'QUOT',
|
||||
'REG',
|
||||
'THORN',
|
||||
'Uacute',
|
||||
'Ucirc',
|
||||
'Ugrave',
|
||||
'Uuml',
|
||||
'Yacute',
|
||||
'aacute',
|
||||
'acirc',
|
||||
'acute',
|
||||
'aelig',
|
||||
'agrave',
|
||||
'amp',
|
||||
'aring',
|
||||
'atilde',
|
||||
'auml',
|
||||
'brvbar',
|
||||
'ccedil',
|
||||
'cedil',
|
||||
'cent',
|
||||
'copy',
|
||||
'curren',
|
||||
'deg',
|
||||
'divide',
|
||||
'eacute',
|
||||
'ecirc',
|
||||
'egrave',
|
||||
'eth',
|
||||
'euml',
|
||||
'frac12',
|
||||
'frac14',
|
||||
'frac34',
|
||||
'gt',
|
||||
'iacute',
|
||||
'icirc',
|
||||
'iexcl',
|
||||
'igrave',
|
||||
'iquest',
|
||||
'iuml',
|
||||
'laquo',
|
||||
'lt',
|
||||
'macr',
|
||||
'micro',
|
||||
'middot',
|
||||
'nbsp',
|
||||
'not',
|
||||
'ntilde',
|
||||
'oacute',
|
||||
'ocirc',
|
||||
'ograve',
|
||||
'ordf',
|
||||
'ordm',
|
||||
'oslash',
|
||||
'otilde',
|
||||
'ouml',
|
||||
'para',
|
||||
'plusmn',
|
||||
'pound',
|
||||
'quot',
|
||||
'raquo',
|
||||
'reg',
|
||||
'sect',
|
||||
'shy',
|
||||
'sup1',
|
||||
'sup2',
|
||||
'sup3',
|
||||
'szlig',
|
||||
'thorn',
|
||||
'times',
|
||||
'uacute',
|
||||
'ucirc',
|
||||
'ugrave',
|
||||
'uml',
|
||||
'uuml',
|
||||
'yacute',
|
||||
'yen',
|
||||
'yuml'
|
||||
]
|
||||
22
node_modules/character-entities-legacy/license
generated
vendored
Normal file
22
node_modules/character-entities-legacy/license
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
(The MIT License)
|
||||
|
||||
Copyright (c) 2015 Titus Wormer <tituswormer@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
77
node_modules/character-entities-legacy/package.json
generated
vendored
Normal file
77
node_modules/character-entities-legacy/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
{
|
||||
"name": "character-entities-legacy",
|
||||
"version": "3.0.0",
|
||||
"description": "List of legacy HTML named character references that don’t need a trailing semicolon",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"html",
|
||||
"entity",
|
||||
"entities",
|
||||
"character",
|
||||
"reference",
|
||||
"name"
|
||||
],
|
||||
"repository": "wooorm/character-entities-legacy",
|
||||
"bugs": "https://github.com/wooorm/character-entities-legacy/issues",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
},
|
||||
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
|
||||
"contributors": [
|
||||
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"index.js"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@types/tape": "^4.0.0",
|
||||
"bail": "^2.0.0",
|
||||
"c8": "^7.0.0",
|
||||
"concat-stream": "^2.0.0",
|
||||
"prettier": "^2.0.0",
|
||||
"remark-cli": "^10.0.0",
|
||||
"remark-preset-wooorm": "^9.0.0",
|
||||
"rimraf": "^3.0.0",
|
||||
"tape": "^5.0.0",
|
||||
"type-coverage": "^2.0.0",
|
||||
"typescript": "^4.0.0",
|
||||
"xo": "^0.45.0"
|
||||
},
|
||||
"scripts": {
|
||||
"generate": "node build",
|
||||
"prepublishOnly": "npm run build && npm run format",
|
||||
"build": "rimraf \"*.d.ts\" && tsc && type-coverage",
|
||||
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
|
||||
"test-api": "node --conditions development test.js",
|
||||
"test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api",
|
||||
"test": "npm run generate && npm run build && npm run format && npm run test-coverage"
|
||||
},
|
||||
"prettier": {
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"singleQuote": true,
|
||||
"bracketSpacing": false,
|
||||
"semi": false,
|
||||
"trailingComma": "none"
|
||||
},
|
||||
"xo": {
|
||||
"prettier": true
|
||||
},
|
||||
"remarkConfig": {
|
||||
"plugins": [
|
||||
"preset-wooorm"
|
||||
]
|
||||
},
|
||||
"typeCoverage": {
|
||||
"atLeast": 100,
|
||||
"detail": true,
|
||||
"strict": true,
|
||||
"ignoreCatch": true
|
||||
}
|
||||
}
|
||||
157
node_modules/character-entities-legacy/readme.md
generated
vendored
Normal file
157
node_modules/character-entities-legacy/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
# character-entities-legacy
|
||||
|
||||
[![Build][build-badge]][build]
|
||||
[![Coverage][coverage-badge]][coverage]
|
||||
[![Downloads][downloads-badge]][downloads]
|
||||
[![Size][size-badge]][size]
|
||||
|
||||
List of legacy HTML named character references that don’t need a trailing
|
||||
semicolon.
|
||||
|
||||
## Contents
|
||||
|
||||
* [What is this?](#what-is-this)
|
||||
* [When should I use this?](#when-should-i-use-this)
|
||||
* [Install](#install)
|
||||
* [Use](#use)
|
||||
* [API](#api)
|
||||
* [`characterEntitiesLegacy`](#characterentitieslegacy)
|
||||
* [Types](#types)
|
||||
* [Compatibility](#compatibility)
|
||||
* [Security](#security)
|
||||
* [Related](#related)
|
||||
* [Contribute](#contribute)
|
||||
* [License](#license)
|
||||
|
||||
## What is this?
|
||||
|
||||
This is a list of certain named character references, that due to legacy
|
||||
reasons, don’t need a trailing semicolon in HTML.
|
||||
For example, `©` is perfectly fine for `©`!
|
||||
|
||||
## When should I use this?
|
||||
|
||||
Maybe when you’re writing an HTML parser or minifier, but otherwise probably
|
||||
never!
|
||||
Even then, it might be better to use [`parse-entities`][parse-entities] or
|
||||
[`stringify-entities`][stringify-entities].
|
||||
|
||||
## Install
|
||||
|
||||
This package is [ESM only][esm].
|
||||
In Node.js (version 12.20+, 14.14+, or 16.0+), install with [npm][]:
|
||||
|
||||
```sh
|
||||
npm install character-entities-legacy
|
||||
```
|
||||
|
||||
In Deno with [Skypack][]:
|
||||
|
||||
```js
|
||||
import {characterEntitiesLegacy} from 'https://cdn.skypack.dev/character-entities-legacy@2?dts'
|
||||
```
|
||||
|
||||
In browsers with [Skypack][]:
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import {characterEntitiesLegacy} from 'https://cdn.skypack.dev/character-entities-legacy@2?min'
|
||||
</script>
|
||||
```
|
||||
|
||||
## Use
|
||||
|
||||
```js
|
||||
import {characterEntitiesLegacy} from 'character-entities-legacy'
|
||||
|
||||
console.log(characterEntitiesLegacy.includes('copy')) // => true
|
||||
console.log(characterEntitiesLegacy.includes('frac34')) // => true
|
||||
console.log(characterEntitiesLegacy.includes('sup1')) // => true
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
This package exports the following identifiers: `characterEntitiesLegacy`.
|
||||
There is no default export.
|
||||
|
||||
### `characterEntitiesLegacy`
|
||||
|
||||
List of (case sensitive) legacy character entity names.
|
||||
[`wooorm/character-entities`][character-entities] holds their decoded values.
|
||||
See [`whatwg/html`][html] for more info.
|
||||
|
||||
## Types
|
||||
|
||||
This package is fully typed with [TypeScript][].
|
||||
|
||||
## Compatibility
|
||||
|
||||
This package is at least compatible with all maintained versions of Node.js.
|
||||
As of now, that is Node.js 12.20+, 14.14+, and 16.0+.
|
||||
It also works in Deno and modern browsers.
|
||||
|
||||
## Security
|
||||
|
||||
This package is safe.
|
||||
|
||||
## Related
|
||||
|
||||
* [`wooorm/parse-entities`](https://github.com/wooorm/parse-entities)
|
||||
— parse (decode) character references
|
||||
* [`wooorm/stringify-entities`](https://github.com/wooorm/stringify-entities)
|
||||
— serialize (encode) character references
|
||||
* [`wooorm/character-entities`](https://github.com/wooorm/character-entities)
|
||||
— info on character entities
|
||||
* [`wooorm/character-entities-html4`](https://github.com/wooorm/character-entities-html4)
|
||||
— info on HTML4 character entities
|
||||
* [`wooorm/character-reference-invalid`](https://github.com/wooorm/character-reference-invalid)
|
||||
— info on invalid numeric character references
|
||||
|
||||
## Contribute
|
||||
|
||||
Yes please!
|
||||
See [How to Contribute to Open Source][contribute].
|
||||
|
||||
## License
|
||||
|
||||
[MIT][license] © [Titus Wormer][author]
|
||||
|
||||
<!-- Definitions -->
|
||||
|
||||
[build-badge]: https://github.com/wooorm/character-entities-legacy/workflows/main/badge.svg
|
||||
|
||||
[build]: https://github.com/wooorm/character-entities-legacy/actions
|
||||
|
||||
[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/character-entities-legacy.svg
|
||||
|
||||
[coverage]: https://codecov.io/github/wooorm/character-entities-legacy
|
||||
|
||||
[downloads-badge]: https://img.shields.io/npm/dm/character-entities-legacy.svg
|
||||
|
||||
[downloads]: https://www.npmjs.com/package/character-entities-legacy
|
||||
|
||||
[size-badge]: https://img.shields.io/bundlephobia/minzip/character-entities-legacy.svg
|
||||
|
||||
[size]: https://bundlephobia.com/result?p=character-entities-legacy
|
||||
|
||||
[npm]: https://docs.npmjs.com/cli/install
|
||||
|
||||
[skypack]: https://www.skypack.dev
|
||||
|
||||
[license]: license
|
||||
|
||||
[author]: https://wooorm.com
|
||||
|
||||
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
|
||||
|
||||
[typescript]: https://www.typescriptlang.org
|
||||
|
||||
[contribute]: https://opensource.guide/how-to-contribute/
|
||||
|
||||
[html]: https://github.com/whatwg/html-build/blob/HEAD/entities/json-entities-legacy.inc
|
||||
|
||||
[parse-entities]: https://github.com/wooorm/parse-entities
|
||||
|
||||
[stringify-entities]: https://github.com/wooorm/stringify-entities
|
||||
|
||||
[character-entities]: https://github.com/wooorm/character-entities
|
||||
6
node_modules/character-entities/index.d.ts
generated
vendored
Normal file
6
node_modules/character-entities/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
/**
|
||||
* Map of named character references.
|
||||
*
|
||||
* @type {Record<string, string>}
|
||||
*/
|
||||
export const characterEntities: Record<string, string>
|
||||
2132
node_modules/character-entities/index.js
generated
vendored
Normal file
2132
node_modules/character-entities/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
22
node_modules/character-entities/license
generated
vendored
Normal file
22
node_modules/character-entities/license
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
(The MIT License)
|
||||
|
||||
Copyright (c) 2015 Titus Wormer <tituswormer@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
78
node_modules/character-entities/package.json
generated
vendored
Normal file
78
node_modules/character-entities/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
{
|
||||
"name": "character-entities",
|
||||
"version": "2.0.2",
|
||||
"description": "Map of named character references",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"html",
|
||||
"entity",
|
||||
"entities",
|
||||
"character",
|
||||
"reference",
|
||||
"name",
|
||||
"replacement"
|
||||
],
|
||||
"repository": "wooorm/character-entities",
|
||||
"bugs": "https://github.com/wooorm/character-entities/issues",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
},
|
||||
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
|
||||
"contributors": [
|
||||
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"index.js"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@types/tape": "^4.0.0",
|
||||
"bail": "^2.0.0",
|
||||
"c8": "^7.0.0",
|
||||
"concat-stream": "^2.0.0",
|
||||
"prettier": "^2.0.0",
|
||||
"remark-cli": "^10.0.0",
|
||||
"remark-preset-wooorm": "^9.0.0",
|
||||
"rimraf": "^3.0.0",
|
||||
"tape": "^5.0.0",
|
||||
"type-coverage": "^2.0.0",
|
||||
"typescript": "^4.0.0",
|
||||
"xo": "^0.50.0"
|
||||
},
|
||||
"scripts": {
|
||||
"generate": "node build",
|
||||
"prepublishOnly": "npm run build && npm run format",
|
||||
"build": "rimraf \"*.d.ts\" && tsc && type-coverage",
|
||||
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
|
||||
"test-api": "node --conditions development test.js",
|
||||
"test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api",
|
||||
"test": "npm run generate && npm run build && npm run format && npm run test-coverage"
|
||||
},
|
||||
"prettier": {
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"singleQuote": true,
|
||||
"bracketSpacing": false,
|
||||
"semi": false,
|
||||
"trailingComma": "none"
|
||||
},
|
||||
"xo": {
|
||||
"prettier": true
|
||||
},
|
||||
"remarkConfig": {
|
||||
"plugins": [
|
||||
"preset-wooorm"
|
||||
]
|
||||
},
|
||||
"typeCoverage": {
|
||||
"atLeast": 100,
|
||||
"detail": true,
|
||||
"strict": true,
|
||||
"ignoreCatch": true
|
||||
}
|
||||
}
|
||||
152
node_modules/character-entities/readme.md
generated
vendored
Normal file
152
node_modules/character-entities/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
# character-entities
|
||||
|
||||
[![Build][build-badge]][build]
|
||||
[![Coverage][coverage-badge]][coverage]
|
||||
[![Downloads][downloads-badge]][downloads]
|
||||
[![Size][size-badge]][size]
|
||||
|
||||
Map of named character references.
|
||||
|
||||
## Contents
|
||||
|
||||
* [What is this?](#what-is-this)
|
||||
* [When should I use this?](#when-should-i-use-this)
|
||||
* [Install](#install)
|
||||
* [Use](#use)
|
||||
* [API](#api)
|
||||
* [characterEntities](#characterentities)
|
||||
* [Types](#types)
|
||||
* [Compatibility](#compatibility)
|
||||
* [Security](#security)
|
||||
* [Related](#related)
|
||||
* [Contribute](#contribute)
|
||||
* [License](#license)
|
||||
|
||||
## What is this?
|
||||
|
||||
This is a map of named character references in HTML (latest) to the characters
|
||||
they represent.
|
||||
|
||||
## When should I use this?
|
||||
|
||||
Maybe when you’re writing an HTML parser or minifier, but otherwise probably
|
||||
never!
|
||||
Even then, it might be better to use [`parse-entities`][parse-entities] or
|
||||
[`stringify-entities`][stringify-entities].
|
||||
|
||||
## Install
|
||||
|
||||
This package is [ESM only][esm].
|
||||
In Node.js (version 12.20+, 14.14+, 16.0+, 18.0+), install with [npm][]:
|
||||
|
||||
```sh
|
||||
npm install character-entities
|
||||
```
|
||||
|
||||
In Deno with [`esm.sh`][esmsh]:
|
||||
|
||||
```js
|
||||
import {characterEntities} from 'https://esm.sh/character-entities@2'
|
||||
```
|
||||
|
||||
In browsers with [`esm.sh`][esmsh]:
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import {characterEntities} from 'https://esm.sh/character-entities@2?bundle'
|
||||
</script>
|
||||
```
|
||||
|
||||
## Use
|
||||
|
||||
```js
|
||||
import {characterEntities} from 'character-entities'
|
||||
|
||||
console.log(characterEntities.AElig) // => 'Æ'
|
||||
console.log(characterEntities.aelig) // => 'æ'
|
||||
console.log(characterEntities.amp) // => '&'
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
This package exports the identifier `characterEntities`.
|
||||
There is no default export.
|
||||
|
||||
### characterEntities
|
||||
|
||||
Mapping between (case-sensitive) character entity names to replacements.
|
||||
See [`html.spec.whatwg.org`][html] for more info.
|
||||
|
||||
## Types
|
||||
|
||||
This package is fully typed with [TypeScript][].
|
||||
|
||||
## Compatibility
|
||||
|
||||
This package is at least compatible with all maintained versions of Node.js.
|
||||
As of now, that is Node.js 12.20+, 14.14+, 16.0+, and 18.0+.
|
||||
It also works in Deno and modern browsers.
|
||||
|
||||
## Security
|
||||
|
||||
This package is safe.
|
||||
|
||||
## Related
|
||||
|
||||
* [`wooorm/parse-entities`](https://github.com/wooorm/parse-entities)
|
||||
— parse (decode) character references
|
||||
* [`wooorm/stringify-entities`](https://github.com/wooorm/stringify-entities)
|
||||
— serialize (encode) character references
|
||||
* [`wooorm/character-entities-html4`](https://github.com/wooorm/character-entities-html4)
|
||||
— info on named character references in HTML 4
|
||||
* [`character-reference-invalid`](https://github.com/wooorm/character-reference-invalid)
|
||||
— info on invalid numeric character references
|
||||
* [`character-entities-legacy`](https://github.com/wooorm/character-entities-legacy)
|
||||
— info on legacy named character references
|
||||
|
||||
## Contribute
|
||||
|
||||
Yes please!
|
||||
See [How to Contribute to Open Source][contribute].
|
||||
|
||||
## License
|
||||
|
||||
[MIT][license] © [Titus Wormer][author]
|
||||
|
||||
<!-- Definitions -->
|
||||
|
||||
[build-badge]: https://github.com/wooorm/character-entities/workflows/main/badge.svg
|
||||
|
||||
[build]: https://github.com/wooorm/character-entities/actions
|
||||
|
||||
[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/character-entities.svg
|
||||
|
||||
[coverage]: https://codecov.io/github/wooorm/character-entities
|
||||
|
||||
[downloads-badge]: https://img.shields.io/npm/dm/character-entities.svg
|
||||
|
||||
[downloads]: https://www.npmjs.com/package/character-entities
|
||||
|
||||
[size-badge]: https://img.shields.io/bundlephobia/minzip/character-entities.svg
|
||||
|
||||
[size]: https://bundlephobia.com/result?p=character-entities
|
||||
|
||||
[npm]: https://docs.npmjs.com/cli/install
|
||||
|
||||
[esmsh]: https://esm.sh
|
||||
|
||||
[license]: license
|
||||
|
||||
[author]: https://wooorm.com
|
||||
|
||||
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
|
||||
|
||||
[typescript]: https://www.typescriptlang.org
|
||||
|
||||
[contribute]: https://opensource.guide/how-to-contribute/
|
||||
|
||||
[parse-entities]: https://github.com/wooorm/parse-entities
|
||||
|
||||
[stringify-entities]: https://github.com/wooorm/stringify-entities
|
||||
|
||||
[html]: https://html.spec.whatwg.org/multipage/syntax.html#named-character-references
|
||||
6
node_modules/character-reference-invalid/index.d.ts
generated
vendored
Normal file
6
node_modules/character-reference-invalid/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
/**
|
||||
* Map of invalid numeric character references to their replacements, according to HTML.
|
||||
*
|
||||
* @type {Record<number, string>}
|
||||
*/
|
||||
export const characterReferenceInvalid: Record<number, string>
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue