1.1 changes

This commit is contained in:
buenosairesam
2025-12-29 14:17:53 -03:00
parent 11fde0636f
commit c5546cf7fc
58 changed files with 1048 additions and 496 deletions

View File

@@ -1,6 +1,6 @@
# Pawprint Wrapper - Development Tools Sidebar
# Soleprint Wrapper - Development Tools Sidebar
A collapsible sidebar that provides development and testing tools for any pawprint-managed nest (like amar) without interfering with the managed application.
A collapsible sidebar that provides development and testing tools for any soleprint-managed room (like amar) without interfering with the managed application.
## Features
@@ -12,7 +12,7 @@ A collapsible sidebar that provides development and testing tools for any pawpri
### 🌍 Environment Info
- Display backend and frontend URLs
- Nest name and deployment info
- Room name and deployment info
- Quick reference during development
### ⌨️ Keyboard Shortcuts
@@ -40,7 +40,7 @@ wrapper/
Open `index.html` in your browser to see the sidebar in action:
```bash
cd core_nest/wrapper
cd core_room/wrapper
python3 -m http.server 8080
# Open http://localhost:8080
```
@@ -68,7 +68,7 @@ Edit `config.json` to customize:
```json
{
"nest_name": "amar",
"room_name": "amar",
"wrapper": {
"enabled": true,
"environment": {
@@ -208,10 +208,10 @@ getSidebarHTML() {
### Add New Features
Extend the `PawprintSidebar` class in `sidebar.js`:
Extend the `SoleprintSidebar` class in `sidebar.js`:
```javascript
class PawprintSidebar {
class SoleprintSidebar {
async fetchJiraInfo() {
const response = await fetch('https://artery.mcrn.ar/jira/VET-123');
const data = await response.json();
@@ -294,8 +294,8 @@ Planned features (see `../WRAPPER_DESIGN.md`):
## Related Documentation
- `../WRAPPER_DESIGN.md` - Complete architecture design
- `../../../pawprint/CLAUDE.md` - Pawprint framework overview
- `../../README.md` - Core nest documentation
- `../../../soleprint/CLAUDE.md` - Soleprint framework overview
- `../../README.md` - Core room documentation
## Contributing
@@ -303,9 +303,9 @@ To add a new panel or feature:
1. Add HTML in `getSidebarHTML()`
2. Add styling in `sidebar.css`
3. Add logic as methods on `PawprintSidebar` class
3. Add logic as methods on `SoleprintSidebar` class
4. Update this README with usage instructions
## License
Part of the Pawprint development tools ecosystem.
Part of the Soleprint development tools ecosystem.

View File

@@ -1,5 +1,5 @@
{
"nest_name": "amar",
"room_name": "amar",
"wrapper": {
"enabled": true,
"environment": {

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pawprint Wrapper - Demo</title>
<title>Soleprint Wrapper - Demo</title>
<link rel="stylesheet" href="sidebar.css">
<style>
/* Demo page styles */
@@ -19,7 +19,7 @@
transition: margin-right 0.3s ease;
}
#pawprint-sidebar.expanded ~ #demo-content {
#soleprint-sidebar.expanded ~ #demo-content {
margin-right: var(--sidebar-width);
}
@@ -105,14 +105,14 @@
<div id="demo-content">
<div class="demo-header">
<h1>🐾 Pawprint Wrapper</h1>
<p>Development tools sidebar for any pawprint-managed nest</p>
<h1>🐾 Soleprint Wrapper</h1>
<p>Development tools sidebar for any soleprint-managed room</p>
</div>
<div class="demo-section">
<h2>👋 Quick Start</h2>
<p>
This is a standalone demo of the Pawprint Wrapper sidebar.
This is a standalone demo of the Soleprint Wrapper sidebar.
Click the toggle button on the right edge of the screen, or press
<span class="kbd">Ctrl</span> + <span class="kbd">Shift</span> + <span class="kbd">P</span>
to open the sidebar.
@@ -156,7 +156,7 @@
<ul>
<li><code>sidebar.css</code> - Visual styling (dark theme, animations)</li>
<li><code>sidebar.js</code> - Logic (login, logout, toggle, state management)</li>
<li><code>config.json</code> - Configuration (users, URLs, nest info)</li>
<li><code>config.json</code> - Configuration (users, URLs, room info)</li>
</ul>
<p style="margin-top: 16px;">
To integrate with your app, simply include these in your HTML:
@@ -184,7 +184,7 @@
<div class="demo-section">
<h2>📚 Documentation</h2>
<p>
See <code>WRAPPER_DESIGN.md</code> in <code>core_nest/</code> for the complete
See <code>WRAPPER_DESIGN.md</code> in <code>core_room/</code> for the complete
architecture design, including Docker integration patterns and alternative approaches.
</p>
</div>

View File

@@ -1,4 +1,4 @@
/* Pawprint Wrapper - Sidebar Styles */
/* Soleprint Wrapper - Sidebar Styles */
:root {
--sidebar-width: 320px;
@@ -26,7 +26,7 @@ body {
}
/* Sidebar Container */
#pawprint-sidebar {
#soleprint-sidebar {
position: fixed;
right: 0;
top: 0;
@@ -44,7 +44,7 @@ body {
flex-direction: column;
}
#pawprint-sidebar.expanded {
#soleprint-sidebar.expanded {
transform: translateX(0);
}
@@ -76,7 +76,7 @@ body {
transition: transform 0.3s;
}
#pawprint-sidebar.expanded ~ #sidebar-toggle .icon {
#soleprint-sidebar.expanded ~ #sidebar-toggle .icon {
transform: scaleX(-1);
}
@@ -94,7 +94,7 @@ body {
color: var(--sidebar-accent);
}
.sidebar-header .nest-name {
.sidebar-header .room-name {
font-size: 12px;
opacity: 0.7;
text-transform: uppercase;
@@ -262,20 +262,20 @@ body {
}
/* Scrollbar */
#pawprint-sidebar::-webkit-scrollbar {
#soleprint-sidebar::-webkit-scrollbar {
width: 8px;
}
#pawprint-sidebar::-webkit-scrollbar-track {
#soleprint-sidebar::-webkit-scrollbar-track {
background: #1a1a1a;
}
#pawprint-sidebar::-webkit-scrollbar-thumb {
#soleprint-sidebar::-webkit-scrollbar-thumb {
background: #444;
border-radius: 4px;
}
#pawprint-sidebar::-webkit-scrollbar-thumb:hover {
#soleprint-sidebar::-webkit-scrollbar-thumb:hover {
background: #555;
}
@@ -290,7 +290,7 @@ body {
/* Responsive */
@media (max-width: 768px) {
#pawprint-sidebar {
#soleprint-sidebar {
width: 100%;
}
}

View File

@@ -1,6 +1,6 @@
// Pawprint Wrapper - Sidebar Logic
// Soleprint Wrapper - Sidebar Logic
class PawprintSidebar {
class SoleprintSidebar {
constructor() {
this.config = null;
this.currentUser = null;
@@ -30,12 +30,12 @@ class PawprintSidebar {
try {
const response = await fetch('/wrapper/config.json');
this.config = await response.json();
console.log('[Pawprint] Config loaded:', this.config.nest_name);
console.log('[Soleprint] Config loaded:', this.config.room_name);
} catch (error) {
console.error('[Pawprint] Failed to load config:', error);
console.error('[Soleprint] Failed to load config:', error);
// Use default config
this.config = {
nest_name: 'default',
room_name: 'default',
wrapper: {
environment: {
backend_url: 'http://localhost:8000',
@@ -49,7 +49,7 @@ class PawprintSidebar {
createSidebar() {
const sidebar = document.createElement('div');
sidebar.id = 'pawprint-sidebar';
sidebar.id = 'soleprint-sidebar';
sidebar.innerHTML = this.getSidebarHTML();
document.body.appendChild(sidebar);
this.sidebar = sidebar;
@@ -59,7 +59,7 @@ class PawprintSidebar {
const button = document.createElement('button');
button.id = 'sidebar-toggle';
button.innerHTML = '<span class="icon">◀</span>';
button.title = 'Toggle Pawprint Sidebar (Ctrl+Shift+P)';
button.title = 'Toggle Soleprint Sidebar (Ctrl+Shift+P)';
document.body.appendChild(button);
this.toggleBtn = button;
}
@@ -69,8 +69,8 @@ class PawprintSidebar {
return `
<div class="sidebar-header">
<h2>🐾 Pawprint</h2>
<div class="nest-name">${this.config.nest_name}</div>
<h2>🐾 Soleprint</h2>
<div class="room-name">${this.config.room_name}</div>
</div>
<div class="sidebar-content">
@@ -83,7 +83,7 @@ class PawprintSidebar {
<div id="current-user-display" style="display: none;">
<div class="current-user">
Logged in as: <strong id="current-username"></strong>
<button class="logout-btn" onclick="pawprintSidebar.logout()">
<button class="logout-btn" onclick="soleprintSidebar.logout()">
Logout
</button>
</div>
@@ -91,7 +91,7 @@ class PawprintSidebar {
<div class="user-cards">
${users.map(user => `
<div class="user-card" data-user-id="${user.id}" onclick="pawprintSidebar.loginAs('${user.id}')">
<div class="user-card" data-user-id="${user.id}" onclick="soleprintSidebar.loginAs('${user.id}')">
<div class="icon">${user.icon}</div>
<div class="info">
<span class="label">${user.label}</span>
@@ -119,7 +119,7 @@ class PawprintSidebar {
</div>
<div class="sidebar-footer">
Pawprint Dev Tools
Soleprint Dev Tools
</div>
`;
}
@@ -144,11 +144,11 @@ class PawprintSidebar {
saveSidebarState() {
const isExpanded = this.sidebar.classList.contains('expanded');
localStorage.setItem('pawprint_sidebar_expanded', isExpanded);
localStorage.setItem('soleprint_sidebar_expanded', isExpanded);
}
loadSidebarState() {
const isExpanded = localStorage.getItem('pawprint_sidebar_expanded') === 'true';
const isExpanded = localStorage.getItem('soleprint_sidebar_expanded') === 'true';
if (isExpanded) {
this.sidebar.classList.add('expanded');
}
@@ -214,7 +214,7 @@ class PawprintSidebar {
}, 1000);
} catch (error) {
console.error('[Pawprint] Login error:', error);
console.error('[Soleprint] Login error:', error);
this.showStatus(`✗ Login failed: ${error.message}`, 'error');
}
}
@@ -241,7 +241,7 @@ class PawprintSidebar {
this.currentUser = JSON.parse(userInfo);
this.updateCurrentUserDisplay();
} catch (error) {
console.error('[Pawprint] Failed to parse user info:', error);
console.error('[Soleprint] Failed to parse user info:', error);
}
}
}
@@ -275,12 +275,12 @@ class PawprintSidebar {
}
// Initialize sidebar when DOM is ready
const pawprintSidebar = new PawprintSidebar();
const soleprintSidebar = new SoleprintSidebar();
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', () => pawprintSidebar.init());
document.addEventListener('DOMContentLoaded', () => soleprintSidebar.init());
} else {
pawprintSidebar.init();
soleprintSidebar.init();
}
console.log('[Pawprint] Sidebar script loaded');
console.log('[Soleprint] Sidebar script loaded');