Make Project Management a native feature
- Move the storage and model of the plugin into src/lib/features/pm/ as pure TypeScript, so the skill can still bundle them. - Move the DOM interface onto the host menus, the shared tooltip, and the host icons. - A ribbon button opens Project Management. Board tabs keep the owner runestone.pm and the board-<hex> view IDs through view patterns. - Read only .runestone/pm/. Offer the plugin migration, with backups, for legacy notes. - A save, move, or delete reads only that card again. Watcher paths reach the feature. - Add Settings → Project Management and the projectManagement section. View states move to localStorage. - Background reads the boards from workspace.json. Remove api.backgrounds and the boards service. - Add yaml 2.9.1. Use the host markdown-it. - Move 18 plugin test files to tests/unit/features/pm/ and add native tests.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import type { BackgroundApi } from "./backgrounds.ts";
|
||||
import type { CompletionApi } from "./completion.ts";
|
||||
import type { Contributions } from "./contributions.ts";
|
||||
import type { ActionIcon } from "./icons.ts";
|
||||
@@ -63,7 +62,6 @@ export interface UiApi { showActionMenu(options: ActionMenuOptions): { close():
|
||||
export interface PluginApi {
|
||||
files?: FilesApi;
|
||||
services?: ServicesApi;
|
||||
backgrounds?: BackgroundApi;
|
||||
ui?: UiApi;
|
||||
completion?: CompletionApi;
|
||||
readonly id: string;
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/** Background image frames behind the RuneStone interface. */
|
||||
export interface BackgroundFrame {
|
||||
url: string;
|
||||
blurredUrl?: string;
|
||||
overlay: number;
|
||||
position: 'center' | 'top left' | 'top' | 'top right' | 'left' | 'right' | 'bottom left' | 'bottom' | 'bottom right';
|
||||
size: 'cover' | 'contain' | 'auto';
|
||||
previous?: Omit<BackgroundFrame, 'previous' | 'transitionMs'>;
|
||||
transitionMs?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* The background frames of each target in one window. A plugin can show a frame and read the current frame.
|
||||
* Use the `FilesApi` folder grants to read image files.
|
||||
*/
|
||||
export interface BackgroundApi {
|
||||
readonly version: 1;
|
||||
set(target: string, frame: BackgroundFrame | null): void;
|
||||
get(target: string): BackgroundFrame | null;
|
||||
subscribe(listener: (target: string) => void): () => void;
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { FilesApi, PluginApi, ServicesApi, SettingsApi, UiApi, WorkspaceApi } from "./api.ts";
|
||||
import type { BackgroundApi } from "./backgrounds.ts";
|
||||
import type { CompletionApi } from "./completion.ts";
|
||||
|
||||
/**
|
||||
@@ -9,7 +8,6 @@ import type { CompletionApi } from "./completion.ts";
|
||||
export interface PluginFeatures {
|
||||
files: FilesApi;
|
||||
services: ServicesApi;
|
||||
backgrounds: BackgroundApi;
|
||||
completion: CompletionApi;
|
||||
"completion.transport": NonNullable<CompletionApi["transport"]>;
|
||||
"ui.showActionMenu": UiApi["showActionMenu"];
|
||||
@@ -34,7 +32,6 @@ export type PluginFeature = keyof PluginFeatures;
|
||||
const descriptions: { [K in PluginFeature]: string } = {
|
||||
files: "the folder grant API",
|
||||
services: "the plugin service API",
|
||||
backgrounds: "the background API",
|
||||
completion: "the completion API",
|
||||
"completion.transport": "the completion model transport",
|
||||
"ui.showActionMenu": "the shared action menu",
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// The public types and helpers of the RuneStone plugin API.
|
||||
// The icon and tooltip helpers use the DOM. Import them from "@runestone/plugin-sdk/icons" and "@runestone/plugin-sdk/tooltip".
|
||||
export type * from "./api.ts";
|
||||
export type * from "./backgrounds.ts";
|
||||
export type * from "./completion.ts";
|
||||
export type * from "./contributions.ts";
|
||||
export type * from "./menu.ts";
|
||||
|
||||
Reference in New Issue
Block a user