Official
ui
The look of the app's components: buttons, list rows, cards, settings, callouts, and the blocks and tables of replies. Edit a component here and the whole app draws with it.
The app opens the listing; nothing installs until an agent in your Plugins workspace has read the files and you enable the plugin. In a terminal: dvg install divergence/ui@0.1.0
Permissions in 0.1.0
Files
main.ts899 B
// The look of the app's components (`button`, `item`, `card`, markdown's
// tables and the rest): it sends the kernel the set in `components.ts`
// when it starts, and again whenever a file here changes and it reloads.
// The kernel saves the set and draws with it from the next launch's
// first frame (`plans/ui-components.md`).
import * as Effect from "effect/Effect";
import { Kernel, runPlugin } from "divergence/effect";
import { components } from "./components.ts";
const program = Effect.gen(function* () {
const kernel = yield* Kernel;
yield* kernel.call("components.set", { components }).pipe(
// An app without the call (an older one) keeps its built-in look; a set
// the kernel refuses names every problem.
Effect.catch((error) => Effect.sync(() => console.warn(`ui: the components were not applied (${error.message})`))),
);
});
export default runPlugin(program);
No comments yet.