@arborium/arborium 1.0.8 → 1.2.3

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/dist/loader.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Architecture:
5
5
  * 1. Grammar registry is bundled at build time (no network request needed in production)
6
6
  * - Can be overridden via pluginsUrl config for local development
7
- * 2. Load grammar WIT components on demand from @arborium/<lang> packages
7
+ * 2. Load grammar wasm-bindgen modules on demand from @arborium/<lang> packages
8
8
  * 3. Parse and highlight using the grammar's tree-sitter parser
9
9
  */
10
10
  import type { ArboriumConfig, Grammar, Span } from "./types.js";
package/package.json CHANGED
@@ -71,13 +71,13 @@
71
71
  "repository": {
72
72
  "directory": "packages/arborium",
73
73
  "type": "git",
74
- "url": "git+https://github.com/bearcove/arborium.git"
74
+ "url": "https://github.com/bearcove/arborium"
75
75
  },
76
76
  "scripts": {
77
77
  "build": "vite build && vite build --config vite.config.iife.ts && tsc --emitDeclarationOnly && npm run copy:host",
78
78
  "build:esm": "vite build",
79
79
  "build:iife": "vite build --config vite.config.iife.ts",
80
- "copy:host": "cp ../../demo/pkg/arborium_host.js ../../demo/pkg/arborium_host_bg.wasm dist/",
80
+ "copy:host": "cp ../../component-demo/host/arborium_host.js ../../component-demo/host/arborium_host*.wasm dist/",
81
81
  "dev": "vite",
82
82
  "gen:manifest": "cd ../.. && cargo xtask gen-manifest",
83
83
  "prepublishOnly": "npm run gen:manifest && npm run build && test -f dist/arborium.iife.js || (echo 'ERROR: dist/arborium.iife.js missing!' && exit 1)",
@@ -86,5 +86,5 @@
86
86
  },
87
87
  "type": "module",
88
88
  "types": "./dist/arborium.d.ts",
89
- "version": "1.0.8"
89
+ "version": "1.2.3"
90
90
  }
Binary file
@@ -1,130 +0,0 @@
1
- /**
2
- * Minimal WASI shims for browser environment.
3
- * These provide stub implementations for WASI interfaces that
4
- * the grammar plugins require but don't actually use.
5
- */
6
- declare class WasiError extends Error {
7
- constructor(message: string);
8
- }
9
- declare class OutputStream {
10
- write(_contents: Uint8Array): bigint;
11
- blockingWriteAndFlush(_contents: Uint8Array): void;
12
- blockingFlush(): void;
13
- checkWrite(): bigint;
14
- subscribe(): void;
15
- }
16
- declare class InputStream {
17
- read(_len: bigint): Uint8Array;
18
- blockingRead(_len: bigint): Uint8Array;
19
- subscribe(): void;
20
- }
21
- export declare function createWasiImports(): {
22
- 'wasi:cli/environment': {
23
- getEnvironment: () => Array<[string, string]>;
24
- getArguments: () => string[];
25
- };
26
- 'wasi:cli/exit': {
27
- exit: (status: {
28
- tag: string;
29
- val?: number;
30
- }) => void;
31
- };
32
- 'wasi:cli/stdin': {
33
- getStdin: () => InputStream;
34
- };
35
- 'wasi:cli/stdout': {
36
- getStdout: () => OutputStream;
37
- };
38
- 'wasi:cli/stderr': {
39
- getStderr: () => OutputStream;
40
- };
41
- 'wasi:clocks/wall-clock': {
42
- now: () => {
43
- seconds: bigint;
44
- nanoseconds: number;
45
- };
46
- resolution: () => {
47
- seconds: bigint;
48
- nanoseconds: number;
49
- };
50
- };
51
- 'wasi:filesystem/types': {
52
- Descriptor: {
53
- new (): {};
54
- };
55
- DirectoryEntryStream: {
56
- new (): {};
57
- };
58
- filesystemErrorCode: () => null;
59
- };
60
- 'wasi:filesystem/preopens': {
61
- getDirectories: () => Array<[unknown, string]>;
62
- };
63
- 'wasi:io/error': {
64
- Error: typeof WasiError;
65
- };
66
- 'wasi:io/streams': {
67
- InputStream: typeof InputStream;
68
- OutputStream: typeof OutputStream;
69
- };
70
- 'wasi:random/random': {
71
- getRandomBytes: (len: bigint) => Uint8Array;
72
- getRandomU64: () => bigint;
73
- };
74
- 'wasi:cli/environment@0.2.3': {
75
- getEnvironment: () => Array<[string, string]>;
76
- getArguments: () => string[];
77
- };
78
- 'wasi:cli/exit@0.2.3': {
79
- exit: (status: {
80
- tag: string;
81
- val?: number;
82
- }) => void;
83
- };
84
- 'wasi:cli/stdin@0.2.3': {
85
- getStdin: () => InputStream;
86
- };
87
- 'wasi:cli/stdout@0.2.3': {
88
- getStdout: () => OutputStream;
89
- };
90
- 'wasi:cli/stderr@0.2.3': {
91
- getStderr: () => OutputStream;
92
- };
93
- 'wasi:clocks/wall-clock@0.2.3': {
94
- now: () => {
95
- seconds: bigint;
96
- nanoseconds: number;
97
- };
98
- resolution: () => {
99
- seconds: bigint;
100
- nanoseconds: number;
101
- };
102
- };
103
- 'wasi:filesystem/types@0.2.3': {
104
- Descriptor: {
105
- new (): {};
106
- };
107
- DirectoryEntryStream: {
108
- new (): {};
109
- };
110
- filesystemErrorCode: () => null;
111
- };
112
- 'wasi:filesystem/preopens@0.2.3': {
113
- getDirectories: () => Array<[unknown, string]>;
114
- };
115
- 'wasi:io/error@0.2.3': {
116
- Error: typeof WasiError;
117
- };
118
- 'wasi:io/streams@0.2.3': {
119
- InputStream: typeof InputStream;
120
- OutputStream: typeof OutputStream;
121
- };
122
- 'wasi:random/random@0.2.3': {
123
- getRandomBytes: (len: bigint) => Uint8Array;
124
- getRandomU64: () => bigint;
125
- };
126
- };
127
- export declare const grammarTypesImport: {
128
- 'arborium:grammar/types@0.1.0': {};
129
- };
130
- export {};