Note, element and theme preference facades ​
addNote(options?): FacadeNote ​
Creates a jolly-property-row: field-aligned text with no bound value.
ts
interface NoteOptions extends FieldLayoutOptions {
label?: string;
description?: string;
descriptionDisplay?: "block" | "tooltip";
align?: "start" | "end";
}
const note = folder.addNote({
description: "Peer indicators outside the camera frustum are skipped."
});
note.description = "Updated copy.";labelanddescriptionstay writable on the builder.- Unset options keep the element defaults, after the pane's field layout.
- For richer markup, use
note.elementoraddElement().
addThemePreferences(options?): FacadeThemePreferences ​
Creates a jolly-theme-preferences.
ts
interface ThemePreferencesOptions {
layout?: "inline" | "stack"; // default "stack" here
storageKey?: string;
target?: HTMLElement; // default: the nearest jolly-scope
}
chrome.addThemePreferences({ storageKey: "three-examples" });layout defaults to "stack", unlike the element, so the controls line up with the pane's label column.
addElement(element): FacadeElement<TElement> ​
Appends an element the caller built and tracks it like a builder, so disposeAll() reaches it.
ts
const preview = folder.addElement(document.createElement("canvas"));
preview.hidden = !settings.showPreview;preview.elementkeeps its type, hereHTMLCanvasElement.- Prefer it to
element.append(): on a floatingPane,elementis the window, so an appended child lands beside the pane.