Bezier-rs: Replace Vue-CLI with Webpack bundler

This commit is contained in:
Keavon Chambers
2023-03-29 16:58:51 -07:00
parent c770cd906e
commit 92fe0bea50
15 changed files with 1171 additions and 13727 deletions
-10
View File
@@ -6,8 +6,6 @@ import SubpathDemoPane from "@/components/SubpathDemoPane";
import bezierFeatures, { BezierFeatureKey } from "@/features/bezier-features";
import subpathFeatures, { SubpathFeatureKey } from "@/features/subpath-features";
import "@/style.css";
declare global {
interface HTMLElementTagNameMap {
"bezier-demo": BezierDemo;
@@ -17,14 +15,6 @@ declare global {
}
}
window.document.title = "Bezier-rs Interactive Documentation";
window.document.head.innerHTML += `
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Bona+Nova:wght@700&family=EB+Garamond:ital,wght@0,500;1,500&display=swap" rel="stylesheet">
`.trim();
window.customElements.define("bezier-demo", BezierDemo);
window.customElements.define("bezier-demo-pane", BezierDemoPane);
window.customElements.define("subpath-demo", SubpathDemo);
-206
View File
@@ -1,206 +0,0 @@
:root {
--color-navy: #16323f;
--color-gray: #cccccc;
--range-fill-dark: var(--color-navy);
--range-fill-light: var(--color-gray);
--range-thumb-height: 16px;
}
html,
body {
font-family: "Inter", sans-serif;
text-align: center;
background-color: white;
}
.website-header {
color: var(--color-navy);
font-family: "Bona Nova", serif;
}
.website-description {
font-weight: 500;
color: var(--color-navy);
}
.class-header {
color: var(--color-navy);
font-family: "Bona Nova", serif;
margin-bottom: 0
}
body > h1 {
margin: 40px 0;
}
body > h1 ~ :last-child {
margin-bottom: 40px;
}
body > h1 + p {
max-width: 768px;
line-height: 1.4;
margin: auto;
text-align: justify;
}
body > h2 {
margin-top: 40px;
}
/* Demo Pane styles */
.demo-row {
display: flex;
flex-direction: row;
justify-content: center;
}
.t-variant-choice {
margin-top: 20px;
}
.demo-pane-header {
display: inline-block;
position: relative;
margin-top: 2em;
margin-bottom: 0;
padding: 0 1em;
font-family: "Bona Nova", serif;
color: var(--color-navy);
}
.demo-pane-header a {
display: none;
position: absolute;
left: 0;
text-decoration: none;
color: inherit;
opacity: 0.5;
}
.demo-pane-header:hover a {
display: inline-block;
}
.demo-pane-container {
position: relative;
width: fit-content;
margin: auto;
}
/* Demo styles */
.demo-header {
font-family: "Bona Nova", serif;
color: var(--color-navy);
margin-top: 10px;
margin-bottom: 5px;
}
.demo-figure {
width: 250px;
height: 200px;
margin: 10px;
border: solid 1px black;
}
.parent-slider-container {
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
}
svg text {
pointer-events: none;
user-select: none;
}
/* Slider Styles */
.slider-container {
/* width: fit-content; */
width: 250px;
padding-bottom: 5px;
}
.slider-label {
font-family: monospace;
display: flex;
justify-content: left;
}
input[type="range"] {
-webkit-appearance: none;
appearance: none;
margin-right: 15px;
width: 250px;
height: 7px;
background: rgba(255, 255, 255, 0.6);
border-radius: 5px;
background: linear-gradient(var(--range-fill-dark), var(--range-fill-dark)) 0 / calc(0.5 * var(--range-thumb-height) + var(--range-ratio) * (100% - var(--range-thumb-height))) var(--range-fill-light);
background-repeat: no-repeat;
}
/* Input Thumb */
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
height: var(--range-thumb-height);
width: var(--range-thumb-height);
border-radius: 50%;
background: var(--range-fill-dark);
box-shadow: 0 0 2px 0 #555;
transition: background .3s ease-in-out;
}
input[type="range"]::-moz-range-thumb {
-webkit-appearance: none;
appearance: none;
height: var(--range-thumb-height);
width: var(--range-thumb-height);
border-radius: 50%;
background: var(--range-fill-dark);
box-shadow: 0 0 2px 0 #555;
transition: background .3s ease-in-out;
}
input[type="range"]::-webkit-slider-thumb:hover {
background: linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), var(--range-fill-dark);
}
input[type="range"]::-moz-range-thumb:hover {
background: linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), var(--range-fill-dark);
}
/* Input Track */
input[type=range]::-webkit-slider-runnable-track {
-webkit-appearance: none;
box-shadow: none;
border: none;
background: transparent;
background: none;
}
input[type=range]::-moz-range-track {
-webkit-appearance: none;
appearance: none;
box-shadow: none;
border: none;
background: transparent;
background: none;
;
}
/* Select Styles */
select {
font-family: monospace;
}
.select-container {
width: 250px;
padding-bottom: 5px;
display: flex;
}
.select-input {
margin-left: 8px;
}