Skip to content

Commit 4327cbf

Browse files
committed
Rebased mini-projects website onto vue-component work from Spring 25
1 parent ba1e18b commit 4327cbf

File tree

6 files changed

+21
-39
lines changed

6 files changed

+21
-39
lines changed

components.d.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@ declare module 'vue' {
2424
Menubar: typeof import('primevue/menubar')['default']
2525
Mux: typeof import('./src/components/flow/shapes/Mux.vue')['default']
2626
MuxNode: typeof import('./src/components/flow/MuxNode.vue')['default']
27-
Pseudocode: typeof import('./src/components/Pseudocode.vue')['default']
2827
RouterLink: typeof import('vue-router')['RouterLink']
2928
RouterView: typeof import('vue-router')['RouterView']
3029
SiGithub: typeof import('~icons/simple-icons/github')['default']
3130
SiteNav: typeof import('./src/components/SiteNav.vue')['default']
3231
Slider: typeof import('primevue/slider')['default']
33-
SpecialEdge: typeof import('./src/components/SpecialEdge.vue')['default']
34-
SpecialNode: typeof import('./src/components/SpecialNode.vue')['default']
32+
TriState: typeof import('./src/components/flow/shapes/TriState.vue')['default']
33+
TriStateNode: typeof import('./src/components/flow/TriStateNode.vue')['default']
3534
}
3635
export interface ComponentCustomProperties {
3736
Tooltip: typeof import('primevue/tooltip')['default']

package-lock.json

Lines changed: 1 addition & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"primevue": "^4.3.4",
3131
"tailwindcss": "^4.1.5",
3232
"tailwindcss-primeui": "^0.6.1",
33-
"vue": "^3.5.13"
33+
"vue": "^3.5.13",
34+
"vue-router": "^4.5.1"
3435
}
3536
}

src/components/LC3.vue

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22
import { ref, useTemplateRef } from 'vue';
33
import { VueFlow } from '@vue-flow/core';
44
import { Background } from '@vue-flow/background';
5-
<<<<<<< HEAD
6-
import SpecialNode from './SpecialNode.vue';
7-
import SpecialEdge from './SpecialEdge.vue';
8-
=======
9-
import type { LC3Node } from './flow/types';
10-
>>>>>>> 9596c6f (add components to LC3, add types)
5+
import type { LC3Node } from './flow/types.d';
6+
import ALUNode from './flow/ALUNode.vue';
7+
import MuxNode from './flow/MuxNode.vue';
8+
import LogicNode from './flow/LogicNode.vue';
9+
import TriStateNode from './flow/TriStateNode.vue';
1110
1211
const top = useTemplateRef<HTMLDivElement>("top");
13-
const svgEl = useTemplateRef<SVGSVGElement>('lc3Svg');
1412
defineExpose({
1513
/**
1614
* Activates the wire with the given ID, causing it to light up.
@@ -60,15 +58,6 @@
6058
}
6159
})
6260
63-
<<<<<<< HEAD
64-
const nodes = ref([
65-
// an input node, specified by using `type: 'input'`
66-
{
67-
id: '1',
68-
type: 'input',
69-
position: { x: 250, y: 5 },
70-
data: { label: 'Node 1' },
71-
=======
7261
const nodes = ref<LC3Node[]>([
7362
{
7463
id: "marMux",
@@ -87,7 +76,6 @@
8776
type: "tristate",
8877
position: { x: 200, y: -100 },
8978
data: { label: "GatePC" }
90-
>>>>>>> 9596c6f (add components to LC3, add types)
9179
},
9280
{
9381
id: "pc",
@@ -258,7 +246,7 @@
258246
</script>
259247

260248
<style scoped>
261-
@reference "@/style.css";
249+
@import "@/style.css";
262250
263251
.wire.active {
264252
fill: var(--p-surface-500, #888888);
@@ -295,11 +283,16 @@
295283
*/
296284
.lc3-container { padding:0; line-height:0; display:flex; align-items:stretch; justify-content:stretch; }
297285
.lc3-svg { display:block; width:100%; height:auto; }
286+
287+
.vue-flow-container {
288+
height: 100%;
289+
width: 100%;
290+
}
298291
</style>
299292

300293
<template>
301-
<div class="h-full w-full bg-surface-800 rounded">
302-
<VueFlow :nodes="nodes" :edges="edges">
294+
<div ref="top" class="h-full w-full bg-surface-800 rounded">
295+
<VueFlow :nodes="nodes" :edges="edges" class="vue-flow-container">
303296
<Background pattern-color="var(--color-surface-500)" :gap="16" />
304297

305298
<template #node-alu="props">

src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import App from './App.vue';
44
import PrimeVue from 'primevue/config';
55
import Aura from '@primevue/themes/aura';
66
import './style.css';
7+
import '@vue-flow/core/dist/style.css';
8+
import '@vue-flow/core/dist/theme-default.css';
79
import { definePreset } from '@primevue/themes';
810
import type { PrimeVueConfiguration } from 'primevue';
911

src/projects/LC3/Lc3Tool.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ h1 { margin:0; line-height:1.1; }
220220
.diagram-col { overflow:auto; }
221221
.lc3-resized {
222222
width:60%;
223+
height:600px;
223224
max-width:1150px;
224225
display:block;
225226
/* align diagram flush to pseudocode column by pushing it to the right edge */

0 commit comments

Comments
 (0)