@watalabs/lasee-mditor 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.
@@ -0,0 +1,123 @@
1
+ export type Locale = "ko" | "en";
2
+ export declare const ko: {
3
+ paragraph: string;
4
+ docTitle: string;
5
+ sectionHead: string;
6
+ blockTitle: string;
7
+ list: string;
8
+ note: string;
9
+ codeBlock: string;
10
+ tableOrImage: string;
11
+ blockKind: string;
12
+ bold: string;
13
+ italic: string;
14
+ underline: string;
15
+ strike: string;
16
+ code: string;
17
+ superscript: string;
18
+ subscript: string;
19
+ highlight: string;
20
+ textColor: string;
21
+ color: string;
22
+ defaultColor: string;
23
+ pickColor: string;
24
+ colorCode: string;
25
+ apply: string;
26
+ shade: string;
27
+ removeFormat: string;
28
+ link: string;
29
+ linkUrl: string;
30
+ linkText: string;
31
+ linkApply: string;
32
+ linkRemove: string;
33
+ linkOpen: string;
34
+ linkInvalid: string;
35
+ bulletList: string;
36
+ orderedList: string;
37
+ taskList: string;
38
+ indent: string;
39
+ outdent: string;
40
+ align: string;
41
+ alignLeft: string;
42
+ alignCenter: string;
43
+ alignRight: string;
44
+ alignJustify: string;
45
+ insert: string;
46
+ table: string;
47
+ insertTable: string;
48
+ tableSize: string;
49
+ image: string;
50
+ insertImage: string;
51
+ imageUrl: string;
52
+ imageUpload: string;
53
+ imageCaption: string;
54
+ imageMissing: string;
55
+ horizontalRule: string;
56
+ pageBreak: string;
57
+ specialChars: string;
58
+ codeLanguage: string;
59
+ codeLanguageNone: string;
60
+ rowAbove: string;
61
+ rowBelow: string;
62
+ colLeft: string;
63
+ colRight: string;
64
+ deleteRow: string;
65
+ deleteCol: string;
66
+ mergeCells: string;
67
+ mergeHint: string;
68
+ splitCell: string;
69
+ cellShade: string;
70
+ colLeftAlign: string;
71
+ colCenterAlign: string;
72
+ colRightAlign: string;
73
+ colAlignTitle: string;
74
+ deleteTable: string;
75
+ find: string;
76
+ findReplace: string;
77
+ findPlaceholder: string;
78
+ replacePlaceholder: string;
79
+ findPrev: string;
80
+ findNext: string;
81
+ replace: string;
82
+ replaceAll: string;
83
+ matchCase: string;
84
+ findCount: string;
85
+ findNone: string;
86
+ close: string;
87
+ undo: string;
88
+ redo: string;
89
+ source: string;
90
+ sourceBack: string;
91
+ preview: string;
92
+ previewOn: string;
93
+ previewOff: string;
94
+ fullscreen: string;
95
+ pageMarks: string;
96
+ pageLabel: string;
97
+ pagesTotal: string;
98
+ fullscreenExit: string;
99
+ more: string;
100
+ toolbar: string;
101
+ tableToolbar: string;
102
+ editorLabel: string;
103
+ sourceLabel: string;
104
+ previewLabel: string;
105
+ chars: string;
106
+ words: string;
107
+ sourceError: string;
108
+ sourceErrorNoLine: string;
109
+ "table-no-delim": string;
110
+ "table-no-head": string;
111
+ "table-too-wide": string;
112
+ "table-row-too-long": string;
113
+ placeholder: string;
114
+ tooLong: string;
115
+ pasteTooLong: string;
116
+ shortcut: string;
117
+ };
118
+ export type Messages = typeof ko;
119
+ export declare const en: Messages;
120
+ export declare const LOCALES: Record<Locale, Messages>;
121
+ /** {이름} 자리를 채운다. */
122
+ export declare function fill(s: string, vars?: Record<string, string | number>): string;
123
+ export declare function messagesFor(locale?: Locale, over?: Partial<Messages>): Messages;
@@ -0,0 +1,16 @@
1
+ import { type Messages } from "./messages";
2
+ export declare const PALETTE: string[][];
3
+ /** 입력한 색 코드 → #rrggbb(소문자). 틀리면 null. */
4
+ export declare function parseHex(text: string): string | null;
5
+ /** 색 코드 → 문서에 쓸 태그 이름. 이름 붙은 색과 같으면 그 이름(빨강 · 파랑 · 회색). */
6
+ export declare function colorTag(hex: string): string;
7
+ /** 색 단추의 그림 — 글자 아래 막대가 지금 색이다. */
8
+ export declare function colorGlyph(glyph: string, color: string | null, shade: boolean): string;
9
+ export declare function colorPanel(m: Messages, current: string | null, shade: boolean, canClear: boolean, onColor: (name: string | null) => void, onShade: () => void): HTMLElement;
10
+ export declare function linkPanel(m: Messages, href: string | null, withText: boolean, onApply: (href: string, text: string) => void, onRemove: (() => void) | null): HTMLElement;
11
+ export declare function tableGrid(m: Messages, onPick: (rows: number, cols: number) => void, size?: [number, number]): HTMLElement;
12
+ export declare const SPECIAL_CHARS: [string, string][];
13
+ export declare function specialCharsPanel(m: Messages, onPick: (ch: string) => void): HTMLElement;
14
+ export declare function imagePanel(m: Messages, onUrl: (src: string, caption: string) => void, onFile: (() => void) | null): HTMLElement;
15
+ export declare const ALIGNS: readonly [readonly ["left", "alignLeft"], readonly ["center", "alignCenter"], readonly ["right", "alignRight"], readonly ["justify", "alignJustify"]];
16
+ export declare function alignPanel(m: Messages, current: string | null, onPick: (align: "left" | "center" | "right" | "justify") => void): HTMLElement;
package/package.json CHANGED
@@ -1,6 +1,84 @@
1
1
  {
2
2
  "name": "@watalabs/lasee-mditor",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "Markdown document editor — edit what you see, keep Markdown as the source. Toolbar, tables with merged cells, lists, code blocks, find & replace, source mode, preview.",
5
+ "license": "MIT",
6
+ "author": "WataLabs (https://watalabs.com)",
7
+ "homepage": "https://lasee.watalabs.com",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/madorik/mditor-lasee.git",
11
+ "directory": "web/packages/lasee-mditor"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/madorik/mditor-lasee/issues"
15
+ },
16
+ "type": "module",
17
+ "main": "./dist/index.js",
18
+ "module": "./dist/index.js",
19
+ "types": "./dist/types/index.d.ts",
20
+ "unpkg": "./dist/lasee-mditor.umd.js",
21
+ "jsdelivr": "./dist/lasee-mditor.umd.js",
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/types/index.d.ts",
25
+ "import": "./dist/index.js"
26
+ },
27
+ "./core": {
28
+ "types": "./dist/types/core.d.ts",
29
+ "import": "./dist/core.js"
30
+ },
31
+ "./react": {
32
+ "types": "./dist/types/react.d.ts",
33
+ "import": "./dist/react.js"
34
+ },
35
+ "./style.css": "./dist/style.css",
36
+ "./umd": "./dist/lasee-mditor.umd.js"
37
+ },
38
+ "files": [
39
+ "dist",
40
+ "README.md",
41
+ "LICENSE"
42
+ ],
43
+ "sideEffects": [
44
+ "*.css"
45
+ ],
46
+ "keywords": [
47
+ "markdown",
48
+ "editor",
49
+ "wysiwyg",
50
+ "tiptap",
51
+ "prosemirror",
52
+ "korean"
53
+ ],
54
+ "scripts": {
55
+ "build": "rm -rf dist && vite build && vite build --mode umd && cp src/style.css dist/style.css && tsc -p tsconfig.build.json",
56
+ "dev": "vite --open /demo/",
57
+ "test": "vitest run",
58
+ "prepublishOnly": "npm run build"
59
+ },
60
+ "dependencies": {
61
+ "@tiptap/core": "3.32.1",
62
+ "@tiptap/extension-code": "3.32.1",
63
+ "@tiptap/extension-paragraph": "3.32.1",
64
+ "@tiptap/extension-table": "3.32.1",
65
+ "@tiptap/extensions": "3.32.1",
66
+ "@tiptap/pm": "3.32.1",
67
+ "@tiptap/starter-kit": "3.32.1"
68
+ },
69
+ "peerDependencies": {
70
+ "react": ">=18",
71
+ "react-dom": ">=18"
72
+ },
73
+ "peerDependenciesMeta": {
74
+ "react": {
75
+ "optional": true
76
+ },
77
+ "react-dom": {
78
+ "optional": true
79
+ }
80
+ },
81
+ "publishConfig": {
82
+ "access": "public"
83
+ }
84
+ }