Skip to content

SPARQL Studio API / Yasqe / Config

Interface: Config

Defined in: sparql-editor-monaco/src/index.ts:1172

Properties

value

value: string

Defined in: sparql-editor-monaco/src/index.ts:1174

Initial query value.


createShareableLink: (yasqe) => string

Defined in: sparql-editor-monaco/src/index.ts:1180

Show a button with which users can create a link to this query. Set this value to null to disable this functionality. By default, this feature is enabled, and the only the query value is appended to the link. ps. This function should return an object which is parseable by jQuery.param (http://api.jquery.com/jQuery.param/)

Parameters

yasqe

Yasqe

Returns

string


createShortLink: ((yasqe, longLink) => Promise<string>) | undefined

Defined in: sparql-editor-monaco/src/index.ts:1181


consumeShareLink: ((yasqe) => void) | null | undefined

Defined in: sparql-editor-monaco/src/index.ts:1182


persistenceId

persistenceId: string | ((yasqe) => string) | null | undefined

Defined in: sparql-editor-monaco/src/index.ts:1191

Change persistency settings for the YASQE query value. Setting the values to null, will disable persistancy: nothing is stored between browser sessions Setting the values to a string (or a function which returns a string), will store the query in localstorage using the specified string. By default, the ID is dynamically generated using the closest dom ID, to avoid collissions when using multiple YASQE items on one page


persistencyExpire

persistencyExpire: number

Defined in: sparql-editor-monaco/src/index.ts:1192


showQueryButton

showQueryButton: boolean

Defined in: sparql-editor-monaco/src/index.ts:1193


requestConfig

requestConfig: RequestConfig<Yasqe> | ((yasqe) => RequestConfig<Yasqe>)

Defined in: sparql-editor-monaco/src/index.ts:1194


pluginButtons

pluginButtons: (() => HTMLElement | HTMLElement[]) | undefined

Defined in: sparql-editor-monaco/src/index.ts:1195


resizeable

resizeable: boolean

Defined in: sparql-editor-monaco/src/index.ts:1196


editorHeight

editorHeight: string

Defined in: sparql-editor-monaco/src/index.ts:1197


queryingDisabled

queryingDisabled: string | undefined

Defined in: sparql-editor-monaco/src/index.ts:1198


theme

theme: "light" | "dark"

Defined in: sparql-editor-monaco/src/index.ts:1199


editorOptions

editorOptions: Record<string, any>

Defined in: sparql-editor-monaco/src/index.ts:1205

Custom Monaco editor options (IStandaloneEditorConstructionOptions), deep-merged over yasqe defaults. Use this to fully configure the editor, e.g. { lineNumbers: "off", wordWrap: "on", fontSize: 16, minimap: { enabled: true } }.


themes

themes: object

Defined in: sparql-editor-monaco/src/index.ts:1211

Custom SPARQL theme overrides, deep-merged over the built-in light/dark themes. Use this to tweak editor colors, e.g. { dark: { colors: { "editor.background": "#000" } }, light: { semanticTokenColors: { keyword: "#005" } } }.

light?

optional light?: Record<string, any>

dark?

optional dark?: Record<string, any>


languageServers

languageServers: LanguageServerDef[]

Defined in: sparql-editor-monaco/src/index.ts:1218

The language servers the consumer makes available (yasqe is language-server agnostic). The first is activated on load; when two or more are configured a switcher appears in the editor's right-click context menu. Servers are started lazily (the worker is resolved only when a server is first activated). When empty, the editor runs with Monarch syntax highlighting only.


getLanguageServerSettings?

optional getLanguageServerSettings?: (label) => Record<string, unknown> | undefined

Defined in: sparql-editor-monaco/src/index.ts:1226

Optional consumer-owned store for language server settings panel values, keyed by server label. When provided (e.g. by SparqlStudio, which persists them globally per server), it is the source of truth for pre-filling the settings panel and re-applying settings when a server (re)starts. Pairs with the languageServerSettingsChange event emitted when the user applies settings. When omitted, yasqe falls back to its own local-storage persistence.

Parameters

label

string

Returns

Record<string, unknown> | undefined