basedpl 0.1.81 → 0.1.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/basedpl_wasm.js +249 -234
- package/basedpl_wasm_bg.wasm +0 -0
- package/bpl.tmLanguage.json +6 -6
- package/browser/SAX2B.woff2 +0 -0
- package/browser/bpl-editor.js +32 -0
- package/{input.js → browser/input.js} +2 -2
- package/browser/language.js +3 -0
- package/{lb.js → browser/lb.js} +42 -41
- package/hpl.tmLanguage.json +3 -3
- package/package.json +10 -2
- package/SAX2B.woff2 +0 -0
- package/bpl-editor.js +0 -476
- /package/{layout.json → browser/layout.json} +0 -0
package/README.md
CHANGED
|
@@ -11,3 +11,14 @@ new Session().run('avg←+/÷≢ ⋄ avg 2 4 9', output => console.log(output.da
|
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
[BPL on the web](https://answerdotai.github.io/basedpl/web.html) documents this package: loading it, its outputs, values and JavaScript functions, drawing, the language bar, and how the gallery is built. The [playground](https://answerdotai.github.io/basedpl/playground.html) and [gallery](https://answerdotai.github.io/basedpl/gallery.html) run BPL in your browser. The [BPL documentation](https://answerdotai.github.io/basedpl/) covers the language.
|
|
14
|
+
|
|
15
|
+
The symbol bar and font need no interpreter or WebAssembly:
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<script type="module">
|
|
19
|
+
import {install} from 'https://cdn.jsdelivr.net/npm/basedpl/browser/bpl-editor.js';
|
|
20
|
+
install();
|
|
21
|
+
</script>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`install()` mounts in `#bpl-toolbar` when the host supplies that slot. Otherwise the same component overlays the top of the page without moving its content. The arrow button remembers collapse state without disabling keyboard entry. Repeated calls reuse the connected controller; call its `dispose()` when the host page closes. Importing the module alone does not mount a bar; it also exports `grammar`, `configuration`, `editorOptions` and `installFont()` for editor/highlighter integrations.
|