una-editor 0.2.3 → 0.3.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/dist/index.cjs +39 -39
- package/dist/index.mjs +3121 -2984
- package/dist/types/components/UnaEditor.vue.d.ts +1 -2
- package/dist/types/components/UnaEditor.vue.d.ts.map +1 -1
- package/dist/types/composables/useEditor.d.ts.map +1 -1
- package/dist/types/extensions/hybridMarkdown.d.ts +4 -3
- package/dist/types/extensions/hybridMarkdown.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types/editor.d.ts +4 -2
- package/dist/types/types/editor.d.ts.map +1 -1
- package/dist/una-editor.css +1 -1
- package/package.json +9 -9
|
@@ -15,10 +15,9 @@ declare const __VLS_export: import("vue").DefineComponent<EditorProps, EditorExp
|
|
|
15
15
|
onDrop?: ((files: File[]) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
17
|
modelValue: string;
|
|
18
|
-
language: string;
|
|
19
18
|
lineNumbers: boolean;
|
|
20
19
|
lineWrap: boolean;
|
|
21
|
-
|
|
20
|
+
livePreview: boolean;
|
|
22
21
|
vimMode: boolean;
|
|
23
22
|
locale: string | import("..").CustomLocale;
|
|
24
23
|
theme: "light" | "dark";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnaEditor.vue.d.ts","sourceRoot":"","sources":["../../../src/components/UnaEditor.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UnaEditor.vue.d.ts","sourceRoot":"","sources":["../../../src/components/UnaEditor.vue"],"names":[],"mappings":"AAgKA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA2KlE,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;6EAKhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditor.d.ts","sourceRoot":"","sources":["../../../src/composables/useEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAEvE,OAAO,EAAE,UAAU,EAAsD,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"useEditor.d.ts","sourceRoot":"","sources":["../../../src/composables/useEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAEvE,OAAO,EAAE,UAAU,EAAsD,MAAM,kBAAkB,CAAC;AAYlG,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AA6C5D,wBAAgB,SAAS,CACvB,SAAS,EAAE,GAAG,CAAC,WAAW,GAAG,SAAS,CAAC,EACvC,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE;IACJ,CAAC,CAAC,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9C,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACnB,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;CAClC;;;wBAyRwB,MAAM;yBAOL,UAAU,GAAG,SAAS;uBAItB,MAAM;uBAkBR,OAAO,EAAE;+BAwBC,MAAM;EAwCzC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { EditorView } from '@codemirror/view';
|
|
2
1
|
import { type Extension } from '@codemirror/state';
|
|
3
|
-
export declare
|
|
4
|
-
export declare function
|
|
2
|
+
export declare const remeasureEffect: import("@codemirror/state").StateEffectType<null>;
|
|
3
|
+
export declare function setupVimLogicalNavigation(): void;
|
|
4
|
+
export declare function createLivePreviewExtensions(): Extension;
|
|
5
|
+
export declare function createCodeDecorationExtension(): Extension;
|
|
5
6
|
//# sourceMappingURL=hybridMarkdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hybridMarkdown.d.ts","sourceRoot":"","sources":["../../../src/extensions/hybridMarkdown.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hybridMarkdown.d.ts","sourceRoot":"","sources":["../../../src/extensions/hybridMarkdown.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqB,KAAK,SAAS,EAAc,MAAM,mBAAmB,CAAC;AAMlF,eAAO,MAAM,eAAe,mDAA6B,CAAC;AAI1D,wBAAgB,yBAAyB,SA4CxC;AAocD,wBAAgB,2BAA2B,IAAI,SAAS,CAcvD;AA4CD,wBAAgB,6BAA6B,IAAI,SAAS,CAOzD"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const version
|
|
1
|
+
export declare const version: string;
|
|
2
2
|
export { default as UnaEditor } from './components/UnaEditor.vue';
|
|
3
3
|
export type { EditorProps, EditorEvents, EditorExposed, CustomLocale, Locale, } from './types/editor';
|
|
4
4
|
export { locales, defaultLocale, defineLocale, zhCN, enUS } from './locales';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,QAAyB,CAAC;AAG9C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAGlE,YAAY,EACV,WAAW,EACX,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,MAAM,GACP,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import type { EditorView } from '@codemirror/view';
|
|
2
2
|
export interface EditorProps {
|
|
3
3
|
modelValue: string;
|
|
4
|
-
language?: string;
|
|
5
4
|
lineNumbers?: boolean;
|
|
6
5
|
lineWrap?: boolean;
|
|
7
|
-
|
|
6
|
+
livePreview?: boolean;
|
|
8
7
|
vimMode?: boolean;
|
|
9
8
|
locale?: string | CustomLocale;
|
|
10
9
|
placeholder?: string;
|
|
11
10
|
disabled?: boolean;
|
|
12
11
|
readonly?: boolean;
|
|
13
12
|
theme?: 'light' | 'dark';
|
|
13
|
+
fontFamily?: string;
|
|
14
|
+
codeFontFamily?: string;
|
|
15
|
+
fontSize?: number;
|
|
14
16
|
}
|
|
15
17
|
export interface EditorEvents {
|
|
16
18
|
'update:modelValue': (value: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../src/types/editor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnD,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../src/types/editor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnD,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAC/B,WAAW,CAAC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,MAAM,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,YAAY,CAAC"}
|
package/dist/una-editor.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.una-editor[data-v-
|
|
1
|
+
.una-editor[data-v-48002c94]{width:100%;height:100%;min-height:200px;position:relative}.una-editor-fullscreen-browser[data-v-48002c94]{position:fixed;inset:0;z-index:9999;background:#fff}.una-editor-fullscreen-tip[data-v-48002c94]{position:absolute;top:20px;left:50%;transform:translate(-50%);background:#000c;color:#fff;padding:12px 24px;border-radius:8px;font-size:14px;z-index:10000;pointer-events:none;box-shadow:0 4px 12px #0000004d}.fade-enter-active[data-v-48002c94],.fade-leave-active[data-v-48002c94]{transition:opacity .3s ease}.fade-enter-from[data-v-48002c94],.fade-leave-to[data-v-48002c94]{opacity:0}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "una-editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Lightweight & high-performance Vue 3 editor powered by CodeMirror 6. Supports Hybrid Markdown and Vim mode.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@eslint/js": "^10.0.1",
|
|
41
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
42
|
-
"@typescript-eslint/parser": "^8.
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "^8.57.0",
|
|
42
|
+
"@typescript-eslint/parser": "^8.57.0",
|
|
43
43
|
"@vitejs/plugin-vue": "^5.2.4",
|
|
44
44
|
"@vue/test-utils": "^2.4.6",
|
|
45
45
|
"concurrently": "^9.2.1",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"jsdom": "^28.1.0",
|
|
49
49
|
"prettier": "^3.8.1",
|
|
50
50
|
"typescript": "^5.9.3",
|
|
51
|
-
"typescript-eslint": "^8.
|
|
51
|
+
"typescript-eslint": "^8.57.0",
|
|
52
52
|
"vite": "^7.3.1",
|
|
53
|
-
"vitest": "^4.0
|
|
54
|
-
"vue": "^3.5.
|
|
53
|
+
"vitest": "^4.1.0",
|
|
54
|
+
"vue": "^3.5.30",
|
|
55
55
|
"vue-tsc": "^3.2.5"
|
|
56
56
|
},
|
|
57
57
|
"keywords": [
|
|
@@ -73,13 +73,13 @@
|
|
|
73
73
|
},
|
|
74
74
|
"homepage": "https://charlestang.github.io/UnaEditor/",
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@codemirror/commands": "^6.10.
|
|
76
|
+
"@codemirror/commands": "^6.10.3",
|
|
77
77
|
"@codemirror/lang-markdown": "^6.5.0",
|
|
78
78
|
"@codemirror/language": "^6.12.2",
|
|
79
79
|
"@codemirror/search": "^6.6.0",
|
|
80
|
-
"@codemirror/state": "^6.
|
|
80
|
+
"@codemirror/state": "^6.6.0",
|
|
81
81
|
"@codemirror/theme-one-dark": "^6.1.3",
|
|
82
|
-
"@codemirror/view": "^6.
|
|
82
|
+
"@codemirror/view": "^6.40.0",
|
|
83
83
|
"@replit/codemirror-vim": "^6.3.0"
|
|
84
84
|
}
|
|
85
85
|
}
|