autumnnote-react 1.13.0 → 1.15.0
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 +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +15 -13
- package/package.json +11 -8
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/autumnnote-react)
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
|
|
7
|
-
Official **React wrapper** for [
|
|
7
|
+
Official **React wrapper** for [Autumn Note](https://autumn.konexforge.com/) — the zero-dependency WYSIWYG rich-text editor built with vanilla JavaScript.
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require("react"),l=require("autumnnote");l=s(l,1);let u=require("react/jsx-runtime");var d=typeof window>`u`?c.useEffect:c.useLayoutEffect,f=(0,c.forwardRef)(function({options:e={},className:t,style:n},r){let i=(0,c.useRef)(null),a=(0,c.useRef)(null);return d(()=>(a.current=l.default.create(i.current,e),()=>{a.current?.destroy(),a.current=null}),[]),(0,c.useImperativeHandle)(r,()=>a.current,[]),(0,u.jsx)(`div`,{ref:i,className:t,style:n})});exports.AutumnNoteEditor=f,exports.default=f;
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { forwardRef as e, useEffect as t, useImperativeHandle as n, useLayoutEffect as r, useRef as i } from "react";
|
|
2
|
+
import a from "autumnnote";
|
|
3
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
4
|
+
//#region src/index.jsx
|
|
5
|
+
var s = typeof window > "u" ? t : r, c = e(function({ options: e = {}, className: t, style: r }, c) {
|
|
6
|
+
let l = i(null), u = i(null);
|
|
7
|
+
return s(() => (u.current = a.create(l.current, e), () => {
|
|
8
|
+
u.current?.destroy(), u.current = null;
|
|
9
|
+
}), []), n(c, () => u.current, []), /* @__PURE__ */ o("div", {
|
|
10
|
+
ref: l,
|
|
11
|
+
className: t,
|
|
12
|
+
style: r
|
|
13
|
+
});
|
|
10
14
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
E as default
|
|
14
|
-
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { c as AutumnNoteEditor, c as default };
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autumnnote-react",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Official React wrapper for
|
|
3
|
+
"version": "1.15.0",
|
|
4
|
+
"description": "Official React wrapper for Autumn Note — zero-dependency WYSIWYG editor. Mount the editor with a single component and access the full Context API via ref.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"module": "dist/index.js",
|
|
8
8
|
"types": "index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
+
"types": "./index.d.ts",
|
|
11
12
|
"import": "./dist/index.js",
|
|
12
|
-
"require": "./dist/index.cjs"
|
|
13
|
-
"types": "./index.d.ts"
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
@@ -57,13 +57,16 @@
|
|
|
57
57
|
"react-dom": ">=16.8.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@vitejs/plugin-react": "^
|
|
60
|
+
"@vitejs/plugin-react": "^6.0.3",
|
|
61
|
+
"@types/react": "^18.3.0",
|
|
61
62
|
"react": "^18.0.0",
|
|
62
63
|
"react-dom": "^18.0.0",
|
|
63
|
-
"vite": "^
|
|
64
|
-
"autumnnote": "1.
|
|
64
|
+
"vite": "^8.1.4",
|
|
65
|
+
"autumnnote": "1.15.0"
|
|
65
66
|
},
|
|
66
67
|
"scripts": {
|
|
67
|
-
"build": "vite build"
|
|
68
|
+
"build": "vite build",
|
|
69
|
+
"test": "vitest run",
|
|
70
|
+
"typecheck": "tsc --project tsconfig.test.json"
|
|
68
71
|
}
|
|
69
72
|
}
|