nextext-editor 0.1.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/dist/components/CodeBlockModal.d.ts +7 -0
- package/dist/components/ColorPicker.d.ts +8 -0
- package/dist/components/Editor.d.ts +38 -0
- package/dist/components/HeadingSelector.d.ts +7 -0
- package/dist/components/MentionDropdown.d.ts +14 -0
- package/dist/components/Preview.d.ts +9 -0
- package/dist/components/SlashCommandMenu.d.ts +21 -0
- package/dist/components/Toolbar.d.ts +10 -0
- package/dist/components/block/EditorBlock.d.ts +10 -0
- package/dist/components/block/index.d.ts +2 -0
- package/dist/hooks/useLoroEditor.d.ts +13 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/tokens.d.ts +42 -0
- package/dist/lib/utils.d.ts +6 -0
- package/dist/loro_wasm_bg-CrmHo0n8.js +2 -0
- package/dist/loro_wasm_bg-CrmHo0n8.js.map +1 -0
- package/dist/styles.css +1 -0
- package/dist/types/editor.d.ts +25 -0
- package/package.json +88 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design tokens for HyperText Editor
|
|
3
|
+
* Following shadcn/ui patterns for easy customization
|
|
4
|
+
*/
|
|
5
|
+
export declare const editorTokens: {
|
|
6
|
+
readonly container: {
|
|
7
|
+
readonly base: "w-full bg-white rounded-xl border border-gray-200 shadow-sm overflow-hidden";
|
|
8
|
+
readonly focused: "ring-2 ring-blue-500/20 ring-offset-2";
|
|
9
|
+
};
|
|
10
|
+
readonly editor: {
|
|
11
|
+
readonly container: "max-h-[600px] overflow-y-auto scroll-smooth";
|
|
12
|
+
readonly base: "min-h-[500px] p-8 focus:outline-none prose prose-base max-w-none text-gray-900 leading-relaxed";
|
|
13
|
+
readonly placeholder: "text-gray-400";
|
|
14
|
+
};
|
|
15
|
+
readonly toolbar: {
|
|
16
|
+
readonly base: "flex flex-wrap items-center gap-1 px-4 py-3 border-b border-gray-200 bg-gray-50/50 backdrop-blur-sm";
|
|
17
|
+
readonly group: "flex items-center gap-1 px-1";
|
|
18
|
+
readonly separator: "w-px h-5 bg-gray-300 mx-2";
|
|
19
|
+
};
|
|
20
|
+
readonly button: {
|
|
21
|
+
readonly base: "inline-flex items-center justify-center rounded-lg text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500/50 disabled:pointer-events-none disabled:opacity-40";
|
|
22
|
+
readonly default: "h-9 px-3 bg-white hover:bg-blue-50 hover:text-blue-600 border border-gray-200";
|
|
23
|
+
readonly icon: "h-9 w-9 hover:bg-blue-50 hover:text-blue-600 text-gray-600";
|
|
24
|
+
readonly active: "bg-blue-100 text-blue-700 border-blue-200";
|
|
25
|
+
};
|
|
26
|
+
readonly dropdown: {
|
|
27
|
+
readonly trigger: "inline-flex items-center justify-center rounded-lg text-sm font-medium h-9 px-3 hover:bg-blue-50 hover:text-blue-600 text-gray-700";
|
|
28
|
+
readonly content: "z-50 min-w-[10rem] overflow-hidden rounded-xl border border-gray-200 bg-white p-2 shadow-lg";
|
|
29
|
+
readonly item: "relative flex cursor-pointer select-none items-center rounded-lg px-3 py-2 text-sm outline-none transition-colors hover:bg-blue-50 hover:text-blue-600 text-gray-700";
|
|
30
|
+
};
|
|
31
|
+
readonly colorPicker: {
|
|
32
|
+
readonly trigger: "h-9 w-9 rounded-lg border-2 border-gray-200 cursor-pointer hover:ring-2 hover:ring-blue-500/50 transition-all";
|
|
33
|
+
readonly popover: "rounded-xl border border-gray-200 bg-white p-4 shadow-lg";
|
|
34
|
+
readonly grid: "grid grid-cols-5 gap-2";
|
|
35
|
+
readonly swatch: "h-8 w-8 rounded-lg cursor-pointer hover:ring-2 hover:ring-blue-500/50 transition-all hover:scale-110";
|
|
36
|
+
};
|
|
37
|
+
readonly stats: {
|
|
38
|
+
readonly container: "px-6 py-3 bg-gray-50/80 border-t border-gray-200 text-sm text-gray-600";
|
|
39
|
+
readonly item: "inline-flex items-center gap-1.5 font-medium";
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export type EditorTokens = typeof editorTokens;
|