@qwik.dev/devtools 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ const styles = ".devtools-container {\n position: fixed;\n bottom: 0;\n right: 0;\n z-index: 9999;\n font-family:\n system-ui,\n -apple-system,\n sans-serif;\n}\n\n.devtools-toggle {\n position: fixed;\n bottom: 16px;\n right: 16px;\n width: 36px;\n height: 36px;\n background: #18181b;\n border: 1px solid rgba(255, 255, 255, 0.1);\n border-radius: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n box-shadow:\n 0 4px 12px rgba(0, 0, 0, 0.15),\n inset 0 1px 1px rgba(255, 255, 255, 0.1);\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n transform-origin: center;\n overflow: hidden;\n backdrop-filter: blur(8px);\n animation: glow 2s ease-in-out infinite;\n}\n\n@keyframes glow {\n 0% {\n box-shadow:\n 0 4px 12px rgba(0, 0, 0, 0.15),\n inset 0 1px 1px rgba(255, 255, 255, 0.1);\n }\n 50% {\n box-shadow:\n 0 4px 12px rgba(0, 220, 130, 0.35),\n inset 0 1px 1px rgba(255, 255, 255, 0.1),\n 0 0 25px rgba(0, 220, 130, 0.25);\n border-color: rgba(0, 220, 130, 0.5);\n }\n 100% {\n box-shadow:\n 0 4px 12px rgba(0, 0, 0, 0.15),\n inset 0 1px 1px rgba(255, 255, 255, 0.1);\n }\n}\n\n.devtools-toggle:hover {\n transform: scale(1.05);\n box-shadow:\n 0 6px 16px rgba(0, 220, 130, 0.4),\n inset 0 1px 1px rgba(255, 255, 255, 0.15),\n 0 0 30px rgba(0, 220, 130, 0.3);\n border-color: rgba(0, 220, 130, 0.6);\n background: #1c1c1f;\n animation: none;\n}\n\n.devtools-toggle:active {\n transform: scale(0.98);\n box-shadow:\n 0 2px 8px rgba(0, 0, 0, 0.15),\n inset 0 1px 1px rgba(255, 255, 255, 0.1);\n animation: none;\n}\n\n.devtools-toggle.is-open {\n transform: rotate(90deg);\n background: #1c1c1f;\n animation: none;\n border-color: rgba(0, 220, 130, 0.5);\n box-shadow:\n 0 4px 12px rgba(0, 220, 130, 0.35),\n inset 0 1px 1px rgba(255, 255, 255, 0.1),\n 0 0 25px rgba(0, 220, 130, 0.25);\n}\n\n.devtools-toggle.is-open:hover {\n transform: rotate(90deg) scale(1.05);\n box-shadow:\n 0 6px 16px rgba(0, 220, 130, 0.4),\n inset 0 1px 1px rgba(255, 255, 255, 0.15),\n 0 0 30px rgba(0, 220, 130, 0.3);\n}\n\n.devtools-panel {\n position: fixed;\n bottom: 0;\n right: 0;\n width: 100%;\n height: 50vh;\n background: #18181b;\n border-top: 1px solid rgba(255, 255, 255, 0.1);\n color: #fff;\n box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);\n display: flex;\n transform: translateY(100%);\n transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n backdrop-filter: blur(16px);\n}\n\n.devtools-open .devtools-panel {\n transform: translateY(0);\n}\n\n@media (min-width: 640px) {\n .devtools-panel {\n width: 60%;\n right: 0;\n }\n}\n\n.devtools-header {\n padding: 12px;\n border-bottom: 1px solid #27272a;\n}\n\n.devtools-tabs {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 12px;\n border-right: 1px solid #27272a;\n background: #1c1c1f;\n}\n\n.devtools-tabs button {\n padding: 4px;\n background: transparent;\n border: none;\n color: #a1a1aa;\n cursor: pointer;\n border-radius: 6px;\n transition: all 0.2s ease;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n}\n\n.devtools-tabs button:hover {\n background: #27272a;\n color: #fff;\n}\n\n.devtools-tabs button.tab-active {\n background: #3b82f6;\n color: white;\n}\n\n.devtools-content {\n padding: 16px;\n height: 100%;\n overflow-y: auto;\n flex: 1;\n}\n\n.tab-content h3 {\n margin: 0 0 16px 0;\n font-size: 18px;\n font-weight: 600;\n}\n\n.info-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\n gap: 16px;\n}\n\n.info-item {\n background: #27272a;\n padding: 12px;\n border-radius: 8px;\n}\n\n.info-label {\n display: block;\n color: #a1a1aa;\n font-size: 12px;\n margin-bottom: 4px;\n}\n\n.info-value {\n font-size: 14px;\n font-weight: 500;\n}\n\n/* Asset specific styles */\n.assets-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));\n gap: 1.25rem;\n margin-top: 1.5rem;\n padding: 0.5rem;\n}\n\n.asset-card {\n background: rgba(255, 255, 255, 0.03);\n border: 1px solid rgba(255, 255, 255, 0.08);\n border-radius: 8px;\n overflow: hidden;\n transition: all 0.2s ease;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n}\n\n.asset-card:hover {\n transform: translateY(-2px);\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\n border-color: rgba(255, 255, 255, 0.15);\n}\n\n.asset-preview {\n height: 120px;\n background: rgba(0, 0, 0, 0.3);\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n border-bottom: 1px solid rgba(255, 255, 255, 0.08);\n}\n\n.asset-preview img {\n width: 70%;\n height: 70%;\n object-fit: contain;\n padding: 0.5rem;\n}\n\n.file-preview {\n height: 120px;\n background: rgba(0, 0, 0, 0.2);\n display: flex;\n align-items: center;\n justify-content: center;\n border-bottom: 1px solid rgba(255, 255, 255, 0.08);\n}\n\n.file-ext {\n font-size: 1.5rem;\n font-weight: 600;\n color: rgba(255, 255, 255, 0.7);\n text-transform: uppercase;\n text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n}\n\n.asset-info {\n padding: 0.75rem;\n background: rgba(0, 0, 0, 0.2);\n}\n\n.asset-path {\n color: #fff;\n font-size: 0.875rem;\n font-weight: 500;\n margin-bottom: 0.5rem;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.asset-meta {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 0.5rem;\n}\n\n.asset-size {\n color: #94a3b8;\n font-size: 0.75rem;\n}\n\n.asset-type {\n color: #94a3b8;\n font-size: 0.75rem;\n padding: 0.25rem 0.5rem;\n background: rgba(255, 255, 255, 0.1);\n border-radius: 4px;\n letter-spacing: 0.025em;\n}\n\n.tab-content.overview {\n padding: 1.5rem;\n}\n\n.metrics-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 1.25rem;\n margin-bottom: 2rem;\n}\n\n.metric-card {\n background: rgba(255, 255, 255, 0.03);\n border: 1px solid rgba(255, 255, 255, 0.1);\n border-radius: 12px;\n padding: 1.25rem;\n display: flex;\n align-items: center;\n gap: 1.25rem;\n transition: all 0.2s ease;\n}\n\n.metric-card:hover {\n background: rgba(255, 255, 255, 0.05);\n transform: translateY(-1px);\n}\n\n.metric-icon {\n background: rgba(255, 255, 255, 0.05);\n border: 1px solid rgba(255, 255, 255, 0.1);\n border-radius: 10px;\n padding: 0.875rem;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease;\n}\n\n.metric-card:hover .metric-icon {\n background: rgba(255, 255, 255, 0.08);\n}\n\n.icon {\n width: 1.5rem;\n height: 1.5rem;\n color: #10b981;\n}\n\n.metric-content {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n}\n\n.metric-value {\n font-size: 1.75rem;\n font-weight: 600;\n color: #fff;\n line-height: 1.2;\n}\n\n.metric-label {\n color: #94a3b8;\n font-size: 0.875rem;\n font-weight: 500;\n letter-spacing: 0.01em;\n}\n\n.performance-section {\n background: rgba(255, 255, 255, 0.03);\n border: 1px solid rgba(255, 255, 255, 0.1);\n border-radius: 12px;\n padding: 1.25rem;\n}\n\n.performance-section h3 {\n margin: 0 0 1.25rem 0;\n font-size: 1rem;\n font-weight: 600;\n color: #fff;\n letter-spacing: 0.01em;\n}\n\n.performance-metrics {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n}\n\n.perf-item {\n display: flex;\n justify-content: space-between;\n color: #94a3b8;\n font-size: 0.875rem;\n padding: 0.5rem 0;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n}\n\n.perf-item:last-child {\n border-bottom: none;\n}\n\n.perf-value {\n color: #fff;\n font-weight: 500;\n}\n\n.header-section {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 2rem;\n padding-bottom: 1.5rem;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n}\n\n.title-container {\n display: flex;\n align-items: center;\n gap: 0.75rem;\n}\n\n.qwik-logo {\n width: 2rem;\n height: 2rem;\n}\n\n.title-container h1 {\n font-size: 1.5rem;\n font-weight: 600;\n color: #fff;\n margin: 0;\n}\n\n.version {\n font-size: 0.875rem;\n color: #94a3b8;\n font-weight: 500;\n padding: 0.25rem 0.75rem;\n background: rgba(255, 255, 255, 0.05);\n border-radius: 9999px;\n border: 1px solid rgba(255, 255, 255, 0.1);\n}\n\n.packages-section {\n background: rgba(255, 255, 255, 0.03);\n border: 1px solid rgba(255, 255, 255, 0.1);\n border-radius: 12px;\n padding: 1.25rem;\n margin-bottom: 1.25rem;\n}\n\n.packages-section h3 {\n margin: 0 0 1.25rem 0;\n font-size: 1rem;\n font-weight: 600;\n color: #fff;\n letter-spacing: 0.01em;\n}\n\n.packages-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n gap: 0.75rem;\n}\n\n.package-item {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0.75rem 1rem;\n background: rgba(255, 255, 255, 0.05);\n border-radius: 8px;\n transition: all 0.2s ease;\n}\n\n.package-item:hover {\n background: rgba(255, 255, 255, 0.08);\n}\n\n.package-name {\n color: #fff;\n font-size: 0.875rem;\n font-weight: 500;\n}\n\n.package-version {\n color: #94a3b8;\n font-size: 0.75rem;\n font-weight: 500;\n padding: 0.25rem 0.5rem;\n background: rgba(255, 255, 255, 0.05);\n border-radius: 9999px;\n border: 1px solid rgba(255, 255, 255, 0.1);\n}\n\n.tab-content.assets {\n padding: 1.5rem;\n}\n\n.assets-stats {\n display: flex;\n gap: 1rem;\n}\n\n.stat-item {\n color: #94a3b8;\n font-size: 0.875rem;\n padding: 0.25rem 0.75rem;\n background: rgba(255, 255, 255, 0.05);\n border-radius: 9999px;\n border: 1px solid rgba(255, 255, 255, 0.1);\n}\n\n.routes-table {\n background: #18181b;\n border-radius: 8px;\n overflow: hidden;\n}\n\n.table-header {\n display: grid;\n grid-template-columns: 2fr 1fr 1fr 1fr;\n padding: 12px 16px;\n background: #27272a;\n font-weight: 500;\n border-bottom: 1px solid #3f3f46;\n}\n\n.table-row {\n display: grid;\n grid-template-columns: 2fr 1fr 1fr 1fr;\n padding: 12px 16px;\n border-bottom: 1px solid #27272a;\n align-items: center;\n}\n\n.table-row:hover {\n background: #27272a;\n}\n\n.active-route {\n background: #22c55e20;\n color: #22c55e;\n padding: 4px 8px;\n border-radius: 4px;\n}\n\n.col-route {\n font-family: monospace;\n}\n\n.custom-layout {\n color: #3b82f6;\n}\n\n.toggle-icon {\n width: 20px;\n height: 20px;\n transition: all 0.3s ease;\n filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));\n opacity: 0.9;\n}\n\n.devtools-toggle:hover .toggle-icon {\n transform: scale(1.1);\n filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));\n opacity: 1;\n}\n";
3
+ module.exports = styles;
@@ -0,0 +1,4 @@
1
+ const styles = ".devtools-container {\n position: fixed;\n bottom: 0;\n right: 0;\n z-index: 9999;\n font-family:\n system-ui,\n -apple-system,\n sans-serif;\n}\n\n.devtools-toggle {\n position: fixed;\n bottom: 16px;\n right: 16px;\n width: 36px;\n height: 36px;\n background: #18181b;\n border: 1px solid rgba(255, 255, 255, 0.1);\n border-radius: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n box-shadow:\n 0 4px 12px rgba(0, 0, 0, 0.15),\n inset 0 1px 1px rgba(255, 255, 255, 0.1);\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n transform-origin: center;\n overflow: hidden;\n backdrop-filter: blur(8px);\n animation: glow 2s ease-in-out infinite;\n}\n\n@keyframes glow {\n 0% {\n box-shadow:\n 0 4px 12px rgba(0, 0, 0, 0.15),\n inset 0 1px 1px rgba(255, 255, 255, 0.1);\n }\n 50% {\n box-shadow:\n 0 4px 12px rgba(0, 220, 130, 0.35),\n inset 0 1px 1px rgba(255, 255, 255, 0.1),\n 0 0 25px rgba(0, 220, 130, 0.25);\n border-color: rgba(0, 220, 130, 0.5);\n }\n 100% {\n box-shadow:\n 0 4px 12px rgba(0, 0, 0, 0.15),\n inset 0 1px 1px rgba(255, 255, 255, 0.1);\n }\n}\n\n.devtools-toggle:hover {\n transform: scale(1.05);\n box-shadow:\n 0 6px 16px rgba(0, 220, 130, 0.4),\n inset 0 1px 1px rgba(255, 255, 255, 0.15),\n 0 0 30px rgba(0, 220, 130, 0.3);\n border-color: rgba(0, 220, 130, 0.6);\n background: #1c1c1f;\n animation: none;\n}\n\n.devtools-toggle:active {\n transform: scale(0.98);\n box-shadow:\n 0 2px 8px rgba(0, 0, 0, 0.15),\n inset 0 1px 1px rgba(255, 255, 255, 0.1);\n animation: none;\n}\n\n.devtools-toggle.is-open {\n transform: rotate(90deg);\n background: #1c1c1f;\n animation: none;\n border-color: rgba(0, 220, 130, 0.5);\n box-shadow:\n 0 4px 12px rgba(0, 220, 130, 0.35),\n inset 0 1px 1px rgba(255, 255, 255, 0.1),\n 0 0 25px rgba(0, 220, 130, 0.25);\n}\n\n.devtools-toggle.is-open:hover {\n transform: rotate(90deg) scale(1.05);\n box-shadow:\n 0 6px 16px rgba(0, 220, 130, 0.4),\n inset 0 1px 1px rgba(255, 255, 255, 0.15),\n 0 0 30px rgba(0, 220, 130, 0.3);\n}\n\n.devtools-panel {\n position: fixed;\n bottom: 0;\n right: 0;\n width: 100%;\n height: 50vh;\n background: #18181b;\n border-top: 1px solid rgba(255, 255, 255, 0.1);\n color: #fff;\n box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);\n display: flex;\n transform: translateY(100%);\n transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n backdrop-filter: blur(16px);\n}\n\n.devtools-open .devtools-panel {\n transform: translateY(0);\n}\n\n@media (min-width: 640px) {\n .devtools-panel {\n width: 60%;\n right: 0;\n }\n}\n\n.devtools-header {\n padding: 12px;\n border-bottom: 1px solid #27272a;\n}\n\n.devtools-tabs {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 12px;\n border-right: 1px solid #27272a;\n background: #1c1c1f;\n}\n\n.devtools-tabs button {\n padding: 4px;\n background: transparent;\n border: none;\n color: #a1a1aa;\n cursor: pointer;\n border-radius: 6px;\n transition: all 0.2s ease;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n}\n\n.devtools-tabs button:hover {\n background: #27272a;\n color: #fff;\n}\n\n.devtools-tabs button.tab-active {\n background: #3b82f6;\n color: white;\n}\n\n.devtools-content {\n padding: 16px;\n height: 100%;\n overflow-y: auto;\n flex: 1;\n}\n\n.tab-content h3 {\n margin: 0 0 16px 0;\n font-size: 18px;\n font-weight: 600;\n}\n\n.info-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\n gap: 16px;\n}\n\n.info-item {\n background: #27272a;\n padding: 12px;\n border-radius: 8px;\n}\n\n.info-label {\n display: block;\n color: #a1a1aa;\n font-size: 12px;\n margin-bottom: 4px;\n}\n\n.info-value {\n font-size: 14px;\n font-weight: 500;\n}\n\n/* Asset specific styles */\n.assets-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));\n gap: 1.25rem;\n margin-top: 1.5rem;\n padding: 0.5rem;\n}\n\n.asset-card {\n background: rgba(255, 255, 255, 0.03);\n border: 1px solid rgba(255, 255, 255, 0.08);\n border-radius: 8px;\n overflow: hidden;\n transition: all 0.2s ease;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n}\n\n.asset-card:hover {\n transform: translateY(-2px);\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\n border-color: rgba(255, 255, 255, 0.15);\n}\n\n.asset-preview {\n height: 120px;\n background: rgba(0, 0, 0, 0.3);\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n border-bottom: 1px solid rgba(255, 255, 255, 0.08);\n}\n\n.asset-preview img {\n width: 70%;\n height: 70%;\n object-fit: contain;\n padding: 0.5rem;\n}\n\n.file-preview {\n height: 120px;\n background: rgba(0, 0, 0, 0.2);\n display: flex;\n align-items: center;\n justify-content: center;\n border-bottom: 1px solid rgba(255, 255, 255, 0.08);\n}\n\n.file-ext {\n font-size: 1.5rem;\n font-weight: 600;\n color: rgba(255, 255, 255, 0.7);\n text-transform: uppercase;\n text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n}\n\n.asset-info {\n padding: 0.75rem;\n background: rgba(0, 0, 0, 0.2);\n}\n\n.asset-path {\n color: #fff;\n font-size: 0.875rem;\n font-weight: 500;\n margin-bottom: 0.5rem;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.asset-meta {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 0.5rem;\n}\n\n.asset-size {\n color: #94a3b8;\n font-size: 0.75rem;\n}\n\n.asset-type {\n color: #94a3b8;\n font-size: 0.75rem;\n padding: 0.25rem 0.5rem;\n background: rgba(255, 255, 255, 0.1);\n border-radius: 4px;\n letter-spacing: 0.025em;\n}\n\n.tab-content.overview {\n padding: 1.5rem;\n}\n\n.metrics-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 1.25rem;\n margin-bottom: 2rem;\n}\n\n.metric-card {\n background: rgba(255, 255, 255, 0.03);\n border: 1px solid rgba(255, 255, 255, 0.1);\n border-radius: 12px;\n padding: 1.25rem;\n display: flex;\n align-items: center;\n gap: 1.25rem;\n transition: all 0.2s ease;\n}\n\n.metric-card:hover {\n background: rgba(255, 255, 255, 0.05);\n transform: translateY(-1px);\n}\n\n.metric-icon {\n background: rgba(255, 255, 255, 0.05);\n border: 1px solid rgba(255, 255, 255, 0.1);\n border-radius: 10px;\n padding: 0.875rem;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease;\n}\n\n.metric-card:hover .metric-icon {\n background: rgba(255, 255, 255, 0.08);\n}\n\n.icon {\n width: 1.5rem;\n height: 1.5rem;\n color: #10b981;\n}\n\n.metric-content {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n}\n\n.metric-value {\n font-size: 1.75rem;\n font-weight: 600;\n color: #fff;\n line-height: 1.2;\n}\n\n.metric-label {\n color: #94a3b8;\n font-size: 0.875rem;\n font-weight: 500;\n letter-spacing: 0.01em;\n}\n\n.performance-section {\n background: rgba(255, 255, 255, 0.03);\n border: 1px solid rgba(255, 255, 255, 0.1);\n border-radius: 12px;\n padding: 1.25rem;\n}\n\n.performance-section h3 {\n margin: 0 0 1.25rem 0;\n font-size: 1rem;\n font-weight: 600;\n color: #fff;\n letter-spacing: 0.01em;\n}\n\n.performance-metrics {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n}\n\n.perf-item {\n display: flex;\n justify-content: space-between;\n color: #94a3b8;\n font-size: 0.875rem;\n padding: 0.5rem 0;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n}\n\n.perf-item:last-child {\n border-bottom: none;\n}\n\n.perf-value {\n color: #fff;\n font-weight: 500;\n}\n\n.header-section {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 2rem;\n padding-bottom: 1.5rem;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n}\n\n.title-container {\n display: flex;\n align-items: center;\n gap: 0.75rem;\n}\n\n.qwik-logo {\n width: 2rem;\n height: 2rem;\n}\n\n.title-container h1 {\n font-size: 1.5rem;\n font-weight: 600;\n color: #fff;\n margin: 0;\n}\n\n.version {\n font-size: 0.875rem;\n color: #94a3b8;\n font-weight: 500;\n padding: 0.25rem 0.75rem;\n background: rgba(255, 255, 255, 0.05);\n border-radius: 9999px;\n border: 1px solid rgba(255, 255, 255, 0.1);\n}\n\n.packages-section {\n background: rgba(255, 255, 255, 0.03);\n border: 1px solid rgba(255, 255, 255, 0.1);\n border-radius: 12px;\n padding: 1.25rem;\n margin-bottom: 1.25rem;\n}\n\n.packages-section h3 {\n margin: 0 0 1.25rem 0;\n font-size: 1rem;\n font-weight: 600;\n color: #fff;\n letter-spacing: 0.01em;\n}\n\n.packages-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n gap: 0.75rem;\n}\n\n.package-item {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0.75rem 1rem;\n background: rgba(255, 255, 255, 0.05);\n border-radius: 8px;\n transition: all 0.2s ease;\n}\n\n.package-item:hover {\n background: rgba(255, 255, 255, 0.08);\n}\n\n.package-name {\n color: #fff;\n font-size: 0.875rem;\n font-weight: 500;\n}\n\n.package-version {\n color: #94a3b8;\n font-size: 0.75rem;\n font-weight: 500;\n padding: 0.25rem 0.5rem;\n background: rgba(255, 255, 255, 0.05);\n border-radius: 9999px;\n border: 1px solid rgba(255, 255, 255, 0.1);\n}\n\n.tab-content.assets {\n padding: 1.5rem;\n}\n\n.assets-stats {\n display: flex;\n gap: 1rem;\n}\n\n.stat-item {\n color: #94a3b8;\n font-size: 0.875rem;\n padding: 0.25rem 0.75rem;\n background: rgba(255, 255, 255, 0.05);\n border-radius: 9999px;\n border: 1px solid rgba(255, 255, 255, 0.1);\n}\n\n.routes-table {\n background: #18181b;\n border-radius: 8px;\n overflow: hidden;\n}\n\n.table-header {\n display: grid;\n grid-template-columns: 2fr 1fr 1fr 1fr;\n padding: 12px 16px;\n background: #27272a;\n font-weight: 500;\n border-bottom: 1px solid #3f3f46;\n}\n\n.table-row {\n display: grid;\n grid-template-columns: 2fr 1fr 1fr 1fr;\n padding: 12px 16px;\n border-bottom: 1px solid #27272a;\n align-items: center;\n}\n\n.table-row:hover {\n background: #27272a;\n}\n\n.active-route {\n background: #22c55e20;\n color: #22c55e;\n padding: 4px 8px;\n border-radius: 4px;\n}\n\n.col-route {\n font-family: monospace;\n}\n\n.custom-layout {\n color: #3b82f6;\n}\n\n.toggle-icon {\n width: 20px;\n height: 20px;\n transition: all 0.3s ease;\n filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));\n opacity: 0.9;\n}\n\n.devtools-toggle:hover .toggle-icon {\n transform: scale(1.1);\n filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));\n opacity: 1;\n}\n";
2
+ export {
3
+ styles as default
4
+ };
@@ -0,0 +1,538 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("@qwik.dev/core/jsx-runtime");
4
+ const core = require("@qwik.dev/core");
5
+ const viteHotClient = require("vite-hot-client");
6
+ const heroicons = require("@qwikest/icons/heroicons");
7
+ const lucide = require("@qwikest/icons/lucide");
8
+ const client = require("./kit/client.qwik.cjs");
9
+ require("superjson");
10
+ require("birpc");
11
+ const context = require("./kit/context.qwik.cjs");
12
+ const dree = require("dree");
13
+ const devtools = require("./devtools.css.qwik.cjs");
14
+ const location = require("./utils/location.qwik.cjs");
15
+ function getClientRpcFunctions() {
16
+ return {
17
+ healthCheck: () => true
18
+ };
19
+ }
20
+ const QwikDevtools = core.component$(() => {
21
+ core.useStyles$(devtools);
22
+ const state = core.useStore({
23
+ isOpen: false,
24
+ activeTab: "overview",
25
+ npmPackages: [],
26
+ assets: [],
27
+ routes: void 0
28
+ });
29
+ const panelRef = core.useSignal();
30
+ const location$1 = location.getCurrentLocation();
31
+ core.useVisibleTask$(async ({ cleanup, track }) => {
32
+ const hot = await viteHotClient.tryCreateHotContext(void 0, [
33
+ "/"
34
+ ]);
35
+ if (!hot) {
36
+ throw new Error("Vite Hot Context not connected");
37
+ }
38
+ context.setViteClientContext(hot);
39
+ client.createClientRpc(getClientRpcFunctions());
40
+ track(() => {
41
+ if (state.isOpen) {
42
+ const rpc = context.getViteClientRpc();
43
+ rpc.getAssetsFromPublicDir().then((data) => {
44
+ state.assets = data;
45
+ });
46
+ rpc.getRoutes().then((data) => {
47
+ const children = data.children || [];
48
+ const directories = children.filter((child) => child.type === "directory");
49
+ const values = [
50
+ {
51
+ relativePath: "",
52
+ name: "index",
53
+ type: dree.Type.DIRECTORY,
54
+ path: "",
55
+ isSymbolicLink: false,
56
+ children: void 0
57
+ },
58
+ ...directories
59
+ ];
60
+ state.routes = core.noSerialize(values);
61
+ });
62
+ rpc.getQwikPackages().then((data) => {
63
+ state.npmPackages = data;
64
+ });
65
+ }
66
+ });
67
+ const handleKeyPress = (e) => {
68
+ if (e.key === "`" && e.metaKey) {
69
+ state.isOpen = !state.isOpen;
70
+ }
71
+ if (e.key === "Escape" && state.isOpen) {
72
+ state.isOpen = false;
73
+ }
74
+ };
75
+ const handleClickOutside = (e) => {
76
+ if (state.isOpen && panelRef.value && !panelRef.value.contains(e.target)) {
77
+ state.isOpen = false;
78
+ }
79
+ };
80
+ window.addEventListener("keydown", handleKeyPress);
81
+ window.addEventListener("mousedown", handleClickOutside);
82
+ cleanup(() => {
83
+ window.removeEventListener("keydown", handleKeyPress);
84
+ window.removeEventListener("mousedown", handleClickOutside);
85
+ });
86
+ });
87
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", {
88
+ class: {
89
+ "devtools-container": true,
90
+ "devtools-open": state.isOpen
91
+ },
92
+ children: [
93
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
94
+ class: {
95
+ "devtools-toggle": true,
96
+ "is-open": state.isOpen
97
+ },
98
+ onClick$: () => state.isOpen = !state.isOpen,
99
+ children: /* @__PURE__ */ jsxRuntime.jsx("img", {
100
+ width: 20,
101
+ height: 20,
102
+ src: "https://qwik.dev/logos/qwik-logo.svg",
103
+ alt: "Qwik Logo",
104
+ class: "toggle-icon"
105
+ })
106
+ }),
107
+ state.isOpen && /* @__PURE__ */ jsxRuntime.jsxs("div", {
108
+ ref: panelRef,
109
+ class: "devtools-panel",
110
+ children: [
111
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
112
+ class: "devtools-tabs",
113
+ children: [
114
+ /* @__PURE__ */ jsxRuntime.jsx("button", {
115
+ class: {
116
+ "tab-active": state.activeTab === "overview"
117
+ },
118
+ onClick$: () => state.activeTab = "overview",
119
+ title: "Overview",
120
+ children: /* @__PURE__ */ jsxRuntime.jsx(heroicons.HiBoltOutline, {
121
+ width: 20,
122
+ height: 20
123
+ })
124
+ }),
125
+ /* @__PURE__ */ jsxRuntime.jsx("button", {
126
+ class: {
127
+ "tab-active": state.activeTab === "components"
128
+ },
129
+ onClick$: () => state.activeTab = "components",
130
+ title: "Components",
131
+ children: /* @__PURE__ */ jsxRuntime.jsx(heroicons.HiCubeOutline, {
132
+ width: 20,
133
+ height: 20
134
+ })
135
+ }),
136
+ /* @__PURE__ */ jsxRuntime.jsx("button", {
137
+ class: {
138
+ "tab-active": state.activeTab === "routes"
139
+ },
140
+ onClick$: () => state.activeTab = "routes",
141
+ title: "Routes",
142
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucide.LuFolderTree, {
143
+ width: 20,
144
+ height: 20
145
+ })
146
+ }),
147
+ /* @__PURE__ */ jsxRuntime.jsx("button", {
148
+ class: {
149
+ "tab-active": state.activeTab === "state"
150
+ },
151
+ onClick$: () => state.activeTab = "state",
152
+ title: "State",
153
+ children: /* @__PURE__ */ jsxRuntime.jsxs("svg", {
154
+ width: "20",
155
+ height: "20",
156
+ viewBox: "0 0 24 24",
157
+ fill: "none",
158
+ xmlns: "http://www.w3.org/2000/svg",
159
+ children: [
160
+ /* @__PURE__ */ jsxRuntime.jsx("path", {
161
+ d: "M12 2a7 7 0 0 1 7 7c0 2.38-1.19 4.47-3 5.74V17a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-2.26C6.19 13.47 5 11.38 5 9a7 7 0 0 1 7-7zm0 2a5 5 0 0 0-5 5c0 2.05 1.23 3.81 3 4.58V16h4v-2.42c1.77-.77 3-2.53 3-4.58a5 5 0 0 0-5-5z",
162
+ fill: "currentColor"
163
+ }),
164
+ /* @__PURE__ */ jsxRuntime.jsx("path", {
165
+ d: "M8 20v1h8v-1H8z",
166
+ fill: "currentColor"
167
+ })
168
+ ]
169
+ })
170
+ }),
171
+ /* @__PURE__ */ jsxRuntime.jsx("button", {
172
+ class: {
173
+ "tab-active": state.activeTab === "assets"
174
+ },
175
+ onClick$: () => state.activeTab = "assets",
176
+ title: "Assets",
177
+ children: /* @__PURE__ */ jsxRuntime.jsx(heroicons.HiPhotoOutline, {
178
+ width: 20,
179
+ height: 20
180
+ })
181
+ })
182
+ ]
183
+ }),
184
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
185
+ class: "devtools-content",
186
+ children: [
187
+ state.activeTab === "overview" && /* @__PURE__ */ jsxRuntime.jsxs("div", {
188
+ class: "tab-content overview",
189
+ children: [
190
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
191
+ class: "header-section",
192
+ children: [
193
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
194
+ class: "title-container",
195
+ children: [
196
+ /* @__PURE__ */ jsxRuntime.jsx("img", {
197
+ width: 32,
198
+ height: 32,
199
+ src: "https://qwik.dev/logos/qwik-logo.svg",
200
+ alt: "Qwik Logo",
201
+ class: "qwik-logo"
202
+ }),
203
+ /* @__PURE__ */ jsxRuntime.jsx("h1", {
204
+ children: "Qwik DevTools"
205
+ })
206
+ ]
207
+ }),
208
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
209
+ class: "version",
210
+ children: [
211
+ "v",
212
+ state.npmPackages.find(([name]) => name.includes("core"))?.[1] || "0.0.0"
213
+ ]
214
+ })
215
+ ]
216
+ }),
217
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
218
+ class: "metrics-grid",
219
+ children: [
220
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
221
+ class: "metric-card",
222
+ children: [
223
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
224
+ class: "metric-icon",
225
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucide.LuFolderTree, {
226
+ class: "icon"
227
+ })
228
+ }),
229
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
230
+ class: "metric-content",
231
+ children: [
232
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
233
+ class: "metric-value",
234
+ children: state.routes?.length
235
+ }),
236
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
237
+ class: "metric-label",
238
+ children: "pages"
239
+ })
240
+ ]
241
+ })
242
+ ]
243
+ }),
244
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
245
+ class: "metric-card",
246
+ children: [
247
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
248
+ class: "metric-icon",
249
+ children: /* @__PURE__ */ jsxRuntime.jsx(heroicons.HiCubeOutline, {
250
+ class: "icon"
251
+ })
252
+ }),
253
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
254
+ class: "metric-content",
255
+ children: [
256
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
257
+ class: "metric-value",
258
+ children: state.assets.length
259
+ }),
260
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
261
+ class: "metric-label",
262
+ children: "components"
263
+ })
264
+ ]
265
+ })
266
+ ]
267
+ }),
268
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
269
+ class: "metric-card",
270
+ children: [
271
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
272
+ class: "metric-icon",
273
+ children: /* @__PURE__ */ jsxRuntime.jsx(heroicons.HiPhotoOutline, {
274
+ class: "icon"
275
+ })
276
+ }),
277
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
278
+ class: "metric-content",
279
+ children: [
280
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
281
+ class: "metric-value",
282
+ children: state.assets.length || 0
283
+ }),
284
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
285
+ class: "metric-label",
286
+ children: "assets"
287
+ })
288
+ ]
289
+ })
290
+ ]
291
+ })
292
+ ]
293
+ }),
294
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
295
+ class: "packages-section",
296
+ children: [
297
+ /* @__PURE__ */ jsxRuntime.jsx("h3", {
298
+ children: "Installed Packages"
299
+ }),
300
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
301
+ class: "packages-grid",
302
+ children: state.npmPackages.map(([name, version]) => /* @__PURE__ */ jsxRuntime.jsxs("div", {
303
+ class: "package-item",
304
+ children: [
305
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
306
+ class: "package-name",
307
+ children: name
308
+ }),
309
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
310
+ class: "package-version",
311
+ children: [
312
+ "v",
313
+ version
314
+ ]
315
+ })
316
+ ]
317
+ }, name))
318
+ })
319
+ ]
320
+ }),
321
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
322
+ class: "performance-section",
323
+ children: [
324
+ /* @__PURE__ */ jsxRuntime.jsx("h3", {
325
+ children: "Performance"
326
+ }),
327
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
328
+ class: "performance-metrics",
329
+ children: [
330
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
331
+ class: "perf-item",
332
+ children: [
333
+ /* @__PURE__ */ jsxRuntime.jsx("span", {
334
+ children: "SSR to full load"
335
+ }),
336
+ /* @__PURE__ */ jsxRuntime.jsx("span", {
337
+ class: "perf-value",
338
+ children: "-"
339
+ })
340
+ ]
341
+ }),
342
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
343
+ class: "perf-item",
344
+ children: [
345
+ /* @__PURE__ */ jsxRuntime.jsx("span", {
346
+ children: "Page load"
347
+ }),
348
+ /* @__PURE__ */ jsxRuntime.jsx("span", {
349
+ class: "perf-value",
350
+ children: "-"
351
+ })
352
+ ]
353
+ }),
354
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
355
+ class: "perf-item",
356
+ children: [
357
+ /* @__PURE__ */ jsxRuntime.jsx("span", {
358
+ children: "Navigation"
359
+ }),
360
+ /* @__PURE__ */ jsxRuntime.jsx("span", {
361
+ class: "perf-value",
362
+ children: "-"
363
+ })
364
+ ]
365
+ })
366
+ ]
367
+ })
368
+ ]
369
+ })
370
+ ]
371
+ }),
372
+ state.activeTab === "assets" && /* @__PURE__ */ jsxRuntime.jsxs("div", {
373
+ class: "tab-content assets",
374
+ children: [
375
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
376
+ class: "header-section",
377
+ children: [
378
+ /* @__PURE__ */ jsxRuntime.jsx("h3", {
379
+ children: "Public Assets"
380
+ }),
381
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
382
+ class: "assets-stats",
383
+ children: [
384
+ /* @__PURE__ */ jsxRuntime.jsxs("span", {
385
+ class: "stat-item",
386
+ children: [
387
+ "Total Size:",
388
+ " ",
389
+ (state.assets?.reduce((acc, asset) => acc + asset.size, 0) / 1024).toFixed(2),
390
+ " ",
391
+ "KB"
392
+ ]
393
+ }),
394
+ /* @__PURE__ */ jsxRuntime.jsxs("span", {
395
+ class: "stat-item",
396
+ children: [
397
+ "Count: ",
398
+ state.assets?.length || 0
399
+ ]
400
+ })
401
+ ]
402
+ })
403
+ ]
404
+ }),
405
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
406
+ class: "assets-grid",
407
+ children: state.assets?.map((asset) => {
408
+ const isImage = asset.path.match(/\.(jpg|jpeg|png|gif|svg|webp)$/i);
409
+ const fileExt = asset.path.split(".").pop()?.toUpperCase();
410
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", {
411
+ class: "asset-card",
412
+ children: [
413
+ isImage ? /* @__PURE__ */ jsxRuntime.jsx("div", {
414
+ class: "asset-preview",
415
+ children: /* @__PURE__ */ jsxRuntime.jsx("img", {
416
+ width: 176,
417
+ height: 176,
418
+ src: asset.publicPath,
419
+ alt: asset.path
420
+ })
421
+ }) : /* @__PURE__ */ jsxRuntime.jsx("div", {
422
+ class: "file-preview",
423
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", {
424
+ class: "file-ext",
425
+ children: fileExt
426
+ })
427
+ }),
428
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
429
+ class: "asset-info",
430
+ children: [
431
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
432
+ class: "asset-path",
433
+ title: asset.path,
434
+ children: asset.path.split("/").pop()
435
+ }),
436
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
437
+ class: "asset-meta",
438
+ children: [
439
+ /* @__PURE__ */ jsxRuntime.jsxs("span", {
440
+ class: "asset-size",
441
+ children: [
442
+ (asset.size / 1024).toFixed(2),
443
+ " KB"
444
+ ]
445
+ }),
446
+ /* @__PURE__ */ jsxRuntime.jsx("span", {
447
+ class: "asset-type",
448
+ children: fileExt
449
+ })
450
+ ]
451
+ })
452
+ ]
453
+ })
454
+ ]
455
+ }, asset.filePath);
456
+ })
457
+ })
458
+ ]
459
+ }),
460
+ state.activeTab === "components" && /* @__PURE__ */ jsxRuntime.jsx("div", {
461
+ class: "tab-content",
462
+ children: /* @__PURE__ */ jsxRuntime.jsx("h3", {
463
+ children: "Components"
464
+ })
465
+ }),
466
+ state.activeTab === "routes" && /* @__PURE__ */ jsxRuntime.jsxs("div", {
467
+ class: "tab-content",
468
+ children: [
469
+ /* @__PURE__ */ jsxRuntime.jsx("h3", {
470
+ children: "Application Routes"
471
+ }),
472
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
473
+ class: "routes-table",
474
+ children: [
475
+ /* @__PURE__ */ jsxRuntime.jsxs("div", {
476
+ class: "table-header",
477
+ children: [
478
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
479
+ class: "col-route",
480
+ children: "Route Path"
481
+ }),
482
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
483
+ class: "col-route",
484
+ children: "Name"
485
+ }),
486
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
487
+ class: "col-route",
488
+ children: "Middleware"
489
+ }),
490
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
491
+ class: "col-route",
492
+ children: "Layout"
493
+ })
494
+ ]
495
+ }),
496
+ state.routes?.map((route, i) => {
497
+ const children = route.children || [];
498
+ const layout = route.relativePath !== "" && route.type === "directory" && children.find((child) => child.name.startsWith("layout"));
499
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", {
500
+ class: "table-row",
501
+ children: [
502
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
503
+ class: "col-route",
504
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", {
505
+ class: location$1 === `/${route.relativePath}` ? "active-route" : "",
506
+ children: route.relativePath === "" ? "/" : `/${route.relativePath}/`
507
+ })
508
+ }),
509
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
510
+ class: "col-route",
511
+ children: route.name
512
+ }),
513
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
514
+ class: "col-route",
515
+ children: "-"
516
+ }),
517
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
518
+ class: "col-route",
519
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", {
520
+ class: layout && i > 0 ? "custom-layout" : "",
521
+ children: layout && i > 0 ? `${route.relativePath}/layout` : "default"
522
+ })
523
+ })
524
+ ]
525
+ }, route.relativePath);
526
+ })
527
+ ]
528
+ })
529
+ ]
530
+ })
531
+ ]
532
+ })
533
+ ]
534
+ })
535
+ ]
536
+ });
537
+ });
538
+ exports.QwikDevtools = QwikDevtools;