A component faces, project library with share links, fine-grained wire editing
- Lamps and hex displays inside a component show on its box with their labels, lit by that instance's state; Counter 4 example shows its count. - Several projects per browser; share links at /p/<id> that the creator's edits save to automatically, others get their own copy. Export, open a file as project, or add a file's components to the open project. - Wires: drag any segment or corner, Alt+drag for a new bend, Ctrl+drag to branch, double-click selects the whole signal, multi-select, arrow keys, colour tags. - Share-link API (POST/GET/PUT /api/p) on Nitro fs storage in data/, mounted as a volume on edgerealm. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
03a4d55834
commit
a241adc94e
|
|
@ -17,3 +17,4 @@ localhost-key.pem
|
||||||
*.key
|
*.key
|
||||||
*.map
|
*.map
|
||||||
*.log
|
*.log
|
||||||
|
data
|
||||||
|
|
|
||||||
|
|
@ -33,3 +33,6 @@ docker-data/
|
||||||
# Playwright artefacts
|
# Playwright artefacts
|
||||||
test-results/
|
test-results/
|
||||||
playwright-report/
|
playwright-report/
|
||||||
|
|
||||||
|
# Shared projects (server storage)
|
||||||
|
data/
|
||||||
|
|
|
||||||
13
README.md
13
README.md
|
|
@ -2,14 +2,18 @@
|
||||||
|
|
||||||
Logic circuit editor and simulator at <https://logicate.blax.at>, in the spirit of the game "Turing Complete". NAND is the only gate. You draw circuits with it, package them as components, and reuse those in bigger circuits, up to a CPU. Everything runs live while you draw: green wires carry a 1, grey wires a 0.
|
Logic circuit editor and simulator at <https://logicate.blax.at>, in the spirit of the game "Turing Complete". NAND is the only gate. You draw circuits with it, package them as components, and reuse those in bigger circuits, up to a CPU. Everything runs live while you draw: green wires carry a 1, grey wires a 0.
|
||||||
|
|
||||||
Nuxt 4 (client-only, `ssr: false`), Tailwind CSS v4, Lucide icons via `@nuxt/icon`, Inter and JetBrains Mono self-hosted via `@nuxt/fonts`. No backend, no tracking: projects live in the browser's localStorage and can be exported as JSON.
|
Nuxt 4 (client-only editor, `ssr: false`), Tailwind CSS v4, Lucide icons via `@nuxt/icon`, Inter and JetBrains Mono self-hosted via `@nuxt/fonts`. No tracking. Projects live in the browser's localStorage; the only server part is the share-link API.
|
||||||
|
|
||||||
## What it does
|
## What it does
|
||||||
|
|
||||||
- Parts: NAND, input switch, output pin, lamp, push button, clock, constant 1, ground, hex display, note.
|
- Parts: NAND, input switch, output pin, lamp, push button, clock, constant 1, ground, hex display, note.
|
||||||
- Every circuit is a component. Its input and output nodes become its pins, ordered top to bottom. Double-click a component to open it.
|
- Every circuit is a component. Its input and output nodes become its pins, ordered top to bottom. Double-click a component to open it.
|
||||||
|
- Lamps and hex displays inside a component show on its box, with their labels, lit by that instance's state. They are laid out in rows the way they sit inside. A checkbox in the inspector turns this off per component.
|
||||||
- Select parts and press "Make component" to turn them into a new component; wires crossing the selection become pins.
|
- Select parts and press "Make component" to turn them into a new component; wires crossing the selection become pins.
|
||||||
- Gate symbols in IEC 60617 (DIN, default) or ANSI. A component with one output can be drawn as a gate symbol.
|
- Gate symbols in IEC 60617 (DIN, default) or ANSI. A component with one output can be drawn as a gate symbol.
|
||||||
|
- Wire editing: drag any segment (a stub keeps the pin end straight), drag corner squares, Alt+drag to pull out a new bend, Ctrl+drag to branch a new wire off a signal, double-click to select the whole signal, Shift+click and box selection for several wires, arrow keys to shift them, six colour tags.
|
||||||
|
- Several projects per browser (Projects dialog: open, rename, duplicate, delete). Export a project file, open a file as a new project, or add the components of a file to the open project.
|
||||||
|
- Share links: `/p/<id>`. The creator's changes save to the link automatically. Anyone else who opens it gets their own copy; their first edit detaches it from the link.
|
||||||
- Truth table, NAND count, gate delay, and loop detection for the open circuit.
|
- Truth table, NAND count, gate delay, and loop detection for the open circuit.
|
||||||
- 17 challenges (NOT up to a D flip-flop) checked against a truth table or a step sequence.
|
- 17 challenges (NOT up to a D flip-flop) checked against a truth table or a step sequence.
|
||||||
- Example library, all built from NAND: NOT, AND, OR, NOR, XOR, XNOR, Mux, Half/Full Adder, SR Latch, D Latch, D Flip-Flop, Register 4, Increment 4, Adder 4, Counter 4, and a counter demo with a hex display.
|
- Example library, all built from NAND: NOT, AND, OR, NOR, XOR, XNOR, Mux, Half/Full Adder, SR Latch, D Latch, D Flip-Flop, Register 4, Increment 4, Adder 4, Counter 4, and a counter demo with a hex display.
|
||||||
|
|
@ -23,9 +27,14 @@ All in [app/lib/logic/](app/lib/logic/), plain TypeScript with no Vue dependency
|
||||||
- Gate outputs are keyed by their path ("chipNode/chipNode/nand"), so latch state survives editing.
|
- Gate outputs are keyed by their path ("chipNode/chipNode/nand"), so latch state survives editing.
|
||||||
- `analyze.ts` builds truth tables, counts NANDs, computes the longest gate path, and runs challenge tests.
|
- `analyze.ts` builds truth tables, counts NANDs, computes the longest gate path, and runs challenge tests.
|
||||||
- `examples.ts` builds the example library with a small builder; `ops.ts` holds project edits (package selection, copy/paste, prune dangling wires, recursion check).
|
- `examples.ts` builds the example library with a small builder; `ops.ts` holds project edits (package selection, copy/paste, prune dangling wires, recursion check).
|
||||||
|
- `wires.ts` edits wire routes (segment and corner drags, splits, branches); `project.ts` validates project data for both the browser and the server; `storage.ts` is the browser's project library.
|
||||||
|
|
||||||
The editor UI is in [app/components/editor/](app/components/editor/) with state in [app/composables/useEditor.ts](app/composables/useEditor.ts).
|
The editor UI is in [app/components/editor/](app/components/editor/) with state in [app/composables/useEditor.ts](app/composables/useEditor.ts).
|
||||||
|
|
||||||
|
## Share links
|
||||||
|
|
||||||
|
[server/api/p/](server/api/p/): `POST /api/p` stores a project and returns `{ id, key }`; `GET /api/p/:id` reads it; `PUT /api/p/:id` with header `x-edit-key` replaces it. Only a SHA-256 of the key is stored. Each link is one JSON file in `data/shares/` (Nitro fs storage). Limits: 2 MB and 100,000 nodes per project, 30 new links and 600 saves per IP per 10 minutes (in memory). The edit key lives only in the creator's browser (project index in localStorage), never in exported files.
|
||||||
|
|
||||||
## Develop
|
## Develop
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
@ -38,4 +47,4 @@ pnpm build # .output/
|
||||||
|
|
||||||
## Deploy
|
## Deploy
|
||||||
|
|
||||||
Same pattern as autismus-spektrum. On edgerealm the repo lives in `/mnt/HC_Volume_102040804/srv/logigate`; run `./deploy.sh` there. It pulls, builds in a one-shot container and recreates the `logigate` container. Host nginx terminates TLS with the `*.blax.at` wildcard cert and forwards to Traefik, which routes `logicate.blax.at` and `logigate.blax.at` by the labels in [docker-compose.yml](docker-compose.yml).
|
Same pattern as autismus-spektrum. On edgerealm the repo lives in `/mnt/HC_Volume_102040804/srv/logigate`; run `./deploy.sh` there. It pulls, builds in a one-shot container and recreates the `logigate` container. Shared projects live in `data/` next to the repo (mounted into the container), so redeploys keep them; include that folder in backups. Host nginx terminates TLS with the `*.blax.at` wildcard cert and forwards to Traefik, which routes `logicate.blax.at` and `logigate.blax.at` by the labels in [docker-compose.yml](docker-compose.yml).
|
||||||
|
|
|
||||||
|
|
@ -703,23 +703,55 @@ kbd {
|
||||||
fill: #303b4c;
|
fill: #303b4c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wire {
|
||||||
|
--w-on: var(--on);
|
||||||
|
--w-off: var(--off);
|
||||||
|
}
|
||||||
|
|
||||||
|
.wire.c-red { --w-on: #ff5c5c; --w-off: #6b3337; }
|
||||||
|
.wire.c-orange { --w-on: #ff9f43; --w-off: #6b4a2b; }
|
||||||
|
.wire.c-yellow { --w-on: #ffd93d; --w-off: #625a2e; }
|
||||||
|
.wire.c-blue { --w-on: #4dabff; --w-off: #2b4a6b; }
|
||||||
|
.wire.c-purple { --w-on: #b388ff; --w-off: #463768; }
|
||||||
|
.wire.c-pink { --w-on: #ff7ac6; --w-off: #673657; }
|
||||||
|
|
||||||
.wire-line {
|
.wire-line {
|
||||||
fill: none;
|
fill: none;
|
||||||
stroke: var(--off);
|
stroke: var(--w-off);
|
||||||
stroke-width: 2;
|
stroke-width: 2;
|
||||||
stroke-linejoin: round;
|
stroke-linejoin: round;
|
||||||
stroke-linecap: round;
|
stroke-linecap: round;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wire.on .wire-line {
|
.wire.on .wire-line {
|
||||||
stroke: var(--on);
|
stroke: var(--w-on);
|
||||||
}
|
}
|
||||||
|
|
||||||
.wire.selected .wire-line {
|
.wire.hover .wire-line {
|
||||||
stroke: var(--accent);
|
|
||||||
stroke-width: 3;
|
stroke-width: 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wire-halo {
|
||||||
|
fill: none;
|
||||||
|
stroke: var(--accent);
|
||||||
|
stroke-opacity: 0.35;
|
||||||
|
stroke-width: 8;
|
||||||
|
stroke-linejoin: round;
|
||||||
|
stroke-linecap: round;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.corner-handle {
|
||||||
|
fill: var(--panel);
|
||||||
|
stroke: var(--accent);
|
||||||
|
stroke-width: 1.5;
|
||||||
|
cursor: move;
|
||||||
|
}
|
||||||
|
|
||||||
|
.corner-handle:hover {
|
||||||
|
fill: var(--accent);
|
||||||
|
}
|
||||||
|
|
||||||
.wire-flow {
|
.wire-flow {
|
||||||
fill: none;
|
fill: none;
|
||||||
stroke: #d2ffe6;
|
stroke: #d2ffe6;
|
||||||
|
|
@ -744,20 +776,20 @@ kbd {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wire-hit.draggable {
|
.wire-hit {
|
||||||
cursor: ns-resize;
|
cursor: ns-resize;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wire-hit.draggable.vertical {
|
.wire-hit.vertical {
|
||||||
cursor: ew-resize;
|
cursor: ew-resize;
|
||||||
}
|
}
|
||||||
|
|
||||||
.junction {
|
.junction {
|
||||||
fill: var(--off);
|
fill: var(--w-off);
|
||||||
}
|
}
|
||||||
|
|
||||||
.junction.on {
|
.wire.on .junction {
|
||||||
fill: var(--on);
|
fill: var(--w-on);
|
||||||
}
|
}
|
||||||
|
|
||||||
.temp-wire {
|
.temp-wire {
|
||||||
|
|
@ -1145,3 +1177,196 @@ kbd {
|
||||||
.shortcuts dd {
|
.shortcuts dd {
|
||||||
color: #c3ccd6;
|
color: #c3ccd6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.face-label {
|
||||||
|
fill: var(--muted);
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 8px;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swatches {
|
||||||
|
display: flex;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swatch {
|
||||||
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 2px solid transparent;
|
||||||
|
background: var(--w-on);
|
||||||
|
outline: 1px solid var(--border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.swatch.none {
|
||||||
|
background: var(--on);
|
||||||
|
}
|
||||||
|
|
||||||
|
.swatch.c-red { --w-on: #ff5c5c; }
|
||||||
|
.swatch.c-orange { --w-on: #ff9f43; }
|
||||||
|
.swatch.c-yellow { --w-on: #ffd93d; }
|
||||||
|
.swatch.c-blue { --w-on: #4dabff; }
|
||||||
|
.swatch.c-purple { --w-on: #b388ff; }
|
||||||
|
.swatch.c-pink { --w-on: #ff7ac6; }
|
||||||
|
|
||||||
|
.swatch.active {
|
||||||
|
border-color: var(--panel);
|
||||||
|
outline: 2px solid var(--text);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tips {
|
||||||
|
font-size: 12px;
|
||||||
|
color: var(--muted);
|
||||||
|
line-height: 1.5;
|
||||||
|
margin: 2px 0 12px;
|
||||||
|
display: grid;
|
||||||
|
gap: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tips strong {
|
||||||
|
color: var(--text);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 8px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: var(--text);
|
||||||
|
margin: 2px 0 12px;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check input {
|
||||||
|
margin-top: 2px;
|
||||||
|
accent-color: var(--accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:disabled {
|
||||||
|
opacity: 0.4;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-btn {
|
||||||
|
max-width: 220px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.share-btn {
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.share-btn.saved,
|
||||||
|
.share-btn.dirty,
|
||||||
|
.share-btn.saving {
|
||||||
|
color: var(--on);
|
||||||
|
}
|
||||||
|
|
||||||
|
.share-btn.error {
|
||||||
|
color: var(--danger);
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-list {
|
||||||
|
margin-top: 14px;
|
||||||
|
display: grid;
|
||||||
|
gap: 4px;
|
||||||
|
max-height: 50vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-list li {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
padding: 4px;
|
||||||
|
border-radius: 8px;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-list li:hover {
|
||||||
|
background: var(--panel-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-list li.current {
|
||||||
|
border-color: var(--border);
|
||||||
|
background: var(--panel-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-list .pick {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
display: grid;
|
||||||
|
gap: 2px;
|
||||||
|
text-align: left;
|
||||||
|
padding: 4px 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-list .name {
|
||||||
|
font-weight: 600;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-list .meta {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: var(--muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-list .badge {
|
||||||
|
font-size: 10px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--accent);
|
||||||
|
margin-left: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-list .rename {
|
||||||
|
flex: 1;
|
||||||
|
background: var(--bg);
|
||||||
|
border: 1px solid var(--accent);
|
||||||
|
border-radius: 6px;
|
||||||
|
padding: 6px 8px;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-btn {
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
border-radius: 6px;
|
||||||
|
color: var(--muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-btn:hover {
|
||||||
|
background: var(--panel);
|
||||||
|
color: var(--text);
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-row {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-row input {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
height: 32px;
|
||||||
|
padding: 0 10px;
|
||||||
|
border-radius: 6px;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
background: var(--bg);
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 13px;
|
||||||
|
color: var(--text);
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal.share .result {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
const ed = useEditor()
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
const stop = ed.startLoop()
|
||||||
|
onBeforeUnmount(stop)
|
||||||
|
try {
|
||||||
|
if (!localStorage.getItem('logigate:help-seen')) ed.showHelp.value = true
|
||||||
|
} catch {}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="app">
|
||||||
|
<EditorToolbar />
|
||||||
|
<div class="workspace">
|
||||||
|
<EditorPalette />
|
||||||
|
<main class="stage">
|
||||||
|
<EditorCanvas />
|
||||||
|
</main>
|
||||||
|
<EditorInspector />
|
||||||
|
</div>
|
||||||
|
<Transition name="fade">
|
||||||
|
<div v-if="ed.notice.value" class="toast" :class="ed.notice.value.kind">{{ ed.notice.value.text }}</div>
|
||||||
|
</Transition>
|
||||||
|
<div v-if="ed.placing.value" class="placing-hint">
|
||||||
|
Click on the canvas to place. <kbd>Shift</kbd> places several, <kbd>Esc</kbd> stops.
|
||||||
|
</div>
|
||||||
|
<EditorHelp v-if="ed.showHelp.value" />
|
||||||
|
<EditorProjectsDialog v-if="ed.dialog.value === 'projects'" />
|
||||||
|
<EditorShareDialog v-if="ed.dialog.value === 'share'" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { GRID as G, pinPos, routeWire, simplify, type Pt, type Shape } from '~/lib/logic/geometry'
|
import { GRID as G, pinPos, routeWire, type Pt, type Shape } from '~/lib/logic/geometry'
|
||||||
import type { CircuitNode, Wire } from '~/lib/logic/types'
|
import type { CircuitNode, Wire } from '~/lib/logic/types'
|
||||||
|
import { branchCorners, branchTo, moveCorner, moveSegment, segmentDrag, splitDrag } from '~/lib/logic/wires'
|
||||||
|
|
||||||
const ed = useEditor()
|
const ed = useEditor()
|
||||||
const root = ref<HTMLDivElement>()
|
const root = ref<HTMLDivElement>()
|
||||||
|
|
@ -12,6 +13,7 @@ const view = computed(() => ed.views[def.value.id] ?? { x: 40, y: 40, zoom: 1 })
|
||||||
const nodeMap = computed(() => new Map(def.value.nodes.map(n => [n.id, n])))
|
const nodeMap = computed(() => new Map(def.value.nodes.map(n => [n.id, n])))
|
||||||
const shapes = computed(() => new Map<string, Shape>(def.value.nodes.map(n => [n.id, ed.shape(n)])))
|
const shapes = computed(() => new Map<string, Shape>(def.value.nodes.map(n => [n.id, ed.shape(n)])))
|
||||||
const selected = computed(() => new Set(ed.selection.value))
|
const selected = computed(() => new Set(ed.selection.value))
|
||||||
|
const wireSelected = computed(() => new Set(ed.wireSel.value))
|
||||||
|
|
||||||
// ── Wires ───────────────────────────────────────────────────────────
|
// ── Wires ───────────────────────────────────────────────────────────
|
||||||
interface Route {
|
interface Route {
|
||||||
|
|
@ -38,15 +40,19 @@ const routes = computed<Route[]>(() => {
|
||||||
return out
|
return out
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const routeOf = (wire: Wire) => routes.value.find(r => r.wire === wire)
|
||||||
|
|
||||||
/** Dots where a net branches, so crossings without a dot read as "not connected". */
|
/** Dots where a net branches, so crossings without a dot read as "not connected". */
|
||||||
const junctions = computed(() => {
|
const junctions = computed(() => {
|
||||||
const groups = new Map<string, Pt[][]>()
|
const groups = new Map<string, Pt[][]>()
|
||||||
|
const colors = new Map<string, string>()
|
||||||
for (const r of routes.value) {
|
for (const r of routes.value) {
|
||||||
const g = groups.get(r.src)
|
const g = groups.get(r.src)
|
||||||
if (g) g.push(r.pts)
|
if (g) g.push(r.pts)
|
||||||
else groups.set(r.src, [r.pts])
|
else groups.set(r.src, [r.pts])
|
||||||
|
if (r.wire.color && !colors.has(r.src)) colors.set(r.src, r.wire.color)
|
||||||
}
|
}
|
||||||
const dots: { x: number; y: number; src: string }[] = []
|
const dots: { x: number; y: number; src: string; color: string }[] = []
|
||||||
for (const [src, list] of groups) {
|
for (const [src, list] of groups) {
|
||||||
if (list.length < 2) continue
|
if (list.length < 2) continue
|
||||||
const candidates = new Map<string, Pt>()
|
const candidates = new Map<string, Pt>()
|
||||||
|
|
@ -66,7 +72,7 @@ const junctions = computed(() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dirs.size >= 3) dots.push({ x, y, src })
|
if (dirs.size >= 3) dots.push({ x, y, src, color: colors.get(src) ?? '' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return dots
|
return dots
|
||||||
|
|
@ -77,6 +83,8 @@ const srcVal = (src: string) => {
|
||||||
return ed.val(node!, pin!)
|
return ed.val(node!, pin!)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const hoverSrc = ref<string | null>(null)
|
||||||
|
|
||||||
// ── View ────────────────────────────────────────────────────────────
|
// ── View ────────────────────────────────────────────────────────────
|
||||||
function bounds(nodes: CircuitNode[]) {
|
function bounds(nodes: CircuitNode[]) {
|
||||||
let x0 = Infinity
|
let x0 = Infinity
|
||||||
|
|
@ -174,15 +182,32 @@ function onDrop(e: DragEvent) {
|
||||||
type Drag =
|
type Drag =
|
||||||
| { kind: 'pan'; sx: number; sy: number; vx: number; vy: number }
|
| { kind: 'pan'; sx: number; sy: number; vx: number; vy: number }
|
||||||
| { kind: 'move'; start: Pt; orig: Map<string, Pt>; wires: Map<Wire, Pt[]>; moved: boolean; node: CircuitNode; toggle: boolean }
|
| { kind: 'move'; start: Pt; orig: Map<string, Pt>; wires: Map<Wire, Pt[]>; moved: boolean; node: CircuitNode; toggle: boolean }
|
||||||
| { kind: 'wire'; node: string; pin: string; dir: 'in' | 'out'; cur: Pt }
|
| { kind: 'wire'; node: string; pin: string; dir: 'in' | 'out'; cur: Pt; branch?: Pt[] }
|
||||||
| { kind: 'box'; start: Pt; cur: Pt; base: string[] }
|
| { kind: 'box'; start: Pt; cur: Pt; nodes: string[]; wires: string[] }
|
||||||
| { kind: 'segment'; wire: Wire; index: number; axis: 0 | 1; base: Pt[]; start: number }
|
| { kind: 'segment'; wire: Wire; base: Pt[]; k: number; axis: 0 | 1; start: number; moved: boolean }
|
||||||
| { kind: 'press'; node: CircuitNode }
|
| { kind: 'corner'; wire: Wire; route: Pt[]; i: number; moved: boolean }
|
||||||
|
|
||||||
const drag = ref<Drag | null>(null)
|
const drag = ref<Drag | null>(null)
|
||||||
const spaceDown = ref(false)
|
const spaceDown = ref(false)
|
||||||
let lastClick = { id: '', t: 0 }
|
let lastClick = { id: '', t: 0 }
|
||||||
|
|
||||||
|
function isDoubleClick(id: string) {
|
||||||
|
const now = performance.now()
|
||||||
|
const dbl = lastClick.id === id && now - lastClick.t < 350
|
||||||
|
lastClick = dbl ? { id: '', t: 0 } : { id, t: now }
|
||||||
|
return dbl
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Wires whose corner points travel with the nodes being moved. */
|
||||||
|
function wiresToShift(moving: Set<string>): Map<Wire, Pt[]> {
|
||||||
|
const out = new Map<Wire, Pt[]>()
|
||||||
|
for (const wire of def.value.wires) {
|
||||||
|
const both = moving.has(wire.from.node) && moving.has(wire.to.node)
|
||||||
|
if (wire.pts && (both || wireSelected.value.has(wire.id))) out.set(wire, wire.pts.map(p => [...p] as Pt))
|
||||||
|
}
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
function onPointerDown(e: PointerEvent) {
|
function onPointerDown(e: PointerEvent) {
|
||||||
const w = toWorld(e)
|
const w = toWorld(e)
|
||||||
const v = view.value
|
const v = view.value
|
||||||
|
|
@ -219,6 +244,9 @@ function onPointerDown(e: PointerEvent) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const wireEl = target.closest('[data-wire]')
|
||||||
|
if (wireEl) return onWireDown(e, wireEl, w)
|
||||||
|
|
||||||
const nodeEl = target.closest('[data-node]')
|
const nodeEl = target.closest('[data-node]')
|
||||||
if (nodeEl) {
|
if (nodeEl) {
|
||||||
const id = nodeEl.getAttribute('data-node')!
|
const id = nodeEl.getAttribute('data-node')!
|
||||||
|
|
@ -229,54 +257,58 @@ function onPointerDown(e: PointerEvent) {
|
||||||
ed.selection.value = selected.value.has(id) ? ed.selection.value.filter(s => s !== id) : [...ed.selection.value, id]
|
ed.selection.value = selected.value.has(id) ? ed.selection.value.filter(s => s !== id) : [...ed.selection.value, id]
|
||||||
} else if (!selected.value.has(id)) {
|
} else if (!selected.value.has(id)) {
|
||||||
ed.selection.value = [id]
|
ed.selection.value = [id]
|
||||||
|
ed.wireSel.value = []
|
||||||
}
|
}
|
||||||
ed.selectedWire.value = null
|
|
||||||
|
|
||||||
const now = performance.now()
|
if (isDoubleClick(`n:${id}`)) return onDoubleClick(node)
|
||||||
if (lastClick.id === id && now - lastClick.t < 350) {
|
|
||||||
lastClick = { id: '', t: 0 }
|
|
||||||
onDoubleClick(node)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
lastClick = { id, t: now }
|
|
||||||
|
|
||||||
if (node.kind === 'button') ed.press(node, true)
|
if (node.kind === 'button') ed.press(node, true)
|
||||||
const ids = selected.value.has(id) ? ed.selection.value : [id]
|
const ids = selected.value.has(id) ? ed.selection.value : [id]
|
||||||
const set = new Set(ids)
|
|
||||||
const orig = new Map<string, Pt>()
|
const orig = new Map<string, Pt>()
|
||||||
for (const sid of ids) {
|
for (const sid of ids) {
|
||||||
const n = nodeMap.value.get(sid)
|
const n = nodeMap.value.get(sid)
|
||||||
if (n) orig.set(sid, [n.x, n.y])
|
if (n) orig.set(sid, [n.x, n.y])
|
||||||
}
|
}
|
||||||
const wires = new Map<Wire, Pt[]>()
|
drag.value = { kind: 'move', start: w, orig, wires: wiresToShift(new Set(ids)), moved: false, node, toggle: node.kind === 'input' && !multi }
|
||||||
for (const wire of def.value.wires) {
|
|
||||||
if (wire.pts && set.has(wire.from.node) && set.has(wire.to.node)) wires.set(wire, wire.pts.map(p => [...p] as Pt))
|
|
||||||
}
|
|
||||||
drag.value = { kind: 'move', start: w, orig, wires, moved: false, node, toggle: node.kind === 'input' && !multi }
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const wireEl = target.closest('[data-wire]')
|
if (!e.shiftKey) ed.clearSelection()
|
||||||
if (wireEl) {
|
drag.value = { kind: 'box', start: w, cur: w, nodes: [...ed.selection.value], wires: [...ed.wireSel.value] }
|
||||||
const wire = def.value.wires.find(x => x.id === wireEl.getAttribute('data-wire'))
|
|
||||||
if (!wire) return
|
|
||||||
ed.selectedWire.value = wire.id
|
|
||||||
ed.selection.value = []
|
|
||||||
const route = routes.value.find(r => r.wire === wire)
|
|
||||||
const index = Number(wireEl.getAttribute('data-seg'))
|
|
||||||
if (route && index >= 1 && index + 1 <= route.pts.length - 2) {
|
|
||||||
const [a, b] = [route.pts[index]!, route.pts[index + 1]!]
|
|
||||||
const axis = a[0] === b[0] ? 0 : 1
|
|
||||||
drag.value = { kind: 'segment', wire, index, axis, base: route.pts.map(p => [...p] as Pt), start: w[axis] }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onWireDown(e: PointerEvent, el: Element, w: Pt) {
|
||||||
|
const wire = def.value.wires.find(x => x.id === el.getAttribute('data-wire'))
|
||||||
|
const route = wire && routeOf(wire)
|
||||||
|
if (!wire || !route) return
|
||||||
|
|
||||||
|
const corner = el.getAttribute('data-corner')
|
||||||
|
if (corner !== null) {
|
||||||
|
drag.value = { kind: 'corner', wire, route: route.pts.map(p => [...p] as Pt), i: Number(corner), moved: false }
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!e.shiftKey) {
|
const index = Number(el.getAttribute('data-seg'))
|
||||||
ed.selection.value = []
|
if (e.ctrlKey || e.metaKey) {
|
||||||
ed.selectedWire.value = null
|
// Branch: a new wire from the same signal, starting at this point.
|
||||||
|
drag.value = { kind: 'wire', node: wire.from.node, pin: wire.from.pin, dir: 'out', cur: w, branch: branchCorners(route.pts, index, w) }
|
||||||
|
return
|
||||||
}
|
}
|
||||||
drag.value = { kind: 'box', start: w, cur: w, base: [...ed.selection.value] }
|
if (e.shiftKey) {
|
||||||
|
ed.wireSel.value = wireSelected.value.has(wire.id) ? ed.wireSel.value.filter(id => id !== wire.id) : [...ed.wireSel.value, wire.id]
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (isDoubleClick(`w:${wire.id}`)) {
|
||||||
|
ed.selectNet(wire.id)
|
||||||
|
ed.selection.value = []
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!wireSelected.value.has(wire.id)) {
|
||||||
|
ed.wireSel.value = [wire.id]
|
||||||
|
ed.selection.value = []
|
||||||
|
}
|
||||||
|
const prep = e.altKey ? splitDrag(route.pts, index, w) : segmentDrag(route.pts, index)
|
||||||
|
if (prep) drag.value = { kind: 'segment', wire, ...prep, start: w[prep.axis], moved: false }
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPointerMove(e: PointerEvent) {
|
function onPointerMove(e: PointerEvent) {
|
||||||
|
|
@ -314,21 +346,30 @@ function onPointerMove(e: PointerEvent) {
|
||||||
const x1 = Math.max(d.start[0], w[0])
|
const x1 = Math.max(d.start[0], w[0])
|
||||||
const y0 = Math.min(d.start[1], w[1])
|
const y0 = Math.min(d.start[1], w[1])
|
||||||
const y1 = Math.max(d.start[1], w[1])
|
const y1 = Math.max(d.start[1], w[1])
|
||||||
const hits = def.value.nodes
|
const nodes = def.value.nodes
|
||||||
.filter(n => {
|
.filter(n => {
|
||||||
const b = shapes.value.get(n.id)!.body
|
const b = shapes.value.get(n.id)!.body
|
||||||
return n.x + b.x < x1 && n.x + b.x + b.w > x0 && n.y + b.y < y1 && n.y + b.y + b.h > y0
|
return n.x + b.x < x1 && n.x + b.x + b.w > x0 && n.y + b.y < y1 && n.y + b.y + b.h > y0
|
||||||
})
|
})
|
||||||
.map(n => n.id)
|
.map(n => n.id)
|
||||||
ed.selection.value = [...new Set([...d.base, ...hits])]
|
const wires = routes.value.filter(r => r.pts.every(([x, y]) => x >= x0 && x <= x1 && y >= y0 && y <= y1)).map(r => r.wire.id)
|
||||||
|
ed.selection.value = [...new Set([...d.nodes, ...nodes])]
|
||||||
|
ed.wireSel.value = [...new Set([...d.wires, ...wires])]
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case 'segment': {
|
case 'segment': {
|
||||||
const delta = Math.round(w[d.axis] - d.start)
|
const delta = Math.round(w[d.axis] - d.start)
|
||||||
const pts = d.base.map(p => [...p] as Pt)
|
if (!delta && !d.moved) break
|
||||||
pts[d.index]![d.axis] += delta
|
d.moved = true
|
||||||
pts[d.index + 1]![d.axis] += delta
|
d.wire.pts = moveSegment(d.base, d.k, d.axis, delta)
|
||||||
d.wire.pts = simplify(pts).slice(1, -1)
|
break
|
||||||
|
}
|
||||||
|
case 'corner': {
|
||||||
|
const to: Pt = [Math.round(w[0]), Math.round(w[1])]
|
||||||
|
const at = d.route[d.i]!
|
||||||
|
if (!d.moved && to[0] === at[0] && to[1] === at[1]) break
|
||||||
|
d.moved = true
|
||||||
|
d.wire.pts = moveCorner(d.route, d.i, to)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -366,19 +407,31 @@ function onPointerUp() {
|
||||||
const target = nearestPin(d.cur, d.dir === 'out' ? 'in' : 'out')
|
const target = nearestPin(d.cur, d.dir === 'out' ? 'in' : 'out')
|
||||||
if (!target) break
|
if (!target) break
|
||||||
const here = { node: d.node, pin: d.pin }
|
const here = { node: d.node, pin: d.pin }
|
||||||
if (d.dir === 'out') ed.connect(here, target)
|
if (d.dir === 'in') {
|
||||||
else ed.connect(target, here)
|
ed.connect(target, here)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
let corners = d.branch
|
||||||
|
if (corners) {
|
||||||
|
const fn = nodeMap.value.get(d.node)!
|
||||||
|
const tn = nodeMap.value.get(target.node)!
|
||||||
|
const a = pinPos(fn, shapes.value.get(fn.id)!, d.pin, 'out')!
|
||||||
|
const b = pinPos(tn, shapes.value.get(tn.id)!, target.pin, 'in')!
|
||||||
|
corners = branchTo(corners, [a.x, a.y], [b.x, b.y])
|
||||||
|
}
|
||||||
|
ed.connect(here, target, corners)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case 'segment':
|
case 'segment':
|
||||||
ed.commit(false)
|
case 'corner':
|
||||||
|
if (d.moved) ed.commit(false)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onDoubleClick(node: CircuitNode) {
|
function onDoubleClick(node: CircuitNode) {
|
||||||
if (node.kind === 'chip' && node.chip) ed.open(node.chip)
|
if (node.kind === 'chip' && node.chip) ed.open(node.chip)
|
||||||
else if (['input', 'output', 'lamp', 'button', 'note'].includes(node.kind)) {
|
else if (['input', 'output', 'lamp', 'button', 'note', 'hex'].includes(node.kind)) {
|
||||||
ed.selection.value = [node.id]
|
ed.selection.value = [node.id]
|
||||||
ed.labelFocus.value++
|
ed.labelFocus.value++
|
||||||
}
|
}
|
||||||
|
|
@ -392,10 +445,39 @@ function onWheel(e: WheelEvent) {
|
||||||
|
|
||||||
// ── Keyboard ────────────────────────────────────────────────────────
|
// ── Keyboard ────────────────────────────────────────────────────────
|
||||||
const QUICK: Record<string, CircuitNode['kind']> = { n: 'nand', i: 'input', o: 'output', l: 'lamp', c: 'clock', b: 'button', h: 'hex', t: 'note' }
|
const QUICK: Record<string, CircuitNode['kind']> = { n: 'nand', i: 'input', o: 'output', l: 'lamp', c: 'clock', b: 'button', h: 'hex', t: 'note' }
|
||||||
|
const ARROWS: Record<string, Pt> = { ArrowLeft: [-1, 0], ArrowRight: [1, 0], ArrowUp: [0, -1], ArrowDown: [0, 1] }
|
||||||
|
|
||||||
|
/** Arrow keys: move the selected parts and wires one grid step (four with Shift). */
|
||||||
|
function nudge(dx: number, dy: number) {
|
||||||
|
const ids = new Set(ed.selection.value)
|
||||||
|
if (!ids.size && !ed.wireSel.value.length) return
|
||||||
|
for (const n of def.value.nodes) {
|
||||||
|
if (!ids.has(n.id)) continue
|
||||||
|
n.x += dx
|
||||||
|
n.y += dy
|
||||||
|
}
|
||||||
|
for (const r of routes.value) {
|
||||||
|
const both = ids.has(r.wire.from.node) && ids.has(r.wire.to.node)
|
||||||
|
if (wireSelected.value.has(r.wire.id)) {
|
||||||
|
const pts = r.wire.pts ?? r.pts.slice(1, -1)
|
||||||
|
r.wire.pts = pts.map(([x, y]) => [x + dx, y + dy])
|
||||||
|
} else if (both && r.wire.pts) {
|
||||||
|
r.wire.pts = r.wire.pts.map(([x, y]) => [x + dx, y + dy])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ed.commit(false)
|
||||||
|
}
|
||||||
|
|
||||||
function onKey(e: KeyboardEvent) {
|
function onKey(e: KeyboardEvent) {
|
||||||
const el = e.target as HTMLElement
|
const el = e.target as HTMLElement
|
||||||
if (el.closest('input, textarea, select, [contenteditable]')) return
|
if (el.closest('input, textarea, select, [contenteditable]')) return
|
||||||
|
if (ed.dialog.value || ed.showHelp.value) {
|
||||||
|
if (e.key === 'Escape') {
|
||||||
|
ed.dialog.value = null
|
||||||
|
ed.showHelp.value = false
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
const mod = e.ctrlKey || e.metaKey
|
const mod = e.ctrlKey || e.metaKey
|
||||||
const key = e.key.toLowerCase()
|
const key = e.key.toLowerCase()
|
||||||
if (mod && key === 'z') {
|
if (mod && key === 'z') {
|
||||||
|
|
@ -418,9 +500,12 @@ function onKey(e: KeyboardEvent) {
|
||||||
ed.deleteSelected()
|
ed.deleteSelected()
|
||||||
} else if (e.key === 'Escape') {
|
} else if (e.key === 'Escape') {
|
||||||
ed.placing.value = null
|
ed.placing.value = null
|
||||||
ed.selection.value = []
|
ed.clearSelection()
|
||||||
ed.selectedWire.value = null
|
} else if (ARROWS[e.key]) {
|
||||||
ed.showHelp.value = false
|
e.preventDefault()
|
||||||
|
const [dx, dy] = ARROWS[e.key]!
|
||||||
|
const step = e.shiftKey ? 4 : 1
|
||||||
|
nudge(dx * step, dy * step)
|
||||||
} else if (e.key === ' ') {
|
} else if (e.key === ' ') {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
spaceDown.value = true
|
spaceDown.value = true
|
||||||
|
|
@ -450,7 +535,10 @@ const tempWire = computed(() => {
|
||||||
const tp = pinPos(tn, shapes.value.get(tn.id)!, target.pin, d.dir === 'out' ? 'in' : 'out')!
|
const tp = pinPos(tn, shapes.value.get(tn.id)!, target.pin, d.dir === 'out' ? 'in' : 'out')!
|
||||||
end = [tp.x, tp.y]
|
end = [tp.x, tp.y]
|
||||||
}
|
}
|
||||||
const pts = d.dir === 'out' ? routeWire([p.x, p.y], end) : routeWire(end, [p.x, p.y])
|
const pts =
|
||||||
|
d.dir === 'out'
|
||||||
|
? routeWire([p.x, p.y], end, d.branch && branchTo(d.branch, [p.x, p.y], end))
|
||||||
|
: routeWire(end, [p.x, p.y])
|
||||||
return { d: toPath(pts), snapped: !!target }
|
return { d: toPath(pts), snapped: !!target }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -465,6 +553,13 @@ const boxRect = computed(() => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/** Corner handles of the selected wires. */
|
||||||
|
const handles = computed(() =>
|
||||||
|
routes.value
|
||||||
|
.filter(r => wireSelected.value.has(r.wire.id))
|
||||||
|
.flatMap(r => r.pts.slice(1, -1).map((p, i) => ({ wire: r.wire.id, i: i + 1, x: p[0], y: p[1] }))),
|
||||||
|
)
|
||||||
|
|
||||||
const gridSize = computed(() => G * view.value.zoom)
|
const gridSize = computed(() => G * view.value.zoom)
|
||||||
const flow = computed(() => ed.project.value.settings.flow)
|
const flow = computed(() => ed.project.value.settings.flow)
|
||||||
const cursorStyle = computed(() => {
|
const cursorStyle = computed(() => {
|
||||||
|
|
@ -510,8 +605,12 @@ defineExpose({ fit, zoomAt })
|
||||||
v-for="r in routes"
|
v-for="r in routes"
|
||||||
:key="r.wire.id"
|
:key="r.wire.id"
|
||||||
class="wire"
|
class="wire"
|
||||||
:class="{ on: srcVal(r.src) === 1, selected: ed.selectedWire.value === r.wire.id }"
|
:class="[
|
||||||
|
r.wire.color ? `c-${r.wire.color}` : '',
|
||||||
|
{ on: srcVal(r.src) === 1, selected: wireSelected.has(r.wire.id), hover: hoverSrc === r.src },
|
||||||
|
]"
|
||||||
>
|
>
|
||||||
|
<path v-if="wireSelected.has(r.wire.id)" :d="r.d" class="wire-halo" />
|
||||||
<path :d="r.d" class="wire-line" />
|
<path :d="r.d" class="wire-line" />
|
||||||
<path v-if="flow && srcVal(r.src) === 1" :d="r.d" class="wire-flow" />
|
<path v-if="flow && srcVal(r.src) === 1" :d="r.d" class="wire-flow" />
|
||||||
<path
|
<path
|
||||||
|
|
@ -519,20 +618,16 @@ defineExpose({ fit, zoomAt })
|
||||||
:key="i"
|
:key="i"
|
||||||
:d="`M${p[0] * G} ${p[1] * G}L${r.pts[i + 1]![0] * G} ${r.pts[i + 1]![1] * G}`"
|
:d="`M${p[0] * G} ${p[1] * G}L${r.pts[i + 1]![0] * G} ${r.pts[i + 1]![1] * G}`"
|
||||||
class="wire-hit"
|
class="wire-hit"
|
||||||
:class="{ draggable: i >= 1 && i + 1 <= r.pts.length - 2, vertical: p[0] === r.pts[i + 1]![0] }"
|
:class="{ vertical: p[0] === r.pts[i + 1]![0] }"
|
||||||
:data-wire="r.wire.id"
|
:data-wire="r.wire.id"
|
||||||
:data-seg="i"
|
:data-seg="i"
|
||||||
|
@pointerenter="hoverSrc = r.src"
|
||||||
|
@pointerleave="hoverSrc = null"
|
||||||
/>
|
/>
|
||||||
</g>
|
</g>
|
||||||
<circle
|
<g v-for="(j, i) in junctions" :key="`j${i}`" class="wire" :class="[j.color ? `c-${j.color}` : '', { on: srcVal(j.src) === 1 }]">
|
||||||
v-for="(j, i) in junctions"
|
<circle :cx="j.x * G" :cy="j.y * G" r="3.2" class="junction" />
|
||||||
:key="`j${i}`"
|
</g>
|
||||||
:cx="j.x * G"
|
|
||||||
:cy="j.y * G"
|
|
||||||
r="3.2"
|
|
||||||
class="junction"
|
|
||||||
:class="{ on: srcVal(j.src) === 1 }"
|
|
||||||
/>
|
|
||||||
</g>
|
</g>
|
||||||
|
|
||||||
<EditorNodeView
|
<EditorNodeView
|
||||||
|
|
@ -543,6 +638,19 @@ defineExpose({ fit, zoomAt })
|
||||||
:selected="selected.has(n.id)"
|
:selected="selected.has(n.id)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<rect
|
||||||
|
v-for="h in handles"
|
||||||
|
:key="`${h.wire}-${h.i}`"
|
||||||
|
:x="h.x * G - 3.5"
|
||||||
|
:y="h.y * G - 3.5"
|
||||||
|
width="7"
|
||||||
|
height="7"
|
||||||
|
rx="1.5"
|
||||||
|
class="corner-handle"
|
||||||
|
:data-wire="h.wire"
|
||||||
|
:data-corner="h.i"
|
||||||
|
/>
|
||||||
|
|
||||||
<path v-if="tempWire" :d="tempWire.d" class="temp-wire" :class="{ snapped: tempWire.snapped }" />
|
<path v-if="tempWire" :d="tempWire.d" class="temp-wire" :class="{ snapped: tempWire.snapped }" />
|
||||||
<EditorNodeView v-if="ghost" :node="ghost" :shape="ed.shape(ghost)" :selected="false" ghost />
|
<EditorNodeView v-if="ghost" :node="ghost" :shape="ed.shape(ghost)" :selected="false" ghost />
|
||||||
<rect v-if="boxRect" v-bind="boxRect" class="box-select" />
|
<rect v-if="boxRect" v-bind="boxRect" class="box-select" />
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,12 @@ const ed = useEditor()
|
||||||
const SHORTCUTS: [string, string][] = [
|
const SHORTCUTS: [string, string][] = [
|
||||||
['Click switch', 'Flip an input between 0 and 1'],
|
['Click switch', 'Flip an input between 0 and 1'],
|
||||||
['Drag from a pin', 'Draw a wire to another pin'],
|
['Drag from a pin', 'Draw a wire to another pin'],
|
||||||
['Drag a wire segment', 'Reroute the wire'],
|
['Drag a wire segment', 'Move that segment; drag a corner square to move a bend'],
|
||||||
|
['Alt + drag a wire', 'Pull a new bend out of it'],
|
||||||
|
['Ctrl + drag a wire', 'Start a new wire from the same signal'],
|
||||||
|
['Double-click a wire', 'Select the whole signal'],
|
||||||
|
['Shift + click', 'Add parts or wires to the selection'],
|
||||||
|
['Arrow keys', 'Move the selection one step (Shift: four)'],
|
||||||
['Double-click a component', 'Open it and see inside'],
|
['Double-click a component', 'Open it and see inside'],
|
||||||
['Drag on empty space', 'Select several parts'],
|
['Drag on empty space', 'Select several parts'],
|
||||||
['Right or middle drag, Space + drag', 'Move the view'],
|
['Right or middle drag, Space + drag', 'Move the view'],
|
||||||
|
|
@ -57,7 +62,7 @@ function close() {
|
||||||
<dd>{{ v }}</dd>
|
<dd>{{ v }}</dd>
|
||||||
</template>
|
</template>
|
||||||
</dl>
|
</dl>
|
||||||
<p class="hint">Your work is saved in this browser. Use Project → Export to keep a copy or move it to another computer.</p>
|
<p class="hint">Your work is saved in this browser. Use Share to get a link or export a file.</p>
|
||||||
<button class="btn btn-primary mt-4" @click="close">Start building</button>
|
<button class="btn btn-primary mt-4" @click="close">Start building</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { CHALLENGES } from '~/lib/logic/challenges'
|
||||||
import { compile } from '~/lib/logic/compile'
|
import { compile } from '~/lib/logic/compile'
|
||||||
import { chipPins } from '~/lib/logic/geometry'
|
import { chipPins } from '~/lib/logic/geometry'
|
||||||
import { usages } from '~/lib/logic/ops'
|
import { usages } from '~/lib/logic/ops'
|
||||||
import type { SymbolKind } from '~/lib/logic/types'
|
import { WIRE_COLORS, type SymbolKind } from '~/lib/logic/types'
|
||||||
|
|
||||||
const ed = useEditor()
|
const ed = useEditor()
|
||||||
const def = ed.def
|
const def = ed.def
|
||||||
|
|
@ -35,11 +35,18 @@ const SYMBOLS: { value: SymbolKind; label: string }[] = [
|
||||||
{ value: 'xnor', label: 'XNOR gate' },
|
{ value: 'xnor', label: 'XNOR gate' },
|
||||||
]
|
]
|
||||||
|
|
||||||
const single = computed(() => (ed.selection.value.length === 1 ? def.value.nodes.find(n => n.id === ed.selection.value[0]) : undefined))
|
const single = computed(() =>
|
||||||
const wire = computed(() => def.value.wires.find(w => w.id === ed.selectedWire.value))
|
ed.selection.value.length === 1 && !ed.wireSel.value.length ? def.value.nodes.find(n => n.id === ed.selection.value[0]) : undefined,
|
||||||
|
)
|
||||||
|
const wires = ed.selectedWires
|
||||||
|
const wireColor = computed(() => {
|
||||||
|
const colors = new Set(wires.value.map(w => w.color ?? ''))
|
||||||
|
return colors.size === 1 ? [...colors][0] : null
|
||||||
|
})
|
||||||
|
const hasFace = computed(() => def.value.nodes.some(n => n.kind === 'lamp' || n.kind === 'hex'))
|
||||||
const chipDef = computed(() => (single.value?.chip ? ed.getDef.value(single.value.chip) : undefined))
|
const chipDef = computed(() => (single.value?.chip ? ed.getDef.value(single.value.chip) : undefined))
|
||||||
const chipStats = computed(() => (chipDef.value ? stats(compile(ed.getDef.value, chipDef.value.id)) : null))
|
const chipStats = computed(() => (chipDef.value ? stats(compile(ed.getDef.value, chipDef.value.id)) : null))
|
||||||
const hasLabel = computed(() => !!single.value && ['input', 'output', 'lamp', 'button', 'note'].includes(single.value.kind))
|
const hasLabel = computed(() => !!single.value && ['input', 'output', 'lamp', 'button', 'note', 'hex'].includes(single.value.kind))
|
||||||
|
|
||||||
const labelInput = ref<HTMLInputElement | HTMLTextAreaElement>()
|
const labelInput = ref<HTMLInputElement | HTMLTextAreaElement>()
|
||||||
const nameInput = ref<HTMLInputElement>()
|
const nameInput = ref<HTMLInputElement>()
|
||||||
|
|
@ -79,9 +86,8 @@ function runCheck() {
|
||||||
check.value = ed.checkChallenge()
|
check.value = ed.checkChallenge()
|
||||||
}
|
}
|
||||||
|
|
||||||
const resetRoute = () => {
|
function toggleFace(e: Event) {
|
||||||
if (!wire.value) return
|
def.value.face = (e.target as HTMLInputElement).checked
|
||||||
delete wire.value.pts
|
|
||||||
ed.commit(false)
|
ed.commit(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -128,8 +134,10 @@ watch(() => def.value.id, () => (confirmDelete.value = false))
|
||||||
<button class="btn btn-ghost mt-2 w-full" @click="ed.deleteSelected()"><Icon name="lucide:trash-2" class="size-4" /> Delete</button>
|
<button class="btn btn-ghost mt-2 w-full" @click="ed.deleteSelected()"><Icon name="lucide:trash-2" class="size-4" /> Delete</button>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section v-else-if="ed.selection.value.length > 1">
|
<section v-else-if="ed.selection.value.length > 1 || (ed.selection.value.length && wires.length)">
|
||||||
<h3>{{ ed.selection.value.length }} parts selected</h3>
|
<h3>
|
||||||
|
{{ ed.selection.value.length }} part{{ ed.selection.value.length === 1 ? '' : 's' }}<template v-if="wires.length">, {{ wires.length }} wire{{ wires.length === 1 ? '' : 's' }}</template> selected
|
||||||
|
</h3>
|
||||||
<p class="hint">Turn them into a reusable component. Wires that cross the selection border become its pins.</p>
|
<p class="hint">Turn them into a reusable component. Wires that cross the selection border become its pins.</p>
|
||||||
<label class="field">
|
<label class="field">
|
||||||
<span>Component name</span>
|
<span>Component name</span>
|
||||||
|
|
@ -139,10 +147,33 @@ watch(() => def.value.id, () => (confirmDelete.value = false))
|
||||||
<button class="btn btn-ghost mt-2 w-full" @click="ed.deleteSelected()"><Icon name="lucide:trash-2" class="size-4" /> Delete</button>
|
<button class="btn btn-ghost mt-2 w-full" @click="ed.deleteSelected()"><Icon name="lucide:trash-2" class="size-4" /> Delete</button>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section v-else-if="wire">
|
<section v-else-if="wires.length">
|
||||||
<h3>Wire</h3>
|
<h3>{{ wires.length === 1 ? 'Wire' : `${wires.length} wires` }}</h3>
|
||||||
<p class="hint">Drag a middle segment to reroute it.</p>
|
<div class="field">
|
||||||
<button v-if="wire.pts" class="btn w-full" @click="resetRoute"><Icon name="lucide:undo-2" class="size-4" /> Automatic route</button>
|
<span>Colour</span>
|
||||||
|
<div class="swatches">
|
||||||
|
<button class="swatch none" :class="{ active: wireColor === '' }" title="Default" @click="ed.setWireColor(undefined)" />
|
||||||
|
<button
|
||||||
|
v-for="c in WIRE_COLORS"
|
||||||
|
:key="c"
|
||||||
|
class="swatch"
|
||||||
|
:class="[`c-${c}`, { active: wireColor === c }]"
|
||||||
|
:title="c"
|
||||||
|
@click="ed.setWireColor(c)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<ul class="tips">
|
||||||
|
<li><strong>Drag</strong> a segment to move it, a <strong>corner square</strong> to move a bend.</li>
|
||||||
|
<li><strong>Alt + drag</strong> pulls a new bend out of a segment.</li>
|
||||||
|
<li><strong>Ctrl + drag</strong> starts a new wire from this signal.</li>
|
||||||
|
<li><strong>Double-click</strong> selects the whole signal, <strong>Shift + click</strong> adds wires.</li>
|
||||||
|
<li><strong>Arrow keys</strong> shift the selected wires.</li>
|
||||||
|
</ul>
|
||||||
|
<div class="grid grid-cols-2 gap-2">
|
||||||
|
<button v-if="wires.length === 1" class="btn" @click="ed.selectNet(wires[0]!.id)"><Icon name="lucide:git-fork" class="size-4" /> Whole signal</button>
|
||||||
|
<button class="btn" :disabled="!wires.some(w => w.pts)" @click="ed.autoRoute()"><Icon name="lucide:wand-sparkles" class="size-4" /> Auto route</button>
|
||||||
|
</div>
|
||||||
<button class="btn btn-ghost mt-2 w-full" @click="ed.deleteSelected()"><Icon name="lucide:trash-2" class="size-4" /> Delete</button>
|
<button class="btn btn-ghost mt-2 w-full" @click="ed.deleteSelected()"><Icon name="lucide:trash-2" class="size-4" /> Delete</button>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
@ -187,6 +218,10 @@ watch(() => def.value.id, () => (confirmDelete.value = false))
|
||||||
</datalist>
|
</datalist>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<label v-if="hasFace" class="check">
|
||||||
|
<input type="checkbox" :checked="def.face !== false" @change="toggleFace" />
|
||||||
|
Show its lamps and displays on the component box
|
||||||
|
</label>
|
||||||
<dl class="stats">
|
<dl class="stats">
|
||||||
<dt>Pins</dt>
|
<dt>Pins</dt>
|
||||||
<dd>{{ pins.inputs.length }} in, {{ pins.outputs.length }} out</dd>
|
<dd>{{ pins.inputs.length }} in, {{ pins.outputs.length }} out</dd>
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,10 @@ const chipDef = computed(() => (props.node.chip ? ed.getDef.value(props.node.chi
|
||||||
const b = computed(() => props.shape.body)
|
const b = computed(() => props.shape.body)
|
||||||
|
|
||||||
const v = (pin: string) => (props.ghost ? 0 : ed.val(props.node.id, pin))
|
const v = (pin: string) => (props.ghost ? 0 : ed.val(props.node.id, pin))
|
||||||
|
/** Value inside this chip, for its lamps and displays. */
|
||||||
|
const fv = (inner: string, pin: string) => (props.ghost ? 0 : ed.faceVal(props.node.id, inner, pin))
|
||||||
|
const faceHex = (inner: string) => sevenSegment([0, 1, 2, 3].reduce((n, i) => n + (fv(inner, `b${i}`) << i), 0))
|
||||||
|
const FACE_SCALE = 0.6
|
||||||
const hexValue = computed(() => [0, 1, 2, 3].reduce((n, i) => n + (v(`b${i}`) << i), 0))
|
const hexValue = computed(() => [0, 1, 2, 3].reduce((n, i) => n + (v(`b${i}`) << i), 0))
|
||||||
const segments = computed(() => sevenSegment(hexValue.value))
|
const segments = computed(() => sevenSegment(hexValue.value))
|
||||||
const lit = computed(() => v(props.node.kind === 'input' || props.node.kind === 'button' || props.node.kind === 'clock' ? 'q' : 'a') === 1)
|
const lit = computed(() => v(props.node.kind === 'input' || props.node.kind === 'button' || props.node.kind === 'clock' ? 'q' : 'a') === 1)
|
||||||
|
|
@ -48,7 +52,19 @@ const title = computed(() => {
|
||||||
<!-- Component box -->
|
<!-- Component box -->
|
||||||
<template v-else-if="node.kind === 'chip'">
|
<template v-else-if="node.kind === 'chip'">
|
||||||
<rect :x="0" :y="b.y * G" :width="b.w * G" :height="b.h * G" rx="3" class="body chip" :class="{ missing: !chipDef }" />
|
<rect :x="0" :y="b.y * G" :width="b.w * G" :height="b.h * G" rx="3" class="body chip" :class="{ missing: !chipDef }" />
|
||||||
<text :x="(b.w * G) / 2" :y="(b.y + b.h / 2) * G + 4" text-anchor="middle" class="chip-name">{{ chipDef?.name ?? 'Missing' }}</text>
|
<text :x="(b.w * G) / 2" :y="(shape.nameY ?? b.y + b.h / 2) * G + 4" text-anchor="middle" class="chip-name">{{ chipDef?.name ?? 'Missing' }}</text>
|
||||||
|
<template v-for="f in shape.face" :key="f.id">
|
||||||
|
<template v-if="f.kind === 'lamp'">
|
||||||
|
<circle :cx="(f.x + f.w / 2) * G" :cy="(f.y + 0.6) * G" :r="0.42 * G" class="lamp" :class="{ on: fv(f.id, 'a') === 1 }" />
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<rect :x="(f.x + f.w / 2 - 0.62) * G" :y="f.y * G" :width="1.24 * G" :height="2.2 * G" rx="2" class="display" />
|
||||||
|
<g :transform="`translate(${(f.x + f.w / 2) * G - 1.75 * G * FACE_SCALE} ${(f.y + 0.16) * G}) scale(${FACE_SCALE})`">
|
||||||
|
<path v-for="(s, i) in faceHex(f.id)" :key="i" :d="s.d" class="seg" :class="{ on: s.on }" />
|
||||||
|
</g>
|
||||||
|
</template>
|
||||||
|
<text v-if="f.label" :x="(f.x + f.w / 2) * G" :y="(f.y + f.h - 0.15) * G" text-anchor="middle" class="face-label">{{ f.label }}</text>
|
||||||
|
</template>
|
||||||
<text v-for="p in shape.inputs" :key="p.key" :x="5" :y="p.dy * G + 3.5" class="pin-label">{{ p.label }}</text>
|
<text v-for="p in shape.inputs" :key="p.key" :x="5" :y="p.dy * G + 3.5" class="pin-label">{{ p.label }}</text>
|
||||||
<text v-for="p in shape.outputs" :key="p.key" :x="b.w * G - 5" :y="p.dy * G + 3.5" text-anchor="end" class="pin-label">{{ p.label }}</text>
|
<text v-for="p in shape.outputs" :key="p.key" :x="b.w * G - 5" :y="p.dy * G + 3.5" text-anchor="end" class="pin-label">{{ p.label }}</text>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -108,6 +124,7 @@ const title = computed(() => {
|
||||||
<rect x="0" :y="b.y * G" :width="b.w * G" :height="b.h * G" rx="3" class="body display" />
|
<rect x="0" :y="b.y * G" :width="b.w * G" :height="b.h * G" rx="3" class="body display" />
|
||||||
<path v-for="(s, i) in segments" :key="i" :d="s.d" class="seg" :class="{ on: s.on }" />
|
<path v-for="(s, i) in segments" :key="i" :d="s.d" class="seg" :class="{ on: s.on }" />
|
||||||
<text v-for="p in shape.inputs" :key="p.key" :x="4" :y="p.dy * G + 3" class="pin-label tiny">{{ p.label }}</text>
|
<text v-for="p in shape.inputs" :key="p.key" :x="4" :y="p.dy * G + 3" class="pin-label tiny">{{ p.label }}</text>
|
||||||
|
<text v-if="node.label" :x="(b.w * G) / 2" :y="(b.y + b.h) * G + 12" text-anchor="middle" class="face-label">{{ node.label }}</text>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- Note -->
|
<!-- Note -->
|
||||||
|
|
|
||||||
|
|
@ -112,10 +112,13 @@ const started = computed(() => new Map(ed.project.value.components.filter(d => d
|
||||||
</ul>
|
</ul>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<div class="px-3 pt-2 pb-4">
|
<div class="grid gap-2 px-3 pt-2 pb-4">
|
||||||
<button class="btn w-full" @click="ed.createComponent()">
|
<button class="btn w-full" @click="ed.createComponent()">
|
||||||
<Icon name="lucide:plus" class="size-4" /> New component
|
<Icon name="lucide:plus" class="size-4" /> New component
|
||||||
</button>
|
</button>
|
||||||
|
<button class="btn btn-ghost w-full" title="NOT, AND, … up to a 4-bit counter, all built from NAND" @click="ed.loadExamples()">
|
||||||
|
<Icon name="lucide:library" class="size-4" /> Add example parts
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,78 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
const ed = useEditor()
|
||||||
|
const fileInput = ref<HTMLInputElement>()
|
||||||
|
const renaming = ref<string | null>(null)
|
||||||
|
const renameText = ref('')
|
||||||
|
const confirmDelete = ref<string | null>(null)
|
||||||
|
|
||||||
|
const close = () => (ed.dialog.value = null)
|
||||||
|
const when = (t: number) => new Intl.DateTimeFormat(undefined, { dateStyle: 'medium', timeStyle: 'short' }).format(t)
|
||||||
|
|
||||||
|
function open(id: string) {
|
||||||
|
ed.switchProject(id)
|
||||||
|
close()
|
||||||
|
}
|
||||||
|
|
||||||
|
function startRename(id: string, name: string) {
|
||||||
|
renaming.value = id
|
||||||
|
renameText.value = name
|
||||||
|
nextTick(() => document.querySelector<HTMLInputElement>('.project-list input')?.select())
|
||||||
|
}
|
||||||
|
|
||||||
|
function finishRename() {
|
||||||
|
if (renaming.value) ed.renameProject(renaming.value, renameText.value)
|
||||||
|
renaming.value = null
|
||||||
|
}
|
||||||
|
|
||||||
|
function onFile(e: Event) {
|
||||||
|
const file = (e.target as HTMLInputElement).files?.[0]
|
||||||
|
if (file) ed.importAsProject(file).then(close)
|
||||||
|
;(e.target as HTMLInputElement).value = ''
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="modal-backdrop" @click.self="close">
|
||||||
|
<div class="modal" role="dialog" aria-labelledby="projects-title">
|
||||||
|
<div class="flex items-start justify-between gap-4">
|
||||||
|
<h2 id="projects-title">Projects</h2>
|
||||||
|
<button class="tb-btn" title="Close" @click="close"><Icon name="lucide:x" class="size-4" /></button>
|
||||||
|
</div>
|
||||||
|
<p class="hint mt-1">Saved in this browser as you work. Projects with a link are also saved online.</p>
|
||||||
|
|
||||||
|
<ul class="project-list">
|
||||||
|
<li v-for="m in ed.projects.value" :key="m.id" :class="{ current: m.id === ed.meta.value.id }">
|
||||||
|
<input
|
||||||
|
v-if="renaming === m.id"
|
||||||
|
v-model="renameText"
|
||||||
|
class="rename"
|
||||||
|
@keydown.enter="finishRename"
|
||||||
|
@keydown.esc="renaming = null"
|
||||||
|
@blur="finishRename"
|
||||||
|
/>
|
||||||
|
<button v-else class="pick" @click="open(m.id)">
|
||||||
|
<span class="name">
|
||||||
|
{{ m.name }}
|
||||||
|
<span v-if="m.id === ed.meta.value.id" class="badge">open</span>
|
||||||
|
</span>
|
||||||
|
<span class="meta">
|
||||||
|
{{ when(m.updated) }}
|
||||||
|
<template v-if="m.link"> · <Icon name="lucide:link" class="size-3" /> {{ m.link.key ? 'your link' : 'from a link' }}</template>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button class="icon-btn" title="Rename" @click="startRename(m.id, m.name)"><Icon name="lucide:pencil" class="size-3.5" /></button>
|
||||||
|
<button class="icon-btn" title="Duplicate" @click="ed.duplicateProject(m.id); close()"><Icon name="lucide:copy" class="size-3.5" /></button>
|
||||||
|
<button v-if="confirmDelete !== m.id" class="icon-btn" title="Delete" @click="confirmDelete = m.id"><Icon name="lucide:trash-2" class="size-3.5" /></button>
|
||||||
|
<button v-else class="btn-sm btn-danger" @click="ed.deleteProject(m.id); confirmDelete = null">Delete?</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="mt-4 flex flex-wrap gap-2">
|
||||||
|
<button class="btn" @click="ed.newProject(false); close()"><Icon name="lucide:file" class="size-4" /> New (NAND only)</button>
|
||||||
|
<button class="btn" @click="ed.newProject(true); close()"><Icon name="lucide:file-plus" class="size-4" /> New with examples</button>
|
||||||
|
<button class="btn" @click="fileInput?.click()"><Icon name="lucide:folder-open" class="size-4" /> Open file</button>
|
||||||
|
<input ref="fileInput" type="file" accept="application/json,.json" class="hidden" @change="onFile" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
const ed = useEditor()
|
||||||
|
const fileInput = ref<HTMLInputElement>()
|
||||||
|
const close = () => (ed.dialog.value = null)
|
||||||
|
|
||||||
|
const STATUS: Record<string, string> = {
|
||||||
|
saved: 'Saved online',
|
||||||
|
dirty: 'Changes are saved online in a moment',
|
||||||
|
saving: 'Saving…',
|
||||||
|
}
|
||||||
|
|
||||||
|
function onFile(e: Event) {
|
||||||
|
const file = (e.target as HTMLInputElement).files?.[0]
|
||||||
|
if (file) ed.importComponents(file)
|
||||||
|
;(e.target as HTMLInputElement).value = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectAll(e: Event) {
|
||||||
|
;(e.target as HTMLInputElement).select()
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="modal-backdrop" @click.self="close">
|
||||||
|
<div class="modal share" role="dialog" aria-labelledby="share-title">
|
||||||
|
<div class="flex items-start justify-between gap-4">
|
||||||
|
<h2 id="share-title">Save and share</h2>
|
||||||
|
<button class="tb-btn" title="Close" @click="close"><Icon name="lucide:x" class="size-4" /></button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3>Link</h3>
|
||||||
|
<template v-if="ed.linkState.value === 'none'">
|
||||||
|
<p class="hint">
|
||||||
|
Save "{{ ed.project.value.name }}" online and get a link. Anyone with the link opens their own copy; only you can change what the link shows.
|
||||||
|
</p>
|
||||||
|
<button class="btn btn-primary" @click="ed.createLink()"><Icon name="lucide:link" class="size-4" /> Create link</button>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<div class="link-row">
|
||||||
|
<input :value="ed.linkUrl.value" readonly @focus="selectAll" />
|
||||||
|
<button class="btn btn-primary" @click="ed.copyText(ed.linkUrl.value)"><Icon name="lucide:copy" class="size-4" /> Copy</button>
|
||||||
|
</div>
|
||||||
|
<p v-if="ed.linkState.value === 'viewer'" class="hint mt-2">
|
||||||
|
You opened this from someone else's link. As soon as you change something it becomes your own copy, and you can share your own link.
|
||||||
|
</p>
|
||||||
|
<template v-else>
|
||||||
|
<p v-if="ed.linkState.value === 'error'" class="result fail">
|
||||||
|
<Icon name="lucide:circle-x" class="size-4 shrink-0" /> Could not save: {{ ed.linkError.value }}
|
||||||
|
<button class="btn-sm ml-auto" @click="ed.pushLink()">Retry</button>
|
||||||
|
</p>
|
||||||
|
<p v-else class="result pass">
|
||||||
|
<Icon :name="ed.linkState.value === 'saved' ? 'lucide:cloud-check' : 'lucide:cloud-upload'" class="size-4 shrink-0" />
|
||||||
|
{{ STATUS[ed.linkState.value] }}
|
||||||
|
</p>
|
||||||
|
<p class="hint mt-2">Your changes go to this link automatically. The address bar shows it too, so you can bookmark it.</p>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<h3>File</h3>
|
||||||
|
<p class="hint">A file keeps everything offline: send it by mail, keep a backup, or move to another computer.</p>
|
||||||
|
<div class="flex flex-wrap gap-2">
|
||||||
|
<button class="btn" @click="ed.exportJson()"><Icon name="lucide:download" class="size-4" /> Export project</button>
|
||||||
|
<button class="btn" title="Adds the components from a project file to this project" @click="fileInput?.click()">
|
||||||
|
<Icon name="lucide:upload" class="size-4" /> Add components from file
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-ghost" @click="ed.dialog.value = 'projects'"><Icon name="lucide:folder-open" class="size-4" /> Open file as project</button>
|
||||||
|
<input ref="fileInput" type="file" accept="application/json,.json" class="hidden" @change="onFile" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const ed = useEditor()
|
const ed = useEditor()
|
||||||
const menu = ref(false)
|
|
||||||
const fileInput = ref<HTMLInputElement>()
|
|
||||||
const confirmNew = ref<null | 'empty' | 'examples'>(null)
|
|
||||||
|
|
||||||
const SPEEDS = [
|
const SPEEDS = [
|
||||||
{ value: 0.5, label: '0.5 Hz' },
|
{ value: 0.5, label: '0.5 Hz' },
|
||||||
|
|
@ -20,19 +17,19 @@ const backName = computed(() => {
|
||||||
const id = ed.nav.value.at(-1)
|
const id = ed.nav.value.at(-1)
|
||||||
return id ? ed.getDef.value(id)?.name : undefined
|
return id ? ed.getDef.value(id)?.name : undefined
|
||||||
})
|
})
|
||||||
|
const linkIcon = computed(() => {
|
||||||
function onFile(e: Event) {
|
switch (ed.linkState.value) {
|
||||||
const file = (e.target as HTMLInputElement).files?.[0]
|
case 'saved':
|
||||||
if (file) ed.importJson(file)
|
return 'lucide:cloud-check'
|
||||||
;(e.target as HTMLInputElement).value = ''
|
case 'saving':
|
||||||
menu.value = false
|
case 'dirty':
|
||||||
}
|
return 'lucide:cloud-upload'
|
||||||
|
case 'error':
|
||||||
function doNew() {
|
return 'lucide:cloud-alert'
|
||||||
if (confirmNew.value) ed.newProject(confirmNew.value === 'examples')
|
default:
|
||||||
confirmNew.value = null
|
return 'lucide:share-2'
|
||||||
menu.value = false
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -43,14 +40,18 @@ function doNew() {
|
||||||
<path d="M6 7h10a9 9 0 0 1 0 18H6Z" fill="none" stroke="currentColor" stroke-width="2.5" />
|
<path d="M6 7h10a9 9 0 0 1 0 18H6Z" fill="none" stroke="currentColor" stroke-width="2.5" />
|
||||||
<circle cx="27" cy="16" r="2.6" fill="none" stroke="currentColor" stroke-width="2.2" />
|
<circle cx="27" cy="16" r="2.6" fill="none" stroke="currentColor" stroke-width="2.2" />
|
||||||
</svg>
|
</svg>
|
||||||
<span>Logigate</span>
|
<span class="hidden xl:inline">Logigate</span>
|
||||||
</div>
|
</div>
|
||||||
|
<button class="tb-btn project-btn" title="Your projects" @click="ed.dialog.value = 'projects'">
|
||||||
|
<Icon name="lucide:folder" class="size-4 shrink-0" />
|
||||||
|
<span class="truncate">{{ ed.project.value.name }}</span>
|
||||||
|
<Icon name="lucide:chevron-down" class="size-3.5 shrink-0 text-(--muted)" />
|
||||||
|
</button>
|
||||||
|
<span class="text-(--border)">/</span>
|
||||||
<button v-if="backName" class="tb-btn" :title="`Back to ${backName}`" @click="ed.back()">
|
<button v-if="backName" class="tb-btn" :title="`Back to ${backName}`" @click="ed.back()">
|
||||||
<Icon name="lucide:arrow-left" class="size-4" />
|
<Icon name="lucide:arrow-left" class="size-4" />
|
||||||
<span class="hidden truncate lg:inline">{{ backName }}</span>
|
|
||||||
</button>
|
</button>
|
||||||
<label class="circuit-select" title="Circuit you are editing">
|
<label class="circuit-select" title="Circuit you are editing">
|
||||||
<Icon name="lucide:cpu" class="size-4 shrink-0 text-(--muted)" />
|
|
||||||
<select :value="ed.def.value.id" @change="ed.open(($event.target as HTMLSelectElement).value)">
|
<select :value="ed.def.value.id" @change="ed.open(($event.target as HTMLSelectElement).value)">
|
||||||
<option v-for="d in ed.project.value.components" :key="d.id" :value="d.id">{{ d.name }}</option>
|
<option v-for="d in ed.project.value.components" :key="d.id" :value="d.id">{{ d.name }}</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -83,39 +84,21 @@ function doNew() {
|
||||||
<button class="tb-btn" title="Undo (Ctrl+Z)" :disabled="!ed.canUndo.value" @click="ed.undo()"><Icon name="lucide:undo-2" class="size-4" /></button>
|
<button class="tb-btn" title="Undo (Ctrl+Z)" :disabled="!ed.canUndo.value" @click="ed.undo()"><Icon name="lucide:undo-2" class="size-4" /></button>
|
||||||
<button class="tb-btn" title="Redo (Ctrl+Shift+Z)" :disabled="!ed.canRedo.value" @click="ed.redo()"><Icon name="lucide:redo-2" class="size-4" /></button>
|
<button class="tb-btn" title="Redo (Ctrl+Shift+Z)" :disabled="!ed.canRedo.value" @click="ed.redo()"><Icon name="lucide:redo-2" class="size-4" /></button>
|
||||||
<div class="seg" title="Gate symbols">
|
<div class="seg" title="Gate symbols">
|
||||||
<button :class="{ active: ed.project.value.settings.symbols === 'iec' }" @click="ed.project.value.settings.symbols = 'iec'; ed.commit(false)">IEC</button>
|
<button :class="{ active: ed.project.value.settings.symbols === 'iec' }" @click="ed.project.value.settings.symbols = 'iec'; ed.persist()">IEC</button>
|
||||||
<button :class="{ active: ed.project.value.settings.symbols === 'ansi' }" @click="ed.project.value.settings.symbols = 'ansi'; ed.commit(false)">ANSI</button>
|
<button :class="{ active: ed.project.value.settings.symbols === 'ansi' }" @click="ed.project.value.settings.symbols = 'ansi'; ed.persist()">ANSI</button>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
class="tb-btn"
|
class="tb-btn"
|
||||||
:class="{ active: ed.project.value.settings.flow }"
|
:class="{ active: ed.project.value.settings.flow }"
|
||||||
title="Animate current flow"
|
title="Animate current flow"
|
||||||
@click="ed.project.value.settings.flow = !ed.project.value.settings.flow; ed.commit(false)"
|
@click="ed.project.value.settings.flow = !ed.project.value.settings.flow; ed.persist()"
|
||||||
>
|
>
|
||||||
<Icon name="lucide:zap" class="size-4" />
|
<Icon name="lucide:zap" class="size-4" />
|
||||||
</button>
|
</button>
|
||||||
<div class="relative">
|
<button class="tb-btn share-btn" :class="ed.linkState.value" title="Save online, share a link, export or import a file" @click="ed.dialog.value = 'share'">
|
||||||
<button class="tb-btn" title="Project" @click="menu = !menu"><Icon name="lucide:folder" class="size-4" /><span class="hidden md:inline">Project</span></button>
|
<Icon :name="linkIcon" class="size-4" />
|
||||||
<div v-if="menu" class="menu-backdrop" @click="menu = false; confirmNew = null" />
|
<span class="hidden md:inline">Share</span>
|
||||||
<div v-if="menu" class="menu">
|
</button>
|
||||||
<template v-if="!confirmNew">
|
|
||||||
<button @click="ed.exportJson(); menu = false"><Icon name="lucide:download" class="size-4" /> Export as file</button>
|
|
||||||
<button @click="fileInput?.click()"><Icon name="lucide:upload" class="size-4" /> Import file</button>
|
|
||||||
<hr />
|
|
||||||
<button @click="ed.loadExamples(); menu = false"><Icon name="lucide:library" class="size-4" /> Add example parts</button>
|
|
||||||
<button @click="confirmNew = 'empty'"><Icon name="lucide:file" class="size-4" /> New project (NAND only)</button>
|
|
||||||
<button @click="confirmNew = 'examples'"><Icon name="lucide:file-plus" class="size-4" /> New project with examples</button>
|
|
||||||
</template>
|
|
||||||
<div v-else class="p-2 text-sm">
|
|
||||||
<p class="mb-2">Replace the current project? Export it first if you want to keep it.</p>
|
|
||||||
<div class="flex gap-2">
|
|
||||||
<button class="btn btn-danger grow" @click="doNew">Replace</button>
|
|
||||||
<button class="btn grow" @click="confirmNew = null">Cancel</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<input ref="fileInput" type="file" accept="application/json,.json" class="hidden" @change="onFile" />
|
|
||||||
</div>
|
|
||||||
<button class="tb-btn" title="Help (?)" @click="ed.showHelp.value = true"><Icon name="lucide:circle-help" class="size-4" /></button>
|
<button class="tb-btn" title="Help (?)" @click="ed.showHelp.value = true"><Icon name="lucide:circle-help" class="size-4" /></button>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
// Editor state: the project, selection, undo history and the running
|
// Editor state: the project library, the open project, selection, undo
|
||||||
// simulation of the open circuit. One shared instance for the whole page.
|
// history, share links and the running simulation of the open circuit.
|
||||||
|
// One shared instance for the whole page.
|
||||||
|
|
||||||
import { runSteps, stats, truthTable, type Stats, type TestResult, type TruthTable } from '~/lib/logic/analyze'
|
import { runSteps, stats, truthTable, type Stats, type TestResult, type TruthTable } from '~/lib/logic/analyze'
|
||||||
import { CHALLENGES, challengeSteps, type Challenge } from '~/lib/logic/challenges'
|
import { CHALLENGES, challengeSteps, type Challenge } from '~/lib/logic/challenges'
|
||||||
import { compile } from '~/lib/logic/compile'
|
import { compile } from '~/lib/logic/compile'
|
||||||
import { shapeOf } from '~/lib/logic/geometry'
|
import { shapeOf, type Pt } from '~/lib/logic/geometry'
|
||||||
import {
|
import {
|
||||||
addExamples,
|
addExamples,
|
||||||
containsDef,
|
containsDef,
|
||||||
|
|
@ -13,6 +14,7 @@ import {
|
||||||
deleteComponent,
|
deleteComponent,
|
||||||
duplicateComponent,
|
duplicateComponent,
|
||||||
lookup,
|
lookup,
|
||||||
|
mergeComponents,
|
||||||
newComponent,
|
newComponent,
|
||||||
packageSelection,
|
packageSelection,
|
||||||
pasteClip,
|
pasteClip,
|
||||||
|
|
@ -21,9 +23,21 @@ import {
|
||||||
uid,
|
uid,
|
||||||
type Clip,
|
type Clip,
|
||||||
} from '~/lib/logic/ops'
|
} from '~/lib/logic/ops'
|
||||||
|
import { parseProject, toProject } from '~/lib/logic/project'
|
||||||
import { Simulator } from '~/lib/logic/sim'
|
import { Simulator } from '~/lib/logic/sim'
|
||||||
import { loadLocal, parseProject, saveLocal } from '~/lib/logic/storage'
|
import {
|
||||||
import type { CircuitNode, NodeKind, PinRef, Project } from '~/lib/logic/types'
|
currentId,
|
||||||
|
listProjects,
|
||||||
|
loadProject,
|
||||||
|
migrateLegacy,
|
||||||
|
newLocalId,
|
||||||
|
removeProject,
|
||||||
|
saveMeta,
|
||||||
|
saveProject,
|
||||||
|
setCurrentId,
|
||||||
|
type ProjectMeta,
|
||||||
|
} from '~/lib/logic/storage'
|
||||||
|
import type { CircuitNode, NodeKind, PinRef, Project, WireColor } from '~/lib/logic/types'
|
||||||
|
|
||||||
export interface Placing {
|
export interface Placing {
|
||||||
kind: NodeKind
|
kind: NodeKind
|
||||||
|
|
@ -37,21 +51,51 @@ export interface View {
|
||||||
zoom: number
|
zoom: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type LinkState = 'none' | 'viewer' | 'dirty' | 'saving' | 'saved' | 'error'
|
||||||
|
|
||||||
const BUDGET = 300_000
|
const BUDGET = 300_000
|
||||||
|
|
||||||
function create() {
|
function create() {
|
||||||
const project = ref<Project>(loadLocal() ?? createProject({ examples: true }))
|
// ── Library ───────────────────────────────────────────────────────
|
||||||
|
migrateLegacy()
|
||||||
|
const projects = ref<ProjectMeta[]>(listProjects())
|
||||||
|
|
||||||
|
function initial(): { meta: ProjectMeta; project: Project } {
|
||||||
|
const list = listProjects()
|
||||||
|
const id = currentId()
|
||||||
|
for (const m of [list.find(m => m.id === id), ...list]) {
|
||||||
|
if (!m) continue
|
||||||
|
const p = loadProject(m.id)
|
||||||
|
if (p) return { meta: m, project: p }
|
||||||
|
}
|
||||||
|
const project = createProject({ examples: true })
|
||||||
|
const meta: ProjectMeta = { id: newLocalId(), name: project.name, updated: Date.now() }
|
||||||
|
// A first visit through a share link should not leave an unused starter
|
||||||
|
// project behind; it is saved only once something changes in it.
|
||||||
|
placeholder = location.pathname.startsWith('/p/')
|
||||||
|
if (!placeholder) saveProject(meta, project)
|
||||||
|
return { meta, project }
|
||||||
|
}
|
||||||
|
|
||||||
|
let placeholder = false
|
||||||
|
|
||||||
|
const start = initial()
|
||||||
|
const meta = ref<ProjectMeta>(start.meta)
|
||||||
|
const project = ref<Project>(start.project)
|
||||||
|
setCurrentId(start.meta.id)
|
||||||
|
|
||||||
const getDef = computed(() => lookup(project.value))
|
const getDef = computed(() => lookup(project.value))
|
||||||
const def = computed(() => getDef.value(project.value.openId) ?? project.value.components[0]!)
|
const def = computed(() => getDef.value(project.value.openId) ?? project.value.components[0]!)
|
||||||
|
|
||||||
const selection = ref<string[]>([])
|
const selection = ref<string[]>([])
|
||||||
const selectedWire = ref<string | null>(null)
|
const wireSel = ref<string[]>([])
|
||||||
const placing = ref<Placing | null>(null)
|
const placing = ref<Placing | null>(null)
|
||||||
const nav = ref<string[]>([])
|
const nav = ref<string[]>([])
|
||||||
const views = reactive<Record<string, View>>({})
|
const views = reactive<Record<string, View>>({})
|
||||||
const notice = ref<{ text: string; kind: 'ok' | 'error' } | null>(null)
|
const notice = ref<{ text: string; kind: 'ok' | 'error' } | null>(null)
|
||||||
const labelFocus = ref(0)
|
const labelFocus = ref(0)
|
||||||
const showHelp = ref(false)
|
const showHelp = ref(false)
|
||||||
|
const dialog = ref<null | 'projects' | 'share'>(null)
|
||||||
|
|
||||||
let noticeTimer: ReturnType<typeof setTimeout> | undefined
|
let noticeTimer: ReturnType<typeof setTimeout> | undefined
|
||||||
function notify(text: string, kind: 'ok' | 'error' = 'ok') {
|
function notify(text: string, kind: 'ok' | 'error' = 'ok') {
|
||||||
|
|
@ -60,6 +104,28 @@ function create() {
|
||||||
noticeTimer = setTimeout(() => (notice.value = null), 3500)
|
noticeTimer = setTimeout(() => (notice.value = null), 3500)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clearSelection() {
|
||||||
|
selection.value = []
|
||||||
|
wireSel.value = []
|
||||||
|
}
|
||||||
|
|
||||||
|
// ── Saving ────────────────────────────────────────────────────────
|
||||||
|
let saveTimer: ReturnType<typeof setTimeout> | undefined
|
||||||
|
function persistNow() {
|
||||||
|
clearTimeout(saveTimer)
|
||||||
|
saveTimer = undefined
|
||||||
|
meta.value = { ...meta.value, name: project.value.name, updated: Date.now() }
|
||||||
|
if (!saveProject(toRaw(meta.value), toRaw(project.value))) notify('Browser storage is full. Export your project to keep it.', 'error')
|
||||||
|
projects.value = listProjects()
|
||||||
|
}
|
||||||
|
|
||||||
|
function persist() {
|
||||||
|
placeholder = false
|
||||||
|
clearTimeout(saveTimer)
|
||||||
|
saveTimer = setTimeout(persistNow, 300)
|
||||||
|
scheduleSync()
|
||||||
|
}
|
||||||
|
|
||||||
// ── History ───────────────────────────────────────────────────────
|
// ── History ───────────────────────────────────────────────────────
|
||||||
const snap = () => JSON.stringify({ components: project.value.components, solved: project.value.solved })
|
const snap = () => JSON.stringify({ components: project.value.components, solved: project.value.solved })
|
||||||
let last = snap()
|
let last = snap()
|
||||||
|
|
@ -68,10 +134,12 @@ function create() {
|
||||||
const canUndo = ref(false)
|
const canUndo = ref(false)
|
||||||
const canRedo = ref(false)
|
const canRedo = ref(false)
|
||||||
|
|
||||||
let saveTimer: ReturnType<typeof setTimeout> | undefined
|
function resetHistory() {
|
||||||
function persist() {
|
undoStack.length = 0
|
||||||
clearTimeout(saveTimer)
|
redoStack.length = 0
|
||||||
saveTimer = setTimeout(() => saveLocal(toRaw(project.value)), 300)
|
last = snap()
|
||||||
|
canUndo.value = false
|
||||||
|
canRedo.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Record a change. Structural changes (parts, wires) rebuild the simulation. */
|
/** Record a change. Structural changes (parts, wires) rebuild the simulation. */
|
||||||
|
|
@ -85,6 +153,7 @@ function create() {
|
||||||
last = s
|
last = s
|
||||||
canUndo.value = true
|
canUndo.value = true
|
||||||
canRedo.value = false
|
canRedo.value = false
|
||||||
|
forkIfViewer()
|
||||||
persist()
|
persist()
|
||||||
if (structural) scheduleRebuild()
|
if (structural) scheduleRebuild()
|
||||||
}
|
}
|
||||||
|
|
@ -96,7 +165,7 @@ function create() {
|
||||||
if (!project.value.components.some(d => d.id === project.value.openId)) project.value.openId = project.value.components[0]!.id
|
if (!project.value.components.some(d => d.id === project.value.openId)) project.value.openId = project.value.components[0]!.id
|
||||||
last = s
|
last = s
|
||||||
selection.value = selection.value.filter(id => def.value.nodes.some(n => n.id === id))
|
selection.value = selection.value.filter(id => def.value.nodes.some(n => n.id === id))
|
||||||
selectedWire.value = null
|
wireSel.value = wireSel.value.filter(id => def.value.wires.some(w => w.id === id))
|
||||||
canUndo.value = undoStack.length > 0
|
canUndo.value = undoStack.length > 0
|
||||||
canRedo.value = redoStack.length > 0
|
canRedo.value = redoStack.length > 0
|
||||||
persist()
|
persist()
|
||||||
|
|
@ -132,16 +201,17 @@ function create() {
|
||||||
function rebuild() {
|
function rebuild() {
|
||||||
const d = def.value
|
const d = def.value
|
||||||
const nl = compile(getDef.value, d.id)
|
const nl = compile(getDef.value, d.id)
|
||||||
const carry = sim.value && simRoot === d.id ? sim.value.carry() : undefined
|
const key = `${meta.value.id}/${d.id}`
|
||||||
|
const carry = sim.value && simRoot === key ? sim.value.carry() : undefined
|
||||||
const s = new Simulator(nl, carry)
|
const s = new Simulator(nl, carry)
|
||||||
for (const n of d.nodes) {
|
for (const n of d.nodes) {
|
||||||
if (n.kind === 'input') s.setSource(n.id, !!n.on)
|
if (n.kind === 'input') s.setSource(n.id, !!n.on)
|
||||||
else if (n.kind === 'button') s.setSource(n.id, pressed.has(n.id))
|
else if (n.kind === 'button') s.setSource(n.id, pressed.has(n.id))
|
||||||
}
|
}
|
||||||
s.run(BUDGET)
|
s.run(BUDGET)
|
||||||
if (simRoot !== d.id) cycles.value = 0
|
if (simRoot !== key) cycles.value = 0
|
||||||
sim.value = s
|
sim.value = s
|
||||||
simRoot = d.id
|
simRoot = key
|
||||||
errors.value = nl.errors
|
errors.value = nl.errors
|
||||||
circuitStats.value = stats(nl)
|
circuitStats.value = stats(nl)
|
||||||
tick.value++
|
tick.value++
|
||||||
|
|
@ -163,6 +233,12 @@ function create() {
|
||||||
return sim.value?.pin(nodeId, pin) ?? 0
|
return sim.value?.pin(nodeId, pin) ?? 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Value at a lamp or display inside a chip of the open circuit. */
|
||||||
|
function faceVal(chipNode: string, inner: string, pin: string): number {
|
||||||
|
void tick.value
|
||||||
|
return sim.value?.face(chipNode, inner, pin) ?? 0
|
||||||
|
}
|
||||||
|
|
||||||
let raf = 0
|
let raf = 0
|
||||||
function startLoop() {
|
function startLoop() {
|
||||||
let lastT = performance.now()
|
let lastT = performance.now()
|
||||||
|
|
@ -232,8 +308,7 @@ function create() {
|
||||||
if (id === def.value.id || !getDef.value(id)) return
|
if (id === def.value.id || !getDef.value(id)) return
|
||||||
if (push) nav.value.push(def.value.id)
|
if (push) nav.value.push(def.value.id)
|
||||||
project.value.openId = id
|
project.value.openId = id
|
||||||
selection.value = []
|
clearSelection()
|
||||||
selectedWire.value = null
|
|
||||||
placing.value = null
|
placing.value = null
|
||||||
persist()
|
persist()
|
||||||
rebuild()
|
rebuild()
|
||||||
|
|
@ -262,7 +337,7 @@ function create() {
|
||||||
if (p.kind === 'note') node.label = 'Note'
|
if (p.kind === 'note') node.label = 'Note'
|
||||||
def.value.nodes.push(node)
|
def.value.nodes.push(node)
|
||||||
selection.value = [node.id]
|
selection.value = [node.id]
|
||||||
selectedWire.value = null
|
wireSel.value = []
|
||||||
commit()
|
commit()
|
||||||
return node
|
return node
|
||||||
}
|
}
|
||||||
|
|
@ -271,26 +346,53 @@ function create() {
|
||||||
return !containsDef(project.value, chipId, def.value.id)
|
return !containsDef(project.value, chipId, def.value.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
function connect(from: PinRef, to: PinRef) {
|
function connect(from: PinRef, to: PinRef, pts?: Pt[]) {
|
||||||
const d = def.value
|
const d = def.value
|
||||||
d.wires = d.wires.filter(w => !(w.to.node === to.node && w.to.pin === to.pin))
|
const old = d.wires.find(w => w.to.node === to.node && w.to.pin === to.pin)
|
||||||
d.wires.push({ id: uid('w'), from, to })
|
d.wires = d.wires.filter(w => w !== old)
|
||||||
|
const wire: (typeof d.wires)[number] = { id: uid('w'), from, to }
|
||||||
|
if (pts?.length) wire.pts = pts
|
||||||
|
const sameNet = d.wires.find(w => w.from.node === from.node && w.from.pin === from.pin && w.color)
|
||||||
|
if (sameNet?.color) wire.color = sameNet.color
|
||||||
|
d.wires.push(wire)
|
||||||
|
wireSel.value = []
|
||||||
commit()
|
commit()
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteSelected() {
|
function deleteSelected() {
|
||||||
const d = def.value
|
const d = def.value
|
||||||
if (selection.value.length) {
|
if (!selection.value.length && !wireSel.value.length) return
|
||||||
const ids = new Set(selection.value)
|
const ids = new Set(selection.value)
|
||||||
|
const wires = new Set(wireSel.value)
|
||||||
d.nodes = d.nodes.filter(n => !ids.has(n.id))
|
d.nodes = d.nodes.filter(n => !ids.has(n.id))
|
||||||
d.wires = d.wires.filter(w => !ids.has(w.from.node) && !ids.has(w.to.node))
|
d.wires = d.wires.filter(w => !ids.has(w.from.node) && !ids.has(w.to.node) && !wires.has(w.id))
|
||||||
selection.value = []
|
clearSelection()
|
||||||
commit()
|
|
||||||
} else if (selectedWire.value) {
|
|
||||||
d.wires = d.wires.filter(w => w.id !== selectedWire.value)
|
|
||||||
selectedWire.value = null
|
|
||||||
commit()
|
commit()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const selectedWires = computed(() => {
|
||||||
|
const ids = new Set(wireSel.value)
|
||||||
|
return def.value.wires.filter(w => ids.has(w.id))
|
||||||
|
})
|
||||||
|
|
||||||
|
function setWireColor(color: WireColor | undefined) {
|
||||||
|
for (const w of selectedWires.value) {
|
||||||
|
if (color) w.color = color
|
||||||
|
else delete w.color
|
||||||
|
}
|
||||||
|
commit(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
function autoRoute() {
|
||||||
|
for (const w of selectedWires.value) delete w.pts
|
||||||
|
commit(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Select every wire that carries the same signal (same source pin). */
|
||||||
|
function selectNet(wireId: string) {
|
||||||
|
const w = def.value.wires.find(x => x.id === wireId)
|
||||||
|
if (!w) return
|
||||||
|
wireSel.value = def.value.wires.filter(x => x.from.node === w.from.node && x.from.pin === w.from.pin).map(x => x.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleInput(node: CircuitNode) {
|
function toggleInput(node: CircuitNode) {
|
||||||
|
|
@ -318,12 +420,10 @@ function create() {
|
||||||
if (!clip) return
|
if (!clip) return
|
||||||
pasteCount++
|
pasteCount++
|
||||||
const blocked = clip.nodes.filter(n => n.kind === 'chip' && n.chip && !canPlace(n.chip))
|
const blocked = clip.nodes.filter(n => n.kind === 'chip' && n.chip && !canPlace(n.chip))
|
||||||
const usable: Clip = blocked.length
|
const usable: Clip = blocked.length ? { nodes: clip.nodes.filter(n => !blocked.includes(n)), wires: clip.wires } : clip
|
||||||
? { nodes: clip.nodes.filter(n => !blocked.includes(n)), wires: clip.wires }
|
|
||||||
: clip
|
|
||||||
if (blocked.length) notify('Skipped parts that would contain this circuit itself', 'error')
|
if (blocked.length) notify('Skipped parts that would contain this circuit itself', 'error')
|
||||||
selection.value = pasteClip(def.value, usable, 2 * pasteCount, 2 * pasteCount)
|
selection.value = pasteClip(def.value, usable, 2 * pasteCount, 2 * pasteCount)
|
||||||
selectedWire.value = null
|
wireSel.value = []
|
||||||
commit()
|
commit()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -334,7 +434,7 @@ function create() {
|
||||||
|
|
||||||
function selectAll() {
|
function selectAll() {
|
||||||
selection.value = def.value.nodes.map(n => n.id)
|
selection.value = def.value.nodes.map(n => n.id)
|
||||||
selectedWire.value = null
|
wireSel.value = def.value.wires.map(w => w.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
function packageSelected(name: string) {
|
function packageSelected(name: string) {
|
||||||
|
|
@ -344,6 +444,7 @@ function create() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
selection.value = [res.chipNode]
|
selection.value = [res.chipNode]
|
||||||
|
wireSel.value = []
|
||||||
commit()
|
commit()
|
||||||
notify(`Created component "${res.def.name}"`)
|
notify(`Created component "${res.def.name}"`)
|
||||||
}
|
}
|
||||||
|
|
@ -394,24 +495,78 @@ function create() {
|
||||||
return truthTable(getDef.value, def.value.id)
|
return truthTable(getDef.value, def.value.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── Project ───────────────────────────────────────────────────────
|
// ── Projects ──────────────────────────────────────────────────────
|
||||||
function replaceProject(p: Project) {
|
function activate(m: ProjectMeta, p: Project) {
|
||||||
|
meta.value = m
|
||||||
project.value = p
|
project.value = p
|
||||||
undoStack.length = 0
|
setCurrentId(m.id)
|
||||||
redoStack.length = 0
|
resetHistory()
|
||||||
last = snap()
|
|
||||||
canUndo.value = false
|
|
||||||
canRedo.value = false
|
|
||||||
nav.value = []
|
nav.value = []
|
||||||
selection.value = []
|
clearSelection()
|
||||||
selectedWire.value = null
|
placing.value = null
|
||||||
simRoot = ''
|
for (const k of Object.keys(views)) delete views[k]
|
||||||
persist()
|
linkState.value = m.link ? (m.link.key ? 'saved' : 'viewer') : 'none'
|
||||||
|
projects.value = listProjects()
|
||||||
|
syncUrl()
|
||||||
rebuild()
|
rebuild()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function switchProject(id: string) {
|
||||||
|
if (id === meta.value.id) return
|
||||||
|
persistNow()
|
||||||
|
const p = loadProject(id)
|
||||||
|
const m = listProjects().find(x => x.id === id)
|
||||||
|
if (!p || !m) return notify('Could not open that project', 'error')
|
||||||
|
activate(m, p)
|
||||||
|
}
|
||||||
|
|
||||||
|
function addProject(p: Project, link?: ProjectMeta['link']): ProjectMeta {
|
||||||
|
const m: ProjectMeta = { id: newLocalId(), name: p.name, updated: Date.now() }
|
||||||
|
if (link) m.link = link
|
||||||
|
saveProject(m, p)
|
||||||
|
return m
|
||||||
|
}
|
||||||
|
|
||||||
function newProject(examples: boolean) {
|
function newProject(examples: boolean) {
|
||||||
replaceProject(createProject({ examples }))
|
persistNow()
|
||||||
|
const p = createProject({ examples })
|
||||||
|
activate(addProject(p), p)
|
||||||
|
}
|
||||||
|
|
||||||
|
function duplicateProject(id: string) {
|
||||||
|
persistNow()
|
||||||
|
const p = loadProject(id)
|
||||||
|
if (!p) return
|
||||||
|
p.name = `${p.name} copy`
|
||||||
|
activate(addProject(p), p)
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteProject(id: string) {
|
||||||
|
removeProject(id)
|
||||||
|
projects.value = listProjects()
|
||||||
|
if (id !== meta.value.id) return
|
||||||
|
const next = projects.value[0]
|
||||||
|
const p = next && loadProject(next.id)
|
||||||
|
if (next && p) activate(next, p)
|
||||||
|
else {
|
||||||
|
const fresh = createProject({ examples: true })
|
||||||
|
activate(addProject(fresh), fresh)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function renameProject(id: string, name: string) {
|
||||||
|
const clean = name.trim().slice(0, 80) || 'Untitled'
|
||||||
|
if (id === meta.value.id) {
|
||||||
|
project.value.name = clean
|
||||||
|
persist()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const p = loadProject(id)
|
||||||
|
const m = listProjects().find(x => x.id === id)
|
||||||
|
if (!p || !m) return
|
||||||
|
p.name = clean
|
||||||
|
saveProject({ ...m, name: clean }, p)
|
||||||
|
projects.value = listProjects()
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadExamples() {
|
function loadExamples() {
|
||||||
|
|
@ -420,24 +575,161 @@ function create() {
|
||||||
notify(n ? `Added ${n} example parts` : 'All examples are already here')
|
notify(n ? `Added ${n} example parts` : 'All examples are already here')
|
||||||
}
|
}
|
||||||
|
|
||||||
function exportJson() {
|
function download(name: string, text: string) {
|
||||||
const blob = new Blob([JSON.stringify(project.value, null, 1)], { type: 'application/json' })
|
const blob = new Blob([text], { type: 'application/json' })
|
||||||
const a = document.createElement('a')
|
const a = document.createElement('a')
|
||||||
a.href = URL.createObjectURL(blob)
|
a.href = URL.createObjectURL(blob)
|
||||||
a.download = `logigate-${new Date().toISOString().slice(0, 10)}.json`
|
a.download = name
|
||||||
a.click()
|
a.click()
|
||||||
URL.revokeObjectURL(a.href)
|
URL.revokeObjectURL(a.href)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function importJson(file: File) {
|
function exportJson() {
|
||||||
|
persistNow()
|
||||||
|
const slug = project.value.name.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '') || 'project'
|
||||||
|
download(`${slug}.logigate.json`, JSON.stringify(project.value, null, 1))
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Opens a project file as a new project in the library. */
|
||||||
|
async function importAsProject(file: File) {
|
||||||
try {
|
try {
|
||||||
replaceProject(parseProject(await file.text()))
|
const p = parseProject(await file.text())
|
||||||
notify(`Loaded ${file.name}`)
|
if (p.name === 'Untitled') p.name = file.name.replace(/(\.logigate)?\.json$/i, '')
|
||||||
|
persistNow()
|
||||||
|
activate(addProject(p), p)
|
||||||
|
notify(`Opened ${file.name}`)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
notify((e as Error).message, 'error')
|
notify((e as Error).message, 'error')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Adds the components of a project file to the open project. */
|
||||||
|
async function importComponents(file: File) {
|
||||||
|
try {
|
||||||
|
const p = parseProject(await file.text())
|
||||||
|
const n = mergeComponents(project.value, p.components)
|
||||||
|
commit()
|
||||||
|
notify(n ? `Added ${n} component${n === 1 ? '' : 's'} from ${file.name}` : 'Nothing new in that file')
|
||||||
|
} catch (e) {
|
||||||
|
notify((e as Error).message, 'error')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ── Share links ───────────────────────────────────────────────────
|
||||||
|
const linkState = ref<LinkState>(meta.value.link ? (meta.value.link.key ? 'saved' : 'viewer') : 'none')
|
||||||
|
const linkError = ref('')
|
||||||
|
const linkUrl = computed(() => (meta.value.link ? `${location.origin}/p/${meta.value.link.id}` : ''))
|
||||||
|
|
||||||
|
function syncUrl() {
|
||||||
|
const path = meta.value.link ? `/p/${meta.value.link.id}` : '/'
|
||||||
|
if (location.pathname !== path) history.replaceState(history.state, '', path)
|
||||||
|
}
|
||||||
|
|
||||||
|
async function api<T>(method: string, url: string, body?: unknown, key?: string): Promise<T> {
|
||||||
|
const res = await fetch(url, {
|
||||||
|
method,
|
||||||
|
headers: { 'content-type': 'application/json', ...(key ? { 'x-edit-key': key } : {}) },
|
||||||
|
body: body === undefined ? undefined : JSON.stringify(body),
|
||||||
|
})
|
||||||
|
const data = await res.json().catch(() => ({}))
|
||||||
|
if (!res.ok) throw new Error((data as { message?: string }).message || `Server error ${res.status}`)
|
||||||
|
return data as T
|
||||||
|
}
|
||||||
|
|
||||||
|
async function createLink() {
|
||||||
|
persistNow()
|
||||||
|
linkState.value = 'saving'
|
||||||
|
try {
|
||||||
|
const res = await api<{ id: string; key: string }>('POST', '/api/p', { project: toRaw(project.value) })
|
||||||
|
meta.value = { ...meta.value, link: { id: res.id, key: res.key } }
|
||||||
|
saveMeta(toRaw(meta.value))
|
||||||
|
projects.value = listProjects()
|
||||||
|
linkState.value = 'saved'
|
||||||
|
syncUrl()
|
||||||
|
} catch (e) {
|
||||||
|
linkError.value = (e as Error).message
|
||||||
|
linkState.value = 'error'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let syncTimer: ReturnType<typeof setTimeout> | undefined
|
||||||
|
let syncing = false
|
||||||
|
async function pushLink() {
|
||||||
|
const link = meta.value.link
|
||||||
|
if (!link?.key) return
|
||||||
|
if (syncing) return scheduleSync()
|
||||||
|
syncing = true
|
||||||
|
linkState.value = 'saving'
|
||||||
|
try {
|
||||||
|
await api('PUT', `/api/p/${link.id}`, { project: toRaw(project.value) }, link.key)
|
||||||
|
linkState.value = 'saved'
|
||||||
|
} catch (e) {
|
||||||
|
linkError.value = (e as Error).message
|
||||||
|
linkState.value = 'error'
|
||||||
|
} finally {
|
||||||
|
syncing = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** The person who made a link saves to it automatically, a few seconds after each change. */
|
||||||
|
function scheduleSync() {
|
||||||
|
if (!meta.value.link?.key) return
|
||||||
|
linkState.value = 'dirty'
|
||||||
|
clearTimeout(syncTimer)
|
||||||
|
syncTimer = setTimeout(pushLink, 2500)
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Editing someone else's shared project turns it into your own copy. */
|
||||||
|
function forkIfViewer() {
|
||||||
|
if (!meta.value.link || meta.value.link.key) return
|
||||||
|
meta.value = { ...meta.value, link: undefined }
|
||||||
|
saveMeta(toRaw(meta.value))
|
||||||
|
linkState.value = 'none'
|
||||||
|
syncUrl()
|
||||||
|
notify('This is now your own copy. Share it to get your own link.')
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Opens /p/:id: your own linked project, or a fresh copy of someone else's. */
|
||||||
|
async function openLink(id: string) {
|
||||||
|
const list = listProjects()
|
||||||
|
const own = list.find(m => m.link?.id === id && m.link.key)
|
||||||
|
if (own) {
|
||||||
|
if (own.id !== meta.value.id) switchProject(own.id)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const res = await fetch(`/api/p/${encodeURIComponent(id)}`)
|
||||||
|
if (!res.ok) throw new Error(res.status === 404 ? 'This link does not exist' : 'Could not load the link')
|
||||||
|
const data = (await res.json()) as { project: unknown }
|
||||||
|
const p = toProject(data.project)
|
||||||
|
if (!placeholder) persistNow()
|
||||||
|
const viewer = list.find(m => m.link?.id === id && !m.link.key)
|
||||||
|
if (viewer) {
|
||||||
|
const m = { ...viewer, name: p.name, updated: Date.now() }
|
||||||
|
saveProject(m, p)
|
||||||
|
activate(m, p)
|
||||||
|
} else activate(addProject(p, { id }), p)
|
||||||
|
notify(`Opened "${p.name}" from a shared link`)
|
||||||
|
} catch (e) {
|
||||||
|
notify((e as Error).message, 'error')
|
||||||
|
if (placeholder) persistNow()
|
||||||
|
syncUrl()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function copyText(text: string) {
|
||||||
|
try {
|
||||||
|
await navigator.clipboard.writeText(text)
|
||||||
|
notify('Link copied')
|
||||||
|
} catch {
|
||||||
|
notify('Copy failed; select the link and copy it by hand', 'error')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener('beforeunload', () => {
|
||||||
|
if (saveTimer) persistNow()
|
||||||
|
})
|
||||||
|
|
||||||
function shape(node: CircuitNode) {
|
function shape(node: CircuitNode) {
|
||||||
return shapeOf(node, getDef.value)
|
return shapeOf(node, getDef.value)
|
||||||
}
|
}
|
||||||
|
|
@ -446,18 +738,24 @@ function create() {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
project,
|
project,
|
||||||
|
meta,
|
||||||
|
projects,
|
||||||
getDef,
|
getDef,
|
||||||
def,
|
def,
|
||||||
selection,
|
selection,
|
||||||
selectedWire,
|
wireSel,
|
||||||
|
selectedWires,
|
||||||
|
clearSelection,
|
||||||
placing,
|
placing,
|
||||||
nav,
|
nav,
|
||||||
views,
|
views,
|
||||||
notice,
|
notice,
|
||||||
labelFocus,
|
labelFocus,
|
||||||
showHelp,
|
showHelp,
|
||||||
|
dialog,
|
||||||
notify,
|
notify,
|
||||||
commit,
|
commit,
|
||||||
|
persist,
|
||||||
undo,
|
undo,
|
||||||
redo,
|
redo,
|
||||||
canUndo,
|
canUndo,
|
||||||
|
|
@ -471,6 +769,7 @@ function create() {
|
||||||
errors,
|
errors,
|
||||||
circuitStats,
|
circuitStats,
|
||||||
val,
|
val,
|
||||||
|
faceVal,
|
||||||
startLoop,
|
startLoop,
|
||||||
step,
|
step,
|
||||||
rebuild,
|
rebuild,
|
||||||
|
|
@ -480,6 +779,9 @@ function create() {
|
||||||
canPlace,
|
canPlace,
|
||||||
connect,
|
connect,
|
||||||
deleteSelected,
|
deleteSelected,
|
||||||
|
setWireColor,
|
||||||
|
autoRoute,
|
||||||
|
selectNet,
|
||||||
toggleInput,
|
toggleInput,
|
||||||
press,
|
press,
|
||||||
copy,
|
copy,
|
||||||
|
|
@ -493,10 +795,23 @@ function create() {
|
||||||
beginChallenge,
|
beginChallenge,
|
||||||
checkChallenge,
|
checkChallenge,
|
||||||
table,
|
table,
|
||||||
|
switchProject,
|
||||||
newProject,
|
newProject,
|
||||||
|
duplicateProject,
|
||||||
|
deleteProject,
|
||||||
|
renameProject,
|
||||||
loadExamples,
|
loadExamples,
|
||||||
exportJson,
|
exportJson,
|
||||||
importJson,
|
importAsProject,
|
||||||
|
importComponents,
|
||||||
|
linkState,
|
||||||
|
linkError,
|
||||||
|
linkUrl,
|
||||||
|
createLink,
|
||||||
|
pushLink,
|
||||||
|
openLink,
|
||||||
|
syncUrl,
|
||||||
|
copyText,
|
||||||
shape,
|
shape,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,8 @@ export interface Netlist {
|
||||||
pinNet: Map<string, number>
|
pinNet: Map<string, number>
|
||||||
/** Same, for nodes at any depth, keyed "chipNode/…/nodeId:pin". Only with `trace`. */
|
/** Same, for nodes at any depth, keyed "chipNode/…/nodeId:pin". Only with `trace`. */
|
||||||
tracePinNet?: Map<string, number>
|
tracePinNet?: Map<string, number>
|
||||||
|
/** Inputs of lamps and displays inside the root's chips, keyed "chipNode/nodeId:pin", for drawing them on the chip. */
|
||||||
|
facePinNet: Map<string, number>
|
||||||
/** User-driven sources in the root circuit (switches, buttons): nodeId → net. */
|
/** User-driven sources in the root circuit (switches, buttons): nodeId → net. */
|
||||||
sources: Map<string, number>
|
sources: Map<string, number>
|
||||||
clocks: Int32Array
|
clocks: Int32Array
|
||||||
|
|
@ -92,6 +94,7 @@ export function compile(getDef: DefLookup, rootId: string, opts: { trace?: boole
|
||||||
const sources = new Map<string, number>()
|
const sources = new Map<string, number>()
|
||||||
const rawPinNet = new Map<string, number>()
|
const rawPinNet = new Map<string, number>()
|
||||||
const rawTrace = opts.trace ? new Map<string, number>() : undefined
|
const rawTrace = opts.trace ? new Map<string, number>() : undefined
|
||||||
|
const rawFace = new Map<string, number>()
|
||||||
const errors: string[] = []
|
const errors: string[] = []
|
||||||
const pinCache = new Map<string, ChipPins>()
|
const pinCache = new Map<string, ChipPins>()
|
||||||
|
|
||||||
|
|
@ -175,6 +178,12 @@ export function compile(getDef: DefLookup, rootId: string, opts: { trace?: boole
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (stack.length === 1) {
|
||||||
|
for (const n of def.nodes) {
|
||||||
|
if (n.kind === 'lamp' || n.kind === 'hex') for (const k of inputKeys(n)) rawFace.set(`${path}${n.id}:${k}`, inNet(n.id, k))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (inNets === null || rawTrace) {
|
if (inNets === null || rawTrace) {
|
||||||
const record = (n: CircuitNode, k: string, net: number) => {
|
const record = (n: CircuitNode, k: string, net: number) => {
|
||||||
if (inNets === null) rawPinNet.set(`${n.id}:${k}`, net)
|
if (inNets === null) rawPinNet.set(`${n.id}:${k}`, net)
|
||||||
|
|
@ -220,6 +229,7 @@ export function compile(getDef: DefLookup, rootId: string, opts: { trace?: boole
|
||||||
}
|
}
|
||||||
const pinNet = mapNets(rawPinNet)
|
const pinNet = mapNets(rawPinNet)
|
||||||
const tracePinNet = rawTrace ? mapNets(rawTrace) : undefined
|
const tracePinNet = rawTrace ? mapNets(rawTrace) : undefined
|
||||||
|
const facePinNet = mapNets(rawFace)
|
||||||
const srcs = mapNets(sources)
|
const srcs = mapNets(sources)
|
||||||
const clockNets = Int32Array.from(new Set(clocks.map(canon)))
|
const clockNets = Int32Array.from(new Set(clocks.map(canon)))
|
||||||
|
|
||||||
|
|
@ -247,6 +257,7 @@ export function compile(getDef: DefLookup, rootId: string, opts: { trace?: boole
|
||||||
fanList,
|
fanList,
|
||||||
pinNet,
|
pinNet,
|
||||||
tracePinNet,
|
tracePinNet,
|
||||||
|
facePinNet,
|
||||||
sources: srcs,
|
sources: srcs,
|
||||||
clocks: clockNets,
|
clocks: clockNets,
|
||||||
errors: [...new Set(errors)],
|
errors: [...new Set(errors)],
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,8 @@ export class Builder {
|
||||||
return { node: this.add({ kind, x, y, label }), pin: 'q' }
|
return { node: this.add({ kind, x, y, label }), pin: 'q' }
|
||||||
}
|
}
|
||||||
|
|
||||||
hex(x: number, y: number, bits: Src[]) {
|
hex(x: number, y: number, bits: Src[], label?: string) {
|
||||||
const id = this.add({ kind: 'hex', x, y })
|
const id = this.add({ kind: 'hex', x, y, label })
|
||||||
bits.forEach((src, i) => this.link(src, { node: id, pin: `b${i}` }))
|
bits.forEach((src, i) => this.link(src, { node: id, pin: `b${i}` }))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -176,7 +176,7 @@ export function exampleLibrary(): ComponentDef[] {
|
||||||
const n2 = b.nand(10, 5)
|
const n2 = b.nand(10, 5)
|
||||||
const n1 = b.nand(10, 0, ns, via(n2, [15, 6], [15, 4], [8, 4], [8, 2]))
|
const n1 = b.nand(10, 0, ns, via(n2, [15, 6], [15, 4], [8, 4], [8, 2]))
|
||||||
b.link(via(n1, [16, 1], [16, 3], [9, 3], [9, 5]), { node: n2.node, pin: 'a' })
|
b.link(via(n1, [16, 1], [16, 3], [9, 3], [9, 5]), { node: n2.node, pin: 'a' })
|
||||||
b.link(nr, { node: n2.node, pin: 'b' })
|
b.link(nr!, { node: n2.node, pin: 'b' })
|
||||||
b.output('Q', 19, 1, n1)
|
b.output('Q', 19, 1, n1)
|
||||||
b.output('Q̄', 19, 6, n2)
|
b.output('Q̄', 19, 6, n2)
|
||||||
})
|
})
|
||||||
|
|
@ -235,7 +235,7 @@ export function exampleLibrary(): ComponentDef[] {
|
||||||
b.output('Cout', 28, 36, carry)
|
b.output('Cout', 28, 36, carry)
|
||||||
})
|
})
|
||||||
|
|
||||||
make({ id: 'ex-cnt4', name: 'Counter 4', group: 'Memory', description: 'Counts 0 to 15 on each rising clock edge. RST = 1 sets it back to 0 at the next edge.' }, b => {
|
make({ id: 'ex-cnt4', name: 'Counter 4', group: 'Memory', description: 'Counts 0 to 15 on each rising clock edge. RST = 1 sets it back to 0 at the next edge. Its display shows on the box.' }, b => {
|
||||||
const CLK = b.input('CLK', 0, 21)
|
const CLK = b.input('CLK', 0, 21)
|
||||||
const RST = b.input('RST', 0, 24)
|
const RST = b.input('RST', 0, 24)
|
||||||
const inc = b.chip('ex-inc4', 6, 0)
|
const inc = b.chip('ex-inc4', 6, 0)
|
||||||
|
|
@ -251,6 +251,8 @@ export function exampleLibrary(): ComponentDef[] {
|
||||||
b.link(via(q, [41 + i, i], [41 + i, -1 - i], [5 - i, -1 - i], [5 - i, i]), { node: incNode, pin: incIns[i]!.key })
|
b.link(via(q, [41 + i, i], [41 + i, -1 - i], [5 - i, -1 - i], [5 - i, i]), { node: incNode, pin: incIns[i]!.key })
|
||||||
b.output(`Q${i}`, 52, 2 * i, i === 0 ? q : via(q, [50 - i, i], [50 - i, 2 * i]))
|
b.output(`Q${i}`, 52, 2 * i, i === 0 ? q : via(q, [50 - i, i], [50 - i, 2 * i]))
|
||||||
})
|
})
|
||||||
|
// Shows on the Counter 4 box wherever the counter is used.
|
||||||
|
b.hex(47, 8, Q.map((q, i) => via(q, [41 + i, i], [41 + i, 8 + i])), 'count')
|
||||||
})
|
})
|
||||||
|
|
||||||
make({ id: 'ex-demo-counter', name: 'Demo: Counter', group: 'Demos', description: 'A clock drives the 4-bit counter; the hex display shows the count.' }, b => {
|
make({ id: 'ex-demo-counter', name: 'Demo: Counter', group: 'Demos', description: 'A clock drives the 4-bit counter; the hex display shows the count.' }, b => {
|
||||||
|
|
|
||||||
|
|
@ -18,12 +18,29 @@ export interface Shape {
|
||||||
outputs: PinInfo[]
|
outputs: PinInfo[]
|
||||||
/** Set when the node draws as a logic gate symbol. */
|
/** Set when the node draws as a logic gate symbol. */
|
||||||
gate?: SymbolKind
|
gate?: SymbolKind
|
||||||
|
/** Vertical centre of the pin area, where a box prints its name. */
|
||||||
|
nameY?: number
|
||||||
|
/** Lamps and displays from inside the component, shown on its box. */
|
||||||
|
face?: FaceItem[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface FaceItem {
|
||||||
|
/** Node id inside the component. */
|
||||||
|
id: string
|
||||||
|
kind: 'lamp' | 'hex'
|
||||||
|
label: string
|
||||||
|
/** Top-left corner and size in grid units, relative to the chip node. */
|
||||||
|
x: number
|
||||||
|
y: number
|
||||||
|
w: number
|
||||||
|
h: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DefLookup = (id: string) => ComponentDef | undefined
|
export type DefLookup = (id: string) => ComponentDef | undefined
|
||||||
|
|
||||||
const LABEL_CHAR = 0.4 // grid units per character of a pin label
|
const LABEL_CHAR = 0.4 // grid units per character of a pin label
|
||||||
const NAME_CHAR = 0.44
|
const NAME_CHAR = 0.44
|
||||||
|
const FACE_CHAR = 0.34
|
||||||
|
|
||||||
export interface ChipPins {
|
export interface ChipPins {
|
||||||
inputs: { key: string; label: string }[]
|
inputs: { key: string; label: string }[]
|
||||||
|
|
@ -41,6 +58,42 @@ export function chipPins(def: ComponentDef): ChipPins {
|
||||||
return { inputs: pins('input', 'in'), outputs: pins('output', 'out') }
|
return { inputs: pins('input', 'in'), outputs: pins('output', 'out') }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lamps and hex displays inside a component, arranged on its box the way
|
||||||
|
* they are placed inside: nodes at about the same height share a row.
|
||||||
|
*/
|
||||||
|
export function faceLayout(def: ComponentDef): { items: FaceItem[]; w: number; h: number } {
|
||||||
|
const empty = { items: [], w: 0, h: 0 }
|
||||||
|
if (def.face === false) return empty
|
||||||
|
const nodes = def.nodes.filter(n => n.kind === 'lamp' || n.kind === 'hex').sort((a, b) => a.y - b.y || a.x - b.x)
|
||||||
|
if (!nodes.length) return empty
|
||||||
|
const rows: CircuitNode[][] = []
|
||||||
|
for (const n of nodes) {
|
||||||
|
const row = rows[rows.length - 1]
|
||||||
|
if (row && Math.abs(n.y - row[0]!.y) <= 1) row.push(n)
|
||||||
|
else rows.push([n])
|
||||||
|
}
|
||||||
|
const items: FaceItem[] = []
|
||||||
|
let y = 0
|
||||||
|
let w = 0
|
||||||
|
for (const row of rows) {
|
||||||
|
row.sort((a, b) => a.x - b.x)
|
||||||
|
let x = 0
|
||||||
|
let h = 0
|
||||||
|
for (const n of row) {
|
||||||
|
const label = n.label?.trim() ?? ''
|
||||||
|
const iw = Math.max(n.kind === 'hex' ? 1.6 : 1.4, label.length * FACE_CHAR + 0.4)
|
||||||
|
const ih = (n.kind === 'hex' ? 2.2 : 1.2) + (label ? 0.7 : 0)
|
||||||
|
items.push({ id: n.id, kind: n.kind as 'lamp' | 'hex', label, x, y, w: iw, h: ih })
|
||||||
|
x += iw + 0.3
|
||||||
|
h = Math.max(h, ih)
|
||||||
|
}
|
||||||
|
w = Math.max(w, x - 0.3)
|
||||||
|
y += h + 0.3
|
||||||
|
}
|
||||||
|
return { items, w, h: y - 0.3 }
|
||||||
|
}
|
||||||
|
|
||||||
function gateShape(symbol: SymbolKind, inputs: { key: string; label: string }[], output: { key: string; label: string }): Shape {
|
function gateShape(symbol: SymbolKind, inputs: { key: string; label: string }[], output: { key: string; label: string }): Shape {
|
||||||
const n = inputs.length
|
const n = inputs.length
|
||||||
if (n === 1) {
|
if (n === 1) {
|
||||||
|
|
@ -67,7 +120,7 @@ function gateShape(symbol: SymbolKind, inputs: { key: string; label: string }[],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function boxShape(name: string, pins: ChipPins): Shape {
|
function boxShape(name: string, pins: ChipPins, face: ReturnType<typeof faceLayout>): Shape {
|
||||||
const nIn = pins.inputs.length
|
const nIn = pins.inputs.length
|
||||||
const nOut = pins.outputs.length
|
const nOut = pins.outputs.length
|
||||||
const n = Math.max(nIn, nOut, 1)
|
const n = Math.max(nIn, nOut, 1)
|
||||||
|
|
@ -77,11 +130,18 @@ function boxShape(name: string, pins: ChipPins): Shape {
|
||||||
const w = Math.max(
|
const w = Math.max(
|
||||||
3,
|
3,
|
||||||
Math.ceil(longest(pins.inputs) * LABEL_CHAR + longest(pins.outputs) * LABEL_CHAR + name.length * NAME_CHAR + 1.5),
|
Math.ceil(longest(pins.inputs) * LABEL_CHAR + longest(pins.outputs) * LABEL_CHAR + name.length * NAME_CHAR + 1.5),
|
||||||
|
Math.ceil(face.w + 1.2),
|
||||||
)
|
)
|
||||||
|
const top = n === 1 ? -1 : -0.5
|
||||||
|
const pinBottom = n === 1 ? 1 : n - 0.5
|
||||||
|
const faceTop = pinBottom + 0.2
|
||||||
|
const faceLeft = (w - face.w) / 2
|
||||||
return {
|
return {
|
||||||
body: n === 1 ? { x: 0, y: -1, w, h: 2 } : { x: 0, y: -0.5, w, h: n },
|
body: { x: 0, y: top, w, h: pinBottom - top + (face.items.length ? face.h + 0.6 : 0) },
|
||||||
inputs: pins.inputs.map((p, i) => ({ ...p, dx: 0, dy: inOff + i })),
|
inputs: pins.inputs.map((p, i) => ({ ...p, dx: 0, dy: inOff + i })),
|
||||||
outputs: pins.outputs.map((p, i) => ({ ...p, dx: w, dy: outOff + i })),
|
outputs: pins.outputs.map((p, i) => ({ ...p, dx: w, dy: outOff + i })),
|
||||||
|
nameY: (top + pinBottom) / 2,
|
||||||
|
face: face.items.map(it => ({ ...it, x: it.x + faceLeft, y: it.y + faceTop })),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -142,10 +202,11 @@ export function shapeOf(node: CircuitNode, getDef: DefLookup): Shape {
|
||||||
const def = node.chip ? getDef(node.chip) : undefined
|
const def = node.chip ? getDef(node.chip) : undefined
|
||||||
if (!def) return MISSING_SHAPE
|
if (!def) return MISSING_SHAPE
|
||||||
const pins = chipPins(def)
|
const pins = chipPins(def)
|
||||||
if (def.symbol !== 'box' && pins.outputs.length === 1 && pins.inputs.length >= 1 && pins.inputs.length <= 8) {
|
const face = faceLayout(def)
|
||||||
|
if (def.symbol !== 'box' && !face.items.length && pins.outputs.length === 1 && pins.inputs.length >= 1 && pins.inputs.length <= 8) {
|
||||||
return gateShape(def.symbol, pins.inputs, pins.outputs[0]!)
|
return gateShape(def.symbol, pins.inputs, pins.outputs[0]!)
|
||||||
}
|
}
|
||||||
return boxShape(def.name, pins)
|
return boxShape(def.name, pins, face)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -157,18 +218,18 @@ export function pinPos(node: CircuitNode, shape: Shape, key: string, dir: 'in' |
|
||||||
|
|
||||||
export type Pt = [number, number]
|
export type Pt = [number, number]
|
||||||
|
|
||||||
/** Drop repeated points and points in the middle of a straight run. */
|
/** Drop repeated points and points in the middle of a straight run (or a spike that doubles back). */
|
||||||
export function simplify(pts: Pt[]): Pt[] {
|
export function simplify(pts: Pt[]): Pt[] {
|
||||||
const out: Pt[] = []
|
const out: Pt[] = []
|
||||||
for (const p of pts) {
|
for (const p of pts) {
|
||||||
const last = out[out.length - 1]
|
|
||||||
if (last && last[0] === p[0] && last[1] === p[1]) continue
|
|
||||||
const prev = out[out.length - 2]
|
|
||||||
if (prev && last && ((prev[0] === last[0] && last[0] === p[0]) || (prev[1] === last[1] && last[1] === p[1]))) {
|
|
||||||
out[out.length - 1] = p
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
out.push(p)
|
out.push(p)
|
||||||
|
for (;;) {
|
||||||
|
const n = out.length
|
||||||
|
const [a, b, c] = [out[n - 3], out[n - 2], out[n - 1]!]
|
||||||
|
if (b && b[0] === c[0] && b[1] === c[1]) out.splice(n - 2, 1)
|
||||||
|
else if (a && b && ((a[0] === b[0] && b[0] === c[0]) || (a[1] === b[1] && b[1] === c[1]))) out.splice(n - 2, 1)
|
||||||
|
else break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,10 @@ export function lookup(project: Project): DefLookup {
|
||||||
return id => map.get(id)
|
return id => map.get(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createProject(opts: { examples: boolean }): Project {
|
export function createProject(opts: { examples: boolean; name?: string }): Project {
|
||||||
return {
|
return {
|
||||||
version: 1,
|
version: 1,
|
||||||
|
name: opts.name ?? (opts.examples ? 'NAND to computer' : 'New project'),
|
||||||
components: [starterCircuit(), ...(opts.examples ? exampleLibrary() : [])],
|
components: [starterCircuit(), ...(opts.examples ? exampleLibrary() : [])],
|
||||||
openId: 'main',
|
openId: 'main',
|
||||||
settings: { symbols: 'iec', flow: true },
|
settings: { symbols: 'iec', flow: true },
|
||||||
|
|
@ -39,6 +40,33 @@ export function addExamples(project: Project): number {
|
||||||
return missing.length
|
return missing.length
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds components from another project. Identical ones are skipped; a
|
||||||
|
* different component with a clashing id gets a new id (and references to it
|
||||||
|
* inside the imported set follow). Returns how many were added.
|
||||||
|
*/
|
||||||
|
export function mergeComponents(project: Project, incoming: ComponentDef[]): number {
|
||||||
|
const existing = new Map(project.components.map(d => [d.id, d]))
|
||||||
|
const remap = new Map<string, string>()
|
||||||
|
const added: ComponentDef[] = []
|
||||||
|
for (const d of incoming) {
|
||||||
|
const have = existing.get(d.id)
|
||||||
|
if (have && JSON.stringify(have) === JSON.stringify(d)) continue
|
||||||
|
const copy = clone(d)
|
||||||
|
if (have) {
|
||||||
|
copy.id = uid('c')
|
||||||
|
remap.set(d.id, copy.id)
|
||||||
|
copy.name = uniqueName({ ...project, components: [...project.components, ...added] }, copy.name)
|
||||||
|
}
|
||||||
|
added.push(copy)
|
||||||
|
}
|
||||||
|
for (const d of added) {
|
||||||
|
for (const n of d.nodes) if (n.kind === 'chip' && n.chip && remap.has(n.chip)) n.chip = remap.get(n.chip)
|
||||||
|
}
|
||||||
|
project.components.push(...added)
|
||||||
|
return added.length
|
||||||
|
}
|
||||||
|
|
||||||
/** True when `defId` is `targetId` or has it somewhere inside. */
|
/** True when `defId` is `targetId` or has it somewhere inside. */
|
||||||
export function containsDef(project: Project, defId: string, targetId: string): boolean {
|
export function containsDef(project: Project, defId: string, targetId: string): boolean {
|
||||||
const get = lookup(project)
|
const get = lookup(project)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
// Reading project data from files, links and storage. Shared by the browser
|
||||||
|
// and the share-link server, so it must stay free of browser APIs.
|
||||||
|
|
||||||
|
import { WIRE_COLORS, type Project } from './types'
|
||||||
|
|
||||||
|
/** Upper bounds for a project that comes from outside. */
|
||||||
|
export const LIMITS = { bytes: 2_000_000, components: 2_000, nodes: 100_000 }
|
||||||
|
|
||||||
|
/** Checks and normalises project data. Throws with a readable message. */
|
||||||
|
export function toProject(data: unknown): Project {
|
||||||
|
const p = data as Partial<Project>
|
||||||
|
if (!p || typeof p !== 'object' || !Array.isArray(p.components) || p.components.length === 0) {
|
||||||
|
throw new Error('Not a Logigate project (no components)')
|
||||||
|
}
|
||||||
|
if (p.components.length > LIMITS.components) throw new Error('Too many components')
|
||||||
|
let nodes = 0
|
||||||
|
for (const d of p.components) {
|
||||||
|
if (typeof d?.id !== 'string' || typeof d.name !== 'string' || !Array.isArray(d.nodes) || !Array.isArray(d.wires)) {
|
||||||
|
throw new Error('Not a Logigate project (broken component)')
|
||||||
|
}
|
||||||
|
nodes += d.nodes.length
|
||||||
|
d.symbol ??= 'box'
|
||||||
|
for (const w of d.wires) if (w.color && !WIRE_COLORS.includes(w.color)) delete w.color
|
||||||
|
}
|
||||||
|
if (nodes > LIMITS.nodes) throw new Error('Project too large')
|
||||||
|
return {
|
||||||
|
version: 1,
|
||||||
|
name: typeof p.name === 'string' && p.name.trim() ? p.name.trim().slice(0, 80) : 'Untitled',
|
||||||
|
components: p.components,
|
||||||
|
openId: p.components.some(d => d.id === p.openId) ? p.openId! : p.components[0]!.id,
|
||||||
|
settings: { symbols: p.settings?.symbols === 'ansi' ? 'ansi' : 'iec', flow: p.settings?.flow ?? true },
|
||||||
|
solved: Array.isArray(p.solved) ? p.solved.filter(s => typeof s === 'string') : [],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function parseProject(json: string): Project {
|
||||||
|
if (json.length > LIMITS.bytes) throw new Error('File too large')
|
||||||
|
let data: unknown
|
||||||
|
try {
|
||||||
|
data = JSON.parse(json)
|
||||||
|
} catch {
|
||||||
|
throw new Error('Not a valid JSON file')
|
||||||
|
}
|
||||||
|
return toProject(data)
|
||||||
|
}
|
||||||
|
|
@ -101,6 +101,12 @@ export class Simulator {
|
||||||
return net === undefined ? 0 : this.values[net]!
|
return net === undefined ? 0 : this.values[net]!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Value at a lamp or display input inside one of the root circuit's chips. */
|
||||||
|
face(chipNode: string, node: string, pin: string): number {
|
||||||
|
const net = this.nl.facePinNet.get(`${chipNode}/${node}:${pin}`)
|
||||||
|
return net === undefined ? 0 : this.values[net]!
|
||||||
|
}
|
||||||
|
|
||||||
carry(): SimCarry {
|
carry(): SimCarry {
|
||||||
const gates = new Map<string, number>()
|
const gates = new Map<string, number>()
|
||||||
const { gateKeys, gateOut } = this.nl
|
const { gateKeys, gateOut } = this.nl
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,110 @@
|
||||||
// Saving to the browser and to JSON files.
|
// The browser's project library: several projects in localStorage, each
|
||||||
|
// with its own entry, plus an index with names and share links.
|
||||||
|
|
||||||
|
import { parseProject } from './project'
|
||||||
import type { Project } from './types'
|
import type { Project } from './types'
|
||||||
|
|
||||||
const KEY = 'logigate:project:v1'
|
export interface ShareLink {
|
||||||
|
id: string
|
||||||
/** Parses and checks a project file. Throws with a readable message. */
|
/** Edit key; only the person who created the link has it. */
|
||||||
export function parseProject(json: string): Project {
|
key?: string
|
||||||
let data: unknown
|
|
||||||
try {
|
|
||||||
data = JSON.parse(json)
|
|
||||||
} catch {
|
|
||||||
throw new Error('Not a valid JSON file')
|
|
||||||
}
|
|
||||||
const p = data as Partial<Project>
|
|
||||||
if (!p || typeof p !== 'object' || !Array.isArray(p.components) || p.components.length === 0) {
|
|
||||||
throw new Error('Not a Logigate project (no components)')
|
|
||||||
}
|
|
||||||
for (const d of p.components) {
|
|
||||||
if (typeof d?.id !== 'string' || typeof d.name !== 'string' || !Array.isArray(d.nodes) || !Array.isArray(d.wires)) {
|
|
||||||
throw new Error('Not a Logigate project (broken component)')
|
|
||||||
}
|
|
||||||
d.symbol ??= 'box'
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
version: 1,
|
|
||||||
components: p.components,
|
|
||||||
openId: p.components.some(d => d.id === p.openId) ? p.openId! : p.components[0]!.id,
|
|
||||||
settings: { symbols: p.settings?.symbols === 'ansi' ? 'ansi' : 'iec', flow: p.settings?.flow ?? true },
|
|
||||||
solved: Array.isArray(p.solved) ? p.solved : [],
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function loadLocal(): Project | null {
|
export interface ProjectMeta {
|
||||||
|
id: string
|
||||||
|
name: string
|
||||||
|
updated: number
|
||||||
|
link?: ShareLink
|
||||||
|
}
|
||||||
|
|
||||||
|
const INDEX = 'logigate:projects'
|
||||||
|
const CURRENT = 'logigate:current'
|
||||||
|
const LEGACY = 'logigate:project:v1'
|
||||||
|
const entry = (id: string) => `logigate:p:${id}`
|
||||||
|
|
||||||
|
function read(key: string): string | null {
|
||||||
try {
|
try {
|
||||||
const raw = localStorage.getItem(KEY)
|
return localStorage.getItem(key)
|
||||||
return raw ? parseProject(raw) : null
|
|
||||||
} catch {
|
} catch {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function saveLocal(project: Project): boolean {
|
function write(key: string, value: string): boolean {
|
||||||
try {
|
try {
|
||||||
localStorage.setItem(KEY, JSON.stringify(project))
|
localStorage.setItem(key, value)
|
||||||
return true
|
return true
|
||||||
} catch {
|
} catch {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function newLocalId(): string {
|
||||||
|
return Math.random().toString(36).slice(2, 10)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function listProjects(): ProjectMeta[] {
|
||||||
|
try {
|
||||||
|
const list = JSON.parse(read(INDEX) ?? '[]') as ProjectMeta[]
|
||||||
|
return Array.isArray(list) ? list.filter(m => m && typeof m.id === 'string') : []
|
||||||
|
} catch {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function writeIndex(list: ProjectMeta[]) {
|
||||||
|
write(INDEX, JSON.stringify(list))
|
||||||
|
}
|
||||||
|
|
||||||
|
export function loadProject(id: string): Project | null {
|
||||||
|
const raw = read(entry(id))
|
||||||
|
if (!raw) return null
|
||||||
|
try {
|
||||||
|
return parseProject(raw)
|
||||||
|
} catch {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Saves a project and its index entry. Returns false when storage is full or blocked. */
|
||||||
|
export function saveProject(meta: ProjectMeta, project: Project): boolean {
|
||||||
|
const ok = write(entry(meta.id), JSON.stringify(project))
|
||||||
|
const list = listProjects().filter(m => m.id !== meta.id)
|
||||||
|
list.unshift(meta)
|
||||||
|
writeIndex(list)
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
export function saveMeta(meta: ProjectMeta) {
|
||||||
|
writeIndex(listProjects().map(m => (m.id === meta.id ? meta : m)))
|
||||||
|
}
|
||||||
|
|
||||||
|
export function removeProject(id: string) {
|
||||||
|
try {
|
||||||
|
localStorage.removeItem(entry(id))
|
||||||
|
} catch {}
|
||||||
|
writeIndex(listProjects().filter(m => m.id !== id))
|
||||||
|
}
|
||||||
|
|
||||||
|
export function currentId(): string | null {
|
||||||
|
return read(CURRENT)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setCurrentId(id: string) {
|
||||||
|
write(CURRENT, id)
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Moves the single project of the first version into the library. */
|
||||||
|
export function migrateLegacy(): void {
|
||||||
|
const raw = read(LEGACY)
|
||||||
|
if (!raw || listProjects().length) return
|
||||||
|
try {
|
||||||
|
const project = parseProject(raw)
|
||||||
|
if (project.name === 'Untitled') project.name = 'My first project'
|
||||||
|
const meta: ProjectMeta = { id: newLocalId(), name: project.name, updated: Date.now() }
|
||||||
|
if (saveProject(meta, project)) {
|
||||||
|
setCurrentId(meta.id)
|
||||||
|
localStorage.removeItem(LEGACY)
|
||||||
|
}
|
||||||
|
} catch {}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,13 @@ export interface Wire {
|
||||||
to: PinRef
|
to: PinRef
|
||||||
/** Corner points (grid units) between the two pins, set by dragging a segment. */
|
/** Corner points (grid units) between the two pins, set by dragging a segment. */
|
||||||
pts?: [number, number][]
|
pts?: [number, number][]
|
||||||
|
/** Colour tag; the wire still shows bright for 1 and dim for 0. */
|
||||||
|
color?: WireColor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const WIRE_COLORS = ['red', 'orange', 'yellow', 'blue', 'purple', 'pink'] as const
|
||||||
|
export type WireColor = (typeof WIRE_COLORS)[number]
|
||||||
|
|
||||||
export interface ComponentDef {
|
export interface ComponentDef {
|
||||||
id: string
|
id: string
|
||||||
name: string
|
name: string
|
||||||
|
|
@ -53,6 +58,8 @@ export interface ComponentDef {
|
||||||
description?: string
|
description?: string
|
||||||
/** Palette section; empty means "My components". */
|
/** Palette section; empty means "My components". */
|
||||||
group?: string
|
group?: string
|
||||||
|
/** Show the lamps and displays inside on the component's box. Default true. */
|
||||||
|
face?: boolean
|
||||||
nodes: CircuitNode[]
|
nodes: CircuitNode[]
|
||||||
wires: Wire[]
|
wires: Wire[]
|
||||||
/** Set when the component was started from a challenge. */
|
/** Set when the component was started from a challenge. */
|
||||||
|
|
@ -68,6 +75,7 @@ export interface Settings {
|
||||||
|
|
||||||
export interface Project {
|
export interface Project {
|
||||||
version: 1
|
version: 1
|
||||||
|
name: string
|
||||||
components: ComponentDef[]
|
components: ComponentDef[]
|
||||||
openId: string
|
openId: string
|
||||||
settings: Settings
|
settings: Settings
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,113 @@
|
||||||
|
// Editing wire routes. A route is the full point list from the output pin
|
||||||
|
// to the input pin; a wire stores only the corners in between (`pts`).
|
||||||
|
|
||||||
|
import { simplify, type Pt } from './geometry'
|
||||||
|
|
||||||
|
const sign = (n: number) => (n > 0 ? 1 : n < 0 ? -1 : 0)
|
||||||
|
const copy = (pts: Pt[]) => pts.map(p => [p[0], p[1]] as Pt)
|
||||||
|
|
||||||
|
/** Axis a segment moves along when dragged: x (0) for vertical segments, y (1) for horizontal ones. */
|
||||||
|
export function dragAxis(a: Pt, b: Pt): 0 | 1 {
|
||||||
|
return a[0] === b[0] ? 0 : 1
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepares dragging segment `i` sideways. A segment that touches a pin gets
|
||||||
|
* a one-unit stub at that end, so the pin stays where it is and the wire
|
||||||
|
* jogs right next to it. Returns null for segments too short to move.
|
||||||
|
*/
|
||||||
|
export function segmentDrag(route: Pt[], i: number): { base: Pt[]; k: number; axis: 0 | 1 } | null {
|
||||||
|
const last = route.length - 1
|
||||||
|
const a = route[i]!
|
||||||
|
const b = route[i + 1]!
|
||||||
|
const axis = dragAxis(a, b)
|
||||||
|
const u: Pt = [sign(b[0] - a[0]), sign(b[1] - a[1])]
|
||||||
|
const len = Math.abs(b[0] - a[0]) + Math.abs(b[1] - a[1])
|
||||||
|
const base = copy(route)
|
||||||
|
const fromPin = i === 0
|
||||||
|
const toPin = i + 1 === last
|
||||||
|
if (fromPin && toPin) {
|
||||||
|
if (len < 2) return null
|
||||||
|
base.splice(1, 0, [a[0] + u[0], a[1] + u[1]], [b[0] - u[0], b[1] - u[1]])
|
||||||
|
return { base, k: 1, axis }
|
||||||
|
}
|
||||||
|
if (toPin) base.splice(last, 0, [b[0] - u[0], b[1] - u[1]])
|
||||||
|
if (fromPin) {
|
||||||
|
base.splice(1, 0, [a[0] + u[0], a[1] + u[1]])
|
||||||
|
return { base, k: 1, axis }
|
||||||
|
}
|
||||||
|
return { base, k: i, axis }
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Corner points after shifting segment `k` of `base` by `delta` along `axis`. */
|
||||||
|
export function moveSegment(base: Pt[], k: number, axis: 0 | 1, delta: number): Pt[] {
|
||||||
|
const pts = copy(base)
|
||||||
|
pts[k]![axis] += delta
|
||||||
|
pts[k + 1]![axis] += delta
|
||||||
|
return simplify(pts).slice(1, -1)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Corner points after moving corner `i` of a route. Its neighbours follow
|
||||||
|
* so the wire stays square; next to a pin, a one-unit stub keeps the wire
|
||||||
|
* leaving the pin straight.
|
||||||
|
*/
|
||||||
|
export function moveCorner(route: Pt[], i: number, to: Pt): Pt[] {
|
||||||
|
const pts = copy(route)
|
||||||
|
const last = route.length - 1
|
||||||
|
const old = route[i]!
|
||||||
|
pts[i] = [to[0], to[1]]
|
||||||
|
for (const j of [i - 1, i + 1]) {
|
||||||
|
if (j <= 0 || j >= last) continue
|
||||||
|
if (route[j]![1] === old[1]) pts[j]![1] = to[1]
|
||||||
|
else pts[j]![0] = to[0]
|
||||||
|
}
|
||||||
|
const off = to[1] !== old[1]
|
||||||
|
if (off && i === last - 1 && route[last]![1] === old[1]) {
|
||||||
|
const [px, py] = route[last]!
|
||||||
|
pts.splice(last, 0, [px - 1, to[1]], [px - 1, py])
|
||||||
|
}
|
||||||
|
if (off && i === 1 && route[0]![1] === old[1]) {
|
||||||
|
const [px, py] = route[0]!
|
||||||
|
pts.splice(1, 0, [px + 1, py], [px + 1, to[1]])
|
||||||
|
}
|
||||||
|
return simplify(pts).slice(1, -1)
|
||||||
|
}
|
||||||
|
|
||||||
|
/** The grid point on segment `i` closest to `at`. */
|
||||||
|
export function pointOnSegment(route: Pt[], i: number, at: Pt): Pt {
|
||||||
|
const a = route[i]!
|
||||||
|
const b = route[i + 1]!
|
||||||
|
const clamp = (v: number, p: number, q: number) => Math.min(Math.max(v, Math.min(p, q)), Math.max(p, q))
|
||||||
|
return a[0] === b[0] ? [a[0], clamp(Math.round(at[1]), a[1], b[1])] : [clamp(Math.round(at[0]), a[0], b[0]), a[1]]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Splits segment `i` at the grid point nearest `at` and prepares to drag the
|
||||||
|
* part after it sideways, which pulls a new step into the wire.
|
||||||
|
*/
|
||||||
|
export function splitDrag(route: Pt[], i: number, at: Pt) {
|
||||||
|
const c = pointOnSegment(route, i, at)
|
||||||
|
const b = route[i + 1]!
|
||||||
|
if (c[0] === b[0] && c[1] === b[1]) return segmentDrag(route, i)
|
||||||
|
const pts = [...copy(route.slice(0, i + 1)), c, [c[0], c[1]] as Pt, ...copy(route.slice(i + 1))]
|
||||||
|
return segmentDrag(pts, i + 2)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finishes a branch toward its target pin: a branch that leaves a vertical
|
||||||
|
* segment steps sideways first, so it forms a clear T instead of running on
|
||||||
|
* along the wire it came from.
|
||||||
|
*/
|
||||||
|
export function branchTo(corners: Pt[], from: Pt, to: Pt): Pt[] {
|
||||||
|
const c = corners[corners.length - 1]
|
||||||
|
const prev = corners[corners.length - 2] ?? from
|
||||||
|
if (!c || prev[0] !== c[0] || c[1] === to[1]) return corners
|
||||||
|
return [...corners, [Math.round((c[0] + to[0]) / 2), c[1]]]
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Corners for a new wire that leaves an existing route at the point nearest `at` on segment `i`. */
|
||||||
|
export function branchCorners(route: Pt[], i: number, at: Pt): Pt[] {
|
||||||
|
const c = pointOnSegment(route, i, at)
|
||||||
|
return simplify([...copy(route.slice(0, i + 1)), c]).slice(1)
|
||||||
|
}
|
||||||
|
|
@ -1,31 +1,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const ed = useEditor()
|
const ed = useEditor()
|
||||||
|
onMounted(() => ed.syncUrl())
|
||||||
onMounted(() => {
|
|
||||||
const stop = ed.startLoop()
|
|
||||||
onBeforeUnmount(stop)
|
|
||||||
try {
|
|
||||||
if (!localStorage.getItem('logigate:help-seen')) ed.showHelp.value = true
|
|
||||||
} catch {}
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="app">
|
<EditorApp />
|
||||||
<EditorToolbar />
|
|
||||||
<div class="workspace">
|
|
||||||
<EditorPalette />
|
|
||||||
<main class="stage">
|
|
||||||
<EditorCanvas />
|
|
||||||
</main>
|
|
||||||
<EditorInspector />
|
|
||||||
</div>
|
|
||||||
<Transition name="fade">
|
|
||||||
<div v-if="ed.notice.value" class="toast" :class="ed.notice.value.kind">{{ ed.notice.value.text }}</div>
|
|
||||||
</Transition>
|
|
||||||
<div v-if="ed.placing.value" class="placing-hint">
|
|
||||||
Click on the canvas to place. <kbd>Shift</kbd> places several, <kbd>Esc</kbd> stops.
|
|
||||||
</div>
|
|
||||||
<EditorHelp v-if="ed.showHelp.value" />
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
// A share link: /p/<id> opens that project (or your own copy of it).
|
||||||
|
const route = useRoute()
|
||||||
|
const ed = useEditor()
|
||||||
|
onMounted(() => ed.openLink(String(route.params.id)))
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<EditorApp />
|
||||||
|
</template>
|
||||||
|
|
@ -68,7 +68,7 @@ if [ ! -f .env ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "==> Preparing docker data directories..."
|
echo "==> Preparing docker data directories..."
|
||||||
mkdir -p docker-data/node_modules
|
mkdir -p docker-data/node_modules data/shares
|
||||||
|
|
||||||
if [ "$(id -u)" -eq 0 ]; then
|
if [ "$(id -u)" -eq 0 ]; then
|
||||||
echo "==> Fixing ownership on writable directories (root mode)..."
|
echo "==> Fixing ownership on writable directories (root mode)..."
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@ services:
|
||||||
- .env
|
- .env
|
||||||
volumes:
|
volumes:
|
||||||
- ./.output:/app/.output:ro
|
- ./.output:/app/.output:ro
|
||||||
|
# Projects shared by link (one JSON file each). Survives redeploys.
|
||||||
|
- ./data:/app/data
|
||||||
labels:
|
labels:
|
||||||
traefik.enable: "true"
|
traefik.enable: "true"
|
||||||
traefik.docker.network: "web"
|
traefik.docker.network: "web"
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,13 @@ export default defineNuxtConfig({
|
||||||
clientBundle: { scan: true },
|
clientBundle: { scan: true },
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Share links live as JSON files in data/shares (a volume in production).
|
||||||
|
nitro: {
|
||||||
|
storage: {
|
||||||
|
shares: { driver: 'fs', base: './data/shares' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
runtimeConfig: {
|
runtimeConfig: {
|
||||||
public: {
|
public: {
|
||||||
siteUrl: 'https://logicate.blax.at',
|
siteUrl: 'https://logicate.blax.at',
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
"@nuxt/fonts": "^1.0.1",
|
"@nuxt/fonts": "^1.0.1",
|
||||||
"@nuxt/icon": "^2.5.1",
|
"@nuxt/icon": "^2.5.1",
|
||||||
"@tailwindcss/vite": "^4.3.3",
|
"@tailwindcss/vite": "^4.3.3",
|
||||||
|
"@types/node": "^26.6.5",
|
||||||
"tailwindcss": "^4.3.3",
|
"tailwindcss": "^4.3.3",
|
||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
"vitest": "^5.0.5",
|
"vitest": "^5.0.5",
|
||||||
|
|
|
||||||
288
pnpm-lock.yaml
288
pnpm-lock.yaml
|
|
@ -10,26 +10,29 @@ importers:
|
||||||
dependencies:
|
dependencies:
|
||||||
nuxt:
|
nuxt:
|
||||||
specifier: ^4.6.2
|
specifier: ^4.6.2
|
||||||
version: 4.6.2(@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7))(@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7))(@oxc-project/types@0.154.0)(@vue/compiler-sfc@3.5.44)(acorn@8.19.0)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(ioredis@5.11.1)(lightningcss@1.33.0)(mlly@1.8.2)(rolldown@1.2.14)(rollup-plugin-visualizer@7.1.1(rolldown@1.2.14)(rollup@4.64.7))(rollup@4.64.7)(srvx@1.0.5)(terser@5.51.2)(typescript@5.9.3)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue-tsc@3.3.13(typescript@5.9.3))
|
version: 4.6.2(@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7))(@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7))(@oxc-project/types@0.154.0)(@types/node@26.6.5)(@vue/compiler-sfc@3.5.44)(acorn@8.19.0)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(ioredis@5.11.1)(lightningcss@1.33.0)(mlly@1.8.2)(rolldown@1.2.14)(rollup-plugin-visualizer@7.1.1(rolldown@1.2.14)(rollup@4.64.7))(rollup@4.64.7)(srvx@1.0.5)(terser@5.51.2)(typescript@5.9.3)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue-tsc@3.3.13(typescript@5.9.3))
|
||||||
vue:
|
vue:
|
||||||
specifier: ^3.5.44
|
specifier: ^3.5.44
|
||||||
version: 3.5.44(typescript@5.9.3)
|
version: 3.5.44(typescript@5.9.3)
|
||||||
vue-router:
|
vue-router:
|
||||||
specifier: ^5.4.0
|
specifier: ^5.4.0
|
||||||
version: 5.4.0(@vue/compiler-sfc@3.5.44)(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))
|
version: 5.4.0(@vue/compiler-sfc@3.5.44)(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@iconify-json/lucide':
|
'@iconify-json/lucide':
|
||||||
specifier: ^1.2.145
|
specifier: ^1.2.145
|
||||||
version: 1.2.145
|
version: 1.2.145
|
||||||
'@nuxt/fonts':
|
'@nuxt/fonts':
|
||||||
specifier: ^1.0.1
|
specifier: ^1.0.1
|
||||||
version: 1.0.1(@nuxt/schema@4.6.2)(cac@7.1.0)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(ioredis@5.11.1)(jiti@2.7.0)(lightningcss@1.33.0)(magic-string@1.4.3)(mlly@1.8.2)(postcss@8.5.30)(rolldown@1.2.14)(rollup@4.64.7)(srvx@1.0.5)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
version: 1.0.1(@nuxt/schema@4.6.2)(cac@7.1.0)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(ioredis@5.11.1)(jiti@2.7.0)(lightningcss@1.33.0)(magic-string@1.4.3)(mlly@1.8.2)(postcss@8.5.30)(rolldown@1.2.14)(rollup@4.64.7)(srvx@1.0.5)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
'@nuxt/icon':
|
'@nuxt/icon':
|
||||||
specifier: ^2.5.1
|
specifier: ^2.5.1
|
||||||
version: 2.5.1(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))
|
version: 2.5.1(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))
|
||||||
'@tailwindcss/vite':
|
'@tailwindcss/vite':
|
||||||
specifier: ^4.3.3
|
specifier: ^4.3.3
|
||||||
version: 4.3.3(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
version: 4.3.3(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
|
'@types/node':
|
||||||
|
specifier: ^26.6.5
|
||||||
|
version: 26.6.5
|
||||||
tailwindcss:
|
tailwindcss:
|
||||||
specifier: ^4.3.3
|
specifier: ^4.3.3
|
||||||
version: 4.3.3
|
version: 4.3.3
|
||||||
|
|
@ -38,7 +41,7 @@ importers:
|
||||||
version: 5.9.3
|
version: 5.9.3
|
||||||
vitest:
|
vitest:
|
||||||
specifier: ^5.0.5
|
specifier: ^5.0.5
|
||||||
version: 5.0.5(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
version: 5.0.5(@types/node@26.6.5)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
vue-tsc:
|
vue-tsc:
|
||||||
specifier: ^3.3.13
|
specifier: ^3.3.13
|
||||||
version: 3.3.13(typescript@5.9.3)
|
version: 3.3.13(typescript@5.9.3)
|
||||||
|
|
@ -1007,6 +1010,9 @@ packages:
|
||||||
'@types/estree@1.0.9':
|
'@types/estree@1.0.9':
|
||||||
resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==}
|
resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==}
|
||||||
|
|
||||||
|
'@types/node@26.6.5':
|
||||||
|
resolution: {integrity: sha512-uMzsv9stDdofIZBx4UGh4Z9ZgXnGC9seRDscilBcTHAeOFk67MZg/k9bWVfO+bk4qZmG+l52hRnLwUiH2LnJTg==}
|
||||||
|
|
||||||
'@types/resolve@1.20.2':
|
'@types/resolve@1.20.2':
|
||||||
resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==}
|
resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==}
|
||||||
|
|
||||||
|
|
@ -2888,6 +2894,9 @@ packages:
|
||||||
unplugin:
|
unplugin:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
|
undici-types@8.9.0:
|
||||||
|
resolution: {integrity: sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==}
|
||||||
|
|
||||||
undici@8.12.2:
|
undici@8.12.2:
|
||||||
resolution: {integrity: sha512-XtuDWVdqTLr3NAxm2ly9/hU6kUsJOgGh1RASzMBbsw6aWCOaQzHdW+QQDfdERjfJ2V5vL5pRPa4RetO9UfivDg==}
|
resolution: {integrity: sha512-XtuDWVdqTLr3NAxm2ly9/hU6kUsJOgGh1RASzMBbsw6aWCOaQzHdW+QQDfdERjfJ2V5vL5pRPa4RetO9UfivDg==}
|
||||||
engines: {node: '>=22.19.0'}
|
engines: {node: '>=22.19.0'}
|
||||||
|
|
@ -3557,17 +3566,17 @@ snapshots:
|
||||||
|
|
||||||
'@csstools/css-tokenizer@4.0.2': {}
|
'@csstools/css-tokenizer@4.0.2': {}
|
||||||
|
|
||||||
'@dxup/nuxt@0.5.10(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(jiti@2.7.0)(mlly@1.8.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))':
|
'@dxup/nuxt@0.5.10(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(jiti@2.7.0)(mlly@1.8.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@dxup/unimport': 0.1.2
|
'@dxup/unimport': 0.1.2
|
||||||
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
||||||
'@vue/compiler-dom': 3.5.44
|
'@vue/compiler-dom': 3.5.44
|
||||||
chokidar: 5.0.0
|
chokidar: 5.0.0
|
||||||
knitwork: 1.3.0
|
knitwork: 1.3.0
|
||||||
magic-string: 1.4.3
|
magic-string: 1.4.3
|
||||||
pathe: 2.0.3
|
pathe: 2.0.3
|
||||||
tinyglobby: 0.2.17
|
tinyglobby: 0.2.17
|
||||||
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@farmfe/core'
|
- '@farmfe/core'
|
||||||
- '@nuxt/schema'
|
- '@nuxt/schema'
|
||||||
|
|
@ -3755,7 +3764,7 @@ snapshots:
|
||||||
'@nodelib/fs.scandir': 2.1.5
|
'@nodelib/fs.scandir': 2.1.5
|
||||||
fastq: 1.20.3
|
fastq: 1.20.3
|
||||||
|
|
||||||
'@nuxt/cli@4.0.1(@nuxt/schema@4.6.2)(jiti@2.7.0)(rolldown@1.2.14)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))':
|
'@nuxt/cli@4.0.1(@nuxt/schema@4.6.2)(jiti@2.7.0)(rolldown@1.2.14)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@clack/prompts': 1.8.1
|
'@clack/prompts': 1.8.1
|
||||||
args-tokenizer: 0.3.0
|
args-tokenizer: 0.3.0
|
||||||
|
|
@ -3766,7 +3775,7 @@ snapshots:
|
||||||
exsolve: 1.1.3
|
exsolve: 1.1.3
|
||||||
fuzzysort: 4.0.2
|
fuzzysort: 4.0.2
|
||||||
get-port-please: 3.2.0
|
get-port-please: 3.2.0
|
||||||
my-bad: 0.2.11(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
my-bad: 0.2.11(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
obug: 3.0.0
|
obug: 3.0.0
|
||||||
package-manager-detector: 1.9.0
|
package-manager-detector: 1.9.0
|
||||||
pathe: 2.0.3
|
pathe: 2.0.3
|
||||||
|
|
@ -3789,11 +3798,11 @@ snapshots:
|
||||||
|
|
||||||
'@nuxt/devalue@2.0.2': {}
|
'@nuxt/devalue@2.0.2': {}
|
||||||
|
|
||||||
'@nuxt/devtools-kit@3.4.3(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))':
|
'@nuxt/devtools-kit@3.4.3(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
||||||
execa: 8.0.1
|
execa: 8.0.1
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@nuxt/schema'
|
- '@nuxt/schema'
|
||||||
- confbox
|
- confbox
|
||||||
|
|
@ -3817,11 +3826,11 @@ snapshots:
|
||||||
pkg-types: 2.3.3
|
pkg-types: 2.3.3
|
||||||
semver: 7.8.5
|
semver: 7.8.5
|
||||||
|
|
||||||
'@nuxt/devtools@3.4.3(@nuxt/schema@4.6.2)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(giget@3.3.1)(ioredis@5.11.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))':
|
'@nuxt/devtools@3.4.3(@nuxt/schema@4.6.2)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(giget@3.3.1)(ioredis@5.11.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@nuxt/devtools-kit': 3.4.3(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
'@nuxt/devtools-kit': 3.4.3(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
'@nuxt/devtools-wizard': 3.4.3
|
'@nuxt/devtools-wizard': 3.4.3
|
||||||
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
||||||
'@vue/devtools-core': 8.2.1(vue@3.5.44(typescript@5.9.3))
|
'@vue/devtools-core': 8.2.1(vue@3.5.44(typescript@5.9.3))
|
||||||
'@vue/devtools-kit': 8.2.1
|
'@vue/devtools-kit': 8.2.1
|
||||||
birpc: 4.2.0
|
birpc: 4.2.0
|
||||||
|
|
@ -3848,9 +3857,9 @@ snapshots:
|
||||||
tinyexec: 1.3.1
|
tinyexec: 1.3.1
|
||||||
tinyglobby: 0.2.17
|
tinyglobby: 0.2.17
|
||||||
unstorage: 1.17.6(db0@0.3.4)(ioredis@5.11.1)
|
unstorage: 1.17.6(db0@0.3.4)(ioredis@5.11.1)
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
vite-plugin-inspect: 11.4.1(@nuxt/kit@4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))))(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
vite-plugin-inspect: 11.4.1(@nuxt/kit@4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))))(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
vite-plugin-vue-tracer: 1.6.0(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))
|
vite-plugin-vue-tracer: 1.6.0(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))
|
||||||
which: 6.0.1
|
which: 6.0.1
|
||||||
ws: 8.22.0
|
ws: 8.22.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
|
|
@ -3887,15 +3896,15 @@ snapshots:
|
||||||
- utf-8-validate
|
- utf-8-validate
|
||||||
- vue
|
- vue
|
||||||
|
|
||||||
'@nuxt/fonts@1.0.1(@nuxt/schema@4.6.2)(cac@7.1.0)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(ioredis@5.11.1)(jiti@2.7.0)(lightningcss@1.33.0)(magic-string@1.4.3)(mlly@1.8.2)(postcss@8.5.30)(rolldown@1.2.14)(rollup@4.64.7)(srvx@1.0.5)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))':
|
'@nuxt/fonts@1.0.1(@nuxt/schema@4.6.2)(cac@7.1.0)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(ioredis@5.11.1)(jiti@2.7.0)(lightningcss@1.33.0)(magic-string@1.4.3)(mlly@1.8.2)(postcss@8.5.30)(rolldown@1.2.14)(rollup@4.64.7)(srvx@1.0.5)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
||||||
defu: 6.1.7
|
defu: 6.1.7
|
||||||
devframe: 1.2.5(cac@7.1.0)(srvx@1.0.5)
|
devframe: 1.2.5(cac@7.1.0)(srvx@1.0.5)
|
||||||
exsolve: 1.1.3
|
exsolve: 1.1.3
|
||||||
fontless: 1.3.2(devframe@1.2.5(cac@7.1.0)(srvx@1.0.5))(esbuild@0.28.2)(jiti@2.7.0)(lightningcss@1.33.0)(postcss@8.5.30)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
fontless: 1.3.2(devframe@1.2.5(cac@7.1.0)(srvx@1.0.5))(esbuild@0.28.2)(jiti@2.7.0)(lightningcss@1.33.0)(postcss@8.5.30)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
h3: 1.15.11
|
h3: 1.15.11
|
||||||
magic-regexp: 0.11.2(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
magic-regexp: 0.11.2(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
nypm: 0.6.10
|
nypm: 0.6.10
|
||||||
ofetch: 1.5.1
|
ofetch: 1.5.1
|
||||||
pathe: 2.0.3
|
pathe: 2.0.3
|
||||||
|
|
@ -3903,7 +3912,7 @@ snapshots:
|
||||||
tinyglobby: 0.2.17
|
tinyglobby: 0.2.17
|
||||||
ufo: 1.6.4
|
ufo: 1.6.4
|
||||||
unifont: 1.0.3
|
unifont: 1.0.3
|
||||||
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
unstorage: 1.17.6(db0@0.3.4)(ioredis@5.11.1)
|
unstorage: 1.17.6(db0@0.3.4)(ioredis@5.11.1)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
lightningcss: 1.33.0
|
lightningcss: 1.33.0
|
||||||
|
|
@ -3951,14 +3960,14 @@ snapshots:
|
||||||
- vite
|
- vite
|
||||||
- webpack
|
- webpack
|
||||||
|
|
||||||
'@nuxt/icon@2.5.1(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))':
|
'@nuxt/icon@2.5.1(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@iconify/collections': 1.0.752
|
'@iconify/collections': 1.0.752
|
||||||
'@iconify/types': 2.0.0
|
'@iconify/types': 2.0.0
|
||||||
'@iconify/utils': 3.1.7
|
'@iconify/utils': 3.1.7
|
||||||
'@iconify/vue': 5.0.3(vue@3.5.44(typescript@5.9.3))
|
'@iconify/vue': 5.0.3(vue@3.5.44(typescript@5.9.3))
|
||||||
'@nuxt/devtools-kit': 3.4.3(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
'@nuxt/devtools-kit': 3.4.3(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
||||||
consola: 3.4.2
|
consola: 3.4.2
|
||||||
local-pkg: 1.2.1
|
local-pkg: 1.2.1
|
||||||
mlly: 1.8.2
|
mlly: 1.8.2
|
||||||
|
|
@ -3980,7 +3989,7 @@ snapshots:
|
||||||
- vite
|
- vite
|
||||||
- vue
|
- vue
|
||||||
|
|
||||||
'@nuxt/kit@4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))':
|
'@nuxt/kit@4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))':
|
||||||
dependencies:
|
dependencies:
|
||||||
consola: 3.4.2
|
consola: 3.4.2
|
||||||
defu: 6.1.7
|
defu: 6.1.7
|
||||||
|
|
@ -3998,7 +4007,7 @@ snapshots:
|
||||||
std-env: 4.3.0
|
std-env: 4.3.0
|
||||||
tinyexec: 1.3.1
|
tinyexec: 1.3.1
|
||||||
tinyglobby: 0.2.17
|
tinyglobby: 0.2.17
|
||||||
unctx: 3.0.1(magic-string@1.4.3)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
unctx: 3.0.1(magic-string@1.4.3)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
||||||
verkit: 0.5.0
|
verkit: 0.5.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@nuxt/schema': 4.6.2
|
'@nuxt/schema': 4.6.2
|
||||||
|
|
@ -4012,10 +4021,10 @@ snapshots:
|
||||||
- magic-string
|
- magic-string
|
||||||
- unplugin
|
- unplugin
|
||||||
|
|
||||||
'@nuxt/nitro-server@4.6.2(e2c28bb6accc7e0cc8d54fac99d5e119)':
|
'@nuxt/nitro-server@4.6.2(84a4646b34af05634091506b3eb5ed14)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
||||||
'@unhead/vue': 3.4.3(@oxc-project/types@0.154.0)(esbuild@0.28.2)(lightningcss@1.33.0)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))
|
'@unhead/vue': 3.4.3(@oxc-project/types@0.154.0)(esbuild@0.28.2)(lightningcss@1.33.0)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))
|
||||||
consola: 3.4.2
|
consola: 3.4.2
|
||||||
defu: 6.1.7
|
defu: 6.1.7
|
||||||
destr: 2.0.5
|
destr: 2.0.5
|
||||||
|
|
@ -4025,20 +4034,20 @@ snapshots:
|
||||||
exsolve: 1.1.3
|
exsolve: 1.1.3
|
||||||
flru: 1.0.2
|
flru: 1.0.2
|
||||||
h3: 1.15.11
|
h3: 1.15.11
|
||||||
impound: 1.2.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
impound: 1.2.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
klona: 2.0.6
|
klona: 2.0.6
|
||||||
mocked-exports: 0.1.1
|
mocked-exports: 0.1.1
|
||||||
my-bad: 0.2.11(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
my-bad: 0.2.11(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
nitropack: 2.13.4(rolldown@1.2.14)(srvx@1.0.5)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
nitropack: 2.13.4(rolldown@1.2.14)(srvx@1.0.5)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
nostics: 1.3.0
|
nostics: 1.3.0
|
||||||
nuxt: 4.6.2(@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7))(@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7))(@oxc-project/types@0.154.0)(@vue/compiler-sfc@3.5.44)(acorn@8.19.0)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(ioredis@5.11.1)(lightningcss@1.33.0)(mlly@1.8.2)(rolldown@1.2.14)(rollup-plugin-visualizer@7.1.1(rolldown@1.2.14)(rollup@4.64.7))(rollup@4.64.7)(srvx@1.0.5)(terser@5.51.2)(typescript@5.9.3)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue-tsc@3.3.13(typescript@5.9.3))
|
nuxt: 4.6.2(@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7))(@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7))(@oxc-project/types@0.154.0)(@types/node@26.6.5)(@vue/compiler-sfc@3.5.44)(acorn@8.19.0)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(ioredis@5.11.1)(lightningcss@1.33.0)(mlly@1.8.2)(rolldown@1.2.14)(rollup-plugin-visualizer@7.1.1(rolldown@1.2.14)(rollup@4.64.7))(rollup@4.64.7)(srvx@1.0.5)(terser@5.51.2)(typescript@5.9.3)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue-tsc@3.3.13(typescript@5.9.3))
|
||||||
ohash: 2.0.12
|
ohash: 2.0.12
|
||||||
pathe: 2.0.3
|
pathe: 2.0.3
|
||||||
radix3: 1.1.2
|
radix3: 1.1.2
|
||||||
rou3: 0.9.2
|
rou3: 0.9.2
|
||||||
std-env: 4.3.0
|
std-env: 4.3.0
|
||||||
ufo: 1.6.4
|
ufo: 1.6.4
|
||||||
unctx: 3.0.1(magic-string@1.4.3)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
unctx: 3.0.1(magic-string@1.4.3)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
||||||
unrouting: 0.2.3
|
unrouting: 0.2.3
|
||||||
unstorage: 1.17.6(db0@0.3.4)(ioredis@5.11.1)
|
unstorage: 1.17.6(db0@0.3.4)(ioredis@5.11.1)
|
||||||
vue: 3.5.44(typescript@5.9.3)
|
vue: 3.5.44(typescript@5.9.3)
|
||||||
|
|
@ -4114,19 +4123,19 @@ snapshots:
|
||||||
pkg-types: 2.3.3
|
pkg-types: 2.3.3
|
||||||
std-env: 4.3.0
|
std-env: 4.3.0
|
||||||
|
|
||||||
'@nuxt/telemetry@2.9.1(@nuxt/kit@4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))))':
|
'@nuxt/telemetry@2.9.1(@nuxt/kit@4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
||||||
citty: 0.2.2
|
citty: 0.2.2
|
||||||
consola: 3.4.2
|
consola: 3.4.2
|
||||||
rc9: 3.1.0
|
rc9: 3.1.0
|
||||||
std-env: 4.3.0
|
std-env: 4.3.0
|
||||||
|
|
||||||
'@nuxt/vite-builder@4.6.2(5c135e912a1ac105e49618344cc697fa)':
|
'@nuxt/vite-builder@4.6.2(89bab6153aa13602927505a09be6a2a6)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
||||||
'@vitejs/plugin-vue': 6.0.10(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))
|
'@vitejs/plugin-vue': 6.0.10(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))
|
||||||
'@vitejs/plugin-vue-jsx': 5.1.6(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))
|
'@vitejs/plugin-vue-jsx': 5.1.6(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))
|
||||||
autoprefixer: 10.6.1(postcss@8.5.30)
|
autoprefixer: 10.6.1(postcss@8.5.30)
|
||||||
clickable-path: 0.1.1
|
clickable-path: 0.1.1
|
||||||
consola: 3.4.2
|
consola: 3.4.2
|
||||||
|
|
@ -4139,8 +4148,8 @@ snapshots:
|
||||||
js-tokens: 10.0.0
|
js-tokens: 10.0.0
|
||||||
knitwork: 1.3.0
|
knitwork: 1.3.0
|
||||||
mocked-exports: 0.1.1
|
mocked-exports: 0.1.1
|
||||||
my-bad: 0.2.11(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
my-bad: 0.2.11(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
nuxt: 4.6.2(@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7))(@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7))(@oxc-project/types@0.154.0)(@vue/compiler-sfc@3.5.44)(acorn@8.19.0)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(ioredis@5.11.1)(lightningcss@1.33.0)(mlly@1.8.2)(rolldown@1.2.14)(rollup-plugin-visualizer@7.1.1(rolldown@1.2.14)(rollup@4.64.7))(rollup@4.64.7)(srvx@1.0.5)(terser@5.51.2)(typescript@5.9.3)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue-tsc@3.3.13(typescript@5.9.3))
|
nuxt: 4.6.2(@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7))(@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7))(@oxc-project/types@0.154.0)(@types/node@26.6.5)(@vue/compiler-sfc@3.5.44)(acorn@8.19.0)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(ioredis@5.11.1)(lightningcss@1.33.0)(mlly@1.8.2)(rolldown@1.2.14)(rollup-plugin-visualizer@7.1.1(rolldown@1.2.14)(rollup@4.64.7))(rollup@4.64.7)(srvx@1.0.5)(terser@5.51.2)(typescript@5.9.3)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue-tsc@3.3.13(typescript@5.9.3))
|
||||||
pathe: 2.0.3
|
pathe: 2.0.3
|
||||||
pkg-types: 2.3.3
|
pkg-types: 2.3.3
|
||||||
postcss: 8.5.30
|
postcss: 8.5.30
|
||||||
|
|
@ -4149,9 +4158,9 @@ snapshots:
|
||||||
std-env: 4.3.0
|
std-env: 4.3.0
|
||||||
ufo: 1.6.4
|
ufo: 1.6.4
|
||||||
unenv: 2.0.0-rc.24
|
unenv: 2.0.0-rc.24
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
vite-node: 6.0.0(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite-node: 6.0.0(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
vite-plugin-checker: 0.14.5(typescript@5.9.3)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue-tsc@3.3.13(typescript@5.9.3))
|
vite-plugin-checker: 0.14.5(typescript@5.9.3)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue-tsc@3.3.13(typescript@5.9.3))
|
||||||
vue: 3.5.44(typescript@5.9.3)
|
vue: 3.5.44(typescript@5.9.3)
|
||||||
vue-bundle-renderer: 2.4.0
|
vue-bundle-renderer: 2.4.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
|
|
@ -4189,21 +4198,21 @@ snapshots:
|
||||||
- vue-tsc
|
- vue-tsc
|
||||||
- yaml
|
- yaml
|
||||||
|
|
||||||
'@nuxt/vite-server@4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(nuxt@4.6.2(@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7))(@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7))(@oxc-project/types@0.154.0)(@vue/compiler-sfc@3.5.44)(acorn@8.19.0)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(ioredis@5.11.1)(lightningcss@1.33.0)(mlly@1.8.2)(rolldown@1.2.14)(rollup-plugin-visualizer@7.1.1(rolldown@1.2.14)(rollup@4.64.7))(rollup@4.64.7)(srvx@1.0.5)(terser@5.51.2)(typescript@5.9.3)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue-tsc@3.3.13(typescript@5.9.3)))(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))':
|
'@nuxt/vite-server@4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(nuxt@4.6.2(@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7))(@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7))(@oxc-project/types@0.154.0)(@types/node@26.6.5)(@vue/compiler-sfc@3.5.44)(acorn@8.19.0)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(ioredis@5.11.1)(lightningcss@1.33.0)(mlly@1.8.2)(rolldown@1.2.14)(rollup-plugin-visualizer@7.1.1(rolldown@1.2.14)(rollup@4.64.7))(rollup@4.64.7)(srvx@1.0.5)(terser@5.51.2)(typescript@5.9.3)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue-tsc@3.3.13(typescript@5.9.3)))(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
||||||
clickable-path: 0.1.1
|
clickable-path: 0.1.1
|
||||||
defu: 6.1.7
|
defu: 6.1.7
|
||||||
exsolve: 1.1.3
|
exsolve: 1.1.3
|
||||||
mocked-exports: 0.1.1
|
mocked-exports: 0.1.1
|
||||||
my-bad: 0.2.11(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
my-bad: 0.2.11(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
nuxt: 4.6.2(@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7))(@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7))(@oxc-project/types@0.154.0)(@vue/compiler-sfc@3.5.44)(acorn@8.19.0)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(ioredis@5.11.1)(lightningcss@1.33.0)(mlly@1.8.2)(rolldown@1.2.14)(rollup-plugin-visualizer@7.1.1(rolldown@1.2.14)(rollup@4.64.7))(rollup@4.64.7)(srvx@1.0.5)(terser@5.51.2)(typescript@5.9.3)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue-tsc@3.3.13(typescript@5.9.3))
|
nuxt: 4.6.2(@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7))(@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7))(@oxc-project/types@0.154.0)(@types/node@26.6.5)(@vue/compiler-sfc@3.5.44)(acorn@8.19.0)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(ioredis@5.11.1)(lightningcss@1.33.0)(mlly@1.8.2)(rolldown@1.2.14)(rollup-plugin-visualizer@7.1.1(rolldown@1.2.14)(rollup@4.64.7))(rollup@4.64.7)(srvx@1.0.5)(terser@5.51.2)(typescript@5.9.3)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue-tsc@3.3.13(typescript@5.9.3))
|
||||||
pathe: 2.0.3
|
pathe: 2.0.3
|
||||||
rou3: 0.9.2
|
rou3: 0.9.2
|
||||||
srvx: 1.0.5
|
srvx: 1.0.5
|
||||||
ufo: 1.6.4
|
ufo: 1.6.4
|
||||||
ultrahtml: 1.7.0
|
ultrahtml: 1.7.0
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@nuxt/schema'
|
- '@nuxt/schema'
|
||||||
- confbox
|
- confbox
|
||||||
|
|
@ -4492,12 +4501,12 @@ snapshots:
|
||||||
'@tailwindcss/oxide-win32-arm64-msvc': 4.3.3
|
'@tailwindcss/oxide-win32-arm64-msvc': 4.3.3
|
||||||
'@tailwindcss/oxide-win32-x64-msvc': 4.3.3
|
'@tailwindcss/oxide-win32-x64-msvc': 4.3.3
|
||||||
|
|
||||||
'@tailwindcss/vite@4.3.3(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))':
|
'@tailwindcss/vite@4.3.3(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@tailwindcss/node': 4.3.3
|
'@tailwindcss/node': 4.3.3
|
||||||
'@tailwindcss/oxide': 4.3.3
|
'@tailwindcss/oxide': 4.3.3
|
||||||
tailwindcss: 4.3.3
|
tailwindcss: 4.3.3
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
|
|
||||||
'@types/chai@5.2.3':
|
'@types/chai@5.2.3':
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
@ -4508,19 +4517,23 @@ snapshots:
|
||||||
|
|
||||||
'@types/estree@1.0.9': {}
|
'@types/estree@1.0.9': {}
|
||||||
|
|
||||||
|
'@types/node@26.6.5':
|
||||||
|
dependencies:
|
||||||
|
undici-types: 8.9.0
|
||||||
|
|
||||||
'@types/resolve@1.20.2': {}
|
'@types/resolve@1.20.2': {}
|
||||||
|
|
||||||
'@unhead/bundler@3.4.3(@oxc-project/types@0.154.0)(esbuild@0.28.2)(lightningcss@1.33.0)(rolldown@1.2.14)(rollup@4.64.7)(unhead@3.4.3(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))':
|
'@unhead/bundler@3.4.3(@oxc-project/types@0.154.0)(esbuild@0.28.2)(lightningcss@1.33.0)(rolldown@1.2.14)(rollup@4.64.7)(unhead@3.4.3(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))':
|
||||||
dependencies:
|
dependencies:
|
||||||
magic-string: 1.4.3
|
magic-string: 1.4.3
|
||||||
oxc-walker: 1.1.1(@oxc-project/types@0.154.0)(rolldown@1.2.14)
|
oxc-walker: 1.1.1(@oxc-project/types@0.154.0)(rolldown@1.2.14)
|
||||||
unhead: 3.4.3(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
unhead: 3.4.3(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
esbuild: 0.28.2
|
esbuild: 0.28.2
|
||||||
lightningcss: 1.33.0
|
lightningcss: 1.33.0
|
||||||
rolldown: 1.2.14
|
rolldown: 1.2.14
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@farmfe/core'
|
- '@farmfe/core'
|
||||||
- '@oxc-project/types'
|
- '@oxc-project/types'
|
||||||
|
|
@ -4530,15 +4543,15 @@ snapshots:
|
||||||
- rollup
|
- rollup
|
||||||
- unloader
|
- unloader
|
||||||
|
|
||||||
'@unhead/vue@3.4.3(@oxc-project/types@0.154.0)(esbuild@0.28.2)(lightningcss@1.33.0)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))':
|
'@unhead/vue@3.4.3(@oxc-project/types@0.154.0)(esbuild@0.28.2)(lightningcss@1.33.0)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@unhead/bundler': 3.4.3(@oxc-project/types@0.154.0)(esbuild@0.28.2)(lightningcss@1.33.0)(rolldown@1.2.14)(rollup@4.64.7)(unhead@3.4.3(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
'@unhead/bundler': 3.4.3(@oxc-project/types@0.154.0)(esbuild@0.28.2)(lightningcss@1.33.0)(rolldown@1.2.14)(rollup@4.64.7)(unhead@3.4.3(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
hookable: 6.1.2
|
hookable: 6.1.2
|
||||||
unhead: 3.4.3(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
unhead: 3.4.3(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
vue: 3.5.44(typescript@5.9.3)
|
vue: 3.5.44(typescript@5.9.3)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@farmfe/core'
|
- '@farmfe/core'
|
||||||
- '@oxc-project/types'
|
- '@oxc-project/types'
|
||||||
|
|
@ -4573,32 +4586,32 @@ snapshots:
|
||||||
- rollup
|
- rollup
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@vitejs/plugin-vue-jsx@5.1.6(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))':
|
'@vitejs/plugin-vue-jsx@5.1.6(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/core': 7.29.7
|
'@babel/core': 7.29.7
|
||||||
'@babel/plugin-syntax-typescript': 7.29.7(@babel/core@7.29.7)
|
'@babel/plugin-syntax-typescript': 7.29.7(@babel/core@7.29.7)
|
||||||
'@babel/plugin-transform-typescript': 7.29.9(@babel/core@7.29.7)
|
'@babel/plugin-transform-typescript': 7.29.9(@babel/core@7.29.7)
|
||||||
'@rolldown/pluginutils': 1.0.1
|
'@rolldown/pluginutils': 1.0.1
|
||||||
'@vue/babel-plugin-jsx': 2.0.1(@babel/core@7.29.7)
|
'@vue/babel-plugin-jsx': 2.0.1(@babel/core@7.29.7)
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
vue: 3.5.44(typescript@5.9.3)
|
vue: 3.5.44(typescript@5.9.3)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@vitejs/plugin-vue@6.0.10(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))':
|
'@vitejs/plugin-vue@6.0.10(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rolldown/pluginutils': 1.0.1
|
'@rolldown/pluginutils': 1.0.1
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
vue: 3.5.44(typescript@5.9.3)
|
vue: 3.5.44(typescript@5.9.3)
|
||||||
|
|
||||||
'@vitest/mocker@5.0.5(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))':
|
'@vitest/mocker@5.0.5(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@jridgewell/trace-mapping': 0.3.31
|
'@jridgewell/trace-mapping': 0.3.31
|
||||||
'@vitest/spy': 5.0.5
|
'@vitest/spy': 5.0.5
|
||||||
estree-walker: 3.0.3
|
estree-walker: 3.0.3
|
||||||
magic-string: 1.4.3
|
magic-string: 1.4.3
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
|
|
||||||
'@vitest/spy@5.0.5': {}
|
'@vitest/spy@5.0.5': {}
|
||||||
|
|
||||||
|
|
@ -5229,12 +5242,12 @@ snapshots:
|
||||||
|
|
||||||
fnv1a-64@0.1.2: {}
|
fnv1a-64@0.1.2: {}
|
||||||
|
|
||||||
fontaine@1.0.1(esbuild@0.28.2)(postcss@8.5.30)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
fontaine@1.0.1(esbuild@0.28.2)(postcss@8.5.30)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@capsizecss/unpack': 4.0.1
|
'@capsizecss/unpack': 4.0.1
|
||||||
css-tree: 3.2.1
|
css-tree: 3.2.1
|
||||||
magic-string: 1.4.3
|
magic-string: 1.4.3
|
||||||
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
postcss: 8.5.30
|
postcss: 8.5.30
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
|
|
@ -5253,19 +5266,19 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
tiny-inflate: 1.0.3
|
tiny-inflate: 1.0.3
|
||||||
|
|
||||||
fontless@1.3.2(devframe@1.2.5(cac@7.1.0)(srvx@1.0.5))(esbuild@0.28.2)(jiti@2.7.0)(lightningcss@1.33.0)(postcss@8.5.30)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
fontless@1.3.2(devframe@1.2.5(cac@7.1.0)(srvx@1.0.5))(esbuild@0.28.2)(jiti@2.7.0)(lightningcss@1.33.0)(postcss@8.5.30)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
css-tree: 3.2.1
|
css-tree: 3.2.1
|
||||||
defu: 6.1.7
|
defu: 6.1.7
|
||||||
exsolve: 1.1.3
|
exsolve: 1.1.3
|
||||||
fontaine: 1.0.1(esbuild@0.28.2)(postcss@8.5.30)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
fontaine: 1.0.1(esbuild@0.28.2)(postcss@8.5.30)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
magic-string: 1.4.3
|
magic-string: 1.4.3
|
||||||
unifont: 1.0.3
|
unifont: 1.0.3
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
devframe: 1.2.5(cac@7.1.0)(srvx@1.0.5)
|
devframe: 1.2.5(cac@7.1.0)(srvx@1.0.5)
|
||||||
jiti: 2.7.0
|
jiti: 2.7.0
|
||||||
lightningcss: 1.33.0
|
lightningcss: 1.33.0
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@farmfe/core'
|
- '@farmfe/core'
|
||||||
- '@rsbuild/core'
|
- '@rsbuild/core'
|
||||||
|
|
@ -5405,12 +5418,12 @@ snapshots:
|
||||||
|
|
||||||
import-meta-resolve@4.2.0: {}
|
import-meta-resolve@4.2.0: {}
|
||||||
|
|
||||||
impound@1.2.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
impound@1.2.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@jridgewell/trace-mapping': 0.3.31
|
'@jridgewell/trace-mapping': 0.3.31
|
||||||
es-module-lexer: 2.3.2
|
es-module-lexer: 2.3.2
|
||||||
pathe: 2.0.3
|
pathe: 2.0.3
|
||||||
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
unplugin-utils: 0.3.2
|
unplugin-utils: 0.3.2
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@farmfe/core'
|
- '@farmfe/core'
|
||||||
|
|
@ -5663,12 +5676,12 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
yallist: 3.1.1
|
yallist: 3.1.1
|
||||||
|
|
||||||
magic-regexp@0.11.2(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
magic-regexp@0.11.2(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
magic-string: 1.4.3
|
magic-string: 1.4.3
|
||||||
regexp-tree: 0.1.27
|
regexp-tree: 0.1.27
|
||||||
type-level-regexp: 0.1.17
|
type-level-regexp: 0.1.17
|
||||||
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@farmfe/core'
|
- '@farmfe/core'
|
||||||
- '@rsbuild/core'
|
- '@rsbuild/core'
|
||||||
|
|
@ -5755,19 +5768,19 @@ snapshots:
|
||||||
|
|
||||||
muggle-string@0.4.1: {}
|
muggle-string@0.4.1: {}
|
||||||
|
|
||||||
my-bad@0.2.11(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
my-bad@0.2.11(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
clickable-path: 0.1.1
|
clickable-path: 0.1.1
|
||||||
errx: 0.2.2
|
errx: 0.2.2
|
||||||
fnv1a-64: 0.1.2
|
fnv1a-64: 0.1.2
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
|
|
||||||
nanoid@3.3.20: {}
|
nanoid@3.3.20: {}
|
||||||
|
|
||||||
nanotar@0.3.0: {}
|
nanotar@0.3.0: {}
|
||||||
|
|
||||||
nitropack@2.13.4(rolldown@1.2.14)(srvx@1.0.5)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
nitropack@2.13.4(rolldown@1.2.14)(srvx@1.0.5)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@cloudflare/kv-asset-handler': 0.4.2
|
'@cloudflare/kv-asset-handler': 0.4.2
|
||||||
'@rollup/plugin-alias': 6.0.0(rollup@4.64.7)
|
'@rollup/plugin-alias': 6.0.0(rollup@4.64.7)
|
||||||
|
|
@ -5832,7 +5845,7 @@ snapshots:
|
||||||
uncrypto: 0.1.3
|
uncrypto: 0.1.3
|
||||||
unctx: 2.5.0
|
unctx: 2.5.0
|
||||||
unenv: 2.0.0-rc.24
|
unenv: 2.0.0-rc.24
|
||||||
unimport: 6.5.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
unimport: 6.5.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
unplugin-utils: 0.3.2
|
unplugin-utils: 0.3.2
|
||||||
unstorage: 1.17.6(db0@0.3.4)(ioredis@5.11.1)
|
unstorage: 1.17.6(db0@0.3.4)(ioredis@5.11.1)
|
||||||
untyped: 2.0.0
|
untyped: 2.0.0
|
||||||
|
|
@ -5911,20 +5924,20 @@ snapshots:
|
||||||
path-key: 4.0.0
|
path-key: 4.0.0
|
||||||
unicorn-magic: 0.3.0
|
unicorn-magic: 0.3.0
|
||||||
|
|
||||||
nuxt@4.6.2(@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7))(@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7))(@oxc-project/types@0.154.0)(@vue/compiler-sfc@3.5.44)(acorn@8.19.0)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(ioredis@5.11.1)(lightningcss@1.33.0)(mlly@1.8.2)(rolldown@1.2.14)(rollup-plugin-visualizer@7.1.1(rolldown@1.2.14)(rollup@4.64.7))(rollup@4.64.7)(srvx@1.0.5)(terser@5.51.2)(typescript@5.9.3)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue-tsc@3.3.13(typescript@5.9.3)):
|
nuxt@4.6.2(@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7))(@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7))(@oxc-project/types@0.154.0)(@types/node@26.6.5)(@vue/compiler-sfc@3.5.44)(acorn@8.19.0)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(ioredis@5.11.1)(lightningcss@1.33.0)(mlly@1.8.2)(rolldown@1.2.14)(rollup-plugin-visualizer@7.1.1(rolldown@1.2.14)(rollup@4.64.7))(rollup@4.64.7)(srvx@1.0.5)(terser@5.51.2)(typescript@5.9.3)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue-tsc@3.3.13(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@dxup/nuxt': 0.5.10(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(jiti@2.7.0)(mlly@1.8.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
'@dxup/nuxt': 0.5.10(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(jiti@2.7.0)(mlly@1.8.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
'@jridgewell/trace-mapping': 0.3.31
|
'@jridgewell/trace-mapping': 0.3.31
|
||||||
'@nuxt/cli': 4.0.1(@nuxt/schema@4.6.2)(jiti@2.7.0)(rolldown@1.2.14)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
'@nuxt/cli': 4.0.1(@nuxt/schema@4.6.2)(jiti@2.7.0)(rolldown@1.2.14)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
'@nuxt/devalue': 2.0.2
|
'@nuxt/devalue': 2.0.2
|
||||||
'@nuxt/devtools': 3.4.3(@nuxt/schema@4.6.2)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(giget@3.3.1)(ioredis@5.11.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))
|
'@nuxt/devtools': 3.4.3(@nuxt/schema@4.6.2)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(giget@3.3.1)(ioredis@5.11.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))
|
||||||
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
||||||
'@nuxt/nitro-server': 4.6.2(e2c28bb6accc7e0cc8d54fac99d5e119)
|
'@nuxt/nitro-server': 4.6.2(84a4646b34af05634091506b3eb5ed14)
|
||||||
'@nuxt/schema': 4.6.2
|
'@nuxt/schema': 4.6.2
|
||||||
'@nuxt/telemetry': 2.9.1(@nuxt/kit@4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))))
|
'@nuxt/telemetry': 2.9.1(@nuxt/kit@4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))))
|
||||||
'@nuxt/vite-builder': 4.6.2(5c135e912a1ac105e49618344cc697fa)
|
'@nuxt/vite-builder': 4.6.2(89bab6153aa13602927505a09be6a2a6)
|
||||||
'@nuxt/vite-server': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(nuxt@4.6.2(@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7))(@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7))(@oxc-project/types@0.154.0)(@vue/compiler-sfc@3.5.44)(acorn@8.19.0)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(ioredis@5.11.1)(lightningcss@1.33.0)(mlly@1.8.2)(rolldown@1.2.14)(rollup-plugin-visualizer@7.1.1(rolldown@1.2.14)(rollup@4.64.7))(rollup@4.64.7)(srvx@1.0.5)(terser@5.51.2)(typescript@5.9.3)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue-tsc@3.3.13(typescript@5.9.3)))(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
'@nuxt/vite-server': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(nuxt@4.6.2(@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7))(@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7))(@oxc-project/types@0.154.0)(@types/node@26.6.5)(@vue/compiler-sfc@3.5.44)(acorn@8.19.0)(confbox@0.3.1)(db0@0.3.4)(dotenv@17.4.2)(esbuild@0.28.2)(giget@3.3.1)(ioredis@5.11.1)(lightningcss@1.33.0)(mlly@1.8.2)(rolldown@1.2.14)(rollup-plugin-visualizer@7.1.1(rolldown@1.2.14)(rollup@4.64.7))(rollup@4.64.7)(srvx@1.0.5)(terser@5.51.2)(typescript@5.9.3)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue-tsc@3.3.13(typescript@5.9.3)))(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
'@unhead/vue': 3.4.3(@oxc-project/types@0.154.0)(esbuild@0.28.2)(lightningcss@1.33.0)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))
|
'@unhead/vue': 3.4.3(@oxc-project/types@0.154.0)(esbuild@0.28.2)(lightningcss@1.33.0)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))
|
||||||
'@vue/shared': 3.5.44
|
'@vue/shared': 3.5.44
|
||||||
chokidar: 5.0.0
|
chokidar: 5.0.0
|
||||||
clickable-path: 0.1.1
|
clickable-path: 0.1.1
|
||||||
|
|
@ -5941,13 +5954,13 @@ snapshots:
|
||||||
fnv1a-64: 0.1.2
|
fnv1a-64: 0.1.2
|
||||||
hookable: 6.1.2
|
hookable: 6.1.2
|
||||||
ignore: 7.0.12
|
ignore: 7.0.12
|
||||||
impound: 1.2.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
impound: 1.2.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
iron-webcrypto: 2.0.0
|
iron-webcrypto: 2.0.0
|
||||||
jiti: 2.7.0
|
jiti: 2.7.0
|
||||||
klona: 2.0.6
|
klona: 2.0.6
|
||||||
knitwork: 1.3.0
|
knitwork: 1.3.0
|
||||||
magic-string: 1.4.3
|
magic-string: 1.4.3
|
||||||
my-bad: 0.2.11(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
my-bad: 0.2.11(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
nanotar: 0.3.0
|
nanotar: 0.3.0
|
||||||
nostics: 1.3.0
|
nostics: 1.3.0
|
||||||
object-identity: 0.2.3
|
object-identity: 0.2.3
|
||||||
|
|
@ -5968,18 +5981,20 @@ snapshots:
|
||||||
ufo: 1.6.4
|
ufo: 1.6.4
|
||||||
ultrahtml: 1.7.0
|
ultrahtml: 1.7.0
|
||||||
uncrypto: 0.1.3
|
uncrypto: 0.1.3
|
||||||
unctx: 3.0.1(magic-string@1.4.3)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
unctx: 3.0.1(magic-string@1.4.3)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
||||||
undici: 8.12.2
|
undici: 8.12.2
|
||||||
unhead: 3.4.3(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
unhead: 3.4.3(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
unimport: 7.0.2(acorn@8.19.0)(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
unimport: 7.0.2(acorn@8.19.0)(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
unrouting: 0.2.3
|
unrouting: 0.2.3
|
||||||
untyped: 2.0.0
|
untyped: 2.0.0
|
||||||
verkit: 0.5.0
|
verkit: 0.5.0
|
||||||
vue: 3.5.44(typescript@5.9.3)
|
vue: 3.5.44(typescript@5.9.3)
|
||||||
vue-bundle-renderer: 2.4.0
|
vue-bundle-renderer: 2.4.0
|
||||||
vue-component-type-helpers: 3.3.13
|
vue-component-type-helpers: 3.3.13
|
||||||
vue-router: 5.4.0(@vue/compiler-sfc@3.5.44)(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))
|
vue-router: 5.4.0(@vue/compiler-sfc@3.5.44)(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3))
|
||||||
|
optionalDependencies:
|
||||||
|
'@types/node': 26.6.5
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@azure/app-configuration'
|
- '@azure/app-configuration'
|
||||||
- '@azure/cosmos'
|
- '@azure/cosmos'
|
||||||
|
|
@ -6561,11 +6576,13 @@ snapshots:
|
||||||
magic-string: 0.30.21
|
magic-string: 0.30.21
|
||||||
unplugin: 2.3.11
|
unplugin: 2.3.11
|
||||||
|
|
||||||
unctx@3.0.1(magic-string@1.4.3)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))):
|
unctx@3.0.1(magic-string@1.4.3)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))):
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
magic-string: 1.4.3
|
magic-string: 1.4.3
|
||||||
rolldown: 1.2.14
|
rolldown: 1.2.14
|
||||||
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
|
|
||||||
|
undici-types@8.9.0: {}
|
||||||
|
|
||||||
undici@8.12.2: {}
|
undici@8.12.2: {}
|
||||||
|
|
||||||
|
|
@ -6573,12 +6590,12 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
pathe: 2.0.3
|
pathe: 2.0.3
|
||||||
|
|
||||||
unhead@3.4.3(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
unhead@3.4.3(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
hookable: 6.1.2
|
hookable: 6.1.2
|
||||||
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@farmfe/core'
|
- '@farmfe/core'
|
||||||
- '@rsbuild/core'
|
- '@rsbuild/core'
|
||||||
|
|
@ -6601,7 +6618,7 @@ snapshots:
|
||||||
std-env: 4.3.0
|
std-env: 4.3.0
|
||||||
undici: 8.12.2
|
undici: 8.12.2
|
||||||
|
|
||||||
unimport@6.5.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
unimport@6.5.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
acorn: 8.19.0
|
acorn: 8.19.0
|
||||||
escape-string-regexp: 5.0.0
|
escape-string-regexp: 5.0.0
|
||||||
|
|
@ -6615,7 +6632,7 @@ snapshots:
|
||||||
scule: 1.3.0
|
scule: 1.3.0
|
||||||
strip-literal: 4.0.0
|
strip-literal: 4.0.0
|
||||||
tinyglobby: 0.2.17
|
tinyglobby: 0.2.17
|
||||||
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
unplugin-utils: 0.3.2
|
unplugin-utils: 0.3.2
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
rolldown: 1.2.14
|
rolldown: 1.2.14
|
||||||
|
|
@ -6630,7 +6647,7 @@ snapshots:
|
||||||
- vite
|
- vite
|
||||||
- webpack
|
- webpack
|
||||||
|
|
||||||
unimport@7.0.2(acorn@8.19.0)(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
unimport@7.0.2(acorn@8.19.0)(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
escape-string-regexp: 5.0.0
|
escape-string-regexp: 5.0.0
|
||||||
estree-walker: 3.0.3
|
estree-walker: 3.0.3
|
||||||
|
|
@ -6643,7 +6660,7 @@ snapshots:
|
||||||
scule: 1.3.0
|
scule: 1.3.0
|
||||||
strip-literal: 4.0.0
|
strip-literal: 4.0.0
|
||||||
tinyglobby: 0.2.17
|
tinyglobby: 0.2.17
|
||||||
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
unplugin-utils: 0.3.2
|
unplugin-utils: 0.3.2
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
acorn: 8.19.0
|
acorn: 8.19.0
|
||||||
|
|
@ -6671,7 +6688,7 @@ snapshots:
|
||||||
picomatch: 4.0.7
|
picomatch: 4.0.7
|
||||||
webpack-virtual-modules: 0.6.2
|
webpack-virtual-modules: 0.6.2
|
||||||
|
|
||||||
unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@jridgewell/remapping': 2.3.5
|
'@jridgewell/remapping': 2.3.5
|
||||||
picomatch: 4.0.7
|
picomatch: 4.0.7
|
||||||
|
|
@ -6680,7 +6697,7 @@ snapshots:
|
||||||
esbuild: 0.28.2
|
esbuild: 0.28.2
|
||||||
rolldown: 1.2.14
|
rolldown: 1.2.14
|
||||||
rollup: 4.64.7
|
rollup: 4.64.7
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
|
|
||||||
unrouting@0.2.3:
|
unrouting@0.2.3:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
@ -6732,23 +6749,23 @@ snapshots:
|
||||||
|
|
||||||
verkit@0.5.0: {}
|
verkit@0.5.0: {}
|
||||||
|
|
||||||
vite-dev-rpc@2.0.0(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
vite-dev-rpc@2.0.0(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
birpc: 4.2.0
|
birpc: 4.2.0
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
vite-hot-client: 2.2.0(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
vite-hot-client: 2.2.0(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
|
|
||||||
vite-hot-client@2.2.0(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
vite-hot-client@2.2.0(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
|
|
||||||
vite-node@6.0.0(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2):
|
vite-node@6.0.0(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2):
|
||||||
dependencies:
|
dependencies:
|
||||||
cac: 7.1.0
|
cac: 7.1.0
|
||||||
es-module-lexer: 2.3.2
|
es-module-lexer: 2.3.2
|
||||||
obug: 2.2.1
|
obug: 2.2.1
|
||||||
pathe: 2.0.3
|
pathe: 2.0.3
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@types/node'
|
- '@types/node'
|
||||||
- '@vitejs/devtools'
|
- '@vitejs/devtools'
|
||||||
|
|
@ -6763,7 +6780,7 @@ snapshots:
|
||||||
- tsx
|
- tsx
|
||||||
- yaml
|
- yaml
|
||||||
|
|
||||||
vite-plugin-checker@0.14.5(typescript@5.9.3)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue-tsc@3.3.13(typescript@5.9.3)):
|
vite-plugin-checker@0.14.5(typescript@5.9.3)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue-tsc@3.3.13(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/code-frame': 7.29.7
|
'@babel/code-frame': 7.29.7
|
||||||
chokidar: 5.0.0
|
chokidar: 5.0.0
|
||||||
|
|
@ -6772,12 +6789,12 @@ snapshots:
|
||||||
picomatch: 4.0.7
|
picomatch: 4.0.7
|
||||||
proper-lockfile: 4.1.2
|
proper-lockfile: 4.1.2
|
||||||
tiny-invariant: 1.3.3
|
tiny-invariant: 1.3.3
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
typescript: 5.9.3
|
typescript: 5.9.3
|
||||||
vue-tsc: 3.3.13(typescript@5.9.3)
|
vue-tsc: 3.3.13(typescript@5.9.3)
|
||||||
|
|
||||||
vite-plugin-inspect@11.4.1(@nuxt/kit@4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))))(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
vite-plugin-inspect@11.4.1(@nuxt/kit@4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))))(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
ansis: 4.4.0
|
ansis: 4.4.0
|
||||||
error-stack-parser-es: 1.0.5
|
error-stack-parser-es: 1.0.5
|
||||||
|
|
@ -6787,22 +6804,22 @@ snapshots:
|
||||||
perfect-debounce: 2.1.0
|
perfect-debounce: 2.1.0
|
||||||
sirv: 3.0.2
|
sirv: 3.0.2
|
||||||
unplugin-utils: 0.3.2
|
unplugin-utils: 0.3.2
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
vite-dev-rpc: 2.0.0(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
vite-dev-rpc: 2.0.0(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)))
|
||||||
|
|
||||||
vite-plugin-vue-tracer@1.6.0(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3)):
|
vite-plugin-vue-tracer@1.6.0(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
estree-walker: 3.0.3
|
estree-walker: 3.0.3
|
||||||
exsolve: 1.1.3
|
exsolve: 1.1.3
|
||||||
magic-string: 1.4.3
|
magic-string: 1.4.3
|
||||||
pathe: 2.0.3
|
pathe: 2.0.3
|
||||||
source-map-js: 1.2.2
|
source-map-js: 1.2.2
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
vue: 3.5.44(typescript@5.9.3)
|
vue: 3.5.44(typescript@5.9.3)
|
||||||
|
|
||||||
vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2):
|
vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2):
|
||||||
dependencies:
|
dependencies:
|
||||||
lightningcss: 1.33.0
|
lightningcss: 1.33.0
|
||||||
picomatch: 4.0.7
|
picomatch: 4.0.7
|
||||||
|
|
@ -6810,15 +6827,16 @@ snapshots:
|
||||||
rolldown: 1.2.14
|
rolldown: 1.2.14
|
||||||
tinyglobby: 0.2.17
|
tinyglobby: 0.2.17
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
|
'@types/node': 26.6.5
|
||||||
esbuild: 0.28.2
|
esbuild: 0.28.2
|
||||||
fsevents: 2.3.3
|
fsevents: 2.3.3
|
||||||
jiti: 2.7.0
|
jiti: 2.7.0
|
||||||
terser: 5.51.2
|
terser: 5.51.2
|
||||||
|
|
||||||
vitest@5.0.5(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
vitest@5.0.5(@types/node@26.6.5)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/chai': 5.2.3
|
'@types/chai': 5.2.3
|
||||||
'@vitest/mocker': 5.0.5(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
'@vitest/mocker': 5.0.5(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
chai: 6.3.0
|
chai: 6.3.0
|
||||||
es-module-lexer: 2.3.2
|
es-module-lexer: 2.3.2
|
||||||
expect-type: 1.4.0
|
expect-type: 1.4.0
|
||||||
|
|
@ -6829,8 +6847,10 @@ snapshots:
|
||||||
tinybench: 6.2.2
|
tinybench: 6.2.2
|
||||||
tinyexec: 1.3.1
|
tinyexec: 1.3.1
|
||||||
tinyglobby: 0.2.17
|
tinyglobby: 0.2.17
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
why-is-node-running: 3.2.1
|
why-is-node-running: 3.2.1
|
||||||
|
optionalDependencies:
|
||||||
|
'@types/node': 26.6.5
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- msw
|
- msw
|
||||||
|
|
||||||
|
|
@ -6844,7 +6864,7 @@ snapshots:
|
||||||
|
|
||||||
vue-devtools-stub@0.1.0: {}
|
vue-devtools-stub@0.1.0: {}
|
||||||
|
|
||||||
vue-router@5.4.0(@vue/compiler-sfc@3.5.44)(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3)):
|
vue-router@5.4.0(@vue/compiler-sfc@3.5.44)(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))(vue@3.5.44(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vue-macros/common': 3.1.4(vue@3.5.44(typescript@5.9.3))
|
'@vue-macros/common': 3.1.4(vue@3.5.44(typescript@5.9.3))
|
||||||
'@vue/devtools-api': 8.2.1
|
'@vue/devtools-api': 8.2.1
|
||||||
|
|
@ -6860,12 +6880,12 @@ snapshots:
|
||||||
picomatch: 4.0.7
|
picomatch: 4.0.7
|
||||||
scule: 1.3.0
|
scule: 1.3.0
|
||||||
tinyglobby: 0.2.17
|
tinyglobby: 0.2.17
|
||||||
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
unplugin: 3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.7)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2))
|
||||||
unplugin-utils: 0.3.2
|
unplugin-utils: 0.3.2
|
||||||
vue: 3.5.44(typescript@5.9.3)
|
vue: 3.5.44(typescript@5.9.3)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@vue/compiler-sfc': 3.5.44
|
'@vue/compiler-sfc': 3.5.44
|
||||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@farmfe/core'
|
- '@farmfe/core'
|
||||||
- '@rsbuild/core'
|
- '@rsbuild/core'
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
// Read a shared project.
|
||||||
|
export default defineEventHandler(async event => {
|
||||||
|
const id = getRouterParam(event, 'id')
|
||||||
|
if (!isShareId(id)) throw createError({ statusCode: 404, message: 'Link not found' })
|
||||||
|
const record = await shareStorage().getItem(id)
|
||||||
|
if (!record) throw createError({ statusCode: 404, message: 'Link not found' })
|
||||||
|
setHeader(event, 'cache-control', 'no-store')
|
||||||
|
return { id, project: record.project, updated: record.updated }
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
// Save a new version to a share link. Needs the edit key from creation.
|
||||||
|
export default defineEventHandler(async event => {
|
||||||
|
rateLimit(event, 'update', 600, 10 * 60_000)
|
||||||
|
const id = getRouterParam(event, 'id')
|
||||||
|
if (!isShareId(id)) throw createError({ statusCode: 404, message: 'Link not found' })
|
||||||
|
const storage = shareStorage()
|
||||||
|
const record = await storage.getItem(id)
|
||||||
|
if (!record) throw createError({ statusCode: 404, message: 'Link not found' })
|
||||||
|
if (!keyMatches(getHeader(event, 'x-edit-key'), record.keyHash)) {
|
||||||
|
throw createError({ statusCode: 403, message: 'This link belongs to someone else' })
|
||||||
|
}
|
||||||
|
const project = await readProjectBody(event)
|
||||||
|
const updated = Date.now()
|
||||||
|
await storage.setItem(id, { ...record, project, updated })
|
||||||
|
return { id, updated }
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
// Create a share link for a project. Returns its id and the edit key.
|
||||||
|
export default defineEventHandler(async event => {
|
||||||
|
rateLimit(event, 'create', 30, 10 * 60_000)
|
||||||
|
const project = await readProjectBody(event)
|
||||||
|
const storage = shareStorage()
|
||||||
|
let id = newShareId()
|
||||||
|
while (await storage.hasItem(id)) id = newShareId()
|
||||||
|
const key = newEditKey()
|
||||||
|
const now = Date.now()
|
||||||
|
await storage.setItem(id, { project, keyHash: hashKey(key), created: now, updated: now })
|
||||||
|
setResponseStatus(event, 201)
|
||||||
|
return { id, key }
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
// Share links: projects stored as JSON files under data/shares, one per id.
|
||||||
|
// Whoever creates a link gets an edit key; only its hash is stored.
|
||||||
|
|
||||||
|
import { createHash, randomBytes, timingSafeEqual } from 'node:crypto'
|
||||||
|
import type { H3Event } from 'h3'
|
||||||
|
import { LIMITS, toProject } from '../../app/lib/logic/project'
|
||||||
|
import type { Project } from '../../app/lib/logic/types'
|
||||||
|
|
||||||
|
export interface ShareRecord {
|
||||||
|
project: Project
|
||||||
|
keyHash: string
|
||||||
|
created: number
|
||||||
|
updated: number
|
||||||
|
}
|
||||||
|
|
||||||
|
const ALPHABET = 'abcdefghijkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789'
|
||||||
|
|
||||||
|
export function newShareId(length = 8): string {
|
||||||
|
return [...randomBytes(length)].map(b => ALPHABET[b % ALPHABET.length]).join('')
|
||||||
|
}
|
||||||
|
|
||||||
|
export const newEditKey = () => randomBytes(18).toString('base64url')
|
||||||
|
export const hashKey = (key: string) => createHash('sha256').update(key).digest('hex')
|
||||||
|
export const isShareId = (id: unknown): id is string => typeof id === 'string' && /^[A-Za-z0-9]{6,16}$/.test(id)
|
||||||
|
export const shareStorage = () => useStorage<ShareRecord>('shares')
|
||||||
|
|
||||||
|
export function keyMatches(key: string | undefined, hash: string): boolean {
|
||||||
|
if (!key) return false
|
||||||
|
const a = Buffer.from(hashKey(key))
|
||||||
|
const b = Buffer.from(hash)
|
||||||
|
return a.length === b.length && timingSafeEqual(a, b)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Per-IP request budget, kept in memory. Enough to stop a script from
|
||||||
|
// filling the disk; resets when the container restarts.
|
||||||
|
const hits = new Map<string, { n: number; reset: number }>()
|
||||||
|
|
||||||
|
export function rateLimit(event: H3Event, bucket: string, max: number, windowMs: number) {
|
||||||
|
const now = Date.now()
|
||||||
|
if (hits.size > 10_000) for (const [k, h] of hits) if (h.reset < now) hits.delete(k)
|
||||||
|
const key = `${bucket}:${getRequestIP(event, { xForwardedFor: true }) ?? 'unknown'}`
|
||||||
|
const h = hits.get(key)
|
||||||
|
if (!h || h.reset < now) {
|
||||||
|
hits.set(key, { n: 1, reset: now + windowMs })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (++h.n > max) throw createError({ statusCode: 429, message: 'Too many requests. Try again in a few minutes.' })
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function readProjectBody(event: H3Event): Promise<Project> {
|
||||||
|
const raw = await readRawBody(event, 'utf8')
|
||||||
|
if (!raw) throw createError({ statusCode: 400, message: 'Empty request' })
|
||||||
|
if (raw.length > LIMITS.bytes) throw createError({ statusCode: 413, message: 'Project too large to share' })
|
||||||
|
let body: { project?: unknown }
|
||||||
|
try {
|
||||||
|
body = JSON.parse(raw)
|
||||||
|
} catch {
|
||||||
|
throw createError({ statusCode: 400, message: 'Not valid JSON' })
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return toProject(body.project)
|
||||||
|
} catch (e) {
|
||||||
|
throw createError({ statusCode: 400, message: (e as Error).message })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,194 @@
|
||||||
|
import { describe, expect, it } from 'vitest'
|
||||||
|
import { compile } from '../app/lib/logic/compile'
|
||||||
|
import { chipPins, routeWire, shapeOf, type Pt } from '../app/lib/logic/geometry'
|
||||||
|
import { createProject, lookup, mergeComponents } from '../app/lib/logic/ops'
|
||||||
|
import { parseProject, toProject } from '../app/lib/logic/project'
|
||||||
|
import { Simulator } from '../app/lib/logic/sim'
|
||||||
|
import type { ComponentDef, Project } from '../app/lib/logic/types'
|
||||||
|
import { branchCorners, branchTo, moveCorner, moveSegment, segmentDrag, splitDrag } from '../app/lib/logic/wires'
|
||||||
|
|
||||||
|
/** A component whose input drives a labelled lamp, placed once in a root circuit. */
|
||||||
|
function lampProject(): Project {
|
||||||
|
const p = createProject({ examples: false })
|
||||||
|
const part: ComponentDef = {
|
||||||
|
id: 'part',
|
||||||
|
name: 'Part',
|
||||||
|
symbol: 'not',
|
||||||
|
nodes: [
|
||||||
|
{ id: 'a', kind: 'input', x: 0, y: 0, label: 'A' },
|
||||||
|
{ id: 'q', kind: 'output', x: 10, y: 0, label: 'Q' },
|
||||||
|
{ id: 'l', kind: 'lamp', x: 6, y: 4, label: 'Busy' },
|
||||||
|
],
|
||||||
|
wires: [
|
||||||
|
{ id: 'w1', from: { node: 'a', pin: 'q' }, to: { node: 'q', pin: 'a' } },
|
||||||
|
{ id: 'w2', from: { node: 'a', pin: 'q' }, to: { node: 'l', pin: 'a' } },
|
||||||
|
],
|
||||||
|
}
|
||||||
|
const root: ComponentDef = {
|
||||||
|
id: 'root',
|
||||||
|
name: 'Root',
|
||||||
|
symbol: 'box',
|
||||||
|
nodes: [
|
||||||
|
{ id: 's', kind: 'input', x: 0, y: 0, label: 'S' },
|
||||||
|
{ id: 'c', kind: 'chip', chip: 'part', x: 6, y: 0 },
|
||||||
|
],
|
||||||
|
wires: [{ id: 'w', from: { node: 's', pin: 'q' }, to: { node: 'c', pin: 'a' } }],
|
||||||
|
}
|
||||||
|
p.components.push(part, root)
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('lamps on the component box', () => {
|
||||||
|
it('draws a component with lamps as a box with the lamp and its label below the pins', () => {
|
||||||
|
const p = lampProject()
|
||||||
|
const shape = shapeOf(p.components.find(d => d.id === 'root')!.nodes[1]!, lookup(p))
|
||||||
|
expect(shape.gate).toBeUndefined()
|
||||||
|
expect(shape.face).toHaveLength(1)
|
||||||
|
const lamp = shape.face![0]!
|
||||||
|
expect(lamp.label).toBe('Busy')
|
||||||
|
expect(lamp.y).toBeGreaterThan(shape.nameY!)
|
||||||
|
expect(lamp.y + lamp.h).toBeLessThanOrEqual(shape.body.y + shape.body.h)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('can be turned off per component', () => {
|
||||||
|
const p = lampProject()
|
||||||
|
p.components.find(d => d.id === 'part')!.face = false
|
||||||
|
const shape = shapeOf(p.components.find(d => d.id === 'root')!.nodes[1]!, lookup(p))
|
||||||
|
expect(shape.face ?? []).toHaveLength(0)
|
||||||
|
expect(shape.gate).toBe('not')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('lights the lamp from the instance’s own state', () => {
|
||||||
|
const p = lampProject()
|
||||||
|
const sim = new Simulator(compile(lookup(p), 'root'))
|
||||||
|
sim.run()
|
||||||
|
expect(sim.face('c', 'l', 'a')).toBe(0)
|
||||||
|
sim.setSource('s', true)
|
||||||
|
sim.run()
|
||||||
|
expect(sim.face('c', 'l', 'a')).toBe(1)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('arranges lamps in rows the way they sit inside', () => {
|
||||||
|
const p = lampProject()
|
||||||
|
const part = p.components.find(d => d.id === 'part')!
|
||||||
|
part.nodes.push({ id: 'l2', kind: 'lamp', x: 9, y: 4 }, { id: 'l3', kind: 'lamp', x: 6, y: 8 })
|
||||||
|
const face = shapeOf(p.components.find(d => d.id === 'root')!.nodes[1]!, lookup(p)).face!
|
||||||
|
const [l1, l2, l3] = ['l', 'l2', 'l3'].map(id => face.find(f => f.id === id)!)
|
||||||
|
expect(l1!.y).toBe(l2!.y)
|
||||||
|
expect(l2!.x).toBeGreaterThan(l1!.x)
|
||||||
|
expect(l3!.y).toBeGreaterThan(l1!.y)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('wire editing', () => {
|
||||||
|
// Output pin at (0,0), input pin at (10,4): default route has a vertical step at x=5.
|
||||||
|
const route = routeWire([0, 0], [10, 4])
|
||||||
|
|
||||||
|
it('moves an inner segment', () => {
|
||||||
|
expect(route).toEqual([[0, 0], [5, 0], [5, 4], [10, 4]])
|
||||||
|
const prep = segmentDrag(route, 1)!
|
||||||
|
expect(prep.axis).toBe(0)
|
||||||
|
const pts = moveSegment(prep.base, prep.k, prep.axis, 2)
|
||||||
|
expect(routeWire([0, 0], [10, 4], pts)).toEqual([[0, 0], [7, 0], [7, 4], [10, 4]])
|
||||||
|
})
|
||||||
|
|
||||||
|
it('moves a segment that starts at a pin, keeping a stub at the pin', () => {
|
||||||
|
const prep = segmentDrag(route, 0)!
|
||||||
|
const pts = moveSegment(prep.base, prep.k, prep.axis, 2)
|
||||||
|
const r = routeWire([0, 0], [10, 4], pts)
|
||||||
|
expect(r[0]).toEqual([0, 0])
|
||||||
|
expect(r[1]).toEqual([1, 0])
|
||||||
|
expect(r).toContainEqual([1, 2])
|
||||||
|
expect(r.at(-1)).toEqual([10, 4])
|
||||||
|
})
|
||||||
|
|
||||||
|
it('moves a straight wire sideways with stubs at both pins', () => {
|
||||||
|
const straight = routeWire([0, 0], [8, 0])
|
||||||
|
const prep = segmentDrag(straight, 0)!
|
||||||
|
const r = routeWire([0, 0], [8, 0], moveSegment(prep.base, prep.k, prep.axis, -3))
|
||||||
|
expect(r).toEqual([[0, 0], [1, 0], [1, -3], [7, -3], [7, 0], [8, 0]])
|
||||||
|
})
|
||||||
|
|
||||||
|
it('moves a corner and keeps the wire square', () => {
|
||||||
|
const r = routeWire([0, 0], [10, 4], moveCorner(route, 1, [3, 2]))
|
||||||
|
for (let i = 0; i < r.length - 1; i++) {
|
||||||
|
const [a, b] = [r[i]!, r[i + 1]!]
|
||||||
|
expect(a[0] === b[0] || a[1] === b[1]).toBe(true)
|
||||||
|
}
|
||||||
|
expect(r).toContainEqual([3, 2])
|
||||||
|
})
|
||||||
|
|
||||||
|
it('pulls a new bend out of a segment', () => {
|
||||||
|
const prep = splitDrag(route, 2, [8, 4])!
|
||||||
|
const r = routeWire([0, 0], [10, 4], moveSegment(prep.base, prep.k, prep.axis, 2))
|
||||||
|
expect(r).toContainEqual([8, 4])
|
||||||
|
expect(r).toContainEqual([8, 6])
|
||||||
|
expect(r.at(-1)).toEqual([10, 4])
|
||||||
|
})
|
||||||
|
|
||||||
|
it('branches a new wire off an existing one', () => {
|
||||||
|
const corners = branchCorners(route, 1, [5.2, 2.4])
|
||||||
|
expect(corners).toEqual([[5, 0], [5, 2]] as Pt[])
|
||||||
|
const r = routeWire([0, 0], [12, 8], branchTo(corners, [0, 0], [12, 8]))
|
||||||
|
expect(r).toEqual([[0, 0], [5, 0], [5, 2], [9, 2], [9, 8], [12, 8]])
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('project files', () => {
|
||||||
|
it('fills in defaults and keeps the name', () => {
|
||||||
|
const p = toProject({ name: 'Mine', components: [{ id: 'x', name: 'X', nodes: [], wires: [] }] })
|
||||||
|
expect(p.name).toBe('Mine')
|
||||||
|
expect(p.openId).toBe('x')
|
||||||
|
expect(p.settings).toEqual({ symbols: 'iec', flow: true })
|
||||||
|
})
|
||||||
|
|
||||||
|
it('rejects files that are not projects', () => {
|
||||||
|
expect(() => parseProject('{"hello":1}')).toThrow(/Not a Logigate project/)
|
||||||
|
expect(() => parseProject('nope')).toThrow(/JSON/)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('merges components: skips identical ones, re-ids clashes and their references', () => {
|
||||||
|
const p = createProject({ examples: true })
|
||||||
|
const other = createProject({ examples: true })
|
||||||
|
expect(mergeComponents(p, other.components.filter(d => d.id !== 'main'))).toBe(0)
|
||||||
|
|
||||||
|
const changedNot = { ...structuredClone(other.components.find(d => d.id === 'ex-not')!), description: 'changed' }
|
||||||
|
const usesNot = structuredClone(other.components.find(d => d.id === 'ex-and')!)
|
||||||
|
usesNot.description = 'changed too'
|
||||||
|
expect(mergeComponents(p, [changedNot, usesNot])).toBe(2)
|
||||||
|
const added = p.components.slice(-2)
|
||||||
|
expect(added[0]!.id).not.toBe('ex-not')
|
||||||
|
expect(added[0]!.name).toBe('NOT 2')
|
||||||
|
expect(added[1]!.nodes.find(n => n.kind === 'chip')!.chip).toBe(added[0]!.id)
|
||||||
|
expect(chipPins(added[1]!).inputs).toHaveLength(2)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('route clean-up', () => {
|
||||||
|
it('collapses a bump that was dragged flat, including the duplicate it leaves', async () => {
|
||||||
|
const { simplify } = await import('../app/lib/logic/geometry')
|
||||||
|
expect(simplify([[2, 0], [4, 0], [4, 3], [4, 3], [4, 0], [5, 0]])).toEqual([[2, 0], [5, 0]])
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('example counter face', () => {
|
||||||
|
it('shows the count on the Counter 4 box in the demo', () => {
|
||||||
|
const p = createProject({ examples: true })
|
||||||
|
const get = lookup(p)
|
||||||
|
const demo = get('ex-demo-counter')!
|
||||||
|
const chip = demo.nodes.find(n => n.kind === 'chip')!
|
||||||
|
const hex = get('ex-cnt4')!.nodes.find(n => n.kind === 'hex')!
|
||||||
|
expect(hex.label).toBe('count')
|
||||||
|
expect(shapeOf(chip, get).face!.map(f => f.kind)).toEqual(['hex'])
|
||||||
|
const sim = new Simulator(compile(get, demo.id))
|
||||||
|
const shown = () => [0, 1, 2, 3].reduce((n, i) => n + (sim.face(chip.id, hex.id, `b${i}`) << i), 0)
|
||||||
|
sim.run()
|
||||||
|
for (let i = 1; i <= 5; i++) {
|
||||||
|
sim.setClock(1)
|
||||||
|
sim.run()
|
||||||
|
sim.setClock(0)
|
||||||
|
sim.run()
|
||||||
|
expect(shown()).toBe(i)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
Loading…
Reference in New Issue