@takazudo/mdx-formatter 1.0.0 → 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 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 / WebView
61
+ ### Browser (WASM)
62
+
63
+ ```bash
64
+ npm install @takazudo/mdx-formatter-wasm
65
+ ```
62
66
 
63
67
  ```javascript
64
- import { format } from '@takazudo/mdx-formatter/browser';
68
+ import init, { format_with_defaults } from '@takazudo/mdx-formatter-wasm';
65
69
 
66
- const formatted = await format('# Hello\nWorld');
70
+ await init();
71
+ const formatted = format_with_defaults('# Hello\nWorld');
67
72
  ```
68
73
 
69
- The browser export avoids Node.js `fs`/`path` dependencies. See [Browser Usage](https://takazudomodular.com/pj/mdx-formatter/docs/overview/browser-usage) for details.
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
- * Note: In browser environments, use the WASM module directly instead.
5
- * This export is kept for API compatibility but requires the napi native
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
- * For true browser usage, see the WASM package at
9
- * `crates/mdx-formatter-wasm/` or the doc site playground.
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 { format, detectMdx } from './index.js';
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
- * Note: In browser environments, use the WASM module directly instead.
5
- * This export is kept for API compatibility but requires the napi native
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
- * For true browser usage, see the WASM package at
9
- * `crates/mdx-formatter-wasm/` or the doc site playground.
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 { format, detectMdx } from './index.js';
12
+ export { detectMdx } from './detect-mdx.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Markdown Formatter Settings - 7 Core Rules
2
+ * Markdown Formatter Settings - 10 Rules
3
3
  * Each option can be toggled on/off independently
4
4
  */
5
5
  import type { FormatterSettings } from './types.js';
package/dist/settings.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Markdown Formatter Settings - 7 Core Rules
2
+ * Markdown Formatter Settings - 10 Rules
3
3
  * Each option can be toggled on/off independently
4
4
  */
5
5
  export const formatterSettings = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takazudo/mdx-formatter",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "AST-based markdown and MDX formatter with Japanese text support",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -88,6 +88,12 @@
88
88
  "typescript-eslint": "^8.54.0",
89
89
  "vitest": "^4.0.17"
90
90
  },
91
+ "optionalDependencies": {
92
+ "@takazudo/mdx-formatter-darwin-arm64": "1.0.0",
93
+ "@takazudo/mdx-formatter-darwin-x64": "1.0.0",
94
+ "@takazudo/mdx-formatter-linux-x64-gnu": "1.0.0",
95
+ "@takazudo/mdx-formatter-win32-x64-msvc": "1.0.0"
96
+ },
91
97
  "engines": {
92
98
  "node": ">=18.0.0"
93
99
  },