打包好的livecode,版本v-46
This commit is contained in:
417
docs/api/internal/interfaces/API.html.md
Normal file
417
docs/api/internal/interfaces/API.html.md
Normal file
@@ -0,0 +1,417 @@
|
||||
# Interface: API
|
||||
|
||||
## Extended by
|
||||
|
||||
- [`Playground`](../../interfaces/Playground.md)
|
||||
|
||||
## Properties
|
||||
|
||||
### destroy()
|
||||
|
||||
> **destroy**: () => `Promise`\<`void`\>
|
||||
|
||||
Destroys the playground instance, and removes event listeners.
|
||||
|
||||
Further call to any SDK methods throws an error.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`void`\>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
import { createPlayground } from "livecodes";
|
||||
|
||||
createPlayground("#container").then(async (playground) => {
|
||||
await playground.destroy();
|
||||
// playground destroyed
|
||||
// any further SDK call throws an error
|
||||
});
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:211](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L211)
|
||||
|
||||
***
|
||||
|
||||
### exec()
|
||||
|
||||
> **exec**: (`command`, ...`args`) => `Promise`\<`object` \| `object`\>
|
||||
|
||||
Executes custom commands, including: `"setBroadcastToken"` and `"showVersion"`.
|
||||
|
||||
See [docs](https://livecodes.io/docs/sdk/js-ts#exec) for details.
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **command**: [`APICommands`](../type-aliases/APICommands.md)
|
||||
|
||||
• ...**args**: `any`[]
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`object` \| `object`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:194](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L194)
|
||||
|
||||
***
|
||||
|
||||
### format()
|
||||
|
||||
> **format**: (`allEditors`?) => `Promise`\<`void`\>
|
||||
|
||||
Formats the code.
|
||||
|
||||
By default, the code in all editors (markup, style and script) is formatted.
|
||||
To format only the active editor, the value `false` should be passed as an argument.
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **allEditors?**: `boolean`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`void`\>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
import { createPlayground } from "livecodes";
|
||||
|
||||
createPlayground("#container").then(async (playground) => {
|
||||
await playground.format();
|
||||
// code in editors is formatted
|
||||
});
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:31](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L31)
|
||||
|
||||
***
|
||||
|
||||
### getCode()
|
||||
|
||||
> **getCode**: () => `Promise`\<[`Code`](../../interfaces/Code.md)\>
|
||||
|
||||
Gets the playground code (including source code, source language and compiled code) for each editor (markup, style, script), in addition to result page HTML.
|
||||
|
||||
See [Code](https://livecodes.io/docs/api/interfaces/Code) for the structure of the returned object.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<[`Code`](../../interfaces/Code.md)\>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
import { createPlayground } from "livecodes";
|
||||
|
||||
createPlayground("#container").then(async (playground) => {
|
||||
const code = await playground.getCode();
|
||||
|
||||
// source code, language and compiled code for the script editor
|
||||
const { content, language, compiled } = code.script;
|
||||
|
||||
// result page HTML
|
||||
const result = code.result;
|
||||
});
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:105](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L105)
|
||||
|
||||
***
|
||||
|
||||
### getConfig()
|
||||
|
||||
> **getConfig**: (`contentOnly`?) => `Promise`\<[`Config`](../../interfaces/Config.md)\>
|
||||
|
||||
Gets a [configuration object](https://livecodes.io/docs/configuration/configuration-object) representing the playground state.
|
||||
|
||||
This can be used to restore state if passed as an [EmbedOptions](https://livecodes.io/docs/sdk/js-ts#embed-options) property when [creating playgrounds](https://livecodes.io/docs/sdk/js-ts/#createplayground),
|
||||
or can be manipulated and loaded in run-time using [`setConfig`](https://livecodes.io/docs/sdk/js-ts#setconfig) method.
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **contentOnly?**: `boolean`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<[`Config`](../../interfaces/Config.md)\>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
import { createPlayground } from "livecodes";
|
||||
|
||||
createPlayground("#container").then(async (playground) => {
|
||||
const config = await playground.getConfig();
|
||||
});
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:64](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L64)
|
||||
|
||||
***
|
||||
|
||||
### getShareUrl()
|
||||
|
||||
> **getShareUrl**: (`shortUrl`?) => `Promise`\<`string`\>
|
||||
|
||||
Gets a [share url](https://livecodes.io/docs/features/share) for the current project.
|
||||
|
||||
By default, the url has a long query string representing the compressed encoded config object.
|
||||
If the argument `shortUrl` was set to `true`, a short url is generated.
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **shortUrl?**: `boolean`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`string`\>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
import { createPlayground } from "livecodes";
|
||||
|
||||
createPlayground("#container").then(async (playground) => {
|
||||
const longUrl = await playground.getShareUrl();
|
||||
const shortUrl = await playground.getShareUrl(true);
|
||||
});
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:48](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L48)
|
||||
|
||||
***
|
||||
|
||||
### ~~onChange()~~
|
||||
|
||||
> **onChange**: (`fn`) => `object`
|
||||
|
||||
Runs a callback function when code changes.
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **fn**
|
||||
|
||||
#### Returns
|
||||
|
||||
`object`
|
||||
|
||||
##### ~~remove()~~
|
||||
|
||||
> **remove**: () => `void`
|
||||
|
||||
###### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Deprecated
|
||||
|
||||
Use [`watch`](https://livecodes.io/docs/sdk/js-ts#watch) method instead.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:142](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L142)
|
||||
|
||||
***
|
||||
|
||||
### run()
|
||||
|
||||
> **run**: () => `Promise`\<`void`\>
|
||||
|
||||
Runs the [result page](https://livecodes.io/docs/features/result) (after any required compilation for code).
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`void`\>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
import { createPlayground } from "livecodes";
|
||||
|
||||
createPlayground("#container").then(async (playground) => {
|
||||
await playground.run();
|
||||
// new result page is displayed
|
||||
});
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:14](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L14)
|
||||
|
||||
***
|
||||
|
||||
### runTests()
|
||||
|
||||
> **runTests**: () => `Promise`\<`object`\>
|
||||
|
||||
Runs project [tests](https://livecodes.io/docs/features/tests) (if present) and gets test results.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`object`\>
|
||||
|
||||
##### results
|
||||
|
||||
> **results**: [`TestResult`](TestResult.md)[]
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
import { createPlayground } from "livecodes";
|
||||
|
||||
createPlayground("#container").then(async (playground) => {
|
||||
const { results } = await playground.runTests();
|
||||
});
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:135](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L135)
|
||||
|
||||
***
|
||||
|
||||
### setConfig()
|
||||
|
||||
> **setConfig**: (`config`) => `Promise`\<[`Config`](../../interfaces/Config.md)\>
|
||||
|
||||
Loads a new project using the passed configuration object.
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **config**: `Partial`\<[`Config`](../../interfaces/Config.md)\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<[`Config`](../../interfaces/Config.md)\>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
import { createPlayground } from "livecodes";
|
||||
|
||||
createPlayground("#container").then(async (playground) => {
|
||||
const config = {
|
||||
markup: {
|
||||
language: "html",
|
||||
content: "Hello World!",
|
||||
},
|
||||
};
|
||||
const newConfig = await playground.setConfig(config);
|
||||
// new project loaded
|
||||
});
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:84](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L84)
|
||||
|
||||
***
|
||||
|
||||
### show()
|
||||
|
||||
> **show**: (`panel`, `options`?) => `Promise`\<`void`\>
|
||||
|
||||
Shows the selected panel.
|
||||
|
||||
See [docs](https://livecodes.io/docs/sdk/js-ts#show) for details.
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **panel**: `"result"` \| [`EditorId`](../type-aliases/EditorId.md) \| `"console"` \| `"compiled"` \| `"tests"` \| `"editor"` \| `"toggle-result"`
|
||||
|
||||
• **options?**
|
||||
|
||||
• **options.column?**: `number`
|
||||
|
||||
• **options.full?**: `boolean`
|
||||
|
||||
• **options.line?**: `number`
|
||||
|
||||
• **options.zoom?**: `1` \| `0.5` \| `0.25`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`void`\>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
await playground.show("style");
|
||||
await playground.show("toggle-result");
|
||||
await playground.show("result", { full: true });
|
||||
await playground.show("script");
|
||||
await playground.show("result", { zoom: 0.5 });
|
||||
await playground.show("console", { full: true });
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:119](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L119)
|
||||
|
||||
***
|
||||
|
||||
### watch
|
||||
|
||||
> **watch**: [`WatchLoad`](../type-aliases/WatchLoad.md) & [`WatchReady`](../type-aliases/WatchReady.md) & [`WatchCode`](../type-aliases/WatchCode.md) & [`WatchConsole`](../type-aliases/WatchConsole.md) & [`WatchTests`](../type-aliases/WatchTests.md) & [`WatchDestroy`](../type-aliases/WatchDestroy.md)
|
||||
|
||||
Allows to watch for various playground events.
|
||||
It takes 2 arguments: event name and a callback function that will be called on every event.
|
||||
|
||||
event name can be one of: `"load" | "ready" | "code" | "console" | "tests" | "destroy"`
|
||||
|
||||
In some events, the callback function will be called with an object that supplies relevant data to the callback function (e.g. code, console output, test results).
|
||||
|
||||
The watch method returns an object with a single method (`remove`), which when called will remove the callback from watching further events.
|
||||
|
||||
See [docs](https://livecodes.io/docs/sdk/js-ts#watch) for details.
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
import { createPlayground } from "livecodes";
|
||||
|
||||
createPlayground("#container").then((playground) => {
|
||||
const codeWatcher = playground.watch("code", ({ code, config }) => {
|
||||
// this will run on every code change
|
||||
console.log("code:", code);
|
||||
console.log("config:", config);
|
||||
});
|
||||
|
||||
const consoleWatcher = playground.watch("console", ({ method, args }) => {
|
||||
// this will run on every console output
|
||||
console[method](...args);
|
||||
});
|
||||
|
||||
const testsWatcher = playground.watch("tests", ({ results }) => {
|
||||
// this will run when tests run
|
||||
results.forEach((testResult) => {
|
||||
console.log("status:", testResult.status); // "pass", "fail" or "skip"
|
||||
console.log(testResult.errors); // array of errors as strings
|
||||
});
|
||||
});
|
||||
|
||||
// then later
|
||||
codeWatcher.remove();
|
||||
consoleWatcher.remove();
|
||||
testsWatcher.remove();
|
||||
// events are no longer watched
|
||||
});
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:187](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L187)
|
||||
200
docs/api/internal/interfaces/API/index.html
Normal file
200
docs/api/internal/interfaces/API/index.html
Normal file
File diff suppressed because one or more lines are too long
138
docs/api/internal/interfaces/AppConfig.html.md
Normal file
138
docs/api/internal/interfaces/AppConfig.html.md
Normal file
@@ -0,0 +1,138 @@
|
||||
# Interface: AppConfig
|
||||
|
||||
These are properties that define how the app behaves.
|
||||
|
||||
## Extended by
|
||||
|
||||
- [`Config`](../../interfaces/Config.md)
|
||||
|
||||
## Properties
|
||||
|
||||
### allowLangChange
|
||||
|
||||
> **allowLangChange**: `boolean`
|
||||
|
||||
If `false`, the UI will not show the menu that allows changing editor language.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
true
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:603](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L603)
|
||||
|
||||
***
|
||||
|
||||
### mode
|
||||
|
||||
> **mode**: `"focus"` \| `"full"` \| `"result"` \| `"editor"` \| `"lite"` \| `"simple"` \| `"codeblock"`
|
||||
|
||||
Sets the [display mode](https://livecodes.io/docs/features/display-modes).
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
"full"
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:615](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L615)
|
||||
|
||||
***
|
||||
|
||||
### readonly
|
||||
|
||||
> **readonly**: `boolean`
|
||||
|
||||
If `true`, editors are loaded in read-only mode, where the user is not allowed to change the code.
|
||||
|
||||
By default, when readonly is set to true, the light-weight code editor [CodeJar](https://livecodes.io/docs/features/editor-settings#code-editor) is used.
|
||||
If you wish to use another editor, set the [editor](https://livecodes.io/docs/configuration/configuration-object#editor) property.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
false
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:597](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L597)
|
||||
|
||||
***
|
||||
|
||||
### tools
|
||||
|
||||
> **tools**: `Partial`\<`object`\>
|
||||
|
||||
Sets enabled and active tools and status of [tools pane](https://livecodes.io/docs/features/tools-pane).
|
||||
|
||||
#### Type declaration
|
||||
|
||||
##### active
|
||||
|
||||
> **active**: `""` \| `"console"` \| `"compiled"` \| `"tests"`
|
||||
|
||||
##### enabled
|
||||
|
||||
> **enabled**: `"all"` \| (`"console"` \| `"compiled"` \| `"tests"`)[]
|
||||
|
||||
##### status
|
||||
|
||||
> **status**: [`ToolsPaneStatus`](../type-aliases/ToolsPaneStatus.md)
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
{ enabled: "all", active: "", status: "" }
|
||||
```
|
||||
|
||||
#### Example
|
||||
|
||||
```js
|
||||
{
|
||||
"tools": {
|
||||
"enabled": ["console", "compiled"],
|
||||
"active": "console",
|
||||
"status": "open"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:631](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L631)
|
||||
|
||||
***
|
||||
|
||||
### view?
|
||||
|
||||
> `optional` **view**: `"split"` \| `"result"` \| `"editor"`
|
||||
|
||||
Sets the [default view](https://livecodes.io/docs/features/default-view) for the playground.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
"split"
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:609](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L609)
|
||||
|
||||
***
|
||||
|
||||
### zoom
|
||||
|
||||
> **zoom**: `0.25` \| `0.5` \| `1`
|
||||
|
||||
Sets result page [zoom level](https://livecodes.io/docs/features/result#result-page-zoom).
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:640](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L640)
|
||||
91
docs/api/internal/interfaces/AppConfig/index.html
Normal file
91
docs/api/internal/interfaces/AppConfig/index.html
Normal file
File diff suppressed because one or more lines are too long
1555
docs/api/internal/interfaces/ContentConfig.html.md
Normal file
1555
docs/api/internal/interfaces/ContentConfig.html.md
Normal file
File diff suppressed because it is too large
Load Diff
1313
docs/api/internal/interfaces/ContentConfig/index.html
Normal file
1313
docs/api/internal/interfaces/ContentConfig/index.html
Normal file
File diff suppressed because one or more lines are too long
294
docs/api/internal/interfaces/EditorConfig.html.md
Normal file
294
docs/api/internal/interfaces/EditorConfig.html.md
Normal file
@@ -0,0 +1,294 @@
|
||||
# Interface: EditorConfig
|
||||
|
||||
## Extended by
|
||||
|
||||
- [`UserConfig`](UserConfig.md)
|
||||
|
||||
## Properties
|
||||
|
||||
### closeBrackets
|
||||
|
||||
> **closeBrackets**: `boolean`
|
||||
|
||||
Use auto-complete to close brackets and quotes.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
true
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:801](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L801)
|
||||
|
||||
***
|
||||
|
||||
### editor
|
||||
|
||||
> **editor**: `undefined` \| `"auto"` \| `"monaco"` \| `"codemirror"` \| `"codejar"`
|
||||
|
||||
Selects the [code editor](https://livecodes.io/docs/features/editor-settings#code-editor) to use.
|
||||
|
||||
If `undefined` (the default), Monaco editor is used on desktop,
|
||||
CodeMirror is used on mobile and in `simple` mode,
|
||||
while CodeJar is used in `codeblock` mode, in `lite` mode and in `readonly` playgrounds.
|
||||
|
||||
If set to `auto`, Monaco editor is used on desktop and CodeMirror is used on mobile regardless of other settings.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
undefined
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:722](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L722)
|
||||
|
||||
***
|
||||
|
||||
### editorMode
|
||||
|
||||
> **editorMode**: `undefined` \| `"vim"` \| `"emacs"`
|
||||
|
||||
Sets [editor mode](https://livecodes.io/docs/features/editor-settings#editor-modes).
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:812](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L812)
|
||||
|
||||
***
|
||||
|
||||
### editorTheme
|
||||
|
||||
> **editorTheme**: `undefined` \| `string` \| [`EditorTheme`](../type-aliases/EditorTheme.md)[]
|
||||
|
||||
Sets the [code editor](https://livecodes.io/docs/features/editor-settings) themes.
|
||||
|
||||
See docs for [editor themes](https://livecodes.io/docs/configuration/configuration-object#editortheme) for details.
|
||||
|
||||
#### Examples
|
||||
|
||||
```ts
|
||||
"vs"
|
||||
```
|
||||
|
||||
```ts
|
||||
"monaco:twilight, codemirror:one-dark"
|
||||
```
|
||||
|
||||
```ts
|
||||
["vs@light"]
|
||||
```
|
||||
|
||||
```ts
|
||||
["vs@light", "vs-dark@dark"]
|
||||
```
|
||||
|
||||
```ts
|
||||
["monaco:vs@light", "codemirror:github-light@light", "dracula@dark"]
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:748](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L748)
|
||||
|
||||
***
|
||||
|
||||
### emmet
|
||||
|
||||
> **emmet**: `boolean`
|
||||
|
||||
Enables [Emmet](https://livecodes.io/docs/features/editor-settings#emmet).
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
true
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:807](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L807)
|
||||
|
||||
***
|
||||
|
||||
### enableAI
|
||||
|
||||
> **enableAI**: `boolean`
|
||||
|
||||
If `true`, [AI code assistant](https://livecodes.io/docs/features/ai) is enabled.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
false
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:818](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L818)
|
||||
|
||||
***
|
||||
|
||||
### foldRegions
|
||||
|
||||
> **foldRegions**: `boolean`
|
||||
|
||||
When set to `true`, regions marked by `#region` and `#endregion` comments are folded when the project is loaded.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
false
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:795](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L795)
|
||||
|
||||
***
|
||||
|
||||
### fontFamily
|
||||
|
||||
> **fontFamily**: `undefined` \| `string`
|
||||
|
||||
Sets the [code editor](https://livecodes.io/docs/features/editor-settings) font family.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:753](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L753)
|
||||
|
||||
***
|
||||
|
||||
### fontSize
|
||||
|
||||
> **fontSize**: `undefined` \| `number`
|
||||
|
||||
Sets the font size.
|
||||
|
||||
If `undefined` (the default), the font size is set to 14 for the full app and 12 for [embeds](https://livecodes.io/docs/features/embeds).
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
undefined
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:761](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L761)
|
||||
|
||||
***
|
||||
|
||||
### lineNumbers
|
||||
|
||||
> **lineNumbers**: `boolean` \| `"relative"`
|
||||
|
||||
Show line numbers in [code editor](https://livecodes.io/docs/features/editor-settings).
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
true
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:783](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L783)
|
||||
|
||||
***
|
||||
|
||||
### tabSize
|
||||
|
||||
> **tabSize**: `number`
|
||||
|
||||
The number of spaces per indentation-level.
|
||||
|
||||
Also used in [code formatting](https://livecodes.io/docs/features/code-format).
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
2
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:777](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L777)
|
||||
|
||||
***
|
||||
|
||||
### theme
|
||||
|
||||
> **theme**: [`Theme`](../type-aliases/Theme.md)
|
||||
|
||||
Sets the app [theme](https://livecodes.io/docs/features/themes) to light/dark mode.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
"dark"
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:728](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L728)
|
||||
|
||||
***
|
||||
|
||||
### themeColor
|
||||
|
||||
> **themeColor**: `undefined` \| `string`
|
||||
|
||||
Sets the app theme color.
|
||||
If `undefined`, it is set to `"hsl(214, 40%, 50%)"`.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
undefined
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:735](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L735)
|
||||
|
||||
***
|
||||
|
||||
### useTabs
|
||||
|
||||
> **useTabs**: `boolean`
|
||||
|
||||
If `true`, lines are indented with tabs instead of spaces.
|
||||
|
||||
Also used in [code formatting](https://livecodes.io/docs/features/code-format).
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
false
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:769](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L769)
|
||||
|
||||
***
|
||||
|
||||
### wordWrap
|
||||
|
||||
> **wordWrap**: `boolean`
|
||||
|
||||
Enables word-wrap for long lines.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
false
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:789](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L789)
|
||||
174
docs/api/internal/interfaces/EditorConfig/index.html
Normal file
174
docs/api/internal/interfaces/EditorConfig/index.html
Normal file
File diff suppressed because one or more lines are too long
21
docs/api/internal/interfaces/EditorPosition.html.md
Normal file
21
docs/api/internal/interfaces/EditorPosition.html.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Interface: EditorPosition
|
||||
|
||||
## Properties
|
||||
|
||||
### column?
|
||||
|
||||
> `optional` **column**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:1165](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1165)
|
||||
|
||||
***
|
||||
|
||||
### lineNumber
|
||||
|
||||
> **lineNumber**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:1164](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1164)
|
||||
25
docs/api/internal/interfaces/EditorPosition/index.html
Normal file
25
docs/api/internal/interfaces/EditorPosition/index.html
Normal file
File diff suppressed because one or more lines are too long
95
docs/api/internal/interfaces/FormatterConfig.html.md
Normal file
95
docs/api/internal/interfaces/FormatterConfig.html.md
Normal file
@@ -0,0 +1,95 @@
|
||||
# Interface: FormatterConfig
|
||||
|
||||
## Extended by
|
||||
|
||||
- [`UserConfig`](UserConfig.md)
|
||||
|
||||
## Properties
|
||||
|
||||
### semicolons
|
||||
|
||||
> **semicolons**: `boolean`
|
||||
|
||||
Configures Prettier [code formatter](https://livecodes.io/docs/features/code-format) to use semi-colons.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
true
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:838](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L838)
|
||||
|
||||
***
|
||||
|
||||
### singleQuote
|
||||
|
||||
> **singleQuote**: `boolean`
|
||||
|
||||
Configures Prettier [code formatter](https://livecodes.io/docs/features/code-format) to use single quotes instead of double quotes.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
false
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:843](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L843)
|
||||
|
||||
***
|
||||
|
||||
### tabSize
|
||||
|
||||
> **tabSize**: `number`
|
||||
|
||||
The number of spaces per indentation-level.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
2
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:832](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L832)
|
||||
|
||||
***
|
||||
|
||||
### trailingComma
|
||||
|
||||
> **trailingComma**: `boolean`
|
||||
|
||||
Configures Prettier [code formatter](https://livecodes.io/docs/features/code-format) to use [trailing commas](https://prettier.io/docs/en/options.html#trailing-commas).
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
true
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:849](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L849)
|
||||
|
||||
***
|
||||
|
||||
### useTabs
|
||||
|
||||
> **useTabs**: `boolean`
|
||||
|
||||
If `true`, lines are indented with tabs instead of spaces.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
false
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:826](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L826)
|
||||
65
docs/api/internal/interfaces/FormatterConfig/index.html
Normal file
65
docs/api/internal/interfaces/FormatterConfig/index.html
Normal file
File diff suppressed because one or more lines are too long
41
docs/api/internal/interfaces/TestResult.html.md
Normal file
41
docs/api/internal/interfaces/TestResult.html.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# Interface: TestResult
|
||||
|
||||
## Properties
|
||||
|
||||
### duration
|
||||
|
||||
> **duration**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:1979](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1979)
|
||||
|
||||
***
|
||||
|
||||
### errors
|
||||
|
||||
> **errors**: `string`[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:1980](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1980)
|
||||
|
||||
***
|
||||
|
||||
### status
|
||||
|
||||
> **status**: `"fail"` \| `"pass"` \| `"skip"`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:1981](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1981)
|
||||
|
||||
***
|
||||
|
||||
### testPath
|
||||
|
||||
> **testPath**: `string`[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:1982](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1982)
|
||||
39
docs/api/internal/interfaces/TestResult/index.html
Normal file
39
docs/api/internal/interfaces/TestResult/index.html
Normal file
File diff suppressed because one or more lines are too long
5
docs/api/internal/interfaces/Types.html.md
Normal file
5
docs/api/internal/interfaces/Types.html.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Interface: Types
|
||||
|
||||
## Indexable
|
||||
|
||||
\[`key`: `string`\]: `string` \| `object`
|
||||
13
docs/api/internal/interfaces/Types/index.html
Normal file
13
docs/api/internal/interfaces/Types/index.html
Normal file
File diff suppressed because one or more lines are too long
599
docs/api/internal/interfaces/UserConfig.html.md
Normal file
599
docs/api/internal/interfaces/UserConfig.html.md
Normal file
@@ -0,0 +1,599 @@
|
||||
# Interface: UserConfig
|
||||
|
||||
## Extends
|
||||
|
||||
- [`EditorConfig`](EditorConfig.md).[`FormatterConfig`](FormatterConfig.md)
|
||||
|
||||
## Extended by
|
||||
|
||||
- [`Config`](../../interfaces/Config.md)
|
||||
|
||||
## Properties
|
||||
|
||||
### appLanguage
|
||||
|
||||
> **appLanguage**: `undefined` \| [`AppLanguage`](../type-aliases/AppLanguage.md)
|
||||
|
||||
Sets the app UI language used.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:707](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L707)
|
||||
|
||||
***
|
||||
|
||||
### autosave
|
||||
|
||||
> **autosave**: `boolean`
|
||||
|
||||
If `true`, the project is automatically saved on code change,
|
||||
after time [delay](https://livecodes.io/docs/configuration/configuration-object#delay).
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
false
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:656](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L656)
|
||||
|
||||
***
|
||||
|
||||
### autotest
|
||||
|
||||
> **autotest**: `boolean`
|
||||
|
||||
If `true`, the project is watched for code changes which trigger tests to auto-run.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
false
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:662](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L662)
|
||||
|
||||
***
|
||||
|
||||
### autoupdate
|
||||
|
||||
> **autoupdate**: `boolean`
|
||||
|
||||
If `true`, the result page is automatically updated on code change,
|
||||
after time [delay](https://livecodes.io/docs/configuration/configuration-object#delay).
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
true
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:649](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L649)
|
||||
|
||||
***
|
||||
|
||||
### closeBrackets
|
||||
|
||||
> **closeBrackets**: `boolean`
|
||||
|
||||
Use auto-complete to close brackets and quotes.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
true
|
||||
```
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`EditorConfig`](EditorConfig.md).[`closeBrackets`](EditorConfig.md#closebrackets)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:801](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L801)
|
||||
|
||||
***
|
||||
|
||||
### delay
|
||||
|
||||
> **delay**: `number`
|
||||
|
||||
Time delay (in milliseconds) following code change,
|
||||
after which the result page is updated (if [`autoupdate`](https://livecodes.io/docs/configuration/configuration-object#autoupdate) is `true`)
|
||||
and/or the project is saved (if [`autosave`](https://livecodes.io/docs/configuration/configuration-object#autosave) is `true`).
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
1500
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:670](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L670)
|
||||
|
||||
***
|
||||
|
||||
### editor
|
||||
|
||||
> **editor**: `undefined` \| `"auto"` \| `"monaco"` \| `"codemirror"` \| `"codejar"`
|
||||
|
||||
Selects the [code editor](https://livecodes.io/docs/features/editor-settings#code-editor) to use.
|
||||
|
||||
If `undefined` (the default), Monaco editor is used on desktop,
|
||||
CodeMirror is used on mobile and in `simple` mode,
|
||||
while CodeJar is used in `codeblock` mode, in `lite` mode and in `readonly` playgrounds.
|
||||
|
||||
If set to `auto`, Monaco editor is used on desktop and CodeMirror is used on mobile regardless of other settings.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
undefined
|
||||
```
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`EditorConfig`](EditorConfig.md).[`editor`](EditorConfig.md#editor)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:722](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L722)
|
||||
|
||||
***
|
||||
|
||||
### editorMode
|
||||
|
||||
> **editorMode**: `undefined` \| `"vim"` \| `"emacs"`
|
||||
|
||||
Sets [editor mode](https://livecodes.io/docs/features/editor-settings#editor-modes).
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`EditorConfig`](EditorConfig.md).[`editorMode`](EditorConfig.md#editormode)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:812](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L812)
|
||||
|
||||
***
|
||||
|
||||
### editorTheme
|
||||
|
||||
> **editorTheme**: `undefined` \| `string` \| [`EditorTheme`](../type-aliases/EditorTheme.md)[]
|
||||
|
||||
Sets the [code editor](https://livecodes.io/docs/features/editor-settings) themes.
|
||||
|
||||
See docs for [editor themes](https://livecodes.io/docs/configuration/configuration-object#editortheme) for details.
|
||||
|
||||
#### Examples
|
||||
|
||||
```ts
|
||||
"vs"
|
||||
```
|
||||
|
||||
```ts
|
||||
"monaco:twilight, codemirror:one-dark"
|
||||
```
|
||||
|
||||
```ts
|
||||
["vs@light"]
|
||||
```
|
||||
|
||||
```ts
|
||||
["vs@light", "vs-dark@dark"]
|
||||
```
|
||||
|
||||
```ts
|
||||
["monaco:vs@light", "codemirror:github-light@light", "dracula@dark"]
|
||||
```
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`EditorConfig`](EditorConfig.md).[`editorTheme`](EditorConfig.md#editortheme)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:748](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L748)
|
||||
|
||||
***
|
||||
|
||||
### emmet
|
||||
|
||||
> **emmet**: `boolean`
|
||||
|
||||
Enables [Emmet](https://livecodes.io/docs/features/editor-settings#emmet).
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
true
|
||||
```
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`EditorConfig`](EditorConfig.md).[`emmet`](EditorConfig.md#emmet)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:807](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L807)
|
||||
|
||||
***
|
||||
|
||||
### enableAI
|
||||
|
||||
> **enableAI**: `boolean`
|
||||
|
||||
If `true`, [AI code assistant](https://livecodes.io/docs/features/ai) is enabled.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
false
|
||||
```
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`EditorConfig`](EditorConfig.md).[`enableAI`](EditorConfig.md#enableai)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:818](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L818)
|
||||
|
||||
***
|
||||
|
||||
### foldRegions
|
||||
|
||||
> **foldRegions**: `boolean`
|
||||
|
||||
When set to `true`, regions marked by `#region` and `#endregion` comments are folded when the project is loaded.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
false
|
||||
```
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`EditorConfig`](EditorConfig.md).[`foldRegions`](EditorConfig.md#foldregions)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:795](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L795)
|
||||
|
||||
***
|
||||
|
||||
### fontFamily
|
||||
|
||||
> **fontFamily**: `undefined` \| `string`
|
||||
|
||||
Sets the [code editor](https://livecodes.io/docs/features/editor-settings) font family.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`EditorConfig`](EditorConfig.md).[`fontFamily`](EditorConfig.md#fontfamily)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:753](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L753)
|
||||
|
||||
***
|
||||
|
||||
### fontSize
|
||||
|
||||
> **fontSize**: `undefined` \| `number`
|
||||
|
||||
Sets the font size.
|
||||
|
||||
If `undefined` (the default), the font size is set to 14 for the full app and 12 for [embeds](https://livecodes.io/docs/features/embeds).
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
undefined
|
||||
```
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`EditorConfig`](EditorConfig.md).[`fontSize`](EditorConfig.md#fontsize)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:761](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L761)
|
||||
|
||||
***
|
||||
|
||||
### formatOnsave
|
||||
|
||||
> **formatOnsave**: `boolean`
|
||||
|
||||
If `true`, the code is automatically [formatted](https://livecodes.io/docs/features/code-format) on saving the project.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
false
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:676](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L676)
|
||||
|
||||
***
|
||||
|
||||
### layout
|
||||
|
||||
> **layout**: `undefined` \| `"horizontal"` \| `"vertical"` \| `"responsive"`
|
||||
|
||||
Sets the app layout to horizontal or vertical.
|
||||
If set to `"responsive"` (the default) or `undefined`,
|
||||
the layout is vertical in small screens when the playground height is larger than its width,
|
||||
otherwise horizontal.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
"responsive"
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:685](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L685)
|
||||
|
||||
***
|
||||
|
||||
### lineNumbers
|
||||
|
||||
> **lineNumbers**: `boolean` \| `"relative"`
|
||||
|
||||
Show line numbers in [code editor](https://livecodes.io/docs/features/editor-settings).
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
true
|
||||
```
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`EditorConfig`](EditorConfig.md).[`lineNumbers`](EditorConfig.md#linenumbers)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:783](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L783)
|
||||
|
||||
***
|
||||
|
||||
### recoverUnsaved
|
||||
|
||||
> **recoverUnsaved**: `boolean`
|
||||
|
||||
Enables [recovering last unsaved project](https://livecodes.io/docs/features/recover) when the app is reopened.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
true
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:691](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L691)
|
||||
|
||||
***
|
||||
|
||||
### semicolons
|
||||
|
||||
> **semicolons**: `boolean`
|
||||
|
||||
Configures Prettier [code formatter](https://livecodes.io/docs/features/code-format) to use semi-colons.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
true
|
||||
```
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`FormatterConfig`](FormatterConfig.md).[`semicolons`](FormatterConfig.md#semicolons)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:838](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L838)
|
||||
|
||||
***
|
||||
|
||||
### showSpacing
|
||||
|
||||
> **showSpacing**: `boolean`
|
||||
|
||||
Enables [showing element spacing](https://livecodes.io/docs/features/result#show-spacings) in the result page.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
false
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:697](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L697)
|
||||
|
||||
***
|
||||
|
||||
### singleQuote
|
||||
|
||||
> **singleQuote**: `boolean`
|
||||
|
||||
Configures Prettier [code formatter](https://livecodes.io/docs/features/code-format) to use single quotes instead of double quotes.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
false
|
||||
```
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`FormatterConfig`](FormatterConfig.md).[`singleQuote`](FormatterConfig.md#singlequote)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:843](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L843)
|
||||
|
||||
***
|
||||
|
||||
### tabSize
|
||||
|
||||
> **tabSize**: `number`
|
||||
|
||||
The number of spaces per indentation-level.
|
||||
|
||||
Also used in [code formatting](https://livecodes.io/docs/features/code-format).
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
2
|
||||
```
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`FormatterConfig`](FormatterConfig.md).[`tabSize`](FormatterConfig.md#tabsize)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:777](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L777)
|
||||
|
||||
***
|
||||
|
||||
### theme
|
||||
|
||||
> **theme**: [`Theme`](../type-aliases/Theme.md)
|
||||
|
||||
Sets the app [theme](https://livecodes.io/docs/features/themes) to light/dark mode.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
"dark"
|
||||
```
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`EditorConfig`](EditorConfig.md).[`theme`](EditorConfig.md#theme)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:728](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L728)
|
||||
|
||||
***
|
||||
|
||||
### themeColor
|
||||
|
||||
> **themeColor**: `undefined` \| `string`
|
||||
|
||||
Sets the app theme color.
|
||||
If `undefined`, it is set to `"hsl(214, 40%, 50%)"`.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
undefined
|
||||
```
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`EditorConfig`](EditorConfig.md).[`themeColor`](EditorConfig.md#themecolor)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:735](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L735)
|
||||
|
||||
***
|
||||
|
||||
### trailingComma
|
||||
|
||||
> **trailingComma**: `boolean`
|
||||
|
||||
Configures Prettier [code formatter](https://livecodes.io/docs/features/code-format) to use [trailing commas](https://prettier.io/docs/en/options.html#trailing-commas).
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
true
|
||||
```
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`FormatterConfig`](FormatterConfig.md).[`trailingComma`](FormatterConfig.md#trailingcomma)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:849](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L849)
|
||||
|
||||
***
|
||||
|
||||
### useTabs
|
||||
|
||||
> **useTabs**: `boolean`
|
||||
|
||||
If `true`, lines are indented with tabs instead of spaces.
|
||||
|
||||
Also used in [code formatting](https://livecodes.io/docs/features/code-format).
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
false
|
||||
```
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`FormatterConfig`](FormatterConfig.md).[`useTabs`](FormatterConfig.md#usetabs)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:769](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L769)
|
||||
|
||||
***
|
||||
|
||||
### welcome
|
||||
|
||||
> **welcome**: `boolean`
|
||||
|
||||
If `true`, the [welcome screen](https://livecodes.io/docs/features/welcome) is displayed when the app loads.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:702](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L702)
|
||||
|
||||
***
|
||||
|
||||
### wordWrap
|
||||
|
||||
> **wordWrap**: `boolean`
|
||||
|
||||
Enables word-wrap for long lines.
|
||||
|
||||
#### Default
|
||||
|
||||
```ts
|
||||
false
|
||||
```
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`EditorConfig`](EditorConfig.md).[`wordWrap`](EditorConfig.md#wordwrap)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[models.ts:789](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L789)
|
||||
347
docs/api/internal/interfaces/UserConfig/index.html
Normal file
347
docs/api/internal/interfaces/UserConfig/index.html
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user