@takazudo/mdx-formatter 1.0.1 → 1.0.2
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 +9 -4
- package/dist/browser.d.ts +7 -6
- package/dist/browser.js +7 -6
- package/dist/settings.d.ts +1 -1
- package/dist/settings.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,15 +58,20 @@ const formatted = await format('# Hello\nWorld');
|
|
|
58
58
|
console.log(formatted); // '# Hello\n\nWorld'
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
### Browser
|
|
61
|
+
### Browser (WASM)
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm install @takazudo/mdx-formatter-wasm
|
|
65
|
+
```
|
|
62
66
|
|
|
63
67
|
```javascript
|
|
64
|
-
import {
|
|
68
|
+
import init, { format_with_defaults } from '@takazudo/mdx-formatter-wasm';
|
|
65
69
|
|
|
66
|
-
|
|
70
|
+
await init();
|
|
71
|
+
const formatted = format_with_defaults('# Hello\nWorld');
|
|
67
72
|
```
|
|
68
73
|
|
|
69
|
-
|
|
74
|
+
See [Browser Usage](https://takazudomodular.com/pj/mdx-formatter/docs/overview/browser-usage) for details.
|
|
70
75
|
|
|
71
76
|
## Documentation
|
|
72
77
|
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Browser-safe entry point for mdx-formatter.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* module to be available (Node.js only).
|
|
4
|
+
* This export provides only browser-safe utilities (no Node.js fs/path deps).
|
|
5
|
+
* For formatting in browser environments, use the WASM package instead:
|
|
7
6
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* npm install @takazudo/mdx-formatter-wasm
|
|
8
|
+
*
|
|
9
|
+
* The WASM package provides format() and format_with_defaults() functions
|
|
10
|
+
* that work in any browser environment.
|
|
10
11
|
*/
|
|
11
|
-
export {
|
|
12
|
+
export { detectMdx } from './detect-mdx.js';
|
|
12
13
|
export type { FormatterSettings, DeepPartial } from './types.js';
|
package/dist/browser.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Browser-safe entry point for mdx-formatter.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* module to be available (Node.js only).
|
|
4
|
+
* This export provides only browser-safe utilities (no Node.js fs/path deps).
|
|
5
|
+
* For formatting in browser environments, use the WASM package instead:
|
|
7
6
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* npm install @takazudo/mdx-formatter-wasm
|
|
8
|
+
*
|
|
9
|
+
* The WASM package provides format() and format_with_defaults() functions
|
|
10
|
+
* that work in any browser environment.
|
|
10
11
|
*/
|
|
11
|
-
export {
|
|
12
|
+
export { detectMdx } from './detect-mdx.js';
|
package/dist/settings.d.ts
CHANGED
package/dist/settings.js
CHANGED