Implement multi-scheme animation name mapper for Owen Animation System
Some checks failed
CI/CD Pipeline / Test & Lint (16.x) (push) Has been cancelled
CI/CD Pipeline / Test & Lint (18.x) (push) Has been cancelled
CI/CD Pipeline / Test & Lint (20.x) (push) Has been cancelled
CI/CD Pipeline / Security Audit (push) Has been cancelled
CI/CD Pipeline / Release (push) Has been cancelled
Release / Validate Version (push) Has been cancelled
Release / Build and Test (push) Has been cancelled
Release / Create Release (push) Has been cancelled
Release / Publish to NPM (push) Has been cancelled
Release / Deploy Demo (push) Has been cancelled
Animation Processing Pipeline / Validate Animation Names (push) Has been cancelled
Animation Processing Pipeline / Process Blender Animation Assets (push) Has been cancelled
Animation Processing Pipeline / Update Animation Documentation (push) Has been cancelled
Animation Processing Pipeline / Deploy Animation Demo (push) Has been cancelled

- Added AnimationNameMapper class to handle conversion between different animation naming schemes (legacy, artist, hierarchical, semantic).
- Included methods for initialization, pattern matching, conversion, and validation of animation names.
- Developed comprehensive unit tests for the animation name converter and demo pages using Playwright.
- Created a Vite configuration for the demo application, including asset handling and optimization settings.
- Enhanced the demo with features for batch conversion, performance metrics, and responsive design.
This commit is contained in:
2025-05-24 05:18:13 +02:00
parent d513e80c07
commit ad8dbb95dd
55 changed files with 20060 additions and 6686 deletions

412
demo/styles/comparison.css Normal file
View File

@ -0,0 +1,412 @@
/* Comparison Page Specific Styles */
.comparison-container {
max-width: 1400px;
margin: 0 auto;
padding: 2rem;
}
.comparison-intro {
text-align: center;
margin-bottom: 3rem;
}
.comparison-intro h1 {
color: var(--text-primary);
margin-bottom: 1rem;
}
.comparison-intro p {
color: var(--text-secondary);
font-size: 1.125rem;
max-width: 600px;
margin: 0 auto;
line-height: 1.6;
}
.scheme-overview {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 1.5rem;
margin-bottom: 3rem;
}
.scheme-card {
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 1.5rem;
box-shadow: var(--shadow-sm);
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.scheme-card::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 4px;
background: var(--scheme-accent, var(--accent-color));
}
.scheme-card:hover {
box-shadow: var(--shadow-md);
transform: translateY(-2px);
}
.scheme-card.legacy {
--scheme-accent: #8b5cf6;
}
.scheme-card.artist {
--scheme-accent: #06b6d4;
}
.scheme-card.hierarchical {
--scheme-accent: #10b981;
}
.scheme-card.semantic {
--scheme-accent: #f59e0b;
}
.scheme-header {
display: flex;
align-items: center;
gap: 1rem;
margin-bottom: 1rem;
}
.scheme-icon {
width: 40px;
height: 40px;
border-radius: 8px;
background: var(--scheme-accent);
display: flex;
align-items: center;
justify-content: center;
color: white;
font-weight: bold;
font-size: 1.25rem;
}
.scheme-name {
font-size: 1.25rem;
font-weight: 600;
color: var(--text-primary);
margin: 0;
}
.scheme-description {
color: var(--text-secondary);
margin-bottom: 1rem;
line-height: 1.6;
}
.scheme-example {
background: var(--bg-code);
border: 1px solid var(--border-color);
border-radius: 6px;
padding: 0.75rem;
font-family: "Fira Code", monospace;
font-size: 0.875rem;
color: var(--text-primary);
margin-bottom: 1rem;
}
.scheme-pros {
list-style: none;
padding: 0;
margin: 0;
}
.scheme-pros li {
padding: 0.25rem 0;
padding-left: 1.5rem;
position: relative;
color: var(--text-secondary);
font-size: 0.875rem;
}
.scheme-pros li::before {
content: "✓";
position: absolute;
left: 0;
color: var(--success-text);
font-weight: bold;
}
.comparison-table-section {
margin: 3rem 0;
}
.table-controls {
display: flex;
gap: 1rem;
margin-bottom: 1.5rem;
flex-wrap: wrap;
align-items: center;
}
.table-filter {
padding: 0.5rem 1rem;
border: 1px solid var(--border-color);
background: var(--bg-secondary);
color: var(--text-secondary);
border-radius: 6px;
cursor: pointer;
transition: all 0.2s ease;
font-size: 0.875rem;
}
.table-filter:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.table-filter.active {
background: var(--accent-color);
color: white;
border-color: var(--accent-color);
}
.search-input {
padding: 0.5rem 1rem;
border: 1px solid var(--border-color);
background: var(--bg-secondary);
color: var(--text-primary);
border-radius: 6px;
font-size: 0.875rem;
min-width: 200px;
}
.search-input:focus {
outline: none;
border-color: var(--accent-color);
box-shadow: 0 0 0 3px var(--accent-color-alpha);
}
.comparison-table {
width: 100%;
border-collapse: collapse;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 8px;
overflow: hidden;
box-shadow: var(--shadow-sm);
}
.comparison-table th,
.comparison-table td {
padding: 1rem;
text-align: left;
border-bottom: 1px solid var(--border-color);
}
.comparison-table th {
background: var(--bg-tertiary);
font-weight: 600;
color: var(--text-primary);
position: sticky;
top: 0;
z-index: 10;
}
.comparison-table td {
color: var(--text-secondary);
font-family: "Fira Code", monospace;
font-size: 0.875rem;
}
.comparison-table tbody tr:hover {
background: var(--bg-hover);
}
.comparison-table tbody tr:last-child td {
border-bottom: none;
}
.scheme-label {
display: inline-block;
padding: 0.25rem 0.5rem;
border-radius: 4px;
font-size: 0.75rem;
font-weight: 500;
color: white;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.scheme-label.legacy {
background: #8b5cf6;
}
.scheme-label.artist {
background: #06b6d4;
}
.scheme-label.hierarchical {
background: #10b981;
}
.scheme-label.semantic {
background: #f59e0b;
}
.conversion-demo {
margin: 3rem 0;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 2rem;
}
.conversion-controls {
display: grid;
grid-template-columns: 1fr auto 1fr;
gap: 1rem;
align-items: center;
margin-bottom: 2rem;
}
.scheme-selector {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.scheme-selector label {
font-weight: 500;
color: var(--text-primary);
font-size: 0.875rem;
}
.scheme-select {
padding: 0.75rem;
border: 1px solid var(--border-color);
background: var(--bg-tertiary);
color: var(--text-primary);
border-radius: 6px;
font-size: 0.875rem;
}
.conversion-arrow {
display: flex;
align-items: center;
justify-content: center;
color: var(--accent-color);
font-size: 1.5rem;
font-weight: bold;
}
.animation-input {
width: 100%;
padding: 0.75rem;
border: 1px solid var(--border-color);
background: var(--bg-tertiary);
color: var(--text-primary);
border-radius: 6px;
font-family: "Fira Code", monospace;
font-size: 0.875rem;
}
.conversion-result {
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
border-radius: 6px;
padding: 1rem;
margin-top: 1rem;
}
.result-label {
font-size: 0.875rem;
color: var(--text-secondary);
margin-bottom: 0.5rem;
}
.result-value {
font-family: "Fira Code", monospace;
font-size: 1rem;
color: var(--text-primary);
background: var(--bg-code);
padding: 0.75rem;
border-radius: 4px;
word-break: break-all;
}
.performance-comparison {
margin: 3rem 0;
}
.performance-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1rem;
margin-top: 1rem;
}
.performance-card {
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 1.5rem;
text-align: center;
}
.performance-metric {
font-size: 2rem;
font-weight: bold;
color: var(--accent-color);
margin-bottom: 0.5rem;
}
.performance-label {
color: var(--text-secondary);
font-size: 0.875rem;
}
.no-results {
text-align: center;
padding: 2rem;
color: var(--text-secondary);
font-style: italic;
}
@media (max-width: 768px) {
.comparison-container {
padding: 1rem;
}
.scheme-overview {
grid-template-columns: 1fr;
gap: 1rem;
}
.table-controls {
flex-direction: column;
align-items: stretch;
}
.search-input {
min-width: auto;
}
.comparison-table {
font-size: 0.75rem;
}
.comparison-table th,
.comparison-table td {
padding: 0.75rem 0.5rem;
}
.conversion-controls {
grid-template-columns: 1fr;
text-align: center;
}
.conversion-arrow {
transform: rotate(90deg);
}
.performance-grid {
grid-template-columns: repeat(2, 1fr);
}
}

302
demo/styles/demo.css Normal file
View File

@ -0,0 +1,302 @@
/* Demo-specific styles */
/* Hero Section */
.hero-section {
padding: 4rem 0;
background: linear-gradient(
135deg,
var(--bg-secondary) 0%,
var(--bg-tertiary) 100%
);
margin-bottom: 3rem;
}
.hero-content {
text-align: center;
margin-bottom: 3rem;
}
.hero-content h2 {
font-size: 2.5rem;
font-weight: 700;
margin-bottom: 1rem;
color: var(--text-primary);
}
.hero-content p {
font-size: 1.125rem;
color: var(--text-secondary);
margin-bottom: 2rem;
max-width: 600px;
margin-left: auto;
margin-right: auto;
}
.hero-actions {
display: flex;
gap: 1rem;
justify-content: center;
flex-wrap: wrap;
}
.hero-visual {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 2rem;
align-items: start;
}
#demo-canvas {
width: 100%;
height: 400px;
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
background: var(--bg-primary);
}
.demo-controls {
background: var(--bg-primary);
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
padding: 1.5rem;
box-shadow: var(--shadow-sm);
}
.control-group {
margin-bottom: 1.5rem;
}
.control-group:last-child {
margin-bottom: 0;
}
.control-group label {
margin-bottom: 0.5rem;
font-weight: 600;
font-size: 0.875rem;
}
.control-group .btn {
margin-right: 0.5rem;
margin-bottom: 0.5rem;
}
/* Features Section */
.features-section {
padding: 3rem 0;
margin-bottom: 3rem;
}
.features-section h3 {
text-align: center;
font-size: 2rem;
margin-bottom: 2rem;
color: var(--text-primary);
}
.features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 2rem;
}
.feature-card {
background: var(--bg-primary);
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
padding: 2rem;
text-align: center;
box-shadow: var(--shadow-sm);
transition:
transform 0.2s ease,
box-shadow 0.2s ease;
}
.feature-card:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}
.feature-icon {
font-size: 2.5rem;
margin-bottom: 1rem;
}
.feature-card h4 {
font-size: 1.25rem;
margin-bottom: 1rem;
color: var(--text-primary);
}
.feature-card p {
color: var(--text-secondary);
line-height: 1.6;
}
/* Live Demo Section */
.live-demo-section {
padding: 3rem 0;
background: var(--bg-secondary);
border-radius: var(--border-radius);
margin-bottom: 3rem;
}
.live-demo-section h3 {
text-align: center;
font-size: 1.75rem;
margin-bottom: 2rem;
color: var(--text-primary);
}
.conversion-demo {
max-width: 800px;
margin: 0 auto;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 2rem;
align-items: start;
}
.input-section {
background: var(--bg-primary);
padding: 1.5rem;
border-radius: var(--border-radius);
border: 1px solid var(--border-color);
}
.input-section label {
margin-bottom: 0.5rem;
margin-top: 1rem;
}
.input-section label:first-child {
margin-top: 0;
}
.conversion-results {
background: var(--bg-primary);
padding: 1.5rem;
border-radius: var(--border-radius);
border: 1px solid var(--border-color);
}
.conversion-results h4 {
margin-bottom: 1rem;
color: var(--text-primary);
}
.scheme-results {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.scheme-result {
padding: 0.75rem;
background: var(--bg-tertiary);
border-radius: var(--border-radius);
font-family: var(--font-mono);
font-size: 0.875rem;
}
.scheme-result strong {
color: var(--primary-color);
margin-right: 0.5rem;
}
/* Code Examples Section */
.code-examples-section {
padding: 3rem 0;
margin-bottom: 3rem;
}
.code-examples-section h3 {
text-align: center;
font-size: 1.75rem;
margin-bottom: 2rem;
color: var(--text-primary);
}
.code-tabs {
display: flex;
justify-content: center;
margin-bottom: 2rem;
border-bottom: 1px solid var(--border-color);
}
.tab-button {
background: none;
border: none;
padding: 1rem 2rem;
cursor: pointer;
font-weight: 500;
color: var(--text-secondary);
border-bottom: 2px solid transparent;
transition: all 0.2s ease;
}
.tab-button:hover {
color: var(--text-primary);
}
.tab-button.active {
color: var(--primary-color);
border-bottom-color: var(--primary-color);
}
.tab-content {
max-width: 900px;
margin: 0 auto;
}
.tab-pane {
display: none;
}
.tab-pane.active {
display: block;
}
.tab-pane pre {
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
padding: 1.5rem;
overflow-x: auto;
font-size: 0.875rem;
line-height: 1.6;
}
/* Responsive adjustments */
@media (max-width: 768px) {
.hero-visual {
grid-template-columns: 1fr;
gap: 1.5rem;
}
.conversion-demo {
grid-template-columns: 1fr;
gap: 1.5rem;
}
.hero-content h2 {
font-size: 2rem;
}
.hero-content p {
font-size: 1rem;
}
.features-grid {
grid-template-columns: 1fr;
}
.code-tabs {
flex-wrap: wrap;
gap: 0.5rem;
}
.tab-button {
padding: 0.75rem 1.5rem;
}
}

306
demo/styles/examples.css Normal file
View File

@ -0,0 +1,306 @@
/* Examples Page Specific Styles */
.examples-container {
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
}
.examples-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
gap: 2rem;
margin-top: 2rem;
}
.example-card {
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 1.5rem;
box-shadow: var(--shadow-sm);
transition: all 0.3s ease;
}
.example-card:hover {
box-shadow: var(--shadow-md);
transform: translateY(-2px);
}
.example-header {
display: flex;
align-items: center;
gap: 1rem;
margin-bottom: 1rem;
padding-bottom: 1rem;
border-bottom: 1px solid var(--border-color);
}
.framework-icon {
width: 32px;
height: 32px;
border-radius: 6px;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
color: white;
font-size: 0.875rem;
}
.react-icon {
background: #61dafb;
color: #000;
}
.vue-icon {
background: #4fc08d;
}
.node-icon {
background: #339933;
}
.vanilla-icon {
background: #f7df1e;
color: #000;
}
.blender-icon {
background: #e87d0d;
}
.example-title {
font-size: 1.25rem;
font-weight: 600;
color: var(--text-primary);
margin: 0;
}
.example-description {
color: var(--text-secondary);
margin-bottom: 1.5rem;
line-height: 1.6;
}
.code-example {
background: var(--bg-code);
border: 1px solid var(--border-color);
border-radius: 8px;
overflow: hidden;
margin-bottom: 1rem;
}
.code-header {
background: var(--bg-tertiary);
padding: 0.75rem 1rem;
border-bottom: 1px solid var(--border-color);
display: flex;
align-items: center;
justify-content: space-between;
}
.code-language {
font-size: 0.875rem;
font-weight: 500;
color: var(--text-secondary);
}
.copy-button {
background: none;
border: 1px solid var(--border-color);
color: var(--text-secondary);
padding: 0.25rem 0.75rem;
border-radius: 4px;
font-size: 0.75rem;
cursor: pointer;
transition: all 0.2s ease;
}
.copy-button:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.copy-button.copied {
background: var(--success-bg);
color: var(--success-text);
border-color: var(--success-border);
}
.code-content {
padding: 1rem;
font-family: "Fira Code", "Monaco", "Consolas", monospace;
font-size: 0.875rem;
line-height: 1.5;
color: var(--text-primary);
overflow-x: auto;
}
.integration-steps {
margin-top: 1.5rem;
}
.step {
display: flex;
align-items: flex-start;
gap: 1rem;
margin-bottom: 1rem;
padding: 1rem;
background: var(--bg-tertiary);
border-radius: 8px;
border-left: 4px solid var(--accent-color);
}
.step-number {
background: var(--accent-color);
color: white;
width: 24px;
height: 24px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.75rem;
font-weight: bold;
flex-shrink: 0;
margin-top: 0.125rem;
}
.step-content h4 {
margin: 0 0 0.5rem 0;
color: var(--text-primary);
font-size: 1rem;
}
.step-content p {
margin: 0;
color: var(--text-secondary);
line-height: 1.5;
}
.example-navigation {
display: flex;
gap: 1rem;
margin-bottom: 2rem;
flex-wrap: wrap;
}
.nav-filter {
padding: 0.5rem 1rem;
border: 1px solid var(--border-color);
background: var(--bg-secondary);
color: var(--text-secondary);
border-radius: 6px;
cursor: pointer;
transition: all 0.2s ease;
font-size: 0.875rem;
}
.nav-filter:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.nav-filter.active {
background: var(--accent-color);
color: white;
border-color: var(--accent-color);
}
.features-list {
list-style: none;
padding: 0;
margin: 1rem 0;
}
.features-list li {
padding: 0.5rem 0;
padding-left: 1.5rem;
position: relative;
color: var(--text-secondary);
}
.features-list li::before {
content: "✓";
position: absolute;
left: 0;
color: var(--success-text);
font-weight: bold;
}
.download-section {
margin-top: 2rem;
padding: 1.5rem;
background: var(--bg-tertiary);
border-radius: 8px;
border: 1px solid var(--border-color);
}
.download-links {
display: flex;
gap: 1rem;
margin-top: 1rem;
flex-wrap: wrap;
}
.download-link {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1rem;
background: var(--accent-color);
color: white;
text-decoration: none;
border-radius: 6px;
font-weight: 500;
transition: all 0.2s ease;
}
.download-link:hover {
background: var(--accent-hover);
transform: translateY(-1px);
}
.error-boundary {
border: 2px dashed var(--error-border);
background: var(--error-bg);
color: var(--error-text);
padding: 1rem;
border-radius: 8px;
margin: 1rem 0;
text-align: center;
}
@media (max-width: 768px) {
.examples-container {
padding: 1rem;
}
.examples-grid {
grid-template-columns: 1fr;
gap: 1rem;
}
.example-card {
padding: 1rem;
}
.example-navigation {
gap: 0.5rem;
}
.nav-filter {
padding: 0.375rem 0.75rem;
font-size: 0.8rem;
}
.download-links {
flex-direction: column;
}
.step {
flex-direction: column;
gap: 0.5rem;
}
.step-number {
align-self: flex-start;
}
}

444
demo/styles/interactive.css Normal file
View File

@ -0,0 +1,444 @@
/* Interactive Playground Specific Styles */
.interactive-container {
max-width: 1600px;
margin: 0 auto;
padding: 2rem;
display: grid;
grid-template-areas:
"header header"
"controls playground"
"results results";
grid-template-columns: 300px 1fr;
grid-template-rows: auto 1fr auto;
gap: 2rem;
min-height: calc(100vh - 4rem);
}
.playground-header {
grid-area: header;
text-align: center;
margin-bottom: 1rem;
}
.playground-header h1 {
color: var(--text-primary);
margin-bottom: 1rem;
}
.playground-header p {
color: var(--text-secondary);
font-size: 1.125rem;
max-width: 600px;
margin: 0 auto;
line-height: 1.6;
}
.playground-controls {
grid-area: controls;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 1.5rem;
height: fit-content;
box-shadow: var(--shadow-sm);
}
.controls-section {
margin-bottom: 2rem;
}
.controls-section:last-child {
margin-bottom: 0;
}
.section-title {
font-size: 1rem;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 1rem;
padding-bottom: 0.5rem;
border-bottom: 1px solid var(--border-color);
}
.control-group {
margin-bottom: 1rem;
}
.control-label {
display: block;
font-size: 0.875rem;
color: var(--text-secondary);
margin-bottom: 0.5rem;
font-weight: 500;
}
.control-input {
width: 100%;
padding: 0.75rem;
border: 1px solid var(--border-color);
background: var(--bg-tertiary);
color: var(--text-primary);
border-radius: 6px;
font-size: 0.875rem;
transition: all 0.2s ease;
}
.control-input:focus {
outline: none;
border-color: var(--accent-color);
box-shadow: 0 0 0 3px var(--accent-color-alpha);
}
.control-textarea {
min-height: 100px;
resize: vertical;
font-family: "Fira Code", monospace;
}
.scheme-buttons {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.5rem;
margin-bottom: 1rem;
}
.scheme-button {
padding: 0.75rem;
border: 1px solid var(--border-color);
background: var(--bg-tertiary);
color: var(--text-secondary);
border-radius: 6px;
cursor: pointer;
transition: all 0.2s ease;
font-size: 0.75rem;
text-align: center;
font-weight: 500;
}
.scheme-button:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.scheme-button.active {
background: var(--accent-color);
color: white;
border-color: var(--accent-color);
}
.action-buttons {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.action-button {
padding: 0.75rem 1rem;
border: 1px solid var(--accent-color);
background: var(--accent-color);
color: white;
border-radius: 6px;
cursor: pointer;
transition: all 0.2s ease;
font-weight: 500;
font-size: 0.875rem;
}
.action-button:hover {
background: var(--accent-hover);
border-color: var(--accent-hover);
}
.action-button.secondary {
background: transparent;
color: var(--accent-color);
}
.action-button.secondary:hover {
background: var(--accent-color-alpha);
}
.action-button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.playground-main {
grid-area: playground;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 12px;
overflow: hidden;
box-shadow: var(--shadow-sm);
display: flex;
flex-direction: column;
}
.playground-tabs {
display: flex;
background: var(--bg-tertiary);
border-bottom: 1px solid var(--border-color);
}
.playground-tab {
padding: 1rem 1.5rem;
background: none;
border: none;
color: var(--text-secondary);
cursor: pointer;
transition: all 0.2s ease;
font-weight: 500;
border-bottom: 2px solid transparent;
}
.playground-tab:hover {
color: var(--text-primary);
background: var(--bg-hover);
}
.playground-tab.active {
color: var(--accent-color);
border-bottom-color: var(--accent-color);
background: var(--bg-secondary);
}
.playground-content {
flex: 1;
padding: 1.5rem;
overflow: auto;
}
.code-editor {
width: 100%;
height: 400px;
border: 1px solid var(--border-color);
border-radius: 6px;
background: var(--bg-code);
color: var(--text-primary);
font-family: "Fira Code", monospace;
font-size: 0.875rem;
padding: 1rem;
resize: vertical;
line-height: 1.5;
}
.output-panel {
background: var(--bg-code);
border: 1px solid var(--border-color);
border-radius: 6px;
padding: 1rem;
font-family: "Fira Code", monospace;
font-size: 0.875rem;
line-height: 1.5;
color: var(--text-primary);
white-space: pre-wrap;
overflow: auto;
max-height: 400px;
}
.conversion-preview {
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
border-radius: 6px;
padding: 1rem;
margin-top: 1rem;
}
.preview-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.5rem 0;
border-bottom: 1px solid var(--border-color);
}
.preview-item:last-child {
border-bottom: none;
}
.preview-input {
font-family: "Fira Code", monospace;
color: var(--text-secondary);
font-size: 0.875rem;
}
.preview-output {
font-family: "Fira Code", monospace;
color: var(--text-primary);
font-size: 0.875rem;
font-weight: 500;
}
.performance-monitor {
grid-area: results;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 1.5rem;
box-shadow: var(--shadow-sm);
}
.monitor-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
margin-top: 1rem;
}
.monitor-card {
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 1rem;
text-align: center;
}
.monitor-value {
font-size: 1.5rem;
font-weight: bold;
color: var(--accent-color);
margin-bottom: 0.5rem;
}
.monitor-label {
color: var(--text-secondary);
font-size: 0.875rem;
}
.status-indicator {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 0.5rem;
}
.status-indicator.success {
background: var(--success-color);
}
.status-indicator.warning {
background: var(--warning-color);
}
.status-indicator.error {
background: var(--error-color);
}
.error-message {
background: var(--error-bg);
color: var(--error-text);
border: 1px solid var(--error-border);
border-radius: 6px;
padding: 1rem;
margin: 1rem 0;
}
.success-message {
background: var(--success-bg);
color: var(--success-text);
border: 1px solid var(--success-border);
border-radius: 6px;
padding: 1rem;
margin: 1rem 0;
}
.loading-spinner {
display: inline-block;
width: 16px;
height: 16px;
border: 2px solid var(--border-color);
border-top: 2px solid var(--accent-color);
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.history-panel {
max-height: 300px;
overflow-y: auto;
border: 1px solid var(--border-color);
border-radius: 6px;
background: var(--bg-tertiary);
}
.history-item {
padding: 0.75rem 1rem;
border-bottom: 1px solid var(--border-color);
cursor: pointer;
transition: background 0.2s ease;
}
.history-item:hover {
background: var(--bg-hover);
}
.history-item:last-child {
border-bottom: none;
}
.history-input {
font-family: "Fira Code", monospace;
font-size: 0.875rem;
color: var(--text-primary);
margin-bottom: 0.25rem;
}
.history-meta {
font-size: 0.75rem;
color: var(--text-secondary);
}
@media (max-width: 1024px) {
.interactive-container {
grid-template-areas:
"header"
"controls"
"playground"
"results";
grid-template-columns: 1fr;
padding: 1rem;
}
.playground-controls {
height: auto;
}
.scheme-buttons {
grid-template-columns: 1fr;
}
.monitor-grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 640px) {
.playground-tabs {
overflow-x: auto;
}
.playground-tab {
padding: 0.75rem 1rem;
white-space: nowrap;
}
.code-editor {
height: 300px;
}
.monitor-grid {
grid-template-columns: 1fr;
}
.action-buttons {
gap: 0.5rem;
}
}

472
demo/styles/main.css Normal file
View File

@ -0,0 +1,472 @@
/* Owen Animation System Demo - Main Styles */
/* CSS Variables for consistent theming */
:root {
--primary-color: #2563eb;
--primary-hover: #1d4ed8;
--secondary-color: #64748b;
--accent-color: #0ea5e9;
--success-color: #10b981;
--warning-color: #f59e0b;
--error-color: #ef4444;
--bg-primary: #ffffff;
--bg-secondary: #f8fafc;
--bg-tertiary: #f1f5f9;
--text-primary: #1e293b;
--text-secondary: #475569;
--text-muted: #94a3b8;
--border-color: #e2e8f0;
--border-radius: 8px;
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
--font-family:
"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
--font-mono:
"JetBrains Mono", "Fira Code", Consolas, "Courier New", monospace;
}
/* Dark mode variables */
@media (prefers-color-scheme: dark) {
:root {
--bg-primary: #0f172a;
--bg-secondary: #1e293b;
--bg-tertiary: #334155;
--text-primary: #f1f5f9;
--text-secondary: #cbd5e1;
--text-muted: #64748b;
--border-color: #334155;
}
}
/* Reset and base styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: var(--font-family);
line-height: 1.6;
color: var(--text-primary);
background-color: var(--bg-primary);
transition: background-color 0.3s ease;
}
/* Container */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 1rem;
}
/* Header */
.demo-header {
background: var(--bg-secondary);
border-bottom: 1px solid var(--border-color);
padding: 1rem 0;
position: sticky;
top: 0;
z-index: 100;
}
.demo-header .container {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
display: flex;
flex-direction: column;
line-height: 1.2;
}
.logo-text {
font-size: 1.5rem;
font-weight: 700;
color: var(--primary-color);
}
.logo-subtitle {
font-size: 0.875rem;
color: var(--text-secondary);
font-weight: 500;
}
.demo-nav {
display: flex;
gap: 2rem;
}
.nav-link {
text-decoration: none;
color: var(--text-secondary);
font-weight: 500;
padding: 0.5rem 1rem;
border-radius: var(--border-radius);
transition: all 0.2s ease;
}
.nav-link:hover {
color: var(--primary-color);
background-color: var(--bg-tertiary);
}
.nav-link.active {
color: var(--primary-color);
background-color: var(--primary-color);
color: white;
}
/* Buttons */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.75rem 1.5rem;
font-size: 0.875rem;
font-weight: 500;
border: none;
border-radius: var(--border-radius);
cursor: pointer;
text-decoration: none;
transition: all 0.2s ease;
gap: 0.5rem;
}
.btn-primary {
background-color: var(--primary-color);
color: white;
}
.btn-primary:hover {
background-color: var(--primary-hover);
}
.btn-secondary {
background-color: var(--bg-tertiary);
color: var(--text-primary);
border: 1px solid var(--border-color);
}
.btn-secondary:hover {
background-color: var(--bg-secondary);
}
.btn-small {
padding: 0.5rem 1rem;
font-size: 0.8rem;
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* Form elements */
input,
select,
textarea {
width: 100%;
padding: 0.75rem;
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
background-color: var(--bg-primary);
color: var(--text-primary);
font-size: 0.875rem;
transition: border-color 0.2s ease;
}
input:focus,
select:focus,
textarea:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}
label {
display: block;
margin-bottom: 0.5rem;
font-weight: 500;
color: var(--text-secondary);
}
/* Cards */
.card {
background: var(--bg-primary);
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
padding: 1.5rem;
box-shadow: var(--shadow-sm);
}
/* Grid layouts */
.grid {
display: grid;
gap: 1.5rem;
}
.grid-2 {
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.grid-3 {
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.grid-4 {
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
/* Code blocks */
pre {
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
padding: 1rem;
overflow-x: auto;
font-family: var(--font-mono);
font-size: 0.875rem;
line-height: 1.5;
}
code {
font-family: var(--font-mono);
font-size: 0.875rem;
background: var(--bg-tertiary);
padding: 0.125rem 0.25rem;
border-radius: 0.25rem;
}
pre code {
background: none;
padding: 0;
}
/* Utility classes */
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.mb-1 {
margin-bottom: 0.25rem;
}
.mb-2 {
margin-bottom: 0.5rem;
}
.mb-3 {
margin-bottom: 1rem;
}
.mb-4 {
margin-bottom: 1.5rem;
}
.mb-5 {
margin-bottom: 2rem;
}
.mt-1 {
margin-top: 0.25rem;
}
.mt-2 {
margin-top: 0.5rem;
}
.mt-3 {
margin-top: 1rem;
}
.mt-4 {
margin-top: 1.5rem;
}
.mt-5 {
margin-top: 2rem;
}
.p-1 {
padding: 0.25rem;
}
.p-2 {
padding: 0.5rem;
}
.p-3 {
padding: 1rem;
}
.p-4 {
padding: 1.5rem;
}
.p-5 {
padding: 2rem;
}
.hidden {
display: none;
}
.visible {
display: block;
}
/* Animation classes */
.fade-in {
animation: fadeIn 0.3s ease-in-out;
}
.slide-up {
animation: slideUp 0.3s ease-out;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Loading spinner */
.spinner {
width: 24px;
height: 24px;
border: 2px solid var(--border-color);
border-top: 2px solid var(--primary-color);
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/* Progress bar */
.progress-bar {
width: 100%;
height: 8px;
background-color: var(--bg-tertiary);
border-radius: 4px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background-color: var(--primary-color);
transition: width 0.3s ease;
width: 0%;
}
/* Footer */
.demo-footer {
background: var(--bg-secondary);
border-top: 1px solid var(--border-color);
padding: 2rem 0;
margin-top: 4rem;
}
.footer-content {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 2rem;
margin-bottom: 2rem;
}
.footer-section h4 {
color: var(--text-primary);
margin-bottom: 1rem;
font-size: 1rem;
}
.footer-section ul {
list-style: none;
padding: 0;
}
.footer-section li {
margin-bottom: 0.5rem;
}
.footer-section a {
color: var(--text-secondary);
text-decoration: none;
transition: color 0.2s ease;
}
.footer-section a:hover {
color: var(--primary-color);
}
.footer-bottom {
text-align: center;
padding-top: 2rem;
border-top: 1px solid var(--border-color);
color: var(--text-muted);
font-size: 0.875rem;
}
/* Responsive design */
@media (max-width: 768px) {
.container {
padding: 0 0.75rem;
}
.demo-header .container {
flex-direction: column;
gap: 1rem;
}
.demo-nav {
gap: 1rem;
}
.grid-2,
.grid-3,
.grid-4 {
grid-template-columns: 1fr;
}
.btn {
width: 100%;
justify-content: center;
}
}
@media (max-width: 480px) {
.demo-nav {
flex-wrap: wrap;
gap: 0.5rem;
}
.nav-link {
padding: 0.375rem 0.75rem;
font-size: 0.875rem;
}
.footer-content {
grid-template-columns: 1fr;
gap: 1.5rem;
}
}