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
item-lift.test.ts880 B
// A lifted item (the sidebar's chat rows) is raised while it is selected
// and keeps the raised look's transparent edge otherwise, decided in the
// template so a selection bound to native app state needs no redraw.
import assert from "node:assert/strict";
import test from "node:test";
import { components } from "./components.ts";
type When = { $if?: unknown; elevation?: string };
test("a lifted item is raised only while it is selected", () => {
const item = components.item as unknown as { props: Record<string, unknown>; template: { $when?: When[] } };
assert.equal(item.props.lift, false, "items are not lifted unless asked");
const elevations = (item.template.$when ?? []).filter((entry) => entry.elevation !== undefined);
assert.deepEqual(elevations, [
{ $if: "lift", elevation: "none" },
{ $if: ["lift", "selected"], elevation: "raised" },
]);
});
No comments yet.