@myedit/vue 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +207 -2
- package/dist/index.d.mts +69 -0
- package/dist/index.mjs +79 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +47 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Yusuke Nakada
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,208 @@
|
|
|
1
|
-
#
|
|
1
|
+
# myedit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A lightweight WYSIWYG Markdown editor library with an Obsidian-like live preview.
|
|
4
|
+
|
|
5
|
+
English | [日本語](REAMDE.ja.md)
|
|
6
|
+
|
|
7
|
+
myedit is a lightweight Markdown editor library featuring an Obsidian-like live preview. Built on CodeMirror 6, it provides a framework-agnostic core along with adapters for React, Preact, Vue, and Svelte.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- UI framework-agnostic
|
|
12
|
+
- Adapters for React / Preact / Vue / Svelte
|
|
13
|
+
- GitHub Flavored Markdown (GFM) support
|
|
14
|
+
- Mermaid and math rendering support
|
|
15
|
+
- Interactive table editor
|
|
16
|
+
- Embeds for major services
|
|
17
|
+
- YouTube / X (Twitter) / Docswell / SlideShare / Speaker Deck / CodePen / CodeSandbox / Figma / Spotify / Vimeo / Loom
|
|
18
|
+
- GitHub repository cards and generic link cards
|
|
19
|
+
- WikiLink syntax and `[[` autocompletion
|
|
20
|
+
- Slash command `/` autocompletion
|
|
21
|
+
|
|
22
|
+
## Packages
|
|
23
|
+
|
|
24
|
+
| Package | npm | Description |
|
|
25
|
+
| :--------------- | :-------------------------------------------------------------------------------------------------- | :--------------------------------- |
|
|
26
|
+
| `@myedit/core` | [](https://www.npmjs.com/package/@myedit/core) | Framework-agnostic core library |
|
|
27
|
+
| `@myedit/react` | [](https://www.npmjs.com/package/@myedit/react) | Components & hooks for React |
|
|
28
|
+
| `@myedit/preact` | [](https://www.npmjs.com/package/@myedit/preact) | Components & hooks for Preact |
|
|
29
|
+
| `@myedit/vue` | [](https://www.npmjs.com/package/@myedit/vue) | Components & composables for Vue 3 |
|
|
30
|
+
| `@myedit/svelte` | [](https://www.npmjs.com/package/@myedit/svelte) | Actions for Svelte |
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm add @myedit/core
|
|
36
|
+
|
|
37
|
+
npm add @myedit/react
|
|
38
|
+
npm add @myedit/preact
|
|
39
|
+
npm add @myedit/vue
|
|
40
|
+
npm add @myedit/svelte
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Quick Start
|
|
44
|
+
|
|
45
|
+
### Vanilla TypeScript
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
import { createMyEdit } from "@myedit/core";
|
|
49
|
+
import "@myedit/core/styles.css";
|
|
50
|
+
|
|
51
|
+
const editor = createMyEdit(document.getElementById("editor")!, {
|
|
52
|
+
value: "# Hello, myedit\n",
|
|
53
|
+
theme: "auto",
|
|
54
|
+
onChange: (markdown) => {
|
|
55
|
+
console.log(markdown);
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// cleanup
|
|
60
|
+
// editor.destroy();
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### React
|
|
64
|
+
|
|
65
|
+
```tsx
|
|
66
|
+
import { MyEditEditor } from "@myedit/react";
|
|
67
|
+
import "@myedit/core/styles.css";
|
|
68
|
+
|
|
69
|
+
export function App() {
|
|
70
|
+
return <MyEditEditor value="# Hello React" theme="light" onChange={(md) => console.log(md)} />;
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Preact
|
|
75
|
+
|
|
76
|
+
```tsx
|
|
77
|
+
import { MyEditEditor } from "@myedit/preact";
|
|
78
|
+
import "@myedit/core/styles.css";
|
|
79
|
+
|
|
80
|
+
export function App() {
|
|
81
|
+
return <MyEditEditor value="# Hello Preact" theme="light" onChange={(md) => console.log(md)} />;
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Vue 3
|
|
86
|
+
|
|
87
|
+
```vue
|
|
88
|
+
<script setup lang="ts">
|
|
89
|
+
import { ref } from "vue";
|
|
90
|
+
import { MyEditEditor } from "@myedit/vue";
|
|
91
|
+
import "@myedit/core/styles.css";
|
|
92
|
+
|
|
93
|
+
const content = ref("# Hello Vue");
|
|
94
|
+
</script>
|
|
95
|
+
|
|
96
|
+
<template>
|
|
97
|
+
<MyEditEditor v-model="content" theme="light" />
|
|
98
|
+
</template>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Svelte
|
|
102
|
+
|
|
103
|
+
```svelte
|
|
104
|
+
<script lang="ts">
|
|
105
|
+
import { myedit } from '@myedit/svelte';
|
|
106
|
+
import '@myedit/core/styles.css';
|
|
107
|
+
|
|
108
|
+
let value = '# Hello Svelte';
|
|
109
|
+
</script>
|
|
110
|
+
|
|
111
|
+
<div use:myedit={{ value, theme: 'light', onChange: (v) => (value = v) }}></div>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## API Reference
|
|
115
|
+
|
|
116
|
+
### `createMyEdit(container, options?)`
|
|
117
|
+
|
|
118
|
+
#### `MyEditOptions`
|
|
119
|
+
|
|
120
|
+
| Option | Type | Default | Description |
|
|
121
|
+
| :--------------- | :------------------------------ | :---------- | :------------------------------------------------ |
|
|
122
|
+
| `value` | `string` | `''` | Markdown text |
|
|
123
|
+
| `theme` | `'light' \| 'dark' \| 'auto'` | `'auto'` | Color theme |
|
|
124
|
+
| `placeholder` | `string` | `undefined` | Placeholder shown when empty |
|
|
125
|
+
| `readOnly` | `boolean` | `false` | Read-only mode |
|
|
126
|
+
| `features` | `MyEditFeatures` | All `true` | Enable/disable syntax, commands, and features |
|
|
127
|
+
| `wikilink` | `WikiLinkOptions` | `undefined` | WikiLink resolution, completion, and click config |
|
|
128
|
+
| `onChange` | `(value: string) => void` | `undefined` | Callback fired when the document changes |
|
|
129
|
+
| `onCursorChange` | `(pos: CursorPosition) => void` | `undefined` | Callback fired when the cursor position changes |
|
|
130
|
+
|
|
131
|
+
#### `MyEditFeatures`
|
|
132
|
+
|
|
133
|
+
```ts
|
|
134
|
+
interface MyEditFeatures {
|
|
135
|
+
mermaid?: boolean;
|
|
136
|
+
math?: boolean;
|
|
137
|
+
table?: boolean;
|
|
138
|
+
embeds?: boolean;
|
|
139
|
+
linkCards?: boolean;
|
|
140
|
+
wikilink?: boolean;
|
|
141
|
+
highlight?: boolean;
|
|
142
|
+
subSup?: boolean;
|
|
143
|
+
slashCommands?: boolean;
|
|
144
|
+
shortcuts?: boolean;
|
|
145
|
+
search?: boolean;
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
#### `WikiLinkOptions`
|
|
150
|
+
|
|
151
|
+
```ts
|
|
152
|
+
interface WikiLinkOptions {
|
|
153
|
+
resolve?: (target: string) => boolean;
|
|
154
|
+
complete?: (query: string) => WikiLinkItem[] | Promise<WikiLinkItem[]>;
|
|
155
|
+
onClick?: (target: string) => void;
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
#### `MyEdit`
|
|
160
|
+
|
|
161
|
+
| Method | Description |
|
|
162
|
+
| :------------------------------------- | :----------------------------------------------------------- |
|
|
163
|
+
| `getValue(): string` | Get the current Markdown text |
|
|
164
|
+
| `setValue(value: string): void` | Set the Markdown text |
|
|
165
|
+
| `setTheme(theme: MyEditTheme): void` | Switch the theme |
|
|
166
|
+
| `setReadOnly(readOnly: boolean): void` | Toggle read-only mode |
|
|
167
|
+
| `getCursorPosition(): CursorPosition` | Get the current cursor position (`line`, `column`, `offset`) |
|
|
168
|
+
| `getSelection(): MyEditSelection` | Get the current selection range (`from`, `to`, `text`) |
|
|
169
|
+
| `insertText(text: string): void` | Insert text at the current cursor position |
|
|
170
|
+
| `focus(): void` | Focus the editor |
|
|
171
|
+
| `destroy(): void` | Destroy the editor and release DOM elements and listeners |
|
|
172
|
+
|
|
173
|
+
## Shortcuts & Slash Commands
|
|
174
|
+
|
|
175
|
+
### Keyboard Shortcuts
|
|
176
|
+
|
|
177
|
+
| Key | Action |
|
|
178
|
+
| :-------------------------------------- | :------------------------ |
|
|
179
|
+
| `Cmd/Ctrl + B` | Bold (`**...**`) |
|
|
180
|
+
| `Cmd/Ctrl + I` | Italic (`*...*`) |
|
|
181
|
+
| `Cmd/Ctrl + E` | Inline code (`` `...` ``) |
|
|
182
|
+
| `Cmd/Ctrl + Shift + S` | Strikethrough (`~~...~~`) |
|
|
183
|
+
| `Cmd/Ctrl + Shift + H` | Highlight (`==...==`) |
|
|
184
|
+
| `Cmd/Ctrl + K` | Link (`[text](url)`) |
|
|
185
|
+
| `Cmd/Ctrl + F` | Search & replace |
|
|
186
|
+
| `Cmd/Ctrl + Z` / `Cmd/Ctrl + Shift + Z` | Undo / Redo |
|
|
187
|
+
|
|
188
|
+
### Slash Commands (`/`)
|
|
189
|
+
|
|
190
|
+
`/h1`–`/h6`, `/bullet`, `/number`, `/task`, `/image`, `/code`, `/mermaid`, `/math`, `/table`, `/quote`, `/note`, `/tip`, `/important`, `/warning`, `/caution`, `/hr`
|
|
191
|
+
|
|
192
|
+
## Theme Customization
|
|
193
|
+
|
|
194
|
+
You can customize colors, fonts, and max width by overriding the CSS custom properties on `.myedit-root`.
|
|
195
|
+
|
|
196
|
+
```css
|
|
197
|
+
.myedit-root {
|
|
198
|
+
--myedit-bg: #ffffff;
|
|
199
|
+
--myedit-fg: #1c1c1e;
|
|
200
|
+
--myedit-accent: #2563eb;
|
|
201
|
+
--myedit-link: #2563eb;
|
|
202
|
+
--myedit-max-width: 780px;
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## License
|
|
207
|
+
|
|
208
|
+
myedit is released under the [MIT License](LICENSE).
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { PropType, Ref, ShallowRef } from "vue";
|
|
2
|
+
import { CursorPosition, MyEdit, MyEditFeatures, MyEditOptions, MyEditTheme, WikiLinkOptions } from "@myedit/core";
|
|
3
|
+
export declare function useMyEdit(containerRef: Ref<HTMLElement | null>, options?: MyEditOptions): ShallowRef<MyEdit | null>;
|
|
4
|
+
export declare const MyEditEditor: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
modelValue: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
theme: {
|
|
10
|
+
type: PropType<MyEditTheme>;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
placeholder: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
default: undefined;
|
|
16
|
+
};
|
|
17
|
+
readOnly: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
features: {
|
|
22
|
+
type: PropType<MyEditFeatures>;
|
|
23
|
+
default: undefined;
|
|
24
|
+
};
|
|
25
|
+
wikilink: {
|
|
26
|
+
type: PropType<WikiLinkOptions>;
|
|
27
|
+
default: undefined;
|
|
28
|
+
};
|
|
29
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
32
|
+
"update:modelValue": (_value: string) => true;
|
|
33
|
+
cursorChange: (_pos: CursorPosition) => true;
|
|
34
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
35
|
+
modelValue: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
theme: {
|
|
40
|
+
type: PropType<MyEditTheme>;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
placeholder: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
default: undefined;
|
|
46
|
+
};
|
|
47
|
+
readOnly: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
features: {
|
|
52
|
+
type: PropType<MyEditFeatures>;
|
|
53
|
+
default: undefined;
|
|
54
|
+
};
|
|
55
|
+
wikilink: {
|
|
56
|
+
type: PropType<WikiLinkOptions>;
|
|
57
|
+
default: undefined;
|
|
58
|
+
};
|
|
59
|
+
}>> & Readonly<{
|
|
60
|
+
"onUpdate:modelValue"?: ((_value: string) => any) | undefined;
|
|
61
|
+
onCursorChange?: ((_pos: CursorPosition) => any) | undefined;
|
|
62
|
+
}>, {
|
|
63
|
+
modelValue: string;
|
|
64
|
+
theme: MyEditTheme;
|
|
65
|
+
placeholder: string;
|
|
66
|
+
readOnly: boolean;
|
|
67
|
+
features: MyEditFeatures;
|
|
68
|
+
wikilink: WikiLinkOptions;
|
|
69
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { defineComponent, h, onBeforeUnmount, onMounted, ref, shallowRef, watch } from "vue";
|
|
2
|
+
import { createMyEdit } from "@myedit/core";
|
|
3
|
+
// src/index.ts
|
|
4
|
+
function useMyEdit(containerRef, options = {}) {
|
|
5
|
+
const editorRef = shallowRef(null);
|
|
6
|
+
onMounted(() => {
|
|
7
|
+
const el = containerRef.value;
|
|
8
|
+
if (!el) return;
|
|
9
|
+
editorRef.value = createMyEdit(el, options);
|
|
10
|
+
});
|
|
11
|
+
onBeforeUnmount(() => {
|
|
12
|
+
editorRef.value?.destroy();
|
|
13
|
+
editorRef.value = null;
|
|
14
|
+
});
|
|
15
|
+
return editorRef;
|
|
16
|
+
}
|
|
17
|
+
const MyEditEditor = defineComponent({
|
|
18
|
+
name: "MyEditEditor",
|
|
19
|
+
props: {
|
|
20
|
+
modelValue: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: ""
|
|
23
|
+
},
|
|
24
|
+
theme: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: "auto"
|
|
27
|
+
},
|
|
28
|
+
placeholder: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: void 0
|
|
31
|
+
},
|
|
32
|
+
readOnly: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false
|
|
35
|
+
},
|
|
36
|
+
features: {
|
|
37
|
+
type: Object,
|
|
38
|
+
default: void 0
|
|
39
|
+
},
|
|
40
|
+
wikilink: {
|
|
41
|
+
type: Object,
|
|
42
|
+
default: void 0
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
emits: {
|
|
46
|
+
"update:modelValue": (_value) => true,
|
|
47
|
+
cursorChange: (_pos) => true
|
|
48
|
+
},
|
|
49
|
+
setup(props, { emit, expose }) {
|
|
50
|
+
const containerRef = ref(null);
|
|
51
|
+
const editorRef = shallowRef(null);
|
|
52
|
+
onMounted(() => {
|
|
53
|
+
const el = containerRef.value;
|
|
54
|
+
if (!el) return;
|
|
55
|
+
editorRef.value = createMyEdit(el, {
|
|
56
|
+
value: props.modelValue,
|
|
57
|
+
theme: props.theme,
|
|
58
|
+
placeholder: props.placeholder,
|
|
59
|
+
readOnly: props.readOnly,
|
|
60
|
+
features: props.features,
|
|
61
|
+
wikilink: props.wikilink,
|
|
62
|
+
onChange: (val) => emit("update:modelValue", val),
|
|
63
|
+
onCursorChange: (pos) => emit("cursorChange", pos)
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
onBeforeUnmount(() => {
|
|
67
|
+
editorRef.value?.destroy();
|
|
68
|
+
editorRef.value = null;
|
|
69
|
+
});
|
|
70
|
+
watch(() => props.modelValue, (val) => editorRef.value?.setValue(val));
|
|
71
|
+
watch(() => props.theme, (t) => editorRef.value?.setTheme(t));
|
|
72
|
+
watch(() => props.readOnly, (ro) => editorRef.value?.setReadOnly(ro));
|
|
73
|
+
expose({ editor: editorRef });
|
|
74
|
+
return () => h("div", { ref: containerRef });
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
export { MyEditEditor, useMyEdit };
|
|
78
|
+
|
|
79
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import {\n defineComponent,\n h,\n onBeforeUnmount,\n onMounted,\n ref,\n shallowRef,\n watch,\n type PropType,\n type Ref,\n type ShallowRef,\n} from \"vue\";\nimport {\n createMyEdit,\n type CursorPosition,\n type MyEdit,\n type MyEditFeatures,\n type MyEditOptions,\n type MyEditTheme,\n type WikiLinkOptions,\n} from \"@myedit/core\";\n\nexport function useMyEdit(\n containerRef: Ref<HTMLElement | null>,\n options: MyEditOptions = {},\n): ShallowRef<MyEdit | null> {\n const editorRef = shallowRef<MyEdit | null>(null);\n\n onMounted(() => {\n const el = containerRef.value;\n if (!el) return;\n editorRef.value = createMyEdit(el, options);\n });\n\n onBeforeUnmount(() => {\n editorRef.value?.destroy();\n editorRef.value = null;\n });\n\n return editorRef;\n}\n\nexport const MyEditEditor = defineComponent({\n name: \"MyEditEditor\",\n props: {\n modelValue: {\n type: String,\n default: \"\",\n },\n theme: {\n type: String as PropType<MyEditTheme>,\n default: \"auto\",\n },\n placeholder: {\n type: String,\n default: undefined,\n },\n readOnly: {\n type: Boolean,\n default: false,\n },\n features: {\n type: Object as PropType<MyEditFeatures>,\n default: undefined,\n },\n wikilink: {\n type: Object as PropType<WikiLinkOptions>,\n default: undefined,\n },\n },\n emits: {\n \"update:modelValue\": (_value: string) => true,\n cursorChange: (_pos: CursorPosition) => true,\n },\n setup(props, { emit, expose }) {\n const containerRef = ref<HTMLElement | null>(null);\n const editorRef = shallowRef<MyEdit | null>(null);\n\n onMounted(() => {\n const el = containerRef.value;\n if (!el) return;\n editorRef.value = createMyEdit(el, {\n value: props.modelValue,\n theme: props.theme,\n placeholder: props.placeholder,\n readOnly: props.readOnly,\n features: props.features,\n wikilink: props.wikilink,\n onChange: (val) => emit(\"update:modelValue\", val),\n onCursorChange: (pos) => emit(\"cursorChange\", pos),\n });\n });\n\n onBeforeUnmount(() => {\n editorRef.value?.destroy();\n editorRef.value = null;\n });\n\n watch(\n () => props.modelValue,\n (val) => editorRef.value?.setValue(val),\n );\n watch(\n () => props.theme,\n (t) => editorRef.value?.setTheme(t),\n );\n watch(\n () => props.readOnly,\n (ro) => editorRef.value?.setReadOnly(ro),\n );\n\n expose({ editor: editorRef });\n\n return () => h(\"div\", { ref: containerRef });\n },\n});\n"],"mappings":";;;AAsBA,SAAgB,UACd,cACA,UAAyB,CAAC,GACC;CAC3B,MAAM,YAAY,WAA0B,IAAI;CAEhD,gBAAgB;EACd,MAAM,KAAK,aAAa;EACxB,IAAI,CAAC,IAAI;EACT,UAAU,QAAQ,aAAa,IAAI,OAAO;CAC5C,CAAC;CAED,sBAAsB;EACpB,UAAU,OAAO,QAAQ;EACzB,UAAU,QAAQ;CACpB,CAAC;CAED,OAAO;AACT;AAEA,MAAa,eAAe,gBAAgB;CAC1C,MAAM;CACN,OAAO;EACL,YAAY;GACV,MAAM;GACN,SAAS;EACX;EACA,OAAO;GACL,MAAM;GACN,SAAS;EACX;EACA,aAAa;GACX,MAAM;GACN,SAAS,KAAA;EACX;EACA,UAAU;GACR,MAAM;GACN,SAAS;EACX;EACA,UAAU;GACR,MAAM;GACN,SAAS,KAAA;EACX;EACA,UAAU;GACR,MAAM;GACN,SAAS,KAAA;EACX;CACF;CACA,OAAO;EACL,sBAAsB,WAAmB;EACzC,eAAe,SAAyB;CAC1C;CACA,MAAM,OAAO,EAAE,MAAM,UAAU;EAC7B,MAAM,eAAe,IAAwB,IAAI;EACjD,MAAM,YAAY,WAA0B,IAAI;EAEhD,gBAAgB;GACd,MAAM,KAAK,aAAa;GACxB,IAAI,CAAC,IAAI;GACT,UAAU,QAAQ,aAAa,IAAI;IACjC,OAAO,MAAM;IACb,OAAO,MAAM;IACb,aAAa,MAAM;IACnB,UAAU,MAAM;IAChB,UAAU,MAAM;IAChB,UAAU,MAAM;IAChB,WAAW,QAAQ,KAAK,qBAAqB,GAAG;IAChD,iBAAiB,QAAQ,KAAK,gBAAgB,GAAG;GACnD,CAAC;EACH,CAAC;EAED,sBAAsB;GACpB,UAAU,OAAO,QAAQ;GACzB,UAAU,QAAQ;EACpB,CAAC;EAED,YACQ,MAAM,aACX,QAAQ,UAAU,OAAO,SAAS,GAAG,CACxC;EACA,YACQ,MAAM,QACX,MAAM,UAAU,OAAO,SAAS,CAAC,CACpC;EACA,YACQ,MAAM,WACX,OAAO,UAAU,OAAO,YAAY,EAAE,CACzC;EAEA,OAAO,EAAE,QAAQ,UAAU,CAAC;EAE5B,aAAa,EAAE,OAAO,EAAE,KAAK,aAAa,CAAC;CAC7C;AACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myedit/vue",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Vue 3 adapter for myedit Markdown Editor",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"editor",
|
|
7
|
+
"markdown",
|
|
8
|
+
"myedit",
|
|
9
|
+
"vue"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/nuskey8/myedit#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/nuskey8/myedit/issues"
|
|
14
|
+
},
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/nuskey8/myedit.git",
|
|
19
|
+
"directory": "packages/vue"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"type": "module",
|
|
25
|
+
"sideEffects": false,
|
|
26
|
+
"main": "./dist/index.mjs",
|
|
27
|
+
"module": "./dist/index.mjs",
|
|
28
|
+
"types": "./dist/index.d.mts",
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./dist/index.d.mts",
|
|
32
|
+
"import": "./dist/index.mjs"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "vp pack"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@myedit/core": "0.2.0",
|
|
43
|
+
"vue": "^3.5.0"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"@myedit/core": "^0.2.0",
|
|
47
|
+
"vue": ">=3"
|
|
48
|
+
}
|
|
49
|
+
}
|