RuneStone 1.0.0

This commit is contained in:
Knotty Wyvern
2026-11-16 04:21:21 -07:00
commit b52eeb14a1
827 changed files with 241421 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
<!doctype html><html><head><meta charset="utf-8"><title>Autocomplete integration test</title></head><body style="background:#20242a;color:#eee;font:16px system-ui"><h1>Autocomplete integration test</h1><div id="writer"></div><div id="source" style="height:180px"></div><div id="plugin"></div><script type="module" src="/src/lib/completion/testHarness.ts"></script></body></html>
+22
View File
@@ -0,0 +1,22 @@
{
// Type checks the example plugins against the SDK source, as a plugin author checks against the installed package.
// `pnpm check` runs it. The file is outside the plugin folders, so no package contains it.
"compilerOptions": {
"target": "es2022",
"module": "esnext",
"moduleResolution": "bundler",
"lib": ["es2022", "dom", "dom.iterable"],
"types": [],
"allowJs": true,
"checkJs": true,
"strict": true,
"noEmit": true,
"allowImportingTsExtensions": true,
"skipLibCheck": true,
"paths": {
"@runestone/plugin-sdk": ["../../packages/plugin-sdk/src/index.ts"],
"@runestone/plugin-sdk/*": ["../../packages/plugin-sdk/src/*.ts"]
}
},
"include": ["*/**/*.js"]
}
@@ -0,0 +1,32 @@
// @ts-check
// JSDoc types from the plugin SDK. `pnpm check` checks this file with fixtures/plugins/tsconfig.json.
/** @import { PluginApi } from "@runestone/plugin-sdk" */
/** @param {PluginApi} api */
export function activate(api) {
api.registerCommand({ id: "show-overview", title: "Show workspace overview", run: () => api.openView("overview") });
api.registerView({
id: "overview",
title: "Workspace overview",
/** @param {HTMLElement} container */
async mount(container) {
const status = document.createElement("p");
status.textContent = "Loading workspace files…";
container.append(status);
let disposed = false;
try {
const entries = await api.workspace.list();
if (api.signal.aborted || disposed) return;
status.textContent = `${entries.length} files and folders in this workspace.`;
const list = document.createElement("ul");
for (const entry of entries) {
const item = document.createElement("li");
item.textContent = `${entry.name}${entry.kind === "folder" ? "/" : ""}`;
list.append(item);
}
container.append(list);
} catch (error) { status.textContent = String(error); }
return () => { disposed = true; container.replaceChildren(); };
},
});
}
@@ -0,0 +1,11 @@
{
"schemaVersion": 1,
"id": "org.runestone-example.workspace-overview",
"name": "Workspace overview",
"author": "RuneStone example",
"description": "List files and folders in the active workspace.",
"version": "1.0.0",
"apiVersion": 1,
"entry": "main.js",
"access": "full-app"
}
+63
View File
@@ -0,0 +1,63 @@
---
title: Project field notes
tags: [workspace, design]
---
# Project field notes
A place for the thinking that happens around the code. Keep your research,
implementation notes, and scripts together, with room to read and a terminal
close at hand.
## A calmer place to work
Good notes need a clear rhythm: **strong headings**, comfortable paragraphs,
and enough space to see how ideas relate. Use `project/config.ts` for a small
code reference, or follow a [[notes/welcome|related note]] without losing context.
> [!tip] Keep context close
> Write down the reason for a change alongside the script that implements it.
> Your future self gets both the decision and the details.
### From idea to implementation
1. Capture the question in a note.
- Link the relevant research.
- Keep examples beside the explanation.
2. Open the script and try the smallest useful change.
3. Run it in the project terminal.
## Working checklist
- [x] Keep notes and code in the same workspace
- [x] Preserve Markdown exactly as written
- [ ] Review the next iteration
- [ ] Check a narrow split view
- [ ] Record what changed
## At a glance
| Surface | Purpose | Shortcut |
| :--- | :--- | ---: |
| Notes | Decisions, research, and working drafts | `Ctrl N` |
| Editor | Scripts and source files | `Ctrl P` |
| Terminal | Run commands in the project directory | `Ctrl` + backtick |
### A small example
```python
from pathlib import Path
workspace = Path.cwd()
for note in workspace.rglob("*.md"):
print(note.relative_to(workspace))
```
Code keeps its indentation and punctuation. Text such as `**bold**` inside a
code span stays literal, while **bold** in a paragraph is formatted.
> The best workspace helps you return to a thought as easily as you return to a file.
---
One project, with room for both the explanation and the implementation.
+31
View File
@@ -0,0 +1,31 @@
{
"pins": [],
"bookmarks": [],
"order": {
"notes": [
"inbox.md",
"projects"
],
"notes/projects": [],
"": [
".runestone",
"src",
"notes",
"tools",
"folder"
],
"folder": [
"screenshot10.png",
"screenshot11.png",
"screenshot12.png",
"screenshot7.png",
"test.md",
"screenshot6.png",
"screenshot5.png",
"screenshot4.png",
"screenshot8.png",
"screenshot3.png",
"screenshot2.png"
]
}
}
+5
View File
@@ -0,0 +1,5 @@
# Inbox
This is a sample note. Link to [[projects/alpha]].
- [ ] First task
+3
View File
@@ -0,0 +1,3 @@
# Alpha
Back to [[inbox]].
+6
View File
@@ -0,0 +1,6 @@
def greet(name: str) -> str:
return f"hello, {name}"
if __name__ == "__main__":
print(greet("runestone"))
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
set -euo pipefail
echo "workspace ready"