tjs-lang 0.8.6 → 0.9.0

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.
Files changed (81) hide show
  1. package/CLAUDE.md +12 -4
  2. package/bin/docs.js +3 -2
  3. package/demo/docs.json +2 -2
  4. package/dist/experiments/ambient/probe.d.ts +52 -0
  5. package/dist/index.js +115 -171
  6. package/dist/index.js.map +4 -4
  7. package/dist/scripts/build-editors.d.ts +19 -0
  8. package/dist/src/css/dimensions.d.ts +23 -0
  9. package/dist/src/css/index.d.ts +85 -0
  10. package/dist/src/css/predicates.d.ts +38 -0
  11. package/dist/src/css/shorthands.d.ts +31 -0
  12. package/dist/src/css/style.d.ts +48 -0
  13. package/dist/src/lang/emitters/js.d.ts +9 -1
  14. package/dist/src/lang/index.d.ts +2 -2
  15. package/dist/src/lang/parser-transforms.d.ts +9 -5
  16. package/dist/src/lang/parser.d.ts +2 -0
  17. package/dist/src/lang/predicate.d.ts +60 -0
  18. package/dist/src/lang/transpiler.d.ts +3 -2
  19. package/dist/src/lang/types.d.ts +16 -0
  20. package/dist/src/schema/index.d.ts +12 -0
  21. package/dist/tjs-browser-from-ts.js +20 -20
  22. package/dist/tjs-browser-from-ts.js.map +3 -3
  23. package/dist/tjs-browser.js +100 -90
  24. package/dist/tjs-browser.js.map +4 -4
  25. package/dist/tjs-css.js +193 -0
  26. package/dist/tjs-css.js.map +7 -0
  27. package/dist/tjs-eval.js +43 -42
  28. package/dist/tjs-eval.js.map +4 -4
  29. package/dist/tjs-from-ts.js +13 -13
  30. package/dist/tjs-from-ts.js.map +2 -2
  31. package/dist/tjs-lang.js +102 -92
  32. package/dist/tjs-lang.js.map +4 -4
  33. package/dist/tjs-runtime.js +10 -0
  34. package/dist/tjs-runtime.js.map +7 -0
  35. package/dist/tjs-schema.js +6 -0
  36. package/dist/tjs-schema.js.map +7 -0
  37. package/dist/tjs-vm.js +55 -54
  38. package/dist/tjs-vm.js.map +4 -4
  39. package/docs/ambient-contracts.md +261 -0
  40. package/editors/ace/ajs-mode.js +214 -233
  41. package/editors/codemirror/ajs-language.js +1570 -233
  42. package/editors/editors-build.test.ts +29 -0
  43. package/editors/monaco/ajs-monarch.js +239 -195
  44. package/llms.txt +4 -0
  45. package/package.json +35 -4
  46. package/src/css/css.test.ts +122 -0
  47. package/src/css/dimensions.test.ts +112 -0
  48. package/src/css/dimensions.ts +146 -0
  49. package/src/css/index.ts +243 -0
  50. package/src/css/perf.bench.test.ts +109 -0
  51. package/src/css/predicates.ts +232 -0
  52. package/src/css/property-aware.test.ts +84 -0
  53. package/src/css/shorthands.test.ts +90 -0
  54. package/src/css/shorthands.ts +113 -0
  55. package/src/css/style.test.ts +125 -0
  56. package/src/css/style.ts +134 -0
  57. package/src/index-tsfree.test.ts +58 -0
  58. package/src/lang/bare-assignments.test.ts +48 -0
  59. package/src/lang/doc-comment-position.test.ts +32 -0
  60. package/src/lang/docs.ts +6 -2
  61. package/src/lang/emit-verified-predicate.test.ts +95 -0
  62. package/src/lang/emitters/dts.test.ts +31 -0
  63. package/src/lang/emitters/dts.ts +23 -4
  64. package/src/lang/emitters/from-ts.ts +4 -1
  65. package/src/lang/emitters/js.ts +33 -1
  66. package/src/lang/from-ts.test.ts +1 -1
  67. package/src/lang/generic-verified-predicate.test.ts +39 -0
  68. package/src/lang/index.ts +14 -5
  69. package/src/lang/parser-transforms.ts +120 -18
  70. package/src/lang/parser.ts +22 -6
  71. package/src/lang/predicate-evaluator.test.ts +49 -0
  72. package/src/lang/predicate-report.test.ts +54 -0
  73. package/src/lang/predicate.ts +268 -0
  74. package/src/lang/redos-lint.test.ts +81 -0
  75. package/src/lang/transpiler.ts +13 -0
  76. package/src/lang/type-verified-predicate.test.ts +83 -0
  77. package/src/lang/types.ts +17 -0
  78. package/src/lang/typescript-syntax.test.ts +2 -1
  79. package/src/schema/index.ts +62 -0
  80. package/src/schema/schema.test.ts +66 -0
  81. package/src/use-cases/bootstrap.test.ts +14 -4
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Anti-drift guard for the published `tjs-lang/editors/*` entry points.
3
+ *
4
+ * The `editors/{codemirror,monaco,ace}/*.js` files are what npm consumers import
5
+ * (the `./editors/*` subpaths). They are BUILD ARTIFACTS bundled from the
6
+ * adjacent `.ts` by `scripts/build-editors.ts` — but they're committed (so a
7
+ * fresh `npm publish` ships them without a build). This test re-bundles each
8
+ * entry in memory and asserts the committed `.js` is byte-identical, so editing
9
+ * a `.ts` without running `bun run build:editors` fails CI instead of silently
10
+ * shipping months-old code (the exact rot this whole build step fixes).
11
+ *
12
+ * If this fails: run `bun run build:editors` and commit the regenerated `.js`.
13
+ */
14
+ import { describe, it, expect } from 'bun:test'
15
+ import { readFileSync } from 'fs'
16
+ import { join } from 'path'
17
+ import { editorTargets, bundleEditor, ROOT } from '../scripts/build-editors'
18
+
19
+ describe('editors/* published .js are in sync with their .ts sources', () => {
20
+ for (const target of editorTargets) {
21
+ it(`${target.name}: committed ${target.outfile} matches a fresh build`, () => {
22
+ const committed = readFileSync(join(ROOT, target.outfile), 'utf8')
23
+ const fresh = bundleEditor(target, { write: false })
24
+ // Byte-equality — esbuild is pinned, so a diff means the .ts changed
25
+ // without the .js being rebuilt (or a config drift between the two).
26
+ expect(committed).toBe(fresh)
27
+ })
28
+ }
29
+ })
@@ -1,243 +1,287 @@
1
- /**
2
- * Monaco Editor Monarch Tokenizer for AsyncJS
3
- *
4
- * Usage in browser:
5
- * ```html
6
- * <script src="https://unpkg.com/monaco-editor/min/vs/loader.js"></script>
7
- * <script src="ajs-monarch.js"></script>
8
- * <script>
9
- * require(['vs/editor/editor.main'], function() {
10
- * registerAjsLanguage(monaco);
11
- * monaco.editor.create(document.getElementById('container'), {
12
- * value: 'function agent(topic: "string") { ... }',
13
- * language: 'ajs'
14
- * });
15
- * });
16
- * </script>
17
- * ```
18
- */
1
+ // editors/ajs-syntax.ts
2
+ var KEYWORDS = [
3
+ "function",
4
+ "return",
5
+ "if",
6
+ "else",
7
+ "while",
8
+ "for",
9
+ "of",
10
+ "in",
11
+ "try",
12
+ "catch",
13
+ "finally",
14
+ "let",
15
+ "const",
16
+ "true",
17
+ "false",
18
+ "null",
19
+ "undefined"
20
+ ];
21
+ var FORBIDDEN_KEYWORDS = [
22
+ // Object-oriented constructs
23
+ "new",
24
+ "class",
25
+ "extends",
26
+ "super",
27
+ "this",
28
+ "implements",
29
+ "interface",
30
+ "abstract",
31
+ "static",
32
+ "private",
33
+ "protected",
34
+ "public",
35
+ // Async constructs (not needed - runtime handles async)
36
+ "async",
37
+ "await",
38
+ "yield",
39
+ // Module system (not supported)
40
+ "import",
41
+ "export",
42
+ "require",
43
+ "module",
44
+ // Other unsupported
45
+ "var",
46
+ // use let/const
47
+ "throw",
48
+ // use Error() for monadic error flow
49
+ "switch",
50
+ // use if/else chains
51
+ "case",
52
+ "default",
53
+ // (as switch keyword)
54
+ "with",
55
+ "delete",
56
+ "void",
57
+ "typeof",
58
+ // use type-by-example instead
59
+ "instanceof",
60
+ "debugger",
61
+ "eval",
62
+ // TypeScript-specific (not supported)
63
+ "type",
64
+ "enum",
65
+ "namespace",
66
+ "declare",
67
+ "readonly",
68
+ "as",
69
+ "is",
70
+ "keyof",
71
+ "infer",
72
+ "never",
73
+ "unknown"
74
+ ];
75
+ var TYPE_CONSTRUCTORS = [
76
+ "Date",
77
+ "Set",
78
+ "Map",
79
+ "Array",
80
+ "Object",
81
+ "String",
82
+ "Number",
83
+ "Boolean",
84
+ "RegExp",
85
+ "Error",
86
+ "JSON",
87
+ "Math",
88
+ "Schema"
89
+ // AsyncJS-specific
90
+ ];
91
+ var FORBIDDEN_SET = new Set(FORBIDDEN_KEYWORDS);
92
+ var KEYWORDS_SET = new Set(KEYWORDS);
93
+ var FORBIDDEN_PATTERN = new RegExp(
94
+ `\\b(${FORBIDDEN_KEYWORDS.join("|")})\\b`,
95
+ "g"
96
+ );
19
97
 
20
- const ajsLanguageId = 'ajs'
21
-
22
- const ajsLanguageConfiguration = {
98
+ // editors/monaco/ajs-monarch.ts
99
+ var languageId = "ajs";
100
+ var languageConfiguration = {
23
101
  comments: {
24
- lineComment: '//',
25
- blockComment: ['/*', '*/'],
102
+ lineComment: "//",
103
+ blockComment: ["/*", "*/"]
26
104
  },
27
105
  brackets: [
28
- ['{', '}'],
29
- ['[', ']'],
30
- ['(', ')'],
106
+ ["{", "}"],
107
+ ["[", "]"],
108
+ ["(", ")"]
31
109
  ],
32
110
  autoClosingPairs: [
33
- { open: '{', close: '}' },
34
- { open: '[', close: ']' },
35
- { open: '(', close: ')' },
36
- { open: "'", close: "'", notIn: ['string', 'comment'] },
37
- { open: '"', close: '"', notIn: ['string', 'comment'] },
38
- { open: '`', close: '`', notIn: ['string', 'comment'] },
111
+ { open: "{", close: "}" },
112
+ { open: "[", close: "]" },
113
+ { open: "(", close: ")" },
114
+ { open: "'", close: "'", notIn: ["string", "comment"] },
115
+ { open: '"', close: '"', notIn: ["string", "comment"] },
116
+ { open: "`", close: "`", notIn: ["string", "comment"] }
39
117
  ],
40
118
  surroundingPairs: [
41
- { open: '{', close: '}' },
42
- { open: '[', close: ']' },
43
- { open: '(', close: ')' },
119
+ { open: "{", close: "}" },
120
+ { open: "[", close: "]" },
121
+ { open: "(", close: ")" },
44
122
  { open: "'", close: "'" },
45
123
  { open: '"', close: '"' },
46
- { open: '`', close: '`' },
124
+ { open: "`", close: "`" }
47
125
  ],
48
- }
49
-
50
- const ajsMonarchLanguage = {
51
- defaultToken: 'source',
126
+ folding: {
127
+ markers: {
128
+ start: /^\s*\/\/\s*#region\b/,
129
+ end: /^\s*\/\/\s*#endregion\b/
130
+ }
131
+ }
132
+ };
133
+ var monarchLanguage = {
134
+ defaultToken: "source",
52
135
  ignoreCase: false,
53
-
54
- keywords: [
55
- 'function',
56
- 'return',
57
- 'if',
58
- 'else',
59
- 'while',
60
- 'for',
61
- 'of',
62
- 'in',
63
- 'try',
64
- 'catch',
65
- 'finally',
66
- 'throw',
67
- 'let',
68
- 'const',
69
- 'true',
70
- 'false',
71
- 'null',
72
- ],
73
-
74
- // Forbidden keywords - highlighted as errors
75
- forbidden: [
76
- 'new',
77
- 'class',
78
- 'async',
79
- 'await',
80
- 'var',
81
- 'this',
82
- 'super',
83
- 'extends',
84
- 'implements',
85
- 'interface',
86
- 'type',
87
- 'yield',
88
- 'import',
89
- 'export',
90
- 'require',
91
- ],
92
-
93
- typeKeywords: ['Date', 'Set', 'Map', 'Array', 'Object', 'String', 'Number'],
94
-
136
+ // Good parts - standard keywords (from shared definition)
137
+ keywords: [...KEYWORDS],
138
+ // Bad parts - forbidden in AsyncJS (from shared definition)
139
+ forbidden: [...FORBIDDEN_KEYWORDS],
140
+ // Built-in type constructors used as factories (from shared definition)
141
+ typeKeywords: [...TYPE_CONSTRUCTORS],
95
142
  operators: [
96
- '=',
97
- '>',
98
- '<',
99
- '!',
100
- '~',
101
- '?',
102
- ':',
103
- '==',
104
- '<=',
105
- '>=',
106
- '!=',
107
- '&&',
108
- '||',
109
- '++',
110
- '--',
111
- '+',
112
- '-',
113
- '*',
114
- '/',
115
- '&',
116
- '|',
117
- '^',
118
- '%',
143
+ "=",
144
+ ">",
145
+ "<",
146
+ "!",
147
+ "~",
148
+ "?",
149
+ ":",
150
+ "==",
151
+ "<=",
152
+ ">=",
153
+ "!=",
154
+ "&&",
155
+ "||",
156
+ "++",
157
+ "--",
158
+ "+",
159
+ "-",
160
+ "*",
161
+ "/",
162
+ "&",
163
+ "|",
164
+ "^",
165
+ "%",
166
+ "<<",
167
+ ">>",
168
+ ">>>",
169
+ "+=",
170
+ "-=",
171
+ "*=",
172
+ "/=",
173
+ "&=",
174
+ "|=",
175
+ "^=",
176
+ "%=",
177
+ "<<=",
178
+ ">>=",
179
+ ">>>="
119
180
  ],
120
-
121
181
  symbols: /[=><!~?:&|+\-*\/\^%]+/,
122
- escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4})/,
123
-
182
+ escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
124
183
  tokenizer: {
125
184
  root: [
185
+ // Identifiers and keywords
126
186
  [
127
187
  /[a-zA-Z_$][\w$]*/,
128
188
  {
129
189
  cases: {
130
- '@forbidden': 'invalid',
131
- '@keywords': 'keyword',
132
- '@typeKeywords': 'type.identifier',
133
- '@default': 'identifier',
134
- },
135
- },
190
+ "@forbidden": "invalid",
191
+ // Red squiggly for bad parts
192
+ "@keywords": "keyword",
193
+ "@typeKeywords": "type.identifier",
194
+ "@default": "identifier"
195
+ }
196
+ }
136
197
  ],
137
-
138
- { include: '@whitespace' },
139
-
140
- [/[{}()\[\]]/, '@brackets'],
198
+ // Whitespace
199
+ { include: "@whitespace" },
200
+ // Delimiters and operators
201
+ [/[{}()\[\]]/, "@brackets"],
141
202
  [
142
203
  /@symbols/,
143
204
  {
144
205
  cases: {
145
- '@operators': 'operator',
146
- '@default': '',
147
- },
148
- },
206
+ "@operators": "operator",
207
+ "@default": ""
208
+ }
209
+ }
149
210
  ],
150
-
151
- [/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
152
- [/0[xX][0-9a-fA-F]+/, 'number.hex'],
153
- [/\d+/, 'number'],
154
-
155
- [/[;,.]/, 'delimiter'],
156
-
157
- [/'/, { token: 'string.quote', bracket: '@open', next: '@stringSingle' }],
158
- [/"/, { token: 'string.quote', bracket: '@open', next: '@stringDouble' }],
211
+ // Numbers
212
+ [/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
213
+ [/0[xX][0-9a-fA-F]+/, "number.hex"],
214
+ [/\d+/, "number"],
215
+ // Delimiter: after number because of .\d floats
216
+ [/[;,.]/, "delimiter"],
217
+ // Strings
218
+ [/'/, { token: "string.quote", bracket: "@open", next: "@stringSingle" }],
219
+ [/"/, { token: "string.quote", bracket: "@open", next: "@stringDouble" }],
159
220
  [
160
221
  /`/,
161
- { token: 'string.quote', bracket: '@open', next: '@stringBacktick' },
162
- ],
222
+ {
223
+ token: "string.quote",
224
+ bracket: "@open",
225
+ next: "@stringBacktick"
226
+ }
227
+ ]
163
228
  ],
164
-
165
229
  stringSingle: [
166
- [/[^\\']+/, 'string'],
167
- [/@escapes/, 'string.escape'],
168
- [/\\./, 'string.escape.invalid'],
169
- [/'/, { token: 'string.quote', bracket: '@close', next: '@pop' }],
230
+ [/[^\\']+/, "string"],
231
+ [/@escapes/, "string.escape"],
232
+ [/\\./, "string.escape.invalid"],
233
+ [/'/, { token: "string.quote", bracket: "@close", next: "@pop" }]
170
234
  ],
171
-
172
235
  stringDouble: [
173
- [/[^\\"]+/, 'string'],
174
- [/@escapes/, 'string.escape'],
175
- [/\\./, 'string.escape.invalid'],
176
- [/"/, { token: 'string.quote', bracket: '@close', next: '@pop' }],
236
+ [/[^\\"]+/, "string"],
237
+ [/@escapes/, "string.escape"],
238
+ [/\\./, "string.escape.invalid"],
239
+ [/"/, { token: "string.quote", bracket: "@close", next: "@pop" }]
177
240
  ],
178
-
179
241
  stringBacktick: [
180
- [/[^\\`$]+/, 'string'],
181
- [/@escapes/, 'string.escape'],
182
- [/\\./, 'string.escape.invalid'],
242
+ [/[^\\`$]+/, "string"],
243
+ [/@escapes/, "string.escape"],
244
+ [/\\./, "string.escape.invalid"],
183
245
  [
184
246
  /\$\{/,
185
- { token: 'delimiter.bracket', next: '@stringTemplateExpression' },
247
+ {
248
+ token: "delimiter.bracket",
249
+ next: "@stringTemplateExpression"
250
+ }
186
251
  ],
187
- [/`/, { token: 'string.quote', bracket: '@close', next: '@pop' }],
252
+ [/`/, { token: "string.quote", bracket: "@close", next: "@pop" }]
188
253
  ],
189
-
190
254
  stringTemplateExpression: [
191
- [/[^}]+/, 'identifier'],
192
- [/\}/, { token: 'delimiter.bracket', next: '@pop' }],
255
+ [/[^}]+/, "identifier"],
256
+ [/\}/, { token: "delimiter.bracket", next: "@pop" }]
193
257
  ],
194
-
195
258
  whitespace: [
196
- [/[ \t\r\n]+/, 'white'],
197
- [/\/\*\*(?!\/)/, 'comment.doc', '@docComment'],
198
- [/\/\*/, 'comment', '@comment'],
199
- [/\/\/.*$/, 'comment'],
259
+ [/[ \t\r\n]+/, "white"],
260
+ [/\/\*\*(?!\/)/, "comment.doc", "@docComment"],
261
+ [/\/\*/, "comment", "@comment"],
262
+ [/\/\/.*$/, "comment"]
200
263
  ],
201
-
202
264
  comment: [
203
- [/[^\/*]+/, 'comment'],
204
- [/\*\//, 'comment', '@pop'],
205
- [/[\/*]/, 'comment'],
265
+ [/[^\/*]+/, "comment"],
266
+ [/\*\//, "comment", "@pop"],
267
+ [/[\/*]/, "comment"]
206
268
  ],
207
-
208
269
  docComment: [
209
- [/@\w+/, 'comment.doc.tag'],
210
- [/[^\/*]+/, 'comment.doc'],
211
- [/\*\//, 'comment.doc', '@pop'],
212
- [/[\/*]/, 'comment.doc'],
213
- ],
214
- },
215
- }
216
-
217
- /**
218
- * Register AsyncJS language with Monaco editor
219
- * @param {typeof import('monaco-editor')} monaco
220
- */
221
- function registerAjsLanguage(monaco) {
222
- monaco.languages.register({ id: ajsLanguageId })
223
- monaco.languages.setLanguageConfiguration(
224
- ajsLanguageId,
225
- ajsLanguageConfiguration
226
- )
227
- monaco.languages.setMonarchTokensProvider(ajsLanguageId, ajsMonarchLanguage)
228
- }
229
-
230
- // Export for different module systems
231
- if (typeof module !== 'undefined' && module.exports) {
232
- module.exports = {
233
- languageId: ajsLanguageId,
234
- languageConfiguration: ajsLanguageConfiguration,
235
- monarchLanguage: ajsMonarchLanguage,
236
- registerAjsLanguage,
270
+ [/@\w+/, "comment.doc.tag"],
271
+ [/[^\/*]+/, "comment.doc"],
272
+ [/\*\//, "comment.doc", "@pop"],
273
+ [/[\/*]/, "comment.doc"]
274
+ ]
237
275
  }
276
+ };
277
+ function registerAjsLanguage(monaco) {
278
+ monaco.languages.register({ id: languageId });
279
+ monaco.languages.setLanguageConfiguration(languageId, languageConfiguration);
280
+ monaco.languages.setMonarchTokensProvider(languageId, monarchLanguage);
238
281
  }
239
-
240
- if (typeof window !== 'undefined') {
241
- window.registerAjsLanguage = registerAjsLanguage
242
- window.ajsMonarchLanguage = ajsMonarchLanguage
243
- }
282
+ export {
283
+ languageConfiguration,
284
+ languageId,
285
+ monarchLanguage,
286
+ registerAjsLanguage
287
+ };
package/llms.txt CHANGED
@@ -50,6 +50,10 @@ This file is a navigation index for AI agents. It does not contain the docs them
50
50
  - `tjs-lang/eval` → `src/lang/eval.ts` — `Eval`, `SafeFunction`.
51
51
  - `tjs-lang/batteries` → `src/batteries/index.ts` — LM Studio integration (lazy, local-only).
52
52
  - `tjs-lang/linalg` → `src/linalg/index.tjs` — SIMD linear-algebra kernels (`dot`, `norm_sq`, `dot_at`, `norm_sq_at`).
53
+ - `tjs-lang/css` → `src/css/index.ts` — CSS validators built from verified-safe predicates (`isColor`, `isColorValue`, `suggestColor`, `verifyCss`). Phase 1 = colors; the predicate-types thesis made real.
54
+ - `tjs-lang/schema` → `src/schema/index.ts` — tosijs-schema pre-wired with `$predicate` support (auto-registers the predicate engine on import). Drop-in for `tosijs-schema`; needs `tosijs-schema@^1.4.0`.
55
+ - `tjs-lang/runtime` → `src/lang/runtime.ts` — the TJS runtime (`createRuntime`, `installRuntime`, `Eq`/`NotEq`/`Is`/`IsNot`/`TypeOf`, `checkType`, `isMonadicError`) for emitted `.tjs` code + downstream integrations.
56
+ - `tjs-lang/bun-plugin` → `src/bun-plugin/tjs-plugin.ts` — Bun `onLoad` plugin for native `.tjs` imports (bun-only; `preload` it in bunfig.toml).
53
57
 
54
58
  ## Source map (for code-reading agents)
55
59
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tjs-lang",
3
- "version": "0.8.6",
3
+ "version": "0.9.0",
4
4
  "description": "Type-safe JavaScript dialect with runtime validation, sandboxed VM execution, and AI agent orchestration. Transpiles TypeScript to validated JS with fuel-metered execution for untrusted code.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -44,6 +44,15 @@
44
44
  ],
45
45
  "batteries": [
46
46
  "./dist/src/batteries/index.d.ts"
47
+ ],
48
+ "css": [
49
+ "./dist/src/css/index.d.ts"
50
+ ],
51
+ "schema": [
52
+ "./dist/src/schema/index.d.ts"
53
+ ],
54
+ "runtime": [
55
+ "./dist/src/lang/runtime.d.ts"
47
56
  ]
48
57
  }
49
58
  },
@@ -90,6 +99,24 @@
90
99
  "bun": "./src/linalg/index.tjs",
91
100
  "default": "./dist/tjs-linalg.js"
92
101
  },
102
+ "./css": {
103
+ "bun": "./src/css/index.ts",
104
+ "types": "./dist/src/css/index.d.ts",
105
+ "default": "./dist/tjs-css.js"
106
+ },
107
+ "./schema": {
108
+ "bun": "./src/schema/index.ts",
109
+ "types": "./dist/src/schema/index.d.ts",
110
+ "default": "./dist/tjs-schema.js"
111
+ },
112
+ "./runtime": {
113
+ "bun": "./src/lang/runtime.ts",
114
+ "types": "./dist/src/lang/runtime.d.ts",
115
+ "default": "./dist/tjs-runtime.js"
116
+ },
117
+ "./bun-plugin": {
118
+ "bun": "./src/bun-plugin/tjs-plugin.ts"
119
+ },
93
120
  "./src": "./src/index.ts",
94
121
  "./editors/monaco": "./editors/monaco/ajs-monarch.js",
95
122
  "./editors/codemirror": "./editors/codemirror/ajs-language.js",
@@ -116,7 +143,10 @@
116
143
  "CLAUDE.md",
117
144
  "llms.txt"
118
145
  ],
119
- "sideEffects": false,
146
+ "sideEffects": [
147
+ "./src/schema/index.ts",
148
+ "./dist/tjs-schema.js"
149
+ ],
120
150
  "repository": {
121
151
  "type": "git",
122
152
  "url": "https://github.com/tonioloewald/tjs-lang.git"
@@ -155,10 +185,11 @@
155
185
  "format": "bun eslint src --fix && bun prettier --write .",
156
186
  "lint": "eslint src",
157
187
  "build:grammars": "bun editors/build-grammars.ts",
188
+ "build:editors": "bun scripts/build-editors.ts",
158
189
  "test:fast": "SKIP_LLM_TESTS=1 SKIP_BENCHMARKS=1 bun test",
159
190
  "test:llm": "bun test src/batteries/models.integration.test.ts",
160
191
  "bench": "bun bin/benchmarks.ts",
161
- "make": "rm -rf dist && bun format && bun run build:grammars && tsc -p tsconfig.build.json && bun scripts/build.ts",
192
+ "make": "rm -rf dist && bun format && bun run build:grammars && bun run build:editors && tsc -p tsconfig.build.json && bun scripts/build.ts",
162
193
  "build:bundles": "bun scripts/build.ts",
163
194
  "typecheck": "tsc --noEmit",
164
195
  "latest": "rm -rf node_modules && bun install",
@@ -177,6 +208,6 @@
177
208
  "acorn": "^8.15.0",
178
209
  "acorn-loose": "^8.5.2",
179
210
  "acorn-walk": "^8.3.4",
180
- "tosijs-schema": "^1.3.0"
211
+ "tosijs-schema": "^1.4.0"
181
212
  }
182
213
  }