@musaaj/simpleeditor 0.0.1 → 0.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
|
@@ -8,14 +8,14 @@ SimpleEditor ships two web components powered by Quill:
|
|
|
8
8
|
## Install
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
yarn add simpleeditor
|
|
11
|
+
yarn add @musaaj/simpleeditor
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
## Usage
|
|
15
15
|
|
|
16
16
|
```ts
|
|
17
|
-
import "simpleeditor";
|
|
18
|
-
import "simpleeditor/style.css";
|
|
17
|
+
import "@musaaj/simpleeditor";
|
|
18
|
+
import "@musaaj/simpleeditor/style.css";
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
```html
|
|
@@ -62,8 +62,8 @@ Use the wrapper components in `examples/react/quill-components.tsx` to avoid han
|
|
|
62
62
|
Example:
|
|
63
63
|
|
|
64
64
|
```tsx
|
|
65
|
-
import "simpleeditor";
|
|
66
|
-
import "simpleeditor/style.css";
|
|
65
|
+
import "@musaaj/simpleeditor";
|
|
66
|
+
import "@musaaj/simpleeditor/style.css";
|
|
67
67
|
import { QuillTextareaReact, QuillDivReact } from "./quill-components";
|
|
68
68
|
import { useState } from "react";
|
|
69
69
|
|
|
@@ -121,21 +121,29 @@ System dark mode:
|
|
|
121
121
|
## Build and Publish
|
|
122
122
|
|
|
123
123
|
```bash
|
|
124
|
-
|
|
124
|
+
npm run build
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
Build output:
|
|
128
128
|
|
|
129
129
|
- `dist/simpleeditor.js`
|
|
130
|
-
- `dist/
|
|
131
|
-
- `dist/types
|
|
130
|
+
- `dist/simpleeditor.css`
|
|
131
|
+
- `dist/types/main.d.ts`
|
|
132
132
|
|
|
133
133
|
`npm publish` will run build automatically via `prepublishOnly`.
|
|
134
134
|
|
|
135
135
|
## Development
|
|
136
136
|
|
|
137
137
|
```bash
|
|
138
|
-
|
|
138
|
+
npm run dev
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Test and Typecheck
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
npm run test
|
|
145
|
+
npm run test:run
|
|
146
|
+
npm run typecheck
|
|
139
147
|
```
|
|
140
148
|
|
|
141
149
|
## Docs
|
package/dist/simpleeditor.js
CHANGED
|
@@ -45688,7 +45688,6 @@ core_default.register({
|
|
|
45688
45688
|
"ui/tooltip": tooltip_default
|
|
45689
45689
|
}, !0);
|
|
45690
45690
|
var quill_default = core_default;
|
|
45691
|
-
customElements.get("math-field") || customElements.define("math-field", _t);
|
|
45692
45691
|
function createMathSpanElement(e) {
|
|
45693
45692
|
let t = document.createElement(MATH_SPAN_TAG);
|
|
45694
45693
|
return t.setAttribute(DATA_LATEX, e), t.textContent = e, t;
|
|
@@ -46958,7 +46957,7 @@ var QuillTextarea = class extends HTMLElement {
|
|
|
46958
46957
|
}
|
|
46959
46958
|
bindMathEditor() {
|
|
46960
46959
|
if (!this.mathFieldHost) return;
|
|
46961
|
-
let e =
|
|
46960
|
+
let e = document.createElement("math-field");
|
|
46962
46961
|
e.setAttribute("virtual-keyboard-mode", "onfocus"), this.mathFieldHost.appendChild(e), this.mathField = e, this.mathSaveBtn?.addEventListener("click", () => this.saveMathEditor()), this.mathCancelBtn?.addEventListener("click", () => this.closeMathEditor(!0)), this.mathModal?.addEventListener("click", (e) => {
|
|
46963
46962
|
e.target === this.mathModal && this.closeMathEditor(!0);
|
|
46964
46963
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "mathlive";
|
|
2
|
-
import { MathfieldElement } from "mathlive";
|
|
2
|
+
import type { MathfieldElement } from "mathlive";
|
|
3
3
|
export declare function createMathSpanElement(value: string): HTMLElement;
|
|
4
4
|
export declare function createMathFieldElement(value: string, onValueChange: (next: string) => void): MathfieldElement;
|
|
5
5
|
//# sourceMappingURL=field.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../../src/builtins/blots/math/field.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,CAAC;AAClB,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../../src/builtins/blots/math/field.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGjD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAKhE;AAED,wBAAgB,sBAAsB,CAClC,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GACtC,gBAAgB,CAoBlB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@musaaj/simpleeditor",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/simpleeditor.js",
|
|
7
7
|
"module": "./dist/simpleeditor.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"types": "./dist/types/main.d.ts",
|
|
12
12
|
"import": "./dist/simpleeditor.js"
|
|
13
13
|
},
|
|
14
|
-
"./style.css": "./dist/
|
|
14
|
+
"./style.css": "./dist/simpleeditor.css"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"dist",
|