feat: implement rule engine, worker pool, event bus, and readability scraping with enhanced logging and content sanitization.

This commit is contained in:
2026-08-25 00:31:32 -07:00
parent 5ea176d5ad
commit d440728ca5
29 changed files with 2788 additions and 204 deletions
+103 -2
View File
@@ -560,8 +560,8 @@ html, body, #root {
.reader-toolbar {
position: sticky;
top: 0;
height: 44px;
min-height: 44px;
height: 46px;
min-height: 46px;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(8px);
border-bottom: 1px solid var(--border);
@@ -572,6 +572,107 @@ html, body, #root {
z-index: 10;
}
/* Sliding Ball Capsule Toggle Switch */
.capsule-switch-btn {
display: inline-flex;
align-items: center;
border: none;
background: transparent;
padding: 0;
cursor: pointer;
outline: none;
user-select: none;
margin-left: 0.5rem;
}
.capsule-switch-track {
position: relative;
display: flex;
align-items: center;
width: 86px;
height: 26px;
border-radius: 9999px;
background-color: var(--bg-card-hover);
border: 1px solid var(--border-dark);
padding: 2px;
transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
box-shadow 0.25s ease;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}
.capsule-switch-btn:hover .capsule-switch-track {
border-color: var(--border-focus);
}
.capsule-switch-btn.active .capsule-switch-track {
background-color: #0284c7;
border-color: #0284c7;
}
.capsule-switch-btn.scraping .capsule-switch-track {
background-color: #0369a1;
border-color: #0369a1;
cursor: wait;
}
.capsule-switch-thumb {
position: absolute;
top: 2px;
left: 2px;
width: 20px;
height: 20px;
border-radius: 50%;
background-color: #ffffff;
color: #64748b;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.1);
transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
color 0.25s ease;
z-index: 2;
}
.capsule-switch-btn.active .capsule-switch-thumb {
transform: translateX(60px);
color: #0284c7;
}
.capsule-switch-label {
width: 100%;
font-size: 0.69rem;
font-weight: 600;
text-align: center;
transition: color 0.25s ease, padding 0.25s ease;
z-index: 1;
white-space: nowrap;
letter-spacing: -0.01em;
}
/* When thumb is on the left, label is padded to the right */
.capsule-switch-btn:not(.active) .capsule-switch-label {
padding-left: 17px;
padding-right: 2px;
color: var(--text-main);
}
/* When thumb is on the right, label is padded to the left */
.capsule-switch-btn.active .capsule-switch-label {
padding-right: 17px;
padding-left: 2px;
color: #ffffff;
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.spin {
animation: spin 1s linear infinite;
}
.reader-content-canvas {
max-width: 680px;
width: 100%;