@lemmabase/lemma-engine 0.8.20 → 0.8.21
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 +6 -2
- package/lemma.bindings.d.ts +2 -4
- package/lemma.bindings.js +6 -36
- package/lemma.d.ts +9 -5
- package/lemma.iife.js +1 -1
- package/lemma_bg.wasm +0 -0
- package/lemma_bg.wasm.d.ts +2 -3
- package/monaco.js +39 -36
- package/package.json +2 -2
package/lemma_bg.wasm
CHANGED
|
Binary file
|
package/lemma_bg.wasm.d.ts
CHANGED
|
@@ -21,16 +21,15 @@ export const __wbg_engine_free: (a: number, b: number) => void;
|
|
|
21
21
|
export const wasmengine_fetch: (a: number, b: number, c: number) => number;
|
|
22
22
|
export const wasmengine_format: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
23
23
|
export const wasmengine_format_repository: (a: number, b: number, c: number, d: number) => void;
|
|
24
|
-
export const wasmengine_invert: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
25
24
|
export const wasmengine_list: (a: number, b: number) => void;
|
|
26
25
|
export const wasmengine_load: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
27
26
|
export const wasmengine_load_batch: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
28
27
|
export const wasmengine_new: () => number;
|
|
29
28
|
export const wasmengine_run: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
|
|
30
29
|
export const wasmengine_schema: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
31
|
-
export const
|
|
30
|
+
export const __wasm_bindgen_func_elem_12239: (a: number, b: number, c: number, d: number) => void;
|
|
32
31
|
export const __wasm_bindgen_func_elem_2740: (a: number, b: number, c: number, d: number) => void;
|
|
33
|
-
export const
|
|
32
|
+
export const __wasm_bindgen_func_elem_12250: (a: number, b: number, c: number, d: number) => void;
|
|
34
33
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
35
34
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
36
35
|
export const __wbindgen_export3: (a: number) => void;
|
package/monaco.js
CHANGED
|
@@ -5,18 +5,19 @@
|
|
|
5
5
|
|
|
6
6
|
// Must stay in exact index order with TOKEN_TYPES in engine/lsp/src/semantic_tokens.rs.
|
|
7
7
|
export const SEMANTIC_TOKEN_TYPES = [
|
|
8
|
-
'namespace',
|
|
9
|
-
'class',
|
|
10
|
-
'property',
|
|
11
|
-
'function',
|
|
12
|
-
'string',
|
|
13
|
-
'comment',
|
|
14
|
-
'keyword',
|
|
15
|
-
'operator',
|
|
16
|
-
'controlKeyword',
|
|
17
|
-
'dataBody',
|
|
18
|
-
'punctuation',
|
|
19
|
-
'reference',
|
|
8
|
+
'namespace', // 0 — repo qualifier
|
|
9
|
+
'class', // 1 — spec name
|
|
10
|
+
'property', // 2 — data field path (before colon)
|
|
11
|
+
'function', // 3 — rule name (colon is punctuation)
|
|
12
|
+
'string', // 4 — values in rule body / defaults
|
|
13
|
+
'comment', // 5
|
|
14
|
+
'keyword', // 6 — type keywords, math functions, constraint words
|
|
15
|
+
'operator', // 7
|
|
16
|
+
'controlKeyword', // 8 — unless, then, not, and, in, type, veto, now, past, future, stray repo
|
|
17
|
+
'dataBody', // 9 — data block after the colon
|
|
18
|
+
'punctuation', // 10 — colons after data field and rule name
|
|
19
|
+
'reference', // 11 — identifiers in spec/rule body
|
|
20
|
+
'declarationKeyword', // 12 — declaration keywords: spec, data, with, rule, repo, uses, meta
|
|
20
21
|
];
|
|
21
22
|
|
|
22
23
|
export const SEMANTIC_TOKEN_MODIFIERS = [];
|
|
@@ -32,18 +33,19 @@ export const SEMANTIC_TOKEN_MODIFIERS = [];
|
|
|
32
33
|
* Use in monaco.editor.defineTheme: { ..., rules: LEMMA_MONACO_RULES }
|
|
33
34
|
*/
|
|
34
35
|
export const LEMMA_MONACO_RULES = [
|
|
35
|
-
{ token: 'namespace',
|
|
36
|
-
{ token: 'class',
|
|
37
|
-
{ token: 'property',
|
|
38
|
-
{ token: 'function',
|
|
39
|
-
{ token: 'string',
|
|
40
|
-
{ token: 'comment',
|
|
41
|
-
{ token: 'keyword',
|
|
42
|
-
{ token: 'operator',
|
|
43
|
-
{ token: 'controlKeyword',
|
|
44
|
-
{ token: 'dataBody',
|
|
45
|
-
{ token: 'punctuation',
|
|
46
|
-
{ token: 'reference',
|
|
36
|
+
{ token: 'namespace', foreground: 'BD8EBB' }, // repo qualifier
|
|
37
|
+
{ token: 'class', foreground: '5DBDAA' }, // spec name
|
|
38
|
+
{ token: 'property', foreground: 'A3B5DF' }, // data field path
|
|
39
|
+
{ token: 'function', foreground: 'A3B5DF' }, // rule name
|
|
40
|
+
{ token: 'string', foreground: 'D07868' }, // same as dataBody (values / literals bucket)
|
|
41
|
+
{ token: 'comment', foreground: '595945' },
|
|
42
|
+
{ token: 'keyword', foreground: '6BA0C2' }, // type + math keywords + constraint words
|
|
43
|
+
{ token: 'operator', foreground: '80807A' },
|
|
44
|
+
{ token: 'controlKeyword', foreground: '726B83' }, // unless, then, not, and, in, type, veto, now, past, future
|
|
45
|
+
{ token: 'dataBody', foreground: 'D07868' }, // data block after colon
|
|
46
|
+
{ token: 'punctuation', foreground: '79987F' }, // declaration colons
|
|
47
|
+
{ token: 'reference', foreground: 'A59582' }, // paths, aliases, …
|
|
48
|
+
{ token: 'declarationKeyword', foreground: '80807A' }, // spec, data, with, rule, repo, uses, meta
|
|
47
49
|
];
|
|
48
50
|
|
|
49
51
|
/**
|
|
@@ -51,18 +53,19 @@ export const LEMMA_MONACO_RULES = [
|
|
|
51
53
|
* Monaco uses dot notation for modifier-qualified rules (type.modifier).
|
|
52
54
|
*/
|
|
53
55
|
export const LEMMA_SEMANTIC_COLORS = {
|
|
54
|
-
'namespace':
|
|
55
|
-
'class':
|
|
56
|
-
'property':
|
|
57
|
-
'function':
|
|
58
|
-
'string':
|
|
59
|
-
'comment':
|
|
60
|
-
'keyword':
|
|
61
|
-
'operator':
|
|
62
|
-
'controlKeyword':
|
|
63
|
-
'dataBody':
|
|
64
|
-
'punctuation':
|
|
65
|
-
'reference':
|
|
56
|
+
'namespace': '#BD8EBB', // repo qualifier
|
|
57
|
+
'class': '#5DBDAA', // spec name
|
|
58
|
+
'property': '#A3B5DF', // data field path
|
|
59
|
+
'function': '#A3B5DF', // rule name
|
|
60
|
+
'string': '#D07868', // same hex as dataBody
|
|
61
|
+
'comment': '#595945',
|
|
62
|
+
'keyword': '#6BA0C2', // type + math keywords + constraint words
|
|
63
|
+
'operator': '#80807A',
|
|
64
|
+
'controlKeyword': '#726B83',
|
|
65
|
+
'dataBody': '#D07868', // data after colon
|
|
66
|
+
'punctuation': '#79987F', // data/rule colons
|
|
67
|
+
'reference': '#A59582',
|
|
68
|
+
'declarationKeyword': '#80807A', // spec, data, with, rule, repo, uses, meta
|
|
66
69
|
};
|
|
67
70
|
|
|
68
71
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lemmabase/lemma-engine",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "A language
|
|
3
|
+
"version": "0.8.21",
|
|
4
|
+
"description": "A pure, declarative language for business rules.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lemma.js",
|
|
7
7
|
"types": "lemma.d.ts",
|