打包好的livecode,版本v-46

This commit is contained in:
yangxin
2025-06-11 22:23:49 +08:00
commit 1214258379
1323 changed files with 133464 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
# Function: createPlayground()
## createPlayground(container, options)
> **createPlayground**(`container`, `options`?): `Promise`\<[`Playground`](../interfaces/Playground.md)\>
Creates a LiveCodes playground.
### Parameters
**container**: `string` \| `HTMLElement`
`HTMLElement` or a string representing a CSS selector. This is the container where the playground is rendered.
If not found, an error is thrown (except in [headless mode](https://livecodes.io/docs/sdk/headless), in which this parameter is optional and can be omitted).
**options?**: [`EmbedOptions`](../interfaces/EmbedOptions.md)
The [embed options](https://livecodes.io/docs/sdk/js-ts#embed-options) for the playground (optional).
### Returns
`Promise`\<[`Playground`](../interfaces/Playground.md)\>
- A promise that resolves to a [`Playground`](https://livecodes.io/docs/api/interfaces/Playground/) object which exposes many [SDK methods](https://livecodes.io/docs/sdk/js-ts/#sdk-methods) that can be used to interact with the playground.
### Defined in
[index.ts:26](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/index.ts#L26)
## createPlayground(options)
> **createPlayground**(`options`): `Promise`\<[`Playground`](../interfaces/Playground.md)\>
### Parameters
**options**: [`EmbedOptions`](../interfaces/EmbedOptions.md) & `object`
### Returns
`Promise`\<[`Playground`](../interfaces/Playground.md)\>
### Defined in
[index.ts:30](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/index.ts#L30)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,25 @@
# Function: getPlaygroundUrl()
> **getPlaygroundUrl**(`options`): `string`
Gets the URL to a LiveCodes playground (as a string) from the provided [options](https://livecodes.io/docs/sdk/js-ts#embed-options).
This can be useful for providing links to run code in playgrounds.
## Parameters
**options**: [`EmbedOptions`](../interfaces/EmbedOptions.md) = `{}`
The [options](https://livecodes.io/docs/sdk/js-ts#embed-options) for the playground.
## Returns
`string`
- The URL of the playground (as a string).
large objects like config and params are store in the url hash params while the rest are in the search params
unless config is a string in which case it is stored in searchParams
## Defined in
[index.ts:391](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/index.ts#L391)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

167
docs/api/index.html Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,82 @@
# Interface: Code
An object that contains the language, content and compiled code for each of the 3 [code editors](https://livecodes.io/docs/features/projects)
and the [result page](https://livecodes.io/docs/features/result) HTML.
See [docs](https://livecodes.io/docs/api/interfaces/Code) for details.
## Properties
### markup
> **markup**: `object`
#### compiled
> **compiled**: `string`
#### content
> **content**: `string`
#### language
> **language**: [`Language`](../type-aliases/Language.md)
#### Defined in
[models.ts:1908](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1908)
***
### result
> **result**: `string`
#### Defined in
[models.ts:1923](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1923)
***
### script
> **script**: `object`
#### compiled
> **compiled**: `string`
#### content
> **content**: `string`
#### language
> **language**: [`Language`](../type-aliases/Language.md)
#### Defined in
[models.ts:1918](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1918)
***
### style
> **style**: `object`
#### compiled
> **compiled**: `string`
#### content
> **content**: `string`
#### language
> **language**: [`Language`](../type-aliases/Language.md)
#### Defined in
[models.ts:1913](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1913)

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,492 @@
# Interface: Playground
An object that represents the LiveCodes playground instance.
The object exposes multiple [methods](https://livecodes.io/docs/sdk/js-ts/#sdk-methods) that can be used to interact with the playground.
See [docs](https://livecodes.io/docs/sdk/js-ts) for details.
## Extends
- [`API`](../internal/interfaces/API.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
});
```
#### Inherited from
[`API`](../internal/interfaces/API.md).[`destroy`](../internal/interfaces/API.md#destroy)
#### 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`](../internal/type-aliases/APICommands.md)
• ...**args**: `any`[]
#### Returns
`Promise`\<`object` \| `object`\>
#### Inherited from
[`API`](../internal/interfaces/API.md).[`exec`](../internal/interfaces/API.md#exec)
#### 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
});
```
#### Inherited from
[`API`](../internal/interfaces/API.md).[`format`](../internal/interfaces/API.md#format)
#### Defined in
[models.ts:31](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L31)
***
### getCode()
> **getCode**: () => `Promise`\<[`Code`](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`](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;
});
```
#### Inherited from
[`API`](../internal/interfaces/API.md).[`getCode`](../internal/interfaces/API.md#getcode)
#### Defined in
[models.ts:105](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L105)
***
### getConfig()
> **getConfig**: (`contentOnly`?) => `Promise`\<[`Config`](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`](Config.md)\>
#### Example
```ts
import { createPlayground } from "livecodes";
createPlayground("#container").then(async (playground) => {
const config = await playground.getConfig();
});
```
#### Inherited from
[`API`](../internal/interfaces/API.md).[`getConfig`](../internal/interfaces/API.md#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);
});
```
#### Inherited from
[`API`](../internal/interfaces/API.md).[`getShareUrl`](../internal/interfaces/API.md#getshareurl)
#### Defined in
[models.ts:48](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L48)
***
### load()
> **load**: () => `Promise`\<`void`\>
Loads the playground, if not already loaded.
When the embed option [loading](https://livecodes.io/docs/sdk/js-ts#loading) is set to `"click"`, the playground is not loaded automatically.
Instead, a screen is shown with "Click to load" button. Calling the SDK method `load()` allows loading the playground.
If the playground was not loaded, calling any other method will load the playground first before executing.
#### Returns
`Promise`\<`void`\>
#### Defined in
[models.ts:298](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L298)
***
### ~~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.
#### Inherited from
[`API`](../internal/interfaces/API.md).[`onChange`](../internal/interfaces/API.md#onchange)
#### 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
});
```
#### Inherited from
[`API`](../internal/interfaces/API.md).[`run`](../internal/interfaces/API.md#run)
#### 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`](../internal/interfaces/TestResult.md)[]
#### Example
```ts
import { createPlayground } from "livecodes";
createPlayground("#container").then(async (playground) => {
const { results } = await playground.runTests();
});
```
#### Inherited from
[`API`](../internal/interfaces/API.md).[`runTests`](../internal/interfaces/API.md#runtests)
#### Defined in
[models.ts:135](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L135)
***
### setConfig()
> **setConfig**: (`config`) => `Promise`\<[`Config`](Config.md)\>
Loads a new project using the passed configuration object.
#### Parameters
**config**: `Partial`\<[`Config`](Config.md)\>
#### Returns
`Promise`\<[`Config`](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
});
```
#### Inherited from
[`API`](../internal/interfaces/API.md).[`setConfig`](../internal/interfaces/API.md#setconfig)
#### 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`](../internal/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 });
```
#### Inherited from
[`API`](../internal/interfaces/API.md).[`show`](../internal/interfaces/API.md#show)
#### Defined in
[models.ts:119](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L119)
***
### watch
> **watch**: [`WatchLoad`](../internal/type-aliases/WatchLoad.md) & [`WatchReady`](../internal/type-aliases/WatchReady.md) & [`WatchCode`](../internal/type-aliases/WatchCode.md) & [`WatchConsole`](../internal/type-aliases/WatchConsole.md) & [`WatchTests`](../internal/type-aliases/WatchTests.md) & [`WatchDestroy`](../internal/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
});
```
#### Inherited from
[`API`](../internal/interfaces/API.md).[`watch`](../internal/interfaces/API.md#watch)
#### Defined in
[models.ts:187](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L187)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,37 @@
# \_internal
## Index
### Interfaces
- [API](interfaces/API.md)
- [AppConfig](interfaces/AppConfig.md)
- [ContentConfig](interfaces/ContentConfig.md)
- [EditorConfig](interfaces/EditorConfig.md)
- [EditorPosition](interfaces/EditorPosition.md)
- [FormatterConfig](interfaces/FormatterConfig.md)
- [TestResult](interfaces/TestResult.md)
- [Types](interfaces/Types.md)
- [UserConfig](interfaces/UserConfig.md)
### Type Aliases
- [APICommands](type-aliases/APICommands.md)
- [AppLanguage](type-aliases/AppLanguage.md)
- [CDN](type-aliases/CDN.md)
- [CodejarTheme](type-aliases/CodejarTheme.md)
- [CodemirrorTheme](type-aliases/CodemirrorTheme.md)
- [CssPresetId](type-aliases/CssPresetId.md)
- [EditorId](type-aliases/EditorId.md)
- [EditorTheme](type-aliases/EditorTheme.md)
- [MonacoTheme](type-aliases/MonacoTheme.md)
- [Processor](type-aliases/Processor.md)
- [TemplateName](type-aliases/TemplateName.md)
- [Theme](type-aliases/Theme.md)
- [ToolsPaneStatus](type-aliases/ToolsPaneStatus.md)
- [WatchCode](type-aliases/WatchCode.md)
- [WatchConsole](type-aliases/WatchConsole.md)
- [WatchDestroy](type-aliases/WatchDestroy.md)
- [WatchLoad](type-aliases/WatchLoad.md)
- [WatchReady](type-aliases/WatchReady.md)
- [WatchTests](type-aliases/WatchTests.md)

View 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)

File diff suppressed because one or more lines are too long

View 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)

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View 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)

File diff suppressed because one or more lines are too long

View 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)

File diff suppressed because one or more lines are too long

View 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)

File diff suppressed because one or more lines are too long

View 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)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,5 @@
# Interface: Types
## Indexable
\[`key`: `string`\]: `string` \| `object`

File diff suppressed because one or more lines are too long

View 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)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
# Type Alias: APICommands
> **APICommands**: `"setBroadcastToken"` \| `"showVersion"`
## Defined in
[models.ts:280](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L280)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
# Type Alias: AppLanguage
> **AppLanguage**: `"auto"` \| `"ar"` \| `"de"` \| `"en"` \| `"es"` \| `"fr"` \| `"hi"` \| `"it"` \| `"ja"` \| `"pt"` \| `"ru"` \| `"ur"` \| `"zh-CN"`
## Defined in
[models.ts:1778](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1778)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
# Type Alias: CDN
> **CDN**: `"jspm"` \| `"skypack"` \| `"jsdelivr"` \| `"fastly.jsdelivr"` \| `"gcore.jsdelivr"` \| `"testingcf.jsdelivr"` \| `"jsdelivr.b-cdn"` \| `"jsdelivr.gh"` \| `"fastly.jsdelivr.gh"` \| `"gcore.jsdelivr.gh"` \| `"testingcf.jsdelivr.gh"` \| `"jsdelivr.b-cdn.gh"` \| `"jsdelivr.esm"` \| `"fastly.jsdelivr.esm"` \| `"gcore.jsdelivr.esm"` \| `"testingcf.jsdelivr.esm"` \| `"jsdelivr.b-cdn.esm"` \| `"esm.run"` \| `"esm.sh"` \| `"esbuild"` \| `"bundle.run"` \| `"unpkg"` \| `"npmcdn"` \| `"statically"`
## Defined in
[models.ts:1861](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1861)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
# Type Alias: CodejarTheme
> **CodejarTheme**: `"a11y-dark"` \| `"atom-dark"` \| `"base16-ateliersulphurpool-light"` \| `"catppuccin-latte"` \| `"catppuccin-frappe"` \| `"catppuccin-macchiato"` \| `"catppuccin-mocha"` \| `"cb"` \| `"coldark-cold"` \| `"coldark-dark"` \| `"coy"` \| `"coy-without-shadows"` \| `"darcula"` \| `"dark"` \| `"dracula"` \| `"duotone-dark"` \| `"duotone-earth"` \| `"duotone-forest"` \| `"duotone-light"` \| `"duotone-sea"` \| `"duotone-space"` \| `"funky"` \| `"ghcolors"` \| `"gruvbox-dark"` \| `"gruvbox-light"` \| `"holi-theme"` \| `"hopscotch"` \| `"laserwave"` \| `"lucario"` \| `"material-dark"` \| `"material-light"` \| `"material-oceanic"` \| `"monochrome"` \| `"monochrome-dark"` \| `"night-owl"` \| `"nord"` \| `"nord-2"` \| `"okaidia"` \| `"one-dark"` \| `"one-light"` \| `"pojoaque"` \| `"shades-of-purple"` \| `"solarized-dark-atom"` \| `"solarized-light"` \| `"synthwave84"` \| `"tomorrow"` \| `"twilight"` \| `"vs"` \| `"vsc-dark-plus"` \| `"xonokai"` \| `"z-touchs"`
## Defined in
[models.ts:1687](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1687)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
# Type Alias: CodemirrorTheme
> **CodemirrorTheme**: `"amy"` \| `"aura"` \| `"ayu-light"` \| `"barf"` \| `"basic-light"` \| `"basic-dark"` \| `"bespin"` \| `"birds-of-paradise"` \| `"boys-and-girls"` \| `"catppuccin-latte"` \| `"catppuccin-frappe"` \| `"catppuccin-macchiato"` \| `"catppuccin-mocha"` \| `"clouds"` \| `"cm-light"` \| `"cobalt"` \| `"cool-glow"` \| `"dracula"` \| `"espresso"` \| `"github-dark"` \| `"github-light"` \| `"gruvbox-dark"` \| `"gruvbox-light"` \| `"material-dark"` \| `"material-light"` \| `"monochrome"` \| `"monochrome-dark"` \| `"noctis-lilac"` \| `"nord"` \| `"one-dark"` \| `"rose-pine-dawn"` \| `"smoothy"` \| `"solarized-light"` \| `"solarized-dark"` \| `"tokyo-night"` \| `"tokyo-night-day"` \| `"tokyo-night-storm"` \| `"tomorrow"`
## Defined in
[models.ts:1647](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1647)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
# Type Alias: CssPresetId
> **CssPresetId**: `""` \| `"normalize.css"` \| `"reset-css"`
## Defined in
[models.ts:1269](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1269)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
# Type Alias: EditorId
> **EditorId**: `"markup"` \| `"style"` \| `"script"`
## Defined in
[models.ts:1168](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1168)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
# Type Alias: EditorTheme
> **EditorTheme**: [`MonacoTheme`](MonacoTheme.md) \| [`CodemirrorTheme`](CodemirrorTheme.md) \| [`CodejarTheme`](CodejarTheme.md) \| \`$\{MonacoTheme\}@$\{Theme\}\` \| \`$\{CodemirrorTheme\}@$\{Theme\}\` \| \`$\{CodejarTheme\}@$\{Theme\}\` \| \`monaco:$\{MonacoTheme\}\` \| \`codemirror:$\{CodemirrorTheme\}\` \| \`codejar:$\{CodejarTheme\}\` \| \`monaco:$\{MonacoTheme\}@$\{Theme\}\` \| \`codemirror:$\{CodemirrorTheme\}@$\{Theme\}\` \| \`codejar:$\{CodejarTheme\}@$\{Theme\}\`
## Defined in
[models.ts:1740](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1740)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
# Type Alias: MonacoTheme
> **MonacoTheme**: `"active4d"` \| `"all-hallows-eve"` \| `"amy"` \| `"birds-of-paradise"` \| `"blackboard"` \| `"brilliance-black"` \| `"brilliance-dull"` \| `"catppuccin-latte"` \| `"catppuccin-frappe"` \| `"catppuccin-macchiato"` \| `"catppuccin-mocha"` \| `"chrome-devtools"` \| `"clouds-midnight"` \| `"clouds"` \| `"cobalt"` \| `"cobalt2"` \| `"custom-vs-light"` \| `"custom-vs-dark"` \| `"dawn"` \| `"dracula"` \| `"dreamweaver"` \| `"eiffel"` \| `"espresso-libre"` \| `"github"` \| `"github-dark"` \| `"github-light"` \| `"hc-black"` \| `"hc-light"` \| `"idle"` \| `"idlefingers"` \| `"iplastic"` \| `"katzenmilch"` \| `"krtheme"` \| `"kuroir"` \| `"lazy"` \| `"magicwb-amiga"` \| `"merbivore-soft"` \| `"merbivore"` \| `"monochrome"` \| `"monochrome-dark"` \| `"monokai"` \| `"monokai-bright"` \| `"monoindustrial"` \| `"night-owl"` \| `"nord"` \| `"oceanic-next"` \| `"pastels-on-dark"` \| `"slush-and-poppies"` \| `"solarized-dark"` \| `"solarized-light"` \| `"spacecadet"` \| `"sunburst"` \| `"textmate-mac-classic"` \| `"tomorrow"` \| `"tomorrow-night"` \| `"tomorrow-night-blue"` \| `"tomorrow-night-bright"` \| `"tomorrow-night-eighties"` \| `"twilight"` \| `"upstream-sunburst"` \| `"vibrant-ink"` \| `"vs"` \| `"vs-dark"` \| `"xcode-default"` \| `"zenburnesque"`
## Defined in
[models.ts:1580](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1580)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
# Type Alias: Processor
> **Processor**: `"postcss"` \| `"postcssImportUrl"` \| `"tailwindcss"` \| `"windicss"` \| `"unocss"` \| `"tokencss"` \| `"lightningcss"` \| `"autoprefixer"` \| `"postcssPresetEnv"` \| `"cssmodules"` \| `"purgecss"` \| `"cssnano"`
## Defined in
[models.ts:1226](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1226)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
# Type Alias: TemplateName
> **TemplateName**: `"blank"` \| `"javascript"` \| `"typescript"` \| `"react"` \| `"react-native"` \| `"vue2"` \| `"vue"` \| `"angular"` \| `"preact"` \| `"svelte"` \| `"solid"` \| `"lit"` \| `"stencil"` \| `"mdx"` \| `"astro"` \| `"riot"` \| `"malina"` \| `"jquery"` \| `"backbone"` \| `"knockout"` \| `"jest"` \| `"jest-react"` \| `"bootstrap"` \| `"tailwindcss"` \| `"shadcn-ui"` \| `"daisyui"` \| `"d3"` \| `"phaser"` \| `"coffeescript"` \| `"livescript"` \| `"civet"` \| `"clio"` \| `"imba"` \| `"rescript"` \| `"reason"` \| `"ocaml"` \| `"python"` \| `"pyodide"` \| `"python-wasm"` \| `"r"` \| `"ruby"` \| `"ruby-wasm"` \| `"go"` \| `"php"` \| `"php-wasm"` \| `"cpp"` \| `"clang"` \| `"cpp-wasm"` \| `"java"` \| `"csharp-wasm"` \| `"perl"` \| `"lua"` \| `"lua-wasm"` \| `"teal"` \| `"fennel"` \| `"julia"` \| `"scheme"` \| `"commonlisp"` \| `"clojurescript"` \| `"gleam"` \| `"tcl"` \| `"markdown"` \| `"assemblyscript"` \| `"wat"` \| `"sql"` \| `"postgresql"` \| `"prolog"` \| `"blockly"` \| `"diagrams"`
## Defined in
[models.ts:1376](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1376)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
# Type Alias: Theme
> **Theme**: `"light"` \| `"dark"`
## Defined in
[models.ts:1926](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1926)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
# Type Alias: ToolsPaneStatus
> **ToolsPaneStatus**: `"closed"` \| `"open"` \| `"full"` \| `"none"` \| `""`
## Defined in
[models.ts:1456](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L1456)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,37 @@
# Type Alias: WatchCode()
> **WatchCode**: (`event`, `fn`) => `object`
Called when the playground "content" is changed (see [`getCode`](https://livecodes.io/docs/sdk/js-ts#getcode) and [`getConfig`](https://livecodes.io/docs/sdk/js-ts#getcode)).
This includes changes in:
- Code (in editors)
- Editor [languages](https://livecodes.io/docs/languages/)
- [CSS processors](https://livecodes.io/docs/features/css#css-processors)
- [External resources](https://livecodes.io/docs/features/external-resources)
- Project info (e.g. allows adding content in page head and attributes to `<html>` element)
- [Custom settings](https://livecodes.io/docs/advanced/custom-settings) (e.g. allows changing [import maps](https://livecodes.io/docs/features/module-resolution#custom-module-resolution))
- Project title
- [Test](https://livecodes.io/docs/features/tests) code
## Parameters
**event**: `"code"`
**fn**
## Returns
`object`
### remove()
> **remove**: () => `void`
#### Returns
`void`
## Defined in
[models.ts:248](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L248)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,25 @@
# Type Alias: WatchConsole()
> **WatchConsole**: (`event`, `fn`) => `object`
## Parameters
**event**: `"console"`
**fn**
## Returns
`object`
### remove()
> **remove**: () => `void`
#### Returns
`void`
## Defined in
[models.ts:253](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L253)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,25 @@
# Type Alias: WatchDestroy()
> **WatchDestroy**: (`event`, `fn`) => `object`
## Parameters
**event**: `"destroy"`
**fn**
## Returns
`object`
### remove()
> **remove**: () => `void`
#### Returns
`void`
## Defined in
[models.ts:263](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L263)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,27 @@
# Type Alias: WatchLoad()
> **WatchLoad**: (`event`, `fn`) => `object`
Called when the playground first loads.
## Parameters
**event**: `"load"`
**fn**
## Returns
`object`
### remove()
> **remove**: () => `void`
#### Returns
`void`
## Defined in
[models.ts:225](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L225)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,27 @@
# Type Alias: WatchReady()
> **WatchReady**: (`event`, `fn`) => `object`
Called when a new project is loaded (including when [imported](https://livecodes.io/docs/features/import)) and the playground is ready to run.
## Parameters
**event**: `"ready"`
**fn**
## Returns
`object`
### remove()
> **remove**: () => `void`
#### Returns
`void`
## Defined in
[models.ts:230](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L230)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,25 @@
# Type Alias: WatchTests()
> **WatchTests**: (`event`, `fn`) => `object`
## Parameters
**event**: `"tests"`
**fn**
## Returns
`object`
### remove()
> **remove**: () => `void`
#### Returns
`void`
## Defined in
[models.ts:258](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L258)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,9 @@
# Type Alias: Language
> **Language**: `"html"` \| `"htm"` \| `"markdown"` \| `"md"` \| `"mdown"` \| `"mkdn"` \| `"mdx"` \| `"astro"` \| `"pug"` \| `"jade"` \| `"haml"` \| `"asciidoc"` \| `"adoc"` \| `"asc"` \| `"mustache"` \| `"handlebars"` \| `"hbs"` \| `"ejs"` \| `"eta"` \| `"nunjucks"` \| `"njk"` \| `"liquid"` \| `"liquidjs"` \| `"dot"` \| `"twig"` \| `"vento"` \| `"vto"` \| `"art-template"` \| `"art"` \| `"jinja"` \| `"bbcode"` \| `"bb"` \| `"mjml"` \| `"diagrams"` \| `"diagram"` \| `"graph"` \| `"plt"` \| `"richtext"` \| `"rte"` \| `"rich"` \| `"rte.html"` \| `"css"` \| `"scss"` \| `"sass"` \| `"less"` \| `"stylus"` \| `"styl"` \| `"stylis"` \| `"postcss"` \| `"javascript"` \| `"js"` \| `"json"` \| `"babel"` \| `"es"` \| `"sucrase"` \| `"typescript"` \| `"flow"` \| `"ts"` \| `"jsx"` \| `"tsx"` \| `"react"` \| `"react-jsx"` \| `"react.jsx"` \| `"react-tsx"` \| `"react.tsx"` \| `"react-native"` \| `"react-native.jsx"` \| `"react-native-tsx"` \| `"react-native.tsx"` \| `"vue"` \| `"vue3"` \| `"vue2"` \| `"vue-app"` \| `"app.vue"` \| `"svelte"` \| `"svelte-app"` \| `"app.svelte"` \| `"stencil"` \| `"stencil.tsx"` \| `"solid"` \| `"solid.jsx"` \| `"solid.tsx"` \| `"riot"` \| `"riotjs"` \| `"malina"` \| `"malinajs"` \| `"xht"` \| `"coffeescript"` \| `"coffee"` \| `"livescript"` \| `"ls"` \| `"civet"` \| `"clio"` \| `"imba"` \| `"assemblyscript"` \| `"as"` \| `"python"` \| `"py"` \| `"pyodide"` \| `"python-wasm"` \| `"py-wasm"` \| `"pythonwasm"` \| `"pywasm"` \| `"py3"` \| `"wasm.py"` \| `"r"` \| `"rlang"` \| `"rstats"` \| `"r-wasm"` \| `"ruby"` \| `"rb"` \| `"ruby-wasm"` \| `"wasm.rb"` \| `"rubywasm"` \| `"go"` \| `"golang"` \| `"php"` \| `"php-wasm"` \| `"phpwasm"` \| `"wasm.php"` \| `"cpp"` \| `"c"` \| `"C"` \| `"cp"` \| `"cxx"` \| `"c++"` \| `"cppm"` \| `"ixx"` \| `"ii"` \| `"hpp"` \| `"h"` \| `"cpp-wasm"` \| `"cppwasm"` \| `"cwasm"` \| `"wasm.cpp"` \| `"clang"` \| `"clang.cpp"` \| `"java"` \| `"csharp"` \| `"csharp-wasm"` \| `"cs"` \| `"cs-wasm"` \| `"wasm.cs"` \| `"perl"` \| `"pl"` \| `"pm"` \| `"lua"` \| `"lua-wasm"` \| `"luawasm"` \| `"wasm.lua"` \| `"teal"` \| `"tl"` \| `"fennel"` \| `"fnl"` \| `"julia"` \| `"jl"` \| `"scheme"` \| `"scm"` \| `"commonlisp"` \| `"common-lisp"` \| `"lisp"` \| `"clojurescript"` \| `"clojure"` \| `"cljs"` \| `"clj"` \| `"cljc"` \| `"edn"` \| `"gleam"` \| `"rescript"` \| `"res"` \| `"resi"` \| `"reason"` \| `"re"` \| `"rei"` \| `"ocaml"` \| `"ml"` \| `"mli"` \| `"tcl"` \| `"wat"` \| `"wast"` \| `"webassembly"` \| `"wasm"` \| `"Binary"` \| `"sql"` \| `"sqlite"` \| `"sqlite3"` \| `"pg.sql"` \| `"pgsql.sql"` \| `"pgsql"` \| `"pg"` \| `"pglite"` \| `"pglite.sql"` \| `"postgresql"` \| `"postgres"` \| `"postgre.sql"` \| `"postgresql.sql"` \| `"prolog.pl"` \| `"prolog"` \| `"blockly"` \| `"blockly.xml"` \| `"xml"` \| `"pintora"`
Language name, alias or extension.
## Defined in
[models.ts:884](https://github.com/live-codes/livecodes/blob/7617d5c8be5a2a8be8133f973d9e69eb9f86434d/src/sdk/models.ts#L884)

File diff suppressed because one or more lines are too long