dialog-ide 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +69 -0
- package/LICENSE +201 -0
- package/README.md +211 -0
- package/THIRD_PARTY_LICENSES.md +157 -0
- package/bin/darwin-arm64/aambundle +0 -0
- package/bin/darwin-arm64/dgdebug +0 -0
- package/bin/darwin-arm64/dialogc +0 -0
- package/bin/dialog-lib/stddebug.dg +112 -0
- package/bin/dialog-lib/stdlib.dg +6730 -0
- package/bin/dialog-lib/unit.dg +187 -0
- package/dist/cli/commands/run-skein.d.ts +17 -0
- package/dist/cli/commands/run-skein.d.ts.map +1 -0
- package/dist/cli/commands/run-skein.js +105 -0
- package/dist/cli/commands/run-skein.js.map +1 -0
- package/dist/cli/commands/sources.d.ts +12 -0
- package/dist/cli/commands/sources.d.ts.map +1 -0
- package/dist/cli/commands/sources.js +42 -0
- package/dist/cli/commands/sources.js.map +1 -0
- package/dist/cli/commands/test.d.ts +9 -0
- package/dist/cli/commands/test.d.ts.map +1 -0
- package/dist/cli/commands/test.js +41 -0
- package/dist/cli/commands/test.js.map +1 -0
- package/dist/cli/context.d.ts +9 -0
- package/dist/cli/context.d.ts.map +1 -0
- package/dist/cli/context.js +78 -0
- package/dist/cli/context.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +32 -0
- package/dist/cli.js.map +1 -0
- package/dist/dialog-cover-resize.d.ts +2 -0
- package/dist/dialog-cover-resize.d.ts.map +1 -0
- package/dist/dialog-cover-resize.js +46 -0
- package/dist/dialog-cover-resize.js.map +1 -0
- package/dist/dialog-export.d.ts +23 -0
- package/dist/dialog-export.d.ts.map +1 -0
- package/dist/dialog-export.js +133 -0
- package/dist/dialog-export.js.map +1 -0
- package/dist/dialog-feelies.d.ts +4 -0
- package/dist/dialog-feelies.d.ts.map +1 -0
- package/dist/dialog-feelies.js +62 -0
- package/dist/dialog-feelies.js.map +1 -0
- package/dist/dialog-outline.d.ts +19 -0
- package/dist/dialog-outline.d.ts.map +1 -0
- package/dist/dialog-outline.js +122 -0
- package/dist/dialog-outline.js.map +1 -0
- package/dist/dialog-project-init.d.ts +5 -0
- package/dist/dialog-project-init.d.ts.map +1 -0
- package/dist/dialog-project-init.js +107 -0
- package/dist/dialog-project-init.js.map +1 -0
- package/dist/dialog-source-coverage.d.ts +9 -0
- package/dist/dialog-source-coverage.d.ts.map +1 -0
- package/dist/dialog-source-coverage.js +61 -0
- package/dist/dialog-source-coverage.js.map +1 -0
- package/dist/dialog-source-decoration-provider.d.ts +11 -0
- package/dist/dialog-source-decoration-provider.d.ts.map +1 -0
- package/dist/dialog-source-decoration-provider.js +79 -0
- package/dist/dialog-source-decoration-provider.js.map +1 -0
- package/dist/dialog-symbol-index.d.ts +19 -0
- package/dist/dialog-symbol-index.d.ts.map +1 -0
- package/dist/dialog-symbol-index.js +107 -0
- package/dist/dialog-symbol-index.js.map +1 -0
- package/dist/dialog-symbol-provider.d.ts +5 -0
- package/dist/dialog-symbol-provider.d.ts.map +1 -0
- package/dist/dialog-symbol-provider.js +56 -0
- package/dist/dialog-symbol-provider.js.map +1 -0
- package/dist/dialog-web-export.d.ts +25 -0
- package/dist/dialog-web-export.d.ts.map +1 -0
- package/dist/dialog-web-export.js +283 -0
- package/dist/dialog-web-export.js.map +1 -0
- package/dist/dialog-workspace-symbol-provider.d.ts +16 -0
- package/dist/dialog-workspace-symbol-provider.d.ts.map +1 -0
- package/dist/dialog-workspace-symbol-provider.js +107 -0
- package/dist/dialog-workspace-symbol-provider.js.map +1 -0
- package/dist/dialog-workspace-watcher.d.ts +22 -0
- package/dist/dialog-workspace-watcher.d.ts.map +1 -0
- package/dist/dialog-workspace-watcher.js +102 -0
- package/dist/dialog-workspace-watcher.js.map +1 -0
- package/dist/dialoged/skein/compile-error.d.ts +10 -0
- package/dist/dialoged/skein/compile-error.d.ts.map +1 -0
- package/dist/dialoged/skein/compile-error.js +28 -0
- package/dist/dialoged/skein/compile-error.js.map +1 -0
- package/dist/dialoged/skein/dynamic.d.ts +14 -0
- package/dist/dialoged/skein/dynamic.d.ts.map +1 -0
- package/dist/dialoged/skein/dynamic.js +176 -0
- package/dist/dialoged/skein/dynamic.js.map +1 -0
- package/dist/dialoged/skein/frotz-build.d.ts +10 -0
- package/dist/dialoged/skein/frotz-build.d.ts.map +1 -0
- package/dist/dialoged/skein/frotz-build.js +70 -0
- package/dist/dialoged/skein/frotz-build.js.map +1 -0
- package/dist/dialoged/skein/index.d.ts +15 -0
- package/dist/dialoged/skein/index.d.ts.map +1 -0
- package/dist/dialoged/skein/index.js +31 -0
- package/dist/dialoged/skein/index.js.map +1 -0
- package/dist/dialoged/skein/io.d.ts +15 -0
- package/dist/dialoged/skein/io.d.ts.map +1 -0
- package/dist/dialoged/skein/io.js +53 -0
- package/dist/dialoged/skein/io.js.map +1 -0
- package/dist/dialoged/skein/persistence.d.ts +13 -0
- package/dist/dialoged/skein/persistence.d.ts.map +1 -0
- package/dist/dialoged/skein/persistence.js +228 -0
- package/dist/dialoged/skein/persistence.js.map +1 -0
- package/dist/dialoged/skein/process.d.ts +38 -0
- package/dist/dialoged/skein/process.d.ts.map +1 -0
- package/dist/dialoged/skein/process.js +189 -0
- package/dist/dialoged/skein/process.js.map +1 -0
- package/dist/dialoged/skein/progress.d.ts +17 -0
- package/dist/dialoged/skein/progress.d.ts.map +1 -0
- package/dist/dialoged/skein/progress.js +9 -0
- package/dist/dialoged/skein/progress.js.map +1 -0
- package/dist/dialoged/skein/project.d.ts +44 -0
- package/dist/dialoged/skein/project.d.ts.map +1 -0
- package/dist/dialoged/skein/project.js +223 -0
- package/dist/dialoged/skein/project.js.map +1 -0
- package/dist/dialoged/skein/search.d.ts +15 -0
- package/dist/dialoged/skein/search.d.ts.map +1 -0
- package/dist/dialoged/skein/search.js +99 -0
- package/dist/dialoged/skein/search.js.map +1 -0
- package/dist/dialoged/skein/service.d.ts +91 -0
- package/dist/dialoged/skein/service.d.ts.map +1 -0
- package/dist/dialoged/skein/service.js +1097 -0
- package/dist/dialoged/skein/service.js.map +1 -0
- package/dist/dialoged/skein/session.d.ts +96 -0
- package/dist/dialoged/skein/session.d.ts.map +1 -0
- package/dist/dialoged/skein/session.js +690 -0
- package/dist/dialoged/skein/session.js.map +1 -0
- package/dist/dialoged/skein/syntax.d.ts +5 -0
- package/dist/dialoged/skein/syntax.d.ts.map +1 -0
- package/dist/dialoged/skein/syntax.js +150 -0
- package/dist/dialoged/skein/syntax.js.map +1 -0
- package/dist/dialoged/skein/trace.d.ts +31 -0
- package/dist/dialoged/skein/trace.d.ts.map +1 -0
- package/dist/dialoged/skein/trace.js +172 -0
- package/dist/dialoged/skein/trace.js.map +1 -0
- package/dist/dialoged/skein/tree.d.ts +114 -0
- package/dist/dialoged/skein/tree.d.ts.map +1 -0
- package/dist/dialoged/skein/tree.js +701 -0
- package/dist/dialoged/skein/tree.js.map +1 -0
- package/dist/dialoged/skein/ui/ansi.d.ts +4 -0
- package/dist/dialoged/skein/ui/ansi.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/ansi.js +215 -0
- package/dist/dialoged/skein/ui/ansi.js.map +1 -0
- package/dist/dialoged/skein/ui/diff.d.ts +7 -0
- package/dist/dialoged/skein/ui/diff.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/diff.js +17 -0
- package/dist/dialoged/skein/ui/diff.js.map +1 -0
- package/dist/dialoged/skein/ui/knot-menu.d.ts +5 -0
- package/dist/dialoged/skein/ui/knot-menu.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/knot-menu.js +89 -0
- package/dist/dialoged/skein/ui/knot-menu.js.map +1 -0
- package/dist/dialoged/skein/ui/marker-colors.d.ts +5 -0
- package/dist/dialoged/skein/ui/marker-colors.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/marker-colors.js +18 -0
- package/dist/dialoged/skein/ui/marker-colors.js.map +1 -0
- package/dist/dialoged/skein/ui/render.d.ts +13 -0
- package/dist/dialoged/skein/ui/render.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/render.js +332 -0
- package/dist/dialoged/skein/ui/render.js.map +1 -0
- package/dist/dialoged/skein/ui/traceRender.d.ts +11 -0
- package/dist/dialoged/skein/ui/traceRender.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/traceRender.js +139 -0
- package/dist/dialoged/skein/ui/traceRender.js.map +1 -0
- package/dist/dialoged/skein/ui/tree-pane.d.ts +3 -0
- package/dist/dialoged/skein/ui/tree-pane.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/tree-pane.js +135 -0
- package/dist/dialoged/skein/ui/tree-pane.js.map +1 -0
- package/dist/dialoged/skein/ui/webExportPage.d.ts +29 -0
- package/dist/dialoged/skein/ui/webExportPage.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/webExportPage.js +72 -0
- package/dist/dialoged/skein/ui/webExportPage.js.map +1 -0
- package/dist/extension.d.ts +4 -0
- package/dist/extension.d.ts.map +1 -0
- package/dist/extension.js +885 -0
- package/dist/extension.js.map +1 -0
- package/dist/session-runner.d.ts +23 -0
- package/dist/session-runner.d.ts.map +1 -0
- package/dist/session-runner.js +92 -0
- package/dist/session-runner.js.map +1 -0
- package/language-configuration.json +43 -0
- package/media/icon.png +0 -0
- package/media/icons/arrow-down-circle-solid.svg +3 -0
- package/media/icons/arrow-down-solid.svg +3 -0
- package/media/icons/arrow-path-solid.svg +3 -0
- package/media/icons/arrow-right-solid.svg +3 -0
- package/media/icons/arrow-up-on-square-stack-solid.svg +5 -0
- package/media/icons/arrow-up-solid.svg +3 -0
- package/media/icons/arrow-uturn-left.svg +3 -0
- package/media/icons/arrow-uturn-right.svg +3 -0
- package/media/icons/bookmark-solid.svg +3 -0
- package/media/icons/bug-ant-solid.svg +3 -0
- package/media/icons/check-badge-solid.svg +3 -0
- package/media/icons/check-circle-solid.svg +3 -0
- package/media/icons/chevron-double-down-solid.svg +4 -0
- package/media/icons/chevron-double-up-solid.svg +4 -0
- package/media/icons/command-line-solid.svg +3 -0
- package/media/icons/cpu-chip-solid.svg +4 -0
- package/media/icons/dg-file-dark.svg +6 -0
- package/media/icons/dg-file-light.svg +6 -0
- package/media/icons/ellipsis-vertical-solid.svg +3 -0
- package/media/icons/exclamation-triangle.svg +3 -0
- package/media/icons/folder-arrow-down-solid.svg +3 -0
- package/media/icons/globe-alt.svg +3 -0
- package/media/icons/lock-closed-solid.svg +3 -0
- package/media/icons/magnifying-glass-solid.svg +3 -0
- package/media/icons/pencil-solid.svg +4 -0
- package/media/icons/play-solid.svg +3 -0
- package/media/icons/plus-circle-solid.svg +3 -0
- package/media/icons/scissors-solid.svg +5 -0
- package/media/icons/tag-solid.svg +3 -0
- package/media/icons/trash-solid.svg +3 -0
- package/media/icons/x-circle-solid.svg +3 -0
- package/media/js/datastar.js +9 -0
- package/media/js/main.js +1109 -0
- package/media/js/skein-loader.js +10 -0
- package/media/js/trace-loader.js +4 -0
- package/media/js/trace.js +147 -0
- package/media/style.css +5783 -0
- package/package.json +231 -0
- package/resources/bundle/default-cover.png +0 -0
- package/resources/bundle/introduction-to-if.pdf +0 -0
- package/resources/bundle/play-if-card.pdf +1990 -1
- package/resources/bundle/play.css +432 -0
- package/resources/bundle/style.css +450 -0
- package/resources/dfrotz-skein-patch.dg +4 -0
- package/syntaxes/dialog.tmLanguage.json +490 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Single entry point for the Skein page's two module scripts, replacing separate <script
|
|
2
|
+
// type="module"> tags for each - ES modules guarantee sibling static imports with no dependency
|
|
3
|
+
// edge between them evaluate in declaration order, so main.js is guaranteed to finish setting
|
|
4
|
+
// window.sk before datastar.js runs and starts dereferencing it from data-init="sk...()"
|
|
5
|
+
// attributes already in the page (e.g. sk.initTreeGraph()). Relying on <script> tag order alone
|
|
6
|
+
// worked (both are deferred, and deferred scripts execute in document order) but was an implicit
|
|
7
|
+
// contract nothing in the markup made obvious - a future reordering could silently reintroduce
|
|
8
|
+
// the "sk is not defined" race.
|
|
9
|
+
import './main.js';
|
|
10
|
+
import './datastar.js';
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// Client-side JS for the Trace panel (its own page, served at /trace - see traceRender.ts).
|
|
2
|
+
// Independent of main.js: this page has no tree graph, no knot menus, nothing else main.js
|
|
3
|
+
// handles - just the hover-to-preview and click-to-open-source interactions specific to trace
|
|
4
|
+
// rows, plus the postMessage bridge back to the extension host (only extension.ts has the
|
|
5
|
+
// vscode API needed to actually open/focus an editor - see extension.ts's TraceViewProvider).
|
|
6
|
+
window.sk = window.sk || {};
|
|
7
|
+
window.sk.trace = {
|
|
8
|
+
openSource(file, line) {
|
|
9
|
+
window.parent.postMessage({ type: 'openSource', file, line }, '*');
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
let hoverTimer = null;
|
|
14
|
+
let currentHoverRow = null;
|
|
15
|
+
// Latest known pointer position, used at show time rather than whatever position the mouse was
|
|
16
|
+
// at when the hover first started - the 150ms delay before showing means the cursor may have
|
|
17
|
+
// drifted a little further into the row by the time the popover actually appears.
|
|
18
|
+
let lastMouseX = 0;
|
|
19
|
+
let lastMouseY = 0;
|
|
20
|
+
|
|
21
|
+
document.addEventListener('mousemove', (evt) => {
|
|
22
|
+
lastMouseX = evt.clientX;
|
|
23
|
+
lastMouseY = evt.clientY;
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Places the popover near (x, y) rather than anchored to the hovered row - the row spans most
|
|
28
|
+
* of the panel's width, so any single fixed side/offset relative to it ran out of room near one
|
|
29
|
+
* end (that's what made the popover behave differently depending on which part of a row -
|
|
30
|
+
* query term vs. filename - triggered the hover). Following the cursor sidesteps the row's own
|
|
31
|
+
* geometry entirely. Offsets and clamps against the viewport so it doesn't open off-screen or
|
|
32
|
+
* directly under the cursor (which would immediately trigger mouseout on the row underneath).
|
|
33
|
+
*/
|
|
34
|
+
function positionPopover(popover, x, y) {
|
|
35
|
+
const OFFSET = 14;
|
|
36
|
+
const rect = popover.getBoundingClientRect();
|
|
37
|
+
let left = x + OFFSET;
|
|
38
|
+
let top = y + OFFSET;
|
|
39
|
+
if (left + rect.width > window.innerWidth) {
|
|
40
|
+
left = Math.max(0, x - rect.width - OFFSET);
|
|
41
|
+
}
|
|
42
|
+
if (top + rect.height > window.innerHeight) {
|
|
43
|
+
top = Math.max(0, y - rect.height - OFFSET);
|
|
44
|
+
}
|
|
45
|
+
popover.style.left = `${left}px`;
|
|
46
|
+
popover.style.top = `${top}px`;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function showSourcePreview(row) {
|
|
50
|
+
const nodeId = row.dataset.nodeId;
|
|
51
|
+
const popover = document.getElementById('trace-source-popover');
|
|
52
|
+
if (!nodeId || !popover) return;
|
|
53
|
+
|
|
54
|
+
fetch(`/trace/source-preview?nodeId=${encodeURIComponent(nodeId)}`)
|
|
55
|
+
.then((res) => (res.ok ? res.text() : null))
|
|
56
|
+
.then((html) => {
|
|
57
|
+
// The mouse may have moved to a different row (or off the tree entirely) while this
|
|
58
|
+
// request was in flight - only show it if this row is still the one being hovered.
|
|
59
|
+
if (html == null || currentHoverRow !== row) return;
|
|
60
|
+
popover.innerHTML = html;
|
|
61
|
+
popover.showPopover();
|
|
62
|
+
positionPopover(popover, lastMouseX, lastMouseY);
|
|
63
|
+
})
|
|
64
|
+
.catch(() => {});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function hideSourcePreview() {
|
|
68
|
+
clearTimeout(hoverTimer);
|
|
69
|
+
currentHoverRow = null;
|
|
70
|
+
document.getElementById('trace-source-popover')?.hidePopover();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
document.addEventListener('mouseover', (evt) => {
|
|
74
|
+
const row = evt.target.closest('.trace-row[data-node-id]');
|
|
75
|
+
if (!row || row === currentHoverRow) return;
|
|
76
|
+
currentHoverRow = row;
|
|
77
|
+
clearTimeout(hoverTimer);
|
|
78
|
+
hoverTimer = setTimeout(() => showSourcePreview(row), 150);
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
document.addEventListener('mouseout', (evt) => {
|
|
82
|
+
const row = evt.target.closest('.trace-row[data-node-id]');
|
|
83
|
+
if (!row || row !== currentHoverRow) return;
|
|
84
|
+
// Moving within the same row (e.g. onto a child element) isn't leaving it.
|
|
85
|
+
if (evt.relatedTarget && row.contains(evt.relatedTarget)) return;
|
|
86
|
+
hideSourcePreview();
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
document.addEventListener('click', (evt) => {
|
|
90
|
+
const row = evt.target.closest('.trace-row[data-file]');
|
|
91
|
+
if (!row || evt.target.closest('.trace-chevron')) return;
|
|
92
|
+
window.sk.trace.openSource(row.dataset.file, Number(row.dataset.line));
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
// Enter in the search field jumps to the next match and scrolls it into view, cycling back to
|
|
96
|
+
// the first once past the last. Purely client-side (no server round trip): a search already
|
|
97
|
+
// marks matches with .trace-row-match and expands every ancestor needed to make them visible
|
|
98
|
+
// (trace.ts's searchTree/expandToMatches), so by the time the debounced search has landed,
|
|
99
|
+
// every match is already a real, visible element to walk through.
|
|
100
|
+
let matchIndex = -1;
|
|
101
|
+
|
|
102
|
+
document.addEventListener('input', (evt) => {
|
|
103
|
+
if (evt.target.matches('input[type="search"]')) {
|
|
104
|
+
matchIndex = -1;
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
document.addEventListener('keydown', (evt) => {
|
|
109
|
+
if (evt.key !== 'Enter' || !evt.target.matches('input[type="search"]')) return;
|
|
110
|
+
const matches = document.querySelectorAll('.trace-row-match');
|
|
111
|
+
if (matches.length === 0) return;
|
|
112
|
+
evt.preventDefault();
|
|
113
|
+
matchIndex = (matchIndex + 1) % matches.length;
|
|
114
|
+
matches[matchIndex].scrollIntoView({ block: 'center', behavior: 'smooth' });
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
// Cmd/Ctrl+A (select-all) inside the search field: VS Code's own "Select All" keybinding can
|
|
118
|
+
// intercept this before it ever reaches a doubly-nested webview -> iframe -> input, since VS
|
|
119
|
+
// Code's focus-aware keybinding suppression is built around its own top-level webview content,
|
|
120
|
+
// not a further iframe nested inside it. Handling it explicitly here is a harmless no-op if the
|
|
121
|
+
// browser's native behavior already worked, and a real fix if VS Code's own binding got there
|
|
122
|
+
// first.
|
|
123
|
+
document.addEventListener('keydown', (evt) => {
|
|
124
|
+
const mod = evt.metaKey || evt.ctrlKey;
|
|
125
|
+
// !shiftKey: Cmd/Ctrl+Shift+A is a separate relay (below), not select-all.
|
|
126
|
+
if (mod && !evt.shiftKey && evt.key.toLowerCase() === 'a' && evt.target.matches('input[type="search"]')) {
|
|
127
|
+
evt.preventDefault();
|
|
128
|
+
evt.target.select();
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
// Command Palette - same relay as the Skein panel's main.js (see its own comment for why this is
|
|
133
|
+
// needed): VS Code's webview-forwarding bridge only reaches the outer webview shell
|
|
134
|
+
// (getTraceWebviewHtml in extension.ts), not this nested localhost iframe where keydowns
|
|
135
|
+
// actually land. Posted up via postMessage; the shell re-dispatches a synthetic keydown that VS
|
|
136
|
+
// Code's bridge can forward to workbench.action.showCommands (package.json's
|
|
137
|
+
// contributes.keybindings, scoped to focusedView == 'dialogIdeTraceView').
|
|
138
|
+
document.addEventListener('keydown', (evt) => {
|
|
139
|
+
const mod = evt.metaKey || evt.ctrlKey;
|
|
140
|
+
if (mod && evt.shiftKey && evt.code === 'KeyA') {
|
|
141
|
+
evt.preventDefault();
|
|
142
|
+
window.parent.postMessage(
|
|
143
|
+
{ type: 'forward-keydown', key: 'a', code: 'KeyA', metaKey: evt.metaKey, ctrlKey: evt.ctrlKey, shiftKey: true, altKey: false },
|
|
144
|
+
'*'
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
});
|