Skip to content

Commit 3629bdf

Browse files
authored
Merge pull request #791 from live-codes/develop
release sdk-v0.9.1
2 parents 74dabad + c916a2e commit 3629bdf

84 files changed

Lines changed: 1151 additions & 262 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,23 @@ All notable changes to this project will be documented in this file. See [standa
44

55
---
66

7-
## [v43](https://github.com/live-codes/livecodes/compare/sdk-v0.9.0...0.0.0) (2025-03-15)
7+
## [sdk-v0.9.1](https://github.com/live-codes/livecodes/compare/v43...sdk-v0.9.1) (2025-04-10)
8+
9+
### Features
10+
11+
- **Editor:** allow folding lines and regions ([984c913](https://github.com/live-codes/livecodes/commit/984c913bcebcc8d0a2f872df1076311d039e65a1))
12+
13+
A new config option `foldRegions` was added. When set to `true`, regions marked by `#region` and `#endregion` comments are folded when the project is loaded.
14+
15+
In addition, editor configurations (`config.markup`, `config.style`, `config.script`) have a new property `foldLines` that accepts an array of objects (e.g. `[{ from: 1, to: 5 }]`) that indicates which lines to fold. This can be useful for less relevant code in embedded playgrounds.
16+
17+
* **Config:** add the value `"auto"` to `config.editor` options ([0f62de8](https://github.com/live-codes/livecodes/commit/0f62de8891ca221c035a2a0e8e3cbfcc9133f2a0))
18+
19+
If set to `auto`, Monaco editor is used on desktop and CodeMirror is used on mobile regardless of other settings. This can be useful in `"simple"` mode.
20+
21+
---
22+
23+
## [v43](https://github.com/live-codes/livecodes/compare/sdk-v0.9.0...v43) (2025-03-15)
824

925
### Highlights for this release
1026

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ A [feature-rich](https://livecodes.io/docs/features/), open-source, **client-sid
2222
[![Lokalise: UI languages](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/live-codes/lokalise-badge/main/badges/languages.json)](https://app.lokalise.com/public/34958094667a72e9454592.95108106/)
2323
[![license - MIT](https://img.shields.io/github/license/live-codes/livecodes)](https://github.com/live-codes/livecodes/blob/develop/LICENSE)
2424
[![LiveCodes: GitHub repo](https://img.shields.io/github/stars/live-codes/livecodes?style=flat&logo=github)](https://github.com/live-codes/livecodes)
25+
[![LiveCodes: GitHub repo](https://img.shields.io/github/forks/live-codes/livecodes?style=flat&logo=github)](https://github.com/live-codes/livecodes)
2526
[![Follow us on X (formerly Twitter)](https://img.shields.io/badge/Follow%20@livecodes__io-575757?logo=x)](https://x.com/livecodes_io)
2627

2728
[Try it now on livecodes.io](https://livecodes.io)

docs/docs/configuration/configuration-object.mdx

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@ An object that configures the language and content of the markup editor. This ca
153153
A URL to load `hiddenContent` from. It has to be a valid URL that is CORS-enabled.
154154
The URL is only fetched if `hiddenContent` property had no value.
155155

156+
- `foldedLines`:
157+
Type: [`Array<{ from: number; to: number }> | undefined`](../api/interfaces/Config.md#foldedlines)
158+
Default: `undefined`
159+
Lines that get folded when the editor loads. The code can be unfolded by clicking on arrow beside the line.
160+
This can be useful for less relevant code in embedded playgrounds.
161+
156162
- `title`:
157163
Type: [`string | undefined`](../api/interfaces/Config.md#title)
158164
Default: `""`
@@ -594,13 +600,18 @@ Enables [showing element spacing](../features/result.mdx#show-spacings) in the r
594600

595601
### `editor`
596602

597-
Type: [`"monaco" | "codemirror" | "codejar" | undefined`](../api/interfaces/Config.md#editor)
603+
Type: [`"monaco" | "codemirror" | "codejar" | "auto" | undefined`](../api/interfaces/Config.md#editor)
598604

599605
Default: `undefined`
600606

601607
Selects the [code editor](../features/editor-settings.mdx#code-editor) to use.
602608

603-
If `undefined` (the default), Monaco editor is used on desktop, CodeMirror is used on mobile and CodeJar is used in [codeblocks](../features/display-modes.mdx#codeblock), in [lite mode](../features/lite.mdx) and in [readonly](#readonly) playgrounds.
609+
If `undefined` (the default):<br />
610+
Monaco editor is used on desktop,<br />
611+
CodeMirror is used on mobile and in `simple` mode,<br />
612+
while CodeJar is used in [`codeblock` mode](../features/display-modes.mdx#codeblock), in [`lite` mode](../features/lite.mdx) and in [`readonly`](#readonly) playgrounds.
613+
614+
If set to `auto`, Monaco editor is used on desktop and CodeMirror is used on mobile regardless of other settings.
604615

605616
### `fontFamily`
606617

@@ -661,6 +672,14 @@ Default: `true`
661672

662673
Use auto-complete to close brackets and quotes.
663674

675+
### `foldRegions`
676+
677+
Type: [`boolean`](../api/interfaces/Config.md#foldregions)
678+
679+
Default: `false`
680+
681+
When set to `true`, regions marked by `#region` and `#endregion` comments are folded when the project is loaded.
682+
664683
### `emmet`
665684

666685
Type: [`boolean`](../api/interfaces/Config.md#emmet)

docs/docs/features/editor-settings.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ These include:
4646
- [Line numbers](../configuration/configuration-object.mdx#linenumbers)
4747
- [Word-wrap](../configuration/configuration-object.mdx#wordwrap)
4848
- [Auto-close brackets and quotes](../configuration/configuration-object.mdx#closebrackets)
49+
- [Fold (collapse) regions](../configuration/configuration-object.mdx#foldregions)
4950

5051
### Emmet
5152

docs/docs/getting-started.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ LiveCodes [<abbr title="Software Development Kit">SDK</abbr>](./sdk/index.mdx) i
2727

2828
Install from npm.
2929

30-
```shell
31-
npm i livecodes
30+
```bash npm2yarn
31+
npm install livecodes
3232
```
3333

3434
then you can use it like that:
Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,47 @@
11
# CoffeeScript
22

3-
TODO...
3+
[CoffeeScript](https://coffeescript.org/) is a little language that compiles into JavaScript.
4+
5+
## Usage
6+
7+
import LiveCodes from '../../src/components/LiveCodes.tsx';
8+
9+
This example demonstrates usage in LiveCodes:
10+
11+
<LiveCodes template="coffeescript" height="80vh"></LiveCodes>
12+
13+
## Language Info
14+
15+
### Name
16+
17+
`coffeescript`
18+
19+
### Extensions
20+
21+
`.coffee`
22+
23+
### Aliases
24+
25+
`coffee`, `coffeescript`
26+
27+
### Editor
28+
29+
`script`
30+
31+
## Compiler
32+
33+
The official [CoffeeScript compiler](https://www.npmjs.com/package/coffeescript).
34+
35+
### Version
36+
37+
`coffeescript`: v2.7.0
38+
39+
## Starter Template
40+
41+
https://livecodes.io/?template=coffeescript
42+
43+
## Links
44+
45+
- [Official website](https://coffeescript.org/)
46+
- [Language Reference](https://coffeescript.org/#language)
47+
- [CoffeeScript on GitHub](https://github.com/jashkenas/coffeescript)

docs/docs/languages/commonlisp.mdx

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,62 @@
11
# Common Lisp
22

3-
TODO...
3+
[Common Lisp](https://common-lisp.net/) is a dialect of the Lisp programming language.
4+
5+
In LiveCodes, Common Lisp code runs in the browser using [JSCL](https://github.com/jscl-project/jscl), a Common Lisp to JavaScript compiler.
6+
7+
:::info Note
8+
9+
Lisp language family supported in LiveCodes includes [Common Lisp](./commonlisp.mdx), [Scheme](./scheme.mdx), [ClojureScript](./clojurescript.mdx) and [Fennel](./fennel.mdx).
10+
11+
:::
12+
13+
## Usage
14+
15+
LiveCodes runs Common Lisp code in the browser. JSCL implements a subset of Common Lisp, but covers enough functionality to write practical code.
16+
17+
import LiveCodes from '../../src/components/LiveCodes.tsx';
18+
19+
This example demonstrates basic Common Lisp syntax and functionality:
20+
21+
<LiveCodes template="commonlisp" height="80vh"></LiveCodes>
22+
23+
### JS Interoperability
24+
25+
Please see [JSCL docs](https://github.com/jscl-project/jscl/wiki/JSCL-and-manipulations-with-JS-objects)
26+
27+
## Language Info
28+
29+
### Name
30+
31+
`commonlisp`
32+
33+
### Aliases/Extensions
34+
35+
`common-lisp`, `lisp`
36+
37+
### Editor
38+
39+
`script`
40+
41+
## Compiler
42+
43+
[JSCL](https://github.com/jscl-project/jscl) - Common Lisp to JavaScript compiler
44+
45+
## Code Formatting
46+
47+
Using [Parinfer](https://shaunlebron.github.io/parinfer/).
48+
49+
## Limitations
50+
51+
Since JSCL is a subset of Common Lisp, it doesn't implement all Common Lisp features. See the [JSCL documentation](https://github.com/jscl-project/jscl#status) for more information.
52+
53+
## Starter Template
54+
55+
https://livecodes.io/?template=commonlisp
56+
57+
## Links
58+
59+
- [Common Lisp](https://common-lisp.net/)
60+
- [JSCL](https://github.com/jscl-project/jscl)
61+
- [Common Lisp: A Gentle Introduction to Symbolic Computation](https://www.cs.cmu.edu/~dst/LispBook/)
62+
- [Practical Common Lisp](http://www.gigamonkeys.com/book/)

docs/docs/languages/cssmodules.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ The CSS Modules processor is provided using [postcss-modules](https://github.com
183183

184184
### Version
185185

186-
`postcss-modules`: v6.0.0
186+
`postcss-modules`: v6.0.1
187187

188188
## Custom Settings
189189

docs/docs/languages/react-native.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ For usage and examples, see documentation for [JSX](./jsx.mdx).
3232

3333
[TypeScript compiler](./typescript.mdx) and [React Native for Web](https://necolas.github.io/react-native-web/)
3434

35+
### Version
36+
37+
`react-native-web`: v0.20.0
38+
3539
## Code Formatting
3640

3741
Using [Prettier](https://prettier.io/).

docs/docs/languages/react.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,10 @@ export const styledComponentsDemo = {
254254

255255
[React compiler](https://react.dev/learn/react-compiler), which is a [babel](./babel.mdx) plugin ([babel-plugin-react-compiler](https://www.npmjs.com/package/babel-plugin-react-compiler)).
256256

257+
### Version
258+
259+
`babel-plugin-react-compiler`: v19.0.0-beta-e993439-20250405
260+
257261
## Code Formatting
258262

259263
Using [Prettier](https://prettier.io/).

0 commit comments

Comments
 (0)