jww-parser-mbt 2025.12.5 → 2025.12.7
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/index.cjs +59 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +59 -53
- package/dist/index.mjs.map +1 -1
- package/dist/moonbit.d.ts +57 -0
- package/package.json +2 -2
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A non-public unique symbol used to mark the brand of a type.
|
|
3
|
+
* And avoid user to construct values of the type.
|
|
4
|
+
*/
|
|
5
|
+
export const __brand: unique symbol;
|
|
6
|
+
|
|
7
|
+
export type Unit = undefined;
|
|
8
|
+
export type Bool = boolean;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A signed integer in 32-bit two's complement format.
|
|
12
|
+
*/
|
|
13
|
+
export type Int = number;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* An unsigned integer in 32-bit two's complement format.
|
|
17
|
+
*/
|
|
18
|
+
export type UInt = number;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* A character in the range 0-0x10FFFF.
|
|
22
|
+
*/
|
|
23
|
+
export type Char = number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* A byte in the range 0-255.
|
|
27
|
+
*/
|
|
28
|
+
export type Byte = number;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Single-precision floating point number.
|
|
32
|
+
*/
|
|
33
|
+
export type Float = number;
|
|
34
|
+
|
|
35
|
+
export type Double = number;
|
|
36
|
+
|
|
37
|
+
export type Int64 = { [__brand]: 568910272 };
|
|
38
|
+
|
|
39
|
+
export type UInt64 = { [__brand]: 689305396 };
|
|
40
|
+
|
|
41
|
+
export type String = string;
|
|
42
|
+
|
|
43
|
+
export type Bytes = Uint8Array;
|
|
44
|
+
|
|
45
|
+
export type FixedArray<T> = T[];
|
|
46
|
+
|
|
47
|
+
export type UnboxedOption<T> =
|
|
48
|
+
| /* Some */ T
|
|
49
|
+
| /* None */ undefined;
|
|
50
|
+
|
|
51
|
+
export type UnboxedOptionAsInt<T> =
|
|
52
|
+
| /* Some */ T
|
|
53
|
+
| /* None */ -1;
|
|
54
|
+
|
|
55
|
+
export type Result<T, E> =
|
|
56
|
+
| /* Ok */ { $tag: 1, _0: T }
|
|
57
|
+
| /* Err */ { $tag: 0, _0: E };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jww-parser-mbt",
|
|
3
|
-
"version": "2025.12.
|
|
3
|
+
"version": "2025.12.7",
|
|
4
4
|
"description": "JWW file parser and DXF converter powered by MoonBit",
|
|
5
5
|
"author": "f12o",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"build:moon": "moon build --target js",
|
|
38
38
|
"build:patch": "node scripts/patch-js.js",
|
|
39
39
|
"build:bundle": "rolldown -c rolldown.config.mjs",
|
|
40
|
-
"build:types": "mkdir -p dist && cp target/js/release/build/jww_parser.d.ts dist/index.d.ts",
|
|
40
|
+
"build:types": "mkdir -p dist && cp target/js/release/build/jww_parser.d.ts dist/index.d.ts && cp target/js/release/build/moonbit.d.ts dist/moonbit.d.ts",
|
|
41
41
|
"build": "pnpm run clean && pnpm run build:moon && pnpm run build:patch && pnpm run build:bundle && pnpm run build:types",
|
|
42
42
|
"prepublishOnly": "pnpm run build",
|
|
43
43
|
"set-version": "node scripts/sync-version.js && git add package.json moon.mod.json examples/package.json",
|