docs(api): pin common classes

This commit is contained in:
Elian Doran
2025-04-13 18:48:04 +03:00
parent c8860ea25a
commit 84c2ebd7f3
197 changed files with 1815 additions and 1686 deletions

View File

@@ -1,7 +1,7 @@
/**
* The front script API is accessible to code notes with the "JS (frontend)" language.
*
* All the variables listed are globally accessible to the script.
* The entire API is exposed as a single global: {@link api}
*
* @module Frontend Script API
*/
@@ -13,8 +13,16 @@
* Make sure to keep in line with frontend's `script_context.ts`.
*/
import FrontendScriptApi, { type Api } from "./frontend_script_api.js";
export type { default as BasicWidget } from "../widgets/basic_widget.js";
export type { default as FAttachment } from "../entities/fattachment.js";
export type { default as FAttribute } from "../entities/fattribute.js";
export type { default as FBranch } from "../entities/fbranch.js";
export type { default as FNote } from "../entities/fnote.js";
export type { Api } from "./frontend_script_api.js";
export type { default as NoteContextAwareWidget } from "../widgets/note_context_aware_widget.js";
export type { default as RightPanelWidget } from "../widgets/right_panel_widget.js";
import FrontendScriptApi, { type Api } from "./frontend_script_api.js";
//@ts-expect-error
export const api: Api = new FrontendScriptApi();

View File

@@ -1,7 +1,7 @@
/**
* The backend script API is accessible to code notes with the "JS (backend)" language.
*
* All the variables listed are globally accessible to the script.
* The entire API is exposed as a single global: {@link api}
*
* @module Backend Script API
*/
@@ -13,6 +13,16 @@
* Make sure to keep in line with backend's `script_context.ts`.
*/
export type { default as AbstractBeccaEntity } from "../becca/entities/abstract_becca_entity.js";
export type { default as BAttachment } from "../becca/entities/battachment.js";
export type { default as BAttribute } from "../becca/entities/battribute.js";
export type { default as BBranch } from "../becca/entities/bbranch.js";
export type { default as BEtapiToken } from "../becca/entities/betapi_token.js";
export type { BNote };
export type { default as BOption } from "../becca/entities/boption.js";
export type { default as BRecentNote } from "../becca/entities/brecent_note.js";
export type { default as BRevision } from "../becca/entities/brevision.js";
import BNote from "../becca/entities/bnote.js";
import type { Api } from "./backend_script_api.js";
import BackendScriptApi from "./backend_script_api.js";