mxcad 1.0.40 → 1.0.42

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 CHANGED
@@ -1,60 +1,8 @@
1
- # vite-vanilla-ts-lib-starter
2
1
 
3
- The starter is built on top of Vite 3.x and prepared for writing libraries in TypeScript. It generates a hybrid package - both support for CommonJS and ESM modules.
4
-
5
- ## Features
6
-
7
- - Hybrid support - CommonJS and ESM modules
8
- - IIFE bundle for direct browser support without bundler
9
- - Typings bundle
10
- - ESLint - scripts linter
11
- - Stylelint - styles linter
12
- - Prettier - formatter
13
- - Jest - test framework
14
- - Husky + lint-staged - pre-commit git hook set up for formatting
15
-
16
- ## GitHub Template
17
-
18
- This is a template repo. Click the green [Use this template](https://github.com/kbysiec/vite-vanilla-ts-lib-starter/generate) button to get started.
19
-
20
- ## Clone to local
21
-
22
- If you prefer to do it manually with the cleaner git history
2
+ # mxcad 文档
23
3
 
24
4
  ```bash
25
- git clone https://github.com/kbysiec/vite-vanilla-ts-lib-starter.git
26
- cd vite-vanilla-ts-lib-starter
27
- npm i
5
+ npm install mxcad
28
6
  ```
29
7
 
30
- ## Checklist
31
-
32
- When you use this template, update the following:
33
-
34
- - Remove `.git` directory and run `git init` to clean up the history
35
- - Change the name in `package.json` - it will be the name of the IIFE bundle global variable and bundle files name (`.cjs`, `.mjs`, `.iife.js`, `d.ts`)
36
- - Change the author name in `LICENSE`
37
- - Clean up the `README` and `CHANGELOG` files
38
-
39
- And, enjoy :)
40
-
41
- ## Usage
42
-
43
- The starter contains the following scripts:
44
-
45
- - `dev` - starts dev server
46
- - `build` - generates the following bundles: CommonJS (`.cjs`) ESM (`.mjs`) and IIFE (`.iife.js`). The name of bundle is automatically taked from `package.json` name property
47
- - `test` - starts jest and runs all tests
48
- - `test:coverage` - starts jest and run all tests with code coverage report
49
- - `lint:scripts` - lint `.ts` files with eslint
50
- - `lint:styles` - lint `.css` and `.scss` files with stylelint
51
- - `format:scripts` - format `.ts`, `.html` and `.json` files with prettier
52
- - `format:styles` - format `.cs` and `.scss` files with stylelint
53
- - `format` - format all with prettier and stylelint
54
- - `prepare` - script for setting up husky pre-commit hook
55
-
56
- ## Acknowledgment
57
-
58
- If you found it useful somehow, I would be grateful if you could leave a star in the project's GitHub repository.
59
-
60
- Thank you.
8
+ * 需要配置和mxdraw使用
Binary file
Binary file
package/dist/mxcad.d.ts CHANGED
@@ -1481,7 +1481,7 @@ export declare function drawArc(): Promise<void>;
1481
1481
  export declare function drawEllipticalArc(): void;
1482
1482
  /** 绘制文字 */
1483
1483
  export declare function mxErase(): Promise<void>;
1484
- declare const getWasmURL: (wasmURL: string, baseURL: string | URL) => string;
1484
+ declare const getWasmURL: (wasmURL: string, baseURL?: string | URL) => string;
1485
1485
  /** wasm importObject 的可配置选项 */
1486
1486
  export interface WasmConfig {
1487
1487
  /** 二进制数据 设置wasmBinary 则 locateFile 不生效**/
@@ -1577,8 +1577,7 @@ export interface MxDraw3d extends WasmConfig {
1577
1577
  open3DFile: (file: File) => void;
1578
1578
  }
1579
1579
  export declare let MxCpp: MxCppType;
1580
- export declare function loadMxCADassembly(call: (MxCpp: MxCppType) => void, locateFile?: (wasmURL: string, baseURL: string | URL) => string, wasmBinary?: ArrayBuffer): Promise<void>;
1580
+ export declare function loadMxCADassembly(call: (MxCpp: MxCppType) => void, locateFile?: (wasmURL: string, baseURL?: string | URL) => string, wasmBinary?: ArrayBuffer): Promise<void>;
1581
1581
  export declare function loadMxCADassembly3d(config: MxDraw3dConfig, call?: (mxDraw3d: MxDraw3d) => void): Promise<MxDraw3d>;
1582
- export declare function loadWasmModule(wasmUrl: string): Promise<unknown>;
1583
1582
 
1584
1583
  export {};