tscircuit/autorouting-dataset-01
This code manages the hardware and electronic components for circuit design and PCB layout, defining components like resistors, capacitors, transistors, connectors, and footprints, and providing tools for component placement, PCB topology, and electrical connections.
- Version
- 1.0.102
- License
- unset
- Stars
- 4
scripts/run-benchmark/generateHtmlVisualization/generateWebComponents.ts
/**
* Generates the web component definition script for benchmark cards.
*/
export const generateWebComponents = () => {
return `<script>
class BenchmarkCard extends HTMLElement {
connectedCallback() {
const title = this.getAttribute('title');
const content = this.innerHTML;
this.innerHTML = \`
<div class="bg-white rounded-lg p-6 border border-gray-300 shadow-lg">
\${title ? \`<h3 class="text-lg font-semibold text-blue-800 mb-4">\${title}</h3>\` : ''}
<div>\${content}</div>
</div>
\`;
}
}
customElements.define('benchmark-card', BenchmarkCard);
</script>`
}